@inkeep/agents-manage-ui 0.0.0-dev-20251013065619 → 0.0.0-dev-20251013173311
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.
- package/.next/standalone/agents-manage-ui/.next/BUILD_ID +1 -1
- package/.next/standalone/agents-manage-ui/.next/app-build-manifest.json +180 -180
- package/.next/standalone/agents-manage-ui/.next/app-path-routes-manifest.json +6 -6
- package/.next/standalone/agents-manage-ui/.next/build-manifest.json +5 -5
- package/.next/standalone/agents-manage-ui/.next/prerender-manifest.json +3 -3
- package/.next/standalone/agents-manage-ui/.next/react-loadable-manifest.json +4 -4
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/page.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/agents/[agentId]/page.js +2 -2
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/agents/[agentId]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/agents/new/page.js +2 -2
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/agents/new/page_client-reference-manifest.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/agents/page.js +2 -2
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/agents/page_client-reference-manifest.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/api-keys/page.js +3 -3
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/api-keys/page_client-reference-manifest.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/artifacts/[artifactComponentId]/page.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/artifacts/[artifactComponentId]/page.js.nft.json +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/artifacts/[artifactComponentId]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/artifacts/new/page.js +2 -2
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/artifacts/new/page.js.nft.json +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/artifacts/new/page_client-reference-manifest.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/artifacts/page.js +2 -2
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/artifacts/page_client-reference-manifest.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/components/[dataComponentId]/page.js +2 -2
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/components/[dataComponentId]/page.js.nft.json +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/components/[dataComponentId]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/components/new/page.js +2 -2
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/components/new/page.js.nft.json +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/components/new/page_client-reference-manifest.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/components/page.js +2 -2
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/components/page_client-reference-manifest.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/credentials/[credentialId]/page.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/credentials/[credentialId]/page.js.nft.json +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/credentials/[credentialId]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/credentials/new/bearer/page.js +2 -2
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/credentials/new/bearer/page.js.nft.json +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/credentials/new/bearer/page_client-reference-manifest.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/credentials/new/page.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/credentials/new/page.js.nft.json +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/credentials/new/page_client-reference-manifest.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/credentials/new/providers/[providerId]/page.js +2 -2
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/credentials/new/providers/[providerId]/page.js.nft.json +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/credentials/new/providers/[providerId]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/credentials/new/providers/page.js +2 -2
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/credentials/new/providers/page.js.nft.json +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/credentials/new/providers/page_client-reference-manifest.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/credentials/page.js +2 -2
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/credentials/page_client-reference-manifest.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/mcp-servers/[mcpServerId]/edit/page.js +2 -2
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/mcp-servers/[mcpServerId]/edit/page_client-reference-manifest.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/mcp-servers/[mcpServerId]/page.js +2 -2
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/mcp-servers/[mcpServerId]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/mcp-servers/new/page.js +2 -2
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/mcp-servers/new/page_client-reference-manifest.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/mcp-servers/page.js +2 -2
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/mcp-servers/page_client-reference-manifest.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/page.js +2 -2
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/settings/page.js +2 -2
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/settings/page_client-reference-manifest.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/traces/ai-calls/page.js +2 -2
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/traces/ai-calls/page.js.nft.json +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/traces/ai-calls/page_client-reference-manifest.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/traces/conversations/[conversationId]/page.js +3 -3
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/traces/conversations/[conversationId]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/traces/page.js +3 -3
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/traces/page.js.nft.json +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/[projectId]/traces/page_client-reference-manifest.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/page.js +2 -2
- package/.next/standalone/agents-manage-ui/.next/server/app/[tenantId]/projects/page_client-reference-manifest.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/_not-found/page.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/_not-found.html +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/_not-found.rsc +8 -8
- package/.next/standalone/agents-manage-ui/.next/server/app/api/signoz/conversations/[conversationId]/route_client-reference-manifest.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/api/signoz/route_client-reference-manifest.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app/page.js +2 -2
- package/.next/standalone/agents-manage-ui/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/app-paths-manifest.json +6 -6
- package/.next/standalone/agents-manage-ui/.next/server/chunks/3547.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/chunks/4222.js +1 -0
- package/.next/standalone/agents-manage-ui/.next/server/chunks/6641.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/chunks/6906.js +1 -0
- package/.next/standalone/agents-manage-ui/.next/server/chunks/7457.js +4 -4
- package/.next/standalone/agents-manage-ui/.next/server/chunks/7504.js +4 -4
- package/.next/standalone/agents-manage-ui/.next/server/chunks/8653.js +1 -0
- package/.next/standalone/agents-manage-ui/.next/server/chunks/9122.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/chunks/9532.js +1 -0
- package/.next/standalone/agents-manage-ui/.next/server/chunks/{8774.js → 9558.js} +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/middleware-build-manifest.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/middleware-react-loadable-manifest.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/pages/404.html +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/pages/500.html +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/server-reference-manifest.js +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/server-reference-manifest.json +1 -1
- package/.next/standalone/agents-manage-ui/.next/static/chunks/{23113.e6360a0c0f4c8c63.js → 23113.0d6d9d36535d8288.js} +3 -3
- package/.next/standalone/agents-manage-ui/.next/static/chunks/66528-8f9bcd2a00b89e2e.js +1 -0
- package/.next/standalone/agents-manage-ui/.next/static/chunks/71558-cc08e6174985c215.js +1 -0
- package/.next/standalone/agents-manage-ui/.next/static/chunks/7190-5256aa83bb42d6a6.js +1 -0
- package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/agents/page-0b9611287b3c0bf6.js +1 -0
- package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/api-keys/page-ff98e3210d26f6e0.js +1 -0
- package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/artifacts/[artifactComponentId]/{page-017dd84a94add6f6.js → page-a1948943772ee1e1.js} +1 -1
- package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/artifacts/new/{page-017dd84a94add6f6.js → page-a1948943772ee1e1.js} +1 -1
- package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/artifacts/{page-18e56b3edfcf1260.js → page-dc505e8c1bbc510f.js} +1 -1
- package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/components/[dataComponentId]/page-c3ac2fb0120264dc.js +1 -0
- package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/components/new/page-c3ac2fb0120264dc.js +1 -0
- package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/components/page-a25131b2e5dfb1fd.js +1 -0
- package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/credentials/[credentialId]/page-a061c1a42a20ec5b.js +1 -0
- package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/credentials/new/bearer/page-5d283b1ef7d28fd7.js +1 -0
- package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/credentials/new/providers/[providerId]/page-2ed03afb83f9073e.js +1 -0
- package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/credentials/{page-e5919a10981d2ec1.js → page-3233208fe0451731.js} +1 -1
- package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/mcp-servers/new/{page-79ffcec23083b960.js → page-3a338bc02907f5f8.js} +1 -1
- package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/mcp-servers/page-42c53b4e4d018913.js +1 -0
- package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/settings/{page-52228701802e57a9.js → page-3fae26f3d560d311.js} +1 -1
- package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/traces/page-13e1e8257b48ac28.js +1 -0
- package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/page-bf16a1daa595e717.js +1 -0
- package/.next/standalone/agents-manage-ui/.next/static/chunks/app/layout-46e991ccd4702e4b.js +1 -0
- package/.next/standalone/agents-manage-ui/.next/static/chunks/{webpack-bae1a6a598e24abf.js → webpack-74eb92c7465595f1.js} +1 -1
- package/.next/standalone/agents-manage-ui/package.json +2 -2
- package/.next/standalone/packages/agents-core/package.json +1 -1
- package/package.json +5 -5
- package/src/components/agent/configuration/node-types.tsx +1 -1
- package/src/components/agent/nodes/external-agent-node.tsx +1 -1
- package/src/components/projects/form/project-models-section.tsx +2 -2
- package/src/components/projects/form/project-stopwhen-section.tsx +1 -1
- package/.next/standalone/agents-manage-ui/.next/server/chunks/7034.js +0 -1
- package/.next/standalone/agents-manage-ui/.next/server/chunks/7047.js +0 -1
- package/.next/standalone/agents-manage-ui/.next/server/chunks/894.js +0 -1
- package/.next/standalone/agents-manage-ui/.next/server/chunks/9302.js +0 -1
- package/.next/standalone/agents-manage-ui/.next/static/chunks/69063-1c8ff168f776abc4.js +0 -1
- package/.next/standalone/agents-manage-ui/.next/static/chunks/71558-1d72249977ac609d.js +0 -1
- package/.next/standalone/agents-manage-ui/.next/static/chunks/7190-f9cf405a0cee90d4.js +0 -1
- package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/agents/page-62cdc3dd2a055b23.js +0 -1
- package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/api-keys/page-b4d33785ba161d80.js +0 -1
- package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/components/[dataComponentId]/page-e7e1defcb6c49bef.js +0 -1
- package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/components/new/page-e7e1defcb6c49bef.js +0 -1
- package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/components/page-9e7cf20a715f0ebb.js +0 -1
- package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/credentials/[credentialId]/page-d2835bd2fa440128.js +0 -1
- package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/credentials/new/bearer/page-d3a574c17943e928.js +0 -1
- package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/credentials/new/providers/[providerId]/page-7e5df6a4b1494f91.js +0 -1
- package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/mcp-servers/page-af64735d922c9830.js +0 -1
- package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/[projectId]/traces/page-3860c8d8ba05b4b7.js +0 -1
- package/.next/standalone/agents-manage-ui/.next/static/chunks/app/[tenantId]/projects/page-c74cec8bd90adffd.js +0 -1
- package/.next/standalone/agents-manage-ui/.next/static/chunks/app/layout-150d64421b2a0351.js +0 -1
- /package/.next/standalone/agents-manage-ui/.next/static/{0N3IUn4D9WYO6Ehg1e2uX → pUs1s6W2pOIdWxnjdxLpp}/_buildManifest.js +0 -0
- /package/.next/standalone/agents-manage-ui/.next/static/{0N3IUn4D9WYO6Ehg1e2uX → pUs1s6W2pOIdWxnjdxLpp}/_ssgManifest.js +0 -0
|
@@ -533,7 +533,7 @@ struct VSOutput {
|
|
|
533
533
|
`;class S extends _.i{constructor(e,t,i,n,s,o){super(),this._context=e,this._contentLeft=t,this._devicePixelRatio=i,this._canvas=n,this._ctx=s,this._shapeBindBuffer=this._register(new l.HE),this._initialized=!1,this._shapeCollection=this._register(new C([{name:"x"},{name:"y"},{name:"width"},{name:"height"},{name:"red"},{name:"green"},{name:"blue"},{name:"alpha"}],32)),this._context.addEventHandler(this),this._initWebgpu(o)}async _initWebgpu(e){let t;if(this._device=await e,this._store.isDisposed)return;let i=navigator.gpu.getPreferredCanvasFormat();this._ctx.configure({device:this._device,format:i,alphaMode:"premultiplied"}),this._renderPassColorAttachment={view:null,loadOp:"load",storeOp:"store"},this._renderPassDescriptor={label:"Monaco rectangle renderer render pass",colorAttachments:[this._renderPassColorAttachment]};{let e=new Float32Array(6),i=(t=this._canvas.width,i=this._canvas.height)=>(e[0]=t,e[1]=i,e[2]=Math.ceil(this._context.configuration.options.get(165).contentLeft*(0,o.fz)().devicePixelRatio),e[3]=0,e[4]=e[0]-e[2],e[5]=e[1]-e[3],e);t=this._register(p.B.createBuffer(this._device,{label:"Monaco rectangle renderer uniform buffer",size:24,usage:GPUBufferUsage.UNIFORM|GPUBufferUsage.COPY_DST},()=>i())).object,this._register((0,m.qR)(this._canvas,(0,o.fz)(),(e,n)=>{this._device.queue.writeBuffer(t,0,i(e,n))}))}this._scrollOffsetBindBuffer=this._register(p.B.createBuffer(this._device,{label:"Monaco rectangle renderer scroll offset buffer",size:2*Float32Array.BYTES_PER_ELEMENT,usage:GPUBufferUsage.UNIFORM|GPUBufferUsage.COPY_DST})).object,this._scrollOffsetValueBuffer=new Float32Array(2);let n=()=>p.B.createBuffer(this._device,{label:"Monaco rectangle renderer shape buffer",size:this._shapeCollection.buffer.byteLength,usage:GPUBufferUsage.STORAGE|GPUBufferUsage.COPY_DST});this._shapeBindBuffer.value=n(),this._register(f.Jh.runAndSubscribe(this._shapeCollection.onDidChangeBuffer,()=>{this._shapeBindBuffer.value=n(),this._pipeline&&this._updateBindGroup(this._pipeline,t)})),this._vertexBuffer=this._register(p.B.createBuffer(this._device,{label:"Monaco rectangle renderer vertex buffer",size:m.xW.byteLength,usage:GPUBufferUsage.VERTEX|GPUBufferUsage.COPY_DST},m.xW)).object;let s=this._device.createShaderModule({label:"Monaco rectangle renderer shader module",code:y});this._pipeline=this._device.createRenderPipeline({label:"Monaco rectangle renderer render pipeline",layout:"auto",vertex:{module:s,buffers:[{arrayStride:2*Float32Array.BYTES_PER_ELEMENT,attributes:[{shaderLocation:0,offset:0,format:"float32x2"}]}]},fragment:{module:s,targets:[{format:i,blend:{color:{srcFactor:"src-alpha",dstFactor:"one-minus-src-alpha"},alpha:{srcFactor:"src-alpha",dstFactor:"one-minus-src-alpha"}}}]}}),this._updateBindGroup(this._pipeline,t),this._initialized=!0}_updateBindGroup(e,t){this._bindGroup=this._device.createBindGroup({label:"Monaco rectangle renderer bind group",layout:e.getBindGroupLayout(0),entries:[{binding:0,resource:{buffer:this._shapeBindBuffer.value.object}},{binding:1,resource:{buffer:t}},{binding:2,resource:{buffer:this._scrollOffsetBindBuffer}}]})}register(e,t,i,n,s,o,r,a){return this._shapeCollection.createEntry({x:e,y:t,width:i,height:n,red:s,green:o,blue:r,alpha:a})}onScrollChanged(e){if(this._device){let e=(0,o.fz)().devicePixelRatio;this._scrollOffsetValueBuffer[0]=this._context.viewLayout.getCurrentScrollLeft()*e,this._scrollOffsetValueBuffer[1]=this._context.viewLayout.getCurrentScrollTop()*e,this._device.queue.writeBuffer(this._scrollOffsetBindBuffer,0,this._scrollOffsetValueBuffer)}return!0}_update(){if(!this._device)return;let e=this._shapeCollection;e.dirtyTracker.isDirty&&(this._device.queue.writeBuffer(this._shapeBindBuffer.value.object,0,e.buffer,e.dirtyTracker.dataOffset,e.dirtyTracker.dirtySize*e.view.BYTES_PER_ELEMENT),e.dirtyTracker.clear())}draw(e){if(!this._initialized)return;this._update();let t=this._device.createCommandEncoder({label:"Monaco rectangle renderer command encoder"});this._renderPassColorAttachment.view=this._ctx.getCurrentTexture().createView();let i=t.beginRenderPass(this._renderPassDescriptor);i.setPipeline(this._pipeline),i.setVertexBuffer(0,this._vertexBuffer),i.setBindGroup(0,this._bindGroup);let n=Math.ceil(this._contentLeft.get()*this._devicePixelRatio.get());i.setScissorRect(n,0,this._canvas.width-n,this._canvas.height),i.draw(m.xW.length/2,this._shapeCollection.entryCount),i.end();let s=t.finish();this._device.queue.submit([s])}}i(52677);class k extends l.jG{constructor(){super(),this._ruleCache=new Map,this._container=(0,o.$)("div.monaco-decoration-css-rule-extractor"),this._dummyElement=(0,o.$)("span"),this._container.appendChild(this._dummyElement),this._register((0,l.s)(()=>this._container.remove()))}getStyleRules(e,t){let i=this._ruleCache.get(t);if(i)return i;this._dummyElement.className=t,e.appendChild(this._container);let n=this._getStyleRules(t);return this._ruleCache.set(t,n),e.removeChild(this._container),n}_getStyleRules(e){let t=[],i=[...(0,o.a)().styleSheets];for(let n=0;n<i.length;n++)for(let s of i[n].cssRules)if(s instanceof CSSImportRule)s.styleSheet&&i.push(s.styleSheet);else if(s instanceof CSSStyleRule){let i=`.${e}`,n=s.selectorText.indexOf(i);if(-1!==n){let e=n+i.length;(s.selectorText.length===e||s.selectorText.substring(e,e+1).match(/[ :]/))&&t.push(s)}}return t}}var x=i(47108);class L{constructor(){this._nextId=1,this._cacheById=new Map,this._cacheByStyle=new x.QO}getOrCreateEntry(e,t,i){if(void 0===e&&void 0===t&&void 0===i)return 0;let n=this._cacheByStyle.get(e??0,+!!t,void 0===i?"":i.toFixed(2));if(n)return n.id;let s=this._nextId++,o={id:s,color:e,bold:t,opacity:i};return this._cacheById.set(s,o),this._cacheByStyle.set(o,e??0,+!!t,void 0===i?"":i.toFixed(2)),s}getStyleSet(e){if(0!==e)return this._cacheById.get(e)}}var D=function(e,t){return function(i,n){t(i,n,e)}};let I=class extends l.jG{static{n=this}static{this._decorationCssRuleExtractor=new k}static get decorationCssRuleExtractor(){return n._decorationCssRuleExtractor}static{this._decorationStyleCache=new L}static get decorationStyleCache(){return n._decorationStyleCache}static get atlas(){if(!n._atlas)throw new a.D7("Cannot call ViewGpuContext.textureAtlas before device is resolved");return n._atlas}get atlas(){return n.atlas}constructor(e,t,i,a){super(),this._instantiationService=t,this._notificationService=i,this.configurationService=a,this.maxGpuCols=2e3,this.canvas=(0,r.Z)(document.createElement("canvas")),this.canvas.setClassName("editorCanvas"),this._register(f.Jh.runAndSubscribe(a.onDidChangeConfiguration,e=>{if(!e||e.affectsConfiguration("editor.scrollbar.verticalScrollbarSize")){let e=a.getValue("editor").scrollbar?.verticalScrollbarSize??14;this.canvas.domNode.style.boxSizing="border-box",this.canvas.domNode.style.paddingRight=`${e}px`}})),this.ctx=(0,m.HS)(this.canvas.domNode.getContext("webgpu")),n.device||(n.device=p.B.requestDevice(e=>{let t=[{label:s.kg(73,"Use DOM-based rendering"),run:()=>this.configurationService.updateValue("editor.experimentalGpuAcceleration","off")}];this._notificationService.prompt(g.AI.Warning,e,t)}).then(e=>(n.deviceSync=e.object,n._atlas||(n._atlas=this._instantiationService.createInstance(c.L,e.object.limits.maxTextureDimension2D,void 0,n.decorationStyleCache)),e.object)));let l=(0,h.FY)(this,(0,o.fz)().devicePixelRatio);this._register((0,o.ko)((0,o.fz)(),"resize",()=>{l.set((0,o.fz)().devicePixelRatio,void 0)})),this.devicePixelRatio=l,this._register((0,h.lp)(this.devicePixelRatio,()=>n.atlas?.clear()));let d=(0,h.FY)(this,{width:this.canvas.domNode.width,height:this.canvas.domNode.height});this._register((0,m.qR)(this.canvas.domNode,(0,o.fz)(),(e,t)=>{this.canvas.domNode.width=e,this.canvas.domNode.height=t,d.set({width:e,height:t},void 0)})),this.canvasDevicePixelDimensions=d;let u=(0,h.FY)(this,0);this._register(this.configurationService.onDidChangeConfiguration(t=>{u.set(e.configuration.options.get(165).contentLeft,void 0)})),this.contentLeft=u,this.rectangleRenderer=this._instantiationService.createInstance(S,e,this.contentLeft,this.devicePixelRatio,this.canvas.domNode,this.ctx,n.device)}canRender(e,t,i){let s=t.getViewLineRenderingData(i);if(s.containsRTL||s.maxColumn>this.maxGpuCols)return!1;if(s.inlineDecorations.length>0){let e=!0;for(let t of s.inlineDecorations){if(0!==t.type){e=!1;break}let i=n._decorationCssRuleExtractor.getStyleRules(this.canvas.domNode,t.inlineClassName);if(!(e&&=i.every(e=>{if(e.selectorText.includes(":"))return!1;for(let t of e.style)if(!E(t,e.style))return!1;return!0})))break}return e}return!0}canRenderDetailed(e,t,i){let s=t.getViewLineRenderingData(i),o=[];if(s.containsRTL&&o.push("containsRTL"),s.maxColumn>this.maxGpuCols&&o.push("maxColumn > maxGpuCols"),s.inlineDecorations.length>0){let e=!0,t=[],i=[],r=[];for(let o of s.inlineDecorations){if(0!==o.type){t.push(o.type),e=!1;continue}let s=n._decorationCssRuleExtractor.getStyleRules(this.canvas.domNode,o.inlineClassName);if(!(e&&=s.every(e=>{if(e.selectorText.includes(":"))return i.push(e.selectorText),!1;for(let t of e.style)if(!E(t,e.style))return r.push(`${t}: ${e.style[t]}`),!1;return!0})))continue}t.length>0&&o.push(`inlineDecorations with unsupported types (${t.map(e=>`\`${e}\``).join(", ")})`),r.length>0&&o.push(`inlineDecorations with unsupported CSS rules (${r.map(e=>`\`${e}\``).join(", ")})`),i.length>0&&o.push(`inlineDecorations with unsupported CSS selectors (${i.map(e=>`\`${e}\``).join(", ")})`)}return o}};I=n=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([D(1,d._Y),D(2,g.Ot),D(3,u.pG)],I);let N=["color","font-weight","opacity"];function E(e,t){return!!N.includes(e)}},26033:(e,t,i)=>{"use strict";i.d(t,{HS:()=>r,qR:()=>a,xW:()=>o});var n=i(6033),s=i(82102);let o=new Float32Array([1,0,1,1,0,1,0,0,0,1,1,0]);function r(e){if(!e)throw Error(`Value "${e}" cannot be null`);return e}function a(e,t,i){let o=new t.ResizeObserver(t=>{let n=t.find(t=>t.target===e);if(!n)return;if(!("devicePixelContentBoxSize"in n)){o?.disconnect(),o=void 0;return}let s=n.devicePixelContentBoxSize[0].inlineSize,r=n.devicePixelContentBoxSize[0].blockSize;s>0&&r>0&&i(s,r)});try{o.observe(e,{box:["device-pixel-content-box"]})}catch{throw o.disconnect(),o=void 0,new n.D7("Could not observe device pixel dimensions")}return(0,s.s)(()=>o?.disconnect())}},26241:()=>{},26637:(e,t,i)=>{"use strict";var n,s;i.d(t,{Lx:()=>s,Yo:()=>n,jh:()=>o,y2:()=>r}),function(e){e[e.Expanded=0]="Expanded",e[e.Collapsed=1]="Collapsed",e[e.PreserveOrExpanded=2]="PreserveOrExpanded",e[e.PreserveOrCollapsed=3]="PreserveOrCollapsed"}(n||(n={})),function(e){e[e.Unknown=0]="Unknown",e[e.Twistie=1]="Twistie",e[e.Element=2]="Element",e[e.Filter=3]="Filter"}(s||(s={}));class o extends Error{constructor(e,t){super(`TreeError [${e}] ${t}`)}}class r{constructor(e){this.fn=e,this._map=new WeakMap}map(e){let t=this._map.get(e);return t||(t=this.fn(e),this._map.set(e,t)),t}}},27050:()=>{},27097:()=>{},27140:(e,t,i)=>{"use strict";i.d(t,{N:()=>r,v:()=>o});var n=i(20392);let s=[];function o(e,t,i){t instanceof n.d||(t=new n.d(t,[],!!i)),s.push([e,t])}function r(){return s}},27281:(e,t,i)=>{"use strict";i.d(t,{L:()=>s});var n,s,o=i(55354);(n||(n={})).isThemeColor=function(e){return!!e&&"object"==typeof e&&"string"==typeof e.id},function(e){e.iconNameSegment="[A-Za-z0-9]+",e.iconNameExpression="[A-Za-z0-9-]+",e.iconModifierExpression="~[A-Za-z]+",e.iconNameCharacter="[A-Za-z0-9~-]";let t=RegExp(`^(${e.iconNameExpression})(${e.iconModifierExpression})?$`);function i(e){let n=t.exec(e.id);if(!n)return i(o.W.error);let[,s,r]=n,a=["codicon","codicon-"+s];return r&&a.push("codicon-modifier-"+r.substring(1)),a}e.asClassNameArray=i,e.asClassName=function(e){return i(e).join(" ")},e.asCSSSelector=function(e){return"."+i(e).join(".")},e.isThemeIcon=function(e){return!!e&&"object"==typeof e&&"string"==typeof e.id&&(void 0===e.color||n.isThemeColor(e.color))};let s=RegExp(`^\\$\\((${e.iconNameExpression}(?:${e.iconModifierExpression})?)\\)$`);e.fromString=function(e){let t=s.exec(e);if(!t)return;let[,i]=t;return{id:i}},e.fromId=function(e){return{id:e}},e.modify=function(e,t){let i=e.id,n=i.lastIndexOf("~");return -1!==n&&(i=i.substring(0,n)),t&&(i=`${i}~${t}`),{id:i}},e.getModifier=function(e){let t=e.id.lastIndexOf("~");if(-1!==t)return e.id.substring(t+1)},e.isEqual=function(e,t){return e.id===t.id&&e.color?.id===t.color?.id}}(s||(s={}))},27550:()=>{},28009:(e,t,i)=>{"use strict";i.d(t,{f:()=>o,j:()=>s});var n=i(8820);let s=(0,i(22263).u1)("accessibilityService"),o=new n.N1("accessibilityModeEnabled",!1)},28047:(e,t,i)=>{"use strict";i.d(t,{k:()=>s});var n=i(23047);class s{static insert(e,t){return{range:new n.Q(e.lineNumber,e.column,e.lineNumber,e.column),text:t,forceMoveMarkers:!0}}static delete(e){return{range:e,text:null}}static replace(e,t){return{range:e,text:t}}static replaceMove(e,t){return{range:e,text:t,forceMoveMarkers:!0}}}},28564:(e,t,i)=>{"use strict";i.d(t,{W5:()=>p,dr:()=>d,eV:()=>h,hB:()=>u,lt:()=>l,wC:()=>g});var n=i(55532),s=i(21348),o=i(72553),r=i(23047),a=i(60095);class l{constructor(e,t,i,n){this.searchString=e,this.isRegex=t,this.matchCase=i,this.wordSeparators=n}parseSearchRequest(){let e;if(""===this.searchString)return null;e=this.isRegex?h(this.searchString):this.searchString.indexOf("\n")>=0;let t=null;try{t=n.OS(this.searchString,this.isRegex,{matchCase:this.matchCase,wholeWord:!1,multiline:e,global:!0,unicode:!0})}catch(e){return null}if(!t)return null;let i=!this.isRegex&&!e;return i&&this.searchString.toLowerCase()!==this.searchString.toUpperCase()&&(i=this.matchCase),new a.L5(t,this.wordSeparators?(0,s.i)(this.wordSeparators,[]):null,i?this.searchString:null)}}function h(e){if(!e||0===e.length)return!1;for(let t=0,i=e.length;t<i;t++){let n=e.charCodeAt(t);if(10===n)return!0;if(92===n){if(++t>=i)break;let n=e.charCodeAt(t);if(110===n||114===n||87===n)return!0}}return!1}function d(e,t,i){if(!i)return new a.Dg(e,null);let n=[];for(let e=0,i=t.length;e<i;e++)n[e]=t[e];return new a.Dg(e,n)}class c{constructor(e){let t=[],i=0;for(let n=0,s=e.length;n<s;n++)10===e.charCodeAt(n)&&(t[i++]=n);this._lineFeedsOffsets=t}findLineFeedCountBeforeOffset(e){let t=this._lineFeedsOffsets,i=0,n=t.length-1;if(-1===n||e<=t[0])return 0;for(;i<n;){let s=i+((n-i)/2|0);t[s]>=e?n=s-1:t[s+1]>=e?(i=s,n=s):i=s+1}return i+1}}class u{static findMatches(e,t,i,n,s){let o=t.parseSearchRequest();return o?o.regex.multiline?this._doFindMatchesMultiline(e,i,new p(o.wordSeparators,o.regex),n,s):this._doFindMatchesLineByLine(e,i,o,n,s):[]}static _getMultilineMatchRange(e,t,i,n,s,o){let a,l,h=0;if(n?(h=n.findLineFeedCountBeforeOffset(s),a=t+s+h):a=t+s,n){let e=n.findLineFeedCountBeforeOffset(s+o.length)-h;l=a+o.length+e}else l=a+o.length;let d=e.getPositionAt(a),c=e.getPositionAt(l);return new r.Q(d.lineNumber,d.column,c.lineNumber,c.column)}static _doFindMatchesMultiline(e,t,i,n,s){let o,r=e.getOffsetAt(t.getStartPosition()),a=e.getValueInRange(t,1),l="\r\n"===e.getEOL()?new c(a):null,h=[],u=0;for(i.reset(0);(o=i.next(a))&&(h[u++]=d(this._getMultilineMatchRange(e,r,a,l,o.index,o[0]),o,n),!(u>=s)););return h}static _doFindMatchesLineByLine(e,t,i,n,s){let o=[],r=0;if(t.startLineNumber===t.endLineNumber){let a=e.getLineContent(t.startLineNumber).substring(t.startColumn-1,t.endColumn-1);return r=this._findMatchesInLine(i,a,t.startLineNumber,t.startColumn-1,r,o,n,s),o}let a=e.getLineContent(t.startLineNumber).substring(t.startColumn-1);r=this._findMatchesInLine(i,a,t.startLineNumber,t.startColumn-1,r,o,n,s);for(let a=t.startLineNumber+1;a<t.endLineNumber&&r<s;a++)r=this._findMatchesInLine(i,e.getLineContent(a),a,0,r,o,n,s);if(r<s){let a=e.getLineContent(t.endLineNumber).substring(0,t.endColumn-1);r=this._findMatchesInLine(i,a,t.endLineNumber,0,r,o,n,s)}return o}static _findMatchesInLine(e,t,i,n,s,o,l,h){let c,u=e.wordSeparators;if(!l&&e.simpleSearch){let l=e.simpleSearch,d=l.length,c=t.length,p=-d;for(;-1!==(p=t.indexOf(l,p+d))&&(!(!u||g(u,t,c,p,d))||(o[s++]=new a.Dg(new r.Q(i,p+1+n,i,p+1+d+n),null),!(s>=h))););return s}let m=new p(e.wordSeparators,e.regex);m.reset(0);do if((c=m.next(t))&&(o[s++]=d(new r.Q(i,c.index+1+n,i,c.index+1+c[0].length+n),c,l),s>=h))break;while(c);return s}static findNextMatch(e,t,i,n){let s=t.parseSearchRequest();if(!s)return null;let o=new p(s.wordSeparators,s.regex);return s.regex.multiline?this._doFindNextMatchMultiline(e,i,o,n):this._doFindNextMatchLineByLine(e,i,o,n)}static _doFindNextMatchMultiline(e,t,i,n){let s=new o.y(t.lineNumber,1),a=e.getOffsetAt(s),l=e.getLineCount(),h=e.getValueInRange(new r.Q(s.lineNumber,s.column,l,e.getLineMaxColumn(l)),1),u="\r\n"===e.getEOL()?new c(h):null;i.reset(t.column-1);let g=i.next(h);return g?d(this._getMultilineMatchRange(e,a,h,u,g.index,g[0]),g,n):1!==t.lineNumber||1!==t.column?this._doFindNextMatchMultiline(e,new o.y(1,1),i,n):null}static _doFindNextMatchLineByLine(e,t,i,n){let s=e.getLineCount(),o=t.lineNumber,r=e.getLineContent(o),a=this._findFirstMatchInLine(i,r,o,t.column,n);if(a)return a;for(let t=1;t<=s;t++){let r=(o+t-1)%s,a=e.getLineContent(r+1),l=this._findFirstMatchInLine(i,a,r+1,1,n);if(l)return l}return null}static _findFirstMatchInLine(e,t,i,n,s){e.reset(n-1);let o=e.next(t);return o?d(new r.Q(i,o.index+1,i,o.index+1+o[0].length),o,s):null}static findPreviousMatch(e,t,i,n){let s=t.parseSearchRequest();if(!s)return null;let o=new p(s.wordSeparators,s.regex);return s.regex.multiline?this._doFindPreviousMatchMultiline(e,i,o,n):this._doFindPreviousMatchLineByLine(e,i,o,n)}static _doFindPreviousMatchMultiline(e,t,i,n){let s=this._doFindMatchesMultiline(e,new r.Q(1,1,t.lineNumber,t.column),i,n,9990);if(s.length>0)return s[s.length-1];let a=e.getLineCount();return t.lineNumber!==a||t.column!==e.getLineMaxColumn(a)?this._doFindPreviousMatchMultiline(e,new o.y(a,e.getLineMaxColumn(a)),i,n):null}static _doFindPreviousMatchLineByLine(e,t,i,n){let s=e.getLineCount(),o=t.lineNumber,r=e.getLineContent(o).substring(0,t.column-1),a=this._findLastMatchInLine(i,r,o,n);if(a)return a;for(let t=1;t<=s;t++){let r=(s+o-t-1)%s,a=e.getLineContent(r+1),l=this._findLastMatchInLine(i,a,r+1,n);if(l)return l}return null}static _findLastMatchInLine(e,t,i,n){let s,o=null;for(e.reset(0);s=e.next(t);)o=d(new r.Q(i,s.index+1,i,s.index+1+s[0].length),s,n);return o}}function g(e,t,i,n,s){return function(e,t,i,n,s){if(0===n)return!0;let o=t.charCodeAt(n-1);if(0!==e.get(o)||13===o||10===o)return!0;if(s>0){let i=t.charCodeAt(n);if(0!==e.get(i))return!0}return!1}(e,t,0,n,s)&&function(e,t,i,n,s){if(n+s===i)return!0;let o=t.charCodeAt(n+s);if(0!==e.get(o)||13===o||10===o)return!0;if(s>0){let i=t.charCodeAt(n+s-1);if(0!==e.get(i))return!0}return!1}(e,t,i,n,s)}class p{constructor(e,t){this._wordSeparators=e,this._searchRegex=t,this._prevMatchStartIndex=-1,this._prevMatchLength=0}reset(e){this._searchRegex.lastIndex=e,this._prevMatchStartIndex=-1,this._prevMatchLength=0}next(e){let t,i=e.length;do{if(this._prevMatchStartIndex+this._prevMatchLength===i||!(t=this._searchRegex.exec(e)))break;let s=t.index,o=t[0].length;if(s===this._prevMatchStartIndex&&o===this._prevMatchLength){if(0===o){n.Z5(e,i,this._searchRegex.lastIndex)>65535?this._searchRegex.lastIndex+=2:this._searchRegex.lastIndex+=1;continue}break}if(this._prevMatchStartIndex=s,this._prevMatchLength=o,!this._wordSeparators||g(this._wordSeparators,e,i,s,o))return t}while(t);return null}}},28669:(e,t,i)=>{"use strict";let n,s;i.d(t,{BH:()=>N,Fr:()=>L,H8:()=>A,HZ:()=>S,OS:()=>T,UP:()=>W,_p:()=>M,cm:()=>P,gm:()=>F,iD:()=>D,ib:()=>y,j9:()=>w,lg:()=>k,m0:()=>H,nr:()=>B,ti:()=>a,uF:()=>b,un:()=>x,zx:()=>C});var o=i(15957),r=i(40074);let a="en",l=!1,h=!1,d=!1,c=!1,u=!1,g=!1,p=!1,m=a,f=globalThis;void 0!==f.vscode&&void 0!==f.vscode.process?s=f.vscode.process:void 0!==r&&"string"==typeof r?.versions?.node&&(s=r);let _="string"==typeof s?.versions?.electron&&s?.type==="renderer";if("object"==typeof s){l="win32"===s.platform,h="darwin"===s.platform,(d="linux"===s.platform)&&s.env.SNAP&&s.env.SNAP_REVISION,s.env.CI||s.env.BUILD_ARTIFACTSTAGINGDIRECTORY||s.env.GITHUB_WORKSPACE,m=a;let e=s.env.VSCODE_NLS_CONFIG;if(e)try{let t=JSON.parse(e);t.userLocale,t.osLocale,m=t.resolvedLanguage||a,t.languagePack?.translationsConfigFile}catch(e){}c=!0}else"object"!=typeof navigator||_?console.error("Unable to resolve platform."):(l=(n=navigator.userAgent).indexOf("Windows")>=0,h=n.indexOf("Macintosh")>=0,g=(n.indexOf("Macintosh")>=0||n.indexOf("iPad")>=0||n.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,d=n.indexOf("Linux")>=0,p=n?.indexOf("Mobi")>=0,u=!0,m=o.i8()||a,navigator.language.toLowerCase());let v=0;h?v=1:l?v=3:d&&(v=2);let b=l,C=h,w=d,y=c,S=u,k=u&&"function"==typeof f.importScripts?f.origin:void 0,x=g,L=p,D=v,I=n,N=m,E="function"==typeof f.postMessage&&!f.importScripts,M=(()=>{if(E){let e=[];f.addEventListener("message",t=>{if(t.data&&t.data.vscodeScheduleAsyncWork)for(let i=0,n=e.length;i<n;i++){let n=e[i];if(n.id===t.data.vscodeScheduleAsyncWork){e.splice(i,1),n.callback();return}}});let t=0;return i=>{let n=++t;e.push({id:n,callback:i}),f.postMessage({vscodeScheduleAsyncWork:n},"*")}}return e=>setTimeout(e)})(),T=h||g?2:l?1:3,R=!0,O=!1;function P(){if(!O){O=!0;let e=new Uint8Array(2);e[0]=1,e[1]=2,R=513===new Uint16Array(e.buffer)[0]}return R}let A=!!(I&&I.indexOf("Chrome")>=0),F=!!(I&&I.indexOf("Firefox")>=0),B=!!(!A&&I&&I.indexOf("Safari")>=0),W=!!(I&&I.indexOf("Edg/")>=0),H=!!(I&&I.indexOf("Android")>=0)},28771:(e,t,i)=>{"use strict";var n;function s(e,t){let i=new Map;for(let n of e){let e=t(n),s=i.get(e);s||(s=[],i.set(e,s)),s.push(n)}return i}function o(e,t){let i=[],n=[];for(let n of e)t.has(n)||i.push(n);for(let i of t)e.has(i)||n.push(i);return{removed:i,added:n}}function r(e,t){let i=new Set;for(let n of t)e.has(n)&&i.add(n);return i}i.d(t,{E$:()=>r,Fi:()=>s,Zv:()=>o,iD:()=>a});class a{static{n=Symbol.toStringTag}constructor(e,t){for(let i of(this.toKey=t,this._map=new Map,this[n]="SetWithKey",e))this.add(i)}get size(){return this._map.size}add(e){let t=this.toKey(e);return this._map.set(t,e),this}delete(e){return this._map.delete(this.toKey(e))}has(e){return this._map.has(this.toKey(e))}*entries(){for(let e of this._map.values())yield[e,e]}keys(){return this.values()}*values(){for(let e of this._map.values())yield e}clear(){this._map.clear()}forEach(e,t){this._map.forEach(i=>e.call(t,i,i,this))}[Symbol.iterator](){return this.values()}}},29031:(e,t,i)=>{"use strict";i.d(t,{e:()=>r});var n=i(29195),s=i(60393),o=i(28669);let r={clipboard:{writeText:o.ib||document.queryCommandSupported&&document.queryCommandSupported("copy")||!!(navigator&&navigator.clipboard&&navigator.clipboard.writeText),readText:o.ib||!!(navigator&&navigator.clipboard&&navigator.clipboard.readText)},keyboard:o.ib||n.Qu()?0:navigator.keyboard||n.nr?1:2,touch:"ontouchstart"in s.G||navigator.maxTouchPoints>0,pointerEvents:s.G.PointerEvent&&("ontouchstart"in s.G||navigator.maxTouchPoints>0)}},29195:(e,t,i)=>{"use strict";i.d(t,{Dy:()=>o,H8:()=>d,Qu:()=>m,Tc:()=>h,c8:()=>u,gm:()=>l,m0:()=>g,nr:()=>c,pR:()=>r});var n=i(60393);class s{constructor(){this.mapWindowIdToZoomFactor=new Map}static{this.INSTANCE=new s}getZoomFactor(e){return this.mapWindowIdToZoomFactor.get(this.getWindowId(e))??1}getWindowId(e){return e.vscodeWindowId}}function o(e,t,i){"string"==typeof t&&(t=e.matchMedia(t)),t.addEventListener("change",i)}function r(e){return s.INSTANCE.getZoomFactor(e)}let a=navigator.userAgent,l=a.indexOf("Firefox")>=0,h=a.indexOf("AppleWebKit")>=0,d=a.indexOf("Chrome")>=0,c=!d&&a.indexOf("Safari")>=0,u=!d&&!c&&h;a.indexOf("Electron/");let g=a.indexOf("Android")>=0,p=!1;if("function"==typeof n.G.matchMedia){let e=n.G.matchMedia("(display-mode: standalone) or (display-mode: window-controls-overlay)"),t=n.G.matchMedia("(display-mode: fullscreen)");p=e.matches,o(n.G,e,({matches:e})=>{p&&t.matches||(p=e)})}function m(){return p}},29443:(e,t,i)=>{"use strict";i.d(t,{Bs:()=>a,d:()=>s});var n=i(55532);class s{constructor(e,t,i,n){this.startColumn=e,this.endColumn=t,this.className=i,this.type=n,this._lineDecorationBrand=void 0}static _equals(e,t){return e.startColumn===t.startColumn&&e.endColumn===t.endColumn&&e.className===t.className&&e.type===t.type}static equalsArr(e,t){let i=e.length;if(i!==t.length)return!1;for(let n=0;n<i;n++)if(!s._equals(e[n],t[n]))return!1;return!0}static extractWrapped(e,t,i){if(0===e.length)return e;let n=t+1,o=i+1,r=i-t,a=[],l=0;for(let t of e)t.endColumn<=n||t.startColumn>=o||(a[l++]=new s(Math.max(1,t.startColumn-n+1),Math.min(r+1,t.endColumn-n+1),t.className,t.type));return a}static filter(e,t,i,n){if(0===e.length)return[];let o=[],r=0;for(let a=0,l=e.length;a<l;a++){let l=e[a],h=l.range;if(h.endLineNumber<t||h.startLineNumber>t||h.isEmpty()&&(0===l.type||3===l.type))continue;let d=h.startLineNumber===t?h.startColumn:i,c=h.endLineNumber===t?h.endColumn:n;o[r++]=new s(d,c,l.inlineClassName,l.type)}return o}static _typeCompare(e,t){let i=[2,0,1,3];return i[e]-i[t]}static compare(e,t){if(e.startColumn!==t.startColumn)return e.startColumn-t.startColumn;if(e.endColumn!==t.endColumn)return e.endColumn-t.endColumn;let i=s._typeCompare(e.type,t.type);return 0!==i?i:e.className!==t.className?e.className<t.className?-1:1:0}}class o{constructor(e,t,i,n){this.startOffset=e,this.endOffset=t,this.className=i,this.metadata=n}}class r{constructor(){this.stopOffsets=[],this.classNames=[],this.metadata=[],this.count=0}static _metadata(e){let t=0;for(let i=0,n=e.length;i<n;i++)t|=e[i];return t}consumeLowerThan(e,t,i){for(;this.count>0&&this.stopOffsets[0]<e;){let e=0;for(;e+1<this.count&&this.stopOffsets[e]===this.stopOffsets[e+1];)e++;i.push(new o(t,this.stopOffsets[e],this.classNames.join(" "),r._metadata(this.metadata))),t=this.stopOffsets[e]+1,this.stopOffsets.splice(0,e+1),this.classNames.splice(0,e+1),this.metadata.splice(0,e+1),this.count-=e+1}return this.count>0&&t<e&&(i.push(new o(t,e-1,this.classNames.join(" "),r._metadata(this.metadata))),t=e),t}insert(e,t,i){if(0===this.count||this.stopOffsets[this.count-1]<=e)this.stopOffsets.push(e),this.classNames.push(t),this.metadata.push(i);else for(let n=0;n<this.count;n++)if(this.stopOffsets[n]>=e){this.stopOffsets.splice(n,0,e),this.classNames.splice(n,0,t),this.metadata.splice(n,0,i);break}this.count++}}class a{static normalize(e,t){if(0===t.length)return[];let i=[],s=new r,o=0;for(let r=0,a=t.length;r<a;r++){let a=t[r],l=a.startColumn,h=a.endColumn,d=a.className,c=1===a.type?2:4*(2===a.type);if(l>1){let t=e.charCodeAt(l-2);n.pc(t)&&l--}if(h>1){let t=e.charCodeAt(h-2);n.pc(t)&&h--}let u=l-1,g=h-2;o=s.consumeLowerThan(u,o,i),0===s.count&&(o=u),s.insert(g,d,c)}return s.consumeLowerThan(0x40000000,o,i),i}}},29740:(e,t,i)=>{"use strict";i.d(t,{I:()=>d});var n=i(55532),s=i(17379),o=i(72553),r=i(23047),a=i(16933),l=i(6849);class h{constructor(e,t,i){this._cursorPositionBrand=void 0,this.lineNumber=e,this.column=t,this.leftoverVisibleColumns=i}}class d{static leftPosition(e,t){if(t.column>e.getLineMinColumn(t.lineNumber))return t.delta(void 0,-n.MV(e.getLineContent(t.lineNumber),t.column-1));if(!(t.lineNumber>1))return t;{let i=t.lineNumber-1;return new o.y(i,e.getLineMaxColumn(i))}}static leftPositionAtomicSoftTabs(e,t,i){if(t.column<=e.getLineIndentColumn(t.lineNumber)){let n=e.getLineMinColumn(t.lineNumber),s=e.getLineContent(t.lineNumber),r=a.s.atomicPosition(s,t.column-1,i,0);if(-1!==r&&r+1>=n)return new o.y(t.lineNumber,r+1)}return this.leftPosition(e,t)}static left(e,t,i){let n=e.stickyTabStops?d.leftPositionAtomicSoftTabs(t,i,e.tabSize):d.leftPosition(t,i);return new h(n.lineNumber,n.column,0)}static moveLeft(e,t,i,n,s){let o,r;if(i.hasSelection()&&!n)o=i.selection.startLineNumber,r=i.selection.startColumn;else{let n=i.position.delta(void 0,-(s-1)),a=t.normalizePosition(d.clipPositionColumn(n,t),0),l=d.left(e,t,a);o=l.lineNumber,r=l.column}return i.move(n,o,r,0)}static clipPositionColumn(e,t){return new o.y(e.lineNumber,d.clipRange(e.column,t.getLineMinColumn(e.lineNumber),t.getLineMaxColumn(e.lineNumber)))}static clipRange(e,t,i){return e<t?t:e>i?i:e}static rightPosition(e,t,i){return i<e.getLineMaxColumn(t)?i+=n.iy(e.getLineContent(t),i-1):t<e.getLineCount()&&(t+=1,i=e.getLineMinColumn(t)),new o.y(t,i)}static rightPositionAtomicSoftTabs(e,t,i,n,s){if(i<e.getLineIndentColumn(t)){let s=e.getLineContent(t),r=a.s.atomicPosition(s,i-1,n,1);if(-1!==r)return new o.y(t,r+1)}return this.rightPosition(e,t,i)}static right(e,t,i){let n=e.stickyTabStops?d.rightPositionAtomicSoftTabs(t,i.lineNumber,i.column,e.tabSize,e.indentSize):d.rightPosition(t,i.lineNumber,i.column);return new h(n.lineNumber,n.column,0)}static moveRight(e,t,i,n,s){let o,r;if(i.hasSelection()&&!n)o=i.selection.endLineNumber,r=i.selection.endColumn;else{let n=i.position.delta(void 0,s-1),a=t.normalizePosition(d.clipPositionColumn(n,t),1),l=d.right(e,t,a);o=l.lineNumber,r=l.column}return i.move(n,o,r,0)}static vertical(e,t,i,n,r,a,l,d){let c=s.A.visibleColumnFromColumn(t.getLineContent(i),n,e.tabSize)+r,u=t.getLineCount(),g=1===i&&1===n,p=i===u&&n===t.getLineMaxColumn(i),m=a<i?g:p;if((i=a)<1?(i=1,n=l?t.getLineMinColumn(i):Math.min(t.getLineMaxColumn(i),n)):i>u?(i=u,n=l?t.getLineMaxColumn(i):Math.min(t.getLineMaxColumn(i),n)):n=e.columnFromVisibleColumn(t,i,c),r=m?0:c-s.A.visibleColumnFromColumn(t.getLineContent(i),n,e.tabSize),void 0!==d){let e=new o.y(i,n),s=t.normalizePosition(e,d);r+=n-s.column,i=s.lineNumber,n=s.column}return new h(i,n,r)}static down(e,t,i,n,s,o,r){return this.vertical(e,t,i,n,s,i+o,r,4)}static moveDown(e,t,i,n,s){let r,a,l;i.hasSelection()&&!n?(r=i.selection.endLineNumber,a=i.selection.endColumn):(r=i.position.lineNumber,a=i.position.column);let h=0;do if(l=d.down(e,t,r+h,a,i.leftoverVisibleColumns,s,!0),t.normalizePosition(new o.y(l.lineNumber,l.column),2).lineNumber>r)break;while(h++<10&&r+h<t.getLineCount());return i.move(n,l.lineNumber,l.column,l.leftoverVisibleColumns)}static translateDown(e,t,i){let n=i.selection,s=d.down(e,t,n.selectionStartLineNumber,n.selectionStartColumn,i.selectionStartLeftoverVisibleColumns,1,!1),a=d.down(e,t,n.positionLineNumber,n.positionColumn,i.leftoverVisibleColumns,1,!1);return new l.mG(new r.Q(s.lineNumber,s.column,s.lineNumber,s.column),0,s.leftoverVisibleColumns,new o.y(a.lineNumber,a.column),a.leftoverVisibleColumns)}static up(e,t,i,n,s,o,r){return this.vertical(e,t,i,n,s,i-o,r,3)}static moveUp(e,t,i,n,s){let o,r;i.hasSelection()&&!n?(o=i.selection.startLineNumber,r=i.selection.startColumn):(o=i.position.lineNumber,r=i.position.column);let a=d.up(e,t,o,r,i.leftoverVisibleColumns,s,!0);return i.move(n,a.lineNumber,a.column,a.leftoverVisibleColumns)}static translateUp(e,t,i){let n=i.selection,s=d.up(e,t,n.selectionStartLineNumber,n.selectionStartColumn,i.selectionStartLeftoverVisibleColumns,1,!1),a=d.up(e,t,n.positionLineNumber,n.positionColumn,i.leftoverVisibleColumns,1,!1);return new l.mG(new r.Q(s.lineNumber,s.column,s.lineNumber,s.column),0,s.leftoverVisibleColumns,new o.y(a.lineNumber,a.column),a.leftoverVisibleColumns)}static _isBlankLine(e,t){return 0===e.getLineFirstNonWhitespaceColumn(t)}static moveToPrevBlankLine(e,t,i,n){let s=i.position.lineNumber;for(;s>1&&this._isBlankLine(t,s);)s--;for(;s>1&&!this._isBlankLine(t,s);)s--;return i.move(n,s,t.getLineMinColumn(s),0)}static moveToNextBlankLine(e,t,i,n){let s=t.getLineCount(),o=i.position.lineNumber;for(;o<s&&this._isBlankLine(t,o);)o++;for(;o<s&&!this._isBlankLine(t,o);)o++;return i.move(n,o,t.getLineMinColumn(o),0)}static moveToBeginningOfLine(e,t,i,n){let s,o=i.position.lineNumber,r=t.getLineMinColumn(o),a=t.getLineFirstNonWhitespaceColumn(o)||r;return s=i.position.column===a?r:a,i.move(n,o,s,0)}static moveToEndOfLine(e,t,i,n,s){let o=i.position.lineNumber,r=t.getLineMaxColumn(o);return i.move(n,o,r,s?0x40000000-r:0)}static moveToBeginningOfBuffer(e,t,i,n){return i.move(n,1,1,0)}static moveToEndOfBuffer(e,t,i,n){let s=t.getLineCount(),o=t.getLineMaxColumn(s);return i.move(n,s,o,0)}}},29883:(e,t,i)=>{"use strict";i.d(t,{B:()=>n,m:()=>C});var n,s=i(87899),o=i(92684),r=i(88723),a=i(87460),l=i(45262),h=i(99136),d=i(17354),c=i(82102),u=i(28669);i(37958);var g=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r};!function(e){e.North="north",e.South="south",e.East="east",e.West="west"}(n||(n={}));let p=new d.vl,m=new d.vl;class f{constructor(e){this.el=e,this.disposables=new c.Cm}get onPointerMove(){return this.disposables.add(new r.f((0,s.zk)(this.el),"mousemove")).event}get onPointerUp(){return this.disposables.add(new r.f((0,s.zk)(this.el),"mouseup")).event}dispose(){this.disposables.dispose()}}g([h.B],f.prototype,"onPointerMove",null),g([h.B],f.prototype,"onPointerUp",null);class _{get onPointerMove(){return this.disposables.add(new r.f(this.el,a.B.Change)).event}get onPointerUp(){return this.disposables.add(new r.f(this.el,a.B.End)).event}constructor(e){this.el=e,this.disposables=new c.Cm}dispose(){this.disposables.dispose()}}g([h.B],_.prototype,"onPointerMove",null),g([h.B],_.prototype,"onPointerUp",null);class v{get onPointerMove(){return this.factory.onPointerMove}get onPointerUp(){return this.factory.onPointerUp}constructor(e){this.factory=e}dispose(){}}g([h.B],v.prototype,"onPointerMove",null),g([h.B],v.prototype,"onPointerUp",null);let b="pointer-events-disabled";class C extends c.jG{get state(){return this._state}get orthogonalStartSash(){return this._orthogonalStartSash}get orthogonalEndSash(){return this._orthogonalEndSash}set state(e){this._state!==e&&(this.el.classList.toggle("disabled",0===e),this.el.classList.toggle("minimum",1===e),this.el.classList.toggle("maximum",2===e),this._state=e,this.onDidEnablementChange.fire(e))}get onDidStart(){return this._onDidStart.event}get onDidChange(){return this._onDidChange.event}get onDidReset(){return this._onDidReset.event}get onDidEnd(){return this._onDidEnd.event}set orthogonalStartSash(e){if(this._orthogonalStartSash!==e){if(this.orthogonalStartDragHandleDisposables.clear(),this.orthogonalStartSashDisposables.clear(),e){let t=t=>{this.orthogonalStartDragHandleDisposables.clear(),0!==t&&(this._orthogonalStartDragHandle=(0,s.BC)(this.el,(0,s.$)(".orthogonal-drag-handle.start")),this.orthogonalStartDragHandleDisposables.add((0,c.s)(()=>this._orthogonalStartDragHandle.remove())),this.orthogonalStartDragHandleDisposables.add((0,s.ko)(this._orthogonalStartDragHandle,"mouseenter",()=>C.onMouseEnter(e))),this.orthogonalStartDragHandleDisposables.add((0,s.ko)(this._orthogonalStartDragHandle,"mouseleave",()=>C.onMouseLeave(e))))};this.orthogonalStartSashDisposables.add(e.onDidEnablementChange.event(t,this)),t(e.state)}this._orthogonalStartSash=e}}set orthogonalEndSash(e){if(this._orthogonalEndSash!==e){if(this.orthogonalEndDragHandleDisposables.clear(),this.orthogonalEndSashDisposables.clear(),e){let t=t=>{this.orthogonalEndDragHandleDisposables.clear(),0!==t&&(this._orthogonalEndDragHandle=(0,s.BC)(this.el,(0,s.$)(".orthogonal-drag-handle.end")),this.orthogonalEndDragHandleDisposables.add((0,c.s)(()=>this._orthogonalEndDragHandle.remove())),this.orthogonalEndDragHandleDisposables.add((0,s.ko)(this._orthogonalEndDragHandle,"mouseenter",()=>C.onMouseEnter(e))),this.orthogonalEndDragHandleDisposables.add((0,s.ko)(this._orthogonalEndDragHandle,"mouseleave",()=>C.onMouseLeave(e))))};this.orthogonalEndSashDisposables.add(e.onDidEnablementChange.event(t,this)),t(e.state)}this._orthogonalEndSash=e}}constructor(e,t,i){let n;super(),this.hoverDelay=300,this.hoverDelayer=this._register(new l.ve(this.hoverDelay)),this._state=3,this.onDidEnablementChange=this._register(new d.vl),this._onDidStart=this._register(new d.vl),this._onDidChange=this._register(new d.vl),this._onDidReset=this._register(new d.vl),this._onDidEnd=this._register(new d.vl),this.orthogonalStartSashDisposables=this._register(new c.Cm),this.orthogonalStartDragHandleDisposables=this._register(new c.Cm),this.orthogonalEndSashDisposables=this._register(new c.Cm),this.orthogonalEndDragHandleDisposables=this._register(new c.Cm),this.linkedSash=void 0,this.el=(0,s.BC)(e,(0,s.$)(".monaco-sash")),i.orthogonalEdge&&this.el.classList.add(`orthogonal-edge-${i.orthogonalEdge}`),u.zx&&this.el.classList.add("mac"),this._register((0,s.ko)(this.el,"mousedown",t=>this.onPointerStart(t,new f(e)))),this._register((0,s.ko)(this.el,"dblclick",e=>this.onPointerDoublePress(e))),this._register((0,s.ko)(this.el,"mouseenter",()=>C.onMouseEnter(this))),this._register((0,s.ko)(this.el,"mouseleave",()=>C.onMouseLeave(this))),this._register(a.q.addTarget(this.el)),this._register((0,s.ko)(this.el,a.B.Start,e=>this.onPointerStart(e,new _(this.el)))),this._register((0,s.ko)(this.el,a.B.Tap,e=>{if(n){clearTimeout(n),n=void 0,this.onPointerDoublePress(e);return}clearTimeout(n),n=setTimeout(()=>n=void 0,250)})),"number"==typeof i.size?(this.size=i.size,0===i.orientation?this.el.style.width=`${this.size}px`:this.el.style.height=`${this.size}px`):(this.size=4,this._register(p.event(e=>{this.size=e,this.layout()}))),this._register(m.event(e=>this.hoverDelay=e)),this.layoutProvider=t,this.orthogonalStartSash=i.orthogonalStartSash,this.orthogonalEndSash=i.orthogonalEndSash,this.orientation=i.orientation||0,1===this.orientation?(this.el.classList.add("horizontal"),this.el.classList.remove("vertical")):(this.el.classList.remove("horizontal"),this.el.classList.add("vertical")),this.el.classList.toggle("debug",!1),this.layout()}onPointerStart(e,t){s.fs.stop(e);let i=!1;if(!e.__orthogonalSashEvent){let n=this.getOrthogonalSash(e);n&&(i=!0,e.__orthogonalSashEvent=!0,n.onPointerStart(e,new v(t)))}if(this.linkedSash&&!e.__linkedSashEvent&&(e.__linkedSashEvent=!0,this.linkedSash.onPointerStart(e,new v(t))),!this.state)return;let n=this.el.ownerDocument.getElementsByTagName("iframe");for(let e of n)e.classList.add(b);let r=e.pageX,a=e.pageY,l=e.altKey;this.el.classList.add("active"),this._onDidStart.fire({startX:r,currentX:r,startY:a,currentY:a,altKey:l});let h=(0,o.li)(this.el),d=()=>{let e="";e=i?"all-scroll":1===this.orientation?1===this.state?"s-resize":2===this.state?"n-resize":u.zx?"row-resize":"ns-resize":1===this.state?"e-resize":2===this.state?"w-resize":u.zx?"col-resize":"ew-resize",h.textContent=`* { cursor: ${e} !important; }`},g=new c.Cm;d(),i||this.onDidEnablementChange.event(d,null,g);let p=e=>{s.fs.stop(e,!1);let t={startX:r,currentX:e.pageX,startY:a,currentY:e.pageY,altKey:l};this._onDidChange.fire(t)},m=e=>{for(let t of(s.fs.stop(e,!1),h.remove(),this.el.classList.remove("active"),this._onDidEnd.fire(),g.dispose(),n))t.classList.remove(b)};t.onPointerMove(p,null,g),t.onPointerUp(m,null,g),g.add(t)}onPointerDoublePress(e){let t=this.getOrthogonalSash(e);t&&t._onDidReset.fire(),this.linkedSash&&this.linkedSash._onDidReset.fire(),this._onDidReset.fire()}static onMouseEnter(e,t=!1){e.el.classList.contains("active")?(e.hoverDelayer.cancel(),e.el.classList.add("hover")):e.hoverDelayer.trigger(()=>e.el.classList.add("hover"),e.hoverDelay).then(void 0,()=>{}),!t&&e.linkedSash&&C.onMouseEnter(e.linkedSash,!0)}static onMouseLeave(e,t=!1){e.hoverDelayer.cancel(),e.el.classList.remove("hover"),!t&&e.linkedSash&&C.onMouseLeave(e.linkedSash,!0)}clearSashHoverState(){C.onMouseLeave(this)}layout(){if(0===this.orientation){let e=this.layoutProvider;this.el.style.left=e.getVerticalSashLeft(this)-this.size/2+"px",e.getVerticalSashTop&&(this.el.style.top=e.getVerticalSashTop(this)+"px"),e.getVerticalSashHeight&&(this.el.style.height=e.getVerticalSashHeight(this)+"px")}else{let e=this.layoutProvider;this.el.style.top=e.getHorizontalSashTop(this)-this.size/2+"px",e.getHorizontalSashLeft&&(this.el.style.left=e.getHorizontalSashLeft(this)+"px"),e.getHorizontalSashWidth&&(this.el.style.width=e.getHorizontalSashWidth(this)+"px")}}getOrthogonalSash(e){let t=e.initialTarget??e.target;if(t&&(0,s.sb)(t)&&t.classList.contains("orthogonal-drag-handle"))return t.classList.contains("start")?this.orthogonalStartSash:this.orthogonalEndSash}dispose(){super.dispose(),this.el.remove()}}},30047:()=>{},30117:(e,t,i)=>{"use strict";i.d(t,{H:()=>s});var n=i(6033);function s(e,t){let i=globalThis.MonacoEnvironment;if(i?.createTrustedTypesPolicy)try{return i.createTrustedTypesPolicy(e,t)}catch(e){(0,n.dz)(e);return}try{return globalThis.trustedTypes?.createPolicy(e,t)}catch(e){(0,n.dz)(e);return}}},30679:()=>{},30868:(e,t,i)=>{"use strict";i.d(t,{x:()=>n});class n{static getLanguageId(e){return(255&e)>>>0}static getTokenType(e){return(768&e)>>>8}static containsBalancedBrackets(e){return(1024&e)!=0}static getFontStyle(e){return(30720&e)>>>11}static getForeground(e){return(0xff8000&e)>>>15}static getBackground(e){return(0xff000000&e)>>>24}static getClassNameFromMetadata(e){let t="mtk"+this.getForeground(e),i=this.getFontStyle(e);return 1&i&&(t+=" mtki"),2&i&&(t+=" mtkb"),4&i&&(t+=" mtku"),8&i&&(t+=" mtks"),t}static getInlineStyleFromMetadata(e,t){let i=this.getForeground(e),n=this.getFontStyle(e),s=`color: ${t[i]};`;1&n&&(s+="font-style: italic;"),2&n&&(s+="font-weight: bold;");let o="";return 4&n&&(o+=" underline"),8&n&&(o+=" line-through"),o&&(s+=`text-decoration:${o};`),s}static getPresentationFromMetadata(e){let t=this.getForeground(e),i=this.getFontStyle(e);return{foreground:t,italic:!!(1&i),bold:!!(2&i),underline:!!(4&i),strikethrough:!!(8&i)}}}},31023:(e,t,i)=>{"use strict";i.d(t,{Cr:()=>n,VM:()=>s,ew:()=>o});let n=(0,i(22263).u1)("openerService");function s(e,t){return e.with({fragment:`${t.startLineNumber},${t.startColumn}${t.endLineNumber?`-${t.endLineNumber}${t.endColumn?`,${t.endColumn}`:""}`:""}`})}function o(e){let t,i=/^L?(\d+)(?:,(\d+))?(-L?(\d+)(?:,(\d+))?)?/.exec(e.fragment);return i&&(t={startLineNumber:parseInt(i[1]),startColumn:i[2]?parseInt(i[2]):1,endLineNumber:i[4]?parseInt(i[4]):void 0,endColumn:i[4]?i[5]?parseInt(i[5]):1:void 0},e=e.with({fragment:""})),{selection:t,uri:e}}},31055:()=>{},31233:()=>{},31293:(e,t,i)=>{"use strict";i.d(t,{V:()=>o,w:()=>r});var n=i(82102),s=i(76946);function o(e,t,i,n=s.jM.ofCaller()){return(0,s.eP)({debugName:()=>`Configuration Key "${e}"`},t=>i.onDidChangeConfiguration(i=>{i.affectsConfiguration(e)&&t(i)}),()=>i.getValue(e)??t,n)}function r(e,t,i,o=s.jM.ofCaller()){let a=e.bindTo(t),l=new n.Cm;return(0,s.C)({debugName:()=>`Set Context Key "${e.key}"`},e=>{let t=i(e);return a.set(t),t},o).recomputeInitiallyAndOnChange(l),l}},31575:()=>{},31799:(e,t,i)=>{"use strict";i.d(t,{GN:()=>s,a6:()=>o,vo:()=>n,wc:()=>r});class n{constructor(e,t){this._viewModelDecorationBrand=void 0,this.range=e,this.options=t}}function s(e,t){return!(t.options.hideInCommentTokens&&o(e,t)||t.options.hideInStringTokens&&r(e,t))}function o(e,t){return a(e,t.range,e=>1===e)}function r(e,t){return a(e,t.range,e=>2===e)}function a(e,t,i){for(let n=t.startLineNumber;n<=t.endLineNumber;n++){let s=e.tokenization.getLineTokens(n),o=n===t.startLineNumber,r=n===t.endLineNumber,a=o?s.findTokenIndexAtOffset(t.startColumn-1):0;for(;a<s.getCount()&&!(r&&s.getStartOffset(a)>t.endColumn-1);){if(!i(s.getStandardTokenType(a)))return!1;a++}}return!0}},32091:(e,t,i)=>{"use strict";i.d(t,{G5:()=>s,N8:()=>r,ke:()=>o});var n=i(22263);let s=(0,n.u1)("progressService");Object.freeze({total(){},worked(){},done(){}});class o{static{this.None=Object.freeze({report(){}})}constructor(e){this.callback=e}report(e){this._value=e,this.callback(this._value)}}let r=(0,n.u1)("editorProgressService")},32795:(e,t,i)=>{"use strict";i.d(t,{O:()=>d});var n=i(99136),s=i(82102),o=i(28669),r=i(99314),a=i(30868),l=i(26033);let h=0;class d extends s.jG{get cacheKey(){return`${this.fontFamily}_${this.fontSize}px`}constructor(e,t,i,n){super(),this.fontSize=e,this.fontFamily=t,this.devicePixelRatio=i,this._decorationStyleCache=n,this.id=h++,this._workGlyph={source:null,boundingBox:{left:0,bottom:0,right:0,top:0},originOffset:{x:0,y:0},fontBoundingBoxAscent:0,fontBoundingBoxDescent:0},this._workGlyphConfig={chars:void 0,tokenMetadata:0,decorationStyleSetId:0},this._antiAliasing=o.zx?"greyscale":"subpixel";let s=Math.ceil(this.fontSize*i);this._canvas=new OffscreenCanvas(3*s,3*s),this._ctx=(0,l.HS)(this._canvas.getContext("2d",{willReadFrequently:!0,alpha:"greyscale"===this._antiAliasing})),this._ctx.textBaseline="top",this._ctx.fillStyle="#FFFFFF",this._ctx.font=`${s}px ${this.fontFamily}`,this._textMetrics=this._ctx.measureText("A")}rasterizeGlyph(e,t,i,n){return""===e?{source:this._canvas,boundingBox:{top:0,left:0,bottom:-1,right:-1},originOffset:{x:0,y:0},fontBoundingBoxAscent:0,fontBoundingBoxDescent:0}:this._workGlyphConfig.chars===e&&this._workGlyphConfig.tokenMetadata===t&&this._workGlyphConfig.decorationStyleSetId===i?this._workGlyph:(this._workGlyphConfig.chars=e,this._workGlyphConfig.tokenMetadata=t,this._workGlyphConfig.decorationStyleSetId=i,this._rasterizeGlyph(e,t,i,n))}_rasterizeGlyph(e,t,i,n){let s=Math.ceil(this.fontSize*this.devicePixelRatio),o=3*s;this._canvas.width!==o&&(this._canvas.width=o,this._canvas.height=o),this._ctx.save();let l=(15&t)/10,h=n[a.x.getBackground(t)],d=this._decorationStyleCache.getStyleSet(i);"subpixel"===this._antiAliasing?(this._ctx.fillStyle=h,this._ctx.fillRect(0,0,this._canvas.width,this._canvas.height)):this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height);let c=new r.fe(200),u=a.x.getFontStyle(t);1&u&&c.appendString("italic "),d?.bold!==void 0?d.bold&&c.appendString("bold "):2&u&&c.appendString("bold "),c.appendString(`${s}px ${this.fontFamily}`),this._ctx.font=c.build(),d?.color!==void 0?this._ctx.fillStyle=`#${d.color.toString(16).padStart(8,"0")}`:this._ctx.fillStyle=n[a.x.getForeground(t)],this._ctx.textBaseline="top",d?.opacity!==void 0&&(this._ctx.globalAlpha=d.opacity),this._ctx.fillText(e,s+l,s),this._ctx.restore();let g=this._ctx.getImageData(0,0,this._canvas.width,this._canvas.height);if("subpixel"===this._antiAliasing){let e=parseInt(h.substring(1,3),16),t=parseInt(h.substring(3,5),16),i=parseInt(h.substring(5,7),16);this._clearColor(g,e,t,i),this._ctx.putImageData(g,0,0)}return this._findGlyphBoundingBox(g,this._workGlyph.boundingBox),this._workGlyph.source=this._canvas,this._workGlyph.originOffset.x=this._workGlyph.boundingBox.left-s,this._workGlyph.originOffset.y=this._workGlyph.boundingBox.top-s,this._workGlyph.fontBoundingBoxAscent=this._textMetrics.fontBoundingBoxAscent,this._workGlyph.fontBoundingBoxDescent=this._textMetrics.fontBoundingBoxDescent,this._workGlyph}_clearColor(e,t,i,n){for(let s=0;s<e.data.length;s+=4)e.data[s]===t&&e.data[s+1]===i&&e.data[s+2]===n&&(e.data[s+3]=0)}_findGlyphBoundingBox(e,t){let i=this._canvas.height,n=this._canvas.width,s=!1;for(let o=0;o<i;o++){for(let i=0;i<n;i++){let r=o*n*4+4*i+3;if(0!==e.data[r]){t.top=o,s=!0;break}}if(s)break}t.left=0,s=!1;for(let o=0;o<n;o++){for(let r=0;r<i;r++){let i=r*n*4+4*o+3;if(0!==e.data[i]){t.left=o,s=!0;break}}if(s)break}t.right=n,s=!1;for(let o=n-1;o>=t.left;o--){for(let r=0;r<i;r++){let i=r*n*4+4*o+3;if(0!==e.data[i]){t.right=o,s=!0;break}}if(s)break}t.bottom=t.top,s=!1;for(let o=i-1;o>=0;o--){for(let i=0;i<n;i++){let r=o*n*4+4*i+3;if(0!==e.data[r]){t.bottom=o,s=!0;break}}if(s)break}}getTextMetrics(e){return this._ctx.measureText(e)}}!function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);o>3&&r&&Object.defineProperty(t,i,r)}([n.B],d.prototype,"cacheKey",null)},33073:()=>{},33815:(e,t,i)=>{"use strict";i.d(t,{CG:()=>s,gO:()=>r});var n=i(28669);function s(e,t){var i,s;if(n.HZ)return!1;let r=(i=e,(s=t)||(s=o(i)),"native"===s),a=e.getValue("window");return a?.menuStyle==="native"?!!n.zx||!!r:a?.menuStyle!=="custom"&&r}function o(e){if(n.HZ)return"custom";let t=e.getValue("window");if(t){if(n.zx&&!0===t.nativeTabs||n.zx&&!1===t.nativeFullScreen)return"native";let e=t.titleBarStyle;if("native"===e||"custom"===e)return e}return"custom"}function r(e){if(n.HZ||n.zx||"native"===o(e))return"native";let t=e.getValue("window"),i=t?.controlsStyle;return"custom"===i||"hidden"===i?i:"native"}},33941:(e,t,i)=>{"use strict";i.d(t,{U:()=>o});var n=i(17354);class s{constructor(){this._inputMode="insert",this._onDidChangeInputMode=new n.vl,this.onDidChangeInputMode=this._onDidChangeInputMode.event}getInputMode(){return this._inputMode}}let o=new s},34457:(e,t,i)=>{"use strict";i.d(t,{cB:()=>c});var n=i(71544),s=i(55532);class o{constructor(){this._value="",this._pos=0}reset(e){return this._value=e,this._pos=0,this}next(){return this._pos+=1,this}hasNext(){return this._pos<this._value.length-1}cmp(e){return e.charCodeAt(0)-this._value.charCodeAt(this._pos)}value(){return this._value[this._pos]}}class r{constructor(e=!0){this._caseSensitive=e}reset(e){return this._value=e,this._from=0,this._to=0,this.next()}hasNext(){return this._to<this._value.length}next(){this._from=this._to;let e=!0;for(;this._to<this._value.length;this._to++)if(46===this._value.charCodeAt(this._to))if(e)this._from++;else break;else e=!1;return this}cmp(e){return this._caseSensitive?(0,s.lF)(e,this._value,0,e.length,this._from,this._to):(0,s.zd)(e,this._value,0,e.length,this._from,this._to)}value(){return this._value.substring(this._from,this._to)}}class a{constructor(e=!0,t=!0){this._splitOnBackslash=e,this._caseSensitive=t}reset(e){this._from=0,this._to=0,this._value=e,this._valueLen=e.length;for(let t=e.length-1;t>=0;t--,this._valueLen--){let e=this._value.charCodeAt(t);if(!(47===e||this._splitOnBackslash&&92===e))break}return this.next()}hasNext(){return this._to<this._valueLen}next(){this._from=this._to;let e=!0;for(;this._to<this._valueLen;this._to++){let t=this._value.charCodeAt(this._to);if(47===t||this._splitOnBackslash&&92===t)if(e)this._from++;else break;else e=!1}return this}cmp(e){return this._caseSensitive?(0,s.lF)(e,this._value,0,e.length,this._from,this._to):(0,s.zd)(e,this._value,0,e.length,this._from,this._to)}value(){return this._value.substring(this._from,this._to)}}class l{constructor(e,t){this._ignorePathCasing=e,this._ignoreQueryAndFragment=t,this._states=[],this._stateIdx=0}reset(e){return this._value=e,this._states=[],this._value.scheme&&this._states.push(1),this._value.authority&&this._states.push(2),this._value.path&&(this._pathIterator=new a(!1,!this._ignorePathCasing(e)),this._pathIterator.reset(e.path),this._pathIterator.value()&&this._states.push(3)),!this._ignoreQueryAndFragment(e)&&(this._value.query&&this._states.push(4),this._value.fragment&&this._states.push(5)),this._stateIdx=0,this}next(){return 3===this._states[this._stateIdx]&&this._pathIterator.hasNext()?this._pathIterator.next():this._stateIdx+=1,this}hasNext(){return 3===this._states[this._stateIdx]&&this._pathIterator.hasNext()||this._stateIdx<this._states.length-1}cmp(e){if(1===this._states[this._stateIdx])return(0,s.W1)(e,this._value.scheme);if(2===this._states[this._stateIdx])return(0,s.W1)(e,this._value.authority);if(3===this._states[this._stateIdx])return this._pathIterator.cmp(e);if(4===this._states[this._stateIdx])return(0,s.UD)(e,this._value.query);if(5===this._states[this._stateIdx])return(0,s.UD)(e,this._value.fragment);throw Error()}value(){if(1===this._states[this._stateIdx])return this._value.scheme;if(2===this._states[this._stateIdx])return this._value.authority;if(3===this._states[this._stateIdx])return this._pathIterator.value();if(4===this._states[this._stateIdx])return this._value.query;if(5===this._states[this._stateIdx])return this._value.fragment;throw Error()}}class h{static{this.Val=Symbol("undefined_placeholder")}static wrap(e){return void 0===e?h.Val:e}static unwrap(e){return e===h.Val?void 0:e}}class d{constructor(){this.height=1,this.value=void 0,this.key=void 0,this.left=void 0,this.mid=void 0,this.right=void 0}rotateLeft(){let e=this.right;return this.right=e.left,e.left=this,this.updateHeight(),e.updateHeight(),e}rotateRight(){let e=this.left;return this.left=e.right,e.right=this,this.updateHeight(),e.updateHeight(),e}updateHeight(){this.height=1+Math.max(this.heightLeft,this.heightRight)}balanceFactor(){return this.heightRight-this.heightLeft}get heightLeft(){return this.left?.height??0}get heightRight(){return this.right?.height??0}}class c{static forUris(e=()=>!1,t=()=>!1){return new c(new l(e,t))}static forStrings(){return new c(new o)}static forConfigKeys(){return new c(new r)}constructor(e){this._iter=e}clear(){this._root=void 0}set(e,t){let i,n=this._iter.reset(e);this._root||(this._root=new d,this._root.segment=n.value());let s=[];for(i=this._root;;){let e=n.cmp(i.segment);if(e>0)i.left||(i.left=new d,i.left.segment=n.value()),s.push([-1,i]),i=i.left;else if(e<0)i.right||(i.right=new d,i.right.segment=n.value()),s.push([1,i]),i=i.right;else if(n.hasNext())n.next(),i.mid||(i.mid=new d,i.mid.segment=n.value()),s.push([0,i]),i=i.mid;else break}let o=h.unwrap(i.value);i.value=h.wrap(t),i.key=e;for(let e=s.length-1;e>=0;e--){let t=s[e][1];t.updateHeight();let i=t.balanceFactor();if(i<-1||i>1){let i=s[e][0],n=s[e+1][0];if(1===i&&1===n)s[e][1]=t.rotateLeft();else if(-1===i&&-1===n)s[e][1]=t.rotateRight();else if(1===i&&-1===n)t.right=s[e+1][1]=s[e+1][1].rotateRight(),s[e][1]=t.rotateLeft();else if(-1===i&&1===n)t.left=s[e+1][1]=s[e+1][1].rotateLeft(),s[e][1]=t.rotateRight();else throw Error();if(e>0)switch(s[e-1][0]){case -1:s[e-1][1].left=s[e][1];break;case 1:s[e-1][1].right=s[e][1];break;case 0:s[e-1][1].mid=s[e][1]}else this._root=s[0][1]}}return o}get(e){return h.unwrap(this._getNode(e)?.value)}_getNode(e){let t=this._iter.reset(e),i=this._root;for(;i;){let e=t.cmp(i.segment);if(e>0)i=i.left;else if(e<0)i=i.right;else if(t.hasNext())t.next(),i=i.mid;else break}return i}has(e){let t=this._getNode(e);return t?.value!==void 0||t?.mid!==void 0}delete(e){return this._delete(e,!1)}deleteSuperstr(e){return this._delete(e,!0)}_delete(e,t){let i=this._iter.reset(e),s=[],o=this._root;for(;o;){let e=i.cmp(o.segment);if(e>0)s.push([-1,o]),o=o.left;else if(e<0)s.push([1,o]),o=o.right;else if(i.hasNext())i.next(),s.push([0,o]),o=o.mid;else break}if(o){if(t?(o.left=void 0,o.mid=void 0,o.right=void 0,o.height=1):(o.key=void 0,o.value=void 0),!o.mid&&!o.value)if(o.left&&o.right){let e=[[1,o]],t=this._min(o.right,e);if(t.key){o.key=t.key,o.value=t.value,o.segment=t.segment;let i=t.right;if(e.length>1){let[t,s]=e[e.length-1];switch(t){case -1:s.left=i;break;case 0:(0,n.vA)(!1);case 1:(0,n.vA)(!1)}}else o.right=i;let r=this._balanceByStack(e);if(s.length>0){let[e,t]=s[s.length-1];switch(e){case -1:t.left=r;break;case 0:t.mid=r;break;case 1:t.right=r}}else this._root=r}}else{let e=o.left??o.right;if(s.length>0){let[t,i]=s[s.length-1];switch(t){case -1:i.left=e;break;case 0:i.mid=e;break;case 1:i.right=e}}else this._root=e}this._root=this._balanceByStack(s)??this._root}}_min(e,t){for(;e.left;)t.push([-1,e]),e=e.left;return e}_balanceByStack(e){for(let t=e.length-1;t>=0;t--){let i=e[t][1];i.updateHeight();let n=i.balanceFactor();if(n>1?(i.right.balanceFactor()>=0||(i.right=i.right.rotateRight()),e[t][1]=i.rotateLeft()):n<-1&&(0>=i.left.balanceFactor()||(i.left=i.left.rotateLeft()),e[t][1]=i.rotateRight()),!(t>0))return e[0][1];switch(e[t-1][0]){case -1:e[t-1][1].left=e[t][1];break;case 1:e[t-1][1].right=e[t][1];break;case 0:e[t-1][1].mid=e[t][1]}}}findSubstr(e){let t,i=this._iter.reset(e),n=this._root;for(;n;){let e=i.cmp(n.segment);if(e>0)n=n.left;else if(e<0)n=n.right;else if(i.hasNext())i.next(),t=h.unwrap(n.value)||t,n=n.mid;else break}return n&&h.unwrap(n.value)||t}findSuperstr(e){return this._findSuperstrOrElement(e,!1)}_findSuperstrOrElement(e,t){let i=this._iter.reset(e),n=this._root;for(;n;){let e=i.cmp(n.segment);if(e>0)n=n.left;else if(e<0)n=n.right;else if(i.hasNext())i.next(),n=n.mid;else if(n.mid)return this._entries(n.mid);else if(t)return h.unwrap(n.value);else break}}forEach(e){for(let[t,i]of this)e(i,t)}*[Symbol.iterator](){yield*this._entries(this._root)}_entries(e){let t=[];return this._dfsEntries(e,t),t[Symbol.iterator]()}_dfsEntries(e,t){e&&(e.left&&this._dfsEntries(e.left,t),void 0!==e.value&&t.push([e.key,h.unwrap(e.value)]),e.mid&&this._dfsEntries(e.mid,t),e.right&&this._dfsEntries(e.right,t))}}},34501:(e,t,i)=>{"use strict";i.d(t,{L:()=>C});var n,s,o=i(87899),r=i(6033),a=i(17354),l=i(82102),h=i(47108),d=i(22263),c=i(88298),u=i(32795),g=i(90057);let p=class extends l.jG{constructor(e){super(),this._logService=e,this._tasks=[],this._i=0,this._register((0,l.s)(()=>this.clear()))}enqueue(e){this._tasks.push(e),this._start()}clear(){this._idleCallback&&(this._cancelCallback(this._idleCallback),this._idleCallback=void 0),this._i=0,this._tasks.length=0}_start(){this._idleCallback||(this._idleCallback=this._requestCallback(this._process.bind(this)))}_process(e){this._idleCallback=void 0;let t=0,i=0,n=e.timeRemaining(),s=0;for(;this._i<this._tasks.length;){if(t=Date.now(),!this._tasks[this._i]()&&this._i++,1.5*(i=Math.max(t=Math.max(1,Date.now()-t),i))>(s=e.timeRemaining())){n-t<-20&&this._logService.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(n-t))}ms`),this._start();return}n=s}this.clear()}};p=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([(n=g.rr,function(e,t){n(e,t,0)})],p);class m extends p{_requestCallback(e){return(0,o.fz)().setTimeout(()=>e(this._createDeadline(16)))}_cancelCallback(e){(0,o.fz)().clearTimeout(e)}_createDeadline(e){let t=Date.now()+e;return{timeRemaining:()=>Math.max(0,t-Date.now())}}}class f extends p{_requestCallback(e){return(0,o.fz)().requestIdleCallback(e)}_cancelCallback(e){(0,o.fz)().cancelIdleCallback(e)}}let _="requestIdleCallback"in(0,o.fz)()?f:m;var v=i(81492),b=function(e,t){return function(i,n){t(i,n,e)}};let C=class extends l.jG{static{s=this}static{this.maximumPageCount=16}get pages(){return this._pages}constructor(e,t,i,n,s){super(),this._maxTextureSize=e,this._decorationStyleCache=i,this._themeService=n,this._instantiationService=s,this._warmUpTask=this._register(new l.HE),this._warmedUpRasterizers=new Set,this._pages=[],this._glyphPageIndex=new h.QO,this._onDidDeleteGlyphs=this._register(new a.vl),this.onDidDeleteGlyphs=this._onDidDeleteGlyphs.event,this._allocatorType=t?.allocatorType??"slab",this._register(a.Jh.runAndSubscribe(this._themeService.onDidColorThemeChange,()=>{this._colorMap&&this.clear(),this._colorMap=this._themeService.getColorTheme().tokenColorMap}));let r=Math.max(1,Math.floor((0,o.fz)().devicePixelRatio));this.pageSize=Math.min(1024*r,this._maxTextureSize),this._initFirstPage(),this._register((0,l.s)(()=>(0,l.AS)(this._pages)))}_initFirstPage(){let e=this._instantiationService.createInstance(v.g,0,this.pageSize,this._allocatorType);this._pages.push(e);let t=new u.O(1,"",1,this._decorationStyleCache);e.getGlyph(t,"",0,0),t.dispose()}clear(){for(let e of this._pages)e.dispose();this._pages.length=0,this._glyphPageIndex.clear(),this._warmedUpRasterizers.clear(),this._warmUpTask.clear(),this._initFirstPage(),this._onDidDeleteGlyphs.fire()}getGlyph(e,t,i,n,s){return i&=-2048,i|=Math.floor(s%1*10),this._warmedUpRasterizers.has(e.id)||(this._warmUpAtlas(e),this._warmedUpRasterizers.add(e.id)),this._tryGetGlyph(this._glyphPageIndex.get(t,i,n,e.cacheKey)??0,e,t,i,n)}_tryGetGlyph(e,t,i,n,s){return this._glyphPageIndex.set(e,i,n,s,t.cacheKey),this._pages[e].getGlyph(t,i,n,s)??(e+1<this._pages.length?this._tryGetGlyph(e+1,t,i,n,s):void 0)??this._getGlyphFromNewPage(t,i,n,s)}_getGlyphFromNewPage(e,t,i,n){if(this._pages.length>=s.maximumPageCount)throw Error(`Attempt to create a texture atlas page past the limit ${s.maximumPageCount}`);return this._pages.push(this._instantiationService.createInstance(v.g,this._pages.length,this.pageSize,this._allocatorType)),this._glyphPageIndex.set(this._pages.length-1,t,i,n,e.cacheKey),this._pages[this._pages.length-1].getGlyph(e,t,i,n)}getStats(){return this._pages.map(e=>e.getStats())}_warmUpAtlas(e){let t=this._colorMap;if(!t)throw new r.D7("Cannot warm atlas without color map");this._warmUpTask.value?.clear();let i=this._warmUpTask.value=this._instantiationService.createInstance(_);for(let n=65;n<=90;n++)for(let s of t.keys())i.enqueue(()=>{for(let t=0;t<1;t+=.1)this.getGlyph(e,String.fromCharCode(n),s<<15&0xff8000,0,t)});for(let n=97;n<=122;n++)for(let s of t.keys())i.enqueue(()=>{for(let t=0;t<1;t+=.1)this.getGlyph(e,String.fromCharCode(n),s<<15&0xff8000,0,t)});for(let n=33;n<=126;n++)for(let s of t.keys())i.enqueue(()=>{for(let t=0;t<1;t+=.1)this.getGlyph(e,String.fromCharCode(n),s<<15&0xff8000,0,t)})}};C=s=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([b(3,c.Gy),b(4,d._Y)],C)},34502:()=>{},34985:(e,t,i)=>{"use strict";i.d(t,{nA:()=>n,qQ:()=>h,uB:()=>l});class n{constructor(e,t,i){this.owner=e,this.debugNameSource=t,this.referenceFn=i}getDebugName(e){return function(e,t){let i=o.get(e);if(i)return i;let n=function(e,t){let i,n=o.get(e);if(n)return n;let s=t.owner?function(e){let t=a.get(e);if(t)return t;let i=l(e)??"Object",n=r.get(i)??0;n++,r.set(i,n);let s=1===n?i:`${i}#${n}`;return a.set(e,s),s}(t.owner)+".":"",d=t.debugNameSource;if(void 0!==d){if("function"!=typeof d)return s+d;else if(void 0!==(i=d()))return s+i}let c=t.referenceFn;if(void 0!==c&&void 0!==(i=h(c)))return s+i;if(void 0!==t.owner){let i=function(e,t){for(let i in e)if(e[i]===t)return i}(t.owner,e);if(void 0!==i)return s+i}}(e,t);if(n){let t=s.get(n)??0;t++,s.set(n,t);let i=1===t?n:`${n}#${t}`;return o.set(e,i),i}}(e,this)}}let s=new Map,o=new WeakMap,r=new Map,a=new WeakMap;function l(e){let t=e.constructor;if(t){if("Object"===t.name)return;return t.name}}function h(e){let t=e.toString(),i=/\/\*\*\s*@description\s*([^*]*)\*\//.exec(t),n=i?i[1]:void 0;return n?.trim()}},34999:()=>{},35023:(e,t,i)=>{"use strict";i.d(t,{P:()=>a,$:()=>l});var n=i(29195);let s=new WeakMap;class o{static getSameOriginWindowChain(e){let t=s.get(e);if(!t){let i;t=[],s.set(e,t);let n=e;do(i=function(e){if(!e.parent||e.parent===e)return null;try{let t=e.location,i=e.parent.location;if("null"!==t.origin&&"null"!==i.origin&&t.origin!==i.origin)return null}catch(e){return null}return e.parent}(n))?t.push({window:new WeakRef(n),iframeElement:n.frameElement||null}):t.push({window:new WeakRef(n),iframeElement:null}),n=i;while(n)}return t.slice(0)}static getPositionOfChildWindowRelativeToAncestorWindow(e,t){if(!t||e===t)return{top:0,left:0};let i=0,n=0;for(let s of this.getSameOriginWindowChain(e)){let e=s.window.deref();if(i+=e?.scrollY??0,n+=e?.scrollX??0,e===t||!s.iframeElement)break;let o=s.iframeElement.getBoundingClientRect();i+=o.top,n+=o.left}return{top:i,left:n}}}var r=i(28669);class a{constructor(e,t){this.timestamp=Date.now(),this.browserEvent=t,this.leftButton=0===t.button,this.middleButton=1===t.button,this.rightButton=2===t.button,this.buttons=t.buttons,this.defaultPrevented=t.defaultPrevented,this.target=t.target,this.detail=t.detail||1,"dblclick"===t.type&&(this.detail=2),this.ctrlKey=t.ctrlKey,this.shiftKey=t.shiftKey,this.altKey=t.altKey,this.metaKey=t.metaKey,"number"==typeof t.pageX?(this.posx=t.pageX,this.posy=t.pageY):(this.posx=t.clientX+this.target.ownerDocument.body.scrollLeft+this.target.ownerDocument.documentElement.scrollLeft,this.posy=t.clientY+this.target.ownerDocument.body.scrollTop+this.target.ownerDocument.documentElement.scrollTop);let i=o.getPositionOfChildWindowRelativeToAncestorWindow(e,t.view);this.posx-=i.left,this.posy-=i.top}preventDefault(){this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent.stopPropagation()}}class l{constructor(e,t=0,i=0){this.browserEvent=e||null,this.target=e?e.target||e.targetNode||e.srcElement:null,this.deltaY=i,this.deltaX=t;let s=!1;if(n.H8){let e=navigator.userAgent.match(/Chrome\/(\d+)/);s=(e?parseInt(e[1]):123)<=122}if(e){let t=e.view?.devicePixelRatio||1;void 0!==e.wheelDeltaY?s?this.deltaY=e.wheelDeltaY/(120*t):this.deltaY=e.wheelDeltaY/120:void 0!==e.VERTICAL_AXIS&&e.axis===e.VERTICAL_AXIS?this.deltaY=-e.detail/3:"wheel"===e.type&&(e.deltaMode===e.DOM_DELTA_LINE?n.gm&&!r.zx?this.deltaY=-e.deltaY/3:this.deltaY=-e.deltaY:this.deltaY=-e.deltaY/40),void 0!==e.wheelDeltaX?n.nr&&r.uF?this.deltaX=-(e.wheelDeltaX/120):s?this.deltaX=e.wheelDeltaX/(120*t):this.deltaX=e.wheelDeltaX/120:void 0!==e.HORIZONTAL_AXIS&&e.axis===e.HORIZONTAL_AXIS?this.deltaX=-e.detail/3:"wheel"===e.type&&(e.deltaMode===e.DOM_DELTA_LINE?n.gm&&!r.zx?this.deltaX=-e.deltaX/3:this.deltaX=-e.deltaX:this.deltaX=-e.deltaX/40),0===this.deltaY&&0===this.deltaX&&e.wheelDelta&&(s?this.deltaY=e.wheelDelta/(120*t):this.deltaY=e.wheelDelta/120)}}preventDefault(){this.browserEvent?.preventDefault()}stopPropagation(){this.browserEvent?.stopPropagation()}}},35844:(e,t,i)=>{"use strict";i.d(t,{h:()=>n});let n=(0,i(22263).u1)("clipboardService")},35882:(e,t,i)=>{"use strict";i.d(t,{W:()=>r,c:()=>o});var n=i(23047),s=i(4091);class o{static fromModelContentChanges(e){return e.map(e=>{let t=n.Q.lift(e.range);return new o((0,s.VL)(t.getStartPosition()),(0,s.VL)(t.getEndPosition()),(0,s.rR)(e.text))}).reverse()}constructor(e,t,i){this.startOffset=e,this.endOffset=t,this.newLength=i}toString(){return`[${(0,s.l4)(this.startOffset)}...${(0,s.l4)(this.endOffset)}) -> ${(0,s.l4)(this.newLength)}`}}class r{constructor(e){this.nextEditIdx=0,this.deltaOldToNewLineCount=0,this.deltaOldToNewColumnCount=0,this.deltaLineIdxInOld=-1,this.edits=e.map(e=>a.from(e))}getOffsetBeforeChange(e){return this.adjustNextEdit(e),this.translateCurToOld(e)}getDistanceToNextChange(e){this.adjustNextEdit(e);let t=this.edits[this.nextEditIdx],i=t?this.translateOldToCur(t.offsetObj):null;return null===i?null:(0,s.MS)(e,i)}translateOldToCur(e){return e.lineCount===this.deltaLineIdxInOld?(0,s.qe)(e.lineCount+this.deltaOldToNewLineCount,e.columnCount+this.deltaOldToNewColumnCount):(0,s.qe)(e.lineCount+this.deltaOldToNewLineCount,e.columnCount)}translateCurToOld(e){let t=(0,s.l4)(e);return t.lineCount-this.deltaOldToNewLineCount===this.deltaLineIdxInOld?(0,s.qe)(t.lineCount-this.deltaOldToNewLineCount,t.columnCount-this.deltaOldToNewColumnCount):(0,s.qe)(t.lineCount-this.deltaOldToNewLineCount,t.columnCount)}adjustNextEdit(e){for(;this.nextEditIdx<this.edits.length;){let t=this.edits[this.nextEditIdx],i=this.translateOldToCur(t.endOffsetAfterObj);if((0,s.vr)(i,e)){this.nextEditIdx++;let e=(0,s.l4)(i),n=(0,s.l4)(this.translateOldToCur(t.endOffsetBeforeObj)),o=e.lineCount-n.lineCount;this.deltaOldToNewLineCount+=o;let r=this.deltaLineIdxInOld===t.endOffsetBeforeObj.lineCount?this.deltaOldToNewColumnCount:0,a=e.columnCount-n.columnCount;this.deltaOldToNewColumnCount=r+a,this.deltaLineIdxInOld=t.endOffsetBeforeObj.lineCount}else break}}}class a{static from(e){return new a(e.startOffset,e.endOffset,e.newLength)}constructor(e,t,i){this.endOffsetBeforeObj=(0,s.l4)(t),this.endOffsetAfterObj=(0,s.l4)((0,s.QB)(e,i)),this.offsetObj=(0,s.l4)(e)}}},36375:(e,t,i)=>{"use strict";i.d(t,{FW:()=>l,Zv:()=>s,dG:()=>r,z5:()=>h});var n=i(6033);function s(e,t){if("number"==typeof e){if(0===e)return null;let i=(65535&e)>>>0,n=(0xffff0000&e)>>>16;return new a(0!==n?[o(i,t),o(n,t)]:[o(i,t)])}{let i=[];for(let n=0;n<e.length;n++)i.push(o(e[n],t));return new a(i)}}function o(e,t){let i=!!(2048&e),n=!!(256&e);return new r(2===t?n:i,!!(1024&e),!!(512&e),2===t?i:n,255&e)}class r{constructor(e,t,i,n,s){this.ctrlKey=e,this.shiftKey=t,this.altKey=i,this.metaKey=n,this.keyCode=s}equals(e){return e instanceof r&&this.ctrlKey===e.ctrlKey&&this.shiftKey===e.shiftKey&&this.altKey===e.altKey&&this.metaKey===e.metaKey&&this.keyCode===e.keyCode}isModifierKey(){return 0===this.keyCode||5===this.keyCode||57===this.keyCode||6===this.keyCode||4===this.keyCode}isDuplicateModifierCase(){return this.ctrlKey&&5===this.keyCode||this.shiftKey&&4===this.keyCode||this.altKey&&6===this.keyCode||this.metaKey&&57===this.keyCode}}class a{constructor(e){if(0===e.length)throw(0,n.Qg)("chords");this.chords=e}}class l{constructor(e,t,i,n,s,o){this.ctrlKey=e,this.shiftKey=t,this.altKey=i,this.metaKey=n,this.keyLabel=s,this.keyAriaLabel=o}}class h{}},36514:()=>{},37111:()=>{},37438:(e,t,i)=>{"use strict";i.d(t,{B:()=>n});var n,s=i(95751);function o(e){return{object:e,dispose:()=>e.destroy()}}!function(e){e.requestDevice=async function(e){try{if(!navigator.gpu)throw Error("This browser does not support WebGPU");let e=await navigator.gpu.requestAdapter();if(!e)throw Error("This browser supports WebGPU but it appears to be disabled");return o(await e.requestDevice())}catch(t){throw e&&e(t.message),t}},e.createBuffer=function(e,t,i){let n=e.createBuffer(t);return i&&e.queue.writeBuffer(n,0,(0,s.Tn)(i)?i():i),o(n)},e.createTexture=function(e,t){return o(e.createTexture(t))}}(n||(n={}))},37958:()=>{},38672:(e,t,i)=>{"use strict";i.d(t,{$z:()=>_,BA:()=>b,DW:()=>v,Hh:()=>c,Qn:()=>C,dO:()=>f,i_:()=>m,nz:()=>d,wt:()=>p});var n=i(87899),s=i(92684),o=i(76144),r=i(35023),a=i(45262),l=i(82102),h=i(77715);class d{constructor(e,t){this.x=e,this.y=t,this._pageCoordinatesBrand=void 0}toClientCoordinates(e){return new c(this.x-e.scrollX,this.y-e.scrollY)}}class c{constructor(e,t){this.clientX=e,this.clientY=t,this._clientCoordinatesBrand=void 0}toPageCoordinates(e){return new d(this.clientX+e.scrollX,this.clientY+e.scrollY)}}class u{constructor(e,t,i,n){this.x=e,this.y=t,this.width=i,this.height=n,this._editorPagePositionBrand=void 0}}class g{constructor(e,t){this.x=e,this.y=t,this._positionRelativeToEditorBrand=void 0}}function p(e){let t=n.BK(e);return new u(t.left,t.top,t.width,t.height)}function m(e,t,i){let n=t.width/e.offsetWidth,s=t.height/e.offsetHeight;return new g((i.x-t.x)/n,(i.y-t.y)/s)}class f extends r.P{constructor(e,t,i){super(n.zk(i),e),this._editorMouseEventBrand=void 0,this.isFromPointerCapture=t,this.pos=new d(this.posx,this.posy),this.editorPos=p(i),this.relativePos=m(i,this.editorPos,this.pos)}}class _{constructor(e){this._editorViewDomNode=e}_create(e){return new f(e,!1,this._editorViewDomNode)}onContextMenu(e,t){return n.ko(e,n.Bx.CONTEXT_MENU,e=>{t(this._create(e))})}onMouseUp(e,t){return n.ko(e,n.Bx.MOUSE_UP,e=>{t(this._create(e))})}onMouseDown(e,t){return n.ko(e,n.Bx.MOUSE_DOWN,e=>{t(this._create(e))})}onPointerDown(e,t){return n.ko(e,n.Bx.POINTER_DOWN,e=>{t(this._create(e),e.pointerId)})}onMouseLeave(e,t){return n.ko(e,n.Bx.MOUSE_LEAVE,e=>{t(this._create(e))})}onMouseMove(e,t){return n.ko(e,n.Bx.MOUSE_MOVE,e=>t(this._create(e)))}}class v{constructor(e){this._editorViewDomNode=e}_create(e){return new f(e,!1,this._editorViewDomNode)}onPointerUp(e,t){return n.ko(e,"pointerup",e=>{t(this._create(e))})}onPointerDown(e,t){return n.ko(e,n.Bx.POINTER_DOWN,e=>{t(this._create(e),e.pointerId)})}onPointerLeave(e,t){return n.ko(e,n.Bx.POINTER_LEAVE,e=>{t(this._create(e))})}onPointerMove(e,t){return n.ko(e,"pointermove",e=>t(this._create(e)))}}class b extends l.jG{constructor(e){super(),this._editorViewDomNode=e,this._globalPointerMoveMonitor=this._register(new o._),this._keydownListener=null}startMonitoring(e,t,i,s,o){this._keydownListener=n.un(e.ownerDocument,"keydown",e=>{e.toKeyCodeChord().isModifierKey()||this._globalPointerMoveMonitor.stopMonitoring(!0,e.browserEvent)},!0),this._globalPointerMoveMonitor.startMonitoring(e,t,i,e=>{s(new f(e,!0,this._editorViewDomNode))},e=>{this._keydownListener.dispose(),o(e)})}stopMonitoring(){this._globalPointerMoveMonitor.stopMonitoring(!0)}}class C{static{this._idPool=0}constructor(e){this._editor=e,this._instanceId=++C._idPool,this._counter=0,this._rules=new l.$w,this._garbageCollectionScheduler=new a.uC(()=>this.garbageCollect(),1e3)}dispose(){this._rules.dispose(),this._garbageCollectionScheduler.dispose()}createClassNameRef(e){let t=this.getOrCreateRule(e);return t.increaseRefCount(),{className:t.className,dispose:()=>{t.decreaseRefCount(),this._garbageCollectionScheduler.schedule()}}}getOrCreateRule(e){let t=this.computeUniqueKey(e),i=this._rules.get(t);if(!i){let s=this._counter++;i=new w(t,`dyn-rule-${this._instanceId}-${s}`,n.Cl(this._editor.getContainerDomNode())?this._editor.getContainerDomNode():void 0,e),this._rules.set(t,i)}return i}computeUniqueKey(e){return JSON.stringify(e)}garbageCollect(){for(let e of this._rules.values())e.hasReferences()||this._rules.deleteAndDispose(e.key)}}class w{constructor(e,t,i,n){this.key=e,this.className=t,this.properties=n,this._referenceCount=0,this._styleElementDisposables=new l.Cm,this._styleElement=s.li(i,void 0,this._styleElementDisposables),this._styleElement.textContent=this.getCssText(this.className,this.properties)}getCssText(e,t){let i=`.${e} {`;for(let e in t){let n,s=t[e];n="object"==typeof s?(0,h.GuP)(s.id):s;let o=e.replace(/(^[A-Z])/,([e])=>e.toLowerCase()).replace(/([A-Z])/g,([e])=>`-${e.toLowerCase()}`);i+=`
|
|
534
534
|
${o}: ${n};`}return i+`
|
|
535
535
|
}`}dispose(){this._styleElementDisposables.dispose(),this._styleElement=void 0}increaseRefCount(){this._referenceCount++}decreaseRefCount(){this._referenceCount--}hasReferences(){return this._referenceCount>0}}},38736:()=>{},39066:()=>{},39182:()=>{},39205:(e,t,i)=>{"use strict";i.d(t,{HJ:()=>d,LN:()=>a,YH:()=>h,ih:()=>c,rc:()=>r,wv:()=>l});var n=i(17354),s=i(82102),o=i(15957);class r extends s.jG{get onDidChange(){return this._onDidChange.event}constructor(e,t="",i="",s=!0,o){super(),this._onDidChange=this._register(new n.vl),this._enabled=!0,this._id=e,this._label=t,this._cssClass=i,this._enabled=s,this._actionCallback=o}get id(){return this._id}get label(){return this._label}set label(e){this._setLabel(e)}_setLabel(e){this._label!==e&&(this._label=e,this._onDidChange.fire({label:e}))}get tooltip(){return this._tooltip||""}set tooltip(e){this._setTooltip(e)}_setTooltip(e){this._tooltip!==e&&(this._tooltip=e,this._onDidChange.fire({tooltip:e}))}get class(){return this._cssClass}set class(e){this._setClass(e)}_setClass(e){this._cssClass!==e&&(this._cssClass=e,this._onDidChange.fire({class:e}))}get enabled(){return this._enabled}set enabled(e){this._setEnabled(e)}_setEnabled(e){this._enabled!==e&&(this._enabled=e,this._onDidChange.fire({enabled:e}))}get checked(){return this._checked}set checked(e){this._setChecked(e)}_setChecked(e){this._checked!==e&&(this._checked=e,this._onDidChange.fire({checked:e}))}async run(e,t){this._actionCallback&&await this._actionCallback(e)}}class a extends s.jG{constructor(){super(...arguments),this._onWillRun=this._register(new n.vl),this._onDidRun=this._register(new n.vl)}get onWillRun(){return this._onWillRun.event}get onDidRun(){return this._onDidRun.event}async run(e,t){let i;if(e.enabled){this._onWillRun.fire({action:e});try{await this.runAction(e,t)}catch(e){i=e}this._onDidRun.fire({action:e,error:i})}}async runAction(e,t){await e.run(t)}}class l{constructor(){this.id=l.ID,this.label="",this.tooltip="",this.class="separator",this.enabled=!1,this.checked=!1}static join(...e){let t=[];for(let i of e)i.length&&(t=t.length?[...t,new l,...i]:i);return t}static{this.ID="vs.actions.separator"}async run(){}}class h{get actions(){return this._actions}constructor(e,t,i,n){this.tooltip="",this.enabled=!0,this.checked=void 0,this.id=e,this.label=t,this.class=n,this._actions=i}async run(){}}class d extends r{static{this.ID="vs.actions.empty"}constructor(){super(d.ID,o.kg(28,"(empty)"),void 0,!1)}}function c(e){return{id:e.id,label:e.label,tooltip:e.tooltip??e.label,class:e.class,enabled:e.enabled??!0,checked:e.checked,run:async(...t)=>e.run(...t)}}},39495:(e,t,i)=>{"use strict";i.d(t,{q:()=>s});class n{constructor(){this._nativeEditContextMapping=new Map}register(e,t){return this._nativeEditContextMapping.set(e,t),{dispose:()=>{this._nativeEditContextMapping.delete(e)}}}get(e){return this._nativeEditContextMapping.get(e)}}let s=new n},39783:(e,t,i)=>{"use strict";i.d(t,{d:()=>l,w:()=>h});var n=i(17354),s=i(88608),o=i(82102),r=i(76883),a=i(95751);let l=(0,i(22263).u1)("commandService"),h=new class{constructor(){this._commands=new Map,this._onDidRegisterCommand=new n.vl,this.onDidRegisterCommand=this._onDidRegisterCommand.event}registerCommand(e,t){if(!e)throw Error("invalid command");if("string"==typeof e){if(!t)throw Error("invalid command");return this.registerCommand({id:e,handler:t})}if(e.metadata&&Array.isArray(e.metadata.args)){let t=[];for(let i of e.metadata.args)t.push(i.constraint);let i=e.handler;e.handler=function(e,...n){return(0,a.jx)(n,t),i(e,...n)}}let{id:i}=e,n=this._commands.get(i);n||(n=new r.w,this._commands.set(i,n));let s=n.unshift(e),l=(0,o.s)(()=>{s();let e=this._commands.get(i);e?.isEmpty()&&this._commands.delete(i)});return this._onDidRegisterCommand.fire(i),(0,o.lC)(l)}registerCommandAlias(e,t){return h.registerCommand(e,(e,...i)=>e.get(l).executeCommand(t,...i))}getCommand(e){let t=this._commands.get(e);if(!(!t||t.isEmpty()))return s.f.first(t)}getCommands(){let e=new Map;for(let t of this._commands.keys()){let i=this.getCommand(t);i&&e.set(t,i)}return e}};h.registerCommand("noop",()=>{})},39819:()=>{},39856:(e,t,i)=>{"use strict";i.d(t,{n:()=>n,r:()=>s});class n{constructor(e){this._prefix=e,this._lastId=0}nextId(){return this._prefix+ ++this._lastId}}let s=new n("id#")},40023:(e,t,i)=>{"use strict";var n,s;function o(e){return e===n.HIGH_CONTRAST_DARK||e===n.HIGH_CONTRAST_LIGHT}function r(e){return e===n.DARK||e===n.HIGH_CONTRAST_DARK}i.d(t,{Bb:()=>o,HD:()=>r,X2:()=>s,zM:()=>n}),function(e){e.DARK="dark",e.LIGHT="light",e.HIGH_CONTRAST_DARK="hcDark",e.HIGH_CONTRAST_LIGHT="hcLight"}(n||(n={})),function(e){e.VS="vs",e.VS_DARK="vs-dark",e.HC_BLACK="hc-black",e.HC_LIGHT="hc-light"}(s||(s={}))},40111:()=>{},40232:(e,t,i)=>{"use strict";i.d(t,{M:()=>r});var n=i(5488),s=i(35882),o=i(4091);function r(e,t){if(0===e.length)return t;if(0===t.length)return e;let i=new n.j3(l(e)),r=l(t);r.push({modified:!1,lengthBefore:void 0,lengthAfter:void 0});let h=i.dequeue(),d=[];function c(e,t,i){if(d.length>0&&(0,o.wP)(d[d.length-1].endOffset,e)){let e=d[d.length-1];d[d.length-1]=new s.c(e.startOffset,t,(0,o.QB)(e.newLength,i))}else d.push({startOffset:e,endOffset:t,newLength:i})}let u=o.Vp;for(let e of r){let t=function(e){if(void 0===e){let e=i.takeWhile(e=>!0)||[];return h&&e.unshift(h),e}let t=[];for(;h&&!(0,o.Vh)(e);){let[n,s]=h.splitAt(e);t.push(n),e=(0,o.MS)(n.lengthAfter,e),h=s??i.dequeue()}return(0,o.Vh)(e)||t.push(new a(!1,e,e)),t}(e.lengthBefore);if(e.modified){let i=(0,o.pW)(t,e=>e.lengthBefore),n=(0,o.QB)(u,i);c(u,n,e.lengthAfter),u=n}else for(let e of t){let t=u;u=(0,o.QB)(u,e.lengthBefore),e.modified&&c(t,u,e.lengthAfter)}}return d}class a{constructor(e,t,i){this.modified=e,this.lengthBefore=t,this.lengthAfter=i}splitAt(e){let t=(0,o.MS)(e,this.lengthAfter);return(0,o.wP)(t,o.Vp)?[this,void 0]:this.modified?[new a(this.modified,this.lengthBefore,e),new a(this.modified,o.Vp,t)]:[new a(this.modified,e,e),new a(this.modified,t,t)]}toString(){return`${this.modified?"M":"U"}:${(0,o.l4)(this.lengthBefore)} -> ${(0,o.l4)(this.lengthAfter)}`}}function l(e){let t=[],i=o.Vp;for(let n of e){let e=(0,o.MS)(i,n.startOffset);(0,o.Vh)(e)||t.push(new a(!1,e,e));let s=(0,o.MS)(n.startOffset,n.endOffset);t.push(new a(!0,s,n.newLength)),i=n.endOffset}return t}},40391:(e,t,i)=>{"use strict";i.d(t,{k:()=>s,o:()=>o});var n=i(23047);class s{constructor(e,t,i){this.range=e,this.inlineClassName=t,this.type=i}}class o{constructor(e,t,i,n){this.startOffset=e,this.endOffset=t,this.inlineClassName=i,this.inlineClassNameAffectsLetterSpacing=n}toInlineDecoration(e){return new s(new n.Q(e,this.startOffset+1,e,this.endOffset+1),this.inlineClassName,3*!!this.inlineClassNameAffectsLetterSpacing)}}},40466:(e,t,i)=>{"use strict";i.d(t,{u:()=>n});let n=(0,i(22263).u1)("ILanguageFeaturesService")},41227:(e,t,i)=>{"use strict";i.d(t,{AI:()=>o,Kz:()=>a,Ot:()=>r});var n=i(5785),s=i(22263),o=n.A;let r=(0,s.u1)("notificationService");class a{}},41327:(e,t,i)=>{"use strict";i.d(t,{D8:()=>f,L:()=>y,Xe:()=>w,ZG:()=>b,ez:()=>_,i1:()=>m,is:()=>p,nI:()=>C,ug:()=>S});var n,s=i(39205),o=i(17354),r=i(82102),a=i(76883),l=i(27281),h=i(39783),d=i(8820),c=i(22263),u=i(18983),g=function(e,t){return function(i,n){t(i,n,e)}};function p(e){return void 0!==e.command}function m(e){return void 0!==e.submenu}class f{static{this._instances=new Map}static{this.CommandPalette=new f("CommandPalette")}static{this.DebugBreakpointsContext=new f("DebugBreakpointsContext")}static{this.DebugCallStackContext=new f("DebugCallStackContext")}static{this.DebugConsoleContext=new f("DebugConsoleContext")}static{this.DebugVariablesContext=new f("DebugVariablesContext")}static{this.NotebookVariablesContext=new f("NotebookVariablesContext")}static{this.DebugHoverContext=new f("DebugHoverContext")}static{this.DebugWatchContext=new f("DebugWatchContext")}static{this.DebugToolBar=new f("DebugToolBar")}static{this.DebugToolBarStop=new f("DebugToolBarStop")}static{this.DebugDisassemblyContext=new f("DebugDisassemblyContext")}static{this.DebugCallStackToolbar=new f("DebugCallStackToolbar")}static{this.DebugCreateConfiguration=new f("DebugCreateConfiguration")}static{this.EditorContext=new f("EditorContext")}static{this.SimpleEditorContext=new f("SimpleEditorContext")}static{this.EditorContent=new f("EditorContent")}static{this.EditorLineNumberContext=new f("EditorLineNumberContext")}static{this.EditorContextCopy=new f("EditorContextCopy")}static{this.EditorContextPeek=new f("EditorContextPeek")}static{this.EditorContextShare=new f("EditorContextShare")}static{this.EditorTitle=new f("EditorTitle")}static{this.CompactWindowEditorTitle=new f("CompactWindowEditorTitle")}static{this.EditorTitleRun=new f("EditorTitleRun")}static{this.EditorTitleContext=new f("EditorTitleContext")}static{this.EditorTitleContextShare=new f("EditorTitleContextShare")}static{this.EmptyEditorGroup=new f("EmptyEditorGroup")}static{this.EmptyEditorGroupContext=new f("EmptyEditorGroupContext")}static{this.EditorTabsBarContext=new f("EditorTabsBarContext")}static{this.EditorTabsBarShowTabsSubmenu=new f("EditorTabsBarShowTabsSubmenu")}static{this.EditorTabsBarShowTabsZenModeSubmenu=new f("EditorTabsBarShowTabsZenModeSubmenu")}static{this.EditorActionsPositionSubmenu=new f("EditorActionsPositionSubmenu")}static{this.EditorSplitMoveSubmenu=new f("EditorSplitMoveSubmenu")}static{this.ExplorerContext=new f("ExplorerContext")}static{this.ExplorerContextShare=new f("ExplorerContextShare")}static{this.ExtensionContext=new f("ExtensionContext")}static{this.ExtensionEditorContextMenu=new f("ExtensionEditorContextMenu")}static{this.GlobalActivity=new f("GlobalActivity")}static{this.CommandCenter=new f("CommandCenter")}static{this.CommandCenterCenter=new f("CommandCenterCenter")}static{this.LayoutControlMenuSubmenu=new f("LayoutControlMenuSubmenu")}static{this.LayoutControlMenu=new f("LayoutControlMenu")}static{this.MenubarMainMenu=new f("MenubarMainMenu")}static{this.MenubarAppearanceMenu=new f("MenubarAppearanceMenu")}static{this.MenubarDebugMenu=new f("MenubarDebugMenu")}static{this.MenubarEditMenu=new f("MenubarEditMenu")}static{this.MenubarCopy=new f("MenubarCopy")}static{this.MenubarFileMenu=new f("MenubarFileMenu")}static{this.MenubarGoMenu=new f("MenubarGoMenu")}static{this.MenubarHelpMenu=new f("MenubarHelpMenu")}static{this.MenubarLayoutMenu=new f("MenubarLayoutMenu")}static{this.MenubarNewBreakpointMenu=new f("MenubarNewBreakpointMenu")}static{this.PanelAlignmentMenu=new f("PanelAlignmentMenu")}static{this.PanelPositionMenu=new f("PanelPositionMenu")}static{this.ActivityBarPositionMenu=new f("ActivityBarPositionMenu")}static{this.MenubarPreferencesMenu=new f("MenubarPreferencesMenu")}static{this.MenubarRecentMenu=new f("MenubarRecentMenu")}static{this.MenubarSelectionMenu=new f("MenubarSelectionMenu")}static{this.MenubarShare=new f("MenubarShare")}static{this.MenubarSwitchEditorMenu=new f("MenubarSwitchEditorMenu")}static{this.MenubarSwitchGroupMenu=new f("MenubarSwitchGroupMenu")}static{this.MenubarTerminalMenu=new f("MenubarTerminalMenu")}static{this.MenubarTerminalSuggestStatusMenu=new f("MenubarTerminalSuggestStatusMenu")}static{this.MenubarViewMenu=new f("MenubarViewMenu")}static{this.MenubarHomeMenu=new f("MenubarHomeMenu")}static{this.OpenEditorsContext=new f("OpenEditorsContext")}static{this.OpenEditorsContextShare=new f("OpenEditorsContextShare")}static{this.ProblemsPanelContext=new f("ProblemsPanelContext")}static{this.SCMInputBox=new f("SCMInputBox")}static{this.SCMChangeContext=new f("SCMChangeContext")}static{this.SCMResourceContext=new f("SCMResourceContext")}static{this.SCMResourceContextShare=new f("SCMResourceContextShare")}static{this.SCMResourceFolderContext=new f("SCMResourceFolderContext")}static{this.SCMResourceGroupContext=new f("SCMResourceGroupContext")}static{this.SCMSourceControl=new f("SCMSourceControl")}static{this.SCMSourceControlInline=new f("SCMSourceControlInline")}static{this.SCMSourceControlTitle=new f("SCMSourceControlTitle")}static{this.SCMHistoryTitle=new f("SCMHistoryTitle")}static{this.SCMHistoryItemContext=new f("SCMHistoryItemContext")}static{this.SCMHistoryItemChangeContext=new f("SCMHistoryItemChangeContext")}static{this.SCMHistoryItemHover=new f("SCMHistoryItemHover")}static{this.SCMHistoryItemRefContext=new f("SCMHistoryItemRefContext")}static{this.SCMQuickDiffDecorations=new f("SCMQuickDiffDecorations")}static{this.SCMTitle=new f("SCMTitle")}static{this.SearchContext=new f("SearchContext")}static{this.SearchActionMenu=new f("SearchActionContext")}static{this.StatusBarWindowIndicatorMenu=new f("StatusBarWindowIndicatorMenu")}static{this.StatusBarRemoteIndicatorMenu=new f("StatusBarRemoteIndicatorMenu")}static{this.StickyScrollContext=new f("StickyScrollContext")}static{this.TestItem=new f("TestItem")}static{this.TestItemGutter=new f("TestItemGutter")}static{this.TestProfilesContext=new f("TestProfilesContext")}static{this.TestMessageContext=new f("TestMessageContext")}static{this.TestMessageContent=new f("TestMessageContent")}static{this.TestPeekElement=new f("TestPeekElement")}static{this.TestPeekTitle=new f("TestPeekTitle")}static{this.TestCallStack=new f("TestCallStack")}static{this.TestCoverageFilterItem=new f("TestCoverageFilterItem")}static{this.TouchBarContext=new f("TouchBarContext")}static{this.TitleBar=new f("TitleBar")}static{this.TitleBarContext=new f("TitleBarContext")}static{this.TitleBarTitleContext=new f("TitleBarTitleContext")}static{this.TunnelContext=new f("TunnelContext")}static{this.TunnelPrivacy=new f("TunnelPrivacy")}static{this.TunnelProtocol=new f("TunnelProtocol")}static{this.TunnelPortInline=new f("TunnelInline")}static{this.TunnelTitle=new f("TunnelTitle")}static{this.TunnelLocalAddressInline=new f("TunnelLocalAddressInline")}static{this.TunnelOriginInline=new f("TunnelOriginInline")}static{this.ViewItemContext=new f("ViewItemContext")}static{this.ViewContainerTitle=new f("ViewContainerTitle")}static{this.ViewContainerTitleContext=new f("ViewContainerTitleContext")}static{this.ViewTitle=new f("ViewTitle")}static{this.ViewTitleContext=new f("ViewTitleContext")}static{this.CommentEditorActions=new f("CommentEditorActions")}static{this.CommentThreadTitle=new f("CommentThreadTitle")}static{this.CommentThreadActions=new f("CommentThreadActions")}static{this.CommentThreadAdditionalActions=new f("CommentThreadAdditionalActions")}static{this.CommentThreadTitleContext=new f("CommentThreadTitleContext")}static{this.CommentThreadCommentContext=new f("CommentThreadCommentContext")}static{this.CommentTitle=new f("CommentTitle")}static{this.CommentActions=new f("CommentActions")}static{this.CommentsViewThreadActions=new f("CommentsViewThreadActions")}static{this.InteractiveToolbar=new f("InteractiveToolbar")}static{this.InteractiveCellTitle=new f("InteractiveCellTitle")}static{this.InteractiveCellDelete=new f("InteractiveCellDelete")}static{this.InteractiveCellExecute=new f("InteractiveCellExecute")}static{this.InteractiveInputExecute=new f("InteractiveInputExecute")}static{this.InteractiveInputConfig=new f("InteractiveInputConfig")}static{this.ReplInputExecute=new f("ReplInputExecute")}static{this.IssueReporter=new f("IssueReporter")}static{this.NotebookToolbar=new f("NotebookToolbar")}static{this.NotebookToolbarContext=new f("NotebookToolbarContext")}static{this.NotebookStickyScrollContext=new f("NotebookStickyScrollContext")}static{this.NotebookCellTitle=new f("NotebookCellTitle")}static{this.NotebookCellDelete=new f("NotebookCellDelete")}static{this.NotebookCellInsert=new f("NotebookCellInsert")}static{this.NotebookCellBetween=new f("NotebookCellBetween")}static{this.NotebookCellListTop=new f("NotebookCellTop")}static{this.NotebookCellExecute=new f("NotebookCellExecute")}static{this.NotebookCellExecuteGoTo=new f("NotebookCellExecuteGoTo")}static{this.NotebookCellExecutePrimary=new f("NotebookCellExecutePrimary")}static{this.NotebookDiffCellInputTitle=new f("NotebookDiffCellInputTitle")}static{this.NotebookDiffDocumentMetadata=new f("NotebookDiffDocumentMetadata")}static{this.NotebookDiffCellMetadataTitle=new f("NotebookDiffCellMetadataTitle")}static{this.NotebookDiffCellOutputsTitle=new f("NotebookDiffCellOutputsTitle")}static{this.NotebookOutputToolbar=new f("NotebookOutputToolbar")}static{this.NotebookOutlineFilter=new f("NotebookOutlineFilter")}static{this.NotebookOutlineActionMenu=new f("NotebookOutlineActionMenu")}static{this.NotebookEditorLayoutConfigure=new f("NotebookEditorLayoutConfigure")}static{this.NotebookKernelSource=new f("NotebookKernelSource")}static{this.BulkEditTitle=new f("BulkEditTitle")}static{this.BulkEditContext=new f("BulkEditContext")}static{this.TimelineItemContext=new f("TimelineItemContext")}static{this.TimelineTitle=new f("TimelineTitle")}static{this.TimelineTitleContext=new f("TimelineTitleContext")}static{this.TimelineFilterSubMenu=new f("TimelineFilterSubMenu")}static{this.AccountsContext=new f("AccountsContext")}static{this.SidebarTitle=new f("SidebarTitle")}static{this.PanelTitle=new f("PanelTitle")}static{this.AuxiliaryBarTitle=new f("AuxiliaryBarTitle")}static{this.TerminalInstanceContext=new f("TerminalInstanceContext")}static{this.TerminalEditorInstanceContext=new f("TerminalEditorInstanceContext")}static{this.TerminalNewDropdownContext=new f("TerminalNewDropdownContext")}static{this.TerminalTabContext=new f("TerminalTabContext")}static{this.TerminalTabEmptyAreaContext=new f("TerminalTabEmptyAreaContext")}static{this.TerminalStickyScrollContext=new f("TerminalStickyScrollContext")}static{this.WebviewContext=new f("WebviewContext")}static{this.InlineCompletionsActions=new f("InlineCompletionsActions")}static{this.InlineEditsActions=new f("InlineEditsActions")}static{this.NewFile=new f("NewFile")}static{this.MergeInput1Toolbar=new f("MergeToolbar1Toolbar")}static{this.MergeInput2Toolbar=new f("MergeToolbar2Toolbar")}static{this.MergeBaseToolbar=new f("MergeBaseToolbar")}static{this.MergeInputResultToolbar=new f("MergeToolbarResultToolbar")}static{this.InlineSuggestionToolbar=new f("InlineSuggestionToolbar")}static{this.InlineEditToolbar=new f("InlineEditToolbar")}static{this.ChatContext=new f("ChatContext")}static{this.ChatCodeBlock=new f("ChatCodeblock")}static{this.ChatCompareBlock=new f("ChatCompareBlock")}static{this.ChatMessageTitle=new f("ChatMessageTitle")}static{this.ChatHistory=new f("ChatHistory")}static{this.ChatWelcomeHistoryContext=new f("ChatWelcomeHistoryContext")}static{this.ChatMessageFooter=new f("ChatMessageFooter")}static{this.ChatExecute=new f("ChatExecute")}static{this.ChatExecuteSecondary=new f("ChatExecuteSecondary")}static{this.ChatInput=new f("ChatInput")}static{this.ChatInputSide=new f("ChatInputSide")}static{this.ChatModePicker=new f("ChatModePicker")}static{this.ChatEditingWidgetToolbar=new f("ChatEditingWidgetToolbar")}static{this.ChatEditingEditorContent=new f("ChatEditingEditorContent")}static{this.ChatEditingEditorHunk=new f("ChatEditingEditorHunk")}static{this.ChatEditingDeletedNotebookCell=new f("ChatEditingDeletedNotebookCell")}static{this.ChatInputAttachmentToolbar=new f("ChatInputAttachmentToolbar")}static{this.ChatEditingWidgetModifiedFilesToolbar=new f("ChatEditingWidgetModifiedFilesToolbar")}static{this.ChatInputResourceAttachmentContext=new f("ChatInputResourceAttachmentContext")}static{this.ChatInputSymbolAttachmentContext=new f("ChatInputSymbolAttachmentContext")}static{this.ChatInlineResourceAnchorContext=new f("ChatInlineResourceAnchorContext")}static{this.ChatInlineSymbolAnchorContext=new f("ChatInlineSymbolAnchorContext")}static{this.ChatMessageCheckpoint=new f("ChatMessageCheckpoint")}static{this.ChatMessageRestoreCheckpoint=new f("ChatMessageRestoreCheckpoint")}static{this.ChatEditingCodeBlockContext=new f("ChatEditingCodeBlockContext")}static{this.ChatTitleBarMenu=new f("ChatTitleBarMenu")}static{this.ChatAttachmentsContext=new f("ChatAttachmentsContext")}static{this.ChatToolOutputResourceToolbar=new f("ChatToolOutputResourceToolbar")}static{this.ChatTextEditorMenu=new f("ChatTextEditorMenu")}static{this.ChatToolOutputResourceContext=new f("ChatToolOutputResourceContext")}static{this.ChatMultiDiffContext=new f("ChatMultiDiffContext")}static{this.ChatSessionsMenu=new f("ChatSessionsMenu")}static{this.ChatConfirmationMenu=new f("ChatConfirmationMenu")}static{this.AccessibleView=new f("AccessibleView")}static{this.MultiDiffEditorFileToolbar=new f("MultiDiffEditorFileToolbar")}static{this.DiffEditorHunkToolbar=new f("DiffEditorHunkToolbar")}static{this.DiffEditorSelectionToolbar=new f("DiffEditorSelectionToolbar")}constructor(e){if(f._instances.has(e))throw TypeError(`MenuId with identifier '${e}' already exists. Use MenuId.for(ident) or a unique identifier`);f._instances.set(e,this),this.id=e}}let _=(0,c.u1)("menuService");class v{static{this._all=new Map}static for(e){let t=this._all.get(e);return t||(t=new v(e),this._all.set(e,t)),t}static merge(e){let t=new Set;for(let i of e)i instanceof v&&t.add(i.id);return t}constructor(e){this.id=e,this.has=t=>t===e}}let b=new class{constructor(){this._commands=new Map,this._menuItems=new Map,this._onDidChangeMenu=new o.QT({merge:v.merge}),this.onDidChangeMenu=this._onDidChangeMenu.event}addCommand(e){return this._commands.set(e.id,e),this._onDidChangeMenu.fire(v.for(f.CommandPalette)),(0,r.lC)((0,r.s)(()=>{this._commands.delete(e.id)&&this._onDidChangeMenu.fire(v.for(f.CommandPalette))}))}getCommand(e){return this._commands.get(e)}getCommands(){let e=new Map;return this._commands.forEach((t,i)=>e.set(i,t)),e}appendMenuItem(e,t){let i=this._menuItems.get(e);i||(i=new a.w,this._menuItems.set(e,i));let n=i.push(t);return this._onDidChangeMenu.fire(v.for(e)),(0,r.lC)((0,r.s)(()=>{n(),this._onDidChangeMenu.fire(v.for(e))}))}appendMenuItems(e){let t=new r.Cm;for(let{id:i,item:n}of e)t.add(this.appendMenuItem(i,n));return t}getMenuItems(e){let t;return t=this._menuItems.has(e)?[...this._menuItems.get(e)]:[],e===f.CommandPalette&&this._appendImplicitItems(t),t}_appendImplicitItems(e){let t=new Set;for(let i of e)p(i)&&(t.add(i.command.id),i.alt&&t.add(i.alt.id));this._commands.forEach((i,n)=>{t.has(n)||e.push({command:i})})}};class C extends s.YH{constructor(e,t,i){super(`submenuitem.${e.submenu.id}`,"string"==typeof e.title?e.title:e.title.value,i,"submenu"),this.item=e,this.hideActions=t}}let w=n=class{static label(e,t){return t?.renderShortTitle&&e.shortTitle?"string"==typeof e.shortTitle?e.shortTitle:e.shortTitle.value:"string"==typeof e.title?e.title:e.title.value}constructor(e,t,i,s,o,r,a){let h;if(this.hideActions=s,this.menuKeybinding=o,this._commandService=a,this.id=e.id,this.label=n.label(e,i),this.tooltip=("string"==typeof e.tooltip?e.tooltip:e.tooltip?.value)??"",this.enabled=!e.precondition||r.contextMatchesRules(e.precondition),this.checked=void 0,e.toggled){let t=e.toggled.condition?e.toggled:{condition:e.toggled};this.checked=r.contextMatchesRules(t.condition),this.checked&&t.tooltip&&(this.tooltip="string"==typeof t.tooltip?t.tooltip:t.tooltip.value),this.checked&&l.L.isThemeIcon(t.icon)&&(h=t.icon),this.checked&&t.title&&(this.label="string"==typeof t.title?t.title:t.title.value)}h||(h=l.L.isThemeIcon(e.icon)?e.icon:void 0),this.item=e,this.alt=t?new n(t,void 0,i,s,void 0,r,a):void 0,this._options=i,this.class=h&&l.L.asClassName(h)}run(...e){let t=[];return this._options?.arg&&(t=[...t,this._options.arg]),this._options?.shouldForwardArgs&&(t=[...t,...e]),this._commandService.executeCommand(this.id,...t)}};w=n=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([g(5,d.fN),g(6,h.d)],w);class y{constructor(e){this.desc=e}}function S(e){let t=[],i=new e,{f1:n,menu:s,keybinding:o,...a}=i.desc;if(h.w.getCommand(a.id))throw Error(`Cannot register two commands with the same id: ${a.id}`);if(t.push(h.w.registerCommand({id:a.id,handler:(e,...t)=>i.run(e,...t),metadata:a.metadata??{description:i.desc.title}})),Array.isArray(s))for(let e of s)t.push(b.appendMenuItem(e.id,{command:{...a,precondition:null===e.precondition?void 0:a.precondition},...e}));else s&&t.push(b.appendMenuItem(s.id,{command:{...a,precondition:null===s.precondition?void 0:a.precondition},...s}));if(n&&(t.push(b.appendMenuItem(f.CommandPalette,{command:a,when:a.precondition})),t.push(b.addCommand(a))),Array.isArray(o))for(let e of o)t.push(u.f.registerKeybindingRule({...e,id:a.id,when:a.precondition?d.M$.and(a.precondition,e.when):e.when}));else o&&t.push(u.f.registerKeybindingRule({...o,id:a.id,when:a.precondition?d.M$.and(a.precondition,o.when):o.when}));return{dispose(){(0,r.AS)(t)}}}},41556:(e,t,i)=>{"use strict";i.d(t,{c7:()=>d,aQ:()=>c,RT:()=>u});var n=i(55532),s=i(71819),o=i(6033);class r{constructor(e){this.replacements=e;let t=-1;for(let i of e){if(!(i.replaceRange.start>=t))throw new o.D7(`Edits must be disjoint and sorted. Found ${i} after ${t}`);t=i.replaceRange.endExclusive}}toString(){let e=this.replacements.map(e=>e.toString()).join(", ");return`[${e}]`}normalize(){let e,t=[];for(let i of this.replacements)if(0!==i.getNewLength()||0!==i.replaceRange.length){if(e&&e.replaceRange.endExclusive===i.replaceRange.start){let t=e.tryJoinTouching(i);if(t){e=t;continue}}e&&t.push(e),e=i}return e&&t.push(e),this._createNew(t)}compose(e){let t=this.normalize(),i=e.normalize();if(t.isEmpty())return i;if(i.isEmpty())return t;let n=[...t.replacements],r=[],a=0;for(let e of i.replacements){let t,i;for(;;){let t=n[0];if(!t||t.replaceRange.start+a+t.getNewLength()>=e.replaceRange.start)break;n.shift(),r.push(t),a+=t.getNewLength()-t.replaceRange.length}let l=a;for(;;){let s=n[0];if(!s||s.replaceRange.start+a>e.replaceRange.endExclusive)break;t||(t=s),i=s,n.shift(),a+=s.getNewLength()-s.replaceRange.length}if(t){let h=Math.min(t.replaceRange.start,e.replaceRange.start-l),d=e.replaceRange.start-(t.replaceRange.start+l);if(d>0){let e=t.slice(s.L.emptyAt(h),new s.L(0,d));r.push(e)}if(!i)throw new o.D7("Invariant violation: lastIntersecting is undefined");let c=i.replaceRange.endExclusive+a-e.replaceRange.endExclusive;if(c>0){let e=i.slice(s.L.ofStartAndLength(i.replaceRange.endExclusive,0),new s.L(i.getNewLength()-c,i.getNewLength()));n.unshift(e),a-=e.getNewLength()-e.replaceRange.length}let u=new s.L(h,e.replaceRange.endExclusive-a),g=e.slice(u,new s.L(0,e.getNewLength()));r.push(g)}else r.push(e.delta(-a))}for(;;){let e=n.shift();if(!e)break;r.push(e)}return this._createNew(r).normalize()}getNewRanges(){let e=[],t=0;for(let i of this.replacements)e.push(s.L.ofStartAndLength(i.replaceRange.start+t,i.getNewLength())),t+=i.getLengthDelta();return e}isEmpty(){return 0===this.replacements.length}}class a{constructor(e){this.replaceRange=e}delta(e){return this.slice(this.replaceRange.delta(e),new s.L(0,this.getNewLength()))}getLengthDelta(){return this.getNewLength()-this.replaceRange.length}toString(){return`{ ${this.replaceRange.toString()} -> ${this.getNewLength()} }`}get isEmpty(){return 0===this.getNewLength()&&0===this.replaceRange.length}getRangeAfterReplace(){return new s.L(this.replaceRange.start,this.replaceRange.start+this.getNewLength())}}class l extends r{apply(e){let t=[],i=0;for(let n of this.replacements)t.push(e.substring(i,n.replaceRange.start)),t.push(n.newText),i=n.replaceRange.endExclusive;return t.push(e.substring(i)),t.join("")}}class h extends a{constructor(e,t){super(e),this.newText=t}getNewLength(){return this.newText.length}toString(){return`${this.replaceRange} -> ${JSON.stringify(this.newText)}`}replace(e){return e.substring(0,this.replaceRange.start)+this.newText+e.substring(this.replaceRange.endExclusive)}removeCommonSuffixPrefix(e){let t=e.substring(this.replaceRange.start,this.replaceRange.endExclusive),i=(0,n.Qp)(t,this.newText),o=Math.min(t.length-i,this.newText.length-i,(0,n.Vi)(t,this.newText));return new c(new s.L(this.replaceRange.start+i,this.replaceRange.endExclusive-o),this.newText.substring(i,this.newText.length-o))}removeCommonSuffixAndPrefix(e){return this.removeCommonSuffix(e).removeCommonPrefix(e)}removeCommonPrefix(e){let t=this.replaceRange.substring(e),i=(0,n.Qp)(t,this.newText);return 0===i?this:this.slice(this.replaceRange.deltaStart(i),new s.L(i,this.newText.length))}removeCommonSuffix(e){let t=this.replaceRange.substring(e),i=(0,n.Vi)(t,this.newText);return 0===i?this:this.slice(this.replaceRange.deltaEnd(-i),new s.L(0,this.newText.length-i))}toJson(){return{txt:this.newText,pos:this.replaceRange.start,len:this.replaceRange.length}}}class d extends l{static{this.empty=new d([])}static compose(e){if(0===e.length)return d.empty;let t=e[0];for(let i=1;i<e.length;i++)t=t.compose(e[i]);return t}constructor(e){super(e)}_createNew(e){return new d(e)}}class c extends h{static insert(e,t){return new c(s.L.emptyAt(e),t)}static replace(e,t){return new c(e,t)}equals(e){return this.replaceRange.equals(e.replaceRange)&&this.newText===e.newText}tryJoinTouching(e){return new c(this.replaceRange.joinRightTouching(e.replaceRange),this.newText+e.newText)}slice(e,t){return new c(e,t?t.substring(this.newText):this.newText)}}function u(e,t){e=e.slice();let i=[],n=0;for(let s of t.replacements){for(;;){let t=e[0];if(!t||t.endExclusive>=s.replaceRange.start)break;e.shift(),i.push(t.delta(n))}let t=[];for(;;){let i=e[0];if(!i||!i.intersectsOrTouches(s.replaceRange))break;e.shift(),t.push(i)}for(let i=t.length-1;i>=0;i--){let n=t[i],o=n.intersect(s.replaceRange).length,r=(n=n.deltaEnd(-o+(0===i?s.newText.length:0))).start-s.replaceRange.start;r>0&&(n=n.delta(-r)),0!==i&&(n=n.delta(s.newText.length)),n=n.delta(-(s.newText.length-s.replaceRange.length)),e.unshift(n)}n+=s.newText.length-s.replaceRange.length}for(;;){let t=e[0];if(!t)break;e.shift(),i.push(t.delta(n))}return i}},41659:(e,t,i)=>{"use strict";i.d(t,{s:()=>u}),i(4322);var n=i(87899),s=i(98437),o=i(4699),r=i(82102),a=i(6230),l=i(99323),h=i(85350),d=i(73970);class c{constructor(e){this._element=e}get element(){return this._element}set textContent(e){this.disposed||e===this._textContent||(this._textContent=e,this._element.textContent=e)}set classNames(e){this.disposed||(0,a.aI)(e,this._classNames)||(this._classNames=e,this._element.classList.value="",this._element.classList.add(...e))}set empty(e){this.disposed||e===this._empty||(this._empty=e,this._element.style.marginLeft=e?"0":"")}dispose(){this.disposed=!0}}class u extends r.jG{constructor(e,t){super(),this.customHovers=new Map,this.creationOptions=t,this.domNode=this._register(new c(n.BC(e,n.$(".monaco-icon-label")))),this.labelContainer=n.BC(this.domNode.element,n.$(".monaco-icon-label-container")),this.nameContainer=n.BC(this.labelContainer,n.$("span.monaco-icon-name-container")),t?.supportHighlights||t?.supportIcons?this.nameNode=this._register(new p(this.nameContainer,!!t.supportIcons)):this.nameNode=new g(this.nameContainer),this.hoverDelegate=t?.hoverDelegate??(0,h.nZ)("mouse")}get element(){return this.domNode.element}setLabel(e,t,i){let r=["monaco-icon-label"],a=["monaco-icon-label-container"],l="";i&&(i.extraClasses&&r.push(...i.extraClasses),i.italic&&r.push("italic"),i.strikethrough&&r.push("strikethrough"),i.disabledCommand&&a.push("disabled"),i.title&&("string"==typeof i.title?l+=i.title:l+=e));let h=this.domNode.element.querySelector(".monaco-icon-label-iconpath");if(i?.iconPath){let e;h&&n.sb(h)?e=h:(e=n.$(".monaco-icon-label-iconpath"),this.domNode.element.prepend(e)),e.style.backgroundImage=s.Tf(i?.iconPath),e.style.backgroundRepeat="no-repeat",e.style.backgroundPosition="center",e.style.backgroundSize="contain"}else h&&h.remove();if(this.domNode.classNames=r,this.domNode.element.setAttribute("aria-label",l),this.labelContainer.classList.value="",this.labelContainer.classList.add(...a),this.setupHover(i?.descriptionTitle?this.labelContainer:this.element,i?.title),this.nameNode.setLabel(e,i),t||this.descriptionNode){let e=this.getOrCreateDescriptionNode();e instanceof o._?(e.set(t||"",i?i.descriptionMatches:void 0,void 0,i?.labelEscapeNewLines),this.setupHover(e.element,i?.descriptionTitle)):(e.textContent=t&&i?.labelEscapeNewLines?o._.escapeNewLines(t,[]):t||"",this.setupHover(e.element,i?.descriptionTitle||""),e.empty=!t)}(i?.suffix||this.suffixNode)&&(this.getOrCreateSuffixNode().textContent=i?.suffix??"")}setupHover(e,t){let i=this.customHovers.get(e);if(i&&(i.dispose(),this.customHovers.delete(e)),!t)return void e.removeAttribute("title");let s=e;if(this.creationOptions?.hoverTargetOverride){if(!n.QX(e,this.creationOptions.hoverTargetOverride))throw Error("hoverTargetOverrride must be an ancestor of the htmlElement");s=this.creationOptions.hoverTargetOverride}let o=(0,d.i)().setupManagedHover(this.hoverDelegate,s,t);o&&this.customHovers.set(e,o)}dispose(){for(let e of(super.dispose(),this.customHovers.values()))e.dispose();this.customHovers.clear()}getOrCreateSuffixNode(){if(!this.suffixNode){let e=this._register(new c(n.Pl(this.nameContainer,n.$("span.monaco-icon-suffix-container"))));this.suffixNode=this._register(new c(n.BC(e.element,n.$("span.label-suffix"))))}return this.suffixNode}getOrCreateDescriptionNode(){if(!this.descriptionNode){let e=this._register(new c(n.BC(this.labelContainer,n.$("span.monaco-icon-description-container"))));this.creationOptions?.supportDescriptionHighlights?this.descriptionNode=this._register(new o._(n.BC(e.element,n.$("span.label-description")),{supportIcons:!!this.creationOptions.supportIcons})):this.descriptionNode=this._register(new c(n.BC(e.element,n.$("span.label-description"))))}return this.descriptionNode}}class g{constructor(e){this.container=e,this.label=void 0,this.singleLabel=void 0}setLabel(e,t){if(!(this.label===e&&(0,a.aI)(this.options,t)))if(this.label=e,this.options=t,"string"==typeof e)this.singleLabel||(this.container.textContent="",this.container.classList.remove("multiple"),this.singleLabel=n.BC(this.container,n.$("a.label-name",{id:t?.domId}))),this.singleLabel.textContent=e;else{this.container.textContent="",this.container.classList.add("multiple"),this.singleLabel=void 0;for(let i=0;i<e.length;i++){let s=e[i],o=t?.domId&&`${t?.domId}_${i}`;n.BC(this.container,n.$("a.label-name",{id:o,"data-icon-label-count":e.length,"data-icon-label-index":i,role:"treeitem"},s)),i<e.length-1&&n.BC(this.container,n.$("span.label-separator",void 0,t?.separator||"/"))}}}}class p extends r.jG{constructor(e,t){super(),this.container=e,this.supportIcons=t,this.label=void 0,this.singleLabel=void 0}setLabel(e,t){if(!(this.label===e&&(0,a.aI)(this.options,t)))if(this.label=e,this.options=t,"string"==typeof e)this.singleLabel||(this.container.textContent="",this.container.classList.remove("multiple"),this.singleLabel=this._register(new o._(n.BC(this.container,n.$("a.label-name",{id:t?.domId})),{supportIcons:this.supportIcons}))),this.singleLabel.set(e,t?.matches,void 0,t?.labelEscapeNewLines);else{this.container.textContent="",this.container.classList.add("multiple"),this.singleLabel=void 0;let i=t?.separator||"/",s=function(e,t,i){if(!i)return;let n=0;return e.map(e=>{let s={start:n,end:n+e.length},o=i.map(e=>l.Q.intersect(s,e)).filter(e=>!l.Q.isEmpty(e)).map(({start:e,end:t})=>({start:e-n,end:t-n}));return n=s.end+t.length,o})}(e,i,t?.matches);for(let r=0;r<e.length;r++){let a=e[r],l=s?s[r]:void 0,h=t?.domId&&`${t?.domId}_${r}`,d=n.$("a.label-name",{id:h,"data-icon-label-count":e.length,"data-icon-label-index":r,role:"treeitem"});this._register(new o._(n.BC(this.container,d),{supportIcons:this.supportIcons})).set(a,l,void 0,t?.labelEscapeNewLines),r<e.length-1&&n.BC(d,n.$("span.label-separator",void 0,i))}}}}},41667:()=>{},41890:()=>{},41983:()=>{},42016:(e,t,i)=>{"use strict";i.d(t,{n:()=>r,s:()=>a});var n=i(87899),s=i(27281);let o=RegExp(`(\\\\)?\\$\\((${s.L.iconNameExpression}(?:${s.L.iconModifierExpression})?)\\)`,"g");function r(e){let t,i=[],n=0,s=0;for(;null!==(t=o.exec(e));){n<(s=t.index||0)&&i.push(e.substring(n,s)),n=(t.index||0)+t[0].length;let[,o,r]=t;i.push(o?`$(${r})`:a({id:r}))}return n<e.length&&i.push(e.substring(n)),i}function a(e){let t=n.$("span");return t.classList.add(...s.L.asClassNameArray(e)),t}},42345:()=>{},42506:(e,t,i)=>{"use strict";i.d(t,{R:()=>n});var n,s=i(15957),o=i(8820);!function(e){e.editorSimpleInput=new o.N1("editorSimpleInput",!1,!0),e.editorTextFocus=new o.N1("editorTextFocus",!1,s.kg(678,"Whether the editor text has focus (cursor is blinking)")),e.focus=new o.N1("editorFocus",!1,s.kg(679,"Whether the editor or an editor widget has focus (e.g. focus is in the find widget)")),e.textInputFocus=new o.N1("textInputFocus",!1,s.kg(680,"Whether an editor or a rich text input has focus (cursor is blinking)")),e.readOnly=new o.N1("editorReadonly",!1,s.kg(681,"Whether the editor is read-only")),e.inDiffEditor=new o.N1("inDiffEditor",!1,s.kg(682,"Whether the context is a diff editor")),e.isEmbeddedDiffEditor=new o.N1("isEmbeddedDiffEditor",!1,s.kg(683,"Whether the context is an embedded diff editor")),e.multiDiffEditorAllCollapsed=new o.N1("multiDiffEditorAllCollapsed",void 0,s.kg(684,"Whether all files in multi diff editor are collapsed")),e.hasChanges=new o.N1("diffEditorHasChanges",!1,s.kg(685,"Whether the diff editor has changes")),e.comparingMovedCode=new o.N1("comparingMovedCode",!1,s.kg(686,"Whether a moved code block is selected for comparison")),e.accessibleDiffViewerVisible=new o.N1("accessibleDiffViewerVisible",!1,s.kg(687,"Whether the accessible diff viewer is visible")),e.diffEditorRenderSideBySideInlineBreakpointReached=new o.N1("diffEditorRenderSideBySideInlineBreakpointReached",!1,s.kg(688,"Whether the diff editor render side by side inline breakpoint is reached")),e.diffEditorInlineMode=new o.N1("diffEditorInlineMode",!1,s.kg(689,"Whether inline mode is active")),e.diffEditorOriginalWritable=new o.N1("diffEditorOriginalWritable",!1,s.kg(690,"Whether modified is writable in the diff editor")),e.diffEditorModifiedWritable=new o.N1("diffEditorModifiedWritable",!1,s.kg(691,"Whether modified is writable in the diff editor")),e.diffEditorOriginalUri=new o.N1("diffEditorOriginalUri","",s.kg(692,"The uri of the original document")),e.diffEditorModifiedUri=new o.N1("diffEditorModifiedUri","",s.kg(693,"The uri of the modified document")),e.columnSelection=new o.N1("editorColumnSelection",!1,s.kg(694,"Whether `editor.columnSelection` is enabled")),e.writable=e.readOnly.toNegated(),e.hasNonEmptySelection=new o.N1("editorHasSelection",!1,s.kg(695,"Whether the editor has text selected")),e.hasOnlyEmptySelection=e.hasNonEmptySelection.toNegated(),e.hasMultipleSelections=new o.N1("editorHasMultipleSelections",!1,s.kg(696,"Whether the editor has multiple selections")),e.hasSingleSelection=e.hasMultipleSelections.toNegated(),e.tabMovesFocus=new o.N1("editorTabMovesFocus",!1,s.kg(697,"Whether `Tab` will move focus out of the editor")),e.tabDoesNotMoveFocus=e.tabMovesFocus.toNegated(),e.isInEmbeddedEditor=new o.N1("isInEmbeddedEditor",!1,!0),e.canUndo=new o.N1("canUndo",!1,!0),e.canRedo=new o.N1("canRedo",!1,!0),e.hoverVisible=new o.N1("editorHoverVisible",!1,s.kg(698,"Whether the editor hover is visible")),e.hoverFocused=new o.N1("editorHoverFocused",!1,s.kg(699,"Whether the editor hover is focused")),e.stickyScrollFocused=new o.N1("stickyScrollFocused",!1,s.kg(700,"Whether the sticky scroll is focused")),e.stickyScrollVisible=new o.N1("stickyScrollVisible",!1,s.kg(701,"Whether the sticky scroll is visible")),e.standaloneColorPickerVisible=new o.N1("standaloneColorPickerVisible",!1,s.kg(702,"Whether the standalone color picker is visible")),e.standaloneColorPickerFocused=new o.N1("standaloneColorPickerFocused",!1,s.kg(703,"Whether the standalone color picker is focused")),e.inCompositeEditor=new o.N1("inCompositeEditor",void 0,s.kg(704,"Whether the editor is part of a larger editor (e.g. notebooks)")),e.notInCompositeEditor=e.inCompositeEditor.toNegated(),e.languageId=new o.N1("editorLangId","",s.kg(705,"The language identifier of the editor")),e.hasCompletionItemProvider=new o.N1("editorHasCompletionItemProvider",!1,s.kg(706,"Whether the editor has a completion item provider")),e.hasCodeActionsProvider=new o.N1("editorHasCodeActionsProvider",!1,s.kg(707,"Whether the editor has a code actions provider")),e.hasCodeLensProvider=new o.N1("editorHasCodeLensProvider",!1,s.kg(708,"Whether the editor has a code lens provider")),e.hasDefinitionProvider=new o.N1("editorHasDefinitionProvider",!1,s.kg(709,"Whether the editor has a definition provider")),e.hasDeclarationProvider=new o.N1("editorHasDeclarationProvider",!1,s.kg(710,"Whether the editor has a declaration provider")),e.hasImplementationProvider=new o.N1("editorHasImplementationProvider",!1,s.kg(711,"Whether the editor has an implementation provider")),e.hasTypeDefinitionProvider=new o.N1("editorHasTypeDefinitionProvider",!1,s.kg(712,"Whether the editor has a type definition provider")),e.hasHoverProvider=new o.N1("editorHasHoverProvider",!1,s.kg(713,"Whether the editor has a hover provider")),e.hasDocumentHighlightProvider=new o.N1("editorHasDocumentHighlightProvider",!1,s.kg(714,"Whether the editor has a document highlight provider")),e.hasDocumentSymbolProvider=new o.N1("editorHasDocumentSymbolProvider",!1,s.kg(715,"Whether the editor has a document symbol provider")),e.hasReferenceProvider=new o.N1("editorHasReferenceProvider",!1,s.kg(716,"Whether the editor has a reference provider")),e.hasRenameProvider=new o.N1("editorHasRenameProvider",!1,s.kg(717,"Whether the editor has a rename provider")),e.hasSignatureHelpProvider=new o.N1("editorHasSignatureHelpProvider",!1,s.kg(718,"Whether the editor has a signature help provider")),e.hasInlayHintsProvider=new o.N1("editorHasInlayHintsProvider",!1,s.kg(719,"Whether the editor has an inline hints provider")),e.hasDocumentFormattingProvider=new o.N1("editorHasDocumentFormattingProvider",!1,s.kg(720,"Whether the editor has a document formatting provider")),e.hasDocumentSelectionFormattingProvider=new o.N1("editorHasDocumentSelectionFormattingProvider",!1,s.kg(721,"Whether the editor has a document selection formatting provider")),e.hasMultipleDocumentFormattingProvider=new o.N1("editorHasMultipleDocumentFormattingProvider",!1,s.kg(722,"Whether the editor has multiple document formatting providers")),e.hasMultipleDocumentSelectionFormattingProvider=new o.N1("editorHasMultipleDocumentSelectionFormattingProvider",!1,s.kg(723,"Whether the editor has multiple document selection formatting providers"))}(n||(n={}))},42650:()=>{},42975:()=>{},43219:()=>{},43537:(e,t,i)=>{"use strict";i.d(t,{A3:()=>I,AQ:()=>z,Am:()=>L,As:()=>E,BD:()=>ee,Bo:()=>X,CM:()=>k,D0:()=>h,Ek:()=>F,H0:()=>x,I2:()=>Z,IW:()=>et,If:()=>J,JB:()=>T,L0:()=>p,Mf:()=>l,P1:()=>er,Pe:()=>es,Qt:()=>f,WD:()=>eo,WS:()=>en,WY:()=>ea,Xr:()=>P,aZ:()=>V,bB:()=>ei,hz:()=>w,ik:()=>R,je:()=>u,kG:()=>a,kM:()=>d,l5:()=>K,lQ:()=>j,n4:()=>Y,ob:()=>C,ow:()=>y,s7:()=>Q,sC:()=>c,sH:()=>G,sN:()=>U,ss:()=>$,tK:()=>D,tp:()=>N,vP:()=>S,vV:()=>b,vp:()=>W,w4:()=>m,we:()=>g,x9:()=>O,yI:()=>H,yw:()=>A,zp:()=>q});var n=i(15957),s=i(78713),o=i(77715),r=i(88298);let a=(0,o.x1A)("editor.lineHighlightBackground",null,n.kg(607,"Background color for the highlight of line at the cursor position.")),l=(0,o.x1A)("editor.lineHighlightBorder",{dark:"#282828",light:"#eeeeee",hcDark:"#f38518",hcLight:o.b1q},n.kg(608,"Background color for the border around the line at the cursor position."));(0,o.x1A)("editor.rangeHighlightBackground",{dark:"#ffffff0b",light:"#fdff0033",hcDark:null,hcLight:null},n.kg(609,"Background color of highlighted ranges, like by quick open and find features. The color must not be opaque so as not to hide underlying decorations."),!0),(0,o.x1A)("editor.rangeHighlightBorder",{dark:null,light:null,hcDark:o.buw,hcLight:o.buw},n.kg(610,"Background color of the border around highlighted ranges.")),(0,o.x1A)("editor.symbolHighlightBackground",{dark:o.Ubg,light:o.Ubg,hcDark:null,hcLight:null},n.kg(611,"Background color of highlighted symbol, like for go to definition or go next/previous symbol. The color must not be opaque so as not to hide underlying decorations."),!0),(0,o.x1A)("editor.symbolHighlightBorder",{dark:null,light:null,hcDark:o.buw,hcLight:o.buw},n.kg(612,"Background color of the border around highlighted symbols."));let h=(0,o.x1A)("editorCursor.foreground",{dark:"#AEAFAD",light:s.Q1.black,hcDark:s.Q1.white,hcLight:"#0F4A85"},n.kg(613,"Color of the editor cursor.")),d=(0,o.x1A)("editorCursor.background",null,n.kg(614,"The background color of the editor cursor. Allows customizing the color of a character overlapped by a block cursor.")),c=(0,o.x1A)("editorMultiCursor.primary.foreground",h,n.kg(615,"Color of the primary editor cursor when multiple cursors are present.")),u=(0,o.x1A)("editorMultiCursor.primary.background",d,n.kg(616,"The background color of the primary editor cursor when multiple cursors are present. Allows customizing the color of a character overlapped by a block cursor.")),g=(0,o.x1A)("editorMultiCursor.secondary.foreground",h,n.kg(617,"Color of secondary editor cursors when multiple cursors are present.")),p=(0,o.x1A)("editorMultiCursor.secondary.background",d,n.kg(618,"The background color of secondary editor cursors when multiple cursors are present. Allows customizing the color of a character overlapped by a block cursor.")),m=(0,o.x1A)("editorWhitespace.foreground",{dark:"#e3e4e229",light:"#33333333",hcDark:"#e3e4e229",hcLight:"#CCCCCC"},n.kg(619,"Color of whitespace characters in the editor.")),f=(0,o.x1A)("editorLineNumber.foreground",{dark:"#858585",light:"#237893",hcDark:s.Q1.white,hcLight:"#292929"},n.kg(620,"Color of editor line numbers.")),_=(0,o.x1A)("editorIndentGuide.background",m,n.kg(621,"Color of the editor indentation guides."),!1,n.kg(622,"'editorIndentGuide.background' is deprecated. Use 'editorIndentGuide.background1' instead.")),v=(0,o.x1A)("editorIndentGuide.activeBackground",m,n.kg(623,"Color of the active editor indentation guides."),!1,n.kg(624,"'editorIndentGuide.activeBackground' is deprecated. Use 'editorIndentGuide.activeBackground1' instead.")),b=(0,o.x1A)("editorIndentGuide.background1",_,n.kg(625,"Color of the editor indentation guides (1).")),C=(0,o.x1A)("editorIndentGuide.background2","#00000000",n.kg(626,"Color of the editor indentation guides (2).")),w=(0,o.x1A)("editorIndentGuide.background3","#00000000",n.kg(627,"Color of the editor indentation guides (3).")),y=(0,o.x1A)("editorIndentGuide.background4","#00000000",n.kg(628,"Color of the editor indentation guides (4).")),S=(0,o.x1A)("editorIndentGuide.background5","#00000000",n.kg(629,"Color of the editor indentation guides (5).")),k=(0,o.x1A)("editorIndentGuide.background6","#00000000",n.kg(630,"Color of the editor indentation guides (6).")),x=(0,o.x1A)("editorIndentGuide.activeBackground1",v,n.kg(631,"Color of the active editor indentation guides (1).")),L=(0,o.x1A)("editorIndentGuide.activeBackground2","#00000000",n.kg(632,"Color of the active editor indentation guides (2).")),D=(0,o.x1A)("editorIndentGuide.activeBackground3","#00000000",n.kg(633,"Color of the active editor indentation guides (3).")),I=(0,o.x1A)("editorIndentGuide.activeBackground4","#00000000",n.kg(634,"Color of the active editor indentation guides (4).")),N=(0,o.x1A)("editorIndentGuide.activeBackground5","#00000000",n.kg(635,"Color of the active editor indentation guides (5).")),E=(0,o.x1A)("editorIndentGuide.activeBackground6","#00000000",n.kg(636,"Color of the active editor indentation guides (6).")),M=(0,o.x1A)("editorActiveLineNumber.foreground",{dark:"#c6c6c6",light:"#0B216F",hcDark:o.buw,hcLight:o.buw},n.kg(637,"Color of editor active line number"),!1,n.kg(638,"Id is deprecated. Use 'editorLineNumber.activeForeground' instead."));(0,o.x1A)("editorLineNumber.activeForeground",M,n.kg(639,"Color of editor active line number"));let T=(0,o.x1A)("editorLineNumber.dimmedForeground",null,n.kg(640,"Color of the final editor line when editor.renderFinalNewline is set to dimmed.")),R=(0,o.x1A)("editorRuler.foreground",{dark:"#5A5A5A",light:s.Q1.lightgrey,hcDark:s.Q1.white,hcLight:"#292929"},n.kg(641,"Color of the editor rulers."));(0,o.x1A)("editorCodeLens.foreground",{dark:"#999999",light:"#919191",hcDark:"#999999",hcLight:"#292929"},n.kg(642,"Foreground color of editor CodeLens")),(0,o.x1A)("editorBracketMatch.background",{dark:"#0064001a",light:"#0064001a",hcDark:"#0064001a",hcLight:"#0000"},n.kg(643,"Background color behind matching brackets")),(0,o.x1A)("editorBracketMatch.border",{dark:"#888",light:"#B9B9B9",hcDark:o.b1q,hcLight:o.b1q},n.kg(644,"Color for matching brackets boxes"));let O=(0,o.x1A)("editorOverviewRuler.border",{dark:"#7f7f7f4d",light:"#7f7f7f4d",hcDark:"#7f7f7f4d",hcLight:"#666666"},n.kg(645,"Color of the overview ruler border.")),P=(0,o.x1A)("editorOverviewRuler.background",null,n.kg(646,"Background color of the editor overview ruler."));(0,o.x1A)("editorGutter.background",o.YtV,n.kg(647,"Background color of the editor gutter. The gutter contains the glyph margins and the line numbers.")),(0,o.x1A)("editorUnnecessaryCode.border",{dark:null,light:null,hcDark:s.Q1.fromHex("#fff").transparent(.8),hcLight:o.b1q},n.kg(648,"Border color of unnecessary (unused) source code in the editor."));let A=(0,o.x1A)("editorUnnecessaryCode.opacity",{dark:s.Q1.fromHex("#000a"),light:s.Q1.fromHex("#0007"),hcDark:null,hcLight:null},n.kg(649,"Opacity of unnecessary (unused) source code in the editor. For example, \"#000000c0\" will render the code with 75% opacity. For high contrast themes, use the 'editorUnnecessaryCode.border' theme color to underline unnecessary code instead of fading it out."));(0,o.x1A)("editorGhostText.border",{dark:null,light:null,hcDark:s.Q1.fromHex("#fff").transparent(.8),hcLight:s.Q1.fromHex("#292929").transparent(.8)},n.kg(650,"Border color of ghost text in the editor."));let F=(0,o.x1A)("editorGhostText.foreground",{dark:s.Q1.fromHex("#ffffff56"),light:s.Q1.fromHex("#0007"),hcDark:null,hcLight:null},n.kg(651,"Foreground color of the ghost text in the editor."));(0,o.x1A)("editorGhostText.background",null,n.kg(652,"Background color of the ghost text in the editor."));let B=new s.Q1(new s.bU(0,122,204,.6)),W=(0,o.x1A)("editorOverviewRuler.rangeHighlightForeground",B,n.kg(653,"Overview ruler marker color for range highlights. The color must not be opaque so as not to hide underlying decorations."),!0),H=(0,o.x1A)("editorOverviewRuler.errorForeground",{dark:new s.Q1(new s.bU(255,18,18,.7)),light:new s.Q1(new s.bU(255,18,18,.7)),hcDark:new s.Q1(new s.bU(255,50,50,1)),hcLight:"#B5200D"},n.kg(654,"Overview ruler marker color for errors.")),V=(0,o.x1A)("editorOverviewRuler.warningForeground",{dark:o.Hng,light:o.Hng,hcDark:o.Stt,hcLight:o.Stt},n.kg(655,"Overview ruler marker color for warnings.")),z=(0,o.x1A)("editorOverviewRuler.infoForeground",{dark:o.pOz,light:o.pOz,hcDark:o.IIb,hcLight:o.IIb},n.kg(656,"Overview ruler marker color for infos.")),U=(0,o.x1A)("editorBracketHighlight.foreground1",{dark:"#FFD700",light:"#0431FAFF",hcDark:"#FFD700",hcLight:"#0431FAFF"},n.kg(657,"Foreground color of brackets (1). Requires enabling bracket pair colorization.")),j=(0,o.x1A)("editorBracketHighlight.foreground2",{dark:"#DA70D6",light:"#319331FF",hcDark:"#DA70D6",hcLight:"#319331FF"},n.kg(658,"Foreground color of brackets (2). Requires enabling bracket pair colorization.")),$=(0,o.x1A)("editorBracketHighlight.foreground3",{dark:"#179FFF",light:"#7B3814FF",hcDark:"#87CEFA",hcLight:"#7B3814FF"},n.kg(659,"Foreground color of brackets (3). Requires enabling bracket pair colorization.")),K=(0,o.x1A)("editorBracketHighlight.foreground4","#00000000",n.kg(660,"Foreground color of brackets (4). Requires enabling bracket pair colorization.")),G=(0,o.x1A)("editorBracketHighlight.foreground5","#00000000",n.kg(661,"Foreground color of brackets (5). Requires enabling bracket pair colorization.")),q=(0,o.x1A)("editorBracketHighlight.foreground6","#00000000",n.kg(662,"Foreground color of brackets (6). Requires enabling bracket pair colorization.")),Q=(0,o.x1A)("editorBracketHighlight.unexpectedBracket.foreground",{dark:new s.Q1(new s.bU(255,18,18,.8)),light:new s.Q1(new s.bU(255,18,18,.8)),hcDark:new s.Q1(new s.bU(255,50,50,1)),hcLight:"#B5200D"},n.kg(663,"Foreground color of unexpected brackets.")),Y=(0,o.x1A)("editorBracketPairGuide.background1","#00000000",n.kg(664,"Background color of inactive bracket pair guides (1). Requires enabling bracket pair guides.")),Z=(0,o.x1A)("editorBracketPairGuide.background2","#00000000",n.kg(665,"Background color of inactive bracket pair guides (2). Requires enabling bracket pair guides.")),X=(0,o.x1A)("editorBracketPairGuide.background3","#00000000",n.kg(666,"Background color of inactive bracket pair guides (3). Requires enabling bracket pair guides.")),J=(0,o.x1A)("editorBracketPairGuide.background4","#00000000",n.kg(667,"Background color of inactive bracket pair guides (4). Requires enabling bracket pair guides.")),ee=(0,o.x1A)("editorBracketPairGuide.background5","#00000000",n.kg(668,"Background color of inactive bracket pair guides (5). Requires enabling bracket pair guides.")),et=(0,o.x1A)("editorBracketPairGuide.background6","#00000000",n.kg(669,"Background color of inactive bracket pair guides (6). Requires enabling bracket pair guides.")),ei=(0,o.x1A)("editorBracketPairGuide.activeBackground1","#00000000",n.kg(670,"Background color of active bracket pair guides (1). Requires enabling bracket pair guides.")),en=(0,o.x1A)("editorBracketPairGuide.activeBackground2","#00000000",n.kg(671,"Background color of active bracket pair guides (2). Requires enabling bracket pair guides.")),es=(0,o.x1A)("editorBracketPairGuide.activeBackground3","#00000000",n.kg(672,"Background color of active bracket pair guides (3). Requires enabling bracket pair guides.")),eo=(0,o.x1A)("editorBracketPairGuide.activeBackground4","#00000000",n.kg(673,"Background color of active bracket pair guides (4). Requires enabling bracket pair guides.")),er=(0,o.x1A)("editorBracketPairGuide.activeBackground5","#00000000",n.kg(674,"Background color of active bracket pair guides (5). Requires enabling bracket pair guides.")),ea=(0,o.x1A)("editorBracketPairGuide.activeBackground6","#00000000",n.kg(675,"Background color of active bracket pair guides (6). Requires enabling bracket pair guides."));(0,o.x1A)("editorUnicodeHighlight.border",o.Hng,n.kg(676,"Border color used to highlight unicode characters.")),(0,o.x1A)("editorUnicodeHighlight.background",o.whs,n.kg(677,"Background color used to highlight unicode characters.")),(0,r.zy)((e,t)=>{let i=e.getColor(o.YtV),n=e.getColor(a),s=n&&!n.isTransparent()?n:i;s&&t.addRule(`.monaco-editor .inputarea.ime-input { background-color: ${s}; }`)})},43934:(e,t,i)=>{"use strict";i.d(t,{RK:()=>d,tQ:()=>c});var n=i(45262),s=i(82102),o=i(55296),r=i(72553),a=i(23047),l=i(95934),h=i(1653);class d extends s.jG{constructor(e,t,i=!1){if(super(),this._syncedModels=Object.create(null),this._syncedModelsLastUsedTime=Object.create(null),this._proxy=e,this._modelService=t,!i){let e=new n.vb;e.cancelAndSet(()=>this._checkStopModelSync(),Math.round(3e4)),this._register(e)}}dispose(){for(let e in this._syncedModels)(0,s.AS)(this._syncedModels[e]);this._syncedModels=Object.create(null),this._syncedModelsLastUsedTime=Object.create(null),super.dispose()}ensureSyncedResources(e,t=!1){for(let i of e){let e=i.toString();this._syncedModels[e]||this._beginModelSync(i,t),this._syncedModels[e]&&(this._syncedModelsLastUsedTime[e]=new Date().getTime())}}_checkStopModelSync(){let e=new Date().getTime(),t=[];for(let i in this._syncedModelsLastUsedTime)e-this._syncedModelsLastUsedTime[i]>6e4&&t.push(i);for(let e of t)this._stopModelSync(e)}_beginModelSync(e,t){let i=this._modelService.getModel(e);if(!i||!t&&i.isTooLargeForSyncing())return;let n=e.toString();this._proxy.$acceptNewModel({url:i.uri.toString(),lines:i.getLinesContent(),EOL:i.getEOL(),versionId:i.getVersionId()});let o=new s.Cm;o.add(i.onDidChangeContent(e=>{this._proxy.$acceptModelChanged(n.toString(),e)})),o.add(i.onWillDispose(()=>{this._stopModelSync(n)})),o.add((0,s.s)(()=>{this._proxy.$acceptRemovedModel(n)})),this._syncedModels[n]=o}_stopModelSync(e){let t=this._syncedModels[e];delete this._syncedModels[e],delete this._syncedModelsLastUsedTime[e],(0,s.AS)(t)}}class c{constructor(){this._models=Object.create(null)}getModel(e){return this._models[e]}getModels(){let e=[];return Object.keys(this._models).forEach(t=>e.push(this._models[t])),e}$acceptNewModel(e){this._models[e.url]=new u(o.r.parse(e.url),e.lines,e.EOL,e.versionId)}$acceptModelChanged(e,t){this._models[e]&&this._models[e].onEvents(t)}$acceptRemovedModel(e){this._models[e]&&delete this._models[e]}}class u extends h.Y{get uri(){return this._uri}get eol(){return this._eol}getValue(){return this.getText()}findMatches(e){let t=[];for(let i=0;i<this._lines.length;i++){let n=this._lines[i],s=this.offsetAt(new r.y(i+1,1));for(let i of n.matchAll(e))(i.index||0===i.index)&&(i.index=i.index+s),t.push(i)}return t}getLinesContent(){return this._lines.slice(0)}getLineCount(){return this._lines.length}getLineContent(e){return this._lines[e-1]}getWordAtPosition(e,t){let i=(0,l.Th)(e.column,(0,l.Io)(t),this._lines[e.lineNumber-1],0);return i?new a.Q(e.lineNumber,i.startColumn,e.lineNumber,i.endColumn):null}words(e){let t=this._lines,i=this._wordenize.bind(this),n=0,s="",o=0,r=[];return{*[Symbol.iterator](){for(;;)if(o<r.length){let e=s.substring(r[o].start,r[o].end);o+=1,yield e}else if(n<t.length)r=i(s=t[n],e),o=0,n+=1;else break}}}getLineWords(e,t){let i=this._lines[e-1],n=this._wordenize(i,t),s=[];for(let e of n)s.push({word:i.substring(e.start,e.end),startColumn:e.start+1,endColumn:e.end+1});return s}_wordenize(e,t){let i,n=[];for(t.lastIndex=0;(i=t.exec(e))&&0!==i[0].length;)n.push({start:i.index,end:i.index+i[0].length});return n}getValueInRange(e){if((e=this._validateRange(e)).startLineNumber===e.endLineNumber)return this._lines[e.startLineNumber-1].substring(e.startColumn-1,e.endColumn-1);let t=this._eol,i=e.startLineNumber-1,n=e.endLineNumber-1,s=[];s.push(this._lines[i].substring(e.startColumn-1));for(let e=i+1;e<n;e++)s.push(this._lines[e]);return s.push(this._lines[n].substring(0,e.endColumn-1)),s.join(t)}offsetAt(e){return e=this._validatePosition(e),this._ensureLineStarts(),this._lineStarts.getPrefixSum(e.lineNumber-2)+(e.column-1)}positionAt(e){e=Math.max(0,e=Math.floor(e)),this._ensureLineStarts();let t=this._lineStarts.getIndexOf(e),i=this._lines[t.index].length;return{lineNumber:1+t.index,column:1+Math.min(t.remainder,i)}}_validateRange(e){let t=this._validatePosition({lineNumber:e.startLineNumber,column:e.startColumn}),i=this._validatePosition({lineNumber:e.endLineNumber,column:e.endColumn});return t.lineNumber!==e.startLineNumber||t.column!==e.startColumn||i.lineNumber!==e.endLineNumber||i.column!==e.endColumn?{startLineNumber:t.lineNumber,startColumn:t.column,endLineNumber:i.lineNumber,endColumn:i.column}:e}_validatePosition(e){if(!r.y.isIPosition(e))throw Error("bad position");let{lineNumber:t,column:i}=e,n=!1;if(t<1)t=1,i=1,n=!0;else if(t>this._lines.length)t=this._lines.length,i=this._lines[t-1].length+1,n=!0;else{let e=this._lines[t-1].length+1;i<1?(i=1,n=!0):i>e&&(i=e,n=!0)}return n?{lineNumber:t,column:i}:e}}},44449:()=>{},44530:(e,t,i)=>{"use strict";i.d(t,{Fd:()=>c,Gv:()=>L,rC:()=>x});var n=i(5488),s=i(17354),o=i(95751),r=i(15957),a=i(64369),l=i(48018),h=i(88235),d=i(82102);let c={Configuration:"base.contributions.configuration"},u={properties:{},patternProperties:{}},g={properties:{},patternProperties:{}},p={properties:{},patternProperties:{}},m={properties:{},patternProperties:{}},f={properties:{},patternProperties:{}},_={properties:{},patternProperties:{}},v={properties:{},patternProperties:{}},b="vscode://schemas/settings/resourceLanguage",C=h.O.as(l.F.JSONContribution);class w extends d.jG{constructor(){super(),this.registeredConfigurationDefaults=[],this.overrideIdentifiers=new Set,this._onDidSchemaChange=this._register(new s.vl),this._onDidUpdateConfiguration=this._register(new s.vl),this.configurationDefaultsOverrides=new Map,this.defaultLanguageConfigurationOverridesNode={id:"defaultOverrides",title:r.kg(1649,"Default Language Configuration Overrides"),properties:{}},this.configurationContributors=[this.defaultLanguageConfigurationOverridesNode],this.resourceLanguageSettingsSchema={properties:{},patternProperties:{},additionalProperties:!0,allowTrailingCommas:!0,allowComments:!0},this.configurationProperties={},this.policyConfigurations=new Map,this.excludedConfigurationProperties={},C.registerSchema(b,this.resourceLanguageSettingsSchema),this.registerOverridePropertyPatternKey()}registerConfiguration(e,t=!0){return this.registerConfigurations([e],t),e}registerConfigurations(e,t=!0){let i=new Set;this.doRegisterConfigurations(e,t,i),C.registerSchema(b,this.resourceLanguageSettingsSchema),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire({properties:i})}registerDefaultConfigurations(e){let t=new Set;this.doRegisterDefaultConfigurations(e,t),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire({properties:t,defaultsOverrides:!0})}doRegisterDefaultConfigurations(e,t){this.registeredConfigurationDefaults.push(...e);let i=[];for(let{overrides:n,source:s}of e)for(let e in n){t.add(e);let o=this.configurationDefaultsOverrides.get(e)??this.configurationDefaultsOverrides.set(e,{configurationDefaultOverrides:[]}).get(e),r=n[e];if(o.configurationDefaultOverrides.push({value:r,source:s}),x.test(e)){let t=this.mergeDefaultConfigurationsForOverrideIdentifier(e,r,s,o.configurationDefaultOverrideValue);if(!t)continue;o.configurationDefaultOverrideValue=t,this.updateDefaultOverrideProperty(e,t,s),i.push(...L(e))}else{let t=this.mergeDefaultConfigurationsForConfigurationProperty(e,r,s,o.configurationDefaultOverrideValue);if(!t)continue;o.configurationDefaultOverrideValue=t;let i=this.configurationProperties[e];i&&(this.updatePropertyDefaultValue(e,i),this.updateSchema(e,i))}}this.doRegisterOverrideIdentifiers(i)}updateDefaultOverrideProperty(e,t,i){let n={type:"object",default:t.value,description:r.kg(1650,"Configure settings to be overridden for {0}.",(0,a.Mo)(e)),$ref:b,defaultDefaultValue:t.value,source:i,defaultValueSource:i};this.configurationProperties[e]=n,this.defaultLanguageConfigurationOverridesNode.properties[e]=n}mergeDefaultConfigurationsForOverrideIdentifier(e,t,i,n){let s=n?.value||{},r=n?.source??new Map;if(!(r instanceof Map))return void console.error("objectConfigurationSources is not a Map");for(let e of Object.keys(t)){let n=t[e];if(o.Gv(n)&&(o.b0(s[e])||o.Gv(s[e]))){if(s[e]={...s[e]??{},...n},i)for(let t in n)r.set(`${e}.${t}`,i)}else s[e]=n,i?r.set(e,i):r.delete(e)}return{value:s,source:r}}mergeDefaultConfigurationsForConfigurationProperty(e,t,i,n){let s=this.configurationProperties[e],r=n?.value??s?.defaultDefaultValue,a=i;if(o.Gv(t)&&(void 0!==s&&"object"===s.type||void 0===s&&(o.b0(r)||o.Gv(r)))){if(!((a=n?.source??new Map)instanceof Map))return void console.error("defaultValueSource is not a Map");for(let n in t)i&&a.set(`${e}.${n}`,i);t={...o.Gv(r)?r:{},...t}}return{value:t,source:a}}registerOverrideIdentifiers(e){this.doRegisterOverrideIdentifiers(e),this._onDidSchemaChange.fire()}doRegisterOverrideIdentifiers(e){for(let t of e)this.overrideIdentifiers.add(t);this.updateOverridePropertyPatternKey()}doRegisterConfigurations(e,t,i){e.forEach(e=>{this.validateAndRegisterProperties(e,t,e.extensionInfo,e.restrictedProperties,void 0,i),this.configurationContributors.push(e),this.registerJSONConfiguration(e)})}validateAndRegisterProperties(e,t=!0,i,n,s=4,a){s=o.z(e.scope)?s:e.scope;let l=e.properties;if(l)for(let e in l){var h,d;let c=l[e];if(t&&(h=e,d=c,h.trim()?x.test(h)?r.kg(1656,"Cannot register '{0}'. This matches property pattern '\\\\[.*\\\\]$' for describing language specific editor settings. Use 'configurationDefaults' contribution.",h):void 0!==D.getConfigurationProperties()[h]?r.kg(1657,"Cannot register '{0}'. This property is already registered.",h):d.policy?.name&&void 0!==D.getPolicyConfigurations().get(d.policy?.name)?r.kg(1658,"Cannot register '{0}'. The associated policy {1} is already registered with {2}.",h,d.policy?.name,D.getPolicyConfigurations().get(d.policy?.name)):null:r.kg(1655,"Cannot register an empty property"))){delete l[e];continue}c.source=i,c.defaultDefaultValue=l[e].default,this.updatePropertyDefaultValue(e,c),x.test(e)?c.scope=void 0:(c.scope=o.z(c.scope)?s:c.scope,c.restricted=o.z(c.restricted)?!!n?.includes(e):c.restricted),c.experiment?c.tags?.some(e=>"onexp"===e.toLowerCase())||(c.tags=c.tags??[],c.tags.push("onExP")):c.tags?.some(e=>"onexp"===e.toLowerCase())&&(console.error(`Invalid tag 'onExP' found for property '${e}'. Please use 'experiment' property instead.`),c.experiment={mode:"startup"});let u=l[e].hasOwnProperty("included")&&!l[e].included,g=l[e].policy?.name;u?(this.excludedConfigurationProperties[e]=l[e],g&&(this.policyConfigurations.set(g,e),a.add(e)),delete l[e]):(a.add(e),g&&this.policyConfigurations.set(g,e),this.configurationProperties[e]=l[e],!l[e].deprecationMessage&&l[e].markdownDeprecationMessage&&(l[e].deprecationMessage=l[e].markdownDeprecationMessage))}let c=e.allOf;if(c)for(let e of c)this.validateAndRegisterProperties(e,t,i,n,s,a)}getConfigurationProperties(){return this.configurationProperties}getPolicyConfigurations(){return this.policyConfigurations}getExcludedConfigurationProperties(){return this.excludedConfigurationProperties}registerJSONConfiguration(e){let t=e=>{let i=e.properties;if(i)for(let e in i)this.updateSchema(e,i[e]);let n=e.allOf;n?.forEach(t)};t(e)}updateSchema(e,t){switch(u.properties[e]=t,t.scope){case 1:g.properties[e]=t;break;case 2:m.properties[e]=t;break;case 3:p.properties[e]=t;break;case 7:f.properties[e]=t;break;case 4:_.properties[e]=t;break;case 5:v.properties[e]=t;break;case 6:v.properties[e]=t,this.resourceLanguageSettingsSchema.properties[e]=t}}updateOverridePropertyPatternKey(){for(let e of this.overrideIdentifiers.values()){let t=`[${e}]`,i={type:"object",description:r.kg(1651,"Configure editor settings to be overridden for a language."),errorMessage:r.kg(1652,"This setting does not support per-language configuration."),$ref:b};this.updatePropertyDefaultValue(t,i),u.properties[t]=i,g.properties[t]=i,p.properties[t]=i,m.properties[t]=i,f.properties[t]=i,_.properties[t]=i,v.properties[t]=i}}registerOverridePropertyPatternKey(){let e={type:"object",description:r.kg(1653,"Configure editor settings to be overridden for a language."),errorMessage:r.kg(1654,"This setting does not support per-language configuration."),$ref:b};u.patternProperties[k]=e,g.patternProperties[k]=e,p.patternProperties[k]=e,m.patternProperties[k]=e,f.patternProperties[k]=e,_.patternProperties[k]=e,v.patternProperties[k]=e,this._onDidSchemaChange.fire()}updatePropertyDefaultValue(e,t){let i,n,s=this.configurationDefaultsOverrides.get(e)?.configurationDefaultOverrideValue;!s||t.disallowConfigurationDefault&&s.source||(i=s.value,n=s.source),o.b0(i)&&(i=t.defaultDefaultValue,n=void 0),o.b0(i)&&(i=function(e){switch(Array.isArray(e)?e[0]:e){case"boolean":return!1;case"integer":case"number":return 0;case"string":return"";case"array":return[];case"object":return{};default:return null}}(t.type)),t.default=i,t.defaultValueSource=n}}let y="\\[([^\\]]+)\\]",S=RegExp(y,"g"),k=`^(${y})+$`,x=new RegExp(k);function L(e){let t=[];if(x.test(e)){let i=S.exec(e);for(;i?.length;){let n=i[1].trim();n&&t.push(n),i=S.exec(e)}}return(0,n.dM)(t)}let D=new w;h.O.add(c.Configuration,D)},44987:(e,t,i)=>{"use strict";i.d(t,{E:()=>c});var n=i(87899),s=i(98200),o=i(73341),r=i(85350),a=i(39205),l=i(17354),h=i(82102),d=i(95751);i(79410);class c extends h.jG{get onDidBlur(){return this._onDidBlur.event}get onDidCancel(){return this._onDidCancel.event}get onDidRun(){return this._onDidRun.event}get onWillRun(){return this._onWillRun.event}constructor(e,t={}){let i,d;switch(super(),this._actionRunnerDisposables=this._register(new h.Cm),this.viewItemDisposables=this._register(new h.$w),this.triggerKeyDown=!1,this.focusable=!0,this._onDidBlur=this._register(new l.vl),this._onDidCancel=this._register(new l.vl({onWillAddFirstListener:()=>this.cancelHasListener=!0})),this.cancelHasListener=!1,this._onDidRun=this._register(new l.vl),this._onWillRun=this._register(new l.vl),this.options=t,this._context=t.context??null,this._orientation=this.options.orientation??0,this._triggerKeys={keyDown:this.options.triggerKeys?.keyDown??!1,keys:this.options.triggerKeys?.keys??[3,10]},this._hoverDelegate=t.hoverDelegate??this._register((0,r.bW)()),this.options.actionRunner?this._actionRunner=this.options.actionRunner:(this._actionRunner=new a.LN,this._actionRunnerDisposables.add(this._actionRunner)),this._actionRunnerDisposables.add(this._actionRunner.onDidRun(e=>this._onDidRun.fire(e))),this._actionRunnerDisposables.add(this._actionRunner.onWillRun(e=>this._onWillRun.fire(e))),this.viewItems=[],this.focusedItem=void 0,this.domNode=document.createElement("div"),this.domNode.className="monaco-action-bar",this._orientation){case 0:i=[15],d=[17];break;case 1:i=[16],d=[18],this.domNode.className+=" vertical"}this._register(n.ko(this.domNode,n.Bx.KEY_DOWN,e=>{let t=new s.Z(e),n=!0,r="number"==typeof this.focusedItem?this.viewItems[this.focusedItem]:void 0;i&&(t.equals(i[0])||t.equals(i[1]))?n=this.focusPrevious():d&&(t.equals(d[0])||t.equals(d[1]))?n=this.focusNext():t.equals(9)&&this.cancelHasListener?this._onDidCancel.fire():t.equals(14)?n=this.focusFirst():t.equals(13)?n=this.focusLast():t.equals(2)&&r instanceof o.EH&&r.trapsArrowNavigation?n=this.focusNext(void 0,!0):this.isTriggerKeyEvent(t)?this._triggerKeys.keyDown?this.doTrigger(t):this.triggerKeyDown=!0:n=!1,n&&(t.preventDefault(),t.stopPropagation())})),this._register(n.ko(this.domNode,n.Bx.KEY_UP,e=>{let t=new s.Z(e);this.isTriggerKeyEvent(t)?(!this._triggerKeys.keyDown&&this.triggerKeyDown&&(this.triggerKeyDown=!1,this.doTrigger(t)),t.preventDefault(),t.stopPropagation()):(t.equals(2)||t.equals(1026)||t.equals(16)||t.equals(18)||t.equals(15)||t.equals(17))&&this.updateFocusedItem()})),this.focusTracker=this._register(n.w5(this.domNode)),this._register(this.focusTracker.onDidBlur(()=>{n.bq()!==this.domNode&&n.QX(n.bq(),this.domNode)||(this._onDidBlur.fire(),this.previouslyFocusedItem=this.focusedItem,this.focusedItem=void 0,this.triggerKeyDown=!1)})),this._register(this.focusTracker.onDidFocus(()=>this.updateFocusedItem())),this.actionsList=document.createElement("ul"),this.actionsList.className="actions-container",this.options.highlightToggledItems&&this.actionsList.classList.add("highlight-toggled"),this.actionsList.setAttribute("role",this.options.ariaRole||"toolbar"),this.options.ariaLabel&&this.actionsList.setAttribute("aria-label",this.options.ariaLabel),this.domNode.appendChild(this.actionsList),e.appendChild(this.domNode)}refreshRole(){this.length()>=1?this.actionsList.setAttribute("role",this.options.ariaRole||"toolbar"):this.actionsList.setAttribute("role","presentation")}setFocusable(e){if(this.focusable=e,this.focusable){let e=this.viewItems.find(e=>e instanceof o.EH&&e.isEnabled());e instanceof o.EH&&e.setFocusable(!0)}else this.viewItems.forEach(e=>{e instanceof o.EH&&e.setFocusable(!1)})}isTriggerKeyEvent(e){let t=!1;return this._triggerKeys.keys.forEach(i=>{t=t||e.equals(i)}),t}updateFocusedItem(){for(let e=0;e<this.actionsList.children.length;e++){let t=this.actionsList.children[e];if(n.QX(n.bq(),t)){this.focusedItem=e,this.viewItems[this.focusedItem]?.showHover?.();break}}}get context(){return this._context}set context(e){this._context=e,this.viewItems.forEach(t=>t.setActionContext(e))}get actionRunner(){return this._actionRunner}set actionRunner(e){this._actionRunner=e,this._actionRunnerDisposables.clear(),this._actionRunnerDisposables.add(this._actionRunner.onDidRun(e=>this._onDidRun.fire(e))),this._actionRunnerDisposables.add(this._actionRunner.onWillRun(e=>this._onWillRun.fire(e))),this.viewItems.forEach(t=>t.actionRunner=e)}getContainer(){return this.domNode}getAction(e){if("number"==typeof e)return this.viewItems[e]?.action;if(n.sb(e)){for(;e.parentElement!==this.actionsList;){if(!e.parentElement)return;e=e.parentElement}for(let t=0;t<this.actionsList.childNodes.length;t++)if(this.actionsList.childNodes[t]===e)return this.viewItems[t].action}}push(e,t={}){let i=Array.isArray(e)?e:[e],s=d.Et(t.index)?t.index:null;if(i.forEach(e=>{let i,r=document.createElement("li");r.className="action-item",r.setAttribute("role","presentation");let a={hoverDelegate:this._hoverDelegate,...t,isTabList:"tablist"===this.options.ariaRole};this.options.actionViewItemProvider&&(i=this.options.actionViewItemProvider(e,a)),i||(i=new o.Z4(this.context,e,a)),this.options.allowContextMenu||this.viewItemDisposables.set(i,n.ko(r,n.Bx.CONTEXT_MENU,e=>{n.fs.stop(e,!0)})),i.actionRunner=this._actionRunner,i.setActionContext(this.context),i.render(r),null===s||s<0||s>=this.actionsList.children.length?(this.actionsList.appendChild(r),this.viewItems.push(i)):(this.actionsList.insertBefore(r,this.actionsList.children[s]),this.viewItems.splice(s,0,i),s++)}),this.focusable){let e=!1;for(let t of this.viewItems)t instanceof o.EH&&(!e&&t.action.id!==a.wv.ID&&(t.isEnabled()||!this.options.focusOnlyEnabledItems)?(t.setFocusable(!0),e=!0):t.setFocusable(!1))}"number"==typeof this.focusedItem&&this.focus(this.focusedItem),this.refreshRole()}clear(){this.isEmpty()||(this.viewItems=(0,h.AS)(this.viewItems),this.viewItemDisposables.clearAndDisposeAll(),n.w_(this.actionsList),this.refreshRole())}length(){return this.viewItems.length}isEmpty(){return 0===this.viewItems.length}focus(e){let t,i=!1;if(void 0===e?i=!0:"number"==typeof e?t=e:"boolean"==typeof e&&(i=e),i&&void 0===this.focusedItem){let e=this.viewItems.findIndex(e=>e.isEnabled());this.focusedItem=-1===e?void 0:e,this.updateFocus(void 0,void 0,!0)}else void 0!==t&&(this.focusedItem=t),this.updateFocus(void 0,void 0,!0)}focusFirst(){return this.focusedItem=this.length()-1,this.focusNext(!0)}focusLast(){return this.focusedItem=0,this.focusPrevious(!0)}focusNext(e,t){let i;if(void 0===this.focusedItem)this.focusedItem=this.viewItems.length-1;else if(this.viewItems.length<=1)return!1;let n=this.focusedItem;do{if(!e&&this.options.preventLoopNavigation&&this.focusedItem+1>=this.viewItems.length)return this.focusedItem=n,!1;this.focusedItem=(this.focusedItem+1)%this.viewItems.length,i=this.viewItems[this.focusedItem]}while(this.focusedItem!==n&&(this.options.focusOnlyEnabledItems&&!i.isEnabled()||i.action.id===a.wv.ID));return this.updateFocus(void 0,void 0,t),!0}focusPrevious(e){let t;if(void 0===this.focusedItem)this.focusedItem=0;else if(this.viewItems.length<=1)return!1;let i=this.focusedItem;do{if(this.focusedItem=this.focusedItem-1,this.focusedItem<0){if(!e&&this.options.preventLoopNavigation)return this.focusedItem=i,!1;this.focusedItem=this.viewItems.length-1}t=this.viewItems[this.focusedItem]}while(this.focusedItem!==i&&(this.options.focusOnlyEnabledItems&&!t.isEnabled()||t.action.id===a.wv.ID));return this.updateFocus(!0),!0}updateFocus(e,t,i=!1){void 0===this.focusedItem&&this.actionsList.focus({preventScroll:t}),void 0!==this.previouslyFocusedItem&&this.previouslyFocusedItem!==this.focusedItem&&this.viewItems[this.previouslyFocusedItem]?.blur();let n=void 0!==this.focusedItem?this.viewItems[this.focusedItem]:void 0;if(n){let s=!0;d.Tn(n.focus)||(s=!1),this.options.focusOnlyEnabledItems&&d.Tn(n.isEnabled)&&!n.isEnabled()&&(s=!1),n.action.id===a.wv.ID&&(s=!1),s?(i||this.previouslyFocusedItem!==this.focusedItem)&&(n.focus(e),this.previouslyFocusedItem=this.focusedItem):(this.actionsList.focus({preventScroll:t}),this.previouslyFocusedItem=void 0),s&&n.showHover?.()}}doTrigger(e){if(void 0===this.focusedItem)return;let t=this.viewItems[this.focusedItem];if(t instanceof o.EH){let i=null===t._context||void 0===t._context?e:t._context;this.run(t._action,i)}}async run(e,t){await this._actionRunner.run(e,t)}dispose(){this._context=void 0,this.viewItems=(0,h.AS)(this.viewItems),this.getContainer().remove(),super.dispose()}}},44993:(e,t,i)=>{"use strict";i.d(t,{x:()=>a});var n=i(87899),s=i(55532);i(55244);var o=i(82102),r=i(73970);class a extends o.jG{constructor(e,t,i){super(),this.options=t,this.styles=i,this.count=0,this.hover=this._register(new o.HE),this.element=(0,n.BC)(e,(0,n.$)(".monaco-count-badge")),this._register((0,o.s)(()=>e.removeChild(this.element))),this.countFormat=this.options.countFormat||"{0}",this.titleFormat=this.options.titleFormat||"",this.setCount(this.options.count||0),this.updateHover()}setCount(e){this.count=e,this.render()}setTitleFormat(e){this.titleFormat=e,this.updateHover(),this.render()}updateHover(){""===this.titleFormat||this.hover.value?""===this.titleFormat&&this.hover.value&&(this.hover.value=void 0):this.hover.value=(0,r.i)().setupDelayedHoverAtMouse(this.element,()=>({content:(0,s.GP)(this.titleFormat,this.count),appearance:{compact:!0}}))}render(){this.element.textContent=(0,s.GP)(this.countFormat,this.count),this.element.style.backgroundColor=this.styles.badgeBackground??"",this.element.style.color=this.styles.badgeForeground??"",this.styles.badgeBorder&&(this.element.style.border=`1px solid ${this.styles.badgeBorder}`)}}},45181:(e,t,i)=>{"use strict";i.d(t,{cw:()=>l,jN:()=>a,nu:()=>r});var n=i(22263),s=i(55296),o=i(95751);let r=(0,n.u1)("IWorkspaceEditService");class a{constructor(e){this.metadata=e}static convert(e){return e.edits.map(e=>{if(l.is(e))return l.lift(e);if(h.is(e))return h.lift(e);throw Error("Unsupported edit")})}}class l extends a{static is(e){return e instanceof l||(0,o.Gv)(e)&&s.r.isUri(e.resource)&&(0,o.Gv)(e.textEdit)}static lift(e){return e instanceof l?e:new l(e.resource,e.textEdit,e.versionId,e.metadata)}constructor(e,t,i,n){super(n),this.resource=e,this.textEdit=t,this.versionId=i}}class h extends a{static is(e){return e instanceof h||(0,o.Gv)(e)&&(!!e.newResource||!!e.oldResource)}static lift(e){return e instanceof h?e:new h(e.oldResource,e.newResource,e.options,e.metadata)}constructor(e,t,i={},n){super(n),this.oldResource=e,this.newResource=t,this.options=i}}},45262:(e,t,i)=>{"use strict";let n,s;i.d(t,{$1:()=>b,$6:()=>n,A0:()=>k,EQ:()=>v,F6:()=>x,HC:()=>o,PK:()=>g,PQ:()=>N,Pq:()=>C,Qg:()=>c,SS:()=>u,Th:()=>_,Zv:()=>L,b7:()=>s,d0:()=>D,nY:()=>p,pc:()=>w,uC:()=>S,vb:()=>y,ve:()=>f,wR:()=>function e(t,i){return i?new Promise((e,n)=>{let s=setTimeout(()=>{o.dispose(),e()},t),o=i.onCancellationRequested(()=>{clearTimeout(s),o.dispose(),n(new a.AL)})}):u(i=>e(t,i))}});var o,r=i(13445),a=i(6033),l=i(82102),h=i(28669),d=i(97195);function c(e){return!!e&&"function"==typeof e.then}function u(e){let t=new r.Qi,i=e(t.token),n=!1,s=new Promise((e,s)=>{let o=t.token.onCancellationRequested(()=>{n=!0,o.dispose(),s(new a.AL)});Promise.resolve(i).then(i=>{o.dispose(),t.dispose(),n?(0,l.Xm)(i)&&i.dispose():e(i)},e=>{o.dispose(),t.dispose(),s(e)})});return new class{cancel(){t.cancel(),t.dispose()}then(e,t){return s.then(e,t)}catch(e){return this.then(void 0,e)}finally(e){return s.finally(e)}}}function g(e,t,i){return new Promise((n,s)=>{let o=t.onCancellationRequested(()=>{o.dispose(),n(i)});e.then(n,s).finally(()=>o.dispose())})}function p(e,t){return new Promise((i,n)=>{let s=t.onCancellationRequested(()=>{s.dispose(),n(new a.AL)});e.then(i,n).finally(()=>s.dispose())})}class m{constructor(){this.isDisposed=!1,this.activePromise=null,this.queuedPromise=null,this.queuedPromiseFactory=null}queue(e){if(this.isDisposed)return Promise.reject(Error("Throttler is disposed"));if(this.activePromise){if(this.queuedPromiseFactory=e,!this.queuedPromise){let e=()=>{if(this.queuedPromise=null,this.isDisposed)return;let e=this.queue(this.queuedPromiseFactory);return this.queuedPromiseFactory=null,e};this.queuedPromise=new Promise(t=>{this.activePromise.then(e,e).then(t)})}return new Promise((e,t)=>{this.queuedPromise.then(e,t)})}return this.activePromise=e(),new Promise((e,t)=>{this.activePromise.then(t=>{this.activePromise=null,e(t)},e=>{this.activePromise=null,t(e)})})}dispose(){this.isDisposed=!0}}class f{constructor(e){this.defaultDelay=e,this.deferred=null,this.completionPromise=null,this.doResolve=null,this.doReject=null,this.task=null}trigger(e,t=this.defaultDelay){let i;this.task=e,this.cancelTimeout(),this.completionPromise||(this.completionPromise=new Promise((e,t)=>{this.doResolve=e,this.doReject=t}).then(()=>{if(this.completionPromise=null,this.doResolve=null,this.task){let e=this.task;return this.task=null,e()}}));let n=()=>{this.deferred=null,this.doResolve?.(null)};return this.deferred=t===d.h?(i=!0,queueMicrotask(()=>{i&&(i=!1,n())}),{isTriggered:()=>i,dispose:()=>{i=!1}}):((e,t)=>{let i=!0,n=setTimeout(()=>{i=!1,t()},e);return{isTriggered:()=>i,dispose:()=>{clearTimeout(n),i=!1}}})(t,n),this.completionPromise}isTriggered(){return!!this.deferred?.isTriggered()}cancel(){this.cancelTimeout(),this.completionPromise&&(this.doReject?.(new a.AL),this.completionPromise=null)}cancelTimeout(){this.deferred?.dispose(),this.deferred=null}dispose(){this.cancel()}}class _{constructor(e){this.delayer=new f(e),this.throttler=new m}trigger(e,t){return this.delayer.trigger(()=>this.throttler.queue(e),t)}cancel(){this.delayer.cancel()}dispose(){this.delayer.dispose(),this.throttler.dispose()}}function v(e,t=0,i){let n=setTimeout(()=>{e(),i&&s.dispose()},t),s=(0,l.s)(()=>{clearTimeout(n),i?.delete(s)});return i?.add(s),s}function b(e,t=e=>!!e,i=null){let n=0,s=e.length,o=()=>n>=s?Promise.resolve(i):Promise.resolve((0,e[n++])()).then(e=>t(e)?Promise.resolve(e):o());return o()}class C{constructor(){this._runningTask=void 0,this._pendingTasks=[]}schedule(e){let t=new L;return this._pendingTasks.push({task:e,deferred:t,setUndefinedWhenCleared:!1}),this._runIfNotRunning(),t.p}_runIfNotRunning(){void 0===this._runningTask&&this._processQueue()}async _processQueue(){if(0===this._pendingTasks.length)return;let e=this._pendingTasks.shift();if(e){if(this._runningTask)throw new a.D7;this._runningTask=e.task;try{let t=await e.task();e.deferred.complete(t)}catch(t){e.deferred.error(t)}finally{this._runningTask=void 0,this._processQueue()}}}clearPending(){let e=this._pendingTasks;for(let t of(this._pendingTasks=[],e))t.setUndefinedWhenCleared?t.deferred.complete(void 0):t.deferred.error(new a.AL)}}class w{constructor(e,t){this._isDisposed=!1,this._token=void 0,"function"==typeof e&&"number"==typeof t&&this.setIfNotSet(e,t)}dispose(){this.cancel(),this._isDisposed=!0}cancel(){void 0!==this._token&&(clearTimeout(this._token),this._token=void 0)}cancelAndSet(e,t){if(this._isDisposed)throw new a.D7("Calling 'cancelAndSet' on a disposed TimeoutTimer");this.cancel(),this._token=setTimeout(()=>{this._token=void 0,e()},t)}setIfNotSet(e,t){if(this._isDisposed)throw new a.D7("Calling 'setIfNotSet' on a disposed TimeoutTimer");void 0===this._token&&(this._token=setTimeout(()=>{this._token=void 0,e()},t))}}class y{constructor(){this.disposable=void 0,this.isDisposed=!1}cancel(){this.disposable?.dispose(),this.disposable=void 0}cancelAndSet(e,t,i=globalThis){if(this.isDisposed)throw new a.D7("Calling 'cancelAndSet' on a disposed IntervalTimer");this.cancel();let n=i.setInterval(()=>{e()},t);this.disposable=(0,l.s)(()=>{i.clearInterval(n),this.disposable=void 0})}dispose(){this.cancel(),this.isDisposed=!0}}class S{constructor(e,t){this.timeoutToken=void 0,this.runner=e,this.timeout=t,this.timeoutHandler=this.onTimeout.bind(this)}dispose(){this.cancel(),this.runner=null}cancel(){this.isScheduled()&&(clearTimeout(this.timeoutToken),this.timeoutToken=void 0)}schedule(e=this.timeout){this.cancel(),this.timeoutToken=setTimeout(this.timeoutHandler,e)}get delay(){return this.timeout}set delay(e){this.timeout=e}isScheduled(){return void 0!==this.timeoutToken}onTimeout(){this.timeoutToken=void 0,this.runner&&this.doRun()}doRun(){this.runner?.()}}!function(){let e=globalThis;s="function"!=typeof e.requestIdleCallback||"function"!=typeof e.cancelIdleCallback?(e,t,i)=>{(0,h._p)(()=>{if(n)return;let e=Date.now()+15;t(Object.freeze({didTimeout:!0,timeRemaining:()=>Math.max(0,e-Date.now())}))});let n=!1;return{dispose(){n||(n=!0)}}}:(e,t,i)=>{let n=e.requestIdleCallback(t,"number"==typeof i?{timeout:i}:void 0),s=!1;return{dispose(){s||(s=!0,e.cancelIdleCallback(n))}}},n=(e,t)=>s(globalThis,e,t)}();class k{constructor(e,t){this._didRun=!1,this._executor=()=>{try{this._value=t()}catch(e){this._error=e}finally{this._didRun=!0}},this._handle=s(e,()=>this._executor())}dispose(){this._handle.dispose()}get value(){if(this._didRun||(this._handle.dispose(),this._executor()),this._error)throw this._error;return this._value}get isInitialized(){return this._didRun}}class x extends k{constructor(e){super(globalThis,e)}}class L{get isRejected(){return this.outcome?.outcome===1}get isSettled(){return!!this.outcome}constructor(){this.p=new Promise((e,t)=>{this.completeCallback=e,this.errorCallback=t})}complete(e){return this.isSettled?Promise.resolve():new Promise(t=>{this.completeCallback(e),this.outcome={outcome:0,value:e},t()})}error(e){return this.isSettled?Promise.resolve():new Promise(t=>{this.errorCallback(e),this.outcome={outcome:1,value:e},t()})}cancel(){return this.error(new a.AL)}}function D(e){let t=new r.Qi,i=e(t.token);return new E(t,async e=>{let n=t.token.onCancellationRequested(()=>{n.dispose(),t.dispose(),e.reject(new a.AL)});try{for await(let n of i){if(t.token.isCancellationRequested)return;e.emitOne(n)}n.dispose(),t.dispose()}catch(i){n.dispose(),t.dispose(),e.reject(i)}})}!function(e){e.settled=async function(e){let t,i=await Promise.all(e.map(e=>e.then(e=>e,e=>{t||(t=e)})));if(void 0!==t)throw t;return i},e.withAsyncBody=function(e){return new Promise(async(t,i)=>{try{await e(t,i)}catch(e){i(e)}})}}(o||(o={}));class I{constructor(){this._unsatisfiedConsumers=[],this._unconsumedValues=[]}get hasFinalValue(){return!!this._finalValue}produce(e){if(this._ensureNoFinalValue(),this._unsatisfiedConsumers.length>0){let t=this._unsatisfiedConsumers.shift();this._resolveOrRejectDeferred(t,e)}else this._unconsumedValues.push(e)}produceFinal(e){for(let t of(this._ensureNoFinalValue(),this._finalValue=e,this._unsatisfiedConsumers))this._resolveOrRejectDeferred(t,e);this._unsatisfiedConsumers.length=0}_ensureNoFinalValue(){if(this._finalValue)throw new a.D7("ProducerConsumer: cannot produce after final value has been set")}_resolveOrRejectDeferred(e,t){t.ok?e.complete(t.value):e.error(t.error)}consume(){if(this._unconsumedValues.length>0||this._finalValue){let e=this._unconsumedValues.length>0?this._unconsumedValues.shift():this._finalValue;return e.ok?Promise.resolve(e.value):Promise.reject(e.error)}{let e=new L;return this._unsatisfiedConsumers.push(e),e.p}}}class N{constructor(e,t){this._onReturn=t,this._producerConsumer=new I,this._iterator={next:()=>this._producerConsumer.consume(),return:()=>(this._onReturn?.(),Promise.resolve({done:!0,value:void 0})),throw:async e=>(this._finishError(e),{done:!0,value:void 0})},queueMicrotask(async()=>{let t=e({emitOne:e=>this._producerConsumer.produce({ok:!0,value:{done:!1,value:e}}),emitMany:e=>{for(let t of e)this._producerConsumer.produce({ok:!0,value:{done:!1,value:t}})},reject:e=>this._finishError(e)});if(!this._producerConsumer.hasFinalValue)try{await t,this._finishOk()}catch(e){this._finishError(e)}})}static fromArray(e){return new N(t=>{t.emitMany(e)})}static fromPromise(e){return new N(async t=>{t.emitMany(await e)})}static fromPromisesResolveOrder(e){return new N(async t=>{await Promise.all(e.map(async e=>t.emitOne(await e)))})}static merge(e){return new N(async t=>{await Promise.all(e.map(async e=>{for await(let i of e)t.emitOne(i)}))})}static{this.EMPTY=N.fromArray([])}static map(e,t){return new N(async i=>{for await(let n of e)i.emitOne(t(n))})}map(e){return N.map(this,e)}static coalesce(e){return N.filter(e,e=>!!e)}coalesce(){return N.coalesce(this)}static filter(e,t){return new N(async i=>{for await(let n of e)t(n)&&i.emitOne(n)})}filter(e){return N.filter(this,e)}_finishOk(){this._producerConsumer.hasFinalValue||this._producerConsumer.produceFinal({ok:!0,value:{done:!0,value:void 0}})}_finishError(e){this._producerConsumer.hasFinalValue||this._producerConsumer.produceFinal({ok:!1,error:e})}[Symbol.asyncIterator](){return this._iterator}}class E extends N{constructor(e,t){super(t),this._source=e}cancel(){this._source.cancel()}}Symbol("AsyncReaderEndOfStream")},45470:(e,t,i)=>{"use strict";i.d(t,{_:()=>n});let n={ICodeEditor:"vs.editor.ICodeEditor",IDiffEditor:"vs.editor.IDiffEditor"}},46287:(e,t,i)=>{"use strict";i.d(t,{ne:()=>n,Nd:()=>Q,Jo:()=>B,WJ:()=>W,dt:()=>Y,uU:()=>Z,Tt:()=>f,yr:()=>A,O:()=>F,WP:()=>p,dE:()=>_,J1:()=>M,or:()=>g});var n,s=i(47108);let o=0,r=new Uint32Array(10);function a(e,t,i){var n;e>=i&&e<i+t.length&&0!==(n=t[e-i])&&(r[o++]=255&n,n>>8&&(r[o++]=n>>8&255),n>>16&&(r[o++]=n>>16&255))}let l=new Uint8Array([114,82,115,101,69,102,97,113,81,116,84,100,119,87,99,122,120,118,103]),h=new Uint16Array([107,111,105,79,106,112,117,80,104,27496,28520,27752,121,110,27246,28782,27758,98,109,27757,108]),d=new Uint16Array([114,82,29810,115,30579,26483,101,102,29286,24934,29030,29798,30822,30310,26470,97,113,29809,116,84,100,119,99,122,120,118,103]),c=new Uint16Array([114,82,29810,115,30579,26483,101,69,102,29286,24934,29030,29798,30822,30310,26470,97,113,81,29809,116,84,100,119,87,99,122,120,118,103,107,111,105,79,106,112,117,80,104,27496,28520,27752,121,110,27246,28782,27758,98,109,27757,108]);var u=i(55532);function g(...e){return function(t,i){for(let n=0,s=e.length;n<s;n++){let s=e[n](t,i);if(s)return s}return null}}m.bind(void 0,!1);let p=m.bind(void 0,!0);function m(e,t,i){return i&&!(i.length<t.length)&&(e?u.ns(i,t):0===i.indexOf(t))?t.length>0?[{start:0,end:t.length}]:[]:null}function f(e,t){let i=t.toLowerCase().indexOf(e.toLowerCase());return -1===i?null:[{start:i,end:i+e.length}]}function _(e,t){return function e(t,i,n,s){if(n===t.length)return[];if(s===i.length)return null;if(t[n]===i[s]){let o=null;return(o=e(t,i,n+1,s+1))?I({start:s,end:s+1},o):null}return e(t,i,n,s+1)}(e.toLowerCase(),t.toLowerCase(),0,0)}function v(e){return 97<=e&&e<=122}function b(e){return 65<=e&&e<=90}function C(e){return 48<=e&&e<=57}function w(e){return 32===e||9===e||10===e||13===e}let y=new Set;function S(e){return w(e)||y.has(e)}function k(e,t){return e===t||S(e)&&S(t)}"()[]{}<>`'\"-/;:,.?!".split("").forEach(e=>y.add(e.charCodeAt(0)));let x=new Map;function L(e){let t;if(x.has(e))return x.get(e);let i=function(e){let t=function(e){if(o=0,a(e,l,4352),o>0||(a(e,h,4449),o>0)||(a(e,d,4520),o>0)||(a(e,c,12593),o))return r.subarray(0,o);if(e>=44032&&e<=55203){let t=e-44032,i=t%588,n=Math.floor(t/588),s=Math.floor(i/28),u=i%28-1;if(n<l.length?a(n,l,0):4352+n-12593<c.length&&a(4352+n,c,12593),s<h.length?a(s,h,0):4449+s-12593<c.length&&a(4449+s-12593,c,12593),u>=0&&(u<d.length?a(u,d,0):4520+u-12593<c.length&&a(4520+u-12593,c,12593)),o>0)return r.subarray(0,o)}}(e);if(t&&t.length>0)return new Uint32Array(t)}(e);return i&&(t=i),x.set(e,t),t}function D(e){return v(e)||b(e)||C(e)}function I(e,t){return 0===t.length?t=[e]:e.end===t[0].start?t[0].start=e.start:t.unshift(e),t}function N(e,t){for(let i=t;i<e.length;i++){let t=e.charCodeAt(i);if(b(t)||C(t)||i>0&&!D(e.charCodeAt(i-1)))return i}return e.length}function E(e,t){if(!t||0===(t=t.trim()).length||!function(e){let t=0,i=0,n=0,s=0;for(let o=0;o<e.length;o++)b(n=e.charCodeAt(o))&&t++,v(n)&&i++,w(n)&&s++;return(0===t||0===i)&&0===s?e.length<=30:t<=5}(e))return null;t.length>60&&(t=t.substring(0,60));let i=function(e){let t=0,i=0,n=0,s=0,o=0;for(let r=0;r<e.length;r++)b(o=e.charCodeAt(r))&&t++,v(o)&&i++,D(o)&&n++,C(o)&&s++;let r=t/e.length,a=i/e.length;return{upperPercent:r,lowerPercent:a,alphaPercent:n/e.length,numericPercent:s/e.length}}(t);if(!function(e){let{upperPercent:t,lowerPercent:i,alphaPercent:n,numericPercent:s}=e;return i>.2&&t<.8&&n>.6&&s<.2}(i)){if(!function(e){let{upperPercent:t,lowerPercent:i}=e;return 0===i&&t>.6}(i))return null;t=t.toLowerCase()}let n=null,s=0;for(e=e.toLowerCase();s<t.length&&null===(n=function e(t,i,n,s){if(n===t.length)return[];{if(s===i.length||t[n]!==i[s].toLowerCase())return null;let o=null,r=s+1;for(o=e(t,i,n+1,s+1);!o&&(r=N(i,r))<i.length;)o=e(t,i,n+1,r),r++;return null===o?null:I({start:s,end:s+1},o)}}(e,t,0,s));)s=N(t,s+1);return n}function M(e,t,i=!1){if(!t||0===t.length)return null;let n=null,s=0;for(e=e.toLowerCase(),t=t.toLowerCase();s<t.length&&null===(n=function e(t,i,n,s,o){let r=0;if(n===t.length)return[];if(s===i.length)return null;if(!k(t.charCodeAt(n),i.charCodeAt(s))){let e=L(t.charCodeAt(n));if(!e)return null;for(let t=0;t<e.length;t++)if(!k(e[t],i.charCodeAt(s+t)))return null;r+=e.length-1}let a=null,l=s+r+1;if(a=e(t,i,n+1,l,o),!o)for(;!a&&(l=T(i,l))<i.length;)a=e(t,i,n+1,l,o),l++;if(!a)return null;if(t.charCodeAt(n)!==i.charCodeAt(s)){let e=L(t.charCodeAt(n));if(!e)return a;for(let t=0;t<e.length;t++)if(e[t]!==i.charCodeAt(s+t))return a}return I({start:s,end:s+r+1},a)}(e,t,0,s,i));)s=T(t,s+1);return n}function T(e,t){for(let i=t;i<e.length;i++)if(S(e.charCodeAt(i))||i>0&&S(e.charCodeAt(i-1)))return i;return e.length}let R=g(p,E,f),O=g(p,E,_),P=new s.qK(1e4);function A(e,t,i=!1){if("string"!=typeof e||"string"!=typeof t)return null;let n=P.get(e);n||(n=RegExp(u.Bm(e),"i"),P.set(e,n));let s=n.exec(t);return s?[{start:s.index,end:s.index+s[0].length}]:i?O(e,t):R(e,t)}function F(e,t){let i=Y(e,e.toLowerCase(),0,t,t.toLowerCase(),0,{firstMatchCanBeWeak:!0,boostFullMatch:!0});return i?W(i):null}function B(e,t,i,n,s,o){let r=Math.min(13,e.length);for(;i<r;i++){let r=Y(e,t,i,n,s,o,{firstMatchCanBeWeak:!0,boostFullMatch:!0});if(r)return r}return[0,o]}function W(e){if(void 0===e)return[];let t=[],i=e[1];for(let n=e.length-1;n>1;n--){let s=e[n]+i,o=t[t.length-1];o&&o.end===s?o.end=s+1:t.push({start:s,end:s+1})}return t}function H(){let e=[],t=[];for(let e=0;e<=128;e++)t[e]=0;for(let i=0;i<=128;i++)e.push(t.slice(0));return e}function V(e){let t=[];for(let i=0;i<=e;i++)t[i]=0;return t}let z=V(256),U=V(256),j=H(),$=H(),K=H();function G(e,t){if(t<0||t>=e.length)return!1;let i=e.codePointAt(t);switch(i){case 95:case 45:case 46:case 32:case 47:case 92:case 39:case 34:case 58:case 36:case 60:case 62:case 40:case 41:case 91:case 93:case 123:case 125:return!0;case void 0:return!1;default:if(u.Ss(i))return!0;return!1}}function q(e,t){if(t<0||t>=e.length)return!1;switch(e.charCodeAt(t)){case 32:case 9:return!0;default:return!1}}!function(e){e.Default=[-100,0],e.isDefault=function(e){return!e||2===e.length&&-100===e[0]&&0===e[1]}}(n||(n={}));class Q{static{this.default={boostFullMatch:!0,firstMatchCanBeWeak:!1}}constructor(e,t){this.firstMatchCanBeWeak=e,this.boostFullMatch=t}}function Y(e,t,i,n,s,o,r=Q.default){let a=e.length>128?128:e.length,l=n.length>128?128:n.length;if(i>=a||o>=l||a-i>l-o||!function(e,t,i,n,s,o,r=!1){for(;t<i&&s<o;)e[t]===n[s]&&(r&&(z[t]=s),t+=1),s+=1;return t===i}(t,i,a,s,o,l,!0))return;var h,d=a,c=l,u=i,g=o,p=t,m=s;let f=d-1,_=c-1;for(;f>=u&&_>=g;)p[f]===m[_]&&(U[f]=_,f--),_--;let v=1,b=1,C=i,w=o,y=[!1];for(v=1,C=i;C<a;v++,C++){let r=z[C],h=U[C],d=C+1<a?U[C+1]:l;for(b=r-o+1,w=r;w<d;b++,w++){let a=Number.MIN_SAFE_INTEGER,d=!1;w<=h&&(a=function(e,t,i,n,s,o,r,a,l,h,d){var c;if(t[i]!==o[r])return Number.MIN_SAFE_INTEGER;let u=1,g=!1;return r===i-n?u=e[i]===s[r]?7:5:s[r]===o[r]||0!==r&&s[c=r-1]!==o[c]?G(o,r)&&(0===r||!G(o,r-1))?u=5:(G(o,r-1)||q(o,r-1))&&(u=5,g=!0):(u=e[i]===s[r]?7:5,g=!0),u>1&&i===n&&(d[0]=!0),g||(g=s[r]!==o[r]||G(o,r-1)||q(o,r-1)),i===n?r>l&&(u-=g?3:5):h?u+=2*!!g:u+=+!g,r+1===a&&(u-=g?3:5),u}(e,t,C,i,n,s,w,l,o,0===j[v-1][b-1],y));let c=0;a!==Number.MIN_SAFE_INTEGER&&(d=!0,c=a+$[v-1][b-1]);let u=w>r,g=u?$[v][b-1]+(j[v][b-1]>0?-5:0):0,p=w>r+1&&j[v][b-1]>0,m=p?$[v][b-2]+(j[v][b-2]>0?-5:0):0;if(p&&(!u||m>=g)&&(!d||m>=c))$[v][b]=m,K[v][b]=3,j[v][b]=0;else if(u&&(!d||g>=c))$[v][b]=g,K[v][b]=2,j[v][b]=0;else if(d)$[v][b]=c,K[v][b]=1,j[v][b]=j[v-1][b-1]+1;else throw Error("not possible")}}if(!y[0]&&!r.firstMatchCanBeWeak)return;v--,b--;let S=[$[v][b],o],k=0,x=0;for(;v>=1;){let e=b;do{let t=K[v][e];if(3===t)e-=2;else if(2===t)e-=1;else break}while(e>=1);k>1&&t[i+v-1]===s[o+b-1]&&n[h=e+o-1]===s[h]&&k+1>j[v][e]&&(e=b),e===b?k++:k=1,x||(x=e),v--,b=e-1,S.push(b)}l-o===a&&r.boostFullMatch&&(S[0]+=2);let L=x-a;return S[0]-=L,S}function Z(e,t,i,n,s,o,r){return function(e,t,i,n,s,o,r,a){let l=Y(e,t,i,n,s,o,a);if(l&&!r)return l;if(e.length>=3){let t=Math.min(7,e.length-1);for(let r=i+1;r<t;r++){let t=function(e,t){if(t+1>=e.length)return;let i=e[t],n=e[t+1];if(i!==n)return e.slice(0,t)+n+i+e.slice(t+2)}(e,r);if(t){let e=Y(t,t.toLowerCase(),i,n,s,o,a);e&&(e[0]-=3,(!l||e[0]>l[0])&&(l=e))}}}return l}(e,t,i,n,s,o,!0,r)}},46843:(e,t,i)=>{"use strict";function n(e,t,i=e.length-1){let s=function(e,t,i=e.length-1){for(let n=i;n>=0;n--)if(t(e[n]))return n;return -1}(e,t,i);if(-1!==s)return e[s]}function s(e,t){let i=o(e,t);return -1===i?void 0:e[i]}function o(e,t,i=0,n=e.length){let s=i,r=n;for(;s<r;){let i=Math.floor((s+r)/2);t(e[i])?s=i+1:r=i}return s-1}function r(e,t){let i=a(e,t);return i===e.length?void 0:e[i]}function a(e,t,i=0,n=e.length){let s=i,o=n;for(;s<o;){let i=Math.floor((s+o)/2);t(e[i])?o=i:s=i+1}return s}i.d(t,{Cn:()=>h,TM:()=>u,Uk:()=>n,XP:()=>r,hw:()=>a,iM:()=>o,kh:()=>c,lx:()=>s,oH:()=>g,ot:()=>d,vJ:()=>l});class l{static{this.assertInvariants=!1}constructor(e){this._array=e,this._findLastMonotonousLastIdx=0}findLastMonotonous(e){if(l.assertInvariants){if(this._prevFindLastPredicate){for(let t of this._array)if(this._prevFindLastPredicate(t)&&!e(t))throw Error("MonotonousArray: current predicate must be weaker than (or equal to) the previous predicate.")}this._prevFindLastPredicate=e}let t=o(this._array,e,this._findLastMonotonousLastIdx);return this._findLastMonotonousLastIdx=t+1,-1===t?void 0:this._array[t]}}function h(e,t){if(0===e.length)return;let i=e[0];for(let n=1;n<e.length;n++){let s=e[n];t(s,i)>0&&(i=s)}return i}function d(e,t){if(0===e.length)return;let i=e[0];for(let n=1;n<e.length;n++){let s=e[n];t(s,i)>=0&&(i=s)}return i}function c(e,t){return h(e,(e,i)=>-t(e,i))}function u(e,t){if(0===e.length)return -1;let i=0;for(let n=1;n<e.length;n++)t(e[n],e[i])>0&&(i=n);return i}function g(e,t){for(let i of e){let e=t(i);if(void 0!==e)return e}}},47088:(e,t,i)=>{"use strict";i.d(t,{m:()=>n});class n{constructor(e,t,i,n,s,o){this._scrollbarSize=Math.round(t),this._oppositeScrollbarSize=Math.round(i),this._arrowSize=Math.round(e),this._visibleSize=n,this._scrollSize=s,this._scrollPosition=o,this._computedAvailableSize=0,this._computedIsNeeded=!1,this._computedSliderSize=0,this._computedSliderRatio=0,this._computedSliderPosition=0,this._refreshComputedValues()}clone(){return new n(this._arrowSize,this._scrollbarSize,this._oppositeScrollbarSize,this._visibleSize,this._scrollSize,this._scrollPosition)}setVisibleSize(e){let t=Math.round(e);return this._visibleSize!==t&&(this._visibleSize=t,this._refreshComputedValues(),!0)}setScrollSize(e){let t=Math.round(e);return this._scrollSize!==t&&(this._scrollSize=t,this._refreshComputedValues(),!0)}setScrollPosition(e){let t=Math.round(e);return this._scrollPosition!==t&&(this._scrollPosition=t,this._refreshComputedValues(),!0)}setScrollbarSize(e){this._scrollbarSize=Math.round(e)}setOppositeScrollbarSize(e){this._oppositeScrollbarSize=Math.round(e)}static _computeValues(e,t,i,n,s){let o=Math.max(0,i-e),r=Math.max(0,o-2*t),a=n>0&&n>i;if(!a)return{computedAvailableSize:Math.round(o),computedIsNeeded:a,computedSliderSize:Math.round(r),computedSliderRatio:0,computedSliderPosition:0};let l=Math.round(Math.max(20,Math.floor(i*r/n))),h=(r-l)/(n-i);return{computedAvailableSize:Math.round(o),computedIsNeeded:a,computedSliderSize:Math.round(l),computedSliderRatio:h,computedSliderPosition:Math.round(s*h)}}_refreshComputedValues(){let e=n._computeValues(this._oppositeScrollbarSize,this._arrowSize,this._visibleSize,this._scrollSize,this._scrollPosition);this._computedAvailableSize=e.computedAvailableSize,this._computedIsNeeded=e.computedIsNeeded,this._computedSliderSize=e.computedSliderSize,this._computedSliderRatio=e.computedSliderRatio,this._computedSliderPosition=e.computedSliderPosition}getArrowSize(){return this._arrowSize}getScrollPosition(){return this._scrollPosition}getRectangleLargeSize(){return this._computedAvailableSize}getRectangleSmallSize(){return this._scrollbarSize}isNeeded(){return this._computedIsNeeded}getSliderSize(){return this._computedSliderSize}getSliderPosition(){return this._computedSliderPosition}getDesiredScrollPositionFromOffset(e){return this._computedIsNeeded?Math.round((e-this._arrowSize-this._computedSliderSize/2)/this._computedSliderRatio):0}getDesiredScrollPositionFromOffsetPaged(e){if(!this._computedIsNeeded)return 0;let t=e-this._arrowSize,i=this._scrollPosition;return t<this._computedSliderPosition?i-=this._visibleSize:i+=this._visibleSize,i}getDesiredScrollPositionFromDelta(e){return this._computedIsNeeded?Math.round((this._computedSliderPosition+e)/this._computedSliderRatio):0}}},47108:(e,t,i)=>{"use strict";var n,s,o;i.d(t,{QO:()=>p,cO:()=>u,db:()=>g,fT:()=>a,qK:()=>c,rm:()=>l});class r{constructor(e,t){this.uri=e,this.value=t}}class a{static{this.defaultToKey=e=>e.toString()}constructor(e,t){if(this[n]="ResourceMap",e instanceof a)this.map=new Map(e.map),this.toKey=t??a.defaultToKey;else if(Array.isArray(e))for(let[i,n]of(this.map=new Map,this.toKey=t??a.defaultToKey,e))this.set(i,n);else this.map=new Map,this.toKey=e??a.defaultToKey}set(e,t){return this.map.set(this.toKey(e),new r(e,t)),this}get(e){return this.map.get(this.toKey(e))?.value}has(e){return this.map.has(this.toKey(e))}get size(){return this.map.size}clear(){this.map.clear()}delete(e){return this.map.delete(this.toKey(e))}forEach(e,t){for(let[i,n]of(void 0!==t&&(e=e.bind(t)),this.map))e(n.value,n.uri,this)}*values(){for(let e of this.map.values())yield e.value}*keys(){for(let e of this.map.values())yield e.uri}*entries(){for(let e of this.map.values())yield[e.uri,e.value]}*[(n=Symbol.toStringTag,Symbol.iterator)](){for(let[,e]of this.map)yield[e.uri,e.value]}}class l{constructor(e,t){this[s]="ResourceSet",e&&"function"!=typeof e?(this._map=new a(t),e.forEach(this.add,this)):this._map=new a(e)}get size(){return this._map.size}add(e){return this._map.set(e,e),this}clear(){this._map.clear()}delete(e){return this._map.delete(e)}forEach(e,t){this._map.forEach((i,n)=>e.call(t,n,n,this))}has(e){return this._map.has(e)}entries(){return this._map.entries()}keys(){return this._map.keys()}values(){return this._map.keys()}[(s=Symbol.toStringTag,Symbol.iterator)](){return this.keys()}}class h{constructor(){this[o]="LinkedMap",this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){return this._head?.value}get last(){return this._tail?.value}has(e){return this._map.has(e)}get(e,t=0){let i=this._map.get(e);if(i)return 0!==t&&this.touch(i,t),i.value}set(e,t,i=0){let n=this._map.get(e);if(n)n.value=t,0!==i&&this.touch(n,i);else{switch(n={key:e,value:t,next:void 0,previous:void 0},i){case 0:case 2:default:this.addItemLast(n);break;case 1:this.addItemFirst(n)}this._map.set(e,n),this._size++}return this}delete(e){return!!this.remove(e)}remove(e){let t=this._map.get(e);if(t)return this._map.delete(e),this.removeItem(t),this._size--,t.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw Error("Invalid list");let e=this._head;return this._map.delete(e.key),this.removeItem(e),this._size--,e.value}forEach(e,t){let i=this._state,n=this._head;for(;n;){if(t?e.bind(t)(n.value,n.key,this):e(n.value,n.key,this),this._state!==i)throw Error("LinkedMap got modified during iteration.");n=n.next}}keys(){let e=this,t=this._state,i=this._head,n={[Symbol.iterator]:()=>n,next(){if(e._state!==t)throw Error("LinkedMap got modified during iteration.");if(!i)return{value:void 0,done:!0};{let e={value:i.key,done:!1};return i=i.next,e}}};return n}values(){let e=this,t=this._state,i=this._head,n={[Symbol.iterator]:()=>n,next(){if(e._state!==t)throw Error("LinkedMap got modified during iteration.");if(!i)return{value:void 0,done:!0};{let e={value:i.value,done:!1};return i=i.next,e}}};return n}entries(){let e=this,t=this._state,i=this._head,n={[Symbol.iterator]:()=>n,next(){if(e._state!==t)throw Error("LinkedMap got modified during iteration.");if(!i)return{value:void 0,done:!0};{let e={value:[i.key,i.value],done:!1};return i=i.next,e}}};return n}[(o=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(e){if(e>=this.size)return;if(0===e)return void this.clear();let t=this._head,i=this.size;for(;t&&i>e;)this._map.delete(t.key),t=t.next,i--;this._head=t,this._size=i,t&&(t.previous=void 0),this._state++}trimNew(e){if(e>=this.size)return;if(0===e)return void this.clear();let t=this._tail,i=this.size;for(;t&&i>e;)this._map.delete(t.key),t=t.previous,i--;this._tail=t,this._size=i,t&&(t.next=void 0),this._state++}addItemFirst(e){if(this._head||this._tail)if(this._head)e.next=this._head,this._head.previous=e;else throw Error("Invalid list");else this._tail=e;this._head=e,this._state++}addItemLast(e){if(this._head||this._tail)if(this._tail)e.previous=this._tail,this._tail.next=e;else throw Error("Invalid list");else this._head=e;this._tail=e,this._state++}removeItem(e){if(e===this._head&&e===this._tail)this._head=void 0,this._tail=void 0;else if(e===this._head){if(!e.next)throw Error("Invalid list");e.next.previous=void 0,this._head=e.next}else if(e===this._tail){if(!e.previous)throw Error("Invalid list");e.previous.next=void 0,this._tail=e.previous}else{let t=e.next,i=e.previous;if(!t||!i)throw Error("Invalid list");t.previous=i,i.next=t}e.next=void 0,e.previous=void 0,this._state++}touch(e,t){if(!this._head||!this._tail)throw Error("Invalid list");if(1===t||2===t){if(1===t){if(e===this._head)return;let t=e.next,i=e.previous;e===this._tail?(i.next=void 0,this._tail=i):(t.previous=i,i.next=t),e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e,this._state++}else if(2===t){if(e===this._tail)return;let t=e.next,i=e.previous;e===this._head?(t.previous=void 0,this._head=t):(t.previous=i,i.next=t),e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e,this._state++}}}toJSON(){let e=[];return this.forEach((t,i)=>{e.push([i,t])}),e}fromJSON(e){for(let[t,i]of(this.clear(),e))this.set(t,i)}}class d extends h{constructor(e,t=1){super(),this._limit=e,this._ratio=Math.min(Math.max(0,t),1)}get limit(){return this._limit}set limit(e){this._limit=e,this.checkTrim()}get(e,t=2){return super.get(e,t)}peek(e){return super.get(e,0)}set(e,t){return super.set(e,t,2),this}checkTrim(){this.size>this._limit&&this.trim(Math.round(this._limit*this._ratio))}}class c extends d{constructor(e,t=1){super(e,t)}trim(e){this.trimOld(e)}set(e,t){return super.set(e,t),this.checkTrim(),this}}class u{constructor(e){if(this._m1=new Map,this._m2=new Map,e)for(let[t,i]of e)this.set(t,i)}clear(){this._m1.clear(),this._m2.clear()}set(e,t){this._m1.set(e,t),this._m2.set(t,e)}get(e){return this._m1.get(e)}getKey(e){return this._m2.get(e)}delete(e){let t=this._m1.get(e);return void 0!==t&&(this._m1.delete(e),this._m2.delete(t),!0)}keys(){return this._m1.keys()}values(){return this._m1.values()}}class g{constructor(){this.map=new Map}add(e,t){let i=this.map.get(e);i||(i=new Set,this.map.set(e,i)),i.add(t)}delete(e,t){let i=this.map.get(e);i&&(i.delete(t),0===i.size&&this.map.delete(e))}forEach(e,t){let i=this.map.get(e);i&&i.forEach(t)}}class p{constructor(){this._data=new Map}set(e,...t){let i=this._data;for(let e=0;e<t.length-1;e++)i.has(t[e])||i.set(t[e],new Map),i=i.get(t[e]);i.set(t[t.length-1],e)}get(...e){let t=this._data;for(let i=0;i<e.length-1;i++){if(!t.has(e[i]))return;t=t.get(e[i])}return t.get(e[e.length-1])}clear(){this._data.clear()}toString(){let e=(t,i)=>{let n="";for(let[s,o]of t)n+=`${" ".repeat(i)}${s}: `,o instanceof Map?n+="\n"+e(o,i+1):n+=`${o}
|
|
536
|
-
`;return n};return e(this._data,0)}}},47320:(e,t,i)=>{"use strict";i.d(t,{b:()=>n});let n=(0,i(22263).u1)("textModelService")},47371:()=>{},
|
|
536
|
+
`;return n};return e(this._data,0)}}},47320:(e,t,i)=>{"use strict";i.d(t,{b:()=>n});let n=(0,i(22263).u1)("textModelService")},47371:()=>{},48018:(e,t,i)=>{"use strict";i.d(t,{F:()=>r});var n=i(17354),s=i(82102),o=i(88235);let r={JSONContribution:"base.contributions.json"};class a extends s.jG{constructor(){super(...arguments),this.schemasById={},this._onDidChangeSchema=this._register(new n.vl)}registerSchema(e,t,i){let n=e.length>0&&"#"===e.charAt(e.length-1)?e.substring(0,e.length-1):e;this.schemasById[n]=t,this._onDidChangeSchema.fire(e),i&&i.add((0,s.s)(()=>{delete this.schemasById[n],this._onDidChangeSchema.fire(e)}))}notifySchemaChanged(e){this._onDidChangeSchema.fire(e)}}let l=new a;o.O.add(r.JSONContribution,l)},49195:(e,t,i)=>{"use strict";i.d(t,{b:()=>n});let n=(0,i(22263).u1)("keybindingService")},49352:(e,t,i)=>{"use strict";i.d(t,{_:()=>c,ou:()=>l,tk:()=>h});var n=i(6033),s=i(30868),o=i(74221),r=i(4091),a=i(89802);class l{constructor(e,t,i,n,s){this.length=e,this.kind=t,this.bracketId=i,this.bracketIds=n,this.astNode=s}}class h{constructor(e,t){this.textModel=e,this.bracketTokens=t,this.reader=new d(this.textModel,this.bracketTokens),this._offset=r.Vp,this.didPeek=!1,this.peeked=null,this.textBufferLineCount=e.getLineCount(),this.textBufferLastLineLength=e.getLineLength(this.textBufferLineCount)}get offset(){return this._offset}get length(){return(0,r.qe)(this.textBufferLineCount-1,this.textBufferLastLineLength)}skip(e){this.didPeek=!1,this._offset=(0,r.QB)(this._offset,e);let t=(0,r.l4)(this._offset);this.reader.setPosition(t.lineCount,t.columnCount)}read(){let e;return this.peeked?(this.didPeek=!1,e=this.peeked):e=this.reader.read(),e&&(this._offset=(0,r.QB)(this._offset,e.length)),e}peek(){return this.didPeek||(this.peeked=this.reader.read(),this.didPeek=!0),this.peeked}}class d{constructor(e,t){this.textModel=e,this.bracketTokens=t,this.lineIdx=0,this.line=null,this.lineCharOffset=0,this.lineTokens=null,this.lineTokenOffset=0,this.peekedToken=null,this.textBufferLineCount=e.getLineCount(),this.textBufferLastLineLength=e.getLineLength(this.textBufferLineCount)}setPosition(e,t){e===this.lineIdx?(this.lineCharOffset=t,null!==this.line&&(this.lineTokenOffset=0===this.lineCharOffset?0:this.lineTokens.findTokenIndexAtOffset(this.lineCharOffset))):(this.lineIdx=e,this.lineCharOffset=t,this.line=null),this.peekedToken=null}read(){if(this.peekedToken){let e=this.peekedToken;return this.peekedToken=null,this.lineCharOffset+=(0,r.sS)(e.length),e}if(this.lineIdx>this.textBufferLineCount-1||this.lineIdx===this.textBufferLineCount-1&&this.lineCharOffset>=this.textBufferLastLineLength)return null;null===this.line&&(this.lineTokens=this.textModel.tokenization.getLineTokens(this.lineIdx+1),this.line=this.lineTokens.getLineContent(),this.lineTokenOffset=0===this.lineCharOffset?0:this.lineTokens.findTokenIndexAtOffset(this.lineCharOffset));let e=this.lineIdx,t=this.lineCharOffset,i=0;for(;;){let n=this.lineTokens,o=n.getCount(),a=null;if(this.lineTokenOffset<o){let l=n.getMetadata(this.lineTokenOffset);for(;this.lineTokenOffset+1<o&&l===n.getMetadata(this.lineTokenOffset+1);)this.lineTokenOffset++;let h=0===s.x.getTokenType(l),d=s.x.containsBalancedBrackets(l),c=n.getEndOffset(this.lineTokenOffset);if(d&&h&&this.lineCharOffset<c){let e=n.getLanguageId(this.lineTokenOffset),t=this.line.substring(this.lineCharOffset,c),i=this.bracketTokens.getSingleLanguageBracketTokens(e),s=i.regExpGlobal;if(s){s.lastIndex=0;let e=s.exec(t);e&&(a=i.getToken(e[0]))&&(this.lineCharOffset+=e.index)}}if(i+=c-this.lineCharOffset,a)if(e===this.lineIdx&&t===this.lineCharOffset)return this.lineCharOffset+=(0,r.sS)(a.length),a;else{this.peekedToken=a;break}this.lineTokenOffset++,this.lineCharOffset=c}else if(this.lineIdx===this.textBufferLineCount-1||(this.lineIdx++,this.lineTokens=this.textModel.tokenization.getLineTokens(this.lineIdx+1),this.lineTokenOffset=0,this.line=this.lineTokens.getLineContent(),this.lineCharOffset=0,(i+=33)>1e3))break;if(i>1500)break}let n=(0,r.C7)(e,t,this.lineIdx,this.lineCharOffset);return new l(n,0,-1,a.gV.getEmpty(),new o.yF(n))}}class c{constructor(e,t){let i;this.text=e,this._offset=r.Vp,this.idx=0;let n=t.getRegExpStr(),s=n?RegExp(n+"|\n","gi"):null,h=[],d=0,c=0,u=0,g=0,p=[];for(let e=0;e<60;e++)p.push(new l((0,r.qe)(0,e),0,-1,a.gV.getEmpty(),new o.yF((0,r.qe)(0,e))));let m=[];for(let e=0;e<60;e++)m.push(new l((0,r.qe)(1,e),0,-1,a.gV.getEmpty(),new o.yF((0,r.qe)(1,e))));if(s)for(s.lastIndex=0;null!==(i=s.exec(e));){let e=i.index,n=i[0];if("\n"===n)d++,c=e+1;else{if(u!==e){let t;if(g===d){let i=e-u;if(i<p.length)t=p[i];else{let e=(0,r.qe)(0,i);t=new l(e,0,-1,a.gV.getEmpty(),new o.yF(e))}}else{let i=d-g,n=e-c;if(1===i&&n<m.length)t=m[n];else{let e=(0,r.qe)(i,n);t=new l(e,0,-1,a.gV.getEmpty(),new o.yF(e))}}h.push(t)}h.push(t.getToken(n)),u=e+n.length,g=d}}let f=e.length;if(u!==f){let e=g===d?(0,r.qe)(0,f-u):(0,r.qe)(d-g,f-c);h.push(new l(e,0,-1,a.gV.getEmpty(),new o.yF(e)))}this.length=(0,r.qe)(d,f-c),this.tokens=h}get offset(){return this._offset}read(){return this.tokens[this.idx++]||null}peek(){return this.tokens[this.idx]||null}skip(e){throw new n.EM}}},49572:()=>{},49832:(e,t,i)=>{"use strict";i.d(t,{AV:()=>f,Bc:()=>h,VS:()=>c,_W:()=>p,it:()=>d,nI:()=>m,nK:()=>u,oO:()=>g});var n=i(6033),s=i(96340),o=i(148),r=i(84195),a=i(55532),l=i(55296);class h{constructor(e="",t=!1){if(this.value=e,"string"!=typeof this.value)throw(0,n.Qg)("value");"boolean"==typeof t?(this.isTrusted=t,this.supportThemeIcons=!1,this.supportHtml=!1):(this.isTrusted=t.isTrusted??void 0,this.supportThemeIcons=t.supportThemeIcons??!1,this.supportHtml=t.supportHtml??!1)}appendText(e,t=0){return this.value+=(this.supportThemeIcons?(0,s.m2)(e):e).replace(/[\\`*_{}[\]()#+\-!~]/g,"\\$&").replace(/([ \t]+)/g,(e,t)=>" ".repeat(t.length)).replace(/\>/gm,"\\>").replace(/\n/g,1===t?"\\\n":"\n\n"),this}appendMarkdown(e){return this.value+=e,this}appendCodeblock(e,t){return this.value+=`
|
|
537
537
|
${function(e,t){let i=e.match(/^`+/gm)?.reduce((e,t)=>e.length>t.length?e:t).length??0,n=i>=3?i+1:3;return[`${"`".repeat(n)}${t}`,e,`${"`".repeat(n)}`].join("\n")}(t,e)}
|
|
538
538
|
`,this}appendLink(e,t,i){return this.value+="[",this.value+=this._escape(t,"]"),this.value+="](",this.value+=this._escape(String(e),")"),i&&(this.value+=` "${this._escape(this._escape(i,'"'),")")}"`),this.value+=")",this}_escape(e,t){let i=RegExp((0,a.bm)(t),"g");return e.replace(i,(t,i)=>"\\"!==e.charAt(i-1)?`\\${t}`:t)}}function d(e){return c(e)?!e.value:!Array.isArray(e)||e.every(d)}function c(e){return e instanceof h||!!e&&"object"==typeof e&&"string"==typeof e.value&&("boolean"==typeof e.isTrusted||"object"==typeof e.isTrusted||void 0===e.isTrusted)&&("boolean"==typeof e.supportThemeIcons||void 0===e.supportThemeIcons)}function u(e,t){return e===t||!!e&&!!t&&e.value===t.value&&e.isTrusted===t.isTrusted&&e.supportThemeIcons===t.supportThemeIcons&&e.supportHtml===t.supportHtml&&(e.baseUri===t.baseUri||!!e.baseUri&&!!t.baseUri&&(0,r.n4)(l.r.from(e.baseUri),l.r.from(t.baseUri)))}function g(e){return e.replace(/"/g,""")}function p(e){return e?e.replace(/\\([\\`*_{}[\]()#+\-.!~])/g,"$1"):e}function m(e){let t=[],i=e.split("|").map(e=>e.trim());e=i[0];let n=i[1];if(n){let e=/height=(\d+)/.exec(n),i=/width=(\d+)/.exec(n),s=e?e[1]:"",o=i?i[1]:"",r=isFinite(parseInt(o)),a=isFinite(parseInt(s));r&&t.push(`width="${o}"`),a&&t.push(`height="${s}"`)}return{href:e,dimensions:t}}function f(e,...t){return l.r.from({scheme:o.ny.command,path:e,query:t.length?encodeURIComponent(JSON.stringify(t)):void 0})}},50518:(e,t,i)=>{"use strict";i.d(t,{DX:()=>S,E_:()=>I,Fl:()=>N,HW:()=>T,PF:()=>x,aU:()=>P,dS:()=>n,fE:()=>w,gW:()=>E,ih:()=>A,ke:()=>D,ks:()=>k,qO:()=>L,tc:()=>F,uB:()=>C,xX:()=>M});var n,s=i(15957),o=i(55296),r=i(89597),a=i(72553),l=i(86884),h=i(47320),d=i(41327),c=i(39783),u=i(8820),g=i(22263),p=i(18983),m=i(88235),f=i(66499),_=i(95751),v=i(90057),b=i(87899);class C{constructor(e){this.id=e.id,this.precondition=e.precondition,this._kbOpts=e.kbOpts,this._menuOpts=e.menuOpts,this.metadata=e.metadata}register(){if(Array.isArray(this._menuOpts)?this._menuOpts.forEach(this._registerMenuItem,this):this._menuOpts&&this._registerMenuItem(this._menuOpts),this._kbOpts)for(let e of Array.isArray(this._kbOpts)?this._kbOpts:[this._kbOpts]){let t=e.kbExpr;this.precondition&&(t=t?u.M$.and(t,this.precondition):this.precondition);let i={id:this.id,weight:e.weight,args:e.args,when:t,primary:e.primary,secondary:e.secondary,win:e.win,linux:e.linux,mac:e.mac};p.f.registerKeybindingRule(i)}c.w.registerCommand({id:this.id,handler:(e,t)=>this.runCommand(e,t),metadata:this.metadata})}_registerMenuItem(e){d.ZG.appendMenuItem(e.menuId,{group:e.group,command:{id:this.id,title:e.title,icon:e.icon,precondition:this.precondition},when:e.when,order:e.order})}}class w extends C{constructor(){super(...arguments),this._implementations=[]}addImplementation(e,t,i,n){return this._implementations.push({priority:e,name:t,implementation:i,when:n}),this._implementations.sort((e,t)=>t.priority-e.priority),{dispose:()=>{for(let e=0;e<this._implementations.length;e++)if(this._implementations[e].implementation===i)return void this._implementations.splice(e,1)}}}runCommand(e,t){let i=e.get(v.rr),n=e.get(u.fN);for(let s of(i.trace(`Executing Command '${this.id}' which has ${this._implementations.length} bound.`),this._implementations)){if(s.when){let e=n.getContext((0,b.bq)());if(!s.when.evaluate(e))continue}let o=s.implementation(e,t);if(o){if(i.trace(`Command '${this.id}' was handled by '${s.name}'.`),"boolean"==typeof o)return;return o}}i.trace(`The Command '${this.id}' was not handled by any implementation.`)}}class y extends C{constructor(e,t){super(t),this.command=e}runCommand(e,t){return this.command.runCommand(e,t)}}class S extends C{static bindToContribution(e){return class extends S{constructor(e){super(e),this._callback=e.handler}runEditorCommand(t,i,n){let s=e(i);s&&this._callback(s,n)}}}static runEditorCommand(e,t,i,n){let s=e.get(r.T),o=s.getFocusedCodeEditor()||s.getActiveCodeEditor();if(o)return o.invokeWithinContext(e=>{if(e.get(u.fN).contextMatchesRules(i??void 0))return n(e,o,t)})}runCommand(e,t){return S.runEditorCommand(e,t,this.precondition,(e,t,i)=>this.runEditorCommand(e,t,i))}}class k extends S{static convertOptions(e){let t;function i(t){return t.menuId||(t.menuId=d.D8.EditorContext),t.title||(t.title="string"==typeof e.label?e.label:e.label.value),t.when=u.M$.and(e.precondition,t.when),t}return t=Array.isArray(e.menuOpts)?e.menuOpts:e.menuOpts?[e.menuOpts]:[],Array.isArray(e.contextMenuOpts)?t.push(...e.contextMenuOpts.map(i)):e.contextMenuOpts&&t.push(i(e.contextMenuOpts)),e.menuOpts=t,e}constructor(e){super(k.convertOptions(e)),"string"==typeof e.label?(this.label=e.label,this.alias=e.alias??e.label):(this.label=e.label.value,this.alias=e.alias??e.label.original)}runEditorCommand(e,t,i){return this.reportTelemetry(e,t),this.run(e,t,i||{})}reportTelemetry(e,t){e.get(f.k).publicLog2("editorActionInvoked",{name:this.label,id:this.id})}}class x extends k{constructor(){super(...arguments),this._implementations=[]}addImplementation(e,t){return this._implementations.push([e,t]),this._implementations.sort((e,t)=>t[0]-e[0]),{dispose:()=>{for(let e=0;e<this._implementations.length;e++)if(this._implementations[e][1]===t)return void this._implementations.splice(e,1)}}}run(e,t,i){for(let n of this._implementations){let s=n[1](e,t,i);if(s){if("boolean"==typeof s)return;return s}}}}class L extends d.L{run(e,...t){let i=e.get(r.T),n=i.getFocusedCodeEditor()||i.getActiveCodeEditor();if(n)return n.invokeWithinContext(e=>{let i=e.get(u.fN),s=e.get(v.rr);return i.contextMatchesRules(this.desc.precondition??void 0)?this.runEditorCommand(e,n,...t):void s.debug("[EditorAction2] NOT running command because its precondition is FALSE",this.desc.id,this.desc.precondition?.serialize())})}}function D(e,t){c.w.registerCommand(e,function(e,...i){let n=e.get(g._Y),[s,r]=i;(0,_.j)(o.r.isUri(s)),(0,_.j)(a.y.isIPosition(r));let d=e.get(l.S).getModel(s);if(d){let e=a.y.lift(r);return n.invokeFunction(t,d,e,...i.slice(2))}return e.get(h.b).createModelReference(s).then(e=>new Promise((s,o)=>{try{let o=n.invokeFunction(t,e.object.textEditorModel,a.y.lift(r),i.slice(2));s(o)}catch(e){o(e)}}).finally(()=>{e.dispose()}))})}function I(e){return R.INSTANCE.registerEditorCommand(e),e}function N(e){let t=new e;return R.INSTANCE.registerEditorAction(t),t}function E(e){return R.INSTANCE.registerEditorAction(e),e}function M(e){R.INSTANCE.registerEditorAction(e)}function T(e,t,i){R.INSTANCE.registerEditorContribution(e,t,i)}!function(e){e.getEditorCommand=function(e){return R.INSTANCE.getEditorCommand(e)},e.getEditorActions=function(){return R.INSTANCE.getEditorActions()},e.getEditorContributions=function(){return R.INSTANCE.getEditorContributions()},e.getSomeEditorContributions=function(e){return R.INSTANCE.getEditorContributions().filter(t=>e.indexOf(t.id)>=0)},e.getDiffEditorContributions=function(){return R.INSTANCE.getDiffEditorContributions()}}(n||(n={}));class R{static{this.INSTANCE=new R}constructor(){this.editorContributions=[],this.diffEditorContributions=[],this.editorActions=[],this.editorCommands=Object.create(null)}registerEditorContribution(e,t,i){this.editorContributions.push({id:e,ctor:t,instantiation:i})}getEditorContributions(){return this.editorContributions.slice(0)}getDiffEditorContributions(){return this.diffEditorContributions.slice(0)}registerEditorAction(e){e.register(),this.editorActions.push(e)}getEditorActions(){return this.editorActions}registerEditorCommand(e){e.register(),this.editorCommands[e.id]=e}getEditorCommand(e){return this.editorCommands[e]||null}}function O(e){return e.register(),e}m.O.add("editor.contributions",R.INSTANCE);let P=O(new w({id:"undo",precondition:void 0,kbOpts:{weight:0,primary:2104},menuOpts:[{menuId:d.D8.MenubarEditMenu,group:"1_do",title:s.kg(64,"&&Undo"),order:1},{menuId:d.D8.CommandPalette,group:"",title:s.kg(65,"Undo"),order:1},{menuId:d.D8.SimpleEditorContext,group:"1_do",title:s.kg(66,"Undo"),order:1}]}));O(new y(P,{id:"default:undo",precondition:void 0}));let A=O(new w({id:"redo",precondition:void 0,kbOpts:{weight:0,primary:2103,secondary:[3128],mac:{primary:3128}},menuOpts:[{menuId:d.D8.MenubarEditMenu,group:"1_do",title:s.kg(67,"&&Redo"),order:2},{menuId:d.D8.CommandPalette,group:"",title:s.kg(68,"Redo"),order:1},{menuId:d.D8.SimpleEditorContext,group:"1_do",title:s.kg(69,"Redo"),order:2}]}));O(new y(A,{id:"default:redo",precondition:void 0}));let F=O(new w({id:"editor.action.selectAll",precondition:void 0,kbOpts:{weight:0,kbExpr:null,primary:2079},menuOpts:[{menuId:d.D8.MenubarSelectionMenu,group:"1_basic",title:s.kg(70,"&&Select All"),order:1},{menuId:d.D8.CommandPalette,group:"",title:s.kg(71,"Select All"),order:1},{menuId:d.D8.SimpleEditorContext,group:"9_select",title:s.kg(72,"Select All"),order:1}]}))},50813:(e,t,i)=>{"use strict";i.d(t,{r4:()=>E,Yl:()=>T});var n,s=i(45262),o=i(13445),r=i(82102),a=i(76946),l=i(27140),h=i(22263),d=i(17354),c=i(37157),u=i(788),g=i(52607),p=i(80104),m=i(66499),f=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},_=function(e,t){return function(i,n){t(i,n,e)}};let v=(0,h.u1)("diffProviderFactoryService"),b=class{constructor(e){this.instantiationService=e}createDiffProvider(e){return this.instantiationService.createInstance(C,e)}};b=f([_(0,h._Y)],b),(0,l.v)(v,b,1);let C=class{static{n=this}static{this.diffCache=new Map}constructor(e,t,i){this.editorWorkerService=t,this.telemetryService=i,this.onDidChangeEventEmitter=new d.vl,this.onDidChange=this.onDidChangeEventEmitter.event,this.diffAlgorithm="advanced",this.diffAlgorithmOnDidChangeSubscription=void 0,this.setOptions(e)}dispose(){this.diffAlgorithmOnDidChangeSubscription?.dispose()}async computeDiff(e,t,i,s){if("string"!=typeof this.diffAlgorithm)return this.diffAlgorithm.computeDiff(e,t,i,s);if(e.isDisposed()||t.isDisposed())return{changes:[],identical:!0,quitEarly:!1,moves:[]};if(1===e.getLineCount()&&1===e.getLineMaxColumn(1))return 1===t.getLineCount()&&1===t.getLineMaxColumn(1)?{changes:[],identical:!0,quitEarly:!1,moves:[]}:{changes:[new g.wm(new u.M(1,2),new u.M(1,t.getLineCount()+1),[new g.q6(e.getFullModelRange(),t.getFullModelRange())])],identical:!1,quitEarly:!1,moves:[]};let o=JSON.stringify([e.uri.toString(),t.uri.toString()]),r=JSON.stringify([e.id,t.id,e.getAlternativeVersionId(),t.getAlternativeVersionId(),JSON.stringify(i)]),a=n.diffCache.get(o);if(a&&a.context===r)return a.result;let l=c.W.create(),h=await this.editorWorkerService.computeDiff(e.uri,t.uri,i,this.diffAlgorithm),d=l.elapsed();if(this.telemetryService.publicLog2("diffEditor.computeDiff",{timeMs:d,timedOut:h?.quitEarly??!0,detectedMoves:i.computeMoves?h?.moves.length??0:-1}),s.isCancellationRequested)return{changes:[],identical:!1,quitEarly:!0,moves:[]};if(!h)throw Error("no diff result available");return n.diffCache.size>10&&n.diffCache.delete(n.diffCache.keys().next().value),n.diffCache.set(o,{result:h,context:r}),h}setOptions(e){let t=!1;e.diffAlgorithm&&this.diffAlgorithm!==e.diffAlgorithm&&(this.diffAlgorithmOnDidChangeSubscription?.dispose(),this.diffAlgorithmOnDidChangeSubscription=void 0,this.diffAlgorithm=e.diffAlgorithm,"string"!=typeof e.diffAlgorithm&&(this.diffAlgorithmOnDidChangeSubscription=e.diffAlgorithm.onDidChange(()=>this.onDidChangeEventEmitter.fire())),t=!0),t&&this.onDidChangeEventEmitter.fire()}};C=n=f([_(1,p.w),_(2,m.k)],C);var w=i(72150),y=i(12033),S=i(744),k=i(35882),x=i(40232),L=i(74292),D=i(95751),I=i(5488),N=i(71544);let E=class extends r.jG{setActiveMovedText(e){this._activeMovedText.set(e,void 0)}constructor(e,t,i){super(),this.model=e,this._options=t,this._diffProviderFactoryService=i,this._isDiffUpToDate=(0,a.FY)(this,!1),this.isDiffUpToDate=this._isDiffUpToDate,this._diff=(0,a.FY)(this,void 0),this.diff=this._diff,this._unchangedRegions=(0,a.FY)(this,void 0),this.unchangedRegions=(0,a.un)(this,e=>this._options.hideUnchangedRegions.read(e)?this._unchangedRegions.read(e)?.regions??[]:((0,a.Rn)(e=>{for(let t of this._unchangedRegions.read(void 0)?.regions||[])t.collapseAll(e)}),[])),this.movedTextToCompare=(0,a.FY)(this,void 0),this._activeMovedText=(0,a.FY)(this,void 0),this._hoveredMovedText=(0,a.FY)(this,void 0),this.activeMovedText=(0,a.un)(this,e=>this.movedTextToCompare.read(e)??this._hoveredMovedText.read(e)??this._activeMovedText.read(e)),this._cancellationTokenSource=new o.Qi,this._diffProvider=(0,a.un)(this,e=>{let t=this._diffProviderFactoryService.createDiffProvider({diffAlgorithm:this._options.diffAlgorithm.read(e)}),i=(0,a.yQ)("onDidChange",t.onDidChange);return{diffProvider:t,onChangeSignal:i}}),this._register((0,r.s)(()=>this._cancellationTokenSource.cancel()));let n=(0,a.Yd)("contentChangedSignal"),l=this._register(new s.uC(()=>n.trigger(void 0),200));this._register((0,a.fm)(t=>{let i=this._unchangedRegions.read(t);if(!i||i.regions.some(e=>e.isDragged.read(t)))return;let n=i.originalDecorationIds.map(t=>e.original.getDecorationRange(t)).map(e=>e?u.M.fromRangeInclusive(e):void 0),s=i.modifiedDecorationIds.map(t=>e.modified.getDecorationRange(t)).map(e=>e?u.M.fromRangeInclusive(e):void 0),o=i.regions.map((e,i)=>n[i]&&s[i]?new R(n[i].startLineNumber,s[i].startLineNumber,n[i].length,e.visibleLineCountTop.read(t),e.visibleLineCountBottom.read(t)):void 0).filter(D.O9),r=[],l=!1;for(let e of(0,I.n)(o,(e,i)=>e.getHiddenModifiedRange(t).endLineNumberExclusive===i.getHiddenModifiedRange(t).startLineNumber))if(e.length>1){l=!0;let t=e.reduce((e,t)=>e+t.lineCount,0),i=new R(e[0].originalLineNumber,e[0].modifiedLineNumber,t,e[0].visibleLineCountTop.read(void 0),e[e.length-1].visibleLineCountBottom.read(void 0));r.push(i)}else r.push(e[0]);if(l){let t=e.original.deltaDecorations(i.originalDecorationIds,r.map(e=>({range:e.originalUnchangedRange.toInclusiveRange(),options:{description:"unchanged"}}))),n=e.modified.deltaDecorations(i.modifiedDecorationIds,r.map(e=>({range:e.modifiedUnchangedRange.toInclusiveRange(),options:{description:"unchanged"}})));(0,a.Rn)(e=>{this._unchangedRegions.set({regions:r,originalDecorationIds:t,modifiedDecorationIds:n},e)})}}));let h=(t,i,n)=>{let s,o=R.fromDiffs(t.changes,e.original.getLineCount(),e.modified.getLineCount(),this._options.hideUnchangedRegionsMinimumLineCount.read(n),this._options.hideUnchangedRegionsContextLineCount.read(n)),r=this._unchangedRegions.get();if(r){let t=r.originalDecorationIds.map(t=>e.original.getDecorationRange(t)).map(e=>e?u.M.fromRangeInclusive(e):void 0),i=r.modifiedDecorationIds.map(t=>e.modified.getDecorationRange(t)).map(e=>e?u.M.fromRangeInclusive(e):void 0),o=(0,w.EK)(r.regions.map((e,n)=>{if(!t[n]||!i[n])return;let s=t[n].length;return new R(t[n].startLineNumber,i[n].startLineNumber,s,Math.min(e.visibleLineCountTop.get(),s),Math.min(e.visibleLineCountBottom.get(),s-e.visibleLineCountTop.get()))}).filter(D.O9),(e,t)=>!t||e.modifiedLineNumber>=t.modifiedLineNumber+t.lineCount&&e.originalLineNumber>=t.originalLineNumber+t.lineCount).map(e=>new g.WL(e.getHiddenOriginalRange(n),e.getHiddenModifiedRange(n)));o=g.WL.clip(o,u.M.ofLength(1,e.original.getLineCount()),u.M.ofLength(1,e.modified.getLineCount())),s=g.WL.inverse(o,e.original.getLineCount(),e.modified.getLineCount())}let a=[];if(s)for(let e of o){let t=s.filter(t=>t.original.intersectsStrict(e.originalUnchangedRange)&&t.modified.intersectsStrict(e.modifiedUnchangedRange));a.push(...e.setVisibleRanges(t,i))}else a.push(...o);let l=e.original.deltaDecorations(r?.originalDecorationIds||[],a.map(e=>({range:e.originalUnchangedRange.toInclusiveRange(),options:{description:"unchanged"}}))),h=e.modified.deltaDecorations(r?.modifiedDecorationIds||[],a.map(e=>({range:e.modifiedUnchangedRange.toInclusiveRange(),options:{description:"unchanged"}})));this._unchangedRegions.set({regions:a,originalDecorationIds:l,modifiedDecorationIds:h},i)};this._register(e.modified.onDidChangeContent(t=>{if(this._diff.get()){let i=k.c.fromModelContentChanges(t.changes),n=P(this._lastDiff,i,e.original,e.modified);n&&(this._lastDiff=n,(0,a.Rn)(e=>{this._diff.set(M.fromDiffResult(this._lastDiff),e),h(n,e);let t=this.movedTextToCompare.get();this.movedTextToCompare.set(t?this._lastDiff.moves.find(e=>e.lineRangeMapping.modified.intersect(t.lineRangeMapping.modified)):void 0,e)}))}this._isDiffUpToDate.set(!1,void 0),l.schedule()})),this._register(e.original.onDidChangeContent(t=>{if(this._diff.get()){let i=k.c.fromModelContentChanges(t.changes),n=O(this._lastDiff,i,e.original,e.modified);n&&(this._lastDiff=n,(0,a.Rn)(e=>{this._diff.set(M.fromDiffResult(this._lastDiff),e),h(n,e);let t=this.movedTextToCompare.get();this.movedTextToCompare.set(t?this._lastDiff.moves.find(e=>e.lineRangeMapping.modified.intersect(t.lineRangeMapping.modified)):void 0,e)}))}this._isDiffUpToDate.set(!1,void 0),l.schedule()})),this._register((0,a.yC)(async(t,i)=>{this._options.hideUnchangedRegionsMinimumLineCount.read(t),this._options.hideUnchangedRegionsContextLineCount.read(t),l.cancel(),n.read(t);let s=this._diffProvider.read(t);s.onChangeSignal.read(t),(0,y.b6)(S.D,t),(0,y.b6)(L.NC,t),this._isDiffUpToDate.set(!1,void 0);let o=[];i.add(e.original.onDidChangeContent(e=>{let t=k.c.fromModelContentChanges(e.changes);o=(0,x.M)(o,t)}));let r=[];i.add(e.modified.onDidChangeContent(e=>{let t=k.c.fromModelContentChanges(e.changes);r=(0,x.M)(r,t)}));let d=await s.diffProvider.computeDiff(e.original,e.modified,{ignoreTrimWhitespace:this._options.ignoreTrimWhitespace.read(t),maxComputationTimeMs:this._options.maxComputationTimeMs.read(t),computeMoves:this._options.showMoves.read(t)},this._cancellationTokenSource.token);!this._cancellationTokenSource.token.isCancellationRequested&&(e.original.isDisposed()||e.modified.isDisposed()||(d=P(d=O(d=function(e,t,i){return{changes:e.changes.map(e=>new g.wm(e.original,e.modified,e.innerChanges?e.innerChanges.map(e=>{var n,s,o;let r,a;return n=e,s=t,o=i,r=n.originalRange,a=n.modifiedRange,1===r.startColumn&&1===a.startColumn&&(1!==r.endColumn||1!==a.endColumn)&&r.endColumn===s.getLineMaxColumn(r.endLineNumber)&&a.endColumn===o.getLineMaxColumn(a.endLineNumber)&&r.endLineNumber<s.getLineCount()&&a.endLineNumber<o.getLineCount()&&(r=r.setEndPosition(r.endLineNumber+1,1),a=a.setEndPosition(a.endLineNumber+1,1)),new g.q6(r,a)}):void 0)),moves:e.moves,identical:e.identical,quitEarly:e.quitEarly}}(d,e.original,e.modified),o,e.original,e.modified)??d,r,e.original,e.modified)??d,(0,a.Rn)(e=>{h(d,e),this._lastDiff=d;let t=M.fromDiffResult(d);this._diff.set(t,e),this._isDiffUpToDate.set(!0,e);let i=this.movedTextToCompare.read(void 0);this.movedTextToCompare.set(i?this._lastDiff.moves.find(e=>e.lineRangeMapping.modified.intersect(i.lineRangeMapping.modified)):void 0,e)})))}))}ensureModifiedLineIsVisible(e,t,i){if(this.diff.get()?.mappings.length!==0){for(let n of this._unchangedRegions.get()?.regions||[])if(n.getHiddenModifiedRange(void 0).contains(e))return void n.showModifiedLine(e,t,i)}}ensureOriginalLineIsVisible(e,t,i){if(this.diff.get()?.mappings.length!==0){for(let n of this._unchangedRegions.get()?.regions||[])if(n.getHiddenOriginalRange(void 0).contains(e))return void n.showOriginalLine(e,t,i)}}async waitForDiff(){await (0,a.oJ)(this.isDiffUpToDate,e=>e)}serializeState(){let e=this._unchangedRegions.get();return{collapsedRegions:e?.regions.map(e=>({range:e.getHiddenModifiedRange(void 0).serialize()}))}}restoreSerializedState(e){let t=e.collapsedRegions?.map(e=>u.M.deserialize(e.range)),i=this._unchangedRegions.get();i&&t&&(0,a.Rn)(e=>{for(let n of i.regions)for(let i of t)if(n.modifiedUnchangedRange.intersect(i)){n.setHiddenModifiedRange(i,e);break}})}};E=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([function(e,t){v(e,t,2)}],E);class M{static fromDiffResult(e){return new M(e.changes.map(e=>new T(e)),e.moves||[],e.identical,e.quitEarly)}constructor(e,t,i,n){this.mappings=e,this.movedTexts=t,this.identical=i,this.quitEarly=n}}class T{constructor(e){this.lineRangeMapping=e}}class R{static fromDiffs(e,t,i,n,s){let o=g.wm.inverse(e,t,i),r=[];for(let e of o){let o=e.original.startLineNumber,a=e.modified.startLineNumber,l=e.original.length,h=1===o&&1===a,d=o+l===t+1&&a+l===i+1;(h||d)&&l>=s+n?(h&&!d&&(l-=s),d&&!h&&(o+=s,a+=s,l-=s),r.push(new R(o,a,l,0,0))):l>=2*s+n&&(o+=s,a+=s,l-=2*s,r.push(new R(o,a,l,0,0)))}return r}get originalUnchangedRange(){return u.M.ofLength(this.originalLineNumber,this.lineCount)}get modifiedUnchangedRange(){return u.M.ofLength(this.modifiedLineNumber,this.lineCount)}constructor(e,t,i,n,s){this.originalLineNumber=e,this.modifiedLineNumber=t,this.lineCount=i,this._visibleLineCountTop=(0,a.FY)(this,0),this.visibleLineCountTop=this._visibleLineCountTop,this._visibleLineCountBottom=(0,a.FY)(this,0),this.visibleLineCountBottom=this._visibleLineCountBottom,this._shouldHideControls=(0,a.un)(this,e=>this.visibleLineCountTop.read(e)+this.visibleLineCountBottom.read(e)===this.lineCount&&!this.isDragged.read(e)),this.isDragged=(0,a.FY)(this,void 0);let o=Math.max(Math.min(n,this.lineCount),0),r=Math.max(Math.min(s,this.lineCount-n),0);(0,N.V7)(n===o),(0,N.V7)(s===r),this._visibleLineCountTop.set(o,void 0),this._visibleLineCountBottom.set(r,void 0)}setVisibleRanges(e,t){let i=[],n=new u.S(e.map(e=>e.modified)).subtractFrom(this.modifiedUnchangedRange),s=this.originalLineNumber,o=this.modifiedLineNumber,r=this.modifiedLineNumber+this.lineCount;if(0===n.ranges.length)this.showAll(t),i.push(this);else{let e=0;for(let a of n.ranges){let l=e===n.ranges.length-1;e++;let h=(l?r:a.endLineNumberExclusive)-o,d=new R(s,o,h,0,0);d.setHiddenModifiedRange(a,t),i.push(d),s=d.originalUnchangedRange.endLineNumberExclusive,o=d.modifiedUnchangedRange.endLineNumberExclusive}}return i}shouldHideControls(e){return this._shouldHideControls.read(e)}getHiddenOriginalRange(e){return u.M.ofLength(this.originalLineNumber+this._visibleLineCountTop.read(e),this.lineCount-this._visibleLineCountTop.read(e)-this._visibleLineCountBottom.read(e))}getHiddenModifiedRange(e){return u.M.ofLength(this.modifiedLineNumber+this._visibleLineCountTop.read(e),this.lineCount-this._visibleLineCountTop.read(e)-this._visibleLineCountBottom.read(e))}setHiddenModifiedRange(e,t){let i=e.startLineNumber-this.modifiedLineNumber,n=this.modifiedLineNumber+this.lineCount-e.endLineNumberExclusive;this.setState(i,n,t)}getMaxVisibleLineCountTop(){return this.lineCount-this._visibleLineCountBottom.get()}getMaxVisibleLineCountBottom(){return this.lineCount-this._visibleLineCountTop.get()}showMoreAbove(e=10,t){let i=this.getMaxVisibleLineCountTop();this._visibleLineCountTop.set(Math.min(this._visibleLineCountTop.get()+e,i),t)}showMoreBelow(e=10,t){let i=this.lineCount-this._visibleLineCountTop.get();this._visibleLineCountBottom.set(Math.min(this._visibleLineCountBottom.get()+e,i),t)}showAll(e){this._visibleLineCountBottom.set(this.lineCount-this._visibleLineCountTop.get(),e)}showModifiedLine(e,t,i){let n=e+1-(this.modifiedLineNumber+this._visibleLineCountTop.get()),s=this.modifiedLineNumber-this._visibleLineCountBottom.get()+this.lineCount-e;0===t&&n<s||1===t?this._visibleLineCountTop.set(this._visibleLineCountTop.get()+n,i):this._visibleLineCountBottom.set(this._visibleLineCountBottom.get()+s,i)}showOriginalLine(e,t,i){let n=e-this.originalLineNumber,s=this.originalLineNumber+this.lineCount-e;0===t&&n<s||1===t?this._visibleLineCountTop.set(Math.min(this._visibleLineCountTop.get()+s-n,this.getMaxVisibleLineCountTop()),i):this._visibleLineCountBottom.set(Math.min(this._visibleLineCountBottom.get()+n-s,this.getMaxVisibleLineCountBottom()),i)}collapseAll(e){this._visibleLineCountTop.set(0,e),this._visibleLineCountBottom.set(0,e)}setState(e,t,i){e=Math.max(Math.min(e,this.lineCount),0),t=Math.max(Math.min(t,this.lineCount-e),0),this._visibleLineCountTop.set(e,i),this._visibleLineCountBottom.set(t,i)}}function O(e,t,i,n){}function P(e,t,i,n){}},50975:()=>{},51094:(e,t,i)=>{"use strict";i.d(t,{Z:()=>o,l:()=>s});var n=i(22263);let s=(0,n.u1)("contextViewService"),o=(0,n.u1)("contextMenuService")},51154:()=>{},51207:()=>{},51280:(e,t,i)=>{"use strict";i.d(t,{As:()=>o,qg:()=>r});var n=i(96691),s=i(55296);function o(e){return JSON.stringify(e,a)}function r(e){let t=JSON.parse(e);return function e(t,i=0){if(!t||i>200)return t;if("object"==typeof t){switch(t.$mid){case 1:return s.r.revive(t);case 2:return new RegExp(t.source,t.flags);case 17:return new Date(t.source)}if(t instanceof n.MB||t instanceof Uint8Array)return t;if(Array.isArray(t))for(let n=0;n<t.length;++n)t[n]=e(t[n],i+1);else for(let n in t)Object.hasOwnProperty.call(t,n)&&(t[n]=e(t[n],i+1))}return t}(t)}function a(e,t){return t instanceof RegExp?{$mid:2,source:t.source,flags:t.flags}:t}},51447:(e,t,i)=>{"use strict";i.d(t,{T:()=>eJ});var n,s,o,r,a=i(87899),l=i(46843),h=i(6033),d=i(17354),c=i(12033),u=i(82102),g=i(76946),p=i(94321),m=i(8820),f=i(22263),_=i(18169),v=i(31293),b=i(32091),C=i(788),w=i(72553),y=i(23047),S=i(45470),k=i(42506),x=i(50518),L=i(89597),D=i(70518),I=i(54867),N=i(30117),E=i(44987),M=i(78271),T=i(5488),R=i(55354),O=i(27281),P=i(89197),A=i(72150),F=i(85462),B=i(71819),W=i(52607),H=i(24224),V=i(58441),z=i(72667),U=i(57120),j=i(15957),$=i(22212);i(56482);var K=i(39205),G=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},q=function(e,t){return function(i,n){t(i,n,e)}};let Q=(0,$.pU)("diff-review-insert",R.W.add,(0,j.kg)(94,"Icon for 'Insert' in accessible diff viewer.")),Y=(0,$.pU)("diff-review-remove",R.W.remove,(0,j.kg)(95,"Icon for 'Remove' in accessible diff viewer.")),Z=(0,$.pU)("diff-review-close",R.W.close,(0,j.kg)(96,"Icon for 'Close' in accessible diff viewer.")),X=class extends u.jG{static{this._ttPolicy=(0,N.H)("diffReview",{createHTML:e=>e})}constructor(e,t,i,n,s,o,r,a,l){super(),this._parentNode=e,this._visible=t,this._setVisible=i,this._canClose=n,this._width=s,this._height=o,this._diffs=r,this._models=a,this._instantiationService=l,this._state=(0,g.un)(this,e=>{let t=this._visible.read(e);if(this._parentNode.style.visibility=t?"visible":"hidden",!t)return null;let i=e.store.add(this._instantiationService.createInstance(J,this._diffs,this._models,this._setVisible,this._canClose)),n=e.store.add(this._instantiationService.createInstance(eo,this._parentNode,i,this._width,this._height,this._models));return{model:i,view:n}}).recomputeInitiallyAndOnChange(this._store)}next(){(0,g.Rn)(e=>{let t=this._visible.get();this._setVisible(!0,e),t&&this._state.get().model.nextGroup(e)})}prev(){(0,g.Rn)(e=>{this._setVisible(!0,e),this._state.get().model.previousGroup(e)})}close(){(0,g.Rn)(e=>{this._setVisible(!1,e)})}};X=G([q(8,f._Y)],X);let J=class extends u.jG{constructor(e,t,i,n,s){super(),this._diffs=e,this._models=t,this._setVisible=i,this.canClose=n,this._accessibilitySignalService=s,this._groups=(0,g.FY)(this,[]),this._currentGroupIdx=(0,g.FY)(this,0),this._currentElementIdx=(0,g.FY)(this,0),this.groups=this._groups,this.currentGroup=this._currentGroupIdx.map((e,t)=>this._groups.read(t)[e]),this.currentGroupIndex=this._currentGroupIdx,this.currentElement=this._currentElementIdx.map((e,t)=>this.currentGroup.read(t)?.lines[e]),this._register((0,g.fm)(e=>{let t=this._diffs.read(e);if(!t)return void this._groups.set([],void 0);let i=function(e,t,i){let n=[];for(let s of(0,T.n)(e,(e,t)=>t.modified.startLineNumber-e.modified.endLineNumberExclusive<6)){let e=[];e.push(new et);let o=new C.M(Math.max(1,s[0].original.startLineNumber-3),Math.min(s[s.length-1].original.endLineNumberExclusive+3,t+1)),r=new C.M(Math.max(1,s[0].modified.startLineNumber-3),Math.min(s[s.length-1].modified.endLineNumberExclusive+3,i+1));(0,T.pN)(s,(t,i)=>{let n=new C.M(t?t.original.endLineNumberExclusive:o.startLineNumber,i?i.original.startLineNumber:o.endLineNumberExclusive),s=new C.M(t?t.modified.endLineNumberExclusive:r.startLineNumber,i?i.modified.startLineNumber:r.endLineNumberExclusive);n.forEach(t=>{e.push(new es(t,s.startLineNumber+(t-n.startLineNumber)))}),i&&(i.original.forEach(t=>{e.push(new ei(i,t))}),i.modified.forEach(t=>{e.push(new en(i,t))}))});let a=s[0].modified.join(s[s.length-1].modified),l=s[0].original.join(s[s.length-1].original);n.push(new ee(new W.WL(a,l),e))}return n}(t,this._models.getOriginalModel().getLineCount(),this._models.getModifiedModel().getLineCount());(0,g.Rn)(e=>{let t=this._models.getModifiedPosition();if(t){let n=i.findIndex(e=>t?.lineNumber<e.range.modified.endLineNumberExclusive);-1!==n&&this._currentGroupIdx.set(n,e)}this._groups.set(i,e)})})),this._register((0,g.fm)(e=>{let t=this.currentElement.read(e);t?.type===o.Deleted?this._accessibilitySignalService.playSignal(p.Rh.diffLineDeleted,{source:"accessibleDiffViewer.currentElementChanged"}):t?.type===o.Added&&this._accessibilitySignalService.playSignal(p.Rh.diffLineInserted,{source:"accessibleDiffViewer.currentElementChanged"})})),this._register((0,g.fm)(e=>{let t=this.currentElement.read(e);if(t&&t.type!==o.Header){let e=t.modifiedLineNumber??t.diff.modified.startLineNumber;this._models.modifiedSetSelection(y.Q.fromPositions(new w.y(e,1)))}}))}_goToGroupDelta(e,t){let i=this.groups.get();i&&!(i.length<=1)&&(0,g.PO)(t,t=>{this._currentGroupIdx.set(B.L.ofLength(i.length).clipCyclic(this._currentGroupIdx.get()+e),t),this._currentElementIdx.set(0,t)})}nextGroup(e){this._goToGroupDelta(1,e)}previousGroup(e){this._goToGroupDelta(-1,e)}_goToLineDelta(e){let t=this.currentGroup.get();t&&!(t.lines.length<=1)&&(0,g.Rn)(i=>{this._currentElementIdx.set(B.L.ofLength(t.lines.length).clip(this._currentElementIdx.get()+e),i)})}goToNextLine(){this._goToLineDelta(1)}goToPreviousLine(){this._goToLineDelta(-1)}goToLine(e){let t=this.currentGroup.get();if(!t)return;let i=t.lines.indexOf(e);-1!==i&&(0,g.Rn)(e=>{this._currentElementIdx.set(i,e)})}revealCurrentElementInEditor(){if(!this.canClose.get())return;this._setVisible(!1,void 0);let e=this.currentElement.get();e&&(e.type===o.Deleted?this._models.originalReveal(y.Q.fromPositions(new w.y(e.originalLineNumber,1))):this._models.modifiedReveal(e.type!==o.Header?y.Q.fromPositions(new w.y(e.modifiedLineNumber,1)):void 0))}close(){this.canClose.get()&&(this._setVisible(!1,void 0),this._models.modifiedFocus())}};J=G([q(4,p.Nt)],J),!function(e){e[e.Header=0]="Header",e[e.Unchanged=1]="Unchanged",e[e.Deleted=2]="Deleted",e[e.Added=3]="Added"}(o||(o={}));class ee{constructor(e,t){this.range=e,this.lines=t}}class et{constructor(){this.type=o.Header}}class ei{constructor(e,t){this.diff=e,this.originalLineNumber=t,this.type=o.Deleted,this.modifiedLineNumber=void 0}}class en{constructor(e,t){this.diff=e,this.modifiedLineNumber=t,this.type=o.Added,this.originalLineNumber=void 0}}class es{constructor(e,t){this.originalLineNumber=e,this.modifiedLineNumber=t,this.type=o.Unchanged}}let eo=class extends u.jG{constructor(e,t,i,n,s,o){super(),this._element=e,this._model=t,this._width=i,this._height=n,this._models=s,this._languageService=o,this.domNode=this._element,this.domNode.className="monaco-component diff-review monaco-editor-background";let r=document.createElement("div");r.className="diff-review-actions",this._actionBar=this._register(new E.E(r)),this._register((0,g.fm)(e=>{this._actionBar.clear(),this._model.canClose.read(e)&&this._actionBar.push((0,K.ih)({id:"diffreview.close",label:(0,j.kg)(97,"Close"),class:"close-diff-review "+O.L.asClassName(Z),enabled:!0,run:async()=>t.close()}),{label:!1,icon:!0})})),this._content=document.createElement("div"),this._content.className="diff-review-content",this._content.setAttribute("role","code"),this._scrollbar=this._register(new M.MU(this._content,{})),(0,a.Ln)(this.domNode,this._scrollbar.getDomNode(),r),this._register((0,g.fm)(e=>{this._height.read(e),this._width.read(e),this._scrollbar.scanDomNode()})),this._register((0,u.s)(()=>{(0,a.Ln)(this.domNode)})),this._register((0,A.AV)(this.domNode,{width:this._width,height:this._height})),this._register((0,A.AV)(this._content,{width:this._width,height:this._height})),this._register((0,g.yC)((e,t)=>{this._model.currentGroup.read(e),this._render(t)})),this._register((0,a.un)(this.domNode,"keydown",e=>{(e.equals(18)||e.equals(2066)||e.equals(530))&&(e.preventDefault(),this._model.goToNextLine()),(e.equals(16)||e.equals(2064)||e.equals(528))&&(e.preventDefault(),this._model.goToPreviousLine()),(e.equals(9)||e.equals(2057)||e.equals(521)||e.equals(1033))&&(e.preventDefault(),this._model.close()),(e.equals(10)||e.equals(3))&&(e.preventDefault(),this._model.revealCurrentElementInEditor())}))}_render(e){let t=this._models.getOriginalOptions(),i=this._models.getModifiedOptions(),n=document.createElement("div");n.className="diff-review-table",n.setAttribute("role","list"),n.setAttribute("aria-label",(0,j.kg)(98,"Accessible Diff Viewer. Use arrow up and down to navigate.")),(0,P.M)(n,i.get(59)),(0,a.Ln)(this._content,n);let s=this._models.getOriginalModel(),r=this._models.getModifiedModel();if(!s||!r)return;let l=s.getOptions(),h=r.getOptions(),d=i.get(75),c=this._model.currentGroup.get();for(let u of c?.lines||[]){let p;if(!c)break;if(u.type===o.Header){let e=document.createElement("div");e.className="diff-review-row",e.setAttribute("role","listitem");let t=c.range,i=this._model.currentGroupIndex.get(),n=this._model.groups.get().length,s=e=>0===e?(0,j.kg)(99,"no lines changed"):1===e?(0,j.kg)(100,"1 line changed"):(0,j.kg)(101,"{0} lines changed",e),o=s(t.original.length),r=s(t.modified.length);e.setAttribute("aria-label",(0,j.kg)(102,"Difference {0} of {1}: original line {2}, {3}, modified line {4}, {5}",i+1,n,t.original.startLineNumber,o,t.modified.startLineNumber,r));let a=document.createElement("div");a.className="diff-review-cell diff-review-summary",a.appendChild(document.createTextNode(`${i+1}/${n}: @@ -${t.original.startLineNumber},${t.original.length} +${t.modified.startLineNumber},${t.modified.length} @@`)),e.appendChild(a),p=e}else p=this._createRow(u,d,this._width.get(),t,s,l,i,r,h);n.appendChild(p);let m=(0,g.un)(e=>this._model.currentElement.read(e)===u);e.add((0,g.fm)(e=>{let t=m.read(e);p.tabIndex=t?0:-1,t&&p.focus()})),e.add((0,a.ko)(p,"focus",()=>{this._model.goToLine(u)}))}this._scrollbar.scanDomNode()}_createRow(e,t,i,n,s,r,a,l,h){let d,c=n.get(165),u=c.glyphMarginWidth+c.lineNumbersWidth,g=a.get(165),p=10+g.glyphMarginWidth+g.lineNumbersWidth,m="diff-review-row",f="",_=null;switch(e.type){case o.Added:m="diff-review-row line-insert",f=" char-insert",_=Q;break;case o.Deleted:m="diff-review-row line-delete",f=" char-delete",_=Y}let v=document.createElement("div");v.style.minWidth=i+"px",v.className=m,v.setAttribute("role","listitem"),v.ariaLevel="";let b=document.createElement("div");b.className="diff-review-cell",b.style.height=`${t}px`,v.appendChild(b);let C=document.createElement("span");C.style.width=u+"px",C.style.minWidth=u+"px",C.className="diff-review-line-number"+f,void 0!==e.originalLineNumber?C.appendChild(document.createTextNode(String(e.originalLineNumber))):C.innerText="\xa0",b.appendChild(C);let w=document.createElement("span");w.style.width=p+"px",w.style.minWidth=p+"px",w.style.paddingRight="10px",w.className="diff-review-line-number"+f,void 0!==e.modifiedLineNumber?w.appendChild(document.createTextNode(String(e.modifiedLineNumber))):w.innerText="\xa0",b.appendChild(w);let y=document.createElement("span");if(y.className="diff-review-spacer",_){let e=document.createElement("span");e.className=O.L.asClassName(_),e.innerText="\xa0\xa0",y.appendChild(e)}else y.innerText="\xa0\xa0";if(b.appendChild(y),void 0!==e.modifiedLineNumber){let t=this._getLineHtml(l,a,h.tabSize,e.modifiedLineNumber,this._languageService.languageIdCodec);X._ttPolicy&&(t=X._ttPolicy.createHTML(t)),b.insertAdjacentHTML("beforeend",t),d=l.getLineContent(e.modifiedLineNumber)}else{let t=this._getLineHtml(s,n,r.tabSize,e.originalLineNumber,this._languageService.languageIdCodec);X._ttPolicy&&(t=X._ttPolicy.createHTML(t)),b.insertAdjacentHTML("beforeend",t),d=s.getLineContent(e.originalLineNumber)}0===d.length&&(d=(0,j.kg)(103,"blank"));let S="";switch(e.type){case o.Unchanged:S=e.originalLineNumber===e.modifiedLineNumber?(0,j.kg)(104,"{0} unchanged line {1}",d,e.originalLineNumber):(0,j.kg)(105,"{0} original line {1} modified line {2}",d,e.originalLineNumber,e.modifiedLineNumber);break;case o.Added:S=(0,j.kg)(106,"+ {0} modified line {1}",d,e.modifiedLineNumber);break;case o.Deleted:S=(0,j.kg)(107,"- {0} original line {1}",d,e.originalLineNumber)}return v.setAttribute("aria-label",S),v}_getLineHtml(e,t,i,n,s){let o=e.getLineContent(n),r=t.get(59),a=t.get(117).verticalScrollbarSize,l=V.f7.createEmpty(o,s),h=U.qL.isBasicASCII(o,e.mightContainNonBasicASCII()),d=U.qL.containsRTL(o,h,e.mightContainRTL());return(0,z.Md)(new z.zL(r.isMonospace&&!t.get(40),r.canUseHalfwidthRightwardsArrow,o,!1,h,d,0,l,[],i,0,r.spaceWidth,r.middotWidth,r.wsmiddotWidth,t.get(133),t.get(113),t.get(108),t.get(60)!==F.Bc.OFF,null,null,a)).html}};eo=G([q(5,H.L)],eo);class er{constructor(e){this.editors=e}getOriginalModel(){return this.editors.original.getModel()}getOriginalOptions(){return this.editors.original.getOptions()}originalReveal(e){this.editors.original.revealRange(e),this.editors.original.setSelection(e),this.editors.original.focus()}getModifiedModel(){return this.editors.modified.getModel()}getModifiedOptions(){return this.editors.modified.getOptions()}modifiedReveal(e){e&&(this.editors.modified.revealRange(e),this.editors.modified.setSelection(e)),this.editors.modified.focus()}modifiedSetSelection(e){this.editors.modified.setSelection(e)}modifiedFocus(){this.editors.modified.focus()}getModifiedPosition(){return this.editors.modified.getPosition()??void 0}}var ea=i(88164);class el extends u.jG{static{this.movedCodeBlockPadding=4}constructor(e,t,i,n,s){super(),this._rootElement=e,this._diffModel=t,this._originalEditorLayoutInfo=i,this._modifiedEditorLayoutInfo=n,this._editors=s,this._originalScrollTop=(0,g.y0)(this,this._editors.original.onDidScrollChange,()=>this._editors.original.getScrollTop()),this._modifiedScrollTop=(0,g.y0)(this,this._editors.modified.onDidScrollChange,()=>this._editors.modified.getScrollTop()),this._viewZonesChanged=(0,g.yQ)("onDidChangeViewZones",this._editors.modified.onDidChangeViewZones),this.width=(0,g.FY)(this,0),this._modifiedViewZonesChangedSignal=(0,g.yQ)("modified.onDidChangeViewZones",this._editors.modified.onDidChangeViewZones),this._originalViewZonesChangedSignal=(0,g.yQ)("original.onDidChangeViewZones",this._editors.original.onDidChangeViewZones),this._state=(0,g.un)(this,e=>{this._element.replaceChildren();let t=this._diffModel.read(e),i=t?.diff.read(e)?.movedTexts;if(!i||0===i.length)return void this.width.set(0,void 0);this._viewZonesChanged.read(e);let n=this._originalEditorLayoutInfo.read(e),s=this._modifiedEditorLayoutInfo.read(e);if(!n||!s)return void this.width.set(0,void 0);this._modifiedViewZonesChangedSignal.read(e),this._originalViewZonesChangedSignal.read(e);let o=i.map(t=>{function i(e,t){return(t.getTopForLineNumber(e.startLineNumber,!0)+t.getTopForLineNumber(e.endLineNumberExclusive,!0))/2}let n=i(t.lineRangeMapping.original,this._editors.original),s=this._originalScrollTop.read(e),o=i(t.lineRangeMapping.modified,this._editors.modified),r=this._modifiedScrollTop.read(e),a=n-s,l=o-r,h=Math.min(n,o),d=Math.max(n,o);return{range:new B.L(h,d),from:a,to:l,fromWithoutScroll:n,toWithoutScroll:o,move:t}});o.sort((0,T.nH)((0,T.VE)(e=>e.fromWithoutScroll>e.toWithoutScroll,T.TS),(0,T.VE)(e=>e.fromWithoutScroll>e.toWithoutScroll?e.fromWithoutScroll:-e.toWithoutScroll,T.U9)));let r=eh.compute(o.map(e=>e.range)),a=n.verticalScrollbarWidth,l=(r.getTrackCount()-1)*10+20,h=a+l+(s.contentLeft-el.movedCodeBlockPadding),d=0;for(let i of o){let n=a+10+10*r.getTrack(d),o=s.glyphMarginWidth+s.lineNumbersWidth,l=document.createElementNS("http://www.w3.org/2000/svg","rect");l.classList.add("arrow-rectangle"),l.setAttribute("x",`${h-o}`),l.setAttribute("y",`${i.to-9}`),l.setAttribute("width",`${o}`),l.setAttribute("height","18"),this._element.appendChild(l);let c=document.createElementNS("http://www.w3.org/2000/svg","g"),u=document.createElementNS("http://www.w3.org/2000/svg","path");u.setAttribute("d",`M 0 ${i.from} L ${n} ${i.from} L ${n} ${i.to} L ${h-15} ${i.to}`),u.setAttribute("fill","none"),c.appendChild(u);let p=document.createElementNS("http://www.w3.org/2000/svg","polygon");p.classList.add("arrow"),e.store.add((0,g.fm)(e=>{u.classList.toggle("currentMove",i.move===t.activeMovedText.read(e)),p.classList.toggle("currentMove",i.move===t.activeMovedText.read(e))})),p.setAttribute("points",`${h-15},${i.to-7.5} ${h},${i.to} ${h-15},${i.to+7.5}`),c.appendChild(p),this._element.appendChild(c),d++}this.width.set(l,void 0)}),this._element=document.createElementNS("http://www.w3.org/2000/svg","svg"),this._element.setAttribute("class","moved-blocks-lines"),this._rootElement.appendChild(this._element),this._register((0,u.s)(()=>this._element.remove())),this._register((0,g.fm)(e=>{let t=this._originalEditorLayoutInfo.read(e),i=this._modifiedEditorLayoutInfo.read(e);t&&i&&(this._element.style.left=`${t.width-t.verticalScrollbarWidth}px`,this._element.style.height=`${t.height}px`,this._element.style.width=`${t.verticalScrollbarWidth+t.contentLeft-el.movedCodeBlockPadding+this.width.read(e)}px`)})),this._register((0,g.OI)(this._state));let o=(0,g.un)(e=>{let t=this._diffModel.read(e),i=t?.diff.read(e);return i?i.movedTexts.map(e=>({move:e,original:new A.D1((0,g.lk)(e.lineRangeMapping.original.startLineNumber-1),18),modified:new A.D1((0,g.lk)(e.lineRangeMapping.modified.startLineNumber-1),18)})):[]});this._register((0,A.Vs)(this._editors.original,o.map(e=>e.map(e=>e.original)))),this._register((0,A.Vs)(this._editors.modified,o.map(e=>e.map(e=>e.modified)))),this._register((0,g.yC)((e,t)=>{for(let i of o.read(e))t.add(new ed(this._editors.original,i.original,i.move,"original",this._diffModel.get())),t.add(new ed(this._editors.modified,i.modified,i.move,"modified",this._diffModel.get()))}));let r=(0,g.yQ)("original.onDidFocusEditorWidget",e=>this._editors.original.onDidFocusEditorWidget(()=>setTimeout(()=>e(void 0),0))),a=(0,g.yQ)("modified.onDidFocusEditorWidget",e=>this._editors.modified.onDidFocusEditorWidget(()=>setTimeout(()=>e(void 0),0))),l="modified";this._register((0,g.Y)({changeTracker:{createChangeSummary:()=>void 0,handleChange:(e,t)=>(e.didChange(r)&&(l="original"),e.didChange(a)&&(l="modified"),!0)}},e=>{let t;r.read(e),a.read(e);let i=this._diffModel.read(e);if(!i)return;let n=i.diff.read(e);if(n&&"original"===l){let i=this._editors.originalCursor.read(e);i&&(t=n.movedTexts.find(e=>e.lineRangeMapping.original.contains(i.lineNumber)))}if(n&&"modified"===l){let i=this._editors.modifiedCursor.read(e);i&&(t=n.movedTexts.find(e=>e.lineRangeMapping.modified.contains(i.lineNumber)))}t!==i.movedTextToCompare.read(void 0)&&i.movedTextToCompare.set(void 0,void 0),i.setActiveMovedText(t)}))}}class eh{static compute(e){let t=[],i=[];for(let n of e){let e=t.findIndex(e=>!e.intersectsStrict(n));-1===e&&(t.length>=6?e=(0,l.TM)(t,(0,T.VE)(e=>e.intersectWithRangeLength(n),T.U9)):(e=t.length,t.push(new B.h))),t[e].addRange(n),i.push(e)}return new eh(t.length,i)}constructor(e,t){this._trackCount=e,this.trackPerLineIdx=t}getTrack(e){return this.trackPerLineIdx[e]}getTrackCount(){return this._trackCount}}class ed extends A.uN{constructor(e,t,i,n,s){let o,r=(0,a.h)("div.diff-hidden-lines-widget");super(e,t,r.root),this._editor=e,this._move=i,this._kind=n,this._diffModel=s,this._nodes=(0,a.h)("div.diff-moved-code-block",{style:{marginRight:"4px"}},[(0,a.h)("div.text-content@textContent"),(0,a.h)("div.action-bar@actionBar")]),r.root.appendChild(this._nodes.root);let l=(0,g.y0)(this._editor.onDidLayoutChange,()=>this._editor.getLayoutInfo());this._register((0,A.AV)(this._nodes.root,{paddingRight:l.map(e=>e.verticalScrollbarWidth)})),o=i.changes.length>0?"original"===this._kind?(0,j.kg)(128,"Code moved with changes to line {0}-{1}",this._move.lineRangeMapping.modified.startLineNumber,this._move.lineRangeMapping.modified.endLineNumberExclusive-1):(0,j.kg)(129,"Code moved with changes from line {0}-{1}",this._move.lineRangeMapping.original.startLineNumber,this._move.lineRangeMapping.original.endLineNumberExclusive-1):"original"===this._kind?(0,j.kg)(130,"Code moved to line {0}-{1}",this._move.lineRangeMapping.modified.startLineNumber,this._move.lineRangeMapping.modified.endLineNumberExclusive-1):(0,j.kg)(131,"Code moved from line {0}-{1}",this._move.lineRangeMapping.original.startLineNumber,this._move.lineRangeMapping.original.endLineNumberExclusive-1);let h=this._register(new E.E(this._nodes.actionBar,{highlightToggledItems:!0})),d=new K.rc("",o,"",!1);h.push(d,{icon:!1,label:!0});let c=new K.rc("","Compare",O.L.asClassName(R.W.compareChanges),!0,()=>{this._editor.focus(),this._diffModel.movedTextToCompare.set(this._diffModel.movedTextToCompare.get()===i?void 0:this._move,void 0)});this._register((0,g.fm)(e=>{c.checked=this._diffModel.movedTextToCompare.read(e)===i})),h.push(c,{icon:!1,label:!0})}}var ec=i(54599);class eu extends u.jG{constructor(e,t,i,n){super(),this._editors=e,this._diffModel=t,this._options=i,this._decorations=(0,g.un)(this,e=>{let t=this._diffModel.read(e),i=t?.diff.read(e);if(!i)return null;let n=this._diffModel.read(e).movedTextToCompare.read(e),s=this._options.renderIndicators.read(e),o=this._options.showEmptyDecorations.read(e),r=[],a=[];if(!n)for(let n of i.mappings)if(n.lineRangeMapping.original.isEmpty||r.push({range:n.lineRangeMapping.original.toInclusiveRange(),options:s?ec.Ob:ec.XT}),n.lineRangeMapping.modified.isEmpty||a.push({range:n.lineRangeMapping.modified.toInclusiveRange(),options:s?ec.Kl:ec.Zw}),n.lineRangeMapping.modified.isEmpty||n.lineRangeMapping.original.isEmpty)n.lineRangeMapping.original.isEmpty||r.push({range:n.lineRangeMapping.original.toInclusiveRange(),options:ec.KL}),n.lineRangeMapping.modified.isEmpty||a.push({range:n.lineRangeMapping.modified.toInclusiveRange(),options:ec.Ou});else{let i=this._options.useTrueInlineDiffRendering.read(e)&&(0,ea.l9)(n.lineRangeMapping);for(let e of n.lineRangeMapping.innerChanges||[])if(n.lineRangeMapping.original.contains(e.originalRange.startLineNumber)&&r.push({range:e.originalRange,options:e.originalRange.isEmpty()&&o?ec.wp:ec.Zb}),n.lineRangeMapping.modified.contains(e.modifiedRange.startLineNumber)&&a.push({range:e.modifiedRange,options:e.modifiedRange.isEmpty()&&o&&!i?ec.GM:ec.bk}),i){let i=t.model.original.getValueInRange(e.originalRange);a.push({range:e.modifiedRange,options:{description:"deleted-text",before:{content:i,inlineClassName:"inline-deleted-text"},zIndex:1e5,showIfCollapsed:!0}})}}if(n)for(let e of n.changes){let t=e.original.toInclusiveRange();t&&r.push({range:t,options:s?ec.Ob:ec.XT});let i=e.modified.toInclusiveRange();for(let t of(i&&a.push({range:i,options:s?ec.Kl:ec.Zw}),e.innerChanges||[]))r.push({range:t.originalRange,options:ec.Zb}),a.push({range:t.modifiedRange,options:ec.bk})}let l=this._diffModel.read(e).activeMovedText.read(e);for(let e of i.movedTexts)r.push({range:e.lineRangeMapping.original.toInclusiveRange(),options:{description:"moved",blockClassName:"movedOriginal"+(e===l?" currentMove":""),blockPadding:[el.movedCodeBlockPadding,0,el.movedCodeBlockPadding,el.movedCodeBlockPadding]}}),a.push({range:e.lineRangeMapping.modified.toInclusiveRange(),options:{description:"moved",blockClassName:"movedModified"+(e===l?" currentMove":""),blockPadding:[4,0,4,4]}});return{originalDecorations:r,modifiedDecorations:a}}),this._register((0,A.pY)(this._editors.original,this._decorations.map(e=>e?.originalDecorations||[]))),this._register((0,A.pY)(this._editors.modified,this._decorations.map(e=>e?.modifiedDecorations||[])))}}var eg=i(25108),ep=i(7633),em=i(47088),ef=i(19267),e_=i(77715),ev=i(88298);let eb=class extends u.jG{static{r=this}static{this.ONE_OVERVIEW_WIDTH=15}static{this.ENTIRE_DIFF_OVERVIEW_WIDTH=2*this.ONE_OVERVIEW_WIDTH}constructor(e,t,i,n,s,o,l){super(),this._editors=e,this._rootElement=t,this._diffModel=i,this._rootWidth=n,this._rootHeight=s,this._modifiedEditorLayoutInfo=o,this._themeService=l,this.width=r.ENTIRE_DIFF_OVERVIEW_WIDTH;let h=(0,g.y0)(this._themeService.onDidColorThemeChange,()=>this._themeService.getColorTheme()),d=(0,g.un)(e=>{let t=h.read(e);return{insertColor:t.getColor(e_.ld8)||(t.getColor(e_.Gj6)||e_.EY1).transparent(2),removeColor:t.getColor(e_.$BZ)||(t.getColor(e_.GNm)||e_.ZEf).transparent(2)}}),c=(0,ep.Z)(document.createElement("div"));c.setClassName("diffViewport"),c.setPosition("absolute");let u=(0,a.h)("div.diffOverview",{style:{position:"absolute",top:"0px",width:r.ENTIRE_DIFF_OVERVIEW_WIDTH+"px"}}).root;this._register((0,A.rX)(u,c.domNode)),this._register((0,a.un)(u,a.Bx.POINTER_DOWN,e=>{this._editors.modified.delegateVerticalScrollbarPointerDown(e)})),this._register((0,a.ko)(u,a.Bx.MOUSE_WHEEL,e=>{this._editors.modified.delegateScrollFromMouseWheelEvent(e)},{passive:!1})),this._register((0,A.rX)(this._rootElement,u)),this._register((0,g.yC)((e,t)=>{let i=this._diffModel.read(e),n=this._editors.original.createOverviewRuler("original diffOverviewRuler");n&&(t.add(n),t.add((0,A.rX)(u,n.getDomNode())));let s=this._editors.modified.createOverviewRuler("modified diffOverviewRuler");if(s&&(t.add(s),t.add((0,A.rX)(u,s.getDomNode()))),!n||!s)return;let o=(0,g.yQ)("viewZoneChanged",this._editors.original.onDidChangeViewZones),a=(0,g.yQ)("viewZoneChanged",this._editors.modified.onDidChangeViewZones),l=(0,g.yQ)("hiddenRangesChanged",this._editors.original.onDidChangeHiddenAreas),h=(0,g.yQ)("hiddenRangesChanged",this._editors.modified.onDidChangeHiddenAreas);t.add((0,g.fm)(e=>{o.read(e),a.read(e),l.read(e),h.read(e);let t=d.read(e),r=i?.diff.read(e)?.mappings;function c(e,t,i){let n=i._getViewModel();return n?e.filter(e=>e.length>0).map(e=>{let i=n.coordinatesConverter.convertModelPositionToViewPosition(new w.y(e.startLineNumber,1)),s=n.coordinatesConverter.convertModelPositionToViewPosition(new w.y(e.endLineNumberExclusive,1)),o=s.lineNumber-i.lineNumber;return new ef.iE(i.lineNumber,s.lineNumber,o,t.toString())}):[]}let u=c((r||[]).map(e=>e.lineRangeMapping.original),t.removeColor,this._editors.original),g=c((r||[]).map(e=>e.lineRangeMapping.modified),t.insertColor,this._editors.modified);n?.setZones(u),s?.setZones(g)})),t.add((0,g.fm)(e=>{let t=this._rootHeight.read(e),i=this._rootWidth.read(e),o=this._modifiedEditorLayoutInfo.read(e);if(o){let i=r.ENTIRE_DIFF_OVERVIEW_WIDTH-2*r.ONE_OVERVIEW_WIDTH;n.setLayout({top:0,height:t,right:i+r.ONE_OVERVIEW_WIDTH,width:r.ONE_OVERVIEW_WIDTH}),s.setLayout({top:0,height:t,right:0,width:r.ONE_OVERVIEW_WIDTH});let a=this._editors.modifiedScrollTop.read(e),l=this._editors.modifiedScrollHeight.read(e),h=this._editors.modified.getOption(117),d=new em.m(h.verticalHasArrows?h.arrowSize:0,h.verticalScrollbarSize,0,o.height,l,a);c.setTop(d.getSliderPosition()),c.setHeight(d.getSliderSize())}else c.setTop(0),c.setHeight(0);u.style.height=t+"px",u.style.left=i-r.ENTIRE_DIFF_OVERVIEW_WIDTH+"px",c.setWidth(r.ENTIRE_DIFF_OVERVIEW_WIDTH)}))}))}};eb=r=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([(n=ev.Gy,function(e,t){n(e,t,6)})],eb);var eC=i(49195),ew=function(e,t){return function(i,n){t(i,n,e)}};let ey=class extends u.jG{get onDidContentSizeChange(){return this._onDidContentSizeChange.event}constructor(e,t,i,n,s,o,r,a){super(),this.originalEditorElement=e,this.modifiedEditorElement=t,this._options=i,this._argCodeEditorWidgetOptions=n,this._createInnerEditor=s,this._contextKeyService=o,this._instantiationService=r,this._keybindingService=a,this.original=this._register(this._createLeftHandSideEditor(this._options.editorOptions.get(),this._argCodeEditorWidgetOptions.originalEditor||{})),this.modified=this._register(this._createRightHandSideEditor(this._options.editorOptions.get(),this._argCodeEditorWidgetOptions.modifiedEditor||{})),this._onDidContentSizeChange=this._register(new d.vl),this.modifiedScrollTop=(0,g.y0)(this,this.modified.onDidScrollChange,()=>this.modified.getScrollTop()),this.modifiedScrollHeight=(0,g.y0)(this,this.modified.onDidScrollChange,()=>this.modified.getScrollHeight()),this.modifiedObs=(0,eg.U)(this.modified),this.originalObs=(0,eg.U)(this.original),this.modifiedModel=this.modifiedObs.model,this.modifiedSelections=(0,g.y0)(this,this.modified.onDidChangeCursorSelection,()=>this.modified.getSelections()??[]),this.modifiedCursor=(0,g.C)({owner:this,equalsFn:w.y.equals},e=>this.modifiedSelections.read(e)[0]?.getPosition()??new w.y(1,1)),this.originalCursor=(0,g.y0)(this,this.original.onDidChangeCursorPosition,()=>this.original.getPosition()??new w.y(1,1)),this.isOriginalFocused=(0,eg.U)(this.original).isFocused,this.isModifiedFocused=(0,eg.U)(this.modified).isFocused,this.isFocused=(0,g.un)(this,e=>this.isOriginalFocused.read(e)||this.isModifiedFocused.read(e)),this._argCodeEditorWidgetOptions=null,this._register((0,g.Y)({changeTracker:{createChangeSummary:()=>({}),handleChange:(e,t)=>(e.didChange(i.editorOptions)&&Object.assign(t,e.change.changedOptions),!0)}},(e,t)=>{i.editorOptions.read(e),this._options.renderSideBySide.read(e),this.modified.updateOptions(this._adjustOptionsForRightHandSide(e,t)),this.original.updateOptions(this._adjustOptionsForLeftHandSide(e,t))}))}_createLeftHandSideEditor(e,t){let i=this._adjustOptionsForLeftHandSide(void 0,e),n=this._constructInnerEditor(this._instantiationService,this.originalEditorElement,i,t),s=this._contextKeyService.createKey("isInDiffLeftEditor",n.hasWidgetFocus());return this._register(n.onDidFocusEditorWidget(()=>s.set(!0))),this._register(n.onDidBlurEditorWidget(()=>s.set(!1))),n}_createRightHandSideEditor(e,t){let i=this._adjustOptionsForRightHandSide(void 0,e),n=this._constructInnerEditor(this._instantiationService,this.modifiedEditorElement,i,t),s=this._contextKeyService.createKey("isInDiffRightEditor",n.hasWidgetFocus());return this._register(n.onDidFocusEditorWidget(()=>s.set(!0))),this._register(n.onDidBlurEditorWidget(()=>s.set(!1))),n}_constructInnerEditor(e,t,i,n){let s=this._createInnerEditor(e,t,i,n);return this._register(s.onDidContentSizeChange(e=>{let t=this.original.getContentWidth()+this.modified.getContentWidth()+eb.ENTIRE_DIFF_OVERVIEW_WIDTH,i=Math.max(this.modified.getContentHeight(),this.original.getContentHeight());this._onDidContentSizeChange.fire({contentHeight:i,contentWidth:t,contentHeightChanged:e.contentHeightChanged,contentWidthChanged:e.contentWidthChanged})})),s}_adjustOptionsForLeftHandSide(e,t){let i=this._adjustOptionsForSubEditor(t);return this._options.renderSideBySide.get()?(i.unicodeHighlight=this._options.editorOptions.get().unicodeHighlight||{},i.wordWrapOverride1=this._options.diffWordWrap.get()):(i.wordWrapOverride1="off",i.wordWrapOverride2="off",i.stickyScroll={enabled:!1},i.unicodeHighlight={nonBasicASCII:!1,ambiguousCharacters:!1,invisibleCharacters:!1}),i.glyphMargin=this._options.renderSideBySide.get(),t.originalAriaLabel&&(i.ariaLabel=t.originalAriaLabel),i.ariaLabel=this._updateAriaLabel(i.ariaLabel),i.readOnly=!this._options.originalEditable.get(),i.dropIntoEditor={enabled:!i.readOnly},i.extraEditorClassName="original-in-monaco-diff-editor",i}_adjustOptionsForRightHandSide(e,t){let i=this._adjustOptionsForSubEditor(t);return t.modifiedAriaLabel&&(i.ariaLabel=t.modifiedAriaLabel),i.ariaLabel=this._updateAriaLabel(i.ariaLabel),i.wordWrapOverride1=this._options.diffWordWrap.get(),i.revealHorizontalRightPadding=F.qB.revealHorizontalRightPadding.defaultValue+eb.ENTIRE_DIFF_OVERVIEW_WIDTH,i.scrollbar.verticalHasArrows=!1,i.extraEditorClassName="modified-in-monaco-diff-editor",i}_adjustOptionsForSubEditor(e){let t={...e,dimension:{height:0,width:0}};return t.inDiffEditor=!0,t.automaticLayout=!1,t.allowVariableLineHeights=!1,t.allowVariableFonts=!1,t.allowVariableFontsInAccessibilityMode=!1,t.scrollbar={...t.scrollbar||{}},t.folding=!1,t.codeLens=this._options.diffCodeLens.get(),t.fixedOverflowWidgets=!0,t.minimap={...t.minimap||{}},t.minimap.enabled=!1,this._options.hideUnchangedRegions.get()?t.stickyScroll={enabled:!1}:t.stickyScroll=this._options.editorOptions.get().stickyScroll,t}_updateAriaLabel(e){e||(e="");let t=(0,j.kg)(108," use {0} to open the accessibility help.",this._keybindingService.lookupKeybinding("editor.action.accessibilityHelp")?.getAriaLabel());return this._options.accessibilityVerbose.get()?e+t:e?e.replaceAll(t,""):""}};ey=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([ew(5,m.fN),ew(6,f._Y),ew(7,eC.b)],ey);var eS=i(29883);class ek{resetSash(){this._sashRatio.set(void 0,void 0)}constructor(e,t){this._options=e,this.dimensions=t,this.sashLeft=(0,g.dQ)(this,e=>{let t=this._sashRatio.read(e)??this._options.splitViewDefaultRatio.read(e);return this._computeSashLeft(t,e)},(e,t)=>{let i=this.dimensions.width.get();this._sashRatio.set(e/i,t)}),this._sashRatio=(0,g.FY)(this,void 0)}_computeSashLeft(e,t){let i=this.dimensions.width.read(t),n=Math.floor(this._options.splitViewDefaultRatio.read(t)*i),s=this._options.enableSplitViewResizing.read(t)?Math.floor(e*i):n;return i<=200?n:s<100?100:s>i-100?i-100:s}}class ex extends u.jG{constructor(e,t,i,n,s,o){super(),this._domNode=e,this._dimensions=t,this._enabled=i,this._boundarySashes=n,this.sashLeft=s,this._resetSash=o,this._sash=this._register(new eS.m(this._domNode,{getVerticalSashTop:e=>0,getVerticalSashLeft:e=>this.sashLeft.get(),getVerticalSashHeight:e=>this._dimensions.height.get()},{orientation:0})),this._startSashPosition=void 0,this._register(this._sash.onDidStart(()=>{this._startSashPosition=this.sashLeft.get()})),this._register(this._sash.onDidChange(e=>{this.sashLeft.set(this._startSashPosition+(e.currentX-e.startX),void 0)})),this._register(this._sash.onDidEnd(()=>this._sash.layout())),this._register(this._sash.onDidReset(()=>this._resetSash())),this._register((0,g.fm)(e=>{let t=this._boundarySashes.read(e);t&&(this._sash.orthogonalEndSash=t.bottom)})),this._register((0,g.fm)(e=>{let t=this._enabled.read(e);this._sash.state=3*!!t,this.sashLeft.read(e),this._dimensions.height.read(e),this._sash.layout()}))}}class eL extends u.jG{constructor(){super(...arguments),this._id=++eL.idCounter,this._onDidDispose=this._register(new d.vl),this.onDidDispose=this._onDidDispose.event}static{this.idCounter=0}getId(){return this.getEditorType()+":v2:"+this._id}getVisibleColumnFromPosition(e){return this._targetEditor.getVisibleColumnFromPosition(e)}getPosition(){return this._targetEditor.getPosition()}setPosition(e,t="api"){this._targetEditor.setPosition(e,t)}revealLine(e,t=0){this._targetEditor.revealLine(e,t)}revealLineInCenter(e,t=0){this._targetEditor.revealLineInCenter(e,t)}revealLineInCenterIfOutsideViewport(e,t=0){this._targetEditor.revealLineInCenterIfOutsideViewport(e,t)}revealLineNearTop(e,t=0){this._targetEditor.revealLineNearTop(e,t)}revealPosition(e,t=0){this._targetEditor.revealPosition(e,t)}revealPositionInCenter(e,t=0){this._targetEditor.revealPositionInCenter(e,t)}revealPositionInCenterIfOutsideViewport(e,t=0){this._targetEditor.revealPositionInCenterIfOutsideViewport(e,t)}revealPositionNearTop(e,t=0){this._targetEditor.revealPositionNearTop(e,t)}getSelection(){return this._targetEditor.getSelection()}getSelections(){return this._targetEditor.getSelections()}setSelection(e,t="api"){this._targetEditor.setSelection(e,t)}setSelections(e,t="api"){this._targetEditor.setSelections(e,t)}revealLines(e,t,i=0){this._targetEditor.revealLines(e,t,i)}revealLinesInCenter(e,t,i=0){this._targetEditor.revealLinesInCenter(e,t,i)}revealLinesInCenterIfOutsideViewport(e,t,i=0){this._targetEditor.revealLinesInCenterIfOutsideViewport(e,t,i)}revealLinesNearTop(e,t,i=0){this._targetEditor.revealLinesNearTop(e,t,i)}revealRange(e,t=0,i=!1,n=!0){this._targetEditor.revealRange(e,t,i,n)}revealRangeInCenter(e,t=0){this._targetEditor.revealRangeInCenter(e,t)}revealRangeInCenterIfOutsideViewport(e,t=0){this._targetEditor.revealRangeInCenterIfOutsideViewport(e,t)}revealRangeNearTop(e,t=0){this._targetEditor.revealRangeNearTop(e,t)}revealRangeNearTopIfOutsideViewport(e,t=0){this._targetEditor.revealRangeNearTopIfOutsideViewport(e,t)}revealRangeAtTop(e,t=0){this._targetEditor.revealRangeAtTop(e,t)}getSupportedActions(){return this._targetEditor.getSupportedActions()}focus(){this._targetEditor.focus()}trigger(e,t,i){this._targetEditor.trigger(e,t,i)}createDecorationsCollection(e){return this._targetEditor.createDecorationsCollection(e)}changeDecorations(e){return this._targetEditor.changeDecorations(e)}}var eD=i(28009),eI=i(79635);let eN=class{get editorOptions(){return this._options}constructor(e,t){this._accessibilityService=t,this._diffEditorWidth=(0,g.FY)(this,0),this._screenReaderMode=(0,g.y0)(this,this._accessibilityService.onDidChangeScreenReaderOptimized,()=>this._accessibilityService.isScreenReaderOptimized()),this.couldShowInlineViewBecauseOfSize=(0,g.un)(this,e=>this._options.read(e).renderSideBySide&&this._diffEditorWidth.read(e)<=this._options.read(e).renderSideBySideInlineBreakpoint),this.renderOverviewRuler=(0,g.un)(this,e=>this._options.read(e).renderOverviewRuler),this.renderSideBySide=(0,g.un)(this,e=>!(this.compactMode.read(e)&&this.shouldRenderInlineViewInSmartMode.read(e))&&this._options.read(e).renderSideBySide&&!(this._options.read(e).useInlineViewWhenSpaceIsLimited&&this.couldShowInlineViewBecauseOfSize.read(e)&&!this._screenReaderMode.read(e))),this.readOnly=(0,g.un)(this,e=>this._options.read(e).readOnly),this.shouldRenderOldRevertArrows=(0,g.un)(this,e=>!(!this._options.read(e).renderMarginRevertIcon||!this.renderSideBySide.read(e)||this.readOnly.read(e)||this.shouldRenderGutterMenu.read(e))),this.shouldRenderGutterMenu=(0,g.un)(this,e=>this._options.read(e).renderGutterMenu),this.renderIndicators=(0,g.un)(this,e=>this._options.read(e).renderIndicators),this.enableSplitViewResizing=(0,g.un)(this,e=>this._options.read(e).enableSplitViewResizing),this.splitViewDefaultRatio=(0,g.un)(this,e=>this._options.read(e).splitViewDefaultRatio),this.ignoreTrimWhitespace=(0,g.un)(this,e=>this._options.read(e).ignoreTrimWhitespace),this.maxComputationTimeMs=(0,g.un)(this,e=>this._options.read(e).maxComputationTime),this.showMoves=(0,g.un)(this,e=>this._options.read(e).experimental.showMoves&&this.renderSideBySide.read(e)),this.isInEmbeddedEditor=(0,g.un)(this,e=>this._options.read(e).isInEmbeddedEditor),this.diffWordWrap=(0,g.un)(this,e=>this._options.read(e).diffWordWrap),this.originalEditable=(0,g.un)(this,e=>this._options.read(e).originalEditable),this.diffCodeLens=(0,g.un)(this,e=>this._options.read(e).diffCodeLens),this.accessibilityVerbose=(0,g.un)(this,e=>this._options.read(e).accessibilityVerbose),this.diffAlgorithm=(0,g.un)(this,e=>this._options.read(e).diffAlgorithm),this.showEmptyDecorations=(0,g.un)(this,e=>this._options.read(e).experimental.showEmptyDecorations),this.onlyShowAccessibleDiffViewer=(0,g.un)(this,e=>this._options.read(e).onlyShowAccessibleDiffViewer),this.compactMode=(0,g.un)(this,e=>this._options.read(e).compactMode),this.trueInlineDiffRenderingEnabled=(0,g.un)(this,e=>this._options.read(e).experimental.useTrueInlineView),this.useTrueInlineDiffRendering=(0,g.un)(this,e=>!this.renderSideBySide.read(e)&&this.trueInlineDiffRenderingEnabled.read(e)),this.hideUnchangedRegions=(0,g.un)(this,e=>this._options.read(e).hideUnchangedRegions.enabled),this.hideUnchangedRegionsRevealLineCount=(0,g.un)(this,e=>this._options.read(e).hideUnchangedRegions.revealLineCount),this.hideUnchangedRegionsContextLineCount=(0,g.un)(this,e=>this._options.read(e).hideUnchangedRegions.contextLineCount),this.hideUnchangedRegionsMinimumLineCount=(0,g.un)(this,e=>this._options.read(e).hideUnchangedRegions.minimumLineCount),this._model=(0,g.FY)(this,void 0),this.shouldRenderInlineViewInSmartMode=this._model.map(this,e=>(0,g.t)(this,t=>{var i,n;let s=e?.diff.read(t);return s?(i=s,n=this.trueInlineDiffRenderingEnabled.read(t),i.mappings.every(e=>0===e.lineRangeMapping.original.length||0===e.lineRangeMapping.modified.length||n&&(0,ea.l9)(e.lineRangeMapping))):void 0})).flatten().map(this,e=>!!e),this.inlineViewHideOriginalLineNumbers=this.compactMode;let i={...e,...eE(e,eI.q)};this._options=(0,g.FY)(this,i)}updateOptions(e){let t=eE(e,this._options.get()),i={...this._options.get(),...e,...t};this._options.set(i,void 0,{changedOptions:e})}setWidth(e){this._diffEditorWidth.set(e,void 0)}setModel(e){this._model.set(e,void 0)}};function eE(e,t){return{enableSplitViewResizing:(0,F.zM)(e.enableSplitViewResizing,t.enableSplitViewResizing),splitViewDefaultRatio:(0,F.ls)(e.splitViewDefaultRatio,.5,.1,.9),renderSideBySide:(0,F.zM)(e.renderSideBySide,t.renderSideBySide),renderMarginRevertIcon:(0,F.zM)(e.renderMarginRevertIcon,t.renderMarginRevertIcon),maxComputationTime:(0,F.wA)(e.maxComputationTime,t.maxComputationTime,0,0x40000000),maxFileSize:(0,F.wA)(e.maxFileSize,t.maxFileSize,0,0x40000000),ignoreTrimWhitespace:(0,F.zM)(e.ignoreTrimWhitespace,t.ignoreTrimWhitespace),renderIndicators:(0,F.zM)(e.renderIndicators,t.renderIndicators),originalEditable:(0,F.zM)(e.originalEditable,t.originalEditable),diffCodeLens:(0,F.zM)(e.diffCodeLens,t.diffCodeLens),renderOverviewRuler:(0,F.zM)(e.renderOverviewRuler,t.renderOverviewRuler),diffWordWrap:(0,F.O4)(e.diffWordWrap,t.diffWordWrap,["off","on","inherit"]),diffAlgorithm:(0,F.O4)(e.diffAlgorithm,t.diffAlgorithm,["legacy","advanced"],{smart:"legacy",experimental:"advanced"}),accessibilityVerbose:(0,F.zM)(e.accessibilityVerbose,t.accessibilityVerbose),experimental:{showMoves:(0,F.zM)(e.experimental?.showMoves,t.experimental.showMoves),showEmptyDecorations:(0,F.zM)(e.experimental?.showEmptyDecorations,t.experimental.showEmptyDecorations),useTrueInlineView:(0,F.zM)(e.experimental?.useTrueInlineView,t.experimental.useTrueInlineView)},hideUnchangedRegions:{enabled:(0,F.zM)(e.hideUnchangedRegions?.enabled??e.experimental?.collapseUnchangedRegions,t.hideUnchangedRegions.enabled),contextLineCount:(0,F.wA)(e.hideUnchangedRegions?.contextLineCount,t.hideUnchangedRegions.contextLineCount,0,0x40000000),minimumLineCount:(0,F.wA)(e.hideUnchangedRegions?.minimumLineCount,t.hideUnchangedRegions.minimumLineCount,0,0x40000000),revealLineCount:(0,F.wA)(e.hideUnchangedRegions?.revealLineCount,t.hideUnchangedRegions.revealLineCount,0,0x40000000)},isInEmbeddedEditor:(0,F.zM)(e.isInEmbeddedEditor,t.isInEmbeddedEditor),onlyShowAccessibleDiffViewer:(0,F.zM)(e.onlyShowAccessibleDiffViewer,t.onlyShowAccessibleDiffViewer),renderSideBySideInlineBreakpoint:(0,F.wA)(e.renderSideBySideInlineBreakpoint,t.renderSideBySideInlineBreakpoint,0,0x40000000),useInlineViewWhenSpaceIsLimited:(0,F.zM)(e.useInlineViewWhenSpaceIsLimited,t.useInlineViewWhenSpaceIsLimited),renderGutterMenu:(0,F.zM)(e.renderGutterMenu,t.renderGutterMenu),compactMode:(0,F.zM)(e.compactMode,t.compactMode)}}eN=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([(s=eD.j,function(e,t){s(e,t,1)})],eN);var eM=i(50813),eT=i(68192),eR=i(41327),eO=i(87574),eP=i(80787),eA=i(21131),eF=i(21731);class eB extends u.jG{constructor(e,t,i){super(),this._editor=e,this._domNode=t,this.itemProvider=i,this.scrollTop=(0,g.y0)(this,this._editor.onDidScrollChange,e=>this._editor.getScrollTop()),this.isScrollTopZero=this.scrollTop.map(e=>0===e),this.modelAttached=(0,g.y0)(this,this._editor.onDidChangeModel,e=>this._editor.hasModel()),this.editorOnDidChangeViewZones=(0,g.yQ)("onDidChangeViewZones",this._editor.onDidChangeViewZones),this.editorOnDidContentSizeChange=(0,g.yQ)("onDidContentSizeChange",this._editor.onDidContentSizeChange),this.domNodeSizeChanged=(0,g.Yd)("domNodeSizeChanged"),this.views=new Map,this._domNode.className="gutter monaco-editor";let n=this._domNode.appendChild((0,a.h)("div.scroll-decoration",{role:"presentation",ariaHidden:"true",style:{width:"100%"}}).root),s=new ResizeObserver(()=>{(0,g.Rn)(e=>{this.domNodeSizeChanged.trigger(e)})});s.observe(this._domNode),this._register((0,u.s)(()=>s.disconnect())),this._register((0,g.fm)(e=>{n.className=this.isScrollTopZero.read(e)?"":"scroll-decoration"})),this._register((0,g.fm)(e=>this.render(e)))}dispose(){super.dispose(),(0,a.Ln)(this._domNode)}render(e){if(!this.modelAttached.read(e))return;this.domNodeSizeChanged.read(e),this.editorOnDidChangeViewZones.read(e),this.editorOnDidContentSizeChange.read(e);let t=this.scrollTop.read(e),i=this._editor.getVisibleRanges(),n=new Set(this.views.keys()),s=B.L.ofStartAndLength(0,this._domNode.clientHeight);if(!s.isEmpty)for(let o of i){let i=new C.M(o.startLineNumber,o.endLineNumber+1),r=this.itemProvider.getIntersectingGutterItems(i,e);(0,g.Rn)(e=>{for(let o of r){if(!o.range.intersect(i))continue;n.delete(o.id);let r=this.views.get(o.id);if(r)r.item.set(o,e);else{let e=document.createElement("div");this._domNode.appendChild(e);let t=(0,g.FY)("item",o),i=this.itemProvider.createView(t,e);r=new eW(t,i,e),this.views.set(o.id,r)}let a=o.range.startLineNumber<=this._editor.getModel().getLineCount()?this._editor.getTopForLineNumber(o.range.startLineNumber,!0)-t:o.range.startLineNumber>1?this._editor.getBottomForLineNumber(o.range.startLineNumber-1,!1)-t:0,l=(1===o.range.endLineNumberExclusive?Math.max(a,this._editor.getTopForLineNumber(o.range.startLineNumber,!1)-t):Math.max(a,this._editor.getBottomForLineNumber(o.range.endLineNumberExclusive-1,!0)-t))-a;r.domNode.style.top=`${a}px`,r.domNode.style.height=`${l}px`,r.gutterItemView.layout(B.L.ofStartAndLength(a,l),s)}})}for(let e of n){let t=this.views.get(e);t.gutterItemView.dispose(),t.domNode.remove(),this.views.delete(e)}}}class eW{constructor(e,t,i){this.item=e,this.gutterItemView=t,this.domNode=i}}var eH=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},eV=function(e,t){return function(i,n){t(i,n,e)}};let ez=[],eU=class extends u.jG{constructor(e,t,i,n,s,o,r,l,h){super(),this._diffModel=t,this._editors=i,this._options=n,this._sashLayout=s,this._boundarySashes=o,this._instantiationService=r,this._contextKeyService=l,this._menuService=h,this._menu=this._register(this._menuService.createMenu(eR.D8.DiffEditorHunkToolbar,this._contextKeyService)),this._actions=(0,g.y0)(this,this._menu.onDidChange,()=>this._menu.getActions()),this._hasActions=this._actions.map(e=>e.length>0),this._showSash=(0,g.un)(this,e=>this._options.renderSideBySide.read(e)&&this._hasActions.read(e)),this.width=(0,g.un)(this,e=>35*!!this._hasActions.read(e)),this.elements=(0,a.h)("div.gutter@gutter",{style:{position:"absolute",height:"100%",width:"35px"}},[]),this._currentDiff=(0,g.un)(this,e=>{let t=this._diffModel.read(e);if(!t)return;let i=t.diff.read(e)?.mappings,n=this._editors.modifiedCursor.read(e);if(n)return i?.find(e=>e.lineRangeMapping.modified.contains(n.lineNumber))}),this._selectedDiffs=(0,g.un)(this,e=>{let t=this._diffModel.read(e),i=t?.diff.read(e);if(!i)return ez;let n=this._editors.modifiedSelections.read(e);if(n.every(e=>e.isEmpty()))return ez;let s=new C.S(n.map(e=>C.M.fromRangeInclusive(e))),o=i.mappings.filter(e=>e.lineRangeMapping.innerChanges&&s.intersects(e.lineRangeMapping.modified)).map(e=>({mapping:e,rangeMappings:e.lineRangeMapping.innerChanges.filter(e=>n.some(t=>y.Q.areIntersecting(e.modifiedRange,t)))}));return 0===o.length||o.every(e=>0===e.rangeMappings.length)?ez:o}),this._register((0,A.$y)(e,this.elements.root)),this._register((0,a.ko)(this.elements.root,"click",()=>{this._editors.modified.focus()})),this._register((0,A.AV)(this.elements.root,{display:this._hasActions.map(e=>e?"block":"none")})),(0,g.a0)(this,t=>this._showSash.read(t)?new ex(e,this._sashLayout.dimensions,this._options.enableSplitViewResizing,this._boundarySashes,(0,g.dQ)(this,e=>this._sashLayout.sashLeft.read(e)-35,(e,t)=>this._sashLayout.sashLeft.set(e+35,t)),()=>this._sashLayout.resetSash()):void 0).recomputeInitiallyAndOnChange(this._store);let d=(0,g.un)(this,e=>{let t=this._diffModel.read(e);if(!t)return[];let i=t.diff.read(e);if(!i)return[];let n=this._selectedDiffs.read(e);if(n.length>0)return[new ej(W.wm.fromRangeMappings(n.flatMap(e=>e.rangeMappings)),!0,eR.D8.DiffEditorSelectionToolbar,void 0,t.model.original.uri,t.model.modified.uri)];let s=this._currentDiff.read(e);return i.mappings.map(e=>new ej(e.lineRangeMapping.withInnerChangesFromLineRanges(),e.lineRangeMapping===s?.lineRangeMapping,eR.D8.DiffEditorHunkToolbar,void 0,t.model.original.uri,t.model.modified.uri))});this._register(new eB(this._editors.modified,this.elements.root,{getIntersectingGutterItems:(e,t)=>d.read(t),createView:(e,t)=>this._instantiationService.createInstance(e$,e,t,this)})),this._register((0,a.ko)(this.elements.gutter,a.Bx.MOUSE_WHEEL,e=>{this._editors.modified.getOption(117).handleMouseWheel&&this._editors.modified.delegateScrollFromMouseWheelEvent(e)},{passive:!1}))}computeStagedValue(e){let t=e.innerChanges??[],i=new eA.m(this._editors.modifiedModel.get()),n=new eA.m(this._editors.original.getModel());return new eP.m(t.map(e=>e.toTextEdit(i))).apply(n)}layout(e){this.elements.gutter.style.left=e+"px"}};eU=eH([eV(6,f._Y),eV(7,m.fN),eV(8,eR.ez)],eU);class ej{constructor(e,t,i,n,s,o){this.mapping=e,this.showAlways=t,this.menuId=i,this.rangeOverride=n,this.originalUri=s,this.modifiedUri=o}get id(){return this.mapping.modified.toString()}get range(){return this.rangeOverride??this.mapping.modified}}let e$=class extends u.jG{constructor(e,t,i,n){super(),this._item=e,this._elements=(0,a.h)("div.gutterItem",{style:{height:"20px",width:"34px"}},[(0,a.h)("div.background@background",{},[]),(0,a.h)("div.buttons@buttons",{},[])]),this._showAlways=this._item.map(this,e=>e.showAlways),this._menuId=this._item.map(this,e=>e.menuId),this._isSmall=(0,g.FY)(this,!1),this._lastItemRange=void 0,this._lastViewRange=void 0;let s=this._register(n.createInstance(eO.fO,"element",{instantHover:!0},{position:{hoverPosition:1}}));this._register((0,A.rX)(t,this._elements.root)),this._register((0,g.fm)(e=>{let t=this._showAlways.read(e);this._elements.root.classList.toggle("noTransition",!0),this._elements.root.classList.toggle("showAlways",t),setTimeout(()=>{this._elements.root.classList.toggle("noTransition",!1)},0)})),this._register((0,g.yC)((e,t)=>{this._elements.buttons.replaceChildren();let o=t.add(n.createInstance(eT.m,this._elements.buttons,this._menuId.read(e),{orientation:1,hoverDelegate:s,toolbarOptions:{primaryGroup:e=>e.startsWith("primary")},overflowBehavior:{maxItems:this._isSmall.read(e)?1:3},hiddenItemStrategy:0,actionRunner:t.add(new eF.I(()=>{let e=this._item.read(void 0),t=e.mapping;return{mapping:t,originalWithModifiedChanges:i.computeStagedValue(t),originalUri:e.originalUri,modifiedUri:e.modifiedUri}})),menuOptions:{shouldForwardArgs:!0}}));t.add(o.onDidChangeMenuItems(()=>{this._lastItemRange&&this.layout(this._lastItemRange,this._lastViewRange)}))}))}layout(e,t){this._lastItemRange=e,this._lastViewRange=t;let i=this._elements.buttons.clientHeight;this._isSmall.set(1===this._item.get().mapping.original.startLineNumber&&e.length<30,void 0),i=this._elements.buttons.clientHeight;let n=e.length/2-i/2,s=i,o=e.start+n,r=B.L.tryCreate(s,t.endExclusive-s-i),a=B.L.tryCreate(e.start+s,e.endExclusive-i-s);a&&r&&a.start<a.endExclusive&&(o=r.clip(o),o=a.clip(o)),this._elements.buttons.style.top=`${o-e.start}px`}};e$=eH([eV(3,f._Y)],e$);var eK=i(77133),eG=i(42016),eq=i(60095);let eQ=[];class eY extends u.jG{constructor(e,t,i,n){super(),this._editors=e,this._diffModel=t,this._options=i,this._widget=n,this._selectedDiffs=(0,g.un)(this,e=>{let t=this._diffModel.read(e),i=t?.diff.read(e);if(!i)return eQ;let n=this._editors.modifiedSelections.read(e);if(n.every(e=>e.isEmpty()))return eQ;let s=new C.S(n.map(e=>C.M.fromRangeInclusive(e))),o=i.mappings.filter(e=>e.lineRangeMapping.innerChanges&&s.intersects(e.lineRangeMapping.modified)).map(e=>({mapping:e,rangeMappings:e.lineRangeMapping.innerChanges.filter(e=>n.some(t=>y.Q.areIntersecting(e.modifiedRange,t)))}));return 0===o.length||o.every(e=>0===e.rangeMappings.length)?eQ:o}),this._register((0,g.yC)((e,t)=>{if(!this._options.shouldRenderOldRevertArrows.read(e))return;let i=this._diffModel.read(e),n=i?.diff.read(e);if(!i||!n||i.movedTextToCompare.read(e))return;let s=[],o=this._selectedDiffs.read(e),r=new Set(o.map(e=>e.mapping));if(o.length>0){let i=this._editors.modifiedSelections.read(e),n=t.add(new eZ(i[i.length-1].positionLineNumber,this._widget,o.flatMap(e=>e.rangeMappings),!0));this._editors.modified.addGlyphMarginWidget(n),s.push(n)}for(let e of n.mappings)if(!r.has(e)&&!e.lineRangeMapping.modified.isEmpty&&e.lineRangeMapping.innerChanges){let i=t.add(new eZ(e.lineRangeMapping.modified.startLineNumber,this._widget,e.lineRangeMapping,!1));this._editors.modified.addGlyphMarginWidget(i),s.push(i)}t.add((0,u.s)(()=>{for(let e of s)this._editors.modified.removeGlyphMarginWidget(e)}))}))}}class eZ extends u.jG{static{this.counter=0}getId(){return this._id}constructor(e,t,i,n){super(),this._lineNumber=e,this._widget=t,this._diffs=i,this._revertSelection=n,this._id=`revertButton${eZ.counter++}`,this._domNode=(0,a.h)("div.revertButton",{title:this._revertSelection?(0,j.kg)(132,"Revert Selected Changes"):(0,j.kg)(133,"Revert Change")},[(0,eG.s)(R.W.arrowRight)]).root,this._register((0,a.ko)(this._domNode,a.Bx.MOUSE_DOWN,e=>{2!==e.button&&(e.stopPropagation(),e.preventDefault())})),this._register((0,a.ko)(this._domNode,a.Bx.MOUSE_UP,e=>{e.stopPropagation(),e.preventDefault()})),this._register((0,a.ko)(this._domNode,a.Bx.CLICK,e=>{this._diffs instanceof W.WL?this._widget.revert(this._diffs):this._widget.revertRangeMappings(this._diffs),e.stopPropagation(),e.preventDefault()}))}getDomNode(){return this._domNode}getPosition(){return{lane:eq.ZS.Right,range:{startColumn:1,startLineNumber:this._lineNumber,endColumn:1,endLineNumber:this._lineNumber},zIndex:10001}}}i(22951);var eX=function(e,t){return function(i,n){t(i,n,e)}};let eJ=class extends eL{get onDidContentSizeChange(){return this._editors.onDidContentSizeChange}constructor(e,t,i,n,s,o,r,l){let p;super(),this._domElement=e,this._parentContextKeyService=n,this._parentInstantiationService=s,this._accessibilitySignalService=r,this._editorProgressService=l,this.elements=(0,a.h)("div.monaco-diff-editor.side-by-side",{style:{position:"relative",height:"100%"}},[(0,a.h)("div.editor.original@original",{style:{position:"absolute",height:"100%"}}),(0,a.h)("div.editor.modified@modified",{style:{position:"absolute",height:"100%"}}),(0,a.h)("div.accessibleDiffViewer@accessibleDiffViewer",{style:{position:"absolute",height:"100%"}})]),this._diffModelSrc=this._register((0,g.X2)(this,void 0)),this._diffModel=(0,g.un)(this,e=>this._diffModelSrc.read(e)?.object),this.onDidChangeModel=d.Jh.fromObservableLight(this._diffModel),this._contextKeyService=this._register(this._parentContextKeyService.createScoped(this._domElement)),this._instantiationService=this._register(this._parentInstantiationService.createChild(new _.a([m.fN,this._contextKeyService]))),this._boundarySashes=(0,g.FY)(this,void 0),this._accessibleDiffViewerShouldBeVisible=(0,g.FY)(this,!1),this._accessibleDiffViewerVisible=(0,g.un)(this,e=>!!this._options.onlyShowAccessibleDiffViewer.read(e)||this._accessibleDiffViewerShouldBeVisible.read(e)),this._movedBlocksLinesPart=(0,g.FY)(this,void 0),this._layoutInfo=(0,g.un)(this,e=>{let t,i,n,s,o,r=this._rootSizeObserver.width.read(e),a=this._rootSizeObserver.height.read(e);this._rootSizeObserver.automaticLayout?this.elements.root.style.height="100%":this.elements.root.style.height=a+"px";let l=this._sash.read(e),h=this._gutter.read(e),d=h?.width.read(e)??0,c=this._overviewRulerPart.read(e)?.width??0;if(l){let a=l.sashLeft.read(e);t=0,i=a-d-(this._movedBlocksLinesPart.read(e)?.width.read(e)??0),o=a-d,s=r-(n=a)-c}else{o=0;let a=this._options.inlineViewHideOriginalLineNumbers.read(e);t=d,s=r-(n=d+(i=a?0:Math.max(5,this._editors.originalObs.layoutInfoDecorationsLeft.read(e))))-c}return this.elements.original.style.left=t+"px",this.elements.original.style.width=i+"px",this._editors.original.layout({width:i,height:a},!0),h?.layout(o),this.elements.modified.style.left=n+"px",this.elements.modified.style.width=s+"px",this._editors.modified.layout({width:s,height:a},!0),{modifiedEditor:this._editors.modified.getLayoutInfo(),originalEditor:this._editors.original.getLayoutInfo()}}),this._diffValue=this._diffModel.map((e,t)=>e?.diff.read(t)),this.onDidUpdateDiff=d.Jh.fromObservableLight(this._diffValue),o.willCreateDiffEditor(),this._contextKeyService.createKey("isInDiffEditor",!0),this._domElement.appendChild(this.elements.root),this._register((0,u.s)(()=>this.elements.root.remove())),this._rootSizeObserver=this._register(new A.pN(this.elements.root,t.dimension)),this._rootSizeObserver.setAutomaticLayout(t.automaticLayout??!1),this._options=this._instantiationService.createInstance(eN,t),this._register((0,g.fm)(e=>{this._options.setWidth(this._rootSizeObserver.width.read(e))})),this._contextKeyService.createKey(k.R.isEmbeddedDiffEditor.key,!1),this._register((0,v.w)(k.R.isEmbeddedDiffEditor,this._contextKeyService,e=>this._options.isInEmbeddedEditor.read(e))),this._register((0,v.w)(k.R.comparingMovedCode,this._contextKeyService,e=>!!this._diffModel.read(e)?.movedTextToCompare.read(e))),this._register((0,v.w)(k.R.diffEditorRenderSideBySideInlineBreakpointReached,this._contextKeyService,e=>this._options.couldShowInlineViewBecauseOfSize.read(e))),this._register((0,v.w)(k.R.diffEditorInlineMode,this._contextKeyService,e=>!this._options.renderSideBySide.read(e))),this._register((0,v.w)(k.R.hasChanges,this._contextKeyService,e=>(this._diffModel.read(e)?.diff.read(e)?.mappings.length??0)>0)),this._editors=this._register(this._instantiationService.createInstance(ey,this.elements.original,this.elements.modified,this._options,i,(e,t,i,n)=>this._createInnerEditor(e,t,i,n))),this._register((0,v.w)(k.R.diffEditorOriginalWritable,this._contextKeyService,e=>this._options.originalEditable.read(e))),this._register((0,v.w)(k.R.diffEditorModifiedWritable,this._contextKeyService,e=>!this._options.readOnly.read(e))),this._register((0,v.w)(k.R.diffEditorOriginalUri,this._contextKeyService,e=>this._diffModel.read(e)?.model.original.uri.toString()??"")),this._register((0,v.w)(k.R.diffEditorModifiedUri,this._contextKeyService,e=>this._diffModel.read(e)?.model.modified.uri.toString()??"")),this._overviewRulerPart=(0,g.a0)(this,e=>this._options.renderOverviewRuler.read(e)?this._instantiationService.createInstance((0,c.b6)(eb,e),this._editors,this.elements.root,this._diffModel,this._rootSizeObserver.width,this._rootSizeObserver.height,this._layoutInfo.map(e=>e.modifiedEditor)):void 0).recomputeInitiallyAndOnChange(this._store);let f={height:this._rootSizeObserver.height,width:this._rootSizeObserver.width.map((e,t)=>e-(this._overviewRulerPart.read(t)?.width??0))};this._sashLayout=new ek(this._options,f),this._sash=(0,g.a0)(this,e=>{let t=this._options.renderSideBySide.read(e);return this.elements.root.classList.toggle("side-by-side",t),t?new ex(this.elements.root,f,this._options.enableSplitViewResizing,this._boundarySashes,this._sashLayout.sashLeft,()=>this._sashLayout.resetSash()):void 0}).recomputeInitiallyAndOnChange(this._store);let b=(0,g.a0)(this,e=>this._instantiationService.createInstance((0,c.b6)(eK.N,e),this._editors,this._diffModel,this._options)).recomputeInitiallyAndOnChange(this._store);(0,g.a0)(this,e=>this._instantiationService.createInstance((0,c.b6)(eu,e),this._editors,this._diffModel,this._options,this)).recomputeInitiallyAndOnChange(this._store);let C=new Set,w=new Set,y=!1,S=(0,g.a0)(this,e=>this._instantiationService.createInstance((0,c.b6)(ea.RW,e),(0,a.zk)(this._domElement),this._editors,this._diffModel,this._options,this,()=>y||b.read(void 0).isUpdatingHiddenAreas,C,w)).recomputeInitiallyAndOnChange(this._store),x=(0,g.un)(this,e=>{let t=S.read(e).viewZones.read(e).orig,i=b.read(e).viewZones.read(e).origViewZones;return t.concat(i)}),L=(0,g.un)(this,e=>{let t=S.read(e).viewZones.read(e).mod,i=b.read(e).viewZones.read(e).modViewZones;return t.concat(i)});this._register((0,A.Vs)(this._editors.original,x,e=>{y=e},C)),this._register((0,A.Vs)(this._editors.modified,L,e=>{(y=e)?p=D.D.capture(this._editors.modified):(p?.restore(this._editors.modified),p=void 0)},w)),this._accessibleDiffViewer=(0,g.a0)(this,e=>this._instantiationService.createInstance((0,c.b6)(X,e),this.elements.accessibleDiffViewer,this._accessibleDiffViewerVisible,(e,t)=>this._accessibleDiffViewerShouldBeVisible.set(e,t),this._options.onlyShowAccessibleDiffViewer.map(e=>!e),this._rootSizeObserver.width,this._rootSizeObserver.height,this._diffModel.map((e,t)=>e?.diff.read(t)?.mappings.map(e=>e.lineRangeMapping)),new er(this._editors))).recomputeInitiallyAndOnChange(this._store);let I=this._accessibleDiffViewerVisible.map(e=>e?"hidden":"visible");this._register((0,A.AV)(this.elements.modified,{visibility:I})),this._register((0,A.AV)(this.elements.original,{visibility:I})),this._createDiffEditorContributions(),o.addDiffEditor(this),this._gutter=(0,g.a0)(this,e=>this._options.shouldRenderGutterMenu.read(e)?this._instantiationService.createInstance((0,c.b6)(eU,e),this.elements.root,this._diffModel,this._editors,this._options,this._sashLayout,this._boundarySashes):void 0),this._register((0,g.OI)(this._layoutInfo)),(0,g.a0)(this,e=>new((0,c.b6)(el,e))(this.elements.root,this._diffModel,this._layoutInfo.map(e=>e.originalEditor),this._layoutInfo.map(e=>e.modifiedEditor),this._editors)).recomputeInitiallyAndOnChange(this._store,e=>{this._movedBlocksLinesPart.set(e,void 0)}),this._register(d.Jh.runAndSubscribe(this._editors.modified.onDidChangeCursorPosition,e=>this._handleCursorPositionChange(e,!0))),this._register(d.Jh.runAndSubscribe(this._editors.original.onDidChangeCursorPosition,e=>this._handleCursorPositionChange(e,!1)));let N=this._diffModel.map(this,(e,t)=>{if(e)return void 0===e.diff.read(t)&&!e.isDiffUpToDate.read(t)});this._register((0,g.yC)((e,t)=>{if(!0===N.read(e)){let e=this._editorProgressService.show(!0,1e3);t.add((0,u.s)(()=>e.done()))}})),this._register((0,g.yC)((e,t)=>{t.add(new((0,c.b6)(eY,e))(this._editors,this._diffModel,this._options,this))})),this._register((0,g.yC)((e,t)=>{let i=this._diffModel.read(e);if(i)for(let e of[i.model.original,i.model.modified])t.add(e.onWillDispose(e=>{(0,h.dz)(new h.D7("TextModel got disposed before DiffEditorWidget model got reset")),this.setModel(null)}))})),this._register((0,g.fm)(e=>{this._options.setModel(this._diffModel.read(e))}))}_createInnerEditor(e,t,i,n){return e.createInstance(I.x,t,i,n)}_createDiffEditorContributions(){for(let e of x.dS.getDiffEditorContributions())try{this._register(this._instantiationService.createInstance(e.ctor,this))}catch(e){(0,h.dz)(e)}}get _targetEditor(){return this._editors.modified}getEditorType(){return S._.IDiffEditor}layout(e){this._rootSizeObserver.observe(e)}hasTextFocus(){return this._editors.original.hasTextFocus()||this._editors.modified.hasTextFocus()}saveViewState(){return{original:this._editors.original.saveViewState(),modified:this._editors.modified.saveViewState(),modelState:this._diffModel.get()?.serializeState()}}restoreViewState(e){e&&e.original&&e.modified&&(this._editors.original.restoreViewState(e.original),this._editors.modified.restoreViewState(e.modified),e.modelState&&this._diffModel.get()?.restoreSerializedState(e.modelState))}handleInitialized(){this._editors.original.handleInitialized(),this._editors.modified.handleInitialized()}createViewModel(e){return this._instantiationService.createInstance(eM.r4,e,this._options)}getModel(){return this._diffModel.get()?.model??null}setModel(e){let t=e?"model"in e?A.O8.create(e).createNewRef(this):A.O8.create(this.createViewModel(e),this):null;this.setDiffModel(t)}setDiffModel(e,t){let i=this._diffModel.get();!e&&i&&this._accessibleDiffViewer.get().close(),this._diffModel.get()!==e?.object&&(0,g.PO)(t,t=>{let i=e?.object;g.y0.batchEventsGlobally(t,()=>{this._editors.original.setModel(i?i.model.original:null),this._editors.modified.setModel(i?i.model.modified:null)});let n=this._diffModelSrc.get()?.createNewRef(this);this._diffModelSrc.set(e?.createNewRef(this),t),setTimeout(()=>{n?.dispose()},0)})}updateOptions(e){this._options.updateOptions(e)}getContainerDomNode(){return this._domElement}getOriginalEditor(){return this._editors.original}getModifiedEditor(){return this._editors.modified}getLineChanges(){let e=this._diffModel.get()?.diff.get();return e?e.mappings.map(e=>{let t,i,n,s,o=e.lineRangeMapping,r=o.innerChanges;return o.original.isEmpty?(t=o.original.startLineNumber-1,i=0,r=void 0):(t=o.original.startLineNumber,i=o.original.endLineNumberExclusive-1),o.modified.isEmpty?(n=o.modified.startLineNumber-1,s=0,r=void 0):(n=o.modified.startLineNumber,s=o.modified.endLineNumberExclusive-1),{originalStartLineNumber:t,originalEndLineNumber:i,modifiedStartLineNumber:n,modifiedEndLineNumber:s,charChanges:r?.map(e=>({originalStartLineNumber:e.originalRange.startLineNumber,originalStartColumn:e.originalRange.startColumn,originalEndLineNumber:e.originalRange.endLineNumber,originalEndColumn:e.originalRange.endColumn,modifiedStartLineNumber:e.modifiedRange.startLineNumber,modifiedStartColumn:e.modifiedRange.startColumn,modifiedEndLineNumber:e.modifiedRange.endLineNumber,modifiedEndColumn:e.modifiedRange.endColumn}))}}):null}revert(e){let t=this._diffModel.get();t&&t.isDiffUpToDate.get()&&this._editors.modified.executeEdits("diffEditor",[{range:e.modified.toExclusiveRange(),text:t.model.original.getValueInRange(e.original.toExclusiveRange())}])}revertRangeMappings(e){let t=this._diffModel.get();if(!t||!t.isDiffUpToDate.get())return;let i=e.map(e=>({range:e.modifiedRange,text:t.model.original.getValueInRange(e.originalRange)}));this._editors.modified.executeEdits("diffEditor",i)}revertFocusedRangeMappings(){let e=this._diffModel.get();if(!e||!e.isDiffUpToDate.get())return;let t=this._diffModel.get()?.diff.get()?.mappings;if(!t||0===t.length)return;let i=this._editors.modified;if(!i.hasTextFocus())return;let n=i.getPosition().lineNumber,s=i.getSelection(),o=C.M.fromRange(s||new y.Q(n,0,n,0)),r=t.filter(e=>e.lineRangeMapping.modified.intersect(o));i.executeEdits("diffEditor",r.map(t=>({range:t.lineRangeMapping.modified.toExclusiveRange(),text:e.model.original.getValueInRange(t.lineRangeMapping.original.toExclusiveRange())})))}_goTo(e){this._editors.modified.setPosition(new w.y(e.lineRangeMapping.modified.startLineNumber,1)),this._editors.modified.revealRangeInCenter(e.lineRangeMapping.modified.toExclusiveRange())}goToDiff(e){let t,i=this._diffModel.get()?.diff.get()?.mappings;if(!i||0===i.length)return;let n=this._editors.modified.getPosition().lineNumber;t="next"===e?this._editors.modified.getModel().getLineCount()===n?i[0]:i.find(e=>e.lineRangeMapping.modified.startLineNumber>n)??i[0]:(0,l.Uk)(i,e=>e.lineRangeMapping.modified.startLineNumber<n)??i[i.length-1],this._goTo(t),t.lineRangeMapping.modified.isEmpty?this._accessibilitySignalService.playSignal(p.Rh.diffLineDeleted,{source:"diffEditor.goToDiff"}):t.lineRangeMapping.original.isEmpty?this._accessibilitySignalService.playSignal(p.Rh.diffLineInserted,{source:"diffEditor.goToDiff"}):t&&this._accessibilitySignalService.playSignal(p.Rh.diffLineModified,{source:"diffEditor.goToDiff"})}revealFirstDiff(){let e=this._diffModel.get();e&&this.waitForDiff().then(()=>{let t=e.diff.get()?.mappings;t&&0!==t.length&&this._goTo(t[0])})}accessibleDiffViewerNext(){this._accessibleDiffViewer.get().next()}accessibleDiffViewerPrev(){this._accessibleDiffViewer.get().prev()}async waitForDiff(){let e=this._diffModel.get();e&&await e.waitForDiff()}mapToOtherSide(){let e,t=this._editors.modified.hasWidgetFocus(),i=t?this._editors.modified:this._editors.original,n=t?this._editors.original:this._editors.modified,s=i.getSelection();if(s){let i=this._diffModel.get()?.diff.get()?.mappings.map(e=>t?e.lineRangeMapping.flip():e.lineRangeMapping);if(i){let t=(0,A.Mu)(s.getStartPosition(),i),n=(0,A.Mu)(s.getEndPosition(),i);e=y.Q.plusRange(t,n)}}return{destination:n,destinationSelection:e}}switchSide(){let{destination:e,destinationSelection:t}=this.mapToOtherSide();e.focus(),t&&e.setSelection(t)}exitCompareMove(){let e=this._diffModel.get();e&&e.movedTextToCompare.set(void 0,void 0)}collapseAllUnchangedRegions(){let e=this._diffModel.get()?.unchangedRegions.get();e&&(0,g.Rn)(t=>{for(let i of e)i.collapseAll(t)})}showAllUnchangedRegions(){let e=this._diffModel.get()?.unchangedRegions.get();e&&(0,g.Rn)(t=>{for(let i of e)i.showAll(t)})}_handleCursorPositionChange(e,t){if(e?.reason===3){let i=this._diffModel.get()?.diff.get()?.mappings.find(i=>t?i.lineRangeMapping.modified.contains(e.position.lineNumber):i.lineRangeMapping.original.contains(e.position.lineNumber));i?.lineRangeMapping.modified.isEmpty?this._accessibilitySignalService.playSignal(p.Rh.diffLineDeleted,{source:"diffEditor.cursorPositionChanged"}):i?.lineRangeMapping.original.isEmpty?this._accessibilitySignalService.playSignal(p.Rh.diffLineInserted,{source:"diffEditor.cursorPositionChanged"}):i&&this._accessibilitySignalService.playSignal(p.Rh.diffLineModified,{source:"diffEditor.cursorPositionChanged"})}}};eJ=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([eX(3,m.fN),eX(4,f._Y),eX(5,L.T),eX(6,p.Nt),eX(7,b.N8)],eJ)},51471:(e,t,i)=>{"use strict";i.d(t,{i:()=>s});var n=i(82102);class s extends n.jG{constructor(){super(),this._shouldRender=!0}shouldRender(){return this._shouldRender}forceShouldRender(){this._shouldRender=!0}setShouldRender(){this._shouldRender=!0}onDidRender(){this._shouldRender=!1}onCompositionStart(e){return!1}onCompositionEnd(e){return!1}onConfigurationChanged(e){return!1}onCursorStateChanged(e){return!1}onDecorationsChanged(e){return!1}onFlushed(e){return!1}onFocusChanged(e){return!1}onLanguageConfigurationChanged(e){return!1}onLineMappingChanged(e){return!1}onLinesChanged(e){return!1}onLinesDeleted(e){return!1}onLinesInserted(e){return!1}onRevealRangeRequest(e){return!1}onScrollChanged(e){return!1}onThemeChanged(e){return!1}onTokensChanged(e){return!1}onTokensColorsChanged(e){return!1}onZonesChanged(e){return!1}handleEvents(e){let t=!1;for(let i=0,n=e.length;i<n;i++){let n=e[i];switch(n.type){case 0:this.onCompositionStart(n)&&(t=!0);break;case 1:this.onCompositionEnd(n)&&(t=!0);break;case 2:this.onConfigurationChanged(n)&&(t=!0);break;case 3:this.onCursorStateChanged(n)&&(t=!0);break;case 4:this.onDecorationsChanged(n)&&(t=!0);break;case 5:this.onFlushed(n)&&(t=!0);break;case 6:this.onFocusChanged(n)&&(t=!0);break;case 7:this.onLanguageConfigurationChanged(n)&&(t=!0);break;case 8:this.onLineMappingChanged(n)&&(t=!0);break;case 9:this.onLinesChanged(n)&&(t=!0);break;case 10:this.onLinesDeleted(n)&&(t=!0);break;case 11:this.onLinesInserted(n)&&(t=!0);break;case 12:this.onRevealRangeRequest(n)&&(t=!0);break;case 13:this.onScrollChanged(n)&&(t=!0);break;case 15:this.onTokensChanged(n)&&(t=!0);break;case 14:this.onThemeChanged(n)&&(t=!0);break;case 16:this.onTokensColorsChanged(n)&&(t=!0);break;case 17:this.onZonesChanged(n)&&(t=!0);break;default:console.info("View received unknown event: "),console.info(n)}}t&&(this._shouldRender=!0)}}},51543:(e,t,i)=>{"use strict";i.d(t,{L:()=>n});let n=(0,i(22263).u1)("workspaceTrustManagementService")},51711:()=>{},52339:()=>{},52677:()=>{},52746:(e,t,i)=>{"use strict";i.d(t,{Z:()=>h});var n=i(55532),s=i(74221),o=i(4091),r=i(89802),a=i(49352);class l{static createFromLanguage(e,t){function i(e){return t.getKey(`${e.languageId}:::${e.bracketText}`)}let n=new Map;for(let t of e.bracketsNew.openingBrackets){let e=(0,o.qe)(0,t.bracketText.length),l=i(t),h=r.gV.getEmpty().add(l,r.FD);n.set(t.bracketText,new a.ou(e,1,l,h,s.rh.create(e,t,h)))}for(let t of e.bracketsNew.closingBrackets){let e=(0,o.qe)(0,t.bracketText.length),l=r.gV.getEmpty(),h=t.getOpeningBrackets();for(let e of h)l=l.add(i(e),r.FD);n.set(t.bracketText,new a.ou(e,2,i(h[0]),l,s.rh.create(e,t,l)))}return new l(n)}constructor(e){this.map=e,this.hasRegExp=!1,this._regExpGlobal=null}getRegExpStr(){if(this.isEmpty)return null;{let e=[...this.map.keys()];return e.sort(),e.reverse(),e.map(e=>{var t;let i;return t=e,i=(0,n.bm)(t),/^[\w ]+/.test(t)&&(i=`\\b${i}`),/[\w ]+$/.test(t)&&(i=`${i}\\b`),i}).join("|")}}get regExpGlobal(){if(!this.hasRegExp){let e=this.getRegExpStr();this._regExpGlobal=e?RegExp(e,"gi"):null,this.hasRegExp=!0}return this._regExpGlobal}getToken(e){return this.map.get(e.toLowerCase())}findClosingTokenText(e){for(let[t,i]of this.map)if(2===i.kind&&i.bracketIds.intersects(e))return t}get isEmpty(){return 0===this.map.size}}class h{constructor(e,t){this.denseKeyProvider=e,this.getLanguageConfiguration=t,this.languageIdToBracketTokens=new Map}didLanguageChange(e){return this.languageIdToBracketTokens.has(e)}getSingleLanguageBracketTokens(e){let t=this.languageIdToBracketTokens.get(e);return t||(t=l.createFromLanguage(this.getLanguageConfiguration(e),this.denseKeyProvider),this.languageIdToBracketTokens.set(e,t)),t}}},52989:(e,t,i)=>{"use strict";i.d(t,{f:()=>function e(t,i,o,r,a,l){if(Array.isArray(t)){let n=0;for(let s of t){let t=e(s,i,o,r,a,l);if(10===t)return t;t>n&&(n=t)}return n}if("string"==typeof t)return r?"*"===t?5:10*(t===o):0;if(!t)return 0;{let{language:e,pattern:h,scheme:d,hasAccessToAllModels:c,notebookType:u}=t;if(!r&&!c)return 0;u&&a&&(i=a);let g=0;if(d)if(d===i.scheme)g=10;else{if("*"!==d)return 0;g=5}if(e)if(e===o)g=10;else{if("*"!==e)return 0;g=Math.max(g,5)}if(u)if(u===l)g=10;else{if("*"!==u||void 0===l)return 0;g=Math.max(g,5)}if(h){let e;if(!((e="string"==typeof h?h:{...h,base:(0,s.S8)(h.base)})===i.fsPath||(0,n.YW)(e,i.fsPath)))return 0;g=10}return g}}});var n=i(83208),s=i(85521)},53340:(e,t,i)=>{"use strict";i.d(t,{Ix:()=>u,bc:()=>d,nV:()=>c});var n=i(85350),s=i(77897),o=i(55354),r=i(15957);let a=r.kg(2,"Match Case"),l=r.kg(3,"Match Whole Word"),h=r.kg(4,"Use Regular Expression");class d extends s.lM{constructor(e){super({icon:o.W.caseSensitive,title:a+e.appendTitle,isChecked:e.isChecked,hoverDelegate:e.hoverDelegate??(0,n.nZ)("element"),inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}}class c extends s.lM{constructor(e){super({icon:o.W.wholeWord,title:l+e.appendTitle,isChecked:e.isChecked,hoverDelegate:e.hoverDelegate??(0,n.nZ)("element"),inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}}class u extends s.lM{constructor(e){super({icon:o.W.regex,title:h+e.appendTitle,isChecked:e.isChecked,hoverDelegate:e.hoverDelegate??(0,n.nZ)("element"),inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}}},53827:()=>{},54022:()=>{},54050:(e,t,i)=>{"use strict";i.d(t,{U:()=>g});var n,s=i(14578),o=i(47108),r=i(64124),a=i(87991),l=i(27140),h=i(22263),d=i(90057),c=i(148),u=function(e,t){return function(i,n){t(i,n,e)}};let g=(0,h.u1)("ILanguageFeatureDebounceService");!function(e){let t=new WeakMap,i=0;e.of=function(e){let n=t.get(e);return void 0===n&&(n=++i,t.set(e,n)),n}}(n||(n={}));class p{constructor(e){this._default=e}get(e){return this._default}update(e,t){return this._default}default(){return this._default}}class m{constructor(e,t,i,n,s,r){this._logService=e,this._name=t,this._registry=i,this._default=n,this._min=s,this._max=r,this._cache=new o.qK(50,.7)}_key(e){return e.id+this._registry.all(e).reduce((e,t)=>(0,s.sN)(n.of(t),e),0)}get(e){let t=this._key(e),i=this._cache.get(t);return i?(0,r.qE)(i.value,this._min,this._max):this.default()}update(e,t){let i=this._key(e),n=this._cache.get(i);n||(n=new r.mu(6),this._cache.set(i,n));let s=(0,r.qE)(n.update(t),this._min,this._max);return(0,c.v$)(e.uri,"output")||this._logService.trace(`[DEBOUNCE: ${this._name}] for ${e.uri.toString()} is ${s}ms`),s}_overall(){let e=new r.Uq;for(let[,t]of this._cache)e.update(t.value);return e.value}default(){let e=0|this._overall()||this._default;return(0,r.qE)(e,this._min,this._max)}}let f=class{constructor(e,t){this._logService=e,this._data=new Map,this._isDev=t.isExtensionDevelopment||!t.isBuilt}for(e,t,i){let s=i?.min??50,o=i?.max??s**2,r=i?.key??void 0,a=`${n.of(e)},${s}${r?","+r:""}`,l=this._data.get(a);return l||(this._isDev?(this._logService.debug(`[DEBOUNCE: ${t}] is disabled in developed mode`),l=new p(1.5*s)):l=new m(this._logService,t,e,0|this._overallAverage()||1.5*s,s,o),this._data.set(a,l)),l}_overallAverage(){let e=new r.Uq;for(let t of this._data.values())e.update(t.default());return e.value}};f=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([u(0,d.rr),u(1,a.k)],f),(0,l.v)(g,f,1)},54473:(e,t,i)=>{"use strict";i.d(t,{LN:()=>a,aG:()=>d,uO:()=>h});var n=i(46843),s=i(71819),o=i(72553),r=i(23047);class a{getOffsetRange(e){return new s.L(this.getOffset(e.getStartPosition()),this.getOffset(e.getEndPosition()))}getRange(e){return r.Q.fromPositions(this.getPosition(e.start),this.getPosition(e.endExclusive))}getStringReplacement(e){return new l.deps.StringReplacement(this.getOffsetRange(e.range),e.text)}getTextReplacement(e){return new l.deps.TextReplacement(this.getRange(e.replaceRange),e.newText)}getTextEdit(e){let t=e.replacements.map(e=>this.getTextReplacement(e));return new l.deps.TextEdit(t)}}class l{static{this._deps=void 0}static get deps(){if(!this._deps)throw Error("Dependencies not set. Call _setDependencies first.");return this._deps}}function h(e){l._deps=e}class d extends a{constructor(e){super(),this.text=e,this.lineStartOffsetByLineIdx=[],this.lineEndOffsetByLineIdx=[],this.lineStartOffsetByLineIdx.push(0);for(let t=0;t<e.length;t++)"\n"===e.charAt(t)&&(this.lineStartOffsetByLineIdx.push(t+1),t>0&&"\r"===e.charAt(t-1)?this.lineEndOffsetByLineIdx.push(t-1):this.lineEndOffsetByLineIdx.push(t));this.lineEndOffsetByLineIdx.push(e.length)}getOffset(e){let t=this._validatePosition(e);return this.lineStartOffsetByLineIdx[t.lineNumber-1]+t.column-1}_validatePosition(e){if(e.lineNumber<1)return new o.y(1,1);let t=this.textLength.lineCount+1;if(e.lineNumber>t){let e=this.getLineLength(t);return new o.y(t,e+1)}if(e.column<1)return new o.y(e.lineNumber,1);let i=this.getLineLength(e.lineNumber);return e.column-1>i?new o.y(e.lineNumber,i+1):e}getPosition(e){let t=(0,n.iM)(this.lineStartOffsetByLineIdx,t=>t<=e),i=e-this.lineStartOffsetByLineIdx[t]+1;return new o.y(t+1,i)}get textLength(){let e=this.lineStartOffsetByLineIdx.length-1;return new l.deps.TextLength(e,this.text.length-this.lineStartOffsetByLineIdx[e])}getLineLength(e){return this.lineEndOffsetByLineIdx[e-1]-this.lineStartOffsetByLineIdx[e-1]}}},54599:(e,t,i)=>{"use strict";i.d(t,{GM:()=>_,KL:()=>b,Kl:()=>c,Ob:()=>u,Ou:()=>f,XT:()=>p,Zb:()=>v,Zw:()=>g,bk:()=>m,dv:()=>d,wp:()=>C});var n=i(55354),s=i(27281),o=i(88756),r=i(15957),a=i(77715),l=i(22212);(0,a.x1A)("diffEditor.move.border","#8b8b8b9c",(0,r.kg)(134,"The border color for text that got moved in the diff editor.")),(0,a.x1A)("diffEditor.moveActive.border","#FFA500",(0,r.kg)(135,"The active border color for text that got moved in the diff editor.")),(0,a.x1A)("diffEditor.unchangedRegionShadow",{dark:"#000000",light:"#737373BF",hcDark:"#000000",hcLight:"#737373BF"},(0,r.kg)(136,"The color of the shadow around unchanged region widgets."));let h=(0,l.pU)("diff-insert",n.W.add,(0,r.kg)(137,"Line decoration for inserts in the diff editor.")),d=(0,l.pU)("diff-remove",n.W.remove,(0,r.kg)(138,"Line decoration for removals in the diff editor.")),c=o.kI.register({className:"line-insert",description:"line-insert",isWholeLine:!0,linesDecorationsClassName:"insert-sign "+s.L.asClassName(h),marginClassName:"gutter-insert"}),u=o.kI.register({className:"line-delete",description:"line-delete",isWholeLine:!0,linesDecorationsClassName:"delete-sign "+s.L.asClassName(d),marginClassName:"gutter-delete"}),g=o.kI.register({className:"line-insert",description:"line-insert",isWholeLine:!0,marginClassName:"gutter-insert"}),p=o.kI.register({className:"line-delete",description:"line-delete",isWholeLine:!0,marginClassName:"gutter-delete"}),m=o.kI.register({className:"char-insert",description:"char-insert",shouldFillLineOnLineBreak:!0}),f=o.kI.register({className:"char-insert",description:"char-insert",isWholeLine:!0}),_=o.kI.register({className:"char-insert diff-range-empty",description:"char-insert diff-range-empty"}),v=o.kI.register({className:"char-delete",description:"char-delete",shouldFillLineOnLineBreak:!0}),b=o.kI.register({className:"char-delete",description:"char-delete",isWholeLine:!0}),C=o.kI.register({className:"char-delete diff-range-empty",description:"char-delete diff-range-empty"})},54867:(e,t,i)=>{"use strict";i.d(t,{x:()=>oa});var n,s,o,r,a,l,h,d,c,u,g,p,m,f=i(20872),_=i(50518);let v=class{static{this.ID="editor.contrib.markerDecorations"}constructor(e,t){}dispose(){}};v=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([(n=f.A,function(e,t){n(e,t,1)})],v),(0,_.HW)(v.ID,v,0);var b=i(87899),C=i(6033),w=i(17354),y=i(82102),S=i(148);i(93665);var k=i(89197),x=i(29195),L=i(5488),D=i(6230),I=i(28669),N=i(83699),E=i(60564);class M{static{this.items=[]}constructor(e,t){this.key=e,this.migrate=t}apply(e){let t=M._read(e,this.key);this.migrate(t,t=>M._read(e,t),(t,i)=>M._write(e,t,i))}static _read(e,t){if(void 0===e)return;let i=t.indexOf(".");if(i>=0){let n=t.substring(0,i);return this._read(e[n],t.substring(i+1))}return e[t]}static _write(e,t,i){let n=t.indexOf(".");if(n>=0){let s=t.substring(0,n);e[s]=e[s]||{},this._write(e[s],t.substring(n+1),i);return}e[t]=i}}function T(e,t){M.items.push(new M(e,t))}function R(e,t){T(e,(i,n,s)=>{if(void 0!==i){for(let[n,o]of t)if(i===n)return void s(e,o)}})}R("wordWrap",[[!0,"on"],[!1,"off"]]),R("lineNumbers",[[!0,"on"],[!1,"off"]]),R("cursorBlinking",[["visible","solid"]]),R("renderWhitespace",[[!0,"boundary"],[!1,"none"]]),R("renderLineHighlight",[[!0,"line"],[!1,"none"]]),R("acceptSuggestionOnEnter",[[!0,"on"],[!1,"off"]]),R("tabCompletion",[[!1,"off"],[!0,"onlySnippets"]]),R("hover",[[!0,{enabled:!0}],[!1,{enabled:!1}]]),R("parameterHints",[[!0,{enabled:!0}],[!1,{enabled:!1}]]),R("autoIndent",[[!1,"advanced"],[!0,"full"]]),R("matchBrackets",[[!0,"always"],[!1,"never"]]),R("renderFinalNewline",[[!0,"on"],[!1,"off"]]),R("cursorSmoothCaretAnimation",[[!0,"on"],[!1,"off"]]),R("occurrencesHighlight",[[!0,"singleFile"],[!1,"off"]]),R("wordBasedSuggestions",[[!0,"matchingDocuments"],[!1,"off"]]),R("defaultColorDecorators",[[!0,"auto"],[!1,"never"]]),R("minimap.autohide",[[!0,"mouseover"],[!1,"none"]]),T("autoClosingBrackets",(e,t,i)=>{!1===e&&(i("autoClosingBrackets","never"),void 0===t("autoClosingQuotes")&&i("autoClosingQuotes","never"),void 0===t("autoSurround")&&i("autoSurround","never"))}),T("renderIndentGuides",(e,t,i)=>{void 0!==e&&(i("renderIndentGuides",void 0),void 0===t("guides.indentation")&&i("guides.indentation",!!e))}),T("highlightActiveIndentGuide",(e,t,i)=>{void 0!==e&&(i("highlightActiveIndentGuide",void 0),void 0===t("guides.highlightActiveIndentation")&&i("guides.highlightActiveIndentation",!!e))});let O={method:"showMethods",function:"showFunctions",constructor:"showConstructors",deprecated:"showDeprecated",field:"showFields",variable:"showVariables",class:"showClasses",struct:"showStructs",interface:"showInterfaces",module:"showModules",property:"showProperties",event:"showEvents",operator:"showOperators",unit:"showUnits",value:"showValues",constant:"showConstants",enum:"showEnums",enumMember:"showEnumMembers",keyword:"showKeywords",text:"showWords",color:"showColors",file:"showFiles",reference:"showReferences",folder:"showFolders",typeParameter:"showTypeParameters",snippet:"showSnippets"};T("suggest.filteredTypes",(e,t,i)=>{if(e&&"object"==typeof e){for(let n of Object.entries(O))!1===e[n[0]]&&void 0===t(`suggest.${n[1]}`)&&i(`suggest.${n[1]}`,!1);i("suggest.filteredTypes",void 0)}}),T("quickSuggestions",(e,t,i)=>{if("boolean"==typeof e){let t=e?"on":"off";i("quickSuggestions",{comments:t,strings:t,other:t})}}),T("experimental.stickyScroll.enabled",(e,t,i)=>{"boolean"==typeof e&&(i("experimental.stickyScroll.enabled",void 0),void 0===t("stickyScroll.enabled")&&i("stickyScroll.enabled",e))}),T("experimental.stickyScroll.maxLineCount",(e,t,i)=>{"number"==typeof e&&(i("experimental.stickyScroll.maxLineCount",void 0),void 0===t("stickyScroll.maxLineCount")&&i("stickyScroll.maxLineCount",e))}),T("editor.experimentalEditContextEnabled",(e,t,i)=>{"boolean"==typeof e&&(i("editor.experimentalEditContextEnabled",void 0),void 0===t("editor.editContext")&&i("editor.editContext",e))}),T("codeActionsOnSave",(e,t,i)=>{if(e&&"object"==typeof e){let t=!1,n={};for(let i of Object.entries(e))"boolean"==typeof i[1]?(t=!0,n[i[0]]=i[1]?"explicit":"never"):n[i[0]]=i[1];t&&i("codeActionsOnSave",n)}}),T("codeActionWidget.includeNearbyQuickfixes",(e,t,i)=>{"boolean"==typeof e&&(i("codeActionWidget.includeNearbyQuickfixes",void 0),void 0===t("codeActionWidget.includeNearbyQuickFixes")&&i("codeActionWidget.includeNearbyQuickFixes",e))}),T("lightbulb.enabled",(e,t,i)=>{"boolean"==typeof e&&i("lightbulb.enabled",e?void 0:"off")}),T("inlineSuggest.edits.codeShifting",(e,t,i)=>{"boolean"==typeof e&&(i("inlineSuggest.edits.codeShifting",void 0),i("inlineSuggest.edits.allowCodeShifting",e?"always":"never"))});var P=i(24417),A=i(85462),F=i(94599),B=i(3124),W=i(28009),H=i(25454),V=i(33941);let z=class extends y.jG{constructor(e,t,i,n,s){super(),this._accessibilityService=s,this._onDidChange=this._register(new w.vl),this.onDidChange=this._onDidChange.event,this._onDidChangeFast=this._register(new w.vl),this.onDidChangeFast=this._onDidChangeFast.event,this._isDominatedByLongLines=!1,this._viewLineCount=1,this._lineNumbersDigitCount=1,this._reservedHeight=0,this._glyphMarginDecorationLaneCount=1,this._computeOptionsMemory=new A.n0,this.isSimpleWidget=e,this.contextMenuId=t,this._containerObserver=this._register(new N.u(n,i.dimension)),this._targetWindowId=(0,b.zk)(n).vscodeWindowId,this._rawOptions=K(i),this._validatedOptions=$.validateOptions(this._rawOptions),this.options=this._computeOptions(),this.options.get(19)&&this._containerObserver.startObserving(),this._register(F.D.onDidChangeZoomLevel(()=>this._recomputeOptions())),this._register(P.M.onDidChangeTabFocus(()=>this._recomputeOptions())),this._register(this._containerObserver.onDidChange(()=>this._recomputeOptions())),this._register(E.T.onDidChange(()=>this._recomputeOptions())),this._register(H.c.getInstance((0,b.zk)(n)).onDidChange(()=>this._recomputeOptions())),this._register(this._accessibilityService.onDidChangeScreenReaderOptimized(()=>this._recomputeOptions())),this._register(V.U.onDidChangeInputMode(()=>this._recomputeOptions()))}_recomputeOptions(){let e=this._computeOptions(),t=$.checkEquals(this.options,e);null!==t&&(this.options=e,this._onDidChangeFast.fire(t),this._onDidChange.fire(t))}_computeOptions(){let e=this._readEnvConfiguration(),t=B._8.createFromValidatedSettings(this._validatedOptions,e.pixelRatio,this.isSimpleWidget),i=this._readFontInfo(t),n={memory:this._computeOptionsMemory,outerWidth:e.outerWidth,outerHeight:e.outerHeight-this._reservedHeight,fontInfo:i,extraEditorClassName:e.extraEditorClassName,isDominatedByLongLines:this._isDominatedByLongLines,viewLineCount:this._viewLineCount,lineNumbersDigitCount:this._lineNumbersDigitCount,emptySelectionClipboard:e.emptySelectionClipboard,pixelRatio:e.pixelRatio,tabFocusMode:this._validatedOptions.get(164)||P.M.getTabFocusMode(),inputMode:V.U.getInputMode(),accessibilitySupport:e.accessibilitySupport,glyphMarginDecorationLaneCount:this._glyphMarginDecorationLaneCount,editContextSupported:e.editContextSupported};return $.computeOptions(this._validatedOptions,n)}_readEnvConfiguration(){let e;return{extraEditorClassName:(e="",x.nr||x.c8?e+="no-minimap-shadow enable-user-select ":e+="no-user-select ",I.zx&&(e+="mac "),e),outerWidth:this._containerObserver.getWidth(),outerHeight:this._containerObserver.getHeight(),emptySelectionClipboard:x.Tc||x.gm,pixelRatio:H.c.getInstance((0,b.ZF)(this._targetWindowId,!0).window).value,editContextSupported:"function"==typeof globalThis.EditContext,accessibilitySupport:this._accessibilityService.isScreenReaderOptimized()?2:this._accessibilityService.getAccessibilitySupport()}}_readFontInfo(e){return E.T.readFontInfo((0,b.ZF)(this._targetWindowId,!0).window,e)}getRawOptions(){return this._rawOptions}updateOptions(e){let t=K(e);$.applyUpdate(this._rawOptions,t)&&(this._validatedOptions=$.validateOptions(this._rawOptions),this._recomputeOptions())}observeContainer(e){this._containerObserver.observe(e)}setIsDominatedByLongLines(e){this._isDominatedByLongLines!==e&&(this._isDominatedByLongLines=e,this._recomputeOptions())}setModelLineCount(e){let t=function(e){let t=0;for(;e;)e=Math.floor(e/10),t++;return t||1}(e);this._lineNumbersDigitCount!==t&&(this._lineNumbersDigitCount=t,this._recomputeOptions())}setViewLineCount(e){this._viewLineCount!==e&&(this._viewLineCount=e,this._recomputeOptions())}setReservedHeight(e){this._reservedHeight!==e&&(this._reservedHeight=e,this._recomputeOptions())}setGlyphMarginDecorationLaneCount(e){this._glyphMarginDecorationLaneCount!==e&&(this._glyphMarginDecorationLaneCount=e,this._recomputeOptions())}};z=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([(s=W.j,function(e,t){s(e,t,4)})],z);class U{constructor(){this._values=[]}_read(e){return this._values[e]}get(e){return this._values[e]}_write(e,t){this._values[e]=t}}class j{constructor(){this._values=[]}_read(e){if(e>=this._values.length)throw Error("Cannot read uninitialized value");return this._values[e]}get(e){return this._read(e)}_write(e,t){this._values[e]=t}}class ${static validateOptions(e){let t=new U;for(let i of A.BE){let n="_never_"===i.name?void 0:e[i.name];t._write(i.id,i.validate(n))}return t}static computeOptions(e,t){let i=new j;for(let n of A.BE)i._write(n.id,n.compute(t,i,e._read(n.id)));return i}static _deepEquals(e,t){if("object"!=typeof e||"object"!=typeof t||!e||!t)return e===t;if(Array.isArray(e)||Array.isArray(t))return!!(Array.isArray(e)&&Array.isArray(t))&&L.aI(e,t);if(Object.keys(e).length!==Object.keys(t).length)return!1;for(let i in e)if(!$._deepEquals(e[i],t[i]))return!1;return!0}static checkEquals(e,t){let i=[],n=!1;for(let s of A.BE){let o=!$._deepEquals(e._read(s.id),t._read(s.id));i[s.id]=o,o&&(n=!0)}return n?new A.lw(i):null}static applyUpdate(e,t){let i=!1;for(let n of A.BE)if(t.hasOwnProperty(n.name)){let s=n.applyUpdate(e[n.name],t[n.name]);e[n.name]=s.newValue,i=i||s.didChange}return i}}function K(e){let t=D.Go(e);return M.items.forEach(e=>e.apply(t)),t}var G=i(89597),q=i(7633);!function(e){let t={total:0,min:Number.MAX_VALUE,max:0},i={...t},n={...t},s={...t},o=0,r={keydown:0,input:0,render:0};function a(){1===r.keydown&&(performance.mark("keydown/end"),r.keydown=2)}function l(){performance.mark("input/start"),r.input=1,c()}function h(){1===r.input&&(performance.mark("input/end"),r.input=2)}function d(){1===r.render&&(performance.mark("render/end"),r.render=2)}function c(){setTimeout(u)}function u(){2===r.keydown&&2===r.input&&2===r.render&&(performance.mark("inputlatency/end"),performance.measure("keydown","keydown/start","keydown/end"),performance.measure("input","input/start","input/end"),performance.measure("render","render/start","render/end"),performance.measure("inputlatency","inputlatency/start","inputlatency/end"),g("keydown",t),g("input",i),g("render",n),g("inputlatency",s),o++,performance.clearMarks("keydown/start"),performance.clearMarks("keydown/end"),performance.clearMarks("input/start"),performance.clearMarks("input/end"),performance.clearMarks("render/start"),performance.clearMarks("render/end"),performance.clearMarks("inputlatency/start"),performance.clearMarks("inputlatency/end"),performance.clearMeasures("keydown"),performance.clearMeasures("input"),performance.clearMeasures("render"),performance.clearMeasures("inputlatency"),r.keydown=0,r.input=0,r.render=0)}function g(e,t){let i=performance.getEntriesByName(e)[0].duration;t.total+=i,t.min=Math.min(t.min,i),t.max=Math.max(t.max,i)}function p(e){return{average:e.total/o,max:e.max,min:e.min}}function m(e){e.total=0,e.min=Number.MAX_VALUE,e.max=0}e.onKeyDown=function(){u(),performance.mark("inputlatency/start"),performance.mark("keydown/start"),r.keydown=1,queueMicrotask(a)},e.onBeforeInput=l,e.onInput=function(){0===r.input&&l(),queueMicrotask(h)},e.onKeyUp=function(){u()},e.onSelectionChange=function(){u()},e.onRenderStart=function(){2===r.keydown&&2===r.input&&0===r.render&&(performance.mark("render/start"),r.render=1,queueMicrotask(d),c())},e.getAndClearMeasurements=function(){if(0===o)return;let e={keydown:p(t),input:p(i),render:p(n),total:p(s),sampleCount:o};return m(t),m(i),m(n),m(s),o=0,e}}(h||(h={}));var Q=i(38672),Y=i(51471);class Z extends Y.i{constructor(e){super(),this._context=e,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}}class X{static write(e,t){e.setAttribute("data-mprt",String(t))}static read(e){let t=e.getAttribute("data-mprt");return null===t?0:parseInt(t,10)}static collect(e,t){let i=[],n=0;for(;e&&e!==e.ownerDocument.body&&e!==t;)e.nodeType===e.ELEMENT_NODE&&(i[n++]=this.read(e)),e=e.parentElement;let s=new Uint8Array(n);for(let e=0;e<n;e++)s[e]=i[n-e-1];return s}}var J=i(92588),ee=i(72553),et=i(23047),ei=i(17379),en=i(16933),es=i(60095),eo=i(96784);class er{constructor(e=null){this.hitTarget=e,this.type=0}}class ea{get hitTarget(){return this.spanNode}constructor(e,t,i){this.position=e,this.spanNode=t,this.injectedText=i,this.type=1}}(d||(d={})).createFromDOMInfo=function(e,t,i){let n=e.getPositionFromDOMInfo(t,i);return n?new ea(n,t,null):new er(t)};class el{constructor(e,t){this.lastViewCursorsRenderData=e,this.lastTextareaPosition=t}}class eh{static _deduceRage(e,t=null){return!t&&e?new et.Q(e.lineNumber,e.column,e.lineNumber,e.column):t??null}static createUnknown(e,t,i){return{type:0,element:e,mouseColumn:t,position:i,range:this._deduceRage(i)}}static createTextarea(e,t){return{type:1,element:e,mouseColumn:t,position:null,range:null}}static createMargin(e,t,i,n,s,o){return{type:e,element:t,mouseColumn:i,position:n,range:s,detail:o}}static createViewZone(e,t,i,n,s){return{type:e,element:t,mouseColumn:i,position:n,range:this._deduceRage(n),detail:s}}static createContentText(e,t,i,n,s){return{type:6,element:e,mouseColumn:t,position:i,range:this._deduceRage(i,n),detail:s}}static createContentEmpty(e,t,i,n){return{type:7,element:e,mouseColumn:t,position:i,range:this._deduceRage(i),detail:n}}static createContentWidget(e,t,i){return{type:9,element:e,mouseColumn:t,position:null,range:null,detail:i}}static createScrollbar(e,t,i){return{type:11,element:e,mouseColumn:t,position:i,range:this._deduceRage(i)}}static createOverlayWidget(e,t,i){return{type:12,element:e,mouseColumn:t,position:null,range:null,detail:i}}static createOutsideEditor(e,t,i,n){return{type:13,element:null,mouseColumn:e,position:t,range:this._deduceRage(t),outsidePosition:i,outsideDistance:n}}static _typeToString(e){return 1===e?"TEXTAREA":2===e?"GUTTER_GLYPH_MARGIN":3===e?"GUTTER_LINE_NUMBERS":4===e?"GUTTER_LINE_DECORATIONS":5===e?"GUTTER_VIEW_ZONE":6===e?"CONTENT_TEXT":7===e?"CONTENT_EMPTY":8===e?"CONTENT_VIEW_ZONE":9===e?"CONTENT_WIDGET":10===e?"OVERVIEW_RULER":11===e?"SCROLLBAR":12===e?"OVERLAY_WIDGET":"UNKNOWN"}static toString(e){return this._typeToString(e.type)+": "+e.position+" - "+e.range+" - "+JSON.stringify(e.detail)}}class ed{static isTextArea(e){return 2===e.length&&3===e[0]&&7===e[1]}static isChildOfViewLines(e){return e.length>=4&&3===e[0]&&8===e[3]}static isStrictChildOfViewLines(e){return e.length>4&&3===e[0]&&8===e[3]}static isChildOfScrollableElement(e){return e.length>=2&&3===e[0]&&6===e[1]}static isChildOfMinimap(e){return e.length>=2&&3===e[0]&&9===e[1]}static isChildOfContentWidgets(e){return e.length>=4&&3===e[0]&&1===e[3]}static isChildOfOverflowGuard(e){return e.length>=1&&3===e[0]}static isChildOfOverflowingContentWidgets(e){return e.length>=1&&2===e[0]}static isChildOfOverlayWidgets(e){return e.length>=2&&3===e[0]&&4===e[1]}static isChildOfOverflowingOverlayWidgets(e){return e.length>=1&&5===e[0]}}class ec{constructor(e,t,i){this.viewModel=e.viewModel;let n=e.configuration.options;this.layoutInfo=n.get(165),this.viewDomNode=t.viewDomNode,this.viewLinesGpu=t.viewLinesGpu,this.lineHeight=n.get(75),this.stickyTabStops=n.get(132),this.typicalHalfwidthCharacterWidth=n.get(59).typicalHalfwidthCharacterWidth,this.lastRenderData=i,this._context=e,this._viewHelper=t}getZoneAtCoord(e){return ec.getZoneAtCoord(this._context,e)}static getZoneAtCoord(e,t){let i=e.viewLayout.getWhitespaceAtVerticalOffset(t);if(i){let n,s=i.verticalOffset+i.height/2,o=e.viewModel.getLineCount(),r=null,a=null;return i.afterLineNumber!==o&&(a=new ee.y(i.afterLineNumber+1,1)),i.afterLineNumber>0&&(r=new ee.y(i.afterLineNumber,e.viewModel.getLineMaxColumn(i.afterLineNumber))),n=null===a?r:null===r?a:t<s?r:a,{viewZoneId:i.id,afterLineNumber:i.afterLineNumber,positionBefore:r,positionAfter:a,position:n}}return null}getFullLineRangeAtCoord(e){if(this._context.viewLayout.isAfterLines(e)){let e=this._context.viewModel.getLineCount(),t=this._context.viewModel.getLineMaxColumn(e);return{range:new et.Q(e,t,e,t),isAfterLines:!0}}let t=this._context.viewLayout.getLineNumberAtVerticalOffset(e),i=this._context.viewModel.getLineMaxColumn(t);return{range:new et.Q(t,1,t,i),isAfterLines:!1}}getLineNumberAtVerticalOffset(e){return this._context.viewLayout.getLineNumberAtVerticalOffset(e)}isAfterLines(e){return this._context.viewLayout.isAfterLines(e)}isInTopPadding(e){return this._context.viewLayout.isInTopPadding(e)}isInBottomPadding(e){return this._context.viewLayout.isInBottomPadding(e)}getVerticalOffsetForLineNumber(e){return this._context.viewLayout.getVerticalOffsetForLineNumber(e)}findAttribute(e,t){return ec._findAttribute(e,t,this._viewHelper.viewDomNode)}static _findAttribute(e,t,i){for(;e&&e!==e.ownerDocument.body;){if(e.hasAttribute&&e.hasAttribute(t))return e.getAttribute(t);if(e===i)break;e=e.parentNode}return null}getLineWidth(e){return this._viewHelper.getLineWidth(e)}isRtl(e){return this.viewModel.getTextDirection(e)===es.z4.RTL}visibleRangeForPosition(e,t){return this._viewHelper.visibleRangeForPosition(e,t)}getPositionFromDOMInfo(e,t){return this._viewHelper.getPositionFromDOMInfo(e,t)}getCurrentScrollTop(){return this._context.viewLayout.getCurrentScrollTop()}getCurrentScrollLeft(){return this._context.viewLayout.getCurrentScrollLeft()}}class eu{constructor(e,t,i,n){this.editorPos=t,this.pos=i,this.relativePos=n,this.mouseVerticalOffset=Math.max(0,e.getCurrentScrollTop()+this.relativePos.y),this.mouseContentHorizontalOffset=e.getCurrentScrollLeft()+this.relativePos.x-e.layoutInfo.contentLeft,this.isInMarginArea=this.relativePos.x<e.layoutInfo.contentLeft&&this.relativePos.x>=e.layoutInfo.glyphMarginLeft,this.isInContentArea=!this.isInMarginArea,this.mouseColumn=Math.max(0,ef._getMouseColumn(this.mouseContentHorizontalOffset,e.typicalHalfwidthCharacterWidth))}}class eg extends eu{get target(){return this._useHitTestTarget?this.hitTestResult.value.hitTarget:this._eventTarget}get targetPath(){return this._targetPathCacheElement!==this.target&&(this._targetPathCacheElement=this.target,this._targetPathCacheValue=X.collect(this.target,this._ctx.viewDomNode)),this._targetPathCacheValue}constructor(e,t,i,n,s){super(e,t,i,n),this.hitTestResult=new eo.d(()=>ef.doHitTest(this._ctx,this)),this._targetPathCacheElement=null,this._targetPathCacheValue=new Uint8Array(0),this._ctx=e,this._eventTarget=s;let o=!!this._eventTarget;this._useHitTestTarget=!o}toString(){return`pos(${this.pos.x},${this.pos.y}), editorPos(${this.editorPos.x},${this.editorPos.y}), relativePos(${this.relativePos.x},${this.relativePos.y}), mouseVerticalOffset: ${this.mouseVerticalOffset}, mouseContentHorizontalOffset: ${this.mouseContentHorizontalOffset}
|
|
539
539
|
target: ${this.target?this.target.outerHTML:null}`}get wouldBenefitFromHitTestTargetSwitch(){return!this._useHitTestTarget&&null!==this.hitTestResult.value.hitTarget&&this.target!==this.hitTestResult.value.hitTarget}switchToHitTestTarget(){this._useHitTestTarget=!0}_getMouseColumn(e=null){return e&&e.column<this._ctx.viewModel.getLineMaxColumn(e.lineNumber)?ei.A.visibleColumnFromColumn(this._ctx.viewModel.getLineContent(e.lineNumber),e.column,this._ctx.viewModel.model.getOptions().tabSize)+1:this.mouseColumn}fulfillUnknown(e=null){return eh.createUnknown(this.target,this._getMouseColumn(e),e)}fulfillTextarea(){return eh.createTextarea(this.target,this._getMouseColumn())}fulfillMargin(e,t,i,n){return eh.createMargin(e,this.target,this._getMouseColumn(t),t,i,n)}fulfillViewZone(e,t,i){return eh.createViewZone(e,this.target,this._getMouseColumn(t),t,i)}fulfillContentText(e,t,i){return eh.createContentText(this.target,this._getMouseColumn(e),e,t,i)}fulfillContentEmpty(e,t){return eh.createContentEmpty(this.target,this._getMouseColumn(e),e,t)}fulfillContentWidget(e){return eh.createContentWidget(this.target,this._getMouseColumn(),e)}fulfillScrollbar(e){return eh.createScrollbar(this.target,this._getMouseColumn(e),e)}fulfillOverlayWidget(e){return eh.createOverlayWidget(this.target,this._getMouseColumn(),e)}}let ep={isAfterLines:!0};function em(e){return{isAfterLines:!1,horizontalDistanceToText:e}}class ef{constructor(e,t){this._context=e,this._viewHelper=t}mouseTargetIsWidget(e){let t=e.target,i=X.collect(t,this._viewHelper.viewDomNode);return!!(ed.isChildOfContentWidgets(i)||ed.isChildOfOverflowingContentWidgets(i)||ed.isChildOfOverlayWidgets(i)||ed.isChildOfOverflowingOverlayWidgets(i))}createMouseTarget(e,t,i,n,s){let o=new ec(this._context,this._viewHelper,e),r=new eg(o,t,i,n,s);try{let e=ef._createMouseTarget(o,r);if(6===e.type&&o.stickyTabStops&&null!==e.position){let t=ef._snapToSoftTabBoundary(e.position,o.viewModel),i=et.Q.fromPositions(t,t).plusRange(e.range);return r.fulfillContentText(t,i,e.detail)}return e}catch(e){return r.fulfillUnknown()}}static _createMouseTarget(e,t){if(null===t.target)return t.fulfillUnknown();let i=null;return ed.isChildOfOverflowGuard(t.targetPath)||ed.isChildOfOverflowingContentWidgets(t.targetPath)||ed.isChildOfOverflowingOverlayWidgets(t.targetPath)||(i=i||t.fulfillUnknown()),(i=(i=(i=(i=(i=(i=(i=(i=(i=(i=i||ef._hitTestContentWidget(e,t))||ef._hitTestOverlayWidget(e,t))||ef._hitTestMinimap(e,t))||ef._hitTestScrollbarSlider(e,t))||ef._hitTestViewZone(e,t))||ef._hitTestMargin(e,t))||ef._hitTestViewCursor(e,t))||ef._hitTestTextArea(e,t))||ef._hitTestViewLines(e,t))||ef._hitTestScrollbar(e,t))||t.fulfillUnknown()}static _hitTestContentWidget(e,t){if(ed.isChildOfContentWidgets(t.targetPath)||ed.isChildOfOverflowingContentWidgets(t.targetPath)){let i=e.findAttribute(t.target,"widgetId");return i?t.fulfillContentWidget(i):t.fulfillUnknown()}return null}static _hitTestOverlayWidget(e,t){if(ed.isChildOfOverlayWidgets(t.targetPath)||ed.isChildOfOverflowingOverlayWidgets(t.targetPath)){let i=e.findAttribute(t.target,"widgetId");return i?t.fulfillOverlayWidget(i):t.fulfillUnknown()}return null}static _hitTestViewCursor(e,t){if(t.target){for(let i of e.lastRenderData.lastViewCursorsRenderData)if(t.target===i.domNode)return t.fulfillContentText(i.position,null,{mightBeForeignElement:!1,injectedText:null})}if(t.isInContentArea){let i=e.lastRenderData.lastViewCursorsRenderData,n=t.mouseContentHorizontalOffset,s=t.mouseVerticalOffset;for(let o of i){if(n<o.contentLeft||n>o.contentLeft+o.width)continue;let i=e.getVerticalOffsetForLineNumber(o.position.lineNumber);if(i<=s&&s<=i+o.height)return t.fulfillContentText(o.position,null,{mightBeForeignElement:!1,injectedText:null})}}return null}static _hitTestViewZone(e,t){let i=e.getZoneAtCoord(t.mouseVerticalOffset);if(i){let e=t.isInContentArea?8:5;return t.fulfillViewZone(e,i.position,i)}return null}static _hitTestTextArea(e,t){return ed.isTextArea(t.targetPath)?e.lastRenderData.lastTextareaPosition?t.fulfillContentText(e.lastRenderData.lastTextareaPosition,null,{mightBeForeignElement:!1,injectedText:null}):t.fulfillTextarea():null}static _hitTestMargin(e,t){if(t.isInMarginArea){let i=e.getFullLineRangeAtCoord(t.mouseVerticalOffset),n=i.range.getStartPosition(),s=Math.abs(t.relativePos.x),o={isAfterLines:i.isAfterLines,glyphMarginLeft:e.layoutInfo.glyphMarginLeft,glyphMarginWidth:e.layoutInfo.glyphMarginWidth,lineNumbersWidth:e.layoutInfo.lineNumbersWidth,offsetX:s};if((s-=e.layoutInfo.glyphMarginLeft)<=e.layoutInfo.glyphMarginWidth){let r=e.viewModel.coordinatesConverter.convertViewPositionToModelPosition(i.range.getStartPosition());return o.glyphMarginLane=e.viewModel.glyphLanes.getLanesAtLine(r.lineNumber)[Math.floor(s/e.lineHeight)],t.fulfillMargin(2,n,i.range,o)}return(s-=e.layoutInfo.glyphMarginWidth)<=e.layoutInfo.lineNumbersWidth?t.fulfillMargin(3,n,i.range,o):(s-=e.layoutInfo.lineNumbersWidth,t.fulfillMargin(4,n,i.range,o))}return null}static _hitTestViewLines(e,t){if(!ed.isChildOfViewLines(t.targetPath))return null;if(e.isInTopPadding(t.mouseVerticalOffset))return t.fulfillContentEmpty(new ee.y(1,1),ep);if(e.isAfterLines(t.mouseVerticalOffset)||e.isInBottomPadding(t.mouseVerticalOffset)){let i=e.viewModel.getLineCount(),n=e.viewModel.getLineMaxColumn(i);return t.fulfillContentEmpty(new ee.y(i,n),ep)}if(ed.isStrictChildOfViewLines(t.targetPath)){let i=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),n=e.viewModel.getLineLength(i),s=e.getLineWidth(i);if(0===n){let e=em(t.mouseContentHorizontalOffset-s);return t.fulfillContentEmpty(new ee.y(i,1),e)}if(e.isRtl(i)){if(t.mouseContentHorizontalOffset+s<=e.layoutInfo.contentWidth-e.layoutInfo.verticalScrollbarWidth){let n=em(t.mouseContentHorizontalOffset-s),o=new ee.y(i,e.viewModel.getLineMaxColumn(i));return t.fulfillContentEmpty(o,n)}}else if(t.mouseContentHorizontalOffset>=s){let n=em(t.mouseContentHorizontalOffset-s),o=new ee.y(i,e.viewModel.getLineMaxColumn(i));return t.fulfillContentEmpty(o,n)}}else if(e.viewLinesGpu){let i=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset);if(0===e.viewModel.getLineLength(i)){let n=e.getLineWidth(i),s=em(t.mouseContentHorizontalOffset-n);return t.fulfillContentEmpty(new ee.y(i,1),s)}let n=e.getLineWidth(i);if(e.isRtl(i)){if(t.mouseContentHorizontalOffset+n<=e.layoutInfo.contentWidth-e.layoutInfo.verticalScrollbarWidth){let s=em(t.mouseContentHorizontalOffset-n),o=new ee.y(i,e.viewModel.getLineMaxColumn(i));return t.fulfillContentEmpty(o,s)}}else if(t.mouseContentHorizontalOffset>=n){let s=em(t.mouseContentHorizontalOffset-n),o=new ee.y(i,e.viewModel.getLineMaxColumn(i));return t.fulfillContentEmpty(o,s)}let s=e.viewLinesGpu.getPositionAtCoordinate(i,t.mouseContentHorizontalOffset);if(s)return t.fulfillContentText(s,et.Q.fromPositions(s,s),{injectedText:null,mightBeForeignElement:!1})}let i=t.hitTestResult.value;return 1===i.type?ef.createMouseTargetFromHitTestPosition(e,t,i.spanNode,i.position,i.injectedText):t.wouldBenefitFromHitTestTargetSwitch?(t.switchToHitTestTarget(),this._createMouseTarget(e,t)):t.fulfillUnknown()}static _hitTestMinimap(e,t){if(ed.isChildOfMinimap(t.targetPath)){let i=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),n=e.viewModel.getLineMaxColumn(i);return t.fulfillScrollbar(new ee.y(i,n))}return null}static _hitTestScrollbarSlider(e,t){if(ed.isChildOfScrollableElement(t.targetPath)&&t.target&&1===t.target.nodeType){let i=t.target.className;if(i&&/\b(slider|scrollbar)\b/.test(i)){let i=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),n=e.viewModel.getLineMaxColumn(i);return t.fulfillScrollbar(new ee.y(i,n))}}return null}static _hitTestScrollbar(e,t){if(ed.isChildOfScrollableElement(t.targetPath)){let i=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),n=e.viewModel.getLineMaxColumn(i);return t.fulfillScrollbar(new ee.y(i,n))}return null}getMouseColumn(e){let t=this._context.configuration.options,i=t.get(165),n=this._context.viewLayout.getCurrentScrollLeft()+e.x-i.contentLeft;return ef._getMouseColumn(n,t.get(59).typicalHalfwidthCharacterWidth)}static _getMouseColumn(e,t){return e<0?1:Math.round(e/t)+1}static createMouseTargetFromHitTestPosition(e,t,i,n,s){let o=n.lineNumber,r=n.column,a=e.getLineWidth(o);if(t.mouseContentHorizontalOffset>a){let e=em(t.mouseContentHorizontalOffset-a);return t.fulfillContentEmpty(n,e)}let l=e.visibleRangeForPosition(o,r);if(!l)return t.fulfillUnknown(n);let h=l.left;if(1>Math.abs(t.mouseContentHorizontalOffset-h))return t.fulfillContentText(n,null,{mightBeForeignElement:!!s,injectedText:s});let d=[];if(d.push({offset:l.left,column:r}),r>1){let t=e.visibleRangeForPosition(o,r-1);t&&d.push({offset:t.left,column:r-1})}if(r<e.viewModel.getLineMaxColumn(o)){let t=e.visibleRangeForPosition(o,r+1);t&&d.push({offset:t.left,column:r+1})}d.sort((e,t)=>e.offset-t.offset);let c=t.pos.toClientCoordinates(b.zk(e.viewDomNode)),u=i.getBoundingClientRect(),g=u.left<=c.clientX&&c.clientX<=u.right,p=null;for(let e=1;e<d.length;e++){let i=d[e-1],s=d[e];if(i.offset<=t.mouseContentHorizontalOffset&&t.mouseContentHorizontalOffset<=s.offset){p=new et.Q(o,i.column,o,s.column),n=Math.abs(i.offset-t.mouseContentHorizontalOffset)<Math.abs(s.offset-t.mouseContentHorizontalOffset)?new ee.y(o,i.column):new ee.y(o,s.column);break}}return t.fulfillContentText(n,p,{mightBeForeignElement:!g||!!s,injectedText:s})}static _doHitTestWithCaretRangeFromPoint(e,t){let i=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),n=e.getVerticalOffsetForLineNumber(i),s=n+e.lineHeight;if(!(i===e.viewModel.getLineCount()&&t.mouseVerticalOffset>s)){let i=Math.floor((n+s)/2),o=t.pos.y+(i-t.mouseVerticalOffset);o<=t.editorPos.y&&(o=t.editorPos.y+1),o>=t.editorPos.y+t.editorPos.height&&(o=t.editorPos.y+t.editorPos.height-1);let r=new Q.nz(t.pos.x,o),a=this._actualDoHitTestWithCaretRangeFromPoint(e,r.toClientCoordinates(b.zk(e.viewDomNode)));if(1===a.type)return a}return this._actualDoHitTestWithCaretRangeFromPoint(e,t.pos.toClientCoordinates(b.zk(e.viewDomNode)))}static _actualDoHitTestWithCaretRangeFromPoint(e,t){let i,n=b.jG(e.viewDomNode);if(!(i=n?void 0===n.caretRangeFromPoint?function(e,t,i){let n=document.createRange(),s=e.elementFromPoint(t,i);if(s?.hasChildNodes()){let e;for(;s&&s.firstChild&&s.firstChild.nodeType!==s.firstChild.TEXT_NODE&&s.lastChild&&s.lastChild.firstChild;)s=s.lastChild;let i=s.getBoundingClientRect(),o=b.zk(s),r=o.getComputedStyle(s,null).getPropertyValue("font-style"),a=o.getComputedStyle(s,null).getPropertyValue("font-variant"),l=o.getComputedStyle(s,null).getPropertyValue("font-weight"),h=o.getComputedStyle(s,null).getPropertyValue("font-size"),d=o.getComputedStyle(s,null).getPropertyValue("line-height"),c=o.getComputedStyle(s,null).getPropertyValue("font-family"),u=`${r} ${a} ${l} ${h}/${d} ${c}`,g=s.innerText,p=i.left,m=0;if(t>i.left+i.width)m=g.length;else{let i=e_.getInstance();for(let n=0;n<g.length+1;n++){if(t<(p+=e=i.getCharWidth(g.charAt(n),u)/2)){m=n;break}p+=e}}n.setStart(s.firstChild,m),n.setEnd(s.firstChild,m)}return n}(n,t.clientX,t.clientY):n.caretRangeFromPoint(t.clientX,t.clientY):e.viewDomNode.ownerDocument.caretRangeFromPoint(t.clientX,t.clientY))||!i.startContainer)return new er;let s=i.startContainer;if(s.nodeType===s.TEXT_NODE){let t=s.parentNode,n=t?t.parentNode:null,o=n?n.parentNode:null;return(o&&o.nodeType===o.ELEMENT_NODE?o.className:null)===J.G.CLASS_NAME?d.createFromDOMInfo(e,t,i.startOffset):new er(s.parentNode)}if(s.nodeType===s.ELEMENT_NODE){let t=s.parentNode,i=t?t.parentNode:null;return(i&&i.nodeType===i.ELEMENT_NODE?i.className:null)===J.G.CLASS_NAME?d.createFromDOMInfo(e,s,s.textContent.length):new er(s)}return new er}static _doHitTestWithCaretPositionFromPoint(e,t){let i=e.viewDomNode.ownerDocument.caretPositionFromPoint(t.clientX,t.clientY);if(i.offsetNode.nodeType===i.offsetNode.TEXT_NODE){let t=i.offsetNode.parentNode,n=t?t.parentNode:null,s=n?n.parentNode:null;return(s&&s.nodeType===s.ELEMENT_NODE?s.className:null)===J.G.CLASS_NAME?d.createFromDOMInfo(e,i.offsetNode.parentNode,i.offset):new er(i.offsetNode.parentNode)}if(i.offsetNode.nodeType===i.offsetNode.ELEMENT_NODE){let t=i.offsetNode.parentNode,n=t&&t.nodeType===t.ELEMENT_NODE?t.className:null,s=t?t.parentNode:null,o=s&&s.nodeType===s.ELEMENT_NODE?s.className:null;if(n===J.G.CLASS_NAME){let t=i.offsetNode.childNodes[Math.min(i.offset,i.offsetNode.childNodes.length-1)];if(t)return d.createFromDOMInfo(e,t,0)}else if(o===J.G.CLASS_NAME)return d.createFromDOMInfo(e,i.offsetNode,0)}return new er(i.offsetNode)}static _snapToSoftTabBoundary(e,t){let i=t.getLineContent(e.lineNumber),{tabSize:n}=t.model.getOptions(),s=en.s.atomicPosition(i,e.column-1,n,2);return -1!==s?new ee.y(e.lineNumber,s+1):e}static doHitTest(e,t){let i=new er;if("function"==typeof e.viewDomNode.ownerDocument.caretRangeFromPoint?i=this._doHitTestWithCaretRangeFromPoint(e,t):e.viewDomNode.ownerDocument.caretPositionFromPoint&&(i=this._doHitTestWithCaretPositionFromPoint(e,t.pos.toClientCoordinates(b.zk(e.viewDomNode)))),1===i.type){let t=e.viewModel.getInjectedTextAt(i.position),n=e.viewModel.normalizePosition(i.position,2);(t||!n.equals(i.position))&&(i=new ea(n,i.spanNode,t))}return i}}class e_{static{this._INSTANCE=null}static getInstance(){return e_._INSTANCE||(e_._INSTANCE=new e_),e_._INSTANCE}constructor(){this._cache={},this._canvas=document.createElement("canvas")}getCharWidth(e,t){let i=e+t;if(this._cache[i])return this._cache[i];let n=this._canvas.getContext("2d");n.font=t;let s=n.measureText(e).width;return this._cache[i]=s,s}}var ev=i(29031),eb=i(87460),eC=i(60393),ew=i(35023),ey=i(82600),eS=i(78271);class ek extends y.jG{constructor(e,t,i,n){super(),this._context=e,this._viewHelper=t,this._mouseTargetFactory=i,this._dispatchMouse=n,this._operation=null}dispose(){super.dispose(),this.stop()}start(e,t){this._operation?this._operation.setPosition(e,t):this._operation=this._createDragScrollingOperation(e,t)}stop(){this._operation&&(this._operation.dispose(),this._operation=null)}}class ex extends y.jG{constructor(e,t,i,n,s,o){super(),this._context=e,this._viewHelper=t,this._mouseTargetFactory=i,this._dispatchMouse=n,this._position=s,this._mouseEvent=o,this._lastTime=Date.now(),this._animationFrameDisposable=b.PG(b.zk(o.browserEvent),()=>this._execute())}dispose(){this._animationFrameDisposable.dispose(),super.dispose()}setPosition(e,t){this._position=e,this._mouseEvent=t}_tick(){let e=Date.now(),t=e-this._lastTime;return this._lastTime=e,t}}class eL extends ek{_createDragScrollingOperation(e,t){return new eD(this._context,this._viewHelper,this._mouseTargetFactory,this._dispatchMouse,e,t)}}class eD extends ex{_getScrollSpeed(){let e=this._context.configuration.options.get(75),t=this._context.configuration.options.get(165).height/e,i=this._position.outsideDistance/e;return i<=1.5?Math.max(30,t*(1+i)):i<=3?Math.max(60,t*(2+i)):Math.max(200,t*(7+i))}_execute(){let e,t=this._context.configuration.options.get(75),i=this._getScrollSpeed(),n=this._tick()/1e3*i*t,s="above"===this._position.outsidePosition?-n:n;this._context.viewModel.viewLayout.deltaScrollNow(0,s),this._viewHelper.renderNow();let o=this._context.viewLayout.getLinesViewportData(),r="above"===this._position.outsidePosition?o.startLineNumber:o.endLineNumber;{let t=(0,Q.wt)(this._viewHelper.viewDomNode),i=this._context.configuration.options.get(165).horizontalScrollbarHeight,n=new Q.nz(this._mouseEvent.pos.x,t.y+t.height-i-.1),s=(0,Q.i_)(this._viewHelper.viewDomNode,t,n);e=this._mouseTargetFactory.createMouseTarget(this._viewHelper.getLastRenderData(),t,n,s,null)}e.position&&e.position.lineNumber===r||(e="above"===this._position.outsidePosition?eh.createOutsideEditor(this._position.mouseColumn,new ee.y(r,1),"above",this._position.outsideDistance):eh.createOutsideEditor(this._position.mouseColumn,new ee.y(r,this._context.viewModel.getLineMaxColumn(r)),"below",this._position.outsideDistance)),this._dispatchMouse(e,!0,2),this._animationFrameDisposable=b.PG(b.zk(e.element),()=>this._execute())}}class eI extends ek{_createDragScrollingOperation(e,t){return new eN(this._context,this._viewHelper,this._mouseTargetFactory,this._dispatchMouse,e,t)}}class eN extends ex{_getScrollSpeed(){let e=this._context.configuration.options.get(59).typicalFullwidthCharacterWidth,t=this._context.configuration.options.get(165).contentWidth/e,i=this._position.outsideDistance/e;return i<=1.5?Math.max(30,t*(1+i)):i<=3?Math.max(60,t*(2+i)):Math.max(200,t*(7+i))}_execute(){let e,t=this._context.configuration.options.get(59).typicalFullwidthCharacterWidth,i=this._getScrollSpeed(),n=this._tick()/1e3*i*t*.5,s="left"===this._position.outsidePosition?-n:n;if(this._context.viewModel.viewLayout.deltaScrollNow(s,0),this._viewHelper.renderNow(),!this._position.position)return;let o=this._position.position.lineNumber;{let t=(0,Q.wt)(this._viewHelper.viewDomNode),i=this._context.configuration.options.get(165).horizontalScrollbarHeight,n=new Q.nz(this._mouseEvent.pos.x,t.y+t.height-i-.1),s=(0,Q.i_)(this._viewHelper.viewDomNode,t,n);e=this._mouseTargetFactory.createMouseTarget(this._viewHelper.getLastRenderData(),t,n,s,null)}e="left"===this._position.outsidePosition?eh.createOutsideEditor(e.mouseColumn,new ee.y(o,e.mouseColumn),"left",this._position.outsideDistance):eh.createOutsideEditor(e.mouseColumn,new ee.y(o,e.mouseColumn),"right",this._position.outsideDistance),this._dispatchMouse(e,!0,2),this._animationFrameDisposable=b.PG(b.zk(e.element),()=>this._execute())}}class eE extends Y.i{constructor(e,t,i){super(),this._mouseLeaveMonitor=null,this._context=e,this.viewController=t,this.viewHelper=i,this.mouseTargetFactory=new ef(this._context,i),this._mouseDownOperation=this._register(new eM(this._context,this.viewController,this.viewHelper,this.mouseTargetFactory,(e,t)=>this._createMouseTarget(e,t),e=>this._getMouseColumn(e))),this.lastMouseLeaveTime=-1,this._height=this._context.configuration.options.get(165).height;let n=new Q.$z(this.viewHelper.viewDomNode);this._register(n.onContextMenu(this.viewHelper.viewDomNode,e=>this._onContextMenu(e,!0))),this._register(n.onMouseMove(this.viewHelper.viewDomNode,e=>{this._onMouseMove(e),this._mouseLeaveMonitor||(this._mouseLeaveMonitor=b.ko(this.viewHelper.viewDomNode.ownerDocument,"mousemove",e=>{this.viewHelper.viewDomNode.contains(e.target)||this._onMouseLeave(new Q.dO(e,!1,this.viewHelper.viewDomNode))}))})),this._register(n.onMouseUp(this.viewHelper.viewDomNode,e=>this._onMouseUp(e))),this._register(n.onMouseLeave(this.viewHelper.viewDomNode,e=>this._onMouseLeave(e)));let s=0;this._register(n.onPointerDown(this.viewHelper.viewDomNode,(e,t)=>{s=t})),this._register(b.ko(this.viewHelper.viewDomNode,b.Bx.POINTER_UP,e=>{this._mouseDownOperation.onPointerUp()})),this._register(n.onMouseDown(this.viewHelper.viewDomNode,e=>this._onMouseDown(e,s))),this._setupMouseWheelZoomListener(),this._context.addEventHandler(this)}_setupMouseWheelZoomListener(){let e=eS.QC.INSTANCE,t=0,i=F.D.getZoomLevel(),n=!1,s=0,o=o=>{if(this.viewController.emitMouseWheel(o),!this._context.configuration.options.get(84))return;let a=new ew.$(o);if(e.acceptStandardWheelEvent(a),e.isPhysicalMouseWheel()){if(r(o)){let e=F.D.getZoomLevel(),t=a.deltaY>0?1:-1;F.D.setZoomLevel(e+t),a.preventDefault(),a.stopPropagation()}}else Date.now()-t>50&&(i=F.D.getZoomLevel(),n=r(o),s=0),t=Date.now(),s+=a.deltaY,n&&(F.D.setZoomLevel(i+s/5),a.preventDefault(),a.stopPropagation())};function r(e){return I.zx?(e.metaKey||e.ctrlKey)&&!e.shiftKey&&!e.altKey:e.ctrlKey&&!e.metaKey&&!e.shiftKey&&!e.altKey}this._register(b.ko(this.viewHelper.viewDomNode,b.Bx.MOUSE_WHEEL,o,{capture:!0,passive:!1}))}dispose(){this._context.removeEventHandler(this),this._mouseLeaveMonitor&&(this._mouseLeaveMonitor.dispose(),this._mouseLeaveMonitor=null),super.dispose()}onConfigurationChanged(e){if(e.hasChanged(165)){let e=this._context.configuration.options.get(165).height;this._height!==e&&(this._height=e,this._mouseDownOperation.onHeightChanged())}return!1}onCursorStateChanged(e){return this._mouseDownOperation.onCursorStateChanged(e),!1}onFocusChanged(e){return!1}getTargetAtClientPoint(e,t){let i=new Q.Hh(e,t).toPageCoordinates(b.zk(this.viewHelper.viewDomNode)),n=(0,Q.wt)(this.viewHelper.viewDomNode);if(i.y<n.y||i.y>n.y+n.height||i.x<n.x||i.x>n.x+n.width)return null;let s=(0,Q.i_)(this.viewHelper.viewDomNode,n,i);return this.mouseTargetFactory.createMouseTarget(this.viewHelper.getLastRenderData(),n,i,s,null)}_createMouseTarget(e,t){let i=e.target;if(!this.viewHelper.viewDomNode.contains(i)){let t=b.jG(this.viewHelper.viewDomNode);t&&(i=t.elementsFromPoint(e.posx,e.posy).find(e=>this.viewHelper.viewDomNode.contains(e)))}return this.mouseTargetFactory.createMouseTarget(this.viewHelper.getLastRenderData(),e.editorPos,e.pos,e.relativePos,t?i:null)}_getMouseColumn(e){return this.mouseTargetFactory.getMouseColumn(e.relativePos)}_onContextMenu(e,t){this.viewController.emitContextMenu({event:e,target:this._createMouseTarget(e,t)})}_onMouseMove(e){this.mouseTargetFactory.mouseTargetIsWidget(e)||e.preventDefault(),!this._mouseDownOperation.isActive()&&(e.timestamp<this.lastMouseLeaveTime||this.viewController.emitMouseMove({event:e,target:this._createMouseTarget(e,!0)}))}_onMouseLeave(e){this._mouseLeaveMonitor&&(this._mouseLeaveMonitor.dispose(),this._mouseLeaveMonitor=null),this.lastMouseLeaveTime=new Date().getTime(),this.viewController.emitMouseLeave({event:e,target:null})}_onMouseUp(e){this.viewController.emitMouseUp({event:e,target:this._createMouseTarget(e,!0)})}_onMouseDown(e,t){let i=this._createMouseTarget(e,!0),n=6===i.type||7===i.type,s=2===i.type||3===i.type||4===i.type,o=3===i.type,r=this._context.configuration.options.get(125),a=8===i.type||5===i.type,l=9===i.type,h=e.leftButton||e.middleButton;I.zx&&e.leftButton&&e.ctrlKey&&(h=!1);let d=()=>{e.preventDefault(),this.viewHelper.focusTextArea()};if(h&&(n||o&&r))d(),this._mouseDownOperation.start(i.type,e,t);else if(s)e.preventDefault();else if(a){let n=i.detail;h&&this.viewHelper.shouldSuppressMouseDownOnViewZone(n.viewZoneId)&&(d(),this._mouseDownOperation.start(i.type,e,t),e.preventDefault())}else l&&this.viewHelper.shouldSuppressMouseDownOnWidget(i.detail)&&(d(),e.preventDefault());this.viewController.emitMouseDown({event:e,target:i})}}class eM extends y.jG{constructor(e,t,i,n,s,o){super(),this._context=e,this._viewController=t,this._viewHelper=i,this._mouseTargetFactory=n,this._createMouseTarget=s,this._getMouseColumn=o,this._mouseMoveMonitor=this._register(new Q.BA(this._viewHelper.viewDomNode)),this._topBottomDragScrolling=this._register(new eL(this._context,this._viewHelper,this._mouseTargetFactory,(e,t,i)=>this._dispatchMouse(e,t,i))),this._leftRightDragScrolling=this._register(new eI(this._context,this._viewHelper,this._mouseTargetFactory,(e,t,i)=>this._dispatchMouse(e,t,i))),this._mouseState=new eT,this._currentSelection=new ey.L(1,1,1,1),this._isActive=!1,this._lastMouseEvent=null}dispose(){super.dispose()}isActive(){return this._isActive}_onMouseDownThenMove(e){this._lastMouseEvent=e,this._mouseState.setModifiers(e);let t=this._findMousePosition(e,!1);t&&(this._mouseState.isDragAndDrop?this._viewController.emitMouseDrag({event:e,target:t}):13===t.type?"above"===t.outsidePosition||"below"===t.outsidePosition?(this._topBottomDragScrolling.start(t,e),this._leftRightDragScrolling.stop()):(this._leftRightDragScrolling.start(t,e),this._topBottomDragScrolling.stop()):(this._topBottomDragScrolling.stop(),this._leftRightDragScrolling.stop(),this._dispatchMouse(t,!0,1)))}start(e,t,i){this._lastMouseEvent=t,this._mouseState.setStartedOnLineNumbers(3===e),this._mouseState.setStartButtons(t),this._mouseState.setModifiers(t);let n=this._findMousePosition(t,!0);if(!n||!n.position)return;this._mouseState.trySetCount(t.detail,n.position),t.detail=this._mouseState.count;let s=this._context.configuration.options;if(!s.get(104)&&s.get(42)&&!s.get(28)&&!this._mouseState.altKey&&t.detail<2&&!this._isActive&&!this._currentSelection.isEmpty()&&6===n.type&&n.position&&this._currentSelection.containsPosition(n.position)){this._mouseState.isDragAndDrop=!0,this._isActive=!0,this._mouseMoveMonitor.startMonitoring(this._viewHelper.viewLinesDomNode,i,t.buttons,e=>this._onMouseDownThenMove(e),e=>{let t=this._findMousePosition(this._lastMouseEvent,!1);b.kx(e)?this._viewController.emitMouseDropCanceled():this._viewController.emitMouseDrop({event:this._lastMouseEvent,target:t?this._createMouseTarget(this._lastMouseEvent,!0):null}),this._stop()});return}this._mouseState.isDragAndDrop=!1,this._dispatchMouse(n,t.shiftKey,1),this._isActive||(this._isActive=!0,this._mouseMoveMonitor.startMonitoring(this._viewHelper.viewLinesDomNode,i,t.buttons,e=>this._onMouseDownThenMove(e),()=>this._stop()))}_stop(){this._isActive=!1,this._topBottomDragScrolling.stop(),this._leftRightDragScrolling.stop()}onHeightChanged(){this._mouseMoveMonitor.stopMonitoring()}onPointerUp(){this._mouseMoveMonitor.stopMonitoring()}onCursorStateChanged(e){this._currentSelection=e.selections[0]}_getPositionOutsideEditor(e){let t=e.editorPos,i=this._context.viewModel,n=this._context.viewLayout,s=this._getMouseColumn(e);if(e.posy<t.y){let i=t.y-e.posy,o=Math.max(n.getCurrentScrollTop()-i,0),r=ec.getZoneAtCoord(this._context,o);if(r){let e=this._helpPositionJumpOverViewZone(r);if(e)return eh.createOutsideEditor(s,e,"above",i)}let a=n.getLineNumberAtVerticalOffset(o);return eh.createOutsideEditor(s,new ee.y(a,1),"above",i)}if(e.posy>t.y+t.height){let o=e.posy-t.y-t.height,r=n.getCurrentScrollTop()+e.relativePos.y,a=ec.getZoneAtCoord(this._context,r);if(a){let e=this._helpPositionJumpOverViewZone(a);if(e)return eh.createOutsideEditor(s,e,"below",o)}let l=n.getLineNumberAtVerticalOffset(r);return eh.createOutsideEditor(s,new ee.y(l,i.getLineMaxColumn(l)),"below",o)}let o=n.getLineNumberAtVerticalOffset(n.getCurrentScrollTop()+e.relativePos.y),r=this._context.configuration.options.get(165),a=r.contentLeft;if(e.relativePos.x<=a){let t=a-e.relativePos.x;return eh.createOutsideEditor(s,new ee.y(o,1),"left",t)}let l=0===r.minimap.minimapLeft?r.width-r.verticalScrollbarWidth:r.minimap.minimapLeft;if(e.relativePos.x>=l){let t=e.relativePos.x-l;return eh.createOutsideEditor(s,new ee.y(o,i.getLineMaxColumn(o)),"right",t)}return null}_findMousePosition(e,t){let i=this._getPositionOutsideEditor(e);if(i)return i;let n=this._createMouseTarget(e,t);if(!n.position)return null;if(8===n.type||5===n.type){let e=this._helpPositionJumpOverViewZone(n.detail);if(e)return eh.createViewZone(n.type,n.element,n.mouseColumn,e,n.detail)}return n}_helpPositionJumpOverViewZone(e){let t=new ee.y(this._currentSelection.selectionStartLineNumber,this._currentSelection.selectionStartColumn),i=e.positionBefore,n=e.positionAfter;if(i&&n)if(i.isBefore(t))return i;else return n;return null}_dispatchMouse(e,t,i){e.position&&this._viewController.dispatchMouse({position:e.position,mouseColumn:e.mouseColumn,startedOnLineNumbers:this._mouseState.startedOnLineNumbers,revealType:i,inSelectionMode:t,mouseDownCount:this._mouseState.count,altKey:this._mouseState.altKey,ctrlKey:this._mouseState.ctrlKey,metaKey:this._mouseState.metaKey,shiftKey:this._mouseState.shiftKey,leftButton:this._mouseState.leftButton,middleButton:this._mouseState.middleButton,onInjectedText:6===e.type&&null!==e.detail.injectedText})}}class eT{static{this.CLEAR_MOUSE_DOWN_COUNT_TIME=400}get altKey(){return this._altKey}get ctrlKey(){return this._ctrlKey}get metaKey(){return this._metaKey}get shiftKey(){return this._shiftKey}get leftButton(){return this._leftButton}get middleButton(){return this._middleButton}get startedOnLineNumbers(){return this._startedOnLineNumbers}constructor(){this._altKey=!1,this._ctrlKey=!1,this._metaKey=!1,this._shiftKey=!1,this._leftButton=!1,this._middleButton=!1,this._startedOnLineNumbers=!1,this._lastMouseDownPosition=null,this._lastMouseDownPositionEqualCount=0,this._lastMouseDownCount=0,this._lastSetMouseDownCountTime=0,this.isDragAndDrop=!1}get count(){return this._lastMouseDownCount}setModifiers(e){this._altKey=e.altKey,this._ctrlKey=e.ctrlKey,this._metaKey=e.metaKey,this._shiftKey=e.shiftKey}setStartButtons(e){this._leftButton=e.leftButton,this._middleButton=e.middleButton}setStartedOnLineNumbers(e){this._startedOnLineNumbers=e}trySetCount(e,t){let i=new Date().getTime();i-this._lastSetMouseDownCountTime>eT.CLEAR_MOUSE_DOWN_COUNT_TIME&&(e=1),this._lastSetMouseDownCountTime=i,e>this._lastMouseDownCount+1&&(e=this._lastMouseDownCount+1),this._lastMouseDownPosition&&this._lastMouseDownPosition.equals(t)?this._lastMouseDownPositionEqualCount++:this._lastMouseDownPositionEqualCount=1,this._lastMouseDownPosition=t,this._lastMouseDownCount=Math.min(e,this._lastMouseDownPositionEqualCount)}}var eR=i(88723),eO=i(98200),eP=i(45262),eA=i(55532),eF=i(90057),eB=i(97173);class eW{static{this.EMPTY=new eW("",0,0,null,void 0)}constructor(e,t,i,n,s){this.value=e,this.selectionStart=t,this.selectionEnd=i,this.selection=n,this.newlineCountBeforeSelection=s}toString(){return`[ <${this.value}>, selectionStart: ${this.selectionStart}, selectionEnd: ${this.selectionEnd}]`}static readFromTextArea(e,t){let i,n=e.getValue(),s=e.getSelectionStart(),o=e.getSelectionEnd();return t&&n.substring(0,s)===t.value.substring(0,t.selectionStart)&&(i=t.newlineCountBeforeSelection),new eW(n,s,o,null,i)}collapseSelection(){return this.selectionStart===this.value.length?this:new eW(this.value,this.value.length,this.value.length,null,void 0)}isWrittenToTextArea(e,t){let i=this.value===e.getValue();return t?this.selectionStart===e.getSelectionStart()&&this.selectionEnd===e.getSelectionEnd()&&i:i}writeToTextArea(e,t,i){t.setValue(e,this.value),i&&t.setSelectionRange(e,this.selectionStart,this.selectionEnd)}deduceEditorPosition(e){if(e<=this.selectionStart){let t=this.value.substring(e,this.selectionStart);return this._finishDeduceEditorPosition(this.selection?.getStartPosition()??null,t,-1)}if(e>=this.selectionEnd){let t=this.value.substring(this.selectionEnd,e);return this._finishDeduceEditorPosition(this.selection?.getEndPosition()??null,t,1)}let t=this.value.substring(this.selectionStart,e);if(-1===t.indexOf(String.fromCharCode(8230)))return this._finishDeduceEditorPosition(this.selection?.getStartPosition()??null,t,1);let i=this.value.substring(e,this.selectionEnd);return this._finishDeduceEditorPosition(this.selection?.getEndPosition()??null,i,-1)}_finishDeduceEditorPosition(e,t,i){let n=0,s=-1;for(;-1!==(s=t.indexOf("\n",s+1));)n++;return[e,i*t.length,n]}static deduceInput(e,t,i){if(!e)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:0};let n=Math.min((0,eA.Qp)(e.value,t.value),e.selectionStart,t.selectionStart),s=Math.min((0,eA.Vi)(e.value,t.value),e.value.length-e.selectionEnd,t.value.length-t.selectionEnd),o=(e.value.substring(n,e.value.length-s),t.value.substring(n,t.value.length-s)),r=e.selectionStart-n,a=e.selectionEnd-n,l=t.selectionStart-n;return l===t.selectionEnd-n?{text:o,replacePrevCharCnt:e.selectionStart-n,replaceNextCharCnt:0,positionDelta:0}:{text:o,replacePrevCharCnt:a-r,replaceNextCharCnt:0,positionDelta:0}}static deduceAndroidCompositionInput(e,t){if(!e)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:0};if(e.value===t.value)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:t.selectionEnd-e.selectionEnd};let i=Math.min((0,eA.Qp)(e.value,t.value),e.selectionEnd),n=Math.min((0,eA.Vi)(e.value,t.value),e.value.length-e.selectionEnd),s=e.value.substring(i,e.value.length-n),o=t.value.substring(i,t.value.length-n),r=(e.selectionStart,e.selectionEnd-i),a=(t.selectionStart,t.selectionEnd-i);return{text:o,replacePrevCharCnt:r,replaceNextCharCnt:s.length-r,positionDelta:a-o.length}}static fromScreenReaderContentState(e){return new eW(e.value,e.selectionStart,e.selectionEnd,e.selection,e.newlineCountBeforeSelection)}}var eH=i(90165),eV=function(e,t){return function(i,n){t(i,n,e)}};(c||(c={})).Tap="-monaco-textarea-synthetic-tap";class ez{constructor(){this._lastTypeTextLength=0}handleCompositionUpdate(e){let t={text:e=e||"",replacePrevCharCnt:this._lastTypeTextLength,replaceNextCharCnt:0,positionDelta:0};return this._lastTypeTextLength=e.length,t}}let eU=class extends y.jG{get textAreaState(){return this._textAreaState}constructor(e,t,i,n,s,o){super(),this._host=e,this._textArea=t,this._OS=i,this._browser=n,this._accessibilityService=s,this._logService=o,this._onFocus=this._register(new w.vl),this.onFocus=this._onFocus.event,this._onBlur=this._register(new w.vl),this.onBlur=this._onBlur.event,this._onKeyDown=this._register(new w.vl),this.onKeyDown=this._onKeyDown.event,this._onKeyUp=this._register(new w.vl),this.onKeyUp=this._onKeyUp.event,this._onCut=this._register(new w.vl),this.onCut=this._onCut.event,this._onPaste=this._register(new w.vl),this.onPaste=this._onPaste.event,this._onType=this._register(new w.vl),this.onType=this._onType.event,this._onCompositionStart=this._register(new w.vl),this.onCompositionStart=this._onCompositionStart.event,this._onCompositionUpdate=this._register(new w.vl),this.onCompositionUpdate=this._onCompositionUpdate.event,this._onCompositionEnd=this._register(new w.vl),this.onCompositionEnd=this._onCompositionEnd.event,this._onSelectionChangeRequest=this._register(new w.vl),this.onSelectionChangeRequest=this._onSelectionChangeRequest.event,this._asyncFocusGainWriteScreenReaderContent=this._register(new y.HE),this._asyncTriggerCut=this._register(new eP.uC(()=>this._onCut.fire(),0)),this._textAreaState=eW.EMPTY,this._selectionChangeListener=null,this._accessibilityService.isScreenReaderOptimized()&&this.writeNativeTextAreaContent("ctor"),this._register(w.Jh.runAndSubscribe(this._accessibilityService.onDidChangeScreenReaderOptimized,()=>{this._accessibilityService.isScreenReaderOptimized()&&!this._asyncFocusGainWriteScreenReaderContent.value?this._asyncFocusGainWriteScreenReaderContent.value=this._register(new eP.uC(()=>this.writeNativeTextAreaContent("asyncFocusGain"),0)):this._asyncFocusGainWriteScreenReaderContent.clear()})),this._hasFocus=!1,this._currentComposition=null;let r=null;this._register(this._textArea.onKeyDown(e=>{let t=new eO.Z(e);(114===t.keyCode||this._currentComposition&&1===t.keyCode)&&t.stopPropagation(),t.equals(9)&&t.preventDefault(),r=t,this._onKeyDown.fire(t)})),this._register(this._textArea.onKeyUp(e=>{let t=new eO.Z(e);this._onKeyUp.fire(t)})),this._register(this._textArea.onCompositionStart(e=>{let t=new ez;if(this._currentComposition){this._currentComposition=t;return}if(this._currentComposition=t,2===this._OS&&r&&r.equals(114)&&this._textAreaState.selectionStart===this._textAreaState.selectionEnd&&this._textAreaState.selectionStart>0&&this._textAreaState.value.substr(this._textAreaState.selectionStart-1,1)===e.data&&("ArrowRight"===r.code||"ArrowLeft"===r.code)){t.handleCompositionUpdate("x"),this._onCompositionStart.fire({data:e.data});return}if(this._browser.isAndroid)return void this._onCompositionStart.fire({data:e.data});this._onCompositionStart.fire({data:e.data})})),this._register(this._textArea.onCompositionUpdate(e=>{let t=this._currentComposition;if(!t)return;if(this._browser.isAndroid){let t=eW.readFromTextArea(this._textArea,this._textAreaState),i=eW.deduceAndroidCompositionInput(this._textAreaState,t);this._textAreaState=t,this._onType.fire(i),this._onCompositionUpdate.fire(e);return}let i=t.handleCompositionUpdate(e.data);this._textAreaState=eW.readFromTextArea(this._textArea,this._textAreaState),this._onType.fire(i),this._onCompositionUpdate.fire(e)})),this._register(this._textArea.onCompositionEnd(e=>{let t=this._currentComposition;if(!t)return;if(this._currentComposition=null,this._browser.isAndroid){let e=eW.readFromTextArea(this._textArea,this._textAreaState),t=eW.deduceAndroidCompositionInput(this._textAreaState,e);this._textAreaState=e,this._onType.fire(t),this._onCompositionEnd.fire();return}let i=t.handleCompositionUpdate(e.data);this._textAreaState=eW.readFromTextArea(this._textArea,this._textAreaState),this._onType.fire(i),this._onCompositionEnd.fire()})),this._register(this._textArea.onInput(e=>{if(this._textArea.setIgnoreSelectionChangeTime("received input event"),this._currentComposition)return;let t=eW.readFromTextArea(this._textArea,this._textAreaState),i=eW.deduceInput(this._textAreaState,t,2===this._OS);0===i.replacePrevCharCnt&&1===i.text.length&&(eA.pc(i.text.charCodeAt(0))||127===i.text.charCodeAt(0))||(this._textAreaState=t,(""!==i.text||0!==i.replacePrevCharCnt||0!==i.replaceNextCharCnt||0!==i.positionDelta)&&("insertFromPaste"===e.inputType?this._onPaste.fire({text:i.text,metadata:eB.bs.INSTANCE.get(i.text)}):this._onType.fire(i)))})),this._register(this._textArea.onCut(e=>{this._logService.trace("TextAreaInput#onCut",e),this._textArea.setIgnoreSelectionChangeTime("received cut event"),this._ensureClipboardGetsEditorSelection(e),this._asyncTriggerCut.schedule()})),this._register(this._textArea.onCopy(e=>{this._logService.trace("TextAreaInput#onCopy",e),this._ensureClipboardGetsEditorSelection(e)})),this._register(this._textArea.onPaste(e=>{if(this._logService.trace("TextAreaInput#onPaste",e),this._textArea.setIgnoreSelectionChangeTime("received paste event"),e.preventDefault(),!e.clipboardData)return;let[t,i]=eB.Mz.getTextData(e.clipboardData);this._logService.trace("TextAreaInput#onPaste with id : ",i?.id," with text.length: ",t.length),t&&(i=i||eB.bs.INSTANCE.get(t),this._logService.trace("TextAreaInput#onPaste (before onPaste)"),this._onPaste.fire({text:t,metadata:i}))})),this._register(this._textArea.onFocus(()=>{let e=this._hasFocus;this._setHasFocus(!0),this._accessibilityService.isScreenReaderOptimized()&&this._browser.isSafari&&!e&&this._hasFocus&&(this._asyncFocusGainWriteScreenReaderContent.value||(this._asyncFocusGainWriteScreenReaderContent.value=new eP.uC(()=>this.writeNativeTextAreaContent("asyncFocusGain"),0)),this._asyncFocusGainWriteScreenReaderContent.value.schedule())})),this._register(this._textArea.onBlur(()=>{this._currentComposition&&(this._currentComposition=null,this.writeNativeTextAreaContent("blurWithoutCompositionEnd"),this._onCompositionEnd.fire()),this._setHasFocus(!1)})),this._register(this._textArea.onSyntheticTap(()=>{this._browser.isAndroid&&this._currentComposition&&(this._currentComposition=null,this.writeNativeTextAreaContent("tapWithoutCompositionEnd"),this._onCompositionEnd.fire())}))}_installSelectionChangeListener(){let e=0;return b.ko(this._textArea.ownerDocument,"selectionchange",t=>{if(h.onSelectionChange(),!this._hasFocus||this._currentComposition||!this._browser.isChrome)return;let i=Date.now(),n=i-e;if(e=i,n<5)return;let s=i-this._textArea.getIgnoreSelectionChangeTime();if(this._textArea.resetSelectionChangeTime(),s<100||!this._textAreaState.selection)return;let o=this._textArea.getValue();if(this._textAreaState.value!==o)return;let r=this._textArea.getSelectionStart(),a=this._textArea.getSelectionEnd();if(this._textAreaState.selectionStart===r&&this._textAreaState.selectionEnd===a)return;let l=this._textAreaState.deduceEditorPosition(r),d=this._host.deduceModelPosition(l[0],l[1],l[2]),c=this._textAreaState.deduceEditorPosition(a),u=this._host.deduceModelPosition(c[0],c[1],c[2]),g=new ey.L(d.lineNumber,d.column,u.lineNumber,u.column);this._onSelectionChangeRequest.fire(g)})}dispose(){super.dispose(),this._selectionChangeListener&&(this._selectionChangeListener.dispose(),this._selectionChangeListener=null)}focusTextArea(){this._setHasFocus(!0),this.refreshFocusState()}isFocused(){return this._hasFocus}refreshFocusState(){this._setHasFocus(this._textArea.hasFocus())}_setHasFocus(e){this._hasFocus!==e&&(this._hasFocus=e,this._selectionChangeListener&&(this._selectionChangeListener.dispose(),this._selectionChangeListener=null),this._hasFocus&&(this._selectionChangeListener=this._installSelectionChangeListener()),this._hasFocus&&this.writeNativeTextAreaContent("focusgain"),this._hasFocus?this._onFocus.fire():this._onBlur.fire())}_setAndWriteTextAreaState(e,t){this._hasFocus||(t=t.collapseSelection()),t.isWrittenToTextArea(this._textArea,this._hasFocus)||this._logService.trace(`writeTextAreaState(reason: ${e})`),t.writeToTextArea(e,this._textArea,this._hasFocus),this._textAreaState=t}writeNativeTextAreaContent(e){(this._accessibilityService.isScreenReaderOptimized()||"render"!==e)&&!this._currentComposition&&this._setAndWriteTextAreaState(e,this._host.getScreenReaderContent())}_ensureClipboardGetsEditorSelection(e){let t,i=this._host.getDataToCopy();this._logService.getLevel()===eF.$b.Trace&&(t=(0,eH.b)());let n={version:1,id:t,isFromEmptySelection:i.isFromEmptySelection,multicursorText:i.multicursorText,mode:i.mode};eB.bs.INSTANCE.set(this._browser.isFirefox?i.text.replace(/\r\n/g,"\n"):i.text,n),e.preventDefault(),e.clipboardData&&eB.Mz.setTextData(e.clipboardData,i.text,i.html,n),this._logService.trace("TextAreaEditContextInput#_ensureClipboardGetsEditorSelection with id : ",t," with text.length: ",i.text.length)}};eU=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([eV(4,W.j),eV(5,eF.rr)],eU);class ej extends y.jG{get ownerDocument(){return this._actual.ownerDocument}constructor(e){super(),this._actual=e,this._onSyntheticTap=this._register(new w.vl),this.onSyntheticTap=this._onSyntheticTap.event,this._ignoreSelectionChangeTime=0,this.onKeyDown=this._register(new eR.f(this._actual,"keydown")).event,this.onKeyPress=this._register(new eR.f(this._actual,"keypress")).event,this.onKeyUp=this._register(new eR.f(this._actual,"keyup")).event,this.onCompositionStart=this._register(new eR.f(this._actual,"compositionstart")).event,this.onCompositionUpdate=this._register(new eR.f(this._actual,"compositionupdate")).event,this.onCompositionEnd=this._register(new eR.f(this._actual,"compositionend")).event,this.onBeforeInput=this._register(new eR.f(this._actual,"beforeinput")).event,this.onInput=this._register(new eR.f(this._actual,"input")).event,this.onCut=this._register(new eR.f(this._actual,"cut")).event,this.onCopy=this._register(new eR.f(this._actual,"copy")).event,this.onPaste=this._register(new eR.f(this._actual,"paste")).event,this.onFocus=this._register(new eR.f(this._actual,"focus")).event,this.onBlur=this._register(new eR.f(this._actual,"blur")).event,this._register(this.onKeyDown(()=>h.onKeyDown())),this._register(this.onBeforeInput(()=>h.onBeforeInput())),this._register(this.onInput(()=>h.onInput())),this._register(this.onKeyUp(()=>h.onKeyUp())),this._register(b.ko(this._actual,c.Tap,()=>this._onSyntheticTap.fire()))}hasFocus(){let e=b.jG(this._actual);return e?e.activeElement===this._actual:!!this._actual.isConnected&&b.bq()===this._actual}setIgnoreSelectionChangeTime(e){this._ignoreSelectionChangeTime=Date.now()}getIgnoreSelectionChangeTime(){return this._ignoreSelectionChangeTime}resetSelectionChangeTime(){this._ignoreSelectionChangeTime=0}getValue(){return this._actual.value}setValue(e,t){let i=this._actual;i.value!==t&&(this.setIgnoreSelectionChangeTime("setValue"),i.value=t)}getSelectionStart(){return"backward"===this._actual.selectionDirection?this._actual.selectionEnd:this._actual.selectionStart}getSelectionEnd(){return"backward"===this._actual.selectionDirection?this._actual.selectionStart:this._actual.selectionEnd}setSelectionRange(e,t,i){let n=this._actual,s=null,o=b.jG(n);s=o?o.activeElement:b.bq();let r=b.zk(s),a=s===n,l=n.selectionStart,h=n.selectionEnd;if(a&&l===t&&h===i){x.gm&&r.parent!==r&&n.focus();return}if(a){this.setIgnoreSelectionChangeTime("setSelectionRange"),n.setSelectionRange(t,i),x.gm&&r.parent!==r&&n.focus();return}try{let e=b.zK(n);this.setIgnoreSelectionChangeTime("setSelectionRange"),n.focus(),n.setSelectionRange(t,i),b.wk(n,e)}catch(e){}}}class e$ extends eE{constructor(e,t,i){super(e,t,i),this._register(eb.q.addTarget(this.viewHelper.linesContentDomNode)),this._register(b.ko(this.viewHelper.linesContentDomNode,eb.B.Tap,e=>this.onTap(e))),this._register(b.ko(this.viewHelper.linesContentDomNode,eb.B.Change,e=>this.onChange(e))),this._register(b.ko(this.viewHelper.linesContentDomNode,eb.B.Contextmenu,e=>this._onContextMenu(new Q.dO(e,!1,this.viewHelper.viewDomNode),!1))),this._lastPointerType="mouse",this._register(b.ko(this.viewHelper.linesContentDomNode,"pointerdown",e=>{let t=e.pointerType;if("mouse"===t){this._lastPointerType="mouse";return}"touch"===t?this._lastPointerType="touch":this._lastPointerType="pen"}));let n=new Q.DW(this.viewHelper.viewDomNode);this._register(n.onPointerMove(this.viewHelper.viewDomNode,e=>this._onMouseMove(e))),this._register(n.onPointerUp(this.viewHelper.viewDomNode,e=>this._onMouseUp(e))),this._register(n.onPointerLeave(this.viewHelper.viewDomNode,e=>this._onMouseLeave(e))),this._register(n.onPointerDown(this.viewHelper.viewDomNode,(e,t)=>this._onMouseDown(e,t)))}onTap(e){e.initialTarget&&this.viewHelper.linesContentDomNode.contains(e.initialTarget)&&(e.preventDefault(),this.viewHelper.focusTextArea(),this._dispatchGesture(e,!1))}onChange(e){"touch"===this._lastPointerType&&this._context.viewModel.viewLayout.deltaScrollNow(-e.translationX,-e.translationY),"pen"===this._lastPointerType&&this._dispatchGesture(e,!0)}_dispatchGesture(e,t){let i=this._createMouseTarget(new Q.dO(e,!1,this.viewHelper.viewDomNode),!1);i.position&&this.viewController.dispatchMouse({position:i.position,mouseColumn:i.position.column,startedOnLineNumbers:!1,revealType:1,mouseDownCount:e.tapCount,inSelectionMode:t,altKey:!1,ctrlKey:!1,metaKey:!1,shiftKey:!1,leftButton:!1,middleButton:!1,onInjectedText:6===i.type&&null!==i.detail.injectedText})}_onMouseDown(e,t){"touch"!==e.browserEvent.pointerType&&super._onMouseDown(e,t)}}class eK extends eE{constructor(e,t,i){super(e,t,i),this._register(eb.q.addTarget(this.viewHelper.linesContentDomNode)),this._register(b.ko(this.viewHelper.linesContentDomNode,eb.B.Tap,e=>this.onTap(e))),this._register(b.ko(this.viewHelper.linesContentDomNode,eb.B.Change,e=>this.onChange(e))),this._register(b.ko(this.viewHelper.linesContentDomNode,eb.B.Contextmenu,e=>this._onContextMenu(new Q.dO(e,!1,this.viewHelper.viewDomNode),!1)))}onTap(e){e.preventDefault(),this.viewHelper.focusTextArea();let t=this._createMouseTarget(new Q.dO(e,!1,this.viewHelper.viewDomNode),!1);if(t.position){let e=document.createEvent("CustomEvent");e.initEvent(c.Tap,!1,!0),this.viewHelper.dispatchTextAreaEvent(e),this.viewController.moveTo(t.position,1)}}onChange(e){this._context.viewModel.viewLayout.deltaScrollNow(-e.translationX,-e.translationY)}}class eG extends y.jG{constructor(e,t,i){super(),(I.un||I.m0&&I.Fr)&&ev.e.pointerEvents?this.handler=this._register(new e$(e,t,i)):eC.G.TouchEvent?this.handler=this._register(new eK(e,t,i)):this.handler=this._register(new eE(e,t,i))}getTargetAtClientPoint(e,t){return this.handler.getTargetAtClientPoint(e,t)}}var eq=i(67914),eQ=i(23315);class eY{constructor(e,t,i,n){this.configuration=e,this.viewModel=t,this.userInputEvents=i,this.commandDelegate=n}paste(e,t,i,n){this.commandDelegate.paste(e,t,i,n)}type(e){this.commandDelegate.type(e)}compositionType(e,t,i,n){this.commandDelegate.compositionType(e,t,i,n)}compositionStart(){this.commandDelegate.startComposition()}compositionEnd(){this.commandDelegate.endComposition()}cut(){this.commandDelegate.cut()}setSelection(e){eQ.QM.SetSelection.runCoreEditorCommand(this.viewModel,{source:"keyboard",selection:e})}_validateViewColumn(e){let t=this.viewModel.getLineMinColumn(e.lineNumber);return e.column<t?new ee.y(e.lineNumber,t):e}_hasMulticursorModifier(e){switch(this.configuration.options.get(86)){case"altKey":return e.altKey;case"ctrlKey":return e.ctrlKey;case"metaKey":return e.metaKey;default:return!1}}_hasNonMulticursorModifier(e){switch(this.configuration.options.get(86)){case"altKey":return e.ctrlKey||e.metaKey;case"ctrlKey":return e.altKey||e.metaKey;case"metaKey":return e.ctrlKey||e.altKey;default:return!1}}dispatchMouse(e){let t=this.configuration.options,i=I.j9&&t.get(121),n=t.get(28),s=t.get(171);e.middleButton&&!i?s||this._columnSelect(e.position,e.mouseColumn,e.inSelectionMode):e.startedOnLineNumbers?this._hasMulticursorModifier(e)?e.inSelectionMode?this._lastCursorLineSelect(e.position,e.revealType):this._createCursor(e.position,!0):e.inSelectionMode?this._lineSelectDrag(e.position,e.revealType):this._lineSelect(e.position,e.revealType):e.mouseDownCount>=4?this._selectAll():3===e.mouseDownCount?this._hasMulticursorModifier(e)?e.inSelectionMode?this._lastCursorLineSelectDrag(e.position,e.revealType):this._lastCursorLineSelect(e.position,e.revealType):e.inSelectionMode?this._lineSelectDrag(e.position,e.revealType):this._lineSelect(e.position,e.revealType):2===e.mouseDownCount?e.onInjectedText||(this._hasMulticursorModifier(e)?this._lastCursorWordSelect(e.position,e.revealType):e.inSelectionMode?this._wordSelectDrag(e.position,e.revealType):this._wordSelect(e.position,e.revealType)):this._hasMulticursorModifier(e)?this._hasNonMulticursorModifier(e)||(e.shiftKey?this._columnSelect(e.position,e.mouseColumn,!0):e.inSelectionMode?this._lastCursorMoveToSelect(e.position,e.revealType):this._createCursor(e.position,!1)):e.inSelectionMode?e.altKey||n?this._columnSelect(e.position,e.mouseColumn,!0):this._moveToSelect(e.position,e.revealType):this.moveTo(e.position,e.revealType)}_usualArgs(e,t){return e=this._validateViewColumn(e),{source:"mouse",position:this._convertViewToModelPosition(e),viewPosition:e,revealType:t}}moveTo(e,t){eQ.QM.MoveTo.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_moveToSelect(e,t){eQ.QM.MoveToSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_columnSelect(e,t,i){e=this._validateViewColumn(e),eQ.QM.ColumnSelect.runCoreEditorCommand(this.viewModel,{source:"mouse",position:this._convertViewToModelPosition(e),viewPosition:e,mouseColumn:t,doColumnSelect:i})}_createCursor(e,t){e=this._validateViewColumn(e),eQ.QM.CreateCursor.runCoreEditorCommand(this.viewModel,{source:"mouse",position:this._convertViewToModelPosition(e),viewPosition:e,wholeLine:t})}_lastCursorMoveToSelect(e,t){eQ.QM.LastCursorMoveToSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_wordSelect(e,t){eQ.QM.WordSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_wordSelectDrag(e,t){eQ.QM.WordSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_lastCursorWordSelect(e,t){eQ.QM.LastCursorWordSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_lineSelect(e,t){eQ.QM.LineSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_lineSelectDrag(e,t){eQ.QM.LineSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_lastCursorLineSelect(e,t){eQ.QM.LastCursorLineSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_lastCursorLineSelectDrag(e,t){eQ.QM.LastCursorLineSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_selectAll(){eQ.QM.SelectAll.runCoreEditorCommand(this.viewModel,{source:"mouse"})}_convertViewToModelPosition(e){return this.viewModel.coordinatesConverter.convertViewPositionToModelPosition(e)}emitKeyDown(e){this.userInputEvents.emitKeyDown(e)}emitKeyUp(e){this.userInputEvents.emitKeyUp(e)}emitContextMenu(e){this.userInputEvents.emitContextMenu(e)}emitMouseMove(e){this.userInputEvents.emitMouseMove(e)}emitMouseLeave(e){this.userInputEvents.emitMouseLeave(e)}emitMouseUp(e){this.userInputEvents.emitMouseUp(e)}emitMouseDown(e){this.userInputEvents.emitMouseDown(e)}emitMouseDrag(e){this.userInputEvents.emitMouseDrag(e)}emitMouseDrop(e){this.userInputEvents.emitMouseDrop(e)}emitMouseDropCanceled(){this.userInputEvents.emitMouseDropCanceled()}emitMouseWheel(e){this.userInputEvents.emitMouseWheel(e)}}var eZ=i(30117),eX=i(99314);class eJ{constructor(e){this._lineFactory=e,this._set(1,[])}flush(){this._set(1,[])}_set(e,t){this._lines=t,this._rendLineNumberStart=e}_get(){return{rendLineNumberStart:this._rendLineNumberStart,lines:this._lines}}getStartLineNumber(){return this._rendLineNumberStart}getEndLineNumber(){return this._rendLineNumberStart+this._lines.length-1}getCount(){return this._lines.length}getLine(e){let t=e-this._rendLineNumberStart;if(t<0||t>=this._lines.length)throw new C.D7("Illegal value for lineNumber");return this._lines[t]}onLinesDeleted(e,t){if(0===this.getCount())return null;let i=this.getStartLineNumber(),n=this.getEndLineNumber();if(t<i)return this._rendLineNumberStart-=t-e+1,null;if(e>n)return null;let s=0,o=0;for(let r=i;r<=n;r++){let i=r-this._rendLineNumberStart;e<=r&&r<=t&&(0===o?(s=i,o=1):o++)}if(e<i){let n=0;n=t<i?t-e+1:i-e,this._rendLineNumberStart-=n}return this._lines.splice(s,o)}onLinesChanged(e,t){let i=e+t-1;if(0===this.getCount())return!1;let n=this.getStartLineNumber(),s=this.getEndLineNumber(),o=!1;for(let t=e;t<=i;t++)t>=n&&t<=s&&(this._lines[t-this._rendLineNumberStart].onContentChanged(),o=!0);return o}onLinesInserted(e,t){if(0===this.getCount())return null;let i=t-e+1,n=this.getStartLineNumber(),s=this.getEndLineNumber();if(e<=n)return this._rendLineNumberStart+=i,null;if(e>s)return null;if(i+e>s)return this._lines.splice(e-this._rendLineNumberStart,s-e+1);let o=[];for(let e=0;e<i;e++)o[e]=this._lineFactory.createLine();let r=e-this._rendLineNumberStart,a=this._lines.slice(0,r),l=this._lines.slice(r,this._lines.length-i),h=this._lines.slice(this._lines.length-i,this._lines.length);return this._lines=a.concat(o).concat(l),h}onTokensChanged(e){if(0===this.getCount())return!1;let t=this.getStartLineNumber(),i=this.getEndLineNumber(),n=!1;for(let s=0,o=e.length;s<o;s++){let o=e[s];if(o.toLineNumber<t||o.fromLineNumber>i)continue;let r=Math.max(t,o.fromLineNumber),a=Math.min(i,o.toLineNumber);for(let e=r;e<=a;e++){let t=e-this._rendLineNumberStart;this._lines[t].onTokensChanged(),n=!0}}return n}}class e0{constructor(e,t){this._viewContext=e,this._lineFactory=t,this.domNode=this._createDomNode(),this._linesCollection=new eJ(this._lineFactory)}_createDomNode(){let e=(0,q.Z)(document.createElement("div"));return e.setClassName("view-layer"),e.setPosition("absolute"),e.domNode.setAttribute("role","presentation"),e.domNode.setAttribute("aria-hidden","true"),e}onConfigurationChanged(e){return!!e.hasChanged(165)}onFlushed(e,t){if(t){let e=this._linesCollection.getStartLineNumber(),t=this._linesCollection.getEndLineNumber();for(let i=e;i<=t;i++)this._linesCollection.getLine(i).getDomNode()?.remove()}return this._linesCollection.flush(),!0}onLinesChanged(e){return this._linesCollection.onLinesChanged(e.fromLineNumber,e.count)}onLinesDeleted(e){let t=this._linesCollection.onLinesDeleted(e.fromLineNumber,e.toLineNumber);if(t)for(let e=0,i=t.length;e<i;e++){let i=t[e].getDomNode();i?.remove()}return!0}onLinesInserted(e){let t=this._linesCollection.onLinesInserted(e.fromLineNumber,e.toLineNumber);if(t)for(let e=0,i=t.length;e<i;e++){let i=t[e].getDomNode();i?.remove()}return!0}onScrollChanged(e){return e.scrollTopChanged}onTokensChanged(e){return this._linesCollection.onTokensChanged(e.ranges)}onZonesChanged(e){return!0}getStartLineNumber(){return this._linesCollection.getStartLineNumber()}getEndLineNumber(){return this._linesCollection.getEndLineNumber()}getVisibleLine(e){return this._linesCollection.getLine(e)}renderLines(e){let t=this._linesCollection._get(),i=new e1(this.domNode.domNode,this._lineFactory,e,this._viewContext),n={rendLineNumberStart:t.rendLineNumberStart,lines:t.lines,linesLength:t.lines.length},s=i.render(n,e.startLineNumber,e.endLineNumber,e.relativeVerticalOffset);this._linesCollection._set(s.rendLineNumberStart,s.lines)}}class e1{static{this._ttPolicy=(0,eZ.H)("editorViewLayer",{createHTML:e=>e})}constructor(e,t,i,n){this._domNode=e,this._lineFactory=t,this._viewportData=i,this._viewContext=n}render(e,t,i,n){let s={rendLineNumberStart:e.rendLineNumberStart,lines:e.lines.slice(0),linesLength:e.linesLength};if(s.rendLineNumberStart+s.linesLength-1<t||i<s.rendLineNumberStart){s.rendLineNumberStart=t,s.linesLength=i-t+1,s.lines=[];for(let e=t;e<=i;e++)s.lines[e-t]=this._lineFactory.createLine();return this._finishRendering(s,!0,n),s}if(this._renderUntouchedLines(s,Math.max(t-s.rendLineNumberStart,0),Math.min(i-s.rendLineNumberStart,s.linesLength-1),n,t),s.rendLineNumberStart>t){let e=Math.min(i,s.rendLineNumberStart-1);t<=e&&(this._insertLinesBefore(s,t,e,n,t),s.linesLength+=e-t+1)}else if(s.rendLineNumberStart<t){let e=Math.min(s.linesLength,t-s.rendLineNumberStart);e>0&&(this._removeLinesBefore(s,e),s.linesLength-=e)}if(s.rendLineNumberStart=t,s.rendLineNumberStart+s.linesLength-1<i){let e=s.rendLineNumberStart+s.linesLength;e<=i&&(this._insertLinesAfter(s,e,i,n,t),s.linesLength+=i-e+1)}else if(s.rendLineNumberStart+s.linesLength-1>i){let e=Math.max(0,i-s.rendLineNumberStart+1),t=s.linesLength-1-e+1;t>0&&(this._removeLinesAfter(s,t),s.linesLength-=t)}return this._finishRendering(s,!1,n),s}_renderUntouchedLines(e,t,i,n,s){let o=e.rendLineNumberStart,r=e.lines;for(let e=t;e<=i;e++){let t=o+e;r[e].layoutLine(t,n[t-s],this._lineHeightForLineNumber(t))}}_insertLinesBefore(e,t,i,n,s){let o=[],r=0;for(let e=t;e<=i;e++)o[r++]=this._lineFactory.createLine();e.lines=o.concat(e.lines)}_removeLinesBefore(e,t){for(let i=0;i<t;i++){let t=e.lines[i].getDomNode();t?.remove()}e.lines.splice(0,t)}_insertLinesAfter(e,t,i,n,s){let o=[],r=0;for(let e=t;e<=i;e++)o[r++]=this._lineFactory.createLine();e.lines=e.lines.concat(o)}_removeLinesAfter(e,t){let i=e.linesLength-t;for(let n=0;n<t;n++){let t=e.lines[i+n].getDomNode();t?.remove()}e.lines.splice(i,t)}_finishRenderingNewLines(e,t,i,n){e1._ttPolicy&&(i=e1._ttPolicy.createHTML(i));let s=this._domNode.lastChild;t||!s?this._domNode.innerHTML=i:s.insertAdjacentHTML("afterend",i);let o=this._domNode.lastChild;for(let t=e.linesLength-1;t>=0;t--){let i=e.lines[t];n[t]&&(i.setDomNode(o),o=o.previousSibling)}}_finishRenderingInvalidLines(e,t,i){let n=document.createElement("div");e1._ttPolicy&&(t=e1._ttPolicy.createHTML(t)),n.innerHTML=t;for(let t=0;t<e.linesLength;t++){let s=e.lines[t];if(i[t]){let e=n.firstChild,t=s.getDomNode();t.parentNode.replaceChild(e,t),s.setDomNode(e)}}}static{this._sb=new eX.fe(1e5)}_finishRendering(e,t,i){let n=e1._sb,s=e.linesLength,o=e.lines,r=e.rendLineNumberStart,a=[];{n.reset();let l=!1;for(let e=0;e<s;e++){let t=o[e];if(a[e]=!1,t.getDomNode())continue;let s=e+r;t.renderLine(s,i[e],this._lineHeightForLineNumber(s),this._viewportData,n)&&(a[e]=!0,l=!0)}l&&this._finishRenderingNewLines(e,t,n.build(),a)}{n.reset();let t=!1,l=[];for(let e=0;e<s;e++){let s=o[e];if(l[e]=!1,a[e])continue;let h=e+r;s.renderLine(h,i[e],this._lineHeightForLineNumber(h),this._viewportData,n)&&(l[e]=!0,t=!0)}t&&this._finishRenderingInvalidLines(e,n.build(),l)}}_lineHeightForLineNumber(e){return this._viewContext.viewLayout.getLineHeightForLineNumber(e)}}class e2 extends Z{constructor(e){super(e),this._dynamicOverlays=[],this._isFocused=!1,this._visibleLines=new e0(this._context,{createLine:()=>new e5(this._dynamicOverlays)}),this.domNode=this._visibleLines.domNode;let t=this._context.configuration.options.get(59);(0,k.M)(this.domNode,t),this.domNode.setClassName("view-overlays")}shouldRender(){if(super.shouldRender())return!0;for(let e=0,t=this._dynamicOverlays.length;e<t;e++)if(this._dynamicOverlays[e].shouldRender())return!0;return!1}dispose(){super.dispose();for(let e=0,t=this._dynamicOverlays.length;e<t;e++)this._dynamicOverlays[e].dispose();this._dynamicOverlays=[]}getDomNode(){return this.domNode}addDynamicOverlay(e){this._dynamicOverlays.push(e)}onConfigurationChanged(e){this._visibleLines.onConfigurationChanged(e);let t=this._context.configuration.options.get(59);return(0,k.M)(this.domNode,t),!0}onFlushed(e){return this._visibleLines.onFlushed(e)}onFocusChanged(e){return this._isFocused=e.isFocused,!0}onLinesChanged(e){return this._visibleLines.onLinesChanged(e)}onLinesDeleted(e){return this._visibleLines.onLinesDeleted(e)}onLinesInserted(e){return this._visibleLines.onLinesInserted(e)}onScrollChanged(e){return this._visibleLines.onScrollChanged(e)||!0}onTokensChanged(e){return this._visibleLines.onTokensChanged(e)}onZonesChanged(e){return this._visibleLines.onZonesChanged(e)}prepareRender(e){let t=this._dynamicOverlays.filter(e=>e.shouldRender());for(let i=0,n=t.length;i<n;i++){let n=t[i];n.prepareRender(e),n.onDidRender()}}render(e){this._viewOverlaysRender(e),this.domNode.toggleClassName("focused",this._isFocused)}_viewOverlaysRender(e){this._visibleLines.renderLines(e.viewportData)}}class e5{constructor(e){this._dynamicOverlays=e,this._domNode=null,this._renderedContent=null}getDomNode(){return this._domNode?this._domNode.domNode:null}setDomNode(e){this._domNode=(0,q.Z)(e)}onContentChanged(){}onTokensChanged(){}renderLine(e,t,i,n,s){let o="";for(let t=0,i=this._dynamicOverlays.length;t<i;t++)o+=this._dynamicOverlays[t].render(n.startLineNumber,e);return this._renderedContent!==o&&(this._renderedContent=o,s.appendString('<div style="top:'),s.appendString(String(t)),s.appendString("px;height:"),s.appendString(String(i)),s.appendString("px;line-height:"),s.appendString(String(i)),s.appendString('px;">'),s.appendString(o),s.appendString("</div>"),!0)}layoutLine(e,t,i){this._domNode&&(this._domNode.setTop(t),this._domNode.setHeight(i),this._domNode.setLineHeight(i))}}class e4 extends e2{constructor(e){super(e);let t=this._context.configuration.options.get(165);this._contentWidth=t.contentWidth,this.domNode.setHeight(0)}onConfigurationChanged(e){let t=this._context.configuration.options.get(165);return this._contentWidth=t.contentWidth,super.onConfigurationChanged(e)||!0}onScrollChanged(e){return super.onScrollChanged(e)||e.scrollWidthChanged}_viewOverlaysRender(e){super._viewOverlaysRender(e),this.domNode.setWidth(Math.max(e.scrollWidth,this._contentWidth))}}class e3 extends e2{constructor(e){super(e);let t=this._context.configuration.options,i=t.get(165);this._contentLeft=i.contentLeft,this.domNode.setClassName("margin-view-overlays"),this.domNode.setWidth(1),(0,k.M)(this.domNode,t.get(59))}onConfigurationChanged(e){let t=this._context.configuration.options;(0,k.M)(this.domNode,t.get(59));let i=t.get(165);return this._contentLeft=i.contentLeft,super.onConfigurationChanged(e)||!0}onScrollChanged(e){return super.onScrollChanged(e)||e.scrollHeightChanged}_viewOverlaysRender(e){super._viewOverlaysRender(e);let t=Math.min(e.scrollHeight,1e6);this.domNode.setHeight(t),this.domNode.setWidth(this._contentLeft)}}class e7{constructor(e){this.onKeyDown=null,this.onKeyUp=null,this.onContextMenu=null,this.onMouseMove=null,this.onMouseLeave=null,this.onMouseDown=null,this.onMouseUp=null,this.onMouseDrag=null,this.onMouseDrop=null,this.onMouseDropCanceled=null,this.onMouseWheel=null,this._coordinatesConverter=e}emitKeyDown(e){this.onKeyDown?.(e)}emitKeyUp(e){this.onKeyUp?.(e)}emitContextMenu(e){this.onContextMenu?.(this._convertViewToModelMouseEvent(e))}emitMouseMove(e){this.onMouseMove?.(this._convertViewToModelMouseEvent(e))}emitMouseLeave(e){this.onMouseLeave?.(this._convertViewToModelMouseEvent(e))}emitMouseDown(e){this.onMouseDown?.(this._convertViewToModelMouseEvent(e))}emitMouseUp(e){this.onMouseUp?.(this._convertViewToModelMouseEvent(e))}emitMouseDrag(e){this.onMouseDrag?.(this._convertViewToModelMouseEvent(e))}emitMouseDrop(e){this.onMouseDrop?.(this._convertViewToModelMouseEvent(e))}emitMouseDropCanceled(){this.onMouseDropCanceled?.()}emitMouseWheel(e){this.onMouseWheel?.(e)}_convertViewToModelMouseEvent(e){return e.target?{event:e.event,target:this._convertViewToModelMouseTarget(e.target)}:e}_convertViewToModelMouseTarget(e){return e7.convertViewToModelMouseTarget(e,this._coordinatesConverter)}static convertViewToModelMouseTarget(e,t){let i={...e};return i.position&&(i.position=t.convertViewPositionToModelPosition(i.position)),i.range&&(i.range=t.convertViewRangeToModelRange(i.range)),(5===i.type||8===i.type)&&(i.detail=this.convertViewToModelViewZoneData(i.detail,t)),i}static convertViewToModelViewZoneData(e,t){return{viewZoneId:e.viewZoneId,positionBefore:e.positionBefore?t.convertViewPositionToModelPosition(e.positionBefore):e.positionBefore,positionAfter:e.positionAfter?t.convertViewPositionToModelPosition(e.positionAfter):e.positionAfter,position:t.convertViewPositionToModelPosition(e.position),afterLineNumber:t.convertViewPositionToModelPosition(new ee.y(e.afterLineNumber,1)).lineNumber}}}i(58541);class e9 extends Z{constructor(e){super(e),this.blocks=[],this.contentWidth=-1,this.contentLeft=0,this.domNode=(0,q.Z)(document.createElement("div")),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this.domNode.setClassName("blockDecorations-container"),this.update()}update(){let e=!1,t=this._context.configuration.options.get(165),i=t.contentWidth-t.verticalScrollbarWidth;this.contentWidth!==i&&(this.contentWidth=i,e=!0);let n=t.contentLeft;return this.contentLeft!==n&&(this.contentLeft=n,e=!0),e}dispose(){super.dispose()}onConfigurationChanged(e){return this.update()}onScrollChanged(e){return e.scrollTopChanged||e.scrollLeftChanged}onDecorationsChanged(e){return!0}onZonesChanged(e){return!0}prepareRender(e){}render(e){let t=0;for(let i of e.getDecorationsInViewport()){let n,s;if(!i.options.blockClassName)continue;let o=this.blocks[t];o||(o=this.blocks[t]=(0,q.Z)(document.createElement("div")),this.domNode.appendChild(o)),i.options.blockIsAfterEnd?(n=e.getVerticalOffsetAfterLineNumber(i.range.endLineNumber,!1),s=e.getVerticalOffsetAfterLineNumber(i.range.endLineNumber,!0)):(n=e.getVerticalOffsetForLineNumber(i.range.startLineNumber,!0),s=i.range.isEmpty()&&!i.options.blockDoesNotCollapse?e.getVerticalOffsetForLineNumber(i.range.startLineNumber,!1):e.getVerticalOffsetAfterLineNumber(i.range.endLineNumber,!0));let[r,a,l,h]=i.options.blockPadding??[0,0,0,0];o.setClassName("blockDecorations-block "+i.options.blockClassName),o.setLeft(this.contentLeft-h),o.setWidth(this.contentWidth+h+a),o.setTop(n-e.scrollTop-r),o.setHeight(s-n+r+l),t++}for(let e=t;e<this.blocks.length;e++)this.blocks[e].domNode.remove();this.blocks.length=t}}class e8 extends Z{constructor(e,t){super(e),this._viewDomNode=t,this._widgets={},this.domNode=(0,q.Z)(document.createElement("div")),X.write(this.domNode,1),this.domNode.setClassName("contentWidgets"),this.domNode.setPosition("absolute"),this.domNode.setTop(0),this.overflowingContentWidgetsDomNode=(0,q.Z)(document.createElement("div")),X.write(this.overflowingContentWidgetsDomNode,2),this.overflowingContentWidgetsDomNode.setClassName("overflowingContentWidgets")}dispose(){super.dispose(),this._widgets={}}onConfigurationChanged(e){for(let t of Object.keys(this._widgets))this._widgets[t].onConfigurationChanged(e);return!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLineMappingChanged(e){return this._updateAnchorsViewPositions(),!0}onLinesChanged(e){return this._updateAnchorsViewPositions(),!0}onLinesDeleted(e){return this._updateAnchorsViewPositions(),!0}onLinesInserted(e){return this._updateAnchorsViewPositions(),!0}onScrollChanged(e){return!0}onZonesChanged(e){return!0}_updateAnchorsViewPositions(){for(let e of Object.keys(this._widgets))this._widgets[e].updateAnchorViewPosition()}addWidget(e){let t=new e6(this._context,this._viewDomNode,e);this._widgets[t.id]=t,t.allowEditorOverflow?this.overflowingContentWidgetsDomNode.appendChild(t.domNode):this.domNode.appendChild(t.domNode),this.setShouldRender()}setWidgetPosition(e,t,i,n,s){this._widgets[e.getId()].setPosition(t,i,n,s),this.setShouldRender()}removeWidget(e){let t=e.getId();if(this._widgets.hasOwnProperty(t)){let e=this._widgets[t];delete this._widgets[t];let i=e.domNode.domNode;i.remove(),i.removeAttribute("monaco-visible-content-widget"),this.setShouldRender()}}shouldSuppressMouseDownOnWidget(e){return!!this._widgets.hasOwnProperty(e)&&this._widgets[e].suppressMouseDown}onBeforeRender(e){for(let t of Object.keys(this._widgets))this._widgets[t].onBeforeRender(e)}prepareRender(e){for(let t of Object.keys(this._widgets))this._widgets[t].prepareRender(e)}render(e){for(let t of Object.keys(this._widgets))this._widgets[t].render(e)}}class e6{constructor(e,t,i){this._primaryAnchor=new te(null,null),this._secondaryAnchor=new te(null,null),this._context=e,this._viewDomNode=t,this._actual=i;let n=this._context.configuration.options,s=n.get(165),o=n.get(4);this.domNode=(0,q.Z)(this._actual.getDomNode()),this.id=this._actual.getId(),this.allowEditorOverflow=(this._actual.allowEditorOverflow||!1)&&o,this.suppressMouseDown=this._actual.suppressMouseDown||!1,this._fixedOverflowWidgets=n.get(51),this._contentWidth=s.contentWidth,this._contentLeft=s.contentLeft,this._affinity=null,this._preference=[],this._cachedDomNodeOffsetWidth=-1,this._cachedDomNodeOffsetHeight=-1,this._maxWidth=this._getMaxWidth(),this._isVisible=!1,this._renderData=null,this.domNode.setPosition(this._fixedOverflowWidgets&&this.allowEditorOverflow?"fixed":"absolute"),this.domNode.setDisplay("none"),this.domNode.setVisibility("hidden"),this.domNode.setAttribute("widgetId",this.id),this.domNode.setMaxWidth(this._maxWidth)}onConfigurationChanged(e){let t=this._context.configuration.options;if(e.hasChanged(165)){let e=t.get(165);this._contentLeft=e.contentLeft,this._contentWidth=e.contentWidth,this._maxWidth=this._getMaxWidth()}}updateAnchorViewPosition(){this._setPosition(this._affinity,this._primaryAnchor.modelPosition,this._secondaryAnchor.modelPosition)}_setPosition(e,t,i){function n(e,t,i){if(!e)return new te(null,null);let n=t.model.validatePosition(e);return t.coordinatesConverter.modelPositionIsVisible(n)?new te(e,t.coordinatesConverter.convertModelPositionToViewPosition(n,i??void 0)):new te(e,null)}this._affinity=e,this._primaryAnchor=n(t,this._context.viewModel,this._affinity),this._secondaryAnchor=n(i,this._context.viewModel,this._affinity)}_getMaxWidth(){let e=this.domNode.domNode.ownerDocument,t=e.defaultView;return this.allowEditorOverflow?t?.innerWidth||e.documentElement.offsetWidth||e.body.offsetWidth:this._contentWidth}setPosition(e,t,i,n){this._setPosition(n,e,t),this._preference=i,this._primaryAnchor.viewPosition&&this._preference&&this._preference.length>0?this.domNode.setDisplay("block"):this.domNode.setDisplay("none"),this._cachedDomNodeOffsetWidth=-1,this._cachedDomNodeOffsetHeight=-1}_layoutBoxInViewport(e,t,i,n){let s=e.top,o=e.top+e.height,r=n.viewportHeight-o,a=e.left;return a+t>n.scrollLeft+n.viewportWidth&&(a=n.scrollLeft+n.viewportWidth-t),a<n.scrollLeft&&(a=n.scrollLeft),{fitsAbove:s>=i,aboveTop:s-i,fitsBelow:r>=i,belowTop:o,left:a}}_layoutHorizontalSegmentInPage(e,t,i,n){let s=Math.max(15,t.left-n),o=Math.min(t.left+t.width+n,e.width-15),r=this._viewDomNode.domNode.ownerDocument.defaultView,a=t.left+i-(r?.scrollX??0);if(a+n>o){let e=a-(o-n);a-=e,i-=e}if(a<s){let e=a-s;a-=e,i-=e}return[i,a]}_layoutBoxInPage(e,t,i,n){let s=e.top-i,o=e.top+e.height,r=b.BK(this._viewDomNode.domNode),a=this._viewDomNode.domNode.ownerDocument,l=a.defaultView,h=r.top+s-(l?.scrollY??0),d=r.top+o-(l?.scrollY??0),c=b.tG(a.body),[u,g]=this._layoutHorizontalSegmentInPage(c,r,e.left-n.scrollLeft+this._contentLeft,t),p=h>=22,m=d+i<=c.height-22;return this._fixedOverflowWidgets?{fitsAbove:p,aboveTop:Math.max(h,22),fitsBelow:m,belowTop:d,left:g}:{fitsAbove:p,aboveTop:s,fitsBelow:m,belowTop:o,left:u}}_prepareRenderWidgetAtExactPositionOverflowing(e){return new tt(e.top,e.left+this._contentLeft)}_getAnchorsCoordinates(e){return{primary:t(this._primaryAnchor.viewPosition,this._affinity),secondary:t(this._secondaryAnchor.viewPosition?.lineNumber===this._primaryAnchor.viewPosition?.lineNumber?this._secondaryAnchor.viewPosition:null,this._affinity)};function t(t,i){if(!t)return null;let n=e.visibleRangeForPosition(t);if(!n)return null;let s=1===t.column&&3===i?0:n.left;return new ti(e.getVerticalOffsetForLineNumber(t.lineNumber)-e.scrollTop,s,e.getLineHeightForLineNumber(t.lineNumber))}}_reduceAnchorCoordinates(e,t,i){if(!t)return e;let n=this._context.configuration.options.get(59),s=t.left;return s=s<e.left?Math.max(s,e.left-i+n.typicalFullwidthCharacterWidth):Math.min(s,e.left+i-n.typicalFullwidthCharacterWidth),new ti(e.top,s,e.height)}_prepareRenderWidget(e){let t;if(!this._preference||0===this._preference.length)return null;let{primary:i,secondary:n}=this._getAnchorsCoordinates(e);if(!i)return{kind:"offViewport",preserveFocus:this.domNode.domNode.contains(this.domNode.domNode.ownerDocument.activeElement)};if(-1===this._cachedDomNodeOffsetWidth||-1===this._cachedDomNodeOffsetHeight){let e=null;if("function"==typeof this._actual.beforeRender&&(e=tn(this._actual.beforeRender,this._actual)),e)this._cachedDomNodeOffsetWidth=e.width,this._cachedDomNodeOffsetHeight=e.height;else{let e=this.domNode.domNode.getBoundingClientRect();this._cachedDomNodeOffsetWidth=Math.round(e.width),this._cachedDomNodeOffsetHeight=Math.round(e.height)}}let s=this._reduceAnchorCoordinates(i,n,this._cachedDomNodeOffsetWidth);t=this.allowEditorOverflow?this._layoutBoxInPage(s,this._cachedDomNodeOffsetWidth,this._cachedDomNodeOffsetHeight,e):this._layoutBoxInViewport(s,this._cachedDomNodeOffsetWidth,this._cachedDomNodeOffsetHeight,e);for(let e=1;e<=2;e++)for(let i of this._preference)if(1===i){if(!t)return null;if(2===e||t.fitsAbove)return{kind:"inViewport",coordinate:new tt(t.aboveTop,t.left),position:1}}else if(2===i){if(!t)return null;if(2===e||t.fitsBelow)return{kind:"inViewport",coordinate:new tt(t.belowTop,t.left),position:2}}else if(this.allowEditorOverflow)return{kind:"inViewport",coordinate:this._prepareRenderWidgetAtExactPositionOverflowing(new tt(s.top,s.left)),position:0};else return{kind:"inViewport",coordinate:new tt(s.top,s.left),position:0};return null}onBeforeRender(e){this._primaryAnchor.viewPosition&&this._preference&&(this._primaryAnchor.viewPosition.lineNumber<e.startLineNumber||this._primaryAnchor.viewPosition.lineNumber>e.endLineNumber||this.domNode.setMaxWidth(this._maxWidth))}prepareRender(e){this._renderData=this._prepareRenderWidget(e)}render(e){if(!this._renderData||"offViewport"===this._renderData.kind){this._isVisible&&(this.domNode.removeAttribute("monaco-visible-content-widget"),this._isVisible=!1,this._renderData?.kind==="offViewport"&&this._renderData.preserveFocus?this.domNode.setTop(-1e3):this.domNode.setVisibility("hidden")),"function"==typeof this._actual.afterRender&&tn(this._actual.afterRender,this._actual,null,null);return}this.allowEditorOverflow?this.domNode.setTop(this._renderData.coordinate.top):this.domNode.setTop(this._renderData.coordinate.top+e.scrollTop-e.bigNumbersDelta),this.domNode.setLeft(this._renderData.coordinate.left),this._isVisible||(this.domNode.setVisibility("inherit"),this.domNode.setAttribute("monaco-visible-content-widget","true"),this._isVisible=!0),"function"==typeof this._actual.afterRender&&tn(this._actual.afterRender,this._actual,this._renderData.position,this._renderData.coordinate)}}class te{constructor(e,t){this.modelPosition=e,this.viewPosition=t}}class tt{constructor(e,t){this.top=e,this.left=t,this._coordinateBrand=void 0}}class ti{constructor(e,t,i){this.top=e,this.left=t,this.height=i,this._anchorCoordinateBrand=void 0}}function tn(e,t,...i){try{return e.call(t,...i)}catch{return null}}i(78119);class ts extends Y.i{}var to=i(43537),tr=i(88298),ta=i(40023);class tl extends ts{constructor(e){super(),this._context=e;let t=this._context.configuration.options,i=t.get(165);this._renderLineHighlight=t.get(110),this._renderLineHighlightOnlyWhenFocus=t.get(111),this._wordWrap=i.isViewportWrapping,this._contentLeft=i.contentLeft,this._contentWidth=i.contentWidth,this._selectionIsEmpty=!0,this._focused=!1,this._cursorLineNumbers=[1],this._selections=[new ey.L(1,1,1,1)],this._renderData=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}_readFromSelections(){let e=!1,t=new Set;for(let e of this._selections)t.add(e.positionLineNumber);let i=Array.from(t);i.sort((e,t)=>e-t),L.aI(this._cursorLineNumbers,i)||(this._cursorLineNumbers=i,e=!0);let n=this._selections.every(e=>e.isEmpty());return this._selectionIsEmpty!==n&&(this._selectionIsEmpty=n,e=!0),e}onThemeChanged(e){return this._readFromSelections()}onConfigurationChanged(e){let t=this._context.configuration.options,i=t.get(165);return this._renderLineHighlight=t.get(110),this._renderLineHighlightOnlyWhenFocus=t.get(111),this._wordWrap=i.isViewportWrapping,this._contentLeft=i.contentLeft,this._contentWidth=i.contentWidth,!0}onCursorStateChanged(e){return this._selections=e.selections,this._readFromSelections()}onFlushed(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollWidthChanged||e.scrollTopChanged}onZonesChanged(e){return!0}onFocusChanged(e){return!!this._renderLineHighlightOnlyWhenFocus&&(this._focused=e.isFocused,!0)}prepareRender(e){if(!this._shouldRenderThis()){this._renderData=null;return}let t=e.visibleRange.startLineNumber,i=e.visibleRange.endLineNumber,n=[];for(let e=t;e<=i;e++)n[e-t]="";if(this._wordWrap){let s=this._renderOne(e,!1);for(let e of this._cursorLineNumbers){let o=this._context.viewModel.coordinatesConverter,r=o.convertViewPositionToModelPosition(new ee.y(e,1)).lineNumber,a=o.convertModelPositionToViewPosition(new ee.y(r,1)).lineNumber,l=o.convertModelPositionToViewPosition(new ee.y(r,this._context.viewModel.model.getLineMaxColumn(r))).lineNumber,h=Math.max(a,t),d=Math.min(l,i);for(let e=h;e<=d;e++)n[e-t]=s}}let s=this._renderOne(e,!0);for(let e of this._cursorLineNumbers)e<t||e>i||(n[e-t]=s);this._renderData=n}render(e,t){if(!this._renderData)return"";let i=t-e;return i>=this._renderData.length?"":this._renderData[i]}_shouldRenderInMargin(){return("gutter"===this._renderLineHighlight||"all"===this._renderLineHighlight)&&(!this._renderLineHighlightOnlyWhenFocus||this._focused)}_shouldRenderInContent(){return("line"===this._renderLineHighlight||"all"===this._renderLineHighlight)&&this._selectionIsEmpty&&(!this._renderLineHighlightOnlyWhenFocus||this._focused)}}class th extends tl{_renderOne(e,t){let i="current-line"+(this._shouldRenderInMargin()?" current-line-both":"")+(t?" current-line-exact":"");return`<div class="${i}" style="width:${Math.max(e.scrollWidth,this._contentWidth)}px;"></div>`}_shouldRenderThis(){return this._shouldRenderInContent()}_shouldRenderOther(){return this._shouldRenderInMargin()}}class td extends tl{_renderOne(e,t){let i="current-line"+(this._shouldRenderInMargin()?" current-line-margin":"")+(this._shouldRenderOther()?" current-line-margin-both":"")+(this._shouldRenderInMargin()&&t?" current-line-exact-margin":"");return`<div class="${i}" style="width:${this._contentLeft}px"></div>`}_shouldRenderThis(){return!0}_shouldRenderOther(){return this._shouldRenderInContent()}}(0,tr.zy)((e,t)=>{let i=e.getColor(to.kG);if(i&&(t.addRule(`.monaco-editor .view-overlays .current-line { background-color: ${i}; }`),t.addRule(`.monaco-editor .margin-view-overlays .current-line-margin { background-color: ${i}; border: none; }`)),!i||i.isTransparent()||e.defines(to.Mf)){let i=e.getColor(to.Mf);i&&(t.addRule(`.monaco-editor .view-overlays .current-line-exact { border: 2px solid ${i}; }`),t.addRule(`.monaco-editor .margin-view-overlays .current-line-exact-margin { border: 2px solid ${i}; }`),(0,ta.Bb)(e.type)&&(t.addRule(".monaco-editor .view-overlays .current-line-exact { border-width: 1px; }"),t.addRule(".monaco-editor .margin-view-overlays .current-line-exact-margin { border-width: 1px; }")))}}),i(41983);class tc extends ts{constructor(e){super(),this._context=e;let t=this._context.configuration.options;this._typicalHalfwidthCharacterWidth=t.get(59).typicalHalfwidthCharacterWidth,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){let t=this._context.configuration.options;return this._typicalHalfwidthCharacterWidth=t.get(59).typicalHalfwidthCharacterWidth,!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged||e.scrollWidthChanged}onZonesChanged(e){return!0}prepareRender(e){let t=e.getDecorationsInViewport(),i=[],n=0;for(let e=0,s=t.length;e<s;e++){let s=t[e];s.options.className&&(i[n++]=s)}i=i.sort((e,t)=>{if(e.options.zIndex<t.options.zIndex)return -1;if(e.options.zIndex>t.options.zIndex)return 1;let i=e.options.className,n=t.options.className;return i<n?-1:i>n?1:et.Q.compareRangesUsingStarts(e.range,t.range)});let s=e.visibleRange.startLineNumber,o=e.visibleRange.endLineNumber,r=[];for(let e=s;e<=o;e++)r[e-s]="";this._renderWholeLineDecorations(e,i,r),this._renderNormalDecorations(e,i,r),this._renderResult=r}_renderWholeLineDecorations(e,t,i){let n=e.visibleRange.startLineNumber,s=e.visibleRange.endLineNumber;for(let e=0,o=t.length;e<o;e++){let o=t[e];if(!o.options.isWholeLine)continue;let r='<div class="cdr '+o.options.className+'" style="left:0;width:100%;"></div>',a=Math.max(o.range.startLineNumber,n),l=Math.min(o.range.endLineNumber,s);for(let e=a;e<=l;e++){let t=e-n;i[t]+=r}}}_renderNormalDecorations(e,t,i){let n=e.visibleRange.startLineNumber,s=null,o=!1,r=null,a=!1;for(let l=0,h=t.length;l<h;l++){let h=t[l];if(h.options.isWholeLine)continue;let d=h.options.className,c=!!h.options.showIfCollapsed,u=h.range;if(c&&1===u.endColumn&&u.endLineNumber!==u.startLineNumber&&(u=new et.Q(u.startLineNumber,u.startColumn,u.endLineNumber-1,this._context.viewModel.getLineMaxColumn(u.endLineNumber-1))),s===d&&o===c&&et.Q.areIntersectingOrTouching(r,u)){r=et.Q.plusRange(r,u);continue}null!==s&&this._renderNormalDecoration(e,r,s,a,o,n,i),s=d,o=c,r=u,a=h.options.shouldFillLineOnLineBreak??!1}null!==s&&this._renderNormalDecoration(e,r,s,a,o,n,i)}_renderNormalDecoration(e,t,i,n,s,o,r){let a=e.linesVisibleRangesForRange(t,"findMatch"===i);if(a)for(let e=0,t=a.length;e<t;e++){let t=a[e];if(t.outsideRenderedLine)continue;let l=t.lineNumber-o;if(s&&1===t.ranges.length){let e=t.ranges[0];if(e.width<this._typicalHalfwidthCharacterWidth){let i=Math.max(0,Math.round(Math.round(e.left+e.width/2)-this._typicalHalfwidthCharacterWidth/2));t.ranges[0]=new eq.Y(i,this._typicalHalfwidthCharacterWidth)}}for(let e=0,s=t.ranges.length;e<s;e++){let o=n&&t.continuesOnNextLine&&1===s,a=t.ranges[e],h='<div class="cdr '+i+'" style="left:'+String(a.left)+"px;width:"+(o?"100%;":String(a.width)+"px;")+'"></div>';r[l]+=h}}}render(e,t){if(!this._renderResult)return"";let i=t-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}}class tu extends Z{constructor(e,t,i,n){super(e);let s=this._context.configuration.options,o=s.get(117),r=s.get(83),a=s.get(49),l=s.get(120),h=s.get(158),d={listenOnDomNode:i.domNode,className:"editor-scrollable "+(0,tr.Pz)(e.theme.type),useShadows:!1,lazyRender:!0,vertical:o.vertical,horizontal:o.horizontal,verticalHasArrows:o.verticalHasArrows,horizontalHasArrows:o.horizontalHasArrows,verticalScrollbarSize:o.verticalScrollbarSize,verticalSliderSize:o.verticalSliderSize,horizontalScrollbarSize:o.horizontalScrollbarSize,horizontalSliderSize:o.horizontalSliderSize,handleMouseWheel:o.handleMouseWheel,alwaysConsumeMouseWheel:o.alwaysConsumeMouseWheel,arrowSize:o.arrowSize,mouseWheelScrollSensitivity:r,fastScrollSensitivity:a,scrollPredominantAxis:l,scrollByPage:o.scrollByPage,inertialScroll:h};this.scrollbar=this._register(new eS.oO(t.domNode,d,this._context.viewLayout.getScrollable())),X.write(this.scrollbar.getDomNode(),6),this.scrollbarDomNode=(0,q.Z)(this.scrollbar.getDomNode()),this.scrollbarDomNode.setPosition("absolute"),this._setLayout();let c=(e,t,i)=>{let n={};if(t){let t=e.scrollTop;t&&(n.scrollTop=this._context.viewLayout.getCurrentScrollTop()+t,e.scrollTop=0)}if(i){let t=e.scrollLeft;t&&(n.scrollLeft=this._context.viewLayout.getCurrentScrollLeft()+t,e.scrollLeft=0)}this._context.viewModel.viewLayout.setScrollPosition(n,1)};this._register(b.ko(i.domNode,"scroll",e=>c(i.domNode,!0,!0))),this._register(b.ko(t.domNode,"scroll",e=>c(t.domNode,!0,!1))),this._register(b.ko(n.domNode,"scroll",e=>c(n.domNode,!0,!1))),this._register(b.ko(this.scrollbarDomNode.domNode,"scroll",e=>c(this.scrollbarDomNode.domNode,!0,!1)))}dispose(){super.dispose()}_setLayout(){let e=this._context.configuration.options,t=e.get(165);this.scrollbarDomNode.setLeft(t.contentLeft),"right"===e.get(81).side?this.scrollbarDomNode.setWidth(t.contentWidth+t.minimap.minimapWidth):this.scrollbarDomNode.setWidth(t.contentWidth),this.scrollbarDomNode.setHeight(t.height)}getOverviewRulerLayoutInfo(){return this.scrollbar.getOverviewRulerLayoutInfo()}getDomNode(){return this.scrollbarDomNode}delegateVerticalScrollbarPointerDown(e){this.scrollbar.delegateVerticalScrollbarPointerDown(e)}delegateScrollFromMouseWheelEvent(e){this.scrollbar.delegateScrollFromMouseWheelEvent(e)}onConfigurationChanged(e){if(e.hasChanged(117)||e.hasChanged(83)||e.hasChanged(49)){let e=this._context.configuration.options,t=e.get(117),i=e.get(83),n=e.get(49),s=e.get(120),o={vertical:t.vertical,horizontal:t.horizontal,verticalScrollbarSize:t.verticalScrollbarSize,horizontalScrollbarSize:t.horizontalScrollbarSize,scrollByPage:t.scrollByPage,handleMouseWheel:t.handleMouseWheel,mouseWheelScrollSensitivity:i,fastScrollSensitivity:n,scrollPredominantAxis:s};this.scrollbar.updateOptions(o)}return e.hasChanged(165)&&this._setLayout(),!0}onScrollChanged(e){return!0}onThemeChanged(e){return this.scrollbar.updateClassName("editor-scrollable "+(0,tr.Pz)(this._context.theme.type)),!0}prepareRender(e){}render(e){this.scrollbar.renderNow()}}i(39819);class tg{constructor(e,t,i,n,s){this.startLineNumber=e,this.endLineNumber=t,this.className=i,this.tooltip=n,this._decorationToRenderBrand=void 0,this.zIndex=s??0}}class tp{constructor(e,t,i){this.className=e,this.zIndex=t,this.tooltip=i}}class tm{constructor(){this.decorations=[]}add(e){this.decorations.push(e)}getDecorations(){return this.decorations}}class tf extends ts{_render(e,t,i){let n=[];for(let i=e;i<=t;i++)n[i-e]=new tm;if(0===i.length)return n;i.sort((e,t)=>e.className===t.className?e.startLineNumber===t.startLineNumber?e.endLineNumber-t.endLineNumber:e.startLineNumber-t.startLineNumber:e.className<t.className?-1:1);let s=null,o=0;for(let r=0,a=i.length;r<a;r++){let a=i[r],l=a.className,h=a.zIndex,d=Math.max(a.startLineNumber,e)-e,c=Math.min(a.endLineNumber,t)-e;s===l?(d=Math.max(o+1,d),o=Math.max(o,c)):(s=l,o=c);for(let e=d;e<=o;e++)n[e].add(new tp(l,h,a.tooltip))}return n}}class t_ extends Z{constructor(e){super(e),this._widgets={},this._context=e;let t=this._context.configuration.options,i=t.get(165);this.domNode=(0,q.Z)(document.createElement("div")),this.domNode.setClassName("glyph-margin-widgets"),this.domNode.setPosition("absolute"),this.domNode.setTop(0),this._lineHeight=t.get(75),this._glyphMargin=t.get(66),this._glyphMarginLeft=i.glyphMarginLeft,this._glyphMarginWidth=i.glyphMarginWidth,this._glyphMarginDecorationLaneCount=i.glyphMarginDecorationLaneCount,this._managedDomNodes=[],this._decorationGlyphsToRender=[]}dispose(){this._managedDomNodes=[],this._decorationGlyphsToRender=[],this._widgets={},super.dispose()}getWidgets(){return Object.values(this._widgets)}onConfigurationChanged(e){let t=this._context.configuration.options,i=t.get(165);return this._lineHeight=t.get(75),this._glyphMargin=t.get(66),this._glyphMarginLeft=i.glyphMarginLeft,this._glyphMarginWidth=i.glyphMarginWidth,this._glyphMarginDecorationLaneCount=i.glyphMarginDecorationLaneCount,!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}addWidget(e){let t=(0,q.Z)(e.getDomNode());this._widgets[e.getId()]={widget:e,preference:e.getPosition(),domNode:t,renderInfo:null},t.setPosition("absolute"),t.setDisplay("none"),t.setAttribute("widgetId",e.getId()),this.domNode.appendChild(t),this.setShouldRender()}setWidgetPosition(e,t){let i=this._widgets[e.getId()];return!(i.preference.lane===t.lane&&i.preference.zIndex===t.zIndex&&et.Q.equalsRange(i.preference.range,t.range))&&(i.preference=t,this.setShouldRender(),!0)}removeWidget(e){let t=e.getId();if(this._widgets[t]){let e=this._widgets[t].domNode.domNode;delete this._widgets[t],e.remove(),this.setShouldRender()}}_collectDecorationBasedGlyphRenderRequest(e,t){let i=e.visibleRange.startLineNumber,n=e.visibleRange.endLineNumber;for(let s of e.getDecorationsInViewport()){let e=s.options.glyphMarginClassName;if(!e)continue;let o=Math.max(s.range.startLineNumber,i),r=Math.min(s.range.endLineNumber,n),a=s.options.glyphMargin?.position??es.ZS.Center,l=s.options.zIndex??0;for(let i=o;i<=r;i++){let n=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new ee.y(i,0)),s=this._context.viewModel.glyphLanes.getLanesAtLine(n.lineNumber).indexOf(a);t.push(new tv(i,s,l,e))}}}_collectWidgetBasedGlyphRenderRequest(e,t){let i=e.visibleRange.startLineNumber,n=e.visibleRange.endLineNumber;for(let e of Object.values(this._widgets)){let s=e.preference.range,{startLineNumber:o,endLineNumber:r}=this._context.viewModel.coordinatesConverter.convertModelRangeToViewRange(et.Q.lift(s));if(!o||!r||r<i||o>n)continue;let a=Math.max(o,i),l=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new ee.y(a,0)),h=this._context.viewModel.glyphLanes.getLanesAtLine(l.lineNumber).indexOf(e.preference.lane);t.push(new tb(a,h,e.preference.zIndex,e))}}_collectSortedGlyphRenderRequests(e){let t=[];return this._collectDecorationBasedGlyphRenderRequest(e,t),this._collectWidgetBasedGlyphRenderRequest(e,t),t.sort((e,t)=>{if(e.lineNumber===t.lineNumber){if(e.laneIndex===t.laneIndex){if(e.zIndex===t.zIndex)return t.type===e.type?0===e.type&&0===t.type?e.className<t.className?-1:1:0:t.type-e.type;return t.zIndex-e.zIndex}return e.laneIndex-t.laneIndex}return e.lineNumber-t.lineNumber}),t}prepareRender(e){if(!this._glyphMargin){this._decorationGlyphsToRender=[];return}for(let e of Object.values(this._widgets))e.renderInfo=null;let t=new L.j3(this._collectSortedGlyphRenderRequests(e)),i=[];for(;t.length>0;){let e=t.peek();if(!e)break;let n=t.takeWhile(t=>t.lineNumber===e.lineNumber&&t.laneIndex===e.laneIndex);if(!n||0===n.length)break;let s=n[0];if(0===s.type){let e=[];for(let t of n){if(t.zIndex!==s.zIndex||t.type!==s.type)break;(0===e.length||e[e.length-1]!==t.className)&&e.push(t.className)}i.push(s.accept(e.join(" ")))}else s.widget.renderInfo={lineNumber:s.lineNumber,laneIndex:s.laneIndex}}this._decorationGlyphsToRender=i}render(e){if(!this._glyphMargin){for(let e of Object.values(this._widgets))e.domNode.setDisplay("none");for(;this._managedDomNodes.length>0;){let e=this._managedDomNodes.pop();e?.domNode.remove()}return}let t=Math.round(this._glyphMarginWidth/this._glyphMarginDecorationLaneCount);for(let i of Object.values(this._widgets))if(i.renderInfo){let n=e.viewportData.relativeVerticalOffset[i.renderInfo.lineNumber-e.viewportData.startLineNumber],s=this._glyphMarginLeft+i.renderInfo.laneIndex*this._lineHeight;i.domNode.setDisplay("block"),i.domNode.setTop(n),i.domNode.setLeft(s),i.domNode.setWidth(t),i.domNode.setHeight(this._lineHeight)}else i.domNode.setDisplay("none");for(let i=0;i<this._decorationGlyphsToRender.length;i++){let n,s=this._decorationGlyphsToRender[i],o=s.lineNumber,r=e.viewportData.relativeVerticalOffset[o-e.viewportData.startLineNumber],a=this._glyphMarginLeft+s.laneIndex*this._lineHeight;i<this._managedDomNodes.length?n=this._managedDomNodes[i]:(n=(0,q.Z)(document.createElement("div")),this._managedDomNodes.push(n),this.domNode.appendChild(n));let l=this._context.viewLayout.getLineHeightForLineNumber(o);n.setClassName("cgmr codicon "+s.combinedClassName),n.setPosition("absolute"),n.setTop(r),n.setLeft(a),n.setWidth(t),n.setHeight(l)}for(;this._managedDomNodes.length>this._decorationGlyphsToRender.length;){let e=this._managedDomNodes.pop();e?.domNode.remove()}}}class tv{constructor(e,t,i,n){this.lineNumber=e,this.laneIndex=t,this.zIndex=i,this.className=n,this.type=0}accept(e){return new tC(this.lineNumber,this.laneIndex,e)}}class tb{constructor(e,t,i,n){this.lineNumber=e,this.laneIndex=t,this.zIndex=i,this.widget=n,this.type=1}}class tC{constructor(e,t,i){this.lineNumber=e,this.laneIndex=t,this.combinedClassName=i}}i(83535);var tw=i(95751),ty=i(610),tS=i(83447);class tk extends ts{constructor(e){super(),this._context=e,this._primaryPosition=null;let t=this._context.configuration.options,i=t.get(166),n=t.get(59);this._spaceWidth=n.spaceWidth,this._maxIndentLeft=-1===i.wrappingColumn?-1:i.wrappingColumn*n.typicalHalfwidthCharacterWidth,this._bracketPairGuideOptions=t.get(22),this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){let t=this._context.configuration.options,i=t.get(166),n=t.get(59);return this._spaceWidth=n.spaceWidth,this._maxIndentLeft=-1===i.wrappingColumn?-1:i.wrappingColumn*n.typicalHalfwidthCharacterWidth,this._bracketPairGuideOptions=t.get(22),!0}onCursorStateChanged(e){let t=e.selections[0].getPosition();return!this._primaryPosition?.equals(t)&&(this._primaryPosition=t,!0)}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}onLanguageConfigurationChanged(e){return!0}prepareRender(e){if(!this._bracketPairGuideOptions.indentation&&!1===this._bracketPairGuideOptions.bracketPairs){this._renderResult=null;return}let t=e.visibleRange.startLineNumber,i=e.visibleRange.endLineNumber,n=e.scrollWidth,s=this._primaryPosition,o=this.getGuidesByLine(t,Math.min(i+1,this._context.viewModel.getLineCount()),s),r=[];for(let s=t;s<=i;s++){let i=s-t,a=o[i],l="",h=e.visibleRangeForPosition(new ee.y(s,1))?.left??0;for(let t of a){let i=-1===t.column?h+(t.visibleColumn-1)*this._spaceWidth:e.visibleRangeForPosition(new ee.y(s,t.column)).left;if(i>n||this._maxIndentLeft>0&&i>this._maxIndentLeft)break;let o=t.horizontalLine?t.horizontalLine.top?"horizontal-top":"horizontal-bottom":"vertical",r=t.horizontalLine?(e.visibleRangeForPosition(new ee.y(s,t.horizontalLine.endColumn))?.left??i+this._spaceWidth)-i:this._spaceWidth;l+=`<div class="core-guide ${t.className} ${o}" style="left:${i}px;width:${r}px"></div>`}r[i]=l}this._renderResult=r}getGuidesByLine(e,t,i){let n=!1!==this._bracketPairGuideOptions.bracketPairs?this._context.viewModel.getBracketGuidesInRangeByLine(e,t,i,{highlightActive:this._bracketPairGuideOptions.highlightActiveBracketPair,horizontalGuides:!0===this._bracketPairGuideOptions.bracketPairsHorizontal?tS.N6.Enabled:"active"===this._bracketPairGuideOptions.bracketPairsHorizontal?tS.N6.EnabledForActive:tS.N6.Disabled,includeInactive:!0===this._bracketPairGuideOptions.bracketPairs}):null,s=this._bracketPairGuideOptions.indentation?this._context.viewModel.getLinesIndentGuides(e,t):null,o=0,r=0,a=0;if(!1!==this._bracketPairGuideOptions.highlightActiveIndentation&&i){let n=this._context.viewModel.getActiveIndentGuide(i.lineNumber,e,t);o=n.startLineNumber,r=n.endLineNumber,a=n.indent}let{indentSize:l}=this._context.viewModel.model.getOptions(),h=[];for(let i=e;i<=t;i++){let t=[];h.push(t);let d=n?n[i-e]:[],c=new L.j3(d),u=s?s[i-e]:0;for(let e=1;e<=u;e++){let n=(e-1)*l+1,s=("always"===this._bracketPairGuideOptions.highlightActiveIndentation||0===d.length)&&o<=i&&i<=r&&e===a;t.push(...c.takeWhile(e=>e.visibleColumn<n)||[]);let h=c.peek();(!h||h.visibleColumn!==n||h.horizontalLine)&&t.push(new tS.TH(n,-1,`core-guide-indent lvl-${(e-1)%30}`+(s?" indent-active":""),null,-1,-1))}t.push(...c.takeWhile(e=>!0)||[])}return h}render(e,t){if(!this._renderResult)return"";let i=t-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}}function tx(e){if(!(e&&e.isTransparent()))return e}(0,tr.zy)((e,t)=>{let i=[{bracketColor:to.sN,guideColor:to.n4,guideColorActive:to.bB},{bracketColor:to.lQ,guideColor:to.I2,guideColorActive:to.WS},{bracketColor:to.ss,guideColor:to.Bo,guideColorActive:to.Pe},{bracketColor:to.l5,guideColor:to.If,guideColorActive:to.WD},{bracketColor:to.sH,guideColor:to.BD,guideColorActive:to.P1},{bracketColor:to.zp,guideColor:to.IW,guideColorActive:to.WY}],n=new ty.k,s=[{indentColor:to.vV,indentColorActive:to.H0},{indentColor:to.ob,indentColorActive:to.Am},{indentColor:to.hz,indentColorActive:to.tK},{indentColor:to.ow,indentColorActive:to.A3},{indentColor:to.vP,indentColorActive:to.tp},{indentColor:to.CM,indentColorActive:to.As}],o=i.map(t=>{let i=e.getColor(t.bracketColor),n=e.getColor(t.guideColor),s=e.getColor(t.guideColorActive),o=tx(tx(n)??i?.transparent(.3)),r=tx(tx(s)??i);if(o&&r)return{guideColor:o,guideColorActive:r}}).filter(tw.O9),r=s.map(t=>{let i=e.getColor(t.indentColor),n=e.getColor(t.indentColorActive),s=tx(i),o=tx(n);if(s&&o)return{indentColor:s,indentColorActive:o}}).filter(tw.O9);if(o.length>0){for(let e=0;e<30;e++){let i=o[e%o.length];t.addRule(`.monaco-editor .${n.getInlineClassNameOfLevel(e).replace(/ /g,".")} { --guide-color: ${i.guideColor}; --guide-color-active: ${i.guideColorActive}; }`)}t.addRule(".monaco-editor .vertical { box-shadow: 1px 0 0 0 var(--guide-color) inset; }"),t.addRule(".monaco-editor .horizontal-top { border-top: 1px solid var(--guide-color); }"),t.addRule(".monaco-editor .horizontal-bottom { border-bottom: 1px solid var(--guide-color); }"),t.addRule(`.monaco-editor .vertical.${n.activeClassName} { box-shadow: 1px 0 0 0 var(--guide-color-active) inset; }`),t.addRule(`.monaco-editor .horizontal-top.${n.activeClassName} { border-top: 1px solid var(--guide-color-active); }`),t.addRule(`.monaco-editor .horizontal-bottom.${n.activeClassName} { border-bottom: 1px solid var(--guide-color-active); }`)}if(r.length>0){for(let e=0;e<30;e++){let i=r[e%r.length];t.addRule(`.monaco-editor .lines-content .core-guide-indent.lvl-${e} { --indent-color: ${i.indentColor}; --indent-color-active: ${i.indentColorActive}; }`)}t.addRule(".monaco-editor .lines-content .core-guide-indent { box-shadow: 1px 0 0 0 var(--indent-color) inset; }"),t.addRule(".monaco-editor .lines-content .core-guide-indent.indent-active { box-shadow: 1px 0 0 0 var(--indent-color-active) inset; }")}}),i(52339);class tL extends ts{static{this.CLASS_NAME="line-numbers"}constructor(e){super(),this._context=e,this._readConfig(),this._lastCursorModelPosition=new ee.y(1,1),this._renderResult=null,this._activeModelLineNumber=1,this._context.addEventHandler(this)}_readConfig(){let e=this._context.configuration.options;this._lineHeight=e.get(75);let t=e.get(76);this._renderLineNumbers=t.renderType,this._renderCustomLineNumbers=t.renderFn,this._renderFinalNewline=e.get(109);let i=e.get(165);this._lineNumbersLeft=i.lineNumbersLeft,this._lineNumbersWidth=i.lineNumbersWidth}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){return this._readConfig(),!0}onCursorStateChanged(e){let t=e.selections[0].getPosition();this._lastCursorModelPosition=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(t);let i=!1;return this._activeModelLineNumber!==this._lastCursorModelPosition.lineNumber&&(this._activeModelLineNumber=this._lastCursorModelPosition.lineNumber,i=!0),(2===this._renderLineNumbers||3===this._renderLineNumbers)&&(i=!0),i}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}onDecorationsChanged(e){return e.affectsLineNumber}_getLineRenderLineNumber(e){let t=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new ee.y(e,1));if(1!==t.column)return"";let i=t.lineNumber;if(this._renderCustomLineNumbers)return this._renderCustomLineNumbers(i);if(2===this._renderLineNumbers){let e=Math.abs(this._lastCursorModelPosition.lineNumber-i);return 0===e?'<span class="relative-current-line-number">'+i+"</span>":String(e)}return 3===this._renderLineNumbers?this._lastCursorModelPosition.lineNumber===i||i%10==0||i===this._context.viewModel.getLineCount()?String(i):"":String(i)}prepareRender(e){if(0===this._renderLineNumbers){this._renderResult=null;return}let t=I.j9?this._lineHeight%2==0?" lh-even":" lh-odd":"",i=e.visibleRange.startLineNumber,n=e.visibleRange.endLineNumber,s=this._context.viewModel.getDecorationsInViewport(e.visibleRange).filter(e=>!!e.options.lineNumberClassName);s.sort((e,t)=>et.Q.compareRangesUsingEnds(e.range,t.range));let o=0,r=this._context.viewModel.getLineCount(),a=[];for(let e=i;e<=n;e++){let n=e-i,l=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new ee.y(e,1)).lineNumber,h=this._getLineRenderLineNumber(e),d="";for(;o<s.length&&s[o].range.endLineNumber<e;)o++;for(let t=o;t<s.length;t++){let{range:i,options:n}=s[t];i.startLineNumber<=e&&(d+=" "+n.lineNumberClassName)}if(!h&&!d){a[n]="";continue}e===r&&0===this._context.viewModel.getLineLength(e)&&("off"===this._renderFinalNewline&&(h=""),"dimmed"===this._renderFinalNewline&&(d+=" dimmed-line-number")),l===this._activeModelLineNumber&&(d+=" active-line-number"),a[n]=`<div class="${tL.CLASS_NAME}${t}${d}" style="left:${this._lineNumbersLeft}px;width:${this._lineNumbersWidth}px;">${h}</div>`}this._renderResult=a}render(e,t){if(!this._renderResult)return"";let i=t-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}}(0,tr.zy)((e,t)=>{let i=e.getColor(to.Qt),n=e.getColor(to.JB);n?t.addRule(`.monaco-editor .line-numbers.dimmed-line-number { color: ${n}; }`):i&&t.addRule(`.monaco-editor .line-numbers.dimmed-line-number { color: ${i.transparent(.4)}; }`)}),i(16726);let tD="monaco-mouse-cursor-text";i(53827);class tI{get didDomLayout(){return this._didDomLayout}readClientRect(){if(!this._clientRectRead){this._clientRectRead=!0;let e=this._domNode.getBoundingClientRect();this.markDidDomLayout(),this._clientRectDeltaLeft=e.left,this._clientRectScale=e.width/this._domNode.offsetWidth}}get clientRectDeltaLeft(){return this._clientRectRead||this.readClientRect(),this._clientRectDeltaLeft}get clientRectScale(){return this._clientRectRead||this.readClientRect(),this._clientRectScale}constructor(e,t){this._domNode=e,this.endNode=t,this._didDomLayout=!1,this._clientRectDeltaLeft=0,this._clientRectScale=1,this._clientRectRead=!1}markDidDomLayout(){this._didDomLayout=!0}}class tN{constructor(e,t){this.themeType=t;let i=e.options,n=i.get(59);this.renderWhitespace=i.get(113),this.experimentalWhitespaceRendering=i.get(47),this.renderControlCharacters=i.get(108),this.spaceWidth=n.spaceWidth,this.middotWidth=n.middotWidth,this.wsmiddotWidth=n.wsmiddotWidth,this.useMonospaceOptimizations=n.isMonospace&&!i.get(40),this.canUseHalfwidthRightwardsArrow=n.canUseHalfwidthRightwardsArrow,this.lineHeight=i.get(75),this.stopRenderingLineAfter=i.get(133),this.fontLigatures=i.get(60),this.verticalScrollbarSize=i.get(117).verticalScrollbarSize,this.useGpu="on"===i.get(46)}equals(e){return this.themeType===e.themeType&&this.renderWhitespace===e.renderWhitespace&&this.experimentalWhitespaceRendering===e.experimentalWhitespaceRendering&&this.renderControlCharacters===e.renderControlCharacters&&this.spaceWidth===e.spaceWidth&&this.middotWidth===e.middotWidth&&this.wsmiddotWidth===e.wsmiddotWidth&&this.useMonospaceOptimizations===e.useMonospaceOptimizations&&this.canUseHalfwidthRightwardsArrow===e.canUseHalfwidthRightwardsArrow&&this.lineHeight===e.lineHeight&&this.stopRenderingLineAfter===e.stopRenderingLineAfter&&this.fontLigatures===e.fontLigatures&&this.verticalScrollbarSize===e.verticalScrollbarSize&&this.useGpu===e.useGpu}}class tE{constructor(){this._currentVisibleRange=new et.Q(1,1,1,1)}getCurrentVisibleRange(){return this._currentVisibleRange}setCurrentVisibleRange(e){this._currentVisibleRange=e}}class tM{constructor(e,t,i,n,s,o,r){this.minimalReveal=e,this.lineNumber=t,this.startColumn=i,this.endColumn=n,this.startScrollTop=s,this.stopScrollTop=o,this.scrollType=r,this.type="range",this.minLineNumber=t,this.maxLineNumber=t}}class tT{constructor(e,t,i,n,s){this.minimalReveal=e,this.selections=t,this.startScrollTop=i,this.stopScrollTop=n,this.scrollType=s,this.type="selections";let o=t[0].startLineNumber,r=t[0].endLineNumber;for(let e=1,i=t.length;e<i;e++){let i=t[e];o=Math.min(o,i.startLineNumber),r=Math.max(r,i.endLineNumber)}this.minLineNumber=o,this.maxLineNumber=r}}class tR extends Z{static{this.HORIZONTAL_EXTRA_PX=30}constructor(e,t,i){super(e);let n=this._context.configuration,s=this._context.configuration.options,o=s.get(59),r=s.get(166);this._lineHeight=s.get(75),this._typicalHalfwidthCharacterWidth=o.typicalHalfwidthCharacterWidth,this._isViewportWrapping=r.isViewportWrapping,this._revealHorizontalRightPadding=s.get(114),this._cursorSurroundingLines=s.get(35),this._cursorSurroundingLinesStyle=s.get(36),this._canUseLayerHinting=!s.get(39),this._viewLineOptions=new tN(n,this._context.theme.type),this._linesContent=i,this._textRangeRestingSpot=document.createElement("div"),this._visibleLines=new e0(this._context,{createLine:()=>new J.G(t,this._viewLineOptions)}),this.domNode=this._visibleLines.domNode,X.write(this.domNode,8),this.domNode.setClassName(`view-lines ${tD}`),(0,k.M)(this.domNode,o),this._maxLineWidth=0,this._asyncUpdateLineWidths=new eP.uC(()=>{this._updateLineWidthsSlow()},200),this._asyncCheckMonospaceFontAssumptions=new eP.uC(()=>{this._checkMonospaceFontAssumptions()},2e3),this._lastRenderedData=new tE,this._horizontalRevealRequest=null,this._stickyScrollEnabled=s.get(131).enabled,this._maxNumberStickyLines=s.get(131).maxLineCount}dispose(){this._asyncUpdateLineWidths.dispose(),this._asyncCheckMonospaceFontAssumptions.dispose(),super.dispose()}getDomNode(){return this.domNode}onConfigurationChanged(e){this._visibleLines.onConfigurationChanged(e),e.hasChanged(166)&&(this._maxLineWidth=0);let t=this._context.configuration.options,i=t.get(59),n=t.get(166);return this._lineHeight=t.get(75),this._typicalHalfwidthCharacterWidth=i.typicalHalfwidthCharacterWidth,this._isViewportWrapping=n.isViewportWrapping,this._revealHorizontalRightPadding=t.get(114),this._cursorSurroundingLines=t.get(35),this._cursorSurroundingLinesStyle=t.get(36),this._canUseLayerHinting=!t.get(39),this._stickyScrollEnabled=t.get(131).enabled,this._maxNumberStickyLines=t.get(131).maxLineCount,(0,k.M)(this.domNode,i),this._onOptionsMaybeChanged(),e.hasChanged(165)&&(this._maxLineWidth=0),!0}_onOptionsMaybeChanged(){let e=new tN(this._context.configuration,this._context.theme.type);if(!this._viewLineOptions.equals(e)){this._viewLineOptions=e;let t=this._visibleLines.getStartLineNumber(),i=this._visibleLines.getEndLineNumber();for(let e=t;e<=i;e++)this._visibleLines.getVisibleLine(e).onOptionsChanged(this._viewLineOptions);return!0}return!1}onCursorStateChanged(e){let t=this._visibleLines.getStartLineNumber(),i=this._visibleLines.getEndLineNumber(),n=!1;for(let e=t;e<=i;e++)n=this._visibleLines.getVisibleLine(e).onSelectionChanged()||n;return n}onDecorationsChanged(e){{let e=this._visibleLines.getStartLineNumber(),t=this._visibleLines.getEndLineNumber();for(let i=e;i<=t;i++)this._visibleLines.getVisibleLine(i).onDecorationsChanged()}return!0}onFlushed(e){let t=this._visibleLines.onFlushed(e,this._viewLineOptions.useGpu);return this._maxLineWidth=0,t}onLinesChanged(e){return this._visibleLines.onLinesChanged(e)}onLinesDeleted(e){return this._visibleLines.onLinesDeleted(e)}onLinesInserted(e){return this._visibleLines.onLinesInserted(e)}onRevealRangeRequest(e){let t=this._computeScrollTopToRevealRange(this._context.viewLayout.getFutureViewport(),e.source,e.minimalReveal,e.range,e.selections,e.verticalType);if(-1===t)return!1;let i=this._context.viewLayout.validateScrollPosition({scrollTop:t});e.revealHorizontal?e.range&&e.range.startLineNumber!==e.range.endLineNumber?i={scrollTop:i.scrollTop,scrollLeft:0}:e.range?this._horizontalRevealRequest=new tM(e.minimalReveal,e.range.startLineNumber,e.range.startColumn,e.range.endColumn,this._context.viewLayout.getCurrentScrollTop(),i.scrollTop,e.scrollType):e.selections&&e.selections.length>0&&(this._horizontalRevealRequest=new tT(e.minimalReveal,e.selections,this._context.viewLayout.getCurrentScrollTop(),i.scrollTop,e.scrollType)):this._horizontalRevealRequest=null;let n=Math.abs(this._context.viewLayout.getCurrentScrollTop()-i.scrollTop)<=this._lineHeight?1:e.scrollType;return this._context.viewModel.viewLayout.setScrollPosition(i,n),!0}onScrollChanged(e){if(this._horizontalRevealRequest&&e.scrollLeftChanged&&(this._horizontalRevealRequest=null),this._horizontalRevealRequest&&e.scrollTopChanged){let t=Math.min(this._horizontalRevealRequest.startScrollTop,this._horizontalRevealRequest.stopScrollTop),i=Math.max(this._horizontalRevealRequest.startScrollTop,this._horizontalRevealRequest.stopScrollTop);(e.scrollTop<t||e.scrollTop>i)&&(this._horizontalRevealRequest=null)}return this.domNode.setWidth(e.scrollWidth),this._visibleLines.onScrollChanged(e)||!0}onTokensChanged(e){return this._visibleLines.onTokensChanged(e)}onZonesChanged(e){return this._context.viewModel.viewLayout.setMaxLineWidth(this._maxLineWidth),this._visibleLines.onZonesChanged(e)}onThemeChanged(e){return this._onOptionsMaybeChanged()}getPositionFromDOMInfo(e,t){let i=this._getViewLineDomNode(e);if(null===i)return null;let n=this._getLineNumberFor(i);if(-1===n||n<1||n>this._context.viewModel.getLineCount())return null;if(1===this._context.viewModel.getLineMaxColumn(n))return new ee.y(n,1);let s=this._visibleLines.getStartLineNumber(),o=this._visibleLines.getEndLineNumber();if(n<s||n>o)return null;let r=this._visibleLines.getVisibleLine(n).getColumnOfNodeOffset(e,t),a=this._context.viewModel.getLineMinColumn(n);return r<a&&(r=a),new ee.y(n,r)}_getViewLineDomNode(e){for(;e&&1===e.nodeType;){if(e.className===J.G.CLASS_NAME)return e;e=e.parentElement}return null}_getLineNumberFor(e){let t=this._visibleLines.getStartLineNumber(),i=this._visibleLines.getEndLineNumber();for(let n=t;n<=i;n++)if(e===this._visibleLines.getVisibleLine(n).getDomNode())return n;return -1}getLineWidth(e){let t=this._visibleLines.getStartLineNumber(),i=this._visibleLines.getEndLineNumber();if(e<t||e>i)return -1;let n=new tI(this.domNode.domNode,this._textRangeRestingSpot),s=this._visibleLines.getVisibleLine(e).getWidth(n);return this._updateLineWidthsSlowIfDomDidLayout(n),s}linesVisibleRangesForRange(e,t){if(this.shouldRender())return null;let i=e.endLineNumber,n=et.Q.intersectRanges(e,this._lastRenderedData.getCurrentVisibleRange());if(!n)return null;let s=[],o=0,r=new tI(this.domNode.domNode,this._textRangeRestingSpot),a=0;t&&(a=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new ee.y(n.startLineNumber,1)).lineNumber);let l=this._visibleLines.getStartLineNumber(),h=this._visibleLines.getEndLineNumber();for(let e=n.startLineNumber;e<=n.endLineNumber;e++){if(e<l||e>h)continue;let d=e===n.startLineNumber?n.startColumn:1,c=e!==i,u=c?this._context.viewModel.getLineMaxColumn(e):n.endColumn,g=this._visibleLines.getVisibleLine(e).getVisibleRangesForRange(e,d,u,r);if(g){if(t&&e<i){let t=a;if(t!==(a=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new ee.y(e+1,1)).lineNumber)){let e=g.ranges[g.ranges.length-1];e.width+=this._typicalHalfwidthCharacterWidth,this._context.viewModel.getTextDirection(t)===es.z4.RTL&&(e.left-=this._typicalHalfwidthCharacterWidth)}}s[o++]=new eq.BG(g.outsideRenderedLine,e,eq.Y.from(g.ranges),c)}}return(this._updateLineWidthsSlowIfDomDidLayout(r),0===o)?null:s}_visibleRangesForLineRange(e,t,i){if(this.shouldRender()||e<this._visibleLines.getStartLineNumber()||e>this._visibleLines.getEndLineNumber())return null;let n=new tI(this.domNode.domNode,this._textRangeRestingSpot),s=this._visibleLines.getVisibleLine(e).getVisibleRangesForRange(e,t,i,n);return this._updateLineWidthsSlowIfDomDidLayout(n),s}_lineIsRenderedRTL(e){return!(e<this._visibleLines.getStartLineNumber()||e>this._visibleLines.getEndLineNumber())&&this._visibleLines.getVisibleLine(e).isRenderedRTL()}visibleRangeForPosition(e){let t=this._visibleRangesForLineRange(e.lineNumber,e.column,e.column);return t?new eq.qN(t.outsideRenderedLine,t.ranges[0].left):null}_updateLineWidthsFast(){return this._updateLineWidths(!0)}_updateLineWidthsSlow(){this._updateLineWidths(!1)}_updateLineWidthsSlowIfDomDidLayout(e){e.didDomLayout&&(this._asyncUpdateLineWidths.isScheduled()||(this._asyncUpdateLineWidths.cancel(),this._updateLineWidthsSlow()))}_updateLineWidths(e){let t=this._visibleLines.getStartLineNumber(),i=this._visibleLines.getEndLineNumber(),n=1,s=!0;for(let o=t;o<=i;o++){let t=this._visibleLines.getVisibleLine(o);if(e&&!t.getWidthIsFast()){s=!1;continue}n=Math.max(n,t.getWidth(null))}return s&&1===t&&i===this._context.viewModel.getLineCount()&&(this._maxLineWidth=0),this._ensureMaxLineWidth(n),s}_checkMonospaceFontAssumptions(){let e=-1,t=-1,i=this._visibleLines.getStartLineNumber(),n=this._visibleLines.getEndLineNumber();for(let s=i;s<=n;s++){let i=this._visibleLines.getVisibleLine(s);if(i.needsMonospaceFontCheck()){let n=i.getWidth(null);n>t&&(t=n,e=s)}}if(-1!==e&&!this._visibleLines.getVisibleLine(e).monospaceAssumptionsAreValid())for(let e=i;e<=n;e++)this._visibleLines.getVisibleLine(e).onMonospaceAssumptionsInvalidated()}prepareRender(){throw Error("Not supported")}render(){throw Error("Not supported")}renderText(e){if(this._visibleLines.renderLines(e),this._lastRenderedData.setCurrentVisibleRange(e.visibleRange),this.domNode.setWidth(this._context.viewLayout.getScrollWidth()),this.domNode.setHeight(Math.min(this._context.viewLayout.getScrollHeight(),1e6)),this._horizontalRevealRequest){let t=this._horizontalRevealRequest;if(e.startLineNumber<=t.minLineNumber&&t.maxLineNumber<=e.endLineNumber){this._horizontalRevealRequest=null,this.onDidRender();let e=this._computeScrollLeftToReveal(t);e&&(this._isViewportWrapping||e.hasRTL||this._ensureMaxLineWidth(e.maxHorizontalOffset),this._context.viewModel.viewLayout.setScrollPosition({scrollLeft:e.scrollLeft},t.scrollType))}}if(this._updateLineWidthsFast()?this._asyncUpdateLineWidths.cancel():this._asyncUpdateLineWidths.schedule(),I.j9&&!this._asyncCheckMonospaceFontAssumptions.isScheduled()){let e=this._visibleLines.getStartLineNumber(),t=this._visibleLines.getEndLineNumber();for(let i=e;i<=t;i++)if(this._visibleLines.getVisibleLine(i).needsMonospaceFontCheck()){this._asyncCheckMonospaceFontAssumptions.schedule();break}}this._linesContent.setLayerHinting(this._canUseLayerHinting),this._linesContent.setContain("strict");let t=this._context.viewLayout.getCurrentScrollTop()-e.bigNumbersDelta;this._linesContent.setTop(-t),this._linesContent.setLeft(-this._context.viewLayout.getCurrentScrollLeft())}_ensureMaxLineWidth(e){let t=Math.ceil(e);this._maxLineWidth<t&&(this._maxLineWidth=t,this._context.viewModel.viewLayout.setMaxLineWidth(this._maxLineWidth))}_computeScrollTopToRevealRange(e,t,i,n,s,o){let r,a,l,h,d=e.top,c=e.height,u=d+c;if(s&&s.length>0){let e=s[0].startLineNumber,t=s[0].endLineNumber;for(let i=1,n=s.length;i<n;i++){let n=s[i];e=Math.min(e,n.startLineNumber),t=Math.max(t,n.endLineNumber)}r=!1,a=this._context.viewLayout.getVerticalOffsetForLineNumber(e),l=this._context.viewLayout.getVerticalOffsetForLineNumber(t)+this._lineHeight}else{if(!n)return -1;r=!0,a=this._context.viewLayout.getVerticalOffsetForLineNumber(n.startLineNumber),l=this._context.viewLayout.getVerticalOffsetForLineNumber(n.endLineNumber)+this._lineHeight}let g=("mouse"===t||i)&&"default"===this._cursorSurroundingLinesStyle,p=0,m=0;if(g)i||(p=this._lineHeight);else{let e=Math.min(c/this._lineHeight/2,Math.max(this._cursorSurroundingLines,this._stickyScrollEnabled?this._maxNumberStickyLines:0));p=e*this._lineHeight,m=Math.max(0,e-1)*this._lineHeight}if(i||0!==o&&4!==o||(m+=this._lineHeight),a-=p,(l+=m)-a>c){if(!r)return -1;h=a}else if(5===o||6===o)if(6===o&&d<=a&&l<=u)h=d;else{let e=a-Math.max(5*this._lineHeight,.2*c);h=Math.max(l-c,e)}else h=1===o||2===o?2===o&&d<=a&&l<=u?d:Math.max(0,(a+l)/2-c/2):this._computeMinimumScrolling(d,u,a,l,3===o,4===o);return h}_computeScrollLeftToReveal(e){let t=this._context.viewLayout.getCurrentViewport(),i=this._context.configuration.options.get(165),n=t.left,s=n+t.width-i.verticalScrollbarWidth,o=0x40000000,r=0,a=!1;if("range"===e.type){a=this._lineIsRenderedRTL(e.lineNumber);let t=this._visibleRangesForLineRange(e.lineNumber,e.startColumn,e.endColumn);if(!t)return null;for(let e of t.ranges)o=Math.min(o,Math.round(e.left)),r=Math.max(r,Math.round(e.left+e.width))}else for(let t of e.selections){if(t.startLineNumber!==t.endLineNumber)return null;let e=this._visibleRangesForLineRange(t.startLineNumber,t.startColumn,t.endColumn);if(a||=this._lineIsRenderedRTL(t.startLineNumber),!e)return null;for(let t of e.ranges)o=Math.min(o,Math.round(t.left)),r=Math.max(r,Math.round(t.left+t.width))}return(e.minimalReveal||(o=Math.max(0,o-tR.HORIZONTAL_EXTRA_PX),r+=this._revealHorizontalRightPadding),"selections"===e.type&&r-o>t.width)?null:{scrollLeft:this._computeMinimumScrolling(n,s,o,r),maxHorizontalOffset:r,hasRTL:a}}_computeMinimumScrolling(e,t,i,n,s,o){e|=0,t|=0,i|=0,n|=0,s=!!s,o=!!o;let r=t-e;return!(n-i<r)||s?i:o?Math.max(0,n-r):i<e?i:n>t?Math.max(0,n-r):e}}i(72673);class tO extends tf{constructor(e){super(),this._context=e;let t=this._context.configuration.options.get(165);this._decorationsLeft=t.decorationsLeft,this._decorationsWidth=t.decorationsWidth,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){let t=this._context.configuration.options.get(165);return this._decorationsLeft=t.decorationsLeft,this._decorationsWidth=t.decorationsWidth,!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}_getDecorations(e){let t=e.getDecorationsInViewport(),i=[],n=0;for(let e=0,s=t.length;e<s;e++){let s=t[e],o=s.options.linesDecorationsClassName,r=s.options.zIndex;o&&(i[n++]=new tg(s.range.startLineNumber,s.range.endLineNumber,o,s.options.linesDecorationsTooltip??null,r));let a=s.options.firstLineDecorationClassName;a&&(i[n++]=new tg(s.range.startLineNumber,s.range.startLineNumber,a,s.options.linesDecorationsTooltip??null,r))}return i}prepareRender(e){let t=e.visibleRange.startLineNumber,i=e.visibleRange.endLineNumber,n=this._render(t,i,this._getDecorations(e)),s='" style="left:'+this._decorationsLeft.toString()+"px;width:"+this._decorationsWidth.toString()+'px;"></div>',o=[];for(let e=t;e<=i;e++){let i=e-t,r=n[i].getDecorations(),a="";for(let e of r){let t='<div class="cldr '+e.className;null!==e.tooltip&&(t+='" title="'+e.tooltip),t+=s,a+=t}o[i]=a}this._renderResult=o}render(e,t){return this._renderResult?this._renderResult[t-e]:""}}i(321);class tP extends Z{static{this.CLASS_NAME="glyph-margin"}static{this.OUTER_CLASS_NAME="margin"}constructor(e){super(e);let t=this._context.configuration.options,i=t.get(165);this._canUseLayerHinting=!t.get(39),this._contentLeft=i.contentLeft,this._glyphMarginLeft=i.glyphMarginLeft,this._glyphMarginWidth=i.glyphMarginWidth,this._domNode=(0,q.Z)(document.createElement("div")),this._domNode.setClassName(tP.OUTER_CLASS_NAME),this._domNode.setPosition("absolute"),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true"),this._glyphMarginBackgroundDomNode=(0,q.Z)(document.createElement("div")),this._glyphMarginBackgroundDomNode.setClassName(tP.CLASS_NAME),this._domNode.appendChild(this._glyphMarginBackgroundDomNode)}dispose(){super.dispose()}getDomNode(){return this._domNode}onConfigurationChanged(e){let t=this._context.configuration.options,i=t.get(165);return this._canUseLayerHinting=!t.get(39),this._contentLeft=i.contentLeft,this._glyphMarginLeft=i.glyphMarginLeft,this._glyphMarginWidth=i.glyphMarginWidth,!0}onScrollChanged(e){return super.onScrollChanged(e)||e.scrollTopChanged}prepareRender(e){}render(e){this._domNode.setLayerHinting(this._canUseLayerHinting),this._domNode.setContain("strict");let t=e.scrollTop-e.bigNumbersDelta;this._domNode.setTop(-t);let i=Math.min(e.scrollHeight,1e6);this._domNode.setHeight(i),this._domNode.setWidth(this._contentLeft),this._glyphMarginBackgroundDomNode.setLeft(this._glyphMarginLeft),this._glyphMarginBackgroundDomNode.setWidth(this._glyphMarginWidth),this._glyphMarginBackgroundDomNode.setHeight(i)}}i(60867);class tA extends tf{constructor(e){super(),this._context=e,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){return!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}_getDecorations(e){let t=e.getDecorationsInViewport(),i=[],n=0;for(let e=0,s=t.length;e<s;e++){let s=t[e],o=s.options.marginClassName,r=s.options.zIndex;o&&(i[n++]=new tg(s.range.startLineNumber,s.range.endLineNumber,o,null,r))}return i}prepareRender(e){let t=e.visibleRange.startLineNumber,i=e.visibleRange.endLineNumber,n=this._render(t,i,this._getDecorations(e)),s=[];for(let e=t;e<=i;e++){let i=e-t,o=n[i].getDecorations(),r="";for(let e of o)r+='<div class="cmdr '+e.className+'" style=""></div>';s[i]=r}this._renderResult=s}render(e,t){return this._renderResult?this._renderResult[t-e]:""}}i(42975);var tF=i(76144);class tB{static{this.Empty=new tB(0,0,0,0)}constructor(e,t,i,n){this._rgba8Brand=void 0,this.r=tB._clamp(e),this.g=tB._clamp(t),this.b=tB._clamp(i),this.a=tB._clamp(n)}equals(e){return this.r===e.r&&this.g===e.g&&this.b===e.b&&this.a===e.a}static _clamp(e){return e<0?0:e>255?255:0|e}}var tW=i(993);class tH extends y.jG{static{this._INSTANCE=null}static getInstance(){return this._INSTANCE||(this._INSTANCE=(0,y.lC)(new tH)),this._INSTANCE}constructor(){super(),this._onDidChange=new w.vl,this.onDidChange=this._onDidChange.event,this._updateColorMap(),this._register(tW.dG.onDidChange(e=>{e.changedColorMap&&this._updateColorMap()}))}_updateColorMap(){let e=tW.dG.getColorMap();if(!e){this._colors=[tB.Empty],this._backgroundIsLight=!0;return}this._colors=[tB.Empty];for(let t=1;t<e.length;t++){let i=e[t].rgba;this._colors[t]=new tB(i.r,i.g,i.b,Math.round(255*i.a))}let t=e[2].getRelativeLuminance();this._backgroundIsLight=t>=.5,this._onDidChange.fire(void 0)}getColor(e){return(e<1||e>=this._colors.length)&&(e=2),this._colors[e]}backgroundIsLight(){return this._backgroundIsLight}}var tV=i(77715);let tz=(()=>{let e=[];for(let t=32;t<=126;t++)e.push(t);return e.push(65533),e})();var tU=i(84474);class tj{constructor(e,t){this.scale=t,this._minimapCharRendererBrand=void 0,this.charDataNormal=tj.soften(e,.8),this.charDataLight=tj.soften(e,50/60)}static soften(e,t){let i=new Uint8ClampedArray(e.length);for(let n=0,s=e.length;n<s;n++)i[n]=(0,tU.W)(e[n]*t);return i}renderChar(e,t,i,n,s,o,r,a,l,h,d){var c,u;let g=+this.scale,p=2*this.scale,m=d?1:p;if(t+g>e.width||i+m>e.height)return void console.warn("bad render request outside image data");let f=h?this.charDataLight:this.charDataNormal,_=(c=n,u=l,(c-=32)<0||c>96?u<=2?(c+96)%96:95:c),v=4*e.width,b=r.r,C=r.g,w=r.b,y=s.r-b,S=s.g-C,k=s.b-w,x=Math.max(o,a),L=e.data,D=_*g*p,I=i*v+4*t;for(let e=0;e<m;e++){let e=I;for(let t=0;t<g;t++){let t=f[D++]/255*(o/255);L[e++]=b+y*t,L[e++]=C+S*t,L[e++]=w+k*t,L[e++]=x}I+=v}}blockRenderChar(e,t,i,n,s,o,r,a){let l=+this.scale,h=2*this.scale,d=a?1:h;if(t+l>e.width||i+d>e.height)return void console.warn("bad render request outside image data");let c=4*e.width,u=s/255*.5,g=o.r,p=o.g,m=o.b,f=n.r-g,_=n.g-p,v=n.b-m,b=g+f*u,C=p+_*u,w=m+v*u,y=Math.max(s,r),S=e.data,k=i*c+4*t;for(let e=0;e<d;e++){let e=k;for(let t=0;t<l;t++)S[e++]=b,S[e++]=C,S[e++]=w,S[e++]=y;k+=c}}}var t$=i(20643);let tK={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15},tG=e=>{let t=new Uint8ClampedArray(e.length/2);for(let i=0;i<e.length;i+=2)t[i>>1]=tK[e[i]]<<4|15&tK[e[i+1]];return t},tq={1:(0,t$.P)(()=>tG("0000511D6300CF609C709645A78432005642574171487021003C451900274D35D762755E8B629C5BA856AF57BA649530C167D1512A272A3F6038604460398526BCA2A968DB6F8957C768BE5FBE2FB467CF5D8D5B795DC7625B5DFF50DE64C466DB2FC47CD860A65E9A2EB96CB54CE06DA763AB2EA26860524D3763536601005116008177A8705E53AB738E6A982F88BAA35B5F5B626D9C636B449B737E5B7B678598869A662F6B5B8542706C704C80736A607578685B70594A49715A4522E792")),2:(0,t$.P)(()=>tG("000000000000000055394F383D2800008B8B1F210002000081B1CBCBCC820000847AAF6B9AAF2119BE08B8881AD60000A44FD07DCCF107015338130C00000000385972265F390B406E2437634B4B48031B12B8A0847000001E15B29A402F0000000000004B33460B00007A752C2A0000000000004D3900000084394B82013400ABA5CFC7AD9C0302A45A3E5A98AB000089A43382D97900008BA54AA087A70A0248A6A7AE6DBE0000BF6F94987EA40A01A06DCFA7A7A9030496C32F77891D0000A99FB1A0AFA80603B29AB9CA75930D010C0948354D3900000C0948354F37460D0028BE673D8400000000AF9D7B6E00002B007AA8933400007AA642675C2700007984CFB9C3985B768772A8A6B7B20000CAAECAAFC4B700009F94A6009F840009D09F9BA4CA9C0000CC8FC76DC87F0000C991C472A2000000A894A48CA7B501079BA2C9C69BA20000B19A5D3FA89000005CA6009DA2960901B0A7F0669FB200009D009E00B7890000DAD0F5D092820000D294D4C48BD10000B5A7A4A3B1A50402CAB6CBA6A2000000B5A7A4A3B1A8044FCDADD19D9CB00000B7778F7B8AAE0803C9AB5D3F5D3F00009EA09EA0BAB006039EA0989A8C7900009B9EF4D6B7C00000A9A7816CACA80000ABAC84705D3F000096DA635CDC8C00006F486F266F263D4784006124097B00374F6D2D6D2D6D4A3A95872322000000030000000000008D8939130000000000002E22A5C9CBC70600AB25C0B5C9B400061A2DB04CA67001082AA6BEBEBFC606002321DACBC19E03087AA08B6768380000282FBAC0B8CA7A88AD25BBA5A29900004C396C5894A6000040485A6E356E9442A32CD17EADA70000B4237923628600003E2DE9C1D7B500002F25BBA5A2990000231DB6AFB4A804023025C0B5CAB588062B2CBDBEC0C706882435A75CA20000002326BD6A82A908048B4B9A5A668000002423A09CB4BB060025259C9D8A7900001C1FCAB2C7C700002A2A9387ABA200002626A4A47D6E9D14333163A0C87500004B6F9C2D643A257049364936493647358A34438355497F1A0000A24C1D590000D38DFFBDD4CD3126"))};class tQ{static create(e,t){let i;return this.lastCreated&&e===this.lastCreated.scale&&t===this.lastFontFamily?this.lastCreated:(i=tq[e]?new tj(tq[e](),e):tQ.createFromSampleData(tQ.createSampleData(t).data,e),this.lastFontFamily=t,this.lastCreated=i,i)}static createSampleData(e){let t=document.createElement("canvas"),i=t.getContext("2d");t.style.height="16px",t.height=16,t.width=960,t.style.width="960px",i.fillStyle="#ffffff",i.font=`bold 16px ${e}`,i.textBaseline="middle";let n=0;for(let e of tz)i.fillText(String.fromCharCode(e),n,8),n+=10;return i.getImageData(0,0,960,16)}static createFromSampleData(e,t){if(61440!==e.length)throw Error("Unexpected source in MinimapCharRenderer");return new tj(tQ._downsample(e,t),t)}static _downsampleChar(e,t,i,n,s){let o=+s,r=2*s,a=n,l=0;for(let n=0;n<r;n++){let s=n/r*16,h=(n+1)/r*16;for(let n=0;n<o;n++){let r=n/o*10,d=(n+1)/o*10,c=0,u=0;for(let i=s;i<h;i++){let n=t+3840*Math.floor(i),s=1-(i-Math.floor(i));for(let t=r;t<d;t++){let i=1-(t-Math.floor(t)),o=n+4*Math.floor(t),r=i*s;u+=r,c+=e[o]*e[o+3]/255*r}}let g=c/u;l=Math.max(l,g),i[a++]=(0,tU.W)(g)}}return l}static _downsample(e,t){let i=2*t*1*t,n=96*i,s=new Uint8ClampedArray(n),o=0,r=0,a=0;for(let n=0;n<96;n++)a=Math.max(a,this._downsampleChar(e,r,s,o,t)),o+=i,r+=40;if(a>0){let e=255/a;for(let t=0;t<n;t++)s[t]*=e}return s}}var tY=i(47108);let tZ=I.uF?'"Segoe WPC", "Segoe UI", sans-serif':I.zx?"-apple-system, BlinkMacSystemFont, sans-serif":'system-ui, "Ubuntu", "Droid Sans", sans-serif';var tX=i(31799);class tJ{constructor(e,t,i){let n=e.options,s=n.get(163),o=n.get(165),r=o.minimap,a=n.get(59),l=n.get(81);this.renderMinimap=r.renderMinimap,this.size=l.size,this.minimapHeightIsEditorHeight=r.minimapHeightIsEditorHeight,this.scrollBeyondLastLine=n.get(119),this.paddingTop=n.get(96).top,this.paddingBottom=n.get(96).bottom,this.showSlider=l.showSlider,this.autohide=l.autohide,this.pixelRatio=s,this.typicalHalfwidthCharacterWidth=a.typicalHalfwidthCharacterWidth,this.lineHeight=n.get(75),this.minimapLeft=r.minimapLeft,this.minimapWidth=r.minimapWidth,this.minimapHeight=o.height,this.canvasInnerWidth=r.minimapCanvasInnerWidth,this.canvasInnerHeight=r.minimapCanvasInnerHeight,this.canvasOuterWidth=r.minimapCanvasOuterWidth,this.canvasOuterHeight=r.minimapCanvasOuterHeight,this.isSampling=r.minimapIsSampling,this.editorHeight=o.height,this.fontScale=r.minimapScale,this.minimapLineHeight=r.minimapLineHeight,this.minimapCharWidth=+this.fontScale,this.sectionHeaderFontFamily=tZ,this.sectionHeaderFontSize=l.sectionHeaderFontSize*s,this.sectionHeaderLetterSpacing=l.sectionHeaderLetterSpacing,this.sectionHeaderFontColor=tJ._getSectionHeaderColor(t,i.getColor(1)),this.charRenderer=(0,t$.P)(()=>tQ.create(this.fontScale,a.fontFamily)),this.defaultBackgroundColor=i.getColor(2),this.backgroundColor=tJ._getMinimapBackground(t,this.defaultBackgroundColor),this.foregroundAlpha=tJ._getMinimapForegroundOpacity(t)}static _getMinimapBackground(e,t){let i=e.getColor(tV.ILr);return i?new tB(i.rgba.r,i.rgba.g,i.rgba.b,Math.round(255*i.rgba.a)):t}static _getMinimapForegroundOpacity(e){let t=e.getColor(tV.K1Z);return t?tB._clamp(Math.round(255*t.rgba.a)):255}static _getSectionHeaderColor(e,t){let i=e.getColor(tV.By2);return i?new tB(i.rgba.r,i.rgba.g,i.rgba.b,Math.round(255*i.rgba.a)):t}equals(e){return this.renderMinimap===e.renderMinimap&&this.size===e.size&&this.minimapHeightIsEditorHeight===e.minimapHeightIsEditorHeight&&this.scrollBeyondLastLine===e.scrollBeyondLastLine&&this.paddingTop===e.paddingTop&&this.paddingBottom===e.paddingBottom&&this.showSlider===e.showSlider&&this.autohide===e.autohide&&this.pixelRatio===e.pixelRatio&&this.typicalHalfwidthCharacterWidth===e.typicalHalfwidthCharacterWidth&&this.lineHeight===e.lineHeight&&this.minimapLeft===e.minimapLeft&&this.minimapWidth===e.minimapWidth&&this.minimapHeight===e.minimapHeight&&this.canvasInnerWidth===e.canvasInnerWidth&&this.canvasInnerHeight===e.canvasInnerHeight&&this.canvasOuterWidth===e.canvasOuterWidth&&this.canvasOuterHeight===e.canvasOuterHeight&&this.isSampling===e.isSampling&&this.editorHeight===e.editorHeight&&this.fontScale===e.fontScale&&this.minimapLineHeight===e.minimapLineHeight&&this.minimapCharWidth===e.minimapCharWidth&&this.sectionHeaderFontSize===e.sectionHeaderFontSize&&this.sectionHeaderLetterSpacing===e.sectionHeaderLetterSpacing&&this.defaultBackgroundColor&&this.defaultBackgroundColor.equals(e.defaultBackgroundColor)&&this.backgroundColor&&this.backgroundColor.equals(e.backgroundColor)&&this.foregroundAlpha===e.foregroundAlpha}}class t0{constructor(e,t,i,n,s,o,r,a,l){this.scrollTop=e,this.scrollHeight=t,this.sliderNeeded=i,this._computedSliderRatio=n,this.sliderTop=s,this.sliderHeight=o,this.topPaddingLineCount=r,this.startLineNumber=a,this.endLineNumber=l}getDesiredScrollTopFromDelta(e){return Math.round(this.scrollTop+e/this._computedSliderRatio)}getDesiredScrollTopFromTouchLocation(e){return Math.round((e-this.sliderHeight/2)/this._computedSliderRatio)}intersectWithViewport(e){let t=Math.max(this.startLineNumber,e.startLineNumber),i=Math.min(this.endLineNumber,e.endLineNumber);return t>i?null:[t,i]}getYForLineNumber(e,t){return(e-this.startLineNumber+this.topPaddingLineCount)*t}static create(e,t,i,n,s,o,r,a,l,h,d){let c,u,g=e.pixelRatio,p=e.minimapLineHeight,m=Math.floor(e.canvasInnerHeight/p),f=e.lineHeight;if(e.minimapHeightIsEditorHeight){let t=a*e.lineHeight+e.paddingTop+e.paddingBottom;e.scrollBeyondLastLine&&(t+=Math.max(0,s-e.lineHeight-e.paddingBottom));let i=Math.max(1,Math.floor(s*s/t)),n=Math.max(0,e.minimapHeight-i),o=n/(h-s),d=Math.floor(e.canvasInnerHeight/e.minimapLineHeight);return new t0(l,h,n>0,o,l*o,i,Math.floor(e.paddingTop/e.lineHeight),1,Math.min(r,d))}c=o&&i!==r?Math.floor((i-t+1)*p/g):Math.floor(s/f*p/g);let _=Math.floor(e.paddingTop/f),v=Math.floor(e.paddingBottom/f);e.scrollBeyondLastLine&&(v=Math.max(v,s/f-1)),u=v>0?(_+r+v-s/f-1)*p/g:Math.max(0,(_+r)*p/g-c);let b=(u=Math.min(e.minimapHeight-c,u))/(h-s),C=l*b;if(m>=_+r+v)return new t0(l,h,u>0,b,C,c,_,1,r);{let i,s,o=Math.max(1,Math.floor((t>1?t+_:Math.max(1,l/f))-C*g/p));o<_?(i=_-o+1,o=1):(i=0,o=Math.max(1,o-_)),d&&d.scrollHeight===h&&(d.scrollTop>l&&(o=Math.min(o,d.startLineNumber),i=Math.max(i,d.topPaddingLineCount)),d.scrollTop<l&&(o=Math.max(o,d.startLineNumber),i=Math.min(i,d.topPaddingLineCount)));let a=Math.min(r,o-i+m-1),u=(l-n)/f;return s=l>=e.paddingTop?(t-o+i+u)*p/g:l/e.paddingTop*(i+u)*p/g,new t0(l,h,!0,b,s,c,i,o,a)}}}class t1{static{this.INVALID=new t1(-1)}constructor(e){this.dy=e}onContentChanged(){this.dy=-1}onTokensChanged(){this.dy=-1}}class t2{constructor(e,t,i){this.renderedLayout=e,this._imageData=t,this._renderedLines=new eJ({createLine:()=>t1.INVALID}),this._renderedLines._set(e.startLineNumber,i)}linesEquals(e){if(!this.scrollEquals(e))return!1;let t=this._renderedLines._get().lines;for(let e=0,i=t.length;e<i;e++)if(-1===t[e].dy)return!1;return!0}scrollEquals(e){return this.renderedLayout.startLineNumber===e.startLineNumber&&this.renderedLayout.endLineNumber===e.endLineNumber}_get(){let e=this._renderedLines._get();return{imageData:this._imageData,rendLineNumberStart:e.rendLineNumberStart,lines:e.lines}}onLinesChanged(e,t){return this._renderedLines.onLinesChanged(e,t)}onLinesDeleted(e,t){this._renderedLines.onLinesDeleted(e,t)}onLinesInserted(e,t){this._renderedLines.onLinesInserted(e,t)}onTokensChanged(e){return this._renderedLines.onTokensChanged(e)}}class t5{constructor(e,t,i,n){this._backgroundFillData=t5._createBackgroundFillData(t,i,n),this._buffers=[e.createImageData(t,i),e.createImageData(t,i)],this._lastUsedBuffer=0}getBuffer(){this._lastUsedBuffer=1-this._lastUsedBuffer;let e=this._buffers[this._lastUsedBuffer];return e.data.set(this._backgroundFillData),e}static _createBackgroundFillData(e,t,i){let n=i.r,s=i.g,o=i.b,r=i.a,a=new Uint8ClampedArray(e*t*4),l=0;for(let i=0;i<t;i++)for(let t=0;t<e;t++)a[l]=n,a[l+1]=s,a[l+2]=o,a[l+3]=r,l+=4;return a}}class t4{static compute(e,t,i){if(0===e.renderMinimap||!e.isSampling)return[null,[]];let{minimapLineCount:n}=A.xZ.computeContainedMinimapLineCount({viewLineCount:t,scrollBeyondLastLine:e.scrollBeyondLastLine,paddingTop:e.paddingTop,paddingBottom:e.paddingBottom,height:e.editorHeight,lineHeight:e.lineHeight,pixelRatio:e.pixelRatio}),s=t/n,o=s/2;if(!i||0===i.minimapLines.length){let e=[];if(e[0]=1,n>1){for(let t=0,i=n-1;t<i;t++)e[t]=Math.round(t*s+o);e[n-1]=t}return[new t4(s,e),[]]}let r=i.minimapLines,a=r.length,l=[],h=0,d=0,c=1,u=[],g=null;for(let e=0;e<n;e++){let i,p=Math.max(c,Math.round(e*s)),m=Math.max(p,Math.round((e+1)*s));for(;h<a&&r[h]<p;){if(u.length<10){let e=h+1+d;g&&"deleted"===g.type&&g._oldIndex===h-1?g.deleteToLineNumber++:(g={type:"deleted",_oldIndex:h,deleteFromLineNumber:e,deleteToLineNumber:e},u.push(g)),d--}h++}if(h<a&&r[h]<=m)i=r[h],h++;else if(i=0===e?1:e+1===n?t:Math.round(e*s+o),u.length<10){let t=h+1+d;g&&"inserted"===g.type&&g._i===e-1?g.insertToLineNumber++:(g={type:"inserted",_i:e,insertFromLineNumber:t,insertToLineNumber:t},u.push(g)),d++}l[e]=i,c=i}if(u.length<10)for(;h<a;){let e=h+1+d;g&&"deleted"===g.type&&g._oldIndex===h-1?g.deleteToLineNumber++:(g={type:"deleted",_oldIndex:h,deleteFromLineNumber:e,deleteToLineNumber:e},u.push(g)),d--,h++}else u=[{type:"flush"}];return[new t4(s,l),u]}constructor(e,t){this.samplingRatio=e,this.minimapLines=t}modelLineToMinimapLine(e){return Math.min(this.minimapLines.length,Math.max(1,Math.round(e/this.samplingRatio)))}modelLineRangeToMinimapLineRange(e,t){let i=this.modelLineToMinimapLine(e)-1;for(;i>0&&this.minimapLines[i-1]>=e;)i--;let n=this.modelLineToMinimapLine(t)-1;for(;n+1<this.minimapLines.length&&this.minimapLines[n+1]<=t;)n++;if(i===n){let n=this.minimapLines[i];if(n<e||n>t)return null}return[i+1,n+1]}decorationLineRangeToMinimapLineRange(e,t){let i=this.modelLineToMinimapLine(e),n=this.modelLineToMinimapLine(t);return e!==t&&n===i&&(n===this.minimapLines.length?i>1&&i--:n++),[i,n]}onLinesDeleted(e){let t=e.toLineNumber-e.fromLineNumber+1,i=this.minimapLines.length,n=0;for(let s=this.minimapLines.length-1;s>=0&&!(this.minimapLines[s]<e.fromLineNumber);s--)this.minimapLines[s]<=e.toLineNumber?(this.minimapLines[s]=Math.max(1,e.fromLineNumber-1),i=Math.min(i,s),n=Math.max(n,s)):this.minimapLines[s]-=t;return[i,n]}onLinesInserted(e){let t=e.toLineNumber-e.fromLineNumber+1;for(let i=this.minimapLines.length-1;i>=0&&!(this.minimapLines[i]<e.fromLineNumber);i--)this.minimapLines[i]+=t}}class t3 extends Z{constructor(e){super(e),this._sectionHeaderCache=new tY.qK(10,1.5),this.tokensColorTracker=tH.getInstance(),this._selections=[],this._minimapSelections=null,this.options=new tJ(this._context.configuration,this._context.theme,this.tokensColorTracker);let[t]=t4.compute(this.options,this._context.viewModel.getLineCount(),null);this._samplingState=t,this._shouldCheckSampling=!1,this._actual=new t7(e.theme,this)}dispose(){this._actual.dispose(),super.dispose()}getDomNode(){return this._actual.getDomNode()}_onOptionsMaybeChanged(){let e=new tJ(this._context.configuration,this._context.theme,this.tokensColorTracker);return!this.options.equals(e)&&(this.options=e,this._recreateLineSampling(),this._actual.onDidChangeOptions(),!0)}onConfigurationChanged(e){return this._onOptionsMaybeChanged()}onCursorStateChanged(e){return this._selections=e.selections,this._minimapSelections=null,this._actual.onSelectionChanged()}onDecorationsChanged(e){return!!e.affectsMinimap&&this._actual.onDecorationsChanged()}onFlushed(e){return this._samplingState&&(this._shouldCheckSampling=!0),this._actual.onFlushed()}onLinesChanged(e){if(!this._samplingState)return this._actual.onLinesChanged(e.fromLineNumber,e.count);{let t=this._samplingState.modelLineRangeToMinimapLineRange(e.fromLineNumber,e.fromLineNumber+e.count-1);return!!t&&this._actual.onLinesChanged(t[0],t[1]-t[0]+1)}}onLinesDeleted(e){if(!this._samplingState)return this._actual.onLinesDeleted(e.fromLineNumber,e.toLineNumber);{let[t,i]=this._samplingState.onLinesDeleted(e);return t<=i&&this._actual.onLinesChanged(t+1,i-t+1),this._shouldCheckSampling=!0,!0}}onLinesInserted(e){return this._samplingState?(this._samplingState.onLinesInserted(e),this._shouldCheckSampling=!0,!0):this._actual.onLinesInserted(e.fromLineNumber,e.toLineNumber)}onScrollChanged(e){return this._actual.onScrollChanged(e)}onThemeChanged(e){return this._actual.onThemeChanged(),this._onOptionsMaybeChanged(),!0}onTokensChanged(e){if(!this._samplingState)return this._actual.onTokensChanged(e.ranges);{let t=[];for(let i of e.ranges){let e=this._samplingState.modelLineRangeToMinimapLineRange(i.fromLineNumber,i.toLineNumber);e&&t.push({fromLineNumber:e[0],toLineNumber:e[1]})}return!!t.length&&this._actual.onTokensChanged(t)}}onTokensColorsChanged(e){return this._onOptionsMaybeChanged(),this._actual.onTokensColorsChanged()}onZonesChanged(e){return this._actual.onZonesChanged()}prepareRender(e){this._shouldCheckSampling&&(this._shouldCheckSampling=!1,this._recreateLineSampling())}render(e){let t=e.visibleRange.startLineNumber,i=e.visibleRange.endLineNumber;this._samplingState&&(t=this._samplingState.modelLineToMinimapLine(t),i=this._samplingState.modelLineToMinimapLine(i));let n={viewportContainsWhitespaceGaps:e.viewportData.whitespaceViewportData.length>0,scrollWidth:e.scrollWidth,scrollHeight:e.scrollHeight,viewportStartLineNumber:t,viewportEndLineNumber:i,viewportStartLineNumberVerticalOffset:e.getVerticalOffsetForLineNumber(t),scrollTop:e.scrollTop,scrollLeft:e.scrollLeft,viewportWidth:e.viewportWidth,viewportHeight:e.viewportHeight};this._actual.render(n)}_recreateLineSampling(){this._minimapSelections=null;let e=!!this._samplingState,[t,i]=t4.compute(this.options,this._context.viewModel.getLineCount(),this._samplingState);if(this._samplingState=t,e&&this._samplingState)for(let e of i)switch(e.type){case"deleted":this._actual.onLinesDeleted(e.deleteFromLineNumber,e.deleteToLineNumber);break;case"inserted":this._actual.onLinesInserted(e.insertFromLineNumber,e.insertToLineNumber);break;case"flush":this._actual.onFlushed()}}getLineCount(){return this._samplingState?this._samplingState.minimapLines.length:this._context.viewModel.getLineCount()}getRealLineCount(){return this._context.viewModel.getLineCount()}getLineContent(e){return this._samplingState?this._context.viewModel.getLineContent(this._samplingState.minimapLines[e-1]):this._context.viewModel.getLineContent(e)}getLineMaxColumn(e){return this._samplingState?this._context.viewModel.getLineMaxColumn(this._samplingState.minimapLines[e-1]):this._context.viewModel.getLineMaxColumn(e)}getMinimapLinesRenderingData(e,t,i){if(this._samplingState){let n=[];for(let s=0,o=t-e+1;s<o;s++)i[s]?n[s]=this._context.viewModel.getViewLineData(this._samplingState.minimapLines[e+s-1]):n[s]=null;return n}return this._context.viewModel.getMinimapLinesRenderingData(e,t,i).data}getSelections(){if(null===this._minimapSelections)if(this._samplingState)for(let e of(this._minimapSelections=[],this._selections)){let[t,i]=this._samplingState.decorationLineRangeToMinimapLineRange(e.startLineNumber,e.endLineNumber);this._minimapSelections.push(new ey.L(t,e.startColumn,i,e.endColumn))}else this._minimapSelections=this._selections;return this._minimapSelections}getMinimapDecorationsInViewport(e,t){return this._getMinimapDecorationsInViewport(e,t).filter(e=>!e.options.minimap?.sectionHeaderStyle)}getSectionHeaderDecorationsInViewport(e,t){let i=this.options.sectionHeaderFontSize/this.options.minimapLineHeight;return e=Math.floor(Math.max(1,e-i)),this._getMinimapDecorationsInViewport(e,t).filter(e=>!!e.options.minimap?.sectionHeaderStyle)}_getMinimapDecorationsInViewport(e,t){let i;if(this._samplingState){let n=this._samplingState.minimapLines[e-1],s=this._samplingState.minimapLines[t-1];i=new et.Q(n,1,s,this._context.viewModel.getLineMaxColumn(s))}else i=new et.Q(e,1,t,this._context.viewModel.getLineMaxColumn(t));let n=this._context.viewModel.getMinimapDecorationsInRange(i);if(this._samplingState){let e=[];for(let t of n){if(!t.options.minimap)continue;let i=t.range,n=this._samplingState.modelLineToMinimapLine(i.startLineNumber),s=this._samplingState.modelLineToMinimapLine(i.endLineNumber);e.push(new tX.vo(new et.Q(n,i.startColumn,s,i.endColumn),t.options))}return e}return n}getSectionHeaderText(e,t){let i=e.options.minimap?.sectionHeaderText;if(!i)return null;let n=this._sectionHeaderCache.get(i);if(n)return n;let s=t(i);return this._sectionHeaderCache.set(i,s),s}getOptions(){return this._context.viewModel.model.getOptions()}revealLineNumber(e){this._samplingState&&(e=this._samplingState.minimapLines[e-1]),this._context.viewModel.revealRange("mouse",!1,new et.Q(e,1,e,1),1,0)}setScrollTop(e){this._context.viewModel.viewLayout.setScrollPosition({scrollTop:e},1)}}class t7 extends y.jG{constructor(e,t){super(),this._renderDecorations=!1,this._gestureInProgress=!1,this._isMouseOverMinimap=!1,this._theme=e,this._model=t,this._lastRenderData=null,this._buffers=null,this._selectionColor=this._theme.getColor(tV.yr0),this._domNode=(0,q.Z)(document.createElement("div")),X.write(this._domNode,9),this._domNode.setClassName(this._getMinimapDomNodeClassName()),this._domNode.setPosition("absolute"),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true"),this._shadow=(0,q.Z)(document.createElement("div")),this._shadow.setClassName("minimap-shadow-hidden"),this._domNode.appendChild(this._shadow),this._canvas=(0,q.Z)(document.createElement("canvas")),this._canvas.setPosition("absolute"),this._canvas.setLeft(0),this._domNode.appendChild(this._canvas),this._decorationsCanvas=(0,q.Z)(document.createElement("canvas")),this._decorationsCanvas.setPosition("absolute"),this._decorationsCanvas.setClassName("minimap-decorations-layer"),this._decorationsCanvas.setLeft(0),this._domNode.appendChild(this._decorationsCanvas),this._slider=(0,q.Z)(document.createElement("div")),this._slider.setPosition("absolute"),this._slider.setClassName("minimap-slider"),this._slider.setLayerHinting(!0),this._slider.setContain("strict"),this._domNode.appendChild(this._slider),this._sliderHorizontal=(0,q.Z)(document.createElement("div")),this._sliderHorizontal.setPosition("absolute"),this._sliderHorizontal.setClassName("minimap-slider-horizontal"),this._slider.appendChild(this._sliderHorizontal),this._applyLayout(),this._hideDelayedScheduler=this._register(new eP.uC(()=>this._hideImmediatelyIfMouseIsOutside(),500)),this._register(b.un(this._domNode.domNode,b.Bx.MOUSE_OVER,()=>{this._isMouseOverMinimap=!0})),this._register(b.un(this._domNode.domNode,b.Bx.MOUSE_LEAVE,()=>{this._isMouseOverMinimap=!1})),this._pointerDownListener=b.un(this._domNode.domNode,b.Bx.POINTER_DOWN,e=>{e.preventDefault();let t="mouse"===e.pointerType,i=0===e.button;if(0!==this._model.options.renderMinimap&&this._lastRenderData){if("proportional"!==this._model.options.size){if(i&&this._lastRenderData){let t=b.BK(this._slider.domNode),i=t.top+t.height/2;this._startSliderDragging(e,i,this._lastRenderData.renderedLayout)}return}if(i||!t){let t=this._model.options.minimapLineHeight,i=Math.floor(this._model.options.canvasInnerHeight/this._model.options.canvasOuterHeight*e.offsetY/t)+this._lastRenderData.renderedLayout.startLineNumber-this._lastRenderData.renderedLayout.topPaddingLineCount;i=Math.min(i,this._model.getLineCount()),this._model.revealLineNumber(i)}}}),this._sliderPointerMoveMonitor=new tF._,this._sliderPointerDownListener=b.un(this._slider.domNode,b.Bx.POINTER_DOWN,e=>{e.preventDefault(),e.stopPropagation(),0===e.button&&this._lastRenderData&&this._startSliderDragging(e,e.pageY,this._lastRenderData.renderedLayout)}),this._gestureDisposable=eb.q.addTarget(this._domNode.domNode),this._sliderTouchStartListener=b.ko(this._domNode.domNode,eb.B.Start,e=>{e.preventDefault(),e.stopPropagation(),this._lastRenderData&&(this._slider.toggleClassName("active",!0),this._gestureInProgress=!0,this.scrollDueToTouchEvent(e))},{passive:!1}),this._sliderTouchMoveListener=b.ko(this._domNode.domNode,eb.B.Change,e=>{e.preventDefault(),e.stopPropagation(),this._lastRenderData&&this._gestureInProgress&&this.scrollDueToTouchEvent(e)},{passive:!1}),this._sliderTouchEndListener=b.un(this._domNode.domNode,eb.B.End,e=>{e.preventDefault(),e.stopPropagation(),this._gestureInProgress=!1,this._slider.toggleClassName("active",!1)})}_hideSoon(){this._hideDelayedScheduler.cancel(),this._hideDelayedScheduler.schedule()}_hideImmediatelyIfMouseIsOutside(){if(this._isMouseOverMinimap)return void this._hideSoon();this._domNode.toggleClassName("active",!1)}_startSliderDragging(e,t,i){if(!e.target||!(e.target instanceof Element))return;let n=e.pageX;this._slider.toggleClassName("active",!0);let s=(e,s)=>{let o=b.BK(this._domNode.domNode),r=Math.min(Math.abs(s-n),Math.abs(s-o.left),Math.abs(s-o.left-o.width));if(I.uF&&r>140)return void this._model.setScrollTop(i.scrollTop);this._model.setScrollTop(i.getDesiredScrollTopFromDelta(e-t))};e.pageY!==t&&s(e.pageY,n),this._sliderPointerMoveMonitor.startMonitoring(e.target,e.pointerId,e.buttons,e=>s(e.pageY,e.pageX),()=>{this._slider.toggleClassName("active",!1)})}scrollDueToTouchEvent(e){let t=this._domNode.domNode.getBoundingClientRect().top,i=this._lastRenderData.renderedLayout.getDesiredScrollTopFromTouchLocation(e.pageY-t);this._model.setScrollTop(i)}dispose(){this._pointerDownListener.dispose(),this._sliderPointerMoveMonitor.dispose(),this._sliderPointerDownListener.dispose(),this._gestureDisposable.dispose(),this._sliderTouchStartListener.dispose(),this._sliderTouchMoveListener.dispose(),this._sliderTouchEndListener.dispose(),super.dispose()}_getMinimapDomNodeClassName(){let e=["minimap"];return"always"===this._model.options.showSlider?e.push("slider-always"):e.push("slider-mouseover"),"mouseover"===this._model.options.autohide?e.push("minimap-autohide-mouseover"):"scroll"===this._model.options.autohide&&e.push("minimap-autohide-scroll"),e.join(" ")}getDomNode(){return this._domNode}_applyLayout(){this._domNode.setLeft(this._model.options.minimapLeft),this._domNode.setWidth(this._model.options.minimapWidth),this._domNode.setHeight(this._model.options.minimapHeight),this._shadow.setHeight(this._model.options.minimapHeight),this._canvas.setWidth(this._model.options.canvasOuterWidth),this._canvas.setHeight(this._model.options.canvasOuterHeight),this._canvas.domNode.width=this._model.options.canvasInnerWidth,this._canvas.domNode.height=this._model.options.canvasInnerHeight,this._decorationsCanvas.setWidth(this._model.options.canvasOuterWidth),this._decorationsCanvas.setHeight(this._model.options.canvasOuterHeight),this._decorationsCanvas.domNode.width=this._model.options.canvasInnerWidth,this._decorationsCanvas.domNode.height=this._model.options.canvasInnerHeight,this._slider.setWidth(this._model.options.minimapWidth)}_getBuffer(){return!this._buffers&&this._model.options.canvasInnerWidth>0&&this._model.options.canvasInnerHeight>0&&(this._buffers=new t5(this._canvas.domNode.getContext("2d"),this._model.options.canvasInnerWidth,this._model.options.canvasInnerHeight,this._model.options.backgroundColor)),this._buffers?this._buffers.getBuffer():null}onDidChangeOptions(){this._lastRenderData=null,this._buffers=null,this._applyLayout(),this._domNode.setClassName(this._getMinimapDomNodeClassName())}onSelectionChanged(){return this._renderDecorations=!0,!0}onDecorationsChanged(){return this._renderDecorations=!0,!0}onFlushed(){return this._lastRenderData=null,!0}onLinesChanged(e,t){return!!this._lastRenderData&&this._lastRenderData.onLinesChanged(e,t)}onLinesDeleted(e,t){return this._lastRenderData?.onLinesDeleted(e,t),!0}onLinesInserted(e,t){return this._lastRenderData?.onLinesInserted(e,t),!0}onScrollChanged(e){return"scroll"===this._model.options.autohide&&(e.scrollTopChanged||e.scrollHeightChanged)&&(this._domNode.toggleClassName("active",!0),this._hideSoon()),this._renderDecorations=!0,!0}onThemeChanged(){return this._selectionColor=this._theme.getColor(tV.yr0),this._renderDecorations=!0,!0}onTokensChanged(e){return!!this._lastRenderData&&this._lastRenderData.onTokensChanged(e)}onTokensColorsChanged(){return this._lastRenderData=null,this._buffers=null,!0}onZonesChanged(){return this._lastRenderData=null,!0}render(e){if(0===this._model.options.renderMinimap){this._shadow.setClassName("minimap-shadow-hidden"),this._sliderHorizontal.setWidth(0),this._sliderHorizontal.setHeight(0);return}e.scrollLeft+e.viewportWidth>=e.scrollWidth?this._shadow.setClassName("minimap-shadow-hidden"):this._shadow.setClassName("minimap-shadow-visible");let t=t0.create(this._model.options,e.viewportStartLineNumber,e.viewportEndLineNumber,e.viewportStartLineNumberVerticalOffset,e.viewportHeight,e.viewportContainsWhitespaceGaps,this._model.getLineCount(),this._model.getRealLineCount(),e.scrollTop,e.scrollHeight,this._lastRenderData?this._lastRenderData.renderedLayout:null);this._slider.setDisplay(t.sliderNeeded?"block":"none"),this._slider.setTop(t.sliderTop),this._slider.setHeight(t.sliderHeight),this._sliderHorizontal.setLeft(0),this._sliderHorizontal.setWidth(this._model.options.minimapWidth),this._sliderHorizontal.setTop(0),this._sliderHorizontal.setHeight(t.sliderHeight),this.renderDecorations(t),this._lastRenderData=this.renderLines(t)}renderDecorations(e){if(this._renderDecorations){this._renderDecorations=!1;let t=this._model.getSelections();t.sort(et.Q.compareRangesUsingStarts);let i=this._model.getMinimapDecorationsInViewport(e.startLineNumber,e.endLineNumber);i.sort((e,t)=>(e.options.zIndex||0)-(t.options.zIndex||0));let{canvasInnerWidth:n,canvasInnerHeight:s}=this._model.options,o=this._model.options.minimapLineHeight,r=this._model.options.minimapCharWidth,a=this._model.getOptions().tabSize,l=this._decorationsCanvas.domNode.getContext("2d");l.clearRect(0,0,n,s);let h=new t9(e.startLineNumber,e.endLineNumber,!1);this._renderSelectionLineHighlights(l,t,h,e,o),this._renderDecorationsLineHighlights(l,i,h,e,o);let d=new t9(e.startLineNumber,e.endLineNumber,null);this._renderSelectionsHighlights(l,t,d,e,o,a,r,n),this._renderDecorationsHighlights(l,i,d,e,o,a,r,n),this._renderSectionHeaders(e)}}_renderSelectionLineHighlights(e,t,i,n,s){if(!this._selectionColor||this._selectionColor.isTransparent())return;e.fillStyle=this._selectionColor.transparent(.5).toString();let o=0,r=0;for(let a of t){let t=n.intersectWithViewport(a);if(!t)continue;let[l,h]=t;for(let e=l;e<=h;e++)i.set(e,!0);let d=n.getYForLineNumber(l,s),c=n.getYForLineNumber(h,s);r>=d||(r>o&&e.fillRect(A.xq,o,e.canvas.width,r-o),o=d),r=c}r>o&&e.fillRect(A.xq,o,e.canvas.width,r-o)}_renderDecorationsLineHighlights(e,t,i,n,s){let o=new Map;for(let r=t.length-1;r>=0;r--){let a=t[r],l=a.options.minimap;if(!l||1!==l.position)continue;let h=n.intersectWithViewport(a.range);if(!h)continue;let[d,c]=h,u=l.getColor(this._theme.value);if(!u||u.isTransparent())continue;let g=o.get(u.toString());g||(g=u.transparent(.5).toString(),o.set(u.toString(),g)),e.fillStyle=g;for(let t=d;t<=c;t++){if(i.has(t))continue;i.set(t,!0);let o=n.getYForLineNumber(d,s);e.fillRect(A.xq,o,e.canvas.width,s)}}}_renderSelectionsHighlights(e,t,i,n,s,o,r,a){if(!(!this._selectionColor||this._selectionColor.isTransparent()))for(let l of t){let t=n.intersectWithViewport(l);if(!t)continue;let[h,d]=t;for(let t=h;t<=d;t++)this.renderDecorationOnLine(e,i,l,this._selectionColor,n,t,s,s,o,r,a)}}_renderDecorationsHighlights(e,t,i,n,s,o,r,a){for(let l of t){let t=l.options.minimap;if(!t)continue;let h=n.intersectWithViewport(l.range);if(!h)continue;let[d,c]=h,u=t.getColor(this._theme.value);if(!(!u||u.isTransparent()))for(let h=d;h<=c;h++)switch(t.position){case 1:this.renderDecorationOnLine(e,i,l.range,u,n,h,s,s,o,r,a);continue;case 2:{let t=n.getYForLineNumber(h,s);this.renderDecoration(e,u,2,t,2,s);continue}}}}renderDecorationOnLine(e,t,i,n,s,o,r,a,l,h,d){let c=s.getYForLineNumber(o,a);if(c+r<0||c>this._model.options.canvasInnerHeight)return;let{startLineNumber:u,endLineNumber:g}=i,p=u===o?i.startColumn:1,m=g===o?i.endColumn:this._model.getLineMaxColumn(o),f=this.getXOffsetForPosition(t,o,p,l,h,d),_=this.getXOffsetForPosition(t,o,m,l,h,d);this.renderDecoration(e,n,f,c,_-f,r)}getXOffsetForPosition(e,t,i,n,s,o){if(1===i)return A.xq;if((i-1)*s>=o)return o;let r=e.get(t);if(!r){let i=this._model.getLineContent(t);r=[A.xq];let a=A.xq;for(let e=1;e<i.length+1;e++){let t=i.charCodeAt(e-1),l=a+(9===t?n*s:eA.ne(t)?2*s:s);if(l>=o){r[e]=o;break}r[e]=l,a=l}e.set(t,r)}return i-1<r.length?r[i-1]:o}renderDecoration(e,t,i,n,s,o){e.fillStyle=t&&t.toString()||"",e.fillRect(i,n,s,o)}_renderSectionHeaders(e){let t=this._model.options.minimapLineHeight,i=this._model.options.sectionHeaderFontSize,n=this._model.options.sectionHeaderLetterSpacing,s=1.5*i,{canvasInnerWidth:o}=this._model.options,r=this._model.options.backgroundColor,a=`rgb(${r.r} ${r.g} ${r.b} / .7)`,l=this._model.options.sectionHeaderFontColor,h=`rgb(${l.r} ${l.g} ${l.b})`,d=this._decorationsCanvas.domNode.getContext("2d");d.letterSpacing=n+"px",d.font="500 "+i+"px "+this._model.options.sectionHeaderFontFamily,d.strokeStyle=h,d.lineWidth=.4;let c=this._model.getSectionHeaderDecorationsInViewport(e.startLineNumber,e.endLineNumber);c.sort((e,t)=>e.range.startLineNumber-t.range.startLineNumber);let u=t7._fitSectionHeader.bind(null,d,o-A.xq);for(let n of c){let r=e.getYForLineNumber(n.range.startLineNumber,t)+i,l=r-i,c=l+2,g=this._model.getSectionHeaderText(n,u);t7._renderSectionLabel(d,g,n.options.minimap?.sectionHeaderStyle===2,a,h,o,l,s,r,c)}}static _fitSectionHeader(e,t,i){if(!i)return i;let n=e.measureText(i).width,s=e.measureText("…").width;if(n<=t||n<=s)return i;let o=i.length,r=Math.floor((t-s)/(n/i.length))-1,a=Math.ceil(r/2);for(;a>0&&/\s/.test(i[a-1]);)--a;return i.substring(0,a)+"…"+i.substring(o-(r-a))}static _renderSectionLabel(e,t,i,n,s,o,r,a,l,h){t&&(e.fillStyle=n,e.fillRect(0,r,o,a),e.fillStyle=s,e.fillText(t,A.xq,l)),i&&(e.beginPath(),e.moveTo(0,h),e.lineTo(o,h),e.closePath(),e.stroke())}renderLines(e){let t=e.startLineNumber,i=e.endLineNumber,n=this._model.options.minimapLineHeight;if(this._lastRenderData&&this._lastRenderData.linesEquals(e)){let t=this._lastRenderData._get();return new t2(e,t.imageData,t.lines)}let s=this._getBuffer();if(!s)return null;let[o,r,a]=t7._renderUntouchedLines(s,e.topPaddingLineCount,t,i,n,this._lastRenderData),l=this._model.getMinimapLinesRenderingData(t,i,a),h=this._model.getOptions().tabSize,d=this._model.options.defaultBackgroundColor,c=this._model.options.backgroundColor,u=this._model.options.foregroundAlpha,g=this._model.tokensColorTracker,p=g.backgroundIsLight(),m=this._model.options.renderMinimap,f=this._model.options.charRenderer(),_=this._model.options.fontScale,v=this._model.options.minimapCharWidth,b=(1===m?2:3)*_,C=n>b?Math.floor((n-b)/2):0,w=c.a/255,y=new tB(Math.round((c.r-d.r)*w+d.r),Math.round((c.g-d.g)*w+d.g),Math.round((c.b-d.b)*w+d.b),255),S=e.topPaddingLineCount*n,k=[];for(let e=0,o=i-t+1;e<o;e++)a[e]&&t7._renderLine(s,y,c.a,p,m,v,g,u,f,S,C,h,l[e],_,n),k[e]=new t1(S),S+=n;let x=-1===o?0:o,L=-1===r?s.height:r;return this._canvas.domNode.getContext("2d").putImageData(s,0,0,0,x,s.width,L-x),new t2(e,s,k)}static _renderUntouchedLines(e,t,i,n,s,o){let r=[];if(!o){for(let e=0,t=n-i+1;e<t;e++)r[e]=!0;return[-1,-1,r]}let a=o._get(),l=a.imageData.data,h=a.rendLineNumberStart,d=a.lines,c=d.length,u=e.width,g=e.data,p=(n-i+1)*s*u*4,m=-1,f=-1,_=-1,v=-1,b=-1,C=-1,w=t*s;for(let e=i;e<=n;e++){let t=e-i,n=e-h,o=n>=0&&n<c?d[n].dy:-1;if(-1===o){r[t]=!0,w+=s;continue}let a=o*u*4,y=(o+s)*u*4,S=w*u*4,k=(w+s)*u*4;v===a&&C===S?v=y:(-1!==_&&(g.set(l.subarray(_,v),b),-1===m&&0===_&&_===b&&(m=v),-1===f&&v===p&&_===b&&(f=_)),_=a,v=y,b=S),C=k,r[t]=!1,w+=s}return -1!==_&&(g.set(l.subarray(_,v),b),-1===m&&0===_&&_===b&&(m=v),-1===f&&v===p&&_===b&&(f=_)),[-1===m?-1:m/(4*u),-1===f?-1:f/(4*u),r]}static _renderLine(e,t,i,n,s,o,r,a,l,h,d,c,u,g,p){let m=u.content,f=u.tokens,_=e.width-o,v=1===p,b=A.xq,C=0,w=0;for(let u=0,p=f.getCount();u<p;u++){let p=f.getEndOffset(u),y=f.getForeground(u),S=r.getColor(y);for(;C<p;C++){if(b>_)return;let r=m.charCodeAt(C);if(9===r){let e=c-(C+w)%c;w+=e-1,b+=e*o}else if(32===r)b+=o;else{let c=eA.ne(r)?2:1;for(let u=0;u<c;u++)if(2===s?l.blockRenderChar(e,b,h+d,S,a,t,i,v):l.renderChar(e,b,h+d,r,S,a,t,i,g,n,v),(b+=o)>_)return}}}}}class t9{constructor(e,t,i){this._startLineNumber=e,this._endLineNumber=t,this._defaultValue=i,this._values=[];for(let e=0,t=this._endLineNumber-this._startLineNumber+1;e<t;e++)this._values[e]=i}has(e){return this.get(e)!==this._defaultValue}set(e,t){e<this._startLineNumber||e>this._endLineNumber||(this._values[e-this._startLineNumber]=t)}get(e){return e<this._startLineNumber||e>this._endLineNumber?this._defaultValue:this._values[e-this._startLineNumber]}}i(95619);class t8 extends Z{constructor(e,t){super(e),this._viewDomNode=t;let i=this._context.configuration.options.get(165);this._widgets={},this._verticalScrollbarWidth=i.verticalScrollbarWidth,this._minimapWidth=i.minimap.minimapWidth,this._horizontalScrollbarHeight=i.horizontalScrollbarHeight,this._editorHeight=i.height,this._editorWidth=i.width,this._viewDomNodeRect={top:0,left:0,width:0,height:0},this._domNode=(0,q.Z)(document.createElement("div")),X.write(this._domNode,4),this._domNode.setClassName("overlayWidgets"),this.overflowingOverlayWidgetsDomNode=(0,q.Z)(document.createElement("div")),X.write(this.overflowingOverlayWidgetsDomNode,5),this.overflowingOverlayWidgetsDomNode.setClassName("overflowingOverlayWidgets")}dispose(){super.dispose(),this._widgets={}}getDomNode(){return this._domNode}onConfigurationChanged(e){let t=this._context.configuration.options.get(165);return this._verticalScrollbarWidth=t.verticalScrollbarWidth,this._minimapWidth=t.minimap.minimapWidth,this._horizontalScrollbarHeight=t.horizontalScrollbarHeight,this._editorHeight=t.height,this._editorWidth=t.width,!0}_widgetCanOverflow(e){let t=this._context.configuration.options.get(4);return(e.allowEditorOverflow||!1)&&t}addWidget(e){let t=(0,q.Z)(e.getDomNode());this._widgets[e.getId()]={widget:e,preference:null,domNode:t},t.setPosition("absolute"),t.setAttribute("widgetId",e.getId()),this._widgetCanOverflow(e)?this.overflowingOverlayWidgetsDomNode.appendChild(t):this._domNode.appendChild(t),this.setShouldRender(),this._updateMaxMinWidth()}setWidgetPosition(e,t){let i=this._widgets[e.getId()],n=t?t.preference:null,s=t?.stackOridinal;return i.preference===n&&i.stack===s?(this._updateMaxMinWidth(),!1):(i.preference=n,i.stack=s,this.setShouldRender(),this._updateMaxMinWidth(),!0)}removeWidget(e){let t=e.getId();if(this._widgets.hasOwnProperty(t)){let e=this._widgets[t].domNode.domNode;delete this._widgets[t],e.remove(),this.setShouldRender(),this._updateMaxMinWidth()}}_updateMaxMinWidth(){let e=0,t=Object.keys(this._widgets);for(let i=0,n=t.length;i<n;i++){let n=t[i],s=this._widgets[n],o=s.widget.getMinContentWidthInPx?.();void 0!==o&&(e=Math.max(e,o))}this._context.viewLayout.setOverlayWidgetsMinWidth(e)}_renderWidget(e,t){let i=e.domNode;if(null===e.preference)return void i.setTop("");let n=2*this._verticalScrollbarWidth+this._minimapWidth;if(0===e.preference||1===e.preference){if(1===e.preference){let e=i.domNode.clientHeight;i.setTop(this._editorHeight-e-2*this._horizontalScrollbarHeight)}else i.setTop(0);void 0!==e.stack?(i.setTop(t[e.preference]),t[e.preference]+=i.domNode.clientWidth):i.setRight(n)}else if(2===e.preference)i.domNode.style.right="50%",void 0!==e.stack?(i.setTop(t[2]),t[2]+=i.domNode.clientHeight):i.setTop(0);else{let{top:t,left:n}=e.preference;if(this._context.configuration.options.get(51)&&this._widgetCanOverflow(e.widget)){let e=this._viewDomNodeRect;i.setTop(t+e.top),i.setLeft(n+e.left),i.setPosition("fixed")}else i.setTop(t),i.setLeft(n),i.setPosition("absolute")}}prepareRender(e){this._viewDomNodeRect=b.BK(this._viewDomNode.domNode)}render(e){this._domNode.setWidth(this._editorWidth);let t=Object.keys(this._widgets),i=Array.from({length:3},()=>0);t.sort((e,t)=>(this._widgets[e].stack||0)-(this._widgets[t].stack||0));for(let e=0,n=t.length;e<n;e++){let n=t[e];this._renderWidget(this._widgets[n],i)}}}var t6=i(78713),ie=i(57120);class it{constructor(e,t){let i=e.options;this.lineHeight=i.get(75),this.pixelRatio=i.get(163),this.overviewRulerLanes=i.get(95),this.renderBorder=i.get(94);let n=t.getColor(to.x9);this.borderColor=n?n.toString():null,this.hideCursor=i.get(68);let s=t.getColor(to.D0);this.cursorColorSingle=s?s.transparent(.7).toString():null;let o=t.getColor(to.sC);this.cursorColorPrimary=o?o.transparent(.7).toString():null;let r=t.getColor(to.we);this.cursorColorSecondary=r?r.transparent(.7).toString():null,this.themeType=t.type;let a=i.get(81),l=a.enabled,h=a.side,d=t.getColor(to.Xr),c=tW.dG.getDefaultBackground();d?this.backgroundColor=d:l&&"right"===h?this.backgroundColor=c:this.backgroundColor=null;let u=i.get(165).overviewRuler;this.top=u.top,this.right=u.right,this.domWidth=u.width,this.domHeight=u.height,0===this.overviewRulerLanes?(this.canvasWidth=0,this.canvasHeight=0):(this.canvasWidth=this.domWidth*this.pixelRatio|0,this.canvasHeight=this.domHeight*this.pixelRatio|0);let[g,p]=this._initLanes(1,this.canvasWidth,this.overviewRulerLanes);this.x=g,this.w=p}_initLanes(e,t,i){let n=t-e;if(i>=3){let t=Math.floor(n/3),i=Math.floor(n/3),s=n-t-i,o=e+t;return[[0,e,o,e,e+t+s,e,o,e],[0,t,s,t+s,i,t+s+i,s+i,t+s+i]]}if(2!==i)return[[0,e,e,e,e,e,e,e],[0,n,n,n,n,n,n,n]];{let t=Math.floor(n/2),i=n-t;return[[0,e,e,e,e+t,e,e,e],[0,t,t,t,i,t+i,t+i,t+i]]}}equals(e){return this.lineHeight===e.lineHeight&&this.pixelRatio===e.pixelRatio&&this.overviewRulerLanes===e.overviewRulerLanes&&this.renderBorder===e.renderBorder&&this.borderColor===e.borderColor&&this.hideCursor===e.hideCursor&&this.cursorColorSingle===e.cursorColorSingle&&this.cursorColorPrimary===e.cursorColorPrimary&&this.cursorColorSecondary===e.cursorColorSecondary&&this.themeType===e.themeType&&t6.Q1.equals(this.backgroundColor,e.backgroundColor)&&this.top===e.top&&this.right===e.right&&this.domWidth===e.domWidth&&this.domHeight===e.domHeight&&this.canvasWidth===e.canvasWidth&&this.canvasHeight===e.canvasHeight}}class ii extends Z{constructor(e){super(e),this._actualShouldRender=0,this._renderedDecorations=[],this._renderedCursorPositions=[],this._domNode=(0,q.Z)(document.createElement("canvas")),this._domNode.setClassName("decorationsOverviewRuler"),this._domNode.setPosition("absolute"),this._domNode.setLayerHinting(!0),this._domNode.setContain("strict"),this._domNode.setAttribute("aria-hidden","true"),this._updateSettings(!1),this._tokensColorTrackerListener=tW.dG.onDidChange(e=>{e.changedColorMap&&this._updateSettings(!0)}),this._cursorPositions=[{position:new ee.y(1,1),color:this._settings.cursorColorSingle}]}dispose(){super.dispose(),this._tokensColorTrackerListener.dispose()}_updateSettings(e){let t=new it(this._context.configuration,this._context.theme);return!(this._settings&&this._settings.equals(t))&&(this._settings=t,this._domNode.setTop(this._settings.top),this._domNode.setRight(this._settings.right),this._domNode.setWidth(this._settings.domWidth),this._domNode.setHeight(this._settings.domHeight),this._domNode.domNode.width=this._settings.canvasWidth,this._domNode.domNode.height=this._settings.canvasHeight,e&&this._render(),!0)}_markRenderingIsNeeded(){return this._actualShouldRender=2,!0}_markRenderingIsMaybeNeeded(){return this._actualShouldRender=1,!0}onConfigurationChanged(e){return!!this._updateSettings(!1)&&this._markRenderingIsNeeded()}onCursorStateChanged(e){this._cursorPositions=[];for(let t=0,i=e.selections.length;t<i;t++){let n=this._settings.cursorColorSingle;i>1&&(n=0===t?this._settings.cursorColorPrimary:this._settings.cursorColorSecondary),this._cursorPositions.push({position:e.selections[t].getPosition(),color:n})}return this._cursorPositions.sort((e,t)=>ee.y.compare(e.position,t.position)),this._markRenderingIsMaybeNeeded()}onDecorationsChanged(e){return!!e.affectsOverviewRuler&&this._markRenderingIsMaybeNeeded()}onFlushed(e){return this._markRenderingIsNeeded()}onScrollChanged(e){return!!e.scrollHeightChanged&&this._markRenderingIsNeeded()}onZonesChanged(e){return this._markRenderingIsNeeded()}onThemeChanged(e){return!!this._updateSettings(!1)&&this._markRenderingIsNeeded()}getDomNode(){return this._domNode.domNode}prepareRender(e){}render(e){this._render(),this._actualShouldRender=0}_render(){let e=this._settings.backgroundColor;if(0===this._settings.overviewRulerLanes){this._domNode.setBackgroundColor(e?t6.Q1.Format.CSS.formatHexA(e):""),this._domNode.setDisplay("none");return}let t=this._context.viewModel.getAllOverviewRulerDecorations(this._context.theme);if(t.sort(ie.Uv.compareByRenderingProps),1!==this._actualShouldRender||ie.Uv.equalsArr(this._renderedDecorations,t)||(this._actualShouldRender=2),1!==this._actualShouldRender||(0,L.aI)(this._renderedCursorPositions,this._cursorPositions,(e,t)=>e.position.lineNumber===t.position.lineNumber&&e.color===t.color)||(this._actualShouldRender=2),1===this._actualShouldRender)return;this._renderedDecorations=t,this._renderedCursorPositions=this._cursorPositions,this._domNode.setDisplay("block");let i=this._settings.canvasWidth,n=this._settings.canvasHeight,s=this._settings.lineHeight,o=this._context.viewLayout,r=n/this._context.viewLayout.getScrollHeight(),a=6*this._settings.pixelRatio|0,l=a/2|0,h=this._domNode.domNode.getContext("2d");e?(e.isOpaque()||h.clearRect(0,0,i,n),h.fillStyle=t6.Q1.Format.CSS.formatHexA(e),h.fillRect(0,0,i,n)):h.clearRect(0,0,i,n);let d=this._settings.x,c=this._settings.w;for(let e of t){let t=e.color,i=e.data;h.fillStyle=t;let u=0,g=0,p=0;for(let e=0,t=i.length/3;e<t;e++){let t=i[3*e],m=i[3*e+1],f=i[3*e+2],_=o.getVerticalOffsetForLineNumber(m)*r|0,v=(o.getVerticalOffsetForLineNumber(f)+s)*r|0;if(v-_<a){let e=(_+v)/2|0;e<l?e=l:e+l>n&&(e=n-l),_=e-l,v=e+l}_>p+1||t!==u?(0!==e&&h.fillRect(d[u],g,c[u],p-g),u=t,g=_,p=v):v>p&&(p=v)}h.fillRect(d[u],g,c[u],p-g)}if(!this._settings.hideCursor){let e=2*this._settings.pixelRatio|0,t=e/2|0,i=this._settings.x[7],s=this._settings.w[7],a=-100,l=-100,d=null;for(let c=0,u=this._cursorPositions.length;c<u;c++){let u=this._cursorPositions[c].color;if(!u)continue;let g=this._cursorPositions[c].position,p=o.getVerticalOffsetForLineNumber(g.lineNumber)*r|0;p<t?p=t:p+t>n&&(p=n-t);let m=p-t,f=m+e;m>l+1||u!==d?(0!==c&&d&&h.fillRect(i,a,s,l-a),a=m,l=f):f>l&&(l=f),d=u,h.fillStyle=u}d&&h.fillRect(i,a,s,l-a)}this._settings.renderBorder&&this._settings.borderColor&&this._settings.overviewRulerLanes>0&&(h.beginPath(),h.lineWidth=1,h.strokeStyle=this._settings.borderColor,h.moveTo(0,0),h.lineTo(0,n),h.moveTo(1,0),h.lineTo(i,0),h.stroke())}}var is=i(19267);class io extends Y.i{constructor(e,t){super(),this._context=e;let i=this._context.configuration.options;this._domNode=(0,q.Z)(document.createElement("canvas")),this._domNode.setClassName(t),this._domNode.setPosition("absolute"),this._domNode.setLayerHinting(!0),this._domNode.setContain("strict"),this._zoneManager=new is.rW(e=>this._context.viewLayout.getVerticalOffsetForLineNumber(e)),this._zoneManager.setDOMWidth(0),this._zoneManager.setDOMHeight(0),this._zoneManager.setOuterHeight(this._context.viewLayout.getScrollHeight()),this._zoneManager.setLineHeight(i.get(75)),this._zoneManager.setPixelRatio(i.get(163)),this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}onConfigurationChanged(e){let t=this._context.configuration.options;return e.hasChanged(75)&&(this._zoneManager.setLineHeight(t.get(75)),this._render()),e.hasChanged(163)&&(this._zoneManager.setPixelRatio(t.get(163)),this._domNode.setWidth(this._zoneManager.getDOMWidth()),this._domNode.setHeight(this._zoneManager.getDOMHeight()),this._domNode.domNode.width=this._zoneManager.getCanvasWidth(),this._domNode.domNode.height=this._zoneManager.getCanvasHeight(),this._render()),!0}onFlushed(e){return this._render(),!0}onScrollChanged(e){return e.scrollHeightChanged&&(this._zoneManager.setOuterHeight(e.scrollHeight),this._render()),!0}onZonesChanged(e){return this._render(),!0}getDomNode(){return this._domNode.domNode}setLayout(e){this._domNode.setTop(e.top),this._domNode.setRight(e.right);let t=!1;t=this._zoneManager.setDOMWidth(e.width)||t,(t=this._zoneManager.setDOMHeight(e.height)||t)&&(this._domNode.setWidth(this._zoneManager.getDOMWidth()),this._domNode.setHeight(this._zoneManager.getDOMHeight()),this._domNode.domNode.width=this._zoneManager.getCanvasWidth(),this._domNode.domNode.height=this._zoneManager.getCanvasHeight(),this._render())}setZones(e){this._zoneManager.setZones(e),this._render()}_render(){if(0===this._zoneManager.getOuterHeight())return!1;let e=this._zoneManager.getCanvasWidth(),t=this._zoneManager.getCanvasHeight(),i=this._zoneManager.resolveColorZones(),n=this._zoneManager.getId2Color(),s=this._domNode.domNode.getContext("2d");return s.clearRect(0,0,e,t),i.length>0&&this._renderOneLane(s,i,n,e),!0}_renderOneLane(e,t,i,n){let s=0,o=0,r=0;for(let a of t){let t=a.colorId,l=a.from,h=a.to;t!==s?(e.fillRect(0,o,n,r-o),e.fillStyle=i[s=t],o=l,r=h):r>=l?r=Math.max(r,h):(e.fillRect(0,o,n,r-o),o=l,r=h)}e.fillRect(0,o,n,r-o)}}i(89159);class ir extends Z{constructor(e){super(e),this.domNode=(0,q.Z)(document.createElement("div")),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this.domNode.setClassName("view-rulers"),this._renderedRulers=[];let t=this._context.configuration.options;this._rulers=t.get(116),this._typicalHalfwidthCharacterWidth=t.get(59).typicalHalfwidthCharacterWidth}dispose(){super.dispose()}onConfigurationChanged(e){let t=this._context.configuration.options;return this._rulers=t.get(116),this._typicalHalfwidthCharacterWidth=t.get(59).typicalHalfwidthCharacterWidth,!0}onScrollChanged(e){return e.scrollHeightChanged}prepareRender(e){}_ensureRulersCount(){let e=this._renderedRulers.length,t=this._rulers.length;if(e===t)return;if(e<t){let{tabSize:i}=this._context.viewModel.model.getOptions(),n=t-e;for(;n>0;){let e=(0,q.Z)(document.createElement("div"));e.setClassName("view-ruler"),e.setWidth(i),this.domNode.appendChild(e),this._renderedRulers.push(e),n--}return}let i=e-t;for(;i>0;){let e=this._renderedRulers.pop();this.domNode.removeChild(e),i--}}render(e){this._ensureRulersCount();for(let t=0,i=this._rulers.length;t<i;t++){let i=this._renderedRulers[t],n=this._rulers[t];i.setBoxShadow(n.color?`1px 0 0 0 ${n.color} inset`:""),i.setHeight(Math.min(e.scrollHeight,1e6)),i.setLeft(n.column*this._typicalHalfwidthCharacterWidth)}}}i(67295);class ia extends Z{constructor(e){super(e),this._scrollTop=0,this._width=0,this._updateWidth(),this._shouldShow=!1;let t=this._context.configuration.options.get(117);this._useShadows=t.useShadows,this._domNode=(0,q.Z)(document.createElement("div")),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true")}dispose(){super.dispose()}_updateShouldShow(){let e=this._useShadows&&this._scrollTop>0;return this._shouldShow!==e&&(this._shouldShow=e,!0)}getDomNode(){return this._domNode}_updateWidth(){let e=this._context.configuration.options.get(165);0===e.minimap.renderMinimap||e.minimap.minimapWidth>0&&0===e.minimap.minimapLeft?this._width=e.width:this._width=e.width-e.verticalScrollbarWidth}onConfigurationChanged(e){let t=this._context.configuration.options.get(117);return this._useShadows=t.useShadows,this._updateWidth(),this._updateShouldShow(),!0}onScrollChanged(e){return this._scrollTop=e.scrollTop,this._updateShouldShow()}prepareRender(e){}render(e){this._domNode.setWidth(this._width),this._domNode.setClassName(this._shouldShow?"scroll-decoration":"")}}i(22479);class il{constructor(e){this.left=e.left,this.width=e.width,this.startStyle=null,this.endStyle=null}}class ih{constructor(e,t){this.lineNumber=e,this.ranges=t}}function id(e){return new il(e)}function ic(e){return new ih(e.lineNumber,e.ranges.map(id))}class iu extends ts{static{this.SELECTION_CLASS_NAME="selected-text"}static{this.SELECTION_TOP_LEFT="top-left-radius"}static{this.SELECTION_BOTTOM_LEFT="bottom-left-radius"}static{this.SELECTION_TOP_RIGHT="top-right-radius"}static{this.SELECTION_BOTTOM_RIGHT="bottom-right-radius"}static{this.EDITOR_BACKGROUND_CLASS_NAME="monaco-editor-background"}static{this.ROUNDED_PIECE_WIDTH=10}constructor(e){super(),this._previousFrameVisibleRangesWithStyle=[],this._context=e;let t=this._context.configuration.options;this._roundedSelection=t.get(115),this._typicalHalfwidthCharacterWidth=t.get(59).typicalHalfwidthCharacterWidth,this._selections=[],this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){let t=this._context.configuration.options;return this._roundedSelection=t.get(115),this._typicalHalfwidthCharacterWidth=t.get(59).typicalHalfwidthCharacterWidth,!0}onCursorStateChanged(e){return this._selections=e.selections.slice(0),!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}_visibleRangesHaveGaps(e){for(let t=0,i=e.length;t<i;t++)if(e[t].ranges.length>1)return!0;return!1}_enrichVisibleRangesWithStyle(e,t,i){let n=this._typicalHalfwidthCharacterWidth/4,s=null,o=null;if(i&&i.length>0&&t.length>0){let n=t[0].lineNumber;if(n===e.startLineNumber)for(let e=0;!s&&e<i.length;e++)i[e].lineNumber===n&&(s=i[e].ranges[0]);let r=t[t.length-1].lineNumber;if(r===e.endLineNumber)for(let e=i.length-1;!o&&e>=0;e--)i[e].lineNumber===r&&(o=i[e].ranges[0]);s&&!s.startStyle&&(s=null),o&&!o.startStyle&&(o=null)}for(let e=0,i=t.length;e<i;e++){let r=t[e].ranges[0],a=r.left,l=r.left+r.width,h={top:0,bottom:0},d={top:0,bottom:0};if(e>0){let i=t[e-1].ranges[0].left,s=t[e-1].ranges[0].left+t[e-1].ranges[0].width;ig(a-i)<n?h.top=2:a>i&&(h.top=1),ig(l-s)<n?d.top=2:i<l&&l<s&&(d.top=1)}else s&&(h.top=s.startStyle.top,d.top=s.endStyle.top);if(e+1<i){let i=t[e+1].ranges[0].left,s=t[e+1].ranges[0].left+t[e+1].ranges[0].width;ig(a-i)<n?h.bottom=2:i<a&&a<s&&(h.bottom=1),ig(l-s)<n?d.bottom=2:l<s&&(d.bottom=1)}else o&&(h.bottom=o.startStyle.bottom,d.bottom=o.endStyle.bottom);r.startStyle=h,r.endStyle=d}}_getVisibleRangesWithStyle(e,t,i){let n=(t.linesVisibleRangesForRange(e,!0)||[]).map(ic);return!this._visibleRangesHaveGaps(n)&&this._roundedSelection&&this._enrichVisibleRangesWithStyle(t.visibleRange,n,i),n}_createSelectionPiece(e,t,i,n,s){return'<div class="cslr '+i+'" style="top:'+e.toString()+"px;bottom:"+t.toString()+"px;left:"+n.toString()+"px;width:"+s.toString()+'px;"></div>'}_actualRenderOneSelection(e,t,i,n){if(0===n.length)return;let s=!!n[0].ranges[0].startStyle,o=n[0].lineNumber,r=n[n.length-1].lineNumber;for(let a=0,l=n.length;a<l;a++){let l=n[a],h=l.lineNumber,d=h-t,c=i?+(h===o):0,u=i?+(h!==o&&h===r):0,g="",p="";for(let e=0,t=l.ranges.length;e<t;e++){let t=l.ranges[e];if(s){let e=t.startStyle,i=t.endStyle;if(1===e.top||1===e.bottom){g+=this._createSelectionPiece(c,u,iu.SELECTION_CLASS_NAME,t.left-iu.ROUNDED_PIECE_WIDTH,iu.ROUNDED_PIECE_WIDTH);let i=iu.EDITOR_BACKGROUND_CLASS_NAME;1===e.top&&(i+=" "+iu.SELECTION_TOP_RIGHT),1===e.bottom&&(i+=" "+iu.SELECTION_BOTTOM_RIGHT),g+=this._createSelectionPiece(c,u,i,t.left-iu.ROUNDED_PIECE_WIDTH,iu.ROUNDED_PIECE_WIDTH)}if(1===i.top||1===i.bottom){g+=this._createSelectionPiece(c,u,iu.SELECTION_CLASS_NAME,t.left+t.width,iu.ROUNDED_PIECE_WIDTH);let e=iu.EDITOR_BACKGROUND_CLASS_NAME;1===i.top&&(e+=" "+iu.SELECTION_TOP_LEFT),1===i.bottom&&(e+=" "+iu.SELECTION_BOTTOM_LEFT),g+=this._createSelectionPiece(c,u,e,t.left+t.width,iu.ROUNDED_PIECE_WIDTH)}}let i=iu.SELECTION_CLASS_NAME;if(s){let e=t.startStyle,n=t.endStyle;0===e.top&&(i+=" "+iu.SELECTION_TOP_LEFT),0===e.bottom&&(i+=" "+iu.SELECTION_BOTTOM_LEFT),0===n.top&&(i+=" "+iu.SELECTION_TOP_RIGHT),0===n.bottom&&(i+=" "+iu.SELECTION_BOTTOM_RIGHT)}p+=this._createSelectionPiece(c,u,i,t.left,t.width)}e[d][0]+=g,e[d][1]+=p}}prepareRender(e){let t=[],i=e.visibleRange.startLineNumber,n=e.visibleRange.endLineNumber;for(let e=i;e<=n;e++)t[e-i]=["",""];let s=[];for(let n=0,o=this._selections.length;n<o;n++){let o=this._selections[n];if(o.isEmpty()){s[n]=null;continue}let r=this._getVisibleRangesWithStyle(o,e,this._previousFrameVisibleRangesWithStyle[n]);s[n]=r,this._actualRenderOneSelection(t,i,this._selections.length>1,r)}this._previousFrameVisibleRangesWithStyle=s,this._renderResult=t.map(([e,t])=>e+t)}render(e,t){if(!this._renderResult)return"";let i=t-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}}function ig(e){return e<0?-e:e}(0,tr.zy)((e,t)=>{let i=e.getColor(tV.rm4);i&&!i.isTransparent()&&t.addRule(`.monaco-editor .view-line span.inline-selected-text { color: ${i}; }`)}),i(54923);class ip{constructor(e,t,i,n,s,o,r){this.top=e,this.left=t,this.paddingLeft=i,this.width=n,this.height=s,this.textContent=o,this.textContentClassName=r}}!function(e){e[e.Single=0]="Single",e[e.MultiPrimary=1]="MultiPrimary",e[e.MultiSecondary=2]="MultiSecondary"}(u||(u={}));class im{constructor(e,t){this._context=e;let i=this._context.configuration.options,n=i.get(59);this._cursorStyle=i.get(161),this._typicalHalfwidthCharacterWidth=n.typicalHalfwidthCharacterWidth,this._lineCursorWidth=Math.min(i.get(37),this._typicalHalfwidthCharacterWidth),this._lineCursorHeight=i.get(38),this._isVisible=!0,this._domNode=(0,q.Z)(document.createElement("div")),this._domNode.setClassName(`cursor ${tD}`),this._domNode.setHeight(this._context.viewLayout.getLineHeightForLineNumber(1)),this._domNode.setTop(0),this._domNode.setLeft(0),(0,k.M)(this._domNode,n),this._domNode.setDisplay("none"),this._position=new ee.y(1,1),this._pluralityClass="",this.setPlurality(t),this._lastRenderedContent="",this._renderData=null}getDomNode(){return this._domNode}getPosition(){return this._position}setPlurality(e){switch(e){default:case u.Single:this._pluralityClass="";break;case u.MultiPrimary:this._pluralityClass="cursor-primary";break;case u.MultiSecondary:this._pluralityClass="cursor-secondary"}}show(){this._isVisible||(this._domNode.setVisibility("inherit"),this._isVisible=!0)}hide(){this._isVisible&&(this._domNode.setVisibility("hidden"),this._isVisible=!1)}onConfigurationChanged(e){let t=this._context.configuration.options,i=t.get(59);return this._cursorStyle=t.get(161),this._typicalHalfwidthCharacterWidth=i.typicalHalfwidthCharacterWidth,this._lineCursorWidth=Math.min(t.get(37),this._typicalHalfwidthCharacterWidth),this._lineCursorHeight=t.get(38),(0,k.M)(this._domNode,i),!0}onCursorPositionChanged(e,t){return t?this._domNode.domNode.style.transitionProperty="none":this._domNode.domNode.style.transitionProperty="",this._position=e,!0}_getGraphemeAwarePosition(){let{lineNumber:e,column:t}=this._position,i=this._context.viewModel.getLineContent(e),[n,s]=eA.m(i,t-1);return[new ee.y(e,n+1),i.substring(n,s)]}_prepareRender(e){let t="",i="",[n,s]=this._getGraphemeAwarePosition(),o=this._context.viewLayout.getLineHeightForLineNumber(n.lineNumber),r=0===this._lineCursorHeight?o:Math.min(o,this._lineCursorHeight),a=(o-r)/2;if(this._cursorStyle===A.m9.Line||this._cursorStyle===A.m9.LineThin){let o,l=e.visibleRangeForPosition(n);if(!l||l.outsideRenderedLine)return null;let h=b.zk(this._domNode.domNode);this._cursorStyle===A.m9.Line?(o=b.vT(h,this._lineCursorWidth>0?this._lineCursorWidth:2))>2&&(t=s,i=this._getTokenClassName(n)):o=b.vT(h,1);let d=l.left,c=0;return o>=2&&d>=1&&(d-=c=1),new ip(e.getVerticalOffsetForLineNumber(n.lineNumber)-e.bigNumbersDelta+a,d,c,o,r,t,i)}let l=e.linesVisibleRangesForRange(new et.Q(n.lineNumber,n.column,n.lineNumber,n.column+s.length),!1);if(!l||0===l.length)return null;let h=l[0];if(h.outsideRenderedLine||0===h.ranges.length)return null;let d=h.ranges[0],c=" "===s||d.width<1?this._typicalHalfwidthCharacterWidth:d.width;this._cursorStyle===A.m9.Block&&(t=s,i=this._getTokenClassName(n));let u=e.getVerticalOffsetForLineNumber(n.lineNumber)-e.bigNumbersDelta,g=o;return(this._cursorStyle===A.m9.Underline||this._cursorStyle===A.m9.UnderlineThin)&&(u+=o-2,g=2),new ip(u,d.left,0,c,g,t,i)}_getTokenClassName(e){let t=this._context.viewModel.getViewLineData(e.lineNumber),i=t.tokens.findTokenIndexAtOffset(e.column-1);return t.tokens.getClassName(i)}prepareRender(e){this._renderData=this._prepareRender(e)}render(e){return this._renderData?(this._lastRenderedContent!==this._renderData.textContent&&(this._lastRenderedContent=this._renderData.textContent,this._domNode.domNode.textContent=this._lastRenderedContent),this._domNode.setClassName(`cursor ${this._pluralityClass} ${tD} ${this._renderData.textContentClassName}`),this._domNode.setDisplay("block"),this._domNode.setTop(this._renderData.top),this._domNode.setLeft(this._renderData.left),this._domNode.setPaddingLeft(this._renderData.paddingLeft),this._domNode.setWidth(this._renderData.width),this._domNode.setLineHeight(this._renderData.height),this._domNode.setHeight(this._renderData.height),{domNode:this._domNode.domNode,position:this._position,contentLeft:this._renderData.left,height:this._renderData.height,width:2}):(this._domNode.setDisplay("none"),null)}}class i_ extends Z{static{this.BLINK_INTERVAL=500}constructor(e){super(e);let t=this._context.configuration.options;this._readOnly=t.get(104),this._cursorBlinking=t.get(32),this._cursorStyle=t.get(161),this._cursorSmoothCaretAnimation=t.get(33),this._editContextEnabled=t.get(170),this._selectionIsEmpty=!0,this._isComposingInput=!1,this._isVisible=!1,this._primaryCursor=new im(this._context,u.Single),this._secondaryCursors=[],this._renderData=[],this._domNode=(0,q.Z)(document.createElement("div")),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true"),this._updateDomClassName(),this._domNode.appendChild(this._primaryCursor.getDomNode()),this._startCursorBlinkAnimation=new eP.pc,this._cursorFlatBlinkInterval=new b.Be,this._blinkingEnabled=!1,this._editorHasFocus=!1,this._updateBlinking()}dispose(){super.dispose(),this._startCursorBlinkAnimation.dispose(),this._cursorFlatBlinkInterval.dispose()}getDomNode(){return this._domNode}onCompositionStart(e){return this._isComposingInput=!0,this._updateBlinking(),!0}onCompositionEnd(e){return this._isComposingInput=!1,this._updateBlinking(),!0}onConfigurationChanged(e){let t=this._context.configuration.options;this._readOnly=t.get(104),this._cursorBlinking=t.get(32),this._cursorStyle=t.get(161),this._cursorSmoothCaretAnimation=t.get(33),this._editContextEnabled=t.get(170),this._updateBlinking(),this._updateDomClassName(),this._primaryCursor.onConfigurationChanged(e);for(let t=0,i=this._secondaryCursors.length;t<i;t++)this._secondaryCursors[t].onConfigurationChanged(e);return!0}_onCursorPositionChanged(e,t,i){let n=this._secondaryCursors.length!==t.length||"explicit"===this._cursorSmoothCaretAnimation&&3!==i;if(this._primaryCursor.setPlurality(t.length?u.MultiPrimary:u.Single),this._primaryCursor.onCursorPositionChanged(e,n),this._updateBlinking(),this._secondaryCursors.length<t.length){let e=t.length-this._secondaryCursors.length;for(let t=0;t<e;t++){let e=new im(this._context,u.MultiSecondary);this._domNode.domNode.insertBefore(e.getDomNode().domNode,this._primaryCursor.getDomNode().domNode.nextSibling),this._secondaryCursors.push(e)}}else if(this._secondaryCursors.length>t.length){let e=this._secondaryCursors.length-t.length;for(let t=0;t<e;t++)this._domNode.removeChild(this._secondaryCursors[0].getDomNode()),this._secondaryCursors.splice(0,1)}for(let e=0;e<t.length;e++)this._secondaryCursors[e].onCursorPositionChanged(t[e],n)}onCursorStateChanged(e){let t=[];for(let i=0,n=e.selections.length;i<n;i++)t[i]=e.selections[i].getPosition();this._onCursorPositionChanged(t[0],t.slice(1),e.reason);let i=e.selections[0].isEmpty();return this._selectionIsEmpty!==i&&(this._selectionIsEmpty=i,this._updateDomClassName()),!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onFocusChanged(e){return this._editorHasFocus=e.isFocused,this._updateBlinking(),!1}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return!0}onTokensChanged(e){let t=t=>{for(let i=0,n=e.ranges.length;i<n;i++)if(e.ranges[i].fromLineNumber<=t.lineNumber&&t.lineNumber<=e.ranges[i].toLineNumber)return!0;return!1};if(t(this._primaryCursor.getPosition()))return!0;for(let e of this._secondaryCursors)if(t(e.getPosition()))return!0;return!1}onZonesChanged(e){return!0}_getCursorBlinking(){return(!this._isComposingInput||this._editContextEnabled)&&this._editorHasFocus?this._readOnly?5:this._cursorBlinking:0}_updateBlinking(){this._startCursorBlinkAnimation.cancel(),this._cursorFlatBlinkInterval.cancel();let e=this._getCursorBlinking(),t=0===e;t?this._hide():this._show(),this._blinkingEnabled=!1,this._updateDomClassName(),t||5===e||(1===e?this._cursorFlatBlinkInterval.cancelAndSet(()=>{this._isVisible?this._hide():this._show()},i_.BLINK_INTERVAL,(0,b.zk)(this._domNode.domNode)):this._startCursorBlinkAnimation.setIfNotSet(()=>{this._blinkingEnabled=!0,this._updateDomClassName()},i_.BLINK_INTERVAL))}_updateDomClassName(){this._domNode.setClassName(this._getClassName())}_getClassName(){let e="cursors-layer";switch(!this._selectionIsEmpty&&(e+=" has-selection"),this._cursorStyle){case A.m9.Line:e+=" cursor-line-style";break;case A.m9.Block:e+=" cursor-block-style";break;case A.m9.Underline:e+=" cursor-underline-style";break;case A.m9.LineThin:e+=" cursor-line-thin-style";break;case A.m9.BlockOutline:e+=" cursor-block-outline-style";break;case A.m9.UnderlineThin:e+=" cursor-underline-thin-style";break;default:e+=" cursor-line-style"}if(this._blinkingEnabled)switch(this._getCursorBlinking()){case 1:e+=" cursor-blink";break;case 2:e+=" cursor-smooth";break;case 3:e+=" cursor-phase";break;case 4:e+=" cursor-expand";break;default:e+=" cursor-solid"}else e+=" cursor-solid";return("on"===this._cursorSmoothCaretAnimation||"explicit"===this._cursorSmoothCaretAnimation)&&(e+=" cursor-smooth-caret-animation"),e}_show(){this._primaryCursor.show();for(let e=0,t=this._secondaryCursors.length;e<t;e++)this._secondaryCursors[e].show();this._isVisible=!0}_hide(){this._primaryCursor.hide();for(let e=0,t=this._secondaryCursors.length;e<t;e++)this._secondaryCursors[e].hide();this._isVisible=!1}prepareRender(e){this._primaryCursor.prepareRender(e);for(let t=0,i=this._secondaryCursors.length;t<i;t++)this._secondaryCursors[t].prepareRender(e)}render(e){let t=[],i=0,n=this._primaryCursor.render(e);n&&(t[i++]=n);for(let n=0,s=this._secondaryCursors.length;n<s;n++){let s=this._secondaryCursors[n].render(e);s&&(t[i++]=s)}this._renderData=t}getLastRenderData(){return this._renderData}}(0,tr.zy)((e,t)=>{for(let i of[{class:".cursor",foreground:to.D0,background:to.kM},{class:".cursor-primary",foreground:to.sC,background:to.je},{class:".cursor-secondary",foreground:to.we,background:to.L0}]){let n=e.getColor(i.foreground);if(n){let s=e.getColor(i.background);s||(s=n.opposite()),t.addRule(`.monaco-editor .cursors-layer ${i.class} { background-color: ${n}; border-color: ${n}; color: ${s}; }`),(0,ta.Bb)(e.type)&&t.addRule(`.monaco-editor .cursors-layer.has-selection ${i.class} { border-left: 1px solid ${s}; border-right: 1px solid ${s}; }`)}}});let iv=()=>{throw Error("Invalid change accessor")};class ib extends Z{constructor(e){super(e);let t=this._context.configuration.options,i=t.get(165);this._lineHeight=t.get(75),this._contentWidth=i.contentWidth,this._contentLeft=i.contentLeft,this.domNode=(0,q.Z)(document.createElement("div")),this.domNode.setClassName("view-zones"),this.domNode.setPosition("absolute"),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this.marginDomNode=(0,q.Z)(document.createElement("div")),this.marginDomNode.setClassName("margin-view-zones"),this.marginDomNode.setPosition("absolute"),this.marginDomNode.setAttribute("role","presentation"),this.marginDomNode.setAttribute("aria-hidden","true"),this._zones={}}dispose(){super.dispose(),this._zones={}}_recomputeWhitespacesProps(){let e=this._context.viewLayout.getWhitespaces(),t=new Map;for(let i of e)t.set(i.id,i);let i=!1;return this._context.viewModel.changeWhitespace(e=>{let n=Object.keys(this._zones);for(let s=0,o=n.length;s<o;s++){let o=n[s],r=this._zones[o],a=this._computeWhitespaceProps(r.delegate);r.isInHiddenArea=a.isInHiddenArea;let l=t.get(o);l&&(l.afterLineNumber!==a.afterViewLineNumber||l.height!==a.heightInPx)&&(e.changeOneWhitespace(o,a.afterViewLineNumber,a.heightInPx),this._safeCallOnComputedHeight(r.delegate,a.heightInPx),i=!0)}}),i}onConfigurationChanged(e){let t=this._context.configuration.options,i=t.get(165);return this._lineHeight=t.get(75),this._contentWidth=i.contentWidth,this._contentLeft=i.contentLeft,e.hasChanged(75)&&this._recomputeWhitespacesProps(),!0}onLineMappingChanged(e){return this._recomputeWhitespacesProps()}onLinesDeleted(e){return!0}onScrollChanged(e){return e.scrollTopChanged||e.scrollWidthChanged}onZonesChanged(e){return!0}onLinesInserted(e){return!0}_getZoneOrdinal(e){return e.ordinal??e.afterColumn??1e4}_computeWhitespaceProps(e){let t,i;if(0===e.afterLineNumber)return{isInHiddenArea:!1,afterViewLineNumber:0,heightInPx:this._heightInPixels(e),minWidthInPx:this._minWidthInPixels(e)};if(void 0!==e.afterColumn)t=this._context.viewModel.model.validatePosition({lineNumber:e.afterLineNumber,column:e.afterColumn});else{let i=this._context.viewModel.model.validatePosition({lineNumber:e.afterLineNumber,column:1}).lineNumber;t=new ee.y(i,this._context.viewModel.model.getLineMaxColumn(i))}i=t.column===this._context.viewModel.model.getLineMaxColumn(t.lineNumber)?this._context.viewModel.model.validatePosition({lineNumber:t.lineNumber+1,column:1}):this._context.viewModel.model.validatePosition({lineNumber:t.lineNumber,column:t.column+1});let n=this._context.viewModel.coordinatesConverter.convertModelPositionToViewPosition(t,e.afterColumnAffinity,!0),s=e.showInHiddenAreas||this._context.viewModel.coordinatesConverter.modelPositionIsVisible(i);return{isInHiddenArea:!s,afterViewLineNumber:n.lineNumber,heightInPx:s?this._heightInPixels(e):0,minWidthInPx:this._minWidthInPixels(e)}}changeViewZones(e){let t=!1;return this._context.viewModel.changeWhitespace(i=>{let n={addZone:e=>(t=!0,this._addZone(i,e)),removeZone:e=>{e&&(t=this._removeZone(i,e)||t)},layoutZone:e=>{e&&(t=this._layoutZone(i,e)||t)}};(function(e,t){try{e(t)}catch(e){(0,C.dz)(e)}})(e,n),n.addZone=iv,n.removeZone=iv,n.layoutZone=iv}),t}_addZone(e,t){let i=this._computeWhitespaceProps(t),n={whitespaceId:e.insertWhitespace(i.afterViewLineNumber,this._getZoneOrdinal(t),i.heightInPx,i.minWidthInPx),delegate:t,isInHiddenArea:i.isInHiddenArea,isVisible:!1,domNode:(0,q.Z)(t.domNode),marginDomNode:t.marginDomNode?(0,q.Z)(t.marginDomNode):null};return this._safeCallOnComputedHeight(n.delegate,i.heightInPx),n.domNode.setPosition("absolute"),n.domNode.domNode.style.width="100%",n.domNode.setDisplay("none"),n.domNode.setAttribute("monaco-view-zone",n.whitespaceId),this.domNode.appendChild(n.domNode),n.marginDomNode&&(n.marginDomNode.setPosition("absolute"),n.marginDomNode.domNode.style.width="100%",n.marginDomNode.setDisplay("none"),n.marginDomNode.setAttribute("monaco-view-zone",n.whitespaceId),this.marginDomNode.appendChild(n.marginDomNode)),this._zones[n.whitespaceId]=n,this.setShouldRender(),n.whitespaceId}_removeZone(e,t){if(this._zones.hasOwnProperty(t)){let i=this._zones[t];return delete this._zones[t],e.removeWhitespace(i.whitespaceId),i.domNode.removeAttribute("monaco-visible-view-zone"),i.domNode.removeAttribute("monaco-view-zone"),i.domNode.domNode.remove(),i.marginDomNode&&(i.marginDomNode.removeAttribute("monaco-visible-view-zone"),i.marginDomNode.removeAttribute("monaco-view-zone"),i.marginDomNode.domNode.remove()),this.setShouldRender(),!0}return!1}_layoutZone(e,t){if(this._zones.hasOwnProperty(t)){let i=this._zones[t],n=this._computeWhitespaceProps(i.delegate);return i.isInHiddenArea=n.isInHiddenArea,e.changeOneWhitespace(i.whitespaceId,n.afterViewLineNumber,n.heightInPx),this._safeCallOnComputedHeight(i.delegate,n.heightInPx),this.setShouldRender(),!0}return!1}shouldSuppressMouseDownOnViewZone(e){return!!this._zones.hasOwnProperty(e)&&!!this._zones[e].delegate.suppressMouseDown}_heightInPixels(e){return"number"==typeof e.heightInPx?e.heightInPx:"number"==typeof e.heightInLines?this._lineHeight*e.heightInLines:this._lineHeight}_minWidthInPixels(e){return"number"==typeof e.minWidthInPx?e.minWidthInPx:0}_safeCallOnComputedHeight(e,t){if("function"==typeof e.onComputedHeight)try{e.onComputedHeight(t)}catch(e){(0,C.dz)(e)}}_safeCallOnDomNodeTop(e,t){if("function"==typeof e.onDomNodeTop)try{e.onDomNodeTop(t)}catch(e){(0,C.dz)(e)}}prepareRender(e){}render(e){let t=e.viewportData.whitespaceViewportData,i={},n=!1;for(let e of t)this._zones[e.id].isInHiddenArea||(i[e.id]=e,n=!0);let s=Object.keys(this._zones);for(let t=0,n=s.length;t<n;t++){let n=s[t],o=this._zones[n],r=0,a=0,l="none";i.hasOwnProperty(n)?(r=i[n].verticalOffset-e.bigNumbersDelta,a=i[n].height,l="block",o.isVisible||(o.domNode.setAttribute("monaco-visible-view-zone","true"),o.isVisible=!0),this._safeCallOnDomNodeTop(o.delegate,e.getScrolledTopFromAbsoluteTop(i[n].verticalOffset))):(o.isVisible&&(o.domNode.removeAttribute("monaco-visible-view-zone"),o.isVisible=!1),this._safeCallOnDomNodeTop(o.delegate,e.getScrolledTopFromAbsoluteTop(-1e6))),o.domNode.setTop(r),o.domNode.setHeight(a),o.domNode.setDisplay(l),o.marginDomNode&&(o.marginDomNode.setTop(r),o.marginDomNode.setHeight(a),o.marginDomNode.setDisplay(l))}n&&(this.domNode.setWidth(Math.max(e.scrollWidth,this._contentWidth)),this.marginDomNode.setWidth(this._contentLeft))}}i(20175);var iC=i(71819);class iw extends ts{constructor(e){super(),this._context=e,this._options=new iy(this._context.configuration),this._selection=[],this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){let t=new iy(this._context.configuration);return this._options.equals(t)?e.hasChanged(165):(this._options=t,!0)}onCursorStateChanged(e){return this._selection=e.selections,"selection"===this._options.renderWhitespace}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}prepareRender(e){if("none"===this._options.renderWhitespace){this._renderResult=null;return}let t=e.visibleRange.startLineNumber,i=e.visibleRange.endLineNumber-t+1,n=Array(i);for(let e=0;e<i;e++)n[e]=!0;this._renderResult=[];for(let t=e.viewportData.startLineNumber;t<=e.viewportData.endLineNumber;t++){let i=t-e.viewportData.startLineNumber,n=this._context.viewModel.getViewLineRenderingData(t),s=null;if("selection"===this._options.renderWhitespace)for(let e of this._selection){if(e.endLineNumber<t||e.startLineNumber>t)continue;let i=e.startLineNumber===t?e.startColumn:n.minColumn,o=e.endLineNumber===t?e.endColumn:n.maxColumn;i<o&&(s||(s=[]),s.push(new iC.L(i-1,o-1)))}this._renderResult[i]=this._applyRenderWhitespace(e,t,s,n)}}_applyRenderWhitespace(e,t,i,n){let s;if(n.hasVariableFonts||"selection"===this._options.renderWhitespace&&!i||"trailing"===this._options.renderWhitespace&&n.continuesWithWrappedLine)return"";let o=this._context.theme.getColor(to.w4),r=this._options.renderWithSVG,a=n.content,l=-1===this._options.stopRenderingLineAfter?a.length:Math.min(this._options.stopRenderingLineAfter,a.length),h=n.continuesWithWrappedLine,d=n.minColumn-1,c="boundary"===this._options.renderWhitespace,u="trailing"===this._options.renderWhitespace,g=e.getLineHeightForLineNumber(t),p=this._options.middotWidth,m=this._options.wsmiddotWidth,f=this._options.spaceWidth,_=Math.abs(m-f)<Math.abs(p-f)?11825:183,v=this._options.canUseHalfwidthRightwardsArrow,b="",C=!1,w=eA.HG(a);-1===w?(C=!0,w=l,s=l):s=eA.lT(a);let y=0,S=i&&i[y],k=0;for(let n=d;n<l;n++){let o=a.charCodeAt(n);if(S&&S.endExclusive<=n&&(y++,S=i&&i[y]),9!==o&&32!==o||u&&!C&&n<=s)continue;if(c&&n>=w&&n<=s&&32===o){let e=n-1>=0?a.charCodeAt(n-1):0,t=n+1<l?a.charCodeAt(n+1):0;if(32!==e&&32!==t)continue}if(c&&h&&n===l-1){let e=n-1>=0?a.charCodeAt(n-1):0;if(32===o&&32!==e&&9!==e)continue}if(i&&!(S&&S.start<=n&&n<S.endExclusive))continue;let d=e.visibleRangeForPosition(new ee.y(t,n+1));d&&(r?(k=Math.max(k,d.left),9===o?b+=this._renderArrow(g,f,d.left):b+=`<circle cx="${(d.left+f/2).toFixed(2)}" cy="${(g/2).toFixed(2)}" r="${(f/7).toFixed(2)}" />`):9===o?b+=`<div class="mwh" style="left:${d.left}px;height:${g}px;">${v?String.fromCharCode(65515):String.fromCharCode(8594)}</div>`:b+=`<div class="mwh" style="left:${d.left}px;height:${g}px;">${String.fromCharCode(_)}</div>`)}return r?(k=Math.round(k+f),`<svg style="bottom:0;position:absolute;width:${k}px;height:${g}px" viewBox="0 0 ${k} ${g}" xmlns="http://www.w3.org/2000/svg" fill="${o}">`+b+"</svg>"):b}_renderArrow(e,t,i){let n=e/2,s={x:0,y:t/7/2},o={x:.8*t,y:s.y},r={x:o.x-.2*o.x,y:o.y+.2*o.x},a={x:r.x+.1*o.x,y:r.y+.1*o.x},l={x:a.x+.35*o.x,y:a.y-.35*o.x},h={x:l.x,y:-l.y},d={x:a.x,y:-a.y},c={x:r.x,y:-r.y},u={x:o.x,y:-o.y},g={x:s.x,y:-s.y},p=[s,o,r,a,l,h,d,c,u,g].map(e=>`${(i+e.x).toFixed(2)} ${(n+e.y).toFixed(2)}`).join(" L ");return`<path d="M ${p}" />`}render(e,t){if(!this._renderResult)return"";let i=t-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}}class iy{constructor(e){let t=e.options,i=t.get(59),n=t.get(47);"off"===n?(this.renderWhitespace="none",this.renderWithSVG=!1):"svg"===n?(this.renderWhitespace=t.get(113),this.renderWithSVG=!0):(this.renderWhitespace=t.get(113),this.renderWithSVG=!1),this.spaceWidth=i.spaceWidth,this.middotWidth=i.middotWidth,this.wsmiddotWidth=i.wsmiddotWidth,this.canUseHalfwidthRightwardsArrow=i.canUseHalfwidthRightwardsArrow,this.lineHeight=t.get(75),this.stopRenderingLineAfter=t.get(133)}equals(e){return this.renderWhitespace===e.renderWhitespace&&this.renderWithSVG===e.renderWithSVG&&this.spaceWidth===e.spaceWidth&&this.middotWidth===e.middotWidth&&this.wsmiddotWidth===e.wsmiddotWidth&&this.canUseHalfwidthRightwardsArrow===e.canUseHalfwidthRightwardsArrow&&this.lineHeight===e.lineHeight&&this.stopRenderingLineAfter===e.stopRenderingLineAfter}}class iS{constructor(e,t,i,n){this.selections=e,this.startLineNumber=0|t.startLineNumber,this.endLineNumber=0|t.endLineNumber,this.relativeVerticalOffset=t.relativeVerticalOffset,this.bigNumbersDelta=0|t.bigNumbersDelta,this.lineHeight=0|t.lineHeight,this.whitespaceViewportData=i,this._model=n,this.visibleRange=new et.Q(t.startLineNumber,this._model.getLineMinColumn(t.startLineNumber),t.endLineNumber,this._model.getLineMaxColumn(t.endLineNumber))}getViewLineRenderingData(e){return this._model.getViewportViewLineRenderingData(this.visibleRange,e)}getDecorationsInViewport(){return this._model.getDecorationsInViewport(this.visibleRange)}}class ik{get type(){return this._theme.type}get value(){return this._theme}constructor(e){this._theme=e}update(e){this._theme=e}getColor(e){return this._theme.getColor(e)}}class ix{constructor(e,t,i){this.configuration=e,this.theme=new ik(t),this.viewModel=i,this.viewLayout=i.viewLayout}addEventHandler(e){this.viewModel.addViewEventHandler(e)}removeEventHandler(e){this.viewModel.removeViewEventHandler(e)}}var iL=i(22263),iD=i(25659),iI=i(76946),iN=i(81492),iE=i(37438),iM=i(26033),iT=i(34501),iR=i(37318);function iO(e,t){return e.isBasicASCII&&t.useMonospaceOptimizations?new iP(e):new iA(e)}class iP{constructor(e){this._content=e.content}getSegmentAtIndex(e){return this._content[e]}}class iA{constructor(e){this._segments=[];let t=e.content,i=Array.from(iR.x.Segmenter(void 0,{granularity:"grapheme"}).value.segment(t)),n=0;for(let e=0;e<t.length;e++){let t=i[n];if(!t)break;if(t.index!==e){this._segments.push(void 0);continue}n++,this._segments.push(t)}}getSegmentAtIndex(e){return this._segments[e]?.segment}}class iF extends Y.i{get glyphRasterizer(){return this._glyphRasterizer.value}constructor(e,t,i,n){super(),this._context=e,this._viewGpuContext=t,this._device=i,this._glyphRasterizer=n,this._context.addEventHandler(this)}}let iB=`
|
|
@@ -621,7 +621,7 @@ struct VSOutput {
|
|
|
621
621
|
}
|
|
622
622
|
`;class iW extends iF{static{this.maxSupportedColumns=2e3}get bindGroupEntries(){return[{binding:1,resource:{buffer:this._cellBindBuffer}},{binding:6,resource:{buffer:this._scrollOffsetBindBuffer}}]}constructor(e,t,i,n){super(e,t,i,n),this.type="viewport",this.wgsl=iB,this._cellBindBufferLineCapacity=63,this._activeDoubleBufferIndex=0,this._visibleObjectCount=0,this._scrollInitialized=!1,this._onDidChangeBindGroupEntries=this._register(new w.vl),this.onDidChangeBindGroupEntries=this._onDidChangeBindGroupEntries.event,this._rebuildCellBuffer(this._cellBindBufferLineCapacity),this._scrollOffsetBindBuffer=this._register(iE.B.createBuffer(this._device,{label:"Monaco scroll offset buffer",size:2*Float32Array.BYTES_PER_ELEMENT,usage:GPUBufferUsage.UNIFORM|GPUBufferUsage.COPY_DST})).object,this._scrollOffsetValueBuffer=new Float32Array(2)}_rebuildCellBuffer(e){this._cellBindBuffer?.destroy();let t=(Math.floor(e/32)+1)*32,i=t*iW.maxSupportedColumns*6*Float32Array.BYTES_PER_ELEMENT;this._cellBindBuffer=this._register(iE.B.createBuffer(this._device,{label:"Monaco full file cell buffer",size:i,usage:GPUBufferUsage.STORAGE|GPUBufferUsage.COPY_DST})).object,this._cellValueBuffers=[new ArrayBuffer(i),new ArrayBuffer(i)],this._cellBindBufferLineCapacity=t,this._onDidChangeBindGroupEntries.fire()}onConfigurationChanged(e){return!0}onDecorationsChanged(e){return!0}onTokensChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onLinesChanged(e){return!0}onScrollChanged(e){let t=(0,b.fz)().devicePixelRatio;return this._scrollOffsetValueBuffer[0]=(e?.scrollLeft??this._context.viewLayout.getCurrentScrollLeft())*t,this._scrollOffsetValueBuffer[1]=(e?.scrollTop??this._context.viewLayout.getCurrentScrollTop())*t,this._device.queue.writeBuffer(this._scrollOffsetBindBuffer,0,this._scrollOffsetValueBuffer),!0}onThemeChanged(e){return!0}onLineMappingChanged(e){return!0}onZonesChanged(e){return!0}reset(){for(let e of[0,1]){let t=new Float32Array(this._cellValueBuffers[e]);t.fill(0,0,t.length),this._device.queue.writeBuffer(this._cellBindBuffer,0,t.buffer,0,t.byteLength)}}update(e,t){let i,n,s,o,r,a,l,h,d,c="",u=0,g=0,p=0,m=0,f=0,_=0,v=0,w=0,y=0,S=0,k=0,x=0,L=(0,b.fz)().devicePixelRatio;this._scrollInitialized||(this.onScrollChanged(),this._scrollInitialized=!0),this._cellBindBufferLineCapacity<e.endLineNumber-e.startLineNumber+1&&this._rebuildCellBuffer(e.endLineNumber-e.startLineNumber+1);let D=new Float32Array(this._cellValueBuffers[this._activeDoubleBufferIndex]);D.fill(0);let I=6*iW.maxSupportedColumns;for(g=e.startLineNumber;g<=e.endLineNumber;g++)if(this._viewGpuContext.canRender(t,e,g)){a=e.getViewLineRenderingData(g),_=0,d=iO(a,t),u=t.spaceWidth*L,m=0,h=a.tokens,w=a.minColumn-1,y=0;for(let b=0,k=h.getCount();b<k;b++)if(!((y=h.getEndOffset(b))<=w)){for(S=h.getMetadata(b),p=w;p<y&&!(p>iW.maxSupportedColumns);p++){if(void 0===(i=d.getSegmentAtIndex(p)))continue;for(l of(c=i,a.isBasicASCII&&t.useMonospaceOptimizations||(u=this.glyphRasterizer.getTextMetrics(c).width),o=void 0,s=void 0,r=void 0,a.inlineDecorations))if(!(g<l.range.startLineNumber)&&!(g>l.range.endLineNumber)&&(g!==l.range.startLineNumber||!(p<l.range.startColumn-1))&&(g!==l.range.endLineNumber||!(p>=l.range.endColumn-1)))for(let e of iD.n.decorationCssRuleExtractor.getStyleRules(this._viewGpuContext.canvas.domNode,l.inlineClassName))for(let t of e.style){let i=e.styleMap.get(t)?.toString()??"";switch(t){case"color":{let e=t6.Q1.Format.CSS.parse(i);if(!e)throw new C.D7("Invalid color format "+i);o=e.toNumber32Bit();break}case"font-weight":s=function(e){switch(e){case"lighter":case"normal":return 400;case"bolder":case"bold":return 700}return parseInt(e)}(i)>=400;break;case"opacity":var N;r=(N=i).endsWith("%")?parseFloat(N.substring(0,N.length-1))/100:N.match(/^\d+(?:\.\d*)/)?parseFloat(N):1;break;default:throw new C.D7("Unexpected inline decoration style")}}if(" "===c||" "===c){if(v=((g-1)*iW.maxSupportedColumns+p)*6,D.fill(0,v,v+6)," "===c){let e=p+_;m+=u*((_=ei.A.nextRenderTabStop(p+_,a.tabSize))-e),_-=p+1}else m+=u;continue}let h=iD.n.decorationStyleCache.getOrCreateEntry(o,s,r);n=this._viewGpuContext.atlas.getGlyph(this.glyphRasterizer,c,S,h,m),f=Math.round(e.relativeVerticalOffset[g-e.startLineNumber]*L+Math.floor((e.lineHeight*L-(n.fontBoundingBoxAscent+n.fontBoundingBoxDescent))/2)+n.fontBoundingBoxAscent),D[(v=((g-e.startLineNumber)*iW.maxSupportedColumns+p)*6)+0]=Math.floor(m),D[v+1]=f,D[v+4]=n.glyphIndex,D[v+5]=n.pageIndex,m+=u}w=y}k=((g-e.startLineNumber)*iW.maxSupportedColumns+y)*6,x=(g-e.startLineNumber)*iW.maxSupportedColumns*6,D.fill(0,k,x)}let E=(e.endLineNumber-e.startLineNumber+1)*I;return this._device.queue.writeBuffer(this._cellBindBuffer,0,D.buffer,0,(e.endLineNumber-e.startLineNumber)*I*Float32Array.BYTES_PER_ELEMENT),this._activeDoubleBufferIndex=+!this._activeDoubleBufferIndex,this._visibleObjectCount=E,E}draw(e,t){if(this._visibleObjectCount<=0)throw new C.D7("Attempt to draw 0 objects");e.draw(iM.xW.length/2,this._visibleObjectCount)}}class iH extends iF{static{this.maxSupportedLines=3e3}static{this.maxSupportedColumns=200}get bindGroupEntries(){return[{binding:1,resource:{buffer:this._cellBindBuffer}},{binding:6,resource:{buffer:this._scrollOffsetBindBuffer}}]}constructor(e,t,i,n){super(e,t,i,n),this.type="fullfile",this.wgsl=iB,this._activeDoubleBufferIndex=0,this._upToDateLines=[new Set,new Set],this._visibleObjectCount=0,this._finalRenderedLine=0,this._scrollInitialized=!1,this._queuedBufferUpdates=[[],[]];let s=iH.maxSupportedLines*iH.maxSupportedColumns*6*Float32Array.BYTES_PER_ELEMENT;this._cellBindBuffer=this._register(iE.B.createBuffer(this._device,{label:"Monaco full file cell buffer",size:s,usage:GPUBufferUsage.STORAGE|GPUBufferUsage.COPY_DST})).object,this._cellValueBuffers=[new ArrayBuffer(s),new ArrayBuffer(s)],this._scrollOffsetBindBuffer=this._register(iE.B.createBuffer(this._device,{label:"Monaco scroll offset buffer",size:2*Float32Array.BYTES_PER_ELEMENT,usage:GPUBufferUsage.UNIFORM|GPUBufferUsage.COPY_DST})).object,this._scrollOffsetValueBuffer=new Float32Array(2)}onConfigurationChanged(e){return this._invalidateAllLines(),this._queueBufferUpdate(e),!0}onDecorationsChanged(e){return this._invalidateAllLines(),!0}onTokensChanged(e){for(let t of e.ranges)this._invalidateLineRange(t.fromLineNumber,t.toLineNumber);return!0}onLinesDeleted(e){return this._invalidateLinesFrom(e.fromLineNumber),this._queueBufferUpdate(e),!0}onLinesInserted(e){return this._invalidateLinesFrom(e.fromLineNumber),!0}onLinesChanged(e){return this._invalidateLineRange(e.fromLineNumber,e.fromLineNumber+e.count),!0}onScrollChanged(e){let t=(0,b.fz)().devicePixelRatio;return this._scrollOffsetValueBuffer[0]=(e?.scrollLeft??this._context.viewLayout.getCurrentScrollLeft())*t,this._scrollOffsetValueBuffer[1]=(e?.scrollTop??this._context.viewLayout.getCurrentScrollTop())*t,this._device.queue.writeBuffer(this._scrollOffsetBindBuffer,0,this._scrollOffsetValueBuffer),!0}onThemeChanged(e){return this._invalidateAllLines(),!0}onLineMappingChanged(e){return this._invalidateAllLines(),this._queueBufferUpdate(e),!0}onZonesChanged(e){return this._invalidateAllLines(),this._queueBufferUpdate(e),!0}_invalidateAllLines(){this._upToDateLines[0].clear(),this._upToDateLines[1].clear()}_invalidateLinesFrom(e){for(let t of[0,1]){let i=this._upToDateLines[t];for(let t of i)t>=e&&i.delete(t)}}_invalidateLineRange(e,t){for(let i=e;i<=t;i++)this._upToDateLines[0].delete(i),this._upToDateLines[1].delete(i)}reset(){for(let e of(this._invalidateAllLines(),[0,1])){let t=new Float32Array(this._cellValueBuffers[e]);t.fill(0,0,t.length),this._device.queue.writeBuffer(this._cellBindBuffer,0,t.buffer,0,t.byteLength)}this._finalRenderedLine=0}update(e,t){let i,n,s,o,r,a,l,h,d,c="",u=0,g=0,p=0,m=0,f=0,_=0,v=0,w=0,y=0,S=0,k=0,x=0,L=(0,b.fz)().devicePixelRatio;this._scrollInitialized||(this.onScrollChanged(),this._scrollInitialized=!0);let D=new Float32Array(this._cellValueBuffers[this._activeDoubleBufferIndex]),I=6*iH.maxSupportedColumns,N=this._upToDateLines[this._activeDoubleBufferIndex],E=3e3,M=0,T=this._queuedBufferUpdates[this._activeDoubleBufferIndex];for(;T.length;){let e=T.shift();switch(e.type){case 2:case 8:case 17:D.fill(0),E=1,M=Math.max(M,this._finalRenderedLine),this._finalRenderedLine=0;break;case 10:{let t=(e.fromLineNumber-1)*iH.maxSupportedColumns*6,i=e.toLineNumber*iH.maxSupportedColumns*6,n=(this._finalRenderedLine-(e.toLineNumber-e.fromLineNumber+1))*iH.maxSupportedColumns*6;D.set(D.subarray(i),t),D.fill(0,n),E=Math.min(E,e.fromLineNumber),M=Math.max(M,this._finalRenderedLine),this._finalRenderedLine-=e.toLineNumber-e.fromLineNumber+1}}}for(g=e.startLineNumber;g<=e.endLineNumber;g++){if(!this._viewGpuContext.canRender(t,e,g)){k=(g-1)*iH.maxSupportedColumns*6,x=g*iH.maxSupportedColumns*6,D.fill(0,k,x),E=Math.min(E,g),M=Math.max(M,g);continue}if(!N.has(g)){E=Math.min(E,g),M=Math.max(M,g),a=e.getViewLineRenderingData(g),_=0,d=iO(a,t),u=t.spaceWidth*L,m=0,h=a.tokens,w=a.minColumn-1,y=0;for(let b=0,k=h.getCount();b<k;b++)if(!((y=h.getEndOffset(b))<=w)){for(S=h.getMetadata(b),p=w;p<y&&!(p>iH.maxSupportedColumns);p++){if(void 0===(i=d.getSegmentAtIndex(p)))continue;for(l of(c=i,a.isBasicASCII&&t.useMonospaceOptimizations||(u=this.glyphRasterizer.getTextMetrics(c).width),o=void 0,s=void 0,r=void 0,a.inlineDecorations))if(!(g<l.range.startLineNumber)&&!(g>l.range.endLineNumber)&&(g!==l.range.startLineNumber||!(p<l.range.startColumn-1))&&(g!==l.range.endLineNumber||!(p>=l.range.endColumn-1)))for(let e of iD.n.decorationCssRuleExtractor.getStyleRules(this._viewGpuContext.canvas.domNode,l.inlineClassName))for(let t of e.style){let i=e.styleMap.get(t)?.toString()??"";switch(t){case"color":{let e=t6.Q1.Format.CSS.parse(i);if(!e)throw new C.D7("Invalid color format "+i);o=e.toNumber32Bit();break}case"font-weight":s=function(e){switch(e){case"lighter":case"normal":return 400;case"bolder":case"bold":return 700}return parseInt(e)}(i)>=400;break;case"opacity":var R;r=(R=i).endsWith("%")?parseFloat(R.substring(0,R.length-1))/100:R.match(/^\d+(?:\.\d*)/)?parseFloat(R):1;break;default:throw new C.D7("Unexpected inline decoration style")}}if(" "===c||" "===c){if(v=((g-1)*iH.maxSupportedColumns+p)*6,D.fill(0,v,v+6)," "===c){let e=p+_;m+=u*((_=ei.A.nextRenderTabStop(p+_,a.tabSize))-e),_-=p+1}else m+=u;continue}let h=iD.n.decorationStyleCache.getOrCreateEntry(o,s,r);n=this._viewGpuContext.atlas.getGlyph(this.glyphRasterizer,c,S,h,m),f=Math.round(e.relativeVerticalOffset[g-e.startLineNumber]*L+Math.floor((e.lineHeight*L-(n.fontBoundingBoxAscent+n.fontBoundingBoxDescent))/2)+n.fontBoundingBoxAscent),D[(v=((g-1)*iH.maxSupportedColumns+p)*6)+0]=Math.floor(m),D[v+1]=f,D[v+4]=n.glyphIndex,D[v+5]=n.pageIndex,m+=u}w=y}k=((g-1)*iH.maxSupportedColumns+y)*6,x=g*iH.maxSupportedColumns*6,D.fill(0,k,x),N.add(g)}}let O=(e.endLineNumber-e.startLineNumber+1)*I;return(E=Math.min(E,iH.maxSupportedLines))<=(M=Math.min(M,iH.maxSupportedLines))&&this._device.queue.writeBuffer(this._cellBindBuffer,(E-1)*I*Float32Array.BYTES_PER_ELEMENT,D.buffer,(E-1)*I*Float32Array.BYTES_PER_ELEMENT,(M-E+1)*I*Float32Array.BYTES_PER_ELEMENT),this._finalRenderedLine=Math.max(this._finalRenderedLine,M),this._activeDoubleBufferIndex=+!this._activeDoubleBufferIndex,this._visibleObjectCount=O,O}draw(e,t){if(this._visibleObjectCount<=0)throw new C.D7("Attempt to draw 0 objects");e.draw(iM.xW.length/2,this._visibleObjectCount,void 0,(t.startLineNumber-1)*iH.maxSupportedColumns)}_queueBufferUpdate(e){this._queuedBufferUpdates[0].push(e),this._queuedBufferUpdates[1].push(e)}}var iV=i(32795),iz=function(e,t){return function(i,n){t(i,n,e)}};let iU=class extends Z{constructor(e,t,i,n){super(e),this._viewGpuContext=t,this._instantiationService=i,this._logService=n,this._atlasGpuTextureVersions=[],this._initialized=!1,this._glyphRasterizer=this._register(new y.HE),this._renderStrategy=this._register(new y.HE),this.canvas=this._viewGpuContext.canvas.domNode,this._register((0,iI.fm)(e=>{this._viewGpuContext.canvasDevicePixelDimensions.read(e);let t=this._lastViewportData;t&&setTimeout(()=>{t===this._lastViewportData&&this.renderText(t)})})),this.initWebgpu()}async initWebgpu(){let e,t;if(this._device=iD.n.deviceSync||await iD.n.device,this._store.isDisposed)return;let i=iD.n.atlas;this._register(i.onDidDeleteGlyphs(()=>{this._atlasGpuTextureVersions.length=0,this._atlasGpuTextureVersions[0]=0,this._atlasGpuTextureVersions[1]=0,this._renderStrategy.value.reset()}));let n=navigator.gpu.getPreferredCanvasFormat();this._viewGpuContext.ctx.configure({device:this._device,format:n,alphaMode:"premultiplied"}),this._renderPassColorAttachment={view:null,loadOp:"load",storeOp:"store"},this._renderPassDescriptor={label:"Monaco render pass",colorAttachments:[this._renderPassColorAttachment]};{let t=new Float32Array(6),i=(e=this.canvas.width,i=this.canvas.height)=>(t[0]=e,t[1]=i,t[2]=Math.ceil(this._context.configuration.options.get(165).contentLeft*(0,b.fz)().devicePixelRatio),t[3]=0,t[4]=t[0]-t[2],t[5]=t[1]-t[3],t);e=this._register(iE.B.createBuffer(this._device,{label:"Monaco uniform buffer",size:24,usage:GPUBufferUsage.UNIFORM|GPUBufferUsage.COPY_DST},()=>i())).object,this._register((0,iI.lp)(this._viewGpuContext.canvasDevicePixelDimensions,({width:t,height:n})=>{this._device.queue.writeBuffer(e,0,i(t,n))})),this._register((0,iI.lp)(this._viewGpuContext.contentLeft,()=>{this._device.queue.writeBuffer(e,0,i())}))}t=this._register(iE.B.createBuffer(this._device,{label:"Monaco atlas info uniform buffer",size:8,usage:GPUBufferUsage.UNIFORM|GPUBufferUsage.COPY_DST},()=>{let e=new Float32Array(2);return e[0]=i.pageSize,e[1]=i.pageSize,e})).object;let s=this._context.configuration.options.get(58),o=this._context.configuration.options.get(61);this._glyphRasterizer.value=this._register(new iV.O(o,s,this._viewGpuContext.devicePixelRatio.get(),iD.n.decorationStyleCache)),this._register((0,iI.lp)(this._viewGpuContext.devicePixelRatio,()=>{this._refreshGlyphRasterizer()})),this._renderStrategy.value=this._instantiationService.createInstance(iH,this._context,this._viewGpuContext,this._device,this._glyphRasterizer),this._glyphStorageBuffer=this._register(iE.B.createBuffer(this._device,{label:"Monaco glyph storage buffer",size:iT.L.maximumPageCount*(24*iN.g.maximumGlyphCount),usage:GPUBufferUsage.STORAGE|GPUBufferUsage.COPY_DST})).object,this._atlasGpuTextureVersions[0]=0,this._atlasGpuTextureVersions[1]=0,this._atlasGpuTexture=this._register(iE.B.createTexture(this._device,{label:"Monaco atlas texture",format:"rgba8unorm",size:{width:i.pageSize,height:i.pageSize,depthOrArrayLayers:iT.L.maximumPageCount},dimension:"2d",usage:GPUTextureUsage.TEXTURE_BINDING|GPUTextureUsage.COPY_DST|GPUTextureUsage.RENDER_ATTACHMENT})).object,this._updateAtlasStorageBufferAndTexture(),this._vertexBuffer=this._register(iE.B.createBuffer(this._device,{label:"Monaco vertex buffer",size:iM.xW.byteLength,usage:GPUBufferUsage.VERTEX|GPUBufferUsage.COPY_DST},iM.xW)).object;let r=this._device.createShaderModule({label:"Monaco shader module",code:this._renderStrategy.value.wgsl});if(this._pipeline=this._device.createRenderPipeline({label:"Monaco render pipeline",layout:"auto",vertex:{module:r,buffers:[{arrayStride:2*Float32Array.BYTES_PER_ELEMENT,attributes:[{shaderLocation:0,offset:0,format:"float32x2"}]}]},fragment:{module:r,targets:[{format:n,blend:{color:{srcFactor:"src-alpha",dstFactor:"one-minus-src-alpha"},alpha:{srcFactor:"src-alpha",dstFactor:"one-minus-src-alpha"}}}]}}),this._rebuildBindGroup=()=>{this._bindGroup=this._device.createBindGroup({label:"Monaco bind group",layout:this._pipeline.getBindGroupLayout(0),entries:[{binding:0,resource:{buffer:this._glyphStorageBuffer}},{binding:2,resource:this._device.createSampler({label:"Monaco atlas sampler",magFilter:"nearest",minFilter:"nearest"})},{binding:3,resource:this._atlasGpuTexture.createView()},{binding:4,resource:{buffer:e}},{binding:5,resource:{buffer:t}},...this._renderStrategy.value.bindGroupEntries]})},this._rebuildBindGroup(),this._initialized=!0,this._initViewportData){for(let e of this._initViewportData)this.renderText(e);this._initViewportData=void 0}}_refreshRenderStrategy(e){if(this._renderStrategy.value?.type==="viewport"||e.endLineNumber<iH.maxSupportedLines&&this._viewportMaxColumn(e)<iH.maxSupportedColumns)return;this._logService.trace(`File is larger than ${iH.maxSupportedLines} lines or ${iH.maxSupportedColumns} columns, switching to viewport render strategy`);let t=this._instantiationService.createInstance(iW,this._context,this._viewGpuContext,this._device,this._glyphRasterizer);this._renderStrategy.value=t,this._register(t.onDidChangeBindGroupEntries(()=>this._rebuildBindGroup?.())),this._rebuildBindGroup?.()}_viewportMaxColumn(e){let t=0;for(let i=e.startLineNumber;i<=e.endLineNumber;i++)t=Math.max(t,e.getViewLineRenderingData(i).maxColumn);return t}_updateAtlasStorageBufferAndTexture(){for(let[e,t]of iD.n.atlas.pages.entries()){if(e>=iT.L.maximumPageCount){console.log(`Attempt to upload atlas page [${e}], only ${iT.L.maximumPageCount} are supported currently`);continue}if(t.version===this._atlasGpuTextureVersions[e])continue;this._logService.trace("Updating atlas page[",e,"] from version ",this._atlasGpuTextureVersions[e]," to version ",t.version);let i=new Float32Array(6*iN.g.maximumGlyphCount),n=0;for(let e of t.glyphs)i[n+0]=e.x,i[n+0+1]=e.y,i[n+2]=e.w,i[n+2+1]=e.h,i[n+4]=e.originOffsetX,i[n+4+1]=e.originOffsetY,n+=6;if(n/6>iN.g.maximumGlyphCount)throw Error(`Attempting to write more glyphs (${n/6}) than the GPUBuffer can hold (${iN.g.maximumGlyphCount})`);this._device.queue.writeBuffer(this._glyphStorageBuffer,6*e*iN.g.maximumGlyphCount*Float32Array.BYTES_PER_ELEMENT,i,0,6*iN.g.maximumGlyphCount),t.usedArea.right-t.usedArea.left>0&&t.usedArea.bottom-t.usedArea.top>0&&this._device.queue.copyExternalImageToTexture({source:t.source},{texture:this._atlasGpuTexture,origin:{x:t.usedArea.left,y:t.usedArea.top,z:e}},{width:t.usedArea.right-t.usedArea.left+1,height:t.usedArea.bottom-t.usedArea.top+1}),this._atlasGpuTextureVersions[e]=t.version}}prepareRender(e){throw new C.D7("Should not be called")}render(e){throw new C.D7("Should not be called")}onConfigurationChanged(e){return this._refreshGlyphRasterizer(),!0}onCursorStateChanged(e){return!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onLineMappingChanged(e){return!0}onRevealRangeRequest(e){return!0}onScrollChanged(e){return!0}onThemeChanged(e){return!0}onZonesChanged(e){return!0}_refreshGlyphRasterizer(){let e=this._glyphRasterizer.value;if(!e)return;let t=this._context.configuration.options.get(58),i=this._context.configuration.options.get(61),n=this._viewGpuContext.devicePixelRatio.get();(e.fontFamily!==t||e.fontSize!==i||e.devicePixelRatio!==n)&&(this._glyphRasterizer.value=new iV.O(i,t,n,iD.n.decorationStyleCache))}renderText(e){if(this._initialized)return this._refreshRenderStrategy(e),this._renderText(e);this._initViewportData=this._initViewportData??[],this._initViewportData.push(e)}_renderText(e){this._viewGpuContext.rectangleRenderer.draw(e);let t=new tN(this._context.configuration,this._context.theme.type);this._renderStrategy.value.update(e,t),this._updateAtlasStorageBufferAndTexture();let i=this._device.createCommandEncoder({label:"Monaco command encoder"});this._renderPassColorAttachment.view=this._viewGpuContext.ctx.getCurrentTexture().createView({label:"Monaco canvas texture view"});let n=i.beginRenderPass(this._renderPassDescriptor);n.setPipeline(this._pipeline),n.setVertexBuffer(0,this._vertexBuffer);let s=Math.ceil(this._viewGpuContext.contentLeft.get()*this._viewGpuContext.devicePixelRatio.get());n.setScissorRect(s,0,this.canvas.width-s,this.canvas.height),n.setBindGroup(0,this._bindGroup),this._renderStrategy.value.draw(n,e),n.end();let o=i.finish();this._device.queue.submit([o]),this._lastViewportData=e,this._lastViewLineOptions=t}linesVisibleRangesForRange(e,t){if(!this._lastViewportData)return null;let i=e.endLineNumber,n=et.Q.intersectRanges(e,this._lastViewportData.visibleRange);if(!n)return null;let s=this._lastViewportData.startLineNumber,o=this._lastViewportData.endLineNumber,r=this._lastViewportData,a=this._lastViewLineOptions;if(!r||!a)return null;let l=[],h=0;t&&(h=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new ee.y(n.startLineNumber,1)).lineNumber);for(let e=n.startLineNumber;e<=n.endLineNumber;e++){if(e<s||e>o)continue;let r=e===n.startLineNumber?n.startColumn:1,d=e!==i,c=d?this._context.viewModel.getLineMaxColumn(e):n.endColumn,u=this._visibleRangesForLineRange(e,r,c);u&&(t&&e<i&&h!==(h=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new ee.y(e+1,1)).lineNumber)&&(u.ranges[u.ranges.length-1].width+=a.spaceWidth),l.push(new eq.BG(u.outsideRenderedLine,e,eq.Y.from(u.ranges),d)))}return 0===l.length?null:l}_visibleRangesForLineRange(e,t,i){let n;if(this.shouldRender())return null;let s=this._lastViewportData,o=this._lastViewLineOptions;if(!s||!o||e<s.startLineNumber||e>s.endLineNumber)return null;let r=s.getViewLineRenderingData(e),a=r.content;r.isBasicASCII&&o.useMonospaceOptimizations||(n=iO(r,o));let l="",h=0,d=0;for(let e=0;e<t-1;e++){if(r.isBasicASCII&&o.useMonospaceOptimizations)l=a.charAt(e);else{if(void 0===(l=n.getSegmentAtIndex(e)))continue;d+=this._renderStrategy.value.glyphRasterizer.getTextMetrics(l).width/(0,b.fz)().devicePixelRatio-o.spaceWidth}" "===l?h=ei.A.nextRenderTabStop(h,r.tabSize):h++}let c=h,u=0;for(let e=t-1;e<i-1;e++){if(r.isBasicASCII&&o.useMonospaceOptimizations)l=a.charAt(e);else{if(void 0===(l=n.getSegmentAtIndex(e)))continue;u+=this._renderStrategy.value.glyphRasterizer.getTextMetrics(l).width/(0,b.fz)().devicePixelRatio-o.spaceWidth}" "===l?c=ei.A.nextRenderTabStop(c,r.tabSize):c++}return new eq.pj(!1,[new eq.IO(h*o.spaceWidth+d,(c-h)*o.spaceWidth+u)])}visibleRangeForPosition(e){let t=this._visibleRangesForLineRange(e.lineNumber,e.column,e.column);return t?new eq.qN(t.outsideRenderedLine,t.ranges[0].left):null}getLineWidth(e){if(!this._lastViewportData||!this._lastViewLineOptions||!this._viewGpuContext.canRender(this._lastViewLineOptions,this._lastViewportData,e))return;let t=this._lastViewportData.getViewLineRenderingData(e),i=this._visibleRangesForLineRange(e,1,t.maxColumn),n=i?.ranges.at(-1);if(n)return n.width}getPositionAtCoordinate(e,t){if(!this._lastViewportData||!this._lastViewLineOptions||!this._viewGpuContext.canRender(this._lastViewLineOptions,this._lastViewportData,e))return;let i=this._lastViewportData.getViewLineRenderingData(e),n=i.content,s=(0,b.fz)().devicePixelRatio,o=t*s,r=this._lastViewLineOptions.spaceWidth*s,a=iO(i,this._lastViewLineOptions),l=0,h=0,d=0,c=0;for(let e=0;e<n.length;e++){let t=a.getSegmentAtIndex(e);if(void 0===t){c++;continue}if(" "===t){let t=e+d;h=r*((d=ei.A.nextRenderTabStop(e+d,i.tabSize))-t),d-=e+1}else h=i.isBasicASCII&&this._lastViewLineOptions.useMonospaceOptimizations?r:this._renderStrategy.value.glyphRasterizer.getTextMetrics(t).width;if(o<l+h/2)break;l+=h,c++}return new ee.y(e,c+1)}};iU=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([iz(2,iL._Y),iz(3,eF.rr)],iU),i(11679);var ij=i(15957),i$=i(63891),iK=i(49195);class iG extends Z{}class iq{_getPageOfLine(e,t){return Math.floor((e-1)/t)}_getRangeForPage(e,t){let i=e*t;return new et.Q(i+1,1,i+t+1,1)}fromEditorSelection(e,t,i,n){let s,o,r,a=this._getPageOfLine(t.startLineNumber,i),l=this._getRangeForPage(a,i),h=this._getPageOfLine(t.endLineNumber,i),d=this._getRangeForPage(h,i),c=l.intersectRanges(new et.Q(1,1,t.startLineNumber,t.startColumn));if(n&&e.getValueLengthInRange(c,1)>500){let t=e.modifyPosition(c.getEndPosition(),-500);c=et.Q.fromPositions(t,c.getEndPosition())}let u=e.getValueInRange(c,1),g=e.getLineCount(),p=e.getLineMaxColumn(g),m=d.intersectRanges(new et.Q(t.endLineNumber,t.endColumn,g,p));if(n&&e.getValueLengthInRange(m,1)>500){let t=e.modifyPosition(m.getStartPosition(),500);m=et.Q.fromPositions(m.getStartPosition(),t)}let f=e.getValueInRange(m,1);if(a===h||a+1===h)s=e.getValueInRange(t,1);else{let i=l.intersectRanges(t),n=d.intersectRanges(t);s=e.getValueInRange(i,1)+String.fromCharCode(8230)+e.getValueInRange(n,1)}return n&&s.length>1e3&&(s=s.substring(0,500)+String.fromCharCode(8230)+s.substring(s.length-500,s.length)),0===t.getDirection()?(o=u.length,r=u.length+s.length):(r=u.length,o=u.length+s.length),{value:u+s+f,selection:t,selectionStart:o,selectionEnd:r,startPositionWithinEditor:c.getStartPosition(),newlineCountBeforeSelection:c.endLineNumber-c.startLineNumber}}}function iQ(e,t){if(1===e.get(2)){let e=t.lookupKeybinding("editor.action.toggleScreenReaderAccessibilityMode")?.getAriaLabel(),i=t.lookupKeybinding("workbench.action.showCommands")?.getAriaLabel(),n=t.lookupKeybinding("workbench.action.openGlobalKeybindings")?.getAriaLabel(),s=ij.kg(56,"The editor is not accessible at this time.");return e?ij.kg(57,"{0} To enable screen reader optimized mode, use {1}",s,e):i?ij.kg(58,"{0} To enable screen reader optimized mode, open the quick pick with {1} and run the command Toggle Screen Reader Accessibility Mode, which is currently not triggerable via keyboard.",s,i):n?ij.kg(59,"{0} Please assign a keybinding for the command Toggle Screen Reader Accessibility Mode by accessing the keybindings editor with {1} and run it.",s,n):s}return e.get(8)}function iY(e){let t=0,i=-1;for(;-1!==(i=e.indexOf("\n",i+1));)t++;return t}var iZ=i(21348),iX=function(e,t){return function(i,n){t(i,n,e)}};class iJ{constructor(e,t,i,n,s){this._context=e,this.modelLineNumber=t,this.distanceToModelLineStart=i,this.widthOfHiddenLineTextBefore=n,this.distanceToModelLineEnd=s,this._visibleTextAreaBrand=void 0,this.startPosition=null,this.endPosition=null,this.visibleTextareaStart=null,this.visibleTextareaEnd=null,this._previousPresentation=null}prepareRender(e){let t=new ee.y(this.modelLineNumber,this.distanceToModelLineStart+1),i=new ee.y(this.modelLineNumber,this._context.viewModel.model.getLineMaxColumn(this.modelLineNumber)-this.distanceToModelLineEnd);this.startPosition=this._context.viewModel.coordinatesConverter.convertModelPositionToViewPosition(t),this.endPosition=this._context.viewModel.coordinatesConverter.convertModelPositionToViewPosition(i),this.startPosition.lineNumber===this.endPosition.lineNumber?(this.visibleTextareaStart=e.visibleRangeForPosition(this.startPosition),this.visibleTextareaEnd=e.visibleRangeForPosition(this.endPosition)):(this.visibleTextareaStart=null,this.visibleTextareaEnd=null)}definePresentation(e){return this._previousPresentation||(e?this._previousPresentation=e:this._previousPresentation={foreground:1,italic:!1,bold:!1,underline:!1,strikethrough:!1}),this._previousPresentation}}let i0=x.gm,i1=class extends iG{constructor(e,t,i,n,s,o){super(e),this._keybindingService=s,this._instantiationService=o,this._primaryCursorPosition=new ee.y(1,1),this._primaryCursorVisibleRange=null,this._viewController=i,this._visibleRangeProvider=n,this._scrollLeft=0,this._scrollTop=0;let r=this._context.configuration.options,a=r.get(165);this._setAccessibilityOptions(r),this._contentLeft=a.contentLeft,this._contentWidth=a.contentWidth,this._contentHeight=a.height,this._fontInfo=r.get(59),this._emptySelectionClipboard=r.get(45),this._copyWithSyntaxHighlighting=r.get(31),this._visibleTextArea=null,this._selections=[new ey.L(1,1,1,1)],this._modelSelections=[new ey.L(1,1,1,1)],this._lastRenderPosition=null,this.textArea=(0,q.Z)(document.createElement("textarea")),X.write(this.textArea,7),this.textArea.setClassName(`inputarea ${tD}`),this.textArea.setAttribute("wrap",this._textAreaWrapping&&!this._visibleTextArea?"on":"off");let{tabSize:l}=this._context.viewModel.model.getOptions();this.textArea.domNode.style.tabSize=`${l*this._fontInfo.spaceWidth}px`,this.textArea.setAttribute("autocorrect","off"),this.textArea.setAttribute("autocapitalize","off"),this.textArea.setAttribute("autocomplete","off"),this.textArea.setAttribute("spellcheck","false"),this.textArea.setAttribute("aria-label",iQ(r,this._keybindingService)),this.textArea.setAttribute("aria-required",r.get(9)?"true":"false"),this.textArea.setAttribute("tabindex",String(r.get(140))),this.textArea.setAttribute("role","textbox"),this.textArea.setAttribute("aria-roledescription",ij.kg(60,"editor")),this.textArea.setAttribute("aria-multiline","true"),this.textArea.setAttribute("aria-autocomplete",r.get(104)?"none":"both"),this._ensureReadOnlyAttribute(),this.textAreaCover=(0,q.Z)(document.createElement("div")),this.textAreaCover.setPosition("absolute"),t.appendChild(this.textArea),t.appendChild(this.textAreaCover);let h=new iq,d=this._register(new ej(this.textArea.domNode));this._textAreaInput=this._register(this._instantiationService.createInstance(eU,{getDataToCopy:()=>(0,eB.Ps)(this._context.viewModel,this._modelSelections,this._emptySelectionClipboard,this._copyWithSyntaxHighlighting),getScreenReaderContent:()=>{if(1===this._accessibilitySupport){let e=this._selections[0];if(I.zx&&e.isEmpty()){let t=e.getStartPosition(),i=this._getWordBeforePosition(t);if(0===i.length&&(i=this._getCharacterBeforePosition(t)),i.length>0)return new eW(i,i.length,i.length,et.Q.fromPositions(t),0)}if(I.zx&&!e.isEmpty()&&500>this._context.viewModel.getValueLengthInRange(e,0)){let t=this._context.viewModel.getValueInRange(e,0);return new eW(t,0,t.length,e,0)}if(x.nr&&!e.isEmpty()){let e="vscode-placeholder";return new eW(e,0,e.length,null,void 0)}return eW.EMPTY}if(x.m0){let e=this._selections[0];if(e.isEmpty()){let t=e.getStartPosition(),[i,n]=this._getAndroidWordAtPosition(t);if(i.length>0)return new eW(i,n,n,et.Q.fromPositions(t),0)}return eW.EMPTY}let e=h.fromEditorSelection(this._context.viewModel,this._selections[0],this._accessibilityPageSize,0===this._accessibilitySupport);return eW.fromScreenReaderContentState(e)},deduceModelPosition:(e,t,i)=>this._context.viewModel.deduceModelPositionRelativeToViewPosition(e,t,i)},d,I.OS,{isAndroid:x.m0,isChrome:x.H8,isFirefox:x.gm,isSafari:x.nr})),this._register(this._textAreaInput.onKeyDown(e=>{this._viewController.emitKeyDown(e)})),this._register(this._textAreaInput.onKeyUp(e=>{this._viewController.emitKeyUp(e)})),this._register(this._textAreaInput.onPaste(e=>{let t=!1,i=null,n=null;e.metadata&&(t=this._emptySelectionClipboard&&!!e.metadata.isFromEmptySelection,i=void 0!==e.metadata.multicursorText?e.metadata.multicursorText:null,n=e.metadata.mode),this._viewController.paste(e.text,t,i,n)})),this._register(this._textAreaInput.onCut(()=>{this._viewController.cut()})),this._register(this._textAreaInput.onType(e=>{e.replacePrevCharCnt||e.replaceNextCharCnt||e.positionDelta?this._viewController.compositionType(e.text,e.replacePrevCharCnt,e.replaceNextCharCnt,e.positionDelta):this._viewController.type(e.text)})),this._register(this._textAreaInput.onSelectionChangeRequest(e=>{this._viewController.setSelection(e)})),this._register(this._textAreaInput.onCompositionStart(e=>{let t=this.textArea.domNode,i=this._modelSelections[0],{distanceToModelLineStart:n,widthOfHiddenTextBefore:s}=(()=>{let e=t.value.substring(0,Math.min(t.selectionStart,t.selectionEnd)),n=e.lastIndexOf("\n"),s=e.substring(n+1),o=s.lastIndexOf(" "),r=s.length-o-1,a=i.getStartPosition(),l=Math.min(a.column-1,r),h=a.column-1-l,d=s.substring(0,s.length-l),{tabSize:c}=this._context.viewModel.model.getOptions();return{distanceToModelLineStart:h,widthOfHiddenTextBefore:function(e,t,i,n){if(0===t.length)return 0;let s=e.createElement("div");s.style.position="absolute",s.style.top="-50000px",s.style.width="50000px";let o=e.createElement("span");(0,k.M)(o,i),o.style.whiteSpace="pre",o.style.tabSize=`${n*i.spaceWidth}px`,o.append(t),s.appendChild(o),e.body.appendChild(s);let r=o.offsetWidth;return s.remove(),r}(this.textArea.domNode.ownerDocument,d,this._fontInfo,c)}})(),{distanceToModelLineEnd:o}=(()=>{let e=t.value.substring(Math.max(t.selectionStart,t.selectionEnd)),n=e.indexOf("\n"),s=-1===n?e:e.substring(0,n),o=s.indexOf(" "),r=-1===o?s.length:s.length-o-1,a=i.getEndPosition(),l=Math.min(this._context.viewModel.model.getLineMaxColumn(a.lineNumber)-a.column,r);return{distanceToModelLineEnd:this._context.viewModel.model.getLineMaxColumn(a.lineNumber)-a.column-l}})();this._context.viewModel.revealRange("keyboard",!0,et.Q.fromPositions(this._selections[0].getStartPosition()),0,1),this._visibleTextArea=new iJ(this._context,i.startLineNumber,n,s,o),this.textArea.setAttribute("wrap",this._textAreaWrapping&&!this._visibleTextArea?"on":"off"),this._visibleTextArea.prepareRender(this._visibleRangeProvider),this._render(),this.textArea.setClassName(`inputarea ${tD} ime-input`),this._viewController.compositionStart(),this._context.viewModel.onCompositionStart()})),this._register(this._textAreaInput.onCompositionUpdate(e=>{this._visibleTextArea&&(this._visibleTextArea.prepareRender(this._visibleRangeProvider),this._render())})),this._register(this._textAreaInput.onCompositionEnd(()=>{this._visibleTextArea=null,this.textArea.setAttribute("wrap",this._textAreaWrapping&&!this._visibleTextArea?"on":"off"),this._render(),this.textArea.setClassName(`inputarea ${tD}`),this._viewController.compositionEnd(),this._context.viewModel.onCompositionEnd()})),this._register(this._textAreaInput.onFocus(()=>{this._context.viewModel.setHasFocus(!0)})),this._register(this._textAreaInput.onBlur(()=>{this._context.viewModel.setHasFocus(!1)})),this._register(i$.M.onDidChange(()=>{this._ensureReadOnlyAttribute()}))}get domNode(){return this.textArea}writeScreenReaderContent(e){this._textAreaInput.writeNativeTextAreaContent(e)}dispose(){super.dispose(),this.textArea.domNode.remove(),this.textAreaCover.domNode.remove()}_getAndroidWordAtPosition(e){let t=this._context.viewModel.getLineContent(e.lineNumber),i=(0,iZ.i)('`~!@#$%^&*()-=+[{]}\\|;:",.<>/?',[]),n=!0,s=e.column,o=!0,r=e.column,a=0;for(;a<50&&(n||o);){if(n&&s<=1&&(n=!1),n){let e=t.charCodeAt(s-2);0!==i.get(e)?n=!1:s--}if(o&&r>t.length&&(o=!1),o){let e=t.charCodeAt(r-1);0!==i.get(e)?o=!1:r++}a++}return[t.substring(s-1,r-1),e.column-s]}_getWordBeforePosition(e){let t=this._context.viewModel.getLineContent(e.lineNumber),i=(0,iZ.i)(this._context.configuration.options.get(148),[]),n=e.column,s=0;for(;n>1;){let o=t.charCodeAt(n-2);if(0!==i.get(o)||s>50)return t.substring(n-1,e.column-1);s++,n--}return t.substring(0,e.column-1)}_getCharacterBeforePosition(e){if(e.column>1){let t=this._context.viewModel.getLineContent(e.lineNumber).charAt(e.column-2);if(!eA.pc(t.charCodeAt(0)))return t}return""}_setAccessibilityOptions(e){this._accessibilitySupport=e.get(2);let t=e.get(3);2===this._accessibilitySupport&&t===A.qB.accessibilityPageSize.defaultValue?this._accessibilityPageSize=500:this._accessibilityPageSize=t;let i=e.get(165).wrappingColumn;if(-1!==i&&1!==this._accessibilitySupport){let t=e.get(59);this._textAreaWrapping=!0,this._textAreaWidth=Math.round(i*t.typicalHalfwidthCharacterWidth)}else this._textAreaWrapping=!1,this._textAreaWidth=+!i0}onConfigurationChanged(e){let t=this._context.configuration.options,i=t.get(165);this._setAccessibilityOptions(t),this._contentLeft=i.contentLeft,this._contentWidth=i.contentWidth,this._contentHeight=i.height,this._fontInfo=t.get(59),this._emptySelectionClipboard=t.get(45),this._copyWithSyntaxHighlighting=t.get(31),this.textArea.setAttribute("wrap",this._textAreaWrapping&&!this._visibleTextArea?"on":"off");let{tabSize:n}=this._context.viewModel.model.getOptions();return this.textArea.domNode.style.tabSize=`${n*this._fontInfo.spaceWidth}px`,this.textArea.setAttribute("aria-label",iQ(t,this._keybindingService)),this.textArea.setAttribute("aria-required",t.get(9)?"true":"false"),this.textArea.setAttribute("tabindex",String(t.get(140))),(e.hasChanged(41)||e.hasChanged(104))&&this._ensureReadOnlyAttribute(),e.hasChanged(2)&&this._textAreaInput.writeNativeTextAreaContent("strategy changed"),!0}onCursorStateChanged(e){return this._selections=e.selections.slice(0),this._modelSelections=e.modelSelections.slice(0),this._textAreaInput.writeNativeTextAreaContent("selection changed"),!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return this._scrollLeft=e.scrollLeft,this._scrollTop=e.scrollTop,!0}onZonesChanged(e){return!0}isFocused(){return this._textAreaInput.isFocused()}focus(){this._textAreaInput.focusTextArea()}refreshFocusState(){this._textAreaInput.refreshFocusState()}getLastRenderData(){return this._lastRenderPosition}setAriaOptions(e){e.activeDescendant?(this.textArea.setAttribute("aria-haspopup","true"),this.textArea.setAttribute("aria-autocomplete","list"),this.textArea.setAttribute("aria-activedescendant",e.activeDescendant)):(this.textArea.setAttribute("aria-haspopup","false"),this.textArea.setAttribute("aria-autocomplete","both"),this.textArea.removeAttribute("aria-activedescendant")),e.role&&this.textArea.setAttribute("role",e.role)}_ensureReadOnlyAttribute(){let e=this._context.configuration.options;!i$.M.enabled||e.get(41)&&e.get(104)?this.textArea.setAttribute("readonly","true"):this.textArea.removeAttribute("readonly")}prepareRender(e){this._primaryCursorPosition=new ee.y(this._selections[0].positionLineNumber,this._selections[0].positionColumn),this._primaryCursorVisibleRange=e.visibleRangeForPosition(this._primaryCursorPosition),this._visibleTextArea?.prepareRender(e)}render(e){this._textAreaInput.writeNativeTextAreaContent("render"),this._render()}_render(){if(this._visibleTextArea){let e=this._visibleTextArea.visibleTextareaStart,t=this._visibleTextArea.visibleTextareaEnd,i=this._visibleTextArea.startPosition,n=this._visibleTextArea.endPosition;if(i&&n&&e&&t&&t.left>=this._scrollLeft&&e.left<=this._scrollLeft+this._contentWidth){let s=this._context.viewLayout.getVerticalOffsetForLineNumber(this._primaryCursorPosition.lineNumber)-this._scrollTop,o=iY(this.textArea.domNode.value.substr(0,this.textArea.domNode.selectionStart)),r=this._visibleTextArea.widthOfHiddenLineTextBefore,a=this._contentLeft+e.left-this._scrollLeft,l=t.left-e.left+1;if(a<this._contentLeft){let e=this._contentLeft-a;a+=e,r+=e,l-=e}l>this._contentWidth&&(l=this._contentWidth);let h=this._context.viewLayout.getLineHeightForLineNumber(i.lineNumber),d=this._context.viewModel.getFontSizeAtPosition(this._primaryCursorPosition),c=this._context.viewModel.getViewLineData(i.lineNumber),u=c.tokens.findTokenIndexAtOffset(i.column-1),g=u===c.tokens.findTokenIndexAtOffset(n.column-1),p=this._visibleTextArea.definePresentation(g?c.tokens.getPresentation(u):null);this.textArea.domNode.scrollTop=o*h,this.textArea.domNode.scrollLeft=r,this._doRender({lastRenderPosition:null,top:s,left:a,width:l,height:h,useCover:!1,color:(tW.dG.getColorMap()||[])[p.foreground],italic:p.italic,bold:p.bold,underline:p.underline,strikethrough:p.strikethrough,fontSize:d})}return}if(!this._primaryCursorVisibleRange)return void this._renderAtTopLeft();let e=this._contentLeft+this._primaryCursorVisibleRange.left-this._scrollLeft;if(e<this._contentLeft||e>this._contentLeft+this._contentWidth)return void this._renderAtTopLeft();let t=this._context.viewLayout.getVerticalOffsetForLineNumber(this._selections[0].positionLineNumber)-this._scrollTop;if(t<0||t>this._contentHeight)return void this._renderAtTopLeft();if(I.zx||2===this._accessibilitySupport){let i=this._primaryCursorPosition.lineNumber,n=this._context.viewLayout.getLineHeightForLineNumber(i);this._doRender({lastRenderPosition:this._primaryCursorPosition,top:t,left:this._textAreaWrapping?this._contentLeft:e,width:this._textAreaWidth,height:n,useCover:!1}),this.textArea.domNode.scrollLeft=this._primaryCursorVisibleRange.left;let s=this._textAreaInput.textAreaState.newlineCountBeforeSelection??iY(this.textArea.domNode.value.substring(0,this.textArea.domNode.selectionStart));this.textArea.domNode.scrollTop=s*n;return}this._doRender({lastRenderPosition:this._primaryCursorPosition,top:t,left:this._textAreaWrapping?this._contentLeft:e,width:this._textAreaWidth,height:+!i0,useCover:!1})}_renderAtTopLeft(){this._doRender({lastRenderPosition:null,top:0,left:0,width:this._textAreaWidth,height:+!i0,useCover:!0})}_doRender(e){this._lastRenderPosition=e.lastRenderPosition;let t=this.textArea,i=this.textAreaCover;(0,k.M)(t,this._fontInfo),t.setTop(e.top),t.setLeft(e.left),t.setWidth(e.width),t.setHeight(e.height),t.setLineHeight(e.height),t.setFontSize(e.fontSize??this._fontInfo.fontSize),t.setColor(e.color?t6.Q1.Format.CSS.formatHex(e.color):""),t.setFontStyle(e.italic?"italic":""),e.bold&&t.setFontWeight("bold"),t.setTextDecoration(`${e.underline?" underline":""}${e.strikethrough?" line-through":""}`),i.setTop(e.useCover?e.top:0),i.setLeft(e.useCover?e.left:0),i.setWidth(e.useCover?e.width:0),i.setHeight(e.useCover?e.height:0);let n=this._context.configuration.options;n.get(66)?i.setClassName("monaco-editor-background textAreaCover "+tP.OUTER_CLASS_NAME):0!==n.get(76).renderType?i.setClassName("monaco-editor-background textAreaCover "+tL.CLASS_NAME):i.setClassName("monaco-editor-background textAreaCover")}};i1=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([iX(4,iK.b),iX(5,iL._Y)],i1),i(80505);let i2=class extends y.jG{constructor(e,t,i){super(),this._domNode=t,this._onFocusChange=i,this._isFocused=!1,this._isPaused=!1,this._register((0,b.ko)(this._domNode,"focus",()=>{e.trace("NativeEditContext.focus"),this._isPaused||this.refreshFocusState()})),this._register((0,b.ko)(this._domNode,"blur",()=>{e.trace("NativeEditContext.blur"),this._isPaused||this._handleFocusedChanged(!1)}))}pause(){this._isPaused=!0}resume(){this._isPaused=!1,this.refreshFocusState()}_handleFocusedChanged(e){this._isFocused!==e&&(this._isFocused=e,this._onFocusChange(this._isFocused))}focus(){this._domNode.focus(),this.refreshFocusState()}refreshFocusState(){let e=(0,b.jG)(this._domNode),t=e?e.activeElement:(0,b.bq)(),i=this._domNode===t;this._handleFocusedChanged(i)}get isFocused(){return this._isFocused}};function i5(e,t,i,n){return e.addEventListener(t,i,n),{dispose(){e.removeEventListener(t,i)}}}i2=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([(o=eF.rr,function(e,t){o(e,t,0)})],i2);var i4=i(29443),i3=i(72667);let i7=(0,eZ.H)("richScreenReaderContent",{createHTML:e=>e}),i9="data-line-number",i8=class extends y.jG{constructor(e,t,i,n){super(),this._domNode=e,this._context=t,this._viewController=i,this._accessibilityService=n,this._selectionChangeListener=this._register(new y.HE),this._accessibilityPageSize=1,this._ignoreSelectionChangeTime=0,this._state=nt.NULL,this._strategy=new ni,this._renderedLines=new Map,this._renderedSelection=new ey.L(1,1,1,1),this.onConfigurationChanged(this._context.configuration.options)}updateScreenReaderContent(e){let t=(0,b.fz)().document.activeElement;if(t&&t===this._domNode.domNode)if(this._accessibilityService.isScreenReaderOptimized()){let t=this._getScreenReaderContentLineIntervals(e);this._state.equals(t)||(this._state=t,this._renderedLines=this._renderScreenReaderContent(t)),this._renderedSelection.equalsSelection(e)||(this._renderedSelection=e,this._setSelectionOnScreenReaderContent(this._context,this._renderedLines,e))}else this._state=nt.NULL,this._setIgnoreSelectionChangeTime("setValue"),this._domNode.domNode.textContent=""}updateScrollTop(e){let t=this._state.intervals;if(!t.length)return;let i=this._context.viewModel.viewLayout,n=t[0].startLine,s=i.getVerticalOffsetForLineNumber(n),o=i.getVerticalOffsetForLineNumber(e.positionLineNumber);this._domNode.domNode.scrollTop=o-s}onFocusChange(e){e?this._selectionChangeListener.value=this._setSelectionChangeListener():this._selectionChangeListener.value=void 0}onConfigurationChanged(e){this._accessibilityPageSize=e.get(3)}onWillCut(){this._setIgnoreSelectionChangeTime("onCut")}onWillPaste(){this._setIgnoreSelectionChangeTime("onWillPaste")}_setIgnoreSelectionChangeTime(e){this._ignoreSelectionChangeTime=Date.now()}_setSelectionChangeListener(){let e=0;return(0,b.ko)(this._domNode.domNode.ownerDocument,"selectionchange",()=>{if((0,b.fz)().document.activeElement!==this._domNode.domNode||!this._accessibilityService.isScreenReaderOptimized()||!i$.M.enabled)return;let t=Date.now(),i=t-e;if(e=t,i<5)return;let n=t-this._ignoreSelectionChangeTime;if(this._ignoreSelectionChangeTime=0,n<100)return;let s=this._getEditorSelectionFromDomRange();s&&this._viewController.setSelection(s)})}_renderScreenReaderContent(e){let t=[],i=new Map;for(let n of e.intervals)for(let e=n.startLine;e<=n.endLine;e++){let n=this._renderLine(e);i.set(e,n),t.push(n.domNode)}return this._setIgnoreSelectionChangeTime("setValue"),this._domNode.domNode.replaceChildren(...t),i}_renderLine(e){let t,i=this._context.viewModel,n=i.getViewLineRenderingData(e),s=this._context.configuration.options,o=s.get(59),r=s.get(133),a=s.get(108),l=s.get(60),h=s.get(40),d=i4.d.filter(n.inlineDecorations,e,n.minColumn,n.maxColumn),c=o.isMonospace&&!h,u=l!==A.Bc.OFF;t="off"===s.get(47)?s.get(113):"none";let g=new i3.zL(c,o.canUseHalfwidthRightwardsArrow,n.content,n.continuesWithWrappedLine,n.isBasicASCII,n.containsRTL,n.minColumn-1,n.tokens,d,n.tabSize,n.startVisibleColumn,o.spaceWidth,o.middotWidth,o.wsmiddotWidth,r,t,a,u,null,null,0,!0),p=new eX.fe(1e4),m=(0,i3.UW)(g,p),f=p.build(),_=i7?.createHTML(f)??f,v=i.viewLayout.getLineHeightForLineNumber(e)+"px",b=document.createElement("div");return b.innerHTML=_,b.style.lineHeight=v,b.style.height=v,b.setAttribute(i9,e.toString()),new i6(b,m.characterMapping)}_setSelectionOnScreenReaderContent(e,t,i){let n=(0,b.fz)().document.getSelection();if(!n)return;let s=i.startLineNumber,o=i.endLineNumber,r=t.get(s),a=t.get(o);if(!r||!a)return;let l=e.viewModel,h=l.model,d=l.coordinatesConverter,c=new et.Q(s,1,s,i.selectionStartColumn),u=d.convertViewRangeToModelRange(c),g=h.getCharacterCountInRange(u),p=new et.Q(o,1,o,i.positionColumn),m=d.convertViewRangeToModelRange(p),f=h.getCharacterCountInRange(m),_=r.characterMapping.getDomPosition(g),v=a.characterMapping.getDomPosition(f),C=r.domNode.firstChild,w=a.domNode.firstChild,y=C.childNodes,S=w.childNodes,k=y.item(_.partIndex),x=S.item(v.partIndex);k.firstChild&&x.firstChild&&(this._setIgnoreSelectionChangeTime("setRange"),n.setBaseAndExtent(k.firstChild,1===i.startColumn?0:_.charIndex+1,x.firstChild,1===i.endColumn?0:v.charIndex+1))}_getScreenReaderContentLineIntervals(e){return this._strategy.fromEditorSelection(this._context.viewModel,e,this._accessibilityPageSize)}_getEditorSelectionFromDomRange(){if(!this._renderedLines)return;let e=(0,b.fz)().document.getSelection();if(!e||0===e.rangeCount)return;let t=e.getRangeAt(0),i=t.startContainer,n=t.endContainer,s=i.parentElement,o=n.parentElement;if(!s||!(0,b.sb)(s)||!o||!(0,b.sb)(o))return;let r=s.parentElement?.parentElement,a=o.parentElement?.parentElement;if(!r||!a)return;let l=r.getAttribute(i9),h=a.getAttribute(i9);if(!l||!h)return;let d=parseInt(l),c=parseInt(h),u=this._renderedLines.get(d)?.characterMapping,g=this._renderedLines.get(c)?.characterMapping;if(!u||!g)return;let p=(0,J.r)(u,s,t.startOffset),m=(0,J.r)(g,o,t.endOffset);return"forward"===e.direction?new ey.L(d,p,c,m):new ey.L(c,m,d,p)}};i8=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([(r=W.j,function(e,t){r(e,t,3)})],i8);class i6{constructor(e,t){this.domNode=e,this.characterMapping=t}}class ne{constructor(e,t){this.startLine=e,this.endLine=t}}class nt{constructor(e,t){this.intervals=t;let i="";for(let n of t)for(let t=n.startLine;t<=n.endLine;t++)i+=e.getLineContent(t)+"\n";this.value=i}equals(e){return this.value===e.value}static get NULL(){return new nt({getLineContent:()=>"",getLineCount:()=>1,getLineMaxColumn:()=>1,getValueInRange:()=>"",getValueLengthInRange:()=>0,modifyPosition:(e,t)=>e},[])}}class ni{constructor(){}_getPageOfLine(e,t){return Math.floor((e-1)/t)}_getRangeForPage(e,t,i){let n=t*i,s=Math.min(n+i,e.getLineCount());return new ne(n+1,s)}fromEditorSelection(e,t,i){let n=this._getPageOfLine(t.startLineNumber,i),s=this._getRangeForPage(e,n,i),o=this._getPageOfLine(t.endLineNumber,i),r=this._getRangeForPage(e,o,i),a=[{startLine:s.startLine,endLine:s.endLine}];return n+1<o&&a.push({startLine:r.startLine,endLine:r.endLine}),new nt(e,a)}}var nn=i(14075);let ns=class extends y.jG{constructor(e,t,i,n){super(),this._domNode=e,this._context=t,this._viewController=i,this._accessibilityService=n,this._selectionChangeListener=this._register(new y.HE),this._accessibilityPageSize=1,this._ignoreSelectionChangeTime=0,this._strategy=new iq,this.onConfigurationChanged(this._context.configuration.options)}updateScreenReaderContent(e){let t=this._domNode.domNode,i=(0,b.fz)().document.activeElement;if(i&&i===t)if(this._accessibilityService.isScreenReaderOptimized()){this._state=this._getScreenReaderContentState(e),t.textContent!==this._state.value&&(this._setIgnoreSelectionChangeTime("setValue"),t.textContent=this._state.value);let i=(0,b.fz)().document.getSelection();if(!i)return;let n=this._getScreenReaderRange(this._state.selectionStart,this._state.selectionEnd);if(!n)return;this._setIgnoreSelectionChangeTime("setRange"),i.setBaseAndExtent(n.anchorNode,n.anchorOffset,n.focusNode,n.focusOffset)}else this._state=void 0,this._setIgnoreSelectionChangeTime("setValue"),this._domNode.domNode.textContent=""}updateScrollTop(e){if(!this._state)return;let t=this._context.viewModel.viewLayout,i=this._state.startPositionWithinEditor.lineNumber,n=t.getVerticalOffsetForLineNumber(i),s=t.getVerticalOffsetForLineNumber(e.positionLineNumber);this._domNode.domNode.scrollTop=s-n}onFocusChange(e){e?this._selectionChangeListener.value=this._setSelectionChangeListener():this._selectionChangeListener.value=void 0}onConfigurationChanged(e){this._accessibilityPageSize=e.get(3)}onWillCut(){this._setIgnoreSelectionChangeTime("onCut")}onWillPaste(){this._setIgnoreSelectionChangeTime("onWillPaste")}_setIgnoreSelectionChangeTime(e){this._ignoreSelectionChangeTime=Date.now()}_setSelectionChangeListener(){let e=0;return(0,b.ko)(this._domNode.domNode.ownerDocument,"selectionchange",()=>{let t=this._accessibilityService.isScreenReaderOptimized();if(!this._state||!t||!i$.M.enabled||(0,b.fz)().document.activeElement!==this._domNode.domNode)return;let i=(0,b.fz)().document.getSelection();if(!i||0===i.rangeCount)return;let n=i.getRangeAt(0),s=Date.now(),o=s-e;if(e=s,o<5)return;let r=s-this._ignoreSelectionChangeTime;this._ignoreSelectionChangeTime=0,r<100||this._viewController.setSelection(this._getEditorSelectionFromDomRange(this._context,this._state,i.direction,n))})}_getScreenReaderContentState(e){let t=this._strategy.fromEditorSelection(this._context.viewModel,e,this._accessibilityPageSize,0===this._accessibilityService.getAccessibilitySupport()),i=this._context.viewModel.model.getPositionAt(1/0),n=t.value;return 1===i.column&&e.getEndPosition().equals(i)&&(n+="\n"),t.value=n,t}_getScreenReaderRange(e,t){let i=this._domNode.domNode.firstChild;if(!i)return;let n=new globalThis.Range;return n.setStart(i,e),n.setEnd(i,t),{anchorNode:i,anchorOffset:e,focusNode:i,focusOffset:t}}_getEditorSelectionFromDomRange(e,t,i,n){let s=e.viewModel,o=s.model,r=s.coordinatesConverter.convertViewPositionToModelPosition(t.startPositionWithinEditor),a=o.getOffsetAt(r),l=n.startOffset+a,h=n.endOffset+a;if(1===o.getEndOfLineSequence()){let e=t.value,i=new nn.a(e),s=i.getPosition(n.startOffset),o=i.getPosition(n.endOffset);l+=s.lineNumber-1,h+=o.lineNumber-1}let d=o.getPositionAt(l),c=o.getPositionAt(h),u="forward"===i?d:c,g="forward"===i?c:d;return ey.L.fromPositions(u,g)}};ns=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([(a=W.j,function(e,t){a(e,t,3)})],ns);var no=function(e,t){return function(i,n){t(i,n,e)}};let nr=class extends y.jG{constructor(e,t,i,n,s){super(),this._domNode=e,this._context=t,this._viewController=i,this._keybindingService=n,this._accessibilityService=s,this._contentLeft=1,this._contentWidth=1,this._contentHeight=1,this._divWidth=1,this._primarySelection=new ey.L(1,1,1,1),this._primaryCursorVisibleRange=null,this._state=this._register(new y.HE),this._instantiateScreenReaderContent(),this._updateConfigurationSettings(),this._updateDomAttributes()}onWillPaste(){this._state.value?.onWillPaste()}onWillCut(){this._state.value?.onWillCut()}handleFocusChange(e){this._state.value?.onFocusChange(e),this.writeScreenReaderContent()}onConfigurationChanged(e){this._instantiateScreenReaderContent(),this._updateConfigurationSettings(),this._updateDomAttributes(),e.hasChanged(2)&&this.writeScreenReaderContent()}_instantiateScreenReaderContent(){let e=this._context.configuration.options.get(107);this._renderRichContent!==e&&(this._renderRichContent=e,this._state.value=this._createScreenReaderContent(e))}_createScreenReaderContent(e){return e?new i8(this._domNode,this._context,this._viewController,this._accessibilityService):new ns(this._domNode,this._context,this._viewController,this._accessibilityService)}_updateConfigurationSettings(){let e=this._context.configuration.options,t=e.get(165),i=t.wrappingColumn;this._contentLeft=t.contentLeft,this._contentWidth=t.contentWidth,this._contentHeight=t.height,this._fontInfo=e.get(59),this._divWidth=Math.round(i*this._fontInfo.typicalHalfwidthCharacterWidth),this._state.value?.onConfigurationChanged(e)}_updateDomAttributes(){let e=this._context.configuration.options;this._domNode.domNode.setAttribute("role","textbox"),this._domNode.domNode.setAttribute("aria-required",e.get(9)?"true":"false"),this._domNode.domNode.setAttribute("aria-multiline","true"),this._domNode.domNode.setAttribute("aria-autocomplete",e.get(104)?"none":"both"),this._domNode.domNode.setAttribute("aria-roledescription",(0,ij.kg)(55,"editor")),this._domNode.domNode.setAttribute("aria-label",iQ(e,this._keybindingService));let t=this._context.viewModel.model.getOptions().tabSize,i=e.get(59).spaceWidth;this._domNode.domNode.style.tabSize=`${t*i}px`;let n=e.get(154),s="inherit"===n?e.get(153):n,o="inherit"===s?e.get(149):s;this._domNode.domNode.style.textWrap="off"===o?"nowrap":"wrap"}onCursorStateChanged(e){this._primarySelection=e.selections[0]??new ey.L(1,1,1,1)}prepareRender(e){this.writeScreenReaderContent(),this._primaryCursorVisibleRange=e.visibleRangeForPosition(this._primarySelection.getPosition())}render(e){if(!this._primaryCursorVisibleRange)return void this._renderAtTopLeft();let t=this._context.viewLayout.getCurrentScrollLeft(),i=this._contentLeft+this._primaryCursorVisibleRange.left-t;if(i<this._contentLeft||i>this._contentLeft+this._contentWidth)return void this._renderAtTopLeft();let n=this._context.viewLayout.getCurrentScrollTop(),s=this._primarySelection.positionLineNumber,o=this._context.viewLayout.getVerticalOffsetForLineNumber(s)-n;if(o<0||o>this._contentHeight)return void this._renderAtTopLeft();let r=this._context.viewLayout.getLineHeightForLineNumber(s);this._doRender(o,this._contentLeft,this._divWidth,r),this._state.value?.updateScrollTop(this._primarySelection)}_renderAtTopLeft(){this._doRender(0,0,this._contentWidth,1)}_doRender(e,t,i,n){(0,k.M)(this._domNode,this._fontInfo),this._domNode.setTop(e),this._domNode.setLeft(t),this._domNode.setWidth(i),this._domNode.setHeight(n),this._domNode.setLineHeight(n)}setAriaOptions(e){e.activeDescendant?(this._domNode.setAttribute("aria-haspopup","true"),this._domNode.setAttribute("aria-autocomplete","list"),this._domNode.setAttribute("aria-activedescendant",e.activeDescendant)):(this._domNode.setAttribute("aria-haspopup","false"),this._domNode.setAttribute("aria-autocomplete","both"),this._domNode.removeAttribute("aria-activedescendant")),e.role&&this._domNode.setAttribute("role",e.role)}writeScreenReaderContent(){this._state.value?.updateScreenReaderContent(this._primarySelection)}};nr=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([no(3,iK.b),no(4,W.j)],nr),(g||(g={})).create=function(e,t){return new e.EditContext(t)};var na=i(39495),nl=function(e,t){return function(i,n){t(i,n,e)}};!function(e){e.NONE="edit-context-composition-none",e.SECONDARY="edit-context-composition-secondary",e.PRIMARY="edit-context-composition-primary"}(p||(p={}));let nh=class extends iG{constructor(e,t,i,n,s,o,r){let a;super(t),this._viewController=n,this._visibleRangeProvider=s,this.logService=r,this._previousEditContextSelection=new iC.L(0,0),this._editContextPrimarySelection=new ey.L(1,1,1,1),this._decorations=[],this._primarySelection=new ey.L(1,1,1,1),this._targetWindowId=-1,this._scrollTop=0,this._scrollLeft=0,this.domNode=new q.D(document.createElement("div")),this.domNode.setClassName("native-edit-context"),this._imeTextArea=new q.D(document.createElement("textarea")),this._imeTextArea.setClassName("ime-text-area"),this._imeTextArea.setAttribute("readonly","true"),this._imeTextArea.setAttribute("tabindex","-1"),this._imeTextArea.setAttribute("aria-hidden","true"),this.domNode.setAttribute("autocorrect","off"),this.domNode.setAttribute("autocapitalize","off"),this.domNode.setAttribute("autocomplete","off"),this.domNode.setAttribute("spellcheck","false"),this._updateDomAttributes(),i.appendChild(this.domNode),i.appendChild(this._imeTextArea),this._parent=i.domNode,this._focusTracker=this._register(new i2(r,this.domNode.domNode,e=>{r.trace("NativeEditContext#handleFocusChange : ",e),this._screenReaderSupport.handleFocusChange(e),this._context.viewModel.setHasFocus(e)}));let l=(0,b.zk)(this.domNode.domNode);this._editContext=g.create(l),this.setEditContextOnDomNode(),this._screenReaderSupport=this._register(o.createInstance(nr,this.domNode,t,this._viewController)),this._register((0,b.ko)(this.domNode.domNode,"copy",e=>{this.logService.trace("NativeEditContext#copy"),this._ensureClipboardGetsEditorSelection(e)})),this._register((0,b.ko)(this.domNode.domNode,"cut",e=>{this.logService.trace("NativeEditContext#cut"),this._screenReaderSupport.onWillCut(),this._ensureClipboardGetsEditorSelection(e),this.logService.trace("NativeEditContext#cut (before viewController.cut)"),this._viewController.cut()})),this._register((0,b.ko)(this.domNode.domNode,"keyup",e=>this._onKeyUp(e))),this._register((0,b.ko)(this.domNode.domNode,"keydown",async e=>this._onKeyDown(e))),this._register((0,b.ko)(this._imeTextArea.domNode,"keyup",e=>this._onKeyUp(e))),this._register((0,b.ko)(this._imeTextArea.domNode,"keydown",async e=>this._onKeyDown(e))),this._register((0,b.ko)(this.domNode.domNode,"beforeinput",async e=>{("insertParagraph"===e.inputType||"insertLineBreak"===e.inputType)&&this._onType(this._viewController,{text:"\n",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:0})})),this._register((0,b.ko)(this.domNode.domNode,"paste",e=>{if(this.logService.trace("NativeEditContext#paste"),e.preventDefault(),!e.clipboardData)return;let[t,i]=eB.Mz.getTextData(e.clipboardData);if(this.logService.trace("NativeEditContext#paste with id : ",i?.id," with text.length: ",t.length),!t)return;i=i||eB.bs.INSTANCE.get(t);let n=!1,s=null,o=null;i&&(n=this._context.configuration.options.get(45)&&!!i.isFromEmptySelection,s=void 0!==i.multicursorText?i.multicursorText:null,o=i.mode),this.logService.trace("NativeEditContext#paste (before viewController.paste)"),this._viewController.paste(t,n,s,o)})),this._register(i5(this._editContext,"textformatupdate",e=>this._handleTextFormatUpdate(e))),this._register(i5(this._editContext,"characterboundsupdate",e=>this._updateCharacterBounds(e))),this._register(i5(this._editContext,"textupdate",e=>{let t=e.text;if(1===t.length){let i=t.charCodeAt(0);if((0,eA.pc)(i)){a=t;return}if((0,eA.LJ)(i)&&a){let i={text:a+t,selectionEnd:e.selectionEnd,selectionStart:e.selectionStart,updateRangeStart:e.updateRangeStart-1,updateRangeEnd:e.updateRangeEnd-1};a=void 0,this._emitTypeEvent(this._viewController,i);return}}this._emitTypeEvent(this._viewController,e)})),this._register(i5(this._editContext,"compositionstart",e=>{this._updateEditContext(),this._viewController.compositionStart(),this._context.viewModel.onCompositionStart()})),this._register(i5(this._editContext,"compositionend",e=>{this._updateEditContext(),this._viewController.compositionEnd(),this._context.viewModel.onCompositionEnd()}));let h=!1;this._register(i$.M.onDidChange(()=>{i$.M.enabled&&h&&(this._focusTracker.resume(),this.domNode.focus(),h=!1),!i$.M.enabled&&this.isFocused()&&(this._focusTracker.pause(),this._imeTextArea.focus(),h=!0)})),this._register(na.q.register(e,this))}dispose(){this.domNode.domNode.editContext=void 0,this.domNode.domNode.blur(),this.domNode.domNode.remove(),this._imeTextArea.domNode.remove(),super.dispose()}setAriaOptions(e){this._screenReaderSupport.setAriaOptions(e)}getLastRenderData(){return this._primarySelection.getPosition()}prepareRender(e){this._screenReaderSupport.prepareRender(e),this._updateSelectionAndControlBounds(e)}render(e){this._screenReaderSupport.render(e)}onCursorStateChanged(e){return this._primarySelection=e.modelSelections[0]??new ey.L(1,1,1,1),this._screenReaderSupport.onCursorStateChanged(e),this._updateEditContext(),!0}onConfigurationChanged(e){return this._screenReaderSupport.onConfigurationChanged(e),this._updateDomAttributes(),!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return this._updateEditContextOnLineChange(e.fromLineNumber,e.fromLineNumber+e.count-1),!0}onLinesDeleted(e){return this._updateEditContextOnLineChange(e.fromLineNumber,e.toLineNumber),!0}onLinesInserted(e){return this._updateEditContextOnLineChange(e.fromLineNumber,e.toLineNumber),!0}_updateEditContextOnLineChange(e,t){this._editContextPrimarySelection.endLineNumber<e||this._editContextPrimarySelection.startLineNumber>t||this._updateEditContext()}onScrollChanged(e){return this._scrollLeft=e.scrollLeft,this._scrollTop=e.scrollTop,!0}onZonesChanged(e){return!0}onWillPaste(){this.logService.trace("NativeEditContext#onWillPaste"),this._onWillPaste()}_onWillPaste(){this._screenReaderSupport.onWillPaste()}onWillCopy(){this.logService.trace("NativeEditContext#onWillCopy"),this.logService.trace("NativeEditContext#isFocused : ",this.domNode.domNode===(0,b.bq)())}writeScreenReaderContent(){this._screenReaderSupport.writeScreenReaderContent()}isFocused(){return this._focusTracker.isFocused}focus(){this._focusTracker.focus(),this.refreshFocusState()}refreshFocusState(){this._focusTracker.refreshFocusState()}setEditContextOnDomNode(){let e=(0,b.zk)(this.domNode.domNode),t=(0,b.Q2)(e);this._targetWindowId!==t&&(this.domNode.domNode.editContext=this._editContext,this._targetWindowId=t)}_onKeyUp(e){this._viewController.emitKeyUp(new eO.Z(e))}_onKeyDown(e){let t=new eO.Z(e);114===t.keyCode&&t.stopPropagation(),this._viewController.emitKeyDown(t)}_updateDomAttributes(){let e=this._context.configuration.options;this.domNode.domNode.setAttribute("tabindex",String(e.get(140)))}_updateEditContext(){let e=this._getNewEditContextState();e&&(this._editContext.updateText(0,Number.MAX_SAFE_INTEGER,e.text??" "),this._editContext.updateSelection(e.selectionStartOffset,e.selectionEndOffset),this._editContextPrimarySelection=e.editContextPrimarySelection,this._previousEditContextSelection=new iC.L(e.selectionStartOffset,e.selectionEndOffset))}_emitTypeEvent(e,t){if(!this._editContext)return;let i=this._previousEditContextSelection.endExclusive,n=this._previousEditContextSelection.start;this._previousEditContextSelection=new iC.L(t.selectionStart,t.selectionEnd);let s=0,o=0;t.updateRangeEnd>i&&(s=t.updateRangeEnd-i),t.updateRangeStart<n&&(o=n-t.updateRangeStart);let r="";n<t.updateRangeStart&&(r+=this._editContext.text.substring(n,t.updateRangeStart)),r+=t.text,i>t.updateRangeEnd&&(r+=this._editContext.text.substring(t.updateRangeEnd,i));let a=0;t.selectionStart===t.selectionEnd&&n===i&&(a=t.selectionStart-(t.updateRangeStart+t.text.length));let l={text:r,replacePrevCharCnt:o,replaceNextCharCnt:s,positionDelta:a};this._onType(e,l)}_onType(e,t){t.replacePrevCharCnt||t.replaceNextCharCnt||t.positionDelta?e.compositionType(t.text,t.replacePrevCharCnt,t.replaceNextCharCnt,t.positionDelta):e.type(t.text)}_getNewEditContextState(){let e=this._primarySelection,t=this._context.viewModel.model;if(!t.isValidRange(e))return;let i=e.startLineNumber,n=e.endLineNumber,s=t.getLineMaxColumn(n),o=new et.Q(i,1,n,s),r=t.getValueInRange(o,0),a=e.startColumn-1,l=r.length+e.endColumn-s;return{text:r,selectionStartOffset:a,selectionEndOffset:l,editContextPrimarySelection:e}}_editContextStartPosition(){return new ee.y(this._editContextPrimarySelection.startLineNumber,1)}_handleTextFormatUpdate(e){if(!this._editContext)return;let t=e.getTextFormats(),i=this._editContextStartPosition(),n=[];t.forEach(e=>{let t=this._context.viewModel.model,s=t.getOffsetAt(i),o=t.getPositionAt(s+e.rangeStart),r=t.getPositionAt(s+e.rangeEnd),a=et.Q.fromPositions(o,r),l=e.underlineThickness.toLowerCase(),h=p.NONE;switch(l){case"thin":h=p.SECONDARY;break;case"thick":h=p.PRIMARY}n.push({range:a,options:{description:"textFormatDecoration",inlineClassName:h}})}),this._decorations=this._context.viewModel.model.deltaDecorations(this._decorations,n)}_updateSelectionAndControlBounds(e){let t;if(!this._parent)return;let i=this._context.configuration.options.get(165).contentLeft,n=this._parent.getBoundingClientRect(),s=this._context.viewModel.coordinatesConverter.convertModelRangeToViewRange(this._primarySelection),o=this._context.viewLayout.getVerticalOffsetForLineNumber(s.startLineNumber),r=n.top+o-this._scrollTop,a=this._context.viewLayout.getVerticalOffsetAfterLineNumber(s.endLineNumber),l=n.left+i-this._scrollLeft;if(this._primarySelection.isEmpty()){let i=e.visibleRangeForPosition(s.getStartPosition());i&&(l+=i.left),t=0}else t=n.width-i;let h=new DOMRect(l,r,t,a-o);this._editContext.updateSelectionBounds(h),this._editContext.updateControlBounds(h)}_updateCharacterBounds(e){if(!this._parent)return;let t=this._context.configuration.options,i=t.get(59).typicalHalfwidthCharacterWidth,n=t.get(165).contentLeft,s=this._parent.getBoundingClientRect(),o=[],r=new nn.a(this._editContext.text);for(let t=e.rangeStart;t<e.rangeEnd;t++){let e=r.getPosition(t),a=this._editContextPrimarySelection.startLineNumber-1,l=new ee.y(a+e.lineNumber,e.column),h=l.delta(0,1),d=et.Q.fromPositions(l,h),c=this._context.viewModel.coordinatesConverter.convertModelRangeToViewRange(d),u=this._visibleRangeProvider.linesVisibleRangesForRange(c,!0)??[],g=c.startLineNumber,p=this._context.viewLayout.getVerticalOffsetForLineNumber(g),m=s.top+p-this._scrollTop,f=0,_=i;if(u.length>0)for(let e of u[0].ranges){f=e.left,_=e.width;break}let v=this._context.viewLayout.getLineHeightForLineNumber(g);o.push(new DOMRect(s.left+n+f-this._scrollLeft,m,_,v))}this._editContext.updateCharacterBounds(e.rangeStart,o)}_ensureClipboardGetsEditorSelection(e){let t,i=this._context.configuration.options,n=i.get(45),s=i.get(31),o=this._context.viewModel.getCursorStates().map(e=>e.modelState.selection),r=(0,eB.Ps)(this._context.viewModel,o,n,s);this.logService.getLevel()===eF.$b.Trace&&(t=(0,eH.b)());let a={version:1,id:t,isFromEmptySelection:r.isFromEmptySelection,multicursorText:r.multicursorText,mode:r.mode};eB.bs.INSTANCE.set(x.gm?r.text.replace(/\r\n/g,"\n"):r.text,a),e.preventDefault(),e.clipboardData&&eB.Mz.setTextData(e.clipboardData,r.text,r.html,a),this.logService.trace("NativeEditContext#_ensureClipboardGetsEditorSelectios with id : ",t," with text.length: ",r.text.length)}};nh=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([nl(5,iL._Y),nl(6,eF.rr)],nh);class nd extends Z{constructor(e,t){super(e),this._viewGpuContext=t,this._gpuShapes=[],this._register((0,iI.fm)(e=>this._updateEntries(e)))}onConfigurationChanged(e){return this._updateEntries(void 0),!0}prepareRender(e){}render(e){}_updateEntries(e){let t=this._context.configuration.options,i=t.get(116),n=t.get(59).typicalHalfwidthCharacterWidth,s=this._viewGpuContext.devicePixelRatio.read(e);for(let e=0,t=i.length;e<t;e++){let t=i[e],o=this._gpuShapes[e],r=t.color?t6.Q1.fromHex(t.color):this._context.theme.getColor(to.ik)??t6.Q1.white,a=[t.column*n*s,0,Math.max(1,Math.ceil(s)),Number.MAX_SAFE_INTEGER,r.rgba.r/255,r.rgba.g/255,r.rgba.b/255,r.rgba.a];o?o.setRaw(a):this._gpuShapes[e]=this._viewGpuContext.rectangleRenderer.register(...a)}for(;this._gpuShapes.length>i.length;)this._gpuShapes.splice(-1,1)[0].dispose()}}i(24671);class nc extends ts{static{this.CLASS_NAME="gpu-mark"}constructor(e,t){super(),this._viewGpuContext=t,this._context=e,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){return!0}onCursorStateChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}onDecorationsChanged(e){return!0}prepareRender(e){let t=e.visibleRange.startLineNumber,i=e.visibleRange.endLineNumber,n=e.viewportData,s=new tN(this._context.configuration,this._context.theme.type),o=[];for(let e=t;e<=i;e++){let i=e-t,r=this._viewGpuContext.canRenderDetailed(s,n,e);o[i]=r.length?`<div class="${nc.CLASS_NAME}" title="Cannot render on GPU: ${r.join(", ")}"></div>`:""}this._renderResult=o}render(e,t){if(!this._renderResult)return"";let i=t-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}}let nu=class extends Y.i{constructor(e,t,i,n,s,o,r,a,l){super(),this._instantiationService=l,this._shouldRecomputeGlyphMarginLanes=!1,this._ownerID=t,this._widgetFocusTracker=this._register(new nm(e,a)),this._register(this._widgetFocusTracker.onChange(()=>{this._context.viewModel.setHasWidgetFocus(this._widgetFocusTracker.hasFocus())})),this._selections=[new ey.L(1,1,1,1)],this._renderAnimationFrame=null,this._overflowGuardContainer=(0,q.Z)(document.createElement("div")),X.write(this._overflowGuardContainer,3),this._overflowGuardContainer.setClassName("overflow-guard"),this._viewController=new eY(n,o,r,i),this._context=new ix(n,s,o),this._context.addEventHandler(this),this._viewParts=[],this._editContextEnabled=this._context.configuration.options.get(170),this._accessibilitySupport=this._context.configuration.options.get(2),this._editContext=this._instantiateEditContext(),this._viewParts.push(this._editContext),this._linesContent=(0,q.Z)(document.createElement("div")),this._linesContent.setClassName("lines-content monaco-editor-background"),this._linesContent.setPosition("absolute"),this.domNode=(0,q.Z)(document.createElement("div")),this.domNode.setClassName(this._getEditorClassName()),this.domNode.setAttribute("role","code"),"on"===this._context.configuration.options.get(46)&&(this._viewGpuContext=this._instantiationService.createInstance(iD.n,this._context)),this._scrollbar=new tu(this._context,this._linesContent,this.domNode,this._overflowGuardContainer),this._viewParts.push(this._scrollbar),this._viewLines=new tR(this._context,this._viewGpuContext,this._linesContent),this._viewGpuContext&&(this._viewLinesGpu=this._instantiationService.createInstance(iU,this._context,this._viewGpuContext)),this._viewZones=new ib(this._context),this._viewParts.push(this._viewZones);let h=new ii(this._context);this._viewParts.push(h);let d=new ia(this._context);this._viewParts.push(d);let c=new e4(this._context);this._viewParts.push(c),c.addDynamicOverlay(new th(this._context)),c.addDynamicOverlay(new iu(this._context)),c.addDynamicOverlay(new tk(this._context)),c.addDynamicOverlay(new tc(this._context)),c.addDynamicOverlay(new iw(this._context));let u=new e3(this._context);this._viewParts.push(u),u.addDynamicOverlay(new td(this._context)),u.addDynamicOverlay(new tA(this._context)),u.addDynamicOverlay(new tO(this._context)),u.addDynamicOverlay(new tL(this._context)),this._viewGpuContext&&u.addDynamicOverlay(new nc(this._context,this._viewGpuContext)),this._glyphMarginWidgets=new t_(this._context),this._viewParts.push(this._glyphMarginWidgets);let g=new tP(this._context);g.getDomNode().appendChild(this._viewZones.marginDomNode),g.getDomNode().appendChild(u.getDomNode()),g.getDomNode().appendChild(this._glyphMarginWidgets.domNode),this._viewParts.push(g),this._contentWidgets=new e8(this._context,this.domNode),this._viewParts.push(this._contentWidgets),this._viewCursors=new i_(this._context),this._viewParts.push(this._viewCursors),this._overlayWidgets=new t8(this._context,this.domNode),this._viewParts.push(this._overlayWidgets);let p=this._viewGpuContext?new nd(this._context,this._viewGpuContext):new ir(this._context);this._viewParts.push(p);let m=new e9(this._context);this._viewParts.push(m);let f=new t3(this._context);if(this._viewParts.push(f),h){let e=this._scrollbar.getOverviewRulerLayoutInfo();e.parent.insertBefore(h.getDomNode(),e.insertBefore)}this._linesContent.appendChild(c.getDomNode()),"domNode"in p&&this._linesContent.appendChild(p.domNode),this._linesContent.appendChild(this._viewZones.domNode),this._linesContent.appendChild(this._viewLines.getDomNode()),this._linesContent.appendChild(this._contentWidgets.domNode),this._linesContent.appendChild(this._viewCursors.getDomNode()),this._overflowGuardContainer.appendChild(g.getDomNode()),this._overflowGuardContainer.appendChild(this._scrollbar.getDomNode()),this._viewGpuContext&&this._overflowGuardContainer.appendChild(this._viewGpuContext.canvas),this._overflowGuardContainer.appendChild(d.getDomNode()),this._overflowGuardContainer.appendChild(this._overlayWidgets.getDomNode()),this._overflowGuardContainer.appendChild(f.getDomNode()),this._overflowGuardContainer.appendChild(m.domNode),this.domNode.appendChild(this._overflowGuardContainer),a?(a.appendChild(this._contentWidgets.overflowingContentWidgetsDomNode.domNode),a.appendChild(this._overlayWidgets.overflowingOverlayWidgetsDomNode.domNode)):(this.domNode.appendChild(this._contentWidgets.overflowingContentWidgetsDomNode),this.domNode.appendChild(this._overlayWidgets.overflowingOverlayWidgetsDomNode)),this._applyLayout(),this._pointerHandler=this._register(new eG(this._context,this._viewController,this._createPointerHandlerHelper()))}_instantiateEditContext(){return this._context.configuration.options.get(170)?this._instantiationService.createInstance(nh,this._ownerID,this._context,this._overflowGuardContainer,this._viewController,this._createTextAreaHandlerHelper()):this._instantiationService.createInstance(i1,this._context,this._overflowGuardContainer,this._viewController,this._createTextAreaHandlerHelper())}_updateEditContext(){let e=this._context.configuration.options.get(170),t=this._context.configuration.options.get(2);if(this._editContextEnabled===e&&this._accessibilitySupport===t)return;this._editContextEnabled=e,this._accessibilitySupport=t;let i=this._editContext.isFocused(),n=this._viewParts.indexOf(this._editContext);this._editContext.dispose(),this._editContext=this._instantiateEditContext(),i&&this._editContext.focus(),-1!==n&&this._viewParts.splice(n,1,this._editContext)}_computeGlyphMarginLanes(){let e=this._context.viewModel.model,t=this._context.viewModel.glyphLanes,i=[],n=0;for(let s of((i=(i=i.concat(e.getAllMarginDecorations().map(e=>{let t=e.options.glyphMargin?.position??es.ZS.Center;return n=Math.max(n,e.range.endLineNumber),{range:e.range,lane:t,persist:e.options.glyphMargin?.persistLane}}))).concat(this._glyphMarginWidgets.getWidgets().map(t=>{let i=e.validateRange(t.preference.range);return n=Math.max(n,i.endLineNumber),{range:i,lane:t.preference.lane}}))).sort((e,t)=>et.Q.compareRangesUsingStarts(e.range,t.range)),t.reset(n),i))t.push(s.lane,s.range,s.persist);return t}_createPointerHandlerHelper(){return{viewDomNode:this.domNode.domNode,linesContentDomNode:this._linesContent.domNode,viewLinesDomNode:this._viewLines.getDomNode().domNode,viewLinesGpu:this._viewLinesGpu,focusTextArea:()=>{this.focus()},dispatchTextAreaEvent:e=>{this._editContext.domNode.domNode.dispatchEvent(e)},getLastRenderData:()=>new el(this._viewCursors.getLastRenderData()||[],this._editContext.getLastRenderData()),renderNow:()=>{this.render(!0,!1)},shouldSuppressMouseDownOnViewZone:e=>this._viewZones.shouldSuppressMouseDownOnViewZone(e),shouldSuppressMouseDownOnWidget:e=>this._contentWidgets.shouldSuppressMouseDownOnWidget(e),getPositionFromDOMInfo:(e,t)=>(this._flushAccumulatedAndRenderNow(),this._viewLines.getPositionFromDOMInfo(e,t)),visibleRangeForPosition:(e,t)=>{this._flushAccumulatedAndRenderNow();let i=new ee.y(e,t);return this._viewLines.visibleRangeForPosition(i)??this._viewLinesGpu?.visibleRangeForPosition(i)??null},getLineWidth:e=>{if(this._flushAccumulatedAndRenderNow(),this._viewLinesGpu){let t=this._viewLinesGpu.getLineWidth(e);if(void 0!==t)return t}return this._viewLines.getLineWidth(e)}}}_createTextAreaHandlerHelper(){return{visibleRangeForPosition:e=>(this._flushAccumulatedAndRenderNow(),this._viewLines.visibleRangeForPosition(e)),linesVisibleRangesForRange:(e,t)=>(this._flushAccumulatedAndRenderNow(),this._viewLines.linesVisibleRangesForRange(e,t))}}_applyLayout(){let e=this._context.configuration.options.get(165);this.domNode.setWidth(e.width),this.domNode.setHeight(e.height),this._overflowGuardContainer.setWidth(e.width),this._overflowGuardContainer.setHeight(e.height),this._linesContent.setWidth(0x1000000),this._linesContent.setHeight(0x1000000)}_getEditorClassName(){let e=this._editContext.isFocused()?" focused":"";return this._context.configuration.options.get(162)+" "+(0,tr.Pz)(this._context.theme.type)+e}handleEvents(e){super.handleEvents(e),this._scheduleRender()}onConfigurationChanged(e){return this.domNode.setClassName(this._getEditorClassName()),this._updateEditContext(),this._applyLayout(),!1}onCursorStateChanged(e){return this._selections=e.selections,!1}onDecorationsChanged(e){return e.affectsGlyphMargin&&(this._shouldRecomputeGlyphMarginLanes=!0),!1}onFocusChanged(e){return this.domNode.setClassName(this._getEditorClassName()),!1}onThemeChanged(e){return this._context.theme.update(e.theme),this.domNode.setClassName(this._getEditorClassName()),!1}dispose(){for(let e of(null!==this._renderAnimationFrame&&(this._renderAnimationFrame.dispose(),this._renderAnimationFrame=null),this._contentWidgets.overflowingContentWidgetsDomNode.domNode.remove(),this._overlayWidgets.overflowingOverlayWidgetsDomNode.domNode.remove(),this._context.removeEventHandler(this),this._viewGpuContext?.dispose(),this._viewLines.dispose(),this._viewLinesGpu?.dispose(),this._viewParts))e.dispose();super.dispose()}_scheduleRender(){if(this._store.isDisposed)throw new C.D7;if(null===this._renderAnimationFrame){this._editContext instanceof nh&&this._editContext.setEditContextOnDomNode();let e=this._createCoordinatedRendering();this._renderAnimationFrame=np.INSTANCE.scheduleCoordinatedRendering({window:b.zk(this.domNode?.domNode),prepareRenderText:()=>{if(this._store.isDisposed)throw new C.D7;try{return e.prepareRenderText()}finally{this._renderAnimationFrame=null}},renderText:()=>{if(this._store.isDisposed)throw new C.D7;return e.renderText()},prepareRender:(t,i)=>{if(this._store.isDisposed)throw new C.D7;return e.prepareRender(t,i)},render:(t,i)=>{if(this._store.isDisposed)throw new C.D7;return e.render(t,i)}})}}_flushAccumulatedAndRenderNow(){let e=this._createCoordinatedRendering();ng(()=>e.prepareRenderText());let t=ng(()=>e.renderText());if(t){let[i,n]=t;ng(()=>e.prepareRender(i,n)),ng(()=>e.render(i,n))}}_getViewPartsToRender(){let e=[],t=0;for(let i of this._viewParts)i.shouldRender()&&(e[t++]=i);return e}_createCoordinatedRendering(){return{prepareRenderText:()=>{if(this._shouldRecomputeGlyphMarginLanes){this._shouldRecomputeGlyphMarginLanes=!1;let e=this._computeGlyphMarginLanes();this._context.configuration.setGlyphMarginDecorationLaneCount(e.requiredLanes)}h.onRenderStart()},renderText:()=>{if(!this.domNode.domNode.isConnected)return null;let e=this._getViewPartsToRender();if(!this._viewLines.shouldRender()&&0===e.length)return null;let t=this._context.viewLayout.getLinesViewportData();this._context.viewModel.setViewport(t.startLineNumber,t.endLineNumber,t.centeredLineNumber);let i=new iS(this._selections,t,this._context.viewLayout.getWhitespaceViewportData(),this._context.viewModel);return this._contentWidgets.shouldRender()&&this._contentWidgets.onBeforeRender(i),this._viewLines.shouldRender()&&(this._viewLines.renderText(i),this._viewLines.onDidRender(),e=this._getViewPartsToRender()),this._viewLinesGpu?.shouldRender()&&(this._viewLinesGpu.renderText(i),this._viewLinesGpu.onDidRender()),[e,new eq.eh(this._context.viewLayout,i,this._viewLines,this._viewLinesGpu)]},prepareRender:(e,t)=>{for(let i of e)i.prepareRender(t)},render:(e,t)=>{for(let i of e)i.render(t),i.onDidRender()}}}delegateVerticalScrollbarPointerDown(e){this._scrollbar.delegateVerticalScrollbarPointerDown(e)}delegateScrollFromMouseWheelEvent(e){this._scrollbar.delegateScrollFromMouseWheelEvent(e)}restoreState(e){this._context.viewModel.viewLayout.setScrollPosition({scrollTop:e.scrollTop,scrollLeft:e.scrollLeft},1),this._context.viewModel.visibleLinesStabilized()}getOffsetForColumn(e,t){let i=this._context.viewModel.model.validatePosition({lineNumber:e,column:t}),n=this._context.viewModel.coordinatesConverter.convertModelPositionToViewPosition(i);this._flushAccumulatedAndRenderNow();let s=this._viewLines.visibleRangeForPosition(new ee.y(n.lineNumber,n.column));return s?s.left:-1}getTargetAtClientPoint(e,t){let i=this._pointerHandler.getTargetAtClientPoint(e,t);return i?e7.convertViewToModelMouseTarget(i,this._context.viewModel.coordinatesConverter):null}createOverviewRuler(e){return new io(this._context,e)}change(e){this._viewZones.changeViewZones(e),this._scheduleRender()}render(e,t){if(t)for(let e of(this._viewLines.forceShouldRender(),this._viewParts))e.forceShouldRender();e?this._flushAccumulatedAndRenderNow():this._scheduleRender()}writeScreenReaderContent(e){this._editContext.writeScreenReaderContent(e)}focus(){this._editContext.focus()}isFocused(){return this._editContext.isFocused()}isWidgetFocused(){return this._widgetFocusTracker.hasFocus()}setAriaOptions(e){this._editContext.setAriaOptions(e)}addContentWidget(e){this._contentWidgets.addWidget(e.widget),this.layoutContentWidget(e),this._scheduleRender()}layoutContentWidget(e){this._contentWidgets.setWidgetPosition(e.widget,e.position?.position??null,e.position?.secondaryPosition??null,e.position?.preference??null,e.position?.positionAffinity??null),this._scheduleRender()}removeContentWidget(e){this._contentWidgets.removeWidget(e.widget),this._scheduleRender()}addOverlayWidget(e){this._overlayWidgets.addWidget(e.widget),this.layoutOverlayWidget(e),this._scheduleRender()}layoutOverlayWidget(e){this._overlayWidgets.setWidgetPosition(e.widget,e.position)&&this._scheduleRender()}removeOverlayWidget(e){this._overlayWidgets.removeWidget(e.widget),this._scheduleRender()}addGlyphMarginWidget(e){this._glyphMarginWidgets.addWidget(e.widget),this._shouldRecomputeGlyphMarginLanes=!0,this._scheduleRender()}layoutGlyphMarginWidget(e){let t=e.position;this._glyphMarginWidgets.setWidgetPosition(e.widget,t)&&(this._shouldRecomputeGlyphMarginLanes=!0,this._scheduleRender())}removeGlyphMarginWidget(e){this._glyphMarginWidgets.removeWidget(e.widget),this._shouldRecomputeGlyphMarginLanes=!0,this._scheduleRender()}};function ng(e){try{return e()}catch(e){return(0,C.dz)(e),null}}nu=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([(l=iL._Y,function(e,t){l(e,t,8)})],nu);class np{static{this.INSTANCE=new np}constructor(){this._coordinatedRenderings=[],this._animationFrameRunners=new Map}scheduleCoordinatedRendering(e){return this._coordinatedRenderings.push(e),this._scheduleRender(e.window),{dispose:()=>{let t=this._coordinatedRenderings.indexOf(e);if(-1!==t&&(this._coordinatedRenderings.splice(t,1),0===this._coordinatedRenderings.length)){for(let[e,t]of this._animationFrameRunners)t.dispose();this._animationFrameRunners.clear()}}}}_scheduleRender(e){if(!this._animationFrameRunners.has(e)){let t=()=>{this._animationFrameRunners.delete(e),this._onRenderScheduled()};this._animationFrameRunners.set(e,b.Oq(e,t,100))}}_onRenderScheduled(){let e=this._coordinatedRenderings.slice(0);for(let t of(this._coordinatedRenderings=[],e))ng(()=>t.prepareRenderText());let t=[];for(let i=0,n=e.length;i<n;i++){let n=e[i];t[i]=ng(()=>n.renderText())}for(let i=0,n=e.length;i<n;i++){let n=e[i],s=t[i];if(!s)continue;let[o,r]=s;ng(()=>n.prepareRender(o,r))}for(let i=0,n=e.length;i<n;i++){let n=e[i],s=t[i];if(!s)continue;let[o,r]=s;ng(()=>n.render(o,r))}}}class nm extends y.jG{constructor(e,t){super(),this._onChange=this._register(new w.vl),this.onChange=this._onChange.event,this._hadFocus=void 0,this._hasDomElementFocus=!1,this._domFocusTracker=this._register(b.w5(e)),this._overflowWidgetsDomNodeHasFocus=!1,this._register(this._domFocusTracker.onDidFocus(()=>{this._hasDomElementFocus=!0,this._update()})),this._register(this._domFocusTracker.onDidBlur(()=>{this._hasDomElementFocus=!1,this._update()})),t&&(this._overflowWidgetsDomNode=this._register(b.w5(t)),this._register(this._overflowWidgetsDomNode.onDidFocus(()=>{this._overflowWidgetsDomNodeHasFocus=!0,this._update()})),this._register(this._overflowWidgetsDomNode.onDidBlur(()=>{this._overflowWidgetsDomNodeHasFocus=!1,this._update()})))}_update(){let e=this._hasDomElementFocus||this._overflowWidgetsDomNodeHasFocus;this._hadFocus!==e&&(this._hadFocus=e,this._onChange.fire(void 0))}hasFocus(){return this._hadFocus??!1}}var nf=i(71544);class n_{constructor(e,t,i,n,s){this.injectionOffsets=e,this.injectionOptions=t,this.breakOffsets=i,this.breakOffsetsVisibleColumn=n,this.wrappedTextIndentLength=s}getOutputLineCount(){return this.breakOffsets.length}getMinOutputOffset(e){return e>0?this.wrappedTextIndentLength:0}getLineLength(e){let t=e>0?this.breakOffsets[e-1]:0,i=this.breakOffsets[e]-t;return e>0&&(i+=this.wrappedTextIndentLength),i}getMaxOutputOffset(e){return this.getLineLength(e)}translateToInputOffset(e,t){e>0&&(t=Math.max(0,t-this.wrappedTextIndentLength));let i=0===e?t:this.breakOffsets[e-1]+t;if(null!==this.injectionOffsets)for(let e=0;e<this.injectionOffsets.length;e++)if(i>this.injectionOffsets[e])i<this.injectionOffsets[e]+this.injectionOptions[e].content.length?i=this.injectionOffsets[e]:i-=this.injectionOptions[e].content.length;else break;return i}translateToOutputPosition(e,t=2){let i=e;if(null!==this.injectionOffsets)for(let n=0;n<this.injectionOffsets.length&&!(e<this.injectionOffsets[n])&&(1===t||e!==this.injectionOffsets[n]);n++)i+=this.injectionOptions[n].content.length;return this.offsetInInputWithInjectionsToOutputPosition(i,t)}offsetInInputWithInjectionsToOutputPosition(e,t=2){let i=0,n=this.breakOffsets.length-1,s=0,o=0;for(;i<=n;){s=i+(n-i)/2|0;let r=this.breakOffsets[s];if(o=s>0?this.breakOffsets[s-1]:0,0===t)if(e<=o)n=s-1;else if(e>r)i=s+1;else break;else if(e<o)n=s-1;else if(e>=r)i=s+1;else break}let r=e-o;return s>0&&(r+=this.wrappedTextIndentLength),new nC(s,r)}normalizeOutputPosition(e,t,i){if(null!==this.injectionOffsets){let n=this.outputPositionToOffsetInInputWithInjections(e,t),s=this.normalizeOffsetInInputWithInjectionsAroundInjections(n,i);if(s!==n)return this.offsetInInputWithInjectionsToOutputPosition(s,i)}if(0===i){if(e>0&&t===this.getMinOutputOffset(e))return new nC(e-1,this.getMaxOutputOffset(e-1))}else if(1===i&&e<this.getOutputLineCount()-1&&t===this.getMaxOutputOffset(e))return new nC(e+1,this.getMinOutputOffset(e+1));return new nC(e,t)}outputPositionToOffsetInInputWithInjections(e,t){return e>0&&(t=Math.max(0,t-this.wrappedTextIndentLength)),(e>0?this.breakOffsets[e-1]:0)+t}normalizeOffsetInInputWithInjectionsAroundInjections(e,t){let i=this.getInjectedTextAtOffset(e);if(!i)return e;if(2===t)if(e===i.offsetInInputWithInjections+i.length&&nv(this.injectionOptions[i.injectedTextIndex].cursorStops))return i.offsetInInputWithInjections+i.length;else{let e=i.offsetInInputWithInjections;if(nb(this.injectionOptions[i.injectedTextIndex].cursorStops))return e;let t=i.injectedTextIndex-1;for(;t>=0&&this.injectionOffsets[t]===this.injectionOffsets[i.injectedTextIndex]&&!nv(this.injectionOptions[t].cursorStops)&&(e-=this.injectionOptions[t].content.length,!nb(this.injectionOptions[t].cursorStops));){;t--}return e}if(1===t||4===t){let e=i.offsetInInputWithInjections+i.length,t=i.injectedTextIndex;for(;t+1<this.injectionOffsets.length&&this.injectionOffsets[t+1]===this.injectionOffsets[t];)e+=this.injectionOptions[t+1].content.length,t++;return e}if(0===t||3===t){let e=i.offsetInInputWithInjections,t=i.injectedTextIndex;for(;t-1>=0&&this.injectionOffsets[t-1]===this.injectionOffsets[t];)e-=this.injectionOptions[t-1].content.length,t--;return e}(0,nf.xb)(t)}getInjectedText(e,t){let i=this.outputPositionToOffsetInInputWithInjections(e,t),n=this.getInjectedTextAtOffset(i);return n?{options:this.injectionOptions[n.injectedTextIndex]}:null}getInjectedTextAtOffset(e){let t=this.injectionOffsets,i=this.injectionOptions;if(null!==t){let n=0;for(let s=0;s<t.length;s++){let o=i[s].content.length,r=t[s]+n,a=t[s]+n+o;if(r>e)break;if(e<=a)return{injectedTextIndex:s,offsetInInputWithInjections:r,length:o};n+=o}}}}function nv(e){return null==e||e===es.VW.Right||e===es.VW.Both}function nb(e){return null==e||e===es.VW.Left||e===es.VW.Both}class nC{constructor(e,t){this.outputLineIndex=e,this.outputOffset=t}toString(){return`${this.outputLineIndex}:${this.outputOffset}`}toPosition(e){return new ee.y(e+this.outputLineIndex,this.outputOffset+1)}}var nw=i(83807);let ny=(0,eZ.H)("domLineBreaksComputer",{createHTML:e=>e});class nS{static create(e){return new nS(new WeakRef(e))}constructor(e){this.targetWindow=e}createLineBreaksComputer(e,t,i,n,s,o){let r=[],a=[];return{addRequest:(e,t,i)=>{r.push(e),a.push(t)},finalize:()=>(function(e,t,i,n,s,o,r,a){function l(e){let i=a[e];if(!i)return null;{let n=nw.uK.applyInjectedText(t[e],i),s=i.map(e=>e.options);return new n_(i.map(e=>e.column-1),s,[n.length],[],0)}}if(-1===s){let e=[];for(let i=0,n=t.length;i<n;i++)e[i]=l(i);return e}let h=Math.round(s*i.typicalHalfwidthCharacterWidth),d=Math.round(n*(3===o?2:+(2===o))),c=Math.ceil(i.spaceWidth*d),u=document.createElement("div");(0,k.M)(u,i);let g=new eX.fe(1e4),p=[],m=[],f=[],_=[],v=[];for(let e=0;e<t.length;e++){let s=nw.uK.applyInjectedText(t[e],a[e]),r=0,l=0,d=h;if(0!==o)if(-1===(r=eA.HG(s)))r=0;else{for(let e=0;e<r;e++){let t=9===s.charCodeAt(e)?n-l%n:1;l+=t}let e=Math.ceil(i.spaceWidth*l);e+i.typicalFullwidthCharacterWidth>h?(r=0,l=0):d=h-e}let u=s.substr(r),b=function(e,t,i,n,s,o){if(0!==o){let e=String(o);s.appendString('<div style="text-indent: -'),s.appendString(e),s.appendString("px; padding-left: "),s.appendString(e),s.appendString("px; box-sizing: border-box; width:")}else s.appendString('<div style="width:');s.appendString(String(n)),s.appendString('px;">');let r=e.length,a=t,l=0,h=[],d=[],c=0<r?e.charCodeAt(0):0;s.appendString("<span>");for(let t=0;t<r;t++){0!==t&&t%16384==0&&s.appendString("</span><span>"),h[t]=l,d[t]=a;let n=c;c=t+1<r?e.charCodeAt(t+1):0;let o=1,u=1;switch(n){case 9:u=o=i-a%i;for(let e=1;e<=o;e++)e<o?s.appendCharCode(160):s.appendASCIICharCode(32);break;case 32:32===c?s.appendCharCode(160):s.appendASCIICharCode(32);break;case 60:s.appendString("<");break;case 62:s.appendString(">");break;case 38:s.appendString("&");break;case 0:s.appendString("�");break;case 65279:case 8232:case 8233:case 133:s.appendCharCode(65533);break;default:eA.ne(n)&&u++,n<32?s.appendCharCode(9216+n):s.appendCharCode(n)}l+=o,a+=u}return s.appendString("</span>"),h[e.length]=l,d[e.length]=a,s.appendString("</div>"),[h,d]}(u,l,n,d,g,c);p[e]=r,m[e]=l,f[e]=u,_[e]=b[0],v[e]=b[1]}let b=g.build();u.innerHTML=ny?.createHTML(b)??b,u.style.position="absolute",u.style.top="10000","keepAll"===r?(u.style.wordBreak="keep-all",u.style.overflowWrap="anywhere"):(u.style.wordBreak="inherit",u.style.overflowWrap="break-word"),e.document.body.appendChild(u);let C=document.createRange(),w=Array.prototype.slice.call(u.children,0),y=[];for(let e=0;e<t.length;e++){let t,i,n=function(e,t,i,n){if(i.length<=1)return null;let s=Array.prototype.slice.call(t.children,0),o=[];try{!function e(t,i,n,s,o,r,a,l){if(s===r||(o=o||nk(t,i,n[s],n[s+1]),a=a||nk(t,i,n[r],n[r+1]),.1>=Math.abs(o[0].top-a[0].top)))return;if(s+1===r)return void l.push(r);let h=s+(r-s)/2|0,d=nk(t,i,n[h],n[h+1]);e(t,i,n,s,o,h,d,l),e(t,i,n,h,d,r,a,l)}(e,s,n,0,null,i.length-1,null,o)}catch(e){return console.log(e),null}return 0===o.length?null:(o.push(i.length),o)}(C,w[e],f[e],_[e]);if(null===n){y[e]=l(e);continue}let s=p[e],o=m[e]+d,r=v[e],h=[];for(let e=0,t=n.length;e<t;e++)h[e]=r[n[e]];if(0!==s)for(let e=0,t=n.length;e<t;e++)n[e]+=s;let c=a[e];c?(t=c.map(e=>e.options),i=c.map(e=>e.column-1)):(t=null,i=null),y[e]=new n_(i,t,n,h,o)}return u.remove(),y})((0,tw.ni)(this.targetWindow.deref()),r,e,t,i,n,s,a)}}}function nk(e,t,i,n){return e.setStart(t[i/16384|0].firstChild,i%16384),e.setEnd(t[n/16384|0].firstChild,n%16384),e.getClientRects()}class nx extends y.jG{constructor(){super(),this._editor=null,this._instantiationService=null,this._instances=this._register(new y.$w),this._pending=new Map,this._finishedInstantiation=[],this._finishedInstantiation[0]=!1,this._finishedInstantiation[1]=!1,this._finishedInstantiation[2]=!1,this._finishedInstantiation[3]=!1}initialize(e,t,i){for(let n of(this._editor=e,this._instantiationService=i,t)){if(this._pending.has(n.id)){(0,C.dz)(Error(`Cannot have two contributions with the same id ${n.id}`));continue}this._pending.set(n.id,n)}this._instantiateSome(0),this._register((0,b.U3)((0,b.zk)(this._editor.getDomNode()),()=>{this._instantiateSome(1)})),this._register((0,b.U3)((0,b.zk)(this._editor.getDomNode()),()=>{this._instantiateSome(2)})),this._register((0,b.U3)((0,b.zk)(this._editor.getDomNode()),()=>{this._instantiateSome(3)},5e3))}saveViewState(){let e={};for(let[t,i]of this._instances)"function"==typeof i.saveViewState&&(e[t]=i.saveViewState());return e}restoreViewState(e){for(let[t,i]of this._instances)"function"==typeof i.restoreViewState&&i.restoreViewState(e[t])}get(e){return this._instantiateById(e),this._instances.get(e)||null}onBeforeInteractionEvent(){this._instantiateSome(2)}onAfterModelAttached(){return(0,b.U3)((0,b.zk)(this._editor?.getDomNode()),()=>{this._instantiateSome(1)},50)}_instantiateSome(e){if(!this._finishedInstantiation[e])for(let t of(this._finishedInstantiation[e]=!0,this._findPendingContributionsByInstantiation(e)))this._instantiateById(t.id)}_findPendingContributionsByInstantiation(e){let t=[];for(let[,i]of this._pending)i.instantiation===e&&t.push(i);return t}_instantiateById(e){let t=this._pending.get(e);if(t){if(this._pending.delete(e),!this._instantiationService||!this._editor)throw Error("Cannot instantiate contributions before being initialized!");try{let e=this._instantiationService.createInstance(t.ctor,this._editor);this._instances.set(t.id,e),"function"==typeof e.restoreViewState&&0!==t.instantiation&&console.warn(`Editor contribution '${t.id}' should be eager instantiated because it uses saveViewState / restoreViewState.`)}catch(e){(0,C.dz)(e)}}}}var nL=i(6581),nD=i(92385),nI=i(45470),nN=i(42506),nE=i(71224),nM=i(88756),nT=i(40466),nR=i(79380);class nO{static create(e){return new nO(e.get(151),e.get(150))}constructor(e,t){this.classifier=new nP(e,t)}createLineBreaksComputer(e,t,i,n,s,o){let r=[],a=[],l=[];return{addRequest:(e,t,i)=>{r.push(e),a.push(t),l.push(i)},finalize:()=>{let h=e.typicalFullwidthCharacterWidth/e.typicalHalfwidthCharacterWidth,d=[];for(let e=0,c=r.length;e<c;e++){let c=a[e],u=l[e];!u||u.injectionOptions||c||o?d[e]=function(e,t,i,n,s,o,r,a,l){let h,d,c=nw.uK.applyInjectedText(t,i);if(i&&i.length>0?(h=i.map(e=>e.options),d=i.map(e=>e.column-1)):(h=null,d=null),-1===s)return h?new n_(d,h,[c.length],[],0):null;let u=c.length;if(u<=1)return h?new n_(d,h,[c.length],[],0):null;let g="keepAll"===a,p=nH(c,n,s,o,r),m=s-p,f=[],_=[],v=0,b=0,C=0,w=s,y=c.charCodeAt(0),S=e.get(y),k=nB(y,0,n,o),x=1;eA.pc(y)&&(k+=1,y=c.charCodeAt(1),S=e.get(y),x++);for(let t=x;t<u;t++){var L,D;let i,s,r=t,a=c.charCodeAt(t);eA.pc(a)?(t++,i=0,s=2):(i=e.get(a),s=nB(a,k,n,o)),nW(y,S,a,i,g)&&(b=r,C=k),k+=s,l&&(L=c,(D=t)>=2&&(D<3||"\\"!==L.charAt(D-3))&&"\\"===L.charAt(D-2)&&"n"===L.charAt(D-1)&&L.includes('"'))&&(k+=w),k>w&&((0===b||k-C>m)&&(b=r,C=k-s),f[v]=b,_[v]=C,v++,w=C+m,b=0),y=a,S=i}return 0!==v||i&&0!==i.length?(f[v]=u,_[v]=k,new n_(d,h,f,_,p)):null}(this.classifier,r[e],c,t,i,h,n,s,o):d[e]=function(e,t,i,n,s,o,r,a){if(-1===s)return null;let l=i.length;if(l<=1)return null;let h="keepAll"===a,d=t.breakOffsets,c=t.breakOffsetsVisibleColumn,u=nH(i,n,s,o,r),g=s-u,p=nA,m=nF,f=0,_=0,v=0,b=s,C=d.length,w=0;{let e=Math.abs(c[w]-b);for(;w+1<C;){let t=Math.abs(c[w+1]-b);if(t>=e)break;e=t,w++}}for(;w<C;){let t=w<0?0:d[w],s=w<0?0:c[w];_>t&&(t=_,s=v);let r=0,a=0,u=0,y=0;if(s<=b){let v=s,C=0===t?0:i.charCodeAt(t-1),w=0===t?0:e.get(C),S=!0;for(let s=t;s<l;s++){let t,l,d=s,c=i.charCodeAt(s);if(eA.pc(c)?(s++,t=0,l=2):(t=e.get(c),l=nB(c,v,n,o)),d>_&&nW(C,w,c,t,h)&&(r=d,a=v),(v+=l)>b){d>_?(u=d,y=v-l):(u=s+1,y=v),v-a>g&&(r=0),S=!1;break}C=c,w=t}if(S){f>0&&(p[f]=d[d.length-1],m[f]=c[d.length-1],f++);break}}if(0===r){let l=s,d=i.charCodeAt(t),c=e.get(d),p=!1;for(let n=t-1;n>=_;n--){let t,s,m=n+1,f=i.charCodeAt(n);if(9===f){p=!0;break}if(eA.LJ(f)?(n--,t=0,s=2):(t=e.get(f),s=eA.ne(f)?o:1),l<=b){if(0===u&&(u=m,y=l),l<=b-g)break;if(nW(f,t,d,c,h)){r=m,a=l;break}}l-=s,d=f,c=t}if(0!==r){let e=g-(y-a);if(e<=n){let t=i.charCodeAt(u);e-(eA.pc(t)?2:nB(t,y,n,o))<0&&(r=0)}}if(p){w--;continue}}if(0===r&&(r=u,a=y),r<=_){let e=i.charCodeAt(_);eA.pc(e)?(r=_+2,a=v+2):(r=_+1,a=v+nB(e,v,n,o))}for(_=r,p[f]=r,v=a,m[f]=a,f++,b=a+g;w<0||w<C&&c[w]<a;)w++;let S=Math.abs(c[w]-b);for(;w+1<C;){let e=Math.abs(c[w+1]-b);if(e>=S)break;S=e,w++}}return 0===f?null:(p.length=f,m.length=f,nA=t.breakOffsets,nF=t.breakOffsetsVisibleColumn,t.breakOffsets=p,t.breakOffsetsVisibleColumn=m,t.wrappedTextIndentLength=u,t)}(this.classifier,u,r[e],t,i,h,n,s)}return nA.length=0,nF.length=0,d}}}}class nP extends nR.V{constructor(e,t){super(0);for(let t=0;t<e.length;t++)this.set(e.charCodeAt(t),1);for(let e=0;e<t.length;e++)this.set(t.charCodeAt(e),2)}get(e){return e>=0&&e<256?this._asciiMap[e]:e>=12352&&e<=12543||e>=13312&&e<=19903||e>=19968&&e<=40959?3:this._map.get(e)||this._defaultValue}}let nA=[],nF=[];function nB(e,t,i,n){return 9===e?i-t%i:eA.ne(e)||e<32?n:1}function nW(e,t,i,n,s){return 32!==i&&(2===t&&2!==n||1!==t&&1===n||!s&&3===t&&2!==n||!s&&3===n&&1!==t)}function nH(e,t,i,n,s){let o=0;if(0!==s){let r=eA.HG(e);if(-1!==r){for(let i=0;i<r;i++){let n=9===e.charCodeAt(i)?t-o%t:1;o+=n}let a=3===s?2:+(2===s);for(let e=0;e<a;e++){let e=t-o%t;o+=e}o+n>i&&(o=0)}}return o}var nV=i(46843),nz=i(6849);class nU{constructor(e){this._selTrackedRange=null,this._trackSelection=!0,this._setState(e,new nz.mG(new et.Q(1,1,1,1),0,0,new ee.y(1,1),0),new nz.mG(new et.Q(1,1,1,1),0,0,new ee.y(1,1),0))}dispose(e){this._removeTrackedRange(e)}startTrackingSelection(e){this._trackSelection=!0,this._updateTrackedRange(e)}stopTrackingSelection(e){this._trackSelection=!1,this._removeTrackedRange(e)}_updateTrackedRange(e){this._trackSelection&&(this._selTrackedRange=e.model._setTrackedRange(this._selTrackedRange,this.modelState.selection,0))}_removeTrackedRange(e){this._selTrackedRange=e.model._setTrackedRange(this._selTrackedRange,null,0)}asCursorState(){return new nz.MF(this.modelState,this.viewState)}readSelectionFromMarkers(e){let t=e.model._getTrackedRange(this._selTrackedRange);return this.modelState.selection.isEmpty()&&!t.isEmpty()?ey.L.fromRange(t.collapseToEnd(),this.modelState.selection.getDirection()):ey.L.fromRange(t,this.modelState.selection.getDirection())}ensureValidState(e){this._setState(e,this.modelState,this.viewState)}setState(e,t,i){this._setState(e,t,i)}static _validatePositionWithCache(e,t,i,n){return t.equals(i)?n:e.normalizePosition(t,2)}static _validateViewState(e,t){let i=t.position,n=t.selectionStart.getStartPosition(),s=t.selectionStart.getEndPosition(),o=e.normalizePosition(i,2),r=this._validatePositionWithCache(e,n,i,o),a=this._validatePositionWithCache(e,s,n,r);return i.equals(o)&&n.equals(r)&&s.equals(a)?t:new nz.mG(et.Q.fromPositions(r,a),t.selectionStartKind,t.selectionStartLeftoverVisibleColumns+n.column-r.column,o,t.leftoverVisibleColumns+i.column-o.column)}_setState(e,t,i){if(i&&(i=nU._validateViewState(e.viewModel,i)),t){let i=e.model.validateRange(t.selectionStart),n=t.selectionStart.equalsRange(i)?t.selectionStartLeftoverVisibleColumns:0,s=e.model.validatePosition(t.position),o=t.position.equals(s)?t.leftoverVisibleColumns:0;t=new nz.mG(i,t.selectionStartKind,n,s,o)}else{if(!i)return;let n=e.model.validateRange(e.coordinatesConverter.convertViewRangeToModelRange(i.selectionStart)),s=e.model.validatePosition(e.coordinatesConverter.convertViewPositionToModelPosition(i.position));t=new nz.mG(n,i.selectionStartKind,i.selectionStartLeftoverVisibleColumns,s,i.leftoverVisibleColumns)}if(i){let n=e.coordinatesConverter.validateViewRange(i.selectionStart,t.selectionStart),s=e.coordinatesConverter.validateViewPosition(i.position,t.position);i=new nz.mG(n,t.selectionStartKind,t.selectionStartLeftoverVisibleColumns,s,t.leftoverVisibleColumns)}else{let n=e.coordinatesConverter.convertModelPositionToViewPosition(new ee.y(t.selectionStart.startLineNumber,t.selectionStart.startColumn)),s=e.coordinatesConverter.convertModelPositionToViewPosition(new ee.y(t.selectionStart.endLineNumber,t.selectionStart.endColumn)),o=new et.Q(n.lineNumber,n.column,s.lineNumber,s.column),r=e.coordinatesConverter.convertModelPositionToViewPosition(t.position);i=new nz.mG(o,t.selectionStartKind,t.selectionStartLeftoverVisibleColumns,r,t.leftoverVisibleColumns)}this.modelState=t,this.viewState=i,this._updateTrackedRange(e)}}class nj{constructor(e){this.context=e,this.cursors=[new nU(e)],this.lastAddedCursorIndex=0}dispose(){for(let e of this.cursors)e.dispose(this.context)}startTrackingSelections(){for(let e of this.cursors)e.startTrackingSelection(this.context)}stopTrackingSelections(){for(let e of this.cursors)e.stopTrackingSelection(this.context)}updateContext(e){this.context=e}ensureValidState(){for(let e of this.cursors)e.ensureValidState(this.context)}readSelectionFromMarkers(){return this.cursors.map(e=>e.readSelectionFromMarkers(this.context))}getAll(){return this.cursors.map(e=>e.asCursorState())}getViewPositions(){return this.cursors.map(e=>e.viewState.position)}getTopMostViewPosition(){return(0,nV.kh)(this.cursors,(0,L.VE)(e=>e.viewState.position,ee.y.compare)).viewState.position}getBottomMostViewPosition(){return(0,nV.ot)(this.cursors,(0,L.VE)(e=>e.viewState.position,ee.y.compare)).viewState.position}getSelections(){return this.cursors.map(e=>e.modelState.selection)}getViewSelections(){return this.cursors.map(e=>e.viewState.selection)}setSelections(e){this.setStates(nz.MF.fromModelSelections(e))}getPrimaryCursor(){return this.cursors[0].asCursorState()}setStates(e){null!==e&&(this.cursors[0].setState(this.context,e[0].modelState,e[0].viewState),this._setSecondaryStates(e.slice(1)))}_setSecondaryStates(e){let t=this.cursors.length-1,i=e.length;if(t<i){let e=i-t;for(let t=0;t<e;t++)this._addSecondaryCursor()}else if(t>i){let e=t-i;for(let t=0;t<e;t++)this._removeSecondaryCursor(this.cursors.length-2)}for(let t=0;t<i;t++)this.cursors[t+1].setState(this.context,e[t].modelState,e[t].viewState)}killSecondaryCursors(){this._setSecondaryStates([])}_addSecondaryCursor(){this.cursors.push(new nU(this.context)),this.lastAddedCursorIndex=this.cursors.length-1}getLastAddedCursorIndex(){return 1===this.cursors.length||0===this.lastAddedCursorIndex?0:this.lastAddedCursorIndex}_removeSecondaryCursor(e){this.lastAddedCursorIndex>=e+1&&this.lastAddedCursorIndex--,this.cursors[e+1].dispose(this.context),this.cursors.splice(e+1,1)}normalize(){if(1===this.cursors.length)return;let e=this.cursors.slice(0),t=[];for(let i=0,n=e.length;i<n;i++)t.push({index:i,selection:e[i].modelState.selection});t.sort((0,L.VE)(e=>e.selection,et.Q.compareRangesUsingStarts));for(let i=0;i<t.length-1;i++){let n=t[i],s=t[i+1],o=n.selection,r=s.selection;if(this.context.cursorConfig.multiCursorMergeOverlapping&&(r.isEmpty()||o.isEmpty()?r.getStartPosition().isBeforeOrEqual(o.getEndPosition()):r.getStartPosition().isBefore(o.getEndPosition()))){let o=n.index<s.index?i:i+1,r=n.index<s.index?i+1:i,a=t[r].index,l=t[o].index,h=t[r].selection,d=t[o].selection;if(!h.equalsSelection(d)){let i,n,s=h.plusRange(d),r=h.selectionStartLineNumber===h.startLineNumber&&h.selectionStartColumn===h.startColumn,c=d.selectionStartLineNumber===d.startLineNumber&&d.selectionStartColumn===d.startColumn;a===this.lastAddedCursorIndex?(i=r,this.lastAddedCursorIndex=l):i=c,n=i?new ey.L(s.startLineNumber,s.startColumn,s.endLineNumber,s.endColumn):new ey.L(s.endLineNumber,s.endColumn,s.startLineNumber,s.startColumn),t[o].selection=n;let u=nz.MF.fromModelSelection(n);e[l].setState(this.context,u.modelState,u.viewState)}for(let e of t)e.index>a&&e.index--;e.splice(a,1),t.splice(r,1),this._removeSecondaryCursor(a-1),i--}}}}class n${constructor(e,t,i,n){this._cursorContextBrand=void 0,this.model=e,this.viewModel=t,this.coordinatesConverter=i,this.cursorConfig=n}}var nK=i(70986),nG=i(91461),nq=i(69745);class nQ{constructor(){this.type=0}}class nY{constructor(){this.type=1}}class nZ{constructor(e){this.type=2,this._source=e}hasChanged(e){return this._source.hasChanged(e)}}class nX{constructor(e,t,i){this.selections=e,this.modelSelections=t,this.reason=i,this.type=3}}class nJ{constructor(e){this.type=4,e?(this.affectsMinimap=e.affectsMinimap,this.affectsOverviewRuler=e.affectsOverviewRuler,this.affectsGlyphMargin=e.affectsGlyphMargin,this.affectsLineNumber=e.affectsLineNumber):(this.affectsMinimap=!0,this.affectsOverviewRuler=!0,this.affectsGlyphMargin=!0,this.affectsLineNumber=!0)}}class n0{constructor(){this.type=5}}class n1{constructor(e){this.type=6,this.isFocused=e}}class n2{constructor(){this.type=7}}class n5{constructor(){this.type=8}}class n4{constructor(e,t){this.fromLineNumber=e,this.count=t,this.type=9}}class n3{constructor(e,t){this.type=10,this.fromLineNumber=e,this.toLineNumber=t}}class n7{constructor(e,t){this.type=11,this.fromLineNumber=e,this.toLineNumber=t}}class n9{constructor(e,t,i,n,s,o,r){this.source=e,this.minimalReveal=t,this.range=i,this.selections=n,this.verticalType=s,this.revealHorizontal=o,this.scrollType=r,this.type=12}}class n8{constructor(e){this.type=13,this.scrollWidth=e.scrollWidth,this.scrollLeft=e.scrollLeft,this.scrollHeight=e.scrollHeight,this.scrollTop=e.scrollTop,this.scrollWidthChanged=e.scrollWidthChanged,this.scrollLeftChanged=e.scrollLeftChanged,this.scrollHeightChanged=e.scrollHeightChanged,this.scrollTopChanged=e.scrollTopChanged}}class n6{constructor(e){this.theme=e,this.type=14}}class se{constructor(e){this.type=15,this.ranges=e}}class st{constructor(){this.type=16}}class si{constructor(){this.type=17}}class sn extends y.jG{constructor(){super(),this._onEvent=this._register(new w.vl),this.onEvent=this._onEvent.event,this._eventHandlers=[],this._viewEventQueue=null,this._isConsumingViewEventQueue=!1,this._collector=null,this._collectorCnt=0,this._outgoingEvents=[]}emitOutgoingEvent(e){this._addOutgoingEvent(e),this._emitOutgoingEvents()}_addOutgoingEvent(e){for(let t=0,i=this._outgoingEvents.length;t<i;t++){let i=this._outgoingEvents[t].kind===e.kind?this._outgoingEvents[t].attemptToMerge(e):null;if(i){this._outgoingEvents[t]=i;return}}this._outgoingEvents.push(e)}_emitOutgoingEvents(){for(;this._outgoingEvents.length>0;){if(this._collector||this._isConsumingViewEventQueue)return;let e=this._outgoingEvents.shift();e.isNoOp()||this._onEvent.fire(e)}}addViewEventHandler(e){for(let t=0,i=this._eventHandlers.length;t<i;t++)this._eventHandlers[t]===e&&console.warn("Detected duplicate listener in ViewEventDispatcher",e);this._eventHandlers.push(e)}removeViewEventHandler(e){for(let t=0;t<this._eventHandlers.length;t++)if(this._eventHandlers[t]===e){this._eventHandlers.splice(t,1);break}}beginEmitViewEvents(){return this._collectorCnt++,1===this._collectorCnt&&(this._collector=new ss),this._collector}endEmitViewEvents(){if(this._collectorCnt--,0===this._collectorCnt){let e=this._collector.outgoingEvents,t=this._collector.viewEvents;for(let t of(this._collector=null,e))this._addOutgoingEvent(t);t.length>0&&this._emitMany(t)}this._emitOutgoingEvents()}emitSingleViewEvent(e){try{this.beginEmitViewEvents().emitViewEvent(e)}finally{this.endEmitViewEvents()}}_emitMany(e){this._viewEventQueue?this._viewEventQueue=this._viewEventQueue.concat(e):this._viewEventQueue=e,this._isConsumingViewEventQueue||this._consumeViewEventQueue()}_consumeViewEventQueue(){try{this._isConsumingViewEventQueue=!0,this._doConsumeQueue()}finally{this._isConsumingViewEventQueue=!1}}_doConsumeQueue(){for(;this._viewEventQueue;){let e=this._viewEventQueue;for(let t of(this._viewEventQueue=null,this._eventHandlers.slice(0)))t.handleEvents(e)}}}class ss{constructor(){this.viewEvents=[],this.outgoingEvents=[]}emitViewEvent(e){this.viewEvents.push(e)}emitOutgoingEvent(e){this.outgoingEvents.push(e)}}class so{constructor(e,t,i,n){this.kind=0,this._oldContentWidth=e,this._oldContentHeight=t,this.contentWidth=i,this.contentHeight=n,this.contentWidthChanged=this._oldContentWidth!==this.contentWidth,this.contentHeightChanged=this._oldContentHeight!==this.contentHeight}isNoOp(){return!this.contentWidthChanged&&!this.contentHeightChanged}attemptToMerge(e){return e.kind!==this.kind?null:new so(this._oldContentWidth,this._oldContentHeight,e.contentWidth,e.contentHeight)}}class sr{constructor(e,t){this.kind=1,this.oldHasFocus=e,this.hasFocus=t}isNoOp(){return this.oldHasFocus===this.hasFocus}attemptToMerge(e){return e.kind!==this.kind?null:new sr(this.oldHasFocus,e.hasFocus)}}class sa{constructor(e,t){this.kind=2,this.oldHasFocus=e,this.hasFocus=t}isNoOp(){return this.oldHasFocus===this.hasFocus}attemptToMerge(e){return e.kind!==this.kind?null:new sr(this.oldHasFocus,e.hasFocus)}}class sl{constructor(e,t,i,n,s,o,r,a){this.kind=3,this._oldScrollWidth=e,this._oldScrollLeft=t,this._oldScrollHeight=i,this._oldScrollTop=n,this.scrollWidth=s,this.scrollLeft=o,this.scrollHeight=r,this.scrollTop=a,this.scrollWidthChanged=this._oldScrollWidth!==this.scrollWidth,this.scrollLeftChanged=this._oldScrollLeft!==this.scrollLeft,this.scrollHeightChanged=this._oldScrollHeight!==this.scrollHeight,this.scrollTopChanged=this._oldScrollTop!==this.scrollTop}isNoOp(){return!this.scrollWidthChanged&&!this.scrollLeftChanged&&!this.scrollHeightChanged&&!this.scrollTopChanged}attemptToMerge(e){return e.kind!==this.kind?null:new sl(this._oldScrollWidth,this._oldScrollLeft,this._oldScrollHeight,this._oldScrollTop,e.scrollWidth,e.scrollLeft,e.scrollHeight,e.scrollTop)}}class sh{constructor(){this.kind=4}isNoOp(){return!1}attemptToMerge(e){return e.kind!==this.kind?null:this}}class sd{constructor(){this.kind=5}isNoOp(){return!1}attemptToMerge(e){return e.kind!==this.kind?null:this}}class sc{constructor(e,t,i,n,s,o,r){this.kind=7,this.oldSelections=e,this.selections=t,this.oldModelVersionId=i,this.modelVersionId=n,this.source=s,this.reason=o,this.reachedMaxCursorCount=r}static _selectionsAreEqual(e,t){if(!e&&!t)return!0;if(!e||!t)return!1;let i=e.length;if(i!==t.length)return!1;for(let n=0;n<i;n++)if(!e[n].equalsSelection(t[n]))return!1;return!0}isNoOp(){return sc._selectionsAreEqual(this.oldSelections,this.selections)&&this.oldModelVersionId===this.modelVersionId}attemptToMerge(e){return e.kind!==this.kind?null:new sc(this.oldSelections,e.selections,this.oldModelVersionId,e.modelVersionId,e.source,e.reason,this.reachedMaxCursorCount||e.reachedMaxCursorCount)}}class su{constructor(){this.kind=6}isNoOp(){return!1}attemptToMerge(e){return e.kind!==this.kind?null:this}}class sg{constructor(e){this.event=e,this.kind=8}isNoOp(){return!1}attemptToMerge(e){return null}}class sp{constructor(e){this.event=e,this.kind=9}isNoOp(){return!1}attemptToMerge(e){return null}}class sm{constructor(e){this.event=e,this.kind=10}isNoOp(){return!1}attemptToMerge(e){return null}}class sf{constructor(e){this.event=e,this.kind=11}isNoOp(){return!1}attemptToMerge(e){return null}}class s_{constructor(e){this.event=e,this.kind=12}isNoOp(){return!1}attemptToMerge(e){return null}}class sv{constructor(e){this.event=e,this.kind=13}isNoOp(){return!1}attemptToMerge(e){return null}}class sb{constructor(e){this.event=e,this.kind=14}isNoOp(){return!1}attemptToMerge(e){return null}}class sC{constructor(e){this.event=e,this.kind=15}isNoOp(){return!1}attemptToMerge(e){return null}}var sw=i(8359);class sy extends y.jG{constructor(e,t,i,n){super(),this._model=e,this._knownModelVersionId=this._model.getVersionId(),this._viewModel=t,this._coordinatesConverter=i,this.context=new n$(this._model,this._viewModel,this._coordinatesConverter,n),this._cursors=new nj(this.context),this._hasFocus=!1,this._isHandling=!1,this._compositionState=null,this._columnSelectData=null,this._autoClosedActions=[],this._prevEditOperationType=0}dispose(){this._cursors.dispose(),this._autoClosedActions=(0,y.AS)(this._autoClosedActions),super.dispose()}updateConfiguration(e){this.context=new n$(this._model,this._viewModel,this._coordinatesConverter,e),this._cursors.updateContext(this.context)}onLineMappingChanged(e){this._knownModelVersionId===this._model.getVersionId()&&this.setStates(e,"viewModel",0,this.getCursorStates())}setHasFocus(e){this._hasFocus=e}_validateAutoClosedActions(){if(this._autoClosedActions.length>0){let e=this._cursors.getSelections();for(let t=0;t<this._autoClosedActions.length;t++){let i=this._autoClosedActions[t];!i.isValid(e)&&(i.dispose(),this._autoClosedActions.splice(t,1),t--)}}}getPrimaryCursorState(){return this._cursors.getPrimaryCursor()}getLastAddedCursorIndex(){return this._cursors.getLastAddedCursorIndex()}getCursorStates(){return this._cursors.getAll()}setStates(e,t,i,n){let s=!1,o=this.context.cursorConfig.multiCursorLimit;null!==n&&n.length>o&&(n=n.slice(0,o),s=!0);let r=sS.from(this._model,this);return this._cursors.setStates(n),this._cursors.normalize(),this._columnSelectData=null,this._validateAutoClosedActions(),this._emitStateChangedIfNecessary(e,t,i,r,s)}setCursorColumnSelectData(e){this._columnSelectData=e}revealAll(e,t,i,n,s,o){let r=this._cursors.getViewPositions(),a=null,l=null;r.length>1?l=this._cursors.getViewSelections():a=et.Q.fromPositions(r[0],r[0]),e.emitViewEvent(new n9(t,i,a,l,n,s,o))}revealPrimary(e,t,i,n,s,o){let r=[this._cursors.getPrimaryCursor().viewState.selection];e.emitViewEvent(new n9(t,i,null,r,n,s,o))}saveState(){let e=[],t=this._cursors.getSelections();for(let i=0,n=t.length;i<n;i++){let n=t[i];e.push({inSelectionMode:!n.isEmpty(),selectionStart:{lineNumber:n.selectionStartLineNumber,column:n.selectionStartColumn},position:{lineNumber:n.positionLineNumber,column:n.positionColumn}})}return e}restoreState(e,t){let i=[];for(let e=0,n=t.length;e<n;e++){let n=t[e],s=1,o=1;n.position&&n.position.lineNumber&&(s=n.position.lineNumber),n.position&&n.position.column&&(o=n.position.column);let r=s,a=o;n.selectionStart&&n.selectionStart.lineNumber&&(r=n.selectionStart.lineNumber),n.selectionStart&&n.selectionStart.column&&(a=n.selectionStart.column),i.push({selectionStartLineNumber:r,selectionStartColumn:a,positionLineNumber:s,positionColumn:o})}this.setStates(e,"restoreState",0,nz.MF.fromModelSelections(i)),this.revealAll(e,"restoreState",!1,0,!0,1)}onModelContentChanged(e,t){if(t instanceof nw.vn){if(!this._isHandling){this._isHandling=!0;try{this.setStates(e,"modelChange",0,this.getCursorStates())}finally{this._isHandling=!1}}}else{let i=t.rawContentChangedEvent;if(this._knownModelVersionId=i.versionId,this._isHandling)return;let n=i.containsEvent(1);if(this._prevEditOperationType=0,n)this._cursors.dispose(),this._cursors=new nj(this.context),this._validateAutoClosedActions(),this._emitStateChangedIfNecessary(e,"model",1,null,!1);else if(this._hasFocus&&i.resultingSelection&&i.resultingSelection.length>0){let t=nz.MF.fromModelSelections(i.resultingSelection);this.setStates(e,"modelChange",i.isUndoing?5:i.isRedoing?6:2,t)&&this.revealAll(e,"modelChange",!1,0,!0,0)}else{let t=this._cursors.readSelectionFromMarkers();this.setStates(e,"modelChange",2,nz.MF.fromModelSelections(t))}}}getSelection(){return this._cursors.getPrimaryCursor().modelState.selection}getTopMostViewPosition(){return this._cursors.getTopMostViewPosition()}getBottomMostViewPosition(){return this._cursors.getBottomMostViewPosition()}getCursorColumnSelectData(){if(this._columnSelectData)return this._columnSelectData;let e=this._cursors.getPrimaryCursor(),t=e.viewState.selectionStart.getStartPosition(),i=e.viewState.position;return{isReal:!1,fromViewLineNumber:t.lineNumber,fromViewVisualColumn:this.context.cursorConfig.visibleColumnFromColumn(this._viewModel,t),toViewLineNumber:i.lineNumber,toViewVisualColumn:this.context.cursorConfig.visibleColumnFromColumn(this._viewModel,i)}}getSelections(){return this._cursors.getSelections()}setSelections(e,t,i,n){this.setStates(e,t,n,nz.MF.fromModelSelections(i))}getPrevEditOperationType(){return this._prevEditOperationType}setPrevEditOperationType(e){this._prevEditOperationType=e}_pushAutoClosedAction(e,t){let i=[],n=[];for(let s=0,o=e.length;s<o;s++)i.push({range:e[s],options:{description:"auto-closed-character",inlineClassName:"auto-closed-character",stickiness:1}}),n.push({range:t[s],options:{description:"auto-closed-enclosing",stickiness:1}});let s=this._model.deltaDecorations([],i),o=this._model.deltaDecorations([],n);this._autoClosedActions.push(new sk(this._model,s,o))}_executeEditOperation(e,t){if(!e)return;e.shouldPushStackElementBefore&&this._model.pushStackElement();let i=sx.executeCommands(this._model,this._cursors.getSelections(),e.commands,t);if(i){this._interpretCommandResult(i);let t=[],n=[];for(let i=0;i<e.commands.length;i++){let s=e.commands[i];s instanceof nq.Hs&&s.enclosingRange&&s.closeCharacterRange&&(t.push(s.closeCharacterRange),n.push(s.enclosingRange))}t.length>0&&this._pushAutoClosedAction(t,n),this._prevEditOperationType=e.type}e.shouldPushStackElementAfter&&this._model.pushStackElement()}_interpretCommandResult(e){e&&0!==e.length||(e=this._cursors.readSelectionFromMarkers()),this._columnSelectData=null,this._cursors.setSelections(e),this._cursors.normalize()}_emitStateChangedIfNecessary(e,t,i,n,s){let o=sS.from(this._model,this);if(o.equals(n))return!1;let r=this._cursors.getSelections(),a=this._cursors.getViewSelections();if(e.emitViewEvent(new nX(a,r,i)),!n||n.cursorState.length!==o.cursorState.length||o.cursorState.some((e,t)=>!e.modelState.equals(n.cursorState[t].modelState))){let a=n?n.cursorState.map(e=>e.modelState.selection):null,l=n?n.modelVersionId:0;e.emitOutgoingEvent(new sc(a,r,l,o.modelVersionId,t||"keyboard",i,s))}return!0}_findAutoClosingPairs(e){if(!e.length)return null;let t=[];for(let i=0,n=e.length;i<n;i++){let n=e[i];if(!n.text||n.text.indexOf("\n")>=0)return null;let s=n.text.match(/([)\]}>'"`])([^)\]}>'"`]*)$/);if(!s)return null;let o=s[1],r=this.context.cursorConfig.autoClosingPairs.autoClosingPairsCloseSingleChar.get(o);if(!r||1!==r.length)return null;let a=r[0].open,l=n.text.length-s[2].length-1,h=n.text.lastIndexOf(a,l-1);if(-1===h)return null;t.push([h,l])}return t}executeEdits(e,t,i,n,s){let o=null;"snippet"===t&&(o=this._findAutoClosingPairs(i)),o&&(i[0]._isTracked=!0);let r=[],a=[],l=this._model.pushEditOperations(this.getSelections(),i,e=>{if(o)for(let t=0,i=o.length;t<i;t++){let[i,n]=o[t],s=e[t],l=s.range.startLineNumber,h=s.range.startColumn-1+i,d=s.range.startColumn-1+n;r.push(new et.Q(l,d+1,l,d+2)),a.push(new et.Q(l,h+1,l,d+2))}let t=n(e);return t&&(this._isHandling=!0),t},void 0,s);l&&(this._isHandling=!1,this.setSelections(e,t,l,0)),r.length>0&&this._pushAutoClosedAction(r,a)}_executeEdit(e,t,i,n=0){if(this.context.cursorConfig.readOnly)return;let s=sS.from(this._model,this);this._cursors.stopTrackingSelections(),this._isHandling=!0;try{this._cursors.ensureValidState(),e()}catch(e){(0,C.dz)(e)}this._isHandling=!1,this._cursors.startTrackingSelections(),this._validateAutoClosedActions(),this._emitStateChangedIfNecessary(t,i,n,s,!1)&&this.revealAll(t,i,!1,0,!0,0)}getAutoClosedCharacters(){return sk.getAllAutoClosedCharacters(this._autoClosedActions)}startComposition(e){this._compositionState=new sD(this._model,this.getSelections())}endComposition(e,t){let i=sw.dg.cursor({kind:"compositionEnd",detailedSource:t}),n=this._compositionState?this._compositionState.deduceOutcome(this._model,this.getSelections()):null;this._compositionState=null,this._executeEdit(()=>{"keyboard"===t&&this._executeEditOperation(nG.T.compositionEndWithInterceptors(this._prevEditOperationType,this.context.cursorConfig,this._model,n,this.getSelections(),this.getAutoClosedCharacters()),i)},e,t)}type(e,t,i){let n=sw.dg.cursor({kind:"type",detailedSource:i});this._executeEdit(()=>{if("keyboard"===i){let e=t.length,i=0;for(;i<e;){let e=eA.iy(t,i),s=t.substr(i,e);this._executeEditOperation(nG.T.typeWithInterceptors(!!this._compositionState,this._prevEditOperationType,this.context.cursorConfig,this._model,this.getSelections(),this.getAutoClosedCharacters(),s),n),i+=e}}else this._executeEditOperation(nG.T.typeWithoutInterceptors(this._prevEditOperationType,this.context.cursorConfig,this._model,this.getSelections(),t),n)},e,i)}compositionType(e,t,i,n,s,o){let r=sw.dg.cursor({kind:"compositionType",detailedSource:o});if(0===t.length&&0===i&&0===n){if(0!==s){let t=this.getSelections().map(e=>{let t=e.getPosition();return new ey.L(t.lineNumber,t.column+s,t.lineNumber,t.column+s)});this.setSelections(e,o,t,0)}return}this._executeEdit(()=>{this._executeEditOperation(nG.T.compositionType(this._prevEditOperationType,this.context.cursorConfig,this._model,this.getSelections(),t,i,n,s),r)},e,o)}paste(e,t,i,n,s){let o=sw.dg.cursor({kind:"paste",detailedSource:s});this._executeEdit(()=>{this._executeEditOperation(nG.T.paste(this.context.cursorConfig,this._model,this.getSelections(),t,i,n||[]),o)},e,s,4)}cut(e,t){let i=sw.dg.cursor({kind:"cut",detailedSource:t});this._executeEdit(()=>{this._executeEditOperation(nK.g.cut(this.context.cursorConfig,this._model,this.getSelections()),i)},e,t)}executeCommand(e,t,i){let n=sw.dg.cursor({kind:"executeCommand",detailedSource:i});this._executeEdit(()=>{this._cursors.killSecondaryCursors(),this._executeEditOperation(new nz.vY(0,[t],{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!1}),n)},e,i)}executeCommands(e,t,i){let n=sw.dg.cursor({kind:"executeCommands",detailedSource:i});this._executeEdit(()=>{this._executeEditOperation(new nz.vY(0,t,{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!1}),n)},e,i)}}class sS{static from(e,t){return new sS(e.getVersionId(),t.getCursorStates())}constructor(e,t){this.modelVersionId=e,this.cursorState=t}equals(e){if(!e||this.modelVersionId!==e.modelVersionId||this.cursorState.length!==e.cursorState.length)return!1;for(let t=0,i=this.cursorState.length;t<i;t++)if(!this.cursorState[t].equals(e.cursorState[t]))return!1;return!0}}class sk{static getAllAutoClosedCharacters(e){let t=[];for(let i of e)t=t.concat(i.getAutoClosedCharactersRanges());return t}constructor(e,t,i){this._model=e,this._autoClosedCharactersDecorations=t,this._autoClosedEnclosingDecorations=i}dispose(){this._autoClosedCharactersDecorations=this._model.deltaDecorations(this._autoClosedCharactersDecorations,[]),this._autoClosedEnclosingDecorations=this._model.deltaDecorations(this._autoClosedEnclosingDecorations,[])}getAutoClosedCharactersRanges(){let e=[];for(let t=0;t<this._autoClosedCharactersDecorations.length;t++){let i=this._model.getDecorationRange(this._autoClosedCharactersDecorations[t]);i&&e.push(i)}return e}isValid(e){let t=[];for(let e=0;e<this._autoClosedEnclosingDecorations.length;e++){let i=this._model.getDecorationRange(this._autoClosedEnclosingDecorations[e]);if(i&&(t.push(i),i.startLineNumber!==i.endLineNumber))return!1}t.sort(et.Q.compareRangesUsingStarts),e.sort(et.Q.compareRangesUsingStarts);for(let i=0;i<e.length;i++)if(i>=t.length||!t[i].strictContainsRange(e[i]))return!1;return!0}}class sx{static executeCommands(e,t,i,n=sw.dg.unknown({name:"executeCommands"})){let s={model:e,selectionsBefore:t,trackedRanges:[],trackedRangesDirection:[]},o=this._innerExecuteCommands(s,i,n);for(let e=0,t=s.trackedRanges.length;e<t;e++)s.model._setTrackedRange(s.trackedRanges[e],null,0);return o}static _innerExecuteCommands(e,t,i){if(this._arrayIsEmpty(t))return null;let n=this._getEditOperations(e,t);if(0===n.operations.length)return null;let s=n.operations,o=this._getLoserCursorMap(s);if(o.hasOwnProperty("0"))return console.warn("Ignoring commands"),null;let r=[];for(let e=0,t=s.length;e<t;e++)o.hasOwnProperty(s[e].identifier.major.toString())||r.push(s[e]);n.hadTrackedEditOperation&&r.length>0&&(r[0]._isTracked=!0);let a=e.model.pushEditOperations(e.selectionsBefore,r,i=>{let n=[];for(let t=0;t<e.selectionsBefore.length;t++)n[t]=[];for(let e of i)e.identifier&&n[e.identifier.major].push(e);let s=(e,t)=>e.identifier.minor-t.identifier.minor,o=[];for(let i=0;i<e.selectionsBefore.length;i++)n[i].length>0?(n[i].sort(s),o[i]=t[i].computeCursorState(e.model,{getInverseEditOperations:()=>n[i],getTrackedSelection:t=>{let i=parseInt(t,10),n=e.model._getTrackedRange(e.trackedRanges[i]);return 0===e.trackedRangesDirection[i]?new ey.L(n.startLineNumber,n.startColumn,n.endLineNumber,n.endColumn):new ey.L(n.endLineNumber,n.endColumn,n.startLineNumber,n.startColumn)}})):o[i]=e.selectionsBefore[i];return o},void 0,i);a||(a=e.selectionsBefore);let l=[];for(let e in o)o.hasOwnProperty(e)&&l.push(parseInt(e,10));for(let e of(l.sort((e,t)=>t-e),l))a.splice(e,1);return a}static _arrayIsEmpty(e){for(let t=0,i=e.length;t<i;t++)if(e[t])return!1;return!0}static _getEditOperations(e,t){let i=[],n=!1;for(let s=0,o=t.length;s<o;s++){let o=t[s];if(o){let t=this._getEditOperationsFromCommand(e,s,o);i=i.concat(t.operations),n=n||t.hadTrackedEditOperation}}return{operations:i,hadTrackedEditOperation:n}}static _getEditOperationsFromCommand(e,t,i){let n=[],s=0,o=(e,o,r=!1)=>{et.Q.isEmpty(e)&&""===o||n.push({identifier:{major:t,minor:s++},range:e,text:o,forceMoveMarkers:r,isAutoWhitespaceEdit:i.insertsAutoWhitespace})},r=!1;try{i.getEditOperations(e.model,{addEditOperation:o,addTrackedEditOperation:(e,t,i)=>{r=!0,o(e,t,i)},trackSelection:(t,i)=>{let n,s=ey.L.liftSelection(t);if(s.isEmpty())if("boolean"==typeof i)n=i?2:3;else{let t=e.model.getLineMaxColumn(s.startLineNumber);n=s.startColumn===t?2:3}else n=1;let o=e.trackedRanges.length,r=e.model._setTrackedRange(null,s,n);return e.trackedRanges[o]=r,e.trackedRangesDirection[o]=s.getDirection(),o.toString()}})}catch(e){return(0,C.dz)(e),{operations:[],hadTrackedEditOperation:!1}}return{operations:n,hadTrackedEditOperation:r}}static _getLoserCursorMap(e){(e=e.slice(0)).sort((e,t)=>-et.Q.compareRangesUsingEnds(e.range,t.range));let t={};for(let i=1;i<e.length;i++){let n=e[i-1],s=e[i];if(et.Q.getStartPosition(n.range).isBefore(et.Q.getEndPosition(s.range))){let o;t[(o=n.identifier.major>s.identifier.major?n.identifier.major:s.identifier.major).toString()]=!0;for(let t=0;t<e.length;t++)e[t].identifier.major===o&&(e.splice(t,1),t<i&&i--,t--);i>0&&i--}}return t}}class sL{constructor(e,t,i,n){this.text=e,this.lineNumber=t,this.startSelectionOffset=i,this.endSelectionOffset=n}}class sD{static _capture(e,t){let i=[];for(let n of t){if(n.startLineNumber!==n.endLineNumber)return null;let t=n.startLineNumber;i.push(new sL(e.getLineContent(t),t,n.startColumn-1,n.endColumn-1))}return i}constructor(e,t){this._original=sD._capture(e,t)}deduceOutcome(e,t){if(!this._original)return null;let i=sD._capture(e,t);if(!i||this._original.length!==i.length)return null;let n=[];for(let e=0,t=this._original.length;e<t;e++)n.push(sD._deduceOutcome(this._original[e],i[e]));return n}static _deduceOutcome(e,t){let i=Math.min(e.startSelectionOffset,t.startSelectionOffset,eA.Qp(e.text,t.text)),n=Math.min(e.text.length-e.endSelectionOffset,t.text.length-t.endSelectionOffset,eA.Vi(e.text,t.text)),s=e.text.substring(i,e.text.length-n),o=t.text.length-n,r=t.text.substring(i,o),a=new et.Q(t.lineNumber,i+1,t.lineNumber,o+1);return new nG.v(s,e.startSelectionOffset-i,e.endSelectionOffset-i,r,t.startSelectionOffset-i,t.endSelectionOffset-i,a)}}var sI=i(5081),sN=i(66278),sE=i(56487),sM=i(28771);class sT{constructor(e,t,i,n,s){this.decorationId=e,this.index=t,this.lineNumber=i,this.specialHeight=n,this.prefixSum=s,this.maximumSpecialHeight=n,this.deleted=!1}}class sR{constructor(e,t){if(this._decorationIDToCustomLine=new sO,this._orderedCustomLines=[],this._pendingSpecialLinesToInsert=[],this._invalidIndex=0,this._hasPending=!1,this._defaultLineHeight=e,t.length>0){for(let e of t)this.insertOrChangeCustomLineHeight(e.decorationId,e.startLineNumber,e.endLineNumber,e.lineHeight);this.commit()}}set defaultLineHeight(e){this._defaultLineHeight=e}get defaultLineHeight(){return this._defaultLineHeight}removeCustomLineHeight(e){let t=this._decorationIDToCustomLine.get(e);if(t){for(let i of(this._decorationIDToCustomLine.delete(e),t))i.deleted=!0,this._invalidIndex=Math.min(this._invalidIndex,i.index);this._hasPending=!0}}insertOrChangeCustomLineHeight(e,t,i,n){this.removeCustomLineHeight(e);for(let s=t;s<=i;s++){let t=new sT(e,-1,s,n,0);this._pendingSpecialLinesToInsert.push(t)}this._hasPending=!0}heightForLineNumber(e){let t=this._binarySearchOverOrderedCustomLinesArray(e);return t>=0?this._orderedCustomLines[t].maximumSpecialHeight:this._defaultLineHeight}getAccumulatedLineHeightsIncludingLineNumber(e){let t=this._binarySearchOverOrderedCustomLinesArray(e);if(t>=0)return this._orderedCustomLines[t].prefixSum+this._orderedCustomLines[t].maximumSpecialHeight;if(-1===t)return this._defaultLineHeight*e;let i=this._orderedCustomLines[-(t+1)-1];return i.prefixSum+i.maximumSpecialHeight+this._defaultLineHeight*(e-i.lineNumber)}onLinesDeleted(e,t){let i,n,s=t-e+1,o=this._orderedCustomLines.length,r=this._binarySearchOverOrderedCustomLinesArray(e);if(r>=0){i=r;for(let t=r-1;t>=0;t--)if(this._orderedCustomLines[t].lineNumber===e)i--;else break}else i=r===-(o+1)&&-1!==r?o-1:-(r+1);let a=this._binarySearchOverOrderedCustomLinesArray(t);if(a>=0){n=a;for(let e=a+1;e<o;e++)if(this._orderedCustomLines[e].lineNumber===t)n++;else break}else n=a===-(o+1)&&-1!==a?o-1:-(a+1);let l=n>i,h=n===i&&this._orderedCustomLines[i]&&this._orderedCustomLines[i].lineNumber>=e&&this._orderedCustomLines[i].lineNumber<=t;if(l||h){let o=0;for(let e=i;e<=n;e++)o=Math.max(o,this._orderedCustomLines[e].maximumSpecialHeight);let r=0;if(i>0){let t=this._orderedCustomLines[i-1];r=t.prefixSum+t.maximumSpecialHeight+this._defaultLineHeight*(e-t.lineNumber-1)}else r=e>0?(e-1)*this._defaultLineHeight:0;let a=this._orderedCustomLines[i],l=this._orderedCustomLines[n],h=this._orderedCustomLines[n+1],d=h&&h.lineNumber===t+1?h.maximumSpecialHeight:this._defaultLineHeight,c=l.prefixSum+l.maximumSpecialHeight-a.prefixSum+this._defaultLineHeight*(t-l.lineNumber)+this._defaultLineHeight*(a.lineNumber-e)+d-o,u=new Set,g=[],p=new sO,m=0;for(let t=0;t<this._orderedCustomLines.length;t++){let a=this._orderedCustomLines[t];if(t<i)g.push(a),p.add(a.decorationId,a);else if(t>=i&&t<=n){let t=a.decorationId;u.has(t)?m++:(a.index-=m,a.lineNumber=e,a.prefixSum=r,a.maximumSpecialHeight=o,g.push(a),p.add(a.decorationId,a))}else t>n&&(a.index-=m,a.lineNumber-=s,a.prefixSum-=c,g.push(a),p.add(a.decorationId,a));u.add(a.decorationId)}this._orderedCustomLines=g,this._decorationIDToCustomLine=p}else{let e=s*this._defaultLineHeight;for(let i=n;i<this._orderedCustomLines.length;i++){let n=this._orderedCustomLines[i];n.lineNumber>t&&(n.lineNumber-=s,n.prefixSum-=e)}}}onLinesInserted(e,t){let i,n=t-e+1,s=this._binarySearchOverOrderedCustomLinesArray(e);if(s>=0){i=s;for(let t=s-1;t>=0;t--)if(this._orderedCustomLines[t].lineNumber===e)i--;else break}else i=-(s+1);let o=[],r=new Set;for(let t=i;t<this._orderedCustomLines.length;t++)this._orderedCustomLines[t].lineNumber===e&&r.add(this._orderedCustomLines[t].decorationId);let a=new Set;for(let t=i-1;t>=0;t--)this._orderedCustomLines[t].lineNumber===e-1&&a.add(this._orderedCustomLines[t].decorationId);let l=(0,sM.E$)(a,r);for(let e=i;e<this._orderedCustomLines.length;e++)this._orderedCustomLines[e].lineNumber+=n,this._orderedCustomLines[e].prefixSum+=this._defaultLineHeight*n;if(l.size>0){for(let t of l){let i=this._decorationIDToCustomLine.get(t);if(i){let n=i.reduce((e,t)=>Math.min(e,t.lineNumber),e),s=i.reduce((e,t)=>Math.max(e,t.lineNumber),e),r=i.reduce((e,t)=>Math.max(e,t.specialHeight),0);o.push({decorationId:t,startLineNumber:n,endLineNumber:s,lineHeight:r})}}for(let e of o)this.insertOrChangeCustomLineHeight(e.decorationId,e.startLineNumber,e.endLineNumber,e.lineHeight);this.commit()}}commit(){if(!this._hasPending)return;for(let e of this._pendingSpecialLinesToInsert){let t=this._binarySearchOverOrderedCustomLinesArray(e.lineNumber),i=t>=0?t:-(t+1);this._orderedCustomLines.splice(i,0,e),this._invalidIndex=Math.min(this._invalidIndex,i)}this._pendingSpecialLinesToInsert=[];let e=new sO,t=[];for(let i=0;i<this._invalidIndex;i++){let n=this._orderedCustomLines[i];t.push(n),e.add(n.decorationId,n)}let i=0,n=this._invalidIndex>0?t[this._invalidIndex-1]:void 0;for(let s=this._invalidIndex;s<this._orderedCustomLines.length;s++){let o=this._orderedCustomLines[s];if(o.deleted){i++;continue}if(o.index=s-i,n&&n.lineNumber===o.lineNumber)o.maximumSpecialHeight=n.maximumSpecialHeight,o.prefixSum=n.prefixSum;else{let e,t=o.specialHeight;for(let e=s;e<this._orderedCustomLines.length;e++){let i=this._orderedCustomLines[e];if(!i.deleted){if(i.lineNumber!==o.lineNumber)break;t=Math.max(t,i.specialHeight)}}o.maximumSpecialHeight=t,e=n?n.prefixSum+n.maximumSpecialHeight+this._defaultLineHeight*(o.lineNumber-n.lineNumber-1):this._defaultLineHeight*(o.lineNumber-1),o.prefixSum=e}n=o,t.push(o),e.add(o.decorationId,o)}this._orderedCustomLines=t,this._decorationIDToCustomLine=e,this._invalidIndex=1/0,this._hasPending=!1}_binarySearchOverOrderedCustomLinesArray(e){return(0,L.Uw)(this._orderedCustomLines.length,t=>{let i=this._orderedCustomLines[t];return i.lineNumber===e?0:i.lineNumber<e?-1:1})}}class sO{constructor(){this._map=new Map}add(e,t){let i=this._map.get(e);i?i.push(t):this._map.set(e,[t])}get(e){return this._map.get(e)}delete(e){this._map.delete(e)}}class sP{constructor(){this._hasPending=!1,this._inserts=[],this._changes=[],this._removes=[]}insert(e){this._hasPending=!0,this._inserts.push(e)}change(e){this._hasPending=!0,this._changes.push(e)}remove(e){this._hasPending=!0,this._removes.push(e)}commit(e){if(!this._hasPending)return;let t=this._inserts,i=this._changes,n=this._removes;this._hasPending=!1,this._inserts=[],this._changes=[],this._removes=[],e._commitPendingChanges(t,i,n)}}class sA{constructor(e,t,i,n,s){this.id=e,this.afterLineNumber=t,this.ordinal=i,this.height=n,this.minWidth=s,this.prefixSum=0}}class sF{static{this.INSTANCE_COUNT=0}constructor(e,t,i,n,s){this._instanceId=eA.tk(++sF.INSTANCE_COUNT),this._pendingChanges=new sP,this._lastWhitespaceId=0,this._arr=[],this._prefixSumValidIndex=-1,this._minWidth=-1,this._lineCount=e,this._paddingTop=i,this._paddingBottom=n,this._lineHeightsManager=new sR(t,s)}static findInsertionIndex(e,t,i){let n=0,s=e.length;for(;n<s;){let o=n+s>>>1;t===e[o].afterLineNumber?i<e[o].ordinal?s=o:n=o+1:t<e[o].afterLineNumber?s=o:n=o+1}return n}setDefaultLineHeight(e){this._lineHeightsManager.defaultLineHeight=e}setPadding(e,t){this._paddingTop=e,this._paddingBottom=t}onFlushed(e,t){this._lineCount=e,this._lineHeightsManager=new sR(this._lineHeightsManager.defaultLineHeight,t)}changeLineHeights(e){let t=!1;try{e({insertOrChangeCustomLineHeight:(e,i,n,s)=>{t=!0,this._lineHeightsManager.insertOrChangeCustomLineHeight(e,i,n,s)},removeCustomLineHeight:e=>{t=!0,this._lineHeightsManager.removeCustomLineHeight(e)}})}finally{this._lineHeightsManager.commit()}return t}changeWhitespace(e){let t=!1;try{let i={insertWhitespace:(e,i,n,s)=>{t=!0,e|=0,i|=0,n|=0,s|=0;let o=this._instanceId+ ++this._lastWhitespaceId;return this._pendingChanges.insert(new sA(o,e,i,n,s)),o},changeOneWhitespace:(e,i,n)=>{t=!0,i|=0,n|=0,this._pendingChanges.change({id:e,newAfterLineNumber:i,newHeight:n})},removeWhitespace:e=>{t=!0,this._pendingChanges.remove({id:e})}};e(i)}finally{this._pendingChanges.commit(this)}return t}_commitPendingChanges(e,t,i){if((e.length>0||i.length>0)&&(this._minWidth=-1),e.length+t.length+i.length<=1){for(let t of e)this._insertWhitespace(t);for(let e of t)this._changeOneWhitespace(e.id,e.newAfterLineNumber,e.newHeight);for(let e of i){let t=this._findWhitespaceIndex(e.id);-1!==t&&this._removeWhitespace(t)}return}let n=new Set;for(let e of i)n.add(e.id);let s=new Map;for(let e of t)s.set(e.id,e);let o=e=>{let t=[];for(let i of e)if(!n.has(i.id)){if(s.has(i.id)){let e=s.get(i.id);i.afterLineNumber=e.newAfterLineNumber,i.height=e.newHeight}t.push(i)}return t},r=o(this._arr).concat(o(e));r.sort((e,t)=>e.afterLineNumber===t.afterLineNumber?e.ordinal-t.ordinal:e.afterLineNumber-t.afterLineNumber),this._arr=r,this._prefixSumValidIndex=-1}_insertWhitespace(e){let t=sF.findInsertionIndex(this._arr,e.afterLineNumber,e.ordinal);this._arr.splice(t,0,e),this._prefixSumValidIndex=Math.min(this._prefixSumValidIndex,t-1)}_findWhitespaceIndex(e){let t=this._arr;for(let i=0,n=t.length;i<n;i++)if(t[i].id===e)return i;return -1}_changeOneWhitespace(e,t,i){let n=this._findWhitespaceIndex(e);if(-1!==n&&(this._arr[n].height!==i&&(this._arr[n].height=i,this._prefixSumValidIndex=Math.min(this._prefixSumValidIndex,n-1)),this._arr[n].afterLineNumber!==t)){let e=this._arr[n];this._removeWhitespace(n),e.afterLineNumber=t,this._insertWhitespace(e)}}_removeWhitespace(e){this._arr.splice(e,1),this._prefixSumValidIndex=Math.min(this._prefixSumValidIndex,e-1)}onLinesDeleted(e,t){e|=0,t|=0,this._lineCount-=t-e+1;for(let i=0,n=this._arr.length;i<n;i++){let n=this._arr[i].afterLineNumber;e<=n&&n<=t?this._arr[i].afterLineNumber=e-1:n>t&&(this._arr[i].afterLineNumber-=t-e+1)}this._lineHeightsManager.onLinesDeleted(e,t)}onLinesInserted(e,t){e|=0,t|=0,this._lineCount+=t-e+1;for(let i=0,n=this._arr.length;i<n;i++){let n=this._arr[i].afterLineNumber;e<=n&&(this._arr[i].afterLineNumber+=t-e+1)}this._lineHeightsManager.onLinesInserted(e,t)}getWhitespacesTotalHeight(){return 0===this._arr.length?0:this.getWhitespacesAccumulatedHeight(this._arr.length-1)}getWhitespacesAccumulatedHeight(e){e|=0;let t=Math.max(0,this._prefixSumValidIndex+1);0===t&&(this._arr[0].prefixSum=this._arr[0].height,t++);for(let i=t;i<=e;i++)this._arr[i].prefixSum=this._arr[i-1].prefixSum+this._arr[i].height;return this._prefixSumValidIndex=Math.max(this._prefixSumValidIndex,e),this._arr[e].prefixSum}getLinesTotalHeight(){return this._lineHeightsManager.getAccumulatedLineHeightsIncludingLineNumber(this._lineCount)+this.getWhitespacesTotalHeight()+this._paddingTop+this._paddingBottom}getWhitespaceAccumulatedHeightBeforeLineNumber(e){e|=0;let t=this._findLastWhitespaceBeforeLineNumber(e);return -1===t?0:this.getWhitespacesAccumulatedHeight(t)}_findLastWhitespaceBeforeLineNumber(e){e|=0;let t=this._arr,i=0,n=t.length-1;for(;i<=n;){let s=(n-i|0)/2|0,o=i+s|0;if(t[o].afterLineNumber<e)if(o+1>=t.length||t[o+1].afterLineNumber>=e)return o;else i=o+1|0;else n=o-1|0}return -1}_findFirstWhitespaceAfterLineNumber(e){e|=0;let t=this._findLastWhitespaceBeforeLineNumber(e)+1;return t<this._arr.length?t:-1}getFirstWhitespaceIndexAfterLineNumber(e){return e|=0,this._findFirstWhitespaceAfterLineNumber(e)}getVerticalOffsetForLineNumber(e,t=!1){return((e|=0)>1?this._lineHeightsManager.getAccumulatedLineHeightsIncludingLineNumber(e-1):0)+this.getWhitespaceAccumulatedHeightBeforeLineNumber(e-!!t)+this._paddingTop}getLineHeightForLineNumber(e){return this._lineHeightsManager.heightForLineNumber(e)}getVerticalOffsetAfterLineNumber(e,t=!1){return e|=0,this._lineHeightsManager.getAccumulatedLineHeightsIncludingLineNumber(e)+this.getWhitespaceAccumulatedHeightBeforeLineNumber(e+ +!!t)+this._paddingTop}getWhitespaceMinWidth(){if(-1===this._minWidth){let e=0;for(let t=0,i=this._arr.length;t<i;t++)e=Math.max(e,this._arr[t].minWidth);this._minWidth=e}return this._minWidth}isAfterLines(e){return e>this.getLinesTotalHeight()}isInTopPadding(e){return 0!==this._paddingTop&&e<this._paddingTop}isInBottomPadding(e){return 0!==this._paddingBottom&&e>=this.getLinesTotalHeight()-this._paddingBottom}getLineNumberAtOrAfterVerticalOffset(e){if((e|=0)<0)return 1;let t=0|this._lineCount,i=1,n=t;for(;i<n;){let t=(i+n)/2|0,s=this.getLineHeightForLineNumber(t),o=0|this.getVerticalOffsetForLineNumber(t);if(e>=o+s)i=t+1;else{if(e>=o)return t;n=t}}return i>t?t:i}getLinesViewportData(e,t){let i,n;e|=0,t|=0;let s=0|this.getLineNumberAtOrAfterVerticalOffset(e),o=0|this.getVerticalOffsetForLineNumber(s),r=0|this._lineCount,a=0|this.getFirstWhitespaceIndexAfterLineNumber(s),l=0|this.getWhitespacesCount();-1===a?(a=l,n=r+1,i=0):(n=0|this.getAfterLineNumberForWhitespaceIndex(a),i=0|this.getHeightForWhitespaceIndex(a));let h=o,d=h,c=0;o>=5e5&&(d-=c=Math.floor((c=5e5*Math.floor(o/5e5))/this._lineHeightsManager.defaultLineHeight)*this._lineHeightsManager.defaultLineHeight);let u=[],g=e+(t-e)/2,p=-1;for(let e=s;e<=r;e++){let o=this.getLineHeightForLineNumber(e);if(-1===p){let t=h,i=h+o;(t<=g&&g<i||t>g)&&(p=e)}for(h+=o,u[e-s]=d,d+=o;n===e;)d+=i,h+=i,++a>=l?n=r+1:(n=0|this.getAfterLineNumberForWhitespaceIndex(a),i=0|this.getHeightForWhitespaceIndex(a));if(h>=t){r=e;break}}-1===p&&(p=r);let m=0|this.getVerticalOffsetForLineNumber(r),f=s,_=r;return f<_&&o<e&&f++,f<_&&m+this.getLineHeightForLineNumber(r)>t&&_--,{bigNumbersDelta:c,startLineNumber:s,endLineNumber:r,relativeVerticalOffset:u,centeredLineNumber:p,completelyVisibleStartLineNumber:f,completelyVisibleEndLineNumber:_,lineHeight:this._lineHeightsManager.defaultLineHeight}}getVerticalOffsetForWhitespaceIndex(e){e|=0;let t=this.getAfterLineNumberForWhitespaceIndex(e);return(t>=1?this._lineHeightsManager.getAccumulatedLineHeightsIncludingLineNumber(t):0)+(e>0?this.getWhitespacesAccumulatedHeight(e-1):0)+this._paddingTop}getWhitespaceIndexAtOrAfterVerticallOffset(e){e|=0;let t=0,i=this.getWhitespacesCount()-1;if(i<0)return -1;let n=this.getVerticalOffsetForWhitespaceIndex(i),s=this.getHeightForWhitespaceIndex(i);if(e>=n+s)return -1;for(;t<i;){let n=Math.floor((t+i)/2),s=this.getVerticalOffsetForWhitespaceIndex(n),o=this.getHeightForWhitespaceIndex(n);if(e>=s+o)t=n+1;else{if(e>=s)return n;i=n}}return t}getWhitespaceAtVerticalOffset(e){e|=0;let t=this.getWhitespaceIndexAtOrAfterVerticallOffset(e);if(t<0||t>=this.getWhitespacesCount())return null;let i=this.getVerticalOffsetForWhitespaceIndex(t);if(i>e)return null;let n=this.getHeightForWhitespaceIndex(t);return{id:this.getIdForWhitespaceIndex(t),afterLineNumber:this.getAfterLineNumberForWhitespaceIndex(t),verticalOffset:i,height:n}}getWhitespaceViewportData(e,t){e|=0,t|=0;let i=this.getWhitespaceIndexAtOrAfterVerticallOffset(e),n=this.getWhitespacesCount()-1;if(i<0)return[];let s=[];for(let e=i;e<=n;e++){let i=this.getVerticalOffsetForWhitespaceIndex(e),n=this.getHeightForWhitespaceIndex(e);if(i>=t)break;s.push({id:this.getIdForWhitespaceIndex(e),afterLineNumber:this.getAfterLineNumberForWhitespaceIndex(e),verticalOffset:i,height:n})}return s}getWhitespaces(){return this._arr.slice(0)}getWhitespacesCount(){return this._arr.length}getIdForWhitespaceIndex(e){return e|=0,this._arr[e].id}getAfterLineNumberForWhitespaceIndex(e){return e|=0,this._arr[e].afterLineNumber}getHeightForWhitespaceIndex(e){return e|=0,this._arr[e].height}}class sB{constructor(e,t,i,n){(e|=0)<0&&(e=0),(t|=0)<0&&(t=0),(i|=0)<0&&(i=0),(n|=0)<0&&(n=0),this.width=e,this.contentWidth=t,this.scrollWidth=Math.max(e,t),this.height=i,this.contentHeight=n,this.scrollHeight=Math.max(i,n)}equals(e){return this.width===e.width&&this.contentWidth===e.contentWidth&&this.height===e.height&&this.contentHeight===e.contentHeight}}class sW extends y.jG{constructor(e,t){super(),this._onDidContentSizeChange=this._register(new w.vl),this.onDidContentSizeChange=this._onDidContentSizeChange.event,this._dimensions=new sB(0,0,0,0),this._scrollable=this._register(new sE.yE({forceIntegerValues:!0,smoothScrollDuration:e,scheduleAtNextAnimationFrame:t})),this.onDidScroll=this._scrollable.onScroll}getScrollable(){return this._scrollable}setSmoothScrollDuration(e){this._scrollable.setSmoothScrollDuration(e)}validateScrollPosition(e){return this._scrollable.validateScrollPosition(e)}getScrollDimensions(){return this._dimensions}setScrollDimensions(e){if(this._dimensions.equals(e))return;let t=this._dimensions;this._dimensions=e,this._scrollable.setScrollDimensions({width:e.width,scrollWidth:e.scrollWidth,height:e.height,scrollHeight:e.scrollHeight},!0);let i=t.contentWidth!==e.contentWidth,n=t.contentHeight!==e.contentHeight;(i||n)&&this._onDidContentSizeChange.fire(new so(t.contentWidth,t.contentHeight,e.contentWidth,e.contentHeight))}getFutureScrollPosition(){return this._scrollable.getFutureScrollPosition()}getCurrentScrollPosition(){return this._scrollable.getCurrentScrollPosition()}setScrollPositionNow(e){this._scrollable.setScrollPositionNow(e)}setScrollPositionSmooth(e){this._scrollable.setScrollPositionSmooth(e)}hasPendingScrollAnimation(){return this._scrollable.hasPendingScrollAnimation()}}class sH extends y.jG{constructor(e,t,i,n){super(),this._configuration=e;let s=this._configuration.options,o=s.get(165),r=s.get(96);this._linesLayout=new sF(t,s.get(75),r.top,r.bottom,i),this._maxLineWidth=0,this._overlayWidgetsMinWidth=0,this._scrollable=this._register(new sW(0,n)),this._configureSmoothScrollDuration(),this._scrollable.setScrollDimensions(new sB(o.contentWidth,0,o.height,0)),this.onDidScroll=this._scrollable.onDidScroll,this.onDidContentSizeChange=this._scrollable.onDidContentSizeChange,this._updateHeight()}dispose(){super.dispose()}getScrollable(){return this._scrollable.getScrollable()}onHeightMaybeChanged(){this._updateHeight()}_configureSmoothScrollDuration(){this._scrollable.setSmoothScrollDuration(125*!!this._configuration.options.get(130))}onConfigurationChanged(e){let t=this._configuration.options;if(e.hasChanged(75)&&this._linesLayout.setDefaultLineHeight(t.get(75)),e.hasChanged(96)){let e=t.get(96);this._linesLayout.setPadding(e.top,e.bottom)}if(e.hasChanged(165)){let e=t.get(165),i=e.contentWidth,n=e.height,s=this._scrollable.getScrollDimensions(),o=s.contentWidth;this._scrollable.setScrollDimensions(new sB(i,s.contentWidth,n,this._getContentHeight(i,n,o)))}else this._updateHeight();e.hasChanged(130)&&this._configureSmoothScrollDuration()}onFlushed(e,t){this._linesLayout.onFlushed(e,t)}onLinesDeleted(e,t){this._linesLayout.onLinesDeleted(e,t)}onLinesInserted(e,t){this._linesLayout.onLinesInserted(e,t)}_getHorizontalScrollbarHeight(e,t){let i=this._configuration.options.get(117);return 2===i.horizontal||e>=t?0:i.horizontalScrollbarSize}_getContentHeight(e,t,i){let n=this._configuration.options,s=this._linesLayout.getLinesTotalHeight();return n.get(119)?s+=Math.max(0,t-n.get(75)-n.get(96).bottom):n.get(117).ignoreHorizontalScrollbarInContentHeight||(s+=this._getHorizontalScrollbarHeight(e,i)),s}_updateHeight(){let e=this._scrollable.getScrollDimensions(),t=e.width,i=e.height,n=e.contentWidth;this._scrollable.setScrollDimensions(new sB(t,e.contentWidth,i,this._getContentHeight(t,i,n)))}getCurrentViewport(){let e=this._scrollable.getScrollDimensions(),t=this._scrollable.getCurrentScrollPosition();return new ie.LM(t.scrollTop,t.scrollLeft,e.width,e.height)}getFutureViewport(){let e=this._scrollable.getScrollDimensions(),t=this._scrollable.getFutureScrollPosition();return new ie.LM(t.scrollTop,t.scrollLeft,e.width,e.height)}_computeContentWidth(){let e=this._configuration.options,t=this._maxLineWidth,i=e.get(166),n=e.get(59),s=e.get(165);if(i.isViewportWrapping){let i=e.get(81);return t>s.contentWidth+n.typicalHalfwidthCharacterWidth&&i.enabled&&"right"===i.side?t+s.verticalScrollbarWidth:t}{let i=e.get(118)*n.typicalHalfwidthCharacterWidth,o=this._linesLayout.getWhitespaceMinWidth();return Math.max(t+i+s.verticalScrollbarWidth,o,this._overlayWidgetsMinWidth)}}setMaxLineWidth(e){this._maxLineWidth=e,this._updateContentWidth()}setOverlayWidgetsMinWidth(e){this._overlayWidgetsMinWidth=e,this._updateContentWidth()}_updateContentWidth(){let e=this._scrollable.getScrollDimensions();this._scrollable.setScrollDimensions(new sB(e.width,this._computeContentWidth(),e.height,e.contentHeight)),this._updateHeight()}saveState(){let e=this._scrollable.getFutureScrollPosition(),t=e.scrollTop,i=this._linesLayout.getLineNumberAtOrAfterVerticalOffset(t);return{scrollTop:t,scrollTopWithoutViewZones:t-this._linesLayout.getWhitespaceAccumulatedHeightBeforeLineNumber(i),scrollLeft:e.scrollLeft}}changeWhitespace(e){let t=this._linesLayout.changeWhitespace(e);return t&&this.onHeightMaybeChanged(),t}changeSpecialLineHeights(e){let t=this._linesLayout.changeLineHeights(e);return t&&this.onHeightMaybeChanged(),t}getVerticalOffsetForLineNumber(e,t=!1){return this._linesLayout.getVerticalOffsetForLineNumber(e,t)}getVerticalOffsetAfterLineNumber(e,t=!1){return this._linesLayout.getVerticalOffsetAfterLineNumber(e,t)}getLineHeightForLineNumber(e){return this._linesLayout.getLineHeightForLineNumber(e)}isAfterLines(e){return this._linesLayout.isAfterLines(e)}isInTopPadding(e){return this._linesLayout.isInTopPadding(e)}isInBottomPadding(e){return this._linesLayout.isInBottomPadding(e)}getLineNumberAtVerticalOffset(e){return this._linesLayout.getLineNumberAtOrAfterVerticalOffset(e)}getWhitespaceAtVerticalOffset(e){return this._linesLayout.getWhitespaceAtVerticalOffset(e)}getLinesViewportData(){let e=this.getCurrentViewport();return this._linesLayout.getLinesViewportData(e.top,e.top+e.height)}getLinesViewportDataAtScrollTop(e){let t=this._scrollable.getScrollDimensions();return e+t.height>t.scrollHeight&&(e=t.scrollHeight-t.height),e<0&&(e=0),this._linesLayout.getLinesViewportData(e,e+t.height)}getWhitespaceViewportData(){let e=this.getCurrentViewport();return this._linesLayout.getWhitespaceViewportData(e.top,e.top+e.height)}getWhitespaces(){return this._linesLayout.getWhitespaces()}getContentWidth(){return this._scrollable.getScrollDimensions().contentWidth}getScrollWidth(){return this._scrollable.getScrollDimensions().scrollWidth}getContentHeight(){return this._scrollable.getScrollDimensions().contentHeight}getScrollHeight(){return this._scrollable.getScrollDimensions().scrollHeight}getCurrentScrollLeft(){return this._scrollable.getCurrentScrollPosition().scrollLeft}getCurrentScrollTop(){return this._scrollable.getCurrentScrollPosition().scrollTop}validateScrollPosition(e){return this._scrollable.validateScrollPosition(e)}setScrollPosition(e,t){1===t?this._scrollable.setScrollPositionNow(e):this._scrollable.setScrollPositionSmooth(e)}hasPendingScrollAnimation(){return this._scrollable.hasPendingScrollAnimation()}deltaScrollNow(e,t){let i=this._scrollable.getCurrentScrollPosition();this._scrollable.setScrollPositionNow({scrollLeft:i.scrollLeft+e,scrollTop:i.scrollTop+t})}}var sV=i(40391);class sz{constructor(e,t,i,n,s){this.editorId=e,this.model=t,this.configuration=i,this._linesCollection=n,this._coordinatesConverter=s,this._decorationsCache=Object.create(null),this._cachedModelDecorationsResolver=null,this._cachedModelDecorationsResolverViewRange=null}_clearCachedModelDecorationsResolver(){this._cachedModelDecorationsResolver=null,this._cachedModelDecorationsResolverViewRange=null}dispose(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}reset(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}onModelDecorationsChanged(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}onLineMappingChanged(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}_getOrCreateViewModelDecoration(e){let t=e.id,i=this._decorationsCache[t];if(!i){let n,s=e.range,o=e.options;if(o.isWholeLine){let e=this._coordinatesConverter.convertModelPositionToViewPosition(new ee.y(s.startLineNumber,1),0,!1,!0),t=this._coordinatesConverter.convertModelPositionToViewPosition(new ee.y(s.endLineNumber,this.model.getLineMaxColumn(s.endLineNumber)),1);n=new et.Q(e.lineNumber,e.column,t.lineNumber,t.column)}else n=this._coordinatesConverter.convertModelRangeToViewRange(s,1);i=new tX.vo(n,o),this._decorationsCache[t]=i}return i}getMinimapDecorationsInRange(e){return this._getDecorationsInRange(e,!0,!1).decorations}getDecorationsViewportData(e){let t=null!==this._cachedModelDecorationsResolver;return(t=t&&e.equalsRange(this._cachedModelDecorationsResolverViewRange))||(this._cachedModelDecorationsResolver=this._getDecorationsInRange(e,!1,!1),this._cachedModelDecorationsResolverViewRange=e),this._cachedModelDecorationsResolver}getDecorationsOnLine(e,t=!1,i=!1){let n=new et.Q(e,this._linesCollection.getViewLineMinColumn(e),e,this._linesCollection.getViewLineMaxColumn(e));return this._getDecorationsInRange(n,t,i)}_getDecorationsInRange(e,t,i){let n=this._linesCollection.getDecorationsInRange(e,this.editorId,(0,A.$C)(this.configuration.options),(0,A.Vs)(this.configuration.options),t,i),s=e.startLineNumber,o=e.endLineNumber,r=[],a=0,l=[];for(let e=s;e<=o;e++)l[e-s]=[];let h=!1;for(let e=0,t=n.length;e<t;e++){let t=n[e],i=t.options;if(!(0,tX.GN)(this.model,t))continue;let d=this._getOrCreateViewModelDecoration(t),c=d.range;if(r[a++]=d,i.inlineClassName){let e=new sV.k(c,i.inlineClassName,3*!!i.inlineClassNameAffectsLetterSpacing),t=Math.max(s,c.startLineNumber),n=Math.min(o,c.endLineNumber);for(let i=t;i<=n;i++)l[i-s].push(e)}if(i.beforeContentClassName&&s<=c.startLineNumber&&c.startLineNumber<=o){let e=new sV.k(new et.Q(c.startLineNumber,c.startColumn,c.startLineNumber,c.startColumn),i.beforeContentClassName,1);l[c.startLineNumber-s].push(e)}if(i.afterContentClassName&&s<=c.endLineNumber&&c.endLineNumber<=o){let e=new sV.k(new et.Q(c.endLineNumber,c.endColumn,c.endLineNumber,c.endColumn),i.afterContentClassName,2);l[c.endLineNumber-s].push(e)}i.affectsFont&&(h=!0)}return{decorations:r,inlineDecorations:l,hasVariableFonts:h}}}var sU=i(58441);function sj(e,t){return null!==e?new s$(e,t):t?sK.INSTANCE:sG.INSTANCE}class s${constructor(e,t){this._projectionData=e,this._isVisible=t}isVisible(){return this._isVisible}setVisible(e){return this._isVisible=e,this}getProjectionData(){return this._projectionData}getViewLineCount(){return this._isVisible?this._projectionData.getOutputLineCount():0}getViewLineContent(e,t,i){let n;this._assertVisible();let s=i>0?this._projectionData.breakOffsets[i-1]:0,o=this._projectionData.breakOffsets[i];if(null!==this._projectionData.injectionOffsets){let i=this._projectionData.injectionOffsets.map((e,t)=>new nw.uK(0,0,e+1,this._projectionData.injectionOptions[t],0));n=nw.uK.applyInjectedText(e.getLineContent(t),i).substring(s,o)}else n=e.getValueInRange({startLineNumber:t,startColumn:s+1,endLineNumber:t,endColumn:o+1});return i>0&&(n=sQ(this._projectionData.wrappedTextIndentLength)+n),n}getViewLineLength(e,t,i){return this._assertVisible(),this._projectionData.getLineLength(i)}getViewLineMinColumn(e,t,i){return this._assertVisible(),this._projectionData.getMinOutputOffset(i)+1}getViewLineMaxColumn(e,t,i){return this._assertVisible(),this._projectionData.getMaxOutputOffset(i)+1}getViewLineData(e,t,i){let n=[];return this.getViewLinesData(e,t,i,1,0,[!0],n),n[0]}getViewLinesData(e,t,i,n,s,o,r){let a;this._assertVisible();let l=this._projectionData,h=l.injectionOffsets,d=l.injectionOptions,c=null;if(h){c=[];let e=0,t=0;for(let i=0;i<l.getOutputLineCount();i++){let n=[];c[i]=n;let s=i>0?l.breakOffsets[i-1]:0,o=l.breakOffsets[i];for(;t<h.length;){let r=d[t].content.length,a=h[t]+e,c=a+r;if(a>o)break;if(s<c){let e=d[t];if(e.inlineClassName){let t=i>0?l.wrappedTextIndentLength:0,r=t+Math.max(a-s,0),h=t+Math.min(c-s,o-s);r!==h&&n.push(new sV.o(r,h,e.inlineClassName,e.inlineClassNameAffectsLetterSpacing))}}if(c<=o)e+=r,t++;else break}}}if(h){let i=[];for(let e=0;e<h.length;e++){let t=h[e],n=d[e].tokens;n?n.forEach((n,s)=>{i.push({offset:t,text:n.substring(d[e].content),tokenMetadata:s.metadata})}):i.push({offset:t,text:d[e].content,tokenMetadata:sU.f7.defaultTokenMetadata})}a=e.tokenization.getLineTokens(t).withInserted(i)}else a=e.tokenization.getLineTokens(t);for(let e=i;e<i+n;e++){let t=s+e-i;if(!o[t]){r[t]=null;continue}r[t]=this._getViewLineData(a,c?c[e]:null,e)}}_getViewLineData(e,t,i){this._assertVisible();let n=this._projectionData,s=i>0?n.wrappedTextIndentLength:0,o=i>0?n.breakOffsets[i-1]:0,r=n.breakOffsets[i],a=e.sliceAndInflate(o,r,s),l=a.getLineContent();i>0&&(l=sQ(n.wrappedTextIndentLength)+l);let h=this._projectionData.getMinOutputOffset(i)+1,d=l.length+1,c=i+1<this.getViewLineCount(),u=0===i?0:n.breakOffsetsVisibleColumn[i-1];return new ie.GP(l,c,h,d,u,a,t)}getModelColumnOfViewPosition(e,t){return this._assertVisible(),this._projectionData.translateToInputOffset(e,t-1)+1}getViewPositionOfModelPosition(e,t,i=2){return this._assertVisible(),this._projectionData.translateToOutputPosition(t-1,i).toPosition(e)}getViewLineNumberOfModelPosition(e,t){return this._assertVisible(),e+this._projectionData.translateToOutputPosition(t-1).outputLineIndex}normalizePosition(e,t,i){let n=t.lineNumber-e;return this._projectionData.normalizeOutputPosition(e,t.column-1,i).toPosition(n)}getInjectedTextAt(e,t){return this._projectionData.getInjectedText(e,t-1)}_assertVisible(){if(!this._isVisible)throw Error("Not supported")}}class sK{static{this.INSTANCE=new sK}constructor(){}isVisible(){return!0}setVisible(e){return e?this:sG.INSTANCE}getProjectionData(){return null}getViewLineCount(){return 1}getViewLineContent(e,t,i){return e.getLineContent(t)}getViewLineLength(e,t,i){return e.getLineLength(t)}getViewLineMinColumn(e,t,i){return e.getLineMinColumn(t)}getViewLineMaxColumn(e,t,i){return e.getLineMaxColumn(t)}getViewLineData(e,t,i){let n=e.tokenization.getLineTokens(t),s=n.getLineContent();return new ie.GP(s,!1,1,s.length+1,0,n.inflate(),null)}getViewLinesData(e,t,i,n,s,o,r){if(!o[s]){r[s]=null;return}r[s]=this.getViewLineData(e,t,0)}getModelColumnOfViewPosition(e,t){return t}getViewPositionOfModelPosition(e,t){return new ee.y(e,t)}getViewLineNumberOfModelPosition(e,t){return e}normalizePosition(e,t,i){return t}getInjectedTextAt(e,t){return null}}class sG{static{this.INSTANCE=new sG}constructor(){}isVisible(){return!1}setVisible(e){return e?sK.INSTANCE:this}getProjectionData(){return null}getViewLineCount(){return 0}getViewLineContent(e,t,i){throw Error("Not supported")}getViewLineLength(e,t,i){throw Error("Not supported")}getViewLineMinColumn(e,t,i){throw Error("Not supported")}getViewLineMaxColumn(e,t,i){throw Error("Not supported")}getViewLineData(e,t,i){throw Error("Not supported")}getViewLinesData(e,t,i,n,s,o,r){throw Error("Not supported")}getModelColumnOfViewPosition(e,t){throw Error("Not supported")}getViewPositionOfModelPosition(e,t){throw Error("Not supported")}getViewLineNumberOfModelPosition(e,t){throw Error("Not supported")}normalizePosition(e,t,i){throw Error("Not supported")}getInjectedTextAt(e,t){throw Error("Not supported")}}let sq=[""];function sQ(e){if(e>=sq.length)for(let t=1;t<=e;t++)sq[t]=Array(t+1).join(" ");return sq[e]}var sY=i(89190);class sZ{constructor(e){this._model=e}_validPosition(e){return this._model.validatePosition(e)}_validRange(e){return this._model.validateRange(e)}convertViewPositionToModelPosition(e){return this._validPosition(e)}convertViewRangeToModelRange(e){return this._validRange(e)}validateViewPosition(e,t){return this._validPosition(t)}validateViewRange(e,t){return this._validRange(t)}convertModelPositionToViewPosition(e){return this._validPosition(e)}convertModelRangeToViewRange(e){return this._validRange(e)}modelPositionIsVisible(e){let t=this._model.getLineCount();return!(e.lineNumber<1)&&!(e.lineNumber>t)}getModelLineViewLineCount(e){return 1}getViewLineNumberOfModelPosition(e,t){return e}}class sX{constructor(e,t,i,n,s,o,r,a,l,h,d){this._editorId=e,this.model=t,this._validModelVersionId=-1,this._domLineBreaksComputerFactory=i,this._monospaceLineBreaksComputerFactory=n,this.fontInfo=s,this.tabSize=o,this.wrappingStrategy=r,this.wrappingColumn=a,this.wrappingIndent=l,this.wordBreak=h,this.wrapOnEscapedLineFeeds=d,this._constructLines(!0,null)}dispose(){this.hiddenAreasDecorationIds=this.model.deltaDecorations(this.hiddenAreasDecorationIds,[])}createCoordinatesConverter(){return new s1(this)}_constructLines(e,t){this.modelLineProjections=[],e&&(this.hiddenAreasDecorationIds=this.model.deltaDecorations(this.hiddenAreasDecorationIds,[]));let i=this.model.getLinesContent(),n=this.model.getInjectedTextDecorations(this._editorId),s=i.length,o=this.createLineBreaksComputer(),r=new L.j3(nw.uK.fromDecorations(n));for(let e=0;e<s;e++){let n=r.takeWhile(t=>t.lineNumber===e+1);o.addRequest(i[e],n,t?t[e]:null)}let a=o.finalize(),l=[],h=this.hiddenAreasDecorationIds.map(e=>this.model.getDecorationRange(e)).sort(et.Q.compareRangesUsingStarts),d=1,c=0,u=-1,g=0<h.length?c+1:s+2;for(let e=0;e<s;e++){let t=e+1;t===g&&(d=h[++u].startLineNumber,c=h[u].endLineNumber,g=u+1<h.length?c+1:s+2);let i=t>=d&&t<=c,n=sj(a[e],!i);l[e]=n.getViewLineCount(),this.modelLineProjections[e]=n}this._validModelVersionId=this.model.getVersionId(),this.projectedModelLineLineCounts=new sY.c2(l)}getHiddenAreas(){return this.hiddenAreasDecorationIds.map(e=>this.model.getDecorationRange(e))}setHiddenAreas(e){let t=function(e){if(0===e.length)return[];let t=e.slice();t.sort(et.Q.compareRangesUsingStarts);let i=[],n=t[0].startLineNumber,s=t[0].endLineNumber;for(let e=1,o=t.length;e<o;e++){let o=t[e];o.startLineNumber>s+1?(i.push(new et.Q(n,1,s,1)),n=o.startLineNumber,s=o.endLineNumber):o.endLineNumber>s&&(s=o.endLineNumber)}return i.push(new et.Q(n,1,s,1)),i}(e.map(e=>this.model.validateRange(e))),i=this.hiddenAreasDecorationIds.map(e=>this.model.getDecorationRange(e)).sort(et.Q.compareRangesUsingStarts);if(t.length===i.length){let e=!1;for(let n=0;n<t.length;n++)if(!t[n].equalsRange(i[n])){e=!0;break}if(!e)return!1}let n=t.map(e=>({range:e,options:nM.kI.EMPTY}));this.hiddenAreasDecorationIds=this.model.deltaDecorations(this.hiddenAreasDecorationIds,n);let s=1,o=0,r=-1,a=0<t.length?o+1:this.modelLineProjections.length+2,l=!1;for(let e=0;e<this.modelLineProjections.length;e++){let i=e+1;i===a&&(s=t[++r].startLineNumber,o=t[r].endLineNumber,a=r+1<t.length?o+1:this.modelLineProjections.length+2);let n=!1;if(i>=s&&i<=o?this.modelLineProjections[e].isVisible()&&(this.modelLineProjections[e]=this.modelLineProjections[e].setVisible(!1),n=!0):(l=!0,this.modelLineProjections[e].isVisible()||(this.modelLineProjections[e]=this.modelLineProjections[e].setVisible(!0),n=!0)),n){let t=this.modelLineProjections[e].getViewLineCount();this.projectedModelLineLineCounts.setValue(e,t)}}return l||this.setHiddenAreas([]),!0}modelPositionIsVisible(e,t){return!(e<1)&&!(e>this.modelLineProjections.length)&&this.modelLineProjections[e-1].isVisible()}getModelLineViewLineCount(e){return e<1||e>this.modelLineProjections.length?1:this.modelLineProjections[e-1].getViewLineCount()}setTabSize(e){return this.tabSize!==e&&(this.tabSize=e,this._constructLines(!1,null),!0)}setWrappingSettings(e,t,i,n,s){let o=this.fontInfo.equals(e),r=this.wrappingStrategy===t,a=this.wrappingColumn===i,l=this.wrappingIndent===n,h=this.wordBreak===s;if(o&&r&&a&&l&&h)return!1;this.fontInfo=e,this.wrappingStrategy=t,this.wrappingColumn=i,this.wrappingIndent=n,this.wordBreak=s;let d=null;if(o&&r&&!a&&l&&h){d=[];for(let e=0,t=this.modelLineProjections.length;e<t;e++)d[e]=this.modelLineProjections[e].getProjectionData()}return this._constructLines(!1,d),!0}createLineBreaksComputer(){return("advanced"===this.wrappingStrategy?this._domLineBreaksComputerFactory:this._monospaceLineBreaksComputerFactory).createLineBreaksComputer(this.fontInfo,this.tabSize,this.wrappingColumn,this.wrappingIndent,this.wordBreak,this.wrapOnEscapedLineFeeds)}onModelFlushed(){this._constructLines(!0,null)}onModelLinesDeleted(e,t,i){if(!e||e<=this._validModelVersionId)return null;let n=1===t?1:this.projectedModelLineLineCounts.getPrefixSum(t-1)+1,s=this.projectedModelLineLineCounts.getPrefixSum(i);return this.modelLineProjections.splice(t-1,i-t+1),this.projectedModelLineLineCounts.removeValues(t-1,i-t+1),new n3(n,s)}onModelLinesInserted(e,t,i,n){if(!e||e<=this._validModelVersionId)return null;let s=t>2&&!this.modelLineProjections[t-2].isVisible(),o=1===t?1:this.projectedModelLineLineCounts.getPrefixSum(t-1)+1,r=0,a=[],l=[];for(let e=0,t=n.length;e<t;e++){let t=sj(n[e],!s);a.push(t);let i=t.getViewLineCount();r+=i,l[e]=i}return this.modelLineProjections=this.modelLineProjections.slice(0,t-1).concat(a).concat(this.modelLineProjections.slice(t-1)),this.projectedModelLineLineCounts.insertValues(t-1,l),new n7(o,o+r-1)}onModelLineChanged(e,t,i){if(null!==e&&e<=this._validModelVersionId)return[!1,null,null,null];let n=t-1,s=this.modelLineProjections[n].getViewLineCount(),o=sj(i,this.modelLineProjections[n].isVisible());this.modelLineProjections[n]=o;let r=this.modelLineProjections[n].getViewLineCount(),a=!1,l=0,h=-1,d=0,c=-1,u=0,g=-1;s>r?(g=(u=(h=(l=this.projectedModelLineLineCounts.getPrefixSum(t-1)+1)+r-1)+1)+(s-r)-1,a=!0):s<r?(c=(d=(h=(l=this.projectedModelLineLineCounts.getPrefixSum(t-1)+1)+s-1)+1)+(r-s)-1,a=!0):h=(l=this.projectedModelLineLineCounts.getPrefixSum(t-1)+1)+r-1,this.projectedModelLineLineCounts.setValue(n,r);let p=l<=h?new n4(l,h-l+1):null;return[a,p,d<=c?new n7(d,c):null,u<=g?new n3(u,g):null]}acceptVersionId(e){this._validModelVersionId=e,1!==this.modelLineProjections.length||this.modelLineProjections[0].isVisible()||this.setHiddenAreas([])}getViewLineCount(){return this.projectedModelLineLineCounts.getTotalSum()}_toValidViewLineNumber(e){if(e<1)return 1;let t=this.getViewLineCount();return e>t?t:0|e}getActiveIndentGuide(e,t,i){e=this._toValidViewLineNumber(e),t=this._toValidViewLineNumber(t),i=this._toValidViewLineNumber(i);let n=this.convertViewPositionToModelPosition(e,this.getViewLineMinColumn(e)),s=this.convertViewPositionToModelPosition(t,this.getViewLineMinColumn(t)),o=this.convertViewPositionToModelPosition(i,this.getViewLineMinColumn(i)),r=this.model.guides.getActiveIndentGuide(n.lineNumber,s.lineNumber,o.lineNumber),a=this.convertModelPositionToViewPosition(r.startLineNumber,1),l=this.convertModelPositionToViewPosition(r.endLineNumber,this.model.getLineMaxColumn(r.endLineNumber));return{startLineNumber:a.lineNumber,endLineNumber:l.lineNumber,indent:r.indent}}getViewLineInfo(e){e=this._toValidViewLineNumber(e);let t=this.projectedModelLineLineCounts.getIndexOf(e-1);return new sJ(t.index+1,t.remainder)}getMinColumnOfViewLine(e){return this.modelLineProjections[e.modelLineNumber-1].getViewLineMinColumn(this.model,e.modelLineNumber,e.modelLineWrappedLineIdx)}getMaxColumnOfViewLine(e){return this.modelLineProjections[e.modelLineNumber-1].getViewLineMaxColumn(this.model,e.modelLineNumber,e.modelLineWrappedLineIdx)}getModelStartPositionOfViewLine(e){let t=this.modelLineProjections[e.modelLineNumber-1],i=t.getViewLineMinColumn(this.model,e.modelLineNumber,e.modelLineWrappedLineIdx),n=t.getModelColumnOfViewPosition(e.modelLineWrappedLineIdx,i);return new ee.y(e.modelLineNumber,n)}getModelEndPositionOfViewLine(e){let t=this.modelLineProjections[e.modelLineNumber-1],i=t.getViewLineMaxColumn(this.model,e.modelLineNumber,e.modelLineWrappedLineIdx),n=t.getModelColumnOfViewPosition(e.modelLineWrappedLineIdx,i);return new ee.y(e.modelLineNumber,n)}getViewLineInfosGroupedByModelRanges(e,t){let i=this.getViewLineInfo(e),n=this.getViewLineInfo(t),s=[],o=this.getModelStartPositionOfViewLine(i),r=[];for(let e=i.modelLineNumber;e<=n.modelLineNumber;e++){let t=this.modelLineProjections[e-1];if(t.isVisible()){let s=e===i.modelLineNumber?i.modelLineWrappedLineIdx:0,o=e===n.modelLineNumber?n.modelLineWrappedLineIdx+1:t.getViewLineCount();for(let t=s;t<o;t++)r.push(new sJ(e,t))}if(!t.isVisible()&&o){let t=new ee.y(e-1,this.model.getLineMaxColumn(e-1)+1),i=et.Q.fromPositions(o,t);s.push(new s0(i,r)),r=[],o=null}else t.isVisible()&&!o&&(o=new ee.y(e,1))}if(o){let e=et.Q.fromPositions(o,this.getModelEndPositionOfViewLine(n));s.push(new s0(e,r))}return s}getViewLinesBracketGuides(e,t,i,n){let s=i?this.convertViewPositionToModelPosition(i.lineNumber,i.column):null,o=[];for(let i of this.getViewLineInfosGroupedByModelRanges(e,t)){let e=i.modelRange.startLineNumber,t=this.model.guides.getLinesBracketGuides(e,i.modelRange.endLineNumber,s,n);for(let n of i.viewLines){let i=t[n.modelLineNumber-e].map(e=>{if(-1!==e.forWrappedLinesAfterColumn&&this.modelLineProjections[n.modelLineNumber-1].getViewPositionOfModelPosition(0,e.forWrappedLinesAfterColumn).lineNumber>=n.modelLineWrappedLineIdx||-1!==e.forWrappedLinesBeforeOrAtColumn&&this.modelLineProjections[n.modelLineNumber-1].getViewPositionOfModelPosition(0,e.forWrappedLinesBeforeOrAtColumn).lineNumber<n.modelLineWrappedLineIdx)return;if(!e.horizontalLine)return e;let t=-1;if(-1!==e.column){let i=this.modelLineProjections[n.modelLineNumber-1].getViewPositionOfModelPosition(0,e.column);if(i.lineNumber===n.modelLineWrappedLineIdx)t=i.column;else if(i.lineNumber<n.modelLineWrappedLineIdx)t=this.getMinColumnOfViewLine(n);else if(i.lineNumber>n.modelLineWrappedLineIdx)return}let i=this.convertModelPositionToViewPosition(n.modelLineNumber,e.horizontalLine.endColumn),s=this.modelLineProjections[n.modelLineNumber-1].getViewPositionOfModelPosition(0,e.horizontalLine.endColumn);return s.lineNumber===n.modelLineWrappedLineIdx?new tS.TH(e.visibleColumn,t,e.className,new tS.pv(e.horizontalLine.top,i.column),-1,-1):s.lineNumber<n.modelLineWrappedLineIdx||-1!==e.visibleColumn?void 0:new tS.TH(e.visibleColumn,t,e.className,new tS.pv(e.horizontalLine.top,this.getMaxColumnOfViewLine(n)),-1,-1)});o.push(i.filter(e=>!!e))}}return o}getViewLinesIndentGuides(e,t){e=this._toValidViewLineNumber(e),t=this._toValidViewLineNumber(t);let i=this.convertViewPositionToModelPosition(e,this.getViewLineMinColumn(e)),n=this.convertViewPositionToModelPosition(t,this.getViewLineMaxColumn(t)),s=[],o=[],r=[],a=i.lineNumber-1,l=n.lineNumber-1,h=null;for(let e=a;e<=l;e++){let t=this.modelLineProjections[e];if(t.isVisible()){let n=t.getViewLineNumberOfModelPosition(0,e===a?i.column:1),s=t.getViewLineNumberOfModelPosition(0,this.model.getLineMaxColumn(e+1)),l=s-n+1,d=0;l>1&&1===t.getViewLineMinColumn(this.model,e+1,s)&&(d=0===n?1:2),o.push(l),r.push(d),null===h&&(h=new ee.y(e+1,0))}else null!==h&&(s=s.concat(this.model.guides.getLinesIndentGuides(h.lineNumber,e)),h=null)}null!==h&&(s=s.concat(this.model.guides.getLinesIndentGuides(h.lineNumber,n.lineNumber)),h=null);let d=t-e+1,c=Array(d),u=0;for(let e=0,t=s.length;e<t;e++){let t,i=s[e],n=Math.min(d-u,o[e]),a=r[e];t=2===a?0:1===a?1:n;for(let e=0;e<n;e++)e===t&&(i=0),c[u++]=i}return c}getViewLineContent(e){let t=this.getViewLineInfo(e);return this.modelLineProjections[t.modelLineNumber-1].getViewLineContent(this.model,t.modelLineNumber,t.modelLineWrappedLineIdx)}getViewLineLength(e){let t=this.getViewLineInfo(e);return this.modelLineProjections[t.modelLineNumber-1].getViewLineLength(this.model,t.modelLineNumber,t.modelLineWrappedLineIdx)}getViewLineMinColumn(e){let t=this.getViewLineInfo(e);return this.modelLineProjections[t.modelLineNumber-1].getViewLineMinColumn(this.model,t.modelLineNumber,t.modelLineWrappedLineIdx)}getViewLineMaxColumn(e){let t=this.getViewLineInfo(e);return this.modelLineProjections[t.modelLineNumber-1].getViewLineMaxColumn(this.model,t.modelLineNumber,t.modelLineWrappedLineIdx)}getViewLineData(e){let t=this.getViewLineInfo(e);return this.modelLineProjections[t.modelLineNumber-1].getViewLineData(this.model,t.modelLineNumber,t.modelLineWrappedLineIdx)}getViewLinesData(e,t,i){e=this._toValidViewLineNumber(e),t=this._toValidViewLineNumber(t);let n=this.projectedModelLineLineCounts.getIndexOf(e-1),s=e,o=n.index,r=n.remainder,a=[];for(let n=o,l=this.model.getLineCount();n<l;n++){let l=this.modelLineProjections[n];if(!l.isVisible())continue;let h=n===o?r:0,d=l.getViewLineCount()-h,c=!1;if(s+d>t&&(c=!0,d=t-s+1),l.getViewLinesData(this.model,n+1,h,d,s-e,i,a),s+=d,c)break}return a}validateViewPosition(e,t,i){e=this._toValidViewLineNumber(e);let n=this.projectedModelLineLineCounts.getIndexOf(e-1),s=n.index,o=n.remainder,r=this.modelLineProjections[s],a=r.getViewLineMinColumn(this.model,s+1,o),l=r.getViewLineMaxColumn(this.model,s+1,o);t<a&&(t=a),t>l&&(t=l);let h=r.getModelColumnOfViewPosition(o,t);return this.model.validatePosition(new ee.y(s+1,h)).equals(i)?new ee.y(e,t):this.convertModelPositionToViewPosition(i.lineNumber,i.column)}validateViewRange(e,t){let i=this.validateViewPosition(e.startLineNumber,e.startColumn,t.getStartPosition()),n=this.validateViewPosition(e.endLineNumber,e.endColumn,t.getEndPosition());return new et.Q(i.lineNumber,i.column,n.lineNumber,n.column)}convertViewPositionToModelPosition(e,t){let i=this.getViewLineInfo(e),n=this.modelLineProjections[i.modelLineNumber-1].getModelColumnOfViewPosition(i.modelLineWrappedLineIdx,t);return this.model.validatePosition(new ee.y(i.modelLineNumber,n))}convertViewRangeToModelRange(e){let t=this.convertViewPositionToModelPosition(e.startLineNumber,e.startColumn),i=this.convertViewPositionToModelPosition(e.endLineNumber,e.endColumn);return new et.Q(t.lineNumber,t.column,i.lineNumber,i.column)}convertModelPositionToViewPosition(e,t,i=2,n=!1,s=!1){let o=this.model.validatePosition(new ee.y(e,t)),r=o.lineNumber,a=o.column,l=r-1,h=!1;if(s)for(;l<this.modelLineProjections.length&&!this.modelLineProjections[l].isVisible();)l++,h=!0;else for(;l>0&&!this.modelLineProjections[l].isVisible();)l--,h=!0;if(0===l&&!this.modelLineProjections[l].isVisible())return new ee.y(+!n,1);let d=1+this.projectedModelLineLineCounts.getPrefixSum(l);return h?s?this.modelLineProjections[l].getViewPositionOfModelPosition(d,1,i):this.modelLineProjections[l].getViewPositionOfModelPosition(d,this.model.getLineMaxColumn(l+1),i):this.modelLineProjections[r-1].getViewPositionOfModelPosition(d,a,i)}convertModelRangeToViewRange(e,t=0){if(e.isEmpty()){let i=this.convertModelPositionToViewPosition(e.startLineNumber,e.startColumn,t);return et.Q.fromPositions(i)}{let t=this.convertModelPositionToViewPosition(e.startLineNumber,e.startColumn,1),i=this.convertModelPositionToViewPosition(e.endLineNumber,e.endColumn,0);return new et.Q(t.lineNumber,t.column,i.lineNumber,i.column)}}getViewLineNumberOfModelPosition(e,t){let i=e-1;if(this.modelLineProjections[i].isVisible()){let e=1+this.projectedModelLineLineCounts.getPrefixSum(i);return this.modelLineProjections[i].getViewLineNumberOfModelPosition(e,t)}for(;i>0&&!this.modelLineProjections[i].isVisible();)i--;if(0===i&&!this.modelLineProjections[i].isVisible())return 1;let n=1+this.projectedModelLineLineCounts.getPrefixSum(i);return this.modelLineProjections[i].getViewLineNumberOfModelPosition(n,this.model.getLineMaxColumn(i+1))}getDecorationsInRange(e,t,i,n,s,o){let r=this.convertViewPositionToModelPosition(e.startLineNumber,e.startColumn),a=this.convertViewPositionToModelPosition(e.endLineNumber,e.endColumn);if(a.lineNumber-r.lineNumber<=e.endLineNumber-e.startLineNumber)return this.model.getDecorationsInRange(new et.Q(r.lineNumber,1,a.lineNumber,a.column),t,i,n,s,o);let l=[],h=r.lineNumber-1,d=a.lineNumber-1,c=null;for(let e=h;e<=d;e++)if(this.modelLineProjections[e].isVisible())null===c&&(c=new ee.y(e+1,e===h?r.column:1));else if(null!==c){let o=this.model.getLineMaxColumn(e);l=l.concat(this.model.getDecorationsInRange(new et.Q(c.lineNumber,c.column,e,o),t,i,n,s)),c=null}null!==c&&(l=l.concat(this.model.getDecorationsInRange(new et.Q(c.lineNumber,c.column,a.lineNumber,a.column),t,i,n,s)),c=null),l.sort((e,t)=>{let i=et.Q.compareRangesUsingStarts(e.range,t.range);return 0===i?e.id<t.id?-1:+(e.id>t.id):i});let u=[],g=0,p=null;for(let e of l){let t=e.id;p!==t&&(p=t,u[g++]=e)}return u}getInjectedTextAt(e){let t=this.getViewLineInfo(e.lineNumber);return this.modelLineProjections[t.modelLineNumber-1].getInjectedTextAt(t.modelLineWrappedLineIdx,e.column)}normalizePosition(e,t){let i=this.getViewLineInfo(e.lineNumber);return this.modelLineProjections[i.modelLineNumber-1].normalizePosition(i.modelLineWrappedLineIdx,e,t)}getLineIndentColumn(e){let t=this.getViewLineInfo(e);return 0===t.modelLineWrappedLineIdx?this.model.getLineIndentColumn(t.modelLineNumber):0}}class sJ{constructor(e,t){this.modelLineNumber=e,this.modelLineWrappedLineIdx=t}}class s0{constructor(e,t){this.modelRange=e,this.viewLines=t}}class s1{constructor(e){this._lines=e}convertViewPositionToModelPosition(e){return this._lines.convertViewPositionToModelPosition(e.lineNumber,e.column)}convertViewRangeToModelRange(e){return this._lines.convertViewRangeToModelRange(e)}validateViewPosition(e,t){return this._lines.validateViewPosition(e.lineNumber,e.column,t)}validateViewRange(e,t){return this._lines.validateViewRange(e,t)}convertModelPositionToViewPosition(e,t,i,n){return this._lines.convertModelPositionToViewPosition(e.lineNumber,e.column,t,i,n)}convertModelRangeToViewRange(e,t){return this._lines.convertModelRangeToViewRange(e,t)}modelPositionIsVisible(e){return this._lines.modelPositionIsVisible(e.lineNumber,e.column)}getModelLineViewLineCount(e){return this._lines.getModelLineViewLineCount(e)}getViewLineNumberOfModelPosition(e,t){return this._lines.getViewLineNumberOfModelPosition(e,t)}}class s2{constructor(e){this.model=e}dispose(){}createCoordinatesConverter(){return new sZ(this.model)}getHiddenAreas(){return[]}setHiddenAreas(e){return!1}setTabSize(e){return!1}setWrappingSettings(e,t,i,n){return!1}createLineBreaksComputer(){let e=[];return{addRequest:(t,i,n)=>{e.push(null)},finalize:()=>e}}onModelFlushed(){}onModelLinesDeleted(e,t,i){return new n3(t,i)}onModelLinesInserted(e,t,i,n){return new n7(t,i)}onModelLineChanged(e,t,i){return[!1,new n4(t,1),null,null]}acceptVersionId(e){}getViewLineCount(){return this.model.getLineCount()}getActiveIndentGuide(e,t,i){return{startLineNumber:e,endLineNumber:e,indent:0}}getViewLinesBracketGuides(e,t,i){return Array(t-e+1).fill([])}getViewLinesIndentGuides(e,t){let i=t-e+1,n=Array(i);for(let e=0;e<i;e++)n[e]=0;return n}getViewLineContent(e){return this.model.getLineContent(e)}getViewLineLength(e){return this.model.getLineLength(e)}getViewLineMinColumn(e){return this.model.getLineMinColumn(e)}getViewLineMaxColumn(e){return this.model.getLineMaxColumn(e)}getViewLineData(e){let t=this.model.tokenization.getLineTokens(e),i=t.getLineContent();return new ie.GP(i,!1,1,i.length+1,0,t.inflate(),null)}getViewLinesData(e,t,i){let n=this.model.getLineCount();e=Math.min(Math.max(1,e),n),t=Math.min(Math.max(1,t),n);let s=[];for(let n=e;n<=t;n++){let t=n-e;s[t]=i[t]?this.getViewLineData(n):null}return s}getDecorationsInRange(e,t,i,n,s,o){return this.model.getDecorationsInRange(e,t,i,n,s,o)}normalizePosition(e,t){return this.model.normalizePosition(e,t)}getLineIndentColumn(e){return this.model.getLineIndentColumn(e)}getInjectedTextAt(e){return null}}let s5=es.ZS.Right;class s4{constructor(e){this.persist=0,this._requiredLanes=1,this.lanes=new Uint8Array(Math.ceil((e+1)*s5/8))}reset(e){let t=Math.ceil((e+1)*s5/8);this.lanes.length<t?this.lanes=new Uint8Array(t):this.lanes.fill(0),this._requiredLanes=1}get requiredLanes(){return this._requiredLanes}push(e,t,i){i&&(this.persist|=1<<e-1);for(let i=t.startLineNumber;i<=t.endLineNumber;i++){let t=s5*i+(e-1);this.lanes[t>>>3]|=1<<t%8,this._requiredLanes=Math.max(this._requiredLanes,this.countAtLine(i))}}getLanesAtLine(e){let t=[],i=s5*e;for(let e=0;e<s5;e++)(this.persist&1<<e||this.lanes[i>>>3]&1<<i%8)&&t.push(e+1),i++;return t.length?t:[es.ZS.Center]}countAtLine(e){let t=s5*e,i=0;for(let e=0;e<s5;e++)(this.persist&1<<e||this.lanes[t>>>3]&1<<t%8)&&i++,t++;return i}}class s3 extends y.jG{constructor(e,t,i,n,s,o,r,a,l,h){if(super(),this.languageConfigurationService=r,this._themeService=a,this._attachedView=l,this._transactionalTarget=h,this.hiddenAreasModel=new s8,this.previousHiddenAreas=[],this._editorId=e,this._configuration=t,this.model=i,this._eventDispatcher=new sn,this.onEvent=this._eventDispatcher.onEvent,this.cursorConfig=new nz.d$(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._updateConfigurationViewLineCount=this._register(new eP.uC(()=>this._updateConfigurationViewLineCountNow(),0)),this._hasFocus=!1,this._viewportStart=s7.create(this.model),this.glyphLanes=new s4(0),this.model.isTooLargeForTokenization())this._lines=new s2(this.model);else{let e=this._configuration.options,t=e.get(59),i=e.get(156),o=e.get(166),r=e.get(155),a=e.get(146),l=e.get(160);this._lines=new sX(this._editorId,this.model,n,s,t,this.model.getOptions().tabSize,i,o.wrappingColumn,r,a,l)}this.coordinatesConverter=this._lines.createCoordinatesConverter(),this._cursor=this._register(new sy(i,this,this.coordinatesConverter,this.cursorConfig)),this.viewLayout=this._register(new sH(this._configuration,this.getLineCount(),this._getCustomLineHeights(),o)),this._register(this.viewLayout.onDidScroll(e=>{e.scrollTopChanged&&this._handleVisibleLinesChanged(),e.scrollTopChanged&&this._viewportStart.invalidate(),this._eventDispatcher.emitSingleViewEvent(new n8(e)),this._eventDispatcher.emitOutgoingEvent(new sl(e.oldScrollWidth,e.oldScrollLeft,e.oldScrollHeight,e.oldScrollTop,e.scrollWidth,e.scrollLeft,e.scrollHeight,e.scrollTop))})),this._register(this.viewLayout.onDidContentSizeChange(e=>{this._eventDispatcher.emitOutgoingEvent(e)})),this._decorations=new sz(this._editorId,this.model,this._configuration,this._lines,this.coordinatesConverter),this._registerModelEvents(),this._register(this._configuration.onDidChangeFast(e=>{try{let t=this._eventDispatcher.beginEmitViewEvents();this._onConfigurationChanged(t,e)}finally{this._eventDispatcher.endEmitViewEvents()}})),this._register(tH.getInstance().onDidChange(()=>{this._eventDispatcher.emitSingleViewEvent(new st)})),this._register(this._themeService.onDidColorThemeChange(e=>{this._invalidateDecorationsColorCache(),this._eventDispatcher.emitSingleViewEvent(new n6(e))})),this._updateConfigurationViewLineCountNow()}dispose(){super.dispose(),this._decorations.dispose(),this._lines.dispose(),this._viewportStart.dispose(),this._eventDispatcher.dispose()}createLineBreaksComputer(){return this._lines.createLineBreaksComputer()}addViewEventHandler(e){this._eventDispatcher.addViewEventHandler(e)}removeViewEventHandler(e){this._eventDispatcher.removeViewEventHandler(e)}_getCustomLineHeights(){return this._configuration.options.get(5)?this.model.getCustomLineHeightsDecorations(this._editorId).map(e=>{let t=e.range.startLineNumber,i=this.coordinatesConverter.convertModelRangeToViewRange(new et.Q(t,1,t,this.model.getLineMaxColumn(t)));return{decorationId:e.id,startLineNumber:i.startLineNumber,endLineNumber:i.endLineNumber,lineHeight:e.options.lineHeight||0}}):[]}_updateConfigurationViewLineCountNow(){this._configuration.setViewLineCount(this._lines.getViewLineCount())}getModelVisibleRanges(){let e=this.viewLayout.getLinesViewportData(),t=new et.Q(e.startLineNumber,this.getLineMinColumn(e.startLineNumber),e.endLineNumber,this.getLineMaxColumn(e.endLineNumber));return this._toModelVisibleRanges(t)}visibleLinesStabilized(){let e=this.getModelVisibleRanges();this._attachedView.setVisibleLines(e,!0)}_handleVisibleLinesChanged(){let e=this.getModelVisibleRanges();this._attachedView.setVisibleLines(e,!1)}setHasFocus(e){this._hasFocus=e,this._cursor.setHasFocus(e),this._eventDispatcher.emitSingleViewEvent(new n1(e)),this._eventDispatcher.emitOutgoingEvent(new sr(!e,e))}setHasWidgetFocus(e){this._eventDispatcher.emitOutgoingEvent(new sa(!e,e))}onCompositionStart(){this._eventDispatcher.emitSingleViewEvent(new nQ)}onCompositionEnd(){this._eventDispatcher.emitSingleViewEvent(new nY)}_captureStableViewport(){if(this._viewportStart.isValid&&this.viewLayout.getCurrentScrollTop()>0){let e=new ee.y(this._viewportStart.viewLineNumber,this.getLineMinColumn(this._viewportStart.viewLineNumber));return new oe(this.coordinatesConverter.convertViewPositionToModelPosition(e),this._viewportStart.startLineDelta)}return new oe(null,0)}_onConfigurationChanged(e,t){let i=this._captureStableViewport(),n=this._configuration.options,s=n.get(59),o=n.get(156),r=n.get(166),a=n.get(155),l=n.get(146);this._lines.setWrappingSettings(s,o,r.wrappingColumn,a,l)&&(e.emitViewEvent(new n0),e.emitViewEvent(new n5),e.emitViewEvent(new nJ(null)),this._cursor.onLineMappingChanged(e),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount(),this._getCustomLineHeights()),this._updateConfigurationViewLineCount.schedule()),t.hasChanged(104)&&(this._decorations.reset(),e.emitViewEvent(new nJ(null))),t.hasChanged(112)&&(this._decorations.reset(),e.emitViewEvent(new nJ(null))),e.emitViewEvent(new nZ(t)),this.viewLayout.onConfigurationChanged(t),i.recoverViewportStart(this.coordinatesConverter,this.viewLayout),nz.d$.shouldRecreate(t)&&(this.cursorConfig=new nz.d$(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig))}_registerModelEvents(){this._register(this.model.onDidChangeContentOrInjectedText(e=>{try{let t=this._eventDispatcher.beginEmitViewEvents(),i=!1,n=!1,s=e instanceof nw.Ic?e.rawContentChangedEvent.changes:e.changes,o=e instanceof nw.Ic?e.rawContentChangedEvent.versionId:null,r=this._lines.createLineBreaksComputer();for(let e of s)switch(e.changeType){case 4:for(let t=0;t<e.detail.length;t++){let i=e.detail[t],n=e.injectedTexts[t];n&&(n=n.filter(e=>!e.ownerId||e.ownerId===this._editorId)),r.addRequest(i,n,null)}break;case 2:{let t=null;e.injectedText&&(t=e.injectedText.filter(e=>!e.ownerId||e.ownerId===this._editorId)),r.addRequest(e.detail,t,null)}}let a=r.finalize(),l=new L.j3(a);for(let e of s)switch(e.changeType){case 1:this._lines.onModelFlushed(),t.emitViewEvent(new n0),this._decorations.reset(),this.viewLayout.onFlushed(this.getLineCount(),this._getCustomLineHeights()),i=!0;break;case 3:{let n=this._lines.onModelLinesDeleted(o,e.fromLineNumber,e.toLineNumber);null!==n&&(t.emitViewEvent(n),this.viewLayout.onLinesDeleted(n.fromLineNumber,n.toLineNumber)),i=!0;break}case 4:{let n=l.takeCount(e.detail.length),s=this._lines.onModelLinesInserted(o,e.fromLineNumber,e.toLineNumber,n);null!==s&&(t.emitViewEvent(s),this.viewLayout.onLinesInserted(s.fromLineNumber,s.toLineNumber)),i=!0;break}case 2:{let i=l.dequeue(),[s,r,a,h]=this._lines.onModelLineChanged(o,e.lineNumber,i);n=s,r&&t.emitViewEvent(r),a&&(t.emitViewEvent(a),this.viewLayout.onLinesInserted(a.fromLineNumber,a.toLineNumber)),h&&(t.emitViewEvent(h),this.viewLayout.onLinesDeleted(h.fromLineNumber,h.toLineNumber))}}null!==o&&this._lines.acceptVersionId(o),this.viewLayout.onHeightMaybeChanged(),!i&&n&&(t.emitViewEvent(new n5),t.emitViewEvent(new nJ(null)),this._cursor.onLineMappingChanged(t),this._decorations.onLineMappingChanged())}finally{this._eventDispatcher.endEmitViewEvents()}let t=this._viewportStart.isValid;if(this._viewportStart.invalidate(),this._configuration.setModelLineCount(this.model.getLineCount()),this._updateConfigurationViewLineCountNow(),!this._hasFocus&&this.model.getAttachedEditorCount()>=2&&t){let e=this.model._getTrackedRange(this._viewportStart.modelTrackedRange);if(e){let t=this.coordinatesConverter.convertModelPositionToViewPosition(e.getStartPosition()),i=this.viewLayout.getVerticalOffsetForLineNumber(t.lineNumber);this.viewLayout.setScrollPosition({scrollTop:i+this._viewportStart.startLineDelta},1)}}try{let t=this._eventDispatcher.beginEmitViewEvents();e instanceof nw.Ic&&t.emitOutgoingEvent(new sf(e.contentChangedEvent)),this._cursor.onModelContentChanged(t,e)}finally{this._eventDispatcher.endEmitViewEvents()}this._handleVisibleLinesChanged()})),this._configuration.options.get(5)&&this._register(this.model.onDidChangeLineHeight(e=>{let t=e.changes.filter(e=>e.ownerId===this._editorId||0===e.ownerId);if(this.viewLayout.changeSpecialLineHeights(e=>{for(let i of t){let{decorationId:t,lineNumber:n,lineHeight:s}=i,o=this.coordinatesConverter.convertModelRangeToViewRange(new et.Q(n,1,n,this.model.getLineMaxColumn(n)));null!==s?e.insertOrChangeCustomLineHeight(t,o.startLineNumber,o.endLineNumber,s):e.removeCustomLineHeight(t)}}),t.length>0){let e=new nw.zq(t);this._eventDispatcher.emitOutgoingEvent(new sb(e))}})),this._configuration.options.get(172)&&this._register(this.model.onDidChangeFont(e=>{let t=e.changes.filter(e=>e.ownerId===this._editorId||0===e.ownerId);if(t.length>0){let e=new nw.dT(t);this._eventDispatcher.emitOutgoingEvent(new sC(e))}})),this._register(this.model.onDidChangeTokens(e=>{let t=[];for(let i=0,n=e.ranges.length;i<n;i++){let n=e.ranges[i],s=this.coordinatesConverter.convertModelPositionToViewPosition(new ee.y(n.fromLineNumber,1)).lineNumber,o=this.coordinatesConverter.convertModelPositionToViewPosition(new ee.y(n.toLineNumber,this.model.getLineMaxColumn(n.toLineNumber))).lineNumber;t[i]={fromLineNumber:s,toLineNumber:o}}this._eventDispatcher.emitSingleViewEvent(new se(t)),this._eventDispatcher.emitOutgoingEvent(new sv(e))})),this._register(this.model.onDidChangeLanguageConfiguration(e=>{this._eventDispatcher.emitSingleViewEvent(new n2),this.cursorConfig=new nz.d$(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig),this._eventDispatcher.emitOutgoingEvent(new sm(e))})),this._register(this.model.onDidChangeLanguage(e=>{this.cursorConfig=new nz.d$(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig),this._eventDispatcher.emitOutgoingEvent(new sp(e))})),this._register(this.model.onDidChangeOptions(e=>{if(this._lines.setTabSize(this.model.getOptions().tabSize)){try{let e=this._eventDispatcher.beginEmitViewEvents();e.emitViewEvent(new n0),e.emitViewEvent(new n5),e.emitViewEvent(new nJ(null)),this._cursor.onLineMappingChanged(e),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount(),this._getCustomLineHeights())}finally{this._eventDispatcher.endEmitViewEvents()}this._updateConfigurationViewLineCount.schedule()}this.cursorConfig=new nz.d$(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig),this._eventDispatcher.emitOutgoingEvent(new s_(e))})),this._register(this.model.onDidChangeDecorations(e=>{this._decorations.onModelDecorationsChanged(),this._eventDispatcher.emitSingleViewEvent(new nJ(e)),this._eventDispatcher.emitOutgoingEvent(new sg(e))}))}getFontSizeAtPosition(e){if(!this._configuration.options.get(172))return null;let t=this.model.getFontDecorationsInRange(et.Q.fromPositions(e),this._editorId),i=this._configuration.options.get(59).fontSize+"px";for(let e of t)if(e.options.fontSize){i=e.options.fontSize;break}return i}setHiddenAreas(e,t,i){this.hiddenAreasModel.setHiddenAreas(t,e);let n=this.hiddenAreasModel.getMergedRanges();if(n===this.previousHiddenAreas&&!i)return;this.previousHiddenAreas=n;let s=this._captureStableViewport(),o=!1;try{let e=this._eventDispatcher.beginEmitViewEvents();(o=this._lines.setHiddenAreas(n))&&(e.emitViewEvent(new n0),e.emitViewEvent(new n5),e.emitViewEvent(new nJ(null)),this._cursor.onLineMappingChanged(e),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount(),this._getCustomLineHeights()),this.viewLayout.onHeightMaybeChanged());let t=s.viewportStartModelPosition?.lineNumber;t&&n.some(e=>e.startLineNumber<=t&&t<=e.endLineNumber)||s.recoverViewportStart(this.coordinatesConverter,this.viewLayout)}finally{this._eventDispatcher.endEmitViewEvents()}this._updateConfigurationViewLineCount.schedule(),o&&this._eventDispatcher.emitOutgoingEvent(new sd)}getVisibleRangesPlusViewportAboveBelow(){let e=this._configuration.options.get(165),t=this._configuration.options.get(75),i=Math.max(20,Math.round(e.height/t)),n=this.viewLayout.getLinesViewportData(),s=Math.max(1,n.completelyVisibleStartLineNumber-i),o=Math.min(this.getLineCount(),n.completelyVisibleEndLineNumber+i);return this._toModelVisibleRanges(new et.Q(s,this.getLineMinColumn(s),o,this.getLineMaxColumn(o)))}getVisibleRanges(){let e=this.getCompletelyVisibleViewRange();return this._toModelVisibleRanges(e)}getHiddenAreas(){return this._lines.getHiddenAreas()}_toModelVisibleRanges(e){let t=this.coordinatesConverter.convertViewRangeToModelRange(e),i=this._lines.getHiddenAreas();if(0===i.length)return[t];let n=[],s=0,o=t.startLineNumber,r=t.startColumn,a=t.endLineNumber,l=t.endColumn;for(let e=0,t=i.length;e<t;e++){let t=i[e].startLineNumber,l=i[e].endLineNumber;!(l<o)&&(t>a||(o<t&&(n[s++]=new et.Q(o,r,t-1,this.model.getLineMaxColumn(t-1))),o=l+1,r=1))}return(o<a||o===a&&r<l)&&(n[s++]=new et.Q(o,r,a,l)),n}getCompletelyVisibleViewRange(){let e=this.viewLayout.getLinesViewportData(),t=e.completelyVisibleStartLineNumber,i=e.completelyVisibleEndLineNumber;return new et.Q(t,this.getLineMinColumn(t),i,this.getLineMaxColumn(i))}getCompletelyVisibleViewRangeAtScrollTop(e){let t=this.viewLayout.getLinesViewportDataAtScrollTop(e),i=t.completelyVisibleStartLineNumber,n=t.completelyVisibleEndLineNumber;return new et.Q(i,this.getLineMinColumn(i),n,this.getLineMaxColumn(n))}saveState(){let e=this.viewLayout.saveState(),t=e.scrollTop,i=this.viewLayout.getLineNumberAtVerticalOffset(t),n=this.coordinatesConverter.convertViewPositionToModelPosition(new ee.y(i,this.getLineMinColumn(i))),s=this.viewLayout.getVerticalOffsetForLineNumber(i)-t;return{scrollLeft:e.scrollLeft,firstPosition:n,firstPositionDeltaTop:s}}reduceRestoreState(e){if(void 0===e.firstPosition)return this._reduceRestoreStateCompatibility(e);let t=this.model.validatePosition(e.firstPosition),i=this.coordinatesConverter.convertModelPositionToViewPosition(t),n=this.viewLayout.getVerticalOffsetForLineNumber(i.lineNumber)-e.firstPositionDeltaTop;return{scrollLeft:e.scrollLeft,scrollTop:n}}_reduceRestoreStateCompatibility(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTopWithoutViewZones}}getTabSize(){return this.model.getOptions().tabSize}getLineCount(){return this._lines.getViewLineCount()}setViewport(e,t,i){this._viewportStart.update(this,e)}getActiveIndentGuide(e,t,i){return this._lines.getActiveIndentGuide(e,t,i)}getLinesIndentGuides(e,t){return this._lines.getViewLinesIndentGuides(e,t)}getBracketGuidesInRangeByLine(e,t,i,n){return this._lines.getViewLinesBracketGuides(e,t,i,n)}getLineContent(e){return this._lines.getViewLineContent(e)}getLineLength(e){return this._lines.getViewLineLength(e)}getLineMinColumn(e){return this._lines.getViewLineMinColumn(e)}getLineMaxColumn(e){return this._lines.getViewLineMaxColumn(e)}getLineFirstNonWhitespaceColumn(e){let t=eA.HG(this.getLineContent(e));return -1===t?0:t+1}getLineLastNonWhitespaceColumn(e){let t=eA.lT(this.getLineContent(e));return -1===t?0:t+2}getMinimapDecorationsInRange(e){return this._decorations.getMinimapDecorationsInRange(e)}getDecorationsInViewport(e){return this._decorations.getDecorationsViewportData(e).decorations}getInjectedTextAt(e){return this._lines.getInjectedTextAt(e)}_getTextDirection(e,t){let i=0;for(let n of t){let t=n.range;if(t.startLineNumber>e||t.endLineNumber<e)continue;let s=n.options.textDirection;s===es.z4.RTL?i++:s===es.z4.LTR&&i--}return i>0?es.z4.RTL:es.z4.LTR}getTextDirection(e){let t=this._decorations.getDecorationsOnLine(e);return this._getTextDirection(e,t.decorations)}getViewportViewLineRenderingData(e,t){let i=this._decorations.getDecorationsViewportData(e),n=i.inlineDecorations[t-e.startLineNumber];return this._getViewLineRenderingData(t,n,i.hasVariableFonts,i.decorations)}getViewLineRenderingData(e){let t=this._decorations.getDecorationsOnLine(e);return this._getViewLineRenderingData(e,t.inlineDecorations[0],t.hasVariableFonts,t.decorations)}_getViewLineRenderingData(e,t,i,n){let s=this.model.mightContainRTL(),o=this.model.mightContainNonBasicASCII(),r=this.getTabSize(),a=this._lines.getViewLineData(e);return a.inlineDecorations&&(t=[...t,...a.inlineDecorations.map(t=>t.toInlineDecoration(e))]),new ie.qL(a.minColumn,a.maxColumn,a.content,a.continuesWithWrappedLine,s,o,a.tokens,t,r,a.startVisibleColumn,this._getTextDirection(e,n),i)}getViewLineData(e){return this._lines.getViewLineData(e)}getMinimapLinesRenderingData(e,t,i){let n=this._lines.getViewLinesData(e,t,i);return new ie.nt(this.getTabSize(),n)}getAllOverviewRulerDecorations(e){let t=this.model.getOverviewRulerDecorations(this._editorId,(0,A.$C)(this._configuration.options),(0,A.Vs)(this._configuration.options)),i=new s9;for(let n of t){let t=n.options,s=t.overviewRuler;if(!s)continue;let o=s.position;if(0===o)continue;let r=s.getColor(e.value),a=this.coordinatesConverter.getViewLineNumberOfModelPosition(n.range.startLineNumber,n.range.startColumn),l=this.coordinatesConverter.getViewLineNumberOfModelPosition(n.range.endLineNumber,n.range.endColumn);i.accept(r,t.zIndex,a,l,o)}return i.asArray}_invalidateDecorationsColorCache(){for(let e of this.model.getOverviewRulerDecorations()){let t=e.options.overviewRuler;t?.invalidateCachedColor();let i=e.options.minimap;i?.invalidateCachedColor()}}getValueInRange(e,t){let i=this.coordinatesConverter.convertViewRangeToModelRange(e);return this.model.getValueInRange(i,t)}getValueLengthInRange(e,t){let i=this.coordinatesConverter.convertViewRangeToModelRange(e);return this.model.getValueLengthInRange(i,t)}modifyPosition(e,t){let i=this.coordinatesConverter.convertViewPositionToModelPosition(e),n=this.model.modifyPosition(i,t);return this.coordinatesConverter.convertModelPositionToViewPosition(n)}deduceModelPositionRelativeToViewPosition(e,t,i){let n=this.coordinatesConverter.convertViewPositionToModelPosition(e);2===this.model.getEOL().length&&(t<0?t-=i:t+=i);let s=this.model.getOffsetAt(n)+t;return this.model.getPositionAt(s)}getPlainTextToCopy(e,t,i){let n=i?"\r\n":this.model.getEOL();(e=e.slice(0)).sort(et.Q.compareRangesUsingStarts);let s=!1,o=!1;for(let t of e)t.isEmpty()?s=!0:o=!0;if(!o){if(!t)return"";let i=e.map(e=>e.startLineNumber),s="";for(let e=0;e<i.length;e++)e>0&&i[e-1]===i[e]||(s+=this.model.getLineContent(i[e])+n);return s}if(s&&t){let t=[],n=0;for(let s of e){let e=s.startLineNumber;s.isEmpty()?e!==n&&t.push(this.model.getLineContent(e)):t.push(this.model.getValueInRange(s,2*!!i)),n=e}return 1===t.length?t[0]:t}let r=[];for(let t of e)t.isEmpty()||r.push(this.model.getValueInRange(t,2*!!i));return 1===r.length?r[0]:r}getRichTextToCopy(e,t){let i,n=this.model.getLanguageId();if(n===sI.vH||1!==e.length)return null;let s=e[0];if(s.isEmpty()){if(!t)return null;let e=s.startLineNumber;s=new et.Q(e,this.model.getLineMinColumn(e),e,this.model.getLineMaxColumn(e))}let o=this._configuration.options.get(59),r=this._getColorMap();return/[:;\\\/<>]/.test(o.fontFamily)||o.fontFamily===A.jU.fontFamily?i=A.jU.fontFamily:(i=(i=o.fontFamily).replace(/"/g,"'"),!/[,']/.test(i)&&/[+ ]/.test(i)&&(i=`'${i}'`),i=`${i}, ${A.jU.fontFamily}`),{mode:n,html:`<div style="color: ${r[1]};background-color: ${r[2]};font-family: ${i};font-weight: ${o.fontWeight};font-size: ${o.fontSize}px;line-height: ${o.lineHeight}px;white-space: pre;">`+this._getHTMLToCopy(s,r)+"</div>"}}_getHTMLToCopy(e,t){let i=e.startLineNumber,n=e.startColumn,s=e.endLineNumber,o=e.endColumn,r=this.getTabSize(),a="";for(let e=i;e<=s;e++){let l=this.model.tokenization.getLineTokens(e),h=l.getLineContent(),d=e===i?n-1:0,c=e===s?o-1:h.length;""===h?a+="<br>":a+=(0,sN.s0)(h,l.inflate(),t,d,c,r,I.uF)}return a}_getColorMap(){let e=tW.dG.getColorMap(),t=["#000000"];if(e)for(let i=1,n=e.length;i<n;i++)t[i]=t6.Q1.Format.CSS.formatHex(e[i]);return t}getPrimaryCursorState(){return this._cursor.getPrimaryCursorState()}getLastAddedCursorIndex(){return this._cursor.getLastAddedCursorIndex()}getCursorStates(){return this._cursor.getCursorStates()}setCursorStates(e,t,i){return this._withViewEventsCollector(n=>this._cursor.setStates(n,e,t,i))}getCursorColumnSelectData(){return this._cursor.getCursorColumnSelectData()}getCursorAutoClosedCharacters(){return this._cursor.getAutoClosedCharacters()}setCursorColumnSelectData(e){this._cursor.setCursorColumnSelectData(e)}getPrevEditOperationType(){return this._cursor.getPrevEditOperationType()}setPrevEditOperationType(e){this._cursor.setPrevEditOperationType(e)}getSelection(){return this._cursor.getSelection()}getSelections(){return this._cursor.getSelections()}getPosition(){return this._cursor.getPrimaryCursorState().modelState.position}setSelections(e,t,i=0){this._withViewEventsCollector(n=>this._cursor.setSelections(n,e,t,i))}saveCursorState(){return this._cursor.saveState()}restoreCursorState(e){this._withViewEventsCollector(t=>this._cursor.restoreState(t,e))}_executeCursorEdit(e){if(this._cursor.context.cursorConfig.readOnly)return void this._eventDispatcher.emitOutgoingEvent(new su);this._withViewEventsCollector(e)}executeEdits(e,t,i,n){this._executeCursorEdit(s=>this._cursor.executeEdits(s,e,t,i,n))}startComposition(){this._executeCursorEdit(e=>this._cursor.startComposition(e))}endComposition(e){this._executeCursorEdit(t=>this._cursor.endComposition(t,e))}type(e,t){this._executeCursorEdit(i=>this._cursor.type(i,e,t))}compositionType(e,t,i,n,s){this._executeCursorEdit(o=>this._cursor.compositionType(o,e,t,i,n,s))}paste(e,t,i,n){this._executeCursorEdit(s=>this._cursor.paste(s,e,t,i,n))}cut(e){this._executeCursorEdit(t=>this._cursor.cut(t,e))}executeCommand(e,t){this._executeCursorEdit(i=>this._cursor.executeCommand(i,e,t))}executeCommands(e,t){this._executeCursorEdit(i=>this._cursor.executeCommands(i,e,t))}revealAllCursors(e,t,i=!1){this._withViewEventsCollector(n=>this._cursor.revealAll(n,e,i,0,t,0))}revealPrimaryCursor(e,t,i=!1){this._withViewEventsCollector(n=>this._cursor.revealPrimary(n,e,i,0,t,0))}revealTopMostCursor(e){let t=this._cursor.getTopMostViewPosition(),i=new et.Q(t.lineNumber,t.column,t.lineNumber,t.column);this._withViewEventsCollector(t=>t.emitViewEvent(new n9(e,!1,i,null,0,!0,0)))}revealBottomMostCursor(e){let t=this._cursor.getBottomMostViewPosition(),i=new et.Q(t.lineNumber,t.column,t.lineNumber,t.column);this._withViewEventsCollector(t=>t.emitViewEvent(new n9(e,!1,i,null,0,!0,0)))}revealRange(e,t,i,n,s){this._withViewEventsCollector(o=>o.emitViewEvent(new n9(e,!1,i,null,n,t,s)))}changeWhitespace(e){this.viewLayout.changeWhitespace(e)&&(this._eventDispatcher.emitSingleViewEvent(new si),this._eventDispatcher.emitOutgoingEvent(new sh))}_withViewEventsCollector(e){return this._transactionalTarget.batchChanges(()=>{try{let t=this._eventDispatcher.beginEmitViewEvents();return e(t)}finally{this._eventDispatcher.endEmitViewEvents()}})}batchEvents(e){this._withViewEventsCollector(()=>{e()})}normalizePosition(e,t){return this._lines.normalizePosition(e,t)}getLineIndentColumn(e){return this._lines.getLineIndentColumn(e)}}class s7{static create(e){let t=e._setTrackedRange(null,new et.Q(1,1,1,1),1);return new s7(e,1,!1,t,0)}get viewLineNumber(){return this._viewLineNumber}get isValid(){return this._isValid}get modelTrackedRange(){return this._modelTrackedRange}get startLineDelta(){return this._startLineDelta}constructor(e,t,i,n,s){this._model=e,this._viewLineNumber=t,this._isValid=i,this._modelTrackedRange=n,this._startLineDelta=s}dispose(){this._model._setTrackedRange(this._modelTrackedRange,null,1)}update(e,t){let i=e.coordinatesConverter.convertViewPositionToModelPosition(new ee.y(t,e.getLineMinColumn(t))),n=e.model._setTrackedRange(this._modelTrackedRange,new et.Q(i.lineNumber,i.column,i.lineNumber,i.column),1),s=e.viewLayout.getVerticalOffsetForLineNumber(t),o=e.viewLayout.getCurrentScrollTop();this._viewLineNumber=t,this._isValid=!0,this._modelTrackedRange=n,this._startLineDelta=o-s}invalidate(){this._isValid=!1}}class s9{constructor(){this._asMap=Object.create(null),this.asArray=[]}accept(e,t,i,n,s){let o=this._asMap[e];if(o){let e=o.data,t=e[e.length-3],r=e[e.length-1];if(t===s&&r+1>=i){n>r&&(e[e.length-1]=n);return}e.push(s,i,n)}else{let o=new ie.Uv(e,t,[s,i,n]);this._asMap[e]=o,this.asArray.push(o)}}}class s8{constructor(){this.hiddenAreas=new Map,this.shouldRecompute=!1,this.ranges=[]}setHiddenAreas(e,t){let i=this.hiddenAreas.get(e);i&&s6(i,t)||(this.hiddenAreas.set(e,t),this.shouldRecompute=!0)}getMergedRanges(){if(!this.shouldRecompute)return this.ranges;this.shouldRecompute=!1;let e=Array.from(this.hiddenAreas.values()).reduce((e,t)=>(function(e,t){let i=[],n=0,s=0;for(;n<e.length&&s<t.length;){let o=e[n],r=t[s];if(o.endLineNumber<r.startLineNumber-1)i.push(e[n++]);else if(r.endLineNumber<o.startLineNumber-1)i.push(t[s++]);else{let e=Math.min(o.startLineNumber,r.startLineNumber),t=Math.max(o.endLineNumber,r.endLineNumber);i.push(new et.Q(e,1,t,1)),n++,s++}}for(;n<e.length;)i.push(e[n++]);for(;s<t.length;)i.push(t[s++]);return i})(e,t),[]);return s6(this.ranges,e)||(this.ranges=e),this.ranges}}function s6(e,t){if(e.length!==t.length)return!1;for(let i=0;i<e.length;i++)if(!e[i].equalsRange(t[i]))return!1;return!0}class oe{constructor(e,t){this.viewportStartModelPosition=e,this.startLineDelta=t}recoverViewportStart(e,t){if(!this.viewportStartModelPosition)return;let i=e.convertModelPositionToViewPosition(this.viewportStartModelPosition),n=t.getVerticalOffsetForLineNumber(i.lineNumber);t.setScrollPosition({scrollTop:n+this.startLineDelta},1)}}var ot=i(39783),oi=i(8820),on=i(18169),os=i(41227),oo=i(41327),or=function(e,t){return function(i,n){t(i,n,e)}};let oa=class extends y.jG{static{m=this}static{this.dropIntoEditorDecorationOptions=nM.kI.register({description:"workbench-dnd-target",className:"dnd-target"})}get isSimpleWidget(){return this._configuration.isSimpleWidget}get contextMenuId(){return this._configuration.contextMenuId}get contextKeyService(){return this._contextKeyService}constructor(e,t,i,n,s,o,r,a,l,h,d,c){let u;super(),this.languageConfigurationService=d,this._deliveryQueue=(0,w.Qy)(),this._contributions=this._register(new nx),this._onDidDispose=this._register(new w.vl),this.onDidDispose=this._onDidDispose.event,this._onDidChangeModelContent=this._register(new w.vl({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelContent=this._onDidChangeModelContent.event,this._onDidChangeModelLanguage=this._register(new w.vl({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelLanguage=this._onDidChangeModelLanguage.event,this._onDidChangeModelLanguageConfiguration=this._register(new w.vl({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelLanguageConfiguration=this._onDidChangeModelLanguageConfiguration.event,this._onDidChangeModelOptions=this._register(new w.vl({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelOptions=this._onDidChangeModelOptions.event,this._onDidChangeModelDecorations=this._register(new w.vl({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelDecorations=this._onDidChangeModelDecorations.event,this._onDidChangeLineHeight=this._register(new w.vl({deliveryQueue:this._deliveryQueue})),this.onDidChangeLineHeight=this._onDidChangeLineHeight.event,this._onDidChangeFont=this._register(new w.vl({deliveryQueue:this._deliveryQueue})),this.onDidChangeFont=this._onDidChangeFont.event,this._onDidChangeModelTokens=this._register(new w.vl({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelTokens=this._onDidChangeModelTokens.event,this._onDidChangeConfiguration=this._register(new w.vl({deliveryQueue:this._deliveryQueue})),this.onDidChangeConfiguration=this._onDidChangeConfiguration.event,this._onWillChangeModel=this._register(new w.vl({deliveryQueue:this._deliveryQueue})),this.onWillChangeModel=this._onWillChangeModel.event,this._onDidChangeModel=this._register(new w.vl({deliveryQueue:this._deliveryQueue})),this.onDidChangeModel=this._onDidChangeModel.event,this._onDidChangeCursorPosition=this._register(new w.vl({deliveryQueue:this._deliveryQueue})),this.onDidChangeCursorPosition=this._onDidChangeCursorPosition.event,this._onDidChangeCursorSelection=this._register(new w.vl({deliveryQueue:this._deliveryQueue})),this.onDidChangeCursorSelection=this._onDidChangeCursorSelection.event,this._onDidAttemptReadOnlyEdit=this._register(new oc(this._contributions,this._deliveryQueue)),this.onDidAttemptReadOnlyEdit=this._onDidAttemptReadOnlyEdit.event,this._onDidLayoutChange=this._register(new w.vl({deliveryQueue:this._deliveryQueue})),this.onDidLayoutChange=this._onDidLayoutChange.event,this._editorTextFocus=this._register(new od({deliveryQueue:this._deliveryQueue})),this.onDidFocusEditorText=this._editorTextFocus.onDidChangeToTrue,this.onDidBlurEditorText=this._editorTextFocus.onDidChangeToFalse,this._editorWidgetFocus=this._register(new od({deliveryQueue:this._deliveryQueue})),this.onDidFocusEditorWidget=this._editorWidgetFocus.onDidChangeToTrue,this.onDidBlurEditorWidget=this._editorWidgetFocus.onDidChangeToFalse,this._onWillType=this._register(new oc(this._contributions,this._deliveryQueue)),this.onWillType=this._onWillType.event,this._onDidType=this._register(new oc(this._contributions,this._deliveryQueue)),this.onDidType=this._onDidType.event,this._onDidCompositionStart=this._register(new oc(this._contributions,this._deliveryQueue)),this.onDidCompositionStart=this._onDidCompositionStart.event,this._onDidCompositionEnd=this._register(new oc(this._contributions,this._deliveryQueue)),this.onDidCompositionEnd=this._onDidCompositionEnd.event,this._onDidPaste=this._register(new oc(this._contributions,this._deliveryQueue)),this.onDidPaste=this._onDidPaste.event,this._onMouseUp=this._register(new oc(this._contributions,this._deliveryQueue)),this.onMouseUp=this._onMouseUp.event,this._onMouseDown=this._register(new oc(this._contributions,this._deliveryQueue)),this.onMouseDown=this._onMouseDown.event,this._onMouseDrag=this._register(new oc(this._contributions,this._deliveryQueue)),this.onMouseDrag=this._onMouseDrag.event,this._onMouseDrop=this._register(new oc(this._contributions,this._deliveryQueue)),this.onMouseDrop=this._onMouseDrop.event,this._onMouseDropCanceled=this._register(new oc(this._contributions,this._deliveryQueue)),this.onMouseDropCanceled=this._onMouseDropCanceled.event,this._onDropIntoEditor=this._register(new oc(this._contributions,this._deliveryQueue)),this.onDropIntoEditor=this._onDropIntoEditor.event,this._onContextMenu=this._register(new oc(this._contributions,this._deliveryQueue)),this.onContextMenu=this._onContextMenu.event,this._onMouseMove=this._register(new oc(this._contributions,this._deliveryQueue)),this.onMouseMove=this._onMouseMove.event,this._onMouseLeave=this._register(new oc(this._contributions,this._deliveryQueue)),this.onMouseLeave=this._onMouseLeave.event,this._onMouseWheel=this._register(new oc(this._contributions,this._deliveryQueue)),this.onMouseWheel=this._onMouseWheel.event,this._onKeyUp=this._register(new oc(this._contributions,this._deliveryQueue)),this.onKeyUp=this._onKeyUp.event,this._onKeyDown=this._register(new oc(this._contributions,this._deliveryQueue)),this.onKeyDown=this._onKeyDown.event,this._onDidContentSizeChange=this._register(new w.vl({deliveryQueue:this._deliveryQueue})),this.onDidContentSizeChange=this._onDidContentSizeChange.event,this._onDidScrollChange=this._register(new w.vl({deliveryQueue:this._deliveryQueue})),this.onDidScrollChange=this._onDidScrollChange.event,this._onDidChangeViewZones=this._register(new w.vl({deliveryQueue:this._deliveryQueue})),this.onDidChangeViewZones=this._onDidChangeViewZones.event,this._onDidChangeHiddenAreas=this._register(new w.vl({deliveryQueue:this._deliveryQueue})),this.onDidChangeHiddenAreas=this._onDidChangeHiddenAreas.event,this._updateCounter=0,this._onWillTriggerEditorOperationEvent=this._register(new w.vl),this._onBeginUpdate=this._register(new w.vl),this.onBeginUpdate=this._onBeginUpdate.event,this._onEndUpdate=this._register(new w.vl),this.onEndUpdate=this._onEndUpdate.event,this._onBeforeExecuteEdit=this._register(new w.vl),this.onBeforeExecuteEdit=this._onBeforeExecuteEdit.event,this._actions=new Map,this._bannerDomNode=null,this._dropIntoEditorDecorations=this.createDecorationsCollection(),this.inComposition=!1,s.willCreateCodeEditor();let g={...t};if(this._domElement=e,this._overflowWidgetsDomNode=g.overflowWidgetsDomNode,delete g.overflowWidgetsDomNode,this._id=++ol,this._decorationTypeKeysToIds={},this._decorationTypeSubtypes={},this._telemetryData=i.telemetryData,this._configuration=this._register(this._createConfiguration(i.isSimpleWidget||!1,i.contextMenuId??(i.isSimpleWidget?oo.D8.SimpleEditorContext:oo.D8.EditorContext),g,h)),this._register(this._configuration.onDidChange(e=>{this._onDidChangeConfiguration.fire(e);let t=this._configuration.options;if(e.hasChanged(165)){let e=t.get(165);this._onDidLayoutChange.fire(e)}})),this._contextKeyService=this._register(r.createScoped(this._domElement)),i.contextKeyValues)for(let[e,t]of Object.entries(i.contextKeyValues))this._contextKeyService.createKey(e,t);for(let e of(this._notificationService=l,this._codeEditorService=s,this._commandService=o,this._themeService=a,this._register(new ou(this,this._contextKeyService)),this._register(new og(this,this._contextKeyService,c)),this._instantiationService=this._register(n.createChild(new on.a([oi.fN,this._contextKeyService]))),this._modelData=null,this._contentWidgets={},this._overlayWidgets={},this._glyphMarginWidgets={},u=Array.isArray(i.contributions)?i.contributions:_.dS.getEditorContributions(),this._contributions.initialize(this,u,this._instantiationService),_.dS.getEditorActions())){if(this._actions.has(e.id)){(0,C.dz)(Error(`Cannot have two actions with the same id ${e.id}`));continue}let t=new nD.f(e.id,e.label,e.alias,e.metadata,e.precondition??void 0,t=>this._instantiationService.invokeFunction(i=>Promise.resolve(e.runEditorCommand(i,this,t))),this._contextKeyService);this._actions.set(t.id,t)}let p=()=>!this._configuration.options.get(104)&&this._configuration.options.get(43).enabled;this._register(new b.pN(this._domElement,{onDragOver:e=>{if(!p())return;let t=this.getTargetAtClientPoint(e.clientX,e.clientY);t?.position&&this.showDropIndicatorAt(t.position)},onDrop:async e=>{if(!p()||(this.removeDropIndicator(),!e.dataTransfer))return;let t=this.getTargetAtClientPoint(e.clientX,e.clientY);t?.position&&this._onDropIntoEditor.fire({position:t.position,event:e})},onDragLeave:()=>{this.removeDropIndicator()},onDragEnd:()=>{this.removeDropIndicator()}})),this._codeEditorService.addCodeEditor(this)}writeScreenReaderContent(e){this._modelData?.view.writeScreenReaderContent(e)}_createConfiguration(e,t,i,n){return new z(e,t,i,this._domElement,n)}getId(){return this.getEditorType()+":"+this._id}getEditorType(){return nI._.ICodeEditor}dispose(){this._codeEditorService.removeCodeEditor(this),this._actions.clear(),this._contentWidgets={},this._overlayWidgets={},this._removeDecorationTypes(),this._postDetachModelCleanup(this._detachModel()),this._onDidDispose.fire(),super.dispose()}invokeWithinContext(e){return this._instantiationService.invokeFunction(e)}updateOptions(e){this._configuration.updateOptions(e||{})}getOptions(){return this._configuration.options}getOption(e){return this._configuration.options.get(e)}getRawOptions(){return this._configuration.getRawOptions()}getOverflowWidgetsDomNode(){return this._overflowWidgetsDomNode}getConfiguredWordAtPosition(e){return this._modelData?nL.z.getWordAtPosition(this._modelData.model,this._configuration.options.get(148),this._configuration.options.get(147),e):null}getValue(e=null){if(!this._modelData)return"";let t=!!e&&!!e.preserveBOM,i=0;return e&&e.lineEnding&&"\n"===e.lineEnding?i=1:e&&e.lineEnding&&"\r\n"===e.lineEnding&&(i=2),this._modelData.model.getValue(i,t)}setValue(e){try{if(this._beginUpdate(),!this._modelData)return;this._modelData.model.setValue(e)}finally{this._endUpdate()}}getModel(){return this._modelData?this._modelData.model:null}setModel(e=null){try{if(this._beginUpdate(),null===this._modelData&&null===e||this._modelData&&this._modelData.model===e)return;let t={oldModelUrl:this._modelData?.model.uri||null,newModelUrl:e?.uri||null};this._onWillChangeModel.fire(t);let i=this.hasTextFocus(),n=this._detachModel();this._attachModel(e),this.hasModel()?i&&this.focus():(this._editorTextFocus.setValue(!1),this._editorWidgetFocus.setValue(!1)),this._removeDecorationTypes(),this._onDidChangeModel.fire(t),this._postDetachModelCleanup(n),this._contributionsDisposable=this._contributions.onAfterModelAttached()}finally{this._endUpdate()}}_removeDecorationTypes(){if(this._decorationTypeKeysToIds={},this._decorationTypeSubtypes){for(let e in this._decorationTypeSubtypes){let t=this._decorationTypeSubtypes[e];for(let i in t)this._removeDecorationType(e+"-"+i)}this._decorationTypeSubtypes={}}}getVisibleRanges(){return this._modelData?this._modelData.viewModel.getVisibleRanges():[]}getVisibleRangesPlusViewportAboveBelow(){return this._modelData?this._modelData.viewModel.getVisibleRangesPlusViewportAboveBelow():[]}getWhitespaces(){return this._modelData?this._modelData.viewModel.viewLayout.getWhitespaces():[]}static _getVerticalOffsetAfterPosition(e,t,i,n){let s=e.model.validatePosition({lineNumber:t,column:i}),o=e.viewModel.coordinatesConverter.convertModelPositionToViewPosition(s);return e.viewModel.viewLayout.getVerticalOffsetAfterLineNumber(o.lineNumber,n)}getTopForLineNumber(e,t=!1){return this._modelData?m._getVerticalOffsetForPosition(this._modelData,e,1,t):-1}getTopForPosition(e,t){return this._modelData?m._getVerticalOffsetForPosition(this._modelData,e,t,!1):-1}static _getVerticalOffsetForPosition(e,t,i,n=!1){let s=e.model.validatePosition({lineNumber:t,column:i}),o=e.viewModel.coordinatesConverter.convertModelPositionToViewPosition(s);return e.viewModel.viewLayout.getVerticalOffsetForLineNumber(o.lineNumber,n)}getBottomForLineNumber(e,t=!1){if(!this._modelData)return -1;let i=this._modelData.model.getLineMaxColumn(e);return m._getVerticalOffsetAfterPosition(this._modelData,e,i,t)}getLineHeightForPosition(e){if(!this._modelData)return -1;let t=this._modelData.viewModel,i=t.coordinatesConverter,n=ee.y.lift(e);if(i.modelPositionIsVisible(n)){let e=i.convertModelPositionToViewPosition(n);return t.viewLayout.getLineHeightForLineNumber(e.lineNumber)}return 0}setHiddenAreas(e,t,i){this._modelData?.viewModel.setHiddenAreas(e.map(e=>et.Q.lift(e)),t,i)}getVisibleColumnFromPosition(e){if(!this._modelData)return e.column;let t=this._modelData.model.validatePosition(e),i=this._modelData.model.getOptions().tabSize;return ei.A.visibleColumnFromColumn(this._modelData.model.getLineContent(t.lineNumber),t.column,i)+1}getPosition(){return this._modelData?this._modelData.viewModel.getPosition():null}setPosition(e,t="api"){if(this._modelData){if(!ee.y.isIPosition(e))throw Error("Invalid arguments");this._modelData.viewModel.setSelections(t,[{selectionStartLineNumber:e.lineNumber,selectionStartColumn:e.column,positionLineNumber:e.lineNumber,positionColumn:e.column}])}}_sendRevealRange(e,t,i,n){if(!this._modelData)return;if(!et.Q.isIRange(e))throw Error("Invalid arguments");let s=this._modelData.model.validateRange(e),o=this._modelData.viewModel.coordinatesConverter.convertModelRangeToViewRange(s);this._modelData.viewModel.revealRange("api",i,o,t,n)}revealLine(e,t=0){this._revealLine(e,0,t)}revealLineInCenter(e,t=0){this._revealLine(e,1,t)}revealLineInCenterIfOutsideViewport(e,t=0){this._revealLine(e,2,t)}revealLineNearTop(e,t=0){this._revealLine(e,5,t)}_revealLine(e,t,i){if("number"!=typeof e)throw Error("Invalid arguments");this._sendRevealRange(new et.Q(e,1,e,1),t,!1,i)}revealPosition(e,t=0){this._revealPosition(e,0,!0,t)}revealPositionInCenter(e,t=0){this._revealPosition(e,1,!0,t)}revealPositionInCenterIfOutsideViewport(e,t=0){this._revealPosition(e,2,!0,t)}revealPositionNearTop(e,t=0){this._revealPosition(e,5,!0,t)}_revealPosition(e,t,i,n){if(!ee.y.isIPosition(e))throw Error("Invalid arguments");this._sendRevealRange(new et.Q(e.lineNumber,e.column,e.lineNumber,e.column),t,i,n)}getSelection(){return this._modelData?this._modelData.viewModel.getSelection():null}getSelections(){return this._modelData?this._modelData.viewModel.getSelections():null}setSelection(e,t="api"){let i=ey.L.isISelection(e),n=et.Q.isIRange(e);if(!i&&!n)throw Error("Invalid arguments");if(i)this._setSelectionImpl(e,t);else if(n){let i={selectionStartLineNumber:e.startLineNumber,selectionStartColumn:e.startColumn,positionLineNumber:e.endLineNumber,positionColumn:e.endColumn};this._setSelectionImpl(i,t)}}_setSelectionImpl(e,t){if(!this._modelData)return;let i=new ey.L(e.selectionStartLineNumber,e.selectionStartColumn,e.positionLineNumber,e.positionColumn);this._modelData.viewModel.setSelections(t,[i])}revealLines(e,t,i=0){this._revealLines(e,t,0,i)}revealLinesInCenter(e,t,i=0){this._revealLines(e,t,1,i)}revealLinesInCenterIfOutsideViewport(e,t,i=0){this._revealLines(e,t,2,i)}revealLinesNearTop(e,t,i=0){this._revealLines(e,t,5,i)}_revealLines(e,t,i,n){if("number"!=typeof e||"number"!=typeof t)throw Error("Invalid arguments");this._sendRevealRange(new et.Q(e,1,t,1),i,!1,n)}revealRange(e,t=0,i=!1,n=!0){this._revealRange(e,+!!i,n,t)}revealRangeInCenter(e,t=0){this._revealRange(e,1,!0,t)}revealRangeInCenterIfOutsideViewport(e,t=0){this._revealRange(e,2,!0,t)}revealRangeNearTop(e,t=0){this._revealRange(e,5,!0,t)}revealRangeNearTopIfOutsideViewport(e,t=0){this._revealRange(e,6,!0,t)}revealRangeAtTop(e,t=0){this._revealRange(e,3,!0,t)}_revealRange(e,t,i,n){if(!et.Q.isIRange(e))throw Error("Invalid arguments");this._sendRevealRange(et.Q.lift(e),t,i,n)}setSelections(e,t="api",i=0){if(this._modelData){if(!e||0===e.length)throw Error("Invalid arguments");for(let t=0,i=e.length;t<i;t++)if(!ey.L.isISelection(e[t]))throw Error("Invalid arguments");this._modelData.viewModel.setSelections(t,e,i)}}getContentWidth(){return this._modelData?this._modelData.viewModel.viewLayout.getContentWidth():-1}getScrollWidth(){return this._modelData?this._modelData.viewModel.viewLayout.getScrollWidth():-1}getScrollLeft(){return this._modelData?this._modelData.viewModel.viewLayout.getCurrentScrollLeft():-1}getContentHeight(){return this._modelData?this._modelData.viewModel.viewLayout.getContentHeight():-1}getScrollHeight(){return this._modelData?this._modelData.viewModel.viewLayout.getScrollHeight():-1}getScrollTop(){return this._modelData?this._modelData.viewModel.viewLayout.getCurrentScrollTop():-1}setScrollLeft(e,t=1){if(this._modelData){if("number"!=typeof e)throw Error("Invalid arguments");this._modelData.viewModel.viewLayout.setScrollPosition({scrollLeft:e},t)}}setScrollTop(e,t=1){if(this._modelData){if("number"!=typeof e)throw Error("Invalid arguments");this._modelData.viewModel.viewLayout.setScrollPosition({scrollTop:e},t)}}setScrollPosition(e,t=1){this._modelData&&this._modelData.viewModel.viewLayout.setScrollPosition(e,t)}hasPendingScrollAnimation(){return!!this._modelData&&this._modelData.viewModel.viewLayout.hasPendingScrollAnimation()}saveViewState(){if(!this._modelData)return null;let e=this._contributions.saveViewState();return{cursorState:this._modelData.viewModel.saveCursorState(),viewState:this._modelData.viewModel.saveState(),contributionsState:e}}restoreViewState(e){if(this._modelData&&this._modelData.hasRealView&&e&&e.cursorState&&e.viewState){let t=e.cursorState;Array.isArray(t)?t.length>0&&this._modelData.viewModel.restoreCursorState(t):this._modelData.viewModel.restoreCursorState([t]),this._contributions.restoreViewState(e.contributionsState||{});let i=this._modelData.viewModel.reduceRestoreState(e.viewState);this._modelData.view.restoreState(i)}}handleInitialized(){this._getViewModel()?.visibleLinesStabilized()}getContribution(e){return this._contributions.get(e)}getActions(){return Array.from(this._actions.values())}getSupportedActions(){let e=this.getActions();return e.filter(e=>e.isSupported())}getAction(e){return this._actions.get(e)||null}trigger(e,t,i){i=i||{};try{switch(this._onWillTriggerEditorOperationEvent.fire({source:e,handlerId:t,payload:i}),this._beginUpdate(),t){case"compositionStart":this._startComposition();return;case"compositionEnd":this._endComposition(e);return;case"type":{let t=i;this._type(e,t.text||"");return}case"replacePreviousChar":{let t=i;this._compositionType(e,t.text||"",t.replaceCharCnt||0,0,0);return}case"compositionType":{let t=i;this._compositionType(e,t.text||"",t.replacePrevCharCnt||0,t.replaceNextCharCnt||0,t.positionDelta||0);return}case"paste":{let t=i;this._paste(e,t.text||"",t.pasteOnNewLine||!1,t.multicursorText||null,t.mode||null,t.clipboardEvent);return}case"cut":this._cut(e);return}let n=this.getAction(t);if(n)return void Promise.resolve(n.run(i)).then(void 0,C.dz);if(!this._modelData||this._triggerEditorCommand(e,t,i))return;this._triggerCommand(t,i)}finally{this._endUpdate()}}_triggerCommand(e,t){this._commandService.executeCommand(e,t)}_startComposition(){this._modelData&&(this.inComposition=!0,this._modelData.viewModel.startComposition(),this._onDidCompositionStart.fire())}_endComposition(e){this._modelData&&(this.inComposition=!1,this._modelData.viewModel.endComposition(e),this._onDidCompositionEnd.fire())}_type(e,t){this._modelData&&0!==t.length&&("keyboard"===e&&this._onWillType.fire(t),this._modelData.viewModel.type(t,e),"keyboard"===e&&this._onDidType.fire(t))}_compositionType(e,t,i,n,s){this._modelData&&this._modelData.viewModel.compositionType(t,i,n,s,e)}_paste(e,t,i,n,s,o){if(!this._modelData)return;let r=this._modelData.viewModel,a=r.getSelection().getStartPosition();r.paste(t,i,n,e);let l=r.getSelection().getStartPosition();"keyboard"===e&&this._onDidPaste.fire({clipboardEvent:o,range:new et.Q(a.lineNumber,a.column,l.lineNumber,l.column),languageId:s})}_cut(e){this._modelData&&this._modelData.viewModel.cut(e)}_triggerEditorCommand(e,t,i){let n=_.dS.getEditorCommand(t);return!!n&&((i=i||{}).source=e,this._instantiationService.invokeFunction(e=>{Promise.resolve(n.runEditorCommand(e,this,i)).then(void 0,C.dz)}),!0)}_getViewModel(){return this._modelData?this._modelData.viewModel:null}pushUndoStop(){return!(!this._modelData||this._configuration.options.get(104))&&(this._modelData.model.pushStackElement(),!0)}popUndoStop(){return!(!this._modelData||this._configuration.options.get(104))&&(this._modelData.model.popStackElement(),!0)}edit(e,t){return this.executeEdits(t,e.replacements.map(e=>({range:e.range,text:e.text})),void 0)}executeEdits(e,t,i){let n,s,o;return!(!this._modelData||this._configuration.options.get(104))&&(n=i?Array.isArray(i)?()=>i:i:()=>null,e instanceof sw.OL?(o=e,s=e.metadata.source):(o=sw.dg.unknown({name:s}),s=e),this._onBeforeExecuteEdit.fire({source:s??void 0}),this._modelData.viewModel.executeEdits(s,t,n,o),!0)}executeCommand(e,t){this._modelData&&this._modelData.viewModel.executeCommand(t,e)}executeCommands(e,t){this._modelData&&this._modelData.viewModel.executeCommands(t,e)}createDecorationsCollection(e){return new op(this,e)}changeDecorations(e){return this._modelData?this._modelData.model.changeDecorations(e,this._id):null}getLineDecorations(e){if(!this._modelData)return null;let t=this._configuration.options;return this._modelData.model.getLineDecorations(e,this._id,(0,A.$C)(t),(0,A.Vs)(t))}getDecorationsInRange(e){if(!this._modelData)return null;let t=this._configuration.options;return this._modelData.model.getDecorationsInRange(e,this._id,(0,A.$C)(t),(0,A.Vs)(t))}getFontSizeAtPosition(e){return this._modelData?this._modelData.viewModel.getFontSizeAtPosition(e):null}deltaDecorations(e,t){return this._modelData?0===e.length&&0===t.length?e:this._modelData.model.deltaDecorations(e,t,this._id):[]}removeDecorations(e){this._modelData&&0!==e.length&&this._modelData.model.changeDecorations(t=>{t.deltaDecorations(e,[])})}removeDecorationsByType(e){let t=this._decorationTypeKeysToIds[e];t&&this.changeDecorations(e=>e.deltaDecorations(t,[])),this._decorationTypeKeysToIds.hasOwnProperty(e)&&delete this._decorationTypeKeysToIds[e],this._decorationTypeSubtypes.hasOwnProperty(e)&&delete this._decorationTypeSubtypes[e]}getLayoutInfo(){return this._configuration.options.get(165)}createOverviewRuler(e){return this._modelData&&this._modelData.hasRealView?this._modelData.view.createOverviewRuler(e):null}getContainerDomNode(){return this._domElement}getDomNode(){return this._modelData&&this._modelData.hasRealView?this._modelData.view.domNode.domNode:null}delegateVerticalScrollbarPointerDown(e){this._modelData&&this._modelData.hasRealView&&this._modelData.view.delegateVerticalScrollbarPointerDown(e)}delegateScrollFromMouseWheelEvent(e){this._modelData&&this._modelData.hasRealView&&this._modelData.view.delegateScrollFromMouseWheelEvent(e)}layout(e,t=!1){this._configuration.observeContainer(e),t||this.render()}focus(){this._modelData&&this._modelData.hasRealView&&this._modelData.view.focus()}hasTextFocus(){return!!this._modelData&&!!this._modelData.hasRealView&&this._modelData.view.isFocused()}hasWidgetFocus(){return!!this._modelData&&!!this._modelData.hasRealView&&this._modelData.view.isWidgetFocused()}addContentWidget(e){let t={widget:e,position:e.getPosition()};this._contentWidgets.hasOwnProperty(e.getId())&&console.warn("Overwriting a content widget with the same id:"+e.getId()),this._contentWidgets[e.getId()]=t,this._modelData&&this._modelData.hasRealView&&this._modelData.view.addContentWidget(t)}layoutContentWidget(e){let t=e.getId();if(this._contentWidgets.hasOwnProperty(t)){let i=this._contentWidgets[t];i.position=e.getPosition(),this._modelData&&this._modelData.hasRealView&&this._modelData.view.layoutContentWidget(i)}}removeContentWidget(e){let t=e.getId();if(this._contentWidgets.hasOwnProperty(t)){let e=this._contentWidgets[t];delete this._contentWidgets[t],this._modelData&&this._modelData.hasRealView&&this._modelData.view.removeContentWidget(e)}}addOverlayWidget(e){let t={widget:e,position:e.getPosition()};this._overlayWidgets.hasOwnProperty(e.getId())&&console.warn("Overwriting an overlay widget with the same id."),this._overlayWidgets[e.getId()]=t,this._modelData&&this._modelData.hasRealView&&this._modelData.view.addOverlayWidget(t)}layoutOverlayWidget(e){let t=e.getId();if(this._overlayWidgets.hasOwnProperty(t)){let i=this._overlayWidgets[t];i.position=e.getPosition(),this._modelData&&this._modelData.hasRealView&&this._modelData.view.layoutOverlayWidget(i)}}removeOverlayWidget(e){let t=e.getId();if(this._overlayWidgets.hasOwnProperty(t)){let e=this._overlayWidgets[t];delete this._overlayWidgets[t],this._modelData&&this._modelData.hasRealView&&this._modelData.view.removeOverlayWidget(e)}}addGlyphMarginWidget(e){let t={widget:e,position:e.getPosition()};this._glyphMarginWidgets.hasOwnProperty(e.getId())&&console.warn("Overwriting a glyph margin widget with the same id."),this._glyphMarginWidgets[e.getId()]=t,this._modelData&&this._modelData.hasRealView&&this._modelData.view.addGlyphMarginWidget(t)}layoutGlyphMarginWidget(e){let t=e.getId();if(this._glyphMarginWidgets.hasOwnProperty(t)){let i=this._glyphMarginWidgets[t];i.position=e.getPosition(),this._modelData&&this._modelData.hasRealView&&this._modelData.view.layoutGlyphMarginWidget(i)}}removeGlyphMarginWidget(e){let t=e.getId();if(this._glyphMarginWidgets.hasOwnProperty(t)){let e=this._glyphMarginWidgets[t];delete this._glyphMarginWidgets[t],this._modelData&&this._modelData.hasRealView&&this._modelData.view.removeGlyphMarginWidget(e)}}changeViewZones(e){this._modelData&&this._modelData.hasRealView&&this._modelData.view.change(e)}getTargetAtClientPoint(e,t){return this._modelData&&this._modelData.hasRealView?this._modelData.view.getTargetAtClientPoint(e,t):null}getScrolledVisiblePosition(e){if(!this._modelData||!this._modelData.hasRealView)return null;let t=this._modelData.model.validatePosition(e),i=this._configuration.options.get(165),n=m._getVerticalOffsetForPosition(this._modelData,t.lineNumber,t.column)-this.getScrollTop();return{top:n,left:this._modelData.view.getOffsetForColumn(t.lineNumber,t.column)+i.glyphMarginWidth+i.lineNumbersWidth+i.decorationsWidth-this.getScrollLeft(),height:this.getLineHeightForPosition(t)}}getOffsetForColumn(e,t){return this._modelData&&this._modelData.hasRealView?this._modelData.view.getOffsetForColumn(e,t):-1}render(e=!1){this._modelData&&this._modelData.hasRealView&&this._modelData.viewModel.batchEvents(()=>{this._modelData.view.render(!0,e)})}setAriaOptions(e){this._modelData&&this._modelData.hasRealView&&this._modelData.view.setAriaOptions(e)}applyFontInfo(e){(0,k.M)(e,this._configuration.options.get(59))}setBanner(e,t){this._bannerDomNode&&this._domElement.contains(this._bannerDomNode)&&this._bannerDomNode.remove(),this._bannerDomNode=e,this._configuration.setReservedHeight(e?t:0),this._bannerDomNode&&this._domElement.prepend(this._bannerDomNode)}_attachModel(e){if(!e){this._modelData=null;return}let t=[];this._domElement.setAttribute("data-mode-id",e.getLanguageId()),this._configuration.setIsDominatedByLongLines(e.isDominatedByLongLines()),this._configuration.setModelLineCount(e.getLineCount());let i=e.onBeforeAttached(),n=new s3(this._id,this._configuration,e,nS.create(b.zk(this._domElement)),nO.create(this._configuration.options),e=>b.PG(b.zk(this._domElement),e),this.languageConfigurationService,this._themeService,i,{batchChanges:e=>{try{return this._beginUpdate(),e()}finally{this._endUpdate()}}});t.push(e.onWillDispose(()=>this.setModel(null))),t.push(n.onEvent(t=>{switch(t.kind){case 0:this._onDidContentSizeChange.fire(t);break;case 1:this._editorTextFocus.setValue(t.hasFocus);break;case 2:this._editorWidgetFocus.setValue(t.hasFocus);break;case 3:this._onDidScrollChange.fire(t);break;case 4:this._onDidChangeViewZones.fire();break;case 5:this._onDidChangeHiddenAreas.fire();break;case 6:this._onDidAttemptReadOnlyEdit.fire();break;case 7:{if(t.reachedMaxCursorCount){let e=this.getOption(89),t=ij.kg(80,"The number of cursors has been limited to {0}. Consider using [find and replace](https://code.visualstudio.com/docs/editor/codebasics#_find-and-replace) for larger changes or increase the editor multi cursor limit setting.",e);this._notificationService.prompt(os.AI.Warning,t,[{label:"Find and Replace",run:()=>{this._commandService.executeCommand("editor.action.startFindReplaceAction")}},{label:ij.kg(81,"Increase Multi Cursor Limit"),run:()=>{this._commandService.executeCommand("workbench.action.openSettings2",{query:"editor.multiCursorLimit"})}}])}let e=[];for(let i=0,n=t.selections.length;i<n;i++)e[i]=t.selections[i].getPosition();let i={position:e[0],secondaryPositions:e.slice(1),reason:t.reason,source:t.source};this._onDidChangeCursorPosition.fire(i);let n={selection:t.selections[0],secondarySelections:t.selections.slice(1),modelVersionId:t.modelVersionId,oldSelections:t.oldSelections,oldModelVersionId:t.oldModelVersionId,source:t.source,reason:t.reason};this._onDidChangeCursorSelection.fire(n);break}case 8:this._onDidChangeModelDecorations.fire(t.event);break;case 9:this._domElement.setAttribute("data-mode-id",e.getLanguageId()),this._onDidChangeModelLanguage.fire(t.event);break;case 10:this._onDidChangeModelLanguageConfiguration.fire(t.event);break;case 11:this._onDidChangeModelContent.fire(t.event);break;case 12:this._onDidChangeModelOptions.fire(t.event);break;case 13:this._onDidChangeModelTokens.fire(t.event);break;case 14:this._onDidChangeLineHeight.fire(t.event);break;case 15:this._onDidChangeFont.fire(t.event)}}));let[s,o]=this._createView(n);if(o){this._domElement.appendChild(s.domNode.domNode);let t=Object.keys(this._contentWidgets);for(let e=0,i=t.length;e<i;e++){let i=t[e];s.addContentWidget(this._contentWidgets[i])}t=Object.keys(this._overlayWidgets);for(let e=0,i=t.length;e<i;e++){let i=t[e];s.addOverlayWidget(this._overlayWidgets[i])}t=Object.keys(this._glyphMarginWidgets);for(let e=0,i=t.length;e<i;e++){let i=t[e];s.addGlyphMarginWidget(this._glyphMarginWidgets[i])}s.render(!1,!0),s.domNode.domNode.setAttribute("data-uri",e.uri.toString())}this._modelData=new oh(e,n,s,o,t,i)}_createView(e){let t;t=this.isSimpleWidget?{paste:(e,t,i,n)=>{this._paste("keyboard",e,t,i,n)},type:e=>{this._type("keyboard",e)},compositionType:(e,t,i,n)=>{this._compositionType("keyboard",e,t,i,n)},startComposition:()=>{this._startComposition()},endComposition:()=>{this._endComposition("keyboard")},cut:()=>{this._cut("keyboard")}}:{paste:(e,t,i,n)=>{this._commandService.executeCommand("paste",{text:e,pasteOnNewLine:t,multicursorText:i,mode:n})},type:e=>{this._commandService.executeCommand("type",{text:e})},compositionType:(e,t,i,n)=>{i||n?this._commandService.executeCommand("compositionType",{text:e,replacePrevCharCnt:t,replaceNextCharCnt:i,positionDelta:n}):this._commandService.executeCommand("replacePreviousChar",{text:e,replaceCharCnt:t})},startComposition:()=>{this._commandService.executeCommand("compositionStart",{})},endComposition:()=>{this._commandService.executeCommand("compositionEnd",{})},cut:()=>{this._commandService.executeCommand("cut",{})}};let i=new e7(e.coordinatesConverter);return i.onKeyDown=e=>this._onKeyDown.fire(e),i.onKeyUp=e=>this._onKeyUp.fire(e),i.onContextMenu=e=>this._onContextMenu.fire(e),i.onMouseMove=e=>this._onMouseMove.fire(e),i.onMouseLeave=e=>this._onMouseLeave.fire(e),i.onMouseDown=e=>this._onMouseDown.fire(e),i.onMouseUp=e=>this._onMouseUp.fire(e),i.onMouseDrag=e=>this._onMouseDrag.fire(e),i.onMouseDrop=e=>this._onMouseDrop.fire(e),i.onMouseDropCanceled=e=>this._onMouseDropCanceled.fire(e),i.onMouseWheel=e=>this._onMouseWheel.fire(e),[new nu(this._domElement,this.getId(),t,this._configuration,this._themeService.getColorTheme(),e,i,this._overflowWidgetsDomNode,this._instantiationService),!0]}_postDetachModelCleanup(e){e?.removeAllDecorationsWithOwnerId(this._id)}_detachModel(){if(this._contributionsDisposable?.dispose(),this._contributionsDisposable=void 0,!this._modelData)return null;let e=this._modelData.model,t=this._modelData.hasRealView?this._modelData.view.domNode.domNode:null;return this._modelData.dispose(),this._modelData=null,this._domElement.removeAttribute("data-mode-id"),t&&this._domElement.contains(t)&&t.remove(),this._bannerDomNode&&this._domElement.contains(this._bannerDomNode)&&this._bannerDomNode.remove(),e}_removeDecorationType(e){this._codeEditorService.removeDecorationType(e)}hasModel(){return null!==this._modelData}showDropIndicatorAt(e){let t=[{range:new et.Q(e.lineNumber,e.column,e.lineNumber,e.column),options:m.dropIntoEditorDecorationOptions}];this._dropIntoEditorDecorations.set(t),this.revealPosition(e,1)}removeDropIndicator(){this._dropIntoEditorDecorations.clear()}_beginUpdate(){this._updateCounter++,1===this._updateCounter&&this._onBeginUpdate.fire()}_endUpdate(){this._updateCounter--,0===this._updateCounter&&this._onEndUpdate.fire()}};oa=m=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([or(3,iL._Y),or(4,G.T),or(5,ot.d),or(6,oi.fN),or(7,tr.Gy),or(8,os.Ot),or(9,W.j),or(10,nE.JZ),or(11,nT.u)],oa);let ol=0;class oh{constructor(e,t,i,n,s,o){this.model=e,this.viewModel=t,this.view=i,this.hasRealView=n,this.listenersToRemove=s,this.attachedView=o}dispose(){(0,y.AS)(this.listenersToRemove),this.model.onBeforeDetached(this.attachedView),this.hasRealView&&this.view.dispose(),this.viewModel.dispose()}}class od extends y.jG{constructor(e){super(),this._emitterOptions=e,this._onDidChangeToTrue=this._register(new w.vl(this._emitterOptions)),this.onDidChangeToTrue=this._onDidChangeToTrue.event,this._onDidChangeToFalse=this._register(new w.vl(this._emitterOptions)),this.onDidChangeToFalse=this._onDidChangeToFalse.event,this._value=0}setValue(e){let t=e?2:1;this._value!==t&&(this._value=t,2===this._value?this._onDidChangeToTrue.fire():1===this._value&&this._onDidChangeToFalse.fire())}}class oc extends w.vl{constructor(e,t){super({deliveryQueue:t}),this._contributions=e}fire(e){this._contributions.onBeforeInteractionEvent(),super.fire(e)}}class ou extends y.jG{constructor(e,t){super(),this._editor=e,t.createKey("editorId",e.getId()),this._editorSimpleInput=nN.R.editorSimpleInput.bindTo(t),this._editorFocus=nN.R.focus.bindTo(t),this._textInputFocus=nN.R.textInputFocus.bindTo(t),this._editorTextFocus=nN.R.editorTextFocus.bindTo(t),this._tabMovesFocus=nN.R.tabMovesFocus.bindTo(t),this._editorReadonly=nN.R.readOnly.bindTo(t),this._inDiffEditor=nN.R.inDiffEditor.bindTo(t),this._editorColumnSelection=nN.R.columnSelection.bindTo(t),this._hasMultipleSelections=nN.R.hasMultipleSelections.bindTo(t),this._hasNonEmptySelection=nN.R.hasNonEmptySelection.bindTo(t),this._canUndo=nN.R.canUndo.bindTo(t),this._canRedo=nN.R.canRedo.bindTo(t),this._register(this._editor.onDidChangeConfiguration(()=>this._updateFromConfig())),this._register(this._editor.onDidChangeCursorSelection(()=>this._updateFromSelection())),this._register(this._editor.onDidFocusEditorWidget(()=>this._updateFromFocus())),this._register(this._editor.onDidBlurEditorWidget(()=>this._updateFromFocus())),this._register(this._editor.onDidFocusEditorText(()=>this._updateFromFocus())),this._register(this._editor.onDidBlurEditorText(()=>this._updateFromFocus())),this._register(this._editor.onDidChangeModel(()=>this._updateFromModel())),this._register(this._editor.onDidChangeConfiguration(()=>this._updateFromModel())),this._register(P.M.onDidChangeTabFocus(e=>this._tabMovesFocus.set(e))),this._updateFromConfig(),this._updateFromSelection(),this._updateFromFocus(),this._updateFromModel(),this._editorSimpleInput.set(this._editor.isSimpleWidget)}_updateFromConfig(){let e=this._editor.getOptions();this._tabMovesFocus.set(e.get(164)||P.M.getTabFocusMode()),this._editorReadonly.set(e.get(104)),this._inDiffEditor.set(e.get(70)),this._editorColumnSelection.set(e.get(28))}_updateFromSelection(){let e=this._editor.getSelections();e?(this._hasMultipleSelections.set(e.length>1),this._hasNonEmptySelection.set(e.some(e=>!e.isEmpty()))):(this._hasMultipleSelections.reset(),this._hasNonEmptySelection.reset())}_updateFromFocus(){this._editorFocus.set(this._editor.hasWidgetFocus()&&!this._editor.isSimpleWidget),this._editorTextFocus.set(this._editor.hasTextFocus()&&!this._editor.isSimpleWidget),this._textInputFocus.set(this._editor.hasTextFocus())}_updateFromModel(){let e=this._editor.getModel();this._canUndo.set(!!(e&&e.canUndo())),this._canRedo.set(!!(e&&e.canRedo()))}}class og extends y.jG{constructor(e,t,i){super(),this._editor=e,this._contextKeyService=t,this._languageFeaturesService=i,this._langId=nN.R.languageId.bindTo(t),this._hasCompletionItemProvider=nN.R.hasCompletionItemProvider.bindTo(t),this._hasCodeActionsProvider=nN.R.hasCodeActionsProvider.bindTo(t),this._hasCodeLensProvider=nN.R.hasCodeLensProvider.bindTo(t),this._hasDefinitionProvider=nN.R.hasDefinitionProvider.bindTo(t),this._hasDeclarationProvider=nN.R.hasDeclarationProvider.bindTo(t),this._hasImplementationProvider=nN.R.hasImplementationProvider.bindTo(t),this._hasTypeDefinitionProvider=nN.R.hasTypeDefinitionProvider.bindTo(t),this._hasHoverProvider=nN.R.hasHoverProvider.bindTo(t),this._hasDocumentHighlightProvider=nN.R.hasDocumentHighlightProvider.bindTo(t),this._hasDocumentSymbolProvider=nN.R.hasDocumentSymbolProvider.bindTo(t),this._hasReferenceProvider=nN.R.hasReferenceProvider.bindTo(t),this._hasRenameProvider=nN.R.hasRenameProvider.bindTo(t),this._hasSignatureHelpProvider=nN.R.hasSignatureHelpProvider.bindTo(t),this._hasInlayHintsProvider=nN.R.hasInlayHintsProvider.bindTo(t),this._hasDocumentFormattingProvider=nN.R.hasDocumentFormattingProvider.bindTo(t),this._hasDocumentSelectionFormattingProvider=nN.R.hasDocumentSelectionFormattingProvider.bindTo(t),this._hasMultipleDocumentFormattingProvider=nN.R.hasMultipleDocumentFormattingProvider.bindTo(t),this._hasMultipleDocumentSelectionFormattingProvider=nN.R.hasMultipleDocumentSelectionFormattingProvider.bindTo(t),this._isInEmbeddedEditor=nN.R.isInEmbeddedEditor.bindTo(t);let n=()=>this._update();this._register(e.onDidChangeModel(n)),this._register(e.onDidChangeModelLanguage(n)),this._register(i.completionProvider.onDidChange(n)),this._register(i.codeActionProvider.onDidChange(n)),this._register(i.codeLensProvider.onDidChange(n)),this._register(i.definitionProvider.onDidChange(n)),this._register(i.declarationProvider.onDidChange(n)),this._register(i.implementationProvider.onDidChange(n)),this._register(i.typeDefinitionProvider.onDidChange(n)),this._register(i.hoverProvider.onDidChange(n)),this._register(i.documentHighlightProvider.onDidChange(n)),this._register(i.documentSymbolProvider.onDidChange(n)),this._register(i.referenceProvider.onDidChange(n)),this._register(i.renameProvider.onDidChange(n)),this._register(i.documentFormattingEditProvider.onDidChange(n)),this._register(i.documentRangeFormattingEditProvider.onDidChange(n)),this._register(i.signatureHelpProvider.onDidChange(n)),this._register(i.inlayHintsProvider.onDidChange(n)),n()}dispose(){super.dispose()}reset(){this._contextKeyService.bufferChangeEvents(()=>{this._langId.reset(),this._hasCompletionItemProvider.reset(),this._hasCodeActionsProvider.reset(),this._hasCodeLensProvider.reset(),this._hasDefinitionProvider.reset(),this._hasDeclarationProvider.reset(),this._hasImplementationProvider.reset(),this._hasTypeDefinitionProvider.reset(),this._hasHoverProvider.reset(),this._hasDocumentHighlightProvider.reset(),this._hasDocumentSymbolProvider.reset(),this._hasReferenceProvider.reset(),this._hasRenameProvider.reset(),this._hasDocumentFormattingProvider.reset(),this._hasDocumentSelectionFormattingProvider.reset(),this._hasSignatureHelpProvider.reset(),this._isInEmbeddedEditor.reset()})}_update(){let e=this._editor.getModel();if(!e)return void this.reset();this._contextKeyService.bufferChangeEvents(()=>{this._langId.set(e.getLanguageId()),this._hasCompletionItemProvider.set(this._languageFeaturesService.completionProvider.has(e)),this._hasCodeActionsProvider.set(this._languageFeaturesService.codeActionProvider.has(e)),this._hasCodeLensProvider.set(this._languageFeaturesService.codeLensProvider.has(e)),this._hasDefinitionProvider.set(this._languageFeaturesService.definitionProvider.has(e)),this._hasDeclarationProvider.set(this._languageFeaturesService.declarationProvider.has(e)),this._hasImplementationProvider.set(this._languageFeaturesService.implementationProvider.has(e)),this._hasTypeDefinitionProvider.set(this._languageFeaturesService.typeDefinitionProvider.has(e)),this._hasHoverProvider.set(this._languageFeaturesService.hoverProvider.has(e)),this._hasDocumentHighlightProvider.set(this._languageFeaturesService.documentHighlightProvider.has(e)),this._hasDocumentSymbolProvider.set(this._languageFeaturesService.documentSymbolProvider.has(e)),this._hasReferenceProvider.set(this._languageFeaturesService.referenceProvider.has(e)),this._hasRenameProvider.set(this._languageFeaturesService.renameProvider.has(e)),this._hasSignatureHelpProvider.set(this._languageFeaturesService.signatureHelpProvider.has(e)),this._hasInlayHintsProvider.set(this._languageFeaturesService.inlayHintsProvider.has(e)),this._hasDocumentFormattingProvider.set(this._languageFeaturesService.documentFormattingEditProvider.has(e)||this._languageFeaturesService.documentRangeFormattingEditProvider.has(e)),this._hasDocumentSelectionFormattingProvider.set(this._languageFeaturesService.documentRangeFormattingEditProvider.has(e)),this._hasMultipleDocumentFormattingProvider.set(this._languageFeaturesService.documentFormattingEditProvider.all(e).length+this._languageFeaturesService.documentRangeFormattingEditProvider.all(e).length>1),this._hasMultipleDocumentSelectionFormattingProvider.set(this._languageFeaturesService.documentRangeFormattingEditProvider.all(e).length>1),this._isInEmbeddedEditor.set(e.uri.scheme===S.ny.walkThroughSnippet||e.uri.scheme===S.ny.vscodeChatCodeBlock)})}}class op{get length(){return this._decorationIds.length}constructor(e,t){this._editor=e,this._decorationIds=[],this._isChangingDecorations=!1,Array.isArray(t)&&t.length>0&&this.set(t)}onDidChange(e,t,i){return this._editor.onDidChangeModelDecorations(i=>{this._isChangingDecorations||e.call(t,i)},i)}getRange(e){return!this._editor.hasModel()||e>=this._decorationIds.length?null:this._editor.getModel().getDecorationRange(this._decorationIds[e])}getRanges(){if(!this._editor.hasModel())return[];let e=this._editor.getModel(),t=[];for(let i of this._decorationIds){let n=e.getDecorationRange(i);n&&t.push(n)}return t}has(e){return this._decorationIds.includes(e.id)}clear(){0!==this._decorationIds.length&&this.set([])}set(e){try{this._isChangingDecorations=!0,this._editor.changeDecorations(t=>{this._decorationIds=t.deltaDecorations(this._decorationIds,e)})}finally{this._isChangingDecorations=!1}return this._decorationIds}append(e){let t=[];try{this._isChangingDecorations=!0,this._editor.changeDecorations(i=>{t=i.deltaDecorations([],e),this._decorationIds=this._decorationIds.concat(t)})}finally{this._isChangingDecorations=!1}return t}}let om=encodeURIComponent("<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 6 3' enable-background='new 0 0 6 3' height='3' width='6'><g fill='"),of=encodeURIComponent("'><polygon points='5.5,0 2.5,3 1.1,3 4.1,0'/><polygon points='4,0 6,2 6,0.6 5.4,0'/><polygon points='0,2 1,3 2.4,3 0,0.6'/></g></svg>");function o_(e){return om+encodeURIComponent(e.toString())+of}let ov=encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" height="3" width="12"><g fill="'),ob=encodeURIComponent('"><circle cx="1" cy="1" r="1"/><circle cx="5" cy="1" r="1"/><circle cx="9" cy="1" r="1"/></g></svg>');function oC(e){return ov+encodeURIComponent(e.toString())+ob}(0,tr.zy)((e,t)=>{let i=e.getColor(tV.Rbi);i&&(t.addRule(`.monaco-editor .squiggly-error { background: url("data:image/svg+xml,${o_(i)}") repeat-x bottom left; }`),t.addRule(`:root { --monaco-editor-error-decoration: url("data:image/svg+xml,${o_(i)}"); }`));let n=e.getColor(tV.Hng);n&&(t.addRule(`.monaco-editor .squiggly-warning { background: url("data:image/svg+xml,${o_(n)}") repeat-x bottom left; }`),t.addRule(`:root { --monaco-editor-warning-decoration: url("data:image/svg+xml,${o_(n)}"); }`));let s=e.getColor(tV.pOz);s&&(t.addRule(`.monaco-editor .squiggly-info { background: url("data:image/svg+xml,${o_(s)}") repeat-x bottom left; }`),t.addRule(`:root { --monaco-editor-info-decoration: url("data:image/svg+xml,${o_(s)}"); }`));let o=e.getColor(tV.i61);o&&(t.addRule(`.monaco-editor .squiggly-hint { background: url("data:image/svg+xml,${oC(o)}") no-repeat bottom left; }`),t.addRule(`:root { --monaco-editor-hint-decoration: url("data:image/svg+xml,${oC(o)}"); }`));let r=e.getColor(to.yw);r&&(t.addRule(`.monaco-editor.showUnused .squiggly-inline-unnecessary { opacity: ${r.rgba.a}; }`),t.addRule(`:root { --monaco-editor-unnecessary-decoration-opacity: ${r.rgba.a}; }`))})},54923:()=>{},54976:(e,t,i)=>{"use strict";i.d(t,{V:()=>a,WR:()=>h,no:()=>r});var n=i(55532),s=i(74830),o=i(58441);class r{constructor(e,t,i){this._indentRulesSupport=t,this._indentationLineProcessor=new l(e,i)}shouldIncrease(e,t){let i=this._indentationLineProcessor.getProcessedLine(e,t);return this._indentRulesSupport.shouldIncrease(i)}shouldDecrease(e,t){let i=this._indentationLineProcessor.getProcessedLine(e,t);return this._indentRulesSupport.shouldDecrease(i)}shouldIgnore(e,t){let i=this._indentationLineProcessor.getProcessedLine(e,t);return this._indentRulesSupport.shouldIgnore(i)}shouldIndentNextLine(e,t){let i=this._indentationLineProcessor.getProcessedLine(e,t);return this._indentRulesSupport.shouldIndentNextLine(i)}}class a{constructor(e,t){this.model=e,this.indentationLineProcessor=new l(e,t)}getProcessedTokenContextAroundRange(e){let t=this._getProcessedTokensBeforeRange(e);return{beforeRangeProcessedTokens:t,afterRangeProcessedTokens:this._getProcessedTokensAfterRange(e),previousLineProcessedTokens:this._getProcessedPreviousLineTokens(e)}}_getProcessedTokensBeforeRange(e){let t;this.model.tokenization.forceTokenization(e.startLineNumber);let i=this.model.tokenization.getLineTokens(e.startLineNumber),n=(0,s.BQ)(i,e.startColumn-1);if(h(this.model,e.getStartPosition())){let s=e.startColumn-1-n.firstCharOffset,o=n.firstCharOffset;t=i.sliceAndInflate(o,o+s,0)}else{let n=e.startColumn-1;t=i.sliceAndInflate(0,n,0)}return this.indentationLineProcessor.getProcessedTokens(t)}_getProcessedTokensAfterRange(e){let t=e.isEmpty()?e.getStartPosition():e.getEndPosition();this.model.tokenization.forceTokenization(t.lineNumber);let i=this.model.tokenization.getLineTokens(t.lineNumber),n=(0,s.BQ)(i,t.column-1),o=t.column-1-n.firstCharOffset,r=n.firstCharOffset+o,a=n.firstCharOffset+n.getLineLength(),l=i.sliceAndInflate(r,a,0);return this.indentationLineProcessor.getProcessedTokens(l)}_getProcessedPreviousLineTokens(e){let t=e=>{this.model.tokenization.forceTokenization(e);let t=this.model.tokenization.getLineTokens(e),i=this.model.getLineMaxColumn(e)-1;return(0,s.BQ)(t,i)};this.model.tokenization.forceTokenization(e.startLineNumber);let i=this.model.tokenization.getLineTokens(e.startLineNumber),n=(0,s.BQ)(i,e.startColumn-1),r=o.f7.createEmpty("",n.languageIdCodec),a=e.startLineNumber-1;if(0===a||0!==n.firstCharOffset)return r;let l=t(a);if(n.languageId!==l.languageId)return r;let h=l.toIViewLineTokens();return this.indentationLineProcessor.getProcessedTokens(h)}}class l{constructor(e,t){this.model=e,this.languageConfigurationService=t}getProcessedLine(e,t){this.model.tokenization.forceTokenization?.(e);let i=this.model.tokenization.getLineTokens(e),s=this.getProcessedTokens(i).getLineContent();return void 0!==t&&(s=((e,t)=>{let i=n.UU(e);return t+e.substring(i.length)})(s,t)),s}getProcessedTokens(e){let t=e.getLanguageId(0),i=this.languageConfigurationService.getLanguageConfiguration(t).bracketsNew.getBracketRegExp({global:!0}),n=[];return e.forEach(t=>{let s=e.getStandardTokenType(t),o=e.getTokenText(t);(2===s||3===s||1===s)&&(o=o.replace(i,""));let r=e.getMetadata(t);n.push({text:o,metadata:r})}),o.f7.createFromTextAndMetadata(n,e.languageIdCodec)}}function h(e,t){e.tokenization.forceTokenization(t.lineNumber);let i=e.tokenization.getLineTokens(t.lineNumber),n=(0,s.BQ)(i,t.column-1),o=0===n.firstCharOffset,r=i.getLanguageId(0)===n.languageId;return!o&&!r}},55219:(e,t,i)=>{"use strict";i.d(t,{a:()=>n,w:()=>s});let n=(0,i(22263).u1)("dataChannelService");class s{getDataChannel(e){return{sendData:()=>{}}}}},55244:()=>{},55296:(e,t,i)=>{"use strict";i.d(t,{I:()=>m,r:()=>h});var n=i(85521),s=i(28669);let o=/^\w[\w\d+.-]*$/,r=/^\//,a=/^\/\//,l=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class h{static isUri(e){return e instanceof h||!!e&&"object"==typeof e&&"string"==typeof e.authority&&"string"==typeof e.fragment&&"string"==typeof e.path&&"string"==typeof e.query&&"string"==typeof e.scheme&&"string"==typeof e.fsPath&&"function"==typeof e.with&&"function"==typeof e.toString}constructor(e,t,i,n,s,l=!1){"object"==typeof e?(this.scheme=e.scheme||"",this.authority=e.authority||"",this.path=e.path||"",this.query=e.query||"",this.fragment=e.fragment||""):(this.scheme=function(e,t){return e||t?e:"file"}(e,l),this.authority=t||"",this.path=function(e,t){switch(e){case"https":case"http":case"file":t?"/"!==t[0]&&(t="/"+t):t="/"}return t}(this.scheme,i||""),this.query=n||"",this.fragment=s||"",function(e,t){if(!e.scheme&&t)throw Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${e.authority}", path: "${e.path}", query: "${e.query}", fragment: "${e.fragment}"}`);if(e.scheme&&!o.test(e.scheme))throw Error("[UriError]: Scheme contains illegal characters.");if(e.path){if(e.authority){if(!r.test(e.path))throw Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(a.test(e.path))throw Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}(this,l))}get fsPath(){return m(this,!1)}with(e){if(!e)return this;let{scheme:t,authority:i,path:n,query:s,fragment:o}=e;return(void 0===t?t=this.scheme:null===t&&(t=""),void 0===i?i=this.authority:null===i&&(i=""),void 0===n?n=this.path:null===n&&(n=""),void 0===s?s=this.query:null===s&&(s=""),void 0===o?o=this.fragment:null===o&&(o=""),t===this.scheme&&i===this.authority&&n===this.path&&s===this.query&&o===this.fragment)?this:new c(t,i,n,s,o)}static parse(e,t=!1){let i=l.exec(e);return i?new c(i[2]||"",v(i[4]||""),v(i[5]||""),v(i[7]||""),v(i[9]||""),t):new c("","","","","")}static file(e){let t="";if(s.uF&&(e=e.replace(/\\/g,"/")),"/"===e[0]&&"/"===e[1]){let i=e.indexOf("/",2);-1===i?(t=e.substring(2),e="/"):(t=e.substring(2,i),e=e.substring(i)||"/")}return new c("file",t,e,"","")}static from(e,t){return new c(e.scheme,e.authority,e.path,e.query,e.fragment,t)}static joinPath(e,...t){let i;if(!e.path)throw Error("[UriError]: cannot call joinPath on URI without path");return i=s.uF&&"file"===e.scheme?h.file(n.IN.join(m(e,!0),...t)).path:n.SA.join(e.path,...t),e.with({path:i})}toString(e=!1){return f(this,e)}toJSON(){return this}static revive(e){if(!e)return e;{if(e instanceof h)return e;let t=new c(e);return t._formatted=e.external??null,t._fsPath=e._sep===d?e.fsPath??null:null,t}}}let d=s.uF?1:void 0;class c extends h{constructor(){super(...arguments),this._formatted=null,this._fsPath=null}get fsPath(){return this._fsPath||(this._fsPath=m(this,!1)),this._fsPath}toString(e=!1){return e?f(this,!0):(this._formatted||(this._formatted=f(this,!1)),this._formatted)}toJSON(){let e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=d),this._formatted&&(e.external=this._formatted),this.path&&(e.path=this.path),this.scheme&&(e.scheme=this.scheme),this.authority&&(e.authority=this.authority),this.query&&(e.query=this.query),this.fragment&&(e.fragment=this.fragment),e}}let u={58:"%3A",47:"%2F",63:"%3F",35:"%23",91:"%5B",93:"%5D",64:"%40",33:"%21",36:"%24",38:"%26",39:"%27",40:"%28",41:"%29",42:"%2A",43:"%2B",44:"%2C",59:"%3B",61:"%3D",32:"%20"};function g(e,t,i){let n,s=-1;for(let o=0;o<e.length;o++){let r=e.charCodeAt(o);if(r>=97&&r<=122||r>=65&&r<=90||r>=48&&r<=57||45===r||46===r||95===r||126===r||t&&47===r||i&&91===r||i&&93===r||i&&58===r)-1!==s&&(n+=encodeURIComponent(e.substring(s,o)),s=-1),void 0!==n&&(n+=e.charAt(o));else{void 0===n&&(n=e.substr(0,o));let t=u[r];void 0!==t?(-1!==s&&(n+=encodeURIComponent(e.substring(s,o)),s=-1),n+=t):-1===s&&(s=o)}}return -1!==s&&(n+=encodeURIComponent(e.substring(s))),void 0!==n?n:e}function p(e){let t;for(let i=0;i<e.length;i++){let n=e.charCodeAt(i);35===n||63===n?(void 0===t&&(t=e.substr(0,i)),t+=u[n]):void 0!==t&&(t+=e[i])}return void 0!==t?t:e}function m(e,t){let i;return i=e.authority&&e.path.length>1&&"file"===e.scheme?`//${e.authority}${e.path}`:47===e.path.charCodeAt(0)&&(e.path.charCodeAt(1)>=65&&90>=e.path.charCodeAt(1)||e.path.charCodeAt(1)>=97&&122>=e.path.charCodeAt(1))&&58===e.path.charCodeAt(2)?t?e.path.substr(1):e.path[1].toLowerCase()+e.path.substr(2):e.path,s.uF&&(i=i.replace(/\//g,"\\")),i}function f(e,t){let i=t?p:g,n="",{scheme:s,authority:o,path:r,query:a,fragment:l}=e;if(s&&(n+=s,n+=":"),(o||"file"===s)&&(n+="/",n+="/"),o){let e=o.indexOf("@");if(-1!==e){let t=o.substr(0,e);o=o.substr(e+1),-1===(e=t.lastIndexOf(":"))?n+=i(t,!1,!1):(n+=i(t.substr(0,e),!1,!1),n+=":",n+=i(t.substr(e+1),!1,!0)),n+="@"}-1===(e=(o=o.toLowerCase()).lastIndexOf(":"))?n+=i(o,!1,!0):(n+=i(o.substr(0,e),!1,!0),n+=o.substr(e))}if(r){if(r.length>=3&&47===r.charCodeAt(0)&&58===r.charCodeAt(2)){let e=r.charCodeAt(1);e>=65&&e<=90&&(r=`/${String.fromCharCode(e+32)}:${r.substr(3)}`)}else if(r.length>=2&&58===r.charCodeAt(1)){let e=r.charCodeAt(0);e>=65&&e<=90&&(r=`${String.fromCharCode(e+32)}:${r.substr(2)}`)}n+=i(r,!0,!1)}return a&&(n+="?",n+=i(a,!1,!1)),l&&(n+="#",n+=t?l:g(l,!1,!1)),n}let _=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function v(e){return e.match(_)?e.replace(_,e=>(function e(t){try{return decodeURIComponent(t)}catch{if(t.length>3)return t.substr(0,3)+e(t.substr(3));return t}})(e)):e}},55532:(e,t,i)=>{"use strict";let n;i.d(t,{$X:()=>K,AV:()=>r,BO:()=>p,Bm:()=>m,Bq:()=>u,DB:()=>L,E_:()=>z,GP:()=>l,HG:()=>b,LJ:()=>O,LU:()=>Y,Lv:()=>D,MV:()=>H,NB:()=>g,OS:()=>f,Q_:()=>N,Qp:()=>M,S8:()=>ei,Ss:()=>q,UD:()=>y,UU:()=>C,Vi:()=>T,W1:()=>k,Wd:()=>et,Wv:()=>I,Z5:()=>A,_J:()=>$,aC:()=>j,bm:()=>c,eY:()=>_,ih:()=>d,iy:()=>W,jy:()=>h,km:()=>B,lF:()=>S,lT:()=>w,m:()=>V,ne:()=>G,ns:()=>E,pc:()=>R,r_:()=>Q,tk:()=>X,tl:()=>en,uz:()=>v,y_:()=>es,zY:()=>Z,z_:()=>P,zd:()=>x});var s=i(19072),o=i(96784);function r(e){return!e||"string"!=typeof e||0===e.trim().length}let a=/{(\d+)}/g;function l(e,...t){return 0===t.length?e:e.replace(a,function(e,i){let n=parseInt(i,10);return isNaN(n)||n<0||n>=t.length?e:t[n]})}function h(e){return e.replace(/[<>"'&]/g,e=>{switch(e){case"<":return"<";case">":return">";case'"':return""";case"'":return"'";case"&":return"&"}return e})}function d(e){return e.replace(/[<>&]/g,function(e){switch(e){case"<":return"<";case">":return">";case"&":return"&";default:return e}})}function c(e){return e.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function u(e,t=" "){return p(g(e,t),t)}function g(e,t){if(!e||!t)return e;let i=t.length;if(0===i||0===e.length)return e;let n=0;for(;e.indexOf(t,n)===n;)n+=i;return e.substring(n)}function p(e,t){if(!e||!t)return e;let i=t.length,n=e.length;if(0===i||0===n)return e;let s=n,o=-1;for(;-1!==(o=e.lastIndexOf(t,s-1))&&o+i===s;){if(0===o)return"";s=o}return e.substring(0,s)}function m(e){return e.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}function f(e,t,i={}){if(!e)throw Error("Cannot create regex from empty string");t||(e=c(e)),i.wholeWord&&(/\B/.test(e.charAt(0))||(e="\\b"+e),/\B/.test(e.charAt(e.length-1))||(e+="\\b"));let n="";return i.global&&(n+="g"),i.matchCase||(n+="i"),i.multiline&&(n+="m"),i.unicode&&(n+="u"),new RegExp(e,n)}function _(e){return"^"!==e.source&&"^$"!==e.source&&"$"!==e.source&&"^\\s*$"!==e.source&&!!(e.exec("")&&0===e.lastIndex)}function v(e){return e.split(/\r\n|\r|\n/)}function b(e){for(let t=0,i=e.length;t<i;t++){let i=e.charCodeAt(t);if(32!==i&&9!==i)return t}return -1}function C(e,t=0,i=e.length){for(let n=t;n<i;n++){let i=e.charCodeAt(n);if(32!==i&&9!==i)return e.substring(t,n)}return e.substring(t,i)}function w(e,t=e.length-1){for(let i=t;i>=0;i--){let t=e.charCodeAt(i);if(32!==t&&9!==t)return i}return -1}function y(e,t){return e<t?-1:+(e>t)}function S(e,t,i=0,n=e.length,s=0,o=t.length){for(;i<n&&s<o;i++,s++){let n=e.charCodeAt(i),o=t.charCodeAt(s);if(n<o)return -1;if(n>o)return 1}let r=n-i,a=o-s;return r<a?-1:+(r>a)}function k(e,t){return x(e,t,0,e.length,0,t.length)}function x(e,t,i=0,n=e.length,s=0,o=t.length){for(;i<n&&s<o;i++,s++){let r=e.charCodeAt(i),a=t.charCodeAt(s);if(r===a)continue;if(r>=128||a>=128)return S(e.toLowerCase(),t.toLowerCase(),i,n,s,o);D(r)&&(r-=32),D(a)&&(a-=32);let l=r-a;if(0!==l)return l}let r=n-i,a=o-s;return r<a?-1:+(r>a)}function L(e){return e>=48&&e<=57}function D(e){return e>=97&&e<=122}function I(e){return e>=65&&e<=90}function N(e,t){return e.length===t.length&&0===x(e,t)}function E(e,t){let i=t.length;return!(t.length>e.length)&&0===x(e,t,0,i)}function M(e,t){let i,n=Math.min(e.length,t.length);for(i=0;i<n;i++)if(e.charCodeAt(i)!==t.charCodeAt(i))return i;return n}function T(e,t){let i,n=Math.min(e.length,t.length),s=e.length-1,o=t.length-1;for(i=0;i<n;i++)if(e.charCodeAt(s-i)!==t.charCodeAt(o-i))return i;return n}function R(e){return 55296<=e&&e<=56319}function O(e){return 56320<=e&&e<=57343}function P(e,t){return(e-55296<<10)+(t-56320)+65536}function A(e,t,i){let n=e.charCodeAt(i);if(R(n)&&i+1<t){let t=e.charCodeAt(i+1);if(O(t))return P(n,t)}return n}class F{get offset(){return this._offset}constructor(e,t=0){this._str=e,this._len=e.length,this._offset=t}setOffset(e){this._offset=e}prevCodePoint(){let e=function(e,t){let i=e.charCodeAt(t-1);if(O(i)&&t>1){let n=e.charCodeAt(t-2);if(R(n))return P(n,i)}return i}(this._str,this._offset);return this._offset-=e>=65536?2:1,e}nextCodePoint(){let e=A(this._str,this._len,this._offset);return this._offset+=e>=65536?2:1,e}eol(){return this._offset>=this._len}}class B{get offset(){return this._iterator.offset}constructor(e,t=0){this._iterator=new F(e,t)}nextGraphemeLength(){let e=ee.getInstance(),t=this._iterator,i=t.offset,n=e.getGraphemeBreakType(t.nextCodePoint());for(;!t.eol();){let i=t.offset,s=e.getGraphemeBreakType(t.nextCodePoint());if(J(n,s)){t.setOffset(i);break}n=s}return t.offset-i}prevGraphemeLength(){let e=ee.getInstance(),t=this._iterator,i=t.offset,n=e.getGraphemeBreakType(t.prevCodePoint());for(;t.offset>0;){let i=t.offset,s=e.getGraphemeBreakType(t.prevCodePoint());if(J(s,n)){t.setOffset(i);break}n=s}return i-t.offset}eol(){return this._iterator.eol()}}function W(e,t){return new B(e,t).nextGraphemeLength()}function H(e,t){return new B(e,t).prevGraphemeLength()}function V(e,t){t>0&&O(e.charCodeAt(t))&&t--;let i=t+W(e,t);return[i-H(e,i),i]}function z(e){return n||(n=/(?:[\u05BE\u05C0\u05C3\u05C6\u05D0-\u05F4\u0608\u060B\u060D\u061B-\u064A\u066D-\u066F\u0671-\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u0710\u0712-\u072F\u074D-\u07A5\u07B1-\u07EA\u07F4\u07F5\u07FA\u07FE-\u0815\u081A\u0824\u0828\u0830-\u0858\u085E-\u088E\u08A0-\u08C9\u200F\uFB1D\uFB1F-\uFB28\uFB2A-\uFD3D\uFD50-\uFDC7\uFDF0-\uFDFC\uFE70-\uFEFC]|\uD802[\uDC00-\uDD1B\uDD20-\uDE00\uDE10-\uDE35\uDE40-\uDEE4\uDEEB-\uDF35\uDF40-\uDFFF]|\uD803[\uDC00-\uDD23\uDE80-\uDEA9\uDEAD-\uDF45\uDF51-\uDF81\uDF86-\uDFF6]|\uD83A[\uDC00-\uDCCF\uDD00-\uDD43\uDD4B-\uDFFF]|\uD83B[\uDC00-\uDEBB])/),n.test(e)}let U=/^[\t\n\r\x20-\x7E]*$/;function j(e){return U.test(e)}let $=/[\u2028\u2029]/;function K(e){return $.test(e)}function G(e){return e>=11904&&e<=55215||e>=63744&&e<=64255||e>=65281&&e<=65374}function q(e){return e>=127462&&e<=127487||8986===e||8987===e||9200===e||9203===e||e>=9728&&e<=10175||11088===e||11093===e||e>=127744&&e<=128591||e>=128640&&e<=128764||e>=128992&&e<=129008||e>=129280&&e<=129535||e>=129648&&e<=129782}RegExp("(?:"+[/(?:\x1b\[|\x9b)[=?>!]?[\d;:]*["$#'* ]?[a-zA-Z@^`{}|~]/.source,/(?:\x1b\]|\x9d).*?(?:\x1b\\|\x07|\x9c)/.source,/\x1b(?:[ #%\(\)\*\+\-\.\/]?[a-zA-Z0-9\|}~@])/.source].join("|")+")","g");let Q=String.fromCharCode(65279);function Y(e){return!!(e&&e.length>0&&65279===e.charCodeAt(0))}function Z(e,t=!1){return!!e&&(t&&(e=e.replace(/\\./g,"")),e.toLowerCase()!==e)}function X(e){return(e%=52)<26?String.fromCharCode(97+e):String.fromCharCode(65+e-26)}function J(e,t){return 0===e?5!==t&&7!==t:(2!==e||3!==t)&&(4===e||2===e||3===e||4===t||2===t||3===t||(8!==e||8!==t&&9!==t&&11!==t&&12!==t)&&(11!==e&&9!==e||9!==t&&10!==t)&&(12!==e&&10!==e||10!==t)&&5!==t&&13!==t&&7!==t&&1!==e&&(13!==e||14!==t)&&(6!==e||6!==t)&&!0)}class ee{static{this._INSTANCE=null}static getInstance(){return ee._INSTANCE||(ee._INSTANCE=new ee),ee._INSTANCE}constructor(){this._data=JSON.parse("[0,0,0,51229,51255,12,44061,44087,12,127462,127487,6,7083,7085,5,47645,47671,12,54813,54839,12,128678,128678,14,3270,3270,5,9919,9923,14,45853,45879,12,49437,49463,12,53021,53047,12,71216,71218,7,128398,128399,14,129360,129374,14,2519,2519,5,4448,4519,9,9742,9742,14,12336,12336,14,44957,44983,12,46749,46775,12,48541,48567,12,50333,50359,12,52125,52151,12,53917,53943,12,69888,69890,5,73018,73018,5,127990,127990,14,128558,128559,14,128759,128760,14,129653,129655,14,2027,2035,5,2891,2892,7,3761,3761,5,6683,6683,5,8293,8293,4,9825,9826,14,9999,9999,14,43452,43453,5,44509,44535,12,45405,45431,12,46301,46327,12,47197,47223,12,48093,48119,12,48989,49015,12,49885,49911,12,50781,50807,12,51677,51703,12,52573,52599,12,53469,53495,12,54365,54391,12,65279,65279,4,70471,70472,7,72145,72147,7,119173,119179,5,127799,127818,14,128240,128244,14,128512,128512,14,128652,128652,14,128721,128722,14,129292,129292,14,129445,129450,14,129734,129743,14,1476,1477,5,2366,2368,7,2750,2752,7,3076,3076,5,3415,3415,5,4141,4144,5,6109,6109,5,6964,6964,5,7394,7400,5,9197,9198,14,9770,9770,14,9877,9877,14,9968,9969,14,10084,10084,14,43052,43052,5,43713,43713,5,44285,44311,12,44733,44759,12,45181,45207,12,45629,45655,12,46077,46103,12,46525,46551,12,46973,46999,12,47421,47447,12,47869,47895,12,48317,48343,12,48765,48791,12,49213,49239,12,49661,49687,12,50109,50135,12,50557,50583,12,51005,51031,12,51453,51479,12,51901,51927,12,52349,52375,12,52797,52823,12,53245,53271,12,53693,53719,12,54141,54167,12,54589,54615,12,55037,55063,12,69506,69509,5,70191,70193,5,70841,70841,7,71463,71467,5,72330,72342,5,94031,94031,5,123628,123631,5,127763,127765,14,127941,127941,14,128043,128062,14,128302,128317,14,128465,128467,14,128539,128539,14,128640,128640,14,128662,128662,14,128703,128703,14,128745,128745,14,129004,129007,14,129329,129330,14,129402,129402,14,129483,129483,14,129686,129704,14,130048,131069,14,173,173,4,1757,1757,1,2200,2207,5,2434,2435,7,2631,2632,5,2817,2817,5,3008,3008,5,3201,3201,5,3387,3388,5,3542,3542,5,3902,3903,7,4190,4192,5,6002,6003,5,6439,6440,5,6765,6770,7,7019,7027,5,7154,7155,7,8205,8205,13,8505,8505,14,9654,9654,14,9757,9757,14,9792,9792,14,9852,9853,14,9890,9894,14,9937,9937,14,9981,9981,14,10035,10036,14,11035,11036,14,42654,42655,5,43346,43347,7,43587,43587,5,44006,44007,7,44173,44199,12,44397,44423,12,44621,44647,12,44845,44871,12,45069,45095,12,45293,45319,12,45517,45543,12,45741,45767,12,45965,45991,12,46189,46215,12,46413,46439,12,46637,46663,12,46861,46887,12,47085,47111,12,47309,47335,12,47533,47559,12,47757,47783,12,47981,48007,12,48205,48231,12,48429,48455,12,48653,48679,12,48877,48903,12,49101,49127,12,49325,49351,12,49549,49575,12,49773,49799,12,49997,50023,12,50221,50247,12,50445,50471,12,50669,50695,12,50893,50919,12,51117,51143,12,51341,51367,12,51565,51591,12,51789,51815,12,52013,52039,12,52237,52263,12,52461,52487,12,52685,52711,12,52909,52935,12,53133,53159,12,53357,53383,12,53581,53607,12,53805,53831,12,54029,54055,12,54253,54279,12,54477,54503,12,54701,54727,12,54925,54951,12,55149,55175,12,68101,68102,5,69762,69762,7,70067,70069,7,70371,70378,5,70720,70721,7,71087,71087,5,71341,71341,5,71995,71996,5,72249,72249,7,72850,72871,5,73109,73109,5,118576,118598,5,121505,121519,5,127245,127247,14,127568,127569,14,127777,127777,14,127872,127891,14,127956,127967,14,128015,128016,14,128110,128172,14,128259,128259,14,128367,128368,14,128424,128424,14,128488,128488,14,128530,128532,14,128550,128551,14,128566,128566,14,128647,128647,14,128656,128656,14,128667,128673,14,128691,128693,14,128715,128715,14,128728,128732,14,128752,128752,14,128765,128767,14,129096,129103,14,129311,129311,14,129344,129349,14,129394,129394,14,129413,129425,14,129466,129471,14,129511,129535,14,129664,129666,14,129719,129722,14,129760,129767,14,917536,917631,5,13,13,2,1160,1161,5,1564,1564,4,1807,1807,1,2085,2087,5,2307,2307,7,2382,2383,7,2497,2500,5,2563,2563,7,2677,2677,5,2763,2764,7,2879,2879,5,2914,2915,5,3021,3021,5,3142,3144,5,3263,3263,5,3285,3286,5,3398,3400,7,3530,3530,5,3633,3633,5,3864,3865,5,3974,3975,5,4155,4156,7,4229,4230,5,5909,5909,7,6078,6085,7,6277,6278,5,6451,6456,7,6744,6750,5,6846,6846,5,6972,6972,5,7074,7077,5,7146,7148,7,7222,7223,5,7416,7417,5,8234,8238,4,8417,8417,5,9000,9000,14,9203,9203,14,9730,9731,14,9748,9749,14,9762,9763,14,9776,9783,14,9800,9811,14,9831,9831,14,9872,9873,14,9882,9882,14,9900,9903,14,9929,9933,14,9941,9960,14,9974,9974,14,9989,9989,14,10006,10006,14,10062,10062,14,10160,10160,14,11647,11647,5,12953,12953,14,43019,43019,5,43232,43249,5,43443,43443,5,43567,43568,7,43696,43696,5,43765,43765,7,44013,44013,5,44117,44143,12,44229,44255,12,44341,44367,12,44453,44479,12,44565,44591,12,44677,44703,12,44789,44815,12,44901,44927,12,45013,45039,12,45125,45151,12,45237,45263,12,45349,45375,12,45461,45487,12,45573,45599,12,45685,45711,12,45797,45823,12,45909,45935,12,46021,46047,12,46133,46159,12,46245,46271,12,46357,46383,12,46469,46495,12,46581,46607,12,46693,46719,12,46805,46831,12,46917,46943,12,47029,47055,12,47141,47167,12,47253,47279,12,47365,47391,12,47477,47503,12,47589,47615,12,47701,47727,12,47813,47839,12,47925,47951,12,48037,48063,12,48149,48175,12,48261,48287,12,48373,48399,12,48485,48511,12,48597,48623,12,48709,48735,12,48821,48847,12,48933,48959,12,49045,49071,12,49157,49183,12,49269,49295,12,49381,49407,12,49493,49519,12,49605,49631,12,49717,49743,12,49829,49855,12,49941,49967,12,50053,50079,12,50165,50191,12,50277,50303,12,50389,50415,12,50501,50527,12,50613,50639,12,50725,50751,12,50837,50863,12,50949,50975,12,51061,51087,12,51173,51199,12,51285,51311,12,51397,51423,12,51509,51535,12,51621,51647,12,51733,51759,12,51845,51871,12,51957,51983,12,52069,52095,12,52181,52207,12,52293,52319,12,52405,52431,12,52517,52543,12,52629,52655,12,52741,52767,12,52853,52879,12,52965,52991,12,53077,53103,12,53189,53215,12,53301,53327,12,53413,53439,12,53525,53551,12,53637,53663,12,53749,53775,12,53861,53887,12,53973,53999,12,54085,54111,12,54197,54223,12,54309,54335,12,54421,54447,12,54533,54559,12,54645,54671,12,54757,54783,12,54869,54895,12,54981,55007,12,55093,55119,12,55243,55291,10,66045,66045,5,68325,68326,5,69688,69702,5,69817,69818,5,69957,69958,7,70089,70092,5,70198,70199,5,70462,70462,5,70502,70508,5,70750,70750,5,70846,70846,7,71100,71101,5,71230,71230,7,71351,71351,5,71737,71738,5,72000,72000,7,72160,72160,5,72273,72278,5,72752,72758,5,72882,72883,5,73031,73031,5,73461,73462,7,94192,94193,7,119149,119149,7,121403,121452,5,122915,122916,5,126980,126980,14,127358,127359,14,127535,127535,14,127759,127759,14,127771,127771,14,127792,127793,14,127825,127867,14,127897,127899,14,127945,127945,14,127985,127986,14,128000,128007,14,128021,128021,14,128066,128100,14,128184,128235,14,128249,128252,14,128266,128276,14,128335,128335,14,128379,128390,14,128407,128419,14,128444,128444,14,128481,128481,14,128499,128499,14,128526,128526,14,128536,128536,14,128543,128543,14,128556,128556,14,128564,128564,14,128577,128580,14,128643,128645,14,128649,128649,14,128654,128654,14,128660,128660,14,128664,128664,14,128675,128675,14,128686,128689,14,128695,128696,14,128705,128709,14,128717,128719,14,128725,128725,14,128736,128741,14,128747,128748,14,128755,128755,14,128762,128762,14,128981,128991,14,129009,129023,14,129160,129167,14,129296,129304,14,129320,129327,14,129340,129342,14,129356,129356,14,129388,129392,14,129399,129400,14,129404,129407,14,129432,129442,14,129454,129455,14,129473,129474,14,129485,129487,14,129648,129651,14,129659,129660,14,129671,129679,14,129709,129711,14,129728,129730,14,129751,129753,14,129776,129782,14,917505,917505,4,917760,917999,5,10,10,3,127,159,4,768,879,5,1471,1471,5,1536,1541,1,1648,1648,5,1767,1768,5,1840,1866,5,2070,2073,5,2137,2139,5,2274,2274,1,2363,2363,7,2377,2380,7,2402,2403,5,2494,2494,5,2507,2508,7,2558,2558,5,2622,2624,7,2641,2641,5,2691,2691,7,2759,2760,5,2786,2787,5,2876,2876,5,2881,2884,5,2901,2902,5,3006,3006,5,3014,3016,7,3072,3072,5,3134,3136,5,3157,3158,5,3260,3260,5,3266,3266,5,3274,3275,7,3328,3329,5,3391,3392,7,3405,3405,5,3457,3457,5,3536,3537,7,3551,3551,5,3636,3642,5,3764,3772,5,3895,3895,5,3967,3967,7,3993,4028,5,4146,4151,5,4182,4183,7,4226,4226,5,4253,4253,5,4957,4959,5,5940,5940,7,6070,6070,7,6087,6088,7,6158,6158,4,6432,6434,5,6448,6449,7,6679,6680,5,6742,6742,5,6754,6754,5,6783,6783,5,6912,6915,5,6966,6970,5,6978,6978,5,7042,7042,7,7080,7081,5,7143,7143,7,7150,7150,7,7212,7219,5,7380,7392,5,7412,7412,5,8203,8203,4,8232,8232,4,8265,8265,14,8400,8412,5,8421,8432,5,8617,8618,14,9167,9167,14,9200,9200,14,9410,9410,14,9723,9726,14,9733,9733,14,9745,9745,14,9752,9752,14,9760,9760,14,9766,9766,14,9774,9774,14,9786,9786,14,9794,9794,14,9823,9823,14,9828,9828,14,9833,9850,14,9855,9855,14,9875,9875,14,9880,9880,14,9885,9887,14,9896,9897,14,9906,9916,14,9926,9927,14,9935,9935,14,9939,9939,14,9962,9962,14,9972,9972,14,9978,9978,14,9986,9986,14,9997,9997,14,10002,10002,14,10017,10017,14,10055,10055,14,10071,10071,14,10133,10135,14,10548,10549,14,11093,11093,14,12330,12333,5,12441,12442,5,42608,42610,5,43010,43010,5,43045,43046,5,43188,43203,7,43302,43309,5,43392,43394,5,43446,43449,5,43493,43493,5,43571,43572,7,43597,43597,7,43703,43704,5,43756,43757,5,44003,44004,7,44009,44010,7,44033,44059,12,44089,44115,12,44145,44171,12,44201,44227,12,44257,44283,12,44313,44339,12,44369,44395,12,44425,44451,12,44481,44507,12,44537,44563,12,44593,44619,12,44649,44675,12,44705,44731,12,44761,44787,12,44817,44843,12,44873,44899,12,44929,44955,12,44985,45011,12,45041,45067,12,45097,45123,12,45153,45179,12,45209,45235,12,45265,45291,12,45321,45347,12,45377,45403,12,45433,45459,12,45489,45515,12,45545,45571,12,45601,45627,12,45657,45683,12,45713,45739,12,45769,45795,12,45825,45851,12,45881,45907,12,45937,45963,12,45993,46019,12,46049,46075,12,46105,46131,12,46161,46187,12,46217,46243,12,46273,46299,12,46329,46355,12,46385,46411,12,46441,46467,12,46497,46523,12,46553,46579,12,46609,46635,12,46665,46691,12,46721,46747,12,46777,46803,12,46833,46859,12,46889,46915,12,46945,46971,12,47001,47027,12,47057,47083,12,47113,47139,12,47169,47195,12,47225,47251,12,47281,47307,12,47337,47363,12,47393,47419,12,47449,47475,12,47505,47531,12,47561,47587,12,47617,47643,12,47673,47699,12,47729,47755,12,47785,47811,12,47841,47867,12,47897,47923,12,47953,47979,12,48009,48035,12,48065,48091,12,48121,48147,12,48177,48203,12,48233,48259,12,48289,48315,12,48345,48371,12,48401,48427,12,48457,48483,12,48513,48539,12,48569,48595,12,48625,48651,12,48681,48707,12,48737,48763,12,48793,48819,12,48849,48875,12,48905,48931,12,48961,48987,12,49017,49043,12,49073,49099,12,49129,49155,12,49185,49211,12,49241,49267,12,49297,49323,12,49353,49379,12,49409,49435,12,49465,49491,12,49521,49547,12,49577,49603,12,49633,49659,12,49689,49715,12,49745,49771,12,49801,49827,12,49857,49883,12,49913,49939,12,49969,49995,12,50025,50051,12,50081,50107,12,50137,50163,12,50193,50219,12,50249,50275,12,50305,50331,12,50361,50387,12,50417,50443,12,50473,50499,12,50529,50555,12,50585,50611,12,50641,50667,12,50697,50723,12,50753,50779,12,50809,50835,12,50865,50891,12,50921,50947,12,50977,51003,12,51033,51059,12,51089,51115,12,51145,51171,12,51201,51227,12,51257,51283,12,51313,51339,12,51369,51395,12,51425,51451,12,51481,51507,12,51537,51563,12,51593,51619,12,51649,51675,12,51705,51731,12,51761,51787,12,51817,51843,12,51873,51899,12,51929,51955,12,51985,52011,12,52041,52067,12,52097,52123,12,52153,52179,12,52209,52235,12,52265,52291,12,52321,52347,12,52377,52403,12,52433,52459,12,52489,52515,12,52545,52571,12,52601,52627,12,52657,52683,12,52713,52739,12,52769,52795,12,52825,52851,12,52881,52907,12,52937,52963,12,52993,53019,12,53049,53075,12,53105,53131,12,53161,53187,12,53217,53243,12,53273,53299,12,53329,53355,12,53385,53411,12,53441,53467,12,53497,53523,12,53553,53579,12,53609,53635,12,53665,53691,12,53721,53747,12,53777,53803,12,53833,53859,12,53889,53915,12,53945,53971,12,54001,54027,12,54057,54083,12,54113,54139,12,54169,54195,12,54225,54251,12,54281,54307,12,54337,54363,12,54393,54419,12,54449,54475,12,54505,54531,12,54561,54587,12,54617,54643,12,54673,54699,12,54729,54755,12,54785,54811,12,54841,54867,12,54897,54923,12,54953,54979,12,55009,55035,12,55065,55091,12,55121,55147,12,55177,55203,12,65024,65039,5,65520,65528,4,66422,66426,5,68152,68154,5,69291,69292,5,69633,69633,5,69747,69748,5,69811,69814,5,69826,69826,5,69932,69932,7,70016,70017,5,70079,70080,7,70095,70095,5,70196,70196,5,70367,70367,5,70402,70403,7,70464,70464,5,70487,70487,5,70709,70711,7,70725,70725,7,70833,70834,7,70843,70844,7,70849,70849,7,71090,71093,5,71103,71104,5,71227,71228,7,71339,71339,5,71344,71349,5,71458,71461,5,71727,71735,5,71985,71989,7,71998,71998,5,72002,72002,7,72154,72155,5,72193,72202,5,72251,72254,5,72281,72283,5,72344,72345,5,72766,72766,7,72874,72880,5,72885,72886,5,73023,73029,5,73104,73105,5,73111,73111,5,92912,92916,5,94095,94098,5,113824,113827,4,119142,119142,7,119155,119162,4,119362,119364,5,121476,121476,5,122888,122904,5,123184,123190,5,125252,125258,5,127183,127183,14,127340,127343,14,127377,127386,14,127491,127503,14,127548,127551,14,127744,127756,14,127761,127761,14,127769,127769,14,127773,127774,14,127780,127788,14,127796,127797,14,127820,127823,14,127869,127869,14,127894,127895,14,127902,127903,14,127943,127943,14,127947,127950,14,127972,127972,14,127988,127988,14,127992,127994,14,128009,128011,14,128019,128019,14,128023,128041,14,128064,128064,14,128102,128107,14,128174,128181,14,128238,128238,14,128246,128247,14,128254,128254,14,128264,128264,14,128278,128299,14,128329,128330,14,128348,128359,14,128371,128377,14,128392,128393,14,128401,128404,14,128421,128421,14,128433,128434,14,128450,128452,14,128476,128478,14,128483,128483,14,128495,128495,14,128506,128506,14,128519,128520,14,128528,128528,14,128534,128534,14,128538,128538,14,128540,128542,14,128544,128549,14,128552,128555,14,128557,128557,14,128560,128563,14,128565,128565,14,128567,128576,14,128581,128591,14,128641,128642,14,128646,128646,14,128648,128648,14,128650,128651,14,128653,128653,14,128655,128655,14,128657,128659,14,128661,128661,14,128663,128663,14,128665,128666,14,128674,128674,14,128676,128677,14,128679,128685,14,128690,128690,14,128694,128694,14,128697,128702,14,128704,128704,14,128710,128714,14,128716,128716,14,128720,128720,14,128723,128724,14,128726,128727,14,128733,128735,14,128742,128744,14,128746,128746,14,128749,128751,14,128753,128754,14,128756,128758,14,128761,128761,14,128763,128764,14,128884,128895,14,128992,129003,14,129008,129008,14,129036,129039,14,129114,129119,14,129198,129279,14,129293,129295,14,129305,129310,14,129312,129319,14,129328,129328,14,129331,129338,14,129343,129343,14,129351,129355,14,129357,129359,14,129375,129387,14,129393,129393,14,129395,129398,14,129401,129401,14,129403,129403,14,129408,129412,14,129426,129431,14,129443,129444,14,129451,129453,14,129456,129465,14,129472,129472,14,129475,129482,14,129484,129484,14,129488,129510,14,129536,129647,14,129652,129652,14,129656,129658,14,129661,129663,14,129667,129670,14,129680,129685,14,129705,129708,14,129712,129718,14,129723,129727,14,129731,129733,14,129744,129750,14,129754,129759,14,129768,129775,14,129783,129791,14,917504,917504,4,917506,917535,4,917632,917759,4,918000,921599,4,0,9,4,11,12,4,14,31,4,169,169,14,174,174,14,1155,1159,5,1425,1469,5,1473,1474,5,1479,1479,5,1552,1562,5,1611,1631,5,1750,1756,5,1759,1764,5,1770,1773,5,1809,1809,5,1958,1968,5,2045,2045,5,2075,2083,5,2089,2093,5,2192,2193,1,2250,2273,5,2275,2306,5,2362,2362,5,2364,2364,5,2369,2376,5,2381,2381,5,2385,2391,5,2433,2433,5,2492,2492,5,2495,2496,7,2503,2504,7,2509,2509,5,2530,2531,5,2561,2562,5,2620,2620,5,2625,2626,5,2635,2637,5,2672,2673,5,2689,2690,5,2748,2748,5,2753,2757,5,2761,2761,7,2765,2765,5,2810,2815,5,2818,2819,7,2878,2878,5,2880,2880,7,2887,2888,7,2893,2893,5,2903,2903,5,2946,2946,5,3007,3007,7,3009,3010,7,3018,3020,7,3031,3031,5,3073,3075,7,3132,3132,5,3137,3140,7,3146,3149,5,3170,3171,5,3202,3203,7,3262,3262,7,3264,3265,7,3267,3268,7,3271,3272,7,3276,3277,5,3298,3299,5,3330,3331,7,3390,3390,5,3393,3396,5,3402,3404,7,3406,3406,1,3426,3427,5,3458,3459,7,3535,3535,5,3538,3540,5,3544,3550,7,3570,3571,7,3635,3635,7,3655,3662,5,3763,3763,7,3784,3789,5,3893,3893,5,3897,3897,5,3953,3966,5,3968,3972,5,3981,3991,5,4038,4038,5,4145,4145,7,4153,4154,5,4157,4158,5,4184,4185,5,4209,4212,5,4228,4228,7,4237,4237,5,4352,4447,8,4520,4607,10,5906,5908,5,5938,5939,5,5970,5971,5,6068,6069,5,6071,6077,5,6086,6086,5,6089,6099,5,6155,6157,5,6159,6159,5,6313,6313,5,6435,6438,7,6441,6443,7,6450,6450,5,6457,6459,5,6681,6682,7,6741,6741,7,6743,6743,7,6752,6752,5,6757,6764,5,6771,6780,5,6832,6845,5,6847,6862,5,6916,6916,7,6965,6965,5,6971,6971,7,6973,6977,7,6979,6980,7,7040,7041,5,7073,7073,7,7078,7079,7,7082,7082,7,7142,7142,5,7144,7145,5,7149,7149,5,7151,7153,5,7204,7211,7,7220,7221,7,7376,7378,5,7393,7393,7,7405,7405,5,7415,7415,7,7616,7679,5,8204,8204,5,8206,8207,4,8233,8233,4,8252,8252,14,8288,8292,4,8294,8303,4,8413,8416,5,8418,8420,5,8482,8482,14,8596,8601,14,8986,8987,14,9096,9096,14,9193,9196,14,9199,9199,14,9201,9202,14,9208,9210,14,9642,9643,14,9664,9664,14,9728,9729,14,9732,9732,14,9735,9741,14,9743,9744,14,9746,9746,14,9750,9751,14,9753,9756,14,9758,9759,14,9761,9761,14,9764,9765,14,9767,9769,14,9771,9773,14,9775,9775,14,9784,9785,14,9787,9791,14,9793,9793,14,9795,9799,14,9812,9822,14,9824,9824,14,9827,9827,14,9829,9830,14,9832,9832,14,9851,9851,14,9854,9854,14,9856,9861,14,9874,9874,14,9876,9876,14,9878,9879,14,9881,9881,14,9883,9884,14,9888,9889,14,9895,9895,14,9898,9899,14,9904,9905,14,9917,9918,14,9924,9925,14,9928,9928,14,9934,9934,14,9936,9936,14,9938,9938,14,9940,9940,14,9961,9961,14,9963,9967,14,9970,9971,14,9973,9973,14,9975,9977,14,9979,9980,14,9982,9985,14,9987,9988,14,9992,9996,14,9998,9998,14,10000,10001,14,10004,10004,14,10013,10013,14,10024,10024,14,10052,10052,14,10060,10060,14,10067,10069,14,10083,10083,14,10085,10087,14,10145,10145,14,10175,10175,14,11013,11015,14,11088,11088,14,11503,11505,5,11744,11775,5,12334,12335,5,12349,12349,14,12951,12951,14,42607,42607,5,42612,42621,5,42736,42737,5,43014,43014,5,43043,43044,7,43047,43047,7,43136,43137,7,43204,43205,5,43263,43263,5,43335,43345,5,43360,43388,8,43395,43395,7,43444,43445,7,43450,43451,7,43454,43456,7,43561,43566,5,43569,43570,5,43573,43574,5,43596,43596,5,43644,43644,5,43698,43700,5,43710,43711,5,43755,43755,7,43758,43759,7,43766,43766,5,44005,44005,5,44008,44008,5,44012,44012,7,44032,44032,11,44060,44060,11,44088,44088,11,44116,44116,11,44144,44144,11,44172,44172,11,44200,44200,11,44228,44228,11,44256,44256,11,44284,44284,11,44312,44312,11,44340,44340,11,44368,44368,11,44396,44396,11,44424,44424,11,44452,44452,11,44480,44480,11,44508,44508,11,44536,44536,11,44564,44564,11,44592,44592,11,44620,44620,11,44648,44648,11,44676,44676,11,44704,44704,11,44732,44732,11,44760,44760,11,44788,44788,11,44816,44816,11,44844,44844,11,44872,44872,11,44900,44900,11,44928,44928,11,44956,44956,11,44984,44984,11,45012,45012,11,45040,45040,11,45068,45068,11,45096,45096,11,45124,45124,11,45152,45152,11,45180,45180,11,45208,45208,11,45236,45236,11,45264,45264,11,45292,45292,11,45320,45320,11,45348,45348,11,45376,45376,11,45404,45404,11,45432,45432,11,45460,45460,11,45488,45488,11,45516,45516,11,45544,45544,11,45572,45572,11,45600,45600,11,45628,45628,11,45656,45656,11,45684,45684,11,45712,45712,11,45740,45740,11,45768,45768,11,45796,45796,11,45824,45824,11,45852,45852,11,45880,45880,11,45908,45908,11,45936,45936,11,45964,45964,11,45992,45992,11,46020,46020,11,46048,46048,11,46076,46076,11,46104,46104,11,46132,46132,11,46160,46160,11,46188,46188,11,46216,46216,11,46244,46244,11,46272,46272,11,46300,46300,11,46328,46328,11,46356,46356,11,46384,46384,11,46412,46412,11,46440,46440,11,46468,46468,11,46496,46496,11,46524,46524,11,46552,46552,11,46580,46580,11,46608,46608,11,46636,46636,11,46664,46664,11,46692,46692,11,46720,46720,11,46748,46748,11,46776,46776,11,46804,46804,11,46832,46832,11,46860,46860,11,46888,46888,11,46916,46916,11,46944,46944,11,46972,46972,11,47000,47000,11,47028,47028,11,47056,47056,11,47084,47084,11,47112,47112,11,47140,47140,11,47168,47168,11,47196,47196,11,47224,47224,11,47252,47252,11,47280,47280,11,47308,47308,11,47336,47336,11,47364,47364,11,47392,47392,11,47420,47420,11,47448,47448,11,47476,47476,11,47504,47504,11,47532,47532,11,47560,47560,11,47588,47588,11,47616,47616,11,47644,47644,11,47672,47672,11,47700,47700,11,47728,47728,11,47756,47756,11,47784,47784,11,47812,47812,11,47840,47840,11,47868,47868,11,47896,47896,11,47924,47924,11,47952,47952,11,47980,47980,11,48008,48008,11,48036,48036,11,48064,48064,11,48092,48092,11,48120,48120,11,48148,48148,11,48176,48176,11,48204,48204,11,48232,48232,11,48260,48260,11,48288,48288,11,48316,48316,11,48344,48344,11,48372,48372,11,48400,48400,11,48428,48428,11,48456,48456,11,48484,48484,11,48512,48512,11,48540,48540,11,48568,48568,11,48596,48596,11,48624,48624,11,48652,48652,11,48680,48680,11,48708,48708,11,48736,48736,11,48764,48764,11,48792,48792,11,48820,48820,11,48848,48848,11,48876,48876,11,48904,48904,11,48932,48932,11,48960,48960,11,48988,48988,11,49016,49016,11,49044,49044,11,49072,49072,11,49100,49100,11,49128,49128,11,49156,49156,11,49184,49184,11,49212,49212,11,49240,49240,11,49268,49268,11,49296,49296,11,49324,49324,11,49352,49352,11,49380,49380,11,49408,49408,11,49436,49436,11,49464,49464,11,49492,49492,11,49520,49520,11,49548,49548,11,49576,49576,11,49604,49604,11,49632,49632,11,49660,49660,11,49688,49688,11,49716,49716,11,49744,49744,11,49772,49772,11,49800,49800,11,49828,49828,11,49856,49856,11,49884,49884,11,49912,49912,11,49940,49940,11,49968,49968,11,49996,49996,11,50024,50024,11,50052,50052,11,50080,50080,11,50108,50108,11,50136,50136,11,50164,50164,11,50192,50192,11,50220,50220,11,50248,50248,11,50276,50276,11,50304,50304,11,50332,50332,11,50360,50360,11,50388,50388,11,50416,50416,11,50444,50444,11,50472,50472,11,50500,50500,11,50528,50528,11,50556,50556,11,50584,50584,11,50612,50612,11,50640,50640,11,50668,50668,11,50696,50696,11,50724,50724,11,50752,50752,11,50780,50780,11,50808,50808,11,50836,50836,11,50864,50864,11,50892,50892,11,50920,50920,11,50948,50948,11,50976,50976,11,51004,51004,11,51032,51032,11,51060,51060,11,51088,51088,11,51116,51116,11,51144,51144,11,51172,51172,11,51200,51200,11,51228,51228,11,51256,51256,11,51284,51284,11,51312,51312,11,51340,51340,11,51368,51368,11,51396,51396,11,51424,51424,11,51452,51452,11,51480,51480,11,51508,51508,11,51536,51536,11,51564,51564,11,51592,51592,11,51620,51620,11,51648,51648,11,51676,51676,11,51704,51704,11,51732,51732,11,51760,51760,11,51788,51788,11,51816,51816,11,51844,51844,11,51872,51872,11,51900,51900,11,51928,51928,11,51956,51956,11,51984,51984,11,52012,52012,11,52040,52040,11,52068,52068,11,52096,52096,11,52124,52124,11,52152,52152,11,52180,52180,11,52208,52208,11,52236,52236,11,52264,52264,11,52292,52292,11,52320,52320,11,52348,52348,11,52376,52376,11,52404,52404,11,52432,52432,11,52460,52460,11,52488,52488,11,52516,52516,11,52544,52544,11,52572,52572,11,52600,52600,11,52628,52628,11,52656,52656,11,52684,52684,11,52712,52712,11,52740,52740,11,52768,52768,11,52796,52796,11,52824,52824,11,52852,52852,11,52880,52880,11,52908,52908,11,52936,52936,11,52964,52964,11,52992,52992,11,53020,53020,11,53048,53048,11,53076,53076,11,53104,53104,11,53132,53132,11,53160,53160,11,53188,53188,11,53216,53216,11,53244,53244,11,53272,53272,11,53300,53300,11,53328,53328,11,53356,53356,11,53384,53384,11,53412,53412,11,53440,53440,11,53468,53468,11,53496,53496,11,53524,53524,11,53552,53552,11,53580,53580,11,53608,53608,11,53636,53636,11,53664,53664,11,53692,53692,11,53720,53720,11,53748,53748,11,53776,53776,11,53804,53804,11,53832,53832,11,53860,53860,11,53888,53888,11,53916,53916,11,53944,53944,11,53972,53972,11,54000,54000,11,54028,54028,11,54056,54056,11,54084,54084,11,54112,54112,11,54140,54140,11,54168,54168,11,54196,54196,11,54224,54224,11,54252,54252,11,54280,54280,11,54308,54308,11,54336,54336,11,54364,54364,11,54392,54392,11,54420,54420,11,54448,54448,11,54476,54476,11,54504,54504,11,54532,54532,11,54560,54560,11,54588,54588,11,54616,54616,11,54644,54644,11,54672,54672,11,54700,54700,11,54728,54728,11,54756,54756,11,54784,54784,11,54812,54812,11,54840,54840,11,54868,54868,11,54896,54896,11,54924,54924,11,54952,54952,11,54980,54980,11,55008,55008,11,55036,55036,11,55064,55064,11,55092,55092,11,55120,55120,11,55148,55148,11,55176,55176,11,55216,55238,9,64286,64286,5,65056,65071,5,65438,65439,5,65529,65531,4,66272,66272,5,68097,68099,5,68108,68111,5,68159,68159,5,68900,68903,5,69446,69456,5,69632,69632,7,69634,69634,7,69744,69744,5,69759,69761,5,69808,69810,7,69815,69816,7,69821,69821,1,69837,69837,1,69927,69931,5,69933,69940,5,70003,70003,5,70018,70018,7,70070,70078,5,70082,70083,1,70094,70094,7,70188,70190,7,70194,70195,7,70197,70197,7,70206,70206,5,70368,70370,7,70400,70401,5,70459,70460,5,70463,70463,7,70465,70468,7,70475,70477,7,70498,70499,7,70512,70516,5,70712,70719,5,70722,70724,5,70726,70726,5,70832,70832,5,70835,70840,5,70842,70842,5,70845,70845,5,70847,70848,5,70850,70851,5,71088,71089,7,71096,71099,7,71102,71102,7,71132,71133,5,71219,71226,5,71229,71229,5,71231,71232,5,71340,71340,7,71342,71343,7,71350,71350,7,71453,71455,5,71462,71462,7,71724,71726,7,71736,71736,7,71984,71984,5,71991,71992,7,71997,71997,7,71999,71999,1,72001,72001,1,72003,72003,5,72148,72151,5,72156,72159,7,72164,72164,7,72243,72248,5,72250,72250,1,72263,72263,5,72279,72280,7,72324,72329,1,72343,72343,7,72751,72751,7,72760,72765,5,72767,72767,5,72873,72873,7,72881,72881,7,72884,72884,7,73009,73014,5,73020,73021,5,73030,73030,1,73098,73102,7,73107,73108,7,73110,73110,7,73459,73460,5,78896,78904,4,92976,92982,5,94033,94087,7,94180,94180,5,113821,113822,5,118528,118573,5,119141,119141,5,119143,119145,5,119150,119154,5,119163,119170,5,119210,119213,5,121344,121398,5,121461,121461,5,121499,121503,5,122880,122886,5,122907,122913,5,122918,122922,5,123566,123566,5,125136,125142,5,126976,126979,14,126981,127182,14,127184,127231,14,127279,127279,14,127344,127345,14,127374,127374,14,127405,127461,14,127489,127490,14,127514,127514,14,127538,127546,14,127561,127567,14,127570,127743,14,127757,127758,14,127760,127760,14,127762,127762,14,127766,127768,14,127770,127770,14,127772,127772,14,127775,127776,14,127778,127779,14,127789,127791,14,127794,127795,14,127798,127798,14,127819,127819,14,127824,127824,14,127868,127868,14,127870,127871,14,127892,127893,14,127896,127896,14,127900,127901,14,127904,127940,14,127942,127942,14,127944,127944,14,127946,127946,14,127951,127955,14,127968,127971,14,127973,127984,14,127987,127987,14,127989,127989,14,127991,127991,14,127995,127999,5,128008,128008,14,128012,128014,14,128017,128018,14,128020,128020,14,128022,128022,14,128042,128042,14,128063,128063,14,128065,128065,14,128101,128101,14,128108,128109,14,128173,128173,14,128182,128183,14,128236,128237,14,128239,128239,14,128245,128245,14,128248,128248,14,128253,128253,14,128255,128258,14,128260,128263,14,128265,128265,14,128277,128277,14,128300,128301,14,128326,128328,14,128331,128334,14,128336,128347,14,128360,128366,14,128369,128370,14,128378,128378,14,128391,128391,14,128394,128397,14,128400,128400,14,128405,128406,14,128420,128420,14,128422,128423,14,128425,128432,14,128435,128443,14,128445,128449,14,128453,128464,14,128468,128475,14,128479,128480,14,128482,128482,14,128484,128487,14,128489,128494,14,128496,128498,14,128500,128505,14,128507,128511,14,128513,128518,14,128521,128525,14,128527,128527,14,128529,128529,14,128533,128533,14,128535,128535,14,128537,128537,14]")}getGraphemeBreakType(e){if(e<32)return 10===e?3:13===e?2:4;if(e<127)return 0;let t=this._data,i=t.length/3,n=1;for(;n<=i;)if(e<t[3*n])n*=2;else{if(!(e>t[3*n+1]))return t[3*n+2];n=2*n+1}return 0}}function et(e,t){if(0===e)return 0;let i=function(e,t){var i;let n=new F(t,e),s=n.prevCodePoint();for(;127995<=(i=s)&&i<=127999||65039===s||8419===s;){if(0===n.offset)return;s=n.prevCodePoint()}if(!q(s))return;let o=n.offset;return o>0&&8205===n.prevCodePoint()&&(o=n.offset),o}(e,t);if(void 0!==i)return i;let n=new F(t,e);return n.prevCodePoint(),n.offset}let ei="\xa0";class en{static{this.ambiguousCharacterData=new o.d(()=>JSON.parse('{"_common":[8232,32,8233,32,5760,32,8192,32,8193,32,8194,32,8195,32,8196,32,8197,32,8198,32,8200,32,8201,32,8202,32,8287,32,8199,32,8239,32,2042,95,65101,95,65102,95,65103,95,8208,45,8209,45,8210,45,65112,45,1748,45,8259,45,727,45,8722,45,10134,45,11450,45,1549,44,1643,44,184,44,42233,44,894,59,2307,58,2691,58,1417,58,1795,58,1796,58,5868,58,65072,58,6147,58,6153,58,8282,58,1475,58,760,58,42889,58,8758,58,720,58,42237,58,451,33,11601,33,660,63,577,63,2429,63,5038,63,42731,63,119149,46,8228,46,1793,46,1794,46,42510,46,68176,46,1632,46,1776,46,42232,46,1373,96,65287,96,8219,96,1523,96,8242,96,1370,96,8175,96,65344,96,900,96,8189,96,8125,96,8127,96,8190,96,697,96,884,96,712,96,714,96,715,96,756,96,699,96,701,96,700,96,702,96,42892,96,1497,96,2036,96,2037,96,5194,96,5836,96,94033,96,94034,96,65339,91,10088,40,10098,40,12308,40,64830,40,65341,93,10089,41,10099,41,12309,41,64831,41,10100,123,119060,123,10101,125,65342,94,8270,42,1645,42,8727,42,66335,42,5941,47,8257,47,8725,47,8260,47,9585,47,10187,47,10744,47,119354,47,12755,47,12339,47,11462,47,20031,47,12035,47,65340,92,65128,92,8726,92,10189,92,10741,92,10745,92,119311,92,119355,92,12756,92,20022,92,12034,92,42872,38,708,94,710,94,5869,43,10133,43,66203,43,8249,60,10094,60,706,60,119350,60,5176,60,5810,60,5120,61,11840,61,12448,61,42239,61,8250,62,10095,62,707,62,119351,62,5171,62,94015,62,8275,126,732,126,8128,126,8764,126,65372,124,65293,45,118002,50,120784,50,120794,50,120804,50,120814,50,120824,50,130034,50,42842,50,423,50,1000,50,42564,50,5311,50,42735,50,119302,51,118003,51,120785,51,120795,51,120805,51,120815,51,120825,51,130035,51,42923,51,540,51,439,51,42858,51,11468,51,1248,51,94011,51,71882,51,118004,52,120786,52,120796,52,120806,52,120816,52,120826,52,130036,52,5070,52,71855,52,118005,53,120787,53,120797,53,120807,53,120817,53,120827,53,130037,53,444,53,71867,53,118006,54,120788,54,120798,54,120808,54,120818,54,120828,54,130038,54,11474,54,5102,54,71893,54,119314,55,118007,55,120789,55,120799,55,120809,55,120819,55,120829,55,130039,55,66770,55,71878,55,2819,56,2538,56,2666,56,125131,56,118008,56,120790,56,120800,56,120810,56,120820,56,120830,56,130040,56,547,56,546,56,66330,56,2663,57,2920,57,2541,57,3437,57,118009,57,120791,57,120801,57,120811,57,120821,57,120831,57,130041,57,42862,57,11466,57,71884,57,71852,57,71894,57,9082,97,65345,97,119834,97,119886,97,119938,97,119990,97,120042,97,120094,97,120146,97,120198,97,120250,97,120302,97,120354,97,120406,97,120458,97,593,97,945,97,120514,97,120572,97,120630,97,120688,97,120746,97,65313,65,117974,65,119808,65,119860,65,119912,65,119964,65,120016,65,120068,65,120120,65,120172,65,120224,65,120276,65,120328,65,120380,65,120432,65,913,65,120488,65,120546,65,120604,65,120662,65,120720,65,5034,65,5573,65,42222,65,94016,65,66208,65,119835,98,119887,98,119939,98,119991,98,120043,98,120095,98,120147,98,120199,98,120251,98,120303,98,120355,98,120407,98,120459,98,388,98,5071,98,5234,98,5551,98,65314,66,8492,66,117975,66,119809,66,119861,66,119913,66,120017,66,120069,66,120121,66,120173,66,120225,66,120277,66,120329,66,120381,66,120433,66,42932,66,914,66,120489,66,120547,66,120605,66,120663,66,120721,66,5108,66,5623,66,42192,66,66178,66,66209,66,66305,66,65347,99,8573,99,119836,99,119888,99,119940,99,119992,99,120044,99,120096,99,120148,99,120200,99,120252,99,120304,99,120356,99,120408,99,120460,99,7428,99,1010,99,11429,99,43951,99,66621,99,128844,67,71913,67,71922,67,65315,67,8557,67,8450,67,8493,67,117976,67,119810,67,119862,67,119914,67,119966,67,120018,67,120174,67,120226,67,120278,67,120330,67,120382,67,120434,67,1017,67,11428,67,5087,67,42202,67,66210,67,66306,67,66581,67,66844,67,8574,100,8518,100,119837,100,119889,100,119941,100,119993,100,120045,100,120097,100,120149,100,120201,100,120253,100,120305,100,120357,100,120409,100,120461,100,1281,100,5095,100,5231,100,42194,100,8558,68,8517,68,117977,68,119811,68,119863,68,119915,68,119967,68,120019,68,120071,68,120123,68,120175,68,120227,68,120279,68,120331,68,120383,68,120435,68,5024,68,5598,68,5610,68,42195,68,8494,101,65349,101,8495,101,8519,101,119838,101,119890,101,119942,101,120046,101,120098,101,120150,101,120202,101,120254,101,120306,101,120358,101,120410,101,120462,101,43826,101,1213,101,8959,69,65317,69,8496,69,117978,69,119812,69,119864,69,119916,69,120020,69,120072,69,120124,69,120176,69,120228,69,120280,69,120332,69,120384,69,120436,69,917,69,120492,69,120550,69,120608,69,120666,69,120724,69,11577,69,5036,69,42224,69,71846,69,71854,69,66182,69,119839,102,119891,102,119943,102,119995,102,120047,102,120099,102,120151,102,120203,102,120255,102,120307,102,120359,102,120411,102,120463,102,43829,102,42905,102,383,102,7837,102,1412,102,119315,70,8497,70,117979,70,119813,70,119865,70,119917,70,120021,70,120073,70,120125,70,120177,70,120229,70,120281,70,120333,70,120385,70,120437,70,42904,70,988,70,120778,70,5556,70,42205,70,71874,70,71842,70,66183,70,66213,70,66853,70,65351,103,8458,103,119840,103,119892,103,119944,103,120048,103,120100,103,120152,103,120204,103,120256,103,120308,103,120360,103,120412,103,120464,103,609,103,7555,103,397,103,1409,103,117980,71,119814,71,119866,71,119918,71,119970,71,120022,71,120074,71,120126,71,120178,71,120230,71,120282,71,120334,71,120386,71,120438,71,1292,71,5056,71,5107,71,42198,71,65352,104,8462,104,119841,104,119945,104,119997,104,120049,104,120101,104,120153,104,120205,104,120257,104,120309,104,120361,104,120413,104,120465,104,1211,104,1392,104,5058,104,65320,72,8459,72,8460,72,8461,72,117981,72,119815,72,119867,72,119919,72,120023,72,120179,72,120231,72,120283,72,120335,72,120387,72,120439,72,919,72,120494,72,120552,72,120610,72,120668,72,120726,72,11406,72,5051,72,5500,72,42215,72,66255,72,731,105,9075,105,65353,105,8560,105,8505,105,8520,105,119842,105,119894,105,119946,105,119998,105,120050,105,120102,105,120154,105,120206,105,120258,105,120310,105,120362,105,120414,105,120466,105,120484,105,618,105,617,105,953,105,8126,105,890,105,120522,105,120580,105,120638,105,120696,105,120754,105,1110,105,42567,105,1231,105,43893,105,5029,105,71875,105,65354,106,8521,106,119843,106,119895,106,119947,106,119999,106,120051,106,120103,106,120155,106,120207,106,120259,106,120311,106,120363,106,120415,106,120467,106,1011,106,1112,106,65322,74,117983,74,119817,74,119869,74,119921,74,119973,74,120025,74,120077,74,120129,74,120181,74,120233,74,120285,74,120337,74,120389,74,120441,74,42930,74,895,74,1032,74,5035,74,5261,74,42201,74,119844,107,119896,107,119948,107,120000,107,120052,107,120104,107,120156,107,120208,107,120260,107,120312,107,120364,107,120416,107,120468,107,8490,75,65323,75,117984,75,119818,75,119870,75,119922,75,119974,75,120026,75,120078,75,120130,75,120182,75,120234,75,120286,75,120338,75,120390,75,120442,75,922,75,120497,75,120555,75,120613,75,120671,75,120729,75,11412,75,5094,75,5845,75,42199,75,66840,75,1472,108,8739,73,9213,73,65512,73,1633,108,1777,73,66336,108,125127,108,118001,108,120783,73,120793,73,120803,73,120813,73,120823,73,130033,73,65321,73,8544,73,8464,73,8465,73,117982,108,119816,73,119868,73,119920,73,120024,73,120128,73,120180,73,120232,73,120284,73,120336,73,120388,73,120440,73,65356,108,8572,73,8467,108,119845,108,119897,108,119949,108,120001,108,120053,108,120105,73,120157,73,120209,73,120261,73,120313,73,120365,73,120417,73,120469,73,448,73,120496,73,120554,73,120612,73,120670,73,120728,73,11410,73,1030,73,1216,73,1493,108,1503,108,1575,108,126464,108,126592,108,65166,108,65165,108,1994,108,11599,73,5825,73,42226,73,93992,73,66186,124,66313,124,119338,76,8556,76,8466,76,117985,76,119819,76,119871,76,119923,76,120027,76,120079,76,120131,76,120183,76,120235,76,120287,76,120339,76,120391,76,120443,76,11472,76,5086,76,5290,76,42209,76,93974,76,71843,76,71858,76,66587,76,66854,76,65325,77,8559,77,8499,77,117986,77,119820,77,119872,77,119924,77,120028,77,120080,77,120132,77,120184,77,120236,77,120288,77,120340,77,120392,77,120444,77,924,77,120499,77,120557,77,120615,77,120673,77,120731,77,1018,77,11416,77,5047,77,5616,77,5846,77,42207,77,66224,77,66321,77,119847,110,119899,110,119951,110,120003,110,120055,110,120107,110,120159,110,120211,110,120263,110,120315,110,120367,110,120419,110,120471,110,1400,110,1404,110,65326,78,8469,78,117987,78,119821,78,119873,78,119925,78,119977,78,120029,78,120081,78,120185,78,120237,78,120289,78,120341,78,120393,78,120445,78,925,78,120500,78,120558,78,120616,78,120674,78,120732,78,11418,78,42208,78,66835,78,3074,111,3202,111,3330,111,3458,111,2406,111,2662,111,2790,111,3046,111,3174,111,3302,111,3430,111,3664,111,3792,111,4160,111,1637,111,1781,111,65359,111,8500,111,119848,111,119900,111,119952,111,120056,111,120108,111,120160,111,120212,111,120264,111,120316,111,120368,111,120420,111,120472,111,7439,111,7441,111,43837,111,959,111,120528,111,120586,111,120644,111,120702,111,120760,111,963,111,120532,111,120590,111,120648,111,120706,111,120764,111,11423,111,4351,111,1413,111,1505,111,1607,111,126500,111,126564,111,126596,111,65259,111,65260,111,65258,111,65257,111,1726,111,64428,111,64429,111,64427,111,64426,111,1729,111,64424,111,64425,111,64423,111,64422,111,1749,111,3360,111,4125,111,66794,111,71880,111,71895,111,66604,111,1984,79,2534,79,2918,79,12295,79,70864,79,71904,79,118000,79,120782,79,120792,79,120802,79,120812,79,120822,79,130032,79,65327,79,117988,79,119822,79,119874,79,119926,79,119978,79,120030,79,120082,79,120134,79,120186,79,120238,79,120290,79,120342,79,120394,79,120446,79,927,79,120502,79,120560,79,120618,79,120676,79,120734,79,11422,79,1365,79,11604,79,4816,79,2848,79,66754,79,42227,79,71861,79,66194,79,66219,79,66564,79,66838,79,9076,112,65360,112,119849,112,119901,112,119953,112,120005,112,120057,112,120109,112,120161,112,120213,112,120265,112,120317,112,120369,112,120421,112,120473,112,961,112,120530,112,120544,112,120588,112,120602,112,120646,112,120660,112,120704,112,120718,112,120762,112,120776,112,11427,112,65328,80,8473,80,117989,80,119823,80,119875,80,119927,80,119979,80,120031,80,120083,80,120187,80,120239,80,120291,80,120343,80,120395,80,120447,80,929,80,120504,80,120562,80,120620,80,120678,80,120736,80,11426,80,5090,80,5229,80,42193,80,66197,80,119850,113,119902,113,119954,113,120006,113,120058,113,120110,113,120162,113,120214,113,120266,113,120318,113,120370,113,120422,113,120474,113,1307,113,1379,113,1382,113,8474,81,117990,81,119824,81,119876,81,119928,81,119980,81,120032,81,120084,81,120188,81,120240,81,120292,81,120344,81,120396,81,120448,81,11605,81,119851,114,119903,114,119955,114,120007,114,120059,114,120111,114,120163,114,120215,114,120267,114,120319,114,120371,114,120423,114,120475,114,43847,114,43848,114,7462,114,11397,114,43905,114,119318,82,8475,82,8476,82,8477,82,117991,82,119825,82,119877,82,119929,82,120033,82,120189,82,120241,82,120293,82,120345,82,120397,82,120449,82,422,82,5025,82,5074,82,66740,82,5511,82,42211,82,94005,82,65363,115,119852,115,119904,115,119956,115,120008,115,120060,115,120112,115,120164,115,120216,115,120268,115,120320,115,120372,115,120424,115,120476,115,42801,115,445,115,1109,115,43946,115,71873,115,66632,115,65331,83,117992,83,119826,83,119878,83,119930,83,119982,83,120034,83,120086,83,120138,83,120190,83,120242,83,120294,83,120346,83,120398,83,120450,83,1029,83,1359,83,5077,83,5082,83,42210,83,94010,83,66198,83,66592,83,119853,116,119905,116,119957,116,120009,116,120061,116,120113,116,120165,116,120217,116,120269,116,120321,116,120373,116,120425,116,120477,116,8868,84,10201,84,128872,84,65332,84,117993,84,119827,84,119879,84,119931,84,119983,84,120035,84,120087,84,120139,84,120191,84,120243,84,120295,84,120347,84,120399,84,120451,84,932,84,120507,84,120565,84,120623,84,120681,84,120739,84,11430,84,5026,84,42196,84,93962,84,71868,84,66199,84,66225,84,66325,84,119854,117,119906,117,119958,117,120010,117,120062,117,120114,117,120166,117,120218,117,120270,117,120322,117,120374,117,120426,117,120478,117,42911,117,7452,117,43854,117,43858,117,651,117,965,117,120534,117,120592,117,120650,117,120708,117,120766,117,1405,117,66806,117,71896,117,8746,85,8899,85,117994,85,119828,85,119880,85,119932,85,119984,85,120036,85,120088,85,120140,85,120192,85,120244,85,120296,85,120348,85,120400,85,120452,85,1357,85,4608,85,66766,85,5196,85,42228,85,94018,85,71864,85,8744,118,8897,118,65366,118,8564,118,119855,118,119907,118,119959,118,120011,118,120063,118,120115,118,120167,118,120219,118,120271,118,120323,118,120375,118,120427,118,120479,118,7456,118,957,118,120526,118,120584,118,120642,118,120700,118,120758,118,1141,118,1496,118,71430,118,43945,118,71872,118,119309,86,1639,86,1783,86,8548,86,117995,86,119829,86,119881,86,119933,86,119985,86,120037,86,120089,86,120141,86,120193,86,120245,86,120297,86,120349,86,120401,86,120453,86,1140,86,11576,86,5081,86,5167,86,42719,86,42214,86,93960,86,71840,86,66845,86,623,119,119856,119,119908,119,119960,119,120012,119,120064,119,120116,119,120168,119,120220,119,120272,119,120324,119,120376,119,120428,119,120480,119,7457,119,1121,119,1309,119,1377,119,71434,119,71438,119,71439,119,43907,119,71910,87,71919,87,117996,87,119830,87,119882,87,119934,87,119986,87,120038,87,120090,87,120142,87,120194,87,120246,87,120298,87,120350,87,120402,87,120454,87,1308,87,5043,87,5076,87,42218,87,5742,120,10539,120,10540,120,10799,120,65368,120,8569,120,119857,120,119909,120,119961,120,120013,120,120065,120,120117,120,120169,120,120221,120,120273,120,120325,120,120377,120,120429,120,120481,120,5441,120,5501,120,5741,88,9587,88,66338,88,71916,88,65336,88,8553,88,117997,88,119831,88,119883,88,119935,88,119987,88,120039,88,120091,88,120143,88,120195,88,120247,88,120299,88,120351,88,120403,88,120455,88,42931,88,935,88,120510,88,120568,88,120626,88,120684,88,120742,88,11436,88,11613,88,5815,88,42219,88,66192,88,66228,88,66327,88,66855,88,611,121,7564,121,65369,121,119858,121,119910,121,119962,121,120014,121,120066,121,120118,121,120170,121,120222,121,120274,121,120326,121,120378,121,120430,121,120482,121,655,121,7935,121,43866,121,947,121,8509,121,120516,121,120574,121,120632,121,120690,121,120748,121,1199,121,4327,121,71900,121,65337,89,117998,89,119832,89,119884,89,119936,89,119988,89,120040,89,120092,89,120144,89,120196,89,120248,89,120300,89,120352,89,120404,89,120456,89,933,89,978,89,120508,89,120566,89,120624,89,120682,89,120740,89,11432,89,1198,89,5033,89,5053,89,42220,89,94019,89,71844,89,66226,89,119859,122,119911,122,119963,122,120015,122,120067,122,120119,122,120171,122,120223,122,120275,122,120327,122,120379,122,120431,122,120483,122,7458,122,43923,122,71876,122,71909,90,66293,90,65338,90,8484,90,8488,90,117999,90,119833,90,119885,90,119937,90,119989,90,120041,90,120197,90,120249,90,120301,90,120353,90,120405,90,120457,90,918,90,120493,90,120551,90,120609,90,120667,90,120725,90,5059,90,42204,90,71849,90,65282,34,65283,35,65284,36,65285,37,65286,38,65290,42,65291,43,65294,46,65295,47,65296,48,65298,50,65299,51,65300,52,65301,53,65302,54,65303,55,65304,56,65305,57,65308,60,65309,61,65310,62,65312,64,65316,68,65318,70,65319,71,65324,76,65329,81,65330,82,65333,85,65334,86,65335,87,65343,95,65346,98,65348,100,65350,102,65355,107,65357,109,65358,110,65361,113,65362,114,65364,116,65365,117,65367,119,65370,122,65371,123,65373,125,119846,109],"_default":[160,32,8211,45,65374,126,8218,44,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"cs":[65374,126,8218,44,65306,58,65281,33,8216,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"de":[65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"es":[8211,45,65374,126,8218,44,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"fr":[65374,126,8218,44,65306,58,65281,33,8216,96,8245,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"it":[160,32,8211,45,65374,126,8218,44,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"ja":[8211,45,8218,44,65281,33,8216,96,8245,96,180,96,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65292,44,65297,49,65307,59],"ko":[8211,45,65374,126,8218,44,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"pl":[65374,126,65306,58,65281,33,8216,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"pt-BR":[65374,126,8218,44,65306,58,65281,33,8216,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"qps-ploc":[160,32,8211,45,65374,126,8218,44,65306,58,65281,33,8216,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"ru":[65374,126,8218,44,65306,58,65281,33,8216,96,8245,96,180,96,12494,47,305,105,921,73,1009,112,215,120,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"tr":[160,32,8211,45,65374,126,8218,44,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"zh-hans":[160,32,65374,126,8218,44,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65297,49],"zh-hant":[8211,45,65374,126,8218,44,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89]}'))}static{this.cache=new s.o5({getCacheKey:JSON.stringify},e=>{let t;function i(e){let t=new Map;for(let i=0;i<e.length;i+=2)t.set(e[i],e[i+1]);return t}let n=this.ambiguousCharacterData.value,s=e.filter(e=>!e.startsWith("_")&&e in n);for(let e of(0===s.length&&(s=["_default"]),s))t=function(e,t){if(!e)return t;let i=new Map;for(let[n,s]of e)t.has(n)&&i.set(n,s);return i}(t,i(n[e]));return new en(function(e,t){let i=new Map(e);for(let[e,n]of t)i.set(e,n);return i}(i(n._common),t))})}static getInstance(e){return en.cache.get(Array.from(e))}static{this._locales=new o.d(()=>Object.keys(en.ambiguousCharacterData.value).filter(e=>!e.startsWith("_")))}static getLocales(){return en._locales.value}constructor(e){this.confusableDictionary=e}isAmbiguous(e){return this.confusableDictionary.has(e)}getPrimaryConfusable(e){return this.confusableDictionary.get(e)}getConfusableCodePoints(){return new Set(this.confusableDictionary.keys())}}class es{static getRawData(){return JSON.parse('{"_common":[11,12,13,127,847,1564,4447,4448,6068,6069,6155,6156,6157,6158,7355,7356,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8204,8205,8206,8207,8234,8235,8236,8237,8238,8239,8287,8288,8289,8290,8291,8292,8293,8294,8295,8296,8297,8298,8299,8300,8301,8302,8303,10240,12644,65024,65025,65026,65027,65028,65029,65030,65031,65032,65033,65034,65035,65036,65037,65038,65039,65279,65440,65520,65521,65522,65523,65524,65525,65526,65527,65528,65532,78844,119155,119156,119157,119158,119159,119160,119161,119162,917504,917505,917506,917507,917508,917509,917510,917511,917512,917513,917514,917515,917516,917517,917518,917519,917520,917521,917522,917523,917524,917525,917526,917527,917528,917529,917530,917531,917532,917533,917534,917535,917536,917537,917538,917539,917540,917541,917542,917543,917544,917545,917546,917547,917548,917549,917550,917551,917552,917553,917554,917555,917556,917557,917558,917559,917560,917561,917562,917563,917564,917565,917566,917567,917568,917569,917570,917571,917572,917573,917574,917575,917576,917577,917578,917579,917580,917581,917582,917583,917584,917585,917586,917587,917588,917589,917590,917591,917592,917593,917594,917595,917596,917597,917598,917599,917600,917601,917602,917603,917604,917605,917606,917607,917608,917609,917610,917611,917612,917613,917614,917615,917616,917617,917618,917619,917620,917621,917622,917623,917624,917625,917626,917627,917628,917629,917630,917631,917760,917761,917762,917763,917764,917765,917766,917767,917768,917769,917770,917771,917772,917773,917774,917775,917776,917777,917778,917779,917780,917781,917782,917783,917784,917785,917786,917787,917788,917789,917790,917791,917792,917793,917794,917795,917796,917797,917798,917799,917800,917801,917802,917803,917804,917805,917806,917807,917808,917809,917810,917811,917812,917813,917814,917815,917816,917817,917818,917819,917820,917821,917822,917823,917824,917825,917826,917827,917828,917829,917830,917831,917832,917833,917834,917835,917836,917837,917838,917839,917840,917841,917842,917843,917844,917845,917846,917847,917848,917849,917850,917851,917852,917853,917854,917855,917856,917857,917858,917859,917860,917861,917862,917863,917864,917865,917866,917867,917868,917869,917870,917871,917872,917873,917874,917875,917876,917877,917878,917879,917880,917881,917882,917883,917884,917885,917886,917887,917888,917889,917890,917891,917892,917893,917894,917895,917896,917897,917898,917899,917900,917901,917902,917903,917904,917905,917906,917907,917908,917909,917910,917911,917912,917913,917914,917915,917916,917917,917918,917919,917920,917921,917922,917923,917924,917925,917926,917927,917928,917929,917930,917931,917932,917933,917934,917935,917936,917937,917938,917939,917940,917941,917942,917943,917944,917945,917946,917947,917948,917949,917950,917951,917952,917953,917954,917955,917956,917957,917958,917959,917960,917961,917962,917963,917964,917965,917966,917967,917968,917969,917970,917971,917972,917973,917974,917975,917976,917977,917978,917979,917980,917981,917982,917983,917984,917985,917986,917987,917988,917989,917990,917991,917992,917993,917994,917995,917996,917997,917998,917999],"cs":[173,8203,12288],"de":[173,8203,12288],"es":[8203,12288],"fr":[173,8203,12288],"it":[160,173,12288],"ja":[173],"ko":[173,12288],"pl":[173,8203,12288],"pt-BR":[173,8203,12288],"qps-ploc":[160,173,8203,12288],"ru":[173,12288],"tr":[160,173,8203,12288],"zh-hans":[160,173,8203,12288],"zh-hant":[173,12288]}')}static{this._data=void 0}static getData(){return this._data||(this._data=new Set([...Object.values(es.getRawData())].flat())),this._data}static isInvisibleCharacter(e){return es.getData().has(e)}static get codePoints(){return es.getData()}}},56460:(e,t,i)=>{"use strict";i.d(t,{Fu:()=>p,az:()=>a,xb:()=>u});var n=i(55532),s=i(99314),o=i(23047);class r{constructor(e,t,i,n,s,o){this._richEditBracketBrand=void 0,this.languageId=e,this.index=t,this.open=i,this.close=n,this.forwardRegex=s,this.reversedRegex=o,this._openSet=r._toSet(this.open),this._closeSet=r._toSet(this.close)}isOpen(e){return this._openSet.has(e)}isClose(e){return this._closeSet.has(e)}static _toSet(e){let t=new Set;for(let i of e)t.add(i);return t}}class a{constructor(e,t){this._richEditBracketsBrand=void 0;let i=function(e){let t=e.length;e=e.map(e=>[e[0].toLowerCase(),e[1].toLowerCase()]);let i=[];for(let e=0;e<t;e++)i[e]=e;let n=(e,t)=>{let[i,n]=e,[s,o]=t;return i===s||i===o||n===s||n===o},s=(e,n)=>{let s=Math.min(e,n),o=Math.max(e,n);for(let e=0;e<t;e++)i[e]===o&&(i[e]=s)};for(let o=0;o<t;o++){let r=e[o];for(let a=o+1;a<t;a++)n(r,e[a])&&s(i[o],i[a])}let o=[];for(let n=0;n<t;n++){let s=[],r=[];for(let o=0;o<t;o++)if(i[o]===n){let[t,i]=e[o];s.push(t),r.push(i)}s.length>0&&o.push({open:s,close:r})}return o}(t);for(let t of(this.brackets=i.map((t,n)=>new r(e,n,t.open,t.close,function(e,t,i,n){let s=[];s=(s=s.concat(e)).concat(t);for(let e=0,t=s.length;e<t;e++)l(s[e],i,n,s);return(s=d(s)).sort(h),s.reverse(),u(s)}(t.open,t.close,i,n),function(e,t,i,n){let s=[];s=(s=s.concat(e)).concat(t);for(let e=0,t=s.length;e<t;e++)l(s[e],i,n,s);return(s=d(s)).sort(h),s.reverse(),u(s.map(g))}(t.open,t.close,i,n))),this.forwardRegex=function(e){let t=[];for(let i of e){for(let e of i.open)t.push(e);for(let e of i.close)t.push(e)}return u(t=d(t))}(this.brackets),this.reversedRegex=function(e){let t=[];for(let i of e){for(let e of i.open)t.push(e);for(let e of i.close)t.push(e)}return u((t=d(t)).map(g))}(this.brackets),this.textIsBracket={},this.textIsOpenBracket={},this.maxBracketLength=0,this.brackets)){for(let e of t.open)this.textIsBracket[e]=t,this.textIsOpenBracket[e]=!0,this.maxBracketLength=Math.max(this.maxBracketLength,e.length);for(let e of t.close)this.textIsBracket[e]=t,this.textIsOpenBracket[e]=!1,this.maxBracketLength=Math.max(this.maxBracketLength,e.length)}}}function l(e,t,i,n){for(let s=0,o=t.length;s<o;s++){if(s===i)continue;let o=t[s];for(let t of o.open)t.indexOf(e)>=0&&n.push(t);for(let t of o.close)t.indexOf(e)>=0&&n.push(t)}}function h(e,t){return e.length-t.length}function d(e){if(e.length<=1)return e;let t=[],i=new Set;for(let n of e)i.has(n)||(t.push(n),i.add(n));return t}function c(e){let t=/^[\w ]+$/.test(e);return e=n.bm(e),t?`\\b${e}\\b`:e}function u(e,t){let i=`(${e.map(c).join(")|(")})`;return n.OS(i,!0,t)}let g=function(){let e=null,t=null;return function(i){return e!==i&&(t=function(e){let t=new Uint16Array(e.length),i=0;for(let n=e.length-1;n>=0;n--)t[i++]=e.charCodeAt(n);return s.b7().decode(t)}(e=i)),t}}();class p{static _findPrevBracketInText(e,t,i,n){let s=i.match(e);if(!s)return null;let r=i.length-(s.index||0),a=s[0].length,l=n+r;return new o.Q(t,l-a+1,t,l+1)}static findPrevBracketInRange(e,t,i,n,s){let o=g(i).substring(i.length-s,i.length-n);return this._findPrevBracketInText(e,t,o,n)}static findNextBracketInText(e,t,i,n){let s=i.match(e);if(!s)return null;let r=s.index||0,a=s[0].length;if(0===a)return null;let l=n+r;return new o.Q(t,l+1,t,l+1+a)}static findNextBracketInRange(e,t,i,n,s){let o=i.substring(n,s);return this.findNextBracketInText(e,t,o,n)}}},56482:()=>{},56487:(e,t,i)=>{"use strict";i.d(t,{yE:()=>r});var n=i(17354),s=i(82102);class o{constructor(e,t,i,n,s,o,r){this._forceIntegerValues=e,this._scrollStateBrand=void 0,this._forceIntegerValues&&(t|=0,i|=0,n|=0,s|=0,o|=0,r|=0),this.rawScrollLeft=n,this.rawScrollTop=r,t<0&&(t=0),n+t>i&&(n=i-t),n<0&&(n=0),s<0&&(s=0),r+s>o&&(r=o-s),r<0&&(r=0),this.width=t,this.scrollWidth=i,this.scrollLeft=n,this.height=s,this.scrollHeight=o,this.scrollTop=r}equals(e){return this.rawScrollLeft===e.rawScrollLeft&&this.rawScrollTop===e.rawScrollTop&&this.width===e.width&&this.scrollWidth===e.scrollWidth&&this.scrollLeft===e.scrollLeft&&this.height===e.height&&this.scrollHeight===e.scrollHeight&&this.scrollTop===e.scrollTop}withScrollDimensions(e,t){return new o(this._forceIntegerValues,void 0!==e.width?e.width:this.width,void 0!==e.scrollWidth?e.scrollWidth:this.scrollWidth,t?this.rawScrollLeft:this.scrollLeft,void 0!==e.height?e.height:this.height,void 0!==e.scrollHeight?e.scrollHeight:this.scrollHeight,t?this.rawScrollTop:this.scrollTop)}withScrollPosition(e){return new o(this._forceIntegerValues,this.width,this.scrollWidth,void 0!==e.scrollLeft?e.scrollLeft:this.rawScrollLeft,this.height,this.scrollHeight,void 0!==e.scrollTop?e.scrollTop:this.rawScrollTop)}createScrollEvent(e,t){let i=this.width!==e.width,n=this.scrollWidth!==e.scrollWidth,s=this.scrollLeft!==e.scrollLeft,o=this.height!==e.height,r=this.scrollHeight!==e.scrollHeight,a=this.scrollTop!==e.scrollTop;return{inSmoothScrolling:t,oldWidth:e.width,oldScrollWidth:e.scrollWidth,oldScrollLeft:e.scrollLeft,width:this.width,scrollWidth:this.scrollWidth,scrollLeft:this.scrollLeft,oldHeight:e.height,oldScrollHeight:e.scrollHeight,oldScrollTop:e.scrollTop,height:this.height,scrollHeight:this.scrollHeight,scrollTop:this.scrollTop,widthChanged:i,scrollWidthChanged:n,scrollLeftChanged:s,heightChanged:o,scrollHeightChanged:r,scrollTopChanged:a}}}class r extends s.jG{constructor(e){super(),this._scrollableBrand=void 0,this._onScroll=this._register(new n.vl),this.onScroll=this._onScroll.event,this._smoothScrollDuration=e.smoothScrollDuration,this._scheduleAtNextAnimationFrame=e.scheduleAtNextAnimationFrame,this._state=new o(e.forceIntegerValues,0,0,0,0,0,0),this._smoothScrolling=null}dispose(){this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),super.dispose()}setSmoothScrollDuration(e){this._smoothScrollDuration=e}validateScrollPosition(e){return this._state.withScrollPosition(e)}getScrollDimensions(){return this._state}setScrollDimensions(e,t){let i=this._state.withScrollDimensions(e,t);this._setState(i,!!this._smoothScrolling),this._smoothScrolling?.acceptScrollDimensions(this._state)}getFutureScrollPosition(){return this._smoothScrolling?this._smoothScrolling.to:this._state}getCurrentScrollPosition(){return this._state}setScrollPositionNow(e){let t=this._state.withScrollPosition(e);this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),this._setState(t,!1)}setScrollPositionSmooth(e,t){if(0===this._smoothScrollDuration)return this.setScrollPositionNow(e);if(this._smoothScrolling){let i;e={scrollLeft:void 0===e.scrollLeft?this._smoothScrolling.to.scrollLeft:e.scrollLeft,scrollTop:void 0===e.scrollTop?this._smoothScrolling.to.scrollTop:e.scrollTop};let n=this._state.withScrollPosition(e);if(this._smoothScrolling.to.scrollLeft===n.scrollLeft&&this._smoothScrolling.to.scrollTop===n.scrollTop)return;i=t?new h(this._smoothScrolling.from,n,this._smoothScrolling.startTime,this._smoothScrolling.duration):this._smoothScrolling.combine(this._state,n,this._smoothScrollDuration),this._smoothScrolling.dispose(),this._smoothScrolling=i}else{let t=this._state.withScrollPosition(e);this._smoothScrolling=h.start(this._state,t,this._smoothScrollDuration)}this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame(()=>{this._smoothScrolling&&(this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling())})}hasPendingScrollAnimation(){return!!this._smoothScrolling}_performSmoothScrolling(){if(!this._smoothScrolling)return;let e=this._smoothScrolling.tick(),t=this._state.withScrollPosition(e);if(this._setState(t,!0),this._smoothScrolling){if(e.isDone){this._smoothScrolling.dispose(),this._smoothScrolling=null;return}this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame(()=>{this._smoothScrolling&&(this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling())})}}_setState(e,t){let i=this._state;i.equals(e)||(this._state=e,this._onScroll.fire(this._state.createScrollEvent(i,t)))}}class a{constructor(e,t,i){this.scrollLeft=e,this.scrollTop=t,this.isDone=i}}function l(e,t){let i=t-e;return function(t){return e+i*(1-Math.pow(1-t,3))}}class h{constructor(e,t,i,n){this.from=e,this.to=t,this.duration=n,this.startTime=i,this.animationFrameDisposable=null,this._initAnimations()}_initAnimations(){this.scrollLeft=this._initAnimation(this.from.scrollLeft,this.to.scrollLeft,this.to.width),this.scrollTop=this._initAnimation(this.from.scrollTop,this.to.scrollTop,this.to.height)}_initAnimation(e,t,i){if(Math.abs(e-t)>2.5*i){var n,s;let o,r;return e<t?(o=e+.75*i,r=t-.75*i):(o=e-.75*i,r=t+.75*i),n=l(e,o),s=l(r,t),function(e){return e<.33?n(e/.33):s((e-.33)/(1-.33))}}return l(e,t)}dispose(){null!==this.animationFrameDisposable&&(this.animationFrameDisposable.dispose(),this.animationFrameDisposable=null)}acceptScrollDimensions(e){this.to=e.withScrollPosition(this.to),this._initAnimations()}tick(){return this._tick(Date.now())}_tick(e){let t=(e-this.startTime)/this.duration;return t<1?new a(this.scrollLeft(t),this.scrollTop(t),!1):new a(this.to.scrollLeft,this.to.scrollTop,!0)}combine(e,t,i){return h.start(e,t,i)}static start(e,t,i){return i+=10,new h(e,t,Date.now()-10,i)}}},56614:()=>{},57120:(e,t,i)=>{"use strict";i.d(t,{GP:()=>a,LM:()=>o,Uv:()=>h,nt:()=>r,qL:()=>l});var n=i(5488),s=i(55532);class o{constructor(e,t,i,n){this._viewportBrand=void 0,this.top=0|e,this.left=0|t,this.width=0|i,this.height=0|n}}class r{constructor(e,t){this.tabSize=e,this.data=t}}class a{constructor(e,t,i,n,s,o,r){this._viewLineDataBrand=void 0,this.content=e,this.continuesWithWrappedLine=t,this.minColumn=i,this.maxColumn=n,this.startVisibleColumn=s,this.tokens=o,this.inlineDecorations=r}}class l{constructor(e,t,i,n,s,o,r,a,h,d,c,u){this.minColumn=e,this.maxColumn=t,this.content=i,this.continuesWithWrappedLine=n,this.isBasicASCII=l.isBasicASCII(i,o),this.containsRTL=l.containsRTL(i,this.isBasicASCII,s),this.tokens=r,this.inlineDecorations=a,this.tabSize=h,this.startVisibleColumn=d,this.textDirection=c,this.hasVariableFonts=u}static isBasicASCII(e,t){return!t||s.aC(e)}static containsRTL(e,t,i){return!t&&!!i&&s.E_(e)}}class h{constructor(e,t,i){this.color=e,this.zIndex=t,this.data=i}static compareByRenderingProps(e,t){return e.zIndex===t.zIndex?e.color<t.color?-1:+(e.color>t.color):e.zIndex-t.zIndex}static equals(e,t){return e.color===t.color&&e.zIndex===t.zIndex&&n.aI(e.data,t.data)}static equalsArr(e,t){return n.aI(e,t,h.equals)}}},57190:()=>{},57236:()=>{},57680:(e,t,i)=>{"use strict";i.d(t,{T:()=>o,x:()=>s});let n=[];function s(e){n.push(e)}function o(){return n.slice(0)}},58441:(e,t,i)=>{"use strict";i.d(t,{Tf:()=>l,f7:()=>r,fE:()=>h});var n=i(30868),s=i(71819),o=i(6033);class r{static createEmpty(e,t){let i=r.defaultTokenMetadata,n=new Uint32Array(2);return n[0]=e.length,n[1]=i,new r(n,e,t)}static createFromTextAndMetadata(e,t){let i=0,n="",s=[];for(let{text:t,metadata:o}of e)s.push(i+t.length,o),i+=t.length,n+=t;return new r(new Uint32Array(s),n,t)}static convertToEndOffset(e,t){let i=(e.length>>>1)-1;for(let t=0;t<i;t++)e[t<<1]=e[t+1<<1];e[i<<1]=t}static findIndexInTokensArray(e,t){if(e.length<=2)return 0;let i=0,n=(e.length>>>1)-1;for(;i<n;){let s=i+Math.floor((n-i)/2),o=e[s<<1];if(o===t)return s+1;o<t?i=s+1:o>t&&(n=s)}return i}static{this.defaultTokenMetadata=0x2008000}constructor(e,t,i){this._lineTokensBrand=void 0,(e.length>1?e[e.length-2]:0)!==t.length&&(0,o.dz)(Error("Token length and text length do not match!")),this._tokens=e,this._tokensCount=this._tokens.length>>>1,this._text=t,this.languageIdCodec=i}getTextLength(){return this._text.length}equals(e){return e instanceof r&&this.slicedEquals(e,0,this._tokensCount)}slicedEquals(e,t,i){if(this._text!==e._text||this._tokensCount!==e._tokensCount)return!1;let n=t<<1,s=n+(i<<1);for(let t=n;t<s;t++)if(this._tokens[t]!==e._tokens[t])return!1;return!0}getLineContent(){return this._text}getCount(){return this._tokensCount}getStartOffset(e){return e>0?this._tokens[e-1<<1]:0}getMetadata(e){return this._tokens[(e<<1)+1]}getLanguageId(e){let t=this._tokens[(e<<1)+1],i=n.x.getLanguageId(t);return this.languageIdCodec.decodeLanguageId(i)}getStandardTokenType(e){let t=this._tokens[(e<<1)+1];return n.x.getTokenType(t)}getForeground(e){let t=this._tokens[(e<<1)+1];return n.x.getForeground(t)}getClassName(e){let t=this._tokens[(e<<1)+1];return n.x.getClassNameFromMetadata(t)}getInlineStyle(e,t){let i=this._tokens[(e<<1)+1];return n.x.getInlineStyleFromMetadata(i,t)}getPresentation(e){let t=this._tokens[(e<<1)+1];return n.x.getPresentationFromMetadata(t)}getEndOffset(e){return this._tokens[e<<1]}findTokenIndexAtOffset(e){return r.findIndexInTokensArray(this._tokens,e)}inflate(){return this}sliceAndInflate(e,t,i){return new a(this,e,t,i)}sliceZeroCopy(e){return this.sliceAndInflate(e.start,e.endExclusive,0)}withInserted(e){if(0===e.length)return this;let t=0,i=0,n="",s=[],o=0;for(;;){let r=t<this._tokensCount?this._tokens[t<<1]:-1,a=i<e.length?e[i]:null;if(-1!==r&&(null===a||r<=a.offset)){n+=this._text.substring(o,r);let e=this._tokens[(t<<1)+1];s.push(n.length,e),t++,o=r}else if(a){if(a.offset>o){n+=this._text.substring(o,a.offset);let e=this._tokens[(t<<1)+1];s.push(n.length,e),o=a.offset}n+=a.text,s.push(n.length,a.tokenMetadata),i++}else break}return new r(new Uint32Array(s),n,this.languageIdCodec)}getTokensInRange(e){let t=new c,i=this.findTokenIndexAtOffset(e.start),n=this.findTokenIndexAtOffset(e.endExclusive);for(let o=i;o<=n;o++){let i=new s.L(this.getStartOffset(o),this.getEndOffset(o)).intersectionLength(e);i>0&&t.add(i,this.getMetadata(o))}return t.build()}getTokenText(e){let t=this.getStartOffset(e),i=this.getEndOffset(e);return this._text.substring(t,i)}forEach(e){let t=this.getCount();for(let i=0;i<t;i++)e(i)}toString(){let e="";return this.forEach(t=>{e+=`[${this.getTokenText(t)}]{${this.getClassName(t)}}`}),e}}class a{constructor(e,t,i,n){this._source=e,this._startOffset=t,this._endOffset=i,this._deltaOffset=n,this._firstTokenIndex=e.findTokenIndexAtOffset(t),this.languageIdCodec=e.languageIdCodec,this._tokensCount=0;for(let t=this._firstTokenIndex,n=e.getCount();t<n&&!(e.getStartOffset(t)>=i);t++)this._tokensCount++}getMetadata(e){return this._source.getMetadata(this._firstTokenIndex+e)}getLanguageId(e){return this._source.getLanguageId(this._firstTokenIndex+e)}getLineContent(){return this._source.getLineContent().substring(this._startOffset,this._endOffset)}equals(e){return e instanceof a&&this._startOffset===e._startOffset&&this._endOffset===e._endOffset&&this._deltaOffset===e._deltaOffset&&this._source.slicedEquals(e._source,this._firstTokenIndex,this._tokensCount)}getCount(){return this._tokensCount}getStandardTokenType(e){return this._source.getStandardTokenType(this._firstTokenIndex+e)}getForeground(e){return this._source.getForeground(this._firstTokenIndex+e)}getEndOffset(e){let t=this._source.getEndOffset(this._firstTokenIndex+e);return Math.min(this._endOffset,t)-this._startOffset+this._deltaOffset}getClassName(e){return this._source.getClassName(this._firstTokenIndex+e)}getInlineStyle(e,t){return this._source.getInlineStyle(this._firstTokenIndex+e,t)}getPresentation(e){return this._source.getPresentation(this._firstTokenIndex+e)}findTokenIndexAtOffset(e){return this._source.findTokenIndexAtOffset(e+this._startOffset-this._deltaOffset)-this._firstTokenIndex}getTokenText(e){let t=this._firstTokenIndex+e,i=this._source.getStartOffset(t),n=this._source.getEndOffset(t),s=this._source.getTokenText(t);return i<this._startOffset&&(s=s.substring(this._startOffset-i)),n>this._endOffset&&(s=s.substring(0,s.length-(n-this._endOffset))),s}forEach(e){for(let t=0;t<this.getCount();t++)e(t)}}function l(e,t){let i=t.lineNumber;if(!e.tokenization.isCheapToTokenize(i))return;e.tokenization.forceTokenization(i);let n=e.tokenization.getLineTokens(i),s=n.findTokenIndexAtOffset(t.column-1);return n.getStandardTokenType(s)}class h{static fromLineTokens(e){let t=[];for(let i=0;i<e.getCount();i++)t.push(new d(e.getEndOffset(i)-e.getStartOffset(i),e.getMetadata(i)));return h.create(t)}static create(e){return new h(e)}constructor(e){this._tokenInfo=e}toLineTokens(e,t){return r.createFromTextAndMetadata(this.map((t,i)=>({text:t.substring(e),metadata:i.metadata})),t)}forEach(e){let t=0;for(let i of this._tokenInfo)e(new s.L(t,t+i.length),i),t+=i.length}map(e){let t=[],i=0;for(let n of this._tokenInfo){let o=new s.L(i,i+n.length);t.push(e(o,n)),i+=n.length}return t}slice(e){let t=[],i=0;for(let n of this._tokenInfo){let s=i,o=s+n.length;if(o>e.start){if(s>=e.endExclusive)break;let i=Math.max(0,e.start-s),r=Math.max(0,o-e.endExclusive);t.push(new d(n.length-i-r,n.metadata))}i+=n.length}return h.create(t)}}class d{constructor(e,t){this.length=e,this.metadata=t}}class c{constructor(){this._tokens=[]}add(e,t){this._tokens.push(new d(e,t))}build(){return h.create(this._tokens)}}},58541:()=>{},58869:(e,t,i)=>{"use strict";i.d(t,{aQ:()=>O,nr:()=>P,Sx:()=>z,po:()=>R,tj:()=>T});var n=i(87899),s=i(92684),o=i(29195),r=i(78713),a=i(17354),l=i(993),h=i(30868);class d{constructor(e,t,i,n,s){this._parsedThemeRuleBrand=void 0,this.token=e,this.index=t,this.fontStyle=i,this.foreground=n,this.background=s}}let c=/^#?([0-9A-Fa-f]{6})([0-9A-Fa-f]{2})?$/;class u{constructor(){this._lastColorId=0,this._id2color=[],this._color2id=new Map}getId(e){if(null===e)return 0;let t=e.match(c);if(!t)throw Error("Illegal value for token color: "+e);e=t[1].toUpperCase();let i=this._color2id.get(e);return i||(i=++this._lastColorId,this._color2id.set(e,i),this._id2color[i]=r.Q1.fromHex("#"+e)),i}getColorMap(){return this._id2color.slice(0)}}class g{static createFromRawTokenTheme(e,t){return this.createFromParsedTokenTheme(function(e){if(!e||!Array.isArray(e))return[];let t=[],i=0;for(let n=0,s=e.length;n<s;n++){let s=e[n],o=-1;if("string"==typeof s.fontStyle){o=0;let e=s.fontStyle.split(" ");for(let t=0,i=e.length;t<i;t++)switch(e[t]){case"italic":o|=1;break;case"bold":o|=2;break;case"underline":o|=4;break;case"strikethrough":o|=8}}let r=null;"string"==typeof s.foreground&&(r=s.foreground);let a=null;"string"==typeof s.background&&(a=s.background),t[i++]=new d(s.token||"",n,o,r,a)}return t}(e),t)}static createFromParsedTokenTheme(e,t){return function(e,t){e.sort((e,t)=>{var i,n;let s=(i=e.token,i<(n=t.token)?-1:+(i>n));return 0!==s?s:e.index-t.index});let i=0,n="000000",s="ffffff";for(;e.length>=1&&""===e[0].token;){let t=e.shift();-1!==t.fontStyle&&(i=t.fontStyle),null!==t.foreground&&(n=t.foreground),null!==t.background&&(s=t.background)}let o=new u;for(let e of t)o.getId(e);let r=new f(new m(i,o.getId(n),o.getId(s)));for(let t=0,i=e.length;t<i;t++){let i=e[t];r.insert(i.token,i.fontStyle,o.getId(i.foreground),o.getId(i.background))}return new g(o,r)}(e,t)}constructor(e,t){this._colorMap=e,this._root=t,this._cache=new Map}getColorMap(){return this._colorMap.getColorMap()}_match(e){return this._root.match(e)}match(e,t){let i=this._cache.get(t);if(void 0===i){let e=this._match(t),n=function(e){let t=e.match(p);if(!t)return 0;switch(t[1]){case"comment":return 1;case"string":return 2;case"regex":case"regexp":return 3}throw Error("Unexpected match for standard token type!")}(t);i=(e.metadata|n<<8)>>>0,this._cache.set(t,i)}return(0|e|i)>>>0}}let p=/\b(comment|string|regex|regexp)\b/;class m{constructor(e,t,i){this._themeTrieElementRuleBrand=void 0,this._fontStyle=e,this._foreground=t,this._background=i,this.metadata=(this._fontStyle<<11|this._foreground<<15|this._background<<24)>>>0}clone(){return new m(this._fontStyle,this._foreground,this._background)}acceptOverwrite(e,t,i){-1!==e&&(this._fontStyle=e),0!==t&&(this._foreground=t),0!==i&&(this._background=i),this.metadata=(this._fontStyle<<11|this._foreground<<15|this._background<<24)>>>0}}class f{constructor(e){this._themeTrieElementBrand=void 0,this._mainRule=e,this._children=new Map}match(e){let t,i;if(""===e)return this._mainRule;let n=e.indexOf(".");-1===n?(t=e,i=""):(t=e.substring(0,n),i=e.substring(n+1));let s=this._children.get(t);return void 0!==s?s.match(i):this._mainRule}insert(e,t,i,n){let s,o;if(""===e)return void this._mainRule.acceptOverwrite(t,i,n);let r=e.indexOf(".");-1===r?(s=e,o=""):(s=e.substring(0,r),o=e.substring(r+1));let a=this._children.get(s);void 0===a&&(a=new f(this._mainRule.clone()),this._children.set(s,a)),a.insert(o,t,i,n)}}var _=i(43537),v=i(77715);let b={base:"vs",inherit:!1,rules:[{token:"",foreground:"000000",background:"fffffe"},{token:"invalid",foreground:"cd3131"},{token:"emphasis",fontStyle:"italic"},{token:"strong",fontStyle:"bold"},{token:"variable",foreground:"001188"},{token:"variable.predefined",foreground:"4864AA"},{token:"constant",foreground:"dd0000"},{token:"comment",foreground:"008000"},{token:"number",foreground:"098658"},{token:"number.hex",foreground:"3030c0"},{token:"regexp",foreground:"800000"},{token:"annotation",foreground:"808080"},{token:"type",foreground:"008080"},{token:"delimiter",foreground:"000000"},{token:"delimiter.html",foreground:"383838"},{token:"delimiter.xml",foreground:"0000FF"},{token:"tag",foreground:"800000"},{token:"tag.id.pug",foreground:"4F76AC"},{token:"tag.class.pug",foreground:"4F76AC"},{token:"meta.scss",foreground:"800000"},{token:"metatag",foreground:"e00000"},{token:"metatag.content.html",foreground:"FF0000"},{token:"metatag.html",foreground:"808080"},{token:"metatag.xml",foreground:"808080"},{token:"metatag.php",fontStyle:"bold"},{token:"key",foreground:"863B00"},{token:"string.key.json",foreground:"A31515"},{token:"string.value.json",foreground:"0451A5"},{token:"attribute.name",foreground:"FF0000"},{token:"attribute.value",foreground:"0451A5"},{token:"attribute.value.number",foreground:"098658"},{token:"attribute.value.unit",foreground:"098658"},{token:"attribute.value.html",foreground:"0000FF"},{token:"attribute.value.xml",foreground:"0000FF"},{token:"string",foreground:"A31515"},{token:"string.html",foreground:"0000FF"},{token:"string.sql",foreground:"FF0000"},{token:"string.yaml",foreground:"0451A5"},{token:"keyword",foreground:"0000FF"},{token:"keyword.json",foreground:"0451A5"},{token:"keyword.flow",foreground:"AF00DB"},{token:"keyword.flow.scss",foreground:"0000FF"},{token:"operator.scss",foreground:"666666"},{token:"operator.sql",foreground:"778899"},{token:"operator.swift",foreground:"666666"},{token:"predefined.sql",foreground:"C700C7"}],colors:{[v.YtV]:"#FFFFFE",[v.By2]:"#000000",[v.tan]:"#E5EBF1",[_.vV]:"#D3D3D3",[_.H0]:"#939393",[v.QwA]:"#ADD6FF4D"}},C={base:"vs-dark",inherit:!1,rules:[{token:"",foreground:"D4D4D4",background:"1E1E1E"},{token:"invalid",foreground:"f44747"},{token:"emphasis",fontStyle:"italic"},{token:"strong",fontStyle:"bold"},{token:"variable",foreground:"74B0DF"},{token:"variable.predefined",foreground:"4864AA"},{token:"variable.parameter",foreground:"9CDCFE"},{token:"constant",foreground:"569CD6"},{token:"comment",foreground:"608B4E"},{token:"number",foreground:"B5CEA8"},{token:"number.hex",foreground:"5BB498"},{token:"regexp",foreground:"B46695"},{token:"annotation",foreground:"cc6666"},{token:"type",foreground:"3DC9B0"},{token:"delimiter",foreground:"DCDCDC"},{token:"delimiter.html",foreground:"808080"},{token:"delimiter.xml",foreground:"808080"},{token:"tag",foreground:"569CD6"},{token:"tag.id.pug",foreground:"4F76AC"},{token:"tag.class.pug",foreground:"4F76AC"},{token:"meta.scss",foreground:"A79873"},{token:"meta.tag",foreground:"CE9178"},{token:"metatag",foreground:"DD6A6F"},{token:"metatag.content.html",foreground:"9CDCFE"},{token:"metatag.html",foreground:"569CD6"},{token:"metatag.xml",foreground:"569CD6"},{token:"metatag.php",fontStyle:"bold"},{token:"key",foreground:"9CDCFE"},{token:"string.key.json",foreground:"9CDCFE"},{token:"string.value.json",foreground:"CE9178"},{token:"attribute.name",foreground:"9CDCFE"},{token:"attribute.value",foreground:"CE9178"},{token:"attribute.value.number.css",foreground:"B5CEA8"},{token:"attribute.value.unit.css",foreground:"B5CEA8"},{token:"attribute.value.hex.css",foreground:"D4D4D4"},{token:"string",foreground:"CE9178"},{token:"string.sql",foreground:"FF0000"},{token:"keyword",foreground:"569CD6"},{token:"keyword.flow",foreground:"C586C0"},{token:"keyword.json",foreground:"CE9178"},{token:"keyword.flow.scss",foreground:"569CD6"},{token:"operator.scss",foreground:"909090"},{token:"operator.sql",foreground:"778899"},{token:"operator.swift",foreground:"909090"},{token:"predefined.sql",foreground:"FF00FF"}],colors:{[v.YtV]:"#1E1E1E",[v.By2]:"#D4D4D4",[v.tan]:"#3A3D41",[_.vV]:"#404040",[_.H0]:"#707070",[v.QwA]:"#ADD6FF26"}},w={base:"hc-black",inherit:!1,rules:[{token:"",foreground:"FFFFFF",background:"000000"},{token:"invalid",foreground:"f44747"},{token:"emphasis",fontStyle:"italic"},{token:"strong",fontStyle:"bold"},{token:"variable",foreground:"1AEBFF"},{token:"variable.parameter",foreground:"9CDCFE"},{token:"constant",foreground:"569CD6"},{token:"comment",foreground:"608B4E"},{token:"number",foreground:"FFFFFF"},{token:"regexp",foreground:"C0C0C0"},{token:"annotation",foreground:"569CD6"},{token:"type",foreground:"3DC9B0"},{token:"delimiter",foreground:"FFFF00"},{token:"delimiter.html",foreground:"FFFF00"},{token:"tag",foreground:"569CD6"},{token:"tag.id.pug",foreground:"4F76AC"},{token:"tag.class.pug",foreground:"4F76AC"},{token:"meta",foreground:"D4D4D4"},{token:"meta.tag",foreground:"CE9178"},{token:"metatag",foreground:"569CD6"},{token:"metatag.content.html",foreground:"1AEBFF"},{token:"metatag.html",foreground:"569CD6"},{token:"metatag.xml",foreground:"569CD6"},{token:"metatag.php",fontStyle:"bold"},{token:"key",foreground:"9CDCFE"},{token:"string.key",foreground:"9CDCFE"},{token:"string.value",foreground:"CE9178"},{token:"attribute.name",foreground:"569CD6"},{token:"attribute.value",foreground:"3FF23F"},{token:"string",foreground:"CE9178"},{token:"string.sql",foreground:"FF0000"},{token:"keyword",foreground:"569CD6"},{token:"keyword.flow",foreground:"C586C0"},{token:"operator.sql",foreground:"778899"},{token:"operator.swift",foreground:"909090"},{token:"predefined.sql",foreground:"FF00FF"}],colors:{[v.YtV]:"#000000",[v.By2]:"#FFFFFF",[_.vV]:"#FFFFFF",[_.H0]:"#FFFFFF"}},y={base:"hc-light",inherit:!1,rules:[{token:"",foreground:"292929",background:"FFFFFF"},{token:"invalid",foreground:"B5200D"},{token:"emphasis",fontStyle:"italic"},{token:"strong",fontStyle:"bold"},{token:"variable",foreground:"264F70"},{token:"variable.predefined",foreground:"4864AA"},{token:"constant",foreground:"dd0000"},{token:"comment",foreground:"008000"},{token:"number",foreground:"098658"},{token:"number.hex",foreground:"3030c0"},{token:"regexp",foreground:"800000"},{token:"annotation",foreground:"808080"},{token:"type",foreground:"008080"},{token:"delimiter",foreground:"000000"},{token:"delimiter.html",foreground:"383838"},{token:"tag",foreground:"800000"},{token:"tag.id.pug",foreground:"4F76AC"},{token:"tag.class.pug",foreground:"4F76AC"},{token:"meta.scss",foreground:"800000"},{token:"metatag",foreground:"e00000"},{token:"metatag.content.html",foreground:"B5200D"},{token:"metatag.html",foreground:"808080"},{token:"metatag.xml",foreground:"808080"},{token:"metatag.php",fontStyle:"bold"},{token:"key",foreground:"863B00"},{token:"string.key.json",foreground:"A31515"},{token:"string.value.json",foreground:"0451A5"},{token:"attribute.name",foreground:"264F78"},{token:"attribute.value",foreground:"0451A5"},{token:"string",foreground:"A31515"},{token:"string.sql",foreground:"B5200D"},{token:"keyword",foreground:"0000FF"},{token:"keyword.flow",foreground:"AF00DB"},{token:"operator.sql",foreground:"778899"},{token:"operator.swift",foreground:"666666"},{token:"predefined.sql",foreground:"C700C7"}],colors:{[v.YtV]:"#FFFFFF",[v.By2]:"#292929",[_.vV]:"#292929",[_.H0]:"#292929"}};var S=i(88235),k=i(88298),x=i(82102),L=i(40023),D=i(98437),I=i(27281),N=i(22212);class E{getIcon(e){let t=(0,N.HT)(),i=e.defaults;for(;I.L.isThemeIcon(i);){let e=t.getIcon(i.id);if(!e)return;i=e.defaults}return i}}var M=i(60393);let T="vs",R="vs-dark",O="hc-black",P="hc-light",A=S.O.as(v.FdG.ColorContribution),F=S.O.as(k.Fd.ThemingContribution);class B{constructor(e,t){this.semanticHighlighting=!1,this.themeData=t;let i=t.base;e.length>0?(W(e)?this.id=e:this.id=i+" "+e,this.themeName=e):(this.id=i,this.themeName=i),this.colors=null,this.defaultColors=Object.create(null),this._tokenTheme=null}get base(){return this.themeData.base}notifyBaseUpdated(){this.themeData.inherit&&(this.colors=null,this._tokenTheme=null)}getColors(){if(!this.colors){let e=new Map;for(let t in this.themeData.colors)e.set(t,r.Q1.fromHex(this.themeData.colors[t]));if(this.themeData.inherit){let t=H(this.themeData.base);for(let i in t.colors)e.has(i)||e.set(i,r.Q1.fromHex(t.colors[i]))}this.colors=e}return this.colors}getColor(e,t){let i=this.getColors().get(e);return i||(!1!==t?this.getDefault(e):void 0)}getDefault(e){let t=this.defaultColors[e];return t||(t=A.resolveDefaultColor(e,this),this.defaultColors[e]=t),t}defines(e){return this.getColors().has(e)}get type(){switch(this.base){case T:return L.zM.LIGHT;case O:return L.zM.HIGH_CONTRAST_DARK;case P:return L.zM.HIGH_CONTRAST_LIGHT;default:return L.zM.DARK}}get tokenTheme(){if(!this._tokenTheme){let e=[],t=[];if(this.themeData.inherit){let i=H(this.themeData.base);e=i.rules,i.encodedTokensColors&&(t=i.encodedTokensColors)}let i=this.themeData.colors["editor.foreground"],n=this.themeData.colors["editor.background"];if(i||n){let t={token:""};i&&(t.foreground=i),n&&(t.background=n),e.push(t)}e=e.concat(this.themeData.rules),this.themeData.encodedTokensColors&&(t=this.themeData.encodedTokensColors),this._tokenTheme=g.createFromRawTokenTheme(e,t)}return this._tokenTheme}getTokenStyleMetadata(e,t,i){let n=this.tokenTheme._match([e].concat(t).join(".")).metadata,s=h.x.getForeground(n),o=h.x.getFontStyle(n);return{foreground:s,italic:!!(1&o),bold:!!(2&o),underline:!!(4&o),strikethrough:!!(8&o)}}get tokenColorMap(){return[]}}function W(e){return e===T||e===R||e===O||e===P}function H(e){switch(e){case T:return b;case R:return C;case O:return w;case P:return y}}function V(e){let t=H(e);return new B(e,t)}class z extends x.jG{constructor(){super(),this._onColorThemeChange=this._register(new a.vl),this.onDidColorThemeChange=this._onColorThemeChange.event,this._onProductIconThemeChange=this._register(new a.vl),this.onDidProductIconThemeChange=this._onProductIconThemeChange.event,this._environment=Object.create(null),this._builtInProductIconTheme=new E,this._autoDetectHighContrast=!0,this._knownThemes=new Map,this._knownThemes.set(T,V(T)),this._knownThemes.set(R,V(R)),this._knownThemes.set(O,V(O)),this._knownThemes.set(P,V(P));let e=this._register(function(e){let t=new x.Cm,i=t.add(new a.vl),n=(0,N.HT)();return t.add(n.onDidChange(()=>i.fire())),e&&t.add(e.onDidProductIconThemeChange(()=>i.fire())),{dispose:()=>t.dispose(),onDidChange:i.event,getCSS(){let t=e?e.getProductIconTheme():new E,i={},s=new D.M$,o=new D.M$;for(let e of n.getIcons()){let n=t.getIcon(e);if(!n)continue;let r=n.font,a=D.mG`--vscode-icon-${D.s7(e.id)}-font-family`,l=D.mG`--vscode-icon-${D.s7(e.id)}-content`;r?(i[r.id]=r.definition,o.push(D.mG`${a}: ${D.r$(r.id)};`,D.mG`${l}: ${D.r$(n.fontCharacter)};`),s.push(D.mG`.codicon-${D.s7(e.id)}:before { content: ${D.r$(n.fontCharacter)}; font-family: ${D.r$(r.id)}; }`)):(o.push(D.mG`${l}: ${D.r$(n.fontCharacter)}; ${a}: 'codicon';`),s.push(D.mG`.codicon-${D.s7(e.id)}:before { content: ${D.r$(n.fontCharacter)}; }`))}for(let e in i){let t=i[e],n=t.weight?D.mG`font-weight: ${D.yj(t.weight)};`:D.mG``,o=t.style?D.mG`font-style: ${D.yj(t.style)};`:D.mG``,r=new D.M$;for(let e of t.src)r.push(D.mG`${D.Tf(e.location)} format(${D.r$(e.format)})`);s.push(D.mG`@font-face { src: ${r.join(", ")}; font-family: ${D.r$(e)};${n}${o} font-display: block; }`)}return s.push(D.mG`:root { ${o.join(" ")} }`),s.join("\n")}}}(this));this._codiconCSS=e.getCSS(),this._themeCSS="",this._allCSS=`${this._codiconCSS}
|
|
623
623
|
${this._themeCSS}`,this._globalStyleElement=null,this._styleElements=[],this._colorMapOverride=null,this.setTheme(T),this._onOSSchemeChanged(),this._register(e.onDidChange(()=>{this._codiconCSS=e.getCSS(),this._updateCSS()})),(0,o.Dy)(M.G,"(forced-colors: active)",()=>{this._onOSSchemeChanged()})}registerEditorContainer(e){return n.Cl(e)?this._registerShadowDomContainer(e):this._registerRegularEditorContainer()}_registerRegularEditorContainer(){return this._globalStyleElement||(this._globalStyleElement=s.li(void 0,e=>{e.className="monaco-colors",e.textContent=this._allCSS}),this._styleElements.push(this._globalStyleElement)),x.jG.None}_registerShadowDomContainer(e){let t=s.li(e,e=>{e.className="monaco-colors",e.textContent=this._allCSS});return this._styleElements.push(t),{dispose:()=>{for(let e=0;e<this._styleElements.length;e++)if(this._styleElements[e]===t)return void this._styleElements.splice(e,1)}}}defineTheme(e,t){if(!/^[a-z0-9\-]+$/i.test(e))throw Error("Illegal theme name!");if(!W(t.base)&&!W(e))throw Error("Illegal theme base!");this._knownThemes.set(e,new B(e,t)),W(e)&&this._knownThemes.forEach(t=>{t.base===e&&t.notifyBaseUpdated()}),this._theme.themeName===e&&this.setTheme(e)}getColorTheme(){return this._theme}setColorMapOverride(e){this._colorMapOverride=e,this._updateThemeOrColorMap()}setTheme(e){let t;t=this._knownThemes.has(e)?this._knownThemes.get(e):this._knownThemes.get(T),this._updateActualTheme(t)}_updateActualTheme(e){e&&this._theme!==e&&(this._theme=e,this._updateThemeOrColorMap())}_onOSSchemeChanged(){if(this._autoDetectHighContrast){let e=M.G.matchMedia("(forced-colors: active)").matches;if(e!==(0,L.Bb)(this._theme.type)){let t;t=(0,L.HD)(this._theme.type)?e?O:R:e?P:T,this._updateActualTheme(this._knownThemes.get(t))}}}setAutoDetectHighContrast(e){this._autoDetectHighContrast=e,this._onOSSchemeChanged()}_updateThemeOrColorMap(){let e=[],t={},i={addRule:i=>{t[i]||(e.push(i),t[i]=!0)}};F.getThemingParticipants().forEach(e=>e(this._theme,i,this._environment));let n=[];for(let e of A.getColors()){let t=this._theme.getColor(e.id,!0);t&&n.push(`${(0,v.Bbc)(e.id)}: ${t.toString()};`)}i.addRule(`.monaco-editor, .monaco-diff-editor, .monaco-component { ${n.join("\n")} }`);let s=this._colorMapOverride||this._theme.tokenTheme.getColorMap();i.addRule(function(e){let t=[];for(let i=1,n=e.length;i<n;i++){let n=e[i];t[i]=`.mtk${i} { color: ${n}; }`}return t.push(".mtki { font-style: italic; }"),t.push(".mtkb { font-weight: bold; }"),t.push(".mtku { text-decoration: underline; text-underline-position: under; }"),t.push(".mtks { text-decoration: line-through; }"),t.push(".mtks.mtku { text-decoration: underline line-through; text-underline-position: under; }"),t.join("\n")}(s)),i.addRule(".monaco-editor, .monaco-diff-editor, .monaco-component { forced-color-adjust: none; }"),this._themeCSS=e.join("\n"),this._updateCSS(),l.dG.setColorMap(s),this._onColorThemeChange.fire(this._theme)}_updateCSS(){this._allCSS=`${this._codiconCSS}
|
|
624
|
-
${this._themeCSS}`,this._styleElements.forEach(e=>e.textContent=this._allCSS)}getFileIconTheme(){return{hasFileIcons:!1,hasFolderIcons:!1,hidesExplorerArrows:!1}}getProductIconTheme(){return this._builtInProductIconTheme}}},58891:(e,t,i)=>{"use strict";i.d(t,{DO:()=>X,KP:()=>n,RD:()=>o,cp:()=>P,eR:()=>B,vD:()=>s,w0:()=>T});var n,s,o,r,a=i(87899),l=i(92684),h=i(98437),d=(i(88723),i(98200)),c=(i(44987),i(87311),i(14664)),u=i(77165),g=i(67404),p=i(77897),m=i(14816),f=i(26637),_=(i(39205),i(5488)),v=i(45262),b=i(55354),C=i(27281),w=i(47108),y=i(17354),S=i(46287),k=i(82102),x=i(64124);i(47491);var L=i(15957),D=(i(85350),i(76946)),I=i(91523);class N extends u.ur{constructor(e){super(e.elements.map(e=>e.element)),this.data=e}}function E(e){return e instanceof u.ur?new N(e):e}class M{constructor(e,t){this.modelProvider=e,this.dnd=t,this.autoExpandDisposable=k.jG.None,this.disposables=new k.Cm}getDragURI(e){return this.dnd.getDragURI(e.element)}getDragLabel(e,t){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(e.map(e=>e.element),t)}onDragStart(e,t){this.dnd.onDragStart?.(E(e),t)}onDragOver(e,t,i,n,s,o=!0){let r=this.dnd.onDragOver(E(e),t&&t.element,i,n,s),a=this.autoExpandNode!==t;if(a&&(this.autoExpandDisposable.dispose(),this.autoExpandNode=t),void 0===t)return r;if(a&&"boolean"!=typeof r&&r.autoExpand&&(this.autoExpandDisposable=(0,v.EQ)(()=>{let e=this.modelProvider(),i=e.getNodeLocation(t);e.isCollapsed(i)&&e.setCollapsed(i,!1),this.autoExpandNode=void 0},500,this.disposables)),"boolean"==typeof r||!r.accept||void 0===r.bubble||r.feedback)return o?r:{accept:"boolean"==typeof r?r:r.accept,effect:"boolean"==typeof r?void 0:r.effect,feedback:[i]};if(1===r.bubble){let i=this.modelProvider(),o=i.getNodeLocation(t),r=i.getParentNodeLocation(o),a=i.getNode(r),l=r&&i.getListIndex(r);return this.onDragOver(e,a,l,n,s,!1)}let l=this.modelProvider(),h=l.getNodeLocation(t),d=l.getListIndex(h),c=l.getListRenderCount(h);return{...r,feedback:(0,_.y1)(d,d+c)}}drop(e,t,i,n,s){this.autoExpandDisposable.dispose(),this.autoExpandNode=void 0,this.dnd.drop(E(e),t&&t.element,i,n,s)}onDragEnd(e){this.dnd.onDragEnd?.(e)}dispose(){this.disposables.dispose(),this.dnd.dispose()}}class T{constructor(e){this.delegate=e}getHeight(e){return this.delegate.getHeight(e.element)}getTemplateId(e){return this.delegate.getTemplateId(e.element)}hasDynamicHeight(e){return!!this.delegate.hasDynamicHeight&&this.delegate.hasDynamicHeight(e.element)}setDynamicHeight(e,t){this.delegate.setDynamicHeight?.(e.element,t)}}!function(e){e.None="none",e.OnHover="onHover",e.Always="always"}(n||(n={}));class R{get elements(){return this._elements}constructor(e,t=[]){this._elements=t,this.disposables=new k.Cm,this.onDidChange=y.Jh.forEach(e,e=>this._elements=e,this.disposables)}dispose(){this.disposables.dispose()}}class O{static{this.DefaultIndent=8}constructor(e,t,i,n,s,o={}){this.renderer=e,this.model=t,this.activeNodes=n,this.renderedIndentGuides=s,this.renderedElements=new Map,this.renderedNodes=new Map,this.indent=O.DefaultIndent,this.hideTwistiesOfChildlessElements=!1,this.shouldRenderIndentGuides=!1,this.activeIndentNodes=new Set,this.indentGuidesDisposable=k.jG.None,this.disposables=new k.Cm,this.templateId=e.templateId,this.updateOptions(o),y.Jh.map(i,e=>e.node)(this.onDidChangeNodeTwistieState,this,this.disposables),e.onDidChangeTwistieState?.(this.onDidChangeTwistieState,this,this.disposables)}updateOptions(e={}){if(void 0!==e.indent){let t=(0,x.qE)(e.indent,0,40);if(t!==this.indent)for(let[e,i]of(this.indent=t,this.renderedNodes))i.indentSize=O.DefaultIndent+(e.depth-1)*this.indent,this.renderTreeElement(e,i)}if(void 0!==e.renderIndentGuides){let t=e.renderIndentGuides!==n.None;if(t!==this.shouldRenderIndentGuides){for(let[e,i]of(this.shouldRenderIndentGuides=t,this.renderedNodes))this._renderIndentGuides(e,i);if(this.indentGuidesDisposable.dispose(),t){let e=new k.Cm;this.activeNodes.onDidChange(this._onDidChangeActiveNodes,this,e),this.indentGuidesDisposable=e,this._onDidChangeActiveNodes(this.activeNodes.elements)}}}void 0!==e.hideTwistiesOfChildlessElements&&(this.hideTwistiesOfChildlessElements=e.hideTwistiesOfChildlessElements)}renderTemplate(e){let t=(0,a.BC)(e,(0,a.$)(".monaco-tl-row")),i=(0,a.BC)(t,(0,a.$)(".monaco-tl-indent")),n=(0,a.BC)(t,(0,a.$)(".monaco-tl-twistie")),s=(0,a.BC)(t,(0,a.$)(".monaco-tl-contents")),o=this.renderer.renderTemplate(s);return{container:e,indent:i,twistie:n,indentGuidesDisposable:k.jG.None,indentSize:0,templateData:o}}renderElement(e,t,i,n){i.indentSize=O.DefaultIndent+(e.depth-1)*this.indent,this.renderedNodes.set(e,i),this.renderedElements.set(e.element,e),this.renderTreeElement(e,i),this.renderer.renderElement(e,t,i.templateData,{...n,indent:i.indentSize})}disposeElement(e,t,i,n){i.indentGuidesDisposable.dispose(),this.renderer.disposeElement?.(e,t,i.templateData,{...n,indent:i.indentSize}),"number"==typeof n?.height&&(this.renderedNodes.delete(e),this.renderedElements.delete(e.element))}disposeTemplate(e){this.renderer.disposeTemplate(e.templateData)}onDidChangeTwistieState(e){let t=this.renderedElements.get(e);t&&this.onDidChangeNodeTwistieState(t)}onDidChangeNodeTwistieState(e){let t=this.renderedNodes.get(e);t&&(this._onDidChangeActiveNodes(this.activeNodes.elements),this.renderTreeElement(e,t))}renderTreeElement(e,t){t.twistie.style.paddingLeft=`${t.indentSize}px`,t.indent.style.width=`${t.indentSize+this.indent-16}px`,e.collapsible?t.container.setAttribute("aria-expanded",String(!e.collapsed)):t.container.removeAttribute("aria-expanded"),t.twistie.classList.remove(...C.L.asClassNameArray(b.W.treeItemExpanded));let i=!1;this.renderer.renderTwistie&&(i=this.renderer.renderTwistie(e.element,t.twistie)),e.collapsible&&(!this.hideTwistiesOfChildlessElements||e.visibleChildrenCount>0)?(i||t.twistie.classList.add(...C.L.asClassNameArray(b.W.treeItemExpanded)),t.twistie.classList.add("collapsible"),t.twistie.classList.toggle("collapsed",e.collapsed)):t.twistie.classList.remove("collapsible","collapsed"),this._renderIndentGuides(e,t)}_renderIndentGuides(e,t){if((0,a.w_)(t.indent),t.indentGuidesDisposable.dispose(),!this.shouldRenderIndentGuides)return;let i=new k.Cm;for(;;){let n=this.model.getNodeLocation(e),s=this.model.getParentNodeLocation(n);if(!s)break;let o=this.model.getNode(s),r=(0,a.$)(".indent-guide",{style:`width: ${this.indent}px`});this.activeIndentNodes.has(o)&&r.classList.add("active"),0===t.indent.childElementCount?t.indent.appendChild(r):t.indent.insertBefore(r,t.indent.firstElementChild),this.renderedIndentGuides.add(o,r),i.add((0,k.s)(()=>this.renderedIndentGuides.delete(o,r))),e=o}t.indentGuidesDisposable=i}_onDidChangeActiveNodes(e){if(!this.shouldRenderIndentGuides)return;let t=new Set;e.forEach(e=>{let i=this.model.getNodeLocation(e);try{let n=this.model.getParentNodeLocation(i);e.collapsible&&e.children.length>0&&!e.collapsed?t.add(e):n&&t.add(this.model.getNode(n))}catch{}}),this.activeIndentNodes.forEach(e=>{t.has(e)||this.renderedIndentGuides.forEach(e,e=>e.classList.remove("active"))}),t.forEach(e=>{this.activeIndentNodes.has(e)||this.renderedIndentGuides.forEach(e,e=>e.classList.add("active"))}),this.activeIndentNodes=t}dispose(){this.renderedNodes.clear(),this.renderedElements.clear(),this.indentGuidesDisposable.dispose(),(0,k.AS)(this.disposables)}}class P{get totalCount(){return this._totalCount}get matchCount(){return this._matchCount}set findMatchType(e){this._findMatchType=e}get findMatchType(){return this._findMatchType}set findMode(e){this._findMode=e}get findMode(){return this._findMode}constructor(e,t,i){this._keyboardNavigationLabelProvider=e,this._filter=t,this._defaultFindVisibility=i,this._totalCount=0,this._matchCount=0,this._findMatchType=o.Fuzzy,this._findMode=s.Highlight,this._pattern="",this._lowercasePattern="",this.disposables=new k.Cm}filter(e,t){let i=1;if(this._filter){let n=this._filter.filter(e,t);if(0===(i="boolean"==typeof n?+!!n:(0,m.iZ)(n)?(0,m.Mn)(n.visibility):n))return!1}if(this._totalCount++,!this._pattern)return this._matchCount++,{data:S.ne.Default,visibility:i};let n=this._keyboardNavigationLabelProvider.getKeyboardNavigationLabel(e),r=Array.isArray(n)?n:[n];for(let e of r){let t,n=e&&e.toString();if(void 0===n)return{data:S.ne.Default,visibility:i};if(t=this._findMatchType===o.Contiguous?function(e,t){let i,n=t.toLowerCase().indexOf(e);if(n>-1){i=[Number.MAX_SAFE_INTEGER,0];for(let t=e.length;t>0;t--)i.push(n+t-1)}return i}(this._lowercasePattern,n.toLowerCase()):(0,S.dt)(this._pattern,this._lowercasePattern,0,n,n.toLowerCase(),0,{firstMatchCanBeWeak:!0,boostFullMatch:!0}))return this._matchCount++,1===r.length?{data:t,visibility:i}:{data:{label:n,score:t},visibility:i}}return this._findMode!==s.Filter?{data:S.ne.Default,visibility:i}:"number"==typeof this._defaultFindVisibility?this._defaultFindVisibility:this._defaultFindVisibility?this._defaultFindVisibility(e):2}reset(){this._totalCount=0,this._matchCount=0}dispose(){(0,k.AS)(this.disposables)}}p.lM;class A{constructor(e){this.stateMap=new Map(e.map(e=>[e.id,{...e}]))}get(e){let t=this.stateMap.get(e);if(void 0===t)throw Error(`No state found for toggle id ${e}`);return t.isChecked}set(e,t){let i=this.stateMap.get(e);if(void 0===i)throw Error(`No state found for toggle id ${e}`);return i.isChecked!==t&&(i.isChecked=t,!0)}}c.x8,p.FH,!function(e){e[e.Highlight=0]="Highlight",e[e.Filter=1]="Filter"}(s||(s={})),function(e){e[e.Fuzzy=0]="Fuzzy",e[e.Contiguous=1]="Contiguous"}(o||(o={})),k.jG,function(e){e.Mode="mode",e.MatchType="matchType"}(r||(r={}));class F{get pattern(){return this._pattern}get placeholder(){return this._placeholder}set placeholder(e){this._placeholder=e,this.widget?.setPlaceHolder(e)}constructor(e,t,i,n={}){this.tree=e,this.filter=t,this.contextViewProvider=i,this.options=n,this._pattern="",this._onDidChangePattern=new y.vl,this._onDidChangeOpenState=new y.vl,this.onDidChangeOpenState=this._onDidChangeOpenState.event,this.enabledDisposables=new k.Cm,this.disposables=new k.Cm,this.toggles=new A(n.toggles??[]),this._placeholder=n.placeholder??(0,L.kg)(20,"Type to search")}isOpened(){return!!this.widget}updateToggleState(e,t){this.toggles.set(e,t),this.widget?.setToggleState(e,t)}renderMessage(e,t){e?this.tree.options.showNotFoundMessage??!0?this.widget?.showMessage({type:2,content:t??(0,L.kg)(21,"No results found.")}):this.widget?.showMessage({type:2}):this.widget?.clearMessage()}alertResults(e){e?(0,I.xE)((0,L.kg)(23,"{0} results",e)):(0,I.xE)((0,L.kg)(22,"No results"))}dispose(){this._history=void 0,this._onDidChangePattern.dispose(),this.enabledDisposables.dispose(),this.disposables.dispose()}}class B extends F{get mode(){return this.toggles.get(r.Mode)?s.Filter:s.Highlight}set mode(e){if(e===this.mode)return;let t=e===s.Filter;this.updateToggleState(r.Mode,t),this.placeholder=t?(0,L.kg)(24,"Type to filter"):(0,L.kg)(25,"Type to search"),this.filter.findMode=e,this.tree.refilter(),this.render(),this._onDidChangeMode.fire(e)}get matchType(){return this.toggles.get(r.MatchType)?o.Fuzzy:o.Contiguous}set matchType(e){e!==this.matchType&&(this.updateToggleState(r.MatchType,e===o.Fuzzy),this.filter.findMatchType=e,this.tree.refilter(),this.render(),this._onDidChangeMatchType.fire(e))}constructor(e,t,i,n={}){let a=n.defaultFindMode??s.Highlight,l=n.defaultFindMatchType??o.Fuzzy,h=[{id:r.Mode,icon:b.W.listFilter,title:(0,L.kg)(26,"Filter"),isChecked:a===s.Filter},{id:r.MatchType,icon:b.W.searchFuzzy,title:(0,L.kg)(27,"Fuzzy Match"),isChecked:l===o.Fuzzy}];t.findMatchType=l,t.findMode=a,super(e,t,i,{...n,toggles:h}),this.filter=t,this._onDidChangeMode=new y.vl,this.onDidChangeMode=this._onDidChangeMode.event,this._onDidChangeMatchType=new y.vl,this.onDidChangeMatchType=this._onDidChangeMatchType.event,this.disposables.add(this.tree.onDidChangeModel(()=>{this.isOpened()&&(0!==this.pattern.length&&this.tree.refilter(),this.render())})),this.disposables.add(this.tree.onWillRefilter(()=>this.filter.reset()))}updateOptions(e={}){void 0!==e.defaultFindMode&&(this.mode=e.defaultFindMode),void 0!==e.defaultFindMatchType&&(this.matchType=e.defaultFindMatchType)}shouldAllowFocus(e){return!this.isOpened()||!this.pattern||this.filter.totalCount>0&&this.filter.matchCount<=1||!S.ne.isDefault(e.filterData)}render(){let e=0===this.filter.matchCount&&this.filter.totalCount>0&&this.pattern.length>0;this.renderMessage(e),this.pattern.length&&this.alertResults(this.filter.matchCount)}}function W(e,t){return e.position===t.position&&H(e,t)}function H(e,t){return e.node.element===t.node.element&&e.startIndex===t.startIndex&&e.height===t.height&&e.endIndex===t.endIndex}class V{constructor(e=[]){this.stickyNodes=e}get count(){return this.stickyNodes.length}equal(e){return(0,_.aI)(this.stickyNodes,e.stickyNodes,W)}contains(e){return this.stickyNodes.some(t=>t.node.element===e.element)}lastNodePartiallyVisible(){if(0===this.count)return!1;let e=this.stickyNodes[this.count-1];if(1===this.count)return 0!==e.position;let t=this.stickyNodes[this.count-2];return t.position+t.height!==e.position}animationStateChanged(e){if(!(0,_.aI)(this.stickyNodes,e.stickyNodes,H)||0===this.count)return!1;let t=this.stickyNodes[this.count-1],i=e.stickyNodes[e.count-1];return t.position!==i.position}}class z{constrainStickyScrollNodes(e,t,i){for(let n=0;n<e.length;n++){let s=e[n];if(s.position+s.height>i||n>=t)return e.slice(0,n)}return e}}class U extends k.jG{constructor(e,t,i,n,s,o={}){super(),this.tree=e,this.model=t,this.view=i,this.treeDelegate=s,this.maxWidgetViewRatio=.4;let r=this.validateStickySettings(o);this.stickyScrollMaxItemCount=r.stickyScrollMaxItemCount,this.stickyScrollDelegate=o.stickyScrollDelegate??new z,this.paddingTop=o.paddingTop??0,this._widget=this._register(new j(i.getScrollableElement(),i,e,n,s,o.accessibilityProvider)),this.onDidChangeHasFocus=this._widget.onDidChangeHasFocus,this.onContextMenu=this._widget.onContextMenu,this._register(i.onDidScroll(()=>this.update())),this._register(i.onDidChangeContentHeight(()=>this.update())),this._register(e.onDidChangeCollapseState(()=>this.update())),this._register(t.onDidSpliceRenderedNodes(e=>{let t=this._widget.state;if(t){if(e.deleteCount>0&&t.stickyNodes.some(e=>!this.model.has(this.model.getNodeLocation(e.node))))return void this.update();t.stickyNodes.some(i=>{let n=this.model.getListIndex(this.model.getNodeLocation(i.node));return n>=e.start&&n<e.start+e.deleteCount&&t.contains(i.node)})&&this._widget.rerender()}})),this.update()}get height(){return this._widget.height}getNodeAtHeight(e){let t;if(!((t=0===e?this.view.firstVisibleIndex:this.view.indexAt(e+this.view.scrollTop))<0)&&!(t>=this.view.length))return this.view.element(t)}update(){let e=this.getNodeAtHeight(this.paddingTop);if(!e||this.tree.scrollTop<=this.paddingTop)return void this._widget.setState(void 0);let t=this.findStickyState(e);this._widget.setState(t)}findStickyState(e){let t=[],i=e,n=0,s=this.getNextStickyNode(i,void 0,n);for(;s&&(t.push(s),n+=s.height,!(t.length<=this.stickyScrollMaxItemCount)||(i=this.getNextVisibleNode(s)));)s=this.getNextStickyNode(i,s.node,n);let o=this.constrainStickyNodes(t);return o.length?new V(o):void 0}getNextVisibleNode(e){return this.getNodeAtHeight(e.position+e.height)}getNextStickyNode(e,t,i){let n=this.getAncestorUnderPrevious(e,t);if(n){if(n===e&&(!this.nodeIsUncollapsedParent(e)||this.nodeTopAlignsWithStickyNodesBottom(e,i)))return;return this.createStickyScrollNode(n,i)}}nodeTopAlignsWithStickyNodesBottom(e,t){let i=this.getNodeIndex(e),n=this.view.getElementTop(i);return this.view.scrollTop===n-t}createStickyScrollNode(e,t){let i=this.treeDelegate.getHeight(e),{startIndex:n,endIndex:s}=this.getNodeRange(e);return{node:e,position:this.calculateStickyNodePosition(s,t,i),height:i,startIndex:n,endIndex:s}}getAncestorUnderPrevious(e,t){let i=e,n=this.getParentNode(i);for(;n;){if(n===t)return i;i=n,n=this.getParentNode(i)}if(void 0===t)return i}calculateStickyNodePosition(e,t,i){let n=this.view.getRelativeTop(e);if(null===n&&this.view.firstVisibleIndex===e&&e+1<this.view.length){let t=this.treeDelegate.getHeight(this.view.element(e)),i=this.view.getRelativeTop(e+1);n=i?i-t/this.view.renderHeight:null}if(null===n)return t;let s=this.view.element(e),o=this.treeDelegate.getHeight(s),r=n*this.view.renderHeight+o;return t+i>r&&t<=r?r-i:t}constrainStickyNodes(e){if(0===e.length)return[];let t=this.view.renderHeight*this.maxWidgetViewRatio,i=e[e.length-1];if(e.length<=this.stickyScrollMaxItemCount&&i.position+i.height<=t)return e;let n=this.stickyScrollDelegate.constrainStickyScrollNodes(e,this.stickyScrollMaxItemCount,t);if(!n.length)return[];let s=n[n.length-1];if(n.length>this.stickyScrollMaxItemCount||s.position+s.height>t)throw Error("stickyScrollDelegate violates constraints");return n}getParentNode(e){let t=this.model.getNodeLocation(e),i=this.model.getParentNodeLocation(t);return i?this.model.getNode(i):void 0}nodeIsUncollapsedParent(e){let t=this.model.getNodeLocation(e);return this.model.getListRenderCount(t)>1}getNodeIndex(e){let t=this.model.getNodeLocation(e);return this.model.getListIndex(t)}getNodeRange(e){let t=this.model.getNodeLocation(e),i=this.model.getListIndex(t);if(i<0)throw Error("Node not found in tree");return{startIndex:i,endIndex:i+this.model.getListRenderCount(t)-1}}nodePositionTopBelowWidget(e){let t=[],i=this.getParentNode(e);for(;i;)t.push(i),i=this.getParentNode(i);let n=0;for(let e=0;e<t.length&&e<this.stickyScrollMaxItemCount;e++)n+=this.treeDelegate.getHeight(t[e]);return n}domFocus(){this._widget.domFocus()}focusedLast(){return this._widget.focusedLast()}updateOptions(e={}){if(void 0!==e.paddingTop&&(this.paddingTop=e.paddingTop),void 0!==e.stickyScrollMaxItemCount){let t=this.validateStickySettings(e);this.stickyScrollMaxItemCount!==t.stickyScrollMaxItemCount&&(this.stickyScrollMaxItemCount=t.stickyScrollMaxItemCount,this.update())}}validateStickySettings(e){let t=7;return"number"==typeof e.stickyScrollMaxItemCount&&(t=Math.max(e.stickyScrollMaxItemCount,1)),{stickyScrollMaxItemCount:t}}}class j{get state(){return this._previousState}constructor(e,t,i,n,s,o){this.view=t,this.tree=i,this.treeRenderers=n,this.treeDelegate=s,this.accessibilityProvider=o,this._previousElements=[],this._previousStateDisposables=new k.Cm,this._rootDomNode=(0,a.$)(".monaco-tree-sticky-container.empty"),e.appendChild(this._rootDomNode);let r=(0,a.$)(".monaco-tree-sticky-container-shadow");this._rootDomNode.appendChild(r),this.stickyScrollFocus=new $(this._rootDomNode,t),this.onDidChangeHasFocus=this.stickyScrollFocus.onDidChangeHasFocus,this.onContextMenu=this.stickyScrollFocus.onContextMenu}get height(){if(!this._previousState)return 0;let e=this._previousState.stickyNodes[this._previousState.count-1];return e.position+e.height}setState(e){let t=!!this._previousState&&this._previousState.count>0,i=!!e&&e.count>0;if(!t&&!i||t&&i&&this._previousState.equal(e))return;if(t!==i&&this.setVisible(i),!i){this._previousState=void 0,this._previousElements=[],this._previousStateDisposables.clear();return}let n=e.stickyNodes[e.count-1];this._previousState&&e.animationStateChanged(this._previousState)?this._previousElements[this._previousState.count-1].style.top=`${n.position}px`:this.renderState(e),this._previousState=e,this._rootDomNode.style.height=`${n.position+n.height}px`}renderState(e){this._previousStateDisposables.clear();let t=Array(e.count);for(let i=e.count-1;i>=0;i--){let n=e.stickyNodes[i],{element:s,disposable:o}=this.createElement(n,i,e.count);t[i]=s,this._rootDomNode.appendChild(s),this._previousStateDisposables.add(o)}this.stickyScrollFocus.updateElements(t,e),this._previousElements=t}rerender(){this._previousState&&this.renderState(this._previousState)}createElement(e,t,i){let n=e.startIndex,s=document.createElement("div");s.style.top=`${e.position}px`,!1!==this.tree.options.setRowHeight&&(s.style.height=`${e.height}px`),!1!==this.tree.options.setRowLineHeight&&(s.style.lineHeight=`${e.height}px`),s.classList.add("monaco-tree-sticky-row"),s.classList.add("monaco-list-row"),s.setAttribute("data-index",`${n}`),s.setAttribute("data-parity",n%2==0?"even":"odd"),s.setAttribute("id",this.view.getElementID(n));let o=this.setAccessibilityAttributes(s,e.node.element,t,i),r=this.treeDelegate.getTemplateId(e.node),a=this.treeRenderers.find(e=>e.templateId===r);if(!a)throw Error(`No renderer found for template id ${r}`);let l=e.node;l===this.tree.getNode(this.tree.getNodeLocation(e.node))&&(l=new Proxy(e.node,{}));let h=a.renderTemplate(s);a.renderElement(l,e.startIndex,h,{height:e.height});let d=(0,k.s)(()=>{o.dispose(),a.disposeElement(l,e.startIndex,h,{height:e.height}),a.disposeTemplate(h),s.remove()});return{element:s,disposable:d}}setAccessibilityAttributes(e,t,i,n){if(!this.accessibilityProvider)return k.jG.None;this.accessibilityProvider.getSetSize&&e.setAttribute("aria-setsize",String(this.accessibilityProvider.getSetSize(t,i,n))),this.accessibilityProvider.getPosInSet&&e.setAttribute("aria-posinset",String(this.accessibilityProvider.getPosInSet(t,i))),this.accessibilityProvider.getRole&&e.setAttribute("role",this.accessibilityProvider.getRole(t)??"treeitem");let s=this.accessibilityProvider.getAriaLabel(t),o=s&&"string"!=typeof s?s:(0,D.lk)(s),r=(0,D.fm)(t=>{let i=t.readObservable(o);i?e.setAttribute("aria-label",i):e.removeAttribute("aria-label")});"string"==typeof s||s&&e.setAttribute("aria-label",s.get());let a=this.accessibilityProvider.getAriaLevel&&this.accessibilityProvider.getAriaLevel(t);return"number"==typeof a&&e.setAttribute("aria-level",`${a}`),e.setAttribute("aria-selected",String(!1)),r}setVisible(e){this._rootDomNode.classList.toggle("empty",!e),e||this.stickyScrollFocus.updateElements([],void 0)}domFocus(){this.stickyScrollFocus.domFocus()}focusedLast(){return this.stickyScrollFocus.focusedLast()}dispose(){this.stickyScrollFocus.dispose(),this._previousStateDisposables.dispose(),this._rootDomNode.remove()}}class $ extends k.jG{get domHasFocus(){return this._domHasFocus}set domHasFocus(e){e!==this._domHasFocus&&(this._onDidChangeHasFocus.fire(e),this._domHasFocus=e)}constructor(e,t){super(),this.container=e,this.view=t,this.focusedIndex=-1,this.elements=[],this._onDidChangeHasFocus=new y.vl,this.onDidChangeHasFocus=this._onDidChangeHasFocus.event,this._onContextMenu=new y.vl,this.onContextMenu=this._onContextMenu.event,this._domHasFocus=!1,this._register((0,a.ko)(this.container,"focus",()=>this.onFocus())),this._register((0,a.ko)(this.container,"blur",()=>this.onBlur())),this._register(this.view.onDidFocus(()=>this.toggleStickyScrollFocused(!1))),this._register(this.view.onKeyDown(e=>this.onKeyDown(e))),this._register(this.view.onMouseDown(e=>this.onMouseDown(e))),this._register(this.view.onContextMenu(e=>this.handleContextMenu(e)))}handleContextMenu(e){let t=e.browserEvent.target;if(!(0,g.Es)(t)&&!(0,g.xu)(t)){this.focusedLast()&&this.view.domFocus();return}if(!(0,a.kx)(e.browserEvent)){if(!this.state)throw Error("Context menu should not be triggered when state is undefined");let t=this.state.stickyNodes.findIndex(t=>t.node.element===e.element?.element);if(-1===t)throw Error("Context menu should not be triggered when element is not in sticky scroll widget");this.container.focus(),this.setFocus(t);return}if(!this.state||this.focusedIndex<0)throw Error("Context menu key should not be triggered when focus is not in sticky scroll widget");let i=this.state.stickyNodes[this.focusedIndex].node.element,n=this.elements[this.focusedIndex];this._onContextMenu.fire({element:i,anchor:n,browserEvent:e.browserEvent,isStickyScroll:!0})}onKeyDown(e){if(this.domHasFocus&&this.state){if("ArrowUp"===e.key)this.setFocusedElement(Math.max(0,this.focusedIndex-1)),e.preventDefault(),e.stopPropagation();else if("ArrowDown"===e.key||"ArrowRight"===e.key){if(this.focusedIndex>=this.state.count-1){let e=this.state.stickyNodes[this.state.count-1].startIndex+1;this.view.domFocus(),this.view.setFocus([e]),this.scrollNodeUnderWidget(e,this.state)}else this.setFocusedElement(this.focusedIndex+1);e.preventDefault(),e.stopPropagation()}}}onMouseDown(e){let t=e.browserEvent.target;((0,g.Es)(t)||(0,g.xu)(t))&&(e.browserEvent.preventDefault(),e.browserEvent.stopPropagation())}updateElements(e,t){if(t&&0===t.count)throw Error("Sticky scroll state must be undefined when there are no sticky nodes");if(t&&t.count!==e.length)throw Error("Sticky scroll focus received illigel state");let i=this.focusedIndex;if(this.removeFocus(),this.elements=e,this.state=t,t){let e=(0,x.qE)(i,0,t.count-1);this.setFocus(e)}else this.domHasFocus&&this.view.domFocus();this.container.tabIndex=t?0:-1}setFocusedElement(e){let t=this.state;if(!t)throw Error("Cannot set focus when state is undefined");if(this.setFocus(e),!(e<t.count-1)&&t.lastNodePartiallyVisible()){let i=t.stickyNodes[e];this.scrollNodeUnderWidget(i.endIndex+1,t)}}scrollNodeUnderWidget(e,t){let i=t.stickyNodes[t.count-1],n=t.count>1?t.stickyNodes[t.count-2]:void 0,s=this.view.getElementTop(e),o=n?n.position+n.height+i.height:i.height;this.view.scrollTop=s-o}domFocus(){if(!this.state)throw Error("Cannot focus when state is undefined");this.container.focus()}focusedLast(){return!!this.state&&this.view.getHTMLElement().classList.contains("sticky-scroll-focused")}removeFocus(){-1!==this.focusedIndex&&(this.toggleElementFocus(this.elements[this.focusedIndex],!1),this.focusedIndex=-1)}setFocus(e){if(0>e)throw Error("addFocus() can not remove focus");if(!this.state&&e>=0)throw Error("Cannot set focus index when state is undefined");if(this.state&&e>=this.state.count)throw Error("Cannot set focus index to an index that does not exist");let t=this.focusedIndex;t>=0&&this.toggleElementFocus(this.elements[t],!1),e>=0&&this.toggleElementFocus(this.elements[e],!0),this.focusedIndex=e}toggleElementFocus(e,t){this.toggleElementActiveFocus(e,t&&this.domHasFocus),this.toggleElementPassiveFocus(e,t)}toggleCurrentElementActiveFocus(e){-1!==this.focusedIndex&&this.toggleElementActiveFocus(this.elements[this.focusedIndex],e)}toggleElementActiveFocus(e,t){e.classList.toggle("focused",t)}toggleElementPassiveFocus(e,t){e.classList.toggle("passive-focused",t)}toggleStickyScrollFocused(e){this.view.getHTMLElement().classList.toggle("sticky-scroll-focused",e)}onFocus(){if(!this.state||0===this.elements.length)throw Error("Cannot focus when state is undefined or elements are empty");this.domHasFocus=!0,this.toggleStickyScrollFocused(!0),this.toggleCurrentElementActiveFocus(!0),-1===this.focusedIndex&&this.setFocus(0)}onBlur(){this.domHasFocus=!1,this.toggleCurrentElementActiveFocus(!1)}dispose(){this.toggleStickyScrollFocused(!1),this._onDidChangeHasFocus.fire(!1),super.dispose()}}function K(e){let t=f.Lx.Unknown;return(0,a.XD)(e.browserEvent.target,"monaco-tl-twistie","monaco-tl-row")?t=f.Lx.Twistie:(0,a.XD)(e.browserEvent.target,"monaco-tl-contents","monaco-tl-row")?t=f.Lx.Element:(0,a.XD)(e.browserEvent.target,"monaco-tree-type-filter","monaco-list")&&(t=f.Lx.Filter),{browserEvent:e.browserEvent,element:e.element?e.element.element:null,target:t}}function G(e){let t=(0,g.Es)(e.browserEvent.target);return{element:e.element?e.element.element:null,browserEvent:e.browserEvent,anchor:e.anchor,isStickyScroll:t}}function q(e,t){t(e),e.children.forEach(e=>q(e,t))}class Q{get nodeSet(){return this._nodeSet||(this._nodeSet=this.createNodeSet()),this._nodeSet}constructor(e,t){this.getFirstViewElementWithTrait=e,this.identityProvider=t,this.nodes=[],this._onDidChange=new y.vl,this.onDidChange=this._onDidChange.event}set(e,t){!t?.__forceEvent&&(0,_.aI)(this.nodes,e)||this._set(e,!1,t)}_set(e,t,i){if(this.nodes=[...e],this.elements=void 0,this._nodeSet=void 0,!t){let e=this;this._onDidChange.fire({get elements(){return e.get()},browserEvent:i})}}get(){return this.elements||(this.elements=this.nodes.map(e=>e.element)),[...this.elements]}getNodes(){return this.nodes}has(e){return this.nodeSet.has(e)}onDidModelSplice({insertedNodes:e,deletedNodes:t}){if(!this.identityProvider){let e=this.createNodeSet(),i=t=>e.delete(t);t.forEach(e=>q(e,i)),this.set([...e.values()]);return}let i=new Set,n=e=>i.add(this.identityProvider.getId(e.element).toString());t.forEach(e=>q(e,n));let s=new Map,o=e=>s.set(this.identityProvider.getId(e.element).toString(),e);e.forEach(e=>q(e,o));let r=[];for(let e of this.nodes){let t=this.identityProvider.getId(e.element).toString();if(i.has(t)){let e=s.get(t);e&&e.visible&&r.push(e)}else r.push(e)}if(this.nodes.length>0&&0===r.length){let e=this.getFirstViewElementWithTrait();e&&r.push(e)}this._set(r,!0)}createNodeSet(){let e=new Set;for(let t of this.nodes)e.add(t);return e}}class Y extends g.MH{constructor(e,t,i){super(e),this.tree=t,this.stickyScrollProvider=i}onViewPointer(e){if((0,g.Bm)(e.browserEvent.target)||(0,a.yD)(e.browserEvent.target)||(0,g.bm)(e.browserEvent.target)||e.browserEvent.isHandledByList)return;let t=e.element;if(!t||this.isSelectionRangeChangeEvent(e)||this.isSelectionSingleChangeEvent(e))return super.onViewPointer(e);let i=e.browserEvent.target,n=i.classList.contains("monaco-tl-twistie")||i.classList.contains("monaco-icon-label")&&i.classList.contains("folder-icon")&&e.browserEvent.offsetX<16,s=(0,g.xu)(e.browserEvent.target),o=!1;if(o=!!s||("function"==typeof this.tree.expandOnlyOnTwistieClick?this.tree.expandOnlyOnTwistieClick(t.element):!!this.tree.expandOnlyOnTwistieClick),s)this.handleStickyScrollMouseEvent(e,t);else if(o&&!n&&2!==e.browserEvent.detail||!this.tree.expandOnDoubleClick&&2===e.browserEvent.detail)return super.onViewPointer(e);if(t.collapsible&&(!s||n)){let i=this.tree.getNodeLocation(t),s=e.browserEvent.altKey;if(this.tree.setFocus([i]),this.tree.toggleCollapsed(i,s),n){e.browserEvent.isHandledByList=!0;return}}s||super.onViewPointer(e)}handleStickyScrollMouseEvent(e,t){if((0,g.b$)(e.browserEvent.target)||(0,g.W0)(e.browserEvent.target))return;let i=this.stickyScrollProvider();if(!i)throw Error("Sticky scroll controller not found");let n=this.list.indexOf(t),s=this.list.getElementTop(n),o=i.nodePositionTopBelowWidget(t);this.tree.scrollTop=s-o,this.list.domFocus(),this.list.setFocus([n]),this.list.setSelection([n])}onDoubleClick(e){!e.browserEvent.target.classList.contains("monaco-tl-twistie")&&this.tree.expandOnDoubleClick&&(e.browserEvent.isHandledByList||super.onDoubleClick(e))}onMouseDown(e){let t=e.browserEvent.target;if(!(0,g.Es)(t)&&!(0,g.xu)(t))return void super.onMouseDown(e)}onContextMenu(e){let t=e.browserEvent.target;if(!(0,g.Es)(t)&&!(0,g.xu)(t))return void super.onContextMenu(e)}}class Z extends g.B8{constructor(e,t,i,n,s,o,r,a){super(e,t,i,n,a),this.focusTrait=s,this.selectionTrait=o,this.anchorTrait=r}createMouseController(e){return new Y(this,e.tree,e.stickyScrollProvider)}splice(e,t,i=[]){let n;if(super.splice(e,t,i),0===i.length)return;let s=[],o=[];i.forEach((t,i)=>{this.focusTrait.has(t)&&s.push(e+i),this.selectionTrait.has(t)&&o.push(e+i),this.anchorTrait.has(t)&&(n=e+i)}),s.length>0&&super.setFocus((0,_.dM)([...super.getFocus(),...s])),o.length>0&&super.setSelection((0,_.dM)([...super.getSelection(),...o])),"number"==typeof n&&super.setAnchor(n)}setFocus(e,t,i=!1){super.setFocus(e,t),i||this.focusTrait.set(e.map(e=>this.element(e)),t)}setSelection(e,t,i=!1){super.setSelection(e,t),i||this.selectionTrait.set(e.map(e=>this.element(e)),t)}setAnchor(e,t=!1){super.setAnchor(e),t||(void 0===e?this.anchorTrait.set([]):this.anchorTrait.set([this.element(e)]))}}class X{get onDidScroll(){return this.view.onDidScroll}get onDidChangeFocus(){return this.eventBufferer.wrapEvent(this.focus.onDidChange)}get onDidChangeSelection(){return this.eventBufferer.wrapEvent(this.selection.onDidChange)}get onMouseDblClick(){return y.Jh.filter(y.Jh.map(this.view.onMouseDblClick,K),e=>e.target!==f.Lx.Filter)}get onMouseOver(){return y.Jh.map(this.view.onMouseOver,K)}get onMouseOut(){return y.Jh.map(this.view.onMouseOut,K)}get onContextMenu(){return y.Jh.any(y.Jh.filter(y.Jh.map(this.view.onContextMenu,G),e=>!e.isStickyScroll),this.stickyScrollController?.onContextMenu??y.Jh.None)}get onPointer(){return y.Jh.map(this.view.onPointer,K)}get onKeyDown(){return this.view.onKeyDown}get onDidFocus(){return this.view.onDidFocus}get onDidChangeModel(){return y.Jh.any(this.onDidChangeModelRelay.event,this.onDidSwapModel.event)}get onDidChangeCollapseState(){return this.onDidChangeCollapseStateRelay.event}get expandOnDoubleClick(){return void 0===this._options.expandOnDoubleClick||this._options.expandOnDoubleClick}get expandOnlyOnTwistieClick(){return void 0===this._options.expandOnlyOnTwistieClick||this._options.expandOnlyOnTwistieClick}get onDidDispose(){return this.view.onDidDispose}constructor(e,t,i,s,o={}){this._user=e,this._options=o,this.eventBufferer=new y.at,this.onDidChangeFindOpenState=y.Jh.None,this.onDidChangeStickyScrollFocused=y.Jh.None,this.disposables=new k.Cm,this.onDidSwapModel=this.disposables.add(new y.vl),this.onDidChangeModelRelay=this.disposables.add(new y.Wj),this.onDidSpliceModelRelay=this.disposables.add(new y.Wj),this.onDidChangeCollapseStateRelay=this.disposables.add(new y.Wj),this.onDidChangeRenderNodeCountRelay=this.disposables.add(new y.Wj),this.onDidChangeActiveNodesRelay=this.disposables.add(new y.Wj),this._onWillRefilter=new y.vl,this.onWillRefilter=this._onWillRefilter.event,this._onDidUpdateOptions=new y.vl,this.modelDisposables=new k.Cm,o.keyboardNavigationLabelProvider&&(o.findWidgetEnabled??!0)&&(this.findFilter=new P(o.keyboardNavigationLabelProvider,o.filter,o.defaultFindVisibility),o={...o,filter:this.findFilter},this.disposables.add(this.findFilter)),this.model=this.createModel(e,o),this.treeDelegate=new T(i);let r=this.disposables.add(new R(this.onDidChangeActiveNodesRelay.event)),h=new w.db;for(let e of(this.renderers=s.map(e=>new O(e,this.model,this.onDidChangeCollapseStateRelay.event,r,h,o)),this.renderers))this.disposables.add(e);if(this.focus=new Q(()=>this.view.getFocusedElements()[0],o.identityProvider),this.selection=new Q(()=>this.view.getSelectedElements()[0],o.identityProvider),this.anchor=new Q(()=>this.view.getAnchorElement(),o.identityProvider),this.view=new Z(e,t,this.treeDelegate,this.renderers,this.focus,this.selection,this.anchor,{...function(e,t,i){return i&&{...i,identityProvider:i.identityProvider&&{getId:e=>i.identityProvider.getId(e.element)},dnd:i.dnd&&t.add(new M(e,i.dnd)),multipleSelectionController:i.multipleSelectionController&&{isSelectionSingleChangeEvent:e=>i.multipleSelectionController.isSelectionSingleChangeEvent({...e,element:e.element}),isSelectionRangeChangeEvent:e=>i.multipleSelectionController.isSelectionRangeChangeEvent({...e,element:e.element})},accessibilityProvider:i.accessibilityProvider&&{...i.accessibilityProvider,getSetSize(t){let i=e(),n=i.getNodeLocation(t),s=i.getParentNodeLocation(n);return i.getNode(s).visibleChildrenCount},getPosInSet:e=>e.visibleChildIndex+1,isChecked:i.accessibilityProvider&&i.accessibilityProvider.isChecked?e=>i.accessibilityProvider.isChecked(e.element):void 0,getRole:i.accessibilityProvider&&i.accessibilityProvider.getRole?e=>i.accessibilityProvider.getRole(e.element):()=>"treeitem",getAriaLabel:e=>i.accessibilityProvider.getAriaLabel(e.element),getWidgetAriaLabel:()=>i.accessibilityProvider.getWidgetAriaLabel(),getWidgetRole:i.accessibilityProvider&&i.accessibilityProvider.getWidgetRole?()=>i.accessibilityProvider.getWidgetRole():()=>"tree",getAriaLevel:i.accessibilityProvider&&i.accessibilityProvider.getAriaLevel?e=>i.accessibilityProvider.getAriaLevel(e.element):e=>e.depth,getActiveDescendantId:i.accessibilityProvider.getActiveDescendantId&&(e=>i.accessibilityProvider.getActiveDescendantId(e.element))},keyboardNavigationLabelProvider:i.keyboardNavigationLabelProvider&&{...i.keyboardNavigationLabelProvider,getKeyboardNavigationLabel:e=>i.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(e.element)}}}(()=>this.model,this.disposables,o),tree:this,stickyScrollProvider:()=>this.stickyScrollController}),this.setupModel(this.model),!1!==o.keyboardSupport){let e=y.Jh.chain(this.view.onKeyDown,e=>e.filter(e=>!(0,a.yD)(e.target)).map(e=>new d.Z(e)));y.Jh.chain(e,e=>e.filter(e=>15===e.keyCode))(this.onLeftArrow,this,this.disposables),y.Jh.chain(e,e=>e.filter(e=>17===e.keyCode))(this.onRightArrow,this,this.disposables),y.Jh.chain(e,e=>e.filter(e=>10===e.keyCode))(this.onSpace,this,this.disposables)}if((o.findWidgetEnabled??!0)&&o.keyboardNavigationLabelProvider&&o.contextViewProvider){let e={styles:o.findWidgetStyles,defaultFindMode:o.defaultFindMode,defaultFindMatchType:o.defaultFindMatchType,showNotFoundMessage:o.showNotFoundMessage};this.findController=this.disposables.add(new B(this,this.findFilter,o.contextViewProvider,e)),this.focusNavigationFilter=e=>this.findController.shouldAllowFocus(e),this.onDidChangeFindOpenState=this.findController.onDidChangeOpenState,this.onDidChangeFindMode=this.findController.onDidChangeMode,this.onDidChangeFindMatchType=this.findController.onDidChangeMatchType}else this.onDidChangeFindMode=y.Jh.None,this.onDidChangeFindMatchType=y.Jh.None;o.enableStickyScroll&&(this.stickyScrollController=new U(this,this.model,this.view,this.renderers,this.treeDelegate,o),this.onDidChangeStickyScrollFocused=this.stickyScrollController.onDidChangeHasFocus),this.styleElement=(0,l.li)(this.view.getHTMLElement()),this.getHTMLElement().classList.toggle("always",this._options.renderIndentGuides===n.Always)}updateOptions(e={}){for(let t of(this._options={...this._options,...e},this.renderers))t.updateOptions(e);this.view.updateOptions(this._options),this.findController?.updateOptions(e),this.updateStickyScroll(e),this._onDidUpdateOptions.fire(this._options),this.getHTMLElement().classList.toggle("always",this._options.renderIndentGuides===n.Always)}get options(){return this._options}updateStickyScroll(e){!this.stickyScrollController&&this._options.enableStickyScroll?(this.stickyScrollController=new U(this,this.model,this.view,this.renderers,this.treeDelegate,this._options),this.onDidChangeStickyScrollFocused=this.stickyScrollController.onDidChangeHasFocus):this.stickyScrollController&&!this._options.enableStickyScroll&&(this.onDidChangeStickyScrollFocused=y.Jh.None,this.stickyScrollController.dispose(),this.stickyScrollController=void 0),this.stickyScrollController?.updateOptions(e)}getHTMLElement(){return this.view.getHTMLElement()}get onDidChangeContentHeight(){return this.view.onDidChangeContentHeight}get scrollTop(){return this.view.scrollTop}set scrollTop(e){this.view.scrollTop=e}get scrollHeight(){return this.view.scrollHeight}get renderHeight(){return this.view.renderHeight}get ariaLabel(){return this.view.ariaLabel}set ariaLabel(e){this.view.ariaLabel=e}domFocus(){this.stickyScrollController?.focusedLast()?this.stickyScrollController.domFocus():this.view.domFocus()}layout(e,t){this.view.layout(e,t)}style(e){let t=`.${this.view.domId}`,i=[];e.treeIndentGuidesStroke&&(i.push(`.monaco-list${t}:hover .monaco-tl-indent > .indent-guide, .monaco-list${t}.always .monaco-tl-indent > .indent-guide { opacity: 1; border-color: ${e.treeInactiveIndentGuidesStroke}; }`),i.push(`.monaco-list${t} .monaco-tl-indent > .indent-guide.active { opacity: 1; border-color: ${e.treeIndentGuidesStroke}; }`));let n=e.treeStickyScrollBackground??e.listBackground;n&&(i.push(`.monaco-list${t} .monaco-scrollable-element .monaco-tree-sticky-container { background-color: ${n}; }`),i.push(`.monaco-list${t} .monaco-scrollable-element .monaco-tree-sticky-container .monaco-tree-sticky-row { background-color: ${n}; }`)),e.treeStickyScrollBorder&&i.push(`.monaco-list${t} .monaco-scrollable-element .monaco-tree-sticky-container { border-bottom: 1px solid ${e.treeStickyScrollBorder}; }`),e.treeStickyScrollShadow&&i.push(`.monaco-list${t} .monaco-scrollable-element .monaco-tree-sticky-container .monaco-tree-sticky-container-shadow { box-shadow: ${e.treeStickyScrollShadow} 0 6px 6px -6px inset; height: 3px; }`),e.listFocusForeground&&(i.push(`.monaco-list${t}.sticky-scroll-focused .monaco-scrollable-element .monaco-tree-sticky-container:focus .monaco-list-row.focused { color: ${e.listFocusForeground}; }`),i.push(`.monaco-list${t}:not(.sticky-scroll-focused) .monaco-scrollable-element .monaco-tree-sticky-container .monaco-list-row.focused { color: inherit; }`));let s=(0,h.gI)(e.listFocusAndSelectionOutline,(0,h.gI)(e.listSelectionOutline,e.listFocusOutline??""));s&&(i.push(`.monaco-list${t}.sticky-scroll-focused .monaco-scrollable-element .monaco-tree-sticky-container:focus .monaco-list-row.focused.selected { outline: 1px solid ${s}; outline-offset: -1px;}`),i.push(`.monaco-list${t}:not(.sticky-scroll-focused) .monaco-scrollable-element .monaco-tree-sticky-container .monaco-list-row.focused.selected { outline: inherit;}`)),e.listFocusOutline&&(i.push(`.monaco-list${t}.sticky-scroll-focused .monaco-scrollable-element .monaco-tree-sticky-container:focus .monaco-list-row.focused { outline: 1px solid ${e.listFocusOutline}; outline-offset: -1px; }`),i.push(`.monaco-list${t}:not(.sticky-scroll-focused) .monaco-scrollable-element .monaco-tree-sticky-container .monaco-list-row.focused { outline: inherit; }`),i.push(`.monaco-workbench.context-menu-visible .monaco-list${t}.last-focused.sticky-scroll-focused .monaco-scrollable-element .monaco-tree-sticky-container .monaco-list-row.passive-focused { outline: 1px solid ${e.listFocusOutline}; outline-offset: -1px; }`),i.push(`.monaco-workbench.context-menu-visible .monaco-list${t}.last-focused.sticky-scroll-focused .monaco-list-rows .monaco-list-row.focused { outline: inherit; }`),i.push(`.monaco-workbench.context-menu-visible .monaco-list${t}.last-focused:not(.sticky-scroll-focused) .monaco-tree-sticky-container .monaco-list-rows .monaco-list-row.focused { outline: inherit; }`)),this.styleElement.textContent=i.join("\n"),this.view.style(e)}getParentElement(e){let t=this.model.getParentNodeLocation(e);return this.model.getNode(t).element}getFirstElementChild(e){return this.model.getFirstElementChild(e)}getNode(e){return this.model.getNode(e)}getNodeLocation(e){return this.model.getNodeLocation(e)}collapse(e,t=!1){return this.model.setCollapsed(e,!0,t)}expand(e,t=!1){return this.model.setCollapsed(e,!1,t)}toggleCollapsed(e,t=!1){return this.model.setCollapsed(e,void 0,t)}isCollapsible(e){return this.model.isCollapsible(e)}setCollapsible(e,t){return this.model.setCollapsible(e,t)}isCollapsed(e){return this.model.isCollapsed(e)}refilter(){this._onWillRefilter.fire(void 0),this.model.refilter()}setSelection(e,t){this.eventBufferer.bufferEvents(()=>{let i=e.map(e=>this.model.getNode(e));this.selection.set(i,t);let n=e.map(e=>this.model.getListIndex(e)).filter(e=>e>-1);this.view.setSelection(n,t,!0)})}getSelection(){return this.selection.get()}setFocus(e,t){this.eventBufferer.bufferEvents(()=>{let i=e.map(e=>this.model.getNode(e));this.focus.set(i,t);let n=e.map(e=>this.model.getListIndex(e)).filter(e=>e>-1);this.view.setFocus(n,t,!0)})}focusNext(e=1,t=!1,i,n=(0,a.kx)(i)&&i.altKey?void 0:this.focusNavigationFilter){this.view.focusNext(e,t,i,n)}focusPrevious(e=1,t=!1,i,n=(0,a.kx)(i)&&i.altKey?void 0:this.focusNavigationFilter){this.view.focusPrevious(e,t,i,n)}focusNextPage(e,t=(0,a.kx)(e)&&e.altKey?void 0:this.focusNavigationFilter){return this.view.focusNextPage(e,t)}focusPreviousPage(e,t=(0,a.kx)(e)&&e.altKey?void 0:this.focusNavigationFilter){return this.view.focusPreviousPage(e,t,()=>this.stickyScrollController?.height??0)}focusLast(e,t=(0,a.kx)(e)&&e.altKey?void 0:this.focusNavigationFilter){this.view.focusLast(e,t)}focusFirst(e,t=(0,a.kx)(e)&&e.altKey?void 0:this.focusNavigationFilter){this.view.focusFirst(e,t)}getFocus(){return this.focus.get()}reveal(e,t){this.model.expandTo(e);let i=this.model.getListIndex(e);if(-1!==i)if(this.stickyScrollController){let n=this.stickyScrollController.nodePositionTopBelowWidget(this.getNode(e));this.view.reveal(i,t,n)}else this.view.reveal(i,t)}onLeftArrow(e){e.preventDefault(),e.stopPropagation();let t=this.view.getFocusedElements();if(0===t.length)return;let i=t[0],n=this.model.getNodeLocation(i);if(!this.model.setCollapsed(n,!0)){let e=this.model.getParentNodeLocation(n);if(!e)return;let t=this.model.getListIndex(e);this.view.reveal(t),this.view.setFocus([t])}}onRightArrow(e){e.preventDefault(),e.stopPropagation();let t=this.view.getFocusedElements();if(0===t.length)return;let i=t[0],n=this.model.getNodeLocation(i);if(!this.model.setCollapsed(n,!1)){if(!i.children.some(e=>e.visible))return;let[e]=this.view.getFocus(),t=e+1;this.view.reveal(t),this.view.setFocus([t])}}onSpace(e){e.preventDefault(),e.stopPropagation();let t=this.view.getFocusedElements();if(0===t.length)return;let i=t[0],n=this.model.getNodeLocation(i),s=e.browserEvent.altKey;this.model.setCollapsed(n,void 0,s)}setupModel(e){this.modelDisposables.clear(),this.modelDisposables.add(e.onDidSpliceRenderedNodes(({start:e,deleteCount:t,elements:i})=>this.view.splice(e,t,i)));let t=y.Jh.forEach(e.onDidSpliceModel,e=>{this.eventBufferer.bufferEvents(()=>{this.focus.onDidModelSplice(e),this.selection.onDidModelSplice(e)})},this.modelDisposables);t(()=>null,null,this.modelDisposables);let i=this.modelDisposables.add(new y.vl),n=this.modelDisposables.add(new v.ve(0));this.modelDisposables.add(y.Jh.any(t,this.focus.onDidChange,this.selection.onDidChange)(()=>{n.trigger(()=>{let e=new Set;for(let t of this.focus.getNodes())e.add(t);for(let t of this.selection.getNodes())e.add(t);i.fire([...e.values()])})})),this.onDidChangeActiveNodesRelay.input=i.event,this.onDidChangeModelRelay.input=y.Jh.signal(e.onDidSpliceModel),this.onDidChangeCollapseStateRelay.input=e.onDidChangeCollapseState,this.onDidChangeRenderNodeCountRelay.input=e.onDidChangeRenderNodeCount,this.onDidSpliceModelRelay.input=e.onDidSpliceModel}dispose(){(0,k.AS)(this.disposables),this.stickyScrollController?.dispose(),this.view.dispose(),this.modelDisposables.dispose()}}},59114:(e,t,i)=>{"use strict";let n;function s(e){n?n instanceof a?n.loggers.push(e):n=new a([n,e]):n=e}function o(){return n}function r(e){}i.d(t,{EJ:()=>s,YQ:()=>r,tZ:()=>o});class a{constructor(e){this.loggers=e}handleObservableCreated(e,t){for(let i of this.loggers)i.handleObservableCreated(e,t)}handleOnListenerCountChanged(e,t){for(let i of this.loggers)i.handleOnListenerCountChanged(e,t)}handleObservableUpdated(e,t){for(let i of this.loggers)i.handleObservableUpdated(e,t)}handleAutorunCreated(e,t){for(let i of this.loggers)i.handleAutorunCreated(e,t)}handleAutorunDisposed(e){for(let t of this.loggers)t.handleAutorunDisposed(e)}handleAutorunDependencyChanged(e,t,i){for(let n of this.loggers)n.handleAutorunDependencyChanged(e,t,i)}handleAutorunStarted(e){for(let t of this.loggers)t.handleAutorunStarted(e)}handleAutorunFinished(e){for(let t of this.loggers)t.handleAutorunFinished(e)}handleDerivedDependencyChanged(e,t,i){for(let n of this.loggers)n.handleDerivedDependencyChanged(e,t,i)}handleDerivedCleared(e){for(let t of this.loggers)t.handleDerivedCleared(e)}handleBeginTransaction(e){for(let t of this.loggers)t.handleBeginTransaction(e)}handleEndTransaction(e){for(let t of this.loggers)t.handleEndTransaction(e)}}},59916:(e,t,i)=>{"use strict";let n;i.d(t,{XL:()=>u,fL:()=>d,YY:()=>h,PO:()=>c,Rn:()=>l});var s=i(72307);function o(e){let t=Error("BugIndicatingErrorRecovery: "+e);(0,s.dz)(t),console.error("recovered from an error that indicates a bug",t)}var r=i(34985),a=i(59114);function l(e,t){let i=new u(e,t);try{e(i)}finally{i.finish()}}function h(e){if(n)e(n);else{let t=new u(e,void 0);n=t;try{e(t)}finally{t.finish(),n=void 0}}}async function d(e,t){let i=new u(e,t);try{await e(i)}finally{i.finish()}}function c(e,t,i){e?t(e):l(t,i)}class u{constructor(e,t){this._fn=e,this._getDebugName=t,this._updatingObservers=[],(0,a.tZ)()?.handleBeginTransaction(this)}getDebugName(){return this._getDebugName?this._getDebugName():(0,r.qQ)(this._fn)}updateObserver(e,t){if(!this._updatingObservers){o("Transaction already finished!"),l(i=>{i.updateObserver(e,t)});return}this._updatingObservers.push({observer:e,observable:t}),e.beginUpdate(t)}finish(){let e=this._updatingObservers;if(!e)return void o("transaction.finish() has already been called!");for(let t=0;t<e.length;t++){let{observer:i,observable:n}=e[t];i.endUpdate(n)}this._updatingObservers=null,(0,a.tZ)()?.handleEndTransaction(this)}debugGetUpdatingObservers(){return this._updatingObservers}}},59947:(e,t,i)=>{"use strict";i.d(t,{M4:()=>g,N4:()=>h,jQ:()=>d,vV:()=>u,vr:()=>c});var n=i(87899),s=i(98200),o=i(78271),r=i(82102);i(86326);var a=i(15957);let l=n.$;class h extends r.jG{constructor(e){super(),this.containerDomNode=document.createElement("div"),this.containerDomNode.className="monaco-hover",this.containerDomNode.classList.toggle("fade-in",!!e),this.containerDomNode.tabIndex=0,this.containerDomNode.setAttribute("role","tooltip"),this.contentsDomNode=document.createElement("div"),this.contentsDomNode.className="monaco-hover-content",this.scrollbar=this._register(new o.MU(this.contentsDomNode,{consumeMouseWheelIfScrollbarIsNeeded:!0})),this.containerDomNode.appendChild(this.scrollbar.getDomNode())}onContentsChanged(){this.scrollbar.scanDomNode()}}class d extends r.jG{static render(e,t,i){return new d(e,t,i)}constructor(e,t,i){super(),this.actionLabel=t.label,this.actionKeybindingLabel=i,this.actionContainer=n.BC(e,l("div.action-container")),this.actionContainer.setAttribute("tabindex","0"),this.action=n.BC(this.actionContainer,l("a.action")),this.action.setAttribute("role","button"),t.iconClass&&n.BC(this.action,l("span.icon")).classList.add(...t.iconClass.split(" ")),this.actionRenderedLabel=i?`${t.label} (${i})`:t.label,n.BC(this.action,l("span")).textContent=this.actionRenderedLabel,this._store.add(new u(this.actionContainer,t.run)),this._store.add(new g(this.actionContainer,t.run,[3,10])),this.setEnabled(!0)}setEnabled(e){e?(this.actionContainer.classList.remove("disabled"),this.actionContainer.removeAttribute("aria-disabled")):(this.actionContainer.classList.add("disabled"),this.actionContainer.setAttribute("aria-disabled","true"))}}function c(e,t){return e&&t?(0,a.kg)(7,"Inspect this in the accessible view with {0}.",t):e?(0,a.kg)(8,"Inspect this in the accessible view via the command Open Accessible View which is currently not triggerable via keybinding."):""}class u extends r.jG{constructor(e,t){super(),this._register(n.ko(e,n.Bx.CLICK,i=>{i.stopPropagation(),i.preventDefault(),t(e)}))}}class g extends r.jG{constructor(e,t,i){super(),this._register(n.ko(e,n.Bx.KEY_DOWN,n=>{let o=new s.Z(n);i.some(e=>o.equals(e))&&(n.stopPropagation(),n.preventDefault(),t(e))}))}}},59963:()=>{},60095:(e,t,i)=>{"use strict";i.d(t,{A5:()=>n,Dg:()=>h,F4:()=>g,L5:()=>u,VW:()=>r,Wo:()=>c,X2:()=>l,ZS:()=>s,nk:()=>d,vd:()=>p,z4:()=>o});var n,s,o,r,a=i(6230);!function(e){e[e.Left=1]="Left",e[e.Center=2]="Center",e[e.Right=4]="Right",e[e.Full=7]="Full"}(n||(n={})),function(e){e[e.Left=1]="Left",e[e.Center=2]="Center",e[e.Right=3]="Right"}(s||(s={})),function(e){e[e.LTR=0]="LTR",e[e.RTL=1]="RTL"}(o||(o={})),function(e){e[e.Both=0]="Both",e[e.Right=1]="Right",e[e.Left=2]="Left",e[e.None=3]="None"}(r||(r={}));class l{get originalIndentSize(){return this._indentSizeIsTabSize?"tabSize":this.indentSize}constructor(e){this._textModelResolvedOptionsBrand=void 0,this.tabSize=Math.max(1,0|e.tabSize),"tabSize"===e.indentSize?(this.indentSize=this.tabSize,this._indentSizeIsTabSize=!0):(this.indentSize=Math.max(1,0|e.indentSize),this._indentSizeIsTabSize=!1),this.insertSpaces=!!e.insertSpaces,this.defaultEOL=0|e.defaultEOL,this.trimAutoWhitespace=!!e.trimAutoWhitespace,this.bracketPairColorizationOptions=e.bracketPairColorizationOptions}equals(e){return this.tabSize===e.tabSize&&this._indentSizeIsTabSize===e._indentSizeIsTabSize&&this.indentSize===e.indentSize&&this.insertSpaces===e.insertSpaces&&this.defaultEOL===e.defaultEOL&&this.trimAutoWhitespace===e.trimAutoWhitespace&&(0,a.aI)(this.bracketPairColorizationOptions,e.bracketPairColorizationOptions)}createChangeEvent(e){return{tabSize:this.tabSize!==e.tabSize,indentSize:this.indentSize!==e.indentSize,insertSpaces:this.insertSpaces!==e.insertSpaces,trimAutoWhitespace:this.trimAutoWhitespace!==e.trimAutoWhitespace}}}class h{constructor(e,t){this._findMatchBrand=void 0,this.range=e,this.matches=t}}function d(e){return e&&"function"==typeof e.read}class c{constructor(e,t,i,n,s,o){this.identifier=e,this.range=t,this.text=i,this.forceMoveMarkers=n,this.isAutoWhitespaceEdit=s,this._isTracked=o}}class u{constructor(e,t,i){this.regex=e,this.wordSeparators=t,this.simpleSearch=i}}class g{constructor(e,t,i){this.reverseEdits=e,this.changes=t,this.trimAutoWhitespaceLineNumbers=i}}function p(e){return!e.isTooLargeForSyncing()&&!e.isForSimpleWidget}},60393:(e,t,i)=>{"use strict";function n(e,t){"number"!=typeof e.vscodeWindowId&&Object.defineProperty(e,"vscodeWindowId",{get:()=>t})}i.d(t,{G:()=>s,y:()=>n});let s=window},60564:(e,t,i)=>{"use strict";i.d(t,{T:()=>p});var n=i(87899),s=i(25454),o=i(17354),r=i(82102),a=i(89197);class l{constructor(e,t){this.chr=e,this.type=t,this.width=0}fulfill(e){this.width=e}}class h{constructor(e,t){this._bareFontInfo=e,this._requests=t,this._container=null,this._testElements=null}read(e){this._createDomElements(),e.document.body.appendChild(this._container),this._readFromDomElements(),this._container?.remove(),this._container=null,this._testElements=null}_createDomElements(){let e=document.createElement("div");e.style.position="absolute",e.style.top="-50000px",e.style.width="50000px";let t=document.createElement("div");(0,a.M)(t,this._bareFontInfo),e.appendChild(t);let i=document.createElement("div");(0,a.M)(i,this._bareFontInfo),i.style.fontWeight="bold",e.appendChild(i);let n=document.createElement("div");(0,a.M)(n,this._bareFontInfo),n.style.fontStyle="italic",e.appendChild(n);let s=[];for(let e of this._requests){let o;0===e.type&&(o=t),2===e.type&&(o=i),1===e.type&&(o=n),o.appendChild(document.createElement("br"));let r=document.createElement("span");h._render(r,e),o.appendChild(r),s.push(r)}this._container=e,this._testElements=s}static _render(e,t){if(" "===t.chr){let t="\xa0";for(let e=0;e<8;e++)t+=t;e.innerText=t}else{let i=t.chr;for(let e=0;e<8;e++)i+=i;e.textContent=i}}_readFromDomElements(){for(let e=0,t=this._requests.length;e<t;e++){let t=this._requests[e],i=this._testElements[e];t.fulfill(i.offsetWidth/256)}}}var d=i(85462),c=i(3124);class u extends r.jG{constructor(){super(...arguments),this._cache=new Map,this._evictUntrustedReadingsTimeout=-1,this._onDidChange=this._register(new o.vl),this.onDidChange=this._onDidChange.event}dispose(){-1!==this._evictUntrustedReadingsTimeout&&(clearTimeout(this._evictUntrustedReadingsTimeout),this._evictUntrustedReadingsTimeout=-1),super.dispose()}clearAllFontInfos(){this._cache.clear(),this._onDidChange.fire()}_ensureCache(e){let t=(0,n.Q2)(e),i=this._cache.get(t);return i||(i=new g,this._cache.set(t,i)),i}_writeToCache(e,t,i){this._ensureCache(e).put(t,i),i.isTrusted||-1!==this._evictUntrustedReadingsTimeout||(this._evictUntrustedReadingsTimeout=e.setTimeout(()=>{this._evictUntrustedReadingsTimeout=-1,this._evictUntrustedReadings(e)},5e3))}_evictUntrustedReadings(e){let t=this._ensureCache(e),i=t.getValues(),n=!1;for(let e of i)e.isTrusted||(n=!0,t.remove(e));n&&this._onDidChange.fire()}readFontInfo(e,t){let i=this._ensureCache(e);if(!i.has(t)){let i=this._actualReadFontInfo(e,t);(i.typicalHalfwidthCharacterWidth<=2||i.typicalFullwidthCharacterWidth<=2||i.spaceWidth<=2||i.maxDigitWidth<=2)&&(i=new c.YJ({pixelRatio:s.c.getInstance(e).value,fontFamily:i.fontFamily,fontWeight:i.fontWeight,fontSize:i.fontSize,fontFeatureSettings:i.fontFeatureSettings,fontVariationSettings:i.fontVariationSettings,lineHeight:i.lineHeight,letterSpacing:i.letterSpacing,isMonospace:i.isMonospace,typicalHalfwidthCharacterWidth:Math.max(i.typicalHalfwidthCharacterWidth,5),typicalFullwidthCharacterWidth:Math.max(i.typicalFullwidthCharacterWidth,5),canUseHalfwidthRightwardsArrow:i.canUseHalfwidthRightwardsArrow,spaceWidth:Math.max(i.spaceWidth,5),middotWidth:Math.max(i.middotWidth,5),wsmiddotWidth:Math.max(i.wsmiddotWidth,5),maxDigitWidth:Math.max(i.maxDigitWidth,5)},!1)),this._writeToCache(e,t,i)}return i.get(t)}_createRequest(e,t,i,n){let s=new l(e,t);return i.push(s),n?.push(s),s}_actualReadFontInfo(e,t){let i=[],n=[],o=this._createRequest("n",0,i,n),r=this._createRequest("m",0,i,null),a=this._createRequest(" ",0,i,n),l=this._createRequest("0",0,i,n),u=this._createRequest("1",0,i,n),g=this._createRequest("2",0,i,n),p=this._createRequest("3",0,i,n),m=this._createRequest("4",0,i,n),f=this._createRequest("5",0,i,n),_=this._createRequest("6",0,i,n),v=this._createRequest("7",0,i,n),b=this._createRequest("8",0,i,n),C=this._createRequest("9",0,i,n),w=this._createRequest("→",0,i,n),y=this._createRequest("→",0,i,null),S=this._createRequest("\xb7",0,i,n),k=this._createRequest(String.fromCharCode(11825),0,i,null),x="|/-_ilm%";for(let e=0,t=x.length;e<t;e++)this._createRequest(x.charAt(e),0,i,n),this._createRequest(x.charAt(e),1,i,n),this._createRequest(x.charAt(e),2,i,n);new h(t,i).read(e);let L=Math.max(l.width,u.width,g.width,p.width,m.width,f.width,_.width,v.width,b.width,C.width),D=t.fontFeatureSettings===d.Bc.OFF,I=n[0].width;for(let e=1,t=n.length;D&&e<t;e++){let t=I-n[e].width;if(t<-.001||t>.001){D=!1;break}}let N=!0;return D&&y.width!==I&&(N=!1),y.width>w.width&&(N=!1),new c.YJ({pixelRatio:s.c.getInstance(e).value,fontFamily:t.fontFamily,fontWeight:t.fontWeight,fontSize:t.fontSize,fontFeatureSettings:t.fontFeatureSettings,fontVariationSettings:t.fontVariationSettings,lineHeight:t.lineHeight,letterSpacing:t.letterSpacing,isMonospace:D,typicalHalfwidthCharacterWidth:o.width,typicalFullwidthCharacterWidth:r.width,canUseHalfwidthRightwardsArrow:N,spaceWidth:a.width,middotWidth:S.width,wsmiddotWidth:k.width,maxDigitWidth:L},!0)}}class g{constructor(){this._keys=Object.create(null),this._values=Object.create(null)}has(e){let t=e.getId();return!!this._values[t]}get(e){let t=e.getId();return this._values[t]}put(e,t){let i=e.getId();this._keys[i]=e,this._values[i]=t}remove(e){let t=e.getId();delete this._keys[t],delete this._values[t]}getValues(){return Object.keys(this._keys).map(e=>this._values[e])}}let p=new u},60737:(e,t,i)=>{"use strict";i.d(t,{Mh:()=>eB,Gc:()=>eE});var n=i(6033),s=i(49832),o=i(96340),r=i(39856),a=i(96784),l=i(82102);function h(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}let d=h(),c=/[&<>"']/,u=RegExp(c.source,"g"),g=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,p=RegExp(g.source,"g"),m={"&":"&","<":"<",">":">",'"':""","'":"'"},f=e=>m[e];function _(e,t){if(t){if(c.test(e))return e.replace(u,f)}else if(g.test(e))return e.replace(p,f);return e}let v=/(^|[^\[])\^/g;function b(e,t){let i="string"==typeof e?e:e.source;t=t||"";let n={replace:(e,t)=>{let s="string"==typeof t?t:t.source;return s=s.replace(v,"$1"),i=i.replace(e,s),n},getRegex:()=>new RegExp(i,t)};return n}function C(e){try{e=encodeURI(e).replace(/%25/g,"%")}catch{return null}return e}let w={exec:()=>null};function y(e,t){let i=e.replace(/\|/g,(e,t,i)=>{let n=!1,s=t;for(;--s>=0&&"\\"===i[s];)n=!n;return n?"|":" |"}).split(/ \|/),n=0;if(i[0].trim()||i.shift(),i.length>0&&!i[i.length-1].trim()&&i.pop(),t)if(i.length>t)i.splice(t);else for(;i.length<t;)i.push("");for(;n<i.length;n++)i[n]=i[n].trim().replace(/\\\|/g,"|");return i}function S(e,t,i){let n=e.length;if(0===n)return"";let s=0;for(;s<n;){let o=e.charAt(n-s-1);if(o!==t||i)if(o!==t&&i)s++;else break;else s++}return e.slice(0,n-s)}function k(e,t,i,n){let s=t.href,o=t.title?_(t.title):null,r=e[1].replace(/\\([\[\]])/g,"$1");if("!"!==e[0].charAt(0)){n.state.inLink=!0;let e={type:"link",raw:i,href:s,title:o,text:r,tokens:n.inlineTokens(r)};return n.state.inLink=!1,e}return{type:"image",raw:i,href:s,title:o,text:_(r)}}class x{options;rules;lexer;constructor(e){this.options=e||d}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let e=t[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?e:S(e,"\n")}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let e=t[0],i=function(e,t){let i=e.match(/^(\s+)(?:```)/);if(null===i)return t;let n=i[1];return t.split("\n").map(e=>{let t=e.match(/^\s+/);if(null===t)return e;let[i]=t;return i.length>=n.length?e.slice(n.length):e}).join("\n")}(e,t[3]||"");return{type:"code",raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:i}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(/#$/.test(e)){let t=S(e,"#");this.options.pedantic?e=t.trim():(!t||/ $/.test(t))&&(e=t.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:S(t[0],"\n")}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let e=S(t[0],"\n").split("\n"),i="",n="",s=[];for(;e.length>0;){let t,o=!1,r=[];for(t=0;t<e.length;t++)if(/^ {0,3}>/.test(e[t]))r.push(e[t]),o=!0;else if(o)break;else r.push(e[t]);e=e.slice(t);let a=r.join("\n"),l=a.replace(/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,"\n $1").replace(/^ {0,3}>[ \t]?/gm,"");i=i?`${i}
|
|
624
|
+
${this._themeCSS}`,this._styleElements.forEach(e=>e.textContent=this._allCSS)}getFileIconTheme(){return{hasFileIcons:!1,hasFolderIcons:!1,hidesExplorerArrows:!1}}getProductIconTheme(){return this._builtInProductIconTheme}}},58891:(e,t,i)=>{"use strict";i.d(t,{DO:()=>X,KP:()=>n,RD:()=>o,cp:()=>P,eR:()=>B,vD:()=>s,w0:()=>T});var n,s,o,r,a=i(87899),l=i(92684),h=i(98437),d=(i(88723),i(98200)),c=(i(44987),i(87311),i(14664)),u=i(77165),g=i(67404),p=i(77897),m=i(14816),f=i(26637),_=(i(39205),i(5488)),v=i(45262),b=i(55354),C=i(27281),w=i(47108),y=i(17354),S=i(46287),k=i(82102),x=i(64124);i(69872);var L=i(15957),D=(i(85350),i(76946)),I=i(91523);class N extends u.ur{constructor(e){super(e.elements.map(e=>e.element)),this.data=e}}function E(e){return e instanceof u.ur?new N(e):e}class M{constructor(e,t){this.modelProvider=e,this.dnd=t,this.autoExpandDisposable=k.jG.None,this.disposables=new k.Cm}getDragURI(e){return this.dnd.getDragURI(e.element)}getDragLabel(e,t){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(e.map(e=>e.element),t)}onDragStart(e,t){this.dnd.onDragStart?.(E(e),t)}onDragOver(e,t,i,n,s,o=!0){let r=this.dnd.onDragOver(E(e),t&&t.element,i,n,s),a=this.autoExpandNode!==t;if(a&&(this.autoExpandDisposable.dispose(),this.autoExpandNode=t),void 0===t)return r;if(a&&"boolean"!=typeof r&&r.autoExpand&&(this.autoExpandDisposable=(0,v.EQ)(()=>{let e=this.modelProvider(),i=e.getNodeLocation(t);e.isCollapsed(i)&&e.setCollapsed(i,!1),this.autoExpandNode=void 0},500,this.disposables)),"boolean"==typeof r||!r.accept||void 0===r.bubble||r.feedback)return o?r:{accept:"boolean"==typeof r?r:r.accept,effect:"boolean"==typeof r?void 0:r.effect,feedback:[i]};if(1===r.bubble){let i=this.modelProvider(),o=i.getNodeLocation(t),r=i.getParentNodeLocation(o),a=i.getNode(r),l=r&&i.getListIndex(r);return this.onDragOver(e,a,l,n,s,!1)}let l=this.modelProvider(),h=l.getNodeLocation(t),d=l.getListIndex(h),c=l.getListRenderCount(h);return{...r,feedback:(0,_.y1)(d,d+c)}}drop(e,t,i,n,s){this.autoExpandDisposable.dispose(),this.autoExpandNode=void 0,this.dnd.drop(E(e),t&&t.element,i,n,s)}onDragEnd(e){this.dnd.onDragEnd?.(e)}dispose(){this.disposables.dispose(),this.dnd.dispose()}}class T{constructor(e){this.delegate=e}getHeight(e){return this.delegate.getHeight(e.element)}getTemplateId(e){return this.delegate.getTemplateId(e.element)}hasDynamicHeight(e){return!!this.delegate.hasDynamicHeight&&this.delegate.hasDynamicHeight(e.element)}setDynamicHeight(e,t){this.delegate.setDynamicHeight?.(e.element,t)}}!function(e){e.None="none",e.OnHover="onHover",e.Always="always"}(n||(n={}));class R{get elements(){return this._elements}constructor(e,t=[]){this._elements=t,this.disposables=new k.Cm,this.onDidChange=y.Jh.forEach(e,e=>this._elements=e,this.disposables)}dispose(){this.disposables.dispose()}}class O{static{this.DefaultIndent=8}constructor(e,t,i,n,s,o={}){this.renderer=e,this.model=t,this.activeNodes=n,this.renderedIndentGuides=s,this.renderedElements=new Map,this.renderedNodes=new Map,this.indent=O.DefaultIndent,this.hideTwistiesOfChildlessElements=!1,this.shouldRenderIndentGuides=!1,this.activeIndentNodes=new Set,this.indentGuidesDisposable=k.jG.None,this.disposables=new k.Cm,this.templateId=e.templateId,this.updateOptions(o),y.Jh.map(i,e=>e.node)(this.onDidChangeNodeTwistieState,this,this.disposables),e.onDidChangeTwistieState?.(this.onDidChangeTwistieState,this,this.disposables)}updateOptions(e={}){if(void 0!==e.indent){let t=(0,x.qE)(e.indent,0,40);if(t!==this.indent)for(let[e,i]of(this.indent=t,this.renderedNodes))i.indentSize=O.DefaultIndent+(e.depth-1)*this.indent,this.renderTreeElement(e,i)}if(void 0!==e.renderIndentGuides){let t=e.renderIndentGuides!==n.None;if(t!==this.shouldRenderIndentGuides){for(let[e,i]of(this.shouldRenderIndentGuides=t,this.renderedNodes))this._renderIndentGuides(e,i);if(this.indentGuidesDisposable.dispose(),t){let e=new k.Cm;this.activeNodes.onDidChange(this._onDidChangeActiveNodes,this,e),this.indentGuidesDisposable=e,this._onDidChangeActiveNodes(this.activeNodes.elements)}}}void 0!==e.hideTwistiesOfChildlessElements&&(this.hideTwistiesOfChildlessElements=e.hideTwistiesOfChildlessElements)}renderTemplate(e){let t=(0,a.BC)(e,(0,a.$)(".monaco-tl-row")),i=(0,a.BC)(t,(0,a.$)(".monaco-tl-indent")),n=(0,a.BC)(t,(0,a.$)(".monaco-tl-twistie")),s=(0,a.BC)(t,(0,a.$)(".monaco-tl-contents")),o=this.renderer.renderTemplate(s);return{container:e,indent:i,twistie:n,indentGuidesDisposable:k.jG.None,indentSize:0,templateData:o}}renderElement(e,t,i,n){i.indentSize=O.DefaultIndent+(e.depth-1)*this.indent,this.renderedNodes.set(e,i),this.renderedElements.set(e.element,e),this.renderTreeElement(e,i),this.renderer.renderElement(e,t,i.templateData,{...n,indent:i.indentSize})}disposeElement(e,t,i,n){i.indentGuidesDisposable.dispose(),this.renderer.disposeElement?.(e,t,i.templateData,{...n,indent:i.indentSize}),"number"==typeof n?.height&&(this.renderedNodes.delete(e),this.renderedElements.delete(e.element))}disposeTemplate(e){this.renderer.disposeTemplate(e.templateData)}onDidChangeTwistieState(e){let t=this.renderedElements.get(e);t&&this.onDidChangeNodeTwistieState(t)}onDidChangeNodeTwistieState(e){let t=this.renderedNodes.get(e);t&&(this._onDidChangeActiveNodes(this.activeNodes.elements),this.renderTreeElement(e,t))}renderTreeElement(e,t){t.twistie.style.paddingLeft=`${t.indentSize}px`,t.indent.style.width=`${t.indentSize+this.indent-16}px`,e.collapsible?t.container.setAttribute("aria-expanded",String(!e.collapsed)):t.container.removeAttribute("aria-expanded"),t.twistie.classList.remove(...C.L.asClassNameArray(b.W.treeItemExpanded));let i=!1;this.renderer.renderTwistie&&(i=this.renderer.renderTwistie(e.element,t.twistie)),e.collapsible&&(!this.hideTwistiesOfChildlessElements||e.visibleChildrenCount>0)?(i||t.twistie.classList.add(...C.L.asClassNameArray(b.W.treeItemExpanded)),t.twistie.classList.add("collapsible"),t.twistie.classList.toggle("collapsed",e.collapsed)):t.twistie.classList.remove("collapsible","collapsed"),this._renderIndentGuides(e,t)}_renderIndentGuides(e,t){if((0,a.w_)(t.indent),t.indentGuidesDisposable.dispose(),!this.shouldRenderIndentGuides)return;let i=new k.Cm;for(;;){let n=this.model.getNodeLocation(e),s=this.model.getParentNodeLocation(n);if(!s)break;let o=this.model.getNode(s),r=(0,a.$)(".indent-guide",{style:`width: ${this.indent}px`});this.activeIndentNodes.has(o)&&r.classList.add("active"),0===t.indent.childElementCount?t.indent.appendChild(r):t.indent.insertBefore(r,t.indent.firstElementChild),this.renderedIndentGuides.add(o,r),i.add((0,k.s)(()=>this.renderedIndentGuides.delete(o,r))),e=o}t.indentGuidesDisposable=i}_onDidChangeActiveNodes(e){if(!this.shouldRenderIndentGuides)return;let t=new Set;e.forEach(e=>{let i=this.model.getNodeLocation(e);try{let n=this.model.getParentNodeLocation(i);e.collapsible&&e.children.length>0&&!e.collapsed?t.add(e):n&&t.add(this.model.getNode(n))}catch{}}),this.activeIndentNodes.forEach(e=>{t.has(e)||this.renderedIndentGuides.forEach(e,e=>e.classList.remove("active"))}),t.forEach(e=>{this.activeIndentNodes.has(e)||this.renderedIndentGuides.forEach(e,e=>e.classList.add("active"))}),this.activeIndentNodes=t}dispose(){this.renderedNodes.clear(),this.renderedElements.clear(),this.indentGuidesDisposable.dispose(),(0,k.AS)(this.disposables)}}class P{get totalCount(){return this._totalCount}get matchCount(){return this._matchCount}set findMatchType(e){this._findMatchType=e}get findMatchType(){return this._findMatchType}set findMode(e){this._findMode=e}get findMode(){return this._findMode}constructor(e,t,i){this._keyboardNavigationLabelProvider=e,this._filter=t,this._defaultFindVisibility=i,this._totalCount=0,this._matchCount=0,this._findMatchType=o.Fuzzy,this._findMode=s.Highlight,this._pattern="",this._lowercasePattern="",this.disposables=new k.Cm}filter(e,t){let i=1;if(this._filter){let n=this._filter.filter(e,t);if(0===(i="boolean"==typeof n?+!!n:(0,m.iZ)(n)?(0,m.Mn)(n.visibility):n))return!1}if(this._totalCount++,!this._pattern)return this._matchCount++,{data:S.ne.Default,visibility:i};let n=this._keyboardNavigationLabelProvider.getKeyboardNavigationLabel(e),r=Array.isArray(n)?n:[n];for(let e of r){let t,n=e&&e.toString();if(void 0===n)return{data:S.ne.Default,visibility:i};if(t=this._findMatchType===o.Contiguous?function(e,t){let i,n=t.toLowerCase().indexOf(e);if(n>-1){i=[Number.MAX_SAFE_INTEGER,0];for(let t=e.length;t>0;t--)i.push(n+t-1)}return i}(this._lowercasePattern,n.toLowerCase()):(0,S.dt)(this._pattern,this._lowercasePattern,0,n,n.toLowerCase(),0,{firstMatchCanBeWeak:!0,boostFullMatch:!0}))return this._matchCount++,1===r.length?{data:t,visibility:i}:{data:{label:n,score:t},visibility:i}}return this._findMode!==s.Filter?{data:S.ne.Default,visibility:i}:"number"==typeof this._defaultFindVisibility?this._defaultFindVisibility:this._defaultFindVisibility?this._defaultFindVisibility(e):2}reset(){this._totalCount=0,this._matchCount=0}dispose(){(0,k.AS)(this.disposables)}}p.lM;class A{constructor(e){this.stateMap=new Map(e.map(e=>[e.id,{...e}]))}get(e){let t=this.stateMap.get(e);if(void 0===t)throw Error(`No state found for toggle id ${e}`);return t.isChecked}set(e,t){let i=this.stateMap.get(e);if(void 0===i)throw Error(`No state found for toggle id ${e}`);return i.isChecked!==t&&(i.isChecked=t,!0)}}c.x8,p.FH,!function(e){e[e.Highlight=0]="Highlight",e[e.Filter=1]="Filter"}(s||(s={})),function(e){e[e.Fuzzy=0]="Fuzzy",e[e.Contiguous=1]="Contiguous"}(o||(o={})),k.jG,function(e){e.Mode="mode",e.MatchType="matchType"}(r||(r={}));class F{get pattern(){return this._pattern}get placeholder(){return this._placeholder}set placeholder(e){this._placeholder=e,this.widget?.setPlaceHolder(e)}constructor(e,t,i,n={}){this.tree=e,this.filter=t,this.contextViewProvider=i,this.options=n,this._pattern="",this._onDidChangePattern=new y.vl,this._onDidChangeOpenState=new y.vl,this.onDidChangeOpenState=this._onDidChangeOpenState.event,this.enabledDisposables=new k.Cm,this.disposables=new k.Cm,this.toggles=new A(n.toggles??[]),this._placeholder=n.placeholder??(0,L.kg)(20,"Type to search")}isOpened(){return!!this.widget}updateToggleState(e,t){this.toggles.set(e,t),this.widget?.setToggleState(e,t)}renderMessage(e,t){e?this.tree.options.showNotFoundMessage??!0?this.widget?.showMessage({type:2,content:t??(0,L.kg)(21,"No results found.")}):this.widget?.showMessage({type:2}):this.widget?.clearMessage()}alertResults(e){e?(0,I.xE)((0,L.kg)(23,"{0} results",e)):(0,I.xE)((0,L.kg)(22,"No results"))}dispose(){this._history=void 0,this._onDidChangePattern.dispose(),this.enabledDisposables.dispose(),this.disposables.dispose()}}class B extends F{get mode(){return this.toggles.get(r.Mode)?s.Filter:s.Highlight}set mode(e){if(e===this.mode)return;let t=e===s.Filter;this.updateToggleState(r.Mode,t),this.placeholder=t?(0,L.kg)(24,"Type to filter"):(0,L.kg)(25,"Type to search"),this.filter.findMode=e,this.tree.refilter(),this.render(),this._onDidChangeMode.fire(e)}get matchType(){return this.toggles.get(r.MatchType)?o.Fuzzy:o.Contiguous}set matchType(e){e!==this.matchType&&(this.updateToggleState(r.MatchType,e===o.Fuzzy),this.filter.findMatchType=e,this.tree.refilter(),this.render(),this._onDidChangeMatchType.fire(e))}constructor(e,t,i,n={}){let a=n.defaultFindMode??s.Highlight,l=n.defaultFindMatchType??o.Fuzzy,h=[{id:r.Mode,icon:b.W.listFilter,title:(0,L.kg)(26,"Filter"),isChecked:a===s.Filter},{id:r.MatchType,icon:b.W.searchFuzzy,title:(0,L.kg)(27,"Fuzzy Match"),isChecked:l===o.Fuzzy}];t.findMatchType=l,t.findMode=a,super(e,t,i,{...n,toggles:h}),this.filter=t,this._onDidChangeMode=new y.vl,this.onDidChangeMode=this._onDidChangeMode.event,this._onDidChangeMatchType=new y.vl,this.onDidChangeMatchType=this._onDidChangeMatchType.event,this.disposables.add(this.tree.onDidChangeModel(()=>{this.isOpened()&&(0!==this.pattern.length&&this.tree.refilter(),this.render())})),this.disposables.add(this.tree.onWillRefilter(()=>this.filter.reset()))}updateOptions(e={}){void 0!==e.defaultFindMode&&(this.mode=e.defaultFindMode),void 0!==e.defaultFindMatchType&&(this.matchType=e.defaultFindMatchType)}shouldAllowFocus(e){return!this.isOpened()||!this.pattern||this.filter.totalCount>0&&this.filter.matchCount<=1||!S.ne.isDefault(e.filterData)}render(){let e=0===this.filter.matchCount&&this.filter.totalCount>0&&this.pattern.length>0;this.renderMessage(e),this.pattern.length&&this.alertResults(this.filter.matchCount)}}function W(e,t){return e.position===t.position&&H(e,t)}function H(e,t){return e.node.element===t.node.element&&e.startIndex===t.startIndex&&e.height===t.height&&e.endIndex===t.endIndex}class V{constructor(e=[]){this.stickyNodes=e}get count(){return this.stickyNodes.length}equal(e){return(0,_.aI)(this.stickyNodes,e.stickyNodes,W)}contains(e){return this.stickyNodes.some(t=>t.node.element===e.element)}lastNodePartiallyVisible(){if(0===this.count)return!1;let e=this.stickyNodes[this.count-1];if(1===this.count)return 0!==e.position;let t=this.stickyNodes[this.count-2];return t.position+t.height!==e.position}animationStateChanged(e){if(!(0,_.aI)(this.stickyNodes,e.stickyNodes,H)||0===this.count)return!1;let t=this.stickyNodes[this.count-1],i=e.stickyNodes[e.count-1];return t.position!==i.position}}class z{constrainStickyScrollNodes(e,t,i){for(let n=0;n<e.length;n++){let s=e[n];if(s.position+s.height>i||n>=t)return e.slice(0,n)}return e}}class U extends k.jG{constructor(e,t,i,n,s,o={}){super(),this.tree=e,this.model=t,this.view=i,this.treeDelegate=s,this.maxWidgetViewRatio=.4;let r=this.validateStickySettings(o);this.stickyScrollMaxItemCount=r.stickyScrollMaxItemCount,this.stickyScrollDelegate=o.stickyScrollDelegate??new z,this.paddingTop=o.paddingTop??0,this._widget=this._register(new j(i.getScrollableElement(),i,e,n,s,o.accessibilityProvider)),this.onDidChangeHasFocus=this._widget.onDidChangeHasFocus,this.onContextMenu=this._widget.onContextMenu,this._register(i.onDidScroll(()=>this.update())),this._register(i.onDidChangeContentHeight(()=>this.update())),this._register(e.onDidChangeCollapseState(()=>this.update())),this._register(t.onDidSpliceRenderedNodes(e=>{let t=this._widget.state;if(t){if(e.deleteCount>0&&t.stickyNodes.some(e=>!this.model.has(this.model.getNodeLocation(e.node))))return void this.update();t.stickyNodes.some(i=>{let n=this.model.getListIndex(this.model.getNodeLocation(i.node));return n>=e.start&&n<e.start+e.deleteCount&&t.contains(i.node)})&&this._widget.rerender()}})),this.update()}get height(){return this._widget.height}getNodeAtHeight(e){let t;if(!((t=0===e?this.view.firstVisibleIndex:this.view.indexAt(e+this.view.scrollTop))<0)&&!(t>=this.view.length))return this.view.element(t)}update(){let e=this.getNodeAtHeight(this.paddingTop);if(!e||this.tree.scrollTop<=this.paddingTop)return void this._widget.setState(void 0);let t=this.findStickyState(e);this._widget.setState(t)}findStickyState(e){let t=[],i=e,n=0,s=this.getNextStickyNode(i,void 0,n);for(;s&&(t.push(s),n+=s.height,!(t.length<=this.stickyScrollMaxItemCount)||(i=this.getNextVisibleNode(s)));)s=this.getNextStickyNode(i,s.node,n);let o=this.constrainStickyNodes(t);return o.length?new V(o):void 0}getNextVisibleNode(e){return this.getNodeAtHeight(e.position+e.height)}getNextStickyNode(e,t,i){let n=this.getAncestorUnderPrevious(e,t);if(n){if(n===e&&(!this.nodeIsUncollapsedParent(e)||this.nodeTopAlignsWithStickyNodesBottom(e,i)))return;return this.createStickyScrollNode(n,i)}}nodeTopAlignsWithStickyNodesBottom(e,t){let i=this.getNodeIndex(e),n=this.view.getElementTop(i);return this.view.scrollTop===n-t}createStickyScrollNode(e,t){let i=this.treeDelegate.getHeight(e),{startIndex:n,endIndex:s}=this.getNodeRange(e);return{node:e,position:this.calculateStickyNodePosition(s,t,i),height:i,startIndex:n,endIndex:s}}getAncestorUnderPrevious(e,t){let i=e,n=this.getParentNode(i);for(;n;){if(n===t)return i;i=n,n=this.getParentNode(i)}if(void 0===t)return i}calculateStickyNodePosition(e,t,i){let n=this.view.getRelativeTop(e);if(null===n&&this.view.firstVisibleIndex===e&&e+1<this.view.length){let t=this.treeDelegate.getHeight(this.view.element(e)),i=this.view.getRelativeTop(e+1);n=i?i-t/this.view.renderHeight:null}if(null===n)return t;let s=this.view.element(e),o=this.treeDelegate.getHeight(s),r=n*this.view.renderHeight+o;return t+i>r&&t<=r?r-i:t}constrainStickyNodes(e){if(0===e.length)return[];let t=this.view.renderHeight*this.maxWidgetViewRatio,i=e[e.length-1];if(e.length<=this.stickyScrollMaxItemCount&&i.position+i.height<=t)return e;let n=this.stickyScrollDelegate.constrainStickyScrollNodes(e,this.stickyScrollMaxItemCount,t);if(!n.length)return[];let s=n[n.length-1];if(n.length>this.stickyScrollMaxItemCount||s.position+s.height>t)throw Error("stickyScrollDelegate violates constraints");return n}getParentNode(e){let t=this.model.getNodeLocation(e),i=this.model.getParentNodeLocation(t);return i?this.model.getNode(i):void 0}nodeIsUncollapsedParent(e){let t=this.model.getNodeLocation(e);return this.model.getListRenderCount(t)>1}getNodeIndex(e){let t=this.model.getNodeLocation(e);return this.model.getListIndex(t)}getNodeRange(e){let t=this.model.getNodeLocation(e),i=this.model.getListIndex(t);if(i<0)throw Error("Node not found in tree");return{startIndex:i,endIndex:i+this.model.getListRenderCount(t)-1}}nodePositionTopBelowWidget(e){let t=[],i=this.getParentNode(e);for(;i;)t.push(i),i=this.getParentNode(i);let n=0;for(let e=0;e<t.length&&e<this.stickyScrollMaxItemCount;e++)n+=this.treeDelegate.getHeight(t[e]);return n}domFocus(){this._widget.domFocus()}focusedLast(){return this._widget.focusedLast()}updateOptions(e={}){if(void 0!==e.paddingTop&&(this.paddingTop=e.paddingTop),void 0!==e.stickyScrollMaxItemCount){let t=this.validateStickySettings(e);this.stickyScrollMaxItemCount!==t.stickyScrollMaxItemCount&&(this.stickyScrollMaxItemCount=t.stickyScrollMaxItemCount,this.update())}}validateStickySettings(e){let t=7;return"number"==typeof e.stickyScrollMaxItemCount&&(t=Math.max(e.stickyScrollMaxItemCount,1)),{stickyScrollMaxItemCount:t}}}class j{get state(){return this._previousState}constructor(e,t,i,n,s,o){this.view=t,this.tree=i,this.treeRenderers=n,this.treeDelegate=s,this.accessibilityProvider=o,this._previousElements=[],this._previousStateDisposables=new k.Cm,this._rootDomNode=(0,a.$)(".monaco-tree-sticky-container.empty"),e.appendChild(this._rootDomNode);let r=(0,a.$)(".monaco-tree-sticky-container-shadow");this._rootDomNode.appendChild(r),this.stickyScrollFocus=new $(this._rootDomNode,t),this.onDidChangeHasFocus=this.stickyScrollFocus.onDidChangeHasFocus,this.onContextMenu=this.stickyScrollFocus.onContextMenu}get height(){if(!this._previousState)return 0;let e=this._previousState.stickyNodes[this._previousState.count-1];return e.position+e.height}setState(e){let t=!!this._previousState&&this._previousState.count>0,i=!!e&&e.count>0;if(!t&&!i||t&&i&&this._previousState.equal(e))return;if(t!==i&&this.setVisible(i),!i){this._previousState=void 0,this._previousElements=[],this._previousStateDisposables.clear();return}let n=e.stickyNodes[e.count-1];this._previousState&&e.animationStateChanged(this._previousState)?this._previousElements[this._previousState.count-1].style.top=`${n.position}px`:this.renderState(e),this._previousState=e,this._rootDomNode.style.height=`${n.position+n.height}px`}renderState(e){this._previousStateDisposables.clear();let t=Array(e.count);for(let i=e.count-1;i>=0;i--){let n=e.stickyNodes[i],{element:s,disposable:o}=this.createElement(n,i,e.count);t[i]=s,this._rootDomNode.appendChild(s),this._previousStateDisposables.add(o)}this.stickyScrollFocus.updateElements(t,e),this._previousElements=t}rerender(){this._previousState&&this.renderState(this._previousState)}createElement(e,t,i){let n=e.startIndex,s=document.createElement("div");s.style.top=`${e.position}px`,!1!==this.tree.options.setRowHeight&&(s.style.height=`${e.height}px`),!1!==this.tree.options.setRowLineHeight&&(s.style.lineHeight=`${e.height}px`),s.classList.add("monaco-tree-sticky-row"),s.classList.add("monaco-list-row"),s.setAttribute("data-index",`${n}`),s.setAttribute("data-parity",n%2==0?"even":"odd"),s.setAttribute("id",this.view.getElementID(n));let o=this.setAccessibilityAttributes(s,e.node.element,t,i),r=this.treeDelegate.getTemplateId(e.node),a=this.treeRenderers.find(e=>e.templateId===r);if(!a)throw Error(`No renderer found for template id ${r}`);let l=e.node;l===this.tree.getNode(this.tree.getNodeLocation(e.node))&&(l=new Proxy(e.node,{}));let h=a.renderTemplate(s);a.renderElement(l,e.startIndex,h,{height:e.height});let d=(0,k.s)(()=>{o.dispose(),a.disposeElement(l,e.startIndex,h,{height:e.height}),a.disposeTemplate(h),s.remove()});return{element:s,disposable:d}}setAccessibilityAttributes(e,t,i,n){if(!this.accessibilityProvider)return k.jG.None;this.accessibilityProvider.getSetSize&&e.setAttribute("aria-setsize",String(this.accessibilityProvider.getSetSize(t,i,n))),this.accessibilityProvider.getPosInSet&&e.setAttribute("aria-posinset",String(this.accessibilityProvider.getPosInSet(t,i))),this.accessibilityProvider.getRole&&e.setAttribute("role",this.accessibilityProvider.getRole(t)??"treeitem");let s=this.accessibilityProvider.getAriaLabel(t),o=s&&"string"!=typeof s?s:(0,D.lk)(s),r=(0,D.fm)(t=>{let i=t.readObservable(o);i?e.setAttribute("aria-label",i):e.removeAttribute("aria-label")});"string"==typeof s||s&&e.setAttribute("aria-label",s.get());let a=this.accessibilityProvider.getAriaLevel&&this.accessibilityProvider.getAriaLevel(t);return"number"==typeof a&&e.setAttribute("aria-level",`${a}`),e.setAttribute("aria-selected",String(!1)),r}setVisible(e){this._rootDomNode.classList.toggle("empty",!e),e||this.stickyScrollFocus.updateElements([],void 0)}domFocus(){this.stickyScrollFocus.domFocus()}focusedLast(){return this.stickyScrollFocus.focusedLast()}dispose(){this.stickyScrollFocus.dispose(),this._previousStateDisposables.dispose(),this._rootDomNode.remove()}}class $ extends k.jG{get domHasFocus(){return this._domHasFocus}set domHasFocus(e){e!==this._domHasFocus&&(this._onDidChangeHasFocus.fire(e),this._domHasFocus=e)}constructor(e,t){super(),this.container=e,this.view=t,this.focusedIndex=-1,this.elements=[],this._onDidChangeHasFocus=new y.vl,this.onDidChangeHasFocus=this._onDidChangeHasFocus.event,this._onContextMenu=new y.vl,this.onContextMenu=this._onContextMenu.event,this._domHasFocus=!1,this._register((0,a.ko)(this.container,"focus",()=>this.onFocus())),this._register((0,a.ko)(this.container,"blur",()=>this.onBlur())),this._register(this.view.onDidFocus(()=>this.toggleStickyScrollFocused(!1))),this._register(this.view.onKeyDown(e=>this.onKeyDown(e))),this._register(this.view.onMouseDown(e=>this.onMouseDown(e))),this._register(this.view.onContextMenu(e=>this.handleContextMenu(e)))}handleContextMenu(e){let t=e.browserEvent.target;if(!(0,g.Es)(t)&&!(0,g.xu)(t)){this.focusedLast()&&this.view.domFocus();return}if(!(0,a.kx)(e.browserEvent)){if(!this.state)throw Error("Context menu should not be triggered when state is undefined");let t=this.state.stickyNodes.findIndex(t=>t.node.element===e.element?.element);if(-1===t)throw Error("Context menu should not be triggered when element is not in sticky scroll widget");this.container.focus(),this.setFocus(t);return}if(!this.state||this.focusedIndex<0)throw Error("Context menu key should not be triggered when focus is not in sticky scroll widget");let i=this.state.stickyNodes[this.focusedIndex].node.element,n=this.elements[this.focusedIndex];this._onContextMenu.fire({element:i,anchor:n,browserEvent:e.browserEvent,isStickyScroll:!0})}onKeyDown(e){if(this.domHasFocus&&this.state){if("ArrowUp"===e.key)this.setFocusedElement(Math.max(0,this.focusedIndex-1)),e.preventDefault(),e.stopPropagation();else if("ArrowDown"===e.key||"ArrowRight"===e.key){if(this.focusedIndex>=this.state.count-1){let e=this.state.stickyNodes[this.state.count-1].startIndex+1;this.view.domFocus(),this.view.setFocus([e]),this.scrollNodeUnderWidget(e,this.state)}else this.setFocusedElement(this.focusedIndex+1);e.preventDefault(),e.stopPropagation()}}}onMouseDown(e){let t=e.browserEvent.target;((0,g.Es)(t)||(0,g.xu)(t))&&(e.browserEvent.preventDefault(),e.browserEvent.stopPropagation())}updateElements(e,t){if(t&&0===t.count)throw Error("Sticky scroll state must be undefined when there are no sticky nodes");if(t&&t.count!==e.length)throw Error("Sticky scroll focus received illigel state");let i=this.focusedIndex;if(this.removeFocus(),this.elements=e,this.state=t,t){let e=(0,x.qE)(i,0,t.count-1);this.setFocus(e)}else this.domHasFocus&&this.view.domFocus();this.container.tabIndex=t?0:-1}setFocusedElement(e){let t=this.state;if(!t)throw Error("Cannot set focus when state is undefined");if(this.setFocus(e),!(e<t.count-1)&&t.lastNodePartiallyVisible()){let i=t.stickyNodes[e];this.scrollNodeUnderWidget(i.endIndex+1,t)}}scrollNodeUnderWidget(e,t){let i=t.stickyNodes[t.count-1],n=t.count>1?t.stickyNodes[t.count-2]:void 0,s=this.view.getElementTop(e),o=n?n.position+n.height+i.height:i.height;this.view.scrollTop=s-o}domFocus(){if(!this.state)throw Error("Cannot focus when state is undefined");this.container.focus()}focusedLast(){return!!this.state&&this.view.getHTMLElement().classList.contains("sticky-scroll-focused")}removeFocus(){-1!==this.focusedIndex&&(this.toggleElementFocus(this.elements[this.focusedIndex],!1),this.focusedIndex=-1)}setFocus(e){if(0>e)throw Error("addFocus() can not remove focus");if(!this.state&&e>=0)throw Error("Cannot set focus index when state is undefined");if(this.state&&e>=this.state.count)throw Error("Cannot set focus index to an index that does not exist");let t=this.focusedIndex;t>=0&&this.toggleElementFocus(this.elements[t],!1),e>=0&&this.toggleElementFocus(this.elements[e],!0),this.focusedIndex=e}toggleElementFocus(e,t){this.toggleElementActiveFocus(e,t&&this.domHasFocus),this.toggleElementPassiveFocus(e,t)}toggleCurrentElementActiveFocus(e){-1!==this.focusedIndex&&this.toggleElementActiveFocus(this.elements[this.focusedIndex],e)}toggleElementActiveFocus(e,t){e.classList.toggle("focused",t)}toggleElementPassiveFocus(e,t){e.classList.toggle("passive-focused",t)}toggleStickyScrollFocused(e){this.view.getHTMLElement().classList.toggle("sticky-scroll-focused",e)}onFocus(){if(!this.state||0===this.elements.length)throw Error("Cannot focus when state is undefined or elements are empty");this.domHasFocus=!0,this.toggleStickyScrollFocused(!0),this.toggleCurrentElementActiveFocus(!0),-1===this.focusedIndex&&this.setFocus(0)}onBlur(){this.domHasFocus=!1,this.toggleCurrentElementActiveFocus(!1)}dispose(){this.toggleStickyScrollFocused(!1),this._onDidChangeHasFocus.fire(!1),super.dispose()}}function K(e){let t=f.Lx.Unknown;return(0,a.XD)(e.browserEvent.target,"monaco-tl-twistie","monaco-tl-row")?t=f.Lx.Twistie:(0,a.XD)(e.browserEvent.target,"monaco-tl-contents","monaco-tl-row")?t=f.Lx.Element:(0,a.XD)(e.browserEvent.target,"monaco-tree-type-filter","monaco-list")&&(t=f.Lx.Filter),{browserEvent:e.browserEvent,element:e.element?e.element.element:null,target:t}}function G(e){let t=(0,g.Es)(e.browserEvent.target);return{element:e.element?e.element.element:null,browserEvent:e.browserEvent,anchor:e.anchor,isStickyScroll:t}}function q(e,t){t(e),e.children.forEach(e=>q(e,t))}class Q{get nodeSet(){return this._nodeSet||(this._nodeSet=this.createNodeSet()),this._nodeSet}constructor(e,t){this.getFirstViewElementWithTrait=e,this.identityProvider=t,this.nodes=[],this._onDidChange=new y.vl,this.onDidChange=this._onDidChange.event}set(e,t){!t?.__forceEvent&&(0,_.aI)(this.nodes,e)||this._set(e,!1,t)}_set(e,t,i){if(this.nodes=[...e],this.elements=void 0,this._nodeSet=void 0,!t){let e=this;this._onDidChange.fire({get elements(){return e.get()},browserEvent:i})}}get(){return this.elements||(this.elements=this.nodes.map(e=>e.element)),[...this.elements]}getNodes(){return this.nodes}has(e){return this.nodeSet.has(e)}onDidModelSplice({insertedNodes:e,deletedNodes:t}){if(!this.identityProvider){let e=this.createNodeSet(),i=t=>e.delete(t);t.forEach(e=>q(e,i)),this.set([...e.values()]);return}let i=new Set,n=e=>i.add(this.identityProvider.getId(e.element).toString());t.forEach(e=>q(e,n));let s=new Map,o=e=>s.set(this.identityProvider.getId(e.element).toString(),e);e.forEach(e=>q(e,o));let r=[];for(let e of this.nodes){let t=this.identityProvider.getId(e.element).toString();if(i.has(t)){let e=s.get(t);e&&e.visible&&r.push(e)}else r.push(e)}if(this.nodes.length>0&&0===r.length){let e=this.getFirstViewElementWithTrait();e&&r.push(e)}this._set(r,!0)}createNodeSet(){let e=new Set;for(let t of this.nodes)e.add(t);return e}}class Y extends g.MH{constructor(e,t,i){super(e),this.tree=t,this.stickyScrollProvider=i}onViewPointer(e){if((0,g.Bm)(e.browserEvent.target)||(0,a.yD)(e.browserEvent.target)||(0,g.bm)(e.browserEvent.target)||e.browserEvent.isHandledByList)return;let t=e.element;if(!t||this.isSelectionRangeChangeEvent(e)||this.isSelectionSingleChangeEvent(e))return super.onViewPointer(e);let i=e.browserEvent.target,n=i.classList.contains("monaco-tl-twistie")||i.classList.contains("monaco-icon-label")&&i.classList.contains("folder-icon")&&e.browserEvent.offsetX<16,s=(0,g.xu)(e.browserEvent.target),o=!1;if(o=!!s||("function"==typeof this.tree.expandOnlyOnTwistieClick?this.tree.expandOnlyOnTwistieClick(t.element):!!this.tree.expandOnlyOnTwistieClick),s)this.handleStickyScrollMouseEvent(e,t);else if(o&&!n&&2!==e.browserEvent.detail||!this.tree.expandOnDoubleClick&&2===e.browserEvent.detail)return super.onViewPointer(e);if(t.collapsible&&(!s||n)){let i=this.tree.getNodeLocation(t),s=e.browserEvent.altKey;if(this.tree.setFocus([i]),this.tree.toggleCollapsed(i,s),n){e.browserEvent.isHandledByList=!0;return}}s||super.onViewPointer(e)}handleStickyScrollMouseEvent(e,t){if((0,g.b$)(e.browserEvent.target)||(0,g.W0)(e.browserEvent.target))return;let i=this.stickyScrollProvider();if(!i)throw Error("Sticky scroll controller not found");let n=this.list.indexOf(t),s=this.list.getElementTop(n),o=i.nodePositionTopBelowWidget(t);this.tree.scrollTop=s-o,this.list.domFocus(),this.list.setFocus([n]),this.list.setSelection([n])}onDoubleClick(e){!e.browserEvent.target.classList.contains("monaco-tl-twistie")&&this.tree.expandOnDoubleClick&&(e.browserEvent.isHandledByList||super.onDoubleClick(e))}onMouseDown(e){let t=e.browserEvent.target;if(!(0,g.Es)(t)&&!(0,g.xu)(t))return void super.onMouseDown(e)}onContextMenu(e){let t=e.browserEvent.target;if(!(0,g.Es)(t)&&!(0,g.xu)(t))return void super.onContextMenu(e)}}class Z extends g.B8{constructor(e,t,i,n,s,o,r,a){super(e,t,i,n,a),this.focusTrait=s,this.selectionTrait=o,this.anchorTrait=r}createMouseController(e){return new Y(this,e.tree,e.stickyScrollProvider)}splice(e,t,i=[]){let n;if(super.splice(e,t,i),0===i.length)return;let s=[],o=[];i.forEach((t,i)=>{this.focusTrait.has(t)&&s.push(e+i),this.selectionTrait.has(t)&&o.push(e+i),this.anchorTrait.has(t)&&(n=e+i)}),s.length>0&&super.setFocus((0,_.dM)([...super.getFocus(),...s])),o.length>0&&super.setSelection((0,_.dM)([...super.getSelection(),...o])),"number"==typeof n&&super.setAnchor(n)}setFocus(e,t,i=!1){super.setFocus(e,t),i||this.focusTrait.set(e.map(e=>this.element(e)),t)}setSelection(e,t,i=!1){super.setSelection(e,t),i||this.selectionTrait.set(e.map(e=>this.element(e)),t)}setAnchor(e,t=!1){super.setAnchor(e),t||(void 0===e?this.anchorTrait.set([]):this.anchorTrait.set([this.element(e)]))}}class X{get onDidScroll(){return this.view.onDidScroll}get onDidChangeFocus(){return this.eventBufferer.wrapEvent(this.focus.onDidChange)}get onDidChangeSelection(){return this.eventBufferer.wrapEvent(this.selection.onDidChange)}get onMouseDblClick(){return y.Jh.filter(y.Jh.map(this.view.onMouseDblClick,K),e=>e.target!==f.Lx.Filter)}get onMouseOver(){return y.Jh.map(this.view.onMouseOver,K)}get onMouseOut(){return y.Jh.map(this.view.onMouseOut,K)}get onContextMenu(){return y.Jh.any(y.Jh.filter(y.Jh.map(this.view.onContextMenu,G),e=>!e.isStickyScroll),this.stickyScrollController?.onContextMenu??y.Jh.None)}get onPointer(){return y.Jh.map(this.view.onPointer,K)}get onKeyDown(){return this.view.onKeyDown}get onDidFocus(){return this.view.onDidFocus}get onDidChangeModel(){return y.Jh.any(this.onDidChangeModelRelay.event,this.onDidSwapModel.event)}get onDidChangeCollapseState(){return this.onDidChangeCollapseStateRelay.event}get expandOnDoubleClick(){return void 0===this._options.expandOnDoubleClick||this._options.expandOnDoubleClick}get expandOnlyOnTwistieClick(){return void 0===this._options.expandOnlyOnTwistieClick||this._options.expandOnlyOnTwistieClick}get onDidDispose(){return this.view.onDidDispose}constructor(e,t,i,s,o={}){this._user=e,this._options=o,this.eventBufferer=new y.at,this.onDidChangeFindOpenState=y.Jh.None,this.onDidChangeStickyScrollFocused=y.Jh.None,this.disposables=new k.Cm,this.onDidSwapModel=this.disposables.add(new y.vl),this.onDidChangeModelRelay=this.disposables.add(new y.Wj),this.onDidSpliceModelRelay=this.disposables.add(new y.Wj),this.onDidChangeCollapseStateRelay=this.disposables.add(new y.Wj),this.onDidChangeRenderNodeCountRelay=this.disposables.add(new y.Wj),this.onDidChangeActiveNodesRelay=this.disposables.add(new y.Wj),this._onWillRefilter=new y.vl,this.onWillRefilter=this._onWillRefilter.event,this._onDidUpdateOptions=new y.vl,this.modelDisposables=new k.Cm,o.keyboardNavigationLabelProvider&&(o.findWidgetEnabled??!0)&&(this.findFilter=new P(o.keyboardNavigationLabelProvider,o.filter,o.defaultFindVisibility),o={...o,filter:this.findFilter},this.disposables.add(this.findFilter)),this.model=this.createModel(e,o),this.treeDelegate=new T(i);let r=this.disposables.add(new R(this.onDidChangeActiveNodesRelay.event)),h=new w.db;for(let e of(this.renderers=s.map(e=>new O(e,this.model,this.onDidChangeCollapseStateRelay.event,r,h,o)),this.renderers))this.disposables.add(e);if(this.focus=new Q(()=>this.view.getFocusedElements()[0],o.identityProvider),this.selection=new Q(()=>this.view.getSelectedElements()[0],o.identityProvider),this.anchor=new Q(()=>this.view.getAnchorElement(),o.identityProvider),this.view=new Z(e,t,this.treeDelegate,this.renderers,this.focus,this.selection,this.anchor,{...function(e,t,i){return i&&{...i,identityProvider:i.identityProvider&&{getId:e=>i.identityProvider.getId(e.element)},dnd:i.dnd&&t.add(new M(e,i.dnd)),multipleSelectionController:i.multipleSelectionController&&{isSelectionSingleChangeEvent:e=>i.multipleSelectionController.isSelectionSingleChangeEvent({...e,element:e.element}),isSelectionRangeChangeEvent:e=>i.multipleSelectionController.isSelectionRangeChangeEvent({...e,element:e.element})},accessibilityProvider:i.accessibilityProvider&&{...i.accessibilityProvider,getSetSize(t){let i=e(),n=i.getNodeLocation(t),s=i.getParentNodeLocation(n);return i.getNode(s).visibleChildrenCount},getPosInSet:e=>e.visibleChildIndex+1,isChecked:i.accessibilityProvider&&i.accessibilityProvider.isChecked?e=>i.accessibilityProvider.isChecked(e.element):void 0,getRole:i.accessibilityProvider&&i.accessibilityProvider.getRole?e=>i.accessibilityProvider.getRole(e.element):()=>"treeitem",getAriaLabel:e=>i.accessibilityProvider.getAriaLabel(e.element),getWidgetAriaLabel:()=>i.accessibilityProvider.getWidgetAriaLabel(),getWidgetRole:i.accessibilityProvider&&i.accessibilityProvider.getWidgetRole?()=>i.accessibilityProvider.getWidgetRole():()=>"tree",getAriaLevel:i.accessibilityProvider&&i.accessibilityProvider.getAriaLevel?e=>i.accessibilityProvider.getAriaLevel(e.element):e=>e.depth,getActiveDescendantId:i.accessibilityProvider.getActiveDescendantId&&(e=>i.accessibilityProvider.getActiveDescendantId(e.element))},keyboardNavigationLabelProvider:i.keyboardNavigationLabelProvider&&{...i.keyboardNavigationLabelProvider,getKeyboardNavigationLabel:e=>i.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(e.element)}}}(()=>this.model,this.disposables,o),tree:this,stickyScrollProvider:()=>this.stickyScrollController}),this.setupModel(this.model),!1!==o.keyboardSupport){let e=y.Jh.chain(this.view.onKeyDown,e=>e.filter(e=>!(0,a.yD)(e.target)).map(e=>new d.Z(e)));y.Jh.chain(e,e=>e.filter(e=>15===e.keyCode))(this.onLeftArrow,this,this.disposables),y.Jh.chain(e,e=>e.filter(e=>17===e.keyCode))(this.onRightArrow,this,this.disposables),y.Jh.chain(e,e=>e.filter(e=>10===e.keyCode))(this.onSpace,this,this.disposables)}if((o.findWidgetEnabled??!0)&&o.keyboardNavigationLabelProvider&&o.contextViewProvider){let e={styles:o.findWidgetStyles,defaultFindMode:o.defaultFindMode,defaultFindMatchType:o.defaultFindMatchType,showNotFoundMessage:o.showNotFoundMessage};this.findController=this.disposables.add(new B(this,this.findFilter,o.contextViewProvider,e)),this.focusNavigationFilter=e=>this.findController.shouldAllowFocus(e),this.onDidChangeFindOpenState=this.findController.onDidChangeOpenState,this.onDidChangeFindMode=this.findController.onDidChangeMode,this.onDidChangeFindMatchType=this.findController.onDidChangeMatchType}else this.onDidChangeFindMode=y.Jh.None,this.onDidChangeFindMatchType=y.Jh.None;o.enableStickyScroll&&(this.stickyScrollController=new U(this,this.model,this.view,this.renderers,this.treeDelegate,o),this.onDidChangeStickyScrollFocused=this.stickyScrollController.onDidChangeHasFocus),this.styleElement=(0,l.li)(this.view.getHTMLElement()),this.getHTMLElement().classList.toggle("always",this._options.renderIndentGuides===n.Always)}updateOptions(e={}){for(let t of(this._options={...this._options,...e},this.renderers))t.updateOptions(e);this.view.updateOptions(this._options),this.findController?.updateOptions(e),this.updateStickyScroll(e),this._onDidUpdateOptions.fire(this._options),this.getHTMLElement().classList.toggle("always",this._options.renderIndentGuides===n.Always)}get options(){return this._options}updateStickyScroll(e){!this.stickyScrollController&&this._options.enableStickyScroll?(this.stickyScrollController=new U(this,this.model,this.view,this.renderers,this.treeDelegate,this._options),this.onDidChangeStickyScrollFocused=this.stickyScrollController.onDidChangeHasFocus):this.stickyScrollController&&!this._options.enableStickyScroll&&(this.onDidChangeStickyScrollFocused=y.Jh.None,this.stickyScrollController.dispose(),this.stickyScrollController=void 0),this.stickyScrollController?.updateOptions(e)}getHTMLElement(){return this.view.getHTMLElement()}get onDidChangeContentHeight(){return this.view.onDidChangeContentHeight}get scrollTop(){return this.view.scrollTop}set scrollTop(e){this.view.scrollTop=e}get scrollHeight(){return this.view.scrollHeight}get renderHeight(){return this.view.renderHeight}get ariaLabel(){return this.view.ariaLabel}set ariaLabel(e){this.view.ariaLabel=e}domFocus(){this.stickyScrollController?.focusedLast()?this.stickyScrollController.domFocus():this.view.domFocus()}layout(e,t){this.view.layout(e,t)}style(e){let t=`.${this.view.domId}`,i=[];e.treeIndentGuidesStroke&&(i.push(`.monaco-list${t}:hover .monaco-tl-indent > .indent-guide, .monaco-list${t}.always .monaco-tl-indent > .indent-guide { opacity: 1; border-color: ${e.treeInactiveIndentGuidesStroke}; }`),i.push(`.monaco-list${t} .monaco-tl-indent > .indent-guide.active { opacity: 1; border-color: ${e.treeIndentGuidesStroke}; }`));let n=e.treeStickyScrollBackground??e.listBackground;n&&(i.push(`.monaco-list${t} .monaco-scrollable-element .monaco-tree-sticky-container { background-color: ${n}; }`),i.push(`.monaco-list${t} .monaco-scrollable-element .monaco-tree-sticky-container .monaco-tree-sticky-row { background-color: ${n}; }`)),e.treeStickyScrollBorder&&i.push(`.monaco-list${t} .monaco-scrollable-element .monaco-tree-sticky-container { border-bottom: 1px solid ${e.treeStickyScrollBorder}; }`),e.treeStickyScrollShadow&&i.push(`.monaco-list${t} .monaco-scrollable-element .monaco-tree-sticky-container .monaco-tree-sticky-container-shadow { box-shadow: ${e.treeStickyScrollShadow} 0 6px 6px -6px inset; height: 3px; }`),e.listFocusForeground&&(i.push(`.monaco-list${t}.sticky-scroll-focused .monaco-scrollable-element .monaco-tree-sticky-container:focus .monaco-list-row.focused { color: ${e.listFocusForeground}; }`),i.push(`.monaco-list${t}:not(.sticky-scroll-focused) .monaco-scrollable-element .monaco-tree-sticky-container .monaco-list-row.focused { color: inherit; }`));let s=(0,h.gI)(e.listFocusAndSelectionOutline,(0,h.gI)(e.listSelectionOutline,e.listFocusOutline??""));s&&(i.push(`.monaco-list${t}.sticky-scroll-focused .monaco-scrollable-element .monaco-tree-sticky-container:focus .monaco-list-row.focused.selected { outline: 1px solid ${s}; outline-offset: -1px;}`),i.push(`.monaco-list${t}:not(.sticky-scroll-focused) .monaco-scrollable-element .monaco-tree-sticky-container .monaco-list-row.focused.selected { outline: inherit;}`)),e.listFocusOutline&&(i.push(`.monaco-list${t}.sticky-scroll-focused .monaco-scrollable-element .monaco-tree-sticky-container:focus .monaco-list-row.focused { outline: 1px solid ${e.listFocusOutline}; outline-offset: -1px; }`),i.push(`.monaco-list${t}:not(.sticky-scroll-focused) .monaco-scrollable-element .monaco-tree-sticky-container .monaco-list-row.focused { outline: inherit; }`),i.push(`.monaco-workbench.context-menu-visible .monaco-list${t}.last-focused.sticky-scroll-focused .monaco-scrollable-element .monaco-tree-sticky-container .monaco-list-row.passive-focused { outline: 1px solid ${e.listFocusOutline}; outline-offset: -1px; }`),i.push(`.monaco-workbench.context-menu-visible .monaco-list${t}.last-focused.sticky-scroll-focused .monaco-list-rows .monaco-list-row.focused { outline: inherit; }`),i.push(`.monaco-workbench.context-menu-visible .monaco-list${t}.last-focused:not(.sticky-scroll-focused) .monaco-tree-sticky-container .monaco-list-rows .monaco-list-row.focused { outline: inherit; }`)),this.styleElement.textContent=i.join("\n"),this.view.style(e)}getParentElement(e){let t=this.model.getParentNodeLocation(e);return this.model.getNode(t).element}getFirstElementChild(e){return this.model.getFirstElementChild(e)}getNode(e){return this.model.getNode(e)}getNodeLocation(e){return this.model.getNodeLocation(e)}collapse(e,t=!1){return this.model.setCollapsed(e,!0,t)}expand(e,t=!1){return this.model.setCollapsed(e,!1,t)}toggleCollapsed(e,t=!1){return this.model.setCollapsed(e,void 0,t)}isCollapsible(e){return this.model.isCollapsible(e)}setCollapsible(e,t){return this.model.setCollapsible(e,t)}isCollapsed(e){return this.model.isCollapsed(e)}refilter(){this._onWillRefilter.fire(void 0),this.model.refilter()}setSelection(e,t){this.eventBufferer.bufferEvents(()=>{let i=e.map(e=>this.model.getNode(e));this.selection.set(i,t);let n=e.map(e=>this.model.getListIndex(e)).filter(e=>e>-1);this.view.setSelection(n,t,!0)})}getSelection(){return this.selection.get()}setFocus(e,t){this.eventBufferer.bufferEvents(()=>{let i=e.map(e=>this.model.getNode(e));this.focus.set(i,t);let n=e.map(e=>this.model.getListIndex(e)).filter(e=>e>-1);this.view.setFocus(n,t,!0)})}focusNext(e=1,t=!1,i,n=(0,a.kx)(i)&&i.altKey?void 0:this.focusNavigationFilter){this.view.focusNext(e,t,i,n)}focusPrevious(e=1,t=!1,i,n=(0,a.kx)(i)&&i.altKey?void 0:this.focusNavigationFilter){this.view.focusPrevious(e,t,i,n)}focusNextPage(e,t=(0,a.kx)(e)&&e.altKey?void 0:this.focusNavigationFilter){return this.view.focusNextPage(e,t)}focusPreviousPage(e,t=(0,a.kx)(e)&&e.altKey?void 0:this.focusNavigationFilter){return this.view.focusPreviousPage(e,t,()=>this.stickyScrollController?.height??0)}focusLast(e,t=(0,a.kx)(e)&&e.altKey?void 0:this.focusNavigationFilter){this.view.focusLast(e,t)}focusFirst(e,t=(0,a.kx)(e)&&e.altKey?void 0:this.focusNavigationFilter){this.view.focusFirst(e,t)}getFocus(){return this.focus.get()}reveal(e,t){this.model.expandTo(e);let i=this.model.getListIndex(e);if(-1!==i)if(this.stickyScrollController){let n=this.stickyScrollController.nodePositionTopBelowWidget(this.getNode(e));this.view.reveal(i,t,n)}else this.view.reveal(i,t)}onLeftArrow(e){e.preventDefault(),e.stopPropagation();let t=this.view.getFocusedElements();if(0===t.length)return;let i=t[0],n=this.model.getNodeLocation(i);if(!this.model.setCollapsed(n,!0)){let e=this.model.getParentNodeLocation(n);if(!e)return;let t=this.model.getListIndex(e);this.view.reveal(t),this.view.setFocus([t])}}onRightArrow(e){e.preventDefault(),e.stopPropagation();let t=this.view.getFocusedElements();if(0===t.length)return;let i=t[0],n=this.model.getNodeLocation(i);if(!this.model.setCollapsed(n,!1)){if(!i.children.some(e=>e.visible))return;let[e]=this.view.getFocus(),t=e+1;this.view.reveal(t),this.view.setFocus([t])}}onSpace(e){e.preventDefault(),e.stopPropagation();let t=this.view.getFocusedElements();if(0===t.length)return;let i=t[0],n=this.model.getNodeLocation(i),s=e.browserEvent.altKey;this.model.setCollapsed(n,void 0,s)}setupModel(e){this.modelDisposables.clear(),this.modelDisposables.add(e.onDidSpliceRenderedNodes(({start:e,deleteCount:t,elements:i})=>this.view.splice(e,t,i)));let t=y.Jh.forEach(e.onDidSpliceModel,e=>{this.eventBufferer.bufferEvents(()=>{this.focus.onDidModelSplice(e),this.selection.onDidModelSplice(e)})},this.modelDisposables);t(()=>null,null,this.modelDisposables);let i=this.modelDisposables.add(new y.vl),n=this.modelDisposables.add(new v.ve(0));this.modelDisposables.add(y.Jh.any(t,this.focus.onDidChange,this.selection.onDidChange)(()=>{n.trigger(()=>{let e=new Set;for(let t of this.focus.getNodes())e.add(t);for(let t of this.selection.getNodes())e.add(t);i.fire([...e.values()])})})),this.onDidChangeActiveNodesRelay.input=i.event,this.onDidChangeModelRelay.input=y.Jh.signal(e.onDidSpliceModel),this.onDidChangeCollapseStateRelay.input=e.onDidChangeCollapseState,this.onDidChangeRenderNodeCountRelay.input=e.onDidChangeRenderNodeCount,this.onDidSpliceModelRelay.input=e.onDidSpliceModel}dispose(){(0,k.AS)(this.disposables),this.stickyScrollController?.dispose(),this.view.dispose(),this.modelDisposables.dispose()}}},59114:(e,t,i)=>{"use strict";let n;function s(e){n?n instanceof a?n.loggers.push(e):n=new a([n,e]):n=e}function o(){return n}function r(e){}i.d(t,{EJ:()=>s,YQ:()=>r,tZ:()=>o});class a{constructor(e){this.loggers=e}handleObservableCreated(e,t){for(let i of this.loggers)i.handleObservableCreated(e,t)}handleOnListenerCountChanged(e,t){for(let i of this.loggers)i.handleOnListenerCountChanged(e,t)}handleObservableUpdated(e,t){for(let i of this.loggers)i.handleObservableUpdated(e,t)}handleAutorunCreated(e,t){for(let i of this.loggers)i.handleAutorunCreated(e,t)}handleAutorunDisposed(e){for(let t of this.loggers)t.handleAutorunDisposed(e)}handleAutorunDependencyChanged(e,t,i){for(let n of this.loggers)n.handleAutorunDependencyChanged(e,t,i)}handleAutorunStarted(e){for(let t of this.loggers)t.handleAutorunStarted(e)}handleAutorunFinished(e){for(let t of this.loggers)t.handleAutorunFinished(e)}handleDerivedDependencyChanged(e,t,i){for(let n of this.loggers)n.handleDerivedDependencyChanged(e,t,i)}handleDerivedCleared(e){for(let t of this.loggers)t.handleDerivedCleared(e)}handleBeginTransaction(e){for(let t of this.loggers)t.handleBeginTransaction(e)}handleEndTransaction(e){for(let t of this.loggers)t.handleEndTransaction(e)}}},59916:(e,t,i)=>{"use strict";let n;i.d(t,{XL:()=>u,fL:()=>d,YY:()=>h,PO:()=>c,Rn:()=>l});var s=i(72307);function o(e){let t=Error("BugIndicatingErrorRecovery: "+e);(0,s.dz)(t),console.error("recovered from an error that indicates a bug",t)}var r=i(34985),a=i(59114);function l(e,t){let i=new u(e,t);try{e(i)}finally{i.finish()}}function h(e){if(n)e(n);else{let t=new u(e,void 0);n=t;try{e(t)}finally{t.finish(),n=void 0}}}async function d(e,t){let i=new u(e,t);try{await e(i)}finally{i.finish()}}function c(e,t,i){e?t(e):l(t,i)}class u{constructor(e,t){this._fn=e,this._getDebugName=t,this._updatingObservers=[],(0,a.tZ)()?.handleBeginTransaction(this)}getDebugName(){return this._getDebugName?this._getDebugName():(0,r.qQ)(this._fn)}updateObserver(e,t){if(!this._updatingObservers){o("Transaction already finished!"),l(i=>{i.updateObserver(e,t)});return}this._updatingObservers.push({observer:e,observable:t}),e.beginUpdate(t)}finish(){let e=this._updatingObservers;if(!e)return void o("transaction.finish() has already been called!");for(let t=0;t<e.length;t++){let{observer:i,observable:n}=e[t];i.endUpdate(n)}this._updatingObservers=null,(0,a.tZ)()?.handleEndTransaction(this)}debugGetUpdatingObservers(){return this._updatingObservers}}},59947:(e,t,i)=>{"use strict";i.d(t,{M4:()=>g,N4:()=>h,jQ:()=>d,vV:()=>u,vr:()=>c});var n=i(87899),s=i(98200),o=i(78271),r=i(82102);i(86326);var a=i(15957);let l=n.$;class h extends r.jG{constructor(e){super(),this.containerDomNode=document.createElement("div"),this.containerDomNode.className="monaco-hover",this.containerDomNode.classList.toggle("fade-in",!!e),this.containerDomNode.tabIndex=0,this.containerDomNode.setAttribute("role","tooltip"),this.contentsDomNode=document.createElement("div"),this.contentsDomNode.className="monaco-hover-content",this.scrollbar=this._register(new o.MU(this.contentsDomNode,{consumeMouseWheelIfScrollbarIsNeeded:!0})),this.containerDomNode.appendChild(this.scrollbar.getDomNode())}onContentsChanged(){this.scrollbar.scanDomNode()}}class d extends r.jG{static render(e,t,i){return new d(e,t,i)}constructor(e,t,i){super(),this.actionLabel=t.label,this.actionKeybindingLabel=i,this.actionContainer=n.BC(e,l("div.action-container")),this.actionContainer.setAttribute("tabindex","0"),this.action=n.BC(this.actionContainer,l("a.action")),this.action.setAttribute("role","button"),t.iconClass&&n.BC(this.action,l("span.icon")).classList.add(...t.iconClass.split(" ")),this.actionRenderedLabel=i?`${t.label} (${i})`:t.label,n.BC(this.action,l("span")).textContent=this.actionRenderedLabel,this._store.add(new u(this.actionContainer,t.run)),this._store.add(new g(this.actionContainer,t.run,[3,10])),this.setEnabled(!0)}setEnabled(e){e?(this.actionContainer.classList.remove("disabled"),this.actionContainer.removeAttribute("aria-disabled")):(this.actionContainer.classList.add("disabled"),this.actionContainer.setAttribute("aria-disabled","true"))}}function c(e,t){return e&&t?(0,a.kg)(7,"Inspect this in the accessible view with {0}.",t):e?(0,a.kg)(8,"Inspect this in the accessible view via the command Open Accessible View which is currently not triggerable via keybinding."):""}class u extends r.jG{constructor(e,t){super(),this._register(n.ko(e,n.Bx.CLICK,i=>{i.stopPropagation(),i.preventDefault(),t(e)}))}}class g extends r.jG{constructor(e,t,i){super(),this._register(n.ko(e,n.Bx.KEY_DOWN,n=>{let o=new s.Z(n);i.some(e=>o.equals(e))&&(n.stopPropagation(),n.preventDefault(),t(e))}))}}},59963:()=>{},60095:(e,t,i)=>{"use strict";i.d(t,{A5:()=>n,Dg:()=>h,F4:()=>g,L5:()=>u,VW:()=>r,Wo:()=>c,X2:()=>l,ZS:()=>s,nk:()=>d,vd:()=>p,z4:()=>o});var n,s,o,r,a=i(6230);!function(e){e[e.Left=1]="Left",e[e.Center=2]="Center",e[e.Right=4]="Right",e[e.Full=7]="Full"}(n||(n={})),function(e){e[e.Left=1]="Left",e[e.Center=2]="Center",e[e.Right=3]="Right"}(s||(s={})),function(e){e[e.LTR=0]="LTR",e[e.RTL=1]="RTL"}(o||(o={})),function(e){e[e.Both=0]="Both",e[e.Right=1]="Right",e[e.Left=2]="Left",e[e.None=3]="None"}(r||(r={}));class l{get originalIndentSize(){return this._indentSizeIsTabSize?"tabSize":this.indentSize}constructor(e){this._textModelResolvedOptionsBrand=void 0,this.tabSize=Math.max(1,0|e.tabSize),"tabSize"===e.indentSize?(this.indentSize=this.tabSize,this._indentSizeIsTabSize=!0):(this.indentSize=Math.max(1,0|e.indentSize),this._indentSizeIsTabSize=!1),this.insertSpaces=!!e.insertSpaces,this.defaultEOL=0|e.defaultEOL,this.trimAutoWhitespace=!!e.trimAutoWhitespace,this.bracketPairColorizationOptions=e.bracketPairColorizationOptions}equals(e){return this.tabSize===e.tabSize&&this._indentSizeIsTabSize===e._indentSizeIsTabSize&&this.indentSize===e.indentSize&&this.insertSpaces===e.insertSpaces&&this.defaultEOL===e.defaultEOL&&this.trimAutoWhitespace===e.trimAutoWhitespace&&(0,a.aI)(this.bracketPairColorizationOptions,e.bracketPairColorizationOptions)}createChangeEvent(e){return{tabSize:this.tabSize!==e.tabSize,indentSize:this.indentSize!==e.indentSize,insertSpaces:this.insertSpaces!==e.insertSpaces,trimAutoWhitespace:this.trimAutoWhitespace!==e.trimAutoWhitespace}}}class h{constructor(e,t){this._findMatchBrand=void 0,this.range=e,this.matches=t}}function d(e){return e&&"function"==typeof e.read}class c{constructor(e,t,i,n,s,o){this.identifier=e,this.range=t,this.text=i,this.forceMoveMarkers=n,this.isAutoWhitespaceEdit=s,this._isTracked=o}}class u{constructor(e,t,i){this.regex=e,this.wordSeparators=t,this.simpleSearch=i}}class g{constructor(e,t,i){this.reverseEdits=e,this.changes=t,this.trimAutoWhitespaceLineNumbers=i}}function p(e){return!e.isTooLargeForSyncing()&&!e.isForSimpleWidget}},60393:(e,t,i)=>{"use strict";function n(e,t){"number"!=typeof e.vscodeWindowId&&Object.defineProperty(e,"vscodeWindowId",{get:()=>t})}i.d(t,{G:()=>s,y:()=>n});let s=window},60564:(e,t,i)=>{"use strict";i.d(t,{T:()=>p});var n=i(87899),s=i(25454),o=i(17354),r=i(82102),a=i(89197);class l{constructor(e,t){this.chr=e,this.type=t,this.width=0}fulfill(e){this.width=e}}class h{constructor(e,t){this._bareFontInfo=e,this._requests=t,this._container=null,this._testElements=null}read(e){this._createDomElements(),e.document.body.appendChild(this._container),this._readFromDomElements(),this._container?.remove(),this._container=null,this._testElements=null}_createDomElements(){let e=document.createElement("div");e.style.position="absolute",e.style.top="-50000px",e.style.width="50000px";let t=document.createElement("div");(0,a.M)(t,this._bareFontInfo),e.appendChild(t);let i=document.createElement("div");(0,a.M)(i,this._bareFontInfo),i.style.fontWeight="bold",e.appendChild(i);let n=document.createElement("div");(0,a.M)(n,this._bareFontInfo),n.style.fontStyle="italic",e.appendChild(n);let s=[];for(let e of this._requests){let o;0===e.type&&(o=t),2===e.type&&(o=i),1===e.type&&(o=n),o.appendChild(document.createElement("br"));let r=document.createElement("span");h._render(r,e),o.appendChild(r),s.push(r)}this._container=e,this._testElements=s}static _render(e,t){if(" "===t.chr){let t="\xa0";for(let e=0;e<8;e++)t+=t;e.innerText=t}else{let i=t.chr;for(let e=0;e<8;e++)i+=i;e.textContent=i}}_readFromDomElements(){for(let e=0,t=this._requests.length;e<t;e++){let t=this._requests[e],i=this._testElements[e];t.fulfill(i.offsetWidth/256)}}}var d=i(85462),c=i(3124);class u extends r.jG{constructor(){super(...arguments),this._cache=new Map,this._evictUntrustedReadingsTimeout=-1,this._onDidChange=this._register(new o.vl),this.onDidChange=this._onDidChange.event}dispose(){-1!==this._evictUntrustedReadingsTimeout&&(clearTimeout(this._evictUntrustedReadingsTimeout),this._evictUntrustedReadingsTimeout=-1),super.dispose()}clearAllFontInfos(){this._cache.clear(),this._onDidChange.fire()}_ensureCache(e){let t=(0,n.Q2)(e),i=this._cache.get(t);return i||(i=new g,this._cache.set(t,i)),i}_writeToCache(e,t,i){this._ensureCache(e).put(t,i),i.isTrusted||-1!==this._evictUntrustedReadingsTimeout||(this._evictUntrustedReadingsTimeout=e.setTimeout(()=>{this._evictUntrustedReadingsTimeout=-1,this._evictUntrustedReadings(e)},5e3))}_evictUntrustedReadings(e){let t=this._ensureCache(e),i=t.getValues(),n=!1;for(let e of i)e.isTrusted||(n=!0,t.remove(e));n&&this._onDidChange.fire()}readFontInfo(e,t){let i=this._ensureCache(e);if(!i.has(t)){let i=this._actualReadFontInfo(e,t);(i.typicalHalfwidthCharacterWidth<=2||i.typicalFullwidthCharacterWidth<=2||i.spaceWidth<=2||i.maxDigitWidth<=2)&&(i=new c.YJ({pixelRatio:s.c.getInstance(e).value,fontFamily:i.fontFamily,fontWeight:i.fontWeight,fontSize:i.fontSize,fontFeatureSettings:i.fontFeatureSettings,fontVariationSettings:i.fontVariationSettings,lineHeight:i.lineHeight,letterSpacing:i.letterSpacing,isMonospace:i.isMonospace,typicalHalfwidthCharacterWidth:Math.max(i.typicalHalfwidthCharacterWidth,5),typicalFullwidthCharacterWidth:Math.max(i.typicalFullwidthCharacterWidth,5),canUseHalfwidthRightwardsArrow:i.canUseHalfwidthRightwardsArrow,spaceWidth:Math.max(i.spaceWidth,5),middotWidth:Math.max(i.middotWidth,5),wsmiddotWidth:Math.max(i.wsmiddotWidth,5),maxDigitWidth:Math.max(i.maxDigitWidth,5)},!1)),this._writeToCache(e,t,i)}return i.get(t)}_createRequest(e,t,i,n){let s=new l(e,t);return i.push(s),n?.push(s),s}_actualReadFontInfo(e,t){let i=[],n=[],o=this._createRequest("n",0,i,n),r=this._createRequest("m",0,i,null),a=this._createRequest(" ",0,i,n),l=this._createRequest("0",0,i,n),u=this._createRequest("1",0,i,n),g=this._createRequest("2",0,i,n),p=this._createRequest("3",0,i,n),m=this._createRequest("4",0,i,n),f=this._createRequest("5",0,i,n),_=this._createRequest("6",0,i,n),v=this._createRequest("7",0,i,n),b=this._createRequest("8",0,i,n),C=this._createRequest("9",0,i,n),w=this._createRequest("→",0,i,n),y=this._createRequest("→",0,i,null),S=this._createRequest("\xb7",0,i,n),k=this._createRequest(String.fromCharCode(11825),0,i,null),x="|/-_ilm%";for(let e=0,t=x.length;e<t;e++)this._createRequest(x.charAt(e),0,i,n),this._createRequest(x.charAt(e),1,i,n),this._createRequest(x.charAt(e),2,i,n);new h(t,i).read(e);let L=Math.max(l.width,u.width,g.width,p.width,m.width,f.width,_.width,v.width,b.width,C.width),D=t.fontFeatureSettings===d.Bc.OFF,I=n[0].width;for(let e=1,t=n.length;D&&e<t;e++){let t=I-n[e].width;if(t<-.001||t>.001){D=!1;break}}let N=!0;return D&&y.width!==I&&(N=!1),y.width>w.width&&(N=!1),new c.YJ({pixelRatio:s.c.getInstance(e).value,fontFamily:t.fontFamily,fontWeight:t.fontWeight,fontSize:t.fontSize,fontFeatureSettings:t.fontFeatureSettings,fontVariationSettings:t.fontVariationSettings,lineHeight:t.lineHeight,letterSpacing:t.letterSpacing,isMonospace:D,typicalHalfwidthCharacterWidth:o.width,typicalFullwidthCharacterWidth:r.width,canUseHalfwidthRightwardsArrow:N,spaceWidth:a.width,middotWidth:S.width,wsmiddotWidth:k.width,maxDigitWidth:L},!0)}}class g{constructor(){this._keys=Object.create(null),this._values=Object.create(null)}has(e){let t=e.getId();return!!this._values[t]}get(e){let t=e.getId();return this._values[t]}put(e,t){let i=e.getId();this._keys[i]=e,this._values[i]=t}remove(e){let t=e.getId();delete this._keys[t],delete this._values[t]}getValues(){return Object.keys(this._keys).map(e=>this._values[e])}}let p=new u},60737:(e,t,i)=>{"use strict";i.d(t,{Mh:()=>eB,Gc:()=>eE});var n=i(6033),s=i(49832),o=i(96340),r=i(39856),a=i(96784),l=i(82102);function h(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}let d=h(),c=/[&<>"']/,u=RegExp(c.source,"g"),g=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,p=RegExp(g.source,"g"),m={"&":"&","<":"<",">":">",'"':""","'":"'"},f=e=>m[e];function _(e,t){if(t){if(c.test(e))return e.replace(u,f)}else if(g.test(e))return e.replace(p,f);return e}let v=/(^|[^\[])\^/g;function b(e,t){let i="string"==typeof e?e:e.source;t=t||"";let n={replace:(e,t)=>{let s="string"==typeof t?t:t.source;return s=s.replace(v,"$1"),i=i.replace(e,s),n},getRegex:()=>new RegExp(i,t)};return n}function C(e){try{e=encodeURI(e).replace(/%25/g,"%")}catch{return null}return e}let w={exec:()=>null};function y(e,t){let i=e.replace(/\|/g,(e,t,i)=>{let n=!1,s=t;for(;--s>=0&&"\\"===i[s];)n=!n;return n?"|":" |"}).split(/ \|/),n=0;if(i[0].trim()||i.shift(),i.length>0&&!i[i.length-1].trim()&&i.pop(),t)if(i.length>t)i.splice(t);else for(;i.length<t;)i.push("");for(;n<i.length;n++)i[n]=i[n].trim().replace(/\\\|/g,"|");return i}function S(e,t,i){let n=e.length;if(0===n)return"";let s=0;for(;s<n;){let o=e.charAt(n-s-1);if(o!==t||i)if(o!==t&&i)s++;else break;else s++}return e.slice(0,n-s)}function k(e,t,i,n){let s=t.href,o=t.title?_(t.title):null,r=e[1].replace(/\\([\[\]])/g,"$1");if("!"!==e[0].charAt(0)){n.state.inLink=!0;let e={type:"link",raw:i,href:s,title:o,text:r,tokens:n.inlineTokens(r)};return n.state.inLink=!1,e}return{type:"image",raw:i,href:s,title:o,text:_(r)}}class x{options;rules;lexer;constructor(e){this.options=e||d}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let e=t[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?e:S(e,"\n")}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let e=t[0],i=function(e,t){let i=e.match(/^(\s+)(?:```)/);if(null===i)return t;let n=i[1];return t.split("\n").map(e=>{let t=e.match(/^\s+/);if(null===t)return e;let[i]=t;return i.length>=n.length?e.slice(n.length):e}).join("\n")}(e,t[3]||"");return{type:"code",raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:i}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(/#$/.test(e)){let t=S(e,"#");this.options.pedantic?e=t.trim():(!t||/ $/.test(t))&&(e=t.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:S(t[0],"\n")}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let e=S(t[0],"\n").split("\n"),i="",n="",s=[];for(;e.length>0;){let t,o=!1,r=[];for(t=0;t<e.length;t++)if(/^ {0,3}>/.test(e[t]))r.push(e[t]),o=!0;else if(o)break;else r.push(e[t]);e=e.slice(t);let a=r.join("\n"),l=a.replace(/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,"\n $1").replace(/^ {0,3}>[ \t]?/gm,"");i=i?`${i}
|
|
625
625
|
${a}`:a,n=n?`${n}
|
|
626
626
|
${l}`:l;let h=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(l,s,!0),this.lexer.state.top=h,0===e.length)break;let d=s[s.length-1];if(d?.type==="code")break;if(d?.type==="blockquote"){let t=d.raw+"\n"+e.join("\n"),o=this.blockquote(t);s[s.length-1]=o,i=i.substring(0,i.length-d.raw.length)+o.raw,n=n.substring(0,n.length-d.text.length)+o.text;break}if(d?.type==="list"){let t=d.raw+"\n"+e.join("\n"),o=this.list(t);s[s.length-1]=o,i=i.substring(0,i.length-d.raw.length)+o.raw,n=n.substring(0,n.length-d.raw.length)+o.raw,e=t.substring(s[s.length-1].raw.length).split("\n");continue}}return{type:"blockquote",raw:i,tokens:s,text:n}}}list(e){let t=this.rules.block.list.exec(e);if(t){let i=t[1].trim(),n=i.length>1,s={type:"list",raw:"",ordered:n,start:n?+i.slice(0,-1):"",loose:!1,items:[]};i=n?`\\d{1,9}\\${i.slice(-1)}`:`\\${i}`,this.options.pedantic&&(i=n?i:"[*+-]");let o=RegExp(`^( {0,3}${i})((?:[ ][^\\n]*)?(?:\\n|$))`),r=!1;for(;e;){let i,n=!1,a="",l="";if(!(t=o.exec(e))||this.rules.block.hr.test(e))break;a=t[0],e=e.substring(a.length);let h=t[2].split("\n",1)[0].replace(/^\t+/,e=>" ".repeat(3*e.length)),d=e.split("\n",1)[0],c=!h.trim(),u=0;if(this.options.pedantic?(u=2,l=h.trimStart()):c?u=t[1].length+1:(u=(u=t[2].search(/[^ ]/))>4?1:u,l=h.slice(u),u+=t[1].length),c&&/^ *$/.test(d)&&(a+=d+"\n",e=e.substring(d.length+1),n=!0),!n){let t=RegExp(`^ {0,${Math.min(3,u-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),i=RegExp(`^ {0,${Math.min(3,u-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),n=RegExp(`^ {0,${Math.min(3,u-1)}}(?:\`\`\`|~~~)`),s=RegExp(`^ {0,${Math.min(3,u-1)}}#`);for(;e;){let o=e.split("\n",1)[0];if(d=o,this.options.pedantic&&(d=d.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),n.test(d)||s.test(d)||t.test(d)||i.test(e))break;if(d.search(/[^ ]/)>=u||!d.trim())l+="\n"+d.slice(u);else{if(c||h.search(/[^ ]/)>=4||n.test(h)||s.test(h)||i.test(h))break;l+="\n"+d}c||d.trim()||(c=!0),a+=o+"\n",e=e.substring(o.length+1),h=d.slice(u)}}!s.loose&&(r?s.loose=!0:/\n *\n *$/.test(a)&&(r=!0));let g=null;this.options.gfm&&(g=/^\[[ xX]\] /.exec(l))&&(i="[ ] "!==g[0],l=l.replace(/^\[[ xX]\] +/,"")),s.items.push({type:"list_item",raw:a,task:!!g,checked:i,loose:!1,text:l,tokens:[]}),s.raw+=a}s.items[s.items.length-1].raw=s.items[s.items.length-1].raw.trimEnd(),s.items[s.items.length-1].text=s.items[s.items.length-1].text.trimEnd(),s.raw=s.raw.trimEnd();for(let e=0;e<s.items.length;e++)if(this.lexer.state.top=!1,s.items[e].tokens=this.lexer.blockTokens(s.items[e].text,[]),!s.loose){let t=s.items[e].tokens.filter(e=>"space"===e.type);s.loose=t.length>0&&t.some(e=>/\n.*\n/.test(e.raw))}if(s.loose)for(let e=0;e<s.items.length;e++)s.items[e].loose=!0;return s}}html(e){let t=this.rules.block.html.exec(e);if(t)return{type:"html",block:!0,raw:t[0],pre:"pre"===t[1]||"script"===t[1]||"style"===t[1],text:t[0]}}def(e){let t=this.rules.block.def.exec(e);if(t){let e=t[1].toLowerCase().replace(/\s+/g," "),i=t[2]?t[2].replace(/^<(.*)>$/,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",n=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:e,raw:t[0],href:i,title:n}}}table(e){let t=this.rules.block.table.exec(e);if(!t||!/[:|]/.test(t[2]))return;let i=y(t[1]),n=t[2].replace(/^\||\| *$/g,"").split("|"),s=t[3]&&t[3].trim()?t[3].replace(/\n[ \t]*$/,"").split("\n"):[],o={type:"table",raw:t[0],header:[],align:[],rows:[]};if(i.length===n.length){for(let e of n)/^ *-+: *$/.test(e)?o.align.push("right"):/^ *:-+: *$/.test(e)?o.align.push("center"):/^ *:-+ *$/.test(e)?o.align.push("left"):o.align.push(null);for(let e=0;e<i.length;e++)o.header.push({text:i[e],tokens:this.lexer.inline(i[e]),header:!0,align:o.align[e]});for(let e of s)o.rows.push(y(e,o.header.length).map((e,t)=>({text:e,tokens:this.lexer.inline(e),header:!1,align:o.align[t]})));return o}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:"="===t[2].charAt(0)?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t){let e="\n"===t[1].charAt(t[1].length-1)?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:e,tokens:this.lexer.inline(e)}}}text(e){let t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){let t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:_(t[1])}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&/^<a /i.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&/^<\/a>/i.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){let t=this.rules.inline.link.exec(e);if(t){let e=t[2].trim();if(!this.options.pedantic&&/^</.test(e)){if(!/>$/.test(e))return;let t=S(e.slice(0,-1),"\\");if((e.length-t.length)%2==0)return}else{let e=function(e,t){if(-1===e.indexOf(")"))return -1;let i=0;for(let n=0;n<e.length;n++)if("\\"===e[n])n++;else if("("===e[n])i++;else if(e[n]===t[1]&&--i<0)return n;return -1}(t[2],"()");if(e>-1){let i=(0===t[0].indexOf("!")?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,i).trim(),t[3]=""}}let i=t[2],n="";if(this.options.pedantic){let e=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(i);e&&(i=e[1],n=e[3])}else n=t[3]?t[3].slice(1,-1):"";return i=i.trim(),/^</.test(i)&&(i=this.options.pedantic&&!/>$/.test(e)?i.slice(1):i.slice(1,-1)),k(t,{href:i?i.replace(this.rules.inline.anyPunctuation,"$1"):i,title:n?n.replace(this.rules.inline.anyPunctuation,"$1"):n},t[0],this.lexer)}}reflink(e,t){let i;if((i=this.rules.inline.reflink.exec(e))||(i=this.rules.inline.nolink.exec(e))){let e=t[(i[2]||i[1]).replace(/\s+/g," ").toLowerCase()];if(!e){let e=i[0].charAt(0);return{type:"text",raw:e,text:e}}return k(i,e,i[0],this.lexer)}}emStrong(e,t,i=""){let n=this.rules.inline.emStrongLDelim.exec(e);if(!(!n||n[3]&&i.match(/[\p{L}\p{N}]/u))&&(!(n[1]||n[2])||!i||this.rules.inline.punctuation.exec(i))){let i=[...n[0]].length-1,s,o,r=i,a=0,l="*"===n[0][0]?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(l.lastIndex=0,t=t.slice(-1*e.length+i);null!=(n=l.exec(t));){if(!(s=n[1]||n[2]||n[3]||n[4]||n[5]||n[6]))continue;if(o=[...s].length,n[3]||n[4]){r+=o;continue}if((n[5]||n[6])&&i%3&&!((i+o)%3)){a+=o;continue}if((r-=o)>0)continue;o=Math.min(o,o+r+a);let t=[...n[0]][0].length,l=e.slice(0,i+n.index+t+o);if(Math.min(i,o)%2){let e=l.slice(1,-1);return{type:"em",raw:l,text:e,tokens:this.lexer.inlineTokens(e)}}let h=l.slice(2,-2);return{type:"strong",raw:l,text:h,tokens:this.lexer.inlineTokens(h)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(/\n/g," "),i=/[^ ]/.test(e),n=/^ /.test(e)&&/ $/.test(e);return i&&n&&(e=e.substring(1,e.length-1)),e=_(e,!0),{type:"codespan",raw:t[0],text:e}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){let t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let e,i;return i="@"===t[2]?"mailto:"+(e=_(t[1])):e=_(t[1]),{type:"link",raw:t[0],text:e,href:i,tokens:[{type:"text",raw:e,text:e}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let e,i;if("@"===t[2])i="mailto:"+(e=_(t[0]));else{let n;do n=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??"";while(n!==t[0]);e=_(t[0]),i="www."===t[1]?"http://"+t[0]:t[0]}return{type:"link",raw:t[0],text:e,href:i,tokens:[{type:"text",raw:e,text:e}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let e;return e=this.lexer.state.inRawBlock?t[0]:_(t[0]),{type:"text",raw:t[0],text:e}}}}let L=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,D=/(?:[*+-]|\d{1,9}[.)])/,I=b(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,D).replace(/blockCode/g,/ {4}/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).getRegex(),N=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,E=/(?!\s*\])(?:\\.|[^\[\]\\])+/,M=b(/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/).replace("label",E).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),T=b(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,D).getRegex(),R="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",O=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,P=b("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))","i").replace("comment",O).replace("tag",R).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),A=b(N).replace("hr",L).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",R).getRegex(),F={blockquote:b(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",A).getRegex(),code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,def:M,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hr:L,html:P,lheading:I,list:T,newline:/^(?: *(?:\n|$))+/,paragraph:A,table:w,text:/^[^\n]+/},B=b("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",L).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",R).getRegex(),W={...F,table:B,paragraph:b(N).replace("hr",L).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",B).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",R).getRegex()},H={...F,html:b("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",O).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:w,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:b(N).replace("hr",L).replace("heading"," *#{1,6} *[^\n]").replace("lheading",I).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},V=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,z=/^( {2,}|\\)\n(?!\s*$)/,U="\\p{P}\\p{S}",j=b(/^((?![*_])[\spunctuation])/,"u").replace(/punctuation/g,U).getRegex(),$=b(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,"u").replace(/punct/g,U).getRegex(),K=b("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])","gu").replace(/punct/g,U).getRegex(),G=b("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])","gu").replace(/punct/g,U).getRegex(),q=b(/\\([punct])/,"gu").replace(/punct/g,U).getRegex(),Q=b(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),Y=b(O).replace("(?:--\x3e|$)","--\x3e").getRegex(),Z=b("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",Y).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),X=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,J=b(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",X).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),ee=b(/^!?\[(label)\]\[(ref)\]/).replace("label",X).replace("ref",E).getRegex(),et=b(/^!?\[(ref)\](?:\[\])?/).replace("ref",E).getRegex(),ei=b("reflink|nolink(?!\\()","g").replace("reflink",ee).replace("nolink",et).getRegex(),en={_backpedal:w,anyPunctuation:q,autolink:Q,blockSkip:/\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g,br:z,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,del:w,emStrongLDelim:$,emStrongRDelimAst:K,emStrongRDelimUnd:G,escape:V,link:J,nolink:et,punctuation:j,reflink:ee,reflinkSearch:ei,tag:Z,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,url:w},es={...en,link:b(/^!?\[(label)\]\((.*?)\)/).replace("label",X).getRegex(),reflink:b(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",X).getRegex()},eo={...en,escape:b(V).replace("])","~|])").getRegex(),url:b(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},er={...eo,br:b(z).replace("{2,}","*").getRegex(),text:b(eo.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},ea={normal:F,gfm:W,pedantic:H},el={normal:en,gfm:eo,breaks:er,pedantic:es};class eh{tokens;options;state;tokenizer;inlineQueue;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||d,this.options.tokenizer=this.options.tokenizer||new x,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let t={block:ea.normal,inline:el.normal};this.options.pedantic?(t.block=ea.pedantic,t.inline=el.pedantic):this.options.gfm&&(t.block=ea.gfm,this.options.breaks?t.inline=el.breaks:t.inline=el.gfm),this.tokenizer.rules=t}static get rules(){return{block:ea,inline:el}}static lex(e,t){return new eh(t).lex(e)}static lexInline(e,t){return new eh(t).inlineTokens(e)}lex(e){e=e.replace(/\r\n|\r/g,"\n"),this.blockTokens(e,this.tokens);for(let e=0;e<this.inlineQueue.length;e++){let t=this.inlineQueue[e];this.inlineTokens(t.src,t.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,t=[],i=!1){let n,s,o;for(e=this.options.pedantic?e.replace(/\t/g," ").replace(/^ +$/gm,""):e.replace(/^( *)(\t+)/gm,(e,t,i)=>t+" ".repeat(i.length));e;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(i=>!!(n=i.call({lexer:this},e,t))&&(e=e.substring(n.raw.length),t.push(n),!0)))){if(n=this.tokenizer.space(e)){e=e.substring(n.raw.length),1===n.raw.length&&t.length>0?t[t.length-1].raw+="\n":t.push(n);continue}if(n=this.tokenizer.code(e)){e=e.substring(n.raw.length),(s=t[t.length-1])&&("paragraph"===s.type||"text"===s.type)?(s.raw+="\n"+n.raw,s.text+="\n"+n.text,this.inlineQueue[this.inlineQueue.length-1].src=s.text):t.push(n);continue}if((n=this.tokenizer.fences(e))||(n=this.tokenizer.heading(e))||(n=this.tokenizer.hr(e))||(n=this.tokenizer.blockquote(e))||(n=this.tokenizer.list(e))||(n=this.tokenizer.html(e))){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.def(e)){e=e.substring(n.raw.length),(s=t[t.length-1])&&("paragraph"===s.type||"text"===s.type)?(s.raw+="\n"+n.raw,s.text+="\n"+n.raw,this.inlineQueue[this.inlineQueue.length-1].src=s.text):this.tokens.links[n.tag]||(this.tokens.links[n.tag]={href:n.href,title:n.title});continue}if((n=this.tokenizer.table(e))||(n=this.tokenizer.lheading(e))){e=e.substring(n.raw.length),t.push(n);continue}if(o=e,this.options.extensions&&this.options.extensions.startBlock){let t,i=1/0,n=e.slice(1);this.options.extensions.startBlock.forEach(e=>{"number"==typeof(t=e.call({lexer:this},n))&&t>=0&&(i=Math.min(i,t))}),i<1/0&&i>=0&&(o=e.substring(0,i+1))}if(this.state.top&&(n=this.tokenizer.paragraph(o))){s=t[t.length-1],i&&s?.type==="paragraph"?(s.raw+="\n"+n.raw,s.text+="\n"+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=s.text):t.push(n),i=o.length!==e.length,e=e.substring(n.raw.length);continue}if(n=this.tokenizer.text(e)){e=e.substring(n.raw.length),(s=t[t.length-1])&&"text"===s.type?(s.raw+="\n"+n.raw,s.text+="\n"+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=s.text):t.push(n);continue}if(e){let t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw Error(t)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){let i,n,s,o,r,a,l=e;if(this.tokens.links){let e=Object.keys(this.tokens.links);if(e.length>0)for(;null!=(o=this.tokenizer.rules.inline.reflinkSearch.exec(l));)e.includes(o[0].slice(o[0].lastIndexOf("[")+1,-1))&&(l=l.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(o=this.tokenizer.rules.inline.blockSkip.exec(l));)l=l.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;null!=(o=this.tokenizer.rules.inline.anyPunctuation.exec(l));)l=l.slice(0,o.index)+"++"+l.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;e;)if(r||(a=""),r=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(n=>!!(i=n.call({lexer:this},e,t))&&(e=e.substring(i.raw.length),t.push(i),!0)))){if(i=this.tokenizer.escape(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.tag(e)){e=e.substring(i.raw.length),(n=t[t.length-1])&&"text"===i.type&&"text"===n.type?(n.raw+=i.raw,n.text+=i.text):t.push(i);continue}if(i=this.tokenizer.link(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(i.raw.length),(n=t[t.length-1])&&"text"===i.type&&"text"===n.type?(n.raw+=i.raw,n.text+=i.text):t.push(i);continue}if((i=this.tokenizer.emStrong(e,l,a))||(i=this.tokenizer.codespan(e))||(i=this.tokenizer.br(e))||(i=this.tokenizer.del(e))||(i=this.tokenizer.autolink(e))||!this.state.inLink&&(i=this.tokenizer.url(e))){e=e.substring(i.raw.length),t.push(i);continue}if(s=e,this.options.extensions&&this.options.extensions.startInline){let t,i=1/0,n=e.slice(1);this.options.extensions.startInline.forEach(e=>{"number"==typeof(t=e.call({lexer:this},n))&&t>=0&&(i=Math.min(i,t))}),i<1/0&&i>=0&&(s=e.substring(0,i+1))}if(i=this.tokenizer.inlineText(s)){e=e.substring(i.raw.length),"_"!==i.raw.slice(-1)&&(a=i.raw.slice(-1)),r=!0,(n=t[t.length-1])&&"text"===n.type?(n.raw+=i.raw,n.text+=i.text):t.push(i);continue}if(e){let t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw Error(t)}}return t}}class ed{options;parser;constructor(e){this.options=e||d}space(e){return""}code({text:e,lang:t,escaped:i}){let n=(t||"").match(/^\S*/)?.[0],s=e.replace(/\n$/,"")+"\n";return n?'<pre><code class="language-'+_(n)+'">'+(i?s:_(s,!0))+"</code></pre>\n":"<pre><code>"+(i?s:_(s,!0))+"</code></pre>\n"}blockquote({tokens:e}){let t=this.parser.parse(e);return`<blockquote>
|
|
627
627
|
${t}</blockquote>
|
|
@@ -678,7 +678,7 @@ ${(0,ey.ih)(e)}
|
|
|
678
678
|
.monaco-table .monaco-list:not(.focused) .monaco-list-row[data-parity=odd].focused:not(.selected):not(:hover) .monaco-table-tr {
|
|
679
679
|
background-color: ${e.tableOddRowsBackgroundColor};
|
|
680
680
|
}
|
|
681
|
-
`),this.styleElement.textContent=i.join("\n")}}let G={listFocusBackground:"#7FB0D0",listActiveSelectionBackground:"#0E639C",listActiveSelectionForeground:"#FFFFFF",listActiveSelectionIconForeground:"#FFFFFF",listFocusAndSelectionOutline:"#90C2F9",listFocusAndSelectionBackground:"#094771",listFocusAndSelectionForeground:"#FFFFFF",listInactiveSelectionBackground:"#3F3F46",listInactiveSelectionIconForeground:"#FFFFFF",listHoverBackground:"#2A2D2E",listDropOverBackground:"#383B3D",listDropBetweenBackground:"#EEEEEE",treeIndentGuidesStroke:"#a9a9a9",treeInactiveIndentGuidesStroke:m.Q1.fromHex("#a9a9a9").transparent(.4).toString(),tableColumnsBorder:m.Q1.fromHex("#cccccc").transparent(.2).toString(),tableOddRowsBackgroundColor:m.Q1.fromHex("#cccccc").transparent(.04).toString(),listBackground:void 0,listFocusForeground:void 0,listInactiveSelectionForeground:void 0,listInactiveFocusForeground:void 0,listInactiveFocusBackground:void 0,listHoverForeground:void 0,listFocusOutline:void 0,listInactiveFocusOutline:void 0,listSelectionOutline:void 0,listHoverOutline:void 0,treeStickyScrollBackground:void 0,treeStickyScrollBorder:void 0,treeStickyScrollShadow:void 0},q={keyboardSupport:!0,mouseSupport:!0,multipleSelectionSupport:!0,dnd:{getDragURI:()=>null,onDragStart(){},onDragOver:()=>!1,drop(){},dispose(){}}};function Q(e,t){let i=[],n=0,s=0;for(;n<e.length||s<t.length;)if(n>=e.length)i.push(t[s++]);else if(s>=t.length)i.push(e[n++]);else if(e[n]===t[s]){i.push(e[n]),n++,s++;continue}else e[n]<t[s]?i.push(e[n++]):i.push(t[s++]);return i}let Y=(e,t)=>e-t;class Z{constructor(e,t){this._templateId=e,this.renderers=t}get templateId(){return this._templateId}renderTemplate(e){return this.renderers.map(t=>t.renderTemplate(e))}renderElement(e,t,i,n){let s=0;for(let o of this.renderers)o.renderElement(e,t,i[s++],n)}disposeElement(e,t,i,n){let s=0;for(let o of this.renderers)o.disposeElement?.(e,t,i[s],n),s+=1}disposeTemplate(e){let t=0;for(let i of this.renderers)i.disposeTemplate(e[t++])}}class X{constructor(e){this.accessibilityProvider=e,this.templateId="a18n"}renderTemplate(e){return{container:e,disposables:new b.Cm}}renderElement(e,t,i){let n=this.accessibilityProvider.getAriaLabel(e),s=n&&"string"!=typeof n?n:(0,L.lk)(n);i.disposables.add((0,L.fm)(e=>{this.setAriaLabel(e.readObservable(s),i.container)}));let o=this.accessibilityProvider.getAriaLevel&&this.accessibilityProvider.getAriaLevel(e);"number"==typeof o?i.container.setAttribute("aria-level",`${o}`):i.container.removeAttribute("aria-level")}setAriaLabel(e,t){e?t.setAttribute("aria-label",e):t.removeAttribute("aria-label")}disposeElement(e,t,i){i.disposables.clear()}disposeTemplate(e){e.disposables.dispose()}}class J{constructor(e,t){this.list=e,this.dnd=t}getDragElements(e){let t=this.list.getSelectedElements();return t.indexOf(e)>-1?t:[e]}getDragURI(e){return this.dnd.getDragURI(e)}getDragLabel(e,t){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(e,t)}onDragStart(e,t){this.dnd.onDragStart?.(e,t)}onDragOver(e,t,i,n,s){return this.dnd.onDragOver(e,t,i,n,s)}onDragLeave(e,t,i,n){this.dnd.onDragLeave?.(e,t,i,n)}onDragEnd(e){this.dnd.onDragEnd?.(e)}drop(e,t,i,n,s){this.dnd.drop(e,t,i,n,s)}dispose(){this.dnd.dispose()}}class ee{get onDidChangeFocus(){return _.Jh.map(this.eventBufferer.wrapEvent(this.focus.onChange),e=>this.toListEvent(e),this.disposables)}get onDidChangeSelection(){return _.Jh.map(this.eventBufferer.wrapEvent(this.selection.onChange),e=>this.toListEvent(e),this.disposables)}get domId(){return this.view.domId}get onDidScroll(){return this.view.onDidScroll}get onMouseClick(){return this.view.onMouseClick}get onMouseDblClick(){return this.view.onMouseDblClick}get onMouseMiddleClick(){return this.view.onMouseMiddleClick}get onPointer(){return this.mouseController.onPointer}get onMouseDown(){return this.view.onMouseDown}get onMouseOver(){return this.view.onMouseOver}get onMouseOut(){return this.view.onMouseOut}get onTouchStart(){return this.view.onTouchStart}get onTap(){return this.view.onTap}get onContextMenu(){let e=!1,t=_.Jh.chain(this.disposables.add(new l.f(this.view.domNode,"keydown")).event,t=>t.map(e=>new h.Z(e)).filter(t=>e=58===t.keyCode||t.shiftKey&&68===t.keyCode).map(e=>o.fs.stop(e,!0)).filter(()=>!1)),i=_.Jh.chain(this.disposables.add(new l.f(this.view.domNode,"keyup")).event,t=>t.forEach(()=>e=!1).map(e=>new h.Z(e)).filter(e=>58===e.keyCode||e.shiftKey&&68===e.keyCode).map(e=>o.fs.stop(e,!0)).map(({browserEvent:e})=>{let t=this.getFocus(),i=t.length?t[0]:void 0,n=void 0!==i?this.view.element(i):void 0,s=void 0!==i?this.view.domElement(i):this.view.domNode;return{index:i,element:n,anchor:s,browserEvent:e}})),n=_.Jh.chain(this.view.onContextMenu,t=>t.filter(t=>!e).map(({element:e,index:t,browserEvent:i})=>({element:e,index:t,anchor:new x.P((0,o.zk)(this.view.domNode),i),browserEvent:i})));return _.Jh.any(t,i,n)}get onKeyDown(){return this.disposables.add(new l.f(this.view.domNode,"keydown")).event}get onDidFocus(){return _.Jh.signal(this.disposables.add(new l.f(this.view.domNode,"focus",!0)).event)}get onDidBlur(){return _.Jh.signal(this.disposables.add(new l.f(this.view.domNode,"blur",!0)).event)}constructor(e,t,i,n,s=q){this.user=e,this._options=s,this.focus=new N("focused"),this.anchor=new N("anchor"),this.eventBufferer=new _.at,this._ariaLabel="",this.disposables=new b.Cm,this._onDidDispose=new _.vl,this.onDidDispose=this._onDidDispose.event;let o=this._options.accessibilityProvider&&this._options.accessibilityProvider.getWidgetRole?this._options.accessibilityProvider?.getWidgetRole():"list";this.selection=new E("listbox"!==o);let a=[this.focus.renderer,this.selection.renderer];this.accessibilityProvider=s.accessibilityProvider,this.accessibilityProvider&&(a.push(new X(this.accessibilityProvider)),this.accessibilityProvider.onDidChangeActiveDescendant?.(this.onDidChangeActiveDescendant,this,this.disposables)),n=n.map(e=>new Z(e.templateId,[...a,e]));let l={...s,dnd:s.dnd&&new J(this,s.dnd)};if(this.view=this.createListView(t,i,n,l),this.view.domNode.setAttribute("role",o),s.styleController)this.styleController=s.styleController(this.view.domId);else{let e=(0,r.li)(this.view.domNode);this.styleController=new K(e,this.view.domId)}if(this.spliceable=new u([new M(this.focus,this.view,s.identityProvider),new M(this.selection,this.view,s.identityProvider),new M(this.anchor,this.view,s.identityProvider),this.view]),this.disposables.add(this.focus),this.disposables.add(this.selection),this.disposables.add(this.anchor),this.disposables.add(this.view),this.disposables.add(this._onDidDispose),this.disposables.add(new V(this,this.view)),("boolean"!=typeof s.keyboardSupport||s.keyboardSupport)&&(this.keyboardController=new B(this,this.view,s),this.disposables.add(this.keyboardController)),s.keyboardNavigationLabelProvider){let e=s.keyboardNavigationDelegate||W;this.typeNavigationController=new H(this,this.view,s.keyboardNavigationLabelProvider,s.keyboardNavigationEventFilter??(()=>!0),e),this.disposables.add(this.typeNavigationController)}if(this.mouseController=this.createMouseController(s),this.disposables.add(this.mouseController),this.onDidChangeFocus(this._onFocusChange,this,this.disposables),this.onDidChangeSelection(this._onSelectionChange,this,this.disposables),this.accessibilityProvider){let e=this.accessibilityProvider.getWidgetAriaLabel(),t=e&&"string"!=typeof e?e:(0,L.lk)(e);this.disposables.add((0,L.fm)(e=>{this.ariaLabel=e.readObservable(t)}))}!1!==this._options.multipleSelectionSupport&&this.view.domNode.setAttribute("aria-multiselectable","true")}createListView(e,t,i,n){return new k.uO(e,t,i,n)}createMouseController(e){return new $(this)}updateOptions(e={}){this._options={...this._options,...e},this.typeNavigationController?.updateOptions(this._options),void 0!==this._options.multipleSelectionController&&(this._options.multipleSelectionSupport?this.view.domNode.setAttribute("aria-multiselectable","true"):this.view.domNode.removeAttribute("aria-multiselectable")),this.mouseController.updateOptions(e),this.keyboardController?.updateOptions(e),this.view.updateOptions(e)}get options(){return this._options}splice(e,t,i=[]){if(e<0||e>this.view.length)throw new S(this.user,`Invalid start index: ${e}`);if(t<0)throw new S(this.user,`Invalid delete count: ${t}`);(0!==t||0!==i.length)&&this.eventBufferer.bufferEvents(()=>this.spliceable.splice(e,t,i))}rerender(){this.view.rerender()}element(e){return this.view.element(e)}indexOf(e){return this.view.indexOf(e)}indexAt(e){return this.view.indexAt(e)}get length(){return this.view.length}get contentHeight(){return this.view.contentHeight}get onDidChangeContentHeight(){return this.view.onDidChangeContentHeight}get scrollTop(){return this.view.getScrollTop()}set scrollTop(e){this.view.setScrollTop(e)}get scrollHeight(){return this.view.scrollHeight}get renderHeight(){return this.view.renderHeight}get firstVisibleIndex(){return this.view.firstVisibleIndex}get ariaLabel(){return this._ariaLabel}set ariaLabel(e){this._ariaLabel=e,this.view.domNode.setAttribute("aria-label",e)}domFocus(){this.view.domNode.focus({preventScroll:!0})}layout(e,t){this.view.layout(e,t)}setSelection(e,t){for(let t of e)if(t<0||t>=this.length)throw new S(this.user,`Invalid index ${t}`);this.selection.set(e,t)}getSelection(){return this.selection.get()}getSelectedElements(){return this.getSelection().map(e=>this.view.element(e))}setAnchor(e){if(void 0===e)return void this.anchor.set([]);if(e<0||e>=this.length)throw new S(this.user,`Invalid index ${e}`);this.anchor.set([e])}getAnchor(){return this.anchor.get().at(0)}getAnchorElement(){let e=this.getAnchor();return void 0===e?void 0:this.element(e)}setFocus(e,t){for(let t of e)if(t<0||t>=this.length)throw new S(this.user,`Invalid index ${t}`);this.focus.set(e,t)}focusNext(e=1,t=!1,i,n){if(0===this.length)return;let s=this.focus.get(),o=this.findNextIndex(s.length>0?s[0]+e:0,t,n);o>-1&&this.setFocus([o],i)}focusPrevious(e=1,t=!1,i,n){if(0===this.length)return;let s=this.focus.get(),o=this.findPreviousIndex(s.length>0?s[0]-e:0,t,n);o>-1&&this.setFocus([o],i)}async focusNextPage(e,t){let i=this.view.indexAt(this.view.getScrollTop()+this.view.renderHeight);i=0===i?0:i-1;let n=this.getFocus()[0];if(n!==i&&(void 0===n||i>n)){let s=this.findPreviousIndex(i,!1,t);s>-1&&n!==s?this.setFocus([s],e):this.setFocus([i],e)}else{let s=this.view.getScrollTop(),o=s+this.view.renderHeight;i>n&&(o-=this.view.elementHeight(i)),this.view.setScrollTop(o),this.view.getScrollTop()!==s&&(this.setFocus([]),await (0,p.wR)(0),await this.focusNextPage(e,t))}}async focusPreviousPage(e,t,i=()=>0){let n,s=i(),o=this.view.getScrollTop()+s;n=0===o?this.view.indexAt(o):this.view.indexAfter(o-1);let r=this.getFocus()[0];if(r!==n&&(void 0===r||r>=n)){let i=this.findNextIndex(n,!1,t);i>-1&&r!==i?this.setFocus([i],e):this.setFocus([n],e)}else this.view.setScrollTop(o-this.view.renderHeight-s),this.view.getScrollTop()+i()!==o&&(this.setFocus([]),await (0,p.wR)(0),await this.focusPreviousPage(e,t,i))}focusLast(e,t){if(0===this.length)return;let i=this.findPreviousIndex(this.length-1,!1,t);i>-1&&this.setFocus([i],e)}focusFirst(e,t){this.focusNth(0,e,t)}focusNth(e,t,i){if(0===this.length)return;let n=this.findNextIndex(e,!1,i);n>-1&&this.setFocus([n],t)}findNextIndex(e,t=!1,i){for(let n=0;n<this.length&&(!(e>=this.length)||t);n++){if(e%=this.length,!i||i(this.element(e)))return e;e++}return -1}findPreviousIndex(e,t=!1,i){for(let n=0;n<this.length&&(!(e<0)||t);n++){if(e=(this.length+e%this.length)%this.length,!i||i(this.element(e)))return e;e--}return -1}getFocus(){return this.focus.get()}getFocusedElements(){return this.getFocus().map(e=>this.view.element(e))}reveal(e,t,i=0){if(e<0||e>=this.length)throw new S(this.user,`Invalid index ${e}`);let n=this.view.getScrollTop(),s=this.view.elementTop(e),o=this.view.elementHeight(e);if((0,y.Et)(t)){let e=o-this.view.renderHeight+i;this.view.setScrollTop(e*(0,C.qE)(t,0,1)+s-i)}else{let e=s+o,t=n+this.view.renderHeight;s<n+i&&e>=t||(s<n+i||e>=t&&o>=this.view.renderHeight?this.view.setScrollTop(s-i):e>=t&&this.view.setScrollTop(e-this.view.renderHeight))}}getRelativeTop(e,t=0){if(e<0||e>=this.length)throw new S(this.user,`Invalid index ${e}`);let i=this.view.getScrollTop(),n=this.view.elementTop(e),s=this.view.elementHeight(e);if(n<i+t||n+s>i+this.view.renderHeight)return null;let o=s-this.view.renderHeight+t;return Math.abs((i+t-n)/o)}getHTMLElement(){return this.view.domNode}getScrollableElement(){return this.view.scrollableElementDomNode}getElementID(e){return this.view.getElementDomId(e)}getElementTop(e){return this.view.elementTop(e)}style(e){this.styleController.style(e)}toListEvent({indexes:e,browserEvent:t}){return{indexes:e,elements:e.map(e=>this.view.element(e)),browserEvent:t}}_onFocusChange(){let e=this.focus.get();this.view.domNode.classList.toggle("element-focused",e.length>0),this.onDidChangeActiveDescendant()}onDidChangeActiveDescendant(){let e=this.focus.get();if(e.length>0){let t;this.accessibilityProvider?.getActiveDescendantId&&(t=this.accessibilityProvider.getActiveDescendantId(this.view.element(e[0]))),this.view.domNode.setAttribute("aria-activedescendant",t||this.view.getElementDomId(e[0]))}else this.view.domNode.removeAttribute("aria-activedescendant")}_onSelectionChange(){let e=this.selection.get();this.view.domNode.classList.toggle("selection-none",0===e.length),this.view.domNode.classList.toggle("selection-single",1===e.length),this.view.domNode.classList.toggle("selection-multiple",e.length>1)}dispose(){this._onDidDispose.fire(),this.disposables.dispose(),this._onDidDispose.dispose()}}D([f.B],ee.prototype,"onDidChangeFocus",null),D([f.B],ee.prototype,"onDidChangeSelection",null),D([f.B],ee.prototype,"onContextMenu",null),D([f.B],ee.prototype,"onKeyDown",null),D([f.B],ee.prototype,"onDidFocus",null),D([f.B],ee.prototype,"onDidBlur",null)},67514:(e,t,i)=>{"use strict";i.d(t,{J:()=>o,U:()=>s});var n=i(22263);let s=(0,n.u1)("textResourceConfigurationService"),o=(0,n.u1)("textResourcePropertiesService")},67914:(e,t,i)=>{"use strict";i.d(t,{BG:()=>o,IO:()=>a,Y:()=>r,eh:()=>s,pj:()=>h,qN:()=>l});class n{constructor(e,t){this._restrictedRenderingContextBrand=void 0,this._viewLayout=e,this.viewportData=t,this.scrollWidth=this._viewLayout.getScrollWidth(),this.scrollHeight=this._viewLayout.getScrollHeight(),this.visibleRange=this.viewportData.visibleRange,this.bigNumbersDelta=this.viewportData.bigNumbersDelta;let i=this._viewLayout.getCurrentViewport();this.scrollTop=i.top,this.scrollLeft=i.left,this.viewportWidth=i.width,this.viewportHeight=i.height}getScrolledTopFromAbsoluteTop(e){return e-this.scrollTop}getVerticalOffsetForLineNumber(e,t){return this._viewLayout.getVerticalOffsetForLineNumber(e,t)}getVerticalOffsetAfterLineNumber(e,t){return this._viewLayout.getVerticalOffsetAfterLineNumber(e,t)}getLineHeightForLineNumber(e){return this._viewLayout.getLineHeightForLineNumber(e)}getDecorationsInViewport(){return this.viewportData.getDecorationsInViewport()}}class s extends n{constructor(e,t,i,n){super(e,t),this._renderingContextBrand=void 0,this._viewLines=i,this._viewLinesGpu=n}linesVisibleRangesForRange(e,t){let i=this._viewLines.linesVisibleRangesForRange(e,t);if(!this._viewLinesGpu)return i??null;let n=this._viewLinesGpu.linesVisibleRangesForRange(e,t);return i?n?i.concat(n).sort((e,t)=>e.lineNumber-t.lineNumber):i:n}visibleRangeForPosition(e){return this._viewLines.visibleRangeForPosition(e)??this._viewLinesGpu?.visibleRangeForPosition(e)??null}}class o{constructor(e,t,i,n){this.outsideRenderedLine=e,this.lineNumber=t,this.ranges=i,this.continuesOnNextLine=n}}class r{static from(e){let t=Array(e.length);for(let i=0,n=e.length;i<n;i++){let n=e[i];t[i]=new r(n.left,n.width)}return t}constructor(e,t){this._horizontalRangeBrand=void 0,this.left=Math.round(e),this.width=Math.round(t)}toString(){return`[${this.left},${this.width}]`}}class a{constructor(e,t){this._floatHorizontalRangeBrand=void 0,this.left=e,this.width=t}toString(){return`[${this.left},${this.width}]`}static compare(e,t){return e.left-t.left}}class l{constructor(e,t){this.outsideRenderedLine=e,this.originalLeft=t,this.left=Math.round(this.originalLeft)}}class h{constructor(e,t){this.outsideRenderedLine=e,this.ranges=t}}},68103:(e,t,i)=>{"use strict";i.d(t,{A7:()=>l,Q_:()=>c,VR:()=>r,cn:()=>p,ct:()=>m,jB:()=>a,kF:()=>g,mX:()=>u});var n=i(15957),s=i(85521);i(34457);var o=i(55296);let r=(0,i(22263).u1)("contextService");function a(e){return"string"==typeof e?.id&&o.r.isUri(e.uri)}function l(e){var t;return"string"==typeof e?.id&&!a(e)&&(t=e,!("string"==typeof t?.id&&o.r.isUri(t.configPath)))}let h={id:"ext-dev"},d={id:"empty-window"};function c(e,t){return"string"==typeof e||void 0===e?"string"==typeof e?{id:(0,s.P8)(e)}:t?h:d:e.configuration?{id:e.id,configPath:e.configuration}:1===e.folders.length?{id:e.id,uri:e.folders[0].uri}:{id:e.id}}class u{constructor(e,t){this.raw=t,this.uri=e.uri,this.index=e.index,this.name=e.name}toJSON(){return{uri:this.uri,name:this.name,index:this.index}}}let g="code-workspace";(0,n.kg)(2032,"Code Workspace");let p="4064f6ec-cb38-4ad0-af64-ee6467e63c82";function m(e){return e.id===p}},68192:(e,t,i)=>{"use strict";i.d(t,{m:()=>P,p:()=>O});var n=i(87899),s=i(35023),o=i(44987),r=i(98810),a=i(39205),l=i(55354),h=i(27281),d=i(17354),c=i(82102);i(91282);var u=i(15957),g=i(85350);class p extends c.jG{get onDidChangeDropdownVisibility(){return this._onDidChangeDropdownVisibility.event}constructor(e,t,i={orientation:0}){super(),this.submenuActionViewItems=[],this.hasSecondaryActions=!1,this._onDidChangeDropdownVisibility=this._register(new d._B),this.disposables=this._register(new c.Cm),i.hoverDelegate=i.hoverDelegate??this._register((0,g.bW)()),this.options=i,this.toggleMenuAction=this._register(new m(()=>this.toggleMenuActionViewItem?.show(),i.toggleMenuTitle)),this.element=document.createElement("div"),this.element.className="monaco-toolbar",e.appendChild(this.element),this.actionBar=this._register(new o.E(this.element,{orientation:i.orientation,ariaLabel:i.ariaLabel,actionRunner:i.actionRunner,allowContextMenu:i.allowContextMenu,highlightToggledItems:i.highlightToggledItems,hoverDelegate:i.hoverDelegate,actionViewItemProvider:(e,n)=>{if(e.id===m.ID)return this.toggleMenuActionViewItem=new r.d(e,e.menuActions,t,{actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,keybindingProvider:this.options.getKeyBinding,classNames:h.L.asClassNameArray(i.moreIcon??l.W.toolBarMore),anchorAlignmentProvider:this.options.anchorAlignmentProvider,menuAsChild:!!this.options.renderDropdownAsChildElement,skipTelemetry:this.options.skipTelemetry,isMenu:!0,hoverDelegate:this.options.hoverDelegate}),this.toggleMenuActionViewItem.setActionContext(this.actionBar.context),this.disposables.add(this._onDidChangeDropdownVisibility.add(this.toggleMenuActionViewItem.onDidChangeVisibility)),this.toggleMenuActionViewItem;if(i.actionViewItemProvider){let t=i.actionViewItemProvider(e,n);if(t)return t}if(e instanceof a.YH){let i=new r.d(e,e.actions,t,{actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,keybindingProvider:this.options.getKeyBinding,classNames:e.class,anchorAlignmentProvider:this.options.anchorAlignmentProvider,menuAsChild:!!this.options.renderDropdownAsChildElement,skipTelemetry:this.options.skipTelemetry,hoverDelegate:this.options.hoverDelegate});return i.setActionContext(this.actionBar.context),this.submenuActionViewItems.push(i),this.disposables.add(this._onDidChangeDropdownVisibility.add(i.onDidChangeVisibility)),i}}}))}set actionRunner(e){this.actionBar.actionRunner=e}get actionRunner(){return this.actionBar.actionRunner}set context(e){for(let t of(this.actionBar.context=e,this.toggleMenuActionViewItem?.setActionContext(e),this.submenuActionViewItems))t.setActionContext(e)}getElement(){return this.element}getItemAction(e){return this.actionBar.getAction(e)}setActions(e,t){this.clear();let i=e?e.slice(0):[];this.hasSecondaryActions=!!(t&&t.length>0),this.hasSecondaryActions&&t&&(this.toggleMenuAction.menuActions=t.slice(0),i.push(this.toggleMenuAction)),i.forEach(e=>{this.actionBar.push(e,{icon:this.options.icon??!0,label:this.options.label??!1,keybinding:this.getKeybindingLabel(e)})})}getKeybindingLabel(e){let t=this.options.getKeyBinding?.(e);return t?.getLabel()??void 0}clear(){this.submenuActionViewItems=[],this.disposables.clear(),this.actionBar.clear()}dispose(){this.clear(),this.disposables.dispose(),super.dispose()}}class m extends a.rc{static{this.ID="toolbar.toggle.more"}constructor(e,t){super(m.ID,t=t||u.kg(17,"More Actions..."),void 0,!0),this._menuActions=[],this.toggleDropdownMenu=e}async run(){this.toggleDropdownMenu()}get menuActions(){return this._menuActions}set menuActions(e){this._menuActions=e}}var f=i(5488),_=i(28771),v=i(6033),b=i(88608),C=i(19784),w=i(41327),y=i(76054),S=i(39783),k=i(8820),x=i(51094),L=i(49195),D=i(66499),I=i(27140),N=i(22263);let E=(0,N.u1)("IActionViewItemService");class M{constructor(){this._providers=new Map,this._onDidChange=new d.vl,this.onDidChange=this._onDidChange.event}dispose(){this._onDidChange.dispose()}lookUp(e,t){return this._providers.get(this._makeKey(e,t))}_makeKey(e,t){return`${e.id}/${t instanceof w.D8?t.id:t}`}}(0,I.v)(E,M,1);var T=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},R=function(e,t){return function(i,n){t(i,n,e)}};let O=class extends p{constructor(e,t,i,n,s,o,r,a){super(e,s,{getKeyBinding:e=>o.lookupKeybinding(e.id)??void 0,...t,allowContextMenu:!0,skipTelemetry:"string"==typeof t?.telemetrySource}),this._options=t,this._menuService=i,this._contextKeyService=n,this._contextMenuService=s,this._keybindingService=o,this._commandService=r,this._sessionDisposables=this._store.add(new c.Cm);let l=t?.telemetrySource;l&&this._store.add(this.actionBar.onDidRun(e=>a.publicLog2("workbenchActionExecuted",{id:e.action.id,from:l})))}setActions(e,t=[],i){this._sessionDisposables.clear();let o=e.slice(),r=t.slice(),l=[],h=0,d=[],c=!1;if(this._options?.hiddenItemStrategy!==-1)for(let e=0;e<o.length;e++){let t=o[e];(t instanceof w.Xe||t instanceof w.nI)&&t.hideActions&&(l.push(t.hideActions.toggle),t.hideActions.toggle.checked&&h++,t.hideActions.isHidden&&(c=!0,o[e]=void 0,this._options?.hiddenItemStrategy!==0&&(d[e]=t)))}if(this._options?.overflowBehavior!==void 0){let e=(0,_.E$)(new Set(this._options.overflowBehavior.exempted),b.f.map(o,e=>e?.id)),t=this._options.overflowBehavior.maxItems-e.size,i=0;for(let n=0;n<o.length;n++){let s=o[n];s&&(i++,!e.has(s.id)&&i>=t&&(o[n]=void 0,d[n]=s))}}(0,f.SK)(o),(0,f.SK)(d),super.setActions(o,a.wv.join(d,r)),(l.length>0||o.length>0)&&this._sessionDisposables.add((0,n.ko)(this.getElement(),"contextmenu",e=>{let t=new s.P((0,n.zk)(this.getElement()),e),o=this.getItemAction(t.target);if(!o)return;t.preventDefault(),t.stopPropagation();let r=[];if(o instanceof w.Xe&&o.menuKeybinding)r.push(o.menuKeybinding);else if(!(o instanceof w.nI||o instanceof m)){let e=!!this._keybindingService.lookupKeybinding(o.id);r.push((0,y.D)(this._commandService,this._keybindingService,o.id,void 0,e))}if(l.length>0){let e=!1;if(1===h&&this._options?.hiddenItemStrategy===0){e=!0;for(let e=0;e<l.length;e++)if(l[e].checked){l[e]=(0,a.ih)({id:o.id,label:o.label,checked:!0,enabled:!1,run(){}});break}}if(!e&&(o instanceof w.Xe||o instanceof w.nI)){if(!o.hideActions)return;r.push(o.hideActions.hide)}else r.push((0,a.ih)({id:"label",label:(0,u.kg)(1634,"Hide"),enabled:!1,run(){}}))}let d=a.wv.join(r,l);this._options?.resetMenu&&!i&&(i=[this._options.resetMenu]),c&&i&&(d.push(new a.wv),d.push((0,a.ih)({id:"resetThisMenu",label:(0,u.kg)(1635,"Reset Menu"),run:()=>this._menuService.resetHiddenStates(i)}))),0!==d.length&&this._contextMenuService.showContextMenu({getAnchor:()=>t,getActions:()=>d,menuId:this._options?.contextMenu,menuActionOptions:{renderShortTitle:!0,...this._options?.menuOptions},skipTelemetry:"string"==typeof this._options?.telemetrySource,contextKeyService:this._contextKeyService})}))}};O=T([R(2,w.ez),R(3,k.fN),R(4,x.Z),R(5,L.b),R(6,S.d),R(7,D.k)],O);let P=class extends O{get onDidChangeMenuItems(){return this._onDidChangeMenuItems.event}constructor(e,t,i,s,o,r,a,l,h,c,u){super(e,{resetMenu:t,...i,actionViewItemProvider:(s,o)=>{let r=c.lookUp(t,s instanceof w.nI?s.item.submenu.id:s.id);r||(r=i?.actionViewItemProvider);let a=r?.(s,o,u,(0,n.zk)(e).vscodeWindowId);return a||(0,C.rN)(u,s,o)}},s,o,r,a,l,h),this._onDidChangeMenuItems=this._store.add(new d.vl);let g=this._store.add(s.createMenu(t,o,{emitEventsForSubmenuChanges:!0,eventDebounceDelay:i?.eventDebounceDelay})),p=()=>{let{primary:t,secondary:n}=(0,C.R4)(g.getActions(i?.menuOptions),i?.toolbarOptions?.primaryGroup,i?.toolbarOptions?.shouldInlineSubmenu,i?.toolbarOptions?.useSeparatorsInPrimaryActions);e.classList.toggle("has-no-actions",0===t.length&&0===n.length),super.setActions(t,n)};this._store.add(g.onDidChange(()=>{p(),this._onDidChangeMenuItems.fire(this)})),this._store.add(c.onDidChange(e=>{e===t&&p()})),p()}setActions(){throw new v.D7("This toolbar is populated from a menu.")}};P=T([R(3,w.ez),R(4,k.fN),R(5,x.Z),R(6,L.b),R(7,S.d),R(8,D.k),R(9,E),R(10,N._Y)],P)},69020:()=>{},69061:()=>{},69745:(e,t,i)=>{"use strict";i.d(t,{AO:()=>x,Dr:()=>L,Hs:()=>E,K4:()=>b,Ls:()=>k,Tl:()=>w,UN:()=>I,YA:()=>D,dU:()=>_,ey:()=>V,h0:()=>N,is:()=>y,kr:()=>S,oi:()=>C,sx:()=>v});var n=i(6033),s=i(55532),o=i(71036),r=i(62904),a=i(80484),l=i(6849),h=i(21348),d=i(23047),c=i(72553),u=i(62450),g=i(71224),p=i(74830),m=i(91587),f=i(15254);class _{static getEdits(e,t,i,n,s){if(!s&&this._isAutoIndentType(e,t,i)){let s=[];for(let o of i){let i=this._findActualIndentationForSelection(e,t,o,n);if(null===i)return;s.push({selection:o,indentation:i})}let o=C.getAutoClosingPairClose(e,t,i,n,!1);return this._getIndentationAndAutoClosingPairEdits(e,t,s,n,o)}}static _isAutoIndentType(e,t,i){if(e.autoIndent<4)return!1;for(let e=0,n=i.length;e<n;e++)if(!t.tokenization.isCheapToTokenize(i[e].getEndPosition().lineNumber))return!1;return!0}static _findActualIndentationForSelection(e,t,i,n){let s=(0,m._t)(e,t,i,n,{shiftIndent:t=>W(e,t),unshiftIndent:t=>H(e,t)},e.languageConfigurationService);if(null===s)return null;let o=(0,g.Cw)(t,i.startLineNumber,i.startColumn);return s===e.normalizeIndentation(o)?null:s}static _getIndentationAndAutoClosingPairEdits(e,t,i,n,s){let o=i.map(({selection:i,indentation:o})=>{if(null!==s)return new T(this._getEditFromIndentationAndSelection(e,t,o,i,n,!1),i,n,s);{let s=this._getEditFromIndentationAndSelection(e,t,o,i,n,!0);return B(s.range,s.text,!1)}});return new l.vY(4,o,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}static _getEditFromIndentationAndSelection(e,t,i,n,s,o=!0){let r=n.startLineNumber,a=t.getLineFirstNonWhitespaceColumn(r),l=e.normalizeIndentation(i);return 0!==a&&(l+=t.getLineContent(r).substring(a-1,n.startColumn-1)),l+=o?s:"",{range:new d.Q(r,1,n.endLineNumber,n.endColumn),text:l}}}class v{static getEdits(e,t,i,n,s,o){if(F(t,i,n,s,o))return this._runAutoClosingOvertype(e,n,o)}static _runAutoClosingOvertype(e,t,i){let n=[];for(let e=0,s=t.length;e<s;e++){let s=t[e].getPosition(),r=new d.Q(s.lineNumber,s.column,s.lineNumber,s.column+1);n[e]=new o.iu(r,i)}return new l.vY(4,n,{shouldPushStackElementBefore:O(e,4),shouldPushStackElementAfter:!1})}}class b{static getEdits(e,t,i,n,s){if(F(e,t,i,n,s)){let e=i.map(e=>new o.iu(new d.Q(e.positionLineNumber,e.positionColumn,e.positionLineNumber,e.positionColumn+1),"",!1));return new l.vY(4,e,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}}}class C{static getEdits(e,t,i,n,s,o){if(!o){let o=this.getAutoClosingPairClose(e,t,i,n,s);if(null!==o)return this._runAutoClosingOpenCharType(i,n,s,o)}}static _runAutoClosingOpenCharType(e,t,i,n){let s=[];for(let o=0,r=e.length;o<r;o++){let r=e[o];s[o]=new M(r,t,!i,n)}return new l.vY(4,s,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}static getAutoClosingPairClose(e,t,i,n,s){let o,r;for(let e of i)if(!e.isEmpty())return null;let a=i.map(e=>{let t=e.getPosition();return s?{lineNumber:t.lineNumber,beforeColumn:t.column-n.length,afterColumn:t.column}:{lineNumber:t.lineNumber,beforeColumn:t.column,afterColumn:t.column}}),d=this._findAutoClosingPairOpen(e,t,a.map(e=>new c.y(e.lineNumber,e.beforeColumn)),n);if(!d||((0,l.vG)(n)?(o=e.autoClosingQuotes,r=e.shouldAutoCloseBefore.quote):e.blockCommentStartToken&&d.open.includes(e.blockCommentStartToken)?(o=e.autoClosingComments,r=e.shouldAutoCloseBefore.comment):(o=e.autoClosingBrackets,r=e.shouldAutoCloseBefore.bracket),"never"===o))return null;let u=this._findContainedAutoClosingPair(e,d),g=u?u.close:"",m=!0;for(let i of a){let{lineNumber:s,beforeColumn:a,afterColumn:l}=i,c=t.getLineContent(s),u=c.substring(0,a-1),f=c.substring(l-1);if(f.startsWith(g)||(m=!1),f.length>0){let t=f.charAt(0);if(!this._isBeforeClosingBrace(e,f)&&!r(t))return null}if(1===d.open.length&&("'"===n||'"'===n)&&"always"!==o){let t=(0,h.i)(e.wordSeparators,[]);if(u.length>0){let e=u.charCodeAt(u.length-1);if(0===t.get(e))return null}}if(!t.tokenization.isCheapToTokenize(s))return null;t.tokenization.forceTokenization(s);let _=t.tokenization.getLineTokens(s),v=(0,p.BQ)(_,a-1);if(!d.shouldAutoClose(v,a-v.firstCharOffset))return null;let b=d.findNeutralCharacter();if(b){let e=t.tokenization.getTokenTypeIfInsertingCharacter(s,a,b);if(!d.isOK(e))return null}}return m?d.close.substring(0,d.close.length-g.length):d.close}static _findContainedAutoClosingPair(e,t){if(t.open.length<=1)return null;let i=t.close.charAt(t.close.length-1),n=e.autoClosingPairs.autoClosingPairsCloseByEnd.get(i)||[],s=null;for(let e of n)e.open!==t.open&&t.open.includes(e.open)&&t.close.endsWith(e.close)&&(!s||e.open.length>s.open.length)&&(s=e);return s}static _findAutoClosingPairOpen(e,t,i,n){let s=e.autoClosingPairs.autoClosingPairsOpenByEnd.get(n);if(!s)return null;let o=null;for(let e of s)if(null===o||e.open.length>o.open.length){let s=!0;for(let o of i)if(t.getValueInRange(new d.Q(o.lineNumber,o.column-e.open.length+1,o.lineNumber,o.column))+n!==e.open){s=!1;break}s&&(o=e)}return o}static _isBeforeClosingBrace(e,t){let i=t.charAt(0),n=e.autoClosingPairs.autoClosingPairsOpenByStart.get(i)||[],s=e.autoClosingPairs.autoClosingPairsCloseByStart.get(i)||[],o=n.some(e=>t.startsWith(e.open)),r=s.some(e=>t.startsWith(e.close));return!o&&r}}class w{static getEdits(e,t){if("overtype"!==e.inputMode)return null;let i=t.map(e=>new o.gr(e.insertedTextRange));return new l.vY(4,i,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}}class y{static getEdits(e,t,i,n,s){if(!s&&this._isSurroundSelectionType(e,t,i,n))return this._runSurroundSelectionType(e,i,n)}static _runSurroundSelectionType(e,t,i){let n=[];for(let s=0,o=t.length;s<o;s++){let o=t[s],r=e.surroundingPairs[i];n[s]=new a.i(o,i,r)}return new l.vY(0,n,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})}static _isSurroundSelectionType(e,t,i,n){if(!V(e,n)||!e.surroundingPairs.hasOwnProperty(n))return!1;let s=(0,l.vG)(n);for(let e of i){if(e.isEmpty())return!1;let i=!0;for(let n=e.startLineNumber;n<=e.endLineNumber;n++){let s=t.getLineContent(n),o=n===e.startLineNumber?e.startColumn-1:0,r=n===e.endLineNumber?e.endColumn-1:s.length,a=s.substring(o,r);if(/[^ \t]/.test(a)){i=!1;break}}if(i)return!1;if(s&&e.startLineNumber===e.endLineNumber&&e.startColumn+1===e.endColumn){let i=t.getValueInRange(e);if((0,l.vG)(i))return!1}}return!0}}class S{static getEdits(e,t,i,n,s,o){if(!o&&this._isTypeInterceptorElectricChar(t,i,n)){let o=this._typeInterceptorElectricChar(e,t,i,n[0],s);if(o)return o}}static _isTypeInterceptorElectricChar(e,t,i){return!!(1===i.length&&t.tokenization.isCheapToTokenize(i[0].getEndPosition().lineNumber))}static _typeInterceptorElectricChar(e,t,i,r,a){let h;if(!t.electricChars.hasOwnProperty(a)||!r.isEmpty())return null;let c=r.getPosition();i.tokenization.forceTokenization(c.lineNumber);let u=i.tokenization.getLineTokens(c.lineNumber);try{h=t.onElectricCharacter(a,u,c.column)}catch(e){return(0,n.dz)(e),null}if(!h)return null;if(h.matchOpenBracket){let n=(u.getLineContent()+a).lastIndexOf(h.matchOpenBracket)+1,r=i.bracketPairs.findMatchingBracketUp(h.matchOpenBracket,{lineNumber:c.lineNumber,column:n},500);if(r){if(r.startLineNumber===c.lineNumber)return null;let n=i.getLineContent(r.startLineNumber),h=s.UU(n),u=t.normalizeIndentation(h),g=i.getLineContent(c.lineNumber),p=i.getLineFirstNonWhitespaceColumn(c.lineNumber)||c.column,m=u+g.substring(p-1,c.column-1)+a,f=new d.Q(c.lineNumber,1,c.lineNumber,c.column),_=new o.iu(f,m);return new l.vY(R(m,e),[_],{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!0})}}return null}}class k{static getEdits(e,t,i,n,s){let r=[];for(let t=0,a=i.length;t<a;t++){let a="overtype"!==e.inputMode||s?o.iu:o.AS;r[t]=new a(i[t],n)}let a=R(n,t);return new l.vY(a,r,{shouldPushStackElementBefore:O(t,a),shouldPushStackElementAfter:!1})}}class x{static getEdits(e,t,i,n,s){if(!s&&"\n"===n){let n=[];for(let s=0,o=i.length;s<o;s++)n[s]=this._enter(e,t,!1,i[s]);return new l.vY(4,n,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}}static _enter(e,t,i,n){if(0===e.autoIndent)return B(n,"\n",i);if(!t.tokenization.isCheapToTokenize(n.getStartPosition().lineNumber)||1===e.autoIndent){let o=t.getLineContent(n.startLineNumber),r=s.UU(o).substring(0,n.startColumn-1);return B(n,"\n"+e.normalizeIndentation(r),i)}let r=(0,f.h)(e.autoIndent,t,n,e.languageConfigurationService);if(r){if(r.indentAction===u.l.None)return B(n,"\n"+e.normalizeIndentation(r.indentation+r.appendText),i);else if(r.indentAction===u.l.Indent)return B(n,"\n"+e.normalizeIndentation(r.indentation+r.appendText),i);else if(r.indentAction===u.l.IndentOutdent){let t=e.normalizeIndentation(r.indentation),s=e.normalizeIndentation(r.indentation+r.appendText),a="\n"+s+"\n"+t;return i?new o.q2(n,a,!0):new o.iP(n,a,-1,s.length-t.length,!0)}else if(r.indentAction===u.l.Outdent){let t=H(e,r.indentation);return B(n,"\n"+e.normalizeIndentation(t+r.appendText),i)}}let a=t.getLineContent(n.startLineNumber),l=s.UU(a).substring(0,n.startColumn-1);if(e.autoIndent>=4){let r=(0,m.MU)(e.autoIndent,t,n,{unshiftIndent:t=>H(e,t),shiftIndent:t=>W(e,t),normalizeIndentation:t=>e.normalizeIndentation(t)},e.languageConfigurationService);if(r){let a=e.visibleColumnFromColumn(t,n.getEndPosition()),l=n.endColumn,h=t.getLineContent(n.endLineNumber),d=s.HG(h);if(n=d>=0?n.setEndPosition(n.endLineNumber,Math.max(n.endColumn,d+1)):n.setEndPosition(n.endLineNumber,t.getLineMaxColumn(n.endLineNumber)),i)return new o.q2(n,"\n"+e.normalizeIndentation(r.afterEnter),!0);{let t=0;return l<=d+1&&(e.insertSpaces||(a=Math.ceil(a/e.indentSize)),t=Math.min(a+1-e.normalizeIndentation(r.afterEnter).length-1,0)),new o.iP(n,"\n"+e.normalizeIndentation(r.afterEnter),0,t,!0)}}}return B(n,"\n"+e.normalizeIndentation(l),i)}static lineInsertBefore(e,t,i){if(null===t||null===i)return[];let n=[];for(let s=0,r=i.length;s<r;s++){let r=i[s].positionLineNumber;if(1===r)n[s]=new o.q2(new d.Q(1,1,1,1),"\n");else{r--;let i=t.getLineMaxColumn(r);n[s]=this._enter(e,t,!1,new d.Q(r,i,r,i))}}return n}static lineInsertAfter(e,t,i){if(null===t||null===i)return[];let n=[];for(let s=0,o=i.length;s<o;s++){let o=i[s].positionLineNumber,r=t.getLineMaxColumn(o);n[s]=this._enter(e,t,!1,new d.Q(o,r,o,r))}return n}static lineBreakInsert(e,t,i){let n=[];for(let s=0,o=i.length;s<o;s++)n[s]=this._enter(e,t,!0,i[s]);return n}}class L{static getEdits(e,t,i,n,s,o){let r=this._distributePasteToCursors(e,i,n,s,o);return r?(i=i.sort(d.Q.compareRangesUsingStarts),this._distributedPaste(e,t,i,r)):this._simplePaste(e,t,i,n,s)}static _distributePasteToCursors(e,t,i,n,o){if(n||1===t.length)return null;if(o&&o.length===t.length)return o;if("spread"===e.multiCursorPaste){10===i.charCodeAt(i.length-1)&&(i=i.substring(0,i.length-1)),13===i.charCodeAt(i.length-1)&&(i=i.substring(0,i.length-1));let e=s.uz(i);if(e.length===t.length)return e}return null}static _distributedPaste(e,t,i,n){let s=[];for(let t=0,r=i.length;t<r;t++){let r=e.overtypeOnPaste&&"overtype"===e.inputMode?o.AS:o.iu;s[t]=new r(i[t],n[t])}return new l.vY(0,s,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})}static _simplePaste(e,t,i,n,s){let r=[];for(let t=0,a=i.length;t<a;t++){let a=i[t],l=a.getPosition();if(s&&!a.isEmpty()&&(s=!1),s&&n.indexOf("\n")!==n.length-1&&(s=!1),s){let e=new d.Q(l.lineNumber,1,l.lineNumber,1);r[t]=new o.ui(e,n,a,!0)}else{let i=e.overtypeOnPaste&&"overtype"===e.inputMode?o.AS:o.iu;r[t]=new i(a,n)}}return new l.vY(0,r,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})}}class D{static getEdits(e,t,i,n,s,o,r,a){let h=n.map(e=>this._compositionType(i,e,s,o,r,a));return new l.vY(4,h,{shouldPushStackElementBefore:O(e,4),shouldPushStackElementAfter:!1})}static _compositionType(e,t,i,n,s,r){if(!t.isEmpty())return null;let a=t.getPosition(),l=Math.max(1,a.column-n),h=Math.min(e.getLineMaxColumn(a.lineNumber),a.column+s),c=new d.Q(a.lineNumber,l,a.lineNumber,h);return new o.iP(c,i,0,r)}}class I{static getEdits(e,t,i){let n=[];for(let e=0,s=t.length;e<s;e++)n[e]=new o.iu(t[e],i);let s=R(i,e);return new l.vY(s,n,{shouldPushStackElementBefore:O(e,s),shouldPushStackElementAfter:!1})}}class N{static getCommands(e,t,i){let n=[];for(let s=0,a=i.length;s<a;s++){let a=i[s];if(a.isEmpty()){let i=t.getLineContent(a.startLineNumber);if(/^\s*$/.test(i)&&t.tokenization.isCheapToTokenize(a.startLineNumber)){let r=this._goodIndentForLine(e,t,a.startLineNumber);r=r||" ";let l=e.normalizeIndentation(r);if(!i.startsWith(l)){n[s]=new o.iu(new d.Q(a.startLineNumber,1,a.startLineNumber,i.length+1),l,!0);continue}}n[s]=this._replaceJumpToNextIndent(e,t,a,!0)}else{if(a.startLineNumber===a.endLineNumber){let i=t.getLineMaxColumn(a.startLineNumber);if(1!==a.startColumn||a.endColumn!==i){n[s]=this._replaceJumpToNextIndent(e,t,a,!1);continue}}n[s]=new r.Y(a,{isUnshift:!1,tabSize:e.tabSize,indentSize:e.indentSize,insertSpaces:e.insertSpaces,useTabStops:e.useTabStops,autoIndent:e.autoIndent},e.languageConfigurationService)}}return n}static _goodIndentForLine(e,t,i){let n=null,o="",r=(0,m.vn)(e.autoIndent,t,i,!1,e.languageConfigurationService);if(r)n=r.action,o=r.indentation;else if(i>1){let n;for(n=i-1;n>=1;n--){let e=t.getLineContent(n);if(s.lT(e)>=0)break}if(n<1)return null;let r=t.getLineMaxColumn(n),a=(0,f.h)(e.autoIndent,t,new d.Q(n,r,n,r),e.languageConfigurationService);a&&(o=a.indentation+a.appendText)}return(n&&(n===u.l.Indent&&(o=W(e,o)),n===u.l.Outdent&&(o=H(e,o)),o=e.normalizeIndentation(o)),o)?o:null}static _replaceJumpToNextIndent(e,t,i,n){let s="",r=i.getStartPosition();if(e.insertSpaces){let i=e.visibleColumnFromColumn(t,r),n=e.indentSize,o=n-i%n;for(let e=0;e<o;e++)s+=" "}else s=" ";return new o.iu(i,s,n)}}class E extends o.iP{constructor(e,t,i,n,s,o){super(e,t,i,n),this._openCharacter=s,this._closeCharacter=o,this.closeCharacterRange=null,this.enclosingRange=null}_computeCursorStateWithRange(e,t,i){return this.closeCharacterRange=new d.Q(t.startLineNumber,t.endColumn-this._closeCharacter.length,t.endLineNumber,t.endColumn),this.enclosingRange=new d.Q(t.startLineNumber,t.endColumn-this._openCharacter.length-this._closeCharacter.length,t.endLineNumber,t.endColumn),super.computeCursorState(e,i)}}class M extends E{constructor(e,t,i,n){super(e,(i?t:"")+n,0,-n.length,t,n)}computeCursorState(e,t){let i=t.getInverseEditOperations()[0].range;return this._computeCursorStateWithRange(e,i,t)}}class T extends E{constructor(e,t,i,n){let s=i+n;super(t,s,0,i.length,i,n),this._autoIndentationEdit=e,this._autoClosingEdit={range:t,text:s}}getEditOperations(e,t){t.addTrackedEditOperation(this._autoIndentationEdit.range,this._autoIndentationEdit.text),t.addTrackedEditOperation(this._autoClosingEdit.range,this._autoClosingEdit.text)}computeCursorState(e,t){let i=t.getInverseEditOperations();if(2!==i.length)throw Error("There should be two inverse edit operations!");let n=i[0].range,s=i[1].range,o=n.plusRange(s);return this._computeCursorStateWithRange(e,o,t)}}function R(e,t){return" "===e?5===t||6===t?6:5:4}function O(e,t){return!(!A(e)||A(t))||5!==e&&P(e)!==P(t)}function P(e){return 6===e||5===e?"space":e}function A(e){return 4===e||5===e||6===e}function F(e,t,i,n,s){if("never"===e.autoClosingOvertype||!e.autoClosingPairs.autoClosingPairsCloseSingleChar.has(s))return!1;for(let o=0,r=i.length;o<r;o++){let r=i[o];if(!r.isEmpty())return!1;let a=r.getPosition(),h=t.getLineContent(a.lineNumber);if(h.charAt(a.column-1)!==s)return!1;let d=(0,l.vG)(s);if(92===(a.column>2?h.charCodeAt(a.column-2):0)&&d)return!1;if("auto"===e.autoClosingOvertype){let e=!1;for(let t=0,i=n.length;t<i;t++){let i=n[t];if(a.lineNumber===i.startLineNumber&&a.column===i.startColumn){e=!0;break}}if(!e)return!1}}return!0}function B(e,t,i){return i?new o.q2(e,t,!0):new o.iu(e,t,!0)}function W(e,t,i){return i=i||1,r.Y.shiftIndent(t,t.length+i,e.tabSize,e.indentSize,e.insertSpaces)}function H(e,t,i){return i=i||1,r.Y.unshiftIndent(t,t.length+i,e.tabSize,e.indentSize,e.insertSpaces)}function V(e,t){return(0,l.vG)(t)?"quotes"===e.autoSurround||"languageDefined"===e.autoSurround:"brackets"===e.autoSurround||"languageDefined"===e.autoSurround}},69909:(e,t,i)=>{"use strict";var n;i.d(t,{j:()=>n}),function(e){let t=!1;e.enable=function(){t=!0},e.ofCaller=function(){if(!t)return;let e=Error,i=e.stackTraceLimit;e.stackTraceLimit=3;let n=Error().stack;return e.stackTraceLimit=i,s.fromStack(n,2)}}(n||(n={}));class s{static fromStack(e,t){let i=function(e){let t=e.match(/\((.*):(\d+):(\d+)\)/);if(t)return{fileName:t[1],line:parseInt(t[2]),column:parseInt(t[3]),id:e};let i=e.match(/at ([^\(\)]*):(\d+):(\d+)/);if(i)return{fileName:i[1],line:parseInt(i[2]),column:parseInt(i[3]),id:e}}(e.split("\n")[t+1]);return i?new s(i.fileName,i.line,i.column,i.id):void 0}constructor(e,t,i,n){this.fileName=e,this.line=t,this.column=i,this.id=n}}},69978:()=>{},70518:(e,t,i)=>{"use strict";i.d(t,{D:()=>n});class n{static capture(e){if(0===e.getScrollTop()||e.hasPendingScrollAnimation())return new n(e.getScrollTop(),e.getContentHeight(),null,0,null);let t=null,i=0,s=e.getVisibleRanges();if(s.length>0){t=s[0].getStartPosition();let n=e.getTopForPosition(t.lineNumber,t.column);i=e.getScrollTop()-n}return new n(e.getScrollTop(),e.getContentHeight(),t,i,e.getPosition())}constructor(e,t,i,n,s){this._initialScrollTop=e,this._initialContentHeight=t,this._visiblePosition=i,this._visiblePositionScrollDelta=n,this._cursorPosition=s}restore(e){if((this._initialContentHeight!==e.getContentHeight()||this._initialScrollTop!==e.getScrollTop())&&this._visiblePosition){let t=e.getTopForPosition(this._visiblePosition.lineNumber,this._visiblePosition.column);e.setScrollTop(t+this._visiblePositionScrollDelta)}}restoreRelativeVerticalPositionOfCursor(e){if(this._initialContentHeight===e.getContentHeight()&&this._initialScrollTop===e.getScrollTop())return;let t=e.getPosition();if(!this._cursorPosition||!t)return;let i=e.getTopForLineNumber(t.lineNumber)-e.getTopForLineNumber(this._cursorPosition.lineNumber);e.setScrollTop(e.getScrollTop()+i,1)}}},70537:(e,t,i)=>{"use strict";var n;i.d(t,{Fo:()=>g,YM:()=>n,m5:()=>m,uw:()=>l});class s{constructor(){this._keyCodeToStr=[],this._strToKeyCode=Object.create(null)}define(e,t){this._keyCodeToStr[e]=t,this._strToKeyCode[t.toLowerCase()]=e}keyCodeToStr(e){return this._keyCodeToStr[e]}strToKeyCode(e){return this._strToKeyCode[e.toLowerCase()]||0}}let o=new s,r=new s,a=new s,l=Array(230),h={},d=[],c=Object.create(null),u=Object.create(null),g=[],p=[];for(let e=0;e<=193;e++)g[e]=-1;for(let e=0;e<=132;e++)p[e]=-1;function m(e,t){return(e|(65535&t)<<16>>>0)>>>0}!function(){let e=[],t=[];for(let i of[[1,0,"None",0,"unknown",0,"VK_UNKNOWN","",""],[1,1,"Hyper",0,"",0,"","",""],[1,2,"Super",0,"",0,"","",""],[1,3,"Fn",0,"",0,"","",""],[1,4,"FnLock",0,"",0,"","",""],[1,5,"Suspend",0,"",0,"","",""],[1,6,"Resume",0,"",0,"","",""],[1,7,"Turbo",0,"",0,"","",""],[1,8,"Sleep",0,"",0,"VK_SLEEP","",""],[1,9,"WakeUp",0,"",0,"","",""],[0,10,"KeyA",31,"A",65,"VK_A","",""],[0,11,"KeyB",32,"B",66,"VK_B","",""],[0,12,"KeyC",33,"C",67,"VK_C","",""],[0,13,"KeyD",34,"D",68,"VK_D","",""],[0,14,"KeyE",35,"E",69,"VK_E","",""],[0,15,"KeyF",36,"F",70,"VK_F","",""],[0,16,"KeyG",37,"G",71,"VK_G","",""],[0,17,"KeyH",38,"H",72,"VK_H","",""],[0,18,"KeyI",39,"I",73,"VK_I","",""],[0,19,"KeyJ",40,"J",74,"VK_J","",""],[0,20,"KeyK",41,"K",75,"VK_K","",""],[0,21,"KeyL",42,"L",76,"VK_L","",""],[0,22,"KeyM",43,"M",77,"VK_M","",""],[0,23,"KeyN",44,"N",78,"VK_N","",""],[0,24,"KeyO",45,"O",79,"VK_O","",""],[0,25,"KeyP",46,"P",80,"VK_P","",""],[0,26,"KeyQ",47,"Q",81,"VK_Q","",""],[0,27,"KeyR",48,"R",82,"VK_R","",""],[0,28,"KeyS",49,"S",83,"VK_S","",""],[0,29,"KeyT",50,"T",84,"VK_T","",""],[0,30,"KeyU",51,"U",85,"VK_U","",""],[0,31,"KeyV",52,"V",86,"VK_V","",""],[0,32,"KeyW",53,"W",87,"VK_W","",""],[0,33,"KeyX",54,"X",88,"VK_X","",""],[0,34,"KeyY",55,"Y",89,"VK_Y","",""],[0,35,"KeyZ",56,"Z",90,"VK_Z","",""],[0,36,"Digit1",22,"1",49,"VK_1","",""],[0,37,"Digit2",23,"2",50,"VK_2","",""],[0,38,"Digit3",24,"3",51,"VK_3","",""],[0,39,"Digit4",25,"4",52,"VK_4","",""],[0,40,"Digit5",26,"5",53,"VK_5","",""],[0,41,"Digit6",27,"6",54,"VK_6","",""],[0,42,"Digit7",28,"7",55,"VK_7","",""],[0,43,"Digit8",29,"8",56,"VK_8","",""],[0,44,"Digit9",30,"9",57,"VK_9","",""],[0,45,"Digit0",21,"0",48,"VK_0","",""],[1,46,"Enter",3,"Enter",13,"VK_RETURN","",""],[1,47,"Escape",9,"Escape",27,"VK_ESCAPE","",""],[1,48,"Backspace",1,"Backspace",8,"VK_BACK","",""],[1,49,"Tab",2,"Tab",9,"VK_TAB","",""],[1,50,"Space",10,"Space",32,"VK_SPACE","",""],[0,51,"Minus",88,"-",189,"VK_OEM_MINUS","-","OEM_MINUS"],[0,52,"Equal",86,"=",187,"VK_OEM_PLUS","=","OEM_PLUS"],[0,53,"BracketLeft",92,"[",219,"VK_OEM_4","[","OEM_4"],[0,54,"BracketRight",94,"]",221,"VK_OEM_6","]","OEM_6"],[0,55,"Backslash",93,"\\",220,"VK_OEM_5","\\","OEM_5"],[0,56,"IntlHash",0,"",0,"","",""],[0,57,"Semicolon",85,";",186,"VK_OEM_1",";","OEM_1"],[0,58,"Quote",95,"'",222,"VK_OEM_7","'","OEM_7"],[0,59,"Backquote",91,"`",192,"VK_OEM_3","`","OEM_3"],[0,60,"Comma",87,",",188,"VK_OEM_COMMA",",","OEM_COMMA"],[0,61,"Period",89,".",190,"VK_OEM_PERIOD",".","OEM_PERIOD"],[0,62,"Slash",90,"/",191,"VK_OEM_2","/","OEM_2"],[1,63,"CapsLock",8,"CapsLock",20,"VK_CAPITAL","",""],[1,64,"F1",59,"F1",112,"VK_F1","",""],[1,65,"F2",60,"F2",113,"VK_F2","",""],[1,66,"F3",61,"F3",114,"VK_F3","",""],[1,67,"F4",62,"F4",115,"VK_F4","",""],[1,68,"F5",63,"F5",116,"VK_F5","",""],[1,69,"F6",64,"F6",117,"VK_F6","",""],[1,70,"F7",65,"F7",118,"VK_F7","",""],[1,71,"F8",66,"F8",119,"VK_F8","",""],[1,72,"F9",67,"F9",120,"VK_F9","",""],[1,73,"F10",68,"F10",121,"VK_F10","",""],[1,74,"F11",69,"F11",122,"VK_F11","",""],[1,75,"F12",70,"F12",123,"VK_F12","",""],[1,76,"PrintScreen",0,"",0,"","",""],[1,77,"ScrollLock",84,"ScrollLock",145,"VK_SCROLL","",""],[1,78,"Pause",7,"PauseBreak",19,"VK_PAUSE","",""],[1,79,"Insert",19,"Insert",45,"VK_INSERT","",""],[1,80,"Home",14,"Home",36,"VK_HOME","",""],[1,81,"PageUp",11,"PageUp",33,"VK_PRIOR","",""],[1,82,"Delete",20,"Delete",46,"VK_DELETE","",""],[1,83,"End",13,"End",35,"VK_END","",""],[1,84,"PageDown",12,"PageDown",34,"VK_NEXT","",""],[1,85,"ArrowRight",17,"RightArrow",39,"VK_RIGHT","Right",""],[1,86,"ArrowLeft",15,"LeftArrow",37,"VK_LEFT","Left",""],[1,87,"ArrowDown",18,"DownArrow",40,"VK_DOWN","Down",""],[1,88,"ArrowUp",16,"UpArrow",38,"VK_UP","Up",""],[1,89,"NumLock",83,"NumLock",144,"VK_NUMLOCK","",""],[1,90,"NumpadDivide",113,"NumPad_Divide",111,"VK_DIVIDE","",""],[1,91,"NumpadMultiply",108,"NumPad_Multiply",106,"VK_MULTIPLY","",""],[1,92,"NumpadSubtract",111,"NumPad_Subtract",109,"VK_SUBTRACT","",""],[1,93,"NumpadAdd",109,"NumPad_Add",107,"VK_ADD","",""],[1,94,"NumpadEnter",3,"",0,"","",""],[1,95,"Numpad1",99,"NumPad1",97,"VK_NUMPAD1","",""],[1,96,"Numpad2",100,"NumPad2",98,"VK_NUMPAD2","",""],[1,97,"Numpad3",101,"NumPad3",99,"VK_NUMPAD3","",""],[1,98,"Numpad4",102,"NumPad4",100,"VK_NUMPAD4","",""],[1,99,"Numpad5",103,"NumPad5",101,"VK_NUMPAD5","",""],[1,100,"Numpad6",104,"NumPad6",102,"VK_NUMPAD6","",""],[1,101,"Numpad7",105,"NumPad7",103,"VK_NUMPAD7","",""],[1,102,"Numpad8",106,"NumPad8",104,"VK_NUMPAD8","",""],[1,103,"Numpad9",107,"NumPad9",105,"VK_NUMPAD9","",""],[1,104,"Numpad0",98,"NumPad0",96,"VK_NUMPAD0","",""],[1,105,"NumpadDecimal",112,"NumPad_Decimal",110,"VK_DECIMAL","",""],[0,106,"IntlBackslash",97,"OEM_102",226,"VK_OEM_102","",""],[1,107,"ContextMenu",58,"ContextMenu",93,"","",""],[1,108,"Power",0,"",0,"","",""],[1,109,"NumpadEqual",0,"",0,"","",""],[1,110,"F13",71,"F13",124,"VK_F13","",""],[1,111,"F14",72,"F14",125,"VK_F14","",""],[1,112,"F15",73,"F15",126,"VK_F15","",""],[1,113,"F16",74,"F16",127,"VK_F16","",""],[1,114,"F17",75,"F17",128,"VK_F17","",""],[1,115,"F18",76,"F18",129,"VK_F18","",""],[1,116,"F19",77,"F19",130,"VK_F19","",""],[1,117,"F20",78,"F20",131,"VK_F20","",""],[1,118,"F21",79,"F21",132,"VK_F21","",""],[1,119,"F22",80,"F22",133,"VK_F22","",""],[1,120,"F23",81,"F23",134,"VK_F23","",""],[1,121,"F24",82,"F24",135,"VK_F24","",""],[1,122,"Open",0,"",0,"","",""],[1,123,"Help",0,"",0,"","",""],[1,124,"Select",0,"",0,"","",""],[1,125,"Again",0,"",0,"","",""],[1,126,"Undo",0,"",0,"","",""],[1,127,"Cut",0,"",0,"","",""],[1,128,"Copy",0,"",0,"","",""],[1,129,"Paste",0,"",0,"","",""],[1,130,"Find",0,"",0,"","",""],[1,131,"AudioVolumeMute",117,"AudioVolumeMute",173,"VK_VOLUME_MUTE","",""],[1,132,"AudioVolumeUp",118,"AudioVolumeUp",175,"VK_VOLUME_UP","",""],[1,133,"AudioVolumeDown",119,"AudioVolumeDown",174,"VK_VOLUME_DOWN","",""],[1,134,"NumpadComma",110,"NumPad_Separator",108,"VK_SEPARATOR","",""],[0,135,"IntlRo",115,"ABNT_C1",193,"VK_ABNT_C1","",""],[1,136,"KanaMode",0,"",0,"","",""],[0,137,"IntlYen",0,"",0,"","",""],[1,138,"Convert",0,"",0,"","",""],[1,139,"NonConvert",0,"",0,"","",""],[1,140,"Lang1",0,"",0,"","",""],[1,141,"Lang2",0,"",0,"","",""],[1,142,"Lang3",0,"",0,"","",""],[1,143,"Lang4",0,"",0,"","",""],[1,144,"Lang5",0,"",0,"","",""],[1,145,"Abort",0,"",0,"","",""],[1,146,"Props",0,"",0,"","",""],[1,147,"NumpadParenLeft",0,"",0,"","",""],[1,148,"NumpadParenRight",0,"",0,"","",""],[1,149,"NumpadBackspace",0,"",0,"","",""],[1,150,"NumpadMemoryStore",0,"",0,"","",""],[1,151,"NumpadMemoryRecall",0,"",0,"","",""],[1,152,"NumpadMemoryClear",0,"",0,"","",""],[1,153,"NumpadMemoryAdd",0,"",0,"","",""],[1,154,"NumpadMemorySubtract",0,"",0,"","",""],[1,155,"NumpadClear",131,"Clear",12,"VK_CLEAR","",""],[1,156,"NumpadClearEntry",0,"",0,"","",""],[1,0,"",5,"Ctrl",17,"VK_CONTROL","",""],[1,0,"",4,"Shift",16,"VK_SHIFT","",""],[1,0,"",6,"Alt",18,"VK_MENU","",""],[1,0,"",57,"Meta",91,"VK_COMMAND","",""],[1,157,"ControlLeft",5,"",0,"VK_LCONTROL","",""],[1,158,"ShiftLeft",4,"",0,"VK_LSHIFT","",""],[1,159,"AltLeft",6,"",0,"VK_LMENU","",""],[1,160,"MetaLeft",57,"",0,"VK_LWIN","",""],[1,161,"ControlRight",5,"",0,"VK_RCONTROL","",""],[1,162,"ShiftRight",4,"",0,"VK_RSHIFT","",""],[1,163,"AltRight",6,"",0,"VK_RMENU","",""],[1,164,"MetaRight",57,"",0,"VK_RWIN","",""],[1,165,"BrightnessUp",0,"",0,"","",""],[1,166,"BrightnessDown",0,"",0,"","",""],[1,167,"MediaPlay",0,"",0,"","",""],[1,168,"MediaRecord",0,"",0,"","",""],[1,169,"MediaFastForward",0,"",0,"","",""],[1,170,"MediaRewind",0,"",0,"","",""],[1,171,"MediaTrackNext",124,"MediaTrackNext",176,"VK_MEDIA_NEXT_TRACK","",""],[1,172,"MediaTrackPrevious",125,"MediaTrackPrevious",177,"VK_MEDIA_PREV_TRACK","",""],[1,173,"MediaStop",126,"MediaStop",178,"VK_MEDIA_STOP","",""],[1,174,"Eject",0,"",0,"","",""],[1,175,"MediaPlayPause",127,"MediaPlayPause",179,"VK_MEDIA_PLAY_PAUSE","",""],[1,176,"MediaSelect",128,"LaunchMediaPlayer",181,"VK_MEDIA_LAUNCH_MEDIA_SELECT","",""],[1,177,"LaunchMail",129,"LaunchMail",180,"VK_MEDIA_LAUNCH_MAIL","",""],[1,178,"LaunchApp2",130,"LaunchApp2",183,"VK_MEDIA_LAUNCH_APP2","",""],[1,179,"LaunchApp1",0,"",0,"VK_MEDIA_LAUNCH_APP1","",""],[1,180,"SelectTask",0,"",0,"","",""],[1,181,"LaunchScreenSaver",0,"",0,"","",""],[1,182,"BrowserSearch",120,"BrowserSearch",170,"VK_BROWSER_SEARCH","",""],[1,183,"BrowserHome",121,"BrowserHome",172,"VK_BROWSER_HOME","",""],[1,184,"BrowserBack",122,"BrowserBack",166,"VK_BROWSER_BACK","",""],[1,185,"BrowserForward",123,"BrowserForward",167,"VK_BROWSER_FORWARD","",""],[1,186,"BrowserStop",0,"",0,"VK_BROWSER_STOP","",""],[1,187,"BrowserRefresh",0,"",0,"VK_BROWSER_REFRESH","",""],[1,188,"BrowserFavorites",0,"",0,"VK_BROWSER_FAVORITES","",""],[1,189,"ZoomToggle",0,"",0,"","",""],[1,190,"MailReply",0,"",0,"","",""],[1,191,"MailForward",0,"",0,"","",""],[1,192,"MailSend",0,"",0,"","",""],[1,0,"",114,"KeyInComposition",229,"","",""],[1,0,"",116,"ABNT_C2",194,"VK_ABNT_C2","",""],[1,0,"",96,"OEM_8",223,"VK_OEM_8","",""],[1,0,"",0,"",0,"VK_KANA","",""],[1,0,"",0,"",0,"VK_HANGUL","",""],[1,0,"",0,"",0,"VK_JUNJA","",""],[1,0,"",0,"",0,"VK_FINAL","",""],[1,0,"",0,"",0,"VK_HANJA","",""],[1,0,"",0,"",0,"VK_KANJI","",""],[1,0,"",0,"",0,"VK_CONVERT","",""],[1,0,"",0,"",0,"VK_NONCONVERT","",""],[1,0,"",0,"",0,"VK_ACCEPT","",""],[1,0,"",0,"",0,"VK_MODECHANGE","",""],[1,0,"",0,"",0,"VK_SELECT","",""],[1,0,"",0,"",0,"VK_PRINT","",""],[1,0,"",0,"",0,"VK_EXECUTE","",""],[1,0,"",0,"",0,"VK_SNAPSHOT","",""],[1,0,"",0,"",0,"VK_HELP","",""],[1,0,"",0,"",0,"VK_APPS","",""],[1,0,"",0,"",0,"VK_PROCESSKEY","",""],[1,0,"",0,"",0,"VK_PACKET","",""],[1,0,"",0,"",0,"VK_DBE_SBCSCHAR","",""],[1,0,"",0,"",0,"VK_DBE_DBCSCHAR","",""],[1,0,"",0,"",0,"VK_ATTN","",""],[1,0,"",0,"",0,"VK_CRSEL","",""],[1,0,"",0,"",0,"VK_EXSEL","",""],[1,0,"",0,"",0,"VK_EREOF","",""],[1,0,"",0,"",0,"VK_PLAY","",""],[1,0,"",0,"",0,"VK_ZOOM","",""],[1,0,"",0,"",0,"VK_NONAME","",""],[1,0,"",0,"",0,"VK_PA1","",""],[1,0,"",0,"",0,"VK_OEM_CLEAR","",""]]){let[n,s,m,f,_,v,b,C,w]=i;if(!t[s]&&(t[s]=!0,d[s]=m,c[m]=s,u[m.toLowerCase()]=s,n&&(g[s]=f,0!==f&&3!==f&&5!==f&&4!==f&&6!==f&&57!==f&&(p[f]=s))),!e[f]){if(e[f]=!0,!_)throw Error(`String representation missing for key code ${f} around scan code ${m}`);o.define(f,_),r.define(f,C||_),a.define(f,w||C||_)}v&&(l[v]=f),b&&(h[b]=f)}p[3]=46}(),function(e){e.toString=function(e){return o.keyCodeToStr(e)},e.fromString=function(e){return o.strToKeyCode(e)},e.toUserSettingsUS=function(e){return r.keyCodeToStr(e)},e.toUserSettingsGeneral=function(e){return a.keyCodeToStr(e)},e.fromUserSettings=function(e){return r.strToKeyCode(e)||a.strToKeyCode(e)},e.toElectronAccelerator=function(e){if(e>=98&&e<=113)return null;switch(e){case 16:return"Up";case 18:return"Down";case 15:return"Left";case 17:return"Right"}return o.keyCodeToStr(e)}}(n||(n={}))},70612:(e,t,i)=>{"use strict";i.d(t,{c:()=>r});var n=i(28047),s=i(23047),o=i(70518);class r{static _handleEolEdits(e,t){let i,n=[];for(let e of t)"number"==typeof e.eol&&(i=e.eol),e.range&&"string"==typeof e.text&&n.push(e);return"number"==typeof i&&e.hasModel()&&e.getModel().pushEOL(i),n}static _isFullModelReplaceEdit(e,t){if(!e.hasModel())return!1;let i=e.getModel(),n=i.validateRange(t.range);return i.getFullModelRange().equalsRange(n)}static execute(e,t,i){i&&e.pushUndoStop();let a=o.D.capture(e),l=r._handleEolEdits(e,t);1===l.length&&r._isFullModelReplaceEdit(e,l[0])?e.executeEdits("formatEditsCommand",l.map(e=>n.k.replace(s.Q.lift(e.range),e.text))):e.executeEdits("formatEditsCommand",l.map(e=>n.k.replaceMove(s.Q.lift(e.range),e.text))),i&&e.pushUndoStop(),a.restoreRelativeVerticalPositionOfCursor(e)}}},70986:(e,t,i)=>{"use strict";i.d(t,{g:()=>d});var n=i(55532),s=i(71036),o=i(6849),r=i(17379),a=i(29740),l=i(23047),h=i(72553);class d{static deleteRight(e,t,i,n){let o=[],r=3!==e;for(let e=0,a=n.length;e<a;e++){let a=n[e],l=this.getDeleteRightRange(a,i,t);if(l.isEmpty()){o[e]=null;continue}l.startLineNumber!==l.endLineNumber&&(r=!0),o[e]=new s.iu(l,"")}return[r,o]}static getDeleteRightRange(e,t,i){if(!e.isEmpty())return e;let n=e.getPosition(),s=a.I.right(i,t,n);if(i.trimWhitespaceOnDelete&&s.lineNumber!==n.lineNumber){let e=t.getLineFirstNonWhitespaceColumn(n.lineNumber)>0,i=t.getLineFirstNonWhitespaceColumn(s.lineNumber);if(e&&i>0)return new l.Q(s.lineNumber,i,n.lineNumber,n.column)}return new l.Q(s.lineNumber,s.column,n.lineNumber,n.column)}static isAutoClosingPairDelete(e,t,i,n,s,r,a){if("never"===t&&"never"===i||"never"===e)return!1;for(let l=0,h=r.length;l<h;l++){let h=r[l],d=h.getPosition();if(!h.isEmpty())return!1;let c=s.getLineContent(d.lineNumber);if(d.column<2||d.column>=c.length+1)return!1;let u=c.charAt(d.column-2),g=n.get(u);if(!g)return!1;if((0,o.vG)(u)){if("never"===i)return!1}else if("never"===t)return!1;let p=c.charAt(d.column-1),m=!1;for(let e of g)e.open===u&&e.close===p&&(m=!0);if(!m)return!1;if("auto"===e){let e=!1;for(let t=0,i=a.length;t<i;t++){let i=a[t];if(d.lineNumber===i.startLineNumber&&d.column===i.startColumn){e=!0;break}}if(!e)return!1}}return!0}static _runAutoClosingPairDelete(e,t,i){let n=[];for(let e=0,t=i.length;e<t;e++){let t=i[e].getPosition(),o=new l.Q(t.lineNumber,t.column-1,t.lineNumber,t.column+1);n[e]=new s.iu(o,"")}return[!0,n]}static deleteLeft(e,t,i,n,o){if(this.isAutoClosingPairDelete(t.autoClosingDelete,t.autoClosingBrackets,t.autoClosingQuotes,t.autoClosingPairs.autoClosingPairsOpenByEnd,i,n,o))return this._runAutoClosingPairDelete(t,i,n);let r=[],a=2!==e;for(let e=0,o=n.length;e<o;e++){let o=d.getDeleteLeftRange(n[e],i,t);if(o.isEmpty()){r[e]=null;continue}o.startLineNumber!==o.endLineNumber&&(a=!0),r[e]=new s.iu(o,"")}return[a,r]}static getDeleteLeftRange(e,t,i){if(!e.isEmpty())return e;let s=e.getPosition();if(i.useTabStops&&s.column>1){let e=t.getLineContent(s.lineNumber),o=n.HG(e),a=-1===o?e.length+1:o+1;if(s.column<=a){let e=i.visibleColumnFromColumn(t,s),n=r.A.prevIndentTabStop(e,i.indentSize),o=i.columnFromVisibleColumn(t,s.lineNumber,n);return new l.Q(s.lineNumber,o,s.lineNumber,s.column)}}return l.Q.fromPositions(d.getPositionAfterDeleteLeft(s,t),s)}static getPositionAfterDeleteLeft(e,t){if(e.column>1){let i=n.Wd(e.column-1,t.getLineContent(e.lineNumber));return e.with(void 0,i+1)}if(!(e.lineNumber>1))return e;{let i=e.lineNumber-1;return new h.y(i,t.getLineMaxColumn(i))}}static cut(e,t,i){let n=[],r=null;i.sort((e,t)=>h.y.compare(e.getStartPosition(),t.getEndPosition()));for(let o=0,a=i.length;o<a;o++){let a=i[o];if(a.isEmpty())if(e.emptySelectionClipboard){let e,i,h,d,c=a.getPosition();c.lineNumber<t.getLineCount()?(e=c.lineNumber,i=1,h=c.lineNumber+1,d=1):(c.lineNumber>1&&r?.endLineNumber!==c.lineNumber?(e=c.lineNumber-1,i=t.getLineMaxColumn(c.lineNumber-1)):(e=c.lineNumber,i=1),h=c.lineNumber,d=t.getLineMaxColumn(c.lineNumber));let u=new l.Q(e,i,h,d);r=u,u.isEmpty()?n[o]=null:n[o]=new s.iu(u,"")}else n[o]=null;else n[o]=new s.iu(a,"")}return new o.vY(0,n,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})}}},71036:(e,t,i)=>{"use strict";i.d(t,{AS:()=>a,gr:()=>c,iP:()=>d,iu:()=>r,q2:()=>h,tA:()=>l,ui:()=>u});var n=i(72553),s=i(23047),o=i(82600);class r{constructor(e,t,i=!1){this._range=e,this._text=t,this.insertsAutoWhitespace=i}getEditOperations(e,t){t.addTrackedEditOperation(this._range,this._text)}computeCursorState(e,t){let i=t.getInverseEditOperations()[0].range;return o.L.fromPositions(i.getEndPosition())}}class a{constructor(e,t,i=!1){this._range=e,this._text=t,this.insertsAutoWhitespace=i}getEditOperations(e,t){let i=this._range.getStartPosition(),o=this._range.getEndPosition(),r=o.lineNumber,a=g(e,o,this._text.length+(this._range.isEmpty()?0:-1));a.lineNumber>r&&(a=new n.y(r,e.getLineMaxColumn(r)));let l=s.Q.fromPositions(i,a);t.addTrackedEditOperation(l,this._text)}computeCursorState(e,t){let i=t.getInverseEditOperations()[0].range;return o.L.fromPositions(i.getEndPosition())}}class l{constructor(e,t){this._range=e,this._text=t}getEditOperations(e,t){t.addTrackedEditOperation(this._range,this._text)}computeCursorState(e,t){let i=t.getInverseEditOperations()[0].range;return o.L.fromRange(i,0)}}class h{constructor(e,t,i=!1){this._range=e,this._text=t,this.insertsAutoWhitespace=i}getEditOperations(e,t){t.addTrackedEditOperation(this._range,this._text)}computeCursorState(e,t){let i=t.getInverseEditOperations()[0].range;return o.L.fromPositions(i.getStartPosition())}}class d{constructor(e,t,i,n,s=!1){this._range=e,this._text=t,this._columnDeltaOffset=n,this._lineNumberDeltaOffset=i,this.insertsAutoWhitespace=s}getEditOperations(e,t){t.addTrackedEditOperation(this._range,this._text)}computeCursorState(e,t){let i=t.getInverseEditOperations()[0].range;return o.L.fromPositions(i.getEndPosition().delta(this._lineNumberDeltaOffset,this._columnDeltaOffset))}}class c{constructor(e){this._range=e}getEditOperations(e,t){let i=e.getValueInRange(this._range),o=this._range.getEndPosition(),r=o.lineNumber,a=g(e,o,i.length);a.lineNumber>r&&(a=new n.y(r,e.getLineMaxColumn(r)));let l=s.Q.fromPositions(o,a);t.addTrackedEditOperation(l,"")}computeCursorState(e,t){let i=t.getInverseEditOperations()[0].range;return o.L.fromPositions(i.getEndPosition())}}class u{constructor(e,t,i,n=!1){this._range=e,this._text=t,this._initialSelection=i,this._forceMoveMarkers=n,this._selectionId=null}getEditOperations(e,t){t.addTrackedEditOperation(this._range,this._text,this._forceMoveMarkers),this._selectionId=t.trackSelection(this._initialSelection)}computeCursorState(e,t){return t.getTrackedSelection(this._selectionId)}}function g(e,t,i){if(i<0)throw Error("Unexpected negative delta");let s=e.getLineCount(),o=new n.y(s,e.getLineMaxColumn(s));for(let r=t.lineNumber;r<=s;r++)if(r===t.lineNumber){let s=i-e.getLineMaxColumn(t.lineNumber)+t.column;if(s<=0){o=new n.y(t.lineNumber,t.column+i);break}i=s}else{let t=i-e.getLineMaxColumn(r);if(t<=0){o=new n.y(r,i);break}i=t}return o}},71224:(e,t,i)=>{"use strict";i.d(t,{JZ:()=>E,Cw:()=>O});var n=i(17354),s=i(82102),o=i(55532),r=i(95934),a=i(62450);class l{static{this.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED_QUOTES=";:.,=}])> \n "}static{this.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED_BRACKETS="'\"`;:.,=}])> \n "}constructor(e){if(e.autoClosingPairs?this._autoClosingPairs=e.autoClosingPairs.map(e=>new a.i3(e)):e.brackets?this._autoClosingPairs=e.brackets.map(e=>new a.i3({open:e[0],close:e[1]})):this._autoClosingPairs=[],e.__electricCharacterSupport&&e.__electricCharacterSupport.docComment){let t=e.__electricCharacterSupport.docComment;this._autoClosingPairs.push(new a.i3({open:t.open,close:t.close||""}))}this._autoCloseBeforeForQuotes="string"==typeof e.autoCloseBefore?e.autoCloseBefore:l.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED_QUOTES,this._autoCloseBeforeForBrackets="string"==typeof e.autoCloseBefore?e.autoCloseBefore:l.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED_BRACKETS,this._surroundingPairs=e.surroundingPairs||this._autoClosingPairs}getAutoClosingPairs(){return this._autoClosingPairs}getAutoCloseBeforeSet(e){return e?this._autoCloseBeforeForQuotes:this._autoCloseBeforeForBrackets}getSurroundingPairs(){return this._surroundingPairs}}var h=i(5488),d=i(74830),c=i(56460);class u{constructor(e){this._richEditBrackets=e}getElectricCharacters(){let e=[];if(this._richEditBrackets)for(let t of this._richEditBrackets.brackets)for(let i of t.close){let t=i.charAt(i.length-1);e.push(t)}return(0,h.dM)(e)}onElectricCharacter(e,t,i){if(!this._richEditBrackets||0===this._richEditBrackets.brackets.length)return null;let n=t.findTokenIndexAtOffset(i-1);if((0,d.Yo)(t.getStandardTokenType(n)))return null;let s=this._richEditBrackets.reversedRegex,o=t.getLineContent().substring(0,i-1)+e,r=c.Fu.findPrevBracketInRange(s,1,o,0,o.length);if(!r)return null;let a=o.substring(r.startColumn-1,r.endColumn-1).toLowerCase();if(this._richEditBrackets.textIsOpenBracket[a])return null;let l=t.getActualLineContentBefore(r.startColumn-1);return/^\s*$/.test(l)?{matchOpenBracket:a}:null}}function g(e){return e.global&&(e.lastIndex=0),!0}class p{constructor(e){this._indentationRules=e}shouldIncrease(e){return!!(this._indentationRules&&this._indentationRules.increaseIndentPattern&&g(this._indentationRules.increaseIndentPattern)&&this._indentationRules.increaseIndentPattern.test(e))}shouldDecrease(e){return!!(this._indentationRules&&this._indentationRules.decreaseIndentPattern&&g(this._indentationRules.decreaseIndentPattern)&&this._indentationRules.decreaseIndentPattern.test(e))}shouldIndentNextLine(e){return!!(this._indentationRules&&this._indentationRules.indentNextLinePattern&&g(this._indentationRules.indentNextLinePattern)&&this._indentationRules.indentNextLinePattern.test(e))}shouldIgnore(e){return!!(this._indentationRules&&this._indentationRules.unIndentedLinePattern&&g(this._indentationRules.unIndentedLinePattern)&&this._indentationRules.unIndentedLinePattern.test(e))}getIndentMetadata(e){let t=0;return this.shouldIncrease(e)&&(t+=1),this.shouldDecrease(e)&&(t+=2),this.shouldIndentNextLine(e)&&(t+=4),this.shouldIgnore(e)&&(t+=8),t}}var m=i(6033);class f{constructor(e){(e=e||{}).brackets=e.brackets||[["(",")"],["{","}"],["[","]"]],this._brackets=[],e.brackets.forEach(e=>{let t=f._createOpenBracketRegExp(e[0]),i=f._createCloseBracketRegExp(e[1]);t&&i&&this._brackets.push({open:e[0],openRegExp:t,close:e[1],closeRegExp:i})}),this._regExpRules=e.onEnterRules||[]}onEnter(e,t,i,n){if(e>=3)for(let e=0,s=this._regExpRules.length;e<s;e++){let s=this._regExpRules[e];if([{reg:s.beforeText,text:i},{reg:s.afterText,text:n},{reg:s.previousLineText,text:t}].every(e=>!e.reg||(e.reg.lastIndex=0,e.reg.test(e.text))))return s.action}if(e>=2&&i.length>0&&n.length>0)for(let e=0,t=this._brackets.length;e<t;e++){let t=this._brackets[e];if(t.openRegExp.test(i)&&t.closeRegExp.test(n))return{indentAction:a.l.IndentOutdent}}if(e>=2&&i.length>0){for(let e=0,t=this._brackets.length;e<t;e++)if(this._brackets[e].openRegExp.test(i))return{indentAction:a.l.Indent}}return null}static _createOpenBracketRegExp(e){let t=o.bm(e);return/\B/.test(t.charAt(0))||(t="\\b"+t),t+="\\s*$",f._safeRegExp(t)}static _createCloseBracketRegExp(e){let t=o.bm(e);return/\B/.test(t.charAt(t.length-1))||(t+="\\b"),t="^\\s*"+t,f._safeRegExp(t)}static _safeRegExp(e){try{return new RegExp(e)}catch(e){return(0,m.dz)(e),null}}}var _=i(22263),v=i(64369),b=i(24224),C=i(27140),w=i(5081),y=i(19072);class S{constructor(e,t){this.languageId=e;let i=t.brackets?k(t.brackets):[],n=new y.VV(e=>{let t=new Set;return{info:new L(this,e,t),closing:t}}),s=new y.VV(e=>{let t=new Set,i=new Set;return{info:new D(this,e,t,i),opening:t,openingColorized:i}});for(let[e,t]of i){let i=n.get(e),o=s.get(t);i.closing.add(o.info),o.opening.add(i.info)}for(let[e,o]of t.colorizedBracketPairs?k(t.colorizedBracketPairs):i.filter(e=>"<"!==e[0]||">"!==e[1])){let t=n.get(e),i=s.get(o);t.closing.add(i.info),i.openingColorized.add(t.info),i.opening.add(t.info)}this._openingBrackets=new Map([...n.cachedValues].map(([e,t])=>[e,t.info])),this._closingBrackets=new Map([...s.cachedValues].map(([e,t])=>[e,t.info]))}get openingBrackets(){return[...this._openingBrackets.values()]}get closingBrackets(){return[...this._closingBrackets.values()]}getOpeningBracketInfo(e){return this._openingBrackets.get(e)}getClosingBracketInfo(e){return this._closingBrackets.get(e)}getBracketInfo(e){return this.getOpeningBracketInfo(e)||this.getClosingBracketInfo(e)}getBracketRegExp(e){let t=Array.from([...this._openingBrackets.keys(),...this._closingBrackets.keys()]);return(0,c.xb)(t,e)}}function k(e){return e.filter(([e,t])=>""!==e&&""!==t)}class x{constructor(e,t){this.config=e,this.bracketText=t}get languageId(){return this.config.languageId}}class L extends x{constructor(e,t,i){super(e,t),this.openedBrackets=i,this.isOpeningBracket=!0}}class D extends x{constructor(e,t,i,n){super(e,t),this.openingBrackets=i,this.openingColorizedBrackets=n,this.isOpeningBracket=!1}closes(e){return e.config===this.config&&this.openingBrackets.has(e)}closesColorized(e){return e.config===this.config&&this.openingColorizedBrackets.has(e)}getOpeningBrackets(){return[...this.openingBrackets]}}var I=function(e,t){return function(i,n){t(i,n,e)}};class N{constructor(e){this.languageId=e}affects(e){return!this.languageId||this.languageId===e}}let E=(0,_.u1)("languageConfigurationService"),M=class extends s.jG{constructor(e,t){super(),this.configurationService=e,this.languageService=t,this._registry=this._register(new W),this.onDidChangeEmitter=this._register(new n.vl),this.onDidChange=this.onDidChangeEmitter.event,this.configurations=new Map;let i=new Set(Object.values(T));this._register(this.configurationService.onDidChangeConfiguration(e=>{let t=e.change.keys.some(e=>i.has(e)),n=e.change.overrides.filter(([e,t])=>t.some(e=>i.has(e))).map(([e])=>e);if(t)this.configurations.clear(),this.onDidChangeEmitter.fire(new N(void 0));else for(let e of n)this.languageService.isRegisteredLanguageId(e)&&(this.configurations.delete(e),this.onDidChangeEmitter.fire(new N(e)))})),this._register(this._registry.onDidChange(e=>{this.configurations.delete(e.languageId),this.onDidChangeEmitter.fire(new N(e.languageId))}))}register(e,t,i){return this._registry.register(e,t,i)}getLanguageConfiguration(e){let t=this.configurations.get(e);return t||(t=function(e,t,i,n){let s=t.getLanguageConfiguration(e);if(!s){if(!n.isRegisteredLanguageId(e))return new H(e,{});s=new H(e,{})}let o=function(e,t){let i=t.getValue(T.brackets,{overrideIdentifier:e}),n=t.getValue(T.colorizedBracketPairs,{overrideIdentifier:e});return{brackets:R(i),colorizedBracketPairs:R(n)}}(s.languageId,i),r=A([s.underlyingConfig,o]);return new H(s.languageId,r)}(e,this._registry,this.configurationService,this.languageService),this.configurations.set(e,t)),t}};M=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([I(0,v.pG),I(1,b.L)],M);let T={brackets:"editor.language.brackets",colorizedBracketPairs:"editor.language.colorizedBracketPairs"};function R(e){if(Array.isArray(e))return e.map(e=>{if(Array.isArray(e)&&2===e.length)return[e[0],e[1]]}).filter(e=>!!e)}function O(e,t,i){let n=e.getLineContent(t),s=o.UU(n);return s.length>i-1&&(s=s.substring(0,i-1)),s}class P{constructor(e){this.languageId=e,this._resolved=null,this._entries=[],this._order=0,this._resolved=null}register(e,t){let i=new F(e,t,++this._order);return this._entries.push(i),this._resolved=null,(0,s.lC)((0,s.s)(()=>{for(let e=0;e<this._entries.length;e++)if(this._entries[e]===i){this._entries.splice(e,1),this._resolved=null;break}}))}getResolvedConfiguration(){if(!this._resolved){let e=this._resolve();e&&(this._resolved=new H(this.languageId,e))}return this._resolved}_resolve(){return 0===this._entries.length?null:(this._entries.sort(F.cmp),A(this._entries.map(e=>e.configuration)))}}function A(e){let t={comments:void 0,brackets:void 0,wordPattern:void 0,indentationRules:void 0,onEnterRules:void 0,autoClosingPairs:void 0,surroundingPairs:void 0,autoCloseBefore:void 0,folding:void 0,colorizedBracketPairs:void 0,__electricCharacterSupport:void 0};for(let i of e)t={comments:i.comments||t.comments,brackets:i.brackets||t.brackets,wordPattern:i.wordPattern||t.wordPattern,indentationRules:i.indentationRules||t.indentationRules,onEnterRules:i.onEnterRules||t.onEnterRules,autoClosingPairs:i.autoClosingPairs||t.autoClosingPairs,surroundingPairs:i.surroundingPairs||t.surroundingPairs,autoCloseBefore:i.autoCloseBefore||t.autoCloseBefore,folding:i.folding||t.folding,colorizedBracketPairs:i.colorizedBracketPairs||t.colorizedBracketPairs,__electricCharacterSupport:i.__electricCharacterSupport||t.__electricCharacterSupport};return t}class F{constructor(e,t,i){this.configuration=e,this.priority=t,this.order=i}static cmp(e,t){return e.priority===t.priority?e.order-t.order:e.priority-t.priority}}class B{constructor(e){this.languageId=e}}class W extends s.jG{constructor(){super(),this._entries=new Map,this._onDidChange=this._register(new n.vl),this.onDidChange=this._onDidChange.event,this._register(this.register(w.vH,{brackets:[["(",")"],["[","]"],["{","}"]],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"`",close:"`"}],colorizedBracketPairs:[],folding:{offSide:!0}},0))}register(e,t,i=0){let n=this._entries.get(e);n||(n=new P(e),this._entries.set(e,n));let o=n.register(t,i);return this._onDidChange.fire(new B(e)),(0,s.lC)((0,s.s)(()=>{o.dispose(),this._onDidChange.fire(new B(e))}))}getLanguageConfiguration(e){let t=this._entries.get(e);return t?.getResolvedConfiguration()||null}}class H{constructor(e,t){this.languageId=e,this.underlyingConfig=t,this._brackets=null,this._electricCharacter=null,this._onEnterSupport=this.underlyingConfig.brackets||this.underlyingConfig.indentationRules||this.underlyingConfig.onEnterRules?new f(this.underlyingConfig):null,this.comments=H._handleComments(this.underlyingConfig),this.characterPair=new l(this.underlyingConfig),this.wordDefinition=this.underlyingConfig.wordPattern||r.Ld,this.indentationRules=this.underlyingConfig.indentationRules,this.underlyingConfig.indentationRules?this.indentRulesSupport=new p(this.underlyingConfig.indentationRules):this.indentRulesSupport=null,this.foldingRules=this.underlyingConfig.folding||{},this.bracketsNew=new S(e,this.underlyingConfig)}getWordDefinition(){return(0,r.Io)(this.wordDefinition)}get brackets(){return!this._brackets&&this.underlyingConfig.brackets&&(this._brackets=new c.az(this.languageId,this.underlyingConfig.brackets)),this._brackets}get electricCharacter(){return this._electricCharacter||(this._electricCharacter=new u(this.brackets)),this._electricCharacter}onEnter(e,t,i,n){return this._onEnterSupport?this._onEnterSupport.onEnter(e,t,i,n):null}getAutoClosingPairs(){return new a.GB(this.characterPair.getAutoClosingPairs())}getAutoCloseBeforeSet(e){return this.characterPair.getAutoCloseBeforeSet(e)}getSurroundingPairs(){return this.characterPair.getSurroundingPairs()}static _handleComments(e){let t=e.comments;if(!t)return null;let i={};if(t.lineComment&&("string"==typeof t.lineComment?i.lineCommentToken=t.lineComment:(i.lineCommentToken=t.lineComment.comment,i.lineCommentNoIndent=t.lineComment.noIndent)),t.blockComment){let[e,n]=t.blockComment;i.blockCommentStartToken=e,i.blockCommentEndToken=n}return i}}(0,C.v)(E,M,1)},71313:(e,t,i)=>{"use strict";i.d(t,{_:()=>s});var n=i(82102);class s extends n.jG{constructor(){super(...arguments),this._isDisposed=!1}dispose(){super.dispose(),this._isDisposed=!0}assertNotDisposed(){if(this._isDisposed)throw Error("TextModelPart is disposed!")}}},71544:(e,t,i)=>{"use strict";i.d(t,{Ft:()=>l,V7:()=>a,Xo:()=>h,ok:()=>s,vA:()=>r,xb:()=>o});var n=i(6033);function s(e,t){if(!e)throw Error(t?`Assertion failed (${t})`:"Assertion Failed")}function o(e,t="Unreachable"){throw Error(t)}function r(e,t="unexpected state"){if(!e)throw"string"==typeof t?new n.D7(`Assertion Failed: ${t}`):t}function a(e,t="Soft Assertion Failed"){e||(0,n.dz)(new n.D7(t))}function l(e){e()||(e(),(0,n.dz)(new n.D7("Assertion Failed")))}function h(e,t){let i=0;for(;i<e.length-1;){if(!t(e[i],e[i+1]))return!1;i++}return!0}},71819:(e,t,i)=>{"use strict";i.d(t,{L:()=>s,h:()=>o});var n=i(6033);class s{static fromTo(e,t){return new s(e,t)}static addRange(e,t){let i=0;for(;i<t.length&&t[i].endExclusive<e.start;)i++;let n=i;for(;n<t.length&&t[n].start<=e.endExclusive;)n++;if(i===n)t.splice(i,0,e);else{let o=Math.min(e.start,t[i].start),r=Math.max(e.endExclusive,t[n-1].endExclusive);t.splice(i,n-i,new s(o,r))}}static tryCreate(e,t){if(!(e>t))return new s(e,t)}static ofLength(e){return new s(0,e)}static ofStartAndLength(e,t){return new s(e,e+t)}static emptyAt(e){return new s(e,e)}constructor(e,t){if(this.start=e,this.endExclusive=t,e>t)throw new n.D7(`Invalid range: ${this.toString()}`)}get isEmpty(){return this.start===this.endExclusive}delta(e){return new s(this.start+e,this.endExclusive+e)}deltaStart(e){return new s(this.start+e,this.endExclusive)}deltaEnd(e){return new s(this.start,this.endExclusive+e)}get length(){return this.endExclusive-this.start}toString(){return`[${this.start}, ${this.endExclusive})`}equals(e){return this.start===e.start&&this.endExclusive===e.endExclusive}contains(e){return this.start<=e&&e<this.endExclusive}join(e){return new s(Math.min(this.start,e.start),Math.max(this.endExclusive,e.endExclusive))}intersect(e){let t=Math.max(this.start,e.start),i=Math.min(this.endExclusive,e.endExclusive);if(t<=i)return new s(t,i)}intersectionLength(e){let t=Math.max(this.start,e.start);return Math.max(0,Math.min(this.endExclusive,e.endExclusive)-t)}intersects(e){return Math.max(this.start,e.start)<Math.min(this.endExclusive,e.endExclusive)}intersectsOrTouches(e){return Math.max(this.start,e.start)<=Math.min(this.endExclusive,e.endExclusive)}isBefore(e){return this.endExclusive<=e.start}isAfter(e){return this.start>=e.endExclusive}slice(e){return e.slice(this.start,this.endExclusive)}substring(e){return e.substring(this.start,this.endExclusive)}clip(e){if(this.isEmpty)throw new n.D7(`Invalid clipping range: ${this.toString()}`);return Math.max(this.start,Math.min(this.endExclusive-1,e))}clipCyclic(e){if(this.isEmpty)throw new n.D7(`Invalid clipping range: ${this.toString()}`);return e<this.start?this.endExclusive-(this.start-e)%this.length:e>=this.endExclusive?this.start+(e-this.start)%this.length:e}forEach(e){for(let t=this.start;t<this.endExclusive;t++)e(t)}joinRightTouching(e){if(this.endExclusive!==e.start)throw new n.D7(`Invalid join: ${this.toString()} and ${e.toString()}`);return new s(this.start,e.endExclusive)}}class o{constructor(){this._sortedRanges=[]}addRange(e){let t=0;for(;t<this._sortedRanges.length&&this._sortedRanges[t].endExclusive<e.start;)t++;let i=t;for(;i<this._sortedRanges.length&&this._sortedRanges[i].start<=e.endExclusive;)i++;if(t===i)this._sortedRanges.splice(t,0,e);else{let n=Math.min(e.start,this._sortedRanges[t].start),o=Math.max(e.endExclusive,this._sortedRanges[i-1].endExclusive);this._sortedRanges.splice(t,i-t,new s(n,o))}}toString(){return this._sortedRanges.map(e=>e.toString()).join(", ")}intersectsStrict(e){let t=0;for(;t<this._sortedRanges.length&&this._sortedRanges[t].endExclusive<=e.start;)t++;return t<this._sortedRanges.length&&this._sortedRanges[t].start<e.endExclusive}intersectWithRange(e){let t=new o;for(let i of this._sortedRanges){let n=i.intersect(e);n&&t.addRange(n)}return t}intersectWithRangeLength(e){return this.intersectWithRange(e).length}get length(){return this._sortedRanges.reduce((e,t)=>e+t.length,0)}}},72150:(e,t,i)=>{"use strict";i.d(t,{$y:()=>p,AV:()=>C,Am:()=>c,D1:()=>v,EK:()=>k,MZ:()=>y,Mu:()=>S,Nu:()=>f,O8:()=>x,Vs:()=>w,pN:()=>m,pY:()=>u,rX:()=>g,uN:()=>_});var n=i(46843),s=i(13445),o=i(82102),r=i(76946),a=i(83699),l=i(72553),h=i(23047),d=i(62413);function c(e,t,i,n){if(0===e.length)return t;if(0===t.length)return e;let s=[],o=0,r=0;for(;o<e.length&&r<t.length;){let a=e[o],l=t[r],h=i(a),d=i(l);h<d?(s.push(a),o++):(h>d?s.push(l):(s.push(n(a,l)),o++),r++)}for(;o<e.length;)s.push(e[o]),o++;for(;r<t.length;)s.push(t[r]),r++;return s}function u(e,t){let i=new o.Cm,n=e.createDecorationsCollection();return i.add((0,r.zL)({debugName:()=>`Apply decorations from ${t.debugName}`},e=>{let i=t.read(e);n.set(i)})),i.add({dispose:()=>{n.clear()}}),i}function g(e,t){return e.appendChild(t),(0,o.s)(()=>{t.remove()})}function p(e,t){return e.prepend(t),(0,o.s)(()=>{t.remove()})}class m extends o.jG{get width(){return this._width}get height(){return this._height}get automaticLayout(){return this._automaticLayout}constructor(e,t){super(),this._automaticLayout=!1,this.elementSizeObserver=this._register(new a.u(e,t)),this._width=(0,r.FY)(this,this.elementSizeObserver.getWidth()),this._height=(0,r.FY)(this,this.elementSizeObserver.getHeight()),this._register(this.elementSizeObserver.onDidChange(e=>(0,r.Rn)(e=>{this._width.set(this.elementSizeObserver.getWidth(),e),this._height.set(this.elementSizeObserver.getHeight(),e)})))}observe(e){this.elementSizeObserver.observe(e)}setAutomaticLayout(e){this._automaticLayout=e,e?this.elementSizeObserver.startObserving():this.elementSizeObserver.stopObserving()}}function f(e,t,i){let n,s=t.get(),o=s,a=s,l=(0,r.FY)("animatedValue",s),h=-1;return i.add((0,r.Y)({changeTracker:{createChangeSummary:()=>({animate:!1}),handleChange:(e,i)=>(e.didChange(t)&&(i.animate=i.animate||e.change),!0)}},(i,r)=>{void 0!==n&&(e.cancelAnimationFrame(n),n=void 0),o=a,s=t.read(i),h=Date.now()-300*!r.animate,function t(){var i,r,d,c;let u=Date.now()-h;a=Math.floor((i=u,r=o,d=s-o,c=300,300===i?r+d:d*(-Math.pow(2,-10*i/c)+1)+r)),u<300?n=e.requestAnimationFrame(t):a=s,l.set(a,void 0)}()})),l}class _ extends o.jG{constructor(e,t,i){super(),this._register(new b(e,i)),this._register(C(i,{height:t.actualHeight,top:t.actualTop}))}}class v{get afterLineNumber(){return this._afterLineNumber.get()}constructor(e,t){this._afterLineNumber=e,this.heightInPx=t,this.domNode=document.createElement("div"),this._actualTop=(0,r.FY)(this,void 0),this._actualHeight=(0,r.FY)(this,void 0),this.actualTop=this._actualTop,this.actualHeight=this._actualHeight,this.showInHiddenAreas=!0,this.onChange=this._afterLineNumber,this.onDomNodeTop=e=>{this._actualTop.set(e,void 0)},this.onComputedHeight=e=>{this._actualHeight.set(e,void 0)}}}class b{static{this._counter=0}constructor(e,t){this._editor=e,this._domElement=t,this._overlayWidgetId=`managedOverlayWidget-${b._counter++}`,this._overlayWidget={getId:()=>this._overlayWidgetId,getDomNode:()=>this._domElement,getPosition:()=>null},this._editor.addOverlayWidget(this._overlayWidget)}dispose(){this._editor.removeOverlayWidget(this._overlayWidget)}}function C(e,t){return(0,r.fm)(i=>{for(let[n,s]of Object.entries(t))s&&"object"==typeof s&&"read"in s&&(s=s.read(i)),"number"==typeof s&&(s=`${s}px`),n=n.replace(/[A-Z]/g,e=>"-"+e.toLowerCase()),e.style[n]=s})}function w(e,t,i,n){let s=new o.Cm,a=[];return s.add((0,r.yC)((s,o)=>{let l=t.read(s),h=new Map,d=new Map;i&&i(!0),e.changeViewZones(e=>{for(let t of a)e.removeZone(t),n?.delete(t);for(let t of(a.length=0,l)){let i=e.addZone(t);t.setZoneId&&t.setZoneId(i),a.push(i),n?.add(i),h.set(t,i)}}),i&&i(!1),o.add((0,r.Y)({changeTracker:{createChangeSummary:()=>({zoneIds:[]}),handleChange(e,t){let i=d.get(e.changedObservable);return void 0!==i&&t.zoneIds.push(i),!0}}},(t,n)=>{for(let e of l)e.onChange&&(d.set(e.onChange,h.get(e)),e.onChange.read(t));i&&i(!0),e.changeViewZones(e=>{for(let t of n.zoneIds)e.layoutZone(t)}),i&&i(!1)}))})),s.add({dispose(){i&&i(!0),e.changeViewZones(e=>{for(let t of a)e.removeZone(t)}),n?.clear(),i&&i(!1)}}),s}class y extends s.Qi{dispose(){super.dispose(!0)}}function S(e,t){let i=(0,n.Uk)(t,t=>t.original.startLineNumber<=e.lineNumber);if(!i)return h.Q.fromPositions(e);if(i.original.endLineNumberExclusive<=e.lineNumber){let t=e.lineNumber-i.original.endLineNumberExclusive+i.modified.endLineNumberExclusive;return h.Q.fromPositions(new l.y(t,e.column))}if(!i.innerChanges)return h.Q.fromPositions(new l.y(i.modified.startLineNumber,1));let s=(0,n.Uk)(i.innerChanges,t=>t.originalRange.getStartPosition().isBeforeOrEqual(e));if(!s){let t=e.lineNumber-i.original.startLineNumber+i.modified.startLineNumber;return h.Q.fromPositions(new l.y(t,e.column))}if(s.originalRange.containsPosition(e))return s.modifiedRange;{var o,r;let t=(o=s.originalRange.getEndPosition(),r=e,o.lineNumber===r.lineNumber?new d.W(0,r.column-o.column):new d.W(r.lineNumber-o.lineNumber,r.column-1));return h.Q.fromPositions(t.addToPosition(s.modifiedRange.getEndPosition()))}}function k(e,t){let i;return e.filter(e=>{let n=t(e,i);return i=e,n})}class x{static create(e,t){return new L(e,e,t)}static createWithDisposable(e,t,i){let n=new o.Cm;return n.add(t),n.add(e),new L(e,n,i)}}class L extends x{constructor(e,t,i){super(),this.object=e,this._disposable=t,this._debugOwner=i,this._refCount=1,this._isDisposed=!1,this._owners=[],i&&this._addOwner(i)}_addOwner(e){e&&this._owners.push(e)}createNewRef(e){return this._refCount++,e&&this._addOwner(e),new D(this,e)}dispose(){this._isDisposed||(this._isDisposed=!0,this._decreaseRefCount(this._debugOwner))}_decreaseRefCount(e){if(this._refCount--,0===this._refCount&&this._disposable.dispose(),e){let t=this._owners.indexOf(e);-1!==t&&this._owners.splice(t,1)}}}class D extends x{constructor(e,t){super(),this._base=e,this._debugOwner=t,this._isDisposed=!1}get object(){return this._base.object}createNewRef(e){return this._base.createNewRef(e)}dispose(){this._isDisposed||(this._isDisposed=!0,this._base._decreaseRefCount(this._debugOwner))}}},72307:(e,t,i)=>{"use strict";i.d(t,{Ay:()=>r.Ay,Cm:()=>r.Cm,D7:()=>o.D7,Ft:()=>n.Ft,VD:()=>r.VD,dz:()=>o.dz,nx:()=>s.nx,s:()=>r.s,y4:()=>o.y4});var n=i(71544),s=i(93415),o=i(6033);i(17354);var r=i(82102)},72436:(e,t,i)=>{"use strict";i.d(t,{$B:()=>h,Dk:()=>c,IN:()=>g,RE:()=>m,XS:()=>f,cv:()=>r,ho:()=>d,ir:()=>o,m$:()=>u,mk:()=>l,oJ:()=>a,t8:()=>p});var n=i(77715),s=i(78713);let o={keybindingLabelBackground:(0,n.GuP)(n.HDX),keybindingLabelForeground:(0,n.GuP)(n.eUu),keybindingLabelBorder:(0,n.GuP)(n.zUX),keybindingLabelBottomBorder:(0,n.GuP)(n.Qfh),keybindingLabelShadow:(0,n.GuP)(n.f9l)},r={buttonForeground:(0,n.GuP)(n.G_h),buttonSeparator:(0,n.GuP)(n.Q1$),buttonBackground:(0,n.GuP)(n.XJc),buttonHoverBackground:(0,n.GuP)(n.T9h),buttonSecondaryForeground:(0,n.GuP)(n.Inn),buttonSecondaryBackground:(0,n.GuP)(n.xOA),buttonSecondaryHoverBackground:(0,n.GuP)(n.nZG),buttonBorder:(0,n.GuP)(n.raQ)},a={progressBarBackground:(0,n.GuP)(n.BTi)},l={inputActiveOptionBorder:(0,n.GuP)(n.uNK),inputActiveOptionForeground:(0,n.GuP)(n.$$0),inputActiveOptionBackground:(0,n.GuP)(n.c1f)};(0,n.GuP)(n.jOE),(0,n.GuP)(n.Ukx),(0,n.GuP)(n.Ips),(0,n.GuP)(n.kPT),(0,n.GuP)(n.xWN),(0,n.GuP)(n.ZBU),(0,n.GuP)(n.jr9);let h={checkboxBackground:(0,n.GuP)(n.OcU),checkboxBorder:(0,n.GuP)(n.C5U),checkboxForeground:(0,n.GuP)(n.t0B),checkboxDisabledBackground:(0,n.GuP)(n.Uv),checkboxDisabledForeground:(0,n.GuP)(n.hsb)};(0,n.GuP)(n.CgL),(0,n.GuP)(n.FiB),(0,n.GuP)(n.f9l),(0,n.GuP)(n.DSL),(0,n.GuP)(n.tYX),(0,n.GuP)(n.JPj),(0,n.GuP)(n.bNw),(0,n.GuP)(n.vwp);let d={inputBackground:(0,n.GuP)(n.L4c),inputForeground:(0,n.GuP)(n.cws),inputBorder:(0,n.GuP)(n.Zgs),inputValidationInfoBorder:(0,n.GuP)(n.YSW),inputValidationInfoBackground:(0,n.GuP)(n.I$A),inputValidationInfoForeground:(0,n.GuP)(n.L9Z),inputValidationWarningBorder:(0,n.GuP)(n.C1n),inputValidationWarningBackground:(0,n.GuP)(n.ULt),inputValidationWarningForeground:(0,n.GuP)(n.T5N),inputValidationErrorBorder:(0,n.GuP)(n.eYZ),inputValidationErrorBackground:(0,n.GuP)(n._$n),inputValidationErrorForeground:(0,n.GuP)(n.h9z)},c={listFilterWidgetBackground:(0,n.GuP)(n.pnl),listFilterWidgetOutline:(0,n.GuP)(n.fiM),listFilterWidgetNoMatchesOutline:(0,n.GuP)(n.P9Z),listFilterWidgetShadow:(0,n.GuP)(n.H8q),inputBoxStyles:d,toggleStyles:l},u={badgeBackground:(0,n.GuP)(n.WMx),badgeForeground:(0,n.GuP)(n.zRE),badgeBorder:(0,n.GuP)(n.b1q)};(0,n.GuP)(n.vV$),(0,n.GuP)(n.mc0),(0,n.GuP)(n.etE),(0,n.GuP)(n.etE),(0,n.GuP)(n.sAS);let g={listBackground:void 0,listInactiveFocusForeground:void 0,listFocusBackground:(0,n.GuP)(n.VFX),listFocusForeground:(0,n.GuP)(n.efJ),listFocusOutline:(0,n.GuP)(n.p7Y),listActiveSelectionBackground:(0,n.GuP)(n.Rjz),listActiveSelectionForeground:(0,n.GuP)(n.GVV),listActiveSelectionIconForeground:(0,n.GuP)(n.fED),listFocusAndSelectionOutline:(0,n.GuP)(n.gtq),listFocusAndSelectionBackground:(0,n.GuP)(n.Rjz),listFocusAndSelectionForeground:(0,n.GuP)(n.GVV),listInactiveSelectionBackground:(0,n.GuP)(n.uNx),listInactiveSelectionIconForeground:(0,n.GuP)(n.C9U),listInactiveSelectionForeground:(0,n.GuP)(n.f4y),listInactiveFocusBackground:(0,n.GuP)(n.CQ3),listInactiveFocusOutline:(0,n.GuP)(n.ijf),listHoverBackground:(0,n.GuP)(n.lO1),listHoverForeground:(0,n.GuP)(n.QRv),listDropOverBackground:(0,n.GuP)(n.Yoe),listDropBetweenBackground:(0,n.GuP)(n.yIp),listSelectionOutline:(0,n.GuP)(n.buw),listHoverOutline:(0,n.GuP)(n.buw),treeIndentGuidesStroke:(0,n.GuP)(n.U4U),treeInactiveIndentGuidesStroke:(0,n.GuP)(n.pft),treeStickyScrollBackground:void 0,treeStickyScrollBorder:void 0,treeStickyScrollShadow:(0,n.GuP)(n.bXl),tableColumnsBorder:(0,n.GuP)(n.k5u),tableOddRowsBackgroundColor:(0,n.GuP)(n.sbQ)};function p(e){let t={...g};for(let i in e){let s=e[i];t[i]=void 0!==s?(0,n.GuP)(s):void 0}return t}let m={selectBackground:(0,n.GuP)(n.rvE),selectListBackground:(0,n.GuP)(n.lWP),selectForeground:(0,n.GuP)(n.yqq),decoratorRightForeground:(0,n.GuP)(n.NBf),selectBorder:(0,n.GuP)(n.HcB),focusBorder:(0,n.GuP)(n.tAP),listFocusBackground:(0,n.GuP)(n.AlL),listInactiveSelectionIconForeground:(0,n.GuP)(n.c7i),listFocusForeground:(0,n.GuP)(n.nH),listFocusOutline:(0,n.HP_)(n.buw,s.Q1.transparent.toString()),listHoverBackground:(0,n.GuP)(n.lO1),listHoverForeground:(0,n.GuP)(n.QRv),listHoverOutline:(0,n.GuP)(n.buw),selectListBorder:(0,n.GuP)(n.sIe),listBackground:void 0,listActiveSelectionBackground:void 0,listActiveSelectionForeground:void 0,listActiveSelectionIconForeground:void 0,listFocusAndSelectionBackground:void 0,listDropOverBackground:void 0,listDropBetweenBackground:void 0,listInactiveSelectionBackground:void 0,listInactiveSelectionForeground:void 0,listInactiveFocusBackground:void 0,listInactiveFocusOutline:void 0,listSelectionOutline:void 0,listFocusAndSelectionForeground:void 0,listFocusAndSelectionOutline:void 0,listInactiveFocusForeground:void 0,tableColumnsBorder:void 0,tableOddRowsBackgroundColor:void 0,treeIndentGuidesStroke:void 0,treeInactiveIndentGuidesStroke:void 0,treeStickyScrollBackground:void 0,treeStickyScrollBorder:void 0,treeStickyScrollShadow:void 0},f={shadowColor:(0,n.GuP)(n.f9l),borderColor:(0,n.GuP)(n.g$2),foregroundColor:(0,n.GuP)(n.dd_),backgroundColor:(0,n.GuP)(n.c6Y),selectionForegroundColor:(0,n.GuP)(n.pmr),selectionBackgroundColor:(0,n.GuP)(n.Ux$),selectionBorderColor:(0,n.GuP)(n.SNb),separatorColor:(0,n.GuP)(n.D7X),scrollbarShadow:(0,n.GuP)(n.bXl),scrollbarSliderBackground:(0,n.GuP)(n.gnV),scrollbarSliderHoverBackground:(0,n.GuP)(n.cI_),scrollbarSliderActiveBackground:(0,n.GuP)(n.mhZ)}},72667:(e,t,i)=>{"use strict";i.d(t,{wZ:()=>d,zL:()=>h,UW:()=>g,Md:()=>m});var n=i(15957),s=i(55532),o=i(99314),r=i(29443);class a{constructor(e,t,i,n){this.endIndex=e,this.type=t,this.metadata=i,this.containsRTL=n,this._linePartBrand=void 0}isWhitespace(){return!!(1&this.metadata)}isPseudoAfter(){return!!(4&this.metadata)}}var l=i(60095);class h{get isLTR(){return!this.containsRTL&&this.textDirection!==l.z4.RTL}constructor(e,t,i,n,s,o,a,l,h,d,c,u,g,p,m,f,_,v,b,C,w,y=!1){this.useMonospaceOptimizations=e,this.canUseHalfwidthRightwardsArrow=t,this.lineContent=i,this.continuesWithWrappedLine=n,this.isBasicASCII=s,this.containsRTL=o,this.fauxIndentLength=a,this.lineTokens=l,this.lineDecorations=h.sort(r.d.compare),this.tabSize=d,this.startVisibleColumn=c,this.spaceWidth=u,this.stopRenderingLineAfter=m,this.renderWhitespace="all"===f?4:"boundary"===f?1:"selection"===f?2:3*("trailing"===f),this.renderControlCharacters=_,this.fontLigatures=v,this.selectionsOnLine=b&&b.sort((e,t)=>e.start<t.start?-1:1),this.renderNewLineWhenEmpty=y,this.textDirection=C,this.verticalScrollbarSize=w,Math.abs(p-u)<Math.abs(g-u)?(this.renderSpaceWidth=p,this.renderSpaceCharCode=11825):(this.renderSpaceWidth=g,this.renderSpaceCharCode=183)}sameSelection(e){if(null===this.selectionsOnLine)return null===e;if(null===e||e.length!==this.selectionsOnLine.length)return!1;for(let t=0;t<this.selectionsOnLine.length;t++)if(!this.selectionsOnLine[t].equals(e[t]))return!1;return!0}equals(e){return this.useMonospaceOptimizations===e.useMonospaceOptimizations&&this.canUseHalfwidthRightwardsArrow===e.canUseHalfwidthRightwardsArrow&&this.lineContent===e.lineContent&&this.continuesWithWrappedLine===e.continuesWithWrappedLine&&this.isBasicASCII===e.isBasicASCII&&this.containsRTL===e.containsRTL&&this.fauxIndentLength===e.fauxIndentLength&&this.tabSize===e.tabSize&&this.startVisibleColumn===e.startVisibleColumn&&this.spaceWidth===e.spaceWidth&&this.renderSpaceWidth===e.renderSpaceWidth&&this.renderSpaceCharCode===e.renderSpaceCharCode&&this.stopRenderingLineAfter===e.stopRenderingLineAfter&&this.renderWhitespace===e.renderWhitespace&&this.renderControlCharacters===e.renderControlCharacters&&this.fontLigatures===e.fontLigatures&&r.d.equalsArr(this.lineDecorations,e.lineDecorations)&&this.lineTokens.equals(e.lineTokens)&&this.sameSelection(e.selectionsOnLine)&&this.textDirection===e.textDirection&&this.verticalScrollbarSize===e.verticalScrollbarSize&&this.renderNewLineWhenEmpty===e.renderNewLineWhenEmpty}}class d{constructor(e,t){this.partIndex=e,this.charIndex=t}}class c{static getPartIndex(e){return(0xffff0000&e)>>>16}static getCharIndex(e){return(65535&e)>>>0}constructor(e,t){this.length=e,this._data=new Uint32Array(this.length),this._horizontalOffset=new Uint32Array(this.length)}setColumnInfo(e,t,i,n){this._data[e-1]=(0|i|t<<16)>>>0,this._horizontalOffset[e-1]=n}getHorizontalOffset(e){return 0===this._horizontalOffset.length?0:this._horizontalOffset[e-1]}charOffsetToPartData(e){return 0===this.length?0:e<0?this._data[0]:e>=this.length?this._data[this.length-1]:this._data[e]}getDomPosition(e){let t=this.charOffsetToPartData(e-1);return new d(c.getPartIndex(t),c.getCharIndex(t))}getColumn(e,t){return this.partDataToCharOffset(e.partIndex,t,e.charIndex)+1}partDataToCharOffset(e,t,i){let n;if(0===this.length)return 0;let s=(0|i|e<<16)>>>0,o=0,r=this.length-1;for(;o+1<r;){let e=o+r>>>1,t=this._data[e];if(t===s)return e;t>s?r=e:o=e}if(o===r)return o;let a=this._data[o],l=this._data[r];if(a===s)return o;if(l===s)return r;let h=c.getPartIndex(a),d=c.getCharIndex(a);return n=h!==c.getPartIndex(l)?t:c.getCharIndex(l),i-d<=n-i?o:r}}class u{constructor(e,t){this._renderLineOutputBrand=void 0,this.characterMapping=e,this.containsForeignElements=t}}function g(e,t){if(0===e.lineContent.length){if(e.lineDecorations.length>0){t.appendString("<span>");let i=0,n=0,s=0;for(let o of e.lineDecorations)(1===o.type||2===o.type)&&(t.appendString('<span class="'),t.appendString(o.className),t.appendString('"></span>'),1===o.type&&(s|=1,i++),2===o.type&&(s|=2,n++));t.appendString("</span>");let o=new c(1,i+n);return o.setColumnInfo(1,i,0,0),new u(o,s)}return e.renderNewLineWhenEmpty?t.appendString("<span><span>\n</span></span>"):t.appendString("<span><span></span></span>"),new u(new c(0,0),0)}return function(e,t){var i;let o=e.fontIsMonospace,r=e.canUseHalfwidthRightwardsArrow,a=e.containsForeignElements,l=e.lineContent,h=e.len,d=e.isOverflowing,g=e.overflowingCharCount,p=e.parts,m=e.fauxIndentLength,f=e.tabSize,v=e.startVisibleColumn,b=e.spaceWidth,C=e.renderSpaceCharCode,w=e.renderWhitespace,y=e.renderControlCharacters,S=new c(h+1,p.length),k=!1,x=0,L=v,D=0,I=0,N=0;t.appendString("<span>");for(let e=0,i=p.length;e<i;e++){let i=p[e],n=i.endIndex,d=i.type,c=i.containsRTL,u=0!==w&&i.isWhitespace(),g=u&&!o&&("mtkw"===d||!a),v=x===n&&i.isPseudoAfter();if(D=0,t.appendString("<span "),c&&t.appendString('style="unicode-bidi:isolate" '),t.appendString('class="'),t.appendString(g?"mtkz":d),t.appendASCIICharCode(34),u){let i=0;{let e=x,t=L;for(;e<n;e++){let n=(9===l.charCodeAt(e)?f-t%f:1)|0;i+=n,e>=m&&(t+=n)}}for(g&&(t.appendString(' style="width:'),t.appendString(String(b*i)),t.appendString('px"')),t.appendASCIICharCode(62);x<n;x++){let i,n;if(S.setColumnInfo(x+1,e-N,D,I),N=0,9===l.charCodeAt(x)){n=i=f-L%f|0,!r||n>1?t.appendCharCode(8594):t.appendCharCode(65515);for(let e=2;e<=n;e++)t.appendCharCode(160)}else i=2,n=1,t.appendCharCode(C),t.appendCharCode(8204);D+=i,I+=n,x>=m&&(L+=n)}}else for(t.appendASCIICharCode(62);x<n;x++){S.setColumnInfo(x+1,e-N,D,I),N=0;let i=l.charCodeAt(x),n=1,o=1;switch(i){case 9:o=n=f-L%f;for(let e=1;e<=n;e++)t.appendCharCode(160);break;case 32:t.appendCharCode(160);break;case 60:t.appendString("<");break;case 62:t.appendString(">");break;case 38:t.appendString("&");break;case 0:y?t.appendCharCode(9216):t.appendString("�");break;case 65279:case 8232:case 8233:case 133:t.appendCharCode(65533);break;default:s.ne(i)&&o++,y&&i<32?t.appendCharCode(9216+i):y&&127===i?t.appendCharCode(9249):y&&_(i)?(t.appendString("[U+"),t.appendString(i.toString(16).toUpperCase().padStart(4,"0")),t.appendString("]"),o=n=8):t.appendCharCode(i)}D+=n,I+=o,x>=m&&(L+=o)}v?N++:N=0,x>=h&&!k&&i.isPseudoAfter()&&(k=!0,S.setColumnInfo(x+1,e,D,I)),t.appendString("</span>")}return k||S.setColumnInfo(h+1,p.length-1,D,I),d&&(t.appendString('<span class="mtkoverflow">'),t.appendString(n.kg(792,"Show more ({0})",(i=g)<1024?n.kg(793,"{0} chars",i):i<1048576?`${(i/1024).toFixed(1)} KB`:`${(i/1024/1024).toFixed(1)} MB`)),t.appendString("</span>")),t.appendString("</span>"),new u(S,a)}(function(e){let t,i,n,o=e.lineContent;-1!==e.stopRenderingLineAfter&&e.stopRenderingLineAfter<o.length?(t=!0,i=o.length-e.stopRenderingLineAfter,n=e.stopRenderingLineAfter):(t=!1,i=0,n=o.length);let l=function(e,t,i,n,o){let r=[],l=0;n>0&&(r[l++]=new a(n,"",0,!1));let h=n;for(let d=0,c=i.getCount();d<c;d++){let c=i.getEndOffset(d);if(c<=n)continue;let u=i.getClassName(d);if(c>=o){let i=!!t&&s.E_(e.substring(h,o));r[l++]=new a(o,u,0,i);break}let g=!!t&&s.E_(e.substring(h,c));r[l++]=new a(c,u,0,g),h=c}return r}(o,e.containsRTL,e.lineTokens,e.fauxIndentLength,n);e.renderControlCharacters&&!e.isBasicASCII&&(l=function(e,t){let i=[],n=new a(0,"",0,!1),s=0;for(let o of t){let t=o.endIndex;for(;s<t;s++)_(e.charCodeAt(s))&&(s>n.endIndex&&(n=new a(s,o.type,o.metadata,o.containsRTL),i.push(n)),n=new a(s+1,"mtkcontrol",o.metadata,!1),i.push(n));s>n.endIndex&&(n=new a(t,o.type,o.metadata,o.containsRTL),i.push(n))}return i}(o,l)),(4===e.renderWhitespace||1===e.renderWhitespace||2===e.renderWhitespace&&e.selectionsOnLine||3===e.renderWhitespace&&!e.continuesWithWrappedLine)&&(l=function(e,t,i,n){let o,r=e.continuesWithWrappedLine,l=e.fauxIndentLength,h=e.tabSize,d=e.startVisibleColumn,c=e.useMonospaceOptimizations,u=e.selectionsOnLine,g=1===e.renderWhitespace,p=3===e.renderWhitespace,m=e.renderSpaceWidth!==e.spaceWidth,f=[],_=0,v=0,b=n[0].type,C=n[v].containsRTL,w=n[v].endIndex,y=n.length,S=!1,k=s.HG(t);-1===k?(S=!0,k=i,o=i):o=s.lT(t);let x=!1,L=0,D=u&&u[L],I=d%h;for(let e=l;e<i;e++){let r,d=t.charCodeAt(e);if(D&&D.endExclusive<=e&&(L++,D=u&&u[L]),e<k||e>o)r=!0;else if(9===d)r=!0;else if(32===d)if(g)if(x)r=!0;else{let n=e+1<i?t.charCodeAt(e+1):0;r=32===n||9===n}else r=!0;else r=!1;if(r&&u&&(r=!!D&&D.start<=e&&e<D.endExclusive),r&&p&&(r=S||e>o),r&&C&&e>=k&&e<=o&&(r=!1),x){if(!r||!c&&I>=h){if(m){let t=_>0?f[_-1].endIndex:l;for(let i=t+1;i<=e;i++)f[_++]=new a(i,"mtkw",1,!1)}else f[_++]=new a(e,"mtkw",1,!1);I%=h}}else(e===w||r&&e>l)&&(f[_++]=new a(e,b,0,C),I%=h);for(9===d?I=h:s.ne(d)?I+=2:I++,x=r;e===w;)if(++v<y)b=n[v].type,C=n[v].containsRTL,w=n[v].endIndex;else break}let N=!1;if(x)if(r&&g){let e=i>0?t.charCodeAt(i-1):0,n=i>1?t.charCodeAt(i-2):0;(32!==e||32===n||9===n)&&(N=!0)}else N=!0;if(N)if(m){let e=_>0?f[_-1].endIndex:l;for(let t=e+1;t<=i;t++)f[_++]=new a(t,"mtkw",1,!1)}else f[_++]=new a(i,"mtkw",1,!1);else f[_++]=new a(i,b,0,C);return f}(e,o,n,l));let h=0;if(e.lineDecorations.length>0){for(let t=0,i=e.lineDecorations.length;t<i;t++){let i=e.lineDecorations[t];3===i.type||1===i.type?h|=1:2===i.type&&(h|=2)}l=function(e,t,i,n){n.sort(r.d.compare);let s=r.Bs.normalize(e,n),o=s.length,l=0,h=[],d=0,c=0;for(let e=0,t=i.length;e<t;e++){let t=i[e],n=t.endIndex,r=t.type,u=t.metadata,g=t.containsRTL;for(;l<o&&s[l].startOffset<n;){let e=s[l];if(e.startOffset>c&&(c=e.startOffset,h[d++]=new a(c,r,u,g)),e.endOffset+1<=n)c=e.endOffset+1,h[d++]=new a(c,r+" "+e.className,u|e.metadata,g),l++;else{c=n,h[d++]=new a(c,r+" "+e.className,u|e.metadata,g);break}}n>c&&(c=n,h[d++]=new a(c,r,u,g))}let u=i[i.length-1].endIndex;if(l<o&&s[l].startOffset===u)for(;l<o&&s[l].startOffset===u;){let e=s[l];h[d++]=new a(c,e.className,e.metadata,!1),l++}return h}(o,0,l,e.lineDecorations)}return e.containsRTL||(l=function(e,t,i){let n=0,s=[],o=0;if(i)for(let i=0,r=t.length;i<r;i++){let r=t[i],l=r.endIndex;if(n+50<l){let t=r.type,i=r.metadata,h=r.containsRTL,d=-1,c=n;for(let r=n;r<l;r++)32===e.charCodeAt(r)&&(d=r),-1!==d&&r-c>=50&&(s[o++]=new a(d+1,t,i,h),c=d+1,d=-1);c!==l&&(s[o++]=new a(l,t,i,h))}else s[o++]=r;n=l}else for(let e=0,i=t.length;e<i;e++){let i=t[e],r=i.endIndex,l=r-n;if(l>50){let e=i.type,t=i.metadata,h=i.containsRTL,d=Math.ceil(l/50);for(let i=1;i<d;i++){let r=n+50*i;s[o++]=new a(r,e,t,h)}s[o++]=new a(r,e,t,h)}else s[o++]=i;n=r}return s}(o,l,!e.isBasicASCII||e.fontLigatures)),new f(e.useMonospaceOptimizations,e.canUseHalfwidthRightwardsArrow,o,n,t,i,l,h,e.fauxIndentLength,e.tabSize,e.startVisibleColumn,e.spaceWidth,e.renderSpaceCharCode,e.renderWhitespace,e.renderControlCharacters)}(e),t)}class p{constructor(e,t,i){this.characterMapping=e,this.html=t,this.containsForeignElements=i}}function m(e){let t=new o.fe(1e4),i=g(e,t);return new p(i.characterMapping,t.build(),i.containsForeignElements)}class f{constructor(e,t,i,n,s,o,r,a,l,h,d,c,u,g,p){this.fontIsMonospace=e,this.canUseHalfwidthRightwardsArrow=t,this.lineContent=i,this.len=n,this.isOverflowing=s,this.overflowingCharCount=o,this.parts=r,this.containsForeignElements=a,this.fauxIndentLength=l,this.tabSize=h,this.startVisibleColumn=d,this.spaceWidth=c,this.renderSpaceCharCode=u,this.renderWhitespace=g,this.renderControlCharacters=p}}function _(e){return e<32?9!==e:127===e||!!(e>=8234)&&!!(e<=8238)||!!(e>=8294)&&!!(e<=8297)||!!(e>=8206)&&!!(e<=8207)||1564===e}},72673:()=>{},72725:()=>{},73082:(e,t,i)=>{"use strict";i.d(t,{K:()=>n});let n=Object.freeze({text:"text/plain",binary:"application/octet-stream",unknown:"application/unknown",markdown:"text/markdown",latex:"text/latex",uriList:"text/uri-list",html:"text/html"})},73341:(e,t,i)=>{"use strict";i.d(t,{Z4:()=>M,EH:()=>E,XF:()=>T});var n=i(29195),s=i(73589),o=i(87899),r=i(87460),a=i(85350),l=i(28669),h=i(61896);i(81178);var d=i(15957),c=i(5488),u=i(17354),g=i(70537),p=i(82102),m=i(98437),f=i(92684),_=i(88723),v=i(98200),b=i(60737),C=i(73970),w=i(67404);i(31055);let y=o.$,S="selectOption.entry.template";class k{get templateId(){return S}renderTemplate(e){let t=Object.create(null);return t.root=e,t.text=o.BC(e,y(".option-text")),t.detail=o.BC(e,y(".option-detail")),t.decoratorRight=o.BC(e,y(".option-decorator-right")),t}renderElement(e,t,i){let n=e.text,s=e.detail,o=e.decoratorRight,r=e.isDisabled;i.text.textContent=n,i.detail.textContent=s||"",i.decoratorRight.textContent=o||"",r?i.root.classList.add("option-disabled"):i.root.classList.remove("option-disabled")}disposeTemplate(e){}}class x extends p.jG{static{this.DEFAULT_DROPDOWN_MINIMUM_BOTTOM_MARGIN=32}static{this.DEFAULT_DROPDOWN_MINIMUM_TOP_MARGIN=2}static{this.DEFAULT_MINIMUM_VISIBLE_OPTIONS=3}constructor(e,t,i,n,s){super(),this.options=[],this._currentSelection=0,this._hasDetails=!1,this._skipLayout=!1,this._sticky=!1,this._isVisible=!1,this.styles=n,this.selectBoxOptions=s||Object.create(null),"number"!=typeof this.selectBoxOptions.minBottomMargin?this.selectBoxOptions.minBottomMargin=x.DEFAULT_DROPDOWN_MINIMUM_BOTTOM_MARGIN:this.selectBoxOptions.minBottomMargin<0&&(this.selectBoxOptions.minBottomMargin=0),this.selectElement=document.createElement("select"),this.selectElement.className="monaco-select-box monaco-select-box-dropdown-padding","string"==typeof this.selectBoxOptions.ariaLabel&&this.selectElement.setAttribute("aria-label",this.selectBoxOptions.ariaLabel),"string"==typeof this.selectBoxOptions.ariaDescription&&this.selectElement.setAttribute("aria-description",this.selectBoxOptions.ariaDescription),this._onDidSelect=new u.vl,this._register(this._onDidSelect),this.registerListeners(),this.constructSelectDropDown(i),this.selected=t||0,e&&this.setOptions(e,t),this.initStyleSheet()}setTitle(e){!this._hover&&e?this._hover=this._register((0,C.i)().setupManagedHover((0,a.nZ)("mouse"),this.selectElement,e)):this._hover&&this._hover.update(e)}getHeight(){return 22}getTemplateId(){return S}constructSelectDropDown(e){this.contextViewProvider=e,this.selectDropDownContainer=o.$(".monaco-select-box-dropdown-container"),this.selectDropDownContainer.classList.add("monaco-select-box-dropdown-padding"),this.selectionDetailsPane=o.BC(this.selectDropDownContainer,y(".select-box-details-pane"));let t=o.BC(this.selectDropDownContainer,y(".select-box-dropdown-container-width-control")),i=o.BC(t,y(".width-control-div"));this.widthControlElement=document.createElement("span"),this.widthControlElement.className="option-text-width-control",o.BC(i,this.widthControlElement),this._dropDownPosition=0,this.styleElement=f.li(this.selectDropDownContainer),this.selectDropDownContainer.setAttribute("draggable","true"),this._register(o.ko(this.selectDropDownContainer,o.Bx.DRAG_START,e=>{o.fs.stop(e,!0)}))}registerListeners(){let e;this._register(o.un(this.selectElement,"change",e=>{this.selected=e.target.selectedIndex,this._onDidSelect.fire({index:e.target.selectedIndex,selected:e.target.value}),this.options[this.selected]&&this.options[this.selected].text&&this.setTitle(this.options[this.selected].text)})),this._register(o.ko(this.selectElement,o.Bx.CLICK,e=>{o.fs.stop(e),this._isVisible?this.hideSelectDropDown(!0):this.showSelectDropDown()})),this._register(o.ko(this.selectElement,o.Bx.MOUSE_DOWN,e=>{o.fs.stop(e)})),this._register(o.ko(this.selectElement,"touchstart",t=>{e=this._isVisible})),this._register(o.ko(this.selectElement,"touchend",t=>{o.fs.stop(t),e?this.hideSelectDropDown(!0):this.showSelectDropDown()})),this._register(o.ko(this.selectElement,o.Bx.KEY_DOWN,e=>{let t=new v.Z(e),i=!1;l.zx?(18===t.keyCode||16===t.keyCode||10===t.keyCode||3===t.keyCode)&&(i=!0):(18===t.keyCode&&t.altKey||16===t.keyCode&&t.altKey||10===t.keyCode||3===t.keyCode)&&(i=!0),i&&(this.showSelectDropDown(),o.fs.stop(e,!0))}))}get onDidSelect(){return this._onDidSelect.event}setOptions(e,t){c.aI(this.options,e)||(this.options=e,this.selectElement.options.length=0,this._hasDetails=!1,this._cachedMaxDetailsHeight=void 0,this.options.forEach((e,t)=>{this.selectElement.add(this.createOption(e.text,t,e.isDisabled)),"string"==typeof e.description&&(this._hasDetails=!0)})),void 0!==t&&(this.select(t),this._currentSelection=this.selected)}setOptionsList(){this.selectList?.splice(0,this.selectList.length,this.options)}select(e){e>=0&&e<this.options.length?this.selected=e:e>this.options.length-1?this.select(this.options.length-1):this.selected<0&&(this.selected=0),this.selectElement.selectedIndex=this.selected,this.options[this.selected]&&this.options[this.selected].text&&this.setTitle(this.options[this.selected].text)}focus(){this.selectElement&&(this.selectElement.tabIndex=0,this.selectElement.focus())}blur(){this.selectElement&&(this.selectElement.tabIndex=-1,this.selectElement.blur())}setFocusable(e){this.selectElement.tabIndex=e?0:-1}render(e){this.container=e,e.classList.add("select-container"),e.appendChild(this.selectElement),this.styleSelectElement()}initStyleSheet(){let e=[];this.styles.listFocusBackground&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.focused { background-color: ${this.styles.listFocusBackground} !important; }`),this.styles.listFocusForeground&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.focused { color: ${this.styles.listFocusForeground} !important; }`),this.styles.decoratorRightForeground&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row:not(.focused) .option-decorator-right { color: ${this.styles.decoratorRightForeground}; }`),this.styles.selectBackground&&this.styles.selectBorder&&this.styles.selectBorder!==this.styles.selectBackground?(e.push(`.monaco-select-box-dropdown-container { border: 1px solid ${this.styles.selectBorder} } `),e.push(`.monaco-select-box-dropdown-container > .select-box-details-pane.border-top { border-top: 1px solid ${this.styles.selectBorder} } `),e.push(`.monaco-select-box-dropdown-container > .select-box-details-pane.border-bottom { border-bottom: 1px solid ${this.styles.selectBorder} } `)):this.styles.selectListBorder&&(e.push(`.monaco-select-box-dropdown-container > .select-box-details-pane.border-top { border-top: 1px solid ${this.styles.selectListBorder} } `),e.push(`.monaco-select-box-dropdown-container > .select-box-details-pane.border-bottom { border-bottom: 1px solid ${this.styles.selectListBorder} } `)),this.styles.listHoverForeground&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row:not(.option-disabled):not(.focused):hover { color: ${this.styles.listHoverForeground} !important; }`),this.styles.listHoverBackground&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row:not(.option-disabled):not(.focused):hover { background-color: ${this.styles.listHoverBackground} !important; }`),this.styles.listFocusOutline&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.focused { outline: 1.6px dotted ${this.styles.listFocusOutline} !important; outline-offset: -1.6px !important; }`),this.styles.listHoverOutline&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row:not(.option-disabled):not(.focused):hover { outline: 1.6px dashed ${this.styles.listHoverOutline} !important; outline-offset: -1.6px !important; }`),e.push(".monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.option-disabled.focused { background-color: transparent !important; color: inherit !important; outline: none !important; }"),e.push(".monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.option-disabled:hover { background-color: transparent !important; color: inherit !important; outline: none !important; }"),this.styleElement.textContent=e.join("\n")}styleSelectElement(){let e=this.styles.selectBackground??"",t=this.styles.selectForeground??"",i=this.styles.selectBorder??"";this.selectElement.style.backgroundColor=e,this.selectElement.style.color=t,this.selectElement.style.borderColor=i}styleList(){let e=this.styles.selectBackground??"",t=m.gI(this.styles.selectListBackground,e);this.selectDropDownListContainer.style.backgroundColor=t,this.selectionDetailsPane.style.backgroundColor=t;let i=this.styles.focusBorder??"";this.selectDropDownContainer.style.outlineColor=i,this.selectDropDownContainer.style.outlineOffset="-1px",this.selectList.style(this.styles)}createOption(e,t,i){let n=document.createElement("option");return n.value=e,n.text=e,n.disabled=!!i,n}showSelectDropDown(){this.selectionDetailsPane.textContent="",this.contextViewProvider&&!this._isVisible&&(this.createSelectList(this.selectDropDownContainer),this.setOptionsList(),this.contextViewProvider.showContextView({getAnchor:()=>this.selectElement,render:e=>this.renderSelectDropDown(e,!0),layout:()=>{this.layoutSelectDropDown()},onHide:()=>{this.selectDropDownContainer.classList.remove("visible"),this.selectElement.classList.remove("synthetic-focus")},anchorPosition:this._dropDownPosition},this.selectBoxOptions.optionsAsChildren?this.container:void 0),this._isVisible=!0,this.hideSelectDropDown(!1),this.contextViewProvider.showContextView({getAnchor:()=>this.selectElement,render:e=>this.renderSelectDropDown(e),layout:()=>this.layoutSelectDropDown(),onHide:()=>{this.selectDropDownContainer.classList.remove("visible"),this.selectElement.classList.remove("synthetic-focus")},anchorPosition:this._dropDownPosition},this.selectBoxOptions.optionsAsChildren?this.container:void 0),this._currentSelection=this.selected,this._isVisible=!0,this.selectElement.setAttribute("aria-expanded","true"))}hideSelectDropDown(e){this.contextViewProvider&&this._isVisible&&(this._isVisible=!1,this.selectElement.setAttribute("aria-expanded","false"),e&&this.selectElement.focus(),this.contextViewProvider.hideContextView())}renderSelectDropDown(e,t){return e.appendChild(this.selectDropDownContainer),this.layoutSelectDropDown(t),{dispose:()=>{this.selectDropDownContainer.remove()}}}measureMaxDetailsHeight(){let e=0;return this.options.forEach((t,i)=>{this.updateDetail(i),this.selectionDetailsPane.offsetHeight>e&&(e=this.selectionDetailsPane.offsetHeight)}),e}layoutSelectDropDown(e){if(this._skipLayout||!this.selectList)return!1;{this.selectDropDownContainer.classList.add("visible");let t=o.zk(this.selectElement),i=o.BK(this.selectElement),n=o.zk(this.selectElement).getComputedStyle(this.selectElement),s=parseFloat(n.getPropertyValue("--dropdown-padding-top"))+parseFloat(n.getPropertyValue("--dropdown-padding-bottom")),r=t.innerHeight-i.top-i.height-(this.selectBoxOptions.minBottomMargin||0),a=i.top-x.DEFAULT_DROPDOWN_MINIMUM_TOP_MARGIN,l=this.selectElement.offsetWidth,h=Math.max(this.setWidthControlElement(this.widthControlElement),Math.round(l)).toString()+"px";this.selectDropDownContainer.style.width=h,this.selectList.getHTMLElement().style.height="",this.selectList.layout();let d=this.selectList.contentHeight;this._hasDetails&&void 0===this._cachedMaxDetailsHeight&&(this._cachedMaxDetailsHeight=this.measureMaxDetailsHeight());let c=this._hasDetails?this._cachedMaxDetailsHeight:0,u=d+s+c,g=Math.floor((r-s-c)/this.getHeight()),p=Math.floor((a-s-c)/this.getHeight());if(e)return!(i.top+i.height>t.innerHeight-22)&&!(i.top<x.DEFAULT_DROPDOWN_MINIMUM_TOP_MARGIN)&&(!(g<1)||!(p<1))&&(g<x.DEFAULT_MINIMUM_VISIBLE_OPTIONS&&p>g&&this.options.length>g?(this._dropDownPosition=1,this.selectDropDownListContainer.remove(),this.selectionDetailsPane.remove(),this.selectDropDownContainer.appendChild(this.selectionDetailsPane),this.selectDropDownContainer.appendChild(this.selectDropDownListContainer),this.selectionDetailsPane.classList.remove("border-top"),this.selectionDetailsPane.classList.add("border-bottom")):(this._dropDownPosition=0,this.selectDropDownListContainer.remove(),this.selectionDetailsPane.remove(),this.selectDropDownContainer.appendChild(this.selectDropDownListContainer),this.selectDropDownContainer.appendChild(this.selectionDetailsPane),this.selectionDetailsPane.classList.remove("border-bottom"),this.selectionDetailsPane.classList.add("border-top")),!0);if(i.top+i.height>t.innerHeight-22||i.top<x.DEFAULT_DROPDOWN_MINIMUM_TOP_MARGIN||0===this._dropDownPosition&&g<1||1===this._dropDownPosition&&p<1)return this.hideSelectDropDown(!0),!1;if(0===this._dropDownPosition){if(this._isVisible&&g+p<1)return this.hideSelectDropDown(!0),!1;u>r&&(d=g*this.getHeight())}else u>a&&(d=p*this.getHeight());return this.selectList.layout(d),this.selectList.domFocus(),this.selectList.length>0&&(this.selectList.setFocus([this.selected||0]),this.selectList.reveal(this.selectList.getFocus()[0]||0)),this._hasDetails?(this.selectList.getHTMLElement().style.height=d+s+"px",this.selectDropDownContainer.style.height=""):this.selectDropDownContainer.style.height=d+s+"px",this.updateDetail(this.selected),this.selectDropDownContainer.style.width=h,this.selectDropDownListContainer.setAttribute("tabindex","0"),this.selectElement.classList.add("synthetic-focus"),this.selectDropDownContainer.classList.add("synthetic-focus"),!0}}setWidthControlElement(e){let t=0;if(e){let i=0,n=0;this.options.forEach((e,t)=>{let s=e.detail?e.detail.length:0,o=e.decoratorRight?e.decoratorRight.length:0,r=e.text.length+s+o;r>n&&(i=t,n=r)}),e.textContent=this.options[i].text+(this.options[i].decoratorRight?this.options[i].decoratorRight+" ":""),t=o.Tr(e)}return t}createSelectList(e){if(this.selectList)return;this.selectDropDownListContainer=o.BC(e,y(".select-box-dropdown-list-container")),this.listRenderer=new k,this.selectList=this._register(new w.B8("SelectBoxCustom",this.selectDropDownListContainer,this,[this.listRenderer],{useShadows:!1,verticalScrollMode:3,keyboardSupport:!1,mouseSupport:!1,accessibilityProvider:{getAriaLabel:e=>{let t=e.text;return e.detail&&(t+=`. ${e.detail}`),e.decoratorRight&&(t+=`. ${e.decoratorRight}`),e.description&&(t+=`. ${e.description}`),t},getWidgetAriaLabel:()=>(0,d.kg)(16,"Select Box"),getRole:()=>l.zx?"":"option",getWidgetRole:()=>"listbox"}})),this.selectBoxOptions.ariaLabel&&(this.selectList.ariaLabel=this.selectBoxOptions.ariaLabel);let t=this._register(new _.f(this.selectDropDownListContainer,"keydown")),i=u.Jh.chain(t.event,e=>e.filter(()=>this.selectList.length>0).map(e=>new v.Z(e)));this._register(u.Jh.chain(i,e=>e.filter(e=>3===e.keyCode))(this.onEnter,this)),this._register(u.Jh.chain(i,e=>e.filter(e=>2===e.keyCode))(this.onEnter,this)),this._register(u.Jh.chain(i,e=>e.filter(e=>9===e.keyCode))(this.onEscape,this)),this._register(u.Jh.chain(i,e=>e.filter(e=>16===e.keyCode))(this.onUpArrow,this)),this._register(u.Jh.chain(i,e=>e.filter(e=>18===e.keyCode))(this.onDownArrow,this)),this._register(u.Jh.chain(i,e=>e.filter(e=>12===e.keyCode))(this.onPageDown,this)),this._register(u.Jh.chain(i,e=>e.filter(e=>11===e.keyCode))(this.onPageUp,this)),this._register(u.Jh.chain(i,e=>e.filter(e=>14===e.keyCode))(this.onHome,this)),this._register(u.Jh.chain(i,e=>e.filter(e=>13===e.keyCode))(this.onEnd,this)),this._register(u.Jh.chain(i,e=>e.filter(e=>e.keyCode>=21&&e.keyCode<=56||e.keyCode>=85&&e.keyCode<=113))(this.onCharacter,this)),this._register(o.ko(this.selectList.getHTMLElement(),o.Bx.POINTER_UP,e=>this.onPointerUp(e))),this._register(this.selectList.onMouseOver(e=>void 0!==e.index&&this.selectList.setFocus([e.index]))),this._register(this.selectList.onDidChangeFocus(e=>this.onListFocus(e))),this._register(o.ko(this.selectDropDownContainer,o.Bx.FOCUS_OUT,e=>{!this._isVisible||o.QX(e.relatedTarget,this.selectDropDownContainer)||this.onListBlur()})),this.selectList.getHTMLElement().setAttribute("aria-label",this.selectBoxOptions.ariaLabel||""),this.selectList.getHTMLElement().setAttribute("aria-expanded","true"),this.styleList()}onPointerUp(e){if(!this.selectList.length)return;o.fs.stop(e);let t=e.target;if(!t||t.classList.contains("slider"))return;let i=t.closest(".monaco-list-row");if(!i)return;let n=Number(i.getAttribute("data-index")),s=i.classList.contains("option-disabled");n>=0&&n<this.options.length&&!s&&(this.selected=n,this.select(this.selected),this.selectList.setFocus([this.selected]),this.selectList.reveal(this.selectList.getFocus()[0]),this.selected!==this._currentSelection&&(this._currentSelection=this.selected,this._onDidSelect.fire({index:this.selectElement.selectedIndex,selected:this.options[this.selected].text}),this.options[this.selected]&&this.options[this.selected].text&&this.setTitle(this.options[this.selected].text)),this.hideSelectDropDown(!0))}onListBlur(){this._sticky||(this.selected!==this._currentSelection&&this.select(this._currentSelection),this.hideSelectDropDown(!1))}renderDescriptionMarkdown(e,t){let i=e=>{for(let t=0;t<e.childNodes.length;t++){let n=e.childNodes.item(t);"img"===(n.tagName&&n.tagName.toLowerCase())?n.remove():i(n)}},n=(0,b.Gc)({value:e,supportThemeIcons:!0},{actionHandler:t});return n.element.classList.add("select-box-description-markdown"),i(n.element),n.element}onListFocus(e){this._isVisible&&this._hasDetails&&this.updateDetail(e.indexes[0])}updateDetail(e){this.selectionDetailsPane.textContent="";let t=this.options[e],i=t?.description??"",n=t?.descriptionIsMarkdown??!1;if(i){if(n){let e=t.descriptionMarkdownActionHandler;this.selectionDetailsPane.appendChild(this.renderDescriptionMarkdown(i,e))}else this.selectionDetailsPane.textContent=i;this.selectionDetailsPane.style.display="block"}else this.selectionDetailsPane.style.display="none";this._skipLayout=!0,this.contextViewProvider.layout(),this._skipLayout=!1}onEscape(e){o.fs.stop(e),this.select(this._currentSelection),this.hideSelectDropDown(!0)}onEnter(e){o.fs.stop(e),this.selected!==this._currentSelection&&(this._currentSelection=this.selected,this._onDidSelect.fire({index:this.selectElement.selectedIndex,selected:this.options[this.selected].text}),this.options[this.selected]&&this.options[this.selected].text&&this.setTitle(this.options[this.selected].text)),this.hideSelectDropDown(!0)}onDownArrow(e){if(this.selected<this.options.length-1){o.fs.stop(e,!0);let t=this.options[this.selected+1].isDisabled;if(t&&this.options.length>this.selected+2)this.selected+=2;else{if(t)return;this.selected++}this.select(this.selected),this.selectList.setFocus([this.selected]),this.selectList.reveal(this.selectList.getFocus()[0])}}onUpArrow(e){this.selected>0&&(o.fs.stop(e,!0),this.options[this.selected-1].isDisabled&&this.selected>1?this.selected-=2:this.selected--,this.select(this.selected),this.selectList.setFocus([this.selected]),this.selectList.reveal(this.selectList.getFocus()[0]))}onPageUp(e){o.fs.stop(e),this.selectList.focusPreviousPage(),setTimeout(()=>{this.selected=this.selectList.getFocus()[0],this.options[this.selected].isDisabled&&this.selected<this.options.length-1&&(this.selected++,this.selectList.setFocus([this.selected])),this.selectList.reveal(this.selected),this.select(this.selected)},1)}onPageDown(e){o.fs.stop(e),this.selectList.focusNextPage(),setTimeout(()=>{this.selected=this.selectList.getFocus()[0],this.options[this.selected].isDisabled&&this.selected>0&&(this.selected--,this.selectList.setFocus([this.selected])),this.selectList.reveal(this.selected),this.select(this.selected)},1)}onHome(e){o.fs.stop(e),this.options.length<2||(this.selected=0,this.options[this.selected].isDisabled&&this.selected>1&&this.selected++,this.selectList.setFocus([this.selected]),this.selectList.reveal(this.selected),this.select(this.selected))}onEnd(e){o.fs.stop(e),this.options.length<2||(this.selected=this.options.length-1,this.options[this.selected].isDisabled&&this.selected>1&&this.selected--,this.selectList.setFocus([this.selected]),this.selectList.reveal(this.selected),this.select(this.selected))}onCharacter(e){let t=g.YM.toString(e.keyCode),i=-1;for(let n=0;n<this.options.length-1;n++)if(i=(n+this.selected+1)%this.options.length,this.options[i].text.charAt(0).toUpperCase()===t&&!this.options[i].isDisabled){this.select(i),this.selectList.setFocus([i]),this.selectList.reveal(this.selectList.getFocus()[0]),o.fs.stop(e);break}}dispose(){this.hideSelectDropDown(!1),super.dispose()}}class L extends p.jG{constructor(e,t,i,n){super(),this.selected=0,this.selectBoxOptions=n||Object.create(null),this.options=[],this.selectElement=document.createElement("select"),this.selectElement.className="monaco-select-box","string"==typeof this.selectBoxOptions.ariaLabel&&this.selectElement.setAttribute("aria-label",this.selectBoxOptions.ariaLabel),"string"==typeof this.selectBoxOptions.ariaDescription&&this.selectElement.setAttribute("aria-description",this.selectBoxOptions.ariaDescription),this._onDidSelect=this._register(new u.vl),this.styles=i,this.registerListeners(),this.setOptions(e,t)}registerListeners(){this._register(r.q.addTarget(this.selectElement)),[r.B.Tap].forEach(e=>{this._register(o.ko(this.selectElement,e,e=>{this.selectElement.focus()}))}),this._register(o.un(this.selectElement,"click",e=>{o.fs.stop(e,!0)})),this._register(o.un(this.selectElement,"change",e=>{this.selectElement.title=e.target.value,this._onDidSelect.fire({index:e.target.selectedIndex,selected:e.target.value})})),this._register(o.un(this.selectElement,"keydown",e=>{let t=!1;l.zx?(18===e.keyCode||16===e.keyCode||10===e.keyCode)&&(t=!0):(18===e.keyCode&&e.altKey||10===e.keyCode||3===e.keyCode)&&(t=!0),t&&e.stopPropagation()}))}get onDidSelect(){return this._onDidSelect.event}setOptions(e,t){this.options&&c.aI(this.options,e)||(this.options=e,this.selectElement.options.length=0,this.options.forEach((e,t)=>{this.selectElement.add(this.createOption(e.text,t,e.isDisabled))})),void 0!==t&&this.select(t)}select(e){0===this.options.length?this.selected=0:e>=0&&e<this.options.length?this.selected=e:e>this.options.length-1?this.select(this.options.length-1):this.selected<0&&(this.selected=0),this.selectElement.selectedIndex=this.selected,this.selected<this.options.length&&"string"==typeof this.options[this.selected].text?this.selectElement.title=this.options[this.selected].text:this.selectElement.title=""}focus(){this.selectElement&&(this.selectElement.tabIndex=0,this.selectElement.focus())}blur(){this.selectElement&&(this.selectElement.tabIndex=-1,this.selectElement.blur())}setFocusable(e){this.selectElement.tabIndex=e?0:-1}render(e){e.classList.add("select-container"),e.appendChild(this.selectElement),this.setOptions(this.options,this.selected),this.applyStyles()}applyStyles(){this.selectElement&&(this.selectElement.style.backgroundColor=this.styles.selectBackground??"",this.selectElement.style.color=this.styles.selectForeground??"",this.selectElement.style.borderColor=this.styles.selectBorder??"")}createOption(e,t,i){let n=document.createElement("option");return n.value=e,n.text=e,n.disabled=!!i,n}}class D extends h.x{constructor(e,t,i,n,s){super(),l.zx&&!s?.useCustomDrawn?this.selectBoxDelegate=new L(e,t,n,s):this.selectBoxDelegate=new x(e,t,i,n,s),this._register(this.selectBoxDelegate)}get onDidSelect(){return this.selectBoxDelegate.onDidSelect}setOptions(e,t){this.selectBoxDelegate.setOptions(e,t)}select(e){this.selectBoxDelegate.select(e)}focus(){this.selectBoxDelegate.focus()}blur(){this.selectBoxDelegate.blur()}setFocusable(e){this.selectBoxDelegate.setFocusable(e)}render(e){this.selectBoxDelegate.render(e)}}var I=i(39205),N=i(95751);i(79410);class E extends p.jG{get action(){return this._action}constructor(e,t,i={}){super(),this.options=i,this._context=e||this,this._action=t,t instanceof I.rc&&this._register(t.onDidChange(e=>{this.element&&this.handleActionChangeEvent(e)}))}handleActionChangeEvent(e){void 0!==e.enabled&&this.updateEnabled(),void 0!==e.checked&&this.updateChecked(),void 0!==e.class&&this.updateClass(),void 0!==e.label&&(this.updateLabel(),this.updateTooltip()),void 0!==e.tooltip&&this.updateTooltip()}get actionRunner(){return this._actionRunner||(this._actionRunner=this._register(new I.LN)),this._actionRunner}set actionRunner(e){this._actionRunner=e}isEnabled(){return this._action.enabled}setActionContext(e){this._context=e}render(e){let t=this.element=e;this._register(r.q.addTarget(e));let i=this.options&&this.options.draggable;i&&(e.draggable=!0,n.gm&&this._register((0,o.ko)(e,o.Bx.DRAG_START,e=>e.dataTransfer?.setData(s.t.TEXT,this._action.label)))),this._register((0,o.ko)(t,r.B.Tap,e=>this.onClick(e,!0))),this._register((0,o.ko)(t,o.Bx.MOUSE_DOWN,e=>{i||o.fs.stop(e,!0),this._action.enabled&&0===e.button&&t.classList.add("active")})),l.zx&&this._register((0,o.ko)(t,o.Bx.CONTEXT_MENU,e=>{0===e.button&&!0===e.ctrlKey&&this.onClick(e)})),this._register((0,o.ko)(t,o.Bx.CLICK,e=>{o.fs.stop(e,!0),this.options&&this.options.isMenu||this.onClick(e)})),this._register((0,o.ko)(t,o.Bx.DBLCLICK,e=>{o.fs.stop(e,!0)})),[o.Bx.MOUSE_UP,o.Bx.MOUSE_OUT].forEach(e=>{this._register((0,o.ko)(t,e,e=>{o.fs.stop(e),t.classList.remove("active")}))})}onClick(e,t=!1){o.fs.stop(e,!0);let i=N.z(this._context)?this.options?.useEventAsContext?e:{preserveFocus:t}:this._context;this.actionRunner.run(this._action,i)}focus(){this.element&&(this.element.tabIndex=0,this.element.focus(),this.element.classList.add("focused"))}blur(){this.element&&(this.element.blur(),this.element.tabIndex=-1,this.element.classList.remove("focused"))}setFocusable(e){this.element&&(this.element.tabIndex=e?0:-1)}get trapsArrowNavigation(){return!1}updateEnabled(){}updateLabel(){}getClass(){return this.action.class}getTooltip(){return this.action.tooltip}getHoverContents(){return this.getTooltip()}updateTooltip(){if(!this.element)return;let e=this.getHoverContents()??"";if(this.updateAriaLabel(),this.customHover||""===e)this.customHover&&this.customHover.update(e);else{let t=this.options.hoverDelegate??(0,a.nZ)("element");this.customHover=this._store.add((0,C.i)().setupManagedHover(t,this.element,e))}}updateAriaLabel(){if(this.element){let e=this.getTooltip()??"";this.element.setAttribute("aria-label",e)}}updateClass(){}updateChecked(){}dispose(){this.element&&(this.element.remove(),this.element=void 0),this._context=void 0,super.dispose()}}class M extends E{constructor(e,t,i){super(e,t,i={...i,icon:void 0!==i.icon&&i.icon,label:void 0===i.label||i.label}),this.options=i,this.cssClass=""}render(e){super.render(e),N.j(this.element);let t=document.createElement("a");if(t.classList.add("action-label"),t.setAttribute("role",this.getDefaultAriaRole()),this.label=t,this.element.appendChild(t),this.options.label&&this.options.keybinding&&!this.options.keybindingNotRenderedWithLabel){let e=document.createElement("span");e.classList.add("keybinding"),e.textContent=this.options.keybinding,this.element.appendChild(e)}this.updateClass(),this.updateLabel(),this.updateTooltip(),this.updateEnabled(),this.updateChecked()}getDefaultAriaRole(){return this._action.id===I.wv.ID?"presentation":this.options.isMenu?"menuitem":this.options.isTabList?"tab":"button"}focus(){this.label&&(this.label.tabIndex=0,this.label.focus())}blur(){this.label&&(this.label.tabIndex=-1)}setFocusable(e){this.label&&(this.label.tabIndex=e?0:-1)}updateLabel(){this.options.label&&this.label&&(this.label.textContent=this.action.label)}getTooltip(){let e=null;return this.action.tooltip?e=this.action.tooltip:this.action.label&&(e=this.action.label,this.options.keybinding&&(e=d.kg(0,"{0} ({1})",e,this.options.keybinding))),e??void 0}updateClass(){this.cssClass&&this.label&&this.label.classList.remove(...this.cssClass.split(" ")),this.options.icon?(this.cssClass=this.getClass(),this.label&&(this.label.classList.add("codicon"),this.cssClass&&this.label.classList.add(...this.cssClass.split(" "))),this.updateEnabled()):this.label?.classList.remove("codicon")}updateEnabled(){this.action.enabled?(this.label&&(this.label.removeAttribute("aria-disabled"),this.label.classList.remove("disabled")),this.element?.classList.remove("disabled")):(this.label&&(this.label.setAttribute("aria-disabled","true"),this.label.classList.add("disabled")),this.element?.classList.add("disabled"))}updateAriaLabel(){if(this.label){let e=this.getTooltip()??"";this.label.setAttribute("aria-label",e)}}updateChecked(){this.label&&(void 0!==this.action.checked?(this.label.classList.toggle("checked",this.action.checked),this.options.isTabList?this.label.setAttribute("aria-selected",this.action.checked?"true":"false"):(this.label.setAttribute("aria-checked",this.action.checked?"true":"false"),this.label.setAttribute("role","checkbox"))):(this.label.classList.remove("checked"),this.label.removeAttribute(this.options.isTabList?"aria-selected":"aria-checked"),this.label.setAttribute("role",this.getDefaultAriaRole())))}}class T extends E{constructor(e,t,i,n,s,o,r){super(e,t),this.selectBox=new D(i,n,s,o,r),this.selectBox.setFocusable(!1),this._register(this.selectBox),this.registerListeners()}select(e){this.selectBox.select(e)}registerListeners(){this._register(this.selectBox.onDidSelect(e=>this.runAction(e.selected,e.index)))}runAction(e,t){this.actionRunner.run(this._action,this.getActionContext(e,t))}getActionContext(e,t){return e}setFocusable(e){this.selectBox.setFocusable(e)}focus(){this.selectBox?.focus()}blur(){this.selectBox?.blur()}render(e){this.selectBox.render(e)}}},73589:(e,t,i)=>{"use strict";i.d(t,{t:()=>n});let n={RESOURCES:"ResourceURLs",DOWNLOAD_URL:"DownloadURL",FILES:"Files",TEXT:i(73082).K.text,INTERNAL_URI_LIST:"application/vnd.code.uri-list"}},73970:(e,t,i)=>{"use strict";i.d(t,{e:()=>o,i:()=>r});var n=i(82102);let s={showInstantHover:()=>void 0,showDelayedHover:()=>void 0,setupDelayedHover:()=>n.jG.None,setupDelayedHoverAtMouse:()=>n.jG.None,hideHover:()=>void 0,showAndFocusLastHover:()=>void 0,setupManagedHover:()=>({dispose:()=>void 0,show:()=>void 0,hide:()=>void 0,update:()=>void 0}),showManagedHover:()=>void 0};function o(e){s=e}function r(){return s}},74221:(e,t,i)=>{"use strict";i.d(t,{Gc:()=>v,Nn:()=>l,Xw:()=>h,rh:()=>_,yF:()=>f});var n=i(6033),s=i(17379),o=i(4091),r=i(89802);class a{get length(){return this._length}constructor(e){this._length=e}}class l extends a{static create(e,t,i){let n=e.length;return t&&(n=(0,o.QB)(n,t.length)),i&&(n=(0,o.QB)(n,i.length)),new l(n,e,t,i,t?t.missingOpeningBracketIds:r.gV.getEmpty())}get kind(){return 2}get listHeight(){return 0}get childrenLength(){return 3}getChild(e){switch(e){case 0:return this.openingBracket;case 1:return this.child;case 2:return this.closingBracket}throw Error("Invalid child index")}get children(){let e=[];return e.push(this.openingBracket),this.child&&e.push(this.child),this.closingBracket&&e.push(this.closingBracket),e}constructor(e,t,i,n,s){super(e),this.openingBracket=t,this.child=i,this.closingBracket=n,this.missingOpeningBracketIds=s}canBeReused(e){return!(null===this.closingBracket||e.intersects(this.missingOpeningBracketIds))}deepClone(){return new l(this.length,this.openingBracket.deepClone(),this.child&&this.child.deepClone(),this.closingBracket&&this.closingBracket.deepClone(),this.missingOpeningBracketIds)}computeMinIndentation(e,t){return this.child?this.child.computeMinIndentation((0,o.QB)(e,this.openingBracket.length),t):Number.MAX_SAFE_INTEGER}}class h extends a{static create23(e,t,i,n=!1){let s=e.length,r=e.missingOpeningBracketIds;if(e.listHeight!==t.listHeight)throw Error("Invalid list heights");if(s=(0,o.QB)(s,t.length),r=r.merge(t.missingOpeningBracketIds),i){if(e.listHeight!==i.listHeight)throw Error("Invalid list heights");s=(0,o.QB)(s,i.length),r=r.merge(i.missingOpeningBracketIds)}return n?new c(s,e.listHeight+1,e,t,i,r):new d(s,e.listHeight+1,e,t,i,r)}static getEmpty(){return new g(o.Vp,0,[],r.gV.getEmpty())}get kind(){return 4}get missingOpeningBracketIds(){return this._missingOpeningBracketIds}constructor(e,t,i){super(e),this.listHeight=t,this._missingOpeningBracketIds=i,this.cachedMinIndentation=-1}throwIfImmutable(){}makeLastElementMutable(){this.throwIfImmutable();let e=this.childrenLength;if(0===e)return;let t=this.getChild(e-1),i=4===t.kind?t.toMutable():t;return t!==i&&this.setChild(e-1,i),i}makeFirstElementMutable(){if(this.throwIfImmutable(),0===this.childrenLength)return;let e=this.getChild(0),t=4===e.kind?e.toMutable():e;return e!==t&&this.setChild(0,t),t}canBeReused(e){if(e.intersects(this.missingOpeningBracketIds)||0===this.childrenLength)return!1;let t=this;for(;4===t.kind;){let e=t.childrenLength;if(0===e)throw new n.D7;t=t.getChild(e-1)}return t.canBeReused(e)}handleChildrenChanged(){this.throwIfImmutable();let e=this.childrenLength,t=this.getChild(0).length,i=this.getChild(0).missingOpeningBracketIds;for(let n=1;n<e;n++){let e=this.getChild(n);t=(0,o.QB)(t,e.length),i=i.merge(e.missingOpeningBracketIds)}this._length=t,this._missingOpeningBracketIds=i,this.cachedMinIndentation=-1}computeMinIndentation(e,t){if(-1!==this.cachedMinIndentation)return this.cachedMinIndentation;let i=Number.MAX_SAFE_INTEGER,n=e;for(let e=0;e<this.childrenLength;e++){let s=this.getChild(e);s&&(i=Math.min(i,s.computeMinIndentation(n,t)),n=(0,o.QB)(n,s.length))}return this.cachedMinIndentation=i,i}}class d extends h{get childrenLength(){return null!==this._item3?3:2}getChild(e){switch(e){case 0:return this._item1;case 1:return this._item2;case 2:return this._item3}throw Error("Invalid child index")}setChild(e,t){switch(e){case 0:this._item1=t;return;case 1:this._item2=t;return;case 2:this._item3=t;return}throw Error("Invalid child index")}get children(){return this._item3?[this._item1,this._item2,this._item3]:[this._item1,this._item2]}get item1(){return this._item1}get item2(){return this._item2}get item3(){return this._item3}constructor(e,t,i,n,s,o){super(e,t,o),this._item1=i,this._item2=n,this._item3=s}deepClone(){return new d(this.length,this.listHeight,this._item1.deepClone(),this._item2.deepClone(),this._item3?this._item3.deepClone():null,this.missingOpeningBracketIds)}appendChildOfSameHeight(e){if(this._item3)throw Error("Cannot append to a full (2,3) tree node");this.throwIfImmutable(),this._item3=e,this.handleChildrenChanged()}unappendChild(){if(!this._item3)throw Error("Cannot remove from a non-full (2,3) tree node");this.throwIfImmutable();let e=this._item3;return this._item3=null,this.handleChildrenChanged(),e}prependChildOfSameHeight(e){if(this._item3)throw Error("Cannot prepend to a full (2,3) tree node");this.throwIfImmutable(),this._item3=this._item2,this._item2=this._item1,this._item1=e,this.handleChildrenChanged()}unprependChild(){if(!this._item3)throw Error("Cannot remove from a non-full (2,3) tree node");this.throwIfImmutable();let e=this._item1;return this._item1=this._item2,this._item2=this._item3,this._item3=null,this.handleChildrenChanged(),e}toMutable(){return this}}class c extends d{toMutable(){return new d(this.length,this.listHeight,this.item1,this.item2,this.item3,this.missingOpeningBracketIds)}throwIfImmutable(){throw Error("this instance is immutable")}}class u extends h{get childrenLength(){return this._children.length}getChild(e){return this._children[e]}setChild(e,t){this._children[e]=t}get children(){return this._children}constructor(e,t,i,n){super(e,t,n),this._children=i}deepClone(){let e=Array(this._children.length);for(let t=0;t<this._children.length;t++)e[t]=this._children[t].deepClone();return new u(this.length,this.listHeight,e,this.missingOpeningBracketIds)}appendChildOfSameHeight(e){this.throwIfImmutable(),this._children.push(e),this.handleChildrenChanged()}unappendChild(){this.throwIfImmutable();let e=this._children.pop();return this.handleChildrenChanged(),e}prependChildOfSameHeight(e){this.throwIfImmutable(),this._children.unshift(e),this.handleChildrenChanged()}unprependChild(){this.throwIfImmutable();let e=this._children.shift();return this.handleChildrenChanged(),e}toMutable(){return this}}class g extends u{toMutable(){return new u(this.length,this.listHeight,[...this.children],this.missingOpeningBracketIds)}throwIfImmutable(){throw Error("this instance is immutable")}}let p=[];class m extends a{get listHeight(){return 0}get childrenLength(){return 0}getChild(e){return null}get children(){return p}deepClone(){return this}}class f extends m{get kind(){return 0}get missingOpeningBracketIds(){return r.gV.getEmpty()}canBeReused(e){return!0}computeMinIndentation(e,t){let i=(0,o.l4)(e),n=(0===i.columnCount?i.lineCount:i.lineCount+1)+1,r=(0,o.eu)((0,o.QB)(e,this.length))+1,a=Number.MAX_SAFE_INTEGER;for(let e=n;e<=r;e++){let i=t.getLineFirstNonWhitespaceColumn(e),n=t.getLineContent(e);0!==i&&(a=Math.min(a,s.A.visibleColumnFromColumn(n,i,t.getOptions().tabSize)))}return a}}class _ extends m{static create(e,t,i){return new _(e,t,i)}get kind(){return 1}get missingOpeningBracketIds(){return r.gV.getEmpty()}constructor(e,t,i){super(e),this.bracketInfo=t,this.bracketIds=i}get text(){return this.bracketInfo.bracketText}get languageId(){return this.bracketInfo.languageId}canBeReused(e){return!1}computeMinIndentation(e,t){return Number.MAX_SAFE_INTEGER}}class v extends m{get kind(){return 3}constructor(e,t){super(t),this.missingOpeningBracketIds=e}canBeReused(e){return!e.intersects(this.missingOpeningBracketIds)}computeMinIndentation(e,t){return Number.MAX_SAFE_INTEGER}}},74227:(e,t,i)=>{"use strict";function n(e){return e&&"object"==typeof e&&"string"==typeof e.original&&"string"==typeof e.value}function s(e){return!!e&&void 0!==e.condition}i.d(t,{N:()=>s,f:()=>n})},74830:(e,t,i)=>{"use strict";function n(e,t){let i=e.getCount(),n=e.findTokenIndexAtOffset(t),o=e.getLanguageId(n),r=n;for(;r+1<i&&e.getLanguageId(r+1)===o;)r++;let a=n;for(;a>0&&e.getLanguageId(a-1)===o;)a--;return new s(e,o,a,r+1,e.getStartOffset(a),e.getEndOffset(r))}i.d(t,{BQ:()=>n,Yo:()=>o});class s{constructor(e,t,i,n,s,o){this._scopedLineTokensBrand=void 0,this._actual=e,this.languageId=t,this._firstTokenIndex=i,this._lastTokenIndex=n,this.firstCharOffset=s,this._lastCharOffset=o,this.languageIdCodec=e.languageIdCodec}getLineContent(){return this._actual.getLineContent().substring(this.firstCharOffset,this._lastCharOffset)}getLineLength(){return this._lastCharOffset-this.firstCharOffset}getActualLineContentBefore(e){return this._actual.getLineContent().substring(0,this.firstCharOffset+e)}getTokenCount(){return this._lastTokenIndex-this._firstTokenIndex}findTokenIndexAtOffset(e){return this._actual.findTokenIndexAtOffset(e+this.firstCharOffset)-this._firstTokenIndex}getStandardTokenType(e){return this._actual.getStandardTokenType(e+this._firstTokenIndex)}toIViewLineTokens(){return this._actual.sliceAndInflate(this.firstCharOffset,this._lastCharOffset,0)}}function o(e){return(3&e)!=0}},75247:(e,t,i)=>{"use strict";i.d(t,{CO:()=>l,F:()=>d,tp:()=>c});var n=i(71544),s=i(72553),o=i(54473),r=i(23047),a=i(62413);class l{constructor(){this._transformer=void 0}get endPositionExclusive(){return this.length.addToPosition(new s.y(1,1))}get lineRange(){return this.length.toLineRange()}getValue(){return this.getValueOfRange(this.length.toRange())}getValueOfOffsetRange(e){return this.getValueOfRange(this.getTransformer().getRange(e))}getLineLength(e){return this.getValueOfRange(new r.Q(e,1,e,Number.MAX_SAFE_INTEGER)).length}getTransformer(){return this._transformer||(this._transformer=new o.aG(this.getValue())),this._transformer}getLineAt(e){return this.getValueOfRange(new r.Q(e,1,e,Number.MAX_SAFE_INTEGER))}}class h extends l{constructor(e,t){(0,n.vA)(t>=1),super(),this._getLineContent=e,this._lineCount=t}getValueOfRange(e){if(e.startLineNumber===e.endLineNumber)return this._getLineContent(e.startLineNumber).substring(e.startColumn-1,e.endColumn-1);let t=this._getLineContent(e.startLineNumber).substring(e.startColumn-1);for(let i=e.startLineNumber+1;i<e.endLineNumber;i++)t+="\n"+this._getLineContent(i);return t+("\n"+this._getLineContent(e.endLineNumber).substring(0,e.endColumn-1))}getLineLength(e){return this._getLineContent(e).length}get length(){let e=this._getLineContent(this._lineCount);return new a.W(this._lineCount-1,e.length)}}class d extends h{constructor(e){super(t=>e[t-1],e.length)}}class c extends l{constructor(e){super(),this.value=e,this._t=new o.aG(this.value)}getValueOfRange(e){return this._t.getOffsetRange(e).substring(this.value)}get length(){return this._t.textLength}}},75999:()=>{},76054:(e,t,i)=>{"use strict";i.d(t,{$:()=>v,D:()=>S});var n,s,o=i(45262),r=i(17354),a=i(82102),l=i(41327),h=i(39783),d=i(8820),c=i(39205),u=i(97702),g=i(5488),p=i(15957),m=i(49195),f=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},_=function(e,t){return function(i,n){t(i,n,e)}};let v=class{constructor(e,t,i){this._commandService=e,this._keybindingService=t,this._hiddenStates=new b(i)}createMenu(e,t,i){return new y(e,this._hiddenStates,{emitEventsForSubmenuChanges:!1,eventDebounceDelay:50,...i},this._commandService,this._keybindingService,t)}getMenuActions(e,t,i){let n=new y(e,this._hiddenStates,{emitEventsForSubmenuChanges:!1,eventDebounceDelay:50,...i},this._commandService,this._keybindingService,t),s=n.getActions(i);return n.dispose(),s}resetHiddenStates(e){this._hiddenStates.reset(e)}};v=f([_(0,h.d),_(1,m.b),_(2,u.CS)],v);let b=class{static{n=this}static{this._key="menu.hiddenCommands"}constructor(e){this._storageService=e,this._disposables=new a.Cm,this._onDidChange=new r.vl,this.onDidChange=this._onDidChange.event,this._ignoreChangeEvent=!1,this._hiddenByDefaultCache=new Map;try{let t=e.get(n._key,0,"{}");this._data=JSON.parse(t)}catch(e){this._data=Object.create(null)}this._disposables.add(e.onDidChangeValue(0,n._key,this._disposables)(()=>{if(!this._ignoreChangeEvent)try{let t=e.get(n._key,0,"{}");this._data=JSON.parse(t)}catch(e){console.log("FAILED to read storage after UPDATE",e)}this._onDidChange.fire()}))}dispose(){this._onDidChange.dispose(),this._disposables.dispose()}_isHiddenByDefault(e,t){return this._hiddenByDefaultCache.get(`${e.id}/${t}`)??!1}setDefaultState(e,t,i){this._hiddenByDefaultCache.set(`${e.id}/${t}`,i)}isHidden(e,t){let i=this._isHiddenByDefault(e,t),n=this._data[e.id]?.includes(t)??!1;return i?!n:n}updateHidden(e,t,i){this._isHiddenByDefault(e,t)&&(i=!i);let n=this._data[e.id];if(i)n?0>n.indexOf(t)&&n.push(t):this._data[e.id]=[t];else if(n){let i=n.indexOf(t);i>=0&&(0,g.UH)(n,i),0===n.length&&delete this._data[e.id]}this._persist()}reset(e){if(void 0===e)this._data=Object.create(null),this._persist();else{for(let{id:t}of e)this._data[t]&&delete this._data[t];this._persist()}}_persist(){try{this._ignoreChangeEvent=!0;let e=JSON.stringify(this._data);this._storageService.store(n._key,e,0,0)}finally{this._ignoreChangeEvent=!1}}};b=n=f([_(0,u.CS)],b);class C{constructor(e,t){this._id=e,this._collectContextKeysForSubmenus=t,this._menuGroups=[],this._allMenuIds=new Set,this._structureContextKeys=new Set,this._preconditionContextKeys=new Set,this._toggledContextKeys=new Set,this.refresh()}get allMenuIds(){return this._allMenuIds}get structureContextKeys(){return this._structureContextKeys}get preconditionContextKeys(){return this._preconditionContextKeys}get toggledContextKeys(){return this._toggledContextKeys}refresh(){let e;for(let t of(this._menuGroups.length=0,this._allMenuIds.clear(),this._structureContextKeys.clear(),this._preconditionContextKeys.clear(),this._toggledContextKeys.clear(),this._sort(l.ZG.getMenuItems(this._id)))){let i=t.group||"";e&&e[0]===i||(e=[i,[]],this._menuGroups.push(e)),e[1].push(t),this._collectContextKeysAndSubmenuIds(t)}this._allMenuIds.add(this._id)}_sort(e){return e}_collectContextKeysAndSubmenuIds(e){if(C._fillInKbExprKeys(e.when,this._structureContextKeys),(0,l.is)(e)){if(e.command.precondition&&C._fillInKbExprKeys(e.command.precondition,this._preconditionContextKeys),e.command.toggled){let t=e.command.toggled.condition||e.command.toggled;C._fillInKbExprKeys(t,this._toggledContextKeys)}}else this._collectContextKeysForSubmenus&&(l.ZG.getMenuItems(e.submenu).forEach(this._collectContextKeysAndSubmenuIds,this),this._allMenuIds.add(e.submenu))}static _fillInKbExprKeys(e,t){if(e)for(let i of e.keys())t.add(i)}}let w=s=class extends C{constructor(e,t,i,n,s,o){super(e,i),this._hiddenStates=t,this._commandService=n,this._keybindingService=s,this._contextKeyService=o,this.refresh()}createActionGroups(e){let t=[];for(let i of this._menuGroups){let n,[o,r]=i;for(let t of r)if(this._contextKeyService.contextMatchesRules(t.when)){let i=(0,l.is)(t);i&&this._hiddenStates.setDefaultState(this._id,t.command.id,!!t.isHiddenByDefault);let o=function(e,t,i){let n=(0,l.i1)(t)?t.submenu.id:t.id,s="string"==typeof t.title?t.title:t.title.value,o=(0,c.ih)({id:`hide/${e.id}/${n}`,label:(0,p.kg)(1636,"Hide '{0}'",s),run(){i.updateHidden(e,n,!0)}}),r=(0,c.ih)({id:`toggle/${e.id}/${n}`,label:s,get checked(){return!i.isHidden(e,n)},run(){i.updateHidden(e,n,!!this.checked)}});return{hide:o,toggle:r,get isHidden(){return!r.checked}}}(this._id,i?t.command:t,this._hiddenStates);if(i){let i=S(this._commandService,this._keybindingService,t.command.id,t.when);(n??=[]).push(new l.Xe(t.command,t.alt,e,o,i,this._contextKeyService,this._commandService))}else{let i=new s(t.submenu,this._hiddenStates,this._collectContextKeysForSubmenus,this._commandService,this._keybindingService,this._contextKeyService).createActionGroups(e),r=c.wv.join(...i.map(e=>e[1]));r.length>0&&(n??=[]).push(new l.nI(t,o,r))}}n&&n.length>0&&t.push([o,n])}return t}_sort(e){return e.sort(s._compareMenuItems)}static _compareMenuItems(e,t){let i=e.group,n=t.group;if(i!==n){if(!i)return 1;if(!n||"navigation"===i)return -1;if("navigation"===n)return 1;let e=i.localeCompare(n);if(0!==e)return e}let o=e.order||0,r=t.order||0;return o<r?-1:o>r?1:s._compareTitles((0,l.is)(e)?e.command.title:e.title,(0,l.is)(t)?t.command.title:t.title)}static _compareTitles(e,t){let i="string"==typeof e?e:e.original,n="string"==typeof t?t:t.original;return i.localeCompare(n)}};w=s=f([_(3,h.d),_(4,m.b),_(5,d.fN)],w);let y=class{constructor(e,t,i,n,s,h){this._disposables=new a.Cm,this._menuInfo=new w(e,t,i.emitEventsForSubmenuChanges,n,s,h);let d=new o.uC(()=>{this._menuInfo.refresh(),this._onDidChange.fire({menu:this,isStructuralChange:!0,isEnablementChange:!0,isToggleChange:!0})},i.eventDebounceDelay);this._disposables.add(d),this._disposables.add(l.ZG.onDidChangeMenu(e=>{for(let t of this._menuInfo.allMenuIds)if(e.has(t)){d.schedule();break}}));let c=this._disposables.add(new a.Cm),u=e=>{let t=!1,i=!1,n=!1;for(let s of e)if(t=t||s.isStructuralChange,i=i||s.isEnablementChange,n=n||s.isToggleChange,t&&i&&n)break;return{menu:this,isStructuralChange:t,isEnablementChange:i,isToggleChange:n}},g=()=>{c.add(h.onDidChangeContext(e=>{let t=e.affectsSome(this._menuInfo.structureContextKeys),i=e.affectsSome(this._menuInfo.preconditionContextKeys),n=e.affectsSome(this._menuInfo.toggledContextKeys);(t||i||n)&&this._onDidChange.fire({menu:this,isStructuralChange:t,isEnablementChange:i,isToggleChange:n})})),c.add(t.onDidChange(e=>{this._onDidChange.fire({menu:this,isStructuralChange:!0,isEnablementChange:!1,isToggleChange:!1})}))};this._onDidChange=new r.uI({onWillAddFirstListener:g,onDidRemoveLastListener:c.clear.bind(c),delay:i.eventDebounceDelay,merge:u}),this.onDidChange=this._onDidChange.event}getActions(e){return this._menuInfo.createActionGroups(e)}dispose(){this._disposables.dispose(),this._onDidChange.dispose()}};function S(e,t,i,n,s=!0){return(0,c.ih)({id:`configureKeybinding/${i}`,label:(0,p.kg)(1637,"Configure Keybinding"),enabled:s,run(){let s=!t.lookupKeybinding(i)&&n?n.serialize():void 0;e.executeCommand("workbench.action.openGlobalKeybindings",`@command:${i}`+(s?` +when:${s}`:""))}})}y=f([_(3,h.d),_(4,m.b),_(5,d.fN)],y)},76144:(e,t,i)=>{"use strict";i.d(t,{_:()=>o});var n=i(87899),s=i(82102);class o{constructor(){this._hooks=new s.Cm,this._pointerMoveCallback=null,this._onStopCallback=null}dispose(){this.stopMonitoring(!1),this._hooks.dispose()}stopMonitoring(e,t){if(!this.isMonitoring())return;this._hooks.clear(),this._pointerMoveCallback=null;let i=this._onStopCallback;this._onStopCallback=null,e&&i&&i(t)}isMonitoring(){return!!this._pointerMoveCallback}startMonitoring(e,t,i,o,r){this.isMonitoring()&&this.stopMonitoring(!1),this._pointerMoveCallback=o,this._onStopCallback=r;let a=e;try{e.setPointerCapture(t),this._hooks.add((0,s.s)(()=>{try{e.releasePointerCapture(t)}catch(e){}}))}catch(t){a=n.zk(e)}this._hooks.add(n.ko(a,n.Bx.POINTER_MOVE,e=>{if(e.buttons!==i)return void this.stopMonitoring(!0);e.preventDefault(),this._pointerMoveCallback(e)})),this._hooks.add(n.ko(a,n.Bx.POINTER_UP,e=>this.stopMonitoring(!0)))}}},76946:(e,t,i)=>{"use strict";let n;i.d(t,{jM:()=>h.j,BK:()=>I,XL:()=>r.XL,fL:()=>r.fL,fm:()=>_,Z7:()=>w,Y:()=>b,zL:()=>v,yC:()=>C,lk:()=>K,pl:()=>B,un:()=>S,t:()=>J,a0:()=>D,nb:()=>L,ZX:()=>V,C:()=>x,dQ:()=>k,X2:()=>u,YY:()=>r.YY,Rl:()=>z,y0:()=>R,eP:()=>O,Yd:()=>A,yQ:()=>q,FY:()=>d,Zh:()=>m,OI:()=>W,jv:()=>j,fW:()=>$,lp:()=>Y,fT:()=>X,yi:()=>Z,PO:()=>r.PO,Rn:()=>r.Rn,oJ:()=>T});var s=i(34985),o=i(72307),r=i(59916),a=i(65164),l=i(59114),h=i(69909);function d(e,t,i=h.j.ofCaller()){return new c("string"==typeof e?new s.nA(void 0,e,void 0):new s.nA(e,void 0,void 0),t,o.nx,i)}class c extends a.ZK{get debugName(){return this._debugNameData.getDebugName(this)??"ObservableValue"}constructor(e,t,i,n){super(n),this._debugNameData=e,this._equalityComparator=i,this._value=t,(0,l.tZ)()?.handleObservableUpdated(this,{hadValue:!1,newValue:t,change:void 0,didChange:!0,oldValue:void 0})}get(){return this._value}set(e,t,i){let n;if(!(void 0===i&&this._equalityComparator(this._value,e))){t||(t=n=new r.XL(()=>{},()=>`Setting ${this.debugName}`));try{let n=this._value;for(let s of(this._setValue(e),(0,l.tZ)()?.handleObservableUpdated(this,{oldValue:n,newValue:e,change:i,didChange:!0,hadValue:!0}),this._observers))t.updateObserver(s,this),s.handleChange(this,i)}finally{n&&n.finish()}}}toString(){return`${this.debugName}: ${this._value}`}_setValue(e){this._value=e}debugGetState(){return{value:this._value}}debugSetValue(e){this._value=e}}function u(e,t,i=h.j.ofCaller()){return new g("string"==typeof e?new s.nA(void 0,e,void 0):new s.nA(e,void 0,void 0),t,o.nx,i)}class g extends c{_setValue(e){this._value!==e&&(this._value&&this._value.dispose(),this._value=e)}dispose(){this._value?.dispose()}}class p extends a.ZK{get debugName(){return this._debugNameData.getDebugName(this)??"LazyObservableValue"}constructor(e,t,i,n){super(n),this._debugNameData=e,this._equalityComparator=i,this._isUpToDate=!0,this._deltas=[],this._updateCounter=0,this._value=t}get(){return this._update(),this._value}_update(){if(!this._isUpToDate)if(this._isUpToDate=!0,this._deltas.length>0){for(let e of this._deltas)for(let t of((0,l.tZ)()?.handleObservableUpdated(this,{change:e,didChange:!0,oldValue:"(unknown)",newValue:this._value,hadValue:!0}),this._observers))t.handleChange(this,e);this._deltas.length=0}else for(let e of((0,l.tZ)()?.handleObservableUpdated(this,{change:void 0,didChange:!0,oldValue:"(unknown)",newValue:this._value,hadValue:!0}),this._observers))e.handleChange(this,void 0)}_beginUpdate(){if(this._updateCounter++,1===this._updateCounter)for(let e of this._observers)e.beginUpdate(this)}_endUpdate(){if(this._updateCounter--,0===this._updateCounter)for(let e of(this._update(),[...this._observers]))e.endUpdate(this)}addObserver(e){let t=!this._observers.has(e)&&this._updateCounter>0;super.addObserver(e),t&&e.beginUpdate(this)}removeObserver(e){let t=this._observers.has(e)&&this._updateCounter>0;super.removeObserver(e),t&&e.endUpdate(this)}set(e,t,i){let n;if(!(void 0===i&&this._equalityComparator(this._value,e))){t||(t=n=new r.XL(()=>{},()=>`Setting ${this.debugName}`));try{if(this._isUpToDate=!1,this._setValue(e),void 0!==i&&this._deltas.push(i),t.updateObserver({beginUpdate:()=>this._beginUpdate(),endUpdate:()=>this._endUpdate(),handleChange:(e,t)=>{},handlePossibleChange:e=>{}},this),this._updateCounter>1)for(let e of this._observers)e.handlePossibleChange(this)}finally{n&&n.finish()}}}toString(){return`${this.debugName}: ${this._value}`}_setValue(e){this._value=e}}function m(e,t,i=h.j.ofCaller()){return e.lazy?new p(new s.nA(e.owner,e.debugName,void 0),t,e.equalsFn??o.nx,i):new c(new s.nA(e.owner,e.debugName,void 0),t,e.equalsFn??o.nx,i)}class f{get debugName(){return this._debugNameData.getDebugName(this)??"(anonymous)"}constructor(e,t,i,n){this._debugNameData=e,this._runFn=t,this._changeTracker=i,this._state=2,this._updateCount=0,this._disposed=!1,this._dependencies=new Set,this._dependenciesToBeRemoved=new Set,this._isRunning=!1,this._store=void 0,this._delayedStore=void 0,this._changeSummary=this._changeTracker?.createChangeSummary(void 0),(0,l.tZ)()?.handleAutorunCreated(this,n),this._run(),(0,o.Ay)(this)}dispose(){if(!this._disposed){for(let e of(this._disposed=!0,this._dependencies))e.removeObserver(this);this._dependencies.clear(),void 0!==this._store&&this._store.dispose(),void 0!==this._delayedStore&&this._delayedStore.dispose(),(0,l.tZ)()?.handleAutorunDisposed(this),(0,o.VD)(this)}}_run(){let e=this._dependenciesToBeRemoved;this._dependenciesToBeRemoved=this._dependencies,this._dependencies=e,this._state=3;try{if(!this._disposed){(0,l.tZ)()?.handleAutorunStarted(this);let e=this._changeSummary,t=this._delayedStore;void 0!==t&&(this._delayedStore=void 0);try{this._isRunning=!0,this._changeTracker&&(this._changeTracker.beforeUpdate?.(this,e),this._changeSummary=this._changeTracker.createChangeSummary(e)),void 0!==this._store&&(this._store.dispose(),this._store=void 0),this._runFn(this,e)}catch(e){(0,o.y4)(e)}finally{this._isRunning=!1,void 0!==t&&t.dispose()}}}finally{for(let e of(this._disposed||(0,l.tZ)()?.handleAutorunFinished(this),this._dependenciesToBeRemoved))e.removeObserver(this);this._dependenciesToBeRemoved.clear()}}toString(){return`Autorun<${this.debugName}>`}beginUpdate(e){3===this._state&&(this._state=1),this._updateCount++}endUpdate(e){try{if(1===this._updateCount)do{if(1===this._state){for(let e of(this._state=3,this._dependencies))if(e.reportChanges(),2===this._state)break}3!==this._state&&this._run()}while(3!==this._state)}finally{this._updateCount--}(0,o.Ft)(()=>this._updateCount>=0)}handlePossibleChange(e){3===this._state&&this._isDependency(e)&&(this._state=1)}handleChange(e,t){if(this._isDependency(e)){(0,l.tZ)()?.handleAutorunDependencyChanged(this,e,t);try{(!this._changeTracker||this._changeTracker.handleChange({changedObservable:e,change:t,didChange:t=>t===e},this._changeSummary))&&(this._state=2)}catch(e){(0,o.y4)(e)}}}_isDependency(e){return this._dependencies.has(e)&&!this._dependenciesToBeRemoved.has(e)}_ensureNoRunning(){if(!this._isRunning)throw new o.D7("The reader object cannot be used outside its compute function!")}readObservable(e){if(this._ensureNoRunning(),this._disposed)return e.get();e.addObserver(this);let t=e.get();return this._dependencies.add(e),this._dependenciesToBeRemoved.delete(e),t}get store(){if(this._ensureNoRunning(),this._disposed)throw new o.D7("Cannot access store after dispose");return void 0===this._store&&(this._store=new o.Cm),this._store}debugGetState(){return{isRunning:this._isRunning,updateCount:this._updateCount,dependencies:this._dependencies,state:this._state,stateStr:function(e){switch(e){case 1:return"dependenciesMightHaveChanged";case 2:return"stale";case 3:return"upToDate";default:return"<unknown>"}}(this._state)}}debugRerun(){this._isRunning?this._state=2:this._run()}}function _(e,t=h.j.ofCaller()){return new f(new s.nA(void 0,void 0,e),e,void 0,t)}function v(e,t,i=h.j.ofCaller()){return new f(new s.nA(e.owner,e.debugName,e.debugReferenceFn??t),t,void 0,i)}function b(e,t,i=h.j.ofCaller()){return new f(new s.nA(e.owner,e.debugName,e.debugReferenceFn??t),t,e.changeTracker,i)}function C(e){let t=new o.Cm,i=v({owner:void 0,debugName:void 0,debugReferenceFn:e},i=>{t.clear(),e(i,t)});return(0,o.s)(()=>{i.dispose(),t.dispose()})}function w(e,t){let i;return v({debugReferenceFn:t},n=>{let s=e.read(n),o=i;i=s,t({lastValue:o,newValue:s})})}var y=i(14467);function S(e,t,i=h.j.ofCaller()){return void 0!==t?new y.w(new s.nA(e,void 0,t),t,void 0,void 0,o.nx,i):new y.w(new s.nA(void 0,void 0,e),e,void 0,void 0,o.nx,i)}function k(e,t,i,n=h.j.ofCaller()){return new y.P(new s.nA(e,void 0,t),t,void 0,void 0,o.nx,i,n)}function x(e,t,i=h.j.ofCaller()){return new y.w(new s.nA(e.owner,e.debugName,e.debugReferenceFn),t,void 0,e.onLastObserverRemoved,e.equalsFn??o.nx,i)}function L(e,t,i=h.j.ofCaller()){return new y.w(new s.nA(e.owner,e.debugName,void 0),t,e.changeTracker,void 0,e.equalityComparer??o.nx,i)}function D(e,t,i=h.j.ofCaller()){let n,r,a;return void 0===t?(n=e,r=void 0):(r=e,n=t),new y.w(new s.nA(r,void 0,n),e=>{a?a.clear():a=new o.Cm;let t=n(e);return t&&a.add(t),t},void 0,()=>{a&&(a.dispose(),a=void 0)},o.nx,i)}(0,a.N2)(x);class I{constructor(e){this._value=d(this,void 0),this.promiseResult=this._value,this.promise=e.then(e=>((0,r.Rn)(t=>{this._value.set(new N(e,void 0),t)}),e),e=>{throw(0,r.Rn)(t=>{this._value.set(new N(void 0,e),t)}),e})}}class N{constructor(e,t){this.data=e,this.error=t}getDataOrThrow(){if(this.error)throw this.error;return this.data}}var E=i(6033),M=i(13445);function T(e,t,i,n){return t||(t=e=>null!=e),new Promise((s,o)=>{let r=!0,a=!1,l=e.map(e=>({isFinished:t(e),error:!!i&&i(e),state:e})),h=_(e=>{let{isFinished:t,error:i,state:n}=l.read(e);(t||i)&&(r?a=!0:h.dispose(),i?o(!0===i?n:i):s(n))});if(n){let e=n.onCancellationRequested(()=>{h.dispose(),e.dispose(),o(new E.AL)});if(n.isCancellationRequested){h.dispose(),e.dispose(),o(new E.AL);return}}r=!1,a&&h.dispose()})}function R(...e){let t,i,n,r;return 2===e.length?[i,n]=e:[t,i,n,r]=e,new P(new s.nA(t,void 0,n),i,n,()=>P.globalTransaction,o.nx,r??h.j.ofCaller())}function O(e,t,i,n=h.j.ofCaller()){return new P(new s.nA(e.owner,e.debugName,e.debugReferenceFn??i),t,i,()=>P.globalTransaction,e.equalsFn??o.nx,n)}class P extends a.ZK{constructor(e,t,i,n,s,o){super(o),this._debugNameData=e,this.event=t,this._getValue=i,this._getTransaction=n,this._equalityComparator=s,this._hasValue=!1,this.handleEvent=e=>{let t=this._getValue(e),i=this._value,n=!this._hasValue||!this._equalityComparator(i,t),s=!1;n&&(this._value=t,this._hasValue&&(s=!0,(0,r.PO)(this._getTransaction(),e=>{for(let s of((0,l.tZ)()?.handleObservableUpdated(this,{oldValue:i,newValue:t,change:void 0,didChange:n,hadValue:this._hasValue}),this._observers))e.updateObserver(s,this),s.handleChange(this,void 0)},()=>{let e=this.getDebugName();return"Event fired"+(e?`: ${e}`:"")})),this._hasValue=!0),s||(0,l.tZ)()?.handleObservableUpdated(this,{oldValue:i,newValue:t,change:void 0,didChange:n,hadValue:this._hasValue})}}getDebugName(){return this._debugNameData.getDebugName(this)}get debugName(){let e=this.getDebugName();return"From Event"+(e?`: ${e}`:"")}onFirstObserverAdded(){this._subscription=this.event(this.handleEvent)}onLastObserverRemoved(){this._subscription.dispose(),this._subscription=void 0,this._hasValue=!1,this._value=void 0}get(){return this._subscription?(this._hasValue||this.handleEvent(void 0),this._value):this._getValue(void 0)}debugSetValue(e){this._value=e}debugGetState(){return{value:this._value,hasValue:this._hasValue}}}function A(e,t=h.j.ofCaller()){return"string"==typeof e?new F(e,void 0,t):new F(void 0,e,t)}!function(e){e.Observer=P,e.batchEventsGlobally=function(e,t){let i=!1;void 0===P.globalTransaction&&(P.globalTransaction=e,i=!0);try{t()}finally{i&&(P.globalTransaction=void 0)}}}(R||(R={}));class F extends a.ZK{get debugName(){return new s.nA(this._owner,this._debugName,void 0).getDebugName(this)??"Observable Signal"}toString(){return this.debugName}constructor(e,t,i){super(i),this._debugName=e,this._owner=t}trigger(e,t){if(!e)return void(0,r.Rn)(e=>{this.trigger(e,t)},()=>`Trigger signal ${this.debugName}`);for(let i of this._observers)e.updateObserver(i,this),i.handleChange(this,t)}get(){}}function B(e,t){let i,n,s=!1;return R(o=>{let r=_(r=>{let a=e.read(r);s?(i&&clearTimeout(i),i=setTimeout(()=>{n=a,o()},t)):(s=!0,n=a)});return{dispose(){r.dispose(),s=!1,n=void 0}}},()=>s?n:e.get())}function W(e,t){let i=new H(!0,t);e.addObserver(i);try{i.beginUpdate(e)}finally{i.endUpdate(e)}return(0,o.s)(()=>{e.removeObserver(i)})}(0,a.FB)(function(e){let t=new H(!1,void 0);return e.addObserver(t),(0,o.s)(()=>{e.removeObserver(t)})}),(0,a.Bm)(W);class H{constructor(e,t){this._forceRecompute=e,this._handleValue=t,this._counter=0}beginUpdate(e){this._counter++}endUpdate(e){1===this._counter&&this._forceRecompute&&(this._handleValue?this._handleValue(e.get()):e.reportChanges()),this._counter--}handlePossibleChange(e){}handleChange(e,t){}}function V(e,t){let i;return x({owner:e,debugReferenceFn:t},e=>i=t(e,i))}function z(e,t,i,n){let s=new U(i,n);return x({debugReferenceFn:i,owner:e,onLastObserverRemoved:()=>{s.dispose(),s=new U(i)}},e=>(s.setItems(t.read(e)),s.getItems()))}class U{constructor(e,t){this._map=e,this._keySelector=t,this._cache=new Map,this._items=[]}dispose(){this._cache.forEach(e=>e.store.dispose()),this._cache.clear()}setItems(e){let t=[],i=new Set(this._cache.keys());for(let n of e){let e=this._keySelector?this._keySelector(n):n,s=this._cache.get(e);if(s)i.delete(e);else{let t=new o.Cm;s={out:this._map(n,t),store:t},this._cache.set(e,s)}t.push(s.out)}for(let e of i)this._cache.get(e).store.dispose(),this._cache.delete(e);this._items=t}getItems(){return this._items}}function j(e){return{createChangeSummary:e=>({changes:[]}),handleChange(t,i){for(let n in e)t.didChange(e[n])&&i.changes.push({key:n,change:t.change});return!0},beforeUpdate(t,i){for(let n in e){if("changes"===n)throw new o.D7('property name "changes" is reserved for change tracking');i[n]=e[n].read(t)}}}}function $(e){let t;return{createChangeSummary:e=>({changes:[]}),handleChange(i,n){for(let s in t||(t=e()),t)i.didChange(t[s])&&n.changes.push({key:s,change:i.change});return!0},beforeUpdate(i,n){for(let s in t||(t=e()),t){if("changes"===s)throw new o.D7('property name "changes" is reserved for change tracking');n[s]=t[s].read(i)}}}}function K(e){return new G(e)}class G extends a.zV{constructor(e){super(),this.value=e}get debugName(){return this.toString()}get(){return this.value}addObserver(e){}removeObserver(e){}toString(){return`Const: ${this.value}`}}function q(e,t,i=h.j.ofCaller()){return new Q("string"==typeof e?e:new s.nA(e,void 0,void 0),t,i)}class Q extends a.ZK{constructor(e,t,i){super(i),this.event=t,this.handleEvent=()=>{(0,r.Rn)(e=>{for(let t of this._observers)e.updateObserver(t,this),t.handleChange(this,void 0)},()=>this.debugName)},this.debugName="string"==typeof e?e:e.getDebugName(this)??"Observable Signal From Event"}onFirstObserverAdded(){this.subscription=this.event(this.handleEvent)}onLastObserverRemoved(){this.subscription.dispose(),this.subscription=void 0}get(){}}function Y(e,t){let i,n=!0;return function(e,t){let i=new o.Cm,n=b({owner:e.owner,debugName:e.debugName,debugReferenceFn:e.debugReferenceFn??t,changeTracker:e.changeTracker},(e,n)=>{i.clear(),t(e,n,i)});return(0,o.s)(()=>{n.dispose(),i.dispose()})}({changeTracker:{createChangeSummary:()=>({deltas:[],didChange:!1}),handleChange:(t,i)=>{if(t.didChange(e)){let e=t.change;void 0!==e&&i.deltas.push(e),i.didChange=!0}return!0}}},(s,o)=>{let r=e.read(s),a=i;o.didChange&&(i=r,t(r,a,o.deltas)),n&&(n=!1,i=r)})}function Z(e,t){let i=new o.Cm,n=Y(e,(e,n,s)=>{i.clear(),t(e,n,s,i)});return{dispose(){n.dispose(),i.dispose()}}}function X(e,t){return Z(e,(e,i,n,s)=>{t(e,i,n,(0,M.bs)(s))})}function J(e,t){return V(e,(e,i)=>i??t(e))}class ee{constructor(){this.indentation=0,this.changedObservablesSets=new WeakMap}addFilteredObj(e){this._filteredObjects||(this._filteredObjects=new Set),this._filteredObjects.add(e)}_isIncluded(e){return this._filteredObjects?.has(e)??!0}textToConsoleArgs(e){return function(e){let t=[],i=[],n="";!function e(s){if("length"in s)for(let t of s)t&&e(t);else"text"in s?(n+=`%c${s.text}`,t.push(s.style),s.data&&i.push(...s.data)):"data"in s&&i.push(...s.data)}(e);let s=[n,...t];return s.push(...i),s}([et(function(e,t){let i="";for(let e=1;e<=t;e++)i+="| ";return i}("| ",this.indentation)),e])}formatInfo(e){return e.hadValue?e.didChange?[et(" "),en(es(e.oldValue,70),{color:"red",strikeThrough:!0}),et(" "),en(es(e.newValue,60),{color:"green"})]:[et(" (unchanged)")]:[et(" "),en(es(e.newValue,60),{color:"green"}),et(" (initial)")]}handleObservableCreated(e){e instanceof y.w&&this.changedObservablesSets.set(e,new Set)}handleOnListenerCountChanged(e,t){}handleObservableUpdated(e,t){if(this._isIncluded(e)){if(e instanceof y.w)return void this._handleDerivedRecomputed(e,t);console.log(...this.textToConsoleArgs([ei("observable value changed"),en(e.debugName,{color:"BlueViolet"}),...this.formatInfo(t)]))}}formatChanges(e){if(0!==e.size)return en(" (changed deps: "+[...e].map(e=>e.debugName).join(", ")+")",{color:"gray"})}handleDerivedDependencyChanged(e,t,i){this._isIncluded(e)&&this.changedObservablesSets.get(e)?.add(t)}_handleDerivedRecomputed(e,t){if(!this._isIncluded(e))return;let i=this.changedObservablesSets.get(e);i&&(console.log(...this.textToConsoleArgs([ei("derived recomputed"),en(e.debugName,{color:"BlueViolet"}),...this.formatInfo(t),this.formatChanges(i),{data:[{fn:e._debugNameData.referenceFn??e._computeFn}]}])),i.clear())}handleDerivedCleared(e){this._isIncluded(e)&&console.log(...this.textToConsoleArgs([ei("derived cleared"),en(e.debugName,{color:"BlueViolet"})]))}handleAutorunCreated(e){this._isIncluded(e)&&this.changedObservablesSets.set(e,new Set)}handleAutorunDisposed(e){}handleAutorunDependencyChanged(e,t,i){this._isIncluded(e)&&this.changedObservablesSets.get(e).add(t)}handleAutorunStarted(e){let t=this.changedObservablesSets.get(e);t&&(this._isIncluded(e)&&console.log(...this.textToConsoleArgs([ei("autorun"),en(e.debugName,{color:"BlueViolet"}),this.formatChanges(t),{data:[{fn:e._debugNameData.referenceFn??e._runFn}]}])),t.clear(),this.indentation++)}handleAutorunFinished(e){this.indentation--}handleBeginTransaction(e){let t=e.getDebugName();void 0===t&&(t=""),this._isIncluded(e)&&console.log(...this.textToConsoleArgs([ei("transaction"),en(t,{color:"BlueViolet"}),{data:[{fn:e._fn}]}])),this.indentation++}handleEndTransaction(){this.indentation--}}function et(e){return en(e,{color:"black"})}function ei(e){return en(function(e,t){for(;e.length<10;)e+=" ";return e}(`${e}: `,10),{color:"black",bold:!0})}function en(e,t={color:"black"}){let i={color:t.color};return t.strikeThrough&&(i["text-decoration"]="line-through"),t.bold&&(i["font-weight"]="bold"),{text:e,style:Object.entries(i).reduce((e,[t,i])=>`${e}${t}:${i};`,"")}}function es(e,t){switch(typeof e){case"number":default:return""+e;case"string":if(e.length+2<=t)return`"${e}"`;return`"${e.substr(0,t-7)}"+...`;case"boolean":return e?"true":"false";case"undefined":return"undefined";case"object":if(null===e)return"null";if(Array.isArray(e)){var i=e,n=t;let s="[ ",o=!0;for(let e of i){if(o||(s+=", "),s.length-5>n){s+="...";break}o=!1,s+=`${es(e,n-s.length)}`}return s+" ]"}var o=e,r=t;if("function"==typeof o.toString&&o.toString!==Object.prototype.toString){let e=o.toString();return e.length<=r?e:e.substring(0,r-3)+"..."}let a=(0,s.uB)(o),l=a?a+"(":"{ ",h=!0;for(let[e,t]of Object.entries(o)){if(h||(l+=", "),l.length-5>r){l+="...";break}h=!1,l+=`${e}: ${es(t,r-l.length)}`}return l+(a?")":" }");case"symbol":return e.toString();case"function":return`[[Function${e.name?" "+e.name:""}]]`}}class eo{static createClient(e,t){return new eo(e,t)}constructor(e,t){this._channelFactory=e,this._getHandler=t,this._channel=this._channelFactory({handleNotification:e=>{let t=this._getHandler().notifications[e[0]];if(!t)throw Error(`Unknown notification "${e[0]}"!`);t(...e[1])},handleRequest:e=>{try{let t=this._getHandler().requests[e[0]](...e[1]);return{type:"result",value:t}}catch(e){return{type:"error",value:e}}}});let i=new Proxy({},{get:(e,t)=>async(...e)=>{let i=await this._channel.sendRequest([t,e]);if("error"!==i.type)return i.value;throw i.value}}),n=new Proxy({},{get:(e,t)=>(...e)=>{this._channel.sendNotification([t,e])}});this.api={notifications:n,requests:i}}}class er{constructor(){this._timeout=void 0}throttle(e,t){void 0===this._timeout&&(this._timeout=setTimeout(()=>{this._timeout=void 0,e()},t))}dispose(){void 0!==this._timeout&&clearTimeout(this._timeout)}}var ea=i(95751);class el{static{this._instance=void 0}static getInstance(){return void 0===el._instance&&(el._instance=new el),el._instance}getTransactionState(){let e=[],t=[...this._activeTransactions];if(0===t.length)return;let i=t.flatMap(e=>e.debugGetUpdatingObservers()??[]).map(e=>e.observer),n=new Set;for(;i.length>0;){let t=i.shift();if(n.has(t))continue;n.add(t);let s=this._getInfo(t,e=>{n.has(e)||i.push(e)});s&&e.push(s)}return{names:t.map(e=>e.getDebugName()??"tx"),affected:e}}_getObservableInfo(e){let t=this._instanceInfos.get(e);return t||void(0,E.dz)(new E.D7("No info found"))}_getAutorunInfo(e){let t=this._instanceInfos.get(e);return t||void(0,E.dz)(new E.D7("No info found"))}_getInfo(e,t){if(e instanceof y.w){for(let i of[...e.debugGetObservers()])t(i);let i=this._getObservableInfo(e);if(!i)return;let n=e.debugGetState(),s={name:e.debugName,instanceId:i.instanceId,updateCount:n.updateCount},o=[...i.changedObservables].map(e=>this._instanceInfos.get(e)?.instanceId).filter(ea.O9);if(n.isComputing)return{...s,type:"observable/derived",state:"updating",changedDependencies:o,initialComputation:!1};switch(n.state){case 0:return{...s,type:"observable/derived",state:"noValue"};case 3:return{...s,type:"observable/derived",state:"upToDate"};case 2:return{...s,type:"observable/derived",state:"stale",changedDependencies:o};case 1:return{...s,type:"observable/derived",state:"possiblyStale"}}}else if(e instanceof f){let t=this._getAutorunInfo(e);if(!t)return;let i={name:e.debugName,instanceId:t.instanceId,updateCount:t.updateCount},n=[...t.changedObservables].map(e=>this._instanceInfos.get(e).instanceId);if(e.debugGetState().isRunning)return{...i,type:"autorun",state:"updating",changedDependencies:n};switch(e.debugGetState().state){case 3:return{...i,type:"autorun",state:"upToDate"};case 2:return{...i,type:"autorun",state:"stale",changedDependencies:n};case 1:return{...i,type:"autorun",state:"possiblyStale"}}}}_formatObservable(e){let t=this._getObservableInfo(e);if(t)return{name:e.debugName,instanceId:t.instanceId}}_formatObserver(e){if(e instanceof y.w)return{name:e.toString(),instanceId:this._getObservableInfo(e)?.instanceId};let t=this._getAutorunInfo(e);if(t)return{name:e.toString(),instanceId:t.instanceId}}constructor(){this._declarationId=0,this._instanceId=0,this._declarations=new Map,this._instanceInfos=new WeakMap,this._aliveInstances=new Map,this._activeTransactions=new Set,this._channel=function(e,t){var i;let n,s,o,r=globalThis,a=[],{channel:l,handler:h}=(i={sendNotification:e=>{n?n.sendNotification(e):a.push(e)}},{channel:e=>(o=e,{sendNotification:e=>{i.sendNotification(e)},sendRequest:e=>{throw Error("not supported")}}),handler:{handleRequest:e=>"notification"===e.type?o?.handleNotification(e.data):o?.handleRequest(e.data)}});return(r.$$debugValueEditor_debugChannels??(r.$$debugValueEditor_debugChannels={}))[e]=e=>{for(let i of(s=t(),n=e,a))e.sendNotification(i);return a=[],h},eo.createClient(l,()=>{if(!s)throw Error("Not supported");return s})}("observableDevTools",()=>({notifications:{setDeclarationIdFilter:e=>{},logObservableValue:e=>{console.log("logObservableValue",e)},flushUpdates:()=>{this._flushUpdates()},resetUpdates:()=>{this._pendingChanges=null,this._channel.api.notifications.handleChange(this._fullState,!0)}},requests:{getDeclarations:()=>{let e={};for(let t of this._declarations.values())e[t.id]=t;return{decls:e}},getSummarizedInstances:()=>null,getObservableValueInfo:e=>({observers:[...this._aliveInstances.get(e).debugGetObservers()].map(e=>this._formatObserver(e)).filter(ea.O9)}),getDerivedInfo:e=>{let t=this._aliveInstances.get(e);return{dependencies:[...t.debugGetState().dependencies].map(e=>this._formatObservable(e)).filter(ea.O9),observers:[...t.debugGetObservers()].map(e=>this._formatObserver(e)).filter(ea.O9)}},getAutorunInfo:e=>({dependencies:[...this._aliveInstances.get(e).debugGetState().dependencies].map(e=>this._formatObservable(e)).filter(ea.O9)}),getTransactionState:()=>this.getTransactionState(),setValue:(e,t)=>{let i=this._aliveInstances.get(e);if(i instanceof y.w)i.debugSetValue(t);else if(i instanceof c)i.debugSetValue(t);else if(i instanceof P)i.debugSetValue(t);else throw new E.D7("Observable is not supported");let n=[...i.debugGetObservers()];for(let e of n)e.beginUpdate(i);for(let e of n)e.handleChange(i,void 0);for(let e of n)e.endUpdate(i)},getValue:e=>{let t=this._aliveInstances.get(e);return t instanceof y.w||t instanceof c?es(t.debugGetState().value,200):void 0},logValue:e=>{let t=this._aliveInstances.get(e);if(t&&"get"in t)console.log("Logged Value:",t.get());else throw new E.D7("Observable is not supported")},rerun:e=>{let t=this._aliveInstances.get(e);if(t instanceof y.w)t.debugRecompute();else if(t instanceof f)t.debugRerun();else throw new E.D7("Observable is not supported")}}})),this._pendingChanges=null,this._changeThrottler=new er,this._fullState={},this._flushUpdates=()=>{null!==this._pendingChanges&&(this._channel.api.notifications.handleChange(this._pendingChanges,!1),this._pendingChanges=null)},h.j.enable()}_handleChange(e){!function e(t,i){for(let n in i)null===i[n]?delete t[n]:t[n]&&"object"==typeof t[n]&&i[n]&&"object"==typeof i[n]?e(t[n],i[n]):t[n]=i[n]}(this._fullState,e),null===this._pendingChanges?this._pendingChanges=e:function e(t,i){for(let n in i)t[n]&&"object"==typeof t[n]&&i[n]&&"object"==typeof i[n]?e(t[n],i[n]):t[n]=i[n]}(this._pendingChanges,e),this._changeThrottler.throttle(this._flushUpdates,10)}_getDeclarationId(e,t){if(!t)return -1;let i=this._declarations.get(t.id);return void 0===i&&(i={id:this._declarationId++,type:e,url:t.fileName,line:t.line,column:t.column},this._declarations.set(t.id,i),this._handleChange({decls:{[i.id]:i}})),i.id}handleObservableCreated(e,t){let i={declarationId:this._getDeclarationId("observable/value",t),instanceId:this._instanceId++,listenerCount:0,lastValue:void 0,updateCount:0,changedObservables:new Set};this._instanceInfos.set(e,i)}handleOnListenerCountChanged(e,t){let i=this._getObservableInfo(e);if(i){if(0===i.listenerCount&&t>0){let t=e instanceof y.w?"observable/derived":"observable/value";this._aliveInstances.set(i.instanceId,e),this._handleChange({instances:{[i.instanceId]:{instanceId:i.instanceId,declarationId:i.declarationId,formattedValue:i.lastValue,type:t,name:e.debugName}}})}else i.listenerCount>0&&0===t&&(this._handleChange({instances:{[i.instanceId]:null}}),this._aliveInstances.delete(i.instanceId));i.listenerCount=t}}handleObservableUpdated(e,t){if(e instanceof y.w)return void this._handleDerivedRecomputed(e,t);let i=this._getObservableInfo(e);i&&t.didChange&&(i.lastValue=es(t.newValue,30),i.listenerCount>0&&this._handleChange({instances:{[i.instanceId]:{formattedValue:i.lastValue}}}))}handleAutorunCreated(e,t){let i={declarationId:this._getDeclarationId("autorun",t),instanceId:this._instanceId++,updateCount:0,changedObservables:new Set};this._instanceInfos.set(e,i),this._aliveInstances.set(i.instanceId,e),i&&this._handleChange({instances:{[i.instanceId]:{instanceId:i.instanceId,declarationId:i.declarationId,runCount:0,type:"autorun",name:e.debugName}}})}handleAutorunDisposed(e){let t=this._getAutorunInfo(e);t&&(this._handleChange({instances:{[t.instanceId]:null}}),this._instanceInfos.delete(e),this._aliveInstances.delete(t.instanceId))}handleAutorunDependencyChanged(e,t,i){let n=this._getAutorunInfo(e);n&&n.changedObservables.add(t)}handleAutorunStarted(e){}handleAutorunFinished(e){let t=this._getAutorunInfo(e);t&&(t.changedObservables.clear(),t.updateCount++,this._handleChange({instances:{[t.instanceId]:{runCount:t.updateCount}}}))}handleDerivedDependencyChanged(e,t,i){let n=this._getObservableInfo(e);n&&n.changedObservables.add(t)}_handleDerivedRecomputed(e,t){let i=this._getObservableInfo(e);if(!i)return;let n=es(t.newValue,30);i.updateCount++,i.changedObservables.clear(),i.lastValue=n,i.listenerCount>0&&this._handleChange({instances:{[i.instanceId]:{formattedValue:n,recomputationCount:i.updateCount}}})}handleDerivedCleared(e){let t=this._getObservableInfo(e);t&&(t.lastValue=void 0,t.changedObservables.clear(),t.listenerCount>0&&this._handleChange({instances:{[t.instanceId]:{formattedValue:void 0}}}))}handleBeginTransaction(e){this._activeTransactions.add(e)}handleEndTransaction(e){this._activeTransactions.delete(e)}}var eh=i(4523);class ed{static from(e,t){if(e instanceof f){let i=e.debugGetState();return new ed(e,t(e.debugName),"autorun",void 0,i.stateStr,Array.from(i.dependencies).map(e=>ed.from(e,t)||ed.unknown(e)))}if(e instanceof y.w){let i=e.debugGetState();return new ed(e,t(e.debugName),"derived",i.value,i.stateStr,Array.from(i.dependencies).map(e=>ed.from(e,t)||ed.unknown(e)))}if(e instanceof c){let i=e.debugGetState();return new ed(e,t(e.debugName),"observableValue",i.value,"upToDate",[])}if(e instanceof P){let i=e.debugGetState();return new ed(e,t(e.debugName),"fromEvent",i.value,i.hasValue?"upToDate":"initial",[])}}static unknown(e){return new ed(e,"(unknown)","unknown",void 0,"unknown",[])}constructor(e,t,i,n,s,o){this.sourceObj=e,this.name=t,this.type=i,this.value=n,this.state=s,this.dependencies=o}}(0,a.u5)(function(e,t){let i=t?.debugNamePostProcessor??(e=>e),n=ed.from(e,i);return n?(function e(t,i,n){let s=" ".repeat(i),o=[];if(n.has(t.sourceObj))return o.push(`${s}* ${t.type} ${t.name} (already listed)`),o.join("\n");if(n.add(t.sourceObj),o.push(`${s}* ${t.type} ${t.name}:`),o.push(`${s} value: ${es(t.value,50)}`),o.push(`${s} state: ${t.state}`),t.dependencies.length>0)for(let r of(o.push(`${s} dependencies:`),t.dependencies))o.push(e(r,i+1,n));return o.join("\n")})(n,0,new Set).trim():""}),(0,l.YQ)(function(e){n||(n=new ee,(0,l.EJ)(n)),n.addFilteredObj(e)}),eh._K&&eh._K.VSCODE_DEV_DEBUG_OBSERVABLES&&(0,l.EJ)(el.getInstance())},77133:(e,t,i)=>{"use strict";i.d(t,{N:()=>w});var n,s,o=i(87899),r=i(42016),a=i(55354),l=i(49832),h=i(82102),d=i(76946),c=i(27281),u=i(95751),g=i(15957),p=i(22263),m=i(788),f=i(72553),_=i(23047),v=i(993),b=i(25108),C=i(72150);let w=class extends h.jG{static{s=this}static{this._breadcrumbsSourceFactory=(0,d.FY)(s,()=>({dispose(){},getBreadcrumbItems:(e,t)=>[]}))}static setBreadcrumbsSourceFactory(e){this._breadcrumbsSourceFactory.set(e,void 0)}get isUpdatingHiddenAreas(){return this._isUpdatingHiddenAreas}constructor(e,t,i,n){super(),this._editors=e,this._diffModel=t,this._options=i,this._instantiationService=n,this._modifiedOutlineSource=(0,d.a0)(this,e=>{let t=this._editors.modifiedModel.read(e),i=s._breadcrumbsSourceFactory.read(e);return t&&i?i(t,this._instantiationService):void 0}),this._isUpdatingHiddenAreas=!1,this._register(this._editors.original.onDidChangeCursorPosition(e=>{if(1===e.reason)return;let t=this._diffModel.get();(0,d.Rn)(e=>{for(let i of this._editors.original.getSelections()||[])t?.ensureOriginalLineIsVisible(i.getStartPosition().lineNumber,0,e),t?.ensureOriginalLineIsVisible(i.getEndPosition().lineNumber,0,e)})})),this._register(this._editors.modified.onDidChangeCursorPosition(e=>{if(1===e.reason)return;let t=this._diffModel.get();(0,d.Rn)(e=>{for(let i of this._editors.modified.getSelections()||[])t?.ensureModifiedLineIsVisible(i.getStartPosition().lineNumber,0,e),t?.ensureModifiedLineIsVisible(i.getEndPosition().lineNumber,0,e)})}));let o=this._diffModel.map((e,t)=>{let i=e?.unchangedRegions.read(t)??[];return 1===i.length&&1===i[0].modifiedLineNumber&&i[0].lineCount===this._editors.modifiedModel.read(t)?.getLineCount()?[]:i});this.viewZones=(0,d.un)(this,e=>{let t=this._modifiedOutlineSource.read(e);if(!t)return{origViewZones:[],modViewZones:[]};let i=[],n=[],s=this._options.renderSideBySide.read(e),r=this._options.compactMode.read(e),a=o.read(e);for(let o=0;o<a.length;o++){let l=a[o];if(!l.shouldHideControls(e)&&(!r||0!==o&&o!==a.length-1))if(r){{let t=(0,d.un)(this,e=>l.getHiddenOriginalRange(e).startLineNumber-1),n=new C.D1(t,12);i.push(n),e.store.add(new y(this._editors.original,n,l,!s))}{let t=(0,d.un)(this,e=>l.getHiddenModifiedRange(e).startLineNumber-1),i=new C.D1(t,12);n.push(i),e.store.add(new y(this._editors.modified,i,l))}}else{{let n=(0,d.un)(this,e=>l.getHiddenOriginalRange(e).startLineNumber-1),o=new C.D1(n,24);i.push(o),e.store.add(new S(this._editors.original,o,l,l.originalUnchangedRange,!s,t,e=>this._diffModel.get().ensureModifiedLineIsVisible(e,2,void 0),this._options))}{let i=(0,d.un)(this,e=>l.getHiddenModifiedRange(e).startLineNumber-1),s=new C.D1(i,24);n.push(s),e.store.add(new S(this._editors.modified,s,l,l.modifiedUnchangedRange,!1,t,e=>this._diffModel.get().ensureModifiedLineIsVisible(e,2,void 0),this._options))}}}return{origViewZones:i,modViewZones:n}});let r={description:"unchanged lines",className:"diff-unchanged-lines",isWholeLine:!0},h={description:"Fold Unchanged",glyphMarginHoverMessage:new l.Bc(void 0,{isTrusted:!0,supportThemeIcons:!0}).appendMarkdown((0,g.kg)(121,"Fold Unchanged Region")),glyphMarginClassName:"fold-unchanged "+c.L.asClassName(a.W.fold),zIndex:10001};this._register((0,C.pY)(this._editors.original,(0,d.un)(this,e=>{let t=o.read(e),i=t.map(e=>({range:e.originalUnchangedRange.toInclusiveRange(),options:r}));for(let n of t)n.shouldHideControls(e)&&i.push({range:_.Q.fromPositions(new f.y(n.originalLineNumber,1)),options:h});return i}))),this._register((0,C.pY)(this._editors.modified,(0,d.un)(this,e=>{let t=o.read(e),i=t.map(e=>({range:e.modifiedUnchangedRange.toInclusiveRange(),options:r}));for(let n of t)n.shouldHideControls(e)&&i.push({range:m.M.ofLength(n.modifiedLineNumber,1).toInclusiveRange(),options:h});return i}))),this._register((0,d.fm)(e=>{let t=o.read(e);this._isUpdatingHiddenAreas=!0;try{this._editors.original.setHiddenAreas(t.map(t=>t.getHiddenOriginalRange(e).toInclusiveRange()).filter(u.O9)),this._editors.modified.setHiddenAreas(t.map(t=>t.getHiddenModifiedRange(e).toInclusiveRange()).filter(u.O9))}finally{this._isUpdatingHiddenAreas=!1}})),this._register(this._editors.modified.onMouseUp(e=>{if(!e.event.rightButton&&e.target.position&&e.target.element?.className.includes("fold-unchanged")){let t=e.target.position.lineNumber,i=this._diffModel.get();if(!i)return;let n=i.unchangedRegions.get().find(e=>e.modifiedUnchangedRange.contains(t));n&&(n.collapseAll(void 0),e.event.stopPropagation(),e.event.preventDefault())}})),this._register(this._editors.original.onMouseUp(e=>{if(!e.event.rightButton&&e.target.position&&e.target.element?.className.includes("fold-unchanged")){let t=e.target.position.lineNumber,i=this._diffModel.get();if(!i)return;let n=i.unchangedRegions.get().find(e=>e.originalUnchangedRange.contains(t));n&&(n.collapseAll(void 0),e.event.stopPropagation(),e.event.preventDefault())}}))}};w=s=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([(n=p._Y,function(e,t){n(e,t,3)})],w);class y extends C.uN{constructor(e,t,i,n=!1){let s=(0,o.h)("div.diff-hidden-lines-widget");super(e,t,s.root),this._unchangedRegion=i,this._hide=n,this._nodes=(0,o.h)("div.diff-hidden-lines-compact",[(0,o.h)("div.line-left",[]),(0,o.h)("div.text@text",[]),(0,o.h)("div.line-right",[])]),s.root.appendChild(this._nodes.root),this._hide&&this._nodes.root.replaceChildren(),this._register((0,d.fm)(e=>{if(!this._hide){let t=this._unchangedRegion.getHiddenModifiedRange(e).length,i=(0,g.kg)(122,"{0} hidden lines",t);this._nodes.text.innerText=i}}))}}class S extends C.uN{constructor(e,t,i,n,s,l,h,c){let u=(0,o.h)("div.diff-hidden-lines-widget");super(e,t,u.root),this._editor=e,this._unchangedRegion=i,this._unchangedRegionRange=n,this._hide=s,this._modifiedOutlineSource=l,this._revealModifiedHiddenLine=h,this._options=c,this._nodes=(0,o.h)("div.diff-hidden-lines",[(0,o.h)("div.top@top",{title:(0,g.kg)(123,"Click or drag to show more above")}),(0,o.h)("div.center@content",{style:{display:"flex"}},[(0,o.h)("div@first",{style:{display:"flex",justifyContent:"center",alignItems:"center",flexShrink:"0"}},[(0,o.$)("a",{title:(0,g.kg)(124,"Show Unchanged Region"),role:"button",onclick:()=>{this._unchangedRegion.showAll(void 0)}},...(0,r.n)("$(unfold)"))]),(0,o.h)("div@others",{style:{display:"flex",justifyContent:"center",alignItems:"center"}})]),(0,o.h)("div.bottom@bottom",{title:(0,g.kg)(125,"Click or drag to show more below"),role:"button"})]),u.root.appendChild(this._nodes.root),this._hide?(0,o.Ln)(this._nodes.first):this._register((0,C.AV)(this._nodes.first,{width:(0,b.U)(this._editor).layoutInfoContentLeft})),this._register((0,d.fm)(e=>{let t=this._unchangedRegion.visibleLineCountTop.read(e)+this._unchangedRegion.visibleLineCountBottom.read(e)===this._unchangedRegion.lineCount;this._nodes.bottom.classList.toggle("canMoveTop",!t),this._nodes.bottom.classList.toggle("canMoveBottom",this._unchangedRegion.visibleLineCountBottom.read(e)>0),this._nodes.top.classList.toggle("canMoveTop",this._unchangedRegion.visibleLineCountTop.read(e)>0),this._nodes.top.classList.toggle("canMoveBottom",!t);let i=this._unchangedRegion.isDragged.read(e),n=this._editor.getDomNode();n&&(n.classList.toggle("draggingUnchangedRegion",!!i),"top"===i?(n.classList.toggle("canMoveTop",this._unchangedRegion.visibleLineCountTop.read(e)>0),n.classList.toggle("canMoveBottom",!t)):"bottom"===i?(n.classList.toggle("canMoveTop",!t),n.classList.toggle("canMoveBottom",this._unchangedRegion.visibleLineCountBottom.read(e)>0)):(n.classList.toggle("canMoveTop",!1),n.classList.toggle("canMoveBottom",!1)))}));let p=this._editor;this._register((0,o.ko)(this._nodes.top,"mousedown",e=>{if(0!==e.button)return;this._nodes.top.classList.toggle("dragging",!0),this._nodes.root.classList.toggle("dragging",!0),e.preventDefault();let t=e.clientY,i=!1,n=this._unchangedRegion.visibleLineCountTop.get();this._unchangedRegion.isDragged.set("top",void 0);let s=(0,o.zk)(this._nodes.top),r=(0,o.ko)(s,"mousemove",e=>{let s=e.clientY-t;i=i||Math.abs(s)>2;let o=Math.max(0,Math.min(n+Math.round(s/p.getOption(75)),this._unchangedRegion.getMaxVisibleLineCountTop()));this._unchangedRegion.visibleLineCountTop.set(o,void 0)}),a=(0,o.ko)(s,"mouseup",e=>{i||this._unchangedRegion.showMoreAbove(this._options.hideUnchangedRegionsRevealLineCount.get(),void 0),this._nodes.top.classList.toggle("dragging",!1),this._nodes.root.classList.toggle("dragging",!1),this._unchangedRegion.isDragged.set(void 0,void 0),r.dispose(),a.dispose()})})),this._register((0,o.ko)(this._nodes.bottom,"mousedown",e=>{if(0!==e.button)return;this._nodes.bottom.classList.toggle("dragging",!0),this._nodes.root.classList.toggle("dragging",!0),e.preventDefault();let t=e.clientY,i=!1,n=this._unchangedRegion.visibleLineCountBottom.get();this._unchangedRegion.isDragged.set("bottom",void 0);let s=(0,o.zk)(this._nodes.bottom),r=(0,o.ko)(s,"mousemove",e=>{let s=e.clientY-t;i=i||Math.abs(s)>2;let o=Math.max(0,Math.min(n-Math.round(s/p.getOption(75)),this._unchangedRegion.getMaxVisibleLineCountBottom())),r=this._unchangedRegionRange.endLineNumberExclusive>p.getModel().getLineCount()?p.getContentHeight():p.getTopForLineNumber(this._unchangedRegionRange.endLineNumberExclusive);this._unchangedRegion.visibleLineCountBottom.set(o,void 0);let a=this._unchangedRegionRange.endLineNumberExclusive>p.getModel().getLineCount()?p.getContentHeight():p.getTopForLineNumber(this._unchangedRegionRange.endLineNumberExclusive);p.setScrollTop(p.getScrollTop()+(a-r))}),a=(0,o.ko)(s,"mouseup",e=>{if(this._unchangedRegion.isDragged.set(void 0,void 0),!i){let e=p.getTopForLineNumber(this._unchangedRegionRange.endLineNumberExclusive);this._unchangedRegion.showMoreBelow(this._options.hideUnchangedRegionsRevealLineCount.get(),void 0);let t=p.getTopForLineNumber(this._unchangedRegionRange.endLineNumberExclusive);p.setScrollTop(p.getScrollTop()+(t-e))}this._nodes.bottom.classList.toggle("dragging",!1),this._nodes.root.classList.toggle("dragging",!1),r.dispose(),a.dispose()})})),this._register((0,d.fm)(e=>{let t=[];if(!this._hide){let n=i.getHiddenModifiedRange(e).length,s=(0,g.kg)(126,"{0} hidden lines",n),l=(0,o.$)("span",{title:(0,g.kg)(127,"Double click to unfold")},s);l.addEventListener("dblclick",e=>{0===e.button&&(e.preventDefault(),this._unchangedRegion.showAll(void 0))}),t.push(l);let h=this._unchangedRegion.getHiddenModifiedRange(e),d=this._modifiedOutlineSource.getBreadcrumbItems(h,e);if(d.length>0){t.push((0,o.$)("span",void 0,"\xa0\xa0|\xa0\xa0"));for(let e=0;e<d.length;e++){let i=d[e],n=v.gP.toIcon(i.kind),s=(0,o.h)("div.breadcrumb-item",{style:{display:"flex",alignItems:"center"}},[(0,r.s)(n),"\xa0",i.name,...e===d.length-1?[]:[(0,r.s)(a.W.chevronRight)]]).root;t.push(s),s.onclick=()=>{this._revealModifiedHiddenLine(i.startLineNumber)}}}}(0,o.Ln)(this._nodes.others,...t)}))}}},77165:(e,t,i)=>{"use strict";i.d(t,{ur:()=>k,uO:()=>I});var n=i(73589),s=i(87899),o=i(88723),r=i(87460),a=i(78271),l=i(5488),h=i(45262),d=i(99136),c=i(17354),u=i(82102),g=i(99323),p=i(56487);function m(e,t){let i=[];for(let n of t){if(e.start>=n.range.end)continue;if(e.end<n.range.start)break;let t=g.Q.intersect(e,n.range);g.Q.isEmpty(t)||i.push({range:t,size:n.size})}return i}function f({start:e,end:t},i){return{start:e+i,end:t+i}}class _{get paddingTop(){return this._paddingTop}set paddingTop(e){this._size=this._size+e-this._paddingTop,this._paddingTop=e}constructor(e){this.groups=[],this._size=0,this._paddingTop=0,this._paddingTop=e??0,this._size=this._paddingTop}splice(e,t,i=[]){let n=i.length-t,s=m({start:0,end:e},this.groups),o=m({start:e+t,end:1/0},this.groups).map(e=>({range:f(e.range,n),size:e.size})),r=i.map((t,i)=>({range:{start:e+i,end:e+i+1},size:t.size}));this.groups=function(...e){return function(e){let t=[],i=null;for(let n of e){let e=n.range.start,s=n.range.end,o=n.size;if(i&&o===i.size){i.range.end=s;continue}i={range:{start:e,end:s},size:o},t.push(i)}return t}(e.reduce((e,t)=>e.concat(t),[]))}(s,r,o),this._size=this._paddingTop+this.groups.reduce((e,t)=>e+t.size*(t.range.end-t.range.start),0)}get count(){let e=this.groups.length;return e?this.groups[e-1].range.end:0}get size(){return this._size}indexAt(e){if(e<0)return -1;if(e<this._paddingTop)return 0;let t=0,i=this._paddingTop;for(let n of this.groups){let s=n.range.end-n.range.start,o=i+s*n.size;if(e<o)return t+Math.floor((e-i)/n.size);t+=s,i=o}return t}indexAfter(e){return Math.min(this.indexAt(e)+1,this.count)}positionAt(e){if(e<0)return -1;let t=0,i=0;for(let n of this.groups){let s=n.range.end-n.range.start,o=i+s;if(e<o)return this._paddingTop+t+(e-i)*n.size;t+=s*n.size,i=o}return -1}}class v{constructor(e){this.renderers=e,this.cache=new Map,this.transactionNodesPendingRemoval=new Set,this.inTransaction=!1}alloc(e){let t=this.getTemplateCache(e).pop(),i=!1;if(t)(i=this.transactionNodesPendingRemoval.has(t.domNode))&&this.transactionNodesPendingRemoval.delete(t.domNode);else{let i=(0,s.$)(".monaco-list-row"),n=this.getRenderer(e).renderTemplate(i);t={domNode:i,templateId:e,templateData:n}}return{row:t,isReusingConnectedDomNode:i}}release(e){e&&this.releaseRow(e)}transact(e){if(this.inTransaction)throw Error("Already in transaction");this.inTransaction=!0;try{e()}finally{for(let e of this.transactionNodesPendingRemoval)this.doRemoveNode(e);this.transactionNodesPendingRemoval.clear(),this.inTransaction=!1}}releaseRow(e){let{domNode:t,templateId:i}=e;t&&(this.inTransaction?this.transactionNodesPendingRemoval.add(t):this.doRemoveNode(t)),this.getTemplateCache(i).push(e)}doRemoveNode(e){e.classList.remove("scrolling"),e.remove()}getTemplateCache(e){let t=this.cache.get(e);return t||(t=[],this.cache.set(e,t)),t}dispose(){this.cache.forEach((e,t)=>{for(let i of e)this.getRenderer(t).disposeTemplate(i.templateData),i.templateData=null}),this.cache.clear(),this.transactionNodesPendingRemoval.clear()}getRenderer(e){let t=this.renderers.get(e);if(!t)throw Error(`No renderer found for ${e}`);return t}}var b=i(6033),C=i(64124);i(87130);var w=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r};let y={CurrentDragAndDropData:void 0},S={useShadows:!0,verticalScrollMode:1,setRowLineHeight:!0,setRowHeight:!0,supportDynamicHeights:!1,dnd:{getDragElements:e=>[e],getDragURI:()=>null,onDragStart(){},onDragOver:()=>!1,drop(){},dispose(){}},horizontalScrolling:!1,transformOptimization:!0,alwaysConsumeMouseWheel:!0};class k{constructor(e){this.elements=e}update(){}getData(){return this.elements}}class x{constructor(e){this.elements=e}update(){}getData(){return this.elements}}class L{constructor(){this.types=[],this.files=[]}update(e){if(e.types&&this.types.splice(0,this.types.length,...e.types),e.files){this.files.splice(0,this.files.length);for(let t=0;t<e.files.length;t++){let i=e.files.item(t);i&&(i.size||i.type)&&this.files.push(i)}}}getData(){return{types:this.types,files:this.files}}}class D{constructor(e){e?.getSetSize?this.getSetSize=e.getSetSize.bind(e):this.getSetSize=(e,t,i)=>i,e?.getPosInSet?this.getPosInSet=e.getPosInSet.bind(e):this.getPosInSet=(e,t)=>t+1,e?.getRole?this.getRole=e.getRole.bind(e):this.getRole=e=>"listitem",e?.isChecked?this.isChecked=e.isChecked.bind(e):this.isChecked=e=>void 0}}class I{static{this.InstanceCount=0}get contentHeight(){return this.rangeMap.size}get onDidScroll(){return this.scrollableElement.onScroll}get scrollableElementDomNode(){return this.scrollableElement.getDomNode()}get horizontalScrolling(){return this._horizontalScrolling}set horizontalScrolling(e){if(e!==this._horizontalScrolling){if(e&&this.supportDynamicHeights)throw Error("Horizontal scrolling and dynamic heights not supported simultaneously");if(this._horizontalScrolling=e,this.domNode.classList.toggle("horizontal-scrolling",this._horizontalScrolling),this._horizontalScrolling){for(let e of this.items)this.measureItemWidth(e);this.updateScrollWidth(),this.scrollableElement.setScrollDimensions({width:(0,s.y6)(this.domNode)}),this.rowsContainer.style.width=`${Math.max(this.scrollWidth||0,this.renderWidth)}px`}else this.scrollableElementWidthDelayer.cancel(),this.scrollableElement.setScrollDimensions({width:this.renderWidth,scrollWidth:this.renderWidth}),this.rowsContainer.style.width=""}}constructor(e,t,i,n=S){if(this.virtualDelegate=t,this.domId=`list_id_${++I.InstanceCount}`,this.renderers=new Map,this.renderWidth=0,this._scrollHeight=0,this.scrollableElementUpdateDisposable=null,this.scrollableElementWidthDelayer=new h.ve(50),this.splicing=!1,this.dragOverAnimationStopDisposable=u.jG.None,this.dragOverMouseY=0,this.canDrop=!1,this.currentDragFeedbackDisposable=u.jG.None,this.onDragLeaveTimeout=u.jG.None,this.currentSelectionDisposable=u.jG.None,this.disposables=new u.Cm,this._onDidChangeContentHeight=new c.vl,this._onDidChangeContentWidth=new c.vl,this.onDidChangeContentHeight=c.Jh.latch(this._onDidChangeContentHeight.event,void 0,this.disposables),this._horizontalScrolling=!1,n.horizontalScrolling&&n.supportDynamicHeights)throw Error("Horizontal scrolling and dynamic heights not supported simultaneously");for(let e of(this.items=[],this.itemId=0,this.rangeMap=this.createRangeMap(n.paddingTop??0),i))this.renderers.set(e.templateId,e);if(this.cache=this.disposables.add(new v(this.renderers)),this.lastRenderTop=0,this.lastRenderHeight=0,this.domNode=document.createElement("div"),this.domNode.className="monaco-list",this.domNode.classList.add(this.domId),this.domNode.tabIndex=0,this.domNode.classList.toggle("mouse-support","boolean"!=typeof n.mouseSupport||n.mouseSupport),this._horizontalScrolling=n.horizontalScrolling??S.horizontalScrolling,this.domNode.classList.toggle("horizontal-scrolling",this._horizontalScrolling),this.paddingBottom=void 0===n.paddingBottom?0:n.paddingBottom,this.accessibilityProvider=new D(n.accessibilityProvider),this.rowsContainer=document.createElement("div"),this.rowsContainer.className="monaco-list-rows",(n.transformOptimization??S.transformOptimization)&&(this.rowsContainer.style.transform="translate3d(0px, 0px, 0px)",this.rowsContainer.style.overflow="hidden",this.rowsContainer.style.contain="strict"),this.disposables.add(r.q.addTarget(this.rowsContainer)),this.scrollable=this.disposables.add(new p.yE({forceIntegerValues:!0,smoothScrollDuration:125*!!n.smoothScrolling,scheduleAtNextAnimationFrame:e=>(0,s.PG)((0,s.zk)(this.domNode),e)})),this.scrollableElement=this.disposables.add(new a.oO(this.rowsContainer,{alwaysConsumeMouseWheel:n.alwaysConsumeMouseWheel??S.alwaysConsumeMouseWheel,horizontal:1,vertical:n.verticalScrollMode??S.verticalScrollMode,useShadows:n.useShadows??S.useShadows,mouseWheelScrollSensitivity:n.mouseWheelScrollSensitivity,fastScrollSensitivity:n.fastScrollSensitivity,scrollByPage:n.scrollByPage},this.scrollable)),this.domNode.appendChild(this.scrollableElement.getDomNode()),e.appendChild(this.domNode),this.scrollableElement.onScroll(this.onScroll,this,this.disposables),this.disposables.add((0,s.ko)(this.rowsContainer,r.B.Change,e=>this.onTouchChange(e))),this.disposables.add((0,s.ko)(this.scrollableElement.getDomNode(),"scroll",e=>{let t=e.target,i=t.scrollTop;t.scrollTop=0,n.scrollToActiveElement&&this.setScrollTop(this.scrollTop+i)})),this.disposables.add((0,s.ko)(this.domNode,"dragover",e=>this.onDragOver(this.toDragEvent(e)))),this.disposables.add((0,s.ko)(this.domNode,"drop",e=>this.onDrop(this.toDragEvent(e)))),this.disposables.add((0,s.ko)(this.domNode,"dragleave",e=>this.onDragLeave(this.toDragEvent(e)))),this.disposables.add((0,s.ko)(this.domNode,"dragend",e=>this.onDragEnd(e))),n.userSelection){if(n.dnd)throw Error("DND and user selection cannot be used simultaneously");this.disposables.add((0,s.ko)(this.domNode,"mousedown",e=>this.onPotentialSelectionStart(e)))}this.setRowLineHeight=n.setRowLineHeight??S.setRowLineHeight,this.setRowHeight=n.setRowHeight??S.setRowHeight,this.supportDynamicHeights=n.supportDynamicHeights??S.supportDynamicHeights,this.dnd=n.dnd??this.disposables.add(S.dnd),this.layout(n.initialSize?.height,n.initialSize?.width),n.scrollToActiveElement&&this._setupFocusObserver(e)}_setupFocusObserver(e){this.disposables.add((0,s.ko)(e,"focus",()=>{let t=(0,s.bq)();this.activeElement!==t&&null!==t&&(this.activeElement=t,this._scrollToActiveElement(this.activeElement,e))},!0))}_scrollToActiveElement(e,t){let i=t.getBoundingClientRect(),n=e.getBoundingClientRect().top-i.top;n<0&&this.setScrollTop(this.scrollTop+n)}updateOptions(e){let t;if(void 0!==e.paddingBottom&&(this.paddingBottom=e.paddingBottom,this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight})),void 0!==e.smoothScrolling&&this.scrollable.setSmoothScrollDuration(125*!!e.smoothScrolling),void 0!==e.horizontalScrolling&&(this.horizontalScrolling=e.horizontalScrolling),void 0!==e.scrollByPage&&(t={...t??{},scrollByPage:e.scrollByPage}),void 0!==e.mouseWheelScrollSensitivity&&(t={...t??{},mouseWheelScrollSensitivity:e.mouseWheelScrollSensitivity}),void 0!==e.fastScrollSensitivity&&(t={...t??{},fastScrollSensitivity:e.fastScrollSensitivity}),t&&this.scrollableElement.updateOptions(t),void 0!==e.paddingTop&&e.paddingTop!==this.rangeMap.paddingTop){let t=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),i=e.paddingTop-this.rangeMap.paddingTop;this.rangeMap.paddingTop=e.paddingTop,this.render(t,Math.max(0,this.lastRenderTop+i),this.lastRenderHeight,void 0,void 0,!0),this.setScrollTop(this.lastRenderTop),this.eventuallyUpdateScrollDimensions(),this.supportDynamicHeights&&this._rerender(this.lastRenderTop,this.lastRenderHeight)}}createRangeMap(e){return new _(e)}splice(e,t,i=[]){if(this.splicing)throw Error("Can't run recursive splices.");this.splicing=!0;try{return this._splice(e,t,i)}finally{this.splicing=!1,this._onDidChangeContentHeight.fire(this.contentHeight)}}_splice(e,t,i=[]){let n,s=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),o=g.Q.intersect(s,{start:e,end:e+t}),r=new Map;for(let e=o.end-1;e>=o.start;e--){let t=this.items[e];if(t.dragStartDisposable.dispose(),t.checkedDisposable.dispose(),t.row){let i=r.get(t.templateId);i||(i=[],r.set(t.templateId,i));let n=this.renderers.get(t.templateId);n&&n.disposeElement&&n.disposeElement(t.element,e,t.row.templateData,{height:t.size}),i.unshift(t.row)}t.row=null,t.stale=!0}let a={start:e+t,end:this.items.length},h=g.Q.intersect(a,s),d=g.Q.relativeComplement(a,s),c=i.map(e=>({id:String(this.itemId++),element:e,templateId:this.virtualDelegate.getTemplateId(e),size:this.virtualDelegate.getHeight(e),width:void 0,hasDynamicHeight:!!this.virtualDelegate.hasDynamicHeight&&this.virtualDelegate.hasDynamicHeight(e),lastDynamicHeightWidth:void 0,row:null,uri:void 0,dropTarget:!1,dragStartDisposable:u.jG.None,checkedDisposable:u.jG.None,stale:!1}));0===e&&t>=this.items.length?(this.rangeMap=this.createRangeMap(this.rangeMap.paddingTop),this.rangeMap.splice(0,0,c),n=this.items,this.items=c):(this.rangeMap.splice(e,t,c),n=(0,l.V4)(this.items,e,t,c));let p=i.length-t,m=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),_=f(h,p),v=g.Q.intersect(m,_);for(let e=v.start;e<v.end;e++)this.updateItemInDOM(this.items[e],e);for(let e of g.Q.relativeComplement(_,m))for(let t=e.start;t<e.end;t++)this.removeItemFromDOM(t);let b=d.map(e=>f(e,p));for(let t of[{start:e,end:e+i.length},...b].map(e=>g.Q.intersect(m,e)).reverse())for(let e=t.end-1;e>=t.start;e--){let t=this.items[e],i=r.get(t.templateId),n=i?.pop();this.insertItemInDOM(e,n)}for(let e of r.values())for(let t of e)this.cache.release(t);return this.eventuallyUpdateScrollDimensions(),this.supportDynamicHeights&&this._rerender(this.scrollTop,this.renderHeight),n.map(e=>e.element)}eventuallyUpdateScrollDimensions(){this._scrollHeight=this.contentHeight,this.rowsContainer.style.height=`${this._scrollHeight}px`,this.scrollableElementUpdateDisposable||(this.scrollableElementUpdateDisposable=(0,s.PG)((0,s.zk)(this.domNode),()=>{this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight}),this.updateScrollWidth(),this.scrollableElementUpdateDisposable=null}))}eventuallyUpdateScrollWidth(){if(!this.horizontalScrolling)return void this.scrollableElementWidthDelayer.cancel();this.scrollableElementWidthDelayer.trigger(()=>this.updateScrollWidth())}updateScrollWidth(){if(!this.horizontalScrolling)return;let e=0;for(let t of this.items)void 0!==t.width&&(e=Math.max(e,t.width));this.scrollWidth=e,this.scrollableElement.setScrollDimensions({scrollWidth:0===e?0:e+10}),this._onDidChangeContentWidth.fire(this.scrollWidth)}rerender(){if(this.supportDynamicHeights){for(let e of this.items)e.lastDynamicHeightWidth=void 0;this._rerender(this.lastRenderTop,this.lastRenderHeight)}}get length(){return this.items.length}get renderHeight(){return this.scrollableElement.getScrollDimensions().height}get firstVisibleIndex(){return this.getVisibleRange(this.lastRenderTop,this.lastRenderHeight).start}element(e){return this.items[e].element}indexOf(e){return this.items.findIndex(t=>t.element===e)}domElement(e){let t=this.items[e].row;return t&&t.domNode}elementHeight(e){return this.items[e].size}elementTop(e){return this.rangeMap.positionAt(e)}indexAt(e){return this.rangeMap.indexAt(e)}indexAfter(e){return this.rangeMap.indexAfter(e)}layout(e,t){let i={height:"number"==typeof e?e:(0,s.H4)(this.domNode)};this.scrollableElementUpdateDisposable&&(this.scrollableElementUpdateDisposable.dispose(),this.scrollableElementUpdateDisposable=null,i.scrollHeight=this.scrollHeight),this.scrollableElement.setScrollDimensions(i),void 0!==t&&(this.renderWidth=t,this.supportDynamicHeights&&this._rerender(this.scrollTop,this.renderHeight)),this.horizontalScrolling&&this.scrollableElement.setScrollDimensions({width:"number"==typeof t?t:(0,s.y6)(this.domNode)})}render(e,t,i,n,s,o=!1,r=!1){let a=this.getRenderRange(t,i),l=g.Q.relativeComplement(a,e).reverse(),h=g.Q.relativeComplement(e,a);if(o){let t=g.Q.intersect(e,a);for(let e=t.start;e<t.end;e++)this.updateItemInDOM(this.items[e],e)}this.cache.transact(()=>{for(let e of h)for(let t=e.start;t<e.end;t++)this.removeItemFromDOM(t,r);for(let e of l)for(let t=e.end-1;t>=e.start;t--)this.insertItemInDOM(t)}),void 0!==n&&(this.rowsContainer.style.left=`-${n}px`),this.rowsContainer.style.top=`-${t}px`,this.horizontalScrolling&&void 0!==s&&(this.rowsContainer.style.width=`${Math.max(s,this.renderWidth)}px`),this.lastRenderTop=t,this.lastRenderHeight=i}insertItemInDOM(e,t){let i=this.items[e];if(!i.row)if(t)i.row=t,i.stale=!0;else{let e=this.cache.alloc(i.templateId);i.row=e.row,i.stale||=e.isReusingConnectedDomNode}let n=this.accessibilityProvider.getRole(i.element)||"listitem";i.row.domNode.setAttribute("role",n);let o=this.accessibilityProvider.isChecked(i.element);if("boolean"==typeof o)i.row.domNode.setAttribute("aria-checked",String(!!o));else if(o){let e=e=>i.row.domNode.setAttribute("aria-checked",String(!!e));e(o.value),i.checkedDisposable=o.onDidChange(()=>e(o.value))}if(i.stale||!i.row.domNode.parentElement){let t=this.items.at(e+1)?.row?.domNode??null;(i.row.domNode.parentElement!==this.rowsContainer||i.row.domNode.nextElementSibling!==t)&&this.rowsContainer.insertBefore(i.row.domNode,t),i.stale=!1}this.updateItemInDOM(i,e);let r=this.renderers.get(i.templateId);if(!r)throw Error(`No renderer found for template id ${i.templateId}`);r?.renderElement(i.element,e,i.row.templateData,{height:i.size});let a=this.dnd.getDragURI(i.element);i.dragStartDisposable.dispose(),i.row.domNode.draggable=!!a,a&&(i.dragStartDisposable=(0,s.ko)(i.row.domNode,"dragstart",e=>this.onDragStart(i.element,a,e))),this.horizontalScrolling&&(this.measureItemWidth(i),this.eventuallyUpdateScrollWidth())}measureItemWidth(e){if(!e.row||!e.row.domNode)return;e.row.domNode.style.width="fit-content",e.width=(0,s.y6)(e.row.domNode);let t=(0,s.zk)(e.row.domNode).getComputedStyle(e.row.domNode);t.paddingLeft&&(e.width+=parseFloat(t.paddingLeft)),t.paddingRight&&(e.width+=parseFloat(t.paddingRight)),e.row.domNode.style.width=""}updateItemInDOM(e,t){e.row.domNode.style.top=`${this.elementTop(t)}px`,this.setRowHeight&&(e.row.domNode.style.height=`${e.size}px`),this.setRowLineHeight&&(e.row.domNode.style.lineHeight=`${e.size}px`),e.row.domNode.setAttribute("data-index",`${t}`),e.row.domNode.setAttribute("data-last-element",t===this.length-1?"true":"false"),e.row.domNode.setAttribute("data-parity",t%2==0?"even":"odd"),e.row.domNode.setAttribute("aria-setsize",String(this.accessibilityProvider.getSetSize(e.element,t,this.length))),e.row.domNode.setAttribute("aria-posinset",String(this.accessibilityProvider.getPosInSet(e.element,t))),e.row.domNode.setAttribute("id",this.getElementDomId(t)),e.row.domNode.classList.toggle("drop-target",e.dropTarget)}removeItemFromDOM(e,t){let i=this.items[e];if(i.dragStartDisposable.dispose(),i.checkedDisposable.dispose(),i.row){let n=this.renderers.get(i.templateId);n&&n.disposeElement&&n.disposeElement(i.element,e,i.row.templateData,{height:i.size,onScroll:t}),this.cache.release(i.row),i.row=null}this.horizontalScrolling&&this.eventuallyUpdateScrollWidth()}getScrollTop(){return this.scrollableElement.getScrollPosition().scrollTop}setScrollTop(e,t){this.scrollableElementUpdateDisposable&&(this.scrollableElementUpdateDisposable.dispose(),this.scrollableElementUpdateDisposable=null,this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight})),this.scrollableElement.setScrollPosition({scrollTop:e,reuseAnimation:t})}get scrollTop(){return this.getScrollTop()}set scrollTop(e){this.setScrollTop(e)}get scrollHeight(){return this._scrollHeight+10*!!this.horizontalScrolling+this.paddingBottom}get onMouseClick(){return c.Jh.map(this.disposables.add(new o.f(this.domNode,"click")).event,e=>this.toMouseEvent(e),this.disposables)}get onMouseDblClick(){return c.Jh.map(this.disposables.add(new o.f(this.domNode,"dblclick")).event,e=>this.toMouseEvent(e),this.disposables)}get onMouseMiddleClick(){return c.Jh.filter(c.Jh.map(this.disposables.add(new o.f(this.domNode,"auxclick")).event,e=>this.toMouseEvent(e),this.disposables),e=>1===e.browserEvent.button,this.disposables)}get onMouseDown(){return c.Jh.map(this.disposables.add(new o.f(this.domNode,"mousedown")).event,e=>this.toMouseEvent(e),this.disposables)}get onMouseOver(){return c.Jh.map(this.disposables.add(new o.f(this.domNode,"mouseover")).event,e=>this.toMouseEvent(e),this.disposables)}get onMouseOut(){return c.Jh.map(this.disposables.add(new o.f(this.domNode,"mouseout")).event,e=>this.toMouseEvent(e),this.disposables)}get onContextMenu(){return c.Jh.any(c.Jh.map(this.disposables.add(new o.f(this.domNode,"contextmenu")).event,e=>this.toMouseEvent(e),this.disposables),c.Jh.map(this.disposables.add(new o.f(this.domNode,r.B.Contextmenu)).event,e=>this.toGestureEvent(e),this.disposables))}get onTouchStart(){return c.Jh.map(this.disposables.add(new o.f(this.domNode,"touchstart")).event,e=>this.toTouchEvent(e),this.disposables)}get onTap(){return c.Jh.map(this.disposables.add(new o.f(this.rowsContainer,r.B.Tap)).event,e=>this.toGestureEvent(e),this.disposables)}toMouseEvent(e){let t=this.getItemIndexFromEventTarget(e.target||null),i=void 0===t?void 0:this.items[t];return{browserEvent:e,index:t,element:i&&i.element}}toTouchEvent(e){let t=this.getItemIndexFromEventTarget(e.target||null),i=void 0===t?void 0:this.items[t];return{browserEvent:e,index:t,element:i&&i.element}}toGestureEvent(e){let t=this.getItemIndexFromEventTarget(e.initialTarget||null),i=void 0===t?void 0:this.items[t];return{browserEvent:e,index:t,element:i&&i.element}}toDragEvent(e){let t=this.getItemIndexFromEventTarget(e.target||null),i=void 0===t?void 0:this.items[t],n=i&&i.element,s=this.getTargetSector(e,t);return{browserEvent:e,index:t,element:n,sector:s}}onScroll(e){try{let t=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight);this.render(t,e.scrollTop,e.height,e.scrollLeft,e.scrollWidth,void 0,!0),this.supportDynamicHeights&&this._rerender(e.scrollTop,e.height,e.inSmoothScrolling)}catch(t){throw console.error("Got bad scroll event:",e),t}}onTouchChange(e){e.preventDefault(),e.stopPropagation(),this.scrollTop-=e.translationY}onDragStart(e,t,i){let o;if(!i.dataTransfer)return;let r=this.dnd.getDragElements(e);i.dataTransfer.effectAllowed="copyMove",i.dataTransfer.setData(n.t.TEXT,t),this.dnd.getDragLabel&&(o=this.dnd.getDragLabel(r,i)),void 0===o&&(o=String(r.length)),function(e,t,i,n=[]){if(!e.dataTransfer)return;let o=(0,s.$)(".monaco-drag-image");o.textContent=i,o.classList.add(...n),(e=>{for(;e&&!e.classList.contains("monaco-workbench");)e=e.parentElement;return e||t.ownerDocument.body})(t).appendChild(o),e.dataTransfer.setDragImage(o,-10,-10),setTimeout(()=>o.remove(),0)}(i,this.domNode,o,[this.domId]),this.domNode.classList.add("dragging"),this.currentDragData=new k(r),y.CurrentDragAndDropData=new x(r),this.dnd.onDragStart?.(this.currentDragData,i)}onPotentialSelectionStart(e){this.currentSelectionDisposable.dispose();let t=(0,s.YE)(this.domNode),i=this.currentSelectionDisposable=new u.Cm,n=i.add(new u.Cm);n.add((0,s.ko)(this.domNode,"selectstart",()=>{n.add((0,s.ko)(t,"mousemove",e=>{t.getSelection()?.isCollapsed===!1&&this.setupDragAndDropScrollTopAnimation(e)})),i.add((0,u.s)(()=>{let e=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight);this.currentSelectionBounds=void 0,this.render(e,this.lastRenderTop,this.lastRenderHeight,void 0,void 0)})),i.add((0,s.ko)(t,"selectionchange",()=>{let e=t.getSelection();if(!e||e.isCollapsed){n.isDisposed&&i.dispose();return}let s=this.getIndexOfListElement(e.anchorNode),o=this.getIndexOfListElement(e.focusNode);void 0!==s&&void 0!==o&&(o<s&&([s,o]=[o,s]),this.currentSelectionBounds={start:s,end:o})}))})),n.add((0,s.ko)(t,"mouseup",()=>{n.dispose(),this.teardownDragAndDropScrollTopAnimation(),t.getSelection()?.isCollapsed!==!1&&i.dispose()}))}getIndexOfListElement(e){if(e&&this.domNode.contains(e))for(;e&&e!==this.domNode;){if(e.dataset?.index)return Number(e.dataset.index);e=e.parentElement}}onDragOver(e){var t,i;let n;if(e.browserEvent.preventDefault(),this.onDragLeaveTimeout.dispose(),y.CurrentDragAndDropData&&"vscode-ui"===y.CurrentDragAndDropData.getData()||(this.setupDragAndDropScrollTopAnimation(e.browserEvent),!e.browserEvent.dataTransfer))return!1;if(!this.currentDragData)if(y.CurrentDragAndDropData)this.currentDragData=y.CurrentDragAndDropData;else{if(!e.browserEvent.dataTransfer.types)return!1;this.currentDragData=new L}let s=this.dnd.onDragOver(this.currentDragData,e.element,e.index,e.sector,e.browserEvent);if(this.canDrop="boolean"==typeof s?s:s.accept,!this.canDrop)return this.currentDragFeedback=void 0,this.currentDragFeedbackDisposable.dispose(),!1;e.browserEvent.dataTransfer.dropEffect="boolean"!=typeof s&&s.effect?.type===0?"copy":"move",n="boolean"!=typeof s&&s.feedback?s.feedback:void 0===e.index?[-1]:[e.index],n=-1===(n=(0,l.dM)(n).filter(e=>e>=-1&&e<this.length).sort((e,t)=>e-t))[0]?[-1]:n;let o="boolean"!=typeof s&&s.effect&&s.effect.position?s.effect.position:"drop-target";if(t=this.currentDragFeedback,i=n,(Array.isArray(t)&&Array.isArray(i)?(0,l.aI)(t,i):t===i)&&this.currentDragFeedbackPosition===o)return!0;if(this.currentDragFeedback=n,this.currentDragFeedbackPosition=o,this.currentDragFeedbackDisposable.dispose(),-1===n[0])this.domNode.classList.add(o),this.rowsContainer.classList.add(o),this.currentDragFeedbackDisposable=(0,u.s)(()=>{this.domNode.classList.remove(o),this.rowsContainer.classList.remove(o)});else{if(n.length>1&&"drop-target"!==o)throw Error("Can't use multiple feedbacks with position different than 'over'");for(let e of("drop-target-after"===o&&n[0]<this.length-1&&(n[0]+=1,o="drop-target-before"),n)){let t=this.items[e];t.dropTarget=!0,t.row?.domNode.classList.add(o)}this.currentDragFeedbackDisposable=(0,u.s)(()=>{for(let e of n){let t=this.items[e];t.dropTarget=!1,t.row?.domNode.classList.remove(o)}})}return!0}onDragLeave(e){this.onDragLeaveTimeout.dispose(),this.onDragLeaveTimeout=(0,h.EQ)(()=>this.clearDragOverFeedback(),100,this.disposables),this.currentDragData&&this.dnd.onDragLeave?.(this.currentDragData,e.element,e.index,e.browserEvent)}onDrop(e){if(!this.canDrop)return;let t=this.currentDragData;this.teardownDragAndDropScrollTopAnimation(),this.clearDragOverFeedback(),this.domNode.classList.remove("dragging"),this.currentDragData=void 0,y.CurrentDragAndDropData=void 0,t&&e.browserEvent.dataTransfer&&(e.browserEvent.preventDefault(),t.update(e.browserEvent.dataTransfer),this.dnd.drop(t,e.element,e.index,e.sector,e.browserEvent))}onDragEnd(e){this.canDrop=!1,this.teardownDragAndDropScrollTopAnimation(),this.clearDragOverFeedback(),this.domNode.classList.remove("dragging"),this.currentDragData=void 0,y.CurrentDragAndDropData=void 0,this.dnd.onDragEnd?.(e)}clearDragOverFeedback(){this.currentDragFeedback=void 0,this.currentDragFeedbackPosition=void 0,this.currentDragFeedbackDisposable.dispose(),this.currentDragFeedbackDisposable=u.jG.None}setupDragAndDropScrollTopAnimation(e){if(!this.dragOverAnimationDisposable){let e=(0,s.cL)(this.domNode).top;this.dragOverAnimationDisposable=(0,s.i0)((0,s.zk)(this.domNode),this.animateDragAndDropScrollTop.bind(this,e))}this.dragOverAnimationStopDisposable.dispose(),this.dragOverAnimationStopDisposable=(0,h.EQ)(()=>{this.dragOverAnimationDisposable&&(this.dragOverAnimationDisposable.dispose(),this.dragOverAnimationDisposable=void 0)},1e3,this.disposables),this.dragOverMouseY=e.pageY}animateDragAndDropScrollTop(e){if(void 0===this.dragOverMouseY)return;let t=this.dragOverMouseY-e,i=this.renderHeight-35;t<35?this.scrollTop+=Math.max(-14,Math.floor(.3*(t-35))):t>i&&(this.scrollTop+=Math.min(14,Math.floor(.3*(t-i))))}teardownDragAndDropScrollTopAnimation(){this.dragOverAnimationStopDisposable.dispose(),this.dragOverAnimationDisposable&&(this.dragOverAnimationDisposable.dispose(),this.dragOverAnimationDisposable=void 0)}getTargetSector(e,t){if(void 0===t)return;let i=Math.floor(e.offsetY/this.items[t].size/.25);return(0,C.qE)(i,0,3)}getItemIndexFromEventTarget(e){let t=this.scrollableElement.getDomNode(),i=e;for(;((0,s.sb)(i)||(0,s.xZ)(i))&&i!==this.rowsContainer&&t.contains(i);){let e=i.getAttribute("data-index");if(e){let t=Number(e);if(!isNaN(t))return t}i=i.parentElement}}getVisibleRange(e,t){return{start:this.rangeMap.indexAt(e),end:this.rangeMap.indexAfter(e+t-1)}}getRenderRange(e,t){let i=this.getVisibleRange(e,t);if(this.currentSelectionBounds){let e=this.rangeMap.count;i.start=Math.min(i.start,this.currentSelectionBounds.start,e),i.end=Math.min(Math.max(i.end,this.currentSelectionBounds.end+1),e)}return i}_rerender(e,t,i){let n,s,o=this.getRenderRange(e,t);e===this.elementTop(o.start)?(n=o.start,s=0):o.end-o.start>1&&(n=o.start+1,s=this.elementTop(n)-e);let r=0;for(;;){let a=this.getRenderRange(e,t),l=!1;for(let e=a.start;e<a.end;e++){let t=this.probeDynamicHeight(e);0!==t&&this.rangeMap.splice(e,1,[this.items[e]]),r+=t,l=l||0!==t}if(!l){for(let e of(0!==r&&this.eventuallyUpdateScrollDimensions(),g.Q.relativeComplement(o,a)))for(let t=e.start;t<e.end;t++)this.items[t].row&&this.removeItemFromDOM(t);for(let e of g.Q.relativeComplement(a,o).reverse())for(let t=e.end-1;t>=e.start;t--)this.insertItemInDOM(t);for(let e=a.start;e<a.end;e++)this.items[e].row&&this.updateItemInDOM(this.items[e],e);if("number"==typeof n){let t=this.scrollable.getFutureScrollPosition().scrollTop-e,o=this.elementTop(n)-s+t;this.setScrollTop(o,i)}this._onDidChangeContentHeight.fire(this.contentHeight);return}}}probeDynamicHeight(e){let t=this.items[e];if(this.virtualDelegate.getDynamicHeight){let e=this.virtualDelegate.getDynamicHeight(t.element);if(null!==e){let i=t.size;return t.size=e,t.lastDynamicHeightWidth=this.renderWidth,e-i}}if(!t.hasDynamicHeight||t.lastDynamicHeightWidth===this.renderWidth||this.virtualDelegate.hasDynamicHeight&&!this.virtualDelegate.hasDynamicHeight(t.element))return 0;let i=t.size;if(t.row)return t.row.domNode.style.height="",t.size=t.row.domNode.offsetHeight,0!==t.size||(0,s.QX)(t.row.domNode,(0,s.zk)(t.row.domNode).document.body)||console.warn("Measuring item node that is not in DOM! Add ListView to the DOM before measuring row height!",Error().stack),t.lastDynamicHeightWidth=this.renderWidth,t.size-i;let{row:n}=this.cache.alloc(t.templateId);n.domNode.style.height="",this.rowsContainer.appendChild(n.domNode);let o=this.renderers.get(t.templateId);if(!o)throw new b.D7("Missing renderer for templateId: "+t.templateId);return o.renderElement(t.element,e,n.templateData),t.size=n.domNode.offsetHeight,o.disposeElement?.(t.element,e,n.templateData),this.virtualDelegate.setDynamicHeight?.(t.element,t.size),t.lastDynamicHeightWidth=this.renderWidth,n.domNode.remove(),this.cache.release(n),t.size-i}getElementDomId(e){return`${this.domId}_${e}`}dispose(){for(let e of this.items)if(e.dragStartDisposable.dispose(),e.checkedDisposable.dispose(),e.row){let t=this.renderers.get(e.row.templateId);t&&(t.disposeElement?.(e.element,-1,e.row.templateData,void 0),t.disposeTemplate(e.row.templateData))}this.items=[],this.domNode?.remove(),this.dragOverAnimationDisposable?.dispose(),this.disposables.dispose()}}w([d.B],I.prototype,"onMouseClick",null),w([d.B],I.prototype,"onMouseDblClick",null),w([d.B],I.prototype,"onMouseMiddleClick",null),w([d.B],I.prototype,"onMouseDown",null),w([d.B],I.prototype,"onMouseOver",null),w([d.B],I.prototype,"onMouseOut",null),w([d.B],I.prototype,"onContextMenu",null),w([d.B],I.prototype,"onTouchStart",null),w([d.B],I.prototype,"onTap",null)},77715:(e,t,i)=>{"use strict";i.d(t,{FdG:()=>n.Fd,buw:()=>c,GuP:()=>n.Gu,Bbc:()=>n.Bb,HP_:()=>n.HP,WMx:()=>g,zRE:()=>p,sAS:()=>eu,vV$:()=>ed,etE:()=>ec,mc0:()=>eh,XJc:()=>e1,raQ:()=>e5,G_h:()=>eJ,T9h:()=>e2,xOA:()=>e3,Inn:()=>e4,nZG:()=>e7,Q1$:()=>e0,OcU:()=>ts,C5U:()=>tr,Uv:()=>ta,hsb:()=>tl,t0B:()=>to,b1q:()=>d,EY1:()=>J,ZEf:()=>ee,yUe:()=>a,Gj6:()=>et,w3w:()=>en,ld8:()=>es,$BZ:()=>eo,GNm:()=>ei,TUz:()=>tW,Ztu:()=>R,YtV:()=>C,AN$:()=>L,Rbi:()=>x,f3U:()=>B,Ubg:()=>W,ECk:()=>V,p8Y:()=>H,S5J:()=>z,By2:()=>w,i61:()=>T,WfR:()=>U,oZ8:()=>$,Xo2:()=>j,tan:()=>A,IIb:()=>M,pOz:()=>E,WL6:()=>G,P6i:()=>K,B2L:()=>Z,sjA:()=>Y,_pU:()=>Q,HwT:()=>q,seu:()=>O,rm4:()=>P,QwA:()=>F,whs:()=>D,Stt:()=>N,Hng:()=>I,CgL:()=>y,sIe:()=>k,FiB:()=>S,tAP:()=>h,CU6:()=>r,t4B:()=>l,c1f:()=>eB,uNK:()=>eA,$$0:()=>eW,L4c:()=>eR,Zgs:()=>eP,cws:()=>eO,_$n:()=>eK,eYZ:()=>eq,h9z:()=>eG,I$A:()=>eH,YSW:()=>ez,L9Z:()=>eV,ULt:()=>eU,C1n:()=>e$,T5N:()=>ej,HDX:()=>th,zUX:()=>tc,Qfh:()=>tu,eUu:()=>td,Rjz:()=>t_,GVV:()=>tv,fED:()=>tb,yIp:()=>tI,Yoe:()=>tD,pnl:()=>tM,P9Z:()=>tR,fiM:()=>tT,H8q:()=>tO,gtq:()=>tf,VFX:()=>tg,efJ:()=>tp,eMz:()=>tE,p7Y:()=>tm,QI5:()=>tN,lO1:()=>tx,QRv:()=>tL,CQ3:()=>tS,ijf:()=>tk,uNx:()=>tC,f4y:()=>tw,C9U:()=>ty,c6Y:()=>tz,g$2:()=>tH,dd_:()=>tV,Ux$:()=>tj,SNb:()=>t$,pmr:()=>tU,D7X:()=>tK,ILr:()=>eM,yLC:()=>eE,AjU:()=>ex,K1Z:()=>eT,KoI:()=>eI,yr0:()=>eD,Xp1:()=>eL,uMG:()=>eN,yLr:()=>n.yL,fAP:()=>eC,z5H:()=>ew,iwL:()=>tZ,NBf:()=>tY,tYX:()=>ey,bNw:()=>ek,JPj:()=>eS,BTi:()=>b,ELA:()=>tG,HJZ:()=>tq,AlL:()=>t1,nH:()=>tJ,c7i:()=>t0,er1:()=>tQ,Ukx:()=>e8,Ips:()=>e6,jOE:()=>e9,xWN:()=>tt,ZBU:()=>ti,kPT:()=>te,jr9:()=>tn,x1A:()=>n.x1,bXl:()=>m,mhZ:()=>v,gnV:()=>f,cI_:()=>_,rvE:()=>eQ,HcB:()=>eX,yqq:()=>eZ,lWP:()=>eY,k5u:()=>tF,sbQ:()=>tB,vwp:()=>u,JO0:()=>n.JO,pft:()=>tA,U4U:()=>tP,DSL:()=>ea,f9l:()=>er});var n=i(15262),s=i(15957),o=i(78713);let r=(0,n.x1)("foreground",{dark:"#CCCCCC",light:"#616161",hcDark:"#FFFFFF",hcLight:"#292929"},s.kg(1756,"Overall foreground color. This color is only used if not overridden by a component."));(0,n.x1)("disabledForeground",{dark:"#CCCCCC80",light:"#61616180",hcDark:"#A5A5A5",hcLight:"#7F7F7F"},s.kg(1757,"Overall foreground for disabled elements. This color is only used if not overridden by a component.")),(0,n.x1)("errorForeground",{dark:"#F48771",light:"#A1260D",hcDark:"#F48771",hcLight:"#B5200D"},s.kg(1758,"Overall foreground color for error messages. This color is only used if not overridden by a component."));let a=(0,n.x1)("descriptionForeground",{light:"#717171",dark:(0,n.JO)(r,.7),hcDark:(0,n.JO)(r,.7),hcLight:(0,n.JO)(r,.7)},s.kg(1759,"Foreground color for description text providing additional information, for example for a label.")),l=(0,n.x1)("icon.foreground",{dark:"#C5C5C5",light:"#424242",hcDark:"#FFFFFF",hcLight:"#292929"},s.kg(1760,"The default color for icons in the workbench.")),h=(0,n.x1)("focusBorder",{dark:"#007FD4",light:"#0090F1",hcDark:"#F38518",hcLight:"#006BBD"},s.kg(1761,"Overall border color for focused elements. This color is only used if not overridden by a component.")),d=(0,n.x1)("contrastBorder",{light:null,dark:null,hcDark:"#6FC3DF",hcLight:"#0F4A85"},s.kg(1762,"An extra border around elements to separate them from others for greater contrast.")),c=(0,n.x1)("contrastActiveBorder",{light:null,dark:null,hcDark:h,hcLight:h},s.kg(1763,"An extra border around active elements to separate them from others for greater contrast."));(0,n.x1)("selection.background",null,s.kg(1764,"The background color of text selections in the workbench (e.g. for input fields or text areas). Note that this does not apply to selections within the editor."));let u=(0,n.x1)("textLink.foreground",{light:"#006AB1",dark:"#3794FF",hcDark:"#21A6FF",hcLight:"#0F4A85"},s.kg(1765,"Foreground color for links in text."));(0,n.x1)("textLink.activeForeground",{light:"#006AB1",dark:"#3794FF",hcDark:"#21A6FF",hcLight:"#0F4A85"},s.kg(1766,"Foreground color for links in text when clicked on and on mouse hover.")),(0,n.x1)("textSeparator.foreground",{light:"#0000002e",dark:"#ffffff2e",hcDark:o.Q1.black,hcLight:"#292929"},s.kg(1767,"Color for text separators.")),(0,n.x1)("textPreformat.foreground",{light:"#A31515",dark:"#D7BA7D",hcDark:"#000000",hcLight:"#FFFFFF"},s.kg(1768,"Foreground color for preformatted text segments.")),(0,n.x1)("textPreformat.background",{light:"#0000001A",dark:"#FFFFFF1A",hcDark:"#FFFFFF",hcLight:"#09345f"},s.kg(1769,"Background color for preformatted text segments.")),(0,n.x1)("textBlockQuote.background",{light:"#f2f2f2",dark:"#222222",hcDark:null,hcLight:"#F2F2F2"},s.kg(1770,"Background color for block quotes in text.")),(0,n.x1)("textBlockQuote.border",{light:"#007acc80",dark:"#007acc80",hcDark:o.Q1.white,hcLight:"#292929"},s.kg(1771,"Border color for block quotes in text.")),(0,n.x1)("textCodeBlock.background",{light:"#dcdcdc66",dark:"#0a0a0a66",hcDark:o.Q1.black,hcLight:"#F2F2F2"},s.kg(1772,"Background color for code blocks in text.")),(0,n.x1)("sash.hoverBorder",h,s.kg(1977,"Border color of active sashes."));let g=(0,n.x1)("badge.background",{dark:"#4D4D4D",light:"#C4C4C4",hcDark:o.Q1.black,hcLight:"#0F4A85"},s.kg(1978,"Badge background color. Badges are small information labels, e.g. for search results count.")),p=(0,n.x1)("badge.foreground",{dark:o.Q1.white,light:"#333",hcDark:o.Q1.white,hcLight:o.Q1.white},s.kg(1979,"Badge foreground color. Badges are small information labels, e.g. for search results count."));(0,n.x1)("activityWarningBadge.foreground",{dark:o.Q1.black.lighten(.2),light:o.Q1.white,hcDark:null,hcLight:o.Q1.black.lighten(.2)},s.kg(1980,"Foreground color of the warning activity badge")),(0,n.x1)("activityWarningBadge.background",{dark:"#CCA700",light:"#BF8803",hcDark:null,hcLight:"#CCA700"},s.kg(1981,"Background color of the warning activity badge")),(0,n.x1)("activityErrorBadge.foreground",{dark:o.Q1.black.lighten(.2),light:o.Q1.white,hcDark:null,hcLight:o.Q1.black.lighten(.2)},s.kg(1982,"Foreground color of the error activity badge")),(0,n.x1)("activityErrorBadge.background",{dark:"#F14C4C",light:"#E51400",hcDark:null,hcLight:"#F14C4C"},s.kg(1983,"Background color of the error activity badge"));let m=(0,n.x1)("scrollbar.shadow",{dark:"#000000",light:"#DDDDDD",hcDark:null,hcLight:null},s.kg(1984,"Scrollbar shadow to indicate that the view is scrolled.")),f=(0,n.x1)("scrollbarSlider.background",{dark:o.Q1.fromHex("#797979").transparent(.4),light:o.Q1.fromHex("#646464").transparent(.4),hcDark:(0,n.JO)(d,.6),hcLight:(0,n.JO)(d,.4)},s.kg(1985,"Scrollbar slider background color.")),_=(0,n.x1)("scrollbarSlider.hoverBackground",{dark:o.Q1.fromHex("#646464").transparent(.7),light:o.Q1.fromHex("#646464").transparent(.7),hcDark:(0,n.JO)(d,.8),hcLight:(0,n.JO)(d,.8)},s.kg(1986,"Scrollbar slider background color when hovering.")),v=(0,n.x1)("scrollbarSlider.activeBackground",{dark:o.Q1.fromHex("#BFBFBF").transparent(.4),light:o.Q1.fromHex("#000000").transparent(.6),hcDark:d,hcLight:d},s.kg(1987,"Scrollbar slider background color when clicked on.")),b=(0,n.x1)("progressBar.background",{dark:o.Q1.fromHex("#0E70C0"),light:o.Q1.fromHex("#0E70C0"),hcDark:d,hcLight:d},s.kg(1988,"Background color of the progress bar that can show for long running operations."));(0,n.x1)("chart.line",{dark:"#236B8E",light:"#236B8E",hcDark:"#236B8E",hcLight:"#236B8E"},s.kg(1989,"Line color for the chart.")),(0,n.x1)("chart.axis",{dark:o.Q1.fromHex("#BFBFBF").transparent(.4),light:o.Q1.fromHex("#000000").transparent(.6),hcDark:d,hcLight:d},s.kg(1990,"Axis color for the chart.")),(0,n.x1)("chart.guide",{dark:o.Q1.fromHex("#BFBFBF").transparent(.2),light:o.Q1.fromHex("#000000").transparent(.2),hcDark:d,hcLight:d},s.kg(1991,"Guide line for the chart."));let C=(0,n.x1)("editor.background",{light:"#ffffff",dark:"#1E1E1E",hcDark:o.Q1.black,hcLight:o.Q1.white},s.kg(1781,"Editor background color.")),w=(0,n.x1)("editor.foreground",{light:"#333333",dark:"#BBBBBB",hcDark:o.Q1.white,hcLight:r},s.kg(1782,"Editor default foreground color."));(0,n.x1)("editorStickyScroll.background",C,s.kg(1783,"Background color of sticky scroll in the editor")),(0,n.x1)("editorStickyScrollGutter.background",C,s.kg(1784,"Background color of the gutter part of sticky scroll in the editor")),(0,n.x1)("editorStickyScrollHover.background",{dark:"#2A2D2E",light:"#F0F0F0",hcDark:null,hcLight:o.Q1.fromHex("#0F4A85").transparent(.1)},s.kg(1785,"Background color of sticky scroll on hover in the editor")),(0,n.x1)("editorStickyScroll.border",{dark:null,light:null,hcDark:d,hcLight:d},s.kg(1786,"Border color of sticky scroll in the editor")),(0,n.x1)("editorStickyScroll.shadow",m,s.kg(1787," Shadow color of sticky scroll in the editor"));let y=(0,n.x1)("editorWidget.background",{dark:"#252526",light:"#F3F3F3",hcDark:"#0C141F",hcLight:o.Q1.white},s.kg(1788,"Background color of editor widgets, such as find/replace.")),S=(0,n.x1)("editorWidget.foreground",r,s.kg(1789,"Foreground color of editor widgets, such as find/replace.")),k=(0,n.x1)("editorWidget.border",{dark:"#454545",light:"#C8C8C8",hcDark:d,hcLight:d},s.kg(1790,"Border color of editor widgets. The color is only used if the widget chooses to have a border and if the color is not overridden by a widget."));(0,n.x1)("editorWidget.resizeBorder",null,s.kg(1791,"Border color of the resize bar of editor widgets. The color is only used if the widget chooses to have a resize border and if the color is not overridden by a widget.")),(0,n.x1)("editorError.background",null,s.kg(1792,"Background color of error text in the editor. The color must not be opaque so as not to hide underlying decorations."),!0);let x=(0,n.x1)("editorError.foreground",{dark:"#F14C4C",light:"#E51400",hcDark:"#F48771",hcLight:"#B5200D"},s.kg(1793,"Foreground color of error squigglies in the editor.")),L=(0,n.x1)("editorError.border",{dark:null,light:null,hcDark:o.Q1.fromHex("#E47777").transparent(.8),hcLight:"#B5200D"},s.kg(1794,"If set, color of double underlines for errors in the editor.")),D=(0,n.x1)("editorWarning.background",null,s.kg(1795,"Background color of warning text in the editor. The color must not be opaque so as not to hide underlying decorations."),!0),I=(0,n.x1)("editorWarning.foreground",{dark:"#CCA700",light:"#BF8803",hcDark:"#FFD370",hcLight:"#895503"},s.kg(1796,"Foreground color of warning squigglies in the editor.")),N=(0,n.x1)("editorWarning.border",{dark:null,light:null,hcDark:o.Q1.fromHex("#FFCC00").transparent(.8),hcLight:o.Q1.fromHex("#FFCC00").transparent(.8)},s.kg(1797,"If set, color of double underlines for warnings in the editor."));(0,n.x1)("editorInfo.background",null,s.kg(1798,"Background color of info text in the editor. The color must not be opaque so as not to hide underlying decorations."),!0);let E=(0,n.x1)("editorInfo.foreground",{dark:"#3794FF",light:"#1a85ff",hcDark:"#3794FF",hcLight:"#1a85ff"},s.kg(1799,"Foreground color of info squigglies in the editor.")),M=(0,n.x1)("editorInfo.border",{dark:null,light:null,hcDark:o.Q1.fromHex("#3794FF").transparent(.8),hcLight:"#292929"},s.kg(1800,"If set, color of double underlines for infos in the editor.")),T=(0,n.x1)("editorHint.foreground",{dark:o.Q1.fromHex("#eeeeee").transparent(.7),light:"#6c6c6c",hcDark:null,hcLight:null},s.kg(1801,"Foreground color of hint squigglies in the editor."));(0,n.x1)("editorHint.border",{dark:null,light:null,hcDark:o.Q1.fromHex("#eeeeee").transparent(.8),hcLight:"#292929"},s.kg(1802,"If set, color of double underlines for hints in the editor."));let R=(0,n.x1)("editorLink.activeForeground",{dark:"#4E94CE",light:o.Q1.blue,hcDark:o.Q1.cyan,hcLight:"#292929"},s.kg(1803,"Color of active links.")),O=(0,n.x1)("editor.selectionBackground",{light:"#ADD6FF",dark:"#264F78",hcDark:"#f3f518",hcLight:"#0F4A85"},s.kg(1804,"Color of the editor selection.")),P=(0,n.x1)("editor.selectionForeground",{light:null,dark:null,hcDark:"#000000",hcLight:o.Q1.white},s.kg(1805,"Color of the selected text for high contrast.")),A=(0,n.x1)("editor.inactiveSelectionBackground",{light:(0,n.JO)(O,.5),dark:(0,n.JO)(O,.5),hcDark:(0,n.JO)(O,.7),hcLight:(0,n.JO)(O,.5)},s.kg(1806,"Color of the selection in an inactive editor. The color must not be opaque so as not to hide underlying decorations."),!0),F=(0,n.x1)("editor.selectionHighlightBackground",{light:(0,n.oG)(O,C,.3,.6),dark:(0,n.oG)(O,C,.3,.6),hcDark:null,hcLight:null},s.kg(1807,"Color for regions with the same content as the selection. The color must not be opaque so as not to hide underlying decorations."),!0);(0,n.x1)("editor.selectionHighlightBorder",{light:null,dark:null,hcDark:c,hcLight:c},s.kg(1808,"Border color for regions with the same content as the selection.")),(0,n.x1)("editor.compositionBorder",{light:"#000000",dark:"#ffffff",hcLight:"#000000",hcDark:"#ffffff"},s.kg(1809,"The border color for an IME composition.")),(0,n.x1)("editor.findMatchBackground",{light:"#A8AC94",dark:"#515C6A",hcDark:null,hcLight:null},s.kg(1810,"Color of the current search match."));let B=(0,n.x1)("editor.findMatchForeground",null,s.kg(1811,"Text color of the current search match.")),W=(0,n.x1)("editor.findMatchHighlightBackground",{light:"#EA5C0055",dark:"#EA5C0055",hcDark:null,hcLight:null},s.kg(1812,"Color of the other search matches. The color must not be opaque so as not to hide underlying decorations."),!0),H=(0,n.x1)("editor.findMatchHighlightForeground",null,s.kg(1813,"Foreground color of the other search matches."),!0);(0,n.x1)("editor.findRangeHighlightBackground",{dark:"#3a3d4166",light:"#b4b4b44d",hcDark:null,hcLight:null},s.kg(1814,"Color of the range limiting the search. The color must not be opaque so as not to hide underlying decorations."),!0),(0,n.x1)("editor.findMatchBorder",{light:null,dark:null,hcDark:c,hcLight:c},s.kg(1815,"Border color of the current search match."));let V=(0,n.x1)("editor.findMatchHighlightBorder",{light:null,dark:null,hcDark:c,hcLight:c},s.kg(1816,"Border color of the other search matches.")),z=(0,n.x1)("editor.findRangeHighlightBorder",{dark:null,light:null,hcDark:(0,n.JO)(c,.4),hcLight:(0,n.JO)(c,.4)},s.kg(1817,"Border color of the range limiting the search. The color must not be opaque so as not to hide underlying decorations."),!0);(0,n.x1)("editor.hoverHighlightBackground",{light:"#ADD6FF26",dark:"#264f7840",hcDark:"#ADD6FF26",hcLight:null},s.kg(1818,"Highlight below the word for which a hover is shown. The color must not be opaque so as not to hide underlying decorations."),!0);let U=(0,n.x1)("editorHoverWidget.background",y,s.kg(1819,"Background color of the editor hover.")),j=(0,n.x1)("editorHoverWidget.foreground",S,s.kg(1820,"Foreground color of the editor hover.")),$=(0,n.x1)("editorHoverWidget.border",k,s.kg(1821,"Border color of the editor hover."));(0,n.x1)("editorHoverWidget.statusBarBackground",{dark:(0,n.a)(U,.2),light:(0,n.e$)(U,.05),hcDark:y,hcLight:y},s.kg(1822,"Background color of the editor hover status bar."));let K=(0,n.x1)("editorInlayHint.foreground",{dark:"#969696",light:"#969696",hcDark:o.Q1.white,hcLight:o.Q1.black},s.kg(1823,"Foreground color of inline hints")),G=(0,n.x1)("editorInlayHint.background",{dark:(0,n.JO)(g,.1),light:(0,n.JO)(g,.1),hcDark:(0,n.JO)(o.Q1.white,.1),hcLight:(0,n.JO)(g,.1)},s.kg(1824,"Background color of inline hints")),q=(0,n.x1)("editorInlayHint.typeForeground",K,s.kg(1825,"Foreground color of inline hints for types")),Q=(0,n.x1)("editorInlayHint.typeBackground",G,s.kg(1826,"Background color of inline hints for types")),Y=(0,n.x1)("editorInlayHint.parameterForeground",K,s.kg(1827,"Foreground color of inline hints for parameters")),Z=(0,n.x1)("editorInlayHint.parameterBackground",G,s.kg(1828,"Background color of inline hints for parameters")),X=(0,n.x1)("editorLightBulb.foreground",{dark:"#FFCC00",light:"#DDB100",hcDark:"#FFCC00",hcLight:"#007ACC"},s.kg(1829,"The color used for the lightbulb actions icon."));(0,n.x1)("editorLightBulbAutoFix.foreground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},s.kg(1830,"The color used for the lightbulb auto fix actions icon.")),(0,n.x1)("editorLightBulbAi.foreground",X,s.kg(1831,"The color used for the lightbulb AI icon.")),(0,n.x1)("editor.snippetTabstopHighlightBackground",{dark:new o.Q1(new o.bU(124,124,124,.3)),light:new o.Q1(new o.bU(10,50,100,.2)),hcDark:new o.Q1(new o.bU(124,124,124,.3)),hcLight:new o.Q1(new o.bU(10,50,100,.2))},s.kg(1832,"Highlight background color of a snippet tabstop.")),(0,n.x1)("editor.snippetTabstopHighlightBorder",null,s.kg(1833,"Highlight border color of a snippet tabstop.")),(0,n.x1)("editor.snippetFinalTabstopHighlightBackground",null,s.kg(1834,"Highlight background color of the final tabstop of a snippet.")),(0,n.x1)("editor.snippetFinalTabstopHighlightBorder",{dark:"#525252",light:new o.Q1(new o.bU(10,50,100,.5)),hcDark:"#525252",hcLight:"#292929"},s.kg(1835,"Highlight border color of the final tabstop of a snippet."));let J=new o.Q1(new o.bU(155,185,85,.2)),ee=new o.Q1(new o.bU(255,0,0,.2)),et=(0,n.x1)("diffEditor.insertedTextBackground",{dark:"#9ccc2c33",light:"#9ccc2c40",hcDark:null,hcLight:null},s.kg(1836,"Background color for text that got inserted. The color must not be opaque so as not to hide underlying decorations."),!0),ei=(0,n.x1)("diffEditor.removedTextBackground",{dark:"#ff000033",light:"#ff000033",hcDark:null,hcLight:null},s.kg(1837,"Background color for text that got removed. The color must not be opaque so as not to hide underlying decorations."),!0),en=(0,n.x1)("diffEditor.insertedLineBackground",{dark:J,light:J,hcDark:null,hcLight:null},s.kg(1838,"Background color for lines that got inserted. The color must not be opaque so as not to hide underlying decorations."),!0);(0,n.x1)("diffEditor.removedLineBackground",{dark:ee,light:ee,hcDark:null,hcLight:null},s.kg(1839,"Background color for lines that got removed. The color must not be opaque so as not to hide underlying decorations."),!0),(0,n.x1)("diffEditorGutter.insertedLineBackground",null,s.kg(1840,"Background color for the margin where lines got inserted.")),(0,n.x1)("diffEditorGutter.removedLineBackground",null,s.kg(1841,"Background color for the margin where lines got removed."));let es=(0,n.x1)("diffEditorOverview.insertedForeground",null,s.kg(1842,"Diff overview ruler foreground for inserted content.")),eo=(0,n.x1)("diffEditorOverview.removedForeground",null,s.kg(1843,"Diff overview ruler foreground for removed content."));(0,n.x1)("diffEditor.insertedTextBorder",{dark:null,light:null,hcDark:"#33ff2eff",hcLight:"#374E06"},s.kg(1844,"Outline color for the text that got inserted.")),(0,n.x1)("diffEditor.removedTextBorder",{dark:null,light:null,hcDark:"#FF008F",hcLight:"#AD0707"},s.kg(1845,"Outline color for text that got removed.")),(0,n.x1)("diffEditor.border",{dark:null,light:null,hcDark:d,hcLight:d},s.kg(1846,"Border color between the two text editors.")),(0,n.x1)("diffEditor.diagonalFill",{dark:"#cccccc33",light:"#22222233",hcDark:null,hcLight:null},s.kg(1847,"Color of the diff editor's diagonal fill. The diagonal fill is used in side-by-side diff views.")),(0,n.x1)("diffEditor.unchangedRegionBackground","sideBar.background",s.kg(1848,"The background color of unchanged blocks in the diff editor.")),(0,n.x1)("diffEditor.unchangedRegionForeground","foreground",s.kg(1849,"The foreground color of unchanged blocks in the diff editor.")),(0,n.x1)("diffEditor.unchangedCodeBackground",{dark:"#74747429",light:"#b8b8b829",hcDark:null,hcLight:null},s.kg(1850,"The background color of unchanged code in the diff editor."));let er=(0,n.x1)("widget.shadow",{dark:(0,n.JO)(o.Q1.black,.36),light:(0,n.JO)(o.Q1.black,.16),hcDark:null,hcLight:null},s.kg(1851,"Shadow color of widgets such as find/replace inside the editor.")),ea=(0,n.x1)("widget.border",{dark:null,light:null,hcDark:d,hcLight:d},s.kg(1852,"Border color of widgets such as find/replace inside the editor.")),el=(0,n.x1)("toolbar.hoverBackground",{dark:"#5a5d5e50",light:"#b8b8b850",hcDark:null,hcLight:null},s.kg(1853,"Toolbar background when hovering over actions using the mouse"));(0,n.x1)("toolbar.hoverOutline",{dark:null,light:null,hcDark:c,hcLight:c},s.kg(1854,"Toolbar outline when hovering over actions using the mouse")),(0,n.x1)("toolbar.activeBackground",{dark:(0,n.a)(el,.1),light:(0,n.e$)(el,.1),hcDark:null,hcLight:null},s.kg(1855,"Toolbar background when holding the mouse over actions"));let eh=(0,n.x1)("breadcrumb.foreground",(0,n.JO)(r,.8),s.kg(1856,"Color of focused breadcrumb items.")),ed=(0,n.x1)("breadcrumb.background",C,s.kg(1857,"Background color of breadcrumb items.")),ec=(0,n.x1)("breadcrumb.focusForeground",{light:(0,n.e$)(r,.2),dark:(0,n.a)(r,.1),hcDark:(0,n.a)(r,.1),hcLight:(0,n.a)(r,.1)},s.kg(1858,"Color of focused breadcrumb items.")),eu=(0,n.x1)("breadcrumb.activeSelectionForeground",{light:(0,n.e$)(r,.2),dark:(0,n.a)(r,.1),hcDark:(0,n.a)(r,.1),hcLight:(0,n.a)(r,.1)},s.kg(1859,"Color of selected breadcrumb items."));(0,n.x1)("breadcrumbPicker.background",y,s.kg(1860,"Background color of breadcrumb item picker."));let eg=o.Q1.fromHex("#40C8AE").transparent(.5),ep=o.Q1.fromHex("#40A6FF").transparent(.5),em=o.Q1.fromHex("#606060").transparent(.4),ef=(0,n.x1)("merge.currentHeaderBackground",{dark:eg,light:eg,hcDark:null,hcLight:null},s.kg(1861,"Current header background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0);(0,n.x1)("merge.currentContentBackground",(0,n.JO)(ef,.4),s.kg(1862,"Current content background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0);let e_=(0,n.x1)("merge.incomingHeaderBackground",{dark:ep,light:ep,hcDark:null,hcLight:null},s.kg(1863,"Incoming header background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0);(0,n.x1)("merge.incomingContentBackground",(0,n.JO)(e_,.4),s.kg(1864,"Incoming content background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0);let ev=(0,n.x1)("merge.commonHeaderBackground",{dark:em,light:em,hcDark:null,hcLight:null},s.kg(1865,"Common ancestor header background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0);(0,n.x1)("merge.commonContentBackground",(0,n.JO)(ev,.4),s.kg(1866,"Common ancestor content background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0);let eb=(0,n.x1)("merge.border",{dark:null,light:null,hcDark:"#C3DF6F",hcLight:"#007ACC"},s.kg(1867,"Border color on headers and the splitter in inline merge-conflicts."));(0,n.x1)("editorOverviewRuler.currentContentForeground",{dark:(0,n.JO)(ef,1),light:(0,n.JO)(ef,1),hcDark:eb,hcLight:eb},s.kg(1868,"Current overview ruler foreground for inline merge-conflicts.")),(0,n.x1)("editorOverviewRuler.incomingContentForeground",{dark:(0,n.JO)(e_,1),light:(0,n.JO)(e_,1),hcDark:eb,hcLight:eb},s.kg(1869,"Incoming overview ruler foreground for inline merge-conflicts.")),(0,n.x1)("editorOverviewRuler.commonContentForeground",{dark:(0,n.JO)(ev,1),light:(0,n.JO)(ev,1),hcDark:eb,hcLight:eb},s.kg(1870,"Common ancestor overview ruler foreground for inline merge-conflicts."));let eC=(0,n.x1)("editorOverviewRuler.findMatchForeground",{dark:"#d186167e",light:"#d186167e",hcDark:"#AB5A00",hcLight:"#AB5A00"},s.kg(1871,"Overview ruler marker color for find matches. The color must not be opaque so as not to hide underlying decorations."),!0),ew=(0,n.x1)("editorOverviewRuler.selectionHighlightForeground","#A0A0A0CC",s.kg(1872,"Overview ruler marker color for selection highlights. The color must not be opaque so as not to hide underlying decorations."),!0),ey=(0,n.x1)("problemsErrorIcon.foreground",x,s.kg(1873,"The color used for the problems error icon.")),eS=(0,n.x1)("problemsWarningIcon.foreground",I,s.kg(1874,"The color used for the problems warning icon.")),ek=(0,n.x1)("problemsInfoIcon.foreground",E,s.kg(1875,"The color used for the problems info icon.")),ex=(0,n.x1)("minimap.findMatchHighlight",{light:"#d18616",dark:"#d18616",hcDark:"#AB5A00",hcLight:"#0F4A85"},s.kg(1966,"Minimap marker color for find matches."),!0),eL=(0,n.x1)("minimap.selectionOccurrenceHighlight",{light:"#c9c9c9",dark:"#676767",hcDark:"#ffffff",hcLight:"#0F4A85"},s.kg(1967,"Minimap marker color for repeating editor selections."),!0),eD=(0,n.x1)("minimap.selectionHighlight",{light:"#ADD6FF",dark:"#264F78",hcDark:"#ffffff",hcLight:"#0F4A85"},s.kg(1968,"Minimap marker color for the editor selection."),!0),eI=(0,n.x1)("minimap.infoHighlight",{dark:E,light:E,hcDark:M,hcLight:M},s.kg(1969,"Minimap marker color for infos.")),eN=(0,n.x1)("minimap.warningHighlight",{dark:I,light:I,hcDark:N,hcLight:N},s.kg(1970,"Minimap marker color for warnings.")),eE=(0,n.x1)("minimap.errorHighlight",{dark:new o.Q1(new o.bU(255,18,18,.7)),light:new o.Q1(new o.bU(255,18,18,.7)),hcDark:new o.Q1(new o.bU(255,50,50,1)),hcLight:"#B5200D"},s.kg(1971,"Minimap marker color for errors.")),eM=(0,n.x1)("minimap.background",null,s.kg(1972,"Minimap background color.")),eT=(0,n.x1)("minimap.foregroundOpacity",o.Q1.fromHex("#000f"),s.kg(1973,'Opacity of foreground elements rendered in the minimap. For example, "#000000c0" will render the elements with 75% opacity.'));(0,n.x1)("minimapSlider.background",(0,n.JO)(f,.5),s.kg(1974,"Minimap slider background color.")),(0,n.x1)("minimapSlider.hoverBackground",(0,n.JO)(_,.5),s.kg(1975,"Minimap slider background color when hovering.")),(0,n.x1)("minimapSlider.activeBackground",(0,n.JO)(v,.5),s.kg(1976,"Minimap slider background color when clicked on.")),(0,n.x1)("charts.foreground",r,s.kg(1773,"The foreground color used in charts.")),(0,n.x1)("charts.lines",(0,n.JO)(r,.5),s.kg(1774,"The color used for horizontal lines in charts.")),(0,n.x1)("charts.red",x,s.kg(1775,"The red color used in chart visualizations.")),(0,n.x1)("charts.blue",E,s.kg(1776,"The blue color used in chart visualizations.")),(0,n.x1)("charts.yellow",I,s.kg(1777,"The yellow color used in chart visualizations.")),(0,n.x1)("charts.orange",ex,s.kg(1778,"The orange color used in chart visualizations.")),(0,n.x1)("charts.green",{dark:"#89D185",light:"#388A34",hcDark:"#89D185",hcLight:"#374e06"},s.kg(1779,"The green color used in chart visualizations.")),(0,n.x1)("charts.purple",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},s.kg(1780,"The purple color used in chart visualizations."));let eR=(0,n.x1)("input.background",{dark:"#3C3C3C",light:o.Q1.white,hcDark:o.Q1.black,hcLight:o.Q1.white},s.kg(1876,"Input box background.")),eO=(0,n.x1)("input.foreground",r,s.kg(1877,"Input box foreground.")),eP=(0,n.x1)("input.border",{dark:null,light:null,hcDark:d,hcLight:d},s.kg(1878,"Input box border.")),eA=(0,n.x1)("inputOption.activeBorder",{dark:"#007ACC",light:"#007ACC",hcDark:d,hcLight:d},s.kg(1879,"Border color of activated options in input fields.")),eF=(0,n.x1)("inputOption.hoverBackground",{dark:"#5a5d5e80",light:"#b8b8b850",hcDark:null,hcLight:null},s.kg(1880,"Background color of activated options in input fields.")),eB=(0,n.x1)("inputOption.activeBackground",{dark:(0,n.JO)(h,.4),light:(0,n.JO)(h,.2),hcDark:o.Q1.transparent,hcLight:o.Q1.transparent},s.kg(1881,"Background hover color of options in input fields.")),eW=(0,n.x1)("inputOption.activeForeground",{dark:o.Q1.white,light:o.Q1.black,hcDark:r,hcLight:r},s.kg(1882,"Foreground color of activated options in input fields."));(0,n.x1)("input.placeholderForeground",{light:(0,n.JO)(r,.5),dark:(0,n.JO)(r,.5),hcDark:(0,n.JO)(r,.7),hcLight:(0,n.JO)(r,.7)},s.kg(1883,"Input box foreground color for placeholder text."));let eH=(0,n.x1)("inputValidation.infoBackground",{dark:"#063B49",light:"#D6ECF2",hcDark:o.Q1.black,hcLight:o.Q1.white},s.kg(1884,"Input validation background color for information severity.")),eV=(0,n.x1)("inputValidation.infoForeground",{dark:null,light:null,hcDark:null,hcLight:r},s.kg(1885,"Input validation foreground color for information severity.")),ez=(0,n.x1)("inputValidation.infoBorder",{dark:"#007acc",light:"#007acc",hcDark:d,hcLight:d},s.kg(1886,"Input validation border color for information severity.")),eU=(0,n.x1)("inputValidation.warningBackground",{dark:"#352A05",light:"#F6F5D2",hcDark:o.Q1.black,hcLight:o.Q1.white},s.kg(1887,"Input validation background color for warning severity.")),ej=(0,n.x1)("inputValidation.warningForeground",{dark:null,light:null,hcDark:null,hcLight:r},s.kg(1888,"Input validation foreground color for warning severity.")),e$=(0,n.x1)("inputValidation.warningBorder",{dark:"#B89500",light:"#B89500",hcDark:d,hcLight:d},s.kg(1889,"Input validation border color for warning severity.")),eK=(0,n.x1)("inputValidation.errorBackground",{dark:"#5A1D1D",light:"#F2DEDE",hcDark:o.Q1.black,hcLight:o.Q1.white},s.kg(1890,"Input validation background color for error severity.")),eG=(0,n.x1)("inputValidation.errorForeground",{dark:null,light:null,hcDark:null,hcLight:r},s.kg(1891,"Input validation foreground color for error severity.")),eq=(0,n.x1)("inputValidation.errorBorder",{dark:"#BE1100",light:"#BE1100",hcDark:d,hcLight:d},s.kg(1892,"Input validation border color for error severity.")),eQ=(0,n.x1)("dropdown.background",{dark:"#3C3C3C",light:o.Q1.white,hcDark:o.Q1.black,hcLight:o.Q1.white},s.kg(1893,"Dropdown background.")),eY=(0,n.x1)("dropdown.listBackground",{dark:null,light:null,hcDark:o.Q1.black,hcLight:o.Q1.white},s.kg(1894,"Dropdown list background.")),eZ=(0,n.x1)("dropdown.foreground",{dark:"#F0F0F0",light:r,hcDark:o.Q1.white,hcLight:r},s.kg(1895,"Dropdown foreground.")),eX=(0,n.x1)("dropdown.border",{dark:eQ,light:"#CECECE",hcDark:d,hcLight:d},s.kg(1896,"Dropdown border.")),eJ=(0,n.x1)("button.foreground",o.Q1.white,s.kg(1897,"Button foreground color.")),e0=(0,n.x1)("button.separator",(0,n.JO)(eJ,.4),s.kg(1898,"Button separator color.")),e1=(0,n.x1)("button.background",{dark:"#0E639C",light:"#007ACC",hcDark:null,hcLight:"#0F4A85"},s.kg(1899,"Button background color.")),e2=(0,n.x1)("button.hoverBackground",{dark:(0,n.a)(e1,.2),light:(0,n.e$)(e1,.2),hcDark:e1,hcLight:e1},s.kg(1900,"Button background color when hovering.")),e5=(0,n.x1)("button.border",d,s.kg(1901,"Button border color.")),e4=(0,n.x1)("button.secondaryForeground",{dark:o.Q1.white,light:o.Q1.white,hcDark:o.Q1.white,hcLight:r},s.kg(1902,"Secondary button foreground color.")),e3=(0,n.x1)("button.secondaryBackground",{dark:"#3A3D41",light:"#5F6A79",hcDark:null,hcLight:o.Q1.white},s.kg(1903,"Secondary button background color.")),e7=(0,n.x1)("button.secondaryHoverBackground",{dark:(0,n.a)(e3,.2),light:(0,n.e$)(e3,.2),hcDark:null,hcLight:null},s.kg(1904,"Secondary button background color when hovering.")),e9=(0,n.x1)("radio.activeForeground",eW,s.kg(1905,"Foreground color of active radio option.")),e8=(0,n.x1)("radio.activeBackground",eB,s.kg(1906,"Background color of active radio option.")),e6=(0,n.x1)("radio.activeBorder",eA,s.kg(1907,"Border color of the active radio option.")),te=(0,n.x1)("radio.inactiveForeground",null,s.kg(1908,"Foreground color of inactive radio option.")),tt=(0,n.x1)("radio.inactiveBackground",null,s.kg(1909,"Background color of inactive radio option.")),ti=(0,n.x1)("radio.inactiveBorder",{light:(0,n.JO)(e9,.2),dark:(0,n.JO)(e9,.2),hcDark:(0,n.JO)(e9,.4),hcLight:(0,n.JO)(e9,.2)},s.kg(1910,"Border color of the inactive radio option.")),tn=(0,n.x1)("radio.inactiveHoverBackground",eF,s.kg(1911,"Background color of inactive active radio option when hovering.")),ts=(0,n.x1)("checkbox.background",eQ,s.kg(1912,"Background color of checkbox widget."));(0,n.x1)("checkbox.selectBackground",y,s.kg(1913,"Background color of checkbox widget when the element it's in is selected."));let to=(0,n.x1)("checkbox.foreground",eZ,s.kg(1914,"Foreground color of checkbox widget.")),tr=(0,n.x1)("checkbox.border",eX,s.kg(1915,"Border color of checkbox widget."));(0,n.x1)("checkbox.selectBorder",l,s.kg(1916,"Border color of checkbox widget when the element it's in is selected."));let ta=(0,n.x1)("checkbox.disabled.background",{op:7,color:ts,with:to,ratio:.33},s.kg(1917,"Background of a disabled checkbox.")),tl=(0,n.x1)("checkbox.disabled.foreground",{op:7,color:to,with:ts,ratio:.33},s.kg(1918,"Foreground of a disabled checkbox.")),th=(0,n.x1)("keybindingLabel.background",{dark:new o.Q1(new o.bU(128,128,128,.17)),light:new o.Q1(new o.bU(221,221,221,.4)),hcDark:o.Q1.transparent,hcLight:o.Q1.transparent},s.kg(1919,"Keybinding label background color. The keybinding label is used to represent a keyboard shortcut.")),td=(0,n.x1)("keybindingLabel.foreground",{dark:o.Q1.fromHex("#CCCCCC"),light:o.Q1.fromHex("#555555"),hcDark:o.Q1.white,hcLight:r},s.kg(1920,"Keybinding label foreground color. The keybinding label is used to represent a keyboard shortcut.")),tc=(0,n.x1)("keybindingLabel.border",{dark:new o.Q1(new o.bU(51,51,51,.6)),light:new o.Q1(new o.bU(204,204,204,.4)),hcDark:new o.Q1(new o.bU(111,195,223)),hcLight:d},s.kg(1921,"Keybinding label border color. The keybinding label is used to represent a keyboard shortcut.")),tu=(0,n.x1)("keybindingLabel.bottomBorder",{dark:new o.Q1(new o.bU(68,68,68,.6)),light:new o.Q1(new o.bU(187,187,187,.4)),hcDark:new o.Q1(new o.bU(111,195,223)),hcLight:r},s.kg(1922,"Keybinding label border bottom color. The keybinding label is used to represent a keyboard shortcut.")),tg=(0,n.x1)("list.focusBackground",null,s.kg(1923,"List/Tree background color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),tp=(0,n.x1)("list.focusForeground",null,s.kg(1924,"List/Tree foreground color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),tm=(0,n.x1)("list.focusOutline",{dark:h,light:h,hcDark:c,hcLight:c},s.kg(1925,"List/Tree outline color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),tf=(0,n.x1)("list.focusAndSelectionOutline",null,s.kg(1926,"List/Tree outline color for the focused item when the list/tree is active and selected. An active list/tree has keyboard focus, an inactive does not.")),t_=(0,n.x1)("list.activeSelectionBackground",{dark:"#04395E",light:"#0060C0",hcDark:null,hcLight:o.Q1.fromHex("#0F4A85").transparent(.1)},s.kg(1927,"List/Tree background color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),tv=(0,n.x1)("list.activeSelectionForeground",{dark:o.Q1.white,light:o.Q1.white,hcDark:null,hcLight:null},s.kg(1928,"List/Tree foreground color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),tb=(0,n.x1)("list.activeSelectionIconForeground",null,s.kg(1929,"List/Tree icon foreground color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),tC=(0,n.x1)("list.inactiveSelectionBackground",{dark:"#37373D",light:"#E4E6F1",hcDark:null,hcLight:o.Q1.fromHex("#0F4A85").transparent(.1)},s.kg(1930,"List/Tree background color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),tw=(0,n.x1)("list.inactiveSelectionForeground",null,s.kg(1931,"List/Tree foreground color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),ty=(0,n.x1)("list.inactiveSelectionIconForeground",null,s.kg(1932,"List/Tree icon foreground color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),tS=(0,n.x1)("list.inactiveFocusBackground",null,s.kg(1933,"List/Tree background color for the focused item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),tk=(0,n.x1)("list.inactiveFocusOutline",null,s.kg(1934,"List/Tree outline color for the focused item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),tx=(0,n.x1)("list.hoverBackground",{dark:"#2A2D2E",light:"#F0F0F0",hcDark:o.Q1.white.transparent(.1),hcLight:o.Q1.fromHex("#0F4A85").transparent(.1)},s.kg(1935,"List/Tree background when hovering over items using the mouse.")),tL=(0,n.x1)("list.hoverForeground",null,s.kg(1936,"List/Tree foreground when hovering over items using the mouse.")),tD=(0,n.x1)("list.dropBackground",{dark:"#062F4A",light:"#D6EBFF",hcDark:null,hcLight:null},s.kg(1937,"List/Tree drag and drop background when moving items over other items when using the mouse.")),tI=(0,n.x1)("list.dropBetweenBackground",{dark:l,light:l,hcDark:null,hcLight:null},s.kg(1938,"List/Tree drag and drop border color when moving items between items when using the mouse.")),tN=(0,n.x1)("list.highlightForeground",{dark:"#2AAAFF",light:"#0066BF",hcDark:h,hcLight:h},s.kg(1939,"List/Tree foreground color of the match highlights when searching inside the list/tree.")),tE=(0,n.x1)("list.focusHighlightForeground",{dark:tN,light:(0,n.Hz)(t_,tN,"#BBE7FF"),hcDark:tN,hcLight:tN},s.kg(1940,"List/Tree foreground color of the match highlights on actively focused items when searching inside the list/tree."));(0,n.x1)("list.invalidItemForeground",{dark:"#B89500",light:"#B89500",hcDark:"#B89500",hcLight:"#B5200D"},s.kg(1941,"List/Tree foreground color for invalid items, for example an unresolved root in explorer.")),(0,n.x1)("list.errorForeground",{dark:"#F88070",light:"#B01011",hcDark:null,hcLight:null},s.kg(1942,"Foreground color of list items containing errors.")),(0,n.x1)("list.warningForeground",{dark:"#CCA700",light:"#855F00",hcDark:null,hcLight:null},s.kg(1943,"Foreground color of list items containing warnings."));let tM=(0,n.x1)("listFilterWidget.background",{light:(0,n.e$)(y,0),dark:(0,n.a)(y,0),hcDark:y,hcLight:y},s.kg(1944,"Background color of the type filter widget in lists and trees.")),tT=(0,n.x1)("listFilterWidget.outline",{dark:o.Q1.transparent,light:o.Q1.transparent,hcDark:"#f38518",hcLight:"#007ACC"},s.kg(1945,"Outline color of the type filter widget in lists and trees.")),tR=(0,n.x1)("listFilterWidget.noMatchesOutline",{dark:"#BE1100",light:"#BE1100",hcDark:d,hcLight:d},s.kg(1946,"Outline color of the type filter widget in lists and trees, when there are no matches.")),tO=(0,n.x1)("listFilterWidget.shadow",er,s.kg(1947,"Shadow color of the type filter widget in lists and trees."));(0,n.x1)("list.filterMatchBackground",{dark:W,light:W,hcDark:null,hcLight:null},s.kg(1948,"Background color of the filtered match.")),(0,n.x1)("list.filterMatchBorder",{dark:V,light:V,hcDark:d,hcLight:c},s.kg(1949,"Border color of the filtered match.")),(0,n.x1)("list.deemphasizedForeground",{dark:"#8C8C8C",light:"#8E8E90",hcDark:"#A7A8A9",hcLight:"#666666"},s.kg(1950,"List/Tree foreground color for items that are deemphasized."));let tP=(0,n.x1)("tree.indentGuidesStroke",{dark:"#585858",light:"#a9a9a9",hcDark:"#a9a9a9",hcLight:"#a5a5a5"},s.kg(1951,"Tree stroke color for the indentation guides.")),tA=(0,n.x1)("tree.inactiveIndentGuidesStroke",(0,n.JO)(tP,.4),s.kg(1952,"Tree stroke color for the indentation guides that are not active.")),tF=(0,n.x1)("tree.tableColumnsBorder",{dark:"#CCCCCC20",light:"#61616120",hcDark:null,hcLight:null},s.kg(1953,"Table border color between columns.")),tB=(0,n.x1)("tree.tableOddRowsBackground",{dark:(0,n.JO)(r,.04),light:(0,n.JO)(r,.04),hcDark:null,hcLight:null},s.kg(1954,"Background color for odd table rows."));(0,n.x1)("editorActionList.background",y,s.kg(1955,"Action List background color."));let tW=(0,n.x1)("editorActionList.foreground",S,s.kg(1956,"Action List foreground color."));(0,n.x1)("editorActionList.focusForeground",tv,s.kg(1957,"Action List foreground color for the focused item.")),(0,n.x1)("editorActionList.focusBackground",t_,s.kg(1958,"Action List background color for the focused item."));let tH=(0,n.x1)("menu.border",{dark:null,light:null,hcDark:d,hcLight:d},s.kg(1959,"Border color of menus.")),tV=(0,n.x1)("menu.foreground",eZ,s.kg(1960,"Foreground color of menu items.")),tz=(0,n.x1)("menu.background",eQ,s.kg(1961,"Background color of menu items.")),tU=(0,n.x1)("menu.selectionForeground",tv,s.kg(1962,"Foreground color of the selected menu item in menus.")),tj=(0,n.x1)("menu.selectionBackground",t_,s.kg(1963,"Background color of the selected menu item in menus.")),t$=(0,n.x1)("menu.selectionBorder",{dark:null,light:null,hcDark:c,hcLight:c},s.kg(1964,"Border color of the selected menu item in menus.")),tK=(0,n.x1)("menu.separatorBackground",{dark:"#606060",light:"#D4D4D4",hcDark:d,hcLight:d},s.kg(1965,"Color of a separator menu item in menus.")),tG=(0,n.x1)("quickInput.background",y,s.kg(1992,"Quick picker background color. The quick picker widget is the container for pickers like the command palette.")),tq=(0,n.x1)("quickInput.foreground",S,s.kg(1993,"Quick picker foreground color. The quick picker widget is the container for pickers like the command palette.")),tQ=(0,n.x1)("quickInputTitle.background",{dark:new o.Q1(new o.bU(255,255,255,.105)),light:new o.Q1(new o.bU(0,0,0,.06)),hcDark:"#000000",hcLight:o.Q1.white},s.kg(1994,"Quick picker title background color. The quick picker widget is the container for pickers like the command palette.")),tY=(0,n.x1)("pickerGroup.foreground",{dark:"#3794FF",light:"#0066BF",hcDark:o.Q1.white,hcLight:"#0F4A85"},s.kg(1995,"Quick picker color for grouping labels.")),tZ=(0,n.x1)("pickerGroup.border",{dark:"#3F3F46",light:"#CCCEDB",hcDark:o.Q1.white,hcLight:"#0F4A85"},s.kg(1996,"Quick picker color for grouping borders.")),tX=(0,n.x1)("quickInput.list.focusBackground",null,"",void 0,s.kg(1997,"Please use quickInputList.focusBackground instead")),tJ=(0,n.x1)("quickInputList.focusForeground",tv,s.kg(1998,"Quick picker foreground color for the focused item.")),t0=(0,n.x1)("quickInputList.focusIconForeground",tb,s.kg(1999,"Quick picker icon foreground color for the focused item.")),t1=(0,n.x1)("quickInputList.focusBackground",{dark:(0,n.yL)(tX,t_),light:(0,n.yL)(tX,t_),hcDark:null,hcLight:null},s.kg(2e3,"Quick picker background color for the focused item."));(0,n.x1)("search.resultsInfoForeground",{light:r,dark:(0,n.JO)(r,.65),hcDark:r,hcLight:r},s.kg(2001,"Color of the text in the search viewlet's completion message.")),(0,n.x1)("searchEditor.findMatchBackground",{light:(0,n.JO)(W,.66),dark:(0,n.JO)(W,.66),hcDark:W,hcLight:W},s.kg(2002,"Color of the Search Editor query matches.")),(0,n.x1)("searchEditor.findMatchBorder",{light:(0,n.JO)(V,.66),dark:(0,n.JO)(V,.66),hcDark:V,hcLight:V},s.kg(2003,"Border color of the Search Editor query matches."))},77897:(e,t,i)=>{"use strict";i.d(t,{FH:()=>h,Sc:()=>u,kk:()=>g,lM:()=>d});var n=i(55354),s=i(17354),o=i(27281),r=i(73970),a=i(85350),l=i(61896);i(57236);let h={inputActiveOptionBorder:"#007ACC00",inputActiveOptionForeground:"#FFFFFF",inputActiveOptionBackground:"#0E639C50"};class d extends l.x{get onChange(){return this._onChange.event}get onKeyDown(){return this._onKeyDown.event}constructor(e){super(),this._onChange=this._register(new s.vl),this._onKeyDown=this._register(new s.vl),this._opts=e,this._checked=this._opts.isChecked;let t=["monaco-custom-toggle"];this._opts.icon&&(this._icon=this._opts.icon,t.push(...o.L.asClassNameArray(this._icon))),this._opts.actionClassName&&t.push(...this._opts.actionClassName.split(" ")),this._checked&&t.push("checked"),this.domNode=document.createElement("div"),this._hover=this._register((0,r.i)().setupManagedHover(e.hoverDelegate??(0,a.nZ)("mouse"),this.domNode,this._opts.title)),this.domNode.classList.add(...t),this._opts.notFocusable||(this.domNode.tabIndex=0),this.domNode.setAttribute("role","checkbox"),this.domNode.setAttribute("aria-checked",String(this._checked)),this.domNode.setAttribute("aria-label",this._opts.title),this.applyStyles(),this.onclick(this.domNode,e=>{this.enabled&&(this.checked=!this._checked,this._onChange.fire(!1),e.preventDefault())}),this._register(this.ignoreGesture(this.domNode)),this.onkeydown(this.domNode,e=>{if(this.enabled){if(10===e.keyCode||3===e.keyCode){this.checked=!this._checked,this._onChange.fire(!0),e.preventDefault(),e.stopPropagation();return}this._onKeyDown.fire(e)}})}get enabled(){return"true"!==this.domNode.getAttribute("aria-disabled")}focus(){this.domNode.focus()}get checked(){return this._checked}set checked(e){this._checked=e,this.domNode.setAttribute("aria-checked",String(this._checked)),this.domNode.classList.toggle("checked",this._checked),this.applyStyles()}setIcon(e){this._icon&&this.domNode.classList.remove(...o.L.asClassNameArray(this._icon)),this._icon=e,this._icon&&this.domNode.classList.add(...o.L.asClassNameArray(this._icon))}width(){return 22}applyStyles(){this.domNode&&(this.domNode.style.borderColor=this._checked&&this._opts.inputActiveOptionBorder||"",this.domNode.style.color=this._checked&&this._opts.inputActiveOptionForeground||"inherit",this.domNode.style.backgroundColor=this._checked&&this._opts.inputActiveOptionBackground||"")}enable(){this.domNode.setAttribute("aria-disabled",String(!1)),this.domNode.classList.remove("disabled")}disable(){this.domNode.setAttribute("aria-disabled",String(!0)),this.domNode.classList.add("disabled")}setTitle(e){this._hover.update(e),this.domNode.setAttribute("aria-label",e)}}class c extends l.x{static{this.CLASS_NAME="monaco-checkbox"}constructor(e,t,i){super(),this.checkbox=e,this.domNode=t,this.styles=i,this._onChange=this._register(new s.vl),this.onChange=this._onChange.event,this.applyStyles()}get enabled(){return this.checkbox.enabled}enable(){this.checkbox.enable(),this.applyStyles(!0)}disable(){this.checkbox.disable(),this.applyStyles(!1)}setTitle(e){this.checkbox.setTitle(e)}applyStyles(e=this.enabled){this.domNode.style.color=(e?this.styles.checkboxForeground:this.styles.checkboxDisabledForeground)||"",this.domNode.style.backgroundColor=(e?this.styles.checkboxBackground:this.styles.checkboxDisabledBackground)||"",this.domNode.style.borderColor=(e?this.styles.checkboxBorder:this.styles.checkboxDisabledBackground)||"";let t=this.styles.size||18;this.domNode.style.width=this.domNode.style.height=this.domNode.style.fontSize=`${t}px`,this.domNode.style.fontSize=`${t-2}px`}}class u extends c{constructor(e,t,i){let s=new d({title:e,isChecked:t,icon:n.W.check,actionClassName:c.CLASS_NAME,hoverDelegate:i.hoverDelegate,...h});super(s,s.domNode,i),this._register(s),this._register(this.checkbox.onChange(e=>{this.applyStyles(),this._onChange.fire(e)}))}get checked(){return this.checkbox.checked}set checked(e){this.checkbox.checked=e,this.applyStyles()}applyStyles(e){this.checkbox.checked?this.checkbox.setIcon(n.W.check):this.checkbox.setIcon(void 0),super.applyStyles(e)}}class g extends c{constructor(e,t,i){let s;switch(t){case!0:s=n.W.check;break;case"partial":s=n.W.dash;break;case!1:s=void 0}let o=new d({title:e,isChecked:!0===t,icon:s,actionClassName:u.CLASS_NAME,hoverDelegate:i.hoverDelegate,...h});super(o,o.domNode,i),this._state=t,this._register(o),this._register(this.checkbox.onChange(e=>{this._state=this.checkbox.checked,this.applyStyles(),this._onChange.fire(e)}))}get checked(){return this._state}set checked(e){this._state!==e&&(this._state=e,this.checkbox.checked=!0===e,this.applyStyles())}applyStyles(e){switch(this._state){case!0:this.checkbox.setIcon(n.W.check);break;case"partial":this.checkbox.setIcon(n.W.dash);break;case!1:this.checkbox.setIcon(void 0)}super.applyStyles(e)}}},78119:()=>{},78271:(e,t,i)=>{"use strict";i.d(t,{MU:()=>D,QC:()=>S,Se:()=>x,oO:()=>L});var n=i(29195),s=i(87899),o=i(7633),r=i(35023),a=i(76144),l=i(61896),h=i(45262),d=i(27281);class c extends l.x{constructor(e){super(),this._onActivate=e.onActivate,this.bgDomNode=document.createElement("div"),this.bgDomNode.className="arrow-background",this.bgDomNode.style.position="absolute",this.bgDomNode.style.width=e.bgWidth+"px",this.bgDomNode.style.height=e.bgHeight+"px",void 0!==e.top&&(this.bgDomNode.style.top="0px"),void 0!==e.left&&(this.bgDomNode.style.left="0px"),void 0!==e.bottom&&(this.bgDomNode.style.bottom="0px"),void 0!==e.right&&(this.bgDomNode.style.right="0px"),this.domNode=document.createElement("div"),this.domNode.className=e.className,this.domNode.classList.add(...d.L.asClassNameArray(e.icon)),this.domNode.style.position="absolute",this.domNode.style.width="11px",this.domNode.style.height="11px",void 0!==e.top&&(this.domNode.style.top=e.top+"px"),void 0!==e.left&&(this.domNode.style.left=e.left+"px"),void 0!==e.bottom&&(this.domNode.style.bottom=e.bottom+"px"),void 0!==e.right&&(this.domNode.style.right=e.right+"px"),this._pointerMoveMonitor=this._register(new a._),this._register(s.un(this.bgDomNode,s.Bx.POINTER_DOWN,e=>this._arrowPointerDown(e))),this._register(s.un(this.domNode,s.Bx.POINTER_DOWN,e=>this._arrowPointerDown(e))),this._pointerdownRepeatTimer=this._register(new s.Be),this._pointerdownScheduleRepeatTimer=this._register(new h.pc)}_arrowPointerDown(e){if(!e.target||!(e.target instanceof Element))return;let t=()=>{this._pointerdownRepeatTimer.cancelAndSet(()=>this._onActivate(),1e3/24,s.zk(e))};this._onActivate(),this._pointerdownRepeatTimer.cancel(),this._pointerdownScheduleRepeatTimer.cancelAndSet(t,200),this._pointerMoveMonitor.startMonitoring(e.target,e.pointerId,e.buttons,e=>{},()=>{this._pointerdownRepeatTimer.cancel(),this._pointerdownScheduleRepeatTimer.cancel()}),e.preventDefault()}}var u=i(82102);class g extends u.jG{constructor(e,t,i){super(),this._visibility=e,this._visibleClassName=t,this._invisibleClassName=i,this._domNode=null,this._isVisible=!1,this._isNeeded=!1,this._rawShouldBeVisible=!1,this._shouldBeVisible=!1,this._revealTimer=this._register(new h.pc)}setVisibility(e){this._visibility!==e&&(this._visibility=e,this._updateShouldBeVisible())}setShouldBeVisible(e){this._rawShouldBeVisible=e,this._updateShouldBeVisible()}_applyVisibilitySetting(){return 2!==this._visibility&&(3===this._visibility||this._rawShouldBeVisible)}_updateShouldBeVisible(){let e=this._applyVisibilitySetting();this._shouldBeVisible!==e&&(this._shouldBeVisible=e,this.ensureVisibility())}setIsNeeded(e){this._isNeeded!==e&&(this._isNeeded=e,this.ensureVisibility())}setDomNode(e){this._domNode=e,this._domNode.setClassName(this._invisibleClassName),this.setShouldBeVisible(!1)}ensureVisibility(){if(!this._isNeeded)return void this._hide(!1);this._shouldBeVisible?this._reveal():this._hide(!0)}_reveal(){this._isVisible||(this._isVisible=!0,this._revealTimer.setIfNotSet(()=>{this._domNode?.setClassName(this._visibleClassName)},0))}_hide(e){this._revealTimer.cancel(),this._isVisible&&(this._isVisible=!1,this._domNode?.setClassName(this._invisibleClassName+(e?" fade":"")))}}var p=i(28669);class m extends l.x{constructor(e){super(),this._lazyRender=e.lazyRender,this._host=e.host,this._scrollable=e.scrollable,this._scrollByPage=e.scrollByPage,this._scrollbarState=e.scrollbarState,this._visibilityController=this._register(new g(e.visibility,"visible scrollbar "+e.extraScrollbarClassName,"invisible scrollbar "+e.extraScrollbarClassName)),this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._pointerMoveMonitor=this._register(new a._),this._shouldRender=!0,this.domNode=(0,o.Z)(document.createElement("div")),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this._visibilityController.setDomNode(this.domNode),this.domNode.setPosition("absolute"),this._register(s.ko(this.domNode.domNode,s.Bx.POINTER_DOWN,e=>this._domNodePointerDown(e)))}_createArrow(e){let t=this._register(new c(e));this.domNode.domNode.appendChild(t.bgDomNode),this.domNode.domNode.appendChild(t.domNode)}_createSlider(e,t,i,n){this.slider=(0,o.Z)(document.createElement("div")),this.slider.setClassName("slider"),this.slider.setPosition("absolute"),this.slider.setTop(e),this.slider.setLeft(t),"number"==typeof i&&this.slider.setWidth(i),"number"==typeof n&&this.slider.setHeight(n),this.slider.setLayerHinting(!0),this.slider.setContain("strict"),this.domNode.domNode.appendChild(this.slider.domNode),this._register(s.ko(this.slider.domNode,s.Bx.POINTER_DOWN,e=>{0===e.button&&(e.preventDefault(),this._sliderPointerDown(e))})),this.onclick(this.slider.domNode,e=>{e.leftButton&&e.stopPropagation()})}_onElementSize(e){return this._scrollbarState.setVisibleSize(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}_onElementScrollSize(e){return this._scrollbarState.setScrollSize(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}_onElementScrollPosition(e){return this._scrollbarState.setScrollPosition(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}beginReveal(){this._visibilityController.setShouldBeVisible(!0)}beginHide(){this._visibilityController.setShouldBeVisible(!1)}render(){this._shouldRender&&(this._shouldRender=!1,this._renderDomNode(this._scrollbarState.getRectangleLargeSize(),this._scrollbarState.getRectangleSmallSize()),this._updateSlider(this._scrollbarState.getSliderSize(),this._scrollbarState.getArrowSize()+this._scrollbarState.getSliderPosition()))}_domNodePointerDown(e){e.target===this.domNode.domNode&&this._onPointerDown(e)}delegatePointerDown(e){let t=this.domNode.domNode.getClientRects()[0].top,i=t+this._scrollbarState.getSliderPosition(),n=t+this._scrollbarState.getSliderPosition()+this._scrollbarState.getSliderSize(),s=this._sliderPointerPosition(e);i<=s&&s<=n?0===e.button&&(e.preventDefault(),this._sliderPointerDown(e)):this._onPointerDown(e)}_onPointerDown(e){let t,i;if(e.target===this.domNode.domNode&&"number"==typeof e.offsetX&&"number"==typeof e.offsetY)t=e.offsetX,i=e.offsetY;else{let n=s.BK(this.domNode.domNode);t=e.pageX-n.left,i=e.pageY-n.top}let n="mouse"===e.pointerType,o=0===e.button;if(o||!n){let e=this._pointerDownRelativePosition(t,i);this._setDesiredScrollPositionNow(this._scrollByPage?this._scrollbarState.getDesiredScrollPositionFromOffsetPaged(e):this._scrollbarState.getDesiredScrollPositionFromOffset(e))}o&&(e.preventDefault(),this._sliderPointerDown(e))}_sliderPointerDown(e){if(!e.target||!(e.target instanceof Element))return;let t=this._sliderPointerPosition(e),i=this._sliderOrthogonalPointerPosition(e),n=this._scrollbarState.clone();this.slider.toggleClassName("active",!0),this._pointerMoveMonitor.startMonitoring(e.target,e.pointerId,e.buttons,e=>{let s=Math.abs(this._sliderOrthogonalPointerPosition(e)-i);if(p.uF&&s>140)return void this._setDesiredScrollPositionNow(n.getScrollPosition());let o=this._sliderPointerPosition(e);this._setDesiredScrollPositionNow(n.getDesiredScrollPositionFromDelta(o-t))},()=>{this.slider.toggleClassName("active",!1),this._host.onDragEnd()}),this._host.onDragStart()}_setDesiredScrollPositionNow(e){let t={};this.writeScrollPosition(t,e),this._scrollable.setScrollPositionNow(t)}updateScrollbarSize(e){this._updateScrollbarSize(e),this._scrollbarState.setScrollbarSize(e),this._shouldRender=!0,this._lazyRender||this.render()}isNeeded(){return this._scrollbarState.isNeeded()}}var f=i(47088),_=i(55354);class v extends m{constructor(e,t,i){let n=e.getScrollDimensions();if(super({lazyRender:t.lazyRender,host:i,scrollbarState:new f.m(t.horizontalHasArrows?t.arrowSize:0,2===t.horizontal?0:t.horizontalScrollbarSize,2===t.vertical?0:t.verticalScrollbarSize,n.width,n.scrollWidth,e.getCurrentScrollPosition().scrollLeft),visibility:t.horizontal,extraScrollbarClassName:"horizontal",scrollable:e,scrollByPage:t.scrollByPage}),t.horizontalHasArrows){let e=(t.arrowSize-11)/2,i=(t.horizontalScrollbarSize-11)/2;this._createArrow({className:"scra",icon:_.W.scrollbarButtonLeft,top:i,left:e,bottom:void 0,right:void 0,bgWidth:t.arrowSize,bgHeight:t.horizontalScrollbarSize,onActivate:()=>this._host.onMouseWheel(new r.$(null,1,0))}),this._createArrow({className:"scra",icon:_.W.scrollbarButtonRight,top:i,left:void 0,bottom:void 0,right:e,bgWidth:t.arrowSize,bgHeight:t.horizontalScrollbarSize,onActivate:()=>this._host.onMouseWheel(new r.$(null,-1,0))})}this._createSlider(Math.floor((t.horizontalScrollbarSize-t.horizontalSliderSize)/2),0,void 0,t.horizontalSliderSize)}_updateSlider(e,t){this.slider.setWidth(e),this.slider.setLeft(t)}_renderDomNode(e,t){this.domNode.setWidth(e),this.domNode.setHeight(t),this.domNode.setLeft(0),this.domNode.setBottom(0)}onDidScroll(e){return this._shouldRender=this._onElementScrollSize(e.scrollWidth)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(e.scrollLeft)||this._shouldRender,this._shouldRender=this._onElementSize(e.width)||this._shouldRender,this._shouldRender}_pointerDownRelativePosition(e,t){return e}_sliderPointerPosition(e){return e.pageX}_sliderOrthogonalPointerPosition(e){return e.pageY}_updateScrollbarSize(e){this.slider.setHeight(e)}writeScrollPosition(e,t){e.scrollLeft=t}updateOptions(e){this.updateScrollbarSize(2===e.horizontal?0:e.horizontalScrollbarSize),this._scrollbarState.setOppositeScrollbarSize(2===e.vertical?0:e.verticalScrollbarSize),this._visibilityController.setVisibility(e.horizontal),this._scrollByPage=e.scrollByPage}}class b extends m{constructor(e,t,i){let n=e.getScrollDimensions();if(super({lazyRender:t.lazyRender,host:i,scrollbarState:new f.m(t.verticalHasArrows?t.arrowSize:0,2===t.vertical?0:t.verticalScrollbarSize,0,n.height,n.scrollHeight,e.getCurrentScrollPosition().scrollTop),visibility:t.vertical,extraScrollbarClassName:"vertical",scrollable:e,scrollByPage:t.scrollByPage}),t.verticalHasArrows){let e=(t.arrowSize-11)/2,i=(t.verticalScrollbarSize-11)/2;this._createArrow({className:"scra",icon:_.W.scrollbarButtonUp,top:e,left:i,bottom:void 0,right:void 0,bgWidth:t.verticalScrollbarSize,bgHeight:t.arrowSize,onActivate:()=>this._host.onMouseWheel(new r.$(null,0,1))}),this._createArrow({className:"scra",icon:_.W.scrollbarButtonDown,top:void 0,left:i,bottom:e,right:void 0,bgWidth:t.verticalScrollbarSize,bgHeight:t.arrowSize,onActivate:()=>this._host.onMouseWheel(new r.$(null,0,-1))})}this._createSlider(0,Math.floor((t.verticalScrollbarSize-t.verticalSliderSize)/2),t.verticalSliderSize,void 0)}_updateSlider(e,t){this.slider.setHeight(e),this.slider.setTop(t)}_renderDomNode(e,t){this.domNode.setWidth(t),this.domNode.setHeight(e),this.domNode.setRight(0),this.domNode.setTop(0)}onDidScroll(e){return this._shouldRender=this._onElementScrollSize(e.scrollHeight)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(e.scrollTop)||this._shouldRender,this._shouldRender=this._onElementSize(e.height)||this._shouldRender,this._shouldRender}_pointerDownRelativePosition(e,t){return t}_sliderPointerPosition(e){return e.pageY}_sliderOrthogonalPointerPosition(e){return e.pageX}_updateScrollbarSize(e){this.slider.setWidth(e)}writeScrollPosition(e,t){e.scrollTop=t}updateOptions(e){this.updateScrollbarSize(2===e.vertical?0:e.verticalScrollbarSize),this._scrollbarState.setOppositeScrollbarSize(0),this._visibilityController.setVisibility(e.vertical),this._scrollByPage=e.scrollByPage}}var C=i(17354),w=i(56487);i(84422);class y{constructor(e,t,i){this.timestamp=e,this.deltaX=t,this.deltaY=i,this.score=0}}class S{static{this.INSTANCE=new S}constructor(){this._capacity=5,this._memory=[],this._front=-1,this._rear=-1}isPhysicalMouseWheel(){if(-1===this._front&&-1===this._rear)return!1;let e=1,t=0,i=1,n=this._rear;for(;;){let s=n===this._front?e:Math.pow(2,-i);if(e-=s,t+=this._memory[n].score*s,n===this._front)break;n=(this._capacity+n-1)%this._capacity,i++}return t<=.5}acceptStandardWheelEvent(e){if(n.H8){let t=s.zk(e.browserEvent),i=(0,n.pR)(t);this.accept(Date.now(),e.deltaX*i,e.deltaY*i)}else this.accept(Date.now(),e.deltaX,e.deltaY)}accept(e,t,i){let n=null,s=new y(e,t,i);-1===this._front&&-1===this._rear?(this._memory[0]=s,this._front=0,this._rear=0):(n=this._memory[this._rear],this._rear=(this._rear+1)%this._capacity,this._rear===this._front&&(this._front=(this._front+1)%this._capacity),this._memory[this._rear]=s),s.score=this._computeScore(s,n)}_computeScore(e,t){if(Math.abs(e.deltaX)>0&&Math.abs(e.deltaY)>0)return 1;let i=.5;if(this._isAlmostInt(e.deltaX)&&this._isAlmostInt(e.deltaY)||(i+=.25),t){let n=Math.abs(e.deltaX),s=Math.abs(e.deltaY),o=Math.abs(t.deltaX),r=Math.abs(t.deltaY),a=Math.max(Math.min(n,o),1),l=Math.max(Math.min(s,r),1),h=Math.max(s,r);Math.max(n,o)%a==0&&h%l==0&&(i-=.5)}return Math.min(Math.max(i,0),1)}_isAlmostInt(e){return Math.abs(Math.round(e)-e)<.01+100*Number.EPSILON}}class k extends l.x{get onScroll(){return this._onScroll.event}get options(){return this._options}constructor(e,t,i){super(),this._inertialTimeout=null,this._inertialSpeed={X:0,Y:0},this._onScroll=this._register(new C.vl),this._onWillScroll=this._register(new C.vl),e.style.overflow="hidden",this._options=function(e){let t={lazyRender:void 0!==e.lazyRender&&e.lazyRender,className:void 0!==e.className?e.className:"",useShadows:void 0===e.useShadows||e.useShadows,handleMouseWheel:void 0===e.handleMouseWheel||e.handleMouseWheel,flipAxes:void 0!==e.flipAxes&&e.flipAxes,consumeMouseWheelIfScrollbarIsNeeded:void 0!==e.consumeMouseWheelIfScrollbarIsNeeded&&e.consumeMouseWheelIfScrollbarIsNeeded,alwaysConsumeMouseWheel:void 0!==e.alwaysConsumeMouseWheel&&e.alwaysConsumeMouseWheel,scrollYToX:void 0!==e.scrollYToX&&e.scrollYToX,mouseWheelScrollSensitivity:void 0!==e.mouseWheelScrollSensitivity?e.mouseWheelScrollSensitivity:1,fastScrollSensitivity:void 0!==e.fastScrollSensitivity?e.fastScrollSensitivity:5,scrollPredominantAxis:void 0===e.scrollPredominantAxis||e.scrollPredominantAxis,mouseWheelSmoothScroll:void 0===e.mouseWheelSmoothScroll||e.mouseWheelSmoothScroll,inertialScroll:void 0!==e.inertialScroll&&e.inertialScroll,arrowSize:void 0!==e.arrowSize?e.arrowSize:11,listenOnDomNode:void 0!==e.listenOnDomNode?e.listenOnDomNode:null,horizontal:void 0!==e.horizontal?e.horizontal:1,horizontalScrollbarSize:void 0!==e.horizontalScrollbarSize?e.horizontalScrollbarSize:10,horizontalSliderSize:void 0!==e.horizontalSliderSize?e.horizontalSliderSize:0,horizontalHasArrows:void 0!==e.horizontalHasArrows&&e.horizontalHasArrows,vertical:void 0!==e.vertical?e.vertical:1,verticalScrollbarSize:void 0!==e.verticalScrollbarSize?e.verticalScrollbarSize:10,verticalHasArrows:void 0!==e.verticalHasArrows&&e.verticalHasArrows,verticalSliderSize:void 0!==e.verticalSliderSize?e.verticalSliderSize:0,scrollByPage:void 0!==e.scrollByPage&&e.scrollByPage};return t.horizontalSliderSize=void 0!==e.horizontalSliderSize?e.horizontalSliderSize:t.horizontalScrollbarSize,t.verticalSliderSize=void 0!==e.verticalSliderSize?e.verticalSliderSize:t.verticalScrollbarSize,p.zx&&(t.className+=" mac"),t}(t),this._scrollable=i,this._register(this._scrollable.onScroll(e=>{this._onWillScroll.fire(e),this._onDidScroll(e),this._onScroll.fire(e)}));let n={onMouseWheel:e=>this._onMouseWheel(e),onDragStart:()=>this._onDragStart(),onDragEnd:()=>this._onDragEnd()};this._verticalScrollbar=this._register(new b(this._scrollable,this._options,n)),this._horizontalScrollbar=this._register(new v(this._scrollable,this._options,n)),this._domNode=document.createElement("div"),this._domNode.className="monaco-scrollable-element "+this._options.className,this._domNode.setAttribute("role","presentation"),this._domNode.style.position="relative",this._domNode.style.overflow="hidden",this._domNode.appendChild(e),this._domNode.appendChild(this._horizontalScrollbar.domNode.domNode),this._domNode.appendChild(this._verticalScrollbar.domNode.domNode),this._options.useShadows?(this._leftShadowDomNode=(0,o.Z)(document.createElement("div")),this._leftShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._leftShadowDomNode.domNode),this._topShadowDomNode=(0,o.Z)(document.createElement("div")),this._topShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._topShadowDomNode.domNode),this._topLeftShadowDomNode=(0,o.Z)(document.createElement("div")),this._topLeftShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._topLeftShadowDomNode.domNode)):(this._leftShadowDomNode=null,this._topShadowDomNode=null,this._topLeftShadowDomNode=null),this._listenOnDomNode=this._options.listenOnDomNode||this._domNode,this._mouseWheelToDispose=[],this._setListeningToMouseWheel(this._options.handleMouseWheel),this.onmouseover(this._listenOnDomNode,e=>this._onMouseOver(e)),this.onmouseleave(this._listenOnDomNode,e=>this._onMouseLeave(e)),this._hideTimeout=this._register(new h.pc),this._isDragging=!1,this._mouseIsOver=!1,this._shouldRender=!0,this._revealOnScroll=!0}dispose(){this._mouseWheelToDispose=(0,u.AS)(this._mouseWheelToDispose),this._inertialTimeout&&(this._inertialTimeout.dispose(),this._inertialTimeout=null),super.dispose()}getDomNode(){return this._domNode}getOverviewRulerLayoutInfo(){return{parent:this._domNode,insertBefore:this._verticalScrollbar.domNode.domNode}}delegateVerticalScrollbarPointerDown(e){this._verticalScrollbar.delegatePointerDown(e)}getScrollDimensions(){return this._scrollable.getScrollDimensions()}setScrollDimensions(e){this._scrollable.setScrollDimensions(e,!1)}updateClassName(e){this._options.className=e,p.zx&&(this._options.className+=" mac"),this._domNode.className="monaco-scrollable-element "+this._options.className}updateOptions(e){void 0!==e.handleMouseWheel&&(this._options.handleMouseWheel=e.handleMouseWheel,this._setListeningToMouseWheel(this._options.handleMouseWheel)),void 0!==e.mouseWheelScrollSensitivity&&(this._options.mouseWheelScrollSensitivity=e.mouseWheelScrollSensitivity),void 0!==e.fastScrollSensitivity&&(this._options.fastScrollSensitivity=e.fastScrollSensitivity),void 0!==e.scrollPredominantAxis&&(this._options.scrollPredominantAxis=e.scrollPredominantAxis),void 0!==e.horizontal&&(this._options.horizontal=e.horizontal),void 0!==e.vertical&&(this._options.vertical=e.vertical),void 0!==e.horizontalScrollbarSize&&(this._options.horizontalScrollbarSize=e.horizontalScrollbarSize),void 0!==e.verticalScrollbarSize&&(this._options.verticalScrollbarSize=e.verticalScrollbarSize),void 0!==e.scrollByPage&&(this._options.scrollByPage=e.scrollByPage),this._horizontalScrollbar.updateOptions(this._options),this._verticalScrollbar.updateOptions(this._options),this._options.lazyRender||this._render()}delegateScrollFromMouseWheelEvent(e){this._onMouseWheel(new r.$(e))}async _periodicSync(){let e=!1;(0!==this._inertialSpeed.X||0!==this._inertialSpeed.Y)&&(this._scrollable.setScrollPositionNow({scrollTop:this._scrollable.getCurrentScrollPosition().scrollTop-100*this._inertialSpeed.Y,scrollLeft:this._scrollable.getCurrentScrollPosition().scrollLeft-100*this._inertialSpeed.X}),this._inertialSpeed.X*=.9,this._inertialSpeed.Y*=.9,.01>Math.abs(this._inertialSpeed.X)&&(this._inertialSpeed.X=0),.01>Math.abs(this._inertialSpeed.Y)&&(this._inertialSpeed.Y=0),e=0!==this._inertialSpeed.X||0!==this._inertialSpeed.Y),e?(this._inertialTimeout||(this._inertialTimeout=new h.pc),this._inertialTimeout.cancelAndSet(()=>this._periodicSync(),1e3/60)):(this._inertialTimeout?.dispose(),this._inertialTimeout=null)}_setListeningToMouseWheel(e){if(this._mouseWheelToDispose.length>0!==e&&(this._mouseWheelToDispose=(0,u.AS)(this._mouseWheelToDispose),e)){let e=e=>{this._onMouseWheel(new r.$(e))};this._mouseWheelToDispose.push(s.ko(this._listenOnDomNode,s.Bx.MOUSE_WHEEL,e,{passive:!1}))}}_onMouseWheel(e){if(e.browserEvent?.defaultPrevented)return;let t=S.INSTANCE;t.acceptStandardWheelEvent(e);let i=!1;if(e.deltaY||e.deltaX){let n=e.deltaY*this._options.mouseWheelScrollSensitivity,s=e.deltaX*this._options.mouseWheelScrollSensitivity;this._options.scrollPredominantAxis&&(this._options.scrollYToX&&s+n===0?s=n=0:Math.abs(n)>=Math.abs(s)?s=0:n=0),this._options.flipAxes&&([n,s]=[s,n]);let o=!p.zx&&e.browserEvent&&e.browserEvent.shiftKey;(this._options.scrollYToX||o)&&!s&&(s=n,n=0),e.browserEvent&&e.browserEvent.altKey&&(s*=this._options.fastScrollSensitivity,n*=this._options.fastScrollSensitivity);let r=this._scrollable.getFutureScrollPosition(),a={};if(n){let e=50*n,t=r.scrollTop-(e<0?Math.floor(e):Math.ceil(e));this._verticalScrollbar.writeScrollPosition(a,t)}if(s){let e=50*s,t=r.scrollLeft-(e<0?Math.floor(e):Math.ceil(e));this._horizontalScrollbar.writeScrollPosition(a,t)}if(a=this._scrollable.validateScrollPosition(a),this._options.inertialScroll&&(s||n)){let e=!1;0===this._inertialSpeed.X&&0===this._inertialSpeed.Y&&(e=!0),this._inertialSpeed.Y=(n<0?-1:1)*Math.abs(n)**1.02,this._inertialSpeed.X=(s<0?-1:1)*Math.abs(s)**1.02,e&&this._periodicSync()}(r.scrollLeft!==a.scrollLeft||r.scrollTop!==a.scrollTop)&&(this._options.mouseWheelSmoothScroll&&t.isPhysicalMouseWheel()?this._scrollable.setScrollPositionSmooth(a):this._scrollable.setScrollPositionNow(a),i=!0)}let n=i;!n&&this._options.alwaysConsumeMouseWheel&&(n=!0),!n&&this._options.consumeMouseWheelIfScrollbarIsNeeded&&(this._verticalScrollbar.isNeeded()||this._horizontalScrollbar.isNeeded())&&(n=!0),n&&(e.preventDefault(),e.stopPropagation())}_onDidScroll(e){this._shouldRender=this._horizontalScrollbar.onDidScroll(e)||this._shouldRender,this._shouldRender=this._verticalScrollbar.onDidScroll(e)||this._shouldRender,this._options.useShadows&&(this._shouldRender=!0),this._revealOnScroll&&this._reveal(),this._options.lazyRender||this._render()}renderNow(){if(!this._options.lazyRender)throw Error("Please use `lazyRender` together with `renderNow`!");this._render()}_render(){if(this._shouldRender&&(this._shouldRender=!1,this._horizontalScrollbar.render(),this._verticalScrollbar.render(),this._options.useShadows)){let e=this._scrollable.getCurrentScrollPosition(),t=e.scrollTop>0,i=e.scrollLeft>0,n=i?" left":"",s=t?" top":"";this._leftShadowDomNode.setClassName(`shadow${n}`),this._topShadowDomNode.setClassName(`shadow${s}`),this._topLeftShadowDomNode.setClassName(`shadow${i||t?" top-left-corner":""}${s}${n}`)}}_onDragStart(){this._isDragging=!0,this._reveal()}_onDragEnd(){this._isDragging=!1,this._hide()}_onMouseLeave(e){this._mouseIsOver=!1,this._hide()}_onMouseOver(e){this._mouseIsOver=!0,this._reveal()}_reveal(){this._verticalScrollbar.beginReveal(),this._horizontalScrollbar.beginReveal(),this._scheduleHide()}_hide(){this._mouseIsOver||this._isDragging||(this._verticalScrollbar.beginHide(),this._horizontalScrollbar.beginHide())}_scheduleHide(){this._mouseIsOver||this._isDragging||this._hideTimeout.cancelAndSet(()=>this._hide(),500)}}class x extends k{constructor(e,t){(t=t||{}).mouseWheelSmoothScroll=!1;let i=new w.yE({forceIntegerValues:!0,smoothScrollDuration:0,scheduleAtNextAnimationFrame:t=>s.PG(s.zk(e),t)});super(e,t,i),this._register(i)}setScrollPosition(e){this._scrollable.setScrollPositionNow(e)}}class L extends k{constructor(e,t,i){super(e,t,i)}setScrollPosition(e){e.reuseAnimation?this._scrollable.setScrollPositionSmooth(e,e.reuseAnimation):this._scrollable.setScrollPositionNow(e)}getScrollPosition(){return this._scrollable.getCurrentScrollPosition()}}class D extends k{constructor(e,t){(t=t||{}).mouseWheelSmoothScroll=!1;let i=new w.yE({forceIntegerValues:!1,smoothScrollDuration:0,scheduleAtNextAnimationFrame:t=>s.PG(s.zk(e),t)});super(e,t,i),this._register(i),this._element=e,this._register(this.onScroll(e=>{e.scrollTopChanged&&(this._element.scrollTop=e.scrollTop),e.scrollLeftChanged&&(this._element.scrollLeft=e.scrollLeft)})),this.scanDomNode()}setScrollPosition(e){this._scrollable.setScrollPositionNow(e)}getScrollPosition(){return this._scrollable.getCurrentScrollPosition()}scanDomNode(){this.setScrollDimensions({width:this._element.clientWidth,scrollWidth:this._element.scrollWidth,height:this._element.clientHeight,scrollHeight:this._element.scrollHeight}),this.setScrollPosition({scrollLeft:this._element.scrollLeft,scrollTop:this._element.scrollTop})}}},78282:()=>{},78343:(e,t,i)=>{"use strict";i.d(t,{Fd:()=>a,aJ:()=>n});var n,s=i(5488),o=i(82102),r=i(88235);!function(e){e[e.PRESERVE=0]="PRESERVE",e[e.LAST=1]="LAST"}(n||(n={}));let a={Quickaccess:"workbench.contributions.quickaccess"};class l{constructor(){this.providers=[],this.defaultProvider=void 0}registerQuickAccessProvider(e){return 0===e.prefix.length?this.defaultProvider=e:this.providers.push(e),this.providers.sort((e,t)=>t.prefix.length-e.prefix.length),(0,o.s)(()=>{this.providers.splice(this.providers.indexOf(e),1),this.defaultProvider===e&&(this.defaultProvider=void 0)})}getQuickAccessProviders(){return(0,s.Yc)([this.defaultProvider,...this.providers])}getQuickAccessProvider(e){return e&&this.providers.find(t=>e.startsWith(t.prefix))||this.defaultProvider}}r.O.add(a.Quickaccess,new l)},78713:(e,t,i)=>{"use strict";function n(e,t){let i=Math.pow(10,t);return Math.round(e*i)/i}i.d(t,{$J:()=>r,Q1:()=>a,bU:()=>s,hB:()=>o});class s{constructor(e,t,i,s=1){this._rgbaBrand=void 0,this.r=0|Math.min(255,Math.max(0,e)),this.g=0|Math.min(255,Math.max(0,t)),this.b=0|Math.min(255,Math.max(0,i)),this.a=n(Math.max(Math.min(1,s),0),3)}static equals(e,t){return e.r===t.r&&e.g===t.g&&e.b===t.b&&e.a===t.a}}class o{constructor(e,t,i,s){this._hslaBrand=void 0,this.h=0|Math.max(Math.min(360,e),0),this.s=n(Math.max(Math.min(1,t),0),3),this.l=n(Math.max(Math.min(1,i),0),3),this.a=n(Math.max(Math.min(1,s),0),3)}static equals(e,t){return e.h===t.h&&e.s===t.s&&e.l===t.l&&e.a===t.a}static fromRGBA(e){let t=e.r/255,i=e.g/255,n=e.b/255,s=e.a,r=Math.max(t,i,n),a=Math.min(t,i,n),l=0,h=0,d=(a+r)/2,c=r-a;if(c>0){switch(h=Math.min(d<=.5?c/(2*d):c/(2-2*d),1),r){case t:l=(i-n)/c+6*(i<n);break;case i:l=(n-t)/c+2;break;case n:l=(t-i)/c+4}l*=60,l=Math.round(l)}return new o(l,h,d,s)}static _hue2rgb(e,t,i){return(i<0&&(i+=1),i>1&&(i-=1),i<1/6)?e+(t-e)*6*i:i<.5?t:i<2/3?e+(t-e)*(2/3-i)*6:e}static toRGBA(e){let t,i,n,r=e.h/360,{s:a,l,a:h}=e;if(0===a)t=i=n=l;else{let e=l<.5?l*(1+a):l+a-l*a,s=2*l-e;t=o._hue2rgb(s,e,r+1/3),i=o._hue2rgb(s,e,r),n=o._hue2rgb(s,e,r-1/3)}return new s(Math.round(255*t),Math.round(255*i),Math.round(255*n),h)}}class r{constructor(e,t,i,s){this._hsvaBrand=void 0,this.h=0|Math.max(Math.min(360,e),0),this.s=n(Math.max(Math.min(1,t),0),3),this.v=n(Math.max(Math.min(1,i),0),3),this.a=n(Math.max(Math.min(1,s),0),3)}static equals(e,t){return e.h===t.h&&e.s===t.s&&e.v===t.v&&e.a===t.a}static fromRGBA(e){let t=e.r/255,i=e.g/255,n=e.b/255,s=Math.max(t,i,n),o=s-Math.min(t,i,n);return new r(Math.round(60*(0===o?0:s===t?((i-n)/o%6+6)%6:s===i?(n-t)/o+2:(t-i)/o+4)),0===s?0:o/s,s,e.a)}static toRGBA(e){let{h:t,s:i,v:n,a:o}=e,r=n*i,a=r*(1-Math.abs(t/60%2-1)),l=n-r,[h,d,c]=[0,0,0];return t<60?(h=r,d=a):t<120?(h=a,d=r):t<180?(d=r,c=a):t<240?(d=a,c=r):t<300?(h=a,c=r):t<=360&&(h=r,c=a),new s(h=Math.round((h+l)*255),d=Math.round((d+l)*255),c=Math.round((c+l)*255),o)}}class a{static fromHex(e){return a.Format.CSS.parseHex(e)||a.red}static equals(e,t){return!e&&!t||!!e&&!!t&&e.equals(t)}get hsla(){return this._hsla?this._hsla:o.fromRGBA(this.rgba)}get hsva(){return this._hsva?this._hsva:r.fromRGBA(this.rgba)}constructor(e){if(e)if(e instanceof s)this.rgba=e;else if(e instanceof o)this._hsla=e,this.rgba=o.toRGBA(e);else if(e instanceof r)this._hsva=e,this.rgba=r.toRGBA(e);else throw Error("Invalid color ctor argument");else throw Error("Color needs a value")}equals(e){return!!e&&s.equals(this.rgba,e.rgba)&&o.equals(this.hsla,e.hsla)&&r.equals(this.hsva,e.hsva)}getRelativeLuminance(){let e=a._relativeLuminanceForComponent(this.rgba.r),t=a._relativeLuminanceForComponent(this.rgba.g);return n(.2126*e+.7152*t+.0722*a._relativeLuminanceForComponent(this.rgba.b),4)}static _relativeLuminanceForComponent(e){let t=e/255;return t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4)}isLighter(){return(299*this.rgba.r+587*this.rgba.g+114*this.rgba.b)/1e3>=128}isLighterThan(e){return this.getRelativeLuminance()>e.getRelativeLuminance()}isDarkerThan(e){return this.getRelativeLuminance()<e.getRelativeLuminance()}lighten(e){return new a(new o(this.hsla.h,this.hsla.s,this.hsla.l+this.hsla.l*e,this.hsla.a))}darken(e){return new a(new o(this.hsla.h,this.hsla.s,this.hsla.l-this.hsla.l*e,this.hsla.a))}transparent(e){let{r:t,g:i,b:n,a:o}=this.rgba;return new a(new s(t,i,n,o*e))}isTransparent(){return 0===this.rgba.a}isOpaque(){return 1===this.rgba.a}opposite(){return new a(new s(255-this.rgba.r,255-this.rgba.g,255-this.rgba.b,this.rgba.a))}mix(e,t=.5){let i=Math.min(Math.max(t,0),1),n=this.rgba,o=e.rgba,r=n.r+(o.r-n.r)*i,l=n.g+(o.g-n.g)*i,h=n.b+(o.b-n.b)*i,d=n.a+(o.a-n.a)*i;return new a(new s(r,l,h,d))}makeOpaque(e){if(this.isOpaque()||1!==e.rgba.a)return this;let{r:t,g:i,b:n,a:o}=this.rgba;return new a(new s(e.rgba.r-o*(e.rgba.r-t),e.rgba.g-o*(e.rgba.g-i),e.rgba.b-o*(e.rgba.b-n),1))}toString(){return this._toString||(this._toString=a.Format.CSS.format(this)),this._toString}toNumber32Bit(){return this._toNumber32Bit||(this._toNumber32Bit=(this.rgba.r<<24|this.rgba.g<<16|this.rgba.b<<8|(255*this.rgba.a|0))>>>0),this._toNumber32Bit}static getLighterColor(e,t,i){if(e.isLighterThan(t))return e;i=i||.5;let n=e.getRelativeLuminance(),s=t.getRelativeLuminance();return i=i*(s-n)/s,e.lighten(i)}static getDarkerColor(e,t,i){if(e.isDarkerThan(t))return e;i=i||.5;let n=e.getRelativeLuminance(),s=t.getRelativeLuminance();return i=i*(n-s)/n,e.darken(i)}static{this.white=new a(new s(255,255,255,1))}static{this.black=new a(new s(0,0,0,1))}static{this.red=new a(new s(255,0,0,1))}static{this.blue=new a(new s(0,0,255,1))}static{this.green=new a(new s(0,255,0,1))}static{this.cyan=new a(new s(0,255,255,1))}static{this.lightgrey=new a(new s(211,211,211,1))}static{this.transparent=new a(new s(0,0,0,0))}}!function(e){var t;!function(t){function i(e){let t=e.toString(16);return 2!==t.length?"0"+t:t}function n(t){let i=t.length;if(0===i||35!==t.charCodeAt(0))return null;if(7===i){let i=16*o(t.charCodeAt(1))+o(t.charCodeAt(2));return new e(new s(i,16*o(t.charCodeAt(3))+o(t.charCodeAt(4)),16*o(t.charCodeAt(5))+o(t.charCodeAt(6)),1))}if(9===i){let i=16*o(t.charCodeAt(1))+o(t.charCodeAt(2)),n=16*o(t.charCodeAt(3))+o(t.charCodeAt(4));return new e(new s(i,n,16*o(t.charCodeAt(5))+o(t.charCodeAt(6)),(16*o(t.charCodeAt(7))+o(t.charCodeAt(8)))/255))}if(4===i){let i=o(t.charCodeAt(1)),n=o(t.charCodeAt(2)),r=o(t.charCodeAt(3));return new e(new s(16*i+i,16*n+n,16*r+r))}if(5===i){let i=o(t.charCodeAt(1)),n=o(t.charCodeAt(2)),r=o(t.charCodeAt(3)),a=o(t.charCodeAt(4));return new e(new s(16*i+i,16*n+n,16*r+r,(16*a+a)/255))}return null}function o(e){switch(e){case 48:break;case 49:return 1;case 50:return 2;case 51:return 3;case 52:return 4;case 53:return 5;case 54:return 6;case 55:return 7;case 56:return 8;case 57:return 9;case 97:case 65:return 10;case 98:case 66:return 11;case 99:case 67:return 12;case 100:case 68:return 13;case 101:case 69:return 14;case 102:case 70:return 15}return 0}t.formatRGB=function(t){return 1===t.rgba.a?`rgb(${t.rgba.r}, ${t.rgba.g}, ${t.rgba.b})`:e.Format.CSS.formatRGBA(t)},t.formatRGBA=function(e){return`rgba(${e.rgba.r}, ${e.rgba.g}, ${e.rgba.b}, ${+e.rgba.a.toFixed(2)})`},t.formatHSL=function(t){return 1===t.hsla.a?`hsl(${t.hsla.h}, ${Math.round(100*t.hsla.s)}%, ${Math.round(100*t.hsla.l)}%)`:e.Format.CSS.formatHSLA(t)},t.formatHSLA=function(e){return`hsla(${e.hsla.h}, ${Math.round(100*e.hsla.s)}%, ${Math.round(100*e.hsla.l)}%, ${e.hsla.a.toFixed(2)})`},t.formatHex=function(e){return`#${i(e.rgba.r)}${i(e.rgba.g)}${i(e.rgba.b)}`},t.formatHexA=function(t,n=!1){return n&&1===t.rgba.a?e.Format.CSS.formatHex(t):`#${i(t.rgba.r)}${i(t.rgba.g)}${i(t.rgba.b)}${i(Math.round(255*t.rgba.a))}`},t.format=function(t){return t.isOpaque()?e.Format.CSS.formatHex(t):e.Format.CSS.formatRGBA(t)},t.parse=function(t){if("transparent"===t)return e.transparent;if(t.startsWith("#"))return n(t);if(t.startsWith("rgba(")){let i=t.match(/rgba\((?<r>(?:\+|-)?\d+), *(?<g>(?:\+|-)?\d+), *(?<b>(?:\+|-)?\d+), *(?<a>(?:\+|-)?\d+(\.\d+)?)\)/);if(!i)throw Error("Invalid color format "+t);let n=parseInt(i.groups?.r??"0"),o=parseInt(i.groups?.g??"0");return new e(new s(n,o,parseInt(i.groups?.b??"0"),parseFloat(i.groups?.a??"0")))}if(t.startsWith("rgb(")){let i=t.match(/rgb\((?<r>(?:\+|-)?\d+), *(?<g>(?:\+|-)?\d+), *(?<b>(?:\+|-)?\d+)\)/);if(!i)throw Error("Invalid color format "+t);let n=parseInt(i.groups?.r??"0");return new e(new s(n,parseInt(i.groups?.g??"0"),parseInt(i.groups?.b??"0")))}var i=t;switch(i){case"aliceblue":return new e(new s(240,248,255,1));case"antiquewhite":return new e(new s(250,235,215,1));case"aqua":case"cyan":return new e(new s(0,255,255,1));case"aquamarine":return new e(new s(127,255,212,1));case"azure":return new e(new s(240,255,255,1));case"beige":return new e(new s(245,245,220,1));case"bisque":return new e(new s(255,228,196,1));case"black":return new e(new s(0,0,0,1));case"blanchedalmond":return new e(new s(255,235,205,1));case"blue":return new e(new s(0,0,255,1));case"blueviolet":return new e(new s(138,43,226,1));case"brown":return new e(new s(165,42,42,1));case"burlywood":return new e(new s(222,184,135,1));case"cadetblue":return new e(new s(95,158,160,1));case"chartreuse":return new e(new s(127,255,0,1));case"chocolate":return new e(new s(210,105,30,1));case"coral":return new e(new s(255,127,80,1));case"cornflowerblue":return new e(new s(100,149,237,1));case"cornsilk":return new e(new s(255,248,220,1));case"crimson":return new e(new s(220,20,60,1));case"darkblue":return new e(new s(0,0,139,1));case"darkcyan":return new e(new s(0,139,139,1));case"darkgoldenrod":return new e(new s(184,134,11,1));case"darkgray":case"darkgrey":return new e(new s(169,169,169,1));case"darkgreen":return new e(new s(0,100,0,1));case"darkkhaki":return new e(new s(189,183,107,1));case"darkmagenta":return new e(new s(139,0,139,1));case"darkolivegreen":return new e(new s(85,107,47,1));case"darkorange":return new e(new s(255,140,0,1));case"darkorchid":return new e(new s(153,50,204,1));case"darkred":return new e(new s(139,0,0,1));case"darksalmon":return new e(new s(233,150,122,1));case"darkseagreen":return new e(new s(143,188,143,1));case"darkslateblue":return new e(new s(72,61,139,1));case"darkslategray":case"darkslategrey":return new e(new s(47,79,79,1));case"darkturquoise":return new e(new s(0,206,209,1));case"darkviolet":return new e(new s(148,0,211,1));case"deeppink":return new e(new s(255,20,147,1));case"deepskyblue":return new e(new s(0,191,255,1));case"dimgray":case"dimgrey":return new e(new s(105,105,105,1));case"dodgerblue":return new e(new s(30,144,255,1));case"firebrick":return new e(new s(178,34,34,1));case"floralwhite":return new e(new s(255,250,240,1));case"forestgreen":return new e(new s(34,139,34,1));case"fuchsia":case"magenta":return new e(new s(255,0,255,1));case"gainsboro":return new e(new s(220,220,220,1));case"ghostwhite":return new e(new s(248,248,255,1));case"gold":return new e(new s(255,215,0,1));case"goldenrod":return new e(new s(218,165,32,1));case"gray":case"grey":return new e(new s(128,128,128,1));case"green":return new e(new s(0,128,0,1));case"greenyellow":return new e(new s(173,255,47,1));case"honeydew":return new e(new s(240,255,240,1));case"hotpink":return new e(new s(255,105,180,1));case"indianred":return new e(new s(205,92,92,1));case"indigo":return new e(new s(75,0,130,1));case"ivory":return new e(new s(255,255,240,1));case"khaki":return new e(new s(240,230,140,1));case"lavender":return new e(new s(230,230,250,1));case"lavenderblush":return new e(new s(255,240,245,1));case"lawngreen":return new e(new s(124,252,0,1));case"lemonchiffon":return new e(new s(255,250,205,1));case"lightblue":return new e(new s(173,216,230,1));case"lightcoral":return new e(new s(240,128,128,1));case"lightcyan":return new e(new s(224,255,255,1));case"lightgoldenrodyellow":return new e(new s(250,250,210,1));case"lightgray":case"lightgrey":return new e(new s(211,211,211,1));case"lightgreen":return new e(new s(144,238,144,1));case"lightpink":return new e(new s(255,182,193,1));case"lightsalmon":return new e(new s(255,160,122,1));case"lightseagreen":return new e(new s(32,178,170,1));case"lightskyblue":return new e(new s(135,206,250,1));case"lightslategray":case"lightslategrey":return new e(new s(119,136,153,1));case"lightsteelblue":return new e(new s(176,196,222,1));case"lightyellow":return new e(new s(255,255,224,1));case"lime":return new e(new s(0,255,0,1));case"limegreen":return new e(new s(50,205,50,1));case"linen":return new e(new s(250,240,230,1));case"maroon":return new e(new s(128,0,0,1));case"mediumaquamarine":return new e(new s(102,205,170,1));case"mediumblue":return new e(new s(0,0,205,1));case"mediumorchid":return new e(new s(186,85,211,1));case"mediumpurple":return new e(new s(147,112,219,1));case"mediumseagreen":return new e(new s(60,179,113,1));case"mediumslateblue":return new e(new s(123,104,238,1));case"mediumspringgreen":return new e(new s(0,250,154,1));case"mediumturquoise":return new e(new s(72,209,204,1));case"mediumvioletred":return new e(new s(199,21,133,1));case"midnightblue":return new e(new s(25,25,112,1));case"mintcream":return new e(new s(245,255,250,1));case"mistyrose":return new e(new s(255,228,225,1));case"moccasin":return new e(new s(255,228,181,1));case"navajowhite":return new e(new s(255,222,173,1));case"navy":return new e(new s(0,0,128,1));case"oldlace":return new e(new s(253,245,230,1));case"olive":return new e(new s(128,128,0,1));case"olivedrab":return new e(new s(107,142,35,1));case"orange":return new e(new s(255,165,0,1));case"orangered":return new e(new s(255,69,0,1));case"orchid":return new e(new s(218,112,214,1));case"palegoldenrod":return new e(new s(238,232,170,1));case"palegreen":return new e(new s(152,251,152,1));case"paleturquoise":return new e(new s(175,238,238,1));case"palevioletred":return new e(new s(219,112,147,1));case"papayawhip":return new e(new s(255,239,213,1));case"peachpuff":return new e(new s(255,218,185,1));case"peru":return new e(new s(205,133,63,1));case"pink":return new e(new s(255,192,203,1));case"plum":return new e(new s(221,160,221,1));case"powderblue":return new e(new s(176,224,230,1));case"purple":return new e(new s(128,0,128,1));case"rebeccapurple":return new e(new s(102,51,153,1));case"red":return new e(new s(255,0,0,1));case"rosybrown":return new e(new s(188,143,143,1));case"royalblue":return new e(new s(65,105,225,1));case"saddlebrown":return new e(new s(139,69,19,1));case"salmon":return new e(new s(250,128,114,1));case"sandybrown":return new e(new s(244,164,96,1));case"seagreen":return new e(new s(46,139,87,1));case"seashell":return new e(new s(255,245,238,1));case"sienna":return new e(new s(160,82,45,1));case"silver":return new e(new s(192,192,192,1));case"skyblue":return new e(new s(135,206,235,1));case"slateblue":return new e(new s(106,90,205,1));case"slategray":case"slategrey":return new e(new s(112,128,144,1));case"snow":return new e(new s(255,250,250,1));case"springgreen":return new e(new s(0,255,127,1));case"steelblue":return new e(new s(70,130,180,1));case"tan":return new e(new s(210,180,140,1));case"teal":return new e(new s(0,128,128,1));case"thistle":return new e(new s(216,191,216,1));case"tomato":return new e(new s(255,99,71,1));case"turquoise":return new e(new s(64,224,208,1));case"violet":return new e(new s(238,130,238,1));case"wheat":return new e(new s(245,222,179,1));case"white":return new e(new s(255,255,255,1));case"whitesmoke":return new e(new s(245,245,245,1));case"yellow":return new e(new s(255,255,0,1));case"yellowgreen":return new e(new s(154,205,50,1));default:return null}},t.parseHex=n}((t=e.Format||(e.Format={})).CSS||(t.CSS={}))}(a||(a={}))},79380:(e,t,i)=>{"use strict";i.d(t,{V:()=>s,y:()=>o});var n=i(84474);class s{constructor(e){let t=(0,n.W)(e);this._defaultValue=t,this._asciiMap=s._createAsciiMap(t),this._map=new Map}static _createAsciiMap(e){let t=new Uint8Array(256);return t.fill(e),t}set(e,t){let i=(0,n.W)(t);e>=0&&e<256?this._asciiMap[e]=i:this._map.set(e,i)}get(e){return e>=0&&e<256?this._asciiMap[e]:this._map.get(e)||this._defaultValue}clear(){this._asciiMap.fill(this._defaultValue),this._map.clear()}}class o{constructor(){this._actual=new s(0)}add(e){this._actual.set(e,1)}has(e){return 1===this._actual.get(e)}clear(){return this._actual.clear()}}},79410:()=>{},79502:()=>{},79635:(e,t,i)=>{"use strict";i.d(t,{q:()=>n});let n={enableSplitViewResizing:!0,splitViewDefaultRatio:.5,renderSideBySide:!0,renderMarginRevertIcon:!0,renderGutterMenu:!0,maxComputationTime:5e3,maxFileSize:50,ignoreTrimWhitespace:!0,renderIndicators:!0,originalEditable:!1,diffCodeLens:!1,renderOverviewRuler:!0,diffWordWrap:"inherit",diffAlgorithm:"advanced",accessibilityVerbose:!1,experimental:{showMoves:!1,showEmptyDecorations:!0,useTrueInlineView:!1},hideUnchangedRegions:{enabled:!1,contextLineCount:3,minimumLineCount:3,revealLineCount:20},isInEmbeddedEditor:!1,onlyShowAccessibleDiffViewer:!1,renderSideBySideInlineBreakpoint:900,useInlineViewWhenSpaceIsLimited:!0,compactMode:!1}},80104:(e,t,i)=>{"use strict";i.d(t,{w:()=>n});let n=(0,i(22263).u1)("editorWorkerService")},80471:()=>{},80484:(e,t,i)=>{"use strict";i.d(t,{i:()=>o,y:()=>r});var n=i(23047),s=i(82600);class o{constructor(e,t,i){this._range=e,this._charBeforeSelection=t,this._charAfterSelection=i}getEditOperations(e,t){t.addTrackedEditOperation(new n.Q(this._range.startLineNumber,this._range.startColumn,this._range.startLineNumber,this._range.startColumn),this._charBeforeSelection),t.addTrackedEditOperation(new n.Q(this._range.endLineNumber,this._range.endColumn,this._range.endLineNumber,this._range.endColumn),this._charAfterSelection||null)}computeCursorState(e,t){let i=t.getInverseEditOperations(),n=i[0].range,o=i[1].range;return new s.L(n.endLineNumber,n.endColumn,o.endLineNumber,o.endColumn-this._charAfterSelection.length)}}class r{constructor(e,t,i){this._position=e,this._text=t,this._charAfter=i}getEditOperations(e,t){t.addTrackedEditOperation(new n.Q(this._position.lineNumber,this._position.column,this._position.lineNumber,this._position.column),this._text+this._charAfter)}computeCursorState(e,t){let i=t.getInverseEditOperations()[0].range;return new s.L(i.endLineNumber,i.startColumn,i.endLineNumber,i.endColumn-this._charAfter.length)}}},80505:()=>{},80610:(e,t,i)=>{"use strict";i.d(t,{T:()=>g,i:()=>p});var n,s=i(60737),o=i(30117),r=i(6033),a=i(31023),l=i(24224),h=i(5081),d=i(66278),c=i(89197);i(64863);var u=function(e,t){return function(i,n){t(i,n,e)}};let g=class{static{n=this}static{this._ttpTokenizer=(0,o.H)("tokenizeToString",{createHTML:e=>e})}constructor(e,t,i){this._options=e,this._languageService=t,this._openerService=i}render(e,t,i){let n=(0,s.Gc)(e,{codeBlockRenderer:(e,t)=>this.renderCodeBlock(e,t),actionHandler:(e,t)=>this.openMarkdownLink(e,t),...t},i);return n.element.classList.add("rendered-markdown"),n}async renderCodeBlock(e,t){let i;e?i=this._languageService.getLanguageIdByLanguageName(e):this._options.editor&&(i=this._options.editor.getModel()?.getLanguageId()),i||(i=h.vH);let s=await (0,d.Yj)(this._languageService,t,i),o=document.createElement("span");if(o.innerHTML=n._ttpTokenizer?.createHTML(s)??s,this._options.editor){let e=this._options.editor.getOption(59);(0,c.M)(o,e)}else this._options.codeBlockFontFamily&&(o.style.fontFamily=this._options.codeBlockFontFamily);return void 0!==this._options.codeBlockFontSize&&(o.style.fontSize=this._options.codeBlockFontSize),o}async openMarkdownLink(e,t){await p(this._openerService,e,t.isTrusted)}};async function p(e,t,i,n){try{var s;return await e.open(t,{fromUserGesture:!0,allowContributedOpeners:!0,allowCommands:(s=i,!0===s||!!(s&&Array.isArray(s.enabledCommands))&&s.enabledCommands),skipValidation:n})}catch(e){return(0,r.dz)(e),!1}}g=n=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([u(1,l.L),u(2,a.Cr)],g)},80703:(e,t,i)=>{"use strict";i.d(t,{X:()=>n});let n=(0,i(22263).u1)("dialogService")},80787:(e,t,i)=>{"use strict";i.d(t,{W:()=>u,m:()=>c});var n=i(5488),s=i(71544),o=i(6033),r=i(55532),a=i(72553),l=i(23047),h=i(62413),d=i(75247);class c{static fromStringEdit(e,t){return new c(e.replacements.map(e=>u.fromStringReplacement(e,t)))}static fromParallelReplacementsUnsorted(e){return new c(e.slice().sort((0,n.VE)(e=>e.range,l.Q.compareRangesUsingStarts)))}constructor(e){this.replacements=e,(0,s.Ft)(()=>(0,s.Xo)(e,(e,t)=>e.range.getEndPosition().isBeforeOrEqual(t.range.getStartPosition())))}mapPosition(e){let t=0,i=0,n=0;for(let s of this.replacements){let o=s.range.getStartPosition();if(e.isBeforeOrEqual(o))break;let r=s.range.getEndPosition(),l=h.W.ofText(s.text);if(e.isBefore(r)){let e=new a.y(o.lineNumber+t,o.column+(o.lineNumber+t===i?n:0)),s=l.addToPosition(e);return g(e,s)}o.lineNumber+t!==i&&(n=0),t+=l.lineCount-(s.range.endLineNumber-s.range.startLineNumber),0===l.lineCount?r.lineNumber!==o.lineNumber?n+=l.columnCount-(r.column-1):n+=l.columnCount-(r.column-o.column):n=l.columnCount,i=r.lineNumber+t}return new a.y(e.lineNumber+t,e.column+(e.lineNumber+t===i?n:0))}mapRange(e){var t,i;return g((t=this.mapPosition(e.getStartPosition()))instanceof a.y?t:t.getStartPosition(),(i=this.mapPosition(e.getEndPosition()))instanceof a.y?i:i.getEndPosition())}apply(e){let t="",i=new a.y(1,1);for(let n of this.replacements){let s=n.range,o=s.getStartPosition(),r=s.getEndPosition(),a=g(i,o);a.isEmpty()||(t+=e.getValueOfRange(a)),t+=n.text,i=r}let n=g(i,e.endPositionExclusive);return n.isEmpty()||(t+=e.getValueOfRange(n)),t}applyToString(e){let t=new d.tp(e);return this.apply(t)}getNewRanges(){let e=[],t=0,i=0,n=0;for(let s of this.replacements){let o=h.W.ofText(s.text),r=a.y.lift({lineNumber:s.range.startLineNumber+i,column:s.range.startColumn+(s.range.startLineNumber===t?n:0)}),l=o.createRange(r);e.push(l),i=l.endLineNumber-s.range.endLineNumber,n=l.endColumn-s.range.endColumn,t=s.range.endLineNumber}return e}toReplacement(e){if(0===this.replacements.length)throw new o.D7;if(1===this.replacements.length)return this.replacements[0];let t=this.replacements[0].range.getStartPosition(),i=this.replacements[this.replacements.length-1].range.getEndPosition(),n="";for(let t=0;t<this.replacements.length;t++){let i=this.replacements[t];if(n+=i.text,t<this.replacements.length-1){let s=this.replacements[t+1],o=l.Q.fromPositions(i.range.getEndPosition(),s.range.getStartPosition());n+=e.getValueOfRange(o)}}return new u(l.Q.fromPositions(t,i),n)}toString(e){return void 0===e?this.replacements.map(e=>e.toString()).join("\n"):"string"==typeof e?this.toString(new d.tp(e)):0===this.replacements.length?"":this.replacements.map(t=>{let i=e.getValueOfRange(t.range),n=l.Q.fromPositions(new a.y(Math.max(1,t.range.startLineNumber-1),1),t.range.getStartPosition()),s=e.getValueOfRange(n);s.length>10&&(s="..."+s.substring(s.length-10));let o=l.Q.fromPositions(t.range.getEndPosition(),new a.y(t.range.endLineNumber+1,1)),r=e.getValueOfRange(o);r.length>10&&(r=r.substring(0,10)+"...");let h=i;if(h.length>10){let e=Math.floor(5);h=h.substring(0,e)+"..."+h.substring(h.length-e)}let d=t.text;if(d.length>10){let e=Math.floor(5);d=d.substring(0,e)+"..."+d.substring(d.length-e)}return 0===h.length?`${s}❰${d}❱${r}`:`${s}❰${h}↦${d}❱${r}`}).join("\n")}}class u{static joinReplacements(e,t){if(0===e.length)throw new o.D7;if(1===e.length)return e[0];let i=e[0].range.getStartPosition(),n=e[e.length-1].range.getEndPosition(),s="";for(let i=0;i<e.length;i++){let n=e[i];if(s+=n.text,i<e.length-1){let o=e[i+1],r=l.Q.fromPositions(n.range.getEndPosition(),o.range.getStartPosition());s+=t.getValueOfRange(r)}}return new u(l.Q.fromPositions(i,n),s)}static fromStringReplacement(e,t){return new u(t.getTransformer().getRange(e.replaceRange),e.newText)}static delete(e){return new u(e,"")}constructor(e,t){this.range=e,this.text=t}get isEmpty(){return this.range.isEmpty()&&0===this.text.length}static equals(e,t){return e.range.equalsRange(t.range)&&e.text===t.text}equals(e){return u.equals(this,e)}removeCommonPrefixAndSuffix(e){return this.removeCommonPrefix(e).removeCommonSuffix(e)}removeCommonPrefix(e){let t=e.getValueOfRange(this.range).replaceAll("\r\n","\n"),i=this.text.replaceAll("\r\n","\n"),n=(0,r.Qp)(t,i),s=h.W.ofText(t.substring(0,n)).addToPosition(this.range.getStartPosition()),o=i.substring(n);return new u(l.Q.fromPositions(s,this.range.getEndPosition()),o)}removeCommonSuffix(e){let t=e.getValueOfRange(this.range).replaceAll("\r\n","\n"),i=this.text.replaceAll("\r\n","\n"),n=(0,r.Vi)(t,i),s=h.W.ofText(t.substring(0,t.length-n)).addToPosition(this.range.getStartPosition()),o=i.substring(0,i.length-n);return new u(l.Q.fromPositions(this.range.getStartPosition(),s),o)}toString(){let e=this.range.getStartPosition(),t=this.range.getEndPosition();return`(${e.lineNumber},${e.column} -> ${t.lineNumber},${t.column}): "${this.text}"`}}function g(e,t){if(e.lineNumber===t.lineNumber&&e.column===Number.MAX_SAFE_INTEGER)return l.Q.fromPositions(t,t);if(!e.isBeforeOrEqual(t))throw new o.D7("start must be before end");return new l.Q(e.lineNumber,e.column,t.lineNumber,t.column)}},81178:()=>{},81261:()=>{},81492:(e,t,i)=>{"use strict";i.d(t,{g:()=>m});var n,s=i(82102),o=i(47108),r=i(90057),a=i(88298),l=i(6033),h=i(26033);class d{constructor(e,t){this._canvas=e,this._textureIndex=t,this._currentRow={x:0,y:0,h:0},this._allocatedGlyphs=new Set,this._nextIndex=0,this._ctx=(0,h.HS)(this._canvas.getContext("2d",{willReadFrequently:!0}))}allocate(e){let t=e.boundingBox.right-e.boundingBox.left+1,i=e.boundingBox.bottom-e.boundingBox.top+1;if(t>this._canvas.width||i>this._canvas.height)throw new l.D7("Glyph is too large for the atlas page");if(e.boundingBox.right-e.boundingBox.left+1>this._canvas.width-this._currentRow.x&&(this._currentRow.x=0,this._currentRow.y+=this._currentRow.h,this._currentRow.h=1),this._currentRow.y+e.boundingBox.bottom-e.boundingBox.top+1>this._canvas.height)return;this._ctx.drawImage(e.source,e.boundingBox.left,e.boundingBox.top,t,i,this._currentRow.x,this._currentRow.y,t,i);let n={pageIndex:this._textureIndex,glyphIndex:this._nextIndex++,x:this._currentRow.x,y:this._currentRow.y,w:t,h:i,originOffsetX:e.originOffset.x,originOffsetY:e.originOffset.y,fontBoundingBoxAscent:e.fontBoundingBoxAscent,fontBoundingBoxDescent:e.fontBoundingBoxDescent};return this._currentRow.x+=t,this._currentRow.h=Math.max(this._currentRow.h,i),this._allocatedGlyphs.add(n),n}getUsagePreview(){let e=this._canvas.width,t=this._canvas.height,i=new OffscreenCanvas(e,t),n=(0,h.HS)(i.getContext("2d"));n.fillStyle="#808080",n.fillRect(0,0,e,t);let s=new Map,o=new Map;for(let e of this._allocatedGlyphs)s.set(e.y,Math.max(s.get(e.y)??0,e.h)),o.set(e.y,Math.max(o.get(e.y)??0,e.x+e.w));for(let e of this._allocatedGlyphs)n.fillStyle="#4040FF",n.fillRect(e.x,e.y,e.w,e.h),n.fillStyle="#FF0000",n.fillRect(e.x,e.y+e.h,e.w,s.get(e.y)-e.h);for(let[t,i]of o.entries())t!==this._currentRow.y&&(n.fillStyle="#FF0000",n.fillRect(i,t,e-i,s.get(t)));return i.convertToBlob()}getStats(){let e=this._canvas.width,t=this._canvas.height,i=0,n=0,s=e*t,o=new Map,r=new Map;for(let e of this._allocatedGlyphs)o.set(e.y,Math.max(o.get(e.y)??0,e.h)),r.set(e.y,Math.max(r.get(e.y)??0,e.x+e.w));for(let e of this._allocatedGlyphs)i+=e.w*e.h,n+=e.w*(o.get(e.y)-e.h);for(let[t,i]of r.entries())t!==this._currentRow.y&&(n+=(e-i)*o.get(t));return`page${this._textureIndex}:
|
|
681
|
+
`),this.styleElement.textContent=i.join("\n")}}let G={listFocusBackground:"#7FB0D0",listActiveSelectionBackground:"#0E639C",listActiveSelectionForeground:"#FFFFFF",listActiveSelectionIconForeground:"#FFFFFF",listFocusAndSelectionOutline:"#90C2F9",listFocusAndSelectionBackground:"#094771",listFocusAndSelectionForeground:"#FFFFFF",listInactiveSelectionBackground:"#3F3F46",listInactiveSelectionIconForeground:"#FFFFFF",listHoverBackground:"#2A2D2E",listDropOverBackground:"#383B3D",listDropBetweenBackground:"#EEEEEE",treeIndentGuidesStroke:"#a9a9a9",treeInactiveIndentGuidesStroke:m.Q1.fromHex("#a9a9a9").transparent(.4).toString(),tableColumnsBorder:m.Q1.fromHex("#cccccc").transparent(.2).toString(),tableOddRowsBackgroundColor:m.Q1.fromHex("#cccccc").transparent(.04).toString(),listBackground:void 0,listFocusForeground:void 0,listInactiveSelectionForeground:void 0,listInactiveFocusForeground:void 0,listInactiveFocusBackground:void 0,listHoverForeground:void 0,listFocusOutline:void 0,listInactiveFocusOutline:void 0,listSelectionOutline:void 0,listHoverOutline:void 0,treeStickyScrollBackground:void 0,treeStickyScrollBorder:void 0,treeStickyScrollShadow:void 0},q={keyboardSupport:!0,mouseSupport:!0,multipleSelectionSupport:!0,dnd:{getDragURI:()=>null,onDragStart(){},onDragOver:()=>!1,drop(){},dispose(){}}};function Q(e,t){let i=[],n=0,s=0;for(;n<e.length||s<t.length;)if(n>=e.length)i.push(t[s++]);else if(s>=t.length)i.push(e[n++]);else if(e[n]===t[s]){i.push(e[n]),n++,s++;continue}else e[n]<t[s]?i.push(e[n++]):i.push(t[s++]);return i}let Y=(e,t)=>e-t;class Z{constructor(e,t){this._templateId=e,this.renderers=t}get templateId(){return this._templateId}renderTemplate(e){return this.renderers.map(t=>t.renderTemplate(e))}renderElement(e,t,i,n){let s=0;for(let o of this.renderers)o.renderElement(e,t,i[s++],n)}disposeElement(e,t,i,n){let s=0;for(let o of this.renderers)o.disposeElement?.(e,t,i[s],n),s+=1}disposeTemplate(e){let t=0;for(let i of this.renderers)i.disposeTemplate(e[t++])}}class X{constructor(e){this.accessibilityProvider=e,this.templateId="a18n"}renderTemplate(e){return{container:e,disposables:new b.Cm}}renderElement(e,t,i){let n=this.accessibilityProvider.getAriaLabel(e),s=n&&"string"!=typeof n?n:(0,L.lk)(n);i.disposables.add((0,L.fm)(e=>{this.setAriaLabel(e.readObservable(s),i.container)}));let o=this.accessibilityProvider.getAriaLevel&&this.accessibilityProvider.getAriaLevel(e);"number"==typeof o?i.container.setAttribute("aria-level",`${o}`):i.container.removeAttribute("aria-level")}setAriaLabel(e,t){e?t.setAttribute("aria-label",e):t.removeAttribute("aria-label")}disposeElement(e,t,i){i.disposables.clear()}disposeTemplate(e){e.disposables.dispose()}}class J{constructor(e,t){this.list=e,this.dnd=t}getDragElements(e){let t=this.list.getSelectedElements();return t.indexOf(e)>-1?t:[e]}getDragURI(e){return this.dnd.getDragURI(e)}getDragLabel(e,t){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(e,t)}onDragStart(e,t){this.dnd.onDragStart?.(e,t)}onDragOver(e,t,i,n,s){return this.dnd.onDragOver(e,t,i,n,s)}onDragLeave(e,t,i,n){this.dnd.onDragLeave?.(e,t,i,n)}onDragEnd(e){this.dnd.onDragEnd?.(e)}drop(e,t,i,n,s){this.dnd.drop(e,t,i,n,s)}dispose(){this.dnd.dispose()}}class ee{get onDidChangeFocus(){return _.Jh.map(this.eventBufferer.wrapEvent(this.focus.onChange),e=>this.toListEvent(e),this.disposables)}get onDidChangeSelection(){return _.Jh.map(this.eventBufferer.wrapEvent(this.selection.onChange),e=>this.toListEvent(e),this.disposables)}get domId(){return this.view.domId}get onDidScroll(){return this.view.onDidScroll}get onMouseClick(){return this.view.onMouseClick}get onMouseDblClick(){return this.view.onMouseDblClick}get onMouseMiddleClick(){return this.view.onMouseMiddleClick}get onPointer(){return this.mouseController.onPointer}get onMouseDown(){return this.view.onMouseDown}get onMouseOver(){return this.view.onMouseOver}get onMouseOut(){return this.view.onMouseOut}get onTouchStart(){return this.view.onTouchStart}get onTap(){return this.view.onTap}get onContextMenu(){let e=!1,t=_.Jh.chain(this.disposables.add(new l.f(this.view.domNode,"keydown")).event,t=>t.map(e=>new h.Z(e)).filter(t=>e=58===t.keyCode||t.shiftKey&&68===t.keyCode).map(e=>o.fs.stop(e,!0)).filter(()=>!1)),i=_.Jh.chain(this.disposables.add(new l.f(this.view.domNode,"keyup")).event,t=>t.forEach(()=>e=!1).map(e=>new h.Z(e)).filter(e=>58===e.keyCode||e.shiftKey&&68===e.keyCode).map(e=>o.fs.stop(e,!0)).map(({browserEvent:e})=>{let t=this.getFocus(),i=t.length?t[0]:void 0,n=void 0!==i?this.view.element(i):void 0,s=void 0!==i?this.view.domElement(i):this.view.domNode;return{index:i,element:n,anchor:s,browserEvent:e}})),n=_.Jh.chain(this.view.onContextMenu,t=>t.filter(t=>!e).map(({element:e,index:t,browserEvent:i})=>({element:e,index:t,anchor:new x.P((0,o.zk)(this.view.domNode),i),browserEvent:i})));return _.Jh.any(t,i,n)}get onKeyDown(){return this.disposables.add(new l.f(this.view.domNode,"keydown")).event}get onDidFocus(){return _.Jh.signal(this.disposables.add(new l.f(this.view.domNode,"focus",!0)).event)}get onDidBlur(){return _.Jh.signal(this.disposables.add(new l.f(this.view.domNode,"blur",!0)).event)}constructor(e,t,i,n,s=q){this.user=e,this._options=s,this.focus=new N("focused"),this.anchor=new N("anchor"),this.eventBufferer=new _.at,this._ariaLabel="",this.disposables=new b.Cm,this._onDidDispose=new _.vl,this.onDidDispose=this._onDidDispose.event;let o=this._options.accessibilityProvider&&this._options.accessibilityProvider.getWidgetRole?this._options.accessibilityProvider?.getWidgetRole():"list";this.selection=new E("listbox"!==o);let a=[this.focus.renderer,this.selection.renderer];this.accessibilityProvider=s.accessibilityProvider,this.accessibilityProvider&&(a.push(new X(this.accessibilityProvider)),this.accessibilityProvider.onDidChangeActiveDescendant?.(this.onDidChangeActiveDescendant,this,this.disposables)),n=n.map(e=>new Z(e.templateId,[...a,e]));let l={...s,dnd:s.dnd&&new J(this,s.dnd)};if(this.view=this.createListView(t,i,n,l),this.view.domNode.setAttribute("role",o),s.styleController)this.styleController=s.styleController(this.view.domId);else{let e=(0,r.li)(this.view.domNode);this.styleController=new K(e,this.view.domId)}if(this.spliceable=new u([new M(this.focus,this.view,s.identityProvider),new M(this.selection,this.view,s.identityProvider),new M(this.anchor,this.view,s.identityProvider),this.view]),this.disposables.add(this.focus),this.disposables.add(this.selection),this.disposables.add(this.anchor),this.disposables.add(this.view),this.disposables.add(this._onDidDispose),this.disposables.add(new V(this,this.view)),("boolean"!=typeof s.keyboardSupport||s.keyboardSupport)&&(this.keyboardController=new B(this,this.view,s),this.disposables.add(this.keyboardController)),s.keyboardNavigationLabelProvider){let e=s.keyboardNavigationDelegate||W;this.typeNavigationController=new H(this,this.view,s.keyboardNavigationLabelProvider,s.keyboardNavigationEventFilter??(()=>!0),e),this.disposables.add(this.typeNavigationController)}if(this.mouseController=this.createMouseController(s),this.disposables.add(this.mouseController),this.onDidChangeFocus(this._onFocusChange,this,this.disposables),this.onDidChangeSelection(this._onSelectionChange,this,this.disposables),this.accessibilityProvider){let e=this.accessibilityProvider.getWidgetAriaLabel(),t=e&&"string"!=typeof e?e:(0,L.lk)(e);this.disposables.add((0,L.fm)(e=>{this.ariaLabel=e.readObservable(t)}))}!1!==this._options.multipleSelectionSupport&&this.view.domNode.setAttribute("aria-multiselectable","true")}createListView(e,t,i,n){return new k.uO(e,t,i,n)}createMouseController(e){return new $(this)}updateOptions(e={}){this._options={...this._options,...e},this.typeNavigationController?.updateOptions(this._options),void 0!==this._options.multipleSelectionController&&(this._options.multipleSelectionSupport?this.view.domNode.setAttribute("aria-multiselectable","true"):this.view.domNode.removeAttribute("aria-multiselectable")),this.mouseController.updateOptions(e),this.keyboardController?.updateOptions(e),this.view.updateOptions(e)}get options(){return this._options}splice(e,t,i=[]){if(e<0||e>this.view.length)throw new S(this.user,`Invalid start index: ${e}`);if(t<0)throw new S(this.user,`Invalid delete count: ${t}`);(0!==t||0!==i.length)&&this.eventBufferer.bufferEvents(()=>this.spliceable.splice(e,t,i))}rerender(){this.view.rerender()}element(e){return this.view.element(e)}indexOf(e){return this.view.indexOf(e)}indexAt(e){return this.view.indexAt(e)}get length(){return this.view.length}get contentHeight(){return this.view.contentHeight}get onDidChangeContentHeight(){return this.view.onDidChangeContentHeight}get scrollTop(){return this.view.getScrollTop()}set scrollTop(e){this.view.setScrollTop(e)}get scrollHeight(){return this.view.scrollHeight}get renderHeight(){return this.view.renderHeight}get firstVisibleIndex(){return this.view.firstVisibleIndex}get ariaLabel(){return this._ariaLabel}set ariaLabel(e){this._ariaLabel=e,this.view.domNode.setAttribute("aria-label",e)}domFocus(){this.view.domNode.focus({preventScroll:!0})}layout(e,t){this.view.layout(e,t)}setSelection(e,t){for(let t of e)if(t<0||t>=this.length)throw new S(this.user,`Invalid index ${t}`);this.selection.set(e,t)}getSelection(){return this.selection.get()}getSelectedElements(){return this.getSelection().map(e=>this.view.element(e))}setAnchor(e){if(void 0===e)return void this.anchor.set([]);if(e<0||e>=this.length)throw new S(this.user,`Invalid index ${e}`);this.anchor.set([e])}getAnchor(){return this.anchor.get().at(0)}getAnchorElement(){let e=this.getAnchor();return void 0===e?void 0:this.element(e)}setFocus(e,t){for(let t of e)if(t<0||t>=this.length)throw new S(this.user,`Invalid index ${t}`);this.focus.set(e,t)}focusNext(e=1,t=!1,i,n){if(0===this.length)return;let s=this.focus.get(),o=this.findNextIndex(s.length>0?s[0]+e:0,t,n);o>-1&&this.setFocus([o],i)}focusPrevious(e=1,t=!1,i,n){if(0===this.length)return;let s=this.focus.get(),o=this.findPreviousIndex(s.length>0?s[0]-e:0,t,n);o>-1&&this.setFocus([o],i)}async focusNextPage(e,t){let i=this.view.indexAt(this.view.getScrollTop()+this.view.renderHeight);i=0===i?0:i-1;let n=this.getFocus()[0];if(n!==i&&(void 0===n||i>n)){let s=this.findPreviousIndex(i,!1,t);s>-1&&n!==s?this.setFocus([s],e):this.setFocus([i],e)}else{let s=this.view.getScrollTop(),o=s+this.view.renderHeight;i>n&&(o-=this.view.elementHeight(i)),this.view.setScrollTop(o),this.view.getScrollTop()!==s&&(this.setFocus([]),await (0,p.wR)(0),await this.focusNextPage(e,t))}}async focusPreviousPage(e,t,i=()=>0){let n,s=i(),o=this.view.getScrollTop()+s;n=0===o?this.view.indexAt(o):this.view.indexAfter(o-1);let r=this.getFocus()[0];if(r!==n&&(void 0===r||r>=n)){let i=this.findNextIndex(n,!1,t);i>-1&&r!==i?this.setFocus([i],e):this.setFocus([n],e)}else this.view.setScrollTop(o-this.view.renderHeight-s),this.view.getScrollTop()+i()!==o&&(this.setFocus([]),await (0,p.wR)(0),await this.focusPreviousPage(e,t,i))}focusLast(e,t){if(0===this.length)return;let i=this.findPreviousIndex(this.length-1,!1,t);i>-1&&this.setFocus([i],e)}focusFirst(e,t){this.focusNth(0,e,t)}focusNth(e,t,i){if(0===this.length)return;let n=this.findNextIndex(e,!1,i);n>-1&&this.setFocus([n],t)}findNextIndex(e,t=!1,i){for(let n=0;n<this.length&&(!(e>=this.length)||t);n++){if(e%=this.length,!i||i(this.element(e)))return e;e++}return -1}findPreviousIndex(e,t=!1,i){for(let n=0;n<this.length&&(!(e<0)||t);n++){if(e=(this.length+e%this.length)%this.length,!i||i(this.element(e)))return e;e--}return -1}getFocus(){return this.focus.get()}getFocusedElements(){return this.getFocus().map(e=>this.view.element(e))}reveal(e,t,i=0){if(e<0||e>=this.length)throw new S(this.user,`Invalid index ${e}`);let n=this.view.getScrollTop(),s=this.view.elementTop(e),o=this.view.elementHeight(e);if((0,y.Et)(t)){let e=o-this.view.renderHeight+i;this.view.setScrollTop(e*(0,C.qE)(t,0,1)+s-i)}else{let e=s+o,t=n+this.view.renderHeight;s<n+i&&e>=t||(s<n+i||e>=t&&o>=this.view.renderHeight?this.view.setScrollTop(s-i):e>=t&&this.view.setScrollTop(e-this.view.renderHeight))}}getRelativeTop(e,t=0){if(e<0||e>=this.length)throw new S(this.user,`Invalid index ${e}`);let i=this.view.getScrollTop(),n=this.view.elementTop(e),s=this.view.elementHeight(e);if(n<i+t||n+s>i+this.view.renderHeight)return null;let o=s-this.view.renderHeight+t;return Math.abs((i+t-n)/o)}getHTMLElement(){return this.view.domNode}getScrollableElement(){return this.view.scrollableElementDomNode}getElementID(e){return this.view.getElementDomId(e)}getElementTop(e){return this.view.elementTop(e)}style(e){this.styleController.style(e)}toListEvent({indexes:e,browserEvent:t}){return{indexes:e,elements:e.map(e=>this.view.element(e)),browserEvent:t}}_onFocusChange(){let e=this.focus.get();this.view.domNode.classList.toggle("element-focused",e.length>0),this.onDidChangeActiveDescendant()}onDidChangeActiveDescendant(){let e=this.focus.get();if(e.length>0){let t;this.accessibilityProvider?.getActiveDescendantId&&(t=this.accessibilityProvider.getActiveDescendantId(this.view.element(e[0]))),this.view.domNode.setAttribute("aria-activedescendant",t||this.view.getElementDomId(e[0]))}else this.view.domNode.removeAttribute("aria-activedescendant")}_onSelectionChange(){let e=this.selection.get();this.view.domNode.classList.toggle("selection-none",0===e.length),this.view.domNode.classList.toggle("selection-single",1===e.length),this.view.domNode.classList.toggle("selection-multiple",e.length>1)}dispose(){this._onDidDispose.fire(),this.disposables.dispose(),this._onDidDispose.dispose()}}D([f.B],ee.prototype,"onDidChangeFocus",null),D([f.B],ee.prototype,"onDidChangeSelection",null),D([f.B],ee.prototype,"onContextMenu",null),D([f.B],ee.prototype,"onKeyDown",null),D([f.B],ee.prototype,"onDidFocus",null),D([f.B],ee.prototype,"onDidBlur",null)},67514:(e,t,i)=>{"use strict";i.d(t,{J:()=>o,U:()=>s});var n=i(22263);let s=(0,n.u1)("textResourceConfigurationService"),o=(0,n.u1)("textResourcePropertiesService")},67914:(e,t,i)=>{"use strict";i.d(t,{BG:()=>o,IO:()=>a,Y:()=>r,eh:()=>s,pj:()=>h,qN:()=>l});class n{constructor(e,t){this._restrictedRenderingContextBrand=void 0,this._viewLayout=e,this.viewportData=t,this.scrollWidth=this._viewLayout.getScrollWidth(),this.scrollHeight=this._viewLayout.getScrollHeight(),this.visibleRange=this.viewportData.visibleRange,this.bigNumbersDelta=this.viewportData.bigNumbersDelta;let i=this._viewLayout.getCurrentViewport();this.scrollTop=i.top,this.scrollLeft=i.left,this.viewportWidth=i.width,this.viewportHeight=i.height}getScrolledTopFromAbsoluteTop(e){return e-this.scrollTop}getVerticalOffsetForLineNumber(e,t){return this._viewLayout.getVerticalOffsetForLineNumber(e,t)}getVerticalOffsetAfterLineNumber(e,t){return this._viewLayout.getVerticalOffsetAfterLineNumber(e,t)}getLineHeightForLineNumber(e){return this._viewLayout.getLineHeightForLineNumber(e)}getDecorationsInViewport(){return this.viewportData.getDecorationsInViewport()}}class s extends n{constructor(e,t,i,n){super(e,t),this._renderingContextBrand=void 0,this._viewLines=i,this._viewLinesGpu=n}linesVisibleRangesForRange(e,t){let i=this._viewLines.linesVisibleRangesForRange(e,t);if(!this._viewLinesGpu)return i??null;let n=this._viewLinesGpu.linesVisibleRangesForRange(e,t);return i?n?i.concat(n).sort((e,t)=>e.lineNumber-t.lineNumber):i:n}visibleRangeForPosition(e){return this._viewLines.visibleRangeForPosition(e)??this._viewLinesGpu?.visibleRangeForPosition(e)??null}}class o{constructor(e,t,i,n){this.outsideRenderedLine=e,this.lineNumber=t,this.ranges=i,this.continuesOnNextLine=n}}class r{static from(e){let t=Array(e.length);for(let i=0,n=e.length;i<n;i++){let n=e[i];t[i]=new r(n.left,n.width)}return t}constructor(e,t){this._horizontalRangeBrand=void 0,this.left=Math.round(e),this.width=Math.round(t)}toString(){return`[${this.left},${this.width}]`}}class a{constructor(e,t){this._floatHorizontalRangeBrand=void 0,this.left=e,this.width=t}toString(){return`[${this.left},${this.width}]`}static compare(e,t){return e.left-t.left}}class l{constructor(e,t){this.outsideRenderedLine=e,this.originalLeft=t,this.left=Math.round(this.originalLeft)}}class h{constructor(e,t){this.outsideRenderedLine=e,this.ranges=t}}},68103:(e,t,i)=>{"use strict";i.d(t,{A7:()=>l,Q_:()=>c,VR:()=>r,cn:()=>p,ct:()=>m,jB:()=>a,kF:()=>g,mX:()=>u});var n=i(15957),s=i(85521);i(34457);var o=i(55296);let r=(0,i(22263).u1)("contextService");function a(e){return"string"==typeof e?.id&&o.r.isUri(e.uri)}function l(e){var t;return"string"==typeof e?.id&&!a(e)&&(t=e,!("string"==typeof t?.id&&o.r.isUri(t.configPath)))}let h={id:"ext-dev"},d={id:"empty-window"};function c(e,t){return"string"==typeof e||void 0===e?"string"==typeof e?{id:(0,s.P8)(e)}:t?h:d:e.configuration?{id:e.id,configPath:e.configuration}:1===e.folders.length?{id:e.id,uri:e.folders[0].uri}:{id:e.id}}class u{constructor(e,t){this.raw=t,this.uri=e.uri,this.index=e.index,this.name=e.name}toJSON(){return{uri:this.uri,name:this.name,index:this.index}}}let g="code-workspace";(0,n.kg)(2032,"Code Workspace");let p="4064f6ec-cb38-4ad0-af64-ee6467e63c82";function m(e){return e.id===p}},68192:(e,t,i)=>{"use strict";i.d(t,{m:()=>P,p:()=>O});var n=i(87899),s=i(35023),o=i(44987),r=i(98810),a=i(39205),l=i(55354),h=i(27281),d=i(17354),c=i(82102);i(91282);var u=i(15957),g=i(85350);class p extends c.jG{get onDidChangeDropdownVisibility(){return this._onDidChangeDropdownVisibility.event}constructor(e,t,i={orientation:0}){super(),this.submenuActionViewItems=[],this.hasSecondaryActions=!1,this._onDidChangeDropdownVisibility=this._register(new d._B),this.disposables=this._register(new c.Cm),i.hoverDelegate=i.hoverDelegate??this._register((0,g.bW)()),this.options=i,this.toggleMenuAction=this._register(new m(()=>this.toggleMenuActionViewItem?.show(),i.toggleMenuTitle)),this.element=document.createElement("div"),this.element.className="monaco-toolbar",e.appendChild(this.element),this.actionBar=this._register(new o.E(this.element,{orientation:i.orientation,ariaLabel:i.ariaLabel,actionRunner:i.actionRunner,allowContextMenu:i.allowContextMenu,highlightToggledItems:i.highlightToggledItems,hoverDelegate:i.hoverDelegate,actionViewItemProvider:(e,n)=>{if(e.id===m.ID)return this.toggleMenuActionViewItem=new r.d(e,e.menuActions,t,{actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,keybindingProvider:this.options.getKeyBinding,classNames:h.L.asClassNameArray(i.moreIcon??l.W.toolBarMore),anchorAlignmentProvider:this.options.anchorAlignmentProvider,menuAsChild:!!this.options.renderDropdownAsChildElement,skipTelemetry:this.options.skipTelemetry,isMenu:!0,hoverDelegate:this.options.hoverDelegate}),this.toggleMenuActionViewItem.setActionContext(this.actionBar.context),this.disposables.add(this._onDidChangeDropdownVisibility.add(this.toggleMenuActionViewItem.onDidChangeVisibility)),this.toggleMenuActionViewItem;if(i.actionViewItemProvider){let t=i.actionViewItemProvider(e,n);if(t)return t}if(e instanceof a.YH){let i=new r.d(e,e.actions,t,{actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,keybindingProvider:this.options.getKeyBinding,classNames:e.class,anchorAlignmentProvider:this.options.anchorAlignmentProvider,menuAsChild:!!this.options.renderDropdownAsChildElement,skipTelemetry:this.options.skipTelemetry,hoverDelegate:this.options.hoverDelegate});return i.setActionContext(this.actionBar.context),this.submenuActionViewItems.push(i),this.disposables.add(this._onDidChangeDropdownVisibility.add(i.onDidChangeVisibility)),i}}}))}set actionRunner(e){this.actionBar.actionRunner=e}get actionRunner(){return this.actionBar.actionRunner}set context(e){for(let t of(this.actionBar.context=e,this.toggleMenuActionViewItem?.setActionContext(e),this.submenuActionViewItems))t.setActionContext(e)}getElement(){return this.element}getItemAction(e){return this.actionBar.getAction(e)}setActions(e,t){this.clear();let i=e?e.slice(0):[];this.hasSecondaryActions=!!(t&&t.length>0),this.hasSecondaryActions&&t&&(this.toggleMenuAction.menuActions=t.slice(0),i.push(this.toggleMenuAction)),i.forEach(e=>{this.actionBar.push(e,{icon:this.options.icon??!0,label:this.options.label??!1,keybinding:this.getKeybindingLabel(e)})})}getKeybindingLabel(e){let t=this.options.getKeyBinding?.(e);return t?.getLabel()??void 0}clear(){this.submenuActionViewItems=[],this.disposables.clear(),this.actionBar.clear()}dispose(){this.clear(),this.disposables.dispose(),super.dispose()}}class m extends a.rc{static{this.ID="toolbar.toggle.more"}constructor(e,t){super(m.ID,t=t||u.kg(17,"More Actions..."),void 0,!0),this._menuActions=[],this.toggleDropdownMenu=e}async run(){this.toggleDropdownMenu()}get menuActions(){return this._menuActions}set menuActions(e){this._menuActions=e}}var f=i(5488),_=i(28771),v=i(6033),b=i(88608),C=i(19784),w=i(41327),y=i(76054),S=i(39783),k=i(8820),x=i(51094),L=i(49195),D=i(66499),I=i(27140),N=i(22263);let E=(0,N.u1)("IActionViewItemService");class M{constructor(){this._providers=new Map,this._onDidChange=new d.vl,this.onDidChange=this._onDidChange.event}dispose(){this._onDidChange.dispose()}lookUp(e,t){return this._providers.get(this._makeKey(e,t))}_makeKey(e,t){return`${e.id}/${t instanceof w.D8?t.id:t}`}}(0,I.v)(E,M,1);var T=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},R=function(e,t){return function(i,n){t(i,n,e)}};let O=class extends p{constructor(e,t,i,n,s,o,r,a){super(e,s,{getKeyBinding:e=>o.lookupKeybinding(e.id)??void 0,...t,allowContextMenu:!0,skipTelemetry:"string"==typeof t?.telemetrySource}),this._options=t,this._menuService=i,this._contextKeyService=n,this._contextMenuService=s,this._keybindingService=o,this._commandService=r,this._sessionDisposables=this._store.add(new c.Cm);let l=t?.telemetrySource;l&&this._store.add(this.actionBar.onDidRun(e=>a.publicLog2("workbenchActionExecuted",{id:e.action.id,from:l})))}setActions(e,t=[],i){this._sessionDisposables.clear();let o=e.slice(),r=t.slice(),l=[],h=0,d=[],c=!1;if(this._options?.hiddenItemStrategy!==-1)for(let e=0;e<o.length;e++){let t=o[e];(t instanceof w.Xe||t instanceof w.nI)&&t.hideActions&&(l.push(t.hideActions.toggle),t.hideActions.toggle.checked&&h++,t.hideActions.isHidden&&(c=!0,o[e]=void 0,this._options?.hiddenItemStrategy!==0&&(d[e]=t)))}if(this._options?.overflowBehavior!==void 0){let e=(0,_.E$)(new Set(this._options.overflowBehavior.exempted),b.f.map(o,e=>e?.id)),t=this._options.overflowBehavior.maxItems-e.size,i=0;for(let n=0;n<o.length;n++){let s=o[n];s&&(i++,!e.has(s.id)&&i>=t&&(o[n]=void 0,d[n]=s))}}(0,f.SK)(o),(0,f.SK)(d),super.setActions(o,a.wv.join(d,r)),(l.length>0||o.length>0)&&this._sessionDisposables.add((0,n.ko)(this.getElement(),"contextmenu",e=>{let t=new s.P((0,n.zk)(this.getElement()),e),o=this.getItemAction(t.target);if(!o)return;t.preventDefault(),t.stopPropagation();let r=[];if(o instanceof w.Xe&&o.menuKeybinding)r.push(o.menuKeybinding);else if(!(o instanceof w.nI||o instanceof m)){let e=!!this._keybindingService.lookupKeybinding(o.id);r.push((0,y.D)(this._commandService,this._keybindingService,o.id,void 0,e))}if(l.length>0){let e=!1;if(1===h&&this._options?.hiddenItemStrategy===0){e=!0;for(let e=0;e<l.length;e++)if(l[e].checked){l[e]=(0,a.ih)({id:o.id,label:o.label,checked:!0,enabled:!1,run(){}});break}}if(!e&&(o instanceof w.Xe||o instanceof w.nI)){if(!o.hideActions)return;r.push(o.hideActions.hide)}else r.push((0,a.ih)({id:"label",label:(0,u.kg)(1634,"Hide"),enabled:!1,run(){}}))}let d=a.wv.join(r,l);this._options?.resetMenu&&!i&&(i=[this._options.resetMenu]),c&&i&&(d.push(new a.wv),d.push((0,a.ih)({id:"resetThisMenu",label:(0,u.kg)(1635,"Reset Menu"),run:()=>this._menuService.resetHiddenStates(i)}))),0!==d.length&&this._contextMenuService.showContextMenu({getAnchor:()=>t,getActions:()=>d,menuId:this._options?.contextMenu,menuActionOptions:{renderShortTitle:!0,...this._options?.menuOptions},skipTelemetry:"string"==typeof this._options?.telemetrySource,contextKeyService:this._contextKeyService})}))}};O=T([R(2,w.ez),R(3,k.fN),R(4,x.Z),R(5,L.b),R(6,S.d),R(7,D.k)],O);let P=class extends O{get onDidChangeMenuItems(){return this._onDidChangeMenuItems.event}constructor(e,t,i,s,o,r,a,l,h,c,u){super(e,{resetMenu:t,...i,actionViewItemProvider:(s,o)=>{let r=c.lookUp(t,s instanceof w.nI?s.item.submenu.id:s.id);r||(r=i?.actionViewItemProvider);let a=r?.(s,o,u,(0,n.zk)(e).vscodeWindowId);return a||(0,C.rN)(u,s,o)}},s,o,r,a,l,h),this._onDidChangeMenuItems=this._store.add(new d.vl);let g=this._store.add(s.createMenu(t,o,{emitEventsForSubmenuChanges:!0,eventDebounceDelay:i?.eventDebounceDelay})),p=()=>{let{primary:t,secondary:n}=(0,C.R4)(g.getActions(i?.menuOptions),i?.toolbarOptions?.primaryGroup,i?.toolbarOptions?.shouldInlineSubmenu,i?.toolbarOptions?.useSeparatorsInPrimaryActions);e.classList.toggle("has-no-actions",0===t.length&&0===n.length),super.setActions(t,n)};this._store.add(g.onDidChange(()=>{p(),this._onDidChangeMenuItems.fire(this)})),this._store.add(c.onDidChange(e=>{e===t&&p()})),p()}setActions(){throw new v.D7("This toolbar is populated from a menu.")}};P=T([R(3,w.ez),R(4,k.fN),R(5,x.Z),R(6,L.b),R(7,S.d),R(8,D.k),R(9,E),R(10,N._Y)],P)},69020:()=>{},69061:()=>{},69745:(e,t,i)=>{"use strict";i.d(t,{AO:()=>x,Dr:()=>L,Hs:()=>E,K4:()=>b,Ls:()=>k,Tl:()=>w,UN:()=>I,YA:()=>D,dU:()=>_,ey:()=>V,h0:()=>N,is:()=>y,kr:()=>S,oi:()=>C,sx:()=>v});var n=i(6033),s=i(55532),o=i(71036),r=i(62904),a=i(80484),l=i(6849),h=i(21348),d=i(23047),c=i(72553),u=i(62450),g=i(71224),p=i(74830),m=i(91587),f=i(15254);class _{static getEdits(e,t,i,n,s){if(!s&&this._isAutoIndentType(e,t,i)){let s=[];for(let o of i){let i=this._findActualIndentationForSelection(e,t,o,n);if(null===i)return;s.push({selection:o,indentation:i})}let o=C.getAutoClosingPairClose(e,t,i,n,!1);return this._getIndentationAndAutoClosingPairEdits(e,t,s,n,o)}}static _isAutoIndentType(e,t,i){if(e.autoIndent<4)return!1;for(let e=0,n=i.length;e<n;e++)if(!t.tokenization.isCheapToTokenize(i[e].getEndPosition().lineNumber))return!1;return!0}static _findActualIndentationForSelection(e,t,i,n){let s=(0,m._t)(e,t,i,n,{shiftIndent:t=>W(e,t),unshiftIndent:t=>H(e,t)},e.languageConfigurationService);if(null===s)return null;let o=(0,g.Cw)(t,i.startLineNumber,i.startColumn);return s===e.normalizeIndentation(o)?null:s}static _getIndentationAndAutoClosingPairEdits(e,t,i,n,s){let o=i.map(({selection:i,indentation:o})=>{if(null!==s)return new T(this._getEditFromIndentationAndSelection(e,t,o,i,n,!1),i,n,s);{let s=this._getEditFromIndentationAndSelection(e,t,o,i,n,!0);return B(s.range,s.text,!1)}});return new l.vY(4,o,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}static _getEditFromIndentationAndSelection(e,t,i,n,s,o=!0){let r=n.startLineNumber,a=t.getLineFirstNonWhitespaceColumn(r),l=e.normalizeIndentation(i);return 0!==a&&(l+=t.getLineContent(r).substring(a-1,n.startColumn-1)),l+=o?s:"",{range:new d.Q(r,1,n.endLineNumber,n.endColumn),text:l}}}class v{static getEdits(e,t,i,n,s,o){if(F(t,i,n,s,o))return this._runAutoClosingOvertype(e,n,o)}static _runAutoClosingOvertype(e,t,i){let n=[];for(let e=0,s=t.length;e<s;e++){let s=t[e].getPosition(),r=new d.Q(s.lineNumber,s.column,s.lineNumber,s.column+1);n[e]=new o.iu(r,i)}return new l.vY(4,n,{shouldPushStackElementBefore:O(e,4),shouldPushStackElementAfter:!1})}}class b{static getEdits(e,t,i,n,s){if(F(e,t,i,n,s)){let e=i.map(e=>new o.iu(new d.Q(e.positionLineNumber,e.positionColumn,e.positionLineNumber,e.positionColumn+1),"",!1));return new l.vY(4,e,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}}}class C{static getEdits(e,t,i,n,s,o){if(!o){let o=this.getAutoClosingPairClose(e,t,i,n,s);if(null!==o)return this._runAutoClosingOpenCharType(i,n,s,o)}}static _runAutoClosingOpenCharType(e,t,i,n){let s=[];for(let o=0,r=e.length;o<r;o++){let r=e[o];s[o]=new M(r,t,!i,n)}return new l.vY(4,s,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}static getAutoClosingPairClose(e,t,i,n,s){let o,r;for(let e of i)if(!e.isEmpty())return null;let a=i.map(e=>{let t=e.getPosition();return s?{lineNumber:t.lineNumber,beforeColumn:t.column-n.length,afterColumn:t.column}:{lineNumber:t.lineNumber,beforeColumn:t.column,afterColumn:t.column}}),d=this._findAutoClosingPairOpen(e,t,a.map(e=>new c.y(e.lineNumber,e.beforeColumn)),n);if(!d||((0,l.vG)(n)?(o=e.autoClosingQuotes,r=e.shouldAutoCloseBefore.quote):e.blockCommentStartToken&&d.open.includes(e.blockCommentStartToken)?(o=e.autoClosingComments,r=e.shouldAutoCloseBefore.comment):(o=e.autoClosingBrackets,r=e.shouldAutoCloseBefore.bracket),"never"===o))return null;let u=this._findContainedAutoClosingPair(e,d),g=u?u.close:"",m=!0;for(let i of a){let{lineNumber:s,beforeColumn:a,afterColumn:l}=i,c=t.getLineContent(s),u=c.substring(0,a-1),f=c.substring(l-1);if(f.startsWith(g)||(m=!1),f.length>0){let t=f.charAt(0);if(!this._isBeforeClosingBrace(e,f)&&!r(t))return null}if(1===d.open.length&&("'"===n||'"'===n)&&"always"!==o){let t=(0,h.i)(e.wordSeparators,[]);if(u.length>0){let e=u.charCodeAt(u.length-1);if(0===t.get(e))return null}}if(!t.tokenization.isCheapToTokenize(s))return null;t.tokenization.forceTokenization(s);let _=t.tokenization.getLineTokens(s),v=(0,p.BQ)(_,a-1);if(!d.shouldAutoClose(v,a-v.firstCharOffset))return null;let b=d.findNeutralCharacter();if(b){let e=t.tokenization.getTokenTypeIfInsertingCharacter(s,a,b);if(!d.isOK(e))return null}}return m?d.close.substring(0,d.close.length-g.length):d.close}static _findContainedAutoClosingPair(e,t){if(t.open.length<=1)return null;let i=t.close.charAt(t.close.length-1),n=e.autoClosingPairs.autoClosingPairsCloseByEnd.get(i)||[],s=null;for(let e of n)e.open!==t.open&&t.open.includes(e.open)&&t.close.endsWith(e.close)&&(!s||e.open.length>s.open.length)&&(s=e);return s}static _findAutoClosingPairOpen(e,t,i,n){let s=e.autoClosingPairs.autoClosingPairsOpenByEnd.get(n);if(!s)return null;let o=null;for(let e of s)if(null===o||e.open.length>o.open.length){let s=!0;for(let o of i)if(t.getValueInRange(new d.Q(o.lineNumber,o.column-e.open.length+1,o.lineNumber,o.column))+n!==e.open){s=!1;break}s&&(o=e)}return o}static _isBeforeClosingBrace(e,t){let i=t.charAt(0),n=e.autoClosingPairs.autoClosingPairsOpenByStart.get(i)||[],s=e.autoClosingPairs.autoClosingPairsCloseByStart.get(i)||[],o=n.some(e=>t.startsWith(e.open)),r=s.some(e=>t.startsWith(e.close));return!o&&r}}class w{static getEdits(e,t){if("overtype"!==e.inputMode)return null;let i=t.map(e=>new o.gr(e.insertedTextRange));return new l.vY(4,i,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}}class y{static getEdits(e,t,i,n,s){if(!s&&this._isSurroundSelectionType(e,t,i,n))return this._runSurroundSelectionType(e,i,n)}static _runSurroundSelectionType(e,t,i){let n=[];for(let s=0,o=t.length;s<o;s++){let o=t[s],r=e.surroundingPairs[i];n[s]=new a.i(o,i,r)}return new l.vY(0,n,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})}static _isSurroundSelectionType(e,t,i,n){if(!V(e,n)||!e.surroundingPairs.hasOwnProperty(n))return!1;let s=(0,l.vG)(n);for(let e of i){if(e.isEmpty())return!1;let i=!0;for(let n=e.startLineNumber;n<=e.endLineNumber;n++){let s=t.getLineContent(n),o=n===e.startLineNumber?e.startColumn-1:0,r=n===e.endLineNumber?e.endColumn-1:s.length,a=s.substring(o,r);if(/[^ \t]/.test(a)){i=!1;break}}if(i)return!1;if(s&&e.startLineNumber===e.endLineNumber&&e.startColumn+1===e.endColumn){let i=t.getValueInRange(e);if((0,l.vG)(i))return!1}}return!0}}class S{static getEdits(e,t,i,n,s,o){if(!o&&this._isTypeInterceptorElectricChar(t,i,n)){let o=this._typeInterceptorElectricChar(e,t,i,n[0],s);if(o)return o}}static _isTypeInterceptorElectricChar(e,t,i){return!!(1===i.length&&t.tokenization.isCheapToTokenize(i[0].getEndPosition().lineNumber))}static _typeInterceptorElectricChar(e,t,i,r,a){let h;if(!t.electricChars.hasOwnProperty(a)||!r.isEmpty())return null;let c=r.getPosition();i.tokenization.forceTokenization(c.lineNumber);let u=i.tokenization.getLineTokens(c.lineNumber);try{h=t.onElectricCharacter(a,u,c.column)}catch(e){return(0,n.dz)(e),null}if(!h)return null;if(h.matchOpenBracket){let n=(u.getLineContent()+a).lastIndexOf(h.matchOpenBracket)+1,r=i.bracketPairs.findMatchingBracketUp(h.matchOpenBracket,{lineNumber:c.lineNumber,column:n},500);if(r){if(r.startLineNumber===c.lineNumber)return null;let n=i.getLineContent(r.startLineNumber),h=s.UU(n),u=t.normalizeIndentation(h),g=i.getLineContent(c.lineNumber),p=i.getLineFirstNonWhitespaceColumn(c.lineNumber)||c.column,m=u+g.substring(p-1,c.column-1)+a,f=new d.Q(c.lineNumber,1,c.lineNumber,c.column),_=new o.iu(f,m);return new l.vY(R(m,e),[_],{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!0})}}return null}}class k{static getEdits(e,t,i,n,s){let r=[];for(let t=0,a=i.length;t<a;t++){let a="overtype"!==e.inputMode||s?o.iu:o.AS;r[t]=new a(i[t],n)}let a=R(n,t);return new l.vY(a,r,{shouldPushStackElementBefore:O(t,a),shouldPushStackElementAfter:!1})}}class x{static getEdits(e,t,i,n,s){if(!s&&"\n"===n){let n=[];for(let s=0,o=i.length;s<o;s++)n[s]=this._enter(e,t,!1,i[s]);return new l.vY(4,n,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}}static _enter(e,t,i,n){if(0===e.autoIndent)return B(n,"\n",i);if(!t.tokenization.isCheapToTokenize(n.getStartPosition().lineNumber)||1===e.autoIndent){let o=t.getLineContent(n.startLineNumber),r=s.UU(o).substring(0,n.startColumn-1);return B(n,"\n"+e.normalizeIndentation(r),i)}let r=(0,f.h)(e.autoIndent,t,n,e.languageConfigurationService);if(r){if(r.indentAction===u.l.None)return B(n,"\n"+e.normalizeIndentation(r.indentation+r.appendText),i);else if(r.indentAction===u.l.Indent)return B(n,"\n"+e.normalizeIndentation(r.indentation+r.appendText),i);else if(r.indentAction===u.l.IndentOutdent){let t=e.normalizeIndentation(r.indentation),s=e.normalizeIndentation(r.indentation+r.appendText),a="\n"+s+"\n"+t;return i?new o.q2(n,a,!0):new o.iP(n,a,-1,s.length-t.length,!0)}else if(r.indentAction===u.l.Outdent){let t=H(e,r.indentation);return B(n,"\n"+e.normalizeIndentation(t+r.appendText),i)}}let a=t.getLineContent(n.startLineNumber),l=s.UU(a).substring(0,n.startColumn-1);if(e.autoIndent>=4){let r=(0,m.MU)(e.autoIndent,t,n,{unshiftIndent:t=>H(e,t),shiftIndent:t=>W(e,t),normalizeIndentation:t=>e.normalizeIndentation(t)},e.languageConfigurationService);if(r){let a=e.visibleColumnFromColumn(t,n.getEndPosition()),l=n.endColumn,h=t.getLineContent(n.endLineNumber),d=s.HG(h);if(n=d>=0?n.setEndPosition(n.endLineNumber,Math.max(n.endColumn,d+1)):n.setEndPosition(n.endLineNumber,t.getLineMaxColumn(n.endLineNumber)),i)return new o.q2(n,"\n"+e.normalizeIndentation(r.afterEnter),!0);{let t=0;return l<=d+1&&(e.insertSpaces||(a=Math.ceil(a/e.indentSize)),t=Math.min(a+1-e.normalizeIndentation(r.afterEnter).length-1,0)),new o.iP(n,"\n"+e.normalizeIndentation(r.afterEnter),0,t,!0)}}}return B(n,"\n"+e.normalizeIndentation(l),i)}static lineInsertBefore(e,t,i){if(null===t||null===i)return[];let n=[];for(let s=0,r=i.length;s<r;s++){let r=i[s].positionLineNumber;if(1===r)n[s]=new o.q2(new d.Q(1,1,1,1),"\n");else{r--;let i=t.getLineMaxColumn(r);n[s]=this._enter(e,t,!1,new d.Q(r,i,r,i))}}return n}static lineInsertAfter(e,t,i){if(null===t||null===i)return[];let n=[];for(let s=0,o=i.length;s<o;s++){let o=i[s].positionLineNumber,r=t.getLineMaxColumn(o);n[s]=this._enter(e,t,!1,new d.Q(o,r,o,r))}return n}static lineBreakInsert(e,t,i){let n=[];for(let s=0,o=i.length;s<o;s++)n[s]=this._enter(e,t,!0,i[s]);return n}}class L{static getEdits(e,t,i,n,s,o){let r=this._distributePasteToCursors(e,i,n,s,o);return r?(i=i.sort(d.Q.compareRangesUsingStarts),this._distributedPaste(e,t,i,r)):this._simplePaste(e,t,i,n,s)}static _distributePasteToCursors(e,t,i,n,o){if(n||1===t.length)return null;if(o&&o.length===t.length)return o;if("spread"===e.multiCursorPaste){10===i.charCodeAt(i.length-1)&&(i=i.substring(0,i.length-1)),13===i.charCodeAt(i.length-1)&&(i=i.substring(0,i.length-1));let e=s.uz(i);if(e.length===t.length)return e}return null}static _distributedPaste(e,t,i,n){let s=[];for(let t=0,r=i.length;t<r;t++){let r=e.overtypeOnPaste&&"overtype"===e.inputMode?o.AS:o.iu;s[t]=new r(i[t],n[t])}return new l.vY(0,s,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})}static _simplePaste(e,t,i,n,s){let r=[];for(let t=0,a=i.length;t<a;t++){let a=i[t],l=a.getPosition();if(s&&!a.isEmpty()&&(s=!1),s&&n.indexOf("\n")!==n.length-1&&(s=!1),s){let e=new d.Q(l.lineNumber,1,l.lineNumber,1);r[t]=new o.ui(e,n,a,!0)}else{let i=e.overtypeOnPaste&&"overtype"===e.inputMode?o.AS:o.iu;r[t]=new i(a,n)}}return new l.vY(0,r,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})}}class D{static getEdits(e,t,i,n,s,o,r,a){let h=n.map(e=>this._compositionType(i,e,s,o,r,a));return new l.vY(4,h,{shouldPushStackElementBefore:O(e,4),shouldPushStackElementAfter:!1})}static _compositionType(e,t,i,n,s,r){if(!t.isEmpty())return null;let a=t.getPosition(),l=Math.max(1,a.column-n),h=Math.min(e.getLineMaxColumn(a.lineNumber),a.column+s),c=new d.Q(a.lineNumber,l,a.lineNumber,h);return new o.iP(c,i,0,r)}}class I{static getEdits(e,t,i){let n=[];for(let e=0,s=t.length;e<s;e++)n[e]=new o.iu(t[e],i);let s=R(i,e);return new l.vY(s,n,{shouldPushStackElementBefore:O(e,s),shouldPushStackElementAfter:!1})}}class N{static getCommands(e,t,i){let n=[];for(let s=0,a=i.length;s<a;s++){let a=i[s];if(a.isEmpty()){let i=t.getLineContent(a.startLineNumber);if(/^\s*$/.test(i)&&t.tokenization.isCheapToTokenize(a.startLineNumber)){let r=this._goodIndentForLine(e,t,a.startLineNumber);r=r||" ";let l=e.normalizeIndentation(r);if(!i.startsWith(l)){n[s]=new o.iu(new d.Q(a.startLineNumber,1,a.startLineNumber,i.length+1),l,!0);continue}}n[s]=this._replaceJumpToNextIndent(e,t,a,!0)}else{if(a.startLineNumber===a.endLineNumber){let i=t.getLineMaxColumn(a.startLineNumber);if(1!==a.startColumn||a.endColumn!==i){n[s]=this._replaceJumpToNextIndent(e,t,a,!1);continue}}n[s]=new r.Y(a,{isUnshift:!1,tabSize:e.tabSize,indentSize:e.indentSize,insertSpaces:e.insertSpaces,useTabStops:e.useTabStops,autoIndent:e.autoIndent},e.languageConfigurationService)}}return n}static _goodIndentForLine(e,t,i){let n=null,o="",r=(0,m.vn)(e.autoIndent,t,i,!1,e.languageConfigurationService);if(r)n=r.action,o=r.indentation;else if(i>1){let n;for(n=i-1;n>=1;n--){let e=t.getLineContent(n);if(s.lT(e)>=0)break}if(n<1)return null;let r=t.getLineMaxColumn(n),a=(0,f.h)(e.autoIndent,t,new d.Q(n,r,n,r),e.languageConfigurationService);a&&(o=a.indentation+a.appendText)}return(n&&(n===u.l.Indent&&(o=W(e,o)),n===u.l.Outdent&&(o=H(e,o)),o=e.normalizeIndentation(o)),o)?o:null}static _replaceJumpToNextIndent(e,t,i,n){let s="",r=i.getStartPosition();if(e.insertSpaces){let i=e.visibleColumnFromColumn(t,r),n=e.indentSize,o=n-i%n;for(let e=0;e<o;e++)s+=" "}else s=" ";return new o.iu(i,s,n)}}class E extends o.iP{constructor(e,t,i,n,s,o){super(e,t,i,n),this._openCharacter=s,this._closeCharacter=o,this.closeCharacterRange=null,this.enclosingRange=null}_computeCursorStateWithRange(e,t,i){return this.closeCharacterRange=new d.Q(t.startLineNumber,t.endColumn-this._closeCharacter.length,t.endLineNumber,t.endColumn),this.enclosingRange=new d.Q(t.startLineNumber,t.endColumn-this._openCharacter.length-this._closeCharacter.length,t.endLineNumber,t.endColumn),super.computeCursorState(e,i)}}class M extends E{constructor(e,t,i,n){super(e,(i?t:"")+n,0,-n.length,t,n)}computeCursorState(e,t){let i=t.getInverseEditOperations()[0].range;return this._computeCursorStateWithRange(e,i,t)}}class T extends E{constructor(e,t,i,n){let s=i+n;super(t,s,0,i.length,i,n),this._autoIndentationEdit=e,this._autoClosingEdit={range:t,text:s}}getEditOperations(e,t){t.addTrackedEditOperation(this._autoIndentationEdit.range,this._autoIndentationEdit.text),t.addTrackedEditOperation(this._autoClosingEdit.range,this._autoClosingEdit.text)}computeCursorState(e,t){let i=t.getInverseEditOperations();if(2!==i.length)throw Error("There should be two inverse edit operations!");let n=i[0].range,s=i[1].range,o=n.plusRange(s);return this._computeCursorStateWithRange(e,o,t)}}function R(e,t){return" "===e?5===t||6===t?6:5:4}function O(e,t){return!(!A(e)||A(t))||5!==e&&P(e)!==P(t)}function P(e){return 6===e||5===e?"space":e}function A(e){return 4===e||5===e||6===e}function F(e,t,i,n,s){if("never"===e.autoClosingOvertype||!e.autoClosingPairs.autoClosingPairsCloseSingleChar.has(s))return!1;for(let o=0,r=i.length;o<r;o++){let r=i[o];if(!r.isEmpty())return!1;let a=r.getPosition(),h=t.getLineContent(a.lineNumber);if(h.charAt(a.column-1)!==s)return!1;let d=(0,l.vG)(s);if(92===(a.column>2?h.charCodeAt(a.column-2):0)&&d)return!1;if("auto"===e.autoClosingOvertype){let e=!1;for(let t=0,i=n.length;t<i;t++){let i=n[t];if(a.lineNumber===i.startLineNumber&&a.column===i.startColumn){e=!0;break}}if(!e)return!1}}return!0}function B(e,t,i){return i?new o.q2(e,t,!0):new o.iu(e,t,!0)}function W(e,t,i){return i=i||1,r.Y.shiftIndent(t,t.length+i,e.tabSize,e.indentSize,e.insertSpaces)}function H(e,t,i){return i=i||1,r.Y.unshiftIndent(t,t.length+i,e.tabSize,e.indentSize,e.insertSpaces)}function V(e,t){return(0,l.vG)(t)?"quotes"===e.autoSurround||"languageDefined"===e.autoSurround:"brackets"===e.autoSurround||"languageDefined"===e.autoSurround}},69872:()=>{},69909:(e,t,i)=>{"use strict";var n;i.d(t,{j:()=>n}),function(e){let t=!1;e.enable=function(){t=!0},e.ofCaller=function(){if(!t)return;let e=Error,i=e.stackTraceLimit;e.stackTraceLimit=3;let n=Error().stack;return e.stackTraceLimit=i,s.fromStack(n,2)}}(n||(n={}));class s{static fromStack(e,t){let i=function(e){let t=e.match(/\((.*):(\d+):(\d+)\)/);if(t)return{fileName:t[1],line:parseInt(t[2]),column:parseInt(t[3]),id:e};let i=e.match(/at ([^\(\)]*):(\d+):(\d+)/);if(i)return{fileName:i[1],line:parseInt(i[2]),column:parseInt(i[3]),id:e}}(e.split("\n")[t+1]);return i?new s(i.fileName,i.line,i.column,i.id):void 0}constructor(e,t,i,n){this.fileName=e,this.line=t,this.column=i,this.id=n}}},69978:()=>{},70518:(e,t,i)=>{"use strict";i.d(t,{D:()=>n});class n{static capture(e){if(0===e.getScrollTop()||e.hasPendingScrollAnimation())return new n(e.getScrollTop(),e.getContentHeight(),null,0,null);let t=null,i=0,s=e.getVisibleRanges();if(s.length>0){t=s[0].getStartPosition();let n=e.getTopForPosition(t.lineNumber,t.column);i=e.getScrollTop()-n}return new n(e.getScrollTop(),e.getContentHeight(),t,i,e.getPosition())}constructor(e,t,i,n,s){this._initialScrollTop=e,this._initialContentHeight=t,this._visiblePosition=i,this._visiblePositionScrollDelta=n,this._cursorPosition=s}restore(e){if((this._initialContentHeight!==e.getContentHeight()||this._initialScrollTop!==e.getScrollTop())&&this._visiblePosition){let t=e.getTopForPosition(this._visiblePosition.lineNumber,this._visiblePosition.column);e.setScrollTop(t+this._visiblePositionScrollDelta)}}restoreRelativeVerticalPositionOfCursor(e){if(this._initialContentHeight===e.getContentHeight()&&this._initialScrollTop===e.getScrollTop())return;let t=e.getPosition();if(!this._cursorPosition||!t)return;let i=e.getTopForLineNumber(t.lineNumber)-e.getTopForLineNumber(this._cursorPosition.lineNumber);e.setScrollTop(e.getScrollTop()+i,1)}}},70537:(e,t,i)=>{"use strict";var n;i.d(t,{Fo:()=>g,YM:()=>n,m5:()=>m,uw:()=>l});class s{constructor(){this._keyCodeToStr=[],this._strToKeyCode=Object.create(null)}define(e,t){this._keyCodeToStr[e]=t,this._strToKeyCode[t.toLowerCase()]=e}keyCodeToStr(e){return this._keyCodeToStr[e]}strToKeyCode(e){return this._strToKeyCode[e.toLowerCase()]||0}}let o=new s,r=new s,a=new s,l=Array(230),h={},d=[],c=Object.create(null),u=Object.create(null),g=[],p=[];for(let e=0;e<=193;e++)g[e]=-1;for(let e=0;e<=132;e++)p[e]=-1;function m(e,t){return(e|(65535&t)<<16>>>0)>>>0}!function(){let e=[],t=[];for(let i of[[1,0,"None",0,"unknown",0,"VK_UNKNOWN","",""],[1,1,"Hyper",0,"",0,"","",""],[1,2,"Super",0,"",0,"","",""],[1,3,"Fn",0,"",0,"","",""],[1,4,"FnLock",0,"",0,"","",""],[1,5,"Suspend",0,"",0,"","",""],[1,6,"Resume",0,"",0,"","",""],[1,7,"Turbo",0,"",0,"","",""],[1,8,"Sleep",0,"",0,"VK_SLEEP","",""],[1,9,"WakeUp",0,"",0,"","",""],[0,10,"KeyA",31,"A",65,"VK_A","",""],[0,11,"KeyB",32,"B",66,"VK_B","",""],[0,12,"KeyC",33,"C",67,"VK_C","",""],[0,13,"KeyD",34,"D",68,"VK_D","",""],[0,14,"KeyE",35,"E",69,"VK_E","",""],[0,15,"KeyF",36,"F",70,"VK_F","",""],[0,16,"KeyG",37,"G",71,"VK_G","",""],[0,17,"KeyH",38,"H",72,"VK_H","",""],[0,18,"KeyI",39,"I",73,"VK_I","",""],[0,19,"KeyJ",40,"J",74,"VK_J","",""],[0,20,"KeyK",41,"K",75,"VK_K","",""],[0,21,"KeyL",42,"L",76,"VK_L","",""],[0,22,"KeyM",43,"M",77,"VK_M","",""],[0,23,"KeyN",44,"N",78,"VK_N","",""],[0,24,"KeyO",45,"O",79,"VK_O","",""],[0,25,"KeyP",46,"P",80,"VK_P","",""],[0,26,"KeyQ",47,"Q",81,"VK_Q","",""],[0,27,"KeyR",48,"R",82,"VK_R","",""],[0,28,"KeyS",49,"S",83,"VK_S","",""],[0,29,"KeyT",50,"T",84,"VK_T","",""],[0,30,"KeyU",51,"U",85,"VK_U","",""],[0,31,"KeyV",52,"V",86,"VK_V","",""],[0,32,"KeyW",53,"W",87,"VK_W","",""],[0,33,"KeyX",54,"X",88,"VK_X","",""],[0,34,"KeyY",55,"Y",89,"VK_Y","",""],[0,35,"KeyZ",56,"Z",90,"VK_Z","",""],[0,36,"Digit1",22,"1",49,"VK_1","",""],[0,37,"Digit2",23,"2",50,"VK_2","",""],[0,38,"Digit3",24,"3",51,"VK_3","",""],[0,39,"Digit4",25,"4",52,"VK_4","",""],[0,40,"Digit5",26,"5",53,"VK_5","",""],[0,41,"Digit6",27,"6",54,"VK_6","",""],[0,42,"Digit7",28,"7",55,"VK_7","",""],[0,43,"Digit8",29,"8",56,"VK_8","",""],[0,44,"Digit9",30,"9",57,"VK_9","",""],[0,45,"Digit0",21,"0",48,"VK_0","",""],[1,46,"Enter",3,"Enter",13,"VK_RETURN","",""],[1,47,"Escape",9,"Escape",27,"VK_ESCAPE","",""],[1,48,"Backspace",1,"Backspace",8,"VK_BACK","",""],[1,49,"Tab",2,"Tab",9,"VK_TAB","",""],[1,50,"Space",10,"Space",32,"VK_SPACE","",""],[0,51,"Minus",88,"-",189,"VK_OEM_MINUS","-","OEM_MINUS"],[0,52,"Equal",86,"=",187,"VK_OEM_PLUS","=","OEM_PLUS"],[0,53,"BracketLeft",92,"[",219,"VK_OEM_4","[","OEM_4"],[0,54,"BracketRight",94,"]",221,"VK_OEM_6","]","OEM_6"],[0,55,"Backslash",93,"\\",220,"VK_OEM_5","\\","OEM_5"],[0,56,"IntlHash",0,"",0,"","",""],[0,57,"Semicolon",85,";",186,"VK_OEM_1",";","OEM_1"],[0,58,"Quote",95,"'",222,"VK_OEM_7","'","OEM_7"],[0,59,"Backquote",91,"`",192,"VK_OEM_3","`","OEM_3"],[0,60,"Comma",87,",",188,"VK_OEM_COMMA",",","OEM_COMMA"],[0,61,"Period",89,".",190,"VK_OEM_PERIOD",".","OEM_PERIOD"],[0,62,"Slash",90,"/",191,"VK_OEM_2","/","OEM_2"],[1,63,"CapsLock",8,"CapsLock",20,"VK_CAPITAL","",""],[1,64,"F1",59,"F1",112,"VK_F1","",""],[1,65,"F2",60,"F2",113,"VK_F2","",""],[1,66,"F3",61,"F3",114,"VK_F3","",""],[1,67,"F4",62,"F4",115,"VK_F4","",""],[1,68,"F5",63,"F5",116,"VK_F5","",""],[1,69,"F6",64,"F6",117,"VK_F6","",""],[1,70,"F7",65,"F7",118,"VK_F7","",""],[1,71,"F8",66,"F8",119,"VK_F8","",""],[1,72,"F9",67,"F9",120,"VK_F9","",""],[1,73,"F10",68,"F10",121,"VK_F10","",""],[1,74,"F11",69,"F11",122,"VK_F11","",""],[1,75,"F12",70,"F12",123,"VK_F12","",""],[1,76,"PrintScreen",0,"",0,"","",""],[1,77,"ScrollLock",84,"ScrollLock",145,"VK_SCROLL","",""],[1,78,"Pause",7,"PauseBreak",19,"VK_PAUSE","",""],[1,79,"Insert",19,"Insert",45,"VK_INSERT","",""],[1,80,"Home",14,"Home",36,"VK_HOME","",""],[1,81,"PageUp",11,"PageUp",33,"VK_PRIOR","",""],[1,82,"Delete",20,"Delete",46,"VK_DELETE","",""],[1,83,"End",13,"End",35,"VK_END","",""],[1,84,"PageDown",12,"PageDown",34,"VK_NEXT","",""],[1,85,"ArrowRight",17,"RightArrow",39,"VK_RIGHT","Right",""],[1,86,"ArrowLeft",15,"LeftArrow",37,"VK_LEFT","Left",""],[1,87,"ArrowDown",18,"DownArrow",40,"VK_DOWN","Down",""],[1,88,"ArrowUp",16,"UpArrow",38,"VK_UP","Up",""],[1,89,"NumLock",83,"NumLock",144,"VK_NUMLOCK","",""],[1,90,"NumpadDivide",113,"NumPad_Divide",111,"VK_DIVIDE","",""],[1,91,"NumpadMultiply",108,"NumPad_Multiply",106,"VK_MULTIPLY","",""],[1,92,"NumpadSubtract",111,"NumPad_Subtract",109,"VK_SUBTRACT","",""],[1,93,"NumpadAdd",109,"NumPad_Add",107,"VK_ADD","",""],[1,94,"NumpadEnter",3,"",0,"","",""],[1,95,"Numpad1",99,"NumPad1",97,"VK_NUMPAD1","",""],[1,96,"Numpad2",100,"NumPad2",98,"VK_NUMPAD2","",""],[1,97,"Numpad3",101,"NumPad3",99,"VK_NUMPAD3","",""],[1,98,"Numpad4",102,"NumPad4",100,"VK_NUMPAD4","",""],[1,99,"Numpad5",103,"NumPad5",101,"VK_NUMPAD5","",""],[1,100,"Numpad6",104,"NumPad6",102,"VK_NUMPAD6","",""],[1,101,"Numpad7",105,"NumPad7",103,"VK_NUMPAD7","",""],[1,102,"Numpad8",106,"NumPad8",104,"VK_NUMPAD8","",""],[1,103,"Numpad9",107,"NumPad9",105,"VK_NUMPAD9","",""],[1,104,"Numpad0",98,"NumPad0",96,"VK_NUMPAD0","",""],[1,105,"NumpadDecimal",112,"NumPad_Decimal",110,"VK_DECIMAL","",""],[0,106,"IntlBackslash",97,"OEM_102",226,"VK_OEM_102","",""],[1,107,"ContextMenu",58,"ContextMenu",93,"","",""],[1,108,"Power",0,"",0,"","",""],[1,109,"NumpadEqual",0,"",0,"","",""],[1,110,"F13",71,"F13",124,"VK_F13","",""],[1,111,"F14",72,"F14",125,"VK_F14","",""],[1,112,"F15",73,"F15",126,"VK_F15","",""],[1,113,"F16",74,"F16",127,"VK_F16","",""],[1,114,"F17",75,"F17",128,"VK_F17","",""],[1,115,"F18",76,"F18",129,"VK_F18","",""],[1,116,"F19",77,"F19",130,"VK_F19","",""],[1,117,"F20",78,"F20",131,"VK_F20","",""],[1,118,"F21",79,"F21",132,"VK_F21","",""],[1,119,"F22",80,"F22",133,"VK_F22","",""],[1,120,"F23",81,"F23",134,"VK_F23","",""],[1,121,"F24",82,"F24",135,"VK_F24","",""],[1,122,"Open",0,"",0,"","",""],[1,123,"Help",0,"",0,"","",""],[1,124,"Select",0,"",0,"","",""],[1,125,"Again",0,"",0,"","",""],[1,126,"Undo",0,"",0,"","",""],[1,127,"Cut",0,"",0,"","",""],[1,128,"Copy",0,"",0,"","",""],[1,129,"Paste",0,"",0,"","",""],[1,130,"Find",0,"",0,"","",""],[1,131,"AudioVolumeMute",117,"AudioVolumeMute",173,"VK_VOLUME_MUTE","",""],[1,132,"AudioVolumeUp",118,"AudioVolumeUp",175,"VK_VOLUME_UP","",""],[1,133,"AudioVolumeDown",119,"AudioVolumeDown",174,"VK_VOLUME_DOWN","",""],[1,134,"NumpadComma",110,"NumPad_Separator",108,"VK_SEPARATOR","",""],[0,135,"IntlRo",115,"ABNT_C1",193,"VK_ABNT_C1","",""],[1,136,"KanaMode",0,"",0,"","",""],[0,137,"IntlYen",0,"",0,"","",""],[1,138,"Convert",0,"",0,"","",""],[1,139,"NonConvert",0,"",0,"","",""],[1,140,"Lang1",0,"",0,"","",""],[1,141,"Lang2",0,"",0,"","",""],[1,142,"Lang3",0,"",0,"","",""],[1,143,"Lang4",0,"",0,"","",""],[1,144,"Lang5",0,"",0,"","",""],[1,145,"Abort",0,"",0,"","",""],[1,146,"Props",0,"",0,"","",""],[1,147,"NumpadParenLeft",0,"",0,"","",""],[1,148,"NumpadParenRight",0,"",0,"","",""],[1,149,"NumpadBackspace",0,"",0,"","",""],[1,150,"NumpadMemoryStore",0,"",0,"","",""],[1,151,"NumpadMemoryRecall",0,"",0,"","",""],[1,152,"NumpadMemoryClear",0,"",0,"","",""],[1,153,"NumpadMemoryAdd",0,"",0,"","",""],[1,154,"NumpadMemorySubtract",0,"",0,"","",""],[1,155,"NumpadClear",131,"Clear",12,"VK_CLEAR","",""],[1,156,"NumpadClearEntry",0,"",0,"","",""],[1,0,"",5,"Ctrl",17,"VK_CONTROL","",""],[1,0,"",4,"Shift",16,"VK_SHIFT","",""],[1,0,"",6,"Alt",18,"VK_MENU","",""],[1,0,"",57,"Meta",91,"VK_COMMAND","",""],[1,157,"ControlLeft",5,"",0,"VK_LCONTROL","",""],[1,158,"ShiftLeft",4,"",0,"VK_LSHIFT","",""],[1,159,"AltLeft",6,"",0,"VK_LMENU","",""],[1,160,"MetaLeft",57,"",0,"VK_LWIN","",""],[1,161,"ControlRight",5,"",0,"VK_RCONTROL","",""],[1,162,"ShiftRight",4,"",0,"VK_RSHIFT","",""],[1,163,"AltRight",6,"",0,"VK_RMENU","",""],[1,164,"MetaRight",57,"",0,"VK_RWIN","",""],[1,165,"BrightnessUp",0,"",0,"","",""],[1,166,"BrightnessDown",0,"",0,"","",""],[1,167,"MediaPlay",0,"",0,"","",""],[1,168,"MediaRecord",0,"",0,"","",""],[1,169,"MediaFastForward",0,"",0,"","",""],[1,170,"MediaRewind",0,"",0,"","",""],[1,171,"MediaTrackNext",124,"MediaTrackNext",176,"VK_MEDIA_NEXT_TRACK","",""],[1,172,"MediaTrackPrevious",125,"MediaTrackPrevious",177,"VK_MEDIA_PREV_TRACK","",""],[1,173,"MediaStop",126,"MediaStop",178,"VK_MEDIA_STOP","",""],[1,174,"Eject",0,"",0,"","",""],[1,175,"MediaPlayPause",127,"MediaPlayPause",179,"VK_MEDIA_PLAY_PAUSE","",""],[1,176,"MediaSelect",128,"LaunchMediaPlayer",181,"VK_MEDIA_LAUNCH_MEDIA_SELECT","",""],[1,177,"LaunchMail",129,"LaunchMail",180,"VK_MEDIA_LAUNCH_MAIL","",""],[1,178,"LaunchApp2",130,"LaunchApp2",183,"VK_MEDIA_LAUNCH_APP2","",""],[1,179,"LaunchApp1",0,"",0,"VK_MEDIA_LAUNCH_APP1","",""],[1,180,"SelectTask",0,"",0,"","",""],[1,181,"LaunchScreenSaver",0,"",0,"","",""],[1,182,"BrowserSearch",120,"BrowserSearch",170,"VK_BROWSER_SEARCH","",""],[1,183,"BrowserHome",121,"BrowserHome",172,"VK_BROWSER_HOME","",""],[1,184,"BrowserBack",122,"BrowserBack",166,"VK_BROWSER_BACK","",""],[1,185,"BrowserForward",123,"BrowserForward",167,"VK_BROWSER_FORWARD","",""],[1,186,"BrowserStop",0,"",0,"VK_BROWSER_STOP","",""],[1,187,"BrowserRefresh",0,"",0,"VK_BROWSER_REFRESH","",""],[1,188,"BrowserFavorites",0,"",0,"VK_BROWSER_FAVORITES","",""],[1,189,"ZoomToggle",0,"",0,"","",""],[1,190,"MailReply",0,"",0,"","",""],[1,191,"MailForward",0,"",0,"","",""],[1,192,"MailSend",0,"",0,"","",""],[1,0,"",114,"KeyInComposition",229,"","",""],[1,0,"",116,"ABNT_C2",194,"VK_ABNT_C2","",""],[1,0,"",96,"OEM_8",223,"VK_OEM_8","",""],[1,0,"",0,"",0,"VK_KANA","",""],[1,0,"",0,"",0,"VK_HANGUL","",""],[1,0,"",0,"",0,"VK_JUNJA","",""],[1,0,"",0,"",0,"VK_FINAL","",""],[1,0,"",0,"",0,"VK_HANJA","",""],[1,0,"",0,"",0,"VK_KANJI","",""],[1,0,"",0,"",0,"VK_CONVERT","",""],[1,0,"",0,"",0,"VK_NONCONVERT","",""],[1,0,"",0,"",0,"VK_ACCEPT","",""],[1,0,"",0,"",0,"VK_MODECHANGE","",""],[1,0,"",0,"",0,"VK_SELECT","",""],[1,0,"",0,"",0,"VK_PRINT","",""],[1,0,"",0,"",0,"VK_EXECUTE","",""],[1,0,"",0,"",0,"VK_SNAPSHOT","",""],[1,0,"",0,"",0,"VK_HELP","",""],[1,0,"",0,"",0,"VK_APPS","",""],[1,0,"",0,"",0,"VK_PROCESSKEY","",""],[1,0,"",0,"",0,"VK_PACKET","",""],[1,0,"",0,"",0,"VK_DBE_SBCSCHAR","",""],[1,0,"",0,"",0,"VK_DBE_DBCSCHAR","",""],[1,0,"",0,"",0,"VK_ATTN","",""],[1,0,"",0,"",0,"VK_CRSEL","",""],[1,0,"",0,"",0,"VK_EXSEL","",""],[1,0,"",0,"",0,"VK_EREOF","",""],[1,0,"",0,"",0,"VK_PLAY","",""],[1,0,"",0,"",0,"VK_ZOOM","",""],[1,0,"",0,"",0,"VK_NONAME","",""],[1,0,"",0,"",0,"VK_PA1","",""],[1,0,"",0,"",0,"VK_OEM_CLEAR","",""]]){let[n,s,m,f,_,v,b,C,w]=i;if(!t[s]&&(t[s]=!0,d[s]=m,c[m]=s,u[m.toLowerCase()]=s,n&&(g[s]=f,0!==f&&3!==f&&5!==f&&4!==f&&6!==f&&57!==f&&(p[f]=s))),!e[f]){if(e[f]=!0,!_)throw Error(`String representation missing for key code ${f} around scan code ${m}`);o.define(f,_),r.define(f,C||_),a.define(f,w||C||_)}v&&(l[v]=f),b&&(h[b]=f)}p[3]=46}(),function(e){e.toString=function(e){return o.keyCodeToStr(e)},e.fromString=function(e){return o.strToKeyCode(e)},e.toUserSettingsUS=function(e){return r.keyCodeToStr(e)},e.toUserSettingsGeneral=function(e){return a.keyCodeToStr(e)},e.fromUserSettings=function(e){return r.strToKeyCode(e)||a.strToKeyCode(e)},e.toElectronAccelerator=function(e){if(e>=98&&e<=113)return null;switch(e){case 16:return"Up";case 18:return"Down";case 15:return"Left";case 17:return"Right"}return o.keyCodeToStr(e)}}(n||(n={}))},70612:(e,t,i)=>{"use strict";i.d(t,{c:()=>r});var n=i(28047),s=i(23047),o=i(70518);class r{static _handleEolEdits(e,t){let i,n=[];for(let e of t)"number"==typeof e.eol&&(i=e.eol),e.range&&"string"==typeof e.text&&n.push(e);return"number"==typeof i&&e.hasModel()&&e.getModel().pushEOL(i),n}static _isFullModelReplaceEdit(e,t){if(!e.hasModel())return!1;let i=e.getModel(),n=i.validateRange(t.range);return i.getFullModelRange().equalsRange(n)}static execute(e,t,i){i&&e.pushUndoStop();let a=o.D.capture(e),l=r._handleEolEdits(e,t);1===l.length&&r._isFullModelReplaceEdit(e,l[0])?e.executeEdits("formatEditsCommand",l.map(e=>n.k.replace(s.Q.lift(e.range),e.text))):e.executeEdits("formatEditsCommand",l.map(e=>n.k.replaceMove(s.Q.lift(e.range),e.text))),i&&e.pushUndoStop(),a.restoreRelativeVerticalPositionOfCursor(e)}}},70986:(e,t,i)=>{"use strict";i.d(t,{g:()=>d});var n=i(55532),s=i(71036),o=i(6849),r=i(17379),a=i(29740),l=i(23047),h=i(72553);class d{static deleteRight(e,t,i,n){let o=[],r=3!==e;for(let e=0,a=n.length;e<a;e++){let a=n[e],l=this.getDeleteRightRange(a,i,t);if(l.isEmpty()){o[e]=null;continue}l.startLineNumber!==l.endLineNumber&&(r=!0),o[e]=new s.iu(l,"")}return[r,o]}static getDeleteRightRange(e,t,i){if(!e.isEmpty())return e;let n=e.getPosition(),s=a.I.right(i,t,n);if(i.trimWhitespaceOnDelete&&s.lineNumber!==n.lineNumber){let e=t.getLineFirstNonWhitespaceColumn(n.lineNumber)>0,i=t.getLineFirstNonWhitespaceColumn(s.lineNumber);if(e&&i>0)return new l.Q(s.lineNumber,i,n.lineNumber,n.column)}return new l.Q(s.lineNumber,s.column,n.lineNumber,n.column)}static isAutoClosingPairDelete(e,t,i,n,s,r,a){if("never"===t&&"never"===i||"never"===e)return!1;for(let l=0,h=r.length;l<h;l++){let h=r[l],d=h.getPosition();if(!h.isEmpty())return!1;let c=s.getLineContent(d.lineNumber);if(d.column<2||d.column>=c.length+1)return!1;let u=c.charAt(d.column-2),g=n.get(u);if(!g)return!1;if((0,o.vG)(u)){if("never"===i)return!1}else if("never"===t)return!1;let p=c.charAt(d.column-1),m=!1;for(let e of g)e.open===u&&e.close===p&&(m=!0);if(!m)return!1;if("auto"===e){let e=!1;for(let t=0,i=a.length;t<i;t++){let i=a[t];if(d.lineNumber===i.startLineNumber&&d.column===i.startColumn){e=!0;break}}if(!e)return!1}}return!0}static _runAutoClosingPairDelete(e,t,i){let n=[];for(let e=0,t=i.length;e<t;e++){let t=i[e].getPosition(),o=new l.Q(t.lineNumber,t.column-1,t.lineNumber,t.column+1);n[e]=new s.iu(o,"")}return[!0,n]}static deleteLeft(e,t,i,n,o){if(this.isAutoClosingPairDelete(t.autoClosingDelete,t.autoClosingBrackets,t.autoClosingQuotes,t.autoClosingPairs.autoClosingPairsOpenByEnd,i,n,o))return this._runAutoClosingPairDelete(t,i,n);let r=[],a=2!==e;for(let e=0,o=n.length;e<o;e++){let o=d.getDeleteLeftRange(n[e],i,t);if(o.isEmpty()){r[e]=null;continue}o.startLineNumber!==o.endLineNumber&&(a=!0),r[e]=new s.iu(o,"")}return[a,r]}static getDeleteLeftRange(e,t,i){if(!e.isEmpty())return e;let s=e.getPosition();if(i.useTabStops&&s.column>1){let e=t.getLineContent(s.lineNumber),o=n.HG(e),a=-1===o?e.length+1:o+1;if(s.column<=a){let e=i.visibleColumnFromColumn(t,s),n=r.A.prevIndentTabStop(e,i.indentSize),o=i.columnFromVisibleColumn(t,s.lineNumber,n);return new l.Q(s.lineNumber,o,s.lineNumber,s.column)}}return l.Q.fromPositions(d.getPositionAfterDeleteLeft(s,t),s)}static getPositionAfterDeleteLeft(e,t){if(e.column>1){let i=n.Wd(e.column-1,t.getLineContent(e.lineNumber));return e.with(void 0,i+1)}if(!(e.lineNumber>1))return e;{let i=e.lineNumber-1;return new h.y(i,t.getLineMaxColumn(i))}}static cut(e,t,i){let n=[],r=null;i.sort((e,t)=>h.y.compare(e.getStartPosition(),t.getEndPosition()));for(let o=0,a=i.length;o<a;o++){let a=i[o];if(a.isEmpty())if(e.emptySelectionClipboard){let e,i,h,d,c=a.getPosition();c.lineNumber<t.getLineCount()?(e=c.lineNumber,i=1,h=c.lineNumber+1,d=1):(c.lineNumber>1&&r?.endLineNumber!==c.lineNumber?(e=c.lineNumber-1,i=t.getLineMaxColumn(c.lineNumber-1)):(e=c.lineNumber,i=1),h=c.lineNumber,d=t.getLineMaxColumn(c.lineNumber));let u=new l.Q(e,i,h,d);r=u,u.isEmpty()?n[o]=null:n[o]=new s.iu(u,"")}else n[o]=null;else n[o]=new s.iu(a,"")}return new o.vY(0,n,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})}}},71036:(e,t,i)=>{"use strict";i.d(t,{AS:()=>a,gr:()=>c,iP:()=>d,iu:()=>r,q2:()=>h,tA:()=>l,ui:()=>u});var n=i(72553),s=i(23047),o=i(82600);class r{constructor(e,t,i=!1){this._range=e,this._text=t,this.insertsAutoWhitespace=i}getEditOperations(e,t){t.addTrackedEditOperation(this._range,this._text)}computeCursorState(e,t){let i=t.getInverseEditOperations()[0].range;return o.L.fromPositions(i.getEndPosition())}}class a{constructor(e,t,i=!1){this._range=e,this._text=t,this.insertsAutoWhitespace=i}getEditOperations(e,t){let i=this._range.getStartPosition(),o=this._range.getEndPosition(),r=o.lineNumber,a=g(e,o,this._text.length+(this._range.isEmpty()?0:-1));a.lineNumber>r&&(a=new n.y(r,e.getLineMaxColumn(r)));let l=s.Q.fromPositions(i,a);t.addTrackedEditOperation(l,this._text)}computeCursorState(e,t){let i=t.getInverseEditOperations()[0].range;return o.L.fromPositions(i.getEndPosition())}}class l{constructor(e,t){this._range=e,this._text=t}getEditOperations(e,t){t.addTrackedEditOperation(this._range,this._text)}computeCursorState(e,t){let i=t.getInverseEditOperations()[0].range;return o.L.fromRange(i,0)}}class h{constructor(e,t,i=!1){this._range=e,this._text=t,this.insertsAutoWhitespace=i}getEditOperations(e,t){t.addTrackedEditOperation(this._range,this._text)}computeCursorState(e,t){let i=t.getInverseEditOperations()[0].range;return o.L.fromPositions(i.getStartPosition())}}class d{constructor(e,t,i,n,s=!1){this._range=e,this._text=t,this._columnDeltaOffset=n,this._lineNumberDeltaOffset=i,this.insertsAutoWhitespace=s}getEditOperations(e,t){t.addTrackedEditOperation(this._range,this._text)}computeCursorState(e,t){let i=t.getInverseEditOperations()[0].range;return o.L.fromPositions(i.getEndPosition().delta(this._lineNumberDeltaOffset,this._columnDeltaOffset))}}class c{constructor(e){this._range=e}getEditOperations(e,t){let i=e.getValueInRange(this._range),o=this._range.getEndPosition(),r=o.lineNumber,a=g(e,o,i.length);a.lineNumber>r&&(a=new n.y(r,e.getLineMaxColumn(r)));let l=s.Q.fromPositions(o,a);t.addTrackedEditOperation(l,"")}computeCursorState(e,t){let i=t.getInverseEditOperations()[0].range;return o.L.fromPositions(i.getEndPosition())}}class u{constructor(e,t,i,n=!1){this._range=e,this._text=t,this._initialSelection=i,this._forceMoveMarkers=n,this._selectionId=null}getEditOperations(e,t){t.addTrackedEditOperation(this._range,this._text,this._forceMoveMarkers),this._selectionId=t.trackSelection(this._initialSelection)}computeCursorState(e,t){return t.getTrackedSelection(this._selectionId)}}function g(e,t,i){if(i<0)throw Error("Unexpected negative delta");let s=e.getLineCount(),o=new n.y(s,e.getLineMaxColumn(s));for(let r=t.lineNumber;r<=s;r++)if(r===t.lineNumber){let s=i-e.getLineMaxColumn(t.lineNumber)+t.column;if(s<=0){o=new n.y(t.lineNumber,t.column+i);break}i=s}else{let t=i-e.getLineMaxColumn(r);if(t<=0){o=new n.y(r,i);break}i=t}return o}},71224:(e,t,i)=>{"use strict";i.d(t,{JZ:()=>E,Cw:()=>O});var n=i(17354),s=i(82102),o=i(55532),r=i(95934),a=i(62450);class l{static{this.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED_QUOTES=";:.,=}])> \n "}static{this.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED_BRACKETS="'\"`;:.,=}])> \n "}constructor(e){if(e.autoClosingPairs?this._autoClosingPairs=e.autoClosingPairs.map(e=>new a.i3(e)):e.brackets?this._autoClosingPairs=e.brackets.map(e=>new a.i3({open:e[0],close:e[1]})):this._autoClosingPairs=[],e.__electricCharacterSupport&&e.__electricCharacterSupport.docComment){let t=e.__electricCharacterSupport.docComment;this._autoClosingPairs.push(new a.i3({open:t.open,close:t.close||""}))}this._autoCloseBeforeForQuotes="string"==typeof e.autoCloseBefore?e.autoCloseBefore:l.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED_QUOTES,this._autoCloseBeforeForBrackets="string"==typeof e.autoCloseBefore?e.autoCloseBefore:l.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED_BRACKETS,this._surroundingPairs=e.surroundingPairs||this._autoClosingPairs}getAutoClosingPairs(){return this._autoClosingPairs}getAutoCloseBeforeSet(e){return e?this._autoCloseBeforeForQuotes:this._autoCloseBeforeForBrackets}getSurroundingPairs(){return this._surroundingPairs}}var h=i(5488),d=i(74830),c=i(56460);class u{constructor(e){this._richEditBrackets=e}getElectricCharacters(){let e=[];if(this._richEditBrackets)for(let t of this._richEditBrackets.brackets)for(let i of t.close){let t=i.charAt(i.length-1);e.push(t)}return(0,h.dM)(e)}onElectricCharacter(e,t,i){if(!this._richEditBrackets||0===this._richEditBrackets.brackets.length)return null;let n=t.findTokenIndexAtOffset(i-1);if((0,d.Yo)(t.getStandardTokenType(n)))return null;let s=this._richEditBrackets.reversedRegex,o=t.getLineContent().substring(0,i-1)+e,r=c.Fu.findPrevBracketInRange(s,1,o,0,o.length);if(!r)return null;let a=o.substring(r.startColumn-1,r.endColumn-1).toLowerCase();if(this._richEditBrackets.textIsOpenBracket[a])return null;let l=t.getActualLineContentBefore(r.startColumn-1);return/^\s*$/.test(l)?{matchOpenBracket:a}:null}}function g(e){return e.global&&(e.lastIndex=0),!0}class p{constructor(e){this._indentationRules=e}shouldIncrease(e){return!!(this._indentationRules&&this._indentationRules.increaseIndentPattern&&g(this._indentationRules.increaseIndentPattern)&&this._indentationRules.increaseIndentPattern.test(e))}shouldDecrease(e){return!!(this._indentationRules&&this._indentationRules.decreaseIndentPattern&&g(this._indentationRules.decreaseIndentPattern)&&this._indentationRules.decreaseIndentPattern.test(e))}shouldIndentNextLine(e){return!!(this._indentationRules&&this._indentationRules.indentNextLinePattern&&g(this._indentationRules.indentNextLinePattern)&&this._indentationRules.indentNextLinePattern.test(e))}shouldIgnore(e){return!!(this._indentationRules&&this._indentationRules.unIndentedLinePattern&&g(this._indentationRules.unIndentedLinePattern)&&this._indentationRules.unIndentedLinePattern.test(e))}getIndentMetadata(e){let t=0;return this.shouldIncrease(e)&&(t+=1),this.shouldDecrease(e)&&(t+=2),this.shouldIndentNextLine(e)&&(t+=4),this.shouldIgnore(e)&&(t+=8),t}}var m=i(6033);class f{constructor(e){(e=e||{}).brackets=e.brackets||[["(",")"],["{","}"],["[","]"]],this._brackets=[],e.brackets.forEach(e=>{let t=f._createOpenBracketRegExp(e[0]),i=f._createCloseBracketRegExp(e[1]);t&&i&&this._brackets.push({open:e[0],openRegExp:t,close:e[1],closeRegExp:i})}),this._regExpRules=e.onEnterRules||[]}onEnter(e,t,i,n){if(e>=3)for(let e=0,s=this._regExpRules.length;e<s;e++){let s=this._regExpRules[e];if([{reg:s.beforeText,text:i},{reg:s.afterText,text:n},{reg:s.previousLineText,text:t}].every(e=>!e.reg||(e.reg.lastIndex=0,e.reg.test(e.text))))return s.action}if(e>=2&&i.length>0&&n.length>0)for(let e=0,t=this._brackets.length;e<t;e++){let t=this._brackets[e];if(t.openRegExp.test(i)&&t.closeRegExp.test(n))return{indentAction:a.l.IndentOutdent}}if(e>=2&&i.length>0){for(let e=0,t=this._brackets.length;e<t;e++)if(this._brackets[e].openRegExp.test(i))return{indentAction:a.l.Indent}}return null}static _createOpenBracketRegExp(e){let t=o.bm(e);return/\B/.test(t.charAt(0))||(t="\\b"+t),t+="\\s*$",f._safeRegExp(t)}static _createCloseBracketRegExp(e){let t=o.bm(e);return/\B/.test(t.charAt(t.length-1))||(t+="\\b"),t="^\\s*"+t,f._safeRegExp(t)}static _safeRegExp(e){try{return new RegExp(e)}catch(e){return(0,m.dz)(e),null}}}var _=i(22263),v=i(64369),b=i(24224),C=i(27140),w=i(5081),y=i(19072);class S{constructor(e,t){this.languageId=e;let i=t.brackets?k(t.brackets):[],n=new y.VV(e=>{let t=new Set;return{info:new L(this,e,t),closing:t}}),s=new y.VV(e=>{let t=new Set,i=new Set;return{info:new D(this,e,t,i),opening:t,openingColorized:i}});for(let[e,t]of i){let i=n.get(e),o=s.get(t);i.closing.add(o.info),o.opening.add(i.info)}for(let[e,o]of t.colorizedBracketPairs?k(t.colorizedBracketPairs):i.filter(e=>"<"!==e[0]||">"!==e[1])){let t=n.get(e),i=s.get(o);t.closing.add(i.info),i.openingColorized.add(t.info),i.opening.add(t.info)}this._openingBrackets=new Map([...n.cachedValues].map(([e,t])=>[e,t.info])),this._closingBrackets=new Map([...s.cachedValues].map(([e,t])=>[e,t.info]))}get openingBrackets(){return[...this._openingBrackets.values()]}get closingBrackets(){return[...this._closingBrackets.values()]}getOpeningBracketInfo(e){return this._openingBrackets.get(e)}getClosingBracketInfo(e){return this._closingBrackets.get(e)}getBracketInfo(e){return this.getOpeningBracketInfo(e)||this.getClosingBracketInfo(e)}getBracketRegExp(e){let t=Array.from([...this._openingBrackets.keys(),...this._closingBrackets.keys()]);return(0,c.xb)(t,e)}}function k(e){return e.filter(([e,t])=>""!==e&&""!==t)}class x{constructor(e,t){this.config=e,this.bracketText=t}get languageId(){return this.config.languageId}}class L extends x{constructor(e,t,i){super(e,t),this.openedBrackets=i,this.isOpeningBracket=!0}}class D extends x{constructor(e,t,i,n){super(e,t),this.openingBrackets=i,this.openingColorizedBrackets=n,this.isOpeningBracket=!1}closes(e){return e.config===this.config&&this.openingBrackets.has(e)}closesColorized(e){return e.config===this.config&&this.openingColorizedBrackets.has(e)}getOpeningBrackets(){return[...this.openingBrackets]}}var I=function(e,t){return function(i,n){t(i,n,e)}};class N{constructor(e){this.languageId=e}affects(e){return!this.languageId||this.languageId===e}}let E=(0,_.u1)("languageConfigurationService"),M=class extends s.jG{constructor(e,t){super(),this.configurationService=e,this.languageService=t,this._registry=this._register(new W),this.onDidChangeEmitter=this._register(new n.vl),this.onDidChange=this.onDidChangeEmitter.event,this.configurations=new Map;let i=new Set(Object.values(T));this._register(this.configurationService.onDidChangeConfiguration(e=>{let t=e.change.keys.some(e=>i.has(e)),n=e.change.overrides.filter(([e,t])=>t.some(e=>i.has(e))).map(([e])=>e);if(t)this.configurations.clear(),this.onDidChangeEmitter.fire(new N(void 0));else for(let e of n)this.languageService.isRegisteredLanguageId(e)&&(this.configurations.delete(e),this.onDidChangeEmitter.fire(new N(e)))})),this._register(this._registry.onDidChange(e=>{this.configurations.delete(e.languageId),this.onDidChangeEmitter.fire(new N(e.languageId))}))}register(e,t,i){return this._registry.register(e,t,i)}getLanguageConfiguration(e){let t=this.configurations.get(e);return t||(t=function(e,t,i,n){let s=t.getLanguageConfiguration(e);if(!s){if(!n.isRegisteredLanguageId(e))return new H(e,{});s=new H(e,{})}let o=function(e,t){let i=t.getValue(T.brackets,{overrideIdentifier:e}),n=t.getValue(T.colorizedBracketPairs,{overrideIdentifier:e});return{brackets:R(i),colorizedBracketPairs:R(n)}}(s.languageId,i),r=A([s.underlyingConfig,o]);return new H(s.languageId,r)}(e,this._registry,this.configurationService,this.languageService),this.configurations.set(e,t)),t}};M=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([I(0,v.pG),I(1,b.L)],M);let T={brackets:"editor.language.brackets",colorizedBracketPairs:"editor.language.colorizedBracketPairs"};function R(e){if(Array.isArray(e))return e.map(e=>{if(Array.isArray(e)&&2===e.length)return[e[0],e[1]]}).filter(e=>!!e)}function O(e,t,i){let n=e.getLineContent(t),s=o.UU(n);return s.length>i-1&&(s=s.substring(0,i-1)),s}class P{constructor(e){this.languageId=e,this._resolved=null,this._entries=[],this._order=0,this._resolved=null}register(e,t){let i=new F(e,t,++this._order);return this._entries.push(i),this._resolved=null,(0,s.lC)((0,s.s)(()=>{for(let e=0;e<this._entries.length;e++)if(this._entries[e]===i){this._entries.splice(e,1),this._resolved=null;break}}))}getResolvedConfiguration(){if(!this._resolved){let e=this._resolve();e&&(this._resolved=new H(this.languageId,e))}return this._resolved}_resolve(){return 0===this._entries.length?null:(this._entries.sort(F.cmp),A(this._entries.map(e=>e.configuration)))}}function A(e){let t={comments:void 0,brackets:void 0,wordPattern:void 0,indentationRules:void 0,onEnterRules:void 0,autoClosingPairs:void 0,surroundingPairs:void 0,autoCloseBefore:void 0,folding:void 0,colorizedBracketPairs:void 0,__electricCharacterSupport:void 0};for(let i of e)t={comments:i.comments||t.comments,brackets:i.brackets||t.brackets,wordPattern:i.wordPattern||t.wordPattern,indentationRules:i.indentationRules||t.indentationRules,onEnterRules:i.onEnterRules||t.onEnterRules,autoClosingPairs:i.autoClosingPairs||t.autoClosingPairs,surroundingPairs:i.surroundingPairs||t.surroundingPairs,autoCloseBefore:i.autoCloseBefore||t.autoCloseBefore,folding:i.folding||t.folding,colorizedBracketPairs:i.colorizedBracketPairs||t.colorizedBracketPairs,__electricCharacterSupport:i.__electricCharacterSupport||t.__electricCharacterSupport};return t}class F{constructor(e,t,i){this.configuration=e,this.priority=t,this.order=i}static cmp(e,t){return e.priority===t.priority?e.order-t.order:e.priority-t.priority}}class B{constructor(e){this.languageId=e}}class W extends s.jG{constructor(){super(),this._entries=new Map,this._onDidChange=this._register(new n.vl),this.onDidChange=this._onDidChange.event,this._register(this.register(w.vH,{brackets:[["(",")"],["[","]"],["{","}"]],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"`",close:"`"}],colorizedBracketPairs:[],folding:{offSide:!0}},0))}register(e,t,i=0){let n=this._entries.get(e);n||(n=new P(e),this._entries.set(e,n));let o=n.register(t,i);return this._onDidChange.fire(new B(e)),(0,s.lC)((0,s.s)(()=>{o.dispose(),this._onDidChange.fire(new B(e))}))}getLanguageConfiguration(e){let t=this._entries.get(e);return t?.getResolvedConfiguration()||null}}class H{constructor(e,t){this.languageId=e,this.underlyingConfig=t,this._brackets=null,this._electricCharacter=null,this._onEnterSupport=this.underlyingConfig.brackets||this.underlyingConfig.indentationRules||this.underlyingConfig.onEnterRules?new f(this.underlyingConfig):null,this.comments=H._handleComments(this.underlyingConfig),this.characterPair=new l(this.underlyingConfig),this.wordDefinition=this.underlyingConfig.wordPattern||r.Ld,this.indentationRules=this.underlyingConfig.indentationRules,this.underlyingConfig.indentationRules?this.indentRulesSupport=new p(this.underlyingConfig.indentationRules):this.indentRulesSupport=null,this.foldingRules=this.underlyingConfig.folding||{},this.bracketsNew=new S(e,this.underlyingConfig)}getWordDefinition(){return(0,r.Io)(this.wordDefinition)}get brackets(){return!this._brackets&&this.underlyingConfig.brackets&&(this._brackets=new c.az(this.languageId,this.underlyingConfig.brackets)),this._brackets}get electricCharacter(){return this._electricCharacter||(this._electricCharacter=new u(this.brackets)),this._electricCharacter}onEnter(e,t,i,n){return this._onEnterSupport?this._onEnterSupport.onEnter(e,t,i,n):null}getAutoClosingPairs(){return new a.GB(this.characterPair.getAutoClosingPairs())}getAutoCloseBeforeSet(e){return this.characterPair.getAutoCloseBeforeSet(e)}getSurroundingPairs(){return this.characterPair.getSurroundingPairs()}static _handleComments(e){let t=e.comments;if(!t)return null;let i={};if(t.lineComment&&("string"==typeof t.lineComment?i.lineCommentToken=t.lineComment:(i.lineCommentToken=t.lineComment.comment,i.lineCommentNoIndent=t.lineComment.noIndent)),t.blockComment){let[e,n]=t.blockComment;i.blockCommentStartToken=e,i.blockCommentEndToken=n}return i}}(0,C.v)(E,M,1)},71313:(e,t,i)=>{"use strict";i.d(t,{_:()=>s});var n=i(82102);class s extends n.jG{constructor(){super(...arguments),this._isDisposed=!1}dispose(){super.dispose(),this._isDisposed=!0}assertNotDisposed(){if(this._isDisposed)throw Error("TextModelPart is disposed!")}}},71544:(e,t,i)=>{"use strict";i.d(t,{Ft:()=>l,V7:()=>a,Xo:()=>h,ok:()=>s,vA:()=>r,xb:()=>o});var n=i(6033);function s(e,t){if(!e)throw Error(t?`Assertion failed (${t})`:"Assertion Failed")}function o(e,t="Unreachable"){throw Error(t)}function r(e,t="unexpected state"){if(!e)throw"string"==typeof t?new n.D7(`Assertion Failed: ${t}`):t}function a(e,t="Soft Assertion Failed"){e||(0,n.dz)(new n.D7(t))}function l(e){e()||(e(),(0,n.dz)(new n.D7("Assertion Failed")))}function h(e,t){let i=0;for(;i<e.length-1;){if(!t(e[i],e[i+1]))return!1;i++}return!0}},71819:(e,t,i)=>{"use strict";i.d(t,{L:()=>s,h:()=>o});var n=i(6033);class s{static fromTo(e,t){return new s(e,t)}static addRange(e,t){let i=0;for(;i<t.length&&t[i].endExclusive<e.start;)i++;let n=i;for(;n<t.length&&t[n].start<=e.endExclusive;)n++;if(i===n)t.splice(i,0,e);else{let o=Math.min(e.start,t[i].start),r=Math.max(e.endExclusive,t[n-1].endExclusive);t.splice(i,n-i,new s(o,r))}}static tryCreate(e,t){if(!(e>t))return new s(e,t)}static ofLength(e){return new s(0,e)}static ofStartAndLength(e,t){return new s(e,e+t)}static emptyAt(e){return new s(e,e)}constructor(e,t){if(this.start=e,this.endExclusive=t,e>t)throw new n.D7(`Invalid range: ${this.toString()}`)}get isEmpty(){return this.start===this.endExclusive}delta(e){return new s(this.start+e,this.endExclusive+e)}deltaStart(e){return new s(this.start+e,this.endExclusive)}deltaEnd(e){return new s(this.start,this.endExclusive+e)}get length(){return this.endExclusive-this.start}toString(){return`[${this.start}, ${this.endExclusive})`}equals(e){return this.start===e.start&&this.endExclusive===e.endExclusive}contains(e){return this.start<=e&&e<this.endExclusive}join(e){return new s(Math.min(this.start,e.start),Math.max(this.endExclusive,e.endExclusive))}intersect(e){let t=Math.max(this.start,e.start),i=Math.min(this.endExclusive,e.endExclusive);if(t<=i)return new s(t,i)}intersectionLength(e){let t=Math.max(this.start,e.start);return Math.max(0,Math.min(this.endExclusive,e.endExclusive)-t)}intersects(e){return Math.max(this.start,e.start)<Math.min(this.endExclusive,e.endExclusive)}intersectsOrTouches(e){return Math.max(this.start,e.start)<=Math.min(this.endExclusive,e.endExclusive)}isBefore(e){return this.endExclusive<=e.start}isAfter(e){return this.start>=e.endExclusive}slice(e){return e.slice(this.start,this.endExclusive)}substring(e){return e.substring(this.start,this.endExclusive)}clip(e){if(this.isEmpty)throw new n.D7(`Invalid clipping range: ${this.toString()}`);return Math.max(this.start,Math.min(this.endExclusive-1,e))}clipCyclic(e){if(this.isEmpty)throw new n.D7(`Invalid clipping range: ${this.toString()}`);return e<this.start?this.endExclusive-(this.start-e)%this.length:e>=this.endExclusive?this.start+(e-this.start)%this.length:e}forEach(e){for(let t=this.start;t<this.endExclusive;t++)e(t)}joinRightTouching(e){if(this.endExclusive!==e.start)throw new n.D7(`Invalid join: ${this.toString()} and ${e.toString()}`);return new s(this.start,e.endExclusive)}}class o{constructor(){this._sortedRanges=[]}addRange(e){let t=0;for(;t<this._sortedRanges.length&&this._sortedRanges[t].endExclusive<e.start;)t++;let i=t;for(;i<this._sortedRanges.length&&this._sortedRanges[i].start<=e.endExclusive;)i++;if(t===i)this._sortedRanges.splice(t,0,e);else{let n=Math.min(e.start,this._sortedRanges[t].start),o=Math.max(e.endExclusive,this._sortedRanges[i-1].endExclusive);this._sortedRanges.splice(t,i-t,new s(n,o))}}toString(){return this._sortedRanges.map(e=>e.toString()).join(", ")}intersectsStrict(e){let t=0;for(;t<this._sortedRanges.length&&this._sortedRanges[t].endExclusive<=e.start;)t++;return t<this._sortedRanges.length&&this._sortedRanges[t].start<e.endExclusive}intersectWithRange(e){let t=new o;for(let i of this._sortedRanges){let n=i.intersect(e);n&&t.addRange(n)}return t}intersectWithRangeLength(e){return this.intersectWithRange(e).length}get length(){return this._sortedRanges.reduce((e,t)=>e+t.length,0)}}},72150:(e,t,i)=>{"use strict";i.d(t,{$y:()=>p,AV:()=>C,Am:()=>c,D1:()=>v,EK:()=>k,MZ:()=>y,Mu:()=>S,Nu:()=>f,O8:()=>x,Vs:()=>w,pN:()=>m,pY:()=>u,rX:()=>g,uN:()=>_});var n=i(46843),s=i(13445),o=i(82102),r=i(76946),a=i(83699),l=i(72553),h=i(23047),d=i(62413);function c(e,t,i,n){if(0===e.length)return t;if(0===t.length)return e;let s=[],o=0,r=0;for(;o<e.length&&r<t.length;){let a=e[o],l=t[r],h=i(a),d=i(l);h<d?(s.push(a),o++):(h>d?s.push(l):(s.push(n(a,l)),o++),r++)}for(;o<e.length;)s.push(e[o]),o++;for(;r<t.length;)s.push(t[r]),r++;return s}function u(e,t){let i=new o.Cm,n=e.createDecorationsCollection();return i.add((0,r.zL)({debugName:()=>`Apply decorations from ${t.debugName}`},e=>{let i=t.read(e);n.set(i)})),i.add({dispose:()=>{n.clear()}}),i}function g(e,t){return e.appendChild(t),(0,o.s)(()=>{t.remove()})}function p(e,t){return e.prepend(t),(0,o.s)(()=>{t.remove()})}class m extends o.jG{get width(){return this._width}get height(){return this._height}get automaticLayout(){return this._automaticLayout}constructor(e,t){super(),this._automaticLayout=!1,this.elementSizeObserver=this._register(new a.u(e,t)),this._width=(0,r.FY)(this,this.elementSizeObserver.getWidth()),this._height=(0,r.FY)(this,this.elementSizeObserver.getHeight()),this._register(this.elementSizeObserver.onDidChange(e=>(0,r.Rn)(e=>{this._width.set(this.elementSizeObserver.getWidth(),e),this._height.set(this.elementSizeObserver.getHeight(),e)})))}observe(e){this.elementSizeObserver.observe(e)}setAutomaticLayout(e){this._automaticLayout=e,e?this.elementSizeObserver.startObserving():this.elementSizeObserver.stopObserving()}}function f(e,t,i){let n,s=t.get(),o=s,a=s,l=(0,r.FY)("animatedValue",s),h=-1;return i.add((0,r.Y)({changeTracker:{createChangeSummary:()=>({animate:!1}),handleChange:(e,i)=>(e.didChange(t)&&(i.animate=i.animate||e.change),!0)}},(i,r)=>{void 0!==n&&(e.cancelAnimationFrame(n),n=void 0),o=a,s=t.read(i),h=Date.now()-300*!r.animate,function t(){var i,r,d,c;let u=Date.now()-h;a=Math.floor((i=u,r=o,d=s-o,c=300,300===i?r+d:d*(-Math.pow(2,-10*i/c)+1)+r)),u<300?n=e.requestAnimationFrame(t):a=s,l.set(a,void 0)}()})),l}class _ extends o.jG{constructor(e,t,i){super(),this._register(new b(e,i)),this._register(C(i,{height:t.actualHeight,top:t.actualTop}))}}class v{get afterLineNumber(){return this._afterLineNumber.get()}constructor(e,t){this._afterLineNumber=e,this.heightInPx=t,this.domNode=document.createElement("div"),this._actualTop=(0,r.FY)(this,void 0),this._actualHeight=(0,r.FY)(this,void 0),this.actualTop=this._actualTop,this.actualHeight=this._actualHeight,this.showInHiddenAreas=!0,this.onChange=this._afterLineNumber,this.onDomNodeTop=e=>{this._actualTop.set(e,void 0)},this.onComputedHeight=e=>{this._actualHeight.set(e,void 0)}}}class b{static{this._counter=0}constructor(e,t){this._editor=e,this._domElement=t,this._overlayWidgetId=`managedOverlayWidget-${b._counter++}`,this._overlayWidget={getId:()=>this._overlayWidgetId,getDomNode:()=>this._domElement,getPosition:()=>null},this._editor.addOverlayWidget(this._overlayWidget)}dispose(){this._editor.removeOverlayWidget(this._overlayWidget)}}function C(e,t){return(0,r.fm)(i=>{for(let[n,s]of Object.entries(t))s&&"object"==typeof s&&"read"in s&&(s=s.read(i)),"number"==typeof s&&(s=`${s}px`),n=n.replace(/[A-Z]/g,e=>"-"+e.toLowerCase()),e.style[n]=s})}function w(e,t,i,n){let s=new o.Cm,a=[];return s.add((0,r.yC)((s,o)=>{let l=t.read(s),h=new Map,d=new Map;i&&i(!0),e.changeViewZones(e=>{for(let t of a)e.removeZone(t),n?.delete(t);for(let t of(a.length=0,l)){let i=e.addZone(t);t.setZoneId&&t.setZoneId(i),a.push(i),n?.add(i),h.set(t,i)}}),i&&i(!1),o.add((0,r.Y)({changeTracker:{createChangeSummary:()=>({zoneIds:[]}),handleChange(e,t){let i=d.get(e.changedObservable);return void 0!==i&&t.zoneIds.push(i),!0}}},(t,n)=>{for(let e of l)e.onChange&&(d.set(e.onChange,h.get(e)),e.onChange.read(t));i&&i(!0),e.changeViewZones(e=>{for(let t of n.zoneIds)e.layoutZone(t)}),i&&i(!1)}))})),s.add({dispose(){i&&i(!0),e.changeViewZones(e=>{for(let t of a)e.removeZone(t)}),n?.clear(),i&&i(!1)}}),s}class y extends s.Qi{dispose(){super.dispose(!0)}}function S(e,t){let i=(0,n.Uk)(t,t=>t.original.startLineNumber<=e.lineNumber);if(!i)return h.Q.fromPositions(e);if(i.original.endLineNumberExclusive<=e.lineNumber){let t=e.lineNumber-i.original.endLineNumberExclusive+i.modified.endLineNumberExclusive;return h.Q.fromPositions(new l.y(t,e.column))}if(!i.innerChanges)return h.Q.fromPositions(new l.y(i.modified.startLineNumber,1));let s=(0,n.Uk)(i.innerChanges,t=>t.originalRange.getStartPosition().isBeforeOrEqual(e));if(!s){let t=e.lineNumber-i.original.startLineNumber+i.modified.startLineNumber;return h.Q.fromPositions(new l.y(t,e.column))}if(s.originalRange.containsPosition(e))return s.modifiedRange;{var o,r;let t=(o=s.originalRange.getEndPosition(),r=e,o.lineNumber===r.lineNumber?new d.W(0,r.column-o.column):new d.W(r.lineNumber-o.lineNumber,r.column-1));return h.Q.fromPositions(t.addToPosition(s.modifiedRange.getEndPosition()))}}function k(e,t){let i;return e.filter(e=>{let n=t(e,i);return i=e,n})}class x{static create(e,t){return new L(e,e,t)}static createWithDisposable(e,t,i){let n=new o.Cm;return n.add(t),n.add(e),new L(e,n,i)}}class L extends x{constructor(e,t,i){super(),this.object=e,this._disposable=t,this._debugOwner=i,this._refCount=1,this._isDisposed=!1,this._owners=[],i&&this._addOwner(i)}_addOwner(e){e&&this._owners.push(e)}createNewRef(e){return this._refCount++,e&&this._addOwner(e),new D(this,e)}dispose(){this._isDisposed||(this._isDisposed=!0,this._decreaseRefCount(this._debugOwner))}_decreaseRefCount(e){if(this._refCount--,0===this._refCount&&this._disposable.dispose(),e){let t=this._owners.indexOf(e);-1!==t&&this._owners.splice(t,1)}}}class D extends x{constructor(e,t){super(),this._base=e,this._debugOwner=t,this._isDisposed=!1}get object(){return this._base.object}createNewRef(e){return this._base.createNewRef(e)}dispose(){this._isDisposed||(this._isDisposed=!0,this._base._decreaseRefCount(this._debugOwner))}}},72307:(e,t,i)=>{"use strict";i.d(t,{Ay:()=>r.Ay,Cm:()=>r.Cm,D7:()=>o.D7,Ft:()=>n.Ft,VD:()=>r.VD,dz:()=>o.dz,nx:()=>s.nx,s:()=>r.s,y4:()=>o.y4});var n=i(71544),s=i(93415),o=i(6033);i(17354);var r=i(82102)},72436:(e,t,i)=>{"use strict";i.d(t,{$B:()=>h,Dk:()=>c,IN:()=>g,RE:()=>m,XS:()=>f,cv:()=>r,ho:()=>d,ir:()=>o,m$:()=>u,mk:()=>l,oJ:()=>a,t8:()=>p});var n=i(77715),s=i(78713);let o={keybindingLabelBackground:(0,n.GuP)(n.HDX),keybindingLabelForeground:(0,n.GuP)(n.eUu),keybindingLabelBorder:(0,n.GuP)(n.zUX),keybindingLabelBottomBorder:(0,n.GuP)(n.Qfh),keybindingLabelShadow:(0,n.GuP)(n.f9l)},r={buttonForeground:(0,n.GuP)(n.G_h),buttonSeparator:(0,n.GuP)(n.Q1$),buttonBackground:(0,n.GuP)(n.XJc),buttonHoverBackground:(0,n.GuP)(n.T9h),buttonSecondaryForeground:(0,n.GuP)(n.Inn),buttonSecondaryBackground:(0,n.GuP)(n.xOA),buttonSecondaryHoverBackground:(0,n.GuP)(n.nZG),buttonBorder:(0,n.GuP)(n.raQ)},a={progressBarBackground:(0,n.GuP)(n.BTi)},l={inputActiveOptionBorder:(0,n.GuP)(n.uNK),inputActiveOptionForeground:(0,n.GuP)(n.$$0),inputActiveOptionBackground:(0,n.GuP)(n.c1f)};(0,n.GuP)(n.jOE),(0,n.GuP)(n.Ukx),(0,n.GuP)(n.Ips),(0,n.GuP)(n.kPT),(0,n.GuP)(n.xWN),(0,n.GuP)(n.ZBU),(0,n.GuP)(n.jr9);let h={checkboxBackground:(0,n.GuP)(n.OcU),checkboxBorder:(0,n.GuP)(n.C5U),checkboxForeground:(0,n.GuP)(n.t0B),checkboxDisabledBackground:(0,n.GuP)(n.Uv),checkboxDisabledForeground:(0,n.GuP)(n.hsb)};(0,n.GuP)(n.CgL),(0,n.GuP)(n.FiB),(0,n.GuP)(n.f9l),(0,n.GuP)(n.DSL),(0,n.GuP)(n.tYX),(0,n.GuP)(n.JPj),(0,n.GuP)(n.bNw),(0,n.GuP)(n.vwp);let d={inputBackground:(0,n.GuP)(n.L4c),inputForeground:(0,n.GuP)(n.cws),inputBorder:(0,n.GuP)(n.Zgs),inputValidationInfoBorder:(0,n.GuP)(n.YSW),inputValidationInfoBackground:(0,n.GuP)(n.I$A),inputValidationInfoForeground:(0,n.GuP)(n.L9Z),inputValidationWarningBorder:(0,n.GuP)(n.C1n),inputValidationWarningBackground:(0,n.GuP)(n.ULt),inputValidationWarningForeground:(0,n.GuP)(n.T5N),inputValidationErrorBorder:(0,n.GuP)(n.eYZ),inputValidationErrorBackground:(0,n.GuP)(n._$n),inputValidationErrorForeground:(0,n.GuP)(n.h9z)},c={listFilterWidgetBackground:(0,n.GuP)(n.pnl),listFilterWidgetOutline:(0,n.GuP)(n.fiM),listFilterWidgetNoMatchesOutline:(0,n.GuP)(n.P9Z),listFilterWidgetShadow:(0,n.GuP)(n.H8q),inputBoxStyles:d,toggleStyles:l},u={badgeBackground:(0,n.GuP)(n.WMx),badgeForeground:(0,n.GuP)(n.zRE),badgeBorder:(0,n.GuP)(n.b1q)};(0,n.GuP)(n.vV$),(0,n.GuP)(n.mc0),(0,n.GuP)(n.etE),(0,n.GuP)(n.etE),(0,n.GuP)(n.sAS);let g={listBackground:void 0,listInactiveFocusForeground:void 0,listFocusBackground:(0,n.GuP)(n.VFX),listFocusForeground:(0,n.GuP)(n.efJ),listFocusOutline:(0,n.GuP)(n.p7Y),listActiveSelectionBackground:(0,n.GuP)(n.Rjz),listActiveSelectionForeground:(0,n.GuP)(n.GVV),listActiveSelectionIconForeground:(0,n.GuP)(n.fED),listFocusAndSelectionOutline:(0,n.GuP)(n.gtq),listFocusAndSelectionBackground:(0,n.GuP)(n.Rjz),listFocusAndSelectionForeground:(0,n.GuP)(n.GVV),listInactiveSelectionBackground:(0,n.GuP)(n.uNx),listInactiveSelectionIconForeground:(0,n.GuP)(n.C9U),listInactiveSelectionForeground:(0,n.GuP)(n.f4y),listInactiveFocusBackground:(0,n.GuP)(n.CQ3),listInactiveFocusOutline:(0,n.GuP)(n.ijf),listHoverBackground:(0,n.GuP)(n.lO1),listHoverForeground:(0,n.GuP)(n.QRv),listDropOverBackground:(0,n.GuP)(n.Yoe),listDropBetweenBackground:(0,n.GuP)(n.yIp),listSelectionOutline:(0,n.GuP)(n.buw),listHoverOutline:(0,n.GuP)(n.buw),treeIndentGuidesStroke:(0,n.GuP)(n.U4U),treeInactiveIndentGuidesStroke:(0,n.GuP)(n.pft),treeStickyScrollBackground:void 0,treeStickyScrollBorder:void 0,treeStickyScrollShadow:(0,n.GuP)(n.bXl),tableColumnsBorder:(0,n.GuP)(n.k5u),tableOddRowsBackgroundColor:(0,n.GuP)(n.sbQ)};function p(e){let t={...g};for(let i in e){let s=e[i];t[i]=void 0!==s?(0,n.GuP)(s):void 0}return t}let m={selectBackground:(0,n.GuP)(n.rvE),selectListBackground:(0,n.GuP)(n.lWP),selectForeground:(0,n.GuP)(n.yqq),decoratorRightForeground:(0,n.GuP)(n.NBf),selectBorder:(0,n.GuP)(n.HcB),focusBorder:(0,n.GuP)(n.tAP),listFocusBackground:(0,n.GuP)(n.AlL),listInactiveSelectionIconForeground:(0,n.GuP)(n.c7i),listFocusForeground:(0,n.GuP)(n.nH),listFocusOutline:(0,n.HP_)(n.buw,s.Q1.transparent.toString()),listHoverBackground:(0,n.GuP)(n.lO1),listHoverForeground:(0,n.GuP)(n.QRv),listHoverOutline:(0,n.GuP)(n.buw),selectListBorder:(0,n.GuP)(n.sIe),listBackground:void 0,listActiveSelectionBackground:void 0,listActiveSelectionForeground:void 0,listActiveSelectionIconForeground:void 0,listFocusAndSelectionBackground:void 0,listDropOverBackground:void 0,listDropBetweenBackground:void 0,listInactiveSelectionBackground:void 0,listInactiveSelectionForeground:void 0,listInactiveFocusBackground:void 0,listInactiveFocusOutline:void 0,listSelectionOutline:void 0,listFocusAndSelectionForeground:void 0,listFocusAndSelectionOutline:void 0,listInactiveFocusForeground:void 0,tableColumnsBorder:void 0,tableOddRowsBackgroundColor:void 0,treeIndentGuidesStroke:void 0,treeInactiveIndentGuidesStroke:void 0,treeStickyScrollBackground:void 0,treeStickyScrollBorder:void 0,treeStickyScrollShadow:void 0},f={shadowColor:(0,n.GuP)(n.f9l),borderColor:(0,n.GuP)(n.g$2),foregroundColor:(0,n.GuP)(n.dd_),backgroundColor:(0,n.GuP)(n.c6Y),selectionForegroundColor:(0,n.GuP)(n.pmr),selectionBackgroundColor:(0,n.GuP)(n.Ux$),selectionBorderColor:(0,n.GuP)(n.SNb),separatorColor:(0,n.GuP)(n.D7X),scrollbarShadow:(0,n.GuP)(n.bXl),scrollbarSliderBackground:(0,n.GuP)(n.gnV),scrollbarSliderHoverBackground:(0,n.GuP)(n.cI_),scrollbarSliderActiveBackground:(0,n.GuP)(n.mhZ)}},72667:(e,t,i)=>{"use strict";i.d(t,{wZ:()=>d,zL:()=>h,UW:()=>g,Md:()=>m});var n=i(15957),s=i(55532),o=i(99314),r=i(29443);class a{constructor(e,t,i,n){this.endIndex=e,this.type=t,this.metadata=i,this.containsRTL=n,this._linePartBrand=void 0}isWhitespace(){return!!(1&this.metadata)}isPseudoAfter(){return!!(4&this.metadata)}}var l=i(60095);class h{get isLTR(){return!this.containsRTL&&this.textDirection!==l.z4.RTL}constructor(e,t,i,n,s,o,a,l,h,d,c,u,g,p,m,f,_,v,b,C,w,y=!1){this.useMonospaceOptimizations=e,this.canUseHalfwidthRightwardsArrow=t,this.lineContent=i,this.continuesWithWrappedLine=n,this.isBasicASCII=s,this.containsRTL=o,this.fauxIndentLength=a,this.lineTokens=l,this.lineDecorations=h.sort(r.d.compare),this.tabSize=d,this.startVisibleColumn=c,this.spaceWidth=u,this.stopRenderingLineAfter=m,this.renderWhitespace="all"===f?4:"boundary"===f?1:"selection"===f?2:3*("trailing"===f),this.renderControlCharacters=_,this.fontLigatures=v,this.selectionsOnLine=b&&b.sort((e,t)=>e.start<t.start?-1:1),this.renderNewLineWhenEmpty=y,this.textDirection=C,this.verticalScrollbarSize=w,Math.abs(p-u)<Math.abs(g-u)?(this.renderSpaceWidth=p,this.renderSpaceCharCode=11825):(this.renderSpaceWidth=g,this.renderSpaceCharCode=183)}sameSelection(e){if(null===this.selectionsOnLine)return null===e;if(null===e||e.length!==this.selectionsOnLine.length)return!1;for(let t=0;t<this.selectionsOnLine.length;t++)if(!this.selectionsOnLine[t].equals(e[t]))return!1;return!0}equals(e){return this.useMonospaceOptimizations===e.useMonospaceOptimizations&&this.canUseHalfwidthRightwardsArrow===e.canUseHalfwidthRightwardsArrow&&this.lineContent===e.lineContent&&this.continuesWithWrappedLine===e.continuesWithWrappedLine&&this.isBasicASCII===e.isBasicASCII&&this.containsRTL===e.containsRTL&&this.fauxIndentLength===e.fauxIndentLength&&this.tabSize===e.tabSize&&this.startVisibleColumn===e.startVisibleColumn&&this.spaceWidth===e.spaceWidth&&this.renderSpaceWidth===e.renderSpaceWidth&&this.renderSpaceCharCode===e.renderSpaceCharCode&&this.stopRenderingLineAfter===e.stopRenderingLineAfter&&this.renderWhitespace===e.renderWhitespace&&this.renderControlCharacters===e.renderControlCharacters&&this.fontLigatures===e.fontLigatures&&r.d.equalsArr(this.lineDecorations,e.lineDecorations)&&this.lineTokens.equals(e.lineTokens)&&this.sameSelection(e.selectionsOnLine)&&this.textDirection===e.textDirection&&this.verticalScrollbarSize===e.verticalScrollbarSize&&this.renderNewLineWhenEmpty===e.renderNewLineWhenEmpty}}class d{constructor(e,t){this.partIndex=e,this.charIndex=t}}class c{static getPartIndex(e){return(0xffff0000&e)>>>16}static getCharIndex(e){return(65535&e)>>>0}constructor(e,t){this.length=e,this._data=new Uint32Array(this.length),this._horizontalOffset=new Uint32Array(this.length)}setColumnInfo(e,t,i,n){this._data[e-1]=(0|i|t<<16)>>>0,this._horizontalOffset[e-1]=n}getHorizontalOffset(e){return 0===this._horizontalOffset.length?0:this._horizontalOffset[e-1]}charOffsetToPartData(e){return 0===this.length?0:e<0?this._data[0]:e>=this.length?this._data[this.length-1]:this._data[e]}getDomPosition(e){let t=this.charOffsetToPartData(e-1);return new d(c.getPartIndex(t),c.getCharIndex(t))}getColumn(e,t){return this.partDataToCharOffset(e.partIndex,t,e.charIndex)+1}partDataToCharOffset(e,t,i){let n;if(0===this.length)return 0;let s=(0|i|e<<16)>>>0,o=0,r=this.length-1;for(;o+1<r;){let e=o+r>>>1,t=this._data[e];if(t===s)return e;t>s?r=e:o=e}if(o===r)return o;let a=this._data[o],l=this._data[r];if(a===s)return o;if(l===s)return r;let h=c.getPartIndex(a),d=c.getCharIndex(a);return n=h!==c.getPartIndex(l)?t:c.getCharIndex(l),i-d<=n-i?o:r}}class u{constructor(e,t){this._renderLineOutputBrand=void 0,this.characterMapping=e,this.containsForeignElements=t}}function g(e,t){if(0===e.lineContent.length){if(e.lineDecorations.length>0){t.appendString("<span>");let i=0,n=0,s=0;for(let o of e.lineDecorations)(1===o.type||2===o.type)&&(t.appendString('<span class="'),t.appendString(o.className),t.appendString('"></span>'),1===o.type&&(s|=1,i++),2===o.type&&(s|=2,n++));t.appendString("</span>");let o=new c(1,i+n);return o.setColumnInfo(1,i,0,0),new u(o,s)}return e.renderNewLineWhenEmpty?t.appendString("<span><span>\n</span></span>"):t.appendString("<span><span></span></span>"),new u(new c(0,0),0)}return function(e,t){var i;let o=e.fontIsMonospace,r=e.canUseHalfwidthRightwardsArrow,a=e.containsForeignElements,l=e.lineContent,h=e.len,d=e.isOverflowing,g=e.overflowingCharCount,p=e.parts,m=e.fauxIndentLength,f=e.tabSize,v=e.startVisibleColumn,b=e.spaceWidth,C=e.renderSpaceCharCode,w=e.renderWhitespace,y=e.renderControlCharacters,S=new c(h+1,p.length),k=!1,x=0,L=v,D=0,I=0,N=0;t.appendString("<span>");for(let e=0,i=p.length;e<i;e++){let i=p[e],n=i.endIndex,d=i.type,c=i.containsRTL,u=0!==w&&i.isWhitespace(),g=u&&!o&&("mtkw"===d||!a),v=x===n&&i.isPseudoAfter();if(D=0,t.appendString("<span "),c&&t.appendString('style="unicode-bidi:isolate" '),t.appendString('class="'),t.appendString(g?"mtkz":d),t.appendASCIICharCode(34),u){let i=0;{let e=x,t=L;for(;e<n;e++){let n=(9===l.charCodeAt(e)?f-t%f:1)|0;i+=n,e>=m&&(t+=n)}}for(g&&(t.appendString(' style="width:'),t.appendString(String(b*i)),t.appendString('px"')),t.appendASCIICharCode(62);x<n;x++){let i,n;if(S.setColumnInfo(x+1,e-N,D,I),N=0,9===l.charCodeAt(x)){n=i=f-L%f|0,!r||n>1?t.appendCharCode(8594):t.appendCharCode(65515);for(let e=2;e<=n;e++)t.appendCharCode(160)}else i=2,n=1,t.appendCharCode(C),t.appendCharCode(8204);D+=i,I+=n,x>=m&&(L+=n)}}else for(t.appendASCIICharCode(62);x<n;x++){S.setColumnInfo(x+1,e-N,D,I),N=0;let i=l.charCodeAt(x),n=1,o=1;switch(i){case 9:o=n=f-L%f;for(let e=1;e<=n;e++)t.appendCharCode(160);break;case 32:t.appendCharCode(160);break;case 60:t.appendString("<");break;case 62:t.appendString(">");break;case 38:t.appendString("&");break;case 0:y?t.appendCharCode(9216):t.appendString("�");break;case 65279:case 8232:case 8233:case 133:t.appendCharCode(65533);break;default:s.ne(i)&&o++,y&&i<32?t.appendCharCode(9216+i):y&&127===i?t.appendCharCode(9249):y&&_(i)?(t.appendString("[U+"),t.appendString(i.toString(16).toUpperCase().padStart(4,"0")),t.appendString("]"),o=n=8):t.appendCharCode(i)}D+=n,I+=o,x>=m&&(L+=o)}v?N++:N=0,x>=h&&!k&&i.isPseudoAfter()&&(k=!0,S.setColumnInfo(x+1,e,D,I)),t.appendString("</span>")}return k||S.setColumnInfo(h+1,p.length-1,D,I),d&&(t.appendString('<span class="mtkoverflow">'),t.appendString(n.kg(792,"Show more ({0})",(i=g)<1024?n.kg(793,"{0} chars",i):i<1048576?`${(i/1024).toFixed(1)} KB`:`${(i/1024/1024).toFixed(1)} MB`)),t.appendString("</span>")),t.appendString("</span>"),new u(S,a)}(function(e){let t,i,n,o=e.lineContent;-1!==e.stopRenderingLineAfter&&e.stopRenderingLineAfter<o.length?(t=!0,i=o.length-e.stopRenderingLineAfter,n=e.stopRenderingLineAfter):(t=!1,i=0,n=o.length);let l=function(e,t,i,n,o){let r=[],l=0;n>0&&(r[l++]=new a(n,"",0,!1));let h=n;for(let d=0,c=i.getCount();d<c;d++){let c=i.getEndOffset(d);if(c<=n)continue;let u=i.getClassName(d);if(c>=o){let i=!!t&&s.E_(e.substring(h,o));r[l++]=new a(o,u,0,i);break}let g=!!t&&s.E_(e.substring(h,c));r[l++]=new a(c,u,0,g),h=c}return r}(o,e.containsRTL,e.lineTokens,e.fauxIndentLength,n);e.renderControlCharacters&&!e.isBasicASCII&&(l=function(e,t){let i=[],n=new a(0,"",0,!1),s=0;for(let o of t){let t=o.endIndex;for(;s<t;s++)_(e.charCodeAt(s))&&(s>n.endIndex&&(n=new a(s,o.type,o.metadata,o.containsRTL),i.push(n)),n=new a(s+1,"mtkcontrol",o.metadata,!1),i.push(n));s>n.endIndex&&(n=new a(t,o.type,o.metadata,o.containsRTL),i.push(n))}return i}(o,l)),(4===e.renderWhitespace||1===e.renderWhitespace||2===e.renderWhitespace&&e.selectionsOnLine||3===e.renderWhitespace&&!e.continuesWithWrappedLine)&&(l=function(e,t,i,n){let o,r=e.continuesWithWrappedLine,l=e.fauxIndentLength,h=e.tabSize,d=e.startVisibleColumn,c=e.useMonospaceOptimizations,u=e.selectionsOnLine,g=1===e.renderWhitespace,p=3===e.renderWhitespace,m=e.renderSpaceWidth!==e.spaceWidth,f=[],_=0,v=0,b=n[0].type,C=n[v].containsRTL,w=n[v].endIndex,y=n.length,S=!1,k=s.HG(t);-1===k?(S=!0,k=i,o=i):o=s.lT(t);let x=!1,L=0,D=u&&u[L],I=d%h;for(let e=l;e<i;e++){let r,d=t.charCodeAt(e);if(D&&D.endExclusive<=e&&(L++,D=u&&u[L]),e<k||e>o)r=!0;else if(9===d)r=!0;else if(32===d)if(g)if(x)r=!0;else{let n=e+1<i?t.charCodeAt(e+1):0;r=32===n||9===n}else r=!0;else r=!1;if(r&&u&&(r=!!D&&D.start<=e&&e<D.endExclusive),r&&p&&(r=S||e>o),r&&C&&e>=k&&e<=o&&(r=!1),x){if(!r||!c&&I>=h){if(m){let t=_>0?f[_-1].endIndex:l;for(let i=t+1;i<=e;i++)f[_++]=new a(i,"mtkw",1,!1)}else f[_++]=new a(e,"mtkw",1,!1);I%=h}}else(e===w||r&&e>l)&&(f[_++]=new a(e,b,0,C),I%=h);for(9===d?I=h:s.ne(d)?I+=2:I++,x=r;e===w;)if(++v<y)b=n[v].type,C=n[v].containsRTL,w=n[v].endIndex;else break}let N=!1;if(x)if(r&&g){let e=i>0?t.charCodeAt(i-1):0,n=i>1?t.charCodeAt(i-2):0;(32!==e||32===n||9===n)&&(N=!0)}else N=!0;if(N)if(m){let e=_>0?f[_-1].endIndex:l;for(let t=e+1;t<=i;t++)f[_++]=new a(t,"mtkw",1,!1)}else f[_++]=new a(i,"mtkw",1,!1);else f[_++]=new a(i,b,0,C);return f}(e,o,n,l));let h=0;if(e.lineDecorations.length>0){for(let t=0,i=e.lineDecorations.length;t<i;t++){let i=e.lineDecorations[t];3===i.type||1===i.type?h|=1:2===i.type&&(h|=2)}l=function(e,t,i,n){n.sort(r.d.compare);let s=r.Bs.normalize(e,n),o=s.length,l=0,h=[],d=0,c=0;for(let e=0,t=i.length;e<t;e++){let t=i[e],n=t.endIndex,r=t.type,u=t.metadata,g=t.containsRTL;for(;l<o&&s[l].startOffset<n;){let e=s[l];if(e.startOffset>c&&(c=e.startOffset,h[d++]=new a(c,r,u,g)),e.endOffset+1<=n)c=e.endOffset+1,h[d++]=new a(c,r+" "+e.className,u|e.metadata,g),l++;else{c=n,h[d++]=new a(c,r+" "+e.className,u|e.metadata,g);break}}n>c&&(c=n,h[d++]=new a(c,r,u,g))}let u=i[i.length-1].endIndex;if(l<o&&s[l].startOffset===u)for(;l<o&&s[l].startOffset===u;){let e=s[l];h[d++]=new a(c,e.className,e.metadata,!1),l++}return h}(o,0,l,e.lineDecorations)}return e.containsRTL||(l=function(e,t,i){let n=0,s=[],o=0;if(i)for(let i=0,r=t.length;i<r;i++){let r=t[i],l=r.endIndex;if(n+50<l){let t=r.type,i=r.metadata,h=r.containsRTL,d=-1,c=n;for(let r=n;r<l;r++)32===e.charCodeAt(r)&&(d=r),-1!==d&&r-c>=50&&(s[o++]=new a(d+1,t,i,h),c=d+1,d=-1);c!==l&&(s[o++]=new a(l,t,i,h))}else s[o++]=r;n=l}else for(let e=0,i=t.length;e<i;e++){let i=t[e],r=i.endIndex,l=r-n;if(l>50){let e=i.type,t=i.metadata,h=i.containsRTL,d=Math.ceil(l/50);for(let i=1;i<d;i++){let r=n+50*i;s[o++]=new a(r,e,t,h)}s[o++]=new a(r,e,t,h)}else s[o++]=i;n=r}return s}(o,l,!e.isBasicASCII||e.fontLigatures)),new f(e.useMonospaceOptimizations,e.canUseHalfwidthRightwardsArrow,o,n,t,i,l,h,e.fauxIndentLength,e.tabSize,e.startVisibleColumn,e.spaceWidth,e.renderSpaceCharCode,e.renderWhitespace,e.renderControlCharacters)}(e),t)}class p{constructor(e,t,i){this.characterMapping=e,this.html=t,this.containsForeignElements=i}}function m(e){let t=new o.fe(1e4),i=g(e,t);return new p(i.characterMapping,t.build(),i.containsForeignElements)}class f{constructor(e,t,i,n,s,o,r,a,l,h,d,c,u,g,p){this.fontIsMonospace=e,this.canUseHalfwidthRightwardsArrow=t,this.lineContent=i,this.len=n,this.isOverflowing=s,this.overflowingCharCount=o,this.parts=r,this.containsForeignElements=a,this.fauxIndentLength=l,this.tabSize=h,this.startVisibleColumn=d,this.spaceWidth=c,this.renderSpaceCharCode=u,this.renderWhitespace=g,this.renderControlCharacters=p}}function _(e){return e<32?9!==e:127===e||!!(e>=8234)&&!!(e<=8238)||!!(e>=8294)&&!!(e<=8297)||!!(e>=8206)&&!!(e<=8207)||1564===e}},72673:()=>{},72725:()=>{},73082:(e,t,i)=>{"use strict";i.d(t,{K:()=>n});let n=Object.freeze({text:"text/plain",binary:"application/octet-stream",unknown:"application/unknown",markdown:"text/markdown",latex:"text/latex",uriList:"text/uri-list",html:"text/html"})},73341:(e,t,i)=>{"use strict";i.d(t,{Z4:()=>M,EH:()=>E,XF:()=>T});var n=i(29195),s=i(73589),o=i(87899),r=i(87460),a=i(85350),l=i(28669),h=i(61896);i(81178);var d=i(15957),c=i(5488),u=i(17354),g=i(70537),p=i(82102),m=i(98437),f=i(92684),_=i(88723),v=i(98200),b=i(60737),C=i(73970),w=i(67404);i(31055);let y=o.$,S="selectOption.entry.template";class k{get templateId(){return S}renderTemplate(e){let t=Object.create(null);return t.root=e,t.text=o.BC(e,y(".option-text")),t.detail=o.BC(e,y(".option-detail")),t.decoratorRight=o.BC(e,y(".option-decorator-right")),t}renderElement(e,t,i){let n=e.text,s=e.detail,o=e.decoratorRight,r=e.isDisabled;i.text.textContent=n,i.detail.textContent=s||"",i.decoratorRight.textContent=o||"",r?i.root.classList.add("option-disabled"):i.root.classList.remove("option-disabled")}disposeTemplate(e){}}class x extends p.jG{static{this.DEFAULT_DROPDOWN_MINIMUM_BOTTOM_MARGIN=32}static{this.DEFAULT_DROPDOWN_MINIMUM_TOP_MARGIN=2}static{this.DEFAULT_MINIMUM_VISIBLE_OPTIONS=3}constructor(e,t,i,n,s){super(),this.options=[],this._currentSelection=0,this._hasDetails=!1,this._skipLayout=!1,this._sticky=!1,this._isVisible=!1,this.styles=n,this.selectBoxOptions=s||Object.create(null),"number"!=typeof this.selectBoxOptions.minBottomMargin?this.selectBoxOptions.minBottomMargin=x.DEFAULT_DROPDOWN_MINIMUM_BOTTOM_MARGIN:this.selectBoxOptions.minBottomMargin<0&&(this.selectBoxOptions.minBottomMargin=0),this.selectElement=document.createElement("select"),this.selectElement.className="monaco-select-box monaco-select-box-dropdown-padding","string"==typeof this.selectBoxOptions.ariaLabel&&this.selectElement.setAttribute("aria-label",this.selectBoxOptions.ariaLabel),"string"==typeof this.selectBoxOptions.ariaDescription&&this.selectElement.setAttribute("aria-description",this.selectBoxOptions.ariaDescription),this._onDidSelect=new u.vl,this._register(this._onDidSelect),this.registerListeners(),this.constructSelectDropDown(i),this.selected=t||0,e&&this.setOptions(e,t),this.initStyleSheet()}setTitle(e){!this._hover&&e?this._hover=this._register((0,C.i)().setupManagedHover((0,a.nZ)("mouse"),this.selectElement,e)):this._hover&&this._hover.update(e)}getHeight(){return 22}getTemplateId(){return S}constructSelectDropDown(e){this.contextViewProvider=e,this.selectDropDownContainer=o.$(".monaco-select-box-dropdown-container"),this.selectDropDownContainer.classList.add("monaco-select-box-dropdown-padding"),this.selectionDetailsPane=o.BC(this.selectDropDownContainer,y(".select-box-details-pane"));let t=o.BC(this.selectDropDownContainer,y(".select-box-dropdown-container-width-control")),i=o.BC(t,y(".width-control-div"));this.widthControlElement=document.createElement("span"),this.widthControlElement.className="option-text-width-control",o.BC(i,this.widthControlElement),this._dropDownPosition=0,this.styleElement=f.li(this.selectDropDownContainer),this.selectDropDownContainer.setAttribute("draggable","true"),this._register(o.ko(this.selectDropDownContainer,o.Bx.DRAG_START,e=>{o.fs.stop(e,!0)}))}registerListeners(){let e;this._register(o.un(this.selectElement,"change",e=>{this.selected=e.target.selectedIndex,this._onDidSelect.fire({index:e.target.selectedIndex,selected:e.target.value}),this.options[this.selected]&&this.options[this.selected].text&&this.setTitle(this.options[this.selected].text)})),this._register(o.ko(this.selectElement,o.Bx.CLICK,e=>{o.fs.stop(e),this._isVisible?this.hideSelectDropDown(!0):this.showSelectDropDown()})),this._register(o.ko(this.selectElement,o.Bx.MOUSE_DOWN,e=>{o.fs.stop(e)})),this._register(o.ko(this.selectElement,"touchstart",t=>{e=this._isVisible})),this._register(o.ko(this.selectElement,"touchend",t=>{o.fs.stop(t),e?this.hideSelectDropDown(!0):this.showSelectDropDown()})),this._register(o.ko(this.selectElement,o.Bx.KEY_DOWN,e=>{let t=new v.Z(e),i=!1;l.zx?(18===t.keyCode||16===t.keyCode||10===t.keyCode||3===t.keyCode)&&(i=!0):(18===t.keyCode&&t.altKey||16===t.keyCode&&t.altKey||10===t.keyCode||3===t.keyCode)&&(i=!0),i&&(this.showSelectDropDown(),o.fs.stop(e,!0))}))}get onDidSelect(){return this._onDidSelect.event}setOptions(e,t){c.aI(this.options,e)||(this.options=e,this.selectElement.options.length=0,this._hasDetails=!1,this._cachedMaxDetailsHeight=void 0,this.options.forEach((e,t)=>{this.selectElement.add(this.createOption(e.text,t,e.isDisabled)),"string"==typeof e.description&&(this._hasDetails=!0)})),void 0!==t&&(this.select(t),this._currentSelection=this.selected)}setOptionsList(){this.selectList?.splice(0,this.selectList.length,this.options)}select(e){e>=0&&e<this.options.length?this.selected=e:e>this.options.length-1?this.select(this.options.length-1):this.selected<0&&(this.selected=0),this.selectElement.selectedIndex=this.selected,this.options[this.selected]&&this.options[this.selected].text&&this.setTitle(this.options[this.selected].text)}focus(){this.selectElement&&(this.selectElement.tabIndex=0,this.selectElement.focus())}blur(){this.selectElement&&(this.selectElement.tabIndex=-1,this.selectElement.blur())}setFocusable(e){this.selectElement.tabIndex=e?0:-1}render(e){this.container=e,e.classList.add("select-container"),e.appendChild(this.selectElement),this.styleSelectElement()}initStyleSheet(){let e=[];this.styles.listFocusBackground&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.focused { background-color: ${this.styles.listFocusBackground} !important; }`),this.styles.listFocusForeground&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.focused { color: ${this.styles.listFocusForeground} !important; }`),this.styles.decoratorRightForeground&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row:not(.focused) .option-decorator-right { color: ${this.styles.decoratorRightForeground}; }`),this.styles.selectBackground&&this.styles.selectBorder&&this.styles.selectBorder!==this.styles.selectBackground?(e.push(`.monaco-select-box-dropdown-container { border: 1px solid ${this.styles.selectBorder} } `),e.push(`.monaco-select-box-dropdown-container > .select-box-details-pane.border-top { border-top: 1px solid ${this.styles.selectBorder} } `),e.push(`.monaco-select-box-dropdown-container > .select-box-details-pane.border-bottom { border-bottom: 1px solid ${this.styles.selectBorder} } `)):this.styles.selectListBorder&&(e.push(`.monaco-select-box-dropdown-container > .select-box-details-pane.border-top { border-top: 1px solid ${this.styles.selectListBorder} } `),e.push(`.monaco-select-box-dropdown-container > .select-box-details-pane.border-bottom { border-bottom: 1px solid ${this.styles.selectListBorder} } `)),this.styles.listHoverForeground&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row:not(.option-disabled):not(.focused):hover { color: ${this.styles.listHoverForeground} !important; }`),this.styles.listHoverBackground&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row:not(.option-disabled):not(.focused):hover { background-color: ${this.styles.listHoverBackground} !important; }`),this.styles.listFocusOutline&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.focused { outline: 1.6px dotted ${this.styles.listFocusOutline} !important; outline-offset: -1.6px !important; }`),this.styles.listHoverOutline&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row:not(.option-disabled):not(.focused):hover { outline: 1.6px dashed ${this.styles.listHoverOutline} !important; outline-offset: -1.6px !important; }`),e.push(".monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.option-disabled.focused { background-color: transparent !important; color: inherit !important; outline: none !important; }"),e.push(".monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.option-disabled:hover { background-color: transparent !important; color: inherit !important; outline: none !important; }"),this.styleElement.textContent=e.join("\n")}styleSelectElement(){let e=this.styles.selectBackground??"",t=this.styles.selectForeground??"",i=this.styles.selectBorder??"";this.selectElement.style.backgroundColor=e,this.selectElement.style.color=t,this.selectElement.style.borderColor=i}styleList(){let e=this.styles.selectBackground??"",t=m.gI(this.styles.selectListBackground,e);this.selectDropDownListContainer.style.backgroundColor=t,this.selectionDetailsPane.style.backgroundColor=t;let i=this.styles.focusBorder??"";this.selectDropDownContainer.style.outlineColor=i,this.selectDropDownContainer.style.outlineOffset="-1px",this.selectList.style(this.styles)}createOption(e,t,i){let n=document.createElement("option");return n.value=e,n.text=e,n.disabled=!!i,n}showSelectDropDown(){this.selectionDetailsPane.textContent="",this.contextViewProvider&&!this._isVisible&&(this.createSelectList(this.selectDropDownContainer),this.setOptionsList(),this.contextViewProvider.showContextView({getAnchor:()=>this.selectElement,render:e=>this.renderSelectDropDown(e,!0),layout:()=>{this.layoutSelectDropDown()},onHide:()=>{this.selectDropDownContainer.classList.remove("visible"),this.selectElement.classList.remove("synthetic-focus")},anchorPosition:this._dropDownPosition},this.selectBoxOptions.optionsAsChildren?this.container:void 0),this._isVisible=!0,this.hideSelectDropDown(!1),this.contextViewProvider.showContextView({getAnchor:()=>this.selectElement,render:e=>this.renderSelectDropDown(e),layout:()=>this.layoutSelectDropDown(),onHide:()=>{this.selectDropDownContainer.classList.remove("visible"),this.selectElement.classList.remove("synthetic-focus")},anchorPosition:this._dropDownPosition},this.selectBoxOptions.optionsAsChildren?this.container:void 0),this._currentSelection=this.selected,this._isVisible=!0,this.selectElement.setAttribute("aria-expanded","true"))}hideSelectDropDown(e){this.contextViewProvider&&this._isVisible&&(this._isVisible=!1,this.selectElement.setAttribute("aria-expanded","false"),e&&this.selectElement.focus(),this.contextViewProvider.hideContextView())}renderSelectDropDown(e,t){return e.appendChild(this.selectDropDownContainer),this.layoutSelectDropDown(t),{dispose:()=>{this.selectDropDownContainer.remove()}}}measureMaxDetailsHeight(){let e=0;return this.options.forEach((t,i)=>{this.updateDetail(i),this.selectionDetailsPane.offsetHeight>e&&(e=this.selectionDetailsPane.offsetHeight)}),e}layoutSelectDropDown(e){if(this._skipLayout||!this.selectList)return!1;{this.selectDropDownContainer.classList.add("visible");let t=o.zk(this.selectElement),i=o.BK(this.selectElement),n=o.zk(this.selectElement).getComputedStyle(this.selectElement),s=parseFloat(n.getPropertyValue("--dropdown-padding-top"))+parseFloat(n.getPropertyValue("--dropdown-padding-bottom")),r=t.innerHeight-i.top-i.height-(this.selectBoxOptions.minBottomMargin||0),a=i.top-x.DEFAULT_DROPDOWN_MINIMUM_TOP_MARGIN,l=this.selectElement.offsetWidth,h=Math.max(this.setWidthControlElement(this.widthControlElement),Math.round(l)).toString()+"px";this.selectDropDownContainer.style.width=h,this.selectList.getHTMLElement().style.height="",this.selectList.layout();let d=this.selectList.contentHeight;this._hasDetails&&void 0===this._cachedMaxDetailsHeight&&(this._cachedMaxDetailsHeight=this.measureMaxDetailsHeight());let c=this._hasDetails?this._cachedMaxDetailsHeight:0,u=d+s+c,g=Math.floor((r-s-c)/this.getHeight()),p=Math.floor((a-s-c)/this.getHeight());if(e)return!(i.top+i.height>t.innerHeight-22)&&!(i.top<x.DEFAULT_DROPDOWN_MINIMUM_TOP_MARGIN)&&(!(g<1)||!(p<1))&&(g<x.DEFAULT_MINIMUM_VISIBLE_OPTIONS&&p>g&&this.options.length>g?(this._dropDownPosition=1,this.selectDropDownListContainer.remove(),this.selectionDetailsPane.remove(),this.selectDropDownContainer.appendChild(this.selectionDetailsPane),this.selectDropDownContainer.appendChild(this.selectDropDownListContainer),this.selectionDetailsPane.classList.remove("border-top"),this.selectionDetailsPane.classList.add("border-bottom")):(this._dropDownPosition=0,this.selectDropDownListContainer.remove(),this.selectionDetailsPane.remove(),this.selectDropDownContainer.appendChild(this.selectDropDownListContainer),this.selectDropDownContainer.appendChild(this.selectionDetailsPane),this.selectionDetailsPane.classList.remove("border-bottom"),this.selectionDetailsPane.classList.add("border-top")),!0);if(i.top+i.height>t.innerHeight-22||i.top<x.DEFAULT_DROPDOWN_MINIMUM_TOP_MARGIN||0===this._dropDownPosition&&g<1||1===this._dropDownPosition&&p<1)return this.hideSelectDropDown(!0),!1;if(0===this._dropDownPosition){if(this._isVisible&&g+p<1)return this.hideSelectDropDown(!0),!1;u>r&&(d=g*this.getHeight())}else u>a&&(d=p*this.getHeight());return this.selectList.layout(d),this.selectList.domFocus(),this.selectList.length>0&&(this.selectList.setFocus([this.selected||0]),this.selectList.reveal(this.selectList.getFocus()[0]||0)),this._hasDetails?(this.selectList.getHTMLElement().style.height=d+s+"px",this.selectDropDownContainer.style.height=""):this.selectDropDownContainer.style.height=d+s+"px",this.updateDetail(this.selected),this.selectDropDownContainer.style.width=h,this.selectDropDownListContainer.setAttribute("tabindex","0"),this.selectElement.classList.add("synthetic-focus"),this.selectDropDownContainer.classList.add("synthetic-focus"),!0}}setWidthControlElement(e){let t=0;if(e){let i=0,n=0;this.options.forEach((e,t)=>{let s=e.detail?e.detail.length:0,o=e.decoratorRight?e.decoratorRight.length:0,r=e.text.length+s+o;r>n&&(i=t,n=r)}),e.textContent=this.options[i].text+(this.options[i].decoratorRight?this.options[i].decoratorRight+" ":""),t=o.Tr(e)}return t}createSelectList(e){if(this.selectList)return;this.selectDropDownListContainer=o.BC(e,y(".select-box-dropdown-list-container")),this.listRenderer=new k,this.selectList=this._register(new w.B8("SelectBoxCustom",this.selectDropDownListContainer,this,[this.listRenderer],{useShadows:!1,verticalScrollMode:3,keyboardSupport:!1,mouseSupport:!1,accessibilityProvider:{getAriaLabel:e=>{let t=e.text;return e.detail&&(t+=`. ${e.detail}`),e.decoratorRight&&(t+=`. ${e.decoratorRight}`),e.description&&(t+=`. ${e.description}`),t},getWidgetAriaLabel:()=>(0,d.kg)(16,"Select Box"),getRole:()=>l.zx?"":"option",getWidgetRole:()=>"listbox"}})),this.selectBoxOptions.ariaLabel&&(this.selectList.ariaLabel=this.selectBoxOptions.ariaLabel);let t=this._register(new _.f(this.selectDropDownListContainer,"keydown")),i=u.Jh.chain(t.event,e=>e.filter(()=>this.selectList.length>0).map(e=>new v.Z(e)));this._register(u.Jh.chain(i,e=>e.filter(e=>3===e.keyCode))(this.onEnter,this)),this._register(u.Jh.chain(i,e=>e.filter(e=>2===e.keyCode))(this.onEnter,this)),this._register(u.Jh.chain(i,e=>e.filter(e=>9===e.keyCode))(this.onEscape,this)),this._register(u.Jh.chain(i,e=>e.filter(e=>16===e.keyCode))(this.onUpArrow,this)),this._register(u.Jh.chain(i,e=>e.filter(e=>18===e.keyCode))(this.onDownArrow,this)),this._register(u.Jh.chain(i,e=>e.filter(e=>12===e.keyCode))(this.onPageDown,this)),this._register(u.Jh.chain(i,e=>e.filter(e=>11===e.keyCode))(this.onPageUp,this)),this._register(u.Jh.chain(i,e=>e.filter(e=>14===e.keyCode))(this.onHome,this)),this._register(u.Jh.chain(i,e=>e.filter(e=>13===e.keyCode))(this.onEnd,this)),this._register(u.Jh.chain(i,e=>e.filter(e=>e.keyCode>=21&&e.keyCode<=56||e.keyCode>=85&&e.keyCode<=113))(this.onCharacter,this)),this._register(o.ko(this.selectList.getHTMLElement(),o.Bx.POINTER_UP,e=>this.onPointerUp(e))),this._register(this.selectList.onMouseOver(e=>void 0!==e.index&&this.selectList.setFocus([e.index]))),this._register(this.selectList.onDidChangeFocus(e=>this.onListFocus(e))),this._register(o.ko(this.selectDropDownContainer,o.Bx.FOCUS_OUT,e=>{!this._isVisible||o.QX(e.relatedTarget,this.selectDropDownContainer)||this.onListBlur()})),this.selectList.getHTMLElement().setAttribute("aria-label",this.selectBoxOptions.ariaLabel||""),this.selectList.getHTMLElement().setAttribute("aria-expanded","true"),this.styleList()}onPointerUp(e){if(!this.selectList.length)return;o.fs.stop(e);let t=e.target;if(!t||t.classList.contains("slider"))return;let i=t.closest(".monaco-list-row");if(!i)return;let n=Number(i.getAttribute("data-index")),s=i.classList.contains("option-disabled");n>=0&&n<this.options.length&&!s&&(this.selected=n,this.select(this.selected),this.selectList.setFocus([this.selected]),this.selectList.reveal(this.selectList.getFocus()[0]),this.selected!==this._currentSelection&&(this._currentSelection=this.selected,this._onDidSelect.fire({index:this.selectElement.selectedIndex,selected:this.options[this.selected].text}),this.options[this.selected]&&this.options[this.selected].text&&this.setTitle(this.options[this.selected].text)),this.hideSelectDropDown(!0))}onListBlur(){this._sticky||(this.selected!==this._currentSelection&&this.select(this._currentSelection),this.hideSelectDropDown(!1))}renderDescriptionMarkdown(e,t){let i=e=>{for(let t=0;t<e.childNodes.length;t++){let n=e.childNodes.item(t);"img"===(n.tagName&&n.tagName.toLowerCase())?n.remove():i(n)}},n=(0,b.Gc)({value:e,supportThemeIcons:!0},{actionHandler:t});return n.element.classList.add("select-box-description-markdown"),i(n.element),n.element}onListFocus(e){this._isVisible&&this._hasDetails&&this.updateDetail(e.indexes[0])}updateDetail(e){this.selectionDetailsPane.textContent="";let t=this.options[e],i=t?.description??"",n=t?.descriptionIsMarkdown??!1;if(i){if(n){let e=t.descriptionMarkdownActionHandler;this.selectionDetailsPane.appendChild(this.renderDescriptionMarkdown(i,e))}else this.selectionDetailsPane.textContent=i;this.selectionDetailsPane.style.display="block"}else this.selectionDetailsPane.style.display="none";this._skipLayout=!0,this.contextViewProvider.layout(),this._skipLayout=!1}onEscape(e){o.fs.stop(e),this.select(this._currentSelection),this.hideSelectDropDown(!0)}onEnter(e){o.fs.stop(e),this.selected!==this._currentSelection&&(this._currentSelection=this.selected,this._onDidSelect.fire({index:this.selectElement.selectedIndex,selected:this.options[this.selected].text}),this.options[this.selected]&&this.options[this.selected].text&&this.setTitle(this.options[this.selected].text)),this.hideSelectDropDown(!0)}onDownArrow(e){if(this.selected<this.options.length-1){o.fs.stop(e,!0);let t=this.options[this.selected+1].isDisabled;if(t&&this.options.length>this.selected+2)this.selected+=2;else{if(t)return;this.selected++}this.select(this.selected),this.selectList.setFocus([this.selected]),this.selectList.reveal(this.selectList.getFocus()[0])}}onUpArrow(e){this.selected>0&&(o.fs.stop(e,!0),this.options[this.selected-1].isDisabled&&this.selected>1?this.selected-=2:this.selected--,this.select(this.selected),this.selectList.setFocus([this.selected]),this.selectList.reveal(this.selectList.getFocus()[0]))}onPageUp(e){o.fs.stop(e),this.selectList.focusPreviousPage(),setTimeout(()=>{this.selected=this.selectList.getFocus()[0],this.options[this.selected].isDisabled&&this.selected<this.options.length-1&&(this.selected++,this.selectList.setFocus([this.selected])),this.selectList.reveal(this.selected),this.select(this.selected)},1)}onPageDown(e){o.fs.stop(e),this.selectList.focusNextPage(),setTimeout(()=>{this.selected=this.selectList.getFocus()[0],this.options[this.selected].isDisabled&&this.selected>0&&(this.selected--,this.selectList.setFocus([this.selected])),this.selectList.reveal(this.selected),this.select(this.selected)},1)}onHome(e){o.fs.stop(e),this.options.length<2||(this.selected=0,this.options[this.selected].isDisabled&&this.selected>1&&this.selected++,this.selectList.setFocus([this.selected]),this.selectList.reveal(this.selected),this.select(this.selected))}onEnd(e){o.fs.stop(e),this.options.length<2||(this.selected=this.options.length-1,this.options[this.selected].isDisabled&&this.selected>1&&this.selected--,this.selectList.setFocus([this.selected]),this.selectList.reveal(this.selected),this.select(this.selected))}onCharacter(e){let t=g.YM.toString(e.keyCode),i=-1;for(let n=0;n<this.options.length-1;n++)if(i=(n+this.selected+1)%this.options.length,this.options[i].text.charAt(0).toUpperCase()===t&&!this.options[i].isDisabled){this.select(i),this.selectList.setFocus([i]),this.selectList.reveal(this.selectList.getFocus()[0]),o.fs.stop(e);break}}dispose(){this.hideSelectDropDown(!1),super.dispose()}}class L extends p.jG{constructor(e,t,i,n){super(),this.selected=0,this.selectBoxOptions=n||Object.create(null),this.options=[],this.selectElement=document.createElement("select"),this.selectElement.className="monaco-select-box","string"==typeof this.selectBoxOptions.ariaLabel&&this.selectElement.setAttribute("aria-label",this.selectBoxOptions.ariaLabel),"string"==typeof this.selectBoxOptions.ariaDescription&&this.selectElement.setAttribute("aria-description",this.selectBoxOptions.ariaDescription),this._onDidSelect=this._register(new u.vl),this.styles=i,this.registerListeners(),this.setOptions(e,t)}registerListeners(){this._register(r.q.addTarget(this.selectElement)),[r.B.Tap].forEach(e=>{this._register(o.ko(this.selectElement,e,e=>{this.selectElement.focus()}))}),this._register(o.un(this.selectElement,"click",e=>{o.fs.stop(e,!0)})),this._register(o.un(this.selectElement,"change",e=>{this.selectElement.title=e.target.value,this._onDidSelect.fire({index:e.target.selectedIndex,selected:e.target.value})})),this._register(o.un(this.selectElement,"keydown",e=>{let t=!1;l.zx?(18===e.keyCode||16===e.keyCode||10===e.keyCode)&&(t=!0):(18===e.keyCode&&e.altKey||10===e.keyCode||3===e.keyCode)&&(t=!0),t&&e.stopPropagation()}))}get onDidSelect(){return this._onDidSelect.event}setOptions(e,t){this.options&&c.aI(this.options,e)||(this.options=e,this.selectElement.options.length=0,this.options.forEach((e,t)=>{this.selectElement.add(this.createOption(e.text,t,e.isDisabled))})),void 0!==t&&this.select(t)}select(e){0===this.options.length?this.selected=0:e>=0&&e<this.options.length?this.selected=e:e>this.options.length-1?this.select(this.options.length-1):this.selected<0&&(this.selected=0),this.selectElement.selectedIndex=this.selected,this.selected<this.options.length&&"string"==typeof this.options[this.selected].text?this.selectElement.title=this.options[this.selected].text:this.selectElement.title=""}focus(){this.selectElement&&(this.selectElement.tabIndex=0,this.selectElement.focus())}blur(){this.selectElement&&(this.selectElement.tabIndex=-1,this.selectElement.blur())}setFocusable(e){this.selectElement.tabIndex=e?0:-1}render(e){e.classList.add("select-container"),e.appendChild(this.selectElement),this.setOptions(this.options,this.selected),this.applyStyles()}applyStyles(){this.selectElement&&(this.selectElement.style.backgroundColor=this.styles.selectBackground??"",this.selectElement.style.color=this.styles.selectForeground??"",this.selectElement.style.borderColor=this.styles.selectBorder??"")}createOption(e,t,i){let n=document.createElement("option");return n.value=e,n.text=e,n.disabled=!!i,n}}class D extends h.x{constructor(e,t,i,n,s){super(),l.zx&&!s?.useCustomDrawn?this.selectBoxDelegate=new L(e,t,n,s):this.selectBoxDelegate=new x(e,t,i,n,s),this._register(this.selectBoxDelegate)}get onDidSelect(){return this.selectBoxDelegate.onDidSelect}setOptions(e,t){this.selectBoxDelegate.setOptions(e,t)}select(e){this.selectBoxDelegate.select(e)}focus(){this.selectBoxDelegate.focus()}blur(){this.selectBoxDelegate.blur()}setFocusable(e){this.selectBoxDelegate.setFocusable(e)}render(e){this.selectBoxDelegate.render(e)}}var I=i(39205),N=i(95751);i(79410);class E extends p.jG{get action(){return this._action}constructor(e,t,i={}){super(),this.options=i,this._context=e||this,this._action=t,t instanceof I.rc&&this._register(t.onDidChange(e=>{this.element&&this.handleActionChangeEvent(e)}))}handleActionChangeEvent(e){void 0!==e.enabled&&this.updateEnabled(),void 0!==e.checked&&this.updateChecked(),void 0!==e.class&&this.updateClass(),void 0!==e.label&&(this.updateLabel(),this.updateTooltip()),void 0!==e.tooltip&&this.updateTooltip()}get actionRunner(){return this._actionRunner||(this._actionRunner=this._register(new I.LN)),this._actionRunner}set actionRunner(e){this._actionRunner=e}isEnabled(){return this._action.enabled}setActionContext(e){this._context=e}render(e){let t=this.element=e;this._register(r.q.addTarget(e));let i=this.options&&this.options.draggable;i&&(e.draggable=!0,n.gm&&this._register((0,o.ko)(e,o.Bx.DRAG_START,e=>e.dataTransfer?.setData(s.t.TEXT,this._action.label)))),this._register((0,o.ko)(t,r.B.Tap,e=>this.onClick(e,!0))),this._register((0,o.ko)(t,o.Bx.MOUSE_DOWN,e=>{i||o.fs.stop(e,!0),this._action.enabled&&0===e.button&&t.classList.add("active")})),l.zx&&this._register((0,o.ko)(t,o.Bx.CONTEXT_MENU,e=>{0===e.button&&!0===e.ctrlKey&&this.onClick(e)})),this._register((0,o.ko)(t,o.Bx.CLICK,e=>{o.fs.stop(e,!0),this.options&&this.options.isMenu||this.onClick(e)})),this._register((0,o.ko)(t,o.Bx.DBLCLICK,e=>{o.fs.stop(e,!0)})),[o.Bx.MOUSE_UP,o.Bx.MOUSE_OUT].forEach(e=>{this._register((0,o.ko)(t,e,e=>{o.fs.stop(e),t.classList.remove("active")}))})}onClick(e,t=!1){o.fs.stop(e,!0);let i=N.z(this._context)?this.options?.useEventAsContext?e:{preserveFocus:t}:this._context;this.actionRunner.run(this._action,i)}focus(){this.element&&(this.element.tabIndex=0,this.element.focus(),this.element.classList.add("focused"))}blur(){this.element&&(this.element.blur(),this.element.tabIndex=-1,this.element.classList.remove("focused"))}setFocusable(e){this.element&&(this.element.tabIndex=e?0:-1)}get trapsArrowNavigation(){return!1}updateEnabled(){}updateLabel(){}getClass(){return this.action.class}getTooltip(){return this.action.tooltip}getHoverContents(){return this.getTooltip()}updateTooltip(){if(!this.element)return;let e=this.getHoverContents()??"";if(this.updateAriaLabel(),this.customHover||""===e)this.customHover&&this.customHover.update(e);else{let t=this.options.hoverDelegate??(0,a.nZ)("element");this.customHover=this._store.add((0,C.i)().setupManagedHover(t,this.element,e))}}updateAriaLabel(){if(this.element){let e=this.getTooltip()??"";this.element.setAttribute("aria-label",e)}}updateClass(){}updateChecked(){}dispose(){this.element&&(this.element.remove(),this.element=void 0),this._context=void 0,super.dispose()}}class M extends E{constructor(e,t,i){super(e,t,i={...i,icon:void 0!==i.icon&&i.icon,label:void 0===i.label||i.label}),this.options=i,this.cssClass=""}render(e){super.render(e),N.j(this.element);let t=document.createElement("a");if(t.classList.add("action-label"),t.setAttribute("role",this.getDefaultAriaRole()),this.label=t,this.element.appendChild(t),this.options.label&&this.options.keybinding&&!this.options.keybindingNotRenderedWithLabel){let e=document.createElement("span");e.classList.add("keybinding"),e.textContent=this.options.keybinding,this.element.appendChild(e)}this.updateClass(),this.updateLabel(),this.updateTooltip(),this.updateEnabled(),this.updateChecked()}getDefaultAriaRole(){return this._action.id===I.wv.ID?"presentation":this.options.isMenu?"menuitem":this.options.isTabList?"tab":"button"}focus(){this.label&&(this.label.tabIndex=0,this.label.focus())}blur(){this.label&&(this.label.tabIndex=-1)}setFocusable(e){this.label&&(this.label.tabIndex=e?0:-1)}updateLabel(){this.options.label&&this.label&&(this.label.textContent=this.action.label)}getTooltip(){let e=null;return this.action.tooltip?e=this.action.tooltip:this.action.label&&(e=this.action.label,this.options.keybinding&&(e=d.kg(0,"{0} ({1})",e,this.options.keybinding))),e??void 0}updateClass(){this.cssClass&&this.label&&this.label.classList.remove(...this.cssClass.split(" ")),this.options.icon?(this.cssClass=this.getClass(),this.label&&(this.label.classList.add("codicon"),this.cssClass&&this.label.classList.add(...this.cssClass.split(" "))),this.updateEnabled()):this.label?.classList.remove("codicon")}updateEnabled(){this.action.enabled?(this.label&&(this.label.removeAttribute("aria-disabled"),this.label.classList.remove("disabled")),this.element?.classList.remove("disabled")):(this.label&&(this.label.setAttribute("aria-disabled","true"),this.label.classList.add("disabled")),this.element?.classList.add("disabled"))}updateAriaLabel(){if(this.label){let e=this.getTooltip()??"";this.label.setAttribute("aria-label",e)}}updateChecked(){this.label&&(void 0!==this.action.checked?(this.label.classList.toggle("checked",this.action.checked),this.options.isTabList?this.label.setAttribute("aria-selected",this.action.checked?"true":"false"):(this.label.setAttribute("aria-checked",this.action.checked?"true":"false"),this.label.setAttribute("role","checkbox"))):(this.label.classList.remove("checked"),this.label.removeAttribute(this.options.isTabList?"aria-selected":"aria-checked"),this.label.setAttribute("role",this.getDefaultAriaRole())))}}class T extends E{constructor(e,t,i,n,s,o,r){super(e,t),this.selectBox=new D(i,n,s,o,r),this.selectBox.setFocusable(!1),this._register(this.selectBox),this.registerListeners()}select(e){this.selectBox.select(e)}registerListeners(){this._register(this.selectBox.onDidSelect(e=>this.runAction(e.selected,e.index)))}runAction(e,t){this.actionRunner.run(this._action,this.getActionContext(e,t))}getActionContext(e,t){return e}setFocusable(e){this.selectBox.setFocusable(e)}focus(){this.selectBox?.focus()}blur(){this.selectBox?.blur()}render(e){this.selectBox.render(e)}}},73589:(e,t,i)=>{"use strict";i.d(t,{t:()=>n});let n={RESOURCES:"ResourceURLs",DOWNLOAD_URL:"DownloadURL",FILES:"Files",TEXT:i(73082).K.text,INTERNAL_URI_LIST:"application/vnd.code.uri-list"}},73970:(e,t,i)=>{"use strict";i.d(t,{e:()=>o,i:()=>r});var n=i(82102);let s={showInstantHover:()=>void 0,showDelayedHover:()=>void 0,setupDelayedHover:()=>n.jG.None,setupDelayedHoverAtMouse:()=>n.jG.None,hideHover:()=>void 0,showAndFocusLastHover:()=>void 0,setupManagedHover:()=>({dispose:()=>void 0,show:()=>void 0,hide:()=>void 0,update:()=>void 0}),showManagedHover:()=>void 0};function o(e){s=e}function r(){return s}},74221:(e,t,i)=>{"use strict";i.d(t,{Gc:()=>v,Nn:()=>l,Xw:()=>h,rh:()=>_,yF:()=>f});var n=i(6033),s=i(17379),o=i(4091),r=i(89802);class a{get length(){return this._length}constructor(e){this._length=e}}class l extends a{static create(e,t,i){let n=e.length;return t&&(n=(0,o.QB)(n,t.length)),i&&(n=(0,o.QB)(n,i.length)),new l(n,e,t,i,t?t.missingOpeningBracketIds:r.gV.getEmpty())}get kind(){return 2}get listHeight(){return 0}get childrenLength(){return 3}getChild(e){switch(e){case 0:return this.openingBracket;case 1:return this.child;case 2:return this.closingBracket}throw Error("Invalid child index")}get children(){let e=[];return e.push(this.openingBracket),this.child&&e.push(this.child),this.closingBracket&&e.push(this.closingBracket),e}constructor(e,t,i,n,s){super(e),this.openingBracket=t,this.child=i,this.closingBracket=n,this.missingOpeningBracketIds=s}canBeReused(e){return!(null===this.closingBracket||e.intersects(this.missingOpeningBracketIds))}deepClone(){return new l(this.length,this.openingBracket.deepClone(),this.child&&this.child.deepClone(),this.closingBracket&&this.closingBracket.deepClone(),this.missingOpeningBracketIds)}computeMinIndentation(e,t){return this.child?this.child.computeMinIndentation((0,o.QB)(e,this.openingBracket.length),t):Number.MAX_SAFE_INTEGER}}class h extends a{static create23(e,t,i,n=!1){let s=e.length,r=e.missingOpeningBracketIds;if(e.listHeight!==t.listHeight)throw Error("Invalid list heights");if(s=(0,o.QB)(s,t.length),r=r.merge(t.missingOpeningBracketIds),i){if(e.listHeight!==i.listHeight)throw Error("Invalid list heights");s=(0,o.QB)(s,i.length),r=r.merge(i.missingOpeningBracketIds)}return n?new c(s,e.listHeight+1,e,t,i,r):new d(s,e.listHeight+1,e,t,i,r)}static getEmpty(){return new g(o.Vp,0,[],r.gV.getEmpty())}get kind(){return 4}get missingOpeningBracketIds(){return this._missingOpeningBracketIds}constructor(e,t,i){super(e),this.listHeight=t,this._missingOpeningBracketIds=i,this.cachedMinIndentation=-1}throwIfImmutable(){}makeLastElementMutable(){this.throwIfImmutable();let e=this.childrenLength;if(0===e)return;let t=this.getChild(e-1),i=4===t.kind?t.toMutable():t;return t!==i&&this.setChild(e-1,i),i}makeFirstElementMutable(){if(this.throwIfImmutable(),0===this.childrenLength)return;let e=this.getChild(0),t=4===e.kind?e.toMutable():e;return e!==t&&this.setChild(0,t),t}canBeReused(e){if(e.intersects(this.missingOpeningBracketIds)||0===this.childrenLength)return!1;let t=this;for(;4===t.kind;){let e=t.childrenLength;if(0===e)throw new n.D7;t=t.getChild(e-1)}return t.canBeReused(e)}handleChildrenChanged(){this.throwIfImmutable();let e=this.childrenLength,t=this.getChild(0).length,i=this.getChild(0).missingOpeningBracketIds;for(let n=1;n<e;n++){let e=this.getChild(n);t=(0,o.QB)(t,e.length),i=i.merge(e.missingOpeningBracketIds)}this._length=t,this._missingOpeningBracketIds=i,this.cachedMinIndentation=-1}computeMinIndentation(e,t){if(-1!==this.cachedMinIndentation)return this.cachedMinIndentation;let i=Number.MAX_SAFE_INTEGER,n=e;for(let e=0;e<this.childrenLength;e++){let s=this.getChild(e);s&&(i=Math.min(i,s.computeMinIndentation(n,t)),n=(0,o.QB)(n,s.length))}return this.cachedMinIndentation=i,i}}class d extends h{get childrenLength(){return null!==this._item3?3:2}getChild(e){switch(e){case 0:return this._item1;case 1:return this._item2;case 2:return this._item3}throw Error("Invalid child index")}setChild(e,t){switch(e){case 0:this._item1=t;return;case 1:this._item2=t;return;case 2:this._item3=t;return}throw Error("Invalid child index")}get children(){return this._item3?[this._item1,this._item2,this._item3]:[this._item1,this._item2]}get item1(){return this._item1}get item2(){return this._item2}get item3(){return this._item3}constructor(e,t,i,n,s,o){super(e,t,o),this._item1=i,this._item2=n,this._item3=s}deepClone(){return new d(this.length,this.listHeight,this._item1.deepClone(),this._item2.deepClone(),this._item3?this._item3.deepClone():null,this.missingOpeningBracketIds)}appendChildOfSameHeight(e){if(this._item3)throw Error("Cannot append to a full (2,3) tree node");this.throwIfImmutable(),this._item3=e,this.handleChildrenChanged()}unappendChild(){if(!this._item3)throw Error("Cannot remove from a non-full (2,3) tree node");this.throwIfImmutable();let e=this._item3;return this._item3=null,this.handleChildrenChanged(),e}prependChildOfSameHeight(e){if(this._item3)throw Error("Cannot prepend to a full (2,3) tree node");this.throwIfImmutable(),this._item3=this._item2,this._item2=this._item1,this._item1=e,this.handleChildrenChanged()}unprependChild(){if(!this._item3)throw Error("Cannot remove from a non-full (2,3) tree node");this.throwIfImmutable();let e=this._item1;return this._item1=this._item2,this._item2=this._item3,this._item3=null,this.handleChildrenChanged(),e}toMutable(){return this}}class c extends d{toMutable(){return new d(this.length,this.listHeight,this.item1,this.item2,this.item3,this.missingOpeningBracketIds)}throwIfImmutable(){throw Error("this instance is immutable")}}class u extends h{get childrenLength(){return this._children.length}getChild(e){return this._children[e]}setChild(e,t){this._children[e]=t}get children(){return this._children}constructor(e,t,i,n){super(e,t,n),this._children=i}deepClone(){let e=Array(this._children.length);for(let t=0;t<this._children.length;t++)e[t]=this._children[t].deepClone();return new u(this.length,this.listHeight,e,this.missingOpeningBracketIds)}appendChildOfSameHeight(e){this.throwIfImmutable(),this._children.push(e),this.handleChildrenChanged()}unappendChild(){this.throwIfImmutable();let e=this._children.pop();return this.handleChildrenChanged(),e}prependChildOfSameHeight(e){this.throwIfImmutable(),this._children.unshift(e),this.handleChildrenChanged()}unprependChild(){this.throwIfImmutable();let e=this._children.shift();return this.handleChildrenChanged(),e}toMutable(){return this}}class g extends u{toMutable(){return new u(this.length,this.listHeight,[...this.children],this.missingOpeningBracketIds)}throwIfImmutable(){throw Error("this instance is immutable")}}let p=[];class m extends a{get listHeight(){return 0}get childrenLength(){return 0}getChild(e){return null}get children(){return p}deepClone(){return this}}class f extends m{get kind(){return 0}get missingOpeningBracketIds(){return r.gV.getEmpty()}canBeReused(e){return!0}computeMinIndentation(e,t){let i=(0,o.l4)(e),n=(0===i.columnCount?i.lineCount:i.lineCount+1)+1,r=(0,o.eu)((0,o.QB)(e,this.length))+1,a=Number.MAX_SAFE_INTEGER;for(let e=n;e<=r;e++){let i=t.getLineFirstNonWhitespaceColumn(e),n=t.getLineContent(e);0!==i&&(a=Math.min(a,s.A.visibleColumnFromColumn(n,i,t.getOptions().tabSize)))}return a}}class _ extends m{static create(e,t,i){return new _(e,t,i)}get kind(){return 1}get missingOpeningBracketIds(){return r.gV.getEmpty()}constructor(e,t,i){super(e),this.bracketInfo=t,this.bracketIds=i}get text(){return this.bracketInfo.bracketText}get languageId(){return this.bracketInfo.languageId}canBeReused(e){return!1}computeMinIndentation(e,t){return Number.MAX_SAFE_INTEGER}}class v extends m{get kind(){return 3}constructor(e,t){super(t),this.missingOpeningBracketIds=e}canBeReused(e){return!e.intersects(this.missingOpeningBracketIds)}computeMinIndentation(e,t){return Number.MAX_SAFE_INTEGER}}},74227:(e,t,i)=>{"use strict";function n(e){return e&&"object"==typeof e&&"string"==typeof e.original&&"string"==typeof e.value}function s(e){return!!e&&void 0!==e.condition}i.d(t,{N:()=>s,f:()=>n})},74830:(e,t,i)=>{"use strict";function n(e,t){let i=e.getCount(),n=e.findTokenIndexAtOffset(t),o=e.getLanguageId(n),r=n;for(;r+1<i&&e.getLanguageId(r+1)===o;)r++;let a=n;for(;a>0&&e.getLanguageId(a-1)===o;)a--;return new s(e,o,a,r+1,e.getStartOffset(a),e.getEndOffset(r))}i.d(t,{BQ:()=>n,Yo:()=>o});class s{constructor(e,t,i,n,s,o){this._scopedLineTokensBrand=void 0,this._actual=e,this.languageId=t,this._firstTokenIndex=i,this._lastTokenIndex=n,this.firstCharOffset=s,this._lastCharOffset=o,this.languageIdCodec=e.languageIdCodec}getLineContent(){return this._actual.getLineContent().substring(this.firstCharOffset,this._lastCharOffset)}getLineLength(){return this._lastCharOffset-this.firstCharOffset}getActualLineContentBefore(e){return this._actual.getLineContent().substring(0,this.firstCharOffset+e)}getTokenCount(){return this._lastTokenIndex-this._firstTokenIndex}findTokenIndexAtOffset(e){return this._actual.findTokenIndexAtOffset(e+this.firstCharOffset)-this._firstTokenIndex}getStandardTokenType(e){return this._actual.getStandardTokenType(e+this._firstTokenIndex)}toIViewLineTokens(){return this._actual.sliceAndInflate(this.firstCharOffset,this._lastCharOffset,0)}}function o(e){return(3&e)!=0}},75247:(e,t,i)=>{"use strict";i.d(t,{CO:()=>l,F:()=>d,tp:()=>c});var n=i(71544),s=i(72553),o=i(54473),r=i(23047),a=i(62413);class l{constructor(){this._transformer=void 0}get endPositionExclusive(){return this.length.addToPosition(new s.y(1,1))}get lineRange(){return this.length.toLineRange()}getValue(){return this.getValueOfRange(this.length.toRange())}getValueOfOffsetRange(e){return this.getValueOfRange(this.getTransformer().getRange(e))}getLineLength(e){return this.getValueOfRange(new r.Q(e,1,e,Number.MAX_SAFE_INTEGER)).length}getTransformer(){return this._transformer||(this._transformer=new o.aG(this.getValue())),this._transformer}getLineAt(e){return this.getValueOfRange(new r.Q(e,1,e,Number.MAX_SAFE_INTEGER))}}class h extends l{constructor(e,t){(0,n.vA)(t>=1),super(),this._getLineContent=e,this._lineCount=t}getValueOfRange(e){if(e.startLineNumber===e.endLineNumber)return this._getLineContent(e.startLineNumber).substring(e.startColumn-1,e.endColumn-1);let t=this._getLineContent(e.startLineNumber).substring(e.startColumn-1);for(let i=e.startLineNumber+1;i<e.endLineNumber;i++)t+="\n"+this._getLineContent(i);return t+("\n"+this._getLineContent(e.endLineNumber).substring(0,e.endColumn-1))}getLineLength(e){return this._getLineContent(e).length}get length(){let e=this._getLineContent(this._lineCount);return new a.W(this._lineCount-1,e.length)}}class d extends h{constructor(e){super(t=>e[t-1],e.length)}}class c extends l{constructor(e){super(),this.value=e,this._t=new o.aG(this.value)}getValueOfRange(e){return this._t.getOffsetRange(e).substring(this.value)}get length(){return this._t.textLength}}},75999:()=>{},76054:(e,t,i)=>{"use strict";i.d(t,{$:()=>v,D:()=>S});var n,s,o=i(45262),r=i(17354),a=i(82102),l=i(41327),h=i(39783),d=i(8820),c=i(39205),u=i(97702),g=i(5488),p=i(15957),m=i(49195),f=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},_=function(e,t){return function(i,n){t(i,n,e)}};let v=class{constructor(e,t,i){this._commandService=e,this._keybindingService=t,this._hiddenStates=new b(i)}createMenu(e,t,i){return new y(e,this._hiddenStates,{emitEventsForSubmenuChanges:!1,eventDebounceDelay:50,...i},this._commandService,this._keybindingService,t)}getMenuActions(e,t,i){let n=new y(e,this._hiddenStates,{emitEventsForSubmenuChanges:!1,eventDebounceDelay:50,...i},this._commandService,this._keybindingService,t),s=n.getActions(i);return n.dispose(),s}resetHiddenStates(e){this._hiddenStates.reset(e)}};v=f([_(0,h.d),_(1,m.b),_(2,u.CS)],v);let b=class{static{n=this}static{this._key="menu.hiddenCommands"}constructor(e){this._storageService=e,this._disposables=new a.Cm,this._onDidChange=new r.vl,this.onDidChange=this._onDidChange.event,this._ignoreChangeEvent=!1,this._hiddenByDefaultCache=new Map;try{let t=e.get(n._key,0,"{}");this._data=JSON.parse(t)}catch(e){this._data=Object.create(null)}this._disposables.add(e.onDidChangeValue(0,n._key,this._disposables)(()=>{if(!this._ignoreChangeEvent)try{let t=e.get(n._key,0,"{}");this._data=JSON.parse(t)}catch(e){console.log("FAILED to read storage after UPDATE",e)}this._onDidChange.fire()}))}dispose(){this._onDidChange.dispose(),this._disposables.dispose()}_isHiddenByDefault(e,t){return this._hiddenByDefaultCache.get(`${e.id}/${t}`)??!1}setDefaultState(e,t,i){this._hiddenByDefaultCache.set(`${e.id}/${t}`,i)}isHidden(e,t){let i=this._isHiddenByDefault(e,t),n=this._data[e.id]?.includes(t)??!1;return i?!n:n}updateHidden(e,t,i){this._isHiddenByDefault(e,t)&&(i=!i);let n=this._data[e.id];if(i)n?0>n.indexOf(t)&&n.push(t):this._data[e.id]=[t];else if(n){let i=n.indexOf(t);i>=0&&(0,g.UH)(n,i),0===n.length&&delete this._data[e.id]}this._persist()}reset(e){if(void 0===e)this._data=Object.create(null),this._persist();else{for(let{id:t}of e)this._data[t]&&delete this._data[t];this._persist()}}_persist(){try{this._ignoreChangeEvent=!0;let e=JSON.stringify(this._data);this._storageService.store(n._key,e,0,0)}finally{this._ignoreChangeEvent=!1}}};b=n=f([_(0,u.CS)],b);class C{constructor(e,t){this._id=e,this._collectContextKeysForSubmenus=t,this._menuGroups=[],this._allMenuIds=new Set,this._structureContextKeys=new Set,this._preconditionContextKeys=new Set,this._toggledContextKeys=new Set,this.refresh()}get allMenuIds(){return this._allMenuIds}get structureContextKeys(){return this._structureContextKeys}get preconditionContextKeys(){return this._preconditionContextKeys}get toggledContextKeys(){return this._toggledContextKeys}refresh(){let e;for(let t of(this._menuGroups.length=0,this._allMenuIds.clear(),this._structureContextKeys.clear(),this._preconditionContextKeys.clear(),this._toggledContextKeys.clear(),this._sort(l.ZG.getMenuItems(this._id)))){let i=t.group||"";e&&e[0]===i||(e=[i,[]],this._menuGroups.push(e)),e[1].push(t),this._collectContextKeysAndSubmenuIds(t)}this._allMenuIds.add(this._id)}_sort(e){return e}_collectContextKeysAndSubmenuIds(e){if(C._fillInKbExprKeys(e.when,this._structureContextKeys),(0,l.is)(e)){if(e.command.precondition&&C._fillInKbExprKeys(e.command.precondition,this._preconditionContextKeys),e.command.toggled){let t=e.command.toggled.condition||e.command.toggled;C._fillInKbExprKeys(t,this._toggledContextKeys)}}else this._collectContextKeysForSubmenus&&(l.ZG.getMenuItems(e.submenu).forEach(this._collectContextKeysAndSubmenuIds,this),this._allMenuIds.add(e.submenu))}static _fillInKbExprKeys(e,t){if(e)for(let i of e.keys())t.add(i)}}let w=s=class extends C{constructor(e,t,i,n,s,o){super(e,i),this._hiddenStates=t,this._commandService=n,this._keybindingService=s,this._contextKeyService=o,this.refresh()}createActionGroups(e){let t=[];for(let i of this._menuGroups){let n,[o,r]=i;for(let t of r)if(this._contextKeyService.contextMatchesRules(t.when)){let i=(0,l.is)(t);i&&this._hiddenStates.setDefaultState(this._id,t.command.id,!!t.isHiddenByDefault);let o=function(e,t,i){let n=(0,l.i1)(t)?t.submenu.id:t.id,s="string"==typeof t.title?t.title:t.title.value,o=(0,c.ih)({id:`hide/${e.id}/${n}`,label:(0,p.kg)(1636,"Hide '{0}'",s),run(){i.updateHidden(e,n,!0)}}),r=(0,c.ih)({id:`toggle/${e.id}/${n}`,label:s,get checked(){return!i.isHidden(e,n)},run(){i.updateHidden(e,n,!!this.checked)}});return{hide:o,toggle:r,get isHidden(){return!r.checked}}}(this._id,i?t.command:t,this._hiddenStates);if(i){let i=S(this._commandService,this._keybindingService,t.command.id,t.when);(n??=[]).push(new l.Xe(t.command,t.alt,e,o,i,this._contextKeyService,this._commandService))}else{let i=new s(t.submenu,this._hiddenStates,this._collectContextKeysForSubmenus,this._commandService,this._keybindingService,this._contextKeyService).createActionGroups(e),r=c.wv.join(...i.map(e=>e[1]));r.length>0&&(n??=[]).push(new l.nI(t,o,r))}}n&&n.length>0&&t.push([o,n])}return t}_sort(e){return e.sort(s._compareMenuItems)}static _compareMenuItems(e,t){let i=e.group,n=t.group;if(i!==n){if(!i)return 1;if(!n||"navigation"===i)return -1;if("navigation"===n)return 1;let e=i.localeCompare(n);if(0!==e)return e}let o=e.order||0,r=t.order||0;return o<r?-1:o>r?1:s._compareTitles((0,l.is)(e)?e.command.title:e.title,(0,l.is)(t)?t.command.title:t.title)}static _compareTitles(e,t){let i="string"==typeof e?e:e.original,n="string"==typeof t?t:t.original;return i.localeCompare(n)}};w=s=f([_(3,h.d),_(4,m.b),_(5,d.fN)],w);let y=class{constructor(e,t,i,n,s,h){this._disposables=new a.Cm,this._menuInfo=new w(e,t,i.emitEventsForSubmenuChanges,n,s,h);let d=new o.uC(()=>{this._menuInfo.refresh(),this._onDidChange.fire({menu:this,isStructuralChange:!0,isEnablementChange:!0,isToggleChange:!0})},i.eventDebounceDelay);this._disposables.add(d),this._disposables.add(l.ZG.onDidChangeMenu(e=>{for(let t of this._menuInfo.allMenuIds)if(e.has(t)){d.schedule();break}}));let c=this._disposables.add(new a.Cm),u=e=>{let t=!1,i=!1,n=!1;for(let s of e)if(t=t||s.isStructuralChange,i=i||s.isEnablementChange,n=n||s.isToggleChange,t&&i&&n)break;return{menu:this,isStructuralChange:t,isEnablementChange:i,isToggleChange:n}},g=()=>{c.add(h.onDidChangeContext(e=>{let t=e.affectsSome(this._menuInfo.structureContextKeys),i=e.affectsSome(this._menuInfo.preconditionContextKeys),n=e.affectsSome(this._menuInfo.toggledContextKeys);(t||i||n)&&this._onDidChange.fire({menu:this,isStructuralChange:t,isEnablementChange:i,isToggleChange:n})})),c.add(t.onDidChange(e=>{this._onDidChange.fire({menu:this,isStructuralChange:!0,isEnablementChange:!1,isToggleChange:!1})}))};this._onDidChange=new r.uI({onWillAddFirstListener:g,onDidRemoveLastListener:c.clear.bind(c),delay:i.eventDebounceDelay,merge:u}),this.onDidChange=this._onDidChange.event}getActions(e){return this._menuInfo.createActionGroups(e)}dispose(){this._disposables.dispose(),this._onDidChange.dispose()}};function S(e,t,i,n,s=!0){return(0,c.ih)({id:`configureKeybinding/${i}`,label:(0,p.kg)(1637,"Configure Keybinding"),enabled:s,run(){let s=!t.lookupKeybinding(i)&&n?n.serialize():void 0;e.executeCommand("workbench.action.openGlobalKeybindings",`@command:${i}`+(s?` +when:${s}`:""))}})}y=f([_(3,h.d),_(4,m.b),_(5,d.fN)],y)},76144:(e,t,i)=>{"use strict";i.d(t,{_:()=>o});var n=i(87899),s=i(82102);class o{constructor(){this._hooks=new s.Cm,this._pointerMoveCallback=null,this._onStopCallback=null}dispose(){this.stopMonitoring(!1),this._hooks.dispose()}stopMonitoring(e,t){if(!this.isMonitoring())return;this._hooks.clear(),this._pointerMoveCallback=null;let i=this._onStopCallback;this._onStopCallback=null,e&&i&&i(t)}isMonitoring(){return!!this._pointerMoveCallback}startMonitoring(e,t,i,o,r){this.isMonitoring()&&this.stopMonitoring(!1),this._pointerMoveCallback=o,this._onStopCallback=r;let a=e;try{e.setPointerCapture(t),this._hooks.add((0,s.s)(()=>{try{e.releasePointerCapture(t)}catch(e){}}))}catch(t){a=n.zk(e)}this._hooks.add(n.ko(a,n.Bx.POINTER_MOVE,e=>{if(e.buttons!==i)return void this.stopMonitoring(!0);e.preventDefault(),this._pointerMoveCallback(e)})),this._hooks.add(n.ko(a,n.Bx.POINTER_UP,e=>this.stopMonitoring(!0)))}}},76946:(e,t,i)=>{"use strict";let n;i.d(t,{jM:()=>h.j,BK:()=>I,XL:()=>r.XL,fL:()=>r.fL,fm:()=>_,Z7:()=>w,Y:()=>b,zL:()=>v,yC:()=>C,lk:()=>K,pl:()=>B,un:()=>S,t:()=>J,a0:()=>D,nb:()=>L,ZX:()=>V,C:()=>x,dQ:()=>k,X2:()=>u,YY:()=>r.YY,Rl:()=>z,y0:()=>R,eP:()=>O,Yd:()=>A,yQ:()=>q,FY:()=>d,Zh:()=>m,OI:()=>W,jv:()=>j,fW:()=>$,lp:()=>Y,fT:()=>X,yi:()=>Z,PO:()=>r.PO,Rn:()=>r.Rn,oJ:()=>T});var s=i(34985),o=i(72307),r=i(59916),a=i(65164),l=i(59114),h=i(69909);function d(e,t,i=h.j.ofCaller()){return new c("string"==typeof e?new s.nA(void 0,e,void 0):new s.nA(e,void 0,void 0),t,o.nx,i)}class c extends a.ZK{get debugName(){return this._debugNameData.getDebugName(this)??"ObservableValue"}constructor(e,t,i,n){super(n),this._debugNameData=e,this._equalityComparator=i,this._value=t,(0,l.tZ)()?.handleObservableUpdated(this,{hadValue:!1,newValue:t,change:void 0,didChange:!0,oldValue:void 0})}get(){return this._value}set(e,t,i){let n;if(!(void 0===i&&this._equalityComparator(this._value,e))){t||(t=n=new r.XL(()=>{},()=>`Setting ${this.debugName}`));try{let n=this._value;for(let s of(this._setValue(e),(0,l.tZ)()?.handleObservableUpdated(this,{oldValue:n,newValue:e,change:i,didChange:!0,hadValue:!0}),this._observers))t.updateObserver(s,this),s.handleChange(this,i)}finally{n&&n.finish()}}}toString(){return`${this.debugName}: ${this._value}`}_setValue(e){this._value=e}debugGetState(){return{value:this._value}}debugSetValue(e){this._value=e}}function u(e,t,i=h.j.ofCaller()){return new g("string"==typeof e?new s.nA(void 0,e,void 0):new s.nA(e,void 0,void 0),t,o.nx,i)}class g extends c{_setValue(e){this._value!==e&&(this._value&&this._value.dispose(),this._value=e)}dispose(){this._value?.dispose()}}class p extends a.ZK{get debugName(){return this._debugNameData.getDebugName(this)??"LazyObservableValue"}constructor(e,t,i,n){super(n),this._debugNameData=e,this._equalityComparator=i,this._isUpToDate=!0,this._deltas=[],this._updateCounter=0,this._value=t}get(){return this._update(),this._value}_update(){if(!this._isUpToDate)if(this._isUpToDate=!0,this._deltas.length>0){for(let e of this._deltas)for(let t of((0,l.tZ)()?.handleObservableUpdated(this,{change:e,didChange:!0,oldValue:"(unknown)",newValue:this._value,hadValue:!0}),this._observers))t.handleChange(this,e);this._deltas.length=0}else for(let e of((0,l.tZ)()?.handleObservableUpdated(this,{change:void 0,didChange:!0,oldValue:"(unknown)",newValue:this._value,hadValue:!0}),this._observers))e.handleChange(this,void 0)}_beginUpdate(){if(this._updateCounter++,1===this._updateCounter)for(let e of this._observers)e.beginUpdate(this)}_endUpdate(){if(this._updateCounter--,0===this._updateCounter)for(let e of(this._update(),[...this._observers]))e.endUpdate(this)}addObserver(e){let t=!this._observers.has(e)&&this._updateCounter>0;super.addObserver(e),t&&e.beginUpdate(this)}removeObserver(e){let t=this._observers.has(e)&&this._updateCounter>0;super.removeObserver(e),t&&e.endUpdate(this)}set(e,t,i){let n;if(!(void 0===i&&this._equalityComparator(this._value,e))){t||(t=n=new r.XL(()=>{},()=>`Setting ${this.debugName}`));try{if(this._isUpToDate=!1,this._setValue(e),void 0!==i&&this._deltas.push(i),t.updateObserver({beginUpdate:()=>this._beginUpdate(),endUpdate:()=>this._endUpdate(),handleChange:(e,t)=>{},handlePossibleChange:e=>{}},this),this._updateCounter>1)for(let e of this._observers)e.handlePossibleChange(this)}finally{n&&n.finish()}}}toString(){return`${this.debugName}: ${this._value}`}_setValue(e){this._value=e}}function m(e,t,i=h.j.ofCaller()){return e.lazy?new p(new s.nA(e.owner,e.debugName,void 0),t,e.equalsFn??o.nx,i):new c(new s.nA(e.owner,e.debugName,void 0),t,e.equalsFn??o.nx,i)}class f{get debugName(){return this._debugNameData.getDebugName(this)??"(anonymous)"}constructor(e,t,i,n){this._debugNameData=e,this._runFn=t,this._changeTracker=i,this._state=2,this._updateCount=0,this._disposed=!1,this._dependencies=new Set,this._dependenciesToBeRemoved=new Set,this._isRunning=!1,this._store=void 0,this._delayedStore=void 0,this._changeSummary=this._changeTracker?.createChangeSummary(void 0),(0,l.tZ)()?.handleAutorunCreated(this,n),this._run(),(0,o.Ay)(this)}dispose(){if(!this._disposed){for(let e of(this._disposed=!0,this._dependencies))e.removeObserver(this);this._dependencies.clear(),void 0!==this._store&&this._store.dispose(),void 0!==this._delayedStore&&this._delayedStore.dispose(),(0,l.tZ)()?.handleAutorunDisposed(this),(0,o.VD)(this)}}_run(){let e=this._dependenciesToBeRemoved;this._dependenciesToBeRemoved=this._dependencies,this._dependencies=e,this._state=3;try{if(!this._disposed){(0,l.tZ)()?.handleAutorunStarted(this);let e=this._changeSummary,t=this._delayedStore;void 0!==t&&(this._delayedStore=void 0);try{this._isRunning=!0,this._changeTracker&&(this._changeTracker.beforeUpdate?.(this,e),this._changeSummary=this._changeTracker.createChangeSummary(e)),void 0!==this._store&&(this._store.dispose(),this._store=void 0),this._runFn(this,e)}catch(e){(0,o.y4)(e)}finally{this._isRunning=!1,void 0!==t&&t.dispose()}}}finally{for(let e of(this._disposed||(0,l.tZ)()?.handleAutorunFinished(this),this._dependenciesToBeRemoved))e.removeObserver(this);this._dependenciesToBeRemoved.clear()}}toString(){return`Autorun<${this.debugName}>`}beginUpdate(e){3===this._state&&(this._state=1),this._updateCount++}endUpdate(e){try{if(1===this._updateCount)do{if(1===this._state){for(let e of(this._state=3,this._dependencies))if(e.reportChanges(),2===this._state)break}3!==this._state&&this._run()}while(3!==this._state)}finally{this._updateCount--}(0,o.Ft)(()=>this._updateCount>=0)}handlePossibleChange(e){3===this._state&&this._isDependency(e)&&(this._state=1)}handleChange(e,t){if(this._isDependency(e)){(0,l.tZ)()?.handleAutorunDependencyChanged(this,e,t);try{(!this._changeTracker||this._changeTracker.handleChange({changedObservable:e,change:t,didChange:t=>t===e},this._changeSummary))&&(this._state=2)}catch(e){(0,o.y4)(e)}}}_isDependency(e){return this._dependencies.has(e)&&!this._dependenciesToBeRemoved.has(e)}_ensureNoRunning(){if(!this._isRunning)throw new o.D7("The reader object cannot be used outside its compute function!")}readObservable(e){if(this._ensureNoRunning(),this._disposed)return e.get();e.addObserver(this);let t=e.get();return this._dependencies.add(e),this._dependenciesToBeRemoved.delete(e),t}get store(){if(this._ensureNoRunning(),this._disposed)throw new o.D7("Cannot access store after dispose");return void 0===this._store&&(this._store=new o.Cm),this._store}debugGetState(){return{isRunning:this._isRunning,updateCount:this._updateCount,dependencies:this._dependencies,state:this._state,stateStr:function(e){switch(e){case 1:return"dependenciesMightHaveChanged";case 2:return"stale";case 3:return"upToDate";default:return"<unknown>"}}(this._state)}}debugRerun(){this._isRunning?this._state=2:this._run()}}function _(e,t=h.j.ofCaller()){return new f(new s.nA(void 0,void 0,e),e,void 0,t)}function v(e,t,i=h.j.ofCaller()){return new f(new s.nA(e.owner,e.debugName,e.debugReferenceFn??t),t,void 0,i)}function b(e,t,i=h.j.ofCaller()){return new f(new s.nA(e.owner,e.debugName,e.debugReferenceFn??t),t,e.changeTracker,i)}function C(e){let t=new o.Cm,i=v({owner:void 0,debugName:void 0,debugReferenceFn:e},i=>{t.clear(),e(i,t)});return(0,o.s)(()=>{i.dispose(),t.dispose()})}function w(e,t){let i;return v({debugReferenceFn:t},n=>{let s=e.read(n),o=i;i=s,t({lastValue:o,newValue:s})})}var y=i(14467);function S(e,t,i=h.j.ofCaller()){return void 0!==t?new y.w(new s.nA(e,void 0,t),t,void 0,void 0,o.nx,i):new y.w(new s.nA(void 0,void 0,e),e,void 0,void 0,o.nx,i)}function k(e,t,i,n=h.j.ofCaller()){return new y.P(new s.nA(e,void 0,t),t,void 0,void 0,o.nx,i,n)}function x(e,t,i=h.j.ofCaller()){return new y.w(new s.nA(e.owner,e.debugName,e.debugReferenceFn),t,void 0,e.onLastObserverRemoved,e.equalsFn??o.nx,i)}function L(e,t,i=h.j.ofCaller()){return new y.w(new s.nA(e.owner,e.debugName,void 0),t,e.changeTracker,void 0,e.equalityComparer??o.nx,i)}function D(e,t,i=h.j.ofCaller()){let n,r,a;return void 0===t?(n=e,r=void 0):(r=e,n=t),new y.w(new s.nA(r,void 0,n),e=>{a?a.clear():a=new o.Cm;let t=n(e);return t&&a.add(t),t},void 0,()=>{a&&(a.dispose(),a=void 0)},o.nx,i)}(0,a.N2)(x);class I{constructor(e){this._value=d(this,void 0),this.promiseResult=this._value,this.promise=e.then(e=>((0,r.Rn)(t=>{this._value.set(new N(e,void 0),t)}),e),e=>{throw(0,r.Rn)(t=>{this._value.set(new N(void 0,e),t)}),e})}}class N{constructor(e,t){this.data=e,this.error=t}getDataOrThrow(){if(this.error)throw this.error;return this.data}}var E=i(6033),M=i(13445);function T(e,t,i,n){return t||(t=e=>null!=e),new Promise((s,o)=>{let r=!0,a=!1,l=e.map(e=>({isFinished:t(e),error:!!i&&i(e),state:e})),h=_(e=>{let{isFinished:t,error:i,state:n}=l.read(e);(t||i)&&(r?a=!0:h.dispose(),i?o(!0===i?n:i):s(n))});if(n){let e=n.onCancellationRequested(()=>{h.dispose(),e.dispose(),o(new E.AL)});if(n.isCancellationRequested){h.dispose(),e.dispose(),o(new E.AL);return}}r=!1,a&&h.dispose()})}function R(...e){let t,i,n,r;return 2===e.length?[i,n]=e:[t,i,n,r]=e,new P(new s.nA(t,void 0,n),i,n,()=>P.globalTransaction,o.nx,r??h.j.ofCaller())}function O(e,t,i,n=h.j.ofCaller()){return new P(new s.nA(e.owner,e.debugName,e.debugReferenceFn??i),t,i,()=>P.globalTransaction,e.equalsFn??o.nx,n)}class P extends a.ZK{constructor(e,t,i,n,s,o){super(o),this._debugNameData=e,this.event=t,this._getValue=i,this._getTransaction=n,this._equalityComparator=s,this._hasValue=!1,this.handleEvent=e=>{let t=this._getValue(e),i=this._value,n=!this._hasValue||!this._equalityComparator(i,t),s=!1;n&&(this._value=t,this._hasValue&&(s=!0,(0,r.PO)(this._getTransaction(),e=>{for(let s of((0,l.tZ)()?.handleObservableUpdated(this,{oldValue:i,newValue:t,change:void 0,didChange:n,hadValue:this._hasValue}),this._observers))e.updateObserver(s,this),s.handleChange(this,void 0)},()=>{let e=this.getDebugName();return"Event fired"+(e?`: ${e}`:"")})),this._hasValue=!0),s||(0,l.tZ)()?.handleObservableUpdated(this,{oldValue:i,newValue:t,change:void 0,didChange:n,hadValue:this._hasValue})}}getDebugName(){return this._debugNameData.getDebugName(this)}get debugName(){let e=this.getDebugName();return"From Event"+(e?`: ${e}`:"")}onFirstObserverAdded(){this._subscription=this.event(this.handleEvent)}onLastObserverRemoved(){this._subscription.dispose(),this._subscription=void 0,this._hasValue=!1,this._value=void 0}get(){return this._subscription?(this._hasValue||this.handleEvent(void 0),this._value):this._getValue(void 0)}debugSetValue(e){this._value=e}debugGetState(){return{value:this._value,hasValue:this._hasValue}}}function A(e,t=h.j.ofCaller()){return"string"==typeof e?new F(e,void 0,t):new F(void 0,e,t)}!function(e){e.Observer=P,e.batchEventsGlobally=function(e,t){let i=!1;void 0===P.globalTransaction&&(P.globalTransaction=e,i=!0);try{t()}finally{i&&(P.globalTransaction=void 0)}}}(R||(R={}));class F extends a.ZK{get debugName(){return new s.nA(this._owner,this._debugName,void 0).getDebugName(this)??"Observable Signal"}toString(){return this.debugName}constructor(e,t,i){super(i),this._debugName=e,this._owner=t}trigger(e,t){if(!e)return void(0,r.Rn)(e=>{this.trigger(e,t)},()=>`Trigger signal ${this.debugName}`);for(let i of this._observers)e.updateObserver(i,this),i.handleChange(this,t)}get(){}}function B(e,t){let i,n,s=!1;return R(o=>{let r=_(r=>{let a=e.read(r);s?(i&&clearTimeout(i),i=setTimeout(()=>{n=a,o()},t)):(s=!0,n=a)});return{dispose(){r.dispose(),s=!1,n=void 0}}},()=>s?n:e.get())}function W(e,t){let i=new H(!0,t);e.addObserver(i);try{i.beginUpdate(e)}finally{i.endUpdate(e)}return(0,o.s)(()=>{e.removeObserver(i)})}(0,a.FB)(function(e){let t=new H(!1,void 0);return e.addObserver(t),(0,o.s)(()=>{e.removeObserver(t)})}),(0,a.Bm)(W);class H{constructor(e,t){this._forceRecompute=e,this._handleValue=t,this._counter=0}beginUpdate(e){this._counter++}endUpdate(e){1===this._counter&&this._forceRecompute&&(this._handleValue?this._handleValue(e.get()):e.reportChanges()),this._counter--}handlePossibleChange(e){}handleChange(e,t){}}function V(e,t){let i;return x({owner:e,debugReferenceFn:t},e=>i=t(e,i))}function z(e,t,i,n){let s=new U(i,n);return x({debugReferenceFn:i,owner:e,onLastObserverRemoved:()=>{s.dispose(),s=new U(i)}},e=>(s.setItems(t.read(e)),s.getItems()))}class U{constructor(e,t){this._map=e,this._keySelector=t,this._cache=new Map,this._items=[]}dispose(){this._cache.forEach(e=>e.store.dispose()),this._cache.clear()}setItems(e){let t=[],i=new Set(this._cache.keys());for(let n of e){let e=this._keySelector?this._keySelector(n):n,s=this._cache.get(e);if(s)i.delete(e);else{let t=new o.Cm;s={out:this._map(n,t),store:t},this._cache.set(e,s)}t.push(s.out)}for(let e of i)this._cache.get(e).store.dispose(),this._cache.delete(e);this._items=t}getItems(){return this._items}}function j(e){return{createChangeSummary:e=>({changes:[]}),handleChange(t,i){for(let n in e)t.didChange(e[n])&&i.changes.push({key:n,change:t.change});return!0},beforeUpdate(t,i){for(let n in e){if("changes"===n)throw new o.D7('property name "changes" is reserved for change tracking');i[n]=e[n].read(t)}}}}function $(e){let t;return{createChangeSummary:e=>({changes:[]}),handleChange(i,n){for(let s in t||(t=e()),t)i.didChange(t[s])&&n.changes.push({key:s,change:i.change});return!0},beforeUpdate(i,n){for(let s in t||(t=e()),t){if("changes"===s)throw new o.D7('property name "changes" is reserved for change tracking');n[s]=t[s].read(i)}}}}function K(e){return new G(e)}class G extends a.zV{constructor(e){super(),this.value=e}get debugName(){return this.toString()}get(){return this.value}addObserver(e){}removeObserver(e){}toString(){return`Const: ${this.value}`}}function q(e,t,i=h.j.ofCaller()){return new Q("string"==typeof e?e:new s.nA(e,void 0,void 0),t,i)}class Q extends a.ZK{constructor(e,t,i){super(i),this.event=t,this.handleEvent=()=>{(0,r.Rn)(e=>{for(let t of this._observers)e.updateObserver(t,this),t.handleChange(this,void 0)},()=>this.debugName)},this.debugName="string"==typeof e?e:e.getDebugName(this)??"Observable Signal From Event"}onFirstObserverAdded(){this.subscription=this.event(this.handleEvent)}onLastObserverRemoved(){this.subscription.dispose(),this.subscription=void 0}get(){}}function Y(e,t){let i,n=!0;return function(e,t){let i=new o.Cm,n=b({owner:e.owner,debugName:e.debugName,debugReferenceFn:e.debugReferenceFn??t,changeTracker:e.changeTracker},(e,n)=>{i.clear(),t(e,n,i)});return(0,o.s)(()=>{n.dispose(),i.dispose()})}({changeTracker:{createChangeSummary:()=>({deltas:[],didChange:!1}),handleChange:(t,i)=>{if(t.didChange(e)){let e=t.change;void 0!==e&&i.deltas.push(e),i.didChange=!0}return!0}}},(s,o)=>{let r=e.read(s),a=i;o.didChange&&(i=r,t(r,a,o.deltas)),n&&(n=!1,i=r)})}function Z(e,t){let i=new o.Cm,n=Y(e,(e,n,s)=>{i.clear(),t(e,n,s,i)});return{dispose(){n.dispose(),i.dispose()}}}function X(e,t){return Z(e,(e,i,n,s)=>{t(e,i,n,(0,M.bs)(s))})}function J(e,t){return V(e,(e,i)=>i??t(e))}class ee{constructor(){this.indentation=0,this.changedObservablesSets=new WeakMap}addFilteredObj(e){this._filteredObjects||(this._filteredObjects=new Set),this._filteredObjects.add(e)}_isIncluded(e){return this._filteredObjects?.has(e)??!0}textToConsoleArgs(e){return function(e){let t=[],i=[],n="";!function e(s){if("length"in s)for(let t of s)t&&e(t);else"text"in s?(n+=`%c${s.text}`,t.push(s.style),s.data&&i.push(...s.data)):"data"in s&&i.push(...s.data)}(e);let s=[n,...t];return s.push(...i),s}([et(function(e,t){let i="";for(let e=1;e<=t;e++)i+="| ";return i}("| ",this.indentation)),e])}formatInfo(e){return e.hadValue?e.didChange?[et(" "),en(es(e.oldValue,70),{color:"red",strikeThrough:!0}),et(" "),en(es(e.newValue,60),{color:"green"})]:[et(" (unchanged)")]:[et(" "),en(es(e.newValue,60),{color:"green"}),et(" (initial)")]}handleObservableCreated(e){e instanceof y.w&&this.changedObservablesSets.set(e,new Set)}handleOnListenerCountChanged(e,t){}handleObservableUpdated(e,t){if(this._isIncluded(e)){if(e instanceof y.w)return void this._handleDerivedRecomputed(e,t);console.log(...this.textToConsoleArgs([ei("observable value changed"),en(e.debugName,{color:"BlueViolet"}),...this.formatInfo(t)]))}}formatChanges(e){if(0!==e.size)return en(" (changed deps: "+[...e].map(e=>e.debugName).join(", ")+")",{color:"gray"})}handleDerivedDependencyChanged(e,t,i){this._isIncluded(e)&&this.changedObservablesSets.get(e)?.add(t)}_handleDerivedRecomputed(e,t){if(!this._isIncluded(e))return;let i=this.changedObservablesSets.get(e);i&&(console.log(...this.textToConsoleArgs([ei("derived recomputed"),en(e.debugName,{color:"BlueViolet"}),...this.formatInfo(t),this.formatChanges(i),{data:[{fn:e._debugNameData.referenceFn??e._computeFn}]}])),i.clear())}handleDerivedCleared(e){this._isIncluded(e)&&console.log(...this.textToConsoleArgs([ei("derived cleared"),en(e.debugName,{color:"BlueViolet"})]))}handleAutorunCreated(e){this._isIncluded(e)&&this.changedObservablesSets.set(e,new Set)}handleAutorunDisposed(e){}handleAutorunDependencyChanged(e,t,i){this._isIncluded(e)&&this.changedObservablesSets.get(e).add(t)}handleAutorunStarted(e){let t=this.changedObservablesSets.get(e);t&&(this._isIncluded(e)&&console.log(...this.textToConsoleArgs([ei("autorun"),en(e.debugName,{color:"BlueViolet"}),this.formatChanges(t),{data:[{fn:e._debugNameData.referenceFn??e._runFn}]}])),t.clear(),this.indentation++)}handleAutorunFinished(e){this.indentation--}handleBeginTransaction(e){let t=e.getDebugName();void 0===t&&(t=""),this._isIncluded(e)&&console.log(...this.textToConsoleArgs([ei("transaction"),en(t,{color:"BlueViolet"}),{data:[{fn:e._fn}]}])),this.indentation++}handleEndTransaction(){this.indentation--}}function et(e){return en(e,{color:"black"})}function ei(e){return en(function(e,t){for(;e.length<10;)e+=" ";return e}(`${e}: `,10),{color:"black",bold:!0})}function en(e,t={color:"black"}){let i={color:t.color};return t.strikeThrough&&(i["text-decoration"]="line-through"),t.bold&&(i["font-weight"]="bold"),{text:e,style:Object.entries(i).reduce((e,[t,i])=>`${e}${t}:${i};`,"")}}function es(e,t){switch(typeof e){case"number":default:return""+e;case"string":if(e.length+2<=t)return`"${e}"`;return`"${e.substr(0,t-7)}"+...`;case"boolean":return e?"true":"false";case"undefined":return"undefined";case"object":if(null===e)return"null";if(Array.isArray(e)){var i=e,n=t;let s="[ ",o=!0;for(let e of i){if(o||(s+=", "),s.length-5>n){s+="...";break}o=!1,s+=`${es(e,n-s.length)}`}return s+" ]"}var o=e,r=t;if("function"==typeof o.toString&&o.toString!==Object.prototype.toString){let e=o.toString();return e.length<=r?e:e.substring(0,r-3)+"..."}let a=(0,s.uB)(o),l=a?a+"(":"{ ",h=!0;for(let[e,t]of Object.entries(o)){if(h||(l+=", "),l.length-5>r){l+="...";break}h=!1,l+=`${e}: ${es(t,r-l.length)}`}return l+(a?")":" }");case"symbol":return e.toString();case"function":return`[[Function${e.name?" "+e.name:""}]]`}}class eo{static createClient(e,t){return new eo(e,t)}constructor(e,t){this._channelFactory=e,this._getHandler=t,this._channel=this._channelFactory({handleNotification:e=>{let t=this._getHandler().notifications[e[0]];if(!t)throw Error(`Unknown notification "${e[0]}"!`);t(...e[1])},handleRequest:e=>{try{let t=this._getHandler().requests[e[0]](...e[1]);return{type:"result",value:t}}catch(e){return{type:"error",value:e}}}});let i=new Proxy({},{get:(e,t)=>async(...e)=>{let i=await this._channel.sendRequest([t,e]);if("error"!==i.type)return i.value;throw i.value}}),n=new Proxy({},{get:(e,t)=>(...e)=>{this._channel.sendNotification([t,e])}});this.api={notifications:n,requests:i}}}class er{constructor(){this._timeout=void 0}throttle(e,t){void 0===this._timeout&&(this._timeout=setTimeout(()=>{this._timeout=void 0,e()},t))}dispose(){void 0!==this._timeout&&clearTimeout(this._timeout)}}var ea=i(95751);class el{static{this._instance=void 0}static getInstance(){return void 0===el._instance&&(el._instance=new el),el._instance}getTransactionState(){let e=[],t=[...this._activeTransactions];if(0===t.length)return;let i=t.flatMap(e=>e.debugGetUpdatingObservers()??[]).map(e=>e.observer),n=new Set;for(;i.length>0;){let t=i.shift();if(n.has(t))continue;n.add(t);let s=this._getInfo(t,e=>{n.has(e)||i.push(e)});s&&e.push(s)}return{names:t.map(e=>e.getDebugName()??"tx"),affected:e}}_getObservableInfo(e){let t=this._instanceInfos.get(e);return t||void(0,E.dz)(new E.D7("No info found"))}_getAutorunInfo(e){let t=this._instanceInfos.get(e);return t||void(0,E.dz)(new E.D7("No info found"))}_getInfo(e,t){if(e instanceof y.w){for(let i of[...e.debugGetObservers()])t(i);let i=this._getObservableInfo(e);if(!i)return;let n=e.debugGetState(),s={name:e.debugName,instanceId:i.instanceId,updateCount:n.updateCount},o=[...i.changedObservables].map(e=>this._instanceInfos.get(e)?.instanceId).filter(ea.O9);if(n.isComputing)return{...s,type:"observable/derived",state:"updating",changedDependencies:o,initialComputation:!1};switch(n.state){case 0:return{...s,type:"observable/derived",state:"noValue"};case 3:return{...s,type:"observable/derived",state:"upToDate"};case 2:return{...s,type:"observable/derived",state:"stale",changedDependencies:o};case 1:return{...s,type:"observable/derived",state:"possiblyStale"}}}else if(e instanceof f){let t=this._getAutorunInfo(e);if(!t)return;let i={name:e.debugName,instanceId:t.instanceId,updateCount:t.updateCount},n=[...t.changedObservables].map(e=>this._instanceInfos.get(e).instanceId);if(e.debugGetState().isRunning)return{...i,type:"autorun",state:"updating",changedDependencies:n};switch(e.debugGetState().state){case 3:return{...i,type:"autorun",state:"upToDate"};case 2:return{...i,type:"autorun",state:"stale",changedDependencies:n};case 1:return{...i,type:"autorun",state:"possiblyStale"}}}}_formatObservable(e){let t=this._getObservableInfo(e);if(t)return{name:e.debugName,instanceId:t.instanceId}}_formatObserver(e){if(e instanceof y.w)return{name:e.toString(),instanceId:this._getObservableInfo(e)?.instanceId};let t=this._getAutorunInfo(e);if(t)return{name:e.toString(),instanceId:t.instanceId}}constructor(){this._declarationId=0,this._instanceId=0,this._declarations=new Map,this._instanceInfos=new WeakMap,this._aliveInstances=new Map,this._activeTransactions=new Set,this._channel=function(e,t){var i;let n,s,o,r=globalThis,a=[],{channel:l,handler:h}=(i={sendNotification:e=>{n?n.sendNotification(e):a.push(e)}},{channel:e=>(o=e,{sendNotification:e=>{i.sendNotification(e)},sendRequest:e=>{throw Error("not supported")}}),handler:{handleRequest:e=>"notification"===e.type?o?.handleNotification(e.data):o?.handleRequest(e.data)}});return(r.$$debugValueEditor_debugChannels??(r.$$debugValueEditor_debugChannels={}))[e]=e=>{for(let i of(s=t(),n=e,a))e.sendNotification(i);return a=[],h},eo.createClient(l,()=>{if(!s)throw Error("Not supported");return s})}("observableDevTools",()=>({notifications:{setDeclarationIdFilter:e=>{},logObservableValue:e=>{console.log("logObservableValue",e)},flushUpdates:()=>{this._flushUpdates()},resetUpdates:()=>{this._pendingChanges=null,this._channel.api.notifications.handleChange(this._fullState,!0)}},requests:{getDeclarations:()=>{let e={};for(let t of this._declarations.values())e[t.id]=t;return{decls:e}},getSummarizedInstances:()=>null,getObservableValueInfo:e=>({observers:[...this._aliveInstances.get(e).debugGetObservers()].map(e=>this._formatObserver(e)).filter(ea.O9)}),getDerivedInfo:e=>{let t=this._aliveInstances.get(e);return{dependencies:[...t.debugGetState().dependencies].map(e=>this._formatObservable(e)).filter(ea.O9),observers:[...t.debugGetObservers()].map(e=>this._formatObserver(e)).filter(ea.O9)}},getAutorunInfo:e=>({dependencies:[...this._aliveInstances.get(e).debugGetState().dependencies].map(e=>this._formatObservable(e)).filter(ea.O9)}),getTransactionState:()=>this.getTransactionState(),setValue:(e,t)=>{let i=this._aliveInstances.get(e);if(i instanceof y.w)i.debugSetValue(t);else if(i instanceof c)i.debugSetValue(t);else if(i instanceof P)i.debugSetValue(t);else throw new E.D7("Observable is not supported");let n=[...i.debugGetObservers()];for(let e of n)e.beginUpdate(i);for(let e of n)e.handleChange(i,void 0);for(let e of n)e.endUpdate(i)},getValue:e=>{let t=this._aliveInstances.get(e);return t instanceof y.w||t instanceof c?es(t.debugGetState().value,200):void 0},logValue:e=>{let t=this._aliveInstances.get(e);if(t&&"get"in t)console.log("Logged Value:",t.get());else throw new E.D7("Observable is not supported")},rerun:e=>{let t=this._aliveInstances.get(e);if(t instanceof y.w)t.debugRecompute();else if(t instanceof f)t.debugRerun();else throw new E.D7("Observable is not supported")}}})),this._pendingChanges=null,this._changeThrottler=new er,this._fullState={},this._flushUpdates=()=>{null!==this._pendingChanges&&(this._channel.api.notifications.handleChange(this._pendingChanges,!1),this._pendingChanges=null)},h.j.enable()}_handleChange(e){!function e(t,i){for(let n in i)null===i[n]?delete t[n]:t[n]&&"object"==typeof t[n]&&i[n]&&"object"==typeof i[n]?e(t[n],i[n]):t[n]=i[n]}(this._fullState,e),null===this._pendingChanges?this._pendingChanges=e:function e(t,i){for(let n in i)t[n]&&"object"==typeof t[n]&&i[n]&&"object"==typeof i[n]?e(t[n],i[n]):t[n]=i[n]}(this._pendingChanges,e),this._changeThrottler.throttle(this._flushUpdates,10)}_getDeclarationId(e,t){if(!t)return -1;let i=this._declarations.get(t.id);return void 0===i&&(i={id:this._declarationId++,type:e,url:t.fileName,line:t.line,column:t.column},this._declarations.set(t.id,i),this._handleChange({decls:{[i.id]:i}})),i.id}handleObservableCreated(e,t){let i={declarationId:this._getDeclarationId("observable/value",t),instanceId:this._instanceId++,listenerCount:0,lastValue:void 0,updateCount:0,changedObservables:new Set};this._instanceInfos.set(e,i)}handleOnListenerCountChanged(e,t){let i=this._getObservableInfo(e);if(i){if(0===i.listenerCount&&t>0){let t=e instanceof y.w?"observable/derived":"observable/value";this._aliveInstances.set(i.instanceId,e),this._handleChange({instances:{[i.instanceId]:{instanceId:i.instanceId,declarationId:i.declarationId,formattedValue:i.lastValue,type:t,name:e.debugName}}})}else i.listenerCount>0&&0===t&&(this._handleChange({instances:{[i.instanceId]:null}}),this._aliveInstances.delete(i.instanceId));i.listenerCount=t}}handleObservableUpdated(e,t){if(e instanceof y.w)return void this._handleDerivedRecomputed(e,t);let i=this._getObservableInfo(e);i&&t.didChange&&(i.lastValue=es(t.newValue,30),i.listenerCount>0&&this._handleChange({instances:{[i.instanceId]:{formattedValue:i.lastValue}}}))}handleAutorunCreated(e,t){let i={declarationId:this._getDeclarationId("autorun",t),instanceId:this._instanceId++,updateCount:0,changedObservables:new Set};this._instanceInfos.set(e,i),this._aliveInstances.set(i.instanceId,e),i&&this._handleChange({instances:{[i.instanceId]:{instanceId:i.instanceId,declarationId:i.declarationId,runCount:0,type:"autorun",name:e.debugName}}})}handleAutorunDisposed(e){let t=this._getAutorunInfo(e);t&&(this._handleChange({instances:{[t.instanceId]:null}}),this._instanceInfos.delete(e),this._aliveInstances.delete(t.instanceId))}handleAutorunDependencyChanged(e,t,i){let n=this._getAutorunInfo(e);n&&n.changedObservables.add(t)}handleAutorunStarted(e){}handleAutorunFinished(e){let t=this._getAutorunInfo(e);t&&(t.changedObservables.clear(),t.updateCount++,this._handleChange({instances:{[t.instanceId]:{runCount:t.updateCount}}}))}handleDerivedDependencyChanged(e,t,i){let n=this._getObservableInfo(e);n&&n.changedObservables.add(t)}_handleDerivedRecomputed(e,t){let i=this._getObservableInfo(e);if(!i)return;let n=es(t.newValue,30);i.updateCount++,i.changedObservables.clear(),i.lastValue=n,i.listenerCount>0&&this._handleChange({instances:{[i.instanceId]:{formattedValue:n,recomputationCount:i.updateCount}}})}handleDerivedCleared(e){let t=this._getObservableInfo(e);t&&(t.lastValue=void 0,t.changedObservables.clear(),t.listenerCount>0&&this._handleChange({instances:{[t.instanceId]:{formattedValue:void 0}}}))}handleBeginTransaction(e){this._activeTransactions.add(e)}handleEndTransaction(e){this._activeTransactions.delete(e)}}var eh=i(4523);class ed{static from(e,t){if(e instanceof f){let i=e.debugGetState();return new ed(e,t(e.debugName),"autorun",void 0,i.stateStr,Array.from(i.dependencies).map(e=>ed.from(e,t)||ed.unknown(e)))}if(e instanceof y.w){let i=e.debugGetState();return new ed(e,t(e.debugName),"derived",i.value,i.stateStr,Array.from(i.dependencies).map(e=>ed.from(e,t)||ed.unknown(e)))}if(e instanceof c){let i=e.debugGetState();return new ed(e,t(e.debugName),"observableValue",i.value,"upToDate",[])}if(e instanceof P){let i=e.debugGetState();return new ed(e,t(e.debugName),"fromEvent",i.value,i.hasValue?"upToDate":"initial",[])}}static unknown(e){return new ed(e,"(unknown)","unknown",void 0,"unknown",[])}constructor(e,t,i,n,s,o){this.sourceObj=e,this.name=t,this.type=i,this.value=n,this.state=s,this.dependencies=o}}(0,a.u5)(function(e,t){let i=t?.debugNamePostProcessor??(e=>e),n=ed.from(e,i);return n?(function e(t,i,n){let s=" ".repeat(i),o=[];if(n.has(t.sourceObj))return o.push(`${s}* ${t.type} ${t.name} (already listed)`),o.join("\n");if(n.add(t.sourceObj),o.push(`${s}* ${t.type} ${t.name}:`),o.push(`${s} value: ${es(t.value,50)}`),o.push(`${s} state: ${t.state}`),t.dependencies.length>0)for(let r of(o.push(`${s} dependencies:`),t.dependencies))o.push(e(r,i+1,n));return o.join("\n")})(n,0,new Set).trim():""}),(0,l.YQ)(function(e){n||(n=new ee,(0,l.EJ)(n)),n.addFilteredObj(e)}),eh._K&&eh._K.VSCODE_DEV_DEBUG_OBSERVABLES&&(0,l.EJ)(el.getInstance())},77133:(e,t,i)=>{"use strict";i.d(t,{N:()=>w});var n,s,o=i(87899),r=i(42016),a=i(55354),l=i(49832),h=i(82102),d=i(76946),c=i(27281),u=i(95751),g=i(15957),p=i(22263),m=i(788),f=i(72553),_=i(23047),v=i(993),b=i(25108),C=i(72150);let w=class extends h.jG{static{s=this}static{this._breadcrumbsSourceFactory=(0,d.FY)(s,()=>({dispose(){},getBreadcrumbItems:(e,t)=>[]}))}static setBreadcrumbsSourceFactory(e){this._breadcrumbsSourceFactory.set(e,void 0)}get isUpdatingHiddenAreas(){return this._isUpdatingHiddenAreas}constructor(e,t,i,n){super(),this._editors=e,this._diffModel=t,this._options=i,this._instantiationService=n,this._modifiedOutlineSource=(0,d.a0)(this,e=>{let t=this._editors.modifiedModel.read(e),i=s._breadcrumbsSourceFactory.read(e);return t&&i?i(t,this._instantiationService):void 0}),this._isUpdatingHiddenAreas=!1,this._register(this._editors.original.onDidChangeCursorPosition(e=>{if(1===e.reason)return;let t=this._diffModel.get();(0,d.Rn)(e=>{for(let i of this._editors.original.getSelections()||[])t?.ensureOriginalLineIsVisible(i.getStartPosition().lineNumber,0,e),t?.ensureOriginalLineIsVisible(i.getEndPosition().lineNumber,0,e)})})),this._register(this._editors.modified.onDidChangeCursorPosition(e=>{if(1===e.reason)return;let t=this._diffModel.get();(0,d.Rn)(e=>{for(let i of this._editors.modified.getSelections()||[])t?.ensureModifiedLineIsVisible(i.getStartPosition().lineNumber,0,e),t?.ensureModifiedLineIsVisible(i.getEndPosition().lineNumber,0,e)})}));let o=this._diffModel.map((e,t)=>{let i=e?.unchangedRegions.read(t)??[];return 1===i.length&&1===i[0].modifiedLineNumber&&i[0].lineCount===this._editors.modifiedModel.read(t)?.getLineCount()?[]:i});this.viewZones=(0,d.un)(this,e=>{let t=this._modifiedOutlineSource.read(e);if(!t)return{origViewZones:[],modViewZones:[]};let i=[],n=[],s=this._options.renderSideBySide.read(e),r=this._options.compactMode.read(e),a=o.read(e);for(let o=0;o<a.length;o++){let l=a[o];if(!l.shouldHideControls(e)&&(!r||0!==o&&o!==a.length-1))if(r){{let t=(0,d.un)(this,e=>l.getHiddenOriginalRange(e).startLineNumber-1),n=new C.D1(t,12);i.push(n),e.store.add(new y(this._editors.original,n,l,!s))}{let t=(0,d.un)(this,e=>l.getHiddenModifiedRange(e).startLineNumber-1),i=new C.D1(t,12);n.push(i),e.store.add(new y(this._editors.modified,i,l))}}else{{let n=(0,d.un)(this,e=>l.getHiddenOriginalRange(e).startLineNumber-1),o=new C.D1(n,24);i.push(o),e.store.add(new S(this._editors.original,o,l,l.originalUnchangedRange,!s,t,e=>this._diffModel.get().ensureModifiedLineIsVisible(e,2,void 0),this._options))}{let i=(0,d.un)(this,e=>l.getHiddenModifiedRange(e).startLineNumber-1),s=new C.D1(i,24);n.push(s),e.store.add(new S(this._editors.modified,s,l,l.modifiedUnchangedRange,!1,t,e=>this._diffModel.get().ensureModifiedLineIsVisible(e,2,void 0),this._options))}}}return{origViewZones:i,modViewZones:n}});let r={description:"unchanged lines",className:"diff-unchanged-lines",isWholeLine:!0},h={description:"Fold Unchanged",glyphMarginHoverMessage:new l.Bc(void 0,{isTrusted:!0,supportThemeIcons:!0}).appendMarkdown((0,g.kg)(121,"Fold Unchanged Region")),glyphMarginClassName:"fold-unchanged "+c.L.asClassName(a.W.fold),zIndex:10001};this._register((0,C.pY)(this._editors.original,(0,d.un)(this,e=>{let t=o.read(e),i=t.map(e=>({range:e.originalUnchangedRange.toInclusiveRange(),options:r}));for(let n of t)n.shouldHideControls(e)&&i.push({range:_.Q.fromPositions(new f.y(n.originalLineNumber,1)),options:h});return i}))),this._register((0,C.pY)(this._editors.modified,(0,d.un)(this,e=>{let t=o.read(e),i=t.map(e=>({range:e.modifiedUnchangedRange.toInclusiveRange(),options:r}));for(let n of t)n.shouldHideControls(e)&&i.push({range:m.M.ofLength(n.modifiedLineNumber,1).toInclusiveRange(),options:h});return i}))),this._register((0,d.fm)(e=>{let t=o.read(e);this._isUpdatingHiddenAreas=!0;try{this._editors.original.setHiddenAreas(t.map(t=>t.getHiddenOriginalRange(e).toInclusiveRange()).filter(u.O9)),this._editors.modified.setHiddenAreas(t.map(t=>t.getHiddenModifiedRange(e).toInclusiveRange()).filter(u.O9))}finally{this._isUpdatingHiddenAreas=!1}})),this._register(this._editors.modified.onMouseUp(e=>{if(!e.event.rightButton&&e.target.position&&e.target.element?.className.includes("fold-unchanged")){let t=e.target.position.lineNumber,i=this._diffModel.get();if(!i)return;let n=i.unchangedRegions.get().find(e=>e.modifiedUnchangedRange.contains(t));n&&(n.collapseAll(void 0),e.event.stopPropagation(),e.event.preventDefault())}})),this._register(this._editors.original.onMouseUp(e=>{if(!e.event.rightButton&&e.target.position&&e.target.element?.className.includes("fold-unchanged")){let t=e.target.position.lineNumber,i=this._diffModel.get();if(!i)return;let n=i.unchangedRegions.get().find(e=>e.originalUnchangedRange.contains(t));n&&(n.collapseAll(void 0),e.event.stopPropagation(),e.event.preventDefault())}}))}};w=s=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([(n=p._Y,function(e,t){n(e,t,3)})],w);class y extends C.uN{constructor(e,t,i,n=!1){let s=(0,o.h)("div.diff-hidden-lines-widget");super(e,t,s.root),this._unchangedRegion=i,this._hide=n,this._nodes=(0,o.h)("div.diff-hidden-lines-compact",[(0,o.h)("div.line-left",[]),(0,o.h)("div.text@text",[]),(0,o.h)("div.line-right",[])]),s.root.appendChild(this._nodes.root),this._hide&&this._nodes.root.replaceChildren(),this._register((0,d.fm)(e=>{if(!this._hide){let t=this._unchangedRegion.getHiddenModifiedRange(e).length,i=(0,g.kg)(122,"{0} hidden lines",t);this._nodes.text.innerText=i}}))}}class S extends C.uN{constructor(e,t,i,n,s,l,h,c){let u=(0,o.h)("div.diff-hidden-lines-widget");super(e,t,u.root),this._editor=e,this._unchangedRegion=i,this._unchangedRegionRange=n,this._hide=s,this._modifiedOutlineSource=l,this._revealModifiedHiddenLine=h,this._options=c,this._nodes=(0,o.h)("div.diff-hidden-lines",[(0,o.h)("div.top@top",{title:(0,g.kg)(123,"Click or drag to show more above")}),(0,o.h)("div.center@content",{style:{display:"flex"}},[(0,o.h)("div@first",{style:{display:"flex",justifyContent:"center",alignItems:"center",flexShrink:"0"}},[(0,o.$)("a",{title:(0,g.kg)(124,"Show Unchanged Region"),role:"button",onclick:()=>{this._unchangedRegion.showAll(void 0)}},...(0,r.n)("$(unfold)"))]),(0,o.h)("div@others",{style:{display:"flex",justifyContent:"center",alignItems:"center"}})]),(0,o.h)("div.bottom@bottom",{title:(0,g.kg)(125,"Click or drag to show more below"),role:"button"})]),u.root.appendChild(this._nodes.root),this._hide?(0,o.Ln)(this._nodes.first):this._register((0,C.AV)(this._nodes.first,{width:(0,b.U)(this._editor).layoutInfoContentLeft})),this._register((0,d.fm)(e=>{let t=this._unchangedRegion.visibleLineCountTop.read(e)+this._unchangedRegion.visibleLineCountBottom.read(e)===this._unchangedRegion.lineCount;this._nodes.bottom.classList.toggle("canMoveTop",!t),this._nodes.bottom.classList.toggle("canMoveBottom",this._unchangedRegion.visibleLineCountBottom.read(e)>0),this._nodes.top.classList.toggle("canMoveTop",this._unchangedRegion.visibleLineCountTop.read(e)>0),this._nodes.top.classList.toggle("canMoveBottom",!t);let i=this._unchangedRegion.isDragged.read(e),n=this._editor.getDomNode();n&&(n.classList.toggle("draggingUnchangedRegion",!!i),"top"===i?(n.classList.toggle("canMoveTop",this._unchangedRegion.visibleLineCountTop.read(e)>0),n.classList.toggle("canMoveBottom",!t)):"bottom"===i?(n.classList.toggle("canMoveTop",!t),n.classList.toggle("canMoveBottom",this._unchangedRegion.visibleLineCountBottom.read(e)>0)):(n.classList.toggle("canMoveTop",!1),n.classList.toggle("canMoveBottom",!1)))}));let p=this._editor;this._register((0,o.ko)(this._nodes.top,"mousedown",e=>{if(0!==e.button)return;this._nodes.top.classList.toggle("dragging",!0),this._nodes.root.classList.toggle("dragging",!0),e.preventDefault();let t=e.clientY,i=!1,n=this._unchangedRegion.visibleLineCountTop.get();this._unchangedRegion.isDragged.set("top",void 0);let s=(0,o.zk)(this._nodes.top),r=(0,o.ko)(s,"mousemove",e=>{let s=e.clientY-t;i=i||Math.abs(s)>2;let o=Math.max(0,Math.min(n+Math.round(s/p.getOption(75)),this._unchangedRegion.getMaxVisibleLineCountTop()));this._unchangedRegion.visibleLineCountTop.set(o,void 0)}),a=(0,o.ko)(s,"mouseup",e=>{i||this._unchangedRegion.showMoreAbove(this._options.hideUnchangedRegionsRevealLineCount.get(),void 0),this._nodes.top.classList.toggle("dragging",!1),this._nodes.root.classList.toggle("dragging",!1),this._unchangedRegion.isDragged.set(void 0,void 0),r.dispose(),a.dispose()})})),this._register((0,o.ko)(this._nodes.bottom,"mousedown",e=>{if(0!==e.button)return;this._nodes.bottom.classList.toggle("dragging",!0),this._nodes.root.classList.toggle("dragging",!0),e.preventDefault();let t=e.clientY,i=!1,n=this._unchangedRegion.visibleLineCountBottom.get();this._unchangedRegion.isDragged.set("bottom",void 0);let s=(0,o.zk)(this._nodes.bottom),r=(0,o.ko)(s,"mousemove",e=>{let s=e.clientY-t;i=i||Math.abs(s)>2;let o=Math.max(0,Math.min(n-Math.round(s/p.getOption(75)),this._unchangedRegion.getMaxVisibleLineCountBottom())),r=this._unchangedRegionRange.endLineNumberExclusive>p.getModel().getLineCount()?p.getContentHeight():p.getTopForLineNumber(this._unchangedRegionRange.endLineNumberExclusive);this._unchangedRegion.visibleLineCountBottom.set(o,void 0);let a=this._unchangedRegionRange.endLineNumberExclusive>p.getModel().getLineCount()?p.getContentHeight():p.getTopForLineNumber(this._unchangedRegionRange.endLineNumberExclusive);p.setScrollTop(p.getScrollTop()+(a-r))}),a=(0,o.ko)(s,"mouseup",e=>{if(this._unchangedRegion.isDragged.set(void 0,void 0),!i){let e=p.getTopForLineNumber(this._unchangedRegionRange.endLineNumberExclusive);this._unchangedRegion.showMoreBelow(this._options.hideUnchangedRegionsRevealLineCount.get(),void 0);let t=p.getTopForLineNumber(this._unchangedRegionRange.endLineNumberExclusive);p.setScrollTop(p.getScrollTop()+(t-e))}this._nodes.bottom.classList.toggle("dragging",!1),this._nodes.root.classList.toggle("dragging",!1),r.dispose(),a.dispose()})})),this._register((0,d.fm)(e=>{let t=[];if(!this._hide){let n=i.getHiddenModifiedRange(e).length,s=(0,g.kg)(126,"{0} hidden lines",n),l=(0,o.$)("span",{title:(0,g.kg)(127,"Double click to unfold")},s);l.addEventListener("dblclick",e=>{0===e.button&&(e.preventDefault(),this._unchangedRegion.showAll(void 0))}),t.push(l);let h=this._unchangedRegion.getHiddenModifiedRange(e),d=this._modifiedOutlineSource.getBreadcrumbItems(h,e);if(d.length>0){t.push((0,o.$)("span",void 0,"\xa0\xa0|\xa0\xa0"));for(let e=0;e<d.length;e++){let i=d[e],n=v.gP.toIcon(i.kind),s=(0,o.h)("div.breadcrumb-item",{style:{display:"flex",alignItems:"center"}},[(0,r.s)(n),"\xa0",i.name,...e===d.length-1?[]:[(0,r.s)(a.W.chevronRight)]]).root;t.push(s),s.onclick=()=>{this._revealModifiedHiddenLine(i.startLineNumber)}}}}(0,o.Ln)(this._nodes.others,...t)}))}}},77165:(e,t,i)=>{"use strict";i.d(t,{ur:()=>k,uO:()=>I});var n=i(73589),s=i(87899),o=i(88723),r=i(87460),a=i(78271),l=i(5488),h=i(45262),d=i(99136),c=i(17354),u=i(82102),g=i(99323),p=i(56487);function m(e,t){let i=[];for(let n of t){if(e.start>=n.range.end)continue;if(e.end<n.range.start)break;let t=g.Q.intersect(e,n.range);g.Q.isEmpty(t)||i.push({range:t,size:n.size})}return i}function f({start:e,end:t},i){return{start:e+i,end:t+i}}class _{get paddingTop(){return this._paddingTop}set paddingTop(e){this._size=this._size+e-this._paddingTop,this._paddingTop=e}constructor(e){this.groups=[],this._size=0,this._paddingTop=0,this._paddingTop=e??0,this._size=this._paddingTop}splice(e,t,i=[]){let n=i.length-t,s=m({start:0,end:e},this.groups),o=m({start:e+t,end:1/0},this.groups).map(e=>({range:f(e.range,n),size:e.size})),r=i.map((t,i)=>({range:{start:e+i,end:e+i+1},size:t.size}));this.groups=function(...e){return function(e){let t=[],i=null;for(let n of e){let e=n.range.start,s=n.range.end,o=n.size;if(i&&o===i.size){i.range.end=s;continue}i={range:{start:e,end:s},size:o},t.push(i)}return t}(e.reduce((e,t)=>e.concat(t),[]))}(s,r,o),this._size=this._paddingTop+this.groups.reduce((e,t)=>e+t.size*(t.range.end-t.range.start),0)}get count(){let e=this.groups.length;return e?this.groups[e-1].range.end:0}get size(){return this._size}indexAt(e){if(e<0)return -1;if(e<this._paddingTop)return 0;let t=0,i=this._paddingTop;for(let n of this.groups){let s=n.range.end-n.range.start,o=i+s*n.size;if(e<o)return t+Math.floor((e-i)/n.size);t+=s,i=o}return t}indexAfter(e){return Math.min(this.indexAt(e)+1,this.count)}positionAt(e){if(e<0)return -1;let t=0,i=0;for(let n of this.groups){let s=n.range.end-n.range.start,o=i+s;if(e<o)return this._paddingTop+t+(e-i)*n.size;t+=s*n.size,i=o}return -1}}class v{constructor(e){this.renderers=e,this.cache=new Map,this.transactionNodesPendingRemoval=new Set,this.inTransaction=!1}alloc(e){let t=this.getTemplateCache(e).pop(),i=!1;if(t)(i=this.transactionNodesPendingRemoval.has(t.domNode))&&this.transactionNodesPendingRemoval.delete(t.domNode);else{let i=(0,s.$)(".monaco-list-row"),n=this.getRenderer(e).renderTemplate(i);t={domNode:i,templateId:e,templateData:n}}return{row:t,isReusingConnectedDomNode:i}}release(e){e&&this.releaseRow(e)}transact(e){if(this.inTransaction)throw Error("Already in transaction");this.inTransaction=!0;try{e()}finally{for(let e of this.transactionNodesPendingRemoval)this.doRemoveNode(e);this.transactionNodesPendingRemoval.clear(),this.inTransaction=!1}}releaseRow(e){let{domNode:t,templateId:i}=e;t&&(this.inTransaction?this.transactionNodesPendingRemoval.add(t):this.doRemoveNode(t)),this.getTemplateCache(i).push(e)}doRemoveNode(e){e.classList.remove("scrolling"),e.remove()}getTemplateCache(e){let t=this.cache.get(e);return t||(t=[],this.cache.set(e,t)),t}dispose(){this.cache.forEach((e,t)=>{for(let i of e)this.getRenderer(t).disposeTemplate(i.templateData),i.templateData=null}),this.cache.clear(),this.transactionNodesPendingRemoval.clear()}getRenderer(e){let t=this.renderers.get(e);if(!t)throw Error(`No renderer found for ${e}`);return t}}var b=i(6033),C=i(64124);i(87130);var w=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r};let y={CurrentDragAndDropData:void 0},S={useShadows:!0,verticalScrollMode:1,setRowLineHeight:!0,setRowHeight:!0,supportDynamicHeights:!1,dnd:{getDragElements:e=>[e],getDragURI:()=>null,onDragStart(){},onDragOver:()=>!1,drop(){},dispose(){}},horizontalScrolling:!1,transformOptimization:!0,alwaysConsumeMouseWheel:!0};class k{constructor(e){this.elements=e}update(){}getData(){return this.elements}}class x{constructor(e){this.elements=e}update(){}getData(){return this.elements}}class L{constructor(){this.types=[],this.files=[]}update(e){if(e.types&&this.types.splice(0,this.types.length,...e.types),e.files){this.files.splice(0,this.files.length);for(let t=0;t<e.files.length;t++){let i=e.files.item(t);i&&(i.size||i.type)&&this.files.push(i)}}}getData(){return{types:this.types,files:this.files}}}class D{constructor(e){e?.getSetSize?this.getSetSize=e.getSetSize.bind(e):this.getSetSize=(e,t,i)=>i,e?.getPosInSet?this.getPosInSet=e.getPosInSet.bind(e):this.getPosInSet=(e,t)=>t+1,e?.getRole?this.getRole=e.getRole.bind(e):this.getRole=e=>"listitem",e?.isChecked?this.isChecked=e.isChecked.bind(e):this.isChecked=e=>void 0}}class I{static{this.InstanceCount=0}get contentHeight(){return this.rangeMap.size}get onDidScroll(){return this.scrollableElement.onScroll}get scrollableElementDomNode(){return this.scrollableElement.getDomNode()}get horizontalScrolling(){return this._horizontalScrolling}set horizontalScrolling(e){if(e!==this._horizontalScrolling){if(e&&this.supportDynamicHeights)throw Error("Horizontal scrolling and dynamic heights not supported simultaneously");if(this._horizontalScrolling=e,this.domNode.classList.toggle("horizontal-scrolling",this._horizontalScrolling),this._horizontalScrolling){for(let e of this.items)this.measureItemWidth(e);this.updateScrollWidth(),this.scrollableElement.setScrollDimensions({width:(0,s.y6)(this.domNode)}),this.rowsContainer.style.width=`${Math.max(this.scrollWidth||0,this.renderWidth)}px`}else this.scrollableElementWidthDelayer.cancel(),this.scrollableElement.setScrollDimensions({width:this.renderWidth,scrollWidth:this.renderWidth}),this.rowsContainer.style.width=""}}constructor(e,t,i,n=S){if(this.virtualDelegate=t,this.domId=`list_id_${++I.InstanceCount}`,this.renderers=new Map,this.renderWidth=0,this._scrollHeight=0,this.scrollableElementUpdateDisposable=null,this.scrollableElementWidthDelayer=new h.ve(50),this.splicing=!1,this.dragOverAnimationStopDisposable=u.jG.None,this.dragOverMouseY=0,this.canDrop=!1,this.currentDragFeedbackDisposable=u.jG.None,this.onDragLeaveTimeout=u.jG.None,this.currentSelectionDisposable=u.jG.None,this.disposables=new u.Cm,this._onDidChangeContentHeight=new c.vl,this._onDidChangeContentWidth=new c.vl,this.onDidChangeContentHeight=c.Jh.latch(this._onDidChangeContentHeight.event,void 0,this.disposables),this._horizontalScrolling=!1,n.horizontalScrolling&&n.supportDynamicHeights)throw Error("Horizontal scrolling and dynamic heights not supported simultaneously");for(let e of(this.items=[],this.itemId=0,this.rangeMap=this.createRangeMap(n.paddingTop??0),i))this.renderers.set(e.templateId,e);if(this.cache=this.disposables.add(new v(this.renderers)),this.lastRenderTop=0,this.lastRenderHeight=0,this.domNode=document.createElement("div"),this.domNode.className="monaco-list",this.domNode.classList.add(this.domId),this.domNode.tabIndex=0,this.domNode.classList.toggle("mouse-support","boolean"!=typeof n.mouseSupport||n.mouseSupport),this._horizontalScrolling=n.horizontalScrolling??S.horizontalScrolling,this.domNode.classList.toggle("horizontal-scrolling",this._horizontalScrolling),this.paddingBottom=void 0===n.paddingBottom?0:n.paddingBottom,this.accessibilityProvider=new D(n.accessibilityProvider),this.rowsContainer=document.createElement("div"),this.rowsContainer.className="monaco-list-rows",(n.transformOptimization??S.transformOptimization)&&(this.rowsContainer.style.transform="translate3d(0px, 0px, 0px)",this.rowsContainer.style.overflow="hidden",this.rowsContainer.style.contain="strict"),this.disposables.add(r.q.addTarget(this.rowsContainer)),this.scrollable=this.disposables.add(new p.yE({forceIntegerValues:!0,smoothScrollDuration:125*!!n.smoothScrolling,scheduleAtNextAnimationFrame:e=>(0,s.PG)((0,s.zk)(this.domNode),e)})),this.scrollableElement=this.disposables.add(new a.oO(this.rowsContainer,{alwaysConsumeMouseWheel:n.alwaysConsumeMouseWheel??S.alwaysConsumeMouseWheel,horizontal:1,vertical:n.verticalScrollMode??S.verticalScrollMode,useShadows:n.useShadows??S.useShadows,mouseWheelScrollSensitivity:n.mouseWheelScrollSensitivity,fastScrollSensitivity:n.fastScrollSensitivity,scrollByPage:n.scrollByPage},this.scrollable)),this.domNode.appendChild(this.scrollableElement.getDomNode()),e.appendChild(this.domNode),this.scrollableElement.onScroll(this.onScroll,this,this.disposables),this.disposables.add((0,s.ko)(this.rowsContainer,r.B.Change,e=>this.onTouchChange(e))),this.disposables.add((0,s.ko)(this.scrollableElement.getDomNode(),"scroll",e=>{let t=e.target,i=t.scrollTop;t.scrollTop=0,n.scrollToActiveElement&&this.setScrollTop(this.scrollTop+i)})),this.disposables.add((0,s.ko)(this.domNode,"dragover",e=>this.onDragOver(this.toDragEvent(e)))),this.disposables.add((0,s.ko)(this.domNode,"drop",e=>this.onDrop(this.toDragEvent(e)))),this.disposables.add((0,s.ko)(this.domNode,"dragleave",e=>this.onDragLeave(this.toDragEvent(e)))),this.disposables.add((0,s.ko)(this.domNode,"dragend",e=>this.onDragEnd(e))),n.userSelection){if(n.dnd)throw Error("DND and user selection cannot be used simultaneously");this.disposables.add((0,s.ko)(this.domNode,"mousedown",e=>this.onPotentialSelectionStart(e)))}this.setRowLineHeight=n.setRowLineHeight??S.setRowLineHeight,this.setRowHeight=n.setRowHeight??S.setRowHeight,this.supportDynamicHeights=n.supportDynamicHeights??S.supportDynamicHeights,this.dnd=n.dnd??this.disposables.add(S.dnd),this.layout(n.initialSize?.height,n.initialSize?.width),n.scrollToActiveElement&&this._setupFocusObserver(e)}_setupFocusObserver(e){this.disposables.add((0,s.ko)(e,"focus",()=>{let t=(0,s.bq)();this.activeElement!==t&&null!==t&&(this.activeElement=t,this._scrollToActiveElement(this.activeElement,e))},!0))}_scrollToActiveElement(e,t){let i=t.getBoundingClientRect(),n=e.getBoundingClientRect().top-i.top;n<0&&this.setScrollTop(this.scrollTop+n)}updateOptions(e){let t;if(void 0!==e.paddingBottom&&(this.paddingBottom=e.paddingBottom,this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight})),void 0!==e.smoothScrolling&&this.scrollable.setSmoothScrollDuration(125*!!e.smoothScrolling),void 0!==e.horizontalScrolling&&(this.horizontalScrolling=e.horizontalScrolling),void 0!==e.scrollByPage&&(t={...t??{},scrollByPage:e.scrollByPage}),void 0!==e.mouseWheelScrollSensitivity&&(t={...t??{},mouseWheelScrollSensitivity:e.mouseWheelScrollSensitivity}),void 0!==e.fastScrollSensitivity&&(t={...t??{},fastScrollSensitivity:e.fastScrollSensitivity}),t&&this.scrollableElement.updateOptions(t),void 0!==e.paddingTop&&e.paddingTop!==this.rangeMap.paddingTop){let t=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),i=e.paddingTop-this.rangeMap.paddingTop;this.rangeMap.paddingTop=e.paddingTop,this.render(t,Math.max(0,this.lastRenderTop+i),this.lastRenderHeight,void 0,void 0,!0),this.setScrollTop(this.lastRenderTop),this.eventuallyUpdateScrollDimensions(),this.supportDynamicHeights&&this._rerender(this.lastRenderTop,this.lastRenderHeight)}}createRangeMap(e){return new _(e)}splice(e,t,i=[]){if(this.splicing)throw Error("Can't run recursive splices.");this.splicing=!0;try{return this._splice(e,t,i)}finally{this.splicing=!1,this._onDidChangeContentHeight.fire(this.contentHeight)}}_splice(e,t,i=[]){let n,s=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),o=g.Q.intersect(s,{start:e,end:e+t}),r=new Map;for(let e=o.end-1;e>=o.start;e--){let t=this.items[e];if(t.dragStartDisposable.dispose(),t.checkedDisposable.dispose(),t.row){let i=r.get(t.templateId);i||(i=[],r.set(t.templateId,i));let n=this.renderers.get(t.templateId);n&&n.disposeElement&&n.disposeElement(t.element,e,t.row.templateData,{height:t.size}),i.unshift(t.row)}t.row=null,t.stale=!0}let a={start:e+t,end:this.items.length},h=g.Q.intersect(a,s),d=g.Q.relativeComplement(a,s),c=i.map(e=>({id:String(this.itemId++),element:e,templateId:this.virtualDelegate.getTemplateId(e),size:this.virtualDelegate.getHeight(e),width:void 0,hasDynamicHeight:!!this.virtualDelegate.hasDynamicHeight&&this.virtualDelegate.hasDynamicHeight(e),lastDynamicHeightWidth:void 0,row:null,uri:void 0,dropTarget:!1,dragStartDisposable:u.jG.None,checkedDisposable:u.jG.None,stale:!1}));0===e&&t>=this.items.length?(this.rangeMap=this.createRangeMap(this.rangeMap.paddingTop),this.rangeMap.splice(0,0,c),n=this.items,this.items=c):(this.rangeMap.splice(e,t,c),n=(0,l.V4)(this.items,e,t,c));let p=i.length-t,m=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),_=f(h,p),v=g.Q.intersect(m,_);for(let e=v.start;e<v.end;e++)this.updateItemInDOM(this.items[e],e);for(let e of g.Q.relativeComplement(_,m))for(let t=e.start;t<e.end;t++)this.removeItemFromDOM(t);let b=d.map(e=>f(e,p));for(let t of[{start:e,end:e+i.length},...b].map(e=>g.Q.intersect(m,e)).reverse())for(let e=t.end-1;e>=t.start;e--){let t=this.items[e],i=r.get(t.templateId),n=i?.pop();this.insertItemInDOM(e,n)}for(let e of r.values())for(let t of e)this.cache.release(t);return this.eventuallyUpdateScrollDimensions(),this.supportDynamicHeights&&this._rerender(this.scrollTop,this.renderHeight),n.map(e=>e.element)}eventuallyUpdateScrollDimensions(){this._scrollHeight=this.contentHeight,this.rowsContainer.style.height=`${this._scrollHeight}px`,this.scrollableElementUpdateDisposable||(this.scrollableElementUpdateDisposable=(0,s.PG)((0,s.zk)(this.domNode),()=>{this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight}),this.updateScrollWidth(),this.scrollableElementUpdateDisposable=null}))}eventuallyUpdateScrollWidth(){if(!this.horizontalScrolling)return void this.scrollableElementWidthDelayer.cancel();this.scrollableElementWidthDelayer.trigger(()=>this.updateScrollWidth())}updateScrollWidth(){if(!this.horizontalScrolling)return;let e=0;for(let t of this.items)void 0!==t.width&&(e=Math.max(e,t.width));this.scrollWidth=e,this.scrollableElement.setScrollDimensions({scrollWidth:0===e?0:e+10}),this._onDidChangeContentWidth.fire(this.scrollWidth)}rerender(){if(this.supportDynamicHeights){for(let e of this.items)e.lastDynamicHeightWidth=void 0;this._rerender(this.lastRenderTop,this.lastRenderHeight)}}get length(){return this.items.length}get renderHeight(){return this.scrollableElement.getScrollDimensions().height}get firstVisibleIndex(){return this.getVisibleRange(this.lastRenderTop,this.lastRenderHeight).start}element(e){return this.items[e].element}indexOf(e){return this.items.findIndex(t=>t.element===e)}domElement(e){let t=this.items[e].row;return t&&t.domNode}elementHeight(e){return this.items[e].size}elementTop(e){return this.rangeMap.positionAt(e)}indexAt(e){return this.rangeMap.indexAt(e)}indexAfter(e){return this.rangeMap.indexAfter(e)}layout(e,t){let i={height:"number"==typeof e?e:(0,s.H4)(this.domNode)};this.scrollableElementUpdateDisposable&&(this.scrollableElementUpdateDisposable.dispose(),this.scrollableElementUpdateDisposable=null,i.scrollHeight=this.scrollHeight),this.scrollableElement.setScrollDimensions(i),void 0!==t&&(this.renderWidth=t,this.supportDynamicHeights&&this._rerender(this.scrollTop,this.renderHeight)),this.horizontalScrolling&&this.scrollableElement.setScrollDimensions({width:"number"==typeof t?t:(0,s.y6)(this.domNode)})}render(e,t,i,n,s,o=!1,r=!1){let a=this.getRenderRange(t,i),l=g.Q.relativeComplement(a,e).reverse(),h=g.Q.relativeComplement(e,a);if(o){let t=g.Q.intersect(e,a);for(let e=t.start;e<t.end;e++)this.updateItemInDOM(this.items[e],e)}this.cache.transact(()=>{for(let e of h)for(let t=e.start;t<e.end;t++)this.removeItemFromDOM(t,r);for(let e of l)for(let t=e.end-1;t>=e.start;t--)this.insertItemInDOM(t)}),void 0!==n&&(this.rowsContainer.style.left=`-${n}px`),this.rowsContainer.style.top=`-${t}px`,this.horizontalScrolling&&void 0!==s&&(this.rowsContainer.style.width=`${Math.max(s,this.renderWidth)}px`),this.lastRenderTop=t,this.lastRenderHeight=i}insertItemInDOM(e,t){let i=this.items[e];if(!i.row)if(t)i.row=t,i.stale=!0;else{let e=this.cache.alloc(i.templateId);i.row=e.row,i.stale||=e.isReusingConnectedDomNode}let n=this.accessibilityProvider.getRole(i.element)||"listitem";i.row.domNode.setAttribute("role",n);let o=this.accessibilityProvider.isChecked(i.element);if("boolean"==typeof o)i.row.domNode.setAttribute("aria-checked",String(!!o));else if(o){let e=e=>i.row.domNode.setAttribute("aria-checked",String(!!e));e(o.value),i.checkedDisposable=o.onDidChange(()=>e(o.value))}if(i.stale||!i.row.domNode.parentElement){let t=this.items.at(e+1)?.row?.domNode??null;(i.row.domNode.parentElement!==this.rowsContainer||i.row.domNode.nextElementSibling!==t)&&this.rowsContainer.insertBefore(i.row.domNode,t),i.stale=!1}this.updateItemInDOM(i,e);let r=this.renderers.get(i.templateId);if(!r)throw Error(`No renderer found for template id ${i.templateId}`);r?.renderElement(i.element,e,i.row.templateData,{height:i.size});let a=this.dnd.getDragURI(i.element);i.dragStartDisposable.dispose(),i.row.domNode.draggable=!!a,a&&(i.dragStartDisposable=(0,s.ko)(i.row.domNode,"dragstart",e=>this.onDragStart(i.element,a,e))),this.horizontalScrolling&&(this.measureItemWidth(i),this.eventuallyUpdateScrollWidth())}measureItemWidth(e){if(!e.row||!e.row.domNode)return;e.row.domNode.style.width="fit-content",e.width=(0,s.y6)(e.row.domNode);let t=(0,s.zk)(e.row.domNode).getComputedStyle(e.row.domNode);t.paddingLeft&&(e.width+=parseFloat(t.paddingLeft)),t.paddingRight&&(e.width+=parseFloat(t.paddingRight)),e.row.domNode.style.width=""}updateItemInDOM(e,t){e.row.domNode.style.top=`${this.elementTop(t)}px`,this.setRowHeight&&(e.row.domNode.style.height=`${e.size}px`),this.setRowLineHeight&&(e.row.domNode.style.lineHeight=`${e.size}px`),e.row.domNode.setAttribute("data-index",`${t}`),e.row.domNode.setAttribute("data-last-element",t===this.length-1?"true":"false"),e.row.domNode.setAttribute("data-parity",t%2==0?"even":"odd"),e.row.domNode.setAttribute("aria-setsize",String(this.accessibilityProvider.getSetSize(e.element,t,this.length))),e.row.domNode.setAttribute("aria-posinset",String(this.accessibilityProvider.getPosInSet(e.element,t))),e.row.domNode.setAttribute("id",this.getElementDomId(t)),e.row.domNode.classList.toggle("drop-target",e.dropTarget)}removeItemFromDOM(e,t){let i=this.items[e];if(i.dragStartDisposable.dispose(),i.checkedDisposable.dispose(),i.row){let n=this.renderers.get(i.templateId);n&&n.disposeElement&&n.disposeElement(i.element,e,i.row.templateData,{height:i.size,onScroll:t}),this.cache.release(i.row),i.row=null}this.horizontalScrolling&&this.eventuallyUpdateScrollWidth()}getScrollTop(){return this.scrollableElement.getScrollPosition().scrollTop}setScrollTop(e,t){this.scrollableElementUpdateDisposable&&(this.scrollableElementUpdateDisposable.dispose(),this.scrollableElementUpdateDisposable=null,this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight})),this.scrollableElement.setScrollPosition({scrollTop:e,reuseAnimation:t})}get scrollTop(){return this.getScrollTop()}set scrollTop(e){this.setScrollTop(e)}get scrollHeight(){return this._scrollHeight+10*!!this.horizontalScrolling+this.paddingBottom}get onMouseClick(){return c.Jh.map(this.disposables.add(new o.f(this.domNode,"click")).event,e=>this.toMouseEvent(e),this.disposables)}get onMouseDblClick(){return c.Jh.map(this.disposables.add(new o.f(this.domNode,"dblclick")).event,e=>this.toMouseEvent(e),this.disposables)}get onMouseMiddleClick(){return c.Jh.filter(c.Jh.map(this.disposables.add(new o.f(this.domNode,"auxclick")).event,e=>this.toMouseEvent(e),this.disposables),e=>1===e.browserEvent.button,this.disposables)}get onMouseDown(){return c.Jh.map(this.disposables.add(new o.f(this.domNode,"mousedown")).event,e=>this.toMouseEvent(e),this.disposables)}get onMouseOver(){return c.Jh.map(this.disposables.add(new o.f(this.domNode,"mouseover")).event,e=>this.toMouseEvent(e),this.disposables)}get onMouseOut(){return c.Jh.map(this.disposables.add(new o.f(this.domNode,"mouseout")).event,e=>this.toMouseEvent(e),this.disposables)}get onContextMenu(){return c.Jh.any(c.Jh.map(this.disposables.add(new o.f(this.domNode,"contextmenu")).event,e=>this.toMouseEvent(e),this.disposables),c.Jh.map(this.disposables.add(new o.f(this.domNode,r.B.Contextmenu)).event,e=>this.toGestureEvent(e),this.disposables))}get onTouchStart(){return c.Jh.map(this.disposables.add(new o.f(this.domNode,"touchstart")).event,e=>this.toTouchEvent(e),this.disposables)}get onTap(){return c.Jh.map(this.disposables.add(new o.f(this.rowsContainer,r.B.Tap)).event,e=>this.toGestureEvent(e),this.disposables)}toMouseEvent(e){let t=this.getItemIndexFromEventTarget(e.target||null),i=void 0===t?void 0:this.items[t];return{browserEvent:e,index:t,element:i&&i.element}}toTouchEvent(e){let t=this.getItemIndexFromEventTarget(e.target||null),i=void 0===t?void 0:this.items[t];return{browserEvent:e,index:t,element:i&&i.element}}toGestureEvent(e){let t=this.getItemIndexFromEventTarget(e.initialTarget||null),i=void 0===t?void 0:this.items[t];return{browserEvent:e,index:t,element:i&&i.element}}toDragEvent(e){let t=this.getItemIndexFromEventTarget(e.target||null),i=void 0===t?void 0:this.items[t],n=i&&i.element,s=this.getTargetSector(e,t);return{browserEvent:e,index:t,element:n,sector:s}}onScroll(e){try{let t=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight);this.render(t,e.scrollTop,e.height,e.scrollLeft,e.scrollWidth,void 0,!0),this.supportDynamicHeights&&this._rerender(e.scrollTop,e.height,e.inSmoothScrolling)}catch(t){throw console.error("Got bad scroll event:",e),t}}onTouchChange(e){e.preventDefault(),e.stopPropagation(),this.scrollTop-=e.translationY}onDragStart(e,t,i){let o;if(!i.dataTransfer)return;let r=this.dnd.getDragElements(e);i.dataTransfer.effectAllowed="copyMove",i.dataTransfer.setData(n.t.TEXT,t),this.dnd.getDragLabel&&(o=this.dnd.getDragLabel(r,i)),void 0===o&&(o=String(r.length)),function(e,t,i,n=[]){if(!e.dataTransfer)return;let o=(0,s.$)(".monaco-drag-image");o.textContent=i,o.classList.add(...n),(e=>{for(;e&&!e.classList.contains("monaco-workbench");)e=e.parentElement;return e||t.ownerDocument.body})(t).appendChild(o),e.dataTransfer.setDragImage(o,-10,-10),setTimeout(()=>o.remove(),0)}(i,this.domNode,o,[this.domId]),this.domNode.classList.add("dragging"),this.currentDragData=new k(r),y.CurrentDragAndDropData=new x(r),this.dnd.onDragStart?.(this.currentDragData,i)}onPotentialSelectionStart(e){this.currentSelectionDisposable.dispose();let t=(0,s.YE)(this.domNode),i=this.currentSelectionDisposable=new u.Cm,n=i.add(new u.Cm);n.add((0,s.ko)(this.domNode,"selectstart",()=>{n.add((0,s.ko)(t,"mousemove",e=>{t.getSelection()?.isCollapsed===!1&&this.setupDragAndDropScrollTopAnimation(e)})),i.add((0,u.s)(()=>{let e=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight);this.currentSelectionBounds=void 0,this.render(e,this.lastRenderTop,this.lastRenderHeight,void 0,void 0)})),i.add((0,s.ko)(t,"selectionchange",()=>{let e=t.getSelection();if(!e||e.isCollapsed){n.isDisposed&&i.dispose();return}let s=this.getIndexOfListElement(e.anchorNode),o=this.getIndexOfListElement(e.focusNode);void 0!==s&&void 0!==o&&(o<s&&([s,o]=[o,s]),this.currentSelectionBounds={start:s,end:o})}))})),n.add((0,s.ko)(t,"mouseup",()=>{n.dispose(),this.teardownDragAndDropScrollTopAnimation(),t.getSelection()?.isCollapsed!==!1&&i.dispose()}))}getIndexOfListElement(e){if(e&&this.domNode.contains(e))for(;e&&e!==this.domNode;){if(e.dataset?.index)return Number(e.dataset.index);e=e.parentElement}}onDragOver(e){var t,i;let n;if(e.browserEvent.preventDefault(),this.onDragLeaveTimeout.dispose(),y.CurrentDragAndDropData&&"vscode-ui"===y.CurrentDragAndDropData.getData()||(this.setupDragAndDropScrollTopAnimation(e.browserEvent),!e.browserEvent.dataTransfer))return!1;if(!this.currentDragData)if(y.CurrentDragAndDropData)this.currentDragData=y.CurrentDragAndDropData;else{if(!e.browserEvent.dataTransfer.types)return!1;this.currentDragData=new L}let s=this.dnd.onDragOver(this.currentDragData,e.element,e.index,e.sector,e.browserEvent);if(this.canDrop="boolean"==typeof s?s:s.accept,!this.canDrop)return this.currentDragFeedback=void 0,this.currentDragFeedbackDisposable.dispose(),!1;e.browserEvent.dataTransfer.dropEffect="boolean"!=typeof s&&s.effect?.type===0?"copy":"move",n="boolean"!=typeof s&&s.feedback?s.feedback:void 0===e.index?[-1]:[e.index],n=-1===(n=(0,l.dM)(n).filter(e=>e>=-1&&e<this.length).sort((e,t)=>e-t))[0]?[-1]:n;let o="boolean"!=typeof s&&s.effect&&s.effect.position?s.effect.position:"drop-target";if(t=this.currentDragFeedback,i=n,(Array.isArray(t)&&Array.isArray(i)?(0,l.aI)(t,i):t===i)&&this.currentDragFeedbackPosition===o)return!0;if(this.currentDragFeedback=n,this.currentDragFeedbackPosition=o,this.currentDragFeedbackDisposable.dispose(),-1===n[0])this.domNode.classList.add(o),this.rowsContainer.classList.add(o),this.currentDragFeedbackDisposable=(0,u.s)(()=>{this.domNode.classList.remove(o),this.rowsContainer.classList.remove(o)});else{if(n.length>1&&"drop-target"!==o)throw Error("Can't use multiple feedbacks with position different than 'over'");for(let e of("drop-target-after"===o&&n[0]<this.length-1&&(n[0]+=1,o="drop-target-before"),n)){let t=this.items[e];t.dropTarget=!0,t.row?.domNode.classList.add(o)}this.currentDragFeedbackDisposable=(0,u.s)(()=>{for(let e of n){let t=this.items[e];t.dropTarget=!1,t.row?.domNode.classList.remove(o)}})}return!0}onDragLeave(e){this.onDragLeaveTimeout.dispose(),this.onDragLeaveTimeout=(0,h.EQ)(()=>this.clearDragOverFeedback(),100,this.disposables),this.currentDragData&&this.dnd.onDragLeave?.(this.currentDragData,e.element,e.index,e.browserEvent)}onDrop(e){if(!this.canDrop)return;let t=this.currentDragData;this.teardownDragAndDropScrollTopAnimation(),this.clearDragOverFeedback(),this.domNode.classList.remove("dragging"),this.currentDragData=void 0,y.CurrentDragAndDropData=void 0,t&&e.browserEvent.dataTransfer&&(e.browserEvent.preventDefault(),t.update(e.browserEvent.dataTransfer),this.dnd.drop(t,e.element,e.index,e.sector,e.browserEvent))}onDragEnd(e){this.canDrop=!1,this.teardownDragAndDropScrollTopAnimation(),this.clearDragOverFeedback(),this.domNode.classList.remove("dragging"),this.currentDragData=void 0,y.CurrentDragAndDropData=void 0,this.dnd.onDragEnd?.(e)}clearDragOverFeedback(){this.currentDragFeedback=void 0,this.currentDragFeedbackPosition=void 0,this.currentDragFeedbackDisposable.dispose(),this.currentDragFeedbackDisposable=u.jG.None}setupDragAndDropScrollTopAnimation(e){if(!this.dragOverAnimationDisposable){let e=(0,s.cL)(this.domNode).top;this.dragOverAnimationDisposable=(0,s.i0)((0,s.zk)(this.domNode),this.animateDragAndDropScrollTop.bind(this,e))}this.dragOverAnimationStopDisposable.dispose(),this.dragOverAnimationStopDisposable=(0,h.EQ)(()=>{this.dragOverAnimationDisposable&&(this.dragOverAnimationDisposable.dispose(),this.dragOverAnimationDisposable=void 0)},1e3,this.disposables),this.dragOverMouseY=e.pageY}animateDragAndDropScrollTop(e){if(void 0===this.dragOverMouseY)return;let t=this.dragOverMouseY-e,i=this.renderHeight-35;t<35?this.scrollTop+=Math.max(-14,Math.floor(.3*(t-35))):t>i&&(this.scrollTop+=Math.min(14,Math.floor(.3*(t-i))))}teardownDragAndDropScrollTopAnimation(){this.dragOverAnimationStopDisposable.dispose(),this.dragOverAnimationDisposable&&(this.dragOverAnimationDisposable.dispose(),this.dragOverAnimationDisposable=void 0)}getTargetSector(e,t){if(void 0===t)return;let i=Math.floor(e.offsetY/this.items[t].size/.25);return(0,C.qE)(i,0,3)}getItemIndexFromEventTarget(e){let t=this.scrollableElement.getDomNode(),i=e;for(;((0,s.sb)(i)||(0,s.xZ)(i))&&i!==this.rowsContainer&&t.contains(i);){let e=i.getAttribute("data-index");if(e){let t=Number(e);if(!isNaN(t))return t}i=i.parentElement}}getVisibleRange(e,t){return{start:this.rangeMap.indexAt(e),end:this.rangeMap.indexAfter(e+t-1)}}getRenderRange(e,t){let i=this.getVisibleRange(e,t);if(this.currentSelectionBounds){let e=this.rangeMap.count;i.start=Math.min(i.start,this.currentSelectionBounds.start,e),i.end=Math.min(Math.max(i.end,this.currentSelectionBounds.end+1),e)}return i}_rerender(e,t,i){let n,s,o=this.getRenderRange(e,t);e===this.elementTop(o.start)?(n=o.start,s=0):o.end-o.start>1&&(n=o.start+1,s=this.elementTop(n)-e);let r=0;for(;;){let a=this.getRenderRange(e,t),l=!1;for(let e=a.start;e<a.end;e++){let t=this.probeDynamicHeight(e);0!==t&&this.rangeMap.splice(e,1,[this.items[e]]),r+=t,l=l||0!==t}if(!l){for(let e of(0!==r&&this.eventuallyUpdateScrollDimensions(),g.Q.relativeComplement(o,a)))for(let t=e.start;t<e.end;t++)this.items[t].row&&this.removeItemFromDOM(t);for(let e of g.Q.relativeComplement(a,o).reverse())for(let t=e.end-1;t>=e.start;t--)this.insertItemInDOM(t);for(let e=a.start;e<a.end;e++)this.items[e].row&&this.updateItemInDOM(this.items[e],e);if("number"==typeof n){let t=this.scrollable.getFutureScrollPosition().scrollTop-e,o=this.elementTop(n)-s+t;this.setScrollTop(o,i)}this._onDidChangeContentHeight.fire(this.contentHeight);return}}}probeDynamicHeight(e){let t=this.items[e];if(this.virtualDelegate.getDynamicHeight){let e=this.virtualDelegate.getDynamicHeight(t.element);if(null!==e){let i=t.size;return t.size=e,t.lastDynamicHeightWidth=this.renderWidth,e-i}}if(!t.hasDynamicHeight||t.lastDynamicHeightWidth===this.renderWidth||this.virtualDelegate.hasDynamicHeight&&!this.virtualDelegate.hasDynamicHeight(t.element))return 0;let i=t.size;if(t.row)return t.row.domNode.style.height="",t.size=t.row.domNode.offsetHeight,0!==t.size||(0,s.QX)(t.row.domNode,(0,s.zk)(t.row.domNode).document.body)||console.warn("Measuring item node that is not in DOM! Add ListView to the DOM before measuring row height!",Error().stack),t.lastDynamicHeightWidth=this.renderWidth,t.size-i;let{row:n}=this.cache.alloc(t.templateId);n.domNode.style.height="",this.rowsContainer.appendChild(n.domNode);let o=this.renderers.get(t.templateId);if(!o)throw new b.D7("Missing renderer for templateId: "+t.templateId);return o.renderElement(t.element,e,n.templateData),t.size=n.domNode.offsetHeight,o.disposeElement?.(t.element,e,n.templateData),this.virtualDelegate.setDynamicHeight?.(t.element,t.size),t.lastDynamicHeightWidth=this.renderWidth,n.domNode.remove(),this.cache.release(n),t.size-i}getElementDomId(e){return`${this.domId}_${e}`}dispose(){for(let e of this.items)if(e.dragStartDisposable.dispose(),e.checkedDisposable.dispose(),e.row){let t=this.renderers.get(e.row.templateId);t&&(t.disposeElement?.(e.element,-1,e.row.templateData,void 0),t.disposeTemplate(e.row.templateData))}this.items=[],this.domNode?.remove(),this.dragOverAnimationDisposable?.dispose(),this.disposables.dispose()}}w([d.B],I.prototype,"onMouseClick",null),w([d.B],I.prototype,"onMouseDblClick",null),w([d.B],I.prototype,"onMouseMiddleClick",null),w([d.B],I.prototype,"onMouseDown",null),w([d.B],I.prototype,"onMouseOver",null),w([d.B],I.prototype,"onMouseOut",null),w([d.B],I.prototype,"onContextMenu",null),w([d.B],I.prototype,"onTouchStart",null),w([d.B],I.prototype,"onTap",null)},77715:(e,t,i)=>{"use strict";i.d(t,{FdG:()=>n.Fd,buw:()=>c,GuP:()=>n.Gu,Bbc:()=>n.Bb,HP_:()=>n.HP,WMx:()=>g,zRE:()=>p,sAS:()=>eu,vV$:()=>ed,etE:()=>ec,mc0:()=>eh,XJc:()=>e1,raQ:()=>e5,G_h:()=>eJ,T9h:()=>e2,xOA:()=>e3,Inn:()=>e4,nZG:()=>e7,Q1$:()=>e0,OcU:()=>ts,C5U:()=>tr,Uv:()=>ta,hsb:()=>tl,t0B:()=>to,b1q:()=>d,EY1:()=>J,ZEf:()=>ee,yUe:()=>a,Gj6:()=>et,w3w:()=>en,ld8:()=>es,$BZ:()=>eo,GNm:()=>ei,TUz:()=>tW,Ztu:()=>R,YtV:()=>C,AN$:()=>L,Rbi:()=>x,f3U:()=>B,Ubg:()=>W,ECk:()=>V,p8Y:()=>H,S5J:()=>z,By2:()=>w,i61:()=>T,WfR:()=>U,oZ8:()=>$,Xo2:()=>j,tan:()=>A,IIb:()=>M,pOz:()=>E,WL6:()=>G,P6i:()=>K,B2L:()=>Z,sjA:()=>Y,_pU:()=>Q,HwT:()=>q,seu:()=>O,rm4:()=>P,QwA:()=>F,whs:()=>D,Stt:()=>N,Hng:()=>I,CgL:()=>y,sIe:()=>k,FiB:()=>S,tAP:()=>h,CU6:()=>r,t4B:()=>l,c1f:()=>eB,uNK:()=>eA,$$0:()=>eW,L4c:()=>eR,Zgs:()=>eP,cws:()=>eO,_$n:()=>eK,eYZ:()=>eq,h9z:()=>eG,I$A:()=>eH,YSW:()=>ez,L9Z:()=>eV,ULt:()=>eU,C1n:()=>e$,T5N:()=>ej,HDX:()=>th,zUX:()=>tc,Qfh:()=>tu,eUu:()=>td,Rjz:()=>t_,GVV:()=>tv,fED:()=>tb,yIp:()=>tI,Yoe:()=>tD,pnl:()=>tM,P9Z:()=>tR,fiM:()=>tT,H8q:()=>tO,gtq:()=>tf,VFX:()=>tg,efJ:()=>tp,eMz:()=>tE,p7Y:()=>tm,QI5:()=>tN,lO1:()=>tx,QRv:()=>tL,CQ3:()=>tS,ijf:()=>tk,uNx:()=>tC,f4y:()=>tw,C9U:()=>ty,c6Y:()=>tz,g$2:()=>tH,dd_:()=>tV,Ux$:()=>tj,SNb:()=>t$,pmr:()=>tU,D7X:()=>tK,ILr:()=>eM,yLC:()=>eE,AjU:()=>ex,K1Z:()=>eT,KoI:()=>eI,yr0:()=>eD,Xp1:()=>eL,uMG:()=>eN,yLr:()=>n.yL,fAP:()=>eC,z5H:()=>ew,iwL:()=>tZ,NBf:()=>tY,tYX:()=>ey,bNw:()=>ek,JPj:()=>eS,BTi:()=>b,ELA:()=>tG,HJZ:()=>tq,AlL:()=>t1,nH:()=>tJ,c7i:()=>t0,er1:()=>tQ,Ukx:()=>e8,Ips:()=>e6,jOE:()=>e9,xWN:()=>tt,ZBU:()=>ti,kPT:()=>te,jr9:()=>tn,x1A:()=>n.x1,bXl:()=>m,mhZ:()=>v,gnV:()=>f,cI_:()=>_,rvE:()=>eQ,HcB:()=>eX,yqq:()=>eZ,lWP:()=>eY,k5u:()=>tF,sbQ:()=>tB,vwp:()=>u,JO0:()=>n.JO,pft:()=>tA,U4U:()=>tP,DSL:()=>ea,f9l:()=>er});var n=i(15262),s=i(15957),o=i(78713);let r=(0,n.x1)("foreground",{dark:"#CCCCCC",light:"#616161",hcDark:"#FFFFFF",hcLight:"#292929"},s.kg(1756,"Overall foreground color. This color is only used if not overridden by a component."));(0,n.x1)("disabledForeground",{dark:"#CCCCCC80",light:"#61616180",hcDark:"#A5A5A5",hcLight:"#7F7F7F"},s.kg(1757,"Overall foreground for disabled elements. This color is only used if not overridden by a component.")),(0,n.x1)("errorForeground",{dark:"#F48771",light:"#A1260D",hcDark:"#F48771",hcLight:"#B5200D"},s.kg(1758,"Overall foreground color for error messages. This color is only used if not overridden by a component."));let a=(0,n.x1)("descriptionForeground",{light:"#717171",dark:(0,n.JO)(r,.7),hcDark:(0,n.JO)(r,.7),hcLight:(0,n.JO)(r,.7)},s.kg(1759,"Foreground color for description text providing additional information, for example for a label.")),l=(0,n.x1)("icon.foreground",{dark:"#C5C5C5",light:"#424242",hcDark:"#FFFFFF",hcLight:"#292929"},s.kg(1760,"The default color for icons in the workbench.")),h=(0,n.x1)("focusBorder",{dark:"#007FD4",light:"#0090F1",hcDark:"#F38518",hcLight:"#006BBD"},s.kg(1761,"Overall border color for focused elements. This color is only used if not overridden by a component.")),d=(0,n.x1)("contrastBorder",{light:null,dark:null,hcDark:"#6FC3DF",hcLight:"#0F4A85"},s.kg(1762,"An extra border around elements to separate them from others for greater contrast.")),c=(0,n.x1)("contrastActiveBorder",{light:null,dark:null,hcDark:h,hcLight:h},s.kg(1763,"An extra border around active elements to separate them from others for greater contrast."));(0,n.x1)("selection.background",null,s.kg(1764,"The background color of text selections in the workbench (e.g. for input fields or text areas). Note that this does not apply to selections within the editor."));let u=(0,n.x1)("textLink.foreground",{light:"#006AB1",dark:"#3794FF",hcDark:"#21A6FF",hcLight:"#0F4A85"},s.kg(1765,"Foreground color for links in text."));(0,n.x1)("textLink.activeForeground",{light:"#006AB1",dark:"#3794FF",hcDark:"#21A6FF",hcLight:"#0F4A85"},s.kg(1766,"Foreground color for links in text when clicked on and on mouse hover.")),(0,n.x1)("textSeparator.foreground",{light:"#0000002e",dark:"#ffffff2e",hcDark:o.Q1.black,hcLight:"#292929"},s.kg(1767,"Color for text separators.")),(0,n.x1)("textPreformat.foreground",{light:"#A31515",dark:"#D7BA7D",hcDark:"#000000",hcLight:"#FFFFFF"},s.kg(1768,"Foreground color for preformatted text segments.")),(0,n.x1)("textPreformat.background",{light:"#0000001A",dark:"#FFFFFF1A",hcDark:"#FFFFFF",hcLight:"#09345f"},s.kg(1769,"Background color for preformatted text segments.")),(0,n.x1)("textBlockQuote.background",{light:"#f2f2f2",dark:"#222222",hcDark:null,hcLight:"#F2F2F2"},s.kg(1770,"Background color for block quotes in text.")),(0,n.x1)("textBlockQuote.border",{light:"#007acc80",dark:"#007acc80",hcDark:o.Q1.white,hcLight:"#292929"},s.kg(1771,"Border color for block quotes in text.")),(0,n.x1)("textCodeBlock.background",{light:"#dcdcdc66",dark:"#0a0a0a66",hcDark:o.Q1.black,hcLight:"#F2F2F2"},s.kg(1772,"Background color for code blocks in text.")),(0,n.x1)("sash.hoverBorder",h,s.kg(1977,"Border color of active sashes."));let g=(0,n.x1)("badge.background",{dark:"#4D4D4D",light:"#C4C4C4",hcDark:o.Q1.black,hcLight:"#0F4A85"},s.kg(1978,"Badge background color. Badges are small information labels, e.g. for search results count.")),p=(0,n.x1)("badge.foreground",{dark:o.Q1.white,light:"#333",hcDark:o.Q1.white,hcLight:o.Q1.white},s.kg(1979,"Badge foreground color. Badges are small information labels, e.g. for search results count."));(0,n.x1)("activityWarningBadge.foreground",{dark:o.Q1.black.lighten(.2),light:o.Q1.white,hcDark:null,hcLight:o.Q1.black.lighten(.2)},s.kg(1980,"Foreground color of the warning activity badge")),(0,n.x1)("activityWarningBadge.background",{dark:"#CCA700",light:"#BF8803",hcDark:null,hcLight:"#CCA700"},s.kg(1981,"Background color of the warning activity badge")),(0,n.x1)("activityErrorBadge.foreground",{dark:o.Q1.black.lighten(.2),light:o.Q1.white,hcDark:null,hcLight:o.Q1.black.lighten(.2)},s.kg(1982,"Foreground color of the error activity badge")),(0,n.x1)("activityErrorBadge.background",{dark:"#F14C4C",light:"#E51400",hcDark:null,hcLight:"#F14C4C"},s.kg(1983,"Background color of the error activity badge"));let m=(0,n.x1)("scrollbar.shadow",{dark:"#000000",light:"#DDDDDD",hcDark:null,hcLight:null},s.kg(1984,"Scrollbar shadow to indicate that the view is scrolled.")),f=(0,n.x1)("scrollbarSlider.background",{dark:o.Q1.fromHex("#797979").transparent(.4),light:o.Q1.fromHex("#646464").transparent(.4),hcDark:(0,n.JO)(d,.6),hcLight:(0,n.JO)(d,.4)},s.kg(1985,"Scrollbar slider background color.")),_=(0,n.x1)("scrollbarSlider.hoverBackground",{dark:o.Q1.fromHex("#646464").transparent(.7),light:o.Q1.fromHex("#646464").transparent(.7),hcDark:(0,n.JO)(d,.8),hcLight:(0,n.JO)(d,.8)},s.kg(1986,"Scrollbar slider background color when hovering.")),v=(0,n.x1)("scrollbarSlider.activeBackground",{dark:o.Q1.fromHex("#BFBFBF").transparent(.4),light:o.Q1.fromHex("#000000").transparent(.6),hcDark:d,hcLight:d},s.kg(1987,"Scrollbar slider background color when clicked on.")),b=(0,n.x1)("progressBar.background",{dark:o.Q1.fromHex("#0E70C0"),light:o.Q1.fromHex("#0E70C0"),hcDark:d,hcLight:d},s.kg(1988,"Background color of the progress bar that can show for long running operations."));(0,n.x1)("chart.line",{dark:"#236B8E",light:"#236B8E",hcDark:"#236B8E",hcLight:"#236B8E"},s.kg(1989,"Line color for the chart.")),(0,n.x1)("chart.axis",{dark:o.Q1.fromHex("#BFBFBF").transparent(.4),light:o.Q1.fromHex("#000000").transparent(.6),hcDark:d,hcLight:d},s.kg(1990,"Axis color for the chart.")),(0,n.x1)("chart.guide",{dark:o.Q1.fromHex("#BFBFBF").transparent(.2),light:o.Q1.fromHex("#000000").transparent(.2),hcDark:d,hcLight:d},s.kg(1991,"Guide line for the chart."));let C=(0,n.x1)("editor.background",{light:"#ffffff",dark:"#1E1E1E",hcDark:o.Q1.black,hcLight:o.Q1.white},s.kg(1781,"Editor background color.")),w=(0,n.x1)("editor.foreground",{light:"#333333",dark:"#BBBBBB",hcDark:o.Q1.white,hcLight:r},s.kg(1782,"Editor default foreground color."));(0,n.x1)("editorStickyScroll.background",C,s.kg(1783,"Background color of sticky scroll in the editor")),(0,n.x1)("editorStickyScrollGutter.background",C,s.kg(1784,"Background color of the gutter part of sticky scroll in the editor")),(0,n.x1)("editorStickyScrollHover.background",{dark:"#2A2D2E",light:"#F0F0F0",hcDark:null,hcLight:o.Q1.fromHex("#0F4A85").transparent(.1)},s.kg(1785,"Background color of sticky scroll on hover in the editor")),(0,n.x1)("editorStickyScroll.border",{dark:null,light:null,hcDark:d,hcLight:d},s.kg(1786,"Border color of sticky scroll in the editor")),(0,n.x1)("editorStickyScroll.shadow",m,s.kg(1787," Shadow color of sticky scroll in the editor"));let y=(0,n.x1)("editorWidget.background",{dark:"#252526",light:"#F3F3F3",hcDark:"#0C141F",hcLight:o.Q1.white},s.kg(1788,"Background color of editor widgets, such as find/replace.")),S=(0,n.x1)("editorWidget.foreground",r,s.kg(1789,"Foreground color of editor widgets, such as find/replace.")),k=(0,n.x1)("editorWidget.border",{dark:"#454545",light:"#C8C8C8",hcDark:d,hcLight:d},s.kg(1790,"Border color of editor widgets. The color is only used if the widget chooses to have a border and if the color is not overridden by a widget."));(0,n.x1)("editorWidget.resizeBorder",null,s.kg(1791,"Border color of the resize bar of editor widgets. The color is only used if the widget chooses to have a resize border and if the color is not overridden by a widget.")),(0,n.x1)("editorError.background",null,s.kg(1792,"Background color of error text in the editor. The color must not be opaque so as not to hide underlying decorations."),!0);let x=(0,n.x1)("editorError.foreground",{dark:"#F14C4C",light:"#E51400",hcDark:"#F48771",hcLight:"#B5200D"},s.kg(1793,"Foreground color of error squigglies in the editor.")),L=(0,n.x1)("editorError.border",{dark:null,light:null,hcDark:o.Q1.fromHex("#E47777").transparent(.8),hcLight:"#B5200D"},s.kg(1794,"If set, color of double underlines for errors in the editor.")),D=(0,n.x1)("editorWarning.background",null,s.kg(1795,"Background color of warning text in the editor. The color must not be opaque so as not to hide underlying decorations."),!0),I=(0,n.x1)("editorWarning.foreground",{dark:"#CCA700",light:"#BF8803",hcDark:"#FFD370",hcLight:"#895503"},s.kg(1796,"Foreground color of warning squigglies in the editor.")),N=(0,n.x1)("editorWarning.border",{dark:null,light:null,hcDark:o.Q1.fromHex("#FFCC00").transparent(.8),hcLight:o.Q1.fromHex("#FFCC00").transparent(.8)},s.kg(1797,"If set, color of double underlines for warnings in the editor."));(0,n.x1)("editorInfo.background",null,s.kg(1798,"Background color of info text in the editor. The color must not be opaque so as not to hide underlying decorations."),!0);let E=(0,n.x1)("editorInfo.foreground",{dark:"#3794FF",light:"#1a85ff",hcDark:"#3794FF",hcLight:"#1a85ff"},s.kg(1799,"Foreground color of info squigglies in the editor.")),M=(0,n.x1)("editorInfo.border",{dark:null,light:null,hcDark:o.Q1.fromHex("#3794FF").transparent(.8),hcLight:"#292929"},s.kg(1800,"If set, color of double underlines for infos in the editor.")),T=(0,n.x1)("editorHint.foreground",{dark:o.Q1.fromHex("#eeeeee").transparent(.7),light:"#6c6c6c",hcDark:null,hcLight:null},s.kg(1801,"Foreground color of hint squigglies in the editor."));(0,n.x1)("editorHint.border",{dark:null,light:null,hcDark:o.Q1.fromHex("#eeeeee").transparent(.8),hcLight:"#292929"},s.kg(1802,"If set, color of double underlines for hints in the editor."));let R=(0,n.x1)("editorLink.activeForeground",{dark:"#4E94CE",light:o.Q1.blue,hcDark:o.Q1.cyan,hcLight:"#292929"},s.kg(1803,"Color of active links.")),O=(0,n.x1)("editor.selectionBackground",{light:"#ADD6FF",dark:"#264F78",hcDark:"#f3f518",hcLight:"#0F4A85"},s.kg(1804,"Color of the editor selection.")),P=(0,n.x1)("editor.selectionForeground",{light:null,dark:null,hcDark:"#000000",hcLight:o.Q1.white},s.kg(1805,"Color of the selected text for high contrast.")),A=(0,n.x1)("editor.inactiveSelectionBackground",{light:(0,n.JO)(O,.5),dark:(0,n.JO)(O,.5),hcDark:(0,n.JO)(O,.7),hcLight:(0,n.JO)(O,.5)},s.kg(1806,"Color of the selection in an inactive editor. The color must not be opaque so as not to hide underlying decorations."),!0),F=(0,n.x1)("editor.selectionHighlightBackground",{light:(0,n.oG)(O,C,.3,.6),dark:(0,n.oG)(O,C,.3,.6),hcDark:null,hcLight:null},s.kg(1807,"Color for regions with the same content as the selection. The color must not be opaque so as not to hide underlying decorations."),!0);(0,n.x1)("editor.selectionHighlightBorder",{light:null,dark:null,hcDark:c,hcLight:c},s.kg(1808,"Border color for regions with the same content as the selection.")),(0,n.x1)("editor.compositionBorder",{light:"#000000",dark:"#ffffff",hcLight:"#000000",hcDark:"#ffffff"},s.kg(1809,"The border color for an IME composition.")),(0,n.x1)("editor.findMatchBackground",{light:"#A8AC94",dark:"#515C6A",hcDark:null,hcLight:null},s.kg(1810,"Color of the current search match."));let B=(0,n.x1)("editor.findMatchForeground",null,s.kg(1811,"Text color of the current search match.")),W=(0,n.x1)("editor.findMatchHighlightBackground",{light:"#EA5C0055",dark:"#EA5C0055",hcDark:null,hcLight:null},s.kg(1812,"Color of the other search matches. The color must not be opaque so as not to hide underlying decorations."),!0),H=(0,n.x1)("editor.findMatchHighlightForeground",null,s.kg(1813,"Foreground color of the other search matches."),!0);(0,n.x1)("editor.findRangeHighlightBackground",{dark:"#3a3d4166",light:"#b4b4b44d",hcDark:null,hcLight:null},s.kg(1814,"Color of the range limiting the search. The color must not be opaque so as not to hide underlying decorations."),!0),(0,n.x1)("editor.findMatchBorder",{light:null,dark:null,hcDark:c,hcLight:c},s.kg(1815,"Border color of the current search match."));let V=(0,n.x1)("editor.findMatchHighlightBorder",{light:null,dark:null,hcDark:c,hcLight:c},s.kg(1816,"Border color of the other search matches.")),z=(0,n.x1)("editor.findRangeHighlightBorder",{dark:null,light:null,hcDark:(0,n.JO)(c,.4),hcLight:(0,n.JO)(c,.4)},s.kg(1817,"Border color of the range limiting the search. The color must not be opaque so as not to hide underlying decorations."),!0);(0,n.x1)("editor.hoverHighlightBackground",{light:"#ADD6FF26",dark:"#264f7840",hcDark:"#ADD6FF26",hcLight:null},s.kg(1818,"Highlight below the word for which a hover is shown. The color must not be opaque so as not to hide underlying decorations."),!0);let U=(0,n.x1)("editorHoverWidget.background",y,s.kg(1819,"Background color of the editor hover.")),j=(0,n.x1)("editorHoverWidget.foreground",S,s.kg(1820,"Foreground color of the editor hover.")),$=(0,n.x1)("editorHoverWidget.border",k,s.kg(1821,"Border color of the editor hover."));(0,n.x1)("editorHoverWidget.statusBarBackground",{dark:(0,n.a)(U,.2),light:(0,n.e$)(U,.05),hcDark:y,hcLight:y},s.kg(1822,"Background color of the editor hover status bar."));let K=(0,n.x1)("editorInlayHint.foreground",{dark:"#969696",light:"#969696",hcDark:o.Q1.white,hcLight:o.Q1.black},s.kg(1823,"Foreground color of inline hints")),G=(0,n.x1)("editorInlayHint.background",{dark:(0,n.JO)(g,.1),light:(0,n.JO)(g,.1),hcDark:(0,n.JO)(o.Q1.white,.1),hcLight:(0,n.JO)(g,.1)},s.kg(1824,"Background color of inline hints")),q=(0,n.x1)("editorInlayHint.typeForeground",K,s.kg(1825,"Foreground color of inline hints for types")),Q=(0,n.x1)("editorInlayHint.typeBackground",G,s.kg(1826,"Background color of inline hints for types")),Y=(0,n.x1)("editorInlayHint.parameterForeground",K,s.kg(1827,"Foreground color of inline hints for parameters")),Z=(0,n.x1)("editorInlayHint.parameterBackground",G,s.kg(1828,"Background color of inline hints for parameters")),X=(0,n.x1)("editorLightBulb.foreground",{dark:"#FFCC00",light:"#DDB100",hcDark:"#FFCC00",hcLight:"#007ACC"},s.kg(1829,"The color used for the lightbulb actions icon."));(0,n.x1)("editorLightBulbAutoFix.foreground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},s.kg(1830,"The color used for the lightbulb auto fix actions icon.")),(0,n.x1)("editorLightBulbAi.foreground",X,s.kg(1831,"The color used for the lightbulb AI icon.")),(0,n.x1)("editor.snippetTabstopHighlightBackground",{dark:new o.Q1(new o.bU(124,124,124,.3)),light:new o.Q1(new o.bU(10,50,100,.2)),hcDark:new o.Q1(new o.bU(124,124,124,.3)),hcLight:new o.Q1(new o.bU(10,50,100,.2))},s.kg(1832,"Highlight background color of a snippet tabstop.")),(0,n.x1)("editor.snippetTabstopHighlightBorder",null,s.kg(1833,"Highlight border color of a snippet tabstop.")),(0,n.x1)("editor.snippetFinalTabstopHighlightBackground",null,s.kg(1834,"Highlight background color of the final tabstop of a snippet.")),(0,n.x1)("editor.snippetFinalTabstopHighlightBorder",{dark:"#525252",light:new o.Q1(new o.bU(10,50,100,.5)),hcDark:"#525252",hcLight:"#292929"},s.kg(1835,"Highlight border color of the final tabstop of a snippet."));let J=new o.Q1(new o.bU(155,185,85,.2)),ee=new o.Q1(new o.bU(255,0,0,.2)),et=(0,n.x1)("diffEditor.insertedTextBackground",{dark:"#9ccc2c33",light:"#9ccc2c40",hcDark:null,hcLight:null},s.kg(1836,"Background color for text that got inserted. The color must not be opaque so as not to hide underlying decorations."),!0),ei=(0,n.x1)("diffEditor.removedTextBackground",{dark:"#ff000033",light:"#ff000033",hcDark:null,hcLight:null},s.kg(1837,"Background color for text that got removed. The color must not be opaque so as not to hide underlying decorations."),!0),en=(0,n.x1)("diffEditor.insertedLineBackground",{dark:J,light:J,hcDark:null,hcLight:null},s.kg(1838,"Background color for lines that got inserted. The color must not be opaque so as not to hide underlying decorations."),!0);(0,n.x1)("diffEditor.removedLineBackground",{dark:ee,light:ee,hcDark:null,hcLight:null},s.kg(1839,"Background color for lines that got removed. The color must not be opaque so as not to hide underlying decorations."),!0),(0,n.x1)("diffEditorGutter.insertedLineBackground",null,s.kg(1840,"Background color for the margin where lines got inserted.")),(0,n.x1)("diffEditorGutter.removedLineBackground",null,s.kg(1841,"Background color for the margin where lines got removed."));let es=(0,n.x1)("diffEditorOverview.insertedForeground",null,s.kg(1842,"Diff overview ruler foreground for inserted content.")),eo=(0,n.x1)("diffEditorOverview.removedForeground",null,s.kg(1843,"Diff overview ruler foreground for removed content."));(0,n.x1)("diffEditor.insertedTextBorder",{dark:null,light:null,hcDark:"#33ff2eff",hcLight:"#374E06"},s.kg(1844,"Outline color for the text that got inserted.")),(0,n.x1)("diffEditor.removedTextBorder",{dark:null,light:null,hcDark:"#FF008F",hcLight:"#AD0707"},s.kg(1845,"Outline color for text that got removed.")),(0,n.x1)("diffEditor.border",{dark:null,light:null,hcDark:d,hcLight:d},s.kg(1846,"Border color between the two text editors.")),(0,n.x1)("diffEditor.diagonalFill",{dark:"#cccccc33",light:"#22222233",hcDark:null,hcLight:null},s.kg(1847,"Color of the diff editor's diagonal fill. The diagonal fill is used in side-by-side diff views.")),(0,n.x1)("diffEditor.unchangedRegionBackground","sideBar.background",s.kg(1848,"The background color of unchanged blocks in the diff editor.")),(0,n.x1)("diffEditor.unchangedRegionForeground","foreground",s.kg(1849,"The foreground color of unchanged blocks in the diff editor.")),(0,n.x1)("diffEditor.unchangedCodeBackground",{dark:"#74747429",light:"#b8b8b829",hcDark:null,hcLight:null},s.kg(1850,"The background color of unchanged code in the diff editor."));let er=(0,n.x1)("widget.shadow",{dark:(0,n.JO)(o.Q1.black,.36),light:(0,n.JO)(o.Q1.black,.16),hcDark:null,hcLight:null},s.kg(1851,"Shadow color of widgets such as find/replace inside the editor.")),ea=(0,n.x1)("widget.border",{dark:null,light:null,hcDark:d,hcLight:d},s.kg(1852,"Border color of widgets such as find/replace inside the editor.")),el=(0,n.x1)("toolbar.hoverBackground",{dark:"#5a5d5e50",light:"#b8b8b850",hcDark:null,hcLight:null},s.kg(1853,"Toolbar background when hovering over actions using the mouse"));(0,n.x1)("toolbar.hoverOutline",{dark:null,light:null,hcDark:c,hcLight:c},s.kg(1854,"Toolbar outline when hovering over actions using the mouse")),(0,n.x1)("toolbar.activeBackground",{dark:(0,n.a)(el,.1),light:(0,n.e$)(el,.1),hcDark:null,hcLight:null},s.kg(1855,"Toolbar background when holding the mouse over actions"));let eh=(0,n.x1)("breadcrumb.foreground",(0,n.JO)(r,.8),s.kg(1856,"Color of focused breadcrumb items.")),ed=(0,n.x1)("breadcrumb.background",C,s.kg(1857,"Background color of breadcrumb items.")),ec=(0,n.x1)("breadcrumb.focusForeground",{light:(0,n.e$)(r,.2),dark:(0,n.a)(r,.1),hcDark:(0,n.a)(r,.1),hcLight:(0,n.a)(r,.1)},s.kg(1858,"Color of focused breadcrumb items.")),eu=(0,n.x1)("breadcrumb.activeSelectionForeground",{light:(0,n.e$)(r,.2),dark:(0,n.a)(r,.1),hcDark:(0,n.a)(r,.1),hcLight:(0,n.a)(r,.1)},s.kg(1859,"Color of selected breadcrumb items."));(0,n.x1)("breadcrumbPicker.background",y,s.kg(1860,"Background color of breadcrumb item picker."));let eg=o.Q1.fromHex("#40C8AE").transparent(.5),ep=o.Q1.fromHex("#40A6FF").transparent(.5),em=o.Q1.fromHex("#606060").transparent(.4),ef=(0,n.x1)("merge.currentHeaderBackground",{dark:eg,light:eg,hcDark:null,hcLight:null},s.kg(1861,"Current header background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0);(0,n.x1)("merge.currentContentBackground",(0,n.JO)(ef,.4),s.kg(1862,"Current content background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0);let e_=(0,n.x1)("merge.incomingHeaderBackground",{dark:ep,light:ep,hcDark:null,hcLight:null},s.kg(1863,"Incoming header background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0);(0,n.x1)("merge.incomingContentBackground",(0,n.JO)(e_,.4),s.kg(1864,"Incoming content background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0);let ev=(0,n.x1)("merge.commonHeaderBackground",{dark:em,light:em,hcDark:null,hcLight:null},s.kg(1865,"Common ancestor header background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0);(0,n.x1)("merge.commonContentBackground",(0,n.JO)(ev,.4),s.kg(1866,"Common ancestor content background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0);let eb=(0,n.x1)("merge.border",{dark:null,light:null,hcDark:"#C3DF6F",hcLight:"#007ACC"},s.kg(1867,"Border color on headers and the splitter in inline merge-conflicts."));(0,n.x1)("editorOverviewRuler.currentContentForeground",{dark:(0,n.JO)(ef,1),light:(0,n.JO)(ef,1),hcDark:eb,hcLight:eb},s.kg(1868,"Current overview ruler foreground for inline merge-conflicts.")),(0,n.x1)("editorOverviewRuler.incomingContentForeground",{dark:(0,n.JO)(e_,1),light:(0,n.JO)(e_,1),hcDark:eb,hcLight:eb},s.kg(1869,"Incoming overview ruler foreground for inline merge-conflicts.")),(0,n.x1)("editorOverviewRuler.commonContentForeground",{dark:(0,n.JO)(ev,1),light:(0,n.JO)(ev,1),hcDark:eb,hcLight:eb},s.kg(1870,"Common ancestor overview ruler foreground for inline merge-conflicts."));let eC=(0,n.x1)("editorOverviewRuler.findMatchForeground",{dark:"#d186167e",light:"#d186167e",hcDark:"#AB5A00",hcLight:"#AB5A00"},s.kg(1871,"Overview ruler marker color for find matches. The color must not be opaque so as not to hide underlying decorations."),!0),ew=(0,n.x1)("editorOverviewRuler.selectionHighlightForeground","#A0A0A0CC",s.kg(1872,"Overview ruler marker color for selection highlights. The color must not be opaque so as not to hide underlying decorations."),!0),ey=(0,n.x1)("problemsErrorIcon.foreground",x,s.kg(1873,"The color used for the problems error icon.")),eS=(0,n.x1)("problemsWarningIcon.foreground",I,s.kg(1874,"The color used for the problems warning icon.")),ek=(0,n.x1)("problemsInfoIcon.foreground",E,s.kg(1875,"The color used for the problems info icon.")),ex=(0,n.x1)("minimap.findMatchHighlight",{light:"#d18616",dark:"#d18616",hcDark:"#AB5A00",hcLight:"#0F4A85"},s.kg(1966,"Minimap marker color for find matches."),!0),eL=(0,n.x1)("minimap.selectionOccurrenceHighlight",{light:"#c9c9c9",dark:"#676767",hcDark:"#ffffff",hcLight:"#0F4A85"},s.kg(1967,"Minimap marker color for repeating editor selections."),!0),eD=(0,n.x1)("minimap.selectionHighlight",{light:"#ADD6FF",dark:"#264F78",hcDark:"#ffffff",hcLight:"#0F4A85"},s.kg(1968,"Minimap marker color for the editor selection."),!0),eI=(0,n.x1)("minimap.infoHighlight",{dark:E,light:E,hcDark:M,hcLight:M},s.kg(1969,"Minimap marker color for infos.")),eN=(0,n.x1)("minimap.warningHighlight",{dark:I,light:I,hcDark:N,hcLight:N},s.kg(1970,"Minimap marker color for warnings.")),eE=(0,n.x1)("minimap.errorHighlight",{dark:new o.Q1(new o.bU(255,18,18,.7)),light:new o.Q1(new o.bU(255,18,18,.7)),hcDark:new o.Q1(new o.bU(255,50,50,1)),hcLight:"#B5200D"},s.kg(1971,"Minimap marker color for errors.")),eM=(0,n.x1)("minimap.background",null,s.kg(1972,"Minimap background color.")),eT=(0,n.x1)("minimap.foregroundOpacity",o.Q1.fromHex("#000f"),s.kg(1973,'Opacity of foreground elements rendered in the minimap. For example, "#000000c0" will render the elements with 75% opacity.'));(0,n.x1)("minimapSlider.background",(0,n.JO)(f,.5),s.kg(1974,"Minimap slider background color.")),(0,n.x1)("minimapSlider.hoverBackground",(0,n.JO)(_,.5),s.kg(1975,"Minimap slider background color when hovering.")),(0,n.x1)("minimapSlider.activeBackground",(0,n.JO)(v,.5),s.kg(1976,"Minimap slider background color when clicked on.")),(0,n.x1)("charts.foreground",r,s.kg(1773,"The foreground color used in charts.")),(0,n.x1)("charts.lines",(0,n.JO)(r,.5),s.kg(1774,"The color used for horizontal lines in charts.")),(0,n.x1)("charts.red",x,s.kg(1775,"The red color used in chart visualizations.")),(0,n.x1)("charts.blue",E,s.kg(1776,"The blue color used in chart visualizations.")),(0,n.x1)("charts.yellow",I,s.kg(1777,"The yellow color used in chart visualizations.")),(0,n.x1)("charts.orange",ex,s.kg(1778,"The orange color used in chart visualizations.")),(0,n.x1)("charts.green",{dark:"#89D185",light:"#388A34",hcDark:"#89D185",hcLight:"#374e06"},s.kg(1779,"The green color used in chart visualizations.")),(0,n.x1)("charts.purple",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},s.kg(1780,"The purple color used in chart visualizations."));let eR=(0,n.x1)("input.background",{dark:"#3C3C3C",light:o.Q1.white,hcDark:o.Q1.black,hcLight:o.Q1.white},s.kg(1876,"Input box background.")),eO=(0,n.x1)("input.foreground",r,s.kg(1877,"Input box foreground.")),eP=(0,n.x1)("input.border",{dark:null,light:null,hcDark:d,hcLight:d},s.kg(1878,"Input box border.")),eA=(0,n.x1)("inputOption.activeBorder",{dark:"#007ACC",light:"#007ACC",hcDark:d,hcLight:d},s.kg(1879,"Border color of activated options in input fields.")),eF=(0,n.x1)("inputOption.hoverBackground",{dark:"#5a5d5e80",light:"#b8b8b850",hcDark:null,hcLight:null},s.kg(1880,"Background color of activated options in input fields.")),eB=(0,n.x1)("inputOption.activeBackground",{dark:(0,n.JO)(h,.4),light:(0,n.JO)(h,.2),hcDark:o.Q1.transparent,hcLight:o.Q1.transparent},s.kg(1881,"Background hover color of options in input fields.")),eW=(0,n.x1)("inputOption.activeForeground",{dark:o.Q1.white,light:o.Q1.black,hcDark:r,hcLight:r},s.kg(1882,"Foreground color of activated options in input fields."));(0,n.x1)("input.placeholderForeground",{light:(0,n.JO)(r,.5),dark:(0,n.JO)(r,.5),hcDark:(0,n.JO)(r,.7),hcLight:(0,n.JO)(r,.7)},s.kg(1883,"Input box foreground color for placeholder text."));let eH=(0,n.x1)("inputValidation.infoBackground",{dark:"#063B49",light:"#D6ECF2",hcDark:o.Q1.black,hcLight:o.Q1.white},s.kg(1884,"Input validation background color for information severity.")),eV=(0,n.x1)("inputValidation.infoForeground",{dark:null,light:null,hcDark:null,hcLight:r},s.kg(1885,"Input validation foreground color for information severity.")),ez=(0,n.x1)("inputValidation.infoBorder",{dark:"#007acc",light:"#007acc",hcDark:d,hcLight:d},s.kg(1886,"Input validation border color for information severity.")),eU=(0,n.x1)("inputValidation.warningBackground",{dark:"#352A05",light:"#F6F5D2",hcDark:o.Q1.black,hcLight:o.Q1.white},s.kg(1887,"Input validation background color for warning severity.")),ej=(0,n.x1)("inputValidation.warningForeground",{dark:null,light:null,hcDark:null,hcLight:r},s.kg(1888,"Input validation foreground color for warning severity.")),e$=(0,n.x1)("inputValidation.warningBorder",{dark:"#B89500",light:"#B89500",hcDark:d,hcLight:d},s.kg(1889,"Input validation border color for warning severity.")),eK=(0,n.x1)("inputValidation.errorBackground",{dark:"#5A1D1D",light:"#F2DEDE",hcDark:o.Q1.black,hcLight:o.Q1.white},s.kg(1890,"Input validation background color for error severity.")),eG=(0,n.x1)("inputValidation.errorForeground",{dark:null,light:null,hcDark:null,hcLight:r},s.kg(1891,"Input validation foreground color for error severity.")),eq=(0,n.x1)("inputValidation.errorBorder",{dark:"#BE1100",light:"#BE1100",hcDark:d,hcLight:d},s.kg(1892,"Input validation border color for error severity.")),eQ=(0,n.x1)("dropdown.background",{dark:"#3C3C3C",light:o.Q1.white,hcDark:o.Q1.black,hcLight:o.Q1.white},s.kg(1893,"Dropdown background.")),eY=(0,n.x1)("dropdown.listBackground",{dark:null,light:null,hcDark:o.Q1.black,hcLight:o.Q1.white},s.kg(1894,"Dropdown list background.")),eZ=(0,n.x1)("dropdown.foreground",{dark:"#F0F0F0",light:r,hcDark:o.Q1.white,hcLight:r},s.kg(1895,"Dropdown foreground.")),eX=(0,n.x1)("dropdown.border",{dark:eQ,light:"#CECECE",hcDark:d,hcLight:d},s.kg(1896,"Dropdown border.")),eJ=(0,n.x1)("button.foreground",o.Q1.white,s.kg(1897,"Button foreground color.")),e0=(0,n.x1)("button.separator",(0,n.JO)(eJ,.4),s.kg(1898,"Button separator color.")),e1=(0,n.x1)("button.background",{dark:"#0E639C",light:"#007ACC",hcDark:null,hcLight:"#0F4A85"},s.kg(1899,"Button background color.")),e2=(0,n.x1)("button.hoverBackground",{dark:(0,n.a)(e1,.2),light:(0,n.e$)(e1,.2),hcDark:e1,hcLight:e1},s.kg(1900,"Button background color when hovering.")),e5=(0,n.x1)("button.border",d,s.kg(1901,"Button border color.")),e4=(0,n.x1)("button.secondaryForeground",{dark:o.Q1.white,light:o.Q1.white,hcDark:o.Q1.white,hcLight:r},s.kg(1902,"Secondary button foreground color.")),e3=(0,n.x1)("button.secondaryBackground",{dark:"#3A3D41",light:"#5F6A79",hcDark:null,hcLight:o.Q1.white},s.kg(1903,"Secondary button background color.")),e7=(0,n.x1)("button.secondaryHoverBackground",{dark:(0,n.a)(e3,.2),light:(0,n.e$)(e3,.2),hcDark:null,hcLight:null},s.kg(1904,"Secondary button background color when hovering.")),e9=(0,n.x1)("radio.activeForeground",eW,s.kg(1905,"Foreground color of active radio option.")),e8=(0,n.x1)("radio.activeBackground",eB,s.kg(1906,"Background color of active radio option.")),e6=(0,n.x1)("radio.activeBorder",eA,s.kg(1907,"Border color of the active radio option.")),te=(0,n.x1)("radio.inactiveForeground",null,s.kg(1908,"Foreground color of inactive radio option.")),tt=(0,n.x1)("radio.inactiveBackground",null,s.kg(1909,"Background color of inactive radio option.")),ti=(0,n.x1)("radio.inactiveBorder",{light:(0,n.JO)(e9,.2),dark:(0,n.JO)(e9,.2),hcDark:(0,n.JO)(e9,.4),hcLight:(0,n.JO)(e9,.2)},s.kg(1910,"Border color of the inactive radio option.")),tn=(0,n.x1)("radio.inactiveHoverBackground",eF,s.kg(1911,"Background color of inactive active radio option when hovering.")),ts=(0,n.x1)("checkbox.background",eQ,s.kg(1912,"Background color of checkbox widget."));(0,n.x1)("checkbox.selectBackground",y,s.kg(1913,"Background color of checkbox widget when the element it's in is selected."));let to=(0,n.x1)("checkbox.foreground",eZ,s.kg(1914,"Foreground color of checkbox widget.")),tr=(0,n.x1)("checkbox.border",eX,s.kg(1915,"Border color of checkbox widget."));(0,n.x1)("checkbox.selectBorder",l,s.kg(1916,"Border color of checkbox widget when the element it's in is selected."));let ta=(0,n.x1)("checkbox.disabled.background",{op:7,color:ts,with:to,ratio:.33},s.kg(1917,"Background of a disabled checkbox.")),tl=(0,n.x1)("checkbox.disabled.foreground",{op:7,color:to,with:ts,ratio:.33},s.kg(1918,"Foreground of a disabled checkbox.")),th=(0,n.x1)("keybindingLabel.background",{dark:new o.Q1(new o.bU(128,128,128,.17)),light:new o.Q1(new o.bU(221,221,221,.4)),hcDark:o.Q1.transparent,hcLight:o.Q1.transparent},s.kg(1919,"Keybinding label background color. The keybinding label is used to represent a keyboard shortcut.")),td=(0,n.x1)("keybindingLabel.foreground",{dark:o.Q1.fromHex("#CCCCCC"),light:o.Q1.fromHex("#555555"),hcDark:o.Q1.white,hcLight:r},s.kg(1920,"Keybinding label foreground color. The keybinding label is used to represent a keyboard shortcut.")),tc=(0,n.x1)("keybindingLabel.border",{dark:new o.Q1(new o.bU(51,51,51,.6)),light:new o.Q1(new o.bU(204,204,204,.4)),hcDark:new o.Q1(new o.bU(111,195,223)),hcLight:d},s.kg(1921,"Keybinding label border color. The keybinding label is used to represent a keyboard shortcut.")),tu=(0,n.x1)("keybindingLabel.bottomBorder",{dark:new o.Q1(new o.bU(68,68,68,.6)),light:new o.Q1(new o.bU(187,187,187,.4)),hcDark:new o.Q1(new o.bU(111,195,223)),hcLight:r},s.kg(1922,"Keybinding label border bottom color. The keybinding label is used to represent a keyboard shortcut.")),tg=(0,n.x1)("list.focusBackground",null,s.kg(1923,"List/Tree background color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),tp=(0,n.x1)("list.focusForeground",null,s.kg(1924,"List/Tree foreground color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),tm=(0,n.x1)("list.focusOutline",{dark:h,light:h,hcDark:c,hcLight:c},s.kg(1925,"List/Tree outline color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),tf=(0,n.x1)("list.focusAndSelectionOutline",null,s.kg(1926,"List/Tree outline color for the focused item when the list/tree is active and selected. An active list/tree has keyboard focus, an inactive does not.")),t_=(0,n.x1)("list.activeSelectionBackground",{dark:"#04395E",light:"#0060C0",hcDark:null,hcLight:o.Q1.fromHex("#0F4A85").transparent(.1)},s.kg(1927,"List/Tree background color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),tv=(0,n.x1)("list.activeSelectionForeground",{dark:o.Q1.white,light:o.Q1.white,hcDark:null,hcLight:null},s.kg(1928,"List/Tree foreground color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),tb=(0,n.x1)("list.activeSelectionIconForeground",null,s.kg(1929,"List/Tree icon foreground color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),tC=(0,n.x1)("list.inactiveSelectionBackground",{dark:"#37373D",light:"#E4E6F1",hcDark:null,hcLight:o.Q1.fromHex("#0F4A85").transparent(.1)},s.kg(1930,"List/Tree background color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),tw=(0,n.x1)("list.inactiveSelectionForeground",null,s.kg(1931,"List/Tree foreground color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),ty=(0,n.x1)("list.inactiveSelectionIconForeground",null,s.kg(1932,"List/Tree icon foreground color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),tS=(0,n.x1)("list.inactiveFocusBackground",null,s.kg(1933,"List/Tree background color for the focused item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),tk=(0,n.x1)("list.inactiveFocusOutline",null,s.kg(1934,"List/Tree outline color for the focused item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),tx=(0,n.x1)("list.hoverBackground",{dark:"#2A2D2E",light:"#F0F0F0",hcDark:o.Q1.white.transparent(.1),hcLight:o.Q1.fromHex("#0F4A85").transparent(.1)},s.kg(1935,"List/Tree background when hovering over items using the mouse.")),tL=(0,n.x1)("list.hoverForeground",null,s.kg(1936,"List/Tree foreground when hovering over items using the mouse.")),tD=(0,n.x1)("list.dropBackground",{dark:"#062F4A",light:"#D6EBFF",hcDark:null,hcLight:null},s.kg(1937,"List/Tree drag and drop background when moving items over other items when using the mouse.")),tI=(0,n.x1)("list.dropBetweenBackground",{dark:l,light:l,hcDark:null,hcLight:null},s.kg(1938,"List/Tree drag and drop border color when moving items between items when using the mouse.")),tN=(0,n.x1)("list.highlightForeground",{dark:"#2AAAFF",light:"#0066BF",hcDark:h,hcLight:h},s.kg(1939,"List/Tree foreground color of the match highlights when searching inside the list/tree.")),tE=(0,n.x1)("list.focusHighlightForeground",{dark:tN,light:(0,n.Hz)(t_,tN,"#BBE7FF"),hcDark:tN,hcLight:tN},s.kg(1940,"List/Tree foreground color of the match highlights on actively focused items when searching inside the list/tree."));(0,n.x1)("list.invalidItemForeground",{dark:"#B89500",light:"#B89500",hcDark:"#B89500",hcLight:"#B5200D"},s.kg(1941,"List/Tree foreground color for invalid items, for example an unresolved root in explorer.")),(0,n.x1)("list.errorForeground",{dark:"#F88070",light:"#B01011",hcDark:null,hcLight:null},s.kg(1942,"Foreground color of list items containing errors.")),(0,n.x1)("list.warningForeground",{dark:"#CCA700",light:"#855F00",hcDark:null,hcLight:null},s.kg(1943,"Foreground color of list items containing warnings."));let tM=(0,n.x1)("listFilterWidget.background",{light:(0,n.e$)(y,0),dark:(0,n.a)(y,0),hcDark:y,hcLight:y},s.kg(1944,"Background color of the type filter widget in lists and trees.")),tT=(0,n.x1)("listFilterWidget.outline",{dark:o.Q1.transparent,light:o.Q1.transparent,hcDark:"#f38518",hcLight:"#007ACC"},s.kg(1945,"Outline color of the type filter widget in lists and trees.")),tR=(0,n.x1)("listFilterWidget.noMatchesOutline",{dark:"#BE1100",light:"#BE1100",hcDark:d,hcLight:d},s.kg(1946,"Outline color of the type filter widget in lists and trees, when there are no matches.")),tO=(0,n.x1)("listFilterWidget.shadow",er,s.kg(1947,"Shadow color of the type filter widget in lists and trees."));(0,n.x1)("list.filterMatchBackground",{dark:W,light:W,hcDark:null,hcLight:null},s.kg(1948,"Background color of the filtered match.")),(0,n.x1)("list.filterMatchBorder",{dark:V,light:V,hcDark:d,hcLight:c},s.kg(1949,"Border color of the filtered match.")),(0,n.x1)("list.deemphasizedForeground",{dark:"#8C8C8C",light:"#8E8E90",hcDark:"#A7A8A9",hcLight:"#666666"},s.kg(1950,"List/Tree foreground color for items that are deemphasized."));let tP=(0,n.x1)("tree.indentGuidesStroke",{dark:"#585858",light:"#a9a9a9",hcDark:"#a9a9a9",hcLight:"#a5a5a5"},s.kg(1951,"Tree stroke color for the indentation guides.")),tA=(0,n.x1)("tree.inactiveIndentGuidesStroke",(0,n.JO)(tP,.4),s.kg(1952,"Tree stroke color for the indentation guides that are not active.")),tF=(0,n.x1)("tree.tableColumnsBorder",{dark:"#CCCCCC20",light:"#61616120",hcDark:null,hcLight:null},s.kg(1953,"Table border color between columns.")),tB=(0,n.x1)("tree.tableOddRowsBackground",{dark:(0,n.JO)(r,.04),light:(0,n.JO)(r,.04),hcDark:null,hcLight:null},s.kg(1954,"Background color for odd table rows."));(0,n.x1)("editorActionList.background",y,s.kg(1955,"Action List background color."));let tW=(0,n.x1)("editorActionList.foreground",S,s.kg(1956,"Action List foreground color."));(0,n.x1)("editorActionList.focusForeground",tv,s.kg(1957,"Action List foreground color for the focused item.")),(0,n.x1)("editorActionList.focusBackground",t_,s.kg(1958,"Action List background color for the focused item."));let tH=(0,n.x1)("menu.border",{dark:null,light:null,hcDark:d,hcLight:d},s.kg(1959,"Border color of menus.")),tV=(0,n.x1)("menu.foreground",eZ,s.kg(1960,"Foreground color of menu items.")),tz=(0,n.x1)("menu.background",eQ,s.kg(1961,"Background color of menu items.")),tU=(0,n.x1)("menu.selectionForeground",tv,s.kg(1962,"Foreground color of the selected menu item in menus.")),tj=(0,n.x1)("menu.selectionBackground",t_,s.kg(1963,"Background color of the selected menu item in menus.")),t$=(0,n.x1)("menu.selectionBorder",{dark:null,light:null,hcDark:c,hcLight:c},s.kg(1964,"Border color of the selected menu item in menus.")),tK=(0,n.x1)("menu.separatorBackground",{dark:"#606060",light:"#D4D4D4",hcDark:d,hcLight:d},s.kg(1965,"Color of a separator menu item in menus.")),tG=(0,n.x1)("quickInput.background",y,s.kg(1992,"Quick picker background color. The quick picker widget is the container for pickers like the command palette.")),tq=(0,n.x1)("quickInput.foreground",S,s.kg(1993,"Quick picker foreground color. The quick picker widget is the container for pickers like the command palette.")),tQ=(0,n.x1)("quickInputTitle.background",{dark:new o.Q1(new o.bU(255,255,255,.105)),light:new o.Q1(new o.bU(0,0,0,.06)),hcDark:"#000000",hcLight:o.Q1.white},s.kg(1994,"Quick picker title background color. The quick picker widget is the container for pickers like the command palette.")),tY=(0,n.x1)("pickerGroup.foreground",{dark:"#3794FF",light:"#0066BF",hcDark:o.Q1.white,hcLight:"#0F4A85"},s.kg(1995,"Quick picker color for grouping labels.")),tZ=(0,n.x1)("pickerGroup.border",{dark:"#3F3F46",light:"#CCCEDB",hcDark:o.Q1.white,hcLight:"#0F4A85"},s.kg(1996,"Quick picker color for grouping borders.")),tX=(0,n.x1)("quickInput.list.focusBackground",null,"",void 0,s.kg(1997,"Please use quickInputList.focusBackground instead")),tJ=(0,n.x1)("quickInputList.focusForeground",tv,s.kg(1998,"Quick picker foreground color for the focused item.")),t0=(0,n.x1)("quickInputList.focusIconForeground",tb,s.kg(1999,"Quick picker icon foreground color for the focused item.")),t1=(0,n.x1)("quickInputList.focusBackground",{dark:(0,n.yL)(tX,t_),light:(0,n.yL)(tX,t_),hcDark:null,hcLight:null},s.kg(2e3,"Quick picker background color for the focused item."));(0,n.x1)("search.resultsInfoForeground",{light:r,dark:(0,n.JO)(r,.65),hcDark:r,hcLight:r},s.kg(2001,"Color of the text in the search viewlet's completion message.")),(0,n.x1)("searchEditor.findMatchBackground",{light:(0,n.JO)(W,.66),dark:(0,n.JO)(W,.66),hcDark:W,hcLight:W},s.kg(2002,"Color of the Search Editor query matches.")),(0,n.x1)("searchEditor.findMatchBorder",{light:(0,n.JO)(V,.66),dark:(0,n.JO)(V,.66),hcDark:V,hcLight:V},s.kg(2003,"Border color of the Search Editor query matches."))},77897:(e,t,i)=>{"use strict";i.d(t,{FH:()=>h,Sc:()=>u,kk:()=>g,lM:()=>d});var n=i(55354),s=i(17354),o=i(27281),r=i(73970),a=i(85350),l=i(61896);i(57236);let h={inputActiveOptionBorder:"#007ACC00",inputActiveOptionForeground:"#FFFFFF",inputActiveOptionBackground:"#0E639C50"};class d extends l.x{get onChange(){return this._onChange.event}get onKeyDown(){return this._onKeyDown.event}constructor(e){super(),this._onChange=this._register(new s.vl),this._onKeyDown=this._register(new s.vl),this._opts=e,this._checked=this._opts.isChecked;let t=["monaco-custom-toggle"];this._opts.icon&&(this._icon=this._opts.icon,t.push(...o.L.asClassNameArray(this._icon))),this._opts.actionClassName&&t.push(...this._opts.actionClassName.split(" ")),this._checked&&t.push("checked"),this.domNode=document.createElement("div"),this._hover=this._register((0,r.i)().setupManagedHover(e.hoverDelegate??(0,a.nZ)("mouse"),this.domNode,this._opts.title)),this.domNode.classList.add(...t),this._opts.notFocusable||(this.domNode.tabIndex=0),this.domNode.setAttribute("role","checkbox"),this.domNode.setAttribute("aria-checked",String(this._checked)),this.domNode.setAttribute("aria-label",this._opts.title),this.applyStyles(),this.onclick(this.domNode,e=>{this.enabled&&(this.checked=!this._checked,this._onChange.fire(!1),e.preventDefault())}),this._register(this.ignoreGesture(this.domNode)),this.onkeydown(this.domNode,e=>{if(this.enabled){if(10===e.keyCode||3===e.keyCode){this.checked=!this._checked,this._onChange.fire(!0),e.preventDefault(),e.stopPropagation();return}this._onKeyDown.fire(e)}})}get enabled(){return"true"!==this.domNode.getAttribute("aria-disabled")}focus(){this.domNode.focus()}get checked(){return this._checked}set checked(e){this._checked=e,this.domNode.setAttribute("aria-checked",String(this._checked)),this.domNode.classList.toggle("checked",this._checked),this.applyStyles()}setIcon(e){this._icon&&this.domNode.classList.remove(...o.L.asClassNameArray(this._icon)),this._icon=e,this._icon&&this.domNode.classList.add(...o.L.asClassNameArray(this._icon))}width(){return 22}applyStyles(){this.domNode&&(this.domNode.style.borderColor=this._checked&&this._opts.inputActiveOptionBorder||"",this.domNode.style.color=this._checked&&this._opts.inputActiveOptionForeground||"inherit",this.domNode.style.backgroundColor=this._checked&&this._opts.inputActiveOptionBackground||"")}enable(){this.domNode.setAttribute("aria-disabled",String(!1)),this.domNode.classList.remove("disabled")}disable(){this.domNode.setAttribute("aria-disabled",String(!0)),this.domNode.classList.add("disabled")}setTitle(e){this._hover.update(e),this.domNode.setAttribute("aria-label",e)}}class c extends l.x{static{this.CLASS_NAME="monaco-checkbox"}constructor(e,t,i){super(),this.checkbox=e,this.domNode=t,this.styles=i,this._onChange=this._register(new s.vl),this.onChange=this._onChange.event,this.applyStyles()}get enabled(){return this.checkbox.enabled}enable(){this.checkbox.enable(),this.applyStyles(!0)}disable(){this.checkbox.disable(),this.applyStyles(!1)}setTitle(e){this.checkbox.setTitle(e)}applyStyles(e=this.enabled){this.domNode.style.color=(e?this.styles.checkboxForeground:this.styles.checkboxDisabledForeground)||"",this.domNode.style.backgroundColor=(e?this.styles.checkboxBackground:this.styles.checkboxDisabledBackground)||"",this.domNode.style.borderColor=(e?this.styles.checkboxBorder:this.styles.checkboxDisabledBackground)||"";let t=this.styles.size||18;this.domNode.style.width=this.domNode.style.height=this.domNode.style.fontSize=`${t}px`,this.domNode.style.fontSize=`${t-2}px`}}class u extends c{constructor(e,t,i){let s=new d({title:e,isChecked:t,icon:n.W.check,actionClassName:c.CLASS_NAME,hoverDelegate:i.hoverDelegate,...h});super(s,s.domNode,i),this._register(s),this._register(this.checkbox.onChange(e=>{this.applyStyles(),this._onChange.fire(e)}))}get checked(){return this.checkbox.checked}set checked(e){this.checkbox.checked=e,this.applyStyles()}applyStyles(e){this.checkbox.checked?this.checkbox.setIcon(n.W.check):this.checkbox.setIcon(void 0),super.applyStyles(e)}}class g extends c{constructor(e,t,i){let s;switch(t){case!0:s=n.W.check;break;case"partial":s=n.W.dash;break;case!1:s=void 0}let o=new d({title:e,isChecked:!0===t,icon:s,actionClassName:u.CLASS_NAME,hoverDelegate:i.hoverDelegate,...h});super(o,o.domNode,i),this._state=t,this._register(o),this._register(this.checkbox.onChange(e=>{this._state=this.checkbox.checked,this.applyStyles(),this._onChange.fire(e)}))}get checked(){return this._state}set checked(e){this._state!==e&&(this._state=e,this.checkbox.checked=!0===e,this.applyStyles())}applyStyles(e){switch(this._state){case!0:this.checkbox.setIcon(n.W.check);break;case"partial":this.checkbox.setIcon(n.W.dash);break;case!1:this.checkbox.setIcon(void 0)}super.applyStyles(e)}}},78119:()=>{},78271:(e,t,i)=>{"use strict";i.d(t,{MU:()=>D,QC:()=>S,Se:()=>x,oO:()=>L});var n=i(29195),s=i(87899),o=i(7633),r=i(35023),a=i(76144),l=i(61896),h=i(45262),d=i(27281);class c extends l.x{constructor(e){super(),this._onActivate=e.onActivate,this.bgDomNode=document.createElement("div"),this.bgDomNode.className="arrow-background",this.bgDomNode.style.position="absolute",this.bgDomNode.style.width=e.bgWidth+"px",this.bgDomNode.style.height=e.bgHeight+"px",void 0!==e.top&&(this.bgDomNode.style.top="0px"),void 0!==e.left&&(this.bgDomNode.style.left="0px"),void 0!==e.bottom&&(this.bgDomNode.style.bottom="0px"),void 0!==e.right&&(this.bgDomNode.style.right="0px"),this.domNode=document.createElement("div"),this.domNode.className=e.className,this.domNode.classList.add(...d.L.asClassNameArray(e.icon)),this.domNode.style.position="absolute",this.domNode.style.width="11px",this.domNode.style.height="11px",void 0!==e.top&&(this.domNode.style.top=e.top+"px"),void 0!==e.left&&(this.domNode.style.left=e.left+"px"),void 0!==e.bottom&&(this.domNode.style.bottom=e.bottom+"px"),void 0!==e.right&&(this.domNode.style.right=e.right+"px"),this._pointerMoveMonitor=this._register(new a._),this._register(s.un(this.bgDomNode,s.Bx.POINTER_DOWN,e=>this._arrowPointerDown(e))),this._register(s.un(this.domNode,s.Bx.POINTER_DOWN,e=>this._arrowPointerDown(e))),this._pointerdownRepeatTimer=this._register(new s.Be),this._pointerdownScheduleRepeatTimer=this._register(new h.pc)}_arrowPointerDown(e){if(!e.target||!(e.target instanceof Element))return;let t=()=>{this._pointerdownRepeatTimer.cancelAndSet(()=>this._onActivate(),1e3/24,s.zk(e))};this._onActivate(),this._pointerdownRepeatTimer.cancel(),this._pointerdownScheduleRepeatTimer.cancelAndSet(t,200),this._pointerMoveMonitor.startMonitoring(e.target,e.pointerId,e.buttons,e=>{},()=>{this._pointerdownRepeatTimer.cancel(),this._pointerdownScheduleRepeatTimer.cancel()}),e.preventDefault()}}var u=i(82102);class g extends u.jG{constructor(e,t,i){super(),this._visibility=e,this._visibleClassName=t,this._invisibleClassName=i,this._domNode=null,this._isVisible=!1,this._isNeeded=!1,this._rawShouldBeVisible=!1,this._shouldBeVisible=!1,this._revealTimer=this._register(new h.pc)}setVisibility(e){this._visibility!==e&&(this._visibility=e,this._updateShouldBeVisible())}setShouldBeVisible(e){this._rawShouldBeVisible=e,this._updateShouldBeVisible()}_applyVisibilitySetting(){return 2!==this._visibility&&(3===this._visibility||this._rawShouldBeVisible)}_updateShouldBeVisible(){let e=this._applyVisibilitySetting();this._shouldBeVisible!==e&&(this._shouldBeVisible=e,this.ensureVisibility())}setIsNeeded(e){this._isNeeded!==e&&(this._isNeeded=e,this.ensureVisibility())}setDomNode(e){this._domNode=e,this._domNode.setClassName(this._invisibleClassName),this.setShouldBeVisible(!1)}ensureVisibility(){if(!this._isNeeded)return void this._hide(!1);this._shouldBeVisible?this._reveal():this._hide(!0)}_reveal(){this._isVisible||(this._isVisible=!0,this._revealTimer.setIfNotSet(()=>{this._domNode?.setClassName(this._visibleClassName)},0))}_hide(e){this._revealTimer.cancel(),this._isVisible&&(this._isVisible=!1,this._domNode?.setClassName(this._invisibleClassName+(e?" fade":"")))}}var p=i(28669);class m extends l.x{constructor(e){super(),this._lazyRender=e.lazyRender,this._host=e.host,this._scrollable=e.scrollable,this._scrollByPage=e.scrollByPage,this._scrollbarState=e.scrollbarState,this._visibilityController=this._register(new g(e.visibility,"visible scrollbar "+e.extraScrollbarClassName,"invisible scrollbar "+e.extraScrollbarClassName)),this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._pointerMoveMonitor=this._register(new a._),this._shouldRender=!0,this.domNode=(0,o.Z)(document.createElement("div")),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this._visibilityController.setDomNode(this.domNode),this.domNode.setPosition("absolute"),this._register(s.ko(this.domNode.domNode,s.Bx.POINTER_DOWN,e=>this._domNodePointerDown(e)))}_createArrow(e){let t=this._register(new c(e));this.domNode.domNode.appendChild(t.bgDomNode),this.domNode.domNode.appendChild(t.domNode)}_createSlider(e,t,i,n){this.slider=(0,o.Z)(document.createElement("div")),this.slider.setClassName("slider"),this.slider.setPosition("absolute"),this.slider.setTop(e),this.slider.setLeft(t),"number"==typeof i&&this.slider.setWidth(i),"number"==typeof n&&this.slider.setHeight(n),this.slider.setLayerHinting(!0),this.slider.setContain("strict"),this.domNode.domNode.appendChild(this.slider.domNode),this._register(s.ko(this.slider.domNode,s.Bx.POINTER_DOWN,e=>{0===e.button&&(e.preventDefault(),this._sliderPointerDown(e))})),this.onclick(this.slider.domNode,e=>{e.leftButton&&e.stopPropagation()})}_onElementSize(e){return this._scrollbarState.setVisibleSize(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}_onElementScrollSize(e){return this._scrollbarState.setScrollSize(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}_onElementScrollPosition(e){return this._scrollbarState.setScrollPosition(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}beginReveal(){this._visibilityController.setShouldBeVisible(!0)}beginHide(){this._visibilityController.setShouldBeVisible(!1)}render(){this._shouldRender&&(this._shouldRender=!1,this._renderDomNode(this._scrollbarState.getRectangleLargeSize(),this._scrollbarState.getRectangleSmallSize()),this._updateSlider(this._scrollbarState.getSliderSize(),this._scrollbarState.getArrowSize()+this._scrollbarState.getSliderPosition()))}_domNodePointerDown(e){e.target===this.domNode.domNode&&this._onPointerDown(e)}delegatePointerDown(e){let t=this.domNode.domNode.getClientRects()[0].top,i=t+this._scrollbarState.getSliderPosition(),n=t+this._scrollbarState.getSliderPosition()+this._scrollbarState.getSliderSize(),s=this._sliderPointerPosition(e);i<=s&&s<=n?0===e.button&&(e.preventDefault(),this._sliderPointerDown(e)):this._onPointerDown(e)}_onPointerDown(e){let t,i;if(e.target===this.domNode.domNode&&"number"==typeof e.offsetX&&"number"==typeof e.offsetY)t=e.offsetX,i=e.offsetY;else{let n=s.BK(this.domNode.domNode);t=e.pageX-n.left,i=e.pageY-n.top}let n="mouse"===e.pointerType,o=0===e.button;if(o||!n){let e=this._pointerDownRelativePosition(t,i);this._setDesiredScrollPositionNow(this._scrollByPage?this._scrollbarState.getDesiredScrollPositionFromOffsetPaged(e):this._scrollbarState.getDesiredScrollPositionFromOffset(e))}o&&(e.preventDefault(),this._sliderPointerDown(e))}_sliderPointerDown(e){if(!e.target||!(e.target instanceof Element))return;let t=this._sliderPointerPosition(e),i=this._sliderOrthogonalPointerPosition(e),n=this._scrollbarState.clone();this.slider.toggleClassName("active",!0),this._pointerMoveMonitor.startMonitoring(e.target,e.pointerId,e.buttons,e=>{let s=Math.abs(this._sliderOrthogonalPointerPosition(e)-i);if(p.uF&&s>140)return void this._setDesiredScrollPositionNow(n.getScrollPosition());let o=this._sliderPointerPosition(e);this._setDesiredScrollPositionNow(n.getDesiredScrollPositionFromDelta(o-t))},()=>{this.slider.toggleClassName("active",!1),this._host.onDragEnd()}),this._host.onDragStart()}_setDesiredScrollPositionNow(e){let t={};this.writeScrollPosition(t,e),this._scrollable.setScrollPositionNow(t)}updateScrollbarSize(e){this._updateScrollbarSize(e),this._scrollbarState.setScrollbarSize(e),this._shouldRender=!0,this._lazyRender||this.render()}isNeeded(){return this._scrollbarState.isNeeded()}}var f=i(47088),_=i(55354);class v extends m{constructor(e,t,i){let n=e.getScrollDimensions();if(super({lazyRender:t.lazyRender,host:i,scrollbarState:new f.m(t.horizontalHasArrows?t.arrowSize:0,2===t.horizontal?0:t.horizontalScrollbarSize,2===t.vertical?0:t.verticalScrollbarSize,n.width,n.scrollWidth,e.getCurrentScrollPosition().scrollLeft),visibility:t.horizontal,extraScrollbarClassName:"horizontal",scrollable:e,scrollByPage:t.scrollByPage}),t.horizontalHasArrows){let e=(t.arrowSize-11)/2,i=(t.horizontalScrollbarSize-11)/2;this._createArrow({className:"scra",icon:_.W.scrollbarButtonLeft,top:i,left:e,bottom:void 0,right:void 0,bgWidth:t.arrowSize,bgHeight:t.horizontalScrollbarSize,onActivate:()=>this._host.onMouseWheel(new r.$(null,1,0))}),this._createArrow({className:"scra",icon:_.W.scrollbarButtonRight,top:i,left:void 0,bottom:void 0,right:e,bgWidth:t.arrowSize,bgHeight:t.horizontalScrollbarSize,onActivate:()=>this._host.onMouseWheel(new r.$(null,-1,0))})}this._createSlider(Math.floor((t.horizontalScrollbarSize-t.horizontalSliderSize)/2),0,void 0,t.horizontalSliderSize)}_updateSlider(e,t){this.slider.setWidth(e),this.slider.setLeft(t)}_renderDomNode(e,t){this.domNode.setWidth(e),this.domNode.setHeight(t),this.domNode.setLeft(0),this.domNode.setBottom(0)}onDidScroll(e){return this._shouldRender=this._onElementScrollSize(e.scrollWidth)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(e.scrollLeft)||this._shouldRender,this._shouldRender=this._onElementSize(e.width)||this._shouldRender,this._shouldRender}_pointerDownRelativePosition(e,t){return e}_sliderPointerPosition(e){return e.pageX}_sliderOrthogonalPointerPosition(e){return e.pageY}_updateScrollbarSize(e){this.slider.setHeight(e)}writeScrollPosition(e,t){e.scrollLeft=t}updateOptions(e){this.updateScrollbarSize(2===e.horizontal?0:e.horizontalScrollbarSize),this._scrollbarState.setOppositeScrollbarSize(2===e.vertical?0:e.verticalScrollbarSize),this._visibilityController.setVisibility(e.horizontal),this._scrollByPage=e.scrollByPage}}class b extends m{constructor(e,t,i){let n=e.getScrollDimensions();if(super({lazyRender:t.lazyRender,host:i,scrollbarState:new f.m(t.verticalHasArrows?t.arrowSize:0,2===t.vertical?0:t.verticalScrollbarSize,0,n.height,n.scrollHeight,e.getCurrentScrollPosition().scrollTop),visibility:t.vertical,extraScrollbarClassName:"vertical",scrollable:e,scrollByPage:t.scrollByPage}),t.verticalHasArrows){let e=(t.arrowSize-11)/2,i=(t.verticalScrollbarSize-11)/2;this._createArrow({className:"scra",icon:_.W.scrollbarButtonUp,top:e,left:i,bottom:void 0,right:void 0,bgWidth:t.verticalScrollbarSize,bgHeight:t.arrowSize,onActivate:()=>this._host.onMouseWheel(new r.$(null,0,1))}),this._createArrow({className:"scra",icon:_.W.scrollbarButtonDown,top:void 0,left:i,bottom:e,right:void 0,bgWidth:t.verticalScrollbarSize,bgHeight:t.arrowSize,onActivate:()=>this._host.onMouseWheel(new r.$(null,0,-1))})}this._createSlider(0,Math.floor((t.verticalScrollbarSize-t.verticalSliderSize)/2),t.verticalSliderSize,void 0)}_updateSlider(e,t){this.slider.setHeight(e),this.slider.setTop(t)}_renderDomNode(e,t){this.domNode.setWidth(t),this.domNode.setHeight(e),this.domNode.setRight(0),this.domNode.setTop(0)}onDidScroll(e){return this._shouldRender=this._onElementScrollSize(e.scrollHeight)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(e.scrollTop)||this._shouldRender,this._shouldRender=this._onElementSize(e.height)||this._shouldRender,this._shouldRender}_pointerDownRelativePosition(e,t){return t}_sliderPointerPosition(e){return e.pageY}_sliderOrthogonalPointerPosition(e){return e.pageX}_updateScrollbarSize(e){this.slider.setWidth(e)}writeScrollPosition(e,t){e.scrollTop=t}updateOptions(e){this.updateScrollbarSize(2===e.vertical?0:e.verticalScrollbarSize),this._scrollbarState.setOppositeScrollbarSize(0),this._visibilityController.setVisibility(e.vertical),this._scrollByPage=e.scrollByPage}}var C=i(17354),w=i(56487);i(84422);class y{constructor(e,t,i){this.timestamp=e,this.deltaX=t,this.deltaY=i,this.score=0}}class S{static{this.INSTANCE=new S}constructor(){this._capacity=5,this._memory=[],this._front=-1,this._rear=-1}isPhysicalMouseWheel(){if(-1===this._front&&-1===this._rear)return!1;let e=1,t=0,i=1,n=this._rear;for(;;){let s=n===this._front?e:Math.pow(2,-i);if(e-=s,t+=this._memory[n].score*s,n===this._front)break;n=(this._capacity+n-1)%this._capacity,i++}return t<=.5}acceptStandardWheelEvent(e){if(n.H8){let t=s.zk(e.browserEvent),i=(0,n.pR)(t);this.accept(Date.now(),e.deltaX*i,e.deltaY*i)}else this.accept(Date.now(),e.deltaX,e.deltaY)}accept(e,t,i){let n=null,s=new y(e,t,i);-1===this._front&&-1===this._rear?(this._memory[0]=s,this._front=0,this._rear=0):(n=this._memory[this._rear],this._rear=(this._rear+1)%this._capacity,this._rear===this._front&&(this._front=(this._front+1)%this._capacity),this._memory[this._rear]=s),s.score=this._computeScore(s,n)}_computeScore(e,t){if(Math.abs(e.deltaX)>0&&Math.abs(e.deltaY)>0)return 1;let i=.5;if(this._isAlmostInt(e.deltaX)&&this._isAlmostInt(e.deltaY)||(i+=.25),t){let n=Math.abs(e.deltaX),s=Math.abs(e.deltaY),o=Math.abs(t.deltaX),r=Math.abs(t.deltaY),a=Math.max(Math.min(n,o),1),l=Math.max(Math.min(s,r),1),h=Math.max(s,r);Math.max(n,o)%a==0&&h%l==0&&(i-=.5)}return Math.min(Math.max(i,0),1)}_isAlmostInt(e){return Math.abs(Math.round(e)-e)<.01+100*Number.EPSILON}}class k extends l.x{get onScroll(){return this._onScroll.event}get options(){return this._options}constructor(e,t,i){super(),this._inertialTimeout=null,this._inertialSpeed={X:0,Y:0},this._onScroll=this._register(new C.vl),this._onWillScroll=this._register(new C.vl),e.style.overflow="hidden",this._options=function(e){let t={lazyRender:void 0!==e.lazyRender&&e.lazyRender,className:void 0!==e.className?e.className:"",useShadows:void 0===e.useShadows||e.useShadows,handleMouseWheel:void 0===e.handleMouseWheel||e.handleMouseWheel,flipAxes:void 0!==e.flipAxes&&e.flipAxes,consumeMouseWheelIfScrollbarIsNeeded:void 0!==e.consumeMouseWheelIfScrollbarIsNeeded&&e.consumeMouseWheelIfScrollbarIsNeeded,alwaysConsumeMouseWheel:void 0!==e.alwaysConsumeMouseWheel&&e.alwaysConsumeMouseWheel,scrollYToX:void 0!==e.scrollYToX&&e.scrollYToX,mouseWheelScrollSensitivity:void 0!==e.mouseWheelScrollSensitivity?e.mouseWheelScrollSensitivity:1,fastScrollSensitivity:void 0!==e.fastScrollSensitivity?e.fastScrollSensitivity:5,scrollPredominantAxis:void 0===e.scrollPredominantAxis||e.scrollPredominantAxis,mouseWheelSmoothScroll:void 0===e.mouseWheelSmoothScroll||e.mouseWheelSmoothScroll,inertialScroll:void 0!==e.inertialScroll&&e.inertialScroll,arrowSize:void 0!==e.arrowSize?e.arrowSize:11,listenOnDomNode:void 0!==e.listenOnDomNode?e.listenOnDomNode:null,horizontal:void 0!==e.horizontal?e.horizontal:1,horizontalScrollbarSize:void 0!==e.horizontalScrollbarSize?e.horizontalScrollbarSize:10,horizontalSliderSize:void 0!==e.horizontalSliderSize?e.horizontalSliderSize:0,horizontalHasArrows:void 0!==e.horizontalHasArrows&&e.horizontalHasArrows,vertical:void 0!==e.vertical?e.vertical:1,verticalScrollbarSize:void 0!==e.verticalScrollbarSize?e.verticalScrollbarSize:10,verticalHasArrows:void 0!==e.verticalHasArrows&&e.verticalHasArrows,verticalSliderSize:void 0!==e.verticalSliderSize?e.verticalSliderSize:0,scrollByPage:void 0!==e.scrollByPage&&e.scrollByPage};return t.horizontalSliderSize=void 0!==e.horizontalSliderSize?e.horizontalSliderSize:t.horizontalScrollbarSize,t.verticalSliderSize=void 0!==e.verticalSliderSize?e.verticalSliderSize:t.verticalScrollbarSize,p.zx&&(t.className+=" mac"),t}(t),this._scrollable=i,this._register(this._scrollable.onScroll(e=>{this._onWillScroll.fire(e),this._onDidScroll(e),this._onScroll.fire(e)}));let n={onMouseWheel:e=>this._onMouseWheel(e),onDragStart:()=>this._onDragStart(),onDragEnd:()=>this._onDragEnd()};this._verticalScrollbar=this._register(new b(this._scrollable,this._options,n)),this._horizontalScrollbar=this._register(new v(this._scrollable,this._options,n)),this._domNode=document.createElement("div"),this._domNode.className="monaco-scrollable-element "+this._options.className,this._domNode.setAttribute("role","presentation"),this._domNode.style.position="relative",this._domNode.style.overflow="hidden",this._domNode.appendChild(e),this._domNode.appendChild(this._horizontalScrollbar.domNode.domNode),this._domNode.appendChild(this._verticalScrollbar.domNode.domNode),this._options.useShadows?(this._leftShadowDomNode=(0,o.Z)(document.createElement("div")),this._leftShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._leftShadowDomNode.domNode),this._topShadowDomNode=(0,o.Z)(document.createElement("div")),this._topShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._topShadowDomNode.domNode),this._topLeftShadowDomNode=(0,o.Z)(document.createElement("div")),this._topLeftShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._topLeftShadowDomNode.domNode)):(this._leftShadowDomNode=null,this._topShadowDomNode=null,this._topLeftShadowDomNode=null),this._listenOnDomNode=this._options.listenOnDomNode||this._domNode,this._mouseWheelToDispose=[],this._setListeningToMouseWheel(this._options.handleMouseWheel),this.onmouseover(this._listenOnDomNode,e=>this._onMouseOver(e)),this.onmouseleave(this._listenOnDomNode,e=>this._onMouseLeave(e)),this._hideTimeout=this._register(new h.pc),this._isDragging=!1,this._mouseIsOver=!1,this._shouldRender=!0,this._revealOnScroll=!0}dispose(){this._mouseWheelToDispose=(0,u.AS)(this._mouseWheelToDispose),this._inertialTimeout&&(this._inertialTimeout.dispose(),this._inertialTimeout=null),super.dispose()}getDomNode(){return this._domNode}getOverviewRulerLayoutInfo(){return{parent:this._domNode,insertBefore:this._verticalScrollbar.domNode.domNode}}delegateVerticalScrollbarPointerDown(e){this._verticalScrollbar.delegatePointerDown(e)}getScrollDimensions(){return this._scrollable.getScrollDimensions()}setScrollDimensions(e){this._scrollable.setScrollDimensions(e,!1)}updateClassName(e){this._options.className=e,p.zx&&(this._options.className+=" mac"),this._domNode.className="monaco-scrollable-element "+this._options.className}updateOptions(e){void 0!==e.handleMouseWheel&&(this._options.handleMouseWheel=e.handleMouseWheel,this._setListeningToMouseWheel(this._options.handleMouseWheel)),void 0!==e.mouseWheelScrollSensitivity&&(this._options.mouseWheelScrollSensitivity=e.mouseWheelScrollSensitivity),void 0!==e.fastScrollSensitivity&&(this._options.fastScrollSensitivity=e.fastScrollSensitivity),void 0!==e.scrollPredominantAxis&&(this._options.scrollPredominantAxis=e.scrollPredominantAxis),void 0!==e.horizontal&&(this._options.horizontal=e.horizontal),void 0!==e.vertical&&(this._options.vertical=e.vertical),void 0!==e.horizontalScrollbarSize&&(this._options.horizontalScrollbarSize=e.horizontalScrollbarSize),void 0!==e.verticalScrollbarSize&&(this._options.verticalScrollbarSize=e.verticalScrollbarSize),void 0!==e.scrollByPage&&(this._options.scrollByPage=e.scrollByPage),this._horizontalScrollbar.updateOptions(this._options),this._verticalScrollbar.updateOptions(this._options),this._options.lazyRender||this._render()}delegateScrollFromMouseWheelEvent(e){this._onMouseWheel(new r.$(e))}async _periodicSync(){let e=!1;(0!==this._inertialSpeed.X||0!==this._inertialSpeed.Y)&&(this._scrollable.setScrollPositionNow({scrollTop:this._scrollable.getCurrentScrollPosition().scrollTop-100*this._inertialSpeed.Y,scrollLeft:this._scrollable.getCurrentScrollPosition().scrollLeft-100*this._inertialSpeed.X}),this._inertialSpeed.X*=.9,this._inertialSpeed.Y*=.9,.01>Math.abs(this._inertialSpeed.X)&&(this._inertialSpeed.X=0),.01>Math.abs(this._inertialSpeed.Y)&&(this._inertialSpeed.Y=0),e=0!==this._inertialSpeed.X||0!==this._inertialSpeed.Y),e?(this._inertialTimeout||(this._inertialTimeout=new h.pc),this._inertialTimeout.cancelAndSet(()=>this._periodicSync(),1e3/60)):(this._inertialTimeout?.dispose(),this._inertialTimeout=null)}_setListeningToMouseWheel(e){if(this._mouseWheelToDispose.length>0!==e&&(this._mouseWheelToDispose=(0,u.AS)(this._mouseWheelToDispose),e)){let e=e=>{this._onMouseWheel(new r.$(e))};this._mouseWheelToDispose.push(s.ko(this._listenOnDomNode,s.Bx.MOUSE_WHEEL,e,{passive:!1}))}}_onMouseWheel(e){if(e.browserEvent?.defaultPrevented)return;let t=S.INSTANCE;t.acceptStandardWheelEvent(e);let i=!1;if(e.deltaY||e.deltaX){let n=e.deltaY*this._options.mouseWheelScrollSensitivity,s=e.deltaX*this._options.mouseWheelScrollSensitivity;this._options.scrollPredominantAxis&&(this._options.scrollYToX&&s+n===0?s=n=0:Math.abs(n)>=Math.abs(s)?s=0:n=0),this._options.flipAxes&&([n,s]=[s,n]);let o=!p.zx&&e.browserEvent&&e.browserEvent.shiftKey;(this._options.scrollYToX||o)&&!s&&(s=n,n=0),e.browserEvent&&e.browserEvent.altKey&&(s*=this._options.fastScrollSensitivity,n*=this._options.fastScrollSensitivity);let r=this._scrollable.getFutureScrollPosition(),a={};if(n){let e=50*n,t=r.scrollTop-(e<0?Math.floor(e):Math.ceil(e));this._verticalScrollbar.writeScrollPosition(a,t)}if(s){let e=50*s,t=r.scrollLeft-(e<0?Math.floor(e):Math.ceil(e));this._horizontalScrollbar.writeScrollPosition(a,t)}if(a=this._scrollable.validateScrollPosition(a),this._options.inertialScroll&&(s||n)){let e=!1;0===this._inertialSpeed.X&&0===this._inertialSpeed.Y&&(e=!0),this._inertialSpeed.Y=(n<0?-1:1)*Math.abs(n)**1.02,this._inertialSpeed.X=(s<0?-1:1)*Math.abs(s)**1.02,e&&this._periodicSync()}(r.scrollLeft!==a.scrollLeft||r.scrollTop!==a.scrollTop)&&(this._options.mouseWheelSmoothScroll&&t.isPhysicalMouseWheel()?this._scrollable.setScrollPositionSmooth(a):this._scrollable.setScrollPositionNow(a),i=!0)}let n=i;!n&&this._options.alwaysConsumeMouseWheel&&(n=!0),!n&&this._options.consumeMouseWheelIfScrollbarIsNeeded&&(this._verticalScrollbar.isNeeded()||this._horizontalScrollbar.isNeeded())&&(n=!0),n&&(e.preventDefault(),e.stopPropagation())}_onDidScroll(e){this._shouldRender=this._horizontalScrollbar.onDidScroll(e)||this._shouldRender,this._shouldRender=this._verticalScrollbar.onDidScroll(e)||this._shouldRender,this._options.useShadows&&(this._shouldRender=!0),this._revealOnScroll&&this._reveal(),this._options.lazyRender||this._render()}renderNow(){if(!this._options.lazyRender)throw Error("Please use `lazyRender` together with `renderNow`!");this._render()}_render(){if(this._shouldRender&&(this._shouldRender=!1,this._horizontalScrollbar.render(),this._verticalScrollbar.render(),this._options.useShadows)){let e=this._scrollable.getCurrentScrollPosition(),t=e.scrollTop>0,i=e.scrollLeft>0,n=i?" left":"",s=t?" top":"";this._leftShadowDomNode.setClassName(`shadow${n}`),this._topShadowDomNode.setClassName(`shadow${s}`),this._topLeftShadowDomNode.setClassName(`shadow${i||t?" top-left-corner":""}${s}${n}`)}}_onDragStart(){this._isDragging=!0,this._reveal()}_onDragEnd(){this._isDragging=!1,this._hide()}_onMouseLeave(e){this._mouseIsOver=!1,this._hide()}_onMouseOver(e){this._mouseIsOver=!0,this._reveal()}_reveal(){this._verticalScrollbar.beginReveal(),this._horizontalScrollbar.beginReveal(),this._scheduleHide()}_hide(){this._mouseIsOver||this._isDragging||(this._verticalScrollbar.beginHide(),this._horizontalScrollbar.beginHide())}_scheduleHide(){this._mouseIsOver||this._isDragging||this._hideTimeout.cancelAndSet(()=>this._hide(),500)}}class x extends k{constructor(e,t){(t=t||{}).mouseWheelSmoothScroll=!1;let i=new w.yE({forceIntegerValues:!0,smoothScrollDuration:0,scheduleAtNextAnimationFrame:t=>s.PG(s.zk(e),t)});super(e,t,i),this._register(i)}setScrollPosition(e){this._scrollable.setScrollPositionNow(e)}}class L extends k{constructor(e,t,i){super(e,t,i)}setScrollPosition(e){e.reuseAnimation?this._scrollable.setScrollPositionSmooth(e,e.reuseAnimation):this._scrollable.setScrollPositionNow(e)}getScrollPosition(){return this._scrollable.getCurrentScrollPosition()}}class D extends k{constructor(e,t){(t=t||{}).mouseWheelSmoothScroll=!1;let i=new w.yE({forceIntegerValues:!1,smoothScrollDuration:0,scheduleAtNextAnimationFrame:t=>s.PG(s.zk(e),t)});super(e,t,i),this._register(i),this._element=e,this._register(this.onScroll(e=>{e.scrollTopChanged&&(this._element.scrollTop=e.scrollTop),e.scrollLeftChanged&&(this._element.scrollLeft=e.scrollLeft)})),this.scanDomNode()}setScrollPosition(e){this._scrollable.setScrollPositionNow(e)}getScrollPosition(){return this._scrollable.getCurrentScrollPosition()}scanDomNode(){this.setScrollDimensions({width:this._element.clientWidth,scrollWidth:this._element.scrollWidth,height:this._element.clientHeight,scrollHeight:this._element.scrollHeight}),this.setScrollPosition({scrollLeft:this._element.scrollLeft,scrollTop:this._element.scrollTop})}}},78282:()=>{},78343:(e,t,i)=>{"use strict";i.d(t,{Fd:()=>a,aJ:()=>n});var n,s=i(5488),o=i(82102),r=i(88235);!function(e){e[e.PRESERVE=0]="PRESERVE",e[e.LAST=1]="LAST"}(n||(n={}));let a={Quickaccess:"workbench.contributions.quickaccess"};class l{constructor(){this.providers=[],this.defaultProvider=void 0}registerQuickAccessProvider(e){return 0===e.prefix.length?this.defaultProvider=e:this.providers.push(e),this.providers.sort((e,t)=>t.prefix.length-e.prefix.length),(0,o.s)(()=>{this.providers.splice(this.providers.indexOf(e),1),this.defaultProvider===e&&(this.defaultProvider=void 0)})}getQuickAccessProviders(){return(0,s.Yc)([this.defaultProvider,...this.providers])}getQuickAccessProvider(e){return e&&this.providers.find(t=>e.startsWith(t.prefix))||this.defaultProvider}}r.O.add(a.Quickaccess,new l)},78713:(e,t,i)=>{"use strict";function n(e,t){let i=Math.pow(10,t);return Math.round(e*i)/i}i.d(t,{$J:()=>r,Q1:()=>a,bU:()=>s,hB:()=>o});class s{constructor(e,t,i,s=1){this._rgbaBrand=void 0,this.r=0|Math.min(255,Math.max(0,e)),this.g=0|Math.min(255,Math.max(0,t)),this.b=0|Math.min(255,Math.max(0,i)),this.a=n(Math.max(Math.min(1,s),0),3)}static equals(e,t){return e.r===t.r&&e.g===t.g&&e.b===t.b&&e.a===t.a}}class o{constructor(e,t,i,s){this._hslaBrand=void 0,this.h=0|Math.max(Math.min(360,e),0),this.s=n(Math.max(Math.min(1,t),0),3),this.l=n(Math.max(Math.min(1,i),0),3),this.a=n(Math.max(Math.min(1,s),0),3)}static equals(e,t){return e.h===t.h&&e.s===t.s&&e.l===t.l&&e.a===t.a}static fromRGBA(e){let t=e.r/255,i=e.g/255,n=e.b/255,s=e.a,r=Math.max(t,i,n),a=Math.min(t,i,n),l=0,h=0,d=(a+r)/2,c=r-a;if(c>0){switch(h=Math.min(d<=.5?c/(2*d):c/(2-2*d),1),r){case t:l=(i-n)/c+6*(i<n);break;case i:l=(n-t)/c+2;break;case n:l=(t-i)/c+4}l*=60,l=Math.round(l)}return new o(l,h,d,s)}static _hue2rgb(e,t,i){return(i<0&&(i+=1),i>1&&(i-=1),i<1/6)?e+(t-e)*6*i:i<.5?t:i<2/3?e+(t-e)*(2/3-i)*6:e}static toRGBA(e){let t,i,n,r=e.h/360,{s:a,l,a:h}=e;if(0===a)t=i=n=l;else{let e=l<.5?l*(1+a):l+a-l*a,s=2*l-e;t=o._hue2rgb(s,e,r+1/3),i=o._hue2rgb(s,e,r),n=o._hue2rgb(s,e,r-1/3)}return new s(Math.round(255*t),Math.round(255*i),Math.round(255*n),h)}}class r{constructor(e,t,i,s){this._hsvaBrand=void 0,this.h=0|Math.max(Math.min(360,e),0),this.s=n(Math.max(Math.min(1,t),0),3),this.v=n(Math.max(Math.min(1,i),0),3),this.a=n(Math.max(Math.min(1,s),0),3)}static equals(e,t){return e.h===t.h&&e.s===t.s&&e.v===t.v&&e.a===t.a}static fromRGBA(e){let t=e.r/255,i=e.g/255,n=e.b/255,s=Math.max(t,i,n),o=s-Math.min(t,i,n);return new r(Math.round(60*(0===o?0:s===t?((i-n)/o%6+6)%6:s===i?(n-t)/o+2:(t-i)/o+4)),0===s?0:o/s,s,e.a)}static toRGBA(e){let{h:t,s:i,v:n,a:o}=e,r=n*i,a=r*(1-Math.abs(t/60%2-1)),l=n-r,[h,d,c]=[0,0,0];return t<60?(h=r,d=a):t<120?(h=a,d=r):t<180?(d=r,c=a):t<240?(d=a,c=r):t<300?(h=a,c=r):t<=360&&(h=r,c=a),new s(h=Math.round((h+l)*255),d=Math.round((d+l)*255),c=Math.round((c+l)*255),o)}}class a{static fromHex(e){return a.Format.CSS.parseHex(e)||a.red}static equals(e,t){return!e&&!t||!!e&&!!t&&e.equals(t)}get hsla(){return this._hsla?this._hsla:o.fromRGBA(this.rgba)}get hsva(){return this._hsva?this._hsva:r.fromRGBA(this.rgba)}constructor(e){if(e)if(e instanceof s)this.rgba=e;else if(e instanceof o)this._hsla=e,this.rgba=o.toRGBA(e);else if(e instanceof r)this._hsva=e,this.rgba=r.toRGBA(e);else throw Error("Invalid color ctor argument");else throw Error("Color needs a value")}equals(e){return!!e&&s.equals(this.rgba,e.rgba)&&o.equals(this.hsla,e.hsla)&&r.equals(this.hsva,e.hsva)}getRelativeLuminance(){let e=a._relativeLuminanceForComponent(this.rgba.r),t=a._relativeLuminanceForComponent(this.rgba.g);return n(.2126*e+.7152*t+.0722*a._relativeLuminanceForComponent(this.rgba.b),4)}static _relativeLuminanceForComponent(e){let t=e/255;return t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4)}isLighter(){return(299*this.rgba.r+587*this.rgba.g+114*this.rgba.b)/1e3>=128}isLighterThan(e){return this.getRelativeLuminance()>e.getRelativeLuminance()}isDarkerThan(e){return this.getRelativeLuminance()<e.getRelativeLuminance()}lighten(e){return new a(new o(this.hsla.h,this.hsla.s,this.hsla.l+this.hsla.l*e,this.hsla.a))}darken(e){return new a(new o(this.hsla.h,this.hsla.s,this.hsla.l-this.hsla.l*e,this.hsla.a))}transparent(e){let{r:t,g:i,b:n,a:o}=this.rgba;return new a(new s(t,i,n,o*e))}isTransparent(){return 0===this.rgba.a}isOpaque(){return 1===this.rgba.a}opposite(){return new a(new s(255-this.rgba.r,255-this.rgba.g,255-this.rgba.b,this.rgba.a))}mix(e,t=.5){let i=Math.min(Math.max(t,0),1),n=this.rgba,o=e.rgba,r=n.r+(o.r-n.r)*i,l=n.g+(o.g-n.g)*i,h=n.b+(o.b-n.b)*i,d=n.a+(o.a-n.a)*i;return new a(new s(r,l,h,d))}makeOpaque(e){if(this.isOpaque()||1!==e.rgba.a)return this;let{r:t,g:i,b:n,a:o}=this.rgba;return new a(new s(e.rgba.r-o*(e.rgba.r-t),e.rgba.g-o*(e.rgba.g-i),e.rgba.b-o*(e.rgba.b-n),1))}toString(){return this._toString||(this._toString=a.Format.CSS.format(this)),this._toString}toNumber32Bit(){return this._toNumber32Bit||(this._toNumber32Bit=(this.rgba.r<<24|this.rgba.g<<16|this.rgba.b<<8|(255*this.rgba.a|0))>>>0),this._toNumber32Bit}static getLighterColor(e,t,i){if(e.isLighterThan(t))return e;i=i||.5;let n=e.getRelativeLuminance(),s=t.getRelativeLuminance();return i=i*(s-n)/s,e.lighten(i)}static getDarkerColor(e,t,i){if(e.isDarkerThan(t))return e;i=i||.5;let n=e.getRelativeLuminance(),s=t.getRelativeLuminance();return i=i*(n-s)/n,e.darken(i)}static{this.white=new a(new s(255,255,255,1))}static{this.black=new a(new s(0,0,0,1))}static{this.red=new a(new s(255,0,0,1))}static{this.blue=new a(new s(0,0,255,1))}static{this.green=new a(new s(0,255,0,1))}static{this.cyan=new a(new s(0,255,255,1))}static{this.lightgrey=new a(new s(211,211,211,1))}static{this.transparent=new a(new s(0,0,0,0))}}!function(e){var t;!function(t){function i(e){let t=e.toString(16);return 2!==t.length?"0"+t:t}function n(t){let i=t.length;if(0===i||35!==t.charCodeAt(0))return null;if(7===i){let i=16*o(t.charCodeAt(1))+o(t.charCodeAt(2));return new e(new s(i,16*o(t.charCodeAt(3))+o(t.charCodeAt(4)),16*o(t.charCodeAt(5))+o(t.charCodeAt(6)),1))}if(9===i){let i=16*o(t.charCodeAt(1))+o(t.charCodeAt(2)),n=16*o(t.charCodeAt(3))+o(t.charCodeAt(4));return new e(new s(i,n,16*o(t.charCodeAt(5))+o(t.charCodeAt(6)),(16*o(t.charCodeAt(7))+o(t.charCodeAt(8)))/255))}if(4===i){let i=o(t.charCodeAt(1)),n=o(t.charCodeAt(2)),r=o(t.charCodeAt(3));return new e(new s(16*i+i,16*n+n,16*r+r))}if(5===i){let i=o(t.charCodeAt(1)),n=o(t.charCodeAt(2)),r=o(t.charCodeAt(3)),a=o(t.charCodeAt(4));return new e(new s(16*i+i,16*n+n,16*r+r,(16*a+a)/255))}return null}function o(e){switch(e){case 48:break;case 49:return 1;case 50:return 2;case 51:return 3;case 52:return 4;case 53:return 5;case 54:return 6;case 55:return 7;case 56:return 8;case 57:return 9;case 97:case 65:return 10;case 98:case 66:return 11;case 99:case 67:return 12;case 100:case 68:return 13;case 101:case 69:return 14;case 102:case 70:return 15}return 0}t.formatRGB=function(t){return 1===t.rgba.a?`rgb(${t.rgba.r}, ${t.rgba.g}, ${t.rgba.b})`:e.Format.CSS.formatRGBA(t)},t.formatRGBA=function(e){return`rgba(${e.rgba.r}, ${e.rgba.g}, ${e.rgba.b}, ${+e.rgba.a.toFixed(2)})`},t.formatHSL=function(t){return 1===t.hsla.a?`hsl(${t.hsla.h}, ${Math.round(100*t.hsla.s)}%, ${Math.round(100*t.hsla.l)}%)`:e.Format.CSS.formatHSLA(t)},t.formatHSLA=function(e){return`hsla(${e.hsla.h}, ${Math.round(100*e.hsla.s)}%, ${Math.round(100*e.hsla.l)}%, ${e.hsla.a.toFixed(2)})`},t.formatHex=function(e){return`#${i(e.rgba.r)}${i(e.rgba.g)}${i(e.rgba.b)}`},t.formatHexA=function(t,n=!1){return n&&1===t.rgba.a?e.Format.CSS.formatHex(t):`#${i(t.rgba.r)}${i(t.rgba.g)}${i(t.rgba.b)}${i(Math.round(255*t.rgba.a))}`},t.format=function(t){return t.isOpaque()?e.Format.CSS.formatHex(t):e.Format.CSS.formatRGBA(t)},t.parse=function(t){if("transparent"===t)return e.transparent;if(t.startsWith("#"))return n(t);if(t.startsWith("rgba(")){let i=t.match(/rgba\((?<r>(?:\+|-)?\d+), *(?<g>(?:\+|-)?\d+), *(?<b>(?:\+|-)?\d+), *(?<a>(?:\+|-)?\d+(\.\d+)?)\)/);if(!i)throw Error("Invalid color format "+t);let n=parseInt(i.groups?.r??"0"),o=parseInt(i.groups?.g??"0");return new e(new s(n,o,parseInt(i.groups?.b??"0"),parseFloat(i.groups?.a??"0")))}if(t.startsWith("rgb(")){let i=t.match(/rgb\((?<r>(?:\+|-)?\d+), *(?<g>(?:\+|-)?\d+), *(?<b>(?:\+|-)?\d+)\)/);if(!i)throw Error("Invalid color format "+t);let n=parseInt(i.groups?.r??"0");return new e(new s(n,parseInt(i.groups?.g??"0"),parseInt(i.groups?.b??"0")))}var i=t;switch(i){case"aliceblue":return new e(new s(240,248,255,1));case"antiquewhite":return new e(new s(250,235,215,1));case"aqua":case"cyan":return new e(new s(0,255,255,1));case"aquamarine":return new e(new s(127,255,212,1));case"azure":return new e(new s(240,255,255,1));case"beige":return new e(new s(245,245,220,1));case"bisque":return new e(new s(255,228,196,1));case"black":return new e(new s(0,0,0,1));case"blanchedalmond":return new e(new s(255,235,205,1));case"blue":return new e(new s(0,0,255,1));case"blueviolet":return new e(new s(138,43,226,1));case"brown":return new e(new s(165,42,42,1));case"burlywood":return new e(new s(222,184,135,1));case"cadetblue":return new e(new s(95,158,160,1));case"chartreuse":return new e(new s(127,255,0,1));case"chocolate":return new e(new s(210,105,30,1));case"coral":return new e(new s(255,127,80,1));case"cornflowerblue":return new e(new s(100,149,237,1));case"cornsilk":return new e(new s(255,248,220,1));case"crimson":return new e(new s(220,20,60,1));case"darkblue":return new e(new s(0,0,139,1));case"darkcyan":return new e(new s(0,139,139,1));case"darkgoldenrod":return new e(new s(184,134,11,1));case"darkgray":case"darkgrey":return new e(new s(169,169,169,1));case"darkgreen":return new e(new s(0,100,0,1));case"darkkhaki":return new e(new s(189,183,107,1));case"darkmagenta":return new e(new s(139,0,139,1));case"darkolivegreen":return new e(new s(85,107,47,1));case"darkorange":return new e(new s(255,140,0,1));case"darkorchid":return new e(new s(153,50,204,1));case"darkred":return new e(new s(139,0,0,1));case"darksalmon":return new e(new s(233,150,122,1));case"darkseagreen":return new e(new s(143,188,143,1));case"darkslateblue":return new e(new s(72,61,139,1));case"darkslategray":case"darkslategrey":return new e(new s(47,79,79,1));case"darkturquoise":return new e(new s(0,206,209,1));case"darkviolet":return new e(new s(148,0,211,1));case"deeppink":return new e(new s(255,20,147,1));case"deepskyblue":return new e(new s(0,191,255,1));case"dimgray":case"dimgrey":return new e(new s(105,105,105,1));case"dodgerblue":return new e(new s(30,144,255,1));case"firebrick":return new e(new s(178,34,34,1));case"floralwhite":return new e(new s(255,250,240,1));case"forestgreen":return new e(new s(34,139,34,1));case"fuchsia":case"magenta":return new e(new s(255,0,255,1));case"gainsboro":return new e(new s(220,220,220,1));case"ghostwhite":return new e(new s(248,248,255,1));case"gold":return new e(new s(255,215,0,1));case"goldenrod":return new e(new s(218,165,32,1));case"gray":case"grey":return new e(new s(128,128,128,1));case"green":return new e(new s(0,128,0,1));case"greenyellow":return new e(new s(173,255,47,1));case"honeydew":return new e(new s(240,255,240,1));case"hotpink":return new e(new s(255,105,180,1));case"indianred":return new e(new s(205,92,92,1));case"indigo":return new e(new s(75,0,130,1));case"ivory":return new e(new s(255,255,240,1));case"khaki":return new e(new s(240,230,140,1));case"lavender":return new e(new s(230,230,250,1));case"lavenderblush":return new e(new s(255,240,245,1));case"lawngreen":return new e(new s(124,252,0,1));case"lemonchiffon":return new e(new s(255,250,205,1));case"lightblue":return new e(new s(173,216,230,1));case"lightcoral":return new e(new s(240,128,128,1));case"lightcyan":return new e(new s(224,255,255,1));case"lightgoldenrodyellow":return new e(new s(250,250,210,1));case"lightgray":case"lightgrey":return new e(new s(211,211,211,1));case"lightgreen":return new e(new s(144,238,144,1));case"lightpink":return new e(new s(255,182,193,1));case"lightsalmon":return new e(new s(255,160,122,1));case"lightseagreen":return new e(new s(32,178,170,1));case"lightskyblue":return new e(new s(135,206,250,1));case"lightslategray":case"lightslategrey":return new e(new s(119,136,153,1));case"lightsteelblue":return new e(new s(176,196,222,1));case"lightyellow":return new e(new s(255,255,224,1));case"lime":return new e(new s(0,255,0,1));case"limegreen":return new e(new s(50,205,50,1));case"linen":return new e(new s(250,240,230,1));case"maroon":return new e(new s(128,0,0,1));case"mediumaquamarine":return new e(new s(102,205,170,1));case"mediumblue":return new e(new s(0,0,205,1));case"mediumorchid":return new e(new s(186,85,211,1));case"mediumpurple":return new e(new s(147,112,219,1));case"mediumseagreen":return new e(new s(60,179,113,1));case"mediumslateblue":return new e(new s(123,104,238,1));case"mediumspringgreen":return new e(new s(0,250,154,1));case"mediumturquoise":return new e(new s(72,209,204,1));case"mediumvioletred":return new e(new s(199,21,133,1));case"midnightblue":return new e(new s(25,25,112,1));case"mintcream":return new e(new s(245,255,250,1));case"mistyrose":return new e(new s(255,228,225,1));case"moccasin":return new e(new s(255,228,181,1));case"navajowhite":return new e(new s(255,222,173,1));case"navy":return new e(new s(0,0,128,1));case"oldlace":return new e(new s(253,245,230,1));case"olive":return new e(new s(128,128,0,1));case"olivedrab":return new e(new s(107,142,35,1));case"orange":return new e(new s(255,165,0,1));case"orangered":return new e(new s(255,69,0,1));case"orchid":return new e(new s(218,112,214,1));case"palegoldenrod":return new e(new s(238,232,170,1));case"palegreen":return new e(new s(152,251,152,1));case"paleturquoise":return new e(new s(175,238,238,1));case"palevioletred":return new e(new s(219,112,147,1));case"papayawhip":return new e(new s(255,239,213,1));case"peachpuff":return new e(new s(255,218,185,1));case"peru":return new e(new s(205,133,63,1));case"pink":return new e(new s(255,192,203,1));case"plum":return new e(new s(221,160,221,1));case"powderblue":return new e(new s(176,224,230,1));case"purple":return new e(new s(128,0,128,1));case"rebeccapurple":return new e(new s(102,51,153,1));case"red":return new e(new s(255,0,0,1));case"rosybrown":return new e(new s(188,143,143,1));case"royalblue":return new e(new s(65,105,225,1));case"saddlebrown":return new e(new s(139,69,19,1));case"salmon":return new e(new s(250,128,114,1));case"sandybrown":return new e(new s(244,164,96,1));case"seagreen":return new e(new s(46,139,87,1));case"seashell":return new e(new s(255,245,238,1));case"sienna":return new e(new s(160,82,45,1));case"silver":return new e(new s(192,192,192,1));case"skyblue":return new e(new s(135,206,235,1));case"slateblue":return new e(new s(106,90,205,1));case"slategray":case"slategrey":return new e(new s(112,128,144,1));case"snow":return new e(new s(255,250,250,1));case"springgreen":return new e(new s(0,255,127,1));case"steelblue":return new e(new s(70,130,180,1));case"tan":return new e(new s(210,180,140,1));case"teal":return new e(new s(0,128,128,1));case"thistle":return new e(new s(216,191,216,1));case"tomato":return new e(new s(255,99,71,1));case"turquoise":return new e(new s(64,224,208,1));case"violet":return new e(new s(238,130,238,1));case"wheat":return new e(new s(245,222,179,1));case"white":return new e(new s(255,255,255,1));case"whitesmoke":return new e(new s(245,245,245,1));case"yellow":return new e(new s(255,255,0,1));case"yellowgreen":return new e(new s(154,205,50,1));default:return null}},t.parseHex=n}((t=e.Format||(e.Format={})).CSS||(t.CSS={}))}(a||(a={}))},79380:(e,t,i)=>{"use strict";i.d(t,{V:()=>s,y:()=>o});var n=i(84474);class s{constructor(e){let t=(0,n.W)(e);this._defaultValue=t,this._asciiMap=s._createAsciiMap(t),this._map=new Map}static _createAsciiMap(e){let t=new Uint8Array(256);return t.fill(e),t}set(e,t){let i=(0,n.W)(t);e>=0&&e<256?this._asciiMap[e]=i:this._map.set(e,i)}get(e){return e>=0&&e<256?this._asciiMap[e]:this._map.get(e)||this._defaultValue}clear(){this._asciiMap.fill(this._defaultValue),this._map.clear()}}class o{constructor(){this._actual=new s(0)}add(e){this._actual.set(e,1)}has(e){return 1===this._actual.get(e)}clear(){return this._actual.clear()}}},79410:()=>{},79502:()=>{},79635:(e,t,i)=>{"use strict";i.d(t,{q:()=>n});let n={enableSplitViewResizing:!0,splitViewDefaultRatio:.5,renderSideBySide:!0,renderMarginRevertIcon:!0,renderGutterMenu:!0,maxComputationTime:5e3,maxFileSize:50,ignoreTrimWhitespace:!0,renderIndicators:!0,originalEditable:!1,diffCodeLens:!1,renderOverviewRuler:!0,diffWordWrap:"inherit",diffAlgorithm:"advanced",accessibilityVerbose:!1,experimental:{showMoves:!1,showEmptyDecorations:!0,useTrueInlineView:!1},hideUnchangedRegions:{enabled:!1,contextLineCount:3,minimumLineCount:3,revealLineCount:20},isInEmbeddedEditor:!1,onlyShowAccessibleDiffViewer:!1,renderSideBySideInlineBreakpoint:900,useInlineViewWhenSpaceIsLimited:!0,compactMode:!1}},80104:(e,t,i)=>{"use strict";i.d(t,{w:()=>n});let n=(0,i(22263).u1)("editorWorkerService")},80471:()=>{},80484:(e,t,i)=>{"use strict";i.d(t,{i:()=>o,y:()=>r});var n=i(23047),s=i(82600);class o{constructor(e,t,i){this._range=e,this._charBeforeSelection=t,this._charAfterSelection=i}getEditOperations(e,t){t.addTrackedEditOperation(new n.Q(this._range.startLineNumber,this._range.startColumn,this._range.startLineNumber,this._range.startColumn),this._charBeforeSelection),t.addTrackedEditOperation(new n.Q(this._range.endLineNumber,this._range.endColumn,this._range.endLineNumber,this._range.endColumn),this._charAfterSelection||null)}computeCursorState(e,t){let i=t.getInverseEditOperations(),n=i[0].range,o=i[1].range;return new s.L(n.endLineNumber,n.endColumn,o.endLineNumber,o.endColumn-this._charAfterSelection.length)}}class r{constructor(e,t,i){this._position=e,this._text=t,this._charAfter=i}getEditOperations(e,t){t.addTrackedEditOperation(new n.Q(this._position.lineNumber,this._position.column,this._position.lineNumber,this._position.column),this._text+this._charAfter)}computeCursorState(e,t){let i=t.getInverseEditOperations()[0].range;return new s.L(i.endLineNumber,i.startColumn,i.endLineNumber,i.endColumn-this._charAfter.length)}}},80505:()=>{},80610:(e,t,i)=>{"use strict";i.d(t,{T:()=>g,i:()=>p});var n,s=i(60737),o=i(30117),r=i(6033),a=i(31023),l=i(24224),h=i(5081),d=i(66278),c=i(89197);i(64863);var u=function(e,t){return function(i,n){t(i,n,e)}};let g=class{static{n=this}static{this._ttpTokenizer=(0,o.H)("tokenizeToString",{createHTML:e=>e})}constructor(e,t,i){this._options=e,this._languageService=t,this._openerService=i}render(e,t,i){let n=(0,s.Gc)(e,{codeBlockRenderer:(e,t)=>this.renderCodeBlock(e,t),actionHandler:(e,t)=>this.openMarkdownLink(e,t),...t},i);return n.element.classList.add("rendered-markdown"),n}async renderCodeBlock(e,t){let i;e?i=this._languageService.getLanguageIdByLanguageName(e):this._options.editor&&(i=this._options.editor.getModel()?.getLanguageId()),i||(i=h.vH);let s=await (0,d.Yj)(this._languageService,t,i),o=document.createElement("span");if(o.innerHTML=n._ttpTokenizer?.createHTML(s)??s,this._options.editor){let e=this._options.editor.getOption(59);(0,c.M)(o,e)}else this._options.codeBlockFontFamily&&(o.style.fontFamily=this._options.codeBlockFontFamily);return void 0!==this._options.codeBlockFontSize&&(o.style.fontSize=this._options.codeBlockFontSize),o}async openMarkdownLink(e,t){await p(this._openerService,e,t.isTrusted)}};async function p(e,t,i,n){try{var s;return await e.open(t,{fromUserGesture:!0,allowContributedOpeners:!0,allowCommands:(s=i,!0===s||!!(s&&Array.isArray(s.enabledCommands))&&s.enabledCommands),skipValidation:n})}catch(e){return(0,r.dz)(e),!1}}g=n=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}([u(1,l.L),u(2,a.Cr)],g)},80703:(e,t,i)=>{"use strict";i.d(t,{X:()=>n});let n=(0,i(22263).u1)("dialogService")},80787:(e,t,i)=>{"use strict";i.d(t,{W:()=>u,m:()=>c});var n=i(5488),s=i(71544),o=i(6033),r=i(55532),a=i(72553),l=i(23047),h=i(62413),d=i(75247);class c{static fromStringEdit(e,t){return new c(e.replacements.map(e=>u.fromStringReplacement(e,t)))}static fromParallelReplacementsUnsorted(e){return new c(e.slice().sort((0,n.VE)(e=>e.range,l.Q.compareRangesUsingStarts)))}constructor(e){this.replacements=e,(0,s.Ft)(()=>(0,s.Xo)(e,(e,t)=>e.range.getEndPosition().isBeforeOrEqual(t.range.getStartPosition())))}mapPosition(e){let t=0,i=0,n=0;for(let s of this.replacements){let o=s.range.getStartPosition();if(e.isBeforeOrEqual(o))break;let r=s.range.getEndPosition(),l=h.W.ofText(s.text);if(e.isBefore(r)){let e=new a.y(o.lineNumber+t,o.column+(o.lineNumber+t===i?n:0)),s=l.addToPosition(e);return g(e,s)}o.lineNumber+t!==i&&(n=0),t+=l.lineCount-(s.range.endLineNumber-s.range.startLineNumber),0===l.lineCount?r.lineNumber!==o.lineNumber?n+=l.columnCount-(r.column-1):n+=l.columnCount-(r.column-o.column):n=l.columnCount,i=r.lineNumber+t}return new a.y(e.lineNumber+t,e.column+(e.lineNumber+t===i?n:0))}mapRange(e){var t,i;return g((t=this.mapPosition(e.getStartPosition()))instanceof a.y?t:t.getStartPosition(),(i=this.mapPosition(e.getEndPosition()))instanceof a.y?i:i.getEndPosition())}apply(e){let t="",i=new a.y(1,1);for(let n of this.replacements){let s=n.range,o=s.getStartPosition(),r=s.getEndPosition(),a=g(i,o);a.isEmpty()||(t+=e.getValueOfRange(a)),t+=n.text,i=r}let n=g(i,e.endPositionExclusive);return n.isEmpty()||(t+=e.getValueOfRange(n)),t}applyToString(e){let t=new d.tp(e);return this.apply(t)}getNewRanges(){let e=[],t=0,i=0,n=0;for(let s of this.replacements){let o=h.W.ofText(s.text),r=a.y.lift({lineNumber:s.range.startLineNumber+i,column:s.range.startColumn+(s.range.startLineNumber===t?n:0)}),l=o.createRange(r);e.push(l),i=l.endLineNumber-s.range.endLineNumber,n=l.endColumn-s.range.endColumn,t=s.range.endLineNumber}return e}toReplacement(e){if(0===this.replacements.length)throw new o.D7;if(1===this.replacements.length)return this.replacements[0];let t=this.replacements[0].range.getStartPosition(),i=this.replacements[this.replacements.length-1].range.getEndPosition(),n="";for(let t=0;t<this.replacements.length;t++){let i=this.replacements[t];if(n+=i.text,t<this.replacements.length-1){let s=this.replacements[t+1],o=l.Q.fromPositions(i.range.getEndPosition(),s.range.getStartPosition());n+=e.getValueOfRange(o)}}return new u(l.Q.fromPositions(t,i),n)}toString(e){return void 0===e?this.replacements.map(e=>e.toString()).join("\n"):"string"==typeof e?this.toString(new d.tp(e)):0===this.replacements.length?"":this.replacements.map(t=>{let i=e.getValueOfRange(t.range),n=l.Q.fromPositions(new a.y(Math.max(1,t.range.startLineNumber-1),1),t.range.getStartPosition()),s=e.getValueOfRange(n);s.length>10&&(s="..."+s.substring(s.length-10));let o=l.Q.fromPositions(t.range.getEndPosition(),new a.y(t.range.endLineNumber+1,1)),r=e.getValueOfRange(o);r.length>10&&(r=r.substring(0,10)+"...");let h=i;if(h.length>10){let e=Math.floor(5);h=h.substring(0,e)+"..."+h.substring(h.length-e)}let d=t.text;if(d.length>10){let e=Math.floor(5);d=d.substring(0,e)+"..."+d.substring(d.length-e)}return 0===h.length?`${s}❰${d}❱${r}`:`${s}❰${h}↦${d}❱${r}`}).join("\n")}}class u{static joinReplacements(e,t){if(0===e.length)throw new o.D7;if(1===e.length)return e[0];let i=e[0].range.getStartPosition(),n=e[e.length-1].range.getEndPosition(),s="";for(let i=0;i<e.length;i++){let n=e[i];if(s+=n.text,i<e.length-1){let o=e[i+1],r=l.Q.fromPositions(n.range.getEndPosition(),o.range.getStartPosition());s+=t.getValueOfRange(r)}}return new u(l.Q.fromPositions(i,n),s)}static fromStringReplacement(e,t){return new u(t.getTransformer().getRange(e.replaceRange),e.newText)}static delete(e){return new u(e,"")}constructor(e,t){this.range=e,this.text=t}get isEmpty(){return this.range.isEmpty()&&0===this.text.length}static equals(e,t){return e.range.equalsRange(t.range)&&e.text===t.text}equals(e){return u.equals(this,e)}removeCommonPrefixAndSuffix(e){return this.removeCommonPrefix(e).removeCommonSuffix(e)}removeCommonPrefix(e){let t=e.getValueOfRange(this.range).replaceAll("\r\n","\n"),i=this.text.replaceAll("\r\n","\n"),n=(0,r.Qp)(t,i),s=h.W.ofText(t.substring(0,n)).addToPosition(this.range.getStartPosition()),o=i.substring(n);return new u(l.Q.fromPositions(s,this.range.getEndPosition()),o)}removeCommonSuffix(e){let t=e.getValueOfRange(this.range).replaceAll("\r\n","\n"),i=this.text.replaceAll("\r\n","\n"),n=(0,r.Vi)(t,i),s=h.W.ofText(t.substring(0,t.length-n)).addToPosition(this.range.getStartPosition()),o=i.substring(0,i.length-n);return new u(l.Q.fromPositions(this.range.getStartPosition(),s),o)}toString(){let e=this.range.getStartPosition(),t=this.range.getEndPosition();return`(${e.lineNumber},${e.column} -> ${t.lineNumber},${t.column}): "${this.text}"`}}function g(e,t){if(e.lineNumber===t.lineNumber&&e.column===Number.MAX_SAFE_INTEGER)return l.Q.fromPositions(t,t);if(!e.isBeforeOrEqual(t))throw new o.D7("start must be before end");return new l.Q(e.lineNumber,e.column,t.lineNumber,t.column)}},81178:()=>{},81261:()=>{},81492:(e,t,i)=>{"use strict";i.d(t,{g:()=>m});var n,s=i(82102),o=i(47108),r=i(90057),a=i(88298),l=i(6033),h=i(26033);class d{constructor(e,t){this._canvas=e,this._textureIndex=t,this._currentRow={x:0,y:0,h:0},this._allocatedGlyphs=new Set,this._nextIndex=0,this._ctx=(0,h.HS)(this._canvas.getContext("2d",{willReadFrequently:!0}))}allocate(e){let t=e.boundingBox.right-e.boundingBox.left+1,i=e.boundingBox.bottom-e.boundingBox.top+1;if(t>this._canvas.width||i>this._canvas.height)throw new l.D7("Glyph is too large for the atlas page");if(e.boundingBox.right-e.boundingBox.left+1>this._canvas.width-this._currentRow.x&&(this._currentRow.x=0,this._currentRow.y+=this._currentRow.h,this._currentRow.h=1),this._currentRow.y+e.boundingBox.bottom-e.boundingBox.top+1>this._canvas.height)return;this._ctx.drawImage(e.source,e.boundingBox.left,e.boundingBox.top,t,i,this._currentRow.x,this._currentRow.y,t,i);let n={pageIndex:this._textureIndex,glyphIndex:this._nextIndex++,x:this._currentRow.x,y:this._currentRow.y,w:t,h:i,originOffsetX:e.originOffset.x,originOffsetY:e.originOffset.y,fontBoundingBoxAscent:e.fontBoundingBoxAscent,fontBoundingBoxDescent:e.fontBoundingBoxDescent};return this._currentRow.x+=t,this._currentRow.h=Math.max(this._currentRow.h,i),this._allocatedGlyphs.add(n),n}getUsagePreview(){let e=this._canvas.width,t=this._canvas.height,i=new OffscreenCanvas(e,t),n=(0,h.HS)(i.getContext("2d"));n.fillStyle="#808080",n.fillRect(0,0,e,t);let s=new Map,o=new Map;for(let e of this._allocatedGlyphs)s.set(e.y,Math.max(s.get(e.y)??0,e.h)),o.set(e.y,Math.max(o.get(e.y)??0,e.x+e.w));for(let e of this._allocatedGlyphs)n.fillStyle="#4040FF",n.fillRect(e.x,e.y,e.w,e.h),n.fillStyle="#FF0000",n.fillRect(e.x,e.y+e.h,e.w,s.get(e.y)-e.h);for(let[t,i]of o.entries())t!==this._currentRow.y&&(n.fillStyle="#FF0000",n.fillRect(i,t,e-i,s.get(t)));return i.convertToBlob()}getStats(){let e=this._canvas.width,t=this._canvas.height,i=0,n=0,s=e*t,o=new Map,r=new Map;for(let e of this._allocatedGlyphs)o.set(e.y,Math.max(o.get(e.y)??0,e.h)),r.set(e.y,Math.max(r.get(e.y)??0,e.x+e.w));for(let e of this._allocatedGlyphs)i+=e.w*e.h,n+=e.w*(o.get(e.y)-e.h);for(let[t,i]of r.entries())t!==this._currentRow.y&&(n+=(e-i)*o.get(t));return`page${this._textureIndex}:
|
|
682
682
|
Total: ${s} (${e}x${t})
|
|
683
683
|
Used: ${i} (${(i/s*100).toPrecision(2)}%)
|
|
684
684
|
Wasted: ${n} (${(n/s*100).toPrecision(2)}%)
|