@opensumi/cli-engine 3.8.2-next-1741408460.0 → 3.8.2-next-1741413805.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.
@@ -9241,171 +9241,151 @@ html li {
9241
9241
  .chat_context .add_context:hover {
9242
9242
  border-color: var(--kt-selectOption-activeBorder);
9243
9243
  }
9244
- `],sourceRoot:""}]),p.locals={chat_context:"oqIb_ybioeX6Rw7DIZnm",collapse_hide:"DlD9vlARQDePa9xWGBIq",context_header:"qUIVN4GqQnNVOlm3Sj3j",chat_context_title:"ODw3A51mlCjcrJ49Zbyb",context_selector:"bsMccvNY9UKCh6LOO4Kt",context_list:"_uItKEwjzXosE2JccruD",list_desc:"JI_fl5Vig2wnPalvt4ek",candidate_file:"RRN3IktcdJxd2rNDasFn",basename:"DLIxaKURdCkUwwXRmk6x",dir:"xjNrkZahC3MEGqc6yHM4",active:"s1Z243u0moeukxdMlojv",context_search_layer:"DLyF470petmkVA1BoSKQ",file_list:"_qj7eUaioMmBbEEvKaKG",selected_item:"tfQseJAtPVsJMt5KbyHX",close_icon:"UawwevOJn3xusHCpnfT2",add_context:"EHtF5j47bQRxDP__Yiqa"};const v=p},20946:(x,t,e)=>{"use strict";e.d(t,{A:()=>v});var n=e(82001),r=e.n(n),o=e(40935),c=e.n(o),p=c()(r());p.push([x.id,`.Cg9H0vjDJVmSXy0jZxKb {
9244
+ `],sourceRoot:""}]),p.locals={chat_context:"oqIb_ybioeX6Rw7DIZnm",collapse_hide:"DlD9vlARQDePa9xWGBIq",context_header:"qUIVN4GqQnNVOlm3Sj3j",chat_context_title:"ODw3A51mlCjcrJ49Zbyb",context_selector:"bsMccvNY9UKCh6LOO4Kt",context_list:"_uItKEwjzXosE2JccruD",list_desc:"JI_fl5Vig2wnPalvt4ek",candidate_file:"RRN3IktcdJxd2rNDasFn",basename:"DLIxaKURdCkUwwXRmk6x",dir:"xjNrkZahC3MEGqc6yHM4",active:"s1Z243u0moeukxdMlojv",context_search_layer:"DLyF470petmkVA1BoSKQ",file_list:"_qj7eUaioMmBbEEvKaKG",selected_item:"tfQseJAtPVsJMt5KbyHX",close_icon:"UawwevOJn3xusHCpnfT2",add_context:"EHtF5j47bQRxDP__Yiqa"};const v=p},20946:(x,t,e)=>{"use strict";e.d(t,{A:()=>v});var n=e(82001),r=e.n(n),o=e(40935),c=e.n(o),p=c()(r());p.push([x.id,`.jZcY39Y0VYdsYPs5a34B {
9245
9245
  margin: 8px 0;
9246
9246
  border: 1px solid var(--design-borderColor);
9247
9247
  border-radius: 6px;
9248
9248
  overflow: hidden;
9249
9249
  }
9250
- .Cg9H0vjDJVmSXy0jZxKb .U5IgPtACi_1LKWntnxs6 {
9250
+ .jZcY39Y0VYdsYPs5a34B .mieH_fTzHsnOPD08LZhA {
9251
9251
  display: flex;
9252
9252
  align-items: center;
9253
9253
  justify-content: space-between;
9254
- padding: 4px;
9254
+ padding: 8px 12px;
9255
9255
  background-color: var(--design-block-background);
9256
9256
  cursor: pointer;
9257
9257
  user-select: none;
9258
9258
  }
9259
- .Cg9H0vjDJVmSXy0jZxKb .U5IgPtACi_1LKWntnxs6:hover {
9259
+ .jZcY39Y0VYdsYPs5a34B .mieH_fTzHsnOPD08LZhA:hover {
9260
9260
  background-color: var(--design-block-hoverBackground);
9261
9261
  }
9262
- .Cg9H0vjDJVmSXy0jZxKb .agjt7GdkfR54ilMh4uCL {
9263
- font-size: 12px;
9262
+ .jZcY39Y0VYdsYPs5a34B .I2rggrcSl0QE72xXDpx6 {
9264
9263
  display: flex;
9265
9264
  align-items: center;
9266
9265
  font-weight: 500;
9267
9266
  color: var(--design-text-foreground);
9268
9267
  }
9269
- .Cg9H0vjDJVmSXy0jZxKb .Lmhs4F5WkReL77i8v8z4 {
9270
- font-size: 12px !important;
9271
- }
9272
- .Cg9H0vjDJVmSXy0jZxKb .d2mMvWOyOXxK3dA3c3i2 {
9273
- margin-left: 5px;
9274
- font-size: 11px;
9275
- color: var(--descriptionForeground);
9276
- }
9277
- .Cg9H0vjDJVmSXy0jZxKb .yKM7YI0mvRKj_DqVsLBh {
9268
+ .jZcY39Y0VYdsYPs5a34B .Sj86WbaHgPyFOqCQy0oV {
9278
9269
  display: inline-block;
9279
9270
  margin-right: 8px;
9280
9271
  transition: transform 0.2s;
9281
9272
  color: var(--design-text-placeholderForeground);
9282
9273
  }
9283
- .Cg9H0vjDJVmSXy0jZxKb .yKM7YI0mvRKj_DqVsLBh.Bk76FjjtLdheRzu3zAfI {
9274
+ .jZcY39Y0VYdsYPs5a34B .Sj86WbaHgPyFOqCQy0oV.Bk76FjjtLdheRzu3zAfI {
9284
9275
  transform: rotate(90deg);
9285
9276
  }
9286
- .Cg9H0vjDJVmSXy0jZxKb .AkiQESOFLjHXzszOdAUl {
9277
+ .jZcY39Y0VYdsYPs5a34B .A82E6ea0qhyvinPHV5gN {
9287
9278
  display: flex;
9288
9279
  align-items: center;
9289
9280
  font-size: 12px;
9290
9281
  color: var(--design-text-placeholderForeground);
9291
9282
  }
9292
- .Cg9H0vjDJVmSXy0jZxKb .K4anggD7IVkZYeKmcsnv {
9283
+ .jZcY39Y0VYdsYPs5a34B .rrJYFSyLaDo6_twmbCFS {
9293
9284
  display: flex;
9294
9285
  align-items: center;
9295
9286
  margin-right: 6px;
9296
9287
  }
9297
- .Cg9H0vjDJVmSXy0jZxKb .drvB_2u8m3J8Kv614TM3 {
9288
+ .jZcY39Y0VYdsYPs5a34B .yhQBOfdXyjtPOslPTpnp {
9298
9289
  width: 12px;
9299
9290
  height: 12px;
9300
9291
  }
9301
- .Cg9H0vjDJVmSXy0jZxKb .u72LPJdeed73tmz0uON9 {
9292
+ .jZcY39Y0VYdsYPs5a34B .JYluvXd2pubTthj_5KVe {
9302
9293
  margin-left: 4px;
9303
9294
  }
9304
- .Cg9H0vjDJVmSXy0jZxKb .sH0vgVq8JEvYJ4Vgf3iw {
9295
+ .jZcY39Y0VYdsYPs5a34B .kPJThR8b8bB96JA9Q5ql {
9305
9296
  max-height: 0;
9306
9297
  overflow: hidden;
9307
9298
  transition: max-height 0.3s ease-out;
9308
9299
  background-color: var(--design-container-background);
9309
9300
  }
9310
- .Cg9H0vjDJVmSXy0jZxKb .sH0vgVq8JEvYJ4Vgf3iw.Bk76FjjtLdheRzu3zAfI {
9301
+ .jZcY39Y0VYdsYPs5a34B .kPJThR8b8bB96JA9Q5ql.Bk76FjjtLdheRzu3zAfI {
9311
9302
  max-height: 1000px;
9312
9303
  }
9313
- .Cg9H0vjDJVmSXy0jZxKb .CJ6q8EbZTRwXMxG5O_q2,
9314
- .Cg9H0vjDJVmSXy0jZxKb .Q_F2se6YC8okuPwG13X2 {
9315
- font-size: 11px;
9316
- padding: 5px;
9304
+ .jZcY39Y0VYdsYPs5a34B .jZW_vmpYXDrK7fUUvenA,
9305
+ .jZcY39Y0VYdsYPs5a34B .AMepFmN1OJrY5MQ9V3lJ {
9306
+ padding: 12px;
9317
9307
  }
9318
- .Cg9H0vjDJVmSXy0jZxKb .v0adjo3EaSdfLUyiImly {
9308
+ .jZcY39Y0VYdsYPs5a34B .RT5CvlRym7QeqqP8oelt {
9319
9309
  font-size: 12px;
9320
9310
  color: var(--design-text-placeholderForeground);
9321
9311
  margin-bottom: 8px;
9322
9312
  }
9323
- .Cg9H0vjDJVmSXy0jZxKb .Q_F2se6YC8okuPwG13X2 {
9313
+ .jZcY39Y0VYdsYPs5a34B .AMepFmN1OJrY5MQ9V3lJ {
9324
9314
  border-top: 1px solid var(--design-borderColor);
9325
9315
  }
9326
- `,"",{version:3,sources:["webpack://./../../packages/ai-native/lib/browser/components/ChatToolRender.module.less"],names:[],mappings:"AAAA;EACE,aAAa;EACb,2CAA2C;EAC3C,kBAAkB;EAClB,gBAAgB;AAClB;AACA;EACE,aAAa;EACb,mBAAmB;EACnB,8BAA8B;EAC9B,YAAY;EACZ,gDAAgD;EAChD,eAAe;EACf,iBAAiB;AACnB;AACA;EACE,qDAAqD;AACvD;AACA;EACE,eAAe;EACf,aAAa;EACb,mBAAmB;EACnB,gBAAgB;EAChB,oCAAoC;AACtC;AACA;EACE,0BAA0B;AAC5B;AACA;EACE,gBAAgB;EAChB,eAAe;EACf,mCAAmC;AACrC;AACA;EACE,qBAAqB;EACrB,iBAAiB;EACjB,0BAA0B;EAC1B,+CAA+C;AACjD;AACA;EACE,wBAAwB;AAC1B;AACA;EACE,aAAa;EACb,mBAAmB;EACnB,eAAe;EACf,+CAA+C;AACjD;AACA;EACE,aAAa;EACb,mBAAmB;EACnB,iBAAiB;AACnB;AACA;EACE,WAAW;EACX,YAAY;AACd;AACA;EACE,gBAAgB;AAClB;AACA;EACE,aAAa;EACb,gBAAgB;EAChB,oCAAoC;EACpC,oDAAoD;AACtD;AACA;EACE,kBAAkB;AACpB;AACA;;EAEE,eAAe;EACf,YAAY;AACd;AACA;EACE,eAAe;EACf,+CAA+C;EAC/C,kBAAkB;AACpB;AACA;EACE,+CAA+C;AACjD",sourcesContent:[`.chat_tool_render {
9316
+ `,"",{version:3,sources:["webpack://./../../packages/ai-native/lib/browser/components/ChatToolRender.module.less"],names:[],mappings:"AAAA;EACE,aAAa;EACb,2CAA2C;EAC3C,kBAAkB;EAClB,gBAAgB;AAClB;AACA;EACE,aAAa;EACb,mBAAmB;EACnB,8BAA8B;EAC9B,iBAAiB;EACjB,gDAAgD;EAChD,eAAe;EACf,iBAAiB;AACnB;AACA;EACE,qDAAqD;AACvD;AACA;EACE,aAAa;EACb,mBAAmB;EACnB,gBAAgB;EAChB,oCAAoC;AACtC;AACA;EACE,qBAAqB;EACrB,iBAAiB;EACjB,0BAA0B;EAC1B,+CAA+C;AACjD;AACA;EACE,wBAAwB;AAC1B;AACA;EACE,aAAa;EACb,mBAAmB;EACnB,eAAe;EACf,+CAA+C;AACjD;AACA;EACE,aAAa;EACb,mBAAmB;EACnB,iBAAiB;AACnB;AACA;EACE,WAAW;EACX,YAAY;AACd;AACA;EACE,gBAAgB;AAClB;AACA;EACE,aAAa;EACb,gBAAgB;EAChB,oCAAoC;EACpC,oDAAoD;AACtD;AACA;EACE,kBAAkB;AACpB;AACA;;EAEE,aAAa;AACf;AACA;EACE,eAAe;EACf,+CAA+C;EAC/C,kBAAkB;AACpB;AACA;EACE,+CAA+C;AACjD",sourcesContent:[`.chat-tool-render {
9327
9317
  margin: 8px 0;
9328
9318
  border: 1px solid var(--design-borderColor);
9329
9319
  border-radius: 6px;
9330
9320
  overflow: hidden;
9331
9321
  }
9332
- .chat_tool_render .tool_header {
9322
+ .chat-tool-render .tool-header {
9333
9323
  display: flex;
9334
9324
  align-items: center;
9335
9325
  justify-content: space-between;
9336
- padding: 4px;
9326
+ padding: 8px 12px;
9337
9327
  background-color: var(--design-block-background);
9338
9328
  cursor: pointer;
9339
9329
  user-select: none;
9340
9330
  }
9341
- .chat_tool_render .tool_header:hover {
9331
+ .chat-tool-render .tool-header:hover {
9342
9332
  background-color: var(--design-block-hoverBackground);
9343
9333
  }
9344
- .chat_tool_render .tool_name {
9345
- font-size: 12px;
9334
+ .chat-tool-render .tool-name {
9346
9335
  display: flex;
9347
9336
  align-items: center;
9348
9337
  font-weight: 500;
9349
9338
  color: var(--design-text-foreground);
9350
9339
  }
9351
- .chat_tool_render .tool_icon {
9352
- font-size: 12px !important;
9353
- }
9354
- .chat_tool_render .tool_label {
9355
- margin-left: 5px;
9356
- font-size: 11px;
9357
- color: var(--descriptionForeground);
9358
- }
9359
- .chat_tool_render .expand_icon {
9340
+ .chat-tool-render .expand-icon {
9360
9341
  display: inline-block;
9361
9342
  margin-right: 8px;
9362
9343
  transition: transform 0.2s;
9363
9344
  color: var(--design-text-placeholderForeground);
9364
9345
  }
9365
- .chat_tool_render .expand_icon.expanded {
9346
+ .chat-tool-render .expand-icon.expanded {
9366
9347
  transform: rotate(90deg);
9367
9348
  }
9368
- .chat_tool_render .tool_state {
9349
+ .chat-tool-render .tool-state {
9369
9350
  display: flex;
9370
9351
  align-items: center;
9371
9352
  font-size: 12px;
9372
9353
  color: var(--design-text-placeholderForeground);
9373
9354
  }
9374
- .chat_tool_render .state_icon {
9355
+ .chat-tool-render .state-icon {
9375
9356
  display: flex;
9376
9357
  align-items: center;
9377
9358
  margin-right: 6px;
9378
9359
  }
9379
- .chat_tool_render .loading_icon {
9360
+ .chat-tool-render .loading-icon {
9380
9361
  width: 12px;
9381
9362
  height: 12px;
9382
9363
  }
9383
- .chat_tool_render .state_label {
9364
+ .chat-tool-render .state-label {
9384
9365
  margin-left: 4px;
9385
9366
  }
9386
- .chat_tool_render .tool_content {
9367
+ .chat-tool-render .tool-content {
9387
9368
  max-height: 0;
9388
9369
  overflow: hidden;
9389
9370
  transition: max-height 0.3s ease-out;
9390
9371
  background-color: var(--design-container-background);
9391
9372
  }
9392
- .chat_tool_render .tool_content.expanded {
9373
+ .chat-tool-render .tool-content.expanded {
9393
9374
  max-height: 1000px;
9394
9375
  }
9395
- .chat_tool_render .tool_arguments,
9396
- .chat_tool_render .tool_result {
9397
- font-size: 11px;
9398
- padding: 5px;
9376
+ .chat-tool-render .tool-arguments,
9377
+ .chat-tool-render .tool-result {
9378
+ padding: 12px;
9399
9379
  }
9400
- .chat_tool_render .section_label {
9380
+ .chat-tool-render .section-label {
9401
9381
  font-size: 12px;
9402
9382
  color: var(--design-text-placeholderForeground);
9403
9383
  margin-bottom: 8px;
9404
9384
  }
9405
- .chat_tool_render .tool_result {
9385
+ .chat-tool-render .tool-result {
9406
9386
  border-top: 1px solid var(--design-borderColor);
9407
9387
  }
9408
- `],sourceRoot:""}]),p.locals={chat_tool_render:"Cg9H0vjDJVmSXy0jZxKb",tool_header:"U5IgPtACi_1LKWntnxs6",tool_name:"agjt7GdkfR54ilMh4uCL",tool_icon:"Lmhs4F5WkReL77i8v8z4",tool_label:"d2mMvWOyOXxK3dA3c3i2",expand_icon:"yKM7YI0mvRKj_DqVsLBh",expanded:"Bk76FjjtLdheRzu3zAfI",tool_state:"AkiQESOFLjHXzszOdAUl",state_icon:"K4anggD7IVkZYeKmcsnv",loading_icon:"drvB_2u8m3J8Kv614TM3",state_label:"u72LPJdeed73tmz0uON9",tool_content:"sH0vgVq8JEvYJ4Vgf3iw",tool_arguments:"CJ6q8EbZTRwXMxG5O_q2",tool_result:"Q_F2se6YC8okuPwG13X2",section_label:"v0adjo3EaSdfLUyiImly"};const v=p},28183:(x,t,e)=>{"use strict";e.d(t,{A:()=>v});var n=e(82001),r=e.n(n),o=e(40935),c=e.n(o),p=c()(r());p.push([x.id,`.mYYQZEjW8FYpcliUORqm {
9388
+ `],sourceRoot:""}]),p.locals={"chat-tool-render":"jZcY39Y0VYdsYPs5a34B","tool-header":"mieH_fTzHsnOPD08LZhA","tool-name":"I2rggrcSl0QE72xXDpx6","expand-icon":"Sj86WbaHgPyFOqCQy0oV",expanded:"Bk76FjjtLdheRzu3zAfI","tool-state":"A82E6ea0qhyvinPHV5gN","state-icon":"rrJYFSyLaDo6_twmbCFS","loading-icon":"yhQBOfdXyjtPOslPTpnp","state-label":"JYluvXd2pubTthj_5KVe","tool-content":"kPJThR8b8bB96JA9Q5ql","tool-arguments":"jZW_vmpYXDrK7fUUvenA","tool-result":"AMepFmN1OJrY5MQ9V3lJ","section-label":"RT5CvlRym7QeqqP8oelt"};const v=p},28183:(x,t,e)=>{"use strict";e.d(t,{A:()=>v});var n=e(82001),r=e.n(n),o=e(40935),c=e.n(o),p=c()(r());p.push([x.id,`.mYYQZEjW8FYpcliUORqm {
9409
9389
  display: flex;
9410
9390
  align-items: center;
9411
9391
  justify-content: space-between;
@@ -30185,7 +30165,9 @@ ${JSON.stringify(r,null,2)}`);const c=n[o]();return new Language(INTERNAL,c)})}}
30185
30165
  <code>${u}</code>
30186
30166
 
30187
30167
  <update>${f.codeEdit}</update>
30188
-
30168
+ ${f.instructions?`
30169
+ User's intention: ${f.instructions}
30170
+ `:""}
30189
30171
  Provide the complete updated code.
30190
30172
  `,{...this.chatProxyService.getRequestOptions(),trimTexts:["<updated-code>","</updated-code>"],system:"You are a coding assistant that helps merge code updates, ensuring every modification is fully integrated."})}}};t.ApplyService=_,n.__decorate([(0,r.Autowired)(c.IEditorDocumentModelService),n.__metadata("design:type",Object)],_.prototype,"modelService",void 0),n.__decorate([(0,r.Autowired)(o.AIBackSerivcePath),n.__metadata("design:type",Object)],_.prototype,"aiBackService",void 0),n.__decorate([(0,r.Autowired)(p.ChatProxyServiceToken),n.__metadata("design:type",m.ChatProxyService)],_.prototype,"chatProxyService",void 0),t.ApplyService=_=n.__decorate([(0,r.Injectable)()],_)},74055:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ChatAgentService=void 0;const n=e(85608),r=n.__importDefault(e(66652)),o=e(76003),c=e(43718),p=e(46044),v=e(73307),m=e(29770);let _=class extends c.Disposable{constructor(){super(),this.agents=new Map,this.initialUserMessageMap=new Map,this.shouldUpdateContext=!1,this._onDidChangeAgents=new c.Emitter,this.onDidChangeAgents=this._onDidChangeAgents.event,this._onDidSendMessage=new c.Emitter,this.onDidSendMessage=this._onDidSendMessage.event,this.addDispose(this._onDidChangeAgents),this.addDispose(this.contextService.onDidContextFilesChangeEvent(f=>{f.version!==this.contextVersion&&(this.contextVersion=f.version,this.shouldUpdateContext=!0)}))}registerAgent(f){if(this.agents.has(f.id))throw new Error(`Already registered an agent with id ${f.id}`);return this.agents.set(f.id,{agent:f,commands:[]}),this._onDidChangeAgents.fire(),(0,c.toDisposable)(()=>{this.agents.delete(f.id)&&this._onDidChangeAgents.fire()})}async updateAgent(f,a){const h=this.agents.get(f);if(!h)throw new Error(`No agent with id ${f} registered`);h.agent.metadata={...h.agent.metadata,...a},h.commands=await h.agent.provideSlashCommands(c.CancellationToken.None),a.isDefault&&(this.defaultAgentId=f);const u=await h.agent.provideChatWelcomeMessage(c.CancellationToken.None);if(u){const{content:d,sampleQuestions:E}=u;this.chatFeatureRegistry.registerWelcome(d,E)}this._onDidChangeAgents.fire()}getAgents(){return Array.from(this.agents.values(),f=>f.agent)}hasAgent(f){return this.agents.has(f)}getDefaultAgentId(){return this.defaultAgentId}getAgent(f){const a=this.agents.get(f);return a?.agent}async invokeAgent(f,a,h,u,d){const E=this.agents.get(f);if(!E)throw new Error(`No agent with id ${f}`);if(this.initialUserMessageMap.has(a.sessionId))(this.shouldUpdateContext||a.regenerate||u.length===0)&&(a.message=this.provideContextMessage(a.message,a.sessionId),this.shouldUpdateContext=!1);else{this.initialUserMessageMap.set(a.sessionId,a.message);const l=a.message;a.message=this.provideContextMessage(l,a.sessionId)}return await E.agent.invoke(a,h,u,d)}provideContextMessage(f,a){const h=this.contextService.serialize(),u=this.promptProvider.provideContextPrompt(h,f);return this.aiReporter.send({msgType:c.AIServiceType.Chat,actionType:c.ActionTypeEnum.ContextEnhance,actionSource:c.ActionSourceEnum.Chat,sessionId:a,message:u}),u}populateChatInput(f,a){this.aiChatService.sendMessage({...a,agentId:f,immediate:!1})}getCommands(){return(0,r.default)(Array.from(this.agents.values(),({agent:f,commands:a})=>a.map(h=>({...h,agentId:f.id}))))}async getFollowups(f,a,h){const u=this.agents.get(f);if(!u)throw new Error(`No agent with id ${f}`);return u.agent.provideFollowups?u.agent.provideFollowups(a,h):[]}async getSampleQuestions(f,a){const h=this.agents.get(f);if(!h)throw new Error(`No agent with id ${f}`);return h.agent.provideSampleQuestions?h.agent.provideSampleQuestions(a):[]}async getAllSampleQuestions(){const f=await Promise.all(Array.from(this.agents.values()).map(async({agent:a})=>{try{return await this.getSampleQuestions(a.id,c.CancellationToken.None)}catch(h){return this.logger.error(h),[]}}));return(0,r.default)(f)}sendMessage(f){this._onDidSendMessage.fire(f)}parseMessage(f,a){var h;const u={agentId:"",command:"",message:f};let d=a;const E=this.getAgents(),g=new RegExp(`^@(${E.map(y=>y.id).join("|")})(?:\\s+|$)`,"i"),l=u.message.match(g);if(l){const y=E.find(b=>b.id.toLowerCase()===l[1].toLowerCase());if(!y)return u;d=y.id,u.agentId=d,u.message=u.message.replace(l[0],"")}if(d){const y=(h=this.agents.get(d))===null||h===void 0?void 0:h.commands;if(y?.length){const b=new RegExp(`^/\\s?(${y.map(A=>A.name).join("|")})(?:\\s+|$)`,"i"),S=u.message.match(b);if(S){const A=y.find(w=>w.name.toLowerCase()===S[1].toLowerCase());if(!A)return u;u.command=A.name,u.message=u.message.replace(S[0],"")}}}return u}};t.ChatAgentService=_,n.__decorate([(0,o.Autowired)(c.ILogger),n.__metadata("design:type",Object)],_.prototype,"logger",void 0),n.__decorate([(0,o.Autowired)(c.IAIReporter),n.__metadata("design:type",Object)],_.prototype,"aiReporter",void 0),n.__decorate([(0,o.Autowired)(p.LLMContextServiceToken),n.__metadata("design:type",Object)],_.prototype,"contextService",void 0),n.__decorate([(0,o.Autowired)(v.ChatAgentPromptProvider),n.__metadata("design:type",Object)],_.prototype,"promptProvider",void 0),n.__decorate([(0,o.Autowired)(c.ChatServiceToken),n.__metadata("design:type",m.ChatService)],_.prototype,"aiChatService",void 0),n.__decorate([(0,o.Autowired)(c.ChatFeatureRegistryToken),n.__metadata("design:type",Object)],_.prototype,"chatFeatureRegistry",void 0),t.ChatAgentService=_=n.__decorate([(0,o.Injectable)(),n.__metadata("design:paramtypes",[])],_)},84543:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ChatAgentViewService=void 0;const n=e(85608),r=e(76003),o=e(43718),c=e(19413),p=e(51081);let v=class{constructor(){this.componentsMap=new Map,this.componentsDeferredMap=new Map}registerChatComponent(_){return this.componentsMap.set(_.id,_),this.componentsDeferredMap.has(_.id)&&(this.componentsDeferredMap.get(_.id).resolve(_),this.componentsDeferredMap.delete(_.id)),{dispose:()=>{this.componentsMap.get(_.id)===_&&(this.componentsMap.delete(_.id),this.componentsDeferredMap.delete(_.id))}}}getChatComponent(_){return this.componentsMap.has(_)?this.componentsMap.get(_):(this.componentsDeferredMap.has(_)||this.componentsDeferredMap.set(_,new o.Deferred),null)}getChatComponentDeferred(_){return this.componentsDeferredMap.get(_)||null}getRenderAgents(){return this.chatAgentService.getAgents().filter(_=>_.id!==p.ChatProxyService.AGENT_ID)}};t.ChatAgentViewService=v,n.__decorate([(0,r.Autowired)(c.IChatAgentService),n.__metadata("design:type",Object)],v.prototype,"chatAgentService",void 0),t.ChatAgentViewService=v=n.__decorate([(0,r.Injectable)()],v)},61282:(x,t,e)=>{"use strict";var n,r;Object.defineProperty(t,"__esModule",{value:!0}),t.ChatManagerService=void 0;const o=e(85608),c=e(76003),p=e(43718),v=e(19413),m=e(44260),_=e(42033),s=20;let f=class extends p.Disposable{fromJSON(h){return h.map(u=>{const d=new _.ChatModel({sessionId:u.sessionId,history:new m.MsgHistoryManager(u.history)}),E=u.requests.map(g=>new _.ChatRequestModel(g.requestId,d,g.message,new _.ChatResponseModel(g.requestId,d,g.message.agentId,{responseContents:g.response.responseContents,isComplete:!0,responseText:g.response.responseText,responseParts:g.response.responseParts,errorDetails:g.response.errorDetails,followups:g.response.followups,isCanceled:g.response.isCanceled})));return d.restoreRequests(E),d})}constructor(){super(),n.set(this,this.registerDispose(new p.DisposableMap)),r.set(this,this.registerDispose(new p.DisposableMap)),this.storageInitEmitter=new p.Emitter,this.onStorageInit=this.storageInitEmitter.event}async init(){this._chatStorage=await this.storageProvider(p.STORAGE_NAMESPACE.CHAT);const h=this._chatStorage.get("sessionModels",[]);this.fromJSON(h).forEach(d=>{o.__classPrivateFieldGet(this,n,"f").set(d.sessionId,d),this.listenSession(d)}),await this.storageInitEmitter.fireAndAwait()}getSessions(){return Array.from(o.__classPrivateFieldGet(this,n,"f").values())}startSession(){if(o.__classPrivateFieldGet(this,n,"f").size>=s)throw new Error((0,p.formatLocalize)("aiNative.chat.session.max",s.toString()));const h=new _.ChatModel;return o.__classPrivateFieldGet(this,n,"f").set(h.sessionId,h),this.listenSession(h),h}getSession(h){return o.__classPrivateFieldGet(this,n,"f").get(h)}clearSession(h){var u;if(!o.__classPrivateFieldGet(this,n,"f").get(h))throw new Error(`Unknown session: ${h}`);o.__classPrivateFieldGet(this,n,"f").disposeKey(h),(u=o.__classPrivateFieldGet(this,r,"f").get(h))===null||u===void 0||u.cancel(),o.__classPrivateFieldGet(this,r,"f").disposeKey(h),this.saveSessions()}createRequest(h,u,d,E){const g=this.getSession(h);if(!g)throw new Error(`Unknown session: ${h}`);if(!o.__classPrivateFieldGet(this,r,"f").has(h))return g.addRequest({prompt:u,agentId:d,command:E})}async sendRequest(h,u,d){const E=this.getSession(h);if(!E)throw new Error(`Unknown session: ${h}`);const g=new p.CancellationTokenSource,l=g.token;o.__classPrivateFieldGet(this,r,"f").set(E.sessionId,g);const y=l.onCancellationRequested(()=>{u.response.cancel()}),b=E.messageHistory;try{const S=T=>{l.isCancellationRequested||E.acceptResponseProgress(u,T)},A={sessionId:h,requestId:u.requestId,message:u.message.prompt,command:u.message.command,regenerate:d},w=await this.chatAgentService.invokeAgent(u.message.agentId,A,S,b,l);l.isCancellationRequested||(w.errorDetails&&u.response.setErrorDetails(w.errorDetails),this.chatAgentService.getFollowups(u.message.agentId,h,p.CancellationToken.None).then(D=>{u.response.setFollowups(D),u.response.complete()}))}finally{y.dispose(),o.__classPrivateFieldGet(this,r,"f").disposeKey(E.sessionId),this.saveSessions()}}listenSession(h){this.addDispose(h.history.onMessageAdditionalChange(()=>{this.saveSessions()}))}saveSessions(){this._chatStorage.set("sessionModels",this.getSessions())}cancelRequest(h){var u;(u=o.__classPrivateFieldGet(this,r,"f").get(h))===null||u===void 0||u.cancel(),o.__classPrivateFieldGet(this,r,"f").disposeKey(h),this.saveSessions()}};t.ChatManagerService=f,n=new WeakMap,r=new WeakMap,o.__decorate([(0,c.Autowired)(c.INJECTOR_TOKEN),o.__metadata("design:type",c.Injector)],f.prototype,"injector",void 0),o.__decorate([(0,c.Autowired)(v.IChatAgentService),o.__metadata("design:type",Object)],f.prototype,"chatAgentService",void 0),o.__decorate([(0,c.Autowired)(p.StorageProvider),o.__metadata("design:type",Function)],f.prototype,"storageProvider",void 0),o.__decorate([(0,p.debounce)(1e3),o.__metadata("design:type",Function),o.__metadata("design:paramtypes",[]),o.__metadata("design:returntype",void 0)],f.prototype,"saveSessions",null),t.ChatManagerService=f=o.__decorate([(0,c.Injectable)(),o.__metadata("design:paramtypes",[])],f)},42033:(x,t,e)=>{"use strict";var n,r,o,c,p,v,m,_,s,f,a,h,u,d,E;Object.defineProperty(t,"__esModule",{value:!0}),t.ChatSlashCommandItemModel=t.ChatWelcomeMessageModel=t.ChatModel=t.ChatRequestModel=t.ChatResponseModel=void 0;const g=e(85608),l=e(76003),y=e(43718),b=e(90684),S=e(19413),A=e(44260);class w extends y.Disposable{get responseParts(){return g.__classPrivateFieldGet(this,r,"f")}get responseContents(){return g.__classPrivateFieldGet(this,o,"f")}get isComplete(){return g.__classPrivateFieldGet(this,c,"f")}get isCanceled(){return g.__classPrivateFieldGet(this,p,"f")}get requestId(){return g.__classPrivateFieldGet(this,v,"f")}get responseText(){return g.__classPrivateFieldGet(this,m,"f")}get errorDetails(){return g.__classPrivateFieldGet(this,_,"f")}get followups(){return g.__classPrivateFieldGet(this,s,"f")}get onDidChange(){return g.__classPrivateFieldGet(this,f,"f").event}constructor(R,P,k,F){super(),n.add(this),this.session=P,this.agentId=k,r.set(this,[]),o.set(this,[]),c.set(this,!1),p.set(this,!1),v.set(this,void 0),m.set(this,""),_.set(this,void 0),s.set(this,void 0),f.set(this,this.registerDispose(new y.Emitter)),g.__classPrivateFieldSet(this,v,R,"f"),F&&(g.__classPrivateFieldSet(this,o,F.responseContents,"f"),g.__classPrivateFieldSet(this,r,F.responseParts||[],"f"),g.__classPrivateFieldSet(this,m,F.responseText,"f"),g.__classPrivateFieldSet(this,c,F.isComplete,"f"),g.__classPrivateFieldSet(this,p,F.isCanceled,"f"),g.__classPrivateFieldSet(this,_,F.errorDetails,"f"),g.__classPrivateFieldSet(this,s,F.followups,"f"))}updateContent(R,P){var k;const F=g.__classPrivateFieldGet(this,r,"f").length-1;if(R.kind==="content"||R.kind==="markdownContent"){const L=g.__classPrivateFieldGet(this,r,"f")[F];!L||L.kind!=="markdownContent"?R.kind==="content"?g.__classPrivateFieldGet(this,r,"f").push({content:new b.MarkdownString(R.content),kind:"markdownContent"}):g.__classPrivateFieldGet(this,r,"f").push(R):R.kind==="markdownContent"?g.__classPrivateFieldGet(this,r,"f")[F]={content:new b.MarkdownString(L.content.value+R.content.value),kind:"markdownContent"}:g.__classPrivateFieldGet(this,r,"f")[F]={content:new b.MarkdownString(L.content.value+R.content,L.content),kind:"markdownContent"},g.__classPrivateFieldGet(this,n,"m",a).call(this)}else if(R.kind==="asyncContent"){const L=g.__classPrivateFieldGet(this,r,"f").push(R)-1;g.__classPrivateFieldGet(this,n,"m",a).call(this),(k=R.resolvedContent)===null||k===void 0||k.then(N=>{typeof N=="string"?g.__classPrivateFieldGet(this,r,"f")[L]={content:new b.MarkdownString(N),kind:"markdownContent"}:(0,b.isMarkdownString)(N)?g.__classPrivateFieldGet(this,r,"f")[L]={content:N,kind:"markdownContent"}:g.__classPrivateFieldGet(this,r,"f")[L]=N,g.__classPrivateFieldGet(this,n,"m",a).call(this,P)})}else if(R.kind==="treeData"||R.kind==="component")g.__classPrivateFieldGet(this,r,"f").push(R),g.__classPrivateFieldGet(this,n,"m",a).call(this,P);else if(R.kind==="toolCall"){const L=g.__classPrivateFieldGet(this,r,"f").find(N=>N.kind==="toolCall"&&N.content.id===R.content.id);L?L.content=R.content:g.__classPrivateFieldGet(this,r,"f").push(R),g.__classPrivateFieldGet(this,n,"m",a).call(this,P)}}complete(){g.__classPrivateFieldSet(this,c,!0,"f"),g.__classPrivateFieldGet(this,f,"f").fire()}cancel(){g.__classPrivateFieldSet(this,c,!0,"f"),g.__classPrivateFieldSet(this,p,!0,"f"),g.__classPrivateFieldGet(this,f,"f").fire()}reset(){g.__classPrivateFieldSet(this,o,[],"f"),g.__classPrivateFieldSet(this,r,[],"f"),g.__classPrivateFieldSet(this,m,"","f"),g.__classPrivateFieldSet(this,p,!1,"f"),g.__classPrivateFieldSet(this,c,!1,"f"),g.__classPrivateFieldSet(this,_,void 0,"f"),g.__classPrivateFieldSet(this,s,void 0,"f"),g.__classPrivateFieldGet(this,f,"f").fire()}setErrorDetails(R){g.__classPrivateFieldSet(this,_,R,"f"),g.__classPrivateFieldGet(this,f,"f").fire()}setFollowups(R){g.__classPrivateFieldSet(this,s,R,"f"),g.__classPrivateFieldGet(this,f,"f").fire()}toJSON(){return{isCanceled:this.isCanceled,responseContents:this.responseContents,responseText:this.responseText,responseParts:this.responseParts,errorDetails:this.errorDetails,followups:this.followups}}}t.ChatResponseModel=w,r=new WeakMap,o=new WeakMap,c=new WeakMap,p=new WeakMap,v=new WeakMap,m=new WeakMap,_=new WeakMap,s=new WeakMap,f=new WeakMap,n=new WeakSet,a=function(R){g.__classPrivateFieldSet(this,m,g.__classPrivateFieldGet(this,r,"f").map(k=>k.kind==="asyncContent"?k.content:k.kind==="treeData"||k.kind==="component"?"":k.kind==="toolCall"?k.content.function.name:k.content.value).join(`
30191
30173
 
@@ -30222,7 +30204,7 @@ The user's OS is ${(0,p.getOperatingSystemName)()}. The absolute path of the use
30222
30204
  `);let R=0,P=!1;for(let k=0;k<M.length;k++){const F=M[k].trim();if(typeof R>"u"&&F.match(/^\s*\|/)){const L=F.match(/(\|[^\|]+)(?=\||$)/g);L&&(R=L.length)}else if(typeof R=="number")if(F.match(/^\s*\|/)&&k===M.length-1)P=!0;else return}if(R>0){const k=P?M.slice(0,-1).join(`
30223
30205
  `):O,F=!!k.match(/\|\s*$/),L=k+(F?"":"|")+`
30224
30206
  |${" --- |".repeat(R)}`;return p.marked.lexer(L)}}function T(I){return I.reduce((O,M)=>O+M.raw,"")}function D(I){for(const{type:O,raw:M}of I.tokens){if(O!=="text")continue;const R=M.split(`
30225
- `),P=R[R.length-1],k=[{condition:P.includes("`"),action:d},{condition:P.includes("**"),action:b},{condition:P.match(/\*\w/),action:E},{condition:P.match(/(^|\s)__\w/),action:S},{condition:P.match(/(^|\s)_\w/),action:g},{condition:P.match(/(^|\s)\[.*\]\(\w*/),action:l},{condition:P.match(/(^|\s)\[\w/),action:y}];for(const F of k)if(F.condition)return F.action(I)}}},92635:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ChatNotify=t.ChatReply=void 0;const n=e(85608),r=n.__importStar(e(14041)),o=e(48412),c=e(91416),p=e(78569),v=e(72871),m=e(41869),_=e(81878),s=e(89195),f=e(43718),a=e(52416),h=e(90684),u=e(19413),d=e(56474),E=e(17319),g=n.__importDefault(e(6960)),l=w=>{const T=(0,m.useInjectable)(m.LabelService),D=(0,m.useInjectable)(m.CommandService),I=(F,L,N)=>{let j=T.getIcon(F,{isDirectory:L});return L&&N&&(j+=" expanded"),j},O=(0,r.useMemo)(()=>{const F=L=>{const N=typeof L.type=="number"?L.type===f.FileType.Directory:!!L.children,j=new f.URI(L.uri);return{label:L.label,iconClassName:I(j,N,N),expandable:!0,expanded:!0,children:N?(L.children||[]).map(F):null,uri:j}};return(w.treeData.children||[]).map(F)},[w.treeData]),[M,R]=(0,r.useState)(22),P=(0,r.useRef)(null),k=F=>{P.current=F;const L=()=>{let N=F.getModel().root.branchSize;N<1?N=1:N>20&&(N=20),R(N*22)};L(),F.onDidUpdate(L)};return O.length?r.default.createElement("div",{className:g.default.tree_container},r.default.createElement(c.BasicRecycleTree,{height:M,treeData:O,onContextMenu:F=>F.preventDefault(),onClick:(F,L)=>{!P.current||!L||(p.BasicCompositeTreeNode.is(L)?L.raw.iconClassName=I(L.raw.uri,!0,L.expanded):D.executeCommand(m.EDITOR_COMMANDS.OPEN_RESOURCE.id,L.raw.uri,{disableNavigate:!0,preview:!0}))},onReady:k,treeName:w.treeData.label,leaveBottomBlank:!1,baseIndent:0})):null},y=w=>{const{toolCall:T,messageId:D}=w,I=(0,m.useInjectable)(f.ChatAgentViewServiceToken),[O,M]=(0,r.useState)(null);return(0,r.useEffect)(()=>{const R=I.getChatComponent("toolCall");if(R){const{component:k,initialProps:F}=R;M(r.default.createElement(k,{...F,value:T,messageId:D}));return}M(r.default.createElement("div",null,r.default.createElement(s.Loading,null),r.default.createElement("span",{style:{marginLeft:4}},"\u6B63\u5728\u52A0\u8F7D\u7EC4\u4EF6"))),I.getChatComponentDeferred("toolCall").promise.then(({component:k,initialProps:F})=>{M(r.default.createElement(k,{...F,value:T,messageId:D}))})},[T.state]),O},b=w=>{const T=(0,m.useInjectable)(f.ChatAgentViewServiceToken),[D,I]=(0,r.useState)(null);return(0,r.useEffect)(()=>{const O=T.getChatComponent(w.component);if(O){const{component:R,initialProps:P}=O;I(r.default.createElement(R,{...P,value:w.value,messageId:w.messageId}));return}I(r.default.createElement("div",null,r.default.createElement(s.Loading,null),r.default.createElement("span",{style:{marginLeft:4}},"\u6B63\u5728\u52A0\u8F7D\u7EC4\u4EF6"))),T.getChatComponentDeferred(w.component).promise.then(({component:R,initialProps:P})=>{I(r.default.createElement(R,{...P,value:w.value}))})},[w.component,w.value]),D},S=w=>{var T,D;const{relationId:I,request:O,startTime:M=0,onRegenerate:R,onDidChange:P,onDone:k,agentId:F,command:L,history:N,msgId:j}=w,[,W]=(0,r.useReducer)(q=>(q+1)%1e6,0),U=(0,m.useInjectable)(f.IAIReporter),X=(0,m.useInjectable)(a.IIconService),V=(0,m.useInjectable)(m.IContextKeyService),$=(0,m.useInjectable)(u.IChatInternalService),Y=(0,m.useInjectable)(f.ChatServiceToken),G=(0,m.useInjectable)(u.IChatAgentService),H=(0,m.useInjectable)(f.ChatRenderRegistryToken);(0,r.useEffect)(()=>{const q=new m.DisposableCollection;return q.push(O.response.onDidChange(()=>{N.updateAssistantMessage(j,{content:O.response.responseText}),O.response.isComplete&&(k&&k(),U.end(I,{assistantMessage:O.response.responseText,replytime:Date.now()-M,success:!0,isStop:!1,command:L,agentId:F,messageId:j,sessionId:$.sessionModel.sessionId})),(0,r.startTransition)(()=>{P?.(),W()})})),()=>q.dispose()},[I,P,k]);const K=(0,r.useCallback)(()=>{O.response.reset(),R?.()},[R]),Z=()=>{k&&k(),U.end(I,{assistantMessage:O.response.responseText,replytime:Date.now()-M,success:!1,isStop:!0,command:L,agentId:F,messageId:j,sessionId:$.sessionModel.sessionId}),$.cancelRequest()},Q=(0,r.useCallback)(q=>{if(H.chatAIRoleRender){const Re=H.chatAIRoleRender;return r.default.createElement(Re,{content:q.value})}return r.default.createElement(d.ChatMarkdown,{markdown:q,fillInIncompleteTokens:!0})},[H,H.chatAIRoleRender]),oe=q=>r.default.createElement(l,{treeData:q}),ne=q=>r.default.createElement("div",{className:g.default.placeholder},r.default.createElement(_.Icon,{iconClass:X.fromString("$(codicon/sync~spin)")}),r.default.createElement("div",{className:g.default.placeholder_content},Q(q))),he=r.default.useMemo(()=>O.response.responseContents.map((q,Re)=>{let ve;return q.kind==="asyncContent"?ve=ne(new h.MarkdownString(q.content)):q.kind==="treeData"?ve=oe(q.treeData):q.kind==="component"?ve=r.default.createElement(b,{component:q.component,value:q.value,messageId:j}):q.kind==="toolCall"?ve=r.default.createElement(y,{toolCall:q.content,messageId:j}):ve=Q(q.content),r.default.createElement(r.Fragment,{key:`${q.kind}-${Re}`},ve)}),[O.response.responseContents]),_e=r.default.useMemo(()=>O.response.followups?O.response.followups.map((q,Re)=>{let ve=null;if(q.kind==="reply"){const ie=r.default.createElement("a",{onClick:()=>{Y.sendMessage({...G.parseMessage(q.message),reportExtra:{actionSource:f.ActionSourceEnum.Chat,actionType:f.ActionTypeEnum.Followup}})}},q.title||q.message);ve=q.tooltip?r.default.createElement(v.Tooltip,{title:q.tooltip},ie):ie}else q.when&&!V.match(q.when)&&(ve=null),ve=r.default.createElement(o.Button,{type:"default"},q.title);return ve&&r.default.createElement(r.Fragment,{key:Re},ve)}):null,[O.response.followups]);return O.response.isComplete?r.default.createElement(E.ChatThinkingResult,{hasMessage:O.response.responseParts.length>0||O.response.responseContents.length>0||!!(!((T=O.response.errorDetails)===null||T===void 0)&&T.message),onRegenerate:K,requestId:O.requestId},r.default.createElement("div",{className:g.default.ai_chat_response_container},!((D=O.response.errorDetails)===null||D===void 0)&&D.message?r.default.createElement("div",{className:g.default.error},r.default.createElement(_.Icon,{className:(0,_.getIcon)("close-circle")}),r.default.createElement("span",null,O.response.errorDetails.message)):r.default.createElement(r.default.Fragment,null,he,_e?.length!==0&&r.default.createElement("div",{className:g.default.followups},_e)))):r.default.createElement(E.ChatThinking,{message:O.response.responseText},he)};t.ChatReply=S;const A=w=>{const{chunk:T}=w,D=(0,m.useInjectable)(f.ChatRenderRegistryToken),I=r.default.useMemo(()=>{let O;if(T.kind==="component")O=r.default.createElement(b,{component:T.component,value:T.value});else{let M=r.default.createElement(d.ChatMarkdown,{markdown:T.content,fillInIncompleteTokens:!0});if(D.chatAIRoleRender){const R=D.chatAIRoleRender;M=r.default.createElement(R,{content:T.content})}O=M}return O},[T]);return r.default.createElement(E.ChatThinkingResult,{hasMessage:!0,requestId:w.requestId,showRegenerate:!1},r.default.createElement("div",{className:g.default.ai_chat_response_container},I))};t.ChatNotify=A},17319:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ChatThinkingResult=t.ChatThinking=void 0;const n=e(85608),r=n.__importStar(e(14041)),o=e(41869),c=e(89195),p=e(68974),v=e(43718),m=e(19413),_=n.__importDefault(e(6960)),s=a=>{const{children:h,message:u,thinkingText:d}=a,E=(0,o.useInjectable)(v.ChatRenderRegistryToken),g=(0,r.useMemo)(()=>E.chatThinkingRender,[E,E.chatThinkingRender]),l=(0,r.useCallback)(()=>!h||!u?.trim()?g?r.default.createElement(g,{thinkingText:d}):r.default.createElement("span",{className:_.default.thinking_text},d||"Thinking..."):h,[u,h,d,g]);return r.default.createElement(r.default.Fragment,null,r.default.createElement("div",{className:_.default.content},l()),r.default.createElement("div",{className:_.default.thinking_container},r.default.createElement("div",{className:_.default.stop},!g&&r.default.createElement("span",{className:_.default.progress_bar},!h&&r.default.createElement(p.Progress,{loading:!0,wrapperClassName:_.default.ai_native_progress_wrapper})))))};t.ChatThinking=s;const f=({children:a,message:h,onRegenerate:u,requestId:d,hasMessage:E=!0,showRegenerate:g})=>{const l=(0,o.useInjectable)(m.IChatInternalService),[y,b]=(0,r.useState)(l.latestRequestId),S=(0,o.useInjectable)(v.ChatRenderRegistryToken);(0,r.useEffect)(()=>{const I=l.onChangeRequestId(O=>{b(O)});return()=>I.dispose()},[l]);const A=(0,r.useMemo)(()=>S.chatThinkingResultRender,[S,S.chatThinkingResultRender]),w=(0,r.useCallback)(()=>{u&&u()},[u]),T=(0,r.useCallback)(()=>{if(typeof E=="boolean"?!E:!h?.trim()){const I=(0,v.localize)("aiNative.chat.stop.immediately");return A?r.default.createElement(A,{thinkingResult:I}):r.default.createElement("span",null,I)}return a},[h,E,a]),D=(0,r.useMemo)(()=>(0,v.isUndefined)(g)?y===d&&!!d:!!g,[y,d,g]);return r.default.createElement(r.default.Fragment,null,r.default.createElement("div",{className:_.default.content},T()),r.default.createElement("div",{className:_.default.thinking_container},r.default.createElement("div",{className:_.default.bottom_container},r.default.createElement("div",{className:_.default.reset},D?r.default.createElement(c.EnhanceIcon,{icon:"refresh",wrapperClassName:_.default.text_btn,className:_.default.transform,onClick:w,tabIndex:0,role:"button"},r.default.createElement("span",null,(0,v.localize)("aiNative.operate.afresh.title"))):null),r.default.createElement("div",{className:_.default.thumbs},r.default.createElement(c.Thumbs,{relationId:d,wrapperClassName:_.default.icon_btn})))))};t.ChatThinkingResult=f},34817:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ChatToolRender=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importStar(e(14041)),c=e(41869),p=e(81878),v=e(89195),m=e(43718),_=e(33783),s=e(77633),f=e(25834),a=n.__importDefault(e(16796)),h=u=>{var d,E,g;const{value:l,messageId:y}=u,[b,S]=(0,o.useState)(!1),A=(0,c.useInjectable)(s.TokenMCPServerRegistry);if(!l||!l.function||!l.id)return null;const w=((d=A.getMCPTool(l.function.name))===null||d===void 0?void 0:d.label)||l.function.name,T=A.getToolComponent(l.function.name),D=R=>{switch(R){case"streaming-start":case"streaming":return{label:"Generating",icon:o.default.createElement(v.Loading,null)};case"complete":return{label:"Complete",icon:o.default.createElement(p.Icon,{iconClass:"codicon codicon-check"})};case"result":return{label:"Result Ready",icon:o.default.createElement(p.Icon,{iconClass:"codicon codicon-check-all"})};default:return{label:R||"Unknown",icon:o.default.createElement(p.Icon,{iconClass:"codicon codicon-question"})}}},I=()=>{var R;try{return l.state!=="complete"&&l.state!=="result"?{}:JSON.parse(((R=l.function)===null||R===void 0?void 0:R.arguments)||"{}")}catch{return{}}},O=()=>{S(!b)},M=D(l.state);return T&&(l.state==="complete"||l.state==="result")?o.default.createElement(T,{state:l.state,args:I(),result:l.result,index:l.index,messageId:y,toolCallId:l.id}):o.default.createElement("div",{className:a.default.chat_tool_render},o.default.createElement("div",{className:a.default.tool_header,onClick:O},o.default.createElement("div",{className:a.default.tool_name},o.default.createElement(p.Icon,{iconClass:`codicon codicon-chevron-${b?"down":"right"}`}),o.default.createElement(p.Icon,{size:"small",iconClass:(0,r.default)("codicon codicon-tools",a.default.tool_icon)}),o.default.createElement("span",{className:a.default.tool_label},w)),l.state&&o.default.createElement("div",{className:a.default.tool_state},o.default.createElement("span",{className:a.default.state_icon},M.icon))),o.default.createElement("div",{className:(0,r.default)(a.default.tool_content,{[a.default.expanded]:b})},((E=l?.function)===null||E===void 0?void 0:E.arguments)&&o.default.createElement("div",{className:a.default.tool_arguments},o.default.createElement("div",{className:a.default.section_label},(0,_.localize)("ai.native.mcp.tool.arguments"),":"),o.default.createElement(f.CodeEditorWithHighlight,{input:(g=l?.function)===null||g===void 0?void 0:g.arguments,language:"json",relationId:(0,m.uuid)(4)})),l?.result&&o.default.createElement("div",{className:a.default.tool_result},o.default.createElement("div",{className:a.default.section_label},(0,_.localize)("ai.native.mcp.tool.results"),":"),o.default.createElement(f.CodeEditorWithHighlight,{input:l.result,language:"json",relationId:(0,m.uuid)(4)}))))};t.ChatToolRender=h},29039:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SlashCustomRender=void 0;const r=e(85608).__importStar(e(14041)),o=e(41869),c=e(43718),p=e(19413),v=m=>{const{userMessage:_,relationId:s,requestId:f,renderContent:a,startTime:h,agentId:u,command:d}=m,E=(0,o.useInjectable)(p.IChatInternalService),g=(0,o.useInjectable)(c.IAIReporter);return r.useEffect(()=>{E.setLatestRequestId(f),g.end(s,{message:_,replytime:Date.now()-h,success:!0,isStop:!1,agentId:u,command:d})},[a,f,s]),r.createElement("div",null,a({userMessage:_}))};t.SlashCustomRender=v},86556:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WelcomeMessage=void 0;const n=e(85608),r=n.__importStar(e(14041)),o=e(41869),c=e(81878),p=e(4246),v=e(43718),m=e(90684);e(41937);const _=e(19413),s=e(56474),f=e(17319),a=e(78048),h=n.__importDefault(e(6960)),u=()=>{var d,E;const g=(0,o.useInjectable)(v.ChatServiceToken),l=(0,o.useInjectable)(_.IChatAgentService),y=(0,o.useInjectable)(v.ChatFeatureRegistryToken),b=(0,o.useInjectable)(v.ChatRenderRegistryToken),[S,A]=r.useState([]);(0,o.useUpdateOnEvent)(y.onDidWelcomeMessageChange);const w=r.useMemo(()=>{if(!y.chatWelcomeMessageModel)return[];const{sampleQuestions:O=[]}=y.chatWelcomeMessageModel;return O.map(a.extractIcon)},[(d=y.chatWelcomeMessageModel)===null||d===void 0?void 0:d.sampleQuestions]),T=r.useMemo(()=>{if(!y.chatWelcomeMessageModel)return"";const{content:O}=y.chatWelcomeMessageModel;return O},[(E=y.chatWelcomeMessageModel)===null||E===void 0?void 0:E.content]);if(r.useEffect(()=>{const O=l.onDidChangeAgents(async()=>{const R=(await l.getAllSampleQuestions()).map(a.extractIcon);A(R)});return()=>O.dispose()},[]),!T)return r.createElement(f.ChatThinking,{thinkingText:(0,v.localize)("aiNative.chat.welcome.loading.text")});const D=r.useMemo(()=>w.concat(S),[w,S]);return r.useMemo(()=>{if(b.chatWelcomeRender){const O=b.chatWelcomeRender;return r.createElement(O,{message:T,sampleQuestions:D})}return r.createElement("div",{className:h.default.chat_welcome_head},r.createElement("div",{className:h.default.chat_container_des},(0,m.isMarkdownString)(T)?r.createElement(s.ChatMarkdown,{markdown:T}):T),r.createElement("div",{className:h.default.chat_container_content},D.map((O,M)=>{const R=r.createElement("a",{className:h.default.link_item,onClick:(0,p.withPrevented)(()=>{g.sendMessage({...l.parseMessage(O.message),reportExtra:{actionType:v.ActionTypeEnum.Welcome,actionSource:v.ActionSourceEnum.Chat}})})},O.icon?r.createElement(c.Icon,{className:O.icon,style:{color:"inherit",marginRight:"4px"}}):"",r.createElement("span",null,O.title));return O.tooltip?r.createElement(c.Tooltip,{title:O.tooltip,key:M},R):r.createElement(r.Fragment,{key:M},R)})))},[b.chatWelcomeRender,T,D])};t.WelcomeMessage=u},83933:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.highLightLanguageSupport=void 0,t.highLightLanguageSupport=["1c","abnf","accesslog","actionscript","ada","angelscript","apache","applescript","arcade","arduino","armasm","xml","asciidoc","aspectj","autohotkey","autoit","avrasm","awk","axapta","bash","basic","bnf","brainfuck","c-like","c","cal","capnproto","ceylon","clean","clojure","clojure-repl","cmake","coffeescript","coq","cos","cpp","crmsh","crystal","csharp","csp","css","d","markdown","dart","delphi","diff","django","dns","dockerfile","dos","dsconfig","dts","dust","ebnf","elixir","elm","ruby","erb","erlang-repl","erlang","excel","fix","flix","fortran","fsharp","gams","gauss","gcode","gherkin","glsl","gml","go","golo","gradle","groovy","haml","handlebars","haskell","haxe","hsp","htmlbars","http","hy","inform7","ini","irpf90","isbl","java","javascript","jboss-cli","json","julia","julia-repl","kotlin","lasso","latex","ldif","leaf","less","lisp","livecodeserver","livescript","llvm","lsl","lua","makefile","mathematica","matlab","maxima","mel","mercury","mipsasm","mizar","perl","mojolicious","monkey","moonscript","n1ql","nginx","nim","nix","node-repl","nsis","objectivec","ocaml","openscad","oxygene","parser3","pf","pgsql","php","php-template","plaintext","pony","powershell","processing","profile","prolog","properties","protobuf","puppet","purebasic","python","python-repl","q","qml","r","reasonml","rib","roboconf","routeros","rsl","ruleslanguage","rust","sas","scala","scheme","scilab","scss","shell","smali","smalltalk","sml","sqf","sql_more","sql","stan","stata","step21","stylus","subunit","swift","taggerscript","yaml","tap","tcl","thrift","tp","twig","typescript","vala","vbnet","vbscript","vbscript-html","verilog","vhdl","vim","x86asm","xl","xquery","zephir"]},78048:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.extractIcon=t.createMessageByAI=t.createMessageByUser=void 0;const n=e(41869),r="",o=m=>({...m,type:"text",className:`${m.position==="left"?"rce-ai-msg":"rce-user-msg"} ${m.className?m.className:""}`}),c=(m,_)=>o({...m,position:"right",title:r,className:_,role:1});t.createMessageByUser=c;const p=(m,_)=>o({...m,position:"left",title:"",className:_,role:2});t.createMessageByAI=p;const v=m=>{let{title:_}=m;const{message:s,tooltip:f}=m;let a=m.icon||"";if(!_)return{icon:a,title:s,message:s,tooltip:f};const h=_.match(/^\$\(([a-z.]+\/)?([a-z0-9-]+)(~[a-z]+)?\)/i);if(h){const[u,d,E,g]=h,l=d?d.slice(0,-1):n.CODICON_OWNER;a=(0,n.getExternalIcon)(E,l),g&&(a+=` ${g.slice(1)}`),_=_.slice(u.length)}return{icon:a,title:_,message:s,tooltip:f}};t.extractIcon=v},19957:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LlmContextContribution=void 0;const n=e(85608),r=e(76003),o=e(41869),c=e(46044);let p=class{initialize(){this.llmContextService.startAutoCollection()}};t.LlmContextContribution=p,n.__decorate([(0,r.Autowired)(c.LLMContextServiceToken),n.__metadata("design:type",Object)],p.prototype,"llmContextService",void 0),t.LlmContextContribution=p=n.__decorate([(0,o.Domain)(o.ClientAppContribution)],p)},63536:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LLMContextServiceImpl=void 0;const n=e(85608),r=e(76003),o=e(11050),c=e(25234),p=e(19083),v=e(86560),m=e(96689),_=e(82196),s=e(6287),f=e(20868);let a=class extends c.WithEventBus{constructor(){super(...arguments),this.isAutoCollecting=!1,this.contextVersion=0,this.maxAttachFilesLimit=10,this.maxViewFilesLimit=20,this.attachedFiles=[],this.recentlyViewFiles=[],this.onDidContextFilesChangeEmitter=new v.Emitter,this.onDidContextFilesChangeEvent=this.onDidContextFilesChangeEmitter.event}addFileToList(u,d,E){const g=d.findIndex(l=>l.uri.toString()===u.uri.toString());g>-1&&d.splice(g,1),d.push(u),d.length>E&&d.shift()}addFileToContext(u,d,E=!1){if(!u)return;const g={uri:u,selection:d},l=E?this.attachedFiles:this.recentlyViewFiles,y=E?this.maxAttachFilesLimit:this.maxViewFilesLimit;E&&this.docModelManager.createModelReference(u),this.addFileToList(g,l,y),this.notifyContextChange()}notifyContextChange(){this.onDidContextFilesChangeEmitter.fire(this.getAllContextFiles())}cleanFileContext(){this.attachedFiles.length=0,this.notifyContextChange()}getAllContextFiles(){return{viewed:this.recentlyViewFiles,attached:this.attachedFiles,version:this.contextVersion++}}removeFileFromContext(u,d=!1){const E=d?this.attachedFiles:this.recentlyViewFiles,g=E.findIndex(l=>l.uri.toString()===u.toString());g>-1&&E.splice(g,1),this.notifyContextChange()}startAutoCollection(){this.isAutoCollecting||(this.isAutoCollecting=!0,this.startAutoCollectionInternal())}startAutoCollectionInternal(){this.disposables.push(this.eventBus.on(m.EditorDocumentModelCreationEvent,u=>{u.payload.uri.scheme==="file"&&this.addFileToContext(u.payload.uri,void 0,!1)})),this.disposables.push(this.eventBus.on(m.EditorDocumentModelRemovalEvent,u=>{u.payload.scheme==="file"&&this.removeFileFromContext(u.payload,!1)})),this.disposables.push(this.eventBus.on(m.EditorDocumentModelSavedEvent,u=>{u.payload.scheme})),this.disposables.push(this.eventBus.on(_.EditorSelectionChangeEvent,u=>{if(u.payload.selections.length>0){const d=[u.payload.selections[0].selectionStartLineNumber,u.payload.selections[0].positionLineNumber].sort();d[0]===d[1]?this.addFileToContext(u.payload.editorUri,void 0,!1):this.addFileToContext(u.payload.editorUri,d.sort((E,g)=>E-g),!1)}}))}stopAutoCollection(){this.dispose()}serialize(){const u=this.getAllContextFiles(),d=v.URI.file(this.appConfig.workspaceDir);return{recentlyViewFiles:this.serializeRecentlyViewFiles(u.viewed,d),attachedFiles:this.serializeAttachedFiles(u.attached,d)}}serializeRecentlyViewFiles(u,d){return u.map(E=>{var g;return((g=d.relative(E.uri))===null||g===void 0?void 0:g.toString())||E.uri.parent.toString()}).filter(Boolean)}serializeAttachedFiles(u,d){return u.map(E=>this.serializeAttachedFile(E,d)).filter(Boolean)}serializeAttachedFile(u,d){try{const E=this.docModelManager.getModelReference(u.uri);return E?{content:E.instance.getText(u.selection&&new f.Range(u.selection[0],1/0,u.selection[1],1/0)),lineErrors:this.getFileErrors(u.uri),path:d.relative(u.uri).toString(),language:E.instance.languageId}:null}catch{return null}}getFileErrors(u){return this.markerService.getManager().getMarkers({resource:u.toString(),severities:p.MarkerSeverity.Error}).map(d=>d.message)}};t.LLMContextServiceImpl=a,n.__decorate([(0,r.Autowired)(o.AppConfig),n.__metadata("design:type",Object)],a.prototype,"appConfig",void 0),n.__decorate([(0,r.Autowired)(m.IEditorDocumentModelService),n.__metadata("design:type",Object)],a.prototype,"docModelManager",void 0),n.__decorate([(0,r.Autowired)(s.IMarkerService),n.__metadata("design:type",Object)],a.prototype,"markerService",void 0),t.LLMContextServiceImpl=a=n.__decorate([(0,r.Injectable)()],a)},99906:(x,t,e)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.BaseAIMonacoEditorController=t.BaseAIMonacoContribHandler=void 0;const r=e(85608),o=e(76003),c=e(43718);class p extends c.Disposable{constructor(){super(),this.allowAnyScheme=!1,this.allowedSchemes=[c.Schemes.file],this.sessionDisposable=new c.Disposable}shouldHandle(_){return!!(this.allowAnyScheme||this.allowedSchemes.includes(_.scheme))}unload(){this.sessionDisposable.dispose(),this.sessionDisposable=new c.Disposable}load(){this.unload(),this.sessionDisposable.addDispose(this.doContribute())}mountEditor(_){return this.monacoEditor=_,{dispose:()=>{this.monacoEditor=void 0}}}}t.BaseAIMonacoContribHandler=p;let v=n=class extends c.Disposable{static get(_){return _.getContribution(n.ID)}get token(){return this.cancellationTokenSource.token}cancelToken(){this.cancellationTokenSource.cancel(),this.cancellationTokenSource=new c.CancellationTokenSource}constructor(_,s){super(),this.injector=_,this.monacoEditor=s,this.cancellationTokenSource=new c.CancellationTokenSource,this.featureDisposable=new c.Disposable,this.allowedSchemes=[c.Schemes.file,c.Schemes.notebookCell];const f=new c.Disposable;let a=!1;this.addDispose(this.monacoEditor.onDidChangeModel(({newModelUrl:u})=>{if(!u)return;const d=this.allowedSchemes.includes(u.scheme);d!==a&&(a=!!d,a?f.addDispose(this.mount()):f.dispose())}));const h=s.getModel();h&&this.allowedSchemes.includes(h.uri.scheme)&&(a=!0,f.addDispose(this.mount())),this.addDispose(f)}};t.BaseAIMonacoEditorController=v,t.BaseAIMonacoEditorController=v=n=r.__decorate([r.__param(0,(0,o.Optional)()),r.__param(1,(0,o.Optional)()),r.__metadata("design:paramtypes",[o.Injector,Object])],v)},72713:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AICodeActionContribution=void 0;const n=e(85608),r=e(76003),o=e(57925),c=e(43718),p=e(89132);let v=class extends c.Disposable{registerCommands(_){_.registerCommand(o.AI_CODE_ACTION,{execute:(s,f)=>{this.codeActionService.fireCodeActionRun(f,s)}})}};t.AICodeActionContribution=v,n.__decorate([(0,r.Autowired)(p.CodeActionService),n.__metadata("design:type",p.CodeActionService)],v.prototype,"codeActionService",void 0),t.AICodeActionContribution=v=n.__decorate([(0,c.Domain)(c.CommandContribution)],v)},79559:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CodeActionSingleHandler=void 0;const n=e(85608),r=e(76003),o=e(41869),c=e(43718),p=n.__importStar(e(20868)),v=e(52902),m=e(77714),_=e(85679),s=e(99906),f=e(89132);let a=class extends s.BaseAIMonacoContribHandler{constructor(){super(),this.inlineChatActionEnabled=this.preferenceService.getValid(c.AINativeSettingSectionsId.InlineChatCodeActionEnabled,!0),this.addDispose(this.preferenceService.onSpecificPreferenceChange(c.AINativeSettingSectionsId.InlineChatCodeActionEnabled,({newValue:u})=>{this.inlineChatActionEnabled=u,u?this.load():this.unload()}))}doContribute(){return v.monacoApi.languages.registerCodeActionProvider("*",{provideCodeActions:async(u,d)=>{if(!this.inlineChatActionEnabled)return;const E=u.getLineContent(d.startLineNumber);if(E?.trim()===m.empty||!this.shouldHandle(u.uri))return;const{languageParserService:g,codeActionService:l}=this,y=u.getLanguageId(),b=g.createParser(y);if(!b)return;const S=l.getCodeActions();if(!S||S.length===0)return;const A=d.getStartPosition();if(!A)return;function w(I){return{actions:S.map(O=>{const M={};O.command&&(M.id=O.command.id,M.arguments=[I.range,...O.command.arguments]);let R=O.title;switch(I.infoCategory){case"function":R=R+` for Function: ${I.name}`}return{...O,title:R,ranges:[I.range],command:M}}),dispose(){}}}const T=await b.provideCodeBlockInfo(u,A);if(T)return w(T);if(u.getLineLength(A.lineNumber)===0&&this.monacoEditor){const I=this.monacoEditor.getVisibleRanges();if(I.length===0)return;const O=new p.Range(A.lineNumber,0,I[0].endLineNumber+1,0),M=await b.provideCodeBlockInfoInRange(u,O);if(M)return w(M)}}})}};t.CodeActionSingleHandler=a,n.__decorate([(0,r.Autowired)(f.CodeActionService),n.__metadata("design:type",f.CodeActionService)],a.prototype,"codeActionService",void 0),n.__decorate([(0,r.Autowired)(o.PreferenceService),n.__metadata("design:type",Object)],a.prototype,"preferenceService",void 0),n.__decorate([(0,r.Autowired)(_.LanguageParserService),n.__metadata("design:type",_.LanguageParserService)],a.prototype,"languageParserService",void 0),t.CodeActionSingleHandler=a=n.__decorate([(0,r.Injectable)(),n.__metadata("design:paramtypes",[])],a)},89132:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CodeActionService=void 0;const n=e(85608),r=e(76003),o=e(57925),c=e(43718);let p=class extends c.Disposable{constructor(){super(...arguments),this.codeActionsMap=new Map,this._onCodeActionRun=new c.Emitter,this.onCodeActionRun=this._onCodeActionRun.event}dispose(){super.dispose(),this.codeActionsMap.clear()}fireCodeActionRun(m,_){this._onCodeActionRun.fire({id:m,range:_})}getCodeActions(){return Array.from(this.codeActionsMap.values())}deleteCodeActionById(m){this.codeActionsMap.delete(m)}registerCodeAction(m){var _;const{codeAction:s,id:f}=m;if(!s)return;const a={title:s.title||m.name,isAI:!0,isPreferred:(_=s.isPreferred)!==null&&_!==void 0?_:!0,kind:s.kind||"InlineChat",disabled:s.disabled,command:{id:o.AI_CODE_ACTION.id,title:s.title||m.name,arguments:[m.id]}};this.codeActionsMap.set(f,a)}};t.CodeActionService=p,t.CodeActionService=p=n.__decorate([(0,r.Injectable)()],p)},57232:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AIInlineCompletionsProvider=void 0;const n=e(85608),r=e(76003),o=e(41869),c=e(43718),p=n.__importStar(e(20868)),v=e(687),m=e(71863),_={line:-1,column:-1,last:null};class s{constructor(){this.queue=[]}addReq(h){this.queue.push(h)}runReq(){return this.queue.length===0?void 0:this.queue.pop().run()}cancelReq(){this.queue.length!==0&&(this.queue.forEach(h=>{h.cancelRequest()}),this.queue=[])}}let f=class extends c.WithEventBus{constructor(){super(),this.inlineComletionsDebounceTime=this.preferenceService.getValid(c.AINativeSettingSectionsId.IntelligentCompletionsDebounceTime,150),this.addDispose(this.preferenceService.onSpecificPreferenceChange(c.AINativeSettingSectionsId.IntelligentCompletionsDebounceTime,({newValue:h})=>{this.inlineComletionsDebounceTime=h})),this.mount()}mount(){this.isManual=!1,this.isDelEvent=!1,this.reqStack=new s}setVisibleCompletion(h){this.aiCompletionsService.setVisibleCompletion(h)}hideStatusBarItem(){this.aiCompletionsService.hideStatusBarItem()}cancelRequest(){this.aiCompletionsService.cancelRequest(),this.reqStack&&this.reqStack.cancelReq()}async provideInlineCompletionItems(h,u,d,E){if(d.triggerKind===p.InlineCompletionTriggerKind.Automatic&&_.column===u.column&&_.line===u.lineNumber&&_.last!==void 0)return _.column=-1,_.line=-1,_.last;this.cancelRequest(),this.hideStatusBarItem();const g=this.isManual;if(this.isDelEvent&&!g)return;this.updateIsManual(!1);const l=this.injector.get(v.InlineCompletionRequestTask,[h,u,E]);if(this.reqStack.addReq(l),g||await(0,c.raceCancellation)((0,c.sleep)(this.inlineComletionsDebounceTime),E),E?.isCancellationRequested)return;const y=await this.reqStack.runReq();if(y)return _.column=u.column,_.line=u.lineNumber,_.last={items:y},_.last}updateIsManual(h){this.isManual=h}};t.AIInlineCompletionsProvider=f,n.__decorate([(0,r.Autowired)(m.AICompletionsService),n.__metadata("design:type",m.AICompletionsService)],f.prototype,"aiCompletionsService",void 0),n.__decorate([(0,r.Autowired)(r.INJECTOR_TOKEN),n.__metadata("design:type",r.Injector)],f.prototype,"injector",void 0),n.__decorate([(0,r.Autowired)(o.PreferenceService),n.__metadata("design:type",Object)],f.prototype,"preferenceService",void 0),t.AIInlineCompletionsProvider=f=n.__decorate([(0,r.Injectable)(),n.__metadata("design:paramtypes",[])],f)},2409:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.lineBasedCompletionModelConfigs=t.DEFAULT_COMPLECTION_MODEL=void 0;const n=e(71585);t.DEFAULT_COMPLECTION_MODEL={maxPromptTokenSize:3e3,maxExecuteTimeMillSecond:1e3,tokenizerName:n.TokenizerName.cl100k_base,wishList:{afterCursor:{enable:!0,attributeName:n.WishListAttributeName.afterCursor,extOption:{suffixPercent:.25,minBlockSize:25},priority:1,strategy:n.StrategyType.InterceptBasedOnLine},beforeCursor:{enable:!0,attributeName:n.WishListAttributeName.beforeCursor,extOption:{prefixPercent:.75,minBlockSize:75},priority:0,strategy:n.StrategyType.InterceptBasedOnLine},importedFile:{attributeName:n.WishListAttributeName.importedFile,enable:!0,extOption:{maxTime:200,importedFilesMaxNum:10,language:["typescript"],maxPercent:.8,patternPrefix:"Import Files from ",patternSuffix:`
30207
+ `),P=R[R.length-1],k=[{condition:P.includes("`"),action:d},{condition:P.includes("**"),action:b},{condition:P.match(/\*\w/),action:E},{condition:P.match(/(^|\s)__\w/),action:S},{condition:P.match(/(^|\s)_\w/),action:g},{condition:P.match(/(^|\s)\[.*\]\(\w*/),action:l},{condition:P.match(/(^|\s)\[\w/),action:y}];for(const F of k)if(F.condition)return F.action(I)}}},92635:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ChatNotify=t.ChatReply=void 0;const n=e(85608),r=n.__importStar(e(14041)),o=e(48412),c=e(91416),p=e(78569),v=e(72871),m=e(41869),_=e(81878),s=e(89195),f=e(43718),a=e(52416),h=e(90684),u=e(19413),d=e(56474),E=e(17319),g=n.__importDefault(e(6960)),l=w=>{const T=(0,m.useInjectable)(m.LabelService),D=(0,m.useInjectable)(m.CommandService),I=(F,L,N)=>{let j=T.getIcon(F,{isDirectory:L});return L&&N&&(j+=" expanded"),j},O=(0,r.useMemo)(()=>{const F=L=>{const N=typeof L.type=="number"?L.type===f.FileType.Directory:!!L.children,j=new f.URI(L.uri);return{label:L.label,iconClassName:I(j,N,N),expandable:!0,expanded:!0,children:N?(L.children||[]).map(F):null,uri:j}};return(w.treeData.children||[]).map(F)},[w.treeData]),[M,R]=(0,r.useState)(22),P=(0,r.useRef)(null),k=F=>{P.current=F;const L=()=>{let N=F.getModel().root.branchSize;N<1?N=1:N>20&&(N=20),R(N*22)};L(),F.onDidUpdate(L)};return O.length?r.default.createElement("div",{className:g.default.tree_container},r.default.createElement(c.BasicRecycleTree,{height:M,treeData:O,onContextMenu:F=>F.preventDefault(),onClick:(F,L)=>{!P.current||!L||(p.BasicCompositeTreeNode.is(L)?L.raw.iconClassName=I(L.raw.uri,!0,L.expanded):D.executeCommand(m.EDITOR_COMMANDS.OPEN_RESOURCE.id,L.raw.uri,{disableNavigate:!0,preview:!0}))},onReady:k,treeName:w.treeData.label,leaveBottomBlank:!1,baseIndent:0})):null},y=w=>{const{toolCall:T,messageId:D}=w,I=(0,m.useInjectable)(f.ChatAgentViewServiceToken),[O,M]=(0,r.useState)(null);return(0,r.useEffect)(()=>{const R=I.getChatComponent("toolCall");if(R){const{component:k,initialProps:F}=R;M(r.default.createElement(k,{...F,value:T,messageId:D}));return}M(r.default.createElement("div",null,r.default.createElement(s.Loading,null),r.default.createElement("span",{style:{marginLeft:4}},"\u6B63\u5728\u52A0\u8F7D\u7EC4\u4EF6"))),I.getChatComponentDeferred("toolCall").promise.then(({component:k,initialProps:F})=>{M(r.default.createElement(k,{...F,value:T,messageId:D}))})},[T.state]),O},b=w=>{const T=(0,m.useInjectable)(f.ChatAgentViewServiceToken),[D,I]=(0,r.useState)(null);return(0,r.useEffect)(()=>{const O=T.getChatComponent(w.component);if(O){const{component:R,initialProps:P}=O;I(r.default.createElement(R,{...P,value:w.value,messageId:w.messageId}));return}I(r.default.createElement("div",null,r.default.createElement(s.Loading,null),r.default.createElement("span",{style:{marginLeft:4}},"\u6B63\u5728\u52A0\u8F7D\u7EC4\u4EF6"))),T.getChatComponentDeferred(w.component).promise.then(({component:R,initialProps:P})=>{I(r.default.createElement(R,{...P,value:w.value}))})},[w.component,w.value]),D},S=w=>{var T,D;const{relationId:I,request:O,startTime:M=0,onRegenerate:R,onDidChange:P,onDone:k,agentId:F,command:L,history:N,msgId:j}=w,[,W]=(0,r.useReducer)(q=>(q+1)%1e6,0),U=(0,m.useInjectable)(f.IAIReporter),X=(0,m.useInjectable)(a.IIconService),V=(0,m.useInjectable)(m.IContextKeyService),$=(0,m.useInjectable)(u.IChatInternalService),Y=(0,m.useInjectable)(f.ChatServiceToken),G=(0,m.useInjectable)(u.IChatAgentService),H=(0,m.useInjectable)(f.ChatRenderRegistryToken);(0,r.useEffect)(()=>{const q=new m.DisposableCollection;return q.push(O.response.onDidChange(()=>{N.updateAssistantMessage(j,{content:O.response.responseText}),O.response.isComplete&&(k&&k(),U.end(I,{assistantMessage:O.response.responseText,replytime:Date.now()-M,success:!0,isStop:!1,command:L,agentId:F,messageId:j,sessionId:$.sessionModel.sessionId})),(0,r.startTransition)(()=>{P?.(),W()})})),()=>q.dispose()},[I,P,k]);const K=(0,r.useCallback)(()=>{O.response.reset(),R?.()},[R]),Z=()=>{k&&k(),U.end(I,{assistantMessage:O.response.responseText,replytime:Date.now()-M,success:!1,isStop:!0,command:L,agentId:F,messageId:j,sessionId:$.sessionModel.sessionId}),$.cancelRequest()},Q=(0,r.useCallback)(q=>{if(H.chatAIRoleRender){const Re=H.chatAIRoleRender;return r.default.createElement(Re,{content:q.value})}return r.default.createElement(d.ChatMarkdown,{markdown:q,fillInIncompleteTokens:!0})},[H,H.chatAIRoleRender]),oe=q=>r.default.createElement(l,{treeData:q}),ne=q=>r.default.createElement("div",{className:g.default.placeholder},r.default.createElement(_.Icon,{iconClass:X.fromString("$(codicon/sync~spin)")}),r.default.createElement("div",{className:g.default.placeholder_content},Q(q))),he=r.default.useMemo(()=>O.response.responseContents.map((q,Re)=>{let ve;return q.kind==="asyncContent"?ve=ne(new h.MarkdownString(q.content)):q.kind==="treeData"?ve=oe(q.treeData):q.kind==="component"?ve=r.default.createElement(b,{component:q.component,value:q.value,messageId:j}):q.kind==="toolCall"?ve=r.default.createElement(y,{toolCall:q.content,messageId:j}):ve=Q(q.content),r.default.createElement(r.Fragment,{key:`${q.kind}-${Re}`},ve)}),[O.response.responseContents]),_e=r.default.useMemo(()=>O.response.followups?O.response.followups.map((q,Re)=>{let ve=null;if(q.kind==="reply"){const ie=r.default.createElement("a",{onClick:()=>{Y.sendMessage({...G.parseMessage(q.message),reportExtra:{actionSource:f.ActionSourceEnum.Chat,actionType:f.ActionTypeEnum.Followup}})}},q.title||q.message);ve=q.tooltip?r.default.createElement(v.Tooltip,{title:q.tooltip},ie):ie}else q.when&&!V.match(q.when)&&(ve=null),ve=r.default.createElement(o.Button,{type:"default"},q.title);return ve&&r.default.createElement(r.Fragment,{key:Re},ve)}):null,[O.response.followups]);return O.response.isComplete?r.default.createElement(E.ChatThinkingResult,{hasMessage:O.response.responseParts.length>0||O.response.responseContents.length>0||!!(!((T=O.response.errorDetails)===null||T===void 0)&&T.message),onRegenerate:K,requestId:O.requestId},r.default.createElement("div",{className:g.default.ai_chat_response_container},!((D=O.response.errorDetails)===null||D===void 0)&&D.message?r.default.createElement("div",{className:g.default.error},r.default.createElement(_.Icon,{className:(0,_.getIcon)("close-circle")}),r.default.createElement("span",null,O.response.errorDetails.message)):r.default.createElement(r.default.Fragment,null,he,_e?.length!==0&&r.default.createElement("div",{className:g.default.followups},_e)))):r.default.createElement(E.ChatThinking,{message:O.response.responseText},he)};t.ChatReply=S;const A=w=>{const{chunk:T}=w,D=(0,m.useInjectable)(f.ChatRenderRegistryToken),I=r.default.useMemo(()=>{let O;if(T.kind==="component")O=r.default.createElement(b,{component:T.component,value:T.value});else{let M=r.default.createElement(d.ChatMarkdown,{markdown:T.content,fillInIncompleteTokens:!0});if(D.chatAIRoleRender){const R=D.chatAIRoleRender;M=r.default.createElement(R,{content:T.content})}O=M}return O},[T]);return r.default.createElement(E.ChatThinkingResult,{hasMessage:!0,requestId:w.requestId,showRegenerate:!1},r.default.createElement("div",{className:g.default.ai_chat_response_container},I))};t.ChatNotify=A},17319:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ChatThinkingResult=t.ChatThinking=void 0;const n=e(85608),r=n.__importStar(e(14041)),o=e(41869),c=e(89195),p=e(68974),v=e(43718),m=e(19413),_=n.__importDefault(e(6960)),s=a=>{const{children:h,message:u,thinkingText:d}=a,E=(0,o.useInjectable)(v.ChatRenderRegistryToken),g=(0,r.useMemo)(()=>E.chatThinkingRender,[E,E.chatThinkingRender]),l=(0,r.useCallback)(()=>!h||!u?.trim()?g?r.default.createElement(g,{thinkingText:d}):r.default.createElement("span",{className:_.default.thinking_text},d||"Thinking..."):h,[u,h,d,g]);return r.default.createElement(r.default.Fragment,null,r.default.createElement("div",{className:_.default.content},l()),r.default.createElement("div",{className:_.default.thinking_container},r.default.createElement("div",{className:_.default.stop},!g&&r.default.createElement("span",{className:_.default.progress_bar},!h&&r.default.createElement(p.Progress,{loading:!0,wrapperClassName:_.default.ai_native_progress_wrapper})))))};t.ChatThinking=s;const f=({children:a,message:h,onRegenerate:u,requestId:d,hasMessage:E=!0,showRegenerate:g})=>{const l=(0,o.useInjectable)(m.IChatInternalService),[y,b]=(0,r.useState)(l.latestRequestId),S=(0,o.useInjectable)(v.ChatRenderRegistryToken);(0,r.useEffect)(()=>{const I=l.onChangeRequestId(O=>{b(O)});return()=>I.dispose()},[l]);const A=(0,r.useMemo)(()=>S.chatThinkingResultRender,[S,S.chatThinkingResultRender]),w=(0,r.useCallback)(()=>{u&&u()},[u]),T=(0,r.useCallback)(()=>{if(typeof E=="boolean"?!E:!h?.trim()){const I=(0,v.localize)("aiNative.chat.stop.immediately");return A?r.default.createElement(A,{thinkingResult:I}):r.default.createElement("span",null,I)}return a},[h,E,a]),D=(0,r.useMemo)(()=>(0,v.isUndefined)(g)?y===d&&!!d:!!g,[y,d,g]);return r.default.createElement(r.default.Fragment,null,r.default.createElement("div",{className:_.default.content},T()),r.default.createElement("div",{className:_.default.thinking_container},r.default.createElement("div",{className:_.default.bottom_container},r.default.createElement("div",{className:_.default.reset},D?r.default.createElement(c.EnhanceIcon,{icon:"refresh",wrapperClassName:_.default.text_btn,className:_.default.transform,onClick:w,tabIndex:0,role:"button"},r.default.createElement("span",null,(0,v.localize)("aiNative.operate.afresh.title"))):null),r.default.createElement("div",{className:_.default.thumbs},r.default.createElement(c.Thumbs,{relationId:d,wrapperClassName:_.default.icon_btn})))))};t.ChatThinkingResult=f},34817:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ChatToolRender=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importStar(e(14041)),c=e(41869),p=e(81878),v=e(89195),m=e(43718),_=e(77633),s=e(25834),f=n.__importDefault(e(16796)),a=h=>{var u,d,E;const{value:g,messageId:l}=h,[y,b]=(0,o.useState)(!1),S=(0,c.useInjectable)(_.TokenMCPServerRegistry);if(!g||!g.function||!g.id)return null;const A=((u=S.getMCPTool(g.function.name))===null||u===void 0?void 0:u.label)||g.function.name,w=S.getToolComponent(g.function.name),T=M=>{switch(M){case"streaming-start":case"streaming":return{label:"Generating",icon:o.default.createElement(v.Loading,null)};case"complete":return{label:"Complete",icon:o.default.createElement(p.Icon,{iconClass:"codicon codicon-check"})};case"result":return{label:"Result Ready",icon:o.default.createElement(p.Icon,{iconClass:"codicon codicon-check-all"})};default:return{label:M||"Unknown",icon:o.default.createElement(p.Icon,{iconClass:"codicon codicon-question"})}}},D=()=>{var M;try{return g.state!=="complete"&&g.state!=="result"?{}:JSON.parse(((M=g.function)===null||M===void 0?void 0:M.arguments)||"{}")}catch{return{}}},I=()=>{b(!y)},O=T(g.state);return w&&(g.state==="complete"||g.state==="result")?o.default.createElement(w,{state:g.state,args:D(),result:g.result,index:g.index,messageId:l,toolCallId:g.id}):o.default.createElement("div",{className:f.default["chat-tool-render"]},o.default.createElement("div",{className:f.default["tool-header"],onClick:I},o.default.createElement("div",{className:f.default["tool-name"]},o.default.createElement(p.Icon,{iconClass:`codicon codicon-triangle-${y?"down":"right"}`}),A),g.state&&o.default.createElement("div",{className:f.default["tool-state"]},o.default.createElement("span",{className:f.default["state-icon"]},O.icon))),o.default.createElement("div",{className:(0,r.default)(f.default["tool-content"],{[f.default.expanded]:y})},((d=g?.function)===null||d===void 0?void 0:d.arguments)&&o.default.createElement("div",{className:f.default["tool-arguments"]},o.default.createElement("div",{className:f.default["section-label"]},"Arguments"),o.default.createElement(s.CodeEditorWithHighlight,{input:(E=g?.function)===null||E===void 0?void 0:E.arguments,language:"json",relationId:(0,m.uuid)(4)})),g?.result&&o.default.createElement("div",{className:f.default["tool-result"]},o.default.createElement("div",{className:f.default["section-label"]},"Result"),o.default.createElement(s.CodeEditorWithHighlight,{input:g.result,language:"json",relationId:(0,m.uuid)(4)}))))};t.ChatToolRender=a},29039:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SlashCustomRender=void 0;const r=e(85608).__importStar(e(14041)),o=e(41869),c=e(43718),p=e(19413),v=m=>{const{userMessage:_,relationId:s,requestId:f,renderContent:a,startTime:h,agentId:u,command:d}=m,E=(0,o.useInjectable)(p.IChatInternalService),g=(0,o.useInjectable)(c.IAIReporter);return r.useEffect(()=>{E.setLatestRequestId(f),g.end(s,{message:_,replytime:Date.now()-h,success:!0,isStop:!1,agentId:u,command:d})},[a,f,s]),r.createElement("div",null,a({userMessage:_}))};t.SlashCustomRender=v},86556:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WelcomeMessage=void 0;const n=e(85608),r=n.__importStar(e(14041)),o=e(41869),c=e(81878),p=e(4246),v=e(43718),m=e(90684);e(41937);const _=e(19413),s=e(56474),f=e(17319),a=e(78048),h=n.__importDefault(e(6960)),u=()=>{var d,E;const g=(0,o.useInjectable)(v.ChatServiceToken),l=(0,o.useInjectable)(_.IChatAgentService),y=(0,o.useInjectable)(v.ChatFeatureRegistryToken),b=(0,o.useInjectable)(v.ChatRenderRegistryToken),[S,A]=r.useState([]);(0,o.useUpdateOnEvent)(y.onDidWelcomeMessageChange);const w=r.useMemo(()=>{if(!y.chatWelcomeMessageModel)return[];const{sampleQuestions:O=[]}=y.chatWelcomeMessageModel;return O.map(a.extractIcon)},[(d=y.chatWelcomeMessageModel)===null||d===void 0?void 0:d.sampleQuestions]),T=r.useMemo(()=>{if(!y.chatWelcomeMessageModel)return"";const{content:O}=y.chatWelcomeMessageModel;return O},[(E=y.chatWelcomeMessageModel)===null||E===void 0?void 0:E.content]);if(r.useEffect(()=>{const O=l.onDidChangeAgents(async()=>{const R=(await l.getAllSampleQuestions()).map(a.extractIcon);A(R)});return()=>O.dispose()},[]),!T)return r.createElement(f.ChatThinking,{thinkingText:(0,v.localize)("aiNative.chat.welcome.loading.text")});const D=r.useMemo(()=>w.concat(S),[w,S]);return r.useMemo(()=>{if(b.chatWelcomeRender){const O=b.chatWelcomeRender;return r.createElement(O,{message:T,sampleQuestions:D})}return r.createElement("div",{className:h.default.chat_welcome_head},r.createElement("div",{className:h.default.chat_container_des},(0,m.isMarkdownString)(T)?r.createElement(s.ChatMarkdown,{markdown:T}):T),r.createElement("div",{className:h.default.chat_container_content},D.map((O,M)=>{const R=r.createElement("a",{className:h.default.link_item,onClick:(0,p.withPrevented)(()=>{g.sendMessage({...l.parseMessage(O.message),reportExtra:{actionType:v.ActionTypeEnum.Welcome,actionSource:v.ActionSourceEnum.Chat}})})},O.icon?r.createElement(c.Icon,{className:O.icon,style:{color:"inherit",marginRight:"4px"}}):"",r.createElement("span",null,O.title));return O.tooltip?r.createElement(c.Tooltip,{title:O.tooltip,key:M},R):r.createElement(r.Fragment,{key:M},R)})))},[b.chatWelcomeRender,T,D])};t.WelcomeMessage=u},83933:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.highLightLanguageSupport=void 0,t.highLightLanguageSupport=["1c","abnf","accesslog","actionscript","ada","angelscript","apache","applescript","arcade","arduino","armasm","xml","asciidoc","aspectj","autohotkey","autoit","avrasm","awk","axapta","bash","basic","bnf","brainfuck","c-like","c","cal","capnproto","ceylon","clean","clojure","clojure-repl","cmake","coffeescript","coq","cos","cpp","crmsh","crystal","csharp","csp","css","d","markdown","dart","delphi","diff","django","dns","dockerfile","dos","dsconfig","dts","dust","ebnf","elixir","elm","ruby","erb","erlang-repl","erlang","excel","fix","flix","fortran","fsharp","gams","gauss","gcode","gherkin","glsl","gml","go","golo","gradle","groovy","haml","handlebars","haskell","haxe","hsp","htmlbars","http","hy","inform7","ini","irpf90","isbl","java","javascript","jboss-cli","json","julia","julia-repl","kotlin","lasso","latex","ldif","leaf","less","lisp","livecodeserver","livescript","llvm","lsl","lua","makefile","mathematica","matlab","maxima","mel","mercury","mipsasm","mizar","perl","mojolicious","monkey","moonscript","n1ql","nginx","nim","nix","node-repl","nsis","objectivec","ocaml","openscad","oxygene","parser3","pf","pgsql","php","php-template","plaintext","pony","powershell","processing","profile","prolog","properties","protobuf","puppet","purebasic","python","python-repl","q","qml","r","reasonml","rib","roboconf","routeros","rsl","ruleslanguage","rust","sas","scala","scheme","scilab","scss","shell","smali","smalltalk","sml","sqf","sql_more","sql","stan","stata","step21","stylus","subunit","swift","taggerscript","yaml","tap","tcl","thrift","tp","twig","typescript","vala","vbnet","vbscript","vbscript-html","verilog","vhdl","vim","x86asm","xl","xquery","zephir"]},78048:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.extractIcon=t.createMessageByAI=t.createMessageByUser=void 0;const n=e(41869),r="",o=m=>({...m,type:"text",className:`${m.position==="left"?"rce-ai-msg":"rce-user-msg"} ${m.className?m.className:""}`}),c=(m,_)=>o({...m,position:"right",title:r,className:_,role:1});t.createMessageByUser=c;const p=(m,_)=>o({...m,position:"left",title:"",className:_,role:2});t.createMessageByAI=p;const v=m=>{let{title:_}=m;const{message:s,tooltip:f}=m;let a=m.icon||"";if(!_)return{icon:a,title:s,message:s,tooltip:f};const h=_.match(/^\$\(([a-z.]+\/)?([a-z0-9-]+)(~[a-z]+)?\)/i);if(h){const[u,d,E,g]=h,l=d?d.slice(0,-1):n.CODICON_OWNER;a=(0,n.getExternalIcon)(E,l),g&&(a+=` ${g.slice(1)}`),_=_.slice(u.length)}return{icon:a,title:_,message:s,tooltip:f}};t.extractIcon=v},19957:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LlmContextContribution=void 0;const n=e(85608),r=e(76003),o=e(41869),c=e(46044);let p=class{initialize(){this.llmContextService.startAutoCollection()}};t.LlmContextContribution=p,n.__decorate([(0,r.Autowired)(c.LLMContextServiceToken),n.__metadata("design:type",Object)],p.prototype,"llmContextService",void 0),t.LlmContextContribution=p=n.__decorate([(0,o.Domain)(o.ClientAppContribution)],p)},63536:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LLMContextServiceImpl=void 0;const n=e(85608),r=e(76003),o=e(11050),c=e(25234),p=e(19083),v=e(86560),m=e(96689),_=e(82196),s=e(6287),f=e(20868);let a=class extends c.WithEventBus{constructor(){super(...arguments),this.isAutoCollecting=!1,this.contextVersion=0,this.maxAttachFilesLimit=10,this.maxViewFilesLimit=20,this.attachedFiles=[],this.recentlyViewFiles=[],this.onDidContextFilesChangeEmitter=new v.Emitter,this.onDidContextFilesChangeEvent=this.onDidContextFilesChangeEmitter.event}addFileToList(u,d,E){const g=d.findIndex(l=>l.uri.toString()===u.uri.toString());g>-1&&d.splice(g,1),d.push(u),d.length>E&&d.shift()}addFileToContext(u,d,E=!1){if(!u)return;const g={uri:u,selection:d},l=E?this.attachedFiles:this.recentlyViewFiles,y=E?this.maxAttachFilesLimit:this.maxViewFilesLimit;E&&this.docModelManager.createModelReference(u),this.addFileToList(g,l,y),this.notifyContextChange()}notifyContextChange(){this.onDidContextFilesChangeEmitter.fire(this.getAllContextFiles())}cleanFileContext(){this.attachedFiles.length=0,this.notifyContextChange()}getAllContextFiles(){return{viewed:this.recentlyViewFiles,attached:this.attachedFiles,version:this.contextVersion++}}removeFileFromContext(u,d=!1){const E=d?this.attachedFiles:this.recentlyViewFiles,g=E.findIndex(l=>l.uri.toString()===u.toString());g>-1&&E.splice(g,1),this.notifyContextChange()}startAutoCollection(){this.isAutoCollecting||(this.isAutoCollecting=!0,this.startAutoCollectionInternal())}startAutoCollectionInternal(){this.disposables.push(this.eventBus.on(m.EditorDocumentModelCreationEvent,u=>{u.payload.uri.scheme==="file"&&this.addFileToContext(u.payload.uri,void 0,!1)})),this.disposables.push(this.eventBus.on(m.EditorDocumentModelRemovalEvent,u=>{u.payload.scheme==="file"&&this.removeFileFromContext(u.payload,!1)})),this.disposables.push(this.eventBus.on(m.EditorDocumentModelSavedEvent,u=>{u.payload.scheme})),this.disposables.push(this.eventBus.on(_.EditorSelectionChangeEvent,u=>{if(u.payload.selections.length>0){const d=[u.payload.selections[0].selectionStartLineNumber,u.payload.selections[0].positionLineNumber].sort();d[0]===d[1]?this.addFileToContext(u.payload.editorUri,void 0,!1):this.addFileToContext(u.payload.editorUri,d.sort((E,g)=>E-g),!1)}}))}stopAutoCollection(){this.dispose()}serialize(){const u=this.getAllContextFiles(),d=v.URI.file(this.appConfig.workspaceDir);return{recentlyViewFiles:this.serializeRecentlyViewFiles(u.viewed,d),attachedFiles:this.serializeAttachedFiles(u.attached,d)}}serializeRecentlyViewFiles(u,d){return u.map(E=>{var g;return((g=d.relative(E.uri))===null||g===void 0?void 0:g.toString())||E.uri.parent.toString()}).filter(Boolean)}serializeAttachedFiles(u,d){return u.map(E=>this.serializeAttachedFile(E,d)).filter(Boolean)}serializeAttachedFile(u,d){try{const E=this.docModelManager.getModelReference(u.uri);return E?{content:E.instance.getText(u.selection&&new f.Range(u.selection[0],1/0,u.selection[1],1/0)),lineErrors:this.getFileErrors(u.uri),path:d.relative(u.uri).toString(),language:E.instance.languageId}:null}catch{return null}}getFileErrors(u){return this.markerService.getManager().getMarkers({resource:u.toString(),severities:p.MarkerSeverity.Error}).map(d=>d.message)}};t.LLMContextServiceImpl=a,n.__decorate([(0,r.Autowired)(o.AppConfig),n.__metadata("design:type",Object)],a.prototype,"appConfig",void 0),n.__decorate([(0,r.Autowired)(m.IEditorDocumentModelService),n.__metadata("design:type",Object)],a.prototype,"docModelManager",void 0),n.__decorate([(0,r.Autowired)(s.IMarkerService),n.__metadata("design:type",Object)],a.prototype,"markerService",void 0),t.LLMContextServiceImpl=a=n.__decorate([(0,r.Injectable)()],a)},99906:(x,t,e)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.BaseAIMonacoEditorController=t.BaseAIMonacoContribHandler=void 0;const r=e(85608),o=e(76003),c=e(43718);class p extends c.Disposable{constructor(){super(),this.allowAnyScheme=!1,this.allowedSchemes=[c.Schemes.file],this.sessionDisposable=new c.Disposable}shouldHandle(_){return!!(this.allowAnyScheme||this.allowedSchemes.includes(_.scheme))}unload(){this.sessionDisposable.dispose(),this.sessionDisposable=new c.Disposable}load(){this.unload(),this.sessionDisposable.addDispose(this.doContribute())}mountEditor(_){return this.monacoEditor=_,{dispose:()=>{this.monacoEditor=void 0}}}}t.BaseAIMonacoContribHandler=p;let v=n=class extends c.Disposable{static get(_){return _.getContribution(n.ID)}get token(){return this.cancellationTokenSource.token}cancelToken(){this.cancellationTokenSource.cancel(),this.cancellationTokenSource=new c.CancellationTokenSource}constructor(_,s){super(),this.injector=_,this.monacoEditor=s,this.cancellationTokenSource=new c.CancellationTokenSource,this.featureDisposable=new c.Disposable,this.allowedSchemes=[c.Schemes.file,c.Schemes.notebookCell];const f=new c.Disposable;let a=!1;this.addDispose(this.monacoEditor.onDidChangeModel(({newModelUrl:u})=>{if(!u)return;const d=this.allowedSchemes.includes(u.scheme);d!==a&&(a=!!d,a?f.addDispose(this.mount()):f.dispose())}));const h=s.getModel();h&&this.allowedSchemes.includes(h.uri.scheme)&&(a=!0,f.addDispose(this.mount())),this.addDispose(f)}};t.BaseAIMonacoEditorController=v,t.BaseAIMonacoEditorController=v=n=r.__decorate([r.__param(0,(0,o.Optional)()),r.__param(1,(0,o.Optional)()),r.__metadata("design:paramtypes",[o.Injector,Object])],v)},72713:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AICodeActionContribution=void 0;const n=e(85608),r=e(76003),o=e(57925),c=e(43718),p=e(89132);let v=class extends c.Disposable{registerCommands(_){_.registerCommand(o.AI_CODE_ACTION,{execute:(s,f)=>{this.codeActionService.fireCodeActionRun(f,s)}})}};t.AICodeActionContribution=v,n.__decorate([(0,r.Autowired)(p.CodeActionService),n.__metadata("design:type",p.CodeActionService)],v.prototype,"codeActionService",void 0),t.AICodeActionContribution=v=n.__decorate([(0,c.Domain)(c.CommandContribution)],v)},79559:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CodeActionSingleHandler=void 0;const n=e(85608),r=e(76003),o=e(41869),c=e(43718),p=n.__importStar(e(20868)),v=e(52902),m=e(77714),_=e(85679),s=e(99906),f=e(89132);let a=class extends s.BaseAIMonacoContribHandler{constructor(){super(),this.inlineChatActionEnabled=this.preferenceService.getValid(c.AINativeSettingSectionsId.InlineChatCodeActionEnabled,!0),this.addDispose(this.preferenceService.onSpecificPreferenceChange(c.AINativeSettingSectionsId.InlineChatCodeActionEnabled,({newValue:u})=>{this.inlineChatActionEnabled=u,u?this.load():this.unload()}))}doContribute(){return v.monacoApi.languages.registerCodeActionProvider("*",{provideCodeActions:async(u,d)=>{if(!this.inlineChatActionEnabled)return;const E=u.getLineContent(d.startLineNumber);if(E?.trim()===m.empty||!this.shouldHandle(u.uri))return;const{languageParserService:g,codeActionService:l}=this,y=u.getLanguageId(),b=g.createParser(y);if(!b)return;const S=l.getCodeActions();if(!S||S.length===0)return;const A=d.getStartPosition();if(!A)return;function w(I){return{actions:S.map(O=>{const M={};O.command&&(M.id=O.command.id,M.arguments=[I.range,...O.command.arguments]);let R=O.title;switch(I.infoCategory){case"function":R=R+` for Function: ${I.name}`}return{...O,title:R,ranges:[I.range],command:M}}),dispose(){}}}const T=await b.provideCodeBlockInfo(u,A);if(T)return w(T);if(u.getLineLength(A.lineNumber)===0&&this.monacoEditor){const I=this.monacoEditor.getVisibleRanges();if(I.length===0)return;const O=new p.Range(A.lineNumber,0,I[0].endLineNumber+1,0),M=await b.provideCodeBlockInfoInRange(u,O);if(M)return w(M)}}})}};t.CodeActionSingleHandler=a,n.__decorate([(0,r.Autowired)(f.CodeActionService),n.__metadata("design:type",f.CodeActionService)],a.prototype,"codeActionService",void 0),n.__decorate([(0,r.Autowired)(o.PreferenceService),n.__metadata("design:type",Object)],a.prototype,"preferenceService",void 0),n.__decorate([(0,r.Autowired)(_.LanguageParserService),n.__metadata("design:type",_.LanguageParserService)],a.prototype,"languageParserService",void 0),t.CodeActionSingleHandler=a=n.__decorate([(0,r.Injectable)(),n.__metadata("design:paramtypes",[])],a)},89132:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CodeActionService=void 0;const n=e(85608),r=e(76003),o=e(57925),c=e(43718);let p=class extends c.Disposable{constructor(){super(...arguments),this.codeActionsMap=new Map,this._onCodeActionRun=new c.Emitter,this.onCodeActionRun=this._onCodeActionRun.event}dispose(){super.dispose(),this.codeActionsMap.clear()}fireCodeActionRun(m,_){this._onCodeActionRun.fire({id:m,range:_})}getCodeActions(){return Array.from(this.codeActionsMap.values())}deleteCodeActionById(m){this.codeActionsMap.delete(m)}registerCodeAction(m){var _;const{codeAction:s,id:f}=m;if(!s)return;const a={title:s.title||m.name,isAI:!0,isPreferred:(_=s.isPreferred)!==null&&_!==void 0?_:!0,kind:s.kind||"InlineChat",disabled:s.disabled,command:{id:o.AI_CODE_ACTION.id,title:s.title||m.name,arguments:[m.id]}};this.codeActionsMap.set(f,a)}};t.CodeActionService=p,t.CodeActionService=p=n.__decorate([(0,r.Injectable)()],p)},57232:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AIInlineCompletionsProvider=void 0;const n=e(85608),r=e(76003),o=e(41869),c=e(43718),p=n.__importStar(e(20868)),v=e(687),m=e(71863),_={line:-1,column:-1,last:null};class s{constructor(){this.queue=[]}addReq(h){this.queue.push(h)}runReq(){return this.queue.length===0?void 0:this.queue.pop().run()}cancelReq(){this.queue.length!==0&&(this.queue.forEach(h=>{h.cancelRequest()}),this.queue=[])}}let f=class extends c.WithEventBus{constructor(){super(),this.inlineComletionsDebounceTime=this.preferenceService.getValid(c.AINativeSettingSectionsId.IntelligentCompletionsDebounceTime,150),this.addDispose(this.preferenceService.onSpecificPreferenceChange(c.AINativeSettingSectionsId.IntelligentCompletionsDebounceTime,({newValue:h})=>{this.inlineComletionsDebounceTime=h})),this.mount()}mount(){this.isManual=!1,this.isDelEvent=!1,this.reqStack=new s}setVisibleCompletion(h){this.aiCompletionsService.setVisibleCompletion(h)}hideStatusBarItem(){this.aiCompletionsService.hideStatusBarItem()}cancelRequest(){this.aiCompletionsService.cancelRequest(),this.reqStack&&this.reqStack.cancelReq()}async provideInlineCompletionItems(h,u,d,E){if(d.triggerKind===p.InlineCompletionTriggerKind.Automatic&&_.column===u.column&&_.line===u.lineNumber&&_.last!==void 0)return _.column=-1,_.line=-1,_.last;this.cancelRequest(),this.hideStatusBarItem();const g=this.isManual;if(this.isDelEvent&&!g)return;this.updateIsManual(!1);const l=this.injector.get(v.InlineCompletionRequestTask,[h,u,E]);if(this.reqStack.addReq(l),g||await(0,c.raceCancellation)((0,c.sleep)(this.inlineComletionsDebounceTime),E),E?.isCancellationRequested)return;const y=await this.reqStack.runReq();if(y)return _.column=u.column,_.line=u.lineNumber,_.last={items:y},_.last}updateIsManual(h){this.isManual=h}};t.AIInlineCompletionsProvider=f,n.__decorate([(0,r.Autowired)(m.AICompletionsService),n.__metadata("design:type",m.AICompletionsService)],f.prototype,"aiCompletionsService",void 0),n.__decorate([(0,r.Autowired)(r.INJECTOR_TOKEN),n.__metadata("design:type",r.Injector)],f.prototype,"injector",void 0),n.__decorate([(0,r.Autowired)(o.PreferenceService),n.__metadata("design:type",Object)],f.prototype,"preferenceService",void 0),t.AIInlineCompletionsProvider=f=n.__decorate([(0,r.Injectable)(),n.__metadata("design:paramtypes",[])],f)},2409:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.lineBasedCompletionModelConfigs=t.DEFAULT_COMPLECTION_MODEL=void 0;const n=e(71585);t.DEFAULT_COMPLECTION_MODEL={maxPromptTokenSize:3e3,maxExecuteTimeMillSecond:1e3,tokenizerName:n.TokenizerName.cl100k_base,wishList:{afterCursor:{enable:!0,attributeName:n.WishListAttributeName.afterCursor,extOption:{suffixPercent:.25,minBlockSize:25},priority:1,strategy:n.StrategyType.InterceptBasedOnLine},beforeCursor:{enable:!0,attributeName:n.WishListAttributeName.beforeCursor,extOption:{prefixPercent:.75,minBlockSize:75},priority:0,strategy:n.StrategyType.InterceptBasedOnLine},importedFile:{attributeName:n.WishListAttributeName.importedFile,enable:!0,extOption:{maxTime:200,importedFilesMaxNum:10,language:["typescript"],maxPercent:.8,patternPrefix:"Import Files from ",patternSuffix:`
30226
30208
  `},priority:3,strategy:n.StrategyType.InterceptBasedOnLine},languageMarker:{attributeName:n.WishListAttributeName.languageMarker,enable:!0,extOption:{language:["python","html"],maxPercent:0},priority:4,strategy:n.StrategyType.InterceptBasedOnLine},pathMarker:{attributeName:n.WishListAttributeName.pathMarker,enable:!0,priority:1,strategy:n.StrategyType.InterceptBasedOnLine},similarFile:{attributeName:n.WishListAttributeName.similarFile,enable:!0,extOption:{maxTime:200,fileMaxLength:5e3,maxPercent:.3,neighboringTabsMaxNum:20,neighboringTabsOption:[n.NeighboringTabsOption.openFileHistory,n.NeighboringTabsOption.editFileRecent,n.NeighboringTabsOption.editFileHistory],patternPrefix:"Compare this snippet from ",patternSuffix:`
30227
30209
  `,similarityThreshold:.6,snippetMaxNum:4,windowSize:60,snippetSelectionMode:n.SnippetSelectionOption.BestMatch},priority:2,strategy:n.StrategyType.InterceptBasedOnLine}}},t.lineBasedCompletionModelConfigs={completionPromptMaxLineSize:1024,completionSuffixMaxLineSize:500}},72991:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InlineCompletionsController=void 0;const r=e(85608).__importDefault(e(12784)),o=e(57925),c=e(43718),p=e(57517),v=e(20868),m=e(52902),_=e(77714),s=e(37355),f=e(19413),a=e(77659),h=e(99906);class u extends h.BaseAIMonacoEditorController{constructor(){super(...arguments),this.sequencer=new c.Sequencer}static get(E){return E.getContribution(u.ID)}get eventBus(){return this.injector.get(c.IEventBus)}get commandService(){return this.injector.get(c.CommandService)}get aiInlineCompletionsProvider(){return this.injector.get(f.IAIInlineCompletionsProvider)}get intelligentCompletionsRegistry(){return this.injector.get(c.IntelligentCompletionsRegistryToken)}mount(){this.aiNativeContextKey=this.injector.get(a.AINativeContextKey,[this.monacoEditor.contextKeyService]);const E=()=>{this.aiInlineCompletionsProvider.hideStatusBarItem();const b=this.monacoEditor.getSelection();b&&(b.startLineNumber!==b.endLineNumber||b.startColumn!==b.endColumn)&&this.aiInlineCompletionsProvider.cancelRequest()},g=(0,r.default)(E,50,{maxWait:200,leading:!0,trailing:!0}),l=new Set([s.InlineCompletionContextKeys.inlineSuggestionVisible.key]);this.featureDisposable.addDispose(this.monacoEditor.contextKeyService.onDidChangeContext(b=>{b.affectsSome(l)&&!s.InlineCompletionContextKeys.inlineSuggestionVisible.getValue(this.monacoEditor.contextKeyService)&&this.preDidShowItems&&(0,c.runWhenIdle)(()=>{this.preDidShowItems=void 0,this.commandService.executeCommand(o.AI_INLINE_COMPLETION_VISIBLE.id,!1)})})),this.featureDisposable.addDispose(this.eventBus.on(p.EditorSelectionChangeEvent,b=>{b.payload.source==="mouse"?g():(g.cancel(),E())})),this.featureDisposable.addDispose(this.monacoEditor.onDidChangeModelContent(b=>{const S=b.changes;for(const A of S)A.text===_.empty?(this.aiInlineCompletionsProvider.isDelEvent=!0,this.aiInlineCompletionsProvider.cancelRequest()):this.aiInlineCompletionsProvider.isDelEvent=!1})),this.featureDisposable.addDispose(this.monacoEditor.onDidBlurEditorText(()=>{this.commandService.executeCommand(o.AI_INLINE_COMPLETION_VISIBLE.id,!1)}));let y;return this.featureDisposable.addDispose(m.monacoApi.languages.registerInlineCompletionsProvider("*",{groupId:"ai-native-intelligent-completions",provideInlineCompletions:async(b,S,A,w)=>{if(this.preDidShowItems){y||(y=S.delta(0,-1));const D=b.getValueInRange(v.Range.fromPositions(y,S));if(this.preDidShowItems.items[0].insertText.toString().startsWith(D))return this.preDidShowItems;y=void 0}return await this.sequencer.queue(()=>this.aiInlineCompletionsProvider.provideInlineCompletionItems(b,S,A,w))},freeInlineCompletions(){},handleItemDidShow:b=>{b.items.length>0&&(this.preDidShowItems=b,this.aiInlineCompletionsProvider.setVisibleCompletion(!0))}})),this.featureDisposable}async fetchProvider(E){const g=this.intelligentCompletionsRegistry.getInlineCompletionsProvider();if(!g||this.aiNativeContextKey.codeEditsIsVisible.get())return;const y=this.monacoEditor.getPosition();return await g(this.monacoEditor,y,E,this.token)}}t.InlineCompletionsController=u,u.ID="editor.contrib.ai.inline.completions"},687:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InlineCompletionRequestTask=void 0;const n=e(85608),r=e(76003),o=e(41869),c=e(57925),p=e(43718),v=e(52664),m=e(54414),_=e(51553),s=n.__importStar(e(20868)),f=e(74292),a=e(72991),h=e(64016),u=e(74151),d=e(71863),E=y=>{const b=new Set;for(const S of y)b.add(S);return b},g=(y,b)=>{let S="";const A=E(y);for(const w of b)(w===" "||!A.has(w))&&(S+=w);return S};let l=class extends p.Disposable{constructor(b,S,A){super(),this.model=b,this.position=S,this.token=A,this._disposables=new p.DisposableStore,this.isEnablePromptEngineering=!0,this.isCancelFlag=!1,this.isEnablePromptEngineering=this.preferenceService.getValid(p.AINativeSettingSectionsId.IntelligentCompletionsPromptEngineeringEnabled,this.isEnablePromptEngineering),this._disposables.add(this.preferenceService.onSpecificPreferenceChange(p.AINativeSettingSectionsId.IntelligentCompletionsPromptEngineeringEnabled,({newValue:w})=>{this.isEnablePromptEngineering=w}))}async constructRequestBean(b,S){const A=u.lineBasedPromptProcessor.processPrefix(b.prefix),w=u.lineBasedPromptProcessor.processSuffix(b.suffix);return{prompt:A,suffix:w,sessionId:(0,p.uuid)(),language:b.language,fileUrl:b.fileUrl,workspaceDir:b.workspaceDir}}async run(){const{model:b,position:S,token:A}=this;if(!b)return[];if(A.isCancellationRequested)return[];if(this.isCancelFlag)return[];const w=new s.Range(0,0,S.lineNumber,S.column);let T=b.getValueInRange(w);T===""&&(T+=`
30228
30210
  `);const D=new s.Range(S.lineNumber,S.column,b.getLineCount(),Number.MAX_SAFE_INTEGER),I=b.getValueInRange(D),O=b.getLanguageId(),M={fileUrl:b.uri.fsPath,filename:b.uri.toString().split("/").pop(),language:O,prefix:T,suffix:I,uri:p.URI.from(b.uri),workspaceDir:this.appConfig.workspaceDir},R=await this.constructRequestBean(M,A);if(this.isCancelFlag)return[];const P=Date.now();let k;const F=this.promptCache.getCache(R),L=F?.relationId||this.aiReporter.start(v.AIServiceType.Completion,{message:v.AIServiceType.Completion});if(this.aiCompletionsService.setLastRelationId(L),F)k=F;else try{if(this.aiCompletionsService.updateStatusBarItem("running",!0),this.intelligentCompletionsRegistry.getInlineCompletionsProvider()){const j=this.workbenchEditorService.currentCodeEditor;if(!j)return[];const W=a.InlineCompletionsController.get(j.monacoEditor);k=await W?.fetchProvider(R)}else k=await this.aiCompletionsService.complete(R)}catch(N){return this.aiCompletionsService.reporterEnd(L,{success:!1,replytime:Date.now()-P,message:N.toString()}),this.aiCompletionsService.hideStatusBarItem(),[]}finally{this.aiCompletionsService.hideStatusBarItem()}return k?this.pushLineCompletions(k,R,P,L):[]}pushLineCompletions(b,S,A,w){var T;const{position:D}=this;if(this.aiCompletionsService.setLastSessionId(S.sessionId),!((T=b?.extra)===null||T===void 0)&&T.isCancel||this.token.isCancellationRequested||this.isCancelFlag)return this.aiCompletionsService.reporterEnd(w,{success:!0,replytime:Date.now()-A,isStop:!0,completionNum:0}),this.aiCompletionsService.updateStatusBarItem("canceled",!1),[];if(!b||!b.items||b.items.length===0)return this.aiCompletionsService.reporterEnd(w,{success:!0,replytime:Date.now()-A,completionNum:0}),this.aiCompletionsService.updateStatusBarItem("no result",!1),[];b.items.length>0&&this.promptCache.setCache(S,{...b,relationId:w}),this.aiCompletionsService.updateStatusBarItem("completion result: "+b.items.length,!1),this.dispose();const I=new Array;for(const O of b.items){const R=O.insertText.toString().trimEnd(),P=this.model,k=P.getValueInRange({startLineNumber:D.lineNumber,startColumn:D.column,endLineNumber:D.lineNumber,endColumn:P.getLineMaxColumn(D.lineNumber)}),F=g(R,k),L=R+F;this.aiCompletionsService.setLastCompletionContent(L),I.push({...O,insertText:L,range:new s.Range(D.lineNumber,D.column,D.lineNumber,D.column+R.length+k.length),sessionId:S.sessionId,relationId:w,command:{id:c.AI_INLINE_COMPLETION_REPORTER.id,title:"",arguments:[w,S.sessionId,!0,L]}})}return I}dispose(){this._disposables.dispose()}cancelRequest(){this.isCancelFlag=!0,this.dispose()}};t.InlineCompletionRequestTask=l,n.__decorate([(0,r.Autowired)(v.IAIReporter),n.__metadata("design:type",Object)],l.prototype,"aiReporter",void 0),n.__decorate([(0,r.Autowired)(h.PromptCache),n.__metadata("design:type",h.PromptCache)],l.prototype,"promptCache",void 0),n.__decorate([(0,r.Autowired)(d.AICompletionsService),n.__metadata("design:type",d.AICompletionsService)],l.prototype,"aiCompletionsService",void 0),n.__decorate([(0,r.Autowired)(o.PreferenceService),n.__metadata("design:type",Object)],l.prototype,"preferenceService",void 0),n.__decorate([(0,r.Autowired)(o.AppConfig),n.__metadata("design:type",Object)],l.prototype,"appConfig",void 0),n.__decorate([(0,r.Autowired)(p.IntelligentCompletionsRegistryToken),n.__metadata("design:type",f.IntelligentCompletionsRegistry)],l.prototype,"intelligentCompletionsRegistry",void 0),n.__decorate([(0,r.Autowired)(m.WorkbenchEditorService),n.__metadata("design:type",_.WorkbenchEditorServiceImpl)],l.prototype,"workbenchEditorService",void 0),t.InlineCompletionRequestTask=l=n.__decorate([(0,r.Injectable)({multiple:!0}),n.__metadata("design:paramtypes",[Object,s.Position,Object])],l)},64208:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MAX_NEIGHBOR_AGGREGATE_LENGTH=t.EXCLUDED_NEIGHBORS=t.LANGUAGE_COMMENT_MARKERS=void 0,t.LANGUAGE_COMMENT_MARKERS={abap:{start:'"',end:""},bat:{start:"REM",end:""},bibtex:{start:"%",end:""},blade:{start:"#",end:""},c:{start:"//",end:""},clojure:{start:";",end:""},coffeescript:{start:"//",end:""},cpp:{start:"//",end:""},csharp:{start:"//",end:""},css:{start:"/*",end:"*/"},dart:{start:"//",end:""},dockerfile:{start:"#",end:""},elixir:{start:"#",end:""},erb:{start:"<%#",end:"%>"},erlang:{start:"%",end:""},fsharp:{start:"//",end:""},go:{start:"//",end:""},groovy:{start:"//",end:""},haml:{start:"-#",end:""},handlebars:{start:"{{!",end:"}}"},haskell:{start:"--",end:""},html:{start:"<!--",end:"-->"},ini:{start:";",end:""},java:{start:"//",end:""},javascript:{start:"//",end:""},javascriptreact:{start:"//",end:""},jsonc:{start:"//",end:""},jsx:{start:"//",end:""},julia:{start:"#",end:""},kotlin:{start:"//",end:""},latex:{start:"%",end:""},less:{start:"//",end:""},lua:{start:"--",end:""},makefile:{start:"#",end:""},markdown:{start:"[]: #",end:""},"objective-c":{start:"//",end:""},"objective-cpp":{start:"//",end:""},perl:{start:"#",end:""},php:{start:"//",end:""},powershell:{start:"#",end:""},pug:{start:"//",end:""},python:{start:"#",end:""},ql:{start:"//",end:""},r:{start:"#",end:""},razor:{start:"<!--",end:"-->"},ruby:{start:"#",end:""},rust:{start:"//",end:""},sass:{start:"//",end:""},scala:{start:"//",end:""},scss:{start:"//",end:""},shellscript:{start:"#",end:""},slim:{start:"/",end:""},solidity:{start:"//",end:""},sql:{start:"--",end:""},stylus:{start:"//",end:""},svelte:{start:"<!--",end:"-->"},swift:{start:"//",end:""},terraform:{start:"#",end:""},tex:{start:"%",end:""},typescript:{start:"//",end:""},typescriptreact:{start:"//",end:""},vb:{start:"'",end:""},verilog:{start:"//",end:""},"vue-html":{start:"<!--",end:"-->"},vue:{start:"//",end:""},xml:{start:"<!--",end:"-->"},xsl:{start:"<!--",end:"-->"},yaml:{start:"#",end:""},diff:{start:"#",end:""}},t.EXCLUDED_NEIGHBORS=["node_modules","dist","site-packages"],t.MAX_NEIGHBOR_AGGREGATE_LENGTH=2e5},68728:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getImportedFile=t.extractLocalImportContext=t.getImportedFilesInterface=void 0;const n=e(43718),r=e(14951),o=e(55121),c=e(51500),p=e(85679),v=e(69056),m=async(f,a,h,u)=>{var d;const E=u.get(p.LanguageParserService);let g=[];const l=[],y=E.createParser(a.languageId);y&&(g=await y.extractImportPaths(f));const b=(d=h.maxTime)!==null&&d!==void 0?d:200,S=Date.now();for(const A of g){let w="";const T=a.uri.parent.codeUri.fsPath;if(!(A.startsWith("@/")||A.startsWith("~")||!A.startsWith("."))){A==="."?w=new o.Path(T).join("index.ts").toString():w=new o.Path(T).join(`${A}${v.LANGUAGE_TO_SUFFIX[a.languageId]}`).toString();try{const D=u.get(r.IFileServiceClient),I=u.get(c.IWorkspaceService),O=n.URI.file(w),M=await D.readFile(O.codeUri.fsPath),R=await y?.extractInterfaceOrTypeCode(M.content.toString());if(R&&R.length>0){const P=await I.asRelativePath(O);P?.path&&l.push([P.path,R])}}catch{}if(Date.now()-S>b)break}}return l};t.getImportedFilesInterface=m;const _=async(f,a,h)=>{const{source:u}=f;return f.languageId==="typescript"?(0,t.getImportedFilesInterface)(u,f,a,h):[]};t.extractLocalImportContext=_;const s=async(f,a,h)=>{if(f.language&&!a.language.includes(f.language))return[];const u=f.prefix;return(0,t.extractLocalImportContext)({source:u,uri:f.uri,languageId:f.language,offset:u.length},a,h)};t.getImportedFile=s},277:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FixedWindowSizeJaccardMatcher=t.getCursorContext=void 0;const n=e(71585),r=e(79253),o=e(64806),c=(m,_={})=>{const s={tokenizerName:n.TokenizerName.cl100k_base,..._},f=(0,o.getTokenizer)(s.tokenizerName);if(s.maxLineCount&&s.maxLineCount<0)throw new Error("maxLineCount must be non-negative if defined");if(s.maxTokenLength&&s.maxTokenLength<0)throw new Error("maxTokenLength must be non-negative if defined");if(s.maxLineCount===0||s.maxTokenLength===0)return{context:"",lineCount:0,tokenLength:0,tokenizerName:s.tokenizerName};let a=m.source.slice(0,m.offset);return s.maxLineCount&&(a=a.split(`
@@ -30300,13 +30282,13 @@ ${S.slice(1).join(`
30300
30282
  `).slice(d.startPosition.row);return`${g[0].slice(d.startPosition.column)}${g.length>1?`
30301
30283
  ${g.slice(1).join(`
30302
30284
  `)}`:""}`}}return a.text}findTypeIdentifier(a){let h=a;for(;h;){if(h.type==="type_identifier")return h.text;const u=h.child(1);if(!u)break;h=u}return""}async extractImportPaths(a){var h;const u=[],d=await this.parser.parse(a),E=d?.rootNode,g=[],l=[];if(E)for(let y=0;y<E?.childCount;y++){const b=E.child(y);if(b?.type==="import_statement")g.push(b);else if(b?.type==="type_annotation"){const S=b.child(1);S&&l.push(S.text)}else if(b?.type==="lexical_declaration"){const S=this.findTypeIdentifier(b);S&&l.push(S)}}for(const y of g)if(l.some(b=>y.text.includes(b))){let b=(h=y.child(3))===null||h===void 0?void 0:h.text;(b?.includes("'")||b?.includes('"'))&&(b=b.slice(1,-1)),b&&u.push(b)}return u}async extractInterfaceOrTypeCode(a){var h;const u=[];if(this.language==="typescript"){await this.parserLoaded.promise;const d=(h=this.parser)===null||h===void 0?void 0:h.parse(a),E=d?.rootNode;if(E)for(let g=0;g<E?.childCount;g++){const l=E.child(g);if(l?.type==="export_statement"){const y=l.child(1);(y?.type==="interface_declaration"||y?.type==="type_alias_declaration")&&u.push(y.text)}else(l?.type==="interface_declaration"||l?.type==="type_alias_declaration")&&u.push(l.text)}}return u}async findSyntaxErrorCount(a){var h;await this.parserLoaded.promise;const u=(h=this.parser)===null||h===void 0?void 0:h.parse(a),d=u?.rootNode;if(!d)return 0;let E=0;const g=l=>{(l.type==="function_declaration"||l.type==="class_declaration"||l.type==="variable_declarator"||l.type==="statement_block"||l.type==="expression_statement")&&(l.hasError||l.isMissing||l.type==="ERROR")&&E++;for(let b=0;b<l.childCount;b++){const S=l.child(b);S&&g(S)}};return g(d),E}async findNearestCodeBlockWithPosition(a,h){const u=await this.parser.parse(a);if(u){const{rootNode:d}=u,E=d.namedDescendantForIndex(h),g=this.findContainingCodeBlockWithPosition(E,h);if(!g)return null;let y=a.split(`
30303
- `).slice(0,g.startPosition.row).reduce((b,S)=>b+S.length,0);return y+=g.startPosition.row,y+=g.startPosition.column,{codeBlock:g.text,range:{start:{line:g.startPosition.row,character:0},end:{line:g.endPosition.row,character:1/0}},offset:y,type:g.startPosition.row===g.endPosition.row?p.NearestCodeBlockType.Line:p.NearestCodeBlockType.Block}}return null}dispose(){this.parser.delete(),this.lruCache.clear()}};t.LanguageParser=s,n.__decorate([(0,o.Autowired)(_.WasmModuleManager),n.__metadata("design:type",_.WasmModuleManager)],s.prototype,"wasmModuleManager",void 0),n.__decorate([(0,o.Autowired)(m.TreeSitterLanguageFacts),n.__metadata("design:type",m.TreeSitterLanguageFacts)],s.prototype,"languageFacts",void 0),t.LanguageParser=s=n.__decorate([(0,o.Injectable)({multiple:!0}),n.__metadata("design:paramtypes",[String])],s)},85679:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LanguageParserService=void 0;const n=e(85608),r=e(76003),o=e(3073),c=e(22486);let p=class{constructor(){this.pool=new Map}createParser(m){const _=c.parserNameMap[m];if(_)return this.pool.has(_)||this.pool.set(_,this.injector.get(o.LanguageParser,[_])),this.pool.get(_)}dispose(){this.pool.forEach(m=>m.dispose()),this.pool.clear()}};t.LanguageParserService=p,n.__decorate([(0,r.Autowired)(r.INJECTOR_TOKEN),n.__metadata("design:type",r.Injector)],p.prototype,"injector",void 0),t.LanguageParserService=p=n.__decorate([(0,r.Injectable)()],p)},53374:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toMonacoRange=e;function e(n){return{startLineNumber:n.startPosition.row+1,startColumn:n.startPosition.column+1,endLineNumber:n.endPosition.row+1,endColumn:n.endPosition.column+1}}},19584:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GolangLanguageFacts=void 0;const e=["function_declaration","method_declaration","block","if_statement","else_statement","switch_statement","case_clause","for_statement","range_clause","type_switch_statement","type_case_clause","comm_clause","select_statement","go_statement","defer_statement"],n=new Set(e);class r{constructor(){this.name="go",this.listCommentStyle="// ",this.blockCommentStyle={start:"/**",end:" */",linePrefix:" * "}}provideCodeBlocks(){return n}isCodeBlock(c){return n.has(c)}}t.GolangLanguageFacts=r},22486:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TreeSitterLanguageFacts=t.knownLanguageFacts=void 0;const n=e(85608);n.__exportStar(e(17973),t);const r=e(76003),o=e(19584),c=e(44606),p=e(82381),v=e(41486),m=e(98588),_=e(96436),s=e(2349),f=e(78542),a=new Set;t.knownLanguageFacts=[o.GolangLanguageFacts,c.JavaLanguageFacts,p.JavaScriptLanguageFacts,v.JavaScriptReactLanguageFacts,m.PythonLanguageFacts,_.RustLanguageFacts,s.TypeScriptLanguageFacts,f.TypeScriptReactLanguageFacts];let h=class{constructor(){this.langs=new Map,t.knownLanguageFacts.forEach(d=>{const E=new d;this.langs.set(E.name,E)})}isCodeBlock(d,E){const g=this.langs.get(d);return g&&g.isCodeBlock?g.isCodeBlock(E):!1}isFunctionCodeBlock(d,E){const g=this.langs.get(d);return g&&g.isFunctionCodeBlocks?g.isFunctionCodeBlocks(E):!1}provideFunctionInfo(d,E){const g=this.langs.get(d);return g&&g.provideFunctionInfo?g.provideFunctionInfo(E):null}getCodeBlockTypes(d){const E=this.langs.get(d);return E?E.provideCodeBlocks():a}};t.TreeSitterLanguageFacts=h,t.TreeSitterLanguageFacts=h=n.__decorate([(0,r.Injectable)(),n.__metadata("design:paramtypes",[])],h)},44606:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.JavaLanguageFacts=void 0;const e=["compilation_unit","class_declaration","interface_declaration","enum_declaration","method_declaration","constructor_declaration","block","static_initializer","instance_initializer","if_statement","switch_statement","while_statement","do_statement","for_statement","enhanced_for_statement","try_statement","catch_clause","finally_clause"],n=new Set(["method_declaration","constructor_declaration"]),r=new Set(e);class o{constructor(){this.name="java",this.listCommentStyle="// ",this.blockCommentStyle={start:"/**",end:" */",linePrefix:" * "}}provideCodeBlocks(){return r}isCodeBlock(p){return r.has(p)}isFunctionCodeBlocks(p){return n.has(p)}}t.JavaLanguageFacts=o},82381:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.JavaScriptLanguageFacts=t.functionBlockCodeTypes=t.javascriptBlockCodeTypes=void 0;const n=e(53374);t.javascriptBlockCodeTypes=["function","function_declaration","function_expression","arrow_function","class_declaration","method_definition","if_statement","switch_case","while_statement","do_statement","for_statement","for_in_statement","try_statement","catch_clause","block","export_statement","lexical_declaration"],t.functionBlockCodeTypes=["function","function_declaration","function_expression","arrow_function","method_definition"];const r=new Set(t.functionBlockCodeTypes),o=new Set(t.javascriptBlockCodeTypes);class c{constructor(){this.name="javascript",this.listCommentStyle="// ",this.blockCommentStyle={start:"/**",end:" */",linePrefix:" * "}}provideCodeBlocks(){return o}isCodeBlock(v){return o.has(v)}isFunctionCodeBlocks(v){return r.has(v)}provideFunctionInfo(v){var m,_,s;switch(v.type){case"function_declaration":case"function_expression":return{infoCategory:"function",type:v.type,name:((m=v.firstNamedChild)===null||m===void 0?void 0:m.text)||"",signatures:v.children.filter(f=>f.type==="parameter").map(f=>{var a;return((a=f.firstChild)===null||a===void 0?void 0:a.text)||""}),range:(0,n.toMonacoRange)(v)};case"arrow_function":{const f=v.parent;return f&&f.type==="variable_declarator"&&f.parent&&(f.parent.type==="lexical_declaration"||f.parent.type==="export_statement"||f.parent.type==="variable_declaration")?{infoCategory:"function",type:v.type,name:((_=f.firstChild)===null||_===void 0?void 0:_.text)||"",signatures:v.children.filter(a=>a.type==="parameter").map(a=>{var h;return((h=a.firstChild)===null||h===void 0?void 0:h.text)||""}),range:(0,n.toMonacoRange)(f.parent)}:null}case"method_definition":return{infoCategory:"function",type:v.type,name:((s=v.firstNamedChild)===null||s===void 0?void 0:s.text)||"",signatures:v.children.filter(f=>f.type==="parameter").map(f=>{var a;return((a=f.firstChild)===null||a===void 0?void 0:a.text)||""}),range:(0,n.toMonacoRange)(v)}}return null}}t.JavaScriptLanguageFacts=c},41486:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.JavaScriptReactLanguageFacts=t.javascriptreactBlockCodeTypes=void 0;const n=e(82381);t.javascriptreactBlockCodeTypes=[...n.javascriptBlockCodeTypes,"jsx_element","jsx_self_closing_element","jsx_expression","jsx_fragment"];const r=new Set(t.javascriptreactBlockCodeTypes);class o{constructor(){this.name="jsx",this.listCommentStyle="// ",this.blockCommentStyle={start:"/**",end:" */",linePrefix:" * "}}provideCodeBlocks(){return r}isCodeBlock(p){return r.has(p)}}t.JavaScriptReactLanguageFacts=o},98588:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PythonLanguageFacts=t.pythonBlockCodeTypes=void 0,t.pythonBlockCodeTypes=["function_definition","class_definition","compound_statement","if_statement","elif_clause","else_clause","for_statement","while_statement","try_statement","except_clause","with_statement","decorated_definition"];const e=new Set(t.pythonBlockCodeTypes);class n{constructor(){this.name="python",this.listCommentStyle="# ",this.blockCommentStyle={start:"'''",end:"'''",linePrefix:""}}provideCodeBlocks(){return e}isCodeBlock(o){return e.has(o)}}t.PythonLanguageFacts=n},96436:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RustLanguageFacts=t.rustBlockCodeTypes=void 0,t.rustBlockCodeTypes=["function_item","impl_item","trait_item","block","if_expression","match_expression","while_expression","loop_expression","for_expression","closure_expression","struct_item","enum_item","union_item","mod_item"];const e=new Set(t.rustBlockCodeTypes);class n{constructor(){this.name="rust",this.listCommentStyle="// ",this.blockCommentStyle={start:"/**",end:" */",linePrefix:" * "}}provideCodeBlocks(){return e}isCodeBlock(o){return e.has(o)}}t.RustLanguageFacts=n},17973:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parserIdentifierMap=t.parserNameMap=void 0;const r=e(85608).__importDefault(e(19891)),o={typescript:"typescript",typescriptreact:"tsx",javascript:"javascript",javascriptreact:"jsx",rust:"rust",python:"python",java:"java",go:"go"};t.parserNameMap=o,t.parserIdentifierMap=(0,r.default)(t.parserNameMap)},2349:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TypeScriptLanguageFacts=t.typescriptBlockTypes=void 0,t.typescriptBlockTypes=["function","function_declaration","function_expression","arrow_function","class_declaration","interface_declaration","method_definition","method_signature","enum_declaration","type_alias_declaration","lexical_declaration","if_statement","switch_case","while_statement","do_statement","for_statement","for_in_statement","for_of_statement","try_statement","catch_clause","block","module","public_field_definition","private_field_definition","export_statement"];const e=new Set(t.typescriptBlockTypes);class n{constructor(){this.name="typescript",this.listCommentStyle="// ",this.blockCommentStyle={start:"/**",end:" */",linePrefix:" * "}}provideCodeBlocks(){return e}isCodeBlock(o){return e.has(o)}}t.TypeScriptLanguageFacts=n},78542:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TypeScriptReactLanguageFacts=t.typescriptreactBlockTypes=void 0;const n=e(2349);t.typescriptreactBlockTypes=[...n.typescriptBlockTypes,"jsx_element","jsx_self_closing_element","jsx_expression","jsx_fragment"];const r=new Set(t.typescriptreactBlockTypes);class o{constructor(){this.name="tsx",this.listCommentStyle="// ",this.blockCommentStyle={start:"/**",end:" */",linePrefix:" * "}}provideCodeBlocks(){return r}isCodeBlock(p){return r.has(p)}}t.TypeScriptReactLanguageFacts=o},67045:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WasmModuleManager=void 0;const n=e(85608),r=n.__importDefault(e(13833)),o=e(76003),c=e(6858),p=e(70392);let v=class{async resolveResourceUri(){const _=await this.rendererRuntime.provideResourceUri(c.EKnownResources.TreeSitterWasmDirectory);this.resolvedResourceUriDeferred.resolve(_)}constructor(){this.resolvedResourceUriDeferred=new p.Deferred,this.cachedRuntime=new Map,this.parserInitialized=!1,this.resolveResourceUri()}async initParser(){const _=await this.resolvedResourceUriDeferred.promise;let s;return _.endsWith("/")?s=`${_}tree-sitter.wasm`:s=`${_}/tree-sitter.wasm`,this.parserInitialized||(await r.default.init({locateFile:()=>s}),this.parserInitialized=!0),new r.default}async loadLanguage(_){if(!this.cachedRuntime.has(_)){const s=new p.Deferred;this.cachedRuntime.set(_,s);const f=await this.resolvedResourceUriDeferred.promise;let a;f.endsWith("/")?a=`${f}tree-sitter-${_}.wasm`:a=`${f}/tree-sitter-${_}.wasm`,fetch(a).then(h=>h.arrayBuffer()).then(h=>{s.resolve(h)})}return this.cachedRuntime.get(_).promise}};t.WasmModuleManager=v,n.__decorate([(0,o.Autowired)(c.RendererRuntime),n.__metadata("design:type",c.RendererRuntime)],v.prototype,"rendererRuntime",void 0),t.WasmModuleManager=v=n.__decorate([(0,o.Injectable)(),n.__metadata("design:paramtypes",[])],v)},4972:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AIRightTabRenderer=t.AILeftTabRenderer=t.AIChatTabRendererWithTab=t.AIChatTabRenderer=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importStar(e(14041)),c=e(41869),p=e(89195),v=e(1149),m=e(43718),_=e(11090),s=e(63067),f=e(46245),a=e(66368),h=e(19951),u=e(752),d=e(19413),E=n.__importDefault(e(87708)),g=()=>{const{side:w}=o.default.useContext(h.TabbarConfig),T=(0,c.useInjectable)(u.TabbarServiceFactory)(w);return(0,o.useEffect)(()=>{T.setIsLatter(!0)},[T]),o.default.createElement("div",{style:{width:0}},o.default.createElement(f.TabbarViewBase,{tabSize:0,MoreTabView:f.IconElipses,TabView:f.IconTabView,barSize:0,panelBorderSize:1}))},l=({className:w,components:T})=>o.default.createElement(h.TabRendererBase,{side:d.AI_CHAT_VIEW_ID,direction:"left-to-right",id:E.default.ai_chat_panel,className:(0,r.default)(w,`${d.AI_CHAT_VIEW_ID}-slot`),components:T,TabbarView:()=>o.default.createElement(g,null),TabpanelView:()=>o.default.createElement(a.BaseTabPanelView,{PanelView:a.ContainerView,PanelViewProps:{className:E.default.ai_chat_view_container}})});t.AIChatTabRenderer=l;const y=({className:w,components:T})=>o.default.createElement(h.TabRendererBase,{side:d.AI_CHAT_VIEW_ID,direction:"right-to-left",id:E.default.ai_chat_panel,className:(0,r.default)(w,`${d.AI_CHAT_VIEW_ID}-slot`,"design_right_slot"),components:T,TabbarView:()=>o.default.createElement(f.ChatTabbarRenderer2,null),TabpanelView:()=>o.default.createElement(a.BaseTabPanelView,{PanelView:a.ContainerView,PanelViewProps:{className:E.default.ai_chat_view_container}})});t.AIChatTabRendererWithTab=y;const b=({className:w,components:T})=>o.default.createElement(_.DesignLeftTabRenderer,{className:w,components:T,tabbarView:S});t.AILeftTabRenderer=b;const S=()=>{const w=(0,c.useInjectable)(s.IMainLayoutService),T=(0,c.useInjectable)(u.TabbarServiceFactory)(c.SlotLocation.right),D=(0,c.useAutorun)(T.currentContainerId),I=o.default.useMemo(()=>w.getExtraMenu(),[w]),[O]=(0,c.useContextMenus)(I),M=(0,o.useCallback)(({renderContainers:R})=>{const P=T.visibleContainers.filter(k=>{var F;return!(!((F=k.options)===null||F===void 0)&&F.hideTab)});return o.default.createElement(o.default.Fragment,null,P.length>0&&o.default.createElement(p.HorizontalVertical,{margin:"8px auto 0px",width:"60%"}),P.map(k=>R(k,T,D)))},[D,T]);return o.default.createElement(f.LeftTabbarRenderer,{renderOtherVisibleContainers:M,isRenderExtraTopMenus:!1,renderExtraMenus:o.default.createElement("div",{className:E.default.extra_bottom_icon_container},O.length>=0?O.map(R=>o.default.createElement(p.EnhanceIconWithCtxMenu,{key:R.id,id:R.id,wrapperClassName:E.default.extra_bottom_icon,iconClass:R.icon,menuNodes:R.children,skew:{x:-8,y:-4}})):null)})},A=({className:w,components:T})=>{const D=(0,c.useInjectable)(u.TabbarServiceFactory)(c.SlotLocation.right),I=(0,c.useInjectable)(v.DesignLayoutConfig),O=(0,o.useCallback)(()=>{D.updateCurrentContainerId("")},[]),M=(0,o.useCallback)(P=>{const{component:k}=P,{options:F}=k;return o.default.createElement(a.ContainerView,{...P,customTitleBar:o.default.createElement("div",{className:E.default.header},o.default.createElement("span",{className:E.default.title},F&&F.title),o.default.createElement("div",{className:E.default.side},o.default.createElement(p.EnhancePopover,{id:"ai_right_panel_header_close",title:(0,m.localize)("editor.title.context.close")},o.default.createElement(p.EnhanceIcon,{icon:"close",onClick:O})))),renderContainerWrap:({children:L})=>o.default.createElement("div",{className:E.default.right_slot_container_wrap},o.default.createElement("div",{className:E.default.container},L))})},[]),R=(0,o.useMemo)(()=>I.useMergeRightWithLeftPanel?E.default.right_tab_renderer:"",[I]);return o.default.createElement(_.DesignRightTabRenderer,{components:T,className:R,tabbarView:()=>o.default.createElement(f.RightTabbarRenderer,{barSize:0,style:{width:0}}),tabpanelView:()=>o.default.createElement(a.BaseTabPanelView,{PanelView:M})})};t.AIRightTabRenderer=A},82983:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AIChatLogoAvatar=void 0;const n=e(85608),r=n.__importDefault(e(14041)),o=e(41869),c=e(89195),p=e(63067),v=e(19413),m=n.__importDefault(e(88473)),_=()=>{const s=(0,o.useInjectable)(p.IMainLayoutService),f=r.default.useCallback(()=>{s.toggleSlot(v.AI_CHAT_VIEW_ID)},[s]);return r.default.createElement("div",{className:m.default.ai_switch,onClick:f},r.default.createElement(c.AILogoAvatar,{iconClassName:m.default.avatar_icon_large}))};t.AIChatLogoAvatar=_},73974:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BaseApplyService=void 0;const n=e(85608),r=e(41429),o=e(76003),c=e(41869),p=e(54414),v=e(57517),m=e(55126),_=e(20868),s=e(70392),f=e(2261),a=e(19413),h=e(59347),u=e(40111),d=e(15989);class E extends c.WithEventBus{constructor(){super(),this.onCodeBlockUpdateEmitter=new s.Emitter,this.onCodeBlockUpdate=this.onCodeBlockUpdateEmitter.event,this.activePreviewerMap=this.registerDispose(new s.DisposableMap),this.editorListenerMap=this.registerDispose(new s.DisposableMap),this.addDispose(this.chatInternalService.onCancelRequest(()=>{const l=this.chatInternalService.sessionModel.history.lastMessageId;if(!l)return;const y=this.getMessageCodeBlocks(l);y&&Object.values(y).forEach(b=>{this.cancelApply(b)})})),this.currentSessionId=this.chatInternalService.sessionModel.sessionId,this.addDispose(this.chatInternalService.onChangeSession(l=>{l!==this.currentSessionId&&(this.cancelAllApply(),this.currentSessionId=l)})),this.addDispose(this.chatInternalService.onRegenerateRequest(()=>{const l=this.chatInternalService.sessionModel.history.getMessages(),y=l[l.length-1].id,b=this.getMessageCodeBlocks(y);b&&Object.values(b).forEach(S=>{this.cancelApply(S)})})),this.addDispose(this.chatInternalService.onWillClearSession(l=>{this.cancelAllApply(l)}))}getMessageCodeBlocks(l,y){y=y||this.chatInternalService.sessionModel.sessionId;const b=this.chatInternalService.getSession(y);if(!b)throw new Error(`Session ${y} not found`);const S=b.history.getMessageAdditional(l);return S?.codeBlockMap}onEditorGroupClose(l){const y=s.path.relative(this.appConfig.workspaceDir,l.payload.resource.uri.path.toString());this.activePreviewerMap.get(y)&&this.activePreviewerMap.disposeKey(y),this.editorListenerMap.disposeKey(l.payload.resource.uri.toString())}async onEditorGroupOpen(l){var y;const b=s.path.relative(this.appConfig.workspaceDir,l.payload.resource.uri.path.toString());if(this.duringApply||this.activePreviewerMap.has(b)||!this.chatInternalService.sessionModel.history.getMessages().length)return;const S=((y=this.getUriCodeBlocks(l.payload.resource.uri))===null||y===void 0?void 0:y.filter(A=>A.status==="pending"))||[];if(S.length>0&&S[0].updatedCode){const A=l.payload.group.codeEditor.monacoEditor;this.renderApplyResult(A,S[0],S[0].updatedCode)}}get currentPreviewer(){var l;const y=(l=this.editorService.currentEditor)===null||l===void 0?void 0:l.currentUri;if(y)return this.activePreviewerMap.get(s.path.relative(this.appConfig.workspaceDir,y.path.toString()))}getUriCodeBlocks(l){const y=this.getSessionCodeBlocks(),b=s.path.relative(this.appConfig.workspaceDir,l.path.toString());return y.filter(S=>S.relativePath===b).sort((S,A)=>A.version-S.version)}getPendingPaths(l){return this.getSessionCodeBlocks(l).filter(b=>b.status==="pending").map(b=>b.relativePath)}getSessionCodeBlocks(l){l=l||this.chatInternalService.sessionModel.sessionId;const y=this.chatInternalService.getSession(l);if(!y)throw new Error(`Session ${l} not found`);const b=y.history.sessionAdditionals;return Array.from(b.values()).map(S=>S.codeBlockMap||{}).reduce((S,A)=>(Object.values(A).forEach(w=>{S.push(w)}),S),[])}getCodeBlock(l,y){if(y=y||this.chatInternalService.sessionModel.history.lastMessageId,!y)throw new Error("Message ID is required");const b=this.getMessageCodeBlocks(y);if(b)return b[l]}updateCodeBlock(l){const y=l.messageId,b=this.getMessageCodeBlocks(y);if(!b)throw new Error("Code block not found");b[l.toolCallId]=l,this.chatInternalService.sessionModel.history.setMessageAdditional(y,{codeBlockMap:b}),this.onCodeBlockUpdateEmitter.fire(l)}async registerCodeBlock(l,y,b){var S,A;const w=this.chatInternalService.sessionModel.history.lastMessageId,T=this.getUriCodeBlocks(s.URI.file(s.path.join(this.appConfig.workspaceDir,l))),D=await this.editorDocumentModelService.createModelReference(s.URI.file(s.path.join(this.appConfig.workspaceDir,l))),I={codeEdit:y,relativePath:l,status:"generating",iterationCount:1,version:1,createdAt:Date.now(),toolCallId:b,messageId:w,originalCode:D.instance.getText()};if(T?.length){I.version=T.length;for(const M of T)if(M.relativePath===l&&(!((A=(S=M.applyResult)===null||S===void 0?void 0:S.diagnosticInfos)===null||A===void 0)&&A.length))I.iterationCount++;else break}const O=this.getMessageCodeBlocks(w)||{};return O[b]=I,this.chatInternalService.sessionModel.history.setMessageAdditional(w,{codeBlockMap:O}),this.onCodeBlockUpdateEmitter.fire(I),I}async apply(l){try{if(this.duringApply=!0,l.iterationCount>3)throw new Error("Lint error max iteration count exceeded");const y=l.originalCode?await this.doApply(l):{result:l.codeEdit};if(!y.stream&&!y.result)throw new Error("No apply content provided");this.activePreviewerMap.has(l.relativePath)&&this.cancelApply(l,!0);const b=await this.editorService.open(s.URI.file(s.path.join(this.appConfig.workspaceDir,l.relativePath)));if(!b)throw new Error("Failed to open file");typeof y.result=="string"&&(l.updatedCode=y.result,l.status="pending",this.updateCodeBlock(l));const S=await this.renderApplyResult(b.group.codeEditor.monacoEditor,l,y.result||y.stream,y.range);return S&&(l.applyResult=S,this.updateCodeBlock(l)),l}catch(y){throw l.status="failed",this.updateCodeBlock(l),y}finally{this.duringApply=!1}}async renderApplyResult(l,y,b,S){var A,w;const T=new s.Deferred,D=d.InlineDiffController.get(l);if(S=S||l.getModel().getFullModelRange(),typeof b=="string"){const I=l.getModel().getValue(),O=s.URI.file(s.path.join(this.appConfig.workspaceDir,y.relativePath)),M=this.editorDocumentModelService.getModelReference(O);(I!==b||M?.instance.dirty)&&((A=l.getModel())===null||A===void 0||A.pushEditOperations([],[f.EditOperation.replace(S,b)],()=>null),await this.editorService.save(O));const R=(w=this.getUriCodeBlocks(O))===null||w===void 0?void 0:w.filter(j=>j.status==="pending"),P=R?.[R.length-1];if((P?.originalCode||y.originalCode)===b){y.status="cancelled",this.updateCodeBlock(y),T.resolve();return}const k=D.createDiffPreviewer(l,_.Selection.fromRange(S,_.SelectionDirection.LTR),{disposeWhenEditorClosed:!0,renderRemovedWidgetImmediately:!0,reverse:!0});this.activePreviewerMap.set(y.relativePath,k),k.setValue(P?.originalCode||y.originalCode||`
30285
+ `).slice(0,g.startPosition.row).reduce((b,S)=>b+S.length,0);return y+=g.startPosition.row,y+=g.startPosition.column,{codeBlock:g.text,range:{start:{line:g.startPosition.row,character:0},end:{line:g.endPosition.row,character:1/0}},offset:y,type:g.startPosition.row===g.endPosition.row?p.NearestCodeBlockType.Line:p.NearestCodeBlockType.Block}}return null}dispose(){this.parser.delete(),this.lruCache.clear()}};t.LanguageParser=s,n.__decorate([(0,o.Autowired)(_.WasmModuleManager),n.__metadata("design:type",_.WasmModuleManager)],s.prototype,"wasmModuleManager",void 0),n.__decorate([(0,o.Autowired)(m.TreeSitterLanguageFacts),n.__metadata("design:type",m.TreeSitterLanguageFacts)],s.prototype,"languageFacts",void 0),t.LanguageParser=s=n.__decorate([(0,o.Injectable)({multiple:!0}),n.__metadata("design:paramtypes",[String])],s)},85679:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LanguageParserService=void 0;const n=e(85608),r=e(76003),o=e(3073),c=e(22486);let p=class{constructor(){this.pool=new Map}createParser(m){const _=c.parserNameMap[m];if(_)return this.pool.has(_)||this.pool.set(_,this.injector.get(o.LanguageParser,[_])),this.pool.get(_)}dispose(){this.pool.forEach(m=>m.dispose()),this.pool.clear()}};t.LanguageParserService=p,n.__decorate([(0,r.Autowired)(r.INJECTOR_TOKEN),n.__metadata("design:type",r.Injector)],p.prototype,"injector",void 0),t.LanguageParserService=p=n.__decorate([(0,r.Injectable)()],p)},53374:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toMonacoRange=e;function e(n){return{startLineNumber:n.startPosition.row+1,startColumn:n.startPosition.column+1,endLineNumber:n.endPosition.row+1,endColumn:n.endPosition.column+1}}},19584:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GolangLanguageFacts=void 0;const e=["function_declaration","method_declaration","block","if_statement","else_statement","switch_statement","case_clause","for_statement","range_clause","type_switch_statement","type_case_clause","comm_clause","select_statement","go_statement","defer_statement"],n=new Set(e);class r{constructor(){this.name="go",this.listCommentStyle="// ",this.blockCommentStyle={start:"/**",end:" */",linePrefix:" * "}}provideCodeBlocks(){return n}isCodeBlock(c){return n.has(c)}}t.GolangLanguageFacts=r},22486:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TreeSitterLanguageFacts=t.knownLanguageFacts=void 0;const n=e(85608);n.__exportStar(e(17973),t);const r=e(76003),o=e(19584),c=e(44606),p=e(82381),v=e(41486),m=e(98588),_=e(96436),s=e(2349),f=e(78542),a=new Set;t.knownLanguageFacts=[o.GolangLanguageFacts,c.JavaLanguageFacts,p.JavaScriptLanguageFacts,v.JavaScriptReactLanguageFacts,m.PythonLanguageFacts,_.RustLanguageFacts,s.TypeScriptLanguageFacts,f.TypeScriptReactLanguageFacts];let h=class{constructor(){this.langs=new Map,t.knownLanguageFacts.forEach(d=>{const E=new d;this.langs.set(E.name,E)})}isCodeBlock(d,E){const g=this.langs.get(d);return g&&g.isCodeBlock?g.isCodeBlock(E):!1}isFunctionCodeBlock(d,E){const g=this.langs.get(d);return g&&g.isFunctionCodeBlocks?g.isFunctionCodeBlocks(E):!1}provideFunctionInfo(d,E){const g=this.langs.get(d);return g&&g.provideFunctionInfo?g.provideFunctionInfo(E):null}getCodeBlockTypes(d){const E=this.langs.get(d);return E?E.provideCodeBlocks():a}};t.TreeSitterLanguageFacts=h,t.TreeSitterLanguageFacts=h=n.__decorate([(0,r.Injectable)(),n.__metadata("design:paramtypes",[])],h)},44606:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.JavaLanguageFacts=void 0;const e=["compilation_unit","class_declaration","interface_declaration","enum_declaration","method_declaration","constructor_declaration","block","static_initializer","instance_initializer","if_statement","switch_statement","while_statement","do_statement","for_statement","enhanced_for_statement","try_statement","catch_clause","finally_clause"],n=new Set(["method_declaration","constructor_declaration"]),r=new Set(e);class o{constructor(){this.name="java",this.listCommentStyle="// ",this.blockCommentStyle={start:"/**",end:" */",linePrefix:" * "}}provideCodeBlocks(){return r}isCodeBlock(p){return r.has(p)}isFunctionCodeBlocks(p){return n.has(p)}}t.JavaLanguageFacts=o},82381:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.JavaScriptLanguageFacts=t.functionBlockCodeTypes=t.javascriptBlockCodeTypes=void 0;const n=e(53374);t.javascriptBlockCodeTypes=["function","function_declaration","function_expression","arrow_function","class_declaration","method_definition","if_statement","switch_case","while_statement","do_statement","for_statement","for_in_statement","try_statement","catch_clause","block","export_statement","lexical_declaration"],t.functionBlockCodeTypes=["function","function_declaration","function_expression","arrow_function","method_definition"];const r=new Set(t.functionBlockCodeTypes),o=new Set(t.javascriptBlockCodeTypes);class c{constructor(){this.name="javascript",this.listCommentStyle="// ",this.blockCommentStyle={start:"/**",end:" */",linePrefix:" * "}}provideCodeBlocks(){return o}isCodeBlock(v){return o.has(v)}isFunctionCodeBlocks(v){return r.has(v)}provideFunctionInfo(v){var m,_,s;switch(v.type){case"function_declaration":case"function_expression":return{infoCategory:"function",type:v.type,name:((m=v.firstNamedChild)===null||m===void 0?void 0:m.text)||"",signatures:v.children.filter(f=>f.type==="parameter").map(f=>{var a;return((a=f.firstChild)===null||a===void 0?void 0:a.text)||""}),range:(0,n.toMonacoRange)(v)};case"arrow_function":{const f=v.parent;return f&&f.type==="variable_declarator"&&f.parent&&(f.parent.type==="lexical_declaration"||f.parent.type==="export_statement"||f.parent.type==="variable_declaration")?{infoCategory:"function",type:v.type,name:((_=f.firstChild)===null||_===void 0?void 0:_.text)||"",signatures:v.children.filter(a=>a.type==="parameter").map(a=>{var h;return((h=a.firstChild)===null||h===void 0?void 0:h.text)||""}),range:(0,n.toMonacoRange)(f.parent)}:null}case"method_definition":return{infoCategory:"function",type:v.type,name:((s=v.firstNamedChild)===null||s===void 0?void 0:s.text)||"",signatures:v.children.filter(f=>f.type==="parameter").map(f=>{var a;return((a=f.firstChild)===null||a===void 0?void 0:a.text)||""}),range:(0,n.toMonacoRange)(v)}}return null}}t.JavaScriptLanguageFacts=c},41486:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.JavaScriptReactLanguageFacts=t.javascriptreactBlockCodeTypes=void 0;const n=e(82381);t.javascriptreactBlockCodeTypes=[...n.javascriptBlockCodeTypes,"jsx_element","jsx_self_closing_element","jsx_expression","jsx_fragment"];const r=new Set(t.javascriptreactBlockCodeTypes);class o{constructor(){this.name="jsx",this.listCommentStyle="// ",this.blockCommentStyle={start:"/**",end:" */",linePrefix:" * "}}provideCodeBlocks(){return r}isCodeBlock(p){return r.has(p)}}t.JavaScriptReactLanguageFacts=o},98588:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PythonLanguageFacts=t.pythonBlockCodeTypes=void 0,t.pythonBlockCodeTypes=["function_definition","class_definition","compound_statement","if_statement","elif_clause","else_clause","for_statement","while_statement","try_statement","except_clause","with_statement","decorated_definition"];const e=new Set(t.pythonBlockCodeTypes);class n{constructor(){this.name="python",this.listCommentStyle="# ",this.blockCommentStyle={start:"'''",end:"'''",linePrefix:""}}provideCodeBlocks(){return e}isCodeBlock(o){return e.has(o)}}t.PythonLanguageFacts=n},96436:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RustLanguageFacts=t.rustBlockCodeTypes=void 0,t.rustBlockCodeTypes=["function_item","impl_item","trait_item","block","if_expression","match_expression","while_expression","loop_expression","for_expression","closure_expression","struct_item","enum_item","union_item","mod_item"];const e=new Set(t.rustBlockCodeTypes);class n{constructor(){this.name="rust",this.listCommentStyle="// ",this.blockCommentStyle={start:"/**",end:" */",linePrefix:" * "}}provideCodeBlocks(){return e}isCodeBlock(o){return e.has(o)}}t.RustLanguageFacts=n},17973:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parserIdentifierMap=t.parserNameMap=void 0;const r=e(85608).__importDefault(e(19891)),o={typescript:"typescript",typescriptreact:"tsx",javascript:"javascript",javascriptreact:"jsx",rust:"rust",python:"python",java:"java",go:"go"};t.parserNameMap=o,t.parserIdentifierMap=(0,r.default)(t.parserNameMap)},2349:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TypeScriptLanguageFacts=t.typescriptBlockTypes=void 0,t.typescriptBlockTypes=["function","function_declaration","function_expression","arrow_function","class_declaration","interface_declaration","method_definition","method_signature","enum_declaration","type_alias_declaration","lexical_declaration","if_statement","switch_case","while_statement","do_statement","for_statement","for_in_statement","for_of_statement","try_statement","catch_clause","block","module","public_field_definition","private_field_definition","export_statement"];const e=new Set(t.typescriptBlockTypes);class n{constructor(){this.name="typescript",this.listCommentStyle="// ",this.blockCommentStyle={start:"/**",end:" */",linePrefix:" * "}}provideCodeBlocks(){return e}isCodeBlock(o){return e.has(o)}}t.TypeScriptLanguageFacts=n},78542:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TypeScriptReactLanguageFacts=t.typescriptreactBlockTypes=void 0;const n=e(2349);t.typescriptreactBlockTypes=[...n.typescriptBlockTypes,"jsx_element","jsx_self_closing_element","jsx_expression","jsx_fragment"];const r=new Set(t.typescriptreactBlockTypes);class o{constructor(){this.name="tsx",this.listCommentStyle="// ",this.blockCommentStyle={start:"/**",end:" */",linePrefix:" * "}}provideCodeBlocks(){return r}isCodeBlock(p){return r.has(p)}}t.TypeScriptReactLanguageFacts=o},67045:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WasmModuleManager=void 0;const n=e(85608),r=n.__importDefault(e(13833)),o=e(76003),c=e(6858),p=e(70392);let v=class{async resolveResourceUri(){const _=await this.rendererRuntime.provideResourceUri(c.EKnownResources.TreeSitterWasmDirectory);this.resolvedResourceUriDeferred.resolve(_)}constructor(){this.resolvedResourceUriDeferred=new p.Deferred,this.cachedRuntime=new Map,this.parserInitialized=!1,this.resolveResourceUri()}async initParser(){const _=await this.resolvedResourceUriDeferred.promise;let s;return _.endsWith("/")?s=`${_}tree-sitter.wasm`:s=`${_}/tree-sitter.wasm`,this.parserInitialized||(await r.default.init({locateFile:()=>s}),this.parserInitialized=!0),new r.default}async loadLanguage(_){if(!this.cachedRuntime.has(_)){const s=new p.Deferred;this.cachedRuntime.set(_,s);const f=await this.resolvedResourceUriDeferred.promise;let a;f.endsWith("/")?a=`${f}tree-sitter-${_}.wasm`:a=`${f}/tree-sitter-${_}.wasm`,fetch(a).then(h=>h.arrayBuffer()).then(h=>{s.resolve(h)})}return this.cachedRuntime.get(_).promise}};t.WasmModuleManager=v,n.__decorate([(0,o.Autowired)(c.RendererRuntime),n.__metadata("design:type",c.RendererRuntime)],v.prototype,"rendererRuntime",void 0),t.WasmModuleManager=v=n.__decorate([(0,o.Injectable)(),n.__metadata("design:paramtypes",[])],v)},4972:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AIRightTabRenderer=t.AILeftTabRenderer=t.AIChatTabRendererWithTab=t.AIChatTabRenderer=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importStar(e(14041)),c=e(41869),p=e(89195),v=e(1149),m=e(43718),_=e(11090),s=e(63067),f=e(46245),a=e(66368),h=e(19951),u=e(752),d=e(19413),E=n.__importDefault(e(87708)),g=()=>{const{side:w}=o.default.useContext(h.TabbarConfig),T=(0,c.useInjectable)(u.TabbarServiceFactory)(w);return(0,o.useEffect)(()=>{T.setIsLatter(!0)},[T]),o.default.createElement("div",{style:{width:0}},o.default.createElement(f.TabbarViewBase,{tabSize:0,MoreTabView:f.IconElipses,TabView:f.IconTabView,barSize:0,panelBorderSize:1}))},l=({className:w,components:T})=>o.default.createElement(h.TabRendererBase,{side:d.AI_CHAT_VIEW_ID,direction:"left-to-right",id:E.default.ai_chat_panel,className:(0,r.default)(w,`${d.AI_CHAT_VIEW_ID}-slot`),components:T,TabbarView:()=>o.default.createElement(g,null),TabpanelView:()=>o.default.createElement(a.BaseTabPanelView,{PanelView:a.ContainerView,PanelViewProps:{className:E.default.ai_chat_view_container}})});t.AIChatTabRenderer=l;const y=({className:w,components:T})=>o.default.createElement(h.TabRendererBase,{side:d.AI_CHAT_VIEW_ID,direction:"right-to-left",id:E.default.ai_chat_panel,className:(0,r.default)(w,`${d.AI_CHAT_VIEW_ID}-slot`,"design_right_slot"),components:T,TabbarView:()=>o.default.createElement(f.ChatTabbarRenderer2,null),TabpanelView:()=>o.default.createElement(a.BaseTabPanelView,{PanelView:a.ContainerView,PanelViewProps:{className:E.default.ai_chat_view_container}})});t.AIChatTabRendererWithTab=y;const b=({className:w,components:T})=>o.default.createElement(_.DesignLeftTabRenderer,{className:w,components:T,tabbarView:S});t.AILeftTabRenderer=b;const S=()=>{const w=(0,c.useInjectable)(s.IMainLayoutService),T=(0,c.useInjectable)(u.TabbarServiceFactory)(c.SlotLocation.right),D=(0,c.useAutorun)(T.currentContainerId),I=o.default.useMemo(()=>w.getExtraMenu(),[w]),[O]=(0,c.useContextMenus)(I),M=(0,o.useCallback)(({renderContainers:R})=>{const P=T.visibleContainers.filter(k=>{var F;return!(!((F=k.options)===null||F===void 0)&&F.hideTab)});return o.default.createElement(o.default.Fragment,null,P.length>0&&o.default.createElement(p.HorizontalVertical,{margin:"8px auto 0px",width:"60%"}),P.map(k=>R(k,T,D)))},[D,T]);return o.default.createElement(f.LeftTabbarRenderer,{renderOtherVisibleContainers:M,isRenderExtraTopMenus:!1,renderExtraMenus:o.default.createElement("div",{className:E.default.extra_bottom_icon_container},O.length>=0?O.map(R=>o.default.createElement(p.EnhanceIconWithCtxMenu,{key:R.id,id:R.id,wrapperClassName:E.default.extra_bottom_icon,iconClass:R.icon,menuNodes:R.children,skew:{x:-8,y:-4}})):null)})},A=({className:w,components:T})=>{const D=(0,c.useInjectable)(u.TabbarServiceFactory)(c.SlotLocation.right),I=(0,c.useInjectable)(v.DesignLayoutConfig),O=(0,o.useCallback)(()=>{D.updateCurrentContainerId("")},[]),M=(0,o.useCallback)(P=>{const{component:k}=P,{options:F}=k;return o.default.createElement(a.ContainerView,{...P,customTitleBar:o.default.createElement("div",{className:E.default.header},o.default.createElement("span",{className:E.default.title},F&&F.title),o.default.createElement("div",{className:E.default.side},o.default.createElement(p.EnhancePopover,{id:"ai_right_panel_header_close",title:(0,m.localize)("editor.title.context.close")},o.default.createElement(p.EnhanceIcon,{icon:"close",onClick:O})))),renderContainerWrap:({children:L})=>o.default.createElement("div",{className:E.default.right_slot_container_wrap},o.default.createElement("div",{className:E.default.container},L))})},[]),R=(0,o.useMemo)(()=>I.useMergeRightWithLeftPanel?E.default.right_tab_renderer:"",[I]);return o.default.createElement(_.DesignRightTabRenderer,{components:T,className:R,tabbarView:()=>o.default.createElement(f.RightTabbarRenderer,{barSize:0,style:{width:0}}),tabpanelView:()=>o.default.createElement(a.BaseTabPanelView,{PanelView:M})})};t.AIRightTabRenderer=A},82983:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AIChatLogoAvatar=void 0;const n=e(85608),r=n.__importDefault(e(14041)),o=e(41869),c=e(89195),p=e(63067),v=e(19413),m=n.__importDefault(e(88473)),_=()=>{const s=(0,o.useInjectable)(p.IMainLayoutService),f=r.default.useCallback(()=>{s.toggleSlot(v.AI_CHAT_VIEW_ID)},[s]);return r.default.createElement("div",{className:m.default.ai_switch,onClick:f},r.default.createElement(c.AILogoAvatar,{iconClassName:m.default.avatar_icon_large}))};t.AIChatLogoAvatar=_},73974:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BaseApplyService=void 0;const n=e(85608),r=e(41429),o=e(76003),c=e(41869),p=e(54414),v=e(57517),m=e(55126),_=e(20868),s=e(70392),f=e(2261),a=e(19413),h=e(59347),u=e(40111),d=e(15989);class E extends c.WithEventBus{constructor(){super(),this.onCodeBlockUpdateEmitter=new s.Emitter,this.onCodeBlockUpdate=this.onCodeBlockUpdateEmitter.event,this.activePreviewerMap=this.registerDispose(new s.DisposableMap),this.editorListenerMap=this.registerDispose(new s.DisposableMap),this.addDispose(this.chatInternalService.onCancelRequest(()=>{const l=this.chatInternalService.sessionModel.history.lastMessageId;if(!l)return;const y=this.getMessageCodeBlocks(l);y&&Object.values(y).forEach(b=>{this.cancelApply(b)})})),this.currentSessionId=this.chatInternalService.sessionModel.sessionId,this.addDispose(this.chatInternalService.onChangeSession(l=>{l!==this.currentSessionId&&(this.cancelAllApply(),this.currentSessionId=l)})),this.addDispose(this.chatInternalService.onRegenerateRequest(()=>{const l=this.chatInternalService.sessionModel.history.getMessages(),y=l[l.length-1].id,b=this.getMessageCodeBlocks(y);b&&Object.values(b).forEach(S=>{this.cancelApply(S)})})),this.addDispose(this.chatInternalService.onWillClearSession(l=>{this.cancelAllApply(l)}))}getMessageCodeBlocks(l,y){y=y||this.chatInternalService.sessionModel.sessionId;const b=this.chatInternalService.getSession(y);if(!b)throw new Error(`Session ${y} not found`);const S=b.history.getMessageAdditional(l);return S?.codeBlockMap}onEditorGroupClose(l){const y=s.path.relative(this.appConfig.workspaceDir,l.payload.resource.uri.path.toString());this.activePreviewerMap.get(y)&&this.activePreviewerMap.disposeKey(y),this.editorListenerMap.disposeKey(l.payload.resource.uri.toString())}async onEditorGroupOpen(l){var y;const b=s.path.relative(this.appConfig.workspaceDir,l.payload.resource.uri.path.toString());if(this.duringApply||this.activePreviewerMap.has(b)||!this.chatInternalService.sessionModel.history.getMessages().length)return;const S=((y=this.getUriCodeBlocks(l.payload.resource.uri))===null||y===void 0?void 0:y.filter(A=>A.status==="pending"))||[];if(S.length>0&&S[0].updatedCode){const A=l.payload.group.codeEditor.monacoEditor;this.renderApplyResult(A,S[0],S[0].updatedCode)}}get currentPreviewer(){var l;const y=(l=this.editorService.currentEditor)===null||l===void 0?void 0:l.currentUri;if(y)return this.activePreviewerMap.get(s.path.relative(this.appConfig.workspaceDir,y.path.toString()))}getUriCodeBlocks(l){const y=this.getSessionCodeBlocks(),b=s.path.relative(this.appConfig.workspaceDir,l.path.toString());return y.filter(S=>S.relativePath===b).sort((S,A)=>A.version-S.version)}getPendingPaths(l){return this.getSessionCodeBlocks(l).filter(b=>b.status==="pending").map(b=>b.relativePath)}getSessionCodeBlocks(l){l=l||this.chatInternalService.sessionModel.sessionId;const y=this.chatInternalService.getSession(l);if(!y)throw new Error(`Session ${l} not found`);const b=y.history.sessionAdditionals;return Array.from(b.values()).map(S=>S.codeBlockMap||{}).reduce((S,A)=>(Object.values(A).forEach(w=>{S.push(w)}),S),[])}getCodeBlock(l,y){if(y=y||this.chatInternalService.sessionModel.history.lastMessageId,!y)throw new Error("Message ID is required");const b=this.getMessageCodeBlocks(y);if(b)return b[l]}updateCodeBlock(l){const y=l.messageId,b=this.getMessageCodeBlocks(y);if(!b)throw new Error("Code block not found");b[l.toolCallId]=l,this.chatInternalService.sessionModel.history.setMessageAdditional(y,{codeBlockMap:b}),this.onCodeBlockUpdateEmitter.fire(l)}async registerCodeBlock(l,y,b,S){var A,w;const T=this.chatInternalService.sessionModel.history.lastMessageId,D=this.getUriCodeBlocks(s.URI.file(s.path.join(this.appConfig.workspaceDir,l))),I=await this.editorDocumentModelService.createModelReference(s.URI.file(s.path.join(this.appConfig.workspaceDir,l))),O={codeEdit:y,relativePath:l,status:"generating",iterationCount:1,version:1,createdAt:Date.now(),toolCallId:b,messageId:T,instructions:S,originalCode:I.instance.getText()};if(D?.length){O.version=D.length;for(const R of D)if(R.relativePath===l&&(!((w=(A=R.applyResult)===null||A===void 0?void 0:A.diagnosticInfos)===null||w===void 0)&&w.length))O.iterationCount++;else break}const M=this.getMessageCodeBlocks(T)||{};return M[b]=O,this.chatInternalService.sessionModel.history.setMessageAdditional(T,{codeBlockMap:M}),this.onCodeBlockUpdateEmitter.fire(O),O}async apply(l){try{if(this.duringApply=!0,l.iterationCount>3)throw new Error("Lint error max iteration count exceeded");const y=l.originalCode?await this.doApply(l):{result:l.codeEdit};if(!y.stream&&!y.result)throw new Error("No apply content provided");this.activePreviewerMap.has(l.relativePath)&&this.cancelApply(l,!0);const b=await this.editorService.open(s.URI.file(s.path.join(this.appConfig.workspaceDir,l.relativePath)));if(!b)throw new Error("Failed to open file");typeof y.result=="string"&&(l.updatedCode=y.result,l.status="pending",this.updateCodeBlock(l));const S=await this.renderApplyResult(b.group.codeEditor.monacoEditor,l,y.result||y.stream,y.range);return S&&(l.applyResult=S,this.updateCodeBlock(l)),l}catch(y){throw l.status="failed",this.updateCodeBlock(l),y}finally{this.duringApply=!1}}async renderApplyResult(l,y,b,S){var A,w;const T=new s.Deferred,D=d.InlineDiffController.get(l);if(S=S||l.getModel().getFullModelRange(),typeof b=="string"){const I=l.getModel().getValue(),O=s.URI.file(s.path.join(this.appConfig.workspaceDir,y.relativePath)),M=this.editorDocumentModelService.getModelReference(O);(I!==b||M?.instance.dirty)&&((A=l.getModel())===null||A===void 0||A.pushEditOperations([],[f.EditOperation.replace(S,b)],()=>null),await this.editorService.save(O));const R=(w=this.getUriCodeBlocks(O))===null||w===void 0?void 0:w.filter(j=>j.status==="pending"),P=R?.[R.length-1];if((P?.originalCode||y.originalCode)===b){y.status="cancelled",this.updateCodeBlock(y),T.resolve();return}const k=D.createDiffPreviewer(l,_.Selection.fromRange(S,_.SelectionDirection.LTR),{disposeWhenEditorClosed:!0,renderRemovedWidgetImmediately:!0,reverse:!0});this.activePreviewerMap.set(y.relativePath,k),k.setValue(P?.originalCode||y.originalCode||`
30304
30286
  `),this.eventBus.fire(new v.RegisterEditorSideComponentEvent),this.listenPartialEdit(l.getModel(),y).then(j=>{j&&(y.applyResult=j),this.updateCodeBlock(y),this.editorService.save(s.URI.file(s.path.join(this.appConfig.workspaceDir,y.relativePath)))});const{diff:F,rangesFromDiffHunk:L}=this.getDiffResult(y.originalCode,y.updatedCode||b,y.relativePath),N=this.getDiagnosticInfos(l.getModel().uri.toString(),L);T.resolve({diff:F,diagnosticInfos:N})}else{const I=new u.InlineChatController;I.mountReadable(b);const O=D.showPreviewerByStream(l,{crossSelection:_.Selection.fromRange(S,_.SelectionDirection.LTR),chatResponse:I,previewerOptions:{disposeWhenEditorClosed:!0,renderRemovedWidgetImmediately:!1}});this.addDispose(I.onError(M=>{T.reject(M)})),this.addDispose(I.onAbort(()=>{T.reject(new Error("Apply aborted"))})),this.addDispose(O.getNode().onDiffFinished(async M=>{if(y.updatedCode=M.newFullRangeTextLines.join(`
30305
30287
  `),y.updatedCode===y.originalCode){y.status="failed",this.updateCodeBlock(y),O.dispose(),T.reject(new Error("no changes applied"));return}y.status="pending",this.updateCodeBlock(y),O.dispose();const R=await this.renderApplyResult(l,y,y.updatedCode);T.resolve(R)})),this.activePreviewerMap.set(y.relativePath,O)}return T.promise}cancelApply(l,y){var b,S;(l.status==="generating"||l.status==="pending")&&(this.editorListenerMap.disposeKey(s.URI.file(s.path.join(this.appConfig.workspaceDir,l.relativePath)).toString()),this.activePreviewerMap.has(l.relativePath)&&((S=(b=this.activePreviewerMap.get(l.relativePath))===null||b===void 0?void 0:b.getNode())===null||S===void 0||S.livePreviewDiffDecorationModel.discardUnProcessed(),this.activePreviewerMap.disposeKey(l.relativePath)),y||(l.status="cancelled",this.updateCodeBlock(l)))}cancelAllApply(l){this.getSessionCodeBlocks(l).forEach(b=>{this.cancelApply(b)})}revealApplyPosition(l){var y;const b=(y=l.applyResult)===null||y===void 0?void 0:y.diff.split(`
30306
30288
  `).find(T=>T.startsWith("@@"));let S=0,A=0;if(b){const[,,,T,D]=b.match(/@@ -(\d+),(\d+) \+(\d+),(\d+) @@/);S=parseInt(T,10)-1,A=parseInt(D,10)-1}this.editorService.open(s.URI.file(s.path.join(this.appConfig.workspaceDir,l.relativePath)));const w=this.editorService.currentEditor;w&&w.setSelection(new _.Selection(S,0,A,0))}processAll(l,y){var b,S,A;const w=(b=this.getUriCodeBlocks(l))===null||b===void 0?void 0:b.filter(D=>D.status==="pending");if(!w?.length)throw new Error("No pending code block found");const T=(A=(S=this.activePreviewerMap.get(w[0].relativePath))===null||S===void 0?void 0:S.getNode())===null||A===void 0?void 0:A.livePreviewDiffDecorationModel;if(!T)throw new Error("No active previewer found");y==="accept"?T.acceptUnProcessed():T.discardUnProcessed(),this.editorService.save(l),w.forEach(D=>{D.status=y==="accept"?"success":"cancelled",this.updateCodeBlock(D)})}listenPartialEdit(l,y){const b=new s.Deferred,S=l.uri.toString(),A=this.inlineDiffService.onPartialEdit(w=>{if(w.totalPartialEditCount===w.resolvedPartialEditCount&&w.uri.path===l.uri.path.toString()){if(w.acceptPartialEditCount>0){y.status="success";const T=l.getValue(),{diff:D,rangesFromDiffHunk:I}=this.getDiffResult(y.originalCode,T,y.relativePath),O=this.getDiagnosticInfos(l.uri.toString(),I);this.aiReporter.send({msgType:c.AIServiceType.Chat,actionType:c.ActionTypeEnum.Accept,actionSource:c.ActionSourceEnum.Chat,sessionId:this.chatInternalService.sessionModel.sessionId,isReceive:!0,isDrop:!1,code:y.codeEdit,message:JSON.stringify({diff:D,diagnosticInfos:O})}),b.resolve({diff:D,diagnosticInfos:O})}else y.status="cancelled",b.resolve(),this.aiReporter.send({msgType:c.AIServiceType.Chat,actionType:c.ActionTypeEnum.Discard,actionSource:c.ActionSourceEnum.Chat,sessionId:this.chatInternalService.sessionModel.sessionId,isReceive:!1,isDrop:!0,code:y.codeEdit,originCode:y.originalCode});this.editorListenerMap.disposeKey(S)}});return this.editorListenerMap.set(S,A),b.promise}getDiffResult(l,y,b){const S=(0,r.createPatch)(b,l,y).split(`
30307
30289
  `).slice(4).join(`
30308
30290
  `),A=S.split(`
30309
- `).map(w=>{if(w.startsWith("@@")){const[,,,T,D]=w.match(/@@ -(\d+),(\d+) \+(\d+),(\d+) @@/);return new _.Range(parseInt(T,10),0,parseInt(D,10),0)}return null}).filter(w=>w!==null);return{diff:S,rangesFromDiffHunk:A}}getDiagnosticInfos(l,y){return this.markerService.getManager().getMarkers({resource:l}).filter(S=>S.severity>=c.MarkerSeverity.Warning&&y.some(A=>A.containsPosition(new _.Position(S.startLineNumber,S.startColumn))))}}t.BaseApplyService=E,n.__decorate([(0,o.Autowired)(a.IChatInternalService),n.__metadata("design:type",h.ChatInternalService)],E.prototype,"chatInternalService",void 0),n.__decorate([(0,o.Autowired)(c.AppConfig),n.__metadata("design:type",Object)],E.prototype,"appConfig",void 0),n.__decorate([(0,o.Autowired)(p.WorkbenchEditorService),n.__metadata("design:type",p.WorkbenchEditorService)],E.prototype,"editorService",void 0),n.__decorate([(0,o.Autowired)(d.InlineDiffService),n.__metadata("design:type",d.InlineDiffService)],E.prototype,"inlineDiffService",void 0),n.__decorate([(0,o.Autowired)(m.IMarkerService),n.__metadata("design:type",Object)],E.prototype,"markerService",void 0),n.__decorate([(0,o.Autowired)(v.IEditorDocumentModelService),n.__metadata("design:type",Object)],E.prototype,"editorDocumentModelService",void 0),n.__decorate([(0,o.Autowired)(c.IAIReporter),n.__metadata("design:type",Object)],E.prototype,"aiReporter",void 0),n.__decorate([(0,c.OnEvent)(v.EditorGroupCloseEvent),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[v.EditorGroupCloseEvent]),n.__metadata("design:returntype",void 0)],E.prototype,"onEditorGroupClose",null),n.__decorate([(0,c.OnEvent)(v.EditorGroupOpenEvent),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[v.EditorGroupOpenEvent]),n.__metadata("design:returntype",Promise)],E.prototype,"onEditorGroupOpen",null)},75279:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MCPConfigView=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importStar(e(14041)),c=e(97267),p=e(41869),v=e(78132),m=e(43718),_=e(25751),s=e(19413),f=e(69820),a=e(45331),h=n.__importDefault(e(76599)),u=e(51750),d=()=>{const E=(0,p.useInjectable)(a.MCPServerProxyService),g=(0,p.useInjectable)(v.PreferenceService),l=(0,p.useInjectable)(s.SumiMCPServerProxyServicePath),y=(0,p.useInjectable)(p.ILogger),b=(0,p.useInjectable)(_.IMessageService),[S,A]=o.default.useState([]),[w,T]=o.default.useState(!1),[D,I]=o.default.useState(),O=(0,o.useCallback)(async()=>{const N=await E.$getServers();A(N)},[E]);o.default.useEffect(()=>{O();const N=E.onChangeMCPServers(()=>{O()});return()=>{N.dispose()}},[]);const M=(0,o.useCallback)(async(N,j)=>{try{j?await E.$startServer(N):await E.$stopServer(N);const W=g.get(p.AINativeSettingSectionsId.MCPServers,[]);let U=W;N===s.BUILTIN_MCP_SERVER_NAME?!W.some(V=>V.name===s.BUILTIN_MCP_SERVER_NAME)&&!j?U=[...W,{name:s.BUILTIN_MCP_SERVER_NAME,enabled:!1,command:"",type:f.MCP_SERVER_TYPE.STDIO}]:U=W.map(V=>V.name===s.BUILTIN_MCP_SERVER_NAME?{...V,enabled:j}:V):U=W.map(X=>X.name===N?{...X,enabled:j}:X),await g.set(p.AINativeSettingSectionsId.MCPServers,U),await O()}catch(W){const U=W.message||W;y.error(`Failed to ${j?"start":"stop"} server ${N}:`,W),b.error(`Failed to ${j?"start":"stop"} server ${N}:`+U)}},[E,g,l,O]),R=(0,o.useCallback)(()=>{I(void 0),T(!0)},[D,w]),P=(0,o.useCallback)(N=>{const W=g.get(p.AINativeSettingSectionsId.MCPServers,[]).find(U=>U.name===N.name);W&&(I(W),T(!0))},[D,w]),k=(0,o.useCallback)(async N=>{const W=g.get(p.AINativeSettingSectionsId.MCPServers,[]).filter(U=>U.name!==N);l.removeServer(N),await g.set(p.AINativeSettingSectionsId.MCPServers,W),await O()},[D,w]),F=(0,o.useCallback)(async N=>{const j=g.get(p.AINativeSettingSectionsId.MCPServers,[]),W=j.findIndex(U=>U.name===N.name);W>=0?j[W]=N:j.push(N),A(j),T(!1),await l.addOrUpdateServer(N),await g.set(p.AINativeSettingSectionsId.MCPServers,j),await O()},[S,w,O]),L=(0,o.useCallback)(N=>{switch(N){case f.MCP_SERVER_TYPE.STDIO:return(0,m.localize)("ai.native.mcp.type.stdio");case f.MCP_SERVER_TYPE.SSE:return(0,m.localize)("ai.native.mcp.type.sse");case f.MCP_SERVER_TYPE.BUILTIN:return(0,m.localize)("ai.native.mcp.type.builtin");default:return N}},[]);return o.default.createElement("div",{className:h.default.container},o.default.createElement("div",{className:h.default.header},o.default.createElement("div",null,o.default.createElement("h2",{className:h.default.title},"MCP Servers"),o.default.createElement("p",{className:h.default.description},"Manage your MCP server connections.")),o.default.createElement("button",{className:h.default.addButton,onClick:R},"+ Add new MCP server")),o.default.createElement("div",{className:h.default.serversList},S.map(N=>o.default.createElement("div",{key:N.name,className:h.default.serverItem},o.default.createElement("div",{className:h.default.serverHeader},o.default.createElement("div",{className:h.default.serverTitleRow},o.default.createElement("h3",{className:h.default.serverName},N.name)),o.default.createElement("div",{className:h.default.serverActions},N.name!==s.BUILTIN_MCP_SERVER_NAME&&o.default.createElement("button",{className:h.default.iconButton,title:"Edit",onClick:()=>P(N)},o.default.createElement("i",{className:"codicon codicon-edit"})),o.default.createElement("button",{className:h.default.iconButton,title:N.isStarted?"Stop":"Start",onClick:()=>M(N.name,!N.isStarted)},o.default.createElement("i",{className:`codicon ${N.isStarted?"codicon-debug-stop":"codicon-debug-start"}`})),N.name!==s.BUILTIN_MCP_SERVER_NAME&&o.default.createElement("button",{className:h.default.iconButton,title:"Delete",onClick:()=>k(N.name)},o.default.createElement("i",{className:"codicon codicon-trash"})))),o.default.createElement("div",{className:h.default.serverDetail},o.default.createElement("div",{className:h.default.detailRow},o.default.createElement("span",{className:h.default.detailLabel},"Status:"),o.default.createElement("span",{className:`${h.default.serverStatus} ${N.isStarted?h.default.running:h.default.stopped}`},N.isStarted?"Running":"Stopped")),N.type&&o.default.createElement("div",{className:h.default.detailRow},o.default.createElement("span",{className:h.default.detailLabel},"Type:"),o.default.createElement(c.Badge,{className:(0,r.default)(h.default.serverType,h.default.typeTag)},L(N.type)))),N.tools&&N.tools.length>0&&o.default.createElement("div",{className:h.default.serverDetail},o.default.createElement("div",{className:h.default.detailRow},o.default.createElement("span",{className:h.default.detailLabel},"Tools:"),o.default.createElement("span",{className:h.default.detailContent},N.tools.map((j,W)=>o.default.createElement("span",{key:W,className:h.default.toolTag},j))))),N.command&&o.default.createElement("div",{className:h.default.serverDetail},o.default.createElement("div",{className:h.default.detailRow},o.default.createElement("span",{className:h.default.detailLabel},"Command:"),o.default.createElement("span",{className:h.default.detailContent},N.command))),N.serverHost&&o.default.createElement("div",{className:h.default.serverDetail},o.default.createElement("div",{className:h.default.detailRow},o.default.createElement("span",{className:h.default.detailLabel},"Server Link:"),o.default.createElement("span",{className:(0,r.default)(h.default.detailContent,h.default.link)},N.serverHost)))))),o.default.createElement(u.MCPServerForm,{visible:w,initialData:D,servers:S,onSave:F,onCancel:()=>T(!1)}))};t.MCPConfigView=d},51750:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MCPServerForm=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importStar(e(14041)),c=e(97267),p=e(48412),v=e(53017),m=e(41869),_=e(43718),s=e(72665),f=e(69820),a=n.__importDefault(e(83761)),h=({visible:u,initialData:d,onSave:E,onCancel:g,servers:l})=>{const[y,b]=(0,o.useState)(()=>({name:"",command:"",args:[],env:{},type:f.MCP_SERVER_TYPE.STDIO,...d})),S=(0,m.useInjectable)(s.IMessageService),[A,w]=(0,o.useState)(()=>{var N;return((N=d?.args)===null||N===void 0?void 0:N.join(" "))||""}),[T,D]=(0,o.useState)(()=>d?.env?Object.entries(d.env).map(([N,j])=>`${N}=${j}`).join(`
30291
+ `).map(w=>{if(w.startsWith("@@")){const[,,,T,D]=w.match(/@@ -(\d+),(\d+) \+(\d+),(\d+) @@/);return new _.Range(parseInt(T,10),0,parseInt(T,10)+parseInt(D,10)-1,0)}return null}).filter(w=>w!==null);return{diff:S,rangesFromDiffHunk:A}}getDiagnosticInfos(l,y){return this.markerService.getManager().getMarkers({resource:l}).filter(S=>S.severity>=c.MarkerSeverity.Warning&&y.some(A=>A.containsPosition(new _.Position(S.startLineNumber,S.startColumn))))}}t.BaseApplyService=E,n.__decorate([(0,o.Autowired)(a.IChatInternalService),n.__metadata("design:type",h.ChatInternalService)],E.prototype,"chatInternalService",void 0),n.__decorate([(0,o.Autowired)(c.AppConfig),n.__metadata("design:type",Object)],E.prototype,"appConfig",void 0),n.__decorate([(0,o.Autowired)(p.WorkbenchEditorService),n.__metadata("design:type",p.WorkbenchEditorService)],E.prototype,"editorService",void 0),n.__decorate([(0,o.Autowired)(d.InlineDiffService),n.__metadata("design:type",d.InlineDiffService)],E.prototype,"inlineDiffService",void 0),n.__decorate([(0,o.Autowired)(m.IMarkerService),n.__metadata("design:type",Object)],E.prototype,"markerService",void 0),n.__decorate([(0,o.Autowired)(v.IEditorDocumentModelService),n.__metadata("design:type",Object)],E.prototype,"editorDocumentModelService",void 0),n.__decorate([(0,o.Autowired)(c.IAIReporter),n.__metadata("design:type",Object)],E.prototype,"aiReporter",void 0),n.__decorate([(0,c.OnEvent)(v.EditorGroupCloseEvent),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[v.EditorGroupCloseEvent]),n.__metadata("design:returntype",void 0)],E.prototype,"onEditorGroupClose",null),n.__decorate([(0,c.OnEvent)(v.EditorGroupOpenEvent),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[v.EditorGroupOpenEvent]),n.__metadata("design:returntype",Promise)],E.prototype,"onEditorGroupOpen",null)},75279:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MCPConfigView=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importStar(e(14041)),c=e(97267),p=e(41869),v=e(78132),m=e(43718),_=e(19413),s=e(69820),f=e(45331),a=n.__importDefault(e(76599)),h=e(51750),u=()=>{const d=(0,p.useInjectable)(f.MCPServerProxyService),E=(0,p.useInjectable)(v.PreferenceService),g=(0,p.useInjectable)(_.SumiMCPServerProxyServicePath),l=(0,p.useInjectable)(p.ILogger),[y,b]=o.default.useState([]),[S,A]=o.default.useState(!1),[w,T]=o.default.useState(),D=(0,o.useCallback)(async()=>{const F=await d.$getServers();b(F)},[d]);o.default.useEffect(()=>{D();const F=d.onChangeMCPServers(()=>{D()});return()=>{F.dispose()}},[]);const I=(0,o.useCallback)(async(F,L)=>{try{L?await d.$startServer(F):await d.$stopServer(F);const N=E.get(p.AINativeSettingSectionsId.MCPServers,[]);let j=N;F===_.BUILTIN_MCP_SERVER_NAME?!N.some(U=>U.name===_.BUILTIN_MCP_SERVER_NAME)&&!L?j=[...N,{name:_.BUILTIN_MCP_SERVER_NAME,enabled:!1,command:"",type:s.MCP_SERVER_TYPE.STDIO}]:j=N.map(U=>U.name===_.BUILTIN_MCP_SERVER_NAME?{...U,enabled:L}:U):j=N.map(W=>W.name===F?{...W,enabled:L}:W),await E.set(p.AINativeSettingSectionsId.MCPServers,j),await D()}catch(N){l.error(`Failed to ${L?"start":"stop"} server ${F}:`,N)}},[d,E,g,D]),O=(0,o.useCallback)(()=>{T(void 0),A(!0)},[w,S]),M=(0,o.useCallback)(F=>{const N=E.get(p.AINativeSettingSectionsId.MCPServers,[]).find(j=>j.name===F.name);N&&(T(N),A(!0))},[w,S]),R=(0,o.useCallback)(async F=>{const N=E.get(p.AINativeSettingSectionsId.MCPServers,[]).filter(j=>j.name!==F);g.removeServer(F),await E.set(p.AINativeSettingSectionsId.MCPServers,N),await D()},[w,S]),P=(0,o.useCallback)(async F=>{const L=E.get(p.AINativeSettingSectionsId.MCPServers,[]),N=L.findIndex(j=>j.name===F.name);N>=0?L[N]=F:L.push(F),b(L),A(!1),await g.addOrUpdateServer(F),await E.set(p.AINativeSettingSectionsId.MCPServers,L),await D()},[y,S,D]),k=(0,o.useCallback)(F=>{switch(F){case s.MCP_SERVER_TYPE.STDIO:return(0,m.localize)("ai.native.mcp.type.stdio");case s.MCP_SERVER_TYPE.SSE:return(0,m.localize)("ai.native.mcp.type.sse");case s.MCP_SERVER_TYPE.BUILTIN:return(0,m.localize)("ai.native.mcp.type.builtin");default:return F}},[]);return o.default.createElement("div",{className:a.default.container},o.default.createElement("div",{className:a.default.header},o.default.createElement("div",null,o.default.createElement("h2",{className:a.default.title},"MCP Servers"),o.default.createElement("p",{className:a.default.description},"Manage your MCP server connections.")),o.default.createElement("button",{className:a.default.addButton,onClick:O},"+ Add new MCP server")),o.default.createElement("div",{className:a.default.serversList},y.map(F=>o.default.createElement("div",{key:F.name,className:a.default.serverItem},o.default.createElement("div",{className:a.default.serverHeader},o.default.createElement("div",{className:a.default.serverTitleRow},o.default.createElement("h3",{className:a.default.serverName},F.name)),o.default.createElement("div",{className:a.default.serverActions},F.name!==_.BUILTIN_MCP_SERVER_NAME&&o.default.createElement("button",{className:a.default.iconButton,title:"Edit",onClick:()=>M(F)},o.default.createElement("i",{className:"codicon codicon-edit"})),o.default.createElement("button",{className:a.default.iconButton,title:F.isStarted?"Stop":"Start",onClick:()=>I(F.name,!F.isStarted)},o.default.createElement("i",{className:`codicon ${F.isStarted?"codicon-debug-stop":"codicon-debug-start"}`})),F.name!==_.BUILTIN_MCP_SERVER_NAME&&o.default.createElement("button",{className:a.default.iconButton,title:"Delete",onClick:()=>R(F.name)},o.default.createElement("i",{className:"codicon codicon-trash"})))),o.default.createElement("div",{className:a.default.serverDetail},o.default.createElement("div",{className:a.default.detailRow},o.default.createElement("span",{className:a.default.detailLabel},"Status:"),o.default.createElement("span",{className:`${a.default.serverStatus} ${F.isStarted?a.default.running:a.default.stopped}`},F.isStarted?"Running":"Stopped")),F.type&&o.default.createElement("div",{className:a.default.detailRow},o.default.createElement("span",{className:a.default.detailLabel},"Type:"),o.default.createElement(c.Badge,{className:(0,r.default)(a.default.serverType,a.default.typeTag)},k(F.type)))),F.tools&&F.tools.length>0&&o.default.createElement("div",{className:a.default.serverDetail},o.default.createElement("div",{className:a.default.detailRow},o.default.createElement("span",{className:a.default.detailLabel},"Tools:"),o.default.createElement("span",{className:a.default.detailContent},F.tools.map((L,N)=>o.default.createElement("span",{key:N,className:a.default.toolTag},L))))),F.command&&o.default.createElement("div",{className:a.default.serverDetail},o.default.createElement("div",{className:a.default.detailRow},o.default.createElement("span",{className:a.default.detailLabel},"Command:"),o.default.createElement("span",{className:a.default.detailContent},F.command))),F.serverHost&&o.default.createElement("div",{className:a.default.serverDetail},o.default.createElement("div",{className:a.default.detailRow},o.default.createElement("span",{className:a.default.detailLabel},"Server Link:"),o.default.createElement("span",{className:(0,r.default)(a.default.detailContent,a.default.link)},F.serverHost)))))),o.default.createElement(h.MCPServerForm,{visible:S,initialData:w,servers:y,onSave:P,onCancel:()=>A(!1)}))};t.MCPConfigView=u},51750:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MCPServerForm=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importStar(e(14041)),c=e(97267),p=e(48412),v=e(53017),m=e(41869),_=e(43718),s=e(72665),f=e(69820),a=n.__importDefault(e(83761)),h=({visible:u,initialData:d,onSave:E,onCancel:g,servers:l})=>{const[y,b]=(0,o.useState)(()=>({name:"",command:"",args:[],env:{},type:f.MCP_SERVER_TYPE.STDIO,...d})),S=(0,m.useInjectable)(s.IMessageService),[A,w]=(0,o.useState)(()=>{var N;return((N=d?.args)===null||N===void 0?void 0:N.join(" "))||""}),[T,D]=(0,o.useState)(()=>d?.env?Object.entries(d.env).map(([N,j])=>`${N}=${j}`).join(`
30310
30292
  `):"");(0,o.useEffect)(()=>{var N;b({name:"",command:"",args:[],env:{},type:f.MCP_SERVER_TYPE.STDIO,...d}),w(((N=d?.args)===null||N===void 0?void 0:N.join(" "))||""),D(d?.env?Object.entries(d.env).map(([j,W])=>`${j}=${W}`).join(`
30311
30293
  `):"")},[d]);const I=N=>{var j;if(N.preventDefault(),!L(y))return;const U={...y};if(y.type===f.MCP_SERVER_TYPE.SSE)U.serverHost=(j=U.serverHost)===null||j===void 0?void 0:j.trim();else{const X=A.split(" ").filter(Boolean),V=T.split(`
30312
30294
  `).filter(Boolean).reduce(($,Y)=>{const[G,H]=Y.split("=");return G&&H&&($[G.trim()]=H.trim()),$},{});U.args=X,U.env=V}E(U)},O=(0,o.useCallback)(N=>{b({...y,command:N.target.value})},[y,A]),M=(0,o.useCallback)(N=>{w(N.target.value)},[A]),R=(0,o.useCallback)(N=>{D(N.target.value)},[T]),P=(0,o.useCallback)(N=>{b({...y,serverHost:N.target.value})},[y]),k=(0,o.useCallback)(N=>{b({...y,type:N})},[y]),F=(0,o.useCallback)(()=>y?.type===f.MCP_SERVER_TYPE.STDIO?o.default.createElement(o.default.Fragment,null,o.default.createElement("div",{className:a.default.formItem},o.default.createElement("label",null,(0,_.localize)("ai.native.mcp.command")),o.default.createElement("input",{type:"text",value:y.command,onChange:O,placeholder:(0,_.localize)("ai.native.mcp.command.placeHolder"),required:!0})),o.default.createElement("div",{className:a.default.formItem},o.default.createElement("label",null,(0,_.localize)("ai.native.mcp.args")),o.default.createElement("textarea",{value:A,onChange:M,placeholder:(0,_.localize)("ai.native.mcp.args.placeHolder"),rows:3})),o.default.createElement("div",{className:a.default.formItem},o.default.createElement("label",null,(0,_.localize)("ai.native.mcp.env")),o.default.createElement("textarea",{value:T,onChange:R,placeholder:(0,_.localize)("ai.native.mcp.env.placeHolder"),rows:3}))):o.default.createElement(o.default.Fragment,null,o.default.createElement("div",{className:a.default.formItem},o.default.createElement("label",null,(0,_.localize)("ai.native.mcp.serverHost")),o.default.createElement("textarea",{value:y.serverHost,onChange:P,placeholder:(0,_.localize)("ai.native.mcp.serverHost.placeHolder"),rows:3}))),[y,A,T]),L=(0,o.useCallback)(N=>{var j,W;if(N.name.trim()==="")return S.error((0,_.localize)("ai.native.mcp.name.isRequired")),!1;if(l.some(X=>X.name.toLocaleLowerCase()===N.name.toLocaleLowerCase()))return S.error((0,_.formatLocalize)("ai.native.mcp.serverNameExists",N.name)),!1;if(N.type===f.MCP_SERVER_TYPE.SSE){const X=((j=N.serverHost)===null||j===void 0?void 0:j.trim())!=="";return X||S.error((0,_.localize)("ai.native.mcp.serverHost.isRequired")),X}const U=((W=N.command)===null||W===void 0?void 0:W.trim())!=="";return U||S.error((0,_.localize)("ai.native.mcp.command.isRequired")),U},[l]);return o.default.createElement(v.Modal,{title:d?(0,_.localize)("ai.native.mcp.editMCPServer.title"):(0,_.localize)("ai.native.mcp.addMCPServer.title"),visible:u,onCancel:g,centered:!0,width:600,footer:null,style:{background:"var(--editor-background)"}},o.default.createElement("form",{className:a.default.form,onSubmit:N=>N.preventDefault()},o.default.createElement("div",{className:a.default.formRow},o.default.createElement("div",{className:(0,r.default)(a.default.formItem,a.default.formItemName)},o.default.createElement("label",null,(0,_.localize)("ai.native.mcp.name")),o.default.createElement("input",{type:"text",value:y.name,onChange:N=>b({...y,name:N.target.value}),placeholder:(0,_.localize)("ai.native.mcp.name.placeHolder"),required:!0})),o.default.createElement("div",{className:(0,r.default)(a.default.formItem,a.default.formItemType)},o.default.createElement("label",null,(0,_.localize)("ai.native.mcp.type")),o.default.createElement(c.Select,{size:"large",value:y.type,options:[{label:(0,_.localize)("ai.native.mcp.stdio"),value:f.MCP_SERVER_TYPE.STDIO},{label:(0,_.localize)("ai.native.mcp.sse"),value:f.MCP_SERVER_TYPE.SSE}],className:a.default.formItemSelect,onChange:k}))),F(),o.default.createElement("div",{className:a.default.formActions},o.default.createElement(p.Button,{onClick:g,type:"ghost"},(0,_.localize)("ai.native.mcp.buttonCancel")),o.default.createElement(p.Button,{onClick:I,type:"primary"},d?(0,_.localize)("ai.native.mcp.buttonUpdate"):(0,_.localize)("ai.native.mcp.buttonSave")))))};t.MCPServerForm=h},27397:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MCPConfigCommandContribution=t.OPEN_MCP_CONFIG_COMMAND=void 0;const n=e(85608),r=e(76003),o=e(41869),c=e(43718),p=e(54414),v=e(5297);t.OPEN_MCP_CONFIG_COMMAND={id:"opensumi-mcp.openConfig",label:"Open MCP Configuration"};let m=class{registerCommands(s){s.registerCommand(t.OPEN_MCP_CONFIG_COMMAND,{execute:()=>{const f=new o.URI().withScheme(v.MCP_CONFIG_COMPONENTS_SCHEME_ID);this.editorService.open(f,{preview:!1,focus:!0})}})}};t.MCPConfigCommandContribution=m,n.__decorate([(0,r.Autowired)(p.WorkbenchEditorService),n.__metadata("design:type",p.WorkbenchEditorService)],m.prototype,"editorService",void 0),t.MCPConfigCommandContribution=m=n.__decorate([(0,c.Domain)(o.CommandContribution)],m)},5297:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MCPConfigContribution=t.MCP_CONFIG_COMPONENTS_SCHEME_ID=void 0;const n=e(85608),r=e(76003),o=e(26542),c=e(43718),p=e(82196),v=e(7443),m=e(10560),_=e(75279),s="opensumi-mcp-config-viewer";t.MCP_CONFIG_COMPONENTS_SCHEME_ID="mcp-config";let f=class{registerEditorComponent(h){h.registerEditorComponent({uid:s,scheme:t.MCP_CONFIG_COMPONENTS_SCHEME_ID,component:_.MCPConfigView,renderMode:p.EditorComponentRenderMode.ONE_PER_WORKBENCH}),h.registerEditorComponentResolver(t.MCP_CONFIG_COMPONENTS_SCHEME_ID,(u,d)=>{d.push({type:"component",componentId:s})})}registerResource(h){h.registerResourceProvider({scheme:t.MCP_CONFIG_COMPONENTS_SCHEME_ID,provideResource:async u=>{const{configType:d}=u.getParsedQuery();return{uri:u,name:"MCP Configuration",icon:"settings",metadata:{configType:d}}}})}};t.MCPConfigContribution=f,n.__decorate([(0,r.Autowired)(m.IWorkspaceService),n.__metadata("design:type",Object)],f.prototype,"workspaceService",void 0),n.__decorate([(0,r.Autowired)(v.IconService),n.__metadata("design:type",v.IconService)],f.prototype,"iconService",void 0),n.__decorate([(0,r.Autowired)(),n.__metadata("design:type",o.LabelService)],f.prototype,"labelService",void 0),t.MCPConfigContribution=f=n.__decorate([(0,c.Domain)(p.BrowserEditorContribution)],f)},45331:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MCPServerProxyService=void 0;const n=e(85608),r=e(48085),o=e(76003),c=e(41869),p=e(43718),v=e(19413),m=e(77633);let _=class{constructor(){this._onChangeMCPServers=new p.Emitter,this.onChangeMCPServers=this._onChangeMCPServers.event}$callMCPTool(f,a){return this.mcpServerRegistry.callMCPTool(f,a)}async $getBuiltinMCPTools(){const f=await this.mcpServerRegistry.getMCPTools().map(a=>({name:a.name,description:a.description,inputSchema:(0,r.zodToJsonSchema)(a.inputSchema),providerName:v.BUILTIN_MCP_SERVER_NAME}));return this.logger.log("SUMI MCP tools",f),f}async $updateMCPServers(){this._onChangeMCPServers.fire("update")}async getAllMCPTools(){return this.sumiMCPServerProxyService.getAllMCPTools()}async $getServers(){return this.sumiMCPServerProxyService.getServers()}async $startServer(f){await this.sumiMCPServerProxyService.startServer(f)}async $stopServer(f){await this.sumiMCPServerProxyService.stopServer(f)}};t.MCPServerProxyService=_,n.__decorate([(0,o.Autowired)(m.TokenMCPServerRegistry),n.__metadata("design:type",Object)],_.prototype,"mcpServerRegistry",void 0),n.__decorate([(0,o.Autowired)(c.ILogger),n.__metadata("design:type",Object)],_.prototype,"logger",void 0),n.__decorate([(0,o.Autowired)(v.SumiMCPServerProxyServicePath),n.__metadata("design:type",Object)],_.prototype,"sumiMCPServerProxyService",void 0),t.MCPServerProxyService=_=n.__decorate([(0,o.Injectable)()],_)},79502:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MCPServerRegistry=void 0;const n=e(85608),r=e(76003),o=e(43718),c=e(19413),p=e(98864);class v{constructor(s){this.logger=s}appendLine(s){this.logger.log(s)}}let m=class{constructor(){this.tools=[],this.toolComponents={}}get logger(){return new v(this.baseLogger)}set activeMessageInfo(s){this._activeMessageInfo=s}getMCPTool(s,f=c.BUILTIN_MCP_SERVER_NAME){return this.tools.find(a=>(0,p.getToolName)(a.name,f)===s)}registerMCPTool(s){this.tools.push(s)}registerToolComponent(s,f,a=c.BUILTIN_MCP_SERVER_NAME){this.toolComponents[(0,p.getToolName)(s,a)]=f}getToolComponent(s){return this.toolComponents[s]}getMCPTools(){return this.tools}async callMCPTool(s,f){try{const a=this.tools.find(d=>d.name===s);if(!a)throw new Error(`MCP tool ${s} not found`);const h=f.toolCallId;f=a.inputSchema.parse(f);const u=await a.handler({...f,toolCallId:h},this.logger);return this.reportToolCall(s,f,u,h),u}catch(a){return console.error("callMCPTool error:",a),this.reportToolCall(s,f,a,f.toolCallId),{content:[{type:"text",text:`The tool ${s} failed to execute. Error: ${a}`}],isError:!0}}}reportToolCall(s,f,a,h){if(!this.tools.find(d=>d.name===s))throw new Error(`MCP tool ${s} not found`);this.aiReporter.send({msgType:o.AIServiceType.ToolCall,message:JSON.stringify({args:f,name:s,result:a}),messageId:this._activeMessageInfo.messageId,sessionId:this._activeMessageInfo.sessionId,relationId:h})}};t.MCPServerRegistry=m,n.__decorate([(0,r.Autowired)(o.ILogger),n.__metadata("design:type",Object)],m.prototype,"baseLogger",void 0),n.__decorate([(0,r.Autowired)(o.IAIReporter),n.__metadata("design:type",Object)],m.prototype,"aiReporter",void 0),t.MCPServerRegistry=m=n.__decorate([(0,r.Injectable)()],m)},30703:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MCPToolsDialog=void 0;const n=e(85608),r=n.__importStar(e(14041)),o=n.__importDefault(e(49783)),c=({tools:p})=>r.createElement("div",{className:o.default.mcp_tools_dialog},r.createElement("div",{className:o.default.dialog_title},"MCP Tools"),r.createElement("div",{className:o.default.tools_list},p.map(v=>r.createElement("div",{key:v.name,className:o.default.tool_item},r.createElement("div",{className:o.default.tool_name},v.name),r.createElement("div",{className:o.default.tool_description},v.description),v.providerName&&r.createElement("div",{className:o.default.tool_provider},"Provider: ",v.providerName)))));t.MCPToolsDialog=c},58260:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EditFileToolComponent=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importStar(e(14041)),c=e(97267),p=e(41869),v=e(89195),m=e(54414),_=e(14162),s=e(87822),f=e(16781),a=e(56474),h=e(73974),u=n.__importDefault(e(51601)),d=g=>{var l,y,b;const{args:S,messageId:A,toolCallId:w}=g,[T,D]=(0,o.useState)("code"),I=(0,p.useInjectable)(p.LabelService),O=(0,p.useInjectable)(p.AppConfig),M=(0,p.useInjectable)(h.BaseApplyService),R=(0,p.useInjectable)(m.WorkbenchEditorService),{target_file:P="",code_edit:k,instructions:F}=S||{},L=p.path.join(O.workspaceDir,P),[N,j]=(0,o.useState)(M.getCodeBlock(w,A)),W=(0,o.useMemo)(()=>P?`file-icon ${I.getIcon(p.URI.file(L))}`:void 0,[P,L]),U=(0,o.useMemo)(()=>{if(!P)return;const V=f.StandaloneServices.get(s.IModelService),$=f.StandaloneServices.get(_.ILanguageService);return(0,p.detectModeId)(V,$,p.Uri.file(L))},[P,L]);(0,o.useEffect)(()=>{const V=M.onCodeBlockUpdate($=>{$.toolCallId===w&&j({...$})});return()=>{V.dispose()}},[]);const X=V=>{V.stopPropagation(),D(T==="code"?"diff":"code")};return!S||!N?null:[F&&o.default.createElement("p",null,F),o.default.createElement("div",{className:u.default["edit-file-tool"],key:"edit-file-tool"},o.default.createElement("div",{className:(0,r.default)(u.default["edit-file-tool-header"],{clickable:N.status==="pending"||N.status==="success"}),onClick:()=>{N.status==="pending"?R.open(p.URI.file(L)):N.status==="success"&&M.revealApplyPosition(N)}},o.default.createElement("div",{className:u.default.left},W&&o.default.createElement("span",{className:W}),o.default.createElement("span",{className:u.default["edit-file-tool-file-name"]},P),N.iterationCount>1&&o.default.createElement("span",{className:u.default["edit-file-tool-iteration-count"]},N.iterationCount,"/3"),E(N,g.result)),o.default.createElement("div",{className:u.default.right},o.default.createElement(c.Popover,{title:"Show Code",id:"edit-file-tool-show-code"},o.default.createElement(c.Icon,{iconClass:"codicon codicon-file-code",onClick:X})),((l=N.applyResult)===null||l===void 0?void 0:l.diff)&&o.default.createElement(c.Popover,{title:"Show Diff",id:"edit-file-tool-show-diff"},o.default.createElement(c.Icon,{iconClass:"codicon codicon-diff-multiple",onClick:X})))),o.default.createElement(a.ChatMarkdown,{markdown:T==="code"?`\`\`\`${U||""}
@@ -30355,7 +30337,7 @@ ${R.reduce((P,k)=>P.find(F=>F.line===k.line)?P:[...P,k],[]).map(P=>`Line: ${P.li
30355
30337
  Content: ${P.lineText||P.renderLineText}`).join(`
30356
30338
  `)}`),I.push({uri:M,isDirectory:!1});w.resolve(D.join(`
30357
30339
 
30358
- `));const O=this.chatInternalService.sessionModel.history.getMessages();this.chatInternalService.sessionModel.history.setMessageAdditional(O[O.length-1].id,{[g.toolCallId]:{files:I}})}),{content:[{type:"text",text:await w.promise}]}}};t.GrepSearchTool=d,n.__decorate([(0,o.Autowired)(m.IWorkspaceService),n.__metadata("design:type",Object)],d.prototype,"workspaceService",void 0),n.__decorate([(0,o.Autowired)(p.IContentSearchClientService),n.__metadata("design:type",v.ContentSearchClientService)],d.prototype,"searchService",void 0),n.__decorate([(0,o.Autowired)(_.IChatInternalService),n.__metadata("design:type",s.ChatInternalService)],d.prototype,"chatInternalService",void 0),t.GrepSearchTool=d=n.__decorate([(0,c.Domain)(f.MCPServerContribution)],d)},9343:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EditFileHandler=void 0;const n=e(85608),r=e(76003),o=e(73974);let c=class{async handler(v,m){const{targetFile:_,codeEdit:s}=v,f=await this.applyService.registerCodeBlock(_,s,m);return await this.applyService.apply(f)}};t.EditFileHandler=c,n.__decorate([(0,r.Autowired)(o.BaseApplyService),n.__metadata("design:type",o.BaseApplyService)],c.prototype,"applyService",void 0),t.EditFileHandler=c=n.__decorate([(0,r.Injectable)()],c)},64942:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ListDirHandler=void 0;const n=e(85608),r=e(76003),o=e(41869),c=e(14951);class p{constructor(_){this.maxConcurrent=_,this.currentCount=0,this.pendingQueue=[]}async execute(_){this.currentCount>=this.maxConcurrent&&await new Promise(s=>this.pendingQueue.push(s)),this.currentCount++;try{return await _()}finally{if(this.currentCount--,this.pendingQueue.length>0){const s=this.pendingQueue.shift();s?.()}}}}let v=class{constructor(){this.MAX_FILE_SIZE=1024*1024,this.MAX_INDEXED_FILES=50}getWorkspaceDir(){return this.appConfig.workspaceDir}async handler(_){var s,f;const{relativeWorkspacePath:a}=_;if(!a)throw new Error("No list dir parameters provided. Need to give at least the path.");const h=`${this.appConfig.workspaceDir}/${a}`,u=await this.fileSystemService.getFileStat(h,!0);if(!u||!u.isDirectory)throw new Error(`Could not find file ${a} in the workspace.`);const d=((s=u.children)===null||s===void 0?void 0:s.filter(y=>!y.isDirectory&&y.size!==void 0&&y.size<=this.MAX_FILE_SIZE).slice(0,this.MAX_INDEXED_FILES))||[],E=new Set(d.map(y=>new o.URI(y.uri).displayName)),g=new p(4);return{files:await Promise.all(((f=u.children)===null||f===void 0?void 0:f.sort((y,b)=>b.lastModification-y.lastModification).map(async y=>{var b;const S=new o.URI(y.uri),A=`${h}/${S.displayName}`;let w;return E.has(S.displayName)&&(w=await g.execute(async()=>this.countFileLines(A))),{name:S.displayName,isDirectory:y.isDirectory,size:y.size,lastModified:y.lastModification,numChildren:(b=y.children)===null||b===void 0?void 0:b.length,numLines:w}}))||[]),directoryRelativeWorkspacePath:a}}async countFileLines(_){return(await this.fileSystemService.readFile(o.URI.file(_).toString())).toString().split(`
30340
+ `));const O=this.chatInternalService.sessionModel.history.getMessages();this.chatInternalService.sessionModel.history.setMessageAdditional(O[O.length-1].id,{[g.toolCallId]:{files:I}})}),{content:[{type:"text",text:await w.promise}]}}};t.GrepSearchTool=d,n.__decorate([(0,o.Autowired)(m.IWorkspaceService),n.__metadata("design:type",Object)],d.prototype,"workspaceService",void 0),n.__decorate([(0,o.Autowired)(p.IContentSearchClientService),n.__metadata("design:type",v.ContentSearchClientService)],d.prototype,"searchService",void 0),n.__decorate([(0,o.Autowired)(_.IChatInternalService),n.__metadata("design:type",s.ChatInternalService)],d.prototype,"chatInternalService",void 0),t.GrepSearchTool=d=n.__decorate([(0,c.Domain)(f.MCPServerContribution)],d)},9343:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EditFileHandler=void 0;const n=e(85608),r=e(76003),o=e(73974);let c=class{async handler(v,m){const{targetFile:_,codeEdit:s,instructions:f}=v,a=await this.applyService.registerCodeBlock(_,s,m,f);return await this.applyService.apply(a)}};t.EditFileHandler=c,n.__decorate([(0,r.Autowired)(o.BaseApplyService),n.__metadata("design:type",o.BaseApplyService)],c.prototype,"applyService",void 0),t.EditFileHandler=c=n.__decorate([(0,r.Injectable)()],c)},64942:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ListDirHandler=void 0;const n=e(85608),r=e(76003),o=e(41869),c=e(14951);class p{constructor(_){this.maxConcurrent=_,this.currentCount=0,this.pendingQueue=[]}async execute(_){this.currentCount>=this.maxConcurrent&&await new Promise(s=>this.pendingQueue.push(s)),this.currentCount++;try{return await _()}finally{if(this.currentCount--,this.pendingQueue.length>0){const s=this.pendingQueue.shift();s?.()}}}}let v=class{constructor(){this.MAX_FILE_SIZE=1024*1024,this.MAX_INDEXED_FILES=50}getWorkspaceDir(){return this.appConfig.workspaceDir}async handler(_){var s,f;const{relativeWorkspacePath:a}=_;if(!a)throw new Error("No list dir parameters provided. Need to give at least the path.");const h=`${this.appConfig.workspaceDir}/${a}`,u=await this.fileSystemService.getFileStat(h,!0);if(!u||!u.isDirectory)throw new Error(`Could not find file ${a} in the workspace.`);const d=((s=u.children)===null||s===void 0?void 0:s.filter(y=>!y.isDirectory&&y.size!==void 0&&y.size<=this.MAX_FILE_SIZE).slice(0,this.MAX_INDEXED_FILES))||[],E=new Set(d.map(y=>new o.URI(y.uri).displayName)),g=new p(4);return{files:await Promise.all(((f=u.children)===null||f===void 0?void 0:f.sort((y,b)=>b.lastModification-y.lastModification).map(async y=>{var b;const S=new o.URI(y.uri),A=`${h}/${S.displayName}`;let w;return E.has(S.displayName)&&(w=await g.execute(async()=>this.countFileLines(A))),{name:S.displayName,isDirectory:y.isDirectory,size:y.size,lastModified:y.lastModification,numChildren:(b=y.children)===null||b===void 0?void 0:b.length,numLines:w}}))||[]),directoryRelativeWorkspacePath:a}}async countFileLines(_){return(await this.fileSystemService.readFile(o.URI.file(_).toString())).toString().split(`
30359
30341
  `).length}};t.ListDirHandler=v,n.__decorate([(0,r.Autowired)(o.AppConfig),n.__metadata("design:type",Object)],v.prototype,"appConfig",void 0),n.__decorate([(0,r.Autowired)(c.IFileServiceClient),n.__metadata("design:type",Object)],v.prototype,"fileSystemService",void 0),t.ListDirHandler=v=n.__decorate([(0,r.Injectable)()],v)},707:(x,t,e)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.FileHandler=void 0;const r=e(85608),o=e(76003),c=e(79240),p=e(41869),v=e(43718),m=e(57517),_=e(14951);let s=n=class{constructor(){this.fileResultMap=new Map}async findSimilarFiles(a,h){return(await this.fileSearchQuickCommandHandler.getQueryFiles(a,new Set,v.CancellationToken.None)).slice(0,h).map(d=>{var E;return(E=d.getUri())===null||E===void 0?void 0:E.codeUri.fsPath}).filter(Boolean)}createFileNotFoundError(a,h){const u=h.length>0?`Could not find file '${a}'. Did you mean one of:
30360
30342
  ${h.map(d=>`- ${d}`).join(`
30361
30343
  `)}`:`Could not find file '${a}' in the workspace.`;return new Error(JSON.stringify({clientVisibleErrorMessage:u,modelVisibleErrorMessage:u,actualErrorMessage:`File not found: ${a}`}))}createFileTooLargeError(a,h){return new Error(JSON.stringify({clientVisibleErrorMessage:`File is too large, >${a}MB`,modelVisibleErrorMessage:`The file is too large to read, was >${a}MB`,actualErrorMessage:`File is too large to read, was >${a}MB, size: ${h} bytes`}))}trimContent(a,h){return a.slice(0,h).split(n.NEWLINE).slice(0,-1).join(n.NEWLINE)}getLineRange(a,h){var u,d;let E=(u=a.startLineOneIndexed)!==null&&u!==void 0?u:1,g=(d=a.endLineOneIndexedInclusive)!==null&&d!==void 0?d:E+n.MAX_LINES-1,l=!1,y=!1;return h?{start:E,end:g,didShorten:l,didSetDefault:y}:(a.endLineOneIndexedInclusive===void 0||a.startLineOneIndexed===void 0?(E=1,g=n.MAX_LINES,y=!0):a.endLineOneIndexedInclusive-a.startLineOneIndexed>n.MAX_LINES&&(g=a.startLineOneIndexed+n.MAX_LINES,l=!0),{start:E,end:g,didShorten:l,didSetDefault:y})}async readFile(a){if(!a)throw new Error("No read file parameters provided. Need to give at least the path.");const h=new v.URI(`${this.appConfig.workspaceDir}/${a.relativeWorkspacePath}`);if(!h){const g=await this.findSimilarFiles(a.relativeWorkspacePath,3);throw this.createFileNotFoundError(a.relativeWorkspacePath,g)}const u=(n.MAX_FILE_SIZE_BYTES/1e6).toFixed(2),d=await this.fileSystemService.getFileStat(h.toString());if(d?.size&&d.size>n.MAX_FILE_SIZE_BYTES)throw this.createFileTooLargeError(u,d.size);let E;try{E=await this.modelService.createModelReference(h);const g=E.instance.getMonacoModel().getValue(),l=g.split(n.NEWLINE),y=!(a.readEntireFile&&a.fileIsAllowedToBeReadEntirely),b=a.readEntireFile&&!a.fileIsAllowedToBeReadEntirely;let S=!1;if(y){const{start:w,end:T,didShorten:D,didSetDefault:I}=this.getLineRange(a,b),O=Math.max(w,1),M=Math.min(T,l.length);let R=l.slice(O-1,M).join(n.NEWLINE);return R.length>n.MAX_CHARS&&(S=!0,R=this.trimContent(R,n.MAX_CHARS)),D&&this.fileResultMap.set(a.relativeWorkspacePath,{content:R,startLineOneIndexed:O,endLineOneIndexedInclusive:M}),{contents:R,didDowngradeToLineRange:b,didShortenLineRange:D,didShortenCharRange:S,didSetDefaultLineRange:I,fullFileContents:g,startLineOneIndexed:O,endLineOneIndexedInclusive:M,relativeWorkspacePath:a.relativeWorkspacePath}}let A=g;return A.length>n.MAX_CHARS&&(S=!0,A=this.trimContent(A,n.MAX_CHARS)),{contents:A,fullFileContents:g,didDowngradeToLineRange:!1,didShortenCharRange:S}}finally{E?.dispose()}}getFileReadResult(a){return this.fileResultMap.get(a)}};t.FileHandler=s,s.MAX_FILE_SIZE_BYTES=2e6,s.MAX_LINES=250,s.MAX_CHARS=1e5,s.NEWLINE=`
@@ -30448,7 +30430,7 @@ img {
30448
30430
  a {
30449
30431
  color: var(--textLink-foreground);
30450
30432
  }
30451
- `},73136:(x,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:(x,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)),c=e(41869),p=e(53711),v=n.__importDefault(e(65887)),m=({item:_,defaultLeftPadding:s=8,leftPadding:f=8,decorations:a,onClick:h,onTwistierClick:u})=>{const d=(0,c.useDesignStyles)(v.default.expansion_toggle,"expansion_toggle"),E=(0,o.useCallback)(I=>{_.onSelect?_.onSelect(_):h(I,_)},[h]),g=(0,o.useCallback)(I=>{u(I,_)},[u]),l=`${s+(_.depth||0)*(f||0)+(p.CommentContentNode.is(_)?16:p.CommentFileNode.is(_)?0:28)}px`,y={height:t.COMMENT_TREE_NODE_HEIGHT,lineHeight:`${t.COMMENT_TREE_NODE_HEIGHT}px`,paddingLeft:l},b=(0,o.useCallback)(I=>{if(p.CommentContentNode.is(I)||p.CommentFileNode.is(I))return o.default.createElement("div",{className:(0,r.default)(v.default.icon,I.icon),style:{height:t.COMMENT_TREE_NODE_HEIGHT,lineHeight:`${t.COMMENT_TREE_NODE_HEIGHT}px`}})},[]),S=(0,o.useCallback)(I=>p.CommentContentNode.is(I)?o.default.createElement("div",{className:(0,r.default)(v.default.segment,v.default.displayname)},I.renderedLabel?I.renderedLabel:o.default.createElement(o.default.Fragment,null,I.comment,o.default.createElement("span",{className:v.default.separator},"\xB7"),I.author.name)):o.default.createElement("div",{className:(0,r.default)(v.default.segment,v.default.displayname)},I.renderedLabel),[]),A=(0,o.useCallback)(I=>o.default.createElement("div",{className:(0,r.default)(v.default.segment_grow,v.default.description)},I.renderedDescription),[]),w=(0,o.useCallback)(I=>o.default.createElement("div",{onClick:g,className:(0,r.default)(v.default.segment,d,(0,c.getIcon)("arrow-right"),{[`${v.default.mod_collapsed}`]:!I.expanded})}),[g]),T=(0,o.useCallback)(I=>{if(p.CommentFileNode.is(I)||I?.isAllowToggle)return w(I)},[]),D=(0,o.useCallback)(()=>_.tooltip,[_]);return o.default.createElement("div",{key:_.id,onClick:E,title:D(),className:(0,r.default)(v.default.comment_node,a?a.classlist:null),style:y,"data-id":_.id},o.default.createElement("div",{className:v.default.content},T(_),b(_),o.default.createElement("div",{className:v.default.overflow_wrap},S(_),A(_))))};t.CommentNodeRendered=m,t.COMMENT_TREE_NODE_HEIGHT=22},47842:(x,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),c=e(41869),p=e(23418),v=e(69635),m=e(53711),_=n.__importDefault(e(65887));let s=class extends o.TreeModel{constructor(h){super(),this.init(h)}};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 f=class extends c.Disposable{constructor(){super(),this.selectedDecoration=new o.Decoration(_.default.mod_selected),this.focusedDecoration=new o.Decoration(_.default.mod_focused),this._selectedNodes=[],this.onDidUpdateTreeModelEmitter=new c.Emitter,this.disposableCollection=new c.DisposableCollection,this.applyFocusedDecoration=(h,u=!0)=>{var d;if(h){for(const E of this._selectedNodes)this.selectedDecoration.removeTarget(E);this.focusedNode&&this.focusedDecoration.removeTarget(this.focusedNode),this.selectedDecoration.addTarget(h),this.focusedDecoration.addTarget(h),this._focusedNode=h,this._selectedNodes=[h],u&&((d=this.treeModel)===null||d===void 0||d.dispatchChange())}},this.removeFocusedDecoration=()=>{var h;this.focusedNode&&(this.focusedDecoration.removeTarget(this.focusedNode),(h=this.treeModel)===null||h===void 0||h.dispatchChange()),this._focusedNode=null},this.handleTreeBlur=()=>{this.removeFocusedDecoration()},this.handleTwistierClick=async(h,u)=>{(m.CommentFileNode.is(u)||u?.isAllowToggle)&&this.toggleDirectory(u)},this.handleItemClick=async(h,u)=>{this.applyFocusedDecoration(u),(m.CommentFileNode.is(u)||u?.isAllowToggle)&&this.toggleDirectory(u);let d,E;u instanceof m.CommentReplyNode||u instanceof m.CommentContentNode?(d=u.thread.uri,E=u.thread.range):d=u.resource,this.editorService.open(d,{range:E}).then(()=>{u.thread&&u.thread.show()})},this.toggleDirectory=h=>{h.expanded?this.commentTreeHandle.collapseNode(h):this.commentTreeHandle.expandNode(h)},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 h=await this.commentService.resolveChildren();if(!h)return;const u=h[0];u&&(this._treeModel=this.injector.get(s,[u]),await this._treeModel.ensureReady,this.initDecorations(u),this.disposables.push(c.Event.any(this.commentService.onThreadsCommentChange,this.commentService.onThreadsChanged,this.commentService.onThreadsCreated)(()=>{this.refresh()})),this.onDidUpdateTreeModelEmitter.fire(this._treeModel))}initDecorations(h){return this._decorations=new o.DecorationsManager(h),this._decorations.addDecoration(this.selectedDecoration),this._decorations.addDecoration(this.focusedDecoration),this._decorations}handleTreeHandler(h){this._commentTreeHandle=h}async refresh(){await this.whenReady,(0,c.runWhenIdle)(()=>{this.treeModel.root.refresh()})}async collapsedAll(){return await this.whenReady,this.treeModel.root.collapsedAll()}dispose(){this.disposableCollection.dispose()}};t.CommentModelService=f,n.__decorate([(0,r.Autowired)(v.ICommentsService),n.__metadata("design:type",Object)],f.prototype,"commentService",void 0),n.__decorate([(0,r.Autowired)(r.INJECTOR_TOKEN),n.__metadata("design:type",r.Injector)],f.prototype,"injector",void 0),n.__decorate([(0,r.Autowired)(p.WorkbenchEditorService),n.__metadata("design:type",p.WorkbenchEditorService)],f.prototype,"editorService",void 0),t.CommentModelService=f=n.__decorate([(0,r.Injectable)(),n.__metadata("design:paramtypes",[])],f)},53711:(x,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,_,s="",f,a,h,u){super(m,u),this.threads=_,this.tooltip=f,this.icon=a,this.resource=h,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 c extends n.CompositeTreeNode{static is(m){return n.CompositeTreeNode.is(m)&&"author"in m}constructor(m,_,s,f="",a,h,u,d){super(m,d),this.thread=_,this.comment=s,this.icon=a,this.author=h,this.resource=u,this._renderedDescription=f,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=c;class p extends n.TreeNode{constructor(m,_,s,f="",a,h,u){super(m,u),this.thread=_,this.icon=a,this.resource=h,this._renderedLabel=s,this._renderedDescription=f}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=p},69635:(x,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 c;(function(m){m.Thread="thread",m.Empty="empty"})(c||(t.CommentGutterType=c={})),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 p extends n.BasicEvent{}t.CommentPanelCollapse=p;class v extends n.BasicEvent{}t.CommentReactionClick=v},86077:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),e(85608).__exportStar(e(69635),t)},79383:(x,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 c=({className:p,children:v,...m})=>o.default.createElement("span",{className:(0,r.default)("kt-badge",p),...m},v);t.Badge=c},48412:(x,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)),c=e(99613),p=e(54713);e(71682);const v=()=>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:_,loading:s,className:f,type:a="primary",htmlType:h,size:u,ghost:d=!1,onClick:E,disabled:g,block:l,iconClass:y,icon:b,more:S,moreIconClass:A,menu:w,moreVisible:T,placement:D,title:I,onVisibleChange:O,...M})=>{const R=(0,r.default)("kt-button",f,{[`kt-${a}-button-loading`]:s,[`ghost-${a}-button`]:d&&!s&&a!=="link",[`${a}-button`]:a,[`${u}-button-size`]:u,"ghost-button":d&&a!=="link","block-button":l}),P=(0,r.default)(f,{"kt-clickable-icon":!!E});if(a==="icon")return o.default.createElement(p.Icon,{tooltip:I,disabled:g,icon:b,onClick:s||g?m:E,className:P,iconClass:y,...M});const k=y?o.default.createElement(p.Icon,{iconClass:y,disabled:g}):null;return w?o.default.createElement(c.Dropdown,{visible:T,className:"kt-menu",overlay:w,trigger:["click"],onVisibleChange:O,placement:D},o.default.createElement("button",{...M,disabled:g,className:R,type:h,onClick:s||g?m:E},s&&a!=="link"&&o.default.createElement(v,null),k&&k,_,S&&o.default.createElement(p.Icon,{iconClass:A||(0,p.getIcon)("down"),className:"kt-button-secondary-more"}))):o.default.createElement("button",{...M,disabled:g,className:R,type:h,onClick:s||g?m:E},s&&a!=="link"&&o.default.createElement(v,null),k&&k,_)})},7273:(x,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)),c=e(65973);e(6099);const p=()=>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"})),v=({insertClass:m,className:_,label:s,size:f="default",disabled:a,checked:h,wrapTabIndex:u,...d})=>{(0,c.warning)(!m,"`insertClass` was deprecated, please use `className` instead");const E=d;return E.checked=h??!1,o.default.createElement("label",{className:(0,r.default)("kt-checkbox",m,_,{"kt-checkbox-large":f==="large","kt-checkbox-disabled":a}),tabIndex:u},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(p,null))),s||" ")};t.CheckBox=v,t.CheckBox.displayName="OpenSumiCheckBox"},58998:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ClickOutside=void 0;const r=e(85608).__importDefault(e(14041)),o=({mouseEvents:c=["click"],onOutsideClick:p,children:v,...m})=>{const _=r.default.useRef(null),s=r.default.useCallback(f=>{_.current&&f.target&&!_.current.contains(f.target)&&p(f)},[p]);return r.default.useEffect(()=>(c.forEach(f=>{window.addEventListener(f,s,!0)}),()=>{c.forEach(f=>{window.removeEventListener(f,s,!0)})}),[c]),r.default.createElement("div",{...m,ref:_},v)};t.ClickOutside=o},50570:(x,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:(x,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)),c=e(43718),p=e(48412),v=e(50570),m=e(54713),_=e(79024);e(65773);const s=({onCancel:h,onOk:u,cancelText:d,okText:E})=>o.default.createElement(o.default.Fragment,null,o.default.createElement(p.Button,{onClick:h,type:"secondary"},d||(0,c.localize)("ButtonCancel")),o.default.createElement(p.Button,{onClick:u},E||(0,c.localize)("ButtonOK"))),f=({onClose:h,closable:u,type:d="confirm",messageType:E=v.MessageType.Info,icon:g,message:l,buttons:y,title:b,onOk:S,onCancel:A,okText:w,cancelText:T})=>{const{getIcon:D}=o.default.useContext(m.IconContext);return o.default.createElement(o.default.Fragment,null,o.default.createElement("div",{className:"kt-dialog-content"},g&&o.default.createElement("div",{style:{color:g.color},className:(0,r.default)("kt-dialog-icon",(0,m.getIcon)(g.className)||D(g.className))}),o.default.createElement("div",{className:"kt-dialog-content_area"},o.default.createElement("div",{className:"kt-dialog-content_title"},b),l&&o.default.createElement("span",{className:"kt-dialog-message"},l)),u&&d!=="basic"&&o.default.createElement("button",{className:(0,r.default)("kt-dialog-closex",(0,m.getIcon)("close")),onClick:h})),E!==v.MessageType.Empty&&d!=="basic"&&o.default.createElement("div",{className:"kt-dialog-buttonWrap"},d==="confirm"?y||o.default.createElement(s,{onCancel:A,onOk:S,okText:w,cancelText:T}):o.default.createElement(p.Button,{onClick:h},"OK")))};t.DialogContent=f;const a=({visible:h,onClose:u,closable:d,afterClose:E,messageType:g,icon:l,message:y,detail:b,buttons:S,type:A="confirm",title:w,onOk:T,onCancel:D,okText:I,cancelText:O,getContainer:M,keyboard:R,...P})=>o.default.createElement(_.Overlay,{visible:h,onClose:u,title:A==="basic"?w:null,closable:A==="basic",getContainer:M,keyboard:R,footer:A==="basic"?S||o.default.createElement(s,{onCancel:D,onOk:T,okText:I,cancelText:O}):void 0,afterClose:E,...P},o.default.createElement(t.DialogContent,{title:y,message:b,buttons:S,visible:h,icon:l,...P}));t.Dialog=a},99665:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608),r=n.__importDefault(e(62596)),o=n.__importDefault(e(53373)),c=n.__importStar(e(14041)),p=e(48412),v=n.__importDefault(e(35060)),m=_=>{var s;const{prefixCls:f,type:a="primary",size:h="default",danger:u,disabled:d,loading:E,onClick:g,htmlType:l,children:y,className:b,overlay:S,trigger:A,align:w,visible:T,onVisibleChange:D,placement:I,getPopupContainer:O,href:M,icon:R=c.createElement(r.default,null),title:P,buttonsRender:k=H=>H,mouseEnterDelay:F,mouseLeaveDelay:L,overlayClassName:N,overlayStyle:j,...W}=_,U=f||"kt-dropdown-button",X={align:w,overlay:S,disabled:d,trigger:d?[]:A,getPopupContainer:O,mouseEnterDelay:F,mouseLeaveDelay:L,overlayClassName:N,overlayStyle:j};X.placement=(s=_?.placement)!==null&&s!==void 0?s:"bottomRight";const V=c.createElement(p.Button,{size:h,type:a,disabled:d,loading:E,onClick:g,htmlType:l,title:P},y),$=c.createElement(p.Button,{size:h,type:a},R??c.createElement(r.default,null)),[Y,G]=k([V,$]);return c.createElement("div",{...W,className:(0,o.default)(U,b)},Y,c.createElement(v.default,{...X},G))};t.default=m},35060:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608),r=n.__importDefault(e(64797)),o=n.__importDefault(e(53373)),c=n.__importDefault(e(5147)),p=n.__importDefault(e(14041)),v=e(43953),m=e(65973),_=(0,v.tuple)("topLeft","topCenter","topRight","bottomLeft","bottomCenter","bottomRight");class s extends p.default.Component{constructor(){super(...arguments),this.renderOverlay=a=>{const{overlay:h}=this.props;let u;typeof h=="function"?u=h():u=h,u=p.default.Children.only(u);const d=u.props;(0,m.warning)(!d.mode||d.mode==="vertical",`[Dropdown] mode="${d.mode}" is not supported for Dropdown's Menu.`);const{selectable:E=!1,focusable:g=!0}=d,l=p.default.createElement("span",{className:`${a}-menu-submenu-arrow`},p.default.createElement(r.default,{className:`${a}-menu-submenu-arrow-icon`}));return typeof u.type=="string"?h:p.default.cloneElement(u,{mode:"vertical",selectable:E,focusable:g,expandIcon:l})},this.renderDropDown=()=>{const{prefixCls:a,children:h,trigger:u,disabled:d,getPopupContainer:E}=this.props,g=a||"kt-dropdown",l=p.default.Children.only(h),y=p.default.cloneElement(l,{className:(0,o.default)(l.props.className,`${g}-trigger`),disabled:d}),b=d?[]:u;let S;return b&&b.indexOf("contextMenu")!==-1&&(S=!0),p.default.createElement(c.default,{alignPoint:S,...this.props,prefixCls:g,getPopupContainer:E,transitionName:this.getTransitionName(),trigger:b,overlay:()=>this.renderOverlay(g)},y)}}getTransitionName(){const{placement:a="",transitionName:h}=this.props;return h!==void 0?h:a.indexOf("top")>=0?"slide-down":"slide-up"}render(){return this.renderDropDown()}}s.defaultProps={mouseEnterDelay:.15,mouseLeaveDelay:.1,placement:"bottomLeft"},t.default=s},99613:(x,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:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Icon=t._InternalIcon=t.IconContext=void 0,t.IconContextProvider=v;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importDefault(e(14041)),c=e(12122),p=e(76577);e(1914),t.IconContext=o.default.createContext({getIcon:(_,s)=>_});function v(_){return o.default.createElement(t.IconContext.Provider,{value:_.value},o.default.createElement(t.IconContext.Consumer,null,s=>_.value===s?_.children:null))}const m=function(_,s){const{size:f="small",loading:a,icon:h,iconClass:u,className:d,tooltip:E,rotate:g,anim:l,fill:y,disabled:b,onClick:S,children:A,resourceOptions:w,animate:T,style:D={},...I}=_,O={rotate:g,anim:l,fill:y};let M;if(h)if(c.defaultIconMap[h])M=(0,p.getIcon)(h,O);else{const{getIcon:R,getResourceIcon:P}=o.default.useContext(t.IconContext);w&&P?M=P(h,w):M=R(h,O)}else M=u;return T&&T==="spin"&&(D.animation="kt-icon-spin 1.5s steps(30) infinite"),o.default.createElement("span",{...I,title:E,onClick:S,ref:s,className:(0,r.default)("kt-icon",M,d,{"kt-icon-loading":a,"kt-icon-disabled":!!b,[`kt-icon-${f}`]:!!f,"kt-icon-clickable":!!S,"kt-icon-resource":!!w,expanded:!!w&&w.isOpenedDirectory}),style:D},A)};t._InternalIcon=o.default.memo(o.default.forwardRef(m)),t.Icon=o.default.memo(o.default.forwardRef(m))},10391:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createFromIconfontCN=f;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importDefault(e(14041)),c=e(80564),p=e(76577),v=new Set;function m(a){return!!(typeof a=="string"&&a.length&&!v.has(a))}function _(a,h=0){const u=a[h];if(m(u)){const d=document.createElement("script");d.setAttribute("src",u),d.setAttribute("data-namespace",u),a.length>h+1&&(d.onload=()=>{_(a,h+1)},d.onerror=()=>{_(a,h+1)}),v.add(u),document.body.appendChild(d)}}const s={width:"1em",height:"1em",fill:"currentColor"};function f(a={}){const{scriptUrl:h,extraCommonProps:u={}}=a;h&&typeof document<"u"&&typeof window<"u"&&typeof document.createElement=="function"&&(Array.isArray(h)?_(h.reverse()):_([h]));const d=o.default.forwardRef((E,g)=>{const{icon:l,children:y,rotate:b,anim:S,fill:A,className:w="",...T}=E,D={rotate:b,anim:S,fill:A};let I=null;l&&(I=o.default.createElement("svg",{...s,focusable:"false"},o.default.createElement("use",{xlinkHref:`#${l}`}))),y&&(I=y);const O=(0,p.getIconShapeClxList)(D);return o.default.createElement(c._InternalIcon,{...u,...T,className:(0,r.default)(w,O),ref:g},I)});return d.displayName="Iconfont",d}},12122:(x,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 c={"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"},p=Object.assign({},o.defaultIconfont,c);t.defaultIconMap=new Proxy(p,{get(_,s){const f=c[s];return(0,r.default)(!f,`Icon '${s}' was a typo, please use '${f}' instead`),_[s]}});class v{constructor(){this._ktIconPrefixes=[],this._iconMap={}}update(s,f){this._iconMap[s]=f,this._ktIconPrefixes.push(s)}getIconClx(s){if(!s)return(0,r.default)(!1,"not a valid icon key:"+s),[];let f=this._ktIconPrefixes.length;for(;!this._iconMap[this._ktIconPrefixes[--f]][s]&&f!==0;);const a=this._iconMap[this._ktIconPrefixes[f]][s];return a?[`${this._ktIconPrefixes[f]}${a}`]:((0,r.default)(!1,"No icon found for "+s),[])}}t.iconManager=new v,t.iconManager.update("kaitian-icon kticon-",t.defaultIconMap)},81139:(x,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","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-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","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","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",run:"run",rust:"rust","save-all":"save-all",scm:"scm",search:"search",send:"send","send-hollow":"send-hollow","send-solid":"send-solid",setting:"setting",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"}},54713:(x,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:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.updateKaitianIconMap=t.getKaitianIcon=t.ANIM_TYPE=t.ROTATE_TYPE=void 0,t.updateIconMap=v,t.getIconShapeClxList=m,t.getIcon=_;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 c=["rotate-90","rotate-180","rotate-270","flip-horizontal","flip-vertical","flip-both"],p=["spin","pulse"];function v(s,f){n.iconManager.update(s,f)}function m(s){const{rotate:f,anim:a,fill:h}=s||{},u=[];return f!==void 0&&u.push(`iconfont-${c[f]}`),a!==void 0&&u.push(`iconfont-anim-${p[a]}`),h&&u.push("toggled"),u}function _(s,f){const a=n.iconManager.getIconClx(s),h=m(f);return a.push(...h),a.join(" ")}t.getKaitianIcon=_,t.updateKaitianIconMap=v},97267:(x,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(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:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HistoryInputBox=void 0;const r=e(85608).__importDefault(e(14041)),o=e(54114),c=e(63924);class p 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 _=this.getNextValue();_&&(_=_===m?this.getNextValue():_),_&&this.onValueChange(_)},this.showPreviousValue=()=>{const m=this.getCurrentValue()||"";this.history&&!this.history.has(m)&&this.addToHistory(m);let _=this.getPreviousValue();_&&(_=_===m?this.getPreviousValue():_),_&&this.onValueChange(_)},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:_}=this.props;this.setState({inputValue:m}),_&&_(m)},this.onKeyDown=m=>{const{onKeyDown:_}=this.props;_&&_(m)},this.focus=()=>{this.inputRef&&this.inputRef.current&&this.inputRef.current.focus()}}componentDidMount(){var m;const{history:_,onReady:s}=this.props;this.history=new o.HistoryNavigator(_||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(c.Input,{ref:this.inputRef,...this.inputProps,onValueChange:this.onValueChange,onKeyDown:this.onKeyDown,value:m})}}t.HistoryInputBox=p},63924:(x,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)),c=e(54713),p=n.__importDefault(e(65973));e(41065);function v(_){return typeof _>"u"}function m(_,s,f){if(typeof f=="function"){let a=s;if(s.type==="click"){a=Object.create(s),a.target=_,a.currentTarget=_;const h=_.value;_.value="",f(a),_.value=h;return}f(a)}}t.Input=o.default.forwardRef((_,s)=>{const{defaultValue:f,className:a,wrapperStyle:h,size:u="default",controls:d,onChange:E,selection:g,addonBefore:l,addonAfter:y,persistFocus:b=!0,hasClear:S,afterClear:A,value:w,onValueChange:T,onPressEnter:D,onKeyDown:I,as:O="input",...M}=_;(0,p.default)(!d,"[@opensumi/ide-components Input]: `controls` was deprecated, please use `addonAfter` instead");const R=o.default.useRef(null),[P,k]=o.default.useState(!1),[F,L]=o.default.useState(()=>(w??f)||""),[N,j]=o.default.useState(()=>(w??f)||"");o.default.useImperativeHandle(s,()=>R.current),o.default.useEffect(()=>{g&&!v(g.start)&&!P&&R.current.setSelectionRange(g.start,g.end)},[g,P]),o.default.useEffect(()=>{w===null||typeof w>"u"||(w!==N&&w!==F&&L(w),w!==N&&j(w))},[w]);const W=K=>{X(K.target.value),m(R.current,K,E)},U=K=>{K.preventDefault(),X(""),m(R.current,K,E),typeof A=="function"&&A()},X=K=>{L(K),typeof T=="function"&&T(K),P||k(!0)},V=K=>{K.keyCode===13&&typeof D=="function"&&D(K),typeof I=="function"&&I(K)},$=y||d,Y=b?{onMouseDown:K=>{K.preventDefault()}}:{},G=(K,Z)=>K?o.default.createElement("div",{className:(0,r.default)("kt-input-addon",Z),...Y},o.default.Children.map(K,Q=>o.default.isValidElement(Q)?o.default.cloneElement(Q,Y):null)):null,H=(0,r.default)("kt-input",a,{[`kt-input-${u}`]:u,"kt-input-disabled":_.disabled});return o.default.createElement("div",{className:H,style:h},G(l,"kt-input-addon-before"),o.default.createElement("div",{className:"kt-input-box"},o.default.createElement(O,{ref:R,type:"text",autoCapitalize:"off",autoCorrect:"off",autoComplete:"off",spellCheck:!1,...M,value:F,onChange:W,onKeyDown:V}),S&&F&&o.default.createElement(c.Icon,{className:"kt-input-clear",icon:"close-circle-fill",onClick:U,...Y})),G($,"kt-input-addon-after"))}),t.Input.displayName="OpenSumiInput"},64545:(x,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)),c=n.__importDefault(e(14041));e(41065),e(17107);const p="kt-input-number",v=m=>{const{value:_,size:s="default",wrapperStyle:f,className:a,disabled:h,min:u,max:d,onChange:E,...g}=m,l=b=>{E&&E(b)},y=(0,r.default)("kt-input","kt-input-number",a,{[`kt-input-${s}`]:s,"kt-input-disabled":h});return c.default.createElement("div",{className:y,style:f},c.default.createElement("div",{className:"kt-input-box"},c.default.createElement(o.default,{prefixCls:p,min:u,max:d,value:_,type:"number",onChange:l,controls:!0,...g})))};t.InputNumber=v,t.InputNumber.displayName="OpenSumiInputNumber"},10413:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bindInputElement=v;const r=e(85608).__importDefault(e(14041)),o=e(63924);class c extends r.default.Component{constructor(){super(...arguments),this.placeholderInputRef=r.default.createRef()}render(){const _={...this.props};return delete _.inputElement,delete _.innerRef,r.default.createElement(o.Input,{..._,type:"text",id:this.props.id,ref:this.placeholderInputRef})}componentDidMount(){const{innerRef:_,inputElement:s}=this.props;this.placeholderInputRef.current.parentElement.replaceChild(s,this.placeholderInputRef.current),this.applyAttributes(),s.focus(),typeof _=="function"?_(s):_!==null&&typeof _=="object"&&_.current===null&&(_.current=s)}UNSAFE_componentWillUnmount(){const{innerRef:_,inputElement:s}=this.props;s.parentElement.replaceChild(this.placeholderInputRef.current,s),_!==null&&typeof _=="object"&&_.current&&(_.current=null)}shouldComponentUpdate(_){return this.applyAttributes(_),!1}applyAttributes(_=this.props){const{className:s,id:f,inputElement:a,style:h}=_;if(typeof s=="string"&&(a.className=s),typeof f=="string"&&(a.id=f),h!==null&&typeof h=="object")for(const u in h)typeof h[u]=="string"&&a[u]&&(a[u]=h[u])}}const p=r.default.forwardRef((m,_)=>r.default.createElement(c,{...m,innerRef:_}));function v(m){return _=>r.default.createElement(p,{..._,inputElement:m})}},61172:(x,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((c,p)=>r.default.createElement(o.Input,{...c,as:"textarea",ref:p})),t.TextArea.displayName="OpenSumiTextArea"},34390:(x,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)),c=e(63924);e(13254);var p;(function(v){v[v.INFO=1]="INFO",v[v.ERROR=2]="ERROR",v[v.WARNING=3]="WARNING",v[v.IGNORE=4]="IGNORE"})(p||(t.VALIDATE_TYPE=p={})),t.ValidateInput=o.default.forwardRef(({type:v,className:m,validate:_,onChange:s,onValueChange:f,validateMessage:a,popup:h=!0,...u},d)=>{const[E,g]=o.default.useState();o.default.useEffect(()=>{g(a)},[a]);const l=(0,r.default)({"validate-error":E&&E.type===p.ERROR,"validate-warning":E&&E.type===p.WARNING,"validate-info":E&&E.type===p.INFO}),y=()=>{if(E&&E.message)return o.default.createElement("div",{className:(0,r.default)("validate-message",l,{popup:h})},E.message)},b=S=>{const A=S.target;let w;if(A.type==="number"?w=S.target.valueAsNumber:w=S.target.value,typeof _=="function"){let T;v==="number"?/^[0-9]+$/.test(w)?T=_(Number(w)):T=_(String(w)):T=_(w),g(T)}typeof s=="function"&&s(S),typeof f=="function"&&f(w)};return o.default.createElement("div",{className:(0,r.default)("input-box",{popup:h})},o.default.createElement(c.Input,{type:v,ref:d,className:(0,r.default)(m,E,l),onChange:b,...u}),y())}),t.ValidateInput.displayName="ValidateInput"},50708:(x,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:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),e(85608).__exportStar(e(3205),t)},3205:(x,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:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LocalizeContext=void 0,t.LocalizeContextProvider=v,t.ComponentContextProvider=m;const r=e(85608).__importDefault(e(14041)),o=e(54713),c=e(65973),p=_=>((0,c.warning)(!1,"Using the default localize fn"),"");t.LocalizeContext=r.default.createContext({localize:p}),t.LocalizeContext.displayName="LocalizeContext";function v(_){return r.default.createElement(t.LocalizeContext.Provider,{value:_.value},r.default.createElement(t.LocalizeContext.Consumer,null,s=>_.value===s?_.children:null))}function m(_){return r.default.createElement(o.IconContextProvider,{value:_.value},r.default.createElement(v,{value:{localize:_.value.localize}},_.children))}},13719:(x,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:(x,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 c extends r.marked.Renderer{constructor(m){super(),this.renderer=m.renderer}parse(m){return m.map((_,s)=>{const f=(()=>{switch(_.type){case"html":return this.renderer.html(_.text);case"space":return null;case"heading":{const a=_.depth;return this.renderer.heading(this.parseInline(_.tokens),a)}case"paragraph":return this.renderer.paragraph(this.parseInline(_.tokens));case"text":{const a=_;return a.tokens?this.parseInline(a.tokens):_.text}case"blockquote":{const a=_,h=this.parse(a.tokens);return this.renderer.blockquote(h)}case"list":{const h=_.items.map((u,d)=>{var E;const g=[];return u.task&&g.push(this.renderer.checkbox((E=u.checked)!==null&&E!==void 0?E:!1)),g.push(this.parse(u.tokens)),o.default.cloneElement(this.renderer.listItem(g),{key:`list-item-${d}`})});return this.renderer.list(h,_.ordered)}case"code":return this.renderer.code(_.text,_.lang);case"table":{const a=_,h=a.header.map((l,y)=>o.default.cloneElement(this.renderer.tableCell(this.parseInline(l.tokens),{header:!0,align:_.align[y]}),{key:`header-cell-${y}`})),u=o.default.cloneElement(this.renderer.tableRow(h),{key:"header-row"}),d=this.renderer.tableHeader(u),E=a.rows.map((l,y)=>{const b=l.map((S,A)=>o.default.cloneElement(this.renderer.tableCell(this.parseInline(S.tokens),{header:!1,align:_.align[A]}),{key:`body-cell-${y}-${A}`}));return o.default.cloneElement(this.renderer.tableRow(b),{key:`body-row-${y}`})}),g=this.renderer.tableBody(E);return this.renderer.table([d,g])}case"hr":return this.renderer.hr();default:return console.warn(`Token with "${_.type}" type was not found`),null}})();return o.default.isValidElement(f)?o.default.cloneElement(f,{key:`token-${s}`}):f})}parseInline(m=[]){return m.map(_=>{switch(_.type){case"text":{const s=p(_.text);return this.renderer.text(s)}case"strong":return this.renderer.strong(this.parseInline(_.tokens));case"em":return this.renderer.em(this.parseInline(_.tokens));case"del":return this.renderer.del(this.parseInline(_.tokens));case"codespan":return this.renderer.codespan(unescape(_.text));case"link":return this.renderer.link(_.href,this.parseInline(_.tokens));case"image":return this.renderer.image(_.href,_.text,_.title);case"html":return this.renderer.html(_.text);case"br":return this.renderer.br();case"escape":return this.renderer.text(_.text);default:return console.warn(`Token with "${_.type}" type was not found`),null}})}}t.MarkdownReactParser=c;function p(v){return v.replace(/&#(\d+);/g,(m,_)=>String.fromCharCode(_)).replace(/&#x([0-9A-Fa-f]+);/g,(m,_)=>String.fromCharCode(parseInt(_,16)))}},44547:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MarkdownReactRenderer=void 0;const r=e(85608).__importStar(e(14041));class o{constructor(p={}){this.uid=0,this.options=p}node(p,v=null,m={}){const _={key:`marked-react-${this.uid}`};return this.incrementUID(),(0,r.createElement)(p,{...m,..._},v)}incrementUID(){this.uid+=1}heading(p,v){return this.node(`h${v}`,p)}paragraph(p){return this.node("p",p)}joinBase(p,v){if(!v)return p;try{return new URL(p,v).href}catch{return p}}link(p,v){const m=this.joinBase(p,this.options.baseURL);return this.node("a",v,{href:m,target:"_blank",rel:"noopener noreferrer"})}image(p,v,m=null){const _=this.joinBase(p,this.options.baseURL);return this.node("img",null,{src:_,alt:v,title:m})}codespan(p,v=null){const m=v?`${this.options.langPrefix}${v}`:null;return this.node("code",p,{className:m})}code(p,v){return this.node("pre",this.codespan(p,v))}blockquote(p){return this.node("blockquote",p)}list(p,v){return this.node(v?"ol":"ul",p)}listItem(p){return this.node("li",p)}checkbox(p){return this.node("input",null,{type:"checkbox",disabled:!0,checked:p})}table(p){return this.node("table",p)}tableHeader(p){return this.node("thead",p)}tableBody(p){return this.node("tbody",p)}tableRow(p){return this.node("tr",p)}tableCell(p,v){const m=v.header?"th":"td";return this.node(m,p,{align:v.align})}strong(p){return this.node("strong",p)}em(p){return this.node("em",p)}del(p){return this.node("del",p)}text(p){return p}html(p){return r.default.createElement("div",{dangerouslySetInnerHTML:{__html:p}})}hr(){return this.node("hr")}br(){return this.node("br")}}t.MarkdownReactRenderer=o},56849:(x,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)),c=e(39777),p=(_,s,f)=>`<a rel="noopener" ${c.DATA_SET_COMMAND}="${_}" title="${s??_}">${f}</a>`;t.linkify=p;class v extends r.Renderer{link(s,f,a){return(0,t.linkify)(s,f,a)}}t.DefaultMarkedRenderer=v;function m(_){const s=(h,u)=>r.marked.parse(h,{renderer:u}),[f,a]=o.default.useState(s(_.value||"",_.renderer));return o.default.useEffect(()=>{a(s(_.value||"",_.renderer))},[_.renderer,_.value]),o.default.createElement(c.RenderWrapper,{opener:_.opener,html:f})}},39777:(x,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=c=>{const p=(0,r.useRef)(),{html:v,opener:m}=c;(0,r.useEffect)(()=>(p&&p.current&&p.current.addEventListener("click",_),()=>{p&&p.current&&p.current.removeEventListener("click",_)}),[]);const _=s=>{let f=s.target;if(f.className.includes("codicon")&&(f=f.parentNode),f.tagName.toLowerCase()==="a"&&f.hasAttribute(t.DATA_SET_COMMAND)){const a=f.getAttribute(t.DATA_SET_COMMAND);a&&m&&m.open(a)}};return r.default.createElement("div",{className:"kt-md-renderer-wrap",dangerouslySetInnerHTML:{__html:v},ref:p})};t.RenderWrapper=o},98113:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=(0,e(14041).createContext)({inlineCollapsed:!1});t.default=r},64063:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608),r=e(31363),o=n.__importDefault(e(14041)),c=n.__importDefault(e(98113));class p extends o.default.Component{constructor(){super(...arguments),this.renderItem=()=>{const{title:m,..._}=this.props;return o.default.createElement(c.default.Consumer,null,({inlineCollapsed:s})=>s?o.default.createElement(r.Item,{..._,title:m}):o.default.createElement(r.Item,{..._,title:m}))}}render(){return this.renderItem()}}p.isMenuItem=!0,t.default=p},91886:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608),r=n.__importDefault(e(39067)),o=e(31363),c=n.__importDefault(e(14041));class p extends c.default.Component{render(){const{popupClassName:m}=this.props;return c.default.createElement(o.SubMenu,{...this.props,popupClassName:m})}}p.contextTypes={antdMenuTheme:r.default.string},p.isSubMenu=1,t.default=p},45803:(x,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)),c=n.__importDefault(e(14041)),p=e(90146),v=e(2835),m=e(47768),_=e(65973),s=n.__importDefault(e(98113)),f=n.__importDefault(e(64063)),a=n.__importDefault(e(91886));e(42985);class h extends c.default.Component{static getDerivedStateFromProps(E,g){const{prevProps:l}=g,y={prevProps:E};return l.mode==="inline"&&E.mode!=="inline"&&(y.switchingModeFromInline=!0),"openKeys"in E?y.openKeys=E.openKeys:(E.inlineCollapsed&&!l.inlineCollapsed&&(y.switchingModeFromInline=!0,y.inlineOpenKeys=g.openKeys,y.openKeys=[]),!E.inlineCollapsed&&l.inlineCollapsed&&(y.openKeys=g.inlineOpenKeys,y.inlineOpenKeys=[])),y}constructor(E){super(E),this.handleMouseEnter=l=>{this.restoreModeVerticalFromInline();const{onMouseEnter:y}=this.props;y&&y(l)},this.handleTransitionEnd=l=>{const y=l.propertyName==="width"&&l.target===l.currentTarget,{className:b}=l.target,S=Object.prototype.toString.call(b)==="[object SVGAnimatedString]"?b.animVal:b,A=l.propertyName==="font-size"&&S.indexOf("anticon")>=0;(y||A)&&this.restoreModeVerticalFromInline()},this.handleClick=l=>{this.handleOpenChange([]);const{onClick:y}=this.props;y&&y(l)},this.handleOpenChange=l=>{this.setOpenKeys(l);const{onOpenChange:y}=this.props;y&&y(l)},this.renderMenu=()=>{const{prefixCls:l,className:y}=this.props,b=this.getRealMenuMode(),S=this.getOpenMotionProps(b),A=l||"kt-inner-menu",w=(0,r.default)(y,{[`${A}-inline-collapsed`]:this.getInlineCollapsed()}),T={openKeys:this.state.openKeys,onOpenChange:this.handleOpenChange,className:w,mode:b,...S};return b!=="inline"&&(T.onClick=this.handleClick),this.getInlineCollapsed()&&(T.openKeys=[]),c.default.createElement(o.default,{...this.props,...T,prefixCls:A,onTransitionEnd:this.handleTransitionEnd,onMouseEnter:this.handleMouseEnter})},(0,_.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,_.warning)(!("inlineCollapsed"in E&&E.mode!=="inline"),"[Menu] `inlineCollapsed` should only be used when `mode` is inline.");let g;"openKeys"in E?g=E.openKeys:"defaultOpenKeys"in E&&(g=E.defaultOpenKeys),this.state={openKeys:g||[],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:g}=this.props;return E?"vertical":g}getInlineCollapsed(){const{inlineCollapsed:E}=this.props;return E}getOpenMotionProps(E){const{openTransitionName:g,openAnimation:l,motion:y}=this.props;return y?{motion:y}:l?((0,_.warning)(typeof l=="string","[Menu] `openAnimation` do not support object. Please use `motion` instead."),{openAnimation:l}):g?{openTransitionName:g}:E==="horizontal"?{motion:{motionName:"slide-up"}}:E==="inline"?{motion:v.collapseMotion}:{motion:{motionName:""}}}restoreModeVerticalFromInline(){const{switchingModeFromInline:E}=this.state;E&&this.setState({switchingModeFromInline:!1})}render(){return c.default.createElement(s.default.Provider,{value:{inlineCollapsed:this.getInlineCollapsed()||!1}},this.renderMenu())}}h.defaultProps={className:"",focusable:!1},(0,p.polyfill)(h);class u extends c.default.Component{render(){return c.default.createElement(h,{...this.props})}}t.Menu=u,u.Divider=o.Divider,u.Item=f.default,u.SubMenu=a.default,u.ItemGroup=o.ItemGroup},31059:(x,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(c){return(p,v)=>new Promise(m=>{r.default[c](p,v,m)})}t.message={success:o("success"),error:o("error"),info:o("info"),warning:o("warning"),loading:o("loading")}},71036:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608),r=n.__importDefault(e(29517)),o=n.__importDefault(e(96041)),c=n.__importDefault(e(63492)),p=n.__importDefault(e(36117)),v=n.__importDefault(e(59303)),m=n.__importDefault(e(10435)),_=n.__importDefault(e(14041));let s=3,f,a,h=1,u="kt-message",d="move-up",E,g;function l(w){if(a){w(a);return}m.default.newInstance({prefixCls:u,transitionName:d,style:{top:f},getContainer:E,maxCount:g},T=>{if(a){w(a);return}a=T,w(T)})}const y={info:p.default,success:r.default,error:o.default,warning:c.default,loading:v.default};function b(w){const T=w.duration!==void 0?w.duration:s,D=w.key||h++,I=new Promise(M=>{const R=()=>(typeof w.onClose=="function"&&w.onClose(),M(!0));l(P=>{const k=y[w.type];P.notice({key:D,duration:T,style:{},content:_.default.createElement("div",{className:`${u}-custom-content${w.type?` ${u}-${w.type}`:""}`},w.icon||k&&_.default.createElement(k,null),_.default.createElement("span",null,w.content)),onClose:R})})}),O=()=>{a&&a.removeNotice(D)};return O.then=(M,R)=>I.then(M,R),O.promise=I,O}function S(w){return Object.prototype.toString.call(w)==="[object Object]"&&!!w.content}const A={open:b,config(w){w.top!==void 0&&(f=w.top,a=null),w.duration!==void 0&&(s=w.duration),w.prefixCls!==void 0&&(u=w.prefixCls),w.getContainer!==void 0&&(E=w.getContainer),w.transitionName!==void 0&&(d=w.transitionName,a=null),w.maxCount!==void 0&&(g=w.maxCount,a=null)},destroy(){a&&(a.destroy(),a=null)}};["success","info","warning","error","loading"].forEach(w=>{A[w]=(T,D,I)=>S(T)?A.open({...T,type:w}):(typeof D=="function"&&(I=D,D=void 0),A.open({content:T,duration:D,type:w,onClose:I}))}),A.warn=A.warning,t.default=A},6656:(x,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)),c=n.__importDefault(e(39067)),p=n.__importDefault(e(91812)),v=n.__importDefault(e(25946)),m=n.__importDefault(e(14041)),_=e(48412),s=e(69587);let f;t.destroyFns=[];const a=u=>{f={x:u.pageX,y:u.pageY},setTimeout(()=>f=null,100)};typeof window<"u"&&window.document&&window.document.documentElement&&(0,v.default)(document.documentElement,"click",a);class h extends m.default.Component{constructor(){super(...arguments),this.handleCancel=d=>{const{onCancel:E}=this.props;E&&E(d)},this.handleOk=d=>{const{onOk:E}=this.props;E&&E(d)},this.renderFooter=d=>{const{okText:E,okType:g,cancelText:l,confirmLoading:y}=this.props;return m.default.createElement("div",null,m.default.createElement(_.Button,{onClick:this.handleCancel,...this.props.cancelButtonProps},l||d.cancelText),m.default.createElement(_.Button,{type:g,loading:y,onClick:this.handleOk,...this.props.okButtonProps},E||d.okText))},this.renderModal=()=>{const{prefixCls:d,footer:E,visible:g,wrapClassName:l,centered:y,getContainer:b,closeIcon:S,closable:A=!0,...w}=this.props,T=d||"kt-modal",D=this.renderFooter((0,s.getConfirmLocale)()),I=m.default.createElement("span",{className:`${T}-close-x`},S||m.default.createElement(r.default,{className:`${T}-close-icon`}));return m.default.createElement(p.default,{...w,animation:this.props.animation,getContainer:b,prefixCls:T,wrapClassName:(0,o.default)({[`${T}-centered`]:!!y},l),footer:E===void 0?D:E,visible:g,mousePosition:f,onClose:this.handleCancel,closeIcon:I})}}render(){return this.renderModal()}}h.defaultProps={width:520,confirmLoading:!1,visible:!1,okType:"primary"},h.propTypes={prefixCls:c.default.string,onOk:c.default.func,onCancel:c.default.func,okText:c.default.node,cancelText:c.default.node,centered:c.default.bool,width:c.default.oneOfType([c.default.number,c.default.string]),confirmLoading:c.default.bool,visible:c.default.bool,footer:c.default.node,title:c.default.node,closable:c.default.bool,closeIcon:c.default.node},t.default=h},53017:(x,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:(x,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(c){c?n={...n,...c}:n={...e}}function o(){return n}},18875:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.notification=void 0,t.open=f,t.close=a,t.update=h;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importDefault(e(14041)),c=e(70392),p=e(48412),v=e(50570),m=n.__importDefault(e(70748));e(1477);const _={[v.MessageType.Info]:15,[v.MessageType.Warning]:18,[v.MessageType.Error]:20};m.default.config({placement:"bottomRight"}),t.notification=m.default;const s=new Map;function f(d,E,g=!0,l,y,b,S,A){return(0,c.createCancelablePromise)(w=>(w.onCancellationRequested(()=>{a(l)}),new Promise(T=>{const D={key:l,className:(0,r.default)("kt-notification-wrapper",{"kt-notification-info":E===v.MessageType.Info,"kt-notification-error":E===v.MessageType.Error,"kt-notification-warn":E===v.MessageType.Warning}),duration:(0,c.isUndefined)(S)?_[E]:S,onClose:()=>{A&&A(),s.delete(l),T(void 0)},btn:y?y.map((I,O)=>{const M=typeof I=="string",R={className:`${(0,r.default)("kt-notification-button")}${M?"":I.class}`,ghost:M?O===0:!I.primary,key:M?I:I.id,onClick:()=>{T(I),m.default.close(l),M||I.run()}},P=M?I:I.label;return o.default.createElement(p.Button,{size:"small",...R},P)}):null,message:d,description:b};s.set(l,[E,D]),g||(D.closeIcon=o.default.createElement("span",null)),u(E,D)})))}function a(d){t.notification.close(d)}function h(d,E){const g=s.get(d);u(g[0],{...g[1],key:d,message:E})}function u(d,E){switch(d){case v.MessageType.Info:t.notification.info(E);break;case v.MessageType.Warning:t.notification.warning(E);break;case v.MessageType.Error:t.notification.error(E);break;default:t.notification.open(E);break}}},70748:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608),r=n.__importDefault(e(55435)),o=n.__importDefault(e(31079)),c=n.__importDefault(e(22143)),p=n.__importDefault(e(5550)),v=n.__importDefault(e(74339)),m=n.__importDefault(e(10435)),_=n.__importDefault(e(14041)),s=e(70392),f={};let a=4.5,h=24,u=24,d="topRight",E,g;function l(T){const{duration:D,placement:I,bottom:O,top:M,getContainer:R,closeIcon:P}=T;D!==void 0&&(a=D),I!==void 0&&(d=I),O!==void 0&&(u=O),M!==void 0&&(h=M),R!==void 0&&(E=R),P!==void 0&&(g=P)}function y(T,D=h,I=u){let O;switch(T){case"topLeft":O={left:0,top:D,bottom:"auto"};break;case"topRight":O={right:0,top:D,bottom:"auto"};break;case"bottomLeft":O={left:0,top:"auto",bottom:I};break;default:O={right:0,top:"auto",bottom:I};break}return O}function b({prefixCls:T,placement:D=d,getContainer:I=E,top:O,bottom:M,closeIcon:R=g},P){const k=`${T}-${D}`;if(f[k]){P(f[k]);return}const F=_.default.createElement("span",{className:`${T}-close-x`},R||_.default.createElement(c.default,{className:`${T}-close-icon`}));m.default.newInstance({prefixCls:T,className:`${T}-${D}`,style:y(D,O,M),getContainer:I,closeIcon:F},L=>{f[k]=L,P(L)})}const S={success:r.default,info:v.default,error:o.default,warning:p.default};function A(T){const D=T.prefixCls||"kt-notification",I=`${D}-notice`,O=(0,s.isUndefined)(T.duration)?a:T.duration;let M=null;T.icon?M=_.default.createElement("span",{className:`${I}-icon`},T.icon):T.type&&(M=_.default.createElement(S[T.type]||null,{className:`${I}-icon ${I}-icon-${T.type}`}));const{placement:R,top:P,bottom:k,getContainer:F,closeIcon:L}=T;b({prefixCls:D,placement:R,top:P,bottom:k,getContainer:F,closeIcon:L},N=>{N.notice({content:_.default.createElement("div",{className:M?`${I}-with-icon`:""},M,_.default.createElement("div",{className:`${I}-message`},T.message),_.default.createElement("div",{className:`${I}-description`},T.description),T.btn?_.default.createElement("span",{className:`${I}-btn`},T.btn):null),duration:O,closable:!0,onClose:T.onClose,onClick:T.onClick,key:T.key,style:T.style||{},className:T.className})})}const w={open:A,close(T){Object.keys(f).forEach(D=>f[D].removeNotice(T))},config:l,destroy(){Object.keys(f).forEach(T=>{f[T].destroy(),delete f[T]})}};["success","info","warning","error"].forEach(T=>{w[T]=D=>w.open({...D,type:T})}),w.warn=w.warning,t.default=w},79024:(x,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)),c=e(53017);e(45531);const p=({maskClosable:v=!1,closable:m=!0,className:_,onClose:s,children:f,footer:a,title:h,getContainer:u,keyboard:d,...E})=>o.default.createElement(c.Modal,{footer:a||null,maskClosable:v,closable:m,onCancel:s,title:h,getContainer:u,className:(0,r.default)("kt-overlay",_),keyboard:d,...E},f);t.Overlay=p},91397:(x,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)),c=n.__importStar(e(14041));e(14856);const p=e(48412);var v;(function(s){s.hover="hover",s.click="click",s.focus="focus"})(v||(t.PopoverTriggerType=v={}));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 _=({children:s,trigger:f=v.hover,visible:a,content:h,position:u=m.top,showArrow:d=!0,title:E,titleClassName:g,overlay:l,overlayClassName:y,overlayStyle:b,action:S,delay:A=200,zIndex:w=1e3,onClickAction:T,onVisibleChange:D,getTooltipContainer:I,...O})=>{const M=(0,c.useCallback)(P=>{T&&T(P)},[T]),R=(0,c.useMemo)(()=>l||(!E&&!h?null:c.default.createElement(c.default.Fragment,null,E&&c.default.createElement("p",{className:(0,r.default)("kt-popover-title",g)},E,S&&c.default.createElement(p.Button,{size:"small",type:"link",onClick:M},S)),h||"")),[l,h,S,M]);return R?c.default.createElement(o.default,{...O,visible:a,placement:u,mouseEnterDelay:A?A/1e3:void 0,trigger:f,showArrow:d,onVisibleChange:D,overlayClassName:y,prefixCls:"kt-popover",overlayStyle:b,getTooltipContainer:I,overlay:R,zIndex:w},c.default.createElement("div",{className:"kt-popover-trigger"},s)):s};t.Popover=_},8573:(x,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)),c=n.__importDefault(e(19686)),p=e(58723),v=e(77011);t.RECYCLE_LIST_STABILIZATION_TIME=500,t.RECYCLE_LIST_OVER_SCAN_COUNT=50;const m=({width:_,height:s,maxHeight:f,minHeight:a,className:h,style:u,data:d,onReady:E,onScroll:g,itemHeight:l,header:y,footer:b,template:S,paddingBottomSize:A,getSize:w,hiddenVerticalScrollbar:T,hiddenHorizontalScrollbar:D})=>{const I=(0,o.useRef)(),O=(0,o.useRef)(),M=(0,o.useRef)({}),R=(0,o.useRef)(0),P=(0,o.useRef)();(0,o.useEffect)(()=>{typeof E=="function"&&E({scrollTo:K=>{var Z;(Z=I.current)===null||Z===void 0||Z.scrollTo(K)},scrollToIndex:(K,Z="start")=>{var Q,oe;let ne=K;if(y&&ne++,typeof l=="number")(Q=I.current)===null||Q===void 0||Q.scrollToItem(ne,Z);else{P.current&&clearTimeout(P.current);const _e=(M.current?Object.keys(M.current):[]).slice(0,ne).reduce((q,Re)=>q+F(Re),0);(oe=I.current)===null||oe===void 0||oe.scrollToItem(K,Z),P.current=setTimeout(()=>{var q;(M.current?Object.keys(M.current):[]).slice(0,ne).reduce((ie,fe)=>ie+F(fe),0)!==_e&&((q=I.current)===null||q===void 0||q.scrollToItem(K,Z)),P.current=null},t.RECYCLE_LIST_STABILIZATION_TIME)}}})},[]);const k=(H,K)=>{var Z;M.current[H]!==K&&(M.current={...M.current,[H]:K},I.current&&((Z=I.current)===null||Z===void 0||Z.resetAfterIndex(0)))},F=(0,o.useCallback)(H=>w?w(Number(H)):(M?.current||[])[H]||l||100,[l,w]),L=(0,o.useCallback)(()=>{if(f){let H=0;for(let K=0;K<d.length;K++)H+=F(K);return H>f?f:H}},[f,d]),N=(0,o.useCallback)(()=>{if(a)return a},[a,d]),j=(0,o.useMemo)(()=>{let H=d.length;return y&&H++,b&&H++,H},[d,b,y]),W=({index:H,style:K})=>{let Z;if(H===0&&y)return o.default.createElement("div",{style:K},o.default.createElement(y,null));if(H+1===j&&b)return o.default.createElement("div",{style:K},o.default.createElement(b,null));if(y?Z=d[H-1]:Z=d[H],!Z)return o.default.createElement("div",{style:K});const Q={"aria-setsize":j,"aria-posinset":H};return o.default.createElement("div",{tabIndex:0,style:K,role:"listitem",...Q},o.default.createElement(S,{data:Z,index:H}))},U=({index:H,style:K})=>{const Z=(0,o.useRef)(null),Q=(0,o.useRef)(),oe=()=>{if(Z.current){let he=0;for(let _e=0;_e<Z.current.children.length;_e++)he+=Z.current.children[_e].getBoundingClientRect().height;k(H,he)}};(0,o.useEffect)(()=>{if(Z.current&&I.current){Q.current=new MutationObserver(()=>{oe()});const he={childList:!0,attributes:!0,characterData:!0,attributeFilter:["class","style"],attributeOldValue:!0,characterDataOldValue:!0};Q.current.observe(Z.current,he),oe()}return()=>{Q.current.disconnect()}},[Z.current]);let ne;return H===0&&y?o.default.createElement("div",{style:K},o.default.createElement(y,null)):H+1===j&&b?o.default.createElement("div",{style:K},o.default.createElement(b,null)):(y?ne=d[H-1]:ne=d[H],ne?o.default.createElement("div",{style:K,ref:Z},o.default.createElement(S,{data:ne,index:H})):o.default.createElement("div",{style:K}))},X=(0,o.useMemo)(()=>d.reduce((K,Z)=>K+F(Z),0)/d.length,[d]),V=(0,o.useCallback)(H=>{R.current=H.scrollOffset,g&&g(H)},[g]),$=(0,o.useMemo)(()=>(0,o.forwardRef)((H,K)=>{const{style:Z,...Q}=H;return o.default.createElement("div",{ref:K,style:{...Z,height:`${parseFloat(Z.height)+(A||0)}px`},...Q})}),[A]),Y=(0,o.useMemo)(()=>(0,o.forwardRef)((H,K)=>o.default.createElement(v.Scrollbars,{hiddenVertical:T,hiddenHorizontal:D,...H,thumbSize:10,forwardedRef:K})),[T,D]);return(()=>{const H=typeof l!="number",K=!_||!s;return(()=>{const Q=({width:oe,height:ne})=>{O.current&&(O.current.scrollTop=R.current);const he=L(),_e=N();let q=ne;return _e?q=Math.min(ne,_e):he&&(q=he),H?o.default.createElement(p.VariableSizeList,{onScroll:V,width:oe,height:q,itemData:[],itemSize:F,itemCount:j,overscanCount:t.RECYCLE_LIST_OVER_SCAN_COUNT,ref:I,style:{transform:"translate3d(0px, 0px, 0px)",...u},className:(0,r.default)(h,"kt-recycle-list"),innerElementType:$,outerElementType:Y,estimatedItemSize:X},U):o.default.createElement(p.FixedSizeList,{onScroll:V,width:oe,height:q,itemData:[],itemSize:l,itemCount:j,overscanCount:t.RECYCLE_LIST_OVER_SCAN_COUNT,ref:I,outerRef:O,style:{transform:"translate3d(0px, 0px, 0px)",...u},className:(0,r.default)(h,"recycle-list"),innerElementType:$,outerElementType:Y},W)};return K?o.default.createElement(c.default,null,Q):Q({width:_,height:s})})()})()};t.RecycleList=m},34128:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),e(85608).__exportStar(e(8573),t)},57621:(x,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)),c=e(58723),p=e(70392),v=e(77011),m=e(48103),_=e(65601),s=e(43685),f=e(13429),a=e(34054);var h;(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"})(h||(t.RenderErrorType=h={}));const u=o.default.forwardRef((E,g)=>{const{style:l,...y}=E;return o.default.createElement("div",{ref:g,style:{...l,height:`${parseFloat(l.height)+d.PADDING_BOTTOM_SIZE}px`},...y})});class d extends o.default.Component{constructor(){super(...arguments),this.idxToRendererPropsCache=new Map,this.dynamicSizeMap=new Map,this.listRef=o.default.createRef(),this.disposables=new p.DisposableCollection,this.onErrorEmitter=new p.Emitter,this.onDidUpdateEmitter=new p.Emitter,this.onDidModelChangeEmitter=new p.Emitter,this.newPromptInsertionIndex=-1,this.idToFilterRendererPropsCache=new Map,this.filterFlattenBranchChildrenCache=new Map,this.filterWatcherDisposeCollection=new p.DisposableCollection,this.queueUpdatePromise=null,this.updateCancelToken=new p.CancellationTokenSource,this.expandNodeCancelToken=new p.CancellationTokenSource,this.willUpdateTasks=0,this.queueUpdateThrottler=new p.Throttler,this.doBatchUpdate=(()=>{const g=(l,y)=>{if(this.disposables.disposed)return;const{root:b}=this.props.model;let S=-1;if(this.promptTargetID>-1&&this.promptHandle instanceof _.NewPromptHandle&&this.promptHandle.parent&&this.promptHandle.parent.expanded&&b.isItemVisibleAtSurface(this.promptHandle.parent)&&!this.promptHandle.destroyed){const A=b.getIndexAtTreeNodeId(this.promptTargetID);if(A>-1||this.promptHandle.parent===b)if(this.promptHandle.type===a.TreeNodeType.TreeNode){const w=this.promptHandle.parent;w?S=this.getNewPromptInsertIndex(A,w):S=A+1}else S=A+1;else this.promptTargetID=-1}if(S===-1&&this.promptHandle&&this.promptHandle.constructor===_.NewPromptHandle&&!this.promptHandle.destroyed&&this.promptHandle.destroy(),this.newPromptInsertionIndex=S,this.idxToRendererPropsCache.clear(),y.isCancellationRequested){l();return}this.forceUpdate(()=>{l(),this.props.filter&&this.props.filterProvider&&this.props.filterProvider.filterAlways&&this.filterItems(this.props.filter)})};return()=>{const l=(S,A)=>{const w=!!this.willUpdateTasks;if(this.willUpdateTasks=0,!w)A.resolve();else{this.updateCancelToken.cancel(),this.updateCancelToken=new p.CancellationTokenSource;const T=this.updateCancelToken.token;requestAnimationFrame(()=>{if(T.isCancellationRequested){A();return}g(A,T)})}return S};let y;const b=new Promise(S=>y=S);return b.then(()=>{this.onDidUpdateEmitter.fire()}),l(b,y),b}})(),this.batchUpdate=()=>(this.willUpdateTasks++,this.queueUpdatePromise=this.queueUpdateThrottler.queue(this.doBatchUpdate),this.queueUpdatePromise),this.promptNewTreeNode=g=>this.promptNew(g),this.promptNewCompositeTreeNode=g=>this.promptNew(g,a.TreeNodeType.CompositeTreeNode),this.promptRename=async(g,l)=>{var y,b;const{root:S}=this.props.model,A=typeof g=="string"?await S.getTreeNodeByPath(g):g;if(!s.TreeNode.is(A)||s.CompositeTreeNode.isRoot(A))throw new TypeError(`Cannot rename object of type ${typeof A}`);const w=new m.RenamePromptHandle(l||A.name,A);return this.promptHandle=w,this.promptTargetID=A.id,S.isItemVisibleAtSurface(A)?await this.batchUpdate():await A.parent.setExpanded(!0),(b=(y=this.listRef)===null||y===void 0?void 0:y.current)===null||b===void 0||b.scrollToItem(S.getIndexAtTreeNodeId(this.promptTargetID)),this.promptHandle},this.expandNode=async g=>{const{root:l}=this.props.model,y=typeof g=="string"?l.getTreeNodeByPath(g):g;if(this.expandNodeCancelToken.token.isCancellationRequested&&(this.expandNodeCancelToken=new p.CancellationTokenSource),y&&s.CompositeTreeNode.is(y)&&!y.disposed)return y.setExpanded(!1,!1,!0,this.expandNodeCancelToken.token)},this.collapseNode=async g=>{const{root:l}=this.props.model,y=typeof g=="string"?l.getTreeNodeByPath(g):g;if(y&&s.CompositeTreeNode.is(y)&&!y.disposed)return this.expandNodeCancelToken.cancel(),y.setCollapsed()},this._isEnsuring=!1,this.ensureVisible=async(g,l="smart",y=!1)=>{if(this._isEnsuring)return;this._isEnsuring=!0;const{root:b}=this.props.model,S=typeof g=="string"?b.getTreeNodeByPath(g)||await b.loadTreeNodeByPath(g):g;if(S&&!b.isItemVisibleAtSurface(S)&&await b.loadTreeNodeByPath(S.path),!s.TreeNode.is(S)||s.CompositeTreeNode.isRoot(S)){this._isEnsuring=!1;return}return y?this.tryScrollIntoViewWhileStable(S,l):this.tryScrollIntoView(S,l),this._isEnsuring=!1,S},this.getItemAtIndex=g=>{const{filter:l}=this.props;if(l&&this.filterFlattenBranch.length>0)return this.idToFilterRendererPropsCache.get(this.filterFlattenBranch[g]);let y=this.idxToRendererPropsCache.get(g);if(!y){const b=this.newPromptInsertionIndex,{root:S}=this.props.model;if(b>-1&&this.promptHandle&&this.promptHandle.constructor===_.NewPromptHandle&&!this.promptHandle.destroyed)if(g===b)y={itemType:a.TreeNodeType.NewPrompt,item:this.promptHandle};else{const A=S.getTreeNodeAtIndex(g-(g>=b?1:0));y={itemType:s.CompositeTreeNode.is(A)?a.TreeNodeType.CompositeTreeNode:a.TreeNodeType.TreeNode,item:A}}else{const A=S.getTreeNodeAtIndex(g);A&&A.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(A)?a.TreeNodeType.CompositeTreeNode:a.TreeNodeType.TreeNode,item:A}}this.idxToRendererPropsCache.set(g,y)}return y},this.handleListScroll=({scrollOffset:g})=>{const{model:l,height:y,itemHeight:b}=this.props;if(l.state.saveScrollOffset(g),!this.promptHandle||!b)return;let S;this.promptHandle instanceof _.NewPromptHandle&&this.newPromptInsertionIndex>-1?S=this.newPromptInsertionIndex:S=l.root.getIndexAtTreeNodeId(this.promptHandle.id),(g+y<S*b||S*b<g)&&this.promptHandle.destroy()},this.getItemKey=g=>{const l=this.getItemAtIndex(g),{getItemKey:y}=this.props,b=y?y(l):void 0;return b??g},this.filterItems=g=>{const{model:{root:l},filterProvider:y}=this.props;if(this.filterWatcherDisposeCollection.dispose(),this.idToFilterRendererPropsCache.clear(),!g)return;const b=/\//.test(g),S=new Set,A=new Map,w=[];for(let T=0,D=l.branchSize;T<D;T++){const I=l.getTreeNodeAtIndex(T);w.push(I)}if(b)w.forEach(T=>{if(T&&T.path.indexOf(g)>-1){S.add(T.id);let D=T.parent;for(;D&&!s.CompositeTreeNode.isRoot(D);)S.add(D.id),D=D.parent}});else{let T=[];y?T=r.default.filter(g,w,y.fuzzyOptions()):T=r.default.filter(g,w,d.FILTER_FUZZY_OPTIONS);const D=I=>{const O=I.children||[];if(O.length>0)for(const M of O)S.add(M.id),s.CompositeTreeNode.is(M)&&M.expanded&&D(M)};T.forEach(I=>{const O=I.original;S.add(O.id);let M=O.parent;for(A.set(O.id,()=>o.default.createElement("div",{style:{flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},dangerouslySetInnerHTML:{__html:I.string||""}})),s.CompositeTreeNode.is(O)&&D(O);M&&!s.CompositeTreeNode.isRoot(M);)S.add(M.id),M=M.parent})}this.filterFlattenBranch=new Array(S.size);for(let T=0,D=0,I=l.branchSize;D<I;D++){const O=l.getTreeNodeAtIndex(D);O&&S.has(O.id)&&(this.filterFlattenBranch[T]=O.id,s.CompositeTreeNode.is(O)?this.idToFilterRendererPropsCache.set(O.id,{item:O,itemType:a.TreeNodeType.CompositeTreeNode,template:A.has(O.id)?A.get(O.id):void 0}):this.idToFilterRendererPropsCache.set(O.id,{item:O,itemType:a.TreeNodeType.TreeNode,template:A.has(O.id)?A.get(O.id):void 0}),T++)}this.filterWatcherDisposeCollection.push(l.watcher.on(a.TreeNodeEvent.DidChangeExpansionState,(T,D)=>{const I=this.filterFlattenBranch.indexOf(T.id);if(D){const O=this.filterFlattenBranchChildrenCache.get(T.id);O&&O.length>0&&(this.filterFlattenBranch=(0,s.spliceArray)(this.filterFlattenBranch,I+1,0,O),this.filterFlattenBranchChildrenCache.delete(T.id))}else{const O=[];for(let M=I+1;M<this.filterFlattenBranch.length;M++){const R=l.getTreeNodeById(this.filterFlattenBranch[M]);if(R&&R.depth>T.depth)O.push(R.id);else break}this.filterFlattenBranchChildrenCache.set(T.id,O),this.filterFlattenBranch=(0,s.spliceArray)(this.filterFlattenBranch,I+1,O.length)}})),this.filterWatcherDisposeCollection.push(p.Disposable.create(()=>{this.filterFlattenBranchChildrenCache.clear()}))},this.renderItem=({index:g,style:l})=>{var y,b,S,A,w,T,D;const{children:I,overflow:O="ellipsis",supportDynamicHeights:M}=this.props,R=this.getItemAtIndex(g),P=(0,o.useRef)(null),k=(0,o.useMemo)(()=>M?()=>{let U=0;if(P.current){const X=P.current;U=Array.from(X.children).reduce((V,$)=>V+$.getBoundingClientRect().height,0)}return U&&(this.dynamicSizeMap.set(g,U),this.layoutItem()),Math.max(U,d.DEFAULT_ITEM_HEIGHT)}:()=>{},[M]);if((0,o.useEffect)(()=>{P.current&&k()},[]),!R)return o.default.createElement(o.default.Fragment,null);const{item:F,itemType:L,template:N}=R;if(!F)return o.default.createElement("div",{style:l});let j;s.CompositeTreeNode.is(F)?j={"aria-label":(y=F.accessibilityInformation)===null||y===void 0?void 0:y.label,"aria-expanded":F.expanded,"aria-level":F.depth,"aria-setsize":(S=(b=F.parent)===null||b===void 0?void 0:b.children)===null||S===void 0?void 0:S.length,"aria-posinset":g}:s.TreeNode.is(F)&&(j={"aria-label":(A=F.accessibilityInformation)===null||A===void 0?void 0:A.label,"aria-level":F.depth,"aria-setsize":(T=(w=F.parent)===null||w===void 0?void 0:w.children)===null||T===void 0?void 0:T.length,"aria-posinset":g});const W=O==="ellipsis"?l:{...l,width:"auto",minWidth:"100%"};return o.default.createElement("div",{ref:P,style:W,role:((D=F.accessibilityInformation)===null||D===void 0?void 0:D.role)||"treeiem",...j},o.default.createElement(f.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},I))},this.layoutItem=()=>{var g,l,y,b;if(this.props.supportDynamicHeights&&this.listRef&&!((g=this.listRef)===null||g===void 0)&&g.current&&"_getRangeToRender"in((l=this.listRef)===null||l===void 0?void 0:l.current)){const S=(y=this.listRef)===null||y===void 0?void 0:y.current._getRangeToRender();if(S){const A=S[0];((b=this.listRef)===null||b===void 0?void 0:b.current).resetAfterIndex(A)}}}}getNewPromptInsertIndex(g,l){const{root:y}=this.props.model;let b=g+1;for(;b-g<=l.branchSize;b++){const S=y.getTreeNodeAtIndex(b);if(!S)return b;if(!s.CompositeTreeNode.is(S)){if(S?.depth>l.depth+1)continue;return b}}return b}UNSAFE_componentWillUpdate(g){this.props.filter!==g.filter&&this.filterItems(g.filter),this.props.model!==g.model&&(this.idxToRendererPropsCache.clear(),this.idToFilterRendererPropsCache.clear(),this.dynamicSizeMap.clear())}componentDidUpdate(g){var l,y;if(this.props.model!==g.model){this.disposables.dispose();const{model:b}=this.props;(y=(l=this.listRef)===null||l===void 0?void 0:l.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 S,A;(A=(S=this.listRef)===null||S===void 0?void 0:S.current)===null||A===void 0||A.scrollTo(b.state.scrollOffset)})),this.onDidModelChangeEmitter.fire({preModel:g.model,nextModel:b})}}async promptNew(g,l=a.TreeNodeType.TreeNode){var y,b;const{root:S}=this.props.model;let A=typeof g=="string"?await S.getTreeNodeByPath(g):g;if(l!==a.TreeNodeType.TreeNode&&l!==a.TreeNodeType.CompositeTreeNode)throw new TypeError(`Invalid type supplied. Expected 'TreeNodeType.TreeNode' or 'TreeNodeType.CompositeTreeNode', got ${l}`);if(A&&!s.CompositeTreeNode.is(A)&&(A=A.parent,!s.CompositeTreeNode.is(A)))throw new TypeError(`Cannot create new prompt at object of type ${typeof A}`);if(!A)throw new Error(`Cannot find node at ${g}`);const w=new _.NewPromptHandle(l,A);return this.promptHandle=w,this.promptTargetID=A.id,A!==S&&(!A.expanded||!S.isItemVisibleAtSurface(A))?await A.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(g,l="auto"){var y,b,S,A;const{root:w}=this.props.model;g.constructor===_.NewPromptHandle&&!g.destroyed?(b=(y=this.listRef)===null||y===void 0?void 0:y.current)===null||b===void 0||b.scrollToItem(this.newPromptInsertionIndex):w.isItemVisibleAtSurface(g)&&((A=(S=this.listRef)===null||S===void 0?void 0:S.current)===null||A===void 0||A.scrollToItem(w.getIndexAtTreeNode(g),l))}tryScrollIntoViewWhileStable(g,l="smart"){const{root:y}=this.props.model;if(this.tryEnsureVisibleTimes>d.TRY_ENSURE_VISIBLE_MAX_TIMES){this.tryEnsureVisibleTimes=0;return}p.Event.once(this.props.model.onChange)(async()=>{var b,S,A,w;await this.queueUpdatePromise,g.constructor===_.NewPromptHandle&&!g.destroyed?(S=(b=this.listRef)===null||b===void 0?void 0:b.current)===null||S===void 0||S.scrollToItem(this.newPromptInsertionIndex):y.isItemVisibleAtSurface(g)?((w=(A=this.listRef)===null||A===void 0?void 0:A.current)===null||w===void 0||w.scrollToItem(y.getIndexAtTreeNode(g),l),this.tryEnsureVisibleTimes=0):(this.tryEnsureVisibleTimes++,this.tryScrollIntoViewWhileStable(g,l))})}componentDidMount(){var g,l;const{model:y,onReady:b}=this.props;if((l=(g=this.listRef)===null||g===void 0?void 0:g.current)===null||l===void 0||l.scrollTo(y.state.scrollOffset),this.disposables.push(y.onChange(this.batchUpdate.bind(this))),this.disposables.push(y.state.onDidLoadState(()=>{var S,A;(A=(S=this.listRef)===null||S===void 0?void 0:S.current)===null||A===void 0||A.scrollTo(y.state.scrollOffset)})),typeof b=="function"){const S={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:p.Event.once(this.onDidUpdateEmitter.event),onError:this.onErrorEmitter.event};b(S)}}componentWillUnmount(){this.disposables.dispose()}set promptHandle(g){this._promptHandle!==g&&(this._promptHandle instanceof m.PromptHandle&&!this._promptHandle.destroyed&&this._promptHandle.destroy(),g.onDestroy(this.batchUpdate),this._promptHandle=g)}get promptHandle(){return this._promptHandle}get adjustedRowCount(){const{root:g}=this.props.model,{filter:l}=this.props;return l?this.filterFlattenBranch.length:this.newPromptInsertionIndex>-1&&this.promptHandle&&this.promptHandle.constructor===_.NewPromptHandle&&!this.promptHandle.destroyed?g.branchSize+1:g.branchSize}getItemSize(g){return this.dynamicSizeMap.get(g)||this.props.itemHeight}render(){const{children:g,itemHeight:l,width:y="100%",height:b,style:S,className:A,placeholder:w,overScanCount:T,leaveBottomBlank:D,supportDynamicHeights:I}=this.props;if(w&&this.adjustedRowCount===0){const M=w;return o.default.createElement(M,null)}const O={children:g,height:b,width:y,itemData:[],itemCount:this.adjustedRowCount,itemKey:this.getItemKey,overscanCount:T||d.DEFAULT_OVER_SCAN_COUNT,onScroll:this.handleListScroll,style:{transform:"translate3d(0px, 0px, 0px)",...S},className:A,outerElementType:v.ScrollbarsVirtualList};return D&&(O.innerElementType=u),I?o.default.createElement(c.VariableSizeList,{ref:this.listRef,itemSize:this.getItemSize.bind(this),...O},this.renderItem):o.default.createElement(c.FixedSizeList,{ref:this.listRef,itemSize:l,...O},this.renderItem)}}t.RecycleTree=d,d.PADDING_BOTTOM_SIZE=22,d.DEFAULT_ITEM_HEIGHT=22,d.TRY_ENSURE_VISIBLE_MAX_TIMES=5,d.FILTER_FUZZY_OPTIONS={pre:"<match>",post:"</match>",extract:E=>E?.name||""},d.DEFAULT_OVER_SCAN_COUNT=50},13429:(x,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:p,itemType:v,children:m,template:_,hasPrompt:s}=this.props;return r.default.createElement(m,{item:p,itemType:v,template:_,hasPrompt:s,key:p.id})}shouldComponentUpdate(p){return!0}}t.NodeRendererWrap=o},75821:(x,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)),c=e(58998),p=e(57621),v=e(64013),m=e(84225),_=e(17462),s=e(78569),f=e(45203);e(12794),e(34728),n.__exportStar(e(92532),t);const a=({width:h,height:u,itemHeight:d=22,itemClassname:E,indent:g,baseIndent:l,containerClassname:y,onClick:b,onContextMenu:S,onTwistierClick:A,onIconClick:w,onDbClick:T,resolveChildren:D,sortComparator:I,treeData:O,inlineMenus:M,inlineMenuActuator:R,onReady:P,contextMenus:k,contextMenuActuator:F,treeName:L,leaveBottomBlank:N=!0})=>{const[j,W]=(0,r.useState)({show:!1}),[U,X]=(0,r.useState)([]),[V,$]=(0,r.useState)(),Y=(0,r.useRef)(!1),G=(0,r.useRef)(),H=(0,r.useRef)(),K=(0,r.useRef)(null),Z=(0,r.useCallback)(Se=>{var Ee;return r.default.createElement(_.BasicTreeNodeRenderer,{item:Se.item,itemType:Se.itemType,itemHeight:d,indent:g,baseIndent:l,className:E,inlineMenus:M,inlineMenuActuator:R,onClick:he,onDbClick:q,onContextMenu:Re,onTwistierClick:ie,onIconClick:_e,decorations:(Ee=G.current)===null||Ee===void 0?void 0:Ee.decorations.getDecorations(Se.item)})},[V]);(0,r.useEffect)(()=>{var Se,Ee;G.current=new f.BasicTreeService(O,D,I,{treeName:L});const ge=(Se=G.current)===null||Se===void 0?void 0:Se.onDidUpdateTreeModel(Te=>{Q(Te)}),xe=()=>{var Te;(Te=G.current)===null||Te===void 0||Te.enactiveFocusedDecoration()};return(Ee=K.current)===null||Ee===void 0||Ee.addEventListener("blur",xe,!0),()=>{var Te,Fe;Y.current=!0,(Te=K.current)===null||Te===void 0||Te.removeEventListener("blur",xe,!0),ge.dispose(),(Fe=G.current)===null||Fe===void 0||Fe.dispose()}},[]),(0,r.useEffect)(()=>{var Se;(Se=G.current)===null||Se===void 0||Se.updateTreeData(O)},[O]);const Q=async Se=>{Se&&await Se.ensureReady,Y.current||$(Se)},oe=async Se=>{var Ee;(Ee=G.current)===null||Ee===void 0||Ee.activeFocusedDecoration(Se),s.BasicCompositeTreeNode.is(Se)&&ve(Se)},ne=(0,r.useCallback)(Se=>{P&&P({...Se,selectItem:oe,focusItem:async Ee=>{var ge;const xe=`/${L}/${Ee}`;await V?.ensureReady;const Te=await Se.ensureVisible(xe,"auto",!0);Te&&((ge=G.current)===null||ge===void 0||ge.activeFocusedDecoration(Te))}}),H.current=Se},[G.current]),he=(0,r.useCallback)((Se,Ee)=>{oe(Ee),b&&b(Se,Ee)},[b]),_e=(0,r.useCallback)((Se,Ee)=>{w&&w(Se,Ee)},[w]),q=(0,r.useCallback)((Se,Ee)=>{T&&T(Se,Ee)},[T]),Re=(0,r.useCallback)((Se,Ee)=>{var ge,xe;if(Ee?(ge=G.current)===null||ge===void 0||ge.activeContextMenuDecoration(Ee):(xe=G.current)===null||xe===void 0||xe.enactiveFocusedDecoration(),S)S(Se,Ee);else{let Te=[];Array.isArray(k)?Te=k:typeof k=="function"&&(Te=k(Ee));const Fe=new Set,pe={};for(const Ue of Te)Fe.add(Ue.group||"-1"),pe[Ue.group||"-1"]||(pe[Ue.group||"-1"]=[]),pe[Ue.group||"-1"].push(Ue);const re=Array.from(Fe).sort((Ue,$e)=>Ue.localeCompare($e,"kn",{numeric:!0}));let ue=[];for(const Ue of re)ue=ue.concat(pe[Ue].map($e=>({id:$e.id,label:$e.title,group:$e.group}))),ue=ue.concat([{id:`${Ue}_divider`,label:"",type:"divider"}]);ue.pop(),JSON.stringify(ue)!==JSON.stringify(U)&&X(ue);const{x:Oe,y:Ae}=Se.nativeEvent;W({show:!0,point:{pageX:Oe,pageY:Ae},activeNode:Ee})}},[T]),ve=(0,r.useCallback)(Se=>{var Ee,ge;Se.expanded?(Ee=H.current)===null||Ee===void 0||Ee.collapseNode(Se):(ge=H.current)===null||ge===void 0||ge.expandNode(Se)},[]),ie=(0,r.useCallback)((Se,Ee)=>{s.BasicCompositeTreeNode.is(Ee)&&ve(Ee),A&&A(Se,Ee)},[A]),fe=(0,r.useCallback)(()=>{var Se;(Se=G.current)===null||Se===void 0||Se.enactiveFocusedDecoration()},[]),Me=(0,r.useCallback)((Se,Ee)=>{S&&S(Se,Ee)},[]),Le=(0,r.useCallback)(()=>{W({...j,show:!1})},[j]),Ce=(0,r.useCallback)(()=>k?r.default.createElement(o.default,{popupPlacement:"bottomLeft",popupVisible:j.show,action:["contextMenu"],popupAlign:{overflow:{adjustX:1,adjustY:1},offset:[window.scrollX,window.scrollY]},point:j.point||{},builtinPlacements:m.placements,popup:r.default.createElement(c.ClickOutside,{className:"basic_tree_menubars",mouseEvents:["click","contextmenu"],onOutsideClick:Le},U.map(({id:Se,label:Ee,type:ge})=>r.default.createElement(v.BasicMenuItem,{key:Se,id:Se,label:Ee,type:ge,focusMode:j.show,onClick:xe=>{F&&F(j.activeNode,xe),W({show:!1})}}))),alignPoint:!0}):null,[U,F,j]);return r.default.createElement("div",{className:"basic_tree",tabIndex:-1,ref:K,onClick:fe,onContextMenu:Me},Ce(),V?r.default.createElement(p.RecycleTree,{height:u,width:h,itemHeight:d,model:V,onReady:ne,className:y,leaveBottomBlank:N},Z):null)};t.BasicRecycleTree=a},64013:(x,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)),c=({id:p,label:v,type:m,focusMode:_,onClick:s})=>{const[f,a]=o.default.useState(!1),h=o.default.useCallback(()=>{a(_?!0:d=>!d),s(p)},[p]),u=o.default.useCallback(()=>{},[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":f}),onMouseOver:u,onClick:h},v)};t.BasicMenuItem=c},84225:(x,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:(x,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(v,m,_,s={}){super(v,m,void 0,{treeName:s.treeName}),this._raw=_}get name(){var v;return(v=this.getMetadata("treeName"))!==null&&v!==void 0?v:`BasicTreeRoot_${this.id}`}get raw(){return this._raw}get expanded(){return!0}}t.BasicTreeRoot=r;class o extends n.CompositeTreeNode{constructor(v,m,_,s){super(v,m,void 0,{name:_.label}),this.isExpanded=_.expanded||!1,this.id=s||this.id,this._displayName=_.label,this._raw=_}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 c extends n.TreeNode{constructor(v,m,_,s){super(v,m,void 0,{name:_.label}),this.id=s||this.id,this._displayName=_.label,this._raw=_}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=c},17462:(x,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)),c=e(48412),p=e(54713),v=e(3660),m=e(78569),_=e(92532);e(12794);const s=({item:f,className:a,itemHeight:h=22,indent:u=8,baseIndent:d=8,onClick:E,onDbClick:g,onTwistierClick:l,onIconClick:y,onContextMenu:b,decorations:S,inlineMenus:A=[],inlineMenuActuator:w=()=>{}})=>{const T=(0,o.useCallback)(Y=>{E&&(Y.stopPropagation(),E(Y,f))},[E]),D=(0,o.useCallback)(Y=>{g&&(Y.stopPropagation(),g(Y,f))},[g]),I=(0,o.useCallback)(Y=>{b&&(Y.stopPropagation(),Y.preventDefault(),b(Y,f))},[b]),O=(0,o.useCallback)(Y=>{Y.stopPropagation(),l?l(Y,f):E&&E(Y,f)},[E,l]),M=(0,o.useCallback)(Y=>{Y.stopPropagation(),y?y(Y,f):E&&E(Y,f)},[E,y]);let P=(f.depth>0?f.depth-1:0)*u;d&&(P+=d),f.indentOffset&&(P+=f.indentOffset);const k={height:h,lineHeight:`${h}px`,paddingLeft:`${P}px`},F=(0,o.useCallback)(Y=>o.default.createElement(p.Icon,{onClick:M,icon:Y.icon,className:(0,r.default)("icon",Y.iconClassName)}),[]),L=(0,o.useCallback)(Y=>Y.displayName.replace(/\n/g,"\u21B5"),[]),N=(0,o.useCallback)(Y=>Y.displayName&&o.default.createElement("div",{className:(0,r.default)("segment","display_name")},L(Y)),[]),j=(0,o.useCallback)(Y=>Y.renderLabel,[]),W=(0,o.useCallback)(Y=>Y.description?typeof Y.description=="string"?o.default.createElement("div",{className:(0,r.default)("segment_grow","description")},Y.description):Y.description:null,[]),U=(0,o.useCallback)(Y=>{if(Array.isArray(A))return A;if(typeof A=="function")return A(Y)},[A]),X=()=>{var Y;const G=m.BasicCompositeTreeNode.is(f),H=(Y=U(f))===null||Y===void 0?void 0:Y.filter(Z=>G?Z.position===_.IBasicInlineMenuPosition.TREE_CONTAINER:Z.position===_.IBasicInlineMenuPosition.TREE_NODE);if(!H?.length)return null;const K=(0,o.useCallback)((Z,Q)=>{Z.stopPropagation(),w(f,Q)},[]);return o.default.createElement("div",{className:(0,r.default)("segment","tail")},H.map(Z=>o.default.createElement(c.Button,{style:{marginRight:"5px"},type:"icon",key:`${f.id}-${Z.icon}`,icon:Z.icon,title:Z.title,onClick:Q=>K(Q,Z)})))},V=(Y,G)=>S&&S?.classlist.indexOf(_.DECORATIONS.LOADING)>-1?o.default.createElement(v.Loading,null):o.default.createElement(p.Icon,{className:(0,r.default)("segment","expansion_toggle",Y.twisterClassName,{mod_collapsed:!Y.expanded}),onClick:G,icon:"arrow-right"}),$=Y=>{if(!Y.expandable)return o.default.createElement("div",{className:(0,r.default)("segment","expansion_toggle",Y.twisterPlaceholderClassName)});if(m.BasicCompositeTreeNode.is(Y))return V(Y,O)};return o.default.createElement("div",{key:f.id,onClick:T,onDoubleClick:D,onContextMenu:I,className:(0,r.default)("tree_node",a,S?S.classlist:null,f.className),style:k,"data-id":f.id},o.default.createElement("div",{className:"content"},$(f),F(f),o.default.createElement("div",{className:"overflow_wrap"},j(f)||N(f),W(f)),X()))};t.BasicTreeNodeRenderer=s},45203:(x,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),c=e(78569),p=e(92532);class v extends r.Tree{constructor(s,f,a,h={}){super(),this._treeData=s,this._resolveChildren=f,this._sortComparator=a,this.treeOptions=h,this.selectedDecoration=new r.Decoration(p.DECORATIONS.SELECTED),this.focusedDecoration=new r.Decoration(p.DECORATIONS.FOCUSED),this.contextMenuDecoration=new r.Decoration(p.DECORATIONS.ACTIVED),this.loadingDecoration=new r.Decoration(p.DECORATIONS.LOADING),this._selectedNodes=[],this.disposableCollection=new n.DisposableCollection,this.decorationDisposableCollection=new n.DisposableCollection,this.onDidUpdateTreeModelEmitter=new n.Emitter,this.sortComparator=(u,d)=>{if(this._sortComparator){const E=this._sortComparator(u.raw,d.raw);if(typeof E<"u")return E}return super.sortComparator(u,d)},this.activeFocusedDecoration=u=>{var d;this._contextMenuNode&&(this.clearDecoration(this.contextMenuDecoration),this.clearDecoration(this.focusedDecoration),this.clearDecoration(this.selectedDecoration),this._contextMenuNode=void 0),u&&(this.selectedNodes.length>0&&this.clearDecoration(this.selectedDecoration),this.focusedNode&&(this.clearDecoration(this.focusedDecoration),this._focusedNode=void 0),this.selectedDecoration.addTarget(u),this.focusedDecoration.addTarget(u),this._focusedNode=u,this._selectedNodes=[u],(d=this.model)===null||d===void 0||d.dispatchChange())},this.activeContextMenuDecoration=u=>{var d;this._contextMenuNode&&(this.clearDecoration(this.contextMenuDecoration),this._contextMenuNode=void 0),this.focusedNode&&(this.clearDecoration(this.focusedDecoration),this._focusedNode=void 0),this.contextMenuDecoration.addTarget(u),this._contextMenuNode=u,(d=this.model)===null||d===void 0||d.dispatchChange()},this.enactiveFocusedDecoration=()=>{var u;this.focusedNode&&(this.clearDecoration(this.focusedDecoration),this._focusedNode=void 0,(u=this.model)===null||u===void 0||u.dispatchChange())},this.disposableCollection.push(this.onDidUpdateTreeModelEmitter)}setUpTreeModel(){this._root=new c.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,f=>{this.loadingDecoration.addTarget(f)})),this.decorationDisposableCollection.push(s.watcher.on(o.TreeNodeEvent.DidResolveChildren,f=>{this.loadingDecoration.removeTarget(f)})),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,f){if(!f)return[];const a=[];for(const h of f)h.children?a.push(new c.BasicCompositeTreeNode(this,s,h)):a.push(new c.BasicTreeNode(this,s,h));return a}get selectedNodes(){return this._selectedNodes}get focusedNode(){return this._focusedNode}get contextMenuNode(){return this._contextMenuNode}clearDecoration(s){for(const f of s.appliedTargets.keys())s.removeTarget(f)}dispose(){super.dispose(),this.disposableCollection.dispose(),this.decorationDisposableCollection.dispose()}}t.BasicTreeService=v;class m extends r.TreeModel{}t.BasicTreeModel=m},92532:(x,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:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RecycleTreeAdaptiveDecorator=void 0;const r=e(85608).__importDefault(e(14041)),o=e(34054),c=p=>v=>{const{model:m,itemHeight:_,onReady:s}=v,f=r.default.useRef(),a=r.default.useRef(!1),[h,u]=r.default.useState(0),d=()=>{u(m.root.branchSize*_)},E=g=>{s&&s({...g,promptNewTreeNode:async l=>{var y;const b=await g.promptNewTreeNode(l);return!((y=f.current)===null||y===void 0)&&y.root.branchSize?u(f.current.root.branchSize*_+_):u(_),a.current=!1,b.onDestroy(()=>{var S;!((S=f.current)===null||S===void 0)&&S.root.branchSize&&u(f.current.root.branchSize*_)}),b.onCancel(()=>{f.current&&u(f.current.root.branchSize*_)}),b.onBlur(()=>a.current),b},promptNewCompositeTreeNode:async l=>{var y;const b=await g.promptNewCompositeTreeNode(l);return!((y=f.current)===null||y===void 0)&&y.root.branchSize?u(f.current.root.branchSize*_+_):u(_),b.onDestroy(()=>{var S;!((S=f.current)===null||S===void 0)&&S.root.branchSize&&u(f.current.root.branchSize*_)}),b.onCancel(()=>{var S;!((S=f.current)===null||S===void 0)&&S.root.branchSize&&u(f.current.root.branchSize*_)}),b.onBlur(()=>a.current),b}})};return r.default.useEffect(()=>{f.current=m,f.current.root&&(u(f.current.root.branchSize*_),f.current.root.watcher.on(o.TreeNodeEvent.DidChangeExpansionState,d))},[m]),r.default.useEffect(()=>{setTimeout(()=>{a.current=!0},100)},[h]),r.default.createElement(r.default.Fragment,null,r.default.createElement(p,{...v,height:h,onReady:E}))};t.RecycleTreeAdaptiveDecorator=c},326:(x,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)),c=e(54713),p=e(50708),v=e(4981);e(69715);const m=30,_=500,s=a=>{const{localize:h}=o.default.useContext(v.LocalizeContext);return o.default.createElement("div",{className:"kt-recycle-tree-filter-wrapper"},o.default.createElement(p.Input,{hasClear:!0,autoFocus:!0,className:"kt-recycle-tree-filter-input",size:"small",...a,placeholder:a.placeholder||h("tree.filter.placeholder"),addonBefore:o.default.createElement(c.Icon,{className:"kt-recycle-tree-filter-icon",icon:"retrieval"})}))},f=a=>h=>{const[u,d]=o.default.useState(""),[E,g]=o.default.useState(""),{beforeFilterValueChange:l,filterEnabled:y,height:b,filterPlaceholder:S,filterAfterClear:A,onReady:w,onFilterBlur:T,filterAutoFocus:D,...I}=h,O=(0,r.default)(async P=>{l&&await l(P),g(P)},_),M=(0,o.useCallback)(P=>{d(P),O(P)},[u]),R=(0,o.useCallback)(P=>{w&&w({...P,clearFilter:()=>{g(""),d("")}})},[w]);return o.default.createElement(o.default.Fragment,null,y&&o.default.createElement(s,{afterClear:A,placeholder:S,value:u,autoFocus:D,onBlur:T,onValueChange:M}),o.default.createElement(a,{...I,height:b-(y?m:0),onReady:R,filter:E}))};t.RecycleTreeFilterDecorator=f},72731:(x,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:(x,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:(x,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(p,v){super(),this.type=p,this.parent=v,this._id=n.TreeNode.nextId()}get id(){return this._id}get depth(){return this.parent.depth+1}}t.NewPromptHandle=o},65747:(x,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),c=_=>new Promise(s=>setTimeout(s,_));var p;(function(_){_[_.INFO=1]="INFO",_[_.ERROR=2]="ERROR",_[_.WARNING=3]="WARNING"})(p||(t.PROMPT_VALIDATE_TYPE=p={}));var v;(function(_){_.INFO="validate-info",_.ERROR="validate-error",_.WARNING="validate-warning"})(v||(t.VALIDATE_CLASS_NAME=v={}));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 c(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,f){this.$.setSelectionRange(s,f)}addClassName(s){this.$.classList.add(s)}removeClassName(s){this.$.classList.remove(s)}addAddonAfter(s){var f,a;!this._hasAddonAfter&&!this._destroyed&&((a=(f=this.$.parentElement)===null||f===void 0?void 0:f.parentElement)===null||a===void 0||a.appendChild(this.$addonAfter),this._hasAddonAfter=!0);const h=document.createElement("div");h.setAttribute("class",s),this.$addonAfter.appendChild(h)}removeAddonAfter(){var s,f,a;this._hasAddonAfter&&((s=this.$addonAfter.firstChild)===null||s===void 0||s.remove(),(a=(f=this.$.parentElement)===null||f===void 0?void 0:f.parentElement)===null||a===void 0||a.removeChild(this.$addonAfter),this._hasAddonAfter=!1)}addValidateMessage(s){var f,a,h,u,d,E,g;!this._hasValidateElement&&!this._destroyed&&((h=(a=(f=this.$.parentElement)===null||f===void 0?void 0:f.parentElement)===null||a===void 0?void 0:a.parentElement)===null||h===void 0||h.appendChild(this.$validate),this._hasValidateElement=!0);let l="validate-message popup ";s&&s.type===p.ERROR?this._validateClassName=v.ERROR:s&&s.type===p.WARNING?this._validateClassName=v.WARNING:this._validateClassName=v.INFO,l+=this._validateClassName,this.$validate.classList.value=l,this.$validate.innerHTML=(0,o.toMarkdownHtml)(s.message||"",{renderer:this.markdownRenderer}),(d=(u=this.$.parentElement)===null||u===void 0?void 0:u.parentElement)===null||d===void 0||d.classList.remove(v.INFO,v.ERROR,v.WARNING),(g=(E=this.$.parentElement)===null||E===void 0?void 0:E.parentElement)===null||g===void 0||g.classList.add(this._validateClassName)}removeValidateMessage(){var s,f,a,h,u;this._hasValidateElement&&((a=(f=(s=this.$.parentElement)===null||s===void 0?void 0:s.parentElement)===null||f===void 0?void 0:f.parentElement)===null||a===void 0||a.removeChild(this.$validate),this._hasValidateElement=!1,(u=(h=this.$.parentElement)===null||h===void 0?void 0:h.parentElement)===null||u===void 0||u.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:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RenamePromptHandle=void 0;const n=e(65747);class r extends n.PromptHandle{constructor(c,p){super(),this.originalFileName=c,this.target=p,this.$.value=c,this.setSelectionRange(0,c.lastIndexOf("."))}get id(){return this.target.id}get depth(){return this.target.depth}}t.RenamePromptHandle=r},48103:(x,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:(x,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 p;this.toDispose.dispose(),(p=this._root)===null||p===void 0||p.dispose()}get root(){return this._root}set root(p){var v;p!==this._root&&((v=this._root)===null||v===void 0||v.dispose(),this._root=p)}fireChanged(){this.onChangedEmitter.fire(void 0)}sortComparator(p,v){return p.constructor===v.constructor?p.name>v.name?1:p.name<v.name?-1:0:r.CompositeTreeNode.is(p)?-1:r.CompositeTreeNode.is(v)?1:0}}t.Tree=o},26353:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CompositeTreeNode=t.TreeNode=t.BranchOperatorStatus=void 0,t.spliceArray=c;const n=e(70392),r=e(34054),{Path:o}=n.path;function c(_,s,f=0,a){if(f===0&&(!a||a.length===0))return _;const h=_.slice(0,s),u=_.slice(s+f);return h.concat(a||[]).concat(u)}var p;(function(_){_[_.EXPANDED=1]="EXPANDED",_[_.SHRINKED=2]="SHRINKED"})(p||(t.BranchOperatorStatus=p={}));class v{static is(s){return!!s&&"depth"in s&&"name"in s&&"path"in s&&"id"in s}static getTreeNodeById(s){return v.idToTreeNode.get(s)}static getTreeNodeByPath(s){return v.pathToTreeNode.get(s)}static setTreeNode(s,f,a){v.idToTreeNode.set(s,a),v.pathToTreeNode.set(f,a)}static removeTreeNode(s,f){v.idToTreeNode.delete(s),v.pathToTreeNode.delete(f)}static getIdByPath(s){return v.pathToId.get(s)}static setIdByPath(s,f){return v.pathToId.set(s,f)}static getGlobalTreeState(s){let f=v.pathToGlobalTreeState.get(s);return f||(f={isExpanding:!1,isLoadingPath:!1,isRefreshing:!1,refreshCancelToken:new n.CancellationTokenSource,loadPathCancelToken:new n.CancellationTokenSource}),f}static setGlobalTreeState(s,f){let a=v.pathToGlobalTreeState.get(s);return a||(a={isExpanding:!1,isLoadingPath:!1,isRefreshing:!1,refreshCancelToken:new n.CancellationTokenSource,loadPathCancelToken:new n.CancellationTokenSource}),a={...a,...f},v.pathToGlobalTreeState.set(s,a),a}constructor(s,f,a,h){this._uid=v.nextId(),this._parent=f,this._tree=s,this._disposed=!1,this._visible=!0,this._metadata={...h||{}},this._depth=f?f.depth+1:0,a?this._watcher=a:f&&(this._watcher=f.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(v.nextId())),this._metadata[s]}addMetadata(s,f){if(!(s in this._metadata))this._metadata[s]=f,this._watcher.notifyDidChangeMetadata(this,{type:r.MetadataChangeType.Added,key:s,prevValue:void 0,value:f});else{const a=this._metadata[s];this._metadata[s]=f,this._watcher.notifyDidChangeMetadata(this,{type:r.MetadataChangeType.Updated,key:s,prevValue:a,value:f})}}removeMetadata(s){if(s in this._metadata){const f=this._metadata[s];delete this._metadata[s],this._watcher.notifyDidChangeMetadata(this,{type:r.MetadataChangeType.Removed,key:s,prevValue:f,value:void 0})}}mv(s,f=this.name){const a=this._parent;if(s===null||!m.is(s)){this.parent=void 0,this.dispose();return}const h=a!==s,u=this.path;this._depth=s.depth+1,(h||f!==this.name)&&(this.name=f,h&&this._watcher.notifyWillChangeParent(this,a,s),this.parent&&(this.parent.unlinkItem(this,!0),this.parent=s,this.parent.insertItem(this)),h&&this._watcher.notifyDidChangeParent(this,a,s)),this.path!==u&&this._watcher.notifyDidChangePath(this)}get visible(){return this._visible}setVisible(s){return this._visible=s,this}dispose(){this._disposed||(v.removeTreeNode(this.id,this.path),this._disposed=!0,this._watcher.notifyDidDispose(this))}}t.TreeNode=v,v.nextId=(()=>{let _=0;return()=>_++})(),v.idToTreeNode=new Map,v.pathToTreeNode=new Map,v.pathToId=new Map,v.pathToGlobalTreeState=new Map;class m extends v{static defaultSortComparator(s,f){return s.constructor===f.constructor?s.name>f.name?1:s.name<f.name?-1:0:m.is(s)?-1:m.is(f)?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,f=s.event,a=new n.DisposableCollection,h=d=>{this.watchEvents.delete(d)};return{notifyWillProcessWatchEvent:(d,E)=>{s.fire({type:r.TreeNodeEvent.WillProcessWatchEvent,args:[d,E]})},notifyWillChangeParent:(d,E,g)=>{s.fire({type:r.TreeNodeEvent.WillChangeParent,args:[d,E,g]})},notifyDidChangeParent:(d,E,g)=>{s.fire({type:r.TreeNodeEvent.DidChangeParent,args:[d,E,g]})},notifyDidDispose:d=>{s.fire({type:r.TreeNodeEvent.DidDispose,args:[d]})},notifyDidProcessWatchEvent:(d,E)=>{s.fire({type:r.TreeNodeEvent.DidProcessWatchEvent,args:[d,E]})},notifyDidChangePath:d=>{s.fire({type:r.TreeNodeEvent.DidChangePath,args:[d]})},notifyWillChangeExpansionState:(d,E)=>{const g=this.isItemVisibleAtSurface(d);s.fire({type:r.TreeNodeEvent.WillChangeExpansionState,args:[d,E,g]})},notifyDidChangeExpansionState:(d,E)=>{const g=this.isItemVisibleAtSurface(d);s.fire({type:r.TreeNodeEvent.DidChangeExpansionState,args:[d,E,g]})},notifyDidChangeMetadata:(d,E)=>{s.fire({type:r.TreeNodeEvent.DidChangeMetadata,args:[d,E]})},notifyDidUpdateBranch:()=>{s.fire({type:r.TreeNodeEvent.BranchDidUpdate,args:[]})},notifyWillResolveChildren:(d,E)=>{s.fire({type:r.TreeNodeEvent.WillResolveChildren,args:[d,E]})},notifyDidResolveChildren:(d,E)=>{s.fire({type:r.TreeNodeEvent.DidResolveChildren,args:[d,E]})},on:(d,E)=>{const g=f(l=>{l.type===d&&E(...l.args)});return a.push(g),g},onWatchEvent:(d,E)=>{const g=h;return this.watchEvents.set(d,{terminator:g,callback:E}),g},dispose:a}}constructor(s,f,a,h){super(s,f,a,h),this._children=null,this._lock=!1,this.refreshThrottler=new n.ThrottledDelayer(m.REFRESH_DELAY),this.toRefreshPathQueue=new Set,this.handleWatchEvent=async u=>{switch(this.watcher.notifyWillProcessWatchEvent(this,u),u.type){case r.WatchEvent.Moved:{const{oldPath:d,newPath:E}=u;if(typeof d!="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(d))throw new TypeError("oldPath must be absolute");if(o.isRelative(E))throw new TypeError("newPath must be absolute");this.transferItem(d,E);break}case r.WatchEvent.Added:{const{node:d}=u;if(!v.is(d))throw new TypeError("Expected node to be a TreeNode");this.insertItem(d);break}case r.WatchEvent.Removed:{const{path:d}=u,E=new o(d),g=E.dir.toString(),l=E.base.toString();if(g===this.path&&this.children){const y=this.children.find(b=>b.name===l);y&&this.unlinkItem(y)}break}default:this.isItemVisibleAtRootSurface(this)?await this.refresh():(this.isExpanded=!1,this._children=null);break}this.watcher.notifyDidProcessWatchEvent(this,u)},this.isExpanded=!f,this._branchSize=0,f?this._watcher=f.watcher:(this.watchEvents=new Map,this._watcher=this.generatorWatcher(),this._root=this,v.setTreeNode(this.id,this.path,this))}set name(s){const f=this.path;!m.isRoot(this)&&typeof this.watchTerminator=="function"?(this.watchTerminator(f),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,f=!1,a=!0,h){if(!this.disposed&&!m.isRoot(this)&&!this.isExpanded){if(a){const u=v.getGlobalTreeState(this.path);u.loadPathCancelToken.cancel(),u.refreshCancelToken.cancel(),v.setGlobalTreeState(this.path,{isExpanding:!0})}if(this.isExpanded=!0,this._children===null&&(this._watcher.notifyWillResolveChildren(this,this.isExpanded),await this.hardReloadChildren(h),this._watcher.notifyDidResolveChildren(this,this.isExpanded),!this.isExpanded||h?.isCancellationRequested)){a&&v.setGlobalTreeState(this.path,{isExpanding:!1});return}if(s&&this.parent&&m.is(this.parent)&&await this.parent.setExpanded(!0,!f,!1,h),h?.isCancellationRequested){a&&v.setGlobalTreeState(this.path,{isExpanding:!1});return}this.isExpanded&&(this._watcher.notifyWillChangeExpansionState(this,!0),this.expandBranch(this,f),this._watcher.notifyDidChangeExpansionState(this,!0)),a&&(v.setGlobalTreeState(this.path,{isExpanding:!1}),v.setTreeNode(this.id,this.path,this))}}getAllExpandedNodePath(){var s,f;const a=[];let h=0;m.isRoot(this)||(h=((s=this.root)===null||s===void 0?void 0:s.getIndexAtTreeNodeId(this.id))+1);const u=h+this.branchSize;for(let d=h;d<u;d++){const E=(f=this.root)===null||f===void 0?void 0:f.getTreeNodeAtIndex(d);m.is(E)&&E.expanded&&a.push(E.path)}return a}getAllCollapsedNodePath(){let s=[];if(this.children){for(let f=0;f<this.children.length;f++){const a=this.children[f];m.is(a)&&(a.isExpanded?s=s.concat(a.getAllCollapsedNodePath()):s.push(a.path))}return s}else return s}async resolveChildrens(s){var f,a,h;let u=this.children,d=[];try{u=await this._tree.resolveChildren(this)||[]}catch{u=[]}if(s?.isCancellationRequested)return!1;const E=new Array(u.length);this._children=Array(u.length);for(let l=0;l<u.length;l++){const y=u[l];y.id=v.getIdByPath(y.path)||y.id,this._children[l]=y,v.setIdByPath(y.path,y.id)}(f=this._children)===null||f===void 0||f.sort(this._tree.sortComparator||m.defaultSortComparator);for(let l=0;l<u.length;l++)E[l]=this._children[l].id;const g=[];for(let l=0,y=((a=this.children)===null||a===void 0?void 0:a.length)||0;l<y;l++){const b=(h=this.children)===null||h===void 0?void 0:h[l];if(m.is(b)&&b.expanded){const S=await b.resolveChildrens(s);if(S&&(d=d.concat(S)),s?.isCancellationRequested)return;g.push(b)}}this._branchSize=E.length,this.setFlattenedBranch(E);for(let l=0;l<g.length;l++){const y=g[l];y.expandBranch(y,!0)}return d.concat(g.map(l=>l.path.toString()))}updateTreeNodeCache(s){var f;if(v.setTreeNode(s.id,s.path,s),m.is(s)&&s.expanded&&(!((f=s.children)===null||f===void 0)&&f.length))for(let a=0;a<s.children.length;a++){const h=s.children[a];this.updateTreeNodeCache(h)}}async refreshTreeNodeByPaths(s=this.getAllExpandedNodePath(),f,a){if(!m.is(this))return;let h;const u=this.children;let d=this.children||[];if(this.expanded){if(this===a){try{d=await this._tree.resolveChildren(this)||[]}catch{d=[]}if(f?.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(;h=s.shift();){if(!(h.indexOf(`${this.path}${o.separator}`)>-1)){h===this.path&&(h=void 0);break}const g=d?.find(l=>l.path===h);if(g){if(m.is(g)&&!g.expanded){g.isExpanded=!0;const l=await g.resolveChildrens(f);if(f?.isCancellationRequested||(l&&(s=s.filter(y=>!l.find(b=>b.includes(y)))),s.length>0&&!f?.isCancellationRequested&&(s=await g.refreshTreeNodeByPaths([...s],f,a)||[],f?.isCancellationRequested)))return}}else{if(!d||d.length===0)break;for(let l=0;l<d.length;l++){const y=d[l];if(h.indexOf(`${y.path}${o.separator}`)===0&&m.is(y)){if(!m.is(y))continue;y.isExpanded=!0;const S=await y.resolveChildrens(f);if(f?.isCancellationRequested||(S&&(s=s.filter(A=>!S.find(w=>w===A))),y.path!==h&&!s.includes(y.path)&&s.unshift(h),s.length>0&&(s=await y.refreshTreeNodeByPaths([...s],f,a)||[],f?.isCancellationRequested)))return;break}}}}if(h){if(s.unshift(h),this===a){if(u){this.shrinkBranch(this,!0);for(let l=0;l<u.length;l++){const y=u[l];y?.dispose()}}const E=[],g=new Array(d.length);this._children=Array(d.length);for(let l=0;l<d.length;l++){const y=d[l];y.id=v.getIdByPath(y.path)||y.id,this._children[l]=y,v.setIdByPath(y.path,y.id),m.is(y)&&y.expanded&&E.push(y)}this._children.sort(this._tree.sortComparator||m.defaultSortComparator);for(let l=0;l<d.length;l++)g[l]=this._children[l].id;this._branchSize=g.length,this.setFlattenedBranch(g,!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=[],g=[],l=new Array(d.length);this._children=Array(d.length);for(let y=0;y<d.length;y++){const b=d[y];if(b.id=v.getIdByPath(b.path)||b.id,this._children[y]=b,v.setIdByPath(b.path,b.id),m.is(b)&&b.expanded){if(!b.children&&(await b.resolveChildrens(f),f?.isCancellationRequested))return;E.push(b)}else g.push(b)}this._children.sort(this._tree.sortComparator||m.defaultSortComparator);for(let y=0;y<d.length;y++)l[y]=this._children[y].id;this._branchSize=l.length,this.setFlattenedBranch(l,!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<g.length;y++){const b=g[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 l=0,y=this.children.length;l<y;l++)this.children[l].dispose();const g=new Array(d.length);this._children=Array(d.length);for(let l=0,y=d.length;l<y;l++){const b=d[l];b.id=v.getIdByPath(b.path)||b.id,this._children[l]=b,v.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 l=0;l<d.length;l++)g[l]=this._children[l].id;this._branchSize=g.length,this.setFlattenedBranch(g);for(let l=0;l<E.length;l++){const y=E[l];y.expandBranch(y,!0)}}else for(let g=0;g<d.length;g++){const l=d[g];l.expanded&&E.push(l)}for(let g=0;g<E.length;g++){const l=E[g];l.expandBranch(l,!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,g=this.children.length;E<g;E++)this.children[E].dispose();this._children=null}return}}async expandedAll(s=this.getAllCollapsedNodePath()){if(!m.isRoot(this))return;s=s.sort((a,h)=>o.pathDepth(a)-o.pathDepth(h));let f;for(;s.length>0;){f=s.pop();const a=v.getTreeNodeByPath(f);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,h)=>o.pathDepth(a)-o.pathDepth(h));let f;for(;s.length>0;){f=s.pop();const a=v.getTreeNodeByPath(f);m.is(a)&&a.setCollapsed(!0)}this.watcher.notifyDidUpdateBranch()}setCollapsed(s=!1){if(m.isRoot(this)||this.disposed||!this.isExpanded)return;const f=v.getGlobalTreeState(this.path);f.isExpanding||(f.loadPathCancelToken.cancel(),f.refreshCancelToken.cancel(),this._watcher.notifyWillChangeExpansionState(this,!1),this._children&&this.parent&&this.shrinkBranch(this,s),this.isExpanded=!1,v.setTreeNode(this.id,this.path,this),this._watcher.notifyDidChangeExpansionState(this,!1))}mv(s,f=this.name){const a=this.path;if(super.mv(s,f),typeof this.watchTerminator=="function"&&(this.watchTerminator(a),this.watchTerminator=this.watcher.onWatchEvent(this.path,this.handleWatchEvent)),this.children)for(let h=0;h<this.children.length;h++){const u=this.children[h];u.mv(u.parent,u.name)}}insertItem(s){if(s.parent!==this){s.mv(this,s.name);return}if(this.children){for(let g=0;g<this.children.length;g++)if(this.children[g].path===s.path){this.children[g]=s;return}}const f=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+=f;let a=this;for(;!a._flattenedBranch;)a.parent&&(a=a.parent,a._branchSize+=f);if(!this._children)return;let h=this._children.indexOf(s),u;const d=this._children[h-1];d?h=a._flattenedBranch.indexOf(d.id)+(d instanceof m&&d.expanded?d._branchSize:0):h=a._flattenedBranch.indexOf(this.id),h===-1&&this._branchSize===1&&(h=0),u=h+1,a._flattenedBranch.length===0&&(u=0);let E=[s.id];return s instanceof m&&s.expanded&&s._flattenedBranch&&(E=E.concat(s._flattenedBranch),s.setFlattenedBranch(null)),a.setFlattenedBranch(c(a._flattenedBranch,u,0,E)),v.setTreeNode(s.id,s.path,s),s}unlinkItem(s,f){var a;if(!this._children)return;const h=this._children.indexOf(s);if(h===-1||!this.isItemVisibleAtRootSurface(this))return;(a=this._children)===null||a===void 0||a.splice(h,1);const u=1+(s instanceof m&&s.expanded?s._branchSize:0);this._branchSize-=u;let d=this;for(;!d._flattenedBranch;)d.parent&&(d=d.parent,d._branchSize-=u);const E=d._flattenedBranch.indexOf(s.id);E!==-1&&(s instanceof m&&s.expanded&&s.setFlattenedBranch(d._flattenedBranch.slice(E+1,E+u)),d.setFlattenedBranch(c(d._flattenedBranch,E,u)),!f&&s.parent===this&&s.mv(null))}transferItem(s,f){var a;const h=new o(s),u=h.dir.toString();if(u!==this.path)return;const d=h.base.toString(),E=(a=this._children)===null||a===void 0?void 0:a.find(b=>b.name===d);if(!E)return;const g=new o(f),l=g.dir.toString(),y=l===u?this:v.getTreeNodeByPath(l);if(!m.is(y)){this.unlinkItem(E);return}return E.mv(y,g.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,f){this._flattenedBranch=s,m.isRoot(this)&&!f&&this.watcher.notifyDidUpdateBranch()}expandBranch(s,f){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(c(this._flattenedBranch,a,0,s._flattenedBranch),f),s.setFlattenedBranch(null,f)}else this.parent&&this.parent.expandBranch(s,f)}shrinkBranch(s,f){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),f),this.setFlattenedBranch(c(this._flattenedBranch,a,s._flattenedBranch?s._flattenedBranch.length:0),f)}else this.parent&&this.parent.shrinkBranch(s,f)}async hardReloadChildren(s){let f;const a=this.path;try{f=await this._tree.resolveChildren(this)||[]}catch{f=[]}if(!this.expanded||s?.isCancellationRequested)return!1;this.path!==a&&v.setGlobalTreeState(a,{isExpanding:!1,isLoadingPath:!1,isRefreshing:!1});const h=[],u=new Array(f.length),d=new Array(f.length);for(let E=0;E<f.length;E++){const g=f[E];if(g.id=v.getIdByPath(g.path)||g.id,d[E]=g,v.setIdByPath(g.path,g.id),m.is(g)&&g.expanded){if(g.children||await g.resolveChildrens(s),s?.isCancellationRequested)return!1;h.push(g)}}d.sort(this._tree.sortComparator||m.defaultSortComparator);for(let E=0;E<f.length;E++)u[E]=d[E].id;if(this.children&&this.shrinkBranch(this),this.children)for(let E=0;E<this.children.length;E++){const g=this.children[E];g?.dispose()}for(let E=0;E<d.length;E++)this.updateTreeNodeCache(d[E]);this._children=d,this._branchSize=u.length,this.setFlattenedBranch(u);for(let E=0;E<h.length;E++){const g=h[E];g.expandBranch(g,!0)}return typeof this.watchTerminator=="function"&&this.watchTerminator(this.path),this.watchTerminator=this.watcher.onWatchEvent(this.path,this.handleWatchEvent),!0}moveNode(s,f){if(typeof s!="string")throw new TypeError("Expected oldPath to be a string");if(typeof f!="string")throw new TypeError("Expected newPath to be a string");if(o.isRelative(s))throw new TypeError("oldPath must be absolute");if(o.isRelative(f))throw new TypeError("newPath must be absolute");return this.transferItem(s,f)}addNode(s){if(!v.is(s))throw new TypeError("Expected node to be a TreeNode");return this.insertItem(s)}removeNode(s){const f=new o(s),a=f.dir.toString(),h=f.base.toString();if(a===this.path&&this.children){const u=this.children.find(d=>d.name===h);u&&this.unlinkItem(u)}}async refresh(s,f){if(!m.isRoot(this))return await this.root.refresh(s,this);const a=v.getGlobalTreeState(this.path);if(a.isLoadingPath||a.isExpanding)return;let h;if(s&&!s.token.isCancellationRequested)v.setGlobalTreeState(this.path,{isRefreshing:!0,refreshCancelToken:s}),h=s.token;else if(a.refreshCancelToken.token.isCancellationRequested){const u=new n.CancellationTokenSource;v.setGlobalTreeState(this.path,{isRefreshing:!0,refreshCancelToken:u}),h=u.token}else h=a.refreshCancelToken.token;this.toRefreshPathQueue.add((f||this).path),await this.refreshThrottler.trigger(()=>this.doRefresh(h)),v.setGlobalTreeState(this.path,{isRefreshing:!1})}async doRefresh(s){const f=this.getRefreshNode()||this;if(!m.is(f))return;const a=f.getAllExpandedNodePath();await f.refreshTreeNodeByPaths(a,s,f)}getRefreshNode(){let s=Array.from(this.toRefreshPathQueue);if(this.toRefreshPathQueue.clear(),!s.length)return this.root;if(s=s.sort((h,u)=>{const d=o.pathDepth(h),E=o.pathDepth(u);return d-E}),s.length===1||o.pathDepth(s[0])===1)return v.getTreeNodeByPath(s[0]);const f=s.map(h=>new o(h));let a=f[0];for(let h=1,u=f.length;h<u;h++)if(!a.isEqualOrParent(f[h]))for(;!a.isRoot&&(a=a.dir,!(!a||a.isEqualOrParent(f[h]))););return a?v.getTreeNodeByPath(a.toString()):this.root}isItemVisibleAtRootSurface(s){let f=s;for(;f.parent;)f=f.parent;return f.isItemVisibleAtSurface(s)}isItemVisibleAtSurface(s){return s===this?!0:!!this._flattenedBranch&&this._flattenedBranch.indexOf(s.id)>-1}transformToRelativePath(s){const{splitPath:f}=o,a=f(s);return a.shift(),a}async loadTreeNodeByPath(s,f=!1){if(!m.isRoot(this))return;const a=v.getGlobalTreeState(this.path);if(a.isExpanding)return;a.refreshCancelToken.cancel(),a.loadPathCancelToken.cancel();const h=new n.CancellationTokenSource;v.setGlobalTreeState(this.path,{isLoadingPath:!0,loadPathCancelToken:h});const u=h.token,d=[],{splitPath:E,isRelative:g}=o,l=g(s)?E(s):this.transformToRelativePath(s);if(l.length===0)return v.setGlobalTreeState(this.path,{isLoadingPath:!1}),this;if(this.children||await this.ensureLoaded(u),u.isCancellationRequested){v.setGlobalTreeState(this.path,{isLoadingPath:!1});return}let y=this._children,b,S="",A;for(;y&&(A=l.shift());){let w=y.find(T=>T.name.indexOf(A)===0);if(w){if(m.is(w)){if(w._watcher.notifyWillChangeExpansionState(w,!0),w.isExpanded=!0,!w.children&&(await w.resolveChildrens(u),u.isCancellationRequested)){v.setGlobalTreeState(this.path,{isLoadingPath:!1});return}d.push(w),w._watcher.notifyDidChangeExpansionState(w,!0)}if(l.length===0){b=w;break}}if(!w&&b){const T=E(b.name).slice(1);if(T[0]===A){for(T.shift();T.length>0&&T[0]===l[0];)T.shift(),l.shift();A=l.shift(),w=y.find(D=>D.name.indexOf(A)===0)}}if(!w||!m.is(w)&&l.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]===l[0];)D.shift(),l.shift()}if(!w._children&&(S=w.path,m.is(w))){if(w.isExpanded=!0,!w.children&&(await w.resolveChildrens(u),u.isCancellationRequested)){v.setGlobalTreeState(this.path,{isLoadingPath:!1});return}d.push(w)}if(w&&l.length===0){b=w;break}else{if(S&&S!==w.path){const D=E(S),I=E(w.path);I.length>D.length&&l.splice(0,I.length-D.length)}y=w._children,b=w}}}if(b){let w;if(b.disposed){v.setGlobalTreeState(this.path,{isLoadingPath:!1});return}for(;w=d.pop();)w.expandBranch(w,!0),d.length===0&&this.updateTreeNodeCache(w);return f||this.watcher.notifyDidUpdateBranch(),v.setGlobalTreeState(this.path,{isLoadingPath:!1}),b}v.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 f;const a=(f=this._flattenedBranch)===null||f===void 0?void 0:f[s];if(a)return v.getTreeNodeById(a)}getTreeNodeById(s){return v.getTreeNodeById(s)}getTreeNodeByPath(s){return v.getTreeNodeByPath(s)}}t.CompositeTreeNode=m,m.REFRESH_DELAY=200},58781:(x,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(_,s){this.addChangeListener=_,this.removeChangeListener=s}}t.ClasslistComposite=o;var c;(function(m){m[m.Applicable=1]="Applicable",m[m.Inheritable=2]="Inheritable"})(c||(t.CompositeDecorationType=c={}));var p;(function(m){m[m.UnTargetDecoration=1]="UnTargetDecoration",m[m.TargetDecoration=2]="TargetDecoration"})(p||(t.ChangeReason=p={}));class v{constructor(_,s,f){this.handleDecorationDidAddClassname=a=>{const{classname:h}=a;!this.selfOwned||!h||(this.compositeCssClasslist.classlist.push(h),this.notifyClasslistChange())},this.handleDecorationDidRemoveClassname=a=>{const{classname:h}=a;if(!this.selfOwned||!h)return;const u=this.compositeCssClasslist.classlist.indexOf(h);u>-1&&(this.compositeCssClasslist.classlist.splice(u,1),this.notifyClasslistChange())},this.mergeDecorationClasslist=a=>{const{decoration:h}=a;this.selfOwned&&(this.compositeCssClasslist.classlist.push(...h.cssClassList),this.notifyClasslistChange())},this.handleDecorationDisable=a=>{const{decoration:h}=a;this.removeDecorationClasslist(h)},this.target=_,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)),f?(this.selfOwned=!1,this.parent=f,this.renderedDecorations=f.renderedDecorations,this.compositeCssClasslist.classlist=f.compositeCssClasslist.classlist,f.linkedComposites.add(this)):(this.renderedDecorations=new Map,this.targetedDecorations=new Set,this.negatedDecorations=new Set,this.compositeCssClasslist.classlist=[],this.selfOwned=!0)}changeParent(_){if(_){if(!this.selfOwned)return this.parentOwn(_);for(const[s]of this.renderedDecorations)this.recursiveRefresh(this,!1,p.UnTargetDecoration,s,!1);this.parent!==_&&(this.parent.linkedComposites.delete(this),this.parent=_,_.linkedComposites.add(this));for(const[s]of _.renderedDecorations)this.recursiveRefresh(this,!1,p.TargetDecoration,s,!1)}}add(_){const s=_.appliedTargets.get(this.target),f=s&&(s===r.TargetMatchMode.Self||s===r.TargetMatchMode.SelfAndChildren),a=s&&(s===r.TargetMatchMode.Children||s===r.TargetMatchMode.SelfAndChildren);if(!(this.type===c.Applicable&&!f)&&!(this.type===c.Inheritable&&!a)){if(!this.selfOwned){this.selfOwn(p.TargetDecoration,_),this.targetedDecorations.add(_);return}this.targetedDecorations.has(_)||(this.targetedDecorations.add(_),this.recursiveRefresh(this,!1,p.TargetDecoration,_))}}remove(_){if(this.selfOwned&&this.targetedDecorations.delete(_)){if(this.negatedDecorations.size===0&&this.targetedDecorations.size===0&&this.parent)return this.parentOwn(void 0,p.UnTargetDecoration,_);this.recursiveRefresh(this,!1,p.UnTargetDecoration,_)}}negate(_){const s=_.negatedTargets.get(this.target),f=s&&(s===r.TargetMatchMode.Self||s===r.TargetMatchMode.SelfAndChildren),a=s&&(s===r.TargetMatchMode.Children||s===r.TargetMatchMode.SelfAndChildren);if(!(this.type===c.Applicable&&!f)&&!(this.type===c.Inheritable&&!a)){if(!this.selfOwned){this.selfOwn(p.UnTargetDecoration,_),this.negatedDecorations.add(_);return}this.negatedDecorations.has(_)||(this.negatedDecorations.add(_),this.renderedDecorations.has(_)&&this.removeDecorationClasslist(_))}}unNegate(_){if(this.selfOwned&&this.negatedDecorations.delete(_)){if(this.negatedDecorations.size===0&&this.targetedDecorations.size===0&&this.parent)return this.parentOwn();!this.renderedDecorations.has(_)&&(this.parent.renderedDecorations.has(_)||_.appliedTargets.has(this.target))&&this.recursiveRefresh(this,!1,p.TargetDecoration,_)}}selfOwn(_,s){if(this.selfOwned)throw new Error("CompositeDecoration is already self owned");const f=this.parent;this.selfOwned=!0,this.compositeCssClasslist.classlist=[],this.renderedDecorations=new Map,this.targetedDecorations=new Set,this.negatedDecorations=new Set;for(const[a]of f.renderedDecorations)a!==s&&this.processCompositeAlteration(p.TargetDecoration,a);_===p.UnTargetDecoration&&this.parent.renderedDecorations.has(s)&&!this.renderedDecorations.has(s)&&this.notifyClasslistChange(!1),this.recursiveRefresh(this,!0,_,s)}parentOwn(_,s,f){this.selfOwned=!1,this.targetedDecorations&&this.targetedDecorations.clear(),this.negatedDecorations&&this.negatedDecorations.clear(),_&&this.parent!==_&&(this.parent&&this.parent.linkedComposites.delete(this),_.linkedComposites.add(this),this.parent=_),this.recursiveRefresh(this,!0,s,f)}processCompositeAlteration(_,s){if(!this.selfOwned)throw new Error("CompositeDecoration is not self owned");if(_===p.UnTargetDecoration){const f=this.renderedDecorations.get(s);if(f){const a=s.appliedTargets.get(this.target),h=a&&(a===r.TargetMatchMode.Self||a===r.TargetMatchMode.SelfAndChildren),u=a&&(a===r.TargetMatchMode.Children||a===r.TargetMatchMode.SelfAndChildren);return h&&this.type===c.Applicable||u&&this.type===c.Inheritable?!1:(this.removeDecorationClasslist(s,!1),f&&f.dispose(),this.renderedDecorations.delete(s))}return!1}if(_===p.TargetDecoration){const f=s.negatedTargets.get(this.target),a=f&&(f===r.TargetMatchMode.Self||f===r.TargetMatchMode.SelfAndChildren),h=f&&(f===r.TargetMatchMode.Children||f===r.TargetMatchMode.SelfAndChildren);if(a&&this.type===c.Applicable||h&&this.type===c.Inheritable)return!1;if(!this.renderedDecorations.has(s)){const u=new n.DisposableCollection;return u.push(s.onDidAddCSSClassname(this.handleDecorationDidAddClassname)),u.push(s.onDidRemoveCSSClassname(this.handleDecorationDidRemoveClassname)),u.push(s.onDidDisableDecoration(this.handleDecorationDisable)),u.push(s.onDidEnableDecoration(this.mergeDecorationClasslist)),this.renderedDecorations.set(s,u),s.disabled?!1:(this.compositeCssClasslist.classlist.push(...s.cssClassList),!0)}}return!1}recursiveRefresh(_,s,f,a,h=!0){if(!this.selfOwned&&s&&(this.renderedDecorations=this.parent.renderedDecorations,this.compositeCssClasslist.classlist=this.parent.compositeCssClasslist.classlist),this.selfOwned&&s&&_!==this){for(const[u]of this.renderedDecorations)this.processCompositeAlteration(p.UnTargetDecoration,u);for(const[u]of this.parent.renderedDecorations)this.processCompositeAlteration(p.TargetDecoration,u);h&&this.notifyClasslistChange(!1)}else this.selfOwned&&f===p.UnTargetDecoration&&a&&this.renderedDecorations.has(a)?(this.processCompositeAlteration(f,a),h&&this.notifyClasslistChange(!1)):this.selfOwned&&f===p.TargetDecoration&&a&&this.processCompositeAlteration(f,a)&&h?this.notifyClasslistChange(!1):!this.selfOwned&&h&&this.notifyClasslistChange(!1);for(const u of this.linkedComposites)u.recursiveRefresh(_,s,f,a,h)}removeDecorationClasslist(_,s=!0){if(this.selfOwned){for(const f of _.cssClassList){const a=this.compositeCssClasslist.classlist.indexOf(f);a>-1&&this.compositeCssClasslist.classlist.splice(a,1)}s&&this.notifyClasslistChange()}}notifyClasslistChange(_=!0){for(const s of[...this.classlistChangeCallbacks])s();if(_)for(const s of this.linkedComposites)s.selfOwned||s.notifyClasslistChange()}}t.CompositeDecoration=v},96336:(x,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(p){p[p.None=1]="None",p[p.Self=2]="Self",p[p.Children=3]="Children",p[p.SelfAndChildren=4]="SelfAndChildren"})(o||(t.TargetMatchMode=o={}));class c{constructor(...v){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(v))if(v.every(m=>typeof m=="string"))this._cssClassList=new Set(v);else throw new TypeError("classlist must be of type `Array<string>`");else this._cssClassList=new Set}get disabled(){return this._disabled}set disabled(v){this._disabled=v,v?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(v){this._cssClassList.has(v)||(this._cssClassList.add(v),this.onDidAddCSSClassnameEmitter.fire({decoration:this,classname:v}))}removeCSSClass(v){this._cssClassList.has(v)&&(this._cssClassList.delete(v),this.onDidRemoveCSSClassnameEmitter.fire({decoration:this,classname:v}))}hasTarget(v){return!!this._appliedTargets.get(v)}addTarget(v,m=o.Self){if(this._appliedTargets.get(v)===m||!r.TreeNode.is(v))return;this._appliedTargets.set(v,m);const s=n.Disposable.create(()=>{this.removeTarget(v)});return this.appliedTargetsDisposables.set(v,s),this.onDidAddTargetEmitter.fire({decoration:this,target:v}),s}removeTarget(v){if(this._appliedTargets.delete(v)){const m=this.appliedTargetsDisposables.get(v);m&&m.dispose(),this.onDidRemoveTargetEmitter.fire({decoration:this,target:v})}}clearAppliedTarget(){const v=Array.from(this._appliedTargets.keys());for(const m of v)this.removeTarget(m)}clearNegateTarget(){const v=Array.from(this._negatedTargets.keys());for(const m of v)this.unNegateTarget(m)}negateTarget(v,m=o.Self){if(this._negatedTargets.get(v)===m||!r.TreeNode.is(v))return;this._negatedTargets.set(v,m);const s=n.Disposable.create(()=>{this.unNegateTarget(v)});return this.negatedTargetsDisposables.set(v,s),this.onDidNegateTargetEmitter.fire({decoration:this,target:v}),s}unNegateTarget(v){if(this._negatedTargets.delete(v)){const m=this.negatedTargetsDisposables.get(v);m&&m.dispose(),this.onDidUnNegateTargetEmitter.fire({decoration:this,target:v})}}}t.Decoration=c},29701:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DecorationsManager=void 0;const n=e(70392),r=e(34054),o=e(26353),c=e(58781);class p{constructor(m){this.root=m,this.decorations=new Map,this.decorationsMeta=new WeakMap,this.disposables=new n.DisposableCollection,this.disposed=!1,this.targetDecoration=_=>{const{decoration:s,target:f}=_,a=this.getDecorationData(f);if(a){const{applicable:h,inheritable:u}=a;h.add(s),u&&u.add(s)}},this.updateTarget=()=>{for(const[_]of this.decorations)for(const[s,f]of Array.from(_.appliedTargets)){_.removeTarget(s);const a=this.root.getTreeNodeByPath(s.path);a&&_.addTarget(a,f)}},this.unTargetDecoration=_=>{const{decoration:s,target:f}=_,a=this.getDecorationData(f);if(a){const{applicable:h,inheritable:u}=a;h.remove(s),u&&u.remove(s)}},this.negateDecoration=_=>{const{decoration:s,target:f}=_,a=this.getDecorationData(f);if(a){const{applicable:h,inheritable:u}=a;h.negate(s),u&&u.negate(s)}},this.unNegateDecoration=_=>{const{decoration:s,target:f}=_,a=this.getDecorationData(f);if(a){const{applicable:h,inheritable:u}=a;h.unNegate(s),u&&u.unNegate(s)}},this.switchParent=(_,s,f)=>{const a=this.decorationsMeta.get(_);if(!a)return;const h=this.getDecorationData(f);h&&(a.applicable.changeParent(h.inheritable),a.inheritable&&a.inheritable.changeParent(h.inheritable))},this.decorationsMeta.set(m,{applicable:new c.CompositeDecoration(m,c.CompositeDecorationType.Applicable),inheritable:new c.CompositeDecoration(m,c.CompositeDecorationType.Inheritable)}),this.disposables.push(m.watcher.on(r.TreeNodeEvent.DidChangeParent,this.switchParent)),this.disposables.push(m.watcher.on(r.TreeNodeEvent.DidDispose,_=>this.decorationsMeta.delete(_))),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 _=new n.DisposableCollection;_.push(m.onDidAddTarget(this.targetDecoration)),_.push(m.onDidRemoveTarget(this.unTargetDecoration)),_.push(m.onDidNegateTarget(this.negateDecoration)),_.push(m.onDidUnNegateTarget(this.unNegateDecoration)),this.decorations.set(m,_);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 _=this.decorations.get(m);if(_){for(const[s]of m.appliedTargets){const f=this.decorationsMeta.get(s);f&&(f.applicable.remove(m),f.inheritable&&f.inheritable.remove(m))}for(const[s]of m.negatedTargets){const f=this.decorationsMeta.get(s);f&&(f.applicable.unNegate(m),f.inheritable&&f.inheritable.unNegate(m))}_.dispose(),this.decorations.delete(m)}}getDecorations(m){if(!m||!o.TreeNode.is(m))return;const _=this.getDecorationData(m);if(_)return _.applicable.compositeCssClasslist}getDecorationData(m){if(this.disposed)return;const _=this.decorationsMeta.get(m);if(_)return _;if(!m||!m.parent)return;const s=this.getDecorationData(m.parent);if(s){const f={applicable:new c.CompositeDecoration(m,c.CompositeDecorationType.Applicable,s.inheritable),inheritable:o.CompositeTreeNode.is(m)?new c.CompositeDecoration(m,c.CompositeDecorationType.Inheritable,s.inheritable):void 0};return this.decorationsMeta.set(m,f),f}}}t.DecorationsManager=p},24936:(x,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:(x,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:(x,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 c{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(v){this._root=v,this.initState(v),this.root&&(this._ensureReady=this.root.ensureLoaded())}get state(){return this._state}set state(v){this._state=v}init(v){this.root=v,this.root.watcher.on(r.TreeNodeEvent.BranchDidUpdate,this.dispatchChange)}initState(v){this.state=new o.TreeStateManager(v)}loadTreeState(v){return typeof v=="string"&&(v=JSON.parse(v)),this.state.loadTreeState(v)}getTreeStateWatcher(v=!1){return new o.TreeStateWatcher(this.state,v)}resolveChildren(v){return Promise.resolve(Array.from(v.children))}}t.TreeModel=c},58615:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),e(85608).__exportStar(e(13674),t)},12165:(x,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:c}=n.path;var p;(function(_){_[_.SetExpanded=1]="SetExpanded",_[_.SetCollapsed=2]="SetCollapsed",_[_.SetActive=3]="SetActive"})(p||(t.Operation=p={}));var v;(function(_){_[_.Expanded=1]="Expanded",_[_.Collapsed=2]="Collapsed",_[_.Disabled=4]="Disabled"})(v||(v={}));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=(f,a,h)=>{var u;if(this.stashing&&this.stashKeyframes&&this.stashKeyframes.set(f.id,a?v.Expanded:v.Collapsed),this.stashKeyframes&&!this.stashing){if(a){let E=f;for(;E;){if(this.stashKeyframes.has(E.id)){let g=this.stashKeyframes.get(E.id);g=g|v.Disabled,this.stashKeyframes.set(E.id,g)}E=E.parent}this.stashLockingItems.add(f)}if(this.stashLockingItems&&this.stashLockingItems.has(f)&&!a){let E=f;for(;E;){if(this.stashKeyframes.has(E.id)){let g=this.stashKeyframes.get(E.id);g&=~v.Disabled,this.stashKeyframes.set(E.id,g)}E=E.parent}this.stashLockingItems.delete(f)}}let d=this.expandedDirectories.get(f);a&&!d?(d=(u=new c(this.root.path).relative(new c(f.path)))===null||u===void 0?void 0:u.toString(),this.expandedDirectories.set(f,d),this.onDidChangeExpansionStateEmitter.fire({relativePath:d,isExpanded:a,isVisibleAtSurface:h})):!a&&d&&(this.expandedDirectories.delete(f),this.onDidChangeExpansionStateEmitter.fire({relativePath:d,isExpanded:a,isVisibleAtSurface:h}))},this.handleDidChangePath=f=>{var a;if(this.expandedDirectories.has(f)){const h=this.expandedDirectories.get(f),u=(a=new c(this.root.path).relative(new c(f.path)))===null||a===void 0?void 0:a.toString();this.expandedDirectories.set(f,u),this.onDidChangeRelativePathEmitter.fire({prevPath:h,newPath:u})}},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 f of s.expandedDirectories.buried)try{const a=await this.root.loadTreeNodeByPath(f);if(!a)break;a&&o.CompositeTreeNode.is(a)&&a.setCollapsed()}catch{}for(const f of s.expandedDirectories.atSurface)try{if(!await this.root.loadTreeNodeByPath(f,!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[f,a]of s){const h=(a&v.Disabled)===v.Disabled,u=o.TreeNode.getTreeNodeById(f);!u||h||((a&v.Expanded)===v.Expanded?u.setCollapsed():(a&v.Collapsed)===v.Collapsed&&await u.setExpanded())}}}t.TreeStateManager=m},72782:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TreeStateWatcher=void 0;const n=e(70392),r=e(13440);class o{constructor(p,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(p.onChangeScrollOffset(m=>{this.currentState.scrollPosition=m,this.onDidTreeStateChangeEmitter.fire(r.TreeStateWatcherChangeType.ScrollOffset)})),this.disposables.push(p.onDidChangeRelativePath(({prevPath:m,newPath:_})=>{let s=!1;const f=new Set(this.currentState.expandedDirectories.atSurface);if(f.has(m)&&(f.delete(m),f.add(_),s=!0),this.currentState.expandedDirectories.atSurface=Array.from(f),v){const a=new Set(this.currentState.expandedDirectories.buried);a.has(m)&&(f.delete(m),f.add(_),s=!0),this.currentState.expandedDirectories.buried=Array.from(a)}s&&this.onDidTreeStateChangeEmitter.fire(r.TreeStateWatcherChangeType.PathsUpdated)})),this.disposables.push(p.onDidChangeExpansionState(({relativePath:m,isExpanded:_,isVisibleAtSurface:s})=>{let f=!1;const a=new Set(this.currentState.expandedDirectories.atSurface),h=new Set(this.currentState.expandedDirectories.buried);if(a.has(m)&&(!_||!s)){a.delete(m);const d=Array.from(a).filter(E=>E.indexOf(m)>=0);for(const E of d)a.delete(E),h.has(E)||h.add(E);f=!0}else _&&s&&(a.add(m),f=!0);this.currentState.expandedDirectories.atSurface=Array.from(a),v||(h.has(m)&&(!_||s)?(h.delete(m),f=!0):_&&!s&&(h.add(m),f=!0),this.currentState.expandedDirectories.buried=Array.from(h)),f&&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:(x,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:(x,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:(x,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:(x,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:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},3754:(x,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:(x,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)),c=n.__importStar(e(14041)),p=e(70392),v=e(56875);e(93324);const m=({onScroll:_,onUpdate:s,forwardedRef:f,style:a,children:h,className:u,onReachBottom:d,tabBarMode:E,thumbSize:g=5,hiddenVertical:l,hiddenHorizontal:y,universal:b=!1})=>{const S=(0,c.useRef)(new p.DisposableCollection),A=(0,c.useRef)(),w=(0,c.useCallback)(M=>{M?(A.current=M.view,f&&(typeof f=="function"?f(M.view):f.current=M.view)):f&&typeof f=="function"&&f(null)},[]),T=(0,c.useRef)(),D=(0,c.useRef)(),I=(0,c.useCallback)(M=>{if(!M)return;const{scrollTop:R,scrollHeight:P,clientHeight:k}=M;if(P===0&&k===0)return;(R+100)/(P-k)>1&&d&&d()},[d]),O=(0,c.useCallback)((0,o.default)(M=>{if(!M)return;const{scrollTop:R,scrollLeft:P}=M,k=1/20*Math.min(R,20),F=1/20*Math.min(P,20);T.current&&(T.current.style.opacity=String(k)),D.current&&(D.current.style.opacity=String(F)),I(M),s&&s(M)},100),[s,I,T.current,D.current]);return(0,c.useEffect)(()=>{const M=R=>{A.current&&(R.preventDefault(),R.stopPropagation(),A.current.clientHeight>=A.current.scrollHeight&&(R.deltaY!==0&&(A.current.scrollLeft+=R.deltaY),R.deltaX!==0&&(A.current.scrollLeft+=R.deltaX)))};return E&&A.current&&A.current.addEventListener("wheel",M),()=>{var R;(R=A.current)===null||R===void 0||R.removeEventListener("wheel",M)}},[A.current,E]),(0,c.useEffect)(()=>()=>S.current.dispose(),[]),c.default.createElement(v.Scrollbars,{ref:w,style:{...a,overflow:"hidden"},className:(0,r.default)(u,"kt-scrollbar"),onUpdate:O,onScroll:_,universal:b,renderTrackHorizontal:({style:M,...R})=>{const P={...M,height:g,left:0,right:0,bottom:1};return y&&(P.display="none"),c.default.createElement("div",{...R,style:P})},renderTrackVertical:({style:M,...R})=>{const P={...M,width:g,top:0,right:1,bottom:0};return l&&(P.display="none"),c.default.createElement("div",{...R,style:P})},renderThumbVertical:({style:M,className:R,...P})=>{const k={...M,width:g};return l&&(k.display="none"),c.default.createElement("div",{...P,style:k,className:(0,r.default)(R,"scrollbar-thumb-vertical")})},renderThumbHorizontal:({style:M,className:R,...P})=>{const k={...M,height:g,display:"none"};return y&&(k.display="none"),c.default.createElement("div",{...P,style:k,className:(0,r.default)(R,"scrollbar-thumb-horizontal")})}},c.default.createElement("div",{ref:M=>{T.current=M},className:"scrollbar-decoration-vertical"}),c.default.createElement("div",{ref:M=>{D.current=M},className:"scrollbar-decoration-horizontal"}),h)};t.Scrollbars=m,t.Scrollbars.displayName="CustomScrollbars",t.ScrollbarsVirtualList=c.default.forwardRef((_,s)=>c.default.createElement(t.Scrollbars,{..._,thumbSize:10,forwardedRef:s})),t.ScrollbarsVirtualList.displayName="ScrollbarsVirtualList"},14640:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SelectOptionsList=t.Option=void 0,t.isDataOptions=a,t.isDataOptionGroups=h,t.Select=S;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importStar(e(14041)),c=e(54713),p=e(50708);e(11110);const v=({value:w,children:T,disabled:D,onClick:I,className:O,...M})=>o.default.createElement("span",{...M,className:(0,r.default)(O,{"kt-option-disabled":D}),onClick:()=>I&&!D&&I(w)},T);t.Option=v;function m(...w){}function _(w,T){return T?w.props[T]:w.props.value}function s(w,T){let D=[];return Array.isArray(w)?D=o.default.Children.toArray(w).map(T):D=[T(w)],D}function f(w,T,D=(I,O)=>I===O){const O=o.default.Children.toArray(T).filter(M=>o.default.isValidElement(M)).find(M=>{var R;return M.props&&D((R=M.props)===null||R===void 0?void 0:R.value,w)?M:null});return O?.props}function a(w){return w?w.length===0?!0:u(w[0]):!1}function h(w){return w?w.length===0?!0:d(w[0]):!1}function u(w){return w.value!==void 0}function d(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 g({group:w,index:T}){return o.default.createElement("div",{key:"header_"+T,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 l(w,T){let D=T.label;if(D===void 0)try{D=T.value.toString()}catch{D=void 0}return typeof D=="string"?D.indexOf(w)!==-1:!1}const y=o.default.memo(({selected:w,selectedRenderer:T})=>T?o.default.createElement(T,{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:T,placeholder:D,size:I="default"})=>o.default.createElement(p.Input,{className:"kt-select-search",value:w,size:I,onChange:O=>T(O.target.value),autoFocus:!0,placeholder:D||""}));function S({disabled:w,options:T,size:D="default",children:I,value:O,onChange:M,onMouseEnter:R,optionLabelProp:P,style:k,optionStyle:F,className:L,maxHeight:N,equals:j=(q,Re)=>q===Re,optionRenderer:W=E,groupTitleRenderer:U,footerComponent:X,headerComponent:V,showSearch:$=!1,filterOption:Y=l,searchPlaceholder:G="",emptyComponent:H,selectedRenderer:K,onBeforeShowOptions:Z,allowOptionsOverflow:Q,dropdownRenderType:oe="fixed",description:ne,notMatchWarning:he,onSearchChange:_e}){const[q,Re]=(0,o.useState)(!1),[ve,ie]=(0,o.useState)(""),fe=o.default.useRef(null),Me=o.default.useRef(null),Le=(0,o.useCallback)(Ae=>{Ae.preventDefault(),Ae.stopPropagation(),!(!q&&Z?.())&&Re(!q)},[q,Z]),Se=(0,o.useCallback)(()=>{var Ae,Ue,$e,Ve,lt,qe,Rt,nt,St;if(T&&a(T)){for(const it of T)if(j(O,it.value))return{iconClass:it.iconClass,label:it.label,value:it.value};return{iconClass:(Ae=T[0])===null||Ae===void 0?void 0:Ae.iconClass,label:(Ue=T[0])===null||Ue===void 0?void 0:Ue.label,value:($e=T[0])===null||$e===void 0?void 0:$e.value}}else if(T&&h(T)){for(const it of T)for(const st of it.options)if(j(O,st.value))return{iconClass:st.iconClass,label:st.label,value:st.value};return{iconClass:(lt=(Ve=T[0])===null||Ve===void 0?void 0:Ve.options[0])===null||lt===void 0?void 0:lt.iconClass,label:(Rt=(qe=T[0])===null||qe===void 0?void 0:qe.options[0])===null||Rt===void 0?void 0:Rt.label,value:(St=(nt=T[0])===null||nt===void 0?void 0:nt.options[0])===null||St===void 0?void 0:St.value}}else{const it=I&&f(O,I);if(it)return{label:it.label||it.value,value:it.value}}return{label:O,value:O,notMatch:!0}},[T,O,I])(),Ee=(0,r.default)("kt-select-options",{"kt-select-options-visible":q,[`kt-select-options-${D}`]:D}),ge=he&&Se.notMatch,xe=(0,r.default)("kt-select-value",{"kt-select-warning":ge,"kt-select-disabled":w,"kt-select-value-active":q,[`kt-select-value-${D}`]:D});function Te(Ae,Ue){var $e;if(!Ae)return null;(typeof Ae=="string"||typeof Ae=="number")&&(Ae=o.default.createElement(t.Option,{value:Ae,label:String(Ae),key:`${Ae}_${Ue}`},Ae));const Ve=Ae,lt=(($e=Ve.props)===null||$e===void 0?void 0:$e.disabled)||!1;return o.default.createElement("div",{key:`${Ve.props.value}_${Ue}`,className:(0,r.default)({"kt-select-option-select":O===Ve.props.value}),onMouseEnter:()=>R?.(Ve.props.value,Ue),onClick:lt?m:()=>{Re(!1),M&&M(_(Ae,P))}},Ae)}(0,o.useEffect)(()=>{!q&&ve&&ie("")},[]),(0,o.useEffect)(()=>{if(!q)return;const Ae=Ue=>{fe.current&&!fe.current.contains(Ue.target)&&Re(!1)};return document.addEventListener("click",Ae),()=>document.removeEventListener("click",Ae)},[q]);const Fe=(0,o.useCallback)(()=>{if(!fe.current||!Me.current)return;const Ae=fe.current.getBoundingClientRect(),Ue=Me.current;Q?(Ue.style.minWidth=`${Ae.width}px`,Ue.style.maxWidth=`${window.innerWidth-Ae.left-4}px`):Ue.style.width=`${Ae.width}px`;const $e=window.innerHeight-Ae.bottom-50,Ve=Ue.clientHeight;$e<Ve?Ue.style.bottom=`${Ae.height+4}px`:(Ue.style.maxHeight=`${$e}px`,Ue.style.bottom="auto"),Ue.style.position=oe},[Q,oe]);(0,o.useEffect)(()=>{if(q)return Fe(),window.addEventListener("resize",Fe),()=>window.removeEventListener("resize",Fe)},[q,Fe]);const pe=(0,o.useMemo)(()=>ve?a(T)?T.filter(Ae=>Y(ve,Ae)):h(T)?T.reduce((Ae,Ue)=>{const $e=Ue.options.filter(Ve=>Y(ve,Ve,Ue));return $e.length&&Ae.push({...Ue,options:$e}),Ae},[]):T:T,[T,ve,Y]),re=()=>o.default.createElement(o.default.Fragment,null,o.default.createElement(y,{selected:Se,selectedRenderer:K}),o.default.createElement(c.Icon,{iconClass:(0,r.default)((0,c.getIcon)("down"),"kt-select-value-default-icon")})),ue=(0,o.useCallback)(Ae=>{ie(Ae),_e?.(Ae)},[ve,_e]),Oe=()=>o.default.createElement(b,{value:ve,onChange:ue,placeholder:G});return o.default.createElement("div",{className:(0,r.default)("kt-select-container",L),ref:fe},o.default.createElement("div",{className:xe,onClick:Le,style:k},$&&q?Oe():re()),ge&&o.default.createElement("div",{className:"kt-select-warning-text"},he),q&&!ve&&(a(pe)||h(pe)?o.default.createElement(t.SelectOptionsList,{optionRenderer:W,options:pe,equals:j,optionStyle:F,currentValue:O,size:D,onSelect:Ae=>{M&&M(Ae),Re(!1)},groupTitleRenderer:U,className:Ee,style:{maxHeight:`${N}px`},ref:Me,footerComponent:X,headerComponent:V,emptyComponent:H}):o.default.createElement("div",{className:Ee,style:{maxHeight:`${N}px`},ref:Me},T&&T.map((Ae,Ue)=>Te(Ae,Ue)),I&&s(I,Te),ne&&o.default.createElement(A,{text:ne}),o.default.createElement("div",{className:"kt-select-overlay",onClick:Le}))))}function A({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,T)=>{const{options:D,optionRenderer:I=E,equals:O=(H,K)=>H===K,onSelect:M,currentValue:R,optionStyle:P,size:k,className:F,style:L,groupTitleRenderer:N=g,renderCheck:j,headerComponent:W,footerComponent:U,emptyComponent:X}=w,V=(0,r.default)("kt-select-options",{[`kt-select-options-${k}`]:!0},F);function $(H){return H.map((K,Z)=>{const Q=o.default.createElement(N,{group:K,index:Z});return o.default.createElement(o.default.Fragment,{key:"group_"+Z},Q,Y(K.options))})}function Y(H){return H&&H.map((K,Z)=>{const Q=O(R,K.value);return o.default.createElement(t.Option,{value:Z,key:Z,className:(0,r.default)({"kt-select-option-select":Q,"kt-select-option-default":!0,"kt-option-with-check":j}),onClick:()=>M(K.value),style:P},j&&O(R,K.value)?o.default.createElement("div",{className:"kt-option-check"},o.default.createElement(c.Icon,{icon:"check"})):void 0,o.default.createElement(I,{data:K,isCurrent:Q}))})}let G;return h(D)?G=D.filter(H=>H.options.length>0).length===0:G=D.length===0,o.default.createElement("div",{className:V,style:L,ref:T,onClick:H=>{H.stopPropagation()}},W?o.default.createElement(W,null):null,G&&X?o.default.createElement(X,null):(h(D)?$(D):Y(D))||X&&o.default.createElement(X,null),U?o.default.createElement(U,null):null)})},54076:(x,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 c=p=>{const{tabs:v,className:m,value:_,onChange:s,mini:f,style:a,...h}=p,u=o.default.useCallback(d=>{typeof s=="function"&&s(d)},[]);return o.default.createElement("div",{...h,style:a,className:(0,r.default)("kt-tabs",m,{"kt-tabs-mini":f})},v.map((d,E)=>{const g=E===_?"kt-tab-selected":"";return typeof d=="string"?o.default.createElement("div",{key:E,className:(0,r.default)("kt-tab",g,{"kt-mini-tab":f}),onClick:u.bind(null,E)},d):o.default.createElement("div",{key:E,className:(0,r.default)("kt-custom-tab",g,{"kt-mini-tab":f}),onClick:u.bind(null,E)},d)}))};t.Tabs=c},72871:(x,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 c=({title:p,children:v,delay:m})=>{const[_,s]=(0,o.useState)(!1),f=(0,o.useRef)(null),a=(0,o.useRef)(null),h=(0,o.useRef)(null),u=(0,o.useRef)(null);(0,o.useEffect)(()=>()=>clearTimeout(u.current),[]);function d(){if(_){u.current&&clearTimeout(u.current);return}u.current=setTimeout(()=>{if(s(!0),a.current&&f.current&&h.current){const{x:g,y:l,width:y,height:b}=f.current.getBoundingClientRect(),S=a.current.getBoundingClientRect();l<S.height*1.5?(h.current.className+=" kt-tooltip-reverse-arrow",a.current.style.top=`${l+b+S.height/2}px`):a.current.style.top=`${l-S.height*1.5}px`,g+S.width/2>=document.body.offsetWidth?(h.current.style.right=`${y/2-7}px`,a.current.style.left=`${g+y-S.width}px`):g-S.width/2<=0?(h.current.style.left=`${y/2-7}px`,a.current.style.left=`${g}px`):(h.current.style.left=`${S.width/2-7}px`,a.current.style.left=`${g+y/2-S.width/2}px`)}clearTimeout(u.current)},m||500)}function E(){u.current&&clearTimeout(u.current),s(!1)}return o.default.createElement("p",{ref:f,className:"kt-tooltip-wrapper",onMouseEnter:d,onMouseLeave:E},v,_&&o.default.createElement("span",{ref:a,className:(0,r.default)("kt-tooltip-content")},p,o.default.createElement("span",{ref:h,className:"kt-tooltip-arrow-placeholder"})))};t.Tooltip=c},40604:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Deprecated=c;const n=e(85608),r=n.__importDefault(e(14041)),o=n.__importDefault(e(65973));function c(p,v){return m=>(r.default.useEffect(()=>{(0,o.default)(!1,`${p.displayName||p.name} is deprecated: ${v}`)},[]),r.default.createElement(p,m))}},84605:(x,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:(x,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=(v,m,_)=>{if(!_)return n.marked.parse(v,m);m?n.marked.parse(v,m,_):n.marked.parse(v,_)};t.parseMarkdown=o;const c=(v,m)=>(0,n.marked)(v,m);t.toMarkdownHtml=c;const p=v=>(v.type==="escape"&&(v.text=v.raw),v);t.parseWithoutEscape=p},2835:(x,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:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.wrapperRaf=p;const r=e(85608).__importDefault(e(10719));let o=0;const c={};function p(v,m=1){const _=o++;let s=m;function f(){s-=1,s<=0?(v(),delete c[_]):c[_]=(0,r.default)(f)}return c[_]=(0,r.default)(f),_}p.cancel=function(m){m!==void 0&&(r.default.cancel(c[m]),delete c[m])},p.ids=c},43953:(x,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:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.warning=n,t.note=r,t.resetWarned=o,t.call=c,t.warningOnce=p,t.noteOnce=v;let e={};function n(m,_){}function r(m,_){}function o(){e={}}function c(m,_,s){!_&&!e[s]&&(m(!1,s),e[s]=!0)}function p(m,_){c(n,m,_)}function v(m,_){c(r,m,_)}t.default=p},91802:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VirtualList=void 0;const r=e(85608).__importStar(e(14041)),o=e(24241),c=e(77011),p=({data:v,className:m,template:_,refSetter:s,onRangeChanged:f})=>{const a=(0,r.useRef)(null);return(0,r.useEffect)(()=>{s?.(a.current)},[a.current]),r.default.createElement(c.Scrollbars,{thumbSize:0},r.default.createElement(o.Virtuoso,{rangeChanged:h=>{f?.(h)},overscan:20,ref:a,style:{height:"100%"},className:m,data:v,itemContent:(h,u)=>r.default.createElement(_,{index:h,data:u})}))};t.VirtualList=p},18740:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),e(85608).__exportStar(e(59019),t)},59019:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WSChannelHandler=void 0;const n=e(40396),r=e(43718),o=e(54558),c=e(47561);class p{onChannelCreated(m,_){return this._onChannelCreatedEmitter.on(m,_)}constructor(m,_,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=_,this.LOG_TAG=`[WSChannelHandler] [client-id:${this.clientId}]`;const f=s.serializer||o.furySerializer;this.wrappedConnection=(0,o.wrapSerializer)(this.connection,f)}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(_=>{switch(this.heartbeatMessage(),_.kind){case"pong":break;default:{const s=this.channelMap.get(_.id);s?s.dispatch(_):this.logger.warn(this.LOG_TAG,`channel ${_.id} not found`)}}});const m=()=>{this.channelMap.size>0&&this.channelMap.forEach(_=>{_.open(_.channelPath,this.clientId)})};this.connection.onClose((_,s)=>{this.channelMap.forEach(f=>{f.close(_,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 _=this.fillKey(m);this.channelMap.has(_)&&(this.channelMap.get(_).dispose(),this.logger.log(this.LOG_TAG,`channel ${_} already exists, dispose it`));const s=new c.WSChannel(this.wrappedConnection,{id:_,logger:this.logger,ensureServerReady:!0});this.channelMap.set(s.id,s),this._onChannelCreatedEmitter.emit(m,s);let f=0;s.onOpen(()=>{f++,f>1?(s.fireReopen(),this.logger.log(this.LOG_TAG,`channel reconnect ${this.clientId}:${s.channelPath}, count: ${f}`)):this.logger.log(this.LOG_TAG,`channel open ${this.clientId}:${s.channelPath}`);const u=this.channelCloseEventMap.get(s.id);u&&(u.forEach(d=>{this.reporterService&&this.reporterService.point(r.REPORT_NAME.CHANNEL_RECONNECT,r.REPORT_NAME.CHANNEL_RECONNECT,d)}),this.channelCloseEventMap.delete(s.id))}),s.onClose((u,d)=>{this.channelCloseEventMap.set(s.id,{channelPath:m,closeEvent:{code:u,reason:d},connectInfo:navigator.connection}),this.logger.log(this.LOG_TAG,`channel ${m} closed, code: ${u}, reason: ${d}`)});const a=new r.Deferred,h=s.onOpen(()=>{a.resolve(),h.dispose()});return s.open(m,this.clientId),await a.promise,s}dispose(){this.heartbeatMessageTimer&&clearTimeout(this.heartbeatMessageTimer),this._disposables.dispose()}awaitChannelReady(m){const _=this.getChannel(m),s=new r.Deferred;if(_)_.onServerReady(()=>{s.resolve()});else{const f=this.onChannelCreated(m,a=>{a.onServerReady(()=>{s.resolve()}),f.dispose()})}return s.promise}}t.WSChannelHandler=p},98710:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Cursor=t.Buffers=t.buffer4Capacity=t.emptyBuffer=void 0,t.copy=e,t.emptyBuffer=new Uint8Array(0),t.buffer4Capacity=new Uint8Array(4);function e(o,c,p,v,m){c.set(o.subarray(v,m),p)}class n{constructor(){this.buffers=[],this.size=0}get byteLength(){return this.size}push(c){this.buffers.push(c),this.size+=c.length}unshift(c){this.buffers.unshift(c),this.size+=c.length}slice(c,p){const v=this.buffers;if(p===void 0&&(p=this.size),c===void 0&&(c=0),p>this.size&&(p=this.size),c>=p)return t.emptyBuffer;let m=0,_=0;for(;_<v.length&&m+v[_].length<=c;_++)m+=v[_].length;const s=new Uint8Array(p-c);let f=0;for(let a=_;f<p-c&&a<v.length;a++){const h=v[a].length,u=f===0?c-m:0,d=f+h>=p-c?Math.min(u+(p-c)-f,h):h;e(v[a],s,f,u,d),f+=d-u}return s}slice4(c){let p=c+4;const v=this.buffers;if(p>this.size&&(p=this.size),c>=p)return t.emptyBuffer;let m=0,_=0;for(;_<v.length&&m+v[_].length<=c;_++)m+=v[_].length;const s=t.buffer4Capacity;let f=0;for(let a=_;f<p-c&&a<v.length;a++){const h=v[a].length,u=f===0?c-m:0,d=f+h>=p-c?Math.min(u+(p-c)-f,h):h;e(v[a],s,f,u,d),f+=d-u}return s}pos(c){if(c<0||c>=this.size)throw new Error(`out of range, ${c} not in [0, ${this.size})`);let p=c,v=0,m=null;for(;;){if(m=this.buffers[v],p<m.length)return{buf:v,offset:p};p-=m.length,v++}}copy(c,p=0,v=0,m=this.size){return e(this.slice(v,m),c,p,0,m-v)}splice(c,p,...v){const m=this.buffers,_=c>=0?c:this.size-c;p===void 0?p=this.size-_:p>this.size-_&&(p=this.size-_);for(const h of v)this.size+=h.length;const s=new n;let f=0,a=0;for(;a<m.length&&f+m[a].length<_;a++)f+=m[a].length;if(_-f>0){const h=_-f;if(h+p<m[a].length){s.push(m[a].slice(h,h+p));const u=m[a],d=new Uint8Array(h);for(let g=0;g<h;g++)d[g]=u[g];const E=new Uint8Array(u.length-h-p);for(let g=h+p;g<u.length;g++)E[g-p-h]=u[g];if(v.length>0){const g=v.slice();g.unshift(d),g.push(E),m.splice.apply(m,[a,1,...g]),a+=g.length,v=[]}else m.splice(a,1,d,E),a+=2}else s.push(m[a].slice(h)),m[a]=m[a].slice(0,h),a++}for(v.length>0&&(m.splice.apply(m,[a,0,...v]),a+=v.length);s.byteLength<p;){const h=m[a],u=h.length,d=Math.min(u,p-s.byteLength);d===u?(s.push(h),m.splice(a,1)):(s.push(h.slice(0,d)),m[a]=m[a].slice(d))}return this.size-=s.byteLength,s}get(c){const{buf:p,offset:v}=this.pos(c);return this.buffers[p][v]}set(c,p){const{buf:v,offset:m}=this.pos(c);this.buffers[v][m]=p}cursor(c=0){return new r(this,c)}dispose(){this.buffers=[],this.size=0}}t.Buffers=n;class r{constructor(c,p=0){this.buffers=c,this.offset=p,this.chunkIndex=0,this.chunkOffset=0,this.updatePosition()}updatePosition(){if(this.offset===0){this.chunkIndex=0,this.chunkOffset=0;return}const{buf:c,offset:p}=this.buffers.pos(this.offset);this.chunkIndex=c,this.chunkOffset=p}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 c=this.buffers.buffers[this.chunkIndex],p=c.byteLength;for(;this.chunkOffset<p;){const v=c[this.chunkOffset];this.chunkOffset++,this.offset++,yield v}this.chunkOffset=0,this.chunkIndex++}}read(c){const p=this.offset+c,v=this.buffers.slice(this.offset,p);return this.skip(c),v}read4(){const c=this.buffers.slice4(this.offset);return this.skip(4),c}skip(c){let p=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++,++p===c)return;this.chunkOffset=0,this.chunkIndex++}}moveTo(c){this.offset=c,this.updatePosition()}dispose(){this.buffers=null,this.offset=0}reset(){this.offset=0,this.chunkIndex=0,this.chunkOffset=0}}t.Cursor=r},30613:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Capturer=t.ResponseStatus=t.MessageType=void 0,t.getCapturer=v;const n=e(43718),r=e(65265);var o;(function(_){_.SendNotification="sendNotification",_.SendRequest="sendRequest",_.RequestResult="requestResult",_.OnNotification="onNotification",_.OnRequest="onRequest",_.OnRequestResult="onRequestResult"})(o||(t.MessageType=o={}));var c;(function(_){_.Success="success",_.Fail="fail"})(c||(t.ResponseStatus=c={}));const p=typeof e.g>"u"?typeof window>"u"?{__OPENSUMI_DEVTOOLS_GLOBAL_HOOK__:void 0}:window:e.g;function v(){const _=p.__OPENSUMI_DEVTOOLS_GLOBAL_HOOK__;if(_)return _.captureRPC}class m{constructor(s){this.source=s,this._disposables=new n.DisposableStore,this.capturer=null,this.setupListener=f=>{const{command:a}=f.detail;a===r.DevtoolsLantencyCommand.Start?this.capturer=v():a===r.DevtoolsLantencyCommand.Stop&&(this.capturer=null)},this.prefix=(0,n.randomString)(6),this.capturer=v(),typeof p.addEventListener=="function"&&(p.addEventListener(r.EDevtoolsEvent.Latency,this.setupListener),this._disposables.add({dispose:()=>{p.removeEventListener(r.EDevtoolsEvent.Latency,this.setupListener)}}))}capture(s){if(!this.capturer)return;const f={...s,source:this.source};f.data&&(0,n.isUint8Array)(f.data)&&(f.data="<Uint8Array>"),s.requestId&&(f.requestId=`${this.prefix}-${s.requestId}`),s.error&&(f.error=(0,n.transformErrorForSerialization)(s.error)),this.capturer(f)}captureOnRequest(s,f,a){this.capturer&&this.capture({type:o.OnRequest,requestId:`\u2193${s}`,serviceMethod:f,arguments:a})}captureOnRequestResult(s,f,a){this.capturer&&this.capture({type:o.OnRequestResult,status:c.Success,requestId:`\u2193${s}`,serviceMethod:f,data:a})}captureOnRequestFail(s,f,a){this.capturer&&this.capture({type:o.OnRequestResult,status:c.Fail,requestId:`\u2193${s}`,serviceMethod:f,error:a})}captureSendRequest(s,f,a){this.capturer&&this.capture({type:o.SendRequest,requestId:s,serviceMethod:f,arguments:a})}captureSendRequestResult(s,f,a){this.capturer&&this.capture({type:o.RequestResult,status:c.Success,requestId:s,serviceMethod:f,data:a})}captureSendRequestFail(s,f,a){this.capturer&&this.capture({type:o.RequestResult,status:c.Fail,requestId:s,serviceMethod:f,error:a})}captureSendNotification(s,f,a){this.capturer&&this.capture({type:o.SendNotification,serviceMethod:f,arguments:a,requestId:s})}captureOnNotification(s,f,a){this.capturer&&this.capture({type:o.OnNotification,serviceMethod:f,arguments:a,requestId:`\u2193${s}`})}dispose(){this._disposables.dispose()}}t.Capturer=m},29433:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),e(85608).__exportStar(e(39048),t)},39048:(x,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:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.initRPCService=c,t.createRPCService=p,t.getRPCService=v;const n=e(85608),r=e(62199),o=e(8140);function c(m){return{createRPCService:(_,s)=>{const f=p(_,m);return s&&f.onRequestService(s),f},getRPCService:_=>v(_,m)}}function p(m,_){return new r.RPCServiceStub(m,_,o.ServiceType.Service).getProxy()}function v(m,_){return new r.RPCServiceStub(m,_,o.ServiceType.Stub).getProxy()}n.__exportStar(e(62199),t)},35821:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BaseConnection=void 0;class e{}t.BaseConnection=e},57358:(x,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]);const c=4;class p{constructor(){this.buffers=new o.Buffers,this.cursor=this.buffers.cursor(),this.processingPromise=null,this.contentLength=-1,this.state=0}onData(m){return this._onDataListener=m,{dispose:()=>{this._onDataListener=null}}}reset(){this.contentLength=-1,this.state=0,this.cursor.reset()}push(m){this.buffers.push(m),this.processingPromise||(this.processingPromise=this.processBuffers().finally(()=>{this.processingPromise=null}))}async processBuffers(){let m=0,_=!1;do{for(_=!1;m<p.MAX_ITERATIONS&&!(this.buffers.byteLength===0||await this.readFrame()===!0);)m++,m%10===0&&await new Promise(f=>setTimeout(f,0));this.buffers.byteLength>0&&(_=!0,await new Promise(s=>setImmediate(s)),m=0)}while(_)}async readFrame(){try{if(!this.readLengthField())return!0;const _=this.cursor.offset,s=_+this.contentLength;if(s>this.buffers.byteLength)return!0;const f=this.buffers.slice(_,s);if(this.buffers.splice(0,s),this.reset(),this._onDataListener)try{await Promise.resolve().then(()=>{var a;return(a=this._onDataListener)===null||a===void 0?void 0:a.call(this,f)})}catch(a){console.error("[Frame Decoder] Error in data listener:",a)}return!1}catch(m){return console.error("[Frame Decoder] Error processing frame:",m),this.reset(),!0}}readLengthField(){const m=this.buffers.byteLength;if(this.state!==4){if(this.cursor.offset+t.indicator.length>m)return!1;this.readIndicator()}if(this.state!==4)return!1;if(this.contentLength===-1){if(this.cursor.offset+c>m)return!1;const _=this.cursor.read4();this.contentLength=(0,r.readUInt32LE)(_,0)}return!(this.cursor.offset+this.contentLength>m)}readIndicator(){const m=this.cursor.iterator();let _=m.next();for(;!_.done;){switch(_.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,m.return();break;default:this.state=0;break}break;default:this.state=0;break}_=m.next()}}dispose(){this._onDataListener=null,this.buffers.dispose(),this.reset()}static construct(m){const _=(0,n.BinaryWriter)({});try{return _.buffer(t.indicator),_.uint32(m.byteLength),_.buffer(m),_}catch(s){throw console.warn("[Frame Decoder] Error constructing frame:",s),s}}}t.LengthFieldBasedFrameDecoder=p,p.MAX_ITERATIONS=50},34982:(x,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:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MessagePortConnection=void 0;const n=e(35821);class r extends n.BaseConnection{constructor(c){super(),this.port=c,c.start()}send(c){this.port.postMessage(c)}onMessage(c){const p=v=>{c(v.data)};return this.port.addEventListener("message",p),{dispose:()=>{this.port.removeEventListener("message",p)}}}onceClose(c){return this.port.addEventListener("close",c),{dispose:()=>{this.port.addEventListener("close",c)}}}dispose(){}}t.MessagePortConnection=r},71056:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NodeMessagePortConnection=void 0;const n=e(35821);class r extends n.BaseConnection{constructor(c){super(),this.port=c}send(c){this.port.postMessage(c)}onMessage(c){return this.port.on("message",c),{dispose:()=>{this.port.off("message",c)}}}onceClose(c){return this.port.once("close",c),{dispose:()=>{this.port.off("close",c)}}}dispose(){this.port.removeAllListeners()}}t.NodeMessagePortConnection=r},91493:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ReconnectingWebSocketConnection=void 0;const r=e(85608).__importDefault(e(31133)),o=e(91676),c=e(35821),p=e(57358);class v extends c.BaseConnection{constructor(_){if(super(),this.socket=_,this.decoder=new p.LengthFieldBasedFrameDecoder,this.sendQueue=[],this.sending=!1,this.arrayBufferHandler=s=>{const f=s.data;this.decoder.push(new Uint8Array(f,0,f.byteLength))},_.binaryType==="arraybuffer")this.socket.addEventListener("message",this.arrayBufferHandler);else if(_.binaryType==="blob")throw new Error("blob is not implemented")}async processSendQueue(){if(!this.sending){for(this.sending=!0;this.sendQueue.length>0;){const{data:_,resolve:s,reject:f}=this.sendQueue[0];let a=null;try{a=p.LengthFieldBasedFrameDecoder.construct(_).dumpAndOwn();const h=a.get();for(let u=0;u<h.byteLength;u+=o.chunkSize)await new Promise(d=>{const E=h.subarray(u,Math.min(u+o.chunkSize,h.byteLength));this.socket.send(E),d()});s()}catch(h){console.error("[ReconnectingWebSocket] Error sending data:",h),f(h)}finally{a&&a.dispose()}this.sendQueue.shift()}this.sending=!1}}send(_){return new Promise((s,f)=>{this.sendQueue.push({data:_,resolve:s,reject:f}),this.processSendQueue()})}isOpen(){return this.socket.readyState===this.socket.OPEN}onOpen(_){return this.socket.addEventListener("open",_),{dispose:()=>{this.socket.removeEventListener("open",_)}}}onMessage(_){return this.decoder.onData(_)}onceClose(_){const s=this.onClose(f);return{dispose:()=>{s.dispose()}};function f(a,h){_(a,h),s.dispose()}}onClose(_){const s=f=>{_(f.code,f.reason)};return this.socket.addEventListener("close",s),{dispose:()=>{this.socket.removeEventListener("close",s)}}}onError(_){const s=f=>{_(f.error)};return this.socket.addEventListener("error",s),{dispose:()=>{this.socket.removeEventListener("error",s)}}}dispose(){this.socket.removeEventListener("message",this.arrayBufferHandler),this.sendQueue=[],this.sending=!1}static forURL(_,s,f){const a=new r.default(_,s,f);return a.binaryType="arraybuffer",new v(a)}}t.ReconnectingWebSocketConnection=v},57625:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NetSocketConnection=void 0;const n=e(36932);class r extends n.StreamConnection{constructor(c){super(c,c),this.socket=c}isOpen(){return this.socket.readyState==="open"}onOpen(c){return this.socket.on("connect",c),{dispose:()=>{this.socket.off("connect",c)}}}destroy(){this.socket.destroy()}}t.NetSocketConnection=r},36932:(x,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(p,v){super(),this.readable=p,this.writable=v,this.decoder=new r.LengthFieldBasedFrameDecoder;const m=_=>{this.decoder.push(_)};this.readable.on("data",m),this.readable.once("close",()=>{this.decoder.dispose(),this.readable.off("data",m)})}send(p){const v=r.LengthFieldBasedFrameDecoder.construct(p).dumpAndOwn();try{this.writable.write(v.get(),m=>{m&&console.error("Failed to write data:",m)})}finally{v.dispose()}}onMessage(p){return this.decoder.onData(p)}onceClose(p){const v=this.onClose(m);return{dispose:()=>{v.dispose()}};function m(_,s){p(_,s),v.dispose()}}onClose(p){const v=m=>{p(m?1:0,m?"had error":"")};return this.readable.on("close",v),this.writable!==this.readable&&this.writable.on("close",v),{dispose:()=>{this.readable.off("close",v),this.writable!==this.readable&&this.writable.off("close",v)}}}onError(p){return this.readable.on("error",p),this.writable!==this.readable&&this.writable.on("error",p),{dispose:()=>{this.readable.off("error",p),this.writable!==this.readable&&this.writable.off("error",p)}}}dispose(){this.decoder.dispose()}}t.StreamConnection=o},15272:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WSWebSocketConnection=void 0;const n=e(91676),r=e(35821),o=e(57358);class c extends r.BaseConnection{constructor(v){super(),this.socket=v,this.decoder=new o.LengthFieldBasedFrameDecoder,this.sendQueue=[],this.pendingSize=0,this.sending=!1,this.socket.on("message",m=>{this.decoder.push(m)})}async processSendQueue(){if(!this.sending){for(this.sending=!0;this.sendQueue.length>0;){const{data:v,resolve:m,reject:_}=this.sendQueue[0];let s=null;try{s=o.LengthFieldBasedFrameDecoder.construct(v).dumpAndOwn();const f=s.get();for(let a=0;a<f.byteLength;a+=n.chunkSize){if(!this.isOpen())throw new Error("Connection closed while sending");await new Promise((h,u)=>{const d=f.subarray(a,Math.min(a+n.chunkSize,f.byteLength));this.socket.send(d,{binary:!0},E=>{E?u(E):h()})})}m()}catch(f){_(f instanceof Error?f:new Error(String(f)))}finally{if(s)try{s.dispose()}catch(f){console.warn("[WSWebSocket] Error disposing handle:",f)}this.pendingSize-=this.sendQueue[0].data.byteLength,this.sendQueue.shift()}}this.sending=!1}}send(v){return new Promise((m,_)=>{if(this.sendQueue.length>=c.MAX_QUEUE_SIZE){_(new Error("Send queue full"));return}this.pendingSize+=v.byteLength,this.sendQueue.push({data:v,resolve:m,reject:_}),this.processSendQueue().catch(s=>{console.error("[WSWebSocket] Error processing queue:",s)})})}onMessage(v){return this.decoder.onData(v)}onceClose(v){return this.socket.once("close",v),{dispose:()=>{this.socket.off("close",v)}}}isOpen(){return this.socket.readyState===this.socket.OPEN}dispose(){for(this.socket.removeAllListeners();this.sendQueue.length>0;){const{reject:v}=this.sendQueue.shift();v(new Error("Connection disposed"))}this.pendingSize=0,this.sending=!1}}t.WSWebSocketConnection=c,c.MAX_QUEUE_SIZE=1e3},90750:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),e(85608).__exportStar(e(34982),t)},91676:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.chunkSize=t.METHOD_NOT_REGISTERED=void 0,t.METHOD_NOT_REGISTERED="$$METHOD_NOT_REGISTERED",t.chunkSize=1048576},89104:(x,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(v){v[v.String=0]="String",v[v.Buffer=1]="Buffer",v[v.Number=2]="Number",v[v.JSONObject=3]="JSONObject",v[v.BigInt=4]="BigInt",v[v.Array=5]="Array",v[v.Object=6]="Object",v[v.Undefined=7]="Undefined",v[v.Null=8]="Null",v[v.Boolean=9]="Boolean"})(r||(t.ProtocolType=r={}));class o{constructor(m,_,s){this.writer=m,this.reader=_,this.objectTransfer=s,this.deserialize=f=>(this.reader.reset(f),this.read()),this.serialize=f=>(this.writer.reset(),this.write(f),this.writer.dump())}write(m){var _;const{writer:s}=this,f=typeof m;switch(s.reserve(1),m){case null:s.uint8(r.Null);return;default:switch(f){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,(_=this.objectTransfer)===null||_===void 0?void 0:_.replacer)));break;default:throw new Error(`Unknown type ${f}`)}}}read(){var m;const{reader:_}=this,s=_.uint8();switch(s){case r.Undefined:return;case r.Null:return null;case r.String:return _.stringOfVarUInt32();case r.Buffer:{const f=_.varUInt32();return _.buffer(f)}case r.Number:return _.double();case r.JSONObject:{const f=_.stringOfVarUInt32();return JSON.parse(f,(m=this.objectTransfer)===null||m===void 0?void 0:m.reviver)}case r.BigInt:return _.int64();case r.Array:{const f=_.varUInt32(),a=[];for(let h=0;h<f;h++)a.push(this.read());return a}case r.Boolean:return _.uint8()===1;default:throw new Error(`Unknown type ${s}`)}}}t.AnySerializer=o;var c;(function(v){v.CODE_URI="CodeURI",v.BUFFER="Buffer"})(c||(c={}));class p{static replacer(m,_){if(_){switch(_.$mid){case 1:{const s=n.Uri.revive(_);return{$type:c.CODE_URI,data:s.toString()}}}if(_ instanceof Uint8Array||_ instanceof Uint32Array||_ instanceof Uint16Array)return{$type:"Buffer",data:Array.from(_)};if(_ instanceof ArrayBuffer)return{$type:"Buffer",data:Array.from(new Uint8Array(_))};if(_.type==="Buffer")return{$type:"Buffer",data:_.data}}return _}static reviver(m,_){if(_&&_.$type!==void 0&&_.data!==void 0)switch(_.$type){case c.CODE_URI:return n.Uri.parse(_.data);case c.BUFFER:return Uint8Array.from(_.data)}return _}}t.ExtObjectTransfer=p},94846:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.oneOf=void 0;const n=e(26246),r=e(4405),o=8,c=(p,v)=>{v||(v=(0,r.furyFactory)());const{fury:m,reader:_,writer:s}=v,f=new Array(o),a=new Array(o),h={};return p.forEach((E,g)=>{const l=E.options.tag;f[g]=(0,n.generateSerializer)(m,E),a[g]=l,h[l]=g}),{deserialize:E=>{_.reset(E);const g=_.uint8();let l;switch(g){case 0:l=f[0].read();break;case 1:l=f[1].read();break;case 2:l=f[2].read();break;case 3:l=f[3].read();break;case 4:l=f[4].read();break;case 5:l=f[5].read();break;case 6:l=f[6].read();break;case 7:l=f[7].read();break;default:throw new Error("unknown index: "+g)}return l.kind=a[g],l},serialize:E=>{const g=h[E.kind];switch(s.reset(),s.uint8(g),g){case 0:f[0].write(E);break;case 1:f[1].write(E);break;case 2:f[2].write(E);break;case 3:f[3].write(E);break;case 4:f[4].write(E);break;case 5:f[5].write(E);break;case 6:f[6].write(E);break;case 7:f[7].write(E);break}return s.dump()}}};t.oneOf=c},4405:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.furyFactory=void 0;const r=e(85608).__importDefault(e(97419)),o=c=>{const p=new r.default(c),v=p.binaryReader,m=p.binaryWriter;return{fury:p,reader:v,writer:m}};t.furyFactory=o},25285:(x,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:(x,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:(x,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:(x,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:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RPCServiceCenter=void 0,t.getNotificationName=s,t.getRequestName=f,t.getMethodName=a;const n=e(43718),r=e(96068),o=e(91676),c=e(8140),p=e(66748),v=e(92408),m=200;class _{constructor(u,d){this.bench=u,this._disposables=new n.DisposableStore,this.proxies=[],this.serviceRegistry=this._disposables.add(new v.ServiceRegistry),this.protocolRegistry=this._disposables.add(new v.ProtocolRegistry),this.deferred=new n.Deferred,this._reportThreshold=m,this.uid=(0,n.randomString)(6),this.logger=d||console}setReporter(u,d=m){this._reporterService=u,this._reportThreshold=d}registerService(u,d){d===c.ServiceType.Service&&this.bench&&this.bench.registerService(u)}ready(){return this.deferred.promise}loadProtocol(u){this.protocolRegistry.addProtocol(u,{nameConverter:d=>a(u.name,d)})}setSumiConnection(u){this.proxies.length===0&&this.deferred.resolve(),this.protocolRegistry.applyTo(u.io);const d=new p.ProxySumi(this.serviceRegistry,this.logger);d.listen(u);const E=(0,r.addElement)(this.proxies,d);return{dispose:()=>{E.dispose(),d.dispose()}}}setConnection(u){this.proxies.length===0&&this.deferred.resolve();const d=new p.ProxyJson(this.serviceRegistry,this.logger);d.listen(u);const E=(0,r.addElement)(this.proxies,d);return{dispose:()=>{E.dispose(),d.dispose()}}}onRequest(u,d,E){this.serviceRegistry.register(a(u,d),E)}onRequestService(u,d){this.serviceRegistry.registerService(d,{nameConverter:E=>a(u,E)})}async broadcast(u,d,...E){await this.ready();const g=a(u,d);let l;this._reporterService&&(l=this._reporterService.time(n.REPORT_NAME.RPC_TIMMING_MEASURE));const y=await Promise.all(this.proxies.map(A=>A.invoke(g,...E))),b=[],S=[];for(const A of y)A===o.METHOD_NOT_REGISTERED?b.push(A):S.push(A);if(b.length>0&&this.logger.warn(`broadcast rpc \`${g}\` getting doubtful responses: ${b.join(",")}`),S.length===0)throw l&&l.timeEnd(g,{success:!1},{minimumReportThresholdTime:this._reportThreshold}),new Error(`broadcast rpc \`${g}\` error: no remote service can handle this call`);return l&&l.timeEnd(g,{success:!0},{minimumReportThresholdTime:this._reportThreshold}),S.length===1?S[0]:S}dispose(){this._disposables.dispose(),this.proxies.forEach(u=>u.dispose()),this.proxies=[]}}t.RPCServiceCenter=_;function s(h,u){return`on:${h}:${u}`}function f(h,u){return`${h}:${u}`}function a(h,u){return u.startsWith("on")?s(h,u):f(h,u)}},62199:(x,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:(x,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 c{constructor(v,m){this.registry=v,this.connectionPromise=new n.Deferred,this._disposables=new n.DisposableStore,this.logger=m||console,this.registry.onServicesUpdate(_=>{this.connection&&this.bindMethods(_)})}nextRequestId(){return String(o++)}listen(v){this.connection=v,this._disposables.add(this.connection),this.bindMethods(this.registry.methods()),v.listen(),this.connectionPromise.resolve()}listenService(v){this.registry.registerService(v)}dispose(){this._disposables.dispose()}getInvokeProxy(){return new Proxy(Object.create(null),{get:(v,m)=>typeof m!="string"?null:r.has(m)?Promise.resolve():(v[m]||(v[m]=(..._)=>this.invoke(m,..._)),v[m])})}}t.ProxyBase=c},66748:(x,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:(x,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 c extends o.ProxyBase{constructor(){super(...arguments),this.engine="json",this.capturer=this._disposables.add(new n.Capturer(this.engine))}bindMethods(v){for(const m of v)m.startsWith("on")?this.connection.onNotification(m,async(..._)=>{this.capturer.captureOnNotification("_",m,_);try{await this.registry.invoke(m,...this.serializeArguments(_))}catch(s){this.logger.warn(`notification exec ${m} error`,s)}}):this.connection.onRequest(m,async(..._)=>{const s=this.nextRequestId();this.capturer.captureOnRequest(s,m,_);try{const f=await this.registry.invoke(m,...this.serializeArguments(_));return this.capturer.captureOnRequestResult(s,m,f),{error:!1,data:f}}catch(f){return this.capturer.captureOnRequestFail(s,m,f),{error:!0,data:{message:f.message,stack:f.stack}}}})}async invoke(v,...m){await this.connectionPromise.promise;let _=!1;if(m.length===1&&Array.isArray(m[0])&&(_=!0),v.startsWith("on"))this.capturer.captureSendNotification("_",v,m),_?this.connection.sendNotification(v,[...m]):this.connection.sendNotification(v,...m);else{const s=this.nextRequestId();let f;_?f=this.connection.sendRequest(v,[...m]):f=this.connection.sendRequest(v,...m),this.capturer.captureSendRequest(s,v,m);const a=await f;if(a.error){const h=new Error(a.data.message);throw a.data.stack&&(h.stack=a.data.stack),this.capturer.captureSendRequestFail(s,v,a.data),h}else return this.capturer.captureSendRequestResult(s,v,a.data),a.data}}serializeArguments(v){const m=v[v.length-1];return v.length===2&&Array.isArray(v[0])&&Object.prototype.hasOwnProperty.call(m,"_isCancelled")?[...v[0],m]:v}listen(v){super.listen(v),this._disposables.add(v.onRequest(m=>{if(!this.registry.has(m)){const _=this.nextRequestId();this.capturer.captureOnRequest(_,m,[]);const s={data:r.METHOD_NOT_REGISTERED};return this.capturer.captureOnRequestFail(_,m,s.data),s}}))}}t.ProxyJson=c},16420:(x,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(p){for(const v of p)v.startsWith("on")?this.connection.onNotification(v,async(...m)=>{try{await this.registry.invoke(v,...m)}catch(_){this.logger.warn(`notification exec ${v} error`,_)}}):this.connection.onRequest(v,async(...m)=>await this.registry.invoke(v,...m))}async invoke(p,...v){if(await this.connectionPromise.promise,p.startsWith("on"))this.connection.sendNotification(p,...v);else return await this.connection.sendRequest(p,...v)}listen(p){super.listen(p),this._disposables.add(p.onRequestNotFound(()=>{throw n.METHOD_NOT_REGISTERED}))}}t.ProxySumi=o},92408:(x,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(v){const m=new Set;let _=v;do{const f=Object.getOwnPropertyNames(_);for(const a of f)r.has(a)||typeof v[a]=="function"&&m.add(a)}while(_=Object.getPrototypeOf(_));const s=Array.from(m);return s.sort(),s}class c{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,_){this.serviceMethodMap.set(m,_),this.emitter.fire([m])}registerService(m,_){const s=[],{nameConverter:f}=_||{},a=o(m);for(const h of a){let u=h;f&&(u=f(h)),this.serviceMethodMap.set(u,m[h].bind(m)),s.push(u)}this.emitter.fire(s)}has(m){return this.serviceMethodMap.has(m)}invoke(m,..._){return this.serviceMethodMap.get(m)(..._)}methods(){return Array.from(this.serviceMethodMap.keys())}dispose(){this._disposables.dispose()}}t.ServiceRegistry=c;class p{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,_){const s=[],{nameConverter:f}=_||{},{methods:a}=m;for(const h of a){let u=h.method;f&&(u=f(u)),this.protocolMap.set(u,{...h,method:u}),s.push(u)}this.emitter.fire(s)}applyTo(m){if(m.loadProtocolMethod){for(const _ of this.protocolMap.values())m.loadProtocolMethod(_);this._disposables.add(this.onProtocolUpdate(_=>{if(m.loadProtocolMethod)for(const s of _){const f=this.protocolMap.get(s);f&&m.loadProtocolMethod(f)}}))}}dispose(){this._disposables.dispose()}}t.ProtocolRegistry=p},68855:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RPCServiceStub=void 0;class e{constructor(r,o,c){this.serviceName=r,this.center=o,this.type=c,this.getProxy=()=>new Proxy(this,{get:(p,v)=>typeof v=="symbol"?Promise.resolve():(p[v]||(p[v]=(...m)=>this.broadcast(v,...m)),p[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:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SumiConnection=void 0;const n=e(43718),r=e(70392),o=e(93062),c=e(30613),p=e(90750),v=e(91676),m=e(48218),_=e(76339),s={},f={chunked:!0};class a{constructor(u,d={}){this.socket=u,this.options=d,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,d.logger?this.logger=d.logger:this.logger=(0,n.getDebugLogger)(),this.io=d.io||new _.MessageIO,this.capturer=new c.Capturer(d.name||"sumi"),this.disposable.add(this.capturer)}sendNotification(u,...d){const E=this._requestId++;this.capturer.captureSendNotification(E,u,d),this.socket.send(this.io.Notification(E,u,s,d))}sendRequest(u,...d){return new Promise((E,g)=>{const l=this._requestId++;if(this._callbacks.set(l,(b,S,A)=>{if(S){if(this.traceRequestError(l,u,d,S),S===v.METHOD_NOT_REGISTERED){E(S);return}g(S);return}this.capturer.captureSendRequestResult(l,u,A),E(A)}),this.options.timeout&&this.options.timeout!==-1){const b=setTimeout(()=>{this._handleTimeout(u,l)},this.options.timeout);this._reqTimeoutHandles.set(l,b)}const y=d.length&&r.CancellationToken.isCancellationToken(d[d.length-1])?d.pop():void 0;if(y&&y.isCancellationRequested)return Promise.reject((0,r.canceled)());y&&y.onCancellationRequested(()=>this.cancelRequest(l)),this.capturer.captureSendRequest(l,u,d),this.socket.send(this.io.Request(l,u,{cancelable:!!y||void 0},d))})}cancelRequest(u){this.socket.send(this.io.Cancel(u))}_handleTimeout(u,d){if(!this._callbacks.has(d)||!this._reqTimeoutHandles.has(d))return;const E=this._callbacks.get(d);this._callbacks.delete(d),this._reqTimeoutHandles.delete(d),E(s,new m.MethodTimeoutError(u))}onRequest(u,d){return this._requestHandlers.set(u,d),{dispose:()=>{this._requestHandlers.delete(u)}}}onRequestNotFound(u){return this._starRequestHandler=u,{dispose:()=>{this._starRequestHandler=void 0}}}onNotification(u,d){return this._notificationHandlers.set(u,d),{dispose:()=>{this._notificationHandlers.delete(u)}}}onNotificationNotFound(u){return this._starNotificationHandler=u,{dispose:()=>{this._starNotificationHandler=void 0}}}listen(){this.disposable.add(this.socket.onMessage(u=>{const d=this.io.parse(u),E=d.kind,g=d.requestId;switch(E===_.OperationType.Error&&this.logger.warn(`[${d.requestId}] Error received from server method ${d.method}: ${d.error}`),E){case _.OperationType.Error:case _.OperationType.Response:{const{headers:l,method:y}=d,b=d.error,S=d.result;this._reqTimeoutHandles.has(g)&&(clearTimeout(this._reqTimeoutHandles.get(g)),this._reqTimeoutHandles.delete(g));const A=(w,T,D)=>{const I=this._callbacks.get(g);if(!I){this.logger.error(`Cannot find callback for request ${g}: ${y}`);return}this._callbacks.delete(g),I(w,T,D)};if(l&&l.chunked){let w;if(this.activeRequestPool.has(g)?w=this.activeRequestPool.get(g):(w=new o.SumiReadableStream,this.activeRequestPool.set(g,w),A(l,void 0,w)),S===null){w.end(),this.activeRequestPool.delete(g);break}if(b){w.emitError(b);break}w.emitData(S);break}A(l,b,S);break}case _.OperationType.Notification:case _.OperationType.Request:{const{method:l,headers:y,args:b}=d;if(y.cancelable){const S=new r.CancellationTokenSource;this._cancellationTokenSources.set(g,S),b.push(S.token),this._knownCanceledRequests.has(g)&&(S.cancel(),this._knownCanceledRequests.delete(g))}switch(E){case _.OperationType.Request:{this.capturer.captureOnRequest(g,l,b);let S;try{let T;const D=this._requestHandlers.get(l);D?T=D(...b):this._starRequestHandler&&(T=this._starRequestHandler(l,b)),S=Promise.resolve(T)}catch(T){S=Promise.reject(T)}const A=T=>{this.capturer.captureOnRequestResult(g,l,T),(0,o.isReadableStream)(T)?(0,o.listenReadable)(T,{onData:D=>{this.socket.send(this.io.Response(g,l,f,D))},onEnd:()=>{this.socket.send(this.io.Response(g,l,f,null)),this._cancellationTokenSources.delete(g)},onError:D=>{this.socket.send(this.io.Error(g,l,f,D)),this._cancellationTokenSources.delete(g)}}):(this.socket.send(this.io.Response(g,l,s,T)),this._cancellationTokenSources.delete(g))},w=T=>{this.traceRequestError(g,l,b,T),this.socket.send(this.io.Error(g,l,s,T)),this._cancellationTokenSources.delete(g)};S.then(A).catch(w);break}case _.OperationType.Notification:{this.capturer.captureOnNotification(g,l,b);const S=this._notificationHandlers.get(l);S?S(...b):this._starNotificationHandler&&this._starNotificationHandler(l,b);break}}break}case _.OperationType.Cancel:{const l=this._cancellationTokenSources.get(g);l?l.cancel():this._knownCanceledRequests.add(g);break}default:break}}))}dispose(){this.disposable.dispose()}static forWSWebSocket(u,d={}){return new a(new p.WSWebSocketConnection(u),d)}static forNetSocket(u,d={}){return new a(new p.NetSocketConnection(u),d)}traceRequestError(u,d,E,g){this.capturer.captureSendRequestFail(u,d,g)}toJSON(){throw new Error(`You're trying to serialize a SumiConnection instance, which is not allowed.
30433
+ `},73136:(x,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:(x,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)),c=e(41869),p=e(53711),v=n.__importDefault(e(65887)),m=({item:_,defaultLeftPadding:s=8,leftPadding:f=8,decorations:a,onClick:h,onTwistierClick:u})=>{const d=(0,c.useDesignStyles)(v.default.expansion_toggle,"expansion_toggle"),E=(0,o.useCallback)(I=>{_.onSelect?_.onSelect(_):h(I,_)},[h]),g=(0,o.useCallback)(I=>{u(I,_)},[u]),l=`${s+(_.depth||0)*(f||0)+(p.CommentContentNode.is(_)?16:p.CommentFileNode.is(_)?0:28)}px`,y={height:t.COMMENT_TREE_NODE_HEIGHT,lineHeight:`${t.COMMENT_TREE_NODE_HEIGHT}px`,paddingLeft:l},b=(0,o.useCallback)(I=>{if(p.CommentContentNode.is(I)||p.CommentFileNode.is(I))return o.default.createElement("div",{className:(0,r.default)(v.default.icon,I.icon),style:{height:t.COMMENT_TREE_NODE_HEIGHT,lineHeight:`${t.COMMENT_TREE_NODE_HEIGHT}px`}})},[]),S=(0,o.useCallback)(I=>p.CommentContentNode.is(I)?o.default.createElement("div",{className:(0,r.default)(v.default.segment,v.default.displayname)},I.renderedLabel?I.renderedLabel:o.default.createElement(o.default.Fragment,null,I.comment,o.default.createElement("span",{className:v.default.separator},"\xB7"),I.author.name)):o.default.createElement("div",{className:(0,r.default)(v.default.segment,v.default.displayname)},I.renderedLabel),[]),A=(0,o.useCallback)(I=>o.default.createElement("div",{className:(0,r.default)(v.default.segment_grow,v.default.description)},I.renderedDescription),[]),w=(0,o.useCallback)(I=>o.default.createElement("div",{onClick:g,className:(0,r.default)(v.default.segment,d,(0,c.getIcon)("arrow-right"),{[`${v.default.mod_collapsed}`]:!I.expanded})}),[g]),T=(0,o.useCallback)(I=>{if(p.CommentFileNode.is(I)||I?.isAllowToggle)return w(I)},[]),D=(0,o.useCallback)(()=>_.tooltip,[_]);return o.default.createElement("div",{key:_.id,onClick:E,title:D(),className:(0,r.default)(v.default.comment_node,a?a.classlist:null),style:y,"data-id":_.id},o.default.createElement("div",{className:v.default.content},T(_),b(_),o.default.createElement("div",{className:v.default.overflow_wrap},S(_),A(_))))};t.CommentNodeRendered=m,t.COMMENT_TREE_NODE_HEIGHT=22},47842:(x,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),c=e(41869),p=e(23418),v=e(69635),m=e(53711),_=n.__importDefault(e(65887));let s=class extends o.TreeModel{constructor(h){super(),this.init(h)}};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 f=class extends c.Disposable{constructor(){super(),this.selectedDecoration=new o.Decoration(_.default.mod_selected),this.focusedDecoration=new o.Decoration(_.default.mod_focused),this._selectedNodes=[],this.onDidUpdateTreeModelEmitter=new c.Emitter,this.disposableCollection=new c.DisposableCollection,this.applyFocusedDecoration=(h,u=!0)=>{var d;if(h){for(const E of this._selectedNodes)this.selectedDecoration.removeTarget(E);this.focusedNode&&this.focusedDecoration.removeTarget(this.focusedNode),this.selectedDecoration.addTarget(h),this.focusedDecoration.addTarget(h),this._focusedNode=h,this._selectedNodes=[h],u&&((d=this.treeModel)===null||d===void 0||d.dispatchChange())}},this.removeFocusedDecoration=()=>{var h;this.focusedNode&&(this.focusedDecoration.removeTarget(this.focusedNode),(h=this.treeModel)===null||h===void 0||h.dispatchChange()),this._focusedNode=null},this.handleTreeBlur=()=>{this.removeFocusedDecoration()},this.handleTwistierClick=async(h,u)=>{(m.CommentFileNode.is(u)||u?.isAllowToggle)&&this.toggleDirectory(u)},this.handleItemClick=async(h,u)=>{this.applyFocusedDecoration(u),(m.CommentFileNode.is(u)||u?.isAllowToggle)&&this.toggleDirectory(u);let d,E;u instanceof m.CommentReplyNode||u instanceof m.CommentContentNode?(d=u.thread.uri,E=u.thread.range):d=u.resource,this.editorService.open(d,{range:E}).then(()=>{u.thread&&u.thread.show()})},this.toggleDirectory=h=>{h.expanded?this.commentTreeHandle.collapseNode(h):this.commentTreeHandle.expandNode(h)},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 h=await this.commentService.resolveChildren();if(!h)return;const u=h[0];u&&(this._treeModel=this.injector.get(s,[u]),await this._treeModel.ensureReady,this.initDecorations(u),this.disposables.push(c.Event.any(this.commentService.onThreadsCommentChange,this.commentService.onThreadsChanged,this.commentService.onThreadsCreated)(()=>{this.refresh()})),this.onDidUpdateTreeModelEmitter.fire(this._treeModel))}initDecorations(h){return this._decorations=new o.DecorationsManager(h),this._decorations.addDecoration(this.selectedDecoration),this._decorations.addDecoration(this.focusedDecoration),this._decorations}handleTreeHandler(h){this._commentTreeHandle=h}async refresh(){await this.whenReady,(0,c.runWhenIdle)(()=>{this.treeModel.root.refresh()})}async collapsedAll(){return await this.whenReady,this.treeModel.root.collapsedAll()}dispose(){this.disposableCollection.dispose()}};t.CommentModelService=f,n.__decorate([(0,r.Autowired)(v.ICommentsService),n.__metadata("design:type",Object)],f.prototype,"commentService",void 0),n.__decorate([(0,r.Autowired)(r.INJECTOR_TOKEN),n.__metadata("design:type",r.Injector)],f.prototype,"injector",void 0),n.__decorate([(0,r.Autowired)(p.WorkbenchEditorService),n.__metadata("design:type",p.WorkbenchEditorService)],f.prototype,"editorService",void 0),t.CommentModelService=f=n.__decorate([(0,r.Injectable)(),n.__metadata("design:paramtypes",[])],f)},53711:(x,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,_,s="",f,a,h,u){super(m,u),this.threads=_,this.tooltip=f,this.icon=a,this.resource=h,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 c extends n.CompositeTreeNode{static is(m){return n.CompositeTreeNode.is(m)&&"author"in m}constructor(m,_,s,f="",a,h,u,d){super(m,d),this.thread=_,this.comment=s,this.icon=a,this.author=h,this.resource=u,this._renderedDescription=f,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=c;class p extends n.TreeNode{constructor(m,_,s,f="",a,h,u){super(m,u),this.thread=_,this.icon=a,this.resource=h,this._renderedLabel=s,this._renderedDescription=f}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=p},69635:(x,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 c;(function(m){m.Thread="thread",m.Empty="empty"})(c||(t.CommentGutterType=c={})),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 p extends n.BasicEvent{}t.CommentPanelCollapse=p;class v extends n.BasicEvent{}t.CommentReactionClick=v},86077:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),e(85608).__exportStar(e(69635),t)},79383:(x,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 c=({className:p,children:v,...m})=>o.default.createElement("span",{className:(0,r.default)("kt-badge",p),...m},v);t.Badge=c},48412:(x,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)),c=e(99613),p=e(54713);e(71682);const v=()=>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:_,loading:s,className:f,type:a="primary",htmlType:h,size:u,ghost:d=!1,onClick:E,disabled:g,block:l,iconClass:y,icon:b,more:S,moreIconClass:A,menu:w,moreVisible:T,placement:D,title:I,onVisibleChange:O,...M})=>{const R=(0,r.default)("kt-button",f,{[`kt-${a}-button-loading`]:s,[`ghost-${a}-button`]:d&&!s&&a!=="link",[`${a}-button`]:a,[`${u}-button-size`]:u,"ghost-button":d&&a!=="link","block-button":l}),P=(0,r.default)(f,{"kt-clickable-icon":!!E});if(a==="icon")return o.default.createElement(p.Icon,{tooltip:I,disabled:g,icon:b,onClick:s||g?m:E,className:P,iconClass:y,...M});const k=y?o.default.createElement(p.Icon,{iconClass:y,disabled:g}):null;return w?o.default.createElement(c.Dropdown,{visible:T,className:"kt-menu",overlay:w,trigger:["click"],onVisibleChange:O,placement:D},o.default.createElement("button",{...M,disabled:g,className:R,type:h,onClick:s||g?m:E},s&&a!=="link"&&o.default.createElement(v,null),k&&k,_,S&&o.default.createElement(p.Icon,{iconClass:A||(0,p.getIcon)("down"),className:"kt-button-secondary-more"}))):o.default.createElement("button",{...M,disabled:g,className:R,type:h,onClick:s||g?m:E},s&&a!=="link"&&o.default.createElement(v,null),k&&k,_)})},7273:(x,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)),c=e(65973);e(6099);const p=()=>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"})),v=({insertClass:m,className:_,label:s,size:f="default",disabled:a,checked:h,wrapTabIndex:u,...d})=>{(0,c.warning)(!m,"`insertClass` was deprecated, please use `className` instead");const E=d;return E.checked=h??!1,o.default.createElement("label",{className:(0,r.default)("kt-checkbox",m,_,{"kt-checkbox-large":f==="large","kt-checkbox-disabled":a}),tabIndex:u},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(p,null))),s||" ")};t.CheckBox=v,t.CheckBox.displayName="OpenSumiCheckBox"},58998:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ClickOutside=void 0;const r=e(85608).__importDefault(e(14041)),o=({mouseEvents:c=["click"],onOutsideClick:p,children:v,...m})=>{const _=r.default.useRef(null),s=r.default.useCallback(f=>{_.current&&f.target&&!_.current.contains(f.target)&&p(f)},[p]);return r.default.useEffect(()=>(c.forEach(f=>{window.addEventListener(f,s,!0)}),()=>{c.forEach(f=>{window.removeEventListener(f,s,!0)})}),[c]),r.default.createElement("div",{...m,ref:_},v)};t.ClickOutside=o},50570:(x,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:(x,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)),c=e(43718),p=e(48412),v=e(50570),m=e(54713),_=e(79024);e(65773);const s=({onCancel:h,onOk:u,cancelText:d,okText:E})=>o.default.createElement(o.default.Fragment,null,o.default.createElement(p.Button,{onClick:h,type:"secondary"},d||(0,c.localize)("ButtonCancel")),o.default.createElement(p.Button,{onClick:u},E||(0,c.localize)("ButtonOK"))),f=({onClose:h,closable:u,type:d="confirm",messageType:E=v.MessageType.Info,icon:g,message:l,buttons:y,title:b,onOk:S,onCancel:A,okText:w,cancelText:T})=>{const{getIcon:D}=o.default.useContext(m.IconContext);return o.default.createElement(o.default.Fragment,null,o.default.createElement("div",{className:"kt-dialog-content"},g&&o.default.createElement("div",{style:{color:g.color},className:(0,r.default)("kt-dialog-icon",(0,m.getIcon)(g.className)||D(g.className))}),o.default.createElement("div",{className:"kt-dialog-content_area"},o.default.createElement("div",{className:"kt-dialog-content_title"},b),l&&o.default.createElement("span",{className:"kt-dialog-message"},l)),u&&d!=="basic"&&o.default.createElement("button",{className:(0,r.default)("kt-dialog-closex",(0,m.getIcon)("close")),onClick:h})),E!==v.MessageType.Empty&&d!=="basic"&&o.default.createElement("div",{className:"kt-dialog-buttonWrap"},d==="confirm"?y||o.default.createElement(s,{onCancel:A,onOk:S,okText:w,cancelText:T}):o.default.createElement(p.Button,{onClick:h},"OK")))};t.DialogContent=f;const a=({visible:h,onClose:u,closable:d,afterClose:E,messageType:g,icon:l,message:y,detail:b,buttons:S,type:A="confirm",title:w,onOk:T,onCancel:D,okText:I,cancelText:O,getContainer:M,keyboard:R,...P})=>o.default.createElement(_.Overlay,{visible:h,onClose:u,title:A==="basic"?w:null,closable:A==="basic",getContainer:M,keyboard:R,footer:A==="basic"?S||o.default.createElement(s,{onCancel:D,onOk:T,okText:I,cancelText:O}):void 0,afterClose:E,...P},o.default.createElement(t.DialogContent,{title:y,message:b,buttons:S,visible:h,icon:l,...P}));t.Dialog=a},99665:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608),r=n.__importDefault(e(62596)),o=n.__importDefault(e(53373)),c=n.__importStar(e(14041)),p=e(48412),v=n.__importDefault(e(35060)),m=_=>{var s;const{prefixCls:f,type:a="primary",size:h="default",danger:u,disabled:d,loading:E,onClick:g,htmlType:l,children:y,className:b,overlay:S,trigger:A,align:w,visible:T,onVisibleChange:D,placement:I,getPopupContainer:O,href:M,icon:R=c.createElement(r.default,null),title:P,buttonsRender:k=H=>H,mouseEnterDelay:F,mouseLeaveDelay:L,overlayClassName:N,overlayStyle:j,...W}=_,U=f||"kt-dropdown-button",X={align:w,overlay:S,disabled:d,trigger:d?[]:A,getPopupContainer:O,mouseEnterDelay:F,mouseLeaveDelay:L,overlayClassName:N,overlayStyle:j};X.placement=(s=_?.placement)!==null&&s!==void 0?s:"bottomRight";const V=c.createElement(p.Button,{size:h,type:a,disabled:d,loading:E,onClick:g,htmlType:l,title:P},y),$=c.createElement(p.Button,{size:h,type:a},R??c.createElement(r.default,null)),[Y,G]=k([V,$]);return c.createElement("div",{...W,className:(0,o.default)(U,b)},Y,c.createElement(v.default,{...X},G))};t.default=m},35060:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608),r=n.__importDefault(e(64797)),o=n.__importDefault(e(53373)),c=n.__importDefault(e(5147)),p=n.__importDefault(e(14041)),v=e(43953),m=e(65973),_=(0,v.tuple)("topLeft","topCenter","topRight","bottomLeft","bottomCenter","bottomRight");class s extends p.default.Component{constructor(){super(...arguments),this.renderOverlay=a=>{const{overlay:h}=this.props;let u;typeof h=="function"?u=h():u=h,u=p.default.Children.only(u);const d=u.props;(0,m.warning)(!d.mode||d.mode==="vertical",`[Dropdown] mode="${d.mode}" is not supported for Dropdown's Menu.`);const{selectable:E=!1,focusable:g=!0}=d,l=p.default.createElement("span",{className:`${a}-menu-submenu-arrow`},p.default.createElement(r.default,{className:`${a}-menu-submenu-arrow-icon`}));return typeof u.type=="string"?h:p.default.cloneElement(u,{mode:"vertical",selectable:E,focusable:g,expandIcon:l})},this.renderDropDown=()=>{const{prefixCls:a,children:h,trigger:u,disabled:d,getPopupContainer:E}=this.props,g=a||"kt-dropdown",l=p.default.Children.only(h),y=p.default.cloneElement(l,{className:(0,o.default)(l.props.className,`${g}-trigger`),disabled:d}),b=d?[]:u;let S;return b&&b.indexOf("contextMenu")!==-1&&(S=!0),p.default.createElement(c.default,{alignPoint:S,...this.props,prefixCls:g,getPopupContainer:E,transitionName:this.getTransitionName(),trigger:b,overlay:()=>this.renderOverlay(g)},y)}}getTransitionName(){const{placement:a="",transitionName:h}=this.props;return h!==void 0?h:a.indexOf("top")>=0?"slide-down":"slide-up"}render(){return this.renderDropDown()}}s.defaultProps={mouseEnterDelay:.15,mouseLeaveDelay:.1,placement:"bottomLeft"},t.default=s},99613:(x,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:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Icon=t._InternalIcon=t.IconContext=void 0,t.IconContextProvider=v;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importDefault(e(14041)),c=e(12122),p=e(76577);e(1914),t.IconContext=o.default.createContext({getIcon:(_,s)=>_});function v(_){return o.default.createElement(t.IconContext.Provider,{value:_.value},o.default.createElement(t.IconContext.Consumer,null,s=>_.value===s?_.children:null))}const m=function(_,s){const{size:f="small",loading:a,icon:h,iconClass:u,className:d,tooltip:E,rotate:g,anim:l,fill:y,disabled:b,onClick:S,children:A,resourceOptions:w,animate:T,style:D={},...I}=_,O={rotate:g,anim:l,fill:y};let M;if(h)if(c.defaultIconMap[h])M=(0,p.getIcon)(h,O);else{const{getIcon:R,getResourceIcon:P}=o.default.useContext(t.IconContext);w&&P?M=P(h,w):M=R(h,O)}else M=u;return T&&T==="spin"&&(D.animation="kt-icon-spin 1.5s steps(30) infinite"),o.default.createElement("span",{...I,title:E,onClick:S,ref:s,className:(0,r.default)("kt-icon",M,d,{"kt-icon-loading":a,"kt-icon-disabled":!!b,[`kt-icon-${f}`]:!!f,"kt-icon-clickable":!!S,"kt-icon-resource":!!w,expanded:!!w&&w.isOpenedDirectory}),style:D},A)};t._InternalIcon=o.default.memo(o.default.forwardRef(m)),t.Icon=o.default.memo(o.default.forwardRef(m))},10391:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createFromIconfontCN=f;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importDefault(e(14041)),c=e(80564),p=e(76577),v=new Set;function m(a){return!!(typeof a=="string"&&a.length&&!v.has(a))}function _(a,h=0){const u=a[h];if(m(u)){const d=document.createElement("script");d.setAttribute("src",u),d.setAttribute("data-namespace",u),a.length>h+1&&(d.onload=()=>{_(a,h+1)},d.onerror=()=>{_(a,h+1)}),v.add(u),document.body.appendChild(d)}}const s={width:"1em",height:"1em",fill:"currentColor"};function f(a={}){const{scriptUrl:h,extraCommonProps:u={}}=a;h&&typeof document<"u"&&typeof window<"u"&&typeof document.createElement=="function"&&(Array.isArray(h)?_(h.reverse()):_([h]));const d=o.default.forwardRef((E,g)=>{const{icon:l,children:y,rotate:b,anim:S,fill:A,className:w="",...T}=E,D={rotate:b,anim:S,fill:A};let I=null;l&&(I=o.default.createElement("svg",{...s,focusable:"false"},o.default.createElement("use",{xlinkHref:`#${l}`}))),y&&(I=y);const O=(0,p.getIconShapeClxList)(D);return o.default.createElement(c._InternalIcon,{...u,...T,className:(0,r.default)(w,O),ref:g},I)});return d.displayName="Iconfont",d}},12122:(x,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 c={"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"},p=Object.assign({},o.defaultIconfont,c);t.defaultIconMap=new Proxy(p,{get(_,s){const f=c[s];return(0,r.default)(!f,`Icon '${s}' was a typo, please use '${f}' instead`),_[s]}});class v{constructor(){this._ktIconPrefixes=[],this._iconMap={}}update(s,f){this._iconMap[s]=f,this._ktIconPrefixes.push(s)}getIconClx(s){if(!s)return(0,r.default)(!1,"not a valid icon key:"+s),[];let f=this._ktIconPrefixes.length;for(;!this._iconMap[this._ktIconPrefixes[--f]][s]&&f!==0;);const a=this._iconMap[this._ktIconPrefixes[f]][s];return a?[`${this._ktIconPrefixes[f]}${a}`]:((0,r.default)(!1,"No icon found for "+s),[])}}t.iconManager=new v,t.iconManager.update("kaitian-icon kticon-",t.defaultIconMap)},81139:(x,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","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-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","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","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",run:"run",rust:"rust","save-all":"save-all",scm:"scm",search:"search",send:"send","send-hollow":"send-hollow","send-solid":"send-solid",setting:"setting",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"}},54713:(x,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:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.updateKaitianIconMap=t.getKaitianIcon=t.ANIM_TYPE=t.ROTATE_TYPE=void 0,t.updateIconMap=v,t.getIconShapeClxList=m,t.getIcon=_;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 c=["rotate-90","rotate-180","rotate-270","flip-horizontal","flip-vertical","flip-both"],p=["spin","pulse"];function v(s,f){n.iconManager.update(s,f)}function m(s){const{rotate:f,anim:a,fill:h}=s||{},u=[];return f!==void 0&&u.push(`iconfont-${c[f]}`),a!==void 0&&u.push(`iconfont-anim-${p[a]}`),h&&u.push("toggled"),u}function _(s,f){const a=n.iconManager.getIconClx(s),h=m(f);return a.push(...h),a.join(" ")}t.getKaitianIcon=_,t.updateKaitianIconMap=v},97267:(x,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(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:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HistoryInputBox=void 0;const r=e(85608).__importDefault(e(14041)),o=e(54114),c=e(63924);class p 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 _=this.getNextValue();_&&(_=_===m?this.getNextValue():_),_&&this.onValueChange(_)},this.showPreviousValue=()=>{const m=this.getCurrentValue()||"";this.history&&!this.history.has(m)&&this.addToHistory(m);let _=this.getPreviousValue();_&&(_=_===m?this.getPreviousValue():_),_&&this.onValueChange(_)},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:_}=this.props;this.setState({inputValue:m}),_&&_(m)},this.onKeyDown=m=>{const{onKeyDown:_}=this.props;_&&_(m)},this.focus=()=>{this.inputRef&&this.inputRef.current&&this.inputRef.current.focus()}}componentDidMount(){var m;const{history:_,onReady:s}=this.props;this.history=new o.HistoryNavigator(_||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(c.Input,{ref:this.inputRef,...this.inputProps,onValueChange:this.onValueChange,onKeyDown:this.onKeyDown,value:m})}}t.HistoryInputBox=p},63924:(x,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)),c=e(54713),p=n.__importDefault(e(65973));e(41065);function v(_){return typeof _>"u"}function m(_,s,f){if(typeof f=="function"){let a=s;if(s.type==="click"){a=Object.create(s),a.target=_,a.currentTarget=_;const h=_.value;_.value="",f(a),_.value=h;return}f(a)}}t.Input=o.default.forwardRef((_,s)=>{const{defaultValue:f,className:a,wrapperStyle:h,size:u="default",controls:d,onChange:E,selection:g,addonBefore:l,addonAfter:y,persistFocus:b=!0,hasClear:S,afterClear:A,value:w,onValueChange:T,onPressEnter:D,onKeyDown:I,as:O="input",...M}=_;(0,p.default)(!d,"[@opensumi/ide-components Input]: `controls` was deprecated, please use `addonAfter` instead");const R=o.default.useRef(null),[P,k]=o.default.useState(!1),[F,L]=o.default.useState(()=>(w??f)||""),[N,j]=o.default.useState(()=>(w??f)||"");o.default.useImperativeHandle(s,()=>R.current),o.default.useEffect(()=>{g&&!v(g.start)&&!P&&R.current.setSelectionRange(g.start,g.end)},[g,P]),o.default.useEffect(()=>{w===null||typeof w>"u"||(w!==N&&w!==F&&L(w),w!==N&&j(w))},[w]);const W=K=>{X(K.target.value),m(R.current,K,E)},U=K=>{K.preventDefault(),X(""),m(R.current,K,E),typeof A=="function"&&A()},X=K=>{L(K),typeof T=="function"&&T(K),P||k(!0)},V=K=>{K.keyCode===13&&typeof D=="function"&&D(K),typeof I=="function"&&I(K)},$=y||d,Y=b?{onMouseDown:K=>{K.preventDefault()}}:{},G=(K,Z)=>K?o.default.createElement("div",{className:(0,r.default)("kt-input-addon",Z),...Y},o.default.Children.map(K,Q=>o.default.isValidElement(Q)?o.default.cloneElement(Q,Y):null)):null,H=(0,r.default)("kt-input",a,{[`kt-input-${u}`]:u,"kt-input-disabled":_.disabled});return o.default.createElement("div",{className:H,style:h},G(l,"kt-input-addon-before"),o.default.createElement("div",{className:"kt-input-box"},o.default.createElement(O,{ref:R,type:"text",autoCapitalize:"off",autoCorrect:"off",autoComplete:"off",spellCheck:!1,...M,value:F,onChange:W,onKeyDown:V}),S&&F&&o.default.createElement(c.Icon,{className:"kt-input-clear",icon:"close-circle-fill",onClick:U,...Y})),G($,"kt-input-addon-after"))}),t.Input.displayName="OpenSumiInput"},64545:(x,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)),c=n.__importDefault(e(14041));e(41065),e(17107);const p="kt-input-number",v=m=>{const{value:_,size:s="default",wrapperStyle:f,className:a,disabled:h,min:u,max:d,onChange:E,...g}=m,l=b=>{E&&E(b)},y=(0,r.default)("kt-input","kt-input-number",a,{[`kt-input-${s}`]:s,"kt-input-disabled":h});return c.default.createElement("div",{className:y,style:f},c.default.createElement("div",{className:"kt-input-box"},c.default.createElement(o.default,{prefixCls:p,min:u,max:d,value:_,type:"number",onChange:l,controls:!0,...g})))};t.InputNumber=v,t.InputNumber.displayName="OpenSumiInputNumber"},10413:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bindInputElement=v;const r=e(85608).__importDefault(e(14041)),o=e(63924);class c extends r.default.Component{constructor(){super(...arguments),this.placeholderInputRef=r.default.createRef()}render(){const _={...this.props};return delete _.inputElement,delete _.innerRef,r.default.createElement(o.Input,{..._,type:"text",id:this.props.id,ref:this.placeholderInputRef})}componentDidMount(){const{innerRef:_,inputElement:s}=this.props;this.placeholderInputRef.current.parentElement.replaceChild(s,this.placeholderInputRef.current),this.applyAttributes(),s.focus(),typeof _=="function"?_(s):_!==null&&typeof _=="object"&&_.current===null&&(_.current=s)}UNSAFE_componentWillUnmount(){const{innerRef:_,inputElement:s}=this.props;s.parentElement.replaceChild(this.placeholderInputRef.current,s),_!==null&&typeof _=="object"&&_.current&&(_.current=null)}shouldComponentUpdate(_){return this.applyAttributes(_),!1}applyAttributes(_=this.props){const{className:s,id:f,inputElement:a,style:h}=_;if(typeof s=="string"&&(a.className=s),typeof f=="string"&&(a.id=f),h!==null&&typeof h=="object")for(const u in h)typeof h[u]=="string"&&a[u]&&(a[u]=h[u])}}const p=r.default.forwardRef((m,_)=>r.default.createElement(c,{...m,innerRef:_}));function v(m){return _=>r.default.createElement(p,{..._,inputElement:m})}},61172:(x,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((c,p)=>r.default.createElement(o.Input,{...c,as:"textarea",ref:p})),t.TextArea.displayName="OpenSumiTextArea"},34390:(x,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)),c=e(63924);e(13254);var p;(function(v){v[v.INFO=1]="INFO",v[v.ERROR=2]="ERROR",v[v.WARNING=3]="WARNING",v[v.IGNORE=4]="IGNORE"})(p||(t.VALIDATE_TYPE=p={})),t.ValidateInput=o.default.forwardRef(({type:v,className:m,validate:_,onChange:s,onValueChange:f,validateMessage:a,popup:h=!0,...u},d)=>{const[E,g]=o.default.useState();o.default.useEffect(()=>{g(a)},[a]);const l=(0,r.default)({"validate-error":E&&E.type===p.ERROR,"validate-warning":E&&E.type===p.WARNING,"validate-info":E&&E.type===p.INFO}),y=()=>{if(E&&E.message)return o.default.createElement("div",{className:(0,r.default)("validate-message",l,{popup:h})},E.message)},b=S=>{const A=S.target;let w;if(A.type==="number"?w=S.target.valueAsNumber:w=S.target.value,typeof _=="function"){let T;v==="number"?/^[0-9]+$/.test(w)?T=_(Number(w)):T=_(String(w)):T=_(w),g(T)}typeof s=="function"&&s(S),typeof f=="function"&&f(w)};return o.default.createElement("div",{className:(0,r.default)("input-box",{popup:h})},o.default.createElement(c.Input,{type:v,ref:d,className:(0,r.default)(m,E,l),onChange:b,...u}),y())}),t.ValidateInput.displayName="ValidateInput"},50708:(x,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:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),e(85608).__exportStar(e(3205),t)},3205:(x,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:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LocalizeContext=void 0,t.LocalizeContextProvider=v,t.ComponentContextProvider=m;const r=e(85608).__importDefault(e(14041)),o=e(54713),c=e(65973),p=_=>((0,c.warning)(!1,"Using the default localize fn"),"");t.LocalizeContext=r.default.createContext({localize:p}),t.LocalizeContext.displayName="LocalizeContext";function v(_){return r.default.createElement(t.LocalizeContext.Provider,{value:_.value},r.default.createElement(t.LocalizeContext.Consumer,null,s=>_.value===s?_.children:null))}function m(_){return r.default.createElement(o.IconContextProvider,{value:_.value},r.default.createElement(v,{value:{localize:_.value.localize}},_.children))}},13719:(x,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:(x,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 c extends r.marked.Renderer{constructor(v){super(),this.unescapeInfo=new Map([["&quot;",'"'],["&nbsp;"," "],["&amp;","&"],["&#39;","'"],["&lt;","<"],["&gt;",">"]]),this.renderer=v.renderer}parse(v){return v.map((m,_)=>{const s=(()=>{switch(m.type){case"html":return this.renderer.html(m.text);case"space":return null;case"heading":{const f=m.depth;return this.renderer.heading(this.parseInline(m.tokens),f)}case"paragraph":return this.renderer.paragraph(this.parseInline(m.tokens));case"text":{const f=m;return f.tokens?this.parseInline(f.tokens):m.text}case"blockquote":{const f=m,a=this.parse(f.tokens);return this.renderer.blockquote(a)}case"list":{const a=m.items.map((h,u)=>{var d;const E=[];return h.task&&E.push(this.renderer.checkbox((d=h.checked)!==null&&d!==void 0?d:!1)),E.push(this.parse(h.tokens)),o.default.cloneElement(this.renderer.listItem(E),{key:`list-item-${u}`})});return this.renderer.list(a,m.ordered)}case"code":return this.renderer.code(m.text,m.lang);case"table":{const f=m,a=f.header.map((g,l)=>o.default.cloneElement(this.renderer.tableCell(this.parseInline(g.tokens),{header:!0,align:m.align[l]}),{key:`header-cell-${l}`})),h=o.default.cloneElement(this.renderer.tableRow(a),{key:"header-row"}),u=this.renderer.tableHeader(h),d=f.rows.map((g,l)=>{const y=g.map((b,S)=>o.default.cloneElement(this.renderer.tableCell(this.parseInline(b.tokens),{header:!1,align:m.align[S]}),{key:`body-cell-${l}-${S}`}));return o.default.cloneElement(this.renderer.tableRow(y),{key:`body-row-${l}`})}),E=this.renderer.tableBody(d);return this.renderer.table([u,E])}case"hr":return this.renderer.hr();default:return console.warn(`Token with "${m.type}" type was not found`),null}})();return o.default.isValidElement(s)?o.default.cloneElement(s,{key:`token-${_}`}):s})}parseInline(v=[]){return v.map(m=>{switch(m.type){case"text":{const _=m.text.replace(/&(#\d+|[a-zA-Z]+);/g,s=>{var f;return(f=this.unescapeInfo.get(s))!==null&&f!==void 0?f:s});return this.renderer.text(_)}case"strong":return this.renderer.strong(this.parseInline(m.tokens));case"em":return this.renderer.em(this.parseInline(m.tokens));case"del":return this.renderer.del(this.parseInline(m.tokens));case"codespan":return this.renderer.codespan(unescape(m.text));case"link":return this.renderer.link(m.href,this.parseInline(m.tokens));case"image":return this.renderer.image(m.href,m.text,m.title);case"html":return this.renderer.html(m.text);case"br":return this.renderer.br();case"escape":return this.renderer.text(m.text);default:return console.warn(`Token with "${m.type}" type was not found`),null}})}}t.MarkdownReactParser=c},44547:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MarkdownReactRenderer=void 0;const r=e(85608).__importStar(e(14041));class o{constructor(p={}){this.uid=0,this.options=p}node(p,v=null,m={}){const _={key:`marked-react-${this.uid}`};return this.incrementUID(),(0,r.createElement)(p,{...m,..._},v)}incrementUID(){this.uid+=1}heading(p,v){return this.node(`h${v}`,p)}paragraph(p){return this.node("p",p)}joinBase(p,v){if(!v)return p;try{return new URL(p,v).href}catch{return p}}link(p,v){const m=this.joinBase(p,this.options.baseURL);return this.node("a",v,{href:m,target:"_blank",rel:"noopener noreferrer"})}image(p,v,m=null){const _=this.joinBase(p,this.options.baseURL);return this.node("img",null,{src:_,alt:v,title:m})}codespan(p,v=null){const m=v?`${this.options.langPrefix}${v}`:null;return this.node("code",p,{className:m})}code(p,v){return this.node("pre",this.codespan(p,v))}blockquote(p){return this.node("blockquote",p)}list(p,v){return this.node(v?"ol":"ul",p)}listItem(p){return this.node("li",p)}checkbox(p){return this.node("input",null,{type:"checkbox",disabled:!0,checked:p})}table(p){return this.node("table",p)}tableHeader(p){return this.node("thead",p)}tableBody(p){return this.node("tbody",p)}tableRow(p){return this.node("tr",p)}tableCell(p,v){const m=v.header?"th":"td";return this.node(m,p,{align:v.align})}strong(p){return this.node("strong",p)}em(p){return this.node("em",p)}del(p){return this.node("del",p)}text(p){return p}html(p){return r.default.createElement("div",{dangerouslySetInnerHTML:{__html:p}})}hr(){return this.node("hr")}br(){return this.node("br")}}t.MarkdownReactRenderer=o},56849:(x,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)),c=e(39777),p=(_,s,f)=>`<a rel="noopener" ${c.DATA_SET_COMMAND}="${_}" title="${s??_}">${f}</a>`;t.linkify=p;class v extends r.Renderer{link(s,f,a){return(0,t.linkify)(s,f,a)}}t.DefaultMarkedRenderer=v;function m(_){const s=(h,u)=>r.marked.parse(h,{renderer:u}),[f,a]=o.default.useState(s(_.value||"",_.renderer));return o.default.useEffect(()=>{a(s(_.value||"",_.renderer))},[_.renderer,_.value]),o.default.createElement(c.RenderWrapper,{opener:_.opener,html:f})}},39777:(x,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=c=>{const p=(0,r.useRef)(),{html:v,opener:m}=c;(0,r.useEffect)(()=>(p&&p.current&&p.current.addEventListener("click",_),()=>{p&&p.current&&p.current.removeEventListener("click",_)}),[]);const _=s=>{let f=s.target;if(f.className.includes("codicon")&&(f=f.parentNode),f.tagName.toLowerCase()==="a"&&f.hasAttribute(t.DATA_SET_COMMAND)){const a=f.getAttribute(t.DATA_SET_COMMAND);a&&m&&m.open(a)}};return r.default.createElement("div",{className:"kt-md-renderer-wrap",dangerouslySetInnerHTML:{__html:v},ref:p})};t.RenderWrapper=o},98113:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=(0,e(14041).createContext)({inlineCollapsed:!1});t.default=r},64063:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608),r=e(31363),o=n.__importDefault(e(14041)),c=n.__importDefault(e(98113));class p extends o.default.Component{constructor(){super(...arguments),this.renderItem=()=>{const{title:m,..._}=this.props;return o.default.createElement(c.default.Consumer,null,({inlineCollapsed:s})=>s?o.default.createElement(r.Item,{..._,title:m}):o.default.createElement(r.Item,{..._,title:m}))}}render(){return this.renderItem()}}p.isMenuItem=!0,t.default=p},91886:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608),r=n.__importDefault(e(39067)),o=e(31363),c=n.__importDefault(e(14041));class p extends c.default.Component{render(){const{popupClassName:m}=this.props;return c.default.createElement(o.SubMenu,{...this.props,popupClassName:m})}}p.contextTypes={antdMenuTheme:r.default.string},p.isSubMenu=1,t.default=p},45803:(x,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)),c=n.__importDefault(e(14041)),p=e(90146),v=e(2835),m=e(47768),_=e(65973),s=n.__importDefault(e(98113)),f=n.__importDefault(e(64063)),a=n.__importDefault(e(91886));e(42985);class h extends c.default.Component{static getDerivedStateFromProps(E,g){const{prevProps:l}=g,y={prevProps:E};return l.mode==="inline"&&E.mode!=="inline"&&(y.switchingModeFromInline=!0),"openKeys"in E?y.openKeys=E.openKeys:(E.inlineCollapsed&&!l.inlineCollapsed&&(y.switchingModeFromInline=!0,y.inlineOpenKeys=g.openKeys,y.openKeys=[]),!E.inlineCollapsed&&l.inlineCollapsed&&(y.openKeys=g.inlineOpenKeys,y.inlineOpenKeys=[])),y}constructor(E){super(E),this.handleMouseEnter=l=>{this.restoreModeVerticalFromInline();const{onMouseEnter:y}=this.props;y&&y(l)},this.handleTransitionEnd=l=>{const y=l.propertyName==="width"&&l.target===l.currentTarget,{className:b}=l.target,S=Object.prototype.toString.call(b)==="[object SVGAnimatedString]"?b.animVal:b,A=l.propertyName==="font-size"&&S.indexOf("anticon")>=0;(y||A)&&this.restoreModeVerticalFromInline()},this.handleClick=l=>{this.handleOpenChange([]);const{onClick:y}=this.props;y&&y(l)},this.handleOpenChange=l=>{this.setOpenKeys(l);const{onOpenChange:y}=this.props;y&&y(l)},this.renderMenu=()=>{const{prefixCls:l,className:y}=this.props,b=this.getRealMenuMode(),S=this.getOpenMotionProps(b),A=l||"kt-inner-menu",w=(0,r.default)(y,{[`${A}-inline-collapsed`]:this.getInlineCollapsed()}),T={openKeys:this.state.openKeys,onOpenChange:this.handleOpenChange,className:w,mode:b,...S};return b!=="inline"&&(T.onClick=this.handleClick),this.getInlineCollapsed()&&(T.openKeys=[]),c.default.createElement(o.default,{...this.props,...T,prefixCls:A,onTransitionEnd:this.handleTransitionEnd,onMouseEnter:this.handleMouseEnter})},(0,_.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,_.warning)(!("inlineCollapsed"in E&&E.mode!=="inline"),"[Menu] `inlineCollapsed` should only be used when `mode` is inline.");let g;"openKeys"in E?g=E.openKeys:"defaultOpenKeys"in E&&(g=E.defaultOpenKeys),this.state={openKeys:g||[],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:g}=this.props;return E?"vertical":g}getInlineCollapsed(){const{inlineCollapsed:E}=this.props;return E}getOpenMotionProps(E){const{openTransitionName:g,openAnimation:l,motion:y}=this.props;return y?{motion:y}:l?((0,_.warning)(typeof l=="string","[Menu] `openAnimation` do not support object. Please use `motion` instead."),{openAnimation:l}):g?{openTransitionName:g}:E==="horizontal"?{motion:{motionName:"slide-up"}}:E==="inline"?{motion:v.collapseMotion}:{motion:{motionName:""}}}restoreModeVerticalFromInline(){const{switchingModeFromInline:E}=this.state;E&&this.setState({switchingModeFromInline:!1})}render(){return c.default.createElement(s.default.Provider,{value:{inlineCollapsed:this.getInlineCollapsed()||!1}},this.renderMenu())}}h.defaultProps={className:"",focusable:!1},(0,p.polyfill)(h);class u extends c.default.Component{render(){return c.default.createElement(h,{...this.props})}}t.Menu=u,u.Divider=o.Divider,u.Item=f.default,u.SubMenu=a.default,u.ItemGroup=o.ItemGroup},31059:(x,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(c){return(p,v)=>new Promise(m=>{r.default[c](p,v,m)})}t.message={success:o("success"),error:o("error"),info:o("info"),warning:o("warning"),loading:o("loading")}},71036:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608),r=n.__importDefault(e(29517)),o=n.__importDefault(e(96041)),c=n.__importDefault(e(63492)),p=n.__importDefault(e(36117)),v=n.__importDefault(e(59303)),m=n.__importDefault(e(10435)),_=n.__importDefault(e(14041));let s=3,f,a,h=1,u="kt-message",d="move-up",E,g;function l(w){if(a){w(a);return}m.default.newInstance({prefixCls:u,transitionName:d,style:{top:f},getContainer:E,maxCount:g},T=>{if(a){w(a);return}a=T,w(T)})}const y={info:p.default,success:r.default,error:o.default,warning:c.default,loading:v.default};function b(w){const T=w.duration!==void 0?w.duration:s,D=w.key||h++,I=new Promise(M=>{const R=()=>(typeof w.onClose=="function"&&w.onClose(),M(!0));l(P=>{const k=y[w.type];P.notice({key:D,duration:T,style:{},content:_.default.createElement("div",{className:`${u}-custom-content${w.type?` ${u}-${w.type}`:""}`},w.icon||k&&_.default.createElement(k,null),_.default.createElement("span",null,w.content)),onClose:R})})}),O=()=>{a&&a.removeNotice(D)};return O.then=(M,R)=>I.then(M,R),O.promise=I,O}function S(w){return Object.prototype.toString.call(w)==="[object Object]"&&!!w.content}const A={open:b,config(w){w.top!==void 0&&(f=w.top,a=null),w.duration!==void 0&&(s=w.duration),w.prefixCls!==void 0&&(u=w.prefixCls),w.getContainer!==void 0&&(E=w.getContainer),w.transitionName!==void 0&&(d=w.transitionName,a=null),w.maxCount!==void 0&&(g=w.maxCount,a=null)},destroy(){a&&(a.destroy(),a=null)}};["success","info","warning","error","loading"].forEach(w=>{A[w]=(T,D,I)=>S(T)?A.open({...T,type:w}):(typeof D=="function"&&(I=D,D=void 0),A.open({content:T,duration:D,type:w,onClose:I}))}),A.warn=A.warning,t.default=A},6656:(x,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)),c=n.__importDefault(e(39067)),p=n.__importDefault(e(91812)),v=n.__importDefault(e(25946)),m=n.__importDefault(e(14041)),_=e(48412),s=e(69587);let f;t.destroyFns=[];const a=u=>{f={x:u.pageX,y:u.pageY},setTimeout(()=>f=null,100)};typeof window<"u"&&window.document&&window.document.documentElement&&(0,v.default)(document.documentElement,"click",a);class h extends m.default.Component{constructor(){super(...arguments),this.handleCancel=d=>{const{onCancel:E}=this.props;E&&E(d)},this.handleOk=d=>{const{onOk:E}=this.props;E&&E(d)},this.renderFooter=d=>{const{okText:E,okType:g,cancelText:l,confirmLoading:y}=this.props;return m.default.createElement("div",null,m.default.createElement(_.Button,{onClick:this.handleCancel,...this.props.cancelButtonProps},l||d.cancelText),m.default.createElement(_.Button,{type:g,loading:y,onClick:this.handleOk,...this.props.okButtonProps},E||d.okText))},this.renderModal=()=>{const{prefixCls:d,footer:E,visible:g,wrapClassName:l,centered:y,getContainer:b,closeIcon:S,closable:A=!0,...w}=this.props,T=d||"kt-modal",D=this.renderFooter((0,s.getConfirmLocale)()),I=m.default.createElement("span",{className:`${T}-close-x`},S||m.default.createElement(r.default,{className:`${T}-close-icon`}));return m.default.createElement(p.default,{...w,animation:this.props.animation,getContainer:b,prefixCls:T,wrapClassName:(0,o.default)({[`${T}-centered`]:!!y},l),footer:E===void 0?D:E,visible:g,mousePosition:f,onClose:this.handleCancel,closeIcon:I})}}render(){return this.renderModal()}}h.defaultProps={width:520,confirmLoading:!1,visible:!1,okType:"primary"},h.propTypes={prefixCls:c.default.string,onOk:c.default.func,onCancel:c.default.func,okText:c.default.node,cancelText:c.default.node,centered:c.default.bool,width:c.default.oneOfType([c.default.number,c.default.string]),confirmLoading:c.default.bool,visible:c.default.bool,footer:c.default.node,title:c.default.node,closable:c.default.bool,closeIcon:c.default.node},t.default=h},53017:(x,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:(x,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(c){c?n={...n,...c}:n={...e}}function o(){return n}},18875:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.notification=void 0,t.open=f,t.close=a,t.update=h;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importDefault(e(14041)),c=e(70392),p=e(48412),v=e(50570),m=n.__importDefault(e(70748));e(1477);const _={[v.MessageType.Info]:15,[v.MessageType.Warning]:18,[v.MessageType.Error]:20};m.default.config({placement:"bottomRight"}),t.notification=m.default;const s=new Map;function f(d,E,g=!0,l,y,b,S,A){return(0,c.createCancelablePromise)(w=>(w.onCancellationRequested(()=>{a(l)}),new Promise(T=>{const D={key:l,className:(0,r.default)("kt-notification-wrapper",{"kt-notification-info":E===v.MessageType.Info,"kt-notification-error":E===v.MessageType.Error,"kt-notification-warn":E===v.MessageType.Warning}),duration:(0,c.isUndefined)(S)?_[E]:S,onClose:()=>{A&&A(),s.delete(l),T(void 0)},btn:y?y.map((I,O)=>{const M=typeof I=="string",R={className:`${(0,r.default)("kt-notification-button")}${M?"":I.class}`,ghost:M?O===0:!I.primary,key:M?I:I.id,onClick:()=>{T(I),m.default.close(l),M||I.run()}},P=M?I:I.label;return o.default.createElement(p.Button,{size:"small",...R},P)}):null,message:d,description:b};s.set(l,[E,D]),g||(D.closeIcon=o.default.createElement("span",null)),u(E,D)})))}function a(d){t.notification.close(d)}function h(d,E){const g=s.get(d);u(g[0],{...g[1],key:d,message:E})}function u(d,E){switch(d){case v.MessageType.Info:t.notification.info(E);break;case v.MessageType.Warning:t.notification.warning(E);break;case v.MessageType.Error:t.notification.error(E);break;default:t.notification.open(E);break}}},70748:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608),r=n.__importDefault(e(55435)),o=n.__importDefault(e(31079)),c=n.__importDefault(e(22143)),p=n.__importDefault(e(5550)),v=n.__importDefault(e(74339)),m=n.__importDefault(e(10435)),_=n.__importDefault(e(14041)),s=e(70392),f={};let a=4.5,h=24,u=24,d="topRight",E,g;function l(T){const{duration:D,placement:I,bottom:O,top:M,getContainer:R,closeIcon:P}=T;D!==void 0&&(a=D),I!==void 0&&(d=I),O!==void 0&&(u=O),M!==void 0&&(h=M),R!==void 0&&(E=R),P!==void 0&&(g=P)}function y(T,D=h,I=u){let O;switch(T){case"topLeft":O={left:0,top:D,bottom:"auto"};break;case"topRight":O={right:0,top:D,bottom:"auto"};break;case"bottomLeft":O={left:0,top:"auto",bottom:I};break;default:O={right:0,top:"auto",bottom:I};break}return O}function b({prefixCls:T,placement:D=d,getContainer:I=E,top:O,bottom:M,closeIcon:R=g},P){const k=`${T}-${D}`;if(f[k]){P(f[k]);return}const F=_.default.createElement("span",{className:`${T}-close-x`},R||_.default.createElement(c.default,{className:`${T}-close-icon`}));m.default.newInstance({prefixCls:T,className:`${T}-${D}`,style:y(D,O,M),getContainer:I,closeIcon:F},L=>{f[k]=L,P(L)})}const S={success:r.default,info:v.default,error:o.default,warning:p.default};function A(T){const D=T.prefixCls||"kt-notification",I=`${D}-notice`,O=(0,s.isUndefined)(T.duration)?a:T.duration;let M=null;T.icon?M=_.default.createElement("span",{className:`${I}-icon`},T.icon):T.type&&(M=_.default.createElement(S[T.type]||null,{className:`${I}-icon ${I}-icon-${T.type}`}));const{placement:R,top:P,bottom:k,getContainer:F,closeIcon:L}=T;b({prefixCls:D,placement:R,top:P,bottom:k,getContainer:F,closeIcon:L},N=>{N.notice({content:_.default.createElement("div",{className:M?`${I}-with-icon`:""},M,_.default.createElement("div",{className:`${I}-message`},T.message),_.default.createElement("div",{className:`${I}-description`},T.description),T.btn?_.default.createElement("span",{className:`${I}-btn`},T.btn):null),duration:O,closable:!0,onClose:T.onClose,onClick:T.onClick,key:T.key,style:T.style||{},className:T.className})})}const w={open:A,close(T){Object.keys(f).forEach(D=>f[D].removeNotice(T))},config:l,destroy(){Object.keys(f).forEach(T=>{f[T].destroy(),delete f[T]})}};["success","info","warning","error"].forEach(T=>{w[T]=D=>w.open({...D,type:T})}),w.warn=w.warning,t.default=w},79024:(x,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)),c=e(53017);e(45531);const p=({maskClosable:v=!1,closable:m=!0,className:_,onClose:s,children:f,footer:a,title:h,getContainer:u,keyboard:d,...E})=>o.default.createElement(c.Modal,{footer:a||null,maskClosable:v,closable:m,onCancel:s,title:h,getContainer:u,className:(0,r.default)("kt-overlay",_),keyboard:d,...E},f);t.Overlay=p},91397:(x,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)),c=n.__importStar(e(14041));e(14856);const p=e(48412);var v;(function(s){s.hover="hover",s.click="click",s.focus="focus"})(v||(t.PopoverTriggerType=v={}));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 _=({children:s,trigger:f=v.hover,visible:a,content:h,position:u=m.top,showArrow:d=!0,title:E,titleClassName:g,overlay:l,overlayClassName:y,overlayStyle:b,action:S,delay:A=200,zIndex:w=1e3,onClickAction:T,onVisibleChange:D,getTooltipContainer:I,...O})=>{const M=(0,c.useCallback)(P=>{T&&T(P)},[T]),R=(0,c.useMemo)(()=>l||(!E&&!h?null:c.default.createElement(c.default.Fragment,null,E&&c.default.createElement("p",{className:(0,r.default)("kt-popover-title",g)},E,S&&c.default.createElement(p.Button,{size:"small",type:"link",onClick:M},S)),h||"")),[l,h,S,M]);return R?c.default.createElement(o.default,{...O,visible:a,placement:u,mouseEnterDelay:A?A/1e3:void 0,trigger:f,showArrow:d,onVisibleChange:D,overlayClassName:y,prefixCls:"kt-popover",overlayStyle:b,getTooltipContainer:I,overlay:R,zIndex:w},c.default.createElement("div",{className:"kt-popover-trigger"},s)):s};t.Popover=_},8573:(x,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)),c=n.__importDefault(e(19686)),p=e(58723),v=e(77011);t.RECYCLE_LIST_STABILIZATION_TIME=500,t.RECYCLE_LIST_OVER_SCAN_COUNT=50;const m=({width:_,height:s,maxHeight:f,minHeight:a,className:h,style:u,data:d,onReady:E,onScroll:g,itemHeight:l,header:y,footer:b,template:S,paddingBottomSize:A,getSize:w,hiddenVerticalScrollbar:T,hiddenHorizontalScrollbar:D})=>{const I=(0,o.useRef)(),O=(0,o.useRef)(),M=(0,o.useRef)({}),R=(0,o.useRef)(0),P=(0,o.useRef)();(0,o.useEffect)(()=>{typeof E=="function"&&E({scrollTo:K=>{var Z;(Z=I.current)===null||Z===void 0||Z.scrollTo(K)},scrollToIndex:(K,Z="start")=>{var Q,oe;let ne=K;if(y&&ne++,typeof l=="number")(Q=I.current)===null||Q===void 0||Q.scrollToItem(ne,Z);else{P.current&&clearTimeout(P.current);const _e=(M.current?Object.keys(M.current):[]).slice(0,ne).reduce((q,Re)=>q+F(Re),0);(oe=I.current)===null||oe===void 0||oe.scrollToItem(K,Z),P.current=setTimeout(()=>{var q;(M.current?Object.keys(M.current):[]).slice(0,ne).reduce((ie,fe)=>ie+F(fe),0)!==_e&&((q=I.current)===null||q===void 0||q.scrollToItem(K,Z)),P.current=null},t.RECYCLE_LIST_STABILIZATION_TIME)}}})},[]);const k=(H,K)=>{var Z;M.current[H]!==K&&(M.current={...M.current,[H]:K},I.current&&((Z=I.current)===null||Z===void 0||Z.resetAfterIndex(0)))},F=(0,o.useCallback)(H=>w?w(Number(H)):(M?.current||[])[H]||l||100,[l,w]),L=(0,o.useCallback)(()=>{if(f){let H=0;for(let K=0;K<d.length;K++)H+=F(K);return H>f?f:H}},[f,d]),N=(0,o.useCallback)(()=>{if(a)return a},[a,d]),j=(0,o.useMemo)(()=>{let H=d.length;return y&&H++,b&&H++,H},[d,b,y]),W=({index:H,style:K})=>{let Z;if(H===0&&y)return o.default.createElement("div",{style:K},o.default.createElement(y,null));if(H+1===j&&b)return o.default.createElement("div",{style:K},o.default.createElement(b,null));if(y?Z=d[H-1]:Z=d[H],!Z)return o.default.createElement("div",{style:K});const Q={"aria-setsize":j,"aria-posinset":H};return o.default.createElement("div",{tabIndex:0,style:K,role:"listitem",...Q},o.default.createElement(S,{data:Z,index:H}))},U=({index:H,style:K})=>{const Z=(0,o.useRef)(null),Q=(0,o.useRef)(),oe=()=>{if(Z.current){let he=0;for(let _e=0;_e<Z.current.children.length;_e++)he+=Z.current.children[_e].getBoundingClientRect().height;k(H,he)}};(0,o.useEffect)(()=>{if(Z.current&&I.current){Q.current=new MutationObserver(()=>{oe()});const he={childList:!0,attributes:!0,characterData:!0,attributeFilter:["class","style"],attributeOldValue:!0,characterDataOldValue:!0};Q.current.observe(Z.current,he),oe()}return()=>{Q.current.disconnect()}},[Z.current]);let ne;return H===0&&y?o.default.createElement("div",{style:K},o.default.createElement(y,null)):H+1===j&&b?o.default.createElement("div",{style:K},o.default.createElement(b,null)):(y?ne=d[H-1]:ne=d[H],ne?o.default.createElement("div",{style:K,ref:Z},o.default.createElement(S,{data:ne,index:H})):o.default.createElement("div",{style:K}))},X=(0,o.useMemo)(()=>d.reduce((K,Z)=>K+F(Z),0)/d.length,[d]),V=(0,o.useCallback)(H=>{R.current=H.scrollOffset,g&&g(H)},[g]),$=(0,o.useMemo)(()=>(0,o.forwardRef)((H,K)=>{const{style:Z,...Q}=H;return o.default.createElement("div",{ref:K,style:{...Z,height:`${parseFloat(Z.height)+(A||0)}px`},...Q})}),[A]),Y=(0,o.useMemo)(()=>(0,o.forwardRef)((H,K)=>o.default.createElement(v.Scrollbars,{hiddenVertical:T,hiddenHorizontal:D,...H,thumbSize:10,forwardedRef:K})),[T,D]);return(()=>{const H=typeof l!="number",K=!_||!s;return(()=>{const Q=({width:oe,height:ne})=>{O.current&&(O.current.scrollTop=R.current);const he=L(),_e=N();let q=ne;return _e?q=Math.min(ne,_e):he&&(q=he),H?o.default.createElement(p.VariableSizeList,{onScroll:V,width:oe,height:q,itemData:[],itemSize:F,itemCount:j,overscanCount:t.RECYCLE_LIST_OVER_SCAN_COUNT,ref:I,style:{transform:"translate3d(0px, 0px, 0px)",...u},className:(0,r.default)(h,"kt-recycle-list"),innerElementType:$,outerElementType:Y,estimatedItemSize:X},U):o.default.createElement(p.FixedSizeList,{onScroll:V,width:oe,height:q,itemData:[],itemSize:l,itemCount:j,overscanCount:t.RECYCLE_LIST_OVER_SCAN_COUNT,ref:I,outerRef:O,style:{transform:"translate3d(0px, 0px, 0px)",...u},className:(0,r.default)(h,"recycle-list"),innerElementType:$,outerElementType:Y},W)};return K?o.default.createElement(c.default,null,Q):Q({width:_,height:s})})()})()};t.RecycleList=m},34128:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),e(85608).__exportStar(e(8573),t)},57621:(x,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)),c=e(58723),p=e(70392),v=e(77011),m=e(48103),_=e(65601),s=e(43685),f=e(13429),a=e(34054);var h;(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"})(h||(t.RenderErrorType=h={}));const u=o.default.forwardRef((E,g)=>{const{style:l,...y}=E;return o.default.createElement("div",{ref:g,style:{...l,height:`${parseFloat(l.height)+d.PADDING_BOTTOM_SIZE}px`},...y})});class d extends o.default.Component{constructor(){super(...arguments),this.idxToRendererPropsCache=new Map,this.dynamicSizeMap=new Map,this.listRef=o.default.createRef(),this.disposables=new p.DisposableCollection,this.onErrorEmitter=new p.Emitter,this.onDidUpdateEmitter=new p.Emitter,this.onDidModelChangeEmitter=new p.Emitter,this.newPromptInsertionIndex=-1,this.idToFilterRendererPropsCache=new Map,this.filterFlattenBranchChildrenCache=new Map,this.filterWatcherDisposeCollection=new p.DisposableCollection,this.queueUpdatePromise=null,this.updateCancelToken=new p.CancellationTokenSource,this.expandNodeCancelToken=new p.CancellationTokenSource,this.willUpdateTasks=0,this.queueUpdateThrottler=new p.Throttler,this.doBatchUpdate=(()=>{const g=(l,y)=>{if(this.disposables.disposed)return;const{root:b}=this.props.model;let S=-1;if(this.promptTargetID>-1&&this.promptHandle instanceof _.NewPromptHandle&&this.promptHandle.parent&&this.promptHandle.parent.expanded&&b.isItemVisibleAtSurface(this.promptHandle.parent)&&!this.promptHandle.destroyed){const A=b.getIndexAtTreeNodeId(this.promptTargetID);if(A>-1||this.promptHandle.parent===b)if(this.promptHandle.type===a.TreeNodeType.TreeNode){const w=this.promptHandle.parent;w?S=this.getNewPromptInsertIndex(A,w):S=A+1}else S=A+1;else this.promptTargetID=-1}if(S===-1&&this.promptHandle&&this.promptHandle.constructor===_.NewPromptHandle&&!this.promptHandle.destroyed&&this.promptHandle.destroy(),this.newPromptInsertionIndex=S,this.idxToRendererPropsCache.clear(),y.isCancellationRequested){l();return}this.forceUpdate(()=>{l(),this.props.filter&&this.props.filterProvider&&this.props.filterProvider.filterAlways&&this.filterItems(this.props.filter)})};return()=>{const l=(S,A)=>{const w=!!this.willUpdateTasks;if(this.willUpdateTasks=0,!w)A.resolve();else{this.updateCancelToken.cancel(),this.updateCancelToken=new p.CancellationTokenSource;const T=this.updateCancelToken.token;requestAnimationFrame(()=>{if(T.isCancellationRequested){A();return}g(A,T)})}return S};let y;const b=new Promise(S=>y=S);return b.then(()=>{this.onDidUpdateEmitter.fire()}),l(b,y),b}})(),this.batchUpdate=()=>(this.willUpdateTasks++,this.queueUpdatePromise=this.queueUpdateThrottler.queue(this.doBatchUpdate),this.queueUpdatePromise),this.promptNewTreeNode=g=>this.promptNew(g),this.promptNewCompositeTreeNode=g=>this.promptNew(g,a.TreeNodeType.CompositeTreeNode),this.promptRename=async(g,l)=>{var y,b;const{root:S}=this.props.model,A=typeof g=="string"?await S.getTreeNodeByPath(g):g;if(!s.TreeNode.is(A)||s.CompositeTreeNode.isRoot(A))throw new TypeError(`Cannot rename object of type ${typeof A}`);const w=new m.RenamePromptHandle(l||A.name,A);return this.promptHandle=w,this.promptTargetID=A.id,S.isItemVisibleAtSurface(A)?await this.batchUpdate():await A.parent.setExpanded(!0),(b=(y=this.listRef)===null||y===void 0?void 0:y.current)===null||b===void 0||b.scrollToItem(S.getIndexAtTreeNodeId(this.promptTargetID)),this.promptHandle},this.expandNode=async g=>{const{root:l}=this.props.model,y=typeof g=="string"?l.getTreeNodeByPath(g):g;if(this.expandNodeCancelToken.token.isCancellationRequested&&(this.expandNodeCancelToken=new p.CancellationTokenSource),y&&s.CompositeTreeNode.is(y)&&!y.disposed)return y.setExpanded(!1,!1,!0,this.expandNodeCancelToken.token)},this.collapseNode=async g=>{const{root:l}=this.props.model,y=typeof g=="string"?l.getTreeNodeByPath(g):g;if(y&&s.CompositeTreeNode.is(y)&&!y.disposed)return this.expandNodeCancelToken.cancel(),y.setCollapsed()},this._isEnsuring=!1,this.ensureVisible=async(g,l="smart",y=!1)=>{if(this._isEnsuring)return;this._isEnsuring=!0;const{root:b}=this.props.model,S=typeof g=="string"?b.getTreeNodeByPath(g)||await b.loadTreeNodeByPath(g):g;if(S&&!b.isItemVisibleAtSurface(S)&&await b.loadTreeNodeByPath(S.path),!s.TreeNode.is(S)||s.CompositeTreeNode.isRoot(S)){this._isEnsuring=!1;return}return y?this.tryScrollIntoViewWhileStable(S,l):this.tryScrollIntoView(S,l),this._isEnsuring=!1,S},this.getItemAtIndex=g=>{const{filter:l}=this.props;if(l&&this.filterFlattenBranch.length>0)return this.idToFilterRendererPropsCache.get(this.filterFlattenBranch[g]);let y=this.idxToRendererPropsCache.get(g);if(!y){const b=this.newPromptInsertionIndex,{root:S}=this.props.model;if(b>-1&&this.promptHandle&&this.promptHandle.constructor===_.NewPromptHandle&&!this.promptHandle.destroyed)if(g===b)y={itemType:a.TreeNodeType.NewPrompt,item:this.promptHandle};else{const A=S.getTreeNodeAtIndex(g-(g>=b?1:0));y={itemType:s.CompositeTreeNode.is(A)?a.TreeNodeType.CompositeTreeNode:a.TreeNodeType.TreeNode,item:A}}else{const A=S.getTreeNodeAtIndex(g);A&&A.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(A)?a.TreeNodeType.CompositeTreeNode:a.TreeNodeType.TreeNode,item:A}}this.idxToRendererPropsCache.set(g,y)}return y},this.handleListScroll=({scrollOffset:g})=>{const{model:l,height:y,itemHeight:b}=this.props;if(l.state.saveScrollOffset(g),!this.promptHandle||!b)return;let S;this.promptHandle instanceof _.NewPromptHandle&&this.newPromptInsertionIndex>-1?S=this.newPromptInsertionIndex:S=l.root.getIndexAtTreeNodeId(this.promptHandle.id),(g+y<S*b||S*b<g)&&this.promptHandle.destroy()},this.getItemKey=g=>{const l=this.getItemAtIndex(g),{getItemKey:y}=this.props,b=y?y(l):void 0;return b??g},this.filterItems=g=>{const{model:{root:l},filterProvider:y}=this.props;if(this.filterWatcherDisposeCollection.dispose(),this.idToFilterRendererPropsCache.clear(),!g)return;const b=/\//.test(g),S=new Set,A=new Map,w=[];for(let T=0,D=l.branchSize;T<D;T++){const I=l.getTreeNodeAtIndex(T);w.push(I)}if(b)w.forEach(T=>{if(T&&T.path.indexOf(g)>-1){S.add(T.id);let D=T.parent;for(;D&&!s.CompositeTreeNode.isRoot(D);)S.add(D.id),D=D.parent}});else{let T=[];y?T=r.default.filter(g,w,y.fuzzyOptions()):T=r.default.filter(g,w,d.FILTER_FUZZY_OPTIONS);const D=I=>{const O=I.children||[];if(O.length>0)for(const M of O)S.add(M.id),s.CompositeTreeNode.is(M)&&M.expanded&&D(M)};T.forEach(I=>{const O=I.original;S.add(O.id);let M=O.parent;for(A.set(O.id,()=>o.default.createElement("div",{style:{flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},dangerouslySetInnerHTML:{__html:I.string||""}})),s.CompositeTreeNode.is(O)&&D(O);M&&!s.CompositeTreeNode.isRoot(M);)S.add(M.id),M=M.parent})}this.filterFlattenBranch=new Array(S.size);for(let T=0,D=0,I=l.branchSize;D<I;D++){const O=l.getTreeNodeAtIndex(D);O&&S.has(O.id)&&(this.filterFlattenBranch[T]=O.id,s.CompositeTreeNode.is(O)?this.idToFilterRendererPropsCache.set(O.id,{item:O,itemType:a.TreeNodeType.CompositeTreeNode,template:A.has(O.id)?A.get(O.id):void 0}):this.idToFilterRendererPropsCache.set(O.id,{item:O,itemType:a.TreeNodeType.TreeNode,template:A.has(O.id)?A.get(O.id):void 0}),T++)}this.filterWatcherDisposeCollection.push(l.watcher.on(a.TreeNodeEvent.DidChangeExpansionState,(T,D)=>{const I=this.filterFlattenBranch.indexOf(T.id);if(D){const O=this.filterFlattenBranchChildrenCache.get(T.id);O&&O.length>0&&(this.filterFlattenBranch=(0,s.spliceArray)(this.filterFlattenBranch,I+1,0,O),this.filterFlattenBranchChildrenCache.delete(T.id))}else{const O=[];for(let M=I+1;M<this.filterFlattenBranch.length;M++){const R=l.getTreeNodeById(this.filterFlattenBranch[M]);if(R&&R.depth>T.depth)O.push(R.id);else break}this.filterFlattenBranchChildrenCache.set(T.id,O),this.filterFlattenBranch=(0,s.spliceArray)(this.filterFlattenBranch,I+1,O.length)}})),this.filterWatcherDisposeCollection.push(p.Disposable.create(()=>{this.filterFlattenBranchChildrenCache.clear()}))},this.renderItem=({index:g,style:l})=>{var y,b,S,A,w,T,D;const{children:I,overflow:O="ellipsis",supportDynamicHeights:M}=this.props,R=this.getItemAtIndex(g),P=(0,o.useRef)(null),k=(0,o.useMemo)(()=>M?()=>{let U=0;if(P.current){const X=P.current;U=Array.from(X.children).reduce((V,$)=>V+$.getBoundingClientRect().height,0)}return U&&(this.dynamicSizeMap.set(g,U),this.layoutItem()),Math.max(U,d.DEFAULT_ITEM_HEIGHT)}:()=>{},[M]);if((0,o.useEffect)(()=>{P.current&&k()},[]),!R)return o.default.createElement(o.default.Fragment,null);const{item:F,itemType:L,template:N}=R;if(!F)return o.default.createElement("div",{style:l});let j;s.CompositeTreeNode.is(F)?j={"aria-label":(y=F.accessibilityInformation)===null||y===void 0?void 0:y.label,"aria-expanded":F.expanded,"aria-level":F.depth,"aria-setsize":(S=(b=F.parent)===null||b===void 0?void 0:b.children)===null||S===void 0?void 0:S.length,"aria-posinset":g}:s.TreeNode.is(F)&&(j={"aria-label":(A=F.accessibilityInformation)===null||A===void 0?void 0:A.label,"aria-level":F.depth,"aria-setsize":(T=(w=F.parent)===null||w===void 0?void 0:w.children)===null||T===void 0?void 0:T.length,"aria-posinset":g});const W=O==="ellipsis"?l:{...l,width:"auto",minWidth:"100%"};return o.default.createElement("div",{ref:P,style:W,role:((D=F.accessibilityInformation)===null||D===void 0?void 0:D.role)||"treeiem",...j},o.default.createElement(f.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},I))},this.layoutItem=()=>{var g,l,y,b;if(this.props.supportDynamicHeights&&this.listRef&&!((g=this.listRef)===null||g===void 0)&&g.current&&"_getRangeToRender"in((l=this.listRef)===null||l===void 0?void 0:l.current)){const S=(y=this.listRef)===null||y===void 0?void 0:y.current._getRangeToRender();if(S){const A=S[0];((b=this.listRef)===null||b===void 0?void 0:b.current).resetAfterIndex(A)}}}}getNewPromptInsertIndex(g,l){const{root:y}=this.props.model;let b=g+1;for(;b-g<=l.branchSize;b++){const S=y.getTreeNodeAtIndex(b);if(!S)return b;if(!s.CompositeTreeNode.is(S)){if(S?.depth>l.depth+1)continue;return b}}return b}UNSAFE_componentWillUpdate(g){this.props.filter!==g.filter&&this.filterItems(g.filter),this.props.model!==g.model&&(this.idxToRendererPropsCache.clear(),this.idToFilterRendererPropsCache.clear(),this.dynamicSizeMap.clear())}componentDidUpdate(g){var l,y;if(this.props.model!==g.model){this.disposables.dispose();const{model:b}=this.props;(y=(l=this.listRef)===null||l===void 0?void 0:l.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 S,A;(A=(S=this.listRef)===null||S===void 0?void 0:S.current)===null||A===void 0||A.scrollTo(b.state.scrollOffset)})),this.onDidModelChangeEmitter.fire({preModel:g.model,nextModel:b})}}async promptNew(g,l=a.TreeNodeType.TreeNode){var y,b;const{root:S}=this.props.model;let A=typeof g=="string"?await S.getTreeNodeByPath(g):g;if(l!==a.TreeNodeType.TreeNode&&l!==a.TreeNodeType.CompositeTreeNode)throw new TypeError(`Invalid type supplied. Expected 'TreeNodeType.TreeNode' or 'TreeNodeType.CompositeTreeNode', got ${l}`);if(A&&!s.CompositeTreeNode.is(A)&&(A=A.parent,!s.CompositeTreeNode.is(A)))throw new TypeError(`Cannot create new prompt at object of type ${typeof A}`);if(!A)throw new Error(`Cannot find node at ${g}`);const w=new _.NewPromptHandle(l,A);return this.promptHandle=w,this.promptTargetID=A.id,A!==S&&(!A.expanded||!S.isItemVisibleAtSurface(A))?await A.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(g,l="auto"){var y,b,S,A;const{root:w}=this.props.model;g.constructor===_.NewPromptHandle&&!g.destroyed?(b=(y=this.listRef)===null||y===void 0?void 0:y.current)===null||b===void 0||b.scrollToItem(this.newPromptInsertionIndex):w.isItemVisibleAtSurface(g)&&((A=(S=this.listRef)===null||S===void 0?void 0:S.current)===null||A===void 0||A.scrollToItem(w.getIndexAtTreeNode(g),l))}tryScrollIntoViewWhileStable(g,l="smart"){const{root:y}=this.props.model;if(this.tryEnsureVisibleTimes>d.TRY_ENSURE_VISIBLE_MAX_TIMES){this.tryEnsureVisibleTimes=0;return}p.Event.once(this.props.model.onChange)(async()=>{var b,S,A,w;await this.queueUpdatePromise,g.constructor===_.NewPromptHandle&&!g.destroyed?(S=(b=this.listRef)===null||b===void 0?void 0:b.current)===null||S===void 0||S.scrollToItem(this.newPromptInsertionIndex):y.isItemVisibleAtSurface(g)?((w=(A=this.listRef)===null||A===void 0?void 0:A.current)===null||w===void 0||w.scrollToItem(y.getIndexAtTreeNode(g),l),this.tryEnsureVisibleTimes=0):(this.tryEnsureVisibleTimes++,this.tryScrollIntoViewWhileStable(g,l))})}componentDidMount(){var g,l;const{model:y,onReady:b}=this.props;if((l=(g=this.listRef)===null||g===void 0?void 0:g.current)===null||l===void 0||l.scrollTo(y.state.scrollOffset),this.disposables.push(y.onChange(this.batchUpdate.bind(this))),this.disposables.push(y.state.onDidLoadState(()=>{var S,A;(A=(S=this.listRef)===null||S===void 0?void 0:S.current)===null||A===void 0||A.scrollTo(y.state.scrollOffset)})),typeof b=="function"){const S={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:p.Event.once(this.onDidUpdateEmitter.event),onError:this.onErrorEmitter.event};b(S)}}componentWillUnmount(){this.disposables.dispose()}set promptHandle(g){this._promptHandle!==g&&(this._promptHandle instanceof m.PromptHandle&&!this._promptHandle.destroyed&&this._promptHandle.destroy(),g.onDestroy(this.batchUpdate),this._promptHandle=g)}get promptHandle(){return this._promptHandle}get adjustedRowCount(){const{root:g}=this.props.model,{filter:l}=this.props;return l?this.filterFlattenBranch.length:this.newPromptInsertionIndex>-1&&this.promptHandle&&this.promptHandle.constructor===_.NewPromptHandle&&!this.promptHandle.destroyed?g.branchSize+1:g.branchSize}getItemSize(g){return this.dynamicSizeMap.get(g)||this.props.itemHeight}render(){const{children:g,itemHeight:l,width:y="100%",height:b,style:S,className:A,placeholder:w,overScanCount:T,leaveBottomBlank:D,supportDynamicHeights:I}=this.props;if(w&&this.adjustedRowCount===0){const M=w;return o.default.createElement(M,null)}const O={children:g,height:b,width:y,itemData:[],itemCount:this.adjustedRowCount,itemKey:this.getItemKey,overscanCount:T||d.DEFAULT_OVER_SCAN_COUNT,onScroll:this.handleListScroll,style:{transform:"translate3d(0px, 0px, 0px)",...S},className:A,outerElementType:v.ScrollbarsVirtualList};return D&&(O.innerElementType=u),I?o.default.createElement(c.VariableSizeList,{ref:this.listRef,itemSize:this.getItemSize.bind(this),...O},this.renderItem):o.default.createElement(c.FixedSizeList,{ref:this.listRef,itemSize:l,...O},this.renderItem)}}t.RecycleTree=d,d.PADDING_BOTTOM_SIZE=22,d.DEFAULT_ITEM_HEIGHT=22,d.TRY_ENSURE_VISIBLE_MAX_TIMES=5,d.FILTER_FUZZY_OPTIONS={pre:"<match>",post:"</match>",extract:E=>E?.name||""},d.DEFAULT_OVER_SCAN_COUNT=50},13429:(x,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:p,itemType:v,children:m,template:_,hasPrompt:s}=this.props;return r.default.createElement(m,{item:p,itemType:v,template:_,hasPrompt:s,key:p.id})}shouldComponentUpdate(p){return!0}}t.NodeRendererWrap=o},75821:(x,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)),c=e(58998),p=e(57621),v=e(64013),m=e(84225),_=e(17462),s=e(78569),f=e(45203);e(12794),e(34728),n.__exportStar(e(92532),t);const a=({width:h,height:u,itemHeight:d=22,itemClassname:E,indent:g,baseIndent:l,containerClassname:y,onClick:b,onContextMenu:S,onTwistierClick:A,onIconClick:w,onDbClick:T,resolveChildren:D,sortComparator:I,treeData:O,inlineMenus:M,inlineMenuActuator:R,onReady:P,contextMenus:k,contextMenuActuator:F,treeName:L,leaveBottomBlank:N=!0})=>{const[j,W]=(0,r.useState)({show:!1}),[U,X]=(0,r.useState)([]),[V,$]=(0,r.useState)(),Y=(0,r.useRef)(!1),G=(0,r.useRef)(),H=(0,r.useRef)(),K=(0,r.useRef)(null),Z=(0,r.useCallback)(Se=>{var Ee;return r.default.createElement(_.BasicTreeNodeRenderer,{item:Se.item,itemType:Se.itemType,itemHeight:d,indent:g,baseIndent:l,className:E,inlineMenus:M,inlineMenuActuator:R,onClick:he,onDbClick:q,onContextMenu:Re,onTwistierClick:ie,onIconClick:_e,decorations:(Ee=G.current)===null||Ee===void 0?void 0:Ee.decorations.getDecorations(Se.item)})},[V]);(0,r.useEffect)(()=>{var Se,Ee;G.current=new f.BasicTreeService(O,D,I,{treeName:L});const ge=(Se=G.current)===null||Se===void 0?void 0:Se.onDidUpdateTreeModel(Te=>{Q(Te)}),xe=()=>{var Te;(Te=G.current)===null||Te===void 0||Te.enactiveFocusedDecoration()};return(Ee=K.current)===null||Ee===void 0||Ee.addEventListener("blur",xe,!0),()=>{var Te,Fe;Y.current=!0,(Te=K.current)===null||Te===void 0||Te.removeEventListener("blur",xe,!0),ge.dispose(),(Fe=G.current)===null||Fe===void 0||Fe.dispose()}},[]),(0,r.useEffect)(()=>{var Se;(Se=G.current)===null||Se===void 0||Se.updateTreeData(O)},[O]);const Q=async Se=>{Se&&await Se.ensureReady,Y.current||$(Se)},oe=async Se=>{var Ee;(Ee=G.current)===null||Ee===void 0||Ee.activeFocusedDecoration(Se),s.BasicCompositeTreeNode.is(Se)&&ve(Se)},ne=(0,r.useCallback)(Se=>{P&&P({...Se,selectItem:oe,focusItem:async Ee=>{var ge;const xe=`/${L}/${Ee}`;await V?.ensureReady;const Te=await Se.ensureVisible(xe,"auto",!0);Te&&((ge=G.current)===null||ge===void 0||ge.activeFocusedDecoration(Te))}}),H.current=Se},[G.current]),he=(0,r.useCallback)((Se,Ee)=>{oe(Ee),b&&b(Se,Ee)},[b]),_e=(0,r.useCallback)((Se,Ee)=>{w&&w(Se,Ee)},[w]),q=(0,r.useCallback)((Se,Ee)=>{T&&T(Se,Ee)},[T]),Re=(0,r.useCallback)((Se,Ee)=>{var ge,xe;if(Ee?(ge=G.current)===null||ge===void 0||ge.activeContextMenuDecoration(Ee):(xe=G.current)===null||xe===void 0||xe.enactiveFocusedDecoration(),S)S(Se,Ee);else{let Te=[];Array.isArray(k)?Te=k:typeof k=="function"&&(Te=k(Ee));const Fe=new Set,pe={};for(const Ue of Te)Fe.add(Ue.group||"-1"),pe[Ue.group||"-1"]||(pe[Ue.group||"-1"]=[]),pe[Ue.group||"-1"].push(Ue);const re=Array.from(Fe).sort((Ue,$e)=>Ue.localeCompare($e,"kn",{numeric:!0}));let ue=[];for(const Ue of re)ue=ue.concat(pe[Ue].map($e=>({id:$e.id,label:$e.title,group:$e.group}))),ue=ue.concat([{id:`${Ue}_divider`,label:"",type:"divider"}]);ue.pop(),JSON.stringify(ue)!==JSON.stringify(U)&&X(ue);const{x:Oe,y:Ae}=Se.nativeEvent;W({show:!0,point:{pageX:Oe,pageY:Ae},activeNode:Ee})}},[T]),ve=(0,r.useCallback)(Se=>{var Ee,ge;Se.expanded?(Ee=H.current)===null||Ee===void 0||Ee.collapseNode(Se):(ge=H.current)===null||ge===void 0||ge.expandNode(Se)},[]),ie=(0,r.useCallback)((Se,Ee)=>{s.BasicCompositeTreeNode.is(Ee)&&ve(Ee),A&&A(Se,Ee)},[A]),fe=(0,r.useCallback)(()=>{var Se;(Se=G.current)===null||Se===void 0||Se.enactiveFocusedDecoration()},[]),Me=(0,r.useCallback)((Se,Ee)=>{S&&S(Se,Ee)},[]),Le=(0,r.useCallback)(()=>{W({...j,show:!1})},[j]),Ce=(0,r.useCallback)(()=>k?r.default.createElement(o.default,{popupPlacement:"bottomLeft",popupVisible:j.show,action:["contextMenu"],popupAlign:{overflow:{adjustX:1,adjustY:1},offset:[window.scrollX,window.scrollY]},point:j.point||{},builtinPlacements:m.placements,popup:r.default.createElement(c.ClickOutside,{className:"basic_tree_menubars",mouseEvents:["click","contextmenu"],onOutsideClick:Le},U.map(({id:Se,label:Ee,type:ge})=>r.default.createElement(v.BasicMenuItem,{key:Se,id:Se,label:Ee,type:ge,focusMode:j.show,onClick:xe=>{F&&F(j.activeNode,xe),W({show:!1})}}))),alignPoint:!0}):null,[U,F,j]);return r.default.createElement("div",{className:"basic_tree",tabIndex:-1,ref:K,onClick:fe,onContextMenu:Me},Ce(),V?r.default.createElement(p.RecycleTree,{height:u,width:h,itemHeight:d,model:V,onReady:ne,className:y,leaveBottomBlank:N},Z):null)};t.BasicRecycleTree=a},64013:(x,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)),c=({id:p,label:v,type:m,focusMode:_,onClick:s})=>{const[f,a]=o.default.useState(!1),h=o.default.useCallback(()=>{a(_?!0:d=>!d),s(p)},[p]),u=o.default.useCallback(()=>{},[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":f}),onMouseOver:u,onClick:h},v)};t.BasicMenuItem=c},84225:(x,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:(x,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(v,m,_,s={}){super(v,m,void 0,{treeName:s.treeName}),this._raw=_}get name(){var v;return(v=this.getMetadata("treeName"))!==null&&v!==void 0?v:`BasicTreeRoot_${this.id}`}get raw(){return this._raw}get expanded(){return!0}}t.BasicTreeRoot=r;class o extends n.CompositeTreeNode{constructor(v,m,_,s){super(v,m,void 0,{name:_.label}),this.isExpanded=_.expanded||!1,this.id=s||this.id,this._displayName=_.label,this._raw=_}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 c extends n.TreeNode{constructor(v,m,_,s){super(v,m,void 0,{name:_.label}),this.id=s||this.id,this._displayName=_.label,this._raw=_}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=c},17462:(x,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)),c=e(48412),p=e(54713),v=e(3660),m=e(78569),_=e(92532);e(12794);const s=({item:f,className:a,itemHeight:h=22,indent:u=8,baseIndent:d=8,onClick:E,onDbClick:g,onTwistierClick:l,onIconClick:y,onContextMenu:b,decorations:S,inlineMenus:A=[],inlineMenuActuator:w=()=>{}})=>{const T=(0,o.useCallback)(Y=>{E&&(Y.stopPropagation(),E(Y,f))},[E]),D=(0,o.useCallback)(Y=>{g&&(Y.stopPropagation(),g(Y,f))},[g]),I=(0,o.useCallback)(Y=>{b&&(Y.stopPropagation(),Y.preventDefault(),b(Y,f))},[b]),O=(0,o.useCallback)(Y=>{Y.stopPropagation(),l?l(Y,f):E&&E(Y,f)},[E,l]),M=(0,o.useCallback)(Y=>{Y.stopPropagation(),y?y(Y,f):E&&E(Y,f)},[E,y]);let P=(f.depth>0?f.depth-1:0)*u;d&&(P+=d),f.indentOffset&&(P+=f.indentOffset);const k={height:h,lineHeight:`${h}px`,paddingLeft:`${P}px`},F=(0,o.useCallback)(Y=>o.default.createElement(p.Icon,{onClick:M,icon:Y.icon,className:(0,r.default)("icon",Y.iconClassName)}),[]),L=(0,o.useCallback)(Y=>Y.displayName.replace(/\n/g,"\u21B5"),[]),N=(0,o.useCallback)(Y=>Y.displayName&&o.default.createElement("div",{className:(0,r.default)("segment","display_name")},L(Y)),[]),j=(0,o.useCallback)(Y=>Y.renderLabel,[]),W=(0,o.useCallback)(Y=>Y.description?typeof Y.description=="string"?o.default.createElement("div",{className:(0,r.default)("segment_grow","description")},Y.description):Y.description:null,[]),U=(0,o.useCallback)(Y=>{if(Array.isArray(A))return A;if(typeof A=="function")return A(Y)},[A]),X=()=>{var Y;const G=m.BasicCompositeTreeNode.is(f),H=(Y=U(f))===null||Y===void 0?void 0:Y.filter(Z=>G?Z.position===_.IBasicInlineMenuPosition.TREE_CONTAINER:Z.position===_.IBasicInlineMenuPosition.TREE_NODE);if(!H?.length)return null;const K=(0,o.useCallback)((Z,Q)=>{Z.stopPropagation(),w(f,Q)},[]);return o.default.createElement("div",{className:(0,r.default)("segment","tail")},H.map(Z=>o.default.createElement(c.Button,{style:{marginRight:"5px"},type:"icon",key:`${f.id}-${Z.icon}`,icon:Z.icon,title:Z.title,onClick:Q=>K(Q,Z)})))},V=(Y,G)=>S&&S?.classlist.indexOf(_.DECORATIONS.LOADING)>-1?o.default.createElement(v.Loading,null):o.default.createElement(p.Icon,{className:(0,r.default)("segment","expansion_toggle",Y.twisterClassName,{mod_collapsed:!Y.expanded}),onClick:G,icon:"arrow-right"}),$=Y=>{if(!Y.expandable)return o.default.createElement("div",{className:(0,r.default)("segment","expansion_toggle",Y.twisterPlaceholderClassName)});if(m.BasicCompositeTreeNode.is(Y))return V(Y,O)};return o.default.createElement("div",{key:f.id,onClick:T,onDoubleClick:D,onContextMenu:I,className:(0,r.default)("tree_node",a,S?S.classlist:null,f.className),style:k,"data-id":f.id},o.default.createElement("div",{className:"content"},$(f),F(f),o.default.createElement("div",{className:"overflow_wrap"},j(f)||N(f),W(f)),X()))};t.BasicTreeNodeRenderer=s},45203:(x,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),c=e(78569),p=e(92532);class v extends r.Tree{constructor(s,f,a,h={}){super(),this._treeData=s,this._resolveChildren=f,this._sortComparator=a,this.treeOptions=h,this.selectedDecoration=new r.Decoration(p.DECORATIONS.SELECTED),this.focusedDecoration=new r.Decoration(p.DECORATIONS.FOCUSED),this.contextMenuDecoration=new r.Decoration(p.DECORATIONS.ACTIVED),this.loadingDecoration=new r.Decoration(p.DECORATIONS.LOADING),this._selectedNodes=[],this.disposableCollection=new n.DisposableCollection,this.decorationDisposableCollection=new n.DisposableCollection,this.onDidUpdateTreeModelEmitter=new n.Emitter,this.sortComparator=(u,d)=>{if(this._sortComparator){const E=this._sortComparator(u.raw,d.raw);if(typeof E<"u")return E}return super.sortComparator(u,d)},this.activeFocusedDecoration=u=>{var d;this._contextMenuNode&&(this.clearDecoration(this.contextMenuDecoration),this.clearDecoration(this.focusedDecoration),this.clearDecoration(this.selectedDecoration),this._contextMenuNode=void 0),u&&(this.selectedNodes.length>0&&this.clearDecoration(this.selectedDecoration),this.focusedNode&&(this.clearDecoration(this.focusedDecoration),this._focusedNode=void 0),this.selectedDecoration.addTarget(u),this.focusedDecoration.addTarget(u),this._focusedNode=u,this._selectedNodes=[u],(d=this.model)===null||d===void 0||d.dispatchChange())},this.activeContextMenuDecoration=u=>{var d;this._contextMenuNode&&(this.clearDecoration(this.contextMenuDecoration),this._contextMenuNode=void 0),this.focusedNode&&(this.clearDecoration(this.focusedDecoration),this._focusedNode=void 0),this.contextMenuDecoration.addTarget(u),this._contextMenuNode=u,(d=this.model)===null||d===void 0||d.dispatchChange()},this.enactiveFocusedDecoration=()=>{var u;this.focusedNode&&(this.clearDecoration(this.focusedDecoration),this._focusedNode=void 0,(u=this.model)===null||u===void 0||u.dispatchChange())},this.disposableCollection.push(this.onDidUpdateTreeModelEmitter)}setUpTreeModel(){this._root=new c.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,f=>{this.loadingDecoration.addTarget(f)})),this.decorationDisposableCollection.push(s.watcher.on(o.TreeNodeEvent.DidResolveChildren,f=>{this.loadingDecoration.removeTarget(f)})),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,f){if(!f)return[];const a=[];for(const h of f)h.children?a.push(new c.BasicCompositeTreeNode(this,s,h)):a.push(new c.BasicTreeNode(this,s,h));return a}get selectedNodes(){return this._selectedNodes}get focusedNode(){return this._focusedNode}get contextMenuNode(){return this._contextMenuNode}clearDecoration(s){for(const f of s.appliedTargets.keys())s.removeTarget(f)}dispose(){super.dispose(),this.disposableCollection.dispose(),this.decorationDisposableCollection.dispose()}}t.BasicTreeService=v;class m extends r.TreeModel{}t.BasicTreeModel=m},92532:(x,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:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RecycleTreeAdaptiveDecorator=void 0;const r=e(85608).__importDefault(e(14041)),o=e(34054),c=p=>v=>{const{model:m,itemHeight:_,onReady:s}=v,f=r.default.useRef(),a=r.default.useRef(!1),[h,u]=r.default.useState(0),d=()=>{u(m.root.branchSize*_)},E=g=>{s&&s({...g,promptNewTreeNode:async l=>{var y;const b=await g.promptNewTreeNode(l);return!((y=f.current)===null||y===void 0)&&y.root.branchSize?u(f.current.root.branchSize*_+_):u(_),a.current=!1,b.onDestroy(()=>{var S;!((S=f.current)===null||S===void 0)&&S.root.branchSize&&u(f.current.root.branchSize*_)}),b.onCancel(()=>{f.current&&u(f.current.root.branchSize*_)}),b.onBlur(()=>a.current),b},promptNewCompositeTreeNode:async l=>{var y;const b=await g.promptNewCompositeTreeNode(l);return!((y=f.current)===null||y===void 0)&&y.root.branchSize?u(f.current.root.branchSize*_+_):u(_),b.onDestroy(()=>{var S;!((S=f.current)===null||S===void 0)&&S.root.branchSize&&u(f.current.root.branchSize*_)}),b.onCancel(()=>{var S;!((S=f.current)===null||S===void 0)&&S.root.branchSize&&u(f.current.root.branchSize*_)}),b.onBlur(()=>a.current),b}})};return r.default.useEffect(()=>{f.current=m,f.current.root&&(u(f.current.root.branchSize*_),f.current.root.watcher.on(o.TreeNodeEvent.DidChangeExpansionState,d))},[m]),r.default.useEffect(()=>{setTimeout(()=>{a.current=!0},100)},[h]),r.default.createElement(r.default.Fragment,null,r.default.createElement(p,{...v,height:h,onReady:E}))};t.RecycleTreeAdaptiveDecorator=c},326:(x,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)),c=e(54713),p=e(50708),v=e(4981);e(69715);const m=30,_=500,s=a=>{const{localize:h}=o.default.useContext(v.LocalizeContext);return o.default.createElement("div",{className:"kt-recycle-tree-filter-wrapper"},o.default.createElement(p.Input,{hasClear:!0,autoFocus:!0,className:"kt-recycle-tree-filter-input",size:"small",...a,placeholder:a.placeholder||h("tree.filter.placeholder"),addonBefore:o.default.createElement(c.Icon,{className:"kt-recycle-tree-filter-icon",icon:"retrieval"})}))},f=a=>h=>{const[u,d]=o.default.useState(""),[E,g]=o.default.useState(""),{beforeFilterValueChange:l,filterEnabled:y,height:b,filterPlaceholder:S,filterAfterClear:A,onReady:w,onFilterBlur:T,filterAutoFocus:D,...I}=h,O=(0,r.default)(async P=>{l&&await l(P),g(P)},_),M=(0,o.useCallback)(P=>{d(P),O(P)},[u]),R=(0,o.useCallback)(P=>{w&&w({...P,clearFilter:()=>{g(""),d("")}})},[w]);return o.default.createElement(o.default.Fragment,null,y&&o.default.createElement(s,{afterClear:A,placeholder:S,value:u,autoFocus:D,onBlur:T,onValueChange:M}),o.default.createElement(a,{...I,height:b-(y?m:0),onReady:R,filter:E}))};t.RecycleTreeFilterDecorator=f},72731:(x,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:(x,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:(x,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(p,v){super(),this.type=p,this.parent=v,this._id=n.TreeNode.nextId()}get id(){return this._id}get depth(){return this.parent.depth+1}}t.NewPromptHandle=o},65747:(x,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),c=_=>new Promise(s=>setTimeout(s,_));var p;(function(_){_[_.INFO=1]="INFO",_[_.ERROR=2]="ERROR",_[_.WARNING=3]="WARNING"})(p||(t.PROMPT_VALIDATE_TYPE=p={}));var v;(function(_){_.INFO="validate-info",_.ERROR="validate-error",_.WARNING="validate-warning"})(v||(t.VALIDATE_CLASS_NAME=v={}));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 c(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,f){this.$.setSelectionRange(s,f)}addClassName(s){this.$.classList.add(s)}removeClassName(s){this.$.classList.remove(s)}addAddonAfter(s){var f,a;!this._hasAddonAfter&&!this._destroyed&&((a=(f=this.$.parentElement)===null||f===void 0?void 0:f.parentElement)===null||a===void 0||a.appendChild(this.$addonAfter),this._hasAddonAfter=!0);const h=document.createElement("div");h.setAttribute("class",s),this.$addonAfter.appendChild(h)}removeAddonAfter(){var s,f,a;this._hasAddonAfter&&((s=this.$addonAfter.firstChild)===null||s===void 0||s.remove(),(a=(f=this.$.parentElement)===null||f===void 0?void 0:f.parentElement)===null||a===void 0||a.removeChild(this.$addonAfter),this._hasAddonAfter=!1)}addValidateMessage(s){var f,a,h,u,d,E,g;!this._hasValidateElement&&!this._destroyed&&((h=(a=(f=this.$.parentElement)===null||f===void 0?void 0:f.parentElement)===null||a===void 0?void 0:a.parentElement)===null||h===void 0||h.appendChild(this.$validate),this._hasValidateElement=!0);let l="validate-message popup ";s&&s.type===p.ERROR?this._validateClassName=v.ERROR:s&&s.type===p.WARNING?this._validateClassName=v.WARNING:this._validateClassName=v.INFO,l+=this._validateClassName,this.$validate.classList.value=l,this.$validate.innerHTML=(0,o.toMarkdownHtml)(s.message||"",{renderer:this.markdownRenderer}),(d=(u=this.$.parentElement)===null||u===void 0?void 0:u.parentElement)===null||d===void 0||d.classList.remove(v.INFO,v.ERROR,v.WARNING),(g=(E=this.$.parentElement)===null||E===void 0?void 0:E.parentElement)===null||g===void 0||g.classList.add(this._validateClassName)}removeValidateMessage(){var s,f,a,h,u;this._hasValidateElement&&((a=(f=(s=this.$.parentElement)===null||s===void 0?void 0:s.parentElement)===null||f===void 0?void 0:f.parentElement)===null||a===void 0||a.removeChild(this.$validate),this._hasValidateElement=!1,(u=(h=this.$.parentElement)===null||h===void 0?void 0:h.parentElement)===null||u===void 0||u.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:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RenamePromptHandle=void 0;const n=e(65747);class r extends n.PromptHandle{constructor(c,p){super(),this.originalFileName=c,this.target=p,this.$.value=c,this.setSelectionRange(0,c.lastIndexOf("."))}get id(){return this.target.id}get depth(){return this.target.depth}}t.RenamePromptHandle=r},48103:(x,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:(x,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 p;this.toDispose.dispose(),(p=this._root)===null||p===void 0||p.dispose()}get root(){return this._root}set root(p){var v;p!==this._root&&((v=this._root)===null||v===void 0||v.dispose(),this._root=p)}fireChanged(){this.onChangedEmitter.fire(void 0)}sortComparator(p,v){return p.constructor===v.constructor?p.name>v.name?1:p.name<v.name?-1:0:r.CompositeTreeNode.is(p)?-1:r.CompositeTreeNode.is(v)?1:0}}t.Tree=o},26353:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CompositeTreeNode=t.TreeNode=t.BranchOperatorStatus=void 0,t.spliceArray=c;const n=e(70392),r=e(34054),{Path:o}=n.path;function c(_,s,f=0,a){if(f===0&&(!a||a.length===0))return _;const h=_.slice(0,s),u=_.slice(s+f);return h.concat(a||[]).concat(u)}var p;(function(_){_[_.EXPANDED=1]="EXPANDED",_[_.SHRINKED=2]="SHRINKED"})(p||(t.BranchOperatorStatus=p={}));class v{static is(s){return!!s&&"depth"in s&&"name"in s&&"path"in s&&"id"in s}static getTreeNodeById(s){return v.idToTreeNode.get(s)}static getTreeNodeByPath(s){return v.pathToTreeNode.get(s)}static setTreeNode(s,f,a){v.idToTreeNode.set(s,a),v.pathToTreeNode.set(f,a)}static removeTreeNode(s,f){v.idToTreeNode.delete(s),v.pathToTreeNode.delete(f)}static getIdByPath(s){return v.pathToId.get(s)}static setIdByPath(s,f){return v.pathToId.set(s,f)}static getGlobalTreeState(s){let f=v.pathToGlobalTreeState.get(s);return f||(f={isExpanding:!1,isLoadingPath:!1,isRefreshing:!1,refreshCancelToken:new n.CancellationTokenSource,loadPathCancelToken:new n.CancellationTokenSource}),f}static setGlobalTreeState(s,f){let a=v.pathToGlobalTreeState.get(s);return a||(a={isExpanding:!1,isLoadingPath:!1,isRefreshing:!1,refreshCancelToken:new n.CancellationTokenSource,loadPathCancelToken:new n.CancellationTokenSource}),a={...a,...f},v.pathToGlobalTreeState.set(s,a),a}constructor(s,f,a,h){this._uid=v.nextId(),this._parent=f,this._tree=s,this._disposed=!1,this._visible=!0,this._metadata={...h||{}},this._depth=f?f.depth+1:0,a?this._watcher=a:f&&(this._watcher=f.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(v.nextId())),this._metadata[s]}addMetadata(s,f){if(!(s in this._metadata))this._metadata[s]=f,this._watcher.notifyDidChangeMetadata(this,{type:r.MetadataChangeType.Added,key:s,prevValue:void 0,value:f});else{const a=this._metadata[s];this._metadata[s]=f,this._watcher.notifyDidChangeMetadata(this,{type:r.MetadataChangeType.Updated,key:s,prevValue:a,value:f})}}removeMetadata(s){if(s in this._metadata){const f=this._metadata[s];delete this._metadata[s],this._watcher.notifyDidChangeMetadata(this,{type:r.MetadataChangeType.Removed,key:s,prevValue:f,value:void 0})}}mv(s,f=this.name){const a=this._parent;if(s===null||!m.is(s)){this.parent=void 0,this.dispose();return}const h=a!==s,u=this.path;this._depth=s.depth+1,(h||f!==this.name)&&(this.name=f,h&&this._watcher.notifyWillChangeParent(this,a,s),this.parent&&(this.parent.unlinkItem(this,!0),this.parent=s,this.parent.insertItem(this)),h&&this._watcher.notifyDidChangeParent(this,a,s)),this.path!==u&&this._watcher.notifyDidChangePath(this)}get visible(){return this._visible}setVisible(s){return this._visible=s,this}dispose(){this._disposed||(v.removeTreeNode(this.id,this.path),this._disposed=!0,this._watcher.notifyDidDispose(this))}}t.TreeNode=v,v.nextId=(()=>{let _=0;return()=>_++})(),v.idToTreeNode=new Map,v.pathToTreeNode=new Map,v.pathToId=new Map,v.pathToGlobalTreeState=new Map;class m extends v{static defaultSortComparator(s,f){return s.constructor===f.constructor?s.name>f.name?1:s.name<f.name?-1:0:m.is(s)?-1:m.is(f)?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,f=s.event,a=new n.DisposableCollection,h=d=>{this.watchEvents.delete(d)};return{notifyWillProcessWatchEvent:(d,E)=>{s.fire({type:r.TreeNodeEvent.WillProcessWatchEvent,args:[d,E]})},notifyWillChangeParent:(d,E,g)=>{s.fire({type:r.TreeNodeEvent.WillChangeParent,args:[d,E,g]})},notifyDidChangeParent:(d,E,g)=>{s.fire({type:r.TreeNodeEvent.DidChangeParent,args:[d,E,g]})},notifyDidDispose:d=>{s.fire({type:r.TreeNodeEvent.DidDispose,args:[d]})},notifyDidProcessWatchEvent:(d,E)=>{s.fire({type:r.TreeNodeEvent.DidProcessWatchEvent,args:[d,E]})},notifyDidChangePath:d=>{s.fire({type:r.TreeNodeEvent.DidChangePath,args:[d]})},notifyWillChangeExpansionState:(d,E)=>{const g=this.isItemVisibleAtSurface(d);s.fire({type:r.TreeNodeEvent.WillChangeExpansionState,args:[d,E,g]})},notifyDidChangeExpansionState:(d,E)=>{const g=this.isItemVisibleAtSurface(d);s.fire({type:r.TreeNodeEvent.DidChangeExpansionState,args:[d,E,g]})},notifyDidChangeMetadata:(d,E)=>{s.fire({type:r.TreeNodeEvent.DidChangeMetadata,args:[d,E]})},notifyDidUpdateBranch:()=>{s.fire({type:r.TreeNodeEvent.BranchDidUpdate,args:[]})},notifyWillResolveChildren:(d,E)=>{s.fire({type:r.TreeNodeEvent.WillResolveChildren,args:[d,E]})},notifyDidResolveChildren:(d,E)=>{s.fire({type:r.TreeNodeEvent.DidResolveChildren,args:[d,E]})},on:(d,E)=>{const g=f(l=>{l.type===d&&E(...l.args)});return a.push(g),g},onWatchEvent:(d,E)=>{const g=h;return this.watchEvents.set(d,{terminator:g,callback:E}),g},dispose:a}}constructor(s,f,a,h){super(s,f,a,h),this._children=null,this._lock=!1,this.refreshThrottler=new n.ThrottledDelayer(m.REFRESH_DELAY),this.toRefreshPathQueue=new Set,this.handleWatchEvent=async u=>{switch(this.watcher.notifyWillProcessWatchEvent(this,u),u.type){case r.WatchEvent.Moved:{const{oldPath:d,newPath:E}=u;if(typeof d!="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(d))throw new TypeError("oldPath must be absolute");if(o.isRelative(E))throw new TypeError("newPath must be absolute");this.transferItem(d,E);break}case r.WatchEvent.Added:{const{node:d}=u;if(!v.is(d))throw new TypeError("Expected node to be a TreeNode");this.insertItem(d);break}case r.WatchEvent.Removed:{const{path:d}=u,E=new o(d),g=E.dir.toString(),l=E.base.toString();if(g===this.path&&this.children){const y=this.children.find(b=>b.name===l);y&&this.unlinkItem(y)}break}default:this.isItemVisibleAtRootSurface(this)?await this.refresh():(this.isExpanded=!1,this._children=null);break}this.watcher.notifyDidProcessWatchEvent(this,u)},this.isExpanded=!f,this._branchSize=0,f?this._watcher=f.watcher:(this.watchEvents=new Map,this._watcher=this.generatorWatcher(),this._root=this,v.setTreeNode(this.id,this.path,this))}set name(s){const f=this.path;!m.isRoot(this)&&typeof this.watchTerminator=="function"?(this.watchTerminator(f),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,f=!1,a=!0,h){if(!this.disposed&&!m.isRoot(this)&&!this.isExpanded){if(a){const u=v.getGlobalTreeState(this.path);u.loadPathCancelToken.cancel(),u.refreshCancelToken.cancel(),v.setGlobalTreeState(this.path,{isExpanding:!0})}if(this.isExpanded=!0,this._children===null&&(this._watcher.notifyWillResolveChildren(this,this.isExpanded),await this.hardReloadChildren(h),this._watcher.notifyDidResolveChildren(this,this.isExpanded),!this.isExpanded||h?.isCancellationRequested)){a&&v.setGlobalTreeState(this.path,{isExpanding:!1});return}if(s&&this.parent&&m.is(this.parent)&&await this.parent.setExpanded(!0,!f,!1,h),h?.isCancellationRequested){a&&v.setGlobalTreeState(this.path,{isExpanding:!1});return}this.isExpanded&&(this._watcher.notifyWillChangeExpansionState(this,!0),this.expandBranch(this,f),this._watcher.notifyDidChangeExpansionState(this,!0)),a&&(v.setGlobalTreeState(this.path,{isExpanding:!1}),v.setTreeNode(this.id,this.path,this))}}getAllExpandedNodePath(){var s,f;const a=[];let h=0;m.isRoot(this)||(h=((s=this.root)===null||s===void 0?void 0:s.getIndexAtTreeNodeId(this.id))+1);const u=h+this.branchSize;for(let d=h;d<u;d++){const E=(f=this.root)===null||f===void 0?void 0:f.getTreeNodeAtIndex(d);m.is(E)&&E.expanded&&a.push(E.path)}return a}getAllCollapsedNodePath(){let s=[];if(this.children){for(let f=0;f<this.children.length;f++){const a=this.children[f];m.is(a)&&(a.isExpanded?s=s.concat(a.getAllCollapsedNodePath()):s.push(a.path))}return s}else return s}async resolveChildrens(s){var f,a,h;let u=this.children,d=[];try{u=await this._tree.resolveChildren(this)||[]}catch{u=[]}if(s?.isCancellationRequested)return!1;const E=new Array(u.length);this._children=Array(u.length);for(let l=0;l<u.length;l++){const y=u[l];y.id=v.getIdByPath(y.path)||y.id,this._children[l]=y,v.setIdByPath(y.path,y.id)}(f=this._children)===null||f===void 0||f.sort(this._tree.sortComparator||m.defaultSortComparator);for(let l=0;l<u.length;l++)E[l]=this._children[l].id;const g=[];for(let l=0,y=((a=this.children)===null||a===void 0?void 0:a.length)||0;l<y;l++){const b=(h=this.children)===null||h===void 0?void 0:h[l];if(m.is(b)&&b.expanded){const S=await b.resolveChildrens(s);if(S&&(d=d.concat(S)),s?.isCancellationRequested)return;g.push(b)}}this._branchSize=E.length,this.setFlattenedBranch(E);for(let l=0;l<g.length;l++){const y=g[l];y.expandBranch(y,!0)}return d.concat(g.map(l=>l.path.toString()))}updateTreeNodeCache(s){var f;if(v.setTreeNode(s.id,s.path,s),m.is(s)&&s.expanded&&(!((f=s.children)===null||f===void 0)&&f.length))for(let a=0;a<s.children.length;a++){const h=s.children[a];this.updateTreeNodeCache(h)}}async refreshTreeNodeByPaths(s=this.getAllExpandedNodePath(),f,a){if(!m.is(this))return;let h;const u=this.children;let d=this.children||[];if(this.expanded){if(this===a){try{d=await this._tree.resolveChildren(this)||[]}catch{d=[]}if(f?.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(;h=s.shift();){if(!(h.indexOf(`${this.path}${o.separator}`)>-1)){h===this.path&&(h=void 0);break}const g=d?.find(l=>l.path===h);if(g){if(m.is(g)&&!g.expanded){g.isExpanded=!0;const l=await g.resolveChildrens(f);if(f?.isCancellationRequested||(l&&(s=s.filter(y=>!l.find(b=>b.includes(y)))),s.length>0&&!f?.isCancellationRequested&&(s=await g.refreshTreeNodeByPaths([...s],f,a)||[],f?.isCancellationRequested)))return}}else{if(!d||d.length===0)break;for(let l=0;l<d.length;l++){const y=d[l];if(h.indexOf(`${y.path}${o.separator}`)===0&&m.is(y)){if(!m.is(y))continue;y.isExpanded=!0;const S=await y.resolveChildrens(f);if(f?.isCancellationRequested||(S&&(s=s.filter(A=>!S.find(w=>w===A))),y.path!==h&&!s.includes(y.path)&&s.unshift(h),s.length>0&&(s=await y.refreshTreeNodeByPaths([...s],f,a)||[],f?.isCancellationRequested)))return;break}}}}if(h){if(s.unshift(h),this===a){if(u){this.shrinkBranch(this,!0);for(let l=0;l<u.length;l++){const y=u[l];y?.dispose()}}const E=[],g=new Array(d.length);this._children=Array(d.length);for(let l=0;l<d.length;l++){const y=d[l];y.id=v.getIdByPath(y.path)||y.id,this._children[l]=y,v.setIdByPath(y.path,y.id),m.is(y)&&y.expanded&&E.push(y)}this._children.sort(this._tree.sortComparator||m.defaultSortComparator);for(let l=0;l<d.length;l++)g[l]=this._children[l].id;this._branchSize=g.length,this.setFlattenedBranch(g,!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=[],g=[],l=new Array(d.length);this._children=Array(d.length);for(let y=0;y<d.length;y++){const b=d[y];if(b.id=v.getIdByPath(b.path)||b.id,this._children[y]=b,v.setIdByPath(b.path,b.id),m.is(b)&&b.expanded){if(!b.children&&(await b.resolveChildrens(f),f?.isCancellationRequested))return;E.push(b)}else g.push(b)}this._children.sort(this._tree.sortComparator||m.defaultSortComparator);for(let y=0;y<d.length;y++)l[y]=this._children[y].id;this._branchSize=l.length,this.setFlattenedBranch(l,!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<g.length;y++){const b=g[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 l=0,y=this.children.length;l<y;l++)this.children[l].dispose();const g=new Array(d.length);this._children=Array(d.length);for(let l=0,y=d.length;l<y;l++){const b=d[l];b.id=v.getIdByPath(b.path)||b.id,this._children[l]=b,v.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 l=0;l<d.length;l++)g[l]=this._children[l].id;this._branchSize=g.length,this.setFlattenedBranch(g);for(let l=0;l<E.length;l++){const y=E[l];y.expandBranch(y,!0)}}else for(let g=0;g<d.length;g++){const l=d[g];l.expanded&&E.push(l)}for(let g=0;g<E.length;g++){const l=E[g];l.expandBranch(l,!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,g=this.children.length;E<g;E++)this.children[E].dispose();this._children=null}return}}async expandedAll(s=this.getAllCollapsedNodePath()){if(!m.isRoot(this))return;s=s.sort((a,h)=>o.pathDepth(a)-o.pathDepth(h));let f;for(;s.length>0;){f=s.pop();const a=v.getTreeNodeByPath(f);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,h)=>o.pathDepth(a)-o.pathDepth(h));let f;for(;s.length>0;){f=s.pop();const a=v.getTreeNodeByPath(f);m.is(a)&&a.setCollapsed(!0)}this.watcher.notifyDidUpdateBranch()}setCollapsed(s=!1){if(m.isRoot(this)||this.disposed||!this.isExpanded)return;const f=v.getGlobalTreeState(this.path);f.isExpanding||(f.loadPathCancelToken.cancel(),f.refreshCancelToken.cancel(),this._watcher.notifyWillChangeExpansionState(this,!1),this._children&&this.parent&&this.shrinkBranch(this,s),this.isExpanded=!1,v.setTreeNode(this.id,this.path,this),this._watcher.notifyDidChangeExpansionState(this,!1))}mv(s,f=this.name){const a=this.path;if(super.mv(s,f),typeof this.watchTerminator=="function"&&(this.watchTerminator(a),this.watchTerminator=this.watcher.onWatchEvent(this.path,this.handleWatchEvent)),this.children)for(let h=0;h<this.children.length;h++){const u=this.children[h];u.mv(u.parent,u.name)}}insertItem(s){if(s.parent!==this){s.mv(this,s.name);return}if(this.children){for(let g=0;g<this.children.length;g++)if(this.children[g].path===s.path){this.children[g]=s;return}}const f=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+=f;let a=this;for(;!a._flattenedBranch;)a.parent&&(a=a.parent,a._branchSize+=f);if(!this._children)return;let h=this._children.indexOf(s),u;const d=this._children[h-1];d?h=a._flattenedBranch.indexOf(d.id)+(d instanceof m&&d.expanded?d._branchSize:0):h=a._flattenedBranch.indexOf(this.id),h===-1&&this._branchSize===1&&(h=0),u=h+1,a._flattenedBranch.length===0&&(u=0);let E=[s.id];return s instanceof m&&s.expanded&&s._flattenedBranch&&(E=E.concat(s._flattenedBranch),s.setFlattenedBranch(null)),a.setFlattenedBranch(c(a._flattenedBranch,u,0,E)),v.setTreeNode(s.id,s.path,s),s}unlinkItem(s,f){var a;if(!this._children)return;const h=this._children.indexOf(s);if(h===-1||!this.isItemVisibleAtRootSurface(this))return;(a=this._children)===null||a===void 0||a.splice(h,1);const u=1+(s instanceof m&&s.expanded?s._branchSize:0);this._branchSize-=u;let d=this;for(;!d._flattenedBranch;)d.parent&&(d=d.parent,d._branchSize-=u);const E=d._flattenedBranch.indexOf(s.id);E!==-1&&(s instanceof m&&s.expanded&&s.setFlattenedBranch(d._flattenedBranch.slice(E+1,E+u)),d.setFlattenedBranch(c(d._flattenedBranch,E,u)),!f&&s.parent===this&&s.mv(null))}transferItem(s,f){var a;const h=new o(s),u=h.dir.toString();if(u!==this.path)return;const d=h.base.toString(),E=(a=this._children)===null||a===void 0?void 0:a.find(b=>b.name===d);if(!E)return;const g=new o(f),l=g.dir.toString(),y=l===u?this:v.getTreeNodeByPath(l);if(!m.is(y)){this.unlinkItem(E);return}return E.mv(y,g.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,f){this._flattenedBranch=s,m.isRoot(this)&&!f&&this.watcher.notifyDidUpdateBranch()}expandBranch(s,f){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(c(this._flattenedBranch,a,0,s._flattenedBranch),f),s.setFlattenedBranch(null,f)}else this.parent&&this.parent.expandBranch(s,f)}shrinkBranch(s,f){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),f),this.setFlattenedBranch(c(this._flattenedBranch,a,s._flattenedBranch?s._flattenedBranch.length:0),f)}else this.parent&&this.parent.shrinkBranch(s,f)}async hardReloadChildren(s){let f;const a=this.path;try{f=await this._tree.resolveChildren(this)||[]}catch{f=[]}if(!this.expanded||s?.isCancellationRequested)return!1;this.path!==a&&v.setGlobalTreeState(a,{isExpanding:!1,isLoadingPath:!1,isRefreshing:!1});const h=[],u=new Array(f.length),d=new Array(f.length);for(let E=0;E<f.length;E++){const g=f[E];if(g.id=v.getIdByPath(g.path)||g.id,d[E]=g,v.setIdByPath(g.path,g.id),m.is(g)&&g.expanded){if(g.children||await g.resolveChildrens(s),s?.isCancellationRequested)return!1;h.push(g)}}d.sort(this._tree.sortComparator||m.defaultSortComparator);for(let E=0;E<f.length;E++)u[E]=d[E].id;if(this.children&&this.shrinkBranch(this),this.children)for(let E=0;E<this.children.length;E++){const g=this.children[E];g?.dispose()}for(let E=0;E<d.length;E++)this.updateTreeNodeCache(d[E]);this._children=d,this._branchSize=u.length,this.setFlattenedBranch(u);for(let E=0;E<h.length;E++){const g=h[E];g.expandBranch(g,!0)}return typeof this.watchTerminator=="function"&&this.watchTerminator(this.path),this.watchTerminator=this.watcher.onWatchEvent(this.path,this.handleWatchEvent),!0}moveNode(s,f){if(typeof s!="string")throw new TypeError("Expected oldPath to be a string");if(typeof f!="string")throw new TypeError("Expected newPath to be a string");if(o.isRelative(s))throw new TypeError("oldPath must be absolute");if(o.isRelative(f))throw new TypeError("newPath must be absolute");return this.transferItem(s,f)}addNode(s){if(!v.is(s))throw new TypeError("Expected node to be a TreeNode");return this.insertItem(s)}removeNode(s){const f=new o(s),a=f.dir.toString(),h=f.base.toString();if(a===this.path&&this.children){const u=this.children.find(d=>d.name===h);u&&this.unlinkItem(u)}}async refresh(s,f){if(!m.isRoot(this))return await this.root.refresh(s,this);const a=v.getGlobalTreeState(this.path);if(a.isLoadingPath||a.isExpanding)return;let h;if(s&&!s.token.isCancellationRequested)v.setGlobalTreeState(this.path,{isRefreshing:!0,refreshCancelToken:s}),h=s.token;else if(a.refreshCancelToken.token.isCancellationRequested){const u=new n.CancellationTokenSource;v.setGlobalTreeState(this.path,{isRefreshing:!0,refreshCancelToken:u}),h=u.token}else h=a.refreshCancelToken.token;this.toRefreshPathQueue.add((f||this).path),await this.refreshThrottler.trigger(()=>this.doRefresh(h)),v.setGlobalTreeState(this.path,{isRefreshing:!1})}async doRefresh(s){const f=this.getRefreshNode()||this;if(!m.is(f))return;const a=f.getAllExpandedNodePath();await f.refreshTreeNodeByPaths(a,s,f)}getRefreshNode(){let s=Array.from(this.toRefreshPathQueue);if(this.toRefreshPathQueue.clear(),!s.length)return this.root;if(s=s.sort((h,u)=>{const d=o.pathDepth(h),E=o.pathDepth(u);return d-E}),s.length===1||o.pathDepth(s[0])===1)return v.getTreeNodeByPath(s[0]);const f=s.map(h=>new o(h));let a=f[0];for(let h=1,u=f.length;h<u;h++)if(!a.isEqualOrParent(f[h]))for(;!a.isRoot&&(a=a.dir,!(!a||a.isEqualOrParent(f[h]))););return a?v.getTreeNodeByPath(a.toString()):this.root}isItemVisibleAtRootSurface(s){let f=s;for(;f.parent;)f=f.parent;return f.isItemVisibleAtSurface(s)}isItemVisibleAtSurface(s){return s===this?!0:!!this._flattenedBranch&&this._flattenedBranch.indexOf(s.id)>-1}transformToRelativePath(s){const{splitPath:f}=o,a=f(s);return a.shift(),a}async loadTreeNodeByPath(s,f=!1){if(!m.isRoot(this))return;const a=v.getGlobalTreeState(this.path);if(a.isExpanding)return;a.refreshCancelToken.cancel(),a.loadPathCancelToken.cancel();const h=new n.CancellationTokenSource;v.setGlobalTreeState(this.path,{isLoadingPath:!0,loadPathCancelToken:h});const u=h.token,d=[],{splitPath:E,isRelative:g}=o,l=g(s)?E(s):this.transformToRelativePath(s);if(l.length===0)return v.setGlobalTreeState(this.path,{isLoadingPath:!1}),this;if(this.children||await this.ensureLoaded(u),u.isCancellationRequested){v.setGlobalTreeState(this.path,{isLoadingPath:!1});return}let y=this._children,b,S="",A;for(;y&&(A=l.shift());){let w=y.find(T=>T.name.indexOf(A)===0);if(w){if(m.is(w)){if(w._watcher.notifyWillChangeExpansionState(w,!0),w.isExpanded=!0,!w.children&&(await w.resolveChildrens(u),u.isCancellationRequested)){v.setGlobalTreeState(this.path,{isLoadingPath:!1});return}d.push(w),w._watcher.notifyDidChangeExpansionState(w,!0)}if(l.length===0){b=w;break}}if(!w&&b){const T=E(b.name).slice(1);if(T[0]===A){for(T.shift();T.length>0&&T[0]===l[0];)T.shift(),l.shift();A=l.shift(),w=y.find(D=>D.name.indexOf(A)===0)}}if(!w||!m.is(w)&&l.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]===l[0];)D.shift(),l.shift()}if(!w._children&&(S=w.path,m.is(w))){if(w.isExpanded=!0,!w.children&&(await w.resolveChildrens(u),u.isCancellationRequested)){v.setGlobalTreeState(this.path,{isLoadingPath:!1});return}d.push(w)}if(w&&l.length===0){b=w;break}else{if(S&&S!==w.path){const D=E(S),I=E(w.path);I.length>D.length&&l.splice(0,I.length-D.length)}y=w._children,b=w}}}if(b){let w;if(b.disposed){v.setGlobalTreeState(this.path,{isLoadingPath:!1});return}for(;w=d.pop();)w.expandBranch(w,!0),d.length===0&&this.updateTreeNodeCache(w);return f||this.watcher.notifyDidUpdateBranch(),v.setGlobalTreeState(this.path,{isLoadingPath:!1}),b}v.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 f;const a=(f=this._flattenedBranch)===null||f===void 0?void 0:f[s];if(a)return v.getTreeNodeById(a)}getTreeNodeById(s){return v.getTreeNodeById(s)}getTreeNodeByPath(s){return v.getTreeNodeByPath(s)}}t.CompositeTreeNode=m,m.REFRESH_DELAY=200},58781:(x,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(_,s){this.addChangeListener=_,this.removeChangeListener=s}}t.ClasslistComposite=o;var c;(function(m){m[m.Applicable=1]="Applicable",m[m.Inheritable=2]="Inheritable"})(c||(t.CompositeDecorationType=c={}));var p;(function(m){m[m.UnTargetDecoration=1]="UnTargetDecoration",m[m.TargetDecoration=2]="TargetDecoration"})(p||(t.ChangeReason=p={}));class v{constructor(_,s,f){this.handleDecorationDidAddClassname=a=>{const{classname:h}=a;!this.selfOwned||!h||(this.compositeCssClasslist.classlist.push(h),this.notifyClasslistChange())},this.handleDecorationDidRemoveClassname=a=>{const{classname:h}=a;if(!this.selfOwned||!h)return;const u=this.compositeCssClasslist.classlist.indexOf(h);u>-1&&(this.compositeCssClasslist.classlist.splice(u,1),this.notifyClasslistChange())},this.mergeDecorationClasslist=a=>{const{decoration:h}=a;this.selfOwned&&(this.compositeCssClasslist.classlist.push(...h.cssClassList),this.notifyClasslistChange())},this.handleDecorationDisable=a=>{const{decoration:h}=a;this.removeDecorationClasslist(h)},this.target=_,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)),f?(this.selfOwned=!1,this.parent=f,this.renderedDecorations=f.renderedDecorations,this.compositeCssClasslist.classlist=f.compositeCssClasslist.classlist,f.linkedComposites.add(this)):(this.renderedDecorations=new Map,this.targetedDecorations=new Set,this.negatedDecorations=new Set,this.compositeCssClasslist.classlist=[],this.selfOwned=!0)}changeParent(_){if(_){if(!this.selfOwned)return this.parentOwn(_);for(const[s]of this.renderedDecorations)this.recursiveRefresh(this,!1,p.UnTargetDecoration,s,!1);this.parent!==_&&(this.parent.linkedComposites.delete(this),this.parent=_,_.linkedComposites.add(this));for(const[s]of _.renderedDecorations)this.recursiveRefresh(this,!1,p.TargetDecoration,s,!1)}}add(_){const s=_.appliedTargets.get(this.target),f=s&&(s===r.TargetMatchMode.Self||s===r.TargetMatchMode.SelfAndChildren),a=s&&(s===r.TargetMatchMode.Children||s===r.TargetMatchMode.SelfAndChildren);if(!(this.type===c.Applicable&&!f)&&!(this.type===c.Inheritable&&!a)){if(!this.selfOwned){this.selfOwn(p.TargetDecoration,_),this.targetedDecorations.add(_);return}this.targetedDecorations.has(_)||(this.targetedDecorations.add(_),this.recursiveRefresh(this,!1,p.TargetDecoration,_))}}remove(_){if(this.selfOwned&&this.targetedDecorations.delete(_)){if(this.negatedDecorations.size===0&&this.targetedDecorations.size===0&&this.parent)return this.parentOwn(void 0,p.UnTargetDecoration,_);this.recursiveRefresh(this,!1,p.UnTargetDecoration,_)}}negate(_){const s=_.negatedTargets.get(this.target),f=s&&(s===r.TargetMatchMode.Self||s===r.TargetMatchMode.SelfAndChildren),a=s&&(s===r.TargetMatchMode.Children||s===r.TargetMatchMode.SelfAndChildren);if(!(this.type===c.Applicable&&!f)&&!(this.type===c.Inheritable&&!a)){if(!this.selfOwned){this.selfOwn(p.UnTargetDecoration,_),this.negatedDecorations.add(_);return}this.negatedDecorations.has(_)||(this.negatedDecorations.add(_),this.renderedDecorations.has(_)&&this.removeDecorationClasslist(_))}}unNegate(_){if(this.selfOwned&&this.negatedDecorations.delete(_)){if(this.negatedDecorations.size===0&&this.targetedDecorations.size===0&&this.parent)return this.parentOwn();!this.renderedDecorations.has(_)&&(this.parent.renderedDecorations.has(_)||_.appliedTargets.has(this.target))&&this.recursiveRefresh(this,!1,p.TargetDecoration,_)}}selfOwn(_,s){if(this.selfOwned)throw new Error("CompositeDecoration is already self owned");const f=this.parent;this.selfOwned=!0,this.compositeCssClasslist.classlist=[],this.renderedDecorations=new Map,this.targetedDecorations=new Set,this.negatedDecorations=new Set;for(const[a]of f.renderedDecorations)a!==s&&this.processCompositeAlteration(p.TargetDecoration,a);_===p.UnTargetDecoration&&this.parent.renderedDecorations.has(s)&&!this.renderedDecorations.has(s)&&this.notifyClasslistChange(!1),this.recursiveRefresh(this,!0,_,s)}parentOwn(_,s,f){this.selfOwned=!1,this.targetedDecorations&&this.targetedDecorations.clear(),this.negatedDecorations&&this.negatedDecorations.clear(),_&&this.parent!==_&&(this.parent&&this.parent.linkedComposites.delete(this),_.linkedComposites.add(this),this.parent=_),this.recursiveRefresh(this,!0,s,f)}processCompositeAlteration(_,s){if(!this.selfOwned)throw new Error("CompositeDecoration is not self owned");if(_===p.UnTargetDecoration){const f=this.renderedDecorations.get(s);if(f){const a=s.appliedTargets.get(this.target),h=a&&(a===r.TargetMatchMode.Self||a===r.TargetMatchMode.SelfAndChildren),u=a&&(a===r.TargetMatchMode.Children||a===r.TargetMatchMode.SelfAndChildren);return h&&this.type===c.Applicable||u&&this.type===c.Inheritable?!1:(this.removeDecorationClasslist(s,!1),f&&f.dispose(),this.renderedDecorations.delete(s))}return!1}if(_===p.TargetDecoration){const f=s.negatedTargets.get(this.target),a=f&&(f===r.TargetMatchMode.Self||f===r.TargetMatchMode.SelfAndChildren),h=f&&(f===r.TargetMatchMode.Children||f===r.TargetMatchMode.SelfAndChildren);if(a&&this.type===c.Applicable||h&&this.type===c.Inheritable)return!1;if(!this.renderedDecorations.has(s)){const u=new n.DisposableCollection;return u.push(s.onDidAddCSSClassname(this.handleDecorationDidAddClassname)),u.push(s.onDidRemoveCSSClassname(this.handleDecorationDidRemoveClassname)),u.push(s.onDidDisableDecoration(this.handleDecorationDisable)),u.push(s.onDidEnableDecoration(this.mergeDecorationClasslist)),this.renderedDecorations.set(s,u),s.disabled?!1:(this.compositeCssClasslist.classlist.push(...s.cssClassList),!0)}}return!1}recursiveRefresh(_,s,f,a,h=!0){if(!this.selfOwned&&s&&(this.renderedDecorations=this.parent.renderedDecorations,this.compositeCssClasslist.classlist=this.parent.compositeCssClasslist.classlist),this.selfOwned&&s&&_!==this){for(const[u]of this.renderedDecorations)this.processCompositeAlteration(p.UnTargetDecoration,u);for(const[u]of this.parent.renderedDecorations)this.processCompositeAlteration(p.TargetDecoration,u);h&&this.notifyClasslistChange(!1)}else this.selfOwned&&f===p.UnTargetDecoration&&a&&this.renderedDecorations.has(a)?(this.processCompositeAlteration(f,a),h&&this.notifyClasslistChange(!1)):this.selfOwned&&f===p.TargetDecoration&&a&&this.processCompositeAlteration(f,a)&&h?this.notifyClasslistChange(!1):!this.selfOwned&&h&&this.notifyClasslistChange(!1);for(const u of this.linkedComposites)u.recursiveRefresh(_,s,f,a,h)}removeDecorationClasslist(_,s=!0){if(this.selfOwned){for(const f of _.cssClassList){const a=this.compositeCssClasslist.classlist.indexOf(f);a>-1&&this.compositeCssClasslist.classlist.splice(a,1)}s&&this.notifyClasslistChange()}}notifyClasslistChange(_=!0){for(const s of[...this.classlistChangeCallbacks])s();if(_)for(const s of this.linkedComposites)s.selfOwned||s.notifyClasslistChange()}}t.CompositeDecoration=v},96336:(x,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(p){p[p.None=1]="None",p[p.Self=2]="Self",p[p.Children=3]="Children",p[p.SelfAndChildren=4]="SelfAndChildren"})(o||(t.TargetMatchMode=o={}));class c{constructor(...v){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(v))if(v.every(m=>typeof m=="string"))this._cssClassList=new Set(v);else throw new TypeError("classlist must be of type `Array<string>`");else this._cssClassList=new Set}get disabled(){return this._disabled}set disabled(v){this._disabled=v,v?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(v){this._cssClassList.has(v)||(this._cssClassList.add(v),this.onDidAddCSSClassnameEmitter.fire({decoration:this,classname:v}))}removeCSSClass(v){this._cssClassList.has(v)&&(this._cssClassList.delete(v),this.onDidRemoveCSSClassnameEmitter.fire({decoration:this,classname:v}))}hasTarget(v){return!!this._appliedTargets.get(v)}addTarget(v,m=o.Self){if(this._appliedTargets.get(v)===m||!r.TreeNode.is(v))return;this._appliedTargets.set(v,m);const s=n.Disposable.create(()=>{this.removeTarget(v)});return this.appliedTargetsDisposables.set(v,s),this.onDidAddTargetEmitter.fire({decoration:this,target:v}),s}removeTarget(v){if(this._appliedTargets.delete(v)){const m=this.appliedTargetsDisposables.get(v);m&&m.dispose(),this.onDidRemoveTargetEmitter.fire({decoration:this,target:v})}}clearAppliedTarget(){const v=Array.from(this._appliedTargets.keys());for(const m of v)this.removeTarget(m)}clearNegateTarget(){const v=Array.from(this._negatedTargets.keys());for(const m of v)this.unNegateTarget(m)}negateTarget(v,m=o.Self){if(this._negatedTargets.get(v)===m||!r.TreeNode.is(v))return;this._negatedTargets.set(v,m);const s=n.Disposable.create(()=>{this.unNegateTarget(v)});return this.negatedTargetsDisposables.set(v,s),this.onDidNegateTargetEmitter.fire({decoration:this,target:v}),s}unNegateTarget(v){if(this._negatedTargets.delete(v)){const m=this.negatedTargetsDisposables.get(v);m&&m.dispose(),this.onDidUnNegateTargetEmitter.fire({decoration:this,target:v})}}}t.Decoration=c},29701:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DecorationsManager=void 0;const n=e(70392),r=e(34054),o=e(26353),c=e(58781);class p{constructor(m){this.root=m,this.decorations=new Map,this.decorationsMeta=new WeakMap,this.disposables=new n.DisposableCollection,this.disposed=!1,this.targetDecoration=_=>{const{decoration:s,target:f}=_,a=this.getDecorationData(f);if(a){const{applicable:h,inheritable:u}=a;h.add(s),u&&u.add(s)}},this.updateTarget=()=>{for(const[_]of this.decorations)for(const[s,f]of Array.from(_.appliedTargets)){_.removeTarget(s);const a=this.root.getTreeNodeByPath(s.path);a&&_.addTarget(a,f)}},this.unTargetDecoration=_=>{const{decoration:s,target:f}=_,a=this.getDecorationData(f);if(a){const{applicable:h,inheritable:u}=a;h.remove(s),u&&u.remove(s)}},this.negateDecoration=_=>{const{decoration:s,target:f}=_,a=this.getDecorationData(f);if(a){const{applicable:h,inheritable:u}=a;h.negate(s),u&&u.negate(s)}},this.unNegateDecoration=_=>{const{decoration:s,target:f}=_,a=this.getDecorationData(f);if(a){const{applicable:h,inheritable:u}=a;h.unNegate(s),u&&u.unNegate(s)}},this.switchParent=(_,s,f)=>{const a=this.decorationsMeta.get(_);if(!a)return;const h=this.getDecorationData(f);h&&(a.applicable.changeParent(h.inheritable),a.inheritable&&a.inheritable.changeParent(h.inheritable))},this.decorationsMeta.set(m,{applicable:new c.CompositeDecoration(m,c.CompositeDecorationType.Applicable),inheritable:new c.CompositeDecoration(m,c.CompositeDecorationType.Inheritable)}),this.disposables.push(m.watcher.on(r.TreeNodeEvent.DidChangeParent,this.switchParent)),this.disposables.push(m.watcher.on(r.TreeNodeEvent.DidDispose,_=>this.decorationsMeta.delete(_))),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 _=new n.DisposableCollection;_.push(m.onDidAddTarget(this.targetDecoration)),_.push(m.onDidRemoveTarget(this.unTargetDecoration)),_.push(m.onDidNegateTarget(this.negateDecoration)),_.push(m.onDidUnNegateTarget(this.unNegateDecoration)),this.decorations.set(m,_);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 _=this.decorations.get(m);if(_){for(const[s]of m.appliedTargets){const f=this.decorationsMeta.get(s);f&&(f.applicable.remove(m),f.inheritable&&f.inheritable.remove(m))}for(const[s]of m.negatedTargets){const f=this.decorationsMeta.get(s);f&&(f.applicable.unNegate(m),f.inheritable&&f.inheritable.unNegate(m))}_.dispose(),this.decorations.delete(m)}}getDecorations(m){if(!m||!o.TreeNode.is(m))return;const _=this.getDecorationData(m);if(_)return _.applicable.compositeCssClasslist}getDecorationData(m){if(this.disposed)return;const _=this.decorationsMeta.get(m);if(_)return _;if(!m||!m.parent)return;const s=this.getDecorationData(m.parent);if(s){const f={applicable:new c.CompositeDecoration(m,c.CompositeDecorationType.Applicable,s.inheritable),inheritable:o.CompositeTreeNode.is(m)?new c.CompositeDecoration(m,c.CompositeDecorationType.Inheritable,s.inheritable):void 0};return this.decorationsMeta.set(m,f),f}}}t.DecorationsManager=p},24936:(x,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:(x,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:(x,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 c{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(v){this._root=v,this.initState(v),this.root&&(this._ensureReady=this.root.ensureLoaded())}get state(){return this._state}set state(v){this._state=v}init(v){this.root=v,this.root.watcher.on(r.TreeNodeEvent.BranchDidUpdate,this.dispatchChange)}initState(v){this.state=new o.TreeStateManager(v)}loadTreeState(v){return typeof v=="string"&&(v=JSON.parse(v)),this.state.loadTreeState(v)}getTreeStateWatcher(v=!1){return new o.TreeStateWatcher(this.state,v)}resolveChildren(v){return Promise.resolve(Array.from(v.children))}}t.TreeModel=c},58615:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),e(85608).__exportStar(e(13674),t)},12165:(x,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:c}=n.path;var p;(function(_){_[_.SetExpanded=1]="SetExpanded",_[_.SetCollapsed=2]="SetCollapsed",_[_.SetActive=3]="SetActive"})(p||(t.Operation=p={}));var v;(function(_){_[_.Expanded=1]="Expanded",_[_.Collapsed=2]="Collapsed",_[_.Disabled=4]="Disabled"})(v||(v={}));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=(f,a,h)=>{var u;if(this.stashing&&this.stashKeyframes&&this.stashKeyframes.set(f.id,a?v.Expanded:v.Collapsed),this.stashKeyframes&&!this.stashing){if(a){let E=f;for(;E;){if(this.stashKeyframes.has(E.id)){let g=this.stashKeyframes.get(E.id);g=g|v.Disabled,this.stashKeyframes.set(E.id,g)}E=E.parent}this.stashLockingItems.add(f)}if(this.stashLockingItems&&this.stashLockingItems.has(f)&&!a){let E=f;for(;E;){if(this.stashKeyframes.has(E.id)){let g=this.stashKeyframes.get(E.id);g&=~v.Disabled,this.stashKeyframes.set(E.id,g)}E=E.parent}this.stashLockingItems.delete(f)}}let d=this.expandedDirectories.get(f);a&&!d?(d=(u=new c(this.root.path).relative(new c(f.path)))===null||u===void 0?void 0:u.toString(),this.expandedDirectories.set(f,d),this.onDidChangeExpansionStateEmitter.fire({relativePath:d,isExpanded:a,isVisibleAtSurface:h})):!a&&d&&(this.expandedDirectories.delete(f),this.onDidChangeExpansionStateEmitter.fire({relativePath:d,isExpanded:a,isVisibleAtSurface:h}))},this.handleDidChangePath=f=>{var a;if(this.expandedDirectories.has(f)){const h=this.expandedDirectories.get(f),u=(a=new c(this.root.path).relative(new c(f.path)))===null||a===void 0?void 0:a.toString();this.expandedDirectories.set(f,u),this.onDidChangeRelativePathEmitter.fire({prevPath:h,newPath:u})}},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 f of s.expandedDirectories.buried)try{const a=await this.root.loadTreeNodeByPath(f);if(!a)break;a&&o.CompositeTreeNode.is(a)&&a.setCollapsed()}catch{}for(const f of s.expandedDirectories.atSurface)try{if(!await this.root.loadTreeNodeByPath(f,!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[f,a]of s){const h=(a&v.Disabled)===v.Disabled,u=o.TreeNode.getTreeNodeById(f);!u||h||((a&v.Expanded)===v.Expanded?u.setCollapsed():(a&v.Collapsed)===v.Collapsed&&await u.setExpanded())}}}t.TreeStateManager=m},72782:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TreeStateWatcher=void 0;const n=e(70392),r=e(13440);class o{constructor(p,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(p.onChangeScrollOffset(m=>{this.currentState.scrollPosition=m,this.onDidTreeStateChangeEmitter.fire(r.TreeStateWatcherChangeType.ScrollOffset)})),this.disposables.push(p.onDidChangeRelativePath(({prevPath:m,newPath:_})=>{let s=!1;const f=new Set(this.currentState.expandedDirectories.atSurface);if(f.has(m)&&(f.delete(m),f.add(_),s=!0),this.currentState.expandedDirectories.atSurface=Array.from(f),v){const a=new Set(this.currentState.expandedDirectories.buried);a.has(m)&&(f.delete(m),f.add(_),s=!0),this.currentState.expandedDirectories.buried=Array.from(a)}s&&this.onDidTreeStateChangeEmitter.fire(r.TreeStateWatcherChangeType.PathsUpdated)})),this.disposables.push(p.onDidChangeExpansionState(({relativePath:m,isExpanded:_,isVisibleAtSurface:s})=>{let f=!1;const a=new Set(this.currentState.expandedDirectories.atSurface),h=new Set(this.currentState.expandedDirectories.buried);if(a.has(m)&&(!_||!s)){a.delete(m);const d=Array.from(a).filter(E=>E.indexOf(m)>=0);for(const E of d)a.delete(E),h.has(E)||h.add(E);f=!0}else _&&s&&(a.add(m),f=!0);this.currentState.expandedDirectories.atSurface=Array.from(a),v||(h.has(m)&&(!_||s)?(h.delete(m),f=!0):_&&!s&&(h.add(m),f=!0),this.currentState.expandedDirectories.buried=Array.from(h)),f&&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:(x,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:(x,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:(x,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:(x,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:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},3754:(x,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:(x,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)),c=n.__importStar(e(14041)),p=e(70392),v=e(56875);e(93324);const m=({onScroll:_,onUpdate:s,forwardedRef:f,style:a,children:h,className:u,onReachBottom:d,tabBarMode:E,thumbSize:g=5,hiddenVertical:l,hiddenHorizontal:y,universal:b=!1})=>{const S=(0,c.useRef)(new p.DisposableCollection),A=(0,c.useRef)(),w=(0,c.useCallback)(M=>{M?(A.current=M.view,f&&(typeof f=="function"?f(M.view):f.current=M.view)):f&&typeof f=="function"&&f(null)},[]),T=(0,c.useRef)(),D=(0,c.useRef)(),I=(0,c.useCallback)(M=>{if(!M)return;const{scrollTop:R,scrollHeight:P,clientHeight:k}=M;if(P===0&&k===0)return;(R+100)/(P-k)>1&&d&&d()},[d]),O=(0,c.useCallback)((0,o.default)(M=>{if(!M)return;const{scrollTop:R,scrollLeft:P}=M,k=1/20*Math.min(R,20),F=1/20*Math.min(P,20);T.current&&(T.current.style.opacity=String(k)),D.current&&(D.current.style.opacity=String(F)),I(M),s&&s(M)},100),[s,I,T.current,D.current]);return(0,c.useEffect)(()=>{const M=R=>{A.current&&(R.preventDefault(),R.stopPropagation(),A.current.clientHeight>=A.current.scrollHeight&&(R.deltaY!==0&&(A.current.scrollLeft+=R.deltaY),R.deltaX!==0&&(A.current.scrollLeft+=R.deltaX)))};return E&&A.current&&A.current.addEventListener("wheel",M),()=>{var R;(R=A.current)===null||R===void 0||R.removeEventListener("wheel",M)}},[A.current,E]),(0,c.useEffect)(()=>()=>S.current.dispose(),[]),c.default.createElement(v.Scrollbars,{ref:w,style:{...a,overflow:"hidden"},className:(0,r.default)(u,"kt-scrollbar"),onUpdate:O,onScroll:_,universal:b,renderTrackHorizontal:({style:M,...R})=>{const P={...M,height:g,left:0,right:0,bottom:1};return y&&(P.display="none"),c.default.createElement("div",{...R,style:P})},renderTrackVertical:({style:M,...R})=>{const P={...M,width:g,top:0,right:1,bottom:0};return l&&(P.display="none"),c.default.createElement("div",{...R,style:P})},renderThumbVertical:({style:M,className:R,...P})=>{const k={...M,width:g};return l&&(k.display="none"),c.default.createElement("div",{...P,style:k,className:(0,r.default)(R,"scrollbar-thumb-vertical")})},renderThumbHorizontal:({style:M,className:R,...P})=>{const k={...M,height:g,display:"none"};return y&&(k.display="none"),c.default.createElement("div",{...P,style:k,className:(0,r.default)(R,"scrollbar-thumb-horizontal")})}},c.default.createElement("div",{ref:M=>{T.current=M},className:"scrollbar-decoration-vertical"}),c.default.createElement("div",{ref:M=>{D.current=M},className:"scrollbar-decoration-horizontal"}),h)};t.Scrollbars=m,t.Scrollbars.displayName="CustomScrollbars",t.ScrollbarsVirtualList=c.default.forwardRef((_,s)=>c.default.createElement(t.Scrollbars,{..._,thumbSize:10,forwardedRef:s})),t.ScrollbarsVirtualList.displayName="ScrollbarsVirtualList"},14640:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SelectOptionsList=t.Option=void 0,t.isDataOptions=a,t.isDataOptionGroups=h,t.Select=S;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importStar(e(14041)),c=e(54713),p=e(50708);e(11110);const v=({value:w,children:T,disabled:D,onClick:I,className:O,...M})=>o.default.createElement("span",{...M,className:(0,r.default)(O,{"kt-option-disabled":D}),onClick:()=>I&&!D&&I(w)},T);t.Option=v;function m(...w){}function _(w,T){return T?w.props[T]:w.props.value}function s(w,T){let D=[];return Array.isArray(w)?D=o.default.Children.toArray(w).map(T):D=[T(w)],D}function f(w,T,D=(I,O)=>I===O){const O=o.default.Children.toArray(T).filter(M=>o.default.isValidElement(M)).find(M=>{var R;return M.props&&D((R=M.props)===null||R===void 0?void 0:R.value,w)?M:null});return O?.props}function a(w){return w?w.length===0?!0:u(w[0]):!1}function h(w){return w?w.length===0?!0:d(w[0]):!1}function u(w){return w.value!==void 0}function d(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 g({group:w,index:T}){return o.default.createElement("div",{key:"header_"+T,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 l(w,T){let D=T.label;if(D===void 0)try{D=T.value.toString()}catch{D=void 0}return typeof D=="string"?D.indexOf(w)!==-1:!1}const y=o.default.memo(({selected:w,selectedRenderer:T})=>T?o.default.createElement(T,{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:T,placeholder:D,size:I="default"})=>o.default.createElement(p.Input,{className:"kt-select-search",value:w,size:I,onChange:O=>T(O.target.value),autoFocus:!0,placeholder:D||""}));function S({disabled:w,options:T,size:D="default",children:I,value:O,onChange:M,onMouseEnter:R,optionLabelProp:P,style:k,optionStyle:F,className:L,maxHeight:N,equals:j=(q,Re)=>q===Re,optionRenderer:W=E,groupTitleRenderer:U,footerComponent:X,headerComponent:V,showSearch:$=!1,filterOption:Y=l,searchPlaceholder:G="",emptyComponent:H,selectedRenderer:K,onBeforeShowOptions:Z,allowOptionsOverflow:Q,dropdownRenderType:oe="fixed",description:ne,notMatchWarning:he,onSearchChange:_e}){const[q,Re]=(0,o.useState)(!1),[ve,ie]=(0,o.useState)(""),fe=o.default.useRef(null),Me=o.default.useRef(null),Le=(0,o.useCallback)(Ae=>{Ae.preventDefault(),Ae.stopPropagation(),!(!q&&Z?.())&&Re(!q)},[q,Z]),Se=(0,o.useCallback)(()=>{var Ae,Ue,$e,Ve,lt,qe,Rt,nt,St;if(T&&a(T)){for(const it of T)if(j(O,it.value))return{iconClass:it.iconClass,label:it.label,value:it.value};return{iconClass:(Ae=T[0])===null||Ae===void 0?void 0:Ae.iconClass,label:(Ue=T[0])===null||Ue===void 0?void 0:Ue.label,value:($e=T[0])===null||$e===void 0?void 0:$e.value}}else if(T&&h(T)){for(const it of T)for(const st of it.options)if(j(O,st.value))return{iconClass:st.iconClass,label:st.label,value:st.value};return{iconClass:(lt=(Ve=T[0])===null||Ve===void 0?void 0:Ve.options[0])===null||lt===void 0?void 0:lt.iconClass,label:(Rt=(qe=T[0])===null||qe===void 0?void 0:qe.options[0])===null||Rt===void 0?void 0:Rt.label,value:(St=(nt=T[0])===null||nt===void 0?void 0:nt.options[0])===null||St===void 0?void 0:St.value}}else{const it=I&&f(O,I);if(it)return{label:it.label||it.value,value:it.value}}return{label:O,value:O,notMatch:!0}},[T,O,I])(),Ee=(0,r.default)("kt-select-options",{"kt-select-options-visible":q,[`kt-select-options-${D}`]:D}),ge=he&&Se.notMatch,xe=(0,r.default)("kt-select-value",{"kt-select-warning":ge,"kt-select-disabled":w,"kt-select-value-active":q,[`kt-select-value-${D}`]:D});function Te(Ae,Ue){var $e;if(!Ae)return null;(typeof Ae=="string"||typeof Ae=="number")&&(Ae=o.default.createElement(t.Option,{value:Ae,label:String(Ae),key:`${Ae}_${Ue}`},Ae));const Ve=Ae,lt=(($e=Ve.props)===null||$e===void 0?void 0:$e.disabled)||!1;return o.default.createElement("div",{key:`${Ve.props.value}_${Ue}`,className:(0,r.default)({"kt-select-option-select":O===Ve.props.value}),onMouseEnter:()=>R?.(Ve.props.value,Ue),onClick:lt?m:()=>{Re(!1),M&&M(_(Ae,P))}},Ae)}(0,o.useEffect)(()=>{!q&&ve&&ie("")},[]),(0,o.useEffect)(()=>{if(!q)return;const Ae=Ue=>{fe.current&&!fe.current.contains(Ue.target)&&Re(!1)};return document.addEventListener("click",Ae),()=>document.removeEventListener("click",Ae)},[q]);const Fe=(0,o.useCallback)(()=>{if(!fe.current||!Me.current)return;const Ae=fe.current.getBoundingClientRect(),Ue=Me.current;Q?(Ue.style.minWidth=`${Ae.width}px`,Ue.style.maxWidth=`${window.innerWidth-Ae.left-4}px`):Ue.style.width=`${Ae.width}px`;const $e=window.innerHeight-Ae.bottom-50,Ve=Ue.clientHeight;$e<Ve?Ue.style.bottom=`${Ae.height+4}px`:(Ue.style.maxHeight=`${$e}px`,Ue.style.bottom="auto"),Ue.style.position=oe},[Q,oe]);(0,o.useEffect)(()=>{if(q)return Fe(),window.addEventListener("resize",Fe),()=>window.removeEventListener("resize",Fe)},[q,Fe]);const pe=(0,o.useMemo)(()=>ve?a(T)?T.filter(Ae=>Y(ve,Ae)):h(T)?T.reduce((Ae,Ue)=>{const $e=Ue.options.filter(Ve=>Y(ve,Ve,Ue));return $e.length&&Ae.push({...Ue,options:$e}),Ae},[]):T:T,[T,ve,Y]),re=()=>o.default.createElement(o.default.Fragment,null,o.default.createElement(y,{selected:Se,selectedRenderer:K}),o.default.createElement(c.Icon,{iconClass:(0,r.default)((0,c.getIcon)("down"),"kt-select-value-default-icon")})),ue=(0,o.useCallback)(Ae=>{ie(Ae),_e?.(Ae)},[ve,_e]),Oe=()=>o.default.createElement(b,{value:ve,onChange:ue,placeholder:G});return o.default.createElement("div",{className:(0,r.default)("kt-select-container",L),ref:fe},o.default.createElement("div",{className:xe,onClick:Le,style:k},$&&q?Oe():re()),ge&&o.default.createElement("div",{className:"kt-select-warning-text"},he),q&&!ve&&(a(pe)||h(pe)?o.default.createElement(t.SelectOptionsList,{optionRenderer:W,options:pe,equals:j,optionStyle:F,currentValue:O,size:D,onSelect:Ae=>{M&&M(Ae),Re(!1)},groupTitleRenderer:U,className:Ee,style:{maxHeight:`${N}px`},ref:Me,footerComponent:X,headerComponent:V,emptyComponent:H}):o.default.createElement("div",{className:Ee,style:{maxHeight:`${N}px`},ref:Me},T&&T.map((Ae,Ue)=>Te(Ae,Ue)),I&&s(I,Te),ne&&o.default.createElement(A,{text:ne}),o.default.createElement("div",{className:"kt-select-overlay",onClick:Le}))))}function A({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,T)=>{const{options:D,optionRenderer:I=E,equals:O=(H,K)=>H===K,onSelect:M,currentValue:R,optionStyle:P,size:k,className:F,style:L,groupTitleRenderer:N=g,renderCheck:j,headerComponent:W,footerComponent:U,emptyComponent:X}=w,V=(0,r.default)("kt-select-options",{[`kt-select-options-${k}`]:!0},F);function $(H){return H.map((K,Z)=>{const Q=o.default.createElement(N,{group:K,index:Z});return o.default.createElement(o.default.Fragment,{key:"group_"+Z},Q,Y(K.options))})}function Y(H){return H&&H.map((K,Z)=>{const Q=O(R,K.value);return o.default.createElement(t.Option,{value:Z,key:Z,className:(0,r.default)({"kt-select-option-select":Q,"kt-select-option-default":!0,"kt-option-with-check":j}),onClick:()=>M(K.value),style:P},j&&O(R,K.value)?o.default.createElement("div",{className:"kt-option-check"},o.default.createElement(c.Icon,{icon:"check"})):void 0,o.default.createElement(I,{data:K,isCurrent:Q}))})}let G;return h(D)?G=D.filter(H=>H.options.length>0).length===0:G=D.length===0,o.default.createElement("div",{className:V,style:L,ref:T,onClick:H=>{H.stopPropagation()}},W?o.default.createElement(W,null):null,G&&X?o.default.createElement(X,null):(h(D)?$(D):Y(D))||X&&o.default.createElement(X,null),U?o.default.createElement(U,null):null)})},54076:(x,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 c=p=>{const{tabs:v,className:m,value:_,onChange:s,mini:f,style:a,...h}=p,u=o.default.useCallback(d=>{typeof s=="function"&&s(d)},[]);return o.default.createElement("div",{...h,style:a,className:(0,r.default)("kt-tabs",m,{"kt-tabs-mini":f})},v.map((d,E)=>{const g=E===_?"kt-tab-selected":"";return typeof d=="string"?o.default.createElement("div",{key:E,className:(0,r.default)("kt-tab",g,{"kt-mini-tab":f}),onClick:u.bind(null,E)},d):o.default.createElement("div",{key:E,className:(0,r.default)("kt-custom-tab",g,{"kt-mini-tab":f}),onClick:u.bind(null,E)},d)}))};t.Tabs=c},72871:(x,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 c=({title:p,children:v,delay:m})=>{const[_,s]=(0,o.useState)(!1),f=(0,o.useRef)(null),a=(0,o.useRef)(null),h=(0,o.useRef)(null),u=(0,o.useRef)(null);(0,o.useEffect)(()=>()=>clearTimeout(u.current),[]);function d(){if(_){u.current&&clearTimeout(u.current);return}u.current=setTimeout(()=>{if(s(!0),a.current&&f.current&&h.current){const{x:g,y:l,width:y,height:b}=f.current.getBoundingClientRect(),S=a.current.getBoundingClientRect();l<S.height*1.5?(h.current.className+=" kt-tooltip-reverse-arrow",a.current.style.top=`${l+b+S.height/2}px`):a.current.style.top=`${l-S.height*1.5}px`,g+S.width/2>=document.body.offsetWidth?(h.current.style.right=`${y/2-7}px`,a.current.style.left=`${g+y-S.width}px`):g-S.width/2<=0?(h.current.style.left=`${y/2-7}px`,a.current.style.left=`${g}px`):(h.current.style.left=`${S.width/2-7}px`,a.current.style.left=`${g+y/2-S.width/2}px`)}clearTimeout(u.current)},m||500)}function E(){u.current&&clearTimeout(u.current),s(!1)}return o.default.createElement("p",{ref:f,className:"kt-tooltip-wrapper",onMouseEnter:d,onMouseLeave:E},v,_&&o.default.createElement("span",{ref:a,className:(0,r.default)("kt-tooltip-content")},p,o.default.createElement("span",{ref:h,className:"kt-tooltip-arrow-placeholder"})))};t.Tooltip=c},40604:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Deprecated=c;const n=e(85608),r=n.__importDefault(e(14041)),o=n.__importDefault(e(65973));function c(p,v){return m=>(r.default.useEffect(()=>{(0,o.default)(!1,`${p.displayName||p.name} is deprecated: ${v}`)},[]),r.default.createElement(p,m))}},84605:(x,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:(x,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=(v,m,_)=>{if(!_)return n.marked.parse(v,m);m?n.marked.parse(v,m,_):n.marked.parse(v,_)};t.parseMarkdown=o;const c=(v,m)=>(0,n.marked)(v,m);t.toMarkdownHtml=c;const p=v=>(v.type==="escape"&&(v.text=v.raw),v);t.parseWithoutEscape=p},2835:(x,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:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.wrapperRaf=p;const r=e(85608).__importDefault(e(10719));let o=0;const c={};function p(v,m=1){const _=o++;let s=m;function f(){s-=1,s<=0?(v(),delete c[_]):c[_]=(0,r.default)(f)}return c[_]=(0,r.default)(f),_}p.cancel=function(m){m!==void 0&&(r.default.cancel(c[m]),delete c[m])},p.ids=c},43953:(x,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:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.warning=n,t.note=r,t.resetWarned=o,t.call=c,t.warningOnce=p,t.noteOnce=v;let e={};function n(m,_){}function r(m,_){}function o(){e={}}function c(m,_,s){!_&&!e[s]&&(m(!1,s),e[s]=!0)}function p(m,_){c(n,m,_)}function v(m,_){c(r,m,_)}t.default=p},91802:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VirtualList=void 0;const r=e(85608).__importStar(e(14041)),o=e(24241),c=e(77011),p=({data:v,className:m,template:_,refSetter:s,onRangeChanged:f})=>{const a=(0,r.useRef)(null);return(0,r.useEffect)(()=>{s?.(a.current)},[a.current]),r.default.createElement(c.Scrollbars,{thumbSize:0},r.default.createElement(o.Virtuoso,{rangeChanged:h=>{f?.(h)},overscan:20,ref:a,style:{height:"100%"},className:m,data:v,itemContent:(h,u)=>r.default.createElement(_,{index:h,data:u})}))};t.VirtualList=p},18740:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),e(85608).__exportStar(e(59019),t)},59019:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WSChannelHandler=void 0;const n=e(40396),r=e(43718),o=e(54558),c=e(47561);class p{onChannelCreated(m,_){return this._onChannelCreatedEmitter.on(m,_)}constructor(m,_,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=_,this.LOG_TAG=`[WSChannelHandler] [client-id:${this.clientId}]`;const f=s.serializer||o.furySerializer;this.wrappedConnection=(0,o.wrapSerializer)(this.connection,f)}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(_=>{switch(this.heartbeatMessage(),_.kind){case"pong":break;default:{const s=this.channelMap.get(_.id);s?s.dispatch(_):this.logger.warn(this.LOG_TAG,`channel ${_.id} not found`)}}});const m=()=>{this.channelMap.size>0&&this.channelMap.forEach(_=>{_.open(_.channelPath,this.clientId)})};this.connection.onClose((_,s)=>{this.channelMap.forEach(f=>{f.close(_,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 _=this.fillKey(m);this.channelMap.has(_)&&(this.channelMap.get(_).dispose(),this.logger.log(this.LOG_TAG,`channel ${_} already exists, dispose it`));const s=new c.WSChannel(this.wrappedConnection,{id:_,logger:this.logger,ensureServerReady:!0});this.channelMap.set(s.id,s),this._onChannelCreatedEmitter.emit(m,s);let f=0;s.onOpen(()=>{f++,f>1?(s.fireReopen(),this.logger.log(this.LOG_TAG,`channel reconnect ${this.clientId}:${s.channelPath}, count: ${f}`)):this.logger.log(this.LOG_TAG,`channel open ${this.clientId}:${s.channelPath}`);const u=this.channelCloseEventMap.get(s.id);u&&(u.forEach(d=>{this.reporterService&&this.reporterService.point(r.REPORT_NAME.CHANNEL_RECONNECT,r.REPORT_NAME.CHANNEL_RECONNECT,d)}),this.channelCloseEventMap.delete(s.id))}),s.onClose((u,d)=>{this.channelCloseEventMap.set(s.id,{channelPath:m,closeEvent:{code:u,reason:d},connectInfo:navigator.connection}),this.logger.log(this.LOG_TAG,`channel ${m} closed, code: ${u}, reason: ${d}`)});const a=new r.Deferred,h=s.onOpen(()=>{a.resolve(),h.dispose()});return s.open(m,this.clientId),await a.promise,s}dispose(){this.heartbeatMessageTimer&&clearTimeout(this.heartbeatMessageTimer),this._disposables.dispose()}awaitChannelReady(m){const _=this.getChannel(m),s=new r.Deferred;if(_)_.onServerReady(()=>{s.resolve()});else{const f=this.onChannelCreated(m,a=>{a.onServerReady(()=>{s.resolve()}),f.dispose()})}return s.promise}}t.WSChannelHandler=p},98710:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Cursor=t.Buffers=t.buffer4Capacity=t.emptyBuffer=void 0,t.copy=e,t.emptyBuffer=new Uint8Array(0),t.buffer4Capacity=new Uint8Array(4);function e(o,c,p,v,m){c.set(o.subarray(v,m),p)}class n{constructor(){this.buffers=[],this.size=0}get byteLength(){return this.size}push(c){this.buffers.push(c),this.size+=c.length}unshift(c){this.buffers.unshift(c),this.size+=c.length}slice(c,p){const v=this.buffers;if(p===void 0&&(p=this.size),c===void 0&&(c=0),p>this.size&&(p=this.size),c>=p)return t.emptyBuffer;let m=0,_=0;for(;_<v.length&&m+v[_].length<=c;_++)m+=v[_].length;const s=new Uint8Array(p-c);let f=0;for(let a=_;f<p-c&&a<v.length;a++){const h=v[a].length,u=f===0?c-m:0,d=f+h>=p-c?Math.min(u+(p-c)-f,h):h;e(v[a],s,f,u,d),f+=d-u}return s}slice4(c){let p=c+4;const v=this.buffers;if(p>this.size&&(p=this.size),c>=p)return t.emptyBuffer;let m=0,_=0;for(;_<v.length&&m+v[_].length<=c;_++)m+=v[_].length;const s=t.buffer4Capacity;let f=0;for(let a=_;f<p-c&&a<v.length;a++){const h=v[a].length,u=f===0?c-m:0,d=f+h>=p-c?Math.min(u+(p-c)-f,h):h;e(v[a],s,f,u,d),f+=d-u}return s}pos(c){if(c<0||c>=this.size)throw new Error(`out of range, ${c} not in [0, ${this.size})`);let p=c,v=0,m=null;for(;;){if(m=this.buffers[v],p<m.length)return{buf:v,offset:p};p-=m.length,v++}}copy(c,p=0,v=0,m=this.size){return e(this.slice(v,m),c,p,0,m-v)}splice(c,p,...v){const m=this.buffers,_=c>=0?c:this.size-c;p===void 0?p=this.size-_:p>this.size-_&&(p=this.size-_);for(const h of v)this.size+=h.length;const s=new n;let f=0,a=0;for(;a<m.length&&f+m[a].length<_;a++)f+=m[a].length;if(_-f>0){const h=_-f;if(h+p<m[a].length){s.push(m[a].slice(h,h+p));const u=m[a],d=new Uint8Array(h);for(let g=0;g<h;g++)d[g]=u[g];const E=new Uint8Array(u.length-h-p);for(let g=h+p;g<u.length;g++)E[g-p-h]=u[g];if(v.length>0){const g=v.slice();g.unshift(d),g.push(E),m.splice.apply(m,[a,1,...g]),a+=g.length,v=[]}else m.splice(a,1,d,E),a+=2}else s.push(m[a].slice(h)),m[a]=m[a].slice(0,h),a++}for(v.length>0&&(m.splice.apply(m,[a,0,...v]),a+=v.length);s.byteLength<p;){const h=m[a],u=h.length,d=Math.min(u,p-s.byteLength);d===u?(s.push(h),m.splice(a,1)):(s.push(h.slice(0,d)),m[a]=m[a].slice(d))}return this.size-=s.byteLength,s}get(c){const{buf:p,offset:v}=this.pos(c);return this.buffers[p][v]}set(c,p){const{buf:v,offset:m}=this.pos(c);this.buffers[v][m]=p}cursor(c=0){return new r(this,c)}dispose(){this.buffers=[],this.size=0}}t.Buffers=n;class r{constructor(c,p=0){this.buffers=c,this.offset=p,this.chunkIndex=0,this.chunkOffset=0,this.updatePosition()}updatePosition(){if(this.offset===0){this.chunkIndex=0,this.chunkOffset=0;return}const{buf:c,offset:p}=this.buffers.pos(this.offset);this.chunkIndex=c,this.chunkOffset=p}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 c=this.buffers.buffers[this.chunkIndex],p=c.byteLength;for(;this.chunkOffset<p;){const v=c[this.chunkOffset];this.chunkOffset++,this.offset++,yield v}this.chunkOffset=0,this.chunkIndex++}}read(c){const p=this.offset+c,v=this.buffers.slice(this.offset,p);return this.skip(c),v}read4(){const c=this.buffers.slice4(this.offset);return this.skip(4),c}skip(c){let p=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++,++p===c)return;this.chunkOffset=0,this.chunkIndex++}}moveTo(c){this.offset=c,this.updatePosition()}dispose(){this.buffers=null,this.offset=0}reset(){this.offset=0,this.chunkIndex=0,this.chunkOffset=0}}t.Cursor=r},30613:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Capturer=t.ResponseStatus=t.MessageType=void 0,t.getCapturer=v;const n=e(43718),r=e(65265);var o;(function(_){_.SendNotification="sendNotification",_.SendRequest="sendRequest",_.RequestResult="requestResult",_.OnNotification="onNotification",_.OnRequest="onRequest",_.OnRequestResult="onRequestResult"})(o||(t.MessageType=o={}));var c;(function(_){_.Success="success",_.Fail="fail"})(c||(t.ResponseStatus=c={}));const p=typeof e.g>"u"?typeof window>"u"?{__OPENSUMI_DEVTOOLS_GLOBAL_HOOK__:void 0}:window:e.g;function v(){const _=p.__OPENSUMI_DEVTOOLS_GLOBAL_HOOK__;if(_)return _.captureRPC}class m{constructor(s){this.source=s,this._disposables=new n.DisposableStore,this.capturer=null,this.setupListener=f=>{const{command:a}=f.detail;a===r.DevtoolsLantencyCommand.Start?this.capturer=v():a===r.DevtoolsLantencyCommand.Stop&&(this.capturer=null)},this.prefix=(0,n.randomString)(6),this.capturer=v(),typeof p.addEventListener=="function"&&(p.addEventListener(r.EDevtoolsEvent.Latency,this.setupListener),this._disposables.add({dispose:()=>{p.removeEventListener(r.EDevtoolsEvent.Latency,this.setupListener)}}))}capture(s){if(!this.capturer)return;const f={...s,source:this.source};f.data&&(0,n.isUint8Array)(f.data)&&(f.data="<Uint8Array>"),s.requestId&&(f.requestId=`${this.prefix}-${s.requestId}`),s.error&&(f.error=(0,n.transformErrorForSerialization)(s.error)),this.capturer(f)}captureOnRequest(s,f,a){this.capturer&&this.capture({type:o.OnRequest,requestId:`\u2193${s}`,serviceMethod:f,arguments:a})}captureOnRequestResult(s,f,a){this.capturer&&this.capture({type:o.OnRequestResult,status:c.Success,requestId:`\u2193${s}`,serviceMethod:f,data:a})}captureOnRequestFail(s,f,a){this.capturer&&this.capture({type:o.OnRequestResult,status:c.Fail,requestId:`\u2193${s}`,serviceMethod:f,error:a})}captureSendRequest(s,f,a){this.capturer&&this.capture({type:o.SendRequest,requestId:s,serviceMethod:f,arguments:a})}captureSendRequestResult(s,f,a){this.capturer&&this.capture({type:o.RequestResult,status:c.Success,requestId:s,serviceMethod:f,data:a})}captureSendRequestFail(s,f,a){this.capturer&&this.capture({type:o.RequestResult,status:c.Fail,requestId:s,serviceMethod:f,error:a})}captureSendNotification(s,f,a){this.capturer&&this.capture({type:o.SendNotification,serviceMethod:f,arguments:a,requestId:s})}captureOnNotification(s,f,a){this.capturer&&this.capture({type:o.OnNotification,serviceMethod:f,arguments:a,requestId:`\u2193${s}`})}dispose(){this._disposables.dispose()}}t.Capturer=m},29433:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),e(85608).__exportStar(e(39048),t)},39048:(x,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:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.initRPCService=c,t.createRPCService=p,t.getRPCService=v;const n=e(85608),r=e(62199),o=e(8140);function c(m){return{createRPCService:(_,s)=>{const f=p(_,m);return s&&f.onRequestService(s),f},getRPCService:_=>v(_,m)}}function p(m,_){return new r.RPCServiceStub(m,_,o.ServiceType.Service).getProxy()}function v(m,_){return new r.RPCServiceStub(m,_,o.ServiceType.Stub).getProxy()}n.__exportStar(e(62199),t)},35821:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BaseConnection=void 0;class e{}t.BaseConnection=e},57358:(x,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]);const c=4;class p{constructor(){this.buffers=new o.Buffers,this.cursor=this.buffers.cursor(),this.processingPromise=null,this.contentLength=-1,this.state=0}onData(m){return this._onDataListener=m,{dispose:()=>{this._onDataListener=null}}}reset(){this.contentLength=-1,this.state=0,this.cursor.reset()}push(m){this.buffers.push(m),this.processingPromise||(this.processingPromise=this.processBuffers().finally(()=>{this.processingPromise=null}))}async processBuffers(){let m=0,_=!1;do{for(_=!1;m<p.MAX_ITERATIONS&&!(this.buffers.byteLength===0||await this.readFrame()===!0);)m++,m%10===0&&await new Promise(f=>setTimeout(f,0));this.buffers.byteLength>0&&(_=!0,await new Promise(s=>setImmediate(s)),m=0)}while(_)}async readFrame(){try{if(!this.readLengthField())return!0;const _=this.cursor.offset,s=_+this.contentLength;if(s>this.buffers.byteLength)return!0;const f=this.buffers.slice(_,s);if(this.buffers.splice(0,s),this.reset(),this._onDataListener)try{await Promise.resolve().then(()=>{var a;return(a=this._onDataListener)===null||a===void 0?void 0:a.call(this,f)})}catch(a){console.error("[Frame Decoder] Error in data listener:",a)}return!1}catch(m){return console.error("[Frame Decoder] Error processing frame:",m),this.reset(),!0}}readLengthField(){const m=this.buffers.byteLength;if(this.state!==4){if(this.cursor.offset+t.indicator.length>m)return!1;this.readIndicator()}if(this.state!==4)return!1;if(this.contentLength===-1){if(this.cursor.offset+c>m)return!1;const _=this.cursor.read4();this.contentLength=(0,r.readUInt32LE)(_,0)}return!(this.cursor.offset+this.contentLength>m)}readIndicator(){const m=this.cursor.iterator();let _=m.next();for(;!_.done;){switch(_.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,m.return();break;default:this.state=0;break}break;default:this.state=0;break}_=m.next()}}dispose(){this._onDataListener=null,this.buffers.dispose(),this.reset()}static construct(m){const _=(0,n.BinaryWriter)({});try{return _.buffer(t.indicator),_.uint32(m.byteLength),_.buffer(m),_}catch(s){throw console.warn("[Frame Decoder] Error constructing frame:",s),s}}}t.LengthFieldBasedFrameDecoder=p,p.MAX_ITERATIONS=50},34982:(x,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:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MessagePortConnection=void 0;const n=e(35821);class r extends n.BaseConnection{constructor(c){super(),this.port=c,c.start()}send(c){this.port.postMessage(c)}onMessage(c){const p=v=>{c(v.data)};return this.port.addEventListener("message",p),{dispose:()=>{this.port.removeEventListener("message",p)}}}onceClose(c){return this.port.addEventListener("close",c),{dispose:()=>{this.port.addEventListener("close",c)}}}dispose(){}}t.MessagePortConnection=r},71056:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NodeMessagePortConnection=void 0;const n=e(35821);class r extends n.BaseConnection{constructor(c){super(),this.port=c}send(c){this.port.postMessage(c)}onMessage(c){return this.port.on("message",c),{dispose:()=>{this.port.off("message",c)}}}onceClose(c){return this.port.once("close",c),{dispose:()=>{this.port.off("close",c)}}}dispose(){this.port.removeAllListeners()}}t.NodeMessagePortConnection=r},91493:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ReconnectingWebSocketConnection=void 0;const r=e(85608).__importDefault(e(31133)),o=e(91676),c=e(35821),p=e(57358);class v extends c.BaseConnection{constructor(_){if(super(),this.socket=_,this.decoder=new p.LengthFieldBasedFrameDecoder,this.sendQueue=[],this.sending=!1,this.arrayBufferHandler=s=>{const f=s.data;this.decoder.push(new Uint8Array(f,0,f.byteLength))},_.binaryType==="arraybuffer")this.socket.addEventListener("message",this.arrayBufferHandler);else if(_.binaryType==="blob")throw new Error("blob is not implemented")}async processSendQueue(){if(!this.sending){for(this.sending=!0;this.sendQueue.length>0;){const{data:_,resolve:s,reject:f}=this.sendQueue[0];let a=null;try{a=p.LengthFieldBasedFrameDecoder.construct(_).dumpAndOwn();const h=a.get();for(let u=0;u<h.byteLength;u+=o.chunkSize)await new Promise(d=>{const E=h.subarray(u,Math.min(u+o.chunkSize,h.byteLength));this.socket.send(E),d()});s()}catch(h){console.error("[ReconnectingWebSocket] Error sending data:",h),f(h)}finally{a&&a.dispose()}this.sendQueue.shift()}this.sending=!1}}send(_){return new Promise((s,f)=>{this.sendQueue.push({data:_,resolve:s,reject:f}),this.processSendQueue()})}isOpen(){return this.socket.readyState===this.socket.OPEN}onOpen(_){return this.socket.addEventListener("open",_),{dispose:()=>{this.socket.removeEventListener("open",_)}}}onMessage(_){return this.decoder.onData(_)}onceClose(_){const s=this.onClose(f);return{dispose:()=>{s.dispose()}};function f(a,h){_(a,h),s.dispose()}}onClose(_){const s=f=>{_(f.code,f.reason)};return this.socket.addEventListener("close",s),{dispose:()=>{this.socket.removeEventListener("close",s)}}}onError(_){const s=f=>{_(f.error)};return this.socket.addEventListener("error",s),{dispose:()=>{this.socket.removeEventListener("error",s)}}}dispose(){this.socket.removeEventListener("message",this.arrayBufferHandler),this.sendQueue=[],this.sending=!1}static forURL(_,s,f){const a=new r.default(_,s,f);return a.binaryType="arraybuffer",new v(a)}}t.ReconnectingWebSocketConnection=v},57625:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NetSocketConnection=void 0;const n=e(36932);class r extends n.StreamConnection{constructor(c){super(c,c),this.socket=c}isOpen(){return this.socket.readyState==="open"}onOpen(c){return this.socket.on("connect",c),{dispose:()=>{this.socket.off("connect",c)}}}destroy(){this.socket.destroy()}}t.NetSocketConnection=r},36932:(x,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(p,v){super(),this.readable=p,this.writable=v,this.decoder=new r.LengthFieldBasedFrameDecoder;const m=_=>{this.decoder.push(_)};this.readable.on("data",m),this.readable.once("close",()=>{this.decoder.dispose(),this.readable.off("data",m)})}send(p){const v=r.LengthFieldBasedFrameDecoder.construct(p).dumpAndOwn();try{this.writable.write(v.get(),m=>{m&&console.error("Failed to write data:",m)})}finally{v.dispose()}}onMessage(p){return this.decoder.onData(p)}onceClose(p){const v=this.onClose(m);return{dispose:()=>{v.dispose()}};function m(_,s){p(_,s),v.dispose()}}onClose(p){const v=m=>{p(m?1:0,m?"had error":"")};return this.readable.on("close",v),this.writable!==this.readable&&this.writable.on("close",v),{dispose:()=>{this.readable.off("close",v),this.writable!==this.readable&&this.writable.off("close",v)}}}onError(p){return this.readable.on("error",p),this.writable!==this.readable&&this.writable.on("error",p),{dispose:()=>{this.readable.off("error",p),this.writable!==this.readable&&this.writable.off("error",p)}}}dispose(){this.decoder.dispose()}}t.StreamConnection=o},15272:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WSWebSocketConnection=void 0;const n=e(91676),r=e(35821),o=e(57358);class c extends r.BaseConnection{constructor(v){super(),this.socket=v,this.decoder=new o.LengthFieldBasedFrameDecoder,this.sendQueue=[],this.pendingSize=0,this.sending=!1,this.socket.on("message",m=>{this.decoder.push(m)})}async processSendQueue(){if(!this.sending){for(this.sending=!0;this.sendQueue.length>0;){const{data:v,resolve:m,reject:_}=this.sendQueue[0];let s=null;try{s=o.LengthFieldBasedFrameDecoder.construct(v).dumpAndOwn();const f=s.get();for(let a=0;a<f.byteLength;a+=n.chunkSize){if(!this.isOpen())throw new Error("Connection closed while sending");await new Promise((h,u)=>{const d=f.subarray(a,Math.min(a+n.chunkSize,f.byteLength));this.socket.send(d,{binary:!0},E=>{E?u(E):h()})})}m()}catch(f){_(f instanceof Error?f:new Error(String(f)))}finally{if(s)try{s.dispose()}catch(f){console.warn("[WSWebSocket] Error disposing handle:",f)}this.pendingSize-=this.sendQueue[0].data.byteLength,this.sendQueue.shift()}}this.sending=!1}}send(v){return new Promise((m,_)=>{if(this.sendQueue.length>=c.MAX_QUEUE_SIZE){_(new Error("Send queue full"));return}this.pendingSize+=v.byteLength,this.sendQueue.push({data:v,resolve:m,reject:_}),this.processSendQueue().catch(s=>{console.error("[WSWebSocket] Error processing queue:",s)})})}onMessage(v){return this.decoder.onData(v)}onceClose(v){return this.socket.once("close",v),{dispose:()=>{this.socket.off("close",v)}}}isOpen(){return this.socket.readyState===this.socket.OPEN}dispose(){for(this.socket.removeAllListeners();this.sendQueue.length>0;){const{reject:v}=this.sendQueue.shift();v(new Error("Connection disposed"))}this.pendingSize=0,this.sending=!1}}t.WSWebSocketConnection=c,c.MAX_QUEUE_SIZE=1e3},90750:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),e(85608).__exportStar(e(34982),t)},91676:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.chunkSize=t.METHOD_NOT_REGISTERED=void 0,t.METHOD_NOT_REGISTERED="$$METHOD_NOT_REGISTERED",t.chunkSize=1048576},89104:(x,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(v){v[v.String=0]="String",v[v.Buffer=1]="Buffer",v[v.Number=2]="Number",v[v.JSONObject=3]="JSONObject",v[v.BigInt=4]="BigInt",v[v.Array=5]="Array",v[v.Object=6]="Object",v[v.Undefined=7]="Undefined",v[v.Null=8]="Null",v[v.Boolean=9]="Boolean"})(r||(t.ProtocolType=r={}));class o{constructor(m,_,s){this.writer=m,this.reader=_,this.objectTransfer=s,this.deserialize=f=>(this.reader.reset(f),this.read()),this.serialize=f=>(this.writer.reset(),this.write(f),this.writer.dump())}write(m){var _;const{writer:s}=this,f=typeof m;switch(s.reserve(1),m){case null:s.uint8(r.Null);return;default:switch(f){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,(_=this.objectTransfer)===null||_===void 0?void 0:_.replacer)));break;default:throw new Error(`Unknown type ${f}`)}}}read(){var m;const{reader:_}=this,s=_.uint8();switch(s){case r.Undefined:return;case r.Null:return null;case r.String:return _.stringOfVarUInt32();case r.Buffer:{const f=_.varUInt32();return _.buffer(f)}case r.Number:return _.double();case r.JSONObject:{const f=_.stringOfVarUInt32();return JSON.parse(f,(m=this.objectTransfer)===null||m===void 0?void 0:m.reviver)}case r.BigInt:return _.int64();case r.Array:{const f=_.varUInt32(),a=[];for(let h=0;h<f;h++)a.push(this.read());return a}case r.Boolean:return _.uint8()===1;default:throw new Error(`Unknown type ${s}`)}}}t.AnySerializer=o;var c;(function(v){v.CODE_URI="CodeURI",v.BUFFER="Buffer"})(c||(c={}));class p{static replacer(m,_){if(_){switch(_.$mid){case 1:{const s=n.Uri.revive(_);return{$type:c.CODE_URI,data:s.toString()}}}if(_ instanceof Uint8Array||_ instanceof Uint32Array||_ instanceof Uint16Array)return{$type:"Buffer",data:Array.from(_)};if(_ instanceof ArrayBuffer)return{$type:"Buffer",data:Array.from(new Uint8Array(_))};if(_.type==="Buffer")return{$type:"Buffer",data:_.data}}return _}static reviver(m,_){if(_&&_.$type!==void 0&&_.data!==void 0)switch(_.$type){case c.CODE_URI:return n.Uri.parse(_.data);case c.BUFFER:return Uint8Array.from(_.data)}return _}}t.ExtObjectTransfer=p},94846:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.oneOf=void 0;const n=e(26246),r=e(4405),o=8,c=(p,v)=>{v||(v=(0,r.furyFactory)());const{fury:m,reader:_,writer:s}=v,f=new Array(o),a=new Array(o),h={};return p.forEach((E,g)=>{const l=E.options.tag;f[g]=(0,n.generateSerializer)(m,E),a[g]=l,h[l]=g}),{deserialize:E=>{_.reset(E);const g=_.uint8();let l;switch(g){case 0:l=f[0].read();break;case 1:l=f[1].read();break;case 2:l=f[2].read();break;case 3:l=f[3].read();break;case 4:l=f[4].read();break;case 5:l=f[5].read();break;case 6:l=f[6].read();break;case 7:l=f[7].read();break;default:throw new Error("unknown index: "+g)}return l.kind=a[g],l},serialize:E=>{const g=h[E.kind];switch(s.reset(),s.uint8(g),g){case 0:f[0].write(E);break;case 1:f[1].write(E);break;case 2:f[2].write(E);break;case 3:f[3].write(E);break;case 4:f[4].write(E);break;case 5:f[5].write(E);break;case 6:f[6].write(E);break;case 7:f[7].write(E);break}return s.dump()}}};t.oneOf=c},4405:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.furyFactory=void 0;const r=e(85608).__importDefault(e(97419)),o=c=>{const p=new r.default(c),v=p.binaryReader,m=p.binaryWriter;return{fury:p,reader:v,writer:m}};t.furyFactory=o},25285:(x,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:(x,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:(x,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:(x,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:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RPCServiceCenter=void 0,t.getNotificationName=s,t.getRequestName=f,t.getMethodName=a;const n=e(43718),r=e(96068),o=e(91676),c=e(8140),p=e(66748),v=e(92408),m=200;class _{constructor(u,d){this.bench=u,this._disposables=new n.DisposableStore,this.proxies=[],this.serviceRegistry=this._disposables.add(new v.ServiceRegistry),this.protocolRegistry=this._disposables.add(new v.ProtocolRegistry),this.deferred=new n.Deferred,this._reportThreshold=m,this.uid=(0,n.randomString)(6),this.logger=d||console}setReporter(u,d=m){this._reporterService=u,this._reportThreshold=d}registerService(u,d){d===c.ServiceType.Service&&this.bench&&this.bench.registerService(u)}ready(){return this.deferred.promise}loadProtocol(u){this.protocolRegistry.addProtocol(u,{nameConverter:d=>a(u.name,d)})}setSumiConnection(u){this.proxies.length===0&&this.deferred.resolve(),this.protocolRegistry.applyTo(u.io);const d=new p.ProxySumi(this.serviceRegistry,this.logger);d.listen(u);const E=(0,r.addElement)(this.proxies,d);return{dispose:()=>{E.dispose(),d.dispose()}}}setConnection(u){this.proxies.length===0&&this.deferred.resolve();const d=new p.ProxyJson(this.serviceRegistry,this.logger);d.listen(u);const E=(0,r.addElement)(this.proxies,d);return{dispose:()=>{E.dispose(),d.dispose()}}}onRequest(u,d,E){this.serviceRegistry.register(a(u,d),E)}onRequestService(u,d){this.serviceRegistry.registerService(d,{nameConverter:E=>a(u,E)})}async broadcast(u,d,...E){await this.ready();const g=a(u,d);let l;this._reporterService&&(l=this._reporterService.time(n.REPORT_NAME.RPC_TIMMING_MEASURE));const y=await Promise.all(this.proxies.map(A=>A.invoke(g,...E))),b=[],S=[];for(const A of y)A===o.METHOD_NOT_REGISTERED?b.push(A):S.push(A);if(b.length>0&&this.logger.warn(`broadcast rpc \`${g}\` getting doubtful responses: ${b.join(",")}`),S.length===0)throw l&&l.timeEnd(g,{success:!1},{minimumReportThresholdTime:this._reportThreshold}),new Error(`broadcast rpc \`${g}\` error: no remote service can handle this call`);return l&&l.timeEnd(g,{success:!0},{minimumReportThresholdTime:this._reportThreshold}),S.length===1?S[0]:S}dispose(){this._disposables.dispose(),this.proxies.forEach(u=>u.dispose()),this.proxies=[]}}t.RPCServiceCenter=_;function s(h,u){return`on:${h}:${u}`}function f(h,u){return`${h}:${u}`}function a(h,u){return u.startsWith("on")?s(h,u):f(h,u)}},62199:(x,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:(x,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 c{constructor(v,m){this.registry=v,this.connectionPromise=new n.Deferred,this._disposables=new n.DisposableStore,this.logger=m||console,this.registry.onServicesUpdate(_=>{this.connection&&this.bindMethods(_)})}nextRequestId(){return String(o++)}listen(v){this.connection=v,this._disposables.add(this.connection),this.bindMethods(this.registry.methods()),v.listen(),this.connectionPromise.resolve()}listenService(v){this.registry.registerService(v)}dispose(){this._disposables.dispose()}getInvokeProxy(){return new Proxy(Object.create(null),{get:(v,m)=>typeof m!="string"?null:r.has(m)?Promise.resolve():(v[m]||(v[m]=(..._)=>this.invoke(m,..._)),v[m])})}}t.ProxyBase=c},66748:(x,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:(x,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 c extends o.ProxyBase{constructor(){super(...arguments),this.engine="json",this.capturer=this._disposables.add(new n.Capturer(this.engine))}bindMethods(v){for(const m of v)m.startsWith("on")?this.connection.onNotification(m,async(..._)=>{this.capturer.captureOnNotification("_",m,_);try{await this.registry.invoke(m,...this.serializeArguments(_))}catch(s){this.logger.warn(`notification exec ${m} error`,s)}}):this.connection.onRequest(m,async(..._)=>{const s=this.nextRequestId();this.capturer.captureOnRequest(s,m,_);try{const f=await this.registry.invoke(m,...this.serializeArguments(_));return this.capturer.captureOnRequestResult(s,m,f),{error:!1,data:f}}catch(f){return this.capturer.captureOnRequestFail(s,m,f),{error:!0,data:{message:f.message,stack:f.stack}}}})}async invoke(v,...m){await this.connectionPromise.promise;let _=!1;if(m.length===1&&Array.isArray(m[0])&&(_=!0),v.startsWith("on"))this.capturer.captureSendNotification("_",v,m),_?this.connection.sendNotification(v,[...m]):this.connection.sendNotification(v,...m);else{const s=this.nextRequestId();let f;_?f=this.connection.sendRequest(v,[...m]):f=this.connection.sendRequest(v,...m),this.capturer.captureSendRequest(s,v,m);const a=await f;if(a.error){const h=new Error(a.data.message);throw a.data.stack&&(h.stack=a.data.stack),this.capturer.captureSendRequestFail(s,v,a.data),h}else return this.capturer.captureSendRequestResult(s,v,a.data),a.data}}serializeArguments(v){const m=v[v.length-1];return v.length===2&&Array.isArray(v[0])&&Object.prototype.hasOwnProperty.call(m,"_isCancelled")?[...v[0],m]:v}listen(v){super.listen(v),this._disposables.add(v.onRequest(m=>{if(!this.registry.has(m)){const _=this.nextRequestId();this.capturer.captureOnRequest(_,m,[]);const s={data:r.METHOD_NOT_REGISTERED};return this.capturer.captureOnRequestFail(_,m,s.data),s}}))}}t.ProxyJson=c},16420:(x,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(p){for(const v of p)v.startsWith("on")?this.connection.onNotification(v,async(...m)=>{try{await this.registry.invoke(v,...m)}catch(_){this.logger.warn(`notification exec ${v} error`,_)}}):this.connection.onRequest(v,async(...m)=>await this.registry.invoke(v,...m))}async invoke(p,...v){if(await this.connectionPromise.promise,p.startsWith("on"))this.connection.sendNotification(p,...v);else return await this.connection.sendRequest(p,...v)}listen(p){super.listen(p),this._disposables.add(p.onRequestNotFound(()=>{throw n.METHOD_NOT_REGISTERED}))}}t.ProxySumi=o},92408:(x,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(v){const m=new Set;let _=v;do{const f=Object.getOwnPropertyNames(_);for(const a of f)r.has(a)||typeof v[a]=="function"&&m.add(a)}while(_=Object.getPrototypeOf(_));const s=Array.from(m);return s.sort(),s}class c{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,_){this.serviceMethodMap.set(m,_),this.emitter.fire([m])}registerService(m,_){const s=[],{nameConverter:f}=_||{},a=o(m);for(const h of a){let u=h;f&&(u=f(h)),this.serviceMethodMap.set(u,m[h].bind(m)),s.push(u)}this.emitter.fire(s)}has(m){return this.serviceMethodMap.has(m)}invoke(m,..._){return this.serviceMethodMap.get(m)(..._)}methods(){return Array.from(this.serviceMethodMap.keys())}dispose(){this._disposables.dispose()}}t.ServiceRegistry=c;class p{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,_){const s=[],{nameConverter:f}=_||{},{methods:a}=m;for(const h of a){let u=h.method;f&&(u=f(u)),this.protocolMap.set(u,{...h,method:u}),s.push(u)}this.emitter.fire(s)}applyTo(m){if(m.loadProtocolMethod){for(const _ of this.protocolMap.values())m.loadProtocolMethod(_);this._disposables.add(this.onProtocolUpdate(_=>{if(m.loadProtocolMethod)for(const s of _){const f=this.protocolMap.get(s);f&&m.loadProtocolMethod(f)}}))}}dispose(){this._disposables.dispose()}}t.ProtocolRegistry=p},68855:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RPCServiceStub=void 0;class e{constructor(r,o,c){this.serviceName=r,this.center=o,this.type=c,this.getProxy=()=>new Proxy(this,{get:(p,v)=>typeof v=="symbol"?Promise.resolve():(p[v]||(p[v]=(...m)=>this.broadcast(v,...m)),p[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:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SumiConnection=void 0;const n=e(43718),r=e(70392),o=e(93062),c=e(30613),p=e(90750),v=e(91676),m=e(48218),_=e(76339),s={},f={chunked:!0};class a{constructor(u,d={}){this.socket=u,this.options=d,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,d.logger?this.logger=d.logger:this.logger=(0,n.getDebugLogger)(),this.io=d.io||new _.MessageIO,this.capturer=new c.Capturer(d.name||"sumi"),this.disposable.add(this.capturer)}sendNotification(u,...d){const E=this._requestId++;this.capturer.captureSendNotification(E,u,d),this.socket.send(this.io.Notification(E,u,s,d))}sendRequest(u,...d){return new Promise((E,g)=>{const l=this._requestId++;if(this._callbacks.set(l,(b,S,A)=>{if(S){if(this.traceRequestError(l,u,d,S),S===v.METHOD_NOT_REGISTERED){E(S);return}g(S);return}this.capturer.captureSendRequestResult(l,u,A),E(A)}),this.options.timeout&&this.options.timeout!==-1){const b=setTimeout(()=>{this._handleTimeout(u,l)},this.options.timeout);this._reqTimeoutHandles.set(l,b)}const y=d.length&&r.CancellationToken.isCancellationToken(d[d.length-1])?d.pop():void 0;if(y&&y.isCancellationRequested)return Promise.reject((0,r.canceled)());y&&y.onCancellationRequested(()=>this.cancelRequest(l)),this.capturer.captureSendRequest(l,u,d),this.socket.send(this.io.Request(l,u,{cancelable:!!y||void 0},d))})}cancelRequest(u){this.socket.send(this.io.Cancel(u))}_handleTimeout(u,d){if(!this._callbacks.has(d)||!this._reqTimeoutHandles.has(d))return;const E=this._callbacks.get(d);this._callbacks.delete(d),this._reqTimeoutHandles.delete(d),E(s,new m.MethodTimeoutError(u))}onRequest(u,d){return this._requestHandlers.set(u,d),{dispose:()=>{this._requestHandlers.delete(u)}}}onRequestNotFound(u){return this._starRequestHandler=u,{dispose:()=>{this._starRequestHandler=void 0}}}onNotification(u,d){return this._notificationHandlers.set(u,d),{dispose:()=>{this._notificationHandlers.delete(u)}}}onNotificationNotFound(u){return this._starNotificationHandler=u,{dispose:()=>{this._starNotificationHandler=void 0}}}listen(){this.disposable.add(this.socket.onMessage(u=>{const d=this.io.parse(u),E=d.kind,g=d.requestId;switch(E===_.OperationType.Error&&this.logger.warn(`[${d.requestId}] Error received from server method ${d.method}: ${d.error}`),E){case _.OperationType.Error:case _.OperationType.Response:{const{headers:l,method:y}=d,b=d.error,S=d.result;this._reqTimeoutHandles.has(g)&&(clearTimeout(this._reqTimeoutHandles.get(g)),this._reqTimeoutHandles.delete(g));const A=(w,T,D)=>{const I=this._callbacks.get(g);if(!I){this.logger.error(`Cannot find callback for request ${g}: ${y}`);return}this._callbacks.delete(g),I(w,T,D)};if(l&&l.chunked){let w;if(this.activeRequestPool.has(g)?w=this.activeRequestPool.get(g):(w=new o.SumiReadableStream,this.activeRequestPool.set(g,w),A(l,void 0,w)),S===null){w.end(),this.activeRequestPool.delete(g);break}if(b){w.emitError(b);break}w.emitData(S);break}A(l,b,S);break}case _.OperationType.Notification:case _.OperationType.Request:{const{method:l,headers:y,args:b}=d;if(y.cancelable){const S=new r.CancellationTokenSource;this._cancellationTokenSources.set(g,S),b.push(S.token),this._knownCanceledRequests.has(g)&&(S.cancel(),this._knownCanceledRequests.delete(g))}switch(E){case _.OperationType.Request:{this.capturer.captureOnRequest(g,l,b);let S;try{let T;const D=this._requestHandlers.get(l);D?T=D(...b):this._starRequestHandler&&(T=this._starRequestHandler(l,b)),S=Promise.resolve(T)}catch(T){S=Promise.reject(T)}const A=T=>{this.capturer.captureOnRequestResult(g,l,T),(0,o.isReadableStream)(T)?(0,o.listenReadable)(T,{onData:D=>{this.socket.send(this.io.Response(g,l,f,D))},onEnd:()=>{this.socket.send(this.io.Response(g,l,f,null)),this._cancellationTokenSources.delete(g)},onError:D=>{this.socket.send(this.io.Error(g,l,f,D)),this._cancellationTokenSources.delete(g)}}):(this.socket.send(this.io.Response(g,l,s,T)),this._cancellationTokenSources.delete(g))},w=T=>{this.traceRequestError(g,l,b,T),this.socket.send(this.io.Error(g,l,s,T)),this._cancellationTokenSources.delete(g)};S.then(A).catch(w);break}case _.OperationType.Notification:{this.capturer.captureOnNotification(g,l,b);const S=this._notificationHandlers.get(l);S?S(...b):this._starNotificationHandler&&this._starNotificationHandler(l,b);break}}break}case _.OperationType.Cancel:{const l=this._cancellationTokenSources.get(g);l?l.cancel():this._knownCanceledRequests.add(g);break}default:break}}))}dispose(){this.disposable.dispose()}static forWSWebSocket(u,d={}){return new a(new p.WSWebSocketConnection(u),d)}static forNetSocket(u,d={}){return new a(new p.NetSocketConnection(u),d)}traceRequestError(u,d,E,g){this.capturer.captureSendRequestFail(u,d,g)}toJSON(){throw new Error(`You're trying to serialize a SumiConnection instance, which is not allowed.
30452
30434
  Please check your code, and remove the rpc proxy reference.`)}}t.SumiConnection=a},48218:(x,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:(x,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),c=e(89104),p=e(4405),v=1;var m;(function(d){d[d.Request=0]="Request",d[d.Notification=1]="Notification",d[d.Response=2]="Response",d[d.Cancel=3]="Cancel",d[d.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 _={Request:m.Request<<8|v,Notification:m.Notification<<8|v,Response:m.Response<<8|v,Cancel:m.Cancel<<8|v,Error:m.Error<<8|v};class s{constructor(E,g){this.fury=g;const l=[];for(const S of E.request)l.push(S.type);const y=n.Type.tuple(l);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 f{constructor(E,g,l){this.writer=E,this.reader=g,this.anySerializer=new c.AnySerializer(this.writer,this.reader,l)}writeRequest(E){this.anySerializer.write(E)}readRequest(){return this.anySerializer.read()}writeResponse(E){this.anySerializer.write(E)}readResponse(){return this.anySerializer.read()}}t.AnyProtocolSerializer=f;class a{}t.IMessageIO=a;class h extends a{constructor(){super(),this.serializerMap=new Map;const E=(0,p.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 f(this.writer,this.reader)}setAnySerializer(E){this.anySerializer=E}has(E){return this.serializerMap.has(E)}loadProtocol(E,g){const{methods:l}=E;for(const y of l)this.loadProtocolMethod(y,g)}loadProtocolMethod(E,g){let l=E.method;g?.nameConverter&&(l=g.nameConverter(l)),this.serializerMap.set(l,new s(E,this.fury))}getProcessor(E){const g=this.serializerMap.get(E);return g||this.anySerializer}Notification(E,g,l,y){const{writer:b}=this;return b.reset(),b.uint16(_.Notification),b.uint32(E),b.stringOfVarUInt32(g),this.requestHeadersSerializer.write(l),this.getProcessor(g).writeRequest(y),b.dump()}Request(E,g,l,y){const{writer:b}=this;return b.reset(),b.uint16(_.Request),b.uint32(E),b.stringOfVarUInt32(g),this.requestHeadersSerializer.write(l),this.getProcessor(g).writeRequest(y),b.dump()}Cancel(E){const{writer:g}=this;return g.reset(),g.uint16(_.Cancel),g.uint32(E),g.dump()}Response(E,g,l,y){const{writer:b}=this;return b.reset(),b.uint16(_.Response),b.uint32(E),b.stringOfVarUInt32(g),this.responseHeadersSerializer.write(l),this.getProcessor(g).writeResponse(y),b.dump()}Error(E,g,l,y){const{writer:b}=this;return b.reset(),b.uint16(_.Error),b.uint32(E),b.stringOfVarUInt32(g),this.responseHeadersSerializer.write(l),b.stringOfVarUInt32((0,o.stringifyError)(y)),b.dump()}parse(E){const{reader:g}=this;g.reset(E),g.skip(1);const l=g.uint8(),y=g.uint32();switch(l){case m.Request:case m.Notification:{const b=g.stringOfVarUInt32(),S=this.requestHeadersSerializer.read(),A=this.getProcessor(b).readRequest();return{kind:l,requestId:y,method:b,headers:S,args:A}}case m.Error:{const b=g.stringOfVarUInt32(),S=this.responseHeadersSerializer.read(),A=(0,o.parseError)(g.stringOfVarUInt32());return{kind:m.Error,requestId:y,method:b,headers:S,error:A}}case m.Response:{const b=g.stringOfVarUInt32(),S=this.responseHeadersSerializer.read(),A=this.getProcessor(b).readResponse();return{kind:m.Response,requestId:y,method:b,headers:S,result:A}}case m.Cancel:return{kind:m.Cancel,requestId:y};default:throw new Error(`Unknown message type: ${l}`)}}}t.MessageIO=h;class u{Request(E,g,l,y){return{kind:m.Request,requestId:E,method:g,headers:l,args:y}}Notification(E,g,l,y){return{kind:m.Notification,requestId:E,method:g,headers:l,args:y}}Cancel(E){return{kind:m.Cancel,requestId:E}}Response(E,g,l,y){return{kind:m.Response,requestId:E,headers:l,method:g,result:y}}Error(E,g,l,y){return{kind:m.Error,requestId:E,method:g,headers:l,error:y}}parse(E){return E}}t.RawMessageIO=u},86058:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SumiConnectionMultiplexer=t.IRPCProtocol=t.ProxyIdentifier=void 0,t.createExtMessageIO=p;const n=e(89104),r=e(97349),o=e(76339);class c{constructor(_){this.serviceId=_,this.countId=++c.count}static for(_){return new c(_)}}t.ProxyIdentifier=c,c.count=0,t.IRPCProtocol=Symbol("IRPCProtocol");function p(m){const _=new o.MessageIO;return _.setAnySerializer(new o.AnyProtocolSerializer(_.writer,_.reader,n.ExtObjectTransfer)),m?.forEach((s,f)=>{_.loadProtocol(s,{nameConverter:a=>v.getRPCName(f.serviceId,a)})}),_}class v extends r.SumiConnection{static getRPCName(_,s){return`${_}${v.SEP}${s}`}static extractServiceAndMethod(_){const s=_.indexOf(v.SEP);return[_.substring(0,s),_.substring(s+v.SEP_LENGTH)]}static normalizeServiceId(_){return _.replace(/\//g,"_")}constructor(_,s={}){super(_,{...s,io:s.io||p()}),this.socket=_,this.options=s,this._locals=new Map,this._proxies=new Map,this.onRequestNotFound((f,a)=>this.invoke(f,a)),this.listen()}set(_,s){const f=v.normalizeServiceId(_.serviceId);return this._locals.set(f,s),s}get(_){return this._locals.get(v.normalizeServiceId(_.serviceId))}getProxy(_){const s=v.normalizeServiceId(_.serviceId);return this._proxies.has(s)||this._proxies.set(s,this._createProxy(s)),this._proxies.get(s)}_createProxy(_){const s={get:(f,a)=>{if(typeof a=="symbol")return null;if(!f[a])if(a.charCodeAt(0)===36){const h=v.getRPCName(_,a);f[a]=(...u)=>this.sendRequest(h,...u)}else a==="toJSON"&&(f[a]=()=>{throw new Error("Cannot serialize a rpc protocol proxy object")});return f[a]}};return new Proxy(Object.create(null),s)}async invoke(_,s){const[f,a]=v.extractServiceAndMethod(_),h=this._locals.get(f);if(!h)throw new Error("Unknown actor "+f);const u=await h[a];if(typeof u!="function")throw new Error("Unknown method "+a+" on actor "+f);return u.apply(h,s)}getSocket(){return this.socket}}t.SumiConnectionMultiplexer=v,v.SEP="/",v.SEP_LENGTH=v.SEP.length},15726:(x,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=c,t.createMainContextProxyIdentifier=p;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(f){f[f.MAIN=0]="MAIN",f[f.EXT=1]="EXT"})(o||(t.RPCProtocolEnv=o={}));function c(f){return new r.ProxyIdentifier(f)}function p(f){return new r.ProxyIdentifier(f)}var v;(function(f){function a(u,d){if(d){if(d.$mid===1)return{$type:"VSCODE_URI",data:n.Uri.revive(d).toString()};if(d instanceof Uint8Array||d instanceof Uint32Array||d instanceof Uint16Array)return{$type:"Buffer",data:Array.from(d)};if(d instanceof ArrayBuffer)return{$type:"Buffer",data:Array.from(new Uint8Array(d))};if(d.type==="Buffer")return{$type:"Buffer",data:d.data}}return d}f.replacer=a;function h(u,d){if(d&&d.$type!==void 0&&d.data!==void 0){if(d.$type==="VSCODE_URI")return n.Uri.parse(d.data);if(d.$type==="Buffer")return Uint8Array.from(d.data)}return d}f.reviver=h})(v||(t.ObjectTransfer=v={}));class m{static cancel(a,h){return`{"type":4,"id":"${a}"}`}static serializeRequest(a,h,u,d){return d=d.map(E=>{if(E instanceof Error){const g=Array.prototype.slice.call(arguments);return g[0]=E.stack,g.join(`
30453
30435
  `)}return E}),`{"type": 1, "id": "${a}", "proxyId": "${h}", "method": "${u}", "args": ${JSON.stringify(d,v.replacer)}}`}static serializeReplyOK(a,h,u){if(typeof h>"u")return`{"type": 2, "id": "${a}"}`;try{return`{"type": 2, "id": "${a}", "res": ${JSON.stringify(h,v.replacer)}}`}catch{return u&&u.warn("res",h),`{"type": 2, "id": "${a}", "res": {}}`}}static serializeReplyError(a,h,u){try{return`{"type": 3, "id": "${a}", "res": ${JSON.stringify((0,n.transformErrorForSerialization)(h),v.replacer)}}`}catch{return u&&u.error("error",h),`{"type": 3, "id": "${a}", "res": {}}`}}}t.MessageIO=m;function _(){const f=new Error("Canceled");return f.name=f.message,f}class s{constructor(a,h){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=h||console,this.logger.error("You are using the deprecated class: 'RPCProtocol'. Please use the new one: 'SumiConnectionMultiplexer'"),this._protocol.onMessage(u=>this._receiveOneMessage(u))}set(a,h){return this._locals.set(a.serviceId,h),h}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 h={get:(u,d)=>typeof d=="symbol"?null:(!u[d]&&d.charCodeAt(0)===36&&(u[d]=(...E)=>this._remoteCall(a,d,E)),u[d])};return new Proxy(Object.create(null),h)}_remoteCall(a,h,u){const d=u.length&&n.CancellationToken.isCancellationToken(u[u.length-1])?u.pop():void 0;if(d&&d.isCancellationRequested)return Promise.reject(_());const E=String(++this._lastMessageId),g=new n.Deferred;d&&(u.push("add.cancellation.token"),d.onCancellationRequested(()=>this._protocol.send(m.cancel(E)))),this._pendingRPCReplies.set(E,g);const l=m.serializeRequest(E,a,h,u);if(this._protocol.send(l),this._protocol.timeout&&this._protocol.timeout!==-1){const y=setTimeout(()=>{this._handleTimeout(E)},this._protocol.timeout);this._timeoutHandles.set(E,y)}return g.promise}_receiveOneMessage(a){const h=JSON.parse(a,v.reviver);switch(this._timeoutHandles.has(h.id)&&(typeof clearTimeout=="function"&&clearTimeout(this._timeoutHandles.get(h.id)),this._timeoutHandles.delete(h.id)),h.type){case 1:this._receiveRequest(h);break;case 2:this._receiveReply(h);break;case 4:this._receiveCancel(h);break;case 3:this._receiveError(h);break}}_receiveCancel(a){const h=this._cancellationTokenSources.get(a.id);h&&h.cancel()}_receiveError(a){const h=a.id;if(!this._pendingRPCReplies.has(h))return;const u=this._pendingRPCReplies.get(h);this._pendingRPCReplies.delete(h);let d;a.res&&(a.res.$isError?(d=new Error,d.name=a.res.name,d.message=a.res.message,d.stack=a.res.stack):d=a.res),u.reject(d)}_receiveRequest(a){const h=a.id,u=a.proxyId,d=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(h,y),E.push(y.token)}this._invokeHandler(u,d,E).then(y=>{this._protocol.send(m.serializeReplyOK(h,y)),this._cancellationTokenSources.delete(h)}).catch(y=>{this._protocol.send(m.serializeReplyError(h,y)),this._cancellationTokenSources.delete(h)})}_invokeHandler(a,h,u){try{return this._doInvokeHandler(a,h,u)}catch(d){return Promise.reject(d)}}async _doInvokeHandler(a,h,u){const d=this._locals.get(a);if(!d)throw new Error("Unknown actor "+a);const E=await d[h];if(typeof E!="function")throw new Error("Unknown method "+h+" on actor "+a);return E.apply(d,u)}_receiveReply(a){const h=a.id;if(!this._pendingRPCReplies.has(h))return;const u=this._pendingRPCReplies.get(h);this._pendingRPCReplies.delete(h),u.resolve(a.res)}_handleTimeout(a){if(!this._pendingRPCReplies.has(a)||!this._timeoutHandles.has(a))return;const h=this._pendingRPCReplies.get(a);this._pendingRPCReplies.delete(a),this._timeoutHandles.delete(a),h.reject(new Error("RPC Timeout: "+a))}}t.RPCProtocol=s},64592:(x,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 c=(0,r.oneOf)([t.PingProtocol,t.PongProtocol,t.OpenProtocol,t.ServerReadyProtocol,t.DataProtocol,t.BinaryProtocol,t.CloseProtocol,t.ErrorProtocol]);t.furySerializer=c},54558:(x,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,c)=>({onceClose(p){return o.onceClose(p)},onMessage(p){return o.onMessage(v=>{p(c.deserialize(v))})},send(p){o.send(c.serialize(p))}});t.wrapSerializer=r},43620:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.rawSerializer=void 0,t.rawSerializer={serialize:e=>e,deserialize:e=>e}},41619:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},76271:(x,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 c{constructor(){this.handlerMap=new Map,this.paramsKey=new Map}register(s,f){const a=s.indexOf("/:"),h=a>=0;let u=s;h&&(u=s.slice(0,a),this.paramsKey.set(u,s.slice(a+2))),this.handlerMap.has(u)||this.handlerMap.set(u,[]);const d=this.handlerMap.get(u),E=f.handler.bind(f),g=(l,y,b)=>{f.connection=l,E(l,y,b)};f.handler=g,d.push(f),this.handlerMap.set(u,d)}getParams(s,f){const a={};if(this.paramsKey.has(s)){const h=this.paramsKey.get(s);h&&(a[h]=f)}return a}removeHandler(s,f){const a=s.indexOf(":"),h=a>=0;let u=s;h&&(u=s.slice(0,a));const d=this.handlerMap.get(u)||[],E=d.indexOf(f);E!==-1&&d.splice(E,1),this.handlerMap.set(s,d)}get(s){return this.handlerMap.get(s)}disposeConnectionClientId(s,f){this.handlerMap.forEach(a=>{a.forEach(h=>{h.dispose(s,f)})})}openChannel(s,f,a){let h=this.get(s),u;if(!h){const d=s.indexOf("/");d>=0&&(h=this.get(s.slice(0,d)),u=this.getParams(s.slice(0,d),s.slice(d+1)))}if(h)for(let d=0,E=h.length;d<E;d++)h[d].handler(f,a,u)}getAll(){return Array.from(this.handlerMap.values())}}t.CommonChannelPathHandler=c;var p;(function(_){_[_.ConnectionClosed=1]="ConnectionClosed",_[_.NewChannelOpened=2]="NewChannelOpened"})(p||(p={}));class v{constructor(s,f,a=console,h={}){this.handlerId=s,this.commonChannelPathHandler=f,this.logger=a,this.channelMap=new Map,this.heartbeatTimer=null,this.serializer=r.furySerializer,h.serializer&&(this.serializer=h.serializer)}heartbeat(s){this.heartbeatTimer&&clearTimeout(this.heartbeatTimer),this.heartbeatTimer=setTimeout(()=>{this.doHeartbeat(s),this.heartbeat(s)},5e3)}receiveConnection(s){let f;this.heartbeat(s);const a=(0,r.wrapSerializer)(s,this.serializer);a.onMessage(h=>{try{switch(h.kind){case"open":{const{id:u,path:d,traceId:E}=h;f=h.clientId,this.logger.log(`open a new connection channel ${f} with path ${d}`);let g=this.channelMap.get(u);g&&(g.close(p.NewChannelOpened,"new channel opened for the same channel id"),g.dispose()),g=new o.WSServerChannel(a,{id:u,clientId:f,logger:this.logger}),this.channelMap.set(u,g),this.commonChannelPathHandler.openChannel(d,g,f),g.serverReady(E);break}default:{const{id:u}=h,d=this.channelMap.get(u);d?d.dispatch(h):(a.send({kind:"error",id:u,code:n.ErrorMessageCode.ChannelNotFound,message:`channel ${u} not found`}),this.logger.warn(`channel ${u} is not found`))}}}catch(u){this.logger.error("handle connection message error",u)}}),s.onceClose(()=>{this.logger.log(`connection ${f} is closed, dispose all channels`),this.commonChannelPathHandler.disposeConnectionClientId(s,f),Array.from(this.channelMap.values()).filter(h=>h.clientId===f).forEach(h=>{h.close(p.ConnectionClosed,"connection closed"),h.dispose(),this.channelMap.delete(h.id),this.logger.log(`Remove connection channel ${h.id}`)})})}dispose(){this.heartbeatTimer&&clearTimeout(this.heartbeatTimer)}}t.BaseCommonChannelHandler=v,t.RPCServiceChannelPath="RPCService";function m(_){const s=new c;_.addProviders({token:c,useValue:s})}},8140:(x,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:(x,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),c=e(97349);var p;(function(s){s[s.ReSend=0]="ReSend",s[s.Sended=1]="Sended",s[s.Success=2]="Success",s[s.Failed=3]="Failed"})(p||(p={}));class v{constructor(){this.map=new Map,this.deliveryTimeout=500,this.timerMap=new Map}setDeliveryTimeout(f){this.deliveryTimeout=f}set(f,a){this.map.set(f,a)}get(f){return this.map.get(f)}success(f){this.map.set(f,p.Success);const a=this.timerMap.get(f);a&&clearTimeout(a)}dispose(){this.timerMap.forEach(f=>{clearTimeout(f)})}stop(f){const a=this.timerMap.get(f);a&&clearTimeout(a)}send(f,a){this.set(f,p.Sended),this.guard(f,a)}guard(f,a){const h=this.timerMap.get(f);h&&clearTimeout(h);const u=setTimeout(()=>{this.set(f,p.ReSend),a.whenRetry()},this.deliveryTimeout);this.timerMap.set(f,u)}}class m{constructor(f,a){this.connection=f,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 v,this.LOG_TAG="[WSChannel]",this.logger=console;const{id:h,logger:u,ensureServerReady:d}=a;this.id=h,this.LOG_TAG=`[WSChannel id:${this.id}]`,u&&(this.logger=u),this._ensureServerReady=!!d,a.deliveryTimeout&&this.stateTracer.setDeliveryTimeout(a.deliveryTimeout),this._disposables.add(this.emitter.on("binary",E=>this.onBinaryQueue.push(E)))}inqueue(f){if(this._ensureServerReady&&!this._isServerReady){this.sendQueue||(this.sendQueue=[]),this.sendQueue.push(f);return}this.connection.send(f)}ensureMessageDeliveried(f,a=(0,r.randomString)(16)){const h=this.stateTracer.get(a);if(h&&h>=p.Sended){this.logger.error(`message already send already success or in progress, traceId: ${a}, state: ${h}`);return}f.traceId=a,this.connection.send(f),this.stateTracer.send(a,{whenRetry:()=>{if(this._isServerReady){this.stateTracer.stop(a);return}this.ensureMessageDeliveried(f,a)}})}onMessage(f){return this.emitter.on("message",f)}onBinary(f){return this.onBinaryQueue.on(f)}onOpen(f){return this.emitter.on("open",f)}onReopen(f){return this.emitter.on("reopen",f)}pause(){this._isServerReady=!1}onServerReady(f){if(this._isServerReady){f();return}return this.emitter.on("open",f)}resume(){if(this._isServerReady=!0,this.sendQueue){for(const f of this.sendQueue)this.connection.send(f);this.sendQueue=[]}}dispatch(f){switch(f.kind){case"server-ready":f.traceId&&this.stateTracer.success(f.traceId),this.resume(),this.emitter.emit("open",f.id);break;case"data":this.emitter.emit("message",f.content);break;case"binary":this.emitter.emit("binary",f.binary);break;case"error":switch(this.logger.error(this.LOG_TAG,`receive error: id: ${f.id}, code: ${f.code}, error: ${f.message}`),f.code){case o.ErrorMessageCode.ChannelNotFound:this.channelPath&&(this.pause(),this.open(this.channelPath,this.clientId));break}break}}open(f,a){this.channelPath=f,this.clientId=a,this.LOG_TAG=`[WSChannel id=${this.id} path=${f}]`;const h={kind:"open",id:this.id,path:f,clientId:a};this._ensureServerReady?this.ensureMessageDeliveried(h):this.connection.send(h)}send(f){this.inqueue({kind:"data",id:this.id,content:f})}sendBinary(f){this.inqueue({kind:"binary",id:this.id,binary:f})}onError(){}close(f,a){this.pause(),this.emitter.emit("close",f,a)}fireReopen(){this.emitter.emit("reopen")}onClose(f){return this.emitter.on("close",f)}onceClose(f){return this.emitter.once("close",f)}createConnection(){return{onceClose:f=>this.onceClose(f),onMessage:f=>this.onBinary(f),send:f=>{this.sendBinary(f)},dispose(){}}}createSumiConnection(f={}){return new c.SumiConnection(this.createConnection(),f)}dispose(){this.stateTracer.dispose(),this.sendQueue=[],this._disposables.dispose()}ping(){this.connection.send({kind:"ping",id:this.id})}}t.WSChannel=m;class _ extends m{constructor(f,a){super(f,a),this.connection=f,this.messageQueue=[],this.clientId=a.clientId}serverReady(f){this.connection.send({kind:"server-ready",id:this.id,traceId:f})}dispatch(f){switch(f.kind){case"data":this.emitter.emit("message",f.content);break;case"binary":this.emitter.emit("binary",f.binary);break;case"ping":this.connection.send({kind:"pong",id:this.id});break}}}t.WSServerChannel=_},8919:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),e(85608).__exportStar(e(25285),t)},70650:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AINativeConfigService=void 0;const n=e(85608),r=e(76003),o=e(89195),c=e(1149),p=e(11050),v={supportsMarkers:!0,supportsChatAssistant:!0,supportsCodeAction:!0,supportsInlineChat:!0,supportsInlineCompletion:!0,supportsConflictResolve:!0,supportsRenameSuggestions:!0,supportsProblemFix:!0,supportsTerminalDetection:!0,supportsTerminalCommandSuggest:!0,supportsCustomLLMSettings:!0,supportsMCP:!0},m={};Object.keys(v).forEach(a=>{m[a]=!1});const _={inputWidth:320,inputKeybinding:"ctrlcmd+k",logo:o.AILogoAvatar},s={triggerKeybinding:"alt+\\"};let f=class{constructor(){this.aiModuleLoaded=!1,this.internalCapabilities=v,this.internalInlineChat=_,this.internalCodeEdits=s}get capabilities(){if(!this.aiModuleLoaded)return m;const{AINativeConfig:h}=this.appConfig;return h?.capabilities?{...this.internalCapabilities,...h.capabilities}:this.internalCapabilities}get inlineChat(){const{AINativeConfig:h}=this.appConfig;return h?.inlineChat?{...this.internalInlineChat,...h.inlineChat}:this.internalInlineChat}get codeEdits(){const{AINativeConfig:h}=this.appConfig;return h?.codeEdits?{...this.internalCodeEdits,...h.codeEdits}:this.internalCodeEdits}setAINativeModuleLoaded(h){this.aiModuleLoaded=h}};t.AINativeConfigService=f,n.__decorate([(0,r.Autowired)(p.AppConfig),n.__metadata("design:type",Object)],f.prototype,"appConfig",void 0),n.__decorate([(0,r.Autowired)(c.LayoutViewSizeConfig),n.__metadata("design:type",c.LayoutViewSizeConfig)],f.prototype,"layoutViewSize",void 0),t.AINativeConfigService=f=n.__decorate([(0,r.Injectable)()],f)},41480:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AIReporter=void 0;const n=e(85608),r=e(76003),o=e(43718),c=e(52664);let p=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,_,s=60*1e3){const f=this.getRelationId();this.report(f,{..._,msgType:m,isStart:!0});const a=setTimeout(()=>{this.report(f,{..._,success:!1})},s);return this.reporterCancelHandler.set(f,a),f}end(m,_){const s=this.reporterCancelHandler.get(m);s&&clearTimeout(s),this.report(m,{success:!0,..._,isStart:!1})}send(m){this.reporter.point(c.AI_REPORTER_NAME,m.msgType,m)}record(m,_){_||(_=this.getRelationId());const s=this.reportInfoCache.get(_)||{},f={...this.getCommonReportInfo(),...s,...m,relationId:_};return this.reportInfoCache.set(_,f),f}report(m,_){const s=this.record(_,m);this.reporter.point(c.AI_REPORTER_NAME,_.msgType||s.msgType,s)}};t.AIReporter=p,n.__decorate([(0,r.Autowired)(o.IReporterService),n.__metadata("design:type",Object)],p.prototype,"reporter",void 0),t.AIReporter=p=n.__decorate([(0,r.Injectable)()],p)},57925:(x,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:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MergeConflictReportService=void 0;const n=e(85608),r=e(76003),o=e(43718),c=e(70650);let p=class extends o.Disposable{constructor(){super(...arguments),this.reportInfoMap=new Map,this.unique2RelationMap=new Map}record(m,_){if(!this.aiNativeConfigService.capabilities.supportsConflictResolve)return _;let s="";return this.unique2RelationMap.has(m)?(s=this.unique2RelationMap.get(m),this.aiReporter.record(_,s)):(s=this.aiReporter.record({..._,msgType:o.AIServiceType.MergeConflict,message:o.AIServiceType.MergeConflict,editorMode:_.editorMode||o.MergeConflictEditorMode.traditional}).relationId,this.unique2RelationMap.set(m,s)),{..._,relationId:s}}report(m,_){if(!this.aiNativeConfigService.capabilities.supportsConflictResolve)return;const s=this.record(m,_);this.aiReporter.end(s.relationId,s)}reportIncrementNum(m,_){if(!this.aiNativeConfigService.capabilities.supportsConflictResolve)return;const s=this.unique2RelationMap.get(m);if(!s)return;const f=this.aiReporter.getCacheReportInfo(s)[_]||0;this.report(m,{[_]:f+1})}dispose(){super.dispose(),this.reportInfoMap.clear()}};t.MergeConflictReportService=p,n.__decorate([(0,r.Autowired)(c.AINativeConfigService),n.__metadata("design:type",c.AINativeConfigService)],p.prototype,"aiNativeConfigService",void 0),n.__decorate([(0,r.Autowired)(o.IAIReporter),n.__metadata("design:type",Object)],p.prototype,"aiReporter",void 0),t.MergeConflictReportService=p=n.__decorate([(0,r.Injectable)()],p)},95040:(x,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:(x,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 c extends o.BasicEvent{}t.ClientAppStateEvent=c;let p=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 c(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(_=>this.reachedState(_)))}};t.ClientAppStateService=p,n.__decorate([(0,r.Autowired)(o.IEventBus),n.__metadata("design:type",Object)],p.prototype,"eventBus",void 0),t.ClientAppStateService=p=n.__decorate([(0,r.Injectable)()],p)},59555:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ApplicationService=void 0;const n=e(85608),r=e(76003),o=e(59019),c=e(43718),p=e(11050),v=e(42101);let m=class{constructor(){this._initialized=new c.Deferred}async initializeData(){this._backendOS=await this.commonServer.getBackendOS(),this._initialized.resolve()}get frontendOS(){return c.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?v.electronEnv.currentWindowId:this.injector.get(o.WSChannelHandler).clientId}};t.ApplicationService=m,n.__decorate([(0,r.Autowired)(c.CommonServerPath),n.__metadata("design:type",Object)],m.prototype,"commonServer",void 0),n.__decorate([(0,r.Autowired)(p.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:(x,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:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BaseConnectionHelper=void 0;const n=e(85608),r=e(76003),o=e(18740),c=e(43718),p=e(32796),v=e(38578),m=(0,c.getDebugLogger)();let _=class{async createRPCServiceChannel(f){var a;const h=this.createConnection(),u=(a=this.appConfig.clientId)!==null&&a!==void 0?a:this.getDefaultClientId(),d=new o.WSChannelHandler(h,u,{logger:m});return(0,p.createConnectionService)(this.injector,f,d)}};t.BaseConnectionHelper=_,n.__decorate([(0,r.Autowired)(r.INJECTOR_TOKEN),n.__metadata("design:type",r.Injector)],_.prototype,"injector",void 0),n.__decorate([(0,r.Autowired)(v.AppConfig),n.__metadata("design:type",Object)],_.prototype,"appConfig",void 0),n.__decorate([(0,r.Autowired)(c.IReporterService),n.__metadata("design:type",Object)],_.prototype,"reporterService",void 0),t.BaseConnectionHelper=_=n.__decorate([(0,r.Injectable)({multiple:!0})],_)},41320:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BrowserRuntime=void 0;const n=e(85608),r=e(76003),o=e(44142),c=e(6858),p=e(53206);let v=class extends c.RendererRuntime{constructor(){super(...arguments),this.runtimeName=o.ESupportRuntime.Web}registerRuntimeModuleProviders(_,s){s.webProviders&&_.addProviders(...s.webProviders)}registerRuntimeInnerProviders(_){(0,p.injectBrowserInnerProviders)(_)}};t.BrowserRuntime=v,t.BrowserRuntime=v=n.__decorate([(0,r.Injectable)()],v)},53206:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.injectBrowserInnerProviders=o;const n=e(93899),r=e(97222);function o(c){c.addProviders({token:n.ICtxMenuRenderer,useClass:r.BrowserCtxMenuRenderer})}},55267:(x,t,e)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.WebConnectionHelper=void 0;const r=e(85608),o=e(76003),c=e(91493),p=e(43718),v=e(22914);let m=n=class extends v.BaseConnectionHelper{constructor(s){super(),this.options=s,this.clientId=n.clientIdFactory()}getDefaultClientId(){return this.clientId}createConnection(){return c.ReconnectingWebSocketConnection.forURL(this.options.connectionPath,this.options.connectionProtocols)}static clientIdFactory(){return`CLIENT_ID_${(0,p.uuid)()}`}};t.WebConnectionHelper=m,t.WebConnectionHelper=m=n=r.__decorate([(0,o.Injectable)({multiple:!0}),r.__metadata("design:paramtypes",[Object])],m)},44142:(x,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:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ElectronRendererRuntime=void 0;const n=e(85608),r=e(76003),o=e(38578),c=e(42101),p=e(44142),v=e(6858),m=e(38892);let _=class extends v.RendererRuntime{constructor(){super(...arguments),this.runtimeName=p.ESupportRuntime.Electron}registerRuntimeModuleProviders(a,h){h.electronProviders&&a.addProviders(...h.electronProviders)}registerRuntimeInnerProviders(a){(0,m.injectElectronInnerProviders)(a)}mergeAppConfig(a){return s(a)}async provideResourceUri(a){switch(a){case v.EKnownResources.OnigWasm:return c.electronEnv.onigWasmUri||this.appConfig.onigWasmUri||p.onigWasmCDNUri;case v.EKnownResources.TreeSitterWasmDirectory:return c.electronEnv.treeSitterWasmDirectoryUri||this.appConfig.treeSitterWasmDirectoryUri||(0,o.getTreeSitterWasmCDNUri)(this.appConfig.componentCDNType);default:throw new Error(`Unknown resource: ${a}`)}}};t.ElectronRendererRuntime=_,t.ElectronRendererRuntime=_=n.__decorate([(0,r.Injectable)()],_);function s(f){var a;const h=(a=c.electronEnv.metadata)!==null&&a!==void 0?a:{},u={...f,appRoot:f.appRoot||c.electronEnv.appPath,extensionDir:f.extensionDir||h.extensionDir};return h.extensionDevelopmentHost&&(f.extensionDevelopmentHost=h.extensionDevelopmentHost),h.extensionCandidate&&(f.extensionCandidate=(f.extensionCandidate||[]).concat(c.electronEnv.metadata.extensionCandidate||[])),u}},38892:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.injectElectronInnerProviders=m;const n=e(43718),r=e(37406),o=e(93899),c=e(27790),p=e(11050),v=e(42101);function m(_){const s=_.get(p.AppConfig);_.addProviders({token:n.IElectronMainMenuService,useValue:(0,v.createElectronMainApi)(n.IElectronMainMenuService,s.devtools)},{token:r.IElectronMainUIService,useValue:(0,v.createElectronMainApi)(r.IElectronMainUIService,s.devtools)},{token:r.IElectronMainLifeCycleService,useValue:(0,v.createElectronMainApi)(r.IElectronMainLifeCycleService,s.devtools)},{token:r.IElectronURLService,useValue:(0,v.createElectronMainApi)(r.IElectronURLService,s.devtools)},{token:c.IElectronMenuFactory,useClass:c.ElectronMenuFactory},{token:c.IElectronMenuBarService,useClass:c.ElectronMenuBarService},{token:o.ICtxMenuRenderer,useClass:c.ElectronCtxMenuRenderer})}},63977:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ElectronConnectionHelper=void 0;const n=e(85608),r=e(76003),o=e(42101),c=e(22914);let p=class extends c.BaseConnectionHelper{getDefaultClientId(){return o.electronEnv.metadata.windowClientId}createConnection(){return(0,o.createNetSocketConnection)()}};t.ElectronConnectionHelper=p,t.ElectronConnectionHelper=p=n.__decorate([(0,r.Injectable)({multiple:!0})],p)},18379:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ConnectionHelperFactory=v;const n=e(85608),r=e(38578),o=e(55267),c=e(44142),p=e(63977);n.__exportStar(e(55267),t),n.__exportStar(e(63977),t),n.__exportStar(e(22914),t),n.__exportStar(e(44142),t);function v(m){return _=>{const s=m.get(r.AppConfig);let f;switch(_){case c.ESupportRuntime.Electron:f=m.get(p.ElectronConnectionHelper);break;case c.ESupportRuntime.Web:f=m.get(o.WebConnectionHelper,[{connectionPath:s.connectionPath,connectionProtocols:s.connectionProtocols}]);break;default:throw new Error(`Unknown backend type: ${_}`)}return f}}},6858:(x,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),c=e(44142);var p;(function(m){m.OnigWasm="wasm:onig",m.TreeSitterWasmDirectory="wasm:tree-sitter"})(p||(t.EKnownResources=p={}));let v=class{mergeAppConfig(_){return _}async provideResourceUri(_){switch(_){case p.OnigWasm:return this.appConfig.onigWasmUri||c.onigWasmCDNUri;case p.TreeSitterWasmDirectory:return this.appConfig.treeSitterWasmDirectoryUri||(0,o.getTreeSitterWasmCDNUri)(this.appConfig.componentCDNType);default:throw new Error(`Unknown resource: ${_}`)}}};t.RendererRuntime=v,n.__decorate([(0,r.Autowired)(o.AppConfig),n.__metadata("design:type",Object)],v.prototype,"appConfig",void 0),t.RendererRuntime=v=n.__decorate([(0,r.Injectable)()],v)},37638:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AuthenticationContribution=void 0;const n=e(85608),r=e(76003),o=e(43718),c=e(66549);let p=class{onStart(){this.authenticationService.initialize()}registerCommands(m){m.registerCommand({id:o.noAccountsId,label:"%authentication.noAccounts%"},{execute:()=>{}})}};t.AuthenticationContribution=p,n.__decorate([(0,r.Autowired)(o.IAuthenticationService),n.__metadata("design:type",Object)],p.prototype,"authenticationService",void 0),t.AuthenticationContribution=p=n.__decorate([(0,o.Domain)(c.ClientAppContribution,o.CommandContribution)],p)},10605:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AuthenticationService=void 0;const n=e(85608),r=e(76003),o=e(43718),c=e(93899);let p=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 _=>{if(_.event.added.length>0){const s=await this.getSessions(_.providerId);s.forEach(f=>{if(s.find(b=>m.get(b.id)))return;const a=new o.DisposableCollection,h=`account-sign-out-${_.providerId}-${f.id}`,u=this.commands.registerCommand({id:h,label:(0,o.formatLocalize)("authentication.signOut",_.label)},{execute:async()=>{await this.signOutOfAccount(_.providerId,f.account.label)}}),d=`manage-trusted-${_.providerId}-${f.id}`,E=this.commands.registerCommand({id:d,label:"%authentication.manageTrustedExtensions%"},{execute:async()=>{await this.manageTrustedExtensionsForAccount(_.providerId,f.account.label)}}),g=`${_.providerId}${f.account.label}`,l=this.menus.registerMenuItem(c.MenuId.AccountsContext,{submenu:g,label:`${f.account.label} (${_.label})`}),y=this.menus.registerMenuItems(g,[{command:d},{command:h}]);a.push(l),a.push(y),a.push(u),a.push(E),m.set(f.id,a)})}_.event.removed.length>0&&_.event.removed.forEach(s=>{const f=m.get(s.id);f&&(f.dispose(),m.delete(s.id))})})}get storage(){return this._storage}registerAuthenticationProvider(m,_){this._authenticationProviders.set(m,_),this._onDidRegisterAuthenticationProvider.fire({id:m,label:_.label}),this.updateAccountsMenuItem()}async sessionsUpdate(m,_){const s=this._authenticationProviders.get(m);s&&(this._onDidChangeSessions.fire({providerId:m,label:s.label,event:_}),await s.updateSessionItems(_),this.updateAccountsMenuItem(),_.added&&await this.updateNewSessionRequests(s))}async updateNewSessionRequests(m){const _=this._signInRequestItems.get(m.id);if(!_)return;const s=await m.getSessions();Object.keys(_).forEach(f=>{if(s.some(a=>a.scopes.slice().sort().join("")===f)){const a=_[f];a&&a.disposables.forEach(h=>h.dispose()),delete _[f],Object.keys(_).length===0?this._signInRequestItems.delete(m.id):this._signInRequestItems.set(m.id,_)}})}getTrustedKey(m,_){return`trusted-${m}-${_}`}async getAllowedExtensions(m,_){const s=this.getTrustedKey(m,_);let f=[];try{const a=await this.storage.get(s);a&&(f=JSON.parse(a))}catch(a){this.logger.warn("read allow extensions error: "+a)}return f}async setAllowedExtensions(m,_,s){const f=this.getTrustedKey(m,_);await this.storage.set(f,JSON.stringify(s))}async removeAllowedExtensions(m,_){const s=this.getTrustedKey(m,_);await this.storage.delete(s)}async updatedAllowedExtension(m,_,s,f,a){const h=await this.getAllowedExtensions(m,_),u=h.findIndex(d=>d.id===s);u===-1?h.push({id:s,name:f,allowed:a}):h[u].allowed=a,await this.setAllowedExtensions(m,_,h)}async isAccessAllowed(m,_,s){const a=(await this.getAllowedExtensions(m,_)).find(h=>h.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 _=this._authenticationProviders.get(m);if(_)return _;const s=new Promise((a,h)=>{this.onDidRegisterAuthenticationProvider(u=>{if(u.id===m)if(_=this._authenticationProviders.get(m),_)a(_);else throw new Error(`No authentication provider '${m}' is currently registered.`)})}),f=new Promise((a,h)=>{setTimeout(()=>{h(new Error(`didRegister ${m} timeout`))},5e3)});return Promise.race([s,f])}async getSessions(m,_,s,f){try{return await(this._authenticationProviders.get(m)||await this.tryActivateProvider(m)).getSessions(_,f)}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(_=>{m.push(_.id)}),m}unregisterAuthenticationProvider(m){const _=this._authenticationProviders.get(m);_&&(_.dispose(),this._authenticationProviders.delete(m),this._onDidUnregisterAuthenticationProvider.fire({id:m,label:_.label}),this.updateAccountsMenuItem())}updateAccountsMenuItem(){let m=!1;this._authenticationProviders.forEach(_=>{m=m||_.hasSessions()}),m&&this._noAccountsMenuItem&&(this._noAccountsMenuItem.dispose(),this._noAccountsMenuItem=void 0),!m&&!this._noAccountsMenuItem&&(this._noAccountsMenuItem=this.menus.registerMenuItem(c.MenuId.AccountsContext,{group:"0_accounts",command:o.noAccountsId}))}async requestNewSession(m,_,s,f,a){let h=this._authenticationProviders.get(m);if(h||await new Promise((u,d)=>{this.onDidRegisterAuthenticationProvider(E=>{E.id===m&&(h=this._authenticationProviders.get(m),u())})}),h){const u=this._signInRequestItems.get(m),d=_.sort().join("");if(u&&u[d]&&u[d].requestingExtensionIds.includes(f))return;const g=this.commands.registerCommand({id:`${f}signIn`,label:(0,o.formatLocalize)("authentication.signInRequests",a)},{execute:async()=>{const y=await this.login(m,_,s),b=y.account.label,S=await this.getAllowedExtensions(m,b);S.find(A=>A.id===f)||(S.push({id:f,name:a}),await this.setAllowedExtensions(m,b,S)),await this.setExtensionSessionId(a,m,y.id)}}),l=this.menus.registerMenuItem(c.MenuId.AccountsContext,{group:"2_signInRequests",command:`${f}signIn`});if(u){const y=u[d]||{disposables:[],requestingExtensionIds:[]};u[d]={disposables:[...y.disposables,l,g],requestingExtensionIds:[...y.requestingExtensionIds,f]},this._signInRequestItems.set(m,u)}else this._signInRequestItems.set(m,{[d]:{disposables:[l,g],requestingExtensionIds:[f]}})}}getLabel(m){const _=this._authenticationProviders.get(m);if(_)return _.label;throw new Error(`No authentication provider '${m}' has been declared.`)}supportsMultipleAccounts(m){const _=this._authenticationProviders.get(m);if(_)return _.supportsMultipleAccounts;throw new Error(`No authentication provider '${m}' is currently registered.`)}async login(m,_,s){try{return await(this._authenticationProviders.get(m)||await this.tryActivateProvider(m)).login(_,s)}catch(f){throw new Error(`No authentication provider '${m}' is currently registered, error messge: ${f.message}`)}}logout(m,_){const s=this._authenticationProviders.get(m);if(s)return s.logout(_);throw new Error(`No authentication provider '${m}' is currently registered.`)}manageTrustedExtensionsForAccount(m,_){const s=this._authenticationProviders.get(m);if(s)return s.manageTrustedExtensions(_);throw new Error(`No authentication provider '${m}' is currently registered.`)}signOutOfAccount(m,_){const s=this._authenticationProviders.get(m);if(s)return s.signOut(_);throw new Error(`No authentication provider '${m}' is currently registered.`)}getUsagesKey(m,_){return`usages-${m}-${_}`}async getAccountUsages(m,_){const s=this.getUsagesKey(m,_),f=await this.storage.get(s);let a=[];if(f)try{a=JSON.parse(f)}catch(h){this.logger.warn("parse account usages error: "+h)}return a}async addAccountUsage(m,_,s,f){const a=this.getUsagesKey(m,_),h=await this.getAccountUsages(m,_),u=h.findIndex(d=>d.extensionId===s);u>-1?h.splice(u,1,{extensionId:s,extensionName:f,lastUsed:Date.now()}):h.push({extensionId:s,extensionName:f,lastUsed:Date.now()}),await this.storage.set(a,JSON.stringify(h))}async removeAccountUsage(m,_){const s=this.getUsagesKey(m,_);await this.storage.delete(s)}getExtensionSessionIdKey(m,_){return`session-${m}-${_}`}async getExtensionSessionId(m,_){const s=this.getExtensionSessionIdKey(m,_);return await this.storage.get(s)}async setExtensionSessionId(m,_,s){const f=this.getExtensionSessionIdKey(m,_);await this.storage.set(f,s)}async removeExtensionSessionId(m,_){const s=this.getExtensionSessionIdKey(m,_);await this.storage.delete(s)}};t.AuthenticationService=p,n.__decorate([(0,r.Autowired)(o.ILogger),n.__metadata("design:type",Object)],p.prototype,"logger",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.IEventBus),n.__metadata("design:type",Object)],p.prototype,"eventBus",void 0),n.__decorate([(0,r.Autowired)(c.IMenuRegistry),n.__metadata("design:type",c.IMenuRegistry)],p.prototype,"menus",void 0),n.__decorate([(0,r.Autowired)(o.CommandRegistry),n.__metadata("design:type",Object)],p.prototype,"commands",void 0),t.AuthenticationService=p=n.__decorate([(0,r.Injectable)()],p)},72746:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},33916:(x,t,e)=>{"use strict";var n;n={value:!0},t.j=void 0,e(37533);const r=e(76003),o=e(43718),c=e(4588),p=e(37406),v=e(16884),m=e(18379),_=e(41320),s=e(59574),f=e(6858),a=e(36206),h=e(66963),u=e(18193),d=e(41118),E=e(1149),g=e(11949),l=e(64102),y=e(78132),b=e(11050),S=e(67304),A=e(79951),w=e(79248),T=e(96302),D=e(71843);e(99696);class I{constructor(M){var R,P,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(Z=>{if(Z)this.stateService.state="ready";else return this.stopContributionsElectron().then(()=>{this.stateService.state="electron_confirmed_close";const Q=this.injector.get(p.IElectronMainLifeCycleService);setTimeout(()=>{Q.closeWindow(A.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!==d.NO_KEYBINDING_NAME&&!this._inComposition&&this.keybindingService.run(K)},this._handleKeyup=K=>{this.keybindingService.resolveModifierKey(K)},this._handleCompositionstart=()=>{this._inComposition=!0},this._handleCompositionend=()=>{this._inComposition=!1},this._handleWheel=()=>{};const{modules:F,contributions:L,iconStyleSheets:N,useCdnIcon:j,editorBackgroundImage:W,defaultPreferences:U,allowSetDocumentTitleFollowWorkspaceDir:X=!0,...V}=M;this.initEarlyPreference(M.workspaceDir||"");const $=(0,y.getPreferenceLanguageId)(U);(0,o.setLanguageId)($),this.injector=M.injector||new r.Injector,this.modules=F,this.modules.forEach(K=>this.resolveModuleDeps(K)),this.browserModules=M.modulesInstances||[];const Y=(R=M.isElectronRenderer)!==null&&R!==void 0?R:this.detectRuntime()===m.ESupportRuntime.Electron;this.config={appName:c.DEFAULT_APPLICATION_NAME,appHost:Y?c.DEFAULT_APPLICATION_DESKTOP_HOST:c.DEFAULT_APPLICATION_WEB_HOST,appRoot:M.appRoot||"",uriScheme:c.DEFAULT_URI_SCHEME,...V,isElectronRenderer:Y,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:X,devtools:(P=M.devtools)!==null&&P!==void 0?P:!1,rpcMessageTimeout:M.rpcMessageTimeout||-1},this.config.connectionPath=M.connectionPath||`${this.config.wsPath}/service`;const G=this.injector.get(E.LayoutViewSizeConfig);G.init(M.layoutViewSize),this.config.layoutViewSize=G,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=Y?this.injector.get(s.ElectronRendererRuntime):this.injector.get(_.BrowserRuntime),this.injector.addProviders({token:f.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,j),this.createBrowserModules(U)}resolveModuleDeps(M){const R=Reflect.getMetadata("dependencies",M);R&&R.forEach(P=>{this.modules.indexOf(P)===-1&&this.modules.push(P)})}get lifeCycleService(){return this.injector.get(o.AppLifeCycleServiceToken)}async start(M,R,P){const F=this.injector.get(o.IReporterService).time(o.REPORT_NAME.MEASURE);this.lifeCycleService.phase=1,P?(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,T.bindConnectionServiceDeprecated)(this.injector,this.modules,P)):R&&await this.createConnection(R),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 R of M)R.onReconnect&&R.onReconnect(this)}initBaseProvider(){(0,D.injectInnerProviders)(this.injector),this.runtime.registerRuntimeInnerProviders(this.injector)}initFields(){this.contributionsProvider=this.injector.get(h.ClientAppContribution),this.commandRegistry=this.injector.get(o.CommandRegistry),this.keybindingRegistry=this.injector.get(d.KeybindingRegistry),this.keybindingService=this.injector.get(d.KeybindingService),this.stateService=this.injector.get(v.ClientAppStateService),this.nextMenuRegistry=this.injector.get(l.IMenuRegistry)}createBrowserModules(M){const R=this.injector;for(const P of this.modules){const k=R.get(P);this.browserModules.push(k),k.providers&&this.injector.addProviders(...k.providers),this.runtime.registerRuntimeModuleProviders(this.injector,k),k.preferences&&k.preferences(this.injector)}(0,u.injectCorePreferences)(this.injector),this.injectPreferenceService(this.injector,M),this.injectStorageProvider(this.injector);for(const P of this.browserModules)if(P.contributionProvider)if(Array.isArray(P.contributionProvider))for(const k of P.contributionProvider)(0,o.createContributionProvider)(this.injector,k);else(0,o.createContributionProvider)(this.injector,P.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,R){return await Promise.all(M.map(P=>this.contributionPhaseRunner(P,R)))}async contributionPhaseRunner(M,R){const P=M[R];if(typeof P=="function")try{const k=M.constructor.name+"."+R;return await this.measure(k,()=>P.call(M,this))}catch(k){this.logger.error(`Could not run contribution#${R}`,k)}}async renderApp(M){await(0,w.renderClientApp)(this,M),this.injector.get(o.IEventBus).fire(new g.RenderedEvent)}async measure(M,R){const k=this.injector.get(o.IReporterService).time(o.REPORT_NAME.MEASURE),F=await R();return k.timeEnd(M),F}preventStop(){const R=this.injector.get(u.CorePreferences)["application.confirmExit"];if(R==="never")return!1;for(const P of this.contributions)if(P.onWillStop)try{if(P.onWillStop(this))return!0}catch(k){(0,o.getDebugLogger)().error(k)}return R==="always"}async preventStopElectron(){if(this.injector.get(u.CorePreferences)["application.confirmExit"]==="never")return!1;for(const P of this.contributions)if(P.onWillStop)try{if(await P.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(R){this.logger.error("Could not stop contribution",R)}}async stopContributionsElectron(){const M=[];for(const R of this.contributions)R.onStop&&M.push((async()=>{try{await R.onStop(this)}catch(P){this.logger.error("Could not stop contribution",P)}})());await Promise.all(M)}registerEventListeners(){window.addEventListener("beforeunload",this._handleBeforeUpload),window.addEventListener("unload",this._handleUnload),window.addEventListener("resize",this._handleResize),window.addEventListener("compositionstart",this._handleCompositionstart),window.addEventListener("compositionend",this._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,R){const P=()=>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:P},{token:y.PreferenceService,useClass:y.PreferenceServiceImpl}),R){const F=M.get(y.PreferenceProviderProvider)(y.PreferenceScope.Default);for(const L of Object.keys(R))F.setPreference(L,R[L])}}injectStorageProvider(M){M.addProviders({token:o.DefaultStorageProvider,useClass:o.DefaultStorageProvider}),M.addProviders({token:o.StorageProvider,useFactory:R=>P=>R.get(o.DefaultStorageProvider).get(P)}),(0,o.createContributionProvider)(M,o.StorageResolverContribution)}fireOnReload(M=!1){window.location.reload(M)}appendIconStyleSheets(M,R){const P=R?[S.DEFAULT_CDN_ICON,S.IDE_OCTICONS_CN_CSS,S.IDE_CODICONS_CN_CSS]:[];M&&M.length&&M.forEach(k=>{this.updateIconMap(k.prefix,k.iconMap),P.push(k.cssPath)});for(const k of P){const F=document.createElement("link");F.setAttribute("rel","stylesheet"),F.setAttribute("href",k),document.getElementsByTagName("head")[0].appendChild(F)}}updateIconMap(M,R){M==="kaitian-icon kticon-"&&this.logger.error(`The icon prefix '${M}' conflicts with the built-in icon, please check the icon configuration.`),(0,S.updateIconMap)(M,R)}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(){window.removeEventListener("beforeunload",this._handleBeforeUpload),window.removeEventListener("unload",this._handleUnload),window.removeEventListener("resize",this._handleResize),window.removeEventListener("compositionstart",this._handleCompositionstart),window.removeEventListener("compositionend",this._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(R){this.logger.error("Could not dispose contribution",R)}}detectRuntime(){return window.isElectronRenderer||typeof navigator=="object"&&typeof navigator.userAgent=="string"&&navigator.userAgent.indexOf("Electron")>=0?m.ESupportRuntime.Electron:m.ESupportRuntime.Web}}t.j=I},79248:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.App=u,t.renderClientApp=g;const n=e(85608),r=n.__importDefault(e(14041)),o=n.__importDefault(e(25873)),c=e(97267),p=e(43718),v=e(28003),m=e(68456),_=e(11050),s=e(52564),f=e(26542),a=e(67304),h=e(75206);function u(l){const y=l.app.injector,b=y.get(p.IEventBus),S=y.get(f.LabelService),A=r.default.useCallback((w,T)=>S.getIcon(p.URI.parse(w),T),[]);return r.default.useEffect(()=>{let w;const T=()=>{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",T),()=>{window.removeEventListener("resize",T)}},[]),r.default.createElement(c.ComponentContextProvider,{value:{getIcon:a.getIcon,localize:p.localize,getResourceIcon:A}},r.default.createElement(_.ConfigProvider,{value:l.app.config},r.default.createElement(l.main,{callback:l.callback}),l.overlays&&l.overlays.map((w,T)=>r.default.createElement(w,{key:T}))))}const d=l=>y=>{o.default.createRoot(l).render(r.default.createElement(y,null))},E=(0,p.getDebugLogger)();function g(l,y){let b=l.config.layoutComponent||v.DefaultLayout;const S=l.browserModules.filter(O=>O.isOverlay).map(O=>O.component?O.component:(E.warn("Overlay module does not have component",O),null)).filter(Boolean),A=l.injector;A.get(h.ClientAppContextContribution).getContributions().forEach(O=>b=O.registerClientAppContext(b,A));const D=O=>r.default.createElement(u,{...O,app:l,main:b,overlays:S});return(typeof y=="function"?y:d(y))(D)}},96302:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createConnectionService=m,t.bindConnectionServiceDeprecated=_;const n=e(8919),r=e(18740),o=e(76271),c=e(43718),p=e(16884),v=e(11050);async function m(f,a,h,u={}){var d;const E=f.get(v.AppConfig),g=f.get(c.IReporterService);h.setReporter(g);const l=f.get(c.IEventBus),y=f.get(p.ClientAppStateService),b=()=>{y.reachedState("core_module_initialized").then(()=>{l.fire(new c.BrowserConnectionOpenEvent)})};h.connection.isOpen()&&b(),h.connection.onOpen(()=>{b()}),h.connection.onClose(()=>{y.reachedState("core_module_initialized").then(()=>{l.fire(new c.BrowserConnectionCloseEvent)})}),h.connection.onError(T=>{y.reachedState("core_module_initialized").then(()=>{l.fire(new c.BrowserConnectionErrorEvent(T))})}),await h.initHandler(),f.addProviders({token:r.WSChannelHandler,useValue:h});const S=await h.openChannel(o.RPCServiceChannelPath),A=new n.RPCServiceCenter;return A.setSumiConnection(S.createSumiConnection(u)),!((d=E?.measure)===null||d===void 0)&&d.connection&&A.setReporter(g,E.measure.connection.minimumReportThresholdTime),s(f,a,A),f.get(c.ILogger).reportToServer(),S}function _(f,a,h){const u=new n.RPCServiceCenter,d=u.setConnection(h),E=h.onClose(()=>{d.dispose(),E.dispose()});s(f,a,u)}function s(f,a,h){const{getRPCService:u}=(0,n.initRPCService)(h),d=[],E=[];for(const g of a){const l=f.get(g);if(l.backServices)for(const y of l.backServices)d.push(y),y.protocol&&h.loadProtocol(y.protocol)}for(const g of d){const{servicePath:l}=g,y=u(l),b={token:l,useValue:y};f.addProviders(b),g.clientToken&&E.push(g)}for(const g of E){const{servicePath:l}=g,y=u(l);if(g.clientToken){const b=f.get(g.clientToken);y.onRequestService(b)}}}},75206:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ClientAppContextContribution=void 0,t.ClientAppContextContribution=Symbol("ClientAppContextContribution")},32796:(x,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:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.injectInnerProviders=Y;const n=e(43718),r=e(96405),o=e(16872),c=e(41480),p=e(12956),v=e(59555),m=e(18379),_=e(10605),s=e(66963),f=e(71707),a=e(80832),h=e(23396),u=e(77273),d=e(41118),E=e(37015),g=e(68456),l=e(75694),y=e(93899),b=e(77666),S=e(90697),A=e(73967),w=e(78132),T=e(68969),D=e(11719),I=e(52564),O=e(26542),M=e(52993),R=e(10845),P=e(40827),k=e(32242),F=e(99e3),L=e(42637),N=e(62652),j=e(27957),W=e(45670),U=e(66894),X=e(63921),V=e(75206),$=e(82493);function Y(G){(0,n.createContributionProvider)(G,s.ClientAppContribution),(0,n.createContributionProvider)(G,n.CommandContribution),(0,n.createContributionProvider)(G,u.FsProviderContribution),(0,n.createContributionProvider)(G,d.KeybindingContribution),(0,n.createContributionProvider)(G,y.MenuContribution),(0,n.createContributionProvider)(G,g.ComponentContribution),(0,n.createContributionProvider)(G,I.SlotRendererContribution),(0,n.createContributionProvider)(G,w.PreferenceContribution),(0,n.createContributionProvider)(G,W.VariableContribution),(0,n.createContributionProvider)(G,g.TabBarToolbarContribution),(0,n.createContributionProvider)(G,L.ToolBarActionContribution),(0,n.createContributionProvider)(G,k.StaticResourceContribution),(0,n.createContributionProvider)(G,V.ClientAppContextContribution);const H=[{token:n.IEventBus,useClass:n.EventBusImpl},{token:n.CommandService,useClass:n.CommandServiceImpl},{token:n.CommandRegistry,useClass:n.CommandRegistryImpl},{token:d.KeybindingRegistry,useClass:d.KeybindingRegistryImpl},{token:d.KeybindingService,useFactory:K=>K.get(d.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)},p.ClientAppStateService,{token:l.ILogger,useClass:l.Logger},{token:l.Logger,useAlias:l.ILogger},{token:g.ComponentRegistry,useClass:g.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:T.IProgressService,useClass:D.ProgressService},{token:L.IToolbarRegistry,useClass:j.NextToolbarRegistryImpl},{token:L.IToolbarPopoverRegistry,useClass:N.ToolbarPopoverRegistry},j.ToolbarClientAppContribution,{token:n.IProblemPatternRegistry,useClass:n.ProblemPatternRegistryImpl},{token:n.IProblemMatcherRegistry,useClass:n.ProblemMatchersRegistryImpl},{token:n.ITaskDefinitionRegistry,useClass:n.TaskDefinitionRegistryImpl},{token:S.IOpenerService,useClass:A.OpenerService},{token:U.IWindowService,useClass:X.WindowService},{token:n.IApplicationService,useClass:v.ApplicationService},{token:M.IClipboardService,useClass:M.BrowserClipboardService},{token:R.IExternalUriService,useClass:R.ExternalUriService},{token:n.IAuthenticationService,useClass:_.AuthenticationService},{token:O.ICryptoService,useClass:O.CryptoService},{token:O.ICredentialsService,useClass:O.CredentialsService},{token:r.IHashCalculateService,useClass:r.HashCalculateServiceImpl},{token:n.IExtensionsSchemaService,useClass:h.ExtensionsPointServiceImpl},{token:n.AppLifeCycleServiceToken,useClass:$.AppLifeCycleService},{token:k.StaticResourceService,useClass:F.StaticResourceServiceImpl},P.StaticResourceClientAppContribution,{token:f.ISplitPanelService,useClass:f.SplitPanelService},{token:n.IAIReporter,useClass:c.AIReporter},{token:a.IDesignStyleService,useClass:a.DesignStyleService},{token:m.ConnectionHelperFactory,useFactory:m.ConnectionHelperFactory}];G.addProviders(...H)}},82493:(x,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 c=class{constructor(){this.onDidChangeLifecyclePhaseEmitter=new o.Emitter,this.onDidLifeCyclePhaseChange=this.onDidChangeLifecyclePhaseEmitter.event}set phase(v){this.lifeCyclePhase=v,this.onDidChangeLifecyclePhaseEmitter.fire(this.lifeCyclePhase)}get phase(){return this.lifeCyclePhase}};t.AppLifeCycleService=c,t.AppLifeCycleService=c=n.__decorate([(0,r.Injectable)()],c)},99696:(x,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:(x,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 c extends o.BasicModule{}t.BrowserModule=c,n.__decorate([(0,r.Autowired)(t.IClientApp),n.__metadata("design:type",Object)],c.prototype,"app",void 0)},14109:(x,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.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(y){const b="file";y.NEW_FILE={id:"file.new",category:b,iconClass:(0,n.getIcon)("new-file")},y.RENAME_FILE={id:"file.rename",category:b},y.DELETE_FILE={id:"file.delete",category:b},y.NEW_FOLDER={id:"file.folder.new",category:b,iconClass:(0,n.getIcon)("new-folder")},y.COMPARE_SELECTED={id:"file.compare",category:b},y.OPEN_FILE={id:"file.open",category:b},y.SAVE_FILE={id:"file.save",category:b},y.COLLAPSE_ALL={id:"filetree.collapse.all",category:b,iconClass:(0,n.getIcon)("collapse-all")},y.REFRESH_ALL={id:"filetree.refresh.all",category:b,iconClass:(0,n.getIcon)("refresh")},y.OPEN_RESOURCES={id:"filetree.open.file",category:b},y.OPEN_TO_THE_SIDE={id:"filetree.open.side",category:b},y.OPEN_TYPE_WITH={id:"filetree.open.with",category:b},y.COPY_PATH={id:"filetree.copy.path",category:b,label:"%file.copy.path%"},y.COPY_RELATIVE_PATH={id:"filetree.copy.relativepath",category:b},y.COPY_FILE={id:"filetree.copy.file",category:b},y.CUT_FILE={id:"filetree.cut.file",category:b},y.PASTE_FILE={id:"filetree.paste.file",category:b},y.SELECT_CURRENT_NODE={id:"filetree.selectCurrentNode",category:b},y.LOCATION={id:"filetree.location",category:b},y.LOCATION_WITH_EDITOR={id:"filetree.location_with_editor",category:b,iconClass:(0,n.getIcon)("focus")},y.OPEN_FOLDER={id:"filetree.open.folder",category:b,label:"%file.open.folder%"},y.VSCODE_OPEN_FOLDER={id:"filetree.open.vscode_open_folder",category:b},y.OPEN_WORKSPACE={id:"filetree.open.workspace",category:b,label:"%file.open.workspace%"},y.SEARCH_ON_FOLDER={id:"filetree.search.folder",category:b},y.FOCUS_FILES={id:"filetree.focus.files",category:b,label:"%file.focus.files%"},y.FILTER_TOGGLE={id:"filetree.files.filter_toggle",category:b,iconClass:(0,n.getIcon)("retrieval")},y.FILTER_OPEN={id:"filetree.files.filter_open",category:b},y.OPEN_TERMINAL_WITH_PATH={id:"filetree.openTerminalWithPath",category:b},y.FILTER_CLOSE={id:"filetree.quitFilterMode",category:b},y.NEXT={id:"filetree.next",category:b},y.PREV={id:"filetree.prev",category:b},y.COLLAPSE={id:"filetree.collapse",category:b},y.EXPAND={id:"filetree.expand",category:b},y.REVEAL_IN_EXPLORER={id:"filetree.revealInExplorer",category:b},y.TOGGLE_OR_OPEN={id:"filetree.toggleOrOpen",category:b}})(r||(t.FILE_COMMANDS=r={}));var o;(function(y){const b="openeditors";y.SAVE_ALL={id:"opened.editors.save.all",category:b,iconClass:(0,n.getIcon)("save-all")},y.CLOSE_ALL={id:"opened.editors.close.all",category:b,iconClass:(0,n.getIcon)("close-all")},y.SAVE_BY_GROUP={id:"opened.editors.save.byGroup"},y.CLOSE_BY_GROUP={id:"opened.editors.close.byGroup"},y.OPEN={id:"opened.editors.open",category:b},y.CLOSE={id:"opened.editors.close",category:b},y.OPEN_TO_THE_SIDE={id:"opened.editors.openToTheSide",category:b},y.COMPARE_SELECTED={id:"opened.editors.compare",category:b},y.COPY_RELATIVE_PATH={id:"opened.editors.copyRelativePath",category:b},y.COPY_PATH={id:"opened.editors.copyPath",category:b},y.LOCATION={id:"opened.editors.location",category:b}})(o||(t.OPEN_EDITORS_COMMANDS=o={}));var c;(function(y){y.FIND={id:"core.find",label:"%common.find%"},y.REPLACE={id:"core.replace",label:"%common.replace%"},y.ABOUT_COMMAND={id:"core.about",label:"%common.about%"},y.OPEN_PREFERENCES={id:"core.openpreference",label:"%common.preference.open%"},y.LOCATE_PREFERENCES={id:"workbench.preferences.locate"},y.OPEN_KEYMAPS={id:"core.keymaps.open",label:"%common.keymaps.open%"},y.OPEN_LAUNCH_CONFIGURATION={id:"core.launchConfiguration.open",label:"%debug.action.open.configuration%"},y.ENVIRONMENT_VARIABLE={id:"core.environment.variable"}})(c||(t.COMMON_COMMANDS=c={}));var p;(function(y){const b="editor";y.API_OPEN_EDITOR_COMMAND_ID="_workbench.open",y.API_OPEN_DIFF_EDITOR_COMMAND_ID="_workbench.diff",y.API_OPEN_WITH_EDITOR_COMMAND_ID="_workbench.openWith",y.NEW_UNTITLED_FILE={id:"file.new.untitled",category:b,label:"%file.new%",iconClass:(0,n.getIcon)("new-file")},y.UNDO={id:"editor.undo",category:b,label:"%editor.undo%"},y.REDO={id:"editor.redo",category:b,label:"%editor.redo%"},y.SELECT_ALL={id:"editor.selectAll",category:b,label:"%selection.all%"},y.OPEN_RESOURCE={id:"editor.openUri",category:b},y.OPEN_RESOURCES={id:"editor.openUris",category:b},y.SAVE_URI={id:"editor.saveUri",category:b},y.SAVE_CURRENT={id:"editor.saveCurrent",category:b,label:"%editor.saveCurrent%"},y.FOCUS_IF_NOT_ACTIVATE_ELEMENT={id:"editor.focusIfNotActivateElement",category:b,label:"%editor.saveCurrent%"},y.COMPARE={id:"editor.compare",category:b},y.OPEN_MERGEEDITOR={id:"editor.open.mergeEditor",category:b},y.OPEN_MERGEEDITOR_DEV={id:"editor.open.mergeEditor.dev",category:"Merge Editor (Dev)",label:"Open Merge Editor State from Json"},y.MERGEEDITOR_RESET={id:"editor.mergeEditor.reset",category:b,label:"%mergeEditor.reset%"},y.CLOSE={id:"editor.close",category:b,label:"%editor.closeCurrent%"},y.CLOSE_ALL_IN_GROUP={id:"editor.closeAllInGroup",category:b,label:"%editor.closeAllInGroup%"},y.CLOSE_OTHER_IN_GROUP={id:"editor.closeOtherEditorsInGroup",category:b,label:"%editor.closeOtherEditors%"},y.CLOSE_ALL={id:"editor.closeAll",category:b,label:"%editor.close.all%"},y.CLOSE_SAVED={id:"editor.closeSaved",category:b,label:"%editor.closeSaved%"},y.SAVE_ALL={id:"editor.saveAll",category:b,label:"%editor.saveAll%"},y.CLOSE_TO_RIGHT={id:"editor.closeToRight",category:b,label:"%editor.closeToRight%"},y.GET_CURRENT={id:"editor.getCurrent",category:b},y.GET_CURRENT_RESOURCE={id:"editor.getCurrentResource",category:b},y.SPLIT_TO_LEFT={id:"editor.splitToLeft",category:b,label:"%editor.splitToLeft%"},y.SPLIT_TO_RIGHT={id:"editor.splitToRight",category:b,label:"%editor.splitToRight%"},y.SPLIT_TO_TOP={id:"editor.splitToTop",category:b,label:"%editor.splitToTop%"},y.SPLIT_TO_BOTTOM={id:"editor.splitToBottom",category:b,label:"%editor.splitToBottom%"},y.CHANGE_LANGUAGE={id:"editor.changeLanguage",category:b},y.CHANGE_ENCODING={id:"editor.changeEncoding",category:b},y.GET_ENCODING={id:"editor.getEncoding",category:b},y.CHANGE_EOL={id:"editor.changeEol",category:b},y.NAVIGATE_LEFT={id:"editor.navigateLeft",category:b},y.NAVIGATE_RIGHT={id:"editor.navigateRight",category:b},y.NAVIGATE_UP={id:"editor.navigateUp",category:b},y.NAVIGATE_DOWN={id:"editor.navigateDown",category:b},y.NAVIGATE_NEXT={id:"editor.navigateNext",category:b},y.NAVIGATE_PREVIOUS={id:"editor.navigatePrevious",category:b},y.PREVIOUS={id:"editor.previous",category:b},y.NEXT={id:"editor.next",category:b},y.PREVIOUS_IN_GROUP={id:"editor.previousInGroup",category:b},y.NEXT_IN_GROUP={id:"editor.nextInGroup",category:b},y.LAST_IN_GROUP={id:"editor.lastInGroup",category:b},y.CLOSE_OTHER_GROUPS={id:"editor.closeOtherGroup",category:b,label:"%editor.closeEditorsInOtherGroups%"},y.OPEN_EDITOR_AT_INDEX={id:"editor.openEditorAtIndex",category:b},y.EVEN_EDITOR_GROUPS={id:"editor.evenEditorGroups",category:b,label:"%editor.resetEditorGroups%"},y.REVERT_DOCUMENT={id:"editor.document.revert",category:b,label:"%editor.revert%"},y.REVERT_AND_CLOSE={id:"editor.revertAndClose",category:b},y.GO_FORWARD={id:"editor.goForward",category:b},y.GO_BACK={id:"editor.goBack",category:b},y.PIN_CURRENT={id:"editor.pinCurrent",category:b},y.COPY_CURRENT_PATH={id:"editor.copyCurrentPath",category:b},y.GO_TO_GROUP={id:"editor.goToGroup",category:b},y.MOVE_GROUP={id:"editor.moveGroup",category:b},y.REOPEN_CLOSED={id:"editor.reopenClosed",category:b},y.FOCUS={id:"editor.focus",category:b},y.TEST_TOKENIZE={id:"editor.tokenize.test",category:b,label:"%editor.tokenize.test%"},y.AUTO_SAVE={id:"editor.autoSave",category:b},y.FOCUS_ACTIVE_EDITOR_GROUP={id:"editor.focusActiveEditorGroup",category:b},y.COMPONENT_UNDO={id:"editor.componentUndo",category:b},y.COMPONENT_REDO={id:"editor.componentRedo"},y.SEARCH_WORKSPACE_SYMBOL={id:"editor.workspaceSymbol.quickopen",label:"%editor.workspaceSymbol.quickopen%",category:b},y.SEARCH_WORKSPACE_SYMBOL_CLASS={id:"editor.workspaceSymbolClass.quickopen",label:"%editor.workspaceSymbolClass.quickopen%",category:b},y.GO_TO_LINE={id:"editor.action.gotoLine",label:"%editor.goToLine%",category:b},y.QUICK_OPEN={id:"workbench.action.quickOpen",category:b,label:"%editor.quickOpen%"},y.TOGGLE_WORD_WRAP={id:"editor.toggleWordWrap",label:"%editor.toggleWordWrap%",category:b},y.TOGGLE_COLUMN_SELECTION={id:"editor.action.toggleColumnSelection",label:"%editor.action.toggleColumnSelection%",category:b},y.FORMAT_DOCUMENT={id:"editor.action.formatDocument",category:b},y.FORMAT_SELECTION={id:"editor.action.formatSelection",category:b},y.FORMAT_DOCUMENT_WITH={id:"editor.action.formatDocument.multiple",category:b,label:"%editor.formatDocument.label.multiple%"},y.FORMAT_SELECTION_WITH={id:"editor.action.formatSelection.multiple",category:b,label:"%editor.formatSelection.label.multiple%"},y.COPY_PATH={id:"editor.action.copyPath",category:b,label:"%editor.copyPath%"},y.COPY_RELATIVE_PATH={id:"editor.action.copyRelativePath",category:b,label:"%editor.copyRelativePath%"}})(p||(t.EDITOR_COMMANDS=p={}));var v;(function(y){const b="diff-editor";y.REVERT={id:"editor.diff.revert",category:b},y.ACCEPT={id:"editor.diff.accept",category:b},y.TOGGLE_COLLAPSE_UNCHANGED_REGIONS={id:"editor.diff.toggleCollapseUnchangedRegions",category:b}})(v||(t.DIFF_EDITOR_COMMANDS=v={}));var m;(function(y){const b="search";y.OPEN_SEARCH={id:"content-search.openSearch",category:b,label:"Open search sidebar"},y.REFRESH={id:"file-search.refresh",label:"refresh search",iconClass:(0,n.getIcon)("refresh"),category:b},y.CLEAN={id:"file-search.clean",label:"clean search",iconClass:(0,n.getIcon)("clear"),category:b},y.GET_RECENT_SEARCH_WORD={id:"search.getRecentSearchWordCmd",category:b},y.GET_BACK_RECENT_SEARCH_WORD={id:"search.getBackRecentSearchWordCmd",category:b},y.MENU_REPLACE={id:"search.menu.replace",category:b,label:"%search.replace.title%"},y.MENU_REPLACE_ALL={id:"search.menu.replaceAll",category:b,label:"%search.replaceAll.label%"},y.MENU_HIDE={id:"search.menu.hide",category:b,label:"%search.result.hide%"},y.MENU_COPY={id:"search.menu.copy",category:b,label:"%file.copy.file%"},y.MENU_COPY_ALL={id:"search.menu.copyAll",category:b,label:"%search.menu.copyAll%"},y.MENU_COPY_PATH={id:"search.menu.copyPath",category:b,label:"%file.copy.path%"},y.REPLACE={id:"search.replace",category:b},y.CLOSE={id:"search.close",category:b}})(m||(t.SEARCH_COMMANDS=m={}));var _;(function(y){const b="outline";y.OUTLINE_COLLAPSE_ALL={id:"outline.collapse.all",category:b},y.OUTLINE_FOLLOW_CURSOR={id:"outline.follow.cursor",category:b},y.OUTLINE_SORT_KIND={id:"outline.sort.kind",category:b},y.OUTLINE_SORT_NAME={id:"outline.sort.name",category:b},y.OUTLINE_SORT_POSITION={id:"outline.sort.position",category:b}})(_||(t.OUTLINE_COMMANDS=_={}));var s;(function(y){const b="workspace";y.ADD_WORKSPACE_FOLDER={id:"workspace.addFolderToWorkspace",label:"%workspace.addFolderToWorkspace%",category:b},y.REMOVE_WORKSPACE_FOLDER={id:"workspace.removeFolderFromWorkspace",label:"%workspace.removeFolderFromWorkspace%",category:b},y.SAVE_WORKSPACE_AS_FILE={id:"workspace.saveWorkspaceAsFile",label:"%workspace.saveWorkspaceAsFile%",category:b}})(s||(t.WORKSPACE_COMMANDS=s={}));var f;(function(y){const b="keyboard";y.CHOOSE_KEYBOARD_LAYOUT={id:"keyboard.chooseKeyboardLayout",label:"%keyboard.chooseKeyboardLayout%",category:b}})(f||(t.KEYBOARD_COMMANDS=f={}));var a;(function(y){const b="dialog";y.ENSURE={id:"dialog.ensure",category:b}})(a||(t.DIALOG_COMMANDS=a={}));var h;(function(y){y.CATEGORY="%terminal.name%",y.FOCUS_NEXT_TERMINAL={id:"workbench.action.terminal.focusNextPane",label:"%terminal.focusNext.inTerminalGroup%",category:y.CATEGORY},y.FOCUS_PREVIOUS_TERMINAL={id:"workbench.action.terminal.focusPreviousPane",label:"%terminal.focusPrevious.inTerminalGroup%",category:y.CATEGORY},y.SPLIT={id:"terminal.split",label:"%terminal.split%",category:y.CATEGORY},y.ADD={id:"terminal.add",label:"%terminal.new%",category:y.CATEGORY},y.REMOVE={id:"terminal.remove",label:"%terminal.remove%",category:y.CATEGORY},y.CLEAR={id:"terminal.clear",label:"%terminal.clear%",category:y.CATEGORY},y.OPEN_SEARCH={id:"terminal.search",label:"%terminal.search%",category:y.CATEGORY},y.SEARCH_NEXT={id:"terminal.search.next",label:"%terminal.search.next%",category:y.CATEGORY},y.OPEN_WITH_PATH={id:"terminal.openWithPath",category:y.CATEGORY},y.CLEAR_CONTENT={id:"terminal.clearContent",label:"%terminal.menu.clearCurrentContent%",category:y.CATEGORY},y.CLEAR_ALL_CONTENT={id:"terminal.clearAllContent",label:"%terminal.menu.clearAllContents%",category:y.CATEGORY},y.TAB_RENAME={id:"terminal.tabRename",category:y.CATEGORY},y.SELECT_ALL_CONTENT={id:"terminal.selectAllContent",label:"%terminal.menu.selectAllContent%",category:y.CATEGORY},y.MORE_SETTINGS={id:"terminal.moreSettings",label:"%terminal.menu.moreSettings%",category:y.CATEGORY},y.SELECT_TYPE={id:"terminal.selectType",category:y.CATEGORY},y.SELECT_ZSH={id:"terminal.selectTypeZsh",label:"zsh",category:y.CATEGORY},y.SELECT_BASH={id:"terminal.selectTypeBash",label:"bash",category:y.CATEGORY},y.SELECT_SH={id:"terminal.selectTypeSh",label:"sh",category:y.CATEGORY},y.SELECT_CMD={id:"terminal.selectTypeCMD",label:"cmd",category:y.CATEGORY},y.SELECT_POWERSHELL={id:"terminal.selectTypePowerShell",label:"powershell",category:y.CATEGORY},y.COPY={id:"terminal.copy",label:"%edit.copy%",category:y.CATEGORY},y.PASTE={id:"terminal.paste",label:"%edit.paste%",category:y.CATEGORY},y.SELECT_ALL={id:"terminal.selectAll",label:"%terminal.menu.selectCurrentContent%",category:y.CATEGORY},y.RE_LAUNCH={id:"terminal.relaunch",category:y.CATEGORY},y.TOGGLE_TERMINAL={id:"terminal.toggleTerminal",label:"%terminal.toggleTerminal%",category:y.CATEGORY},y.KILL_PROCESS={id:"terminal.killProcess",label:"%terminal.killProcess%",category:y.CATEGORY}})(h||(t.TERMINAL_COMMANDS=h={}));var u;(function(y){const b="view";y.QUICK_OPEN_VIEW={id:"layout.action.quickOpenView",category:b},y.OPEN_VIEW={id:"layout.action.openView",label:"%layout.action.openView%",category:b},y.MAXIMIZE_EDITOR={id:"layout.action.Maximizeeditor",category:b},y.TOGGLE_SIDEBAR_VISIBILITY={id:"main-layout.left-panel.toggle",category:b}})(u||(t.LAYOUT_COMMANDS=u={}));var d;(function(y){const b="marker";y.SHOW_ERRORS_WARNINGS={id:"marker.action.showErrorsWarnings",category:b},y.TOGGLE_SHOW_ERRORS_WARNINGS={id:"marker.action.toggleShowErrorsWarnings",category:b}})(d||(t.MARKER_COMMANDS=d={}));var E;(function(y){y.OPEN={id:"editor.action.quickCommand"},y.OPEN_OUTLINE={id:"editor.action.quickOutline"},y.OPEN_VIEW={id:"editor.action.quickView"},y.OPEN_WITH_COMMAND={id:"editor.action.quickCommand.withCommand"}})(E||(t.QUICK_OPEN_COMMANDS=E={}));var g;(function(y){const b="SCM";y.GetSCMResource={id:"scm.getResource",category:b},y._GIT_OPEN_MERGE_EDITOR={id:"_git.openMergeEditor"},y.GIT_OPEN_MERGE_EDITOR={id:"git.openMergeEditor"}})(g||(t.SCM_COMMANDS=g={}));var l;(function(y){const b="MergeConflict";y.AI_ACCEPT={id:"merge-conflict.ai.accept",category:b},y.ALL_RESET={id:"merge-conflict.ai.all-reset",category:b},y.AI_ALL_ACCEPT={id:"merge-conflict.ai.all-accept",category:b},y.AI_ALL_ACCEPT_STOP={id:"merge-conflict.ai.all-accept-stop",category:b}})(l||(t.MERGE_CONFLICT_COMMANDS=l={}))},22780:(x,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),c=e(43718),p=e(53736),v=e(18193),m=e(22366),_=e(41118),s=e(1149),f=e(64102),a=e(39496),h=e(78132),u=e(11050),d=e(14109),E=e(66549);t.inputFocusedContextKey="inputFocus",t.locationProtocolContextKey="locationProtocol";let g=class{constructor(){this.schema=v.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 S of b)this.schema.properties[S].default=y[S]||this.schema.properties[S].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);c.Event.once(b.onDidBlur)(()=>{this.inputFocusedContext.set(this.activeElementIsInput()),b.dispose()})}}registerCommands(y){y.registerCommand(d.EDITOR_COMMANDS.UNDO),y.registerCommand(d.EDITOR_COMMANDS.REDO),y.registerCommand(d.EDITOR_COMMANDS.SELECT_ALL),y.registerCommand(d.COMMON_COMMANDS.ABOUT_COMMAND,{execute:()=>{alert((0,c.replaceLocalizePlaceholder)(this.appConfig.appName))}})}registerMenus(y){y.registerMenubarItem(a.MenuId.MenubarFileMenu,{label:(0,c.localize)("menu-bar.title.file"),order:1,iconClass:(0,o.getIcon)("menubar-file")}),y.registerMenubarItem(a.MenuId.MenubarEditMenu,{label:(0,c.localize)("menu-bar.title.edit"),order:2,iconClass:(0,o.getIcon)("menubar-edit")}),y.registerMenubarItem(a.MenuId.MenubarSelectionMenu,{label:(0,c.localize)("menu-bar.title.selection"),order:3,iconClass:(0,o.getIcon)("menubar-selection")}),y.registerMenubarItem(a.MenuId.MenubarViewMenu,{label:(0,c.localize)("menu-bar.title.view"),order:4,iconClass:(0,o.getIcon)("menubar-view")}),y.registerMenubarItem(a.MenuId.MenubarGoMenu,{label:(0,c.localize)("menu-bar.title.go"),order:5,iconClass:(0,o.getIcon)("menubar-go")}),y.registerMenubarItem(a.MenuId.MenubarTerminalMenu,{label:(0,c.localize)("menu-bar.title.terminal"),order:5,iconClass:(0,o.getIcon)("terminal")}),y.registerMenubarItem(a.MenuId.MenubarHelpMenu,{label:(0,c.localize)("menu-bar.title.help"),order:999,iconClass:(0,o.getIcon)("question-circle")}),y.registerMenuItems(a.MenuId.MenubarFileMenu,[{command:d.FILE_COMMANDS.OPEN_FOLDER.id,group:"1_open",when:"config.application.supportsOpenFolder"},{command:d.FILE_COMMANDS.OPEN_WORKSPACE.id,group:"1_open",when:"config.application.supportsOpenWorkspace"},{command:d.WORKSPACE_COMMANDS.ADD_WORKSPACE_FOLDER.id,group:"1_open",when:"config.workspace.supportMultiRootWorkspace"},{command:d.WORKSPACE_COMMANDS.SAVE_WORKSPACE_AS_FILE.id,group:"1_open",when:"config.workspace.supportMultiRootWorkspace"},{command:d.EDITOR_COMMANDS.NEW_UNTITLED_FILE.id,group:"2_new"},{command:{id:d.EDITOR_COMMANDS.SAVE_CURRENT.id,label:(0,c.localize)("file.save")},group:"3_save"},{command:{id:d.EDITOR_COMMANDS.SAVE_ALL.id,label:(0,c.localize)("file.saveAll")},group:"3_save"},{command:{id:d.EDITOR_COMMANDS.AUTO_SAVE.id,label:(0,c.localize)("file.autoSave")},toggledWhen:"config.editor.autoSave != off",group:"4_autosave"}]),y.registerMenuItems(a.MenuId.MenubarGoMenu,[{command:{id:d.EDITOR_COMMANDS.GO_BACK.id,label:(0,c.localize)("editor.goBack")},group:"1_go"},{command:{id:d.EDITOR_COMMANDS.GO_FORWARD.id,label:(0,c.localize)("editor.goForward")},group:"1_go"},{command:{id:d.EDITOR_COMMANDS.QUICK_OPEN.id,label:(0,c.localize)("editor.quickOpen")},group:"2_go_file"},{command:{id:d.EDITOR_COMMANDS.SEARCH_WORKSPACE_SYMBOL.id,label:(0,c.localize)("editor.workspaceSymbol.quickopen")},group:"2_go_file"},{command:{id:d.EDITOR_COMMANDS.GO_TO_LINE.id,label:(0,c.localize)("editor.goToLine")},group:"3_go_infile"},{command:{id:"editor.action.jumpToBracket",label:(0,c.localize)("menu-bar.go.jumpToBracket")},group:"3_go_infile"},{command:{id:"editor.action.marker.nextInFiles",label:(0,c.localize)("menu-bar.go.nextProblemInFiles")},group:"6_go_problem"},{command:{id:"editor.action.marker.prevInFiles",label:(0,c.localize)("menu-bar.go.prevProblemInFiles")},group:"6_go_problem"}]),y.registerMenuItems(a.MenuId.MenubarTerminalMenu,[{command:{id:d.TERMINAL_COMMANDS.ADD.id,label:d.TERMINAL_COMMANDS.ADD.label},group:"1_terminal"},{command:{id:d.TERMINAL_COMMANDS.SPLIT.id,label:d.TERMINAL_COMMANDS.SPLIT.label},group:"1_terminal"}])}registerKeybindings(y){y.registerKeybinding({command:d.EDITOR_COMMANDS.SELECT_ALL.id,keybinding:"ctrlcmd+a",when:"editorFocus"}),y.registerKeybinding({command:d.EDITOR_COMMANDS.UNDO.id,keybinding:"ctrlcmd+z",when:"editorFocus"}),y.registerKeybinding({command:d.EDITOR_COMMANDS.REDO.id,keybinding:"ctrlcmd+shift+z",when:"editorFocus"})}};t.ClientCommonContribution=g,n.__decorate([(0,r.Autowired)(c.CommandService),n.__metadata("design:type",Object)],g.prototype,"commandService",void 0),n.__decorate([(0,r.Autowired)(p.IContextKeyService),n.__metadata("design:type",Object)],g.prototype,"contextKeyService",void 0),n.__decorate([(0,r.Autowired)(u.AppConfig),n.__metadata("design:type",Object)],g.prototype,"appConfig",void 0),n.__decorate([(0,r.Autowired)(s.LayoutViewSizeConfig),n.__metadata("design:type",s.LayoutViewSizeConfig)],g.prototype,"layoutViewSize",void 0),t.ClientCommonContribution=g=n.__decorate([(0,c.Domain)(c.CommandContribution,E.ClientAppContribution,h.PreferenceContribution,f.MenuContribution,_.KeybindingContribution),n.__metadata("design:paramtypes",[])],g)},66549:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ClientAppContribution=void 0,t.ClientAppContribution=Symbol("ClientAppContribution")},34505:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ClientCommonModule=void 0;const n=e(85608),r=e(76003),o=e(16908),c=e(43718),p=e(37638),v=e(36206),m=e(136),_=e(90697),s=e(45829),f=e(44867),a=e(22780),h=e(10797),u=e(17821);let d=class extends v.BrowserModule{constructor(){super(...arguments),this.contributionProvider=[_.OpenerContribution],this.providers=[a.ClientCommonContribution,f.DefaultOpenerContribution,f.OpenerContributionClient,p.AuthenticationContribution,m.HashCalculateContribution],this.electronProviders=[h.ClientElectronCommonContribution,s.ElectronOpenerContributionClient],this.webProviders=[u.ClientWebCommonContribution],this.backServices=[{servicePath:c.CommonServerPath,protocol:o.CommonServerProtocol},{servicePath:c.KeytarServicePath},{servicePath:c.CryptoServicePath}]}};t.ClientCommonModule=d,t.ClientCommonModule=d=n.__decorate([(0,r.Injectable)()],d)},98881:(x,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 c=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=c,n.__decorate([(0,r.Autowired)(o.StorageProvider),n.__metadata("design:type",Function)],c.prototype,"getStorage",void 0),t.RecentStorage=c=n.__decorate([(0,r.Injectable)()],c)},30144:(x,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:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ClientElectronCommonContribution=void 0;const n=e(85608),r=e(76003),o=e(43718),c=e(64102),p=e(39496),v=e(11050);let m=class{registerMenus(s){s.registerMenubarItem(p.MenuId.MenubarAppMenu,{label:(0,o.localize)("app.name",this.appConfig.appName),order:0}),s.registerMenuItems(p.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(p.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)(v.AppConfig),n.__metadata("design:type",Object)],m.prototype,"appConfig",void 0),t.ClientElectronCommonContribution=m=n.__decorate([(0,o.Domain)(c.MenuContribution)],m)},66963:(x,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:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ClientWebCommonContribution=void 0;const n=e(85608),r=e(43718),o=e(64102),c=e(39496),p=e(14109);let v=class{registerMenus(_){_.registerMenuItems(c.MenuId.MenubarEditMenu,[{command:p.EDITOR_COMMANDS.REDO.id,group:"1_undo"},{command:p.EDITOR_COMMANDS.UNDO.id,group:"1_undo"}]),_.registerMenuItem(c.MenuId.MenubarHelpMenu,{command:{id:p.COMMON_COMMANDS.ABOUT_COMMAND.id,label:p.COMMON_COMMANDS.ABOUT_COMMAND.label},nativeRole:"about",group:"0_about"})}};t.ClientWebCommonContribution=v,t.ClientWebCommonContribution=v=n.__decorate([(0,r.Domain)(o.MenuContribution)],v)},25918:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TitleActionList=t.InlineActionWidget=t.MenuActionList=void 0,t.InlineActionBar=l,t.InlineMenuBar=y;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importStar(e(14041)),c=e(97267),p=e(45803),v=e(43718),m=e(93899),_=e(48560),s=e(79951),f=e(55693),a=n.__importDefault(e(17647)),h=n.__importDefault(e(54859)),u=({data:b,hasSubmenu:S,disabled:A,iconService:w,hasChecked:T})=>o.default.createElement("div",{className:(0,r.default)(h.default.menuAction,{[h.default.disabled]:A,[h.default.checked]:b.checked})},o.default.createElement("div",{className:(0,r.default)({[h.default.icon]:T})},b.checked?o.default.createElement(c.Icon,{icon:"check"}):null),o.default.createElement("div",{className:h.default.label},b.label?(0,s.transformLabelWithCodicon)(v.strings.mnemonicButtonLabel(b.label,!0),{margin:"0 3px"},w?.fromString.bind(w)):""),o.default.createElement("div",{className:h.default.tip},b.keybinding?o.default.createElement("div",{className:h.default.shortcut},b.keybinding):null,S?o.default.createElement("div",{className:h.default.submenuIcon},o.default.createElement(c.Icon,{icon:"right"})):null,!b.keybinding&&!S&&b.extraDesc&&o.default.createElement("div",{className:h.default.extraDesc},b.extraDesc))),d=({data:b=[],context:S=[],afterClick:A,style:w,iconService:T,renderSubMenuTitle:D,renderMenuItem:I})=>{if(!b.length)return null;const O=o.default.useCallback(k=>{const{key:F,item:L}=k;if([m.SeparatorMenuItemNode.ID,m.SubmenuItemNode.ID].includes(F))return;const j=(Array.isArray(L.props.children)?L.props.children[0]:L.props.children).props.data;j&&(typeof j.execute=="function"&&j.execute(S),typeof A=="function"&&A(j))},[b,S]),M=o.default.useCallback((k,F)=>{if(D){const L=D(k,{hasSubmenu:!0,disabled:!1});if(L)return L}return o.default.createElement(u,{hasChecked:F,hasSubmenu:!0,data:k,iconService:T})},[D]),R=o.default.useCallback((k,F)=>{if(I){const L=I(k,{hasSubmenu:!1,disabled:k.disabled});if(L)return L}return o.default.createElement(u,{hasChecked:F,data:k,disabled:k.disabled,iconService:T})},[I]),P=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 j=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(p.Menu.SubMenu,{key:`${L.id}-${L.submenuId}-${N}`,className:h.default.submenuItem,popupClassName:"kt-menu",title:M(L,F)},P(L.children)),j?o.default.createElement(p.Menu.Divider,{key:`divider-${N}`,className:h.default.menuItemDivider}):null):o.default.createElement(o.default.Fragment,{key:`${L.id}-${N}`},o.default.createElement(p.Menu.Item,{id:`${L.id}-${N}`,key:`${L.id}-${N}`,className:h.default.menuItem,disabled:L.disabled},R(L,F)),j?o.default.createElement(p.Menu.Divider,{key:`divider-${N}`,className:h.default.menuItemDivider}):null)})},[]);return o.default.createElement(p.Menu,{className:"kt-menu",selectable:!1,motion:{motionLeave:!1,motionEnter:!1},builtinPlacements:a.default,onClick:O,style:w},P(b))};t.MenuActionList=d;const E=({type:b,icon:S,disabled:A,onClick:w,title:T})=>{const D=(0,f.useDesignStyles)(h.default.btnAction,"btnAction");if(b==="icon")return o.default.createElement(c.Button,{size:"small",type:b,className:D,onClick:w,title:T,icon:S||"ellipsis"});const I={};return(0,v.isBoolean)(A)&&(I.disabled=A),o.default.createElement(c.Button,{size:"small",type:"secondary",className:D,onClick:w,...I,title:T},o.default.createElement(c.Icon,{icon:S||"ellipsis"}))};E.displayName="EllipsisWidget",t.InlineActionWidget=o.default.memo(({iconService:b,type:S="icon",data:A,context:w=[],className:T,afterClick:D,...I})=>{const O=(0,f.useDesignStyles)(h.default.iconAction,"iconAction"),M=(0,f.useDesignStyles)(h.default.btnAction,"btnAction"),[R,P]=(0,o.useState)(!1),k=o.default.useCallback(async(j,...W)=>{if(j&&(j.preventDefault(),j.stopPropagation()),!R){if(P(!0),A.id===m.SubmenuItemNode.ID&&j){const U={x:j.clientX,y:j.clientY};await A.execute([U,...w])}else typeof A.execute=="function"&&await A.execute([...w,...W]);P(!1),typeof D=="function"&&D()}},[A,w]),[F,L]=o.default.useMemo(()=>{let j=A.tooltip||A.label;const W=A.label;return A.keybinding&&(j=`${j} (${A.keybinding})`),[j,W]},[A]),N=A.id===m.SubmenuItemNode.ID;return S==="icon"&&!A.type?o.default.createElement(c.Button,{type:A.icon?"icon":"link",className:(0,r.default)(O,T,{[h.default.disabled]:A.disabled,[h.default.submenuIconAction]:N}),title:F,iconClass:A.icon,onClick:k,...I},!A.icon&&L):A.type==="checkbox"?o.default.createElement(c.CheckBox,{className:(0,r.default)(T,M),disabled:A.disabled,label:A.label,title:F,checked:A.checked,onChange:j=>k(void 0,j.target.checked),...I}):o.default.createElement(c.Button,{loading:R,className:(0,r.default)(T,M),disabled:A.disabled,onClick:k,size:"small",type:A.type,title:F,...I},(0,s.transformLabelWithCodicon)(L,{margin:"0 3px"},b?.fromString.bind(b)),N&&o.default.createElement(c.Icon,{icon:"down",className:"kt-button-secondary-more"}))}),t.InlineActionWidget.displayName="InlineAction";const g=({data:b,context:S})=>{const A=o.default.useCallback(()=>b.getExecuteArgs(S),[b,S]);return o.default.createElement(b.component,{getExecuteArgs:A})};g.displayName="CustomAction",t.TitleActionList=o.default.memo(({type:b="icon",nav:S=[],more:A=[],moreIcon:w,moreTitle:T,context:D=[],extraNavActions:I=[],moreAtFirst:O=!1,className:M,afterClick:R,menuId:P,iconService:k,regroup:F=(...L)=>L})=>{const L=(0,_.useInjectable)(m.ICtxMenuRenderer),N=(0,_.useInjectable)(m.AbstractMenuService),j=(0,f.useDesignStyles)(h.default.titleActions,"titleActions"),[W,U]=F(S,A),X=o.default.useCallback($=>{$.preventDefault(),$.stopPropagation(),U&&L.show({anchor:{x:$.clientX,y:$.clientY},menuNodes:U,args:D,onHide:R})},[U,D]);if(W.length===0&&U.length===0&&I.length===0)return null;const V=U.length>0?o.default.createElement(E,{disabled:U[0].disabled,icon:w,type:b,onClick:X,title:T}):null;return o.default.createElement("div",{className:(0,r.default)([j,M]),"data-menu-id":P},O&&V,W.map($=>{if($.id===m.ComponentMenuItemNode.ID)return o.default.createElement(g,{context:D,data:$,key:$.nodeId});if($.id===m.SubmenuItemNode.ID){const G=N.createMenu($.submenuId);if(!((0,m.generateMergedCtxMenu)({menus:G}).length>0))return}if($.id===m.SeparatorMenuItemNode.ID)return o.default.createElement("span",{key:`vertical-divider-${$.id}`,className:h.default.verticalDivider});const Y=$.id===m.SubmenuItemNode.ID?$.submenuId:$.id;return o.default.createElement(t.InlineActionWidget,{id:Y,key:Y,className:(0,r.default)({[h.default.selected]:$.checked}),type:b,data:$,afterClick:R,context:D,iconService:k})}),Array.isArray(I)&&I.length?o.default.createElement(o.default.Fragment,null,W.length&&o.default.createElement("span",{className:h.default.divider}),I):null,!O&&V)}),t.TitleActionList.displayName="TitleActionList";function l(b){const{menus:S,context:A,separator:w="navigation",debounce:T,isFlattenMenu:D=!1,...I}=b,[O,M]=(0,f.useMenus)(S,w,A,T),R=(0,o.useMemo)(()=>D?[...O,...M]:O,[O,M,D]);return o.default.createElement(t.TitleActionList,{menuId:S.menuId,nav:R,more:w==="inline"||D?[]:M,...I})}function y(b){const{iconService:S,menus:A,context:w,moreIcon:T,moreTitle:D,separator:I="navigation",...O}=b,[M,R]=(0,f.useContextMenus)(A);return o.default.createElement(t.TitleActionList,{menuId:A.menuId,nav:M,more:I==="inline"?[]:R,moreIcon:T,moreTitle:D,context:w,iconService:S,...O})}y.displayName="InlineMenuBar"},17647:(x,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:(x,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)),c=e(43718),p=e(70650),v=e(22689),m=e(48560),_=e(57995),s=e(24951),f=e(49716),a=e(52141),h=n.__importDefault(e(27410)),u=(0,v.createLayoutEventType)(c.AIInlineChatContentWidgetId),d=new CustomEvent(u,{bubbles:!0}),E=g=>{const{operationList:l,moreOperation:y,showClose:b=!0,onClickItem:S,onClose:A,customOperationRender:w,loading:T,loadingShowOperation:D=!1}=g,I=o.default.useRef(null),[O,M]=(0,m.useHover)(),R=(0,m.useInjectable)(p.AINativeConfigService),P=(0,o.useCallback)(()=>{A?.()},[A]);(0,m.useChange)(M,()=>{var N;(N=I.current)===null||N===void 0||N.dispatchEvent(d)});const k=(0,o.useMemo)(()=>{const N=R?.inlineChat.logo;return typeof N=="string"?o.default.createElement("img",{src:N,className:h.default.ai_action_icon}):o.default.isValidElement(N)?N:typeof N=="function"?o.default.createElement(N,null):null},[R?.inlineChat.logo]),F=(0,o.useCallback)(()=>T&&D?o.default.createElement("div",{className:h.default.loading_mask}):null,[T,D]),L=(0,o.useCallback)(()=>{if(T&&!D)return null;const N=o.default.createElement(o.default.Fragment,null,l?.map(({name:j,title:W,id:U},X)=>W?o.default.createElement(a.EnhancePopover,{id:U,title:W,key:`popover_${X}`},o.default.createElement(_.EnhanceIcon,{wrapperClassName:h.default.operate_item,onClick:()=>S?.(U)},o.default.createElement("span",{key:X},j))):o.default.createElement(_.EnhanceIcon,{wrapperClassName:h.default.operate_item,onClick:()=>S?.(U),key:X},o.default.createElement("span",null,j))),y?.length?o.default.createElement(_.EnhanceIconWithCtxMenu,{icon:"more",menuNodes:y,wrapperClassName:h.default.operate_btn,skew:{x:-83,y:5}}):null);return o.default.createElement("div",{ref:O,className:h.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:h.default.custom_operation_wrapper},w):o.default.createElement("div",{className:h.default.default_operation_wrapper},N))},[w,l,y,T,D,k]);return o.default.createElement("div",{ref:I,className:(0,r.default)(h.default.ai_action_wrapper,T&&h.default.loading,D&&h.default.loading_show_operation)},o.default.createElement(o.default.Fragment,null,o.default.createElement("div",{className:h.default.stable_container},T?o.default.createElement(a.EnhancePopover,{id:"inline_chat_loading",title:(0,c.localize)("aiNative.inline.chat.operate.loading.cancel")},o.default.createElement(f.Loading,{className:h.default.loading_icon})):k?o.default.createElement("div",{className:h.default.logo_container},k):null),L(),b&&o.default.createElement("div",{className:h.default.close_container},o.default.createElement(s.LineVertical,{height:"100%",margin:"0px 8px",maxHeight:14,minHeight:14}),o.default.createElement(_.EnhanceIcon,{wrapperClassName:h.default.operate_btn,icon:"window-close",onClick:P}))))};t.AIAction=E},66205:(x,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)),c=p=>r.default.createElement("div",{className:o.default.inline_chat_container_panel,style:p.style},p.children);t.ContentWidgetContainerPanel=c},57995:(x,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)),c=e(43718),p=e(81878),v=e(97222),m=e(48560),_=n.__importDefault(e(42798));t.EnhanceIcon=o.default.forwardRef((a,h)=>o.default.createElement("div",{className:(0,r.default)(a.wrapperClassName,_.default.ai_enhance_icon),style:a.wrapperStyle,onClick:a.onClick,ref:h,tabIndex:a.tabIndex,role:a.role,"aria-label":a.ariaLabel,"aria-pressed":a.ariaPressed},o.default.createElement(p.Icon,{className:(0,r.default)(a.className,_.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:_.default.children_wrap},a.children)));const s=a=>{const{children:h,menuNodes:u,skew:d,id:E,...g}=a,l=(0,m.useInjectable)(c.CommandService),y=(0,m.useInjectable)(v.IBrowserCtxMenu),[b,S]=o.default.useState(void 0),A=o.default.useRef(null);o.default.useEffect(()=>{w()},[A.current,d]);const w=(0,o.useCallback)(D=>{requestAnimationFrame(()=>{if(A.current){const I=A.current.getBoundingClientRect(),{x:O,y:M,width:R,height:P}=I,k={x:O+R,y:M+P};d&&(k.x+=d.x,k.y+=d.y),S(k),D&&D(k)}})},[A.current,d]),T=o.default.useCallback(()=>{b&&(u?w(D=>{y.show({anchor:D,menuNodes:u})}):E&&l.executeCommand(E))},[A.current,u,b,E]);return o.default.createElement(t.EnhanceIcon,{ref:A,onClick:T,...g},h)};t.EnhanceIconWithCtxMenu=s;const f=a=>o.default.createElement("div",{className:(0,r.default)(_.default.ai_logo_avatar_container,a.className)},o.default.createElement(p.Icon,{icon:"magic-wand",className:(0,r.default)(a.iconClassName,_.default.avatar_icon)}));t.AILogoAvatar=f},89195:(x,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:(x,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)),c=e(57995),p=e(24951),v=e(75777),m=n.__importDefault(e(5011)),_=s=>{const{iconItems:f,isRenderThumbs:a=!0,isRenderClose:h=!1,closeClick:u}=s;return o.default.createElement("div",{className:m.default.ai_inline_result_panel},o.default.createElement("div",{className:m.default.side},f.map(({icon:d,text:E,onClick:g,btnType:l},y)=>o.default.createElement(c.EnhanceIcon,{wrapperClassName:(0,r.default)(m.default.operate_btn,l==="default"?m.default.default:""),icon:d,onClick:g,key:y},o.default.createElement("span",null,E)))),a&&o.default.createElement(o.default.Fragment,null,o.default.createElement(p.LineVertical,{height:"60%",margin:"0px 6px 0 6px"}),o.default.createElement("div",{className:m.default.side},o.default.createElement(v.Thumbs,{wrapperClassName:m.default.operate_icon}))),h&&o.default.createElement(o.default.Fragment,null,o.default.createElement(c.EnhanceIcon,{wrapperClassName:m.default.operate_btn,icon:"close",onClick:u})))};t.AIInlineResult=_},83913:(x,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)),c=e(97267),p=e(43718),v=e(37015),m=e(48560),_=e(7369),s=e(89195),f=n.__importDefault(e(42348)),a=160,h=32,u="ai-native-chat-input-history",d=10;t.InteractiveInput=o.default.forwardRef((E,g)=>{const{placeholder:l,onKeyDown:y,onBlur:b,onValueChange:S,onHeightChange:A,onFocus:w,onSend:T,onStop:D,disabled:I=!1,className:O,height:M,width:R,sendBtnClassName:P,popoverPosition:k,autoFocus:F,defaultValue:L}=E,N=(0,o.useRef)(null),j=(0,m.useInjectable)(_.GlobalBrowserStorageService),W=(0,o.useRef)(),U=(0,o.useRef)(0),[X,V]=(0,o.useState)(L||E.value||""),[$,Y]=(0,o.useState)(M||h),[G,H]=(0,o.useState)(!1),K=o.default.useRef(!1);(0,o.useImperativeHandle)(g,()=>N.current),(0,o.useEffect)(()=>{const ve=j.getData(u);ve&&(W.current=ve)},[]),(0,o.useEffect)(()=>{N&&N.current&&F&&N.current.focus()},[N]),(0,o.useEffect)(()=>{var ve;const ie=E.value;(0,p.isUndefined)(ie)||ie!==((ve=N.current)===null||ve===void 0?void 0:ve.value)&&V(ie||"")},[E.value,X,N]),(0,o.useEffect)(()=>{(0,p.isUndefined)(M)||M!==$&&Y(M)},[M,$,A]),(0,o.useEffect)(()=>{if(!X){Y(h);return}if(N&&N.current&&$<=a){N.current.style.height="0px";const ve=N.current.scrollHeight;N.current.style.height=Math.min(ve,a)+"px";const ie=Math.min(ve+12,a);Y(ie)}},[N,X,A,$]),(0,o.useEffect)(()=>{A?.($)},[$]);const Z=(0,o.useCallback)(ve=>{K.current=!0,V(ve),S?.(ve)},[S]),Q=(0,o.useCallback)(ve=>{H(!0),w?.(ve)},[w]),oe=(0,o.useCallback)(ve=>{H(!1),b?.(ve)},[b]),ne=(0,o.useCallback)(()=>{D&&D()},[]),he=(0,o.useCallback)(()=>{I||X.trim()&&(W.current=W.current||[],W.current.push(X),U.current=0,j.setData(u,W.current.slice(-d)),K.current=!1,T?.(X))},[T,X,I]),_e=(0,o.useCallback)(ve=>{var ie,fe,Me;if(ve.key===v.Key.ENTER.code&&!ve.nativeEvent.isComposing){if(ve.shiftKey)return;ve.preventDefault(),he();return}else if((ve.key===v.Key.ARROW_UP.code||ve.key===v.Key.ARROW_DOWN.code)&&(!X||!K.current)){if(ve.preventDefault(),ve.key===v.Key.ARROW_UP.code){const Le=(ie=W.current)===null||ie===void 0?void 0:ie[W.current.length-1-U.current];Le&&(V(Le),S?.(Le),U.current=Math.min(U.current+1,((fe=W.current)===null||fe===void 0?void 0:fe.length)||0))}else if(ve.key===v.Key.ARROW_DOWN.code){ve.preventDefault();const Le=(Me=W.current)===null||Me===void 0?void 0:Me[W.current.length-1-U.current];Le&&(V(Le),S?.(Le),U.current=Math.max(U.current-1,0))}}y?.(ve)},[y,he,X]),q=(0,o.useMemo)(()=>o.default.createElement("div",{className:f.default.input_icon_container},o.default.createElement("div",{className:(0,r.default)(f.default.send_chat_btn,G&&f.default.active,I&&f.default.disabled,P)},I?D?o.default.createElement(c.Popover,{id:`ai_chat_input_send_${(0,p.uuid)(4)}`,content:(0,p.localize)("aiNative.chat.enter.send"),delay:1500,position:k??c.PopoverPosition.top,disable:I},o.default.createElement(s.EnhanceIcon,{wrapperClassName:f.default.stop_icon,className:"codicon codicon-debug-stop",onClick:ne,tabIndex:0,role:"button",ariaLabel:(0,p.localize)("aiNative.chat.enter.send")})):o.default.createElement("div",{className:f.default.ai_loading},o.default.createElement("div",{className:f.default.loader}),o.default.createElement("div",{className:f.default.loader}),o.default.createElement("div",{className:f.default.loader})):o.default.createElement(c.Popover,{id:`ai_chat_input_send_${(0,p.uuid)(4)}`,content:(0,p.localize)("aiNative.chat.enter.send"),delay:1500,position:k??c.PopoverPosition.top,disable:I},o.default.createElement(s.EnhanceIcon,{wrapperClassName:f.default.send_icon,className:(0,c.getIcon)("send-solid"),onClick:he,tabIndex:0,role:"button",ariaLabel:(0,p.localize)("aiNative.chat.enter.send")})))),[G,I,P,X,k]),Re=(0,o.useMemo)(()=>(0,p.isUndefined)(R)?"100%":R+"px",[R]);return o.default.createElement(c.TextArea,{ref:N,placeholder:l,wrapperStyle:{height:$+"px",width:Re},style:{height:$-10+"px"},value:X,onKeyDown:_e,onFocus:Q,onBlur:oe,onValueChange:Z,disabled:I,className:(0,r.default)(f.default.interactive_input_container,G?f.default.active:null,O),addonAfter:q})}),t.InteractiveInput.displayName="interactiveInput"},24951:(x,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"},c={backgroundColor:"var(--editorGroup-border)",width:"100%",height:"1px",minHeight:"1px"},p=m=>r.default.createElement("span",{style:{...o,...m}});t.LineVertical=p;const v=m=>r.default.createElement("span",{style:{...c,...m}});t.HorizontalVertical=v},49716:(x,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)),c=e(97267),p=n.__importDefault(e(43135));t.Loading=o.default.memo(v=>o.default.createElement(c.Icon,{className:(0,r.default)(v.className,p.default.loading_indicator),iconClass:(0,c.getIcon)("loading")})),t.Loading.displayName="Loading"},52141:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EnhancePopover=void 0;const r=e(85608).__importStar(e(14041)),o=e(97267),c=e(43718),p=v=>{const{children:m,id:_,title:s,onClick:f}=v,[a,h]=r.default.useState(!1),u=(0,r.useMemo)(()=>_+(0,c.uuid)(6),[_]),d=(0,r.useCallback)(g=>{h(!1),f&&f(g)},[f]),E=(0,r.useCallback)(g=>{h(g)},[]);return r.default.createElement(o.Popover,{id:u,title:s,onClick:d,display:a,onDisplayChange:E},m)};t.EnhancePopover=p},75777:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Thumbs=void 0;const r=e(85608).__importStar(e(14041)),o=e(43718),c=e(95040),p=e(81878),v=e(48560),m=e(67304),_=e(57995),s=f=>{const a=(0,v.useInjectable)(c.IAIInlineChatService),{relationId:h,onClick:u,wrapperClassName:d}=f,[E,g]=(0,r.useState)("thumbs"),[l,y]=(0,r.useState)("thumbsdown"),b=(0,r.useCallback)(w=>{u&&u(w),a&&a.fireThumbsEvent(w)},[h,a]),S=(0,r.useCallback)(w=>{w==="up"&&E==="thumbs"&&(g("thumbs-fill"),y(!1),b(!0)),w==="up"&&E==="thumbs-fill"&&(g("thumbs"),y("thumbsdown")),w==="down"&&l==="thumbsdown"&&(y("thumbsdown-fill"),g(!1),b(!1)),w==="down"&&l==="thumbsdown-fill"&&(y("thumbsdown"),g("thumbs"))},[E,l]),A=(0,v.useUUID)();return r.default.createElement(r.default.Fragment,null,typeof E=="string"&&r.default.createElement(p.Popover,{id:`ai-chat-thumbsup-${A}`,title:(0,o.localize)("aiNative.inline.chat.operate.thumbsup.title")},r.default.createElement(_.EnhanceIcon,{wrapperClassName:d,onClick:()=>S("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 l=="string"&&r.default.createElement(p.Popover,{id:`ai-chat-thumbsdown-${A}`,title:(0,o.localize)("aiNative.inline.chat.operate.thumbsdown.title")},r.default.createElement(_.EnhanceIcon,{wrapperClassName:d,onClick:()=>S("down"),className:(0,m.getExternalIcon)(l,m.KTICON_OWNER),tabIndex:0,role:"button",ariaLabel:(0,o.localize)("aiNative.inline.chat.operate.thumbsdown.title"),ariaPressed:l==="thumbsdown-fill"?"true":"false"})))};t.Thumbs=s},81878:(x,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:(x,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)),c=e(48560),p=e(38578),v=e(55693),m=e(25719),_=n.__importDefault(e(91290)),s=({className:f,children:a=[],direction:h="left-to-right",...u})=>{const d=o.default.Children.toArray(a),E=(0,c.useInjectable)(p.AppConfig),g=(0,v.useDesignStyles)(_.default["box-panel"],"box-panel");(0,o.useEffect)(()=>{E.didRendered&&E.didRendered()},[]);const l=m.Layout.getStyleProperties(h);return o.default.createElement("div",{...u,className:(0,r.default)(g,f),style:{flexDirection:l.direction,zIndex:u.zIndex||u["z-index"]}},d.map((y,b)=>{const S=y.props||{};return o.default.createElement("div",{key:b,id:S["data-wrapper-id"],className:(0,r.default)(_.default.wrapper,S["data-wrapper-class"]),style:{flex:S.flex,overflow:S.overflow,zIndex:S.zIndex||S["z-index"],[l.minSize]:S.defaultSize,backgroundColor:S.backgroundColor}},y)}))};t.BoxPanel=s},28003:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DefaultLayout=t.getStorageValue=void 0,t.ToolbarActionBasedLayout=m,t.fixLayout=_;const r=e(85608).__importDefault(e(14041)),o=e(52564),c=e(57327),p=e(99333),v=()=>{let s={},f={};try{const a=localStorage.getItem("layout");a&&(s=JSON.parse(a));const h=localStorage.getItem("theme");h&&(f=JSON.parse(h))}catch{}return{layout:_(s),colors:f}};t.getStorageValue=v,t.DefaultLayout=m;function m(s={}){var f,a,h,u,d,E;const{layout:g}=(0,t.getStorageValue)();return r.default.createElement(c.BoxPanel,{direction:"top-to-bottom"},r.default.createElement(o.SlotRenderer,{id:"top",defaultSize:s.topSlotDefaultSize||0,slot:"top",zIndex:s.topSlotZIndex}),r.default.createElement(p.SplitPanel,{id:"main-horizontal",flex:1},r.default.createElement(o.SlotRenderer,{slot:"left",isTabbar:!0,defaultSize:!((f=g.left)===null||f===void 0)&&f.currentId?((a=g.left)===null||a===void 0?void 0:a.size)||310:49,minResize:280,maxResize:480,minSize:49}),r.default.createElement(p.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:!((h=g.bottom)===null||h===void 0)&&h.currentId?(u=g.bottom)===null||u===void 0?void 0:u.size:24,minResize:160,slot:"bottom",isTabbar:!0})),r.default.createElement(o.SlotRenderer,{slot:"right",isTabbar:!0,defaultSize:!((d=g.right)===null||d===void 0)&&d.currentId?((E=g.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 _(s){const f={...s};for(const a in s)s[a]&&(s[a].size||(f[a].currentId=""));return f}},32293:(x,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:(x,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(c){function p(u){return r[u]}c.getStyleProperties=p;function v(u){return r[u].direction}c.getFlexDirection=v;function m(u){return r[u].size}c.getSizeProperty=m;function _(u){return r[u].domSize}c.getDomSizeProperty=_;function s(u){return r[u].minSize}c.getMinSizeProperty=s;function f(u){return r[u].maxSize}c.getMaxSizeProperty=f;function a(u){return u==="bottom-to-top"||u==="top-to-bottom"?n.ResizeHandleVertical:n.ResizeHandleHorizontal}c.getResizeHandle=a;function h(u){return u==="bottom-to-top"||u==="top-to-bottom"?"row":"column"}c.getTabbarDirection=h})(o||(t.Layout=o={}))},99333:(x,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)),c=e(43718),p=e(68456),v=e(48560),m=e(73215),_=e(25719),s=e(71707),f=n.__importDefault(e(91290));t.PanelContext=o.default.createContext({setSize:(d,E)=>{},setRelativeSize:(d,E,g)=>{},getSize:d=>0,getRelativeSize:d=>[0,0],lockSize:(d,E)=>{},setMaxSize:(d,E)=>{},hidePanel:d=>{}});const a=(d,E,g)=>{var l,y;return(y=d&&d.props&&((l=d.props[E])!==null&&l!==void 0?l:d.props[`data-sp-${E}`]))!==null&&y!==void 0?y:g};function h(d,E){return a(d,"savedSize")?a(d,"savedSize")+"px":a(d,"defaultSize")!==void 0?a(d,"defaultSize")+"px":a(d,"flex")?a(d,"flex")/E*100+"%":1/E*100+"%"}const u=d=>{const E=(0,v.useInjectable)(s.SplitPanelManager).getService(d.id),{id:g,className:l,headerSize:y,resizeHandleClassName:b,style:S,children:A=[],direction:w="left-to-right",resizeKeep:T=!0,dynamicTarget:D}=o.default.useMemo(()=>E.interceptProps(d),[E,E.interceptProps,d]),I=_.Layout.getResizeHandle(w),O=_.Layout.getStyleProperties(w),M=o.default.useMemo(()=>o.default.Children.toArray(A),[A]),R=o.default.useMemo(()=>M.find(ve=>a(ve,"flexGrow")),[M]),P=o.default.useMemo(()=>M.reduce((ve,ie)=>ve+a(ie,"flex",1),0),[M]),k=o.default.useRef([]),F=(0,v.useInjectable)(c.IEventBus),L=o.default.useRef(),N=o.default.useRef(M.map(()=>!1)),j=o.default.useRef(M.map(()=>!1)),W=o.default.useRef(N.current.slice(0,M.length-1)),[U,X]=o.default.useState(W.current),[V,$]=o.default.useState(j.current),[Y,G]=o.default.useState(N.current);E.panels=[];const H=o.default.useCallback(ve=>(ie,fe)=>{const Me=fe?ve-1:ve,Le=k.current[Me];Le&&Le.setAbsoluteSize(ie!==void 0?ie:a(M[ve],"defaultSize"),fe,T)},[k.current]),K=o.default.useCallback(ve=>(ie,fe,Me)=>{const Le=Me?ve-1:ve,Ce=k.current[Le];Ce&&Ce.setRelativeSize(ie,fe)},[k.current]),Z=o.default.useCallback(ve=>ie=>{const fe=ie?ve-1:ve,Me=k.current[fe];return Me?Me.getAbsoluteSize(ie):0},[k.current]),Q=o.default.useCallback(ve=>ie=>{const fe=ie?ve-1:ve,Me=k.current[fe];return Me?Me.getRelativeSize():[0,0]},[k.current]),oe=o.default.useCallback(ve=>(ie,fe)=>{const Me=fe?ve-1:ve,Le=W.current.map((Ce,Se)=>Se===Me?ie!==void 0?ie:!Ce:Ce);W.current=Le,X(Le)},[k.current]),ne=o.default.useCallback(ve=>ie=>{const fe=N.current.map((Me,Le)=>Le===ve?ie!==void 0?ie:!Me:Me);N.current=fe,G(fe)},[k.current]),he=o.default.useCallback(ve=>ie=>{const fe=j.current.map((Le,Ce)=>Ce===ve?ie!==void 0?!ie:!Le:Le);j.current=fe;const Me=a(M[ve],"slot")||a(M[ve],"id");Me&&_e(Me),$(fe)},[M,j.current]),_e=o.default.useCallback(ve=>{ve&&(F.fire(new p.ResizeEvent({slotLocation:ve})),F.fireDirective(p.ResizeEvent.createDirective(ve)))},[F]),q=o.default.useMemo(()=>M.map((ve,ie)=>{const fe=[],Me=a(ve,"minSize"),Le=a(ve,"maxSize"),Ce=a(ve,"flexGrow");if(ie!==0){const Se=ie===1?M[ie-1]:M[ie];let Ee;Ce?Ee=m.ResizeFlexMode.Prev:a(M[ie-1],"flexGrow")&&(Ee=m.ResizeFlexMode.Next),a(Se,"noResize")||U[ie-1]||fe.push(o.default.createElement(I,{className:b,onResize:()=>{const xe=a(M[ie-1],"slot")||a(M[ie-1],"id"),Te=a(M[ie],"slot")||a(M[ie],"id");_e(xe),_e(Te)},noColor:!0,findNextElement:D?xe=>E.getFirstResizablePanel(ie-1,xe):void 0,findPrevElement:D?xe=>E.getFirstResizablePanel(ie-1,xe,!0):void 0,key:`split-handle-${ie}`,delegate:xe=>{k.current.push(xe)},flexMode:Ee}))}return fe.push(o.default.createElement(t.PanelContext.Provider,{key:ie,value:{setSize:H(ie),getSize:Z(ie),setRelativeSize:K(ie),getRelativeSize:Q(ie),lockSize:oe(ie),setMaxSize:ne(ie),hidePanel:he(ie)}},o.default.createElement("div",{"data-min-resize":a(ve,"minResize"),"data-max-resize":a(ve,"maxResize"),ref:Se=>{Se&&E.panels.indexOf(Se)===-1&&E.panels.push(Se)},className:h(ve,P)===`${y}px`?m.RESIZE_LOCK:"",id:a(ve,"id"),style:{...a(ve,"flex")&&!a(ve,"savedSize")&&!R?{flex:a(ve,"flex")}:{[O.size]:h(ve,P)},[O.minSize]:Me?Me+"px":"-1px",[O.maxSize]:Y[ie]&&Le?Le+"px":"unset",...Ce!==void 0?{flexGrow:Ce}:{},display:V[ie]?"none":"block"}},ve))),fe}).filter(Boolean),[A,M,b,D,k.current,V,U]);return o.default.useEffect(()=>{L.current&&E.setRootNode(L.current);const ve=F.onDirective(p.ResizeEvent.createDirective(g),()=>{M.forEach(ie=>{_e(a(ie,"slot")||a(ie,"id"))})});return()=>{ve.dispose()}},[]),o.default.useMemo(()=>{const{minResize:ve,flexGrow:ie,minSize:fe,maxSize:Me,savedSize:Le,defaultSize:Ce,flex:Se,noResize:Ee,slot:ge,headerSize:xe,...Te}=d;return delete Te.resizeHandleClassName,delete Te.dynamicTarget,delete Te.resizeKeep,delete Te.direction,E.renderSplitPanel(o.default.createElement("div",{...Te,ref:Fe=>L.current=Fe,className:(0,r.default)(f.default["split-panel"],l),style:{flexDirection:O.direction,...S},"data-min-resize":ve,"data-max-resize":Me,"data-min-size":fe,"data-max-size":Me,"data-saved-size":Le,"data-default-size":Ce,"data-header-size":xe,"data-flex":Se,"data-flex-grow":ie,"data-no-resize":Ee,"data-slot":ge}),q,Te)},[E,E.renderSplitPanel,q,L,S,d])};t.SplitPanel=u},71707:(x,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),c=e(43718),p=e(38578),v=e(73215);t.ISplitPanelService=Symbol("ISplitPanelService");let m=class extends c.Disposable{constructor(f){super(),this.panelId=f,this._whenReadyDeferred=new c.Deferred,this.panels=[]}get isVisible(){return this.rootNode&&this.rootNode.clientHeight>0||!1}get whenReady(){return this._whenReadyDeferred.promise}setRootNode(f){this.rootNode=f,this._whenReadyDeferred.resolve()}getFirstResizablePanel(f,a,h){if(h){if(a){for(let u=f;u>=0;u--)if(!this.panels[u].classList.contains(v.RESIZE_LOCK))return this.panels[u]}else for(let u=f;u>=0;u--)if(!this.panels[u].classList.contains(v.RESIZE_LOCK))return this.panels[u]}else if(a){for(let u=f+1;u<this.panels.length;u++)if(!this.panels[u].classList.contains(v.RESIZE_LOCK))return this.panels[u]}else for(let u=f+1;u<this.panels.length;u++)if(!this.panels[u].classList.contains(v.RESIZE_LOCK))return this.panels[u]}checkChildNoResize(f){var a,h;if(f&&f.type===p.SlotRenderer){const u=(h=this.appConfig.layoutConfig[(a=f.props)===null||a===void 0?void 0:a.slot])===null||h===void 0?void 0:h.modules;if(!u||u.length===0)return!0}return!1}renderSplitPanel(f,a,h){return r.default.cloneElement(f,{...h,...f.props},a)}interceptProps(f){return f}};t.SplitPanelService=m,n.__decorate([(0,o.Autowired)(p.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 _=class{constructor(){this.services=new Map}getService(f){let a=this.services.get(f);return a||(a=this.injector.get(t.ISplitPanelService,[f]),this.services.set(f,a)),a}};t.SplitPanelManager=_,n.__decorate([(0,o.Autowired)(o.INJECTOR_TOKEN),n.__metadata("design:type",o.Injector)],_.prototype,"injector",void 0),t.SplitPanelManager=_=n.__decorate([(0,o.Injectable)()],_)},89897:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),e(85608).__exportStar(e(85266),t)},85266:(x,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:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=e(85608).__importDefault(e(43144)),o=e(48560),c=({id:p,className:v,children:m})=>{const _=(0,o.usePortal)(p,v);return r.default.createPortal(m,_)};t.default=c},73215:(x,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=_;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importDefault(e(14041)),c=e(22366),p=n.__importDefault(e(57482));t.RESIZE_LOCK="resize-lock";var v;(function(a){a.Prev="prev",a.Next="next",a.Percentage="Percentage"})(v||(t.ResizeFlexMode=v={}));function m(){const a=document.getElementsByTagName("iframe"),h=document.getElementsByTagName("webview"),u=document.getElementsByClassName("shadow-root-host");for(const d of h)d.classList.add("none-pointer-event");for(const d of a)d.classList.add("none-pointer-event");for(const d of u)d?.classList.add("none-pointer-event")}function _(){const a=document.getElementsByTagName("iframe"),h=document.getElementsByTagName("webview"),u=document.getElementsByClassName("shadow-root-host");for(const d of h)d.classList.remove("none-pointer-event");for(const d of a)d.classList.remove("none-pointer-event");for(const d of u)d?.classList.remove("none-pointer-event")}const s=a=>{const h=o.default.useRef(),u=o.default.useRef(!1),d=o.default.useRef(0),E=o.default.useRef(0),g=o.default.useRef(0),l=o.default.useRef(),y=o.default.useRef(),b=o.default.useRef(),S=(L,N)=>{const j=a.findPrevElement?a.findPrevElement():l.current,W=a.findNextElement?a.findNextElement():y.current;if(j&&j.classList.contains(t.RESIZE_LOCK)||W&&W.classList.contains(t.RESIZE_LOCK))return;const U=h.current.parentElement.offsetWidth,X=Number(j?.dataset.minResize||0),V=Number(W?.dataset.minResize||0),$=Number(j?.dataset.maxResize||0),Y=Number(W?.dataset.maxResize||0);(X||V)&&(L*U<=X||N*U<=V)||($||Y)&&(L*U>=$||N*U>=Y)||(W&&(W.style.width=N*100+"%"),j&&(j.style.width=L*100+"%"),a.onResize&&W&&j&&a.onResize(j,W))},A=(L,N,j,W)=>{var U,X;const V=a.findPrevElement?a.findPrevElement(W):l.current,$=a.findNextElement?a.findNextElement(W):y.current,Y=Number((U=V?.dataset.minResize)!==null&&U!==void 0?U:0),G=Number((X=$?.dataset.minResize)!==null&&X!==void 0?X:0),H=V?.dataset.maxResize?Number(V?.dataset.maxResize):null,K=$?.dataset.maxResize?Number($?.dataset.maxResize):null,Z=a.flexMode===v.Prev,Q=Z?V:$,oe=Z?$:V;let ne=Z?L:N;j||((Y||G)&&(Z?Y>L?ne=Y:G>N&&(ne=L+N-G):G>N?ne=G:Y>L&&(ne=L+N-Y)),(H||K)&&(Z?H&&H<=L?ne=H:K&&K>N&&(ne=L+N-K):K&&K<=N?ne=K:H&&H>N&&(ne=L+N-H))),Q.style.width=ne+"px",Q.style.flexGrow="0",Q.style.flexShrink="1",oe.style.width="0",oe.style.flexGrow="1",oe.style.flexShrink="0",a.onResize&&$&&V&&a.onResize(V,$)},w=(L,N)=>{const j=l.current,W=y.current;let U;a.flexMode?U=(j.offsetWidth+W.offsetWidth)/j.parentElement.offsetWidth*100:U=+y.current.style.width.replace("%","")+ +l.current.style.width.replace("%",""),W&&(W.style.width=N/(L+N)*U+"%"),j&&(j.style.width=L/(L+N)*U+"%"),T(L,N),a.onResize&&W&&j&&a.onResize(j,W)},T=(L,N)=>{const j=l.current,W=y.current;let U=!1;j&&(L===0?(j.classList.add("kt_display_none"),U=!0):j.classList.remove("kt_display_none")),W&&(N===0?(W.classList.add("kt_display_none"),U=!0):W.classList.remove("kt_display_none")),h.current&&(U?h.current.classList.add("none-pointer-event"):h.current.classList.remove("none-pointer-event"))},D=()=>{const L=l.current.clientWidth,N=y.current.clientWidth,j=L+N,W=[];return W.push(L/j),W.push(N/j),W},I=(L,N)=>{c.fastdom.measure(()=>{const j=l.current.clientWidth,W=y.current.clientWidth,U=j+W;if(a.flexMode){const X=a.flexMode===v.Prev?L:U-L,V=a.flexMode===v.Next?L:U-L;A(X,V,!0)}else{const X=+y.current.style.width.replace("%",""),V=+l.current.style.width.replace("%",""),$=X+V;N?(y.current.style.width=$*(L/U)+"%",l.current.style.width=$*(1-L/U)+"%"):(l.current.style.width=$*(L/U)+"%",y.current.style.width=$*(1-L/U)+"%")}N?T(U-L,L):T(L,U-L),a.onResize&&a.onResize(l.current,y.current)})},O=L=>L?y.current.clientWidth:l.current.clientWidth,M=L=>{const N=L.classList,j=p.default["resize-overflow-hidden"];N?.contains(j)||N.add(j)},R=L=>{const N=L.classList,j=p.default["resize-overflow-hidden"];N?.contains(j)&&N.remove(j)},P=L=>{if(L.preventDefault(),h.current&&h.current.classList.contains("no-resize"))return;const N=E.current+L.pageX-d.current,j=g.current-(L.pageX-d.current);b.current&&b.current.dispose(),b.current=c.fastdom.mutate(()=>{if(a.flexMode)A(N,j);else{const W=h.current.parentElement.offsetWidth;S(N/W,j/W)}})},k=()=>{u.current=!1,document.removeEventListener("mousemove",P),document.removeEventListener("mouseup",k),a.onFinished&&a.onFinished(),c.fastdom.mutate(()=>{var L;(L=h.current)===null||L===void 0||L.classList.remove(p.default.active),R(l.current),R(y.current),_()})},F=L=>{u.current=!0,document.addEventListener("mousemove",P),document.addEventListener("mouseup",k),d.current=L.pageX,c.fastdom.measure(()=>{E.current=l.current.offsetWidth,g.current=y.current.offsetWidth,c.fastdom.mutate(()=>{var N;(N=h.current)===null||N===void 0||N.classList.add(p.default.active),M(l.current),M(y.current),m()})})};return o.default.useEffect(()=>(h.current&&(h.current.addEventListener("mousedown",F),l.current=h.current.previousSibling,y.current=h.current.nextSibling),()=>{h.current&&(h.current.removeEventListener("mousedown",F),h.current.removeEventListener("mousemove",P),h.current.removeEventListener("mouseup",k))}),[]),a.delegate&&a.delegate({setSize:S,setAbsoluteSize:I,getAbsoluteSize:O,setRelativeSize:w,getRelativeSize:D}),o.default.createElement("div",{ref:L=>{h.current=L},className:(0,r.default)({[p.default["resize-handle-horizontal"]]:!0,[p.default["with-color"]]:!a.noColor,[a.className||""]:!0})})};t.ResizeHandleHorizontal=s;const f=a=>{const h=o.default.useRef(),u=o.default.useRef(!1),d=o.default.useRef(0),E=o.default.useRef(0),g=o.default.useRef(0),l=o.default.useRef(),y=o.default.useRef(),b=o.default.useRef(),S=o.default.useRef(),A=(L,N,j)=>{const W=a.findPrevElement?a.findPrevElement(j):l.current,U=a.findNextElement?a.findNextElement(j):y.current;!U||!W||W.classList.contains(t.RESIZE_LOCK)||U.classList.contains(t.RESIZE_LOCK)||(U.style.height=N*100+"%",W.style.height=L*100+"%",a.onResize&&a.onResize(W,U))},w=(L,N,j,W)=>{var U,X;const V=a.findPrevElement?a.findPrevElement(W):l.current,$=a.findNextElement?a.findNextElement(W):y.current;let Y,G,H=0;const K=Number(((U=V?.dataset)===null||U===void 0?void 0:U.minResize)||0),Z=Number(((X=$?.dataset)===null||X===void 0?void 0:X.minResize)||0);a.flexMode===v.Prev?(Y=V,G=$,H=L,j||(K>L?H=K:Z>N&&(H=L+N-Z))):(Y=$,G=V,H=N,j||(Z>N?H=Z:K>L&&(H=L+N-K))),Y.style.height=H+"px",Y.style.flexGrow="0",Y.style.flexShrink="1",G.style.height="0",G.style.flexGrow="1",G.style.flexShrink="0",a.onResize&&$&&V&&a.onResize(V,$)},T=(L,N)=>{const j=l.current,W=y.current;let U;a.flexMode?U=(j.offsetHeight+W.offsetHeight)/j.parentElement.offsetHeight*100:U=+W.style.height.replace("%","")+ +j.style.height.replace("%",""),W&&(W.style.height=N/(L+N)*U+"%"),j&&(j.style.height=L/(L+N)*U+"%"),D(L,N),a.onResize&&W&&j&&a.onResize(j,W)},D=(L,N)=>{const j=l.current,W=y.current;let U=!1;j&&(L===0?(j.classList.add("kt_display_none"),U=!0):j.classList.remove("kt_display_none")),W&&(N===0?(W.classList.add("kt_display_none"),U=!0):W.classList.remove("kt_display_none")),h.current&&(U?h.current.classList.add("none-pointer-event"):h.current.classList.remove("none-pointer-event"))},I=()=>{const L=l.current.clientHeight,N=y.current.clientHeight,j=L+N,W=[];return W.push(L/j),W.push(N/j),W},O=(L,N,j,W)=>{j.classList.contains(t.RESIZE_LOCK)||W.classList.contains(t.RESIZE_LOCK)||(W.style.height=N+"px",j.style.height=L+"px",W.style.flex="unset",j.style.flex="unset",a.onResize&&W&&j&&a.onResize(j,W))},M=(L,N,j)=>{if(!l.current||!y.current)return;const W=l.current.clientHeight,U=y.current.clientHeight,X=W+U;if(a.flexMode){const V=a.flexMode===v.Prev?L:X-L,$=a.flexMode===v.Next?L:X-L;w(V,$,!0)}else{const V=+y.current.style.height.replace(/\%|px/,""),$=+l.current.style.height.replace(/\%|px/,""),Y=V+$;if(N){j&&(l.current.style.height=Y*(1-L/X)+"%");const G=Y*(L/X);y.current.style.height=G===0?G+"px":G+"%"}else l.current.style.height=Y*(L/X)+"%",j&&(y.current.style.height=Y*(1-L/X)+"%")}N?D(X-L,L):D(L,X-L),a.onResize&&a.onResize(l.current,y.current)},R=L=>L?y.current.clientHeight:l.current.clientHeight,P=L=>{u.current=!0,document.addEventListener("mousemove",k),document.addEventListener("mouseup",F),d.current=L.pageY,S.current=y.current,b.current=l.current,c.fastdom.measure(()=>{E.current=l.current.offsetHeight,g.current=y.current.offsetHeight,c.fastdom.mutate(()=>{var N;(N=h.current)===null||N===void 0||N.classList.add(p.default.active),m()})})},k=L=>{L.preventDefault(),!(h.current&&h.current.classList.contains("no-resize"))&&c.fastdom.measure(()=>{const N=L.pageY>d.current,j=a.findNextElement?a.findNextElement(N):null,W=a.findPrevElement?a.findPrevElement(N):null;if(j!==null&&S.current!==j||W!==null&&b.current!==W){if(!j||!W)return;S.current=j,b.current=W,d.current=L.pageY,E.current=b.current.offsetHeight,g.current=S.current.offsetHeight}const U=E.current+L.pageY-d.current,X=g.current-(L.pageY-d.current),V=Number(b.current.dataset.minResize||0),$=Number(S.current.dataset.minResize||0);(V||$)&&(U<=V||X<=$)||c.fastdom.mutate(()=>{if(a.flexMode===v.Prev||a.flexMode===v.Next)w(U,X);else if(a.flexMode===v.Percentage){const Y=h.current.parentElement.offsetHeight;A(U/Y,X/Y)}else O(U,X,b.current,S.current)})})},F=L=>{u.current=!1,document.removeEventListener("mousemove",k),document.removeEventListener("mouseup",F),c.fastdom.mutate(()=>{var N;(N=h.current)===null||N===void 0||N.classList.remove(p.default.active),a.onFinished&&a.onFinished(),_()})};return o.default.useEffect(()=>(h.current.addEventListener("mousedown",P),l.current=h.current.previousSibling,y.current=h.current.nextSibling,()=>{h.current.removeEventListener("mousedown",P),document.removeEventListener("mousemove",k),document.removeEventListener("mouseup",F)}),[]),a.delegate&&a.delegate({setSize:A,setAbsoluteSize:M,getAbsoluteSize:R,setRelativeSize:T,getRelativeSize:I}),o.default.createElement("div",{ref:L=>L&&(h.current=L),className:(0,r.default)({[p.default["resize-handle-vertical"]]:!0,[a.className||""]:!0,[p.default["with-color"]]:!a.noColor})})};t.ResizeHandleVertical=f},77331:(x,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 c=p=>(p={...p,className:(0,r.default)("kt_select",p.className)},o.default.createElement("select",{...p}));t.Select=c},53736:(x,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:(x,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:(x,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:(x,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:(x,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:(x,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:(x,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:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ResourceContextKey=void 0;const n=e(43718),r=e(63214);class o{constructor(p,v=r.getLanguageIdFromMonaco,m="resource"){if(this.contextKeyService=p,this.languageResolver=v,!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(p){if(!p){this.reset();return}const v=this.resourceKey.get();p.isEqual(new n.URI(v))||(this.resourceScheme.set(p.scheme),this.resourceFilename.set(p.path.name+p.path.ext),this.resourceExtname.set(p.path.ext),this.resourceLangId.set(this.languageResolver(p)),this.resourceKey.set(p.toString()),this.isFileSystemResource.set(p.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:(x,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:(x,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:(x,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:(x,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:(x,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=v;const n=e(43718),r=e(69734),o=e(87863),c=e(78132),p={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:p.confirmDelete,description:"%preference.explorer.confirm.move%"},"explorer.confirmDelete":{type:"boolean",default:p.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:[`
30454
30436
  `,`\r
@@ -30672,7 +30654,7 @@ Run with Automatic Debug Configurations
30672
30654
  {1}
30673
30655
 
30674
30656
  Sign out of these features?`,"authentication.signOutMessageSimple":"Sign out of {0}?","authentication.useOtherAccount":"Sign in to another account","authentication.selectAccount":"The extension '{0}' wants to access a {1} account","authentication.getSessionPlaceholder":"Select an account for '{0}' to use or Esc to cancel","authentication.confirmAuthenticationAccess":"The extension '{0}' wants to access the {1} account '{2}'.","authentication.confirmLogin":"The extension '{0}' wants to sign in using {1}.","authentication.confirmReLogin":"The extension '{0}' wants to sign in again using {1}.","authentication.signInRequests":"Sign in to use {0} (1)","authentication.signOut":"Sign out {0}","authentication.noAccounts":"You are not signed in to any accounts","authentication.signedOut":"Successfully signed out.","refactoring-changes.ask.1.create":"Extension '{0}' wants to make refactoring changes with this file creation","refactoring-changes.ask.1.copy":"Extension '{0}' wants to make refactoring changes with this file copy","refactoring-changes.ask.1.move":"Extension '{0}' wants to make refactoring changes with this file move","refactoring-changes.ask.1.delete":"Extension '{0}' wants to make refactoring changes with this file deletion","refactoring-changes.ask.N.create":"{0} extensions want to make refactoring changes with this file creation","refactoring-changes.ask.N.copy":"{0} extensions want to make refactoring changes with this file copy","refactoring-changes.ask.N.move":"{0} extensions want to make refactoring changes with this file move","refactoring-changes.ask.N.delete":"{0} extensions want to make refactoring changes with this file deletion","refactoring-changes.msg.showPreview":"Show Preview","refactoring-changes.msg.skipChanges":"Skip Changes","keyboard.chooseKeyboardLayout":"Choose keyboard layout","keyboard.autoDetect.label":"Auto Detect","keyboard.autoDetect.description":"(Current: '{0} ')","keyboard.autoDetect.detail":"Try to detect the keyboard layout from browser information and pressed keys.","editor.toggleWordWrap":"Toggle Word Wrap","editor.suggest.details.visible":"Controls whether editor code completion expands details by default","view.component.renderedError":"View Component Rendering Exception","view.component.tryAgain":"Refresh","test.title":"Testing","test.result.runFinished":"Test run at {0}","test.task.unnamed":"Unnamed Task","test.results":"Test Results","menu.missing.command":"menuId {0} register command not exist: {1}","menu.missing.altCommand":"menuId {0} register altCommand not exist: {1}","menu.dupe.command":"menuId {0} register command({1}) is duplicated with alt({2})","command.category.developerTools":"Developer Tool","connection.start.rtt":"Measure Connection RTT","connection.stop.rtt":"Stop Connection RTT","debug.terminal.label":"Javascript Debug Terminal","debug.terminal.title":"Debug Process","output.channel.clear":"Clear Output Panel","workbench.action.tasks.runTask":"Run Task","workbench.action.tasks.reRunTask":"Rerun Last Task","workbench.action.tasks.restartTask":"Restart Running Task","workbench.action.tasks.terminate":"Terminate Task","workbench.action.tasks.showTasks":"Show Running Tasks","workbench.action.tasks.showLog":"Show Task Log","task.contribute":"Contribute","task.cannotFindTask":"Cannot find task for {0}. Press Enter key to return.","comment.reply.count":"{0} comments","comment.reply.lastReply":"Last reply from {0}","walkthroughs.welcome":"Welcome","walkthroughs.get.started":"Open the 'Getting Started' walkthrough","mergeEditor.reset":"Reset","mergeEditor.workbench.tab.name":"Merging: {0}","mergeEditor.conflict.action.apply.confirm.title":"The file has unresolved conflicts or changes, whether to apply and save the changes?","mergeEditor.conflict.action.apply.confirm.continue":"Continue Merge","mergeEditor.conflict.action.apply.confirm.complete":"Apply Changes","mergeEditor.action.button.apply":"Apply","mergeEditor.action.button.apply-and-stash":"Apply and Stash","mergeEditor.action.button.accept.left":"Accept Left","mergeEditor.action.button.accept.right":"Accept Right","mergeEditor.open.3way":"3-Way Editor","mergeEditor.conflict.prev":"Previous Conflict","mergeEditor.conflict.next":"Next Conflict","mergeEditor.conflict.ai.resolve.all":"AI Resolution","mergeEditor.conflict.ai.resolve.all.stop":"Stop All","mergeEditor.open.tradition":"Text Editor","aiNative.chat.ai.assistant.name":"AI Assistant","aiNative.chat.input.placeholder.default":"Ask Copilot or type / for commands","aiNative.chat.stop.immediately":"I don\u2019t think about it anymore. If you need anything, you can ask me anytime.","aiNative.chat.error.response":"There are too many people interacting with me at the moment. Please try again later. Thank you for your understanding and support.","aiNative.chat.code.insert":"Insert code","aiNative.chat.code.copy":"Copy code","aiNative.chat.code.copy.success":"Copied successfully","aiNative.chat.expand.unfullscreen":"unfullscreen","aiNative.chat.expand.fullescreen":"fullescreen","aiNative.chat.enter.send":"Send (Enter)","aiNative.inline.chat.operate.chat.title":"Chat({0})","aiNative.inline.chat.operate.check.title":"Check","aiNative.inline.chat.operate.thumbsup.title":"Thumbs up","aiNative.inline.chat.operate.thumbsdown.title":"Thumbs down","aiNative.inline.chat.operate.loading.cancel":"Esc to cancel","aiNative.inline.chat.input.placeholder.default":"New code instructions...(\u2191\u2193 for history)","aiNative.inline.chat.generating.canceled":"Inline Chat Generating Canceled.","aiNative.inline.hint.widget.placeholder":"{0} to inline chat","aiNative.inline.problem.fix.title":"Fix with AI","aiNative.inline.diff.accept":"Accept","aiNative.inline.diff.reject":"Reject","aiNative.resolve.conflict.dialog.afresh":"Are you sure you want to regenerate?","aiNative.resolve.conflict.dialog.detection":`It is detected that you have made modifications. Regeneration will overwrite
30675
- your modifications. Are you sure to regenerate?`,"aiNative.resolve.conflict.message.not.processed.yet":"AI has processed conflicts at {0}, but conflicts at {1} have not yet been processed (still marked as yellow) and require manual processing.","aiNative.operate.discard.title":"Discard","aiNative.operate.afresh.title":"Afresh","aiNative.operate.stop.title":"Stop","aiNative.operate.close.title":"Close","aiNative.operate.clear.title":"Clear","aiNative.operate.tools.title":"MCP Tools","aiNative.operate.newChat.title":"New Chat","aiNative.operate.chatHistory.title":"Chat History","aiNative.operate.chatHistory.searchPlaceholder":"Search Chats...","aiNative.operate.chatHistory.edit":"Edit","aiNative.operate.chatHistory.delete":"Delete","aiNative.chat.welcome.loading.text":"Initializing...","aiNative.chat.ai.assistant.limit.message":"{0} earliest messages are dropped due to the input token limit","aiNative.inlineDiff.acceptAll":"Accept All","aiNative.inlineDiff.rejectAll":"Reject All","aiNative.inlineDiff.reveal":"Reveal In Chat","aiNative.inlineDiff.up":"Previous Change","aiNative.inlineDiff.down":"Next Change","aiNative.inlineDiff.right":"Next File","aiNative.inlineDiff.left":"Previous File","aiNative.inlineDiff.noMoreChangesUp":"No more changes above","aiNative.inlineDiff.noMoreChangesDown":"No more changes below","aiNative.chat.session.max":"You can only create {0} chats at a time","preference.ai.native.inlineChat.title":"Inline Chat","preference.ai.native.chat.title":"Chat","preference.ai.native.interface.quick.title":"Interface Quick Navigation","preference.ai.native.interface.quick.navigation":"Click the icon on the left side of the editor to quickly jump to the interface implementation.","preference.ai.native.interface.quick.navigation.hover":"Go to implementation","preference.ai.native.inlineChat.auto.visible":"Does Inline Chat automatically appear when code are selected?","preference.ai.native.inlineChat.codeAction.enabled":"Does Inline Chat related code actions automatically appear when code are selected?","preference.ai.native.chat.visible.type":"Control how the chat panel is displayed by default","preference.ai.native.inlineDiff.preview.mode":"Inline Diff preview mode","preference.ai.native.inlineDiff.preview.mode.sideBySide":"Displayed in the editor as left and right diff panels","preference.ai.native.inlineDiff.preview.mode.inlineLive":"Displayed in the editor through streaming rendering","preference.ai.native.intelligentCompletions.title":"Intelligent Completions","preference.ai.native.intelligentCompletions.promptEngineering.enabled":"Whether to enable prompt engineering, some LLM models may not perform well on prompt engineering.","preference.ai.native.intelligentCompletions.debounceTime":"Debounce time for intelligent completions","preference.ai.native.intelligentCompletions.cache.enabled":"Whether to enable cache for intelligent completions","preference.ai.native.intelligentCompletions.alwaysVisible":"Whether to always show intelligent completions","preference.ai.native.codeEdits.title":"Code Edits","preference.ai.native.codeEdits.lintErrors":"Whether to trigger intelligent rewriting when Lint Error occurs","preference.ai.native.codeEdits.lineChange":"Whether to trigger intelligent rewriting when the cursor line number changes","preference.ai.native.codeEdits.typing":"Whether to trigger intelligent rewriting when the content changes","preference.ai.native.codeEdits.renderType":"Code Edits Render Type","preference.ai.native.chat.system.prompt":"Default Chat System Prompt","workbench.quickOpen.preserveInput":"Controls whether the last typed input to Quick Open(include Command Palette) should be preserved.","webview.webviewTagUnavailable":"webview is unsupported on non-electron env, please use iframe instead","notebook.kernel.panel.empty":"No content found.","notebook.kernel.panel.title":"Running Terminals and Kernels","notebook.kernel.panel.opened.pages":"Opened Pages","notebook.kernel.panel.running.kernels":"Running Kernels","notebook.kernel.close.all.confirmation":"Are you sure you want to close all?","notebook.variable.panel.title":"Variable Inspector","notebook.variable.panel.unsupported":"The file format is not supported for variable inspection","notebook.variable.panel.refresh.success":"Variable refresh successful","notebook.variable.panel.refresh.error":"Variable refresh failed","notebook.variable.panel.search.placeholder":"Please enter the variable name to search","notebook.variable.panel.show.detail":"View details",...r.browserViews,...o.editorLocalizations,...c.enUS,"preference.ai.native.llm.apiSettings.title":"LLM API Settings","preference.ai.native.llm.model.id":"Model ID","preference.ai.native.deepseek.apiKey":"Deepseek API Key","preference.ai.native.deepseek.apiKey.description":"API key for Deepseek language model","preference.ai.native.anthropic.apiKey":"Anthropic API Key","preference.ai.native.anthropic.apiKey.description":"API key for Anthropic language model","preference.ai.native.openai.apiKey":"OpenAI API Key","preference.ai.native.openai.apiKey.description":"API key for OpenAI Compatible language model","preference.ai.native.openai.baseURL":"OpenAI Base URL","preference.ai.native.openai.baseURL.description":"Base URL for OpenAI Compatible language model","preference.ai.native.mcp.settings.title":"MCP Server Settings","preference.ai.native.mcp.servers":"MCP Servers","preference.ai.native.mcp.servers.description":"Configure MCP (Model Context Protocol) servers","preference.ai.native.mcp.servers.name.description":"Name of the MCP server","preference.ai.native.mcp.servers.command.description":"Command to start the MCP server","preference.ai.native.mcp.servers.args.description":"Command line arguments for the MCP server","preference.ai.native.mcp.servers.env.description":"Environment variables for the MCP server","preference.ai.native.mcp.servers.type.description":"Type of the MCP server connection","preference.ai.native.mcp.servers.type.stdio":"Stdio connection","preference.ai.native.mcp.servers.type.sse":"SSE connection","ai.native.mcp.terminal.command":"Command","ai.native.mcp.terminal.output":"Output","ai.native.mcp.terminal.allow-question":"Allow the terminal to run the command?","ai.native.mcp.terminal.allow":"Allow","ai.native.mcp.terminal.deny":"Reject","ai.native.mcp.name":"Name:","ai.native.mcp.command":"Command:","ai.native.mcp.args":"Arguments:","ai.native.mcp.env":"Environment Variables:","ai.native.mcp.type":"Type:","ai.native.mcp.stdio":"Command","ai.native.mcp.sse":"SSE","ai.native.mcp.buttonSave":"Add","ai.native.mcp.buttonUpdate":"Update","ai.native.mcp.buttonCancel":"Cancel","ai.native.mcp.addMCPServer.title":"Add MCP Server","ai.native.mcp.editMCPServer.title":"Edit MCP Server","ai.native.mcp.serverHost.placeHolder":"URL to SSE endpoint","ai.native.mcp.command.placeHolder":"Command to execute","ai.native.mcp.args.placeHolder":"Arguments","ai.native.mcp.env.placeHolder":"KEY=value (one per line)","ai.native.mcp.name.placeHolder":"Server Name","ai.native.mcp.type.builtin":"Built-in","ai.native.mcp.type.sse":"SSE","ai.native.mcp.type.stdio":"Command","ai.native.mcp.serverNameExists":'Server name "{0}" already exists',"ai.native.mcp.name.isRequired":"Server name is required","ai.native.mcp.command.isRequired":"Command is required","ai.native.mcp.serverHost.isRequired":"SSE URL is required","ai.native.mcp.tool.arguments":"Arguments","ai.native.mcp.tool.results":"Result"}}},32581:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(43718),r=e(20741),o=e(61647);(0,n.registerLocalizationBundle)(o.localizationBundle),(0,n.registerLocalizationBundle)(r.localizationBundle)},36942:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.enUS=void 0,t.enUS={"merge-conflicts.merge.type.auto":"auto merged","merge-conflicts.merge.type.manual":"merged","merge-conflicts.conflicts.summary":"Total {0} conflicts ({1})","merge-conflicts.conflicts.all-resolved":"All resolved","merge-conflicts.conflicts.partial-resolved":"{0} conflicts resolved, {1} remaining","merge-conflicts.non-conflicts.summary":"Non-conflict changes {0} in total","merge-conflicts.non-conflicts.progress":"{0} non-conflict changes have been {1}","merge-conflicts.non-conflicts.from.left":"target branch: {0} places","merge-conflicts.non-conflicts.from.right":"source branch: {0} places","merge-conflicts.non-conflicts.from.base":"base branch: {0} places","merge-conflicts.merge.conflict.remain":"Unresolved conflicts {0} remaining"}},40028:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.zhCN=void 0,t.zhCN={"merge-conflicts.merge.type.auto":"\u81EA\u52A8\u5408\u5E76","merge-conflicts.merge.type.manual":"\u5408\u5E76","merge-conflicts.conflicts.summary":"\u51B2\u7A81\u53D8\u66F4\u5171 {0} \u5904 ({1})","merge-conflicts.conflicts.all-resolved":"\u5DF2\u5168\u90E8\u89E3\u51B3","merge-conflicts.conflicts.partial-resolved":"\u5DF2\u89E3\u51B3 {0} \u5904, \u5269\u4F59 {1} \u5904","merge-conflicts.non-conflicts.summary":"\u975E\u51B2\u7A81\u53D8\u66F4\u5171 {0} \u5904","merge-conflicts.non-conflicts.progress":"{0} \u5904\u975E\u51B2\u7A81\u53D8\u66F4\u5DF2{1}","merge-conflicts.non-conflicts.from.left":"\u76EE\u6807\u5206\u652F: {0} \u5904","merge-conflicts.non-conflicts.from.right":"\u6765\u6E90\u5206\u652F: {0} \u5904","merge-conflicts.non-conflicts.from.base":"\u4E24\u8005: {0} \u5904","merge-conflicts.merge.conflict.remain":"\u5269\u4F59\u672A\u89E3\u51B3\u51B2\u7A81 {0} \u5904"}},61647:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.localizationBundle=void 0;const n=e(69734),r=e(21714),o=e(12651),c=e(40028);t.localizationBundle={languageId:n.LOCALE_TYPES.ZH_CN,languageName:"Chinese",localizedLanguageName:"\u4E2D\u6587(\u4E2D\u56FD)",contents:{ButtonAllow:"\u5141\u8BB8",ButtonOK:"\u786E\u5B9A",ButtonCancel:"\u53D6\u6D88","common.yes":"\u662F","common.no":"\u5426",extension:"\u63D2\u4EF6",editTtile:"\u7F16\u8F91","common.loading":"\u52A0\u8F7D\u4E2D...","tree.filter.placeholder":"\u8F93\u5165\u5173\u952E\u5B57\u6216\u8DEF\u5F84\u7B5B\u9009","file.new":"\u65B0\u5EFA\u6587\u4EF6","file.folder.new":"\u65B0\u5EFA\u6587\u4EF6\u5939","file.locate":"\u6587\u4EF6\u5B9A\u4F4D","file.save":"\u4FDD\u5B58\u6587\u4EF6","file.saveAll":"\u4FDD\u5B58\u5168\u90E8","file.autoSave":"\u81EA\u52A8\u4FDD\u5B58","file.open":"\u6253\u5F00\u6587\u4EF6","file.open.side":"\u4FA7\u8FB9\u680F\u6253\u5F00","file.open.type":"\u6253\u5F00\u65B9\u5F0F...","file.open.type.placeholder":'\u4E3A "{0}" \u9009\u62E9\u6253\u5F00\u65B9\u5F0F',"file.open.type.detail.active":"\u5F53\u524D","file.open.type.detail.and":"\u548C","file.open.type.detail.default":"\u9ED8\u8BA4","file.open.type.preference.default":'\u4E3A "{0}" \u914D\u7F6E\u9ED8\u8BA4\u7F16\u8F91\u5668...',"file.delete":"\u5220\u9664","file.rename":"\u91CD\u547D\u540D","file.compare":"\u4E0E\u7F16\u8F91\u5668\u4E2D\u7684\u6587\u4EF6\u6BD4\u8F83","file.close":"\u5173\u95ED\u6587\u4EF6","file.copy.path":"\u590D\u5236\u8DEF\u5F84","file.copy.relativepath":"\u590D\u5236\u76F8\u5BF9\u8DEF\u5F84","file.paste.file":"\u7C98\u8D34","file.copy.file":"\u590D\u5236","file.cut.file":"\u526A\u5207","file.move.existMessage":"\u8981\u7C98\u8D34\u7684\u6587\u4EF6\u540C\u65F6\u88AB\u5220\u9664\u6216\u79FB\u52A8\u3002\u65E0\u6CD5\u79FB\u52A8/\u590D\u5236\u3002\u6587\u4EF6\u5DF2\u5B58\u5728\u4E8E\u76EE\u6807\u4F4D\u7F6E\u3002","file.action.new.file":"\u65B0\u5EFA\u6587\u4EF6","file.action.new.folder":"\u65B0\u5EFA\u6587\u4EF6\u5939","file.action.refresh":"\u5237\u65B0\u6587\u4EF6","file.action.collapse":"\u5168\u90E8\u6298\u53E0","file.location":"\u5728\u6587\u4EF6\u6811\u4E2D\u5B9A\u4F4D","file.open.folder":"\u6253\u5F00\u6587\u4EF6\u5939","file.open.workspace":"\u4ECE\u6587\u4EF6\u6253\u5F00\u5DE5\u4F5C\u533A","file.confirm.delete":`### \u786E\u5B9A\u4ECE\u5DE5\u4F5C\u533A\u5220\u9664\u4E0B\u9762\u7684 {0} \u4E2A\u6587\u4EF6?
30657
+ your modifications. Are you sure to regenerate?`,"aiNative.resolve.conflict.message.not.processed.yet":"AI has processed conflicts at {0}, but conflicts at {1} have not yet been processed (still marked as yellow) and require manual processing.","aiNative.operate.discard.title":"Discard","aiNative.operate.afresh.title":"Afresh","aiNative.operate.stop.title":"Stop","aiNative.operate.close.title":"Close","aiNative.operate.clear.title":"Clear","aiNative.operate.tools.title":"MCP Tools","aiNative.operate.newChat.title":"New Chat","aiNative.operate.chatHistory.title":"Chat History","aiNative.operate.chatHistory.searchPlaceholder":"Search Chats...","aiNative.operate.chatHistory.edit":"Edit","aiNative.operate.chatHistory.delete":"Delete","aiNative.chat.welcome.loading.text":"Initializing...","aiNative.chat.ai.assistant.limit.message":"{0} earliest messages are dropped due to the input token limit","aiNative.inlineDiff.acceptAll":"Accept All","aiNative.inlineDiff.rejectAll":"Reject All","aiNative.inlineDiff.reveal":"Reveal In Chat","aiNative.inlineDiff.up":"Previous Change","aiNative.inlineDiff.down":"Next Change","aiNative.inlineDiff.right":"Next File","aiNative.inlineDiff.left":"Previous File","aiNative.inlineDiff.noMoreChangesUp":"No more changes above","aiNative.inlineDiff.noMoreChangesDown":"No more changes below","aiNative.chat.session.max":"You can only create {0} chats at a time","preference.ai.native.inlineChat.title":"Inline Chat","preference.ai.native.chat.title":"Chat","preference.ai.native.interface.quick.title":"Interface Quick Navigation","preference.ai.native.interface.quick.navigation":"Click the icon on the left side of the editor to quickly jump to the interface implementation.","preference.ai.native.interface.quick.navigation.hover":"Go to implementation","preference.ai.native.inlineChat.auto.visible":"Does Inline Chat automatically appear when code are selected?","preference.ai.native.inlineChat.codeAction.enabled":"Does Inline Chat related code actions automatically appear when code are selected?","preference.ai.native.chat.visible.type":"Control how the chat panel is displayed by default","preference.ai.native.inlineDiff.preview.mode":"Inline Diff preview mode","preference.ai.native.inlineDiff.preview.mode.sideBySide":"Displayed in the editor as left and right diff panels","preference.ai.native.inlineDiff.preview.mode.inlineLive":"Displayed in the editor through streaming rendering","preference.ai.native.intelligentCompletions.title":"Intelligent Completions","preference.ai.native.intelligentCompletions.promptEngineering.enabled":"Whether to enable prompt engineering, some LLM models may not perform well on prompt engineering.","preference.ai.native.intelligentCompletions.debounceTime":"Debounce time for intelligent completions","preference.ai.native.intelligentCompletions.cache.enabled":"Whether to enable cache for intelligent completions","preference.ai.native.intelligentCompletions.alwaysVisible":"Whether to always show intelligent completions","preference.ai.native.codeEdits.title":"Code Edits","preference.ai.native.codeEdits.lintErrors":"Whether to trigger intelligent rewriting when Lint Error occurs","preference.ai.native.codeEdits.lineChange":"Whether to trigger intelligent rewriting when the cursor line number changes","preference.ai.native.codeEdits.typing":"Whether to trigger intelligent rewriting when the content changes","preference.ai.native.codeEdits.renderType":"Code Edits Render Type","preference.ai.native.chat.system.prompt":"Default Chat System Prompt","workbench.quickOpen.preserveInput":"Controls whether the last typed input to Quick Open(include Command Palette) should be preserved.","webview.webviewTagUnavailable":"webview is unsupported on non-electron env, please use iframe instead","notebook.kernel.panel.empty":"No content found.","notebook.kernel.panel.title":"Running Terminals and Kernels","notebook.kernel.panel.opened.pages":"Opened Pages","notebook.kernel.panel.running.kernels":"Running Kernels","notebook.kernel.close.all.confirmation":"Are you sure you want to close all?","notebook.variable.panel.title":"Variable Inspector","notebook.variable.panel.unsupported":"The file format is not supported for variable inspection","notebook.variable.panel.refresh.success":"Variable refresh successful","notebook.variable.panel.refresh.error":"Variable refresh failed","notebook.variable.panel.search.placeholder":"Please enter the variable name to search","notebook.variable.panel.show.detail":"View details",...r.browserViews,...o.editorLocalizations,...c.enUS,"preference.ai.native.llm.apiSettings.title":"LLM API Settings","preference.ai.native.llm.model.id":"Model ID","preference.ai.native.deepseek.apiKey":"Deepseek API Key","preference.ai.native.deepseek.apiKey.description":"API key for Deepseek language model","preference.ai.native.anthropic.apiKey":"Anthropic API Key","preference.ai.native.anthropic.apiKey.description":"API key for Anthropic language model","preference.ai.native.openai.apiKey":"OpenAI API Key","preference.ai.native.openai.apiKey.description":"API key for OpenAI Compatible language model","preference.ai.native.openai.baseURL":"OpenAI Base URL","preference.ai.native.openai.baseURL.description":"Base URL for OpenAI Compatible language model","preference.ai.native.mcp.settings.title":"MCP Server Settings","preference.ai.native.mcp.servers":"MCP Servers","preference.ai.native.mcp.servers.description":"Configure MCP (Model Context Protocol) servers","preference.ai.native.mcp.servers.name.description":"Name of the MCP server","preference.ai.native.mcp.servers.command.description":"Command to start the MCP server","preference.ai.native.mcp.servers.args.description":"Command line arguments for the MCP server","preference.ai.native.mcp.servers.env.description":"Environment variables for the MCP server","preference.ai.native.mcp.servers.type.description":"Type of the MCP server connection","preference.ai.native.mcp.servers.type.stdio":"Stdio connection","preference.ai.native.mcp.servers.type.sse":"SSE connection","ai.native.mcp.terminal.command":"Command","ai.native.mcp.terminal.output":"Output","ai.native.mcp.terminal.allow-question":"Allow the terminal to run the command?","ai.native.mcp.terminal.allow":"Allow","ai.native.mcp.terminal.deny":"Reject","ai.native.mcp.name":"Name:","ai.native.mcp.command":"Command:","ai.native.mcp.args":"Arguments:","ai.native.mcp.env":"Environment Variables:","ai.native.mcp.type":"Type:","ai.native.mcp.stdio":"Command","ai.native.mcp.sse":"SSE","ai.native.mcp.buttonSave":"Add","ai.native.mcp.buttonUpdate":"Update","ai.native.mcp.buttonCancel":"Cancel","ai.native.mcp.addMCPServer.title":"Add MCP Server","ai.native.mcp.editMCPServer.title":"Edit MCP Server","ai.native.mcp.serverHost.placeHolder":"URL to SSE endpoint","ai.native.mcp.command.placeHolder":"Command to execute","ai.native.mcp.args.placeHolder":"Arguments","ai.native.mcp.env.placeHolder":"KEY=value (one per line)","ai.native.mcp.name.placeHolder":"Server Name","ai.native.mcp.type.builtin":"Built-in","ai.native.mcp.type.sse":"SSE","ai.native.mcp.type.stdio":"Command","ai.native.mcp.serverNameExists":'Server name "{0}" already exists',"ai.native.mcp.name.isRequired":"Server name is required","ai.native.mcp.command.isRequired":"Command is required","ai.native.mcp.serverHost.isRequired":"SSE URL is required"}}},32581:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(43718),r=e(20741),o=e(61647);(0,n.registerLocalizationBundle)(o.localizationBundle),(0,n.registerLocalizationBundle)(r.localizationBundle)},36942:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.enUS=void 0,t.enUS={"merge-conflicts.merge.type.auto":"auto merged","merge-conflicts.merge.type.manual":"merged","merge-conflicts.conflicts.summary":"Total {0} conflicts ({1})","merge-conflicts.conflicts.all-resolved":"All resolved","merge-conflicts.conflicts.partial-resolved":"{0} conflicts resolved, {1} remaining","merge-conflicts.non-conflicts.summary":"Non-conflict changes {0} in total","merge-conflicts.non-conflicts.progress":"{0} non-conflict changes have been {1}","merge-conflicts.non-conflicts.from.left":"target branch: {0} places","merge-conflicts.non-conflicts.from.right":"source branch: {0} places","merge-conflicts.non-conflicts.from.base":"base branch: {0} places","merge-conflicts.merge.conflict.remain":"Unresolved conflicts {0} remaining"}},40028:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.zhCN=void 0,t.zhCN={"merge-conflicts.merge.type.auto":"\u81EA\u52A8\u5408\u5E76","merge-conflicts.merge.type.manual":"\u5408\u5E76","merge-conflicts.conflicts.summary":"\u51B2\u7A81\u53D8\u66F4\u5171 {0} \u5904 ({1})","merge-conflicts.conflicts.all-resolved":"\u5DF2\u5168\u90E8\u89E3\u51B3","merge-conflicts.conflicts.partial-resolved":"\u5DF2\u89E3\u51B3 {0} \u5904, \u5269\u4F59 {1} \u5904","merge-conflicts.non-conflicts.summary":"\u975E\u51B2\u7A81\u53D8\u66F4\u5171 {0} \u5904","merge-conflicts.non-conflicts.progress":"{0} \u5904\u975E\u51B2\u7A81\u53D8\u66F4\u5DF2{1}","merge-conflicts.non-conflicts.from.left":"\u76EE\u6807\u5206\u652F: {0} \u5904","merge-conflicts.non-conflicts.from.right":"\u6765\u6E90\u5206\u652F: {0} \u5904","merge-conflicts.non-conflicts.from.base":"\u4E24\u8005: {0} \u5904","merge-conflicts.merge.conflict.remain":"\u5269\u4F59\u672A\u89E3\u51B3\u51B2\u7A81 {0} \u5904"}},61647:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.localizationBundle=void 0;const n=e(69734),r=e(21714),o=e(12651),c=e(40028);t.localizationBundle={languageId:n.LOCALE_TYPES.ZH_CN,languageName:"Chinese",localizedLanguageName:"\u4E2D\u6587(\u4E2D\u56FD)",contents:{ButtonAllow:"\u5141\u8BB8",ButtonOK:"\u786E\u5B9A",ButtonCancel:"\u53D6\u6D88","common.yes":"\u662F","common.no":"\u5426",extension:"\u63D2\u4EF6",editTtile:"\u7F16\u8F91","common.loading":"\u52A0\u8F7D\u4E2D...","tree.filter.placeholder":"\u8F93\u5165\u5173\u952E\u5B57\u6216\u8DEF\u5F84\u7B5B\u9009","file.new":"\u65B0\u5EFA\u6587\u4EF6","file.folder.new":"\u65B0\u5EFA\u6587\u4EF6\u5939","file.locate":"\u6587\u4EF6\u5B9A\u4F4D","file.save":"\u4FDD\u5B58\u6587\u4EF6","file.saveAll":"\u4FDD\u5B58\u5168\u90E8","file.autoSave":"\u81EA\u52A8\u4FDD\u5B58","file.open":"\u6253\u5F00\u6587\u4EF6","file.open.side":"\u4FA7\u8FB9\u680F\u6253\u5F00","file.open.type":"\u6253\u5F00\u65B9\u5F0F...","file.open.type.placeholder":'\u4E3A "{0}" \u9009\u62E9\u6253\u5F00\u65B9\u5F0F',"file.open.type.detail.active":"\u5F53\u524D","file.open.type.detail.and":"\u548C","file.open.type.detail.default":"\u9ED8\u8BA4","file.open.type.preference.default":'\u4E3A "{0}" \u914D\u7F6E\u9ED8\u8BA4\u7F16\u8F91\u5668...',"file.delete":"\u5220\u9664","file.rename":"\u91CD\u547D\u540D","file.compare":"\u4E0E\u7F16\u8F91\u5668\u4E2D\u7684\u6587\u4EF6\u6BD4\u8F83","file.close":"\u5173\u95ED\u6587\u4EF6","file.copy.path":"\u590D\u5236\u8DEF\u5F84","file.copy.relativepath":"\u590D\u5236\u76F8\u5BF9\u8DEF\u5F84","file.paste.file":"\u7C98\u8D34","file.copy.file":"\u590D\u5236","file.cut.file":"\u526A\u5207","file.move.existMessage":"\u8981\u7C98\u8D34\u7684\u6587\u4EF6\u540C\u65F6\u88AB\u5220\u9664\u6216\u79FB\u52A8\u3002\u65E0\u6CD5\u79FB\u52A8/\u590D\u5236\u3002\u6587\u4EF6\u5DF2\u5B58\u5728\u4E8E\u76EE\u6807\u4F4D\u7F6E\u3002","file.action.new.file":"\u65B0\u5EFA\u6587\u4EF6","file.action.new.folder":"\u65B0\u5EFA\u6587\u4EF6\u5939","file.action.refresh":"\u5237\u65B0\u6587\u4EF6","file.action.collapse":"\u5168\u90E8\u6298\u53E0","file.location":"\u5728\u6587\u4EF6\u6811\u4E2D\u5B9A\u4F4D","file.open.folder":"\u6253\u5F00\u6587\u4EF6\u5939","file.open.workspace":"\u4ECE\u6587\u4EF6\u6253\u5F00\u5DE5\u4F5C\u533A","file.confirm.delete":`### \u786E\u5B9A\u4ECE\u5DE5\u4F5C\u533A\u5220\u9664\u4E0B\u9762\u7684 {0} \u4E2A\u6587\u4EF6?
30676
30658
  {1}`,"file.confirm.deleteTips":"\u4F60\u53EF\u4EE5\u4ECE\u56DE\u6536\u7AD9\u8FD8\u539F\u6587\u4EF6","file.confirm.moveToTrash.ok":"\u79FB\u5165\u56DE\u6536\u7AD9","file.confirm.delete.ok":"\u5220\u9664","file.confirm.delete.cancel":"\u53D6\u6D88","file.confirm.move":"\u786E\u5B9A\u79FB\u52A8\u6587\u4EF6 {0} \u5230 {1} ?","file.confirm.move.ok":"\u79FB\u52A8","file.confirm.move.cancel":"\u53D6\u6D88","file.confirm.paste":"\u786E\u5B9A\u62F7\u8D1D\u6587\u4EF6 {0} \u5230 {1} ?","file.confirm.paste.ok":"\u62F7\u8D1D","file.confirm.paste.cancel":"\u53D6\u6D88","file.confirm.replace":"\u786E\u5B9A\u66FF\u6362{0}\u6587\u4EF6?","file.confirm.replace.ok":"\u66FF\u6362","file.confirm.replace.cancel":"\u53D6\u6D88","file.empty.defaultTitle":"\u65E0\u6253\u5F00\u7684\u6587\u4EF6\u5939","file.empty.defaultMessage":"\u5C1A\u672A\u6253\u5F00\u6587\u4EF6\u5939","file.workspace.defaultTip":"\u65E0\u6807\u9898\uFF08\u5DE5\u4F5C\u533A\uFF09","file.workspace.defaultWorkspaceTip":"{0}\uFF08\u5DE5\u4F5C\u533A\uFF09","file.empty.openFolder":"\u6253\u5F00\u6587\u4EF6\u5939","file.collapse":"\u5168\u90E8\u6298\u53E0","file.refresh":"\u5237\u65B0","file.search.folder":"\u5728\u6587\u4EF6\u5939\u4E2D\u67E5\u627E","file.focus.files":"\u5728\u8D44\u6E90\u7BA1\u7406\u5668\u4E2D\u805A\u7126\u6587\u4EF6","file.filetree.filter":"\u57FA\u4E8E\u5F53\u524D\u6587\u4EF6\u6811\u7B5B\u9009\u6587\u4EF6","file.filetree.openTerminalWithPath":"\u5728\u7EC8\u7AEF\u4E2D\u6253\u5F00","file.tooltip.symbolicLink":"\u7B26\u53F7\u94FE\u63A5","file.resource-deleted":"\uFF08\u5DF2\u5220\u9664\uFF09","file.revealInExplorer":"\u5728\u6587\u4EF6\u6811\u4E2D\u5B9A\u4F4D","menu-bar.title.file":"\u6587\u4EF6","menu-bar.title.edit":"\u7F16\u8F91","menu-bar.title.selection":"\u9009\u62E9","menu-bar.title.view":"\u89C6\u56FE","menu-bar.title.go":"\u524D\u5F80","menu-bar.title.debug":"\u8C03\u8BD5","menu-bar.title.terminal":"\u7EC8\u7AEF","menu-bar.title.window":"\u7A97\u53E3","menu-bar.title.help":"\u5E2E\u52A9","menu-bar.file.open":"\u6253\u5F00\u6587\u4EF6","menu-bar.file.save-as":"\u53E6\u5B58\u4E3A","menu-bar.file.save-all":"\u5168\u90E8\u4FDD\u5B58","menu-bar.view.quick.command":"\u547D\u4EE4\u9762\u677F","menu-bar.go.jumpToBracket":"\u8DF3\u8F6C\u5230\u62EC\u53F7","menu-bar.go.nextProblemInFiles":"\u4E0B\u4E00\u4E2A\u95EE\u9898","menu-bar.go.prevProblemInFiles":"\u4E0A\u4E00\u4E2A\u95EE\u9898","menu-bar.file.pref":"\u8BBE\u7F6E","menu-bar.mode.compact":"\u7D27\u51D1\u6A21\u5F0F",editor:"\u7F16\u8F91\u5668","editor.undo":"\u64A4\u9500","editor.redo":"\u91CD\u505A","editor.saveCurrent":"\u4FDD\u5B58\u5F53\u524D\u6587\u4EF6","editor.title.context.close":"\u5173\u95ED","editor.closeTab.title":"\u5173\u95ED ({0})","editor.closeCurrent":"\u5173\u95ED\u5F53\u524D\u7F16\u8F91\u7A97\u53E3","editor.openExternal":"\u4F7F\u7528\u5916\u90E8\u8F6F\u4EF6\u6253\u5F00","editor.cannotOpenBinary":"\u65E0\u6CD5\u5728\u7F16\u8F91\u5668\u4E2D\u5C55\u793A\u4E8C\u8FDB\u5236\u6587\u4EF6\u3002","editor.splitToLeft":"\u5411\u5DE6\u62C6\u5206","editor.splitToRight":"\u5411\u53F3\u62C6\u5206","editor.splitToTop":"\u5411\u4E0A\u62C6\u5206","editor.splitToBottom":"\u5411\u4E0B\u62C6\u5206","editor.closeAllInGroup":"\u5173\u95ED\u5168\u90E8","editor.closeSaved":"\u5173\u95ED\u5DF2\u4FDD\u5B58","editor.closeOtherEditors":"\u5173\u95ED\u5176\u4ED6","editor.closeToRight":"\u5173\u95ED\u5230\u53F3\u4FA7","editor.cannotSaveWithoutDirectory":"\u8BF7\u9009\u62E9\u8981\u4FDD\u5B58\u7684\u8DEF\u5F84","editor.failToOpen":"\u6253\u5F00\u6587\u4EF6 {0} \u5931\u8D25, \u8BF7\u786E\u8BA4\u6587\u4EF6\u662F\u5426\u5B58\u5728\u3002\u8BE6\u7EC6\u9519\u8BEF\u4FE1\u606F: {1}","editor.lineHeight":"\u884C\u9AD8","editor.lineHeight.description":`\u63A7\u5236\u884C\u9AD8\u3002
30677
30659
 
30678
30660
  - \u4F7F\u7528 0 \u6839\u636E\u5B57\u53F7\u81EA\u52A8\u8BA1\u7B97\u884C\u9AD8\u3002
@@ -30693,7 +30675,7 @@ your modifications. Are you sure to regenerate?`,"aiNative.resolve.conflict.mess
30693
30675
  {1}
30694
30676
 
30695
30677
  \u662F\u5426\u8981\u9000\u51FA?`,"authentication.signOutMessageSimple":"\u662F\u5426\u8981\u9000\u51FA {0}?","authentication.useOtherAccount":"\u4F7F\u7528\u5176\u4ED6\u8D26\u6237\u767B\u5F55","authentication.selectAccount":"\u6269\u5C55 '{0}' \u5C06\u8981\u8BBF\u95EE {1} \u8D26\u6237","authentication.getSessionPlaceholder":"\u9009\u62E9\u4E00\u4E2A\u8D26\u6237\u7ED9 '{0}' \u4F7F\u7528","authentication.confirmAuthenticationAccess":"\u6269\u5C55 '{0}' \u5C06\u8981\u4F7F\u7528 '{2}' \u8BBF\u95EE {1}","authentication.confirmLogin":"\u6269\u5C55 '{0}' \u5C06\u8981\u4F7F\u7528 {1} \u767B\u5F55","authentication.confirmReLogin":"\u6269\u5C55 '{0}' \u5C06\u8981\u4F7F\u7528 {1} \u518D\u6B21\u767B\u5F55","authentication.signInRequests":"\u767B\u5F55 {0}","authentication.signOut":"\u9000\u51FA {0}","authentication.noAccounts":"\u76EE\u524D\u6CA1\u6709\u767B\u5F55\u4EFB\u4F55\u8D26\u6237","authentication.signedOut":"\u6210\u529F\u9000\u51FA","refactoring-changes.ask.1.create":"\u6269\u5C55 '{0} ' \u5E0C\u671B\u901A\u8FC7\u65B0\u5EFA\u6B64\u6587\u4EF6\u6765\u8FDB\u884C\u91CD\u6784\u66F4\u6539","refactoring-changes.ask.1.copy":"\u6269\u5C55 '{0} ' \u5E0C\u671B\u901A\u8FC7\u590D\u5236\u6B64\u6587\u4EF6\u6765\u8FDB\u884C\u91CD\u6784\u66F4\u6539","refactoring-changes.ask.1.move":"\u6269\u5C55 '{0} ' \u5E0C\u671B\u901A\u8FC7\u79FB\u52A8\u6B64\u6587\u4EF6\u6765\u8FDB\u884C\u91CD\u6784\u66F4\u6539","refactoring-changes.ask.1.delete":"\u6269\u5C55 '{0} ' \u5E0C\u671B\u901A\u8FC7\u5220\u9664\u6B64\u6587\u4EF6\u6765\u8FDB\u884C\u91CD\u6784\u66F4\u6539","refactoring-changes.ask.N.create":"{0} \u4E2A\u63D2\u4EF6\u5E0C\u671B\u901A\u8FC7\u65B0\u5EFA\u6B64\u6587\u4EF6\u6765\u8FDB\u884C\u91CD\u6784\u66F4\u6539","refactoring-changes.ask.N.copy":"{0} \u4E2A\u63D2\u4EF6\u5E0C\u671B\u901A\u8FC7\u590D\u5236\u6B64\u6587\u4EF6\u6765\u8FDB\u884C\u91CD\u6784\u66F4\u6539","refactoring-changes.ask.N.move":"{0} \u4E2A\u63D2\u4EF6\u5E0C\u671B\u901A\u8FC7\u79FB\u52A8\u6B64\u6587\u4EF6\u6765\u8FDB\u884C\u91CD\u6784\u66F4\u6539","refactoring-changes.ask.N.delete":"{0} \u4E2A\u63D2\u4EF6\u5E0C\u671B\u901A\u8FC7\u5220\u9664\u6B64\u6587\u4EF6\u6765\u8FDB\u884C\u91CD\u6784\u66F4\u6539","refactoring-changes.msg.showPreview":"\u663E\u793A\u9884\u89C8","refactoring-changes.msg.skipChanges":"\u8DF3\u8FC7\u66F4\u6539","keyboard.chooseKeyboardLayout":"\u9009\u62E9\u5E03\u5C40\u6587\u4EF6\u914D\u7F6E","keyboard.autoDetect.label":"\u81EA\u52A8\u68C0\u6D4B","keyboard.autoDetect.description":"\uFF08\u5F53\u524D\uFF1A'{0} '\uFF09","keyboard.autoDetect.detail":"\u5C1D\u8BD5\u901A\u8FC7\u6D4F\u89C8\u5668\u53CA\u6309\u952E\u4FE1\u606F\u8FDB\u884C\u5E03\u5C40\u81EA\u52A8\u68C0\u6D4B","editor.configuration.suggest.filterGraceful":"\u63A7\u5236\u5BF9\u5EFA\u8BAE\u7684\u7B5B\u9009\u548C\u6392\u5E8F\u662F\u5426\u8003\u8651\u5C0F\u7684\u62FC\u5199\u9519\u8BEF\u3002","editor.configuration.suggest.insertMode":"\u63A7\u5236\u63A5\u53D7\u8865\u5168\u65F6\u662F\u5426\u8986\u76D6\u5355\u8BCD\u3002\u8BF7\u6CE8\u610F\uFF0C\u8FD9\u53D6\u51B3\u4E8E\u6269\u5C55\u9009\u62E9\u4F7F\u7528\u6B64\u529F\u80FD\u3002","editor.configuration.suggest.insertMode.insert":"\u63D2\u5165\u5EFA\u8BAE\u800C\u4E0D\u8986\u76D6\u5149\u6807\u53F3\u4FA7\u7684\u6587\u672C\u3002","editor.configuration.suggest.insertMode.replace":"\u63D2\u5165\u5EFA\u8BAE\u5E76\u8986\u76D6\u5149\u6807\u53F3\u4FA7\u7684\u6587\u672C\u3002","editor.configuration.suggest.localityBonus":"\u63A7\u5236\u6392\u5E8F\u65F6\u662F\u5426\u9996\u9009\u5149\u6807\u9644\u8FD1\u7684\u5B57\u8BCD\u3002","editor.configuration.suggest.maxVisibleSuggestions.dep":"\u6B64\u8BBE\u7F6E\u5DF2\u5F03\u7528\u3002\u73B0\u5728\u53EF\u4EE5\u8C03\u6574\u5EFA\u8BAE\u5C0F\u7EC4\u4EF6\u7684\u5927\u5C0F\u3002","editor.configuration.suggest.preview":"\u63A7\u5236\u662F\u5426\u5728\u7F16\u8F91\u5668\u4E2D\u9884\u89C8\u5EFA\u8BAE\u7ED3\u679C\u3002","editor.configuration.suggest.shareSuggestSelections":"\u63A7\u5236\u662F\u5426\u5728\u591A\u4E2A\u5DE5\u4F5C\u533A\u548C\u7A97\u53E3\u95F4\u5171\u4EAB\u8BB0\u5FC6\u7684\u5EFA\u8BAE\u9009\u9879(\u9700\u8981 `#editor.suggestSelection#`)\u3002","editor.configuration.suggest.showIcons":"\u63A7\u5236\u662F\u5426\u5728\u5EFA\u8BAE\u4E2D\u663E\u793A\u6216\u9690\u85CF\u56FE\u6807\u3002","editor.configuration.suggest.showInlineDetails":"\u63A7\u5236\u5EFA\u8BAE\u8BE6\u7EC6\u4FE1\u606F\u662F\u968F\u6807\u7B7E\u4E00\u8D77\u663E\u793A\u8FD8\u662F\u4EC5\u663E\u793A\u5728\u8BE6\u7EC6\u4FE1\u606F\u5C0F\u7EC4\u4EF6\u4E2D","editor.configuration.suggest.showStatusBar":"\u63A7\u5236\u5EFA\u8BAE\u5C0F\u90E8\u4EF6\u5E95\u90E8\u7684\u72B6\u6001\u680F\u7684\u53EF\u89C1\u6027\u3002","editor.configuration.suggest.snippetsPreventQuickSuggestions":"\u63A7\u5236\u6D3B\u52A8\u4EE3\u7801\u6BB5\u662F\u5426\u963B\u6B62\u5FEB\u901F\u5EFA\u8BAE\u3002","editor.configuration.suggestFontSize":"\u5EFA\u8BAE\u5C0F\u90E8\u4EF6\u7684\u5B57\u53F7\u3002\u5982\u679C\u8BBE\u7F6E\u4E3A `0`\uFF0C\u5219\u4F7F\u7528 `#editor.fontSize#` \u7684\u503C\u3002","editor.configuration.suggestLineHeight":"\u5EFA\u8BAE\u5C0F\u90E8\u4EF6\u7684\u884C\u9AD8\u3002\u5982\u679C\u8BBE\u7F6E\u4E3A `0`\uFF0C\u5219\u4F7F\u7528 `#editor.lineHeight#` \u7684\u503C\u3002\u6700\u5C0F\u503C\u4E3A 8\u3002","editor.configuration.suggestOnTriggerCharacters":"\u63A7\u5236\u5728\u952E\u5165\u89E6\u53D1\u5B57\u7B26\u540E\u662F\u5426\u81EA\u52A8\u663E\u793A\u5EFA\u8BAE\u3002","editor.configuration.acceptSuggestionOnEnterSmart":"\u4EC5\u5728\u5EFA\u8BAE\u505A\u51FA\u6587\u672C\u66F4\u6539\u65F6\uFF0C\u624D\u4F7F\u7528 `Enter` \u63A5\u53D7\u5EFA\u8BAE\u3002","editor.configuration.acceptSuggestionOnEnter":"\u63A7\u5236\u7F16\u8F91\u5668\u662F\u5426\u5E94\u8BE5\u5728 `Tab` \u952E\u4E4B\u5916\uFF0C\u8FD8\u4F7F\u7528 `Enter` \u952E\u6765\u63A5\u53D7\u5EFA\u8BAE\u3002\u8FD9\u6709\u52A9\u4E8E\u907F\u514D\u5728\u63D2\u5165\u65B0\u884C\u6216\u63A5\u53D7\u5EFA\u8BAE\u4E4B\u95F4\u7684\u6B67\u4E49\u3002","editor.configuration.acceptSuggestionOnCommitCharacter":"\u63A7\u5236\u662F\u5426\u5728\u4F7F\u7528\u63D0\u4EA4\u5B57\u7B26\u65F6\u63A5\u53D7\u5EFA\u8BAE\u3002\u4F8B\u5982\uFF0C\u5728 JavaScript \u4E2D\uFF0C\u5206\u53F7 (`;`) \u662F\u4E00\u4E2A\u63D0\u4EA4\u5B57\u7B26\uFF0C\u53EF\u4EE5\u63A5\u53D7\u4E00\u4E2A\u5EFA\u8BAE\u5E76\u952E\u5165\u8BE5\u5B57\u7B26\u3002","editor.configuration.snippetSuggestions.top":"\u5C06\u4EE3\u7801\u7247\u6BB5\u7684\u5EFA\u8BAE\u653E\u5728\u5176\u4ED6\u5EFA\u8BAE\u7684\u9876\u90E8\u3002","editor.configuration.snippetSuggestions.bottom":"\u5C06\u4EE3\u7801\u7247\u6BB5\u7684\u5EFA\u8BAE\u653E\u5728\u5176\u4ED6\u5EFA\u8BAE\u7684\u5E95\u90E8\u3002","editor.configuration.snippetSuggestions.inline":"\u5C06\u4EE3\u7801\u7247\u6BB5\u7684\u5EFA\u8BAE\u6DF7\u5408\u5728\u5176\u4ED6\u5EFA\u8BAE\u7684\u4E2D\u95F4\u3002","editor.configuration.snippetSuggestions.none":"\u4E0D\u5C55\u793A\u4EE3\u7801\u7247\u6BB5\u5EFA\u8BAE\u3002","editor.configuration.snippetSuggestions":"\u63A7\u5236\u4EE3\u7801\u7247\u6BB5\u662F\u5426\u4E0E\u5176\u4ED6\u5EFA\u8BAE\u4E00\u540C\u663E\u793A\u4EE5\u53CA\u5B83\u4EEC\u7684\u6392\u5E8F\u65B9\u5F0F\u3002","editor.configuration.wordBasedSuggestions":"\u63A7\u5236\u662F\u5426\u6839\u636E\u6587\u6863\u4E2D\u7684\u5B57\u8BCD\u8BA1\u7B97\u81EA\u52A8\u8865\u5168\u5217\u8868\u3002","editor.configuration.suggestSelection":"\u63A7\u5236\u5728\u5EFA\u8BAE\u5217\u8868\u4E2D\u5982\u4F55\u9884\u5148\u9009\u62E9\u5EFA\u8BAE\u3002","editor.configuration.suggestSelection.first":"\u59CB\u7EC8\u9009\u62E9\u7B2C\u4E00\u4E2A\u5EFA\u8BAE\u3002","editor.configuration.suggestSelection.recentlyUsed":"\u9009\u62E9\u6700\u8FD1\u7684\u5EFA\u8BAE\uFF0C\u9664\u975E\u8FDB\u4E00\u6B65\u952E\u5165\u9009\u62E9\u5176\u4ED6\u9879\u3002\u4F8B\u5982 `console. -> console.log`\uFF0C\u56E0\u4E3A\u6700\u8FD1\u8865\u5168\u8FC7 `log`\u3002","editor.configuration.suggestSelection.recentlyUsedByPrefix":"\u6839\u636E\u4E4B\u524D\u8865\u5168\u8FC7\u7684\u5EFA\u8BAE\u7684\u524D\u7F00\u6765\u8FDB\u884C\u9009\u62E9\u3002\u4F8B\u5982\uFF0C`co -> console`\u3001`con -> const`\u3002","editor.configuration.tabCompletion":"\u542F\u7528 Tab \u8865\u5168\u3002","editor.configuration.tabCompletion.off":"\u7981\u7528 Tab \u8865\u5168\u3002","editor.configuration.tabCompletion.on":"\u5728\u6309\u4E0B Tab \u952E\u65F6\u8FDB\u884C Tab \u8865\u5168\uFF0C\u5C06\u63D2\u5165\u6700\u4F73\u5339\u914D\u5EFA\u8BAE\u3002","editor.configuration.tabCompletion.onlySnippets":'\u5728\u524D\u7F00\u5339\u914D\u65F6\u8FDB\u884C Tab \u8865\u5168\u3002\u5728 "quickSuggestions" \u672A\u542F\u7528\u65F6\u4F53\u9A8C\u6700\u597D\u3002',"editor.configuration.editor.guides.bracketPairs":"\u63A7\u5236\u662F\u5426\u542F\u7528\u62EC\u53F7\u5BF9\u6307\u5357\u3002","editor.configuration.editor.guides.bracketPairsHorizontal":"\u63A7\u5236\u662F\u5426\u542F\u7528\u6C34\u5E73\u62EC\u53F7\u5BF9\u6307\u5357\u3002","editor.configuration.renderLineHighlight":"\u63A7\u5236\u7F16\u8F91\u5668\u7684\u5F53\u524D\u884C\u8FDB\u884C\u9AD8\u4EAE\u663E\u793A\u7684\u65B9\u5F0F\u3002","editor.configuration.renderLineHighlight.all":"\u540C\u65F6\u7A81\u51FA\u663E\u793A\u5BFC\u822A\u7EBF\u548C\u5F53\u524D\u884C\u3002","editor.configuration.renderLineHighlightOnlyWhenFocus":"\u63A7\u5236\u7F16\u8F91\u5668\u662F\u5426\u4EC5\u5728\u7126\u70B9\u5728\u7F16\u8F91\u5668\u65F6\u7A81\u51FA\u663E\u793A\u5F53\u524D\u884C\u3002","editor.configuration.codeLens":"\u63A7\u5236\u662F\u5426\u5728\u7F16\u8F91\u5668\u4E2D\u663E\u793A CodeLens\u3002","editor.configuration.suggest.showClasss":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u7C7B\u201D\u5EFA\u8BAE\u3002","editor.configuration.suggest.showColors":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u989C\u8272\u201D\u5EFA\u8BAE\u3002","editor.configuration.suggest.showConstants":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u5E38\u91CF\u201D\u5EFA\u8BAE\u3002","editor.configuration.suggest.showConstructors":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u6784\u9020\u51FD\u6570\u201D\u5EFA\u8BAE\u3002","editor.configuration.suggest.showCustomcolors":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u81EA\u5B9A\u4E49\u989C\u8272\u201D\u5EFA\u8BAE\u3002","editor.configuration.suggest.showDeprecated":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u5DF2\u542F\u7528\u201D\u5EFA\u8BAE\u3002","editor.configuration.suggest.showEnumMembers":'\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A "enumMember" \u5EFA\u8BAE\u3002',"editor.configuration.suggest.showEnums":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u679A\u4E3E\u201D\u5EFA\u8BAE\u3002","editor.configuration.suggest.showEvents":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u4E8B\u4EF6\u201D\u5EFA\u8BAE\u3002","editor.configuration.suggest.showFields":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u5B57\u6BB5\u201D\u5EFA\u8BAE\u3002","editor.configuration.suggest.showFiles":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u6587\u4EF6\u201D\u5EFA\u8BAE\u3002","editor.configuration.suggest.showFolders":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u6587\u4EF6\u5939\u201D\u5EFA\u8BAE\u3002","editor.configuration.suggest.showFunctions":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u51FD\u6570\u201D\u5EFA\u8BAE\u3002","editor.configuration.suggest.showInterfaces":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u63A5\u53E3\u201D\u5EFA\u8BAE\u3002","editor.configuration.suggest.showIssues":'\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A"\u95EE\u9898"\u5EFA\u8BAE\u3002',"editor.configuration.suggest.showKeywords":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u5173\u952E\u5B57\u201D\u5EFA\u8BAE\u3002","editor.configuration.suggest.showMethods":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u65B9\u6CD5\u201D\u5EFA\u8BAE\u3002","editor.configuration.suggest.showModules":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u6A21\u5757\u201D\u5EFA\u8BAE\u3002","editor.configuration.suggest.showOperators":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u64CD\u4F5C\u7B26\u201D\u5EFA\u8BAE\u3002","editor.configuration.suggest.showPropertys":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u5C5E\u6027\u201D\u5EFA\u8BAE\u3002","editor.configuration.suggest.showReferences":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u53C2\u8003\u201D\u5EFA\u8BAE\u3002","editor.configuration.suggest.showSnippets":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u7247\u6BB5\u201D\u5EFA\u8BAE\u3002","editor.configuration.suggest.showStructs":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u7ED3\u6784\u201D\u5EFA\u8BAE\u3002","editor.configuration.suggest.showTexts":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u6587\u672C\u201D\u5EFA\u8BAE\u3002","editor.configuration.suggest.showTypeParameters":'\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A "typeParameter" \u5EFA\u8BAE\u3002',"editor.configuration.suggest.showUnits":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u5355\u4F4D\u201D\u5EFA\u8BAE\u3002","editor.configuration.suggest.showUsers":'\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A"\u7528\u6237"\u5EFA\u8BAE\u3002',"editor.configuration.suggest.showValues":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u503C\u201D\u5EFA\u8BAE\u3002","editor.configuration.suggest.showVariables":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u53D8\u91CF\u201D\u5EFA\u8BAE\u3002","editor.configuration.suggest.maxVisibleSuggestions":"\u63A7\u5236 IntelliSense \u5728\u663E\u793A\u6EDA\u52A8\u6761\u4E4B\u524D\u5C06\u663E\u793A\u7684\u5EFA\u8BAE\u6570\u91CF\uFF08\u6700\u591A 15 \u4E2A\uFF09\u3002","editor.configuration.suggest.details.visible":"\u63A7\u5236\u7F16\u8F91\u5668\u4EE3\u7801\u8865\u5168\u662F\u5426\u9ED8\u8BA4\u5C55\u5F00\u8BE6\u60C5\u4FE1\u606F","editor.configuration.suggest.filtered":"\u63A7\u5236\u662F\u5426\u5E94\u4ECE IntelliSense \u4E2D\u8FC7\u6EE4\u6389\u67D0\u4E9B\u5EFA\u8BAE\u7C7B\u578B\u3002\u53EF\u4EE5\u5728\u6B64\u5904\u627E\u5230\u4E00\u4EFD\u5EFA\u8BAE\u7C7B\u578B\u5217\u8868: https://code.visualstudio.com/docs/editor/intellisense#_types-of-completions.","editor.configuration.suggest.filtered.method":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u4F1A\u5C55\u793A `method` \u7C7B\u578B\u7684\u5EFA\u8BAE\u3002","editor.configuration.suggest.filtered.function":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u4F1A\u5C55\u793A `function` \u7C7B\u578B\u7684\u5EFA\u8BAE\u3002","editor.configuration.suggest.filtered.constructor":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u4F1A\u5C55\u793A `constructor` \u7C7B\u578B\u7684\u5EFA\u8BAE\u3002","editor.configuration.suggest.filtered.field":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u4F1A\u5C55\u793A `field` \u7C7B\u578B\u7684\u5EFA\u8BAE\u3002","editor.configuration.suggest.filtered.variable":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u4F1A\u5C55\u793A `variable` \u7C7B\u578B\u7684\u5EFA\u8BAE\u3002","editor.configuration.suggest.filtered.class":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u4F1A\u5C55\u793A `class` \u7C7B\u578B\u7684\u5EFA\u8BAE\u3002","editor.configuration.suggest.filtered.struct":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u4F1A\u5C55\u793A `struct` \u7C7B\u578B\u7684\u5EFA\u8BAE\u3002","editor.configuration.suggest.filtered.interface":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u4F1A\u5C55\u793A `interface` \u7C7B\u578B\u7684\u5EFA\u8BAE\u3002","editor.configuration.suggest.filtered.module":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u4F1A\u5C55\u793A `module` \u7C7B\u578B\u7684\u5EFA\u8BAE\u3002","editor.configuration.suggest.filtered.property":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u4F1A\u5C55\u793A `property` \u7C7B\u578B\u7684\u5EFA\u8BAE\u3002","editor.configuration.suggest.filtered.event":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u4F1A\u5C55\u793A `event` \u7C7B\u578B\u7684\u5EFA\u8BAE\u3002","editor.configuration.suggest.filtered.operator":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u4F1A\u5C55\u793A `operator` \u7C7B\u578B\u7684\u5EFA\u8BAE\u3002","editor.configuration.suggest.filtered.unit":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u4F1A\u5C55\u793A `unit` \u7C7B\u578B\u7684\u5EFA\u8BAE\u3002","editor.configuration.suggest.filtered.value":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u4F1A\u5C55\u793A `value` \u7C7B\u578B\u7684\u5EFA\u8BAE\u3002","editor.configuration.suggest.filtered.constant":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u4F1A\u5C55\u793A `constant` \u7C7B\u578B\u7684\u5EFA\u8BAE\u3002","editor.configuration.suggest.filtered.enum":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u4F1A\u5C55\u793A `enum` \u7C7B\u578B\u7684\u5EFA\u8BAE\u3002","editor.configuration.suggest.filtered.enumMember":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u4F1A\u5C55\u793A `enumMember` \u7C7B\u578B\u7684\u5EFA\u8BAE\u3002","editor.configuration.suggest.filtered.keyword":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u4F1A\u5C55\u793A `keyword` \u7C7B\u578B\u7684\u5EFA\u8BAE\u3002","editor.configuration.suggest.filtered.text":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u4F1A\u5C55\u793A `text` \u7C7B\u578B\u7684\u5EFA\u8BAE\u3002","editor.configuration.suggest.filtered.color":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u4F1A\u5C55\u793A `color` \u7C7B\u578B\u7684\u5EFA\u8BAE\u3002","editor.configuration.suggest.filtered.file":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u4F1A\u5C55\u793A `file` \u7C7B\u578B\u7684\u5EFA\u8BAE\u3002","editor.configuration.suggest.filtered.reference":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u4F1A\u5C55\u793A `reference` \u7C7B\u578B\u7684\u5EFA\u8BAE\u3002","editor.configuration.suggest.filtered.customcolor":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u4F1A\u5C55\u793A `customcolor` \u7C7B\u578B\u7684\u5EFA\u8BAE\u3002","editor.configuration.suggest.filtered.folder":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u4F1A\u5C55\u793A `folder` \u7C7B\u578B\u7684\u5EFA\u8BAE\u3002","editor.configuration.suggest.filtered.typeParameter":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u4F1A\u5C55\u793A `typeParameter` \u7C7B\u578B\u7684\u5EFA\u8BAE\u3002","editor.configuration.suggest.filtered.snippet":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u4F1A\u5C55\u793A `snippet` \u7C7B\u578B\u7684\u5EFA\u8BAE\u3002","editor.configuration.editor.gotoLocation.multiple":'\u63A7\u5236 "\u8F6C\u5230" \u547D\u4EE4\uFF08\u4F8B\u5982\u8F6C\u5230\u5B9A\u4E49\uFF09\u5728\u5B58\u5728\u591A\u4E2A\u76EE\u6807\u4F4D\u7F6E\u65F6\u7684\u884C\u4E3A\u3002',"editor.configuration.gotoLocation.multiple.peek":"\u5728\u901F\u89C8\u89C6\u56FE(Peek View)\u4E2D\u663E\u793A\u7ED3\u679C\u3002(\u9ED8\u8BA4)","editor.configuration.gotoLocation.multiple.gotoAndPeek":"\u8F6C\u5230\u4E3B\u7ED3\u679C\u5E76\u663E\u793A\u901F\u89C8\u89C6\u56FE(Peek View)\u3002","editor.configuration.gotoLocation.multiple.goto":"\u8F6C\u5230\u4E3B\u7ED3\u679C\uFF0C\u5E76\u5BF9\u5176\u4ED6\u7ED3\u679C\u542F\u7528\u65E0\u901F\u89C8\u5BFC\u822A","editor.configuration.experimental.stickyScroll.enabled":"\u5728\u7F16\u8F91\u5668\u9876\u90E8\u7684\u6EDA\u52A8\u8FC7\u7A0B\u4E2D\u663E\u793A\u5D4C\u5957\u7684\u5F53\u524D\u4F5C\u7528\u57DF\u3002","editor.configuration.maxTokenizationLineLength":"\u7531\u4E8E\u6027\u80FD\u539F\u56E0\uFF0C\u8D85\u8FC7\u8FD9\u4E2A\u957F\u5EA6\u7684\u884C\u5C06\u4E0D\u4F1A\u88AB\u6807\u8BC6\u3002","editor.configuration.codeActionsOnSave.organizeImports":"\u63A7\u5236\u662F\u5426\u5E94\u5728\u6587\u4EF6\u4FDD\u5B58\u65F6\u6574\u7406\u5BFC\u5165\uFF08Import\uFF09\u8BED\u53E5\u3002","editor.configuration.codeActionsOnSave.fixAll":"\u63A7\u5236\u662F\u5426\u5E94\u5728\u6587\u4EF6\u4FDD\u5B58\u65F6\u8FD0\u884C\u81EA\u52A8\u4FEE\u590D\u64CD\u4F5C\u3002","editor.configuration.codeActionsOnSave":"\u5728\u4FDD\u5B58\u65F6\u8FD0\u884C\u7684\u4EE3\u7801\u64CD\u4F5C\u7C7B\u578B","editor.configuration.codeActionsOnSaveTimeout":"\u5728\u6B64\u8D85\u65F6\u65F6\u95F4(\u6BEB\u79D2)\u4E4B\u540E\u4EE3\u7801\u64CD\u4F5C\u5C06\u88AB\u53D6\u6D88\u3002","editor.configuration.codeActionsOnSaveNotification":"\u4EE3\u7801\u64CD\u4F5C\u6267\u884C\u65F6\u662F\u5426\u5C55\u793A\u901A\u77E5\u4FE1\u606F","editor.configuration.quickSuggestionsDelay":"\u63A7\u5236\u663E\u793A\u667A\u80FD\u63D0\u793A\u7684\u5EF6\u8FDF\u65F6\u957F (\u6BEB\u79D2)\u3002","editor.configuration.tabSize":"\u63A7\u5236 Tab \u7F29\u8FDB\u7B49\u4E8E\u7684\u7A7A\u683C\u6570\u3002\u82E5\u542F\u7528 `#editor.detectIndentation#`\uFF0C\u8BE5\u8BBE\u7F6E\u53EF\u80FD\u4F1A\u88AB\u8986\u76D6","editor.configuration.fontWeight":'\u63A7\u5236\u5B57\u4F53\u7C97\u7EC6\uFF0C\u63A5\u6536 "normal" \u548C "bold" \u5173\u952E\u8BCD\u6216\u8005 1 \u5230 1000 \u6570\u503C\u3002',"editor.configuration.largeFileSize":"\u63A7\u5236\u8D85\u5927\u6587\u4EF6\u7684\u81EA\u5B9A\u4E49\u4F53\u79EF\u3002(\u5355\u4F4D\uFF1AB)","editor.configuration.preferredFormatter":"\u914D\u7F6E\u4F18\u5148\u4F7F\u7528\u7684\u683C\u5F0F\u5316\u5668\u3002","editor.configuration.wrapTab":"\u63A7\u5236\u5F53\u7F16\u8F91\u5668 Tab \u8D85\u8FC7\u53EF\u7528\u7A7A\u95F4\u65F6\uFF0C\u662F\u5426\u4F7F\u7528\u6362\u884C\u6765\u4EE3\u66FF\u6EDA\u52A8\u6A21\u5F0F\u3002","editor.configuration.enablePreviewFromCodeNavigation":"\u63A7\u5236\u5F53\u4EE3\u7801\u5BFC\u822A\u4ECE\u5176\u51FA\u53D1\u65F6\uFF0C\u7F16\u8F91\u5668\u662F\u5426\u4ECD\u5904\u4E8E\u9884\u89C8\u6A21\u5F0F\u3002","editor.configuration.formatOnSaveTimeout":"\u63A7\u5236\u4FDD\u5B58\u65F6\u683C\u5F0F\u5316\u7684\u8D85\u65F6\u65F6\u95F4\uFF08\u6BEB\u79D2\uFF09\u3002\u4EC5\u5F53 `#editor.formatOnSave#` \u542F\u7528\u65F6\u751F\u6548\u3002","editor.configuration.inlineSuggest.enabled":"\u63A7\u5236\u662F\u5426\u5728\u7F16\u8F91\u5668\u4E2D\u81EA\u52A8\u663E\u793A\u5185\u8054\u5EFA\u8BAE\u3002","editor.configuration.inlineSuggest.showToolbar":"\u63A7\u5236\u4F55\u65F6\u663E\u793A\u5185\u8054\u5EFA\u8BAE\u5DE5\u5177\u680F\u3002","editor.configuration.inlineSuggest.showToolbar.always":"\u6BCF\u5F53\u663E\u793A\u5185\u8054\u5EFA\u8BAE\u65F6\uFF0C\u5C31\u663E\u793A\u5185\u8054\u5EFA\u8BAE\u5DE5\u5177\u680F\u3002","editor.configuration.inlineSuggest.showToolbar.onHover":"\u5C06\u9F20\u6807\u60AC\u505C\u5728\u5185\u8054\u5EFA\u8BAE\u4E0A\u65F6\u663E\u793A\u5185\u8054\u5EFA\u8BAE\u5DE5\u5177\u680F\u3002","editor.configuration.inlineSuggest.showToolbar.never":"\u6C38\u4E0D\u663E\u793A\u5185\u8054\u5EFA\u8BAE\u5DE5\u5177\u680F\u3002","editor.configuration.hover.enabled":"\u63A7\u5236\u662F\u5426\u5728\u7F16\u8F91\u5668\u4E2D\u542F\u7528\u4EE3\u7801\u63D0\u793A\u3002","editor.configuration.hover.delay":"\u63A7\u5236\u4EE3\u7801\u63D0\u793A\u663E\u793A\u7684\u5EF6\u8FDF\u65F6\u95F4\uFF08\u6BEB\u79D2\uFF09\u3002","editor.configuration.hover.sticky":"\u63A7\u5236\u4EE3\u7801\u63D0\u793A\u662F\u5426\u5728\u9F20\u6807\u60AC\u505C\u65F6\u4FDD\u6301\u53EF\u89C1\u3002","editor.configuration.hover.hidingDelay":"\u63A7\u5236\u4EE3\u7801\u63D0\u793A\u9690\u85CF\u7684\u5EF6\u8FDF\u65F6\u95F4\uFF08\u6BEB\u79D2\uFF09\u3002\u9700\u8981 `editor.hover.sticky` \u8BBE\u7F6E\u4E3A true \u65F6\u751F\u6548\u3002","editor.configuration.hover.above":"\u4F18\u5148\u663E\u793A\u4EE3\u7801\u63D0\u793A\u5728\u884C\u4E0A\u65B9\uFF0C\u5982\u679C\u884C\u6709\u7A7A\u95F4\u3002","editor.configuration.autoSave":"\u63A7\u5236\u5982\u4F55\u81EA\u52A8\u4FDD\u5B58\u6587\u4EF6\u3002","editor.configuration.formatOnSave":"\u5728\u4FDD\u5B58\u65F6\u683C\u5F0F\u5316\u6587\u4EF6","editor.configuration.formatOnType":"\u63A7\u5236\u7F16\u8F91\u5668\u662F\u5728\u952E\u5165\u540E\u81EA\u52A8\u683C\u5F0F\u5316\u8BE5\u884C\u3002","editor.configuration.formatOnPaste":"\u63A7\u5236\u7F16\u8F91\u5668\u662F\u5426\u81EA\u52A8\u683C\u5F0F\u5316\u7C98\u8D34\u7684\u5185\u5BB9\u3002\u9700\u8981\u5F53\u524D\u6587\u4EF6\u6709\u4E00\u4E2A\u683C\u5F0F\u5316\u5DE5\u5177\u5E76\u4E14\u8BE5\u683C\u5F0F\u5316\u683C\u5C40\u5FC5\u987B\u80FD\u591F\u5728\u6587\u6863\u4E2D\u683C\u5F0F\u5316\u4E00\u4E2A\u8303\u56F4\u3002","editor.configuration.autoIndent":"\u63A7\u5236\u7F16\u8F91\u5668\u662F\u5426\u5E94\u8BE5\u5728\u7528\u6237\u952E\u5165\u3001\u7C98\u8D34\u6216\u79FB\u52A8\u884C\u65F6\u81EA\u52A8\u8C03\u6574\u7F29\u8FDB\u3002\u5FC5\u987B\u63D0\u4F9B\u5E26\u6709\u8BE5\u8BED\u8A00\u7F29\u8FDB\u89C4\u5219\u7684\u6269\u5C55\u3002","editor.configuration.autoSaveDelay":"\u63A7\u5236\u81EA\u52A8\u4FDD\u5B58\u7684\u5EF6\u8FDF\u65F6\u957F\uFF08\u6BEB\u79D2\uFF09\u3002\u4EC5\u5F53 `#editor.autoSave#` \u8BBE\u7F6E\u4E3A\u201C\u7F16\u8F91\u540E\u81EA\u52A8\u4FDD\u5B58\u201D\u65F6\u751F\u6548\u3002","editor.configuration.askIfDiff":"\u4FDD\u5B58\u6587\u4EF6\u65F6\u5982\u679C\u78C1\u76D8\u4E0A\u7684\u6587\u4EF6\u8F83\u65B0\uFF0C\u8FDB\u884C\u63D0\u793A\u624B\u52A8\u89E3\u51B3\u4FDD\u5B58\u51B2\u7A81\u3002","editor.configuration.forceReadOnly":"\u662F\u5426\u542F\u7528 \u53EA\u8BFB\u6A21\u5F0F","editor.configuration.bracketPairColorization.enabled":"\u63A7\u5236\u662F\u5426\u542F\u7528\u62EC\u53F7\u5BF9\u7740\u8272\u3002\u4F7F\u7528 \u201Cworkbench.colorCustomizations\u201D \u66FF\u4EE3\u62EC\u53F7\u7A81\u51FA\u663E\u793A\u989C\u8272\u3002","editor.configuration.guides.bracketPairs":"\u63A7\u5236\u662F\u5426\u542F\u7528\u62EC\u53F7\u5BF9\u6307\u5357\u3002","editor.configuration.mouseBackForwardToNavigate":"\u5141\u8BB8\u4F7F\u7528\u9F20\u6807\u6309\u94AE 4 \u548C 5 \u6765\u6267\u884C\u547D\u4EE4\u201CGo Back\u201D\u548C\u201CGo Forward\u201D\u3002","editor.configuration.previewMode":"\u4F7F\u7528\u9884\u89C8\u6A21\u5F0F\u6253\u5F00","editor.configuration.tokenColorCustomizations":"\u8986\u76D6\u5F53\u524D\u6240\u9009\u989C\u8272\u4E3B\u9898\u4E2D\u7684\u7F16\u8F91\u5668\u989C\u8272\u548C\u5B57\u4F53\u6837\u5F0F","editor.configuration.workbench.editorAssociations":'\u5C06 glob \u6A21\u5F0F\u914D\u7F6E\u5230\u7F16\u8F91\u5668(\u4F8B\u5982 `"*\u5341\u516D\u8FDB\u5236": "hexEditor.hexEdit"`)\u3002\u8FD9\u4E9B\u4F18\u5148\u987A\u5E8F\u9AD8\u4E8E\u9ED8\u8BA4\u884C\u4E3A\u3002',"editor.configuration.guides.indentation":"\u63A7\u5236\u7F16\u8F91\u5668\u662F\u5426\u663E\u793A\u7F29\u8FDB\u53C2\u8003\u7EBF\u3002","editor.configuration.guides.highlightActiveIndentation":"\u63A7\u5236\u662F\u5426\u7A81\u51FA\u663E\u793A\u7F16\u8F91\u5668\u4E2D\u6D3B\u52A8\u7684\u7F29\u8FDB\u53C2\u8003\u7EBF\u3002","editor.configuration.trimAutoWhitespace":"\u5220\u9664\u81EA\u52A8\u63D2\u5165\u7684\u5C3E\u968F\u7A7A\u767D\u7B26\u53F7\u3002","editor.configuration.unicodeHighlight.ambiguousCharacters":"\u63A7\u5236\u662F\u5426\u7A81\u51FA\u663E\u793A\u53EF\u80FD\u4E0E\u57FA\u672C ASCII \u5B57\u7B26\u6DF7\u6DC6\u7684\u5B57\u7B26\uFF0C\u4F46\u5F53\u524D\u7528\u6237\u533A\u57DF\u8BBE\u7F6E\u4E2D\u5E38\u89C1\u7684\u5B57\u7B26\u9664\u5916\u3002","editor.configuration.lightbulb.enabled":"\u5728\u7F16\u8F91\u5668\u4E2D\u542F\u7528\u4EE3\u7801\u64CD\u4F5C\u83DC\u5355\u3002","editor.configuration.lightbulb.enabled.off":"\u7981\u7528\u4EE3\u7801\u64CD\u4F5C\u83DC\u5355\u3002","editor.configuration.lightbulb.enabled.onCode":"\u5F53\u5149\u6807\u4E0E\u4EE3\u7801\u4E00\u8D77\u6392\u5217\u65F6\uFF0C\u663E\u793A\u4EE3\u7801\u64CD\u4F5C\u83DC\u5355\u3002","editor.configuration.lightbulb.enabled.on":"\u5F53\u5149\u6807\u4E0E\u4EE3\u7801\u4E00\u8D77\u6392\u5217\u6216\u5728\u7A7A\u7684\u884C\u65F6\uFF0C\u663E\u793A\u4EE3\u7801\u64CD\u4F5C\u83DC\u5355\u3002","diffEditor.configuration.renderSideBySide":"\u63A7\u5236\u5DEE\u5F02\u7F16\u8F91\u5668\u7684\u663E\u793A\u65B9\u5F0F\u3002","diffEditor.configuration.ignoreTrimWhitespace":"\u542F\u7528\u540E\uFF0C\u5DEE\u5F02\u7F16\u8F91\u5668\u7684\u524D\u5BFC\u548C\u5C3E\u968F\u7A7A\u767D\u5B57\u7B26\u5C06\u4F1A\u5FFD\u7565","diffEditor.action.toggleCollapseUnchangedRegions":"\u6298\u53E0\u672A\u66F4\u6539\u7684\u4EE3\u7801\u533A\u57DF","inlineSuggest.enabled":"\u63A7\u5236\u662F\u5426\u5728\u7F16\u8F91\u5668\u4E2D\u81EA\u52A8\u663E\u793A\u5185\u8054\u5EFA\u8BAE\u3002","view.component.renderedError":"\u89C6\u56FE\u7EC4\u4EF6\u6E32\u67D3\u5F02\u5E38","view.component.tryAgain":"\u91CD\u65B0\u52A0\u8F7D","test.title":"\u6D4B\u8BD5\u7BA1\u7406\u5668","test.result.runFinished":"\u6D4B\u8BD5\u8FD0\u884C\u5B8C\u6210\u4E8E {0}","test.task.unnamed":"\u672A\u547D\u540D\u4EFB\u52A1","test.results":"\u6D4B\u8BD5\u7ED3\u679C","menu.missing.command":"\u83DC\u5355{0} \u8981\u6267\u884C\u7684\u547D\u4EE4\u4E0D\u5B58\u5728\uFF1A{1}","menu.missing.altCommand":"\u83DC\u5355{0} \u8981\u6267\u884C\u7684\u547D\u4EE4(altCommand)\u4E0D\u5B58\u5728\uFF1A{1}","menu.dupe.command":"\u83DC\u5355{0} command({1}) \u548C alt({2}) \u6CE8\u518C\u91CD\u590D","command.category.developerTools":"\u5F00\u53D1\u4EBA\u5458\u5DE5\u5177","connection.start.rtt":"\u67E5\u770B\u901A\u4FE1\u5EF6\u8FDF","connection.stop.rtt":"\u5173\u95ED\u901A\u4FE1\u5EF6\u8FDF\u68C0\u67E5","debug.terminal.label":"\u521B\u5EFA Javascript Debug Terminal","debug.terminal.title":"\u8C03\u8BD5\u8FDB\u7A0B","workbench.action.tasks.runTask":"\u8FD0\u884C\u4EFB\u52A1","workbench.action.tasks.reRunTask":"\u6267\u884C\u4E0A\u6B21\u8FD0\u884C\u7684\u4EFB\u52A1","workbench.action.tasks.restartTask":"\u91CD\u65B0\u5F00\u59CB\u8FD0\u884C\u4E2D\u7684\u4EFB\u52A1","workbench.action.tasks.terminate":"\u7EC8\u6B62\u4EFB\u52A1","workbench.action.tasks.showTasks":"\u5C55\u793A\u4EFB\u52A1","workbench.action.tasks.showLog":"\u5C55\u793A\u4EFB\u52A1\u65E5\u5FD7","task.contribute":"\u8D21\u732E","task.cannotFindTask":"\u672A\u627E\u5230 {0} \u7684\u4EFB\u52A1\uFF0C\u6309\u56DE\u8F66\u952E\u8FD4\u56DE","comment.reply.count":"{0} \u4E2A\u8BC4\u8BBA","comment.reply.lastReply":"\u6700\u540E\u7531 {0} \u8BC4\u8BBA","walkthroughs.welcome":"\u6B22\u8FCE\u4F7F\u7528","walkthroughs.get.started":"\u6253\u5F00 `\u5165\u95E8` \u6F14\u793A","mergeEditor.reset":"\u91CD\u7F6E","mergeEditor.workbench.tab.name":"\u6B63\u5728\u5408\u5E76: {0}","mergeEditor.conflict.action.apply.confirm.title":"\u5F53\u524D\u6587\u4EF6\u8FD8\u6709\u672A\u5904\u7406\u7684\u51B2\u7A81\u6216\u53D8\u66F4\uFF0C\u662F\u5426\u5E94\u7528\u5E76\u4FDD\u5B58\u66F4\u6539\uFF1F","mergeEditor.conflict.action.apply.confirm.continue":"\u7EE7\u7EED\u5408\u5E76","mergeEditor.conflict.action.apply.confirm.complete":"\u786E\u8BA4\u4FDD\u5B58\u5E76\u66F4\u6539","mergeEditor.action.button.apply":"\u5E94\u7528\u66F4\u6539","mergeEditor.action.button.apply-and-stash":"\u5E94\u7528\u5E76\u6682\u5B58","mergeEditor.action.button.accept.left":"\u63A5\u53D7\u5DE6\u8FB9","mergeEditor.action.button.accept.right":"\u63A5\u53D7\u53F3\u8FB9","mergeEditor.open.3way":"3-way \u7F16\u8F91\u5668","mergeEditor.conflict.prev":"\u4E0A\u4E00\u5904\u51B2\u7A81","mergeEditor.conflict.next":"\u4E0B\u4E00\u5904\u51B2\u7A81","mergeEditor.conflict.ai.resolve.all":"AI \u89E3\u51B3","mergeEditor.conflict.ai.resolve.all.stop":"\u5168\u90E8\u505C\u6B62","mergeEditor.open.tradition":"\u6587\u672C\u7F16\u8F91\u5668","workbench.quickOpen.preserveInput":"\u662F\u5426\u5728 QuickOpen \u7684\u8F93\u5165\u6846\uFF08\u5305\u62EC\u547D\u4EE4\u9762\u677F\uFF09\u4E2D\u4FDD\u7559\u4E0A\u6B21\u8F93\u5165\u7684\u5185\u5BB9","aiNative.chat.ai.assistant.name":"AI \u7814\u53D1\u52A9\u624B","aiNative.chat.input.placeholder.default":'\u53EF\u4EE5\u95EE\u6211\u4EFB\u4F55\u95EE\u9898\uFF0C\u6216\u952E\u5165\u4E3B\u9898 "/" ',"aiNative.chat.stop.immediately":"\u6211\u5148\u4E0D\u60F3\u4E86\uFF0C\u6709\u9700\u8981\u53EF\u4EE5\u968F\u65F6\u95EE\u6211","aiNative.chat.error.response":"\u5F53\u524D\u4E0E\u6211\u4E92\u52A8\u7684\u4EBA\u592A\u591A\uFF0C\u8BF7\u7A0D\u540E\u518D\u8BD5\uFF0C\u611F\u8C22\u60A8\u7684\u7406\u89E3\u4E0E\u652F\u6301","aiNative.chat.code.insert":"\u63D2\u5165\u4EE3\u7801","aiNative.chat.code.copy":"\u590D\u5236\u4EE3\u7801","aiNative.chat.code.copy.success":"\u590D\u5236\u6210\u529F","aiNative.chat.expand.unfullscreen":"\u6536\u8D77","aiNative.chat.expand.fullescreen":"\u5C55\u5F00\u5168\u5C4F","aiNative.chat.enter.send":"Enter \u53D1\u9001","aiNative.inline.chat.operate.chat.title":"Chat({0})","aiNative.inline.chat.operate.check.title":"\u91C7\u7EB3","aiNative.inline.chat.operate.thumbsup.title":"\u8D5E","aiNative.inline.chat.operate.thumbsdown.title":"\u8E29","aiNative.inline.chat.operate.loading.cancel":"\u6309 ESC \u53D6\u6D88","aiNative.inline.chat.input.placeholder.default":"\u8BF7\u8F93\u5165\u4F60\u7684\u610F\u56FE...(\u2191\u2193 \u5207\u6362\u5386\u53F2)","aiNative.inline.chat.generating.canceled":"Inline Chat \u5DF2\u505C\u6B62\u751F\u6210","aiNative.inline.hint.widget.placeholder":"\u6309 {0} \u5524\u8D77 Inline Chat","aiNative.inline.problem.fix.title":"AI \u4FEE\u590D","aiNative.inline.diff.accept":"\u91C7\u7EB3","aiNative.inline.diff.reject":"\u62D2\u7EDD","aiNative.resolve.conflict.dialog.afresh":"\u4F60\u786E\u5B9A\u8981\u91CD\u65B0\u751F\u6210\u5417\uFF1F","aiNative.resolve.conflict.dialog.detection":`\u68C0\u6D4B\u5230\u60A8\u5DF2\u505A\u4E86\u4FEE\u6539\uFF0C\u91CD\u65B0\u751F\u6210\u4F1A\u8986\u76D6\u6389
30696
- \u60A8\u4FEE\u6539\u7684\u90E8\u5206\uFF0C\u662F\u5426\u786E\u8BA4\u8FDB\u884C\u91CD\u65B0\u751F\u6210\u3002`,"aiNative.resolve.conflict.message.not.processed.yet":"AI \u5DF2\u5904\u7406 {0} \u5904\u51B2\u7A81\uFF0C{1} \u5904\u51B2\u7A81\u6682\u672A\u5904\u7406\uFF08\u4ECD\u6807\u8BB0\u4E3A\u9EC4\u8272\u90E8\u5206\uFF09\uFF0C\u9700\u4EBA\u5DE5\u5904\u7406","aiNative.operate.discard.title":"\u4E22\u5F03","aiNative.operate.afresh.title":"\u91CD\u65B0\u751F\u6210","aiNative.operate.stop.title":"\u505C\u6B62","aiNative.operate.close.title":"\u5173\u95ED","aiNative.operate.clear.title":"\u6E05\u7A7A","aiNative.operate.tools.title":"MCP \u5DE5\u5177","aiNative.operate.newChat.title":"\u65B0\u5EFA\u804A\u5929","aiNative.operate.chatHistory.title":"\u804A\u5929\u5386\u53F2","aiNative.operate.chatHistory.searchPlaceholder":"\u8BF7\u641C\u7D22...","aiNative.operate.chatHistory.edit":"\u7F16\u8F91","aiNative.operate.chatHistory.delete":"\u5220\u9664","aiNative.chat.welcome.loading.text":"\u521D\u59CB\u5316\u4E2D...","aiNative.chat.ai.assistant.limit.message":"{0} \u6761\u6700\u65E9\u7684\u6D88\u606F\u56E0\u8F93\u5165 Tokens \u9650\u5236\u800C\u88AB\u4E22\u5F03","aiNative.inlineDiff.acceptAll":"\u63A5\u53D7\u5168\u90E8","aiNative.inlineDiff.rejectAll":"\u62D2\u7EDD\u5168\u90E8","aiNative.inlineDiff.reveal":"\u5728\u804A\u5929\u4E2D\u5C55\u793A","aiNative.inlineDiff.up":"\u4E0A\u4E00\u5904\u53D8\u66F4","aiNative.inlineDiff.down":"\u4E0B\u4E00\u5904\u53D8\u66F4","aiNative.inlineDiff.right":"\u4E0B\u4E00\u5904\u6587\u4EF6","aiNative.inlineDiff.left":"\u4E0A\u4E00\u5904\u6587\u4EF6","aiNative.inlineDiff.noMoreChangesUp":"\u9876\u90E8\u6CA1\u6709\u66F4\u591A\u53D8\u66F4\u4E86","aiNative.inlineDiff.noMoreChangesDown":"\u5E95\u90E8\u6CA1\u6709\u66F4\u591A\u53D8\u66F4\u4E86","aiNative.chat.session.max":"\u6700\u591A\u53EA\u80FD\u521B\u5EFA {0} \u4E2A\u804A\u5929","preference.ai.native.inlineChat.title":"Inline Chat","preference.ai.native.chat.title":"Chat","preference.ai.native.interface.quick.title":"\u63A5\u53E3\u5FEB\u901F\u8DF3\u8F6C","preference.ai.native.interface.quick.navigation":"\u70B9\u51FB\u7F16\u8F91\u5668\u5DE6\u4FA7\u56FE\u6807\u5FEB\u901F\u8DF3\u8F6C\u5230\u63A5\u53E3\u5B9E\u73B0","preference.ai.native.interface.quick.navigation.hover":"\u8DF3\u8F6C\u5230\u5B9E\u73B0","preference.ai.native.inlineChat.auto.visible":"\u662F\u5426\u5728\u9009\u4E2D\u4EE3\u7801\u7247\u6BB5\u65F6\u81EA\u52A8\u663E\u793A Inline Chat?","preference.ai.native.inlineChat.codeAction.enabled":"\u662F\u5426\u542F\u7528\u5728\u9009\u4E2D\u4EE3\u7801\u7247\u6BB5\u65F6\u663E\u793A Inline Chat \u76F8\u5173\u7684 Code Actions?","preference.ai.native.chat.visible.type":"\u63A7\u5236 Chat \u9762\u677F\u9ED8\u8BA4\u7684\u5C55\u793A\u65B9\u5F0F","preference.ai.native.inlineDiff.preview.mode":"Inline Diff \u7684\u9884\u89C8\u6A21\u5F0F","preference.ai.native.inlineDiff.preview.mode.sideBySide":"\u5728\u7F16\u8F91\u5668\u5F53\u4E2D\u4EE5\u5DE6\u53F3 diff \u9762\u677F\u7684\u65B9\u5F0F\u5C55\u793A","preference.ai.native.inlineDiff.preview.mode.inlineLive":"\u5728\u7F16\u8F91\u5668\u5F53\u4E2D\u4EE5\u6D41\u5F0F\u6E32\u67D3\u7684\u65B9\u5F0F\u5C55\u793A","preference.ai.native.intelligentCompletions.title":"\u667A\u80FD\u8865\u5168","preference.ai.native.intelligentCompletions.promptEngineering.enabled":"\u662F\u5426\u542F\u7528\u63D0\u793A\u8BCD\u5DE5\u7A0B\uFF0C\u4E00\u4E9B LLM \u6A21\u578B\u5728\u63D0\u793A\u8BCD\u5DE5\u7A0B\u4E0A\u53EF\u80FD\u8868\u73B0\u4E0D\u4F73\u3002","preference.ai.native.intelligentCompletions.debounceTime":"\u667A\u80FD\u8865\u5168\u7684\u5EF6\u8FDF\u65F6\u95F4\uFF08\u6BEB\u79D2\uFF09","preference.ai.native.intelligentCompletions.cache.enabled":"\u662F\u5426\u542F\u7528\u667A\u80FD\u8865\u5168\u7684\u7F13\u5B58","preference.ai.native.intelligentCompletions.alwaysVisible":"\u662F\u5426\u603B\u662F\u5C55\u793A\u667A\u80FD\u8865\u5168","preference.ai.native.codeEdits.title":"\u667A\u80FD\u6539\u5199","preference.ai.native.codeEdits.lintErrors":"\u662F\u5426\u5728\u53D1\u751F Lint Error \u65F6\u89E6\u53D1\u667A\u80FD\u6539\u5199","preference.ai.native.codeEdits.lineChange":"\u662F\u5426\u5728\u5149\u6807\u884C\u53F7\u53D1\u751F\u53D8\u5316\u65F6\u89E6\u53D1\u667A\u80FD\u6539\u5199","preference.ai.native.codeEdits.typing":"\u662F\u5426\u5728\u5185\u5BB9\u53D1\u751F\u53D8\u5316\u65F6\u89E6\u53D1\u667A\u80FD\u6539\u5199","preference.ai.native.codeEdits.renderType":"\u667A\u80FD\u6539\u5199\u6E32\u67D3\u65B9\u5F0F","preference.ai.native.chat.system.prompt":"\u9ED8\u8BA4\u804A\u5929\u7CFB\u7EDF\u63D0\u793A\u8BCD","webview.webviewTagUnavailable":"\u975E Electron \u73AF\u5883\u4E0D\u652F\u6301 webview \u6807\u7B7E\uFF0C\u8BF7\u4F7F\u7528 iframe \u6807\u7B7E","notebook.kernel.panel.empty":"\u6682\u65E0\u5185\u5BB9","notebook.kernel.panel.title":"\u8FD0\u884C\u7684\u7EC8\u7AEF\u548C\u5185\u6838","notebook.kernel.panel.opened.pages":"\u5DF2\u5F00\u542F\u7684\u6807\u7B7E\u9875","notebook.kernel.panel.running.kernels":"\u8FD0\u884C\u7684\u5185\u6838","notebook.kernel.close.all.confirmation":"\u4F60\u786E\u5B9A\u8981\u5173\u95ED\u5168\u90E8\u5417\uFF1F","notebook.variable.panel.title":"\u53D8\u91CF\u68C0\u67E5\u5668","notebook.variable.panel.unsupported":"\u8BE5\u6587\u4EF6\u683C\u5F0F\u6682\u4E0D\u652F\u6301\u53D8\u91CF\u68C0\u67E5","notebook.variable.panel.refresh.success":"\u53D8\u91CF\u5237\u65B0\u6210\u529F","notebook.variable.panel.refresh.error":"\u53D8\u91CF\u5237\u65B0\u5931\u8D25","notebook.variable.panel.search.placeholder":"\u8BF7\u8F93\u5165\u53D8\u91CF\u540D\u79F0\u641C\u7D22","notebook.variable.panel.show.detail":"\u67E5\u770B\u8BE6\u60C5",...r.browserViews,...o.editorLocalizations,...c.zhCN,"preference.ai.native.llm.apiSettings.title":"\u5927\u6A21\u578B API \u8BBE\u7F6E","preference.ai.native.llm.model.id":"\u6A21\u578B ID","preference.ai.native.deepseek.apiKey":"Deepseek API \u5BC6\u94A5","preference.ai.native.deepseek.apiKey.description":"Deepseek \u8BED\u8A00\u6A21\u578B\u7684 API \u5BC6\u94A5","preference.ai.native.anthropic.apiKey":"Anthropic API \u5BC6\u94A5","preference.ai.native.anthropic.apiKey.description":"Anthropic \u8BED\u8A00\u6A21\u578B\u7684 API \u5BC6\u94A5","preference.ai.native.openai.apiKey":"OpenAI API \u5BC6\u94A5","preference.ai.native.openai.apiKey.description":"OpenAI \u517C\u5BB9\u8BED\u8A00\u6A21\u578B\u7684 API \u5BC6\u94A5","preference.ai.native.openai.baseURL":"OpenAI Base URL","preference.ai.native.openai.baseURL.description":"OpenAI \u517C\u5BB9\u8BED\u8A00\u6A21\u578B\u7684 Base URL","preference.ai.native.mcp.settings.title":"MCP \u670D\u52A1\u5668\u8BBE\u7F6E","preference.ai.native.mcp.servers":"MCP \u670D\u52A1\u5668","preference.ai.native.mcp.servers.description":"\u914D\u7F6E MCP (Model Context Protocol) \u670D\u52A1\u5668","preference.ai.native.mcp.servers.name.description":"MCP \u670D\u52A1\u5668\u540D\u79F0","preference.ai.native.mcp.servers.command.description":"\u542F\u52A8 MCP \u670D\u52A1\u5668\u7684\u547D\u4EE4","preference.ai.native.mcp.servers.args.description":"MCP \u670D\u52A1\u5668\u7684\u547D\u4EE4\u884C\u53C2\u6570","preference.ai.native.mcp.servers.env.description":"MCP \u670D\u52A1\u5668\u7684\u73AF\u5883\u53D8\u91CF","preference.ai.native.mcp.servers.type.description":"MCP \u670D\u52A1\u5668\u8FDE\u63A5\u7C7B\u578B","preference.ai.native.mcp.servers.type.stdio":"Stdio \u8FDE\u63A5","preference.ai.native.mcp.servers.type.sse":"SSE \u8FDE\u63A5","ai.native.mcp.terminal.command":"\u547D\u4EE4","ai.native.mcp.terminal.output":"\u8F93\u51FA","ai.native.mcp.terminal.allow-question":"\u662F\u5426\u5141\u8BB8\u8FD0\u884C\u547D\u4EE4?","ai.native.mcp.terminal.allow":"\u5141\u8BB8","ai.native.mcp.terminal.deny":"\u62D2\u7EDD","ai.native.mcp.name":"\u540D\u79F0:","ai.native.mcp.command":"\u547D\u4EE4:","ai.native.mcp.args":"\u53C2\u6570:","ai.native.mcp.env":"\u73AF\u5883\u53D8\u91CF:","ai.native.mcp.type":"\u7C7B\u578B:","ai.native.mcp.stdio":"Command","ai.native.mcp.sse":"SSE","ai.native.mcp.buttonSave":"\u6DFB\u52A0","ai.native.mcp.buttonUpdate":"\u66F4\u65B0","ai.native.mcp.buttonCancel":"\u53D6\u6D88","ai.native.mcp.addMCPServer.title":"\u6DFB\u52A0 MCP \u670D\u52A1\u5668","ai.native.mcp.editMCPServer.title":"\u7F16\u8F91 MCP \u670D\u52A1\u5668","ai.native.mcp.serverHost.placeHolder":"\u8F93\u5165 SSE URL","ai.native.mcp.command.placeHolder":"\u8F93\u5165\u547D\u4EE4","ai.native.mcp.args.placeHolder":"\u8FD0\u884C\u53C2\u6570","ai.native.mcp.env.placeHolder":"KEY=value\uFF08\u6BCF\u884C\u4E00\u4E2A\uFF09","ai.native.mcp.name.placeHolder":"\u670D\u52A1\u5668\u540D\u79F0","ai.native.mcp.type.builtin":"\u5185\u7F6E","ai.native.mcp.type.sse":"SSE","ai.native.mcp.type.stdio":"\u547D\u4EE4","ai.native.mcp.serverNameExists":'\u670D\u52A1\u540D\u79F0 "{0}" \u5DF2\u5B58\u5728',"ai.native.mcp.name.isRequired":"\u670D\u52A1\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A","ai.native.mcp.command.isRequired":"\u547D\u4EE4\u4E0D\u80FD\u4E3A\u7A7A","ai.native.mcp.serverHost.isRequired":"SSE URL \u4E0D\u80FD\u4E3A\u7A7A","ai.native.mcp.tool.arguments":"\u53C2\u6570","ai.native.mcp.tool.results":"\u8FD4\u56DE"}}},10199:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),e(85608).__exportStar(e(32581),t)},21774:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.KeymapsModule=void 0;const n=e(85608),r=e(76003),o=e(41869),c=e(25067),p=e(48644),v=e(85448);let m=class extends o.BrowserModule{constructor(){super(...arguments),this.providers=[{token:c.IKeymapService,useClass:v.KeymapService},p.KeymapsContribution]}};t.KeymapsModule=m,t.KeymapsModule=m=n.__decorate([(0,r.Injectable)()],m)},2312:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.KeymapsParser=t.keymapsSchema=void 0;const n=e(85608),r=n.__importDefault(e(82174)),o=n.__importStar(e(23304)),c=e(76003);t.keymapsSchema={type:"array",items:{type:"object",properties:{key:{type:"string"},keybinding:{type:"string",deprecated:!0},command:{type:"string"},context:{type:"string"},when:{type:"string"},args:{}},required:["command"],optional:["key","keybinding","when","args"],additionalProperties:!1}};let p=class{constructor(){this.validate=new r.default({jsonPointers:!0}).compile(t.keymapsSchema)}parse(m,_){const s=o.stripComments(m),f=_?[]:void 0,a=o.parse(s,f);if(f&&_)for(const h of f)_.push(`${this.printParseErrorCode(h.error)} at ${h.offset} offset of ${h.length} length`);if(this.validate(a))return a;if(_&&this.validate.errors)for(const h of this.validate.errors)_.push(`${h.message} at ${h.dataPath}`);return[]}printParseErrorCode(m){return o.printParseErrorCode(m)}};t.KeymapsParser=p,t.KeymapsParser=p=n.__decorate([(0,c.Injectable)(),n.__metadata("design:paramtypes",[])],p)},48644:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.KeymapsContribution=t.KEYMAP_COMMANDS=t.KeymapsContextMenu=t.KeymapsResourceProvider=void 0;const n=e(85608),r=e(76003),o=e(41869),c=e(93899),p=e(57517),v=e(42933),m=e(97821),_=e(25067),s=e(34879),f="keymaps-preview";let a=class extends o.WithEventBus{constructor(){super(),this.scheme=_.KEYMAPS_SCHEME}provideResource(g){return{supportsRevive:!0,name:(0,o.localize)("keymaps.tab.name"),icon:(0,o.getIcon)("setting"),uri:g}}provideResourceSubname(g,l){return null}async shouldCloseResource(g,l){return!0}};t.KeymapsResourceProvider=a,t.KeymapsResourceProvider=a=n.__decorate([(0,r.Injectable)(),n.__metadata("design:paramtypes",[])],a);var h;(function(E){E.KEYMAPS="2_keymaps"})(h||(t.KeymapsContextMenu=h={}));var u;(function(E){const g="keymaps";E.OPEN_SOURCE_FILE={id:"keymaps.open.source",label:"%keymaps.editorTitle.openSource%",category:g}})(u||(t.KEYMAP_COMMANDS=u={}));let d=class{registerCommands(g){g.registerCommand(o.COMMON_COMMANDS.OPEN_KEYMAPS,{isEnabled:()=>!0,execute:async()=>{await this.keymapService.open()}}),g.registerCommand(u.OPEN_SOURCE_FILE,{execute:async()=>{this.keymapService.openResource()}}),g.registerCommand(o.KEYBOARD_COMMANDS.CHOOSE_KEYBOARD_LAYOUT,{execute:()=>{this.chooseLayout()}})}registerMenus(g){g.registerMenuItem(c.MenuId.SettingsIconMenu,{command:o.COMMON_COMMANDS.OPEN_KEYMAPS.id,group:h.KEYMAPS}),g.registerMenuItem(c.MenuId.EditorTitle,{command:u.OPEN_SOURCE_FILE.id,iconClass:(0,o.getIcon)("open"),group:"navigation",order:4,when:`resourceScheme == ${_.KEYMAPS_SCHEME}`}),g.registerMenuItem(c.MenuId.EditorTitle,{command:o.COMMON_COMMANDS.OPEN_KEYMAPS.id,iconClass:(0,o.getIcon)("open"),group:"navigation",order:4,when:"resourceFilename =~ /keymaps.json/"})}registerKeybindings(g){g.registerKeybinding({command:o.COMMON_COMMANDS.OPEN_KEYMAPS.id,keybinding:"ctrlcmd+K ctrlcmd+S"})}onStart(){this.keymapService.init()}registerResource(g){g.registerResourceProvider(this.keymapsResourceProvider)}registerEditorComponent(g){g.registerEditorComponent({component:s.KeymapsView,uid:f,scheme:_.KEYMAPS_SCHEME}),g.registerEditorComponentResolver(_.KEYMAPS_SCHEME,(l,y,b)=>{b([{type:p.EditorOpenType.component,componentId:f}])})}async chooseLayout(){const g=this.layoutProvider.currentLayoutData,l={label:(0,o.localize)("keyboard.autoDetect.label"),description:g&&this.layoutProvider.currentLayoutSource!=="user-choice"?(0,o.formatLocalize)("keyboard.autoDetect.description",(0,o.getKeyboardLayoutId)(g.layout)):void 0,detail:(0,o.localize)("keyboard.autoDetect.detail"),value:"autodetect"},y=this.layoutProvider.allLayoutData.map(A=>this.toQuickPickValue(A,g===A));let b;b=[l,...y];const S=await this.quickPickService.show(b,{placeholder:"Choose a keyboard layout"});if(S)return this.layoutProvider.setLayoutData(S)}toQuickPickValue(g,l){return{label:(0,o.getKeyboardLayoutId)(g.layout),value:g}}};t.KeymapsContribution=d,n.__decorate([(0,r.Autowired)(m.QuickPickService),n.__metadata("design:type",Object)],d.prototype,"quickPickService",void 0),n.__decorate([(0,r.Autowired)(o.KeyboardNativeLayoutService),n.__metadata("design:type",Object)],d.prototype,"layoutProvider",void 0),n.__decorate([(0,r.Autowired)(v.IFileServiceClient),n.__metadata("design:type",Object)],d.prototype,"filesystem",void 0),n.__decorate([(0,r.Autowired)(a),n.__metadata("design:type",a)],d.prototype,"keymapsResourceProvider",void 0),n.__decorate([(0,r.Autowired)(_.IKeymapService),n.__metadata("design:type",Object)],d.prototype,"keymapService",void 0),t.KeymapsContribution=d=n.__decorate([(0,o.Domain)(o.CommandContribution,o.KeybindingContribution,o.ClientAppContribution,p.BrowserEditorContribution,c.MenuContribution)],d)},85448:(x,t,e)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.KeymapService=void 0;const r=e(85608),o=r.__importStar(e(39050)),c=e(76003),p=e(41869),v=e(68969),m=e(14951),_=e(25067),s=e(2312);let f=n=class{constructor(){this.keymapChangeEmitter=new p.Emitter,this.convertKeySequence=[],this.toUnregisterUserKeybindingMap=new Map,this.toRestoreDefaultKeybindingMap=new Map,this.searchDelayer=new p.ThrottledDelayer(n.DEFAULT_SEARCH_DELAY),this.disposableCollection=new p.DisposableCollection,this._whenReadyDeferred=new p.Deferred,this.fuzzyOptions={pre:"<match>",post:"</match>"},this.reconcileQueue=new p.Throttler,this.keybindings=[],this.updateKeybindings=()=>{this.currentSearchValue?this.doSearchKeybindings(this.currentSearchValue):(0,p.runWhenIdle)(()=>{this.keybindings=this.getKeybindingItems(),this.keymapChangeEmitter.fire(this.keybindings)})},this.setKeybinding=(h,u)=>this.progressService.withProgress({location:p.ProgressLocation.Notification},d=>new Promise((E,g)=>{d.report({message:(0,p.localize)("keymaps.keybinding.loading"),increment:0,total:100});const l=this.storeKeybindings||[];let y=!1;for(const b of l){const S={when:b.when,command:b.command,keybinding:b.key};if(b.command===u.command){y=!0,this.unregisterUserKeybinding(S);const A=this.toUniqueKey(h),w=this.toRestoreDefaultKeybindingMap.get(A);if(w){const T=this.toUniqueKey(u);this.toRestoreDefaultKeybindingMap.delete(A),this.toRestoreDefaultKeybindingMap.set(T,w)}b.key=u.keybinding,this.registerUserKeybinding({...S,priority:p.KeybindingWeight.WorkbenchContrib*100})}}if(!y){const b=this.keybindings.find(A=>A.id===u.command&&this.getRaw(A.when)===u.when);if(b&&b.keybinding){this.unregisterDefaultKeybinding({when:this.getRaw(b.when),command:b.id,keybinding:this.getRaw(b.keybinding)});const A=this.toUniqueKey(h),w=this.toRestoreDefaultKeybindingMap.get(A);if(w){const T=this.toUniqueKey(u);this.toRestoreDefaultKeybindingMap.delete(A),this.toRestoreDefaultKeybindingMap.set(T,w)}}const S={when:this.getWhen(u),command:u.command,key:u.keybinding};l.push(S),this.registerUserKeybinding(u)}return this.saveKeybinding(l).then(()=>{E(void 0),d.report({message:(0,p.localize)("keymaps.keybinding.success"),increment:99})}).catch(b=>{g(b),d.report({message:(0,p.localize)("keymaps.keybinding.fail"),increment:99})}).finally(()=>{setTimeout(()=>{d.report({increment:100})},3e3)})}),()=>{}),this.covert=h=>this.keybindingService.convert(h," "),this.clearCovert=()=>this.keybindingService.clearConvert(),this.resetKeybinding=async h=>{if(!this.resource)return;const d=this.storeKeybindings.filter(E=>E.command!==h.command);return this.unregisterUserKeybinding(h),this.restoreDefaultKeybinding(h),this.saveKeybinding(d)},this.fixed=async()=>{this.commandService.executeCommand(p.EDITOR_COMMANDS.OPEN_RESOURCE.id,new p.URI().withScheme(_.KEYMAPS_SCHEME),{preview:!1})},this.searchKeybindings=h=>{this.currentSearchValue=h,this.searchDelayer.isTriggered()||this.searchDelayer.cancel(),this.searchDelayer.trigger(async()=>{this.doSearchKeybindings(this.currentSearchValue)})},this.isSearching=!1,this.doSearchKeybindings=h=>{h?this.isSearching=!0:this.isSearching=!1;const u=this.getKeybindingItems(),d=[];u.forEach(E=>{const g=["id","command","keybinding","when","context","source"];let l=!1;for(const y of g){const b=E[y];if(b){const S=o.match(h,b,this.fuzzyOptions);if(S)E[y]=S.rendered,l=!0;else if(y==="keybinding"){const A=h.split("+"),w=b.split(" "),T=[0];let D=[];w.length>1?w.forEach(M=>{const R=M.split("+");T.push(R.length+T[-1]),D.push(...R)}):D=b.split("+"),T.shift();const I=[...D];let O=0;if(A.forEach(M=>{let R={rendered:"",score:0},P=-1;if(b){D.forEach(F=>{const L=o.match(M,F,this.fuzzyOptions);L&&L.score>R.score&&(R=L,P=I.indexOf(F))});const k=R.rendered;k&&(P>-1&&(I[P]=k),D.splice(P,1,""),O+=1)}}),O===A.length){if(T.length>0){const M="";I.forEach((R,P)=>{P===0?M.concat(R):T.indexOf(P)!==-1?M.concat(" "+R):M.concat("+"+R)}),E[y]=M}E[y]=I.join("+"),l=!0}}}}l&&d.push(E)}),this.keybindings=d,this.keymapChangeEmitter.fire(this.keybindings)},this.validateKeybinding=(h,u)=>{if(!u)return(0,p.localize)("keymaps.keybinding.require");try{const d={command:this.isSearching?this.getRaw(h.command):h.command,when:this.isSearching?this.getRaw(h.when):h.when,keybinding:this.isSearching?this.getRaw(u):u};return h.keybinding===u?" ":this.keybindingRegistry.validateKeybindingInScope(d)}catch(d){return d}},this.detectKeybindings=(h,u)=>{if(!u)return[];try{if(h.keybinding===u)return[];const d=this.keybindings.filter(E=>this.getRaw(E.keybinding)===u);if(d.length>0)return d.map(E=>{const g=this.commandRegistry.getCommand(this.getRaw(E.command)),l=this.storeKeybindings.find(y=>g&&y.command===g.id);return E.when=this.getRaw(E.when),E.keybinding=this.getRaw(E.keybinding),{id:g?g.id:this.getRaw(E.command),command:(g?g.label||g.id:E.command)||"",when:this.keybindingService.convertMonacoWhen(E.when),keybinding:this.getRaw(E.keybinding),source:l?this.getScope(p.KeybindingScope.USER):this.getScope(p.KeybindingScope.DEFAULT)}})}catch(d){this.logger.error(d)}return[]}}get onDidKeymapChanges(){return this.keymapChangeEmitter.event}get storeKeybindings(){return this._storeKeybindings&&this._storeKeybindings.map(h=>({...h,command:this.getValidateCommand(h.command),key:h.key||h.keybinding}))}set storeKeybindings(h){this._storeKeybindings=h}get whenReady(){return this._whenReadyDeferred.promise}async init(){await this.reconcile();const h=await this.filesystem.watchFileChanges(n.KEYMAP_FILE_URI);this.disposableCollection.push(h),h.onFilesChanged(()=>{this.reconcileQueue.queue(this.reconcile.bind(this))}),this._whenReadyDeferred.resolve()}async openResource(){if(!this.resource||!this.resource.uri)return;const h=await this.resource.uri;if(!h)return;if(!await this.filesystem.access(h)){const d=await this.filesystem.createFile(h),E=await this.filesystem.setContent(d,`{
30678
+ \u60A8\u4FEE\u6539\u7684\u90E8\u5206\uFF0C\u662F\u5426\u786E\u8BA4\u8FDB\u884C\u91CD\u65B0\u751F\u6210\u3002`,"aiNative.resolve.conflict.message.not.processed.yet":"AI \u5DF2\u5904\u7406 {0} \u5904\u51B2\u7A81\uFF0C{1} \u5904\u51B2\u7A81\u6682\u672A\u5904\u7406\uFF08\u4ECD\u6807\u8BB0\u4E3A\u9EC4\u8272\u90E8\u5206\uFF09\uFF0C\u9700\u4EBA\u5DE5\u5904\u7406","aiNative.operate.discard.title":"\u4E22\u5F03","aiNative.operate.afresh.title":"\u91CD\u65B0\u751F\u6210","aiNative.operate.stop.title":"\u505C\u6B62","aiNative.operate.close.title":"\u5173\u95ED","aiNative.operate.clear.title":"\u6E05\u7A7A","aiNative.operate.tools.title":"MCP \u5DE5\u5177","aiNative.operate.newChat.title":"\u65B0\u5EFA\u804A\u5929","aiNative.operate.chatHistory.title":"\u804A\u5929\u5386\u53F2","aiNative.operate.chatHistory.searchPlaceholder":"\u8BF7\u641C\u7D22...","aiNative.operate.chatHistory.edit":"\u7F16\u8F91","aiNative.operate.chatHistory.delete":"\u5220\u9664","aiNative.chat.welcome.loading.text":"\u521D\u59CB\u5316\u4E2D...","aiNative.chat.ai.assistant.limit.message":"{0} \u6761\u6700\u65E9\u7684\u6D88\u606F\u56E0\u8F93\u5165 Tokens \u9650\u5236\u800C\u88AB\u4E22\u5F03","aiNative.inlineDiff.acceptAll":"\u63A5\u53D7\u5168\u90E8","aiNative.inlineDiff.rejectAll":"\u62D2\u7EDD\u5168\u90E8","aiNative.inlineDiff.reveal":"\u5728\u804A\u5929\u4E2D\u5C55\u793A","aiNative.inlineDiff.up":"\u4E0A\u4E00\u5904\u53D8\u66F4","aiNative.inlineDiff.down":"\u4E0B\u4E00\u5904\u53D8\u66F4","aiNative.inlineDiff.right":"\u4E0B\u4E00\u5904\u6587\u4EF6","aiNative.inlineDiff.left":"\u4E0A\u4E00\u5904\u6587\u4EF6","aiNative.inlineDiff.noMoreChangesUp":"\u9876\u90E8\u6CA1\u6709\u66F4\u591A\u53D8\u66F4\u4E86","aiNative.inlineDiff.noMoreChangesDown":"\u5E95\u90E8\u6CA1\u6709\u66F4\u591A\u53D8\u66F4\u4E86","aiNative.chat.session.max":"\u6700\u591A\u53EA\u80FD\u521B\u5EFA {0} \u4E2A\u804A\u5929","preference.ai.native.inlineChat.title":"Inline Chat","preference.ai.native.chat.title":"Chat","preference.ai.native.interface.quick.title":"\u63A5\u53E3\u5FEB\u901F\u8DF3\u8F6C","preference.ai.native.interface.quick.navigation":"\u70B9\u51FB\u7F16\u8F91\u5668\u5DE6\u4FA7\u56FE\u6807\u5FEB\u901F\u8DF3\u8F6C\u5230\u63A5\u53E3\u5B9E\u73B0","preference.ai.native.interface.quick.navigation.hover":"\u8DF3\u8F6C\u5230\u5B9E\u73B0","preference.ai.native.inlineChat.auto.visible":"\u662F\u5426\u5728\u9009\u4E2D\u4EE3\u7801\u7247\u6BB5\u65F6\u81EA\u52A8\u663E\u793A Inline Chat?","preference.ai.native.inlineChat.codeAction.enabled":"\u662F\u5426\u542F\u7528\u5728\u9009\u4E2D\u4EE3\u7801\u7247\u6BB5\u65F6\u663E\u793A Inline Chat \u76F8\u5173\u7684 Code Actions?","preference.ai.native.chat.visible.type":"\u63A7\u5236 Chat \u9762\u677F\u9ED8\u8BA4\u7684\u5C55\u793A\u65B9\u5F0F","preference.ai.native.inlineDiff.preview.mode":"Inline Diff \u7684\u9884\u89C8\u6A21\u5F0F","preference.ai.native.inlineDiff.preview.mode.sideBySide":"\u5728\u7F16\u8F91\u5668\u5F53\u4E2D\u4EE5\u5DE6\u53F3 diff \u9762\u677F\u7684\u65B9\u5F0F\u5C55\u793A","preference.ai.native.inlineDiff.preview.mode.inlineLive":"\u5728\u7F16\u8F91\u5668\u5F53\u4E2D\u4EE5\u6D41\u5F0F\u6E32\u67D3\u7684\u65B9\u5F0F\u5C55\u793A","preference.ai.native.intelligentCompletions.title":"\u667A\u80FD\u8865\u5168","preference.ai.native.intelligentCompletions.promptEngineering.enabled":"\u662F\u5426\u542F\u7528\u63D0\u793A\u8BCD\u5DE5\u7A0B\uFF0C\u4E00\u4E9B LLM \u6A21\u578B\u5728\u63D0\u793A\u8BCD\u5DE5\u7A0B\u4E0A\u53EF\u80FD\u8868\u73B0\u4E0D\u4F73\u3002","preference.ai.native.intelligentCompletions.debounceTime":"\u667A\u80FD\u8865\u5168\u7684\u5EF6\u8FDF\u65F6\u95F4\uFF08\u6BEB\u79D2\uFF09","preference.ai.native.intelligentCompletions.cache.enabled":"\u662F\u5426\u542F\u7528\u667A\u80FD\u8865\u5168\u7684\u7F13\u5B58","preference.ai.native.intelligentCompletions.alwaysVisible":"\u662F\u5426\u603B\u662F\u5C55\u793A\u667A\u80FD\u8865\u5168","preference.ai.native.codeEdits.title":"\u667A\u80FD\u6539\u5199","preference.ai.native.codeEdits.lintErrors":"\u662F\u5426\u5728\u53D1\u751F Lint Error \u65F6\u89E6\u53D1\u667A\u80FD\u6539\u5199","preference.ai.native.codeEdits.lineChange":"\u662F\u5426\u5728\u5149\u6807\u884C\u53F7\u53D1\u751F\u53D8\u5316\u65F6\u89E6\u53D1\u667A\u80FD\u6539\u5199","preference.ai.native.codeEdits.typing":"\u662F\u5426\u5728\u5185\u5BB9\u53D1\u751F\u53D8\u5316\u65F6\u89E6\u53D1\u667A\u80FD\u6539\u5199","preference.ai.native.codeEdits.renderType":"\u667A\u80FD\u6539\u5199\u6E32\u67D3\u65B9\u5F0F","preference.ai.native.chat.system.prompt":"\u9ED8\u8BA4\u804A\u5929\u7CFB\u7EDF\u63D0\u793A\u8BCD","webview.webviewTagUnavailable":"\u975E Electron \u73AF\u5883\u4E0D\u652F\u6301 webview \u6807\u7B7E\uFF0C\u8BF7\u4F7F\u7528 iframe \u6807\u7B7E","notebook.kernel.panel.empty":"\u6682\u65E0\u5185\u5BB9","notebook.kernel.panel.title":"\u8FD0\u884C\u7684\u7EC8\u7AEF\u548C\u5185\u6838","notebook.kernel.panel.opened.pages":"\u5DF2\u5F00\u542F\u7684\u6807\u7B7E\u9875","notebook.kernel.panel.running.kernels":"\u8FD0\u884C\u7684\u5185\u6838","notebook.kernel.close.all.confirmation":"\u4F60\u786E\u5B9A\u8981\u5173\u95ED\u5168\u90E8\u5417\uFF1F","notebook.variable.panel.title":"\u53D8\u91CF\u68C0\u67E5\u5668","notebook.variable.panel.unsupported":"\u8BE5\u6587\u4EF6\u683C\u5F0F\u6682\u4E0D\u652F\u6301\u53D8\u91CF\u68C0\u67E5","notebook.variable.panel.refresh.success":"\u53D8\u91CF\u5237\u65B0\u6210\u529F","notebook.variable.panel.refresh.error":"\u53D8\u91CF\u5237\u65B0\u5931\u8D25","notebook.variable.panel.search.placeholder":"\u8BF7\u8F93\u5165\u53D8\u91CF\u540D\u79F0\u641C\u7D22","notebook.variable.panel.show.detail":"\u67E5\u770B\u8BE6\u60C5",...r.browserViews,...o.editorLocalizations,...c.zhCN,"preference.ai.native.llm.apiSettings.title":"\u5927\u6A21\u578B API \u8BBE\u7F6E","preference.ai.native.llm.model.id":"\u6A21\u578B ID","preference.ai.native.deepseek.apiKey":"Deepseek API \u5BC6\u94A5","preference.ai.native.deepseek.apiKey.description":"Deepseek \u8BED\u8A00\u6A21\u578B\u7684 API \u5BC6\u94A5","preference.ai.native.anthropic.apiKey":"Anthropic API \u5BC6\u94A5","preference.ai.native.anthropic.apiKey.description":"Anthropic \u8BED\u8A00\u6A21\u578B\u7684 API \u5BC6\u94A5","preference.ai.native.openai.apiKey":"OpenAI API \u5BC6\u94A5","preference.ai.native.openai.apiKey.description":"OpenAI \u517C\u5BB9\u8BED\u8A00\u6A21\u578B\u7684 API \u5BC6\u94A5","preference.ai.native.openai.baseURL":"OpenAI Base URL","preference.ai.native.openai.baseURL.description":"OpenAI \u517C\u5BB9\u8BED\u8A00\u6A21\u578B\u7684 Base URL","preference.ai.native.mcp.settings.title":"MCP \u670D\u52A1\u5668\u8BBE\u7F6E","preference.ai.native.mcp.servers":"MCP \u670D\u52A1\u5668","preference.ai.native.mcp.servers.description":"\u914D\u7F6E MCP (Model Context Protocol) \u670D\u52A1\u5668","preference.ai.native.mcp.servers.name.description":"MCP \u670D\u52A1\u5668\u540D\u79F0","preference.ai.native.mcp.servers.command.description":"\u542F\u52A8 MCP \u670D\u52A1\u5668\u7684\u547D\u4EE4","preference.ai.native.mcp.servers.args.description":"MCP \u670D\u52A1\u5668\u7684\u547D\u4EE4\u884C\u53C2\u6570","preference.ai.native.mcp.servers.env.description":"MCP \u670D\u52A1\u5668\u7684\u73AF\u5883\u53D8\u91CF","preference.ai.native.mcp.servers.type.description":"MCP \u670D\u52A1\u5668\u8FDE\u63A5\u7C7B\u578B","preference.ai.native.mcp.servers.type.stdio":"Stdio \u8FDE\u63A5","preference.ai.native.mcp.servers.type.sse":"SSE \u8FDE\u63A5","ai.native.mcp.terminal.command":"\u547D\u4EE4","ai.native.mcp.terminal.output":"\u8F93\u51FA","ai.native.mcp.terminal.allow-question":"\u662F\u5426\u5141\u8BB8\u8FD0\u884C\u547D\u4EE4?","ai.native.mcp.terminal.allow":"\u5141\u8BB8","ai.native.mcp.terminal.deny":"\u62D2\u7EDD","ai.native.mcp.name":"\u540D\u79F0:","ai.native.mcp.command":"\u547D\u4EE4:","ai.native.mcp.args":"\u53C2\u6570:","ai.native.mcp.env":"\u73AF\u5883\u53D8\u91CF:","ai.native.mcp.type":"\u7C7B\u578B:","ai.native.mcp.stdio":"Command","ai.native.mcp.sse":"SSE","ai.native.mcp.buttonSave":"\u6DFB\u52A0","ai.native.mcp.buttonUpdate":"\u66F4\u65B0","ai.native.mcp.buttonCancel":"\u53D6\u6D88","ai.native.mcp.addMCPServer.title":"\u6DFB\u52A0 MCP \u670D\u52A1\u5668","ai.native.mcp.editMCPServer.title":"\u7F16\u8F91 MCP \u670D\u52A1\u5668","ai.native.mcp.serverHost.placeHolder":"\u8F93\u5165 SSE URL","ai.native.mcp.command.placeHolder":"\u8F93\u5165\u547D\u4EE4","ai.native.mcp.args.placeHolder":"\u8FD0\u884C\u53C2\u6570","ai.native.mcp.env.placeHolder":"KEY=value\uFF08\u6BCF\u884C\u4E00\u4E2A\uFF09","ai.native.mcp.name.placeHolder":"\u670D\u52A1\u5668\u540D\u79F0","ai.native.mcp.type.builtin":"\u5185\u7F6E","ai.native.mcp.type.sse":"SSE","ai.native.mcp.type.stdio":"\u547D\u4EE4","ai.native.mcp.serverNameExists":'\u670D\u52A1\u540D\u79F0 "{0}" \u5DF2\u5B58\u5728',"ai.native.mcp.name.isRequired":"\u670D\u52A1\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A","ai.native.mcp.command.isRequired":"\u547D\u4EE4\u4E0D\u80FD\u4E3A\u7A7A","ai.native.mcp.serverHost.isRequired":"SSE URL \u4E0D\u80FD\u4E3A\u7A7A"}}},10199:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),e(85608).__exportStar(e(32581),t)},21774:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.KeymapsModule=void 0;const n=e(85608),r=e(76003),o=e(41869),c=e(25067),p=e(48644),v=e(85448);let m=class extends o.BrowserModule{constructor(){super(...arguments),this.providers=[{token:c.IKeymapService,useClass:v.KeymapService},p.KeymapsContribution]}};t.KeymapsModule=m,t.KeymapsModule=m=n.__decorate([(0,r.Injectable)()],m)},2312:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.KeymapsParser=t.keymapsSchema=void 0;const n=e(85608),r=n.__importDefault(e(82174)),o=n.__importStar(e(23304)),c=e(76003);t.keymapsSchema={type:"array",items:{type:"object",properties:{key:{type:"string"},keybinding:{type:"string",deprecated:!0},command:{type:"string"},context:{type:"string"},when:{type:"string"},args:{}},required:["command"],optional:["key","keybinding","when","args"],additionalProperties:!1}};let p=class{constructor(){this.validate=new r.default({jsonPointers:!0}).compile(t.keymapsSchema)}parse(m,_){const s=o.stripComments(m),f=_?[]:void 0,a=o.parse(s,f);if(f&&_)for(const h of f)_.push(`${this.printParseErrorCode(h.error)} at ${h.offset} offset of ${h.length} length`);if(this.validate(a))return a;if(_&&this.validate.errors)for(const h of this.validate.errors)_.push(`${h.message} at ${h.dataPath}`);return[]}printParseErrorCode(m){return o.printParseErrorCode(m)}};t.KeymapsParser=p,t.KeymapsParser=p=n.__decorate([(0,c.Injectable)(),n.__metadata("design:paramtypes",[])],p)},48644:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.KeymapsContribution=t.KEYMAP_COMMANDS=t.KeymapsContextMenu=t.KeymapsResourceProvider=void 0;const n=e(85608),r=e(76003),o=e(41869),c=e(93899),p=e(57517),v=e(42933),m=e(97821),_=e(25067),s=e(34879),f="keymaps-preview";let a=class extends o.WithEventBus{constructor(){super(),this.scheme=_.KEYMAPS_SCHEME}provideResource(g){return{supportsRevive:!0,name:(0,o.localize)("keymaps.tab.name"),icon:(0,o.getIcon)("setting"),uri:g}}provideResourceSubname(g,l){return null}async shouldCloseResource(g,l){return!0}};t.KeymapsResourceProvider=a,t.KeymapsResourceProvider=a=n.__decorate([(0,r.Injectable)(),n.__metadata("design:paramtypes",[])],a);var h;(function(E){E.KEYMAPS="2_keymaps"})(h||(t.KeymapsContextMenu=h={}));var u;(function(E){const g="keymaps";E.OPEN_SOURCE_FILE={id:"keymaps.open.source",label:"%keymaps.editorTitle.openSource%",category:g}})(u||(t.KEYMAP_COMMANDS=u={}));let d=class{registerCommands(g){g.registerCommand(o.COMMON_COMMANDS.OPEN_KEYMAPS,{isEnabled:()=>!0,execute:async()=>{await this.keymapService.open()}}),g.registerCommand(u.OPEN_SOURCE_FILE,{execute:async()=>{this.keymapService.openResource()}}),g.registerCommand(o.KEYBOARD_COMMANDS.CHOOSE_KEYBOARD_LAYOUT,{execute:()=>{this.chooseLayout()}})}registerMenus(g){g.registerMenuItem(c.MenuId.SettingsIconMenu,{command:o.COMMON_COMMANDS.OPEN_KEYMAPS.id,group:h.KEYMAPS}),g.registerMenuItem(c.MenuId.EditorTitle,{command:u.OPEN_SOURCE_FILE.id,iconClass:(0,o.getIcon)("open"),group:"navigation",order:4,when:`resourceScheme == ${_.KEYMAPS_SCHEME}`}),g.registerMenuItem(c.MenuId.EditorTitle,{command:o.COMMON_COMMANDS.OPEN_KEYMAPS.id,iconClass:(0,o.getIcon)("open"),group:"navigation",order:4,when:"resourceFilename =~ /keymaps.json/"})}registerKeybindings(g){g.registerKeybinding({command:o.COMMON_COMMANDS.OPEN_KEYMAPS.id,keybinding:"ctrlcmd+K ctrlcmd+S"})}onStart(){this.keymapService.init()}registerResource(g){g.registerResourceProvider(this.keymapsResourceProvider)}registerEditorComponent(g){g.registerEditorComponent({component:s.KeymapsView,uid:f,scheme:_.KEYMAPS_SCHEME}),g.registerEditorComponentResolver(_.KEYMAPS_SCHEME,(l,y,b)=>{b([{type:p.EditorOpenType.component,componentId:f}])})}async chooseLayout(){const g=this.layoutProvider.currentLayoutData,l={label:(0,o.localize)("keyboard.autoDetect.label"),description:g&&this.layoutProvider.currentLayoutSource!=="user-choice"?(0,o.formatLocalize)("keyboard.autoDetect.description",(0,o.getKeyboardLayoutId)(g.layout)):void 0,detail:(0,o.localize)("keyboard.autoDetect.detail"),value:"autodetect"},y=this.layoutProvider.allLayoutData.map(A=>this.toQuickPickValue(A,g===A));let b;b=[l,...y];const S=await this.quickPickService.show(b,{placeholder:"Choose a keyboard layout"});if(S)return this.layoutProvider.setLayoutData(S)}toQuickPickValue(g,l){return{label:(0,o.getKeyboardLayoutId)(g.layout),value:g}}};t.KeymapsContribution=d,n.__decorate([(0,r.Autowired)(m.QuickPickService),n.__metadata("design:type",Object)],d.prototype,"quickPickService",void 0),n.__decorate([(0,r.Autowired)(o.KeyboardNativeLayoutService),n.__metadata("design:type",Object)],d.prototype,"layoutProvider",void 0),n.__decorate([(0,r.Autowired)(v.IFileServiceClient),n.__metadata("design:type",Object)],d.prototype,"filesystem",void 0),n.__decorate([(0,r.Autowired)(a),n.__metadata("design:type",a)],d.prototype,"keymapsResourceProvider",void 0),n.__decorate([(0,r.Autowired)(_.IKeymapService),n.__metadata("design:type",Object)],d.prototype,"keymapService",void 0),t.KeymapsContribution=d=n.__decorate([(0,o.Domain)(o.CommandContribution,o.KeybindingContribution,o.ClientAppContribution,p.BrowserEditorContribution,c.MenuContribution)],d)},85448:(x,t,e)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.KeymapService=void 0;const r=e(85608),o=r.__importStar(e(39050)),c=e(76003),p=e(41869),v=e(68969),m=e(14951),_=e(25067),s=e(2312);let f=n=class{constructor(){this.keymapChangeEmitter=new p.Emitter,this.convertKeySequence=[],this.toUnregisterUserKeybindingMap=new Map,this.toRestoreDefaultKeybindingMap=new Map,this.searchDelayer=new p.ThrottledDelayer(n.DEFAULT_SEARCH_DELAY),this.disposableCollection=new p.DisposableCollection,this._whenReadyDeferred=new p.Deferred,this.fuzzyOptions={pre:"<match>",post:"</match>"},this.reconcileQueue=new p.Throttler,this.keybindings=[],this.updateKeybindings=()=>{this.currentSearchValue?this.doSearchKeybindings(this.currentSearchValue):(0,p.runWhenIdle)(()=>{this.keybindings=this.getKeybindingItems(),this.keymapChangeEmitter.fire(this.keybindings)})},this.setKeybinding=(h,u)=>this.progressService.withProgress({location:p.ProgressLocation.Notification},d=>new Promise((E,g)=>{d.report({message:(0,p.localize)("keymaps.keybinding.loading"),increment:0,total:100});const l=this.storeKeybindings||[];let y=!1;for(const b of l){const S={when:b.when,command:b.command,keybinding:b.key};if(b.command===u.command){y=!0,this.unregisterUserKeybinding(S);const A=this.toUniqueKey(h),w=this.toRestoreDefaultKeybindingMap.get(A);if(w){const T=this.toUniqueKey(u);this.toRestoreDefaultKeybindingMap.delete(A),this.toRestoreDefaultKeybindingMap.set(T,w)}b.key=u.keybinding,this.registerUserKeybinding({...S,priority:p.KeybindingWeight.WorkbenchContrib*100})}}if(!y){const b=this.keybindings.find(A=>A.id===u.command&&this.getRaw(A.when)===u.when);if(b&&b.keybinding){this.unregisterDefaultKeybinding({when:this.getRaw(b.when),command:b.id,keybinding:this.getRaw(b.keybinding)});const A=this.toUniqueKey(h),w=this.toRestoreDefaultKeybindingMap.get(A);if(w){const T=this.toUniqueKey(u);this.toRestoreDefaultKeybindingMap.delete(A),this.toRestoreDefaultKeybindingMap.set(T,w)}}const S={when:this.getWhen(u),command:u.command,key:u.keybinding};l.push(S),this.registerUserKeybinding(u)}return this.saveKeybinding(l).then(()=>{E(void 0),d.report({message:(0,p.localize)("keymaps.keybinding.success"),increment:99})}).catch(b=>{g(b),d.report({message:(0,p.localize)("keymaps.keybinding.fail"),increment:99})}).finally(()=>{setTimeout(()=>{d.report({increment:100})},3e3)})}),()=>{}),this.covert=h=>this.keybindingService.convert(h," "),this.clearCovert=()=>this.keybindingService.clearConvert(),this.resetKeybinding=async h=>{if(!this.resource)return;const d=this.storeKeybindings.filter(E=>E.command!==h.command);return this.unregisterUserKeybinding(h),this.restoreDefaultKeybinding(h),this.saveKeybinding(d)},this.fixed=async()=>{this.commandService.executeCommand(p.EDITOR_COMMANDS.OPEN_RESOURCE.id,new p.URI().withScheme(_.KEYMAPS_SCHEME),{preview:!1})},this.searchKeybindings=h=>{this.currentSearchValue=h,this.searchDelayer.isTriggered()||this.searchDelayer.cancel(),this.searchDelayer.trigger(async()=>{this.doSearchKeybindings(this.currentSearchValue)})},this.isSearching=!1,this.doSearchKeybindings=h=>{h?this.isSearching=!0:this.isSearching=!1;const u=this.getKeybindingItems(),d=[];u.forEach(E=>{const g=["id","command","keybinding","when","context","source"];let l=!1;for(const y of g){const b=E[y];if(b){const S=o.match(h,b,this.fuzzyOptions);if(S)E[y]=S.rendered,l=!0;else if(y==="keybinding"){const A=h.split("+"),w=b.split(" "),T=[0];let D=[];w.length>1?w.forEach(M=>{const R=M.split("+");T.push(R.length+T[-1]),D.push(...R)}):D=b.split("+"),T.shift();const I=[...D];let O=0;if(A.forEach(M=>{let R={rendered:"",score:0},P=-1;if(b){D.forEach(F=>{const L=o.match(M,F,this.fuzzyOptions);L&&L.score>R.score&&(R=L,P=I.indexOf(F))});const k=R.rendered;k&&(P>-1&&(I[P]=k),D.splice(P,1,""),O+=1)}}),O===A.length){if(T.length>0){const M="";I.forEach((R,P)=>{P===0?M.concat(R):T.indexOf(P)!==-1?M.concat(" "+R):M.concat("+"+R)}),E[y]=M}E[y]=I.join("+"),l=!0}}}}l&&d.push(E)}),this.keybindings=d,this.keymapChangeEmitter.fire(this.keybindings)},this.validateKeybinding=(h,u)=>{if(!u)return(0,p.localize)("keymaps.keybinding.require");try{const d={command:this.isSearching?this.getRaw(h.command):h.command,when:this.isSearching?this.getRaw(h.when):h.when,keybinding:this.isSearching?this.getRaw(u):u};return h.keybinding===u?" ":this.keybindingRegistry.validateKeybindingInScope(d)}catch(d){return d}},this.detectKeybindings=(h,u)=>{if(!u)return[];try{if(h.keybinding===u)return[];const d=this.keybindings.filter(E=>this.getRaw(E.keybinding)===u);if(d.length>0)return d.map(E=>{const g=this.commandRegistry.getCommand(this.getRaw(E.command)),l=this.storeKeybindings.find(y=>g&&y.command===g.id);return E.when=this.getRaw(E.when),E.keybinding=this.getRaw(E.keybinding),{id:g?g.id:this.getRaw(E.command),command:(g?g.label||g.id:E.command)||"",when:this.keybindingService.convertMonacoWhen(E.when),keybinding:this.getRaw(E.keybinding),source:l?this.getScope(p.KeybindingScope.USER):this.getScope(p.KeybindingScope.DEFAULT)}})}catch(d){this.logger.error(d)}return[]}}get onDidKeymapChanges(){return this.keymapChangeEmitter.event}get storeKeybindings(){return this._storeKeybindings&&this._storeKeybindings.map(h=>({...h,command:this.getValidateCommand(h.command),key:h.key||h.keybinding}))}set storeKeybindings(h){this._storeKeybindings=h}get whenReady(){return this._whenReadyDeferred.promise}async init(){await this.reconcile();const h=await this.filesystem.watchFileChanges(n.KEYMAP_FILE_URI);this.disposableCollection.push(h),h.onFilesChanged(()=>{this.reconcileQueue.queue(this.reconcile.bind(this))}),this._whenReadyDeferred.resolve()}async openResource(){if(!this.resource||!this.resource.uri)return;const h=await this.resource.uri;if(!h)return;if(!await this.filesystem.access(h)){const d=await this.filesystem.createFile(h),E=await this.filesystem.setContent(d,`{
30697
30679
  }`);this.resource=E||void 0}h&&this.commandService.executeCommand(p.EDITOR_COMMANDS.OPEN_RESOURCE.id,new p.URI(h),{preview:!1})}disposeRegistedKeybinding(){for(const[,h]of this.toUnregisterUserKeybindingMap)h.dispose();for(const[,h]of this.toRestoreDefaultKeybindingMap)h.dispose()}dispose(){this.disposeRegistedKeybinding(),this.disposableCollection.dispose()}getValidateCommand(h){return h.replace(/^monaco.editor/,"editor")}async reconcile(h){const u=n.KEYMAP_FILE_URI.toString();this.resource=await this.filesystem.getFileStat(u),this.resource||(this.resource=await this.filesystem.createFile(u,{content:JSON.stringify([])}));const E=(h?h.slice(0):await this.parseKeybindings()).map(y=>({when:y.when,command:this.getValidateCommand(y.command),keybinding:y.key||y.keybinding})),g=[],l=[];this.disposeRegistedKeybinding(),E.forEach(y=>{y.command.startsWith("-")?l.push(y):g.push(y)}),g.map(y=>{this.unregisterDefaultKeybinding(y,!0),this.registerUserKeybinding(y)}),l.map(y=>{y.command=y.command.slice(1),this.unregisterDefaultKeybinding(y,!0)})}unregisterUserKeybinding(h){const u=this.toUniqueKey(h);if(this.toUnregisterUserKeybindingMap.has(u)){const d=this.toUnregisterUserKeybindingMap.get(u);d?.dispose(),this.toUnregisterUserKeybindingMap.delete(u)}}registerUserKeybinding(h){const u=this.toUniqueKey(h);this.toUnregisterUserKeybindingMap.set(u,this.keybindingRegistry.registerKeybinding(h,p.KeybindingScope.USER))}unregisterDefaultKeybinding(h,u=!1){if(u)this.keybindingRegistry.getKeybindingsForCommand(h.command).map(E=>{const g={...h,keybinding:E.keybinding};this.keybindingRegistry.unregisterKeybinding(g);const l=this.toUniqueKey(h);this.toRestoreDefaultKeybindingMap.set(l,p.Disposable.create(()=>{this.keybindingRegistry.registerKeybinding(g)}))});else{this.keybindingRegistry.unregisterKeybinding(h);const d=this.toUniqueKey(h);this.toRestoreDefaultKeybindingMap.set(d,p.Disposable.create(()=>{this.keybindingRegistry.registerKeybinding(h)}))}}restoreDefaultKeybinding(h){const u=this.toUniqueKey(h),d=this.toRestoreDefaultKeybindingMap.get(u);d&&(d?.dispose(),this.toRestoreDefaultKeybindingMap.delete(u))}toUniqueKey(h){return`${h.command}${h.when?`-${h.when}`:"-"}${h.keybinding?`-${h.keybinding}`:"-"}`}async parseKeybindings(){try{const h=await this.resource;if(!h)return[];const{content:u}=await this.filesystem.readFile(h.uri);this.storeKeybindings=this.parser.parse(u.toString())}catch(h){this.logger.warn(`ParseKeybindings fail: ${h.stack}`),this.storeKeybindings=[]}return this.storeKeybindings}async saveKeybinding(h){this.storeKeybindings=h,this.updateKeybindings(),this.resource||(this.resource=await this.filesystem.createFile(n.KEYMAP_FILE_URI.toString()));const u=await this.filesystem.setContent(this.resource,JSON.stringify(h,void 0,2));this.resource=u||void 0}async getKeybindings(){return this.storeKeybindings.map(h=>({command:h.command,keybinding:h.key,when:h.when,args:h.args}))}async open(){this.commandService.executeCommand(p.EDITOR_COMMANDS.OPEN_RESOURCE.id,new p.URI().withScheme(_.KEYMAPS_SCHEME),{preview:!0})}getWhen(h){return h?this.keybindingService.convertMonacoWhen(h.when):""}getScope(h){return h===p.KeybindingScope.DEFAULT?(0,p.localize)("keymaps.source.default"):h===p.KeybindingScope.USER?(0,p.localize)("keymaps.source.user"):h===p.KeybindingScope.WORKSPACE?(0,p.localize)("keymaps.source.workspace"):""}getKeybindingItems(){const h=this.commandRegistry.getCommands(),u=[];for(const b of h){const S=this.keybindingRegistry.getKeybindingsForCommand(b.id);!S||!S.length?b.label&&u.push({id:b.id,command:b.label,hasCommandLabel:!0}):S.forEach(A=>{let w;if(this.storeKeybindings){const T=this.storeKeybindings.find(D=>b&&D.command===b.id);w={id:b.id,command:b.label||b.id,keybinding:T?T.key:A?this.keybindingRegistry.acceleratorFor(A,"+").join(" "):"",when:T?this.getWhen(T):this.getWhen(S&&A),source:T?this.getScope(p.KeybindingScope.USER):this.getScope(p.KeybindingScope.DEFAULT),hasCommandLabel:!!b.label}}else w={id:b.id,command:b.label||b.id,keybinding:S&&A?this.keybindingRegistry.acceleratorFor(A,"+").join(" "):"",when:this.getWhen(S&&A),source:S&&A&&typeof A.scope<"u"?this.getScope(A.scope):"",hasCommandLabel:!!b.label};u.push(w)})}const d=u.sort((b,S)=>this.compareItem(b,S)),E=d.filter(b=>!!b.keybinding),g=d.filter(b=>!b.keybinding&&b.hasCommandLabel),l=E.filter(b=>b.hasCommandLabel),y=E.filter(b=>!b.hasCommandLabel);return[...l,...y,...g]}compareItem(h,u){return h&&u?h.source===u.source?h.command.toLowerCase().localeCompare(u.command.toLowerCase()):h.source===this.getScope(p.KeybindingScope.USER)?-1:1:0}getRaw(h){return h?h.replace(new RegExp(/<(\/)?match>/gi),""):""}};t.KeymapService=f,f.DEFAULT_SEARCH_DELAY=100,f.KEYMAP_FILE_URI=new p.URI().withScheme(p.Schemes.userStorage).withPath(_.KEYMAPS_FILE_NAME),r.__decorate([(0,c.Autowired)(p.KeybindingRegistry),r.__metadata("design:type",Object)],f.prototype,"keyBindingRegistry",void 0),r.__decorate([(0,c.Autowired)(s.KeymapsParser),r.__metadata("design:type",s.KeymapsParser)],f.prototype,"parser",void 0),r.__decorate([(0,c.Autowired)(p.CommandService),r.__metadata("design:type",Object)],f.prototype,"commandService",void 0),r.__decorate([(0,c.Autowired)(p.CommandRegistry),r.__metadata("design:type",Object)],f.prototype,"commandRegistry",void 0),r.__decorate([(0,c.Autowired)(p.KeybindingRegistry),r.__metadata("design:type",Object)],f.prototype,"keybindingRegistry",void 0),r.__decorate([(0,c.Autowired)(p.KeybindingService),r.__metadata("design:type",Object)],f.prototype,"keybindingService",void 0),r.__decorate([(0,c.Autowired)(m.IFileServiceClient),r.__metadata("design:type",Object)],f.prototype,"filesystem",void 0),r.__decorate([(0,c.Autowired)(p.ILogger),r.__metadata("design:type",Object)],f.prototype,"logger",void 0),r.__decorate([(0,c.Autowired)(v.IProgressService),r.__metadata("design:type",Object)],f.prototype,"progressService",void 0),t.KeymapService=f=n=r.__decorate([(0,c.Injectable)()],f)},34879:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.KeymapsView=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importStar(e(14041)),c=e(97267),p=e(41869),v=e(25067),m=n.__importDefault(e(78541)),_=()=>{const{keybindings:s,searchKeybindings:f,validateKeybinding:a,detectKeybindings:h,setKeybinding:u,resetKeybinding:d,getRaw:E,getScope:g,covert:l,clearCovert:y,fixed:b,onDidKeymapChanges:S,updateKeybindings:A}=(0,p.useInjectable)(v.IKeymapService),[w,T]=o.default.useState(!1),[D,I]=o.default.useState(""),[O,M]=o.default.useState(s),R=({data:X,index:V})=>{const{id:$,command:Y,when:G,source:H,keybinding:K}=X,[Z,Q]=o.default.useState(!1),[oe,ne]=o.default.useState(K||""),[he,_e]=o.default.useState(!1),[q,Re]=o.default.useState(),[ve,ie]=o.default.useState([]),fe=()=>{he||(b(),_e(!0)),y(),ne(E(K)),Q(!0)},Me=Fe=>{const pe=a(X,Fe);pe?pe!==" "?Re({message:pe,type:c.VALIDATE_TYPE.ERROR}):Q(!1):(u({command:E($),when:E(G)||"",keybinding:E(K)},{command:E($),when:E(G)||"",keybinding:Fe}),Q(!1),y())},Le=()=>{Q(!1)},Ce=Fe=>{Fe.stopPropagation(),Fe.preventDefault();const{key:pe}=p.KeyCode.createKeyCode(Fe.nativeEvent),re=Fe.nativeEvent.shiftKey||Fe.nativeEvent.metaKey||Fe.nativeEvent.altKey||Fe.nativeEvent.ctrlKey;pe&&p.Key.ENTER.keyCode===pe.keyCode&&!re?oe&&Me(oe):ne(l(Fe.nativeEvent))},Se=()=>{const Fe=()=>{Re(void 0),oe&&ne(""),y()},pe=re=>{re.stopPropagation(),re.preventDefault()};return o.default.createElement("div",{className:m.default.keybinding_optional_actions,onMouseDown:pe},o.default.createElement("span",{className:(0,r.default)((0,p.getIcon)("close-circle-fill"),m.default.keybinding_optional_action),onClick:Fe,title:(0,p.localize)("keymaps.action.clear")}))},Ee=()=>o.default.createElement("div",{className:m.default.keybinding_key_input_placeholder},"\u23CE"),ge=Fe=>{const pe=re=>{re.preventDefault(),he||(b(),_e(!0)),d({command:E($),when:E(G)||"",keybinding:oe})};if(Fe&&E(Fe)===g(p.KeybindingScope.USER))return o.default.createElement("span",{className:(0,r.default)((0,p.getIcon)("rollback"),m.default.keybinding_inline_action),onClick:pe,title:(0,p.localize)("keymaps.action.reset")})},xe=()=>{if(!q&&ve.length>0)return o.default.createElement("div",{className:m.default.keybinding_detective_messages},o.default.createElement("div",{className:m.default.keybinding_detective_messages_label},(0,p.formatLocalize)("keymaps.keybinding.duplicate",ve.length)),o.default.createElement("ul",{className:m.default.keybinding_detective_messages_container},ve.map((Fe,pe)=>o.default.createElement("li",{className:m.default.keybinding_detective_messages_item,key:`${Fe.id}_${pe}`,title:`${Fe.command}-${Fe.when}`},o.default.createElement("div",{className:m.default.title},(0,p.localize)("keymaps.header.command.title"),": ",E(Fe.command)||"-"),o.default.createElement("div",{className:m.default.description},o.default.createElement("div",{style:{marginRight:4}},(0,p.localize)("keymaps.header.source.title"),": ",E(Fe.source)||"-"),o.default.createElement("div",null,(0,p.localize)("keymaps.header.when.title"),": ",E(Fe.when)||"\u2014"))))))},Te=()=>{if(Z)return o.default.createElement("div",{className:m.default.keybinding_key_input_container},Se(),o.default.createElement(c.ValidateInput,{placeholder:(0,p.localize)("keymaps.edit.placeholder"),validateMessage:q,className:m.default.keybinding_key_input,size:"small",autoFocus:!0,name:p.NO_KEYBINDING_NAME,value:oe,onKeyDown:Ce,onBlur:Le}),Ee(),xe());{const Fe=K?.split(" ");return o.default.createElement("div",{className:m.default.keybinding_key,title:E(K),onDoubleClick:fe},o.default.createElement("div",{className:m.default.keybinding_action,onClick:fe},o.default.createElement("span",{className:(0,r.default)(K?(0,p.getIcon)("edit"):(0,p.getIcon)("plus"),m.default.keybinding_inline_action),title:K?(0,p.localize)("keymaps.action.edit"):(0,p.localize)("keymaps.action.add")}),ge(H)),Fe&&Fe[0]?Fe.map((pe,re)=>{const ue=pe.split("+");return o.default.createElement("div",{className:m.default.keybinding_key_block,key:`${pe}_${re}`},ue.map((Oe,Ae)=>o.default.createElement("div",{className:m.default.keybinding_key_item,key:`${Oe}_${Ae}`,dangerouslySetInnerHTML:{__html:Oe||""}})))}):"\u2014")}};return(0,o.useEffect)(()=>{q&&Re(void 0),ie(oe&&Z?h(X,oe):[])},[oe]),o.default.createElement("div",{className:(0,r.default)(m.default.keybinding_list_item,V%2===1&&m.default.odd)},o.default.createElement("div",{className:(0,r.default)(m.default.keybinding_list_item_box,m.default.keybinding_command)},o.default.createElement("div",{className:m.default.command_name,title:E(Y),dangerouslySetInnerHTML:{__html:Y}}),o.default.createElement("div",{className:(0,r.default)(m.default.limit_warp,m.default.command_id),title:E($),dangerouslySetInnerHTML:{__html:(0,p.formatLocalize)("keymaps.commandId.title",$)}})),o.default.createElement("div",{className:(0,r.default)(m.default.keybinding_list_item_box)},Te()),o.default.createElement("div",{className:m.default.keybinding_list_item_box},o.default.createElement("div",{className:m.default.limit_warp,title:E(G||"\u2014"),dangerouslySetInnerHTML:{__html:G||"\u2014"}})),o.default.createElement("div",{className:m.default.keybinding_list_item_box},o.default.createElement("div",{title:E(H),dangerouslySetInnerHTML:{__html:H||""}})))},P=()=>{const X=()=>{T(!w)};return o.default.createElement("div",{className:m.default.search_inline_action},o.default.createElement("span",{className:(0,r.default)((0,p.getIcon)("keyboard"),m.default.search_inline_action_icon,w&&m.default.active),onClick:X}))},k=(0,o.useCallback)(X=>{I(X),f(X)},[D]),F=X=>{if(!w){const V=X.target&&X.target.value?X.target.value.toLocaleLowerCase():"";k(V)}},L=X=>{if(w){X.stopPropagation(),X.preventDefault();const{key:V}=p.KeyCode.createKeyCode(X.nativeEvent);if(V&&p.Key.ENTER.keyCode===V.keyCode)return;k(l(X.nativeEvent))}},N=()=>{D&&(I(""),f("")),y()},j=()=>o.default.createElement("div",{className:m.default.keybinding_optional_actions},o.default.createElement("span",{className:(0,r.default)((0,p.getIcon)("close-circle-fill"),m.default.keybinding_optional_action),onClick:N,title:(0,p.localize)("keymaps.action.reset")})),W=()=>o.default.createElement("div",{className:m.default.search_container},o.default.createElement(c.Input,{className:m.default.search_input,placeholder:(0,p.localize)(w?"keymaps.search.keyboard.placeholder":"keymaps.search.placeholder"),type:"text",value:D,name:p.NO_KEYBINDING_NAME,onChange:F,onKeyDown:L,addonBefore:P()}),j()),U=(0,o.useMemo)(()=>{const X=[{title:(0,p.localize)("keymaps.header.command.title"),classname:m.default.keybinding_header_item},{title:(0,p.localize)("keymaps.header.keybinding.title"),classname:m.default.keybinding_header_item},{title:(0,p.localize)("keymaps.header.when.title"),classname:m.default.keybinding_header_item},{title:(0,p.localize)("keymaps.header.source.title"),classname:m.default.keybinding_header_item}];return o.default.createElement("div",{className:m.default.keybinding_header},X.map((V,$)=>o.default.createElement("div",{className:V.classname,key:`${V.title}_${$}`},V.title)))},[]);return(0,o.useEffect)(()=>{const X=S(V=>{M(V)});return A(),()=>{X.dispose()}},[]),o.default.createElement("div",{className:m.default.keybinding_container},o.default.createElement("div",{className:m.default.keybinding_searchbar},W()),o.default.createElement("div",{className:m.default.keybinding_body},U,o.default.createElement("div",{className:m.default.keybinding_list},o.default.createElement(c.RecycleList,{itemHeight:40,data:O,template:R,className:m.default.keybinding_list_container}))))};t.KeymapsView=_},79312:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.KEYMAPS_FILE_NAME=t.KEYMAPS_SCHEME=void 0,t.KEYMAPS_SCHEME="keymaps",t.KEYMAPS_FILE_NAME="keymaps.json"},25067:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608);n.__exportStar(e(79312),t),n.__exportStar(e(88811),t)},88811:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IKeymapService=void 0,t.IKeymapService=Symbol("IKeymapService")},83507:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LogModule=t.LogServiceClient=void 0;const n=e(85608),r=e(76003),o=e(41869),c=e(47548),p=e(49187);n.__exportStar(e(47548),t);var v=e(1700);Object.defineProperty(t,"LogServiceClient",{enumerable:!0,get:function(){return v.LogServiceClient}});let m=class extends o.BrowserModule{constructor(){super(...arguments),this.providers=[{token:c.ILoggerManagerClient,useClass:p.LoggerManagerClient}],this.backServices=[{servicePath:c.LogServiceForClientPath,clientToken:c.ILoggerManagerClient}]}};t.LogModule=m,t.LogModule=m=n.__decorate([(0,r.Injectable)()],m)},49187:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LoggerManagerClient=void 0;const n=e(85608),r=e(76003),o=e(43718),c=e(47548),p=e(1700);let v=class{constructor(){this.logLevelChangeEmitter=new o.Emitter}getLogger(_,s){const f=new p.LogServiceClient(_);return f.setup(this.logServiceForClient,s),f}getBrowserLogger(_){return new p.LogServiceClient(_)}async getLogFolder(){return await this.logServiceForClient.getLogFolder()}async setGlobalLogLevel(_){return await this.logServiceForClient.setGlobalLogLevel(_)}async getGlobalLogLevel(){return await this.logServiceForClient.getGlobalLogLevel()}async dispose(){return this.logLevelChangeEmitter.dispose(),await this.logServiceForClient.disposeAll()}get onDidChangeLogLevel(){return this.logLevelChangeEmitter.event}onDidLogLevelChanged(_){this.logLevelChangeEmitter.fire(_)}};t.LoggerManagerClient=v,n.__decorate([(0,r.Autowired)(c.LogServiceForClientPath),n.__metadata("design:type",Object)],v.prototype,"logServiceForClient",void 0),t.LoggerManagerClient=v=n.__decorate([(0,r.Injectable)()],v)},1700:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LogServiceClient=void 0;const n=e(43718),r=e(47548);class o{constructor(p){this.level=r.LogLevel.Verbose,this.ready=new n.Deferred,this.namespace=p,this.debugLog=new r.DebugLog(p)}async setup(p,v){this.logServiceForClient=p,this.pid=v;const m=await this.logServiceForClient.getGlobalLogLevel();this.level=m,this.ready.resolve()}async getLevel(){return this.logServiceForClient?await this.logServiceForClient.getLevel(this.namespace):this.level}async setLevel(p){this.level=p,this.logServiceForClient&&await this.logServiceForClient.setLevel(this.namespace,p)}async verbose(...p){this.debugLog.verbose(...p),this.logServiceForClient&&await this.logServiceForClient.verbose(this.namespace,(0,r.format)(p),this.pid)}async debug(...p){this.debugLog.debug(...p),this.logServiceForClient&&(await this.ready.promise,!(this.level>r.LogLevel.Debug)&&await this.logServiceForClient.debug(this.namespace,(0,r.format)(p),this.pid))}async log(...p){this.debugLog.log(...p),this.logServiceForClient&&(await this.ready.promise,!(this.level>r.LogLevel.Info)&&await this.logServiceForClient.log(this.namespace,(0,r.format)(p),this.pid))}async warn(...p){this.debugLog.warn(...p),this.logServiceForClient&&(await this.ready.promise,!(this.level>r.LogLevel.Warning)&&await this.logServiceForClient.warn(this.namespace,(0,r.format)(p),this.pid))}async error(...p){this.debugLog.error(...p),this.logServiceForClient&&(await this.ready.promise,!(this.level>r.LogLevel.Error)&&await this.logServiceForClient.error(this.namespace,(0,r.format)(p),this.pid))}async critical(...p){this.debugLog.error(...p),this.logServiceForClient&&(await this.ready.promise,!(this.level>r.LogLevel.Critical)&&await this.logServiceForClient.critical(this.namespace,(0,r.format)(p),this.pid))}async dispose(){this.debugLog.destroy(),this.logServiceForClient&&await this.logServiceForClient.disposeLogger(this.namespace)}}t.LogServiceClient=o},47548:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608);n.__exportStar(e(4892),t),n.__exportStar(e(46196),t)},46196:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ILogServiceForClient=void 0,t.format=e,t.ILogServiceForClient=Symbol("LogServiceForClient");function e(n){let r="";for(let o=0;o<n.length;o++){let c=n[o];if(c instanceof Error){const p=Array.prototype.slice.call(arguments);p[0]=c.stack,c=e(p)}else if(typeof c=="object")try{c=JSON.stringify(c)}catch{}else if(typeof c=="symbol")try{c=c.toString()}catch{}r+=(o>0?" ":"")+c}return r}},73344:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),e(85608).__exportStar(e(47548),t)},9522:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AccordionServiceFactory=t.AccordionService=void 0;const n=e(85608),r=n.__importDefault(e(12784)),o=n.__importDefault(e(46343)),c=e(76003),p=e(41869),v=e(81878),m=e(71707),_=e(95416),s=e(93899),f=e(68969),a=e(28423),h=e(17793);let u=class extends p.WithEventBus{get views(){return this.viewsObservable.get()}get state(){return this.stateObservable.get()}constructor(E,g){super(),this.containerId=E,this.noRestore=g,this.forceRevealContextKeys=new Map,this.viewWhenContextkeys=new Set,this.appendedViewSet=new Set,this.viewsWithContextKey=new Set,this.viewsObservable=(0,a.observableValue)(this,[]),this.stateObservable=(0,a.observableValue)(this,{}),this.visibleViews=(0,a.derived)(this,l=>{const y=this.viewsObservable.read(l);return this.stateObservable.read(l),y.filter(b=>!this.getViewState(b.id).hidden)}),this.rendered=!1,this.menuId=`${s.MenuId.AccordionContext}/${this.containerId}`,this.toDispose=new Map,this.didChangeViewTitleEmitter=this.registerDispose(new p.Emitter),this.onDidChangeViewTitle=this.didChangeViewTitleEmitter.event,this.beforeAppendViewEmitter=this.registerDispose(new p.Emitter),this.onBeforeAppendViewEvent=this.beforeAppendViewEmitter.event,this.afterAppendViewEmitter=this.registerDispose(new p.Emitter),this.onAfterAppendViewEvent=this.afterAppendViewEmitter.event,this.afterDisposeViewEmitter=this.registerDispose(new p.Emitter),this.onAfterDisposeViewEvent=this.afterDisposeViewEmitter.event,this.doUpdateResize=(0,r.default)(()=>{var l,y;let b;if(Object.keys(this.state).forEach(S=>{this.state[S].hidden||this.state[S].collapsed||(b?(this.state[S].size||0)>(this.state[b].size||0)&&(b=S):b=S)}),b&&this.splitPanelService.isVisible&&this.expandedViews.length>1&&!((l=this.splitPanelService.rootNode)===null||l===void 0)&&l.clientHeight){const S=((y=this.splitPanelService.rootNode)===null||y===void 0?void 0:y.clientHeight)-this.getPanelFullHeight();if(S){const A=this.state;A[b].size+=S,(0,a.transaction)(w=>{this.stateObservable.set({...A},w)}),this.toggleOpen(b,!1)}}},16),this.storeState=()=>{this.noRestore||!this.rendered||this.layoutState.setState(_.LAYOUT_STATE.getContainerSpace(this.containerId),this.state)},this.handleSectionClick=(l,y,b)=>{this.doToggleOpen(l,y,b)},this.handleContextMenu=(l,y)=>{l.preventDefault();const b=this.ctxMenuService.createMenu({id:this.menuId,config:{args:[{viewId:y}]},contextKeyService:y?this.viewContextKeyRegistry.getContextKeyService(y):void 0}),S=b.getGroupedMenuNodes();b.dispose(),this.contextMenuRenderer.show({menuNodes:S[1],anchor:{x:l.clientX,y:l.clientY}})},this.addDispose((0,a.recomputeInitiallyAndOnChange)(this.visibleViews)),this.splitPanelService=this.splitPanelManager.getService(E),this.addDispose(this.splitPanelService),this.scopedCtxKeyService=this.contextKeyService.createScoped(),this.scopedCtxKeyService.createKey("triggerWithSection",!0),this.menuRegistry.registerMenuItem(this.menuId,{command:{id:this.registerGlobalToggleCommand(),label:(0,p.localize)("layout.view.hide","Hide")},group:"0_global",when:"triggerWithSection == true"}),this.viewContextKeyRegistry.afterContextKeyServiceRegistered(this.containerId,l=>{this.topViewKey=l.createKey("view",E),setTimeout(()=>{this.popViewKeyIfOnlyOneViewVisible()})}),this.addDispose(p.Event.debounce(this.contextKeyService.onDidChangeContext,(l,y)=>l||y.payload.affectsSome(this.viewWhenContextkeys),50)(l=>l&&this.handleContextKeyChange(),this)),this.splitPanelService.whenReady.then(()=>{this.listenWindowResize()})}updateViewTitle(E,g){const l=this.views.find(y=>y.id===E);l?(l.name=g,this.didChangeViewTitleEmitter.fire({id:E,title:g})):this.logger.error(`No target view \`${E}\` found, unable to update accordion title`)}updateViewDesciption(E,g){const l=this.views.find(y=>y.id===E);l?(l.description=g,this.didChangeViewTitleEmitter.fire({id:E,description:g})):this.logger.error(`No target view \`${E}\` found, unable to update accordion description`)}updateViewMessage(E,g){const l=this.views.find(y=>y.id===E);l?(l.message=g,this.didChangeViewTitleEmitter.fire({id:E,message:g})):this.logger.error(`No target view \`${E}\` found, unable to update accordion message`)}updateViewBadge(E,g){const l=this.views.find(y=>y.id===E);l?(l.badge=g,this.didChangeViewTitleEmitter.fire({id:E,badge:g})):this.logger.error(`No target view \`${E}\` found, unable to update accordion message`)}tryUpdateResize(){this.doUpdateResize()}restoreState(){if(this.noRestore)return;const E={};this.visibleViews.get().forEach(l=>E[l.id]={collapsed:!1,hidden:!1});const g=this.layoutState.getState(_.LAYOUT_STATE.getContainerSpace(this.containerId),E);(0,o.default)(g,E)||(0,a.transaction)(l=>{this.stateObservable.set({...g},l)}),this.popViewKeyIfOnlyOneViewVisible(),this.splitPanelService.whenReady.then(()=>{this.restoreSize(),this.rendered=!0})}restoreSize(){var E;let g=((E=this.splitPanelService.rootNode)===null||E===void 0?void 0:E.clientHeight)||0,l;if(this.visibleViews.get().forEach((y,b)=>{const S=this.state[y.id];S.collapsed?(this.setSize(b,0,!1,!0),g-=this.headerSize):!S.collapsed&&S.size&&(this.setSize(b,S.size,!1,!0),g-=S.size,l=b)}),l){const y=this.visibleViews.get()[l];this.setSize(l,this.state[y.id].size+g)}}initConfig(E){const{headerSize:g,minSize:l}=E;this.headerSize=g,this.minSize=l}registerContextService(E){let g=this.viewContextKeyRegistry.getContextKeyService(E);return g||(g=this.contextKeyService.createScoped(),g.createKey("view",E),this.viewContextKeyRegistry.registerContextKeyService(E,g)),g}getSectionToolbarMenu(E){const g=this.registerContextService(E),l=this.menuService.createMenu(s.MenuId.ViewTitle,g),y=this.views.find(b=>b.id===E);return y&&(y.titleMenu=l),l}updateView(E){(0,a.transaction)(g=>{const l=this.views;if(E.priority){const y=l.findIndex(b=>(b.priority||0)<(E.priority||0));l.splice(y===-1?l.length:y,0,E),this.viewsObservable.set([...l],g)}else this.viewsObservable.set([...l,E],g)})}appendView(E,g){if(this.appendedViewSet.has(E.id)&&!g)return;const l=new p.DisposableCollection;l.push(this.progressService.registerProgressIndicator(E.id));const y=this.views.findIndex(b=>b.id===E.id);if(y!==-1){(0,a.transaction)(b=>{const S=this.views;S[y]=Object.assign({},S[y],E),this.viewsObservable.set([...S],b)});return}if(E.when){this.viewsWithContextKey.add(E);const b=this.createRevealContextKey(E.id);if(this.fillKeysInWhenExpr(this.viewWhenContextkeys,E.when),!this.contextKeyService.match(E.when)&&!this.contextKeyService.match(b))return;this.appendedViewSet.add(E.id)}this.beforeAppendViewEmitter.fire(E.id),this.updateView(E),this.registerContextService(E.id),l.push(this.menuRegistry.registerMenuItem(this.menuId,{command:{id:this.registerVisibleToggleCommand(E.id,l),label:(E.name||E.id).toUpperCase()},group:"1_widgets"})),this.toDispose.set(E.id,l),this.popViewKeyIfOnlyOneViewVisible(),this.afterAppendViewEmitter.fire(E.id)}disposeView(E){const g=this.views.findIndex(y=>y.id===E);g>-1&&(0,a.transaction)(y=>{const b=this.views;b.splice(g,1),this.viewsObservable.set([...b],y)});const l=this.toDispose.get(E);l&&l.dispose(),this.appendedViewSet.delete(E),this.popViewKeyIfOnlyOneViewVisible(),this.afterDisposeViewEmitter.fire(E)}revealView(E){const g=this.forceRevealContextKeys.get(E);g&&g.key.set(!0)}disposeAll(){(0,a.transaction)(E=>{this.viewsObservable.set([],E)}),this.toDispose.forEach(E=>{E.dispose()})}onResize(E){if(E.payload.slotLocation&&this.state[E.payload.slotLocation]){const g=E.payload.slotLocation;p.fastdom.measureAtNextFrame(()=>{const l=document.getElementById(g);if(l){const y=this.state;y[g].size=l.clientHeight,(0,a.transaction)(b=>{this.stateObservable.set({...y},b)}),this.storeState()}})}}getPanelFullHeight(E){return Object.keys(this.state).filter(g=>this.views.find(l=>l.id===g)&&g!==E).reduce((g,l)=>g+(this.state[l].collapsed?this.headerSize:this.state[l].hidden?0:this.state[l].size),0)}listenWindowResize(){window.addEventListener("resize",this.doUpdateResize),this.addDispose({dispose:()=>window.removeEventListener("resize",this.doUpdateResize)})}createRevealContextKey(E){const g=`forceShow.${E}`;return this.forceRevealContextKeys.set(E,{when:`${g} == true`,key:this.contextKeyService.createKey(g,!1)}),this.viewWhenContextkeys.add(g),`${g} == true`}registerGlobalToggleCommand(){const E=`view-container.hide.${this.containerId}`;return this.commandRegistry.registerCommand({id:E},{execute:({viewId:g})=>{this.doToggleView(g)},isEnabled:()=>this.visibleViews.get().length>1}),E}registerVisibleToggleCommand(E,g){const l=`view-container.hide.${E}`;return g.push(this.commandRegistry.registerCommand({id:l},{execute:({forceShow:y}={})=>{this.doToggleView(E,y)},isToggled:()=>!this.getViewState(E).hidden,isEnabled:()=>this.getViewState(E).hidden||this.visibleViews.get().length>1})),l}doToggleView(E,g){const l=this.getViewState(E);let y;g===void 0?y=!l.hidden:y=!g,l.hidden=y,this.updateViewState(E,l),this.popViewKeyIfOnlyOneViewVisible(),this.storeState()}popViewKeyIfOnlyOneViewVisible(){if(!this.topViewKey)return;const E=this.visibleViews.get();E.length===1?this.topViewKey.set(E[0].id):this.topViewKey.reset()}toggleViewVisibility(E,g){this.doToggleView(E,g)}get expandedViews(){return this.views.filter(E=>{const g=this.state[E.id];return!g||g&&!g.hidden&&!g.collapsed})}toggleOpen(E,g){const l=this.visibleViews.get().findIndex(y=>y.id===E);l>-1&&this.doToggleOpen(E,g,l,!0)}getViewState(E){let g=this.state[E];const l=this.views.find(y=>y.id===E);return g||(this.updateViewState(E,{collapsed:l?.collapsed||!1,hidden:l?.hidden||!1}),g=this.state[E]),g}updateViewState(E,g){const l=this.state;l[E]=g,(0,a.transaction)(y=>{this.stateObservable.set({...l},y)})}doToggleOpen(E,g,l,y){var b;const S=this.getViewState(E);this.updateViewState(E,{...S,collapsed:g});const A=this.mainLayoutService.getContainer(this.containerId);if(((b=A?.options)===null||b===void 0?void 0:b.alignment)!=="horizontal"){let w;g?w=this.setSize(l,0,!1,y):w=this.setSize(l,this.expandedViews.length===1?this.getAvailableSize():S.size||this.minSize,!1,y);for(let T=this.visibleViews.get().length-1;T>l;T--)this.getViewState(this.visibleViews.get()[T].id).collapsed!==!0?w=this.setSize(T,w,!0,y):this.setSize(T,0,!1,y);for(let T=l-1;T>=0;T--)(this.state[this.visibleViews.get()[T].id]||{}).collapsed!==!0?w=this.setSize(T,w,!0,y):this.setSize(T,0,!1,y)}this.eventBus.fire(new h.ViewCollapseChangedEvent({viewId:E,collapsed:g}))}setSize(E,g,l,y){var b;const S=this.visibleViews.get()[E],A=(b=this.splitPanelService.rootNode)===null||b===void 0?void 0:b.clientHeight,w=this.splitPanelService.panels[E];if(!w)return 0;y||w.classList.add("resize-ease"),!g&&!l?(g=this.headerSize,w.classList.add(v.RESIZE_LOCK)):w.classList.remove(v.RESIZE_LOCK);const T=w.clientHeight,D=this.getViewState(S.id);let I=g;if(l&&(I=Math.max(T-g,this.minSize)),E===this.expandedViews.length-1&&(0,p.isDefined)(A))if(I+E*this.minSize>A)I-=I+E*this.minSize-A;else{const O=this.getPanelFullHeight(S.id);I+O<A&&(I+=A-(I+O))}if(this.rendered){let O;g===this.headerSize?O=T:O=I,O!==this.headerSize&&(D.size=O)}return this.storeState(),D.nextSize=I,y||setTimeout(()=>{w.classList.remove("resize-ease")},200),l?I-(T-g):g-T}getAvailableSize(){var E;const g=(E=this.splitPanelService.rootNode)===null||E===void 0?void 0:E.clientHeight;return g?g-(this.visibleViews.get().length-1)*this.headerSize:0}handleContextKeyChange(){Array.from(this.viewsWithContextKey.values()).forEach(E=>{this.contextKeyService.match(E.when)||this.contextKeyService.match(this.forceRevealContextKeys.get(E.id).when)?this.appendView(E):this.disposeView(E.id)})}fillKeysInWhenExpr(E,g){this.contextKeyService.getKeysInWhen(g).forEach(y=>{E.add(y)})}};t.AccordionService=u,n.__decorate([(0,c.Autowired)(),n.__metadata("design:type",m.SplitPanelManager)],u.prototype,"splitPanelManager",void 0),n.__decorate([(0,c.Autowired)(s.AbstractMenuService),n.__metadata("design:type",s.AbstractMenuService)],u.prototype,"menuService",void 0),n.__decorate([(0,c.Autowired)(s.AbstractContextMenuService),n.__metadata("design:type",s.AbstractContextMenuService)],u.prototype,"ctxMenuService",void 0),n.__decorate([(0,c.Autowired)(s.IMenuRegistry),n.__metadata("design:type",s.IMenuRegistry)],u.prototype,"menuRegistry",void 0),n.__decorate([(0,c.Autowired)(p.CommandRegistry),n.__metadata("design:type",Object)],u.prototype,"commandRegistry",void 0),n.__decorate([(0,c.Autowired)(s.ICtxMenuRenderer),n.__metadata("design:type",s.ICtxMenuRenderer)],u.prototype,"contextMenuRenderer",void 0),n.__decorate([(0,c.Autowired)(),n.__metadata("design:type",p.ViewContextKeyRegistry)],u.prototype,"viewContextKeyRegistry",void 0),n.__decorate([(0,c.Autowired)(h.IMainLayoutService),n.__metadata("design:type",Object)],u.prototype,"mainLayoutService",void 0),n.__decorate([(0,c.Autowired)(p.IContextKeyService),n.__metadata("design:type",Object)],u.prototype,"contextKeyService",void 0),n.__decorate([(0,c.Autowired)(_.LayoutState),n.__metadata("design:type",_.LayoutState)],u.prototype,"layoutState",void 0),n.__decorate([(0,c.Autowired)(f.IProgressService),n.__metadata("design:type",Object)],u.prototype,"progressService",void 0),n.__decorate([(0,c.Autowired)(p.ILogger),n.__metadata("design:type",Object)],u.prototype,"logger",void 0),n.__decorate([(0,p.OnEvent)(p.ResizeEvent),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[p.ResizeEvent]),n.__metadata("design:returntype",void 0)],u.prototype,"onResize",null),t.AccordionService=u=n.__decorate([(0,c.Injectable)({multiple:!0}),n.__metadata("design:paramtypes",[String,Boolean])],u),t.AccordionServiceFactory=Symbol("AccordionServiceFactory")},70936:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Panel=t.AccordionContainer=void 0;const r=e(85608).__importStar(e(14041)),o=e(41869),c=e(81878),p=e(1149),v=e(43718),m=e(9522),_=e(95867),s=({alignment:a="vertical",views:h,containerId:u,headerSize:d=24,minSize:E=120,className:g,noRestore:l,style:y})=>{const b=(0,o.useInjectable)(p.LayoutViewSizeConfig),S=(0,o.useInjectable)(m.AccordionServiceFactory)(u,l),A=(0,o.useAutorun)(S.visibleViews);(0,o.useAutorun)(S.stateObservable);const w=(0,r.useMemo)(()=>d||b.accordionHeaderSizeHeight,[d]);return r.default.useEffect(()=>{if(h.length)for(const T of h)S.appendView(T)},[h]),r.default.useEffect(()=>{S.initConfig({headerSize:w,minSize:E})},[]),r.default.createElement(c.SplitPanel,{className:g,style:y,headerSize:d,dynamicTarget:!0,id:u,resizeKeep:!1,direction:a==="horizontal"?"left-to-right":"top-to-bottom"},A.map((T,D)=>{const I=S.getViewState(T.id),O=T.titleMenu||S.getSectionToolbarMenu(T.id),{collapsed:M,nextSize:R}=I;return r.default.createElement(_.AccordionSection,{noHeader:A.length===1,onItemClick:()=>{S.handleSectionClick(T.id,!M,D)},onContextMenuHandler:S.handleContextMenu,alignment:a,header:T.name&&(0,v.replaceLocalizePlaceholder)(T.name)||T.id,viewId:T.id,key:T.id,message:T.message,description:T.description,badge:T.badge,title:T.name,expanded:!M,accordionService:S,index:D,headerSize:d,minSize:d,initialProps:T.initialProps,titleMenu:O,titleMenuContext:T.titleMenuContext,savedSize:M?d:R,flex:T.weight||1},T.component)}))};t.AccordionContainer=s,t.AccordionContainer.displayName="AccordionContainer";const f=({children:a})=>r.default.createElement("div",null,a);t.Panel=f,t.Panel.displayName="Panel"},95867:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AccordionSection=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importDefault(e(14041)),c=e(41869),p=e(25918),v=e(93899),m=e(68969),_=e(68974),s=e(69589),f=e(52416),a=n.__importDefault(e(81388)),h={tabIndex:0},u=({header:d,description:E,message:g,headerClass:l,onItemClick:y,noHeader:b,children:S,badge:A,headerSize:w,viewId:T,initialProps:D,titleMenu:I,titleMenuContext:O,expanded:M,accordionService:R,onContextMenuHandler:P,alignment:k})=>{const F=(0,c.useInjectable)(f.IIconService),L=(0,c.useDesignStyles)(a.default.actions_wrap,"actions_wrap"),N=(0,c.useDesignStyles)(a.default.kt_split_panel,"kt_split_panel"),j=(0,c.useDesignStyles)(a.default.kt_split_panel_header,"kt_split_panel_header"),W=(0,c.useDesignStyles)(a.default.kt_split_panel_body,"kt_split_panel_body"),U=(0,c.useDesignStyles)(a.default.section_badge,"section_badge"),X=o.default.useRef(null),[V,$]=o.default.useState({header:d,description:E,message:g,badge:A});o.default.useEffect(()=>{const ne=R.onDidChangeViewTitle(({id:he,title:_e,description:q,message:Re,badge:ve})=>{let ie=!1;const fe={...V};T===he&&_e&&_e!==V.header&&(fe.header=_e,ie=!0),T===he&&ve!==V.badge&&(fe.badge=ve,ie=!0),T===he&&q&&q!==V.description&&(fe.description=q,ie=!0),T===he&&Re&&Re!==V.message&&(fe.message=Re,ie=!0),ie&&$(fe)});return()=>{ne.dispose()}},[]);const Y=o.default.useCallback(()=>{y()},[y]),G=o.default.useMemo(()=>({overflow:M?"auto":"hidden"}),[M]),H=(0,c.useViewState)(T,X,!0),Z=(0,c.useInjectable)(m.IProgressService).getIndicator(T),Q=S,oe=o.default.useMemo(()=>M?`${w}px`:k==="horizontal"?"100%":`${w}px`,[M,w,k]);return o.default.createElement("div",{className:N,"data-view-id":T,draggable:!1},!b&&o.default.createElement("div",{...h,className:(0,r.default)(j,l),onClick:Y,onContextMenu:ne=>P(ne,T),style:{height:oe,lineHeight:oe}},o.default.createElement("div",{className:a.default.label_wrap},o.default.createElement("i",{className:(0,r.default)((0,c.getIcon)("arrow-down"),a.default.arrow_icon,M?"":a.default.kt_mod_collapsed)}),o.default.createElement("div",{className:a.default.section_label,style:{lineHeight:w+"px"}},V.header),V.description&&o.default.createElement("div",{className:a.default.section_description,style:{lineHeight:w+"px"}},typeof V.description=="string"?(0,s.transformLabelWithCodicon)(V.description,{},F.fromString.bind(F)):V.description),V.badge&&o.default.createElement("div",{className:U},typeof V.badge=="string"?V.badge:V.badge.value)),M&&I&&o.default.createElement("div",{className:L},(0,v.isIMenu)(I)?o.default.createElement(p.InlineActionBar,{menus:I,context:O}):o.default.createElement(p.InlineMenuBar,{menus:I,context:O}))),o.default.createElement("div",{className:(0,r.default)([W,{[a.default.hide]:!M}]),style:G,ref:X},o.default.createElement(_.ProgressBar,{className:a.default.progressBar,progressModel:Z.progressModel}),o.default.createElement(c.ErrorBoundary,null,V.message&&o.default.createElement("div",{className:a.default.kt_split_panel_message},V.message),o.default.createElement(Q,{...D,viewState:{height:H.height-(V.message?22:0),width:H.width}}))))};t.AccordionSection=u},91527:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TitleBar=void 0;const n=e(85608),r=n.__importDefault(e(14041)),o=e(41869),c=e(752),p=n.__importDefault(e(81388));t.TitleBar=r.default.memo(v=>{const m=(0,o.useDesignStyles)(p.default.titlebar,"titlebar"),_=(0,o.useInjectable)(c.TabbarServiceFactory)(v.side),s=r.default.useCallback(a=>{v.containerId&&v.side&&_.handleDragStart(a,v.containerId)},[v.containerId,v.side,_]),f=r.default.useCallback(a=>{_.handleDragEnd(a)},[_]);return r.default.createElement("div",{className:m,style:{height:v.height}},!v.draggable&&r.default.createElement("h1",null,v.title),!!v.draggable&&r.default.createElement("h1",{draggable:!0,style:{cursor:"pointer"},onDragStart:s,onDragEnd:f},v.title),v.menubar||null)}),t.TitleBar.displayName="TitleBar"},25072:(x,t,e)=>{"use strict";var n;n={value:!0},t.s=void 0;const r=e(41869),o=e(17793);t.s={[r.SlotLocation.top]:{modules:["@opensumi/ide-menu-bar"]},[r.SlotLocation.action]:{modules:["@opensumi/ide-toolbar-action"]},[r.SlotLocation.left]:{modules:["@opensumi/ide-explorer","@opensumi/ide-search","@opensumi/ide-scm","@opensumi/ide-extension-manager","@opensumi/ide-debug","@opensumi/ide-notebook"]},[r.SlotLocation.right]:{modules:[o.DROP_RIGHT_CONTAINER]},[r.SlotLocation.main]:{modules:["@opensumi/ide-editor"]},[r.SlotLocation.bottom]:{modules:[o.DROP_BOTTOM_CONTAINER,"@opensumi/ide-terminal-next","@opensumi/ide-output","debug-console","@opensumi/ide-markers"]},[r.SlotLocation.statusBar]:{modules:["@opensumi/ide-status-bar"]},[r.SlotLocation.extra]:{modules:["breadcrumb-menu"]}}},45395:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BottomDropArea=t.RightDropArea=void 0;const n=e(85608),r=n.__importDefault(e(14041)),o=e(41869),c=e(17793),p=n.__importDefault(e(36623)),v=s=>{const{location:f}=s,a=(0,o.useInjectable)(c.IMainLayoutService),h=r.default.useCallback(u=>{var d;const E=(d=u.dataTransfer)===null||d===void 0?void 0:d.getData("containerId");a.moveContainerTo(E,f)},[a,f]);return r.default.createElement("div",{className:p.default.drop_area,onDrop:h,onDragOver:u=>{u.preventDefault()}},(0,o.localize)("main-layout.drop-area.tip"))},m=()=>r.default.createElement(v,{location:"right"});t.RightDropArea=m;const _=()=>r.default.createElement(v,{location:"bottom"});t.BottomDropArea=_},7480:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MainLayoutModule=void 0;const n=e(85608),r=e(76003),o=e(41869),c=e(17793),p=e(9522),v=e(22537),m=e(53576),_=e(752),s=e(58296);let f=class extends o.BrowserModule{constructor(){super(...arguments),this.providers=[m.MainLayoutModuleContribution,{token:c.IMainLayoutService,useClass:v.LayoutService},{token:c.IViewsRegistry,useClass:s.ViewsRegistry},{token:_.TabbarServiceFactory,useFactory:_.TabbarServiceFactoryFn},{token:p.AccordionServiceFactory,useFactory:h=>(u,d)=>h.get(c.IMainLayoutService).getAccordionService(u,d)}],this.contributionProvider=c.MainLayoutContribution}};t.MainLayoutModule=f,t.MainLayoutModule=f=n.__decorate([(0,r.Injectable)()],f)},5567:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AutoFocusedInput=void 0;const r=e(85608).__importStar(e(14041)),o=e(97267),c=e(48560),p=e(17793),v=({containerId:m,..._})=>{const s=(0,c.useInjectable)(p.IMainLayoutService),f=(0,r.useRef)(null),a=r.default.useCallback(()=>{f&&f.current&&queueMicrotask(()=>{var h;return(h=f.current)===null||h===void 0?void 0:h.focus()})},[f.current]);return(0,r.useEffect)(()=>{a();const h=s.getTabbarHandler(m),u=h?.onActivate(a);return()=>{u?.dispose()}},[s]),r.default.createElement(o.Input,{ref:f,..._})};t.AutoFocusedInput=v},22537:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LayoutService=void 0;const n=e(85608),r=n.__importDefault(e(12784)),o=e(76003),c=e(41869),p=e(81878),v=e(95416),m=e(93899),_=e(43718),s=e(52416),f=e(17793),a=e(9522),h=e(752),u=e(58999),d={[c.SlotLocation.left]:{currentId:void 0,size:void 0},[c.SlotLocation.right]:{currentId:"",size:void 0},[c.SlotLocation.bottom]:{currentId:void 0,size:void 0}};let E=class extends c.WithEventBus{constructor(){super(...arguments),this.handleMap=new Map,this.tabbarServices=new Map,this.accordionServices=new Map,this.pendingViewsMap=new Map,this.viewToContainerMap=new Map,this.disposableMap=new Map,this.state={},this.customViews=new Map,this.debug=(0,_.getDebugLogger)(),this.viewReady=new _.Deferred,this.restoreTabbarService=async l=>{var y;this.state=(0,p.fixLayout)(this.layoutState.getState(v.LAYOUT_STATE.MAIN,d));const{currentId:b,size:S}=this.state[l.location]||{};l.prevSize=S;let A=l.visibleContainers[0]&&l.visibleContainers[0].options.containerId;const w=this.appConfig.defaultPanels,T=w&&w[l.location];if(w&&T!==void 0)if(T)if(l.containersMap.has(T))A=T;else{const D=this.componentRegistry.getComponentRegistryInfo(T);D&&(!((y=this.appConfig.layoutConfig[l.location])===null||y===void 0)&&y.modules)&&~this.appConfig.layoutConfig[l.location].modules.indexOf(T)?A=D.options.containerId:this.logger.warn(`[defaultPanels] No \`${T}\` view found!`)}else A="";(0,_.isUndefined)(b)?(0,_.isUndefined)(A)?l.updateNextContainerId():l.updateCurrentContainerId(A):b&&!this.isDropContainer(b)?l.containersMap.has(b)?l.updateCurrentContainerId(b):this.findTabbarServiceByContainerId(b)?(this.moveContainerTo(b,l.location),l.updateCurrentContainerId(b)):(l.updateCurrentContainerId(A),l.updateNextContainerId(b)):(b===""||this.isDropContainer(b))&&l.updateCurrentContainerId("")},this.holdTabbarComponent=new Map,this.tabbarUpdateSet=new Set}didMount(){for(const[y,b]of this.pendingViewsMap.entries())b.forEach(({view:S,props:A})=>{this.collectViewComponent(S,y,A)});for(const y of this.contributions.getContributions())y.onDidRender&&y.onDidRender();const l=[];this.tabbarServices.forEach(y=>{c.slotRendererRegistry.isTabbar(y.location)&&y.containersMap.size>0&&l.push(y.viewReady.promise)}),Promise.all(l).then(()=>{this.viewReady.resolve()})}storeState(l,y){this.state[l.location]={currentId:y,size:l.prevSize},this.layoutState.setState(v.LAYOUT_STATE.MAIN,this.state)}onThemeChange(l){var y,b,S,A,w;const T=l.payload.theme;localStorage.setItem("theme",JSON.stringify({menuBarBackground:(y=T.getColor("kt.menubar.background"))===null||y===void 0?void 0:y.toString(),sideBarBackground:(b=T.getColor("sideBar.background"))===null||b===void 0?void 0:b.toString(),editorBackground:(S=T.getColor("editor.background"))===null||S===void 0?void 0:S.toString(),panelBackground:(A=T.getColor("panel.background"))===null||A===void 0?void 0:A.toString(),statusBarBackground:(w=T.getColor("statusBar.background"))===null||w===void 0?void 0:w.toString()}))}findTabbarServiceByContainerId(l){let y;for(const b of this.tabbarServices.values())if(b.containersMap.has(l)){y=b;break}return y}moveContainerTo(l,y){var b;const S=this.findTabbarServiceByContainerId(l);if(!S){this.logger.error(`cannot find container: ${l}`);return}const A=S.getContainer(l);if(!A){this.logger.error(`cannot find container: ${l}`);return}if(!(!((b=A.options)===null||b===void 0)&&b.draggable)){this.logger.warn(`container: ${l} is not draggable`);return}const w=this.getTabbarService(y);S.removeContainer(l),(!S.visibleContainers.length||S.currentContainerId.get()===l)&&this.toggleSlot(S.location,!1),w.dynamicAddContainer(l,A);const T=this.injector.get(u.TabBarHandler,[l,this.getTabbarService(w.location)]);this.handleMap.set(l,T)}showDropAreaForContainer(l){const y=this.findTabbarServiceByContainerId(l),b=this.tabbarServices.get("bottom"),S=this.tabbarServices.get("right");if(!y){this.logger.error(`cannot find container: ${l}`);return}y?.location==="right"&&b?.updateCurrentContainerId(f.DROP_BOTTOM_CONTAINER),y?.location==="bottom"&&S?.updateCurrentContainerId(f.DROP_RIGHT_CONTAINER)}hideDropArea(){const l=this.tabbarServices.get("bottom"),y=this.tabbarServices.get("right");l?.currentContainerId.get()===f.DROP_BOTTOM_CONTAINER&&l.updateCurrentContainerId(l.previousContainerId||""),y?.currentContainerId.get()===f.DROP_RIGHT_CONTAINER&&y.updateCurrentContainerId(y.previousContainerId||"")}isVisible(l){return!!this.getTabbarService(l).currentContainerId.get()}isViewVisible(l){const y=this.getTabbarHandler(l);if(!y||!y.isActivated())return!1;const b=y.accordionService.getViewState(l);return!b.collapsed&&!b.hidden}toggleSlot(l,y,b){var S;const A=this.getTabbarService(l);if(!A){this.debug.error(`Unable to switch panels because no TabbarService corresponding to \`${l}\` was found.`);return}y===!0?A.updateCurrentContainerId(this.findNonDropContainerId(A)):y===!1?A.updateCurrentContainerId(""):A.updateCurrentContainerId(A.currentContainerId.get()?"":this.findNonDropContainerId(A)),A.currentContainerId.get()&&b&&((S=A.resizeHandle)===null||S===void 0||S.setSize(b))}isDropContainer(l){return[f.DROP_BOTTOM_CONTAINER,f.DROP_RIGHT_CONTAINER].includes(l)}findNonDropContainerId(l){const y=l.currentContainerId.get();if(y&&!this.isDropContainer(y))return y;if(l.previousContainerId&&!this.isDropContainer(l.previousContainerId))return l.previousContainerId;for(const b of l.containersMap.keys())if(!this.isDropContainer(b))return b;return""}getTabbarService(l){const y=this.tabbarServices.get(l)||this.injector.get(h.TabbarService,[l]);if(!this.tabbarServices.get(l)){y.addDispose(y.onCurrentChange(({currentId:S})=>{if(this.storeState(y,S),this.eventBus.fire(new c.ExtensionActivateEvent({topic:"onView",data:S})),S&&f.SUPPORT_ACCORDION_LOCATION.has(y.location)){const A=this.getAccordionService(S);A?.tryUpdateResize(),A?.expandedViews.forEach(w=>{this.eventBus.fire(new c.ExtensionActivateEvent({topic:"onView",data:w.id}))})}})),y.viewReady.promise.then(()=>y.restoreState()).then(()=>this.restoreTabbarService(y)).catch(S=>{this.logger.error(`[TabbarService:${l}] restore state error`,S)});const b=(0,r.default)(()=>this.storeState(y,y.currentContainerId.get()),100);if(y.addDispose(y.onSizeChange(b)),l===c.SlotLocation.bottom){const S=(0,r.default)(()=>void this.bottomExpanded,100);y.addDispose(y.onSizeChange(()=>S))}this.tabbarServices.set(l,y)}return y}getAllAccordionService(){return this.accordionServices}getAccordionService(l,y){let b=this.accordionServices.get(l);return b||(b=this.injector.get(a.AccordionService,[l,y]),this.accordionServices.set(l,b)),b}getTabbarHandler(l){let y=this.doGetTabbarHandler(l);if(!y){const b=this.viewToContainerMap.get(l);b?y=this.doGetTabbarHandler(b||""):this.debug.warn(`${l} view tabbar not found.`)}return y}getContainer(l){for(const y of this.tabbarServices.values()){const b=y.getContainer(l);if(b)return b}}getExtraTopMenu(){return this.contextmenuService.createMenu({id:m.MenuId.ActivityBarTopExtra})}getExtraMenu(){return this.contextmenuService.createMenu({id:m.MenuId.ActivityBarExtra})}doGetTabbarHandler(l){let y=this.handleMap.get(l);if(!y){let b;for(const S of this.tabbarServices.values())if(S.getContainer(l)){b=S.location;break}b&&(y=this.injector.get(u.TabBarHandler,[l,this.getTabbarService(b)]),this.handleMap.set(l,y))}return y}collectTabbarComponent(l,y,b,S){if(S&&this.debug.warn("collectTabbarComponent api warning: Please move react component into options.component!"),y.hideIfEmpty&&!l.length&&!y.component){this.holdTabbarComponent.set(y.containerId,{views:l,options:y,side:b}),this.tabbarUpdateSet.has(y.containerId)&&this.tryUpdateTabbar(y.containerId);const w=this.getAccordionService(y.containerId);return w.addDispose(w.onBeforeAppendViewEvent(()=>{this.tryUpdateTabbar(y.containerId)})),w.addDispose(w.onAfterDisposeViewEvent(()=>{w.views.length===0&&(this.disposeContainer(y.containerId),this.holdTabbarComponent.set(y.containerId,{views:l,options:y,side:b}))})),y.containerId}return this.getTabbarService(b).registerContainer(y.containerId,{views:l,options:y}),l.forEach(w=>{this.viewToContainerMap.set(w.id,y.containerId)}),y.containerId}getViewAccordionService(l){const y=this.viewToContainerMap.get(l);if(y)return this.getAccordionService(y)}collectViewComponent(l,y,b={},S){this.customViews.set(l.id,l),this.viewToContainerMap.set(l.id,y);const A=this.getAccordionService(y);return b&&(l.initialProps=b),A.appendView(l,S?.isReplace),A.views.length===1&&(this.tabbarUpdateSet.add(y),this.tryUpdateTabbar(y)),S?.fromExtension&&this.disposableMap.set(l.id,this.commandRegistry.registerCommand({id:`${l.id}.focus`},{execute:async()=>(await this.ensureViewReady(l.id),this.commandService.executeCommand(`workbench.view.extension.${y}`,{forceShow:!0}))})),y}ensureViewReady(l){const y=this.viewToContainerMap.get(l),b=new _.Deferred,S=this.getAccordionService(y);return S.visibleViews.get().find(A=>A.id===l)?b.resolve():S.addDispose(S.onAfterAppendViewEvent(A=>{A===l&&b.resolve()})),b.promise}tryUpdateTabbar(l){const y=this.holdTabbarComponent.get(l);y&&(this.getTabbarService(y.side).registerContainer(l,{views:y.views,options:y.options}),this.tabbarUpdateSet.delete(l),this.holdTabbarComponent.delete(l))}replaceViewComponent(l,y){const b=this.viewToContainerMap.get(l.id);if(!b){this.debug.warn(`The container corresponding to \`${l.id}\` was not found, please check the incoming parameters!`);return}const S=this.customViews.get(l.id);S&&(l=Object.assign(S,l)),this.collectViewComponent(l,b,y,{isReplace:!0})}disposeViewComponent(l){const y=this.disposableMap.get(l);y&&y.dispose();const b=this.viewToContainerMap.get(l);if(!b){this.debug.warn(`The container corresponding to \`${l}\` was not found, please check the incoming parameters!`);return}this.getAccordionService(b).disposeView(l)}revealView(l){const y=this.viewToContainerMap.get(l);if(!y){this.debug.warn(`The container corresponding to \`${l}\` was not found, please check the incoming parameters!`);return}this.getAccordionService(y).revealView(l)}disposeContainer(l){let y;for(const b of this.tabbarServices.values())if(b.getContainer(l)){y=b.location;break}y?this.getTabbarService(y).disposeContainer(l):this.debug.warn(`The Tabbar to the \`${l}\` was not found.`)}expandBottom(l){const y=this.getTabbarService(c.SlotLocation.bottom);y.currentContainerId.get()||y.updateCurrentContainerId(y.currentContainerId.get()||y.previousContainerId||y.containersMap.keys().next().value),y.doExpand(l),this.contextKeyService.createKey("bottomFullExpanded",y.isExpanded)}get bottomExpanded(){const l=this.getTabbarService(c.SlotLocation.bottom);return this.contextKeyService.createKey("bottomFullExpanded",l.isExpanded),l.isExpanded}};t.LayoutService=E,n.__decorate([(0,o.Autowired)(o.INJECTOR_TOKEN),n.__metadata("design:type",o.Injector)],E.prototype,"injector",void 0),n.__decorate([(0,o.Autowired)(f.MainLayoutContribution),n.__metadata("design:type",Object)],E.prototype,"contributions",void 0),n.__decorate([(0,o.Autowired)(m.IMenuRegistry),n.__metadata("design:type",m.IMenuRegistry)],E.prototype,"menus",void 0),n.__decorate([(0,o.Autowired)(c.CommandRegistry),n.__metadata("design:type",Object)],E.prototype,"commandRegistry",void 0),n.__decorate([(0,o.Autowired)(c.CommandService),n.__metadata("design:type",Object)],E.prototype,"commandService",void 0),n.__decorate([(0,o.Autowired)(),n.__metadata("design:type",v.LayoutState)],E.prototype,"layoutState",void 0),n.__decorate([(0,o.Autowired)(c.AppConfig),n.__metadata("design:type",Object)],E.prototype,"appConfig",void 0),n.__decorate([(0,o.Autowired)(c.IContextKeyService),n.__metadata("design:type",Object)],E.prototype,"contextKeyService",void 0),n.__decorate([(0,o.Autowired)(c.ComponentRegistry),n.__metadata("design:type",Object)],E.prototype,"componentRegistry",void 0),n.__decorate([(0,o.Autowired)(c.ILogger),n.__metadata("design:type",Object)],E.prototype,"logger",void 0),n.__decorate([(0,o.Autowired)(m.AbstractMenuService),n.__metadata("design:type",m.AbstractMenuService)],E.prototype,"menuService",void 0),n.__decorate([(0,o.Autowired)(m.AbstractContextMenuService),n.__metadata("design:type",m.AbstractContextMenuService)],E.prototype,"contextmenuService",void 0),n.__decorate([(0,c.OnEvent)(s.ThemeChangedEvent),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[s.ThemeChangedEvent]),n.__metadata("design:returntype",void 0)],E.prototype,"onThemeChange",null),t.LayoutService=E=n.__decorate([(0,o.Injectable)()],E)},53576:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MainLayoutModuleContribution=t.RETRACT_BOTTOM_PANEL=t.EXPAND_BOTTOM_PANEL=t.IS_VISIBLE_RIGHT_PANEL_COMMAND=t.IS_VISIBLE_LEFT_PANEL_COMMAND=t.IS_VISIBLE_BOTTOM_PANEL_COMMAND=t.TOGGLE_BOTTOM_PANEL_COMMAND=t.SHOW_BOTTOM_PANEL_COMMAND=t.WORKBENCH_ACTION_CLOSEPANEL=t.HIDE_BOTTOM_PANEL_COMMAND=t.TOGGLE_RIGHT_PANEL_COMMAND=t.SHOW_RIGHT_PANEL_COMMAND=t.HIDE_RIGHT_PANEL_COMMAND=t.TOGGLE_LEFT_PANEL_COMMAND=t.SHOW_LEFT_PANEL_COMMAND=t.WORKBENCH_ACTION_CLOSESIDECAR=t.HIDE_LEFT_PANEL_COMMAND=void 0;const n=e(85608),r=e(76003),o=e(41869),c=e(30144),p=e(68456),v=e(95416),m=e(93899),_=e(43718),s=e(92323),f=e(17793),a=e(45395),h=e(68988),u=e(19951);t.HIDE_LEFT_PANEL_COMMAND={id:"main-layout.left-panel.hide",label:"%main-layout.left-panel.hide%"},t.WORKBENCH_ACTION_CLOSESIDECAR={id:"workbench.action.closeSidebar",label:"%main-layout.sidebar.hide%"},t.SHOW_LEFT_PANEL_COMMAND={id:"main-layout.left-panel.show",label:"%main-layout.left-panel.show%"},t.TOGGLE_LEFT_PANEL_COMMAND={id:"main-layout.left-panel.toggle",label:"%main-layout.left-panel.toggle%"},t.HIDE_RIGHT_PANEL_COMMAND={id:"main-layout.right-panel.hide",label:"%main-layout.right-panel.hide%"},t.SHOW_RIGHT_PANEL_COMMAND={id:"main-layout.right-panel.show",label:"%main-layout.right-panel.show%"},t.TOGGLE_RIGHT_PANEL_COMMAND={id:"main-layout.right-panel.toggle",label:"%main-layout.right-panel.toggle%"},t.HIDE_BOTTOM_PANEL_COMMAND={id:"main-layout.bottom-panel.hide",label:"%main-layout.bottom-panel.hide%"},t.WORKBENCH_ACTION_CLOSEPANEL={id:"workbench.action.closePanel",delegate:t.HIDE_BOTTOM_PANEL_COMMAND.id},t.SHOW_BOTTOM_PANEL_COMMAND={id:"main-layout.bottom-panel.show",label:"%main-layout.bottom-panel.show%"},t.TOGGLE_BOTTOM_PANEL_COMMAND={id:"main-layout.bottom-panel.toggle",iconClass:(0,o.getIcon)("minus"),label:"%layout.tabbar.toggle%"},t.IS_VISIBLE_BOTTOM_PANEL_COMMAND={id:"main-layout.bottom-panel.is-visible"},t.IS_VISIBLE_LEFT_PANEL_COMMAND={id:"main-layout.left-panel.is-visible"},t.IS_VISIBLE_RIGHT_PANEL_COMMAND={id:"main-layout.right-panel.is-visible"},t.EXPAND_BOTTOM_PANEL={id:"main-layout.bottom-panel.expand",label:"%layout.tabbar.expand%",iconClass:(0,o.getIcon)("expand")},t.RETRACT_BOTTOM_PANEL={id:"main-layout.bottom-panel.retract",label:"%layout.tabbar.retract%",iconClass:(0,o.getIcon)("shrink")};let d=class extends _.WithEventBus{async initialize(){await this.layoutState.initStorage();const g=this.contributionProvider.getContributions();for(const b of g)b.registerComponent&&b.registerComponent(this.componentRegistry);const l=this.rendererContributionProvider.getContributions();for(const b of l)b.registerRenderer&&b.registerRenderer(o.slotRendererRegistry);const y=this.toolBarContributionProvider.getContributions();for(const b of y)b.registerToolbarItems&&b.registerToolbarItems(this.toolBarRegistry)}registerComponent(g){g.register(f.DROP_RIGHT_CONTAINER,[],{component:a.RightDropArea,hideTab:!0,containerId:f.DROP_RIGHT_CONTAINER}),g.register(f.DROP_BOTTOM_CONTAINER,[],{component:a.BottomDropArea,hideTab:!0,containerId:f.DROP_BOTTOM_CONTAINER})}async onStart(){this.registerSideToggleKey()}async onDidStart(){this.mainLayoutService.didMount()}registerRenderer(g){g.registerSlotRenderer(o.SlotLocation.right,u.RightTabRenderer),g.registerSlotRenderer(o.SlotLocation.left,u.LeftTabRenderer),g.registerSlotRenderer(o.SlotLocation.bottom,u.BottomTabRenderer)}registerCommands(g){g.registerCommand(t.HIDE_LEFT_PANEL_COMMAND,{execute:()=>{this.mainLayoutService.toggleSlot(o.SlotLocation.left,!1)}}),g.registerCommand(t.SHOW_LEFT_PANEL_COMMAND,{execute:l=>{this.mainLayoutService.toggleSlot(o.SlotLocation.left,!0,l)}}),g.registerCommand(t.TOGGLE_LEFT_PANEL_COMMAND,{execute:(l,y)=>{this.mainLayoutService.toggleSlot(o.SlotLocation.left,l,y)}}),g.registerCommand(t.HIDE_RIGHT_PANEL_COMMAND,{execute:()=>{this.mainLayoutService.toggleSlot(o.SlotLocation.right,!1)}}),g.registerCommand(t.SHOW_RIGHT_PANEL_COMMAND,{execute:l=>{this.mainLayoutService.toggleSlot(o.SlotLocation.right,!0,l)}}),g.registerCommand(t.TOGGLE_RIGHT_PANEL_COMMAND,{execute:(l,y)=>{this.mainLayoutService.toggleSlot(o.SlotLocation.right,l,y)}}),g.registerCommand(t.WORKBENCH_ACTION_CLOSESIDECAR,{execute:()=>Promise.all([this.mainLayoutService.toggleSlot(o.SlotLocation.left,!1),this.mainLayoutService.toggleSlot(o.SlotLocation.right,!1)])}),g.registerCommand(t.SHOW_BOTTOM_PANEL_COMMAND,{execute:()=>{this.mainLayoutService.toggleSlot(o.SlotLocation.bottom,!0)}}),g.registerCommand(t.HIDE_BOTTOM_PANEL_COMMAND,{execute:()=>{this.mainLayoutService.toggleSlot(o.SlotLocation.bottom,!1)}}),g.registerCommand(t.WORKBENCH_ACTION_CLOSEPANEL),g.registerCommand(t.IS_VISIBLE_BOTTOM_PANEL_COMMAND,{execute:()=>this.mainLayoutService.getTabbarService("bottom").currentContainerId.get()!==""}),g.registerCommand(t.IS_VISIBLE_LEFT_PANEL_COMMAND,{execute:()=>this.mainLayoutService.isVisible(o.SlotLocation.left)}),g.registerCommand(t.IS_VISIBLE_RIGHT_PANEL_COMMAND,{execute:()=>this.mainLayoutService.isVisible(o.SlotLocation.left)}),g.registerCommand({id:"view.outward.right-panel.hide"},{execute:()=>{this.commandService.executeCommand("main-layout.right-panel.toggle",!1)}}),g.registerCommand({id:"view.outward.right-panel.show"},{execute:l=>{this.commandService.executeCommand("main-layout.right-panel.toggle",!0,l)}}),g.registerCommand({id:"view.outward.left-panel.hide"},{execute:()=>{this.commandService.executeCommand("main-layout.left-panel.toggle",!1)}}),g.registerCommand({id:"view.outward.left-panel.show"},{execute:l=>{this.commandService.executeCommand("main-layout.left-panel.toggle",!0,l)}}),g.registerCommand({id:o.LAYOUT_COMMANDS.MAXIMIZE_EDITOR.id},{execute:()=>{this.commandService.executeCommand(t.TOGGLE_RIGHT_PANEL_COMMAND.id,!1),this.commandService.executeCommand(t.TOGGLE_LEFT_PANEL_COMMAND.id,!1)}}),g.registerCommand(o.LAYOUT_COMMANDS.OPEN_VIEW,{execute:()=>{this.commandService.executeCommand(o.QUICK_OPEN_COMMANDS.OPEN_VIEW.id)}})}registerMenus(g){g.registerMenuItem(m.MenuId.ActivityBarExtra,{submenu:m.MenuId.SettingsIconMenu,iconClass:(0,o.getIcon)("setting"),label:(0,_.localize)("layout.tabbar.setting"),order:1,group:"navigation"}),Object.entries({[o.SlotLocation.left]:[c.EXPLORER_CONTAINER_ID,c.SEARCH_CONTAINER_ID,c.SCM_CONTAINER_ID,c.DEBUG_CONTAINER_ID,c.EXTENSION_CONTAINER_ID],[o.SlotLocation.bottom]:[c.MARKER_CONTAINER_ID,c.OUTPUT_CONTAINER_ID,c.DEBUG_CONSOLE_CONTAINER_ID,c.TERMINAL_CONTAINER_ID]}).forEach(([l,y],b)=>{const S=this.mainLayoutService.getTabbarService(l);S.viewReady.promise.then(()=>{y.forEach(A=>{var w,T;const D=S.getContainer(A);D&&g.registerMenuItem(m.MenuId.MenubarViewMenu,{command:{id:`container.toggle.${A}`,label:(T=(w=D.options)===null||w===void 0?void 0:w.title)!==null&&T!==void 0?T:A},group:`${3+b}_${l}`})})})}),g.registerMenuItem(m.MenuId.MenubarViewMenu,{command:t.TOGGLE_LEFT_PANEL_COMMAND,group:"5_panel"}),g.registerMenuItem(m.MenuId.MenubarViewMenu,{command:t.TOGGLE_RIGHT_PANEL_COMMAND,group:"5_panel"}),g.registerMenuItem(m.MenuId.MenubarViewMenu,{command:t.TOGGLE_BOTTOM_PANEL_COMMAND,group:"5_panel"}),g.registerMenuItem(m.MenuId.MenubarViewMenu,{command:t.EXPAND_BOTTOM_PANEL,group:"5_panel",when:"!bottomFullExpanded"}),g.registerMenuItem(m.MenuId.MenubarViewMenu,{command:t.RETRACT_BOTTOM_PANEL,group:"5_panel",when:"bottomFullExpanded"}),g.registerMenuItem(m.MenuId.MenubarViewMenu,{command:{id:o.EDITOR_COMMANDS.TOGGLE_WORD_WRAP.id,label:"%preference.editor.wordWrap%"},group:"6_capability",toggledWhen:"config.editor.wordWrap == on"})}registerSideToggleKey(){this.keybindingRegistry.registerKeybinding({keybinding:"ctrlcmd+b",command:t.TOGGLE_LEFT_PANEL_COMMAND.id}),this.keybindingRegistry.registerKeybinding({keybinding:"ctrlcmd+j",command:t.TOGGLE_BOTTOM_PANEL_COMMAND.id}),this.keybindingRegistry.registerKeybinding({keybinding:"ctrlcmd+shift+j",command:t.EXPAND_BOTTOM_PANEL.id,when:"!bottomFullExpanded"}),this.keybindingRegistry.registerKeybinding({keybinding:"ctrlcmd+shift+j",command:t.RETRACT_BOTTOM_PANEL.id,when:"bottomFullExpanded"})}registerQuickOpenHandlers(g){g.registerHandler(this.quickOpenViewHandler,{title:(0,_.localize)("layout.action.openView"),commandId:o.LAYOUT_COMMANDS.QUICK_OPEN_VIEW.id,order:5,hideTab:!0})}};t.MainLayoutModuleContribution=d,n.__decorate([(0,r.Autowired)(f.IMainLayoutService),n.__metadata("design:type",Object)],d.prototype,"mainLayoutService",void 0),n.__decorate([(0,r.Autowired)(o.IContextKeyService),n.__metadata("design:type",Object)],d.prototype,"contextKeyService",void 0),n.__decorate([(0,r.Autowired)(_.IEventBus),n.__metadata("design:type",Object)],d.prototype,"eventBus",void 0),n.__decorate([(0,r.Autowired)(p.ComponentContribution),n.__metadata("design:type",Object)],d.prototype,"contributionProvider",void 0),n.__decorate([(0,r.Autowired)(o.SlotRendererContribution),n.__metadata("design:type",Object)],d.prototype,"rendererContributionProvider",void 0),n.__decorate([(0,r.Autowired)(p.ComponentRegistry),n.__metadata("design:type",Object)],d.prototype,"componentRegistry",void 0),n.__decorate([(0,r.Autowired)(s.CommandService),n.__metadata("design:type",Object)],d.prototype,"commandService",void 0),n.__decorate([(0,r.Autowired)(),n.__metadata("design:type",v.LayoutState)],d.prototype,"layoutState",void 0),n.__decorate([(0,r.Autowired)(p.TabBarToolbarContribution),n.__metadata("design:type",Object)],d.prototype,"toolBarContributionProvider",void 0),n.__decorate([(0,r.Autowired)(),n.__metadata("design:type",p.ToolbarRegistry)],d.prototype,"toolBarRegistry",void 0),n.__decorate([(0,r.Autowired)(o.KeybindingRegistry),n.__metadata("design:type",Object)],d.prototype,"keybindingRegistry",void 0),n.__decorate([(0,r.Autowired)(h.ViewQuickOpenHandler),n.__metadata("design:type",h.ViewQuickOpenHandler)],d.prototype,"quickOpenViewHandler",void 0),t.MainLayoutModuleContribution=d=n.__decorate([(0,_.Domain)(s.CommandContribution,o.ClientAppContribution,o.SlotRendererContribution,m.MenuContribution,o.QuickOpenContribution,p.ComponentContribution)],d)},68988:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ViewQuickOpenItem=t.ContainerQuickOpenItem=t.ViewQuickOpenHandler=void 0;const n=e(85608),r=e(76003),o=e(41869),c=e(74404),p=e(17793);let v=class{constructor(){this.prefix="view ",this.description=(0,o.localize)("layout.action.openView")}getModel(){return{onType:(f,a)=>a(this.getViewQuickOpenItems())}}getViewQuickOpenItems(){var f;const a=this.layoutService.getAllAccordionService(),h=Array.from(a.keys());let u=[];u=u.concat(h.map((d,E)=>this.injector.get(m,[d,{groupLabel:E===0?(0,o.localize)("layout.openView.containerTitle"):"",showBorder:!1}])));for(const d of h){const E=(f=a.get(d))===null||f===void 0?void 0:f.views;if(E)for(let g=0,l=E.length;g<l;g++)u.push(this.injector.get(_,[d,E[g],{groupLabel:g===0?(0,o.formatLocalize)("layout.openView.viewTitle",String(d).toUpperCase()):"",showBorder:!1}]))}return u}getOptions(){return{}}onClose(){}};t.ViewQuickOpenHandler=v,n.__decorate([(0,r.Autowired)(c.PrefixQuickOpenService),n.__metadata("design:type",Object)],v.prototype,"quickOpenService",void 0),n.__decorate([(0,r.Autowired)(p.IMainLayoutService),n.__metadata("design:type",Object)],v.prototype,"layoutService",void 0),n.__decorate([(0,r.Autowired)(r.INJECTOR_TOKEN),n.__metadata("design:type",r.Injector)],v.prototype,"injector",void 0),t.ViewQuickOpenHandler=v=n.__decorate([(0,r.Injectable)()],v);let m=class extends c.QuickOpenItem{constructor(f,a){super(a),this.containerId=f,this.options=a}getLabel(){return String(this.containerId).toLocaleUpperCase()}isHidden(){return super.isHidden()}run(f){if(f!==c.Mode.OPEN)return!1;const a=this.layoutService.getTabbarHandler(this.containerId);return a?.activate(),!0}};t.ContainerQuickOpenItem=m,n.__decorate([(0,r.Autowired)(p.IMainLayoutService),n.__metadata("design:type",Object)],m.prototype,"layoutService",void 0),t.ContainerQuickOpenItem=m=n.__decorate([(0,r.Injectable)({multiple:!0}),n.__metadata("design:paramtypes",[Object,Object])],m);let _=class extends c.QuickOpenItem{constructor(f,a,h){super(h),this.containerId=f,this.view=a,this.options=h}getLabel(){var f;return(f=this.view.name)===null||f===void 0?void 0:f.toUpperCase()}isHidden(){return super.isHidden()}run(f){if(f!==c.Mode.OPEN)return!1;const a=this.layoutService.getTabbarHandler(this.containerId);return a&&(a.activate(),a.isCollapsed(this.view.id)&&a?.setCollapsed(this.view.id,!1)),!0}};t.ViewQuickOpenItem=_,n.__decorate([(0,r.Autowired)(p.IMainLayoutService),n.__metadata("design:type",Object)],_.prototype,"layoutService",void 0),t.ViewQuickOpenItem=_=n.__decorate([(0,r.Injectable)({multiple:!0}),n.__metadata("design:paramtypes",[String,Object,Object])],_)},58999:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TabBarHandler=void 0;const n=e(85608),r=e(76003),o=e(43718),c=e(17793),p=e(752);let v=class{constructor(_,s){this.containerId=_,this.tabbarService=s,this.onActivateEmitter=new o.Emitter,this.onActivate=this.onActivateEmitter.event,this.onInActivateEmitter=new o.Emitter,this.onInActivate=this.onInActivateEmitter.event,this.onCollapseEmitter=new o.Emitter,this.onCollapse=this.onCollapseEmitter.event,this.isVisible=!1,this.accordionService=this.layoutService.getAccordionService(this.containerId),s.currentContainerId.get()===this.containerId&&(this.onActivateEmitter.fire(),this.isVisible=!0),this.tabbarService.onCurrentChange(f=>{f.currentId===this.containerId?(this.onActivateEmitter.fire(),this.isVisible=!0):f.previousId===this.containerId&&(this.onInActivateEmitter.fire(),this.isVisible=!1)})}dispose(){this.tabbarService.containersMap.delete(this.containerId),this.tabbarService.disposeContainer(this.containerId)}disposeView(_){this.layoutService.disposeViewComponent(_)}activate(){this.tabbarService.updateCurrentContainerId(this.containerId)}deactivate(){this.tabbarService.updateCurrentContainerId("")}isActivated(){return this.tabbarService.currentContainerId.get()===this.containerId}show(){this.tabbarService.showContainer(this.containerId)}hide(){this.tabbarService.hideContainer(this.containerId)}setTitleComponent(_,s){const f=this.tabbarService.getContainer(this.containerId);f&&f.options&&(f.options.titleProps=s,f.options.titleComponent=_,f.fireChange(f))}setSize(_){this.layoutService.toggleSlot(this.tabbarService.location,!0,_+this.tabbarService.getBarSize())}setBadge(_){this.tabbarService.updateBadge(this.containerId,_)}getBadge(){return this.tabbarService.getContainer(this.containerId).options.badge}setIconClass(_){this.tabbarService.getContainer(this.containerId).options.iconClass=_}isCollapsed(_){return this.accordionService.getViewState(_).collapsed}setCollapsed(_,s){this.accordionService.toggleOpen(_,s)}toggleViews(_,s){for(const f of _){const a=this.accordionService.getViewState(f);this.accordionService.updateViewState(f,{...a,hidden:!s})}}updateViewTitle(_,s){this.accordionService.updateViewTitle(_,s)}updateViewDescription(_,s){this.accordionService.updateViewDesciption(_,s)}updateViewMessage(_,s){this.accordionService.updateViewMessage(_,s)}updateTitle(_){this.tabbarService.updateTitle(this.containerId,_)}setResizeLock(_){this.tabbarService.resizeHandle.lockSize(_)}};t.TabBarHandler=v,n.__decorate([(0,r.Autowired)(c.IMainLayoutService),n.__metadata("design:type",Object)],v.prototype,"layoutService",void 0),t.TabBarHandler=v=n.__decorate([(0,r.Injectable)({multiple:!0}),n.__metadata("design:paramtypes",[String,p.TabbarService])],v)},46245:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ChatTabbarRenderer2=t.BottomTabbarRenderer=t.LeftTabbarRenderer=t.RightTabbarRenderer=t.TextElipses=t.IconElipses=t.TextTabView=t.IconTabView=t.TabbarViewBase=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importStar(e(14041)),c=e(97267),p=e(41869),v=e(25918),m=e(25719),_=e(63373),s=e(68969),f=e(17793),a=e(19951),h=n.__importDefault(e(5330)),u=e(752);function d(I,O){return O>=I.length?[I,[]]:O<=1?[[],I]:[I.slice(0,O-1),I.slice(O-1)]}function E(I){return typeof I=="string"?parseInt(I,10)>99?"99+":I:typeof I=="object"&&I.value?I.value>99?"99+":I.value:""}const g=I=>{var O;const{TabView:M,MoreTabView:R,forbidCollapse:P,barSize:k=48,panelBorderSize:F=0,tabClassName:L,className:N,margin:j,tabSize:W,canHideTabbar:U,renderOtherVisibleContainers:X=()=>null,disableAutoAdjust:V}=I,{side:$,direction:Y,fullSize:G}=o.default.useContext(a.TabbarConfig),H=(0,p.useInjectable)(u.TabbarServiceFactory)($),K=(0,p.useDesignStyles)(h.default.tab_bar,"tab_bar"),Z=(0,p.useDesignStyles)(h.default.bar_content,"bar_content");o.default.useEffect(()=>{H.updateBarSize(k+F)},[]);const Q=(0,p.useAutorun)(H.currentContainerId),oe=(0,p.usePreference)("workbench.hideSlotTabBarWhenHidePanel",!1),ne=U&&oe;ne&&!Q&&((O=H.resizeHandle)===null||O===void 0||O.setSize(0));const he=V?Number.MAX_SAFE_INTEGER:Math.floor(G-(j||0)/W),[_e,q]=d(H.visibleContainers.filter(ve=>{var ie;return!(!((ie=ve.options)===null||ie===void 0)&&ie.hideTab)}),he);q.forEach(ve=>{H.updateTabInMoreKey(ve.options.containerId,!0)});const Re=o.default.useCallback((ve,ie,fe,Me)=>{var Le,Ce,Se;const Ee=(Le=ve.options)===null||Le===void 0?void 0:Le.containerId;if(!Ee||Me&&(!((Se=(Ce=ve.options)===null||Ce===void 0?void 0:Ce.hideLocationTab)===null||Se===void 0)&&Se.includes(Me)))return null;ie.updateTabInMoreKey(Ee,!1);let ge;return o.default.createElement("li",{draggable:!0,onDragStart:xe=>{if(ge){const Te=ge.cloneNode(!0);Te.classList.add(h.default.dragging),L&&(0,p.addClassName)(Te,L),document.body.appendChild(Te),xe.persist(),requestAnimationFrame(()=>{xe.dataTransfer.setDragImage(Te,0,0),document.body.removeChild(Te)})}ie.handleDragStart(xe,Ee)},onDragOver:xe=>{xe.preventDefault(),ge&&ge.classList.add("on-drag-over")},onDragLeave:()=>{ge&&ge.classList.remove("on-drag-over")},onDrop:xe=>{ge&&ge.classList.remove("on-drag-over"),ie.handleDrop(xe,Ee)},onDragEnd:xe=>{ie.handleDragEnd(xe)},key:Ee,id:Ee,onContextMenu:xe=>ie.handleContextMenu(xe,Ee),onClick:xe=>ie.handleTabClick(xe,ne||P),ref:xe=>ge=xe,className:(0,r.default)({active:fe===Ee},L)},o.default.createElement(M,{component:ve}))},[]);return o.default.createElement("div",{className:(0,r.default)([K,N])},o.default.createElement("div",{className:Z,style:{flexDirection:m.Layout.getTabbarDirection(Y)}},_e.map(ve=>Re(ve,H,Q,$)),X({props:I,renderContainers:Re}),q.length?o.default.createElement("li",{key:"tab-more",onClick:ve=>{var ie;return H.showMoreMenu(ve,_e[_e.length-1]&&((ie=_e[_e.length-1].options)===null||ie===void 0?void 0:ie.containerId))},className:L},o.default.createElement(R,null)):null))};t.TabbarViewBase=g;const l=({component:I})=>{var O,M,R;const P=(0,p.useInjectable)(s.IProgressService),k=(0,p.useInjectable)(p.KeybindingRegistry),F=(0,p.useDesignStyles)(h.default.icon_tab,"icon_tab"),[L,N]=o.default.useState(I),j=P.getIndicator(((O=L.options)===null||O===void 0?void 0:O.containerId)||""),W=(0,p.useAutorun)(j.progressModel.show),U=o.default.useMemo(()=>{const X=L.options;return X?.activateKeyBinding?`${X?.title} (${k.acceleratorForKeyString(X.activateKeyBinding,"+")})`:X?.title},[L]);return(0,o.useEffect)(()=>{const X=L.onChange(V=>{N({...V})});return()=>{X.dispose()}},[L]),o.default.createElement("div",{className:F},o.default.createElement("div",{className:(0,r.default)((M=L.options)===null||M===void 0?void 0:M.iconClass,"activity-icon"),title:U}),W?o.default.createElement(c.Badge,{className:h.default.tab_badge},o.default.createElement("span",{className:h.default.icon_wrapper},o.default.createElement(c.Icon,{icon:"time-circle"}))):((R=L.options)===null||R===void 0?void 0:R.badge)&&o.default.createElement(c.Badge,{className:h.default.tab_badge},E(L.options.badge)))};t.IconTabView=l;const y=({component:I})=>{var O,M,R;const[P,k]=o.default.useState(I);return(0,o.useEffect)(()=>{const F=P.onChange(L=>{k({...L})});return()=>{F.dispose()}},[P]),o.default.createElement("div",{className:h.default.text_tab},o.default.createElement("div",{className:h.default.bottom_tab_title},(M=(O=P.options)===null||O===void 0?void 0:O.title)===null||M===void 0?void 0:M.toUpperCase()),((R=P.options)===null||R===void 0?void 0:R.badge)&&o.default.createElement(c.Badge,{className:h.default.tab_badge},E(P.options.badge)))};t.TextTabView=y;const b=()=>{const I=(0,p.useDesignStyles)(h.default.icon_tab,"icon_tab");return o.default.createElement("div",{className:I},o.default.createElement("div",{className:(0,r.default)((0,p.getIcon)("ellipsis"),"activity-icon"),title:"extra tabs"}))};t.IconElipses=b;const S=()=>o.default.createElement("div",{className:h.default.text_tab},o.default.createElement("div",{className:h.default.bottom_tab_title},o.default.createElement("i",{className:(0,p.getIcon)("doubleright")})));t.TextElipses=S;const A=I=>{const{barSize:O=48,style:M}=I,{side:R}=o.default.useContext(a.TabbarConfig),P=(0,p.useInjectable)(u.TabbarServiceFactory)(R),k=(0,p.useDesignStyles)(h.default.right_tab_bar,"right_tab_bar"),F=(0,p.useDesignStyles)(h.default.right_tab,"right_tab");return o.default.createElement("div",{id:_.VIEW_CONTAINERS.RIGHT_TABBAR,className:k,style:M,onContextMenu:P.handleContextMenu},o.default.createElement(t.TabbarViewBase,{tabSize:48,MoreTabView:t.IconElipses,tabClassName:F,TabView:t.IconTabView,barSize:O,panelBorderSize:1}))};t.RightTabbarRenderer=A;const w=({renderOtherVisibleContainers:I,isRenderExtraTopMenus:O=!0,renderExtraMenus:M,tabbarViewProps:R})=>{const{side:P}=o.default.useContext(a.TabbarConfig),k=(0,p.useInjectable)(f.IMainLayoutService),F=(0,p.useInjectable)(u.TabbarServiceFactory)(P),L=o.default.useMemo(()=>k.getExtraTopMenu(),[k]),N=o.default.useMemo(()=>k.getExtraMenu(),[k]),j=(0,p.useDesignStyles)(h.default.left_tab_bar,"left_tab_bar"),W=(0,p.useDesignStyles)(h.default.left_tab,"left_tab");return o.default.createElement("div",{id:_.VIEW_CONTAINERS.LEFT_TABBAR,className:j,onContextMenu:F.handleContextMenu},O&&o.default.createElement(v.InlineMenuBar,{className:(0,r.default)(h.default.vertical_icons,h.default.extra_top_menus),menus:L}),o.default.createElement(t.TabbarViewBase,{tabSize:48,MoreTabView:t.IconElipses,className:h.default.left_tab_content,tabClassName:W,TabView:t.IconTabView,barSize:48,margin:90,panelBorderSize:1,renderOtherVisibleContainers:I,...R}),M||o.default.createElement(v.InlineMenuBar,{className:h.default.vertical_icons,menus:N}))};t.LeftTabbarRenderer=w;const T=()=>{const{side:I}=o.default.useContext(a.TabbarConfig),O=(0,p.useInjectable)(u.TabbarServiceFactory)(I),M=(0,p.useDesignStyles)(h.default.bottom_bar_container,"bottom_bar_container"),R=(0,p.useDesignStyles)(h.default.bottom_tab,"bottom_tab");return o.default.createElement("div",{id:_.VIEW_CONTAINERS.BOTTOM_TABBAR,onContextMenu:O.handleContextMenu,className:(0,r.default)(M,"next_bottom_bar")},o.default.createElement(t.TabbarViewBase,{tabSize:80,MoreTabView:t.TextElipses,tabClassName:R,TabView:t.TextTabView,barSize:24,panelBorderSize:1,canHideTabbar:!0}))};t.BottomTabbarRenderer=T;const D=I=>{const{barSize:O=32,style:M}=I,{side:R}=o.default.useContext(a.TabbarConfig),P=(0,p.useInjectable)(u.TabbarServiceFactory)(R);(0,o.useEffect)(()=>{P.setIsLatter(!0)},[P]);const k=(0,p.useDesignStyles)(h.default.ai_right_tab_bar,"ai_right_tab_bar"),F=(0,p.useDesignStyles)(h.default.ai_right_tab,"ai_right_tab");return o.default.createElement("div",{id:R,className:k,style:M,onContextMenu:P.handleContextMenu},o.default.createElement(t.TabbarViewBase,{tabSize:32,MoreTabView:t.IconElipses,tabClassName:F,TabView:t.IconTabView,barSize:O,panelBorderSize:1}))};t.ChatTabbarRenderer2=D},66368:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BottomTabPanelRenderer=t.LeftTabPanelRenderer=t.RightTabPanelRenderer=t.ContainerView=t.BaseTabPanelView=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importStar(e(14041)),c=e(76003),p=e(41869),v=e(25918),m=e(1149),_=e(68969),s=e(68974),f=e(9522),a=e(70936),h=e(91527),u=e(19951),d=n.__importDefault(e(5330)),E=e(752),g=o.default.memo(({children:I})=>I,(I,O)=>!(I.visible||O.visible)),l={display:"block"},y={display:"none"},b=I=>{const{PanelView:O,panelSize:M,id:R,PanelViewProps:P}=I,{side:k}=o.default.useContext(u.TabbarConfig),F=(0,p.useInjectable)(p.AppConfig),L=F.panelSizes&&F.panelSizes[k],N=(0,p.useInjectable)(E.TabbarServiceFactory)(k),j=(0,p.useAutorun)(N.currentContainerId),W=(0,p.useDesignStyles)(d.default.tab_panel,"tab_panel"),U=(0,p.useDesignStyles)(d.default.tab_panel_hidden,"tab_panel_hidden");return o.default.useEffect(()=>{N.updatePanelSize(L||M||335)},[]),o.default.createElement("div",{id:R,className:(0,r.default)("kt-tab-panel",W,{[U]:!j})},N.visibleContainers.map(X=>{var V;const $=(V=X.options)===null||V===void 0?void 0:V.containerId;if(!$)return null;const Y=N.getTitleToolbarMenu($);return o.default.createElement("div",{key:$,className:(0,r.default)(d.default.panel_wrap,$),"data-viewlet-id":$,style:j===$?l:y,id:R},o.default.createElement(p.ErrorBoundary,null,o.default.createElement(g,{visible:j===$},o.default.createElement(O,{titleMenu:Y,side:k,component:X,...P}))))}))};t.BaseTabPanelView=b;const S=({component:I,titleMenu:O,side:M,renderContainerWrap:R,className:P,customTitleBar:k})=>{var F,L;const N=o.default.useRef(),j=o.default.useRef(null),W=(0,p.useInjectable)(p.AppConfig),{title:U,titleComponent:X,component:V,containerId:$,draggable:Y}=I.options||{},G=(0,p.useInjectable)(c.INJECTOR_TOKEN),H=(0,p.useInjectable)(m.LayoutViewSizeConfig),K=(0,o.useCallback)(he=>{G.get(f.AccordionServiceFactory)($).handleContextMenu(he)},[$]);if(!$)return null;const Q=(0,p.useInjectable)(_.IProgressService).getIndicator($);if(!Q)return null;const oe=(0,p.useViewState)(M,j),ne=o.default.useCallback(he=>R?R({children:he}):he,[R]);return o.default.createElement("div",{ref:j,className:(0,r.default)(d.default.view_container,P)},!!k&&k,!V&&o.default.createElement("div",{onContextMenu:K,className:d.default.panel_titlebar},U?o.default.createElement(h.TitleBar,{containerId:$,side:M,title:U,draggable:Y,height:H.panelTitleBarHeight,menubar:o.default.createElement(v.InlineActionBar,{menus:O})}):null,X&&o.default.createElement("div",{className:d.default.panel_component},o.default.createElement(p.ConfigProvider,{value:W},o.default.createElement(p.ComponentRenderer,{Component:X,initialProps:(F=I.options)===null||F===void 0?void 0:F.titleProps})))),o.default.createElement("div",{className:d.default.container_wrap,ref:he=>N.current=he},o.default.createElement(s.ProgressBar,{progressModel:Q.progressModel}),ne(V?o.default.createElement(p.ConfigProvider,{value:W},o.default.createElement(p.ComponentRenderer,{initialProps:{viewState:oe,...(L=I.options)===null||L===void 0?void 0:L.initialProps},Component:V})):o.default.createElement(a.AccordionContainer,{views:I.views,minSize:I.options.miniSize,containerId:I.options.containerId}))))};t.ContainerView=S;const A=({component:I,titleMenu:O,side:M})=>{var R,P,k,F;const L=o.default.useRef(),N=o.default.useRef(null),j=(0,p.useInjectable)(p.AppConfig),W=(0,p.useInjectable)(E.TabbarServiceFactory)(M),U=(0,p.useDesignStyles)(d.default.panel_title_bar,"panel_title_bar"),X=(0,p.useDesignStyles)(d.default.panel_toolbar_container,"panel_toolbar_container"),V=(0,p.useViewState)(M,N),$=(0,p.useInjectable)(m.LayoutViewSizeConfig),Y=(0,p.useInjectable)(_.IProgressService),{component:G,containerId:H}=I.options||{},K=I.options&&I.options.titleComponent;if(!H)return null;const Z=Y.getIndicator(H);return Z?o.default.createElement("div",{ref:N,className:d.default.panel_container},o.default.createElement("div",{className:U,style:{height:$.panelTitleBarHeight}},o.default.createElement("h1",null,(P=(R=I.options)===null||R===void 0?void 0:R.title)===null||P===void 0?void 0:P.toUpperCase()),o.default.createElement("div",{className:d.default.title_component_container},K&&o.default.createElement(p.ComponentRenderer,{Component:K,initialProps:(k=I.options)===null||k===void 0?void 0:k.titleProps})),o.default.createElement("div",{className:X},O&&o.default.createElement(v.InlineActionBar,{menus:O}),o.default.createElement(v.InlineMenuBar,{menus:W.commonTitleMenu,moreAtFirst:!0}))),o.default.createElement("div",{className:d.default.container_wrap,ref:Q=>L.current=Q},o.default.createElement(s.ProgressBar,{progressModel:Z.progressModel}),G?o.default.createElement(p.ConfigProvider,{value:j},o.default.createElement(p.ComponentRenderer,{initialProps:{viewState:V,...(F=I.options)===null||F===void 0?void 0:F.initialProps},Component:G})):o.default.createElement(a.AccordionContainer,{views:I.views,alignment:"horizontal",minSize:I.options.miniSize,containerId:I.options.containerId}))):null},w=()=>o.default.createElement(t.BaseTabPanelView,{PanelView:t.ContainerView});t.RightTabPanelRenderer=w;const T=()=>o.default.createElement(t.BaseTabPanelView,{PanelView:t.ContainerView});t.LeftTabPanelRenderer=T;const D=()=>o.default.createElement(t.BaseTabPanelView,{PanelView:A,panelSize:280});t.BottomTabPanelRenderer=D},19951:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BottomTabRenderer=t.LeftTabRenderer=t.RightTabRenderer=t.TabRendererBase=t.TabbarConfig=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importStar(e(14041)),c=e(41869),p=e(81878),v=e(25719),m=e(63373),_=e(46245),s=e(66368),f=n.__importDefault(e(5330)),a=e(752);t.TabbarConfig=(0,o.createContext)({side:c.SlotLocation.left,direction:"left-to-right",fullSize:0}),t.TabRendererBase=(0,o.memo)(({id:E,className:g,components:l,direction:y="left-to-right",TabbarView:b,side:S,TabpanelView:A})=>{const w=(0,c.useInjectable)(a.TabbarServiceFactory)(S),T=(0,c.useInjectable)(c.IEventBus),D=(0,o.useContext)(p.PanelContext),I=(0,o.useRef)(null),[O,M]=(0,o.useState)(0);(0,o.useLayoutEffect)(()=>{w.registerResizeHandle(D),l.forEach(P=>{w.registerContainer(P.options.containerId,P)}),w.updatePanelVisibility(),w.ensureViewReady()},[l]);const R=(0,o.useCallback)(()=>{I.current&&M(I.current[v.Layout.getDomSizeProperty(y)])},[]);return(0,o.useEffect)(()=>{c.fastdom.measure(()=>{R()});let P;T.onDirective(c.ResizeEvent.createDirective(S),()=>{P&&P.dispose(),P=c.fastdom.measureAtNextFrame(()=>{R()})})},[]),o.default.createElement("div",{ref:I,id:E,className:(0,r.default)(f.default.tab_container,g),style:{flexDirection:v.Layout.getFlexDirection(y)}},o.default.createElement(t.TabbarConfig.Provider,{value:{side:S,direction:y,fullSize:O}},o.default.createElement(b,null),o.default.createElement(A,null)))});const h=({className:E,components:g,tabbarView:l,tabpanelView:y})=>o.default.createElement(t.TabRendererBase,{side:c.SlotLocation.right,direction:"right-to-left",id:m.VIEW_CONTAINERS.RIGHT_TABBAR_PANEL,className:(0,r.default)(E,"right-slot"),components:g,TabbarView:l??_.RightTabbarRenderer,TabpanelView:y??s.RightTabPanelRenderer});t.RightTabRenderer=h;const u=({className:E,components:g,tabbarView:l})=>o.default.createElement(t.TabRendererBase,{side:c.SlotLocation.left,direction:"left-to-right",id:m.VIEW_CONTAINERS.LEFT_TABBAR_PANEL,className:(0,r.default)(E,"left-slot"),components:g,TabbarView:l??_.LeftTabbarRenderer,TabpanelView:s.LeftTabPanelRenderer});t.LeftTabRenderer=u;const d=({className:E,components:g,tabbarView:l})=>o.default.createElement(t.TabRendererBase,{side:c.SlotLocation.bottom,id:m.VIEW_CONTAINERS.BOTTOM_TABBAR_PANEL,direction:"bottom-to-top",className:(0,r.default)(E,"bottom-slot"),components:g,TabbarView:l??_.BottomTabbarRenderer,TabpanelView:s.BottomTabPanelRenderer});t.BottomTabRenderer=d},752:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TabbarService=t.TabbarServiceFactoryFn=t.TabbarServiceFactory=void 0;const n=e(85608),r=n.__importDefault(e(12784)),o=e(76003),c=e(41869),p=e(30144),v=e(95416),m=e(93899),_=e(68969),s=e(28423),f=e(17793),a=e(53576);t.TabbarServiceFactory=Symbol("TabbarServiceFactory");const h=g=>l=>g.get(f.IMainLayoutService).getTabbarService(l);t.TabbarServiceFactoryFn=h;const u={left:"view",right:"extendView",bottom:"panel"},d=void 0;let E=class extends c.WithEventBus{constructor(l){super(),this.location=l,this.doChangeViewEmitter=new c.Emitter,this.shouldChangeView=(0,s.observableFromEventOpts)({owner:this,equalsFn:()=>!1},this.doChangeViewEmitter.event,()=>{}),this.containerIdObs=(0,s.observableValue)(this,d),this.currentContainerId=(0,s.derivedOpts)({owner:this,equalsFn:()=>!1},y=>(this.shouldChangeView.read(y),this.containerIdObs.read(y))),this.nextContainerId="",this.useFirstContainerId=!1,this.previousContainerId=void 0,this.containersMap=new Map,this.viewReady=new c.Deferred,this.state=new Map,this.storedState={},this.accordionRestored=new Set,this.onCurrentChangeEmitter=new c.Emitter,this.onCurrentChange=this.onCurrentChangeEmitter.event,this.onSizeChangeEmitter=new c.Emitter,this.onSizeChange=this.onSizeChangeEmitter.event,this.menuId=`tabbar/${this.location}`,this.moreMenuId=`tabbar/${this.location}/more`,this.sortedContainers=[],this.disposableMap=new Map,this.tabInMoreKeyMap=new Map,this.shouldWaitForViewRender=!1,this.onDidRegisterContainerEmitter=new c.Emitter,this.isEmptyTabbar=!0,this.updatePanel=(0,r.default)(y=>{this.resizeHandle&&this.resizeHandle.hidePanel(y)},60),this._menuMap=new Map,this.setIsLatter(l===c.SlotLocation.right||l===c.SlotLocation.bottom),this.scopedCtxKeyService=this.contextKeyService.createScoped(),this.scopedCtxKeyService.createKey("triggerWithTab",!0),this.menuRegistry.registerMenuItem(this.menuId,{command:{id:this.registerGlobalToggleCommand(),label:(0,c.localize)("layout.tabbar.toggle")},group:"0_global",when:"triggerWithTab == true"}),this.activatedKey=this.contextKeyService.createKey((0,c.getTabbarCtxKey)(this.location),""),this.location==="bottom"&&(this.registerPanelCommands(),this.registerPanelMenus()),this.eventBus.onDirective(c.ResizeEvent.createDirective(this.location),()=>{this.onResize()})}get onDidRegisterContainer(){return this.onDidRegisterContainerEmitter.event}setIsLatter(l){this.isLatter=l}updateNextContainerId(l){(0,c.isUndefined)(l)?this.useFirstContainerId=!0:this.nextContainerId=l}updateCurrentContainerId(l){(0,s.transaction)(y=>{this.containerIdObs.set(l,y)})}updateBadge(l,y){const b=this.getContainer(l);b&&b.options&&(b.options.badge=y),b?.fireChange(b)}registerPanelCommands(){this.commandRegistry.registerCommand(a.EXPAND_BOTTOM_PANEL,{execute:()=>{this.layoutService.expandBottom(!0)}}),this.commandRegistry.registerCommand(a.RETRACT_BOTTOM_PANEL,{execute:()=>{this.layoutService.expandBottom(!1)}}),this.commandRegistry.registerCommand(a.TOGGLE_BOTTOM_PANEL_COMMAND,{execute:(l,y)=>{this.layoutService.toggleSlot(c.SlotLocation.bottom,l,y)}})}getContainerState(l){return this.state.get(l)}hideContainer(l){const y=this.state.get(l);y&&(y.hidden=!0)}showContainer(l){const y=this.state.get(l);y&&(y.hidden=!1)}updatePanelVisibility(l){l===void 0&&(l=this.containersMap.size>0),this.updatePanel(l)}ensureViewReady(){(0,c.isDefined)(this.barSize)&&(0,c.isDefined)(this.panelSize)?this.resolveViewReady():this.shouldWaitForViewRender=!0}updatePanelSize(l){this.panelSize=l,(0,c.isDefined)(this.barSize)&&this.shouldWaitForViewRender&&this.resolveViewReady()}updateBarSize(l){this.barSize=l,(0,c.isDefined)(this.panelSize)&&this.shouldWaitForViewRender&&this.resolveViewReady()}resolveViewReady(){this.isEmptyTabbar?c.Event.once(this.onDidRegisterContainer)(()=>{this.viewReady.resolve()}):this.viewReady.resolve()}getBarSize(){return this.barSize}updateTabInMoreKey(l,y){const b=this.tabInMoreKeyMap.get(l);b&&b.set(y)}get visibleContainers(){const l=[];return this.containersMap.forEach(y=>{const b=y.options&&this.state.get(y.options.containerId);(!b||!b.hidden)&&l.push(y)}),l.sort((y,b)=>this.getContainerState(y.options.containerId).priority-this.getContainerState(b.options.containerId).priority)}registerResizeHandle(l){const{setSize:y,setRelativeSize:b,getSize:S,getRelativeSize:A,lockSize:w,setMaxSize:T,hidePanel:D}=l;return this.resizeHandle={setSize:I=>y(I,this.isLatter),setRelativeSize:(I,O)=>b(I,O,this.isLatter),getSize:()=>S(this.isLatter),getRelativeSize:()=>A(this.isLatter),setMaxSize:I=>T(I,this.isLatter),lockSize:I=>w(I,this.isLatter),hidePanel:I=>D(I)},this.listenCurrentChange()}registerContainer(l,y){var b;if(this.containersMap.has(l))return;this.useFirstContainerId&&(this.useFirstContainerId=!1,this.updateCurrentContainerId(l)),this.nextContainerId===l&&this.updateCurrentContainerId(l);const S=new c.DisposableCollection,A=y.options||{containerId:l};y.options=A;const w=new c.Emitter;this.containersMap.set(l,{fireChange:D=>w.fire(D),onChange:w.event,views:y.views,options:A}),S.push({dispose:()=>{this.containersMap.delete(l),this.state.delete(l)}}),this.updatePanelVisibility(this.containersMap.size>0);let T=this.sortedContainers.findIndex(D=>{var I,O;return(((I=D.options)===null||I===void 0?void 0:I.priority)||1)<=(((O=y.options)===null||O===void 0?void 0:O.priority)||1)});T===-1&&(T=this.sortedContainers.length),this.sortedContainers.splice(T,0,y);for(let D=T;D<this.sortedContainers.length;D++){const O=(b=this.sortedContainers[D].options)===null||b===void 0?void 0:b.containerId;if(O){const M=this.storedState[O]||this.getContainerState(O)||{};this.state.set(O,{hidden:M.hidden,priority:D})}}S.push(this.registerSideEffects(y)),this.eventBus.fire(new f.TabBarRegistrationEvent({tabBarId:l})),l===this.currentContainerId.get()&&this.handleChange(l,""),this.viewContextKeyRegistry.registerContextKeyService(l,this.contextKeyService.createScoped()).createKey("view",l),this.isEmptyTabbar&&(this.isEmptyTabbar=!1),this.disposableMap.set(l,S),this.onDidRegisterContainerEmitter.fire(l)}registerSideEffects(l){var y;const b=new c.DisposableCollection;!((y=l.options)===null||y===void 0)&&y.hideTab||(b.push(this.registerHideMenu(l)),b.push(this.registerMoreMenu(l))),b.push(this.registerActivateKeyBinding(l,l.options.fromExtension));const S=this.contextKeyService.createKey(`workbench.${u[this.location]||"view"}.${l.options.containerId}`,!0);return b.push({dispose:()=>{S.set(!1)}}),b.push(this.progressService.registerProgressIndicator(l.options.containerId)),b.push(this.registerContainerPanelRelatedCommand(l)),b}registerContainerPanelRelatedCommand(l){var y,b,S,A,w;const T=new c.DisposableCollection,D=(y=l.options)===null||y===void 0?void 0:y.containerId;return T.push(this.commandRegistry.registerCommand({id:"container.show."+D,label:(0,c.formatLocalize)("view.command.show",(S=(b=l.options)===null||b===void 0?void 0:b.title)!==null&&S!==void 0?S:D),labelLocalized:(0,c.createFormatLocalizedStr)("view.command.show",(w=(A=l.options)===null||A===void 0?void 0:A.title)!==null&&w!==void 0?w:D),category:"View"},{execute:()=>{this.updateCurrentContainerId(D)}})),T.push(this.commandRegistry.registerCommand({id:"container.hide."+D},{execute:()=>{this.updateCurrentContainerId("")}})),T.push(this.commandRegistry.registerCommand({id:"container.toggle."+D},{execute:()=>{this.currentContainerId.get()===D?this.updateCurrentContainerId(""):this.updateCurrentContainerId(D)}})),T}registerHideMenu(l){const y=new c.DisposableCollection,b=l.options.containerId;return y.push(this.menuRegistry.registerMenuItem(this.menuId,{command:{id:this.registerVisibleToggleCommand(b,y),label:l.options.title||b},group:"1_widgets"})),y}registerMoreMenu(l){const y=new c.DisposableCollection,b=l.options.containerId,S=this.scopedCtxKeyService.createKey(this.getTabInMoreCtxKey(b),!1);return this.tabInMoreKeyMap.set(b,S),y.push({dispose:()=>this.tabInMoreKeyMap.delete(b)}),y.push(this.menuRegistry.registerMenuItem(this.moreMenuId,{command:{id:this.registerMoreToggleCommand(l,y),label:l.options.title||b},group:"inline",when:`${this.getTabInMoreCtxKey(b)} == true`,toggledWhen:`${(0,c.getTabbarCtxKey)(this.location)} == ${b}`,iconClass:l.options.iconClass})),y}disposeContainer(l){var y;const b=this.disposableMap.get(l);b&&b.dispose(),this.currentContainerId.get()===l&&this.updateCurrentContainerId(((y=this.visibleContainers[0].options)===null||y===void 0?void 0:y.containerId)||"")}updateTitle(l,y){const b=this.getContainer(l);b&&(b.options.title=y)}getContainer(l){return l?this.containersMap.get(l):void 0}getTitleToolbarMenu(l){const y=this._menuMap.get(l);if(y)return y;const b=this.menuService.createMenu(m.MenuId.ViewTitle,this.viewContextKeyRegistry.getContextKeyService(l));this._menuMap.set(l,b);const S=this.disposableMap.get(l),A=[b,(0,c.toDisposable)(()=>{this._menuMap.delete(l)})];return S?S.pushAll(A):this.addDispose(A),b}doExpand(l){if(this.resizeHandle){const{setRelativeSize:y}=this.resizeHandle;l?this.isLatter?y(0,1):y(1,0):y(2,1)}}get isExpanded(){if(this.resizeHandle){const{getRelativeSize:l}=this.resizeHandle,y=l().join(",");return this.isLatter?y==="0,1":y==="1,0"}return!1}handleTabClick(l,y){const b=l.currentTarget.id;b===this.currentContainerId.get()&&!y?this.updateCurrentContainerId(""):this.updateCurrentContainerId(b)}handleContextMenu(l,y){l.preventDefault(),l.stopPropagation();const b=this.menuService.createMenu(this.menuId,y?this.scopedCtxKeyService:this.contextKeyService),S=(0,m.generateCtxMenu)({menus:b,args:[{containerId:y}]});this.contextMenuRenderer.show({menuNodes:S[1],anchor:{x:l.clientX,y:l.clientY}})}showMoreMenu(l,y){const b=this.menuService.createMenu(this.moreMenuId,this.scopedCtxKeyService),S=(0,m.generateCtxMenu)({menus:b,args:[{lastContainerId:y}]});this.contextMenuRenderer.show({menuNodes:S[1],anchor:{x:l.clientX,y:l.clientY}})}handleDragStart(l,y){l.dataTransfer.setData("containerId",y),this.layoutService.showDropAreaForContainer(y)}handleDrop(l,y){if(l.dataTransfer.getData("containerId")){const b=l.dataTransfer.getData("containerId"),S=this.visibleContainers,A=S.findIndex(T=>b===T.options.containerId),w=S.findIndex(T=>y===T.options.containerId);this.doInsertTab(S,A,w),this.storeState()}}handleDragEnd(l){this.layoutService.hideDropArea()}restoreState(){this.storedState=this.layoutState.getState(v.LAYOUT_STATE.getTabbarSpace(this.location),{});for(const l of this.state.keys())this.storedState[l]&&this.state.set(l,this.storedState[l]);this.visibleContainers.forEach(l=>{f.SUPPORT_ACCORDION_LOCATION.has(this.location)&&this.tryRestoreAccordionSize(l.options.containerId)})}removeContainer(l){const y=this.disposableMap.get(l);y?.dispose(),this.updateCurrentContainerId(""),this.doChangeViewEmitter.fire()}dynamicAddContainer(l,y){this.registerContainer(l,y),this.updateCurrentContainerId(l),this.doChangeViewEmitter.fire()}doInsertTab(l,y,b){const S=this.getContainerState(l[b].options.containerId).priority,A=(T,D)=>{const I=this.getContainerState(l[T].options.containerId),O=this.getContainerState(l[D].options.containerId);I.priority=O.priority};let w;if(y>b)for(w=b;w<y;w++)A(w,w+1);else for(w=b;w>y;w--)A(w,w-1);this.getContainerState(l[w].options.containerId).priority=S,this.doChangeViewEmitter.fire()}storeState(){const l={};this.state.forEach((y,b)=>{l[b]=y}),this.layoutState.setState(v.LAYOUT_STATE.getTabbarSpace(this.location),l)}registerActivateKeyBinding(l,y){const b=l.options,S=b.containerId,A=y?`workbench.view.extension.${S}`:`workbench.view.${S}`,w=new c.DisposableCollection;return w.push(this.commandRegistry.registerCommand({id:A},{execute:({forceShow:T}={})=>{this.location==="bottom"&&!T?this.updateCurrentContainerId(this.currentContainerId.get()===S?"":S):this.updateCurrentContainerId(S)}})),b.activateKeyBinding&&w.push(this.keybindingRegistry.registerKeybinding({command:A,keybinding:b.activateKeyBinding})),w}registerGlobalToggleCommand(){const l=`activity.bar.toggle.${this.location}`;return this.commandRegistry.registerCommand({id:l},{execute:({containerId:y})=>{this.doToggleTab(y)},isEnabled:()=>this.visibleContainers.length>1}),l}registerVisibleToggleCommand(l,y){const b=`activity.bar.toggle.${l}`;return y.push(this.commandRegistry.registerCommand({id:b},{execute:({forceShow:S}={})=>{this.doToggleTab(l,S)},isToggled:()=>!this.getContainerState(l).hidden,isEnabled:()=>this.getContainerState(l).hidden||this.visibleContainers.length!==1})),b}registerMoreToggleCommand(l,y){const{options:b}=l,{containerId:S}=b,A=`activity.bar.activate.more.${S}`;return y.push(this.commandRegistry.registerCommand({id:A},{execute:({lastContainerId:w})=>{if(this.updateCurrentContainerId(S),w){const T=this.getContainerState(S),D=this.getContainerState(w),I=T.priority;T.priority=D.priority,D.priority=I,this.storeState()}}})),A}getTabInMoreCtxKey(l){return`${l}.isInMore`}registerPanelMenus(){this.menuRegistry.registerMenuItems((0,m.getTabbarCommonMenuId)("bottom"),[{command:a.EXPAND_BOTTOM_PANEL.id,group:"navigation",when:"!bottomFullExpanded",order:1},{command:a.RETRACT_BOTTOM_PANEL.id,group:"navigation",when:"bottomFullExpanded",order:1},{command:a.TOGGLE_BOTTOM_PANEL_COMMAND.id,group:"navigation",order:2}]),this.commonTitleMenu=this.ctxMenuService.createMenu({id:"tabbar/bottom/common"})}doToggleTab(l,y){const b=this.getContainerState(l);y===void 0?b.hidden=!b.hidden:b.hidden=!y,b.hidden&&this.currentContainerId.get()===l&&this.updateCurrentContainerId(this.visibleContainers[0].options.containerId),this.storeState()}shouldExpand(l){const y=this.getContainer(l);return y&&y.options&&y.options.expanded}onResize(){c.fastdom.measureAtNextFrame(()=>{if(!this.currentContainerId||!this.resizeHandle)return;const l=this.resizeHandle.getSize();l!==this.barSize&&!this.shouldExpand(this.currentContainerId.get())&&(this.prevSize=l,this.onSizeChangeEmitter.fire({size:l}))})}listenCurrentChange(){return(0,s.autorunDelta)(this.currentContainerId,({lastValue:l,newValue:y})=>{this.previousContainerId=l===d?"":l,this.handleChange(y,l)})}handleChange(l,y){var b;if(!this.resizeHandle)return;const{getSize:S,setSize:A,lockSize:w}=this.resizeHandle;this.onCurrentChangeEmitter.fire({previousId:y,currentId:l});const T=this.shouldExpand(l);if(this.shouldExpand(this.previousContainerId)||T)this.handleFullExpanded(l,T);else if(l){y&&l!==y&&(this.prevSize=S());const D=this.getContainer(l);A(this.prevSize||this.panelSize+this.barSize),w(!!(!((b=D?.options)===null||b===void 0)&&b.noResize)),this.activatedKey.set(l)}else A(this.barSize),w(!0)}tryRestoreAccordionSize(l){var y,b;if(this.accordionRestored.has(l))return;const S=this.containersMap.get(l);if((!S||!((y=S.options)===null||y===void 0)&&y.component)&&((b=S?.options)===null||b===void 0?void 0:b.containerId)!==p.SCM_CONTAINER_ID)return;this.layoutService.getAccordionService(l).restoreState(),this.accordionRestored.add(l)}handleFullExpanded(l,y){if(!this.resizeHandle)return;const{setRelativeSize:b,setSize:S}=this.resizeHandle;l?y?this.isLatter?b(0,1):b(1,0):S(this.prevSize||this.panelSize+this.barSize):S(this.barSize)}};t.TabbarService=E,n.__decorate([(0,o.Autowired)(m.AbstractMenuService),n.__metadata("design:type",m.AbstractMenuService)],E.prototype,"menuService",void 0),n.__decorate([(0,o.Autowired)(m.AbstractContextMenuService),n.__metadata("design:type",m.AbstractContextMenuService)],E.prototype,"ctxMenuService",void 0),n.__decorate([(0,o.Autowired)(m.IMenuRegistry),n.__metadata("design:type",m.IMenuRegistry)],E.prototype,"menuRegistry",void 0),n.__decorate([(0,o.Autowired)(c.CommandRegistry),n.__metadata("design:type",Object)],E.prototype,"commandRegistry",void 0),n.__decorate([(0,o.Autowired)(m.ICtxMenuRenderer),n.__metadata("design:type",m.ICtxMenuRenderer)],E.prototype,"contextMenuRenderer",void 0),n.__decorate([(0,o.Autowired)(c.KeybindingRegistry),n.__metadata("design:type",Object)],E.prototype,"keybindingRegistry",void 0),n.__decorate([(0,o.Autowired)(),n.__metadata("design:type",c.ViewContextKeyRegistry)],E.prototype,"viewContextKeyRegistry",void 0),n.__decorate([(0,o.Autowired)(c.IContextKeyService),n.__metadata("design:type",Object)],E.prototype,"contextKeyService",void 0),n.__decorate([(0,o.Autowired)(f.IMainLayoutService),n.__metadata("design:type",Object)],E.prototype,"layoutService",void 0),n.__decorate([(0,o.Autowired)(),n.__metadata("design:type",v.LayoutState)],E.prototype,"layoutState",void 0),n.__decorate([(0,o.Autowired)(_.IProgressService),n.__metadata("design:type",Object)],E.prototype,"progressService",void 0),t.TabbarService=E=n.__decorate([(0,o.Injectable)({multiple:!0}),n.__metadata("design:paramtypes",[String])],E)},58296:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ViewsRegistry=t.ViewsController=t.ViewContentGroups=void 0;const n=e(85608),r=e(76003),o=e(41869),c=e(43718),p=e(17793);var v;(function(f){f.Open="2_open",f.Debug="4_debug",f.SCM="5_scm",f.More="9_more"})(v||(t.ViewContentGroups=v={}));function m(f,a){var h,u,d,E;const g=(h=f.group)!==null&&h!==void 0?h:v.More,l=(u=a.group)!==null&&u!==void 0?u:v.More;return g!==l?g.localeCompare(l):((d=f.order)!==null&&d!==void 0?d:5)-((E=a.order)!==null&&E!==void 0?E:5)}let _=class{get contents(){const a=this.items.filter(h=>h.visible);return a.length===0&&this.defaultItem?[this.defaultItem.descriptor]:a.map(h=>h.descriptor)}constructor(a){this.id=a,this._onDidChange=new o.Emitter,this.onDidChange=this._onDidChange.event,this.items=[],this.disposables=[],this.contextKeyService.onDidChangeContext(this.onDidChangeContext,this,this.disposables),o.Event.filter(this.viewsRegistry.onDidChangeViewWelcomeContent,h=>h===this.id)(this.onDidChangeViewWelcomeContent,this,this.disposables),this.onDidChangeViewWelcomeContent()}onDidChangeViewWelcomeContent(){const a=this.viewsRegistry.getViewWelcomeContent(this.id);this.items=[];for(const h of a)if(h.when==="default")this.defaultItem={descriptor:h,visible:!0};else{const u=h.when?this.contextKeyService.match(h.when):!0;this.items.push({descriptor:h,visible:u})}this._onDidChange.fire()}onDidChangeContext(){let a=!1;for(const h of this.items){if(!h.descriptor.when||h.descriptor.when==="default")continue;const u=this.contextKeyService.match(h.descriptor.when);h.visible!==u&&(h.visible=u,a=!0)}a&&this._onDidChange.fire()}dispose(){this.disposables.forEach(a=>a.dispose()),this.disposables=[]}};t.ViewsController=_,n.__decorate([(0,r.Autowired)(o.IContextKeyService),n.__metadata("design:type",Object)],_.prototype,"contextKeyService",void 0),n.__decorate([(0,r.Autowired)(p.IViewsRegistry),n.__metadata("design:type",Object)],_.prototype,"viewsRegistry",void 0),t.ViewsController=_=n.__decorate([(0,r.Injectable)({multiple:!0}),n.__metadata("design:paramtypes",[String])],_);let s=class{constructor(){this.viewWelcomeContent=new c.SetMap,this._onDidChangeViewWelcomeContent=new o.Emitter,this.onDidChangeViewWelcomeContent=this._onDidChangeViewWelcomeContent.event}registerViewWelcomeContent(a,h){return this.viewWelcomeContent.add(a,h),this._onDidChangeViewWelcomeContent.fire(a),{dispose:()=>{this.viewWelcomeContent.delete(a,h),this._onDidChangeViewWelcomeContent.fire(a)}}}registerViewWelcomeContent2(a,h){const u=new Map;for(const[d,E]of h)this.viewWelcomeContent.add(a,E),u.set(d,(0,o.toDisposable)(()=>{this.viewWelcomeContent.delete(a,E),this._onDidChangeViewWelcomeContent.fire(a)}));return this._onDidChangeViewWelcomeContent.fire(a),u}getViewWelcomeContent(a){const h=[];return this.viewWelcomeContent.forEach(a,u=>h.push(u)),h.sort(m),h}};t.ViewsRegistry=s,t.ViewsRegistry=s=n.__decorate([(0,r.Injectable)()],s)},24429:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WelcomeView=t.CSSIcon=void 0,t.renderLabelWithIcons=a;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importDefault(e(14041)),c=e(48412),p=e(41869),v=e(43718),m=n.__importDefault(e(81388)),_=e(58296);var s;(function(d){d.iconNameSegment="[A-Za-z0-9]+",d.iconNameExpression="[A-Za-z0-9\\-]+",d.iconModifierExpression="~[A-Za-z]+"})(s||(t.CSSIcon=s={}));const f=new RegExp(`(\\\\)?\\$\\((${s.iconNameExpression}(?:${s.iconModifierExpression})?)\\)`,"g");function a(d){const E=new Array;let g,l=0,y=0;for(;(g=f.exec(d))!==null;){y=g.index||0,E.push(d.substring(l,y)),l=(g.index||0)+g[0].length;const[,b,S]=g;E.push(b?`$(${S})`:o.default.createElement("span",{className:(0,p.getExternalIcon)(S)}))}return l<d.length&&E.push(d.substring(l)),E}const h=d=>{const{contents:E}=d,[g,l]=o.default.useState(E.map(S=>S.precondition?!1:null)),y=(0,p.useInjectable)(p.IContextKeyService),b=(0,p.useInjectable)(p.IOpenerService);return o.default.useEffect(()=>{const S=E.map(w=>{if(w.precondition){const T=new Set;return w.precondition.keys().forEach(D=>T.add(D)),T}return null}),A=y.onDidChangeContext(w=>{S.forEach((T,D)=>{T&&w.payload.affectsSome(T)&&l(g.map((I,O)=>O===D?y.match(E[D].precondition):I))})});return()=>A.dispose()},[E]),E.length===0?null:o.default.createElement(o.default.Fragment,null,E.map(({content:S,precondition:A},w)=>{const T=S.split(`
30698
30680
  `),D=[];for(let I of T){if(I=I.trim(),!I)continue;const O=(0,v.parseLinkedText)(I);if(O.nodes.length===1&&typeof O.nodes[0]!="string"){const M=O.nodes[0];D.push(o.default.createElement("div",{key:D.length,title:M.title,className:"button-container"},o.default.createElement(c.Button,{disabled:g[w]===!1,onClick:()=>b.open(M.href)},a(M.label))))}else{const M=O.nodes.map((R,P)=>typeof R=="string"?R:o.default.createElement("a",{key:P,className:(0,r.default)({disabled:R.href.startsWith("command:")&&g[w]===!1}),title:R.title,onClick:()=>b.open(R.href)},R.label));D.push(o.default.createElement("p",{key:D.length},M))}}return o.default.createElement(o.default.Fragment,{key:w},D)}))};function u(d,E){return d.viewId===E.viewId}t.WelcomeView=o.default.memo(d=>{const E=(0,p.useInjectable)(_.ViewsController,[d.viewId]),[g,l]=o.default.useState(E.contents);return o.default.useEffect(()=>{E.onDidChange(()=>{const y=E.contents;l(y)})},[]),g.length?o.default.createElement("div",{className:m.default.welcome},o.default.createElement(h,{contents:g})):null},u)},17793:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),e(85608).__exportStar(e(72260),t)},72260:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DROP_RIGHT_CONTAINER=t.DROP_BOTTOM_CONTAINER=t.SUPPORT_ACCORDION_LOCATION=t.ViewCollapseChangedEvent=t.IViewsRegistry=t.TabBarRegistrationEvent=t.MainLayoutContribution=t.IMainLayoutService=void 0;const n=e(41869);t.IMainLayoutService=Symbol("IMainLayoutService"),t.MainLayoutContribution=Symbol("MainLayoutContribution");class r extends n.BasicEvent{}t.TabBarRegistrationEvent=r,t.IViewsRegistry=Symbol("IViewsRegistry");class o extends n.BasicEvent{}t.ViewCollapseChangedEvent=o,t.SUPPORT_ACCORDION_LOCATION=new Set([n.SlotLocation.left,n.SlotLocation.right]),t.DROP_BOTTOM_CONTAINER="drop-bottom",t.DROP_RIGHT_CONTAINER="drop-right"},63067:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),e(85608).__exportStar(e(17793),t)},93835:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EmbeddedMarkdownEditorContribution=t.MARKDOWN_EDITOR_COMPONENT_ID=void 0;const n=e(85608),r=e(76003),o=e(41869),c=e(43718),p=e(57517),v=e(21066),m=e(81001);t.MARKDOWN_EDITOR_COMPONENT_ID="MARKDOWN_EDITOR_COMPONENT_ID";let _=class{registerEditorComponent(f){f.registerEditorComponent({uid:t.MARKDOWN_EDITOR_COMPONENT_ID,component:m.MarkdownEditorComponent,scheme:c.Schemes.file}),f.registerEditorComponentResolver(c.Schemes.file,(a,h)=>{a.uri.path.ext===".md"&&h.push({type:p.EditorOpenType.component,componentId:t.MARKDOWN_EDITOR_COMPONENT_ID,title:(0,c.localize)("editorOpenType.preview"),weight:this.preferenceService.get("application.preferMarkdownPreview")?10:-1})})}};t.EmbeddedMarkdownEditorContribution=_,n.__decorate([(0,r.Autowired)(v.IMarkdownService),n.__metadata("design:type",Object)],_.prototype,"markdownService",void 0),n.__decorate([(0,r.Autowired)(o.PreferenceService),n.__metadata("design:type",Object)],_.prototype,"preferenceService",void 0),t.EmbeddedMarkdownEditorContribution=_=n.__decorate([(0,c.Domain)(p.BrowserEditorContribution)],_)},81001:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MarkdownEditorComponent=void 0;const r=e(85608).__importDefault(e(14041)),o=e(41869),c=e(57517),p=e(21066),v=({resource:m})=>{let _=null;const s=(0,o.useInjectable)(p.IMarkdownService),f=(0,o.useInjectable)(c.IEditorDocumentModelService);return r.default.useEffect(()=>{if(_){const a=new o.Disposable,h=new o.CancellationTokenSource;return a.addDispose({dispose:()=>{h.cancel()}}),f.createModelReference(m.uri,"markdown-preview").then(u=>{if(h.token.isCancellationRequested){u&&u.dispose();return}const d=new o.Emitter;a.addDispose(d),a.addDispose(u.instance.getMonacoModel().onDidChangeContent(E=>{d.fire(u.instance.getText())})),_&&s.previewMarkdownInContainer(u.instance.getText(),_,h.token,void 0,d.event).then(E=>{a.addDispose(E)}),a.addDispose(u)}),()=>{a.dispose()}}}),r.default.createElement("div",{ref:a=>{_=a},style:{height:"100%"}})};t.MarkdownEditorComponent=v},31101:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MarkdownModule=t.Markdown=void 0;const n=e(85608),r=e(76003),o=e(41869),c=e(21066),p=e(89637);var v=e(6001);Object.defineProperty(t,"Markdown",{enumerable:!0,get:function(){return v.Markdown}});let m=class extends o.BrowserModule{constructor(){super(...arguments),this.providers=[{token:c.IMarkdownService,useClass:p.MarkdownServiceImpl}]}};t.MarkdownModule=m,t.MarkdownModule=m=n.__decorate([(0,r.Injectable)()],m)},86422:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.markdownCss=void 0,t.markdownCss=`
30699
30681
  /*---------------------------------------------------------------------------------------------