@arcgis/coding-components 5.2.0-next.167 → 5.2.0-next.169

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (120) hide show
  1. package/dist/cdn/{ICZLA3WA.js → 34EWGQPV.js} +1 -1
  2. package/dist/cdn/{ZIITPBDA.js → 34TSZS43.js} +1 -1
  3. package/dist/cdn/{DSXNVNHP.js → 3OAWZW4F.js} +1 -1
  4. package/dist/cdn/{ZB5LSQCI.js → 3U55EX3T.js} +1 -1
  5. package/dist/cdn/{ZGH54UQL.js → 74OYE6PB.js} +1 -1
  6. package/dist/cdn/{XUZCSIWL.js → 76MS6CAQ.js} +1 -1
  7. package/dist/cdn/{MZWBKK5Y.js → 77OYUJT2.js} +1 -1
  8. package/dist/cdn/{OKTFDNZ2.js → 7JQDSPCS.js} +1 -1
  9. package/dist/cdn/{XSALNSP4.js → ACR7EVDI.js} +1 -1
  10. package/dist/cdn/{Q2IQGLDP.js → AXZZAVBS.js} +1 -1
  11. package/dist/cdn/{FRKDR2KF.js → BFVDB5XR.js} +1 -1
  12. package/dist/cdn/{R76GXHRC.js → BIQFJAIB.js} +1 -1
  13. package/dist/cdn/{343T5YIT.js → BRCKXXRS.js} +1 -1
  14. package/dist/cdn/{6HKTUV2Z.js → CCFLMTMX.js} +1 -1
  15. package/dist/cdn/{5RPCFVLT.js → DDKEO4HS.js} +1 -1
  16. package/dist/cdn/{AI6346MJ.js → DS5TUTYK.js} +1 -1
  17. package/dist/cdn/{2PZP3YWM.js → EP6YZYCB.js} +1 -1
  18. package/dist/cdn/{N634TYFB.js → EZG7Y5JB.js} +1 -1
  19. package/dist/cdn/{KFZFVK3W.js → EZKZF6KF.js} +1 -1
  20. package/dist/cdn/{Y2QWXLND.js → G4FDMPRS.js} +1 -1
  21. package/dist/cdn/{LR6MY66N.js → GWT7AUDM.js} +1 -1
  22. package/dist/cdn/{DITC5ENP.js → HGV6BPI5.js} +1 -1
  23. package/dist/cdn/{BZOKP5WV.js → ISYXSHBM.js} +1 -1
  24. package/dist/cdn/{SP2OSSVP.js → IV24OPHV.js} +1 -1
  25. package/dist/cdn/{XECHDNHQ.js → IXTESN6N.js} +1 -1
  26. package/dist/cdn/{JZKEFFFC.js → J2RXKIUM.js} +1 -1
  27. package/dist/cdn/{ERQORLO4.js → J4VKGPN5.js} +1 -1
  28. package/dist/cdn/{YG3C4FVJ.js → MDWTMNUQ.js} +1 -1
  29. package/dist/cdn/{IYMFIRFN.js → N2CCJHDW.js} +1 -1
  30. package/dist/cdn/{7GHWHRX7.js → NEARDHIR.js} +1 -1
  31. package/dist/cdn/{P47PXEKU.js → NL3OBQ2C.js} +1 -1
  32. package/dist/cdn/{WIHDJPF7.js → OBDLJIV5.js} +1 -1
  33. package/dist/cdn/{DU7A4ZDN.js → PBAP6FDD.js} +1 -1
  34. package/dist/cdn/{3G26WBEK.js → PP3QOCFN.js} +1 -1
  35. package/dist/cdn/QS5Z7OZW.js +2 -0
  36. package/dist/cdn/{OQWIORYX.js → RQZ22N2G.js} +1 -1
  37. package/dist/cdn/{UHQN4ZKV.js → SWI7PNKG.js} +1 -1
  38. package/dist/cdn/{XCISKBJD.js → TJM6I22B.js} +156 -156
  39. package/dist/cdn/{VIZVZU37.js → UOZYXOKI.js} +1 -1
  40. package/dist/cdn/{7IJT3Z4F.js → VESGBCGZ.js} +1 -1
  41. package/dist/cdn/{P5SQNRDH.js → VP2JFM7V.js} +1 -1
  42. package/dist/cdn/{NKGAHXNJ.js → VWOHL265.js} +2 -2
  43. package/dist/cdn/{XWEX2VS6.js → WUGYEHHP.js} +1 -1
  44. package/dist/cdn/{G3MI3R7J.js → YIE6WY6W.js} +1 -1
  45. package/dist/cdn/index.js +1 -1
  46. package/dist/docs/api.json +1 -1
  47. package/dist/docs/docs.json +1 -1
  48. package/dist/docs/web-types.json +1 -1
  49. package/package.json +7 -7
  50. package/dist/cdn/PY2Q5GGO.js +0 -2
  51. /package/dist/cdn/{XVT2TWEJ.js → 23DVPWAF.js} +0 -0
  52. /package/dist/cdn/{R7SJNYNM.js → 333GPV3E.js} +0 -0
  53. /package/dist/cdn/{WMQL7T43.js → 3ASMBPWO.js} +0 -0
  54. /package/dist/cdn/{EQKJWVNG.js → 3GWZGNSY.js} +0 -0
  55. /package/dist/cdn/{FH5UYXIE.js → 3XF7REYP.js} +0 -0
  56. /package/dist/cdn/{KSYZD77O.js → 4MU4HK7A.js} +0 -0
  57. /package/dist/cdn/{HZSPZILM.js → 4VRSQEJC.js} +0 -0
  58. /package/dist/cdn/{ABZ7ZFXX.js → 52ORQXSD.js} +0 -0
  59. /package/dist/cdn/{GWJWZDBK.js → 5A5AKOGC.js} +0 -0
  60. /package/dist/cdn/{JW63G7JR.js → 76EXQ4YX.js} +0 -0
  61. /package/dist/cdn/{5YEMW2UC.js → 7YGREJWE.js} +0 -0
  62. /package/dist/cdn/{TUPOE2CF.js → ATD3U5SR.js} +0 -0
  63. /package/dist/cdn/{ZQZRAXQ5.js → BDO3R7T6.js} +0 -0
  64. /package/dist/cdn/{2AXSYZEN.js → BHRJKG5R.js} +0 -0
  65. /package/dist/cdn/{J72JBXLX.js → BSRXCDXM.js} +0 -0
  66. /package/dist/cdn/{MB3H26SY.js → CJG4K2MG.js} +0 -0
  67. /package/dist/cdn/{36W5RXLG.js → DAG56VF5.js} +0 -0
  68. /package/dist/cdn/{IF6VZF56.js → EHLSU2ST.js} +0 -0
  69. /package/dist/cdn/{NGWNHRDV.js → F3MES7GH.js} +0 -0
  70. /package/dist/cdn/{AGJJ7FJX.js → F44PDMCA.js} +0 -0
  71. /package/dist/cdn/{QDUPWXLI.js → FTSH7JER.js} +0 -0
  72. /package/dist/cdn/{QZ5SQVOZ.js → FVRJ4AYK.js} +0 -0
  73. /package/dist/cdn/{CJ2MVXSJ.js → G2GFCS3W.js} +0 -0
  74. /package/dist/cdn/{GLWUBI25.js → GANW5RYB.js} +0 -0
  75. /package/dist/cdn/{CVJM5DJ5.js → GIYGJ64U.js} +0 -0
  76. /package/dist/cdn/{S5T6XTRV.js → H3IXEO6N.js} +0 -0
  77. /package/dist/cdn/{NQOXXF5T.js → H3TXM4DW.js} +0 -0
  78. /package/dist/cdn/{KSNDH6NJ.js → H6RGYVLN.js} +0 -0
  79. /package/dist/cdn/{YCBGCWWV.js → HNAAZG5U.js} +0 -0
  80. /package/dist/cdn/{UXE4ASGX.js → HQDYNNC7.js} +0 -0
  81. /package/dist/cdn/{HUTT2UBA.js → I6Q76IZP.js} +0 -0
  82. /package/dist/cdn/{5EIPVOGO.js → IAAVG7CW.js} +0 -0
  83. /package/dist/cdn/{FGO22NCZ.js → IC4NXMDA.js} +0 -0
  84. /package/dist/cdn/{D4TRKALK.js → IP2DOCJQ.js} +0 -0
  85. /package/dist/cdn/{PTLGMSM7.js → ISVUIPQP.js} +0 -0
  86. /package/dist/cdn/{UF7HDQEU.js → KYI43I3Q.js} +0 -0
  87. /package/dist/cdn/{NFD5QRK7.js → L4I5DDWK.js} +0 -0
  88. /package/dist/cdn/{W6YYQCBS.js → LSKBKJTN.js} +0 -0
  89. /package/dist/cdn/{WBYKVSV4.js → MFORWPYX.js} +0 -0
  90. /package/dist/cdn/{HLTDO25M.js → NJFDJQMD.js} +0 -0
  91. /package/dist/cdn/{45R5XOFL.js → ON33GYRY.js} +0 -0
  92. /package/dist/cdn/{MLQTKNOS.js → ORUNRQR5.js} +0 -0
  93. /package/dist/cdn/{LDUXIRRX.js → PZJ4M7RB.js} +0 -0
  94. /package/dist/cdn/{TKZNHPOT.js → Q7ZGQ5Q6.js} +0 -0
  95. /package/dist/cdn/{H2KLFHG3.js → QX4XOQKO.js} +0 -0
  96. /package/dist/cdn/{PVTDESVT.js → R6JRY7XT.js} +0 -0
  97. /package/dist/cdn/{G3F6L5BF.js → RTKIJHE3.js} +0 -0
  98. /package/dist/cdn/{XQSXGAPV.js → RVIZJX7F.js} +0 -0
  99. /package/dist/cdn/{LW6VG5BJ.js → SB2NT46C.js} +0 -0
  100. /package/dist/cdn/{DKAMEAFP.js → SL4ZPI7B.js} +0 -0
  101. /package/dist/cdn/{GK62ODPJ.js → ST3DSX7H.js} +0 -0
  102. /package/dist/cdn/{33BRQKI6.js → SWR4KVJ4.js} +0 -0
  103. /package/dist/cdn/{QYQXVQVS.js → T5YLYXU6.js} +0 -0
  104. /package/dist/cdn/{ZRGZPKPU.js → TCCDVB5H.js} +0 -0
  105. /package/dist/cdn/{EXVPEWWR.js → TK3D66UV.js} +0 -0
  106. /package/dist/cdn/{USFPEQ7Q.js → U5MCYSK7.js} +0 -0
  107. /package/dist/cdn/{QGSV4ECO.js → UPNEA37D.js} +0 -0
  108. /package/dist/cdn/{Q42IHUZ3.js → UWISRU7P.js} +0 -0
  109. /package/dist/cdn/{BTLDXLFC.js → V7ZFG7MZ.js} +0 -0
  110. /package/dist/cdn/{FUBZOMVG.js → VDZYVILD.js} +0 -0
  111. /package/dist/cdn/{ISYMIYR5.js → VEU3J2PU.js} +0 -0
  112. /package/dist/cdn/{4YFE3KBC.js → VPB54IBA.js} +0 -0
  113. /package/dist/cdn/{UZVUXHHW.js → X543N4HW.js} +0 -0
  114. /package/dist/cdn/{WJYR4BJG.js → X5Q5B4SD.js} +0 -0
  115. /package/dist/cdn/{6VFEED45.js → XIY3IWUA.js} +0 -0
  116. /package/dist/cdn/{SIP637YL.js → XYKJUWYX.js} +0 -0
  117. /package/dist/cdn/{ML3XEYX7.js → YO3E2Z3R.js} +0 -0
  118. /package/dist/cdn/{57E5F75J.js → ZIYMW6PA.js} +0 -0
  119. /package/dist/cdn/{KKD3ZAX7.js → ZM7FHRRA.js} +0 -0
  120. /package/dist/cdn/{UYUJZDIZ.js → ZUDXZWDC.js} +0 -0
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import h from"./7VOJQ5KN.js";import{a as b}from"./IQFKIYLN.js";import e from"./CTWIEPPR.js";import d from"./NBSYRKLH.js";import"./5HKDO4SX.js";import c from"./7Z6G332Z.js";import"./MZMKV7FA.js";import a from"./ZUCC43DN.js";import{a as P}from"./CNE5ADLH.js";import{a as y}from"./HRLNAS7V.js";import{b as S,d as k}from"./C5WMGZYX.js";import"./J4I4EROF.js";import"./XEK22IDA.js";import{a as E}from"./NKGAHXNJ.js";import"./XWEX2VS6.js";import"./3G26WBEK.js";import{G as w,H as x,I as g,K as $,h as u,j as s,t as f}from"./P4SWCWOD.js";import"./BFPEJYVB.js";import{El as T}from"./XCISKBJD.js";import"./H6RQVSYM.js";export default $arcgis.t(([,{a:p},{h:h,i:L,j:z},{a:M,b:B,c:m,d:C,e:A,f:I,g:N,i:F,j:D},{a:l}])=>{var V=u`:host{--calcite-block-padding: var(--calcite-spacing-sm);--breakpoints-popover-max-height: min(14rem, 20vh);display:block;background-color:var(--calcite-color-foreground-1);color:var(--calcite-color-text-2);overflow:hidden;height:100%;.console-shell,.tabs-container,calcite-tabs{height:100%}.tabs-container{flex:1 1 auto;min-height:0;overflow:hidden}.console-shell,calcite-tabs{display:flex;flex-direction:column;min-height:0}.console-shell{container-type:size;container-name:debugger-console}calcite-tab-nav{--calcite-size-2xl: var(--calcite-space-md);justify-content:flex-start;padding-inline:var(--calcite-spacing-sm)}calcite-tab-title{font-size:var(--calcite-font-size-sm)}calcite-tab{--calcite-tab-content-block-padding: 0;--calcite-tab-content-space-y: 0;display:flex;flex-direction:column;min-height:0}calcite-tab:not([selected]){display:none}.disabled-state-text{font-size:var(--calcite-font-size-sm);color:var(--calcite-color-text-3);font-style:italic;text-align:center;display:block;padding:var(--calcite-spacing-md)}.breakpoint-header{display:flex;align-items:flex-start;gap:var(--calcite-spacing-sm);padding:var(--calcite-spacing-sm);border-bottom:1px solid var(--calcite-color-border-3);background-color:var(--calcite-color-foreground-1)}.load-action{--calcite-action-background-color: var(--calcite-color-foreground-2);--calcite-internal-action-height: 1.25rem;--calcite-internal-action-padding-block: 0;--calcite-internal-action-padding-inline: var(--calcite-spacing-xs);margin-block:var(--calcite-spacing-xxs)}.breakpoint-code-viewer{margin-block:0;width:100%}.tab-panel{display:flex;flex:1 1 auto;height:100%;min-height:0;overflow:hidden}.tab-panel>*{flex:1 1 auto;min-height:0}.tab-panel>calcite-tree{margin-inline-end:var(--calcite-space-sm);overflow-y:auto}.preview-panel{display:flex;flex:1 1 auto;min-height:0}.preview-empty-state{display:flex;align-items:center;justify-content:center;width:100%;height:100%;padding:var(--calcite-spacing-md)}.preview-table-shell{display:flex;flex-direction:column;flex:1 1 auto;width:100%;min-width:0;min-height:0;overflow:hidden}.preview-table-summary{padding:var(--calcite-spacing-sm);border-bottom:1px solid var(--calcite-color-border-3);color:var(--calcite-color-text-2);background-color:var(--calcite-color-foreground-1)}.table-scroll{overflow:auto;flex:1 1 auto;min-width:0;min-height:0;max-width:100%;background-color:var(--calcite-color-foreground-1);margin:var(--calcite-spacing-sm)}table{min-width:max-content;border-spacing:0;border-collapse:collapse;text-align:start;white-space:nowrap;thead{background-color:var(--calcite-color-foreground-2)}tr{border-top:1px solid var(--calcite-color-border-3);border-bottom:1px solid var(--calcite-color-border-3)}th,td{border-inline-start:1px solid var(--calcite-color-border-3);border-inline-end:1px solid var(--calcite-color-border-3);text-align:start;padding:var(--calcite-spacing-xxs);.string-value{white-space:pre}}th{font-weight:var(--calcite-font-weight-medium)}}.breakpoints-popover{--calcite-popover-max-size-x: min(22rem, 68vw)}.breakpoints-popover-content{max-block-size:var(--breakpoints-popover-max-height);overflow:hidden}.breakpoints-list{box-sizing:border-box;display:flex;flex-direction:column;gap:var(--calcite-spacing-xs);padding:var(--calcite-spacing-xs);min-width:min(18rem,58vw);max-block-size:var(--breakpoints-popover-max-height);overflow:auto}.breakpoints-popover .breakpoint-code-viewer{--calcite-font-size--2: var(--calcite-font-size--3);--calcite-spacing-md: var(--calcite-spacing-sm);--calcite-spacing-sm: var(--calcite-spacing-xs);--calcite-spacing-xs: var(--calcite-spacing-xxs)}.breakpoint-list-item{border:1px solid var(--calcite-color-border-3);border-radius:var(--calcite-corner-radius-sharp);background-color:var(--calcite-color-foreground-1);padding:var(--calcite-spacing-xxs)}.breakpoint-list-item--current{border-color:var(--calcite-color-brand)}.breakpoint-list-item-meta{color:var(--calcite-color-text-2);font-size:var(--calcite-font-size-xs);margin-bottom:var(--calcite-spacing-xxs)}}`,q=100,v=class extends w{constructor(){super(...arguments),this.messages=P(),this._monacoEditor=y(E),this._breakpointPopoverId=`arcade-debugger-console-breakpoints-${f()}`,this.modelId=""}static{this.properties={debuggerStore:0,modelId:1}}static{this.styles=[V,z,L()]}get breakpoints(){return this.debuggerStore?.debuggerBreakpoints??[]}get previewTabsState(){return this.debuggerStore.previewTabsState}get lazyTreeState(){return this.debuggerStore?.lazyTreeState}get executionProgramState(){return this.debuggerStore?.executionState?.result}load(){this.manager.onLifecycle(()=>{let e=this.el.closest("arcgis-code-editor-shell")??this.el.getRootNode(),t=S(this.el,["class"],this.updateTheme.bind(this)),a=i=>this.dismissBreakpointPopoverOnResize(i);return e?.addEventListener("pointerdown",a,!0),this.updateTheme(),()=>{t(),e?.removeEventListener("pointerdown",a,!0)}})}getContentAtLine(e){if(!this.modelId)return"";let t=this._monacoEditor.getModel(T.parse(this.modelId));return t?t.getLineContent(e):""}updateTheme(){k(this.el)==="dark"?this.elementInternals.states.add(h):this.elementInternals.states.delete(h)}getBreakpointCode(e){return e==null?this.messages.nocontent??"No content":this.getContentAtLine(e)||(this.messages.nocontent??"No content")}getPreviewLoadErrorMessage(){return this.messages.previewloaderror??"Unable to load preview."}getBreakpointPositionText(e){return(this.messages.breakpointposition??"{position} of {count}"??"{position} of {count}").replace("{position}",String(e)).replace("{count}",String(this.breakpoints.length))}findCollectionItemByPreviewSegment(e,t){if(t.startsWith("name:")){let a=t.slice(5);return e.find(i=>i.name===a)?.featureSet}if(t.startsWith("id:")){let a=t.slice(3);return e.find(i=>String(i.id)===a)?.featureSet}}getExpandedDebuggerMap(e){if(e==null||!m(e))return null;let t=e.expand();return Array.isArray(t)?null:t}getPreviewRows(e){return e.map(t=>this.getExpandedDebuggerMap(t)||new Map)}dismissBreakpointPopoverOnResize(e){if(!e.composedPath().some(a=>a instanceof HTMLElement&&a.classList.contains("bottom-drawer-resize-handle")))return;let t=this.el.shadowRoot?.querySelector(".breakpoints-popover");t?.open&&(t.open=!1)}getExpandedDebuggerChild(e,t){if(!e||!m(e))return;let a=e.expand();if(Array.isArray(a)){let i=Number(t);return!Number.isInteger(i)||String(i)!==t?void 0:a[i]}return a.get(t)}async resolvePreviewValueFromSegments(e,t){if(!t.length)return e;if(!e)return;let[a,...i]=t,o;if(N(e)){let r=await e.load();o=this.findCollectionItemByPreviewSegment(r,a)}else o=this.getExpandedDebuggerChild(e,a);return await this.resolvePreviewValueFromSegments(o,i)}getScope(e,t){switch(t){case"profile":return e.profile;case"globals":return e.globals;case"locals":return e.locals}}async resolvePreviewValue(e){let t=this.executionProgramState;if(!t)return;let a=B(e);if(!a)return;let{scopeName:i,rootName:o,pathSegments:r}=a,c=this.getScope(t,i);if(c)return await this.resolvePreviewValueFromSegments(c.get(o),r)}async loadPreview({label:e,sourcePath:t,value:a}){let i=this.previewTabsState,{snapshot:o}=i.startLoad(e,t),r=a;if(r==null)try{r=await this.resolvePreviewValue(t)}catch{i.setError(o,this.getPreviewLoadErrorMessage());return}if(r==null||!I(r)||typeof r.querySample!="function"||typeof r.schema!="function"){i.setUnavailable(o,this.messages.previewunavailable??"This preview is no longer available in the current paused state.");return}try{let{fields:c,features:d}=await r.querySample(),n=this.getPreviewRows(d);i.setLoaded(o,c,n)}catch{i.setError(o,this.getPreviewLoadErrorMessage())}}activateTab(e){if(e===p){this.previewTabsState.selectScope();return}this.previewTabsState.selectTab(e);let t=this.previewTabsState.getTab(e);t?.invalidated&&this.loadPreview({label:t.label,sourcePath:t.sourcePath})}closePreviewTab(e){e.closed=!1,this.previewTabsState.closeTab(e.tab)}scrollToSelectedBreakpoint(e){let t=e.currentTarget;requestAnimationFrame(()=>{t?.querySelector(".breakpoint-list-item--current")?.scrollIntoView({block:"center"})})}sortScopeEntries(e){return e.sort(([t],[a])=>t.localeCompare(a))}renderPreviewLabel(e){return s`<bdi>${e}</bdi>`}renderPreviewCell(e){return e?A(e)||C(e)?D({value:e}):s`<span class="xs"></span>`:s`<span class="xs"></span>`}renderScopeEntryForScope(e,t,a){let[i,o]=a,r=`${t}.${i}`,c=this.lazyTreeState;return c?F({name:i,value:o,messages:this.messages,path:`${e}.${i}`,lazyTreeState:c,previewLabel:r,previewSourcePath:M(e,i),previewLoading:this.previewTabsState.isTabLoading(r),onLoadPreview:d=>{this.loadPreview(d)}}):null}renderBreakpointPopover(e){return this.breakpoints.length?s`<calcite-popover .referenceElement=${this._breakpointPopoverId} placement=bottom-end scale=s auto-close focus-trap-disabled @calcitePopoverOpen=${t=>this.scrollToSelectedBreakpoint(t)} .label=${this.messages.breakpoints??"Breakpoints"} class="breakpoints-popover" .heading=${this.messages.breakpoints??"Breakpoints"} heading-level=2><div class="breakpoints-popover-content"><div class="breakpoints-list">${this.breakpoints.map((t,a)=>s`<div class=${x(t.line===e?"breakpoint-list-item breakpoint-list-item--current":"breakpoint-list-item")}><div class="breakpoint-list-item-meta"><bdi>${this.getBreakpointPositionText(a+1)}</bdi></div><arcgis-code-viewer language=arcade class="breakpoint-code-viewer" .lineNumbers=${i=>String(i+t.line-1)}>${this.getBreakpointCode(t.line)}</arcgis-code-viewer></div>`)}</div></div></calcite-popover>`:null}renderScopePanel(){let e=this.executionProgramState,t=this.sortScopeEntries(Array.from(e?.profile??[])),a=this.sortScopeEntries(Array.from(e?.globals??[])),i=e?.locals?this.sortScopeEntries(Array.from(e?.locals??[])):void 0,o=!!e?.locals,r=i&&i.length>0,c=t.length>0,d=a.length>0;return e?s`<calcite-tree .scale=${l.scale} @calciteTreeSelect=${l.oncalciteTreeSelect} .lines=${l.lines} .selectionMode=${l.selectionMode}><calcite-tree-item expanded .disabled=${!r}>${this.messages.local??"Local"}<calcite-tree slot=children .lines=${l.lines} .selectionMode=${l.selectionMode} .scale=${l.scale} @calciteTreeSelect=${l.oncalciteTreeSelect}>${o?r?i.map(n=>this.renderScopeEntryForScope("locals",this.messages.local??"Local",n)):s`<span><i>${this.messages.empty??"Empty"}</i></span>`:s`<span><i>${this.messages.nolocalscope??"No local scope"}</i></span>`}</calcite-tree></calcite-tree-item><calcite-tree-item expanded .disabled=${!d}>${this.messages.global??"Global"}<calcite-tree slot=children .lines=${l.lines} .selectionMode=${l.selectionMode} .scale=${l.scale} @calciteTreeSelect=${l.oncalciteTreeSelect}>${d?a.map(n=>this.renderScopeEntryForScope("globals",this.messages.global??"Global",n)):s`<span><i>${this.messages.empty??"Empty"}</i></span>`}</calcite-tree></calcite-tree-item><calcite-tree-item expanded .disabled=${!c}>${this.messages.profile??"Profile"}<calcite-tree slot=children .lines=${l.lines} .selectionMode=${l.selectionMode} .scale=${l.scale} @calciteTreeSelect=${l.oncalciteTreeSelect}>${c?t.map(n=>this.renderScopeEntryForScope("profile",this.messages.profile??"Profile",n)):s`<span><i>${this.messages.empty??"Empty"}</i></span>`}</calcite-tree></calcite-tree-item></calcite-tree>`:this.debuggerStore?.isExecuting?s`<div class="preview-empty-state"><calcite-loader scale=s type=indeterminate .label=${this.messages.loading??"Loading"} .text=${this.messages.loading??"Loading"}></calcite-loader></div>`:s`<span class="disabled-state-text">${this.messages.notpaused??"Not paused"}</span>`}renderPreviewPanel(e){switch(e.status){case"loading":return s`<div class="preview-empty-state"><calcite-loader scale=s type=indeterminate .label=${this.messages.loadingpreview??"Loading preview"} .text=${this.messages.loadingpreview??"Loading preview"}></calcite-loader></div>`;case"unavailable":case"error":return s`<span class="disabled-state-text">${e.message}</span>`;case"loaded":let{fields:t,label:a,rows:i}=e;return!i.length||!t.length?s`<span class="disabled-state-text">${this.messages.nopreviewrows??"No preview rows available."}</span>`:s`<div class="preview-table-shell"><div class="preview-table-summary">${this.renderPreviewLabel(`${a}${i.length===q?` ${this.messages.previewlimit??"(showing first 100 items)"}`:""}`)}</div><div class="table-scroll"><table><thead><tr>${t.map(o=>s`<th><bdi>${o}</bdi></th>`)}</tr></thead><tbody>${i.map(o=>s`<tr>${t.map(r=>s`<td>${this.renderPreviewCell(o.get(r))}</td>`)}</tr>`)}</tbody></table></div></div>`;default:return s`<span class="disabled-state-text">${this.messages.nopreviewloaded??"Select a FeatureSet variable and load a preview."}</span>`}}renderTabs(){let e=this.previewTabsState.activeTabId;return s`<calcite-tabs><calcite-tab-nav slot=title-group><calcite-tab-title .tab=${p} .selected=${e===p} @calciteTabsActivate=${t=>this.activateTab(t.target.tab)}>${this.messages.scope??"Scope"}</calcite-tab-title>${b(this.previewTabsState.tabs,t=>`title-${t.id}`,t=>s`<calcite-tab-title .tab=${t.id} title=${t.label??g} closable .selected=${e===t.id} @calciteTabsActivate=${a=>this.activateTab(a.target.tab)} @calciteTabsClose=${a=>this.closePreviewTab(a.target)}><bdi>${t.title}</bdi></calcite-tab-title>`)}</calcite-tab-nav><calcite-tab .tab=${p} .selected=${e===p}><div class="tab-panel">${this.renderScopePanel()}</div></calcite-tab>${b(this.previewTabsState.tabs,t=>`panel-${t.id}`,t=>s`<calcite-tab .tab=${t.id} .selected=${e===t.id}><div class="tab-panel preview-panel">${this.renderPreviewPanel(t)}</div></calcite-tab>`)}</calcite-tabs>`}render(){let{line:e}=this.debuggerStore?.executionState??{},t=e?this.breakpoints.find(i=>i.line===e):this.breakpoints[0],a=e?this.breakpoints.findIndex(i=>i.line===e):0;return s`<div class="console-shell">${this.breakpoints.length&&s`<div class="breakpoint-header"><arcgis-code-viewer language=arcade class="breakpoint-code-viewer" .lineNumbers=${i=>String(i+(t?.line??e??1)-1)}>${this.getBreakpointCode(t?.line??this.breakpoints[0]?.line??e??1)}</arcgis-code-viewer>${this.breakpoints.length?s`<calcite-action id=${this._breakpointPopoverId??g} scale=s .text=${this.getBreakpointPositionText(a>=0?a+1:1)} text-enabled icon=chevron-down></calcite-action>`:null}${this.renderBreakpointPopover(t?.line??e)}</div>`||""}<div class="tabs-container">${this.renderTabs()}</div></div>`}};$("arcgis-arcade-debugger-console",v);return v},a,c,d,e,h)
2
+ import h from"./7VOJQ5KN.js";import{a as b}from"./IQFKIYLN.js";import e from"./CTWIEPPR.js";import d from"./NBSYRKLH.js";import"./5HKDO4SX.js";import c from"./7Z6G332Z.js";import"./MZMKV7FA.js";import a from"./ZUCC43DN.js";import{a as P}from"./CNE5ADLH.js";import{a as y}from"./HRLNAS7V.js";import{b as S,d as k}from"./C5WMGZYX.js";import"./J4I4EROF.js";import"./XEK22IDA.js";import{a as E}from"./VWOHL265.js";import"./WUGYEHHP.js";import"./PP3QOCFN.js";import{G as w,H as x,I as g,K as $,h as u,j as s,t as f}from"./P4SWCWOD.js";import"./BFPEJYVB.js";import{El as T}from"./TJM6I22B.js";import"./H6RQVSYM.js";export default $arcgis.t(([,{a:p},{h:h,i:L,j:z},{a:M,b:B,c:m,d:C,e:A,f:I,g:N,i:F,j:D},{a:l}])=>{var V=u`:host{--calcite-block-padding: var(--calcite-spacing-sm);--breakpoints-popover-max-height: min(14rem, 20vh);display:block;background-color:var(--calcite-color-foreground-1);color:var(--calcite-color-text-2);overflow:hidden;height:100%;.console-shell,.tabs-container,calcite-tabs{height:100%}.tabs-container{flex:1 1 auto;min-height:0;overflow:hidden}.console-shell,calcite-tabs{display:flex;flex-direction:column;min-height:0}.console-shell{container-type:size;container-name:debugger-console}calcite-tab-nav{--calcite-size-2xl: var(--calcite-space-md);justify-content:flex-start;padding-inline:var(--calcite-spacing-sm)}calcite-tab-title{font-size:var(--calcite-font-size-sm)}calcite-tab{--calcite-tab-content-block-padding: 0;--calcite-tab-content-space-y: 0;display:flex;flex-direction:column;min-height:0}calcite-tab:not([selected]){display:none}.disabled-state-text{font-size:var(--calcite-font-size-sm);color:var(--calcite-color-text-3);font-style:italic;text-align:center;display:block;padding:var(--calcite-spacing-md)}.breakpoint-header{display:flex;align-items:flex-start;gap:var(--calcite-spacing-sm);padding:var(--calcite-spacing-sm);border-bottom:1px solid var(--calcite-color-border-3);background-color:var(--calcite-color-foreground-1)}.load-action{--calcite-action-background-color: var(--calcite-color-foreground-2);--calcite-internal-action-height: 1.25rem;--calcite-internal-action-padding-block: 0;--calcite-internal-action-padding-inline: var(--calcite-spacing-xs);margin-block:var(--calcite-spacing-xxs)}.breakpoint-code-viewer{margin-block:0;width:100%}.tab-panel{display:flex;flex:1 1 auto;height:100%;min-height:0;overflow:hidden}.tab-panel>*{flex:1 1 auto;min-height:0}.tab-panel>calcite-tree{margin-inline-end:var(--calcite-space-sm);overflow-y:auto}.preview-panel{display:flex;flex:1 1 auto;min-height:0}.preview-empty-state{display:flex;align-items:center;justify-content:center;width:100%;height:100%;padding:var(--calcite-spacing-md)}.preview-table-shell{display:flex;flex-direction:column;flex:1 1 auto;width:100%;min-width:0;min-height:0;overflow:hidden}.preview-table-summary{padding:var(--calcite-spacing-sm);border-bottom:1px solid var(--calcite-color-border-3);color:var(--calcite-color-text-2);background-color:var(--calcite-color-foreground-1)}.table-scroll{overflow:auto;flex:1 1 auto;min-width:0;min-height:0;max-width:100%;background-color:var(--calcite-color-foreground-1);margin:var(--calcite-spacing-sm)}table{min-width:max-content;border-spacing:0;border-collapse:collapse;text-align:start;white-space:nowrap;thead{background-color:var(--calcite-color-foreground-2)}tr{border-top:1px solid var(--calcite-color-border-3);border-bottom:1px solid var(--calcite-color-border-3)}th,td{border-inline-start:1px solid var(--calcite-color-border-3);border-inline-end:1px solid var(--calcite-color-border-3);text-align:start;padding:var(--calcite-spacing-xxs);.string-value{white-space:pre}}th{font-weight:var(--calcite-font-weight-medium)}}.breakpoints-popover{--calcite-popover-max-size-x: min(22rem, 68vw)}.breakpoints-popover-content{max-block-size:var(--breakpoints-popover-max-height);overflow:hidden}.breakpoints-list{box-sizing:border-box;display:flex;flex-direction:column;gap:var(--calcite-spacing-xs);padding:var(--calcite-spacing-xs);min-width:min(18rem,58vw);max-block-size:var(--breakpoints-popover-max-height);overflow:auto}.breakpoints-popover .breakpoint-code-viewer{--calcite-font-size--2: var(--calcite-font-size--3);--calcite-spacing-md: var(--calcite-spacing-sm);--calcite-spacing-sm: var(--calcite-spacing-xs);--calcite-spacing-xs: var(--calcite-spacing-xxs)}.breakpoint-list-item{border:1px solid var(--calcite-color-border-3);border-radius:var(--calcite-corner-radius-sharp);background-color:var(--calcite-color-foreground-1);padding:var(--calcite-spacing-xxs)}.breakpoint-list-item--current{border-color:var(--calcite-color-brand)}.breakpoint-list-item-meta{color:var(--calcite-color-text-2);font-size:var(--calcite-font-size-xs);margin-bottom:var(--calcite-spacing-xxs)}}`,q=100,v=class extends w{constructor(){super(...arguments),this.messages=P(),this._monacoEditor=y(E),this._breakpointPopoverId=`arcade-debugger-console-breakpoints-${f()}`,this.modelId=""}static{this.properties={debuggerStore:0,modelId:1}}static{this.styles=[V,z,L()]}get breakpoints(){return this.debuggerStore?.debuggerBreakpoints??[]}get previewTabsState(){return this.debuggerStore.previewTabsState}get lazyTreeState(){return this.debuggerStore?.lazyTreeState}get executionProgramState(){return this.debuggerStore?.executionState?.result}load(){this.manager.onLifecycle(()=>{let e=this.el.closest("arcgis-code-editor-shell")??this.el.getRootNode(),t=S(this.el,["class"],this.updateTheme.bind(this)),a=i=>this.dismissBreakpointPopoverOnResize(i);return e?.addEventListener("pointerdown",a,!0),this.updateTheme(),()=>{t(),e?.removeEventListener("pointerdown",a,!0)}})}getContentAtLine(e){if(!this.modelId)return"";let t=this._monacoEditor.getModel(T.parse(this.modelId));return t?t.getLineContent(e):""}updateTheme(){k(this.el)==="dark"?this.elementInternals.states.add(h):this.elementInternals.states.delete(h)}getBreakpointCode(e){return e==null?this.messages.nocontent??"No content":this.getContentAtLine(e)||(this.messages.nocontent??"No content")}getPreviewLoadErrorMessage(){return this.messages.previewloaderror??"Unable to load preview."}getBreakpointPositionText(e){return(this.messages.breakpointposition??"{position} of {count}"??"{position} of {count}").replace("{position}",String(e)).replace("{count}",String(this.breakpoints.length))}findCollectionItemByPreviewSegment(e,t){if(t.startsWith("name:")){let a=t.slice(5);return e.find(i=>i.name===a)?.featureSet}if(t.startsWith("id:")){let a=t.slice(3);return e.find(i=>String(i.id)===a)?.featureSet}}getExpandedDebuggerMap(e){if(e==null||!m(e))return null;let t=e.expand();return Array.isArray(t)?null:t}getPreviewRows(e){return e.map(t=>this.getExpandedDebuggerMap(t)||new Map)}dismissBreakpointPopoverOnResize(e){if(!e.composedPath().some(a=>a instanceof HTMLElement&&a.classList.contains("bottom-drawer-resize-handle")))return;let t=this.el.shadowRoot?.querySelector(".breakpoints-popover");t?.open&&(t.open=!1)}getExpandedDebuggerChild(e,t){if(!e||!m(e))return;let a=e.expand();if(Array.isArray(a)){let i=Number(t);return!Number.isInteger(i)||String(i)!==t?void 0:a[i]}return a.get(t)}async resolvePreviewValueFromSegments(e,t){if(!t.length)return e;if(!e)return;let[a,...i]=t,o;if(N(e)){let r=await e.load();o=this.findCollectionItemByPreviewSegment(r,a)}else o=this.getExpandedDebuggerChild(e,a);return await this.resolvePreviewValueFromSegments(o,i)}getScope(e,t){switch(t){case"profile":return e.profile;case"globals":return e.globals;case"locals":return e.locals}}async resolvePreviewValue(e){let t=this.executionProgramState;if(!t)return;let a=B(e);if(!a)return;let{scopeName:i,rootName:o,pathSegments:r}=a,c=this.getScope(t,i);if(c)return await this.resolvePreviewValueFromSegments(c.get(o),r)}async loadPreview({label:e,sourcePath:t,value:a}){let i=this.previewTabsState,{snapshot:o}=i.startLoad(e,t),r=a;if(r==null)try{r=await this.resolvePreviewValue(t)}catch{i.setError(o,this.getPreviewLoadErrorMessage());return}if(r==null||!I(r)||typeof r.querySample!="function"||typeof r.schema!="function"){i.setUnavailable(o,this.messages.previewunavailable??"This preview is no longer available in the current paused state.");return}try{let{fields:c,features:d}=await r.querySample(),n=this.getPreviewRows(d);i.setLoaded(o,c,n)}catch{i.setError(o,this.getPreviewLoadErrorMessage())}}activateTab(e){if(e===p){this.previewTabsState.selectScope();return}this.previewTabsState.selectTab(e);let t=this.previewTabsState.getTab(e);t?.invalidated&&this.loadPreview({label:t.label,sourcePath:t.sourcePath})}closePreviewTab(e){e.closed=!1,this.previewTabsState.closeTab(e.tab)}scrollToSelectedBreakpoint(e){let t=e.currentTarget;requestAnimationFrame(()=>{t?.querySelector(".breakpoint-list-item--current")?.scrollIntoView({block:"center"})})}sortScopeEntries(e){return e.sort(([t],[a])=>t.localeCompare(a))}renderPreviewLabel(e){return s`<bdi>${e}</bdi>`}renderPreviewCell(e){return e?A(e)||C(e)?D({value:e}):s`<span class="xs"></span>`:s`<span class="xs"></span>`}renderScopeEntryForScope(e,t,a){let[i,o]=a,r=`${t}.${i}`,c=this.lazyTreeState;return c?F({name:i,value:o,messages:this.messages,path:`${e}.${i}`,lazyTreeState:c,previewLabel:r,previewSourcePath:M(e,i),previewLoading:this.previewTabsState.isTabLoading(r),onLoadPreview:d=>{this.loadPreview(d)}}):null}renderBreakpointPopover(e){return this.breakpoints.length?s`<calcite-popover .referenceElement=${this._breakpointPopoverId} placement=bottom-end scale=s auto-close focus-trap-disabled @calcitePopoverOpen=${t=>this.scrollToSelectedBreakpoint(t)} .label=${this.messages.breakpoints??"Breakpoints"} class="breakpoints-popover" .heading=${this.messages.breakpoints??"Breakpoints"} heading-level=2><div class="breakpoints-popover-content"><div class="breakpoints-list">${this.breakpoints.map((t,a)=>s`<div class=${x(t.line===e?"breakpoint-list-item breakpoint-list-item--current":"breakpoint-list-item")}><div class="breakpoint-list-item-meta"><bdi>${this.getBreakpointPositionText(a+1)}</bdi></div><arcgis-code-viewer language=arcade class="breakpoint-code-viewer" .lineNumbers=${i=>String(i+t.line-1)}>${this.getBreakpointCode(t.line)}</arcgis-code-viewer></div>`)}</div></div></calcite-popover>`:null}renderScopePanel(){let e=this.executionProgramState,t=this.sortScopeEntries(Array.from(e?.profile??[])),a=this.sortScopeEntries(Array.from(e?.globals??[])),i=e?.locals?this.sortScopeEntries(Array.from(e?.locals??[])):void 0,o=!!e?.locals,r=i&&i.length>0,c=t.length>0,d=a.length>0;return e?s`<calcite-tree .scale=${l.scale} @calciteTreeSelect=${l.oncalciteTreeSelect} .lines=${l.lines} .selectionMode=${l.selectionMode}><calcite-tree-item expanded .disabled=${!r}>${this.messages.local??"Local"}<calcite-tree slot=children .lines=${l.lines} .selectionMode=${l.selectionMode} .scale=${l.scale} @calciteTreeSelect=${l.oncalciteTreeSelect}>${o?r?i.map(n=>this.renderScopeEntryForScope("locals",this.messages.local??"Local",n)):s`<span><i>${this.messages.empty??"Empty"}</i></span>`:s`<span><i>${this.messages.nolocalscope??"No local scope"}</i></span>`}</calcite-tree></calcite-tree-item><calcite-tree-item expanded .disabled=${!d}>${this.messages.global??"Global"}<calcite-tree slot=children .lines=${l.lines} .selectionMode=${l.selectionMode} .scale=${l.scale} @calciteTreeSelect=${l.oncalciteTreeSelect}>${d?a.map(n=>this.renderScopeEntryForScope("globals",this.messages.global??"Global",n)):s`<span><i>${this.messages.empty??"Empty"}</i></span>`}</calcite-tree></calcite-tree-item><calcite-tree-item expanded .disabled=${!c}>${this.messages.profile??"Profile"}<calcite-tree slot=children .lines=${l.lines} .selectionMode=${l.selectionMode} .scale=${l.scale} @calciteTreeSelect=${l.oncalciteTreeSelect}>${c?t.map(n=>this.renderScopeEntryForScope("profile",this.messages.profile??"Profile",n)):s`<span><i>${this.messages.empty??"Empty"}</i></span>`}</calcite-tree></calcite-tree-item></calcite-tree>`:this.debuggerStore?.isExecuting?s`<div class="preview-empty-state"><calcite-loader scale=s type=indeterminate .label=${this.messages.loading??"Loading"} .text=${this.messages.loading??"Loading"}></calcite-loader></div>`:s`<span class="disabled-state-text">${this.messages.notpaused??"Not paused"}</span>`}renderPreviewPanel(e){switch(e.status){case"loading":return s`<div class="preview-empty-state"><calcite-loader scale=s type=indeterminate .label=${this.messages.loadingpreview??"Loading preview"} .text=${this.messages.loadingpreview??"Loading preview"}></calcite-loader></div>`;case"unavailable":case"error":return s`<span class="disabled-state-text">${e.message}</span>`;case"loaded":let{fields:t,label:a,rows:i}=e;return!i.length||!t.length?s`<span class="disabled-state-text">${this.messages.nopreviewrows??"No preview rows available."}</span>`:s`<div class="preview-table-shell"><div class="preview-table-summary">${this.renderPreviewLabel(`${a}${i.length===q?` ${this.messages.previewlimit??"(showing first 100 items)"}`:""}`)}</div><div class="table-scroll"><table><thead><tr>${t.map(o=>s`<th><bdi>${o}</bdi></th>`)}</tr></thead><tbody>${i.map(o=>s`<tr>${t.map(r=>s`<td>${this.renderPreviewCell(o.get(r))}</td>`)}</tr>`)}</tbody></table></div></div>`;default:return s`<span class="disabled-state-text">${this.messages.nopreviewloaded??"Select a FeatureSet variable and load a preview."}</span>`}}renderTabs(){let e=this.previewTabsState.activeTabId;return s`<calcite-tabs><calcite-tab-nav slot=title-group><calcite-tab-title .tab=${p} .selected=${e===p} @calciteTabsActivate=${t=>this.activateTab(t.target.tab)}>${this.messages.scope??"Scope"}</calcite-tab-title>${b(this.previewTabsState.tabs,t=>`title-${t.id}`,t=>s`<calcite-tab-title .tab=${t.id} title=${t.label??g} closable .selected=${e===t.id} @calciteTabsActivate=${a=>this.activateTab(a.target.tab)} @calciteTabsClose=${a=>this.closePreviewTab(a.target)}><bdi>${t.title}</bdi></calcite-tab-title>`)}</calcite-tab-nav><calcite-tab .tab=${p} .selected=${e===p}><div class="tab-panel">${this.renderScopePanel()}</div></calcite-tab>${b(this.previewTabsState.tabs,t=>`panel-${t.id}`,t=>s`<calcite-tab .tab=${t.id} .selected=${e===t.id}><div class="tab-panel preview-panel">${this.renderPreviewPanel(t)}</div></calcite-tab>`)}</calcite-tabs>`}render(){let{line:e}=this.debuggerStore?.executionState??{},t=e?this.breakpoints.find(i=>i.line===e):this.breakpoints[0],a=e?this.breakpoints.findIndex(i=>i.line===e):0;return s`<div class="console-shell">${this.breakpoints.length&&s`<div class="breakpoint-header"><arcgis-code-viewer language=arcade class="breakpoint-code-viewer" .lineNumbers=${i=>String(i+(t?.line??e??1)-1)}>${this.getBreakpointCode(t?.line??this.breakpoints[0]?.line??e??1)}</arcgis-code-viewer>${this.breakpoints.length?s`<calcite-action id=${this._breakpointPopoverId??g} scale=s .text=${this.getBreakpointPositionText(a>=0?a+1:1)} text-enabled icon=chevron-down></calcite-action>`:null}${this.renderBreakpointPopover(t?.line??e)}</div>`||""}<div class="tabs-container">${this.renderTabs()}</div></div>`}};$("arcgis-arcade-debugger-console",v);return v},a,c,d,e,h)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{a as I,b as k,c as S,d as W,e as A,f as F,g as l,h as u,i as C,j as E,k as c,l as h,m,n as p,o as w,p as L,q as _,r as f}from"./Y2QWXLND.js";import{a as v}from"./6HKTUV2Z.js";import"./3G26WBEK.js";import{Hl as t}from"./XCISKBJD.js";import"./H6RQVSYM.js";var b=120*1e3,g=class{constructor(n){this._defaults=n,this._worker=null,this._client=null,this._idleCheckInterval=window.setInterval(()=>this._checkIfIdle(),30*1e3),this._lastUsedTime=0,this._configChangeListener=this._defaults.onDidChange(()=>this._stopWorker())}_stopWorker(){this._worker&&(this._worker.dispose(),this._worker=null),this._client=null}dispose(){clearInterval(this._idleCheckInterval),this._configChangeListener.dispose(),this._stopWorker()}_checkIfIdle(){if(!this._worker)return;Date.now()-this._lastUsedTime>b&&this._stopWorker()}_getClient(){return this._lastUsedTime=Date.now(),this._client||(this._worker=v({moduleId:"vs/language/html/htmlWorker",createWorker:()=>new Worker(new URL("html.worker.js",import.meta.url),{type:"module"}),createData:{languageSettings:this._defaults.options,languageId:this._defaults.languageId},label:this._defaults.languageId}),this._client=this._worker.getProxy()),this._client}getLanguageServiceWorker(...n){let e;return this._getClient().then(r=>{e=r}).then(r=>{if(this._worker)return this._worker.withSyncedResources(n)}).then(r=>e)}};var d=class extends k{constructor(n){super(n,[".",":","<",'"',"=","/"])}};function O(i){let n=new g(i),e=(...o)=>n.getLanguageServiceWorker(...o),r=i.languageId;t.registerCompletionItemProvider(r,new d(e)),t.registerHoverProvider(r,new l(e)),t.registerDocumentHighlightProvider(r,new u(e)),t.registerLinkProvider(r,new m(e)),t.registerFoldingRangeProvider(r,new _(e)),t.registerDocumentSymbolProvider(r,new h(e)),t.registerSelectionRangeProvider(r,new f(e)),t.registerRenameProvider(r,new c(e)),r==="html"&&(t.registerDocumentFormattingEditProvider(r,new p(e)),t.registerDocumentRangeFormattingEditProvider(r,new w(e)))}function j(i){let n=[],e=[],r=new g(i);n.push(r);let o=(...s)=>r.getLanguageServiceWorker(...s);function R(){let{languageId:s,modeConfiguration:a}=i;D(e),a.completionItems&&e.push(t.registerCompletionItemProvider(s,new d(o))),a.hovers&&e.push(t.registerHoverProvider(s,new l(o))),a.documentHighlights&&e.push(t.registerDocumentHighlightProvider(s,new u(o))),a.links&&e.push(t.registerLinkProvider(s,new m(o))),a.documentSymbols&&e.push(t.registerDocumentSymbolProvider(s,new h(o))),a.rename&&e.push(t.registerRenameProvider(s,new c(o))),a.foldingRanges&&e.push(t.registerFoldingRangeProvider(s,new _(o))),a.selectionRanges&&e.push(t.registerSelectionRangeProvider(s,new f(o))),a.documentFormattingEdits&&e.push(t.registerDocumentFormattingEditProvider(s,new p(o))),a.documentRangeFormattingEdits&&e.push(t.registerDocumentRangeFormattingEditProvider(s,new w(o)))}return R(),n.push(P(e)),P(n)}function P(i){return{dispose:()=>D(i)}}function D(i){for(;i.length;)i.pop().dispose()}export{k as CompletionAdapter,C as DefinitionAdapter,I as DiagnosticsAdapter,L as DocumentColorAdapter,p as DocumentFormattingEditProvider,u as DocumentHighlightAdapter,m as DocumentLinkAdapter,w as DocumentRangeFormattingEditProvider,h as DocumentSymbolAdapter,_ as FoldingRangeAdapter,l as HoverAdapter,E as ReferenceAdapter,c as RenameAdapter,f as SelectionRangeAdapter,g as WorkerManager,S as fromPosition,W as fromRange,j as setupMode,O as setupMode1,A as toRange,F as toTextEdit};
2
+ import{a as I,b as k,c as S,d as W,e as A,f as F,g as l,h as u,i as C,j as E,k as c,l as h,m,n as p,o as w,p as L,q as _,r as f}from"./G4FDMPRS.js";import{a as v}from"./CCFLMTMX.js";import"./PP3QOCFN.js";import{Hl as t}from"./TJM6I22B.js";import"./H6RQVSYM.js";var b=120*1e3,g=class{constructor(n){this._defaults=n,this._worker=null,this._client=null,this._idleCheckInterval=window.setInterval(()=>this._checkIfIdle(),30*1e3),this._lastUsedTime=0,this._configChangeListener=this._defaults.onDidChange(()=>this._stopWorker())}_stopWorker(){this._worker&&(this._worker.dispose(),this._worker=null),this._client=null}dispose(){clearInterval(this._idleCheckInterval),this._configChangeListener.dispose(),this._stopWorker()}_checkIfIdle(){if(!this._worker)return;Date.now()-this._lastUsedTime>b&&this._stopWorker()}_getClient(){return this._lastUsedTime=Date.now(),this._client||(this._worker=v({moduleId:"vs/language/html/htmlWorker",createWorker:()=>new Worker(new URL("html.worker.js",import.meta.url),{type:"module"}),createData:{languageSettings:this._defaults.options,languageId:this._defaults.languageId},label:this._defaults.languageId}),this._client=this._worker.getProxy()),this._client}getLanguageServiceWorker(...n){let e;return this._getClient().then(r=>{e=r}).then(r=>{if(this._worker)return this._worker.withSyncedResources(n)}).then(r=>e)}};var d=class extends k{constructor(n){super(n,[".",":","<",'"',"=","/"])}};function O(i){let n=new g(i),e=(...o)=>n.getLanguageServiceWorker(...o),r=i.languageId;t.registerCompletionItemProvider(r,new d(e)),t.registerHoverProvider(r,new l(e)),t.registerDocumentHighlightProvider(r,new u(e)),t.registerLinkProvider(r,new m(e)),t.registerFoldingRangeProvider(r,new _(e)),t.registerDocumentSymbolProvider(r,new h(e)),t.registerSelectionRangeProvider(r,new f(e)),t.registerRenameProvider(r,new c(e)),r==="html"&&(t.registerDocumentFormattingEditProvider(r,new p(e)),t.registerDocumentRangeFormattingEditProvider(r,new w(e)))}function j(i){let n=[],e=[],r=new g(i);n.push(r);let o=(...s)=>r.getLanguageServiceWorker(...s);function R(){let{languageId:s,modeConfiguration:a}=i;D(e),a.completionItems&&e.push(t.registerCompletionItemProvider(s,new d(o))),a.hovers&&e.push(t.registerHoverProvider(s,new l(o))),a.documentHighlights&&e.push(t.registerDocumentHighlightProvider(s,new u(o))),a.links&&e.push(t.registerLinkProvider(s,new m(o))),a.documentSymbols&&e.push(t.registerDocumentSymbolProvider(s,new h(o))),a.rename&&e.push(t.registerRenameProvider(s,new c(o))),a.foldingRanges&&e.push(t.registerFoldingRangeProvider(s,new _(o))),a.selectionRanges&&e.push(t.registerSelectionRangeProvider(s,new f(o))),a.documentFormattingEdits&&e.push(t.registerDocumentFormattingEditProvider(s,new p(o))),a.documentRangeFormattingEdits&&e.push(t.registerDocumentRangeFormattingEditProvider(s,new w(o)))}return R(),n.push(P(e)),P(n)}function P(i){return{dispose:()=>D(i)}}function D(i){for(;i.length;)i.pop().dispose()}export{k as CompletionAdapter,C as DefinitionAdapter,I as DiagnosticsAdapter,L as DocumentColorAdapter,p as DocumentFormattingEditProvider,u as DocumentHighlightAdapter,m as DocumentLinkAdapter,w as DocumentRangeFormattingEditProvider,h as DocumentSymbolAdapter,_ as FoldingRangeAdapter,l as HoverAdapter,E as ReferenceAdapter,c as RenameAdapter,f as SelectionRangeAdapter,g as WorkerManager,S as fromPosition,W as fromRange,j as setupMode,O as setupMode1,A as toRange,F as toTextEdit};
@@ -1,5 +1,5 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import b from"./OQWIORYX.js";import a from"./H5EGZU2S.js";import{i as q}from"./C5WMGZYX.js";import{L as P}from"./P4SWCWOD.js";export default $arcgis.t(([B,{substitute:E},{B:F},{a:T,d:C,e:N,f:b,g:g,h:$,i:x,j:L,n:_,o:D,p:A}])=>{function w(t,e,a){return t?.[e]??a}function h(t,e,a,n){return E(w(t,e,a),n)}function K(t,e){return w(t,e?"nullable":"notnull",e?"nullable":"not nullable")}function j(t,e){return w(t,e?"yes":"no",e?"yes":"no")}function v(t){for(let e of t){if(e instanceof _)return e;if(e.isCollection&&"variables"in e){let a=v(e.variables.filter(n=>n.type!=="group"));if(a)return a}}}function V(t,e){return`${t}:${e}`}function z(t){if(t){for(let e of t)if(e.type==="dataCatalogDatastore")return e.definition}}async function U(t){let e=new B({url:t.portal.url});return await e.load(),new T({itemId:t.id,serviceUrl:t.serviceUrl,portal:e})}async function k(t){return F(t)?await U(t):t}function H(t,e,a,n){let o=`**${t}**`;return e.type&&(o+=`
2
+ import b from"./RQZ22N2G.js";import a from"./H5EGZU2S.js";import{i as q}from"./C5WMGZYX.js";import{L as P}from"./P4SWCWOD.js";export default $arcgis.t(([B,{substitute:E},{B:F},{a:T,d:C,e:N,f:b,g:g,h:$,i:x,j:L,n:_,o:D,p:A}])=>{function w(t,e,a){return t?.[e]??a}function h(t,e,a,n){return E(w(t,e,a),n)}function K(t,e){return w(t,e?"nullable":"notnull",e?"nullable":"not nullable")}function j(t,e){return w(t,e?"yes":"no",e?"yes":"no")}function v(t){for(let e of t){if(e instanceof _)return e;if(e.isCollection&&"variables"in e){let a=v(e.variables.filter(n=>n.type!=="group"));if(a)return a}}}function V(t,e){return`${t}:${e}`}function z(t){if(t){for(let e of t)if(e.type==="dataCatalogDatastore")return e.definition}}async function U(t){let e=new B({url:t.portal.url});return await e.load(),new T({itemId:t.id,serviceUrl:t.serviceUrl,portal:e})}async function k(t){return F(t)?await U(t):t}function H(t,e,a,n){let o=`**${t}**`;return e.type&&(o+=`
3
3
  ${e.type}`),a&&(o+=`
4
4
  ${h(n,"datastoreformat","Datastore: {datastoreName}",{datastoreName:a})}`),{value:o}}function W(t,e,a){let n=`**${t.name}**`;return t.serverType&&(n+=`
5
5
  ${t.serverType}`),n+=`
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{a as w}from"./TULXD5ZA.js";import{b as _,c as n,d as v}from"./DSXNVNHP.js";import{a as f,b}from"./2UXJ4DVI.js";import{a as p}from"./CNE5ADLH.js";import"./HRLNAS7V.js";import{c as m,e as r}from"./C5WMGZYX.js";import"./J4I4EROF.js";import"./LEFE3FVL.js";import"./NKGAHXNJ.js";import"./XWEX2VS6.js";import"./3G26WBEK.js";import{F as c,G as u,K as h,h as d,j as s,l,n as a}from"./P4SWCWOD.js";import"./BFPEJYVB.js";import"./XCISKBJD.js";import"./H6RQVSYM.js";function S(o){return!Array.isArray(o)||!o.length?!1:Array.isArray(o[0].suggestions)}var $=d`:host{background-color:var(--calcite-color-foreground-1);.notice-container{margin:var(--calcite-spacing-xxs);padding:var(--calcite-spacing-sm);background-color:var(--calcite-color-foreground-1)}.sticky{position:sticky;top:0;z-index:10}calcite-flow{height:100%}calcite-block{p:first-of-type{margin-top:0}code{font-family:var(--calcite-code-family)}pre{direction:ltr;overflow-x:auto;background-color:var(--calcite-color-foreground-2);padding:var(--calcite-spacing-sm);code{font-size:var(--calcite-font-size--2)}}}calcite-list-item-group{background-color:var(--calcite-color-foreground-2)}calcite-flow{[slot=footer]{word-break:break-word}}}`,g=class extends u{constructor(){super(...arguments),this._beforeBack=()=>new Promise(e=>{this._selectedSuggestion=void 0,e()}),this.messages=p(),this._shouldIgnoreDoubleClick=f(),this._colorizeStyle="",this._filterValue="",this.closed=!1,this.arcgisInternalClosePanel=a({bubbles:!1,composed:!1}),this.arcgisInternalItemSelected=a({bubbles:!1,composed:!1})}static{this.properties={_colorizeStyle:16,_filterValue:16,_selectedSuggestion:16,suggestions:0,closed:5}}static{this.styles=$}load(){this._colorizeStyle=n(),this._themeChangedListener=v(()=>this._colorizeStyle=n())}willUpdate(e){e.has("suggestions")&&this.suggestionsPropChanged()}disconnectedCallback(){super.disconnectedCallback(),this._flowObserver?.disconnect(),this._themeChangedListener?.dispose()}suggestionsPropChanged(){this._selectedSuggestion=void 0}flowFocusHandler(e){if(!e){this._flowObserver?.disconnect(),this._flowObserver=void 0;return}this._flowObserver||(this._flowObserver=new MutationObserver(()=>{r(m(e.querySelector("calcite-flow-item:last-child")??e,"calcite-input"))}),this._flowObserver.observe(e,{attributes:!0,attributeFilter:["id"],childList:!0}))}_updateFilterValue(e){this._filterValue=e}_emitItemSelected(e,t){if(this._shouldIgnoreDoubleClick(e))return;let i=e;(!i.key||i.key==="Enter")&&(e.preventDefault(),this.arcgisInternalItemSelected.emit(t.code))}_showSuggestionDetail(e,t){e.stopPropagation(),this._selectedSuggestion=t}_emitClose(){this.arcgisInternalClosePanel.emit()}_colorizeCode(e){e!==void 0&&_(e,this._selectedSuggestion.code,"arcade")}renderSuggestionGroups(){return this.suggestions===void 0?null:S(this.suggestions)?this.suggestions.map(e=>s`<calcite-list-item-group .heading=${e.label}>${this.renderSuggestionListItems(e.suggestions)}</calcite-list-item-group>`):this.renderSuggestionListItems(this.suggestions)}renderSuggestionListItems(e){return e=b(e,"label",this._filterValue),e.length?e.map(t=>s`<calcite-list-item .label=${t.label} .description=${t.description} @calciteListItemSelect=${i=>this._emitItemSelected(i,t)} @keydown=${i=>this._emitItemSelected(i,t)} data-item=${t??l}><calcite-action slot=actions-end .text=${this.messages.expand??""} scale=s icon=chevron-right icon-flip-rtl @click=${i=>this._showSuggestionDetail(i,t)} data-item=${t??l}></calcite-action></calcite-list-item>`):s`<div class="notice-container">${this.messages.noitems}</div>`}renderSuggestionFlowItem(){let e=this._selectedSuggestion;return e?s`<calcite-flow-item heading-level=2 .heading=${this.messages.suggestions} closable @calciteFlowItemClose=${this._emitClose} .beforeBack=${this._beforeBack} selected><calcite-button width=half slot=footer appearance=outline kind=brand icon-start=code scale=s @click=${t=>this._emitItemSelected(t,e)} data-item=${e??l} ${c(r)}>${this.messages.insert}</calcite-button><calcite-block expanded .heading=${e.label} .description=${e.description}><div .innerHTML=${w(e.documentation)??""}></div><pre><code ${c(this._colorizeCode)}></code></pre></calcite-block></calcite-flow-item>`:null}render(){return this.closed?null:s`<style>${this._colorizeStyle}</style><calcite-flow ${c(this.flowFocusHandler)}><calcite-flow-item heading-level=2 .heading=${this.messages.suggestions} closable @calciteFlowItemClose=${this._emitClose} .selected=${!this._selectedSuggestion}><calcite-input .value=${this._filterValue} icon=magnifying-glass clearable @calciteInputInput=${e=>this._updateFilterValue(e.currentTarget.value)} class="sticky" scale=m></calcite-input><calcite-list .label=${this.messages.suggestions??"Suggestions"}>${this.renderSuggestionGroups()}</calcite-list></calcite-flow-item>${this.renderSuggestionFlowItem()}</calcite-flow>`}};h("arcgis-arcade-suggestions",g);export{g as ArcgisArcadeSuggestions};
2
+ import{a as w}from"./TULXD5ZA.js";import{b as _,c as n,d as v}from"./3OAWZW4F.js";import{a as f,b}from"./2UXJ4DVI.js";import{a as p}from"./CNE5ADLH.js";import"./HRLNAS7V.js";import{c as m,e as r}from"./C5WMGZYX.js";import"./J4I4EROF.js";import"./LEFE3FVL.js";import"./VWOHL265.js";import"./WUGYEHHP.js";import"./PP3QOCFN.js";import{F as c,G as u,K as h,h as d,j as s,l,n as a}from"./P4SWCWOD.js";import"./BFPEJYVB.js";import"./TJM6I22B.js";import"./H6RQVSYM.js";function S(o){return!Array.isArray(o)||!o.length?!1:Array.isArray(o[0].suggestions)}var $=d`:host{background-color:var(--calcite-color-foreground-1);.notice-container{margin:var(--calcite-spacing-xxs);padding:var(--calcite-spacing-sm);background-color:var(--calcite-color-foreground-1)}.sticky{position:sticky;top:0;z-index:10}calcite-flow{height:100%}calcite-block{p:first-of-type{margin-top:0}code{font-family:var(--calcite-code-family)}pre{direction:ltr;overflow-x:auto;background-color:var(--calcite-color-foreground-2);padding:var(--calcite-spacing-sm);code{font-size:var(--calcite-font-size--2)}}}calcite-list-item-group{background-color:var(--calcite-color-foreground-2)}calcite-flow{[slot=footer]{word-break:break-word}}}`,g=class extends u{constructor(){super(...arguments),this._beforeBack=()=>new Promise(e=>{this._selectedSuggestion=void 0,e()}),this.messages=p(),this._shouldIgnoreDoubleClick=f(),this._colorizeStyle="",this._filterValue="",this.closed=!1,this.arcgisInternalClosePanel=a({bubbles:!1,composed:!1}),this.arcgisInternalItemSelected=a({bubbles:!1,composed:!1})}static{this.properties={_colorizeStyle:16,_filterValue:16,_selectedSuggestion:16,suggestions:0,closed:5}}static{this.styles=$}load(){this._colorizeStyle=n(),this._themeChangedListener=v(()=>this._colorizeStyle=n())}willUpdate(e){e.has("suggestions")&&this.suggestionsPropChanged()}disconnectedCallback(){super.disconnectedCallback(),this._flowObserver?.disconnect(),this._themeChangedListener?.dispose()}suggestionsPropChanged(){this._selectedSuggestion=void 0}flowFocusHandler(e){if(!e){this._flowObserver?.disconnect(),this._flowObserver=void 0;return}this._flowObserver||(this._flowObserver=new MutationObserver(()=>{r(m(e.querySelector("calcite-flow-item:last-child")??e,"calcite-input"))}),this._flowObserver.observe(e,{attributes:!0,attributeFilter:["id"],childList:!0}))}_updateFilterValue(e){this._filterValue=e}_emitItemSelected(e,t){if(this._shouldIgnoreDoubleClick(e))return;let i=e;(!i.key||i.key==="Enter")&&(e.preventDefault(),this.arcgisInternalItemSelected.emit(t.code))}_showSuggestionDetail(e,t){e.stopPropagation(),this._selectedSuggestion=t}_emitClose(){this.arcgisInternalClosePanel.emit()}_colorizeCode(e){e!==void 0&&_(e,this._selectedSuggestion.code,"arcade")}renderSuggestionGroups(){return this.suggestions===void 0?null:S(this.suggestions)?this.suggestions.map(e=>s`<calcite-list-item-group .heading=${e.label}>${this.renderSuggestionListItems(e.suggestions)}</calcite-list-item-group>`):this.renderSuggestionListItems(this.suggestions)}renderSuggestionListItems(e){return e=b(e,"label",this._filterValue),e.length?e.map(t=>s`<calcite-list-item .label=${t.label} .description=${t.description} @calciteListItemSelect=${i=>this._emitItemSelected(i,t)} @keydown=${i=>this._emitItemSelected(i,t)} data-item=${t??l}><calcite-action slot=actions-end .text=${this.messages.expand??""} scale=s icon=chevron-right icon-flip-rtl @click=${i=>this._showSuggestionDetail(i,t)} data-item=${t??l}></calcite-action></calcite-list-item>`):s`<div class="notice-container">${this.messages.noitems}</div>`}renderSuggestionFlowItem(){let e=this._selectedSuggestion;return e?s`<calcite-flow-item heading-level=2 .heading=${this.messages.suggestions} closable @calciteFlowItemClose=${this._emitClose} .beforeBack=${this._beforeBack} selected><calcite-button width=half slot=footer appearance=outline kind=brand icon-start=code scale=s @click=${t=>this._emitItemSelected(t,e)} data-item=${e??l} ${c(r)}>${this.messages.insert}</calcite-button><calcite-block expanded .heading=${e.label} .description=${e.description}><div .innerHTML=${w(e.documentation)??""}></div><pre><code ${c(this._colorizeCode)}></code></pre></calcite-block></calcite-flow-item>`:null}render(){return this.closed?null:s`<style>${this._colorizeStyle}</style><calcite-flow ${c(this.flowFocusHandler)}><calcite-flow-item heading-level=2 .heading=${this.messages.suggestions} closable @calciteFlowItemClose=${this._emitClose} .selected=${!this._selectedSuggestion}><calcite-input .value=${this._filterValue} icon=magnifying-glass clearable @calciteInputInput=${e=>this._updateFilterValue(e.currentTarget.value)} class="sticky" scale=m></calcite-input><calcite-list .label=${this.messages.suggestions??"Suggestions"}>${this.renderSuggestionGroups()}</calcite-list></calcite-flow-item>${this.renderSuggestionFlowItem()}</calcite-flow>`}};h("arcgis-arcade-suggestions",g);export{g as ArcgisArcadeSuggestions};
@@ -1,5 +1,5 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{$ as Oe,$a as vi,$b as hC,$c as te,$d as Qa,$e as Sg,$f as fk,$g as Bk,$h as oR,$i as LR,$j as Eo,$k as bT,A as xs,Aa as tC,Ab as se,Ac as ci,Ad as P0,Ae as fg,Af as lk,Ag as Tk,Ah as Ec,Ai as pn,Aj as Qg,Ak as sT,B as SD,Ba as iC,Bb as nn,Bc as Qt,Bd as O0,Be as qn,Bf as V,Bg as Mk,Bh as Vg,Bi as fn,Bj as NR,Bk as aT,C as tc,Ca as Fo,Cb as JD,Cc as C0,Cd as A0,Ce as Ms,Cf as ck,Cg as Nk,Ch as Ke,Ci as jg,Cj as Id,Ck as Ge,D as wD,Da as nc,Db as e0,Dc as S0,Dd as F0,De as _g,Df as hk,Dg as Pk,Dh as ot,Di as fR,Dj as PR,Dk as qC,E as yD,Ea as ND,Eb as Ci,Ec as Ir,Ed as cg,Ee as mC,Ef as xg,Eg as Hs,Eh as gn,Ei as _R,Ej as OR,Ek as am,F as tn,Fa as PD,Fb as t0,Fc as w0,Fd as at,Fe as $0,Ff as uk,Fg as kr,Fh as Zk,Fi as bR,Fj as AR,Fk as dm,G as xD,Ga as OD,Gb as dc,Gc as y0,Gd as A,Ge as w,Gf as ad,Gg as wc,Gh as Yk,Gi as vR,Gj as FR,Gk as GC,H as Xe,Ha as og,Hb as be,Hc as G,Hd as cc,He as id,Hf as dd,Hg as Ok,Hh as zg,Hi as CR,Hj as Lt,Hk as dT,I as eg,Ia as AD,Ib as i0,Id as ri,Ie as xi,If as gk,Ig as Ak,Ih as Dc,Ii as Ws,Ij as HR,Ik as Mc,J as wr,Ja as ng,Jb as st,Jc as xt,Jd as Wt,Je as pC,Jf as Os,Jg as Rg,Jh as NC,Ji as Yn,Jj as WR,Jk as $C,K as Ba,Ka as oC,Kb as o0,Kc as Oi,Kd as X,Ke as bg,Kf as Ig,Kg as yC,Kh as PC,Ki as Kg,Kj as Tc,Kk as lT,L as tg,La as rg,Lb as yo,Lc as j,Ld as k,Le as Fi,Lf as cn,Lg as xC,Lh as OC,Li as qg,Lj as Jg,Lk as lm,M as Co,Ma as Is,Mb as n0,Mc as zt,Md as hc,Me as Ns,Mf as bc,Mg as yc,Mh as Xk,Mi as SR,Mj as Us,Mk as ZC,N as Va,Na as sg,Nb as lC,Nc as Re,Nd as H0,Ne as di,Nf as CC,Ng as Tg,Nh as Qk,Ni as wR,Nj as BR,Nk as YC,O as ft,Oa as ge,Ob as r0,Oc as H,Od as $,Oe as Z0,Of as Zi,Og as IC,Oh as kc,Oi as dt,Oj as VR,Ok as XC,P as Xv,Pa as _t,Pb as cC,Pc as Ct,Pd as C,Pe as Y0,Pf as As,Pg as Fk,Ph as Rr,Pi as Nr,Pj as zR,Pk as cT,Q as ce,Qa as FD,Qb as Si,Qc as St,Qd as Q,Qe as vg,Qf as mk,Qg as LC,Qh as Je,Qi as Bs,Qj as At,Qk as hT,R as M,Ra as HD,Rb as Za,Rc as an,Rd as Xa,Re as Ho,Rf as SC,Rg as Hk,Rh as mn,Ri as Gg,Rj as bn,Rk as uT,S as D,Sa as qa,Sb as bt,Sc as jn,Sd as W0,Se as fc,Sf as pk,Sg as Wk,Sh as Jk,Si as yR,Sj as em,Sk as cm,T as xe,Ta as ag,Tb as Vt,Tc as Lr,Td as B0,Te as Wo,Tf as Lg,Tg as Mg,Th as eR,Ti as xR,Tj as tm,Tk as Cn,U as ID,Ua as Ls,Ub as Z,Uc as x0,Ud as Kn,Ue as od,Uf as Se,Ug as gd,Uh as fd,Ui as IR,Uj as Lo,Uk as gT,V as ig,Va as rc,Vb as Xt,Vc as B,Vd as V0,Ve as X0,Vf as K,Vg as Ng,Vh as he,Vi as Bi,Vj as UR,Vk as QC,W as kt,Wa as Yt,Wb as s0,Wc as ne,Wd as hg,We as Q0,Wf as hn,Wg as EC,Wh as AC,Wi as Vs,Wj as mo,Wk as mT,X as De,Xa as sc,Xb as Ds,Xc as Fe,Xd as ug,Xe as Cg,Xf as mt,Xg as DC,Xh as Tr,Xi as $g,Xj as jR,Xk as pT,Y as z,Ya as WD,Yb as a0,Yc as ve,Yd as gg,Ye as Ps,Yf as Eg,Yg as xc,Yh as tR,Yi as yd,Yj as Li,Yk as hm,Z as Qv,Za as BD,Zb as d0,Zc as O,Zd as Ts,Ze as J0,Zf as It,Zg as kC,Zh as iR,Zi as Rc,Zj as KR,Zk as fT,_ as oe,_a as nC,_b as lg,_c as I0,_d as Er,_e as _c,_f as vc,_g as Ic,_h as uo,_i as Xi,_j as qR,_k as _T,a as p,aa as Jv,ab as VD,ac as l0,ad as J,ae as uc,af as fC,ag as Yi,ai as nR,aj as ER,ak as UC,al as vT,b as I,ba as je,bb as wt,bc as c0,bd as hi,be as z0,bf as nd,bg as un,bh as Pg,bi as _d,bj as qe,bk as GR,bl as CT,c as Oa,ca as Ao,cb as zD,cc as rn,cd as Jt,ce as U0,cf as ek,cg as _k,ch as Gn,ci as rR,cj as Zg,ck as $R,cl as um,d as Zv,da as LD,db as UD,dc as Me,dd as L0,de as Ja,df as _C,dg as ld,dh as Og,di as sR,dj as DR,dk as jC,dl as Nc,e as ae,ea as ED,eb as dg,ec as h0,ed as q,ee as Ai,ef as tk,eg as Fs,eh as Ag,ei as aR,ej as zs,ek as ZR,el as ST,f as Te,fa as Mi,fb as So,fc as u0,fd as Gi,fe as gc,ff as wg,fg as cd,fh as $n,fi as dR,fj as Pr,fk as YR,fl as Ld,g as oi,ga as yr,gb as wo,gc as tt,gd as wi,ge as ln,gf as ik,gg as Dg,gh as RC,gj as Or,gk as im,gl as wT,h as Aa,ha as Zt,hb as jD,hc as g0,hd as E0,he as j0,hf as ok,hg as bk,hh as Vk,hi as lR,hj as Ar,hk as vn,hl as yT,i as ji,ia as ic,ib as rC,ic as Pi,id as xo,ie as mc,if as nk,ig as vk,ii as cR,ij as Rt,ik as om,il as Pc,j as Ye,ja as on,jb as KD,jc as xr,jd as ht,je as pc,jf as rk,jg as Ck,jh as Lc,ji as hR,jj as Fr,jk as nm,jl as xT,k as Fa,ka as Ae,kb as qD,kc as m0,kd as pe,ke as gC,kf as it,kg as Sk,kh as Fg,ki as uR,kj as _n,kk as XR,kl as JC,l as fD,la as za,lb as Ga,lc as p0,ld as yi,le as mg,lf as Hi,lg as Cc,lh as Zn,li as gR,lj as WC,lk as QR,ll as gm,m as _D,ma as DD,mb as GD,mc as sn,md as co,me as re,mf as sk,mg as wk,mh as zk,mi as bd,mj as Ii,mk as JR,ml as IT,n as Qu,na as _i,nb as sC,nc as Un,nd as dn,ne as si,nf as ak,ng as yk,nh as md,ni as FC,nj as ke,nk as eT,nl as mm,o as Ju,oa as kD,ob as $D,oc as f0,od as D0,oe as ai,of as rd,og as wC,oh as Hg,oi as vd,oj as BC,ok as rm,ol as Vo,p as bD,pa as Ua,pb as ac,pc as _0,pd as k0,pe as ti,pf as Wi,pg as xk,ph as pd,pi as ee,pj as Xn,pk as Et,pl as LT,q as Ha,qa as RD,qb as ZD,qc as ks,qd as uC,qe as K0,qf as Be,qg as Ik,qh as Uk,qi as Ug,qj as kR,qk as KC,ql as ET,r as Yv,ra as ja,rb as YD,rc as ni,rd as $i,re as ed,rf as yg,rg as Lk,rh as TC,ri as Cd,rj as RR,rk as js,rl as DT,s as ys,sa as zn,sb as aC,sc as b0,sd as R0,se as pg,sf as bC,sg as Ek,sh as jk,si as ue,sj as Tt,sk as tT,sl as kT,t as lo,ta as TD,tb as Es,tc as me,td as ei,te as We,tf as ho,tg as kg,th as Wg,ti as Sd,tj as xd,tk as Mt,u as _e,ua as bi,ub as XD,uc as yt,ud as T0,ue as td,uf as ii,ug as Dk,uh as MC,ui as wd,uj as Yg,uk as Do,v as Sr,va as oc,vb as QD,vc as qi,vd as Ya,ve as Ne,vf as vC,vg as Sc,vh as Bg,vi as Mr,vj as VC,vk as sm,w as vD,wa as vt,wb as R,wc as U,wd as M0,we as Io,wf as dk,wg as hd,wh as Kk,wi as HC,wj as zC,wk as iT,x as Wa,xa as Ka,xb as Ni,xc as Rs,xd as N0,xe as q0,xf as Bo,xg as ud,xh as qk,xi as mR,xj as TR,xk as oT,y as Ki,ya as eC,yb as dC,yc as W,yd as lc,ye as Dr,yf as sd,yg as kk,yh as Gk,yi as pR,yj as MR,yk as nT,z as CD,za as MD,zb as $a,zc as v0,zd as gt,ze as G0,zf as fe,zg as Rk,zh as $k,zi as go,zj as Xg,zk as rT}from"./XCISKBJD.js";var pm=class extends ht{constructor(){super({id:"diffEditor.toggleCollapseUnchangedRegions",title:I(101,"Toggle Collapse Unchanged Regions"),icon:B.map,toggled:O.has("config.diffEditor.hideUnchangedRegions.enabled"),precondition:O.has("isInDiffEditor"),menu:{when:O.has("isInDiffEditor"),id:q.EditorTitle,order:22,group:"navigation"}})}run(e,...t){let i=e.get(re),o=!i.getValue("diffEditor.hideUnchangedRegions.enabled");i.updateValue("diffEditor.hideUnchangedRegions.enabled",o)}},Oc=class extends ht{constructor(){super({id:"diffEditor.toggleShowMovedCodeBlocks",title:I(102,"Toggle Show Moved Code Blocks"),precondition:O.has("isInDiffEditor")})}run(e,...t){let i=e.get(re),o=!i.getValue("diffEditor.experimental.showMoves");i.updateValue("diffEditor.experimental.showMoves",o)}},fm=class extends ht{constructor(){super({id:"diffEditor.toggleUseInlineViewWhenSpaceIsLimited",title:I(103,"Toggle Use Inline View When Space Is Limited"),precondition:O.has("isInDiffEditor")})}run(e,...t){let i=e.get(re),o=!i.getValue("diffEditor.useInlineViewWhenSpaceIsLimited");i.updateValue("diffEditor.useInlineViewWhenSpaceIsLimited",o)}},Fc=I(104,"Diff Editor"),_m=class extends ri{constructor(){super({id:"diffEditor.switchSide",title:I(105,"Switch Side"),icon:B.arrowSwap,precondition:O.has("isInDiffEditor"),f1:!0,category:Fc})}runEditorCommand(e,t,i){let o=Ks(e);if(o instanceof Us){if(i&&i.dryRun)return{destinationSelection:o.mapToOtherSide().destinationSelection};o.switchSide()}}},bm=class extends ri{constructor(){super({id:"diffEditor.exitCompareMove",title:I(106,"Exit Compare Move"),icon:B.close,precondition:w.comparingMovedCode,f1:!1,category:Fc,keybinding:{weight:1e4,primary:9}})}runEditorCommand(e,t,...i){let o=Ks(e);o instanceof Us&&o.exitCompareMove()}},vm=class extends ri{constructor(){super({id:"diffEditor.collapseAllUnchangedRegions",title:I(107,"Collapse All Unchanged Regions"),icon:B.fold,precondition:O.has("isInDiffEditor"),f1:!0,category:Fc})}runEditorCommand(e,t,...i){let o=Ks(e);o instanceof Us&&o.collapseAllUnchangedRegions()}},Cm=class extends ri{constructor(){super({id:"diffEditor.showAllUnchangedRegions",title:I(108,"Show All Unchanged Regions"),icon:B.unfold,precondition:O.has("isInDiffEditor"),f1:!0,category:Fc})}runEditorCommand(e,t,...i){let o=Ks(e);o instanceof Us&&o.showAllUnchangedRegions()}},Ed=class extends ht{constructor(){super({id:"diffEditor.revert",title:I(109,"Revert"),f1:!0,category:Fc,precondition:O.has("isInDiffEditor")})}run(e,t){return t?this.runViaToolbarContext(e,t):this.runViaCursorOrSelection(e)}runViaCursorOrSelection(e){let t=Ks(e);t instanceof Us&&t.revertFocusedRangeMappings()}runViaToolbarContext(e,t){let i=BP(e,t.originalUri,t.modifiedUri);i instanceof Us&&i.revertRangeMappings(t.mapping.innerChanges??[])}},RT=I(110,"Accessible Diff Viewer"),Dd=class s extends ht{static{this.id="editor.action.accessibleDiffViewer.next"}constructor(){super({id:s.id,title:I(111,"Go to Next Difference"),category:RT,precondition:O.has("isInDiffEditor"),keybinding:{primary:65,weight:100},f1:!0})}run(e){Ks(e)?.accessibleDiffViewerNext()}},Ac=class s extends ht{static{this.id="editor.action.accessibleDiffViewer.prev"}constructor(){super({id:s.id,title:I(112,"Go to Previous Difference"),category:RT,precondition:O.has("isInDiffEditor"),keybinding:{primary:1089,weight:100},f1:!0})}run(e){Ks(e)?.accessibleDiffViewerPrev()}};function BP(s,e,t){return s.get(Re).listDiffEditors().find(n=>{let r=n.getModifiedEditor(),a=n.getOriginalEditor();return r&&r.getModel()?.uri.toString()===t.toString()&&a&&a.getModel()?.uri.toString()===e.toString()})||null}function Ks(s){let t=s.get(Re).listDiffEditors(),i=sn();if(i){for(let o of t)if(o.getContainerDomNode().contains(i))return o}return null}pe(pm);pe(Oc);pe(fm);wi.appendMenuItem(q.EditorTitle,{command:{id:new Oc().desc.id,title:p(135,"Show Moved Code Blocks"),icon:B.move,toggled:I0.create("config.diffEditor.experimental.showMoves",!0),precondition:O.has("isInDiffEditor")},order:10,group:"1_diff",when:O.has("isInDiffEditor")});pe(Ed);for(let s of[{icon:B.arrowRight,key:w.diffEditorInlineMode.toNegated()},{icon:B.discard,key:w.diffEditorInlineMode}])wi.appendMenuItem(q.DiffEditorHunkToolbar,{command:{id:new Ed().desc.id,title:p(136,"Revert Block"),icon:s.icon},when:O.and(w.diffEditorModifiedWritable,s.key),order:5,group:"primary"}),wi.appendMenuItem(q.DiffEditorSelectionToolbar,{command:{id:new Ed().desc.id,title:p(137,"Revert Selection"),icon:s.icon},when:O.and(w.diffEditorModifiedWritable,s.key),order:5,group:"primary"});pe(_m);pe(bm);pe(vm);pe(Cm);wi.appendMenuItem(q.EditorTitle,{command:{id:Dd.id,title:p(138,"Open Accessible Diff Viewer"),precondition:O.has("isInDiffEditor")},order:10,group:"2_diff",when:O.and(w.accessibleDiffViewerVisible.negate(),O.has("isInDiffEditor"))});ve.registerCommandAlias("editor.action.diffReview.next",Dd.id);pe(Dd);ve.registerCommandAlias("editor.action.diffReview.prev",Ac.id);pe(Ac);var VP=function(s,e,t,i){var o=arguments.length,n=o<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(s,e,t,i);else for(var a=s.length-1;a>=0;a--)(r=s[a])&&(n=(o<3?r(n):o>3?r(e,t,n):r(e,t))||n);return o>3&&n&&Object.defineProperty(e,t,n),n},zP=function(s,e){return function(t,i){e(t,i,s)}},eS,Sm=new te("selectionAnchorSet",!1),Hr=class{static{eS=this}static{this.ID="editor.contrib.selectionAnchorController"}static get(e){return e.getContribution(eS.ID)}constructor(e,t){this.editor=e,this.selectionAnchorSetContextKey=Sm.bindTo(t),this.modelChangeListener=e.onDidChangeModel(()=>this.selectionAnchorSetContextKey.reset())}setSelectionAnchor(){if(this.editor.hasModel()){let e=this.editor.getPosition();this.editor.changeDecorations(t=>{this.decorationId&&t.removeDecoration(this.decorationId),this.decorationId=t.addDecoration(Q.fromPositions(e,e),{description:"selection-anchor",stickiness:1,hoverMessage:new dt().appendText(p(849,"Selection Anchor")),className:"selection-anchor"})}),this.selectionAnchorSetContextKey.set(!!this.decorationId),xt(p(850,"Anchor set at {0}:{1}",e.lineNumber,e.column))}}goToSelectionAnchor(){if(this.editor.hasModel()&&this.decorationId){let e=this.editor.getModel().getDecorationRange(this.decorationId);e&&this.editor.setPosition(e.getStartPosition())}}selectFromAnchorToCursor(){if(this.editor.hasModel()&&this.decorationId){let e=this.editor.getModel().getDecorationRange(this.decorationId);if(e){let t=this.editor.getPosition();this.editor.setSelection(Q.fromPositions(e.getStartPosition(),t)),this.cancelSelectionAnchor()}}}cancelSelectionAnchor(){if(this.decorationId){let e=this.decorationId;this.editor.changeDecorations(t=>{t.removeDecoration(e),this.decorationId=void 0}),this.selectionAnchorSetContextKey.set(!1)}}dispose(){this.cancelSelectionAnchor(),this.modelChangeListener.dispose()}};Hr=eS=VP([zP(1,J)],Hr);var tS=class extends A{constructor(){super({id:"editor.action.setSelectionAnchor",label:I(851,"Set Selection Anchor"),precondition:void 0,kbOpts:{kbExpr:w.editorTextFocus,primary:Xe(2089,2080),weight:100}})}async run(e,t){Hr.get(t)?.setSelectionAnchor()}},iS=class extends A{constructor(){super({id:"editor.action.goToSelectionAnchor",label:I(852,"Go to Selection Anchor"),precondition:Sm})}async run(e,t){Hr.get(t)?.goToSelectionAnchor()}},oS=class extends A{constructor(){super({id:"editor.action.selectFromAnchorToCursor",label:I(853,"Select from Anchor to Cursor"),precondition:Sm,kbOpts:{kbExpr:w.editorTextFocus,primary:Xe(2089,2089),weight:100}})}async run(e,t){Hr.get(t)?.selectFromAnchorToCursor()}},nS=class extends A{constructor(){super({id:"editor.action.cancelSelectionAnchor",label:I(854,"Cancel Selection Anchor"),precondition:Sm,kbOpts:{kbExpr:w.editorTextFocus,primary:9,weight:100}})}async run(e,t){Hr.get(t)?.cancelSelectionAnchor()}};$(Hr.ID,Hr,4);k(tS);k(iS);k(oS);k(nS);var UP=K("editorOverviewRuler.bracketMatchForeground","#A0A0A0",p(855,"Overview ruler marker color for matching brackets.")),rS=class extends A{constructor(){super({id:"editor.action.jumpToBracket",label:I(857,"Go to Bracket"),precondition:void 0,kbOpts:{kbExpr:w.editorTextFocus,primary:3165,weight:100}})}run(e,t){qs.get(t)?.jumpToBracket()}},sS=class extends A{constructor(){super({id:"editor.action.selectToBracket",label:I(858,"Select to Bracket"),precondition:void 0,metadata:{description:I(859,"Select the text inside and including the brackets or curly braces"),args:[{name:"args",schema:{type:"object",properties:{selectBrackets:{type:"boolean",default:!0}}}}]}})}run(e,t,i){let o=!0;i&&i.selectBrackets===!1&&(o=!1),qs.get(t)?.selectToBracket(o)}},aS=class extends A{constructor(){super({id:"editor.action.removeBrackets",label:I(860,"Remove Brackets"),precondition:void 0,kbOpts:{kbExpr:w.editorTextFocus,primary:2561,weight:100},canTriggerInlineEdits:!0})}run(e,t){qs.get(t)?.removeBrackets(this.id)}},dS=class{constructor(e,t,i){this.position=e,this.brackets=t,this.options=i}},qs=class s extends D{static{this.ID="editor.contrib.bracketMatchingController"}static get(e){return e.getContribution(s.ID)}constructor(e){super(),this._editor=e,this._lastBracketsData=[],this._lastVersionId=0,this._decorations=this._editor.createDecorationsCollection(),this._updateBracketsSoon=this._register(new Ae(()=>this._updateBrackets(),50)),this._matchBrackets=this._editor.getOption(80),this._updateBracketsSoon.schedule(),this._register(e.onDidChangeCursorPosition(t=>{this._matchBrackets!=="never"&&this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeModelContent(t=>{this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeModel(t=>{this._lastBracketsData=[],this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeModelLanguageConfiguration(t=>{this._lastBracketsData=[],this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeConfiguration(t=>{t.hasChanged(80)&&(this._matchBrackets=this._editor.getOption(80),this._decorations.clear(),this._lastBracketsData=[],this._lastVersionId=0,this._updateBracketsSoon.schedule())})),this._register(e.onDidBlurEditorWidget(()=>{this._updateBracketsSoon.schedule()})),this._register(e.onDidFocusEditorWidget(()=>{this._updateBracketsSoon.schedule()}))}jumpToBracket(){if(!this._editor.hasModel())return;let e=this._editor.getModel(),t=this._editor.getSelections().map(i=>{let o=i.getStartPosition(),n=e.bracketPairs.matchBracket(o),r=null;if(n)n[0].containsPosition(o)&&!n[1].containsPosition(o)?r=n[1].getStartPosition():n[1].containsPosition(o)&&(r=n[0].getStartPosition());else{let a=e.bracketPairs.findEnclosingBrackets(o);if(a)r=a[1].getStartPosition();else{let d=e.bracketPairs.findNextBracket(o);d&&d.range&&(r=d.range.getStartPosition())}}return r?new Q(r.lineNumber,r.column,r.lineNumber,r.column):new Q(o.lineNumber,o.column,o.lineNumber,o.column)});this._editor.setSelections(t),this._editor.revealRange(t[0])}selectToBracket(e){if(!this._editor.hasModel())return;let t=this._editor.getModel(),i=[];this._editor.getSelections().forEach(o=>{let n=o.getStartPosition(),r=t.bracketPairs.matchBracket(n);if(!r&&(r=t.bracketPairs.findEnclosingBrackets(n),!r)){let l=t.bracketPairs.findNextBracket(n);l&&l.range&&(r=t.bracketPairs.matchBracket(l.range.getStartPosition()))}let a=null,d=null;if(r){r.sort(C.compareRangesUsingStarts);let[l,c]=r;if(a=e?l.getStartPosition():l.getEndPosition(),d=e?c.getEndPosition():c.getStartPosition(),c.containsPosition(n)){let h=a;a=d,d=h}}a&&d&&i.push(new Q(a.lineNumber,a.column,d.lineNumber,d.column))}),i.length>0&&(this._editor.setSelections(i),this._editor.revealRange(i[0]))}removeBrackets(e){if(!this._editor.hasModel())return;let t=this._editor.getModel();this._editor.getSelections().forEach(i=>{let o=i.getPosition(),n=t.bracketPairs.matchBracket(o);n||(n=t.bracketPairs.findEnclosingBrackets(o)),n&&(this._editor.pushUndoStop(),this._editor.executeEdits(e,[{range:n[0],text:""},{range:n[1],text:""}]),this._editor.pushUndoStop())})}static{this._DECORATION_OPTIONS_WITH_OVERVIEW_RULER=ee.register({description:"bracket-match-overview",stickiness:1,className:"bracket-match",inlineClassName:"bracket-match-inline",overviewRuler:{color:ot(UP),position:Ai.Center}})}static{this._DECORATION_OPTIONS_WITHOUT_OVERVIEW_RULER=ee.register({description:"bracket-match-no-overview",stickiness:1,className:"bracket-match",inlineClassName:"bracket-match-inline"})}_updateBrackets(){if(this._matchBrackets==="never")return;this._recomputeBrackets();let e=[],t=0;for(let i of this._lastBracketsData){let o=i.brackets;o&&(e[t++]={range:o[0],options:i.options},e[t++]={range:o[1],options:i.options})}this._decorations.set(e)}_recomputeBrackets(){if(!this._editor.hasModel()||!this._editor.hasWidgetFocus()){this._lastBracketsData=[],this._lastVersionId=0;return}let e=this._editor.getSelections();if(e.length>100){this._lastBracketsData=[],this._lastVersionId=0;return}let t=this._editor.getModel(),i=t.getVersionId(),o=[];this._lastVersionId===i&&(o=this._lastBracketsData);let n=[],r=0;for(let h=0,u=e.length;h<u;h++){let g=e[h];g.isEmpty()&&(n[r++]=g.getStartPosition())}n.length>1&&n.sort(H.compare);let a=[],d=0,l=0,c=o.length;for(let h=0,u=n.length;h<u;h++){let g=n[h];for(;l<c&&o[l].position.isBefore(g);)l++;if(l<c&&o[l].position.equals(g))a[d++]=o[l];else{let m=t.bracketPairs.matchBracket(g,20),f=s._DECORATION_OPTIONS_WITH_OVERVIEW_RULER;!m&&this._matchBrackets==="always"&&(m=t.bracketPairs.findEnclosingBrackets(g,20),f=s._DECORATION_OPTIONS_WITHOUT_OVERVIEW_RULER),a[d++]=new dS(g,m,f)}}this._lastBracketsData=a,this._lastVersionId=i}};$(qs.ID,qs,1);k(sS);k(rS);k(aS);wi.appendMenuItem(q.MenubarGoMenu,{group:"5_infile_nav",command:{id:"editor.action.jumpToBracket",title:p(856,"Go to &&Bracket")},order:2});gn((s,e)=>{let t=s.getColor(Zk);t&&e.addRule(`.monaco-editor .bracket-match-inline { color: ${t} !important; }`)});var wm=class{constructor(e,t){this._selection=e,this._isMovingLeft=t}getEditOperations(e,t){if(this._selection.startLineNumber!==this._selection.endLineNumber||this._selection.isEmpty())return;let i=this._selection.startLineNumber,o=this._selection.startColumn,n=this._selection.endColumn;if(!(this._isMovingLeft&&o===1)&&!(!this._isMovingLeft&&n===e.getLineMaxColumn(i)))if(this._isMovingLeft){let r=new C(i,o-1,i,o),a=e.getValueInRange(r);t.addEditOperation(r,null),t.addEditOperation(new C(i,n,i,n),a)}else{let r=new C(i,n,i,n+1),a=e.getValueInRange(r);t.addEditOperation(r,null),t.addEditOperation(new C(i,o,i,o),a)}}computeCursorState(e,t){return this._isMovingLeft?new Q(this._selection.startLineNumber,this._selection.startColumn-1,this._selection.endLineNumber,this._selection.endColumn-1):new Q(this._selection.startLineNumber,this._selection.startColumn+1,this._selection.endLineNumber,this._selection.endColumn+1)}};var ym=class extends A{constructor(e,t){super(t),this.left=e}run(e,t){if(!t.hasModel())return;let i=[],o=t.getSelections();for(let n of o)i.push(new wm(n,this.left));t.pushUndoStop(),t.executeCommands(this.id,i),t.pushUndoStop()}},lS=class extends ym{constructor(){super(!0,{id:"editor.action.moveCarretLeftAction",label:I(861,"Move Selected Text Left"),precondition:w.writable})}},cS=class extends ym{constructor(){super(!1,{id:"editor.action.moveCarretRightAction",label:I(862,"Move Selected Text Right"),precondition:w.writable})}};k(lS);k(cS);var hS=class extends A{constructor(){super({id:"editor.action.transposeLetters",label:I(863,"Transpose Letters"),precondition:w.writable,kbOpts:{kbExpr:w.textInputFocus,primary:0,mac:{primary:306},weight:100}})}run(e,t){if(!t.hasModel())return;let i=t.getModel(),o=[],n=t.getSelections();for(let r of n){if(!r.isEmpty())continue;let a=r.startLineNumber,d=r.startColumn,l=i.getLineMaxColumn(a);if(a===1&&(d===1||d===2&&l===2))continue;let c=d===l?r.getPosition():ug.rightPosition(i,r.getPosition().lineNumber,r.getPosition().column),h=ug.leftPosition(i,c),u=ug.leftPosition(i,h),g=i.getValueInRange(C.fromPositions(u,h)),m=i.getValueInRange(C.fromPositions(h,c)),f=C.fromPositions(u,c);o.push(new Kn(f,m+g))}o.length>0&&(t.pushUndoStop(),t.executeCommands(this.id,o),t.pushUndoStop())}};k(hS);var jP=function(s,e,t,i){var o=arguments.length,n=o<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(s,e,t,i);else for(var a=s.length-1;a>=0;a--)(r=s[a])&&(n=(o<3?r(n):o>3?r(e,t,n):r(e,t))||n);return o>3&&n&&Object.defineProperty(e,t,n),n},KP=function(s,e){return function(t,i){e(t,i,s)}},qP=ee.register({description:"inline-progress-widget",stickiness:1,showIfCollapsed:!0,after:{content:ng,inlineClassName:"inline-editor-progress-decoration",inlineClassNameAffectsLetterSpacing:!0,widthInEm:1}}),uS=class s extends D{static{this.baseId="editor.widget.inlineProgressWidget"}constructor(e,t,i,o,n){super(),this.typeId=e,this.editor=t,this.range=i,this.delegate=n,this.allowEditorOverflow=!1,this.suppressMouseDown=!0,this.create(o),this.editor.addContentWidget(this),this.editor.layoutContentWidget(this)}create(e){this.domNode=W(".inline-progress-widget"),this.domNode.role="button",this.domNode.title=e;let t=W("span.icon");this.domNode.append(t),t.classList.add(...ne.asClassNameArray(B.loading),"codicon-modifier-spin");let i=()=>{let o=this.editor.getOption(75);this.domNode.style.height=`${o}px`,this.domNode.style.width=`${Math.ceil(.8*o)}px`};i(),this._register(this.editor.onDidChangeConfiguration(o=>{(o.hasChanged(61)||o.hasChanged(75))&&i()})),this._register(Z(this.domNode,me.CLICK,o=>{this.delegate.cancel()}))}getId(){return s.baseId+"."+this.typeId}getDomNode(){return this.domNode}getPosition(){return{position:{lineNumber:this.range.startLineNumber,column:this.range.startColumn},preference:[0]}}dispose(){super.dispose(),this.editor.removeContentWidget(this)}},kd=class extends D{constructor(e,t,i){super(),this.id=e,this._editor=t,this._instantiationService=i,this._showDelay=500,this._showPromise=this._register(new xe),this._currentWidget=this._register(new xe),this._operationIdPool=0,this._currentDecorations=t.createDecorationsCollection()}dispose(){super.dispose(),this._currentDecorations.clear()}async showWhile(e,t,i,o,n){let r=this._operationIdPool++;this._currentOperation=r,this.clear(),this._showPromise.value=Zt(()=>{let a=C.fromPositions(e);this._currentDecorations.set([{range:a,options:qP}]).length>0&&(this._currentWidget.value=this._instantiationService.createInstance(uS,this.id,this._editor,a,t,o))},n??this._showDelay);try{return await i}finally{this._currentOperation===r&&(this.clear(),this._currentOperation=void 0)}}clear(){this._showPromise.clear(),this._currentDecorations.clear(),this._currentWidget.clear()}};kd=jP([KP(2,j)],kd);var He=class s{static{this.sep="."}static{this.None=new s("@@none@@")}static{this.Empty=new s("")}constructor(e){this.value=e}equals(e){return this.value===e.value}contains(e){return this.equals(e)||this.value===""||e.value.startsWith(this.value+s.sep)}intersects(e){return this.contains(e)||e.contains(this)}append(...e){return new s((this.value?[this.value,...e]:e).join(s.sep))}};var GP=function(s,e,t,i){var o=arguments.length,n=o<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(s,e,t,i);else for(var a=s.length-1;a>=0;a--)(r=s[a])&&(n=(o<3?r(n):o>3?r(e,t,n):r(e,t))||n);return o>3&&n&&Object.defineProperty(e,t,n),n},TT=function(s,e){return function(t,i){e(t,i,s)}},xm,Ut=class{static{xm=this}static{this.ID="editor.contrib.messageController"}static{this.MESSAGE_VISIBLE=new te("messageVisible",!1,p(1353,"Whether the editor is currently showing an inline message"))}static get(e){return e.getContribution(xm.ID)}constructor(e,t,i){this._openerService=i,this._messageWidget=new xe,this._messageListeners=new M,this._mouseOverMessage=!1,this._editor=e,this._visible=xm.MESSAGE_VISIBLE.bindTo(t)}dispose(){this._messageListeners.dispose(),this._messageWidget.dispose(),this._visible.reset()}showMessage(e,t){if(xt(Bs(e)?e.value:e),this._visible.set(!0),this._messageWidget.clear(),this._messageListeners.clear(),Bs(e)){let o=this._messageListeners.add(Vs(e,{actionHandler:(n,r)=>{this.closeMessage(),KR(this._openerService,n,r.isTrusted)}}));this._messageWidget.value=new Hc(this._editor,t,o.element)}else this._messageWidget.value=new Hc(this._editor,t,e);this._messageListeners.add(De.debounce(this._editor.onDidBlurEditorText,(o,n)=>n,0)(()=>{this._mouseOverMessage||this._messageWidget.value&&m0(sn(),this._messageWidget.value.getDomNode())||this.closeMessage()})),this._messageListeners.add(this._editor.onDidChangeCursorPosition(()=>this.closeMessage())),this._messageListeners.add(this._editor.onDidDispose(()=>this.closeMessage())),this._messageListeners.add(this._editor.onDidChangeModel(()=>this.closeMessage())),this._messageListeners.add(Z(this._messageWidget.value.getDomNode(),me.MOUSE_ENTER,()=>this._mouseOverMessage=!0,!0)),this._messageListeners.add(Z(this._messageWidget.value.getDomNode(),me.MOUSE_LEAVE,()=>this._mouseOverMessage=!1,!0));let i;this._messageListeners.add(this._editor.onMouseMove(o=>{o.target.position&&(i?i.containsPosition(o.target.position)||this.closeMessage():i=new C(t.lineNumber-3,1,o.target.position.lineNumber+3,1))}))}closeMessage(){this._visible.reset(),this._messageListeners.clear(),this._messageWidget.value&&this._messageListeners.add(Hc.fadeOut(this._messageWidget.value))}};Ut=xm=GP([TT(1,J),TT(2,mo)],Ut);var $P=at.bindToContribution(Ut.get);X(new $P({id:"leaveEditorMessage",precondition:Ut.MESSAGE_VISIBLE,handler:s=>s.closeMessage(),kbOpts:{weight:130,primary:9}}));var Hc=class{static fadeOut(e){let t=()=>{e.dispose(),clearTimeout(i),e.getDomNode().removeEventListener("animationend",t)},i=setTimeout(t,110);return e.getDomNode().addEventListener("animationend",t),e.getDomNode().classList.add("fadeOut"),{dispose:t}}constructor(e,{lineNumber:t,column:i},o){this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._editor=e,this._editor.revealLinesInCenterIfOutsideViewport(t,t,0),this._position={lineNumber:t,column:i},this._domNode=document.createElement("div"),this._domNode.classList.add("monaco-editor-overlaymessage"),this._domNode.style.marginLeft="-6px";let n=document.createElement("div");n.classList.add("anchor","top"),this._domNode.appendChild(n);let r=document.createElement("div");typeof o=="string"?(r.classList.add("message"),r.textContent=o):(o.classList.add("message"),r.appendChild(o)),this._domNode.appendChild(r);let a=document.createElement("div");a.classList.add("anchor","below"),this._domNode.appendChild(a),this._editor.addContentWidget(this),this._domNode.classList.add("fadeIn")}dispose(){this._editor.removeContentWidget(this)}getId(){return"messageoverlay"}getDomNode(){return this._domNode}getPosition(){return{position:this._position,preference:[1,2],positionAffinity:1}}afterRender(e){this._domNode.classList.toggle("below",e===2)}};$(Ut.ID,Ut,4);var mS=function(s,e,t,i){var o=arguments.length,n=o<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(s,e,t,i);else for(var a=s.length-1;a>=0;a--)(r=s[a])&&(n=(o<3?r(n):o>3?r(e,t,n):r(e,t))||n);return o>3&&n&&Object.defineProperty(e,t,n),n},Wc=function(s,e){return function(t,i){e(t,i,s)}},Bc=class{constructor(e){this.copyMimeTypes=[],this.kind=e,this.providedDropEditKinds=[this.kind],this.providedPasteEditKinds=[this.kind]}async provideDocumentPasteEdits(e,t,i,o,n){let r=await this.getEdit(i,n);if(r)return{edits:[{insertText:r.insertText,title:r.title,kind:r.kind,handledMimeType:r.handledMimeType,yieldTo:r.yieldTo}],dispose(){}}}async provideDocumentDropEdits(e,t,i,o){let n=await this.getEdit(i,o);if(n)return{edits:[{insertText:n.insertText,title:n.title,kind:n.kind,handledMimeType:n.handledMimeType,yieldTo:n.yieldTo}],dispose(){}}}},Qn=class s extends Bc{static{this.id="text"}constructor(){super(He.Empty.append("text","plain")),this.id=s.id,this.dropMimeTypes=[ti.text],this.pasteMimeTypes=[ti.text]}async getEdit(e,t){let i=e.get(ti.text);if(!i||e.has(ti.uriList))return;let o=await i.asString();return{handledMimeType:ti.text,title:p(980,"Insert Plain Text"),insertText:o,kind:this.kind}}},Im=class extends Bc{constructor(){super(He.Empty.append("uri","path","absolute")),this.dropMimeTypes=[ti.uriList],this.pasteMimeTypes=[ti.uriList]}async getEdit(e,t){let i=await MT(e);if(!i.length||t.isCancellationRequested)return;let o=0,n=i.map(({uri:a,originalText:d})=>a.scheme===_t.file?a.fsPath:(o++,d)).join(" "),r;return o>0?r=i.length>1?p(981,"Insert Uris"):p(982,"Insert Uri"):r=i.length>1?p(983,"Insert Paths"):p(984,"Insert Path"),{handledMimeType:ti.uriList,insertText:n,title:r,kind:this.kind}}},Lm=class extends Bc{constructor(e){super(He.Empty.append("uri","path","relative")),this._workspaceContextService=e,this.dropMimeTypes=[ti.uriList],this.pasteMimeTypes=[ti.uriList]}async getEdit(e,t){let i=await MT(e);if(!i.length||t.isCancellationRequested)return;let o=vi(i.map(({uri:n})=>{let r=this._workspaceContextService.getWorkspaceFolder(n);return r?N0(r.uri,n):void 0}));if(o.length)return{handledMimeType:ti.uriList,insertText:o.join(" "),title:i.length>1?p(985,"Insert Relative Paths"):p(986,"Insert Relative Path"),kind:this.kind}}};Lm=mS([Wc(0,Eo)],Lm);var gS=class{constructor(){this.kind=new He("html"),this.providedPasteEditKinds=[this.kind],this.copyMimeTypes=[],this.pasteMimeTypes=["text/html"],this._yieldTo=[{mimeType:ti.text}]}async provideDocumentPasteEdits(e,t,i,o,n){if(o.triggerKind!==fc.PasteAs&&!o.only?.contains(this.kind))return;let a=await i.get("text/html")?.asString();if(!(!a||n.isCancellationRequested))return{dispose(){},edits:[{insertText:a,yieldTo:this._yieldTo,title:p(987,"Insert HTML"),kind:this.kind}]}}};async function MT(s){let e=s.get(ti.uriList);if(!e)return[];let t=await e.asString(),i=[];for(let o of Bg.parse(t))try{i.push({uri:ge.parse(o),originalText:o})}catch{}return i}var Gs={scheme:"*",hasAccessToAllModels:!0},Em=class extends D{constructor(e,t){super(),this._register(e.documentDropEditProvider.register(Gs,new Qn)),this._register(e.documentDropEditProvider.register(Gs,new Im)),this._register(e.documentDropEditProvider.register(Gs,new Lm(t)))}};Em=mS([Wc(0,V),Wc(1,Eo)],Em);var Dm=class extends D{constructor(e,t){super(),this._register(e.documentPasteEditProvider.register(Gs,new Qn)),this._register(e.documentPasteEditProvider.register(Gs,new Im)),this._register(e.documentPasteEditProvider.register(Gs,new Lm(t))),this._register(e.documentPasteEditProvider.register(Gs,new gS))}};Dm=mS([Wc(0,V),Wc(1,Eo)],Dm);var pS=class s{constructor(){this.value="",this.pos=0}static{this._table={36:0,58:1,44:2,123:3,125:4,92:5,47:6,124:7,43:11,45:12,63:13}}static isDigitCharacter(e){return e>=48&&e<=57}static isVariableCharacter(e){return e===95||e>=97&&e<=122||e>=65&&e<=90}text(e){this.value=e,this.pos=0}tokenText(e){return this.value.substr(e.pos,e.len)}next(){if(this.pos>=this.value.length)return{type:14,pos:this.pos,len:0};let e=this.pos,t=0,i=this.value.charCodeAt(e),o;if(o=s._table[i],typeof o=="number")return this.pos+=1,{type:o,pos:e,len:1};if(s.isDigitCharacter(i)){o=8;do t+=1,i=this.value.charCodeAt(e+t);while(s.isDigitCharacter(i));return this.pos+=t,{type:o,pos:e,len:t}}if(s.isVariableCharacter(i)){o=9;do i=this.value.charCodeAt(e+ ++t);while(s.isVariableCharacter(i)||s.isDigitCharacter(i));return this.pos+=t,{type:o,pos:e,len:t}}o=10;do t+=1,i=this.value.charCodeAt(e+t);while(!isNaN(i)&&typeof s._table[i]>"u"&&!s.isDigitCharacter(i)&&!s.isVariableCharacter(i));return this.pos+=t,{type:o,pos:e,len:t}}},Wr=class{constructor(){this._children=[]}appendChild(e){return e instanceof jt&&this._children[this._children.length-1]instanceof jt?this._children[this._children.length-1].value+=e.value:(e.parent=this,this._children.push(e)),this}replace(e,t){let{parent:i}=e,o=i.children.indexOf(e),n=i.children.slice(0);n.splice(o,1,...t),i._children=n,(function r(a,d){for(let l of a)l.parent=d,r(l.children,l)})(t,i)}get children(){return this._children}get rightMostDescendant(){return this._children.length>0?this._children[this._children.length-1].rightMostDescendant:this}get snippet(){let e=this;for(;;){if(!e)return;if(e instanceof Rd)return e;e=e.parent}}toString(){return this.children.reduce((e,t)=>e+t.toString(),"")}len(){return 0}},jt=class s extends Wr{constructor(e){super(),this.value=e}toString(){return this.value}len(){return this.value.length}clone(){return new s(this.value)}},km=class extends Wr{},Qi=class s extends km{static compareByIndex(e,t){return e.index===t.index?0:e.isFinalTabstop?1:t.isFinalTabstop||e.index<t.index?-1:e.index>t.index?1:0}constructor(e){super(),this.index=e}get isFinalTabstop(){return this.index===0}get choice(){return this._children.length===1&&this._children[0]instanceof $s?this._children[0]:void 0}clone(){let e=new s(this.index);return this.transform&&(e.transform=this.transform.clone()),e._children=this.children.map(t=>t.clone()),e}},$s=class s extends Wr{constructor(){super(...arguments),this.options=[]}appendChild(e){return e instanceof jt&&(e.parent=this,this.options.push(e)),this}toString(){return this.options[0].value}len(){return this.options[0].len()}clone(){let e=new s;return this.options.forEach(e.appendChild,e),e}},fS=class s extends Wr{constructor(){super(...arguments),this.regexp=new RegExp("")}resolve(e){let t=this,i=!1,o=e.replace(this.regexp,function(){return i=!0,t._replace(Array.prototype.slice.call(arguments,0,-2))});return!i&&this._children.some(n=>n instanceof zo&&!!n.elseValue)&&(o=this._replace([])),o}_replace(e){let t="";for(let i of this._children)if(i instanceof zo){let o=e[i.index]||"";o=i.resolve(o),t+=o}else t+=i.toString();return t}toString(){return""}clone(){let e=new s;return e.regexp=new RegExp(this.regexp.source,(this.regexp.ignoreCase?"i":"")+(this.regexp.global?"g":"")),e._children=this.children.map(t=>t.clone()),e}},zo=class s extends Wr{constructor(e,t,i,o){super(),this.index=e,this.shorthandName=t,this.ifValue=i,this.elseValue=o}resolve(e){return this.shorthandName==="upcase"?e?e.toLocaleUpperCase():"":this.shorthandName==="downcase"?e?e.toLocaleLowerCase():"":this.shorthandName==="capitalize"?e?e[0].toLocaleUpperCase()+e.substr(1):"":this.shorthandName==="pascalcase"?e?this._toPascalCase(e):"":this.shorthandName==="camelcase"?e?this._toCamelCase(e):"":this.shorthandName==="kebabcase"?e?this._toKebabCase(e):"":this.shorthandName==="snakecase"?e?this._toSnakeCase(e):"":e&&typeof this.ifValue=="string"?this.ifValue:!e&&typeof this.elseValue=="string"?this.elseValue:e||""}_toKebabCase(e){if(!e.match(/[\p{L}0-9]+/gu))return e;if(!e.match(/[\p{L}0-9]/u))return e.trim().toLowerCase().replace(/^_+|_+$/g,"").replace(/[\s_]+/g,"-");let i=e.trim().replace(/^_+|_+$/g,""),o=i.match(/\p{Lu}{2,}(?=\p{Lu}\p{Ll}+[0-9]*|[\s_-]|$)|\p{Lu}?\p{Ll}+[0-9]*|\p{Lu}(?=\p{Lu}\p{Ll})|\p{Lu}(?=[\s_-]|$)|[0-9]+/gu);return o?o.map(n=>n.toLowerCase()).join("-"):i.split(/[\s_-]+/).filter(n=>n.length>0).map(n=>n.toLowerCase()).join("-")}_toPascalCase(e){let t=e.match(/[\p{L}0-9]+/gu);return t?t.map(i=>i.charAt(0).toUpperCase()+i.substr(1)).join(""):e}_toCamelCase(e){let t=e.match(/[\p{L}0-9]+/gu);return t?t.map((i,o)=>o===0?i.charAt(0).toLowerCase()+i.substr(1):i.charAt(0).toUpperCase()+i.substr(1)).join(""):e}_toSnakeCase(e){return e.replace(/(\p{Ll})(\p{Lu})/gu,"$1_$2").replace(/[\s\-]+/g,"_").toLowerCase()}clone(){return new s(this.index,this.shorthandName,this.ifValue,this.elseValue)}},Br=class s extends km{constructor(e){super(),this.name=e}resolve(e){let t=e.resolve(this);return this.transform&&(t=this.transform.resolve(t||"")),t!==void 0?(this._children=[new jt(t)],!0):!1}clone(){let e=new s(this.name);return this.transform&&(e.transform=this.transform.clone()),e._children=this.children.map(t=>t.clone()),e}};function NT(s,e){let t=[...s];for(;t.length>0;){let i=t.shift();if(!e(i))break;t.unshift(...i.children)}}var Rd=class s extends Wr{get placeholderInfo(){if(!this._placeholders){let e=[],t;this.walk(function(i){return i instanceof Qi&&(e.push(i),t=!t||t.index<i.index?i:t),!0}),this._placeholders={all:e,last:t}}return this._placeholders}get placeholders(){let{all:e}=this.placeholderInfo;return e}offset(e){let t=0,i=!1;return this.walk(o=>o===e?(i=!0,!1):(t+=o.len(),!0)),i?t:-1}fullLen(e){let t=0;return NT([e],i=>(t+=i.len(),!0)),t}enclosingPlaceholders(e){let t=[],{parent:i}=e;for(;i;)i instanceof Qi&&t.push(i),i=i.parent;return t}resolveVariables(e){return this.walk(t=>(t instanceof Br&&t.resolve(e)&&(this._placeholders=void 0),!0)),this}appendChild(e){return this._placeholders=void 0,super.appendChild(e)}replace(e,t){return this._placeholders=void 0,super.replace(e,t)}clone(){let e=new s;return e._children=this.children.map(t=>t.clone()),e}walk(e){NT(this.children,e)}},Vi=class{constructor(){this._scanner=new pS,this._token={type:14,pos:0,len:0}}static escape(e){return e.replace(/\$|}|\\/g,"\\$&")}static guessNeedsClipboard(e){return/\${?CLIPBOARD/.test(e)}parse(e,t,i){let o=new Rd;return this.parseFragment(e,o),this.ensureFinalTabstop(o,i??!1,t??!1),o}parseFragment(e,t){let i=t.children.length;for(this._scanner.text(e),this._token=this._scanner.next();this._parse(t););let o=new Map,n=[];t.walk(d=>(d instanceof Qi&&(d.isFinalTabstop?o.set(0,void 0):!o.has(d.index)&&d.children.length>0?o.set(d.index,d.children):n.push(d)),!0));let r=(d,l)=>{let c=o.get(d.index);if(!c)return;let h=new Qi(d.index);h.transform=d.transform;for(let u of c){let g=u.clone();h.appendChild(g),g instanceof Qi&&o.has(g.index)&&!l.has(g.index)&&(l.add(g.index),r(g,l),l.delete(g.index))}t.replace(d,[h])},a=new Set;for(let d of n)r(d,a);return t.children.slice(i)}ensureFinalTabstop(e,t,i){(t||i&&e.placeholders.length>0)&&(e.placeholders.find(n=>n.index===0)||e.appendChild(new Qi(0)))}_accept(e,t){if(e===void 0||this._token.type===e){let i=t?this._scanner.tokenText(this._token):!0;return this._token=this._scanner.next(),i}return!1}_backTo(e){return this._scanner.pos=e.pos+e.len,this._token=e,!1}_until(e){let t=this._token;for(;this._token.type!==e;){if(this._token.type===14)return!1;if(this._token.type===5){let o=this._scanner.next();if(o.type!==0&&o.type!==4&&o.type!==5)return!1}this._token=this._scanner.next()}let i=this._scanner.value.substring(t.pos,this._token.pos).replace(/\\(\$|}|\\)/g,"$1");return this._token=this._scanner.next(),i}_parse(e){return this._parseEscaped(e)||this._parseTabstopOrVariableName(e)||this._parseComplexPlaceholder(e)||this._parseComplexVariable(e)||this._parseAnything(e)}_parseEscaped(e){let t;return(t=this._accept(5,!0))?(t=this._accept(0,!0)||this._accept(4,!0)||this._accept(5,!0)||t,e.appendChild(new jt(t)),!0):!1}_parseTabstopOrVariableName(e){let t,i=this._token;return this._accept(0)&&(t=this._accept(9,!0)||this._accept(8,!0))?(e.appendChild(/^\d+$/.test(t)?new Qi(Number(t)):new Br(t)),!0):this._backTo(i)}_parseComplexPlaceholder(e){let t,i=this._token;if(!(this._accept(0)&&this._accept(3)&&(t=this._accept(8,!0))))return this._backTo(i);let n=new Qi(Number(t));if(this._accept(1))for(;;){if(this._accept(4))return e.appendChild(n),!0;if(!this._parse(n))return e.appendChild(new jt("${"+t+":")),n.children.forEach(e.appendChild,e),!0}else if(n.index>0&&this._accept(7)){let r=new $s;for(;;){if(this._parseChoiceElement(r)){if(this._accept(2))continue;if(this._accept(7)&&(n.appendChild(r),this._accept(4)))return e.appendChild(n),!0}return this._backTo(i),!1}}else return this._accept(6)?this._parseTransform(n)?(e.appendChild(n),!0):(this._backTo(i),!1):this._accept(4)?(e.appendChild(n),!0):this._backTo(i)}_parseChoiceElement(e){let t=this._token,i=[];for(;!(this._token.type===2||this._token.type===7);){let o;if((o=this._accept(5,!0))?o=this._accept(2,!0)||this._accept(7,!0)||this._accept(5,!0)||o:o=this._accept(void 0,!0),!o)return this._backTo(t),!1;i.push(o)}return i.length===0?(this._backTo(t),!1):(e.appendChild(new jt(i.join(""))),!0)}_parseComplexVariable(e){let t,i=this._token;if(!(this._accept(0)&&this._accept(3)&&(t=this._accept(9,!0))))return this._backTo(i);let n=new Br(t);if(this._accept(1))for(;;){if(this._accept(4))return e.appendChild(n),!0;if(!this._parse(n))return e.appendChild(new jt("${"+t+":")),n.children.forEach(e.appendChild,e),!0}else return this._accept(6)?this._parseTransform(n)?(e.appendChild(n),!0):(this._backTo(i),!1):this._accept(4)?(e.appendChild(n),!0):this._backTo(i)}_parseTransform(e){let t=new fS,i="",o="";for(;!this._accept(6);){let n;if(n=this._accept(5,!0)){n=this._accept(6,!0)||n,i+=n;continue}if(this._token.type!==14){i+=this._accept(void 0,!0);continue}return!1}for(;!this._accept(6);){let n;if(n=this._accept(5,!0)){n=this._accept(5,!0)||this._accept(6,!0)||n,t.appendChild(new jt(n));continue}if(!(this._parseFormatString(t)||this._parseAnything(t)))return!1}for(;!this._accept(4);){if(this._token.type!==14){o+=this._accept(void 0,!0);continue}return!1}try{t.regexp=new RegExp(i,o)}catch{return!1}return e.transform=t,!0}_parseFormatString(e){let t=this._token;if(!this._accept(0))return!1;let i=!1;this._accept(3)&&(i=!0);let o=this._accept(8,!0);if(o)if(i){if(this._accept(4))return e.appendChild(new zo(Number(o))),!0;if(!this._accept(1))return this._backTo(t),!1}else return e.appendChild(new zo(Number(o))),!0;else return this._backTo(t),!1;if(this._accept(6)){let n=this._accept(9,!0);return!n||!this._accept(4)?(this._backTo(t),!1):(e.appendChild(new zo(Number(o),n)),!0)}else if(this._accept(11)){let n=this._until(4);if(n)return e.appendChild(new zo(Number(o),void 0,n,void 0)),!0}else if(this._accept(12)){let n=this._until(4);if(n)return e.appendChild(new zo(Number(o),void 0,void 0,n)),!0}else if(this._accept(13)){let n=this._until(1);if(n){let r=this._until(4);if(r)return e.appendChild(new zo(Number(o),void 0,n,r)),!0}}else{let n=this._until(4);if(n)return e.appendChild(new zo(Number(o),void 0,void 0,n)),!0}return this._backTo(t),!1}_parseAnything(e){return this._token.type!==14?(e.appendChild(new jt(this._scanner.tokenText(this._token))),this._accept(void 0),!0):!1}};function Rm(s,e,t){return(typeof t.insertText=="string"?t.insertText==="":t.insertText.snippet==="")?{edits:t.additionalEdit?.edits??[]}:{edits:[...e.map(i=>new em(s,{range:i,text:typeof t.insertText=="string"?Vi.escape(t.insertText)+"$0":t.insertText.snippet,insertAsSnippet:!0})),...t.additionalEdit?.edits??[]]}}function Tm(s){function e(r,a){return"mimeType"in r?r.mimeType===a.handledMimeType:!!a.kind&&r.kind.contains(a.kind)}let t=new Map;for(let r of s)for(let a of r.yieldTo??[])for(let d of s)if(d!==r&&e(a,d)){let l=t.get(r);l||(l=[],t.set(r,l)),l.push(d)}if(!t.size)return Array.from(s);let i=new Set,o=[];function n(r){if(!r.length)return[];let a=r[0];if(o.includes(a))return console.warn("Yield to cycle detected",a),r;if(i.has(a))return n(r.slice(1));let d=[],l=t.get(a);return l&&(o.push(a),d=n(l),o.pop()),i.add(a),[...d,a,...n(r.slice(1))]}return n(Array.from(s))}function _S(s,e){return e&&(s.stack||s.stacktrace)?p(33,"{0}: {1}",OT(s),PT(s.stack)||PT(s.stacktrace)):OT(s)}function PT(s){return Array.isArray(s)?s.join(`
2
+ import{$ as Oe,$a as vi,$b as hC,$c as te,$d as Qa,$e as Sg,$f as fk,$g as Bk,$h as oR,$i as LR,$j as Eo,$k as bT,A as xs,Aa as tC,Ab as se,Ac as ci,Ad as P0,Ae as fg,Af as lk,Ag as Tk,Ah as Ec,Ai as pn,Aj as Qg,Ak as sT,B as SD,Ba as iC,Bb as nn,Bc as Qt,Bd as O0,Be as qn,Bf as V,Bg as Mk,Bh as Vg,Bi as fn,Bj as NR,Bk as aT,C as tc,Ca as Fo,Cb as JD,Cc as C0,Cd as A0,Ce as Ms,Cf as ck,Cg as Nk,Ch as Ke,Ci as jg,Cj as Id,Ck as Ge,D as wD,Da as nc,Db as e0,Dc as S0,Dd as F0,De as _g,Df as hk,Dg as Pk,Dh as ot,Di as fR,Dj as PR,Dk as qC,E as yD,Ea as ND,Eb as Ci,Ec as Ir,Ed as cg,Ee as mC,Ef as xg,Eg as Hs,Eh as gn,Ei as _R,Ej as OR,Ek as am,F as tn,Fa as PD,Fb as t0,Fc as w0,Fd as at,Fe as $0,Ff as uk,Fg as kr,Fh as Zk,Fi as bR,Fj as AR,Fk as dm,G as xD,Ga as OD,Gb as dc,Gc as y0,Gd as A,Ge as w,Gf as ad,Gg as wc,Gh as Yk,Gi as vR,Gj as FR,Gk as GC,H as Xe,Ha as og,Hb as be,Hc as G,Hd as cc,He as id,Hf as dd,Hg as Ok,Hh as zg,Hi as CR,Hj as Lt,Hk as dT,I as eg,Ia as AD,Ib as i0,Id as ri,Ie as xi,If as gk,Ig as Ak,Ih as Dc,Ii as Ws,Ij as HR,Ik as Mc,J as wr,Ja as ng,Jb as st,Jc as xt,Jd as Wt,Je as pC,Jf as Os,Jg as Rg,Jh as NC,Ji as Yn,Jj as WR,Jk as $C,K as Ba,Ka as oC,Kb as o0,Kc as Oi,Kd as X,Ke as bg,Kf as Ig,Kg as yC,Kh as PC,Ki as Kg,Kj as Tc,Kk as lT,L as tg,La as rg,Lb as yo,Lc as j,Ld as k,Le as Fi,Lf as cn,Lg as xC,Lh as OC,Li as qg,Lj as Jg,Lk as lm,M as Co,Ma as Is,Mb as n0,Mc as zt,Md as hc,Me as Ns,Mf as bc,Mg as yc,Mh as Xk,Mi as SR,Mj as Us,Mk as ZC,N as Va,Na as sg,Nb as lC,Nc as Re,Nd as H0,Ne as di,Nf as CC,Ng as Tg,Nh as Qk,Ni as wR,Nj as BR,Nk as YC,O as ft,Oa as ge,Ob as r0,Oc as H,Od as $,Oe as Z0,Of as Zi,Og as IC,Oh as kc,Oi as dt,Oj as VR,Ok as XC,P as Xv,Pa as _t,Pb as cC,Pc as Ct,Pd as C,Pe as Y0,Pf as As,Pg as Fk,Ph as Rr,Pi as Nr,Pj as zR,Pk as cT,Q as ce,Qa as FD,Qb as Si,Qc as St,Qd as Q,Qe as vg,Qf as mk,Qg as LC,Qh as Je,Qi as Bs,Qj as At,Qk as hT,R as M,Ra as HD,Rb as Za,Rc as an,Rd as Xa,Re as Ho,Rf as SC,Rg as Hk,Rh as mn,Ri as Gg,Rj as bn,Rk as uT,S as D,Sa as qa,Sb as bt,Sc as jn,Sd as W0,Se as fc,Sf as pk,Sg as Wk,Sh as Jk,Si as yR,Sj as em,Sk as cm,T as xe,Ta as ag,Tb as Vt,Tc as Lr,Td as B0,Te as Wo,Tf as Lg,Tg as Mg,Th as eR,Ti as xR,Tj as tm,Tk as Cn,U as ID,Ua as Ls,Ub as Z,Uc as x0,Ud as Kn,Ue as od,Uf as Se,Ug as gd,Uh as fd,Ui as IR,Uj as Lo,Uk as gT,V as ig,Va as rc,Vb as Xt,Vc as B,Vd as V0,Ve as X0,Vf as K,Vg as Ng,Vh as he,Vi as Bi,Vj as UR,Vk as QC,W as kt,Wa as Yt,Wb as s0,Wc as ne,Wd as hg,We as Q0,Wf as hn,Wg as EC,Wh as AC,Wi as Vs,Wj as mo,Wk as mT,X as De,Xa as sc,Xb as Ds,Xc as Fe,Xd as ug,Xe as Cg,Xf as mt,Xg as DC,Xh as Tr,Xi as $g,Xj as jR,Xk as pT,Y as z,Ya as WD,Yb as a0,Yc as ve,Yd as gg,Ye as Ps,Yf as Eg,Yg as xc,Yh as tR,Yi as yd,Yj as Li,Yk as hm,Z as Qv,Za as BD,Zb as d0,Zc as O,Zd as Ts,Ze as J0,Zf as It,Zg as kC,Zh as iR,Zi as Rc,Zj as KR,Zk as fT,_ as oe,_a as nC,_b as lg,_c as I0,_d as Er,_e as _c,_f as vc,_g as Ic,_h as uo,_i as Xi,_j as qR,_k as _T,a as p,aa as Jv,ab as VD,ac as l0,ad as J,ae as uc,af as fC,ag as Yi,ai as nR,aj as ER,ak as UC,al as vT,b as I,ba as je,bb as wt,bc as c0,bd as hi,be as z0,bf as nd,bg as un,bh as Pg,bi as _d,bj as qe,bk as GR,bl as CT,c as Oa,ca as Ao,cb as zD,cc as rn,cd as Jt,ce as U0,cf as ek,cg as _k,ch as Gn,ci as rR,cj as Zg,ck as $R,cl as um,d as Zv,da as LD,db as UD,dc as Me,dd as L0,de as Ja,df as _C,dg as ld,dh as Og,di as sR,dj as DR,dk as jC,dl as Nc,e as ae,ea as ED,eb as dg,ec as h0,ed as q,ee as Ai,ef as tk,eg as Fs,eh as Ag,ei as aR,ej as zs,ek as ZR,el as ST,f as Te,fa as Mi,fb as So,fc as u0,fd as Gi,fe as gc,ff as wg,fg as cd,fh as $n,fi as dR,fj as Pr,fk as YR,fl as Ld,g as oi,ga as yr,gb as wo,gc as tt,gd as wi,ge as ln,gf as ik,gg as Dg,gh as RC,gj as Or,gk as im,gl as wT,h as Aa,ha as Zt,hb as jD,hc as g0,hd as E0,he as j0,hf as ok,hg as bk,hh as Vk,hi as lR,hj as Ar,hk as vn,hl as yT,i as ji,ia as ic,ib as rC,ic as Pi,id as xo,ie as mc,if as nk,ig as vk,ii as cR,ij as Rt,ik as om,il as Pc,j as Ye,ja as on,jb as KD,jc as xr,jd as ht,je as pc,jf as rk,jg as Ck,jh as Lc,ji as hR,jj as Fr,jk as nm,jl as xT,k as Fa,ka as Ae,kb as qD,kc as m0,kd as pe,ke as gC,kf as it,kg as Sk,kh as Fg,ki as uR,kj as _n,kk as XR,kl as JC,l as fD,la as za,lb as Ga,lc as p0,ld as yi,le as mg,lf as Hi,lg as Cc,lh as Zn,li as gR,lj as WC,lk as QR,ll as gm,m as _D,ma as DD,mb as GD,mc as sn,md as co,me as re,mf as sk,mg as wk,mh as zk,mi as bd,mj as Ii,mk as JR,ml as IT,n as Qu,na as _i,nb as sC,nc as Un,nd as dn,ne as si,nf as ak,ng as yk,nh as md,ni as FC,nj as ke,nk as eT,nl as mm,o as Ju,oa as kD,ob as $D,oc as f0,od as D0,oe as ai,of as rd,og as wC,oh as Hg,oi as vd,oj as BC,ok as rm,ol as Vo,p as bD,pa as Ua,pb as ac,pc as _0,pd as k0,pe as ti,pf as Wi,pg as xk,ph as pd,pi as ee,pj as Xn,pk as Et,pl as LT,q as Ha,qa as RD,qb as ZD,qc as ks,qd as uC,qe as K0,qf as Be,qg as Ik,qh as Uk,qi as Ug,qj as kR,qk as KC,ql as ET,r as Yv,ra as ja,rb as YD,rc as ni,rd as $i,re as ed,rf as yg,rg as Lk,rh as TC,ri as Cd,rj as RR,rk as js,rl as DT,s as ys,sa as zn,sb as aC,sc as b0,sd as R0,se as pg,sf as bC,sg as Ek,sh as jk,si as ue,sj as Tt,sk as tT,sl as kT,t as lo,ta as TD,tb as Es,tc as me,td as ei,te as We,tf as ho,tg as kg,th as Wg,ti as Sd,tj as xd,tk as Mt,u as _e,ua as bi,ub as XD,uc as yt,ud as T0,ue as td,uf as ii,ug as Dk,uh as MC,ui as wd,uj as Yg,uk as Do,v as Sr,va as oc,vb as QD,vc as qi,vd as Ya,ve as Ne,vf as vC,vg as Sc,vh as Bg,vi as Mr,vj as VC,vk as sm,w as vD,wa as vt,wb as R,wc as U,wd as M0,we as Io,wf as dk,wg as hd,wh as Kk,wi as HC,wj as zC,wk as iT,x as Wa,xa as Ka,xb as Ni,xc as Rs,xd as N0,xe as q0,xf as Bo,xg as ud,xh as qk,xi as mR,xj as TR,xk as oT,y as Ki,ya as eC,yb as dC,yc as W,yd as lc,ye as Dr,yf as sd,yg as kk,yh as Gk,yi as pR,yj as MR,yk as nT,z as CD,za as MD,zb as $a,zc as v0,zd as gt,ze as G0,zf as fe,zg as Rk,zh as $k,zi as go,zj as Xg,zk as rT}from"./TJM6I22B.js";var pm=class extends ht{constructor(){super({id:"diffEditor.toggleCollapseUnchangedRegions",title:I(101,"Toggle Collapse Unchanged Regions"),icon:B.map,toggled:O.has("config.diffEditor.hideUnchangedRegions.enabled"),precondition:O.has("isInDiffEditor"),menu:{when:O.has("isInDiffEditor"),id:q.EditorTitle,order:22,group:"navigation"}})}run(e,...t){let i=e.get(re),o=!i.getValue("diffEditor.hideUnchangedRegions.enabled");i.updateValue("diffEditor.hideUnchangedRegions.enabled",o)}},Oc=class extends ht{constructor(){super({id:"diffEditor.toggleShowMovedCodeBlocks",title:I(102,"Toggle Show Moved Code Blocks"),precondition:O.has("isInDiffEditor")})}run(e,...t){let i=e.get(re),o=!i.getValue("diffEditor.experimental.showMoves");i.updateValue("diffEditor.experimental.showMoves",o)}},fm=class extends ht{constructor(){super({id:"diffEditor.toggleUseInlineViewWhenSpaceIsLimited",title:I(103,"Toggle Use Inline View When Space Is Limited"),precondition:O.has("isInDiffEditor")})}run(e,...t){let i=e.get(re),o=!i.getValue("diffEditor.useInlineViewWhenSpaceIsLimited");i.updateValue("diffEditor.useInlineViewWhenSpaceIsLimited",o)}},Fc=I(104,"Diff Editor"),_m=class extends ri{constructor(){super({id:"diffEditor.switchSide",title:I(105,"Switch Side"),icon:B.arrowSwap,precondition:O.has("isInDiffEditor"),f1:!0,category:Fc})}runEditorCommand(e,t,i){let o=Ks(e);if(o instanceof Us){if(i&&i.dryRun)return{destinationSelection:o.mapToOtherSide().destinationSelection};o.switchSide()}}},bm=class extends ri{constructor(){super({id:"diffEditor.exitCompareMove",title:I(106,"Exit Compare Move"),icon:B.close,precondition:w.comparingMovedCode,f1:!1,category:Fc,keybinding:{weight:1e4,primary:9}})}runEditorCommand(e,t,...i){let o=Ks(e);o instanceof Us&&o.exitCompareMove()}},vm=class extends ri{constructor(){super({id:"diffEditor.collapseAllUnchangedRegions",title:I(107,"Collapse All Unchanged Regions"),icon:B.fold,precondition:O.has("isInDiffEditor"),f1:!0,category:Fc})}runEditorCommand(e,t,...i){let o=Ks(e);o instanceof Us&&o.collapseAllUnchangedRegions()}},Cm=class extends ri{constructor(){super({id:"diffEditor.showAllUnchangedRegions",title:I(108,"Show All Unchanged Regions"),icon:B.unfold,precondition:O.has("isInDiffEditor"),f1:!0,category:Fc})}runEditorCommand(e,t,...i){let o=Ks(e);o instanceof Us&&o.showAllUnchangedRegions()}},Ed=class extends ht{constructor(){super({id:"diffEditor.revert",title:I(109,"Revert"),f1:!0,category:Fc,precondition:O.has("isInDiffEditor")})}run(e,t){return t?this.runViaToolbarContext(e,t):this.runViaCursorOrSelection(e)}runViaCursorOrSelection(e){let t=Ks(e);t instanceof Us&&t.revertFocusedRangeMappings()}runViaToolbarContext(e,t){let i=BP(e,t.originalUri,t.modifiedUri);i instanceof Us&&i.revertRangeMappings(t.mapping.innerChanges??[])}},RT=I(110,"Accessible Diff Viewer"),Dd=class s extends ht{static{this.id="editor.action.accessibleDiffViewer.next"}constructor(){super({id:s.id,title:I(111,"Go to Next Difference"),category:RT,precondition:O.has("isInDiffEditor"),keybinding:{primary:65,weight:100},f1:!0})}run(e){Ks(e)?.accessibleDiffViewerNext()}},Ac=class s extends ht{static{this.id="editor.action.accessibleDiffViewer.prev"}constructor(){super({id:s.id,title:I(112,"Go to Previous Difference"),category:RT,precondition:O.has("isInDiffEditor"),keybinding:{primary:1089,weight:100},f1:!0})}run(e){Ks(e)?.accessibleDiffViewerPrev()}};function BP(s,e,t){return s.get(Re).listDiffEditors().find(n=>{let r=n.getModifiedEditor(),a=n.getOriginalEditor();return r&&r.getModel()?.uri.toString()===t.toString()&&a&&a.getModel()?.uri.toString()===e.toString()})||null}function Ks(s){let t=s.get(Re).listDiffEditors(),i=sn();if(i){for(let o of t)if(o.getContainerDomNode().contains(i))return o}return null}pe(pm);pe(Oc);pe(fm);wi.appendMenuItem(q.EditorTitle,{command:{id:new Oc().desc.id,title:p(135,"Show Moved Code Blocks"),icon:B.move,toggled:I0.create("config.diffEditor.experimental.showMoves",!0),precondition:O.has("isInDiffEditor")},order:10,group:"1_diff",when:O.has("isInDiffEditor")});pe(Ed);for(let s of[{icon:B.arrowRight,key:w.diffEditorInlineMode.toNegated()},{icon:B.discard,key:w.diffEditorInlineMode}])wi.appendMenuItem(q.DiffEditorHunkToolbar,{command:{id:new Ed().desc.id,title:p(136,"Revert Block"),icon:s.icon},when:O.and(w.diffEditorModifiedWritable,s.key),order:5,group:"primary"}),wi.appendMenuItem(q.DiffEditorSelectionToolbar,{command:{id:new Ed().desc.id,title:p(137,"Revert Selection"),icon:s.icon},when:O.and(w.diffEditorModifiedWritable,s.key),order:5,group:"primary"});pe(_m);pe(bm);pe(vm);pe(Cm);wi.appendMenuItem(q.EditorTitle,{command:{id:Dd.id,title:p(138,"Open Accessible Diff Viewer"),precondition:O.has("isInDiffEditor")},order:10,group:"2_diff",when:O.and(w.accessibleDiffViewerVisible.negate(),O.has("isInDiffEditor"))});ve.registerCommandAlias("editor.action.diffReview.next",Dd.id);pe(Dd);ve.registerCommandAlias("editor.action.diffReview.prev",Ac.id);pe(Ac);var VP=function(s,e,t,i){var o=arguments.length,n=o<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(s,e,t,i);else for(var a=s.length-1;a>=0;a--)(r=s[a])&&(n=(o<3?r(n):o>3?r(e,t,n):r(e,t))||n);return o>3&&n&&Object.defineProperty(e,t,n),n},zP=function(s,e){return function(t,i){e(t,i,s)}},eS,Sm=new te("selectionAnchorSet",!1),Hr=class{static{eS=this}static{this.ID="editor.contrib.selectionAnchorController"}static get(e){return e.getContribution(eS.ID)}constructor(e,t){this.editor=e,this.selectionAnchorSetContextKey=Sm.bindTo(t),this.modelChangeListener=e.onDidChangeModel(()=>this.selectionAnchorSetContextKey.reset())}setSelectionAnchor(){if(this.editor.hasModel()){let e=this.editor.getPosition();this.editor.changeDecorations(t=>{this.decorationId&&t.removeDecoration(this.decorationId),this.decorationId=t.addDecoration(Q.fromPositions(e,e),{description:"selection-anchor",stickiness:1,hoverMessage:new dt().appendText(p(849,"Selection Anchor")),className:"selection-anchor"})}),this.selectionAnchorSetContextKey.set(!!this.decorationId),xt(p(850,"Anchor set at {0}:{1}",e.lineNumber,e.column))}}goToSelectionAnchor(){if(this.editor.hasModel()&&this.decorationId){let e=this.editor.getModel().getDecorationRange(this.decorationId);e&&this.editor.setPosition(e.getStartPosition())}}selectFromAnchorToCursor(){if(this.editor.hasModel()&&this.decorationId){let e=this.editor.getModel().getDecorationRange(this.decorationId);if(e){let t=this.editor.getPosition();this.editor.setSelection(Q.fromPositions(e.getStartPosition(),t)),this.cancelSelectionAnchor()}}}cancelSelectionAnchor(){if(this.decorationId){let e=this.decorationId;this.editor.changeDecorations(t=>{t.removeDecoration(e),this.decorationId=void 0}),this.selectionAnchorSetContextKey.set(!1)}}dispose(){this.cancelSelectionAnchor(),this.modelChangeListener.dispose()}};Hr=eS=VP([zP(1,J)],Hr);var tS=class extends A{constructor(){super({id:"editor.action.setSelectionAnchor",label:I(851,"Set Selection Anchor"),precondition:void 0,kbOpts:{kbExpr:w.editorTextFocus,primary:Xe(2089,2080),weight:100}})}async run(e,t){Hr.get(t)?.setSelectionAnchor()}},iS=class extends A{constructor(){super({id:"editor.action.goToSelectionAnchor",label:I(852,"Go to Selection Anchor"),precondition:Sm})}async run(e,t){Hr.get(t)?.goToSelectionAnchor()}},oS=class extends A{constructor(){super({id:"editor.action.selectFromAnchorToCursor",label:I(853,"Select from Anchor to Cursor"),precondition:Sm,kbOpts:{kbExpr:w.editorTextFocus,primary:Xe(2089,2089),weight:100}})}async run(e,t){Hr.get(t)?.selectFromAnchorToCursor()}},nS=class extends A{constructor(){super({id:"editor.action.cancelSelectionAnchor",label:I(854,"Cancel Selection Anchor"),precondition:Sm,kbOpts:{kbExpr:w.editorTextFocus,primary:9,weight:100}})}async run(e,t){Hr.get(t)?.cancelSelectionAnchor()}};$(Hr.ID,Hr,4);k(tS);k(iS);k(oS);k(nS);var UP=K("editorOverviewRuler.bracketMatchForeground","#A0A0A0",p(855,"Overview ruler marker color for matching brackets.")),rS=class extends A{constructor(){super({id:"editor.action.jumpToBracket",label:I(857,"Go to Bracket"),precondition:void 0,kbOpts:{kbExpr:w.editorTextFocus,primary:3165,weight:100}})}run(e,t){qs.get(t)?.jumpToBracket()}},sS=class extends A{constructor(){super({id:"editor.action.selectToBracket",label:I(858,"Select to Bracket"),precondition:void 0,metadata:{description:I(859,"Select the text inside and including the brackets or curly braces"),args:[{name:"args",schema:{type:"object",properties:{selectBrackets:{type:"boolean",default:!0}}}}]}})}run(e,t,i){let o=!0;i&&i.selectBrackets===!1&&(o=!1),qs.get(t)?.selectToBracket(o)}},aS=class extends A{constructor(){super({id:"editor.action.removeBrackets",label:I(860,"Remove Brackets"),precondition:void 0,kbOpts:{kbExpr:w.editorTextFocus,primary:2561,weight:100},canTriggerInlineEdits:!0})}run(e,t){qs.get(t)?.removeBrackets(this.id)}},dS=class{constructor(e,t,i){this.position=e,this.brackets=t,this.options=i}},qs=class s extends D{static{this.ID="editor.contrib.bracketMatchingController"}static get(e){return e.getContribution(s.ID)}constructor(e){super(),this._editor=e,this._lastBracketsData=[],this._lastVersionId=0,this._decorations=this._editor.createDecorationsCollection(),this._updateBracketsSoon=this._register(new Ae(()=>this._updateBrackets(),50)),this._matchBrackets=this._editor.getOption(80),this._updateBracketsSoon.schedule(),this._register(e.onDidChangeCursorPosition(t=>{this._matchBrackets!=="never"&&this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeModelContent(t=>{this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeModel(t=>{this._lastBracketsData=[],this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeModelLanguageConfiguration(t=>{this._lastBracketsData=[],this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeConfiguration(t=>{t.hasChanged(80)&&(this._matchBrackets=this._editor.getOption(80),this._decorations.clear(),this._lastBracketsData=[],this._lastVersionId=0,this._updateBracketsSoon.schedule())})),this._register(e.onDidBlurEditorWidget(()=>{this._updateBracketsSoon.schedule()})),this._register(e.onDidFocusEditorWidget(()=>{this._updateBracketsSoon.schedule()}))}jumpToBracket(){if(!this._editor.hasModel())return;let e=this._editor.getModel(),t=this._editor.getSelections().map(i=>{let o=i.getStartPosition(),n=e.bracketPairs.matchBracket(o),r=null;if(n)n[0].containsPosition(o)&&!n[1].containsPosition(o)?r=n[1].getStartPosition():n[1].containsPosition(o)&&(r=n[0].getStartPosition());else{let a=e.bracketPairs.findEnclosingBrackets(o);if(a)r=a[1].getStartPosition();else{let d=e.bracketPairs.findNextBracket(o);d&&d.range&&(r=d.range.getStartPosition())}}return r?new Q(r.lineNumber,r.column,r.lineNumber,r.column):new Q(o.lineNumber,o.column,o.lineNumber,o.column)});this._editor.setSelections(t),this._editor.revealRange(t[0])}selectToBracket(e){if(!this._editor.hasModel())return;let t=this._editor.getModel(),i=[];this._editor.getSelections().forEach(o=>{let n=o.getStartPosition(),r=t.bracketPairs.matchBracket(n);if(!r&&(r=t.bracketPairs.findEnclosingBrackets(n),!r)){let l=t.bracketPairs.findNextBracket(n);l&&l.range&&(r=t.bracketPairs.matchBracket(l.range.getStartPosition()))}let a=null,d=null;if(r){r.sort(C.compareRangesUsingStarts);let[l,c]=r;if(a=e?l.getStartPosition():l.getEndPosition(),d=e?c.getEndPosition():c.getStartPosition(),c.containsPosition(n)){let h=a;a=d,d=h}}a&&d&&i.push(new Q(a.lineNumber,a.column,d.lineNumber,d.column))}),i.length>0&&(this._editor.setSelections(i),this._editor.revealRange(i[0]))}removeBrackets(e){if(!this._editor.hasModel())return;let t=this._editor.getModel();this._editor.getSelections().forEach(i=>{let o=i.getPosition(),n=t.bracketPairs.matchBracket(o);n||(n=t.bracketPairs.findEnclosingBrackets(o)),n&&(this._editor.pushUndoStop(),this._editor.executeEdits(e,[{range:n[0],text:""},{range:n[1],text:""}]),this._editor.pushUndoStop())})}static{this._DECORATION_OPTIONS_WITH_OVERVIEW_RULER=ee.register({description:"bracket-match-overview",stickiness:1,className:"bracket-match",inlineClassName:"bracket-match-inline",overviewRuler:{color:ot(UP),position:Ai.Center}})}static{this._DECORATION_OPTIONS_WITHOUT_OVERVIEW_RULER=ee.register({description:"bracket-match-no-overview",stickiness:1,className:"bracket-match",inlineClassName:"bracket-match-inline"})}_updateBrackets(){if(this._matchBrackets==="never")return;this._recomputeBrackets();let e=[],t=0;for(let i of this._lastBracketsData){let o=i.brackets;o&&(e[t++]={range:o[0],options:i.options},e[t++]={range:o[1],options:i.options})}this._decorations.set(e)}_recomputeBrackets(){if(!this._editor.hasModel()||!this._editor.hasWidgetFocus()){this._lastBracketsData=[],this._lastVersionId=0;return}let e=this._editor.getSelections();if(e.length>100){this._lastBracketsData=[],this._lastVersionId=0;return}let t=this._editor.getModel(),i=t.getVersionId(),o=[];this._lastVersionId===i&&(o=this._lastBracketsData);let n=[],r=0;for(let h=0,u=e.length;h<u;h++){let g=e[h];g.isEmpty()&&(n[r++]=g.getStartPosition())}n.length>1&&n.sort(H.compare);let a=[],d=0,l=0,c=o.length;for(let h=0,u=n.length;h<u;h++){let g=n[h];for(;l<c&&o[l].position.isBefore(g);)l++;if(l<c&&o[l].position.equals(g))a[d++]=o[l];else{let m=t.bracketPairs.matchBracket(g,20),f=s._DECORATION_OPTIONS_WITH_OVERVIEW_RULER;!m&&this._matchBrackets==="always"&&(m=t.bracketPairs.findEnclosingBrackets(g,20),f=s._DECORATION_OPTIONS_WITHOUT_OVERVIEW_RULER),a[d++]=new dS(g,m,f)}}this._lastBracketsData=a,this._lastVersionId=i}};$(qs.ID,qs,1);k(sS);k(rS);k(aS);wi.appendMenuItem(q.MenubarGoMenu,{group:"5_infile_nav",command:{id:"editor.action.jumpToBracket",title:p(856,"Go to &&Bracket")},order:2});gn((s,e)=>{let t=s.getColor(Zk);t&&e.addRule(`.monaco-editor .bracket-match-inline { color: ${t} !important; }`)});var wm=class{constructor(e,t){this._selection=e,this._isMovingLeft=t}getEditOperations(e,t){if(this._selection.startLineNumber!==this._selection.endLineNumber||this._selection.isEmpty())return;let i=this._selection.startLineNumber,o=this._selection.startColumn,n=this._selection.endColumn;if(!(this._isMovingLeft&&o===1)&&!(!this._isMovingLeft&&n===e.getLineMaxColumn(i)))if(this._isMovingLeft){let r=new C(i,o-1,i,o),a=e.getValueInRange(r);t.addEditOperation(r,null),t.addEditOperation(new C(i,n,i,n),a)}else{let r=new C(i,n,i,n+1),a=e.getValueInRange(r);t.addEditOperation(r,null),t.addEditOperation(new C(i,o,i,o),a)}}computeCursorState(e,t){return this._isMovingLeft?new Q(this._selection.startLineNumber,this._selection.startColumn-1,this._selection.endLineNumber,this._selection.endColumn-1):new Q(this._selection.startLineNumber,this._selection.startColumn+1,this._selection.endLineNumber,this._selection.endColumn+1)}};var ym=class extends A{constructor(e,t){super(t),this.left=e}run(e,t){if(!t.hasModel())return;let i=[],o=t.getSelections();for(let n of o)i.push(new wm(n,this.left));t.pushUndoStop(),t.executeCommands(this.id,i),t.pushUndoStop()}},lS=class extends ym{constructor(){super(!0,{id:"editor.action.moveCarretLeftAction",label:I(861,"Move Selected Text Left"),precondition:w.writable})}},cS=class extends ym{constructor(){super(!1,{id:"editor.action.moveCarretRightAction",label:I(862,"Move Selected Text Right"),precondition:w.writable})}};k(lS);k(cS);var hS=class extends A{constructor(){super({id:"editor.action.transposeLetters",label:I(863,"Transpose Letters"),precondition:w.writable,kbOpts:{kbExpr:w.textInputFocus,primary:0,mac:{primary:306},weight:100}})}run(e,t){if(!t.hasModel())return;let i=t.getModel(),o=[],n=t.getSelections();for(let r of n){if(!r.isEmpty())continue;let a=r.startLineNumber,d=r.startColumn,l=i.getLineMaxColumn(a);if(a===1&&(d===1||d===2&&l===2))continue;let c=d===l?r.getPosition():ug.rightPosition(i,r.getPosition().lineNumber,r.getPosition().column),h=ug.leftPosition(i,c),u=ug.leftPosition(i,h),g=i.getValueInRange(C.fromPositions(u,h)),m=i.getValueInRange(C.fromPositions(h,c)),f=C.fromPositions(u,c);o.push(new Kn(f,m+g))}o.length>0&&(t.pushUndoStop(),t.executeCommands(this.id,o),t.pushUndoStop())}};k(hS);var jP=function(s,e,t,i){var o=arguments.length,n=o<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(s,e,t,i);else for(var a=s.length-1;a>=0;a--)(r=s[a])&&(n=(o<3?r(n):o>3?r(e,t,n):r(e,t))||n);return o>3&&n&&Object.defineProperty(e,t,n),n},KP=function(s,e){return function(t,i){e(t,i,s)}},qP=ee.register({description:"inline-progress-widget",stickiness:1,showIfCollapsed:!0,after:{content:ng,inlineClassName:"inline-editor-progress-decoration",inlineClassNameAffectsLetterSpacing:!0,widthInEm:1}}),uS=class s extends D{static{this.baseId="editor.widget.inlineProgressWidget"}constructor(e,t,i,o,n){super(),this.typeId=e,this.editor=t,this.range=i,this.delegate=n,this.allowEditorOverflow=!1,this.suppressMouseDown=!0,this.create(o),this.editor.addContentWidget(this),this.editor.layoutContentWidget(this)}create(e){this.domNode=W(".inline-progress-widget"),this.domNode.role="button",this.domNode.title=e;let t=W("span.icon");this.domNode.append(t),t.classList.add(...ne.asClassNameArray(B.loading),"codicon-modifier-spin");let i=()=>{let o=this.editor.getOption(75);this.domNode.style.height=`${o}px`,this.domNode.style.width=`${Math.ceil(.8*o)}px`};i(),this._register(this.editor.onDidChangeConfiguration(o=>{(o.hasChanged(61)||o.hasChanged(75))&&i()})),this._register(Z(this.domNode,me.CLICK,o=>{this.delegate.cancel()}))}getId(){return s.baseId+"."+this.typeId}getDomNode(){return this.domNode}getPosition(){return{position:{lineNumber:this.range.startLineNumber,column:this.range.startColumn},preference:[0]}}dispose(){super.dispose(),this.editor.removeContentWidget(this)}},kd=class extends D{constructor(e,t,i){super(),this.id=e,this._editor=t,this._instantiationService=i,this._showDelay=500,this._showPromise=this._register(new xe),this._currentWidget=this._register(new xe),this._operationIdPool=0,this._currentDecorations=t.createDecorationsCollection()}dispose(){super.dispose(),this._currentDecorations.clear()}async showWhile(e,t,i,o,n){let r=this._operationIdPool++;this._currentOperation=r,this.clear(),this._showPromise.value=Zt(()=>{let a=C.fromPositions(e);this._currentDecorations.set([{range:a,options:qP}]).length>0&&(this._currentWidget.value=this._instantiationService.createInstance(uS,this.id,this._editor,a,t,o))},n??this._showDelay);try{return await i}finally{this._currentOperation===r&&(this.clear(),this._currentOperation=void 0)}}clear(){this._showPromise.clear(),this._currentDecorations.clear(),this._currentWidget.clear()}};kd=jP([KP(2,j)],kd);var He=class s{static{this.sep="."}static{this.None=new s("@@none@@")}static{this.Empty=new s("")}constructor(e){this.value=e}equals(e){return this.value===e.value}contains(e){return this.equals(e)||this.value===""||e.value.startsWith(this.value+s.sep)}intersects(e){return this.contains(e)||e.contains(this)}append(...e){return new s((this.value?[this.value,...e]:e).join(s.sep))}};var GP=function(s,e,t,i){var o=arguments.length,n=o<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(s,e,t,i);else for(var a=s.length-1;a>=0;a--)(r=s[a])&&(n=(o<3?r(n):o>3?r(e,t,n):r(e,t))||n);return o>3&&n&&Object.defineProperty(e,t,n),n},TT=function(s,e){return function(t,i){e(t,i,s)}},xm,Ut=class{static{xm=this}static{this.ID="editor.contrib.messageController"}static{this.MESSAGE_VISIBLE=new te("messageVisible",!1,p(1353,"Whether the editor is currently showing an inline message"))}static get(e){return e.getContribution(xm.ID)}constructor(e,t,i){this._openerService=i,this._messageWidget=new xe,this._messageListeners=new M,this._mouseOverMessage=!1,this._editor=e,this._visible=xm.MESSAGE_VISIBLE.bindTo(t)}dispose(){this._messageListeners.dispose(),this._messageWidget.dispose(),this._visible.reset()}showMessage(e,t){if(xt(Bs(e)?e.value:e),this._visible.set(!0),this._messageWidget.clear(),this._messageListeners.clear(),Bs(e)){let o=this._messageListeners.add(Vs(e,{actionHandler:(n,r)=>{this.closeMessage(),KR(this._openerService,n,r.isTrusted)}}));this._messageWidget.value=new Hc(this._editor,t,o.element)}else this._messageWidget.value=new Hc(this._editor,t,e);this._messageListeners.add(De.debounce(this._editor.onDidBlurEditorText,(o,n)=>n,0)(()=>{this._mouseOverMessage||this._messageWidget.value&&m0(sn(),this._messageWidget.value.getDomNode())||this.closeMessage()})),this._messageListeners.add(this._editor.onDidChangeCursorPosition(()=>this.closeMessage())),this._messageListeners.add(this._editor.onDidDispose(()=>this.closeMessage())),this._messageListeners.add(this._editor.onDidChangeModel(()=>this.closeMessage())),this._messageListeners.add(Z(this._messageWidget.value.getDomNode(),me.MOUSE_ENTER,()=>this._mouseOverMessage=!0,!0)),this._messageListeners.add(Z(this._messageWidget.value.getDomNode(),me.MOUSE_LEAVE,()=>this._mouseOverMessage=!1,!0));let i;this._messageListeners.add(this._editor.onMouseMove(o=>{o.target.position&&(i?i.containsPosition(o.target.position)||this.closeMessage():i=new C(t.lineNumber-3,1,o.target.position.lineNumber+3,1))}))}closeMessage(){this._visible.reset(),this._messageListeners.clear(),this._messageWidget.value&&this._messageListeners.add(Hc.fadeOut(this._messageWidget.value))}};Ut=xm=GP([TT(1,J),TT(2,mo)],Ut);var $P=at.bindToContribution(Ut.get);X(new $P({id:"leaveEditorMessage",precondition:Ut.MESSAGE_VISIBLE,handler:s=>s.closeMessage(),kbOpts:{weight:130,primary:9}}));var Hc=class{static fadeOut(e){let t=()=>{e.dispose(),clearTimeout(i),e.getDomNode().removeEventListener("animationend",t)},i=setTimeout(t,110);return e.getDomNode().addEventListener("animationend",t),e.getDomNode().classList.add("fadeOut"),{dispose:t}}constructor(e,{lineNumber:t,column:i},o){this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._editor=e,this._editor.revealLinesInCenterIfOutsideViewport(t,t,0),this._position={lineNumber:t,column:i},this._domNode=document.createElement("div"),this._domNode.classList.add("monaco-editor-overlaymessage"),this._domNode.style.marginLeft="-6px";let n=document.createElement("div");n.classList.add("anchor","top"),this._domNode.appendChild(n);let r=document.createElement("div");typeof o=="string"?(r.classList.add("message"),r.textContent=o):(o.classList.add("message"),r.appendChild(o)),this._domNode.appendChild(r);let a=document.createElement("div");a.classList.add("anchor","below"),this._domNode.appendChild(a),this._editor.addContentWidget(this),this._domNode.classList.add("fadeIn")}dispose(){this._editor.removeContentWidget(this)}getId(){return"messageoverlay"}getDomNode(){return this._domNode}getPosition(){return{position:this._position,preference:[1,2],positionAffinity:1}}afterRender(e){this._domNode.classList.toggle("below",e===2)}};$(Ut.ID,Ut,4);var mS=function(s,e,t,i){var o=arguments.length,n=o<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(s,e,t,i);else for(var a=s.length-1;a>=0;a--)(r=s[a])&&(n=(o<3?r(n):o>3?r(e,t,n):r(e,t))||n);return o>3&&n&&Object.defineProperty(e,t,n),n},Wc=function(s,e){return function(t,i){e(t,i,s)}},Bc=class{constructor(e){this.copyMimeTypes=[],this.kind=e,this.providedDropEditKinds=[this.kind],this.providedPasteEditKinds=[this.kind]}async provideDocumentPasteEdits(e,t,i,o,n){let r=await this.getEdit(i,n);if(r)return{edits:[{insertText:r.insertText,title:r.title,kind:r.kind,handledMimeType:r.handledMimeType,yieldTo:r.yieldTo}],dispose(){}}}async provideDocumentDropEdits(e,t,i,o){let n=await this.getEdit(i,o);if(n)return{edits:[{insertText:n.insertText,title:n.title,kind:n.kind,handledMimeType:n.handledMimeType,yieldTo:n.yieldTo}],dispose(){}}}},Qn=class s extends Bc{static{this.id="text"}constructor(){super(He.Empty.append("text","plain")),this.id=s.id,this.dropMimeTypes=[ti.text],this.pasteMimeTypes=[ti.text]}async getEdit(e,t){let i=e.get(ti.text);if(!i||e.has(ti.uriList))return;let o=await i.asString();return{handledMimeType:ti.text,title:p(980,"Insert Plain Text"),insertText:o,kind:this.kind}}},Im=class extends Bc{constructor(){super(He.Empty.append("uri","path","absolute")),this.dropMimeTypes=[ti.uriList],this.pasteMimeTypes=[ti.uriList]}async getEdit(e,t){let i=await MT(e);if(!i.length||t.isCancellationRequested)return;let o=0,n=i.map(({uri:a,originalText:d})=>a.scheme===_t.file?a.fsPath:(o++,d)).join(" "),r;return o>0?r=i.length>1?p(981,"Insert Uris"):p(982,"Insert Uri"):r=i.length>1?p(983,"Insert Paths"):p(984,"Insert Path"),{handledMimeType:ti.uriList,insertText:n,title:r,kind:this.kind}}},Lm=class extends Bc{constructor(e){super(He.Empty.append("uri","path","relative")),this._workspaceContextService=e,this.dropMimeTypes=[ti.uriList],this.pasteMimeTypes=[ti.uriList]}async getEdit(e,t){let i=await MT(e);if(!i.length||t.isCancellationRequested)return;let o=vi(i.map(({uri:n})=>{let r=this._workspaceContextService.getWorkspaceFolder(n);return r?N0(r.uri,n):void 0}));if(o.length)return{handledMimeType:ti.uriList,insertText:o.join(" "),title:i.length>1?p(985,"Insert Relative Paths"):p(986,"Insert Relative Path"),kind:this.kind}}};Lm=mS([Wc(0,Eo)],Lm);var gS=class{constructor(){this.kind=new He("html"),this.providedPasteEditKinds=[this.kind],this.copyMimeTypes=[],this.pasteMimeTypes=["text/html"],this._yieldTo=[{mimeType:ti.text}]}async provideDocumentPasteEdits(e,t,i,o,n){if(o.triggerKind!==fc.PasteAs&&!o.only?.contains(this.kind))return;let a=await i.get("text/html")?.asString();if(!(!a||n.isCancellationRequested))return{dispose(){},edits:[{insertText:a,yieldTo:this._yieldTo,title:p(987,"Insert HTML"),kind:this.kind}]}}};async function MT(s){let e=s.get(ti.uriList);if(!e)return[];let t=await e.asString(),i=[];for(let o of Bg.parse(t))try{i.push({uri:ge.parse(o),originalText:o})}catch{}return i}var Gs={scheme:"*",hasAccessToAllModels:!0},Em=class extends D{constructor(e,t){super(),this._register(e.documentDropEditProvider.register(Gs,new Qn)),this._register(e.documentDropEditProvider.register(Gs,new Im)),this._register(e.documentDropEditProvider.register(Gs,new Lm(t)))}};Em=mS([Wc(0,V),Wc(1,Eo)],Em);var Dm=class extends D{constructor(e,t){super(),this._register(e.documentPasteEditProvider.register(Gs,new Qn)),this._register(e.documentPasteEditProvider.register(Gs,new Im)),this._register(e.documentPasteEditProvider.register(Gs,new Lm(t))),this._register(e.documentPasteEditProvider.register(Gs,new gS))}};Dm=mS([Wc(0,V),Wc(1,Eo)],Dm);var pS=class s{constructor(){this.value="",this.pos=0}static{this._table={36:0,58:1,44:2,123:3,125:4,92:5,47:6,124:7,43:11,45:12,63:13}}static isDigitCharacter(e){return e>=48&&e<=57}static isVariableCharacter(e){return e===95||e>=97&&e<=122||e>=65&&e<=90}text(e){this.value=e,this.pos=0}tokenText(e){return this.value.substr(e.pos,e.len)}next(){if(this.pos>=this.value.length)return{type:14,pos:this.pos,len:0};let e=this.pos,t=0,i=this.value.charCodeAt(e),o;if(o=s._table[i],typeof o=="number")return this.pos+=1,{type:o,pos:e,len:1};if(s.isDigitCharacter(i)){o=8;do t+=1,i=this.value.charCodeAt(e+t);while(s.isDigitCharacter(i));return this.pos+=t,{type:o,pos:e,len:t}}if(s.isVariableCharacter(i)){o=9;do i=this.value.charCodeAt(e+ ++t);while(s.isVariableCharacter(i)||s.isDigitCharacter(i));return this.pos+=t,{type:o,pos:e,len:t}}o=10;do t+=1,i=this.value.charCodeAt(e+t);while(!isNaN(i)&&typeof s._table[i]>"u"&&!s.isDigitCharacter(i)&&!s.isVariableCharacter(i));return this.pos+=t,{type:o,pos:e,len:t}}},Wr=class{constructor(){this._children=[]}appendChild(e){return e instanceof jt&&this._children[this._children.length-1]instanceof jt?this._children[this._children.length-1].value+=e.value:(e.parent=this,this._children.push(e)),this}replace(e,t){let{parent:i}=e,o=i.children.indexOf(e),n=i.children.slice(0);n.splice(o,1,...t),i._children=n,(function r(a,d){for(let l of a)l.parent=d,r(l.children,l)})(t,i)}get children(){return this._children}get rightMostDescendant(){return this._children.length>0?this._children[this._children.length-1].rightMostDescendant:this}get snippet(){let e=this;for(;;){if(!e)return;if(e instanceof Rd)return e;e=e.parent}}toString(){return this.children.reduce((e,t)=>e+t.toString(),"")}len(){return 0}},jt=class s extends Wr{constructor(e){super(),this.value=e}toString(){return this.value}len(){return this.value.length}clone(){return new s(this.value)}},km=class extends Wr{},Qi=class s extends km{static compareByIndex(e,t){return e.index===t.index?0:e.isFinalTabstop?1:t.isFinalTabstop||e.index<t.index?-1:e.index>t.index?1:0}constructor(e){super(),this.index=e}get isFinalTabstop(){return this.index===0}get choice(){return this._children.length===1&&this._children[0]instanceof $s?this._children[0]:void 0}clone(){let e=new s(this.index);return this.transform&&(e.transform=this.transform.clone()),e._children=this.children.map(t=>t.clone()),e}},$s=class s extends Wr{constructor(){super(...arguments),this.options=[]}appendChild(e){return e instanceof jt&&(e.parent=this,this.options.push(e)),this}toString(){return this.options[0].value}len(){return this.options[0].len()}clone(){let e=new s;return this.options.forEach(e.appendChild,e),e}},fS=class s extends Wr{constructor(){super(...arguments),this.regexp=new RegExp("")}resolve(e){let t=this,i=!1,o=e.replace(this.regexp,function(){return i=!0,t._replace(Array.prototype.slice.call(arguments,0,-2))});return!i&&this._children.some(n=>n instanceof zo&&!!n.elseValue)&&(o=this._replace([])),o}_replace(e){let t="";for(let i of this._children)if(i instanceof zo){let o=e[i.index]||"";o=i.resolve(o),t+=o}else t+=i.toString();return t}toString(){return""}clone(){let e=new s;return e.regexp=new RegExp(this.regexp.source,(this.regexp.ignoreCase?"i":"")+(this.regexp.global?"g":"")),e._children=this.children.map(t=>t.clone()),e}},zo=class s extends Wr{constructor(e,t,i,o){super(),this.index=e,this.shorthandName=t,this.ifValue=i,this.elseValue=o}resolve(e){return this.shorthandName==="upcase"?e?e.toLocaleUpperCase():"":this.shorthandName==="downcase"?e?e.toLocaleLowerCase():"":this.shorthandName==="capitalize"?e?e[0].toLocaleUpperCase()+e.substr(1):"":this.shorthandName==="pascalcase"?e?this._toPascalCase(e):"":this.shorthandName==="camelcase"?e?this._toCamelCase(e):"":this.shorthandName==="kebabcase"?e?this._toKebabCase(e):"":this.shorthandName==="snakecase"?e?this._toSnakeCase(e):"":e&&typeof this.ifValue=="string"?this.ifValue:!e&&typeof this.elseValue=="string"?this.elseValue:e||""}_toKebabCase(e){if(!e.match(/[\p{L}0-9]+/gu))return e;if(!e.match(/[\p{L}0-9]/u))return e.trim().toLowerCase().replace(/^_+|_+$/g,"").replace(/[\s_]+/g,"-");let i=e.trim().replace(/^_+|_+$/g,""),o=i.match(/\p{Lu}{2,}(?=\p{Lu}\p{Ll}+[0-9]*|[\s_-]|$)|\p{Lu}?\p{Ll}+[0-9]*|\p{Lu}(?=\p{Lu}\p{Ll})|\p{Lu}(?=[\s_-]|$)|[0-9]+/gu);return o?o.map(n=>n.toLowerCase()).join("-"):i.split(/[\s_-]+/).filter(n=>n.length>0).map(n=>n.toLowerCase()).join("-")}_toPascalCase(e){let t=e.match(/[\p{L}0-9]+/gu);return t?t.map(i=>i.charAt(0).toUpperCase()+i.substr(1)).join(""):e}_toCamelCase(e){let t=e.match(/[\p{L}0-9]+/gu);return t?t.map((i,o)=>o===0?i.charAt(0).toLowerCase()+i.substr(1):i.charAt(0).toUpperCase()+i.substr(1)).join(""):e}_toSnakeCase(e){return e.replace(/(\p{Ll})(\p{Lu})/gu,"$1_$2").replace(/[\s\-]+/g,"_").toLowerCase()}clone(){return new s(this.index,this.shorthandName,this.ifValue,this.elseValue)}},Br=class s extends km{constructor(e){super(),this.name=e}resolve(e){let t=e.resolve(this);return this.transform&&(t=this.transform.resolve(t||"")),t!==void 0?(this._children=[new jt(t)],!0):!1}clone(){let e=new s(this.name);return this.transform&&(e.transform=this.transform.clone()),e._children=this.children.map(t=>t.clone()),e}};function NT(s,e){let t=[...s];for(;t.length>0;){let i=t.shift();if(!e(i))break;t.unshift(...i.children)}}var Rd=class s extends Wr{get placeholderInfo(){if(!this._placeholders){let e=[],t;this.walk(function(i){return i instanceof Qi&&(e.push(i),t=!t||t.index<i.index?i:t),!0}),this._placeholders={all:e,last:t}}return this._placeholders}get placeholders(){let{all:e}=this.placeholderInfo;return e}offset(e){let t=0,i=!1;return this.walk(o=>o===e?(i=!0,!1):(t+=o.len(),!0)),i?t:-1}fullLen(e){let t=0;return NT([e],i=>(t+=i.len(),!0)),t}enclosingPlaceholders(e){let t=[],{parent:i}=e;for(;i;)i instanceof Qi&&t.push(i),i=i.parent;return t}resolveVariables(e){return this.walk(t=>(t instanceof Br&&t.resolve(e)&&(this._placeholders=void 0),!0)),this}appendChild(e){return this._placeholders=void 0,super.appendChild(e)}replace(e,t){return this._placeholders=void 0,super.replace(e,t)}clone(){let e=new s;return e._children=this.children.map(t=>t.clone()),e}walk(e){NT(this.children,e)}},Vi=class{constructor(){this._scanner=new pS,this._token={type:14,pos:0,len:0}}static escape(e){return e.replace(/\$|}|\\/g,"\\$&")}static guessNeedsClipboard(e){return/\${?CLIPBOARD/.test(e)}parse(e,t,i){let o=new Rd;return this.parseFragment(e,o),this.ensureFinalTabstop(o,i??!1,t??!1),o}parseFragment(e,t){let i=t.children.length;for(this._scanner.text(e),this._token=this._scanner.next();this._parse(t););let o=new Map,n=[];t.walk(d=>(d instanceof Qi&&(d.isFinalTabstop?o.set(0,void 0):!o.has(d.index)&&d.children.length>0?o.set(d.index,d.children):n.push(d)),!0));let r=(d,l)=>{let c=o.get(d.index);if(!c)return;let h=new Qi(d.index);h.transform=d.transform;for(let u of c){let g=u.clone();h.appendChild(g),g instanceof Qi&&o.has(g.index)&&!l.has(g.index)&&(l.add(g.index),r(g,l),l.delete(g.index))}t.replace(d,[h])},a=new Set;for(let d of n)r(d,a);return t.children.slice(i)}ensureFinalTabstop(e,t,i){(t||i&&e.placeholders.length>0)&&(e.placeholders.find(n=>n.index===0)||e.appendChild(new Qi(0)))}_accept(e,t){if(e===void 0||this._token.type===e){let i=t?this._scanner.tokenText(this._token):!0;return this._token=this._scanner.next(),i}return!1}_backTo(e){return this._scanner.pos=e.pos+e.len,this._token=e,!1}_until(e){let t=this._token;for(;this._token.type!==e;){if(this._token.type===14)return!1;if(this._token.type===5){let o=this._scanner.next();if(o.type!==0&&o.type!==4&&o.type!==5)return!1}this._token=this._scanner.next()}let i=this._scanner.value.substring(t.pos,this._token.pos).replace(/\\(\$|}|\\)/g,"$1");return this._token=this._scanner.next(),i}_parse(e){return this._parseEscaped(e)||this._parseTabstopOrVariableName(e)||this._parseComplexPlaceholder(e)||this._parseComplexVariable(e)||this._parseAnything(e)}_parseEscaped(e){let t;return(t=this._accept(5,!0))?(t=this._accept(0,!0)||this._accept(4,!0)||this._accept(5,!0)||t,e.appendChild(new jt(t)),!0):!1}_parseTabstopOrVariableName(e){let t,i=this._token;return this._accept(0)&&(t=this._accept(9,!0)||this._accept(8,!0))?(e.appendChild(/^\d+$/.test(t)?new Qi(Number(t)):new Br(t)),!0):this._backTo(i)}_parseComplexPlaceholder(e){let t,i=this._token;if(!(this._accept(0)&&this._accept(3)&&(t=this._accept(8,!0))))return this._backTo(i);let n=new Qi(Number(t));if(this._accept(1))for(;;){if(this._accept(4))return e.appendChild(n),!0;if(!this._parse(n))return e.appendChild(new jt("${"+t+":")),n.children.forEach(e.appendChild,e),!0}else if(n.index>0&&this._accept(7)){let r=new $s;for(;;){if(this._parseChoiceElement(r)){if(this._accept(2))continue;if(this._accept(7)&&(n.appendChild(r),this._accept(4)))return e.appendChild(n),!0}return this._backTo(i),!1}}else return this._accept(6)?this._parseTransform(n)?(e.appendChild(n),!0):(this._backTo(i),!1):this._accept(4)?(e.appendChild(n),!0):this._backTo(i)}_parseChoiceElement(e){let t=this._token,i=[];for(;!(this._token.type===2||this._token.type===7);){let o;if((o=this._accept(5,!0))?o=this._accept(2,!0)||this._accept(7,!0)||this._accept(5,!0)||o:o=this._accept(void 0,!0),!o)return this._backTo(t),!1;i.push(o)}return i.length===0?(this._backTo(t),!1):(e.appendChild(new jt(i.join(""))),!0)}_parseComplexVariable(e){let t,i=this._token;if(!(this._accept(0)&&this._accept(3)&&(t=this._accept(9,!0))))return this._backTo(i);let n=new Br(t);if(this._accept(1))for(;;){if(this._accept(4))return e.appendChild(n),!0;if(!this._parse(n))return e.appendChild(new jt("${"+t+":")),n.children.forEach(e.appendChild,e),!0}else return this._accept(6)?this._parseTransform(n)?(e.appendChild(n),!0):(this._backTo(i),!1):this._accept(4)?(e.appendChild(n),!0):this._backTo(i)}_parseTransform(e){let t=new fS,i="",o="";for(;!this._accept(6);){let n;if(n=this._accept(5,!0)){n=this._accept(6,!0)||n,i+=n;continue}if(this._token.type!==14){i+=this._accept(void 0,!0);continue}return!1}for(;!this._accept(6);){let n;if(n=this._accept(5,!0)){n=this._accept(5,!0)||this._accept(6,!0)||n,t.appendChild(new jt(n));continue}if(!(this._parseFormatString(t)||this._parseAnything(t)))return!1}for(;!this._accept(4);){if(this._token.type!==14){o+=this._accept(void 0,!0);continue}return!1}try{t.regexp=new RegExp(i,o)}catch{return!1}return e.transform=t,!0}_parseFormatString(e){let t=this._token;if(!this._accept(0))return!1;let i=!1;this._accept(3)&&(i=!0);let o=this._accept(8,!0);if(o)if(i){if(this._accept(4))return e.appendChild(new zo(Number(o))),!0;if(!this._accept(1))return this._backTo(t),!1}else return e.appendChild(new zo(Number(o))),!0;else return this._backTo(t),!1;if(this._accept(6)){let n=this._accept(9,!0);return!n||!this._accept(4)?(this._backTo(t),!1):(e.appendChild(new zo(Number(o),n)),!0)}else if(this._accept(11)){let n=this._until(4);if(n)return e.appendChild(new zo(Number(o),void 0,n,void 0)),!0}else if(this._accept(12)){let n=this._until(4);if(n)return e.appendChild(new zo(Number(o),void 0,void 0,n)),!0}else if(this._accept(13)){let n=this._until(1);if(n){let r=this._until(4);if(r)return e.appendChild(new zo(Number(o),void 0,n,r)),!0}}else{let n=this._until(4);if(n)return e.appendChild(new zo(Number(o),void 0,void 0,n)),!0}return this._backTo(t),!1}_parseAnything(e){return this._token.type!==14?(e.appendChild(new jt(this._scanner.tokenText(this._token))),this._accept(void 0),!0):!1}};function Rm(s,e,t){return(typeof t.insertText=="string"?t.insertText==="":t.insertText.snippet==="")?{edits:t.additionalEdit?.edits??[]}:{edits:[...e.map(i=>new em(s,{range:i,text:typeof t.insertText=="string"?Vi.escape(t.insertText)+"$0":t.insertText.snippet,insertAsSnippet:!0})),...t.additionalEdit?.edits??[]]}}function Tm(s){function e(r,a){return"mimeType"in r?r.mimeType===a.handledMimeType:!!a.kind&&r.kind.contains(a.kind)}let t=new Map;for(let r of s)for(let a of r.yieldTo??[])for(let d of s)if(d!==r&&e(a,d)){let l=t.get(r);l||(l=[],t.set(r,l)),l.push(d)}if(!t.size)return Array.from(s);let i=new Set,o=[];function n(r){if(!r.length)return[];let a=r[0];if(o.includes(a))return console.warn("Yield to cycle detected",a),r;if(i.has(a))return n(r.slice(1));let d=[],l=t.get(a);return l&&(o.push(a),d=n(l),o.pop()),i.add(a),[...d,a,...n(r.slice(1))]}return n(Array.from(s))}function _S(s,e){return e&&(s.stack||s.stacktrace)?p(33,"{0}: {1}",OT(s),PT(s.stack)||PT(s.stacktrace)):OT(s)}function PT(s){return Array.isArray(s)?s.join(`
3
3
  `):s}function OT(s){return s.code==="ERR_UNC_HOST_NOT_ALLOWED"?`${s.message}. Please update the 'security.allowedUNCHosts' setting if you want to allow this host.`:typeof s.code=="string"&&typeof s.errno=="number"&&typeof s.syscall=="string"?p(34,"A system error occurred ({0})",s.message):s.message||p(35,"An unknown error occurred. Please consult the log for more details.")}function Td(s=null,e=!1){if(!s)return p(36,"An unknown error occurred. Please consult the log for more details.");if(Array.isArray(s)){let t=vi(s),i=Td(t[0],e);return t.length>1?p(37,"{0} ({1} errors in total)",i,t.length):i}if(Ju(s))return s;if(s.detail){let t=s.detail;if(t.error)return _S(t.error,e);if(t.exception)return _S(t.exception,e)}return s.stack?_S(s,e):s.message?s.message:p(38,"An unknown error occurred. Please consult the log for more details.")}var Mm=class extends D{constructor(e){super(),this._onChange=this._register(new z),this.onChange=this._onChange.event,this._checked=!!e.checked,this._title=e.title??e.ariaLabel,this.domNode=W("button.monaco-switch"),this.domNode.type="button",this.domNode.setAttribute("role","switch"),U(this.domNode,W(".monaco-switch-thumb")),this._register($g().setupDelayedHover(this.domNode,()=>({content:this._title,style:1}))),this.setAriaLabel(e.ariaLabel,e.title),this.disabled=!!e.disabled,this._applyState(),this._register(Z(this.domNode,me.CLICK,t=>{yt.stop(t,!0),!this.domNode.disabled&&(this._checked=!this._checked,this._applyState(),this._onChange.fire(this._checked))}))}get checked(){return this._checked}set checked(e){this._checked!==e&&(this._checked=e,this._applyState())}get disabled(){return this.domNode.disabled}set disabled(e){this.domNode.disabled=e}setAriaLabel(e,t=e){this.domNode.setAttribute("aria-label",e),this._title=t}_applyState(){this.domNode.setAttribute("aria-checked",String(this._checked)),this.domNode.classList.toggle("checked",this._checked)}};var ZP=function(s,e,t,i){var o=arguments.length,n=o<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(s,e,t,i);else for(var a=s.length-1;a>=0;a--)(r=s[a])&&(n=(o<3?r(n):o>3?r(e,t,n):r(e,t))||n);return o>3&&n&&Object.defineProperty(e,t,n),n},AT=function(s,e){return function(t,i){e(t,i,s)}},Md=class extends D{get enabled(){return this._enabled}set enabled(e){e?(this.el.setAttribute("aria-disabled","false"),this.el.tabIndex=0,this.el.style.pointerEvents="auto",this.el.style.opacity="1",this.el.style.cursor="pointer",this._enabled=!1):(this.el.setAttribute("aria-disabled","true"),this.el.tabIndex=-1,this.el.style.pointerEvents="none",this.el.style.opacity="0.4",this.el.style.cursor="default",this._enabled=!0),this._enabled=e}constructor(e,t,i={},o,n){super(),this._link=t,this._hoverService=o,this._enabled=!0,this.el=U(e,W("a.monaco-link",{tabIndex:t.tabIndex??0,href:t.href},t.label)),this.hoverDelegate=i.hoverDelegate??jg("mouse"),this.setTooltip(t.title),this.el.setAttribute("role","button");let r=this._register(new Hg(this.el,"click")),a=this._register(new Hg(this.el,"keydown")),d=De.chain(a.event,h=>h.map(u=>new wr(u)).filter(u=>u.keyCode===3||u.keyCode===10)),l=this._register(new Hg(this.el,Lc.Tap)).event;this._register(Fg.addTarget(this.el));let c=De.any(r.event,d,l);this._register(c(h=>{this.enabled&&(yt.stop(h,!0),i?.opener?i.opener(this._link.href):n.open(this._link.href,{allowCommands:!0}))})),this.enabled=!0}setTooltip(e){!this.hover&&e?this.hover=this._register(this._hoverService.setupManagedHover(this.hoverDelegate,this.el,e)):this.hover&&this.hover.update(e)}};Md=ZP([AT(3,Lt),AT(4,mo)],Md);var yS=function(s,e,t,i){var o=arguments.length,n=o<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(s,e,t,i);else for(var a=s.length-1;a>=0;a--)(r=s[a])&&(n=(o<3?r(n):o>3?r(e,t,n):r(e,t))||n);return o>3&&n&&Object.defineProperty(e,t,n),n},Vr=function(s,e){return function(t,i){e(t,i,s)}},bS,Am="acceptSelectedCodeAction",Fm="previewSelectedCodeAction",YP=new Set([Am,Fm,"toggleSectionCodeAction"]),XP="actionList.remove",vS=class{get templateId(){return"header"}renderTemplate(e){e.classList.add("group-header");let t=document.createElement("span");return e.append(t),{container:e,text:t}}renderElement(e,t,i){i.text.textContent=e.group?.title??e.label??""}disposeTemplate(e){}},CS=class{get templateId(){return"separator"}renderTemplate(e){e.classList.add("separator");let t=document.createElement("span");return e.append(t),{container:e,text:t}}renderElement(e,t,i){i.container.classList.toggle("has-label",!!e.label),i.text.textContent=e.label??""}disposeTemplate(e){}};function FT(s){return!!s.submenuActions?.length&&!s.hover?.content||!!s.hover?.expandable}function HT(s){return FT(s)&&s.hover?.showIndicator!==!1}var SS=class{get templateId(){return"action"}constructor(e,t,i,o,n,r,a,d,l,c,h,u){this._supportsPreview=e,this._onRemoveItem=t,this._onShowSubmenu=i,this._reservesSubmenuSpace=o,this._groupTitleByIndex=n,this._linkHandler=r,this._hideDefaultKeybindingTooltip=a,this._stopToolbarPointerPropagation=d,this._registerStandaloneToggle=l,this._registerToolbar=c,this._keybindingService=h,this._openerService=u}renderTemplate(e){e.classList.add(this.templateId);let t=document.createElement("div");t.className="icon",e.append(t);let i=document.createElement("span");i.className="title",e.append(i);let o=document.createElement("span");o.className="action-item-badge",o.ariaHidden="true",e.append(o);let n=document.createElement("span");n.className="description",e.append(n);let r=document.createElement("span");r.className="group-title",e.append(r);let a=document.createElement("span");a.className="detail",e.append(a);let d=new vn(e,tn),l=document.createElement("div");l.className="action-list-item-toolbar",e.append(l);let c=document.createElement("div");c.className="action-list-submenu-indicator",e.append(c);let h=document.createElement("div");h.className="action-list-item-inline-toggle",e.append(h);let u=new M;return{container:e,icon:t,text:i,detail:a,badge:o,description:n,groupTitle:r,keybinding:d,toolbar:l,submenuIndicator:c,inlineToggleContainer:h,elementDisposables:u}}renderElement(e,t,i){if(i.elementDisposables.clear(),e.iconClasses?.length?(i.icon.className=["icon",...e.iconClasses].join(" "),i.icon.style.color=""):e.group?.icon?(i.icon.className=ne.asClassName(e.group.icon),i.icon.style.color=e.group.icon.color?Se(e.group.icon.color.id):""):(i.icon.className=ne.asClassName(B.lightBulb),i.icon.style.color="var(--vscode-editorLightBulb-foreground)"),!e.item&&!e.standaloneToggle||!e.label)return;if(v0(!e.hideIcon,i.icon),e.isSectionToggle){let c=e.group?.icon===B.chevronDown;i.container.setAttribute("aria-expanded",String(c))}else i.container.removeAttribute("aria-expanded");i.previousClassNames?.length&&i.container.classList.remove(...i.previousClassNames);let o=e.className?.split(/\s+/).filter(c=>c.length>0)??[];if(i.container.classList.toggle("action-list-custom",o.length>0),o.length&&i.container.classList.add(...o),i.previousClassNames=o,i.text.textContent=ko(e.label),e.badge?(i.badge.textContent=e.badge,i.badge.style.display=""):(i.badge.textContent="",i.badge.style.display="none"),e.keybinding)i.description.textContent=e.keybinding.getLabel(),i.description.style.display="inline",i.description.style.letterSpacing="0.5px";else if(e.description){if(Vt(i.description),typeof e.description=="string")i.description.textContent=ko(e.description);else{let c=Vs(e.description,{actionHandler:h=>{let u=ge.parse(h);this._linkHandler?this._linkHandler(u,e):this._openerService.open(u,{allowCommands:!0})}});i.elementDisposables.add(c),i.description.appendChild(c.element)}i.description.style.display="inline"}else i.description.textContent="",i.description.style.display="none";let n=this._groupTitleByIndex.get(t);n?(i.groupTitle.textContent=n,i.groupTitle.style.display=""):(i.groupTitle.textContent="",i.groupTitle.style.display="none"),e.detail?(i.detail.textContent=ko(e.detail),i.detail.style.display=""):(i.detail.textContent="",i.detail.style.display="none"),i.container.classList.toggle("has-detail",!!e.detail),Vt(i.inlineToggleContainer);let r=e.standaloneToggle??e.inlineToggle;if(r){let c=document.createElement("span");c.className="action-list-item-inline-toggle-label",c.textContent=ko(r.label),e.standaloneToggle||i.inlineToggleContainer.append(c),i.inlineToggleContainer.style.display="",i.container.classList.toggle("has-inline-toggle",!!e.inlineToggle),i.container.classList.toggle("has-standalone-toggle",!!e.standaloneToggle);let h=i.elementDisposables.add(new Mm({ariaLabel:r.title??r.label,checked:r.checked,disabled:r.disabled}));i.inlineToggleContainer.append(h.domNode),e.standaloneToggle&&i.elementDisposables.add(this._registerStandaloneToggle(e,h)),i.elementDisposables.add(h.onChange(()=>r.onChange(h.checked))),i.elementDisposables.add(Z(i.inlineToggleContainer,me.CLICK,u=>u.stopPropagation()))}else i.inlineToggleContainer.style.display="none",i.container.classList.remove("has-inline-toggle"),i.container.classList.remove("has-standalone-toggle");let a=this._keybindingService.lookupKeybinding(Am)?.getLabel(),d=this._keybindingService.lookupKeybinding(Fm)?.getLabel();i.container.classList.toggle("option-disabled",!!e.disabled),e.hover!==void 0?i.container.title="":e.tooltip?i.container.title=e.tooltip:e.disabled?i.container.title=e.label:e.standaloneToggle||this._hideDefaultKeybindingTooltip?i.container.title="":a&&d?this._supportsPreview&&e.canPreview?i.container.title=p(1731,"{0} to Apply, {1} to Preview",a,d):i.container.title=p(1732,"{0} to Apply",a):i.container.title="",Vt(i.toolbar);let l=[...e.toolbarActions??[]];if(e.onRemove&&l.push(x0({id:XP,label:p(1733,"Remove"),class:ne.asClassName(B.close),run:async()=>{await e.onRemove(),this._onRemoveItem?.(e)}})),i.container.classList.toggle("has-toolbar",l.length>0),l.length>0){let c=new Xi(i.toolbar);i.elementDisposables.add(c),this._stopToolbarPointerPropagation?(i.elementDisposables.add(Ds(i.toolbar,h=>{h.preventDefault(),h.stopPropagation()})),i.elementDisposables.add(Z(i.toolbar,me.CLICK,h=>h.stopPropagation())),i.elementDisposables.add(Z(i.toolbar,Lc.Tap,h=>h.stopPropagation()))):i.elementDisposables.add(Ds(i.toolbar,h=>h.preventDefault())),c.push(l,{icon:!0,label:!1}),i.elementDisposables.add(this._registerToolbar(e,c))}HT(e)?(i.submenuIndicator.className="action-list-submenu-indicator has-submenu "+ne.asClassName(B.chevronRight),i.submenuIndicator.style.display="",i.submenuIndicator.style.visibility="",i.elementDisposables.add(Z(i.submenuIndicator,me.CLICK,c=>{c.stopPropagation(),this._onShowSubmenu?.(e)}))):this._reservesSubmenuSpace()?(i.submenuIndicator.className="action-list-submenu-indicator",i.submenuIndicator.style.display="",i.submenuIndicator.style.visibility="hidden"):(i.submenuIndicator.className="action-list-submenu-indicator",i.submenuIndicator.style.display="none"),FT(e)?(i.container.setAttribute("aria-haspopup",e.hover?.expandable?"dialog":"menu"),i.container.setAttribute("aria-expanded","false")):(i.container.removeAttribute("aria-haspopup"),e.isSectionToggle||i.container.removeAttribute("aria-expanded"))}disposeTemplate(e){e.keybinding.dispose(),e.elementDisposables.dispose()}};SS=yS([Vr(10,he),Vr(11,mo)],SS);var Nm=class extends UIEvent{constructor(){super("acceptSelectedAction")}},Pm=class extends UIEvent{constructor(){super("previewSelectedAction")}};function QP(s){if(s.kind==="action")return s.label}var wS=bS=class extends D{constructor(e,t,i,o,n,r,a,d,l){if(super(),this._supportsPreview=t,this._delegate=o,this._options=r,this._keybindingService=a,this._openerService=d,this._instantiationService=l,this._headerLineHeight=24,this._separatorLineHeight=8,this.cts=this._register(new Oe),this._submenuDisposables=this._register(new M),this._submenuHoverActionElements=[],this._itemMoveAnimation=this._register(new xe),this._collapsedSections=new Set,this._filterText="",this._imeSessionInProgress=!1,this._isMeasuringWidth=!1,this._suppressHover=!1,this._hoverEnabled=!0,this._ignoreInitialHover=!0,this._hasLaidOut=!1,this._filterCts=this._register(new xe),this._groupTitleByIndex=new Map,this._standaloneToggles=new Map,this._itemToolbars=new Map,this._onDidRequestLayout=this._register(new z),this.onDidRequestLayout=this._onDidRequestLayout.event,this._visibleMenuItems=i,this._initialFocusItemId=this._options?.initialFocusItemId,this._filterText=this._options?.showFilter?this._options.initialFilterValue??"":"",this.domNode=document.createElement("div"),this.domNode.classList.add("actionList"),this._options?.inlineDescription&&this.domNode.classList.add("inline-description"),this._options?.className){let g=this._options.className.split(/\s+/).filter(m=>m.length>0);g.length>0&&this.domNode.classList.add(...g)}if(this._actionLineHeight=24,this._submenuContainer=document.createElement("div"),this._submenuContainer.className="action-list-submenu-panel action-widget",this._submenuContainer.style.display="none",this._options?.persistentHover&&(this._submenuContainer.style.boxSizing="border-box"),this._submenuContainer.tabIndex=-1,this.domNode.append(this._submenuContainer),this._register(Z(this._submenuContainer,"keydown",g=>{if((g.key==="Enter"||g.key===" ")&&this._currentSubmenuElement?.hover?.tabThroughPanel){let f=ni(g.target)?g.target:void 0;if(f&&this._currentSubmenuElement.hover.getTabbableElements?.().includes(f)){g.stopPropagation();return}}if(g.key!=="ArrowLeft"&&g.key!=="Escape")return;yt.stop(g,!0);let m=g.key==="Escape"&&this._currentSubmenuWidget!==void 0;if(this._hideSubmenu(),m){this.hide();return}this._setKeyboardNavigation(!0),this._list.domFocus()})),this._register(Z(this._submenuContainer,"mouseenter",()=>{this._cancelSubmenuHide(),this._usesSubmenuPointerIntent()&&(this._cancelSubmenuShow(),this._resetSubmenuPointer())})),this._register(Z(this._submenuContainer,"mouseleave",()=>{this._scheduleSubmenuHide()})),this._register(Z(this.domNode,me.MOUSE_LEAVE,()=>{this._cancelSubmenuShow(),this._resetSubmenuPointer()})),this._usesSubmenuPointerIntent()&&this._register(Z(this.domNode,me.MOUSE_MOVE,g=>{ni(g.target)&&this._expandedTrigger?.contains(g.target)&&this._updateSubmenuPointer(g)})),this._register(ce(()=>{this._cancelSubmenuHide(),this._cancelSubmenuShow()})),this._options?.collapsedByDefault)for(let g of this._options.collapsedByDefault)this._collapsedSections.add(g);let c={getHeight:g=>this._getItemHeight(g),getTemplateId:g=>g.kind},h=()=>{let g=this._options?.reserveSubmenuSpace??!0;return g==="always"||g&&this._allMenuItems.some(HT)};this._list=this._register(new yd(e,this.domNode,c,[new SS(this._supportsPreview,g=>this._removeItem(g),g=>this._showSubmenuForItem(g),h,this._groupTitleByIndex,this._options?.linkHandler,this._options?.hideDefaultKeybindingTooltip??!1,this._options?.stopToolbarPointerPropagation??!1,(g,m)=>(this._standaloneToggles.set(g,m),ce(()=>{this._standaloneToggles.get(g)===m&&this._standaloneToggles.delete(g)})),(g,m)=>(this._itemToolbars.set(g,m),this._updateToolbarFocusability(),ce(()=>{this._itemToolbars.get(g)===m&&this._itemToolbars.delete(g)})),this._keybindingService,this._openerService),new vS,new CS],{keyboardSupport:!1,typeNavigationEnabled:!this._options?.showFilter&&!this._options?.onType,keyboardNavigationLabelProvider:{getKeyboardNavigationLabel:QP},accessibilityProvider:{getAriaLabel:g=>{if(g.kind==="action"){let m=g.label?ko(g?.label):"";if(g.badge&&(m=m+", "+ko(g.badge)),g.detail&&(m=m+", "+ko(g.detail)),g.ariaDescription)m=m+", "+ko(g.ariaDescription);else if(g.description){let _=typeof g.description=="string"?g.description:g.description.value;m=m+", "+ko(_)}if(g.hover?.content&&!g.ariaDescription&&!g.description){let _=g.hover.content,b=typeof _=="string"?_:Bs(_)?_.value:ni(_)?_.textContent??void 0:void 0;b&&(!g.detail||ko(g.detail)!==ko(b))&&(m=m+", "+ko(b))}g.group?.title&&(m=m+", "+g.group.title);let f=g.standaloneToggle??g.inlineToggle;return f&&(m=g.standaloneToggle?f.checked?p(1734,"{0}, on",f.label):p(1735,"{0}, off",f.label):m+", "+(f.checked?p(1736,"{0}, on",f.label):p(1737,"{0}, off",f.label))),g.disabled&&(m=p(1738,"{0}, Disabled Reason: {1}",m,g.disabled)),g.submenuActions?.length&&(m=p(1739,"{0}, use right arrow to access options",m)),m}return null},getWidgetAriaLabel:()=>p(1740,"Action Widget"),getSetSize:()=>this._visibleMenuItems.filter(g=>g.kind==="action").length,getPosInSet:(g,m)=>Math.max(this._visibleMenuItems.slice(0,m+1).filter(f=>f.kind==="action").length,1),getRole:g=>{switch(g.kind){case"action":return"option";case"separator":return"separator";default:return"separator"}},getWidgetRole:()=>"listbox",...n}})),this._list.style(MR),this._register(this._list.onKeyDown(()=>this._setKeyboardNavigation(!0))),this._register(Z(this._list.getHTMLElement(),me.MOUSE_MOVE,g=>{(g.movementX!==0||g.movementY!==0)&&this._setKeyboardNavigation(!1)})),this._register(this._list.onMouseClick(g=>this.onListClick(g))),this._register(this._list.onMouseOver(g=>{this._ignoreInitialHover||this.onListHover(g)}));let u=this._register(new xe);if(u.value=this._list.onMouseMove(g=>{(g.browserEvent.movementX!==0||g.browserEvent.movementY!==0)&&(u.clear(),this._ignoreInitialHover=!1,this.onListHover(g))}),this._register(this._list.onMouseDown(()=>{u.clear(),this._ignoreInitialHover=!1,this._setKeyboardNavigation(!1)})),this._register(this._list.onDidChangeFocus(()=>{this._updateToolbarFocusability(),this.onFocus()})),this._register(this._list.onDidChangeSelection(g=>this.onListSelection(g))),this._register(this._list.onDidScroll(()=>{this._isMeasuringWidth||this._layoutSubmenu?.()})),this._allMenuItems=[...i],this._options?.showFilter||this._options?.secondaryHeading){this._filterContainer=document.createElement("div"),this._filterContainer.className="action-list-filter";let g=U(this._filterContainer,W(".action-list-filter-row"));if(this._options?.showFilter){if(this._filterInput=document.createElement("input"),this._filterInput.type="text",this._filterInput.className="action-list-filter-input",this._filterInput.placeholder=this._options?.filterPlaceholder??p(1741,"Search..."),this._filterInput.value=this._filterText,this._filterInput.setAttribute("aria-label",p(1742,"Filter items")),g.appendChild(this._filterInput),this._register(Z(this._filterInput,me.KEY_DOWN,_=>{if(this._setKeyboardNavigation(!0),_.isComposing||!this._filterInput?.closest(".action-list-submenu-panel"))return;let b=this._keybindingService.softDispatch(new wr(_),this._filterInput);(b.kind===2&&b.commandId!==null&&YP.has(b.commandId)||_.key.length===1&&!_.ctrlKey&&!_.metaKey&&!_.altKey)&&_.stopPropagation()})),this._register(Z(this._filterInput,me.MOUSE_DOWN,()=>this._setKeyboardNavigation(!1))),this._options.tabThroughItemActions&&this._register(Z(this._filterInput,"keydown",_=>this._handleTabThroughPanelKeyDown(_),!0)),this._options.filterAsCombobox){let _=this._list.getHTMLElement();_.id=this._list.domId,this._filterInput.setAttribute("role","combobox"),this._filterInput.setAttribute("aria-label",this._filterInput.placeholder),this._filterInput.setAttribute("aria-autocomplete","list"),this._filterInput.setAttribute("aria-expanded","true"),this._filterInput.setAttribute("aria-controls",_.id),this._register(this._list.onDidChangeFocus(()=>this._updateFilterActiveDescendant())),this._register(Z(this._filterInput,"focus",()=>this._updateFilterActiveDescendant())),this._register(Z(this._filterInput,"blur",()=>this._updateFilterActiveDescendant())),this._register(Xt(this._filterInput,"keydown",b=>{if(this._imeSessionInProgress||b.browserEvent.isComposing||b.keyCode===114||b.keyCode===15||b.keyCode===17||b.keyCode===14||b.keyCode===13){b.stopPropagation();return}let y=b.keyCode===16||b.keyCode===18;if(!(!y&&b.keyCode!==3)){if(b.ctrlKey||b.metaKey||b.altKey||b.shiftKey){y&&b.stopPropagation();return}yt.stop(b,!0),b.keyCode===16?this.focusPrevious():b.keyCode===18?this.focusNext():this.acceptSelected()}}))}let m=this._options?.filterActions??[];if(m.length>0){let _=U(g,W(".action-list-filter-actions"));this._register(new Xi(_)).push(m,{icon:!0,label:!1})}let f=()=>{let _=this._filterInput.value;this._imeSessionInProgress||_===this._filterText&&!this._filterCts.value?.token.isCancellationRequested||(this._filterText=_,this._applyOrUpdateFilter())};this._register(Z(this._filterInput,"compositionstart",()=>{this._imeSessionInProgress=!0,this._filterCts.value?.cancel()})),this._register(Z(this._filterInput,"compositionend",()=>{this._imeSessionInProgress=!1,f()})),this._register(Z(this._filterInput,"input",f))}if(this._options?.secondaryHeading){let m=U(g,W(".action-list-filter-label"));m.textContent=this._options.secondaryHeading}}if(this._options?.footerText&&(this._footerContainer=document.createElement("div"),this._footerContainer.className="action-list-footer",this._footerContainer.textContent=this._options.footerText),this._options?.headerText){if(this._headerContainer=document.createElement("div"),this._headerContainer.className="action-list-header",this._options.headerIcon){let m=U(this._headerContainer,W("span.action-list-header-icon"));m.classList.add(...ne.asClassNameArray(this._options.headerIcon)),m.setAttribute("aria-hidden","true")}let g=U(this._headerContainer,W("span.action-list-header-text"));if(g.textContent=this._options.headerText,this._register(Z(this._headerContainer,me.MOUSE_ENTER,()=>{this._options?.persistentHover?(this._cancelSubmenuShow(),this._resetSubmenuPointer()):this._hideSubmenu()})),this._options.headerLink){let{label:m,uri:f}=this._options.headerLink;g.textContent+=" ",this._register(this._instantiationService.createInstance(Md,g,{label:m,href:f.toString(!0)},{}))}if(this._options.headerDismiss){let m=this._options.headerDismiss,f=U(this._headerContainer,W("span.action-list-header-dismiss"));f.appendChild(W(ne.asCSSSelector(B.close))),f.tabIndex=0,f.setAttribute("role","button"),f.setAttribute("aria-label",p(1743,"Dismiss"));let _=()=>{m(),this.focus(),this._headerContainer?.remove(),this._headerContainer=void 0,this._onDidRequestLayout.fire()};this._register(a0(f,()=>_())),this._register(Z(f,me.KEY_DOWN,b=>{(b.key==="Enter"||b.key===" ")&&(b.preventDefault(),_())}))}}this._applyFilter(),this._list.length&&this._focusCheckedOrFirst(),this._register(Z(this.domNode,"keydown",g=>{if(g.key==="ArrowRight"&&!g.isComposing){let m=this._list.getFocus();if(m.length>0){let f=this._list.element(m[0]);if(f?.submenuActions?.length||f?.hover?.expandable){yt.stop(g,!0);let _=this._getRowElement(m[0]);_&&(this._showSubmenuForElement(f,_),f.hover?.tabThroughPanel?this._focusFirstTabThroughPanelControl(f,_):this._currentSubmenuWidget?this._currentSubmenuWidget.focus():this._submenuContainer.focus())}}}})),this._register(Z(this.domNode,"keydown",g=>this._handleTabThroughPanelKeyDown(g),!0)),(this._filterInput||this._options?.onType)&&this._register(Z(this.domNode,"keydown",g=>{let m=g.target;(this._options?.onType||this._options?.filterAsCombobox)&&ni(m)&&(w0(m)||m.closest('button, a, [contenteditable="true"], .action-list-submenu-panel'))||(!this._filterInput||!Un(this._filterInput))&&!g.isComposing&&g.key.length===1&&g.key!==" "&&!g.ctrlKey&&!g.metaKey&&!g.altKey&&(g.preventDefault(),g.stopPropagation(),this._filterInput?(this._filterInput.focus(),this._filterInput.value=g.key,this._filterText=g.key,this._applyOrUpdateFilter()):this._options?.onType?.(g.key))}))}_toggleSection(e){let t=this._collapsedSections.has(e);if(t)this._collapsedSections.delete(e);else{this._collapsedSections.add(e);let i=this.getFocusedElement();if(i?.section===e&&!i.isSectionToggle){let o=this._visibleMenuItems.findIndex(n=>n.section===e&&n.isSectionToggle);o>=0&&this._list.setFocus([o])}}this._options?.onDidToggleSection?.(e,this._collapsedSections.has(e)),this._applyFilter(),t&&this._revealFirstItemOfSection(e)}_revealFirstItemOfSection(e){for(let t=0;t<this._list.length;t++){let i=this._list.element(t);if(i.section===e&&!i.isSectionToggle){this._list.reveal(t);return}}}_applyOrUpdateFilter(){if(!this._delegate.onFilter){this._applyFilter();return}let e=this._filterText;this._filterCts.value?.cancel();let t=new Oe;this._filterCts.value=t,this._delegate.onFilter(e,t.token).then(i=>{t.token.isCancellationRequested||(this._allMenuItems=[...i],this._applyFilter(!0))}).catch(()=>{}).finally(()=>{this._filterCts.value===t&&!t.token.isCancellationRequested&&this._filterCts.clear()})}_applyFilter(e=!1,t=!0,i){this._itemMoveAnimation.clear();let o=e?"":this._filterText.toLowerCase(),n=!e&&o.length>0,r=[],a=this._list.getFocus(),d;if(a.length>0&&(d=this._list.element(a[0])),n){let f,_=[],b=!1,v=()=>{f&&b&&r.push(f),r.push(..._),f=void 0,_=[],b=!1},y=L=>{let E=(L.label??"").toLowerCase(),S=typeof L.description=="string"?L.description:L.description?.value??"";return E.includes(o)||S.toLowerCase().includes(o)};for(let L of this._allMenuItems)if(L.kind!=="header"){if(L.kind==="separator"){v(),f=L.label?L:void 0;continue}if(L.showAlways){_.push(L);continue}if(!L.isSectionToggle){if(L.filterItems){let E=y(L)?L.filterItems:L.filterItems.filter(y);E.length>0&&(b=!0,_.push(...E));continue}y(L)&&(b=!0,_.push(L))}}v()}else for(let f of this._allMenuItems){if(f.kind==="header"){r.push(f);continue}if(f.kind==="separator"){if(f.section&&this._collapsedSections.has(f.section))continue;r.push(f);continue}if(f.isSectionToggle&&f.section){let _=this._collapsedSections.has(f.section);r.push({...f,group:{...f.group,icon:_?B.chevronRight:B.chevronDown}});continue}f.section&&this._collapsedSections.has(f.section)||r.push(f)}let l=[],c=!1;for(let f=0;f<r.length;f++)l[f]=c,r[f].kind==="action"&&(c=!0);let h=[],u=!1;for(let f=r.length-1;f>=0;f--){if(r[f].kind==="action"){u=!0;continue}r[f].kind==="separator"&&(h[f]=u,u=!1)}for(let f=r.length-1;f>=0;f--){let _=r[f];if(_.kind!=="separator")continue;let b=h[f],v=!_.label&&!l[f];(!b||v)&&r.splice(f,1)}this._options?.showGroupTitleOnFirstItem&&this._recomputeGroupTitles(r);let g=this._filterInput&&Un(this._filterInput),m=f0(this._list.getHTMLElement());if(this._visibleMenuItems=r,this._list.splice(0,this._list.length,r),t&&this._onDidRequestLayout.fire(),g)this._filterInput?.focus(),this._focusCheckedOrFirst();else if(this._hasLaidOut&&(d||i)){let f=i??d?.item?.id;if(f){for(let _=0;_<this._list.length;_++)if(this._list.element(_).item?.id===f){this._list.setFocus([_]),this._list.reveal(_);break}m&&(this._focusCheckedOrFirst(),this._list.domFocus())}}}get filterContainer(){return this._filterContainer}get footerContainer(){return this._footerContainer}get headerContainer(){return this._headerContainer}get filterInput(){return this._filterInput}get closeAnimation(){return this._options?.closeAnimation}focusCondition(e){return!e.disabled&&e.kind==="action"}_setKeyboardNavigation(e){if(this._keyboardNavigation===e)return;this._keyboardNavigation=e;let t=this._list.getHTMLElement();t.classList.toggle("keyboard-navigation",e===!0),t.classList.toggle("mouse-navigation",e===!1)}_updateFilterActiveDescendant(){if(!this._filterInput)return;let[e]=this._list.getFocus();Un(this._filterInput)&&e!==void 0?this._filterInput.setAttribute("aria-activedescendant",this._list.getElementID(e)):this._filterInput.removeAttribute("aria-activedescendant")}focus(){if(this._setKeyboardNavigation(void 0),this._filterInput&&this._options?.focusFilterOnOpen){this._filterInput.focus(),this._focusCheckedOrFirst();return}this._list.domFocus(),this._focusCheckedOrFirst(),this._showTabThroughPanelForFocusedItem()}clearFocus(){this._list.setFocus([])}getFocusedElement(){let e=this._list.getFocus();if(e.length>0)return this._list.element(e[0])}_updateToolbarFocusability(){if(!this._options?.tabThroughItemActions)return;let[e]=this._list.getFocus(),t=e!==void 0&&e<this._list.length?this._list.element(e):void 0;for(let[i,o]of this._itemToolbars)o.setFocusable(i===t)}_focusCheckedOrFirst(){let e=this._suppressHover;this._suppressHover=!0;try{let t=this._initialFocusItemId;if(this._initialFocusItemId=void 0,t)for(let n=0;n<this._list.length;n++){let r=this._list.element(n);if(this.focusCondition(r)&&r.item?.id===t){this._list.setFocus([n]),this._list.reveal(n);return}}let[i]=this._list.getFocus();if(i!==void 0){let n=this._list.element(i);if(n&&this.focusCondition(n)){this._list.reveal(i);return}}for(let n=0;n<this._list.length;n++){let r=this._list.element(n);if(this.focusCondition(r)&&r.item?.checked){this._list.setFocus([n]),this._list.reveal(n);return}}this._list.focusFirst(void 0,this.focusCondition);let o=this._list.getFocus();o.length>0&&this._list.reveal(o[0])}finally{this._suppressHover=e,this._options?.filterAsCombobox&&this._updateFilterActiveDescendant()}}hide(e){this._delegate.onHide(e),this.cts.cancel(),this._filterCts.value?.cancel(),this._filterCts.clear(),this._hideSubmenu()}clearFilter(){return this._filterInput&&this._filterText?(this._filterInput.value="",this._filterText="",this._applyOrUpdateFilter(),!0):!1}get hasDynamicHeight(){return this._options?.showFilter?!0:this._allMenuItems.some(e=>e.isSectionToggle)}get lineHeight(){return this._actionLineHeight}_getItemHeight(e){return this._itemHeightWith(e,this._options)}_itemHeightWith(e,t){switch(e.kind){case"header":return this._headerLineHeight;case"separator":return e.label?this._actionLineHeight:this._separatorLineHeight;default:return e.inlineToggle?t?.inlineToggleItemHeight??70:e.detail?t?.detailItemHeight??48:this._actionLineHeight}}computeFullHeight(){return this.computeHeightForItems(this._allMenuItems,void 0,this._options)}computeHeightForItems(e,t,i){let o=0;for(let n of e)t&&n.section&&!n.isSectionToggle&&t.has(n.section)||(o+=this._itemHeightWith(n,i));return o}computeListHeight(){let e=this._list.length,t=0;for(let i=0;i<e;i++){let o=this._list.element(i);t+=this._getItemHeight(o)}return t}layout(e,t){this._hasLaidOut=!0,this._list.layout(e,t),this.domNode.style.height=`${e}px`;let i=this.domNode.parentElement;i&&this._filterContainer?.parentElement===i&&i.insertBefore(this._filterContainer,this.domNode),this._layoutSubmenu?.()}computeMaxWidth(e){let t=this._list.length,i=Math.max(e,this._options?.minWidth??0),o=this._options?.maxWidth??Number.POSITIVE_INFINITY,n=Math.max(o,i),r=c=>Math.min(Math.max(c,i),n),a=this._allMenuItems.length;if(a>=50)return r(380);if(a>t){let c=[];for(let f=0;f<t;f++)c.push(this._list.element(f));let h=this._list.renderHeight,u=this._list.scrollTop,g=this._list.getFocus(),m=this._isMeasuringWidth;this._isMeasuringWidth=!0;try{let f=[...this._allMenuItems];this._list.splice(0,t,f);let _=0;for(let v of f)_+=this._getItemHeight(v);this._list.layout(_);let b=this._measureItemWidths(f);return r(Math.max(...b))}finally{try{this._list.splice(0,this._list.length,c),this._list.layout(h),this._list.scrollTop=u;let f=this._suppressHover;this._suppressHover=!0;try{this._list.setFocus(g)}finally{this._suppressHover=f}}finally{this._isMeasuringWidth=m}}}let d=[];for(let c=0;c<t;c++)d.push(this._list.element(c));let l=this._measureItemWidths(d);return r(Math.max(...l))}focusPrevious(){if(this._setKeyboardNavigation(!0),this._focusFilterResult("previous"))return;if(this._filterInput&&Un(this._filterInput)){this._list.domFocus();let i=this._list.getFocus();if(i.length>0){this._list.focusPrevious(1,!1,void 0,this.focusCondition);let o=this._list.getFocus();o.length>0&&o[0]>=i[0]?this._filterInput.focus():o.length>0&&this._list.reveal(o[0])}else{this._list.focusLast(void 0,this.focusCondition);let o=this._list.getFocus();o.length>0&&this._list.reveal(o[0])}return}let e=this._list.getFocus();this._list.focusPrevious(1,!0,void 0,this.focusCondition);let t=this._list.getFocus();if(t.length>0){if(this._filterInput&&e.length>0&&t[0]>e[0]){this._list.setFocus([]),this._filterInput.focus();return}this._list.reveal(t[0])}}focusNext(){if(this._setKeyboardNavigation(!0),this._focusFilterResult("next"))return;if(this._filterInput&&Un(this._filterInput)){if(this._list.domFocus(),this._list.getFocus().length>0){this._list.focusNext(1,!1,void 0,this.focusCondition);let o=this._list.getFocus();o.length>0&&this._list.reveal(o[0])}else{this._list.focusFirst(void 0,this.focusCondition);let o=this._list.getFocus();o.length>0&&this._list.reveal(o[0])}return}let e=this._list.getFocus();this._list.focusNext(1,!0,void 0,this.focusCondition);let t=this._list.getFocus();if(t.length>0){if(this._filterInput&&e.length>0&&t[0]<e[0]){this._list.setFocus([]),this._filterInput.focus();return}this._list.reveal(t[0])}}_focusFilterResult(e){if(!this._options?.filterAsCombobox||!this._filterInput||!Un(this._filterInput))return!1;e==="previous"?this._list.focusPrevious(1,!0,void 0,this.focusCondition):this._list.focusNext(1,!0,void 0,this.focusCondition);let[t]=this._list.getFocus();return t!==void 0&&this._list.reveal(t),!0}collapseFocusedSection(){let e=this._getFocusedSection();e&&!this._collapsedSections.has(e)&&this._toggleSection(e)}expandFocusedSection(){let e=this._getFocusedSection();e&&this._collapsedSections.has(e)&&this._toggleSection(e)}toggleFocusedSection(){let e=this._list.getFocus();if(e.length===0)return!1;let t=this._list.element(e[0]);return t.isSectionToggle&&t.section?(this._toggleSection(t.section),!0):!1}_getFocusedSection(){let e=this._list.getFocus();if(e.length===0)return;let t=this._list.element(e[0]);return t.isSectionToggle&&t.section,t.section}acceptSelected(e){let t=this._list.getFocus();if(t.length===0)return;let i=t[0],o=this._list.element(i);if(!this.focusCondition(o))return;let n=e?new Pm:new Nm;this._list.setSelection([i],n)}onListSelection(e){if(!e.elements.length)return;let t=e.elements[0];if(t.standaloneToggle){this._list.setSelection([]);let o=this._standaloneToggles.get(t);o&&!o.disabled&&(o.checked=!o.checked,t.standaloneToggle.onChange(o.checked));return}if(t.isSectionToggle&&t.section){this._list.setSelection([]);let o=t.section;queueMicrotask(()=>{this._toggleSection(o)});return}let i=b0(e.browserEvent)||e.browserEvent?.type===Lc.Tap;if(i){let o=e.browserEvent.target;if(ni(o)&&(o.closest(".action-list-item-toolbar")||o.closest(".action-list-submenu-indicator")||o.closest(".action-list-item-inline-toggle"))){this._list.setSelection([]);return}}if(t.openSubmenuOnClick&&t.submenuActions?.length&&(i||e.browserEvent instanceof Nm)){this._list.setSelection([]),this._showSubmenuForItem(t),i||this._currentSubmenuWidget?.focus();return}if(t.item&&this.focusCondition(t)){let o=e.browserEvent instanceof Pm;this._delegate.onSelect(t.item,o&&this._supportsPreview)}else this._list.setSelection([])}onFocus(){let e=this._list.getFocus();if(e.length===0)return;let t=e[0],i=this._list.element(t);this._delegate.onFocus?.(i.item),this._suppressHover||(this._options?.persistentHover&&(this._cancelSubmenuShow(),this._resetSubmenuPointer(),this._list.reveal(t)),this._showHoverForElement(i,t))}_removeItem(e){let t=this._allMenuItems.indexOf(e);t>=0&&(this._allMenuItems.splice(t,1),this._applyFilter())}_recomputeGroupTitles(e){this._groupTitleByIndex.clear();let t=new Set;for(let i=0;i<e.length;i++){let o=e[i];o.kind==="action"&&o.group?.title&&!t.has(o.group.title)&&(t.add(o.group.title),this._groupTitleByIndex.set(i,o.group.title))}}_measureItemWidths(e){let t=[];for(let i=0;i<e.length;i++){let o=this._getRowElement(i);o&&(o.style.width="auto",t.push({element:o,item:e[i]}))}try{return t.map(({element:i,item:o})=>i.getBoundingClientRect().width+(o.detail?0:this._computeToolbarWidth(o)))}finally{for(let{element:i}of t)i.style.width=""}}_computeToolbarWidth(e){let t=e.toolbarActions?.length??0;return e.onRemove&&t++,t===0?0:t*22+6+10}_getRowElement(e){return e<0?null:this.domNode.ownerDocument.getElementById(this._list.getElementID(e))}_showTabThroughPanelForFocusedItem(){let e=this._list.getFocus();if(e.length===0)return;let t=e[0],i=this._list.element(t);if(!i.hover?.tabThroughPanel)return;let o=this._getRowElement(t);o&&this._showSubmenuForElement(i,o)}_getTabThroughPanelControls(e,t){return e.hover?.tabThroughPanel&&this._currentSubmenuElement!==e&&this._showSubmenuForElement(e,t),{toolbar:this._itemToolbars.get(e),panelControls:[...e.hover?.getTabbableElements?.()??[],...this._submenuHoverActionElements]}}_focusFirstTabThroughPanelControl(e,t){let i=this._getTabThroughPanelControls(e,t);i.toolbar?.length()?i.toolbar.focus(0):(i.panelControls[0]??this._list.getHTMLElement()).focus()}_handleTabThroughPanelKeyDown(e){if(e.isComposing)return;let t=this._list.getFocus();if(t.length===0)return;let i=t[0],o=this._list.element(i);if(!o.hover?.tabThroughPanel&&!this._options?.tabThroughItemActions)return;let n=this._getRowElement(i),r=sn();if(!n||!ni(r))return;let a=this._getTabThroughPanelControls(o,n),d=a.toolbar?.isFocused()??!1,l=this._submenuContainer.contains(r);if((e.key==="ArrowUp"||e.key==="ArrowDown")&&(d||l)){yt.stop(e,!0),this._list.domFocus(),e.key==="ArrowUp"?this.focusPrevious():this.focusNext();return}if(e.key!=="Tab"||e.ctrlKey||e.metaKey||e.altKey)return;let c;if(e.shiftKey){if(l){let h=a.panelControls.indexOf(r);if(h>0)c=a.panelControls[h-1];else if(a.toolbar?.length()){yt.stop(e,!0),a.toolbar.focus(a.toolbar.length()-1);return}else c=this._list.getHTMLElement()}else if(a.toolbar?.isFocused()){let h=a.toolbar.viewItems.findIndex((u,g)=>a.toolbar?.isFocused(g));if(h>0){yt.stop(e,!0),a.toolbar.focus(h-1);return}c=this._options?.filterAsCombobox?this._filterInput:this._list.getHTMLElement()}}else if(r===this._list.getHTMLElement()||r===this._filterInput){if(a.toolbar?.length()){yt.stop(e,!0),a.toolbar.focus(0);return}c=a.panelControls[0]}else if(a.toolbar?.isFocused()){let h=a.toolbar.viewItems.findIndex((u,g)=>a.toolbar?.isFocused(g));if(h+1<a.toolbar.length()){yt.stop(e,!0),a.toolbar.focus(h+1);return}c=a.panelControls[0]}else{let h=a.panelControls.indexOf(r);h>=0&&(c=a.panelControls[h+1]??this._list.getHTMLElement())}c&&(yt.stop(e,!0),c.focus())}_showHoverForElement(e,t){if(this._currentSubmenuElement===e)return;let i=!!e.hover?.content,o=!!e.submenuActions?.length;if(i||o){let n=this._getRowElement(t);n&&this._showSubmenuForElement(e,n);return}this._options?.persistentHover||this._hideSubmenu()}_showSubmenuForItem(e){let t=this._list.indexOf(e);if(t>=0){let i=this._getRowElement(t);i&&this._showSubmenuForElement(e,i)}}_showSubmenuForElement(e,t){if(!this._hoverEnabled||this._currentSubmenuElement===e)return;this._currentSubmenuElement=e,this._clearSubmenuContainer(),t.setAttribute("aria-expanded","true"),this._expandedTrigger=t,this._submenuPanelClassName=e.hover?.panelClassName,this._submenuPanelClassName&&this._submenuContainer.classList.add(this._submenuPanelClassName);let i=e.hover?.preserveVerticalPosition,o=!!e.submenuActions?.length,n=i?W(".action-list-submenu-content"):this._submenuContainer,r=i?W(".action-list-submenu-viewport",void 0,n):void 0,a=r&&!o?this._submenuDisposables.add(new md(r,{horizontal:2,vertical:1,consumeMouseWheelIfScrollbarIsNeeded:!0,useShadows:!1})):void 0;a&&r?(this._submenuContainer.appendChild(a.getDomNode()),this._submenuDisposables.add(Z(r,me.SCROLL,()=>a.scanDomNode())),this._submenuDisposables.add(Z(this._submenuContainer,me.KEY_DOWN,b=>{let v=new wr(b);(v.equals(12)||v.equals(11))&&(yt.stop(b,!0),a.setScrollPosition({scrollTop:a.getScrollPosition().scrollTop+(v.equals(12)?1:-1)*r.clientHeight}))}))):r&&this._submenuContainer.appendChild(r);let d,l=typeof e.hover?.content=="function"?e.hover.content():e.hover?.content;if(l){if(ni(l))d=l,e.hover?.disposable&&this._register(e.hover.disposable);else{let b=typeof l=="string"?new dt(l):l,v=this._options?.linkHandler,y=Vs(b,{actionHandler:L=>{let E=ge.parse(L);v?v(E,e):this._openerService.open(E,{allowCommands:!0})}});this._submenuDisposables.add(y),d=y.element}d.classList.add("action-list-submenu-hover-header"),d.classList.toggle("content-owns-padding",e.hover?.contentOwnsPadding===!0),e.submenuActions?.length&&d.classList.add("has-submenu"),n.appendChild(d)}if(e.hover?.actions?.length){let b=W(".hover-row.status-bar"),v=U(b,W(".actions"));for(let y of e.hover.actions){let L=this._keybindingService.lookupKeybinding(y.commandId),E=this._submenuDisposables.add(nm.render(v,{label:y.label,commandId:y.commandId,run:S=>y.run(S),iconClass:y.iconClass},L?.getLabel()??null));this._submenuHoverActionElements.push(E.actionContainer)}this._submenuContainer.appendChild(b)}this._submenuContainer.style.display="",this._submenuContainer.style.position="absolute",e.hover?.expandable?(this._submenuContainer.setAttribute("role","dialog"),e.label&&this._submenuContainer.setAttribute("aria-label",e.label)):this._submenuContainer.removeAttribute("role");let c=bt(this.domNode),h=0,u=d?d.offsetWidth:0,g;if(o){let b=this._createSubmenuItems(e.submenuActions),v={onHide:()=>{},onSelect:E=>{E.run();let S=this._currentSubmenuElement?.item;this._hideSubmenu(),S&&this._delegate.onSelect(S),this.hide()}},y=this._submenuDisposables.add(this._instantiationService.createInstance(bS,"submenu",!1,b,v,void 0,e.submenuOptions));g=y,y.headerContainer&&n.appendChild(y.headerContainer),y.filterContainer&&n.appendChild(y.filterContainer),n.appendChild(y.domNode),y.footerContainer&&n.appendChild(y.footerContainer),this._currentSubmenuWidget=y,y.clearFocus(),h=y.computeListHeight(),y.layout(h);let L=y.computeMaxWidth(0);u=Math.max(u,L,y.footerContainer?.offsetWidth??0),y.layout(h,u),y.domNode.style.width=`${u}px`,e.submenuOptions&&(this._submenuContainer.style.boxSizing="border-box",this._submenuContainer.style.width=`${u+10}px`),this._submenuDisposables.add(y.onDidRequestLayout(()=>{h=y.computeListHeight(),y.layout(h,u),this._layoutSubmenu?.()})),this._submenuDisposables.add(Z(n,"keydown",E=>{E.key==="Escape"?(yt.stop(E,!0),this._hideSubmenu(),this.hide()):E.key==="ArrowLeft"?(yt.stop(E,!0),this._hideSubmenu(),this._setKeyboardNavigation(!0),this._list.domFocus()):E.key==="Enter"||E.key===" "?(yt.stop(E,!0),y.acceptSelected()):E.key==="ArrowDown"?(yt.stop(E,!0),y.focusNext()):E.key==="ArrowUp"&&(yt.stop(E,!0),y.focusPrevious())}))}let m,f,_=()=>{let b=this._currentSubmenuElement;if(!b||this._layoutSubmenu!==_)return;let v=this._list.indexOf(b),y=v>=0?this._getRowElement(v):null,L=this._options?.persistentHover;if(!y&&(!L||!this._allMenuItems.includes(b))){this._hideSubmenu();return}this._expandedTrigger!==y&&(this._expandedTrigger?.hasAttribute("aria-expanded")&&this._expandedTrigger.setAttribute("aria-expanded","false"),this._expandedTrigger=y??void 0),y?.setAttribute("aria-expanded","true");let E=this.domNode.getBoundingClientRect(),S=L||b.hover?.alignToParent,x=S?this.domNode.parentElement?.closest(".action-widget")?.getBoundingClientRect()??E:E,T=y?.getBoundingClientRect()??x,N=S||i?g0(this.domNode):1;L&&(this._submenuContainer.style.width=`${x.width/N}px`);let F=this._submenuContainer.getBoundingClientRect(),P=S?F.width:u+10,Y=c.innerWidth-(S?x.right:T.right),le=x.left,de=S?0:4,Ee=4;if(!S){let ut=c.innerWidth-2*Ee;P>ut&&(P=Math.max(ut,0)),this._submenuContainer.style.boxSizing="border-box",this._submenuContainer.style.width=`${P}px`}let ye=Y>=P||Y>=le;L&&this._submenuSide&&(this._submenuSide==="right"?Y:le)>=P&&(ye=this._submenuSide==="right"),L&&(this._submenuSide=ye?"right":"left");let Pe=ye?x.right-E.left+de:x.left-E.left-P-de,we=E.left+Pe;we<Ee?Pe+=Ee-we:we+P>c.innerWidth-Ee&&(Pe-=we+P-(c.innerWidth-Ee)),this._submenuContainer.style.left=`${Pe/N}px`;let Ie=F.height;i&&(m??=Ie/N);let ct=m!==void 0?m*N:Ie,$e=f!==void 0?f*N:y&&b.hover?.alignToAnchorTop?T.top-E.top:y?T.top-E.top+(T.height-ct)/2:F.top-E.top;if(i&&b.hover?.alignToAnchorTop&&r&&g){let ut=F.height-r.getBoundingClientRect().height,rt=(g.headerContainer?.offsetHeight??0)+(g.filterContainer?.offsetHeight??0)+(g.footerContainer?.offsetHeight??0),Ze=ut+(rt+h)*N;$e=Math.min($e,c.innerHeight-E.top-Ze-8)}let Ue=E.top+$e+ct;if(Ue>c.innerHeight&&!(i&&b.hover?.alignToAnchorTop)&&($e-=Ue-c.innerHeight+8),E.top+$e<0&&($e=-E.top),i&&(f??=$e/N),r&&a){let ut=(F.height-a.getDomNode().getBoundingClientRect().height)/N,rt=Math.max(0,(c.innerHeight-E.top-$e-8)/N-ut);r.style.height=`${Math.min(n.getBoundingClientRect().height/N,rt)}px`,a.scanDomNode()}else if(r&&g){let ut=(F.height-r.getBoundingClientRect().height)/N,rt=Math.max(0,(c.innerHeight-E.top-$e-8)/N-ut),Ze=(g.headerContainer?.offsetHeight??0)+(g.filterContainer?.offsetHeight??0)+(g.footerContainer?.offsetHeight??0),$t=h===0?0:Math.max(this._actionLineHeight,Math.min(h,rt-Ze));g.layout($t,u),r.style.height=`${Ze+$t}px`}this._submenuContainer.style.top=`${$e/N}px`};if(this._layoutSubmenu=_,_(),(this._options?.persistentHover||e.hover?.alignToParent||e.hover?.tabThroughPanel||i)&&this._currentSubmenuElement===e){if(!g){let b=this._submenuDisposables.add(new xe),v=this._submenuDisposables.add(new S0("ActionListWidget.hoverPanel",()=>{b.value||(b.value=l0(c,()=>{b.clear(),_()}))},c));this._submenuDisposables.add(v.observe(i?n:this._submenuContainer,{box:"border-box"}))}(this._options?.persistentHover||i)&&this._submenuDisposables.add(Z(c,me.RESIZE,()=>{this._cancelSubmenuShow(),this._resetSubmenuPointer(),_()}))}}_createSubmenuItems(e){let t=[],o=e.filter(n=>n instanceof Lr).filter(n=>n.actions.length>0);for(let n=0;n<o.length;n++){let r=o[n];r.label&&t.push({kind:"header",group:{title:r.label},label:r.label});for(let a of r.actions){let d=a,l=d.icon??ne.fromId(a.checked?B.check.id:B.blank.id),c=d.hoverContent,h=c?new dt().appendText(`${a.label}
4
4
  `).appendMarkdown(c):void 0;t.push({item:a,kind:"action",label:a.label,description:a.tooltip&&a.tooltip!==a.label?a.tooltip:void 0,group:{title:"",icon:l},hideIcon:!1,hover:h?{content:h}:void 0,tooltip:a.tooltip||a.label,onRemove:d.onRemove,submenuActions:a instanceof Lr?[new Lr(a.id,"",a.actions)]:void 0})}n<o.length-1&&t.push({kind:"separator",label:""})}for(let n of e)if(!(n instanceof Lr)){let r=n,a=r.icon??ne.fromId(n.checked?B.check.id:B.blank.id),d=r.hoverContent,l=d?new dt().appendText(`${n.label}
5
5
  `).appendMarkdown(d):void 0;t.push({item:n,kind:"action",label:n.label,description:n.tooltip&&n.tooltip!==n.label?n.tooltip:void 0,group:{title:"",icon:a},hideIcon:!1,hover:l?{content:l}:void 0,tooltip:n.tooltip||n.label,onRemove:r.onRemove})}return t}_hideSubmenu(){this._cancelSubmenuHide(),this._cancelSubmenuShow(),this._currentSubmenuElement=void 0,this._submenuSide=void 0,this._clearSubmenuContainer(),this._submenuContainer.style.display="none"}_clearSubmenuContainer(){this._layoutSubmenu=void 0,this._resetSubmenuPointer(),this._submenuContainer.contains(sn())&&this._list.domFocus(),this._submenuDisposables.clear(),this._currentSubmenuWidget=void 0,this._submenuHoverActionElements=[],this._submenuPanelClassName&&(this._submenuContainer.classList.remove(this._submenuPanelClassName),this._submenuPanelClassName=void 0),this._submenuContainer.removeAttribute("role"),this._submenuContainer.removeAttribute("aria-label"),this._expandedTrigger?.hasAttribute("aria-expanded")&&this._expandedTrigger.setAttribute("aria-expanded","false"),this._expandedTrigger=void 0,Vt(this._submenuContainer),this._submenuContainer.style.width="",this._submenuContainer.style.boxSizing=this._options?.persistentHover?"border-box":""}_scheduleSubmenuHide(){this._cancelSubmenuHide(),!this._options?.persistentHover&&(this._submenuHideTimeout=setTimeout(()=>{this._hideSubmenu()},300))}_cancelSubmenuHide(){this._submenuHideTimeout!==void 0&&(clearTimeout(this._submenuHideTimeout),this._submenuHideTimeout=void 0)}_scheduleSubmenuShow(e,t){this._cancelSubmenuShow();let i=this._options?.submenuHoverDelay??500;if(this._usesSubmenuPointerIntent()){i=0;let n=this._submenuPointerOrigin;if(n&&t.clientX!==n.x&&this._currentSubmenuElement&&new y0(n.x,n.y,this._submenuContainer).contains(t.clientX,t.clientY)){let r=Date.now();this._submenuPointerGraceDeadline??=r+200,i=Math.max(0,this._submenuPointerGraceDeadline-r)}}let o=()=>{this._submenuShowTimeout=void 0;let n=this._list.indexOf(e),r=n>=0?this._getRowElement(n):null;r&&(this._showSubmenuForElement(e,r),this._usesSubmenuPointerIntent()&&this._updateSubmenuPointer(t))};i===0?o():this._submenuShowTimeout=setTimeout(o,i)}_updateSubmenuPointer(e){this._submenuPointerOrigin={x:e.clientX,y:e.clientY},this._submenuPointerGraceDeadline=void 0}_resetSubmenuPointer(){this._submenuPointerOrigin=void 0,this._submenuPointerGraceDeadline=void 0}_usesSubmenuPointerIntent(){return this._options?.persistentHover===!0||this._options?.submenuPointerIntent===!0}_cancelSubmenuShow(){this._submenuShowTimeout!==void 0&&(clearTimeout(this._submenuShowTimeout),this._submenuShowTimeout=void 0)}async onListHover(e){this._setKeyboardNavigation(!1);let t=e.element;if(t&&t.item&&this.focusCondition(t)){let i=typeof e.index=="number"?[e.index]:[],o=sn();if(this._options?.tabThroughItemActions&&this._list.getFocus()[0]!==e.index&&ni(o)&&this.domNode.contains(o)&&o.closest(".action-list-item-toolbar")&&this._list.domFocus(),ni(e.browserEvent.target)&&e.browserEvent.target.closest(".action-list-item-toolbar")!==null){t.submenuActions?.length||this._cancelSubmenuShow(),this._list.setFocus(this._options?.tabThroughItemActions?i:[]);return}let r=!!(t.submenuActions?.length||t.hover?.content),a=this._suppressHover;(r||this._usesSubmenuPointerIntent())&&(this._suppressHover=!0);try{this._list.setFocus(i)}finally{this._suppressHover=a}if(r){this._currentSubmenuElement===t?(this._cancelSubmenuHide(),this._cancelSubmenuShow(),this._usesSubmenuPointerIntent()&&this._updateSubmenuPointer(e.browserEvent)):(this._usesSubmenuPointerIntent()||this._hideSubmenu(),this._scheduleSubmenuShow(t,e.browserEvent));return}if(this._currentSubmenuElement===t?this._cancelSubmenuHide():(this._cancelSubmenuShow(),this._options?.submenuPointerIntent?this._scheduleSubmenuHide():this._options?.persistentHover||this._hideSubmenu()),this._delegate.onHover&&!t.disabled&&t.kind==="action"&&this._currentSubmenuElement!==t){let d=await this._delegate.onHover(t.item,this.cts.token),l=d?d.canPreview:void 0;l!==t.canPreview&&(t.canPreview=l,typeof e.index=="number"&&(this._list.splice(e.index,1,[t]),this._list.setFocus([e.index])))}}else t&&t.hover?.content&&typeof e.index=="number"&&(this._currentSubmenuElement===t?(this._cancelSubmenuHide(),this._cancelSubmenuShow()):(this._options?.persistentHover||this._hideSubmenu(),this._scheduleSubmenuShow(t,e.browserEvent)))}onListClick(e){e.element&&this.focusCondition(e.element)&&this._list.setFocus([])}};wS=bS=yS([Vr(6,he),Vr(7,mo),Vr(8,j)],wS);var Om=class extends D{get domNode(){return this._widget.domNode}get filterContainer(){return this._widget.filterContainer}get footerContainer(){return this._widget.footerContainer}get headerContainer(){return this._widget.headerContainer}get filterInput(){return this._widget.filterInput}get closeAnimation(){return this._widget.closeAnimation}get widgetClassName(){return this._widgetClassName}get anchorPosition(){if(this._preferredAnchorPosition!==void 0)return this._preferredAnchorPosition;if(this._showAbove!==void 0)return this._showAbove?1:0}constructor(e,t,i,o,n,r,a,d,l,c){super(),this._contextViewService=d,this._layoutService=l,this._lastMinWidth=0,this._hasLaidOut=!1,this._anchor=a,this._preferredAnchorPosition=r?.anchorPosition,this._useFullHeight=r?.useFullHeight??!1,this._widgetClassName=r?.widgetClassName,this._widget=this._register(c.createInstance(wS,e,t,i,o,n,r)),this._register(this._widget.onDidRequestLayout(()=>{this._hasLaidOut&&(this.layout(this._lastMinWidth),this._contextViewService.layout())}))}focus(){this._widget.focus()}hide(e,t=!0){this._widget.hide(e),t&&this._contextViewService.hideContextView()}clearFilter(){return this._widget.clearFilter()}focusPrevious(){this._widget.focusPrevious()}focusNext(){this._widget.focusNext()}collapseFocusedSection(){this._widget.collapseFocusedSection()}expandFocusedSection(){this._widget.expandFocusedSection()}toggleFocusedSection(){return this._widget.toggleFocusedSection()}acceptSelected(e){this._widget.acceptSelected(e)}hasDynamicHeight(){return this._widget.hasDynamicHeight}computeActionWidgetVerticalChromeHeight(){let e=this.domNode.parentElement?.closest(".action-widget");if(!e)return 0;let t=bt(e).getComputedStyle(e),i=o=>Number.parseFloat(o)||0;return i(t.paddingTop)+i(t.paddingBottom)+i(t.borderTopWidth)+i(t.borderBottomWidth)}computeHeight(){let e=this._fixedContentHeight??this._widget.computeListHeight(),t=this._widget.filterContainer?36:0,i=this._widget.footerContainer?32:0,o=this._widget.headerContainer&&!this._widget.headerContainer.hidden?this._widget.headerContainer.offsetHeight||36:0,n=t+i+o,r=bt(this.domNode),a;if(this.hasDynamicHeight()||this._preferredAnchorPosition!==void 0){let u=r.innerHeight,g=kR(this._anchor),m=g.top-r.pageYOffset,_=u-m-g.height-30,b=m;if(this._showAbove===void 0){let v=this._fixedContentHeight??this._widget.computeFullHeight();this._showAbove=this._preferredAnchorPosition!==void 0?this._preferredAnchorPosition===1:n+v>_&&b>_}a=Math.max(0,(this._showAbove?b:_)-this.computeActionWidgetVerticalChromeHeight())}else{let g=this._layoutService.getContainer(r).clientHeight,m=this.domNode.getBoundingClientRect().top;a=m>0?g-m-10:g*.7}let d=this._useFullHeight?r.innerHeight:Math.floor(r.innerHeight*.6),l=this._widget.lineHeight;if(this._preferredAnchorPosition!==void 0){let u=Math.min(a,d),g=Math.min(e+n,Math.max(0,u));return Math.max(0,g-n)}let c=Math.min(Math.max(a,l*3+n),d);return Math.min(e+n,c)-n}layout(e,t){this._hasLaidOut=!0,this._lastMinWidth=e,t!==void 0&&(this._fixedContentHeight=t);let i=this.computeHeight();this._widget.layout(i);let o=this._widget.computeMaxWidth(e);return this._cachedMaxWidth=o,this._widget.layout(i,this._cachedMaxWidth),this._cachedMaxWidth}};Om=yS([Vr(7,Fr),Vr(8,eT),Vr(9,j)],Om);function ko(s){return s.replace(/\r\n|\r|\n/g," ")}var JP=function(s,e,t,i){var o=arguments.length,n=o<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(s,e,t,i);else for(var a=s.length-1;a>=0;a--)(r=s[a])&&(n=(o<3?r(n):o>3?r(e,t,n):r(e,t))||n);return o>3&&n&&Object.defineProperty(e,t,n),n},xS=function(s,e){return function(t,i){e(t,i,s)}};K("actionBar.toggledBackground",gd,p(1744,"Background color for toggled action items in action bar."));var WT="--action-widget-close-start-opacity",BT="--action-widget-close-start-transform",Ei={Visible:new te("codeActionMenuVisible",!1,p(1745,"Whether the action widget list is visible")),FilterFocused:new te("codeActionMenuFilterFocused",!1,p(1746,"Whether the action widget filter input is focused"))},Ji=zt("actionWidgetService"),Uo=class extends D{get isVisible(){return Ei.Visible.getValue(this._contextKeyService)||!1}constructor(e,t,i){super(),this._contextViewService=e,this._contextKeyService=t,this._instantiationService=i,this._list=this._register(new xe),this._closeAnimation=this._register(new xe)}show(e,t,i,o,n,r,a,d,l){let c=Ei.Visible.bindTo(this._contextKeyService),h=this._instantiationService.createInstance(Om,e,t,i,o,d,l,n);this._contextViewService.showContextView({getAnchor:()=>n,render:u=>(c.set(!0),this._renderWidget(u,h,a??[],l)),onHide:u=>{c.reset(),this._onWidgetClosed(u)},get anchorPosition(){return h.anchorPosition},focus:()=>h.focus()},r,!1)}acceptSelected(e){this._list.value?.acceptSelected(e)}focusPrevious(){this._list?.value?.focusPrevious()}focusNext(){this._list?.value?.focusNext()}collapseSection(){this._list?.value?.collapseFocusedSection()}expandSection(){this._list?.value?.expandFocusedSection()}toggleSection(){return this._list?.value?.toggleFocusedSection()??!1}clearFilter(){return this._list?.value?.clearFilter()??!1}hide(e){let t=this._list.value,i=this._widgetElement;if(!t||this._closingList===t)return;let o=t.closeAnimation;if(!i||!o||o.duration<=0||!this._hasRequiredAncestorClasses(i,o.requiredAncestorClasses)){this._closingList=t,t.hide(e);return}this._closingList=t;let n=bt(i).getComputedStyle(i);i.style.setProperty(WT,n.opacity),i.style.setProperty(BT,n.transform),i.classList.add(o.className),t.hide(e,!1),this._closeAnimation.value=Zt(()=>{this._list.value===t&&this._contextViewService.hideContextView(e)},o.duration)}clear(){this._closeAnimation.clear(),this._closingList=void 0,this._widgetElement?.style.removeProperty(WT),this._widgetElement?.style.removeProperty(BT),this._widgetElement=void 0,this._list.clear()}_renderWidget(e,t,i,o){let n=document.createElement("div");n.classList.add("action-widget");let r=t.widgetClassName?.split(/\s+/).filter(Boolean);if(r?.length&&n.classList.add(...r),e.appendChild(n),this._widgetElement=n,this._list.value=t,this._list.value)this._list.value.headerContainer&&n.appendChild(this._list.value.headerContainer),this._list.value.filterContainer&&n.appendChild(this._list.value.filterContainer),n.appendChild(this._list.value.domNode),this._list.value.footerContainer&&n.appendChild(this._list.value.footerContainer);else throw new Error("List has no value");let a=new M;o?.filterAsCombobox&&a.add(Xt(n,"keydown",b=>{b.keyCode===9&&!b.browserEvent.isComposing&&(yt.stop(b,!0),this.hide(!0))}));let d=this._list.value.headerContainer;d&&a.add(Ds(d,b=>b.preventDefault()));let l=0;a.add(Ds(n,()=>{l=Date.now()+1e3}));let c=document.createElement("div"),h=e.appendChild(c);h.classList.add("context-view-block"),a.add(Ds(h,b=>b.stopPropagation()));let u=0;if(i.length){let b=this._createActionBar(".action-widget-action-bar",i);b&&(n.appendChild(b.getContainer().parentElement),a.add(b),u=b.getContainer().offsetWidth)}let g=this._list.value?.layout(u);n.style.width=`${g}px`;let m=Ei.FilterFocused.bindTo(this._contextKeyService);if(a.add({dispose:()=>m.reset()}),this._list.value?.filterInput){let b=this._list.value.filterInput;a.add(Z(b,"focus",()=>m.set(!0))),a.add(Z(b,"blur",()=>m.set(!1)))}let f=a.add(qi(e)),_=a.add(new xe);return a.add(f.onDidFocus(()=>_.clear())),a.add(f.onDidBlur(()=>{let b=()=>{let v=l-Date.now();if(v>0){_.value=Zt(b,v);return}let y=sn();y&&(e.contains(y)||y.closest(".action-widget-hover")||y.closest(".action-list-submenu-panel"))||this.hide(!0)};_.value=Zt(b,75)})),a}_createActionBar(e,t){if(!t.length)return;let i=W(e),o=new Xi(i);return o.push(t,{icon:!1,label:!0}),o}_hasRequiredAncestorClasses(e,t){if(!t?.length)return!0;for(let i=e;i;i=i.parentElement)if(t.every(o=>i.classList.contains(o)))return!0;return!1}_onWidgetClosed(e){if(this._closingList===this._list.value){this.clear();return}this._closeAnimation.clear(),this._closingList=void 0,this._widgetElement=void 0,this._list.value?.hide(e)}};Uo=JP([xS(0,Fr),xS(1,J),xS(2,j)],Uo);ai(Ji,Uo,1);var Jn=1100;pe(class extends ht{constructor(){super({id:"hideCodeActionWidget",title:I(1747,"Hide action widget"),precondition:Ei.Visible,keybinding:{weight:Jn,primary:9,secondary:[1033]}})}run(s){s.get(Ji).hide(!0)}});pe(class extends ht{constructor(){super({id:"clearFilterCodeActionWidget",title:I(1748,"Clear action widget filter"),precondition:O.and(Ei.Visible,Ei.FilterFocused),keybinding:{weight:Jn+1,primary:9}})}run(s){let e=s.get(Ji);e instanceof Uo&&(e.clearFilter()||e.hide(!0))}});pe(class extends ht{constructor(){super({id:"selectPrevCodeAction",title:I(1749,"Select previous action"),precondition:Ei.Visible,keybinding:{weight:Jn,primary:16,secondary:[2064],mac:{primary:16,secondary:[2064,302]}}})}run(s){let e=s.get(Ji);e instanceof Uo&&e.focusPrevious()}});pe(class extends ht{constructor(){super({id:"selectNextCodeAction",title:I(1750,"Select next action"),precondition:Ei.Visible,keybinding:{weight:Jn,primary:18,secondary:[2066],mac:{primary:18,secondary:[2066,300]}}})}run(s){let e=s.get(Ji);e instanceof Uo&&e.focusNext()}});pe(class extends ht{constructor(){super({id:"collapseSectionCodeAction",title:I(1751,"Collapse section"),precondition:O.and(Ei.Visible,Ei.FilterFocused.negate()),keybinding:{weight:Jn,primary:15}})}run(s){let e=s.get(Ji);e instanceof Uo&&e.collapseSection()}});pe(class extends ht{constructor(){super({id:"expandSectionCodeAction",title:I(1752,"Expand section"),precondition:O.and(Ei.Visible,Ei.FilterFocused.negate()),keybinding:{weight:Jn,primary:17}})}run(s){let e=s.get(Ji);e instanceof Uo&&e.expandSection()}});pe(class extends ht{constructor(){super({id:"toggleSectionCodeAction",title:I(1753,"Toggle section"),precondition:O.and(Ei.Visible,Ei.FilterFocused.negate()),keybinding:{weight:Jn,primary:10}})}run(s){let e=s.get(Ji);e instanceof Uo&&(e.toggleSection()||e.acceptSelected())}});pe(class extends ht{constructor(){super({id:Am,title:I(1754,"Accept selected action"),precondition:Ei.Visible,keybinding:{weight:Jn,primary:3,secondary:[2137]}})}run(s){let e=s.get(Ji);e instanceof Uo&&e.acceptSelected()}});pe(class extends ht{constructor(){super({id:Fm,title:I(1755,"Preview selected action"),precondition:Ei.Visible,keybinding:{weight:Jn,primary:2051}})}run(s){let e=s.get(Ji);e instanceof Uo&&e.acceptSelected(!0)}});var VT=function(s,e,t,i){var o=arguments.length,n=o<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(s,e,t,i);else for(var a=s.length-1;a>=0;a--)(r=s[a])&&(n=(o<3?r(n):o>3?r(e,t,n):r(e,t))||n);return o>3&&n&&Object.defineProperty(e,t,n),n},Nd=function(s,e){return function(t,i){e(t,i,s)}},IS,LS=class extends D{static{IS=this}static{this.baseId="editor.widget.postEditWidget"}constructor(e,t,i,o,n,r,a,d,l,c,h){super(),this.typeId=e,this.editor=t,this.showCommand=o,this.range=n,this.edits=r,this.onSelectNewEdit=a,this.additionalActions=d,this._keybindingService=c,this._actionWidgetService=h,this.allowEditorOverflow=!0,this.suppressMouseDown=!0,this.create(),this.visibleContext=i.bindTo(l),this.visibleContext.set(!0),this._register(ce(()=>this.visibleContext.reset())),this.editor.addContentWidget(this),this.editor.layoutContentWidget(this),this._register(ce((()=>this.editor.removeContentWidget(this)))),this._register(this.editor.onDidChangeCursorPosition(u=>{this.dispose()})),this._register(De.runAndSubscribe(c.onDidUpdateKeybindings,()=>{this._updateButtonTitle()}))}_updateButtonTitle(){this.button.element.title=this._keybindingService.appendKeybinding(this.showCommand.label,this.showCommand.id)}create(){this.domNode=W(".post-edit-widget"),this.button=this._register(new YR(this.domNode,{supportIcons:!0})),this.button.label="$(insert)",this._register(Z(this.domNode,me.CLICK,()=>this.showSelector()))}getId(){return IS.baseId+"."+this.typeId}getDomNode(){return this.domNode}getPosition(){return{position:this.range.getEndPosition(),preference:[2]}}showSelector(){let e=tt(this.button.element),t={x:e.left+e.width,y:e.top+e.height};this._actionWidgetService.show("postEditWidget",!1,this.edits.allEdits.map((i,o)=>({kind:"action",item:i,label:i.title,disabled:!1,canPreview:!1,group:{title:"",icon:ne.fromId(o===this.edits.activeEditIndex?B.check.id:B.blank.id)}})),{onHide:()=>{this.editor.focus()},onSelect:i=>{this._actionWidgetService.hide(!1);let o=this.edits.allEdits.findIndex(n=>n===i);if(o!==this.edits.activeEditIndex)return this.onSelectNewEdit(o)}},t,this.editor.getDomNode()??void 0,this.additionalActions)}};LS=IS=VT([Nd(8,J),Nd(9,he),Nd(10,Ji)],LS);var Pd=class extends D{constructor(e,t,i,o,n,r,a,d){super(),this._id=e,this._editor=t,this._visibleContext=i,this._showCommand=o,this._getAdditionalActions=n,this._instantiationService=r,this._bulkEditService=a,this._notificationService=d,this._currentWidget=this._register(new xe),this._register(De.any(t.onDidChangeModel,t.onDidChangeModelContent)(()=>this.clear()))}async applyEditAndShowIfNeeded(e,t,i,o,n){if(!e.length||!this._editor.hasModel())return;let r=this._editor.getModel(),a=t.allEdits.at(t.activeEditIndex);if(!a)return;let d=async b=>{let v=this._editor.getModel();v&&(await v.undo(),this.applyEditAndShowIfNeeded(e,{activeEditIndex:b,allEdits:t.allEdits},i,o,n))},l=(b,v)=>{oi(b)||(this._notificationService.error(v),i&&this.show(e[0],t,d))},c=new Lo(this._editor,3,void 0,n),h;try{h=await LD(o(a,c.token),c.token)}catch(b){return l(b,p(991,`Error resolving edit '{0}':
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import{a,b,c}from"./J4VKGPN5.js";import"./XEK22IDA.js";import"./VWOHL265.js";import"./WUGYEHHP.js";import"./PP3QOCFN.js";import"./BFPEJYVB.js";import"./TJM6I22B.js";import"./H6RQVSYM.js";export{b as getSqlLayerDiagnosticService,a as getSqlLayerWorker,c as setupMode};
@@ -1,5 +1,5 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import a from"./H5EGZU2S.js";import{c as De}from"./2UXJ4DVI.js";import{a as G,b as Se,c as k,d as w,e as D}from"./MZMKV7FA.js";import{j as A}from"./C5WMGZYX.js";import{b as M,c as E,d as $,e as we}from"./LEFE3FVL.js";import{a as Fe}from"./NKGAHXNJ.js";import{L as ae,s as se}from"./P4SWCWOD.js";import{a as u}from"./BFPEJYVB.js";import{El as B,vl as W}from"./XCISKBJD.js";export default $arcgis.t(([Ve,Ae,Ne,z,{getDeclaredVoxelMembers:Oe,getDeclaredPixelMembers:qe},{substitute:Ce},Ue,Re,{A:U,B:g,F:be,H:R,I:ge,a:N,b:oe,c:ne,d:le,e:pe,k:O,l:x,m:ce,o:d,p:ue,q:he,r:P,s:q,t:b,u:de,v:fe,w:_e,y:me,z:ye}])=>{var S=s=>s!==void 0,m=s=>s!==null;function Ge(s){switch(s){case"esriFieldTypeOID":return"oid";case"esriFieldTypeSmallInteger":return"small-integer";case"esriFieldTypeInteger":return"integer";case"esriFieldTypeBigInteger":return"big-integer";case"esriFieldTypeSingle":return"single";case"esriFieldTypeDouble":return"double";case"esriFieldTypeDate":return"date";case"esriFieldTypeDateOnly":return"date-only";case"esriFieldTypeTimeOnly":return"time-only";case"esriFieldTypeTimestampOffset":return"timestamp-offset";case"esriFieldTypeGUID":return"guid";case"esriFieldTypeGlobalID":return"global-id";case"esriFieldTypeString":return"string";case"esriFieldTypeGeometry":return"geometry";case"esriFieldTypeBlob":return"blob";case"esriFieldTypeRaster":return"raster";case"esriFieldTypeXML":return"xml";default:return"string"}}function ke(s){return{fields:s.fields.map(e=>({name:e.name,type:Ge(e.type),serverType:e.type,nullable:e.nullable}))}}function ve(s){return typeof s?.query=="object"&&s.query?s.query:{}}var K=class{constructor(e){this.itemId=e.itemId,this.portal=e.portal,this.serviceUrl=e.serviceUrl,this._requestOptions=e.requestOptions}fetchInfo(e){return this.portal.request(this._datastoreUrl,this._createRequestOptions(e))}async fetchDatasets(e){return(await this.portal.request(H(this._datastoreUrl,"datasets"),this._createRequestOptions(e))).datasets}async fetchTableDescription(e,t){if(!e)throw new Ue("portal:invalid-parameter",'The "tableName" parameter must be provided.');let i=await this.portal.request(H(this._datastoreUrl,"tableDescription"),{...this._createRequestOptions(t),query:{...ve(this._requestOptions),...ve(t),tableName:e}});return ke(i)}get _datastoreUrl(){return H(this.serviceUrl,"datastores",encodeURIComponent(this.itemId))}_createRequestOptions(e){return{...this._requestOptions,...e}}};function H(s,...e){let t=s.replaceAll(/\/+$/gu,""),i=e.filter(r=>!!r).map(r=>r.replaceAll(/^\/+|\/+$/gu,""));return[t,...i].join("/")}var We={id:"ansi",keywords:[],functions:[],operators:[],specialChars:{likeWildcardAny:"%",likeWildcardOne:"_",identifierQuote:{start:'"',end:'"'},escapeKey:{start:null,end:null},escapeClause:{keyword:"ESCAPE",suffix:null}}},Te=new Map,Be={ansi:async()=>await Promise.resolve(We),bigquery:async()=>(await import("./XG3S7JQW.js")).bigqueryDialect,postgres:async()=>(await import("./U2T7AGOO.js")).postgresDialect,sqlServer:async()=>(await import("./UZD32YRD.js")).sqlServerDialect,oracle:async()=>(await import("./TUQPDQ74.js")).oracleDialect};async function He(s){let e=Te.get(s);if(e)return await e;let t=Be[s]();return Te.set(s,t),await t}var ze=["WITH","SELECT","FROM","WHERE","GROUP","BY","HAVING","ORDER","OFFSET","FETCH","FIRST","NEXT","ROW","ROWS","ONLY","LIMIT","DISTINCT","AS","JOIN","LEFT","RIGHT","FULL","INNER","OUTER","CROSS","ON","USING","AND","OR","NOT","IN","IS","LIKE","ESCAPE","BETWEEN","NULL","TRUE","FALSE","DATE","TIMESTAMP","CASE","WHEN","THEN","ELSE","END","ASC","DESC"],Ke=["<=",">=","<>","!=","=","<",">","+","-","*","/","%","||"],je=(s,e={})=>{let t=new Set(e.baseKeywords??ze);for(let r of s.keywords)t.add(r.toUpperCase());let i=new Set(e.baseOperators??Ke);for(let r of s.operators)i.add(r);return{keywords:Array.from(t),functions:s.functions,operators:Array.from(i),specialChars:s.specialChars}},h={sqlServer:"sql-layer-sql-server",postgres:"sql-layer-postgres",bigquery:"sql-layer-bigquery",oracle:"sql-layer-oracle"},Ie=h.postgres,Qe={[h.sqlServer]:"sqlServer",[h.postgres]:"postgres",[h.bigquery]:"bigquery",[h.oracle]:"oracle"};function Je(s){return Qe[s]}async function Xe(s){return je(await He(Je(s)))}var Ye=/^[A-Za-z_][A-Za-z0-9_$]*$/u;function Ze(s){return s==="esriDBMS_PostgreSQL"?Ie:s==="esriDBMS_SQLServer"?h.sqlServer:s==="esriDBMS_BigQuery"?h.bigquery:s==="esriDBMS_Oracle"?h.oracle:Ie}function Nt(s){return s.trim().toLowerCase()}function et(s){return s.specialChars.identifierQuote}function tt(s,e){let t=s.trim();return t?Ye.test(t)?e.keywords.includes(t.toUpperCase()):!0:!1}function $e(s,e){let t=s.trim();if(!t||!tt(t,e))return t;let i=et(e),r=t.replaceAll(i.end,`${i.end}${i.end}`);return`${i.start}${r}${i.end}`}function it(s,e){return s.split(".").map(t=>$e(t,e)).join(".")}function Ot(s){return s.split(".").at(-1)??s}function rt(s){return Xe(Ze(s))}async function st(s,e){let t=new z({url:`${s.url}/${e.relatedTableId}`});return await t.load(),t}function te(s){return(e,t)=>{if(e.type==="oid")return-1;if(t.type==="oid")return 1;if(b(s)){if(e.name===s.subtypeField)return-1;if(t.name===s.subtypeField)return 1}if(P(s)){if(e.name===s.typeIdField)return-1;if(t.name===s.typeIdField)return 1}return e.name.localeCompare(t.name,"en",{sensitivity:"base"})}}function xe(s,e){return s?.every(t=>t.domains?.[e.name]?.type==="inherited")??!1}var at=/^[a-z_$][a-z0-9_$]*$/giu;function ie(s,e=!0){return s.match(at)?`${e?".":""}${s}`:`["${s}"]`}function Le(s,e){return s?`${s}${ie(e)}`:e}function Pe(s){return fe(s)?s.portalItem:null}function ot(s,e){return e?s?.nullable??"nullable":s?.notnull??"not nullable"}function qt(s,e,t){let{includeAliases:i=!1,supportGeometryFields:r=!1}=t??{},a=e,n=[],_=[];return w(s,{supportGeometry:r}).forEach(o=>{a&&(a+=`
2
+ import a from"./H5EGZU2S.js";import{c as De}from"./2UXJ4DVI.js";import{a as G,b as Se,c as k,d as w,e as D}from"./MZMKV7FA.js";import{j as A}from"./C5WMGZYX.js";import{b as M,c as E,d as $,e as we}from"./LEFE3FVL.js";import{a as Fe}from"./VWOHL265.js";import{L as ae,s as se}from"./P4SWCWOD.js";import{a as u}from"./BFPEJYVB.js";import{El as B,vl as W}from"./TJM6I22B.js";export default $arcgis.t(([Ve,Ae,Ne,z,{getDeclaredVoxelMembers:Oe,getDeclaredPixelMembers:qe},{substitute:Ce},Ue,Re,{A:U,B:g,F:be,H:R,I:ge,a:N,b:oe,c:ne,d:le,e:pe,k:O,l:x,m:ce,o:d,p:ue,q:he,r:P,s:q,t:b,u:de,v:fe,w:_e,y:me,z:ye}])=>{var S=s=>s!==void 0,m=s=>s!==null;function Ge(s){switch(s){case"esriFieldTypeOID":return"oid";case"esriFieldTypeSmallInteger":return"small-integer";case"esriFieldTypeInteger":return"integer";case"esriFieldTypeBigInteger":return"big-integer";case"esriFieldTypeSingle":return"single";case"esriFieldTypeDouble":return"double";case"esriFieldTypeDate":return"date";case"esriFieldTypeDateOnly":return"date-only";case"esriFieldTypeTimeOnly":return"time-only";case"esriFieldTypeTimestampOffset":return"timestamp-offset";case"esriFieldTypeGUID":return"guid";case"esriFieldTypeGlobalID":return"global-id";case"esriFieldTypeString":return"string";case"esriFieldTypeGeometry":return"geometry";case"esriFieldTypeBlob":return"blob";case"esriFieldTypeRaster":return"raster";case"esriFieldTypeXML":return"xml";default:return"string"}}function ke(s){return{fields:s.fields.map(e=>({name:e.name,type:Ge(e.type),serverType:e.type,nullable:e.nullable}))}}function ve(s){return typeof s?.query=="object"&&s.query?s.query:{}}var K=class{constructor(e){this.itemId=e.itemId,this.portal=e.portal,this.serviceUrl=e.serviceUrl,this._requestOptions=e.requestOptions}fetchInfo(e){return this.portal.request(this._datastoreUrl,this._createRequestOptions(e))}async fetchDatasets(e){return(await this.portal.request(H(this._datastoreUrl,"datasets"),this._createRequestOptions(e))).datasets}async fetchTableDescription(e,t){if(!e)throw new Ue("portal:invalid-parameter",'The "tableName" parameter must be provided.');let i=await this.portal.request(H(this._datastoreUrl,"tableDescription"),{...this._createRequestOptions(t),query:{...ve(this._requestOptions),...ve(t),tableName:e}});return ke(i)}get _datastoreUrl(){return H(this.serviceUrl,"datastores",encodeURIComponent(this.itemId))}_createRequestOptions(e){return{...this._requestOptions,...e}}};function H(s,...e){let t=s.replaceAll(/\/+$/gu,""),i=e.filter(r=>!!r).map(r=>r.replaceAll(/^\/+|\/+$/gu,""));return[t,...i].join("/")}var We={id:"ansi",keywords:[],functions:[],operators:[],specialChars:{likeWildcardAny:"%",likeWildcardOne:"_",identifierQuote:{start:'"',end:'"'},escapeKey:{start:null,end:null},escapeClause:{keyword:"ESCAPE",suffix:null}}},Te=new Map,Be={ansi:async()=>await Promise.resolve(We),bigquery:async()=>(await import("./XG3S7JQW.js")).bigqueryDialect,postgres:async()=>(await import("./U2T7AGOO.js")).postgresDialect,sqlServer:async()=>(await import("./UZD32YRD.js")).sqlServerDialect,oracle:async()=>(await import("./TUQPDQ74.js")).oracleDialect};async function He(s){let e=Te.get(s);if(e)return await e;let t=Be[s]();return Te.set(s,t),await t}var ze=["WITH","SELECT","FROM","WHERE","GROUP","BY","HAVING","ORDER","OFFSET","FETCH","FIRST","NEXT","ROW","ROWS","ONLY","LIMIT","DISTINCT","AS","JOIN","LEFT","RIGHT","FULL","INNER","OUTER","CROSS","ON","USING","AND","OR","NOT","IN","IS","LIKE","ESCAPE","BETWEEN","NULL","TRUE","FALSE","DATE","TIMESTAMP","CASE","WHEN","THEN","ELSE","END","ASC","DESC"],Ke=["<=",">=","<>","!=","=","<",">","+","-","*","/","%","||"],je=(s,e={})=>{let t=new Set(e.baseKeywords??ze);for(let r of s.keywords)t.add(r.toUpperCase());let i=new Set(e.baseOperators??Ke);for(let r of s.operators)i.add(r);return{keywords:Array.from(t),functions:s.functions,operators:Array.from(i),specialChars:s.specialChars}},h={sqlServer:"sql-layer-sql-server",postgres:"sql-layer-postgres",bigquery:"sql-layer-bigquery",oracle:"sql-layer-oracle"},Ie=h.postgres,Qe={[h.sqlServer]:"sqlServer",[h.postgres]:"postgres",[h.bigquery]:"bigquery",[h.oracle]:"oracle"};function Je(s){return Qe[s]}async function Xe(s){return je(await He(Je(s)))}var Ye=/^[A-Za-z_][A-Za-z0-9_$]*$/u;function Ze(s){return s==="esriDBMS_PostgreSQL"?Ie:s==="esriDBMS_SQLServer"?h.sqlServer:s==="esriDBMS_BigQuery"?h.bigquery:s==="esriDBMS_Oracle"?h.oracle:Ie}function Nt(s){return s.trim().toLowerCase()}function et(s){return s.specialChars.identifierQuote}function tt(s,e){let t=s.trim();return t?Ye.test(t)?e.keywords.includes(t.toUpperCase()):!0:!1}function $e(s,e){let t=s.trim();if(!t||!tt(t,e))return t;let i=et(e),r=t.replaceAll(i.end,`${i.end}${i.end}`);return`${i.start}${r}${i.end}`}function it(s,e){return s.split(".").map(t=>$e(t,e)).join(".")}function Ot(s){return s.split(".").at(-1)??s}function rt(s){return Xe(Ze(s))}async function st(s,e){let t=new z({url:`${s.url}/${e.relatedTableId}`});return await t.load(),t}function te(s){return(e,t)=>{if(e.type==="oid")return-1;if(t.type==="oid")return 1;if(b(s)){if(e.name===s.subtypeField)return-1;if(t.name===s.subtypeField)return 1}if(P(s)){if(e.name===s.typeIdField)return-1;if(t.name===s.typeIdField)return 1}return e.name.localeCompare(t.name,"en",{sensitivity:"base"})}}function xe(s,e){return s?.every(t=>t.domains?.[e.name]?.type==="inherited")??!1}var at=/^[a-z_$][a-z0-9_$]*$/giu;function ie(s,e=!0){return s.match(at)?`${e?".":""}${s}`:`["${s}"]`}function Le(s,e){return s?`${s}${ie(e)}`:e}function Pe(s){return fe(s)?s.portalItem:null}function ot(s,e){return e?s?.nullable??"nullable":s?.notnull??"not nullable"}function qt(s,e,t){let{includeAliases:i=!1,supportGeometryFields:r=!1}=t??{},a=e,n=[],_=[];return w(s,{supportGeometry:r}).forEach(o=>{a&&(a+=`
3
3
 
4
4
  `),a+=`**${o.name}** (${o.alias})
5
5
  ${o.type}`,o.description&&(a+=`