diff --git a/assets/SchemaReference.es-1ed706aa.js b/assets/SchemaReference.es-fa096cc0.js similarity index 97% rename from assets/SchemaReference.es-1ed706aa.js rename to assets/SchemaReference.es-fa096cc0.js index 478a2015..70046876 100644 --- a/assets/SchemaReference.es-1ed706aa.js +++ b/assets/SchemaReference.es-fa096cc0.js @@ -1 +1 @@ -import{s as b}from"./forEachState.es-b2033c2b.js";import{o as l,Z as k,I as F,Y as h,_ as S,$ as g,a0 as D,a1 as T,e as Q}from"./index-42855235.js";var j=Object.defineProperty,r=(t,n)=>j(t,"name",{value:n,configurable:!0});function V(t,n){const e={schema:t,type:null,parentType:null,inputType:null,directiveDef:null,fieldDef:null,argDef:null,argDefs:null,objectFieldDefs:null};return b(n,a=>{var u,p;switch(a.kind){case"Query":case"ShortQuery":e.type=t.getQueryType();break;case"Mutation":e.type=t.getMutationType();break;case"Subscription":e.type=t.getSubscriptionType();break;case"InlineFragment":case"FragmentDefinition":a.type&&(e.type=t.getType(a.type));break;case"Field":case"AliasedField":e.fieldDef=e.type&&a.name?c(t,e.parentType,a.name):null,e.type=(u=e.fieldDef)===null||u===void 0?void 0:u.type;break;case"SelectionSet":e.parentType=e.type?l(e.type):null;break;case"Directive":e.directiveDef=a.name?t.getDirective(a.name):null;break;case"Arguments":const s=a.prevState?a.prevState.kind==="Field"?e.fieldDef:a.prevState.kind==="Directive"?e.directiveDef:a.prevState.kind==="AliasedField"?a.prevState.name&&c(t,e.parentType,a.prevState.name):null:null;e.argDefs=s?s.args:null;break;case"Argument":if(e.argDef=null,e.argDefs){for(let i=0;ii.value===a.name):null;break;case"ListValue":const d=e.inputType?F(e.inputType):null;e.inputType=d instanceof h?d.ofType:null;break;case"ObjectValue":const m=e.inputType?l(e.inputType):null;e.objectFieldDefs=m instanceof k?m.getFields():null;break;case"ObjectField":const o=a.name&&e.objectFieldDefs?e.objectFieldDefs[a.name]:null;e.inputType=o==null?void 0:o.type;break;case"NamedType":e.type=a.name?t.getType(a.name):null;break}}),e}r(V,"getTypeInfo");function c(t,n,e){if(e===g.name&&t.getQueryType()===n)return g;if(e===D.name&&t.getQueryType()===n)return D;if(e===T.name&&Q(n))return T;if(n&&n.getFields)return n.getFields()[e]}r(c,"getFieldDef");function v(t,n){for(let e=0;ej(t,"name",{value:n,configurable:!0});function V(t,n){const e={schema:t,type:null,parentType:null,inputType:null,directiveDef:null,fieldDef:null,argDef:null,argDefs:null,objectFieldDefs:null};return b(n,a=>{var u,p;switch(a.kind){case"Query":case"ShortQuery":e.type=t.getQueryType();break;case"Mutation":e.type=t.getMutationType();break;case"Subscription":e.type=t.getSubscriptionType();break;case"InlineFragment":case"FragmentDefinition":a.type&&(e.type=t.getType(a.type));break;case"Field":case"AliasedField":e.fieldDef=e.type&&a.name?c(t,e.parentType,a.name):null,e.type=(u=e.fieldDef)===null||u===void 0?void 0:u.type;break;case"SelectionSet":e.parentType=e.type?l(e.type):null;break;case"Directive":e.directiveDef=a.name?t.getDirective(a.name):null;break;case"Arguments":const s=a.prevState?a.prevState.kind==="Field"?e.fieldDef:a.prevState.kind==="Directive"?e.directiveDef:a.prevState.kind==="AliasedField"?a.prevState.name&&c(t,e.parentType,a.prevState.name):null:null;e.argDefs=s?s.args:null;break;case"Argument":if(e.argDef=null,e.argDefs){for(let i=0;ii.value===a.name):null;break;case"ListValue":const d=e.inputType?F(e.inputType):null;e.inputType=d instanceof h?d.ofType:null;break;case"ObjectValue":const m=e.inputType?l(e.inputType):null;e.objectFieldDefs=m instanceof k?m.getFields():null;break;case"ObjectField":const o=a.name&&e.objectFieldDefs?e.objectFieldDefs[a.name]:null;e.inputType=o==null?void 0:o.type;break;case"NamedType":e.type=a.name?t.getType(a.name):null;break}}),e}r(V,"getTypeInfo");function c(t,n,e){if(e===g.name&&t.getQueryType()===n)return g;if(e===D.name&&t.getQueryType()===n)return D;if(e===T.name&&Q(n))return T;if(n&&n.getFields)return n.getFields()[e]}r(c,"getFieldDef");function v(t,n){for(let e=0;en in e?Le(e,n,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[n]=i;var k=(e,n,i)=>(je(e,typeof n!="symbol"?n+"":n,i),i);import{m as Ne}from"./index-42855235.js";/*!----------------------------------------------------------------------------- +var Le=Object.defineProperty;var je=(e,n,i)=>n in e?Le(e,n,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[n]=i;var k=(e,n,i)=>(je(e,typeof n!="symbol"?n+"":n,i),i);import{m as Ne}from"./index-3e3bc65f.js";/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166) * Released under the MIT license diff --git a/assets/freemarker2-d3b6cc4c.js b/assets/freemarker2-cd4de472.js similarity index 99% rename from assets/freemarker2-d3b6cc4c.js rename to assets/freemarker2-cd4de472.js index 84870baf..51ac4019 100644 --- a/assets/freemarker2-d3b6cc4c.js +++ b/assets/freemarker2-cd4de472.js @@ -1,4 +1,4 @@ -import{m as F}from"./index-42855235.js";/*!----------------------------------------------------------------------------- +import{m as F}from"./index-3e3bc65f.js";/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166) * Released under the MIT license diff --git a/assets/handlebars-b20cc731.js b/assets/handlebars-b5c71914.js similarity index 99% rename from assets/handlebars-b20cc731.js rename to assets/handlebars-b5c71914.js index 2f0d156d..8b424150 100644 --- a/assets/handlebars-b20cc731.js +++ b/assets/handlebars-b5c71914.js @@ -1,4 +1,4 @@ -import{m as i}from"./index-42855235.js";/*!----------------------------------------------------------------------------- +import{m as i}from"./index-3e3bc65f.js";/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166) * Released under the MIT license diff --git a/assets/hint.es-f6098be7.js b/assets/hint.es-ba4ca906.js similarity index 91% rename from assets/hint.es-f6098be7.js rename to assets/hint.es-ba4ca906.js index 9d9e6932..7443f368 100644 --- a/assets/hint.es-f6098be7.js +++ b/assets/hint.es-ba4ca906.js @@ -1 +1 @@ -import{C as n}from"./codemirror.es-52e8b92d.js";import"./show-hint.es-b981493e.js";import{g as c}from"./index-42855235.js";import{P as g}from"./Range-52ddcb6a.js";import"./codemirror.es2-5884f31a.js";n.registerHelper("hint","graphql",(i,a)=>{const{schema:s,externalFragments:p}=a;if(!s)return;const r=i.getCursor(),t=i.getTokenAt(r),l=t.type!==null&&/"|\w/.test(t.string[0])?t.start:t.end,m=new g(r.line,l),e={list:c(s,i.getValue(),m,t,p).map(o=>({text:o.label,type:o.type,description:o.documentation,isDeprecated:o.isDeprecated,deprecationReason:o.deprecationReason})),from:{line:r.line,ch:l},to:{line:r.line,ch:t.end}};return e!=null&&e.list&&e.list.length>0&&(e.from=n.Pos(e.from.line,e.from.ch),e.to=n.Pos(e.to.line,e.to.ch),n.signal(i,"hasCompletion",i,e,t)),e}); +import{C as n}from"./codemirror.es-52e8b92d.js";import"./show-hint.es-b981493e.js";import{g as c}from"./index-3e3bc65f.js";import{P as g}from"./Range-52ddcb6a.js";import"./codemirror.es2-5884f31a.js";n.registerHelper("hint","graphql",(i,a)=>{const{schema:s,externalFragments:p}=a;if(!s)return;const r=i.getCursor(),t=i.getTokenAt(r),l=t.type!==null&&/"|\w/.test(t.string[0])?t.start:t.end,m=new g(r.line,l),e={list:c(s,i.getValue(),m,t,p).map(o=>({text:o.label,type:o.type,description:o.documentation,isDeprecated:o.isDeprecated,deprecationReason:o.deprecationReason})),from:{line:r.line,ch:l},to:{line:r.line,ch:t.end}};return e!=null&&e.list&&e.list.length>0&&(e.from=n.Pos(e.from.line,e.from.ch),e.to=n.Pos(e.to.line,e.to.ch),n.signal(i,"hasCompletion",i,e,t)),e}); diff --git a/assets/hint.es2-a97d8435.js b/assets/hint.es2-700ec1c6.js similarity index 97% rename from assets/hint.es2-a97d8435.js rename to assets/hint.es2-700ec1c6.js index 1a67b0ef..fe5d26bd 100644 --- a/assets/hint.es2-a97d8435.js +++ b/assets/hint.es2-700ec1c6.js @@ -1 +1 @@ -import{C as f}from"./codemirror.es-52e8b92d.js";import{s as L}from"./forEachState.es-b2033c2b.js";import"./codemirror.es2-5884f31a.js";import{o as h,Z as b,_ as T,a5 as d,I as j,Y as D}from"./index-42855235.js";var N=Object.defineProperty,p=(i,n)=>N(i,"name",{value:n,configurable:!0});function u(i,n,t){const r=x(t,m(n.string));if(!r)return;const e=n.type!==null&&/"|\w/.test(n.string[0])?n.start:n.end;return{list:r,from:{line:i.line,ch:e},to:{line:i.line,ch:n.end}}}p(u,"hintList");function x(i,n){if(!n)return y(i,r=>!r.isDeprecated);const t=i.map(r=>({proximity:V(m(r.text),n),entry:r}));return y(y(t,r=>r.proximity<=2),r=>!r.entry.isDeprecated).sort((r,e)=>(r.entry.isDeprecated?1:0)-(e.entry.isDeprecated?1:0)||r.proximity-e.proximity||r.entry.text.length-e.entry.text.length).map(r=>r.entry)}p(x,"filterAndSortList");function y(i,n){const t=i.filter(n);return t.length===0?i:t}p(y,"filterNonEmpty");function m(i){return i.toLowerCase().replaceAll(/\W/g,"")}p(m,"normalizeText");function V(i,n){let t=v(n,i);return i.length>n.length&&(t-=i.length-n.length-1,t+=i.indexOf(n)===0?0:.5),t}p(V,"getProximity");function v(i,n){let t,r;const e=[],a=i.length,s=n.length;for(t=0;t<=a;t++)e[t]=[t];for(r=1;r<=s;r++)e[0][r]=r;for(t=1;t<=a;t++)for(r=1;r<=s;r++){const c=i[t-1]===n[r-1]?0:1;e[t][r]=Math.min(e[t-1][r]+1,e[t][r-1]+1,e[t-1][r-1]+c),t>1&&r>1&&i[t-1]===n[r-2]&&i[t-2]===n[r-1]&&(e[t][r]=Math.min(e[t][r],e[t-2][r-2]+c))}return e[a][s]}p(v,"lexicalDistance");f.registerHelper("hint","graphql-variables",(i,n)=>{const t=i.getCursor(),r=i.getTokenAt(t),e=O(t,r,n);return e!=null&&e.list&&e.list.length>0&&(e.from=f.Pos(e.from.line,e.from.ch),e.to=f.Pos(e.to.line,e.to.ch),f.signal(i,"hasCompletion",i,e,r)),e});function O(i,n,t){const r=n.state.kind==="Invalid"?n.state.prevState:n.state,{kind:e,step:a}=r;if(e==="Document"&&a===0)return u(i,n,[{text:"{"}]);const{variableToType:s}=t;if(!s)return;const c=k(s,n.state);if(e==="Document"||e==="Variable"&&a===0){const l=Object.keys(s);return u(i,n,l.map(o=>({text:`"${o}": `,type:s[o]})))}if((e==="ObjectValue"||e==="ObjectField"&&a===0)&&c.fields){const l=Object.keys(c.fields).map(o=>c.fields[o]);return u(i,n,l.map(o=>({text:`"${o.name}": `,type:o.type,description:o.description})))}if(e==="StringValue"||e==="NumberValue"||e==="BooleanValue"||e==="NullValue"||e==="ListValue"&&a===1||e==="ObjectField"&&a===2||e==="Variable"&&a===2){const l=c.type?h(c.type):void 0;if(l instanceof b)return u(i,n,[{text:"{"}]);if(l instanceof T){const o=l.getValues();return u(i,n,o.map(g=>({text:`"${g.name}"`,type:l,description:g.description})))}if(l===d)return u(i,n,[{text:"true",type:d,description:"Not false."},{text:"false",type:d,description:"Not true."}])}}p(O,"getVariablesHint");function k(i,n){const t={type:null,fields:null};return L(n,r=>{switch(r.kind){case"Variable":{t.type=i[r.name];break}case"ListValue":{const e=t.type?j(t.type):void 0;t.type=e instanceof D?e.ofType:null;break}case"ObjectValue":{const e=t.type?h(t.type):void 0;t.fields=e instanceof b?e.getFields():null;break}case"ObjectField":{const e=r.name&&t.fields?t.fields[r.name]:null;t.type=e==null?void 0:e.type;break}}}),t}p(k,"getTypeInfo"); +import{C as f}from"./codemirror.es-52e8b92d.js";import{s as L}from"./forEachState.es-b2033c2b.js";import"./codemirror.es2-5884f31a.js";import{o as h,Z as b,_ as T,a5 as d,I as j,Y as D}from"./index-3e3bc65f.js";var N=Object.defineProperty,p=(i,n)=>N(i,"name",{value:n,configurable:!0});function u(i,n,t){const r=x(t,m(n.string));if(!r)return;const e=n.type!==null&&/"|\w/.test(n.string[0])?n.start:n.end;return{list:r,from:{line:i.line,ch:e},to:{line:i.line,ch:n.end}}}p(u,"hintList");function x(i,n){if(!n)return y(i,r=>!r.isDeprecated);const t=i.map(r=>({proximity:V(m(r.text),n),entry:r}));return y(y(t,r=>r.proximity<=2),r=>!r.entry.isDeprecated).sort((r,e)=>(r.entry.isDeprecated?1:0)-(e.entry.isDeprecated?1:0)||r.proximity-e.proximity||r.entry.text.length-e.entry.text.length).map(r=>r.entry)}p(x,"filterAndSortList");function y(i,n){const t=i.filter(n);return t.length===0?i:t}p(y,"filterNonEmpty");function m(i){return i.toLowerCase().replaceAll(/\W/g,"")}p(m,"normalizeText");function V(i,n){let t=v(n,i);return i.length>n.length&&(t-=i.length-n.length-1,t+=i.indexOf(n)===0?0:.5),t}p(V,"getProximity");function v(i,n){let t,r;const e=[],a=i.length,s=n.length;for(t=0;t<=a;t++)e[t]=[t];for(r=1;r<=s;r++)e[0][r]=r;for(t=1;t<=a;t++)for(r=1;r<=s;r++){const c=i[t-1]===n[r-1]?0:1;e[t][r]=Math.min(e[t-1][r]+1,e[t][r-1]+1,e[t-1][r-1]+c),t>1&&r>1&&i[t-1]===n[r-2]&&i[t-2]===n[r-1]&&(e[t][r]=Math.min(e[t][r],e[t-2][r-2]+c))}return e[a][s]}p(v,"lexicalDistance");f.registerHelper("hint","graphql-variables",(i,n)=>{const t=i.getCursor(),r=i.getTokenAt(t),e=O(t,r,n);return e!=null&&e.list&&e.list.length>0&&(e.from=f.Pos(e.from.line,e.from.ch),e.to=f.Pos(e.to.line,e.to.ch),f.signal(i,"hasCompletion",i,e,r)),e});function O(i,n,t){const r=n.state.kind==="Invalid"?n.state.prevState:n.state,{kind:e,step:a}=r;if(e==="Document"&&a===0)return u(i,n,[{text:"{"}]);const{variableToType:s}=t;if(!s)return;const c=k(s,n.state);if(e==="Document"||e==="Variable"&&a===0){const l=Object.keys(s);return u(i,n,l.map(o=>({text:`"${o}": `,type:s[o]})))}if((e==="ObjectValue"||e==="ObjectField"&&a===0)&&c.fields){const l=Object.keys(c.fields).map(o=>c.fields[o]);return u(i,n,l.map(o=>({text:`"${o.name}": `,type:o.type,description:o.description})))}if(e==="StringValue"||e==="NumberValue"||e==="BooleanValue"||e==="NullValue"||e==="ListValue"&&a===1||e==="ObjectField"&&a===2||e==="Variable"&&a===2){const l=c.type?h(c.type):void 0;if(l instanceof b)return u(i,n,[{text:"{"}]);if(l instanceof T){const o=l.getValues();return u(i,n,o.map(g=>({text:`"${g.name}"`,type:l,description:g.description})))}if(l===d)return u(i,n,[{text:"true",type:d,description:"Not false."},{text:"false",type:d,description:"Not true."}])}}p(O,"getVariablesHint");function k(i,n){const t={type:null,fields:null};return L(n,r=>{switch(r.kind){case"Variable":{t.type=i[r.name];break}case"ListValue":{const e=t.type?j(t.type):void 0;t.type=e instanceof D?e.ofType:null;break}case"ObjectValue":{const e=t.type?h(t.type):void 0;t.fields=e instanceof b?e.getFields():null;break}case"ObjectField":{const e=r.name&&t.fields?t.fields[r.name]:null;t.type=e==null?void 0:e.type;break}}}),t}p(k,"getTypeInfo"); diff --git a/assets/html-cb66326c.js b/assets/html-f65e042b.js similarity index 98% rename from assets/html-cb66326c.js rename to assets/html-f65e042b.js index 4bfaa3c0..3e5e9f7c 100644 --- a/assets/html-cb66326c.js +++ b/assets/html-f65e042b.js @@ -1,4 +1,4 @@ -import{m as d}from"./index-42855235.js";/*!----------------------------------------------------------------------------- +import{m as d}from"./index-3e3bc65f.js";/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166) * Released under the MIT license diff --git a/assets/htmlMode-576cadc6.js b/assets/htmlMode-dc530c57.js similarity index 99% rename from assets/htmlMode-576cadc6.js rename to assets/htmlMode-dc530c57.js index 81403406..426fc3ac 100644 --- a/assets/htmlMode-576cadc6.js +++ b/assets/htmlMode-dc530c57.js @@ -1,4 +1,4 @@ -var $e=Object.defineProperty;var qe=(e,n,i)=>n in e?$e(e,n,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[n]=i;var k=(e,n,i)=>(qe(e,typeof n!="symbol"?n+"":n,i),i);import{m as Qe}from"./index-42855235.js";/*!----------------------------------------------------------------------------- +var $e=Object.defineProperty;var qe=(e,n,i)=>n in e?$e(e,n,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[n]=i;var k=(e,n,i)=>(qe(e,typeof n!="symbol"?n+"":n,i),i);import{m as Qe}from"./index-3e3bc65f.js";/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166) * Released under the MIT license diff --git a/assets/index-42855235.js b/assets/index-3e3bc65f.js similarity index 99% rename from assets/index-42855235.js rename to assets/index-3e3bc65f.js index f6051b5d..3fc4a91c 100644 --- a/assets/index-42855235.js +++ b/assets/index-3e3bc65f.js @@ -665,27 +665,27 @@ ${e.toString()}`}}class yw{constructor(e=new CP,t=!1,n,i=Sct){var r;this._servic * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt - *-----------------------------------------------------------------------------*/var _ht=Object.defineProperty,Sht=Object.getOwnPropertyDescriptor,Bht=Object.getOwnPropertyNames,wht=Object.prototype.hasOwnProperty,ole=(u,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Bht(e))!wht.call(u,i)&&i!==t&&_ht(u,i,{get:()=>e[i],enumerable:!(n=Sht(e,i))||n.enumerable});return u},Lht=(u,e,t)=>(ole(u,e,"default"),t&&ole(t,e,"default")),_b={};Lht(_b,BA);var fke={},vH={},pke=class{constructor(u){kn(this,"_languageId");kn(this,"_loadingTriggered");kn(this,"_lazyLoadPromise");kn(this,"_lazyLoadPromiseResolve");kn(this,"_lazyLoadPromiseReject");this._languageId=u,this._loadingTriggered=!1,this._lazyLoadPromise=new Promise((e,t)=>{this._lazyLoadPromiseResolve=e,this._lazyLoadPromiseReject=t})}static getOrCreate(u){return vH[u]||(vH[u]=new pke(u)),vH[u]}load(){return this._loadingTriggered||(this._loadingTriggered=!0,fke[this._languageId].loader().then(u=>this._lazyLoadPromiseResolve(u),u=>this._lazyLoadPromiseReject(u))),this._lazyLoadPromise}};function rt(u){const e=u.id;fke[e]=u,_b.languages.register(u);const t=pke.getOrCreate(e);_b.languages.registerTokensProviderFactory(e,{create:async()=>(await t.load()).language}),_b.languages.onLanguageEncountered(e,async()=>{const n=await t.load();_b.languages.setLanguageConfiguration(e,n.conf)})}rt({id:"abap",extensions:[".abap"],aliases:["abap","ABAP"],loader:()=>Te(()=>import("./abap-e5f08dc1.js"),[],import.meta.url)});rt({id:"apex",extensions:[".cls"],aliases:["Apex","apex"],mimetypes:["text/x-apex-source","text/x-apex"],loader:()=>Te(()=>import("./apex-fc8a734c.js"),[],import.meta.url)});rt({id:"azcli",extensions:[".azcli"],aliases:["Azure CLI","azcli"],loader:()=>Te(()=>import("./azcli-c4358445.js"),[],import.meta.url)});rt({id:"bat",extensions:[".bat",".cmd"],aliases:["Batch","bat"],loader:()=>Te(()=>import("./bat-eaac827b.js"),[],import.meta.url)});rt({id:"bicep",extensions:[".bicep"],aliases:["Bicep"],loader:()=>Te(()=>import("./bicep-9f8671bb.js"),[],import.meta.url)});rt({id:"cameligo",extensions:[".mligo"],aliases:["Cameligo"],loader:()=>Te(()=>import("./cameligo-ff939f45.js"),[],import.meta.url)});rt({id:"clojure",extensions:[".clj",".cljs",".cljc",".edn"],aliases:["clojure","Clojure"],loader:()=>Te(()=>import("./clojure-4a1da11c.js"),[],import.meta.url)});rt({id:"coffeescript",extensions:[".coffee"],aliases:["CoffeeScript","coffeescript","coffee"],mimetypes:["text/x-coffeescript","text/coffeescript"],loader:()=>Te(()=>import("./coffee-97023918.js"),[],import.meta.url)});rt({id:"c",extensions:[".c",".h"],aliases:["C","c"],loader:()=>Te(()=>import("./cpp-a410d69a.js"),[],import.meta.url)});rt({id:"cpp",extensions:[".cpp",".cc",".cxx",".hpp",".hh",".hxx"],aliases:["C++","Cpp","cpp"],loader:()=>Te(()=>import("./cpp-a410d69a.js"),[],import.meta.url)});rt({id:"csharp",extensions:[".cs",".csx",".cake"],aliases:["C#","csharp"],loader:()=>Te(()=>import("./csharp-0765aa28.js"),[],import.meta.url)});rt({id:"csp",extensions:[],aliases:["CSP","csp"],loader:()=>Te(()=>import("./csp-dba4fa86.js"),[],import.meta.url)});rt({id:"css",extensions:[".css"],aliases:["CSS","css"],mimetypes:["text/css"],loader:()=>Te(()=>import("./css-f18eed00.js"),[],import.meta.url)});rt({id:"cypher",extensions:[".cypher",".cyp"],aliases:["Cypher","OpenCypher"],loader:()=>Te(()=>import("./cypher-4b1a5b20.js"),[],import.meta.url)});rt({id:"dart",extensions:[".dart"],aliases:["Dart","dart"],mimetypes:["text/x-dart-source","text/x-dart"],loader:()=>Te(()=>import("./dart-c70c4314.js"),[],import.meta.url)});rt({id:"dockerfile",extensions:[".dockerfile"],filenames:["Dockerfile"],aliases:["Dockerfile"],loader:()=>Te(()=>import("./dockerfile-ff7f0401.js"),[],import.meta.url)});rt({id:"ecl",extensions:[".ecl"],aliases:["ECL","Ecl","ecl"],loader:()=>Te(()=>import("./ecl-3129e183.js"),[],import.meta.url)});rt({id:"elixir",extensions:[".ex",".exs"],aliases:["Elixir","elixir","ex"],loader:()=>Te(()=>import("./elixir-ac388b4d.js"),[],import.meta.url)});rt({id:"flow9",extensions:[".flow"],aliases:["Flow9","Flow","flow9","flow"],loader:()=>Te(()=>import("./flow9-049a8a6c.js"),[],import.meta.url)});rt({id:"fsharp",extensions:[".fs",".fsi",".ml",".mli",".fsx",".fsscript"],aliases:["F#","FSharp","fsharp"],loader:()=>Te(()=>import("./fsharp-535d9fe2.js"),[],import.meta.url)});rt({id:"freemarker2",extensions:[".ftl",".ftlh",".ftlx"],aliases:["FreeMarker2","Apache FreeMarker2"],loader:()=>Te(()=>import("./freemarker2-d3b6cc4c.js"),[],import.meta.url).then(u=>u.TagAutoInterpolationDollar)});rt({id:"freemarker2.tag-angle.interpolation-dollar",aliases:["FreeMarker2 (Angle/Dollar)","Apache FreeMarker2 (Angle/Dollar)"],loader:()=>Te(()=>import("./freemarker2-d3b6cc4c.js"),[],import.meta.url).then(u=>u.TagAngleInterpolationDollar)});rt({id:"freemarker2.tag-bracket.interpolation-dollar",aliases:["FreeMarker2 (Bracket/Dollar)","Apache FreeMarker2 (Bracket/Dollar)"],loader:()=>Te(()=>import("./freemarker2-d3b6cc4c.js"),[],import.meta.url).then(u=>u.TagBracketInterpolationDollar)});rt({id:"freemarker2.tag-angle.interpolation-bracket",aliases:["FreeMarker2 (Angle/Bracket)","Apache FreeMarker2 (Angle/Bracket)"],loader:()=>Te(()=>import("./freemarker2-d3b6cc4c.js"),[],import.meta.url).then(u=>u.TagAngleInterpolationBracket)});rt({id:"freemarker2.tag-bracket.interpolation-bracket",aliases:["FreeMarker2 (Bracket/Bracket)","Apache FreeMarker2 (Bracket/Bracket)"],loader:()=>Te(()=>import("./freemarker2-d3b6cc4c.js"),[],import.meta.url).then(u=>u.TagBracketInterpolationBracket)});rt({id:"freemarker2.tag-auto.interpolation-dollar",aliases:["FreeMarker2 (Auto/Dollar)","Apache FreeMarker2 (Auto/Dollar)"],loader:()=>Te(()=>import("./freemarker2-d3b6cc4c.js"),[],import.meta.url).then(u=>u.TagAutoInterpolationDollar)});rt({id:"freemarker2.tag-auto.interpolation-bracket",aliases:["FreeMarker2 (Auto/Bracket)","Apache FreeMarker2 (Auto/Bracket)"],loader:()=>Te(()=>import("./freemarker2-d3b6cc4c.js"),[],import.meta.url).then(u=>u.TagAutoInterpolationBracket)});rt({id:"go",extensions:[".go"],aliases:["Go"],loader:()=>Te(()=>import("./go-d4bfa116.js"),[],import.meta.url)});rt({id:"graphql",extensions:[".graphql",".gql"],aliases:["GraphQL","graphql","gql"],mimetypes:["application/graphql"],loader:()=>Te(()=>import("./graphql-e5a73eb7.js"),[],import.meta.url)});rt({id:"handlebars",extensions:[".handlebars",".hbs"],aliases:["Handlebars","handlebars","hbs"],mimetypes:["text/x-handlebars-template"],loader:()=>Te(()=>import("./handlebars-b20cc731.js"),[],import.meta.url)});rt({id:"hcl",extensions:[".tf",".tfvars",".hcl"],aliases:["Terraform","tf","HCL","hcl"],loader:()=>Te(()=>import("./hcl-8b69c899.js"),[],import.meta.url)});rt({id:"html",extensions:[".html",".htm",".shtml",".xhtml",".mdoc",".jsp",".asp",".aspx",".jshtm"],aliases:["HTML","htm","html","xhtml"],mimetypes:["text/html","text/x-jshtm","text/template","text/ng-template"],loader:()=>Te(()=>import("./html-cb66326c.js"),[],import.meta.url)});rt({id:"ini",extensions:[".ini",".properties",".gitconfig"],filenames:["config",".gitattributes",".gitconfig",".editorconfig"],aliases:["Ini","ini"],loader:()=>Te(()=>import("./ini-83ae2a3a.js"),[],import.meta.url)});rt({id:"java",extensions:[".java",".jav"],aliases:["Java","java"],mimetypes:["text/x-java-source","text/x-java"],loader:()=>Te(()=>import("./java-4806d9f5.js"),[],import.meta.url)});rt({id:"javascript",extensions:[".js",".es6",".jsx",".mjs",".cjs"],firstLine:"^#!.*\\bnode",filenames:["jakefile"],aliases:["JavaScript","javascript","js"],mimetypes:["text/javascript"],loader:()=>Te(()=>import("./javascript-683b6ed1.js"),["./javascript-683b6ed1.js","./typescript-25bb18d7.js"],import.meta.url)});rt({id:"julia",extensions:[".jl"],aliases:["julia","Julia"],loader:()=>Te(()=>import("./julia-334b5fb9.js"),[],import.meta.url)});rt({id:"kotlin",extensions:[".kt",".kts"],aliases:["Kotlin","kotlin"],mimetypes:["text/x-kotlin-source","text/x-kotlin"],loader:()=>Te(()=>import("./kotlin-ed14cfc6.js"),[],import.meta.url)});rt({id:"less",extensions:[".less"],aliases:["Less","less"],mimetypes:["text/x-less","text/less"],loader:()=>Te(()=>import("./less-58d9b66b.js"),[],import.meta.url)});rt({id:"lexon",extensions:[".lex"],aliases:["Lexon"],loader:()=>Te(()=>import("./lexon-8bf535e2.js"),[],import.meta.url)});rt({id:"lua",extensions:[".lua"],aliases:["Lua","lua"],loader:()=>Te(()=>import("./lua-96829d0e.js"),[],import.meta.url)});rt({id:"liquid",extensions:[".liquid",".html.liquid"],aliases:["Liquid","liquid"],mimetypes:["application/liquid"],loader:()=>Te(()=>import("./liquid-64baec53.js"),[],import.meta.url)});rt({id:"m3",extensions:[".m3",".i3",".mg",".ig"],aliases:["Modula-3","Modula3","modula3","m3"],loader:()=>Te(()=>import("./m3-815f612a.js"),[],import.meta.url)});rt({id:"markdown",extensions:[".md",".markdown",".mdown",".mkdn",".mkd",".mdwn",".mdtxt",".mdtext"],aliases:["Markdown","markdown"],loader:()=>Te(()=>import("./markdown-1cddbf33.js"),[],import.meta.url)});rt({id:"mdx",extensions:[".mdx"],aliases:["MDX","mdx"],loader:()=>Te(()=>import("./mdx-5f87c1bb.js"),[],import.meta.url)});rt({id:"mips",extensions:[".s"],aliases:["MIPS","MIPS-V"],mimetypes:["text/x-mips","text/mips","text/plaintext"],loader:()=>Te(()=>import("./mips-361940ec.js"),[],import.meta.url)});rt({id:"msdax",extensions:[".dax",".msdax"],aliases:["DAX","MSDAX"],loader:()=>Te(()=>import("./msdax-b98f6248.js"),[],import.meta.url)});rt({id:"mysql",extensions:[],aliases:["MySQL","mysql"],loader:()=>Te(()=>import("./mysql-b4d05809.js"),[],import.meta.url)});rt({id:"objective-c",extensions:[".m"],aliases:["Objective-C"],loader:()=>Te(()=>import("./objective-c-64e6f89b.js"),[],import.meta.url)});rt({id:"pascal",extensions:[".pas",".p",".pp"],aliases:["Pascal","pas"],mimetypes:["text/x-pascal-source","text/x-pascal"],loader:()=>Te(()=>import("./pascal-e1cbffd7.js"),[],import.meta.url)});rt({id:"pascaligo",extensions:[".ligo"],aliases:["Pascaligo","ligo"],loader:()=>Te(()=>import("./pascaligo-013c6c0b.js"),[],import.meta.url)});rt({id:"perl",extensions:[".pl",".pm"],aliases:["Perl","pl"],loader:()=>Te(()=>import("./perl-d9423546.js"),[],import.meta.url)});rt({id:"pgsql",extensions:[],aliases:["PostgreSQL","postgres","pg","postgre"],loader:()=>Te(()=>import("./pgsql-423e077d.js"),[],import.meta.url)});rt({id:"php",extensions:[".php",".php4",".php5",".phtml",".ctp"],aliases:["PHP","php"],mimetypes:["application/x-php"],loader:()=>Te(()=>import("./php-fb65b6b4.js"),[],import.meta.url)});rt({id:"pla",extensions:[".pla"],loader:()=>Te(()=>import("./pla-09e93e1b.js"),[],import.meta.url)});rt({id:"postiats",extensions:[".dats",".sats",".hats"],aliases:["ATS","ATS/Postiats"],loader:()=>Te(()=>import("./postiats-429bd8e8.js"),[],import.meta.url)});rt({id:"powerquery",extensions:[".pq",".pqm"],aliases:["PQ","M","Power Query","Power Query M"],loader:()=>Te(()=>import("./powerquery-0470a494.js"),[],import.meta.url)});rt({id:"powershell",extensions:[".ps1",".psm1",".psd1"],aliases:["PowerShell","powershell","ps","ps1"],loader:()=>Te(()=>import("./powershell-b433b622.js"),[],import.meta.url)});rt({id:"proto",extensions:[".proto"],aliases:["protobuf","Protocol Buffers"],loader:()=>Te(()=>import("./protobuf-3e557056.js"),[],import.meta.url)});rt({id:"pug",extensions:[".jade",".pug"],aliases:["Pug","Jade","jade"],loader:()=>Te(()=>import("./pug-b7980504.js"),[],import.meta.url)});rt({id:"python",extensions:[".py",".rpy",".pyw",".cpy",".gyp",".gypi"],aliases:["Python","py"],firstLine:"^#!/.*\\bpython[0-9.-]*\\b",loader:()=>Te(()=>import("./python-9156f981.js"),[],import.meta.url)});rt({id:"qsharp",extensions:[".qs"],aliases:["Q#","qsharp"],loader:()=>Te(()=>import("./qsharp-eed62033.js"),[],import.meta.url)});rt({id:"r",extensions:[".r",".rhistory",".rmd",".rprofile",".rt"],aliases:["R","r"],loader:()=>Te(()=>import("./r-8ce27f67.js"),[],import.meta.url)});rt({id:"razor",extensions:[".cshtml"],aliases:["Razor","razor"],mimetypes:["text/x-cshtml"],loader:()=>Te(()=>import("./razor-00ea269a.js"),[],import.meta.url)});rt({id:"redis",extensions:[".redis"],aliases:["redis"],loader:()=>Te(()=>import("./redis-aec7cdf4.js"),[],import.meta.url)});rt({id:"redshift",extensions:[],aliases:["Redshift","redshift"],loader:()=>Te(()=>import("./redshift-7d933e7a.js"),[],import.meta.url)});rt({id:"restructuredtext",extensions:[".rst"],aliases:["reStructuredText","restructuredtext"],loader:()=>Te(()=>import("./restructuredtext-a9e4c4cc.js"),[],import.meta.url)});rt({id:"ruby",extensions:[".rb",".rbx",".rjs",".gemspec",".pp"],filenames:["rakefile","Gemfile"],aliases:["Ruby","rb"],loader:()=>Te(()=>import("./ruby-c9974e35.js"),[],import.meta.url)});rt({id:"rust",extensions:[".rs",".rlib"],aliases:["Rust","rust"],loader:()=>Te(()=>import("./rust-9669a673.js"),[],import.meta.url)});rt({id:"sb",extensions:[".sb"],aliases:["Small Basic","sb"],loader:()=>Te(()=>import("./sb-b221a0fc.js"),[],import.meta.url)});rt({id:"scala",extensions:[".scala",".sc",".sbt"],aliases:["Scala","scala","SBT","Sbt","sbt","Dotty","dotty"],mimetypes:["text/x-scala-source","text/x-scala","text/x-sbt","text/x-dotty"],loader:()=>Te(()=>import("./scala-9222416a.js"),[],import.meta.url)});rt({id:"scheme",extensions:[".scm",".ss",".sch",".rkt"],aliases:["scheme","Scheme"],loader:()=>Te(()=>import("./scheme-86110af1.js"),[],import.meta.url)});rt({id:"scss",extensions:[".scss"],aliases:["Sass","sass","scss"],mimetypes:["text/x-scss","text/scss"],loader:()=>Te(()=>import("./scss-7da24d39.js"),[],import.meta.url)});rt({id:"shell",extensions:[".sh",".bash"],aliases:["Shell","sh"],loader:()=>Te(()=>import("./shell-0ca4f4ad.js"),[],import.meta.url)});rt({id:"sol",extensions:[".sol"],aliases:["sol","solidity","Solidity"],loader:()=>Te(()=>import("./solidity-0072896b.js"),[],import.meta.url)});rt({id:"aes",extensions:[".aes"],aliases:["aes","sophia","Sophia"],loader:()=>Te(()=>import("./sophia-bc45fa87.js"),[],import.meta.url)});rt({id:"sparql",extensions:[".rq"],aliases:["sparql","SPARQL"],loader:()=>Te(()=>import("./sparql-28fc150c.js"),[],import.meta.url)});rt({id:"sql",extensions:[".sql"],aliases:["SQL"],loader:()=>Te(()=>import("./sql-96f7b353.js"),[],import.meta.url)});rt({id:"st",extensions:[".st",".iecst",".iecplc",".lc3lib",".TcPOU",".TcDUT",".TcGVL",".TcIO"],aliases:["StructuredText","scl","stl"],loader:()=>Te(()=>import("./st-c45997f6.js"),[],import.meta.url)});rt({id:"swift",aliases:["Swift","swift"],extensions:[".swift"],mimetypes:["text/swift"],loader:()=>Te(()=>import("./swift-3b85cc8e.js"),[],import.meta.url)});rt({id:"systemverilog",extensions:[".sv",".svh"],aliases:["SV","sv","SystemVerilog","systemverilog"],loader:()=>Te(()=>import("./systemverilog-2ec460af.js"),[],import.meta.url)});rt({id:"verilog",extensions:[".v",".vh"],aliases:["V","v","Verilog","verilog"],loader:()=>Te(()=>import("./systemverilog-2ec460af.js"),[],import.meta.url)});rt({id:"tcl",extensions:[".tcl"],aliases:["tcl","Tcl","tcltk","TclTk","tcl/tk","Tcl/Tk"],loader:()=>Te(()=>import("./tcl-37e129b8.js"),[],import.meta.url)});rt({id:"twig",extensions:[".twig"],aliases:["Twig","twig"],mimetypes:["text/x-twig"],loader:()=>Te(()=>import("./twig-1734ec31.js"),[],import.meta.url)});rt({id:"typescript",extensions:[".ts",".tsx",".cts",".mts"],aliases:["TypeScript","ts","typescript"],mimetypes:["text/typescript"],loader:()=>Te(()=>import("./typescript-25bb18d7.js"),[],import.meta.url)});rt({id:"vb",extensions:[".vb"],aliases:["Visual Basic","vb"],loader:()=>Te(()=>import("./vb-77962f32.js"),[],import.meta.url)});rt({id:"wgsl",extensions:[".wgsl"],aliases:["WebGPU Shading Language","WGSL","wgsl"],loader:()=>Te(()=>import("./wgsl-e67d25e4.js"),[],import.meta.url)});rt({id:"xml",extensions:[".xml",".xsd",".dtd",".ascx",".csproj",".config",".props",".targets",".wxi",".wxl",".wxs",".xaml",".svg",".svgz",".opf",".xslt",".xsl"],firstLine:"(\\<\\?xml.*)|(\\Te(()=>import("./xml-69a62d23.js"),[],import.meta.url)});rt({id:"yaml",extensions:[".yaml",".yml"],aliases:["YAML","yaml","YML","yml"],mimetypes:["application/x-yaml","text/x-yaml"],loader:()=>Te(()=>import("./yaml-46c0b391.js"),[],import.meta.url)});/*!----------------------------------------------------------------------------- + *-----------------------------------------------------------------------------*/var _ht=Object.defineProperty,Sht=Object.getOwnPropertyDescriptor,Bht=Object.getOwnPropertyNames,wht=Object.prototype.hasOwnProperty,ole=(u,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Bht(e))!wht.call(u,i)&&i!==t&&_ht(u,i,{get:()=>e[i],enumerable:!(n=Sht(e,i))||n.enumerable});return u},Lht=(u,e,t)=>(ole(u,e,"default"),t&&ole(t,e,"default")),_b={};Lht(_b,BA);var fke={},vH={},pke=class{constructor(u){kn(this,"_languageId");kn(this,"_loadingTriggered");kn(this,"_lazyLoadPromise");kn(this,"_lazyLoadPromiseResolve");kn(this,"_lazyLoadPromiseReject");this._languageId=u,this._loadingTriggered=!1,this._lazyLoadPromise=new Promise((e,t)=>{this._lazyLoadPromiseResolve=e,this._lazyLoadPromiseReject=t})}static getOrCreate(u){return vH[u]||(vH[u]=new pke(u)),vH[u]}load(){return this._loadingTriggered||(this._loadingTriggered=!0,fke[this._languageId].loader().then(u=>this._lazyLoadPromiseResolve(u),u=>this._lazyLoadPromiseReject(u))),this._lazyLoadPromise}};function rt(u){const e=u.id;fke[e]=u,_b.languages.register(u);const t=pke.getOrCreate(e);_b.languages.registerTokensProviderFactory(e,{create:async()=>(await t.load()).language}),_b.languages.onLanguageEncountered(e,async()=>{const n=await t.load();_b.languages.setLanguageConfiguration(e,n.conf)})}rt({id:"abap",extensions:[".abap"],aliases:["abap","ABAP"],loader:()=>Te(()=>import("./abap-e5f08dc1.js"),[],import.meta.url)});rt({id:"apex",extensions:[".cls"],aliases:["Apex","apex"],mimetypes:["text/x-apex-source","text/x-apex"],loader:()=>Te(()=>import("./apex-fc8a734c.js"),[],import.meta.url)});rt({id:"azcli",extensions:[".azcli"],aliases:["Azure CLI","azcli"],loader:()=>Te(()=>import("./azcli-c4358445.js"),[],import.meta.url)});rt({id:"bat",extensions:[".bat",".cmd"],aliases:["Batch","bat"],loader:()=>Te(()=>import("./bat-eaac827b.js"),[],import.meta.url)});rt({id:"bicep",extensions:[".bicep"],aliases:["Bicep"],loader:()=>Te(()=>import("./bicep-9f8671bb.js"),[],import.meta.url)});rt({id:"cameligo",extensions:[".mligo"],aliases:["Cameligo"],loader:()=>Te(()=>import("./cameligo-ff939f45.js"),[],import.meta.url)});rt({id:"clojure",extensions:[".clj",".cljs",".cljc",".edn"],aliases:["clojure","Clojure"],loader:()=>Te(()=>import("./clojure-4a1da11c.js"),[],import.meta.url)});rt({id:"coffeescript",extensions:[".coffee"],aliases:["CoffeeScript","coffeescript","coffee"],mimetypes:["text/x-coffeescript","text/coffeescript"],loader:()=>Te(()=>import("./coffee-97023918.js"),[],import.meta.url)});rt({id:"c",extensions:[".c",".h"],aliases:["C","c"],loader:()=>Te(()=>import("./cpp-a410d69a.js"),[],import.meta.url)});rt({id:"cpp",extensions:[".cpp",".cc",".cxx",".hpp",".hh",".hxx"],aliases:["C++","Cpp","cpp"],loader:()=>Te(()=>import("./cpp-a410d69a.js"),[],import.meta.url)});rt({id:"csharp",extensions:[".cs",".csx",".cake"],aliases:["C#","csharp"],loader:()=>Te(()=>import("./csharp-0765aa28.js"),[],import.meta.url)});rt({id:"csp",extensions:[],aliases:["CSP","csp"],loader:()=>Te(()=>import("./csp-dba4fa86.js"),[],import.meta.url)});rt({id:"css",extensions:[".css"],aliases:["CSS","css"],mimetypes:["text/css"],loader:()=>Te(()=>import("./css-f18eed00.js"),[],import.meta.url)});rt({id:"cypher",extensions:[".cypher",".cyp"],aliases:["Cypher","OpenCypher"],loader:()=>Te(()=>import("./cypher-4b1a5b20.js"),[],import.meta.url)});rt({id:"dart",extensions:[".dart"],aliases:["Dart","dart"],mimetypes:["text/x-dart-source","text/x-dart"],loader:()=>Te(()=>import("./dart-c70c4314.js"),[],import.meta.url)});rt({id:"dockerfile",extensions:[".dockerfile"],filenames:["Dockerfile"],aliases:["Dockerfile"],loader:()=>Te(()=>import("./dockerfile-ff7f0401.js"),[],import.meta.url)});rt({id:"ecl",extensions:[".ecl"],aliases:["ECL","Ecl","ecl"],loader:()=>Te(()=>import("./ecl-3129e183.js"),[],import.meta.url)});rt({id:"elixir",extensions:[".ex",".exs"],aliases:["Elixir","elixir","ex"],loader:()=>Te(()=>import("./elixir-ac388b4d.js"),[],import.meta.url)});rt({id:"flow9",extensions:[".flow"],aliases:["Flow9","Flow","flow9","flow"],loader:()=>Te(()=>import("./flow9-049a8a6c.js"),[],import.meta.url)});rt({id:"fsharp",extensions:[".fs",".fsi",".ml",".mli",".fsx",".fsscript"],aliases:["F#","FSharp","fsharp"],loader:()=>Te(()=>import("./fsharp-535d9fe2.js"),[],import.meta.url)});rt({id:"freemarker2",extensions:[".ftl",".ftlh",".ftlx"],aliases:["FreeMarker2","Apache FreeMarker2"],loader:()=>Te(()=>import("./freemarker2-cd4de472.js"),[],import.meta.url).then(u=>u.TagAutoInterpolationDollar)});rt({id:"freemarker2.tag-angle.interpolation-dollar",aliases:["FreeMarker2 (Angle/Dollar)","Apache FreeMarker2 (Angle/Dollar)"],loader:()=>Te(()=>import("./freemarker2-cd4de472.js"),[],import.meta.url).then(u=>u.TagAngleInterpolationDollar)});rt({id:"freemarker2.tag-bracket.interpolation-dollar",aliases:["FreeMarker2 (Bracket/Dollar)","Apache FreeMarker2 (Bracket/Dollar)"],loader:()=>Te(()=>import("./freemarker2-cd4de472.js"),[],import.meta.url).then(u=>u.TagBracketInterpolationDollar)});rt({id:"freemarker2.tag-angle.interpolation-bracket",aliases:["FreeMarker2 (Angle/Bracket)","Apache FreeMarker2 (Angle/Bracket)"],loader:()=>Te(()=>import("./freemarker2-cd4de472.js"),[],import.meta.url).then(u=>u.TagAngleInterpolationBracket)});rt({id:"freemarker2.tag-bracket.interpolation-bracket",aliases:["FreeMarker2 (Bracket/Bracket)","Apache FreeMarker2 (Bracket/Bracket)"],loader:()=>Te(()=>import("./freemarker2-cd4de472.js"),[],import.meta.url).then(u=>u.TagBracketInterpolationBracket)});rt({id:"freemarker2.tag-auto.interpolation-dollar",aliases:["FreeMarker2 (Auto/Dollar)","Apache FreeMarker2 (Auto/Dollar)"],loader:()=>Te(()=>import("./freemarker2-cd4de472.js"),[],import.meta.url).then(u=>u.TagAutoInterpolationDollar)});rt({id:"freemarker2.tag-auto.interpolation-bracket",aliases:["FreeMarker2 (Auto/Bracket)","Apache FreeMarker2 (Auto/Bracket)"],loader:()=>Te(()=>import("./freemarker2-cd4de472.js"),[],import.meta.url).then(u=>u.TagAutoInterpolationBracket)});rt({id:"go",extensions:[".go"],aliases:["Go"],loader:()=>Te(()=>import("./go-d4bfa116.js"),[],import.meta.url)});rt({id:"graphql",extensions:[".graphql",".gql"],aliases:["GraphQL","graphql","gql"],mimetypes:["application/graphql"],loader:()=>Te(()=>import("./graphql-e5a73eb7.js"),[],import.meta.url)});rt({id:"handlebars",extensions:[".handlebars",".hbs"],aliases:["Handlebars","handlebars","hbs"],mimetypes:["text/x-handlebars-template"],loader:()=>Te(()=>import("./handlebars-b5c71914.js"),[],import.meta.url)});rt({id:"hcl",extensions:[".tf",".tfvars",".hcl"],aliases:["Terraform","tf","HCL","hcl"],loader:()=>Te(()=>import("./hcl-8b69c899.js"),[],import.meta.url)});rt({id:"html",extensions:[".html",".htm",".shtml",".xhtml",".mdoc",".jsp",".asp",".aspx",".jshtm"],aliases:["HTML","htm","html","xhtml"],mimetypes:["text/html","text/x-jshtm","text/template","text/ng-template"],loader:()=>Te(()=>import("./html-f65e042b.js"),[],import.meta.url)});rt({id:"ini",extensions:[".ini",".properties",".gitconfig"],filenames:["config",".gitattributes",".gitconfig",".editorconfig"],aliases:["Ini","ini"],loader:()=>Te(()=>import("./ini-83ae2a3a.js"),[],import.meta.url)});rt({id:"java",extensions:[".java",".jav"],aliases:["Java","java"],mimetypes:["text/x-java-source","text/x-java"],loader:()=>Te(()=>import("./java-4806d9f5.js"),[],import.meta.url)});rt({id:"javascript",extensions:[".js",".es6",".jsx",".mjs",".cjs"],firstLine:"^#!.*\\bnode",filenames:["jakefile"],aliases:["JavaScript","javascript","js"],mimetypes:["text/javascript"],loader:()=>Te(()=>import("./javascript-fa0a3918.js"),["./javascript-fa0a3918.js","./typescript-7a1a6d4d.js"],import.meta.url)});rt({id:"julia",extensions:[".jl"],aliases:["julia","Julia"],loader:()=>Te(()=>import("./julia-334b5fb9.js"),[],import.meta.url)});rt({id:"kotlin",extensions:[".kt",".kts"],aliases:["Kotlin","kotlin"],mimetypes:["text/x-kotlin-source","text/x-kotlin"],loader:()=>Te(()=>import("./kotlin-ed14cfc6.js"),[],import.meta.url)});rt({id:"less",extensions:[".less"],aliases:["Less","less"],mimetypes:["text/x-less","text/less"],loader:()=>Te(()=>import("./less-58d9b66b.js"),[],import.meta.url)});rt({id:"lexon",extensions:[".lex"],aliases:["Lexon"],loader:()=>Te(()=>import("./lexon-8bf535e2.js"),[],import.meta.url)});rt({id:"lua",extensions:[".lua"],aliases:["Lua","lua"],loader:()=>Te(()=>import("./lua-96829d0e.js"),[],import.meta.url)});rt({id:"liquid",extensions:[".liquid",".html.liquid"],aliases:["Liquid","liquid"],mimetypes:["application/liquid"],loader:()=>Te(()=>import("./liquid-635c256b.js"),[],import.meta.url)});rt({id:"m3",extensions:[".m3",".i3",".mg",".ig"],aliases:["Modula-3","Modula3","modula3","m3"],loader:()=>Te(()=>import("./m3-815f612a.js"),[],import.meta.url)});rt({id:"markdown",extensions:[".md",".markdown",".mdown",".mkdn",".mkd",".mdwn",".mdtxt",".mdtext"],aliases:["Markdown","markdown"],loader:()=>Te(()=>import("./markdown-1cddbf33.js"),[],import.meta.url)});rt({id:"mdx",extensions:[".mdx"],aliases:["MDX","mdx"],loader:()=>Te(()=>import("./mdx-5637cf5b.js"),[],import.meta.url)});rt({id:"mips",extensions:[".s"],aliases:["MIPS","MIPS-V"],mimetypes:["text/x-mips","text/mips","text/plaintext"],loader:()=>Te(()=>import("./mips-361940ec.js"),[],import.meta.url)});rt({id:"msdax",extensions:[".dax",".msdax"],aliases:["DAX","MSDAX"],loader:()=>Te(()=>import("./msdax-b98f6248.js"),[],import.meta.url)});rt({id:"mysql",extensions:[],aliases:["MySQL","mysql"],loader:()=>Te(()=>import("./mysql-b4d05809.js"),[],import.meta.url)});rt({id:"objective-c",extensions:[".m"],aliases:["Objective-C"],loader:()=>Te(()=>import("./objective-c-64e6f89b.js"),[],import.meta.url)});rt({id:"pascal",extensions:[".pas",".p",".pp"],aliases:["Pascal","pas"],mimetypes:["text/x-pascal-source","text/x-pascal"],loader:()=>Te(()=>import("./pascal-e1cbffd7.js"),[],import.meta.url)});rt({id:"pascaligo",extensions:[".ligo"],aliases:["Pascaligo","ligo"],loader:()=>Te(()=>import("./pascaligo-013c6c0b.js"),[],import.meta.url)});rt({id:"perl",extensions:[".pl",".pm"],aliases:["Perl","pl"],loader:()=>Te(()=>import("./perl-d9423546.js"),[],import.meta.url)});rt({id:"pgsql",extensions:[],aliases:["PostgreSQL","postgres","pg","postgre"],loader:()=>Te(()=>import("./pgsql-423e077d.js"),[],import.meta.url)});rt({id:"php",extensions:[".php",".php4",".php5",".phtml",".ctp"],aliases:["PHP","php"],mimetypes:["application/x-php"],loader:()=>Te(()=>import("./php-fb65b6b4.js"),[],import.meta.url)});rt({id:"pla",extensions:[".pla"],loader:()=>Te(()=>import("./pla-09e93e1b.js"),[],import.meta.url)});rt({id:"postiats",extensions:[".dats",".sats",".hats"],aliases:["ATS","ATS/Postiats"],loader:()=>Te(()=>import("./postiats-429bd8e8.js"),[],import.meta.url)});rt({id:"powerquery",extensions:[".pq",".pqm"],aliases:["PQ","M","Power Query","Power Query M"],loader:()=>Te(()=>import("./powerquery-0470a494.js"),[],import.meta.url)});rt({id:"powershell",extensions:[".ps1",".psm1",".psd1"],aliases:["PowerShell","powershell","ps","ps1"],loader:()=>Te(()=>import("./powershell-b433b622.js"),[],import.meta.url)});rt({id:"proto",extensions:[".proto"],aliases:["protobuf","Protocol Buffers"],loader:()=>Te(()=>import("./protobuf-3e557056.js"),[],import.meta.url)});rt({id:"pug",extensions:[".jade",".pug"],aliases:["Pug","Jade","jade"],loader:()=>Te(()=>import("./pug-b7980504.js"),[],import.meta.url)});rt({id:"python",extensions:[".py",".rpy",".pyw",".cpy",".gyp",".gypi"],aliases:["Python","py"],firstLine:"^#!/.*\\bpython[0-9.-]*\\b",loader:()=>Te(()=>import("./python-44c5b0d9.js"),[],import.meta.url)});rt({id:"qsharp",extensions:[".qs"],aliases:["Q#","qsharp"],loader:()=>Te(()=>import("./qsharp-eed62033.js"),[],import.meta.url)});rt({id:"r",extensions:[".r",".rhistory",".rmd",".rprofile",".rt"],aliases:["R","r"],loader:()=>Te(()=>import("./r-8ce27f67.js"),[],import.meta.url)});rt({id:"razor",extensions:[".cshtml"],aliases:["Razor","razor"],mimetypes:["text/x-cshtml"],loader:()=>Te(()=>import("./razor-7d4f3a02.js"),[],import.meta.url)});rt({id:"redis",extensions:[".redis"],aliases:["redis"],loader:()=>Te(()=>import("./redis-aec7cdf4.js"),[],import.meta.url)});rt({id:"redshift",extensions:[],aliases:["Redshift","redshift"],loader:()=>Te(()=>import("./redshift-7d933e7a.js"),[],import.meta.url)});rt({id:"restructuredtext",extensions:[".rst"],aliases:["reStructuredText","restructuredtext"],loader:()=>Te(()=>import("./restructuredtext-a9e4c4cc.js"),[],import.meta.url)});rt({id:"ruby",extensions:[".rb",".rbx",".rjs",".gemspec",".pp"],filenames:["rakefile","Gemfile"],aliases:["Ruby","rb"],loader:()=>Te(()=>import("./ruby-c9974e35.js"),[],import.meta.url)});rt({id:"rust",extensions:[".rs",".rlib"],aliases:["Rust","rust"],loader:()=>Te(()=>import("./rust-9669a673.js"),[],import.meta.url)});rt({id:"sb",extensions:[".sb"],aliases:["Small Basic","sb"],loader:()=>Te(()=>import("./sb-b221a0fc.js"),[],import.meta.url)});rt({id:"scala",extensions:[".scala",".sc",".sbt"],aliases:["Scala","scala","SBT","Sbt","sbt","Dotty","dotty"],mimetypes:["text/x-scala-source","text/x-scala","text/x-sbt","text/x-dotty"],loader:()=>Te(()=>import("./scala-9222416a.js"),[],import.meta.url)});rt({id:"scheme",extensions:[".scm",".ss",".sch",".rkt"],aliases:["scheme","Scheme"],loader:()=>Te(()=>import("./scheme-86110af1.js"),[],import.meta.url)});rt({id:"scss",extensions:[".scss"],aliases:["Sass","sass","scss"],mimetypes:["text/x-scss","text/scss"],loader:()=>Te(()=>import("./scss-7da24d39.js"),[],import.meta.url)});rt({id:"shell",extensions:[".sh",".bash"],aliases:["Shell","sh"],loader:()=>Te(()=>import("./shell-0ca4f4ad.js"),[],import.meta.url)});rt({id:"sol",extensions:[".sol"],aliases:["sol","solidity","Solidity"],loader:()=>Te(()=>import("./solidity-0072896b.js"),[],import.meta.url)});rt({id:"aes",extensions:[".aes"],aliases:["aes","sophia","Sophia"],loader:()=>Te(()=>import("./sophia-bc45fa87.js"),[],import.meta.url)});rt({id:"sparql",extensions:[".rq"],aliases:["sparql","SPARQL"],loader:()=>Te(()=>import("./sparql-28fc150c.js"),[],import.meta.url)});rt({id:"sql",extensions:[".sql"],aliases:["SQL"],loader:()=>Te(()=>import("./sql-96f7b353.js"),[],import.meta.url)});rt({id:"st",extensions:[".st",".iecst",".iecplc",".lc3lib",".TcPOU",".TcDUT",".TcGVL",".TcIO"],aliases:["StructuredText","scl","stl"],loader:()=>Te(()=>import("./st-c45997f6.js"),[],import.meta.url)});rt({id:"swift",aliases:["Swift","swift"],extensions:[".swift"],mimetypes:["text/swift"],loader:()=>Te(()=>import("./swift-3b85cc8e.js"),[],import.meta.url)});rt({id:"systemverilog",extensions:[".sv",".svh"],aliases:["SV","sv","SystemVerilog","systemverilog"],loader:()=>Te(()=>import("./systemverilog-2ec460af.js"),[],import.meta.url)});rt({id:"verilog",extensions:[".v",".vh"],aliases:["V","v","Verilog","verilog"],loader:()=>Te(()=>import("./systemverilog-2ec460af.js"),[],import.meta.url)});rt({id:"tcl",extensions:[".tcl"],aliases:["tcl","Tcl","tcltk","TclTk","tcl/tk","Tcl/Tk"],loader:()=>Te(()=>import("./tcl-37e129b8.js"),[],import.meta.url)});rt({id:"twig",extensions:[".twig"],aliases:["Twig","twig"],mimetypes:["text/x-twig"],loader:()=>Te(()=>import("./twig-1734ec31.js"),[],import.meta.url)});rt({id:"typescript",extensions:[".ts",".tsx",".cts",".mts"],aliases:["TypeScript","ts","typescript"],mimetypes:["text/typescript"],loader:()=>Te(()=>import("./typescript-7a1a6d4d.js"),[],import.meta.url)});rt({id:"vb",extensions:[".vb"],aliases:["Visual Basic","vb"],loader:()=>Te(()=>import("./vb-77962f32.js"),[],import.meta.url)});rt({id:"wgsl",extensions:[".wgsl"],aliases:["WebGPU Shading Language","WGSL","wgsl"],loader:()=>Te(()=>import("./wgsl-e67d25e4.js"),[],import.meta.url)});rt({id:"xml",extensions:[".xml",".xsd",".dtd",".ascx",".csproj",".config",".props",".targets",".wxi",".wxl",".wxs",".xaml",".svg",".svgz",".opf",".xslt",".xsl"],firstLine:"(\\<\\?xml.*)|(\\Te(()=>import("./xml-4f671360.js"),[],import.meta.url)});rt({id:"yaml",extensions:[".yaml",".yml"],aliases:["YAML","yaml","YML","yml"],mimetypes:["application/x-yaml","text/x-yaml"],loader:()=>Te(()=>import("./yaml-94097e24.js"),[],import.meta.url)});/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt - *-----------------------------------------------------------------------------*/var zht=Object.defineProperty,Mht=Object.getOwnPropertyDescriptor,Tht=Object.getOwnPropertyNames,Nht=Object.prototype.hasOwnProperty,sle=(u,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Tht(e))!Nht.call(u,i)&&i!==t&&zht(u,i,{get:()=>e[i],enumerable:!(n=Mht(e,i))||n.enumerable});return u},Pht=(u,e,t)=>(sle(u,e,"default"),t&&sle(t,e,"default")),v6={};Pht(v6,BA);var Uee=class{constructor(e,t,n){kn(this,"_onDidChange",new v6.Emitter);kn(this,"_options");kn(this,"_modeConfiguration");kn(this,"_languageId");this._languageId=e,this.setOptions(t),this.setModeConfiguration(n)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get modeConfiguration(){return this._modeConfiguration}get diagnosticsOptions(){return this.options}get options(){return this._options}setOptions(e){this._options=e||Object.create(null),this._onDidChange.fire(this)}setDiagnosticsOptions(e){this.setOptions(e)}setModeConfiguration(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(this)}},qee={validate:!0,lint:{compatibleVendorPrefixes:"ignore",vendorPrefix:"warning",duplicateProperties:"warning",emptyRules:"warning",importStatement:"ignore",boxModel:"ignore",universalSelector:"ignore",zeroUnits:"ignore",fontFaceProperties:"warning",hexColorLength:"error",argumentsInColorFunction:"error",unknownProperties:"warning",ieHack:"ignore",unknownVendorSpecificProperties:"ignore",propertyIgnoredDueToDisplay:"warning",important:"ignore",float:"ignore",idSelector:"ignore"},data:{useDefaultDataProvider:!0},format:{newlineBetweenSelectors:!0,newlineBetweenRules:!0,spaceAroundSelectorSeparator:!1,braceStyle:"collapse",maxPreserveNewLines:void 0,preserveNewLines:!0}},Jee={completionItems:!0,hovers:!0,documentSymbols:!0,definitions:!0,references:!0,documentHighlights:!0,rename:!0,colors:!0,foldingRanges:!0,diagnostics:!0,selectionRanges:!0,documentFormattingEdits:!0,documentRangeFormattingEdits:!0},Dke=new Uee("css",qee,Jee),xke=new Uee("scss",qee,Jee),vke=new Uee("less",qee,Jee);v6.languages.css={cssDefaults:Dke,lessDefaults:vke,scssDefaults:xke};function Zee(){return Te(()=>import("./cssMode-28dd96e9.js"),[],import.meta.url)}v6.languages.onLanguage("less",()=>{Zee().then(u=>u.setupMode(vke))});v6.languages.onLanguage("scss",()=>{Zee().then(u=>u.setupMode(xke))});v6.languages.onLanguage("css",()=>{Zee().then(u=>u.setupMode(Dke))});/*!----------------------------------------------------------------------------- + *-----------------------------------------------------------------------------*/var zht=Object.defineProperty,Mht=Object.getOwnPropertyDescriptor,Tht=Object.getOwnPropertyNames,Nht=Object.prototype.hasOwnProperty,sle=(u,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Tht(e))!Nht.call(u,i)&&i!==t&&zht(u,i,{get:()=>e[i],enumerable:!(n=Mht(e,i))||n.enumerable});return u},Pht=(u,e,t)=>(sle(u,e,"default"),t&&sle(t,e,"default")),v6={};Pht(v6,BA);var Uee=class{constructor(e,t,n){kn(this,"_onDidChange",new v6.Emitter);kn(this,"_options");kn(this,"_modeConfiguration");kn(this,"_languageId");this._languageId=e,this.setOptions(t),this.setModeConfiguration(n)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get modeConfiguration(){return this._modeConfiguration}get diagnosticsOptions(){return this.options}get options(){return this._options}setOptions(e){this._options=e||Object.create(null),this._onDidChange.fire(this)}setDiagnosticsOptions(e){this.setOptions(e)}setModeConfiguration(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(this)}},qee={validate:!0,lint:{compatibleVendorPrefixes:"ignore",vendorPrefix:"warning",duplicateProperties:"warning",emptyRules:"warning",importStatement:"ignore",boxModel:"ignore",universalSelector:"ignore",zeroUnits:"ignore",fontFaceProperties:"warning",hexColorLength:"error",argumentsInColorFunction:"error",unknownProperties:"warning",ieHack:"ignore",unknownVendorSpecificProperties:"ignore",propertyIgnoredDueToDisplay:"warning",important:"ignore",float:"ignore",idSelector:"ignore"},data:{useDefaultDataProvider:!0},format:{newlineBetweenSelectors:!0,newlineBetweenRules:!0,spaceAroundSelectorSeparator:!1,braceStyle:"collapse",maxPreserveNewLines:void 0,preserveNewLines:!0}},Jee={completionItems:!0,hovers:!0,documentSymbols:!0,definitions:!0,references:!0,documentHighlights:!0,rename:!0,colors:!0,foldingRanges:!0,diagnostics:!0,selectionRanges:!0,documentFormattingEdits:!0,documentRangeFormattingEdits:!0},Dke=new Uee("css",qee,Jee),xke=new Uee("scss",qee,Jee),vke=new Uee("less",qee,Jee);v6.languages.css={cssDefaults:Dke,lessDefaults:vke,scssDefaults:xke};function Zee(){return Te(()=>import("./cssMode-8df568c2.js"),[],import.meta.url)}v6.languages.onLanguage("less",()=>{Zee().then(u=>u.setupMode(vke))});v6.languages.onLanguage("scss",()=>{Zee().then(u=>u.setupMode(xke))});v6.languages.onLanguage("css",()=>{Zee().then(u=>u.setupMode(Dke))});/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt - *-----------------------------------------------------------------------------*/var Rht=Object.defineProperty,Iht=Object.getOwnPropertyDescriptor,Oht=Object.getOwnPropertyNames,jht=Object.prototype.hasOwnProperty,lle=(u,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Oht(e))!jht.call(u,i)&&i!==t&&Rht(u,i,{get:()=>e[i],enumerable:!(n=Iht(e,i))||n.enumerable});return u},Hht=(u,e,t)=>(lle(u,e,"default"),t&&lle(t,e,"default")),ZP={};Hht(ZP,BA);var Vht=class{constructor(e,t,n){kn(this,"_onDidChange",new ZP.Emitter);kn(this,"_options");kn(this,"_modeConfiguration");kn(this,"_languageId");this._languageId=e,this.setOptions(t),this.setModeConfiguration(n)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get options(){return this._options}get modeConfiguration(){return this._modeConfiguration}setOptions(e){this._options=e||Object.create(null),this._onDidChange.fire(this)}setModeConfiguration(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(this)}},$ht={tabSize:4,insertSpaces:!1,wrapLineLength:120,unformatted:'default": "a, abbr, acronym, b, bdo, big, br, button, cite, code, dfn, em, i, img, input, kbd, label, map, object, q, samp, select, small, span, strong, sub, sup, textarea, tt, var',contentUnformatted:"pre",indentInnerHtml:!1,preserveNewLines:!0,maxPreserveNewLines:void 0,indentHandlebars:!1,endWithNewline:!1,extraLiners:"head, body, /html",wrapAttributes:"auto"},YP={format:$ht,suggest:{},data:{useDefaultDataProvider:!0}};function QP(u){return{completionItems:!0,hovers:!0,documentSymbols:!0,links:!0,documentHighlights:!0,rename:!0,colors:!0,foldingRanges:!0,selectionRanges:!0,diagnostics:u===g2,documentFormattingEdits:u===g2,documentRangeFormattingEdits:u===g2}}var g2="html",cle="handlebars",dle="razor",Cke=XP(g2,YP,QP(g2)),Kht=Cke.defaults,bke=XP(cle,YP,QP(cle)),Wht=bke.defaults,kke=XP(dle,YP,QP(dle)),Ght=kke.defaults;ZP.languages.html={htmlDefaults:Kht,razorDefaults:Ght,handlebarDefaults:Wht,htmlLanguageService:Cke,handlebarLanguageService:bke,razorLanguageService:kke,registerHTMLLanguageService:XP};function Uht(){return Te(()=>import("./htmlMode-576cadc6.js"),[],import.meta.url)}function XP(u,e=YP,t=QP(u)){const n=new Vht(u,e,t);let i;const r=ZP.languages.onLanguage(u,async()=>{i=(await Uht()).setupMode(n)});return{defaults:n,dispose(){r.dispose(),i==null||i.dispose(),i=void 0}}}/*!----------------------------------------------------------------------------- + *-----------------------------------------------------------------------------*/var Rht=Object.defineProperty,Iht=Object.getOwnPropertyDescriptor,Oht=Object.getOwnPropertyNames,jht=Object.prototype.hasOwnProperty,lle=(u,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Oht(e))!jht.call(u,i)&&i!==t&&Rht(u,i,{get:()=>e[i],enumerable:!(n=Iht(e,i))||n.enumerable});return u},Hht=(u,e,t)=>(lle(u,e,"default"),t&&lle(t,e,"default")),ZP={};Hht(ZP,BA);var Vht=class{constructor(e,t,n){kn(this,"_onDidChange",new ZP.Emitter);kn(this,"_options");kn(this,"_modeConfiguration");kn(this,"_languageId");this._languageId=e,this.setOptions(t),this.setModeConfiguration(n)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get options(){return this._options}get modeConfiguration(){return this._modeConfiguration}setOptions(e){this._options=e||Object.create(null),this._onDidChange.fire(this)}setModeConfiguration(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(this)}},$ht={tabSize:4,insertSpaces:!1,wrapLineLength:120,unformatted:'default": "a, abbr, acronym, b, bdo, big, br, button, cite, code, dfn, em, i, img, input, kbd, label, map, object, q, samp, select, small, span, strong, sub, sup, textarea, tt, var',contentUnformatted:"pre",indentInnerHtml:!1,preserveNewLines:!0,maxPreserveNewLines:void 0,indentHandlebars:!1,endWithNewline:!1,extraLiners:"head, body, /html",wrapAttributes:"auto"},YP={format:$ht,suggest:{},data:{useDefaultDataProvider:!0}};function QP(u){return{completionItems:!0,hovers:!0,documentSymbols:!0,links:!0,documentHighlights:!0,rename:!0,colors:!0,foldingRanges:!0,selectionRanges:!0,diagnostics:u===g2,documentFormattingEdits:u===g2,documentRangeFormattingEdits:u===g2}}var g2="html",cle="handlebars",dle="razor",Cke=XP(g2,YP,QP(g2)),Kht=Cke.defaults,bke=XP(cle,YP,QP(cle)),Wht=bke.defaults,kke=XP(dle,YP,QP(dle)),Ght=kke.defaults;ZP.languages.html={htmlDefaults:Kht,razorDefaults:Ght,handlebarDefaults:Wht,htmlLanguageService:Cke,handlebarLanguageService:bke,razorLanguageService:kke,registerHTMLLanguageService:XP};function Uht(){return Te(()=>import("./htmlMode-dc530c57.js"),[],import.meta.url)}function XP(u,e=YP,t=QP(u)){const n=new Vht(u,e,t);let i;const r=ZP.languages.onLanguage(u,async()=>{i=(await Uht()).setupMode(n)});return{defaults:n,dispose(){r.dispose(),i==null||i.dispose(),i=void 0}}}/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt - *-----------------------------------------------------------------------------*/var qht=Object.defineProperty,Jht=Object.getOwnPropertyDescriptor,Zht=Object.getOwnPropertyNames,Yht=Object.prototype.hasOwnProperty,hle=(u,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Zht(e))!Yht.call(u,i)&&i!==t&&qht(u,i,{get:()=>e[i],enumerable:!(n=Jht(e,i))||n.enumerable});return u},Qht=(u,e,t)=>(hle(u,e,"default"),t&&hle(t,e,"default")),wA={};Qht(wA,BA);var Xht=class{constructor(e,t,n){kn(this,"_onDidChange",new wA.Emitter);kn(this,"_diagnosticsOptions");kn(this,"_modeConfiguration");kn(this,"_languageId");this._languageId=e,this.setDiagnosticsOptions(t),this.setModeConfiguration(n)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get modeConfiguration(){return this._modeConfiguration}get diagnosticsOptions(){return this._diagnosticsOptions}setDiagnosticsOptions(e){this._diagnosticsOptions=e||Object.create(null),this._onDidChange.fire(this)}setModeConfiguration(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(this)}},e4t={validate:!0,allowComments:!0,schemas:[],enableSchemaRequest:!1,schemaRequest:"warning",schemaValidation:"warning",comments:"error",trailingCommas:"error"},t4t={documentFormattingEdits:!0,documentRangeFormattingEdits:!0,completionItems:!0,hovers:!0,documentSymbols:!0,tokens:!0,colors:!0,foldingRanges:!0,diagnostics:!0,selectionRanges:!0},Fke=new Xht("json",e4t,t4t);wA.languages.json={jsonDefaults:Fke};function u4t(){return Te(()=>import("./jsonMode-8d6aeb1f.js"),[],import.meta.url)}wA.languages.register({id:"json",extensions:[".json",".bowerrc",".jshintrc",".jscsrc",".eslintrc",".babelrc",".har"],aliases:["JSON","json"],mimetypes:["application/json"]});wA.languages.onLanguage("json",()=>{u4t().then(u=>u.setupMode(Fke))});/*!----------------------------------------------------------------------------- + *-----------------------------------------------------------------------------*/var qht=Object.defineProperty,Jht=Object.getOwnPropertyDescriptor,Zht=Object.getOwnPropertyNames,Yht=Object.prototype.hasOwnProperty,hle=(u,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Zht(e))!Yht.call(u,i)&&i!==t&&qht(u,i,{get:()=>e[i],enumerable:!(n=Jht(e,i))||n.enumerable});return u},Qht=(u,e,t)=>(hle(u,e,"default"),t&&hle(t,e,"default")),wA={};Qht(wA,BA);var Xht=class{constructor(e,t,n){kn(this,"_onDidChange",new wA.Emitter);kn(this,"_diagnosticsOptions");kn(this,"_modeConfiguration");kn(this,"_languageId");this._languageId=e,this.setDiagnosticsOptions(t),this.setModeConfiguration(n)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get modeConfiguration(){return this._modeConfiguration}get diagnosticsOptions(){return this._diagnosticsOptions}setDiagnosticsOptions(e){this._diagnosticsOptions=e||Object.create(null),this._onDidChange.fire(this)}setModeConfiguration(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(this)}},e4t={validate:!0,allowComments:!0,schemas:[],enableSchemaRequest:!1,schemaRequest:"warning",schemaValidation:"warning",comments:"error",trailingCommas:"error"},t4t={documentFormattingEdits:!0,documentRangeFormattingEdits:!0,completionItems:!0,hovers:!0,documentSymbols:!0,tokens:!0,colors:!0,foldingRanges:!0,diagnostics:!0,selectionRanges:!0},Fke=new Xht("json",e4t,t4t);wA.languages.json={jsonDefaults:Fke};function u4t(){return Te(()=>import("./jsonMode-deeab77f.js"),[],import.meta.url)}wA.languages.register({id:"json",extensions:[".json",".bowerrc",".jshintrc",".jscsrc",".eslintrc",".babelrc",".har"],aliases:["JSON","json"],mimetypes:["application/json"]});wA.languages.onLanguage("json",()=>{u4t().then(u=>u.setupMode(Fke))});/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt - *-----------------------------------------------------------------------------*/var n4t=Object.defineProperty,i4t=Object.getOwnPropertyDescriptor,r4t=Object.getOwnPropertyNames,a4t=Object.prototype.hasOwnProperty,Ele=(u,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of r4t(e))!a4t.call(u,i)&&i!==t&&n4t(u,i,{get:()=>e[i],enumerable:!(n=i4t(e,i))||n.enumerable});return u},o4t=(u,e,t)=>(Ele(u,e,"default"),t&&Ele(t,e,"default")),s4t="5.0.2",xv={};o4t(xv,BA);var yke=(u=>(u[u.None=0]="None",u[u.CommonJS=1]="CommonJS",u[u.AMD=2]="AMD",u[u.UMD=3]="UMD",u[u.System=4]="System",u[u.ES2015=5]="ES2015",u[u.ESNext=99]="ESNext",u))(yke||{}),Ake=(u=>(u[u.None=0]="None",u[u.Preserve=1]="Preserve",u[u.React=2]="React",u[u.ReactNative=3]="ReactNative",u[u.ReactJSX=4]="ReactJSX",u[u.ReactJSXDev=5]="ReactJSXDev",u))(Ake||{}),_ke=(u=>(u[u.CarriageReturnLineFeed=0]="CarriageReturnLineFeed",u[u.LineFeed=1]="LineFeed",u))(_ke||{}),Ske=(u=>(u[u.ES3=0]="ES3",u[u.ES5=1]="ES5",u[u.ES2015=2]="ES2015",u[u.ES2016=3]="ES2016",u[u.ES2017=4]="ES2017",u[u.ES2018=5]="ES2018",u[u.ES2019=6]="ES2019",u[u.ES2020=7]="ES2020",u[u.ESNext=99]="ESNext",u[u.JSON=100]="JSON",u[u.Latest=99]="Latest",u))(Ske||{}),Bke=(u=>(u[u.Classic=1]="Classic",u[u.NodeJs=2]="NodeJs",u))(Bke||{}),wke=class{constructor(u,e,t,n,i){kn(this,"_onDidChange",new xv.Emitter);kn(this,"_onDidExtraLibsChange",new xv.Emitter);kn(this,"_extraLibs");kn(this,"_removedExtraLibs");kn(this,"_eagerModelSync");kn(this,"_compilerOptions");kn(this,"_diagnosticsOptions");kn(this,"_workerOptions");kn(this,"_onDidExtraLibsChangeTimeout");kn(this,"_inlayHintsOptions");kn(this,"_modeConfiguration");this._extraLibs=Object.create(null),this._removedExtraLibs=Object.create(null),this._eagerModelSync=!1,this.setCompilerOptions(u),this.setDiagnosticsOptions(e),this.setWorkerOptions(t),this.setInlayHintsOptions(n),this.setModeConfiguration(i),this._onDidExtraLibsChangeTimeout=-1}get onDidChange(){return this._onDidChange.event}get onDidExtraLibsChange(){return this._onDidExtraLibsChange.event}get modeConfiguration(){return this._modeConfiguration}get workerOptions(){return this._workerOptions}get inlayHintsOptions(){return this._inlayHintsOptions}getExtraLibs(){return this._extraLibs}addExtraLib(u,e){let t;if(typeof e>"u"?t=`ts:extralib-${Math.random().toString(36).substring(2,15)}`:t=e,this._extraLibs[t]&&this._extraLibs[t].content===u)return{dispose:()=>{}};let n=1;return this._removedExtraLibs[t]&&(n=this._removedExtraLibs[t]+1),this._extraLibs[t]&&(n=this._extraLibs[t].version+1),this._extraLibs[t]={content:u,version:n},this._fireOnDidExtraLibsChangeSoon(),{dispose:()=>{let i=this._extraLibs[t];i&&i.version===n&&(delete this._extraLibs[t],this._removedExtraLibs[t]=n,this._fireOnDidExtraLibsChangeSoon())}}}setExtraLibs(u){for(const e in this._extraLibs)this._removedExtraLibs[e]=this._extraLibs[e].version;if(this._extraLibs=Object.create(null),u&&u.length>0)for(const e of u){const t=e.filePath||`ts:extralib-${Math.random().toString(36).substring(2,15)}`,n=e.content;let i=1;this._removedExtraLibs[t]&&(i=this._removedExtraLibs[t]+1),this._extraLibs[t]={content:n,version:i}}this._fireOnDidExtraLibsChangeSoon()}_fireOnDidExtraLibsChangeSoon(){this._onDidExtraLibsChangeTimeout===-1&&(this._onDidExtraLibsChangeTimeout=window.setTimeout(()=>{this._onDidExtraLibsChangeTimeout=-1,this._onDidExtraLibsChange.fire(void 0)},0))}getCompilerOptions(){return this._compilerOptions}setCompilerOptions(u){this._compilerOptions=u||Object.create(null),this._onDidChange.fire(void 0)}getDiagnosticsOptions(){return this._diagnosticsOptions}setDiagnosticsOptions(u){this._diagnosticsOptions=u||Object.create(null),this._onDidChange.fire(void 0)}setWorkerOptions(u){this._workerOptions=u||Object.create(null),this._onDidChange.fire(void 0)}setInlayHintsOptions(u){this._inlayHintsOptions=u||Object.create(null),this._onDidChange.fire(void 0)}setMaximumWorkerIdleTime(u){}setEagerModelSync(u){this._eagerModelSync=u}getEagerModelSync(){return this._eagerModelSync}setModeConfiguration(u){this._modeConfiguration=u||Object.create(null),this._onDidChange.fire(void 0)}},l4t=s4t,Lke={completionItems:!0,hovers:!0,documentSymbols:!0,definitions:!0,references:!0,documentHighlights:!0,rename:!0,diagnostics:!0,documentRangeFormattingEdits:!0,signatureHelp:!0,onTypeFormattingEdits:!0,codeActions:!0,inlayHints:!0},zke=new wke({allowNonTsExtensions:!0,target:99},{noSemanticValidation:!1,noSyntaxValidation:!1,onlyVisible:!1},{},{},Lke),Mke=new wke({allowNonTsExtensions:!0,allowJs:!0,target:99},{noSemanticValidation:!0,noSyntaxValidation:!1,onlyVisible:!1},{},{},Lke),c4t=()=>eR().then(u=>u.getTypeScriptWorker()),d4t=()=>eR().then(u=>u.getJavaScriptWorker());xv.languages.typescript={ModuleKind:yke,JsxEmit:Ake,NewLineKind:_ke,ScriptTarget:Ske,ModuleResolutionKind:Bke,typescriptVersion:l4t,typescriptDefaults:zke,javascriptDefaults:Mke,getTypeScriptWorker:c4t,getJavaScriptWorker:d4t};function eR(){return Te(()=>import("./tsMode-a6256fd0.js"),[],import.meta.url)}xv.languages.onLanguage("typescript",()=>eR().then(u=>u.setupTypeScript(zke)));xv.languages.onLanguage("javascript",()=>eR().then(u=>u.setupJavaScript(Mke)));class h4t extends n0{constructor(){super({id:"diffEditor.toggleCollapseUnchangedRegions",title:{value:v("toggleCollapseUnchangedRegions","Toggle Collapse Unchanged Regions"),original:"Toggle Collapse Unchanged Regions"},icon:we.map,toggled:Ee.has("config.diffEditor.hideUnchangedRegions.enabled"),precondition:Ee.has("isInDiffEditor"),menu:{when:Ee.has("isInDiffEditor"),id:K.EditorTitle,order:22,group:"navigation"}})}run(e,...t){const n=e.get(tu),i=!n.getValue("diffEditor.hideUnchangedRegions.enabled");n.updateValue("diffEditor.hideUnchangedRegions.enabled",i)}}gn(h4t);class Tke extends n0{constructor(){super({id:"diffEditor.toggleShowMovedCodeBlocks",title:{value:v("toggleShowMovedCodeBlocks","Toggle Show Moved Code Blocks"),original:"Toggle Show Moved Code Blocks"},precondition:Ee.has("isInDiffEditor")})}run(e,...t){const n=e.get(tu),i=!n.getValue("diffEditor.experimental.showMoves");n.updateValue("diffEditor.experimental.showMoves",i)}}gn(Tke);class Nke extends n0{constructor(){super({id:"diffEditor.toggleUseInlineViewWhenSpaceIsLimited",title:{value:v("toggleUseInlineViewWhenSpaceIsLimited","Toggle Use Inline View When Space Is Limited"),original:"Toggle Use Inline View When Space Is Limited"},precondition:Ee.has("isInDiffEditor")})}run(e,...t){const n=e.get(tu),i=!n.getValue("diffEditor.useInlineViewWhenSpaceIsLimited");n.updateValue("diffEditor.useInlineViewWhenSpaceIsLimited",i)}}gn(Nke);Lr.appendMenuItem(K.EditorTitle,{command:{id:new Nke().desc.id,title:v("useInlineViewWhenSpaceIsLimited","Use Inline View When Space Is Limited"),toggled:Ee.has("config.diffEditor.useInlineViewWhenSpaceIsLimited"),precondition:Ee.has("isInDiffEditor")},order:11,group:"1_diff",when:Ee.and(W.diffEditorRenderSideBySideInlineBreakpointReached,Ee.has("isInDiffEditor"))});Lr.appendMenuItem(K.EditorTitle,{command:{id:new Tke().desc.id,title:v("showMoves","Show Moved Code Blocks"),icon:we.move,toggled:l6.create("config.diffEditor.experimental.showMoves",!0),precondition:Ee.has("isInDiffEditor")},order:10,group:"1_diff",when:Ee.has("isInDiffEditor")});const tR={value:v("diffEditor","Diff Editor"),original:"Diff Editor"};class E4t extends hd{constructor(){super({id:"diffEditor.switchSide",title:{value:v("switchSide","Switch Side"),original:"Switch Side"},icon:we.arrowSwap,precondition:Ee.has("isInDiffEditor"),f1:!0,category:tR})}runEditorCommand(e,t,n){const i=b6(e);if(i instanceof O3){if(n&&n.dryRun)return{destinationSelection:i.mapToOtherSide().destinationSelection};i.switchSide()}}}gn(E4t);class m4t extends hd{constructor(){super({id:"diffEditor.exitCompareMove",title:{value:v("exitCompareMove","Exit Compare Move"),original:"Exit Compare Move"},icon:we.close,precondition:W.comparingMovedCode,f1:!1,category:tR,keybinding:{weight:1e4,primary:9}})}runEditorCommand(e,t,...n){const i=b6(e);i instanceof O3&&i.exitCompareMove()}}gn(m4t);class g4t extends hd{constructor(){super({id:"diffEditor.collapseAllUnchangedRegions",title:{value:v("collapseAllUnchangedRegions","Collapse All Unchanged Regions"),original:"Collapse All Unchanged Regions"},icon:we.fold,precondition:Ee.has("isInDiffEditor"),f1:!0,category:tR})}runEditorCommand(e,t,...n){const i=b6(e);i instanceof O3&&i.collapseAllUnchangedRegions()}}gn(g4t);class f4t extends hd{constructor(){super({id:"diffEditor.showAllUnchangedRegions",title:{value:v("showAllUnchangedRegions","Show All Unchanged Regions"),original:"Show All Unchanged Regions"},icon:we.unfold,precondition:Ee.has("isInDiffEditor"),f1:!0,category:tR})}runEditorCommand(e,t,...n){const i=b6(e);i instanceof O3&&i.showAllUnchangedRegions()}}gn(f4t);const Pke={value:v("accessibleDiffViewer","Accessible Diff Viewer"),original:"Accessible Diff Viewer"};class C6 extends n0{constructor(){super({id:C6.id,title:{value:v("editor.action.accessibleDiffViewer.next","Go to Next Difference"),original:"Go to Next Difference"},category:Pke,precondition:Ee.has("isInDiffEditor"),keybinding:{primary:65,weight:100},f1:!0})}run(e){const t=b6(e);t==null||t.accessibleDiffViewerNext()}}C6.id="editor.action.accessibleDiffViewer.next";Lr.appendMenuItem(K.EditorTitle,{command:{id:C6.id,title:v("Open Accessible Diff Viewer","Open Accessible Diff Viewer"),precondition:Ee.has("isInDiffEditor")},order:10,group:"2_diff",when:Ee.and(W.accessibleDiffViewerVisible.negate(),Ee.has("isInDiffEditor"))});class LA extends n0{constructor(){super({id:LA.id,title:{value:v("editor.action.accessibleDiffViewer.prev","Go to Previous Difference"),original:"Go to Previous Difference"},category:Pke,precondition:Ee.has("isInDiffEditor"),keybinding:{primary:1089,weight:100},f1:!0})}run(e){const t=b6(e);t==null||t.accessibleDiffViewerPrev()}}LA.id="editor.action.accessibleDiffViewer.prev";function b6(u){var e;const t=u.get(Cu),n=t.listDiffEditors(),i=(e=t.getFocusedCodeEditor())!==null&&e!==void 0?e:t.getActiveCodeEditor();if(!i)return null;for(let a=0,o=n.length;a=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},x4t=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},uR=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})},LU;const nR=new Pe("selectionAnchorSet",!1);let d4=LU=class{static get(e){return e.getContribution(LU.ID)}constructor(e,t){this.editor=e,this.selectionAnchorSetContextKey=nR.bindTo(t),this.modelChangeListener=e.onDidChangeModel(()=>this.selectionAnchorSetContextKey.reset())}setSelectionAnchor(){if(this.editor.hasModel()){const e=this.editor.getPosition();this.editor.changeDecorations(t=>{this.decorationId&&t.removeDecoration(this.decorationId),this.decorationId=t.addDecoration(Ye.fromPositions(e,e),{description:"selection-anchor",stickiness:1,hoverMessage:new Zr().appendText(v("selectionAnchor","Selection Anchor")),className:"selection-anchor"})}),this.selectionAnchorSetContextKey.set(!!this.decorationId),ga(v("anchorSet","Anchor set at {0}:{1}",e.lineNumber,e.column))}}goToSelectionAnchor(){if(this.editor.hasModel()&&this.decorationId){const e=this.editor.getModel().getDecorationRange(this.decorationId);e&&this.editor.setPosition(e.getStartPosition())}}selectFromAnchorToCursor(){if(this.editor.hasModel()&&this.decorationId){const e=this.editor.getModel().getDecorationRange(this.decorationId);if(e){const t=this.editor.getPosition();this.editor.setSelection(Ye.fromPositions(e.getStartPosition(),t)),this.cancelSelectionAnchor()}}}cancelSelectionAnchor(){if(this.decorationId){const e=this.decorationId;this.editor.changeDecorations(t=>{t.removeDecoration(e),this.decorationId=void 0}),this.selectionAnchorSetContextKey.set(!1)}}dispose(){this.cancelSelectionAnchor(),this.modelChangeListener.dispose()}};d4.ID="editor.contrib.selectionAnchorController";d4=LU=D4t([x4t(1,pt)],d4);class v4t extends $e{constructor(){super({id:"editor.action.setSelectionAnchor",label:v("setSelectionAnchor","Set Selection Anchor"),alias:"Set Selection Anchor",precondition:void 0,kbOpts:{kbExpr:W.editorTextFocus,primary:Vi(2089,2080),weight:100}})}run(e,t){var n;return uR(this,void 0,void 0,function*(){(n=d4.get(t))===null||n===void 0||n.setSelectionAnchor()})}}class C4t extends $e{constructor(){super({id:"editor.action.goToSelectionAnchor",label:v("goToSelectionAnchor","Go to Selection Anchor"),alias:"Go to Selection Anchor",precondition:nR})}run(e,t){var n;return uR(this,void 0,void 0,function*(){(n=d4.get(t))===null||n===void 0||n.goToSelectionAnchor()})}}class b4t extends $e{constructor(){super({id:"editor.action.selectFromAnchorToCursor",label:v("selectFromAnchorToCursor","Select from Anchor to Cursor"),alias:"Select from Anchor to Cursor",precondition:nR,kbOpts:{kbExpr:W.editorTextFocus,primary:Vi(2089,2089),weight:100}})}run(e,t){var n;return uR(this,void 0,void 0,function*(){(n=d4.get(t))===null||n===void 0||n.selectFromAnchorToCursor()})}}class k4t extends $e{constructor(){super({id:"editor.action.cancelSelectionAnchor",label:v("cancelSelectionAnchor","Cancel Selection Anchor"),alias:"Cancel Selection Anchor",precondition:nR,kbOpts:{kbExpr:W.editorTextFocus,primary:9,weight:100}})}run(e,t){var n;return uR(this,void 0,void 0,function*(){(n=d4.get(t))===null||n===void 0||n.cancelSelectionAnchor()})}}fu(d4.ID,d4,4);be(v4t);be(C4t);be(b4t);be(k4t);const F4t=q("editorOverviewRuler.bracketMatchForeground",{dark:"#A0A0A0",light:"#A0A0A0",hcDark:"#A0A0A0",hcLight:"#A0A0A0"},v("overviewRulerBracketMatchForeground","Overview ruler marker color for matching brackets."));class y4t extends $e{constructor(){super({id:"editor.action.jumpToBracket",label:v("smartSelect.jumpBracket","Go to Bracket"),alias:"Go to Bracket",precondition:void 0,kbOpts:{kbExpr:W.editorTextFocus,primary:3165,weight:100}})}run(e,t){var n;(n=Al.get(t))===null||n===void 0||n.jumpToBracket()}}class A4t extends $e{constructor(){super({id:"editor.action.selectToBracket",label:v("smartSelect.selectToBracket","Select to Bracket"),alias:"Select to Bracket",precondition:void 0,description:{description:"Select to Bracket",args:[{name:"args",schema:{type:"object",properties:{selectBrackets:{type:"boolean",default:!0}}}}]}})}run(e,t,n){var i;let r=!0;n&&n.selectBrackets===!1&&(r=!1),(i=Al.get(t))===null||i===void 0||i.selectToBracket(r)}}class _4t extends $e{constructor(){super({id:"editor.action.removeBrackets",label:v("smartSelect.removeBrackets","Remove Brackets"),alias:"Remove Brackets",precondition:void 0,kbOpts:{kbExpr:W.editorTextFocus,primary:2561,weight:100}})}run(e,t){var n;(n=Al.get(t))===null||n===void 0||n.removeBrackets(this.id)}}class S4t{constructor(e,t,n){this.position=e,this.brackets=t,this.options=n}}class Al extends ne{static get(e){return e.getContribution(Al.ID)}constructor(e){super(),this._editor=e,this._lastBracketsData=[],this._lastVersionId=0,this._decorations=this._editor.createDecorationsCollection(),this._updateBracketsSoon=this._register(new Hu(()=>this._updateBrackets(),50)),this._matchBrackets=this._editor.getOption(71),this._updateBracketsSoon.schedule(),this._register(e.onDidChangeCursorPosition(t=>{this._matchBrackets!=="never"&&this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeModelContent(t=>{this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeModel(t=>{this._lastBracketsData=[],this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeModelLanguageConfiguration(t=>{this._lastBracketsData=[],this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeConfiguration(t=>{t.hasChanged(71)&&(this._matchBrackets=this._editor.getOption(71),this._decorations.clear(),this._lastBracketsData=[],this._lastVersionId=0,this._updateBracketsSoon.schedule())})),this._register(e.onDidBlurEditorWidget(()=>{this._updateBracketsSoon.schedule()})),this._register(e.onDidFocusEditorWidget(()=>{this._updateBracketsSoon.schedule()}))}jumpToBracket(){if(!this._editor.hasModel())return;const e=this._editor.getModel(),t=this._editor.getSelections().map(n=>{const i=n.getStartPosition(),r=e.bracketPairs.matchBracket(i);let a=null;if(r)r[0].containsPosition(i)&&!r[1].containsPosition(i)?a=r[1].getStartPosition():r[1].containsPosition(i)&&(a=r[0].getStartPosition());else{const o=e.bracketPairs.findEnclosingBrackets(i);if(o)a=o[1].getStartPosition();else{const s=e.bracketPairs.findNextBracket(i);s&&s.range&&(a=s.range.getStartPosition())}}return a?new Ye(a.lineNumber,a.column,a.lineNumber,a.column):new Ye(i.lineNumber,i.column,i.lineNumber,i.column)});this._editor.setSelections(t),this._editor.revealRange(t[0])}selectToBracket(e){if(!this._editor.hasModel())return;const t=this._editor.getModel(),n=[];this._editor.getSelections().forEach(i=>{const r=i.getStartPosition();let a=t.bracketPairs.matchBracket(r);if(!a&&(a=t.bracketPairs.findEnclosingBrackets(r),!a)){const l=t.bracketPairs.findNextBracket(r);l&&l.range&&(a=t.bracketPairs.matchBracket(l.range.getStartPosition()))}let o=null,s=null;if(a){a.sort(j.compareRangesUsingStarts);const[l,c]=a;if(o=e?l.getStartPosition():l.getEndPosition(),s=e?c.getEndPosition():c.getStartPosition(),c.containsPosition(r)){const d=o;o=s,s=d}}o&&s&&n.push(new Ye(o.lineNumber,o.column,s.lineNumber,s.column))}),n.length>0&&(this._editor.setSelections(n),this._editor.revealRange(n[0]))}removeBrackets(e){if(!this._editor.hasModel())return;const t=this._editor.getModel();this._editor.getSelections().forEach(n=>{const i=n.getPosition();let r=t.bracketPairs.matchBracket(i);r||(r=t.bracketPairs.findEnclosingBrackets(i)),r&&(this._editor.pushUndoStop(),this._editor.executeEdits(e,[{range:r[0],text:""},{range:r[1],text:""}]),this._editor.pushUndoStop())})}_updateBrackets(){if(this._matchBrackets==="never")return;this._recomputeBrackets();const e=[];let t=0;for(const n of this._lastBracketsData){const i=n.brackets;i&&(e[t++]={range:i[0],options:n.options},e[t++]={range:i[1],options:n.options})}this._decorations.set(e)}_recomputeBrackets(){if(!this._editor.hasModel()||!this._editor.hasWidgetFocus()){this._lastBracketsData=[],this._lastVersionId=0;return}const e=this._editor.getSelections();if(e.length>100){this._lastBracketsData=[],this._lastVersionId=0;return}const t=this._editor.getModel(),n=t.getVersionId();let i=[];this._lastVersionId===n&&(i=this._lastBracketsData);const r=[];let a=0;for(let d=0,h=e.length;d1&&r.sort(ee.compare);const o=[];let s=0,l=0;const c=i.length;for(let d=0,h=r.length;d0&&(t.pushUndoStop(),t.executeCommands(this.id,i),t.pushUndoStop())}}be(z4t);var M4t=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};const H3="9_cutcopypaste",T4t=Oc||document.queryCommandSupported("cut"),Ike=Oc||document.queryCommandSupported("copy"),N4t=typeof navigator.clipboard>"u"||T0?document.queryCommandSupported("paste"):!0;function Yee(u){return u.register(),u}const P4t=T4t?Yee(new d6({id:"editor.action.clipboardCutAction",precondition:void 0,kbOpts:Oc?{primary:2102,win:{primary:2102,secondary:[1044]},weight:100}:void 0,menuOpts:[{menuId:K.MenubarEditMenu,group:"2_ccp",title:v({key:"miCut",comment:["&& denotes a mnemonic"]},"Cu&&t"),order:1},{menuId:K.EditorContext,group:H3,title:v("actions.clipboard.cutLabel","Cut"),when:W.writable,order:1},{menuId:K.CommandPalette,group:"",title:v("actions.clipboard.cutLabel","Cut"),order:1},{menuId:K.SimpleEditorContext,group:H3,title:v("actions.clipboard.cutLabel","Cut"),when:W.writable,order:1}]})):void 0,R4t=Ike?Yee(new d6({id:"editor.action.clipboardCopyAction",precondition:void 0,kbOpts:Oc?{primary:2081,win:{primary:2081,secondary:[2067]},weight:100}:void 0,menuOpts:[{menuId:K.MenubarEditMenu,group:"2_ccp",title:v({key:"miCopy",comment:["&& denotes a mnemonic"]},"&&Copy"),order:2},{menuId:K.EditorContext,group:H3,title:v("actions.clipboard.copyLabel","Copy"),order:2},{menuId:K.CommandPalette,group:"",title:v("actions.clipboard.copyLabel","Copy"),order:1},{menuId:K.SimpleEditorContext,group:H3,title:v("actions.clipboard.copyLabel","Copy"),order:2}]})):void 0;Lr.appendMenuItem(K.MenubarEditMenu,{submenu:K.MenubarCopy,title:{value:v("copy as","Copy As"),original:"Copy As"},group:"2_ccp",order:3});Lr.appendMenuItem(K.EditorContext,{submenu:K.EditorContextCopy,title:{value:v("copy as","Copy As"),original:"Copy As"},group:H3,order:3});Lr.appendMenuItem(K.EditorContext,{submenu:K.EditorContextShare,title:{value:v("share","Share"),original:"Share"},group:"11_share",order:-1,when:Ee.and(Ee.notEquals("resourceScheme","output"),W.editorTextFocus)});Lr.appendMenuItem(K.EditorTitleContext,{submenu:K.EditorTitleContextShare,title:{value:v("share","Share"),original:"Share"},group:"11_share",order:-1});Lr.appendMenuItem(K.ExplorerContext,{submenu:K.ExplorerContextShare,title:{value:v("share","Share"),original:"Share"},group:"11_share",order:-1});const CH=N4t?Yee(new d6({id:"editor.action.clipboardPasteAction",precondition:void 0,kbOpts:Oc?{primary:2100,win:{primary:2100,secondary:[1043]},linux:{primary:2100,secondary:[1043]},weight:100}:void 0,menuOpts:[{menuId:K.MenubarEditMenu,group:"2_ccp",title:v({key:"miPaste",comment:["&& denotes a mnemonic"]},"&&Paste"),order:4},{menuId:K.EditorContext,group:H3,title:v("actions.clipboard.pasteLabel","Paste"),when:W.writable,order:4},{menuId:K.CommandPalette,group:"",title:v("actions.clipboard.pasteLabel","Paste"),order:1},{menuId:K.SimpleEditorContext,group:H3,title:v("actions.clipboard.pasteLabel","Paste"),when:W.writable,order:4}]})):void 0;class I4t extends $e{constructor(){super({id:"editor.action.clipboardCopyWithSyntaxHighlightingAction",label:v("actions.clipboard.copyWithSyntaxHighlightingLabel","Copy With Syntax Highlighting"),alias:"Copy With Syntax Highlighting",precondition:void 0,kbOpts:{kbExpr:W.textInputFocus,primary:0,weight:100}})}run(e,t){!t.hasModel()||!t.getOption(37)&&t.getSelection().isEmpty()||(PW.forceCopyWithSyntaxHighlighting=!0,t.focus(),t.getContainerDomNode().ownerDocument.execCommand("copy"),PW.forceCopyWithSyntaxHighlighting=!1)}}function Oke(u,e){u&&(u.addImplementation(1e4,"code-editor",(t,n)=>{const i=t.get(Cu).getFocusedCodeEditor();if(i&&i.hasTextFocus()){const r=i.getOption(37),a=i.getSelection();return a&&a.isEmpty()&&!r||i.getContainerDomNode().ownerDocument.execCommand(e),!0}return!1}),u.addImplementation(0,"generic-dom",(t,n)=>(JN().execCommand(e),!0)))}Oke(P4t,"cut");Oke(R4t,"copy");CH&&(CH.addImplementation(1e4,"code-editor",(u,e)=>{const t=u.get(Cu),n=u.get(_4),i=t.getFocusedCodeEditor();return i&&i.hasTextFocus()?!i.getContainerDomNode().ownerDocument.execCommand("paste")&&dg?(()=>M4t(void 0,void 0,void 0,function*(){const a=yield n.readText();if(a!==""){const o=Sk.INSTANCE.get(a);let s=!1,l=null,c=null;o&&(s=i.getOption(37)&&!!o.isFromEmptySelection,l=typeof o.multicursorText<"u"?o.multicursorText:null,c=o.mode),i.trigger("keyboard","paste",{text:a,pasteOnNewLine:s,multicursorText:l,mode:c})}}))():!0:!1}),CH.addImplementation(0,"generic-dom",(u,e)=>(JN().execCommand("paste"),!0)));Ike&&be(I4t);var O4t=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};let gt=class c8{constructor(e){this.value=e}equals(e){return this.value===e.value}contains(e){return this.equals(e)||this.value===""||e.value.startsWith(this.value+c8.sep)}intersects(e){return this.contains(e)||e.contains(this)}append(e){return new c8(this.value+c8.sep+e)}};gt.sep=".";gt.None=new gt("@@none@@");gt.Empty=new gt("");gt.QuickFix=new gt("quickfix");gt.Refactor=new gt("refactor");gt.RefactorExtract=gt.Refactor.append("extract");gt.RefactorInline=gt.Refactor.append("inline");gt.RefactorMove=gt.Refactor.append("move");gt.RefactorRewrite=gt.Refactor.append("rewrite");gt.Notebook=new gt("notebook");gt.Source=new gt("source");gt.SourceOrganizeImports=gt.Source.append("organizeImports");gt.SourceFixAll=gt.Source.append("fixAll");gt.SurroundWith=gt.Refactor.append("surround");var fs;(function(u){u.Refactor="refactor",u.RefactorPreview="refactor preview",u.Lightbulb="lightbulb",u.Default="other (default)",u.SourceAction="source action",u.QuickFix="quick fix action",u.FixAll="fix all",u.OrganizeImports="organize imports",u.AutoFix="auto fix",u.QuickFixHover="quick fix hover window",u.OnSave="save participants",u.ProblemsView="problems view"})(fs||(fs={}));function j4t(u,e){return!(u.include&&!u.include.intersects(e)||u.excludes&&u.excludes.some(t=>jke(e,t,u.include))||!u.includeSourceActions&>.Source.contains(e))}function H4t(u,e){const t=e.kind?new gt(e.kind):void 0;return!(u.include&&(!t||!u.include.contains(t))||u.excludes&&t&&u.excludes.some(n=>jke(t,n,u.include))||!u.includeSourceActions&&t&>.Source.contains(t)||u.onlyIncludePreferredActions&&!e.isPreferred)}function jke(u,e,t){return!(!e.contains(u)||t&&e.contains(t))}class Zd{static fromUser(e,t){return!e||typeof e!="object"?new Zd(t.kind,t.apply,!1):new Zd(Zd.getKindFromUser(e,t.kind),Zd.getApplyFromUser(e,t.apply),Zd.getPreferredUser(e))}static getApplyFromUser(e,t){switch(typeof e.apply=="string"?e.apply.toLowerCase():""){case"first":return"first";case"never":return"never";case"ifsingle":return"ifSingle";default:return t}}static getKindFromUser(e,t){return typeof e.kind=="string"?new gt(e.kind):t}static getPreferredUser(e){return typeof e.preferred=="boolean"?e.preferred:!1}constructor(e,t,n){this.kind=e,this.apply=t,this.preferred=n}}class V4t{constructor(e,t,n){this.action=e,this.provider=t,this.highlightRange=n}resolve(e){var t;return O4t(this,void 0,void 0,function*(){if(!((t=this.provider)===null||t===void 0)&&t.resolveCodeAction&&!this.action.edit){let n;try{n=yield this.provider.resolveCodeAction(this.action,e)}catch(i){Mi(i)}n&&(this.action.edit=n.edit)}return this})}}var Nw=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};const Hke="editor.action.codeAction",Qee="editor.action.quickFix",Vke="editor.action.autoFix",$ke="editor.action.refactor",Kke="editor.action.sourceAction",Xee="editor.action.organizeImports",ete="editor.action.fixAll";class f2 extends ne{static codeActionsPreferredComparator(e,t){return e.isPreferred&&!t.isPreferred?-1:!e.isPreferred&&t.isPreferred?1:0}static codeActionsComparator({action:e},{action:t}){return pa(e.diagnostics)?pa(t.diagnostics)?f2.codeActionsPreferredComparator(e,t):-1:pa(t.diagnostics)?1:f2.codeActionsPreferredComparator(e,t)}constructor(e,t,n){super(),this.documentation=t,this._register(n),this.allActions=[...e].sort(f2.codeActionsComparator),this.validActions=this.allActions.filter(({action:i})=>!i.disabled)}get hasAutoFix(){return this.validActions.some(({action:e})=>!!e.kind&>.QuickFix.contains(new gt(e.kind))&&!!e.isPreferred)}}const mle={actions:[],documentation:void 0};function p2(u,e,t,n,i,r){var a;return Nw(this,void 0,void 0,function*(){const o=n.filter||{},s=Object.assign(Object.assign({},o),{excludes:[...o.excludes||[],gt.Notebook]}),l={only:(a=o.include)===null||a===void 0?void 0:a.value,trigger:n.type},c=new Wee(e,r),d=n.type===2,h=$4t(u,e,d?s:o),E=new pe,m=h.map(f=>Nw(this,void 0,void 0,function*(){try{i.report(f);const p=yield f.provideCodeActions(e,t,l,c.token);if(p&&E.add(p),c.token.isCancellationRequested)return mle;const D=((p==null?void 0:p.actions)||[]).filter(b=>b&&H4t(o,b)),x=W4t(f,D,o.include);return{actions:D.map(b=>new V4t(b,f)),documentation:x}}catch(p){if(dd(p))throw p;return Mi(p),mle}})),g=u.onDidChange(()=>{const f=u.all(e);di(f,h)||c.cancel()});try{const f=yield Promise.all(m),p=f.map(x=>x.actions).flat(),D=[...b1(f.map(x=>x.documentation)),...K4t(u,e,n,p)];return new f2(p,D,E)}finally{g.dispose(),c.dispose()}})}function $4t(u,e,t){return u.all(e).filter(n=>n.providedCodeActionKinds?n.providedCodeActionKinds.some(i=>j4t(t,new gt(i))):!0)}function*K4t(u,e,t,n){var i,r,a;if(e&&n.length)for(const o of u.all(e))o._getAdditionalMenuItems&&(yield*(i=o._getAdditionalMenuItems)===null||i===void 0?void 0:i.call(o,{trigger:t.type,only:(a=(r=t.filter)===null||r===void 0?void 0:r.include)===null||a===void 0?void 0:a.value},n.map(s=>s.action)))}function W4t(u,e,t){if(!u.documentation)return;const n=u.documentation.map(i=>({kind:new gt(i.kind),command:i.command}));if(t){let i;for(const r of n)r.kind.contains(t)&&(i?i.kind.contains(r.kind)&&(i=r):i=r);if(i)return i==null?void 0:i.command}for(const i of e)if(i.kind){for(const r of n)if(r.kind.contains(new gt(i.kind)))return r.command}}var Pw;(function(u){u.OnSave="onSave",u.FromProblemsView="fromProblemsView",u.FromCodeActions="fromCodeActions"})(Pw||(Pw={}));function G4t(u,e,t,n,i=Kt.None){var r;return Nw(this,void 0,void 0,function*(){const a=u.get(xA),o=u.get(ni),s=u.get(i0),l=u.get(bi);if(s.publicLog2("codeAction.applyCodeAction",{codeActionTitle:e.action.title,codeActionKind:e.action.kind,codeActionIsPreferred:!!e.action.isPreferred,reason:t}),yield e.resolve(i),!i.isCancellationRequested&&!(!((r=e.action.edit)===null||r===void 0)&&r.edits.length&&!(yield a.apply(e.action.edit,{editor:n==null?void 0:n.editor,label:e.action.title,quotableLabel:e.action.title,code:"undoredo.codeAction",respectAutoSaveConfig:t!==Pw.OnSave,showPreview:n==null?void 0:n.preview})).isApplied)&&e.action.command)try{yield o.executeCommand(e.action.command.id,...e.action.command.arguments||[])}catch(c){const d=U4t(c);l.error(typeof d=="string"?d:v("applyCodeActionFailed","An unknown error occurred while applying the code action"))}})}function U4t(u){return typeof u=="string"?u:u instanceof Error&&typeof u.message=="string"?u.message:void 0}ru.registerCommand("_executeCodeActionProvider",function(u,e,t,n,i){return Nw(this,void 0,void 0,function*(){if(!(e instanceof dt))throw _0();const{codeActionProvider:r}=u.get(We),a=u.get(_n).getModel(e);if(!a)throw _0();const o=Ye.isISelection(t)?Ye.liftSelection(t):j.isIRange(t)?a.validateRange(t):void 0;if(!o)throw _0();const s=typeof n=="string"?new gt(n):void 0,l=yield p2(r,a,o,{type:1,triggerAction:fs.Default,filter:{includeSourceActions:!0,include:s}},Yh.None,Kt.None),c=[],d=Math.min(l.validActions.length,typeof i=="number"?i:0);for(let h=0;hh.action)}finally{setTimeout(()=>l.dispose(),100)}})});var q4t=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},J4t=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},zU;let Rw=zU=class{constructor(e){this.keybindingService=e}getResolver(){const e=new mg(()=>this.keybindingService.getKeybindings().filter(t=>zU.codeActionCommands.indexOf(t.command)>=0).filter(t=>t.resolvedKeybinding).map(t=>{let n=t.commandArgs;return t.command===Xee?n={kind:gt.SourceOrganizeImports.value}:t.command===ete&&(n={kind:gt.SourceFixAll.value}),Object.assign({resolvedKeybinding:t.resolvedKeybinding},Zd.fromUser(n,{kind:gt.None,apply:"never"}))}));return t=>{if(t.kind){const n=this.bestKeybindingForCodeAction(t,e.value);return n==null?void 0:n.resolvedKeybinding}}}bestKeybindingForCodeAction(e,t){if(!e.kind)return;const n=new gt(e.kind);return t.filter(i=>i.kind.contains(n)).filter(i=>i.preferred?e.isPreferred:!0).reduceRight((i,r)=>i?i.kind.contains(r.kind)?r:i:r,void 0)}};Rw.codeActionCommands=[$ke,Hke,Kke,Xee,ete];Rw=zU=q4t([J4t(0,qu)],Rw);q("symbolIcon.arrayForeground",{dark:Ae,light:Ae,hcDark:Ae,hcLight:Ae},v("symbolIcon.arrayForeground","The foreground color for array symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));q("symbolIcon.booleanForeground",{dark:Ae,light:Ae,hcDark:Ae,hcLight:Ae},v("symbolIcon.booleanForeground","The foreground color for boolean symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));q("symbolIcon.classForeground",{dark:"#EE9D28",light:"#D67E00",hcDark:"#EE9D28",hcLight:"#D67E00"},v("symbolIcon.classForeground","The foreground color for class symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));q("symbolIcon.colorForeground",{dark:Ae,light:Ae,hcDark:Ae,hcLight:Ae},v("symbolIcon.colorForeground","The foreground color for color symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));q("symbolIcon.constantForeground",{dark:Ae,light:Ae,hcDark:Ae,hcLight:Ae},v("symbolIcon.constantForeground","The foreground color for constant symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));q("symbolIcon.constructorForeground",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},v("symbolIcon.constructorForeground","The foreground color for constructor symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));q("symbolIcon.enumeratorForeground",{dark:"#EE9D28",light:"#D67E00",hcDark:"#EE9D28",hcLight:"#D67E00"},v("symbolIcon.enumeratorForeground","The foreground color for enumerator symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));q("symbolIcon.enumeratorMemberForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},v("symbolIcon.enumeratorMemberForeground","The foreground color for enumerator member symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));q("symbolIcon.eventForeground",{dark:"#EE9D28",light:"#D67E00",hcDark:"#EE9D28",hcLight:"#D67E00"},v("symbolIcon.eventForeground","The foreground color for event symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));q("symbolIcon.fieldForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},v("symbolIcon.fieldForeground","The foreground color for field symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));q("symbolIcon.fileForeground",{dark:Ae,light:Ae,hcDark:Ae,hcLight:Ae},v("symbolIcon.fileForeground","The foreground color for file symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));q("symbolIcon.folderForeground",{dark:Ae,light:Ae,hcDark:Ae,hcLight:Ae},v("symbolIcon.folderForeground","The foreground color for folder symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));q("symbolIcon.functionForeground",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},v("symbolIcon.functionForeground","The foreground color for function symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));q("symbolIcon.interfaceForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},v("symbolIcon.interfaceForeground","The foreground color for interface symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));q("symbolIcon.keyForeground",{dark:Ae,light:Ae,hcDark:Ae,hcLight:Ae},v("symbolIcon.keyForeground","The foreground color for key symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));q("symbolIcon.keywordForeground",{dark:Ae,light:Ae,hcDark:Ae,hcLight:Ae},v("symbolIcon.keywordForeground","The foreground color for keyword symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));q("symbolIcon.methodForeground",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},v("symbolIcon.methodForeground","The foreground color for method symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));q("symbolIcon.moduleForeground",{dark:Ae,light:Ae,hcDark:Ae,hcLight:Ae},v("symbolIcon.moduleForeground","The foreground color for module symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));q("symbolIcon.namespaceForeground",{dark:Ae,light:Ae,hcDark:Ae,hcLight:Ae},v("symbolIcon.namespaceForeground","The foreground color for namespace symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));q("symbolIcon.nullForeground",{dark:Ae,light:Ae,hcDark:Ae,hcLight:Ae},v("symbolIcon.nullForeground","The foreground color for null symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));q("symbolIcon.numberForeground",{dark:Ae,light:Ae,hcDark:Ae,hcLight:Ae},v("symbolIcon.numberForeground","The foreground color for number symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));q("symbolIcon.objectForeground",{dark:Ae,light:Ae,hcDark:Ae,hcLight:Ae},v("symbolIcon.objectForeground","The foreground color for object symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));q("symbolIcon.operatorForeground",{dark:Ae,light:Ae,hcDark:Ae,hcLight:Ae},v("symbolIcon.operatorForeground","The foreground color for operator symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));q("symbolIcon.packageForeground",{dark:Ae,light:Ae,hcDark:Ae,hcLight:Ae},v("symbolIcon.packageForeground","The foreground color for package symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));q("symbolIcon.propertyForeground",{dark:Ae,light:Ae,hcDark:Ae,hcLight:Ae},v("symbolIcon.propertyForeground","The foreground color for property symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));q("symbolIcon.referenceForeground",{dark:Ae,light:Ae,hcDark:Ae,hcLight:Ae},v("symbolIcon.referenceForeground","The foreground color for reference symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));q("symbolIcon.snippetForeground",{dark:Ae,light:Ae,hcDark:Ae,hcLight:Ae},v("symbolIcon.snippetForeground","The foreground color for snippet symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));q("symbolIcon.stringForeground",{dark:Ae,light:Ae,hcDark:Ae,hcLight:Ae},v("symbolIcon.stringForeground","The foreground color for string symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));q("symbolIcon.structForeground",{dark:Ae,light:Ae,hcDark:Ae,hcLight:Ae},v("symbolIcon.structForeground","The foreground color for struct symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));q("symbolIcon.textForeground",{dark:Ae,light:Ae,hcDark:Ae,hcLight:Ae},v("symbolIcon.textForeground","The foreground color for text symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));q("symbolIcon.typeParameterForeground",{dark:Ae,light:Ae,hcDark:Ae,hcLight:Ae},v("symbolIcon.typeParameterForeground","The foreground color for type parameter symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));q("symbolIcon.unitForeground",{dark:Ae,light:Ae,hcDark:Ae,hcLight:Ae},v("symbolIcon.unitForeground","The foreground color for unit symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));q("symbolIcon.variableForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},v("symbolIcon.variableForeground","The foreground color for variable symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));const Wke=Object.freeze({kind:gt.Empty,title:v("codeAction.widget.id.more","More Actions...")}),Z4t=Object.freeze([{kind:gt.QuickFix,title:v("codeAction.widget.id.quickfix","Quick Fix")},{kind:gt.RefactorExtract,title:v("codeAction.widget.id.extract","Extract"),icon:we.wrench},{kind:gt.RefactorInline,title:v("codeAction.widget.id.inline","Inline"),icon:we.wrench},{kind:gt.RefactorRewrite,title:v("codeAction.widget.id.convert","Rewrite"),icon:we.wrench},{kind:gt.RefactorMove,title:v("codeAction.widget.id.move","Move"),icon:we.wrench},{kind:gt.SurroundWith,title:v("codeAction.widget.id.surround","Surround With"),icon:we.symbolSnippet},{kind:gt.Source,title:v("codeAction.widget.id.source","Source Action"),icon:we.symbolFile},Wke]);function Y4t(u,e,t){if(!e)return u.map(r=>{var a;return{kind:"action",item:r,group:Wke,disabled:!!r.action.disabled,label:r.action.disabled||r.action.title,canPreview:!!(!((a=r.action.edit)===null||a===void 0)&&a.edits.length)}});const n=Z4t.map(r=>({group:r,actions:[]}));for(const r of u){const a=r.action.kind?new gt(r.action.kind):gt.None;for(const o of n)if(o.group.kind.contains(a)){o.actions.push(r);break}}const i=[];for(const r of n)if(r.actions.length){i.push({kind:"header",group:r.group});for(const a of r.actions)i.push({kind:"action",item:a,group:r.group,label:a.action.title,disabled:!!a.action.disabled,keybinding:t(a.action)})}return i}var Q4t=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},X4t=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},MU,S5;(function(u){u.Hidden={type:0};class e{constructor(n,i,r,a){this.actions=n,this.trigger=i,this.editorPosition=r,this.widgetPosition=a,this.type=1}}u.Showing=e})(S5||(S5={}));let V3=MU=class extends ne{constructor(e,t){super(),this._editor=e,this._onClick=this._register(new Q),this.onClick=this._onClick.event,this._state=S5.Hidden,this._domNode=ve("div.lightBulbWidget"),this._register(Zu.ignoreTarget(this._domNode)),this._editor.addContentWidget(this),this._register(this._editor.onDidChangeModelContent(n=>{const i=this._editor.getModel();(this.state.type!==1||!i||this.state.editorPosition.lineNumber>=i.getLineCount())&&this.hide()})),this._register(WJe(this._domNode,n=>{if(this.state.type!==1)return;this._editor.focus(),n.preventDefault();const{top:i,height:r}=ji(this._domNode),a=this._editor.getOption(66);let o=Math.floor(a/3);this.state.widgetPosition.position!==null&&this.state.widgetPosition.position.lineNumber{(n.buttons&1)===1&&this.hide()})),this._register(this._editor.onDidChangeConfiguration(n=>{n.hasChanged(64)&&!this._editor.getOption(64).enabled&&this.hide()})),this._register(Ne.runAndSubscribe(t.onDidUpdateKeybindings,()=>{var n,i,r,a;this._preferredKbLabel=(i=(n=t.lookupKeybinding(Vke))===null||n===void 0?void 0:n.getLabel())!==null&&i!==void 0?i:void 0,this._quickFixKbLabel=(a=(r=t.lookupKeybinding(Qee))===null||r===void 0?void 0:r.getLabel())!==null&&a!==void 0?a:void 0,this._updateLightBulbTitleAndIcon()}))}dispose(){super.dispose(),this._editor.removeContentWidget(this)}getId(){return"LightBulbWidget"}getDomNode(){return this._domNode}getPosition(){return this._state.type===1?this._state.widgetPosition:null}update(e,t,n){if(e.validActions.length<=0)return this.hide();const i=this._editor.getOptions();if(!i.get(64).enabled)return this.hide();const r=this._editor.getModel();if(!r)return this.hide();const{lineNumber:a,column:o}=r.validatePosition(n),s=r.getOptions().tabSize,l=i.get(50),c=r.getLineContent(a),d=pP(c,s),h=l.spaceWidth*d>22,E=g=>g>2&&this._editor.getTopForLineNumber(g)===this._editor.getTopForLineNumber(g-1);let m=a;if(!h){if(a>1&&!E(a-1))m-=1;else if(!E(a+1))m+=1;else if(o*l.spaceWidth<22)return this.hide()}this.state=new S5.Showing(e,t,n,{position:{lineNumber:m,column:1},preference:MU._posPref}),this._editor.layoutContentWidget(this)}hide(){this.state!==S5.Hidden&&(this.state=S5.Hidden,this._editor.layoutContentWidget(this))}get state(){return this._state}set state(e){this._state=e,this._updateLightBulbTitleAndIcon()}_updateLightBulbTitleAndIcon(){if(this.state.type===1&&this.state.actions.hasAutoFix&&(this._domNode.classList.remove(...st.asClassNameArray(we.lightBulb)),this._domNode.classList.add(...st.asClassNameArray(we.lightbulbAutofix)),this._preferredKbLabel)){this.title=v("preferredcodeActionWithKb","Show Code Actions. Preferred Quick Fix Available ({0})",this._preferredKbLabel);return}this._domNode.classList.remove(...st.asClassNameArray(we.lightbulbAutofix)),this._domNode.classList.add(...st.asClassNameArray(we.lightBulb)),this._quickFixKbLabel?this.title=v("codeActionWithKb","Show Code Actions ({0})",this._quickFixKbLabel):this.title=v("codeAction","Show Code Actions")}set title(e){this._domNode.title=e}};V3.ID="editor.contrib.lightbulbWidget";V3._posPref=[0];V3=MU=Q4t([X4t(1,qu)],V3);var eEt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},gle=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},Gke=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})},TU;let h4=TU=class{constructor(e,t,n){this._options=e,this._languageService=t,this._openerService=n,this._onDidRenderAsync=new Q,this.onDidRenderAsync=this._onDidRenderAsync.event}dispose(){this._onDidRenderAsync.dispose()}render(e,t,n){if(!e)return{element:document.createElement("span"),dispose:()=>{}};const i=new pe,r=i.add(BP(e,Object.assign(Object.assign({},this._getRenderOptions(e,i)),t),n));return r.element.classList.add("rendered-markdown"),{element:r.element,dispose:()=>i.dispose()}}_getRenderOptions(e,t){return{codeBlockRenderer:(n,i)=>Gke(this,void 0,void 0,function*(){var r,a,o;let s;n?s=this._languageService.getLanguageIdByLanguageName(n):this._options.editor&&(s=(r=this._options.editor.getModel())===null||r===void 0?void 0:r.getLanguageId()),s||(s=Ws);const l=yield Frt(this._languageService,i,s),c=document.createElement("span");if(c.innerHTML=(o=(a=TU._ttpTokenizer)===null||a===void 0?void 0:a.createHTML(l))!==null&&o!==void 0?o:l,this._options.editor){const d=this._options.editor.getOption(50);ea(c,d)}else this._options.codeBlockFontFamily&&(c.style.fontFamily=this._options.codeBlockFontFamily);return this._options.codeBlockFontSize!==void 0&&(c.style.fontSize=this._options.codeBlockFontSize),c}),asyncRenderCallback:()=>this._onDidRenderAsync.fire(),actionHandler:{callback:n=>Uke(this._openerService,n,e.isTrusted),disposables:t}}}};h4._ttpTokenizer=b4("tokenizeToString",{createHTML(u){return u}});h4=TU=eEt([gle(1,vn),gle(2,Cs)],h4);function Uke(u,e,t){return Gke(this,void 0,void 0,function*(){try{return yield u.open(e,{fromUserGesture:!0,allowContributedOpeners:!0,allowCommands:tEt(t)})}catch(n){return zt(n),!1}})}function tEt(u){return u===!0?!0:u&&Array.isArray(u.enabledCommands)?u.enabledCommands:!1}var uEt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},fle=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},d8;let cs=d8=class{static get(e){return e.getContribution(d8.ID)}constructor(e,t,n){this._openerService=n,this._messageWidget=new Ir,this._messageListeners=new pe,this._mouseOverMessage=!1,this._editor=e,this._visible=d8.MESSAGE_VISIBLE.bindTo(t)}dispose(){var e;(e=this._message)===null||e===void 0||e.dispose(),this._messageListeners.dispose(),this._messageWidget.dispose(),this._visible.reset()}showMessage(e,t){ga(nm(e)?e.value:e),this._visible.set(!0),this._messageWidget.clear(),this._messageListeners.clear(),this._message=nm(e)?BP(e,{actionHandler:{callback:i=>Uke(this._openerService,i,nm(e)?e.isTrusted:void 0),disposables:this._messageListeners}}):void 0,this._messageWidget.value=new ple(this._editor,t,typeof e=="string"?e:this._message.element),this._messageListeners.add(Ne.debounce(this._editor.onDidBlurEditorText,(i,r)=>r,0)(()=>{this._mouseOverMessage||this._messageWidget.value&&Qr(yl(),this._messageWidget.value.getDomNode())||this.closeMessage()})),this._messageListeners.add(this._editor.onDidChangeCursorPosition(()=>this.closeMessage())),this._messageListeners.add(this._editor.onDidDispose(()=>this.closeMessage())),this._messageListeners.add(this._editor.onDidChangeModel(()=>this.closeMessage())),this._messageListeners.add(ce(this._messageWidget.value.getDomNode(),Me.MOUSE_ENTER,()=>this._mouseOverMessage=!0,!0)),this._messageListeners.add(ce(this._messageWidget.value.getDomNode(),Me.MOUSE_LEAVE,()=>this._mouseOverMessage=!1,!0));let n;this._messageListeners.add(this._editor.onMouseMove(i=>{i.target.position&&(n?n.containsPosition(i.target.position)||this.closeMessage():n=new j(t.lineNumber-3,1,i.target.position.lineNumber+3,1))}))}closeMessage(){this._visible.reset(),this._messageListeners.clear(),this._messageWidget.value&&this._messageListeners.add(ple.fadeOut(this._messageWidget.value))}};cs.ID="editor.contrib.messageController";cs.MESSAGE_VISIBLE=new Pe("messageVisible",!1,v("messageVisible","Whether the editor is currently showing an inline message"));cs=d8=uEt([fle(1,pt),fle(2,Cs)],cs);const nEt=xr.bindToContribution(cs.get);ze(new nEt({id:"leaveEditorMessage",precondition:cs.MESSAGE_VISIBLE,handler:u=>u.closeMessage(),kbOpts:{weight:100+30,primary:9}}));let ple=class{static fadeOut(e){const t=()=>{e.dispose(),clearTimeout(n),e.getDomNode().removeEventListener("animationend",t)},n=setTimeout(t,110);return e.getDomNode().addEventListener("animationend",t),e.getDomNode().classList.add("fadeOut"),{dispose:t}}constructor(e,{lineNumber:t,column:n},i){this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._editor=e,this._editor.revealLinesInCenterIfOutsideViewport(t,t,0),this._position={lineNumber:t,column:n},this._domNode=document.createElement("div"),this._domNode.classList.add("monaco-editor-overlaymessage"),this._domNode.style.marginLeft="-6px";const r=document.createElement("div");r.classList.add("anchor","top"),this._domNode.appendChild(r);const a=document.createElement("div");typeof i=="string"?(a.classList.add("message"),a.textContent=i):(i.classList.add("message"),a.appendChild(i)),this._domNode.appendChild(a);const o=document.createElement("div");o.classList.add("anchor","below"),this._domNode.appendChild(o),this._editor.addContentWidget(this),this._domNode.classList.add("fadeIn")}dispose(){this._editor.removeContentWidget(this)}getId(){return"messageoverlay"}getDomNode(){return this._domNode}getPosition(){return{position:this._position,preference:[1,2],positionAffinity:1}}afterRender(e){this._domNode.classList.toggle("below",e===2)}};fu(cs.ID,cs,4);var qke=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},NU=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},iEt=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};const Jke="acceptSelectedCodeAction",Zke="previewSelectedCodeAction";class rEt{get templateId(){return"header"}renderTemplate(e){e.classList.add("group-header");const t=document.createElement("span");return e.append(t),{container:e,text:t}}renderElement(e,t,n){var i,r;n.text.textContent=(r=(i=e.group)===null||i===void 0?void 0:i.title)!==null&&r!==void 0?r:""}disposeTemplate(e){}}let PU=class{get templateId(){return"action"}constructor(e,t){this._supportsPreview=e,this._keybindingService=t}renderTemplate(e){e.classList.add(this.templateId);const t=document.createElement("div");t.className="icon",e.append(t);const n=document.createElement("span");n.className="title",e.append(n);const i=new FA(e,Os);return{container:e,icon:t,text:n,keybinding:i}}renderElement(e,t,n){var i,r,a;if(!((i=e.group)===null||i===void 0)&&i.icon?(n.icon.className=st.asClassName(e.group.icon),e.group.icon.color&&(n.icon.style.color=Re(e.group.icon.color.id))):(n.icon.className=st.asClassName(we.lightBulb),n.icon.style.color="var(--vscode-editorLightBulb-foreground)"),!e.item||!e.label)return;n.text.textContent=Yke(e.label),n.keybinding.set(e.keybinding),uZe(!!e.keybinding,n.keybinding.element);const o=(r=this._keybindingService.lookupKeybinding(Jke))===null||r===void 0?void 0:r.getLabel(),s=(a=this._keybindingService.lookupKeybinding(Zke))===null||a===void 0?void 0:a.getLabel();n.container.classList.toggle("option-disabled",e.disabled),e.disabled?n.container.title=e.label:o&&s?this._supportsPreview&&e.canPreview?n.container.title=v({key:"label-preview",comment:['placeholders are keybindings, e.g "F2 to apply, Shift+F2 to preview"']},"{0} to apply, {1} to preview",o,s):n.container.title=v({key:"label",comment:['placeholder is a keybinding, e.g "F2 to apply"']},"{0} to apply",o):n.container.title=""}disposeTemplate(e){}};PU=qke([NU(1,qu)],PU);class aEt extends UIEvent{constructor(){super("acceptSelectedAction")}}class Dle extends UIEvent{constructor(){super("previewSelectedAction")}}function oEt(u){if(u.kind==="action")return u.label}let RU=class extends ne{constructor(e,t,n,i,r,a){super(),this._delegate=i,this._contextViewService=r,this._keybindingService=a,this._actionLineHeight=24,this._headerLineHeight=26,this.cts=this._register(new vi),this.domNode=document.createElement("div"),this.domNode.classList.add("actionList");const o={getHeight:s=>s.kind==="header"?this._headerLineHeight:this._actionLineHeight,getTemplateId:s=>s.kind};this._list=this._register(new Gl(e,this.domNode,o,[new PU(t,this._keybindingService),new rEt],{keyboardSupport:!1,typeNavigationEnabled:!0,keyboardNavigationLabelProvider:{getKeyboardNavigationLabel:oEt},accessibilityProvider:{getAriaLabel:s=>{if(s.kind==="action"){let l=s.label?Yke(s==null?void 0:s.label):"";return s.disabled&&(l=v({key:"customQuickFixWidget.labels",comment:["Action widget labels for accessibility."]},"{0}, Disabled Reason: {1}",l,s.disabled)),l}return null},getWidgetAriaLabel:()=>v({key:"customQuickFixWidget",comment:["An action widget option"]},"Action Widget"),getRole:s=>s.kind==="action"?"option":"separator",getWidgetRole:()=>"listbox"}})),this._list.style(Tp),this._register(this._list.onMouseClick(s=>this.onListClick(s))),this._register(this._list.onMouseOver(s=>this.onListHover(s))),this._register(this._list.onDidChangeFocus(()=>this.onFocus())),this._register(this._list.onDidChangeSelection(s=>this.onListSelection(s))),this._allMenuItems=n,this._list.splice(0,this._list.length,this._allMenuItems),this._list.length&&this.focusNext()}focusCondition(e){return!e.disabled&&e.kind==="action"}hide(e){this._delegate.onHide(e),this.cts.cancel(),this._contextViewService.hideContextView()}layout(e){const t=this._allMenuItems.filter(l=>l.kind==="header").length,i=this._allMenuItems.length*this._actionLineHeight+t*this._headerLineHeight-t*this._actionLineHeight;this._list.layout(i);const r=this._allMenuItems.map((l,c)=>{const d=document.getElementById(this._list.getElementID(c));if(d){d.style.width="auto";const h=d.getBoundingClientRect().width;return d.style.width="",h}return 0}),a=Math.max(...r,e),o=.7,s=Math.min(i,document.body.clientHeight*o);return this._list.layout(s,a),this.domNode.style.height=`${s}px`,this._list.domFocus(),a}focusPrevious(){this._list.focusPrevious(1,!0,void 0,this.focusCondition)}focusNext(){this._list.focusNext(1,!0,void 0,this.focusCondition)}acceptSelected(e){const t=this._list.getFocus();if(t.length===0)return;const n=t[0],i=this._list.element(n);if(!this.focusCondition(i))return;const r=e?new Dle:new aEt;this._list.setSelection([n],r)}onListSelection(e){if(!e.elements.length)return;const t=e.elements[0];t.item&&this.focusCondition(t)?this._delegate.onSelect(t.item,e.browserEvent instanceof Dle):this._list.setSelection([])}onFocus(){var e,t;this._list.domFocus();const n=this._list.getFocus();if(n.length===0)return;const i=n[0],r=this._list.element(i);(t=(e=this._delegate).onFocus)===null||t===void 0||t.call(e,r.item)}onListHover(e){return iEt(this,void 0,void 0,function*(){const t=e.element;if(t&&t.item&&this.focusCondition(t)){if(this._delegate.onHover&&!t.disabled&&t.kind==="action"){const n=yield this._delegate.onHover(t.item,this.cts.token);t.canPreview=n?n.canPreview:void 0}e.index&&this._list.splice(e.index,1,[t])}this._list.setFocus(typeof e.index=="number"?[e.index]:[])})}onListClick(e){e.element&&this.focusCondition(e.element)&&this._list.setFocus([])}};RU=qke([NU(4,F4),NU(5,qu)],RU);function Yke(u){return u.replace(/\r\n|\r|\n/g," ")}var sEt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},bH=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}};q("actionBar.toggledBackground",{dark:If,light:If,hcDark:If,hcLight:If},v("actionBar.toggledBackground","Background color for toggled action items in action bar."));const $3={Visible:new Pe("codeActionMenuVisible",!1,v("codeActionMenuVisible","Whether the action widget list is visible"))},Op=Ut("actionWidgetService");let K3=class extends ne{get isVisible(){return $3.Visible.getValue(this._contextKeyService)||!1}constructor(e,t,n){super(),this._contextViewService=e,this._contextKeyService=t,this._instantiationService=n,this._list=this._register(new Ir)}show(e,t,n,i,r,a,o){const s=$3.Visible.bindTo(this._contextKeyService),l=this._instantiationService.createInstance(RU,e,t,n,i);this._contextViewService.showContextView({getAnchor:()=>r,render:c=>(s.set(!0),this._renderWidget(c,l,o??[])),onHide:c=>{s.reset(),this._onWidgetClosed(c)}},a,!1)}acceptSelected(e){var t;(t=this._list.value)===null||t===void 0||t.acceptSelected(e)}focusPrevious(){var e,t;(t=(e=this._list)===null||e===void 0?void 0:e.value)===null||t===void 0||t.focusPrevious()}focusNext(){var e,t;(t=(e=this._list)===null||e===void 0?void 0:e.value)===null||t===void 0||t.focusNext()}hide(){var e;(e=this._list.value)===null||e===void 0||e.hide(),this._list.clear()}_renderWidget(e,t,n){var i;const r=document.createElement("div");if(r.classList.add("action-widget"),e.appendChild(r),this._list.value=t,this._list.value)r.appendChild(this._list.value.domNode);else throw new Error("List has no value");const a=new pe,o=document.createElement("div"),s=e.appendChild(o);s.classList.add("context-view-block"),a.add(ce(s,Me.MOUSE_DOWN,m=>m.stopPropagation()));const l=document.createElement("div"),c=e.appendChild(l);c.classList.add("context-view-pointerBlock"),a.add(ce(c,Me.POINTER_MOVE,()=>c.remove())),a.add(ce(c,Me.MOUSE_DOWN,()=>c.remove()));let d=0;if(n.length){const m=this._createActionBar(".action-widget-action-bar",n);m&&(r.appendChild(m.getContainer().parentElement),a.add(m),d=m.getContainer().offsetWidth)}const h=(i=this._list.value)===null||i===void 0?void 0:i.layout(d);r.style.width=`${h}px`;const E=a.add(y1(e));return a.add(E.onDidBlur(()=>this.hide())),a}_createActionBar(e,t){if(!t.length)return;const n=ve(e),i=new j0(n);return i.push(t,{icon:!1,label:!0}),i}_onWidgetClosed(e){var t;(t=this._list.value)===null||t===void 0||t.hide(e)}};K3=sEt([bH(0,F4),bH(1,pt),bH(2,mt)],K3);au(Op,K3,1);const zA=100+1e3;gn(class extends n0{constructor(){super({id:"hideCodeActionWidget",title:{value:v("hideCodeActionWidget.title","Hide action widget"),original:"Hide action widget"},precondition:$3.Visible,keybinding:{weight:zA,primary:9,secondary:[1033]}})}run(u){u.get(Op).hide()}});gn(class extends n0{constructor(){super({id:"selectPrevCodeAction",title:{value:v("selectPrevCodeAction.title","Select previous action"),original:"Select previous action"},precondition:$3.Visible,keybinding:{weight:zA,primary:16,secondary:[2064],mac:{primary:16,secondary:[2064,302]}}})}run(u){const e=u.get(Op);e instanceof K3&&e.focusPrevious()}});gn(class extends n0{constructor(){super({id:"selectNextCodeAction",title:{value:v("selectNextCodeAction.title","Select next action"),original:"Select next action"},precondition:$3.Visible,keybinding:{weight:zA,primary:18,secondary:[2066],mac:{primary:18,secondary:[2066,300]}}})}run(u){const e=u.get(Op);e instanceof K3&&e.focusNext()}});gn(class extends n0{constructor(){super({id:Jke,title:{value:v("acceptSelected.title","Accept selected action"),original:"Accept selected action"},precondition:$3.Visible,keybinding:{weight:zA,primary:3,secondary:[2137]}})}run(u){const e=u.get(Op);e instanceof K3&&e.acceptSelected()}});gn(class extends n0{constructor(){super({id:Zke,title:{value:v("previewSelected.title","Preview selected action"),original:"Preview selected action"},precondition:$3.Visible,keybinding:{weight:zA,primary:2051}})}run(u){const e=u.get(Op);e instanceof K3&&e.acceptSelected(!0)}});var lEt=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};const Qke=new Pe("supportedCodeAction","");class cEt extends ne{constructor(e,t,n,i=250){super(),this._editor=e,this._markerService=t,this._signalChange=n,this._delay=i,this._autoTriggerTimer=this._register(new Vl),this._register(this._markerService.onMarkerChanged(r=>this._onMarkerChanges(r))),this._register(this._editor.onDidChangeCursorPosition(()=>this._tryAutoTrigger()))}trigger(e){const t=this._getRangeOfSelectionUnlessWhitespaceEnclosed(e);this._signalChange(t?{trigger:e,selection:t}:void 0)}_onMarkerChanges(e){const t=this._editor.getModel();t&&e.some(n=>TX(n,t.uri))&&this._tryAutoTrigger()}_tryAutoTrigger(){this._autoTriggerTimer.cancelAndSet(()=>{this.trigger({type:2,triggerAction:fs.Default})},this._delay)}_getRangeOfSelectionUnlessWhitespaceEnclosed(e){if(!this._editor.hasModel())return;const t=this._editor.getModel(),n=this._editor.getSelection();if(n.isEmpty()&&e.type===2){const{lineNumber:i,column:r}=n.getPosition(),a=t.getLineContent(i);if(a.length===0)return;if(r===1){if(/\s/.test(a[0]))return}else if(r===t.getLineMaxColumn(i)){if(/\s/.test(a[a.length-1]))return}else if(/\s/.test(a[r-2])&&/\s/.test(a[r-1]))return}return n}}var Bf;(function(u){u.Empty={type:0};class e{constructor(n,i,r){this.trigger=n,this.position=i,this._cancellablePromise=r,this.type=1,this.actions=r.catch(a=>{if(dd(a))return Xke;throw a})}cancel(){this._cancellablePromise.cancel()}}u.Triggered=e})(Bf||(Bf={}));const Xke=Object.freeze({allActions:[],validActions:[],dispose:()=>{},documentation:[],hasAutoFix:!1});class dEt extends ne{constructor(e,t,n,i,r,a){super(),this._editor=e,this._registry=t,this._markerService=n,this._progressService=r,this._configurationService=a,this._codeActionOracle=this._register(new Ir),this._state=Bf.Empty,this._onDidChangeState=this._register(new Q),this.onDidChangeState=this._onDidChangeState.event,this._disposed=!1,this._supportedCodeActions=Qke.bindTo(i),this._register(this._editor.onDidChangeModel(()=>this._update())),this._register(this._editor.onDidChangeModelLanguage(()=>this._update())),this._register(this._registry.onDidChange(()=>this._update())),this._update()}dispose(){this._disposed||(this._disposed=!0,super.dispose(),this.setState(Bf.Empty,!0))}_settingEnabledNearbyQuickfixes(){var e;const t=(e=this._editor)===null||e===void 0?void 0:e.getModel();return this._configurationService?this._configurationService.getValue("editor.codeActionWidget.includeNearbyQuickfixes",{resource:t==null?void 0:t.uri}):!1}_update(){if(this._disposed)return;this._codeActionOracle.value=void 0,this.setState(Bf.Empty);const e=this._editor.getModel();if(e&&this._registry.has(e)&&!this._editor.getOption(90)){const t=this._registry.all(e).flatMap(n=>{var i;return(i=n.providedCodeActionKinds)!==null&&i!==void 0?i:[]});this._supportedCodeActions.set(t.join(" ")),this._codeActionOracle.value=new cEt(this._editor,this._markerService,n=>{var i;if(!n){this.setState(Bf.Empty);return}const r=n.selection.getStartPosition(),a=Ui(o=>lEt(this,void 0,void 0,function*(){var s,l,c,d,h,E;if(this._settingEnabledNearbyQuickfixes()&&n.trigger.type===1&&(n.trigger.triggerAction===fs.QuickFix||!((l=(s=n.trigger.filter)===null||s===void 0?void 0:s.include)===null||l===void 0)&&l.contains(gt.QuickFix))){const m=yield p2(this._registry,e,n.selection,n.trigger,Yh.None,o);if(o.isCancellationRequested)return Xke;if(!((c=m.validActions)===null||c===void 0?void 0:c.some(f=>f.action.kind?gt.QuickFix.contains(new gt(f.action.kind)):!1))){const f=this._markerService.read({resource:e.uri});if(f.length>0){const p=n.selection.getPosition();let D=p,x=Number.MAX_VALUE,b=!1;for(const k of f){const A=k.endColumn,F=k.endLineNumber,S=k.startLineNumber;(F===p.lineNumber||S===p.lineNumber)&&Math.abs(p.column-A){w.highlightRange=w.action.isPreferred}),S.push(...F.validActions)),{validActions:S,allActions:m.allActions,documentation:m.documentation,hasAutoFix:m.hasAutoFix,dispose:()=>{m.dispose()}}}}}}return p2(this._registry,e,n.selection,n.trigger,Yh.None,o)}));n.trigger.type===1&&((i=this._progressService)===null||i===void 0||i.showWhile(a,250)),this.setState(new Bf.Triggered(n.trigger,r,a))},void 0),this._codeActionOracle.value.trigger({type:2,triggerAction:fs.Default})}else this._supportedCodeActions.reset()}trigger(e){var t;(t=this._codeActionOracle.value)===null||t===void 0||t.trigger(e)}setState(e,t){e!==this._state&&(this._state.type===1&&this._state.cancel(),this._state=e,!t&&!this._disposed&&this._onDidChangeState.fire(e))}}var hEt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},ah=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},vC=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})},h8;const EEt="quickfix-edit-highlight";let Um=h8=class extends ne{static get(e){return e.getContribution(h8.ID)}constructor(e,t,n,i,r,a,o,s,l,c){super(),this._commandService=o,this._configurationService=s,this._actionWidgetService=l,this._instantiationService=c,this._activeCodeActions=this._register(new Ir),this._showDisabled=!1,this._disposed=!1,this._editor=e,this._model=this._register(new dEt(this._editor,r.codeActionProvider,t,n,a,s)),this._register(this._model.onDidChangeState(d=>this.update(d))),this._lightBulbWidget=new mg(()=>{const d=this._editor.getContribution(V3.ID);return d&&this._register(d.onClick(h=>this.showCodeActionList(h.actions,h,{includeDisabledActions:!1,fromLightbulb:!0}))),d}),this._resolver=i.createInstance(Rw),this._register(this._editor.onDidLayoutChange(()=>this._actionWidgetService.hide()))}dispose(){this._disposed=!0,super.dispose()}showCodeActions(e,t,n){return this.showCodeActionList(t,n,{includeDisabledActions:!1,fromLightbulb:!1})}manualTriggerAtCurrentPosition(e,t,n,i){var r;if(!this._editor.hasModel())return;(r=cs.get(this._editor))===null||r===void 0||r.closeMessage();const a=this._editor.getPosition();this._trigger({type:1,triggerAction:t,filter:n,autoApply:i,context:{notAvailableMessage:e,position:a}})}_trigger(e){return this._model.trigger(e)}_applyCodeAction(e,t,n){return vC(this,void 0,void 0,function*(){try{yield this._instantiationService.invokeFunction(G4t,e,Pw.FromCodeActions,{preview:n,editor:this._editor})}finally{t&&this._trigger({type:2,triggerAction:fs.QuickFix,filter:{}})}})}update(e){var t,n,i,r,a,o,s;return vC(this,void 0,void 0,function*(){if(e.type!==1){(t=this._lightBulbWidget.rawValue)===null||t===void 0||t.hide();return}let l;try{l=yield e.actions}catch(c){zt(c);return}if(!this._disposed)if((n=this._lightBulbWidget.value)===null||n===void 0||n.update(l,e.trigger,e.position),e.trigger.type===1){if(!((i=e.trigger.filter)===null||i===void 0)&&i.include){const d=this.tryGetValidActionToApply(e.trigger,l);if(d){try{(r=this._lightBulbWidget.value)===null||r===void 0||r.hide(),yield this._applyCodeAction(d,!1,!1)}finally{l.dispose()}return}if(e.trigger.context){const h=this.getInvalidActionThatWouldHaveBeenApplied(e.trigger,l);if(h&&h.action.disabled){(a=cs.get(this._editor))===null||a===void 0||a.showMessage(h.action.disabled,e.trigger.context.position),l.dispose();return}}}const c=!!(!((o=e.trigger.filter)===null||o===void 0)&&o.include);if(e.trigger.context&&(!l.allActions.length||!c&&!l.validActions.length)){(s=cs.get(this._editor))===null||s===void 0||s.showMessage(e.trigger.context.notAvailableMessage,e.trigger.context.position),this._activeCodeActions.value=l,l.dispose();return}this._activeCodeActions.value=l,this.showCodeActionList(l,this.toCoords(e.position),{includeDisabledActions:c,fromLightbulb:!1})}else this._actionWidgetService.isVisible?l.dispose():this._activeCodeActions.value=l})}getInvalidActionThatWouldHaveBeenApplied(e,t){if(t.allActions.length&&(e.autoApply==="first"&&t.validActions.length===0||e.autoApply==="ifSingle"&&t.allActions.length===1))return t.allActions.find(({action:n})=>n.disabled)}tryGetValidActionToApply(e,t){if(t.validActions.length&&(e.autoApply==="first"&&t.validActions.length>0||e.autoApply==="ifSingle"&&t.validActions.length===1))return t.validActions[0]}showCodeActionList(e,t,n){return vC(this,void 0,void 0,function*(){const i=this._editor.createDecorationsCollection(),r=this._editor.getDomNode();if(!r)return;const a=n.includeDisabledActions&&(this._showDisabled||e.validActions.length===0)?e.allActions:e.validActions;if(!a.length)return;const o=ee.isIPosition(t)?this.toCoords(t):t,s={onSelect:(l,c)=>vC(this,void 0,void 0,function*(){this._applyCodeAction(l,!0,!!c),this._actionWidgetService.hide(),i.clear()}),onHide:()=>{var l;(l=this._editor)===null||l===void 0||l.focus(),i.clear()},onHover:(l,c)=>vC(this,void 0,void 0,function*(){var d;if(yield l.resolve(c),!c.isCancellationRequested)return{canPreview:!!(!((d=l.action.edit)===null||d===void 0)&&d.edits.length)}}),onFocus:l=>{var c,d;if(l&&l.highlightRange&&l.action.diagnostics){const h=[{range:l.action.diagnostics[0],options:h8.DECORATION}];i.set(h);const E=l.action.diagnostics[0],m=(d=(c=this._editor.getModel())===null||c===void 0?void 0:c.getWordAtPosition({lineNumber:E.startLineNumber,column:E.startColumn}))===null||d===void 0?void 0:d.word;jm(v("editingNewSelection","Context: {0} at line {1} and column {2}.",m,E.startLineNumber,E.startColumn))}else i.clear()}};this._actionWidgetService.show("codeActionWidget",!0,Y4t(a,this._shouldShowHeaders(),this._resolver.getResolver()),s,o,r,this._getActionBarActions(e,t,n))})}toCoords(e){if(!this._editor.hasModel())return{x:0,y:0};this._editor.revealPosition(e,1),this._editor.render();const t=this._editor.getScrolledVisiblePosition(e),n=ji(this._editor.getDomNode()),i=n.left+t.left,r=n.top+t.top+t.height;return{x:i,y:r}}_shouldShowHeaders(){var e;const t=(e=this._editor)===null||e===void 0?void 0:e.getModel();return this._configurationService.getValue("editor.codeActionWidget.showHeaders",{resource:t==null?void 0:t.uri})}_getActionBarActions(e,t,n){if(n.fromLightbulb)return[];const i=e.documentation.map(r=>{var a;return{id:r.id,label:r.title,tooltip:(a=r.tooltip)!==null&&a!==void 0?a:"",class:void 0,enabled:!0,run:()=>{var o;return this._commandService.executeCommand(r.id,...(o=r.arguments)!==null&&o!==void 0?o:[])}}});return n.includeDisabledActions&&e.validActions.length>0&&e.allActions.length!==e.validActions.length&&i.push(this._showDisabled?{id:"hideMoreActions",label:v("hideMoreActions","Hide Disabled"),enabled:!0,tooltip:"",class:void 0,run:()=>(this._showDisabled=!1,this.showCodeActionList(e,t,n))}:{id:"showMoreActions",label:v("showMoreActions","Show Disabled"),enabled:!0,tooltip:"",class:void 0,run:()=>(this._showDisabled=!0,this.showCodeActionList(e,t,n))}),i}};Um.ID="editor.contrib.codeActionController";Um.DECORATION=Lt.register({description:"quickfix-highlight",className:EEt});Um=h8=hEt([ah(1,G1),ah(2,pt),ah(3,mt),ah(4,We),ah(5,Dg),ah(6,ni),ah(7,tu),ah(8,Op),ah(9,mt)],Um);Kl((u,e)=>{((i,r)=>{r&&e.addRule(`.monaco-editor ${i} { background-color: ${r}; }`)})(".quickfix-edit-highlight",u.getColor(a1));const n=u.getColor(LE);n&&e.addRule(`.monaco-editor .quickfix-edit-highlight { border: 1px ${$c(u.type)?"dotted":"solid"} ${n}; box-sizing: border-box; }`)});function MA(u){return Ee.regex(Qke.keys()[0],new RegExp("(\\s|^)"+Js(u.value)+"\\b"))}const tte={type:"object",defaultSnippets:[{body:{kind:""}}],properties:{kind:{type:"string",description:v("args.schema.kind","Kind of the code action to run.")},apply:{type:"string",description:v("args.schema.apply","Controls when the returned actions are applied."),default:"ifSingle",enum:["first","ifSingle","never"],enumDescriptions:[v("args.schema.apply.first","Always apply the first returned code action."),v("args.schema.apply.ifSingle","Apply the first returned code action if it is the only one."),v("args.schema.apply.never","Do not apply the returned code actions.")]},preferred:{type:"boolean",default:!1,description:v("args.schema.preferred","Controls if only preferred code actions should be returned.")}}};function jp(u,e,t,n,i=fs.Default){if(u.hasModel()){const r=Um.get(u);r==null||r.manualTriggerAtCurrentPosition(e,i,t,n)}}class mEt extends $e{constructor(){super({id:Qee,label:v("quickfix.trigger.label","Quick Fix..."),alias:"Quick Fix...",precondition:Ee.and(W.writable,W.hasCodeActionsProvider),kbOpts:{kbExpr:W.textInputFocus,primary:2137,weight:100}})}run(e,t){return jp(t,v("editor.action.quickFix.noneMessage","No code actions available"),void 0,void 0,fs.QuickFix)}}class gEt extends xr{constructor(){super({id:Hke,precondition:Ee.and(W.writable,W.hasCodeActionsProvider),description:{description:"Trigger a code action",args:[{name:"args",schema:tte}]}})}runEditorCommand(e,t,n){const i=Zd.fromUser(n,{kind:gt.Empty,apply:"ifSingle"});return jp(t,typeof(n==null?void 0:n.kind)=="string"?i.preferred?v("editor.action.codeAction.noneMessage.preferred.kind","No preferred code actions for '{0}' available",n.kind):v("editor.action.codeAction.noneMessage.kind","No code actions for '{0}' available",n.kind):i.preferred?v("editor.action.codeAction.noneMessage.preferred","No preferred code actions available"):v("editor.action.codeAction.noneMessage","No code actions available"),{include:i.kind,includeSourceActions:!0,onlyIncludePreferredActions:i.preferred},i.apply)}}class fEt extends $e{constructor(){super({id:$ke,label:v("refactor.label","Refactor..."),alias:"Refactor...",precondition:Ee.and(W.writable,W.hasCodeActionsProvider),kbOpts:{kbExpr:W.textInputFocus,primary:3120,mac:{primary:1328},weight:100},contextMenuOpts:{group:"1_modification",order:2,when:Ee.and(W.writable,MA(gt.Refactor))},description:{description:"Refactor...",args:[{name:"args",schema:tte}]}})}run(e,t,n){const i=Zd.fromUser(n,{kind:gt.Refactor,apply:"never"});return jp(t,typeof(n==null?void 0:n.kind)=="string"?i.preferred?v("editor.action.refactor.noneMessage.preferred.kind","No preferred refactorings for '{0}' available",n.kind):v("editor.action.refactor.noneMessage.kind","No refactorings for '{0}' available",n.kind):i.preferred?v("editor.action.refactor.noneMessage.preferred","No preferred refactorings available"):v("editor.action.refactor.noneMessage","No refactorings available"),{include:gt.Refactor.contains(i.kind)?i.kind:gt.None,onlyIncludePreferredActions:i.preferred},i.apply,fs.Refactor)}}class pEt extends $e{constructor(){super({id:Kke,label:v("source.label","Source Action..."),alias:"Source Action...",precondition:Ee.and(W.writable,W.hasCodeActionsProvider),contextMenuOpts:{group:"1_modification",order:2.1,when:Ee.and(W.writable,MA(gt.Source))},description:{description:"Source Action...",args:[{name:"args",schema:tte}]}})}run(e,t,n){const i=Zd.fromUser(n,{kind:gt.Source,apply:"never"});return jp(t,typeof(n==null?void 0:n.kind)=="string"?i.preferred?v("editor.action.source.noneMessage.preferred.kind","No preferred source actions for '{0}' available",n.kind):v("editor.action.source.noneMessage.kind","No source actions for '{0}' available",n.kind):i.preferred?v("editor.action.source.noneMessage.preferred","No preferred source actions available"):v("editor.action.source.noneMessage","No source actions available"),{include:gt.Source.contains(i.kind)?i.kind:gt.None,includeSourceActions:!0,onlyIncludePreferredActions:i.preferred},i.apply,fs.SourceAction)}}class DEt extends $e{constructor(){super({id:Xee,label:v("organizeImports.label","Organize Imports"),alias:"Organize Imports",precondition:Ee.and(W.writable,MA(gt.SourceOrganizeImports)),kbOpts:{kbExpr:W.textInputFocus,primary:1581,weight:100}})}run(e,t){return jp(t,v("editor.action.organize.noneMessage","No organize imports action available"),{include:gt.SourceOrganizeImports,includeSourceActions:!0},"ifSingle",fs.OrganizeImports)}}class xEt extends $e{constructor(){super({id:ete,label:v("fixAll.label","Fix All"),alias:"Fix All",precondition:Ee.and(W.writable,MA(gt.SourceFixAll))})}run(e,t){return jp(t,v("fixAll.noneMessage","No fix all action available"),{include:gt.SourceFixAll,includeSourceActions:!0},"ifSingle",fs.FixAll)}}class vEt extends $e{constructor(){super({id:Vke,label:v("autoFix.label","Auto Fix..."),alias:"Auto Fix...",precondition:Ee.and(W.writable,MA(gt.QuickFix)),kbOpts:{kbExpr:W.textInputFocus,primary:1625,mac:{primary:2649},weight:100}})}run(e,t){return jp(t,v("editor.action.autoFix.noneMessage","No auto fixes available"),{include:gt.QuickFix,onlyIncludePreferredActions:!0},"ifSingle",fs.AutoFix)}}fu(Um.ID,Um,3);fu(V3.ID,V3,4);be(mEt);be(fEt);be(pEt);be(DEt);be(vEt);be(xEt);ze(new gEt);jn.as(Ed.Configuration).registerConfiguration(Object.assign(Object.assign({},FP),{properties:{"editor.codeActionWidget.showHeaders":{type:"boolean",scope:5,description:v("showCodeActionHeaders","Enable/disable showing group headers in the Code Action menu."),default:!0}}}));jn.as(Ed.Configuration).registerConfiguration(Object.assign(Object.assign({},FP),{properties:{"editor.codeActionWidget.includeNearbyQuickfixes":{type:"boolean",scope:5,description:v("includeNearbyQuickfixes","Enable/disable showing nearest quickfix within a line when not currently on a diagnostic."),default:!1}}}));var xle=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};class IU{constructor(){this.lenses=[],this._disposables=new pe}dispose(){this._disposables.dispose()}get isDisposed(){return this._disposables.isDisposed}add(e,t){this._disposables.add(e);for(const n of e.lenses)this.lenses.push({symbol:n,provider:t})}}function eFe(u,e,t){return xle(this,void 0,void 0,function*(){const n=u.ordered(e),i=new Map,r=new IU,a=n.map((o,s)=>xle(this,void 0,void 0,function*(){i.set(o,s);try{const l=yield Promise.resolve(o.provideCodeLenses(e,t));l&&r.add(l,o)}catch(l){Mi(l)}}));return yield Promise.all(a),r.lenses=r.lenses.sort((o,s)=>o.symbol.range.startLineNumbers.symbol.range.startLineNumber?1:i.get(o.provider)i.get(s.provider)?1:o.symbol.range.startColumns.symbol.range.startColumn?1:0),r})}ru.registerCommand("_executeCodeLensProvider",function(u,...e){let[t,n]=e;Ru(dt.isUri(t)),Ru(typeof n=="number"||!n);const{codeLensProvider:i}=u.get(We),r=u.get(_n).getModel(t);if(!r)throw _0();const a=[],o=new pe;return eFe(i,r,Kt.None).then(s=>{o.add(s);const l=[];for(const c of s.lenses)n==null||c.symbol.command?a.push(c.symbol):n-- >0&&c.provider.resolveCodeLens&&l.push(Promise.resolve(c.provider.resolveCodeLens(r,c.symbol,Kt.None)).then(d=>a.push(d||c.symbol)));return Promise.all(l)}).then(()=>a).finally(()=>{setTimeout(()=>o.dispose(),100)})});var CEt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},bEt=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}};const tFe=Ut("ICodeLensCache");class vle{constructor(e,t){this.lineCount=e,this.data=t}}let OU=class{constructor(e){this._fakeProvider=new class{provideCodeLenses(){throw new Error("not supported")}},this._cache=new gg(20,.75);const t="codelens/cache";Ph(()=>e.remove(t,1));const n="codelens/cache2",i=e.get(n,1,"{}");this._deserialize(i),Ne.once(e.onWillSaveState)(r=>{r.reason===lw.SHUTDOWN&&e.store(n,this._serialize(),1,1)})}put(e,t){const n=t.lenses.map(a=>{var o;return{range:a.symbol.range,command:a.symbol.command&&{id:"",title:(o=a.symbol.command)===null||o===void 0?void 0:o.title}}}),i=new IU;i.add({lenses:n,dispose:()=>{}},this._fakeProvider);const r=new vle(e.getLineCount(),i);this._cache.set(e.uri.toString(),r)}get(e){const t=this._cache.get(e.uri.toString());return t&&t.lineCount===e.getLineCount()?t.data:void 0}delete(e){this._cache.delete(e.uri.toString())}_serialize(){const e=Object.create(null);for(const[t,n]of this._cache){const i=new Set;for(const r of n.data.lenses)i.add(r.symbol.range.startLineNumber);e[t]={lineCount:n.lineCount,lines:[...i.values()]}}return JSON.stringify(e)}_deserialize(e){try{const t=JSON.parse(e);for(const n in t){const i=t[n],r=[];for(const o of i.lines)r.push({range:new j(o,1,o,11)});const a=new IU;a.add({lenses:r,dispose(){}},this._fakeProvider),this._cache.set(n,new vle(i.lineCount,a))}}catch{}}};OU=CEt([bEt(0,Ul)],OU);au(tFe,OU,1);class kEt{constructor(e,t,n){this.afterColumn=1073741824,this.afterLineNumber=e,this.heightInPx=t,this._onHeight=n,this.suppressMouseDown=!0,this.domNode=document.createElement("div")}onComputedHeight(e){this._lastHeight===void 0?this._lastHeight=e:this._lastHeight!==e&&(this._lastHeight=e,this._onHeight())}isVisible(){return this._lastHeight!==0&&this.domNode.hasAttribute("monaco-visible-view-zone")}}class iR{constructor(e,t){this.allowEditorOverflow=!1,this.suppressMouseDown=!0,this._commands=new Map,this._isEmpty=!0,this._editor=e,this._id=`codelens.widget-${iR._idPool++}`,this.updatePosition(t),this._domNode=document.createElement("span"),this._domNode.className="codelens-decoration"}withCommands(e,t){this._commands.clear();const n=[];let i=!1;for(let r=0;r{l.symbol.command&&s.push(l.symbol),n.addDecoration({range:l.symbol.range,options:Cle},d=>this._decorationIds[c]=d),o?o=j.plusRange(o,l.symbol.range):o=j.lift(l.symbol.range)}),this._viewZone=new kEt(o.startLineNumber-1,r,a),this._viewZoneId=i.addZone(this._viewZone),s.length>0&&(this._createContentWidgetIfNecessary(),this._contentWidget.withCommands(s,!1))}_createContentWidgetIfNecessary(){this._contentWidget?this._editor.layoutContentWidget(this._contentWidget):(this._contentWidget=new iR(this._editor,this._viewZone.afterLineNumber+1),this._editor.addContentWidget(this._contentWidget))}dispose(e,t){this._decorationIds.forEach(e.removeDecoration,e),this._decorationIds=[],t==null||t.removeZone(this._viewZoneId),this._contentWidget&&(this._editor.removeContentWidget(this._contentWidget),this._contentWidget=void 0),this._isDisposed=!0}isDisposed(){return this._isDisposed}isValid(){return this._decorationIds.some((e,t)=>{const n=this._editor.getModel().getDecorationRange(e),i=this._data[t].symbol;return!!(n&&j.isEmpty(i.range)===n.isEmpty())})}updateCodeLensSymbols(e,t){this._decorationIds.forEach(t.removeDecoration,t),this._decorationIds=[],this._data=e,this._data.forEach((n,i)=>{t.addDecoration({range:n.symbol.range,options:Cle},r=>this._decorationIds[i]=r)})}updateHeight(e,t){this._viewZone.heightInPx=e,t.layoutZone(this._viewZoneId),this._contentWidget&&this._editor.layoutContentWidget(this._contentWidget)}computeIfNecessary(e){if(!this._viewZone.isVisible())return null;for(let t=0;t=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},CC=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},uFe=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};let vv=class{constructor(e,t,n,i,r,a){this._editor=e,this._languageFeaturesService=t,this._commandService=i,this._notificationService=r,this._codeLensCache=a,this._disposables=new pe,this._localToDispose=new pe,this._lenses=[],this._oldCodeLensModels=new pe,this._provideCodeLensDebounce=n.for(t.codeLensProvider,"CodeLensProvide",{min:250}),this._resolveCodeLensesDebounce=n.for(t.codeLensProvider,"CodeLensResolve",{min:250,salt:"resolve"}),this._resolveCodeLensesScheduler=new Hu(()=>this._resolveCodeLensesInViewport(),this._resolveCodeLensesDebounce.default()),this._disposables.add(this._editor.onDidChangeModel(()=>this._onModelChange())),this._disposables.add(this._editor.onDidChangeModelLanguage(()=>this._onModelChange())),this._disposables.add(this._editor.onDidChangeConfiguration(o=>{(o.hasChanged(50)||o.hasChanged(19)||o.hasChanged(18))&&this._updateLensStyle(),o.hasChanged(17)&&this._onModelChange()})),this._disposables.add(t.codeLensProvider.onDidChange(this._onModelChange,this)),this._onModelChange(),this._updateLensStyle()}dispose(){var e;this._localDispose(),this._disposables.dispose(),this._oldCodeLensModels.dispose(),(e=this._currentCodeLensModel)===null||e===void 0||e.dispose()}_getLayoutInfo(){const e=Math.max(1.3,this._editor.getOption(66)/this._editor.getOption(52));let t=this._editor.getOption(19);return(!t||t<5)&&(t=this._editor.getOption(52)*.9|0),{fontSize:t,codeLensHeight:t*e|0}}_updateLensStyle(){const{codeLensHeight:e,fontSize:t}=this._getLayoutInfo(),n=this._editor.getOption(18),i=this._editor.getOption(50),{style:r}=this._editor.getContainerDomNode();r.setProperty("--vscode-editorCodeLens-lineHeight",`${e}px`),r.setProperty("--vscode-editorCodeLens-fontSize",`${t}px`),r.setProperty("--vscode-editorCodeLens-fontFeatureSettings",i.fontFeatureSettings),n&&(r.setProperty("--vscode-editorCodeLens-fontFamily",n),r.setProperty("--vscode-editorCodeLens-fontFamilyDefault",ss.fontFamily)),this._editor.changeViewZones(a=>{for(const o of this._lenses)o.updateHeight(e,a)})}_localDispose(){var e,t,n;(e=this._getCodeLensModelPromise)===null||e===void 0||e.cancel(),this._getCodeLensModelPromise=void 0,(t=this._resolveCodeLensesPromise)===null||t===void 0||t.cancel(),this._resolveCodeLensesPromise=void 0,this._localToDispose.clear(),this._oldCodeLensModels.clear(),(n=this._currentCodeLensModel)===null||n===void 0||n.dispose()}_onModelChange(){this._localDispose();const e=this._editor.getModel();if(!e||!this._editor.getOption(17)||e.isTooLargeForTokenization())return;const t=this._codeLensCache.get(e);if(t&&this._renderCodeLensSymbols(t),!this._languageFeaturesService.codeLensProvider.has(e)){t&&this._localToDispose.add(Rm(()=>{const i=this._codeLensCache.get(e);t===i&&(this._codeLensCache.delete(e),this._onModelChange())},30*1e3));return}for(const i of this._languageFeaturesService.codeLensProvider.all(e))if(typeof i.onDidChange=="function"){const r=i.onDidChange(()=>n.schedule());this._localToDispose.add(r)}const n=new Hu(()=>{var i;const r=Date.now();(i=this._getCodeLensModelPromise)===null||i===void 0||i.cancel(),this._getCodeLensModelPromise=Ui(a=>eFe(this._languageFeaturesService.codeLensProvider,e,a)),this._getCodeLensModelPromise.then(a=>{this._currentCodeLensModel&&this._oldCodeLensModels.add(this._currentCodeLensModel),this._currentCodeLensModel=a,this._codeLensCache.put(e,a);const o=this._provideCodeLensDebounce.update(e,Date.now()-r);n.delay=o,this._renderCodeLensSymbols(a),this._resolveCodeLensesInViewportSoon()},zt)},this._provideCodeLensDebounce.get(e));this._localToDispose.add(n),this._localToDispose.add(ft(()=>this._resolveCodeLensesScheduler.cancel())),this._localToDispose.add(this._editor.onDidChangeModelContent(()=>{var i;this._editor.changeDecorations(r=>{this._editor.changeViewZones(a=>{const o=[];let s=-1;this._lenses.forEach(c=>{!c.isValid()||s===c.getLineNumber()?o.push(c):(c.update(a),s=c.getLineNumber())});const l=new kH;o.forEach(c=>{c.dispose(l,a),this._lenses.splice(this._lenses.indexOf(c),1)}),l.commit(r)})}),n.schedule(),this._resolveCodeLensesScheduler.cancel(),(i=this._resolveCodeLensesPromise)===null||i===void 0||i.cancel(),this._resolveCodeLensesPromise=void 0})),this._localToDispose.add(this._editor.onDidFocusEditorWidget(()=>{n.schedule()})),this._localToDispose.add(this._editor.onDidBlurEditorText(()=>{n.cancel()})),this._localToDispose.add(this._editor.onDidScrollChange(i=>{i.scrollTopChanged&&this._lenses.length>0&&this._resolveCodeLensesInViewportSoon()})),this._localToDispose.add(this._editor.onDidLayoutChange(()=>{this._resolveCodeLensesInViewportSoon()})),this._localToDispose.add(ft(()=>{if(this._editor.getModel()){const i=td.capture(this._editor);this._editor.changeDecorations(r=>{this._editor.changeViewZones(a=>{this._disposeAllLenses(r,a)})}),i.restore(this._editor)}else this._disposeAllLenses(void 0,void 0)})),this._localToDispose.add(this._editor.onMouseDown(i=>{if(i.target.type!==9)return;let r=i.target.element;if((r==null?void 0:r.tagName)==="SPAN"&&(r=r.parentElement),(r==null?void 0:r.tagName)==="A")for(const a of this._lenses){const o=a.getCommand(r);if(o){this._commandService.executeCommand(o.id,...o.arguments||[]).catch(s=>this._notificationService.error(s));break}}})),n.schedule()}_disposeAllLenses(e,t){const n=new kH;for(const i of this._lenses)i.dispose(n,t);e&&n.commit(e),this._lenses.length=0}_renderCodeLensSymbols(e){if(!this._editor.hasModel())return;const t=this._editor.getModel().getLineCount(),n=[];let i;for(const o of e.lenses){const s=o.symbol.range.startLineNumber;s<1||s>t||(i&&i[i.length-1].symbol.range.startLineNumber===s?i.push(o):(i=[o],n.push(i)))}if(!n.length&&!this._lenses.length)return;const r=td.capture(this._editor),a=this._getLayoutInfo();this._editor.changeDecorations(o=>{this._editor.changeViewZones(s=>{const l=new kH;let c=0,d=0;for(;dthis._resolveCodeLensesInViewportSoon())),c++,d++)}for(;cthis._resolveCodeLensesInViewportSoon())),d++;l.commit(o)})}),r.restore(this._editor)}_resolveCodeLensesInViewportSoon(){this._editor.getModel()&&this._resolveCodeLensesScheduler.schedule()}_resolveCodeLensesInViewport(){var e;(e=this._resolveCodeLensesPromise)===null||e===void 0||e.cancel(),this._resolveCodeLensesPromise=void 0;const t=this._editor.getModel();if(!t)return;const n=[],i=[];if(this._lenses.forEach(o=>{const s=o.computeIfNecessary(t);s&&(n.push(s),i.push(o))}),n.length===0)return;const r=Date.now(),a=Ui(o=>{const s=n.map((l,c)=>{const d=new Array(l.length),h=l.map((E,m)=>!E.symbol.command&&typeof E.provider.resolveCodeLens=="function"?Promise.resolve(E.provider.resolveCodeLens(t,E.symbol,o)).then(g=>{d[m]=g},Mi):(d[m]=E.symbol,Promise.resolve(void 0)));return Promise.all(h).then(()=>{!o.isCancellationRequested&&!i[c].isDisposed()&&i[c].updateCommands(d)})});return Promise.all(s)});this._resolveCodeLensesPromise=a,this._resolveCodeLensesPromise.then(()=>{const o=this._resolveCodeLensesDebounce.update(t,Date.now()-r);this._resolveCodeLensesScheduler.delay=o,this._currentCodeLensModel&&this._codeLensCache.put(t,this._currentCodeLensModel),this._oldCodeLensModels.clear(),a===this._resolveCodeLensesPromise&&(this._resolveCodeLensesPromise=void 0)},o=>{zt(o),a===this._resolveCodeLensesPromise&&(this._resolveCodeLensesPromise=void 0)})}getModel(){var e;return uFe(this,void 0,void 0,function*(){return yield this._getCodeLensModelPromise,yield this._resolveCodeLensesPromise,!((e=this._currentCodeLensModel)===null||e===void 0)&&e.isDisposed?void 0:this._currentCodeLensModel})}};vv.ID="css.editor.codeLens";vv=FEt([CC(1,We),CC(2,q0),CC(3,ni),CC(4,bi),CC(5,tFe)],vv);fu(vv.ID,vv,1);be(class extends $e{constructor(){super({id:"codelens.showLensesInCurrentLine",precondition:W.hasCodeLensProvider,label:v("showLensOnLine","Show CodeLens Commands For Current Line"),alias:"Show CodeLens Commands For Current Line"})}run(e,t){return uFe(this,void 0,void 0,function*(){if(!t.hasModel())return;const n=e.get(md),i=e.get(ni),r=e.get(bi),a=t.getSelection().positionLineNumber,o=t.getContribution(vv.ID);if(!o)return;const s=yield o.getModel();if(!s)return;const l=[];for(const h of s.lenses)h.symbol.command&&h.symbol.range.startLineNumber===a&&l.push({label:h.symbol.command.title,command:h.symbol.command});if(l.length===0)return;const c=yield n.pick(l,{canPickMany:!1,placeHolder:v("placeHolder","Select a command")});if(!c)return;let d=c.command;if(s.isDisposed){const h=yield o.getModel(),E=h==null?void 0:h.lenses.find(m=>{var g;return m.symbol.range.startLineNumber===a&&((g=m.symbol.command)===null||g===void 0?void 0:g.title)===d.title});if(!E||!E.symbol.command)return;d=E.symbol.command}try{yield i.executeCommand(d.id,...d.arguments||[])}catch(h){r.error(h)}})}});var yEt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},FH=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},AEt=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};class ute{constructor(e,t){this._editorWorkerClient=new lX(e,!1,"editorWorkerService",t)}provideDocumentColors(e,t){return AEt(this,void 0,void 0,function*(){return this._editorWorkerClient.computeDefaultDocumentColors(e.uri)})}provideColorPresentations(e,t,n){const i=t.range,r=t.color,a=r.alpha,o=new ae(new nu(Math.round(255*r.red),Math.round(255*r.green),Math.round(255*r.blue),a)),s=a?ae.Format.CSS.formatRGB(o):ae.Format.CSS.formatRGBA(o),l=a?ae.Format.CSS.formatHSL(o):ae.Format.CSS.formatHSLA(o),c=a?ae.Format.CSS.formatHex(o):ae.Format.CSS.formatHexA(o),d=[];return d.push({label:s,textEdit:{range:i,text:s}}),d.push({label:l,textEdit:{range:i,text:l}}),d.push({label:c,textEdit:{range:i,text:c}}),d}}let jU=class extends ne{constructor(e,t,n){super(),this._register(n.colorProvider.register("*",new ute(e,t)))}};jU=yEt([FH(0,_n),FH(1,tn),FH(2,We)],jU);KP(jU);var TA=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};function nFe(u,e,t,n=!0){return TA(this,void 0,void 0,function*(){return nte(new _Et,u,e,t,n)})}function iFe(u,e,t,n){return Promise.resolve(t.provideColorPresentations(u,e,n))}class _Et{constructor(){}compute(e,t,n,i){return TA(this,void 0,void 0,function*(){const r=yield e.provideDocumentColors(t,n);if(Array.isArray(r))for(const a of r)i.push({colorInfo:a,provider:e});return Array.isArray(r)})}}class SEt{constructor(){}compute(e,t,n,i){return TA(this,void 0,void 0,function*(){const r=yield e.provideDocumentColors(t,n);if(Array.isArray(r))for(const a of r)i.push({range:a.range,color:[a.color.red,a.color.green,a.color.blue,a.color.alpha]});return Array.isArray(r)})}}class BEt{constructor(e){this.colorInfo=e}compute(e,t,n,i){return TA(this,void 0,void 0,function*(){const r=yield e.provideColorPresentations(t,this.colorInfo,Kt.None);return Array.isArray(r)&&i.push(...r),Array.isArray(r)})}}function nte(u,e,t,n,i){return TA(this,void 0,void 0,function*(){let r=!1,a;const o=[],s=e.ordered(t);for(let l=s.length-1;l>=0;l--){const c=s[l];if(c instanceof ute)a=c;else try{(yield u.compute(c,t,n,o))&&(r=!0)}catch(d){Mi(d)}}return r?o:a&&i?(yield u.compute(a,t,n,o),o):[]})}function rFe(u,e){const{colorProvider:t}=u.get(We),n=u.get(_n).getModel(e);if(!n)throw _0();const i=u.get(tu).getValue("editor.defaultColorDecorators",{resource:e});return{model:n,colorProviderRegistry:t,isDefaultColorDecoratorsEnabled:i}}ru.registerCommand("_executeDocumentColorProvider",function(u,...e){const[t]=e;if(!(t instanceof dt))throw _0();const{model:n,colorProviderRegistry:i,isDefaultColorDecoratorsEnabled:r}=rFe(u,t);return nte(new SEt,i,n,Kt.None,r)});ru.registerCommand("_executeColorPresentationProvider",function(u,...e){const[t,n]=e,{uri:i,range:r}=n;if(!(i instanceof dt)||!Array.isArray(t)||t.length!==4||!j.isIRange(r))throw _0();const{model:a,colorProviderRegistry:o,isDefaultColorDecoratorsEnabled:s}=rFe(u,i),[l,c,d,h]=t;return nte(new BEt({range:r,color:{red:l,green:c,blue:d,alpha:h}}),o,a,Kt.None,s)});var wEt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},yH=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},kle=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})},HU;const aFe=Object.create({});let qm=HU=class extends ne{constructor(e,t,n,i){super(),this._editor=e,this._configurationService=t,this._languageFeaturesService=n,this._localToDispose=this._register(new pe),this._decorationsIds=[],this._colorDatas=new Map,this._colorDecoratorIds=this._editor.createDecorationsCollection(),this._ruleFactory=new cA(this._editor),this._decoratorLimitReporter=new LEt,this._colorDecorationClassRefs=this._register(new pe),this._debounceInformation=i.for(n.colorProvider,"Document Colors",{min:HU.RECOMPUTE_TIME}),this._register(e.onDidChangeModel(()=>{this._isColorDecoratorsEnabled=this.isEnabled(),this.updateColors()})),this._register(e.onDidChangeModelLanguage(()=>this.updateColors())),this._register(n.colorProvider.onDidChange(()=>this.updateColors())),this._register(e.onDidChangeConfiguration(r=>{const a=this._isColorDecoratorsEnabled;this._isColorDecoratorsEnabled=this.isEnabled(),this._isDefaultColorDecoratorsEnabled=this._editor.getOption(145);const o=a!==this._isColorDecoratorsEnabled||r.hasChanged(21),s=r.hasChanged(145);(o||s)&&(this._isColorDecoratorsEnabled?this.updateColors():this.removeAllDecorations())})),this._timeoutTimer=null,this._computePromise=null,this._isColorDecoratorsEnabled=this.isEnabled(),this._isDefaultColorDecoratorsEnabled=this._editor.getOption(145),this.updateColors()}isEnabled(){const e=this._editor.getModel();if(!e)return!1;const t=e.getLanguageId(),n=this._configurationService.getValue(t);if(n&&typeof n=="object"){const i=n.colorDecorators;if(i&&i.enable!==void 0&&!i.enable)return i.enable}return this._editor.getOption(20)}static get(e){return e.getContribution(this.ID)}dispose(){this.stop(),this.removeAllDecorations(),super.dispose()}updateColors(){if(this.stop(),!this._isColorDecoratorsEnabled)return;const e=this._editor.getModel();!e||!this._languageFeaturesService.colorProvider.has(e)||(this._localToDispose.add(this._editor.onDidChangeModelContent(()=>{this._timeoutTimer||(this._timeoutTimer=new Vl,this._timeoutTimer.cancelAndSet(()=>{this._timeoutTimer=null,this.beginCompute()},this._debounceInformation.get(e)))})),this.beginCompute())}beginCompute(){return kle(this,void 0,void 0,function*(){this._computePromise=Ui(e=>kle(this,void 0,void 0,function*(){const t=this._editor.getModel();if(!t)return[];const n=new va(!1),i=yield nFe(this._languageFeaturesService.colorProvider,t,e,this._isDefaultColorDecoratorsEnabled);return this._debounceInformation.update(t,n.elapsed()),i}));try{const e=yield this._computePromise;this.updateDecorations(e),this.updateColorDecorators(e),this._computePromise=null}catch(e){zt(e)}})}stop(){this._timeoutTimer&&(this._timeoutTimer.cancel(),this._timeoutTimer=null),this._computePromise&&(this._computePromise.cancel(),this._computePromise=null),this._localToDispose.clear()}updateDecorations(e){const t=e.map(n=>({range:{startLineNumber:n.colorInfo.range.startLineNumber,startColumn:n.colorInfo.range.startColumn,endLineNumber:n.colorInfo.range.endLineNumber,endColumn:n.colorInfo.range.endColumn},options:Lt.EMPTY}));this._editor.changeDecorations(n=>{this._decorationsIds=n.deltaDecorations(this._decorationsIds,t),this._colorDatas=new Map,this._decorationsIds.forEach((i,r)=>this._colorDatas.set(i,e[r]))})}updateColorDecorators(e){this._colorDecorationClassRefs.clear();const t=[],n=this._editor.getOption(21);for(let r=0;rthis._colorDatas.has(i.id));return n.length===0?null:this._colorDatas.get(n[0].id)}isColorDecoration(e){return this._colorDecoratorIds.has(e)}};qm.ID="editor.contrib.colorDetector";qm.RECOMPUTE_TIME=1e3;qm=HU=wEt([yH(1,tu),yH(2,We),yH(3,q0)],qm);class LEt{constructor(){this._onDidChange=new Q,this._computed=0,this._limited=!1}update(e,t){(e!==this._computed||t!==this._limited)&&(this._computed=e,this._limited=t,this._onDidChange.fire())}}fu(qm.ID,qm,1);class zEt{get color(){return this._color}set color(e){this._color.equals(e)||(this._color=e,this._onDidChangeColor.fire(e))}get presentation(){return this.colorPresentations[this.presentationIndex]}get colorPresentations(){return this._colorPresentations}set colorPresentations(e){this._colorPresentations=e,this.presentationIndex>e.length-1&&(this.presentationIndex=0),this._onDidChangePresentation.fire(this.presentation)}constructor(e,t,n){this.presentationIndex=n,this._onColorFlushed=new Q,this.onColorFlushed=this._onColorFlushed.event,this._onDidChangeColor=new Q,this.onDidChangeColor=this._onDidChangeColor.event,this._onDidChangePresentation=new Q,this.onDidChangePresentation=this._onDidChangePresentation.event,this.originalColor=e,this._color=e,this._colorPresentations=t}selectNextColorPresentation(){this.presentationIndex=(this.presentationIndex+1)%this.colorPresentations.length,this.flushColor(),this._onDidChangePresentation.fire(this.presentation)}guessColorPresentation(e,t){let n=-1;for(let i=0;i{this.backgroundColor=a.getColor(TB)||ae.white})),this._register(ce(this._pickedColorNode,Me.CLICK,()=>this.model.selectNextColorPresentation())),this._register(ce(this._originalColorNode,Me.CLICK,()=>{this.model.color=this.model.originalColor,this.model.flushColor()})),this._register(t.onDidChangeColor(this.onDidChangeColor,this)),this._register(t.onDidChangePresentation(this.onDidChangePresentation,this)),this._pickedColorNode.style.backgroundColor=ae.Format.CSS.format(t.color)||"",this._pickedColorNode.classList.toggle("light",t.color.rgba.a<.5?this.backgroundColor.isLighter():t.color.isLighter()),this.onDidChangeColor(this.model.color),this.showingStandaloneColorPicker&&(this._domNode.classList.add("standalone-colorpicker"),this._closeButton=this._register(new TEt(this._domNode)))}get closeButton(){return this._closeButton}get pickedColorNode(){return this._pickedColorNode}get originalColorNode(){return this._originalColorNode}onDidChangeColor(e){this._pickedColorNode.style.backgroundColor=ae.Format.CSS.format(e)||"",this._pickedColorNode.classList.toggle("light",e.rgba.a<.5?this.backgroundColor.isLighter():e.isLighter()),this.onDidChangePresentation()}onDidChangePresentation(){this._pickedColorPresentation.textContent=this.model.presentation?this.model.presentation.label:""}}let TEt=class extends ne{constructor(e){super(),this._onClicked=this._register(new Q),this.onClicked=this._onClicked.event,this._button=document.createElement("div"),this._button.classList.add("close-button"),me(e,this._button);const t=document.createElement("div");t.classList.add("close-button-inner-div"),me(this._button,t),me(t,Rs(".button"+st.asCSSSelector(hi("color-picker-close",we.close,v("closeIcon","Icon to close the color picker"))))).classList.add("close-icon"),this._button.onclick=()=>{this._onClicked.fire()}}};class NEt extends ne{constructor(e,t,n,i=!1){super(),this.model=t,this.pixelRatio=n,this._insertButton=null,this._domNode=Rs(".colorpicker-body"),me(e,this._domNode),this._saturationBox=new PEt(this._domNode,this.model,this.pixelRatio),this._register(this._saturationBox),this._register(this._saturationBox.onDidChange(this.onDidSaturationValueChange,this)),this._register(this._saturationBox.onColorFlushed(this.flushColor,this)),this._opacityStrip=new REt(this._domNode,this.model,i),this._register(this._opacityStrip),this._register(this._opacityStrip.onDidChange(this.onDidOpacityChange,this)),this._register(this._opacityStrip.onColorFlushed(this.flushColor,this)),this._hueStrip=new IEt(this._domNode,this.model,i),this._register(this._hueStrip),this._register(this._hueStrip.onDidChange(this.onDidHueChange,this)),this._register(this._hueStrip.onColorFlushed(this.flushColor,this)),i&&(this._insertButton=this._register(new OEt(this._domNode)),this._domNode.classList.add("standalone-colorpicker"))}flushColor(){this.model.flushColor()}onDidSaturationValueChange({s:e,v:t}){const n=this.model.color.hsva;this.model.color=new ae(new e1(n.h,e,t,n.a))}onDidOpacityChange(e){const t=this.model.color.hsva;this.model.color=new ae(new e1(t.h,t.s,t.v,e))}onDidHueChange(e){const t=this.model.color.hsva,n=(1-e)*360;this.model.color=new ae(new e1(n===360?0:n,t.s,t.v,t.a))}get domNode(){return this._domNode}get saturationBox(){return this._saturationBox}get enterButton(){return this._insertButton}layout(){this._saturationBox.layout(),this._opacityStrip.layout(),this._hueStrip.layout()}}class PEt extends ne{constructor(e,t,n){super(),this.model=t,this.pixelRatio=n,this._onDidChange=new Q,this.onDidChange=this._onDidChange.event,this._onColorFlushed=new Q,this.onColorFlushed=this._onColorFlushed.event,this._domNode=Rs(".saturation-wrap"),me(e,this._domNode),this._canvas=document.createElement("canvas"),this._canvas.className="saturation-box",me(this._domNode,this._canvas),this.selection=Rs(".saturation-selection"),me(this._domNode,this.selection),this.layout(),this._register(ce(this._domNode,Me.POINTER_DOWN,i=>this.onPointerDown(i))),this._register(this.model.onDidChangeColor(this.onDidChangeColor,this)),this.monitor=null}get domNode(){return this._domNode}onPointerDown(e){if(!e.target||!(e.target instanceof Element))return;this.monitor=this._register(new m6);const t=ji(this._domNode);e.target!==this.selection&&this.onDidChangePosition(e.offsetX,e.offsetY),this.monitor.startMonitoring(e.target,e.pointerId,e.buttons,i=>this.onDidChangePosition(i.pageX-t.left,i.pageY-t.top),()=>null);const n=ce(e.target.ownerDocument,Me.POINTER_UP,()=>{this._onColorFlushed.fire(),n.dispose(),this.monitor&&(this.monitor.stopMonitoring(!0),this.monitor=null)},!0)}onDidChangePosition(e,t){const n=Math.max(0,Math.min(1,e/this.width)),i=Math.max(0,Math.min(1,1-t/this.height));this.paintSelection(n,i),this._onDidChange.fire({s:n,v:i})}layout(){this.width=this._domNode.offsetWidth,this.height=this._domNode.offsetHeight,this._canvas.width=this.width*this.pixelRatio,this._canvas.height=this.height*this.pixelRatio,this.paint();const e=this.model.color.hsva;this.paintSelection(e.s,e.v)}paint(){const e=this.model.color.hsva,t=new ae(new e1(e.h,1,1,1)),n=this._canvas.getContext("2d"),i=n.createLinearGradient(0,0,this._canvas.width,0);i.addColorStop(0,"rgba(255, 255, 255, 1)"),i.addColorStop(.5,"rgba(255, 255, 255, 0.5)"),i.addColorStop(1,"rgba(255, 255, 255, 0)");const r=n.createLinearGradient(0,0,0,this._canvas.height);r.addColorStop(0,"rgba(0, 0, 0, 0)"),r.addColorStop(1,"rgba(0, 0, 0, 1)"),n.rect(0,0,this._canvas.width,this._canvas.height),n.fillStyle=ae.Format.CSS.format(t),n.fill(),n.fillStyle=i,n.fill(),n.fillStyle=r,n.fill()}paintSelection(e,t){this.selection.style.left=`${e*this.width}px`,this.selection.style.top=`${this.height-t*this.height}px`}onDidChangeColor(e){if(this.monitor&&this.monitor.isMonitoring())return;this.paint();const t=e.hsva;this.paintSelection(t.s,t.v)}}class oFe extends ne{constructor(e,t,n=!1){super(),this.model=t,this._onDidChange=new Q,this.onDidChange=this._onDidChange.event,this._onColorFlushed=new Q,this.onColorFlushed=this._onColorFlushed.event,n?(this.domNode=me(e,Rs(".standalone-strip")),this.overlay=me(this.domNode,Rs(".standalone-overlay"))):(this.domNode=me(e,Rs(".strip")),this.overlay=me(this.domNode,Rs(".overlay"))),this.slider=me(this.domNode,Rs(".slider")),this.slider.style.top="0px",this._register(ce(this.domNode,Me.POINTER_DOWN,i=>this.onPointerDown(i))),this._register(t.onDidChangeColor(this.onDidChangeColor,this)),this.layout()}layout(){this.height=this.domNode.offsetHeight-this.slider.offsetHeight;const e=this.getValue(this.model.color);this.updateSliderPosition(e)}onDidChangeColor(e){const t=this.getValue(e);this.updateSliderPosition(t)}onPointerDown(e){if(!e.target||!(e.target instanceof Element))return;const t=this._register(new m6),n=ji(this.domNode);this.domNode.classList.add("grabbing"),e.target!==this.slider&&this.onDidChangeTop(e.offsetY),t.startMonitoring(e.target,e.pointerId,e.buttons,r=>this.onDidChangeTop(r.pageY-n.top),()=>null);const i=ce(e.target.ownerDocument,Me.POINTER_UP,()=>{this._onColorFlushed.fire(),i.dispose(),t.stopMonitoring(!0),this.domNode.classList.remove("grabbing")},!0)}onDidChangeTop(e){const t=Math.max(0,Math.min(1,1-e/this.height));this.updateSliderPosition(t),this._onDidChange.fire(t)}updateSliderPosition(e){this.slider.style.top=`${(1-e)*this.height}px`}}class REt extends oFe{constructor(e,t,n=!1){super(e,t,n),this.domNode.classList.add("opacity-strip"),this.onDidChangeColor(this.model.color)}onDidChangeColor(e){super.onDidChangeColor(e);const{r:t,g:n,b:i}=e.rgba,r=new ae(new nu(t,n,i,1)),a=new ae(new nu(t,n,i,0));this.overlay.style.background=`linear-gradient(to bottom, ${r} 0%, ${a} 100%)`}getValue(e){return e.hsva.a}}class IEt extends oFe{constructor(e,t,n=!1){super(e,t,n),this.domNode.classList.add("hue-strip")}getValue(e){return 1-e.hsva.h/360}}class OEt extends ne{constructor(e){super(),this._onClicked=this._register(new Q),this.onClicked=this._onClicked.event,this._button=me(e,document.createElement("button")),this._button.classList.add("insert-button"),this._button.textContent="Insert",this._button.onclick=t=>{this._onClicked.fire()}}get button(){return this._button}}class jEt extends $l{constructor(e,t,n,i,r=!1){super(),this.model=t,this.pixelRatio=n,this._register(sk.onDidChange(()=>this.layout()));const a=Rs(".colorpicker-widget");e.appendChild(a),this.header=this._register(new MEt(a,this.model,i,r)),this.body=this._register(new NEt(a,this.model,this.pixelRatio,r))}layout(){this.body.layout()}}var sFe=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},lFe=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},Cv=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};class HEt{constructor(e,t,n,i){this.owner=e,this.range=t,this.model=n,this.provider=i,this.forceShowAtRange=!0}isValidForHoverAnchor(e){return e.type===1&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}}let Iw=class{constructor(e,t){this._editor=e,this._themeService=t,this.hoverOrdinal=2}computeSync(e,t){return[]}computeAsync(e,t,n){return _i.fromPromise(this._computeAsync(e,t,n))}_computeAsync(e,t,n){return Cv(this,void 0,void 0,function*(){if(!this._editor.hasModel())return[];const i=qm.get(this._editor);if(!i)return[];for(const r of t){if(!i.isColorDecoration(r))continue;const a=i.getColorData(r.range.getStartPosition());if(a)return[yield cFe(this,this._editor.getModel(),a.colorInfo,a.provider)]}return[]})}renderHoverParts(e,t){return dFe(this,this._editor,this._themeService,t,e)}};Iw=sFe([lFe(1,sr)],Iw);class VEt{constructor(e,t,n,i){this.owner=e,this.range=t,this.model=n,this.provider=i}}let aF=class{constructor(e,t){this._editor=e,this._themeService=t,this._color=null}createColorHover(e,t,n){return Cv(this,void 0,void 0,function*(){if(!this._editor.hasModel()||!qm.get(this._editor))return null;const r=yield nFe(n,this._editor.getModel(),Kt.None);let a=null,o=null;for(const d of r){const h=d.colorInfo;j.containsRange(h.range,e.range)&&(a=h,o=d.provider)}const s=a??e,l=o??t,c=!!a;return{colorHover:yield cFe(this,this._editor.getModel(),s,l),foundInEditor:c}})}updateEditorModel(e){return Cv(this,void 0,void 0,function*(){if(!this._editor.hasModel())return;const t=e.model;let n=new j(e.range.startLineNumber,e.range.startColumn,e.range.endLineNumber,e.range.endColumn);this._color&&(yield E8(this._editor.getModel(),t,this._color,n,e),n=hFe(this._editor,n,t))})}renderHoverParts(e,t){return dFe(this,this._editor,this._themeService,t,e)}set color(e){this._color=e}get color(){return this._color}};aF=sFe([lFe(1,sr)],aF);function cFe(u,e,t,n){return Cv(this,void 0,void 0,function*(){const i=e.getValueInRange(t.range),{red:r,green:a,blue:o,alpha:s}=t.color,l=new nu(Math.round(r*255),Math.round(a*255),Math.round(o*255),s),c=new ae(l),d=yield iFe(e,t,n,Kt.None),h=new zEt(c,[],0);return h.colorPresentations=d||[],h.guessColorPresentation(c,i),u instanceof Iw?new HEt(u,j.lift(t.range),h,n):new VEt(u,j.lift(t.range),h,n)})}function dFe(u,e,t,n,i){if(n.length===0||!e.hasModel())return ne.None;if(i.setMinimumDimensions){const h=e.getOption(66)+8;i.setMinimumDimensions(new pu(302,h))}const r=new pe,a=n[0],o=e.getModel(),s=a.model,l=r.add(new jEt(i.fragment,s,e.getOption(141),t,u instanceof aF));i.setColorPicker(l);let c=!1,d=new j(a.range.startLineNumber,a.range.startColumn,a.range.endLineNumber,a.range.endColumn);if(u instanceof aF){const h=n[0].model.color;u.color=h,E8(o,s,h,d,a),r.add(s.onColorFlushed(E=>{u.color=E}))}else r.add(s.onColorFlushed(h=>Cv(this,void 0,void 0,function*(){yield E8(o,s,h,d,a),c=!0,d=hFe(e,d,s,i)})));return r.add(s.onDidChangeColor(h=>{E8(o,s,h,d,a)})),r.add(e.onDidChangeModelContent(h=>{c?c=!1:(i.hide(),e.focus())})),r}function hFe(u,e,t,n){let i,r;if(t.presentation.textEdit){i=[t.presentation.textEdit],r=new j(t.presentation.textEdit.range.startLineNumber,t.presentation.textEdit.range.startColumn,t.presentation.textEdit.range.endLineNumber,t.presentation.textEdit.range.endColumn);const a=u.getModel()._setTrackedRange(null,r,3);u.pushUndoStop(),u.executeEdits("colorpicker",i),r=u.getModel()._getTrackedRange(a)||r}else i=[{range:e,text:t.presentation.label,forceMoveMarkers:!1}],r=e.setEndPosition(e.endLineNumber,e.startColumn+t.presentation.label.length),u.pushUndoStop(),u.executeEdits("colorpicker",i);return t.presentation.additionalTextEdits&&(i=[...t.presentation.additionalTextEdits],u.executeEdits("colorpicker",i),n&&n.hide()),u.pushUndoStop(),r}function E8(u,e,t,n,i){return Cv(this,void 0,void 0,function*(){const r=yield iFe(u,{range:n,color:{red:t.rgba.r/255,green:t.rgba.g/255,blue:t.rgba.b/255,alpha:t.rgba.a}},i.provider,Kt.None);e.colorPresentations=r||[]})}function VU(u,e){return!!u[e]}class AH{constructor(e,t){this.target=e.target,this.isLeftClick=e.event.leftButton,this.isMiddleClick=e.event.middleButton,this.isRightClick=e.event.rightButton,this.hasTriggerModifier=VU(e.event,t.triggerModifier),this.hasSideBySideModifier=VU(e.event,t.triggerSideBySideModifier),this.isNoneOrSingleMouseDown=e.event.detail<=1}}class Fle{constructor(e,t){this.keyCodeIsTriggerKey=e.keyCode===t.triggerKey,this.keyCodeIsSideBySideKey=e.keyCode===t.triggerSideBySideKey,this.hasTriggerModifier=VU(e,t.triggerModifier)}}class M9{constructor(e,t,n,i){this.triggerKey=e,this.triggerModifier=t,this.triggerSideBySideKey=n,this.triggerSideBySideModifier=i}equals(e){return this.triggerKey===e.triggerKey&&this.triggerModifier===e.triggerModifier&&this.triggerSideBySideKey===e.triggerSideBySideKey&&this.triggerSideBySideModifier===e.triggerSideBySideModifier}}function yle(u){return u==="altKey"?iu?new M9(57,"metaKey",6,"altKey"):new M9(5,"ctrlKey",6,"altKey"):iu?new M9(6,"altKey",57,"metaKey"):new M9(6,"altKey",5,"ctrlKey")}class rR extends ne{constructor(e,t){var n;super(),this._onMouseMoveOrRelevantKeyDown=this._register(new Q),this.onMouseMoveOrRelevantKeyDown=this._onMouseMoveOrRelevantKeyDown.event,this._onExecute=this._register(new Q),this.onExecute=this._onExecute.event,this._onCancel=this._register(new Q),this.onCancel=this._onCancel.event,this._editor=e,this._extractLineNumberFromMouseEvent=(n=t==null?void 0:t.extractLineNumberFromMouseEvent)!==null&&n!==void 0?n:i=>i.target.position?i.target.position.lineNumber:0,this._opts=yle(this._editor.getOption(77)),this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._lineNumberOnMouseDown=0,this._register(this._editor.onDidChangeConfiguration(i=>{if(i.hasChanged(77)){const r=yle(this._editor.getOption(77));if(this._opts.equals(r))return;this._opts=r,this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._lineNumberOnMouseDown=0,this._onCancel.fire()}})),this._register(this._editor.onMouseMove(i=>this._onEditorMouseMove(new AH(i,this._opts)))),this._register(this._editor.onMouseDown(i=>this._onEditorMouseDown(new AH(i,this._opts)))),this._register(this._editor.onMouseUp(i=>this._onEditorMouseUp(new AH(i,this._opts)))),this._register(this._editor.onKeyDown(i=>this._onEditorKeyDown(new Fle(i,this._opts)))),this._register(this._editor.onKeyUp(i=>this._onEditorKeyUp(new Fle(i,this._opts)))),this._register(this._editor.onMouseDrag(()=>this._resetHandler())),this._register(this._editor.onDidChangeCursorSelection(i=>this._onDidChangeCursorSelection(i))),this._register(this._editor.onDidChangeModel(i=>this._resetHandler())),this._register(this._editor.onDidChangeModelContent(()=>this._resetHandler())),this._register(this._editor.onDidScrollChange(i=>{(i.scrollTopChanged||i.scrollLeftChanged)&&this._resetHandler()}))}_onDidChangeCursorSelection(e){e.selection&&e.selection.startColumn!==e.selection.endColumn&&this._resetHandler()}_onEditorMouseMove(e){this._lastMouseMoveEvent=e,this._onMouseMoveOrRelevantKeyDown.fire([e,null])}_onEditorMouseDown(e){this._hasTriggerKeyOnMouseDown=e.hasTriggerModifier,this._lineNumberOnMouseDown=this._extractLineNumberFromMouseEvent(e)}_onEditorMouseUp(e){const t=this._extractLineNumberFromMouseEvent(e);this._hasTriggerKeyOnMouseDown&&this._lineNumberOnMouseDown&&this._lineNumberOnMouseDown===t&&this._onExecute.fire(e)}_onEditorKeyDown(e){this._lastMouseMoveEvent&&(e.keyCodeIsTriggerKey||e.keyCodeIsSideBySideKey&&e.hasTriggerModifier)?this._onMouseMoveOrRelevantKeyDown.fire([this._lastMouseMoveEvent,e]):e.hasTriggerModifier&&this._onCancel.fire()}_onEditorKeyUp(e){e.keyCodeIsTriggerKey&&this._onCancel.fire()}_resetHandler(){this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._onCancel.fire()}}var $Et=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},oh=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}};let Jm=class extends lv{constructor(e,t,n,i,r,a,o,s,l,c,d,h,E){super(e,Object.assign(Object.assign({},i.getRawOptions()),{overflowWidgetsDomNode:i.getOverflowWidgetsDomNode()}),n,r,a,o,s,l,c,d,h,E),this._parentEditor=i,this._overwriteOptions=t,super.updateOptions(this._overwriteOptions),this._register(i.onDidChangeConfiguration(m=>this._onParentConfigurationChanged(m)))}getParentEditor(){return this._parentEditor}_onParentConfigurationChanged(e){super.updateOptions(this._parentEditor.getRawOptions()),super.updateOptions(this._overwriteOptions)}updateOptions(e){NN(this._overwriteOptions,e,!0),super.updateOptions(this._overwriteOptions)}};Jm=$Et([oh(4,mt),oh(5,Cu),oh(6,ni),oh(7,pt),oh(8,sr),oh(9,bi),oh(10,k4),oh(11,tn),oh(12,We)],Jm);const Ale=new ae(new nu(0,122,204)),KEt={showArrow:!0,showFrame:!0,className:"",frameColor:Ale,arrowColor:Ale,keepEditorSelection:!1},WEt="vs.editor.contrib.zoneWidget";class GEt{constructor(e,t,n,i,r,a,o,s){this.id="",this.domNode=e,this.afterLineNumber=t,this.afterColumn=n,this.heightInLines=i,this.showInHiddenAreas=o,this.ordinal=s,this._onDomNodeTop=r,this._onComputedHeight=a}onDomNodeTop(e){this._onDomNodeTop(e)}onComputedHeight(e){this._onComputedHeight(e)}}class UEt{constructor(e,t){this._id=e,this._domNode=t}getId(){return this._id}getDomNode(){return this._domNode}getPosition(){return null}}class aR{constructor(e){this._editor=e,this._ruleName=aR._IdGenerator.nextId(),this._decorations=this._editor.createDecorationsCollection(),this._color=null,this._height=-1}dispose(){this.hide(),Dae(this._ruleName)}set color(e){this._color!==e&&(this._color=e,this._updateStyle())}set height(e){this._height!==e&&(this._height=e,this._updateStyle())}_updateStyle(){Dae(this._ruleName),EW(`.monaco-editor ${this._ruleName}`,`border-style: solid; border-color: transparent; border-bottom-color: ${this._color}; border-width: ${this._height}px; bottom: -${this._height}px; margin-left: -${this._height}px; `)}show(e){e.column===1&&(e={lineNumber:e.lineNumber,column:2}),this._decorations.set([{range:j.fromPositions(e),options:{description:"zone-widget-arrow",className:this._ruleName,stickiness:1}}])}hide(){this._decorations.clear()}}aR._IdGenerator=new lee(".arrow-decoration-");class qEt{constructor(e,t={}){this._arrow=null,this._overlayWidget=null,this._resizeSash=null,this._viewZone=null,this._disposables=new pe,this.container=null,this._isShowing=!1,this.editor=e,this._positionMarkerId=this.editor.createDecorationsCollection(),this.options=xh(t),NN(this.options,KEt,!1),this.domNode=document.createElement("div"),this.options.isAccessible||(this.domNode.setAttribute("aria-hidden","true"),this.domNode.setAttribute("role","presentation")),this._disposables.add(this.editor.onDidLayoutChange(n=>{const i=this._getWidth(n);this.domNode.style.width=i+"px",this.domNode.style.left=this._getLeft(n)+"px",this._onWidth(i)}))}dispose(){this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),this._viewZone&&this.editor.changeViewZones(e=>{this._viewZone&&e.removeZone(this._viewZone.id),this._viewZone=null}),this._positionMarkerId.clear(),this._disposables.dispose()}create(){this.domNode.classList.add("zone-widget"),this.options.className&&this.domNode.classList.add(this.options.className),this.container=document.createElement("div"),this.container.classList.add("zone-widget-container"),this.domNode.appendChild(this.container),this.options.showArrow&&(this._arrow=new aR(this.editor),this._disposables.add(this._arrow)),this._fillContainer(this.container),this._initSash(),this._applyStyles()}style(e){e.frameColor&&(this.options.frameColor=e.frameColor),e.arrowColor&&(this.options.arrowColor=e.arrowColor),this._applyStyles()}_applyStyles(){if(this.container&&this.options.frameColor){const e=this.options.frameColor.toString();this.container.style.borderTopColor=e,this.container.style.borderBottomColor=e}if(this._arrow&&this.options.arrowColor){const e=this.options.arrowColor.toString();this._arrow.color=e}}_getWidth(e){return e.width-e.minimap.minimapWidth-e.verticalScrollbarWidth}_getLeft(e){return e.minimap.minimapWidth>0&&e.minimap.minimapLeft===0?e.minimap.minimapWidth:0}_onViewZoneTop(e){this.domNode.style.top=e+"px"}_onViewZoneHeight(e){var t;if(this.domNode.style.height=`${e}px`,this.container){const n=e-this._decoratingElementsHeight();this.container.style.height=`${n}px`;const i=this.editor.getLayoutInfo();this._doLayout(n,this._getWidth(i))}(t=this._resizeSash)===null||t===void 0||t.layout()}get position(){const e=this._positionMarkerId.getRange(0);if(e)return e.getStartPosition()}show(e,t){const n=j.isIRange(e)?j.lift(e):j.fromPositions(e);this._isShowing=!0,this._showImpl(n,t),this._isShowing=!1,this._positionMarkerId.set([{range:n,options:Lt.EMPTY}])}hide(){var e;this._viewZone&&(this.editor.changeViewZones(t=>{this._viewZone&&t.removeZone(this._viewZone.id)}),this._viewZone=null),this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),(e=this._arrow)===null||e===void 0||e.hide(),this._positionMarkerId.clear()}_decoratingElementsHeight(){const e=this.editor.getOption(66);let t=0;if(this.options.showArrow){const n=Math.round(e/3);t+=2*n}if(this.options.showFrame){const n=Math.round(e/9);t+=2*n}return t}_showImpl(e,t){const n=e.getStartPosition(),i=this.editor.getLayoutInfo(),r=this._getWidth(i);this.domNode.style.width=`${r}px`,this.domNode.style.left=this._getLeft(i)+"px";const a=document.createElement("div");a.style.overflow="hidden";const o=this.editor.getOption(66);if(!this.options.allowUnlimitedHeight){const h=Math.max(12,this.editor.getLayoutInfo().height/o*.8);t=Math.min(t,h)}let s=0,l=0;if(this._arrow&&this.options.showArrow&&(s=Math.round(o/3),this._arrow.height=s,this._arrow.show(n)),this.options.showFrame&&(l=Math.round(o/9)),this.editor.changeViewZones(h=>{this._viewZone&&h.removeZone(this._viewZone.id),this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),this.domNode.style.top="-1000px",this._viewZone=new GEt(a,n.lineNumber,n.column,t,E=>this._onViewZoneTop(E),E=>this._onViewZoneHeight(E),this.options.showInHiddenAreas,this.options.ordinal),this._viewZone.id=h.addZone(this._viewZone),this._overlayWidget=new UEt(WEt+this._viewZone.id,this.domNode),this.editor.addOverlayWidget(this._overlayWidget)}),this.container&&this.options.showFrame){const h=this.options.frameWidth?this.options.frameWidth:l;this.container.style.borderTopWidth=h+"px",this.container.style.borderBottomWidth=h+"px"}const c=t*o-this._decoratingElementsHeight();this.container&&(this.container.style.top=s+"px",this.container.style.height=c+"px",this.container.style.overflow="hidden"),this._doLayout(c,r),this.options.keepEditorSelection||this.editor.setSelection(e);const d=this.editor.getModel();if(d){const h=d.validateRange(new j(e.startLineNumber,1,e.endLineNumber+1,1));this.revealRange(h,h.startLineNumber===d.getLineCount())}}revealRange(e,t){t?this.editor.revealLineNearTop(e.endLineNumber,0):this.editor.revealRange(e,0)}setCssClass(e,t){this.container&&(t&&this.container.classList.remove(t),this.container.classList.add(e))}_onWidth(e){}_doLayout(e,t){}_relayout(e){this._viewZone&&this._viewZone.heightInLines!==e&&this.editor.changeViewZones(t=>{this._viewZone&&(this._viewZone.heightInLines=e,t.layoutZone(this._viewZone.id))})}_initSash(){if(this._resizeSash)return;this._resizeSash=this._disposables.add(new oa(this.domNode,this,{orientation:1})),this.options.isResizeable||(this._resizeSash.state=0);let e;this._disposables.add(this._resizeSash.onDidStart(t=>{this._viewZone&&(e={startY:t.startY,heightInLines:this._viewZone.heightInLines})})),this._disposables.add(this._resizeSash.onDidEnd(()=>{e=void 0})),this._disposables.add(this._resizeSash.onDidChange(t=>{if(e){const n=(t.currentY-e.startY)/this.editor.getOption(66),i=n<0?Math.ceil(n):Math.floor(n),r=e.heightInLines+i;r>5&&r<35&&this._relayout(r)}}))}getHorizontalSashLeft(){return 0}getHorizontalSashTop(){return(this.domNode.style.height===null?0:parseInt(this.domNode.style.height))-this._decoratingElementsHeight()/2}getHorizontalSashWidth(){const e=this.editor.getLayoutInfo();return e.width-e.minimap.minimapWidth}}var EFe=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},mFe=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}};const gFe=Ut("IPeekViewService");au(gFe,class{constructor(){this._widgets=new Map}addExclusiveWidget(u,e){const t=this._widgets.get(u);t&&(t.listener.dispose(),t.widget.dispose());const n=()=>{const i=this._widgets.get(u);i&&i.widget===e&&(i.listener.dispose(),this._widgets.delete(u))};this._widgets.set(u,{widget:e,listener:e.onDidClose(n)})}},1);var Ro;(function(u){u.inPeekEditor=new Pe("inReferenceSearchEditor",!0,v("inReferenceSearchEditor","Whether the current code editor is embedded inside peek")),u.notInPeekEditor=u.inPeekEditor.toNegated()})(Ro||(Ro={}));let oF=class{constructor(e,t){e instanceof Jm&&Ro.inPeekEditor.bindTo(t)}dispose(){}};oF.ID="editor.contrib.referenceController";oF=EFe([mFe(1,pt)],oF);fu(oF.ID,oF,0);function JEt(u){const e=u.get(Cu).getFocusedCodeEditor();return e instanceof Jm?e.getParentEditor():e}const ZEt={headerBackgroundColor:ae.white,primaryHeadingColor:ae.fromHex("#333333"),secondaryHeadingColor:ae.fromHex("#6c6c6cb3")};let Ow=class extends qEt{constructor(e,t,n){super(e,t),this.instantiationService=n,this._onDidClose=new Q,this.onDidClose=this._onDidClose.event,NN(this.options,ZEt,!1)}dispose(){this.disposed||(this.disposed=!0,super.dispose(),this._onDidClose.fire(this))}style(e){const t=this.options;e.headerBackgroundColor&&(t.headerBackgroundColor=e.headerBackgroundColor),e.primaryHeadingColor&&(t.primaryHeadingColor=e.primaryHeadingColor),e.secondaryHeadingColor&&(t.secondaryHeadingColor=e.secondaryHeadingColor),super.style(e)}_applyStyles(){super._applyStyles();const e=this.options;this._headElement&&e.headerBackgroundColor&&(this._headElement.style.backgroundColor=e.headerBackgroundColor.toString()),this._primaryHeading&&e.primaryHeadingColor&&(this._primaryHeading.style.color=e.primaryHeadingColor.toString()),this._secondaryHeading&&e.secondaryHeadingColor&&(this._secondaryHeading.style.color=e.secondaryHeadingColor.toString()),this._bodyElement&&e.frameColor&&(this._bodyElement.style.borderColor=e.frameColor.toString())}_fillContainer(e){this.setCssClass("peekview-widget"),this._headElement=ve(".head"),this._bodyElement=ve(".body"),this._fillHead(this._headElement),this._fillBody(this._bodyElement),e.appendChild(this._headElement),e.appendChild(this._bodyElement)}_fillHead(e,t){this._titleElement=ve(".peekview-title"),this.options.supportOnTitleClick&&(this._titleElement.classList.add("clickable"),xi(this._titleElement,"click",r=>this._onTitleClick(r))),me(this._headElement,this._titleElement),this._fillTitleIcon(this._titleElement),this._primaryHeading=ve("span.filename"),this._secondaryHeading=ve("span.dirname"),this._metaHeading=ve("span.meta"),me(this._titleElement,this._primaryHeading,this._secondaryHeading,this._metaHeading);const n=ve(".peekview-actions");me(this._headElement,n);const i=this._getActionBarOptions();this._actionbarWidget=new j0(n,i),this._disposables.add(this._actionbarWidget),t||this._actionbarWidget.push(new ro("peekview.close",v("label.close","Close"),st.asClassName(we.close),!0,()=>(this.dispose(),Promise.resolve())),{label:!1,icon:!0})}_fillTitleIcon(e){}_getActionBarOptions(){return{actionViewItemProvider:l0t.bind(void 0,this.instantiationService),orientation:0}}_onTitleClick(e){}setTitle(e,t){this._primaryHeading&&this._secondaryHeading&&(this._primaryHeading.innerText=e,this._primaryHeading.setAttribute("title",e),t?this._secondaryHeading.innerText=t:Nr(this._secondaryHeading))}setMetaTitle(e){this._metaHeading&&(e?(this._metaHeading.innerText=e,ns(this._metaHeading)):Ya(this._metaHeading))}_doLayout(e,t){if(!this._isShowing&&e<0){this.dispose();return}const n=Math.ceil(this.editor.getOption(66)*1.2),i=Math.round(e-(n+2));this._doLayoutHead(n,t),this._doLayoutBody(i,t)}_doLayoutHead(e,t){this._headElement&&(this._headElement.style.height=`${e}px`,this._headElement.style.lineHeight=this._headElement.style.height)}_doLayoutBody(e,t){this._bodyElement&&(this._bodyElement.style.height=`${e}px`)}};Ow=EFe([mFe(2,mt)],Ow);const YEt=q("peekViewTitle.background",{dark:"#252526",light:"#F3F3F3",hcDark:ae.black,hcLight:ae.white},v("peekViewTitleBackground","Background color of the peek view title area.")),fFe=q("peekViewTitleLabel.foreground",{dark:ae.white,light:ae.black,hcDark:ae.white,hcLight:ml},v("peekViewTitleForeground","Color of the peek view title.")),pFe=q("peekViewTitleDescription.foreground",{dark:"#ccccccb3",light:"#616161",hcDark:"#FFFFFF99",hcLight:"#292929"},v("peekViewTitleInfoForeground","Color of the peek view title info.")),QEt=q("peekView.border",{dark:Mo,light:Mo,hcDark:eu,hcLight:eu},v("peekViewBorder","Color of the peek view borders and arrow.")),XEt=q("peekViewResult.background",{dark:"#252526",light:"#F3F3F3",hcDark:ae.black,hcLight:ae.white},v("peekViewResultsBackground","Background color of the peek view result list."));q("peekViewResult.lineForeground",{dark:"#bbbbbb",light:"#646465",hcDark:ae.white,hcLight:ml},v("peekViewResultsMatchForeground","Foreground color for line nodes in the peek view result list."));q("peekViewResult.fileForeground",{dark:ae.white,light:"#1E1E1E",hcDark:ae.white,hcLight:ml},v("peekViewResultsFileForeground","Foreground color for file nodes in the peek view result list."));q("peekViewResult.selectionBackground",{dark:"#3399ff33",light:"#3399ff33",hcDark:null,hcLight:null},v("peekViewResultsSelectionBackground","Background color of the selected entry in the peek view result list."));q("peekViewResult.selectionForeground",{dark:ae.white,light:"#6C6C6C",hcDark:ae.white,hcLight:ml},v("peekViewResultsSelectionForeground","Foreground color of the selected entry in the peek view result list."));const RE=q("peekViewEditor.background",{dark:"#001F33",light:"#F2F8FC",hcDark:ae.black,hcLight:ae.white},v("peekViewEditorBackground","Background color of the peek view editor."));q("peekViewEditorGutter.background",{dark:RE,light:RE,hcDark:RE,hcLight:RE},v("peekViewEditorGutterBackground","Background color of the gutter in the peek view editor."));q("peekViewEditorStickyScroll.background",{dark:RE,light:RE,hcDark:RE,hcLight:RE},v("peekViewEditorStickScrollBackground","Background color of sticky scroll in the peek view editor."));q("peekViewResult.matchHighlightBackground",{dark:"#ea5c004d",light:"#ea5c004d",hcDark:null,hcLight:null},v("peekViewResultsMatchHighlight","Match highlight color in the peek view result list."));q("peekViewEditor.matchHighlightBackground",{dark:"#ff8f0099",light:"#f5d802de",hcDark:null,hcLight:null},v("peekViewEditorMatchHighlight","Match highlight color in the peek view editor."));q("peekViewEditor.matchHighlightBorder",{dark:null,light:null,hcDark:En,hcLight:En},v("peekViewEditorMatchHighlightBorder","Match highlight border in the peek view editor."));var emt=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};class Zm{constructor(e,t,n,i){this.isProviderFirst=e,this.parent=t,this.link=n,this._rangeCallback=i,this.id=yG.nextId()}get uri(){return this.link.uri}get range(){var e,t;return(t=(e=this._range)!==null&&e!==void 0?e:this.link.targetSelectionRange)!==null&&t!==void 0?t:this.link.range}set range(e){this._range=e,this._rangeCallback(this)}get ariaMessage(){var e;const t=(e=this.parent.getPreview(this))===null||e===void 0?void 0:e.preview(this.range);return t?v({key:"aria.oneReference.preview",comment:["Placeholders are: 0: filename, 1:line number, 2: column number, 3: preview snippet of source code"]},"{0} in {1} on line {2} at column {3}",t.value,O0(this.uri),this.range.startLineNumber,this.range.startColumn):v("aria.oneReference","in {0} on line {1} at column {2}",O0(this.uri),this.range.startLineNumber,this.range.startColumn)}}class tmt{constructor(e){this._modelReference=e}dispose(){this._modelReference.dispose()}preview(e,t=8){const n=this._modelReference.object.textEditorModel;if(!n)return;const{startLineNumber:i,startColumn:r,endLineNumber:a,endColumn:o}=e,s=n.getWordUntilPosition({lineNumber:i,column:r-t}),l=new j(i,s.startColumn,i,r),c=new j(a,o,a,1073741824),d=n.getValueInRange(l).replace(/^\s+/,""),h=n.getValueInRange(e),E=n.getValueInRange(c).replace(/\s+$/,"");return{value:d+h+E,highlight:{start:d.length,end:d.length+h.length}}}}class sF{constructor(e,t){this.parent=e,this.uri=t,this.children=[],this._previews=new ma}dispose(){Su(this._previews.values()),this._previews.clear()}getPreview(e){return this._previews.get(e.uri)}get ariaMessage(){const e=this.children.length;return e===1?v("aria.fileReferences.1","1 symbol in {0}, full path {1}",O0(this.uri),this.uri.fsPath):v("aria.fileReferences.N","{0} symbols in {1}, full path {2}",e,O0(this.uri),this.uri.fsPath)}resolve(e){return emt(this,void 0,void 0,function*(){if(this._previews.size!==0)return this;for(const t of this.children)if(!this._previews.has(t.uri))try{const n=yield e.createModelReference(t.uri);this._previews.set(t.uri,new tmt(n))}catch(n){zt(n)}return this})}}class ds{constructor(e,t){this.groups=[],this.references=[],this._onDidChangeReferenceRange=new Q,this.onDidChangeReferenceRange=this._onDidChangeReferenceRange.event,this._links=e,this._title=t;const[n]=e;e.sort(ds._compareReferences);let i;for(const r of e)if((!i||!mn.isEqual(i.uri,r.uri,!0))&&(i=new sF(this,r.uri),this.groups.push(i)),i.children.length===0||ds._compareReferences(r,i.children[i.children.length-1])!==0){const a=new Zm(n===r,i,r,o=>this._onDidChangeReferenceRange.fire(o));this.references.push(a),i.children.push(a)}}dispose(){Su(this.groups),this._onDidChangeReferenceRange.dispose(),this.groups.length=0}clone(){return new ds(this._links,this._title)}get title(){return this._title}get isEmpty(){return this.groups.length===0}get ariaMessage(){return this.isEmpty?v("aria.result.0","No results found"):this.references.length===1?v("aria.result.1","Found 1 symbol in {0}",this.references[0].uri.fsPath):this.groups.length===1?v("aria.result.n1","Found {0} symbols in {1}",this.references.length,this.groups[0].uri.fsPath):v("aria.result.nm","Found {0} symbols in {1} files",this.references.length,this.groups.length)}nextOrPreviousReference(e,t){const{parent:n}=e;let i=n.children.indexOf(e);const r=n.children.length,a=n.parent.groups.length;return a===1||t&&i+10?(t?i=(i+1)%r:i=(i+r-1)%r,n.children[i]):(i=n.parent.groups.indexOf(n),t?(i=(i+1)%a,n.parent.groups[i].children[0]):(i=(i+a-1)%a,n.parent.groups[i].children[n.parent.groups[i].children.length-1]))}nearestReference(e,t){const n=this.references.map((i,r)=>({idx:r,prefixLen:A3(i.uri.toString(),e.toString()),offsetDist:Math.abs(i.range.startLineNumber-t.lineNumber)*100+Math.abs(i.range.startColumn-t.column)})).sort((i,r)=>i.prefixLen>r.prefixLen?-1:i.prefixLenr.offsetDist?1:0)[0];if(n)return this.references[n.idx]}referenceAt(e,t){for(const n of this.references)if(n.uri.toString()===e.toString()&&j.containsPosition(n.range,t))return n}firstReference(){for(const e of this.references)if(e.isProviderFirst)return e;return this.references[0]}static _compareReferences(e,t){return mn.compare(e.uri,t.uri)||j.compareRangesUsingStarts(e.range,t.range)}}var oR=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},sR=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},$U;let KU=class{constructor(e){this._resolverService=e}hasChildren(e){return e instanceof ds||e instanceof sF}getChildren(e){if(e instanceof ds)return e.groups;if(e instanceof sF)return e.resolve(this._resolverService).then(t=>t.children);throw new Error("bad tree")}};KU=oR([sR(0,Vo)],KU);class umt{getHeight(){return 23}getTemplateId(e){return e instanceof sF?lF.id:NA.id}}let WU=class{constructor(e){this._keybindingService=e}getKeyboardNavigationLabel(e){var t;if(e instanceof Zm){const n=(t=e.parent.getPreview(e))===null||t===void 0?void 0:t.preview(e.range);if(n)return n.value}return O0(e.uri)}};WU=oR([sR(0,qu)],WU);class nmt{getId(e){return e instanceof Zm?e.id:e.uri}}let GU=class extends ne{constructor(e,t){super(),this._labelService=t;const n=document.createElement("div");n.classList.add("reference-file"),this.file=this._register(new kw(n,{supportHighlights:!0})),this.badge=new JG(me(n,ve(".count")),{},$be),e.appendChild(n)}set(e,t){const n=xP(e.uri);this.file.setLabel(this._labelService.getUriBasenameLabel(e.uri),this._labelService.getUriLabel(n,{relative:!0}),{title:this._labelService.getUriLabel(e.uri),matches:t});const i=e.children.length;this.badge.setCount(i),i>1?this.badge.setTitleFormat(v("referencesCount","{0} references",i)):this.badge.setTitleFormat(v("referenceCount","{0} reference",i))}};GU=oR([sR(1,cv)],GU);let lF=$U=class{constructor(e){this._instantiationService=e,this.templateId=$U.id}renderTemplate(e){return this._instantiationService.createInstance(GU,e)}renderElement(e,t,n){n.set(e.element,vA(e.filterData))}disposeTemplate(e){e.dispose()}};lF.id="FileReferencesRenderer";lF=$U=oR([sR(0,mt)],lF);class imt{constructor(e){this.label=new am(e)}set(e,t){var n;const i=(n=e.parent.getPreview(e))===null||n===void 0?void 0:n.preview(e.range);if(!i||!i.value)this.label.set(`${O0(e.uri)}:${e.range.startLineNumber+1}:${e.range.startColumn+1}`);else{const{value:r,highlight:a}=i;t&&!Kc.isDefault(t)?(this.label.element.classList.toggle("referenceMatch",!1),this.label.set(r,vA(t))):(this.label.element.classList.toggle("referenceMatch",!0),this.label.set(r,[a]))}}}class NA{constructor(){this.templateId=NA.id}renderTemplate(e){return new imt(e)}renderElement(e,t,n){n.set(e.element,e.filterData)}disposeTemplate(){}}NA.id="OneReferenceRenderer";class rmt{getWidgetAriaLabel(){return v("treeAriaLabel","References")}getAriaLabel(e){return e.ariaMessage}}var amt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},sh=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},_le=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};class lR{constructor(e,t){this._editor=e,this._model=t,this._decorations=new Map,this._decorationIgnoreSet=new Set,this._callOnDispose=new pe,this._callOnModelChange=new pe,this._callOnDispose.add(this._editor.onDidChangeModel(()=>this._onModelChanged())),this._onModelChanged()}dispose(){this._callOnModelChange.dispose(),this._callOnDispose.dispose(),this.removeDecorations()}_onModelChanged(){this._callOnModelChange.clear();const e=this._editor.getModel();if(e){for(const t of this._model.references)if(t.uri.toString()===e.uri.toString()){this._addDecorations(t.parent);return}}}_addDecorations(e){if(!this._editor.hasModel())return;this._callOnModelChange.add(this._editor.getModel().onDidChangeDecorations(()=>this._onDecorationChanged()));const t=[],n=[];for(let i=0,r=e.children.length;i{const r=i.deltaDecorations([],t);for(let a=0;a{r.equals(9)&&(this._keybindingService.dispatchEvent(r,r.target),r.stopPropagation())},!0)),this._tree=this._instantiationService.createInstance(smt,"ReferencesWidget",this._treeContainer,new umt,[this._instantiationService.createInstance(lF),this._instantiationService.createInstance(NA)],this._instantiationService.createInstance(KU),n),this._splitView.addView({onDidChange:Ne.None,element:this._previewContainer,minimumSize:200,maximumSize:Number.MAX_VALUE,layout:r=>{this._preview.layout({height:this._dim.height,width:r})}},xw.Distribute),this._splitView.addView({onDidChange:Ne.None,element:this._treeContainer,minimumSize:100,maximumSize:Number.MAX_VALUE,layout:r=>{this._treeContainer.style.height=`${this._dim.height}px`,this._treeContainer.style.width=`${r}px`,this._tree.layout(this._dim.height,r)}},xw.Distribute),this._disposables.add(this._splitView.onDidSashChange(()=>{this._dim.width&&(this.layoutData.ratio=this._splitView.getViewSize(0)/this._dim.width)},void 0));const i=(r,a)=>{r instanceof Zm&&(a==="show"&&this._revealReference(r,!1),this._onDidSelectReference.fire({element:r,kind:a,source:"tree"}))};this._tree.onDidOpen(r=>{r.sideBySide?i(r.element,"side"):r.editorOptions.pinned?i(r.element,"goto"):i(r.element,"show")}),Ya(this._treeContainer)}_onWidth(e){this._dim&&this._doLayoutBody(this._dim.height,e)}_doLayoutBody(e,t){super._doLayoutBody(e,t),this._dim=new pu(t,e),this.layoutData.heightInLines=this._viewZone?this._viewZone.heightInLines:this.layoutData.heightInLines,this._splitView.layout(t),this._splitView.resizeView(0,t*this.layoutData.ratio)}setSelection(e){return this._revealReference(e,!0).then(()=>{this._model&&(this._tree.setSelection([e]),this._tree.setFocus([e]))})}setModel(e){return this._disposeOnNewModel.clear(),this._model=e,this._model?this._onNewModel():Promise.resolve()}_onNewModel(){return this._model?this._model.isEmpty?(this.setTitle(""),this._messageContainer.innerText=v("noResults","No results"),ns(this._messageContainer),Promise.resolve(void 0)):(Ya(this._messageContainer),this._decorationsManager=new lR(this._preview,this._model),this._disposeOnNewModel.add(this._decorationsManager),this._disposeOnNewModel.add(this._model.onDidChangeReferenceRange(e=>this._tree.rerender(e))),this._disposeOnNewModel.add(this._preview.onMouseDown(e=>{const{event:t,target:n}=e;if(t.detail!==2)return;const i=this._getFocusedReference();i&&this._onDidSelectReference.fire({element:{uri:i.uri,range:n.range},kind:t.ctrlKey||t.metaKey||t.altKey?"side":"open",source:"editor"})})),this.container.classList.add("results-loaded"),ns(this._treeContainer),ns(this._previewContainer),this._splitView.layout(this._dim.width),this.focusOnReferenceTree(),this._tree.setInput(this._model.groups.length===1?this._model.groups[0]:this._model)):Promise.resolve(void 0)}_getFocusedReference(){const[e]=this._tree.getFocus();if(e instanceof Zm)return e;if(e instanceof sF&&e.children.length>0)return e.children[0]}revealReference(e){return _le(this,void 0,void 0,function*(){yield this._revealReference(e,!1),this._onDidSelectReference.fire({element:e,kind:"goto",source:"tree"})})}_revealReference(e,t){return _le(this,void 0,void 0,function*(){if(this._revealedReference===e)return;this._revealedReference=e,e.uri.scheme!==Ot.inMemory?this.setTitle(Ynt(e.uri),this._uriLabel.getUriLabel(xP(e.uri))):this.setTitle(v("peekView.alternateTitle","References"));const n=this._textModelResolverService.createModelReference(e.uri);this._tree.getInput()===e.parent?this._tree.reveal(e):(t&&this._tree.reveal(e.parent),yield this._tree.expand(e.parent),this._tree.reveal(e));const i=yield n;if(!this._model){i.dispose();return}Su(this._previewModelReference);const r=i.object;if(r){const a=this._preview.getModel()===r.textEditorModel?0:1,o=j.lift(e.range).collapseToStart();this._previewModelReference=i,this._preview.setModel(r.textEditorModel),this._preview.setSelection(o),this._preview.revealRangeInCenter(o,a)}else this._preview.setModel(this._previewNotAvailableMessage),i.dispose()})}};UU=amt([sh(3,sr),sh(4,Vo),sh(5,mt),sh(6,gFe),sh(7,cv),sh(8,vP),sh(9,qu),sh(10,vn),sh(11,tn)],UU);var lmt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},xD=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},Sle=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})},m8;const Hp=new Pe("referenceSearchVisible",!1,v("referenceSearchVisible","Whether reference peek is visible, like 'Peek References' or 'Peek Definition'"));let Ym=m8=class{static get(e){return e.getContribution(m8.ID)}constructor(e,t,n,i,r,a,o,s){this._defaultTreeKeyboardSupport=e,this._editor=t,this._editorService=i,this._notificationService=r,this._instantiationService=a,this._storageService=o,this._configurationService=s,this._disposables=new pe,this._requestIdPool=0,this._ignoreModelChangeEvent=!1,this._referenceSearchVisible=Hp.bindTo(n)}dispose(){var e,t;this._referenceSearchVisible.reset(),this._disposables.dispose(),(e=this._widget)===null||e===void 0||e.dispose(),(t=this._model)===null||t===void 0||t.dispose(),this._widget=void 0,this._model=void 0}toggleWidget(e,t,n){let i;if(this._widget&&(i=this._widget.position),this.closeWidget(),i&&e.containsPosition(i))return;this._peekMode=n,this._referenceSearchVisible.set(!0),this._disposables.add(this._editor.onDidChangeModelLanguage(()=>{this.closeWidget()})),this._disposables.add(this._editor.onDidChangeModel(()=>{this._ignoreModelChangeEvent||this.closeWidget()}));const r="peekViewLayout",a=omt.fromJSON(this._storageService.get(r,0,"{}"));this._widget=this._instantiationService.createInstance(UU,this._editor,this._defaultTreeKeyboardSupport,a),this._widget.setTitle(v("labelLoading","Loading...")),this._widget.show(e),this._disposables.add(this._widget.onDidClose(()=>{t.cancel(),this._widget&&(this._storageService.store(r,JSON.stringify(this._widget.layoutData),0,1),this._widget=void 0),this.closeWidget()})),this._disposables.add(this._widget.onDidSelectReference(s=>{const{element:l,kind:c}=s;if(l)switch(c){case"open":(s.source!=="editor"||!this._configurationService.getValue("editor.stablePeek"))&&this.openReference(l,!1,!1);break;case"side":this.openReference(l,!0,!1);break;case"goto":n?this._gotoReference(l,!0):this.openReference(l,!1,!0);break}}));const o=++this._requestIdPool;t.then(s=>{var l;if(o!==this._requestIdPool||!this._widget){s.dispose();return}return(l=this._model)===null||l===void 0||l.dispose(),this._model=s,this._widget.setModel(this._model).then(()=>{if(this._widget&&this._model&&this._editor.hasModel()){this._model.isEmpty?this._widget.setMetaTitle(""):this._widget.setMetaTitle(v("metaTitle.N","{0} ({1})",this._model.title,this._model.references.length));const c=this._editor.getModel().uri,d=new ee(e.startLineNumber,e.startColumn),h=this._model.nearestReference(c,d);if(h)return this._widget.setSelection(h).then(()=>{this._widget&&this._editor.getOption(86)==="editor"&&this._widget.focusOnPreviewEditor()})}})},s=>{this._notificationService.error(s)})}changeFocusBetweenPreviewAndReferences(){this._widget&&(this._widget.isPreviewEditorFocused()?this._widget.focusOnReferenceTree():this._widget.focusOnPreviewEditor())}goToNextOrPreviousReference(e){return Sle(this,void 0,void 0,function*(){if(!this._editor.hasModel()||!this._model||!this._widget)return;const t=this._widget.position;if(!t)return;const n=this._model.nearestReference(this._editor.getModel().uri,t);if(!n)return;const i=this._model.nextOrPreviousReference(n,e),r=this._editor.hasTextFocus(),a=this._widget.isPreviewEditorFocused();yield this._widget.setSelection(i),yield this._gotoReference(i,!1),r?this._editor.focus():this._widget&&a&&this._widget.focusOnPreviewEditor()})}revealReference(e){return Sle(this,void 0,void 0,function*(){!this._editor.hasModel()||!this._model||!this._widget||(yield this._widget.revealReference(e))})}closeWidget(e=!0){var t,n;(t=this._widget)===null||t===void 0||t.dispose(),(n=this._model)===null||n===void 0||n.dispose(),this._referenceSearchVisible.reset(),this._disposables.clear(),this._widget=void 0,this._model=void 0,e&&this._editor.focus(),this._requestIdPool+=1}_gotoReference(e,t){var n;(n=this._widget)===null||n===void 0||n.hide(),this._ignoreModelChangeEvent=!0;const i=j.lift(e.range).collapseToStart();return this._editorService.openCodeEditor({resource:e.uri,options:{selection:i,selectionSource:"code.jump",pinned:t}},this._editor).then(r=>{var a;if(this._ignoreModelChangeEvent=!1,!r||!this._widget){this.closeWidget();return}if(this._editor===r)this._widget.show(i),this._widget.focusOnReferenceTree();else{const o=m8.get(r),s=this._model.clone();this.closeWidget(),r.focus(),o==null||o.toggleWidget(i,Ui(l=>Promise.resolve(s)),(a=this._peekMode)!==null&&a!==void 0?a:!1)}},r=>{this._ignoreModelChangeEvent=!1,zt(r)})}openReference(e,t,n){t||this.closeWidget();const{uri:i,range:r}=e;this._editorService.openCodeEditor({resource:i,options:{selection:r,selectionSource:"code.jump",pinned:n}},this._editor,t)}};Ym.ID="editor.contrib.referencesController";Ym=m8=lmt([xD(2,pt),xD(3,Cu),xD(4,bi),xD(5,mt),xD(6,Ul),xD(7,tu)],Ym);function Vp(u,e){const t=JEt(u);if(!t)return;const n=Ym.get(t);n&&e(n)}Po.registerCommandAndKeybindingRule({id:"togglePeekWidgetFocus",weight:100,primary:Vi(2089,60),when:Ee.or(Hp,Ro.inPeekEditor),handler(u){Vp(u,e=>{e.changeFocusBetweenPreviewAndReferences()})}});Po.registerCommandAndKeybindingRule({id:"goToNextReference",weight:100-10,primary:62,secondary:[70],when:Ee.or(Hp,Ro.inPeekEditor),handler(u){Vp(u,e=>{e.goToNextOrPreviousReference(!0)})}});Po.registerCommandAndKeybindingRule({id:"goToPreviousReference",weight:100-10,primary:1086,secondary:[1094],when:Ee.or(Hp,Ro.inPeekEditor),handler(u){Vp(u,e=>{e.goToNextOrPreviousReference(!1)})}});ru.registerCommandAlias("goToNextReferenceFromEmbeddedEditor","goToNextReference");ru.registerCommandAlias("goToPreviousReferenceFromEmbeddedEditor","goToPreviousReference");ru.registerCommandAlias("closeReferenceSearchEditor","closeReferenceSearch");ru.registerCommand("closeReferenceSearch",u=>Vp(u,e=>e.closeWidget()));Po.registerKeybindingRule({id:"closeReferenceSearch",weight:100-101,primary:9,secondary:[1033],when:Ee.and(Ro.inPeekEditor,Ee.not("config.editor.stablePeek"))});Po.registerKeybindingRule({id:"closeReferenceSearch",weight:200+50,primary:9,secondary:[1033],when:Ee.and(Hp,Ee.not("config.editor.stablePeek"))});Po.registerCommandAndKeybindingRule({id:"revealReference",weight:200,primary:3,mac:{primary:3,secondary:[2066]},when:Ee.and(Hp,d2e,yee.negate(),Aee.negate()),handler(u){var e;const n=(e=u.get(Z0).lastFocusedList)===null||e===void 0?void 0:e.getFocus();Array.isArray(n)&&n[0]instanceof Zm&&Vp(u,i=>i.revealReference(n[0]))}});Po.registerCommandAndKeybindingRule({id:"openReferenceToSide",weight:100,primary:2051,mac:{primary:259},when:Ee.and(Hp,d2e,yee.negate(),Aee.negate()),handler(u){var e;const n=(e=u.get(Z0).lastFocusedList)===null||e===void 0?void 0:e.getFocus();Array.isArray(n)&&n[0]instanceof Zm&&Vp(u,i=>i.openReference(n[0],!0,!0))}});ru.registerCommand("openReference",u=>{var e;const n=(e=u.get(Z0).lastFocusedList)===null||e===void 0?void 0:e.getFocus();Array.isArray(n)&&n[0]instanceof Zm&&Vp(u,i=>i.openReference(n[0],!1,!0))});var DFe=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},Sb=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}};const ite=new Pe("hasSymbols",!1,v("hasSymbols","Whether there are symbol locations that can be navigated via keyboard-only.")),cR=Ut("ISymbolNavigationService");let qU=class{constructor(e,t,n,i){this._editorService=t,this._notificationService=n,this._keybindingService=i,this._currentModel=void 0,this._currentIdx=-1,this._ignoreEditorChange=!1,this._ctxHasSymbols=ite.bindTo(e)}reset(){var e,t;this._ctxHasSymbols.reset(),(e=this._currentState)===null||e===void 0||e.dispose(),(t=this._currentMessage)===null||t===void 0||t.dispose(),this._currentModel=void 0,this._currentIdx=-1}put(e){const t=e.parent.parent;if(t.references.length<=1){this.reset();return}this._currentModel=t,this._currentIdx=t.references.indexOf(e),this._ctxHasSymbols.set(!0),this._showMessage();const n=new JU(this._editorService),i=n.onDidChange(r=>{if(this._ignoreEditorChange)return;const a=this._editorService.getActiveCodeEditor();if(!a)return;const o=a.getModel(),s=a.getPosition();if(!o||!s)return;let l=!1,c=!1;for(const d of t.references)if(TX(d.uri,o.uri))l=!0,c=c||j.containsPosition(d.range,s);else if(l)break;(!l||!c)&&this.reset()});this._currentState=Fl(n,i)}revealNext(e){if(!this._currentModel)return Promise.resolve();this._currentIdx+=1,this._currentIdx%=this._currentModel.references.length;const t=this._currentModel.references[this._currentIdx];return this._showMessage(),this._ignoreEditorChange=!0,this._editorService.openCodeEditor({resource:t.uri,options:{selection:j.collapseToStart(t.range),selectionRevealType:3}},e).finally(()=>{this._ignoreEditorChange=!1})}_showMessage(){var e;(e=this._currentMessage)===null||e===void 0||e.dispose();const t=this._keybindingService.lookupKeybinding("editor.gotoNextSymbolFromResult"),n=t?v("location.kb","Symbol {0} of {1}, {2} for next",this._currentIdx+1,this._currentModel.references.length,t.getLabel()):v("location","Symbol {0} of {1}",this._currentIdx+1,this._currentModel.references.length);this._currentMessage=this._notificationService.status(n)}};qU=DFe([Sb(0,pt),Sb(1,Cu),Sb(2,bi),Sb(3,qu)],qU);au(cR,qU,1);ze(new class extends xr{constructor(){super({id:"editor.gotoNextSymbolFromResult",precondition:ite,kbOpts:{weight:100,primary:70}})}runEditorCommand(u,e){return u.get(cR).revealNext(e)}});Po.registerCommandAndKeybindingRule({id:"editor.gotoNextSymbolFromResult.cancel",weight:100,when:ite,primary:9,handler(u){u.get(cR).reset()}});let JU=class{constructor(e){this._listener=new Map,this._disposables=new pe,this._onDidChange=new Q,this.onDidChange=this._onDidChange.event,this._disposables.add(e.onCodeEditorRemove(this._onDidRemoveEditor,this)),this._disposables.add(e.onCodeEditorAdd(this._onDidAddEditor,this)),e.listCodeEditors().forEach(this._onDidAddEditor,this)}dispose(){this._disposables.dispose(),this._onDidChange.dispose(),Su(this._listener.values())}_onDidAddEditor(e){this._listener.set(e,Fl(e.onDidChangeCursorPosition(t=>this._onDidChange.fire({editor:e})),e.onDidChangeModelContent(t=>this._onDidChange.fire({editor:e}))))}_onDidRemoveEditor(e){var t;(t=this._listener.get(e))===null||t===void 0||t.dispose(),this._listener.delete(e)}};JU=DFe([Sb(0,Cu)],JU);var rte=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};function PA(u,e,t,n){return rte(this,void 0,void 0,function*(){const r=t.ordered(u).map(o=>Promise.resolve(n(o,u,e)).then(void 0,s=>{Mi(s)})),a=yield Promise.all(r);return b1(a.flat())})}function dR(u,e,t,n){return PA(e,t,u,(i,r,a)=>i.provideDefinition(r,a,n))}function xFe(u,e,t,n){return PA(e,t,u,(i,r,a)=>i.provideDeclaration(r,a,n))}function vFe(u,e,t,n){return PA(e,t,u,(i,r,a)=>i.provideImplementation(r,a,n))}function CFe(u,e,t,n){return PA(e,t,u,(i,r,a)=>i.provideTypeDefinition(r,a,n))}function hR(u,e,t,n,i){return PA(e,t,u,(r,a,o)=>rte(this,void 0,void 0,function*(){const s=yield r.provideReferences(a,o,{includeDeclaration:!0},i);if(!n||!s||s.length!==2)return s;const l=yield r.provideReferences(a,o,{includeDeclaration:!1},i);return l&&l.length===1?l:s}))}function RA(u){return rte(this,void 0,void 0,function*(){const e=yield u(),t=new ds(e,""),n=t.references.map(i=>i.link);return t.dispose(),n})}W1("_executeDefinitionProvider",(u,e,t)=>{const n=u.get(We),i=dR(n.definitionProvider,e,t,Kt.None);return RA(()=>i)});W1("_executeTypeDefinitionProvider",(u,e,t)=>{const n=u.get(We),i=CFe(n.typeDefinitionProvider,e,t,Kt.None);return RA(()=>i)});W1("_executeDeclarationProvider",(u,e,t)=>{const n=u.get(We),i=xFe(n.declarationProvider,e,t,Kt.None);return RA(()=>i)});W1("_executeReferenceProvider",(u,e,t)=>{const n=u.get(We),i=hR(n.referenceProvider,e,t,!1,Kt.None);return RA(()=>i)});W1("_executeImplementationProvider",(u,e,t)=>{const n=u.get(We),i=vFe(n.implementationProvider,e,t,Kt.None);return RA(()=>i)});var _l=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})},bC,kC,FC,T9,N9,P9,R9,I9;Lr.appendMenuItem(K.EditorContext,{submenu:K.EditorContextPeek,title:v("peek.submenu","Peek"),group:"navigation",order:100});class bv{static is(e){return!e||typeof e!="object"?!1:!!(e instanceof bv||ee.isIPosition(e.position)&&e.model)}constructor(e,t){this.model=e,this.position=t}}class Ba extends hd{static all(){return Ba._allSymbolNavigationCommands.values()}static _patchConfig(e){const t=Object.assign(Object.assign({},e),{f1:!0});if(t.menu)for(const n of $t.wrap(t.menu))(n.id===K.EditorContext||n.id===K.EditorContextPeek)&&(n.when=Ee.and(e.precondition,n.when));return t}constructor(e,t){super(Ba._patchConfig(t)),this.configuration=e,Ba._allSymbolNavigationCommands.set(t.id,this)}runEditorCommand(e,t,n,i){if(!t.hasModel())return Promise.resolve(void 0);const r=e.get(bi),a=e.get(Cu),o=e.get(Dg),s=e.get(cR),l=e.get(We),c=e.get(mt),d=t.getModel(),h=t.getPosition(),E=bv.is(n)?n:new bv(d,h),m=new Gm(t,5),g=YN(this._getLocationModel(l,E.model,E.position,m.token),m.token).then(f=>_l(this,void 0,void 0,function*(){var p;if(!f||m.token.isCancellationRequested)return;ga(f.ariaMessage);let D;if(f.referenceAt(d.uri,h)){const b=this._getAlternativeCommand(t);!Ba._activeAlternativeCommands.has(b)&&Ba._allSymbolNavigationCommands.has(b)&&(D=Ba._allSymbolNavigationCommands.get(b))}const x=f.references.length;if(x===0){if(!this.configuration.muteMessage){const b=d.getWordAtPosition(h);(p=cs.get(t))===null||p===void 0||p.showMessage(this._getNoResultFoundMessage(b),h)}}else if(x===1&&D)Ba._activeAlternativeCommands.add(this.desc.id),c.invokeFunction(b=>D.runEditorCommand(b,t,n,i).finally(()=>{Ba._activeAlternativeCommands.delete(this.desc.id)}));else return this._onResult(a,s,t,f,i)}),f=>{r.error(f)}).finally(()=>{m.dispose()});return o.showWhile(g,250),g}_onResult(e,t,n,i,r){return _l(this,void 0,void 0,function*(){const a=this._getGoToPreference(n);if(!(n instanceof Jm)&&(this.configuration.openInPeek||a==="peek"&&i.references.length>1))this._openInPeek(n,i,r);else{const o=i.firstReference(),s=i.references.length>1&&a==="gotoAndPeek",l=yield this._openReference(n,e,o,this.configuration.openToSide,!s);s&&l?this._openInPeek(l,i,r):i.dispose(),a==="goto"&&t.put(o)}})}_openReference(e,t,n,i,r){return _l(this,void 0,void 0,function*(){let a;if(Eqe(n)&&(a=n.targetSelectionRange),a||(a=n.range),!a)return;const o=yield t.openCodeEditor({resource:n.uri,options:{selection:j.collapseToStart(a),selectionRevealType:3,selectionSource:"code.jump"}},e,i);if(o){if(r){const s=o.getModel(),l=o.createDecorationsCollection([{range:a,options:{description:"symbol-navigate-action-highlight",className:"symbolHighlight"}}]);setTimeout(()=>{o.getModel()===s&&l.clear()},350)}return o}})}_openInPeek(e,t,n){const i=Ym.get(e);i&&e.hasModel()?i.toggleWidget(n??e.getSelection(),Ui(r=>Promise.resolve(t)),this.configuration.openInPeek):t.dispose()}}Ba._allSymbolNavigationCommands=new Map;Ba._activeAlternativeCommands=new Set;class IA extends Ba{_getLocationModel(e,t,n,i){return _l(this,void 0,void 0,function*(){return new ds(yield dR(e.definitionProvider,t,n,i),v("def.title","Definitions"))})}_getNoResultFoundMessage(e){return e&&e.word?v("noResultWord","No definition found for '{0}'",e.word):v("generic.noResults","No definition found")}_getAlternativeCommand(e){return e.getOption(58).alternativeDefinitionCommand}_getGoToPreference(e){return e.getOption(58).multipleDefinitions}}gn((bC=class extends IA{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:bC.id,title:{value:v("actions.goToDecl.label","Go to Definition"),original:"Go to Definition",mnemonicTitle:v({key:"miGotoDefinition",comment:["&& denotes a mnemonic"]},"Go to &&Definition")},precondition:Ee.and(W.hasDefinitionProvider,W.isInWalkThroughSnippet.toNegated()),keybinding:[{when:W.editorTextFocus,primary:70,weight:100},{when:Ee.and(W.editorTextFocus,s2e),primary:2118,weight:100}],menu:[{id:K.EditorContext,group:"navigation",order:1.1},{id:K.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:2}]}),ru.registerCommandAlias("editor.action.goToDeclaration",bC.id)}},bC.id="editor.action.revealDefinition",bC));gn((kC=class extends IA{constructor(){super({openToSide:!0,openInPeek:!1,muteMessage:!1},{id:kC.id,title:{value:v("actions.goToDeclToSide.label","Open Definition to the Side"),original:"Open Definition to the Side"},precondition:Ee.and(W.hasDefinitionProvider,W.isInWalkThroughSnippet.toNegated()),keybinding:[{when:W.editorTextFocus,primary:Vi(2089,70),weight:100},{when:Ee.and(W.editorTextFocus,s2e),primary:Vi(2089,2118),weight:100}]}),ru.registerCommandAlias("editor.action.openDeclarationToTheSide",kC.id)}},kC.id="editor.action.revealDefinitionAside",kC));gn((FC=class extends IA{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:FC.id,title:{value:v("actions.previewDecl.label","Peek Definition"),original:"Peek Definition"},precondition:Ee.and(W.hasDefinitionProvider,Ro.notInPeekEditor,W.isInWalkThroughSnippet.toNegated()),keybinding:{when:W.editorTextFocus,primary:582,linux:{primary:3140},weight:100},menu:{id:K.EditorContextPeek,group:"peek",order:2}}),ru.registerCommandAlias("editor.action.previewDeclaration",FC.id)}},FC.id="editor.action.peekDefinition",FC));class bFe extends Ba{_getLocationModel(e,t,n,i){return _l(this,void 0,void 0,function*(){return new ds(yield xFe(e.declarationProvider,t,n,i),v("decl.title","Declarations"))})}_getNoResultFoundMessage(e){return e&&e.word?v("decl.noResultWord","No declaration found for '{0}'",e.word):v("decl.generic.noResults","No declaration found")}_getAlternativeCommand(e){return e.getOption(58).alternativeDeclarationCommand}_getGoToPreference(e){return e.getOption(58).multipleDeclarations}}gn((T9=class extends bFe{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:T9.id,title:{value:v("actions.goToDeclaration.label","Go to Declaration"),original:"Go to Declaration",mnemonicTitle:v({key:"miGotoDeclaration",comment:["&& denotes a mnemonic"]},"Go to &&Declaration")},precondition:Ee.and(W.hasDeclarationProvider,W.isInWalkThroughSnippet.toNegated()),menu:[{id:K.EditorContext,group:"navigation",order:1.3},{id:K.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:3}]})}_getNoResultFoundMessage(e){return e&&e.word?v("decl.noResultWord","No declaration found for '{0}'",e.word):v("decl.generic.noResults","No declaration found")}},T9.id="editor.action.revealDeclaration",T9));gn(class extends bFe{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:"editor.action.peekDeclaration",title:{value:v("actions.peekDecl.label","Peek Declaration"),original:"Peek Declaration"},precondition:Ee.and(W.hasDeclarationProvider,Ro.notInPeekEditor,W.isInWalkThroughSnippet.toNegated()),menu:{id:K.EditorContextPeek,group:"peek",order:3}})}});class kFe extends Ba{_getLocationModel(e,t,n,i){return _l(this,void 0,void 0,function*(){return new ds(yield CFe(e.typeDefinitionProvider,t,n,i),v("typedef.title","Type Definitions"))})}_getNoResultFoundMessage(e){return e&&e.word?v("goToTypeDefinition.noResultWord","No type definition found for '{0}'",e.word):v("goToTypeDefinition.generic.noResults","No type definition found")}_getAlternativeCommand(e){return e.getOption(58).alternativeTypeDefinitionCommand}_getGoToPreference(e){return e.getOption(58).multipleTypeDefinitions}}gn((N9=class extends kFe{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:N9.ID,title:{value:v("actions.goToTypeDefinition.label","Go to Type Definition"),original:"Go to Type Definition",mnemonicTitle:v({key:"miGotoTypeDefinition",comment:["&& denotes a mnemonic"]},"Go to &&Type Definition")},precondition:Ee.and(W.hasTypeDefinitionProvider,W.isInWalkThroughSnippet.toNegated()),keybinding:{when:W.editorTextFocus,primary:0,weight:100},menu:[{id:K.EditorContext,group:"navigation",order:1.4},{id:K.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:3}]})}},N9.ID="editor.action.goToTypeDefinition",N9));gn((P9=class extends kFe{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:P9.ID,title:{value:v("actions.peekTypeDefinition.label","Peek Type Definition"),original:"Peek Type Definition"},precondition:Ee.and(W.hasTypeDefinitionProvider,Ro.notInPeekEditor,W.isInWalkThroughSnippet.toNegated()),menu:{id:K.EditorContextPeek,group:"peek",order:4}})}},P9.ID="editor.action.peekTypeDefinition",P9));class FFe extends Ba{_getLocationModel(e,t,n,i){return _l(this,void 0,void 0,function*(){return new ds(yield vFe(e.implementationProvider,t,n,i),v("impl.title","Implementations"))})}_getNoResultFoundMessage(e){return e&&e.word?v("goToImplementation.noResultWord","No implementation found for '{0}'",e.word):v("goToImplementation.generic.noResults","No implementation found")}_getAlternativeCommand(e){return e.getOption(58).alternativeImplementationCommand}_getGoToPreference(e){return e.getOption(58).multipleImplementations}}gn((R9=class extends FFe{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:R9.ID,title:{value:v("actions.goToImplementation.label","Go to Implementations"),original:"Go to Implementations",mnemonicTitle:v({key:"miGotoImplementation",comment:["&& denotes a mnemonic"]},"Go to &&Implementations")},precondition:Ee.and(W.hasImplementationProvider,W.isInWalkThroughSnippet.toNegated()),keybinding:{when:W.editorTextFocus,primary:2118,weight:100},menu:[{id:K.EditorContext,group:"navigation",order:1.45},{id:K.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:4}]})}},R9.ID="editor.action.goToImplementation",R9));gn((I9=class extends FFe{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:I9.ID,title:{value:v("actions.peekImplementation.label","Peek Implementations"),original:"Peek Implementations"},precondition:Ee.and(W.hasImplementationProvider,Ro.notInPeekEditor,W.isInWalkThroughSnippet.toNegated()),keybinding:{when:W.editorTextFocus,primary:3142,weight:100},menu:{id:K.EditorContextPeek,group:"peek",order:5}})}},I9.ID="editor.action.peekImplementation",I9));class yFe extends Ba{_getNoResultFoundMessage(e){return e?v("references.no","No references found for '{0}'",e.word):v("references.noGeneric","No references found")}_getAlternativeCommand(e){return e.getOption(58).alternativeReferenceCommand}_getGoToPreference(e){return e.getOption(58).multipleReferences}}gn(class extends yFe{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:"editor.action.goToReferences",title:{value:v("goToReferences.label","Go to References"),original:"Go to References",mnemonicTitle:v({key:"miGotoReference",comment:["&& denotes a mnemonic"]},"Go to &&References")},precondition:Ee.and(W.hasReferenceProvider,Ro.notInPeekEditor,W.isInWalkThroughSnippet.toNegated()),keybinding:{when:W.editorTextFocus,primary:1094,weight:100},menu:[{id:K.EditorContext,group:"navigation",order:1.45},{id:K.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:5}]})}_getLocationModel(e,t,n,i){return _l(this,void 0,void 0,function*(){return new ds(yield hR(e.referenceProvider,t,n,!0,i),v("ref.title","References"))})}});gn(class extends yFe{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:"editor.action.referenceSearch.trigger",title:{value:v("references.action.label","Peek References"),original:"Peek References"},precondition:Ee.and(W.hasReferenceProvider,Ro.notInPeekEditor,W.isInWalkThroughSnippet.toNegated()),menu:{id:K.EditorContextPeek,group:"peek",order:6}})}_getLocationModel(e,t,n,i){return _l(this,void 0,void 0,function*(){return new ds(yield hR(e.referenceProvider,t,n,!1,i),v("ref.title","References"))})}});class cmt extends Ba{constructor(e,t,n){super(e,{id:"editor.action.goToLocation",title:{value:v("label.generic","Go to Any Symbol"),original:"Go to Any Symbol"},precondition:Ee.and(Ro.notInPeekEditor,W.isInWalkThroughSnippet.toNegated())}),this._references=t,this._gotoMultipleBehaviour=n}_getLocationModel(e,t,n,i){return _l(this,void 0,void 0,function*(){return new ds(this._references,v("generic.title","Locations"))})}_getNoResultFoundMessage(e){return e&&v("generic.noResult","No results for '{0}'",e.word)||""}_getGoToPreference(e){var t;return(t=this._gotoMultipleBehaviour)!==null&&t!==void 0?t:e.getOption(58).multipleReferences}_getAlternativeCommand(){return""}}ru.registerCommand({id:"editor.action.goToLocations",description:{description:"Go to locations from a position in a file",args:[{name:"uri",description:"The text document in which to start",constraint:dt},{name:"position",description:"The position at which to start",constraint:ee.isIPosition},{name:"locations",description:"An array of locations.",constraint:Array},{name:"multiple",description:"Define what to do when having multiple results, either `peek`, `gotoAndPeek`, or `goto"},{name:"noResultsMessage",description:"Human readable message that shows when locations is empty."}]},handler:(u,e,t,n,i,r,a)=>_l(void 0,void 0,void 0,function*(){Ru(dt.isUri(e)),Ru(ee.isIPosition(t)),Ru(Array.isArray(n)),Ru(typeof i>"u"||typeof i=="string"),Ru(typeof a>"u"||typeof a=="boolean");const o=u.get(Cu),s=yield o.openCodeEditor({resource:e},o.getFocusedCodeEditor());if(M1(s))return s.setPosition(t),s.revealPositionInCenterIfOutsideViewport(t,0),s.invokeWithinContext(l=>{const c=new class extends cmt{_getNoResultFoundMessage(d){return r||super._getNoResultFoundMessage(d)}}({muteMessage:!r,openInPeek:!!a,openToSide:!1},n,i);l.get(mt).invokeFunction(c.run.bind(c),s)})})});ru.registerCommand({id:"editor.action.peekLocations",description:{description:"Peek locations from a position in a file",args:[{name:"uri",description:"The text document in which to start",constraint:dt},{name:"position",description:"The position at which to start",constraint:ee.isIPosition},{name:"locations",description:"An array of locations.",constraint:Array},{name:"multiple",description:"Define what to do when having multiple results, either `peek`, `gotoAndPeek`, or `goto"}]},handler:(u,e,t,n,i)=>_l(void 0,void 0,void 0,function*(){u.get(ni).executeCommand("editor.action.goToLocations",e,t,n,i,void 0,!0)})});ru.registerCommand({id:"editor.action.findReferences",handler:(u,e,t)=>{Ru(dt.isUri(e)),Ru(ee.isIPosition(t));const n=u.get(We),i=u.get(Cu);return i.openCodeEditor({resource:e},i.getFocusedCodeEditor()).then(r=>{if(!M1(r)||!r.hasModel())return;const a=Ym.get(r);if(!a)return;const o=Ui(l=>hR(n.referenceProvider,r.getModel(),ee.lift(t),!1,l).then(c=>new ds(c,v("ref.title","References")))),s=new j(t.lineNumber,t.column,t.lineNumber,t.column);return Promise.resolve(a.toggleWidget(s,o,!1))})}});ru.registerCommandAlias("editor.action.showReferences","editor.action.peekLocations");var dmt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},_H=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},Ble=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})},Bb;let W3=Bb=class{constructor(e,t,n,i){this.textModelResolverService=t,this.languageService=n,this.languageFeaturesService=i,this.toUnhook=new pe,this.toUnhookForKeyboard=new pe,this.currentWordAtPosition=null,this.previousPromise=null,this.editor=e,this.linkDecorations=this.editor.createDecorationsCollection();const r=new rR(e);this.toUnhook.add(r),this.toUnhook.add(r.onMouseMoveOrRelevantKeyDown(([a,o])=>{this.startFindDefinitionFromMouse(a,o??void 0)})),this.toUnhook.add(r.onExecute(a=>{this.isEnabled(a)&&this.gotoDefinition(a.target.position,a.hasSideBySideModifier).catch(o=>{zt(o)}).finally(()=>{this.removeLinkDecorations()})})),this.toUnhook.add(r.onCancel(()=>{this.removeLinkDecorations(),this.currentWordAtPosition=null}))}static get(e){return e.getContribution(Bb.ID)}startFindDefinitionFromCursor(e){return Ble(this,void 0,void 0,function*(){yield this.startFindDefinition(e),this.toUnhookForKeyboard.add(this.editor.onDidChangeCursorPosition(()=>{this.currentWordAtPosition=null,this.removeLinkDecorations(),this.toUnhookForKeyboard.clear()})),this.toUnhookForKeyboard.add(this.editor.onKeyDown(t=>{t&&(this.currentWordAtPosition=null,this.removeLinkDecorations(),this.toUnhookForKeyboard.clear())}))})}startFindDefinitionFromMouse(e,t){if(e.target.type===9&&this.linkDecorations.length>0)return;if(!this.editor.hasModel()||!this.isEnabled(e,t)){this.currentWordAtPosition=null,this.removeLinkDecorations();return}const n=e.target.position;this.startFindDefinition(n)}startFindDefinition(e){var t;return Ble(this,void 0,void 0,function*(){this.toUnhookForKeyboard.clear();const n=e?(t=this.editor.getModel())===null||t===void 0?void 0:t.getWordAtPosition(e):null;if(!n){this.currentWordAtPosition=null,this.removeLinkDecorations();return}if(this.currentWordAtPosition&&this.currentWordAtPosition.startColumn===n.startColumn&&this.currentWordAtPosition.endColumn===n.endColumn&&this.currentWordAtPosition.word===n.word)return;this.currentWordAtPosition=n;const i=new Z2e(this.editor,15);this.previousPromise&&(this.previousPromise.cancel(),this.previousPromise=null),this.previousPromise=Ui(o=>this.findDefinition(e,o));let r;try{r=yield this.previousPromise}catch(o){zt(o);return}if(!r||!r.length||!i.validate(this.editor)){this.removeLinkDecorations();return}const a=r[0].originSelectionRange?j.lift(r[0].originSelectionRange):new j(e.lineNumber,n.startColumn,e.lineNumber,n.endColumn);if(r.length>1){let o=a;for(const{originSelectionRange:s}of r)s&&(o=j.plusRange(o,s));this.addDecoration(o,new Zr().appendText(v("multipleResults","Click to show {0} definitions.",r.length)))}else{const o=r[0];if(!o.uri)return;this.textModelResolverService.createModelReference(o.uri).then(s=>{if(!s.object||!s.object.textEditorModel){s.dispose();return}const{object:{textEditorModel:l}}=s,{startLineNumber:c}=o.range;if(c<1||c>l.getLineCount()){s.dispose();return}const d=this.getPreviewValue(l,c,o),h=this.languageService.guessLanguageIdByFilepathOrFirstLine(l.uri);this.addDecoration(a,d?new Zr().appendCodeblock(h||"",d):void 0),s.dispose()})}})}getPreviewValue(e,t,n){let i=n.range;return i.endLineNumber-i.startLineNumber>=Bb.MAX_SOURCE_PREVIEW_LINES&&(i=this.getPreviewRangeBasedOnIndentation(e,t)),this.stripIndentationFromPreviewRange(e,t,i)}stripIndentationFromPreviewRange(e,t,n){let r=e.getLineFirstNonWhitespaceColumn(t);for(let o=t+1;o{const i=!t&&this.editor.getOption(87)&&!this.isInPeekEditor(n);return new IA({openToSide:t,openInPeek:i,muteMessage:!0},{title:{value:"",original:""},id:"",precondition:void 0}).run(n)})}isInPeekEditor(e){const t=e.get(pt);return Ro.inPeekEditor.getValue(t)}dispose(){this.toUnhook.dispose(),this.toUnhookForKeyboard.dispose()}};W3.ID="editor.contrib.gotodefinitionatposition";W3.MAX_SOURCE_PREVIEW_LINES=8;W3=Bb=dmt([_H(1,Vo),_H(2,vn),_H(3,We)],W3);fu(W3.ID,W3,2);const O9=ve;class AFe extends ne{constructor(){super(),this.containerDomNode=document.createElement("div"),this.containerDomNode.className="monaco-hover",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 EA(this.contentsDomNode,{consumeMouseWheelIfScrollbarIsNeeded:!0})),this.containerDomNode.appendChild(this.scrollbar.getDomNode())}onContentsChanged(){this.scrollbar.scanDomNode()}}class ate extends ne{static render(e,t,n){return new ate(e,t,n)}constructor(e,t,n){super(),this.actionContainer=me(e,O9("div.action-container")),this.actionContainer.setAttribute("tabindex","0"),this.action=me(this.actionContainer,O9("a.action")),this.action.setAttribute("role","button"),t.iconClass&&me(this.action,O9(`span.icon.${t.iconClass}`));const i=me(this.action,O9("span"));i.textContent=n?`${t.label} (${n})`:t.label,this._register(ce(this.actionContainer,Me.CLICK,r=>{r.stopPropagation(),r.preventDefault(),t.run(this.actionContainer)})),this._register(ce(this.actionContainer,Me.KEY_DOWN,r=>{const a=new ln(r);(a.equals(3)||a.equals(10))&&(r.stopPropagation(),r.preventDefault(),t.run(this.actionContainer))})),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 hmt(u,e){return u&&e?v("acessibleViewHint","Inspect this in the accessible view with {0}.",e):u?v("acessibleViewHintNoKbOpen","Inspect this in the accessible view via the command Open Accessible View which is currently not triggerable via keybinding."):""}var Emt=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})},mmt=globalThis&&globalThis.__asyncValues||function(u){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=u[Symbol.asyncIterator],t;return e?e.call(u):(u=typeof __values=="function"?__values(u):u[Symbol.iterator](),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=u[r]&&function(a){return new Promise(function(o,s){a=u[r](a),i(o,s,a.done,a.value)})}}function i(r,a,o,s){Promise.resolve(s).then(function(l){r({value:l,done:o})},a)}};let gmt=class{constructor(e,t,n){this.value=e,this.isComplete=t,this.hasLoadingMessage=n}};class _Fe extends ne{constructor(e,t){super(),this._editor=e,this._computer=t,this._onResult=this._register(new Q),this.onResult=this._onResult.event,this._firstWaitScheduler=this._register(new Hu(()=>this._triggerAsyncComputation(),0)),this._secondWaitScheduler=this._register(new Hu(()=>this._triggerSyncComputation(),0)),this._loadingMessageScheduler=this._register(new Hu(()=>this._triggerLoadingMessage(),0)),this._state=0,this._asyncIterable=null,this._asyncIterableDone=!1,this._result=[]}dispose(){this._asyncIterable&&(this._asyncIterable.cancel(),this._asyncIterable=null),super.dispose()}get _hoverTime(){return this._editor.getOption(60).delay}get _firstWaitTime(){return this._hoverTime/2}get _secondWaitTime(){return this._hoverTime-this._firstWaitTime}get _loadingMessageTime(){return 3*this._hoverTime}_setState(e,t=!0){this._state=e,t&&this._fireResult()}_triggerAsyncComputation(){this._setState(2),this._secondWaitScheduler.schedule(this._secondWaitTime),this._computer.computeAsync?(this._asyncIterableDone=!1,this._asyncIterable=gZe(e=>this._computer.computeAsync(e)),Emt(this,void 0,void 0,function*(){var e,t,n,i;try{try{for(var r=!0,a=mmt(this._asyncIterable),o;o=yield a.next(),e=o.done,!e;r=!0){i=o.value,r=!1;const s=i;s&&(this._result.push(s),this._fireResult())}}catch(s){t={error:s}}finally{try{!r&&!e&&(n=a.return)&&(yield n.call(a))}finally{if(t)throw t.error}}this._asyncIterableDone=!0,(this._state===3||this._state===4)&&this._setState(0)}catch(s){zt(s)}})):this._asyncIterableDone=!0}_triggerSyncComputation(){this._computer.computeSync&&(this._result=this._result.concat(this._computer.computeSync())),this._setState(this._asyncIterableDone?0:3)}_triggerLoadingMessage(){this._state===3&&this._setState(4)}_fireResult(){if(this._state===1||this._state===2)return;const e=this._state===0,t=this._state===4;this._onResult.fire(new gmt(this._result.slice(0),e,t))}start(e){if(e===0)this._state===0&&(this._setState(1),this._firstWaitScheduler.schedule(this._firstWaitTime),this._loadingMessageScheduler.schedule(this._loadingMessageTime));else switch(this._state){case 0:this._triggerAsyncComputation(),this._secondWaitScheduler.cancel(),this._triggerSyncComputation();break;case 2:this._secondWaitScheduler.cancel(),this._triggerSyncComputation();break}}cancel(){this._firstWaitScheduler.cancel(),this._secondWaitScheduler.cancel(),this._loadingMessageScheduler.cancel(),this._asyncIterable&&(this._asyncIterable.cancel(),this._asyncIterable=null),this._result=[],this._setState(0,!1)}}class SH{constructor(e,t,n,i){this.priority=e,this.range=t,this.initialMousePosX=n,this.initialMousePosY=i,this.type=1}equals(e){return e.type===1&&this.range.equalsRange(e.range)}canAdoptVisibleHover(e,t){return e.type===1&&t.lineNumber===this.range.startLineNumber}}class g8{constructor(e,t,n,i,r,a){this.priority=e,this.owner=t,this.range=n,this.initialMousePosX=i,this.initialMousePosY=r,this.supportsMarkerHover=a,this.type=2}equals(e){return e.type===2&&this.owner===e.owner}canAdoptVisibleHover(e,t){return e.type===2&&this.owner===e.owner}}const $p=new class{constructor(){this._participants=[]}register(e){this._participants.push(e)}getAll(){return this._participants}};class ote{constructor(){this._onDidWillResize=new Q,this.onDidWillResize=this._onDidWillResize.event,this._onDidResize=new Q,this.onDidResize=this._onDidResize.event,this._sashListener=new pe,this._size=new pu(0,0),this._minSize=new pu(0,0),this._maxSize=new pu(Number.MAX_SAFE_INTEGER,Number.MAX_SAFE_INTEGER),this.domNode=document.createElement("div"),this._eastSash=new oa(this.domNode,{getVerticalSashLeft:()=>this._size.width},{orientation:0}),this._westSash=new oa(this.domNode,{getVerticalSashLeft:()=>0},{orientation:0}),this._northSash=new oa(this.domNode,{getHorizontalSashTop:()=>0},{orientation:1,orthogonalEdge:pw.North}),this._southSash=new oa(this.domNode,{getHorizontalSashTop:()=>this._size.height},{orientation:1,orthogonalEdge:pw.South}),this._northSash.orthogonalStartSash=this._westSash,this._northSash.orthogonalEndSash=this._eastSash,this._southSash.orthogonalStartSash=this._westSash,this._southSash.orthogonalEndSash=this._eastSash;let e,t=0,n=0;this._sashListener.add(Ne.any(this._northSash.onDidStart,this._eastSash.onDidStart,this._southSash.onDidStart,this._westSash.onDidStart)(()=>{e===void 0&&(this._onDidWillResize.fire(),e=this._size,t=0,n=0)})),this._sashListener.add(Ne.any(this._northSash.onDidEnd,this._eastSash.onDidEnd,this._southSash.onDidEnd,this._westSash.onDidEnd)(()=>{e!==void 0&&(e=void 0,t=0,n=0,this._onDidResize.fire({dimension:this._size,done:!0}))})),this._sashListener.add(this._eastSash.onDidChange(i=>{e&&(n=i.currentX-i.startX,this.layout(e.height+t,e.width+n),this._onDidResize.fire({dimension:this._size,done:!1,east:!0}))})),this._sashListener.add(this._westSash.onDidChange(i=>{e&&(n=-(i.currentX-i.startX),this.layout(e.height+t,e.width+n),this._onDidResize.fire({dimension:this._size,done:!1,west:!0}))})),this._sashListener.add(this._northSash.onDidChange(i=>{e&&(t=-(i.currentY-i.startY),this.layout(e.height+t,e.width+n),this._onDidResize.fire({dimension:this._size,done:!1,north:!0}))})),this._sashListener.add(this._southSash.onDidChange(i=>{e&&(t=i.currentY-i.startY,this.layout(e.height+t,e.width+n),this._onDidResize.fire({dimension:this._size,done:!1,south:!0}))})),this._sashListener.add(Ne.any(this._eastSash.onDidReset,this._westSash.onDidReset)(i=>{this._preferredSize&&(this.layout(this._size.height,this._preferredSize.width),this._onDidResize.fire({dimension:this._size,done:!0}))})),this._sashListener.add(Ne.any(this._northSash.onDidReset,this._southSash.onDidReset)(i=>{this._preferredSize&&(this.layout(this._preferredSize.height,this._size.width),this._onDidResize.fire({dimension:this._size,done:!0}))}))}dispose(){this._northSash.dispose(),this._southSash.dispose(),this._eastSash.dispose(),this._westSash.dispose(),this._sashListener.dispose(),this._onDidResize.dispose(),this._onDidWillResize.dispose(),this.domNode.remove()}enableSashes(e,t,n,i){this._northSash.state=e?3:0,this._eastSash.state=t?3:0,this._southSash.state=n?3:0,this._westSash.state=i?3:0}layout(e=this.size.height,t=this.size.width){const{height:n,width:i}=this._minSize,{height:r,width:a}=this._maxSize;e=Math.max(n,Math.min(r,e)),t=Math.max(i,Math.min(a,t));const o=new pu(t,e);pu.equals(o,this._size)||(this.domNode.style.height=e+"px",this.domNode.style.width=t+"px",this._size=o,this._northSash.layout(),this._eastSash.layout(),this._southSash.layout(),this._westSash.layout())}clearSashHoverState(){this._eastSash.clearSashHoverState(),this._westSash.clearSashHoverState(),this._northSash.clearSashHoverState(),this._southSash.clearSashHoverState()}get size(){return this._size}set maxSize(e){this._maxSize=e}get maxSize(){return this._maxSize}set minSize(e){this._minSize=e}get minSize(){return this._minSize}set preferredSize(e){this._preferredSize=e}get preferredSize(){return this._preferredSize}}const fmt=30,pmt=24;class Dmt extends ne{constructor(e,t=new pu(10,10)){super(),this._editor=e,this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._resizableNode=this._register(new ote),this._contentPosition=null,this._isResizing=!1,this._resizableNode.domNode.style.position="absolute",this._resizableNode.minSize=pu.lift(t),this._resizableNode.layout(t.height,t.width),this._resizableNode.enableSashes(!0,!0,!0,!0),this._register(this._resizableNode.onDidResize(n=>{this._resize(new pu(n.dimension.width,n.dimension.height)),n.done&&(this._isResizing=!1)})),this._register(this._resizableNode.onDidWillResize(()=>{this._isResizing=!0}))}get isResizing(){return this._isResizing}getDomNode(){return this._resizableNode.domNode}getPosition(){return this._contentPosition}get position(){var e;return!((e=this._contentPosition)===null||e===void 0)&&e.position?ee.lift(this._contentPosition.position):void 0}_availableVerticalSpaceAbove(e){const t=this._editor.getDomNode(),n=this._editor.getScrolledVisiblePosition(e);return!t||!n?void 0:ji(t).top+n.top-fmt}_availableVerticalSpaceBelow(e){const t=this._editor.getDomNode(),n=this._editor.getScrolledVisiblePosition(e);if(!t||!n)return;const i=ji(t),r=c6(t.ownerDocument.body),a=i.top+n.top+n.height;return r.height-a-pmt}_findPositionPreference(e,t){var n,i;const r=Math.min((n=this._availableVerticalSpaceBelow(t))!==null&&n!==void 0?n:1/0,e),a=Math.min((i=this._availableVerticalSpaceAbove(t))!==null&&i!==void 0?i:1/0,e),o=Math.min(Math.max(a,r),e),s=Math.min(e,o);let l;return this._editor.getOption(60).above?l=s<=a?1:2:l=s<=r?2:1,l===1?this._resizableNode.enableSashes(!0,!0,!1,!1):this._resizableNode.enableSashes(!1,!0,!0,!1),l}_resize(e){this._resizableNode.layout(e.height,e.width)}}var ste=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},Wf=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},f8,Bd;const wle=ve;let jw=f8=class extends ne{constructor(e,t,n){super(),this._editor=e,this._instantiationService=t,this._keybindingService=n,this._currentResult=null,this._widget=this._register(this._instantiationService.createInstance(lm,this._editor)),this._participants=[];for(const i of $p.getAll())this._participants.push(this._instantiationService.createInstance(i,this._editor));this._participants.sort((i,r)=>i.hoverOrdinal-r.hoverOrdinal),this._computer=new Vw(this._editor,this._participants),this._hoverOperation=this._register(new _Fe(this._editor,this._computer)),this._register(this._hoverOperation.onResult(i=>{if(!this._computer.anchor)return;const r=i.hasLoadingMessage?this._addLoadingMessage(i.value):i.value;this._withResult(new SFe(this._computer.anchor,r,i.isComplete))})),this._register(xi(this._widget.getDomNode(),"keydown",i=>{i.equals(9)&&this.hide()})),this._register(qn.onDidChange(()=>{this._widget.position&&this._currentResult&&this._setCurrentResult(this._currentResult)}))}get widget(){return this._widget}maybeShowAt(e){if(this._widget.isResizing)return!0;const t=[];for(const i of this._participants)if(i.suggestHoverAnchor){const r=i.suggestHoverAnchor(e);r&&t.push(r)}const n=e.target;if(n.type===6&&t.push(new SH(0,n.range,e.event.posx,e.event.posy)),n.type===7){const i=this._editor.getOption(50).typicalHalfwidthCharacterWidth/2;!n.detail.isAfterLines&&typeof n.detail.horizontalDistanceToText=="number"&&n.detail.horizontalDistanceToTextr.priority-i.priority),this._startShowingOrUpdateHover(t[0],0,0,!1,e))}startShowingAtRange(e,t,n,i){this._startShowingOrUpdateHover(new SH(0,e,void 0,void 0),t,n,i,null)}_startShowingOrUpdateHover(e,t,n,i,r){return!this._widget.position||!this._currentResult?e?(this._startHoverOperationIfNecessary(e,t,n,i,!1),!0):!1:this._editor.getOption(60).sticky&&r&&this._widget.isMouseGettingCloser(r.event.posx,r.event.posy)?(e&&this._startHoverOperationIfNecessary(e,t,n,i,!0),!0):e?e&&this._currentResult.anchor.equals(e)?!0:e.canAdoptVisibleHover(this._currentResult.anchor,this._widget.position)?(this._setCurrentResult(this._currentResult.filter(e)),this._startHoverOperationIfNecessary(e,t,n,i,!1),!0):(this._setCurrentResult(null),this._startHoverOperationIfNecessary(e,t,n,i,!1),!0):(this._setCurrentResult(null),!1)}_startHoverOperationIfNecessary(e,t,n,i,r){this._computer.anchor&&this._computer.anchor.equals(e)||(this._hoverOperation.cancel(),this._computer.anchor=e,this._computer.shouldFocus=i,this._computer.source=n,this._computer.insistOnKeepingHoverVisible=r,this._hoverOperation.start(t))}_setCurrentResult(e){this._currentResult!==e&&(e&&e.messages.length===0&&(e=null),this._currentResult=e,this._currentResult?this._renderMessages(this._currentResult.anchor,this._currentResult.messages):this._widget.hide())}hide(){this._computer.anchor=null,this._hoverOperation.cancel(),this._setCurrentResult(null)}get isColorPickerVisible(){return this._widget.isColorPickerVisible}get isVisibleFromKeyboard(){return this._widget.isVisibleFromKeyboard}get isVisible(){return this._widget.isVisible}get isFocused(){return this._widget.isFocused}get isResizing(){return this._widget.isResizing}containsNode(e){return e?this._widget.getDomNode().contains(e):!1}_addLoadingMessage(e){if(this._computer.anchor){for(const t of this._participants)if(t.createLoadingMessage){const n=t.createLoadingMessage(this._computer.anchor);if(n)return e.slice(0).concat([n])}}return e}_withResult(e){this._widget.position&&this._currentResult&&this._currentResult.isComplete&&(!e.isComplete||this._computer.insistOnKeepingHoverVisible&&e.messages.length===0)||this._setCurrentResult(e)}_renderMessages(e,t){const{showAtPosition:n,showAtSecondaryPosition:i,highlightRange:r}=f8.computeHoverRanges(this._editor,e.range,t),a=new pe,o=a.add(new Hw(this._keybindingService)),s=document.createDocumentFragment();let l=null;const c={fragment:s,statusBar:o,setColorPicker:h=>l=h,onContentsChanged:()=>this._widget.onContentsChanged(),setMinimumDimensions:h=>this._widget.setMinimumDimensions(h),hide:()=>this.hide()};for(const h of this._participants){const E=t.filter(m=>m.owner===h);E.length>0&&a.add(h.renderHoverParts(c,E))}const d=t.some(h=>h.isBeforeContent);if(o.hasContent&&s.appendChild(o.hoverElement),s.hasChildNodes()){if(r){const h=this._editor.createDecorationsCollection();h.set([{range:r,options:f8._DECORATION_OPTIONS}]),a.add(ft(()=>{h.clear()}))}this._widget.showAt(s,new vmt(l,n,i,this._editor.getOption(60).above,this._computer.shouldFocus,this._computer.source,d,e.initialMousePosX,e.initialMousePosY,a))}else a.dispose()}static computeHoverRanges(e,t,n){let i=1;if(e.hasModel()){const l=e._getViewModel(),c=l.coordinatesConverter,d=c.convertModelRangeToViewRange(t),h=new ee(d.startLineNumber,l.getLineMinColumn(d.startLineNumber));i=c.convertViewPositionToModelPosition(h).column}const r=t.startLineNumber;let a=t.startColumn,o=n[0].range,s=null;for(const l of n)o=j.plusRange(o,l.range),l.range.startLineNumber===r&&l.range.endLineNumber===r&&(a=Math.max(Math.min(a,l.range.startColumn),i)),l.forceShowAtRange&&(s=l.range);return{showAtPosition:s?s.getStartPosition():new ee(r,t.startColumn),showAtSecondaryPosition:s?s.getStartPosition():new ee(r,a),highlightRange:o}}focus(){this._widget.focus()}scrollUp(){this._widget.scrollUp()}scrollDown(){this._widget.scrollDown()}scrollLeft(){this._widget.scrollLeft()}scrollRight(){this._widget.scrollRight()}pageUp(){this._widget.pageUp()}pageDown(){this._widget.pageDown()}goToTop(){this._widget.goToTop()}goToBottom(){this._widget.goToBottom()}};jw._DECORATION_OPTIONS=Lt.register({description:"content-hover-highlight",className:"hoverHighlight"});jw=f8=ste([Wf(1,mt),Wf(2,qu)],jw);class SFe{constructor(e,t,n){this.anchor=e,this.messages=t,this.isComplete=n}filter(e){const t=this.messages.filter(n=>n.isValidForHoverAnchor(e));return t.length===this.messages.length?this:new xmt(this,this.anchor,t,this.isComplete)}}class xmt extends SFe{constructor(e,t,n,i){super(t,n,i),this.original=e}filter(e){return this.original.filter(e)}}class vmt{constructor(e,t,n,i,r,a,o,s,l,c){this.colorPicker=e,this.showAtPosition=t,this.showAtSecondaryPosition=n,this.preferAbove=i,this.stoleFocus=r,this.source=a,this.isBeforeContent=o,this.initialMousePosX=s,this.initialMousePosY=l,this.disposables=c,this.closestMouseDistance=void 0}}const Lle=30,BH=10,Cmt=6;let lm=Bd=class extends Dmt{get isColorPickerVisible(){var e;return!!(!((e=this._visibleData)===null||e===void 0)&&e.colorPicker)}get isVisibleFromKeyboard(){var e;return((e=this._visibleData)===null||e===void 0?void 0:e.source)===1}get isVisible(){var e;return(e=this._hoverVisibleKey.get())!==null&&e!==void 0?e:!1}get isFocused(){var e;return(e=this._hoverFocusedKey.get())!==null&&e!==void 0?e:!1}constructor(e,t,n,i,r){const a=e.getOption(66)+8,o=150,s=new pu(o,a);super(e,s),this._configurationService=n,this._accessibilityService=i,this._keybindingService=r,this._hover=this._register(new AFe),this._minimumSize=s,this._hoverVisibleKey=W.hoverVisible.bindTo(t),this._hoverFocusedKey=W.hoverFocused.bindTo(t),me(this._resizableNode.domNode,this._hover.containerDomNode),this._resizableNode.domNode.style.zIndex="50",this._register(this._editor.onDidLayoutChange(()=>this._layout())),this._register(this._editor.onDidChangeConfiguration(c=>{c.hasChanged(50)&&this._updateFont()}));const l=this._register(y1(this._resizableNode.domNode));this._register(l.onDidFocus(()=>{this._hoverFocusedKey.set(!0)})),this._register(l.onDidBlur(()=>{this._hoverFocusedKey.set(!1)})),this._setHoverData(void 0),this._layout(),this._editor.addContentWidget(this)}dispose(){var e;super.dispose(),(e=this._visibleData)===null||e===void 0||e.disposables.dispose(),this._editor.removeContentWidget(this)}getId(){return Bd.ID}static _applyDimensions(e,t,n){const i=typeof t=="number"?`${t}px`:t,r=typeof n=="number"?`${n}px`:n;e.style.width=i,e.style.height=r}_setContentsDomNodeDimensions(e,t){const n=this._hover.contentsDomNode;return Bd._applyDimensions(n,e,t)}_setContainerDomNodeDimensions(e,t){const n=this._hover.containerDomNode;return Bd._applyDimensions(n,e,t)}_setHoverWidgetDimensions(e,t){this._setContentsDomNodeDimensions(e,t),this._setContainerDomNodeDimensions(e,t),this._layoutContentWidget()}static _applyMaxDimensions(e,t,n){const i=typeof t=="number"?`${t}px`:t,r=typeof n=="number"?`${n}px`:n;e.style.maxWidth=i,e.style.maxHeight=r}_setHoverWidgetMaxDimensions(e,t){Bd._applyMaxDimensions(this._hover.contentsDomNode,e,t),Bd._applyMaxDimensions(this._hover.containerDomNode,e,t),this._hover.containerDomNode.style.setProperty("--vscode-hover-maxWidth",typeof e=="number"?`${e}px`:e),this._layoutContentWidget()}_hasHorizontalScrollbar(){const e=this._hover.scrollbar.getScrollDimensions();return e.scrollWidth>e.width}_adjustContentsBottomPadding(){const e=this._hover.contentsDomNode,t=`${this._hover.scrollbar.options.horizontalScrollbarSize}px`;e.style.paddingBottom!==t&&(e.style.paddingBottom=t)}_setAdjustedHoverWidgetDimensions(e){this._setHoverWidgetMaxDimensions("none","none");const t=e.width,n=e.height;this._setHoverWidgetDimensions(t,n),this._hasHorizontalScrollbar()&&(this._adjustContentsBottomPadding(),this._setContentsDomNodeDimensions(t,n-BH))}_updateResizableNodeMaxDimensions(){var e,t;const n=(e=this._findMaximumRenderingWidth())!==null&&e!==void 0?e:1/0,i=(t=this._findMaximumRenderingHeight())!==null&&t!==void 0?t:1/0;this._resizableNode.maxSize=new pu(n,i),this._setHoverWidgetMaxDimensions(n,i)}_resize(e){var t,n;Bd._lastDimensions=new pu(e.width,e.height),this._setAdjustedHoverWidgetDimensions(e),this._resizableNode.layout(e.height,e.width),this._updateResizableNodeMaxDimensions(),this._hover.scrollbar.scanDomNode(),this._editor.layoutContentWidget(this),(n=(t=this._visibleData)===null||t===void 0?void 0:t.colorPicker)===null||n===void 0||n.layout()}_findAvailableSpaceVertically(){var e;const t=(e=this._visibleData)===null||e===void 0?void 0:e.showAtPosition;if(t)return this._positionPreference===1?this._availableVerticalSpaceAbove(t):this._availableVerticalSpaceBelow(t)}_findMaximumRenderingHeight(){const e=this._findAvailableSpaceVertically();if(!e)return;let t=Cmt;return Array.from(this._hover.contentsDomNode.children).forEach(n=>{t+=n.clientHeight}),this._hasHorizontalScrollbar()&&(t+=BH),Math.min(e,t)}_isHoverTextOverflowing(){this._hover.containerDomNode.style.setProperty("--vscode-hover-whiteSpace","nowrap"),this._hover.containerDomNode.style.setProperty("--vscode-hover-sourceWhiteSpace","nowrap");const e=Array.from(this._hover.contentsDomNode.children).some(t=>t.scrollWidth>t.clientWidth);return this._hover.containerDomNode.style.removeProperty("--vscode-hover-whiteSpace"),this._hover.containerDomNode.style.removeProperty("--vscode-hover-sourceWhiteSpace"),e}_findMaximumRenderingWidth(){if(!this._editor||!this._editor.hasModel())return;const e=this._isHoverTextOverflowing(),t=typeof this._contentWidth>"u"?0:this._contentWidth-2;return e||this._hover.containerDomNode.clientWidth"u"||typeof this._visibleData.initialMousePosY>"u")return this._visibleData.initialMousePosX=e,this._visibleData.initialMousePosY=t,!1;const n=ji(this.getDomNode());typeof this._visibleData.closestMouseDistance>"u"&&(this._visibleData.closestMouseDistance=zle(this._visibleData.initialMousePosX,this._visibleData.initialMousePosY,n.left,n.top,n.width,n.height));const i=zle(e,t,n.left,n.top,n.width,n.height);return i>this._visibleData.closestMouseDistance+4?!1:(this._visibleData.closestMouseDistance=Math.min(this._visibleData.closestMouseDistance,i),!0)}_setHoverData(e){var t;(t=this._visibleData)===null||t===void 0||t.disposables.dispose(),this._visibleData=e,this._hoverVisibleKey.set(!!e),this._hover.containerDomNode.classList.toggle("hidden",!e)}_layout(){const{fontSize:e,lineHeight:t}=this._editor.getOption(50),n=this._hover.contentsDomNode;n.style.fontSize=`${e}px`,n.style.lineHeight=`${t/e}`,this._updateMaxDimensions()}_updateFont(){Array.prototype.slice.call(this._hover.contentsDomNode.getElementsByClassName("code")).forEach(t=>this._editor.applyFontInfo(t))}_updateContent(e){const t=this._hover.contentsDomNode;t.style.paddingBottom="",t.textContent="",t.appendChild(e)}_layoutContentWidget(){this._editor.layoutContentWidget(this),this._hover.onContentsChanged()}_updateMaxDimensions(){const e=Math.max(this._editor.getLayoutInfo().height/4,250,Bd._lastDimensions.height),t=Math.max(this._editor.getLayoutInfo().width*.66,500,Bd._lastDimensions.width);this._setHoverWidgetMaxDimensions(t,e)}_render(e,t){this._setHoverData(t),this._updateFont(),this._updateContent(e),this._updateMaxDimensions(),this.onContentsChanged(),this._editor.render()}getPosition(){var e;return this._visibleData?{position:this._visibleData.showAtPosition,secondaryPosition:this._visibleData.showAtSecondaryPosition,positionAffinity:this._visibleData.isBeforeContent?3:void 0,preference:[(e=this._positionPreference)!==null&&e!==void 0?e:1]}:null}showAt(e,t){var n,i,r,a;if(!this._editor||!this._editor.hasModel())return;this._render(e,t);const o=Rf(this._hover.containerDomNode),s=t.showAtPosition;this._positionPreference=(n=this._findPositionPreference(o,s))!==null&&n!==void 0?n:1,this.onContentsChanged(),t.stoleFocus&&this._hover.containerDomNode.focus(),(i=t.colorPicker)===null||i===void 0||i.layout();const l=hmt(this._configurationService.getValue("accessibility.verbosity.hover")===!0&&this._accessibilityService.isScreenReaderOptimized(),(a=(r=this._keybindingService.lookupKeybinding("editor.action.accessibleView"))===null||r===void 0?void 0:r.getAriaLabel())!==null&&a!==void 0?a:"");l&&(this._hover.contentsDomNode.ariaLabel=this._hover.contentsDomNode.textContent+", "+l)}hide(){if(!this._visibleData)return;const e=this._visibleData.stoleFocus||this._hoverFocusedKey.get();this._setHoverData(void 0),this._resizableNode.maxSize=new pu(1/0,1/0),this._resizableNode.clearSashHoverState(),this._hoverFocusedKey.set(!1),this._editor.layoutContentWidget(this),e&&this._editor.focus()}_removeConstraintsRenderNormally(){const e=this._editor.getLayoutInfo();this._resizableNode.layout(e.height,e.width),this._setHoverWidgetDimensions("auto","auto")}_adjustHoverHeightForScrollbar(e){var t;const n=this._hover.containerDomNode,i=this._hover.contentsDomNode,r=(t=this._findMaximumRenderingHeight())!==null&&t!==void 0?t:1/0;this._setContainerDomNodeDimensions(ko(n),Math.min(r,e)),this._setContentsDomNodeDimensions(ko(i),Math.min(r,e-BH))}setMinimumDimensions(e){this._minimumSize=new pu(Math.max(this._minimumSize.width,e.width),Math.max(this._minimumSize.height,e.height)),this._updateMinimumWidth()}_updateMinimumWidth(){const e=typeof this._contentWidth>"u"?this._minimumSize.width:Math.min(this._contentWidth,this._minimumSize.width);this._resizableNode.minSize=new pu(e,this._minimumSize.height)}onContentsChanged(){var e;this._removeConstraintsRenderNormally();const t=this._hover.containerDomNode;let n=Rf(t),i=ko(t);if(this._resizableNode.layout(n,i),this._setHoverWidgetDimensions(i,n),n=Rf(t),i=ko(t),this._contentWidth=i,this._updateMinimumWidth(),this._resizableNode.layout(n,i),this._hasHorizontalScrollbar()&&(this._adjustContentsBottomPadding(),this._adjustHoverHeightForScrollbar(n)),!((e=this._visibleData)===null||e===void 0)&&e.showAtPosition){const r=Rf(this._hover.containerDomNode);this._positionPreference=this._findPositionPreference(r,this._visibleData.showAtPosition)}this._layoutContentWidget()}focus(){this._hover.containerDomNode.focus()}scrollUp(){const e=this._hover.scrollbar.getScrollPosition().scrollTop,t=this._editor.getOption(50);this._hover.scrollbar.setScrollPosition({scrollTop:e-t.lineHeight})}scrollDown(){const e=this._hover.scrollbar.getScrollPosition().scrollTop,t=this._editor.getOption(50);this._hover.scrollbar.setScrollPosition({scrollTop:e+t.lineHeight})}scrollLeft(){const e=this._hover.scrollbar.getScrollPosition().scrollLeft;this._hover.scrollbar.setScrollPosition({scrollLeft:e-Lle})}scrollRight(){const e=this._hover.scrollbar.getScrollPosition().scrollLeft;this._hover.scrollbar.setScrollPosition({scrollLeft:e+Lle})}pageUp(){const e=this._hover.scrollbar.getScrollPosition().scrollTop,t=this._hover.scrollbar.getScrollDimensions().height;this._hover.scrollbar.setScrollPosition({scrollTop:e-t})}pageDown(){const e=this._hover.scrollbar.getScrollPosition().scrollTop,t=this._hover.scrollbar.getScrollDimensions().height;this._hover.scrollbar.setScrollPosition({scrollTop:e+t})}goToTop(){this._hover.scrollbar.setScrollPosition({scrollTop:0})}goToBottom(){this._hover.scrollbar.setScrollPosition({scrollTop:this._hover.scrollbar.getScrollDimensions().scrollHeight})}};lm.ID="editor.contrib.resizableContentHoverWidget";lm._lastDimensions=new pu(0,0);lm=Bd=ste([Wf(1,pt),Wf(2,tu),Wf(3,k4),Wf(4,qu)],lm);let Hw=class extends ne{get hasContent(){return this._hasContent}constructor(e){super(),this._keybindingService=e,this._hasContent=!1,this.hoverElement=wle("div.hover-row.status-bar"),this.actionsElement=me(this.hoverElement,wle("div.actions"))}addAction(e){const t=this._keybindingService.lookupKeybinding(e.commandId),n=t?t.getLabel():null;return this._hasContent=!0,this._register(ate.render(this.actionsElement,e,n))}append(e){const t=me(this.actionsElement,e);return this._hasContent=!0,t}};Hw=ste([Wf(0,qu)],Hw);class Vw{get anchor(){return this._anchor}set anchor(e){this._anchor=e}get shouldFocus(){return this._shouldFocus}set shouldFocus(e){this._shouldFocus=e}get source(){return this._source}set source(e){this._source=e}get insistOnKeepingHoverVisible(){return this._insistOnKeepingHoverVisible}set insistOnKeepingHoverVisible(e){this._insistOnKeepingHoverVisible=e}constructor(e,t){this._editor=e,this._participants=t,this._anchor=null,this._shouldFocus=!1,this._source=0,this._insistOnKeepingHoverVisible=!1}static _getLineDecorations(e,t){if(t.type!==1&&!t.supportsMarkerHover)return[];const n=e.getModel(),i=t.range.startLineNumber;if(i>n.getLineCount())return[];const r=n.getLineMaxColumn(i);return e.getLineDecorations(i).filter(a=>{if(a.options.isWholeLine)return!0;const o=a.range.startLineNumber===i?a.range.startColumn:1,s=a.range.endLineNumber===i?a.range.endColumn:r;if(a.options.showIfCollapsed){if(o>t.range.startColumn+1||t.range.endColumn-1>s)return!1}else if(o>t.range.startColumn||t.range.endColumn>s)return!1;return!0})}computeAsync(e){const t=this._anchor;if(!this._editor.hasModel()||!t)return _i.EMPTY;const n=Vw._getLineDecorations(this._editor,t);return _i.merge(this._participants.map(i=>i.computeAsync?i.computeAsync(t,n,e):_i.EMPTY))}computeSync(){if(!this._editor.hasModel()||!this._anchor)return[];const e=Vw._getLineDecorations(this._editor,this._anchor);let t=[];for(const n of this._participants)t=t.concat(n.computeSync(this._anchor,e));return b1(t)}}function zle(u,e,t,n,i,r){const a=t+i/2,o=n+r/2,s=Math.max(Math.abs(u-a)-i/2,0),l=Math.max(Math.abs(e-o)-r/2,0);return Math.sqrt(s*s+l*l)}const Mle=ve;class bx extends ne{constructor(e,t,n){super(),this._renderDisposeables=this._register(new pe),this._editor=e,this._isVisible=!1,this._messages=[],this._hover=this._register(new AFe),this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible),this._markdownRenderer=this._register(new h4({editor:this._editor},t,n)),this._computer=new bmt(this._editor),this._hoverOperation=this._register(new _Fe(this._editor,this._computer)),this._register(this._hoverOperation.onResult(i=>{this._withResult(i.value)})),this._register(this._editor.onDidChangeModelDecorations(()=>this._onModelDecorationsChanged())),this._register(this._editor.onDidChangeConfiguration(i=>{i.hasChanged(50)&&this._updateFont()})),this._editor.addOverlayWidget(this)}dispose(){this._editor.removeOverlayWidget(this),super.dispose()}getId(){return bx.ID}getDomNode(){return this._hover.containerDomNode}getPosition(){return null}_updateFont(){Array.prototype.slice.call(this._hover.contentsDomNode.getElementsByClassName("code")).forEach(t=>this._editor.applyFontInfo(t))}_onModelDecorationsChanged(){this._isVisible&&(this._hoverOperation.cancel(),this._hoverOperation.start(0))}startShowingAt(e){this._computer.lineNumber!==e&&(this._hoverOperation.cancel(),this.hide(),this._computer.lineNumber=e,this._hoverOperation.start(0))}hide(){this._computer.lineNumber=-1,this._hoverOperation.cancel(),this._isVisible&&(this._isVisible=!1,this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible))}_withResult(e){this._messages=e,this._messages.length>0?this._renderMessages(this._computer.lineNumber,this._messages):this.hide()}_renderMessages(e,t){this._renderDisposeables.clear();const n=document.createDocumentFragment();for(const i of t){const r=Mle("div.hover-row.markdown-hover"),a=me(r,Mle("div.hover-contents")),o=this._renderDisposeables.add(this._markdownRenderer.render(i.value));a.appendChild(o.element),n.appendChild(r)}this._updateContents(n),this._showAt(e)}_updateContents(e){this._hover.contentsDomNode.textContent="",this._hover.contentsDomNode.appendChild(e),this._updateFont()}_showAt(e){this._isVisible||(this._isVisible=!0,this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible));const t=this._editor.getLayoutInfo(),n=this._editor.getTopForLineNumber(e),i=this._editor.getScrollTop(),r=this._editor.getOption(66),a=this._hover.containerDomNode.clientHeight,o=n-i-(a-r)/2;this._hover.containerDomNode.style.left=`${t.glyphMarginLeft+t.glyphMarginWidth}px`,this._hover.containerDomNode.style.top=`${Math.max(Math.round(o),0)}px`}}bx.ID="editor.contrib.modesGlyphHoverWidget";class bmt{get lineNumber(){return this._lineNumber}set lineNumber(e){this._lineNumber=e}constructor(e){this._editor=e,this._lineNumber=-1}computeSync(){const e=i=>({value:i}),t=this._editor.getLineDecorations(this._lineNumber),n=[];if(!t)return n;for(const i of t){if(!i.options.glyphMarginClassName)continue;const r=i.options.glyphMarginHoverMessage;!r||Ev(r)||n.push(...SQ(r).map(e))}return n}}var kmt=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};class Fmt{constructor(e,t,n){this.provider=e,this.hover=t,this.ordinal=n}}function ymt(u,e,t,n,i){return kmt(this,void 0,void 0,function*(){try{const r=yield Promise.resolve(u.provideHover(t,n,i));if(r&&_mt(r))return new Fmt(u,r,e)}catch(r){Mi(r)}})}function lte(u,e,t,n){const r=u.ordered(e).map((a,o)=>ymt(a,o,e,t,n));return _i.fromPromises(r).coalesce()}function Amt(u,e,t,n){return lte(u,e,t,n).map(i=>i.hover).toPromise()}W1("_executeHoverProvider",(u,e,t)=>{const n=u.get(We);return Amt(n.hoverProvider,e,t,Kt.None)});function _mt(u){const e=typeof u.range<"u",t=typeof u.contents<"u"&&u.contents&&u.contents.length>0;return e&&t}var Smt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},j9=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}};const Tle=ve;class Sc{constructor(e,t,n,i,r){this.owner=e,this.range=t,this.contents=n,this.isBeforeContent=i,this.ordinal=r}isValidForHoverAnchor(e){return e.type===1&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}}let $w=class{constructor(e,t,n,i,r){this._editor=e,this._languageService=t,this._openerService=n,this._configurationService=i,this._languageFeaturesService=r,this.hoverOrdinal=3}createLoadingMessage(e){return new Sc(this,e.range,[new Zr().appendText(v("modesContentHover.loading","Loading..."))],!1,2e3)}computeSync(e,t){if(!this._editor.hasModel()||e.type!==1)return[];const n=this._editor.getModel(),i=e.range.startLineNumber,r=n.getLineMaxColumn(i),a=[];let o=1e3;const s=n.getLineLength(i),l=n.getLanguageIdAtPosition(e.range.startLineNumber,e.range.startColumn),c=this._editor.getOption(116),d=this._configurationService.getValue("editor.maxTokenizationLineLength",{overrideIdentifier:l});let h=!1;c>=0&&s>c&&e.range.startColumn>=c&&(h=!0,a.push(new Sc(this,e.range,[{value:v("stopped rendering","Rendering paused for long line for performance reasons. This can be configured via `editor.stopRenderingLineAfter`.")}],!1,o++))),!h&&typeof d=="number"&&s>=d&&a.push(new Sc(this,e.range,[{value:v("too many characters","Tokenization is skipped for long lines for performance reasons. This can be configured via `editor.maxTokenizationLineLength`.")}],!1,o++));let E=!1;for(const m of t){const g=m.range.startLineNumber===i?m.range.startColumn:1,f=m.range.endLineNumber===i?m.range.endColumn:r,p=m.options.hoverMessage;if(!p||Ev(p))continue;m.options.beforeContentClassName&&(E=!0);const D=new j(e.range.startLineNumber,g,e.range.startLineNumber,f);a.push(new Sc(this,D,SQ(p),E,o++))}return a}computeAsync(e,t,n){if(!this._editor.hasModel()||e.type!==1)return _i.EMPTY;const i=this._editor.getModel();if(!this._languageFeaturesService.hoverProvider.has(i))return _i.EMPTY;const r=new ee(e.range.startLineNumber,e.range.startColumn);return lte(this._languageFeaturesService.hoverProvider,i,r,n).filter(a=>!Ev(a.hover.contents)).map(a=>{const o=a.hover.range?j.lift(a.hover.range):e.range;return new Sc(this,o,a.hover.contents,!1,a.ordinal)})}renderHoverParts(e,t){return BFe(e,t,this._editor,this._languageService,this._openerService)}};$w=Smt([j9(1,vn),j9(2,Cs),j9(3,tu),j9(4,We)],$w);function BFe(u,e,t,n,i){e.sort((a,o)=>a.ordinal-o.ordinal);const r=new pe;for(const a of e)for(const o of a.contents){if(Ev(o))continue;const s=Tle("div.hover-row.markdown-hover"),l=me(s,Tle("div.hover-contents")),c=r.add(new h4({editor:t},n,i));r.add(c.onDidRenderAsync(()=>{l.className="hover-contents code-hover-contents",u.onContentsChanged()}));const d=r.add(c.render(o));l.appendChild(d.element),u.fragment.appendChild(s)}return r}var wFe=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},Kw=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}};class Nle{constructor(e,t,n){this.marker=e,this.index=t,this.total=n}}let ZU=class{constructor(e,t,n){this._markerService=t,this._configService=n,this._onDidChange=new Q,this.onDidChange=this._onDidChange.event,this._dispoables=new pe,this._markers=[],this._nextIdx=-1,dt.isUri(e)?this._resourceFilter=o=>o.toString()===e.toString():e&&(this._resourceFilter=e);const i=this._configService.getValue("problems.sortOrder"),r=(o,s)=>{let l=ok(o.resource.toString(),s.resource.toString());return l===0&&(i==="position"?l=j.compareRangesUsingStarts(o,s)||Yn.compare(o.severity,s.severity):l=Yn.compare(o.severity,s.severity)||j.compareRangesUsingStarts(o,s)),l},a=()=>{this._markers=this._markerService.read({resource:dt.isUri(e)?e:void 0,severities:Yn.Error|Yn.Warning|Yn.Info}),typeof e=="function"&&(this._markers=this._markers.filter(o=>this._resourceFilter(o.resource))),this._markers.sort(r)};a(),this._dispoables.add(t.onMarkerChanged(o=>{(!this._resourceFilter||o.some(s=>this._resourceFilter(s)))&&(a(),this._nextIdx=-1,this._onDidChange.fire())}))}dispose(){this._dispoables.dispose(),this._onDidChange.dispose()}matches(e){return!this._resourceFilter&&!e?!0:!this._resourceFilter||!e?!1:this._resourceFilter(e)}get selected(){const e=this._markers[this._nextIdx];return e&&new Nle(e,this._nextIdx+1,this._markers.length)}_initIdx(e,t,n){let i=!1,r=this._markers.findIndex(a=>a.resource.toString()===e.uri.toString());r<0&&(r=X2(this._markers,{resource:e.uri},(a,o)=>ok(a.resource.toString(),o.resource.toString())),r<0&&(r=~r));for(let a=r;ai.resource.toString()===e.toString());if(!(n<0)){for(;n=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},vD=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},XU;class wmt{constructor(e,t,n,i,r){this._openerService=i,this._labelService=r,this._lines=0,this._longestLineLength=0,this._relatedDiagnostics=new WeakMap,this._disposables=new pe,this._editor=t;const a=document.createElement("div");a.className="descriptioncontainer",this._messageBlock=document.createElement("div"),this._messageBlock.classList.add("message"),this._messageBlock.setAttribute("aria-live","assertive"),this._messageBlock.setAttribute("role","alert"),a.appendChild(this._messageBlock),this._relatedBlock=document.createElement("div"),a.appendChild(this._relatedBlock),this._disposables.add(xi(this._relatedBlock,"click",o=>{o.preventDefault();const s=this._relatedDiagnostics.get(o.target);s&&n(s)})),this._scrollable=new dCe(a,{horizontal:1,vertical:1,useShadows:!1,horizontalScrollbarSize:6,verticalScrollbarSize:6}),e.appendChild(this._scrollable.getDomNode()),this._disposables.add(this._scrollable.onScroll(o=>{a.style.left=`-${o.scrollLeft}px`,a.style.top=`-${o.scrollTop}px`})),this._disposables.add(this._scrollable)}dispose(){Su(this._disposables)}update(e){const{source:t,message:n,relatedInformation:i,code:r}=e;let a=((t==null?void 0:t.length)||0)+2;r&&(typeof r=="string"?a+=r.length:a+=r.value.length);const o=F1(n);this._lines=o.length,this._longestLineLength=0;for(const h of o)this._longestLineLength=Math.max(h.length+a,this._longestLineLength);Nr(this._messageBlock),this._messageBlock.setAttribute("aria-label",this.getAriaLabel(e)),this._editor.applyFontInfo(this._messageBlock);let s=this._messageBlock;for(const h of o)s=document.createElement("div"),s.innerText=h,h===""&&(s.style.height=this._messageBlock.style.lineHeight),this._messageBlock.appendChild(s);if(t||r){const h=document.createElement("span");if(h.classList.add("details"),s.appendChild(h),t){const E=document.createElement("span");E.innerText=t,E.classList.add("source"),h.appendChild(E)}if(r)if(typeof r=="string"){const E=document.createElement("span");E.innerText=`(${r})`,E.classList.add("code"),h.appendChild(E)}else{this._codeLink=ve("a.code-link"),this._codeLink.setAttribute("href",`${r.target.toString()}`),this._codeLink.onclick=m=>{this._openerService.open(r.target,{allowCommands:!0}),m.preventDefault(),m.stopPropagation()};const E=me(this._codeLink,ve("span"));E.innerText=r.value,h.appendChild(this._codeLink)}}if(Nr(this._relatedBlock),this._editor.applyFontInfo(this._relatedBlock),pa(i)){const h=this._relatedBlock.appendChild(document.createElement("div"));h.style.paddingTop=`${Math.floor(this._editor.getOption(66)*.66)}px`,this._lines+=1;for(const E of i){const m=document.createElement("div"),g=document.createElement("a");g.classList.add("filename"),g.innerText=`${this._labelService.getUriBasenameLabel(E.resource)}(${E.startLineNumber}, ${E.startColumn}): `,g.title=this._labelService.getUriLabel(E.resource),this._relatedDiagnostics.set(g,E);const f=document.createElement("span");f.innerText=E.message,m.appendChild(g),m.appendChild(f),this._lines+=1,h.appendChild(m)}}const l=this._editor.getOption(50),c=Math.ceil(l.typicalFullwidthCharacterWidth*this._longestLineLength*.75),d=l.lineHeight*this._lines;this._scrollable.setScrollDimensions({scrollWidth:c,scrollHeight:d})}layout(e,t){this._scrollable.getDomNode().style.height=`${e}px`,this._scrollable.getDomNode().style.width=`${t}px`,this._scrollable.setScrollDimensions({width:t,height:e})}getHeightInLines(){return Math.min(17,this._lines)}getAriaLabel(e){let t="";switch(e.severity){case Yn.Error:t=v("Error","Error");break;case Yn.Warning:t=v("Warning","Warning");break;case Yn.Info:t=v("Info","Info");break;case Yn.Hint:t=v("Hint","Hint");break}let n=v("marker aria","{0} at {1}. ",t,e.startLineNumber+":"+e.startColumn);const i=this._editor.getModel();return i&&e.startLineNumber<=i.getLineCount()&&e.startLineNumber>=1&&(n=`${i.getLineContent(e.startLineNumber)}, ${n}`),n}}let kv=XU=class extends Ow{constructor(e,t,n,i,r,a,o){super(e,{showArrow:!0,showFrame:!0,isAccessible:!0,frameWidth:1},r),this._themeService=t,this._openerService=n,this._menuService=i,this._contextKeyService=a,this._labelService=o,this._callOnDispose=new pe,this._onDidSelectRelatedInformation=new Q,this.onDidSelectRelatedInformation=this._onDidSelectRelatedInformation.event,this._severity=Yn.Warning,this._backgroundColor=ae.white,this._applyTheme(t.getColorTheme()),this._callOnDispose.add(t.onDidColorThemeChange(this._applyTheme.bind(this))),this.create()}_applyTheme(e){this._backgroundColor=e.getColor(Tmt);let t=eq,n=Lmt;this._severity===Yn.Warning?(t=p8,n=zmt):this._severity===Yn.Info&&(t=tq,n=Mmt);const i=e.getColor(t),r=e.getColor(n);this.style({arrowColor:i,frameColor:i,headerBackgroundColor:r,primaryHeadingColor:e.getColor(fFe),secondaryHeadingColor:e.getColor(pFe)})}_applyStyles(){this._parentContainer&&(this._parentContainer.style.backgroundColor=this._backgroundColor?this._backgroundColor.toString():""),super._applyStyles()}dispose(){this._callOnDispose.dispose(),super.dispose()}_fillHead(e){super._fillHead(e),this._disposables.add(this._actionbarWidget.actionRunner.onWillRun(i=>this.editor.focus()));const t=[],n=this._menuService.createMenu(XU.TitleMenu,this._contextKeyService);Wbe(n,void 0,t),this._actionbarWidget.push(t,{label:!1,icon:!0,index:0}),n.dispose()}_fillTitleIcon(e){this._icon=me(e,ve(""))}_fillBody(e){this._parentContainer=e,e.classList.add("marker-widget"),this._parentContainer.tabIndex=0,this._parentContainer.setAttribute("role","tooltip"),this._container=document.createElement("div"),e.appendChild(this._container),this._message=new wmt(this._container,this.editor,t=>this._onDidSelectRelatedInformation.fire(t),this._openerService,this._labelService),this._disposables.add(this._message)}show(){throw new Error("call showAtMarker")}showAtMarker(e,t,n){this._container.classList.remove("stale"),this._message.update(e),this._severity=e.severity,this._applyTheme(this._themeService.getColorTheme());const i=j.lift(e),r=this.editor.getPosition(),a=r&&i.containsPosition(r)?r:i.getStartPosition();super.show(a,this.computeRequiredHeight());const o=this.editor.getModel();if(o){const s=n>1?v("problems","{0} of {1} problems",t,n):v("change","{0} of {1} problem",t,n);this.setTitle(O0(o.uri),s)}this._icon.className=`codicon ${QU.className(Yn.toSeverity(this._severity))}`,this.editor.revealPositionNearTop(a,0),this.editor.focus()}updateMarker(e){this._container.classList.remove("stale"),this._message.update(e)}showStale(){this._container.classList.add("stale"),this._relayout()}_doLayoutBody(e,t){super._doLayoutBody(e,t),this._heightInPixel=e,this._message.layout(e,t),this._container.style.height=`${e}px`}_onWidth(e){this._message.layout(this._heightInPixel,e)}_relayout(){super._relayout(this.computeRequiredHeight())}computeRequiredHeight(){return 3+this._message.getHeightInLines()}};kv.TitleMenu=new K("gotoErrorTitleMenu");kv=XU=Bmt([vD(1,sr),vD(2,Cs),vD(3,$1),vD(4,mt),vD(5,pt),vD(6,cv)],kv);const Ple=yk(n1,BXe),Rle=yk(Hs,kk),Ile=yk(Mo,Fk),eq=q("editorMarkerNavigationError.background",{dark:Ple,light:Ple,hcDark:eu,hcLight:eu},v("editorMarkerNavigationError","Editor marker navigation widget error color.")),Lmt=q("editorMarkerNavigationError.headerBackground",{dark:tt(eq,.1),light:tt(eq,.1),hcDark:null,hcLight:null},v("editorMarkerNavigationErrorHeaderBackground","Editor marker navigation widget error heading background.")),p8=q("editorMarkerNavigationWarning.background",{dark:Rle,light:Rle,hcDark:eu,hcLight:eu},v("editorMarkerNavigationWarning","Editor marker navigation widget warning color.")),zmt=q("editorMarkerNavigationWarning.headerBackground",{dark:tt(p8,.1),light:tt(p8,.1),hcDark:"#0C141F",hcLight:tt(p8,.2)},v("editorMarkerNavigationWarningBackground","Editor marker navigation widget warning heading background.")),tq=q("editorMarkerNavigationInfo.background",{dark:Ile,light:Ile,hcDark:eu,hcLight:eu},v("editorMarkerNavigationInfo","Editor marker navigation widget info color.")),Mmt=q("editorMarkerNavigationInfo.headerBackground",{dark:tt(tq,.1),light:tt(tq,.1),hcDark:null,hcLight:null},v("editorMarkerNavigationInfoHeaderBackground","Editor marker navigation widget info heading background.")),Tmt=q("editorMarkerNavigation.background",{dark:rr,light:rr,hcDark:rr,hcLight:rr},v("editorMarkerNavigationBackground","Editor marker navigation widget background."));var Nmt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},H9=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},zFe=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})},wb;let Qm=wb=class{static get(e){return e.getContribution(wb.ID)}constructor(e,t,n,i,r){this._markerNavigationService=t,this._contextKeyService=n,this._editorService=i,this._instantiationService=r,this._sessionDispoables=new pe,this._editor=e,this._widgetVisible=MFe.bindTo(this._contextKeyService)}dispose(){this._cleanUp(),this._sessionDispoables.dispose()}_cleanUp(){this._widgetVisible.reset(),this._sessionDispoables.clear(),this._widget=void 0,this._model=void 0}_getOrCreateModel(e){if(this._model&&this._model.matches(e))return this._model;let t=!1;return this._model&&(t=!0,this._cleanUp()),this._model=this._markerNavigationService.getMarkerList(e),t&&this._model.move(!0,this._editor.getModel(),this._editor.getPosition()),this._widget=this._instantiationService.createInstance(kv,this._editor),this._widget.onDidClose(()=>this.close(),this,this._sessionDispoables),this._widgetVisible.set(!0),this._sessionDispoables.add(this._model),this._sessionDispoables.add(this._widget),this._sessionDispoables.add(this._editor.onDidChangeCursorPosition(n=>{var i,r,a;(!(!((i=this._model)===null||i===void 0)&&i.selected)||!j.containsPosition((r=this._model)===null||r===void 0?void 0:r.selected.marker,n.position))&&((a=this._model)===null||a===void 0||a.resetIndex())})),this._sessionDispoables.add(this._model.onDidChange(()=>{if(!this._widget||!this._widget.position||!this._model)return;const n=this._model.find(this._editor.getModel().uri,this._widget.position);n?this._widget.updateMarker(n.marker):this._widget.showStale()})),this._sessionDispoables.add(this._widget.onDidSelectRelatedInformation(n=>{this._editorService.openCodeEditor({resource:n.resource,options:{pinned:!0,revealIfOpened:!0,selection:j.lift(n).collapseToStart()}},this._editor),this.close(!1)})),this._sessionDispoables.add(this._editor.onDidChangeModel(()=>this._cleanUp())),this._model}close(e=!0){this._cleanUp(),e&&this._editor.focus()}showAtMarker(e){if(this._editor.hasModel()){const t=this._getOrCreateModel(this._editor.getModel().uri);t.resetIndex(),t.move(!0,this._editor.getModel(),new ee(e.startLineNumber,e.startColumn)),t.selected&&this._widget.showAtMarker(t.selected.marker,t.selected.index,t.selected.total)}}nagivate(e,t){var n,i;return zFe(this,void 0,void 0,function*(){if(this._editor.hasModel()){const r=this._getOrCreateModel(t?void 0:this._editor.getModel().uri);if(r.move(e,this._editor.getModel(),this._editor.getPosition()),!r.selected)return;if(r.selected.marker.resource.toString()!==this._editor.getModel().uri.toString()){this._cleanUp();const a=yield this._editorService.openCodeEditor({resource:r.selected.marker.resource,options:{pinned:!1,revealIfOpened:!0,selectionRevealType:2,selection:r.selected.marker}},this._editor);a&&((n=wb.get(a))===null||n===void 0||n.close(),(i=wb.get(a))===null||i===void 0||i.nagivate(e,t))}else this._widget.showAtMarker(r.selected.marker,r.selected.index,r.selected.total)}})}};Qm.ID="editor.contrib.markerController";Qm=wb=Nmt([H9(1,LFe),H9(2,pt),H9(3,Cu),H9(4,mt)],Qm);class ER extends $e{constructor(e,t,n){super(n),this._next=e,this._multiFile=t}run(e,t){var n;return zFe(this,void 0,void 0,function*(){t.hasModel()&&((n=Qm.get(t))===null||n===void 0||n.nagivate(this._next,this._multiFile))})}}class cm extends ER{constructor(){super(!0,!1,{id:cm.ID,label:cm.LABEL,alias:"Go to Next Problem (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:W.focus,primary:578,weight:100},menuOpts:{menuId:kv.TitleMenu,title:cm.LABEL,icon:hi("marker-navigation-next",we.arrowDown,v("nextMarkerIcon","Icon for goto next marker.")),group:"navigation",order:1}})}}cm.ID="editor.action.marker.next";cm.LABEL=v("markerAction.next.label","Go to Next Problem (Error, Warning, Info)");class c3 extends ER{constructor(){super(!1,!1,{id:c3.ID,label:c3.LABEL,alias:"Go to Previous Problem (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:W.focus,primary:1602,weight:100},menuOpts:{menuId:kv.TitleMenu,title:c3.LABEL,icon:hi("marker-navigation-previous",we.arrowUp,v("previousMarkerIcon","Icon for goto previous marker.")),group:"navigation",order:2}})}}c3.ID="editor.action.marker.prev";c3.LABEL=v("markerAction.previous.label","Go to Previous Problem (Error, Warning, Info)");class Pmt extends ER{constructor(){super(!0,!0,{id:"editor.action.marker.nextInFiles",label:v("markerAction.nextInFiles.label","Go to Next Problem in Files (Error, Warning, Info)"),alias:"Go to Next Problem in Files (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:W.focus,primary:66,weight:100},menuOpts:{menuId:K.MenubarGoMenu,title:v({key:"miGotoNextProblem",comment:["&& denotes a mnemonic"]},"Next &&Problem"),group:"6_problem_nav",order:1}})}}class Rmt extends ER{constructor(){super(!1,!0,{id:"editor.action.marker.prevInFiles",label:v("markerAction.previousInFiles.label","Go to Previous Problem in Files (Error, Warning, Info)"),alias:"Go to Previous Problem in Files (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:W.focus,primary:1090,weight:100},menuOpts:{menuId:K.MenubarGoMenu,title:v({key:"miGotoPreviousProblem",comment:["&& denotes a mnemonic"]},"Previous &&Problem"),group:"6_problem_nav",order:2}})}}fu(Qm.ID,Qm,4);be(cm);be(c3);be(Pmt);be(Rmt);const MFe=new Pe("markersNavigationVisible",!1),Imt=xr.bindToContribution(Qm.get);ze(new Imt({id:"closeMarkersNavigation",precondition:MFe,handler:u=>u.close(),kbOpts:{weight:100+50,kbExpr:W.focus,primary:9,secondary:[1033]}}));var Omt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},wH=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}};const tl=ve;class jmt{constructor(e,t,n){this.owner=e,this.range=t,this.marker=n}isValidForHoverAnchor(e){return e.type===1&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}}const Ole={type:1,filter:{include:gt.QuickFix},triggerAction:fs.QuickFixHover};let uq=class{constructor(e,t,n,i){this._editor=e,this._markerDecorationsService=t,this._openerService=n,this._languageFeaturesService=i,this.hoverOrdinal=1,this.recentMarkerCodeActionsInfo=void 0}computeSync(e,t){if(!this._editor.hasModel()||e.type!==1&&!e.supportsMarkerHover)return[];const n=this._editor.getModel(),i=e.range.startLineNumber,r=n.getLineMaxColumn(i),a=[];for(const o of t){const s=o.range.startLineNumber===i?o.range.startColumn:1,l=o.range.endLineNumber===i?o.range.endColumn:r,c=this._markerDecorationsService.getMarker(n.uri,o);if(!c)continue;const d=new j(e.range.startLineNumber,s,e.range.startLineNumber,l);a.push(new jmt(this,d,c))}return a}renderHoverParts(e,t){if(!t.length)return ne.None;const n=new pe;t.forEach(r=>e.fragment.appendChild(this.renderMarkerHover(r,n)));const i=t.length===1?t[0]:t.sort((r,a)=>Yn.compare(r.marker.severity,a.marker.severity))[0];return this.renderMarkerStatusbar(e,i,n),n}renderMarkerHover(e,t){const n=tl("div.hover-row"),i=me(n,tl("div.marker.hover-contents")),{source:r,message:a,code:o,relatedInformation:s}=e.marker;this._editor.applyFontInfo(i);const l=me(i,tl("span"));if(l.style.whiteSpace="pre-wrap",l.innerText=a,r||o)if(o&&typeof o!="string"){const c=tl("span");if(r){const m=me(c,tl("span"));m.innerText=r}const d=me(c,tl("a.code-link"));d.setAttribute("href",o.target.toString()),t.add(ce(d,"click",m=>{this._openerService.open(o.target,{allowCommands:!0}),m.preventDefault(),m.stopPropagation()}));const h=me(d,tl("span"));h.innerText=o.value;const E=me(i,c);E.style.opacity="0.6",E.style.paddingLeft="6px"}else{const c=me(i,tl("span"));c.style.opacity="0.6",c.style.paddingLeft="6px",c.innerText=r&&o?`${r}(${o})`:r||`(${o})`}if(pa(s))for(const{message:c,resource:d,startLineNumber:h,startColumn:E}of s){const m=me(i,tl("div"));m.style.marginTop="8px";const g=me(m,tl("a"));g.innerText=`${O0(d)}(${h}, ${E}): `,g.style.cursor="pointer",t.add(ce(g,"click",p=>{p.stopPropagation(),p.preventDefault(),this._openerService&&this._openerService.open(d,{fromUserGesture:!0,editorOptions:{selection:{startLineNumber:h,startColumn:E}}}).catch(zt)}));const f=me(m,tl("span"));f.innerText=c,this._editor.applyFontInfo(f)}return n}renderMarkerStatusbar(e,t,n){if((t.marker.severity===Yn.Error||t.marker.severity===Yn.Warning||t.marker.severity===Yn.Info)&&e.statusBar.addAction({label:v("view problem","View Problem"),commandId:cm.ID,run:()=>{var i;e.hide(),(i=Qm.get(this._editor))===null||i===void 0||i.showAtMarker(t.marker),this._editor.focus()}}),!this._editor.getOption(90)){const i=e.statusBar.append(tl("div"));this.recentMarkerCodeActionsInfo&&(gw.makeKey(this.recentMarkerCodeActionsInfo.marker)===gw.makeKey(t.marker)?this.recentMarkerCodeActionsInfo.hasCodeActions||(i.textContent=v("noQuickFixes","No quick fixes available")):this.recentMarkerCodeActionsInfo=void 0);const r=this.recentMarkerCodeActionsInfo&&!this.recentMarkerCodeActionsInfo.hasCodeActions?ne.None:n.add(Rm(()=>i.textContent=v("checkingForQuickFixes","Checking for quick fixes..."),200));i.textContent||(i.textContent=String.fromCharCode(160));const a=this.getCodeActions(t.marker);n.add(ft(()=>a.cancel())),a.then(o=>{if(r.dispose(),this.recentMarkerCodeActionsInfo={marker:t.marker,hasCodeActions:o.validActions.length>0},!this.recentMarkerCodeActionsInfo.hasCodeActions){o.dispose(),i.textContent=v("noQuickFixes","No quick fixes available");return}i.style.display="none";let s=!1;n.add(ft(()=>{s||o.dispose()})),e.statusBar.addAction({label:v("quick fixes","Quick Fix..."),commandId:Qee,run:l=>{s=!0;const c=Um.get(this._editor),d=ji(l);e.hide(),c==null||c.showCodeActions(Ole,o,{x:d.left,y:d.top,width:d.width,height:d.height})}})},zt)}}getCodeActions(e){return Ui(t=>p2(this._languageFeaturesService.codeActionProvider,this._editor.getModel(),new j(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn),Ole,Yh.None,t))}};uq=Omt([wH(1,mX),wH(2,Cs),wH(3,We)],uq);const TFe="editor.action.inlineSuggest.commit",NFe="editor.action.inlineSuggest.showPrevious",PFe="editor.action.inlineSuggest.showNext";var Hmt=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};class Vmt extends ne{constructor(e,t,n={orientation:0}){super(),this.submenuActionViewItems=[],this.hasSecondaryActions=!1,this._onDidChangeDropdownVisibility=this._register(new $Ue),this.onDidChangeDropdownVisibility=this._onDidChangeDropdownVisibility.event,this.disposables=this._register(new pe),this.options=n,this.lookupKeybindings=typeof this.options.getKeyBinding=="function",this.toggleMenuAction=this._register(new cF(()=>{var i;return(i=this.toggleMenuActionViewItem)===null||i===void 0?void 0:i.show()},n.toggleMenuTitle)),this.element=document.createElement("div"),this.element.className="monaco-toolbar",e.appendChild(this.element),this.actionBar=this._register(new j0(this.element,{orientation:n.orientation,ariaLabel:n.ariaLabel,actionRunner:n.actionRunner,allowContextMenu:n.allowContextMenu,highlightToggledItems:n.highlightToggledItems,actionViewItemProvider:(i,r)=>{var a;if(i.id===cF.ID)return this.toggleMenuActionViewItem=new sw(i,i.menuActions,t,{actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,keybindingProvider:this.options.getKeyBinding,classNames:st.asClassNameArray((a=n.moreIcon)!==null&&a!==void 0?a:we.toolBarMore),anchorAlignmentProvider:this.options.anchorAlignmentProvider,menuAsChild:!!this.options.renderDropdownAsChildElement,skipTelemetry:this.options.skipTelemetry}),this.toggleMenuActionViewItem.setActionContext(this.actionBar.context),this.disposables.add(this._onDidChangeDropdownVisibility.add(this.toggleMenuActionViewItem.onDidChangeVisibility)),this.toggleMenuActionViewItem;if(n.actionViewItemProvider){const o=n.actionViewItemProvider(i,r);if(o)return o}if(i instanceof Zx){const o=new sw(i,i.actions,t,{actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,keybindingProvider:this.options.getKeyBinding,classNames:i.class,anchorAlignmentProvider:this.options.anchorAlignmentProvider,menuAsChild:!!this.options.renderDropdownAsChildElement,skipTelemetry:this.options.skipTelemetry});return o.setActionContext(this.actionBar.context),this.submenuActionViewItems.push(o),this.disposables.add(this._onDidChangeDropdownVisibility.add(o.onDidChangeVisibility)),o}}}))}set actionRunner(e){this.actionBar.actionRunner=e}get actionRunner(){return this.actionBar.actionRunner}getElement(){return this.element}getItemAction(e){return this.actionBar.getAction(e)}setActions(e,t){this.clear();const n=e?e.slice(0):[];this.hasSecondaryActions=!!(t&&t.length>0),this.hasSecondaryActions&&t&&(this.toggleMenuAction.menuActions=t.slice(0),n.push(this.toggleMenuAction)),n.forEach(i=>{this.actionBar.push(i,{icon:!0,label:!1,keybinding:this.getKeybindingLabel(i)})})}getKeybindingLabel(e){var t,n,i;const r=this.lookupKeybindings?(n=(t=this.options).getKeyBinding)===null||n===void 0?void 0:n.call(t,e):void 0;return(i=r==null?void 0:r.getLabel())!==null&&i!==void 0?i:void 0}clear(){this.submenuActionViewItems=[],this.disposables.clear(),this.actionBar.clear()}dispose(){this.clear(),this.disposables.dispose(),super.dispose()}}class cF extends ro{constructor(e,t){t=t||v("moreActions","More Actions..."),super(cF.ID,t,void 0,!0),this._menuActions=[],this.toggleDropdownMenu=e}run(){return Hmt(this,void 0,void 0,function*(){this.toggleDropdownMenu()})}get menuActions(){return this._menuActions}set menuActions(e){this._menuActions=e}}cF.ID="toolbar.toggle.more";var $mt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},yC=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}};let nq=class extends Vmt{constructor(e,t,n,i,r,a,o){super(e,r,Object.assign(Object.assign({getKeyBinding:l=>{var c;return(c=a.lookupKeybinding(l.id))!==null&&c!==void 0?c:void 0}},t),{allowContextMenu:!0,skipTelemetry:typeof(t==null?void 0:t.telemetrySource)=="string"})),this._options=t,this._menuService=n,this._contextKeyService=i,this._contextMenuService=r,this._sessionDisposables=this._store.add(new pe);const s=t==null?void 0:t.telemetrySource;s&&this._store.add(this.actionBar.onDidRun(l=>o.publicLog2("workbenchActionExecuted",{id:l.action.id,from:s})))}setActions(e,t=[],n){var i,r,a;this._sessionDisposables.clear();const o=e.slice(),s=t.slice(),l=[];let c=0;const d=[];let h=!1;if(((i=this._options)===null||i===void 0?void 0:i.hiddenItemStrategy)!==-1)for(let E=0;Ef==null?void 0:f.id)),m=this._options.overflowBehavior.maxItems-E.size;let g=0;for(let f=0;f=m&&(o[f]=void 0,d[f]=p))}}Kre(o),Kre(d),super.setActions(o,Dr.join(d,s)),l.length>0&&this._sessionDisposables.add(ce(this.getElement(),"contextmenu",E=>{var m,g,f,p,D;const x=new x0(E),b=this.getItemAction(x.target);if(!b)return;x.preventDefault(),x.stopPropagation();let k=!1;if(c===1&&((m=this._options)===null||m===void 0?void 0:m.hiddenItemStrategy)===0){k=!0;for(let S=0;Sthis._menuService.resetHiddenStates(n)}))),this._contextMenuService.showContextMenu({getAnchor:()=>x,getActions:()=>F,menuId:(f=this._options)===null||f===void 0?void 0:f.contextMenu,menuActionOptions:Object.assign({renderShortTitle:!0},(p=this._options)===null||p===void 0?void 0:p.menuOptions),skipTelemetry:typeof((D=this._options)===null||D===void 0?void 0:D.telemetrySource)=="string",contextKeyService:this._contextKeyService})}))}};nq=$mt([yC(2,$1),yC(3,pt),yC(4,Wl),yC(5,qu),yC(6,i0)],nq);var cte=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},Bc=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},D8;let iq=class extends ne{constructor(e,t,n){super(),this.editor=e,this.model=t,this.instantiationService=n,this.alwaysShowToolbar=zr(this.editor.onDidChangeConfiguration,()=>this.editor.getOption(62).showToolbar==="always"),this.sessionPosition=void 0,this.position=uu(this,i=>{var r,a,o;const s=(r=this.model.read(i))===null||r===void 0?void 0:r.ghostText.read(i);if(!this.alwaysShowToolbar.read(i)||!s||s.parts.length===0)return this.sessionPosition=void 0,null;const l=s.parts[0].column;this.sessionPosition&&this.sessionPosition.lineNumber!==s.lineNumber&&(this.sessionPosition=void 0);const c=new ee(s.lineNumber,Math.min(l,(o=(a=this.sessionPosition)===null||a===void 0?void 0:a.column)!==null&&o!==void 0?o:Number.MAX_SAFE_INTEGER));return this.sessionPosition=c,c}),this._register(es((i,r)=>{const a=this.model.read(i);if(!a||!this.alwaysShowToolbar.read(i))return;const o=r.add(this.instantiationService.createInstance(Xm,this.editor,!0,this.position,a.selectedInlineCompletionIndex,a.inlineCompletionsCount,a.selectedInlineCompletion.map(s=>{var l;return(l=s==null?void 0:s.inlineCompletion.source.inlineCompletions.commands)!==null&&l!==void 0?l:[]})));e.addContentWidget(o),r.add(ft(()=>e.removeContentWidget(o))),r.add(Xu(s=>{this.position.read(s)&&a.lastTriggerKind.read(s)!==qh.Explicit&&a.triggerExplicitly()}))}))}};iq=cte([Bc(2,mt)],iq);const Kmt=hi("inline-suggestion-hints-next",we.chevronRight,v("parameterHintsNextIcon","Icon for show next parameter hint.")),Wmt=hi("inline-suggestion-hints-previous",we.chevronLeft,v("parameterHintsPreviousIcon","Icon for show previous parameter hint."));let Xm=D8=class extends ne{static get dropDownVisible(){return this._dropDownVisible}createCommandAction(e,t,n){const i=new ro(e,t,n,!0,()=>this._commandService.executeCommand(e)),r=this.keybindingService.lookupKeybinding(e,this._contextKeyService);let a=t;return r&&(a=v({key:"content",comment:["A label","A keybinding"]},"{0} ({1})",t,r.getLabel())),i.tooltip=a,i}constructor(e,t,n,i,r,a,o,s,l,c,d){super(),this.editor=e,this.withBorder=t,this._position=n,this._currentSuggestionIdx=i,this._suggestionCount=r,this._extraCommands=a,this._commandService=o,this.keybindingService=l,this._contextKeyService=c,this._menuService=d,this.id=`InlineSuggestionHintsContentWidget${D8.id++}`,this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this.nodes=yr("div.inlineSuggestionsHints",{className:this.withBorder?".withBorder":""},[yr("div@toolBar")]),this.previousAction=this.createCommandAction(NFe,v("previous","Previous"),st.asClassName(Wmt)),this.availableSuggestionCountAction=new ro("inlineSuggestionHints.availableSuggestionCount","",void 0,!1),this.nextAction=this.createCommandAction(PFe,v("next","Next"),st.asClassName(Kmt)),this.inlineCompletionsActionsMenus=this._register(this._menuService.createMenu(K.InlineCompletionsActions,this._contextKeyService)),this.clearAvailableSuggestionCountLabelDebounced=this._register(new Hu(()=>{this.availableSuggestionCountAction.label=""},100)),this.disableButtonsDebounced=this._register(new Hu(()=>{this.previousAction.enabled=this.nextAction.enabled=!1},100)),this.lastCommands=[],this.toolBar=this._register(s.createInstance(rq,this.nodes.toolBar,K.InlineSuggestionToolbar,{menuOptions:{renderShortTitle:!0},toolbarOptions:{primaryGroup:h=>h.startsWith("primary")},actionViewItemProvider:(h,E)=>{if(h instanceof zl)return s.createInstance(Umt,h,void 0);if(h===this.availableSuggestionCountAction){const m=new Gmt(void 0,h,{label:!0,icon:!1});return m.setClass("availableSuggestionCount"),m}},telemetrySource:"InlineSuggestionToolbar"})),this.toolBar.setPrependedPrimaryActions([this.previousAction,this.availableSuggestionCountAction,this.nextAction]),this._register(this.toolBar.onDidChangeDropdownVisibility(h=>{D8._dropDownVisible=h})),this._register(Xu(h=>{this._position.read(h),this.editor.layoutContentWidget(this)})),this._register(Xu(h=>{const E=this._suggestionCount.read(h),m=this._currentSuggestionIdx.read(h);E!==void 0?(this.clearAvailableSuggestionCountLabelDebounced.cancel(),this.availableSuggestionCountAction.label=`${m+1}/${E}`):this.clearAvailableSuggestionCountLabelDebounced.schedule(),E!==void 0&&E>1?(this.disableButtonsDebounced.cancel(),this.previousAction.enabled=this.nextAction.enabled=!0):this.disableButtonsDebounced.schedule()})),this._register(Xu(h=>{const E=this._extraCommands.read(h);if(di(this.lastCommands,E))return;this.lastCommands=E;const m=E.map(g=>({class:void 0,id:g.id,enabled:!0,tooltip:g.tooltip||"",label:g.title,run:f=>this._commandService.executeCommand(g.id)}));for(const[g,f]of this.inlineCompletionsActionsMenus.getActions())for(const p of f)p instanceof zl&&m.push(p);m.length>0&&m.unshift(new Dr),this.toolBar.setAdditionalSecondaryActions(m)}))}getId(){return this.id}getDomNode(){return this.nodes.root}getPosition(){return{position:this._position.get(),preference:[1,2],positionAffinity:3}}};Xm._dropDownVisible=!1;Xm.id=0;Xm=D8=cte([Bc(6,ni),Bc(7,mt),Bc(8,qu),Bc(9,pt),Bc(10,$1)],Xm);class Gmt extends mv{constructor(){super(...arguments),this._className=void 0}setClass(e){this._className=e}render(e){super.render(e),this._className&&e.classList.add(this._className)}}let Umt=class extends N3{updateLabel(){const e=this._keybindingService.lookupKeybinding(this._action.id,this._contextKeyService);if(!e)return super.updateLabel();if(this.label){const t=yr("div.keybinding").root;new FA(t,Os,Object.assign({disableTitle:!0},Tlt)).set(e),this.label.textContent=this._action.label,this.label.appendChild(t),this.label.classList.add("inlineSuggestionStatusBarItemLabel")}}},rq=class extends nq{constructor(e,t,n,i,r,a,o,s){super(e,Object.assign({resetMenu:t},n),i,r,a,o,s),this.menuId=t,this.options2=n,this.menuService=i,this.contextKeyService=r,this.menu=this._store.add(this.menuService.createMenu(this.menuId,this.contextKeyService,{emitEventsForSubmenuChanges:!0})),this.additionalActions=[],this.prependedPrimaryActions=[],this._store.add(this.menu.onDidChange(()=>this.updateToolbar())),this.updateToolbar()}updateToolbar(){var e,t,n,i,r,a,o;const s=[],l=[];Wbe(this.menu,(e=this.options2)===null||e===void 0?void 0:e.menuOptions,{primary:s,secondary:l},(n=(t=this.options2)===null||t===void 0?void 0:t.toolbarOptions)===null||n===void 0?void 0:n.primaryGroup,(r=(i=this.options2)===null||i===void 0?void 0:i.toolbarOptions)===null||r===void 0?void 0:r.shouldInlineSubmenu,(o=(a=this.options2)===null||a===void 0?void 0:a.toolbarOptions)===null||o===void 0?void 0:o.useSeparatorsInPrimaryActions),l.push(...this.additionalActions),s.unshift(...this.prependedPrimaryActions),this.setActions(s,l)}setPrependedPrimaryActions(e){di(this.prependedPrimaryActions,e,(t,n)=>t===n)||(this.prependedPrimaryActions=e,this.updateToolbar())}setAdditionalSecondaryActions(e){di(this.additionalActions,e,(t,n)=>t===n)||(this.additionalActions=e,this.updateToolbar())}};rq=cte([Bc(3,$1),Bc(4,pt),Bc(5,Wl),Bc(6,qu),Bc(7,i0)],rq);var qmt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},V9=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},aq;const Jmt=!1;let Io=aq=class extends ne{static get(e){return e.getContribution(aq.ID)}constructor(e,t,n,i,r){super(),this._editor=e,this._instantiationService=t,this._openerService=n,this._languageService=i,this._keybindingService=r,this._toUnhook=new pe,this._hoverActivatedByColorDecoratorClick=!1,this._isMouseDown=!1,this._hoverClicked=!1,this._contentWidget=null,this._glyphWidget=null,this._reactToEditorMouseMoveRunner=this._register(new Hu(()=>this._reactToEditorMouseMove(this._mouseMoveEvent),0)),this._hookEvents(),this._register(this._editor.onDidChangeConfiguration(a=>{a.hasChanged(60)&&(this._unhookEvents(),this._hookEvents())})),this._register(this._editor.onMouseLeave(()=>{this._mouseMoveEvent=void 0,this._reactToEditorMouseMoveRunner.cancel()}))}_hookEvents(){const e=()=>this._hideWidgets(),t=this._editor.getOption(60);this._isHoverEnabled=t.enabled,this._isHoverSticky=t.sticky,this._hidingDelay=t.hidingDelay,this._isHoverEnabled?(this._toUnhook.add(this._editor.onMouseDown(n=>this._onEditorMouseDown(n))),this._toUnhook.add(this._editor.onMouseUp(n=>this._onEditorMouseUp(n))),this._toUnhook.add(this._editor.onMouseMove(n=>this._onEditorMouseMove(n))),this._toUnhook.add(this._editor.onKeyDown(n=>this._onKeyDown(n)))):(this._toUnhook.add(this._editor.onMouseMove(n=>this._onEditorMouseMove(n))),this._toUnhook.add(this._editor.onKeyDown(n=>this._onKeyDown(n)))),this._toUnhook.add(this._editor.onMouseLeave(n=>this._onEditorMouseLeave(n))),this._toUnhook.add(this._editor.onDidChangeModel(e)),this._toUnhook.add(this._editor.onDidScrollChange(n=>this._onEditorScrollChanged(n)))}_unhookEvents(){this._toUnhook.clear()}_onEditorScrollChanged(e){(e.scrollTopChanged||e.scrollLeftChanged)&&this._hideWidgets()}_onEditorMouseDown(e){var t;this._isMouseDown=!0;const n=e.target;if(n.type===9&&n.detail===lm.ID){this._hoverClicked=!0;return}n.type===12&&n.detail===bx.ID||(n.type!==12&&(this._hoverClicked=!1),!((t=this._contentWidget)===null||t===void 0)&&t.widget.isResizing||this._hideWidgets())}_onEditorMouseUp(e){this._isMouseDown=!1}_onEditorMouseLeave(e){var t,n;const i=e.event.browserEvent.relatedTarget;!((t=this._contentWidget)===null||t===void 0)&&t.widget.isResizing||!((n=this._contentWidget)===null||n===void 0)&&n.containsNode(i)||this._hideWidgets()}_isMouseOverWidget(e){var t,n,i,r,a;const o=e.target;return!!(this._isHoverSticky&&o.type===9&&o.detail===lm.ID||this._isHoverSticky&&(!((t=this._contentWidget)===null||t===void 0)&&t.containsNode((n=e.event.browserEvent.view)===null||n===void 0?void 0:n.document.activeElement))&&!(!((r=(i=e.event.browserEvent.view)===null||i===void 0?void 0:i.getSelection())===null||r===void 0)&&r.isCollapsed)||!this._isHoverSticky&&o.type===9&&o.detail===lm.ID&&(!((a=this._contentWidget)===null||a===void 0)&&a.isColorPickerVisible)||this._isHoverSticky&&o.type===12&&o.detail===bx.ID)}_onEditorMouseMove(e){var t,n,i,r;if(this._mouseMoveEvent=e,!((t=this._contentWidget)===null||t===void 0)&&t.isFocused||!((n=this._contentWidget)===null||n===void 0)&&n.isResizing||this._isMouseDown&&this._hoverClicked||this._isHoverSticky&&(!((i=this._contentWidget)===null||i===void 0)&&i.isVisibleFromKeyboard))return;if(this._isMouseOverWidget(e)){this._reactToEditorMouseMoveRunner.cancel();return}if(!((r=this._contentWidget)===null||r===void 0)&&r.isVisible&&this._isHoverSticky&&this._hidingDelay>0){this._reactToEditorMouseMoveRunner.isScheduled()||this._reactToEditorMouseMoveRunner.schedule(this._hidingDelay);return}this._reactToEditorMouseMove(e)}_reactToEditorMouseMove(e){var t,n,i;if(!e)return;const r=e.target,a=(t=r.element)===null||t===void 0?void 0:t.classList.contains("colorpicker-color-decoration"),o=this._editor.getOption(146);if(a&&(o==="click"&&!this._hoverActivatedByColorDecoratorClick||o==="hover"&&!this._isHoverEnabled&&!Jmt||o==="clickAndHover"&&!this._isHoverEnabled&&!this._hoverActivatedByColorDecoratorClick)||!a&&!this._isHoverEnabled&&!this._hoverActivatedByColorDecoratorClick){this._hideWidgets();return}if(this._getOrCreateContentWidget().maybeShowAt(e)){(n=this._glyphWidget)===null||n===void 0||n.hide();return}if(r.type===2&&r.position){(i=this._contentWidget)===null||i===void 0||i.hide(),this._glyphWidget||(this._glyphWidget=new bx(this._editor,this._languageService,this._openerService)),this._glyphWidget.startShowingAt(r.position.lineNumber);return}this._hideWidgets()}_onKeyDown(e){var t;if(!this._editor.hasModel())return;const n=this._keybindingService.softDispatch(e,this._editor.getDomNode()),i=n.kind===1||n.kind===2&&n.commandId==="editor.action.showHover"&&((t=this._contentWidget)===null||t===void 0?void 0:t.isVisible);e.keyCode!==5&&e.keyCode!==6&&e.keyCode!==57&&e.keyCode!==4&&!i&&this._hideWidgets()}_hideWidgets(){var e,t,n;this._isMouseDown&&this._hoverClicked&&(!((e=this._contentWidget)===null||e===void 0)&&e.isColorPickerVisible)||Xm.dropDownVisible||(this._hoverActivatedByColorDecoratorClick=!1,this._hoverClicked=!1,(t=this._glyphWidget)===null||t===void 0||t.hide(),(n=this._contentWidget)===null||n===void 0||n.hide())}_getOrCreateContentWidget(){return this._contentWidget||(this._contentWidget=this._instantiationService.createInstance(jw,this._editor)),this._contentWidget}showContentHover(e,t,n,i,r=!1){this._hoverActivatedByColorDecoratorClick=r,this._getOrCreateContentWidget().startShowingAtRange(e,t,n,i)}focus(){var e;(e=this._contentWidget)===null||e===void 0||e.focus()}scrollUp(){var e;(e=this._contentWidget)===null||e===void 0||e.scrollUp()}scrollDown(){var e;(e=this._contentWidget)===null||e===void 0||e.scrollDown()}scrollLeft(){var e;(e=this._contentWidget)===null||e===void 0||e.scrollLeft()}scrollRight(){var e;(e=this._contentWidget)===null||e===void 0||e.scrollRight()}pageUp(){var e;(e=this._contentWidget)===null||e===void 0||e.pageUp()}pageDown(){var e;(e=this._contentWidget)===null||e===void 0||e.pageDown()}goToTop(){var e;(e=this._contentWidget)===null||e===void 0||e.goToTop()}goToBottom(){var e;(e=this._contentWidget)===null||e===void 0||e.goToBottom()}get isColorPickerVisible(){var e;return(e=this._contentWidget)===null||e===void 0?void 0:e.isColorPickerVisible}get isHoverVisible(){var e;return(e=this._contentWidget)===null||e===void 0?void 0:e.isVisible}dispose(){var e,t;super.dispose(),this._unhookEvents(),this._toUnhook.dispose(),(e=this._glyphWidget)===null||e===void 0||e.dispose(),(t=this._contentWidget)===null||t===void 0||t.dispose()}};Io.ID="editor.contrib.hover";Io=aq=qmt([V9(1,mt),V9(2,Cs),V9(3,vn),V9(4,qu)],Io);class Zmt extends $e{constructor(){super({id:"editor.action.showHover",label:v({key:"showOrFocusHover",comment:["Label for action that will trigger the showing/focusing of a hover in the editor.","If the hover is not visible, it will show the hover.","This allows for users to show the hover without using the mouse.","If the hover is already visible, it will take focus."]},"Show or Focus Hover"),description:{description:"Show or Focus Hover",args:[{name:"args",schema:{type:"object",properties:{focus:{description:"Controls if when triggered with the keyboard, the hover should take focus immediately.",type:"boolean",default:!1}}}}]},alias:"Show or Focus Hover",precondition:void 0,kbOpts:{kbExpr:W.editorTextFocus,primary:Vi(2089,2087),weight:100}})}run(e,t,n){if(!t.hasModel())return;const i=Io.get(t);if(!i)return;const r=t.getPosition(),a=new j(r.lineNumber,r.column,r.lineNumber,r.column),o=t.getOption(2)===2||!!(n!=null&&n.focus);i.isHoverVisible?i.focus():i.showContentHover(a,1,1,o)}}class Ymt extends $e{constructor(){super({id:"editor.action.showDefinitionPreviewHover",label:v({key:"showDefinitionPreviewHover",comment:["Label for action that will trigger the showing of definition preview hover in the editor.","This allows for users to show the definition preview hover without using the mouse."]},"Show Definition Preview Hover"),alias:"Show Definition Preview Hover",precondition:void 0})}run(e,t){const n=Io.get(t);if(!n)return;const i=t.getPosition();if(!i)return;const r=new j(i.lineNumber,i.column,i.lineNumber,i.column),a=W3.get(t);if(!a)return;a.startFindDefinitionFromCursor(i).then(()=>{n.showContentHover(r,1,1,!0)})}}class Qmt extends $e{constructor(){super({id:"editor.action.scrollUpHover",label:v({key:"scrollUpHover",comment:["Action that allows to scroll up in the hover widget with the up arrow when the hover widget is focused."]},"Scroll Up Hover"),alias:"Scroll Up Hover",precondition:W.hoverFocused,kbOpts:{kbExpr:W.hoverFocused,primary:16,weight:100}})}run(e,t){const n=Io.get(t);n&&n.scrollUp()}}class Xmt extends $e{constructor(){super({id:"editor.action.scrollDownHover",label:v({key:"scrollDownHover",comment:["Action that allows to scroll down in the hover widget with the up arrow when the hover widget is focused."]},"Scroll Down Hover"),alias:"Scroll Down Hover",precondition:W.hoverFocused,kbOpts:{kbExpr:W.hoverFocused,primary:18,weight:100}})}run(e,t){const n=Io.get(t);n&&n.scrollDown()}}class egt extends $e{constructor(){super({id:"editor.action.scrollLeftHover",label:v({key:"scrollLeftHover",comment:["Action that allows to scroll left in the hover widget with the left arrow when the hover widget is focused."]},"Scroll Left Hover"),alias:"Scroll Left Hover",precondition:W.hoverFocused,kbOpts:{kbExpr:W.hoverFocused,primary:15,weight:100}})}run(e,t){const n=Io.get(t);n&&n.scrollLeft()}}class tgt extends $e{constructor(){super({id:"editor.action.scrollRightHover",label:v({key:"scrollRightHover",comment:["Action that allows to scroll right in the hover widget with the right arrow when the hover widget is focused."]},"Scroll Right Hover"),alias:"Scroll Right Hover",precondition:W.hoverFocused,kbOpts:{kbExpr:W.hoverFocused,primary:17,weight:100}})}run(e,t){const n=Io.get(t);n&&n.scrollRight()}}class ugt extends $e{constructor(){super({id:"editor.action.pageUpHover",label:v({key:"pageUpHover",comment:["Action that allows to page up in the hover widget with the page up command when the hover widget is focused."]},"Page Up Hover"),alias:"Page Up Hover",precondition:W.hoverFocused,kbOpts:{kbExpr:W.hoverFocused,primary:11,secondary:[528],weight:100}})}run(e,t){const n=Io.get(t);n&&n.pageUp()}}class ngt extends $e{constructor(){super({id:"editor.action.pageDownHover",label:v({key:"pageDownHover",comment:["Action that allows to page down in the hover widget with the page down command when the hover widget is focused."]},"Page Down Hover"),alias:"Page Down Hover",precondition:W.hoverFocused,kbOpts:{kbExpr:W.hoverFocused,primary:12,secondary:[530],weight:100}})}run(e,t){const n=Io.get(t);n&&n.pageDown()}}class igt extends $e{constructor(){super({id:"editor.action.goToTopHover",label:v({key:"goToTopHover",comment:["Action that allows to go to the top of the hover widget with the home command when the hover widget is focused."]},"Go To Top Hover"),alias:"Go To Bottom Hover",precondition:W.hoverFocused,kbOpts:{kbExpr:W.hoverFocused,primary:14,secondary:[2064],weight:100}})}run(e,t){const n=Io.get(t);n&&n.goToTop()}}class rgt extends $e{constructor(){super({id:"editor.action.goToBottomHover",label:v({key:"goToBottomHover",comment:["Action that allows to go to the bottom in the hover widget with the end command when the hover widget is focused."]},"Go To Bottom Hover"),alias:"Go To Bottom Hover",precondition:W.hoverFocused,kbOpts:{kbExpr:W.hoverFocused,primary:13,secondary:[2066],weight:100}})}run(e,t){const n=Io.get(t);n&&n.goToBottom()}}fu(Io.ID,Io,2);be(Zmt);be(Ymt);be(Qmt);be(Xmt);be(egt);be(tgt);be(ugt);be(ngt);be(igt);be(rgt);$p.register($w);$p.register(uq);Kl((u,e)=>{const t=u.getColor(KXe);t&&(e.addRule(`.monaco-editor .monaco-hover .hover-row:not(:first-child):not(:empty) { border-top: 1px solid ${t.transparent(.5)}; }`),e.addRule(`.monaco-editor .monaco-hover hr { border-top: 1px solid ${t.transparent(.5)}; }`),e.addRule(`.monaco-editor .monaco-hover hr { border-bottom: 0px solid ${t.transparent(.5)}; }`))});class oq extends ne{constructor(e){super(),this._editor=e,this._register(e.onMouseDown(t=>this.onMouseDown(t)))}dispose(){super.dispose()}onMouseDown(e){const t=this._editor.getOption(146);if(t!=="click"&&t!=="clickAndHover")return;const n=e.target;if(n.type!==6||!n.detail.injectedText||n.detail.injectedText.options.attachedData!==aFe||!n.range)return;const i=this._editor.getContribution(Io.ID);if(i&&!i.isColorPickerVisible){const r=new j(n.range.startLineNumber,n.range.startColumn+1,n.range.endLineNumber,n.range.endColumn+1);i.showContentHover(r,1,0,!1,!0)}}}oq.ID="editor.contrib.colorContribution";fu(oq.ID,oq,2);$p.register(Iw);var RFe=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},Cc=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},jle=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})},sq,lq;let eg=sq=class extends ne{constructor(e,t,n,i,r,a,o){super(),this._editor=e,this._modelService=n,this._keybindingService=i,this._instantiationService=r,this._languageFeatureService=a,this._languageConfigurationService=o,this._standaloneColorPickerWidget=null,this._standaloneColorPickerVisible=W.standaloneColorPickerVisible.bindTo(t),this._standaloneColorPickerFocused=W.standaloneColorPickerFocused.bindTo(t)}showOrFocus(){var e;this._editor.hasModel()&&(this._standaloneColorPickerVisible.get()?this._standaloneColorPickerFocused.get()||(e=this._standaloneColorPickerWidget)===null||e===void 0||e.focus():this._standaloneColorPickerWidget=new Ww(this._editor,this._standaloneColorPickerVisible,this._standaloneColorPickerFocused,this._instantiationService,this._modelService,this._keybindingService,this._languageFeatureService,this._languageConfigurationService))}hide(){var e;this._standaloneColorPickerFocused.set(!1),this._standaloneColorPickerVisible.set(!1),(e=this._standaloneColorPickerWidget)===null||e===void 0||e.hide(),this._editor.focus()}insertColor(){var e;(e=this._standaloneColorPickerWidget)===null||e===void 0||e.updateEditor(),this.hide()}static get(e){return e.getContribution(sq.ID)}};eg.ID="editor.contrib.standaloneColorPickerController";eg=sq=RFe([Cc(1,pt),Cc(2,_n),Cc(3,qu),Cc(4,mt),Cc(5,We),Cc(6,tn)],eg);fu(eg.ID,eg,1);const Hle=8,agt=22;let Ww=lq=class extends ne{constructor(e,t,n,i,r,a,o,s){var l;super(),this._editor=e,this._standaloneColorPickerVisible=t,this._standaloneColorPickerFocused=n,this._modelService=r,this._keybindingService=a,this._languageFeaturesService=o,this._languageConfigurationService=s,this.allowEditorOverflow=!0,this._position=void 0,this._body=document.createElement("div"),this._colorHover=null,this._selectionSetInEditor=!1,this._onResult=this._register(new Q),this.onResult=this._onResult.event,this._standaloneColorPickerVisible.set(!0),this._standaloneColorPickerParticipant=i.createInstance(aF,this._editor),this._position=(l=this._editor._getViewModel())===null||l===void 0?void 0:l.getPrimaryCursorState().modelState.position;const c=this._editor.getSelection(),d=c?{startLineNumber:c.startLineNumber,startColumn:c.startColumn,endLineNumber:c.endLineNumber,endColumn:c.endColumn}:{startLineNumber:0,endLineNumber:0,endColumn:0,startColumn:0},h=this._register(y1(this._body));this._register(h.onDidBlur(E=>{this.hide()})),this._register(h.onDidFocus(E=>{this.focus()})),this._register(this._editor.onDidChangeCursorPosition(()=>{this._selectionSetInEditor?this._selectionSetInEditor=!1:this.hide()})),this._register(this._editor.onMouseMove(E=>{var m;const g=(m=E.target.element)===null||m===void 0?void 0:m.classList;g&&g.contains("colorpicker-color-decoration")&&this.hide()})),this._register(this.onResult(E=>{this._render(E.value,E.foundInEditor)})),this._start(d),this._body.style.zIndex="50",this._editor.addContentWidget(this)}updateEditor(){this._colorHover&&this._standaloneColorPickerParticipant.updateEditorModel(this._colorHover)}getId(){return lq.ID}getDomNode(){return this._body}getPosition(){if(!this._position)return null;const e=this._editor.getOption(60).above;return{position:this._position,secondaryPosition:this._position,preference:e?[1,2]:[2,1],positionAffinity:2}}hide(){this.dispose(),this._standaloneColorPickerVisible.set(!1),this._standaloneColorPickerFocused.set(!1),this._editor.removeContentWidget(this),this._editor.focus()}focus(){this._standaloneColorPickerFocused.set(!0),this._body.focus()}_start(e){return jle(this,void 0,void 0,function*(){const t=yield this._computeAsync(e);t&&this._onResult.fire(new ogt(t.result,t.foundInEditor))})}_computeAsync(e){return jle(this,void 0,void 0,function*(){if(!this._editor.hasModel())return null;const t={range:e,color:{red:0,green:0,blue:0,alpha:1}},n=yield this._standaloneColorPickerParticipant.createColorHover(t,new ute(this._modelService,this._languageConfigurationService),this._languageFeaturesService.colorProvider);return n?{result:n.colorHover,foundInEditor:n.foundInEditor}:null})}_render(e,t){const n=document.createDocumentFragment(),i=this._register(new Hw(this._keybindingService));let r;const a={fragment:n,statusBar:i,setColorPicker:g=>r=g,onContentsChanged:()=>{},hide:()=>this.hide()};if(this._colorHover=e,this._register(this._standaloneColorPickerParticipant.renderHoverParts(a,[e])),r===void 0)return;this._body.classList.add("standalone-colorpicker-body"),this._body.style.maxHeight=Math.max(this._editor.getLayoutInfo().height/4,250)+"px",this._body.style.maxWidth=Math.max(this._editor.getLayoutInfo().width*.66,500)+"px",this._body.tabIndex=0,this._body.appendChild(n),r.layout();const o=r.body,s=o.saturationBox.domNode.clientWidth,l=o.domNode.clientWidth-s-agt-Hle,c=r.body.enterButton;c==null||c.onClicked(()=>{this.updateEditor(),this.hide()});const d=r.header,h=d.pickedColorNode;h.style.width=s+Hle+"px";const E=d.originalColorNode;E.style.width=l+"px";const m=r.header.closeButton;m==null||m.onClicked(()=>{this.hide()}),t&&(c&&(c.button.textContent="Replace"),this._selectionSetInEditor=!0,this._editor.setSelection(e.range)),this._editor.layoutContentWidget(this)}};Ww.ID="editor.contrib.standaloneColorPickerWidget";Ww=lq=RFe([Cc(3,mt),Cc(4,_n),Cc(5,qu),Cc(6,We),Cc(7,tn)],Ww);class ogt{constructor(e,t){this.value=e,this.foundInEditor=t}}class sgt extends hd{constructor(){super({id:"editor.action.showOrFocusStandaloneColorPicker",title:{value:v("showOrFocusStandaloneColorPicker","Show or Focus Standalone Color Picker"),mnemonicTitle:v({key:"mishowOrFocusStandaloneColorPicker",comment:["&& denotes a mnemonic"]},"&&Show or Focus Standalone Color Picker"),original:"Show or Focus Standalone Color Picker"},precondition:void 0,menu:[{id:K.CommandPalette}]})}runEditorCommand(e,t){var n;(n=eg.get(t))===null||n===void 0||n.showOrFocus()}}class lgt extends $e{constructor(){super({id:"editor.action.hideColorPicker",label:v({key:"hideColorPicker",comment:["Action that hides the color picker"]},"Hide the Color Picker"),alias:"Hide the Color Picker",precondition:W.standaloneColorPickerVisible.isEqualTo(!0),kbOpts:{primary:9,weight:100}})}run(e,t){var n;(n=eg.get(t))===null||n===void 0||n.hide()}}class cgt extends $e{constructor(){super({id:"editor.action.insertColorWithStandaloneColorPicker",label:v({key:"insertColorWithStandaloneColorPicker",comment:["Action that inserts color with standalone color picker"]},"Insert Color with Standalone Color Picker"),alias:"Insert Color with Standalone Color Picker",precondition:W.standaloneColorPickerFocused.isEqualTo(!0),kbOpts:{primary:3,weight:100}})}run(e,t){var n;(n=eg.get(t))===null||n===void 0||n.insertColor()}}be(lgt);be(cgt);gn(sgt);class IE{constructor(e,t,n){this.languageConfigurationService=n,this._selection=e,this._insertSpace=t,this._usedEndToken=null}static _haystackHasNeedleAtOffset(e,t,n){if(n<0)return!1;const i=t.length,r=e.length;if(n+i>r)return!1;for(let a=0;a=65&&o<=90&&o+32===s)&&!(s>=65&&s<=90&&s+32===o))return!1}return!0}_createOperationsForBlockComment(e,t,n,i,r,a){const o=e.startLineNumber,s=e.startColumn,l=e.endLineNumber,c=e.endColumn,d=r.getLineContent(o),h=r.getLineContent(l);let E=d.lastIndexOf(t,s-1+t.length),m=h.indexOf(n,c-1-n.length);if(E!==-1&&m!==-1)if(o===l)d.substring(E+t.length,m).indexOf(n)>=0&&(E=-1,m=-1);else{const f=d.substring(E+t.length),p=h.substring(0,m);(f.indexOf(n)>=0||p.indexOf(n)>=0)&&(E=-1,m=-1)}let g;E!==-1&&m!==-1?(i&&E+t.length0&&h.charCodeAt(m-1)===32&&(n=" "+n,m-=1),g=IE._createRemoveBlockCommentOperations(new j(o,E+t.length+1,l,m+1),t,n)):(g=IE._createAddBlockCommentOperations(e,t,n,this._insertSpace),this._usedEndToken=g.length===1?n:null);for(const f of g)a.addTrackedEditOperation(f.range,f.text)}static _createRemoveBlockCommentOperations(e,t,n){const i=[];return j.isEmpty(e)?i.push(yn.delete(new j(e.startLineNumber,e.startColumn-t.length,e.endLineNumber,e.endColumn+n.length))):(i.push(yn.delete(new j(e.startLineNumber,e.startColumn-t.length,e.startLineNumber,e.startColumn))),i.push(yn.delete(new j(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn+n.length)))),i}static _createAddBlockCommentOperations(e,t,n,i){const r=[];return j.isEmpty(e)?r.push(yn.replace(new j(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn),t+" "+n)):(r.push(yn.insert(new ee(e.startLineNumber,e.startColumn),t+(i?" ":""))),r.push(yn.insert(new ee(e.endLineNumber,e.endColumn),(i?" ":"")+n))),r}getEditOperations(e,t){const n=this._selection.startLineNumber,i=this._selection.startColumn;e.tokenization.tokenizeIfCheap(n);const r=e.getLanguageIdAtPosition(n,i),a=this.languageConfigurationService.getLanguageConfiguration(r).comments;!a||!a.blockCommentStartToken||!a.blockCommentEndToken||this._createOperationsForBlockComment(this._selection,a.blockCommentStartToken,a.blockCommentEndToken,this._insertSpace,e,t)}computeCursorState(e,t){const n=t.getInverseEditOperations();if(n.length===2){const i=n[0],r=n[1];return new Ye(i.range.endLineNumber,i.range.endColumn,r.range.startLineNumber,r.range.startColumn)}else{const i=n[0].range,r=this._usedEndToken?-this._usedEndToken.length-1:0;return new Ye(i.endLineNumber,i.endColumn+r,i.endLineNumber,i.endColumn+r)}}}class ph{constructor(e,t,n,i,r,a,o){this.languageConfigurationService=e,this._selection=t,this._tabSize=n,this._type=i,this._insertSpace=r,this._selectionId=null,this._deltaColumn=0,this._moveEndPositionDown=!1,this._ignoreEmptyLines=a,this._ignoreFirstLine=o||!1}static _gatherPreflightCommentStrings(e,t,n,i){e.tokenization.tokenizeIfCheap(t);const r=e.getLanguageIdAtPosition(t,1),a=i.getLanguageConfiguration(r).comments,o=a?a.lineCommentToken:null;if(!o)return null;const s=[];for(let l=0,c=n-t+1;l{if(e&&typeof e=="object"||typeof e=="function")for(let i of r4t(e))!a4t.call(u,i)&&i!==t&&n4t(u,i,{get:()=>e[i],enumerable:!(n=i4t(e,i))||n.enumerable});return u},o4t=(u,e,t)=>(Ele(u,e,"default"),t&&Ele(t,e,"default")),s4t="5.0.2",xv={};o4t(xv,BA);var yke=(u=>(u[u.None=0]="None",u[u.CommonJS=1]="CommonJS",u[u.AMD=2]="AMD",u[u.UMD=3]="UMD",u[u.System=4]="System",u[u.ES2015=5]="ES2015",u[u.ESNext=99]="ESNext",u))(yke||{}),Ake=(u=>(u[u.None=0]="None",u[u.Preserve=1]="Preserve",u[u.React=2]="React",u[u.ReactNative=3]="ReactNative",u[u.ReactJSX=4]="ReactJSX",u[u.ReactJSXDev=5]="ReactJSXDev",u))(Ake||{}),_ke=(u=>(u[u.CarriageReturnLineFeed=0]="CarriageReturnLineFeed",u[u.LineFeed=1]="LineFeed",u))(_ke||{}),Ske=(u=>(u[u.ES3=0]="ES3",u[u.ES5=1]="ES5",u[u.ES2015=2]="ES2015",u[u.ES2016=3]="ES2016",u[u.ES2017=4]="ES2017",u[u.ES2018=5]="ES2018",u[u.ES2019=6]="ES2019",u[u.ES2020=7]="ES2020",u[u.ESNext=99]="ESNext",u[u.JSON=100]="JSON",u[u.Latest=99]="Latest",u))(Ske||{}),Bke=(u=>(u[u.Classic=1]="Classic",u[u.NodeJs=2]="NodeJs",u))(Bke||{}),wke=class{constructor(u,e,t,n,i){kn(this,"_onDidChange",new xv.Emitter);kn(this,"_onDidExtraLibsChange",new xv.Emitter);kn(this,"_extraLibs");kn(this,"_removedExtraLibs");kn(this,"_eagerModelSync");kn(this,"_compilerOptions");kn(this,"_diagnosticsOptions");kn(this,"_workerOptions");kn(this,"_onDidExtraLibsChangeTimeout");kn(this,"_inlayHintsOptions");kn(this,"_modeConfiguration");this._extraLibs=Object.create(null),this._removedExtraLibs=Object.create(null),this._eagerModelSync=!1,this.setCompilerOptions(u),this.setDiagnosticsOptions(e),this.setWorkerOptions(t),this.setInlayHintsOptions(n),this.setModeConfiguration(i),this._onDidExtraLibsChangeTimeout=-1}get onDidChange(){return this._onDidChange.event}get onDidExtraLibsChange(){return this._onDidExtraLibsChange.event}get modeConfiguration(){return this._modeConfiguration}get workerOptions(){return this._workerOptions}get inlayHintsOptions(){return this._inlayHintsOptions}getExtraLibs(){return this._extraLibs}addExtraLib(u,e){let t;if(typeof e>"u"?t=`ts:extralib-${Math.random().toString(36).substring(2,15)}`:t=e,this._extraLibs[t]&&this._extraLibs[t].content===u)return{dispose:()=>{}};let n=1;return this._removedExtraLibs[t]&&(n=this._removedExtraLibs[t]+1),this._extraLibs[t]&&(n=this._extraLibs[t].version+1),this._extraLibs[t]={content:u,version:n},this._fireOnDidExtraLibsChangeSoon(),{dispose:()=>{let i=this._extraLibs[t];i&&i.version===n&&(delete this._extraLibs[t],this._removedExtraLibs[t]=n,this._fireOnDidExtraLibsChangeSoon())}}}setExtraLibs(u){for(const e in this._extraLibs)this._removedExtraLibs[e]=this._extraLibs[e].version;if(this._extraLibs=Object.create(null),u&&u.length>0)for(const e of u){const t=e.filePath||`ts:extralib-${Math.random().toString(36).substring(2,15)}`,n=e.content;let i=1;this._removedExtraLibs[t]&&(i=this._removedExtraLibs[t]+1),this._extraLibs[t]={content:n,version:i}}this._fireOnDidExtraLibsChangeSoon()}_fireOnDidExtraLibsChangeSoon(){this._onDidExtraLibsChangeTimeout===-1&&(this._onDidExtraLibsChangeTimeout=window.setTimeout(()=>{this._onDidExtraLibsChangeTimeout=-1,this._onDidExtraLibsChange.fire(void 0)},0))}getCompilerOptions(){return this._compilerOptions}setCompilerOptions(u){this._compilerOptions=u||Object.create(null),this._onDidChange.fire(void 0)}getDiagnosticsOptions(){return this._diagnosticsOptions}setDiagnosticsOptions(u){this._diagnosticsOptions=u||Object.create(null),this._onDidChange.fire(void 0)}setWorkerOptions(u){this._workerOptions=u||Object.create(null),this._onDidChange.fire(void 0)}setInlayHintsOptions(u){this._inlayHintsOptions=u||Object.create(null),this._onDidChange.fire(void 0)}setMaximumWorkerIdleTime(u){}setEagerModelSync(u){this._eagerModelSync=u}getEagerModelSync(){return this._eagerModelSync}setModeConfiguration(u){this._modeConfiguration=u||Object.create(null),this._onDidChange.fire(void 0)}},l4t=s4t,Lke={completionItems:!0,hovers:!0,documentSymbols:!0,definitions:!0,references:!0,documentHighlights:!0,rename:!0,diagnostics:!0,documentRangeFormattingEdits:!0,signatureHelp:!0,onTypeFormattingEdits:!0,codeActions:!0,inlayHints:!0},zke=new wke({allowNonTsExtensions:!0,target:99},{noSemanticValidation:!1,noSyntaxValidation:!1,onlyVisible:!1},{},{},Lke),Mke=new wke({allowNonTsExtensions:!0,allowJs:!0,target:99},{noSemanticValidation:!0,noSyntaxValidation:!1,onlyVisible:!1},{},{},Lke),c4t=()=>eR().then(u=>u.getTypeScriptWorker()),d4t=()=>eR().then(u=>u.getJavaScriptWorker());xv.languages.typescript={ModuleKind:yke,JsxEmit:Ake,NewLineKind:_ke,ScriptTarget:Ske,ModuleResolutionKind:Bke,typescriptVersion:l4t,typescriptDefaults:zke,javascriptDefaults:Mke,getTypeScriptWorker:c4t,getJavaScriptWorker:d4t};function eR(){return Te(()=>import("./tsMode-d3096867.js"),[],import.meta.url)}xv.languages.onLanguage("typescript",()=>eR().then(u=>u.setupTypeScript(zke)));xv.languages.onLanguage("javascript",()=>eR().then(u=>u.setupJavaScript(Mke)));class h4t extends n0{constructor(){super({id:"diffEditor.toggleCollapseUnchangedRegions",title:{value:v("toggleCollapseUnchangedRegions","Toggle Collapse Unchanged Regions"),original:"Toggle Collapse Unchanged Regions"},icon:we.map,toggled:Ee.has("config.diffEditor.hideUnchangedRegions.enabled"),precondition:Ee.has("isInDiffEditor"),menu:{when:Ee.has("isInDiffEditor"),id:K.EditorTitle,order:22,group:"navigation"}})}run(e,...t){const n=e.get(tu),i=!n.getValue("diffEditor.hideUnchangedRegions.enabled");n.updateValue("diffEditor.hideUnchangedRegions.enabled",i)}}gn(h4t);class Tke extends n0{constructor(){super({id:"diffEditor.toggleShowMovedCodeBlocks",title:{value:v("toggleShowMovedCodeBlocks","Toggle Show Moved Code Blocks"),original:"Toggle Show Moved Code Blocks"},precondition:Ee.has("isInDiffEditor")})}run(e,...t){const n=e.get(tu),i=!n.getValue("diffEditor.experimental.showMoves");n.updateValue("diffEditor.experimental.showMoves",i)}}gn(Tke);class Nke extends n0{constructor(){super({id:"diffEditor.toggleUseInlineViewWhenSpaceIsLimited",title:{value:v("toggleUseInlineViewWhenSpaceIsLimited","Toggle Use Inline View When Space Is Limited"),original:"Toggle Use Inline View When Space Is Limited"},precondition:Ee.has("isInDiffEditor")})}run(e,...t){const n=e.get(tu),i=!n.getValue("diffEditor.useInlineViewWhenSpaceIsLimited");n.updateValue("diffEditor.useInlineViewWhenSpaceIsLimited",i)}}gn(Nke);Lr.appendMenuItem(K.EditorTitle,{command:{id:new Nke().desc.id,title:v("useInlineViewWhenSpaceIsLimited","Use Inline View When Space Is Limited"),toggled:Ee.has("config.diffEditor.useInlineViewWhenSpaceIsLimited"),precondition:Ee.has("isInDiffEditor")},order:11,group:"1_diff",when:Ee.and(W.diffEditorRenderSideBySideInlineBreakpointReached,Ee.has("isInDiffEditor"))});Lr.appendMenuItem(K.EditorTitle,{command:{id:new Tke().desc.id,title:v("showMoves","Show Moved Code Blocks"),icon:we.move,toggled:l6.create("config.diffEditor.experimental.showMoves",!0),precondition:Ee.has("isInDiffEditor")},order:10,group:"1_diff",when:Ee.has("isInDiffEditor")});const tR={value:v("diffEditor","Diff Editor"),original:"Diff Editor"};class E4t extends hd{constructor(){super({id:"diffEditor.switchSide",title:{value:v("switchSide","Switch Side"),original:"Switch Side"},icon:we.arrowSwap,precondition:Ee.has("isInDiffEditor"),f1:!0,category:tR})}runEditorCommand(e,t,n){const i=b6(e);if(i instanceof O3){if(n&&n.dryRun)return{destinationSelection:i.mapToOtherSide().destinationSelection};i.switchSide()}}}gn(E4t);class m4t extends hd{constructor(){super({id:"diffEditor.exitCompareMove",title:{value:v("exitCompareMove","Exit Compare Move"),original:"Exit Compare Move"},icon:we.close,precondition:W.comparingMovedCode,f1:!1,category:tR,keybinding:{weight:1e4,primary:9}})}runEditorCommand(e,t,...n){const i=b6(e);i instanceof O3&&i.exitCompareMove()}}gn(m4t);class g4t extends hd{constructor(){super({id:"diffEditor.collapseAllUnchangedRegions",title:{value:v("collapseAllUnchangedRegions","Collapse All Unchanged Regions"),original:"Collapse All Unchanged Regions"},icon:we.fold,precondition:Ee.has("isInDiffEditor"),f1:!0,category:tR})}runEditorCommand(e,t,...n){const i=b6(e);i instanceof O3&&i.collapseAllUnchangedRegions()}}gn(g4t);class f4t extends hd{constructor(){super({id:"diffEditor.showAllUnchangedRegions",title:{value:v("showAllUnchangedRegions","Show All Unchanged Regions"),original:"Show All Unchanged Regions"},icon:we.unfold,precondition:Ee.has("isInDiffEditor"),f1:!0,category:tR})}runEditorCommand(e,t,...n){const i=b6(e);i instanceof O3&&i.showAllUnchangedRegions()}}gn(f4t);const Pke={value:v("accessibleDiffViewer","Accessible Diff Viewer"),original:"Accessible Diff Viewer"};class C6 extends n0{constructor(){super({id:C6.id,title:{value:v("editor.action.accessibleDiffViewer.next","Go to Next Difference"),original:"Go to Next Difference"},category:Pke,precondition:Ee.has("isInDiffEditor"),keybinding:{primary:65,weight:100},f1:!0})}run(e){const t=b6(e);t==null||t.accessibleDiffViewerNext()}}C6.id="editor.action.accessibleDiffViewer.next";Lr.appendMenuItem(K.EditorTitle,{command:{id:C6.id,title:v("Open Accessible Diff Viewer","Open Accessible Diff Viewer"),precondition:Ee.has("isInDiffEditor")},order:10,group:"2_diff",when:Ee.and(W.accessibleDiffViewerVisible.negate(),Ee.has("isInDiffEditor"))});class LA extends n0{constructor(){super({id:LA.id,title:{value:v("editor.action.accessibleDiffViewer.prev","Go to Previous Difference"),original:"Go to Previous Difference"},category:Pke,precondition:Ee.has("isInDiffEditor"),keybinding:{primary:1089,weight:100},f1:!0})}run(e){const t=b6(e);t==null||t.accessibleDiffViewerPrev()}}LA.id="editor.action.accessibleDiffViewer.prev";function b6(u){var e;const t=u.get(Cu),n=t.listDiffEditors(),i=(e=t.getFocusedCodeEditor())!==null&&e!==void 0?e:t.getActiveCodeEditor();if(!i)return null;for(let a=0,o=n.length;a=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},x4t=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},uR=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})},LU;const nR=new Pe("selectionAnchorSet",!1);let d4=LU=class{static get(e){return e.getContribution(LU.ID)}constructor(e,t){this.editor=e,this.selectionAnchorSetContextKey=nR.bindTo(t),this.modelChangeListener=e.onDidChangeModel(()=>this.selectionAnchorSetContextKey.reset())}setSelectionAnchor(){if(this.editor.hasModel()){const e=this.editor.getPosition();this.editor.changeDecorations(t=>{this.decorationId&&t.removeDecoration(this.decorationId),this.decorationId=t.addDecoration(Ye.fromPositions(e,e),{description:"selection-anchor",stickiness:1,hoverMessage:new Zr().appendText(v("selectionAnchor","Selection Anchor")),className:"selection-anchor"})}),this.selectionAnchorSetContextKey.set(!!this.decorationId),ga(v("anchorSet","Anchor set at {0}:{1}",e.lineNumber,e.column))}}goToSelectionAnchor(){if(this.editor.hasModel()&&this.decorationId){const e=this.editor.getModel().getDecorationRange(this.decorationId);e&&this.editor.setPosition(e.getStartPosition())}}selectFromAnchorToCursor(){if(this.editor.hasModel()&&this.decorationId){const e=this.editor.getModel().getDecorationRange(this.decorationId);if(e){const t=this.editor.getPosition();this.editor.setSelection(Ye.fromPositions(e.getStartPosition(),t)),this.cancelSelectionAnchor()}}}cancelSelectionAnchor(){if(this.decorationId){const e=this.decorationId;this.editor.changeDecorations(t=>{t.removeDecoration(e),this.decorationId=void 0}),this.selectionAnchorSetContextKey.set(!1)}}dispose(){this.cancelSelectionAnchor(),this.modelChangeListener.dispose()}};d4.ID="editor.contrib.selectionAnchorController";d4=LU=D4t([x4t(1,pt)],d4);class v4t extends $e{constructor(){super({id:"editor.action.setSelectionAnchor",label:v("setSelectionAnchor","Set Selection Anchor"),alias:"Set Selection Anchor",precondition:void 0,kbOpts:{kbExpr:W.editorTextFocus,primary:Vi(2089,2080),weight:100}})}run(e,t){var n;return uR(this,void 0,void 0,function*(){(n=d4.get(t))===null||n===void 0||n.setSelectionAnchor()})}}class C4t extends $e{constructor(){super({id:"editor.action.goToSelectionAnchor",label:v("goToSelectionAnchor","Go to Selection Anchor"),alias:"Go to Selection Anchor",precondition:nR})}run(e,t){var n;return uR(this,void 0,void 0,function*(){(n=d4.get(t))===null||n===void 0||n.goToSelectionAnchor()})}}class b4t extends $e{constructor(){super({id:"editor.action.selectFromAnchorToCursor",label:v("selectFromAnchorToCursor","Select from Anchor to Cursor"),alias:"Select from Anchor to Cursor",precondition:nR,kbOpts:{kbExpr:W.editorTextFocus,primary:Vi(2089,2089),weight:100}})}run(e,t){var n;return uR(this,void 0,void 0,function*(){(n=d4.get(t))===null||n===void 0||n.selectFromAnchorToCursor()})}}class k4t extends $e{constructor(){super({id:"editor.action.cancelSelectionAnchor",label:v("cancelSelectionAnchor","Cancel Selection Anchor"),alias:"Cancel Selection Anchor",precondition:nR,kbOpts:{kbExpr:W.editorTextFocus,primary:9,weight:100}})}run(e,t){var n;return uR(this,void 0,void 0,function*(){(n=d4.get(t))===null||n===void 0||n.cancelSelectionAnchor()})}}fu(d4.ID,d4,4);be(v4t);be(C4t);be(b4t);be(k4t);const F4t=q("editorOverviewRuler.bracketMatchForeground",{dark:"#A0A0A0",light:"#A0A0A0",hcDark:"#A0A0A0",hcLight:"#A0A0A0"},v("overviewRulerBracketMatchForeground","Overview ruler marker color for matching brackets."));class y4t extends $e{constructor(){super({id:"editor.action.jumpToBracket",label:v("smartSelect.jumpBracket","Go to Bracket"),alias:"Go to Bracket",precondition:void 0,kbOpts:{kbExpr:W.editorTextFocus,primary:3165,weight:100}})}run(e,t){var n;(n=Al.get(t))===null||n===void 0||n.jumpToBracket()}}class A4t extends $e{constructor(){super({id:"editor.action.selectToBracket",label:v("smartSelect.selectToBracket","Select to Bracket"),alias:"Select to Bracket",precondition:void 0,description:{description:"Select to Bracket",args:[{name:"args",schema:{type:"object",properties:{selectBrackets:{type:"boolean",default:!0}}}}]}})}run(e,t,n){var i;let r=!0;n&&n.selectBrackets===!1&&(r=!1),(i=Al.get(t))===null||i===void 0||i.selectToBracket(r)}}class _4t extends $e{constructor(){super({id:"editor.action.removeBrackets",label:v("smartSelect.removeBrackets","Remove Brackets"),alias:"Remove Brackets",precondition:void 0,kbOpts:{kbExpr:W.editorTextFocus,primary:2561,weight:100}})}run(e,t){var n;(n=Al.get(t))===null||n===void 0||n.removeBrackets(this.id)}}class S4t{constructor(e,t,n){this.position=e,this.brackets=t,this.options=n}}class Al extends ne{static get(e){return e.getContribution(Al.ID)}constructor(e){super(),this._editor=e,this._lastBracketsData=[],this._lastVersionId=0,this._decorations=this._editor.createDecorationsCollection(),this._updateBracketsSoon=this._register(new Hu(()=>this._updateBrackets(),50)),this._matchBrackets=this._editor.getOption(71),this._updateBracketsSoon.schedule(),this._register(e.onDidChangeCursorPosition(t=>{this._matchBrackets!=="never"&&this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeModelContent(t=>{this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeModel(t=>{this._lastBracketsData=[],this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeModelLanguageConfiguration(t=>{this._lastBracketsData=[],this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeConfiguration(t=>{t.hasChanged(71)&&(this._matchBrackets=this._editor.getOption(71),this._decorations.clear(),this._lastBracketsData=[],this._lastVersionId=0,this._updateBracketsSoon.schedule())})),this._register(e.onDidBlurEditorWidget(()=>{this._updateBracketsSoon.schedule()})),this._register(e.onDidFocusEditorWidget(()=>{this._updateBracketsSoon.schedule()}))}jumpToBracket(){if(!this._editor.hasModel())return;const e=this._editor.getModel(),t=this._editor.getSelections().map(n=>{const i=n.getStartPosition(),r=e.bracketPairs.matchBracket(i);let a=null;if(r)r[0].containsPosition(i)&&!r[1].containsPosition(i)?a=r[1].getStartPosition():r[1].containsPosition(i)&&(a=r[0].getStartPosition());else{const o=e.bracketPairs.findEnclosingBrackets(i);if(o)a=o[1].getStartPosition();else{const s=e.bracketPairs.findNextBracket(i);s&&s.range&&(a=s.range.getStartPosition())}}return a?new Ye(a.lineNumber,a.column,a.lineNumber,a.column):new Ye(i.lineNumber,i.column,i.lineNumber,i.column)});this._editor.setSelections(t),this._editor.revealRange(t[0])}selectToBracket(e){if(!this._editor.hasModel())return;const t=this._editor.getModel(),n=[];this._editor.getSelections().forEach(i=>{const r=i.getStartPosition();let a=t.bracketPairs.matchBracket(r);if(!a&&(a=t.bracketPairs.findEnclosingBrackets(r),!a)){const l=t.bracketPairs.findNextBracket(r);l&&l.range&&(a=t.bracketPairs.matchBracket(l.range.getStartPosition()))}let o=null,s=null;if(a){a.sort(j.compareRangesUsingStarts);const[l,c]=a;if(o=e?l.getStartPosition():l.getEndPosition(),s=e?c.getEndPosition():c.getStartPosition(),c.containsPosition(r)){const d=o;o=s,s=d}}o&&s&&n.push(new Ye(o.lineNumber,o.column,s.lineNumber,s.column))}),n.length>0&&(this._editor.setSelections(n),this._editor.revealRange(n[0]))}removeBrackets(e){if(!this._editor.hasModel())return;const t=this._editor.getModel();this._editor.getSelections().forEach(n=>{const i=n.getPosition();let r=t.bracketPairs.matchBracket(i);r||(r=t.bracketPairs.findEnclosingBrackets(i)),r&&(this._editor.pushUndoStop(),this._editor.executeEdits(e,[{range:r[0],text:""},{range:r[1],text:""}]),this._editor.pushUndoStop())})}_updateBrackets(){if(this._matchBrackets==="never")return;this._recomputeBrackets();const e=[];let t=0;for(const n of this._lastBracketsData){const i=n.brackets;i&&(e[t++]={range:i[0],options:n.options},e[t++]={range:i[1],options:n.options})}this._decorations.set(e)}_recomputeBrackets(){if(!this._editor.hasModel()||!this._editor.hasWidgetFocus()){this._lastBracketsData=[],this._lastVersionId=0;return}const e=this._editor.getSelections();if(e.length>100){this._lastBracketsData=[],this._lastVersionId=0;return}const t=this._editor.getModel(),n=t.getVersionId();let i=[];this._lastVersionId===n&&(i=this._lastBracketsData);const r=[];let a=0;for(let d=0,h=e.length;d1&&r.sort(ee.compare);const o=[];let s=0,l=0;const c=i.length;for(let d=0,h=r.length;d0&&(t.pushUndoStop(),t.executeCommands(this.id,i),t.pushUndoStop())}}be(z4t);var M4t=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};const H3="9_cutcopypaste",T4t=Oc||document.queryCommandSupported("cut"),Ike=Oc||document.queryCommandSupported("copy"),N4t=typeof navigator.clipboard>"u"||T0?document.queryCommandSupported("paste"):!0;function Yee(u){return u.register(),u}const P4t=T4t?Yee(new d6({id:"editor.action.clipboardCutAction",precondition:void 0,kbOpts:Oc?{primary:2102,win:{primary:2102,secondary:[1044]},weight:100}:void 0,menuOpts:[{menuId:K.MenubarEditMenu,group:"2_ccp",title:v({key:"miCut",comment:["&& denotes a mnemonic"]},"Cu&&t"),order:1},{menuId:K.EditorContext,group:H3,title:v("actions.clipboard.cutLabel","Cut"),when:W.writable,order:1},{menuId:K.CommandPalette,group:"",title:v("actions.clipboard.cutLabel","Cut"),order:1},{menuId:K.SimpleEditorContext,group:H3,title:v("actions.clipboard.cutLabel","Cut"),when:W.writable,order:1}]})):void 0,R4t=Ike?Yee(new d6({id:"editor.action.clipboardCopyAction",precondition:void 0,kbOpts:Oc?{primary:2081,win:{primary:2081,secondary:[2067]},weight:100}:void 0,menuOpts:[{menuId:K.MenubarEditMenu,group:"2_ccp",title:v({key:"miCopy",comment:["&& denotes a mnemonic"]},"&&Copy"),order:2},{menuId:K.EditorContext,group:H3,title:v("actions.clipboard.copyLabel","Copy"),order:2},{menuId:K.CommandPalette,group:"",title:v("actions.clipboard.copyLabel","Copy"),order:1},{menuId:K.SimpleEditorContext,group:H3,title:v("actions.clipboard.copyLabel","Copy"),order:2}]})):void 0;Lr.appendMenuItem(K.MenubarEditMenu,{submenu:K.MenubarCopy,title:{value:v("copy as","Copy As"),original:"Copy As"},group:"2_ccp",order:3});Lr.appendMenuItem(K.EditorContext,{submenu:K.EditorContextCopy,title:{value:v("copy as","Copy As"),original:"Copy As"},group:H3,order:3});Lr.appendMenuItem(K.EditorContext,{submenu:K.EditorContextShare,title:{value:v("share","Share"),original:"Share"},group:"11_share",order:-1,when:Ee.and(Ee.notEquals("resourceScheme","output"),W.editorTextFocus)});Lr.appendMenuItem(K.EditorTitleContext,{submenu:K.EditorTitleContextShare,title:{value:v("share","Share"),original:"Share"},group:"11_share",order:-1});Lr.appendMenuItem(K.ExplorerContext,{submenu:K.ExplorerContextShare,title:{value:v("share","Share"),original:"Share"},group:"11_share",order:-1});const CH=N4t?Yee(new d6({id:"editor.action.clipboardPasteAction",precondition:void 0,kbOpts:Oc?{primary:2100,win:{primary:2100,secondary:[1043]},linux:{primary:2100,secondary:[1043]},weight:100}:void 0,menuOpts:[{menuId:K.MenubarEditMenu,group:"2_ccp",title:v({key:"miPaste",comment:["&& denotes a mnemonic"]},"&&Paste"),order:4},{menuId:K.EditorContext,group:H3,title:v("actions.clipboard.pasteLabel","Paste"),when:W.writable,order:4},{menuId:K.CommandPalette,group:"",title:v("actions.clipboard.pasteLabel","Paste"),order:1},{menuId:K.SimpleEditorContext,group:H3,title:v("actions.clipboard.pasteLabel","Paste"),when:W.writable,order:4}]})):void 0;class I4t extends $e{constructor(){super({id:"editor.action.clipboardCopyWithSyntaxHighlightingAction",label:v("actions.clipboard.copyWithSyntaxHighlightingLabel","Copy With Syntax Highlighting"),alias:"Copy With Syntax Highlighting",precondition:void 0,kbOpts:{kbExpr:W.textInputFocus,primary:0,weight:100}})}run(e,t){!t.hasModel()||!t.getOption(37)&&t.getSelection().isEmpty()||(PW.forceCopyWithSyntaxHighlighting=!0,t.focus(),t.getContainerDomNode().ownerDocument.execCommand("copy"),PW.forceCopyWithSyntaxHighlighting=!1)}}function Oke(u,e){u&&(u.addImplementation(1e4,"code-editor",(t,n)=>{const i=t.get(Cu).getFocusedCodeEditor();if(i&&i.hasTextFocus()){const r=i.getOption(37),a=i.getSelection();return a&&a.isEmpty()&&!r||i.getContainerDomNode().ownerDocument.execCommand(e),!0}return!1}),u.addImplementation(0,"generic-dom",(t,n)=>(JN().execCommand(e),!0)))}Oke(P4t,"cut");Oke(R4t,"copy");CH&&(CH.addImplementation(1e4,"code-editor",(u,e)=>{const t=u.get(Cu),n=u.get(_4),i=t.getFocusedCodeEditor();return i&&i.hasTextFocus()?!i.getContainerDomNode().ownerDocument.execCommand("paste")&&dg?(()=>M4t(void 0,void 0,void 0,function*(){const a=yield n.readText();if(a!==""){const o=Sk.INSTANCE.get(a);let s=!1,l=null,c=null;o&&(s=i.getOption(37)&&!!o.isFromEmptySelection,l=typeof o.multicursorText<"u"?o.multicursorText:null,c=o.mode),i.trigger("keyboard","paste",{text:a,pasteOnNewLine:s,multicursorText:l,mode:c})}}))():!0:!1}),CH.addImplementation(0,"generic-dom",(u,e)=>(JN().execCommand("paste"),!0)));Ike&&be(I4t);var O4t=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};let gt=class c8{constructor(e){this.value=e}equals(e){return this.value===e.value}contains(e){return this.equals(e)||this.value===""||e.value.startsWith(this.value+c8.sep)}intersects(e){return this.contains(e)||e.contains(this)}append(e){return new c8(this.value+c8.sep+e)}};gt.sep=".";gt.None=new gt("@@none@@");gt.Empty=new gt("");gt.QuickFix=new gt("quickfix");gt.Refactor=new gt("refactor");gt.RefactorExtract=gt.Refactor.append("extract");gt.RefactorInline=gt.Refactor.append("inline");gt.RefactorMove=gt.Refactor.append("move");gt.RefactorRewrite=gt.Refactor.append("rewrite");gt.Notebook=new gt("notebook");gt.Source=new gt("source");gt.SourceOrganizeImports=gt.Source.append("organizeImports");gt.SourceFixAll=gt.Source.append("fixAll");gt.SurroundWith=gt.Refactor.append("surround");var fs;(function(u){u.Refactor="refactor",u.RefactorPreview="refactor preview",u.Lightbulb="lightbulb",u.Default="other (default)",u.SourceAction="source action",u.QuickFix="quick fix action",u.FixAll="fix all",u.OrganizeImports="organize imports",u.AutoFix="auto fix",u.QuickFixHover="quick fix hover window",u.OnSave="save participants",u.ProblemsView="problems view"})(fs||(fs={}));function j4t(u,e){return!(u.include&&!u.include.intersects(e)||u.excludes&&u.excludes.some(t=>jke(e,t,u.include))||!u.includeSourceActions&>.Source.contains(e))}function H4t(u,e){const t=e.kind?new gt(e.kind):void 0;return!(u.include&&(!t||!u.include.contains(t))||u.excludes&&t&&u.excludes.some(n=>jke(t,n,u.include))||!u.includeSourceActions&&t&>.Source.contains(t)||u.onlyIncludePreferredActions&&!e.isPreferred)}function jke(u,e,t){return!(!e.contains(u)||t&&e.contains(t))}class Zd{static fromUser(e,t){return!e||typeof e!="object"?new Zd(t.kind,t.apply,!1):new Zd(Zd.getKindFromUser(e,t.kind),Zd.getApplyFromUser(e,t.apply),Zd.getPreferredUser(e))}static getApplyFromUser(e,t){switch(typeof e.apply=="string"?e.apply.toLowerCase():""){case"first":return"first";case"never":return"never";case"ifsingle":return"ifSingle";default:return t}}static getKindFromUser(e,t){return typeof e.kind=="string"?new gt(e.kind):t}static getPreferredUser(e){return typeof e.preferred=="boolean"?e.preferred:!1}constructor(e,t,n){this.kind=e,this.apply=t,this.preferred=n}}class V4t{constructor(e,t,n){this.action=e,this.provider=t,this.highlightRange=n}resolve(e){var t;return O4t(this,void 0,void 0,function*(){if(!((t=this.provider)===null||t===void 0)&&t.resolveCodeAction&&!this.action.edit){let n;try{n=yield this.provider.resolveCodeAction(this.action,e)}catch(i){Mi(i)}n&&(this.action.edit=n.edit)}return this})}}var Nw=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};const Hke="editor.action.codeAction",Qee="editor.action.quickFix",Vke="editor.action.autoFix",$ke="editor.action.refactor",Kke="editor.action.sourceAction",Xee="editor.action.organizeImports",ete="editor.action.fixAll";class f2 extends ne{static codeActionsPreferredComparator(e,t){return e.isPreferred&&!t.isPreferred?-1:!e.isPreferred&&t.isPreferred?1:0}static codeActionsComparator({action:e},{action:t}){return pa(e.diagnostics)?pa(t.diagnostics)?f2.codeActionsPreferredComparator(e,t):-1:pa(t.diagnostics)?1:f2.codeActionsPreferredComparator(e,t)}constructor(e,t,n){super(),this.documentation=t,this._register(n),this.allActions=[...e].sort(f2.codeActionsComparator),this.validActions=this.allActions.filter(({action:i})=>!i.disabled)}get hasAutoFix(){return this.validActions.some(({action:e})=>!!e.kind&>.QuickFix.contains(new gt(e.kind))&&!!e.isPreferred)}}const mle={actions:[],documentation:void 0};function p2(u,e,t,n,i,r){var a;return Nw(this,void 0,void 0,function*(){const o=n.filter||{},s=Object.assign(Object.assign({},o),{excludes:[...o.excludes||[],gt.Notebook]}),l={only:(a=o.include)===null||a===void 0?void 0:a.value,trigger:n.type},c=new Wee(e,r),d=n.type===2,h=$4t(u,e,d?s:o),E=new pe,m=h.map(f=>Nw(this,void 0,void 0,function*(){try{i.report(f);const p=yield f.provideCodeActions(e,t,l,c.token);if(p&&E.add(p),c.token.isCancellationRequested)return mle;const D=((p==null?void 0:p.actions)||[]).filter(b=>b&&H4t(o,b)),x=W4t(f,D,o.include);return{actions:D.map(b=>new V4t(b,f)),documentation:x}}catch(p){if(dd(p))throw p;return Mi(p),mle}})),g=u.onDidChange(()=>{const f=u.all(e);di(f,h)||c.cancel()});try{const f=yield Promise.all(m),p=f.map(x=>x.actions).flat(),D=[...b1(f.map(x=>x.documentation)),...K4t(u,e,n,p)];return new f2(p,D,E)}finally{g.dispose(),c.dispose()}})}function $4t(u,e,t){return u.all(e).filter(n=>n.providedCodeActionKinds?n.providedCodeActionKinds.some(i=>j4t(t,new gt(i))):!0)}function*K4t(u,e,t,n){var i,r,a;if(e&&n.length)for(const o of u.all(e))o._getAdditionalMenuItems&&(yield*(i=o._getAdditionalMenuItems)===null||i===void 0?void 0:i.call(o,{trigger:t.type,only:(a=(r=t.filter)===null||r===void 0?void 0:r.include)===null||a===void 0?void 0:a.value},n.map(s=>s.action)))}function W4t(u,e,t){if(!u.documentation)return;const n=u.documentation.map(i=>({kind:new gt(i.kind),command:i.command}));if(t){let i;for(const r of n)r.kind.contains(t)&&(i?i.kind.contains(r.kind)&&(i=r):i=r);if(i)return i==null?void 0:i.command}for(const i of e)if(i.kind){for(const r of n)if(r.kind.contains(new gt(i.kind)))return r.command}}var Pw;(function(u){u.OnSave="onSave",u.FromProblemsView="fromProblemsView",u.FromCodeActions="fromCodeActions"})(Pw||(Pw={}));function G4t(u,e,t,n,i=Kt.None){var r;return Nw(this,void 0,void 0,function*(){const a=u.get(xA),o=u.get(ni),s=u.get(i0),l=u.get(bi);if(s.publicLog2("codeAction.applyCodeAction",{codeActionTitle:e.action.title,codeActionKind:e.action.kind,codeActionIsPreferred:!!e.action.isPreferred,reason:t}),yield e.resolve(i),!i.isCancellationRequested&&!(!((r=e.action.edit)===null||r===void 0)&&r.edits.length&&!(yield a.apply(e.action.edit,{editor:n==null?void 0:n.editor,label:e.action.title,quotableLabel:e.action.title,code:"undoredo.codeAction",respectAutoSaveConfig:t!==Pw.OnSave,showPreview:n==null?void 0:n.preview})).isApplied)&&e.action.command)try{yield o.executeCommand(e.action.command.id,...e.action.command.arguments||[])}catch(c){const d=U4t(c);l.error(typeof d=="string"?d:v("applyCodeActionFailed","An unknown error occurred while applying the code action"))}})}function U4t(u){return typeof u=="string"?u:u instanceof Error&&typeof u.message=="string"?u.message:void 0}ru.registerCommand("_executeCodeActionProvider",function(u,e,t,n,i){return Nw(this,void 0,void 0,function*(){if(!(e instanceof dt))throw _0();const{codeActionProvider:r}=u.get(We),a=u.get(_n).getModel(e);if(!a)throw _0();const o=Ye.isISelection(t)?Ye.liftSelection(t):j.isIRange(t)?a.validateRange(t):void 0;if(!o)throw _0();const s=typeof n=="string"?new gt(n):void 0,l=yield p2(r,a,o,{type:1,triggerAction:fs.Default,filter:{includeSourceActions:!0,include:s}},Yh.None,Kt.None),c=[],d=Math.min(l.validActions.length,typeof i=="number"?i:0);for(let h=0;hh.action)}finally{setTimeout(()=>l.dispose(),100)}})});var q4t=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},J4t=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},zU;let Rw=zU=class{constructor(e){this.keybindingService=e}getResolver(){const e=new mg(()=>this.keybindingService.getKeybindings().filter(t=>zU.codeActionCommands.indexOf(t.command)>=0).filter(t=>t.resolvedKeybinding).map(t=>{let n=t.commandArgs;return t.command===Xee?n={kind:gt.SourceOrganizeImports.value}:t.command===ete&&(n={kind:gt.SourceFixAll.value}),Object.assign({resolvedKeybinding:t.resolvedKeybinding},Zd.fromUser(n,{kind:gt.None,apply:"never"}))}));return t=>{if(t.kind){const n=this.bestKeybindingForCodeAction(t,e.value);return n==null?void 0:n.resolvedKeybinding}}}bestKeybindingForCodeAction(e,t){if(!e.kind)return;const n=new gt(e.kind);return t.filter(i=>i.kind.contains(n)).filter(i=>i.preferred?e.isPreferred:!0).reduceRight((i,r)=>i?i.kind.contains(r.kind)?r:i:r,void 0)}};Rw.codeActionCommands=[$ke,Hke,Kke,Xee,ete];Rw=zU=q4t([J4t(0,qu)],Rw);q("symbolIcon.arrayForeground",{dark:Ae,light:Ae,hcDark:Ae,hcLight:Ae},v("symbolIcon.arrayForeground","The foreground color for array symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));q("symbolIcon.booleanForeground",{dark:Ae,light:Ae,hcDark:Ae,hcLight:Ae},v("symbolIcon.booleanForeground","The foreground color for boolean symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));q("symbolIcon.classForeground",{dark:"#EE9D28",light:"#D67E00",hcDark:"#EE9D28",hcLight:"#D67E00"},v("symbolIcon.classForeground","The foreground color for class symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));q("symbolIcon.colorForeground",{dark:Ae,light:Ae,hcDark:Ae,hcLight:Ae},v("symbolIcon.colorForeground","The foreground color for color symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));q("symbolIcon.constantForeground",{dark:Ae,light:Ae,hcDark:Ae,hcLight:Ae},v("symbolIcon.constantForeground","The foreground color for constant symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));q("symbolIcon.constructorForeground",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},v("symbolIcon.constructorForeground","The foreground color for constructor symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));q("symbolIcon.enumeratorForeground",{dark:"#EE9D28",light:"#D67E00",hcDark:"#EE9D28",hcLight:"#D67E00"},v("symbolIcon.enumeratorForeground","The foreground color for enumerator symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));q("symbolIcon.enumeratorMemberForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},v("symbolIcon.enumeratorMemberForeground","The foreground color for enumerator member symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));q("symbolIcon.eventForeground",{dark:"#EE9D28",light:"#D67E00",hcDark:"#EE9D28",hcLight:"#D67E00"},v("symbolIcon.eventForeground","The foreground color for event symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));q("symbolIcon.fieldForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},v("symbolIcon.fieldForeground","The foreground color for field symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));q("symbolIcon.fileForeground",{dark:Ae,light:Ae,hcDark:Ae,hcLight:Ae},v("symbolIcon.fileForeground","The foreground color for file symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));q("symbolIcon.folderForeground",{dark:Ae,light:Ae,hcDark:Ae,hcLight:Ae},v("symbolIcon.folderForeground","The foreground color for folder symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));q("symbolIcon.functionForeground",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},v("symbolIcon.functionForeground","The foreground color for function symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));q("symbolIcon.interfaceForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},v("symbolIcon.interfaceForeground","The foreground color for interface symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));q("symbolIcon.keyForeground",{dark:Ae,light:Ae,hcDark:Ae,hcLight:Ae},v("symbolIcon.keyForeground","The foreground color for key symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));q("symbolIcon.keywordForeground",{dark:Ae,light:Ae,hcDark:Ae,hcLight:Ae},v("symbolIcon.keywordForeground","The foreground color for keyword symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));q("symbolIcon.methodForeground",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},v("symbolIcon.methodForeground","The foreground color for method symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));q("symbolIcon.moduleForeground",{dark:Ae,light:Ae,hcDark:Ae,hcLight:Ae},v("symbolIcon.moduleForeground","The foreground color for module symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));q("symbolIcon.namespaceForeground",{dark:Ae,light:Ae,hcDark:Ae,hcLight:Ae},v("symbolIcon.namespaceForeground","The foreground color for namespace symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));q("symbolIcon.nullForeground",{dark:Ae,light:Ae,hcDark:Ae,hcLight:Ae},v("symbolIcon.nullForeground","The foreground color for null symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));q("symbolIcon.numberForeground",{dark:Ae,light:Ae,hcDark:Ae,hcLight:Ae},v("symbolIcon.numberForeground","The foreground color for number symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));q("symbolIcon.objectForeground",{dark:Ae,light:Ae,hcDark:Ae,hcLight:Ae},v("symbolIcon.objectForeground","The foreground color for object symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));q("symbolIcon.operatorForeground",{dark:Ae,light:Ae,hcDark:Ae,hcLight:Ae},v("symbolIcon.operatorForeground","The foreground color for operator symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));q("symbolIcon.packageForeground",{dark:Ae,light:Ae,hcDark:Ae,hcLight:Ae},v("symbolIcon.packageForeground","The foreground color for package symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));q("symbolIcon.propertyForeground",{dark:Ae,light:Ae,hcDark:Ae,hcLight:Ae},v("symbolIcon.propertyForeground","The foreground color for property symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));q("symbolIcon.referenceForeground",{dark:Ae,light:Ae,hcDark:Ae,hcLight:Ae},v("symbolIcon.referenceForeground","The foreground color for reference symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));q("symbolIcon.snippetForeground",{dark:Ae,light:Ae,hcDark:Ae,hcLight:Ae},v("symbolIcon.snippetForeground","The foreground color for snippet symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));q("symbolIcon.stringForeground",{dark:Ae,light:Ae,hcDark:Ae,hcLight:Ae},v("symbolIcon.stringForeground","The foreground color for string symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));q("symbolIcon.structForeground",{dark:Ae,light:Ae,hcDark:Ae,hcLight:Ae},v("symbolIcon.structForeground","The foreground color for struct symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));q("symbolIcon.textForeground",{dark:Ae,light:Ae,hcDark:Ae,hcLight:Ae},v("symbolIcon.textForeground","The foreground color for text symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));q("symbolIcon.typeParameterForeground",{dark:Ae,light:Ae,hcDark:Ae,hcLight:Ae},v("symbolIcon.typeParameterForeground","The foreground color for type parameter symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));q("symbolIcon.unitForeground",{dark:Ae,light:Ae,hcDark:Ae,hcLight:Ae},v("symbolIcon.unitForeground","The foreground color for unit symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));q("symbolIcon.variableForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},v("symbolIcon.variableForeground","The foreground color for variable symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));const Wke=Object.freeze({kind:gt.Empty,title:v("codeAction.widget.id.more","More Actions...")}),Z4t=Object.freeze([{kind:gt.QuickFix,title:v("codeAction.widget.id.quickfix","Quick Fix")},{kind:gt.RefactorExtract,title:v("codeAction.widget.id.extract","Extract"),icon:we.wrench},{kind:gt.RefactorInline,title:v("codeAction.widget.id.inline","Inline"),icon:we.wrench},{kind:gt.RefactorRewrite,title:v("codeAction.widget.id.convert","Rewrite"),icon:we.wrench},{kind:gt.RefactorMove,title:v("codeAction.widget.id.move","Move"),icon:we.wrench},{kind:gt.SurroundWith,title:v("codeAction.widget.id.surround","Surround With"),icon:we.symbolSnippet},{kind:gt.Source,title:v("codeAction.widget.id.source","Source Action"),icon:we.symbolFile},Wke]);function Y4t(u,e,t){if(!e)return u.map(r=>{var a;return{kind:"action",item:r,group:Wke,disabled:!!r.action.disabled,label:r.action.disabled||r.action.title,canPreview:!!(!((a=r.action.edit)===null||a===void 0)&&a.edits.length)}});const n=Z4t.map(r=>({group:r,actions:[]}));for(const r of u){const a=r.action.kind?new gt(r.action.kind):gt.None;for(const o of n)if(o.group.kind.contains(a)){o.actions.push(r);break}}const i=[];for(const r of n)if(r.actions.length){i.push({kind:"header",group:r.group});for(const a of r.actions)i.push({kind:"action",item:a,group:r.group,label:a.action.title,disabled:!!a.action.disabled,keybinding:t(a.action)})}return i}var Q4t=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},X4t=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},MU,S5;(function(u){u.Hidden={type:0};class e{constructor(n,i,r,a){this.actions=n,this.trigger=i,this.editorPosition=r,this.widgetPosition=a,this.type=1}}u.Showing=e})(S5||(S5={}));let V3=MU=class extends ne{constructor(e,t){super(),this._editor=e,this._onClick=this._register(new Q),this.onClick=this._onClick.event,this._state=S5.Hidden,this._domNode=ve("div.lightBulbWidget"),this._register(Zu.ignoreTarget(this._domNode)),this._editor.addContentWidget(this),this._register(this._editor.onDidChangeModelContent(n=>{const i=this._editor.getModel();(this.state.type!==1||!i||this.state.editorPosition.lineNumber>=i.getLineCount())&&this.hide()})),this._register(WJe(this._domNode,n=>{if(this.state.type!==1)return;this._editor.focus(),n.preventDefault();const{top:i,height:r}=ji(this._domNode),a=this._editor.getOption(66);let o=Math.floor(a/3);this.state.widgetPosition.position!==null&&this.state.widgetPosition.position.lineNumber{(n.buttons&1)===1&&this.hide()})),this._register(this._editor.onDidChangeConfiguration(n=>{n.hasChanged(64)&&!this._editor.getOption(64).enabled&&this.hide()})),this._register(Ne.runAndSubscribe(t.onDidUpdateKeybindings,()=>{var n,i,r,a;this._preferredKbLabel=(i=(n=t.lookupKeybinding(Vke))===null||n===void 0?void 0:n.getLabel())!==null&&i!==void 0?i:void 0,this._quickFixKbLabel=(a=(r=t.lookupKeybinding(Qee))===null||r===void 0?void 0:r.getLabel())!==null&&a!==void 0?a:void 0,this._updateLightBulbTitleAndIcon()}))}dispose(){super.dispose(),this._editor.removeContentWidget(this)}getId(){return"LightBulbWidget"}getDomNode(){return this._domNode}getPosition(){return this._state.type===1?this._state.widgetPosition:null}update(e,t,n){if(e.validActions.length<=0)return this.hide();const i=this._editor.getOptions();if(!i.get(64).enabled)return this.hide();const r=this._editor.getModel();if(!r)return this.hide();const{lineNumber:a,column:o}=r.validatePosition(n),s=r.getOptions().tabSize,l=i.get(50),c=r.getLineContent(a),d=pP(c,s),h=l.spaceWidth*d>22,E=g=>g>2&&this._editor.getTopForLineNumber(g)===this._editor.getTopForLineNumber(g-1);let m=a;if(!h){if(a>1&&!E(a-1))m-=1;else if(!E(a+1))m+=1;else if(o*l.spaceWidth<22)return this.hide()}this.state=new S5.Showing(e,t,n,{position:{lineNumber:m,column:1},preference:MU._posPref}),this._editor.layoutContentWidget(this)}hide(){this.state!==S5.Hidden&&(this.state=S5.Hidden,this._editor.layoutContentWidget(this))}get state(){return this._state}set state(e){this._state=e,this._updateLightBulbTitleAndIcon()}_updateLightBulbTitleAndIcon(){if(this.state.type===1&&this.state.actions.hasAutoFix&&(this._domNode.classList.remove(...st.asClassNameArray(we.lightBulb)),this._domNode.classList.add(...st.asClassNameArray(we.lightbulbAutofix)),this._preferredKbLabel)){this.title=v("preferredcodeActionWithKb","Show Code Actions. Preferred Quick Fix Available ({0})",this._preferredKbLabel);return}this._domNode.classList.remove(...st.asClassNameArray(we.lightbulbAutofix)),this._domNode.classList.add(...st.asClassNameArray(we.lightBulb)),this._quickFixKbLabel?this.title=v("codeActionWithKb","Show Code Actions ({0})",this._quickFixKbLabel):this.title=v("codeAction","Show Code Actions")}set title(e){this._domNode.title=e}};V3.ID="editor.contrib.lightbulbWidget";V3._posPref=[0];V3=MU=Q4t([X4t(1,qu)],V3);var eEt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},gle=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},Gke=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})},TU;let h4=TU=class{constructor(e,t,n){this._options=e,this._languageService=t,this._openerService=n,this._onDidRenderAsync=new Q,this.onDidRenderAsync=this._onDidRenderAsync.event}dispose(){this._onDidRenderAsync.dispose()}render(e,t,n){if(!e)return{element:document.createElement("span"),dispose:()=>{}};const i=new pe,r=i.add(BP(e,Object.assign(Object.assign({},this._getRenderOptions(e,i)),t),n));return r.element.classList.add("rendered-markdown"),{element:r.element,dispose:()=>i.dispose()}}_getRenderOptions(e,t){return{codeBlockRenderer:(n,i)=>Gke(this,void 0,void 0,function*(){var r,a,o;let s;n?s=this._languageService.getLanguageIdByLanguageName(n):this._options.editor&&(s=(r=this._options.editor.getModel())===null||r===void 0?void 0:r.getLanguageId()),s||(s=Ws);const l=yield Frt(this._languageService,i,s),c=document.createElement("span");if(c.innerHTML=(o=(a=TU._ttpTokenizer)===null||a===void 0?void 0:a.createHTML(l))!==null&&o!==void 0?o:l,this._options.editor){const d=this._options.editor.getOption(50);ea(c,d)}else this._options.codeBlockFontFamily&&(c.style.fontFamily=this._options.codeBlockFontFamily);return this._options.codeBlockFontSize!==void 0&&(c.style.fontSize=this._options.codeBlockFontSize),c}),asyncRenderCallback:()=>this._onDidRenderAsync.fire(),actionHandler:{callback:n=>Uke(this._openerService,n,e.isTrusted),disposables:t}}}};h4._ttpTokenizer=b4("tokenizeToString",{createHTML(u){return u}});h4=TU=eEt([gle(1,vn),gle(2,Cs)],h4);function Uke(u,e,t){return Gke(this,void 0,void 0,function*(){try{return yield u.open(e,{fromUserGesture:!0,allowContributedOpeners:!0,allowCommands:tEt(t)})}catch(n){return zt(n),!1}})}function tEt(u){return u===!0?!0:u&&Array.isArray(u.enabledCommands)?u.enabledCommands:!1}var uEt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},fle=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},d8;let cs=d8=class{static get(e){return e.getContribution(d8.ID)}constructor(e,t,n){this._openerService=n,this._messageWidget=new Ir,this._messageListeners=new pe,this._mouseOverMessage=!1,this._editor=e,this._visible=d8.MESSAGE_VISIBLE.bindTo(t)}dispose(){var e;(e=this._message)===null||e===void 0||e.dispose(),this._messageListeners.dispose(),this._messageWidget.dispose(),this._visible.reset()}showMessage(e,t){ga(nm(e)?e.value:e),this._visible.set(!0),this._messageWidget.clear(),this._messageListeners.clear(),this._message=nm(e)?BP(e,{actionHandler:{callback:i=>Uke(this._openerService,i,nm(e)?e.isTrusted:void 0),disposables:this._messageListeners}}):void 0,this._messageWidget.value=new ple(this._editor,t,typeof e=="string"?e:this._message.element),this._messageListeners.add(Ne.debounce(this._editor.onDidBlurEditorText,(i,r)=>r,0)(()=>{this._mouseOverMessage||this._messageWidget.value&&Qr(yl(),this._messageWidget.value.getDomNode())||this.closeMessage()})),this._messageListeners.add(this._editor.onDidChangeCursorPosition(()=>this.closeMessage())),this._messageListeners.add(this._editor.onDidDispose(()=>this.closeMessage())),this._messageListeners.add(this._editor.onDidChangeModel(()=>this.closeMessage())),this._messageListeners.add(ce(this._messageWidget.value.getDomNode(),Me.MOUSE_ENTER,()=>this._mouseOverMessage=!0,!0)),this._messageListeners.add(ce(this._messageWidget.value.getDomNode(),Me.MOUSE_LEAVE,()=>this._mouseOverMessage=!1,!0));let n;this._messageListeners.add(this._editor.onMouseMove(i=>{i.target.position&&(n?n.containsPosition(i.target.position)||this.closeMessage():n=new j(t.lineNumber-3,1,i.target.position.lineNumber+3,1))}))}closeMessage(){this._visible.reset(),this._messageListeners.clear(),this._messageWidget.value&&this._messageListeners.add(ple.fadeOut(this._messageWidget.value))}};cs.ID="editor.contrib.messageController";cs.MESSAGE_VISIBLE=new Pe("messageVisible",!1,v("messageVisible","Whether the editor is currently showing an inline message"));cs=d8=uEt([fle(1,pt),fle(2,Cs)],cs);const nEt=xr.bindToContribution(cs.get);ze(new nEt({id:"leaveEditorMessage",precondition:cs.MESSAGE_VISIBLE,handler:u=>u.closeMessage(),kbOpts:{weight:100+30,primary:9}}));let ple=class{static fadeOut(e){const t=()=>{e.dispose(),clearTimeout(n),e.getDomNode().removeEventListener("animationend",t)},n=setTimeout(t,110);return e.getDomNode().addEventListener("animationend",t),e.getDomNode().classList.add("fadeOut"),{dispose:t}}constructor(e,{lineNumber:t,column:n},i){this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._editor=e,this._editor.revealLinesInCenterIfOutsideViewport(t,t,0),this._position={lineNumber:t,column:n},this._domNode=document.createElement("div"),this._domNode.classList.add("monaco-editor-overlaymessage"),this._domNode.style.marginLeft="-6px";const r=document.createElement("div");r.classList.add("anchor","top"),this._domNode.appendChild(r);const a=document.createElement("div");typeof i=="string"?(a.classList.add("message"),a.textContent=i):(i.classList.add("message"),a.appendChild(i)),this._domNode.appendChild(a);const o=document.createElement("div");o.classList.add("anchor","below"),this._domNode.appendChild(o),this._editor.addContentWidget(this),this._domNode.classList.add("fadeIn")}dispose(){this._editor.removeContentWidget(this)}getId(){return"messageoverlay"}getDomNode(){return this._domNode}getPosition(){return{position:this._position,preference:[1,2],positionAffinity:1}}afterRender(e){this._domNode.classList.toggle("below",e===2)}};fu(cs.ID,cs,4);var qke=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},NU=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},iEt=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};const Jke="acceptSelectedCodeAction",Zke="previewSelectedCodeAction";class rEt{get templateId(){return"header"}renderTemplate(e){e.classList.add("group-header");const t=document.createElement("span");return e.append(t),{container:e,text:t}}renderElement(e,t,n){var i,r;n.text.textContent=(r=(i=e.group)===null||i===void 0?void 0:i.title)!==null&&r!==void 0?r:""}disposeTemplate(e){}}let PU=class{get templateId(){return"action"}constructor(e,t){this._supportsPreview=e,this._keybindingService=t}renderTemplate(e){e.classList.add(this.templateId);const t=document.createElement("div");t.className="icon",e.append(t);const n=document.createElement("span");n.className="title",e.append(n);const i=new FA(e,Os);return{container:e,icon:t,text:n,keybinding:i}}renderElement(e,t,n){var i,r,a;if(!((i=e.group)===null||i===void 0)&&i.icon?(n.icon.className=st.asClassName(e.group.icon),e.group.icon.color&&(n.icon.style.color=Re(e.group.icon.color.id))):(n.icon.className=st.asClassName(we.lightBulb),n.icon.style.color="var(--vscode-editorLightBulb-foreground)"),!e.item||!e.label)return;n.text.textContent=Yke(e.label),n.keybinding.set(e.keybinding),uZe(!!e.keybinding,n.keybinding.element);const o=(r=this._keybindingService.lookupKeybinding(Jke))===null||r===void 0?void 0:r.getLabel(),s=(a=this._keybindingService.lookupKeybinding(Zke))===null||a===void 0?void 0:a.getLabel();n.container.classList.toggle("option-disabled",e.disabled),e.disabled?n.container.title=e.label:o&&s?this._supportsPreview&&e.canPreview?n.container.title=v({key:"label-preview",comment:['placeholders are keybindings, e.g "F2 to apply, Shift+F2 to preview"']},"{0} to apply, {1} to preview",o,s):n.container.title=v({key:"label",comment:['placeholder is a keybinding, e.g "F2 to apply"']},"{0} to apply",o):n.container.title=""}disposeTemplate(e){}};PU=qke([NU(1,qu)],PU);class aEt extends UIEvent{constructor(){super("acceptSelectedAction")}}class Dle extends UIEvent{constructor(){super("previewSelectedAction")}}function oEt(u){if(u.kind==="action")return u.label}let RU=class extends ne{constructor(e,t,n,i,r,a){super(),this._delegate=i,this._contextViewService=r,this._keybindingService=a,this._actionLineHeight=24,this._headerLineHeight=26,this.cts=this._register(new vi),this.domNode=document.createElement("div"),this.domNode.classList.add("actionList");const o={getHeight:s=>s.kind==="header"?this._headerLineHeight:this._actionLineHeight,getTemplateId:s=>s.kind};this._list=this._register(new Gl(e,this.domNode,o,[new PU(t,this._keybindingService),new rEt],{keyboardSupport:!1,typeNavigationEnabled:!0,keyboardNavigationLabelProvider:{getKeyboardNavigationLabel:oEt},accessibilityProvider:{getAriaLabel:s=>{if(s.kind==="action"){let l=s.label?Yke(s==null?void 0:s.label):"";return s.disabled&&(l=v({key:"customQuickFixWidget.labels",comment:["Action widget labels for accessibility."]},"{0}, Disabled Reason: {1}",l,s.disabled)),l}return null},getWidgetAriaLabel:()=>v({key:"customQuickFixWidget",comment:["An action widget option"]},"Action Widget"),getRole:s=>s.kind==="action"?"option":"separator",getWidgetRole:()=>"listbox"}})),this._list.style(Tp),this._register(this._list.onMouseClick(s=>this.onListClick(s))),this._register(this._list.onMouseOver(s=>this.onListHover(s))),this._register(this._list.onDidChangeFocus(()=>this.onFocus())),this._register(this._list.onDidChangeSelection(s=>this.onListSelection(s))),this._allMenuItems=n,this._list.splice(0,this._list.length,this._allMenuItems),this._list.length&&this.focusNext()}focusCondition(e){return!e.disabled&&e.kind==="action"}hide(e){this._delegate.onHide(e),this.cts.cancel(),this._contextViewService.hideContextView()}layout(e){const t=this._allMenuItems.filter(l=>l.kind==="header").length,i=this._allMenuItems.length*this._actionLineHeight+t*this._headerLineHeight-t*this._actionLineHeight;this._list.layout(i);const r=this._allMenuItems.map((l,c)=>{const d=document.getElementById(this._list.getElementID(c));if(d){d.style.width="auto";const h=d.getBoundingClientRect().width;return d.style.width="",h}return 0}),a=Math.max(...r,e),o=.7,s=Math.min(i,document.body.clientHeight*o);return this._list.layout(s,a),this.domNode.style.height=`${s}px`,this._list.domFocus(),a}focusPrevious(){this._list.focusPrevious(1,!0,void 0,this.focusCondition)}focusNext(){this._list.focusNext(1,!0,void 0,this.focusCondition)}acceptSelected(e){const t=this._list.getFocus();if(t.length===0)return;const n=t[0],i=this._list.element(n);if(!this.focusCondition(i))return;const r=e?new Dle:new aEt;this._list.setSelection([n],r)}onListSelection(e){if(!e.elements.length)return;const t=e.elements[0];t.item&&this.focusCondition(t)?this._delegate.onSelect(t.item,e.browserEvent instanceof Dle):this._list.setSelection([])}onFocus(){var e,t;this._list.domFocus();const n=this._list.getFocus();if(n.length===0)return;const i=n[0],r=this._list.element(i);(t=(e=this._delegate).onFocus)===null||t===void 0||t.call(e,r.item)}onListHover(e){return iEt(this,void 0,void 0,function*(){const t=e.element;if(t&&t.item&&this.focusCondition(t)){if(this._delegate.onHover&&!t.disabled&&t.kind==="action"){const n=yield this._delegate.onHover(t.item,this.cts.token);t.canPreview=n?n.canPreview:void 0}e.index&&this._list.splice(e.index,1,[t])}this._list.setFocus(typeof e.index=="number"?[e.index]:[])})}onListClick(e){e.element&&this.focusCondition(e.element)&&this._list.setFocus([])}};RU=qke([NU(4,F4),NU(5,qu)],RU);function Yke(u){return u.replace(/\r\n|\r|\n/g," ")}var sEt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},bH=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}};q("actionBar.toggledBackground",{dark:If,light:If,hcDark:If,hcLight:If},v("actionBar.toggledBackground","Background color for toggled action items in action bar."));const $3={Visible:new Pe("codeActionMenuVisible",!1,v("codeActionMenuVisible","Whether the action widget list is visible"))},Op=Ut("actionWidgetService");let K3=class extends ne{get isVisible(){return $3.Visible.getValue(this._contextKeyService)||!1}constructor(e,t,n){super(),this._contextViewService=e,this._contextKeyService=t,this._instantiationService=n,this._list=this._register(new Ir)}show(e,t,n,i,r,a,o){const s=$3.Visible.bindTo(this._contextKeyService),l=this._instantiationService.createInstance(RU,e,t,n,i);this._contextViewService.showContextView({getAnchor:()=>r,render:c=>(s.set(!0),this._renderWidget(c,l,o??[])),onHide:c=>{s.reset(),this._onWidgetClosed(c)}},a,!1)}acceptSelected(e){var t;(t=this._list.value)===null||t===void 0||t.acceptSelected(e)}focusPrevious(){var e,t;(t=(e=this._list)===null||e===void 0?void 0:e.value)===null||t===void 0||t.focusPrevious()}focusNext(){var e,t;(t=(e=this._list)===null||e===void 0?void 0:e.value)===null||t===void 0||t.focusNext()}hide(){var e;(e=this._list.value)===null||e===void 0||e.hide(),this._list.clear()}_renderWidget(e,t,n){var i;const r=document.createElement("div");if(r.classList.add("action-widget"),e.appendChild(r),this._list.value=t,this._list.value)r.appendChild(this._list.value.domNode);else throw new Error("List has no value");const a=new pe,o=document.createElement("div"),s=e.appendChild(o);s.classList.add("context-view-block"),a.add(ce(s,Me.MOUSE_DOWN,m=>m.stopPropagation()));const l=document.createElement("div"),c=e.appendChild(l);c.classList.add("context-view-pointerBlock"),a.add(ce(c,Me.POINTER_MOVE,()=>c.remove())),a.add(ce(c,Me.MOUSE_DOWN,()=>c.remove()));let d=0;if(n.length){const m=this._createActionBar(".action-widget-action-bar",n);m&&(r.appendChild(m.getContainer().parentElement),a.add(m),d=m.getContainer().offsetWidth)}const h=(i=this._list.value)===null||i===void 0?void 0:i.layout(d);r.style.width=`${h}px`;const E=a.add(y1(e));return a.add(E.onDidBlur(()=>this.hide())),a}_createActionBar(e,t){if(!t.length)return;const n=ve(e),i=new j0(n);return i.push(t,{icon:!1,label:!0}),i}_onWidgetClosed(e){var t;(t=this._list.value)===null||t===void 0||t.hide(e)}};K3=sEt([bH(0,F4),bH(1,pt),bH(2,mt)],K3);au(Op,K3,1);const zA=100+1e3;gn(class extends n0{constructor(){super({id:"hideCodeActionWidget",title:{value:v("hideCodeActionWidget.title","Hide action widget"),original:"Hide action widget"},precondition:$3.Visible,keybinding:{weight:zA,primary:9,secondary:[1033]}})}run(u){u.get(Op).hide()}});gn(class extends n0{constructor(){super({id:"selectPrevCodeAction",title:{value:v("selectPrevCodeAction.title","Select previous action"),original:"Select previous action"},precondition:$3.Visible,keybinding:{weight:zA,primary:16,secondary:[2064],mac:{primary:16,secondary:[2064,302]}}})}run(u){const e=u.get(Op);e instanceof K3&&e.focusPrevious()}});gn(class extends n0{constructor(){super({id:"selectNextCodeAction",title:{value:v("selectNextCodeAction.title","Select next action"),original:"Select next action"},precondition:$3.Visible,keybinding:{weight:zA,primary:18,secondary:[2066],mac:{primary:18,secondary:[2066,300]}}})}run(u){const e=u.get(Op);e instanceof K3&&e.focusNext()}});gn(class extends n0{constructor(){super({id:Jke,title:{value:v("acceptSelected.title","Accept selected action"),original:"Accept selected action"},precondition:$3.Visible,keybinding:{weight:zA,primary:3,secondary:[2137]}})}run(u){const e=u.get(Op);e instanceof K3&&e.acceptSelected()}});gn(class extends n0{constructor(){super({id:Zke,title:{value:v("previewSelected.title","Preview selected action"),original:"Preview selected action"},precondition:$3.Visible,keybinding:{weight:zA,primary:2051}})}run(u){const e=u.get(Op);e instanceof K3&&e.acceptSelected(!0)}});var lEt=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};const Qke=new Pe("supportedCodeAction","");class cEt extends ne{constructor(e,t,n,i=250){super(),this._editor=e,this._markerService=t,this._signalChange=n,this._delay=i,this._autoTriggerTimer=this._register(new Vl),this._register(this._markerService.onMarkerChanged(r=>this._onMarkerChanges(r))),this._register(this._editor.onDidChangeCursorPosition(()=>this._tryAutoTrigger()))}trigger(e){const t=this._getRangeOfSelectionUnlessWhitespaceEnclosed(e);this._signalChange(t?{trigger:e,selection:t}:void 0)}_onMarkerChanges(e){const t=this._editor.getModel();t&&e.some(n=>TX(n,t.uri))&&this._tryAutoTrigger()}_tryAutoTrigger(){this._autoTriggerTimer.cancelAndSet(()=>{this.trigger({type:2,triggerAction:fs.Default})},this._delay)}_getRangeOfSelectionUnlessWhitespaceEnclosed(e){if(!this._editor.hasModel())return;const t=this._editor.getModel(),n=this._editor.getSelection();if(n.isEmpty()&&e.type===2){const{lineNumber:i,column:r}=n.getPosition(),a=t.getLineContent(i);if(a.length===0)return;if(r===1){if(/\s/.test(a[0]))return}else if(r===t.getLineMaxColumn(i)){if(/\s/.test(a[a.length-1]))return}else if(/\s/.test(a[r-2])&&/\s/.test(a[r-1]))return}return n}}var Bf;(function(u){u.Empty={type:0};class e{constructor(n,i,r){this.trigger=n,this.position=i,this._cancellablePromise=r,this.type=1,this.actions=r.catch(a=>{if(dd(a))return Xke;throw a})}cancel(){this._cancellablePromise.cancel()}}u.Triggered=e})(Bf||(Bf={}));const Xke=Object.freeze({allActions:[],validActions:[],dispose:()=>{},documentation:[],hasAutoFix:!1});class dEt extends ne{constructor(e,t,n,i,r,a){super(),this._editor=e,this._registry=t,this._markerService=n,this._progressService=r,this._configurationService=a,this._codeActionOracle=this._register(new Ir),this._state=Bf.Empty,this._onDidChangeState=this._register(new Q),this.onDidChangeState=this._onDidChangeState.event,this._disposed=!1,this._supportedCodeActions=Qke.bindTo(i),this._register(this._editor.onDidChangeModel(()=>this._update())),this._register(this._editor.onDidChangeModelLanguage(()=>this._update())),this._register(this._registry.onDidChange(()=>this._update())),this._update()}dispose(){this._disposed||(this._disposed=!0,super.dispose(),this.setState(Bf.Empty,!0))}_settingEnabledNearbyQuickfixes(){var e;const t=(e=this._editor)===null||e===void 0?void 0:e.getModel();return this._configurationService?this._configurationService.getValue("editor.codeActionWidget.includeNearbyQuickfixes",{resource:t==null?void 0:t.uri}):!1}_update(){if(this._disposed)return;this._codeActionOracle.value=void 0,this.setState(Bf.Empty);const e=this._editor.getModel();if(e&&this._registry.has(e)&&!this._editor.getOption(90)){const t=this._registry.all(e).flatMap(n=>{var i;return(i=n.providedCodeActionKinds)!==null&&i!==void 0?i:[]});this._supportedCodeActions.set(t.join(" ")),this._codeActionOracle.value=new cEt(this._editor,this._markerService,n=>{var i;if(!n){this.setState(Bf.Empty);return}const r=n.selection.getStartPosition(),a=Ui(o=>lEt(this,void 0,void 0,function*(){var s,l,c,d,h,E;if(this._settingEnabledNearbyQuickfixes()&&n.trigger.type===1&&(n.trigger.triggerAction===fs.QuickFix||!((l=(s=n.trigger.filter)===null||s===void 0?void 0:s.include)===null||l===void 0)&&l.contains(gt.QuickFix))){const m=yield p2(this._registry,e,n.selection,n.trigger,Yh.None,o);if(o.isCancellationRequested)return Xke;if(!((c=m.validActions)===null||c===void 0?void 0:c.some(f=>f.action.kind?gt.QuickFix.contains(new gt(f.action.kind)):!1))){const f=this._markerService.read({resource:e.uri});if(f.length>0){const p=n.selection.getPosition();let D=p,x=Number.MAX_VALUE,b=!1;for(const k of f){const A=k.endColumn,F=k.endLineNumber,S=k.startLineNumber;(F===p.lineNumber||S===p.lineNumber)&&Math.abs(p.column-A){w.highlightRange=w.action.isPreferred}),S.push(...F.validActions)),{validActions:S,allActions:m.allActions,documentation:m.documentation,hasAutoFix:m.hasAutoFix,dispose:()=>{m.dispose()}}}}}}return p2(this._registry,e,n.selection,n.trigger,Yh.None,o)}));n.trigger.type===1&&((i=this._progressService)===null||i===void 0||i.showWhile(a,250)),this.setState(new Bf.Triggered(n.trigger,r,a))},void 0),this._codeActionOracle.value.trigger({type:2,triggerAction:fs.Default})}else this._supportedCodeActions.reset()}trigger(e){var t;(t=this._codeActionOracle.value)===null||t===void 0||t.trigger(e)}setState(e,t){e!==this._state&&(this._state.type===1&&this._state.cancel(),this._state=e,!t&&!this._disposed&&this._onDidChangeState.fire(e))}}var hEt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},ah=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},vC=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})},h8;const EEt="quickfix-edit-highlight";let Um=h8=class extends ne{static get(e){return e.getContribution(h8.ID)}constructor(e,t,n,i,r,a,o,s,l,c){super(),this._commandService=o,this._configurationService=s,this._actionWidgetService=l,this._instantiationService=c,this._activeCodeActions=this._register(new Ir),this._showDisabled=!1,this._disposed=!1,this._editor=e,this._model=this._register(new dEt(this._editor,r.codeActionProvider,t,n,a,s)),this._register(this._model.onDidChangeState(d=>this.update(d))),this._lightBulbWidget=new mg(()=>{const d=this._editor.getContribution(V3.ID);return d&&this._register(d.onClick(h=>this.showCodeActionList(h.actions,h,{includeDisabledActions:!1,fromLightbulb:!0}))),d}),this._resolver=i.createInstance(Rw),this._register(this._editor.onDidLayoutChange(()=>this._actionWidgetService.hide()))}dispose(){this._disposed=!0,super.dispose()}showCodeActions(e,t,n){return this.showCodeActionList(t,n,{includeDisabledActions:!1,fromLightbulb:!1})}manualTriggerAtCurrentPosition(e,t,n,i){var r;if(!this._editor.hasModel())return;(r=cs.get(this._editor))===null||r===void 0||r.closeMessage();const a=this._editor.getPosition();this._trigger({type:1,triggerAction:t,filter:n,autoApply:i,context:{notAvailableMessage:e,position:a}})}_trigger(e){return this._model.trigger(e)}_applyCodeAction(e,t,n){return vC(this,void 0,void 0,function*(){try{yield this._instantiationService.invokeFunction(G4t,e,Pw.FromCodeActions,{preview:n,editor:this._editor})}finally{t&&this._trigger({type:2,triggerAction:fs.QuickFix,filter:{}})}})}update(e){var t,n,i,r,a,o,s;return vC(this,void 0,void 0,function*(){if(e.type!==1){(t=this._lightBulbWidget.rawValue)===null||t===void 0||t.hide();return}let l;try{l=yield e.actions}catch(c){zt(c);return}if(!this._disposed)if((n=this._lightBulbWidget.value)===null||n===void 0||n.update(l,e.trigger,e.position),e.trigger.type===1){if(!((i=e.trigger.filter)===null||i===void 0)&&i.include){const d=this.tryGetValidActionToApply(e.trigger,l);if(d){try{(r=this._lightBulbWidget.value)===null||r===void 0||r.hide(),yield this._applyCodeAction(d,!1,!1)}finally{l.dispose()}return}if(e.trigger.context){const h=this.getInvalidActionThatWouldHaveBeenApplied(e.trigger,l);if(h&&h.action.disabled){(a=cs.get(this._editor))===null||a===void 0||a.showMessage(h.action.disabled,e.trigger.context.position),l.dispose();return}}}const c=!!(!((o=e.trigger.filter)===null||o===void 0)&&o.include);if(e.trigger.context&&(!l.allActions.length||!c&&!l.validActions.length)){(s=cs.get(this._editor))===null||s===void 0||s.showMessage(e.trigger.context.notAvailableMessage,e.trigger.context.position),this._activeCodeActions.value=l,l.dispose();return}this._activeCodeActions.value=l,this.showCodeActionList(l,this.toCoords(e.position),{includeDisabledActions:c,fromLightbulb:!1})}else this._actionWidgetService.isVisible?l.dispose():this._activeCodeActions.value=l})}getInvalidActionThatWouldHaveBeenApplied(e,t){if(t.allActions.length&&(e.autoApply==="first"&&t.validActions.length===0||e.autoApply==="ifSingle"&&t.allActions.length===1))return t.allActions.find(({action:n})=>n.disabled)}tryGetValidActionToApply(e,t){if(t.validActions.length&&(e.autoApply==="first"&&t.validActions.length>0||e.autoApply==="ifSingle"&&t.validActions.length===1))return t.validActions[0]}showCodeActionList(e,t,n){return vC(this,void 0,void 0,function*(){const i=this._editor.createDecorationsCollection(),r=this._editor.getDomNode();if(!r)return;const a=n.includeDisabledActions&&(this._showDisabled||e.validActions.length===0)?e.allActions:e.validActions;if(!a.length)return;const o=ee.isIPosition(t)?this.toCoords(t):t,s={onSelect:(l,c)=>vC(this,void 0,void 0,function*(){this._applyCodeAction(l,!0,!!c),this._actionWidgetService.hide(),i.clear()}),onHide:()=>{var l;(l=this._editor)===null||l===void 0||l.focus(),i.clear()},onHover:(l,c)=>vC(this,void 0,void 0,function*(){var d;if(yield l.resolve(c),!c.isCancellationRequested)return{canPreview:!!(!((d=l.action.edit)===null||d===void 0)&&d.edits.length)}}),onFocus:l=>{var c,d;if(l&&l.highlightRange&&l.action.diagnostics){const h=[{range:l.action.diagnostics[0],options:h8.DECORATION}];i.set(h);const E=l.action.diagnostics[0],m=(d=(c=this._editor.getModel())===null||c===void 0?void 0:c.getWordAtPosition({lineNumber:E.startLineNumber,column:E.startColumn}))===null||d===void 0?void 0:d.word;jm(v("editingNewSelection","Context: {0} at line {1} and column {2}.",m,E.startLineNumber,E.startColumn))}else i.clear()}};this._actionWidgetService.show("codeActionWidget",!0,Y4t(a,this._shouldShowHeaders(),this._resolver.getResolver()),s,o,r,this._getActionBarActions(e,t,n))})}toCoords(e){if(!this._editor.hasModel())return{x:0,y:0};this._editor.revealPosition(e,1),this._editor.render();const t=this._editor.getScrolledVisiblePosition(e),n=ji(this._editor.getDomNode()),i=n.left+t.left,r=n.top+t.top+t.height;return{x:i,y:r}}_shouldShowHeaders(){var e;const t=(e=this._editor)===null||e===void 0?void 0:e.getModel();return this._configurationService.getValue("editor.codeActionWidget.showHeaders",{resource:t==null?void 0:t.uri})}_getActionBarActions(e,t,n){if(n.fromLightbulb)return[];const i=e.documentation.map(r=>{var a;return{id:r.id,label:r.title,tooltip:(a=r.tooltip)!==null&&a!==void 0?a:"",class:void 0,enabled:!0,run:()=>{var o;return this._commandService.executeCommand(r.id,...(o=r.arguments)!==null&&o!==void 0?o:[])}}});return n.includeDisabledActions&&e.validActions.length>0&&e.allActions.length!==e.validActions.length&&i.push(this._showDisabled?{id:"hideMoreActions",label:v("hideMoreActions","Hide Disabled"),enabled:!0,tooltip:"",class:void 0,run:()=>(this._showDisabled=!1,this.showCodeActionList(e,t,n))}:{id:"showMoreActions",label:v("showMoreActions","Show Disabled"),enabled:!0,tooltip:"",class:void 0,run:()=>(this._showDisabled=!0,this.showCodeActionList(e,t,n))}),i}};Um.ID="editor.contrib.codeActionController";Um.DECORATION=Lt.register({description:"quickfix-highlight",className:EEt});Um=h8=hEt([ah(1,G1),ah(2,pt),ah(3,mt),ah(4,We),ah(5,Dg),ah(6,ni),ah(7,tu),ah(8,Op),ah(9,mt)],Um);Kl((u,e)=>{((i,r)=>{r&&e.addRule(`.monaco-editor ${i} { background-color: ${r}; }`)})(".quickfix-edit-highlight",u.getColor(a1));const n=u.getColor(LE);n&&e.addRule(`.monaco-editor .quickfix-edit-highlight { border: 1px ${$c(u.type)?"dotted":"solid"} ${n}; box-sizing: border-box; }`)});function MA(u){return Ee.regex(Qke.keys()[0],new RegExp("(\\s|^)"+Js(u.value)+"\\b"))}const tte={type:"object",defaultSnippets:[{body:{kind:""}}],properties:{kind:{type:"string",description:v("args.schema.kind","Kind of the code action to run.")},apply:{type:"string",description:v("args.schema.apply","Controls when the returned actions are applied."),default:"ifSingle",enum:["first","ifSingle","never"],enumDescriptions:[v("args.schema.apply.first","Always apply the first returned code action."),v("args.schema.apply.ifSingle","Apply the first returned code action if it is the only one."),v("args.schema.apply.never","Do not apply the returned code actions.")]},preferred:{type:"boolean",default:!1,description:v("args.schema.preferred","Controls if only preferred code actions should be returned.")}}};function jp(u,e,t,n,i=fs.Default){if(u.hasModel()){const r=Um.get(u);r==null||r.manualTriggerAtCurrentPosition(e,i,t,n)}}class mEt extends $e{constructor(){super({id:Qee,label:v("quickfix.trigger.label","Quick Fix..."),alias:"Quick Fix...",precondition:Ee.and(W.writable,W.hasCodeActionsProvider),kbOpts:{kbExpr:W.textInputFocus,primary:2137,weight:100}})}run(e,t){return jp(t,v("editor.action.quickFix.noneMessage","No code actions available"),void 0,void 0,fs.QuickFix)}}class gEt extends xr{constructor(){super({id:Hke,precondition:Ee.and(W.writable,W.hasCodeActionsProvider),description:{description:"Trigger a code action",args:[{name:"args",schema:tte}]}})}runEditorCommand(e,t,n){const i=Zd.fromUser(n,{kind:gt.Empty,apply:"ifSingle"});return jp(t,typeof(n==null?void 0:n.kind)=="string"?i.preferred?v("editor.action.codeAction.noneMessage.preferred.kind","No preferred code actions for '{0}' available",n.kind):v("editor.action.codeAction.noneMessage.kind","No code actions for '{0}' available",n.kind):i.preferred?v("editor.action.codeAction.noneMessage.preferred","No preferred code actions available"):v("editor.action.codeAction.noneMessage","No code actions available"),{include:i.kind,includeSourceActions:!0,onlyIncludePreferredActions:i.preferred},i.apply)}}class fEt extends $e{constructor(){super({id:$ke,label:v("refactor.label","Refactor..."),alias:"Refactor...",precondition:Ee.and(W.writable,W.hasCodeActionsProvider),kbOpts:{kbExpr:W.textInputFocus,primary:3120,mac:{primary:1328},weight:100},contextMenuOpts:{group:"1_modification",order:2,when:Ee.and(W.writable,MA(gt.Refactor))},description:{description:"Refactor...",args:[{name:"args",schema:tte}]}})}run(e,t,n){const i=Zd.fromUser(n,{kind:gt.Refactor,apply:"never"});return jp(t,typeof(n==null?void 0:n.kind)=="string"?i.preferred?v("editor.action.refactor.noneMessage.preferred.kind","No preferred refactorings for '{0}' available",n.kind):v("editor.action.refactor.noneMessage.kind","No refactorings for '{0}' available",n.kind):i.preferred?v("editor.action.refactor.noneMessage.preferred","No preferred refactorings available"):v("editor.action.refactor.noneMessage","No refactorings available"),{include:gt.Refactor.contains(i.kind)?i.kind:gt.None,onlyIncludePreferredActions:i.preferred},i.apply,fs.Refactor)}}class pEt extends $e{constructor(){super({id:Kke,label:v("source.label","Source Action..."),alias:"Source Action...",precondition:Ee.and(W.writable,W.hasCodeActionsProvider),contextMenuOpts:{group:"1_modification",order:2.1,when:Ee.and(W.writable,MA(gt.Source))},description:{description:"Source Action...",args:[{name:"args",schema:tte}]}})}run(e,t,n){const i=Zd.fromUser(n,{kind:gt.Source,apply:"never"});return jp(t,typeof(n==null?void 0:n.kind)=="string"?i.preferred?v("editor.action.source.noneMessage.preferred.kind","No preferred source actions for '{0}' available",n.kind):v("editor.action.source.noneMessage.kind","No source actions for '{0}' available",n.kind):i.preferred?v("editor.action.source.noneMessage.preferred","No preferred source actions available"):v("editor.action.source.noneMessage","No source actions available"),{include:gt.Source.contains(i.kind)?i.kind:gt.None,includeSourceActions:!0,onlyIncludePreferredActions:i.preferred},i.apply,fs.SourceAction)}}class DEt extends $e{constructor(){super({id:Xee,label:v("organizeImports.label","Organize Imports"),alias:"Organize Imports",precondition:Ee.and(W.writable,MA(gt.SourceOrganizeImports)),kbOpts:{kbExpr:W.textInputFocus,primary:1581,weight:100}})}run(e,t){return jp(t,v("editor.action.organize.noneMessage","No organize imports action available"),{include:gt.SourceOrganizeImports,includeSourceActions:!0},"ifSingle",fs.OrganizeImports)}}class xEt extends $e{constructor(){super({id:ete,label:v("fixAll.label","Fix All"),alias:"Fix All",precondition:Ee.and(W.writable,MA(gt.SourceFixAll))})}run(e,t){return jp(t,v("fixAll.noneMessage","No fix all action available"),{include:gt.SourceFixAll,includeSourceActions:!0},"ifSingle",fs.FixAll)}}class vEt extends $e{constructor(){super({id:Vke,label:v("autoFix.label","Auto Fix..."),alias:"Auto Fix...",precondition:Ee.and(W.writable,MA(gt.QuickFix)),kbOpts:{kbExpr:W.textInputFocus,primary:1625,mac:{primary:2649},weight:100}})}run(e,t){return jp(t,v("editor.action.autoFix.noneMessage","No auto fixes available"),{include:gt.QuickFix,onlyIncludePreferredActions:!0},"ifSingle",fs.AutoFix)}}fu(Um.ID,Um,3);fu(V3.ID,V3,4);be(mEt);be(fEt);be(pEt);be(DEt);be(vEt);be(xEt);ze(new gEt);jn.as(Ed.Configuration).registerConfiguration(Object.assign(Object.assign({},FP),{properties:{"editor.codeActionWidget.showHeaders":{type:"boolean",scope:5,description:v("showCodeActionHeaders","Enable/disable showing group headers in the Code Action menu."),default:!0}}}));jn.as(Ed.Configuration).registerConfiguration(Object.assign(Object.assign({},FP),{properties:{"editor.codeActionWidget.includeNearbyQuickfixes":{type:"boolean",scope:5,description:v("includeNearbyQuickfixes","Enable/disable showing nearest quickfix within a line when not currently on a diagnostic."),default:!1}}}));var xle=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};class IU{constructor(){this.lenses=[],this._disposables=new pe}dispose(){this._disposables.dispose()}get isDisposed(){return this._disposables.isDisposed}add(e,t){this._disposables.add(e);for(const n of e.lenses)this.lenses.push({symbol:n,provider:t})}}function eFe(u,e,t){return xle(this,void 0,void 0,function*(){const n=u.ordered(e),i=new Map,r=new IU,a=n.map((o,s)=>xle(this,void 0,void 0,function*(){i.set(o,s);try{const l=yield Promise.resolve(o.provideCodeLenses(e,t));l&&r.add(l,o)}catch(l){Mi(l)}}));return yield Promise.all(a),r.lenses=r.lenses.sort((o,s)=>o.symbol.range.startLineNumbers.symbol.range.startLineNumber?1:i.get(o.provider)i.get(s.provider)?1:o.symbol.range.startColumns.symbol.range.startColumn?1:0),r})}ru.registerCommand("_executeCodeLensProvider",function(u,...e){let[t,n]=e;Ru(dt.isUri(t)),Ru(typeof n=="number"||!n);const{codeLensProvider:i}=u.get(We),r=u.get(_n).getModel(t);if(!r)throw _0();const a=[],o=new pe;return eFe(i,r,Kt.None).then(s=>{o.add(s);const l=[];for(const c of s.lenses)n==null||c.symbol.command?a.push(c.symbol):n-- >0&&c.provider.resolveCodeLens&&l.push(Promise.resolve(c.provider.resolveCodeLens(r,c.symbol,Kt.None)).then(d=>a.push(d||c.symbol)));return Promise.all(l)}).then(()=>a).finally(()=>{setTimeout(()=>o.dispose(),100)})});var CEt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},bEt=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}};const tFe=Ut("ICodeLensCache");class vle{constructor(e,t){this.lineCount=e,this.data=t}}let OU=class{constructor(e){this._fakeProvider=new class{provideCodeLenses(){throw new Error("not supported")}},this._cache=new gg(20,.75);const t="codelens/cache";Ph(()=>e.remove(t,1));const n="codelens/cache2",i=e.get(n,1,"{}");this._deserialize(i),Ne.once(e.onWillSaveState)(r=>{r.reason===lw.SHUTDOWN&&e.store(n,this._serialize(),1,1)})}put(e,t){const n=t.lenses.map(a=>{var o;return{range:a.symbol.range,command:a.symbol.command&&{id:"",title:(o=a.symbol.command)===null||o===void 0?void 0:o.title}}}),i=new IU;i.add({lenses:n,dispose:()=>{}},this._fakeProvider);const r=new vle(e.getLineCount(),i);this._cache.set(e.uri.toString(),r)}get(e){const t=this._cache.get(e.uri.toString());return t&&t.lineCount===e.getLineCount()?t.data:void 0}delete(e){this._cache.delete(e.uri.toString())}_serialize(){const e=Object.create(null);for(const[t,n]of this._cache){const i=new Set;for(const r of n.data.lenses)i.add(r.symbol.range.startLineNumber);e[t]={lineCount:n.lineCount,lines:[...i.values()]}}return JSON.stringify(e)}_deserialize(e){try{const t=JSON.parse(e);for(const n in t){const i=t[n],r=[];for(const o of i.lines)r.push({range:new j(o,1,o,11)});const a=new IU;a.add({lenses:r,dispose(){}},this._fakeProvider),this._cache.set(n,new vle(i.lineCount,a))}}catch{}}};OU=CEt([bEt(0,Ul)],OU);au(tFe,OU,1);class kEt{constructor(e,t,n){this.afterColumn=1073741824,this.afterLineNumber=e,this.heightInPx=t,this._onHeight=n,this.suppressMouseDown=!0,this.domNode=document.createElement("div")}onComputedHeight(e){this._lastHeight===void 0?this._lastHeight=e:this._lastHeight!==e&&(this._lastHeight=e,this._onHeight())}isVisible(){return this._lastHeight!==0&&this.domNode.hasAttribute("monaco-visible-view-zone")}}class iR{constructor(e,t){this.allowEditorOverflow=!1,this.suppressMouseDown=!0,this._commands=new Map,this._isEmpty=!0,this._editor=e,this._id=`codelens.widget-${iR._idPool++}`,this.updatePosition(t),this._domNode=document.createElement("span"),this._domNode.className="codelens-decoration"}withCommands(e,t){this._commands.clear();const n=[];let i=!1;for(let r=0;r{l.symbol.command&&s.push(l.symbol),n.addDecoration({range:l.symbol.range,options:Cle},d=>this._decorationIds[c]=d),o?o=j.plusRange(o,l.symbol.range):o=j.lift(l.symbol.range)}),this._viewZone=new kEt(o.startLineNumber-1,r,a),this._viewZoneId=i.addZone(this._viewZone),s.length>0&&(this._createContentWidgetIfNecessary(),this._contentWidget.withCommands(s,!1))}_createContentWidgetIfNecessary(){this._contentWidget?this._editor.layoutContentWidget(this._contentWidget):(this._contentWidget=new iR(this._editor,this._viewZone.afterLineNumber+1),this._editor.addContentWidget(this._contentWidget))}dispose(e,t){this._decorationIds.forEach(e.removeDecoration,e),this._decorationIds=[],t==null||t.removeZone(this._viewZoneId),this._contentWidget&&(this._editor.removeContentWidget(this._contentWidget),this._contentWidget=void 0),this._isDisposed=!0}isDisposed(){return this._isDisposed}isValid(){return this._decorationIds.some((e,t)=>{const n=this._editor.getModel().getDecorationRange(e),i=this._data[t].symbol;return!!(n&&j.isEmpty(i.range)===n.isEmpty())})}updateCodeLensSymbols(e,t){this._decorationIds.forEach(t.removeDecoration,t),this._decorationIds=[],this._data=e,this._data.forEach((n,i)=>{t.addDecoration({range:n.symbol.range,options:Cle},r=>this._decorationIds[i]=r)})}updateHeight(e,t){this._viewZone.heightInPx=e,t.layoutZone(this._viewZoneId),this._contentWidget&&this._editor.layoutContentWidget(this._contentWidget)}computeIfNecessary(e){if(!this._viewZone.isVisible())return null;for(let t=0;t=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},CC=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},uFe=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};let vv=class{constructor(e,t,n,i,r,a){this._editor=e,this._languageFeaturesService=t,this._commandService=i,this._notificationService=r,this._codeLensCache=a,this._disposables=new pe,this._localToDispose=new pe,this._lenses=[],this._oldCodeLensModels=new pe,this._provideCodeLensDebounce=n.for(t.codeLensProvider,"CodeLensProvide",{min:250}),this._resolveCodeLensesDebounce=n.for(t.codeLensProvider,"CodeLensResolve",{min:250,salt:"resolve"}),this._resolveCodeLensesScheduler=new Hu(()=>this._resolveCodeLensesInViewport(),this._resolveCodeLensesDebounce.default()),this._disposables.add(this._editor.onDidChangeModel(()=>this._onModelChange())),this._disposables.add(this._editor.onDidChangeModelLanguage(()=>this._onModelChange())),this._disposables.add(this._editor.onDidChangeConfiguration(o=>{(o.hasChanged(50)||o.hasChanged(19)||o.hasChanged(18))&&this._updateLensStyle(),o.hasChanged(17)&&this._onModelChange()})),this._disposables.add(t.codeLensProvider.onDidChange(this._onModelChange,this)),this._onModelChange(),this._updateLensStyle()}dispose(){var e;this._localDispose(),this._disposables.dispose(),this._oldCodeLensModels.dispose(),(e=this._currentCodeLensModel)===null||e===void 0||e.dispose()}_getLayoutInfo(){const e=Math.max(1.3,this._editor.getOption(66)/this._editor.getOption(52));let t=this._editor.getOption(19);return(!t||t<5)&&(t=this._editor.getOption(52)*.9|0),{fontSize:t,codeLensHeight:t*e|0}}_updateLensStyle(){const{codeLensHeight:e,fontSize:t}=this._getLayoutInfo(),n=this._editor.getOption(18),i=this._editor.getOption(50),{style:r}=this._editor.getContainerDomNode();r.setProperty("--vscode-editorCodeLens-lineHeight",`${e}px`),r.setProperty("--vscode-editorCodeLens-fontSize",`${t}px`),r.setProperty("--vscode-editorCodeLens-fontFeatureSettings",i.fontFeatureSettings),n&&(r.setProperty("--vscode-editorCodeLens-fontFamily",n),r.setProperty("--vscode-editorCodeLens-fontFamilyDefault",ss.fontFamily)),this._editor.changeViewZones(a=>{for(const o of this._lenses)o.updateHeight(e,a)})}_localDispose(){var e,t,n;(e=this._getCodeLensModelPromise)===null||e===void 0||e.cancel(),this._getCodeLensModelPromise=void 0,(t=this._resolveCodeLensesPromise)===null||t===void 0||t.cancel(),this._resolveCodeLensesPromise=void 0,this._localToDispose.clear(),this._oldCodeLensModels.clear(),(n=this._currentCodeLensModel)===null||n===void 0||n.dispose()}_onModelChange(){this._localDispose();const e=this._editor.getModel();if(!e||!this._editor.getOption(17)||e.isTooLargeForTokenization())return;const t=this._codeLensCache.get(e);if(t&&this._renderCodeLensSymbols(t),!this._languageFeaturesService.codeLensProvider.has(e)){t&&this._localToDispose.add(Rm(()=>{const i=this._codeLensCache.get(e);t===i&&(this._codeLensCache.delete(e),this._onModelChange())},30*1e3));return}for(const i of this._languageFeaturesService.codeLensProvider.all(e))if(typeof i.onDidChange=="function"){const r=i.onDidChange(()=>n.schedule());this._localToDispose.add(r)}const n=new Hu(()=>{var i;const r=Date.now();(i=this._getCodeLensModelPromise)===null||i===void 0||i.cancel(),this._getCodeLensModelPromise=Ui(a=>eFe(this._languageFeaturesService.codeLensProvider,e,a)),this._getCodeLensModelPromise.then(a=>{this._currentCodeLensModel&&this._oldCodeLensModels.add(this._currentCodeLensModel),this._currentCodeLensModel=a,this._codeLensCache.put(e,a);const o=this._provideCodeLensDebounce.update(e,Date.now()-r);n.delay=o,this._renderCodeLensSymbols(a),this._resolveCodeLensesInViewportSoon()},zt)},this._provideCodeLensDebounce.get(e));this._localToDispose.add(n),this._localToDispose.add(ft(()=>this._resolveCodeLensesScheduler.cancel())),this._localToDispose.add(this._editor.onDidChangeModelContent(()=>{var i;this._editor.changeDecorations(r=>{this._editor.changeViewZones(a=>{const o=[];let s=-1;this._lenses.forEach(c=>{!c.isValid()||s===c.getLineNumber()?o.push(c):(c.update(a),s=c.getLineNumber())});const l=new kH;o.forEach(c=>{c.dispose(l,a),this._lenses.splice(this._lenses.indexOf(c),1)}),l.commit(r)})}),n.schedule(),this._resolveCodeLensesScheduler.cancel(),(i=this._resolveCodeLensesPromise)===null||i===void 0||i.cancel(),this._resolveCodeLensesPromise=void 0})),this._localToDispose.add(this._editor.onDidFocusEditorWidget(()=>{n.schedule()})),this._localToDispose.add(this._editor.onDidBlurEditorText(()=>{n.cancel()})),this._localToDispose.add(this._editor.onDidScrollChange(i=>{i.scrollTopChanged&&this._lenses.length>0&&this._resolveCodeLensesInViewportSoon()})),this._localToDispose.add(this._editor.onDidLayoutChange(()=>{this._resolveCodeLensesInViewportSoon()})),this._localToDispose.add(ft(()=>{if(this._editor.getModel()){const i=td.capture(this._editor);this._editor.changeDecorations(r=>{this._editor.changeViewZones(a=>{this._disposeAllLenses(r,a)})}),i.restore(this._editor)}else this._disposeAllLenses(void 0,void 0)})),this._localToDispose.add(this._editor.onMouseDown(i=>{if(i.target.type!==9)return;let r=i.target.element;if((r==null?void 0:r.tagName)==="SPAN"&&(r=r.parentElement),(r==null?void 0:r.tagName)==="A")for(const a of this._lenses){const o=a.getCommand(r);if(o){this._commandService.executeCommand(o.id,...o.arguments||[]).catch(s=>this._notificationService.error(s));break}}})),n.schedule()}_disposeAllLenses(e,t){const n=new kH;for(const i of this._lenses)i.dispose(n,t);e&&n.commit(e),this._lenses.length=0}_renderCodeLensSymbols(e){if(!this._editor.hasModel())return;const t=this._editor.getModel().getLineCount(),n=[];let i;for(const o of e.lenses){const s=o.symbol.range.startLineNumber;s<1||s>t||(i&&i[i.length-1].symbol.range.startLineNumber===s?i.push(o):(i=[o],n.push(i)))}if(!n.length&&!this._lenses.length)return;const r=td.capture(this._editor),a=this._getLayoutInfo();this._editor.changeDecorations(o=>{this._editor.changeViewZones(s=>{const l=new kH;let c=0,d=0;for(;dthis._resolveCodeLensesInViewportSoon())),c++,d++)}for(;cthis._resolveCodeLensesInViewportSoon())),d++;l.commit(o)})}),r.restore(this._editor)}_resolveCodeLensesInViewportSoon(){this._editor.getModel()&&this._resolveCodeLensesScheduler.schedule()}_resolveCodeLensesInViewport(){var e;(e=this._resolveCodeLensesPromise)===null||e===void 0||e.cancel(),this._resolveCodeLensesPromise=void 0;const t=this._editor.getModel();if(!t)return;const n=[],i=[];if(this._lenses.forEach(o=>{const s=o.computeIfNecessary(t);s&&(n.push(s),i.push(o))}),n.length===0)return;const r=Date.now(),a=Ui(o=>{const s=n.map((l,c)=>{const d=new Array(l.length),h=l.map((E,m)=>!E.symbol.command&&typeof E.provider.resolveCodeLens=="function"?Promise.resolve(E.provider.resolveCodeLens(t,E.symbol,o)).then(g=>{d[m]=g},Mi):(d[m]=E.symbol,Promise.resolve(void 0)));return Promise.all(h).then(()=>{!o.isCancellationRequested&&!i[c].isDisposed()&&i[c].updateCommands(d)})});return Promise.all(s)});this._resolveCodeLensesPromise=a,this._resolveCodeLensesPromise.then(()=>{const o=this._resolveCodeLensesDebounce.update(t,Date.now()-r);this._resolveCodeLensesScheduler.delay=o,this._currentCodeLensModel&&this._codeLensCache.put(t,this._currentCodeLensModel),this._oldCodeLensModels.clear(),a===this._resolveCodeLensesPromise&&(this._resolveCodeLensesPromise=void 0)},o=>{zt(o),a===this._resolveCodeLensesPromise&&(this._resolveCodeLensesPromise=void 0)})}getModel(){var e;return uFe(this,void 0,void 0,function*(){return yield this._getCodeLensModelPromise,yield this._resolveCodeLensesPromise,!((e=this._currentCodeLensModel)===null||e===void 0)&&e.isDisposed?void 0:this._currentCodeLensModel})}};vv.ID="css.editor.codeLens";vv=FEt([CC(1,We),CC(2,q0),CC(3,ni),CC(4,bi),CC(5,tFe)],vv);fu(vv.ID,vv,1);be(class extends $e{constructor(){super({id:"codelens.showLensesInCurrentLine",precondition:W.hasCodeLensProvider,label:v("showLensOnLine","Show CodeLens Commands For Current Line"),alias:"Show CodeLens Commands For Current Line"})}run(e,t){return uFe(this,void 0,void 0,function*(){if(!t.hasModel())return;const n=e.get(md),i=e.get(ni),r=e.get(bi),a=t.getSelection().positionLineNumber,o=t.getContribution(vv.ID);if(!o)return;const s=yield o.getModel();if(!s)return;const l=[];for(const h of s.lenses)h.symbol.command&&h.symbol.range.startLineNumber===a&&l.push({label:h.symbol.command.title,command:h.symbol.command});if(l.length===0)return;const c=yield n.pick(l,{canPickMany:!1,placeHolder:v("placeHolder","Select a command")});if(!c)return;let d=c.command;if(s.isDisposed){const h=yield o.getModel(),E=h==null?void 0:h.lenses.find(m=>{var g;return m.symbol.range.startLineNumber===a&&((g=m.symbol.command)===null||g===void 0?void 0:g.title)===d.title});if(!E||!E.symbol.command)return;d=E.symbol.command}try{yield i.executeCommand(d.id,...d.arguments||[])}catch(h){r.error(h)}})}});var yEt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},FH=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},AEt=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};class ute{constructor(e,t){this._editorWorkerClient=new lX(e,!1,"editorWorkerService",t)}provideDocumentColors(e,t){return AEt(this,void 0,void 0,function*(){return this._editorWorkerClient.computeDefaultDocumentColors(e.uri)})}provideColorPresentations(e,t,n){const i=t.range,r=t.color,a=r.alpha,o=new ae(new nu(Math.round(255*r.red),Math.round(255*r.green),Math.round(255*r.blue),a)),s=a?ae.Format.CSS.formatRGB(o):ae.Format.CSS.formatRGBA(o),l=a?ae.Format.CSS.formatHSL(o):ae.Format.CSS.formatHSLA(o),c=a?ae.Format.CSS.formatHex(o):ae.Format.CSS.formatHexA(o),d=[];return d.push({label:s,textEdit:{range:i,text:s}}),d.push({label:l,textEdit:{range:i,text:l}}),d.push({label:c,textEdit:{range:i,text:c}}),d}}let jU=class extends ne{constructor(e,t,n){super(),this._register(n.colorProvider.register("*",new ute(e,t)))}};jU=yEt([FH(0,_n),FH(1,tn),FH(2,We)],jU);KP(jU);var TA=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};function nFe(u,e,t,n=!0){return TA(this,void 0,void 0,function*(){return nte(new _Et,u,e,t,n)})}function iFe(u,e,t,n){return Promise.resolve(t.provideColorPresentations(u,e,n))}class _Et{constructor(){}compute(e,t,n,i){return TA(this,void 0,void 0,function*(){const r=yield e.provideDocumentColors(t,n);if(Array.isArray(r))for(const a of r)i.push({colorInfo:a,provider:e});return Array.isArray(r)})}}class SEt{constructor(){}compute(e,t,n,i){return TA(this,void 0,void 0,function*(){const r=yield e.provideDocumentColors(t,n);if(Array.isArray(r))for(const a of r)i.push({range:a.range,color:[a.color.red,a.color.green,a.color.blue,a.color.alpha]});return Array.isArray(r)})}}class BEt{constructor(e){this.colorInfo=e}compute(e,t,n,i){return TA(this,void 0,void 0,function*(){const r=yield e.provideColorPresentations(t,this.colorInfo,Kt.None);return Array.isArray(r)&&i.push(...r),Array.isArray(r)})}}function nte(u,e,t,n,i){return TA(this,void 0,void 0,function*(){let r=!1,a;const o=[],s=e.ordered(t);for(let l=s.length-1;l>=0;l--){const c=s[l];if(c instanceof ute)a=c;else try{(yield u.compute(c,t,n,o))&&(r=!0)}catch(d){Mi(d)}}return r?o:a&&i?(yield u.compute(a,t,n,o),o):[]})}function rFe(u,e){const{colorProvider:t}=u.get(We),n=u.get(_n).getModel(e);if(!n)throw _0();const i=u.get(tu).getValue("editor.defaultColorDecorators",{resource:e});return{model:n,colorProviderRegistry:t,isDefaultColorDecoratorsEnabled:i}}ru.registerCommand("_executeDocumentColorProvider",function(u,...e){const[t]=e;if(!(t instanceof dt))throw _0();const{model:n,colorProviderRegistry:i,isDefaultColorDecoratorsEnabled:r}=rFe(u,t);return nte(new SEt,i,n,Kt.None,r)});ru.registerCommand("_executeColorPresentationProvider",function(u,...e){const[t,n]=e,{uri:i,range:r}=n;if(!(i instanceof dt)||!Array.isArray(t)||t.length!==4||!j.isIRange(r))throw _0();const{model:a,colorProviderRegistry:o,isDefaultColorDecoratorsEnabled:s}=rFe(u,i),[l,c,d,h]=t;return nte(new BEt({range:r,color:{red:l,green:c,blue:d,alpha:h}}),o,a,Kt.None,s)});var wEt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},yH=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},kle=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})},HU;const aFe=Object.create({});let qm=HU=class extends ne{constructor(e,t,n,i){super(),this._editor=e,this._configurationService=t,this._languageFeaturesService=n,this._localToDispose=this._register(new pe),this._decorationsIds=[],this._colorDatas=new Map,this._colorDecoratorIds=this._editor.createDecorationsCollection(),this._ruleFactory=new cA(this._editor),this._decoratorLimitReporter=new LEt,this._colorDecorationClassRefs=this._register(new pe),this._debounceInformation=i.for(n.colorProvider,"Document Colors",{min:HU.RECOMPUTE_TIME}),this._register(e.onDidChangeModel(()=>{this._isColorDecoratorsEnabled=this.isEnabled(),this.updateColors()})),this._register(e.onDidChangeModelLanguage(()=>this.updateColors())),this._register(n.colorProvider.onDidChange(()=>this.updateColors())),this._register(e.onDidChangeConfiguration(r=>{const a=this._isColorDecoratorsEnabled;this._isColorDecoratorsEnabled=this.isEnabled(),this._isDefaultColorDecoratorsEnabled=this._editor.getOption(145);const o=a!==this._isColorDecoratorsEnabled||r.hasChanged(21),s=r.hasChanged(145);(o||s)&&(this._isColorDecoratorsEnabled?this.updateColors():this.removeAllDecorations())})),this._timeoutTimer=null,this._computePromise=null,this._isColorDecoratorsEnabled=this.isEnabled(),this._isDefaultColorDecoratorsEnabled=this._editor.getOption(145),this.updateColors()}isEnabled(){const e=this._editor.getModel();if(!e)return!1;const t=e.getLanguageId(),n=this._configurationService.getValue(t);if(n&&typeof n=="object"){const i=n.colorDecorators;if(i&&i.enable!==void 0&&!i.enable)return i.enable}return this._editor.getOption(20)}static get(e){return e.getContribution(this.ID)}dispose(){this.stop(),this.removeAllDecorations(),super.dispose()}updateColors(){if(this.stop(),!this._isColorDecoratorsEnabled)return;const e=this._editor.getModel();!e||!this._languageFeaturesService.colorProvider.has(e)||(this._localToDispose.add(this._editor.onDidChangeModelContent(()=>{this._timeoutTimer||(this._timeoutTimer=new Vl,this._timeoutTimer.cancelAndSet(()=>{this._timeoutTimer=null,this.beginCompute()},this._debounceInformation.get(e)))})),this.beginCompute())}beginCompute(){return kle(this,void 0,void 0,function*(){this._computePromise=Ui(e=>kle(this,void 0,void 0,function*(){const t=this._editor.getModel();if(!t)return[];const n=new va(!1),i=yield nFe(this._languageFeaturesService.colorProvider,t,e,this._isDefaultColorDecoratorsEnabled);return this._debounceInformation.update(t,n.elapsed()),i}));try{const e=yield this._computePromise;this.updateDecorations(e),this.updateColorDecorators(e),this._computePromise=null}catch(e){zt(e)}})}stop(){this._timeoutTimer&&(this._timeoutTimer.cancel(),this._timeoutTimer=null),this._computePromise&&(this._computePromise.cancel(),this._computePromise=null),this._localToDispose.clear()}updateDecorations(e){const t=e.map(n=>({range:{startLineNumber:n.colorInfo.range.startLineNumber,startColumn:n.colorInfo.range.startColumn,endLineNumber:n.colorInfo.range.endLineNumber,endColumn:n.colorInfo.range.endColumn},options:Lt.EMPTY}));this._editor.changeDecorations(n=>{this._decorationsIds=n.deltaDecorations(this._decorationsIds,t),this._colorDatas=new Map,this._decorationsIds.forEach((i,r)=>this._colorDatas.set(i,e[r]))})}updateColorDecorators(e){this._colorDecorationClassRefs.clear();const t=[],n=this._editor.getOption(21);for(let r=0;rthis._colorDatas.has(i.id));return n.length===0?null:this._colorDatas.get(n[0].id)}isColorDecoration(e){return this._colorDecoratorIds.has(e)}};qm.ID="editor.contrib.colorDetector";qm.RECOMPUTE_TIME=1e3;qm=HU=wEt([yH(1,tu),yH(2,We),yH(3,q0)],qm);class LEt{constructor(){this._onDidChange=new Q,this._computed=0,this._limited=!1}update(e,t){(e!==this._computed||t!==this._limited)&&(this._computed=e,this._limited=t,this._onDidChange.fire())}}fu(qm.ID,qm,1);class zEt{get color(){return this._color}set color(e){this._color.equals(e)||(this._color=e,this._onDidChangeColor.fire(e))}get presentation(){return this.colorPresentations[this.presentationIndex]}get colorPresentations(){return this._colorPresentations}set colorPresentations(e){this._colorPresentations=e,this.presentationIndex>e.length-1&&(this.presentationIndex=0),this._onDidChangePresentation.fire(this.presentation)}constructor(e,t,n){this.presentationIndex=n,this._onColorFlushed=new Q,this.onColorFlushed=this._onColorFlushed.event,this._onDidChangeColor=new Q,this.onDidChangeColor=this._onDidChangeColor.event,this._onDidChangePresentation=new Q,this.onDidChangePresentation=this._onDidChangePresentation.event,this.originalColor=e,this._color=e,this._colorPresentations=t}selectNextColorPresentation(){this.presentationIndex=(this.presentationIndex+1)%this.colorPresentations.length,this.flushColor(),this._onDidChangePresentation.fire(this.presentation)}guessColorPresentation(e,t){let n=-1;for(let i=0;i{this.backgroundColor=a.getColor(TB)||ae.white})),this._register(ce(this._pickedColorNode,Me.CLICK,()=>this.model.selectNextColorPresentation())),this._register(ce(this._originalColorNode,Me.CLICK,()=>{this.model.color=this.model.originalColor,this.model.flushColor()})),this._register(t.onDidChangeColor(this.onDidChangeColor,this)),this._register(t.onDidChangePresentation(this.onDidChangePresentation,this)),this._pickedColorNode.style.backgroundColor=ae.Format.CSS.format(t.color)||"",this._pickedColorNode.classList.toggle("light",t.color.rgba.a<.5?this.backgroundColor.isLighter():t.color.isLighter()),this.onDidChangeColor(this.model.color),this.showingStandaloneColorPicker&&(this._domNode.classList.add("standalone-colorpicker"),this._closeButton=this._register(new TEt(this._domNode)))}get closeButton(){return this._closeButton}get pickedColorNode(){return this._pickedColorNode}get originalColorNode(){return this._originalColorNode}onDidChangeColor(e){this._pickedColorNode.style.backgroundColor=ae.Format.CSS.format(e)||"",this._pickedColorNode.classList.toggle("light",e.rgba.a<.5?this.backgroundColor.isLighter():e.isLighter()),this.onDidChangePresentation()}onDidChangePresentation(){this._pickedColorPresentation.textContent=this.model.presentation?this.model.presentation.label:""}}let TEt=class extends ne{constructor(e){super(),this._onClicked=this._register(new Q),this.onClicked=this._onClicked.event,this._button=document.createElement("div"),this._button.classList.add("close-button"),me(e,this._button);const t=document.createElement("div");t.classList.add("close-button-inner-div"),me(this._button,t),me(t,Rs(".button"+st.asCSSSelector(hi("color-picker-close",we.close,v("closeIcon","Icon to close the color picker"))))).classList.add("close-icon"),this._button.onclick=()=>{this._onClicked.fire()}}};class NEt extends ne{constructor(e,t,n,i=!1){super(),this.model=t,this.pixelRatio=n,this._insertButton=null,this._domNode=Rs(".colorpicker-body"),me(e,this._domNode),this._saturationBox=new PEt(this._domNode,this.model,this.pixelRatio),this._register(this._saturationBox),this._register(this._saturationBox.onDidChange(this.onDidSaturationValueChange,this)),this._register(this._saturationBox.onColorFlushed(this.flushColor,this)),this._opacityStrip=new REt(this._domNode,this.model,i),this._register(this._opacityStrip),this._register(this._opacityStrip.onDidChange(this.onDidOpacityChange,this)),this._register(this._opacityStrip.onColorFlushed(this.flushColor,this)),this._hueStrip=new IEt(this._domNode,this.model,i),this._register(this._hueStrip),this._register(this._hueStrip.onDidChange(this.onDidHueChange,this)),this._register(this._hueStrip.onColorFlushed(this.flushColor,this)),i&&(this._insertButton=this._register(new OEt(this._domNode)),this._domNode.classList.add("standalone-colorpicker"))}flushColor(){this.model.flushColor()}onDidSaturationValueChange({s:e,v:t}){const n=this.model.color.hsva;this.model.color=new ae(new e1(n.h,e,t,n.a))}onDidOpacityChange(e){const t=this.model.color.hsva;this.model.color=new ae(new e1(t.h,t.s,t.v,e))}onDidHueChange(e){const t=this.model.color.hsva,n=(1-e)*360;this.model.color=new ae(new e1(n===360?0:n,t.s,t.v,t.a))}get domNode(){return this._domNode}get saturationBox(){return this._saturationBox}get enterButton(){return this._insertButton}layout(){this._saturationBox.layout(),this._opacityStrip.layout(),this._hueStrip.layout()}}class PEt extends ne{constructor(e,t,n){super(),this.model=t,this.pixelRatio=n,this._onDidChange=new Q,this.onDidChange=this._onDidChange.event,this._onColorFlushed=new Q,this.onColorFlushed=this._onColorFlushed.event,this._domNode=Rs(".saturation-wrap"),me(e,this._domNode),this._canvas=document.createElement("canvas"),this._canvas.className="saturation-box",me(this._domNode,this._canvas),this.selection=Rs(".saturation-selection"),me(this._domNode,this.selection),this.layout(),this._register(ce(this._domNode,Me.POINTER_DOWN,i=>this.onPointerDown(i))),this._register(this.model.onDidChangeColor(this.onDidChangeColor,this)),this.monitor=null}get domNode(){return this._domNode}onPointerDown(e){if(!e.target||!(e.target instanceof Element))return;this.monitor=this._register(new m6);const t=ji(this._domNode);e.target!==this.selection&&this.onDidChangePosition(e.offsetX,e.offsetY),this.monitor.startMonitoring(e.target,e.pointerId,e.buttons,i=>this.onDidChangePosition(i.pageX-t.left,i.pageY-t.top),()=>null);const n=ce(e.target.ownerDocument,Me.POINTER_UP,()=>{this._onColorFlushed.fire(),n.dispose(),this.monitor&&(this.monitor.stopMonitoring(!0),this.monitor=null)},!0)}onDidChangePosition(e,t){const n=Math.max(0,Math.min(1,e/this.width)),i=Math.max(0,Math.min(1,1-t/this.height));this.paintSelection(n,i),this._onDidChange.fire({s:n,v:i})}layout(){this.width=this._domNode.offsetWidth,this.height=this._domNode.offsetHeight,this._canvas.width=this.width*this.pixelRatio,this._canvas.height=this.height*this.pixelRatio,this.paint();const e=this.model.color.hsva;this.paintSelection(e.s,e.v)}paint(){const e=this.model.color.hsva,t=new ae(new e1(e.h,1,1,1)),n=this._canvas.getContext("2d"),i=n.createLinearGradient(0,0,this._canvas.width,0);i.addColorStop(0,"rgba(255, 255, 255, 1)"),i.addColorStop(.5,"rgba(255, 255, 255, 0.5)"),i.addColorStop(1,"rgba(255, 255, 255, 0)");const r=n.createLinearGradient(0,0,0,this._canvas.height);r.addColorStop(0,"rgba(0, 0, 0, 0)"),r.addColorStop(1,"rgba(0, 0, 0, 1)"),n.rect(0,0,this._canvas.width,this._canvas.height),n.fillStyle=ae.Format.CSS.format(t),n.fill(),n.fillStyle=i,n.fill(),n.fillStyle=r,n.fill()}paintSelection(e,t){this.selection.style.left=`${e*this.width}px`,this.selection.style.top=`${this.height-t*this.height}px`}onDidChangeColor(e){if(this.monitor&&this.monitor.isMonitoring())return;this.paint();const t=e.hsva;this.paintSelection(t.s,t.v)}}class oFe extends ne{constructor(e,t,n=!1){super(),this.model=t,this._onDidChange=new Q,this.onDidChange=this._onDidChange.event,this._onColorFlushed=new Q,this.onColorFlushed=this._onColorFlushed.event,n?(this.domNode=me(e,Rs(".standalone-strip")),this.overlay=me(this.domNode,Rs(".standalone-overlay"))):(this.domNode=me(e,Rs(".strip")),this.overlay=me(this.domNode,Rs(".overlay"))),this.slider=me(this.domNode,Rs(".slider")),this.slider.style.top="0px",this._register(ce(this.domNode,Me.POINTER_DOWN,i=>this.onPointerDown(i))),this._register(t.onDidChangeColor(this.onDidChangeColor,this)),this.layout()}layout(){this.height=this.domNode.offsetHeight-this.slider.offsetHeight;const e=this.getValue(this.model.color);this.updateSliderPosition(e)}onDidChangeColor(e){const t=this.getValue(e);this.updateSliderPosition(t)}onPointerDown(e){if(!e.target||!(e.target instanceof Element))return;const t=this._register(new m6),n=ji(this.domNode);this.domNode.classList.add("grabbing"),e.target!==this.slider&&this.onDidChangeTop(e.offsetY),t.startMonitoring(e.target,e.pointerId,e.buttons,r=>this.onDidChangeTop(r.pageY-n.top),()=>null);const i=ce(e.target.ownerDocument,Me.POINTER_UP,()=>{this._onColorFlushed.fire(),i.dispose(),t.stopMonitoring(!0),this.domNode.classList.remove("grabbing")},!0)}onDidChangeTop(e){const t=Math.max(0,Math.min(1,1-e/this.height));this.updateSliderPosition(t),this._onDidChange.fire(t)}updateSliderPosition(e){this.slider.style.top=`${(1-e)*this.height}px`}}class REt extends oFe{constructor(e,t,n=!1){super(e,t,n),this.domNode.classList.add("opacity-strip"),this.onDidChangeColor(this.model.color)}onDidChangeColor(e){super.onDidChangeColor(e);const{r:t,g:n,b:i}=e.rgba,r=new ae(new nu(t,n,i,1)),a=new ae(new nu(t,n,i,0));this.overlay.style.background=`linear-gradient(to bottom, ${r} 0%, ${a} 100%)`}getValue(e){return e.hsva.a}}class IEt extends oFe{constructor(e,t,n=!1){super(e,t,n),this.domNode.classList.add("hue-strip")}getValue(e){return 1-e.hsva.h/360}}class OEt extends ne{constructor(e){super(),this._onClicked=this._register(new Q),this.onClicked=this._onClicked.event,this._button=me(e,document.createElement("button")),this._button.classList.add("insert-button"),this._button.textContent="Insert",this._button.onclick=t=>{this._onClicked.fire()}}get button(){return this._button}}class jEt extends $l{constructor(e,t,n,i,r=!1){super(),this.model=t,this.pixelRatio=n,this._register(sk.onDidChange(()=>this.layout()));const a=Rs(".colorpicker-widget");e.appendChild(a),this.header=this._register(new MEt(a,this.model,i,r)),this.body=this._register(new NEt(a,this.model,this.pixelRatio,r))}layout(){this.body.layout()}}var sFe=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},lFe=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},Cv=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};class HEt{constructor(e,t,n,i){this.owner=e,this.range=t,this.model=n,this.provider=i,this.forceShowAtRange=!0}isValidForHoverAnchor(e){return e.type===1&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}}let Iw=class{constructor(e,t){this._editor=e,this._themeService=t,this.hoverOrdinal=2}computeSync(e,t){return[]}computeAsync(e,t,n){return _i.fromPromise(this._computeAsync(e,t,n))}_computeAsync(e,t,n){return Cv(this,void 0,void 0,function*(){if(!this._editor.hasModel())return[];const i=qm.get(this._editor);if(!i)return[];for(const r of t){if(!i.isColorDecoration(r))continue;const a=i.getColorData(r.range.getStartPosition());if(a)return[yield cFe(this,this._editor.getModel(),a.colorInfo,a.provider)]}return[]})}renderHoverParts(e,t){return dFe(this,this._editor,this._themeService,t,e)}};Iw=sFe([lFe(1,sr)],Iw);class VEt{constructor(e,t,n,i){this.owner=e,this.range=t,this.model=n,this.provider=i}}let aF=class{constructor(e,t){this._editor=e,this._themeService=t,this._color=null}createColorHover(e,t,n){return Cv(this,void 0,void 0,function*(){if(!this._editor.hasModel()||!qm.get(this._editor))return null;const r=yield nFe(n,this._editor.getModel(),Kt.None);let a=null,o=null;for(const d of r){const h=d.colorInfo;j.containsRange(h.range,e.range)&&(a=h,o=d.provider)}const s=a??e,l=o??t,c=!!a;return{colorHover:yield cFe(this,this._editor.getModel(),s,l),foundInEditor:c}})}updateEditorModel(e){return Cv(this,void 0,void 0,function*(){if(!this._editor.hasModel())return;const t=e.model;let n=new j(e.range.startLineNumber,e.range.startColumn,e.range.endLineNumber,e.range.endColumn);this._color&&(yield E8(this._editor.getModel(),t,this._color,n,e),n=hFe(this._editor,n,t))})}renderHoverParts(e,t){return dFe(this,this._editor,this._themeService,t,e)}set color(e){this._color=e}get color(){return this._color}};aF=sFe([lFe(1,sr)],aF);function cFe(u,e,t,n){return Cv(this,void 0,void 0,function*(){const i=e.getValueInRange(t.range),{red:r,green:a,blue:o,alpha:s}=t.color,l=new nu(Math.round(r*255),Math.round(a*255),Math.round(o*255),s),c=new ae(l),d=yield iFe(e,t,n,Kt.None),h=new zEt(c,[],0);return h.colorPresentations=d||[],h.guessColorPresentation(c,i),u instanceof Iw?new HEt(u,j.lift(t.range),h,n):new VEt(u,j.lift(t.range),h,n)})}function dFe(u,e,t,n,i){if(n.length===0||!e.hasModel())return ne.None;if(i.setMinimumDimensions){const h=e.getOption(66)+8;i.setMinimumDimensions(new pu(302,h))}const r=new pe,a=n[0],o=e.getModel(),s=a.model,l=r.add(new jEt(i.fragment,s,e.getOption(141),t,u instanceof aF));i.setColorPicker(l);let c=!1,d=new j(a.range.startLineNumber,a.range.startColumn,a.range.endLineNumber,a.range.endColumn);if(u instanceof aF){const h=n[0].model.color;u.color=h,E8(o,s,h,d,a),r.add(s.onColorFlushed(E=>{u.color=E}))}else r.add(s.onColorFlushed(h=>Cv(this,void 0,void 0,function*(){yield E8(o,s,h,d,a),c=!0,d=hFe(e,d,s,i)})));return r.add(s.onDidChangeColor(h=>{E8(o,s,h,d,a)})),r.add(e.onDidChangeModelContent(h=>{c?c=!1:(i.hide(),e.focus())})),r}function hFe(u,e,t,n){let i,r;if(t.presentation.textEdit){i=[t.presentation.textEdit],r=new j(t.presentation.textEdit.range.startLineNumber,t.presentation.textEdit.range.startColumn,t.presentation.textEdit.range.endLineNumber,t.presentation.textEdit.range.endColumn);const a=u.getModel()._setTrackedRange(null,r,3);u.pushUndoStop(),u.executeEdits("colorpicker",i),r=u.getModel()._getTrackedRange(a)||r}else i=[{range:e,text:t.presentation.label,forceMoveMarkers:!1}],r=e.setEndPosition(e.endLineNumber,e.startColumn+t.presentation.label.length),u.pushUndoStop(),u.executeEdits("colorpicker",i);return t.presentation.additionalTextEdits&&(i=[...t.presentation.additionalTextEdits],u.executeEdits("colorpicker",i),n&&n.hide()),u.pushUndoStop(),r}function E8(u,e,t,n,i){return Cv(this,void 0,void 0,function*(){const r=yield iFe(u,{range:n,color:{red:t.rgba.r/255,green:t.rgba.g/255,blue:t.rgba.b/255,alpha:t.rgba.a}},i.provider,Kt.None);e.colorPresentations=r||[]})}function VU(u,e){return!!u[e]}class AH{constructor(e,t){this.target=e.target,this.isLeftClick=e.event.leftButton,this.isMiddleClick=e.event.middleButton,this.isRightClick=e.event.rightButton,this.hasTriggerModifier=VU(e.event,t.triggerModifier),this.hasSideBySideModifier=VU(e.event,t.triggerSideBySideModifier),this.isNoneOrSingleMouseDown=e.event.detail<=1}}class Fle{constructor(e,t){this.keyCodeIsTriggerKey=e.keyCode===t.triggerKey,this.keyCodeIsSideBySideKey=e.keyCode===t.triggerSideBySideKey,this.hasTriggerModifier=VU(e,t.triggerModifier)}}class M9{constructor(e,t,n,i){this.triggerKey=e,this.triggerModifier=t,this.triggerSideBySideKey=n,this.triggerSideBySideModifier=i}equals(e){return this.triggerKey===e.triggerKey&&this.triggerModifier===e.triggerModifier&&this.triggerSideBySideKey===e.triggerSideBySideKey&&this.triggerSideBySideModifier===e.triggerSideBySideModifier}}function yle(u){return u==="altKey"?iu?new M9(57,"metaKey",6,"altKey"):new M9(5,"ctrlKey",6,"altKey"):iu?new M9(6,"altKey",57,"metaKey"):new M9(6,"altKey",5,"ctrlKey")}class rR extends ne{constructor(e,t){var n;super(),this._onMouseMoveOrRelevantKeyDown=this._register(new Q),this.onMouseMoveOrRelevantKeyDown=this._onMouseMoveOrRelevantKeyDown.event,this._onExecute=this._register(new Q),this.onExecute=this._onExecute.event,this._onCancel=this._register(new Q),this.onCancel=this._onCancel.event,this._editor=e,this._extractLineNumberFromMouseEvent=(n=t==null?void 0:t.extractLineNumberFromMouseEvent)!==null&&n!==void 0?n:i=>i.target.position?i.target.position.lineNumber:0,this._opts=yle(this._editor.getOption(77)),this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._lineNumberOnMouseDown=0,this._register(this._editor.onDidChangeConfiguration(i=>{if(i.hasChanged(77)){const r=yle(this._editor.getOption(77));if(this._opts.equals(r))return;this._opts=r,this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._lineNumberOnMouseDown=0,this._onCancel.fire()}})),this._register(this._editor.onMouseMove(i=>this._onEditorMouseMove(new AH(i,this._opts)))),this._register(this._editor.onMouseDown(i=>this._onEditorMouseDown(new AH(i,this._opts)))),this._register(this._editor.onMouseUp(i=>this._onEditorMouseUp(new AH(i,this._opts)))),this._register(this._editor.onKeyDown(i=>this._onEditorKeyDown(new Fle(i,this._opts)))),this._register(this._editor.onKeyUp(i=>this._onEditorKeyUp(new Fle(i,this._opts)))),this._register(this._editor.onMouseDrag(()=>this._resetHandler())),this._register(this._editor.onDidChangeCursorSelection(i=>this._onDidChangeCursorSelection(i))),this._register(this._editor.onDidChangeModel(i=>this._resetHandler())),this._register(this._editor.onDidChangeModelContent(()=>this._resetHandler())),this._register(this._editor.onDidScrollChange(i=>{(i.scrollTopChanged||i.scrollLeftChanged)&&this._resetHandler()}))}_onDidChangeCursorSelection(e){e.selection&&e.selection.startColumn!==e.selection.endColumn&&this._resetHandler()}_onEditorMouseMove(e){this._lastMouseMoveEvent=e,this._onMouseMoveOrRelevantKeyDown.fire([e,null])}_onEditorMouseDown(e){this._hasTriggerKeyOnMouseDown=e.hasTriggerModifier,this._lineNumberOnMouseDown=this._extractLineNumberFromMouseEvent(e)}_onEditorMouseUp(e){const t=this._extractLineNumberFromMouseEvent(e);this._hasTriggerKeyOnMouseDown&&this._lineNumberOnMouseDown&&this._lineNumberOnMouseDown===t&&this._onExecute.fire(e)}_onEditorKeyDown(e){this._lastMouseMoveEvent&&(e.keyCodeIsTriggerKey||e.keyCodeIsSideBySideKey&&e.hasTriggerModifier)?this._onMouseMoveOrRelevantKeyDown.fire([this._lastMouseMoveEvent,e]):e.hasTriggerModifier&&this._onCancel.fire()}_onEditorKeyUp(e){e.keyCodeIsTriggerKey&&this._onCancel.fire()}_resetHandler(){this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._onCancel.fire()}}var $Et=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},oh=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}};let Jm=class extends lv{constructor(e,t,n,i,r,a,o,s,l,c,d,h,E){super(e,Object.assign(Object.assign({},i.getRawOptions()),{overflowWidgetsDomNode:i.getOverflowWidgetsDomNode()}),n,r,a,o,s,l,c,d,h,E),this._parentEditor=i,this._overwriteOptions=t,super.updateOptions(this._overwriteOptions),this._register(i.onDidChangeConfiguration(m=>this._onParentConfigurationChanged(m)))}getParentEditor(){return this._parentEditor}_onParentConfigurationChanged(e){super.updateOptions(this._parentEditor.getRawOptions()),super.updateOptions(this._overwriteOptions)}updateOptions(e){NN(this._overwriteOptions,e,!0),super.updateOptions(this._overwriteOptions)}};Jm=$Et([oh(4,mt),oh(5,Cu),oh(6,ni),oh(7,pt),oh(8,sr),oh(9,bi),oh(10,k4),oh(11,tn),oh(12,We)],Jm);const Ale=new ae(new nu(0,122,204)),KEt={showArrow:!0,showFrame:!0,className:"",frameColor:Ale,arrowColor:Ale,keepEditorSelection:!1},WEt="vs.editor.contrib.zoneWidget";class GEt{constructor(e,t,n,i,r,a,o,s){this.id="",this.domNode=e,this.afterLineNumber=t,this.afterColumn=n,this.heightInLines=i,this.showInHiddenAreas=o,this.ordinal=s,this._onDomNodeTop=r,this._onComputedHeight=a}onDomNodeTop(e){this._onDomNodeTop(e)}onComputedHeight(e){this._onComputedHeight(e)}}class UEt{constructor(e,t){this._id=e,this._domNode=t}getId(){return this._id}getDomNode(){return this._domNode}getPosition(){return null}}class aR{constructor(e){this._editor=e,this._ruleName=aR._IdGenerator.nextId(),this._decorations=this._editor.createDecorationsCollection(),this._color=null,this._height=-1}dispose(){this.hide(),Dae(this._ruleName)}set color(e){this._color!==e&&(this._color=e,this._updateStyle())}set height(e){this._height!==e&&(this._height=e,this._updateStyle())}_updateStyle(){Dae(this._ruleName),EW(`.monaco-editor ${this._ruleName}`,`border-style: solid; border-color: transparent; border-bottom-color: ${this._color}; border-width: ${this._height}px; bottom: -${this._height}px; margin-left: -${this._height}px; `)}show(e){e.column===1&&(e={lineNumber:e.lineNumber,column:2}),this._decorations.set([{range:j.fromPositions(e),options:{description:"zone-widget-arrow",className:this._ruleName,stickiness:1}}])}hide(){this._decorations.clear()}}aR._IdGenerator=new lee(".arrow-decoration-");class qEt{constructor(e,t={}){this._arrow=null,this._overlayWidget=null,this._resizeSash=null,this._viewZone=null,this._disposables=new pe,this.container=null,this._isShowing=!1,this.editor=e,this._positionMarkerId=this.editor.createDecorationsCollection(),this.options=xh(t),NN(this.options,KEt,!1),this.domNode=document.createElement("div"),this.options.isAccessible||(this.domNode.setAttribute("aria-hidden","true"),this.domNode.setAttribute("role","presentation")),this._disposables.add(this.editor.onDidLayoutChange(n=>{const i=this._getWidth(n);this.domNode.style.width=i+"px",this.domNode.style.left=this._getLeft(n)+"px",this._onWidth(i)}))}dispose(){this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),this._viewZone&&this.editor.changeViewZones(e=>{this._viewZone&&e.removeZone(this._viewZone.id),this._viewZone=null}),this._positionMarkerId.clear(),this._disposables.dispose()}create(){this.domNode.classList.add("zone-widget"),this.options.className&&this.domNode.classList.add(this.options.className),this.container=document.createElement("div"),this.container.classList.add("zone-widget-container"),this.domNode.appendChild(this.container),this.options.showArrow&&(this._arrow=new aR(this.editor),this._disposables.add(this._arrow)),this._fillContainer(this.container),this._initSash(),this._applyStyles()}style(e){e.frameColor&&(this.options.frameColor=e.frameColor),e.arrowColor&&(this.options.arrowColor=e.arrowColor),this._applyStyles()}_applyStyles(){if(this.container&&this.options.frameColor){const e=this.options.frameColor.toString();this.container.style.borderTopColor=e,this.container.style.borderBottomColor=e}if(this._arrow&&this.options.arrowColor){const e=this.options.arrowColor.toString();this._arrow.color=e}}_getWidth(e){return e.width-e.minimap.minimapWidth-e.verticalScrollbarWidth}_getLeft(e){return e.minimap.minimapWidth>0&&e.minimap.minimapLeft===0?e.minimap.minimapWidth:0}_onViewZoneTop(e){this.domNode.style.top=e+"px"}_onViewZoneHeight(e){var t;if(this.domNode.style.height=`${e}px`,this.container){const n=e-this._decoratingElementsHeight();this.container.style.height=`${n}px`;const i=this.editor.getLayoutInfo();this._doLayout(n,this._getWidth(i))}(t=this._resizeSash)===null||t===void 0||t.layout()}get position(){const e=this._positionMarkerId.getRange(0);if(e)return e.getStartPosition()}show(e,t){const n=j.isIRange(e)?j.lift(e):j.fromPositions(e);this._isShowing=!0,this._showImpl(n,t),this._isShowing=!1,this._positionMarkerId.set([{range:n,options:Lt.EMPTY}])}hide(){var e;this._viewZone&&(this.editor.changeViewZones(t=>{this._viewZone&&t.removeZone(this._viewZone.id)}),this._viewZone=null),this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),(e=this._arrow)===null||e===void 0||e.hide(),this._positionMarkerId.clear()}_decoratingElementsHeight(){const e=this.editor.getOption(66);let t=0;if(this.options.showArrow){const n=Math.round(e/3);t+=2*n}if(this.options.showFrame){const n=Math.round(e/9);t+=2*n}return t}_showImpl(e,t){const n=e.getStartPosition(),i=this.editor.getLayoutInfo(),r=this._getWidth(i);this.domNode.style.width=`${r}px`,this.domNode.style.left=this._getLeft(i)+"px";const a=document.createElement("div");a.style.overflow="hidden";const o=this.editor.getOption(66);if(!this.options.allowUnlimitedHeight){const h=Math.max(12,this.editor.getLayoutInfo().height/o*.8);t=Math.min(t,h)}let s=0,l=0;if(this._arrow&&this.options.showArrow&&(s=Math.round(o/3),this._arrow.height=s,this._arrow.show(n)),this.options.showFrame&&(l=Math.round(o/9)),this.editor.changeViewZones(h=>{this._viewZone&&h.removeZone(this._viewZone.id),this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),this.domNode.style.top="-1000px",this._viewZone=new GEt(a,n.lineNumber,n.column,t,E=>this._onViewZoneTop(E),E=>this._onViewZoneHeight(E),this.options.showInHiddenAreas,this.options.ordinal),this._viewZone.id=h.addZone(this._viewZone),this._overlayWidget=new UEt(WEt+this._viewZone.id,this.domNode),this.editor.addOverlayWidget(this._overlayWidget)}),this.container&&this.options.showFrame){const h=this.options.frameWidth?this.options.frameWidth:l;this.container.style.borderTopWidth=h+"px",this.container.style.borderBottomWidth=h+"px"}const c=t*o-this._decoratingElementsHeight();this.container&&(this.container.style.top=s+"px",this.container.style.height=c+"px",this.container.style.overflow="hidden"),this._doLayout(c,r),this.options.keepEditorSelection||this.editor.setSelection(e);const d=this.editor.getModel();if(d){const h=d.validateRange(new j(e.startLineNumber,1,e.endLineNumber+1,1));this.revealRange(h,h.startLineNumber===d.getLineCount())}}revealRange(e,t){t?this.editor.revealLineNearTop(e.endLineNumber,0):this.editor.revealRange(e,0)}setCssClass(e,t){this.container&&(t&&this.container.classList.remove(t),this.container.classList.add(e))}_onWidth(e){}_doLayout(e,t){}_relayout(e){this._viewZone&&this._viewZone.heightInLines!==e&&this.editor.changeViewZones(t=>{this._viewZone&&(this._viewZone.heightInLines=e,t.layoutZone(this._viewZone.id))})}_initSash(){if(this._resizeSash)return;this._resizeSash=this._disposables.add(new oa(this.domNode,this,{orientation:1})),this.options.isResizeable||(this._resizeSash.state=0);let e;this._disposables.add(this._resizeSash.onDidStart(t=>{this._viewZone&&(e={startY:t.startY,heightInLines:this._viewZone.heightInLines})})),this._disposables.add(this._resizeSash.onDidEnd(()=>{e=void 0})),this._disposables.add(this._resizeSash.onDidChange(t=>{if(e){const n=(t.currentY-e.startY)/this.editor.getOption(66),i=n<0?Math.ceil(n):Math.floor(n),r=e.heightInLines+i;r>5&&r<35&&this._relayout(r)}}))}getHorizontalSashLeft(){return 0}getHorizontalSashTop(){return(this.domNode.style.height===null?0:parseInt(this.domNode.style.height))-this._decoratingElementsHeight()/2}getHorizontalSashWidth(){const e=this.editor.getLayoutInfo();return e.width-e.minimap.minimapWidth}}var EFe=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},mFe=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}};const gFe=Ut("IPeekViewService");au(gFe,class{constructor(){this._widgets=new Map}addExclusiveWidget(u,e){const t=this._widgets.get(u);t&&(t.listener.dispose(),t.widget.dispose());const n=()=>{const i=this._widgets.get(u);i&&i.widget===e&&(i.listener.dispose(),this._widgets.delete(u))};this._widgets.set(u,{widget:e,listener:e.onDidClose(n)})}},1);var Ro;(function(u){u.inPeekEditor=new Pe("inReferenceSearchEditor",!0,v("inReferenceSearchEditor","Whether the current code editor is embedded inside peek")),u.notInPeekEditor=u.inPeekEditor.toNegated()})(Ro||(Ro={}));let oF=class{constructor(e,t){e instanceof Jm&&Ro.inPeekEditor.bindTo(t)}dispose(){}};oF.ID="editor.contrib.referenceController";oF=EFe([mFe(1,pt)],oF);fu(oF.ID,oF,0);function JEt(u){const e=u.get(Cu).getFocusedCodeEditor();return e instanceof Jm?e.getParentEditor():e}const ZEt={headerBackgroundColor:ae.white,primaryHeadingColor:ae.fromHex("#333333"),secondaryHeadingColor:ae.fromHex("#6c6c6cb3")};let Ow=class extends qEt{constructor(e,t,n){super(e,t),this.instantiationService=n,this._onDidClose=new Q,this.onDidClose=this._onDidClose.event,NN(this.options,ZEt,!1)}dispose(){this.disposed||(this.disposed=!0,super.dispose(),this._onDidClose.fire(this))}style(e){const t=this.options;e.headerBackgroundColor&&(t.headerBackgroundColor=e.headerBackgroundColor),e.primaryHeadingColor&&(t.primaryHeadingColor=e.primaryHeadingColor),e.secondaryHeadingColor&&(t.secondaryHeadingColor=e.secondaryHeadingColor),super.style(e)}_applyStyles(){super._applyStyles();const e=this.options;this._headElement&&e.headerBackgroundColor&&(this._headElement.style.backgroundColor=e.headerBackgroundColor.toString()),this._primaryHeading&&e.primaryHeadingColor&&(this._primaryHeading.style.color=e.primaryHeadingColor.toString()),this._secondaryHeading&&e.secondaryHeadingColor&&(this._secondaryHeading.style.color=e.secondaryHeadingColor.toString()),this._bodyElement&&e.frameColor&&(this._bodyElement.style.borderColor=e.frameColor.toString())}_fillContainer(e){this.setCssClass("peekview-widget"),this._headElement=ve(".head"),this._bodyElement=ve(".body"),this._fillHead(this._headElement),this._fillBody(this._bodyElement),e.appendChild(this._headElement),e.appendChild(this._bodyElement)}_fillHead(e,t){this._titleElement=ve(".peekview-title"),this.options.supportOnTitleClick&&(this._titleElement.classList.add("clickable"),xi(this._titleElement,"click",r=>this._onTitleClick(r))),me(this._headElement,this._titleElement),this._fillTitleIcon(this._titleElement),this._primaryHeading=ve("span.filename"),this._secondaryHeading=ve("span.dirname"),this._metaHeading=ve("span.meta"),me(this._titleElement,this._primaryHeading,this._secondaryHeading,this._metaHeading);const n=ve(".peekview-actions");me(this._headElement,n);const i=this._getActionBarOptions();this._actionbarWidget=new j0(n,i),this._disposables.add(this._actionbarWidget),t||this._actionbarWidget.push(new ro("peekview.close",v("label.close","Close"),st.asClassName(we.close),!0,()=>(this.dispose(),Promise.resolve())),{label:!1,icon:!0})}_fillTitleIcon(e){}_getActionBarOptions(){return{actionViewItemProvider:l0t.bind(void 0,this.instantiationService),orientation:0}}_onTitleClick(e){}setTitle(e,t){this._primaryHeading&&this._secondaryHeading&&(this._primaryHeading.innerText=e,this._primaryHeading.setAttribute("title",e),t?this._secondaryHeading.innerText=t:Nr(this._secondaryHeading))}setMetaTitle(e){this._metaHeading&&(e?(this._metaHeading.innerText=e,ns(this._metaHeading)):Ya(this._metaHeading))}_doLayout(e,t){if(!this._isShowing&&e<0){this.dispose();return}const n=Math.ceil(this.editor.getOption(66)*1.2),i=Math.round(e-(n+2));this._doLayoutHead(n,t),this._doLayoutBody(i,t)}_doLayoutHead(e,t){this._headElement&&(this._headElement.style.height=`${e}px`,this._headElement.style.lineHeight=this._headElement.style.height)}_doLayoutBody(e,t){this._bodyElement&&(this._bodyElement.style.height=`${e}px`)}};Ow=EFe([mFe(2,mt)],Ow);const YEt=q("peekViewTitle.background",{dark:"#252526",light:"#F3F3F3",hcDark:ae.black,hcLight:ae.white},v("peekViewTitleBackground","Background color of the peek view title area.")),fFe=q("peekViewTitleLabel.foreground",{dark:ae.white,light:ae.black,hcDark:ae.white,hcLight:ml},v("peekViewTitleForeground","Color of the peek view title.")),pFe=q("peekViewTitleDescription.foreground",{dark:"#ccccccb3",light:"#616161",hcDark:"#FFFFFF99",hcLight:"#292929"},v("peekViewTitleInfoForeground","Color of the peek view title info.")),QEt=q("peekView.border",{dark:Mo,light:Mo,hcDark:eu,hcLight:eu},v("peekViewBorder","Color of the peek view borders and arrow.")),XEt=q("peekViewResult.background",{dark:"#252526",light:"#F3F3F3",hcDark:ae.black,hcLight:ae.white},v("peekViewResultsBackground","Background color of the peek view result list."));q("peekViewResult.lineForeground",{dark:"#bbbbbb",light:"#646465",hcDark:ae.white,hcLight:ml},v("peekViewResultsMatchForeground","Foreground color for line nodes in the peek view result list."));q("peekViewResult.fileForeground",{dark:ae.white,light:"#1E1E1E",hcDark:ae.white,hcLight:ml},v("peekViewResultsFileForeground","Foreground color for file nodes in the peek view result list."));q("peekViewResult.selectionBackground",{dark:"#3399ff33",light:"#3399ff33",hcDark:null,hcLight:null},v("peekViewResultsSelectionBackground","Background color of the selected entry in the peek view result list."));q("peekViewResult.selectionForeground",{dark:ae.white,light:"#6C6C6C",hcDark:ae.white,hcLight:ml},v("peekViewResultsSelectionForeground","Foreground color of the selected entry in the peek view result list."));const RE=q("peekViewEditor.background",{dark:"#001F33",light:"#F2F8FC",hcDark:ae.black,hcLight:ae.white},v("peekViewEditorBackground","Background color of the peek view editor."));q("peekViewEditorGutter.background",{dark:RE,light:RE,hcDark:RE,hcLight:RE},v("peekViewEditorGutterBackground","Background color of the gutter in the peek view editor."));q("peekViewEditorStickyScroll.background",{dark:RE,light:RE,hcDark:RE,hcLight:RE},v("peekViewEditorStickScrollBackground","Background color of sticky scroll in the peek view editor."));q("peekViewResult.matchHighlightBackground",{dark:"#ea5c004d",light:"#ea5c004d",hcDark:null,hcLight:null},v("peekViewResultsMatchHighlight","Match highlight color in the peek view result list."));q("peekViewEditor.matchHighlightBackground",{dark:"#ff8f0099",light:"#f5d802de",hcDark:null,hcLight:null},v("peekViewEditorMatchHighlight","Match highlight color in the peek view editor."));q("peekViewEditor.matchHighlightBorder",{dark:null,light:null,hcDark:En,hcLight:En},v("peekViewEditorMatchHighlightBorder","Match highlight border in the peek view editor."));var emt=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};class Zm{constructor(e,t,n,i){this.isProviderFirst=e,this.parent=t,this.link=n,this._rangeCallback=i,this.id=yG.nextId()}get uri(){return this.link.uri}get range(){var e,t;return(t=(e=this._range)!==null&&e!==void 0?e:this.link.targetSelectionRange)!==null&&t!==void 0?t:this.link.range}set range(e){this._range=e,this._rangeCallback(this)}get ariaMessage(){var e;const t=(e=this.parent.getPreview(this))===null||e===void 0?void 0:e.preview(this.range);return t?v({key:"aria.oneReference.preview",comment:["Placeholders are: 0: filename, 1:line number, 2: column number, 3: preview snippet of source code"]},"{0} in {1} on line {2} at column {3}",t.value,O0(this.uri),this.range.startLineNumber,this.range.startColumn):v("aria.oneReference","in {0} on line {1} at column {2}",O0(this.uri),this.range.startLineNumber,this.range.startColumn)}}class tmt{constructor(e){this._modelReference=e}dispose(){this._modelReference.dispose()}preview(e,t=8){const n=this._modelReference.object.textEditorModel;if(!n)return;const{startLineNumber:i,startColumn:r,endLineNumber:a,endColumn:o}=e,s=n.getWordUntilPosition({lineNumber:i,column:r-t}),l=new j(i,s.startColumn,i,r),c=new j(a,o,a,1073741824),d=n.getValueInRange(l).replace(/^\s+/,""),h=n.getValueInRange(e),E=n.getValueInRange(c).replace(/\s+$/,"");return{value:d+h+E,highlight:{start:d.length,end:d.length+h.length}}}}class sF{constructor(e,t){this.parent=e,this.uri=t,this.children=[],this._previews=new ma}dispose(){Su(this._previews.values()),this._previews.clear()}getPreview(e){return this._previews.get(e.uri)}get ariaMessage(){const e=this.children.length;return e===1?v("aria.fileReferences.1","1 symbol in {0}, full path {1}",O0(this.uri),this.uri.fsPath):v("aria.fileReferences.N","{0} symbols in {1}, full path {2}",e,O0(this.uri),this.uri.fsPath)}resolve(e){return emt(this,void 0,void 0,function*(){if(this._previews.size!==0)return this;for(const t of this.children)if(!this._previews.has(t.uri))try{const n=yield e.createModelReference(t.uri);this._previews.set(t.uri,new tmt(n))}catch(n){zt(n)}return this})}}class ds{constructor(e,t){this.groups=[],this.references=[],this._onDidChangeReferenceRange=new Q,this.onDidChangeReferenceRange=this._onDidChangeReferenceRange.event,this._links=e,this._title=t;const[n]=e;e.sort(ds._compareReferences);let i;for(const r of e)if((!i||!mn.isEqual(i.uri,r.uri,!0))&&(i=new sF(this,r.uri),this.groups.push(i)),i.children.length===0||ds._compareReferences(r,i.children[i.children.length-1])!==0){const a=new Zm(n===r,i,r,o=>this._onDidChangeReferenceRange.fire(o));this.references.push(a),i.children.push(a)}}dispose(){Su(this.groups),this._onDidChangeReferenceRange.dispose(),this.groups.length=0}clone(){return new ds(this._links,this._title)}get title(){return this._title}get isEmpty(){return this.groups.length===0}get ariaMessage(){return this.isEmpty?v("aria.result.0","No results found"):this.references.length===1?v("aria.result.1","Found 1 symbol in {0}",this.references[0].uri.fsPath):this.groups.length===1?v("aria.result.n1","Found {0} symbols in {1}",this.references.length,this.groups[0].uri.fsPath):v("aria.result.nm","Found {0} symbols in {1} files",this.references.length,this.groups.length)}nextOrPreviousReference(e,t){const{parent:n}=e;let i=n.children.indexOf(e);const r=n.children.length,a=n.parent.groups.length;return a===1||t&&i+10?(t?i=(i+1)%r:i=(i+r-1)%r,n.children[i]):(i=n.parent.groups.indexOf(n),t?(i=(i+1)%a,n.parent.groups[i].children[0]):(i=(i+a-1)%a,n.parent.groups[i].children[n.parent.groups[i].children.length-1]))}nearestReference(e,t){const n=this.references.map((i,r)=>({idx:r,prefixLen:A3(i.uri.toString(),e.toString()),offsetDist:Math.abs(i.range.startLineNumber-t.lineNumber)*100+Math.abs(i.range.startColumn-t.column)})).sort((i,r)=>i.prefixLen>r.prefixLen?-1:i.prefixLenr.offsetDist?1:0)[0];if(n)return this.references[n.idx]}referenceAt(e,t){for(const n of this.references)if(n.uri.toString()===e.toString()&&j.containsPosition(n.range,t))return n}firstReference(){for(const e of this.references)if(e.isProviderFirst)return e;return this.references[0]}static _compareReferences(e,t){return mn.compare(e.uri,t.uri)||j.compareRangesUsingStarts(e.range,t.range)}}var oR=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},sR=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},$U;let KU=class{constructor(e){this._resolverService=e}hasChildren(e){return e instanceof ds||e instanceof sF}getChildren(e){if(e instanceof ds)return e.groups;if(e instanceof sF)return e.resolve(this._resolverService).then(t=>t.children);throw new Error("bad tree")}};KU=oR([sR(0,Vo)],KU);class umt{getHeight(){return 23}getTemplateId(e){return e instanceof sF?lF.id:NA.id}}let WU=class{constructor(e){this._keybindingService=e}getKeyboardNavigationLabel(e){var t;if(e instanceof Zm){const n=(t=e.parent.getPreview(e))===null||t===void 0?void 0:t.preview(e.range);if(n)return n.value}return O0(e.uri)}};WU=oR([sR(0,qu)],WU);class nmt{getId(e){return e instanceof Zm?e.id:e.uri}}let GU=class extends ne{constructor(e,t){super(),this._labelService=t;const n=document.createElement("div");n.classList.add("reference-file"),this.file=this._register(new kw(n,{supportHighlights:!0})),this.badge=new JG(me(n,ve(".count")),{},$be),e.appendChild(n)}set(e,t){const n=xP(e.uri);this.file.setLabel(this._labelService.getUriBasenameLabel(e.uri),this._labelService.getUriLabel(n,{relative:!0}),{title:this._labelService.getUriLabel(e.uri),matches:t});const i=e.children.length;this.badge.setCount(i),i>1?this.badge.setTitleFormat(v("referencesCount","{0} references",i)):this.badge.setTitleFormat(v("referenceCount","{0} reference",i))}};GU=oR([sR(1,cv)],GU);let lF=$U=class{constructor(e){this._instantiationService=e,this.templateId=$U.id}renderTemplate(e){return this._instantiationService.createInstance(GU,e)}renderElement(e,t,n){n.set(e.element,vA(e.filterData))}disposeTemplate(e){e.dispose()}};lF.id="FileReferencesRenderer";lF=$U=oR([sR(0,mt)],lF);class imt{constructor(e){this.label=new am(e)}set(e,t){var n;const i=(n=e.parent.getPreview(e))===null||n===void 0?void 0:n.preview(e.range);if(!i||!i.value)this.label.set(`${O0(e.uri)}:${e.range.startLineNumber+1}:${e.range.startColumn+1}`);else{const{value:r,highlight:a}=i;t&&!Kc.isDefault(t)?(this.label.element.classList.toggle("referenceMatch",!1),this.label.set(r,vA(t))):(this.label.element.classList.toggle("referenceMatch",!0),this.label.set(r,[a]))}}}class NA{constructor(){this.templateId=NA.id}renderTemplate(e){return new imt(e)}renderElement(e,t,n){n.set(e.element,e.filterData)}disposeTemplate(){}}NA.id="OneReferenceRenderer";class rmt{getWidgetAriaLabel(){return v("treeAriaLabel","References")}getAriaLabel(e){return e.ariaMessage}}var amt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},sh=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},_le=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};class lR{constructor(e,t){this._editor=e,this._model=t,this._decorations=new Map,this._decorationIgnoreSet=new Set,this._callOnDispose=new pe,this._callOnModelChange=new pe,this._callOnDispose.add(this._editor.onDidChangeModel(()=>this._onModelChanged())),this._onModelChanged()}dispose(){this._callOnModelChange.dispose(),this._callOnDispose.dispose(),this.removeDecorations()}_onModelChanged(){this._callOnModelChange.clear();const e=this._editor.getModel();if(e){for(const t of this._model.references)if(t.uri.toString()===e.uri.toString()){this._addDecorations(t.parent);return}}}_addDecorations(e){if(!this._editor.hasModel())return;this._callOnModelChange.add(this._editor.getModel().onDidChangeDecorations(()=>this._onDecorationChanged()));const t=[],n=[];for(let i=0,r=e.children.length;i{const r=i.deltaDecorations([],t);for(let a=0;a{r.equals(9)&&(this._keybindingService.dispatchEvent(r,r.target),r.stopPropagation())},!0)),this._tree=this._instantiationService.createInstance(smt,"ReferencesWidget",this._treeContainer,new umt,[this._instantiationService.createInstance(lF),this._instantiationService.createInstance(NA)],this._instantiationService.createInstance(KU),n),this._splitView.addView({onDidChange:Ne.None,element:this._previewContainer,minimumSize:200,maximumSize:Number.MAX_VALUE,layout:r=>{this._preview.layout({height:this._dim.height,width:r})}},xw.Distribute),this._splitView.addView({onDidChange:Ne.None,element:this._treeContainer,minimumSize:100,maximumSize:Number.MAX_VALUE,layout:r=>{this._treeContainer.style.height=`${this._dim.height}px`,this._treeContainer.style.width=`${r}px`,this._tree.layout(this._dim.height,r)}},xw.Distribute),this._disposables.add(this._splitView.onDidSashChange(()=>{this._dim.width&&(this.layoutData.ratio=this._splitView.getViewSize(0)/this._dim.width)},void 0));const i=(r,a)=>{r instanceof Zm&&(a==="show"&&this._revealReference(r,!1),this._onDidSelectReference.fire({element:r,kind:a,source:"tree"}))};this._tree.onDidOpen(r=>{r.sideBySide?i(r.element,"side"):r.editorOptions.pinned?i(r.element,"goto"):i(r.element,"show")}),Ya(this._treeContainer)}_onWidth(e){this._dim&&this._doLayoutBody(this._dim.height,e)}_doLayoutBody(e,t){super._doLayoutBody(e,t),this._dim=new pu(t,e),this.layoutData.heightInLines=this._viewZone?this._viewZone.heightInLines:this.layoutData.heightInLines,this._splitView.layout(t),this._splitView.resizeView(0,t*this.layoutData.ratio)}setSelection(e){return this._revealReference(e,!0).then(()=>{this._model&&(this._tree.setSelection([e]),this._tree.setFocus([e]))})}setModel(e){return this._disposeOnNewModel.clear(),this._model=e,this._model?this._onNewModel():Promise.resolve()}_onNewModel(){return this._model?this._model.isEmpty?(this.setTitle(""),this._messageContainer.innerText=v("noResults","No results"),ns(this._messageContainer),Promise.resolve(void 0)):(Ya(this._messageContainer),this._decorationsManager=new lR(this._preview,this._model),this._disposeOnNewModel.add(this._decorationsManager),this._disposeOnNewModel.add(this._model.onDidChangeReferenceRange(e=>this._tree.rerender(e))),this._disposeOnNewModel.add(this._preview.onMouseDown(e=>{const{event:t,target:n}=e;if(t.detail!==2)return;const i=this._getFocusedReference();i&&this._onDidSelectReference.fire({element:{uri:i.uri,range:n.range},kind:t.ctrlKey||t.metaKey||t.altKey?"side":"open",source:"editor"})})),this.container.classList.add("results-loaded"),ns(this._treeContainer),ns(this._previewContainer),this._splitView.layout(this._dim.width),this.focusOnReferenceTree(),this._tree.setInput(this._model.groups.length===1?this._model.groups[0]:this._model)):Promise.resolve(void 0)}_getFocusedReference(){const[e]=this._tree.getFocus();if(e instanceof Zm)return e;if(e instanceof sF&&e.children.length>0)return e.children[0]}revealReference(e){return _le(this,void 0,void 0,function*(){yield this._revealReference(e,!1),this._onDidSelectReference.fire({element:e,kind:"goto",source:"tree"})})}_revealReference(e,t){return _le(this,void 0,void 0,function*(){if(this._revealedReference===e)return;this._revealedReference=e,e.uri.scheme!==Ot.inMemory?this.setTitle(Ynt(e.uri),this._uriLabel.getUriLabel(xP(e.uri))):this.setTitle(v("peekView.alternateTitle","References"));const n=this._textModelResolverService.createModelReference(e.uri);this._tree.getInput()===e.parent?this._tree.reveal(e):(t&&this._tree.reveal(e.parent),yield this._tree.expand(e.parent),this._tree.reveal(e));const i=yield n;if(!this._model){i.dispose();return}Su(this._previewModelReference);const r=i.object;if(r){const a=this._preview.getModel()===r.textEditorModel?0:1,o=j.lift(e.range).collapseToStart();this._previewModelReference=i,this._preview.setModel(r.textEditorModel),this._preview.setSelection(o),this._preview.revealRangeInCenter(o,a)}else this._preview.setModel(this._previewNotAvailableMessage),i.dispose()})}};UU=amt([sh(3,sr),sh(4,Vo),sh(5,mt),sh(6,gFe),sh(7,cv),sh(8,vP),sh(9,qu),sh(10,vn),sh(11,tn)],UU);var lmt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},xD=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},Sle=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})},m8;const Hp=new Pe("referenceSearchVisible",!1,v("referenceSearchVisible","Whether reference peek is visible, like 'Peek References' or 'Peek Definition'"));let Ym=m8=class{static get(e){return e.getContribution(m8.ID)}constructor(e,t,n,i,r,a,o,s){this._defaultTreeKeyboardSupport=e,this._editor=t,this._editorService=i,this._notificationService=r,this._instantiationService=a,this._storageService=o,this._configurationService=s,this._disposables=new pe,this._requestIdPool=0,this._ignoreModelChangeEvent=!1,this._referenceSearchVisible=Hp.bindTo(n)}dispose(){var e,t;this._referenceSearchVisible.reset(),this._disposables.dispose(),(e=this._widget)===null||e===void 0||e.dispose(),(t=this._model)===null||t===void 0||t.dispose(),this._widget=void 0,this._model=void 0}toggleWidget(e,t,n){let i;if(this._widget&&(i=this._widget.position),this.closeWidget(),i&&e.containsPosition(i))return;this._peekMode=n,this._referenceSearchVisible.set(!0),this._disposables.add(this._editor.onDidChangeModelLanguage(()=>{this.closeWidget()})),this._disposables.add(this._editor.onDidChangeModel(()=>{this._ignoreModelChangeEvent||this.closeWidget()}));const r="peekViewLayout",a=omt.fromJSON(this._storageService.get(r,0,"{}"));this._widget=this._instantiationService.createInstance(UU,this._editor,this._defaultTreeKeyboardSupport,a),this._widget.setTitle(v("labelLoading","Loading...")),this._widget.show(e),this._disposables.add(this._widget.onDidClose(()=>{t.cancel(),this._widget&&(this._storageService.store(r,JSON.stringify(this._widget.layoutData),0,1),this._widget=void 0),this.closeWidget()})),this._disposables.add(this._widget.onDidSelectReference(s=>{const{element:l,kind:c}=s;if(l)switch(c){case"open":(s.source!=="editor"||!this._configurationService.getValue("editor.stablePeek"))&&this.openReference(l,!1,!1);break;case"side":this.openReference(l,!0,!1);break;case"goto":n?this._gotoReference(l,!0):this.openReference(l,!1,!0);break}}));const o=++this._requestIdPool;t.then(s=>{var l;if(o!==this._requestIdPool||!this._widget){s.dispose();return}return(l=this._model)===null||l===void 0||l.dispose(),this._model=s,this._widget.setModel(this._model).then(()=>{if(this._widget&&this._model&&this._editor.hasModel()){this._model.isEmpty?this._widget.setMetaTitle(""):this._widget.setMetaTitle(v("metaTitle.N","{0} ({1})",this._model.title,this._model.references.length));const c=this._editor.getModel().uri,d=new ee(e.startLineNumber,e.startColumn),h=this._model.nearestReference(c,d);if(h)return this._widget.setSelection(h).then(()=>{this._widget&&this._editor.getOption(86)==="editor"&&this._widget.focusOnPreviewEditor()})}})},s=>{this._notificationService.error(s)})}changeFocusBetweenPreviewAndReferences(){this._widget&&(this._widget.isPreviewEditorFocused()?this._widget.focusOnReferenceTree():this._widget.focusOnPreviewEditor())}goToNextOrPreviousReference(e){return Sle(this,void 0,void 0,function*(){if(!this._editor.hasModel()||!this._model||!this._widget)return;const t=this._widget.position;if(!t)return;const n=this._model.nearestReference(this._editor.getModel().uri,t);if(!n)return;const i=this._model.nextOrPreviousReference(n,e),r=this._editor.hasTextFocus(),a=this._widget.isPreviewEditorFocused();yield this._widget.setSelection(i),yield this._gotoReference(i,!1),r?this._editor.focus():this._widget&&a&&this._widget.focusOnPreviewEditor()})}revealReference(e){return Sle(this,void 0,void 0,function*(){!this._editor.hasModel()||!this._model||!this._widget||(yield this._widget.revealReference(e))})}closeWidget(e=!0){var t,n;(t=this._widget)===null||t===void 0||t.dispose(),(n=this._model)===null||n===void 0||n.dispose(),this._referenceSearchVisible.reset(),this._disposables.clear(),this._widget=void 0,this._model=void 0,e&&this._editor.focus(),this._requestIdPool+=1}_gotoReference(e,t){var n;(n=this._widget)===null||n===void 0||n.hide(),this._ignoreModelChangeEvent=!0;const i=j.lift(e.range).collapseToStart();return this._editorService.openCodeEditor({resource:e.uri,options:{selection:i,selectionSource:"code.jump",pinned:t}},this._editor).then(r=>{var a;if(this._ignoreModelChangeEvent=!1,!r||!this._widget){this.closeWidget();return}if(this._editor===r)this._widget.show(i),this._widget.focusOnReferenceTree();else{const o=m8.get(r),s=this._model.clone();this.closeWidget(),r.focus(),o==null||o.toggleWidget(i,Ui(l=>Promise.resolve(s)),(a=this._peekMode)!==null&&a!==void 0?a:!1)}},r=>{this._ignoreModelChangeEvent=!1,zt(r)})}openReference(e,t,n){t||this.closeWidget();const{uri:i,range:r}=e;this._editorService.openCodeEditor({resource:i,options:{selection:r,selectionSource:"code.jump",pinned:n}},this._editor,t)}};Ym.ID="editor.contrib.referencesController";Ym=m8=lmt([xD(2,pt),xD(3,Cu),xD(4,bi),xD(5,mt),xD(6,Ul),xD(7,tu)],Ym);function Vp(u,e){const t=JEt(u);if(!t)return;const n=Ym.get(t);n&&e(n)}Po.registerCommandAndKeybindingRule({id:"togglePeekWidgetFocus",weight:100,primary:Vi(2089,60),when:Ee.or(Hp,Ro.inPeekEditor),handler(u){Vp(u,e=>{e.changeFocusBetweenPreviewAndReferences()})}});Po.registerCommandAndKeybindingRule({id:"goToNextReference",weight:100-10,primary:62,secondary:[70],when:Ee.or(Hp,Ro.inPeekEditor),handler(u){Vp(u,e=>{e.goToNextOrPreviousReference(!0)})}});Po.registerCommandAndKeybindingRule({id:"goToPreviousReference",weight:100-10,primary:1086,secondary:[1094],when:Ee.or(Hp,Ro.inPeekEditor),handler(u){Vp(u,e=>{e.goToNextOrPreviousReference(!1)})}});ru.registerCommandAlias("goToNextReferenceFromEmbeddedEditor","goToNextReference");ru.registerCommandAlias("goToPreviousReferenceFromEmbeddedEditor","goToPreviousReference");ru.registerCommandAlias("closeReferenceSearchEditor","closeReferenceSearch");ru.registerCommand("closeReferenceSearch",u=>Vp(u,e=>e.closeWidget()));Po.registerKeybindingRule({id:"closeReferenceSearch",weight:100-101,primary:9,secondary:[1033],when:Ee.and(Ro.inPeekEditor,Ee.not("config.editor.stablePeek"))});Po.registerKeybindingRule({id:"closeReferenceSearch",weight:200+50,primary:9,secondary:[1033],when:Ee.and(Hp,Ee.not("config.editor.stablePeek"))});Po.registerCommandAndKeybindingRule({id:"revealReference",weight:200,primary:3,mac:{primary:3,secondary:[2066]},when:Ee.and(Hp,d2e,yee.negate(),Aee.negate()),handler(u){var e;const n=(e=u.get(Z0).lastFocusedList)===null||e===void 0?void 0:e.getFocus();Array.isArray(n)&&n[0]instanceof Zm&&Vp(u,i=>i.revealReference(n[0]))}});Po.registerCommandAndKeybindingRule({id:"openReferenceToSide",weight:100,primary:2051,mac:{primary:259},when:Ee.and(Hp,d2e,yee.negate(),Aee.negate()),handler(u){var e;const n=(e=u.get(Z0).lastFocusedList)===null||e===void 0?void 0:e.getFocus();Array.isArray(n)&&n[0]instanceof Zm&&Vp(u,i=>i.openReference(n[0],!0,!0))}});ru.registerCommand("openReference",u=>{var e;const n=(e=u.get(Z0).lastFocusedList)===null||e===void 0?void 0:e.getFocus();Array.isArray(n)&&n[0]instanceof Zm&&Vp(u,i=>i.openReference(n[0],!1,!0))});var DFe=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},Sb=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}};const ite=new Pe("hasSymbols",!1,v("hasSymbols","Whether there are symbol locations that can be navigated via keyboard-only.")),cR=Ut("ISymbolNavigationService");let qU=class{constructor(e,t,n,i){this._editorService=t,this._notificationService=n,this._keybindingService=i,this._currentModel=void 0,this._currentIdx=-1,this._ignoreEditorChange=!1,this._ctxHasSymbols=ite.bindTo(e)}reset(){var e,t;this._ctxHasSymbols.reset(),(e=this._currentState)===null||e===void 0||e.dispose(),(t=this._currentMessage)===null||t===void 0||t.dispose(),this._currentModel=void 0,this._currentIdx=-1}put(e){const t=e.parent.parent;if(t.references.length<=1){this.reset();return}this._currentModel=t,this._currentIdx=t.references.indexOf(e),this._ctxHasSymbols.set(!0),this._showMessage();const n=new JU(this._editorService),i=n.onDidChange(r=>{if(this._ignoreEditorChange)return;const a=this._editorService.getActiveCodeEditor();if(!a)return;const o=a.getModel(),s=a.getPosition();if(!o||!s)return;let l=!1,c=!1;for(const d of t.references)if(TX(d.uri,o.uri))l=!0,c=c||j.containsPosition(d.range,s);else if(l)break;(!l||!c)&&this.reset()});this._currentState=Fl(n,i)}revealNext(e){if(!this._currentModel)return Promise.resolve();this._currentIdx+=1,this._currentIdx%=this._currentModel.references.length;const t=this._currentModel.references[this._currentIdx];return this._showMessage(),this._ignoreEditorChange=!0,this._editorService.openCodeEditor({resource:t.uri,options:{selection:j.collapseToStart(t.range),selectionRevealType:3}},e).finally(()=>{this._ignoreEditorChange=!1})}_showMessage(){var e;(e=this._currentMessage)===null||e===void 0||e.dispose();const t=this._keybindingService.lookupKeybinding("editor.gotoNextSymbolFromResult"),n=t?v("location.kb","Symbol {0} of {1}, {2} for next",this._currentIdx+1,this._currentModel.references.length,t.getLabel()):v("location","Symbol {0} of {1}",this._currentIdx+1,this._currentModel.references.length);this._currentMessage=this._notificationService.status(n)}};qU=DFe([Sb(0,pt),Sb(1,Cu),Sb(2,bi),Sb(3,qu)],qU);au(cR,qU,1);ze(new class extends xr{constructor(){super({id:"editor.gotoNextSymbolFromResult",precondition:ite,kbOpts:{weight:100,primary:70}})}runEditorCommand(u,e){return u.get(cR).revealNext(e)}});Po.registerCommandAndKeybindingRule({id:"editor.gotoNextSymbolFromResult.cancel",weight:100,when:ite,primary:9,handler(u){u.get(cR).reset()}});let JU=class{constructor(e){this._listener=new Map,this._disposables=new pe,this._onDidChange=new Q,this.onDidChange=this._onDidChange.event,this._disposables.add(e.onCodeEditorRemove(this._onDidRemoveEditor,this)),this._disposables.add(e.onCodeEditorAdd(this._onDidAddEditor,this)),e.listCodeEditors().forEach(this._onDidAddEditor,this)}dispose(){this._disposables.dispose(),this._onDidChange.dispose(),Su(this._listener.values())}_onDidAddEditor(e){this._listener.set(e,Fl(e.onDidChangeCursorPosition(t=>this._onDidChange.fire({editor:e})),e.onDidChangeModelContent(t=>this._onDidChange.fire({editor:e}))))}_onDidRemoveEditor(e){var t;(t=this._listener.get(e))===null||t===void 0||t.dispose(),this._listener.delete(e)}};JU=DFe([Sb(0,Cu)],JU);var rte=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};function PA(u,e,t,n){return rte(this,void 0,void 0,function*(){const r=t.ordered(u).map(o=>Promise.resolve(n(o,u,e)).then(void 0,s=>{Mi(s)})),a=yield Promise.all(r);return b1(a.flat())})}function dR(u,e,t,n){return PA(e,t,u,(i,r,a)=>i.provideDefinition(r,a,n))}function xFe(u,e,t,n){return PA(e,t,u,(i,r,a)=>i.provideDeclaration(r,a,n))}function vFe(u,e,t,n){return PA(e,t,u,(i,r,a)=>i.provideImplementation(r,a,n))}function CFe(u,e,t,n){return PA(e,t,u,(i,r,a)=>i.provideTypeDefinition(r,a,n))}function hR(u,e,t,n,i){return PA(e,t,u,(r,a,o)=>rte(this,void 0,void 0,function*(){const s=yield r.provideReferences(a,o,{includeDeclaration:!0},i);if(!n||!s||s.length!==2)return s;const l=yield r.provideReferences(a,o,{includeDeclaration:!1},i);return l&&l.length===1?l:s}))}function RA(u){return rte(this,void 0,void 0,function*(){const e=yield u(),t=new ds(e,""),n=t.references.map(i=>i.link);return t.dispose(),n})}W1("_executeDefinitionProvider",(u,e,t)=>{const n=u.get(We),i=dR(n.definitionProvider,e,t,Kt.None);return RA(()=>i)});W1("_executeTypeDefinitionProvider",(u,e,t)=>{const n=u.get(We),i=CFe(n.typeDefinitionProvider,e,t,Kt.None);return RA(()=>i)});W1("_executeDeclarationProvider",(u,e,t)=>{const n=u.get(We),i=xFe(n.declarationProvider,e,t,Kt.None);return RA(()=>i)});W1("_executeReferenceProvider",(u,e,t)=>{const n=u.get(We),i=hR(n.referenceProvider,e,t,!1,Kt.None);return RA(()=>i)});W1("_executeImplementationProvider",(u,e,t)=>{const n=u.get(We),i=vFe(n.implementationProvider,e,t,Kt.None);return RA(()=>i)});var _l=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})},bC,kC,FC,T9,N9,P9,R9,I9;Lr.appendMenuItem(K.EditorContext,{submenu:K.EditorContextPeek,title:v("peek.submenu","Peek"),group:"navigation",order:100});class bv{static is(e){return!e||typeof e!="object"?!1:!!(e instanceof bv||ee.isIPosition(e.position)&&e.model)}constructor(e,t){this.model=e,this.position=t}}class Ba extends hd{static all(){return Ba._allSymbolNavigationCommands.values()}static _patchConfig(e){const t=Object.assign(Object.assign({},e),{f1:!0});if(t.menu)for(const n of $t.wrap(t.menu))(n.id===K.EditorContext||n.id===K.EditorContextPeek)&&(n.when=Ee.and(e.precondition,n.when));return t}constructor(e,t){super(Ba._patchConfig(t)),this.configuration=e,Ba._allSymbolNavigationCommands.set(t.id,this)}runEditorCommand(e,t,n,i){if(!t.hasModel())return Promise.resolve(void 0);const r=e.get(bi),a=e.get(Cu),o=e.get(Dg),s=e.get(cR),l=e.get(We),c=e.get(mt),d=t.getModel(),h=t.getPosition(),E=bv.is(n)?n:new bv(d,h),m=new Gm(t,5),g=YN(this._getLocationModel(l,E.model,E.position,m.token),m.token).then(f=>_l(this,void 0,void 0,function*(){var p;if(!f||m.token.isCancellationRequested)return;ga(f.ariaMessage);let D;if(f.referenceAt(d.uri,h)){const b=this._getAlternativeCommand(t);!Ba._activeAlternativeCommands.has(b)&&Ba._allSymbolNavigationCommands.has(b)&&(D=Ba._allSymbolNavigationCommands.get(b))}const x=f.references.length;if(x===0){if(!this.configuration.muteMessage){const b=d.getWordAtPosition(h);(p=cs.get(t))===null||p===void 0||p.showMessage(this._getNoResultFoundMessage(b),h)}}else if(x===1&&D)Ba._activeAlternativeCommands.add(this.desc.id),c.invokeFunction(b=>D.runEditorCommand(b,t,n,i).finally(()=>{Ba._activeAlternativeCommands.delete(this.desc.id)}));else return this._onResult(a,s,t,f,i)}),f=>{r.error(f)}).finally(()=>{m.dispose()});return o.showWhile(g,250),g}_onResult(e,t,n,i,r){return _l(this,void 0,void 0,function*(){const a=this._getGoToPreference(n);if(!(n instanceof Jm)&&(this.configuration.openInPeek||a==="peek"&&i.references.length>1))this._openInPeek(n,i,r);else{const o=i.firstReference(),s=i.references.length>1&&a==="gotoAndPeek",l=yield this._openReference(n,e,o,this.configuration.openToSide,!s);s&&l?this._openInPeek(l,i,r):i.dispose(),a==="goto"&&t.put(o)}})}_openReference(e,t,n,i,r){return _l(this,void 0,void 0,function*(){let a;if(Eqe(n)&&(a=n.targetSelectionRange),a||(a=n.range),!a)return;const o=yield t.openCodeEditor({resource:n.uri,options:{selection:j.collapseToStart(a),selectionRevealType:3,selectionSource:"code.jump"}},e,i);if(o){if(r){const s=o.getModel(),l=o.createDecorationsCollection([{range:a,options:{description:"symbol-navigate-action-highlight",className:"symbolHighlight"}}]);setTimeout(()=>{o.getModel()===s&&l.clear()},350)}return o}})}_openInPeek(e,t,n){const i=Ym.get(e);i&&e.hasModel()?i.toggleWidget(n??e.getSelection(),Ui(r=>Promise.resolve(t)),this.configuration.openInPeek):t.dispose()}}Ba._allSymbolNavigationCommands=new Map;Ba._activeAlternativeCommands=new Set;class IA extends Ba{_getLocationModel(e,t,n,i){return _l(this,void 0,void 0,function*(){return new ds(yield dR(e.definitionProvider,t,n,i),v("def.title","Definitions"))})}_getNoResultFoundMessage(e){return e&&e.word?v("noResultWord","No definition found for '{0}'",e.word):v("generic.noResults","No definition found")}_getAlternativeCommand(e){return e.getOption(58).alternativeDefinitionCommand}_getGoToPreference(e){return e.getOption(58).multipleDefinitions}}gn((bC=class extends IA{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:bC.id,title:{value:v("actions.goToDecl.label","Go to Definition"),original:"Go to Definition",mnemonicTitle:v({key:"miGotoDefinition",comment:["&& denotes a mnemonic"]},"Go to &&Definition")},precondition:Ee.and(W.hasDefinitionProvider,W.isInWalkThroughSnippet.toNegated()),keybinding:[{when:W.editorTextFocus,primary:70,weight:100},{when:Ee.and(W.editorTextFocus,s2e),primary:2118,weight:100}],menu:[{id:K.EditorContext,group:"navigation",order:1.1},{id:K.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:2}]}),ru.registerCommandAlias("editor.action.goToDeclaration",bC.id)}},bC.id="editor.action.revealDefinition",bC));gn((kC=class extends IA{constructor(){super({openToSide:!0,openInPeek:!1,muteMessage:!1},{id:kC.id,title:{value:v("actions.goToDeclToSide.label","Open Definition to the Side"),original:"Open Definition to the Side"},precondition:Ee.and(W.hasDefinitionProvider,W.isInWalkThroughSnippet.toNegated()),keybinding:[{when:W.editorTextFocus,primary:Vi(2089,70),weight:100},{when:Ee.and(W.editorTextFocus,s2e),primary:Vi(2089,2118),weight:100}]}),ru.registerCommandAlias("editor.action.openDeclarationToTheSide",kC.id)}},kC.id="editor.action.revealDefinitionAside",kC));gn((FC=class extends IA{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:FC.id,title:{value:v("actions.previewDecl.label","Peek Definition"),original:"Peek Definition"},precondition:Ee.and(W.hasDefinitionProvider,Ro.notInPeekEditor,W.isInWalkThroughSnippet.toNegated()),keybinding:{when:W.editorTextFocus,primary:582,linux:{primary:3140},weight:100},menu:{id:K.EditorContextPeek,group:"peek",order:2}}),ru.registerCommandAlias("editor.action.previewDeclaration",FC.id)}},FC.id="editor.action.peekDefinition",FC));class bFe extends Ba{_getLocationModel(e,t,n,i){return _l(this,void 0,void 0,function*(){return new ds(yield xFe(e.declarationProvider,t,n,i),v("decl.title","Declarations"))})}_getNoResultFoundMessage(e){return e&&e.word?v("decl.noResultWord","No declaration found for '{0}'",e.word):v("decl.generic.noResults","No declaration found")}_getAlternativeCommand(e){return e.getOption(58).alternativeDeclarationCommand}_getGoToPreference(e){return e.getOption(58).multipleDeclarations}}gn((T9=class extends bFe{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:T9.id,title:{value:v("actions.goToDeclaration.label","Go to Declaration"),original:"Go to Declaration",mnemonicTitle:v({key:"miGotoDeclaration",comment:["&& denotes a mnemonic"]},"Go to &&Declaration")},precondition:Ee.and(W.hasDeclarationProvider,W.isInWalkThroughSnippet.toNegated()),menu:[{id:K.EditorContext,group:"navigation",order:1.3},{id:K.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:3}]})}_getNoResultFoundMessage(e){return e&&e.word?v("decl.noResultWord","No declaration found for '{0}'",e.word):v("decl.generic.noResults","No declaration found")}},T9.id="editor.action.revealDeclaration",T9));gn(class extends bFe{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:"editor.action.peekDeclaration",title:{value:v("actions.peekDecl.label","Peek Declaration"),original:"Peek Declaration"},precondition:Ee.and(W.hasDeclarationProvider,Ro.notInPeekEditor,W.isInWalkThroughSnippet.toNegated()),menu:{id:K.EditorContextPeek,group:"peek",order:3}})}});class kFe extends Ba{_getLocationModel(e,t,n,i){return _l(this,void 0,void 0,function*(){return new ds(yield CFe(e.typeDefinitionProvider,t,n,i),v("typedef.title","Type Definitions"))})}_getNoResultFoundMessage(e){return e&&e.word?v("goToTypeDefinition.noResultWord","No type definition found for '{0}'",e.word):v("goToTypeDefinition.generic.noResults","No type definition found")}_getAlternativeCommand(e){return e.getOption(58).alternativeTypeDefinitionCommand}_getGoToPreference(e){return e.getOption(58).multipleTypeDefinitions}}gn((N9=class extends kFe{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:N9.ID,title:{value:v("actions.goToTypeDefinition.label","Go to Type Definition"),original:"Go to Type Definition",mnemonicTitle:v({key:"miGotoTypeDefinition",comment:["&& denotes a mnemonic"]},"Go to &&Type Definition")},precondition:Ee.and(W.hasTypeDefinitionProvider,W.isInWalkThroughSnippet.toNegated()),keybinding:{when:W.editorTextFocus,primary:0,weight:100},menu:[{id:K.EditorContext,group:"navigation",order:1.4},{id:K.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:3}]})}},N9.ID="editor.action.goToTypeDefinition",N9));gn((P9=class extends kFe{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:P9.ID,title:{value:v("actions.peekTypeDefinition.label","Peek Type Definition"),original:"Peek Type Definition"},precondition:Ee.and(W.hasTypeDefinitionProvider,Ro.notInPeekEditor,W.isInWalkThroughSnippet.toNegated()),menu:{id:K.EditorContextPeek,group:"peek",order:4}})}},P9.ID="editor.action.peekTypeDefinition",P9));class FFe extends Ba{_getLocationModel(e,t,n,i){return _l(this,void 0,void 0,function*(){return new ds(yield vFe(e.implementationProvider,t,n,i),v("impl.title","Implementations"))})}_getNoResultFoundMessage(e){return e&&e.word?v("goToImplementation.noResultWord","No implementation found for '{0}'",e.word):v("goToImplementation.generic.noResults","No implementation found")}_getAlternativeCommand(e){return e.getOption(58).alternativeImplementationCommand}_getGoToPreference(e){return e.getOption(58).multipleImplementations}}gn((R9=class extends FFe{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:R9.ID,title:{value:v("actions.goToImplementation.label","Go to Implementations"),original:"Go to Implementations",mnemonicTitle:v({key:"miGotoImplementation",comment:["&& denotes a mnemonic"]},"Go to &&Implementations")},precondition:Ee.and(W.hasImplementationProvider,W.isInWalkThroughSnippet.toNegated()),keybinding:{when:W.editorTextFocus,primary:2118,weight:100},menu:[{id:K.EditorContext,group:"navigation",order:1.45},{id:K.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:4}]})}},R9.ID="editor.action.goToImplementation",R9));gn((I9=class extends FFe{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:I9.ID,title:{value:v("actions.peekImplementation.label","Peek Implementations"),original:"Peek Implementations"},precondition:Ee.and(W.hasImplementationProvider,Ro.notInPeekEditor,W.isInWalkThroughSnippet.toNegated()),keybinding:{when:W.editorTextFocus,primary:3142,weight:100},menu:{id:K.EditorContextPeek,group:"peek",order:5}})}},I9.ID="editor.action.peekImplementation",I9));class yFe extends Ba{_getNoResultFoundMessage(e){return e?v("references.no","No references found for '{0}'",e.word):v("references.noGeneric","No references found")}_getAlternativeCommand(e){return e.getOption(58).alternativeReferenceCommand}_getGoToPreference(e){return e.getOption(58).multipleReferences}}gn(class extends yFe{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:"editor.action.goToReferences",title:{value:v("goToReferences.label","Go to References"),original:"Go to References",mnemonicTitle:v({key:"miGotoReference",comment:["&& denotes a mnemonic"]},"Go to &&References")},precondition:Ee.and(W.hasReferenceProvider,Ro.notInPeekEditor,W.isInWalkThroughSnippet.toNegated()),keybinding:{when:W.editorTextFocus,primary:1094,weight:100},menu:[{id:K.EditorContext,group:"navigation",order:1.45},{id:K.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:5}]})}_getLocationModel(e,t,n,i){return _l(this,void 0,void 0,function*(){return new ds(yield hR(e.referenceProvider,t,n,!0,i),v("ref.title","References"))})}});gn(class extends yFe{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:"editor.action.referenceSearch.trigger",title:{value:v("references.action.label","Peek References"),original:"Peek References"},precondition:Ee.and(W.hasReferenceProvider,Ro.notInPeekEditor,W.isInWalkThroughSnippet.toNegated()),menu:{id:K.EditorContextPeek,group:"peek",order:6}})}_getLocationModel(e,t,n,i){return _l(this,void 0,void 0,function*(){return new ds(yield hR(e.referenceProvider,t,n,!1,i),v("ref.title","References"))})}});class cmt extends Ba{constructor(e,t,n){super(e,{id:"editor.action.goToLocation",title:{value:v("label.generic","Go to Any Symbol"),original:"Go to Any Symbol"},precondition:Ee.and(Ro.notInPeekEditor,W.isInWalkThroughSnippet.toNegated())}),this._references=t,this._gotoMultipleBehaviour=n}_getLocationModel(e,t,n,i){return _l(this,void 0,void 0,function*(){return new ds(this._references,v("generic.title","Locations"))})}_getNoResultFoundMessage(e){return e&&v("generic.noResult","No results for '{0}'",e.word)||""}_getGoToPreference(e){var t;return(t=this._gotoMultipleBehaviour)!==null&&t!==void 0?t:e.getOption(58).multipleReferences}_getAlternativeCommand(){return""}}ru.registerCommand({id:"editor.action.goToLocations",description:{description:"Go to locations from a position in a file",args:[{name:"uri",description:"The text document in which to start",constraint:dt},{name:"position",description:"The position at which to start",constraint:ee.isIPosition},{name:"locations",description:"An array of locations.",constraint:Array},{name:"multiple",description:"Define what to do when having multiple results, either `peek`, `gotoAndPeek`, or `goto"},{name:"noResultsMessage",description:"Human readable message that shows when locations is empty."}]},handler:(u,e,t,n,i,r,a)=>_l(void 0,void 0,void 0,function*(){Ru(dt.isUri(e)),Ru(ee.isIPosition(t)),Ru(Array.isArray(n)),Ru(typeof i>"u"||typeof i=="string"),Ru(typeof a>"u"||typeof a=="boolean");const o=u.get(Cu),s=yield o.openCodeEditor({resource:e},o.getFocusedCodeEditor());if(M1(s))return s.setPosition(t),s.revealPositionInCenterIfOutsideViewport(t,0),s.invokeWithinContext(l=>{const c=new class extends cmt{_getNoResultFoundMessage(d){return r||super._getNoResultFoundMessage(d)}}({muteMessage:!r,openInPeek:!!a,openToSide:!1},n,i);l.get(mt).invokeFunction(c.run.bind(c),s)})})});ru.registerCommand({id:"editor.action.peekLocations",description:{description:"Peek locations from a position in a file",args:[{name:"uri",description:"The text document in which to start",constraint:dt},{name:"position",description:"The position at which to start",constraint:ee.isIPosition},{name:"locations",description:"An array of locations.",constraint:Array},{name:"multiple",description:"Define what to do when having multiple results, either `peek`, `gotoAndPeek`, or `goto"}]},handler:(u,e,t,n,i)=>_l(void 0,void 0,void 0,function*(){u.get(ni).executeCommand("editor.action.goToLocations",e,t,n,i,void 0,!0)})});ru.registerCommand({id:"editor.action.findReferences",handler:(u,e,t)=>{Ru(dt.isUri(e)),Ru(ee.isIPosition(t));const n=u.get(We),i=u.get(Cu);return i.openCodeEditor({resource:e},i.getFocusedCodeEditor()).then(r=>{if(!M1(r)||!r.hasModel())return;const a=Ym.get(r);if(!a)return;const o=Ui(l=>hR(n.referenceProvider,r.getModel(),ee.lift(t),!1,l).then(c=>new ds(c,v("ref.title","References")))),s=new j(t.lineNumber,t.column,t.lineNumber,t.column);return Promise.resolve(a.toggleWidget(s,o,!1))})}});ru.registerCommandAlias("editor.action.showReferences","editor.action.peekLocations");var dmt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},_H=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},Ble=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})},Bb;let W3=Bb=class{constructor(e,t,n,i){this.textModelResolverService=t,this.languageService=n,this.languageFeaturesService=i,this.toUnhook=new pe,this.toUnhookForKeyboard=new pe,this.currentWordAtPosition=null,this.previousPromise=null,this.editor=e,this.linkDecorations=this.editor.createDecorationsCollection();const r=new rR(e);this.toUnhook.add(r),this.toUnhook.add(r.onMouseMoveOrRelevantKeyDown(([a,o])=>{this.startFindDefinitionFromMouse(a,o??void 0)})),this.toUnhook.add(r.onExecute(a=>{this.isEnabled(a)&&this.gotoDefinition(a.target.position,a.hasSideBySideModifier).catch(o=>{zt(o)}).finally(()=>{this.removeLinkDecorations()})})),this.toUnhook.add(r.onCancel(()=>{this.removeLinkDecorations(),this.currentWordAtPosition=null}))}static get(e){return e.getContribution(Bb.ID)}startFindDefinitionFromCursor(e){return Ble(this,void 0,void 0,function*(){yield this.startFindDefinition(e),this.toUnhookForKeyboard.add(this.editor.onDidChangeCursorPosition(()=>{this.currentWordAtPosition=null,this.removeLinkDecorations(),this.toUnhookForKeyboard.clear()})),this.toUnhookForKeyboard.add(this.editor.onKeyDown(t=>{t&&(this.currentWordAtPosition=null,this.removeLinkDecorations(),this.toUnhookForKeyboard.clear())}))})}startFindDefinitionFromMouse(e,t){if(e.target.type===9&&this.linkDecorations.length>0)return;if(!this.editor.hasModel()||!this.isEnabled(e,t)){this.currentWordAtPosition=null,this.removeLinkDecorations();return}const n=e.target.position;this.startFindDefinition(n)}startFindDefinition(e){var t;return Ble(this,void 0,void 0,function*(){this.toUnhookForKeyboard.clear();const n=e?(t=this.editor.getModel())===null||t===void 0?void 0:t.getWordAtPosition(e):null;if(!n){this.currentWordAtPosition=null,this.removeLinkDecorations();return}if(this.currentWordAtPosition&&this.currentWordAtPosition.startColumn===n.startColumn&&this.currentWordAtPosition.endColumn===n.endColumn&&this.currentWordAtPosition.word===n.word)return;this.currentWordAtPosition=n;const i=new Z2e(this.editor,15);this.previousPromise&&(this.previousPromise.cancel(),this.previousPromise=null),this.previousPromise=Ui(o=>this.findDefinition(e,o));let r;try{r=yield this.previousPromise}catch(o){zt(o);return}if(!r||!r.length||!i.validate(this.editor)){this.removeLinkDecorations();return}const a=r[0].originSelectionRange?j.lift(r[0].originSelectionRange):new j(e.lineNumber,n.startColumn,e.lineNumber,n.endColumn);if(r.length>1){let o=a;for(const{originSelectionRange:s}of r)s&&(o=j.plusRange(o,s));this.addDecoration(o,new Zr().appendText(v("multipleResults","Click to show {0} definitions.",r.length)))}else{const o=r[0];if(!o.uri)return;this.textModelResolverService.createModelReference(o.uri).then(s=>{if(!s.object||!s.object.textEditorModel){s.dispose();return}const{object:{textEditorModel:l}}=s,{startLineNumber:c}=o.range;if(c<1||c>l.getLineCount()){s.dispose();return}const d=this.getPreviewValue(l,c,o),h=this.languageService.guessLanguageIdByFilepathOrFirstLine(l.uri);this.addDecoration(a,d?new Zr().appendCodeblock(h||"",d):void 0),s.dispose()})}})}getPreviewValue(e,t,n){let i=n.range;return i.endLineNumber-i.startLineNumber>=Bb.MAX_SOURCE_PREVIEW_LINES&&(i=this.getPreviewRangeBasedOnIndentation(e,t)),this.stripIndentationFromPreviewRange(e,t,i)}stripIndentationFromPreviewRange(e,t,n){let r=e.getLineFirstNonWhitespaceColumn(t);for(let o=t+1;o{const i=!t&&this.editor.getOption(87)&&!this.isInPeekEditor(n);return new IA({openToSide:t,openInPeek:i,muteMessage:!0},{title:{value:"",original:""},id:"",precondition:void 0}).run(n)})}isInPeekEditor(e){const t=e.get(pt);return Ro.inPeekEditor.getValue(t)}dispose(){this.toUnhook.dispose(),this.toUnhookForKeyboard.dispose()}};W3.ID="editor.contrib.gotodefinitionatposition";W3.MAX_SOURCE_PREVIEW_LINES=8;W3=Bb=dmt([_H(1,Vo),_H(2,vn),_H(3,We)],W3);fu(W3.ID,W3,2);const O9=ve;class AFe extends ne{constructor(){super(),this.containerDomNode=document.createElement("div"),this.containerDomNode.className="monaco-hover",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 EA(this.contentsDomNode,{consumeMouseWheelIfScrollbarIsNeeded:!0})),this.containerDomNode.appendChild(this.scrollbar.getDomNode())}onContentsChanged(){this.scrollbar.scanDomNode()}}class ate extends ne{static render(e,t,n){return new ate(e,t,n)}constructor(e,t,n){super(),this.actionContainer=me(e,O9("div.action-container")),this.actionContainer.setAttribute("tabindex","0"),this.action=me(this.actionContainer,O9("a.action")),this.action.setAttribute("role","button"),t.iconClass&&me(this.action,O9(`span.icon.${t.iconClass}`));const i=me(this.action,O9("span"));i.textContent=n?`${t.label} (${n})`:t.label,this._register(ce(this.actionContainer,Me.CLICK,r=>{r.stopPropagation(),r.preventDefault(),t.run(this.actionContainer)})),this._register(ce(this.actionContainer,Me.KEY_DOWN,r=>{const a=new ln(r);(a.equals(3)||a.equals(10))&&(r.stopPropagation(),r.preventDefault(),t.run(this.actionContainer))})),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 hmt(u,e){return u&&e?v("acessibleViewHint","Inspect this in the accessible view with {0}.",e):u?v("acessibleViewHintNoKbOpen","Inspect this in the accessible view via the command Open Accessible View which is currently not triggerable via keybinding."):""}var Emt=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})},mmt=globalThis&&globalThis.__asyncValues||function(u){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=u[Symbol.asyncIterator],t;return e?e.call(u):(u=typeof __values=="function"?__values(u):u[Symbol.iterator](),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=u[r]&&function(a){return new Promise(function(o,s){a=u[r](a),i(o,s,a.done,a.value)})}}function i(r,a,o,s){Promise.resolve(s).then(function(l){r({value:l,done:o})},a)}};let gmt=class{constructor(e,t,n){this.value=e,this.isComplete=t,this.hasLoadingMessage=n}};class _Fe extends ne{constructor(e,t){super(),this._editor=e,this._computer=t,this._onResult=this._register(new Q),this.onResult=this._onResult.event,this._firstWaitScheduler=this._register(new Hu(()=>this._triggerAsyncComputation(),0)),this._secondWaitScheduler=this._register(new Hu(()=>this._triggerSyncComputation(),0)),this._loadingMessageScheduler=this._register(new Hu(()=>this._triggerLoadingMessage(),0)),this._state=0,this._asyncIterable=null,this._asyncIterableDone=!1,this._result=[]}dispose(){this._asyncIterable&&(this._asyncIterable.cancel(),this._asyncIterable=null),super.dispose()}get _hoverTime(){return this._editor.getOption(60).delay}get _firstWaitTime(){return this._hoverTime/2}get _secondWaitTime(){return this._hoverTime-this._firstWaitTime}get _loadingMessageTime(){return 3*this._hoverTime}_setState(e,t=!0){this._state=e,t&&this._fireResult()}_triggerAsyncComputation(){this._setState(2),this._secondWaitScheduler.schedule(this._secondWaitTime),this._computer.computeAsync?(this._asyncIterableDone=!1,this._asyncIterable=gZe(e=>this._computer.computeAsync(e)),Emt(this,void 0,void 0,function*(){var e,t,n,i;try{try{for(var r=!0,a=mmt(this._asyncIterable),o;o=yield a.next(),e=o.done,!e;r=!0){i=o.value,r=!1;const s=i;s&&(this._result.push(s),this._fireResult())}}catch(s){t={error:s}}finally{try{!r&&!e&&(n=a.return)&&(yield n.call(a))}finally{if(t)throw t.error}}this._asyncIterableDone=!0,(this._state===3||this._state===4)&&this._setState(0)}catch(s){zt(s)}})):this._asyncIterableDone=!0}_triggerSyncComputation(){this._computer.computeSync&&(this._result=this._result.concat(this._computer.computeSync())),this._setState(this._asyncIterableDone?0:3)}_triggerLoadingMessage(){this._state===3&&this._setState(4)}_fireResult(){if(this._state===1||this._state===2)return;const e=this._state===0,t=this._state===4;this._onResult.fire(new gmt(this._result.slice(0),e,t))}start(e){if(e===0)this._state===0&&(this._setState(1),this._firstWaitScheduler.schedule(this._firstWaitTime),this._loadingMessageScheduler.schedule(this._loadingMessageTime));else switch(this._state){case 0:this._triggerAsyncComputation(),this._secondWaitScheduler.cancel(),this._triggerSyncComputation();break;case 2:this._secondWaitScheduler.cancel(),this._triggerSyncComputation();break}}cancel(){this._firstWaitScheduler.cancel(),this._secondWaitScheduler.cancel(),this._loadingMessageScheduler.cancel(),this._asyncIterable&&(this._asyncIterable.cancel(),this._asyncIterable=null),this._result=[],this._setState(0,!1)}}class SH{constructor(e,t,n,i){this.priority=e,this.range=t,this.initialMousePosX=n,this.initialMousePosY=i,this.type=1}equals(e){return e.type===1&&this.range.equalsRange(e.range)}canAdoptVisibleHover(e,t){return e.type===1&&t.lineNumber===this.range.startLineNumber}}class g8{constructor(e,t,n,i,r,a){this.priority=e,this.owner=t,this.range=n,this.initialMousePosX=i,this.initialMousePosY=r,this.supportsMarkerHover=a,this.type=2}equals(e){return e.type===2&&this.owner===e.owner}canAdoptVisibleHover(e,t){return e.type===2&&this.owner===e.owner}}const $p=new class{constructor(){this._participants=[]}register(e){this._participants.push(e)}getAll(){return this._participants}};class ote{constructor(){this._onDidWillResize=new Q,this.onDidWillResize=this._onDidWillResize.event,this._onDidResize=new Q,this.onDidResize=this._onDidResize.event,this._sashListener=new pe,this._size=new pu(0,0),this._minSize=new pu(0,0),this._maxSize=new pu(Number.MAX_SAFE_INTEGER,Number.MAX_SAFE_INTEGER),this.domNode=document.createElement("div"),this._eastSash=new oa(this.domNode,{getVerticalSashLeft:()=>this._size.width},{orientation:0}),this._westSash=new oa(this.domNode,{getVerticalSashLeft:()=>0},{orientation:0}),this._northSash=new oa(this.domNode,{getHorizontalSashTop:()=>0},{orientation:1,orthogonalEdge:pw.North}),this._southSash=new oa(this.domNode,{getHorizontalSashTop:()=>this._size.height},{orientation:1,orthogonalEdge:pw.South}),this._northSash.orthogonalStartSash=this._westSash,this._northSash.orthogonalEndSash=this._eastSash,this._southSash.orthogonalStartSash=this._westSash,this._southSash.orthogonalEndSash=this._eastSash;let e,t=0,n=0;this._sashListener.add(Ne.any(this._northSash.onDidStart,this._eastSash.onDidStart,this._southSash.onDidStart,this._westSash.onDidStart)(()=>{e===void 0&&(this._onDidWillResize.fire(),e=this._size,t=0,n=0)})),this._sashListener.add(Ne.any(this._northSash.onDidEnd,this._eastSash.onDidEnd,this._southSash.onDidEnd,this._westSash.onDidEnd)(()=>{e!==void 0&&(e=void 0,t=0,n=0,this._onDidResize.fire({dimension:this._size,done:!0}))})),this._sashListener.add(this._eastSash.onDidChange(i=>{e&&(n=i.currentX-i.startX,this.layout(e.height+t,e.width+n),this._onDidResize.fire({dimension:this._size,done:!1,east:!0}))})),this._sashListener.add(this._westSash.onDidChange(i=>{e&&(n=-(i.currentX-i.startX),this.layout(e.height+t,e.width+n),this._onDidResize.fire({dimension:this._size,done:!1,west:!0}))})),this._sashListener.add(this._northSash.onDidChange(i=>{e&&(t=-(i.currentY-i.startY),this.layout(e.height+t,e.width+n),this._onDidResize.fire({dimension:this._size,done:!1,north:!0}))})),this._sashListener.add(this._southSash.onDidChange(i=>{e&&(t=i.currentY-i.startY,this.layout(e.height+t,e.width+n),this._onDidResize.fire({dimension:this._size,done:!1,south:!0}))})),this._sashListener.add(Ne.any(this._eastSash.onDidReset,this._westSash.onDidReset)(i=>{this._preferredSize&&(this.layout(this._size.height,this._preferredSize.width),this._onDidResize.fire({dimension:this._size,done:!0}))})),this._sashListener.add(Ne.any(this._northSash.onDidReset,this._southSash.onDidReset)(i=>{this._preferredSize&&(this.layout(this._preferredSize.height,this._size.width),this._onDidResize.fire({dimension:this._size,done:!0}))}))}dispose(){this._northSash.dispose(),this._southSash.dispose(),this._eastSash.dispose(),this._westSash.dispose(),this._sashListener.dispose(),this._onDidResize.dispose(),this._onDidWillResize.dispose(),this.domNode.remove()}enableSashes(e,t,n,i){this._northSash.state=e?3:0,this._eastSash.state=t?3:0,this._southSash.state=n?3:0,this._westSash.state=i?3:0}layout(e=this.size.height,t=this.size.width){const{height:n,width:i}=this._minSize,{height:r,width:a}=this._maxSize;e=Math.max(n,Math.min(r,e)),t=Math.max(i,Math.min(a,t));const o=new pu(t,e);pu.equals(o,this._size)||(this.domNode.style.height=e+"px",this.domNode.style.width=t+"px",this._size=o,this._northSash.layout(),this._eastSash.layout(),this._southSash.layout(),this._westSash.layout())}clearSashHoverState(){this._eastSash.clearSashHoverState(),this._westSash.clearSashHoverState(),this._northSash.clearSashHoverState(),this._southSash.clearSashHoverState()}get size(){return this._size}set maxSize(e){this._maxSize=e}get maxSize(){return this._maxSize}set minSize(e){this._minSize=e}get minSize(){return this._minSize}set preferredSize(e){this._preferredSize=e}get preferredSize(){return this._preferredSize}}const fmt=30,pmt=24;class Dmt extends ne{constructor(e,t=new pu(10,10)){super(),this._editor=e,this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._resizableNode=this._register(new ote),this._contentPosition=null,this._isResizing=!1,this._resizableNode.domNode.style.position="absolute",this._resizableNode.minSize=pu.lift(t),this._resizableNode.layout(t.height,t.width),this._resizableNode.enableSashes(!0,!0,!0,!0),this._register(this._resizableNode.onDidResize(n=>{this._resize(new pu(n.dimension.width,n.dimension.height)),n.done&&(this._isResizing=!1)})),this._register(this._resizableNode.onDidWillResize(()=>{this._isResizing=!0}))}get isResizing(){return this._isResizing}getDomNode(){return this._resizableNode.domNode}getPosition(){return this._contentPosition}get position(){var e;return!((e=this._contentPosition)===null||e===void 0)&&e.position?ee.lift(this._contentPosition.position):void 0}_availableVerticalSpaceAbove(e){const t=this._editor.getDomNode(),n=this._editor.getScrolledVisiblePosition(e);return!t||!n?void 0:ji(t).top+n.top-fmt}_availableVerticalSpaceBelow(e){const t=this._editor.getDomNode(),n=this._editor.getScrolledVisiblePosition(e);if(!t||!n)return;const i=ji(t),r=c6(t.ownerDocument.body),a=i.top+n.top+n.height;return r.height-a-pmt}_findPositionPreference(e,t){var n,i;const r=Math.min((n=this._availableVerticalSpaceBelow(t))!==null&&n!==void 0?n:1/0,e),a=Math.min((i=this._availableVerticalSpaceAbove(t))!==null&&i!==void 0?i:1/0,e),o=Math.min(Math.max(a,r),e),s=Math.min(e,o);let l;return this._editor.getOption(60).above?l=s<=a?1:2:l=s<=r?2:1,l===1?this._resizableNode.enableSashes(!0,!0,!1,!1):this._resizableNode.enableSashes(!1,!0,!0,!1),l}_resize(e){this._resizableNode.layout(e.height,e.width)}}var ste=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},Wf=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},f8,Bd;const wle=ve;let jw=f8=class extends ne{constructor(e,t,n){super(),this._editor=e,this._instantiationService=t,this._keybindingService=n,this._currentResult=null,this._widget=this._register(this._instantiationService.createInstance(lm,this._editor)),this._participants=[];for(const i of $p.getAll())this._participants.push(this._instantiationService.createInstance(i,this._editor));this._participants.sort((i,r)=>i.hoverOrdinal-r.hoverOrdinal),this._computer=new Vw(this._editor,this._participants),this._hoverOperation=this._register(new _Fe(this._editor,this._computer)),this._register(this._hoverOperation.onResult(i=>{if(!this._computer.anchor)return;const r=i.hasLoadingMessage?this._addLoadingMessage(i.value):i.value;this._withResult(new SFe(this._computer.anchor,r,i.isComplete))})),this._register(xi(this._widget.getDomNode(),"keydown",i=>{i.equals(9)&&this.hide()})),this._register(qn.onDidChange(()=>{this._widget.position&&this._currentResult&&this._setCurrentResult(this._currentResult)}))}get widget(){return this._widget}maybeShowAt(e){if(this._widget.isResizing)return!0;const t=[];for(const i of this._participants)if(i.suggestHoverAnchor){const r=i.suggestHoverAnchor(e);r&&t.push(r)}const n=e.target;if(n.type===6&&t.push(new SH(0,n.range,e.event.posx,e.event.posy)),n.type===7){const i=this._editor.getOption(50).typicalHalfwidthCharacterWidth/2;!n.detail.isAfterLines&&typeof n.detail.horizontalDistanceToText=="number"&&n.detail.horizontalDistanceToTextr.priority-i.priority),this._startShowingOrUpdateHover(t[0],0,0,!1,e))}startShowingAtRange(e,t,n,i){this._startShowingOrUpdateHover(new SH(0,e,void 0,void 0),t,n,i,null)}_startShowingOrUpdateHover(e,t,n,i,r){return!this._widget.position||!this._currentResult?e?(this._startHoverOperationIfNecessary(e,t,n,i,!1),!0):!1:this._editor.getOption(60).sticky&&r&&this._widget.isMouseGettingCloser(r.event.posx,r.event.posy)?(e&&this._startHoverOperationIfNecessary(e,t,n,i,!0),!0):e?e&&this._currentResult.anchor.equals(e)?!0:e.canAdoptVisibleHover(this._currentResult.anchor,this._widget.position)?(this._setCurrentResult(this._currentResult.filter(e)),this._startHoverOperationIfNecessary(e,t,n,i,!1),!0):(this._setCurrentResult(null),this._startHoverOperationIfNecessary(e,t,n,i,!1),!0):(this._setCurrentResult(null),!1)}_startHoverOperationIfNecessary(e,t,n,i,r){this._computer.anchor&&this._computer.anchor.equals(e)||(this._hoverOperation.cancel(),this._computer.anchor=e,this._computer.shouldFocus=i,this._computer.source=n,this._computer.insistOnKeepingHoverVisible=r,this._hoverOperation.start(t))}_setCurrentResult(e){this._currentResult!==e&&(e&&e.messages.length===0&&(e=null),this._currentResult=e,this._currentResult?this._renderMessages(this._currentResult.anchor,this._currentResult.messages):this._widget.hide())}hide(){this._computer.anchor=null,this._hoverOperation.cancel(),this._setCurrentResult(null)}get isColorPickerVisible(){return this._widget.isColorPickerVisible}get isVisibleFromKeyboard(){return this._widget.isVisibleFromKeyboard}get isVisible(){return this._widget.isVisible}get isFocused(){return this._widget.isFocused}get isResizing(){return this._widget.isResizing}containsNode(e){return e?this._widget.getDomNode().contains(e):!1}_addLoadingMessage(e){if(this._computer.anchor){for(const t of this._participants)if(t.createLoadingMessage){const n=t.createLoadingMessage(this._computer.anchor);if(n)return e.slice(0).concat([n])}}return e}_withResult(e){this._widget.position&&this._currentResult&&this._currentResult.isComplete&&(!e.isComplete||this._computer.insistOnKeepingHoverVisible&&e.messages.length===0)||this._setCurrentResult(e)}_renderMessages(e,t){const{showAtPosition:n,showAtSecondaryPosition:i,highlightRange:r}=f8.computeHoverRanges(this._editor,e.range,t),a=new pe,o=a.add(new Hw(this._keybindingService)),s=document.createDocumentFragment();let l=null;const c={fragment:s,statusBar:o,setColorPicker:h=>l=h,onContentsChanged:()=>this._widget.onContentsChanged(),setMinimumDimensions:h=>this._widget.setMinimumDimensions(h),hide:()=>this.hide()};for(const h of this._participants){const E=t.filter(m=>m.owner===h);E.length>0&&a.add(h.renderHoverParts(c,E))}const d=t.some(h=>h.isBeforeContent);if(o.hasContent&&s.appendChild(o.hoverElement),s.hasChildNodes()){if(r){const h=this._editor.createDecorationsCollection();h.set([{range:r,options:f8._DECORATION_OPTIONS}]),a.add(ft(()=>{h.clear()}))}this._widget.showAt(s,new vmt(l,n,i,this._editor.getOption(60).above,this._computer.shouldFocus,this._computer.source,d,e.initialMousePosX,e.initialMousePosY,a))}else a.dispose()}static computeHoverRanges(e,t,n){let i=1;if(e.hasModel()){const l=e._getViewModel(),c=l.coordinatesConverter,d=c.convertModelRangeToViewRange(t),h=new ee(d.startLineNumber,l.getLineMinColumn(d.startLineNumber));i=c.convertViewPositionToModelPosition(h).column}const r=t.startLineNumber;let a=t.startColumn,o=n[0].range,s=null;for(const l of n)o=j.plusRange(o,l.range),l.range.startLineNumber===r&&l.range.endLineNumber===r&&(a=Math.max(Math.min(a,l.range.startColumn),i)),l.forceShowAtRange&&(s=l.range);return{showAtPosition:s?s.getStartPosition():new ee(r,t.startColumn),showAtSecondaryPosition:s?s.getStartPosition():new ee(r,a),highlightRange:o}}focus(){this._widget.focus()}scrollUp(){this._widget.scrollUp()}scrollDown(){this._widget.scrollDown()}scrollLeft(){this._widget.scrollLeft()}scrollRight(){this._widget.scrollRight()}pageUp(){this._widget.pageUp()}pageDown(){this._widget.pageDown()}goToTop(){this._widget.goToTop()}goToBottom(){this._widget.goToBottom()}};jw._DECORATION_OPTIONS=Lt.register({description:"content-hover-highlight",className:"hoverHighlight"});jw=f8=ste([Wf(1,mt),Wf(2,qu)],jw);class SFe{constructor(e,t,n){this.anchor=e,this.messages=t,this.isComplete=n}filter(e){const t=this.messages.filter(n=>n.isValidForHoverAnchor(e));return t.length===this.messages.length?this:new xmt(this,this.anchor,t,this.isComplete)}}class xmt extends SFe{constructor(e,t,n,i){super(t,n,i),this.original=e}filter(e){return this.original.filter(e)}}class vmt{constructor(e,t,n,i,r,a,o,s,l,c){this.colorPicker=e,this.showAtPosition=t,this.showAtSecondaryPosition=n,this.preferAbove=i,this.stoleFocus=r,this.source=a,this.isBeforeContent=o,this.initialMousePosX=s,this.initialMousePosY=l,this.disposables=c,this.closestMouseDistance=void 0}}const Lle=30,BH=10,Cmt=6;let lm=Bd=class extends Dmt{get isColorPickerVisible(){var e;return!!(!((e=this._visibleData)===null||e===void 0)&&e.colorPicker)}get isVisibleFromKeyboard(){var e;return((e=this._visibleData)===null||e===void 0?void 0:e.source)===1}get isVisible(){var e;return(e=this._hoverVisibleKey.get())!==null&&e!==void 0?e:!1}get isFocused(){var e;return(e=this._hoverFocusedKey.get())!==null&&e!==void 0?e:!1}constructor(e,t,n,i,r){const a=e.getOption(66)+8,o=150,s=new pu(o,a);super(e,s),this._configurationService=n,this._accessibilityService=i,this._keybindingService=r,this._hover=this._register(new AFe),this._minimumSize=s,this._hoverVisibleKey=W.hoverVisible.bindTo(t),this._hoverFocusedKey=W.hoverFocused.bindTo(t),me(this._resizableNode.domNode,this._hover.containerDomNode),this._resizableNode.domNode.style.zIndex="50",this._register(this._editor.onDidLayoutChange(()=>this._layout())),this._register(this._editor.onDidChangeConfiguration(c=>{c.hasChanged(50)&&this._updateFont()}));const l=this._register(y1(this._resizableNode.domNode));this._register(l.onDidFocus(()=>{this._hoverFocusedKey.set(!0)})),this._register(l.onDidBlur(()=>{this._hoverFocusedKey.set(!1)})),this._setHoverData(void 0),this._layout(),this._editor.addContentWidget(this)}dispose(){var e;super.dispose(),(e=this._visibleData)===null||e===void 0||e.disposables.dispose(),this._editor.removeContentWidget(this)}getId(){return Bd.ID}static _applyDimensions(e,t,n){const i=typeof t=="number"?`${t}px`:t,r=typeof n=="number"?`${n}px`:n;e.style.width=i,e.style.height=r}_setContentsDomNodeDimensions(e,t){const n=this._hover.contentsDomNode;return Bd._applyDimensions(n,e,t)}_setContainerDomNodeDimensions(e,t){const n=this._hover.containerDomNode;return Bd._applyDimensions(n,e,t)}_setHoverWidgetDimensions(e,t){this._setContentsDomNodeDimensions(e,t),this._setContainerDomNodeDimensions(e,t),this._layoutContentWidget()}static _applyMaxDimensions(e,t,n){const i=typeof t=="number"?`${t}px`:t,r=typeof n=="number"?`${n}px`:n;e.style.maxWidth=i,e.style.maxHeight=r}_setHoverWidgetMaxDimensions(e,t){Bd._applyMaxDimensions(this._hover.contentsDomNode,e,t),Bd._applyMaxDimensions(this._hover.containerDomNode,e,t),this._hover.containerDomNode.style.setProperty("--vscode-hover-maxWidth",typeof e=="number"?`${e}px`:e),this._layoutContentWidget()}_hasHorizontalScrollbar(){const e=this._hover.scrollbar.getScrollDimensions();return e.scrollWidth>e.width}_adjustContentsBottomPadding(){const e=this._hover.contentsDomNode,t=`${this._hover.scrollbar.options.horizontalScrollbarSize}px`;e.style.paddingBottom!==t&&(e.style.paddingBottom=t)}_setAdjustedHoverWidgetDimensions(e){this._setHoverWidgetMaxDimensions("none","none");const t=e.width,n=e.height;this._setHoverWidgetDimensions(t,n),this._hasHorizontalScrollbar()&&(this._adjustContentsBottomPadding(),this._setContentsDomNodeDimensions(t,n-BH))}_updateResizableNodeMaxDimensions(){var e,t;const n=(e=this._findMaximumRenderingWidth())!==null&&e!==void 0?e:1/0,i=(t=this._findMaximumRenderingHeight())!==null&&t!==void 0?t:1/0;this._resizableNode.maxSize=new pu(n,i),this._setHoverWidgetMaxDimensions(n,i)}_resize(e){var t,n;Bd._lastDimensions=new pu(e.width,e.height),this._setAdjustedHoverWidgetDimensions(e),this._resizableNode.layout(e.height,e.width),this._updateResizableNodeMaxDimensions(),this._hover.scrollbar.scanDomNode(),this._editor.layoutContentWidget(this),(n=(t=this._visibleData)===null||t===void 0?void 0:t.colorPicker)===null||n===void 0||n.layout()}_findAvailableSpaceVertically(){var e;const t=(e=this._visibleData)===null||e===void 0?void 0:e.showAtPosition;if(t)return this._positionPreference===1?this._availableVerticalSpaceAbove(t):this._availableVerticalSpaceBelow(t)}_findMaximumRenderingHeight(){const e=this._findAvailableSpaceVertically();if(!e)return;let t=Cmt;return Array.from(this._hover.contentsDomNode.children).forEach(n=>{t+=n.clientHeight}),this._hasHorizontalScrollbar()&&(t+=BH),Math.min(e,t)}_isHoverTextOverflowing(){this._hover.containerDomNode.style.setProperty("--vscode-hover-whiteSpace","nowrap"),this._hover.containerDomNode.style.setProperty("--vscode-hover-sourceWhiteSpace","nowrap");const e=Array.from(this._hover.contentsDomNode.children).some(t=>t.scrollWidth>t.clientWidth);return this._hover.containerDomNode.style.removeProperty("--vscode-hover-whiteSpace"),this._hover.containerDomNode.style.removeProperty("--vscode-hover-sourceWhiteSpace"),e}_findMaximumRenderingWidth(){if(!this._editor||!this._editor.hasModel())return;const e=this._isHoverTextOverflowing(),t=typeof this._contentWidth>"u"?0:this._contentWidth-2;return e||this._hover.containerDomNode.clientWidth"u"||typeof this._visibleData.initialMousePosY>"u")return this._visibleData.initialMousePosX=e,this._visibleData.initialMousePosY=t,!1;const n=ji(this.getDomNode());typeof this._visibleData.closestMouseDistance>"u"&&(this._visibleData.closestMouseDistance=zle(this._visibleData.initialMousePosX,this._visibleData.initialMousePosY,n.left,n.top,n.width,n.height));const i=zle(e,t,n.left,n.top,n.width,n.height);return i>this._visibleData.closestMouseDistance+4?!1:(this._visibleData.closestMouseDistance=Math.min(this._visibleData.closestMouseDistance,i),!0)}_setHoverData(e){var t;(t=this._visibleData)===null||t===void 0||t.disposables.dispose(),this._visibleData=e,this._hoverVisibleKey.set(!!e),this._hover.containerDomNode.classList.toggle("hidden",!e)}_layout(){const{fontSize:e,lineHeight:t}=this._editor.getOption(50),n=this._hover.contentsDomNode;n.style.fontSize=`${e}px`,n.style.lineHeight=`${t/e}`,this._updateMaxDimensions()}_updateFont(){Array.prototype.slice.call(this._hover.contentsDomNode.getElementsByClassName("code")).forEach(t=>this._editor.applyFontInfo(t))}_updateContent(e){const t=this._hover.contentsDomNode;t.style.paddingBottom="",t.textContent="",t.appendChild(e)}_layoutContentWidget(){this._editor.layoutContentWidget(this),this._hover.onContentsChanged()}_updateMaxDimensions(){const e=Math.max(this._editor.getLayoutInfo().height/4,250,Bd._lastDimensions.height),t=Math.max(this._editor.getLayoutInfo().width*.66,500,Bd._lastDimensions.width);this._setHoverWidgetMaxDimensions(t,e)}_render(e,t){this._setHoverData(t),this._updateFont(),this._updateContent(e),this._updateMaxDimensions(),this.onContentsChanged(),this._editor.render()}getPosition(){var e;return this._visibleData?{position:this._visibleData.showAtPosition,secondaryPosition:this._visibleData.showAtSecondaryPosition,positionAffinity:this._visibleData.isBeforeContent?3:void 0,preference:[(e=this._positionPreference)!==null&&e!==void 0?e:1]}:null}showAt(e,t){var n,i,r,a;if(!this._editor||!this._editor.hasModel())return;this._render(e,t);const o=Rf(this._hover.containerDomNode),s=t.showAtPosition;this._positionPreference=(n=this._findPositionPreference(o,s))!==null&&n!==void 0?n:1,this.onContentsChanged(),t.stoleFocus&&this._hover.containerDomNode.focus(),(i=t.colorPicker)===null||i===void 0||i.layout();const l=hmt(this._configurationService.getValue("accessibility.verbosity.hover")===!0&&this._accessibilityService.isScreenReaderOptimized(),(a=(r=this._keybindingService.lookupKeybinding("editor.action.accessibleView"))===null||r===void 0?void 0:r.getAriaLabel())!==null&&a!==void 0?a:"");l&&(this._hover.contentsDomNode.ariaLabel=this._hover.contentsDomNode.textContent+", "+l)}hide(){if(!this._visibleData)return;const e=this._visibleData.stoleFocus||this._hoverFocusedKey.get();this._setHoverData(void 0),this._resizableNode.maxSize=new pu(1/0,1/0),this._resizableNode.clearSashHoverState(),this._hoverFocusedKey.set(!1),this._editor.layoutContentWidget(this),e&&this._editor.focus()}_removeConstraintsRenderNormally(){const e=this._editor.getLayoutInfo();this._resizableNode.layout(e.height,e.width),this._setHoverWidgetDimensions("auto","auto")}_adjustHoverHeightForScrollbar(e){var t;const n=this._hover.containerDomNode,i=this._hover.contentsDomNode,r=(t=this._findMaximumRenderingHeight())!==null&&t!==void 0?t:1/0;this._setContainerDomNodeDimensions(ko(n),Math.min(r,e)),this._setContentsDomNodeDimensions(ko(i),Math.min(r,e-BH))}setMinimumDimensions(e){this._minimumSize=new pu(Math.max(this._minimumSize.width,e.width),Math.max(this._minimumSize.height,e.height)),this._updateMinimumWidth()}_updateMinimumWidth(){const e=typeof this._contentWidth>"u"?this._minimumSize.width:Math.min(this._contentWidth,this._minimumSize.width);this._resizableNode.minSize=new pu(e,this._minimumSize.height)}onContentsChanged(){var e;this._removeConstraintsRenderNormally();const t=this._hover.containerDomNode;let n=Rf(t),i=ko(t);if(this._resizableNode.layout(n,i),this._setHoverWidgetDimensions(i,n),n=Rf(t),i=ko(t),this._contentWidth=i,this._updateMinimumWidth(),this._resizableNode.layout(n,i),this._hasHorizontalScrollbar()&&(this._adjustContentsBottomPadding(),this._adjustHoverHeightForScrollbar(n)),!((e=this._visibleData)===null||e===void 0)&&e.showAtPosition){const r=Rf(this._hover.containerDomNode);this._positionPreference=this._findPositionPreference(r,this._visibleData.showAtPosition)}this._layoutContentWidget()}focus(){this._hover.containerDomNode.focus()}scrollUp(){const e=this._hover.scrollbar.getScrollPosition().scrollTop,t=this._editor.getOption(50);this._hover.scrollbar.setScrollPosition({scrollTop:e-t.lineHeight})}scrollDown(){const e=this._hover.scrollbar.getScrollPosition().scrollTop,t=this._editor.getOption(50);this._hover.scrollbar.setScrollPosition({scrollTop:e+t.lineHeight})}scrollLeft(){const e=this._hover.scrollbar.getScrollPosition().scrollLeft;this._hover.scrollbar.setScrollPosition({scrollLeft:e-Lle})}scrollRight(){const e=this._hover.scrollbar.getScrollPosition().scrollLeft;this._hover.scrollbar.setScrollPosition({scrollLeft:e+Lle})}pageUp(){const e=this._hover.scrollbar.getScrollPosition().scrollTop,t=this._hover.scrollbar.getScrollDimensions().height;this._hover.scrollbar.setScrollPosition({scrollTop:e-t})}pageDown(){const e=this._hover.scrollbar.getScrollPosition().scrollTop,t=this._hover.scrollbar.getScrollDimensions().height;this._hover.scrollbar.setScrollPosition({scrollTop:e+t})}goToTop(){this._hover.scrollbar.setScrollPosition({scrollTop:0})}goToBottom(){this._hover.scrollbar.setScrollPosition({scrollTop:this._hover.scrollbar.getScrollDimensions().scrollHeight})}};lm.ID="editor.contrib.resizableContentHoverWidget";lm._lastDimensions=new pu(0,0);lm=Bd=ste([Wf(1,pt),Wf(2,tu),Wf(3,k4),Wf(4,qu)],lm);let Hw=class extends ne{get hasContent(){return this._hasContent}constructor(e){super(),this._keybindingService=e,this._hasContent=!1,this.hoverElement=wle("div.hover-row.status-bar"),this.actionsElement=me(this.hoverElement,wle("div.actions"))}addAction(e){const t=this._keybindingService.lookupKeybinding(e.commandId),n=t?t.getLabel():null;return this._hasContent=!0,this._register(ate.render(this.actionsElement,e,n))}append(e){const t=me(this.actionsElement,e);return this._hasContent=!0,t}};Hw=ste([Wf(0,qu)],Hw);class Vw{get anchor(){return this._anchor}set anchor(e){this._anchor=e}get shouldFocus(){return this._shouldFocus}set shouldFocus(e){this._shouldFocus=e}get source(){return this._source}set source(e){this._source=e}get insistOnKeepingHoverVisible(){return this._insistOnKeepingHoverVisible}set insistOnKeepingHoverVisible(e){this._insistOnKeepingHoverVisible=e}constructor(e,t){this._editor=e,this._participants=t,this._anchor=null,this._shouldFocus=!1,this._source=0,this._insistOnKeepingHoverVisible=!1}static _getLineDecorations(e,t){if(t.type!==1&&!t.supportsMarkerHover)return[];const n=e.getModel(),i=t.range.startLineNumber;if(i>n.getLineCount())return[];const r=n.getLineMaxColumn(i);return e.getLineDecorations(i).filter(a=>{if(a.options.isWholeLine)return!0;const o=a.range.startLineNumber===i?a.range.startColumn:1,s=a.range.endLineNumber===i?a.range.endColumn:r;if(a.options.showIfCollapsed){if(o>t.range.startColumn+1||t.range.endColumn-1>s)return!1}else if(o>t.range.startColumn||t.range.endColumn>s)return!1;return!0})}computeAsync(e){const t=this._anchor;if(!this._editor.hasModel()||!t)return _i.EMPTY;const n=Vw._getLineDecorations(this._editor,t);return _i.merge(this._participants.map(i=>i.computeAsync?i.computeAsync(t,n,e):_i.EMPTY))}computeSync(){if(!this._editor.hasModel()||!this._anchor)return[];const e=Vw._getLineDecorations(this._editor,this._anchor);let t=[];for(const n of this._participants)t=t.concat(n.computeSync(this._anchor,e));return b1(t)}}function zle(u,e,t,n,i,r){const a=t+i/2,o=n+r/2,s=Math.max(Math.abs(u-a)-i/2,0),l=Math.max(Math.abs(e-o)-r/2,0);return Math.sqrt(s*s+l*l)}const Mle=ve;class bx extends ne{constructor(e,t,n){super(),this._renderDisposeables=this._register(new pe),this._editor=e,this._isVisible=!1,this._messages=[],this._hover=this._register(new AFe),this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible),this._markdownRenderer=this._register(new h4({editor:this._editor},t,n)),this._computer=new bmt(this._editor),this._hoverOperation=this._register(new _Fe(this._editor,this._computer)),this._register(this._hoverOperation.onResult(i=>{this._withResult(i.value)})),this._register(this._editor.onDidChangeModelDecorations(()=>this._onModelDecorationsChanged())),this._register(this._editor.onDidChangeConfiguration(i=>{i.hasChanged(50)&&this._updateFont()})),this._editor.addOverlayWidget(this)}dispose(){this._editor.removeOverlayWidget(this),super.dispose()}getId(){return bx.ID}getDomNode(){return this._hover.containerDomNode}getPosition(){return null}_updateFont(){Array.prototype.slice.call(this._hover.contentsDomNode.getElementsByClassName("code")).forEach(t=>this._editor.applyFontInfo(t))}_onModelDecorationsChanged(){this._isVisible&&(this._hoverOperation.cancel(),this._hoverOperation.start(0))}startShowingAt(e){this._computer.lineNumber!==e&&(this._hoverOperation.cancel(),this.hide(),this._computer.lineNumber=e,this._hoverOperation.start(0))}hide(){this._computer.lineNumber=-1,this._hoverOperation.cancel(),this._isVisible&&(this._isVisible=!1,this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible))}_withResult(e){this._messages=e,this._messages.length>0?this._renderMessages(this._computer.lineNumber,this._messages):this.hide()}_renderMessages(e,t){this._renderDisposeables.clear();const n=document.createDocumentFragment();for(const i of t){const r=Mle("div.hover-row.markdown-hover"),a=me(r,Mle("div.hover-contents")),o=this._renderDisposeables.add(this._markdownRenderer.render(i.value));a.appendChild(o.element),n.appendChild(r)}this._updateContents(n),this._showAt(e)}_updateContents(e){this._hover.contentsDomNode.textContent="",this._hover.contentsDomNode.appendChild(e),this._updateFont()}_showAt(e){this._isVisible||(this._isVisible=!0,this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible));const t=this._editor.getLayoutInfo(),n=this._editor.getTopForLineNumber(e),i=this._editor.getScrollTop(),r=this._editor.getOption(66),a=this._hover.containerDomNode.clientHeight,o=n-i-(a-r)/2;this._hover.containerDomNode.style.left=`${t.glyphMarginLeft+t.glyphMarginWidth}px`,this._hover.containerDomNode.style.top=`${Math.max(Math.round(o),0)}px`}}bx.ID="editor.contrib.modesGlyphHoverWidget";class bmt{get lineNumber(){return this._lineNumber}set lineNumber(e){this._lineNumber=e}constructor(e){this._editor=e,this._lineNumber=-1}computeSync(){const e=i=>({value:i}),t=this._editor.getLineDecorations(this._lineNumber),n=[];if(!t)return n;for(const i of t){if(!i.options.glyphMarginClassName)continue;const r=i.options.glyphMarginHoverMessage;!r||Ev(r)||n.push(...SQ(r).map(e))}return n}}var kmt=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};class Fmt{constructor(e,t,n){this.provider=e,this.hover=t,this.ordinal=n}}function ymt(u,e,t,n,i){return kmt(this,void 0,void 0,function*(){try{const r=yield Promise.resolve(u.provideHover(t,n,i));if(r&&_mt(r))return new Fmt(u,r,e)}catch(r){Mi(r)}})}function lte(u,e,t,n){const r=u.ordered(e).map((a,o)=>ymt(a,o,e,t,n));return _i.fromPromises(r).coalesce()}function Amt(u,e,t,n){return lte(u,e,t,n).map(i=>i.hover).toPromise()}W1("_executeHoverProvider",(u,e,t)=>{const n=u.get(We);return Amt(n.hoverProvider,e,t,Kt.None)});function _mt(u){const e=typeof u.range<"u",t=typeof u.contents<"u"&&u.contents&&u.contents.length>0;return e&&t}var Smt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},j9=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}};const Tle=ve;class Sc{constructor(e,t,n,i,r){this.owner=e,this.range=t,this.contents=n,this.isBeforeContent=i,this.ordinal=r}isValidForHoverAnchor(e){return e.type===1&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}}let $w=class{constructor(e,t,n,i,r){this._editor=e,this._languageService=t,this._openerService=n,this._configurationService=i,this._languageFeaturesService=r,this.hoverOrdinal=3}createLoadingMessage(e){return new Sc(this,e.range,[new Zr().appendText(v("modesContentHover.loading","Loading..."))],!1,2e3)}computeSync(e,t){if(!this._editor.hasModel()||e.type!==1)return[];const n=this._editor.getModel(),i=e.range.startLineNumber,r=n.getLineMaxColumn(i),a=[];let o=1e3;const s=n.getLineLength(i),l=n.getLanguageIdAtPosition(e.range.startLineNumber,e.range.startColumn),c=this._editor.getOption(116),d=this._configurationService.getValue("editor.maxTokenizationLineLength",{overrideIdentifier:l});let h=!1;c>=0&&s>c&&e.range.startColumn>=c&&(h=!0,a.push(new Sc(this,e.range,[{value:v("stopped rendering","Rendering paused for long line for performance reasons. This can be configured via `editor.stopRenderingLineAfter`.")}],!1,o++))),!h&&typeof d=="number"&&s>=d&&a.push(new Sc(this,e.range,[{value:v("too many characters","Tokenization is skipped for long lines for performance reasons. This can be configured via `editor.maxTokenizationLineLength`.")}],!1,o++));let E=!1;for(const m of t){const g=m.range.startLineNumber===i?m.range.startColumn:1,f=m.range.endLineNumber===i?m.range.endColumn:r,p=m.options.hoverMessage;if(!p||Ev(p))continue;m.options.beforeContentClassName&&(E=!0);const D=new j(e.range.startLineNumber,g,e.range.startLineNumber,f);a.push(new Sc(this,D,SQ(p),E,o++))}return a}computeAsync(e,t,n){if(!this._editor.hasModel()||e.type!==1)return _i.EMPTY;const i=this._editor.getModel();if(!this._languageFeaturesService.hoverProvider.has(i))return _i.EMPTY;const r=new ee(e.range.startLineNumber,e.range.startColumn);return lte(this._languageFeaturesService.hoverProvider,i,r,n).filter(a=>!Ev(a.hover.contents)).map(a=>{const o=a.hover.range?j.lift(a.hover.range):e.range;return new Sc(this,o,a.hover.contents,!1,a.ordinal)})}renderHoverParts(e,t){return BFe(e,t,this._editor,this._languageService,this._openerService)}};$w=Smt([j9(1,vn),j9(2,Cs),j9(3,tu),j9(4,We)],$w);function BFe(u,e,t,n,i){e.sort((a,o)=>a.ordinal-o.ordinal);const r=new pe;for(const a of e)for(const o of a.contents){if(Ev(o))continue;const s=Tle("div.hover-row.markdown-hover"),l=me(s,Tle("div.hover-contents")),c=r.add(new h4({editor:t},n,i));r.add(c.onDidRenderAsync(()=>{l.className="hover-contents code-hover-contents",u.onContentsChanged()}));const d=r.add(c.render(o));l.appendChild(d.element),u.fragment.appendChild(s)}return r}var wFe=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},Kw=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}};class Nle{constructor(e,t,n){this.marker=e,this.index=t,this.total=n}}let ZU=class{constructor(e,t,n){this._markerService=t,this._configService=n,this._onDidChange=new Q,this.onDidChange=this._onDidChange.event,this._dispoables=new pe,this._markers=[],this._nextIdx=-1,dt.isUri(e)?this._resourceFilter=o=>o.toString()===e.toString():e&&(this._resourceFilter=e);const i=this._configService.getValue("problems.sortOrder"),r=(o,s)=>{let l=ok(o.resource.toString(),s.resource.toString());return l===0&&(i==="position"?l=j.compareRangesUsingStarts(o,s)||Yn.compare(o.severity,s.severity):l=Yn.compare(o.severity,s.severity)||j.compareRangesUsingStarts(o,s)),l},a=()=>{this._markers=this._markerService.read({resource:dt.isUri(e)?e:void 0,severities:Yn.Error|Yn.Warning|Yn.Info}),typeof e=="function"&&(this._markers=this._markers.filter(o=>this._resourceFilter(o.resource))),this._markers.sort(r)};a(),this._dispoables.add(t.onMarkerChanged(o=>{(!this._resourceFilter||o.some(s=>this._resourceFilter(s)))&&(a(),this._nextIdx=-1,this._onDidChange.fire())}))}dispose(){this._dispoables.dispose(),this._onDidChange.dispose()}matches(e){return!this._resourceFilter&&!e?!0:!this._resourceFilter||!e?!1:this._resourceFilter(e)}get selected(){const e=this._markers[this._nextIdx];return e&&new Nle(e,this._nextIdx+1,this._markers.length)}_initIdx(e,t,n){let i=!1,r=this._markers.findIndex(a=>a.resource.toString()===e.uri.toString());r<0&&(r=X2(this._markers,{resource:e.uri},(a,o)=>ok(a.resource.toString(),o.resource.toString())),r<0&&(r=~r));for(let a=r;ai.resource.toString()===e.toString());if(!(n<0)){for(;n=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},vD=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},XU;class wmt{constructor(e,t,n,i,r){this._openerService=i,this._labelService=r,this._lines=0,this._longestLineLength=0,this._relatedDiagnostics=new WeakMap,this._disposables=new pe,this._editor=t;const a=document.createElement("div");a.className="descriptioncontainer",this._messageBlock=document.createElement("div"),this._messageBlock.classList.add("message"),this._messageBlock.setAttribute("aria-live","assertive"),this._messageBlock.setAttribute("role","alert"),a.appendChild(this._messageBlock),this._relatedBlock=document.createElement("div"),a.appendChild(this._relatedBlock),this._disposables.add(xi(this._relatedBlock,"click",o=>{o.preventDefault();const s=this._relatedDiagnostics.get(o.target);s&&n(s)})),this._scrollable=new dCe(a,{horizontal:1,vertical:1,useShadows:!1,horizontalScrollbarSize:6,verticalScrollbarSize:6}),e.appendChild(this._scrollable.getDomNode()),this._disposables.add(this._scrollable.onScroll(o=>{a.style.left=`-${o.scrollLeft}px`,a.style.top=`-${o.scrollTop}px`})),this._disposables.add(this._scrollable)}dispose(){Su(this._disposables)}update(e){const{source:t,message:n,relatedInformation:i,code:r}=e;let a=((t==null?void 0:t.length)||0)+2;r&&(typeof r=="string"?a+=r.length:a+=r.value.length);const o=F1(n);this._lines=o.length,this._longestLineLength=0;for(const h of o)this._longestLineLength=Math.max(h.length+a,this._longestLineLength);Nr(this._messageBlock),this._messageBlock.setAttribute("aria-label",this.getAriaLabel(e)),this._editor.applyFontInfo(this._messageBlock);let s=this._messageBlock;for(const h of o)s=document.createElement("div"),s.innerText=h,h===""&&(s.style.height=this._messageBlock.style.lineHeight),this._messageBlock.appendChild(s);if(t||r){const h=document.createElement("span");if(h.classList.add("details"),s.appendChild(h),t){const E=document.createElement("span");E.innerText=t,E.classList.add("source"),h.appendChild(E)}if(r)if(typeof r=="string"){const E=document.createElement("span");E.innerText=`(${r})`,E.classList.add("code"),h.appendChild(E)}else{this._codeLink=ve("a.code-link"),this._codeLink.setAttribute("href",`${r.target.toString()}`),this._codeLink.onclick=m=>{this._openerService.open(r.target,{allowCommands:!0}),m.preventDefault(),m.stopPropagation()};const E=me(this._codeLink,ve("span"));E.innerText=r.value,h.appendChild(this._codeLink)}}if(Nr(this._relatedBlock),this._editor.applyFontInfo(this._relatedBlock),pa(i)){const h=this._relatedBlock.appendChild(document.createElement("div"));h.style.paddingTop=`${Math.floor(this._editor.getOption(66)*.66)}px`,this._lines+=1;for(const E of i){const m=document.createElement("div"),g=document.createElement("a");g.classList.add("filename"),g.innerText=`${this._labelService.getUriBasenameLabel(E.resource)}(${E.startLineNumber}, ${E.startColumn}): `,g.title=this._labelService.getUriLabel(E.resource),this._relatedDiagnostics.set(g,E);const f=document.createElement("span");f.innerText=E.message,m.appendChild(g),m.appendChild(f),this._lines+=1,h.appendChild(m)}}const l=this._editor.getOption(50),c=Math.ceil(l.typicalFullwidthCharacterWidth*this._longestLineLength*.75),d=l.lineHeight*this._lines;this._scrollable.setScrollDimensions({scrollWidth:c,scrollHeight:d})}layout(e,t){this._scrollable.getDomNode().style.height=`${e}px`,this._scrollable.getDomNode().style.width=`${t}px`,this._scrollable.setScrollDimensions({width:t,height:e})}getHeightInLines(){return Math.min(17,this._lines)}getAriaLabel(e){let t="";switch(e.severity){case Yn.Error:t=v("Error","Error");break;case Yn.Warning:t=v("Warning","Warning");break;case Yn.Info:t=v("Info","Info");break;case Yn.Hint:t=v("Hint","Hint");break}let n=v("marker aria","{0} at {1}. ",t,e.startLineNumber+":"+e.startColumn);const i=this._editor.getModel();return i&&e.startLineNumber<=i.getLineCount()&&e.startLineNumber>=1&&(n=`${i.getLineContent(e.startLineNumber)}, ${n}`),n}}let kv=XU=class extends Ow{constructor(e,t,n,i,r,a,o){super(e,{showArrow:!0,showFrame:!0,isAccessible:!0,frameWidth:1},r),this._themeService=t,this._openerService=n,this._menuService=i,this._contextKeyService=a,this._labelService=o,this._callOnDispose=new pe,this._onDidSelectRelatedInformation=new Q,this.onDidSelectRelatedInformation=this._onDidSelectRelatedInformation.event,this._severity=Yn.Warning,this._backgroundColor=ae.white,this._applyTheme(t.getColorTheme()),this._callOnDispose.add(t.onDidColorThemeChange(this._applyTheme.bind(this))),this.create()}_applyTheme(e){this._backgroundColor=e.getColor(Tmt);let t=eq,n=Lmt;this._severity===Yn.Warning?(t=p8,n=zmt):this._severity===Yn.Info&&(t=tq,n=Mmt);const i=e.getColor(t),r=e.getColor(n);this.style({arrowColor:i,frameColor:i,headerBackgroundColor:r,primaryHeadingColor:e.getColor(fFe),secondaryHeadingColor:e.getColor(pFe)})}_applyStyles(){this._parentContainer&&(this._parentContainer.style.backgroundColor=this._backgroundColor?this._backgroundColor.toString():""),super._applyStyles()}dispose(){this._callOnDispose.dispose(),super.dispose()}_fillHead(e){super._fillHead(e),this._disposables.add(this._actionbarWidget.actionRunner.onWillRun(i=>this.editor.focus()));const t=[],n=this._menuService.createMenu(XU.TitleMenu,this._contextKeyService);Wbe(n,void 0,t),this._actionbarWidget.push(t,{label:!1,icon:!0,index:0}),n.dispose()}_fillTitleIcon(e){this._icon=me(e,ve(""))}_fillBody(e){this._parentContainer=e,e.classList.add("marker-widget"),this._parentContainer.tabIndex=0,this._parentContainer.setAttribute("role","tooltip"),this._container=document.createElement("div"),e.appendChild(this._container),this._message=new wmt(this._container,this.editor,t=>this._onDidSelectRelatedInformation.fire(t),this._openerService,this._labelService),this._disposables.add(this._message)}show(){throw new Error("call showAtMarker")}showAtMarker(e,t,n){this._container.classList.remove("stale"),this._message.update(e),this._severity=e.severity,this._applyTheme(this._themeService.getColorTheme());const i=j.lift(e),r=this.editor.getPosition(),a=r&&i.containsPosition(r)?r:i.getStartPosition();super.show(a,this.computeRequiredHeight());const o=this.editor.getModel();if(o){const s=n>1?v("problems","{0} of {1} problems",t,n):v("change","{0} of {1} problem",t,n);this.setTitle(O0(o.uri),s)}this._icon.className=`codicon ${QU.className(Yn.toSeverity(this._severity))}`,this.editor.revealPositionNearTop(a,0),this.editor.focus()}updateMarker(e){this._container.classList.remove("stale"),this._message.update(e)}showStale(){this._container.classList.add("stale"),this._relayout()}_doLayoutBody(e,t){super._doLayoutBody(e,t),this._heightInPixel=e,this._message.layout(e,t),this._container.style.height=`${e}px`}_onWidth(e){this._message.layout(this._heightInPixel,e)}_relayout(){super._relayout(this.computeRequiredHeight())}computeRequiredHeight(){return 3+this._message.getHeightInLines()}};kv.TitleMenu=new K("gotoErrorTitleMenu");kv=XU=Bmt([vD(1,sr),vD(2,Cs),vD(3,$1),vD(4,mt),vD(5,pt),vD(6,cv)],kv);const Ple=yk(n1,BXe),Rle=yk(Hs,kk),Ile=yk(Mo,Fk),eq=q("editorMarkerNavigationError.background",{dark:Ple,light:Ple,hcDark:eu,hcLight:eu},v("editorMarkerNavigationError","Editor marker navigation widget error color.")),Lmt=q("editorMarkerNavigationError.headerBackground",{dark:tt(eq,.1),light:tt(eq,.1),hcDark:null,hcLight:null},v("editorMarkerNavigationErrorHeaderBackground","Editor marker navigation widget error heading background.")),p8=q("editorMarkerNavigationWarning.background",{dark:Rle,light:Rle,hcDark:eu,hcLight:eu},v("editorMarkerNavigationWarning","Editor marker navigation widget warning color.")),zmt=q("editorMarkerNavigationWarning.headerBackground",{dark:tt(p8,.1),light:tt(p8,.1),hcDark:"#0C141F",hcLight:tt(p8,.2)},v("editorMarkerNavigationWarningBackground","Editor marker navigation widget warning heading background.")),tq=q("editorMarkerNavigationInfo.background",{dark:Ile,light:Ile,hcDark:eu,hcLight:eu},v("editorMarkerNavigationInfo","Editor marker navigation widget info color.")),Mmt=q("editorMarkerNavigationInfo.headerBackground",{dark:tt(tq,.1),light:tt(tq,.1),hcDark:null,hcLight:null},v("editorMarkerNavigationInfoHeaderBackground","Editor marker navigation widget info heading background.")),Tmt=q("editorMarkerNavigation.background",{dark:rr,light:rr,hcDark:rr,hcLight:rr},v("editorMarkerNavigationBackground","Editor marker navigation widget background."));var Nmt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},H9=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},zFe=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})},wb;let Qm=wb=class{static get(e){return e.getContribution(wb.ID)}constructor(e,t,n,i,r){this._markerNavigationService=t,this._contextKeyService=n,this._editorService=i,this._instantiationService=r,this._sessionDispoables=new pe,this._editor=e,this._widgetVisible=MFe.bindTo(this._contextKeyService)}dispose(){this._cleanUp(),this._sessionDispoables.dispose()}_cleanUp(){this._widgetVisible.reset(),this._sessionDispoables.clear(),this._widget=void 0,this._model=void 0}_getOrCreateModel(e){if(this._model&&this._model.matches(e))return this._model;let t=!1;return this._model&&(t=!0,this._cleanUp()),this._model=this._markerNavigationService.getMarkerList(e),t&&this._model.move(!0,this._editor.getModel(),this._editor.getPosition()),this._widget=this._instantiationService.createInstance(kv,this._editor),this._widget.onDidClose(()=>this.close(),this,this._sessionDispoables),this._widgetVisible.set(!0),this._sessionDispoables.add(this._model),this._sessionDispoables.add(this._widget),this._sessionDispoables.add(this._editor.onDidChangeCursorPosition(n=>{var i,r,a;(!(!((i=this._model)===null||i===void 0)&&i.selected)||!j.containsPosition((r=this._model)===null||r===void 0?void 0:r.selected.marker,n.position))&&((a=this._model)===null||a===void 0||a.resetIndex())})),this._sessionDispoables.add(this._model.onDidChange(()=>{if(!this._widget||!this._widget.position||!this._model)return;const n=this._model.find(this._editor.getModel().uri,this._widget.position);n?this._widget.updateMarker(n.marker):this._widget.showStale()})),this._sessionDispoables.add(this._widget.onDidSelectRelatedInformation(n=>{this._editorService.openCodeEditor({resource:n.resource,options:{pinned:!0,revealIfOpened:!0,selection:j.lift(n).collapseToStart()}},this._editor),this.close(!1)})),this._sessionDispoables.add(this._editor.onDidChangeModel(()=>this._cleanUp())),this._model}close(e=!0){this._cleanUp(),e&&this._editor.focus()}showAtMarker(e){if(this._editor.hasModel()){const t=this._getOrCreateModel(this._editor.getModel().uri);t.resetIndex(),t.move(!0,this._editor.getModel(),new ee(e.startLineNumber,e.startColumn)),t.selected&&this._widget.showAtMarker(t.selected.marker,t.selected.index,t.selected.total)}}nagivate(e,t){var n,i;return zFe(this,void 0,void 0,function*(){if(this._editor.hasModel()){const r=this._getOrCreateModel(t?void 0:this._editor.getModel().uri);if(r.move(e,this._editor.getModel(),this._editor.getPosition()),!r.selected)return;if(r.selected.marker.resource.toString()!==this._editor.getModel().uri.toString()){this._cleanUp();const a=yield this._editorService.openCodeEditor({resource:r.selected.marker.resource,options:{pinned:!1,revealIfOpened:!0,selectionRevealType:2,selection:r.selected.marker}},this._editor);a&&((n=wb.get(a))===null||n===void 0||n.close(),(i=wb.get(a))===null||i===void 0||i.nagivate(e,t))}else this._widget.showAtMarker(r.selected.marker,r.selected.index,r.selected.total)}})}};Qm.ID="editor.contrib.markerController";Qm=wb=Nmt([H9(1,LFe),H9(2,pt),H9(3,Cu),H9(4,mt)],Qm);class ER extends $e{constructor(e,t,n){super(n),this._next=e,this._multiFile=t}run(e,t){var n;return zFe(this,void 0,void 0,function*(){t.hasModel()&&((n=Qm.get(t))===null||n===void 0||n.nagivate(this._next,this._multiFile))})}}class cm extends ER{constructor(){super(!0,!1,{id:cm.ID,label:cm.LABEL,alias:"Go to Next Problem (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:W.focus,primary:578,weight:100},menuOpts:{menuId:kv.TitleMenu,title:cm.LABEL,icon:hi("marker-navigation-next",we.arrowDown,v("nextMarkerIcon","Icon for goto next marker.")),group:"navigation",order:1}})}}cm.ID="editor.action.marker.next";cm.LABEL=v("markerAction.next.label","Go to Next Problem (Error, Warning, Info)");class c3 extends ER{constructor(){super(!1,!1,{id:c3.ID,label:c3.LABEL,alias:"Go to Previous Problem (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:W.focus,primary:1602,weight:100},menuOpts:{menuId:kv.TitleMenu,title:c3.LABEL,icon:hi("marker-navigation-previous",we.arrowUp,v("previousMarkerIcon","Icon for goto previous marker.")),group:"navigation",order:2}})}}c3.ID="editor.action.marker.prev";c3.LABEL=v("markerAction.previous.label","Go to Previous Problem (Error, Warning, Info)");class Pmt extends ER{constructor(){super(!0,!0,{id:"editor.action.marker.nextInFiles",label:v("markerAction.nextInFiles.label","Go to Next Problem in Files (Error, Warning, Info)"),alias:"Go to Next Problem in Files (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:W.focus,primary:66,weight:100},menuOpts:{menuId:K.MenubarGoMenu,title:v({key:"miGotoNextProblem",comment:["&& denotes a mnemonic"]},"Next &&Problem"),group:"6_problem_nav",order:1}})}}class Rmt extends ER{constructor(){super(!1,!0,{id:"editor.action.marker.prevInFiles",label:v("markerAction.previousInFiles.label","Go to Previous Problem in Files (Error, Warning, Info)"),alias:"Go to Previous Problem in Files (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:W.focus,primary:1090,weight:100},menuOpts:{menuId:K.MenubarGoMenu,title:v({key:"miGotoPreviousProblem",comment:["&& denotes a mnemonic"]},"Previous &&Problem"),group:"6_problem_nav",order:2}})}}fu(Qm.ID,Qm,4);be(cm);be(c3);be(Pmt);be(Rmt);const MFe=new Pe("markersNavigationVisible",!1),Imt=xr.bindToContribution(Qm.get);ze(new Imt({id:"closeMarkersNavigation",precondition:MFe,handler:u=>u.close(),kbOpts:{weight:100+50,kbExpr:W.focus,primary:9,secondary:[1033]}}));var Omt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},wH=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}};const tl=ve;class jmt{constructor(e,t,n){this.owner=e,this.range=t,this.marker=n}isValidForHoverAnchor(e){return e.type===1&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}}const Ole={type:1,filter:{include:gt.QuickFix},triggerAction:fs.QuickFixHover};let uq=class{constructor(e,t,n,i){this._editor=e,this._markerDecorationsService=t,this._openerService=n,this._languageFeaturesService=i,this.hoverOrdinal=1,this.recentMarkerCodeActionsInfo=void 0}computeSync(e,t){if(!this._editor.hasModel()||e.type!==1&&!e.supportsMarkerHover)return[];const n=this._editor.getModel(),i=e.range.startLineNumber,r=n.getLineMaxColumn(i),a=[];for(const o of t){const s=o.range.startLineNumber===i?o.range.startColumn:1,l=o.range.endLineNumber===i?o.range.endColumn:r,c=this._markerDecorationsService.getMarker(n.uri,o);if(!c)continue;const d=new j(e.range.startLineNumber,s,e.range.startLineNumber,l);a.push(new jmt(this,d,c))}return a}renderHoverParts(e,t){if(!t.length)return ne.None;const n=new pe;t.forEach(r=>e.fragment.appendChild(this.renderMarkerHover(r,n)));const i=t.length===1?t[0]:t.sort((r,a)=>Yn.compare(r.marker.severity,a.marker.severity))[0];return this.renderMarkerStatusbar(e,i,n),n}renderMarkerHover(e,t){const n=tl("div.hover-row"),i=me(n,tl("div.marker.hover-contents")),{source:r,message:a,code:o,relatedInformation:s}=e.marker;this._editor.applyFontInfo(i);const l=me(i,tl("span"));if(l.style.whiteSpace="pre-wrap",l.innerText=a,r||o)if(o&&typeof o!="string"){const c=tl("span");if(r){const m=me(c,tl("span"));m.innerText=r}const d=me(c,tl("a.code-link"));d.setAttribute("href",o.target.toString()),t.add(ce(d,"click",m=>{this._openerService.open(o.target,{allowCommands:!0}),m.preventDefault(),m.stopPropagation()}));const h=me(d,tl("span"));h.innerText=o.value;const E=me(i,c);E.style.opacity="0.6",E.style.paddingLeft="6px"}else{const c=me(i,tl("span"));c.style.opacity="0.6",c.style.paddingLeft="6px",c.innerText=r&&o?`${r}(${o})`:r||`(${o})`}if(pa(s))for(const{message:c,resource:d,startLineNumber:h,startColumn:E}of s){const m=me(i,tl("div"));m.style.marginTop="8px";const g=me(m,tl("a"));g.innerText=`${O0(d)}(${h}, ${E}): `,g.style.cursor="pointer",t.add(ce(g,"click",p=>{p.stopPropagation(),p.preventDefault(),this._openerService&&this._openerService.open(d,{fromUserGesture:!0,editorOptions:{selection:{startLineNumber:h,startColumn:E}}}).catch(zt)}));const f=me(m,tl("span"));f.innerText=c,this._editor.applyFontInfo(f)}return n}renderMarkerStatusbar(e,t,n){if((t.marker.severity===Yn.Error||t.marker.severity===Yn.Warning||t.marker.severity===Yn.Info)&&e.statusBar.addAction({label:v("view problem","View Problem"),commandId:cm.ID,run:()=>{var i;e.hide(),(i=Qm.get(this._editor))===null||i===void 0||i.showAtMarker(t.marker),this._editor.focus()}}),!this._editor.getOption(90)){const i=e.statusBar.append(tl("div"));this.recentMarkerCodeActionsInfo&&(gw.makeKey(this.recentMarkerCodeActionsInfo.marker)===gw.makeKey(t.marker)?this.recentMarkerCodeActionsInfo.hasCodeActions||(i.textContent=v("noQuickFixes","No quick fixes available")):this.recentMarkerCodeActionsInfo=void 0);const r=this.recentMarkerCodeActionsInfo&&!this.recentMarkerCodeActionsInfo.hasCodeActions?ne.None:n.add(Rm(()=>i.textContent=v("checkingForQuickFixes","Checking for quick fixes..."),200));i.textContent||(i.textContent=String.fromCharCode(160));const a=this.getCodeActions(t.marker);n.add(ft(()=>a.cancel())),a.then(o=>{if(r.dispose(),this.recentMarkerCodeActionsInfo={marker:t.marker,hasCodeActions:o.validActions.length>0},!this.recentMarkerCodeActionsInfo.hasCodeActions){o.dispose(),i.textContent=v("noQuickFixes","No quick fixes available");return}i.style.display="none";let s=!1;n.add(ft(()=>{s||o.dispose()})),e.statusBar.addAction({label:v("quick fixes","Quick Fix..."),commandId:Qee,run:l=>{s=!0;const c=Um.get(this._editor),d=ji(l);e.hide(),c==null||c.showCodeActions(Ole,o,{x:d.left,y:d.top,width:d.width,height:d.height})}})},zt)}}getCodeActions(e){return Ui(t=>p2(this._languageFeaturesService.codeActionProvider,this._editor.getModel(),new j(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn),Ole,Yh.None,t))}};uq=Omt([wH(1,mX),wH(2,Cs),wH(3,We)],uq);const TFe="editor.action.inlineSuggest.commit",NFe="editor.action.inlineSuggest.showPrevious",PFe="editor.action.inlineSuggest.showNext";var Hmt=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};class Vmt extends ne{constructor(e,t,n={orientation:0}){super(),this.submenuActionViewItems=[],this.hasSecondaryActions=!1,this._onDidChangeDropdownVisibility=this._register(new $Ue),this.onDidChangeDropdownVisibility=this._onDidChangeDropdownVisibility.event,this.disposables=this._register(new pe),this.options=n,this.lookupKeybindings=typeof this.options.getKeyBinding=="function",this.toggleMenuAction=this._register(new cF(()=>{var i;return(i=this.toggleMenuActionViewItem)===null||i===void 0?void 0:i.show()},n.toggleMenuTitle)),this.element=document.createElement("div"),this.element.className="monaco-toolbar",e.appendChild(this.element),this.actionBar=this._register(new j0(this.element,{orientation:n.orientation,ariaLabel:n.ariaLabel,actionRunner:n.actionRunner,allowContextMenu:n.allowContextMenu,highlightToggledItems:n.highlightToggledItems,actionViewItemProvider:(i,r)=>{var a;if(i.id===cF.ID)return this.toggleMenuActionViewItem=new sw(i,i.menuActions,t,{actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,keybindingProvider:this.options.getKeyBinding,classNames:st.asClassNameArray((a=n.moreIcon)!==null&&a!==void 0?a:we.toolBarMore),anchorAlignmentProvider:this.options.anchorAlignmentProvider,menuAsChild:!!this.options.renderDropdownAsChildElement,skipTelemetry:this.options.skipTelemetry}),this.toggleMenuActionViewItem.setActionContext(this.actionBar.context),this.disposables.add(this._onDidChangeDropdownVisibility.add(this.toggleMenuActionViewItem.onDidChangeVisibility)),this.toggleMenuActionViewItem;if(n.actionViewItemProvider){const o=n.actionViewItemProvider(i,r);if(o)return o}if(i instanceof Zx){const o=new sw(i,i.actions,t,{actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,keybindingProvider:this.options.getKeyBinding,classNames:i.class,anchorAlignmentProvider:this.options.anchorAlignmentProvider,menuAsChild:!!this.options.renderDropdownAsChildElement,skipTelemetry:this.options.skipTelemetry});return o.setActionContext(this.actionBar.context),this.submenuActionViewItems.push(o),this.disposables.add(this._onDidChangeDropdownVisibility.add(o.onDidChangeVisibility)),o}}}))}set actionRunner(e){this.actionBar.actionRunner=e}get actionRunner(){return this.actionBar.actionRunner}getElement(){return this.element}getItemAction(e){return this.actionBar.getAction(e)}setActions(e,t){this.clear();const n=e?e.slice(0):[];this.hasSecondaryActions=!!(t&&t.length>0),this.hasSecondaryActions&&t&&(this.toggleMenuAction.menuActions=t.slice(0),n.push(this.toggleMenuAction)),n.forEach(i=>{this.actionBar.push(i,{icon:!0,label:!1,keybinding:this.getKeybindingLabel(i)})})}getKeybindingLabel(e){var t,n,i;const r=this.lookupKeybindings?(n=(t=this.options).getKeyBinding)===null||n===void 0?void 0:n.call(t,e):void 0;return(i=r==null?void 0:r.getLabel())!==null&&i!==void 0?i:void 0}clear(){this.submenuActionViewItems=[],this.disposables.clear(),this.actionBar.clear()}dispose(){this.clear(),this.disposables.dispose(),super.dispose()}}class cF extends ro{constructor(e,t){t=t||v("moreActions","More Actions..."),super(cF.ID,t,void 0,!0),this._menuActions=[],this.toggleDropdownMenu=e}run(){return Hmt(this,void 0,void 0,function*(){this.toggleDropdownMenu()})}get menuActions(){return this._menuActions}set menuActions(e){this._menuActions=e}}cF.ID="toolbar.toggle.more";var $mt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},yC=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}};let nq=class extends Vmt{constructor(e,t,n,i,r,a,o){super(e,r,Object.assign(Object.assign({getKeyBinding:l=>{var c;return(c=a.lookupKeybinding(l.id))!==null&&c!==void 0?c:void 0}},t),{allowContextMenu:!0,skipTelemetry:typeof(t==null?void 0:t.telemetrySource)=="string"})),this._options=t,this._menuService=n,this._contextKeyService=i,this._contextMenuService=r,this._sessionDisposables=this._store.add(new pe);const s=t==null?void 0:t.telemetrySource;s&&this._store.add(this.actionBar.onDidRun(l=>o.publicLog2("workbenchActionExecuted",{id:l.action.id,from:s})))}setActions(e,t=[],n){var i,r,a;this._sessionDisposables.clear();const o=e.slice(),s=t.slice(),l=[];let c=0;const d=[];let h=!1;if(((i=this._options)===null||i===void 0?void 0:i.hiddenItemStrategy)!==-1)for(let E=0;Ef==null?void 0:f.id)),m=this._options.overflowBehavior.maxItems-E.size;let g=0;for(let f=0;f=m&&(o[f]=void 0,d[f]=p))}}Kre(o),Kre(d),super.setActions(o,Dr.join(d,s)),l.length>0&&this._sessionDisposables.add(ce(this.getElement(),"contextmenu",E=>{var m,g,f,p,D;const x=new x0(E),b=this.getItemAction(x.target);if(!b)return;x.preventDefault(),x.stopPropagation();let k=!1;if(c===1&&((m=this._options)===null||m===void 0?void 0:m.hiddenItemStrategy)===0){k=!0;for(let S=0;Sthis._menuService.resetHiddenStates(n)}))),this._contextMenuService.showContextMenu({getAnchor:()=>x,getActions:()=>F,menuId:(f=this._options)===null||f===void 0?void 0:f.contextMenu,menuActionOptions:Object.assign({renderShortTitle:!0},(p=this._options)===null||p===void 0?void 0:p.menuOptions),skipTelemetry:typeof((D=this._options)===null||D===void 0?void 0:D.telemetrySource)=="string",contextKeyService:this._contextKeyService})}))}};nq=$mt([yC(2,$1),yC(3,pt),yC(4,Wl),yC(5,qu),yC(6,i0)],nq);var cte=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},Bc=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},D8;let iq=class extends ne{constructor(e,t,n){super(),this.editor=e,this.model=t,this.instantiationService=n,this.alwaysShowToolbar=zr(this.editor.onDidChangeConfiguration,()=>this.editor.getOption(62).showToolbar==="always"),this.sessionPosition=void 0,this.position=uu(this,i=>{var r,a,o;const s=(r=this.model.read(i))===null||r===void 0?void 0:r.ghostText.read(i);if(!this.alwaysShowToolbar.read(i)||!s||s.parts.length===0)return this.sessionPosition=void 0,null;const l=s.parts[0].column;this.sessionPosition&&this.sessionPosition.lineNumber!==s.lineNumber&&(this.sessionPosition=void 0);const c=new ee(s.lineNumber,Math.min(l,(o=(a=this.sessionPosition)===null||a===void 0?void 0:a.column)!==null&&o!==void 0?o:Number.MAX_SAFE_INTEGER));return this.sessionPosition=c,c}),this._register(es((i,r)=>{const a=this.model.read(i);if(!a||!this.alwaysShowToolbar.read(i))return;const o=r.add(this.instantiationService.createInstance(Xm,this.editor,!0,this.position,a.selectedInlineCompletionIndex,a.inlineCompletionsCount,a.selectedInlineCompletion.map(s=>{var l;return(l=s==null?void 0:s.inlineCompletion.source.inlineCompletions.commands)!==null&&l!==void 0?l:[]})));e.addContentWidget(o),r.add(ft(()=>e.removeContentWidget(o))),r.add(Xu(s=>{this.position.read(s)&&a.lastTriggerKind.read(s)!==qh.Explicit&&a.triggerExplicitly()}))}))}};iq=cte([Bc(2,mt)],iq);const Kmt=hi("inline-suggestion-hints-next",we.chevronRight,v("parameterHintsNextIcon","Icon for show next parameter hint.")),Wmt=hi("inline-suggestion-hints-previous",we.chevronLeft,v("parameterHintsPreviousIcon","Icon for show previous parameter hint."));let Xm=D8=class extends ne{static get dropDownVisible(){return this._dropDownVisible}createCommandAction(e,t,n){const i=new ro(e,t,n,!0,()=>this._commandService.executeCommand(e)),r=this.keybindingService.lookupKeybinding(e,this._contextKeyService);let a=t;return r&&(a=v({key:"content",comment:["A label","A keybinding"]},"{0} ({1})",t,r.getLabel())),i.tooltip=a,i}constructor(e,t,n,i,r,a,o,s,l,c,d){super(),this.editor=e,this.withBorder=t,this._position=n,this._currentSuggestionIdx=i,this._suggestionCount=r,this._extraCommands=a,this._commandService=o,this.keybindingService=l,this._contextKeyService=c,this._menuService=d,this.id=`InlineSuggestionHintsContentWidget${D8.id++}`,this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this.nodes=yr("div.inlineSuggestionsHints",{className:this.withBorder?".withBorder":""},[yr("div@toolBar")]),this.previousAction=this.createCommandAction(NFe,v("previous","Previous"),st.asClassName(Wmt)),this.availableSuggestionCountAction=new ro("inlineSuggestionHints.availableSuggestionCount","",void 0,!1),this.nextAction=this.createCommandAction(PFe,v("next","Next"),st.asClassName(Kmt)),this.inlineCompletionsActionsMenus=this._register(this._menuService.createMenu(K.InlineCompletionsActions,this._contextKeyService)),this.clearAvailableSuggestionCountLabelDebounced=this._register(new Hu(()=>{this.availableSuggestionCountAction.label=""},100)),this.disableButtonsDebounced=this._register(new Hu(()=>{this.previousAction.enabled=this.nextAction.enabled=!1},100)),this.lastCommands=[],this.toolBar=this._register(s.createInstance(rq,this.nodes.toolBar,K.InlineSuggestionToolbar,{menuOptions:{renderShortTitle:!0},toolbarOptions:{primaryGroup:h=>h.startsWith("primary")},actionViewItemProvider:(h,E)=>{if(h instanceof zl)return s.createInstance(Umt,h,void 0);if(h===this.availableSuggestionCountAction){const m=new Gmt(void 0,h,{label:!0,icon:!1});return m.setClass("availableSuggestionCount"),m}},telemetrySource:"InlineSuggestionToolbar"})),this.toolBar.setPrependedPrimaryActions([this.previousAction,this.availableSuggestionCountAction,this.nextAction]),this._register(this.toolBar.onDidChangeDropdownVisibility(h=>{D8._dropDownVisible=h})),this._register(Xu(h=>{this._position.read(h),this.editor.layoutContentWidget(this)})),this._register(Xu(h=>{const E=this._suggestionCount.read(h),m=this._currentSuggestionIdx.read(h);E!==void 0?(this.clearAvailableSuggestionCountLabelDebounced.cancel(),this.availableSuggestionCountAction.label=`${m+1}/${E}`):this.clearAvailableSuggestionCountLabelDebounced.schedule(),E!==void 0&&E>1?(this.disableButtonsDebounced.cancel(),this.previousAction.enabled=this.nextAction.enabled=!0):this.disableButtonsDebounced.schedule()})),this._register(Xu(h=>{const E=this._extraCommands.read(h);if(di(this.lastCommands,E))return;this.lastCommands=E;const m=E.map(g=>({class:void 0,id:g.id,enabled:!0,tooltip:g.tooltip||"",label:g.title,run:f=>this._commandService.executeCommand(g.id)}));for(const[g,f]of this.inlineCompletionsActionsMenus.getActions())for(const p of f)p instanceof zl&&m.push(p);m.length>0&&m.unshift(new Dr),this.toolBar.setAdditionalSecondaryActions(m)}))}getId(){return this.id}getDomNode(){return this.nodes.root}getPosition(){return{position:this._position.get(),preference:[1,2],positionAffinity:3}}};Xm._dropDownVisible=!1;Xm.id=0;Xm=D8=cte([Bc(6,ni),Bc(7,mt),Bc(8,qu),Bc(9,pt),Bc(10,$1)],Xm);class Gmt extends mv{constructor(){super(...arguments),this._className=void 0}setClass(e){this._className=e}render(e){super.render(e),this._className&&e.classList.add(this._className)}}let Umt=class extends N3{updateLabel(){const e=this._keybindingService.lookupKeybinding(this._action.id,this._contextKeyService);if(!e)return super.updateLabel();if(this.label){const t=yr("div.keybinding").root;new FA(t,Os,Object.assign({disableTitle:!0},Tlt)).set(e),this.label.textContent=this._action.label,this.label.appendChild(t),this.label.classList.add("inlineSuggestionStatusBarItemLabel")}}},rq=class extends nq{constructor(e,t,n,i,r,a,o,s){super(e,Object.assign({resetMenu:t},n),i,r,a,o,s),this.menuId=t,this.options2=n,this.menuService=i,this.contextKeyService=r,this.menu=this._store.add(this.menuService.createMenu(this.menuId,this.contextKeyService,{emitEventsForSubmenuChanges:!0})),this.additionalActions=[],this.prependedPrimaryActions=[],this._store.add(this.menu.onDidChange(()=>this.updateToolbar())),this.updateToolbar()}updateToolbar(){var e,t,n,i,r,a,o;const s=[],l=[];Wbe(this.menu,(e=this.options2)===null||e===void 0?void 0:e.menuOptions,{primary:s,secondary:l},(n=(t=this.options2)===null||t===void 0?void 0:t.toolbarOptions)===null||n===void 0?void 0:n.primaryGroup,(r=(i=this.options2)===null||i===void 0?void 0:i.toolbarOptions)===null||r===void 0?void 0:r.shouldInlineSubmenu,(o=(a=this.options2)===null||a===void 0?void 0:a.toolbarOptions)===null||o===void 0?void 0:o.useSeparatorsInPrimaryActions),l.push(...this.additionalActions),s.unshift(...this.prependedPrimaryActions),this.setActions(s,l)}setPrependedPrimaryActions(e){di(this.prependedPrimaryActions,e,(t,n)=>t===n)||(this.prependedPrimaryActions=e,this.updateToolbar())}setAdditionalSecondaryActions(e){di(this.additionalActions,e,(t,n)=>t===n)||(this.additionalActions=e,this.updateToolbar())}};rq=cte([Bc(3,$1),Bc(4,pt),Bc(5,Wl),Bc(6,qu),Bc(7,i0)],rq);var qmt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},V9=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},aq;const Jmt=!1;let Io=aq=class extends ne{static get(e){return e.getContribution(aq.ID)}constructor(e,t,n,i,r){super(),this._editor=e,this._instantiationService=t,this._openerService=n,this._languageService=i,this._keybindingService=r,this._toUnhook=new pe,this._hoverActivatedByColorDecoratorClick=!1,this._isMouseDown=!1,this._hoverClicked=!1,this._contentWidget=null,this._glyphWidget=null,this._reactToEditorMouseMoveRunner=this._register(new Hu(()=>this._reactToEditorMouseMove(this._mouseMoveEvent),0)),this._hookEvents(),this._register(this._editor.onDidChangeConfiguration(a=>{a.hasChanged(60)&&(this._unhookEvents(),this._hookEvents())})),this._register(this._editor.onMouseLeave(()=>{this._mouseMoveEvent=void 0,this._reactToEditorMouseMoveRunner.cancel()}))}_hookEvents(){const e=()=>this._hideWidgets(),t=this._editor.getOption(60);this._isHoverEnabled=t.enabled,this._isHoverSticky=t.sticky,this._hidingDelay=t.hidingDelay,this._isHoverEnabled?(this._toUnhook.add(this._editor.onMouseDown(n=>this._onEditorMouseDown(n))),this._toUnhook.add(this._editor.onMouseUp(n=>this._onEditorMouseUp(n))),this._toUnhook.add(this._editor.onMouseMove(n=>this._onEditorMouseMove(n))),this._toUnhook.add(this._editor.onKeyDown(n=>this._onKeyDown(n)))):(this._toUnhook.add(this._editor.onMouseMove(n=>this._onEditorMouseMove(n))),this._toUnhook.add(this._editor.onKeyDown(n=>this._onKeyDown(n)))),this._toUnhook.add(this._editor.onMouseLeave(n=>this._onEditorMouseLeave(n))),this._toUnhook.add(this._editor.onDidChangeModel(e)),this._toUnhook.add(this._editor.onDidScrollChange(n=>this._onEditorScrollChanged(n)))}_unhookEvents(){this._toUnhook.clear()}_onEditorScrollChanged(e){(e.scrollTopChanged||e.scrollLeftChanged)&&this._hideWidgets()}_onEditorMouseDown(e){var t;this._isMouseDown=!0;const n=e.target;if(n.type===9&&n.detail===lm.ID){this._hoverClicked=!0;return}n.type===12&&n.detail===bx.ID||(n.type!==12&&(this._hoverClicked=!1),!((t=this._contentWidget)===null||t===void 0)&&t.widget.isResizing||this._hideWidgets())}_onEditorMouseUp(e){this._isMouseDown=!1}_onEditorMouseLeave(e){var t,n;const i=e.event.browserEvent.relatedTarget;!((t=this._contentWidget)===null||t===void 0)&&t.widget.isResizing||!((n=this._contentWidget)===null||n===void 0)&&n.containsNode(i)||this._hideWidgets()}_isMouseOverWidget(e){var t,n,i,r,a;const o=e.target;return!!(this._isHoverSticky&&o.type===9&&o.detail===lm.ID||this._isHoverSticky&&(!((t=this._contentWidget)===null||t===void 0)&&t.containsNode((n=e.event.browserEvent.view)===null||n===void 0?void 0:n.document.activeElement))&&!(!((r=(i=e.event.browserEvent.view)===null||i===void 0?void 0:i.getSelection())===null||r===void 0)&&r.isCollapsed)||!this._isHoverSticky&&o.type===9&&o.detail===lm.ID&&(!((a=this._contentWidget)===null||a===void 0)&&a.isColorPickerVisible)||this._isHoverSticky&&o.type===12&&o.detail===bx.ID)}_onEditorMouseMove(e){var t,n,i,r;if(this._mouseMoveEvent=e,!((t=this._contentWidget)===null||t===void 0)&&t.isFocused||!((n=this._contentWidget)===null||n===void 0)&&n.isResizing||this._isMouseDown&&this._hoverClicked||this._isHoverSticky&&(!((i=this._contentWidget)===null||i===void 0)&&i.isVisibleFromKeyboard))return;if(this._isMouseOverWidget(e)){this._reactToEditorMouseMoveRunner.cancel();return}if(!((r=this._contentWidget)===null||r===void 0)&&r.isVisible&&this._isHoverSticky&&this._hidingDelay>0){this._reactToEditorMouseMoveRunner.isScheduled()||this._reactToEditorMouseMoveRunner.schedule(this._hidingDelay);return}this._reactToEditorMouseMove(e)}_reactToEditorMouseMove(e){var t,n,i;if(!e)return;const r=e.target,a=(t=r.element)===null||t===void 0?void 0:t.classList.contains("colorpicker-color-decoration"),o=this._editor.getOption(146);if(a&&(o==="click"&&!this._hoverActivatedByColorDecoratorClick||o==="hover"&&!this._isHoverEnabled&&!Jmt||o==="clickAndHover"&&!this._isHoverEnabled&&!this._hoverActivatedByColorDecoratorClick)||!a&&!this._isHoverEnabled&&!this._hoverActivatedByColorDecoratorClick){this._hideWidgets();return}if(this._getOrCreateContentWidget().maybeShowAt(e)){(n=this._glyphWidget)===null||n===void 0||n.hide();return}if(r.type===2&&r.position){(i=this._contentWidget)===null||i===void 0||i.hide(),this._glyphWidget||(this._glyphWidget=new bx(this._editor,this._languageService,this._openerService)),this._glyphWidget.startShowingAt(r.position.lineNumber);return}this._hideWidgets()}_onKeyDown(e){var t;if(!this._editor.hasModel())return;const n=this._keybindingService.softDispatch(e,this._editor.getDomNode()),i=n.kind===1||n.kind===2&&n.commandId==="editor.action.showHover"&&((t=this._contentWidget)===null||t===void 0?void 0:t.isVisible);e.keyCode!==5&&e.keyCode!==6&&e.keyCode!==57&&e.keyCode!==4&&!i&&this._hideWidgets()}_hideWidgets(){var e,t,n;this._isMouseDown&&this._hoverClicked&&(!((e=this._contentWidget)===null||e===void 0)&&e.isColorPickerVisible)||Xm.dropDownVisible||(this._hoverActivatedByColorDecoratorClick=!1,this._hoverClicked=!1,(t=this._glyphWidget)===null||t===void 0||t.hide(),(n=this._contentWidget)===null||n===void 0||n.hide())}_getOrCreateContentWidget(){return this._contentWidget||(this._contentWidget=this._instantiationService.createInstance(jw,this._editor)),this._contentWidget}showContentHover(e,t,n,i,r=!1){this._hoverActivatedByColorDecoratorClick=r,this._getOrCreateContentWidget().startShowingAtRange(e,t,n,i)}focus(){var e;(e=this._contentWidget)===null||e===void 0||e.focus()}scrollUp(){var e;(e=this._contentWidget)===null||e===void 0||e.scrollUp()}scrollDown(){var e;(e=this._contentWidget)===null||e===void 0||e.scrollDown()}scrollLeft(){var e;(e=this._contentWidget)===null||e===void 0||e.scrollLeft()}scrollRight(){var e;(e=this._contentWidget)===null||e===void 0||e.scrollRight()}pageUp(){var e;(e=this._contentWidget)===null||e===void 0||e.pageUp()}pageDown(){var e;(e=this._contentWidget)===null||e===void 0||e.pageDown()}goToTop(){var e;(e=this._contentWidget)===null||e===void 0||e.goToTop()}goToBottom(){var e;(e=this._contentWidget)===null||e===void 0||e.goToBottom()}get isColorPickerVisible(){var e;return(e=this._contentWidget)===null||e===void 0?void 0:e.isColorPickerVisible}get isHoverVisible(){var e;return(e=this._contentWidget)===null||e===void 0?void 0:e.isVisible}dispose(){var e,t;super.dispose(),this._unhookEvents(),this._toUnhook.dispose(),(e=this._glyphWidget)===null||e===void 0||e.dispose(),(t=this._contentWidget)===null||t===void 0||t.dispose()}};Io.ID="editor.contrib.hover";Io=aq=qmt([V9(1,mt),V9(2,Cs),V9(3,vn),V9(4,qu)],Io);class Zmt extends $e{constructor(){super({id:"editor.action.showHover",label:v({key:"showOrFocusHover",comment:["Label for action that will trigger the showing/focusing of a hover in the editor.","If the hover is not visible, it will show the hover.","This allows for users to show the hover without using the mouse.","If the hover is already visible, it will take focus."]},"Show or Focus Hover"),description:{description:"Show or Focus Hover",args:[{name:"args",schema:{type:"object",properties:{focus:{description:"Controls if when triggered with the keyboard, the hover should take focus immediately.",type:"boolean",default:!1}}}}]},alias:"Show or Focus Hover",precondition:void 0,kbOpts:{kbExpr:W.editorTextFocus,primary:Vi(2089,2087),weight:100}})}run(e,t,n){if(!t.hasModel())return;const i=Io.get(t);if(!i)return;const r=t.getPosition(),a=new j(r.lineNumber,r.column,r.lineNumber,r.column),o=t.getOption(2)===2||!!(n!=null&&n.focus);i.isHoverVisible?i.focus():i.showContentHover(a,1,1,o)}}class Ymt extends $e{constructor(){super({id:"editor.action.showDefinitionPreviewHover",label:v({key:"showDefinitionPreviewHover",comment:["Label for action that will trigger the showing of definition preview hover in the editor.","This allows for users to show the definition preview hover without using the mouse."]},"Show Definition Preview Hover"),alias:"Show Definition Preview Hover",precondition:void 0})}run(e,t){const n=Io.get(t);if(!n)return;const i=t.getPosition();if(!i)return;const r=new j(i.lineNumber,i.column,i.lineNumber,i.column),a=W3.get(t);if(!a)return;a.startFindDefinitionFromCursor(i).then(()=>{n.showContentHover(r,1,1,!0)})}}class Qmt extends $e{constructor(){super({id:"editor.action.scrollUpHover",label:v({key:"scrollUpHover",comment:["Action that allows to scroll up in the hover widget with the up arrow when the hover widget is focused."]},"Scroll Up Hover"),alias:"Scroll Up Hover",precondition:W.hoverFocused,kbOpts:{kbExpr:W.hoverFocused,primary:16,weight:100}})}run(e,t){const n=Io.get(t);n&&n.scrollUp()}}class Xmt extends $e{constructor(){super({id:"editor.action.scrollDownHover",label:v({key:"scrollDownHover",comment:["Action that allows to scroll down in the hover widget with the up arrow when the hover widget is focused."]},"Scroll Down Hover"),alias:"Scroll Down Hover",precondition:W.hoverFocused,kbOpts:{kbExpr:W.hoverFocused,primary:18,weight:100}})}run(e,t){const n=Io.get(t);n&&n.scrollDown()}}class egt extends $e{constructor(){super({id:"editor.action.scrollLeftHover",label:v({key:"scrollLeftHover",comment:["Action that allows to scroll left in the hover widget with the left arrow when the hover widget is focused."]},"Scroll Left Hover"),alias:"Scroll Left Hover",precondition:W.hoverFocused,kbOpts:{kbExpr:W.hoverFocused,primary:15,weight:100}})}run(e,t){const n=Io.get(t);n&&n.scrollLeft()}}class tgt extends $e{constructor(){super({id:"editor.action.scrollRightHover",label:v({key:"scrollRightHover",comment:["Action that allows to scroll right in the hover widget with the right arrow when the hover widget is focused."]},"Scroll Right Hover"),alias:"Scroll Right Hover",precondition:W.hoverFocused,kbOpts:{kbExpr:W.hoverFocused,primary:17,weight:100}})}run(e,t){const n=Io.get(t);n&&n.scrollRight()}}class ugt extends $e{constructor(){super({id:"editor.action.pageUpHover",label:v({key:"pageUpHover",comment:["Action that allows to page up in the hover widget with the page up command when the hover widget is focused."]},"Page Up Hover"),alias:"Page Up Hover",precondition:W.hoverFocused,kbOpts:{kbExpr:W.hoverFocused,primary:11,secondary:[528],weight:100}})}run(e,t){const n=Io.get(t);n&&n.pageUp()}}class ngt extends $e{constructor(){super({id:"editor.action.pageDownHover",label:v({key:"pageDownHover",comment:["Action that allows to page down in the hover widget with the page down command when the hover widget is focused."]},"Page Down Hover"),alias:"Page Down Hover",precondition:W.hoverFocused,kbOpts:{kbExpr:W.hoverFocused,primary:12,secondary:[530],weight:100}})}run(e,t){const n=Io.get(t);n&&n.pageDown()}}class igt extends $e{constructor(){super({id:"editor.action.goToTopHover",label:v({key:"goToTopHover",comment:["Action that allows to go to the top of the hover widget with the home command when the hover widget is focused."]},"Go To Top Hover"),alias:"Go To Bottom Hover",precondition:W.hoverFocused,kbOpts:{kbExpr:W.hoverFocused,primary:14,secondary:[2064],weight:100}})}run(e,t){const n=Io.get(t);n&&n.goToTop()}}class rgt extends $e{constructor(){super({id:"editor.action.goToBottomHover",label:v({key:"goToBottomHover",comment:["Action that allows to go to the bottom in the hover widget with the end command when the hover widget is focused."]},"Go To Bottom Hover"),alias:"Go To Bottom Hover",precondition:W.hoverFocused,kbOpts:{kbExpr:W.hoverFocused,primary:13,secondary:[2066],weight:100}})}run(e,t){const n=Io.get(t);n&&n.goToBottom()}}fu(Io.ID,Io,2);be(Zmt);be(Ymt);be(Qmt);be(Xmt);be(egt);be(tgt);be(ugt);be(ngt);be(igt);be(rgt);$p.register($w);$p.register(uq);Kl((u,e)=>{const t=u.getColor(KXe);t&&(e.addRule(`.monaco-editor .monaco-hover .hover-row:not(:first-child):not(:empty) { border-top: 1px solid ${t.transparent(.5)}; }`),e.addRule(`.monaco-editor .monaco-hover hr { border-top: 1px solid ${t.transparent(.5)}; }`),e.addRule(`.monaco-editor .monaco-hover hr { border-bottom: 0px solid ${t.transparent(.5)}; }`))});class oq extends ne{constructor(e){super(),this._editor=e,this._register(e.onMouseDown(t=>this.onMouseDown(t)))}dispose(){super.dispose()}onMouseDown(e){const t=this._editor.getOption(146);if(t!=="click"&&t!=="clickAndHover")return;const n=e.target;if(n.type!==6||!n.detail.injectedText||n.detail.injectedText.options.attachedData!==aFe||!n.range)return;const i=this._editor.getContribution(Io.ID);if(i&&!i.isColorPickerVisible){const r=new j(n.range.startLineNumber,n.range.startColumn+1,n.range.endLineNumber,n.range.endColumn+1);i.showContentHover(r,1,0,!1,!0)}}}oq.ID="editor.contrib.colorContribution";fu(oq.ID,oq,2);$p.register(Iw);var RFe=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},Cc=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},jle=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})},sq,lq;let eg=sq=class extends ne{constructor(e,t,n,i,r,a,o){super(),this._editor=e,this._modelService=n,this._keybindingService=i,this._instantiationService=r,this._languageFeatureService=a,this._languageConfigurationService=o,this._standaloneColorPickerWidget=null,this._standaloneColorPickerVisible=W.standaloneColorPickerVisible.bindTo(t),this._standaloneColorPickerFocused=W.standaloneColorPickerFocused.bindTo(t)}showOrFocus(){var e;this._editor.hasModel()&&(this._standaloneColorPickerVisible.get()?this._standaloneColorPickerFocused.get()||(e=this._standaloneColorPickerWidget)===null||e===void 0||e.focus():this._standaloneColorPickerWidget=new Ww(this._editor,this._standaloneColorPickerVisible,this._standaloneColorPickerFocused,this._instantiationService,this._modelService,this._keybindingService,this._languageFeatureService,this._languageConfigurationService))}hide(){var e;this._standaloneColorPickerFocused.set(!1),this._standaloneColorPickerVisible.set(!1),(e=this._standaloneColorPickerWidget)===null||e===void 0||e.hide(),this._editor.focus()}insertColor(){var e;(e=this._standaloneColorPickerWidget)===null||e===void 0||e.updateEditor(),this.hide()}static get(e){return e.getContribution(sq.ID)}};eg.ID="editor.contrib.standaloneColorPickerController";eg=sq=RFe([Cc(1,pt),Cc(2,_n),Cc(3,qu),Cc(4,mt),Cc(5,We),Cc(6,tn)],eg);fu(eg.ID,eg,1);const Hle=8,agt=22;let Ww=lq=class extends ne{constructor(e,t,n,i,r,a,o,s){var l;super(),this._editor=e,this._standaloneColorPickerVisible=t,this._standaloneColorPickerFocused=n,this._modelService=r,this._keybindingService=a,this._languageFeaturesService=o,this._languageConfigurationService=s,this.allowEditorOverflow=!0,this._position=void 0,this._body=document.createElement("div"),this._colorHover=null,this._selectionSetInEditor=!1,this._onResult=this._register(new Q),this.onResult=this._onResult.event,this._standaloneColorPickerVisible.set(!0),this._standaloneColorPickerParticipant=i.createInstance(aF,this._editor),this._position=(l=this._editor._getViewModel())===null||l===void 0?void 0:l.getPrimaryCursorState().modelState.position;const c=this._editor.getSelection(),d=c?{startLineNumber:c.startLineNumber,startColumn:c.startColumn,endLineNumber:c.endLineNumber,endColumn:c.endColumn}:{startLineNumber:0,endLineNumber:0,endColumn:0,startColumn:0},h=this._register(y1(this._body));this._register(h.onDidBlur(E=>{this.hide()})),this._register(h.onDidFocus(E=>{this.focus()})),this._register(this._editor.onDidChangeCursorPosition(()=>{this._selectionSetInEditor?this._selectionSetInEditor=!1:this.hide()})),this._register(this._editor.onMouseMove(E=>{var m;const g=(m=E.target.element)===null||m===void 0?void 0:m.classList;g&&g.contains("colorpicker-color-decoration")&&this.hide()})),this._register(this.onResult(E=>{this._render(E.value,E.foundInEditor)})),this._start(d),this._body.style.zIndex="50",this._editor.addContentWidget(this)}updateEditor(){this._colorHover&&this._standaloneColorPickerParticipant.updateEditorModel(this._colorHover)}getId(){return lq.ID}getDomNode(){return this._body}getPosition(){if(!this._position)return null;const e=this._editor.getOption(60).above;return{position:this._position,secondaryPosition:this._position,preference:e?[1,2]:[2,1],positionAffinity:2}}hide(){this.dispose(),this._standaloneColorPickerVisible.set(!1),this._standaloneColorPickerFocused.set(!1),this._editor.removeContentWidget(this),this._editor.focus()}focus(){this._standaloneColorPickerFocused.set(!0),this._body.focus()}_start(e){return jle(this,void 0,void 0,function*(){const t=yield this._computeAsync(e);t&&this._onResult.fire(new ogt(t.result,t.foundInEditor))})}_computeAsync(e){return jle(this,void 0,void 0,function*(){if(!this._editor.hasModel())return null;const t={range:e,color:{red:0,green:0,blue:0,alpha:1}},n=yield this._standaloneColorPickerParticipant.createColorHover(t,new ute(this._modelService,this._languageConfigurationService),this._languageFeaturesService.colorProvider);return n?{result:n.colorHover,foundInEditor:n.foundInEditor}:null})}_render(e,t){const n=document.createDocumentFragment(),i=this._register(new Hw(this._keybindingService));let r;const a={fragment:n,statusBar:i,setColorPicker:g=>r=g,onContentsChanged:()=>{},hide:()=>this.hide()};if(this._colorHover=e,this._register(this._standaloneColorPickerParticipant.renderHoverParts(a,[e])),r===void 0)return;this._body.classList.add("standalone-colorpicker-body"),this._body.style.maxHeight=Math.max(this._editor.getLayoutInfo().height/4,250)+"px",this._body.style.maxWidth=Math.max(this._editor.getLayoutInfo().width*.66,500)+"px",this._body.tabIndex=0,this._body.appendChild(n),r.layout();const o=r.body,s=o.saturationBox.domNode.clientWidth,l=o.domNode.clientWidth-s-agt-Hle,c=r.body.enterButton;c==null||c.onClicked(()=>{this.updateEditor(),this.hide()});const d=r.header,h=d.pickedColorNode;h.style.width=s+Hle+"px";const E=d.originalColorNode;E.style.width=l+"px";const m=r.header.closeButton;m==null||m.onClicked(()=>{this.hide()}),t&&(c&&(c.button.textContent="Replace"),this._selectionSetInEditor=!0,this._editor.setSelection(e.range)),this._editor.layoutContentWidget(this)}};Ww.ID="editor.contrib.standaloneColorPickerWidget";Ww=lq=RFe([Cc(3,mt),Cc(4,_n),Cc(5,qu),Cc(6,We),Cc(7,tn)],Ww);class ogt{constructor(e,t){this.value=e,this.foundInEditor=t}}class sgt extends hd{constructor(){super({id:"editor.action.showOrFocusStandaloneColorPicker",title:{value:v("showOrFocusStandaloneColorPicker","Show or Focus Standalone Color Picker"),mnemonicTitle:v({key:"mishowOrFocusStandaloneColorPicker",comment:["&& denotes a mnemonic"]},"&&Show or Focus Standalone Color Picker"),original:"Show or Focus Standalone Color Picker"},precondition:void 0,menu:[{id:K.CommandPalette}]})}runEditorCommand(e,t){var n;(n=eg.get(t))===null||n===void 0||n.showOrFocus()}}class lgt extends $e{constructor(){super({id:"editor.action.hideColorPicker",label:v({key:"hideColorPicker",comment:["Action that hides the color picker"]},"Hide the Color Picker"),alias:"Hide the Color Picker",precondition:W.standaloneColorPickerVisible.isEqualTo(!0),kbOpts:{primary:9,weight:100}})}run(e,t){var n;(n=eg.get(t))===null||n===void 0||n.hide()}}class cgt extends $e{constructor(){super({id:"editor.action.insertColorWithStandaloneColorPicker",label:v({key:"insertColorWithStandaloneColorPicker",comment:["Action that inserts color with standalone color picker"]},"Insert Color with Standalone Color Picker"),alias:"Insert Color with Standalone Color Picker",precondition:W.standaloneColorPickerFocused.isEqualTo(!0),kbOpts:{primary:3,weight:100}})}run(e,t){var n;(n=eg.get(t))===null||n===void 0||n.insertColor()}}be(lgt);be(cgt);gn(sgt);class IE{constructor(e,t,n){this.languageConfigurationService=n,this._selection=e,this._insertSpace=t,this._usedEndToken=null}static _haystackHasNeedleAtOffset(e,t,n){if(n<0)return!1;const i=t.length,r=e.length;if(n+i>r)return!1;for(let a=0;a=65&&o<=90&&o+32===s)&&!(s>=65&&s<=90&&s+32===o))return!1}return!0}_createOperationsForBlockComment(e,t,n,i,r,a){const o=e.startLineNumber,s=e.startColumn,l=e.endLineNumber,c=e.endColumn,d=r.getLineContent(o),h=r.getLineContent(l);let E=d.lastIndexOf(t,s-1+t.length),m=h.indexOf(n,c-1-n.length);if(E!==-1&&m!==-1)if(o===l)d.substring(E+t.length,m).indexOf(n)>=0&&(E=-1,m=-1);else{const f=d.substring(E+t.length),p=h.substring(0,m);(f.indexOf(n)>=0||p.indexOf(n)>=0)&&(E=-1,m=-1)}let g;E!==-1&&m!==-1?(i&&E+t.length0&&h.charCodeAt(m-1)===32&&(n=" "+n,m-=1),g=IE._createRemoveBlockCommentOperations(new j(o,E+t.length+1,l,m+1),t,n)):(g=IE._createAddBlockCommentOperations(e,t,n,this._insertSpace),this._usedEndToken=g.length===1?n:null);for(const f of g)a.addTrackedEditOperation(f.range,f.text)}static _createRemoveBlockCommentOperations(e,t,n){const i=[];return j.isEmpty(e)?i.push(yn.delete(new j(e.startLineNumber,e.startColumn-t.length,e.endLineNumber,e.endColumn+n.length))):(i.push(yn.delete(new j(e.startLineNumber,e.startColumn-t.length,e.startLineNumber,e.startColumn))),i.push(yn.delete(new j(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn+n.length)))),i}static _createAddBlockCommentOperations(e,t,n,i){const r=[];return j.isEmpty(e)?r.push(yn.replace(new j(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn),t+" "+n)):(r.push(yn.insert(new ee(e.startLineNumber,e.startColumn),t+(i?" ":""))),r.push(yn.insert(new ee(e.endLineNumber,e.endColumn),(i?" ":"")+n))),r}getEditOperations(e,t){const n=this._selection.startLineNumber,i=this._selection.startColumn;e.tokenization.tokenizeIfCheap(n);const r=e.getLanguageIdAtPosition(n,i),a=this.languageConfigurationService.getLanguageConfiguration(r).comments;!a||!a.blockCommentStartToken||!a.blockCommentEndToken||this._createOperationsForBlockComment(this._selection,a.blockCommentStartToken,a.blockCommentEndToken,this._insertSpace,e,t)}computeCursorState(e,t){const n=t.getInverseEditOperations();if(n.length===2){const i=n[0],r=n[1];return new Ye(i.range.endLineNumber,i.range.endColumn,r.range.startLineNumber,r.range.startColumn)}else{const i=n[0].range,r=this._usedEndToken?-this._usedEndToken.length-1:0;return new Ye(i.endLineNumber,i.endColumn+r,i.endLineNumber,i.endColumn+r)}}}class ph{constructor(e,t,n,i,r,a,o){this.languageConfigurationService=e,this._selection=t,this._tabSize=n,this._type=i,this._insertSpace=r,this._selectionId=null,this._deltaColumn=0,this._moveEndPositionDown=!1,this._ignoreEmptyLines=a,this._ignoreFirstLine=o||!1}static _gatherPreflightCommentStrings(e,t,n,i){e.tokenization.tokenizeIfCheap(t);const r=e.getLanguageIdAtPosition(t,1),a=i.getLanguageConfiguration(r).comments,o=a?a.lineCommentToken:null;if(!o)return null;const s=[];for(let l=0,c=n-t+1;lr?t[s].commentStrOffset=a-1:t[s].commentStrOffset=a}}}class dte extends $e{constructor(e,t){super(t),this._type=e}run(e,t){const n=e.get(tn);if(!t.hasModel())return;const i=t.getModel(),r=[],a=i.getOptions(),o=t.getOption(23),s=t.getSelections().map((c,d)=>({selection:c,index:d,ignoreFirstLine:!1}));s.sort((c,d)=>j.compareRangesUsingStarts(c.selection,d.selection));let l=s[0];for(let c=1;c=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},Ug=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},cq;let Fv=cq=class{static get(e){return e.getContribution(cq.ID)}constructor(e,t,n,i,r,a,o,s){this._contextMenuService=t,this._contextViewService=n,this._contextKeyService=i,this._keybindingService=r,this._menuService=a,this._configurationService=o,this._workspaceContextService=s,this._toDispose=new pe,this._contextMenuIsBeingShownCount=0,this._editor=e,this._toDispose.add(this._editor.onContextMenu(l=>this._onContextMenu(l))),this._toDispose.add(this._editor.onMouseWheel(l=>{if(this._contextMenuIsBeingShownCount>0){const c=this._contextViewService.getContextViewElement(),d=l.srcElement;d.shadowRoot&&w3(c)===d.shadowRoot||this._contextViewService.hideContextView()}})),this._toDispose.add(this._editor.onKeyDown(l=>{this._editor.getOption(24)&&l.keyCode===58&&(l.preventDefault(),l.stopPropagation(),this.showContextMenu())}))}_onContextMenu(e){if(!this._editor.hasModel())return;if(!this._editor.getOption(24)){this._editor.focus(),e.target.position&&!this._editor.getSelection().containsPosition(e.target.position)&&this._editor.setPosition(e.target.position);return}if(e.target.type===12||e.target.type===6&&e.target.detail.injectedText)return;if(e.event.preventDefault(),e.event.stopPropagation(),e.target.type===11)return this._showScrollbarContextMenu(e.event);if(e.target.type!==6&&e.target.type!==7&&e.target.type!==1)return;if(this._editor.focus(),e.target.position){let n=!1;for(const i of this._editor.getSelections())if(i.containsPosition(e.target.position)){n=!0;break}n||this._editor.setPosition(e.target.position)}let t=null;e.target.type!==1&&(t=e.event),this.showContextMenu(t)}showContextMenu(e){if(!this._editor.getOption(24)||!this._editor.hasModel())return;const t=this._getMenuActions(this._editor.getModel(),this._editor.isSimpleWidget?K.SimpleEditorContext:K.EditorContext);t.length>0&&this._doShowContextMenu(t,e)}_getMenuActions(e,t){const n=[],i=this._menuService.createMenu(t,this._contextKeyService),r=i.getActions({arg:e.uri});i.dispose();for(const a of r){const[,o]=a;let s=0;for(const l of o)if(l instanceof dk){const c=this._getMenuActions(e,l.item.submenu);c.length>0&&(n.push(new Zx(l.id,l.label,c)),s++)}else n.push(l),s++;s&&n.push(new Dr)}return n.length&&n.pop(),n}_doShowContextMenu(e,t=null){if(!this._editor.hasModel())return;const n=this._editor.getOption(60);this._editor.updateOptions({hover:{enabled:!1}});let i=t;if(!i){this._editor.revealPosition(this._editor.getPosition(),1),this._editor.render();const a=this._editor.getScrolledVisiblePosition(this._editor.getPosition()),o=ji(this._editor.getDomNode()),s=o.left+a.left,l=o.top+a.top+a.height;i={x:s,y:l}}const r=this._editor.getOption(126)&&!Zc;this._contextMenuIsBeingShownCount++,this._contextMenuService.showContextMenu({domForShadowRoot:r?this._editor.getDomNode():void 0,getAnchor:()=>i,getActions:()=>e,getActionViewItem:a=>{const o=this._keybindingFor(a);if(o)return new mv(a,a,{label:!0,keybinding:o.getLabel(),isMenu:!0});const s=a;return typeof s.getActionViewItem=="function"?s.getActionViewItem():new mv(a,a,{icon:!0,label:!0,isMenu:!0})},getKeyBinding:a=>this._keybindingFor(a),onHide:a=>{this._contextMenuIsBeingShownCount--,this._editor.updateOptions({hover:n})}})}_showScrollbarContextMenu(e){if(!this._editor.hasModel()||Eot(this._workspaceContextService.getWorkspace()))return;const t=this._editor.getOption(72);let n=0;const i=l=>({id:`menu-action-${++n}`,label:l.label,tooltip:"",class:void 0,enabled:typeof l.enabled>"u"?!0:l.enabled,checked:l.checked,run:l.run}),r=(l,c)=>new Zx(`menu-action-${++n}`,l,c,void 0),a=(l,c,d,h,E)=>{if(!c)return i({label:l,enabled:c,run:()=>{}});const m=f=>()=>{this._configurationService.updateValue(d,f)},g=[];for(const f of E)g.push(i({label:f.label,checked:h===f.value,run:m(f.value)}));return r(l,g)},o=[];o.push(i({label:v("context.minimap.minimap","Minimap"),checked:t.enabled,run:()=>{this._configurationService.updateValue("editor.minimap.enabled",!t.enabled)}})),o.push(new Dr),o.push(i({label:v("context.minimap.renderCharacters","Render Characters"),enabled:t.enabled,checked:t.renderCharacters,run:()=>{this._configurationService.updateValue("editor.minimap.renderCharacters",!t.renderCharacters)}})),o.push(a(v("context.minimap.size","Vertical size"),t.enabled,"editor.minimap.size",t.size,[{label:v("context.minimap.size.proportional","Proportional"),value:"proportional"},{label:v("context.minimap.size.fill","Fill"),value:"fill"},{label:v("context.minimap.size.fit","Fit"),value:"fit"}])),o.push(a(v("context.minimap.slider","Slider"),t.enabled,"editor.minimap.showSlider",t.showSlider,[{label:v("context.minimap.slider.mouseover","Mouse Over"),value:"mouseover"},{label:v("context.minimap.slider.always","Always"),value:"always"}]));const s=this._editor.getOption(126)&&!Zc;this._contextMenuIsBeingShownCount++,this._contextMenuService.showContextMenu({domForShadowRoot:s?this._editor.getDomNode():void 0,getAnchor:()=>e,getActions:()=>o,onHide:l=>{this._contextMenuIsBeingShownCount--,this._editor.focus()}})}_keybindingFor(e){return this._keybindingService.lookupKeybinding(e.id)}dispose(){this._contextMenuIsBeingShownCount>0&&this._contextViewService.hideContextView(),this._toDispose.dispose()}};Fv.ID="editor.contrib.contextmenu";Fv=cq=ggt([Ug(1,Wl),Ug(2,F4),Ug(3,pt),Ug(4,qu),Ug(5,$1),Ug(6,tu),Ug(7,M3)],Fv);class fgt extends $e{constructor(){super({id:"editor.action.showContextMenu",label:v("action.showContextMenu.label","Show Editor Context Menu"),alias:"Show Editor Context Menu",precondition:void 0,kbOpts:{kbExpr:W.textInputFocus,primary:1092,weight:100}})}run(e,t){var n;(n=Fv.get(t))===null||n===void 0||n.showContextMenu()}}fu(Fv.ID,Fv,2);be(fgt);class LH{constructor(e){this.selections=e}equals(e){const t=this.selections.length,n=e.selections.length;if(t!==n)return!1;for(let i=0;i{this._undoStack=[],this._redoStack=[]})),this._register(e.onDidChangeModelContent(t=>{this._undoStack=[],this._redoStack=[]})),this._register(e.onDidChangeCursorSelection(t=>{if(this._isCursorUndoRedo||!t.oldSelections||t.oldModelVersionId!==t.modelVersionId)return;const n=new LH(t.oldSelections);this._undoStack.length>0&&this._undoStack[this._undoStack.length-1].cursorState.equals(n)||(this._undoStack.push(new zH(n,e.getScrollTop(),e.getScrollLeft())),this._redoStack=[],this._undoStack.length>50&&this._undoStack.shift())}))}cursorUndo(){!this._editor.hasModel()||this._undoStack.length===0||(this._redoStack.push(new zH(new LH(this._editor.getSelections()),this._editor.getScrollTop(),this._editor.getScrollLeft())),this._applyState(this._undoStack.pop()))}cursorRedo(){!this._editor.hasModel()||this._redoStack.length===0||(this._undoStack.push(new zH(new LH(this._editor.getSelections()),this._editor.getScrollTop(),this._editor.getScrollLeft())),this._applyState(this._redoStack.pop()))}_applyState(e){this._isCursorUndoRedo=!0,this._editor.setSelections(e.cursorState.selections),this._editor.setScrollPosition({scrollTop:e.scrollTop,scrollLeft:e.scrollLeft}),this._isCursorUndoRedo=!1}}G3.ID="editor.contrib.cursorUndoRedoController";class pgt extends $e{constructor(){super({id:"cursorUndo",label:v("cursor.undo","Cursor Undo"),alias:"Cursor Undo",precondition:void 0,kbOpts:{kbExpr:W.textInputFocus,primary:2099,weight:100}})}run(e,t,n){var i;(i=G3.get(t))===null||i===void 0||i.cursorUndo()}}class Dgt extends $e{constructor(){super({id:"cursorRedo",label:v("cursor.redo","Cursor Redo"),alias:"Cursor Redo",precondition:void 0})}run(e,t,n){var i;(i=G3.get(t))===null||i===void 0||i.cursorRedo()}}fu(G3.ID,G3,0);be(pgt);be(Dgt);class xgt{constructor(e,t,n){this.selection=e,this.targetPosition=t,this.copy=n,this.targetSelection=null}getEditOperations(e,t){const n=e.getValueInRange(this.selection);if(this.copy||t.addEditOperation(this.selection,null),t.addEditOperation(new j(this.targetPosition.lineNumber,this.targetPosition.column,this.targetPosition.lineNumber,this.targetPosition.column),n),this.selection.containsPosition(this.targetPosition)&&!(this.copy&&(this.selection.getEndPosition().equals(this.targetPosition)||this.selection.getStartPosition().equals(this.targetPosition)))){this.targetSelection=this.selection;return}if(this.copy){this.targetSelection=new Ye(this.targetPosition.lineNumber,this.targetPosition.column,this.selection.endLineNumber-this.selection.startLineNumber+this.targetPosition.lineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column+this.selection.endColumn-this.selection.startColumn:this.selection.endColumn);return}if(this.targetPosition.lineNumber>this.selection.endLineNumber){this.targetSelection=new Ye(this.targetPosition.lineNumber-this.selection.endLineNumber+this.selection.startLineNumber,this.targetPosition.column,this.targetPosition.lineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column+this.selection.endColumn-this.selection.startColumn:this.selection.endColumn);return}if(this.targetPosition.lineNumberthis._onEditorMouseDown(t))),this._register(this._editor.onMouseUp(t=>this._onEditorMouseUp(t))),this._register(this._editor.onMouseDrag(t=>this._onEditorMouseDrag(t))),this._register(this._editor.onMouseDrop(t=>this._onEditorMouseDrop(t))),this._register(this._editor.onMouseDropCanceled(()=>this._onEditorMouseDropCanceled())),this._register(this._editor.onKeyDown(t=>this.onEditorKeyDown(t))),this._register(this._editor.onKeyUp(t=>this.onEditorKeyUp(t))),this._register(this._editor.onDidBlurEditorWidget(()=>this.onEditorBlur())),this._register(this._editor.onDidBlurEditorText(()=>this.onEditorBlur())),this._mouseDown=!1,this._modifierPressed=!1,this._dragSelection=null}onEditorBlur(){this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1,this._modifierPressed=!1}onEditorKeyDown(e){!this._editor.getOption(35)||this._editor.getOption(22)||(CD(e)&&(this._modifierPressed=!0),this._mouseDown&&CD(e)&&this._editor.updateOptions({mouseStyle:"copy"}))}onEditorKeyUp(e){!this._editor.getOption(35)||this._editor.getOption(22)||(CD(e)&&(this._modifierPressed=!1),this._mouseDown&&e.keyCode===e4.TRIGGER_KEY_VALUE&&this._editor.updateOptions({mouseStyle:"default"}))}_onEditorMouseDown(e){this._mouseDown=!0}_onEditorMouseUp(e){this._mouseDown=!1,this._editor.updateOptions({mouseStyle:"text"})}_onEditorMouseDrag(e){const t=e.target;if(this._dragSelection===null){const i=(this._editor.getSelections()||[]).filter(r=>t.position&&r.containsPosition(t.position));if(i.length===1)this._dragSelection=i[0];else return}CD(e.event)?this._editor.updateOptions({mouseStyle:"copy"}):this._editor.updateOptions({mouseStyle:"default"}),t.position&&(this._dragSelection.containsPosition(t.position)?this._removeDecoration():this.showAt(t.position))}_onEditorMouseDropCanceled(){this._editor.updateOptions({mouseStyle:"text"}),this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1}_onEditorMouseDrop(e){if(e.target&&(this._hitContent(e.target)||this._hitMargin(e.target))&&e.target.position){const t=new ee(e.target.position.lineNumber,e.target.position.column);if(this._dragSelection===null){let n=null;if(e.event.shiftKey){const i=this._editor.getSelection();if(i){const{selectionStartLineNumber:r,selectionStartColumn:a}=i;n=[new Ye(r,a,t.lineNumber,t.column)]}}else n=(this._editor.getSelections()||[]).map(i=>i.containsPosition(t)?new Ye(t.lineNumber,t.column,t.lineNumber,t.column):i);this._editor.setSelections(n||[],"mouse",3)}else(!this._dragSelection.containsPosition(t)||(CD(e.event)||this._modifierPressed)&&(this._dragSelection.getEndPosition().equals(t)||this._dragSelection.getStartPosition().equals(t)))&&(this._editor.pushUndoStop(),this._editor.executeCommand(e4.ID,new xgt(this._dragSelection,t,CD(e.event)||this._modifierPressed)),this._editor.pushUndoStop())}this._editor.updateOptions({mouseStyle:"text"}),this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1}showAt(e){this._dndDecorationIds.set([{range:new j(e.lineNumber,e.column,e.lineNumber,e.column),options:e4._DECORATION_OPTIONS}]),this._editor.revealPosition(e,1)}_removeDecoration(){this._dndDecorationIds.clear()}_hitContent(e){return e.type===6||e.type===7}_hitMargin(e){return e.type===2||e.type===3||e.type===4}dispose(){this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1,this._modifierPressed=!1,super.dispose()}}e4.ID="editor.contrib.dragAndDrop";e4.TRIGGER_KEY_VALUE=iu?6:5;e4._DECORATION_OPTIONS=Lt.register({description:"dnd-target",className:"dnd-target"});fu(e4.ID,e4,2);const mR=function(){if(typeof crypto=="object"&&typeof crypto.randomUUID=="function")return crypto.randomUUID.bind(crypto);let u;typeof crypto=="object"&&typeof crypto.getRandomValues=="function"?u=crypto.getRandomValues.bind(crypto):u=function(n){for(let i=0;iIFe(this,void 0,void 0,function*(){return u}),asFile:()=>{},value:typeof u=="string"?u:void 0}}function vgt(u,e,t){const n={id:mR(),name:u,uri:e,data:t};return{asString:()=>IFe(this,void 0,void 0,function*(){return""}),asFile:()=>n,value:void 0}}class OFe{constructor(){this._entries=new Map}get size(){let e=0;for(const t of this._entries)e++;return e}has(e){return this._entries.has(this.toKey(e))}matches(e){const t=[...this._entries.keys()];return $t.some(this,([n,i])=>i.asFile())&&t.push("files"),HFe(Gw(e),t)}get(e){var t;return(t=this._entries.get(this.toKey(e)))===null||t===void 0?void 0:t[0]}append(e,t){const n=this._entries.get(e);n?n.push(t):this._entries.set(this.toKey(e),[t])}replace(e,t){this._entries.set(this.toKey(e),[t])}delete(e){this._entries.delete(this.toKey(e))}*[Symbol.iterator](){for(const[e,t]of this._entries)for(const n of t)yield[e,n]}toKey(e){return Gw(e)}}function Gw(u){return u.toLowerCase()}function jFe(u,e){return HFe(Gw(u),e.map(Gw))}function HFe(u,e){if(u==="*/*")return e.length>0;if(e.includes(u))return!0;const t=u.match(/^([a-z]+)\/([a-z]+|\*)$/i);if(!t)return!1;const[n,i,r]=t;return r==="*"?e.some(a=>a.startsWith(i+"/")):!1}const gR=Object.freeze({create:u=>Lm(u.map(e=>e.toString())).join(`\r `),split:u=>u.split(`\r `),parse:u=>gR.split(u).filter(e=>!e.startsWith("#"))}),Vle={EDITORS:"CodeEditors",FILES:"CodeFiles"};class Cgt{}const bgt={DragAndDropContribution:"workbench.contributions.dragAndDrop"};jn.add(bgt.DragAndDropContribution,new Cgt);class dF{constructor(){}static getInstance(){return dF.INSTANCE}hasData(e){return e&&e===this.proto}getData(e){if(this.hasData(e))return this.data}}dF.INSTANCE=new dF;var kgt=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};function VFe(u){const e=new OFe;for(const t of u.items){const n=t.type;if(t.kind==="string"){const i=new Promise(r=>t.getAsString(r));e.append(n,hte(i))}else if(t.kind==="file"){const i=t.getAsFile();i&&e.append(n,Fgt(i))}}return e}function Fgt(u){const e=u.path?dt.parse(u.path):void 0;return vgt(u.name,e,()=>kgt(this,void 0,void 0,function*(){return new Uint8Array(yield u.arrayBuffer())}))}const ygt=Object.freeze([Vle.EDITORS,Vle.FILES,$k.RESOURCES,$k.INTERNAL_URI_LIST]);function $Fe(u,e=!1){const t=VFe(u),n=t.get($k.INTERNAL_URI_LIST);if(n)t.replace(ci.uriList,n);else if(e||!t.has(ci.uriList)){const i=[];for(const r of u.items){const a=r.getAsFile();if(a){const o=a.path;try{o?i.push(dt.file(o).toString()):i.push(dt.parse(a.name,!0).toString())}catch{}}}i.length&&t.replace(ci.uriList,hte(gR.create(i)))}for(const i of ygt)t.delete(i);return t}function Agt(u,e,t){var n,i;return{edits:[...e.map(r=>new Zh(u,typeof t.insertText=="string"?{range:r,text:t.insertText,insertAsSnippet:!1}:{range:r,text:t.insertText.snippet,insertAsSnippet:!0})),...(i=(n=t.additionalEdit)===null||n===void 0?void 0:n.edits)!==null&&i!==void 0?i:[]]}}function KFe(u){var e;function t(o,s){return"providerId"in o&&o.providerId===s.providerId||"mimeType"in o&&o.mimeType===s.handledMimeType}const n=new Map;for(const o of u)for(const s of(e=o.yieldTo)!==null&&e!==void 0?e:[])for(const l of u)if(l!==o&&t(s,l)){let c=n.get(o);c||(c=[],n.set(o,c)),c.push(l)}if(!n.size)return Array.from(u);const i=new Set,r=[];function a(o){if(!o.length)return[];const s=o[0];if(r.includes(s))return console.warn(`Yield to cycle detected for ${s.providerId}`),o;if(i.has(s))return a(o.slice(1));let l=[];const c=n.get(s);return c&&(r.push(s),l=a(c),r.pop()),i.add(s),[...l,s,...a(o.slice(1))]}return a(Array.from(u))}var _gt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},Sgt=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},Bgt=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};const wgt=Lt.register({description:"inline-progress-widget",stickiness:1,showIfCollapsed:!0,after:{content:jve,inlineClassName:"inline-editor-progress-decoration",inlineClassNameAffectsLetterSpacing:!0}});class fR extends ne{constructor(e,t,n,i,r){super(),this.typeId=e,this.editor=t,this.range=n,this.delegate=r,this.allowEditorOverflow=!1,this.suppressMouseDown=!0,this.create(i),this.editor.addContentWidget(this),this.editor.layoutContentWidget(this)}create(e){this.domNode=ve(".inline-progress-widget"),this.domNode.role="button",this.domNode.title=e;const t=ve("span.icon");this.domNode.append(t),t.classList.add(...st.asClassNameArray(we.loading),"codicon-modifier-spin");const n=()=>{const i=this.editor.getOption(66);this.domNode.style.height=`${i}px`,this.domNode.style.width=`${Math.ceil(.8*i)}px`};n(),this._register(this.editor.onDidChangeConfiguration(i=>{(i.hasChanged(52)||i.hasChanged(66))&&n()})),this._register(ce(this.domNode,Me.CLICK,i=>{this.delegate.cancel()}))}getId(){return fR.baseId+"."+this.typeId}getDomNode(){return this.domNode}getPosition(){return{position:{lineNumber:this.range.startLineNumber,column:this.range.startColumn},preference:[0]}}dispose(){super.dispose(),this.editor.removeContentWidget(this)}}fR.baseId="editor.widget.inlineProgressWidget";let Uw=class extends ne{constructor(e,t,n){super(),this.id=e,this._editor=t,this._instantiationService=n,this._showDelay=500,this._showPromise=this._register(new Ir),this._currentWidget=new Ir,this._operationIdPool=0,this._currentDecorations=t.createDecorationsCollection()}showWhile(e,t,n){return Bgt(this,void 0,void 0,function*(){const i=this._operationIdPool++;this._currentOperation=i,this.clear(),this._showPromise.value=Rm(()=>{const r=j.fromPositions(e);this._currentDecorations.set([{range:r,options:wgt}]).length>0&&(this._currentWidget.value=this._instantiationService.createInstance(fR,this.id,this._editor,r,t,n))},this._showDelay);try{return yield n}finally{this._currentOperation===i&&(this.clear(),this._currentOperation=void 0)}})}clear(){this._showPromise.clear(),this._currentDecorations.clear(),this._currentWidget.clear()}};Uw=_gt([Sgt(2,mt)],Uw);var WFe=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},D2=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},$le=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})},dq;let qw=dq=class extends ne{constructor(e,t,n,i,r,a,o,s,l,c){super(),this.typeId=e,this.editor=t,this.showCommand=i,this.range=r,this.edits=a,this.onSelectNewEdit=o,this._contextMenuService=s,this._keybindingService=c,this.allowEditorOverflow=!0,this.suppressMouseDown=!0,this.create(),this.visibleContext=n.bindTo(l),this.visibleContext.set(!0),this._register(ft(()=>this.visibleContext.reset())),this.editor.addContentWidget(this),this.editor.layoutContentWidget(this),this._register(ft(()=>this.editor.removeContentWidget(this))),this._register(this.editor.onDidChangeCursorPosition(d=>{r.containsPosition(d.position)||this.dispose()})),this._register(Ne.runAndSubscribe(c.onDidUpdateKeybindings,()=>{this._updateButtonTitle()}))}_updateButtonTitle(){var e;const t=(e=this._keybindingService.lookupKeybinding(this.showCommand.id))===null||e===void 0?void 0:e.getLabel();this.button.element.title=this.showCommand.label+(t?` (${t})`:"")}create(){this.domNode=ve(".post-edit-widget"),this.button=this._register(new qG(this.domNode,{supportIcons:!0})),this.button.label="$(insert)",this._register(ce(this.domNode,Me.CLICK,()=>this.showSelector()))}getId(){return dq.baseId+"."+this.typeId}getDomNode(){return this.domNode}getPosition(){return{position:this.range.getEndPosition(),preference:[2]}}showSelector(){this._contextMenuService.showContextMenu({getAnchor:()=>{const e=ji(this.button.element);return{x:e.left+e.width,y:e.top+e.height}},getActions:()=>this.edits.allEdits.map((e,t)=>tx({id:"",label:e.label,checked:t===this.edits.activeEditIndex,run:()=>{if(t!==this.edits.activeEditIndex)return this.onSelectNewEdit(t)}}))})}};qw.baseId="editor.widget.postEditWidget";qw=dq=WFe([D2(7,Wl),D2(8,pt),D2(9,qu)],qw);let Jw=class extends ne{constructor(e,t,n,i,r,a){super(),this._id=e,this._editor=t,this._visibleContext=n,this._showCommand=i,this._instantiationService=r,this._bulkEditService=a,this._currentWidget=this._register(new Ir),this._register(Ne.any(t.onDidChangeModel,t.onDidChangeModelContent)(()=>this.clear()))}applyEditAndShowIfNeeded(e,t,n,i){var r,a;return $le(this,void 0,void 0,function*(){const o=this._editor.getModel();if(!o||!e.length)return;const s=t.allEdits[t.activeEditIndex];if(!s)return;let l=[];(typeof s.insertText=="string"?s.insertText==="":s.insertText.snippet==="")?l=[]:l=e.map(f=>new Zh(o.uri,typeof s.insertText=="string"?{range:f,text:s.insertText,insertAsSnippet:!1}:{range:f,text:s.insertText.snippet,insertAsSnippet:!0}));const d={edits:[...l,...(a=(r=s.additionalEdit)===null||r===void 0?void 0:r.edits)!==null&&a!==void 0?a:[]]},h=e[0],E=o.deltaDecorations([],[{range:h,options:{description:"paste-line-suffix",stickiness:0}}]);let m,g;try{m=yield this._bulkEditService.apply(d,{editor:this._editor,token:i}),g=o.getDecorationRange(E[0])}finally{o.deltaDecorations(E,[])}n&&m.isApplied&&t.allEdits.length>1&&this.show(g??h,t,f=>$le(this,void 0,void 0,function*(){const p=this._editor.getModel();p&&(yield p.undo(),this.applyEditAndShowIfNeeded(e,{activeEditIndex:f,allEdits:t.allEdits},n,i))}))})}show(e,t,n){this.clear(),this._editor.hasModel()&&(this._currentWidget.value=this._instantiationService.createInstance(qw,this._id,this._editor,this._visibleContext,this._showCommand,e,t,n))}clear(){this._currentWidget.clear()}tryShowSelector(){var e;(e=this._currentWidget.value)===null||e===void 0||e.showSelector()}};Jw=WFe([D2(4,mt),D2(5,xA)],Jw);var Lgt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},bD=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},lh=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})},hq;const GFe="editor.changePasteType",UFe=new Pe("pasteWidgetVisible",!1,v("pasteWidgetVisible","Whether the paste widget is showing")),MH="application/vnd.code.copyMetadata";let U3=hq=class extends ne{static get(e){return e.getContribution(hq.ID)}constructor(e,t,n,i,r,a,o){super(),this._bulkEditService=n,this._clipboardService=i,this._languageFeaturesService=r,this._quickInputService=a,this._progressService=o,this._editor=e;const s=e.getContainerDomNode();this._register(ce(s,"copy",l=>this.handleCopy(l))),this._register(ce(s,"cut",l=>this.handleCopy(l))),this._register(ce(s,"paste",l=>this.handlePaste(l),!0)),this._pasteProgressManager=this._register(new Uw("pasteIntoEditor",e,t)),this._postPasteWidgetManager=this._register(t.createInstance(Jw,"pasteIntoEditor",e,UFe,{id:GFe,label:v("postPasteWidgetTitle","Show paste options...")}))}changePasteType(){this._postPasteWidgetManager.tryShowSelector()}pasteAs(e){this._editor.focus();try{this._pasteAsActionContext={preferredId:e},JN().execCommand("paste")}finally{this._pasteAsActionContext=void 0}}isPasteAsEnabled(){return this._editor.getOption(84).enabled&&!this._editor.getOption(90)}handleCopy(e){var t,n;if(!this._editor.hasTextFocus()||(dg&&this._clipboardService.writeResources([]),!e.clipboardData||!this.isPasteAsEnabled()))return;const i=this._editor.getModel(),r=this._editor.getSelections();if(!i||!(r!=null&&r.length))return;const a=this._editor.getOption(37);let o=r;const s=r.length===1&&r[0].isEmpty();if(s){if(!a)return;o=[new j(o[0].startLineNumber,1,o[0].startLineNumber,1+i.getLineLength(o[0].startLineNumber))]}const l=(t=this._editor._getViewModel())===null||t===void 0?void 0:t.getPlainTextToCopy(r,a,na),d={multicursorText:Array.isArray(l)?l:null,pasteOnNewLine:s,mode:null},h=this._languageFeaturesService.documentPasteEditProvider.ordered(i).filter(p=>!!p.prepareDocumentPaste);if(!h.length){this.setCopyMetadata(e.clipboardData,{defaultPastePayload:d});return}const E=VFe(e.clipboardData),m=h.flatMap(p=>{var D;return(D=p.copyMimeTypes)!==null&&D!==void 0?D:[]}),g=mR();this.setCopyMetadata(e.clipboardData,{id:g,providerCopyMimeTypes:m,defaultPastePayload:d});const f=Ui(p=>lh(this,void 0,void 0,function*(){const D=b1(yield Promise.all(h.map(x=>lh(this,void 0,void 0,function*(){try{return yield x.prepareDocumentPaste(i,o,E,p)}catch(b){console.error(b);return}}))));D.reverse();for(const x of D)for(const[b,k]of x)E.replace(b,k);return E}));(n=this._currentCopyOperation)===null||n===void 0||n.dataTransferPromise.cancel(),this._currentCopyOperation={handle:g,dataTransferPromise:f}}handlePaste(e){var t,n;return lh(this,void 0,void 0,function*(){if(!e.clipboardData||!this._editor.hasTextFocus())return;(t=this._currentPasteOperation)===null||t===void 0||t.cancel(),this._currentPasteOperation=void 0;const i=this._editor.getModel(),r=this._editor.getSelections();if(!(r!=null&&r.length)||!i||!this.isPasteAsEnabled())return;const a=this.fetchCopyMetadata(e),o=$Fe(e.clipboardData);o.delete(MH);const s=[...e.clipboardData.types,...(n=a==null?void 0:a.providerCopyMimeTypes)!==null&&n!==void 0?n:[],ci.uriList],l=this._languageFeaturesService.documentPasteEditProvider.ordered(i).filter(c=>{var d;return(d=c.pasteMimeTypes)===null||d===void 0?void 0:d.some(h=>jFe(h,s))});l.length&&(e.preventDefault(),e.stopImmediatePropagation(),this._pasteAsActionContext?this.showPasteAsPick(this._pasteAsActionContext.preferredId,l,r,o,a):this.doPasteInline(l,r,o,a))})}doPasteInline(e,t,n,i){const r=Ui(a=>lh(this,void 0,void 0,function*(){const o=this._editor;if(!o.hasModel())return;const s=o.getModel(),l=new Gm(o,3,void 0,a);try{if(yield this.mergeInDataFromCopy(n,i,l.token),l.token.isCancellationRequested)return;const c=e.filter(h=>Kle(h,n));if(!c.length||c.length===1&&c[0].id==="text"){yield this.applyDefaultPasteHandler(n,i,l.token);return}const d=yield this.getPasteEdits(c,n,s,t,l.token);if(l.token.isCancellationRequested)return;if(d.length===1&&d[0].providerId==="text"){yield this.applyDefaultPasteHandler(n,i,l.token);return}if(d.length){const h=o.getOption(84).showPasteSelector==="afterPaste";return this._postPasteWidgetManager.applyEditAndShowIfNeeded(t,{activeEditIndex:0,allEdits:d},h,l.token)}yield this.applyDefaultPasteHandler(n,i,l.token)}finally{l.dispose(),this._currentPasteOperation===r&&(this._currentPasteOperation=void 0)}}));this._pasteProgressManager.showWhile(t[0].getEndPosition(),v("pasteIntoEditorProgress","Running paste handlers. Click to cancel"),r),this._currentPasteOperation=r}showPasteAsPick(e,t,n,i,r){const a=Ui(o=>lh(this,void 0,void 0,function*(){const s=this._editor;if(!s.hasModel())return;const l=s.getModel(),c=new Gm(s,3,void 0,o);try{if(yield this.mergeInDataFromCopy(i,r,c.token),c.token.isCancellationRequested)return;let d=t.filter(g=>Kle(g,i));e&&(d=d.filter(g=>g.id===e));const h=yield this.getPasteEdits(d,i,l,n,c.token);if(c.token.isCancellationRequested||!h.length)return;let E;if(e)E=h.at(0);else{const g=yield this._quickInputService.pick(h.map(f=>({label:f.label,description:f.providerId,detail:f.detail,edit:f})),{placeHolder:v("pasteAsPickerPlaceholder","Select Paste Action")});E=g==null?void 0:g.edit}if(!E)return;const m=Agt(l.uri,n,E);yield this._bulkEditService.apply(m,{editor:this._editor})}finally{c.dispose(),this._currentPasteOperation===a&&(this._currentPasteOperation=void 0)}}));this._progressService.withProgress({location:10,title:v("pasteAsProgress","Running paste handlers")},()=>a)}setCopyMetadata(e,t){e.setData(MH,JSON.stringify(t))}fetchCopyMetadata(e){var t;if(!e.clipboardData)return;const n=e.clipboardData.getData(MH);if(n)try{return JSON.parse(n)}catch{return}const[i,r]=RW.getTextData(e.clipboardData);if(r)return{defaultPastePayload:{mode:r.mode,multicursorText:(t=r.multicursorText)!==null&&t!==void 0?t:null,pasteOnNewLine:!!r.isFromEmptySelection}}}mergeInDataFromCopy(e,t,n){var i;return lh(this,void 0,void 0,function*(){if(t!=null&&t.id&&((i=this._currentCopyOperation)===null||i===void 0?void 0:i.handle)===t.id){const r=yield this._currentCopyOperation.dataTransferPromise;if(n.isCancellationRequested)return;for(const[a,o]of r)e.replace(a,o)}if(!e.has(ci.uriList)){const r=yield this._clipboardService.readResources();if(n.isCancellationRequested)return;r.length&&e.append(ci.uriList,hte(gR.create(r)))}})}getPasteEdits(e,t,n,i,r){return lh(this,void 0,void 0,function*(){const a=yield YN(Promise.all(e.map(s=>lh(this,void 0,void 0,function*(){var l;try{const c=yield(l=s.provideDocumentPasteEdits)===null||l===void 0?void 0:l.call(s,n,i,t,r);if(c)return Object.assign(Object.assign({},c),{providerId:s.id})}catch(c){console.error(c)}}))),r),o=b1(a??[]);return KFe(o)})}applyDefaultPasteHandler(e,t,n){var i,r,a;return lh(this,void 0,void 0,function*(){const o=(i=e.get(ci.text))!==null&&i!==void 0?i:e.get("text");if(!o)return;const s=yield o.asString();if(n.isCancellationRequested)return;const l={text:s,pasteOnNewLine:(r=t==null?void 0:t.defaultPastePayload.pasteOnNewLine)!==null&&r!==void 0?r:!1,multicursorText:(a=t==null?void 0:t.defaultPastePayload.multicursorText)!==null&&a!==void 0?a:null,mode:null};this._editor.trigger("keyboard","paste",l)})}};U3.ID="editor.contrib.copyPasteActionController";U3=hq=Lgt([bD(1,mt),bD(2,xA),bD(3,_4),bD(4,We),bD(5,md),bD(6,xbe)],U3);function Kle(u,e){var t;return!!(!((t=u.pasteMimeTypes)===null||t===void 0)&&t.some(n=>e.matches(n)))}var Ete=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},hF=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},yv=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})};const mte=v("builtIn","Built-in");class gte{provideDocumentPasteEdits(e,t,n,i){return yv(this,void 0,void 0,function*(){const r=yield this.getEdit(n,i);return r?{insertText:r.insertText,label:r.label,detail:r.detail,handledMimeType:r.handledMimeType,yieldTo:r.yieldTo}:void 0})}provideDocumentOnDropEdits(e,t,n,i){return yv(this,void 0,void 0,function*(){const r=yield this.getEdit(n,i);return r?{insertText:r.insertText,label:r.label,handledMimeType:r.handledMimeType,yieldTo:r.yieldTo}:void 0})}}class qFe extends gte{constructor(){super(...arguments),this.id="text",this.dropMimeTypes=[ci.text],this.pasteMimeTypes=[ci.text]}getEdit(e,t){return yv(this,void 0,void 0,function*(){const n=e.get(ci.text);if(!n||e.has(ci.uriList))return;const i=yield n.asString();return{handledMimeType:ci.text,label:v("text.label","Insert Plain Text"),detail:mte,insertText:i}})}}class JFe extends gte{constructor(){super(...arguments),this.id="uri",this.dropMimeTypes=[ci.uriList],this.pasteMimeTypes=[ci.uriList]}getEdit(e,t){return yv(this,void 0,void 0,function*(){const n=yield ZFe(e);if(!n.length||t.isCancellationRequested)return;let i=0;const r=n.map(({uri:o,originalText:s})=>o.scheme===Ot.file?o.fsPath:(i++,s)).join(" ");let a;return i>0?a=n.length>1?v("defaultDropProvider.uriList.uris","Insert Uris"):v("defaultDropProvider.uriList.uri","Insert Uri"):a=n.length>1?v("defaultDropProvider.uriList.paths","Insert Paths"):v("defaultDropProvider.uriList.path","Insert Path"),{handledMimeType:ci.uriList,insertText:r,label:a,detail:mte}})}}let Zw=class extends gte{constructor(e){super(),this._workspaceContextService=e,this.id="relativePath",this.dropMimeTypes=[ci.uriList],this.pasteMimeTypes=[ci.uriList]}getEdit(e,t){return yv(this,void 0,void 0,function*(){const n=yield ZFe(e);if(!n.length||t.isCancellationRequested)return;const i=b1(n.map(({uri:r})=>{const a=this._workspaceContextService.getWorkspaceFolder(r);return a?tit(a.uri,r):void 0}));if(i.length)return{handledMimeType:ci.uriList,insertText:i.join(" "),label:n.length>1?v("defaultDropProvider.uriList.relativePaths","Insert Relative Paths"):v("defaultDropProvider.uriList.relativePath","Insert Relative Path"),detail:mte}})}};Zw=Ete([hF(0,M3)],Zw);function ZFe(u){return yv(this,void 0,void 0,function*(){const e=u.get(ci.uriList);if(!e)return[];const t=yield e.asString(),n=[];for(const i of gR.parse(t))try{n.push({uri:dt.parse(i),originalText:i})}catch{}return n})}let Eq=class extends ne{constructor(e,t){super(),this._register(e.documentOnDropEditProvider.register("*",new qFe)),this._register(e.documentOnDropEditProvider.register("*",new JFe)),this._register(e.documentOnDropEditProvider.register("*",new Zw(t)))}};Eq=Ete([hF(0,We),hF(1,M3)],Eq);let mq=class extends ne{constructor(e,t){super(),this._register(e.documentPasteEditProvider.register("*",new qFe)),this._register(e.documentPasteEditProvider.register("*",new JFe)),this._register(e.documentPasteEditProvider.register("*",new Zw(t)))}};mq=Ete([hF(0,We),hF(1,M3)],mq);fu(U3.ID,U3,0);KP(mq);ze(new class extends xr{constructor(){super({id:GFe,precondition:UFe,kbOpts:{weight:100,primary:2137}})}runEditorCommand(u,e,t){var n;return(n=U3.get(e))===null||n===void 0?void 0:n.changePasteType()}});be(class extends $e{constructor(){super({id:"editor.action.pasteAs",label:v("pasteAs","Paste As..."),alias:"Paste As...",precondition:void 0,description:{description:"Paste as",args:[{name:"args",schema:{type:"object",properties:{id:{type:"string",description:v("pasteAs.id","The id of the paste edit to try applying. If not provided, the editor will show a picker.")}}}}]}})}run(u,e,t){var n;const i=typeof(t==null?void 0:t.id)=="string"?t.id:void 0;return(n=U3.get(e))===null||n===void 0?void 0:n.pasteAs(i)}});class zgt{constructor(){this._dragOperations=new Map}removeDragOperationTransfer(e){if(e&&this._dragOperations.has(e)){const t=this._dragOperations.get(e);return this._dragOperations.delete(e),t}}}class Wle{constructor(e){this.identifier=e}}const YFe=Ut("treeViewsDndService");au(YFe,zgt,1);var Mgt=globalThis&&globalThis.__decorate||function(u,e,t,n){var i=arguments.length,r=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(u,e,t,n);else for(var o=u.length-1;o>=0;o--)(a=u[o])&&(r=(i<3?a(r):i>3?a(e,t,r):a(e,t))||r);return i>3&&r&&Object.defineProperty(e,t,r),r},$9=globalThis&&globalThis.__param||function(u,e){return function(t,n){e(t,n,u)}},AC=globalThis&&globalThis.__awaiter||function(u,e,t,n){function i(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function o(c){try{l(n.next(c))}catch(d){a(d)}}function s(c){try{l(n.throw(c))}catch(d){a(d)}}function l(c){c.done?r(c.value):i(c.value).then(o,s)}l((n=n.apply(u,e||[])).next())})},gq;const QFe="editor.experimental.dropIntoEditor.defaultProvider",XFe="editor.changeDropType",eye=new Pe("dropWidgetVisible",!1,v("dropWidgetVisible","Whether the drop widget is showing"));let Av=gq=class extends ne{static get(e){return e.getContribution(gq.ID)}constructor(e,t,n,i,r){super(),this._configService=n,this._languageFeaturesService=i,this._treeViewsDragAndDropService=r,this.treeItemsTransfer=dF.getInstance(),this._dropProgressManager=this._register(t.createInstance(Uw,"dropIntoEditor",e)),this._postDropWidgetManager=this._register(t.createInstance(Jw,"dropIntoEditor",e,eye,{id:XFe,label:v("postDropWidgetTitle","Show drop options...")})),this._register(e.onDropIntoEditor(a=>this.onDropIntoEditor(e,a.position,a.event)))}changeDropType(){this._postDropWidgetManager.tryShowSelector()}onDropIntoEditor(e,t,n){var i;return AC(this,void 0,void 0,function*(){if(!n.dataTransfer||!e.hasModel())return;(i=this._currentOperation)===null||i===void 0||i.cancel(),e.focus(),e.setPosition(t);const r=Ui(a=>AC(this,void 0,void 0,function*(){const o=new Gm(e,1,void 0,a);try{const s=yield this.extractDataTransferData(n);if(s.size===0||o.token.isCancellationRequested)return;const l=e.getModel();if(!l)return;const c=this._languageFeaturesService.documentOnDropEditProvider.ordered(l).filter(h=>h.dropMimeTypes?h.dropMimeTypes.some(E=>s.matches(E)):!0),d=yield this.getDropEdits(c,l,t,s,o);if(o.token.isCancellationRequested)return;if(d.length){const h=this.getInitialActiveEditIndex(l,d),E=e.getOption(36).showDropSelector==="afterDrop";yield this._postDropWidgetManager.applyEditAndShowIfNeeded([j.fromPositions(t)],{activeEditIndex:h,allEdits:d},E,a)}}finally{o.dispose(),this._currentOperation===r&&(this._currentOperation=void 0)}}));this._dropProgressManager.showWhile(t,v("dropIntoEditorProgress","Running drop handlers. Click to cancel"),r),this._currentOperation=r})}getDropEdits(e,t,n,i,r){return AC(this,void 0,void 0,function*(){const a=yield YN(Promise.all(e.map(s=>AC(this,void 0,void 0,function*(){try{const l=yield s.provideDocumentOnDropEdits(t,n,i,r.token);if(l)return Object.assign(Object.assign({},l),{providerId:s.id})}catch(l){console.error(l)}}))),r.token),o=b1(a??[]);return KFe(o)})}getInitialActiveEditIndex(e,t){const n=this._configService.getValue(QFe,{resource:e.uri});for(const[i,r]of Object.entries(n)){const a=t.findIndex(o=>r===o.providerId&&o.handledMimeType&&jFe(i,[o.handledMimeType]));if(a>=0)return a}return 0}extractDataTransferData(e){return AC(this,void 0,void 0,function*(){if(!e.dataTransfer)return new OFe;const t=$Fe(e.dataTransfer);if(this.treeItemsTransfer.hasData(Wle.prototype)){const n=this.treeItemsTransfer.getData(Wle.prototype);if(Array.isArray(n))for(const i of n){const r=yield this._treeViewsDragAndDropService.removeDragOperationTransfer(i.identifier);if(r)for(const[a,o]of r)t.replace(a,o)}}return t})}};Av.ID="editor.contrib.dropIntoEditorController";Av=gq=Mgt([$9(1,mt),$9(2,tu),$9(3,We),$9(4,YFe)],Av);fu(Av.ID,Av,2);ze(new class extends xr{constructor(){super({id:XFe,precondition:eye,kbOpts:{weight:100,primary:2137}})}runEditorCommand(u,e,t){var n;(n=Av.get(e))===null||n===void 0||n.changeDropType()}});KP(Eq);jn.as(Ed.Configuration).registerConfiguration(Object.assign(Object.assign({},FP),{properties:{[QFe]:{type:"object",scope:5,description:v("defaultProviderDescription","Configures the default drop provider to use for content of a given mime type."),default:{},additionalProperties:{type:"string"}}}}));class _a{constructor(e){this._editor=e,this._decorations=[],this._overviewRulerApproximateDecorations=[],this._findScopeDecorationIds=[],this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null,this._startPosition=this._editor.getPosition()}dispose(){this._editor.removeDecorations(this._allDecorations()),this._decorations=[],this._overviewRulerApproximateDecorations=[],this._findScopeDecorationIds=[],this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null}reset(){this._decorations=[],this._overviewRulerApproximateDecorations=[],this._findScopeDecorationIds=[],this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null}getCount(){return this._decorations.length}getFindScope(){return this._findScopeDecorationIds[0]?this._editor.getModel().getDecorationRange(this._findScopeDecorationIds[0]):null}getFindScopes(){if(this._findScopeDecorationIds.length){const e=this._findScopeDecorationIds.map(t=>this._editor.getModel().getDecorationRange(t)).filter(t=>!!t);if(e.length)return e}return null}getStartPosition(){return this._startPosition}setStartPosition(e){this._startPosition=e,this.setCurrentFindMatch(null)}_getDecorationIndex(e){const t=this._decorations.indexOf(e);return t>=0?t+1:1}getDecorationRangeAt(e){const t=e{if(this._highlightedDecorationId!==null&&(i.changeDecorationOptions(this._highlightedDecorationId,_a._FIND_MATCH_DECORATION),this._highlightedDecorationId=null),t!==null&&(this._highlightedDecorationId=t,i.changeDecorationOptions(this._highlightedDecorationId,_a._CURRENT_FIND_MATCH_DECORATION)),this._rangeHighlightDecorationId!==null&&(i.removeDecoration(this._rangeHighlightDecorationId),this._rangeHighlightDecorationId=null),t!==null){let r=this._editor.getModel().getDecorationRange(t);if(r.startLineNumber!==r.endLineNumber&&r.endColumn===1){const a=r.endLineNumber-1,o=this._editor.getModel().getLineMaxColumn(a);r=new j(r.startLineNumber,r.startColumn,a,o)}this._rangeHighlightDecorationId=i.addDecoration(r,_a._RANGE_HIGHLIGHT_DECORATION)}}),n}set(e,t){this._editor.changeDecorations(n=>{let i=_a._FIND_MATCH_DECORATION;const r=[];if(e.length>1e3){i=_a._FIND_MATCH_NO_OVERVIEW_DECORATION;const o=this._editor.getModel().getLineCount(),l=this._editor.getLayoutInfo().height/o,c=Math.max(2,Math.ceil(3/l));let d=e[0].range.startLineNumber,h=e[0].range.endLineNumber;for(let E=1,m=e.length;E=g.startLineNumber?g.endLineNumber>h&&(h=g.endLineNumber):(r.push({range:new j(d,1,h,1),options:_a._FIND_MATCH_ONLY_OVERVIEW_DECORATION}),d=g.startLineNumber,h=g.endLineNumber)}r.push({range:new j(d,1,h,1),options:_a._FIND_MATCH_ONLY_OVERVIEW_DECORATION})}const a=new Array(e.length);for(let o=0,s=e.length;on.removeDecoration(o)),this._findScopeDecorationIds=[]),t!=null&&t.length&&(this._findScopeDecorationIds=t.map(o=>n.addDecoration(o,_a._FIND_SCOPE_DECORATION)))})}matchBeforePosition(e){if(this._decorations.length===0)return null;for(let t=this._decorations.length-1;t>=0;t--){const n=this._decorations[t],i=this._editor.getModel().getDecorationRange(n);if(!(!i||i.endLineNumber>e.lineNumber)){if(i.endLineNumbere.column))return i}}return this._editor.getModel().getDecorationRange(this._decorations[this._decorations.length-1])}matchAfterPosition(e){if(this._decorations.length===0)return null;for(let t=0,n=this._decorations.length;te.lineNumber)return r;if(!(r.startColumn0){const n=[];for(let a=0;aj.compareRangesUsingStarts(a.range,o.range));const i=[];let r=n[0];for(let a=1;a0?e[0].toUpperCase()+e.substr(1):u[0][0].toUpperCase()!==u[0][0]&&e.length>0?e[0].toLowerCase()+e.substr(1):e}else return e}function Gle(u,e,t){return u[0].indexOf(t)!==-1&&e.indexOf(t)!==-1&&u[0].split(t).length===e.split(t).length}function Ule(u,e,t){const n=e.split(t),i=u[0].split(t);let r="";return n.forEach((a,o)=>{r+=tye([i[o]],a)+t}),r.slice(0,-1)}class qle{constructor(e){this.staticValue=e,this.kind=0}}class Ngt{constructor(e){this.pieces=e,this.kind=1}}class _v{static fromStaticValue(e){return new _v([d3.staticValue(e)])}get hasReplacementPatterns(){return this._state.kind===1}constructor(e){!e||e.length===0?this._state=new qle(""):e.length===1&&e[0].staticValue!==null?this._state=new qle(e[0].staticValue):this._state=new Ngt(e)}buildReplaceString(e,t){if(this._state.kind===0)return t?tye(e,this._state.staticValue):this._state.staticValue;let n="";for(let i=0,r=this._state.pieces.length;i0){const s=[],l=a.caseOps.length;let c=0;for(let d=0,h=o.length;d=l){s.push(o.slice(d));break}switch(a.caseOps[c]){case"U":s.push(o[d].toUpperCase());break;case"u":s.push(o[d].toUpperCase()),c++;break;case"L":s.push(o[d].toLowerCase());break;case"l":s.push(o[d].toLowerCase()),c++;break;default:s.push(o[d])}}o=s.join("")}n+=o}return n}static _substitute(e,t){if(t===null)return"";if(e===0)return t[0];let n="";for(;e>0;){if(e=i)break;const a=u.charCodeAt(n);switch(a){case 92:t.emitUnchanged(n-1),t.emitStatic("\\",n+1);break;case 110:t.emitUnchanged(n-1),t.emitStatic(` @@ -983,7 +983,7 @@ In some cases, you need to provide options to alter GraphQL's execution behavior } } } - `}function MWt(u,e){D4(u)&&D4(u.__schema)||In(!1,`Invalid or incomplete introspection result. Ensure that you are passing "data" property of introspection response and no "errors" was returned alongside: ${Tt(u)}.`);const t=u.__schema,n=Qf(t.types,w=>w.name,w=>h(w));for(const w of[...dWt,...oTe])n[w.name]&&(n[w.name]=w);const i=t.queryType?c(t.queryType):null,r=t.mutationType?c(t.mutationType):null,a=t.subscriptionType?c(t.subscriptionType):null,o=t.directives?t.directives.map(S):[];return new sTe({description:t.description,query:i,mutation:r,subscription:a,types:Object.values(n),directives:o,assumeValid:e==null?void 0:e.assumeValid});function s(w){if(w.kind===fi.LIST){const z=w.ofType;if(!z)throw new Error("Decorated type deeper than introspection query.");return new Is(s(z))}if(w.kind===fi.NON_NULL){const z=w.ofType;if(!z)throw new Error("Decorated type deeper than introspection query.");const N=s(z);return new Qu(iWt(N))}return l(w)}function l(w){const z=w.name;if(!z)throw new Error(`Unknown type reference: ${Tt(w)}.`);const N=n[z];if(!N)throw new Error(`Invalid or incomplete schema, unknown type: ${z}. Ensure that a full introspection query is used in order to build a client schema.`);return N}function c(w){return tWt(l(w))}function d(w){return uWt(l(w))}function h(w){if(w!=null&&w.name!=null&&w.kind!=null)switch(w.kind){case fi.SCALAR:return E(w);case fi.OBJECT:return g(w);case fi.INTERFACE:return f(w);case fi.UNION:return p(w);case fi.ENUM:return D(w);case fi.INPUT_OBJECT:return x(w)}const z=Tt(w);throw new Error(`Invalid or incomplete introspection result. Ensure that a full introspection query is used in order to build a client schema: ${z}.`)}function E(w){return new Qp({name:w.name,description:w.description,specifiedByURL:w.specifiedByURL})}function m(w){if(w.interfaces===null&&w.kind===fi.INTERFACE)return[];if(!w.interfaces){const z=Tt(w);throw new Error(`Introspection result missing interfaces: ${z}.`)}return w.interfaces.map(d)}function g(w){return new Z1({name:w.name,description:w.description,interfaces:()=>m(w),fields:()=>b(w)})}function f(w){return new Px({name:w.name,description:w.description,interfaces:()=>m(w),fields:()=>b(w)})}function p(w){if(!w.possibleTypes){const z=Tt(w);throw new Error(`Introspection result missing possibleTypes: ${z}.`)}return new YMe({name:w.name,description:w.description,types:()=>w.possibleTypes.map(c)})}function D(w){if(!w.enumValues){const z=Tt(w);throw new Error(`Introspection result missing enumValues: ${z}.`)}return new I6({name:w.name,description:w.description,values:Qf(w.enumValues,z=>z.name,z=>({description:z.description,deprecationReason:z.deprecationReason}))})}function x(w){if(!w.inputFields){const z=Tt(w);throw new Error(`Introspection result missing inputFields: ${z}.`)}return new One({name:w.name,description:w.description,fields:()=>A(w.inputFields)})}function b(w){if(!w.fields)throw new Error(`Introspection result missing fields: ${Tt(w)}.`);return Qf(w.fields,z=>z.name,k)}function k(w){const z=s(w.type);if(!D3(z)){const N=Tt(z);throw new Error(`Introspection must provide output type for fields, but received: ${N}.`)}if(!w.args){const N=Tt(w);throw new Error(`Introspection result missing field args: ${N}.`)}return{description:w.description,deprecationReason:w.deprecationReason,type:z,args:A(w.args)}}function A(w){return Qf(w,z=>z.name,F)}function F(w){const z=s(w.type);if(!hl(z)){const O=Tt(z);throw new Error(`Introspection must provide input type for arguments, but received: ${O}.`)}const N=w.defaultValue!=null?Hb(HKt(w.defaultValue),z):void 0;return{description:w.description,type:z,defaultValue:N,deprecationReason:w.deprecationReason}}function S(w){if(!w.args){const z=Tt(w);throw new Error(`Introspection result missing directive args: ${z}.`)}if(!w.locations){const z=Tt(w);throw new Error(`Introspection result missing directive locations: ${z}.`)}return new O6({name:w.name,description:w.description,isRepeatable:w.isRepeatable,locations:w.locations.slice(),args:A(w.args)})}}const _fe=u=>{var n,i;let e;const t=u.definitions.filter(r=>r.kind==="OperationDefinition");return t.length===1&&(e=(i=(n=t[0])==null?void 0:n.name)==null?void 0:i.value),e},a$=u=>{if(typeof u=="string"){let t;try{const n=Bg(u);t=_fe(n)}catch{}return{query:u,operationName:t}}const e=_fe(u);return{query:u0(u),operationName:e}};class j2 extends Error{constructor(e,t){const n=`${j2.extractMessage(e)}: ${JSON.stringify({response:e,request:t})}`;super(n),Object.setPrototypeOf(this,j2.prototype),this.response=e,this.request=t,typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,j2)}static extractMessage(e){var t,n;return((n=(t=e.errors)==null?void 0:t[0])==null?void 0:n.message)??`GraphQL Error (Code: ${e.status})`}}var qZ={exports:{}};(function(u,e){var t=typeof self<"u"?self:bl,n=function(){function r(){this.fetch=!1,this.DOMException=t.DOMException}return r.prototype=t,new r}();(function(r){(function(a){var o={searchParams:"URLSearchParams"in r,iterable:"Symbol"in r&&"iterator"in Symbol,blob:"FileReader"in r&&"Blob"in r&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in r,arrayBuffer:"ArrayBuffer"in r};function s(_){return _&&DataView.prototype.isPrototypeOf(_)}if(o.arrayBuffer)var l=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],c=ArrayBuffer.isView||function(_){return _&&l.indexOf(Object.prototype.toString.call(_))>-1};function d(_){if(typeof _!="string"&&(_=String(_)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(_))throw new TypeError("Invalid character in header field name");return _.toLowerCase()}function h(_){return typeof _!="string"&&(_=String(_)),_}function E(_){var L={next:function(){var T=_.shift();return{done:T===void 0,value:T}}};return o.iterable&&(L[Symbol.iterator]=function(){return L}),L}function m(_){this.map={},_ instanceof m?_.forEach(function(L,T){this.append(T,L)},this):Array.isArray(_)?_.forEach(function(L){this.append(L[0],L[1])},this):_&&Object.getOwnPropertyNames(_).forEach(function(L){this.append(L,_[L])},this)}m.prototype.append=function(_,L){_=d(_),L=h(L);var T=this.map[_];this.map[_]=T?T+", "+L:L},m.prototype.delete=function(_){delete this.map[d(_)]},m.prototype.get=function(_){return _=d(_),this.has(_)?this.map[_]:null},m.prototype.has=function(_){return this.map.hasOwnProperty(d(_))},m.prototype.set=function(_,L){this.map[d(_)]=h(L)},m.prototype.forEach=function(_,L){for(var T in this.map)this.map.hasOwnProperty(T)&&_.call(L,this.map[T],T,this)},m.prototype.keys=function(){var _=[];return this.forEach(function(L,T){_.push(T)}),E(_)},m.prototype.values=function(){var _=[];return this.forEach(function(L){_.push(L)}),E(_)},m.prototype.entries=function(){var _=[];return this.forEach(function(L,T){_.push([T,L])}),E(_)},o.iterable&&(m.prototype[Symbol.iterator]=m.prototype.entries);function g(_){if(_.bodyUsed)return Promise.reject(new TypeError("Already read"));_.bodyUsed=!0}function f(_){return new Promise(function(L,T){_.onload=function(){L(_.result)},_.onerror=function(){T(_.error)}})}function p(_){var L=new FileReader,T=f(L);return L.readAsArrayBuffer(_),T}function D(_){var L=new FileReader,T=f(L);return L.readAsText(_),T}function x(_){for(var L=new Uint8Array(_),T=new Array(L.length),R=0;R-1?L:_}function S(_,L){L=L||{};var T=L.body;if(_ instanceof S){if(_.bodyUsed)throw new TypeError("Already read");this.url=_.url,this.credentials=_.credentials,L.headers||(this.headers=new m(_.headers)),this.method=_.method,this.mode=_.mode,this.signal=_.signal,!T&&_._bodyInit!=null&&(T=_._bodyInit,_.bodyUsed=!0)}else this.url=String(_);if(this.credentials=L.credentials||this.credentials||"same-origin",(L.headers||!this.headers)&&(this.headers=new m(L.headers)),this.method=F(L.method||this.method||"GET"),this.mode=L.mode||this.mode||null,this.signal=L.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&T)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(T)}S.prototype.clone=function(){return new S(this,{body:this._bodyInit})};function w(_){var L=new FormData;return _.trim().split("&").forEach(function(T){if(T){var R=T.split("="),I=R.shift().replace(/\+/g," "),H=R.join("=").replace(/\+/g," ");L.append(decodeURIComponent(I),decodeURIComponent(H))}}),L}function z(_){var L=new m,T=_.replace(/\r?\n[\t ]+/g," ");return T.split(/\r?\n/).forEach(function(R){var I=R.split(":"),H=I.shift().trim();if(H){var V=I.join(":").trim();L.append(H,V)}}),L}k.call(S.prototype);function N(_,L){L||(L={}),this.type="default",this.status=L.status===void 0?200:L.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in L?L.statusText:"OK",this.headers=new m(L.headers),this.url=L.url||"",this._initBody(_)}k.call(N.prototype),N.prototype.clone=function(){return new N(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new m(this.headers),url:this.url})},N.error=function(){var _=new N(null,{status:0,statusText:""});return _.type="error",_};var O=[301,302,303,307,308];N.redirect=function(_,L){if(O.indexOf(L)===-1)throw new RangeError("Invalid status code");return new N(null,{status:L,headers:{location:_}})},a.DOMException=r.DOMException;try{new a.DOMException}catch{a.DOMException=function(L,T){this.message=L,this.name=T;var R=Error(L);this.stack=R.stack},a.DOMException.prototype=Object.create(Error.prototype),a.DOMException.prototype.constructor=a.DOMException}function y(_,L){return new Promise(function(T,R){var I=new S(_,L);if(I.signal&&I.signal.aborted)return R(new a.DOMException("Aborted","AbortError"));var H=new XMLHttpRequest;function V(){H.abort()}H.onload=function(){var U={status:H.status,statusText:H.statusText,headers:z(H.getAllResponseHeaders()||"")};U.url="responseURL"in H?H.responseURL:U.headers.get("X-Request-URL");var J="response"in H?H.response:H.responseText;T(new N(J,U))},H.onerror=function(){R(new TypeError("Network request failed"))},H.ontimeout=function(){R(new TypeError("Network request failed"))},H.onabort=function(){R(new a.DOMException("Aborted","AbortError"))},H.open(I.method,I.url,!0),I.credentials==="include"?H.withCredentials=!0:I.credentials==="omit"&&(H.withCredentials=!1),"responseType"in H&&o.blob&&(H.responseType="blob"),I.headers.forEach(function(U,J){H.setRequestHeader(J,U)}),I.signal&&(I.signal.addEventListener("abort",V),H.onreadystatechange=function(){H.readyState===4&&I.signal.removeEventListener("abort",V)}),H.send(typeof I._bodyInit>"u"?null:I._bodyInit)})}return y.polyfill=!0,r.fetch||(r.fetch=y,r.Headers=m,r.Request=S,r.Response=N),a.Headers=m,a.Request=S,a.Response=N,a.fetch=y,Object.defineProperty(a,"__esModule",{value:!0}),a})({})})(n),n.fetch.ponyfill=!0,delete n.fetch.polyfill;var i=n;e=i.fetch,e.default=i.fetch,e.fetch=i.fetch,e.Headers=i.Headers,e.Request=i.Request,e.Response=i.Response,u.exports=e})(qZ,qZ.exports);var fT=qZ.exports;const G8=Hl(fT),TWt=Lxe({__proto__:null,default:G8},[fT]),RD=u=>{let e={};return u&&(typeof Headers<"u"&&u instanceof Headers||TWt&&fT.Headers&&u instanceof fT.Headers?e=cKt(u):Array.isArray(u)?u.forEach(([t,n])=>{t&&n!==void 0&&(e[t]=n)}):e=u),e},Sfe=u=>u.replace(/([\s,]|#[^\n\r]+)+/g," ").trim(),NWt=u=>{if(!Array.isArray(u.query)){const n=u,i=[`query=${encodeURIComponent(Sfe(n.query))}`];return u.variables&&i.push(`variables=${encodeURIComponent(n.jsonSerializer.stringify(n.variables))}`),n.operationName&&i.push(`operationName=${encodeURIComponent(n.operationName)}`),i.join("&")}if(typeof u.variables<"u"&&!Array.isArray(u.variables))throw new Error("Cannot create query with given variable type, array expected");const e=u,t=u.query.reduce((n,i,r)=>(n.push({query:Sfe(i),variables:e.variables?e.jsonSerializer.stringify(e.variables[r]):void 0}),n),[]);return`query=${encodeURIComponent(e.jsonSerializer.stringify(t))}`},PWt=u=>async e=>{const{url:t,query:n,variables:i,operationName:r,fetch:a,fetchOptions:o,middleware:s}=e,l={...e.headers};let c="",d;u==="POST"?(d=RWt(n,i,r,o.jsonSerializer),typeof d=="string"&&(l["Content-Type"]="application/json")):c=NWt({query:n,variables:i,operationName:r,jsonSerializer:o.jsonSerializer??Mne});const h={method:u,headers:l,body:d,...o};let E=t,m=h;if(s){const g=await Promise.resolve(s({...h,url:t,operationName:r,variables:i})),{url:f,...p}=g;E=f,m=p}return c&&(E=`${E}?${c}`),await a(E,m)};class dTe{constructor(e,t={}){this.url=e,this.requestConfig=t,this.rawRequest=async(...n)=>{const[i,r,a]=n,o=hKt(i,r,a),{headers:s,fetch:l=G8,method:c="POST",requestMiddleware:d,responseMiddleware:h,...E}=this.requestConfig,{url:m}=this;o.signal!==void 0&&(E.signal=o.signal);const{operationName:g}=a$(o.query);return o$({url:m,query:o.query,variables:o.variables,headers:{...RD(s$(s)),...RD(o.requestHeaders)},operationName:g,fetch:l,method:c,fetchOptions:E,middleware:d}).then(f=>(h&&h(f),f)).catch(f=>{throw h&&h(f),f})}}async request(e,...t){const[n,i]=t,r=dKt(e,n,i),{headers:a,fetch:o=G8,method:s="POST",requestMiddleware:l,responseMiddleware:c,...d}=this.requestConfig,{url:h}=this;r.signal!==void 0&&(d.signal=r.signal);const{query:E,operationName:m}=a$(r.document);return o$({url:h,query:E,variables:r.variables,headers:{...RD(s$(a)),...RD(r.requestHeaders)},operationName:m,fetch:o,method:s,fetchOptions:d,middleware:l}).then(g=>(c&&c(g),g.data)).catch(g=>{throw c&&c(g),g})}batchRequests(e,t){const n=EKt(e,t),{headers:i,...r}=this.requestConfig;n.signal!==void 0&&(r.signal=n.signal);const a=n.documents.map(({document:s})=>a$(s).query),o=n.documents.map(({variables:s})=>s);return o$({url:this.url,query:a,variables:o,headers:{...RD(s$(i)),...RD(n.requestHeaders)},operationName:void 0,fetch:this.requestConfig.fetch??G8,method:this.requestConfig.method||"POST",fetchOptions:r,middleware:this.requestConfig.requestMiddleware}).then(s=>(this.requestConfig.responseMiddleware&&this.requestConfig.responseMiddleware(s),s.data)).catch(s=>{throw this.requestConfig.responseMiddleware&&this.requestConfig.responseMiddleware(s),s})}setHeaders(e){return this.requestConfig.headers=e,this}setHeader(e,t){const{headers:n}=this.requestConfig;return n?n[e]=t:this.requestConfig.headers={[e]:t},this}setEndpoint(e){return this.url=e,this}}const o$=async u=>{const{query:e,variables:t,fetchOptions:n}=u,i=PWt(lKt(u.method??"post")),r=Array.isArray(u.query),a=await i(u),o=await IWt(a,n.jsonSerializer??Mne),s=Array.isArray(o)?!o.some(({data:c})=>!c):!!o.data,l=Array.isArray(o)||!o.errors||Array.isArray(o.errors)&&!o.errors.length||n.errorPolicy==="all"||n.errorPolicy==="ignore";if(a.ok&&l&&s){const{errors:c,...d}=(Array.isArray(o),o),h=n.errorPolicy==="ignore"?d:o;return{...r?{data:h}:h,headers:a.headers,status:a.status}}else{const c=typeof o=="string"?{error:o}:o;throw new j2({...c,status:a.status,headers:a.headers},{query:e,variables:t})}};async function JZ(u,e,...t){const n=mKt(u,e,...t);return new dTe(n.url).request({...n})}const RWt=(u,e,t,n)=>{const i=n??Mne;if(!Array.isArray(u))return i.stringify({query:u,variables:e,operationName:t});if(typeof e<"u"&&!Array.isArray(e))throw new Error("Cannot create request body with given variable type, array expected");const r=u.reduce((a,o,s)=>(a.push({query:o,variables:e?e[s]:void 0}),a),[]);return i.stringify(r)},IWt=async(u,e)=>{let t;return u.headers.forEach((n,i)=>{i.toLowerCase()==="content-type"&&(t=n)}),t&&(t.toLowerCase().startsWith("application/json")||t.toLowerCase().startsWith("application/graphql+json")||t.toLowerCase().startsWith("application/graphql-response+json"))?e.parse(await u.text()):u.text()},s$=u=>typeof u=="function"?u():u;let pT=u=>u,Qd={},Nd={addEventListener(){},removeEventListener(){}};function OWt(){try{return typeof localStorage<"u"}catch{return!1}}OWt()&&(Qd=localStorage);let jWt={addEventListener(u,e,t){window.addEventListener("storage",e),window.addEventListener("pageshow",t)},removeEventListener(u,e,t){window.removeEventListener("storage",e),window.removeEventListener("pageshow",t)}};typeof window<"u"&&(Nd=jWt);function Vne(u,e=void 0,t={}){let n=t.encode||pT,i=t.decode||pT,r=Bne(e),a=r.set;r.set=l=>{typeof l>"u"?delete Qd[u]:Qd[u]=n(l),a(l)};function o(l){l.key===u?l.newValue===null?a(void 0):a(i(l.newValue)):Qd[u]||a(void 0)}function s(){r.set(Qd[u]?i(Qd[u]):e)}return EMe(r,()=>{if(s(),t.listen!==!1)return Nd.addEventListener(u,o,s),()=>{Nd.removeEventListener(u,o,s)}}),r}function HWt(u,e={},t={}){let n=t.encode||pT,i=t.decode||pT,r=mMe(),a=r.setKey;r.setKey=(c,d)=>{typeof d>"u"?(t.listen!==!1&&Nd.perKey&&Nd.removeEventListener(u+c,s,l),delete Qd[u+c]):(t.listen!==!1&&Nd.perKey&&!(c in r.value)&&Nd.addEventListener(u+c,s,l),Qd[u+c]=n(d)),a(c,d)};let o=r.set;r.set=function(c){for(let d in c)r.setKey(d,c[d]);for(let d in r.value)d in c||r.setKey(d)};function s(c){c.key?c.key.startsWith(u)&&(c.newValue===null?a(c.key.slice(u.length),void 0):a(c.key.slice(u.length),i(c.newValue))):o({})}function l(){let c={...e};for(let d in Qd)d.startsWith(u)&&(c[d.slice(u.length)]=i(Qd[d]));r.set(c)}return EMe(r,()=>{if(l(),t.listen!==!1)return Nd.addEventListener(u,s,l),()=>{Nd.removeEventListener(u,s,l);for(let c in r.value)Nd.removeEventListener(u+c,s,l)}}),r}var qo=(u=>(u.Fixed="fixed",u.Min="min",u.MinAvg10="min_avg10",u.MinMovingAvg="min_moving_avg",u.Random="random",u))(qo||{});const VWt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"SetJsonStorage"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"paths"}},type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"values"}},type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"setJsonStorage"},arguments:[{kind:"Argument",name:{kind:"Name",value:"paths"},value:{kind:"Variable",name:{kind:"Name",value:"paths"}}},{kind:"Argument",name:{kind:"Name",value:"values"},value:{kind:"Variable",name:{kind:"Name",value:"values"}}}]}]}}]},$Wt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"SetMode"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"paths"}},type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"values"}},type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"setJsonStorage"},arguments:[{kind:"Argument",name:{kind:"Name",value:"paths"},value:{kind:"Variable",name:{kind:"Name",value:"paths"}}},{kind:"Argument",name:{kind:"Name",value:"values"},value:{kind:"Variable",name:{kind:"Name",value:"values"}}}]}]}}]},KWt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"CreateConfig"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"name"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"global"}},type:{kind:"NamedType",name:{kind:"Name",value:"globalInput"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"createConfig"},arguments:[{kind:"Argument",name:{kind:"Name",value:"name"},value:{kind:"Variable",name:{kind:"Name",value:"name"}}},{kind:"Argument",name:{kind:"Name",value:"global"},value:{kind:"Variable",name:{kind:"Name",value:"global"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}}]}}]},WWt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"UpdateConfig"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"global"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"globalInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateConfig"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}},{kind:"Argument",name:{kind:"Name",value:"global"},value:{kind:"Variable",name:{kind:"Name",value:"global"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}}]}}]},GWt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"RemoveConfig"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"removeConfig"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}]}]}}]},UWt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"SelectConfig"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"selectConfig"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}]}]}}]},qWt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"RenameConfig"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"name"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"renameConfig"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}},{kind:"Argument",name:{kind:"Name",value:"name"},value:{kind:"Variable",name:{kind:"Name",value:"name"}}}]}]}}]},JWt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"CreateRouting"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"name"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"routing"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"createRouting"},arguments:[{kind:"Argument",name:{kind:"Name",value:"name"},value:{kind:"Variable",name:{kind:"Name",value:"name"}}},{kind:"Argument",name:{kind:"Name",value:"routing"},value:{kind:"Variable",name:{kind:"Name",value:"routing"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}}]}}]},ZWt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"UpdateRouting"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"routing"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateRouting"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}},{kind:"Argument",name:{kind:"Name",value:"routing"},value:{kind:"Variable",name:{kind:"Name",value:"routing"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}}]}}]},YWt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"RemoveRouting"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"removeRouting"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}]}]}}]},QWt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"SelectRouting"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"selectRouting"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}]}]}}]},XWt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"RenameRouting"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"name"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"renameRouting"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}},{kind:"Argument",name:{kind:"Name",value:"name"},value:{kind:"Variable",name:{kind:"Name",value:"name"}}}]}]}}]},eGt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"CreateDNS"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"name"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"dns"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"createDns"},arguments:[{kind:"Argument",name:{kind:"Name",value:"name"},value:{kind:"Variable",name:{kind:"Name",value:"name"}}},{kind:"Argument",name:{kind:"Name",value:"dns"},value:{kind:"Variable",name:{kind:"Name",value:"dns"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}}]}}]},tGt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"UpdateDNS"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"dns"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateDns"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}},{kind:"Argument",name:{kind:"Name",value:"dns"},value:{kind:"Variable",name:{kind:"Name",value:"dns"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}}]}}]},uGt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"RemoveDNS"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"removeDns"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}]}]}}]},nGt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"SelectDNS"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"selectDns"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}]}]}}]},iGt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"RenameDNS"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"name"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"renameDns"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}},{kind:"Argument",name:{kind:"Name",value:"name"},value:{kind:"Variable",name:{kind:"Name",value:"name"}}}]}]}}]},rGt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"CreateGroup"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"name"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"policy"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Policy"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"policyParams"}},type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"PolicyParam"}}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"createGroup"},arguments:[{kind:"Argument",name:{kind:"Name",value:"name"},value:{kind:"Variable",name:{kind:"Name",value:"name"}}},{kind:"Argument",name:{kind:"Name",value:"policy"},value:{kind:"Variable",name:{kind:"Name",value:"policy"}}},{kind:"Argument",name:{kind:"Name",value:"policyParams"},value:{kind:"Variable",name:{kind:"Name",value:"policyParams"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}}]}}]},aGt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"RemoveGroup"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"removeGroup"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}]}]}}]},oGt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"GroupSetPolicy"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"policy"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Policy"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"policyParams"}},type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"PolicyParam"}}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"groupSetPolicy"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}},{kind:"Argument",name:{kind:"Name",value:"policy"},value:{kind:"Variable",name:{kind:"Name",value:"policy"}}},{kind:"Argument",name:{kind:"Name",value:"policyParams"},value:{kind:"Variable",name:{kind:"Name",value:"policyParams"}}}]}]}}]},sGt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"RenameGroup"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"name"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"renameGroup"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}},{kind:"Argument",name:{kind:"Name",value:"name"},value:{kind:"Variable",name:{kind:"Name",value:"name"}}}]}]}}]},lGt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"GroupAddNodes"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"nodeIDs"}},type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"groupAddNodes"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}},{kind:"Argument",name:{kind:"Name",value:"nodeIDs"},value:{kind:"Variable",name:{kind:"Name",value:"nodeIDs"}}}]}]}}]},cGt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"GroupDelNodes"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"nodeIDs"}},type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"groupDelNodes"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}},{kind:"Argument",name:{kind:"Name",value:"nodeIDs"},value:{kind:"Variable",name:{kind:"Name",value:"nodeIDs"}}}]}]}}]},dGt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"GroupAddSubscriptions"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"subscriptionIDs"}},type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"groupAddSubscriptions"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}},{kind:"Argument",name:{kind:"Name",value:"subscriptionIDs"},value:{kind:"Variable",name:{kind:"Name",value:"subscriptionIDs"}}}]}]}}]},hGt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"GroupDelSubscriptions"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"subscriptionIDs"}},type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"groupDelSubscriptions"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}},{kind:"Argument",name:{kind:"Name",value:"subscriptionIDs"},value:{kind:"Variable",name:{kind:"Name",value:"subscriptionIDs"}}}]}]}}]},EGt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"ImportNodes"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"rollbackError"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"args"}},type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ImportArgument"}}}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"importNodes"},arguments:[{kind:"Argument",name:{kind:"Name",value:"rollbackError"},value:{kind:"Variable",name:{kind:"Name",value:"rollbackError"}}},{kind:"Argument",name:{kind:"Name",value:"args"},value:{kind:"Variable",name:{kind:"Name",value:"args"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"link"}},{kind:"Field",name:{kind:"Name",value:"error"}},{kind:"Field",name:{kind:"Name",value:"node"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}}]}}]}}]},mGt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"RemoveNodes"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"ids"}},type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"removeNodes"},arguments:[{kind:"Argument",name:{kind:"Name",value:"ids"},value:{kind:"Variable",name:{kind:"Name",value:"ids"}}}]}]}}]},gGt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"ImportSubscription"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"rollbackError"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"arg"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ImportArgument"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"importSubscription"},arguments:[{kind:"Argument",name:{kind:"Name",value:"rollbackError"},value:{kind:"Variable",name:{kind:"Name",value:"rollbackError"}}},{kind:"Argument",name:{kind:"Name",value:"arg"},value:{kind:"Variable",name:{kind:"Name",value:"arg"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"link"}},{kind:"Field",name:{kind:"Name",value:"sub"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}},{kind:"Field",name:{kind:"Name",value:"nodeImportResult"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"node"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}}]}}]}}]}}]},fGt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"UpdateSubscription"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateSubscription"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}}]}}]},pGt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"RemoveSubscriptions"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"ids"}},type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"removeSubscriptions"},arguments:[{kind:"Argument",name:{kind:"Name",value:"ids"},value:{kind:"Variable",name:{kind:"Name",value:"ids"}}}]}]}}]},DGt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"Run"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"dry"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"run"},arguments:[{kind:"Argument",name:{kind:"Name",value:"dry"},value:{kind:"Variable",name:{kind:"Name",value:"dry"}}}]}]}}]},xGt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"UpdateAvatar"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"avatar"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateAvatar"},arguments:[{kind:"Argument",name:{kind:"Name",value:"avatar"},value:{kind:"Variable",name:{kind:"Name",value:"avatar"}}}]}]}}]},vGt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"UpdateName"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"name"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateName"},arguments:[{kind:"Argument",name:{kind:"Name",value:"name"},value:{kind:"Variable",name:{kind:"Name",value:"name"}}}]}]}}]},CGt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"Mode"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"paths"}},type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"jsonStorage"},arguments:[{kind:"Argument",name:{kind:"Name",value:"paths"},value:{kind:"Variable",name:{kind:"Name",value:"paths"}}}]}]}}]},bGt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"Defaults"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"paths"}},type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"jsonStorage"},arguments:[{kind:"Argument",name:{kind:"Name",value:"paths"},value:{kind:"Variable",name:{kind:"Name",value:"paths"}}}]}]}}]},kGt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"Interfaces"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"up"}},type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"general"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"interfaces"},arguments:[{kind:"Argument",name:{kind:"Name",value:"up"},value:{kind:"Variable",name:{kind:"Name",value:"up"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"ifindex"}},{kind:"Field",name:{kind:"Name",value:"ip"}},{kind:"Field",name:{kind:"Name",value:"flag"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"default"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"gateway"}}]}}]}}]}}]}}]}}]},FGt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"JsonStorage"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"paths"}},type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"jsonStorage"},arguments:[{kind:"Argument",name:{kind:"Name",value:"paths"},value:{kind:"Variable",name:{kind:"Name",value:"paths"}}}]}]}}]},yGt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"General"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"up"}},type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"general"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"dae"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"running"}},{kind:"Field",name:{kind:"Name",value:"modified"}},{kind:"Field",name:{kind:"Name",value:"version"}}]}},{kind:"Field",name:{kind:"Name",value:"interfaces"},arguments:[{kind:"Argument",name:{kind:"Name",value:"up"},value:{kind:"Variable",name:{kind:"Name",value:"up"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"ifindex"}},{kind:"Field",name:{kind:"Name",value:"ip"}},{kind:"Field",name:{kind:"Name",value:"flag"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"default"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"gateway"}}]}}]}}]}}]}}]}}]},AGt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"Nodes"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"nodes"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"edges"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"link"}},{kind:"Field",name:{kind:"Name",value:"address"}},{kind:"Field",name:{kind:"Name",value:"protocol"}},{kind:"Field",name:{kind:"Name",value:"tag"}}]}}]}}]}}]},_Gt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"Subscriptions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"subscriptions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"tag"}},{kind:"Field",name:{kind:"Name",value:"status"}},{kind:"Field",name:{kind:"Name",value:"link"}},{kind:"Field",name:{kind:"Name",value:"info"}},{kind:"Field",name:{kind:"Name",value:"updatedAt"}},{kind:"Field",name:{kind:"Name",value:"nodes"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"edges"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"protocol"}},{kind:"Field",name:{kind:"Name",value:"link"}}]}}]}}]}}]}}]},SGt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"Configs"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"configs"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"selected"}},{kind:"Field",name:{kind:"Name",value:"global"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"logLevel"}},{kind:"Field",name:{kind:"Name",value:"tproxyPort"}},{kind:"Field",name:{kind:"Name",value:"allowInsecure"}},{kind:"Field",name:{kind:"Name",value:"checkInterval"}},{kind:"Field",name:{kind:"Name",value:"checkTolerance"}},{kind:"Field",name:{kind:"Name",value:"lanInterface"}},{kind:"Field",name:{kind:"Name",value:"wanInterface"}},{kind:"Field",name:{kind:"Name",value:"udpCheckDns"}},{kind:"Field",name:{kind:"Name",value:"tcpCheckUrl"}},{kind:"Field",name:{kind:"Name",value:"dialMode"}},{kind:"Field",name:{kind:"Name",value:"tcpCheckHttpMethod"}},{kind:"Field",name:{kind:"Name",value:"disableWaitingNetwork"}},{kind:"Field",name:{kind:"Name",value:"autoConfigKernelParameter"}},{kind:"Field",name:{kind:"Name",value:"sniffingTimeout"}},{kind:"Field",name:{kind:"Name",value:"tlsImplementation"}},{kind:"Field",name:{kind:"Name",value:"utlsImitate"}},{kind:"Field",name:{kind:"Name",value:"tproxyPortProtect"}},{kind:"Field",name:{kind:"Name",value:"soMarkFromDae"}}]}}]}}]}}]},BGt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"Groups"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"groups"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"nodes"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"link"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"address"}},{kind:"Field",name:{kind:"Name",value:"protocol"}},{kind:"Field",name:{kind:"Name",value:"tag"}},{kind:"Field",name:{kind:"Name",value:"subscriptionID"}}]}},{kind:"Field",name:{kind:"Name",value:"subscriptions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"updatedAt"}},{kind:"Field",name:{kind:"Name",value:"tag"}},{kind:"Field",name:{kind:"Name",value:"link"}},{kind:"Field",name:{kind:"Name",value:"status"}},{kind:"Field",name:{kind:"Name",value:"info"}},{kind:"Field",name:{kind:"Name",value:"nodes"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"edges"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"link"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"address"}},{kind:"Field",name:{kind:"Name",value:"protocol"}},{kind:"Field",name:{kind:"Name",value:"tag"}},{kind:"Field",name:{kind:"Name",value:"subscriptionID"}}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"policy"}},{kind:"Field",name:{kind:"Name",value:"policyParams"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"key"}},{kind:"Field",name:{kind:"Name",value:"val"}}]}}]}}]}}]},wGt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"Routings"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"routings"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"selected"}},{kind:"Field",name:{kind:"Name",value:"routing"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"string"}}]}}]}}]}}]},LGt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"DNSs"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"dnss"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"dns"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"string"}},{kind:"Field",name:{kind:"Name",value:"routing"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"request"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"string"}}]}},{kind:"Field",name:{kind:"Name",value:"response"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"string"}}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"selected"}}]}}]}}]},zGt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"User"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"user"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"username"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"avatar"}}]}}]}}]},MGt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"NumberUsers"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"numberUsers"}}]}}]},TGt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"CreateUser"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"username"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"password"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"createUser"},arguments:[{kind:"Argument",name:{kind:"Name",value:"username"},value:{kind:"Variable",name:{kind:"Name",value:"username"}}},{kind:"Argument",name:{kind:"Name",value:"password"},value:{kind:"Variable",name:{kind:"Name",value:"password"}}}]}]}}]},NGt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"Token"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"username"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"password"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"token"},arguments:[{kind:"Argument",name:{kind:"Name",value:"username"},value:{kind:"Variable",name:{kind:"Name",value:"username"}}},{kind:"Argument",name:{kind:"Name",value:"password"},value:{kind:"Variable",name:{kind:"Name",value:"password"}}}]}]}}]};var $ne=(u=>(u.error="error",u.warn="warn",u.info="info",u.debug="debug",u.trace="trace",u))($ne||{}),hc=(u=>(u.ip="ip",u.domain="domain",u.domainP="domain+",u.domainPP="domain++",u))(hc||{}),Kne=(u=>(u.CONNECT="CONNECT",u.HEAD="HEAD",u.OPTIONS="OPTIONS",u.TRACE="TRACE",u.GET="GET",u.POST="POST",u.DELETE="DELETE",u.PATCH="PATCH",u.PUT="PUT",u))(Kne||{}),DT=(u=>(u.tls="tls",u.utls="utls",u))(DT||{}),Wne=(u=>(u.randomized="randomized",u.randomizedalpn="randomizedalpn",u.randomizednoalpn="randomizednoalpn",u.firefox_auto="firefox_auto",u.firefox_55="firefox_55",u.firefox_56="firefox_56",u.firefox_63="firefox_63",u.firefox_65="firefox_65",u.firefox_99="firefox_99",u.firefox_102="firefox_102",u.firefox_105="firefox_105",u.chrome_auto="chrome_auto",u.chrome_58="chrome_58",u.chrome_62="chrome_62",u.chrome_70="chrome_70",u.chrome_72="chrome_72",u.chrome_83="chrome_83",u.chrome_87="chrome_87",u.chrome_96="chrome_96",u.chrome_100="chrome_100",u.chrome_102="chrome_102",u.ios_auto="ios_auto",u.ios_11_1="ios_11_1",u.ios_12_1="ios_12_1",u.ios_13="ios_13",u.ios_14="ios_14",u.android_11_okhttp="android_11_okhttp",u.edge_auto="edge_auto",u.edge_85="edge_85",u.edge_106="edge_106",u.safari_auto="safari_auto",u.safari_16_0="safari_16_0",u.utls_360_auto="360_auto",u.utls_360_7_5="360_7_5",u.utls_360_11_0="360_11_0",u.qq_auto="qq_auto",u.qq_11_1="qq_11_1",u))(Wne||{});const hTe=u=>[[u("error"),"error"],[u("warn"),"warn"],[u("info"),"info"],[u("debug"),"debug"],[u("trace"),"trace"]];var ZZ=(u=>(u.simple="simple",u.advanced="advanced",u))(ZZ||{});const PGt=3,ja=["general"],Gne=["user"],Une=["node"],JI=["subscription"],Xp=["config"],j6=["routing"],H6=["dns"],Ql=["group"];var Xi=(u=>(u.node="node",u.subscription="subscription",u.subscription_node="subscription_node",u.groupNode="group_node",u.groupSubscription="group_subscription",u))(Xi||{}),ts=(u=>(u.config="config",u.dns="dns",u.routing="routing",u.group="group",u))(ts||{});const ETe=`${location.protocol}//${location.hostname}:2023/graphql`,RGt=$ne.info,mTe=12345,gTe=!0,fTe=0,pTe=!1,DTe=30,xTe=0,vTe=100,CTe=["dns.google.com:53","8.8.8.8","2001:4860:4860::8888"],bTe=["http://cp.cloudflare.com","1.1.1.1","2606:4700:4700::1111"],kTe=hc.domain,FTe=Kne.HEAD,yTe=!1,ATe=!0,_Te=DT.tls,STe=Wne.chrome_auto,IGt="global",OGt="default",jGt="default",BTe="proxy",HGt=(u=[])=>({logLevel:RGt,tproxyPort:mTe,tproxyPortProtect:gTe,soMarkFromDae:fTe,allowInsecure:pTe,checkInterval:`${DTe}s`,checkTolerance:`${xTe}ms`,sniffingTimeout:`${vTe}ms`,lanInterface:u,wanInterface:["auto"],udpCheckDns:CTe,tcpCheckUrl:bTe,tcpCheckHttpMethod:FTe,dialMode:kTe,autoConfigKernelParameter:ATe,tlsImplementation:_Te,utlsImitate:STe,disableWaitingNetwork:yTe}),wTe=qo.MinMovingAvg,VGt=` + `}function MWt(u,e){D4(u)&&D4(u.__schema)||In(!1,`Invalid or incomplete introspection result. Ensure that you are passing "data" property of introspection response and no "errors" was returned alongside: ${Tt(u)}.`);const t=u.__schema,n=Qf(t.types,w=>w.name,w=>h(w));for(const w of[...dWt,...oTe])n[w.name]&&(n[w.name]=w);const i=t.queryType?c(t.queryType):null,r=t.mutationType?c(t.mutationType):null,a=t.subscriptionType?c(t.subscriptionType):null,o=t.directives?t.directives.map(S):[];return new sTe({description:t.description,query:i,mutation:r,subscription:a,types:Object.values(n),directives:o,assumeValid:e==null?void 0:e.assumeValid});function s(w){if(w.kind===fi.LIST){const z=w.ofType;if(!z)throw new Error("Decorated type deeper than introspection query.");return new Is(s(z))}if(w.kind===fi.NON_NULL){const z=w.ofType;if(!z)throw new Error("Decorated type deeper than introspection query.");const N=s(z);return new Qu(iWt(N))}return l(w)}function l(w){const z=w.name;if(!z)throw new Error(`Unknown type reference: ${Tt(w)}.`);const N=n[z];if(!N)throw new Error(`Invalid or incomplete schema, unknown type: ${z}. Ensure that a full introspection query is used in order to build a client schema.`);return N}function c(w){return tWt(l(w))}function d(w){return uWt(l(w))}function h(w){if(w!=null&&w.name!=null&&w.kind!=null)switch(w.kind){case fi.SCALAR:return E(w);case fi.OBJECT:return g(w);case fi.INTERFACE:return f(w);case fi.UNION:return p(w);case fi.ENUM:return D(w);case fi.INPUT_OBJECT:return x(w)}const z=Tt(w);throw new Error(`Invalid or incomplete introspection result. Ensure that a full introspection query is used in order to build a client schema: ${z}.`)}function E(w){return new Qp({name:w.name,description:w.description,specifiedByURL:w.specifiedByURL})}function m(w){if(w.interfaces===null&&w.kind===fi.INTERFACE)return[];if(!w.interfaces){const z=Tt(w);throw new Error(`Introspection result missing interfaces: ${z}.`)}return w.interfaces.map(d)}function g(w){return new Z1({name:w.name,description:w.description,interfaces:()=>m(w),fields:()=>b(w)})}function f(w){return new Px({name:w.name,description:w.description,interfaces:()=>m(w),fields:()=>b(w)})}function p(w){if(!w.possibleTypes){const z=Tt(w);throw new Error(`Introspection result missing possibleTypes: ${z}.`)}return new YMe({name:w.name,description:w.description,types:()=>w.possibleTypes.map(c)})}function D(w){if(!w.enumValues){const z=Tt(w);throw new Error(`Introspection result missing enumValues: ${z}.`)}return new I6({name:w.name,description:w.description,values:Qf(w.enumValues,z=>z.name,z=>({description:z.description,deprecationReason:z.deprecationReason}))})}function x(w){if(!w.inputFields){const z=Tt(w);throw new Error(`Introspection result missing inputFields: ${z}.`)}return new One({name:w.name,description:w.description,fields:()=>A(w.inputFields)})}function b(w){if(!w.fields)throw new Error(`Introspection result missing fields: ${Tt(w)}.`);return Qf(w.fields,z=>z.name,k)}function k(w){const z=s(w.type);if(!D3(z)){const N=Tt(z);throw new Error(`Introspection must provide output type for fields, but received: ${N}.`)}if(!w.args){const N=Tt(w);throw new Error(`Introspection result missing field args: ${N}.`)}return{description:w.description,deprecationReason:w.deprecationReason,type:z,args:A(w.args)}}function A(w){return Qf(w,z=>z.name,F)}function F(w){const z=s(w.type);if(!hl(z)){const O=Tt(z);throw new Error(`Introspection must provide input type for arguments, but received: ${O}.`)}const N=w.defaultValue!=null?Hb(HKt(w.defaultValue),z):void 0;return{description:w.description,type:z,defaultValue:N,deprecationReason:w.deprecationReason}}function S(w){if(!w.args){const z=Tt(w);throw new Error(`Introspection result missing directive args: ${z}.`)}if(!w.locations){const z=Tt(w);throw new Error(`Introspection result missing directive locations: ${z}.`)}return new O6({name:w.name,description:w.description,isRepeatable:w.isRepeatable,locations:w.locations.slice(),args:A(w.args)})}}const _fe=u=>{var n,i;let e;const t=u.definitions.filter(r=>r.kind==="OperationDefinition");return t.length===1&&(e=(i=(n=t[0])==null?void 0:n.name)==null?void 0:i.value),e},a$=u=>{if(typeof u=="string"){let t;try{const n=Bg(u);t=_fe(n)}catch{}return{query:u,operationName:t}}const e=_fe(u);return{query:u0(u),operationName:e}};class j2 extends Error{constructor(e,t){const n=`${j2.extractMessage(e)}: ${JSON.stringify({response:e,request:t})}`;super(n),Object.setPrototypeOf(this,j2.prototype),this.response=e,this.request=t,typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,j2)}static extractMessage(e){var t,n;return((n=(t=e.errors)==null?void 0:t[0])==null?void 0:n.message)??`GraphQL Error (Code: ${e.status})`}}var qZ={exports:{}};(function(u,e){var t=typeof self<"u"?self:bl,n=function(){function r(){this.fetch=!1,this.DOMException=t.DOMException}return r.prototype=t,new r}();(function(r){(function(a){var o={searchParams:"URLSearchParams"in r,iterable:"Symbol"in r&&"iterator"in Symbol,blob:"FileReader"in r&&"Blob"in r&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in r,arrayBuffer:"ArrayBuffer"in r};function s(_){return _&&DataView.prototype.isPrototypeOf(_)}if(o.arrayBuffer)var l=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],c=ArrayBuffer.isView||function(_){return _&&l.indexOf(Object.prototype.toString.call(_))>-1};function d(_){if(typeof _!="string"&&(_=String(_)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(_))throw new TypeError("Invalid character in header field name");return _.toLowerCase()}function h(_){return typeof _!="string"&&(_=String(_)),_}function E(_){var L={next:function(){var T=_.shift();return{done:T===void 0,value:T}}};return o.iterable&&(L[Symbol.iterator]=function(){return L}),L}function m(_){this.map={},_ instanceof m?_.forEach(function(L,T){this.append(T,L)},this):Array.isArray(_)?_.forEach(function(L){this.append(L[0],L[1])},this):_&&Object.getOwnPropertyNames(_).forEach(function(L){this.append(L,_[L])},this)}m.prototype.append=function(_,L){_=d(_),L=h(L);var T=this.map[_];this.map[_]=T?T+", "+L:L},m.prototype.delete=function(_){delete this.map[d(_)]},m.prototype.get=function(_){return _=d(_),this.has(_)?this.map[_]:null},m.prototype.has=function(_){return this.map.hasOwnProperty(d(_))},m.prototype.set=function(_,L){this.map[d(_)]=h(L)},m.prototype.forEach=function(_,L){for(var T in this.map)this.map.hasOwnProperty(T)&&_.call(L,this.map[T],T,this)},m.prototype.keys=function(){var _=[];return this.forEach(function(L,T){_.push(T)}),E(_)},m.prototype.values=function(){var _=[];return this.forEach(function(L){_.push(L)}),E(_)},m.prototype.entries=function(){var _=[];return this.forEach(function(L,T){_.push([T,L])}),E(_)},o.iterable&&(m.prototype[Symbol.iterator]=m.prototype.entries);function g(_){if(_.bodyUsed)return Promise.reject(new TypeError("Already read"));_.bodyUsed=!0}function f(_){return new Promise(function(L,T){_.onload=function(){L(_.result)},_.onerror=function(){T(_.error)}})}function p(_){var L=new FileReader,T=f(L);return L.readAsArrayBuffer(_),T}function D(_){var L=new FileReader,T=f(L);return L.readAsText(_),T}function x(_){for(var L=new Uint8Array(_),T=new Array(L.length),R=0;R-1?L:_}function S(_,L){L=L||{};var T=L.body;if(_ instanceof S){if(_.bodyUsed)throw new TypeError("Already read");this.url=_.url,this.credentials=_.credentials,L.headers||(this.headers=new m(_.headers)),this.method=_.method,this.mode=_.mode,this.signal=_.signal,!T&&_._bodyInit!=null&&(T=_._bodyInit,_.bodyUsed=!0)}else this.url=String(_);if(this.credentials=L.credentials||this.credentials||"same-origin",(L.headers||!this.headers)&&(this.headers=new m(L.headers)),this.method=F(L.method||this.method||"GET"),this.mode=L.mode||this.mode||null,this.signal=L.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&T)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(T)}S.prototype.clone=function(){return new S(this,{body:this._bodyInit})};function w(_){var L=new FormData;return _.trim().split("&").forEach(function(T){if(T){var R=T.split("="),I=R.shift().replace(/\+/g," "),H=R.join("=").replace(/\+/g," ");L.append(decodeURIComponent(I),decodeURIComponent(H))}}),L}function z(_){var L=new m,T=_.replace(/\r?\n[\t ]+/g," ");return T.split(/\r?\n/).forEach(function(R){var I=R.split(":"),H=I.shift().trim();if(H){var V=I.join(":").trim();L.append(H,V)}}),L}k.call(S.prototype);function N(_,L){L||(L={}),this.type="default",this.status=L.status===void 0?200:L.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in L?L.statusText:"OK",this.headers=new m(L.headers),this.url=L.url||"",this._initBody(_)}k.call(N.prototype),N.prototype.clone=function(){return new N(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new m(this.headers),url:this.url})},N.error=function(){var _=new N(null,{status:0,statusText:""});return _.type="error",_};var O=[301,302,303,307,308];N.redirect=function(_,L){if(O.indexOf(L)===-1)throw new RangeError("Invalid status code");return new N(null,{status:L,headers:{location:_}})},a.DOMException=r.DOMException;try{new a.DOMException}catch{a.DOMException=function(L,T){this.message=L,this.name=T;var R=Error(L);this.stack=R.stack},a.DOMException.prototype=Object.create(Error.prototype),a.DOMException.prototype.constructor=a.DOMException}function y(_,L){return new Promise(function(T,R){var I=new S(_,L);if(I.signal&&I.signal.aborted)return R(new a.DOMException("Aborted","AbortError"));var H=new XMLHttpRequest;function V(){H.abort()}H.onload=function(){var U={status:H.status,statusText:H.statusText,headers:z(H.getAllResponseHeaders()||"")};U.url="responseURL"in H?H.responseURL:U.headers.get("X-Request-URL");var J="response"in H?H.response:H.responseText;T(new N(J,U))},H.onerror=function(){R(new TypeError("Network request failed"))},H.ontimeout=function(){R(new TypeError("Network request failed"))},H.onabort=function(){R(new a.DOMException("Aborted","AbortError"))},H.open(I.method,I.url,!0),I.credentials==="include"?H.withCredentials=!0:I.credentials==="omit"&&(H.withCredentials=!1),"responseType"in H&&o.blob&&(H.responseType="blob"),I.headers.forEach(function(U,J){H.setRequestHeader(J,U)}),I.signal&&(I.signal.addEventListener("abort",V),H.onreadystatechange=function(){H.readyState===4&&I.signal.removeEventListener("abort",V)}),H.send(typeof I._bodyInit>"u"?null:I._bodyInit)})}return y.polyfill=!0,r.fetch||(r.fetch=y,r.Headers=m,r.Request=S,r.Response=N),a.Headers=m,a.Request=S,a.Response=N,a.fetch=y,Object.defineProperty(a,"__esModule",{value:!0}),a})({})})(n),n.fetch.ponyfill=!0,delete n.fetch.polyfill;var i=n;e=i.fetch,e.default=i.fetch,e.fetch=i.fetch,e.Headers=i.Headers,e.Request=i.Request,e.Response=i.Response,u.exports=e})(qZ,qZ.exports);var fT=qZ.exports;const G8=Hl(fT),TWt=Lxe({__proto__:null,default:G8},[fT]),RD=u=>{let e={};return u&&(typeof Headers<"u"&&u instanceof Headers||TWt&&fT.Headers&&u instanceof fT.Headers?e=cKt(u):Array.isArray(u)?u.forEach(([t,n])=>{t&&n!==void 0&&(e[t]=n)}):e=u),e},Sfe=u=>u.replace(/([\s,]|#[^\n\r]+)+/g," ").trim(),NWt=u=>{if(!Array.isArray(u.query)){const n=u,i=[`query=${encodeURIComponent(Sfe(n.query))}`];return u.variables&&i.push(`variables=${encodeURIComponent(n.jsonSerializer.stringify(n.variables))}`),n.operationName&&i.push(`operationName=${encodeURIComponent(n.operationName)}`),i.join("&")}if(typeof u.variables<"u"&&!Array.isArray(u.variables))throw new Error("Cannot create query with given variable type, array expected");const e=u,t=u.query.reduce((n,i,r)=>(n.push({query:Sfe(i),variables:e.variables?e.jsonSerializer.stringify(e.variables[r]):void 0}),n),[]);return`query=${encodeURIComponent(e.jsonSerializer.stringify(t))}`},PWt=u=>async e=>{const{url:t,query:n,variables:i,operationName:r,fetch:a,fetchOptions:o,middleware:s}=e,l={...e.headers};let c="",d;u==="POST"?(d=RWt(n,i,r,o.jsonSerializer),typeof d=="string"&&(l["Content-Type"]="application/json")):c=NWt({query:n,variables:i,operationName:r,jsonSerializer:o.jsonSerializer??Mne});const h={method:u,headers:l,body:d,...o};let E=t,m=h;if(s){const g=await Promise.resolve(s({...h,url:t,operationName:r,variables:i})),{url:f,...p}=g;E=f,m=p}return c&&(E=`${E}?${c}`),await a(E,m)};class dTe{constructor(e,t={}){this.url=e,this.requestConfig=t,this.rawRequest=async(...n)=>{const[i,r,a]=n,o=hKt(i,r,a),{headers:s,fetch:l=G8,method:c="POST",requestMiddleware:d,responseMiddleware:h,...E}=this.requestConfig,{url:m}=this;o.signal!==void 0&&(E.signal=o.signal);const{operationName:g}=a$(o.query);return o$({url:m,query:o.query,variables:o.variables,headers:{...RD(s$(s)),...RD(o.requestHeaders)},operationName:g,fetch:l,method:c,fetchOptions:E,middleware:d}).then(f=>(h&&h(f),f)).catch(f=>{throw h&&h(f),f})}}async request(e,...t){const[n,i]=t,r=dKt(e,n,i),{headers:a,fetch:o=G8,method:s="POST",requestMiddleware:l,responseMiddleware:c,...d}=this.requestConfig,{url:h}=this;r.signal!==void 0&&(d.signal=r.signal);const{query:E,operationName:m}=a$(r.document);return o$({url:h,query:E,variables:r.variables,headers:{...RD(s$(a)),...RD(r.requestHeaders)},operationName:m,fetch:o,method:s,fetchOptions:d,middleware:l}).then(g=>(c&&c(g),g.data)).catch(g=>{throw c&&c(g),g})}batchRequests(e,t){const n=EKt(e,t),{headers:i,...r}=this.requestConfig;n.signal!==void 0&&(r.signal=n.signal);const a=n.documents.map(({document:s})=>a$(s).query),o=n.documents.map(({variables:s})=>s);return o$({url:this.url,query:a,variables:o,headers:{...RD(s$(i)),...RD(n.requestHeaders)},operationName:void 0,fetch:this.requestConfig.fetch??G8,method:this.requestConfig.method||"POST",fetchOptions:r,middleware:this.requestConfig.requestMiddleware}).then(s=>(this.requestConfig.responseMiddleware&&this.requestConfig.responseMiddleware(s),s.data)).catch(s=>{throw this.requestConfig.responseMiddleware&&this.requestConfig.responseMiddleware(s),s})}setHeaders(e){return this.requestConfig.headers=e,this}setHeader(e,t){const{headers:n}=this.requestConfig;return n?n[e]=t:this.requestConfig.headers={[e]:t},this}setEndpoint(e){return this.url=e,this}}const o$=async u=>{const{query:e,variables:t,fetchOptions:n}=u,i=PWt(lKt(u.method??"post")),r=Array.isArray(u.query),a=await i(u),o=await IWt(a,n.jsonSerializer??Mne),s=Array.isArray(o)?!o.some(({data:c})=>!c):!!o.data,l=Array.isArray(o)||!o.errors||Array.isArray(o.errors)&&!o.errors.length||n.errorPolicy==="all"||n.errorPolicy==="ignore";if(a.ok&&l&&s){const{errors:c,...d}=(Array.isArray(o),o),h=n.errorPolicy==="ignore"?d:o;return{...r?{data:h}:h,headers:a.headers,status:a.status}}else{const c=typeof o=="string"?{error:o}:o;throw new j2({...c,status:a.status,headers:a.headers},{query:e,variables:t})}};async function JZ(u,e,...t){const n=mKt(u,e,...t);return new dTe(n.url).request({...n})}const RWt=(u,e,t,n)=>{const i=n??Mne;if(!Array.isArray(u))return i.stringify({query:u,variables:e,operationName:t});if(typeof e<"u"&&!Array.isArray(e))throw new Error("Cannot create request body with given variable type, array expected");const r=u.reduce((a,o,s)=>(a.push({query:o,variables:e?e[s]:void 0}),a),[]);return i.stringify(r)},IWt=async(u,e)=>{let t;return u.headers.forEach((n,i)=>{i.toLowerCase()==="content-type"&&(t=n)}),t&&(t.toLowerCase().startsWith("application/json")||t.toLowerCase().startsWith("application/graphql+json")||t.toLowerCase().startsWith("application/graphql-response+json"))?e.parse(await u.text()):u.text()},s$=u=>typeof u=="function"?u():u;let pT=u=>u,Qd={},Nd={addEventListener(){},removeEventListener(){}};function OWt(){try{return typeof localStorage<"u"}catch{return!1}}OWt()&&(Qd=localStorage);let jWt={addEventListener(u,e,t){window.addEventListener("storage",e),window.addEventListener("pageshow",t)},removeEventListener(u,e,t){window.removeEventListener("storage",e),window.removeEventListener("pageshow",t)}};typeof window<"u"&&(Nd=jWt);function Vne(u,e=void 0,t={}){let n=t.encode||pT,i=t.decode||pT,r=Bne(e),a=r.set;r.set=l=>{typeof l>"u"?delete Qd[u]:Qd[u]=n(l),a(l)};function o(l){l.key===u?l.newValue===null?a(void 0):a(i(l.newValue)):Qd[u]||a(void 0)}function s(){r.set(Qd[u]?i(Qd[u]):e)}return EMe(r,()=>{if(s(),t.listen!==!1)return Nd.addEventListener(u,o,s),()=>{Nd.removeEventListener(u,o,s)}}),r}function HWt(u,e={},t={}){let n=t.encode||pT,i=t.decode||pT,r=mMe(),a=r.setKey;r.setKey=(c,d)=>{typeof d>"u"?(t.listen!==!1&&Nd.perKey&&Nd.removeEventListener(u+c,s,l),delete Qd[u+c]):(t.listen!==!1&&Nd.perKey&&!(c in r.value)&&Nd.addEventListener(u+c,s,l),Qd[u+c]=n(d)),a(c,d)};let o=r.set;r.set=function(c){for(let d in c)r.setKey(d,c[d]);for(let d in r.value)d in c||r.setKey(d)};function s(c){c.key?c.key.startsWith(u)&&(c.newValue===null?a(c.key.slice(u.length),void 0):a(c.key.slice(u.length),i(c.newValue))):o({})}function l(){let c={...e};for(let d in Qd)d.startsWith(u)&&(c[d.slice(u.length)]=i(Qd[d]));r.set(c)}return EMe(r,()=>{if(l(),t.listen!==!1)return Nd.addEventListener(u,s,l),()=>{Nd.removeEventListener(u,s,l);for(let c in r.value)Nd.removeEventListener(u+c,s,l)}}),r}var qo=(u=>(u.Fixed="fixed",u.Min="min",u.MinAvg10="min_avg10",u.MinMovingAvg="min_moving_avg",u.Random="random",u))(qo||{});const VWt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"SetJsonStorage"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"paths"}},type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"values"}},type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"setJsonStorage"},arguments:[{kind:"Argument",name:{kind:"Name",value:"paths"},value:{kind:"Variable",name:{kind:"Name",value:"paths"}}},{kind:"Argument",name:{kind:"Name",value:"values"},value:{kind:"Variable",name:{kind:"Name",value:"values"}}}]}]}}]},$Wt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"SetMode"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"paths"}},type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"values"}},type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"setJsonStorage"},arguments:[{kind:"Argument",name:{kind:"Name",value:"paths"},value:{kind:"Variable",name:{kind:"Name",value:"paths"}}},{kind:"Argument",name:{kind:"Name",value:"values"},value:{kind:"Variable",name:{kind:"Name",value:"values"}}}]}]}}]},KWt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"CreateConfig"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"name"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"global"}},type:{kind:"NamedType",name:{kind:"Name",value:"globalInput"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"createConfig"},arguments:[{kind:"Argument",name:{kind:"Name",value:"name"},value:{kind:"Variable",name:{kind:"Name",value:"name"}}},{kind:"Argument",name:{kind:"Name",value:"global"},value:{kind:"Variable",name:{kind:"Name",value:"global"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}}]}}]},WWt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"UpdateConfig"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"global"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"globalInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateConfig"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}},{kind:"Argument",name:{kind:"Name",value:"global"},value:{kind:"Variable",name:{kind:"Name",value:"global"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}}]}}]},GWt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"RemoveConfig"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"removeConfig"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}]}]}}]},UWt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"SelectConfig"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"selectConfig"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}]}]}}]},qWt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"RenameConfig"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"name"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"renameConfig"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}},{kind:"Argument",name:{kind:"Name",value:"name"},value:{kind:"Variable",name:{kind:"Name",value:"name"}}}]}]}}]},JWt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"CreateRouting"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"name"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"routing"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"createRouting"},arguments:[{kind:"Argument",name:{kind:"Name",value:"name"},value:{kind:"Variable",name:{kind:"Name",value:"name"}}},{kind:"Argument",name:{kind:"Name",value:"routing"},value:{kind:"Variable",name:{kind:"Name",value:"routing"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}}]}}]},ZWt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"UpdateRouting"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"routing"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateRouting"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}},{kind:"Argument",name:{kind:"Name",value:"routing"},value:{kind:"Variable",name:{kind:"Name",value:"routing"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}}]}}]},YWt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"RemoveRouting"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"removeRouting"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}]}]}}]},QWt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"SelectRouting"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"selectRouting"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}]}]}}]},XWt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"RenameRouting"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"name"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"renameRouting"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}},{kind:"Argument",name:{kind:"Name",value:"name"},value:{kind:"Variable",name:{kind:"Name",value:"name"}}}]}]}}]},eGt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"CreateDNS"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"name"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"dns"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"createDns"},arguments:[{kind:"Argument",name:{kind:"Name",value:"name"},value:{kind:"Variable",name:{kind:"Name",value:"name"}}},{kind:"Argument",name:{kind:"Name",value:"dns"},value:{kind:"Variable",name:{kind:"Name",value:"dns"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}}]}}]},tGt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"UpdateDNS"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"dns"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateDns"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}},{kind:"Argument",name:{kind:"Name",value:"dns"},value:{kind:"Variable",name:{kind:"Name",value:"dns"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}}]}}]},uGt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"RemoveDNS"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"removeDns"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}]}]}}]},nGt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"SelectDNS"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"selectDns"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}]}]}}]},iGt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"RenameDNS"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"name"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"renameDns"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}},{kind:"Argument",name:{kind:"Name",value:"name"},value:{kind:"Variable",name:{kind:"Name",value:"name"}}}]}]}}]},rGt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"CreateGroup"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"name"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"policy"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Policy"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"policyParams"}},type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"PolicyParam"}}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"createGroup"},arguments:[{kind:"Argument",name:{kind:"Name",value:"name"},value:{kind:"Variable",name:{kind:"Name",value:"name"}}},{kind:"Argument",name:{kind:"Name",value:"policy"},value:{kind:"Variable",name:{kind:"Name",value:"policy"}}},{kind:"Argument",name:{kind:"Name",value:"policyParams"},value:{kind:"Variable",name:{kind:"Name",value:"policyParams"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}}]}}]},aGt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"RemoveGroup"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"removeGroup"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}]}]}}]},oGt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"GroupSetPolicy"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"policy"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Policy"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"policyParams"}},type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"PolicyParam"}}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"groupSetPolicy"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}},{kind:"Argument",name:{kind:"Name",value:"policy"},value:{kind:"Variable",name:{kind:"Name",value:"policy"}}},{kind:"Argument",name:{kind:"Name",value:"policyParams"},value:{kind:"Variable",name:{kind:"Name",value:"policyParams"}}}]}]}}]},sGt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"RenameGroup"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"name"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"renameGroup"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}},{kind:"Argument",name:{kind:"Name",value:"name"},value:{kind:"Variable",name:{kind:"Name",value:"name"}}}]}]}}]},lGt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"GroupAddNodes"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"nodeIDs"}},type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"groupAddNodes"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}},{kind:"Argument",name:{kind:"Name",value:"nodeIDs"},value:{kind:"Variable",name:{kind:"Name",value:"nodeIDs"}}}]}]}}]},cGt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"GroupDelNodes"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"nodeIDs"}},type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"groupDelNodes"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}},{kind:"Argument",name:{kind:"Name",value:"nodeIDs"},value:{kind:"Variable",name:{kind:"Name",value:"nodeIDs"}}}]}]}}]},dGt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"GroupAddSubscriptions"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"subscriptionIDs"}},type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"groupAddSubscriptions"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}},{kind:"Argument",name:{kind:"Name",value:"subscriptionIDs"},value:{kind:"Variable",name:{kind:"Name",value:"subscriptionIDs"}}}]}]}}]},hGt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"GroupDelSubscriptions"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"subscriptionIDs"}},type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"groupDelSubscriptions"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}},{kind:"Argument",name:{kind:"Name",value:"subscriptionIDs"},value:{kind:"Variable",name:{kind:"Name",value:"subscriptionIDs"}}}]}]}}]},EGt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"ImportNodes"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"rollbackError"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"args"}},type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ImportArgument"}}}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"importNodes"},arguments:[{kind:"Argument",name:{kind:"Name",value:"rollbackError"},value:{kind:"Variable",name:{kind:"Name",value:"rollbackError"}}},{kind:"Argument",name:{kind:"Name",value:"args"},value:{kind:"Variable",name:{kind:"Name",value:"args"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"link"}},{kind:"Field",name:{kind:"Name",value:"error"}},{kind:"Field",name:{kind:"Name",value:"node"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}}]}}]}}]},mGt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"RemoveNodes"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"ids"}},type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"removeNodes"},arguments:[{kind:"Argument",name:{kind:"Name",value:"ids"},value:{kind:"Variable",name:{kind:"Name",value:"ids"}}}]}]}}]},gGt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"ImportSubscription"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"rollbackError"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"arg"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ImportArgument"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"importSubscription"},arguments:[{kind:"Argument",name:{kind:"Name",value:"rollbackError"},value:{kind:"Variable",name:{kind:"Name",value:"rollbackError"}}},{kind:"Argument",name:{kind:"Name",value:"arg"},value:{kind:"Variable",name:{kind:"Name",value:"arg"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"link"}},{kind:"Field",name:{kind:"Name",value:"sub"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}},{kind:"Field",name:{kind:"Name",value:"nodeImportResult"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"node"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}}]}}]}}]}}]},fGt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"UpdateSubscription"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateSubscription"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}}]}}]},pGt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"RemoveSubscriptions"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"ids"}},type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"removeSubscriptions"},arguments:[{kind:"Argument",name:{kind:"Name",value:"ids"},value:{kind:"Variable",name:{kind:"Name",value:"ids"}}}]}]}}]},DGt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"Run"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"dry"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"run"},arguments:[{kind:"Argument",name:{kind:"Name",value:"dry"},value:{kind:"Variable",name:{kind:"Name",value:"dry"}}}]}]}}]},xGt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"UpdateAvatar"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"avatar"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateAvatar"},arguments:[{kind:"Argument",name:{kind:"Name",value:"avatar"},value:{kind:"Variable",name:{kind:"Name",value:"avatar"}}}]}]}}]},vGt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"UpdateName"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"name"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateName"},arguments:[{kind:"Argument",name:{kind:"Name",value:"name"},value:{kind:"Variable",name:{kind:"Name",value:"name"}}}]}]}}]},CGt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"Mode"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"paths"}},type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"jsonStorage"},arguments:[{kind:"Argument",name:{kind:"Name",value:"paths"},value:{kind:"Variable",name:{kind:"Name",value:"paths"}}}]}]}}]},bGt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"Defaults"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"paths"}},type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"jsonStorage"},arguments:[{kind:"Argument",name:{kind:"Name",value:"paths"},value:{kind:"Variable",name:{kind:"Name",value:"paths"}}}]}]}}]},kGt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"Interfaces"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"up"}},type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"general"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"interfaces"},arguments:[{kind:"Argument",name:{kind:"Name",value:"up"},value:{kind:"Variable",name:{kind:"Name",value:"up"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"ifindex"}},{kind:"Field",name:{kind:"Name",value:"ip"}},{kind:"Field",name:{kind:"Name",value:"flag"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"default"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"gateway"}}]}}]}}]}}]}}]}}]},FGt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"JsonStorage"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"paths"}},type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"jsonStorage"},arguments:[{kind:"Argument",name:{kind:"Name",value:"paths"},value:{kind:"Variable",name:{kind:"Name",value:"paths"}}}]}]}}]},yGt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"General"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"up"}},type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"general"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"dae"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"running"}},{kind:"Field",name:{kind:"Name",value:"modified"}},{kind:"Field",name:{kind:"Name",value:"version"}}]}},{kind:"Field",name:{kind:"Name",value:"interfaces"},arguments:[{kind:"Argument",name:{kind:"Name",value:"up"},value:{kind:"Variable",name:{kind:"Name",value:"up"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"ifindex"}},{kind:"Field",name:{kind:"Name",value:"ip"}},{kind:"Field",name:{kind:"Name",value:"flag"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"default"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"gateway"}}]}}]}}]}}]}}]}}]},AGt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"Nodes"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"nodes"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"edges"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"link"}},{kind:"Field",name:{kind:"Name",value:"address"}},{kind:"Field",name:{kind:"Name",value:"protocol"}},{kind:"Field",name:{kind:"Name",value:"tag"}}]}}]}}]}}]},_Gt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"Subscriptions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"subscriptions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"tag"}},{kind:"Field",name:{kind:"Name",value:"status"}},{kind:"Field",name:{kind:"Name",value:"link"}},{kind:"Field",name:{kind:"Name",value:"info"}},{kind:"Field",name:{kind:"Name",value:"updatedAt"}},{kind:"Field",name:{kind:"Name",value:"nodes"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"edges"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"protocol"}},{kind:"Field",name:{kind:"Name",value:"link"}}]}}]}}]}}]}}]},SGt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"Configs"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"configs"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"selected"}},{kind:"Field",name:{kind:"Name",value:"global"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"logLevel"}},{kind:"Field",name:{kind:"Name",value:"tproxyPort"}},{kind:"Field",name:{kind:"Name",value:"allowInsecure"}},{kind:"Field",name:{kind:"Name",value:"checkInterval"}},{kind:"Field",name:{kind:"Name",value:"checkTolerance"}},{kind:"Field",name:{kind:"Name",value:"lanInterface"}},{kind:"Field",name:{kind:"Name",value:"wanInterface"}},{kind:"Field",name:{kind:"Name",value:"udpCheckDns"}},{kind:"Field",name:{kind:"Name",value:"tcpCheckUrl"}},{kind:"Field",name:{kind:"Name",value:"dialMode"}},{kind:"Field",name:{kind:"Name",value:"tcpCheckHttpMethod"}},{kind:"Field",name:{kind:"Name",value:"disableWaitingNetwork"}},{kind:"Field",name:{kind:"Name",value:"autoConfigKernelParameter"}},{kind:"Field",name:{kind:"Name",value:"sniffingTimeout"}},{kind:"Field",name:{kind:"Name",value:"tlsImplementation"}},{kind:"Field",name:{kind:"Name",value:"utlsImitate"}},{kind:"Field",name:{kind:"Name",value:"tproxyPortProtect"}},{kind:"Field",name:{kind:"Name",value:"soMarkFromDae"}}]}}]}}]}}]},BGt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"Groups"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"groups"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"nodes"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"link"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"address"}},{kind:"Field",name:{kind:"Name",value:"protocol"}},{kind:"Field",name:{kind:"Name",value:"tag"}},{kind:"Field",name:{kind:"Name",value:"subscriptionID"}}]}},{kind:"Field",name:{kind:"Name",value:"subscriptions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"updatedAt"}},{kind:"Field",name:{kind:"Name",value:"tag"}},{kind:"Field",name:{kind:"Name",value:"link"}},{kind:"Field",name:{kind:"Name",value:"status"}},{kind:"Field",name:{kind:"Name",value:"info"}},{kind:"Field",name:{kind:"Name",value:"nodes"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"edges"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"link"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"address"}},{kind:"Field",name:{kind:"Name",value:"protocol"}},{kind:"Field",name:{kind:"Name",value:"tag"}},{kind:"Field",name:{kind:"Name",value:"subscriptionID"}}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"policy"}},{kind:"Field",name:{kind:"Name",value:"policyParams"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"key"}},{kind:"Field",name:{kind:"Name",value:"val"}}]}}]}}]}}]},wGt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"Routings"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"routings"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"selected"}},{kind:"Field",name:{kind:"Name",value:"routing"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"string"}}]}}]}}]}}]},LGt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"DNSs"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"dnss"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"dns"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"string"}},{kind:"Field",name:{kind:"Name",value:"routing"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"request"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"string"}}]}},{kind:"Field",name:{kind:"Name",value:"response"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"string"}}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"selected"}}]}}]}}]},zGt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"User"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"user"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"username"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"avatar"}}]}}]}}]},MGt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"NumberUsers"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"numberUsers"}}]}}]},TGt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"CreateUser"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"username"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"password"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"createUser"},arguments:[{kind:"Argument",name:{kind:"Name",value:"username"},value:{kind:"Variable",name:{kind:"Name",value:"username"}}},{kind:"Argument",name:{kind:"Name",value:"password"},value:{kind:"Variable",name:{kind:"Name",value:"password"}}}]}]}}]},NGt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"Token"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"username"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"password"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"token"},arguments:[{kind:"Argument",name:{kind:"Name",value:"username"},value:{kind:"Variable",name:{kind:"Name",value:"username"}}},{kind:"Argument",name:{kind:"Name",value:"password"},value:{kind:"Variable",name:{kind:"Name",value:"password"}}}]}]}}]};var $ne=(u=>(u.error="error",u.warn="warn",u.info="info",u.debug="debug",u.trace="trace",u))($ne||{}),hc=(u=>(u.ip="ip",u.domain="domain",u.domainP="domain+",u.domainPP="domain++",u))(hc||{}),Kne=(u=>(u.CONNECT="CONNECT",u.HEAD="HEAD",u.OPTIONS="OPTIONS",u.TRACE="TRACE",u.GET="GET",u.POST="POST",u.DELETE="DELETE",u.PATCH="PATCH",u.PUT="PUT",u))(Kne||{}),DT=(u=>(u.tls="tls",u.utls="utls",u))(DT||{}),Wne=(u=>(u.randomized="randomized",u.randomizedalpn="randomizedalpn",u.randomizednoalpn="randomizednoalpn",u.firefox_auto="firefox_auto",u.firefox_55="firefox_55",u.firefox_56="firefox_56",u.firefox_63="firefox_63",u.firefox_65="firefox_65",u.firefox_99="firefox_99",u.firefox_102="firefox_102",u.firefox_105="firefox_105",u.chrome_auto="chrome_auto",u.chrome_58="chrome_58",u.chrome_62="chrome_62",u.chrome_70="chrome_70",u.chrome_72="chrome_72",u.chrome_83="chrome_83",u.chrome_87="chrome_87",u.chrome_96="chrome_96",u.chrome_100="chrome_100",u.chrome_102="chrome_102",u.ios_auto="ios_auto",u.ios_11_1="ios_11_1",u.ios_12_1="ios_12_1",u.ios_13="ios_13",u.ios_14="ios_14",u.android_11_okhttp="android_11_okhttp",u.edge_auto="edge_auto",u.edge_85="edge_85",u.edge_106="edge_106",u.safari_auto="safari_auto",u.safari_16_0="safari_16_0",u.utls_360_auto="360_auto",u.utls_360_7_5="360_7_5",u.utls_360_11_0="360_11_0",u.qq_auto="qq_auto",u.qq_11_1="qq_11_1",u))(Wne||{});const hTe=u=>[[u("error"),"error"],[u("warn"),"warn"],[u("info"),"info"],[u("debug"),"debug"],[u("trace"),"trace"]];var ZZ=(u=>(u.simple="simple",u.advanced="advanced",u))(ZZ||{});const PGt=3,ja=["general"],Gne=["user"],Une=["node"],JI=["subscription"],Xp=["config"],j6=["routing"],H6=["dns"],Ql=["group"];var Xi=(u=>(u.node="node",u.subscription="subscription",u.subscription_node="subscription_node",u.groupNode="group_node",u.groupSubscription="group_subscription",u))(Xi||{}),ts=(u=>(u.config="config",u.dns="dns",u.routing="routing",u.group="group",u))(ts||{});const ETe=`${location.protocol}//${location.hostname}:2023/graphql`,RGt=$ne.info,mTe=12345,gTe=!0,fTe=0,pTe=!1,DTe=30,xTe=0,vTe=100,CTe=["dns.google:53","8.8.8.8","2001:4860:4860::8888"],bTe=["http://cp.cloudflare.com","1.1.1.1","2606:4700:4700::1111"],kTe=hc.domain,FTe=Kne.HEAD,yTe=!1,ATe=!0,_Te=DT.tls,STe=Wne.chrome_auto,IGt="global",OGt="default",jGt="default",BTe="proxy",HGt=(u=[])=>({logLevel:RGt,tproxyPort:mTe,tproxyPortProtect:gTe,soMarkFromDae:fTe,allowInsecure:pTe,checkInterval:`${DTe}s`,checkTolerance:`${xTe}ms`,sniffingTimeout:`${vTe}ms`,lanInterface:u,wanInterface:["auto"],udpCheckDns:CTe,tcpCheckUrl:bTe,tcpCheckHttpMethod:FTe,dialMode:kTe,autoConfigKernelParameter:ATe,tlsImplementation:_Te,utlsImitate:STe,disableWaitingNetwork:yTe}),wTe=qo.MinMovingAvg,VGt=` pname(NetworkManager, systemd-resolved, dnsmasq) -> must_direct dip(geoip:private) -> direct dip(geoip:cn) -> direct @@ -1063,7 +1063,7 @@ ${c}`)}yield yield _h(l.map(c=>c.body))}}catch(l){i={error:l}}finally{try{s&&!s. `));let d=l.props,h=typeof(d==null?void 0:d.className)=="function"?(...m)=>UDe(d==null?void 0:d.className(...m),o.className):UDe(d==null?void 0:d.className,o.className),E=h?{className:h}:{};return C.cloneElement(l,Object.assign({},PRe(l.props,VY(H$(o,["ref"]))),c,s,WNu(l.ref,s.ref),E))}return C.createElement(i,Object.assign({},H$(o,["ref"]),i!==C.Fragment&&s,i!==C.Fragment&&c),l)}function WNu(...u){return{ref:u.every(e=>e==null)?void 0:e=>{for(let t of u)t!=null&&(typeof t=="function"?t(e):t.current=e)}}}function PRe(...u){if(u.length===0)return{};if(u.length===1)return u[0];let e={},t={};for(let n of u)for(let i in n)i.startsWith("on")&&typeof n[i]=="function"?(t[i]!=null||(t[i]=[]),t[i].push(n[i])):e[i]=n[i];if(e.disabled||e["aria-disabled"])return Object.assign(e,Object.fromEntries(Object.keys(t).map(n=>[n,void 0])));for(let n in t)Object.assign(e,{[n](i,...r){let a=t[n];for(let o of a){if((i instanceof Event||(i==null?void 0:i.nativeEvent)instanceof Event)&&i.defaultPrevented)return;o(i,...r)}}});return e}function iD(u){var e;return Object.assign(C.forwardRef(u),{displayName:(e=u.displayName)!=null?e:u.name})}function VY(u){let e=Object.assign({},u);for(let t in e)e[t]===void 0&&delete e[t];return e}function H$(u,e=[]){let t=Object.assign({},u);for(let n of e)n in t&&delete t[n];return t}function GNu(u){let e=u.parentElement,t=null;for(;e&&!(e instanceof HTMLFieldSetElement);)e instanceof HTMLLegendElement&&(t=e),e=e.parentElement;let n=(e==null?void 0:e.getAttribute("disabled"))==="";return n&&UNu(t)?!1:n}function UNu(u){if(!u)return!1;let e=u.previousElementSibling;for(;e!==null;){if(e instanceof HTMLLegendElement)return!1;e=e.previousElementSibling}return!0}function RRe(u={},e=null,t=[]){for(let[n,i]of Object.entries(u))ORe(t,IRe(e,n),i);return t}function IRe(u,e){return u?u+"["+e+"]":e}function ORe(u,e,t){if(Array.isArray(t))for(let[n,i]of t.entries())ORe(u,IRe(e,n.toString()),i);else t instanceof Date?u.push([e,t.toISOString()]):typeof t=="boolean"?u.push([e,t?"1":"0"]):typeof t=="string"?u.push([e,t]):typeof t=="number"?u.push([e,`${t}`]):t==null?u.push([e,""]):RRe(t,e,u)}let qNu="div";var jRe=(u=>(u[u.None=1]="None",u[u.Focusable=2]="Focusable",u[u.Hidden=4]="Hidden",u))(jRe||{});function JNu(u,e){let{features:t=1,...n}=u,i={ref:e,"aria-hidden":(t&2)===2?!0:void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(t&4)===4&&(t&2)!==2&&{display:"none"}}};return nD({ourProps:i,theirProps:n,slot:{},defaultTag:qNu,name:"Hidden"})}let ZNu=iD(JNu),Rie=C.createContext(null);Rie.displayName="OpenClosedContext";var My=(u=>(u[u.Open=1]="Open",u[u.Closed=2]="Closed",u[u.Closing=4]="Closing",u[u.Opening=8]="Opening",u))(My||{});function YNu(){return C.useContext(Rie)}function QNu({value:u,children:e}){return M.createElement(Rie.Provider,{value:u},e)}var h0=(u=>(u.Space=" ",u.Enter="Enter",u.Escape="Escape",u.Backspace="Backspace",u.Delete="Delete",u.ArrowLeft="ArrowLeft",u.ArrowUp="ArrowUp",u.ArrowRight="ArrowRight",u.ArrowDown="ArrowDown",u.Home="Home",u.End="End",u.PageUp="PageUp",u.PageDown="PageDown",u.Tab="Tab",u))(h0||{});function XNu(u,e,t){let[n,i]=C.useState(t),r=u!==void 0,a=C.useRef(r),o=C.useRef(!1),s=C.useRef(!1);return r&&!a.current&&!o.current?(o.current=!0,a.current=r,console.error("A component is changing from uncontrolled to controlled. This may be caused by the value changing from undefined to a defined value, which should not happen.")):!r&&a.current&&!s.current&&(s.current=!0,a.current=r,console.error("A component is changing from controlled to uncontrolled. This may be caused by the value changing from a defined value to undefined, which should not happen.")),[r?u:n,pi(l=>(r||i(l),e==null?void 0:e(l)))]}function qDe(u,e){let t=C.useRef([]),n=pi(u);C.useEffect(()=>{let i=[...t.current];for(let[r,a]of e.entries())if(t.current[r]!==a){let o=n(e,i);return t.current=e,o}},[n,...e])}function JDe(u){return[u.screenX,u.screenY]}function ePu(){let u=C.useRef([-1,-1]);return{wasMoved(e){let t=JDe(e);return u.current[0]===t[0]&&u.current[1]===t[1]?!1:(u.current=t,!0)},update(e){u.current=JDe(e)}}}function tPu(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function uPu(){return/Android/gi.test(window.navigator.userAgent)}function nPu(){return tPu()||uPu()}function iPu(...u){return C.useMemo(()=>Pie(...u),[...u])}var rPu=(u=>(u[u.Open=0]="Open",u[u.Closed=1]="Closed",u))(rPu||{}),aPu=(u=>(u[u.Single=0]="Single",u[u.Multi=1]="Multi",u))(aPu||{}),oPu=(u=>(u[u.Pointer=0]="Pointer",u[u.Other=1]="Other",u))(oPu||{}),sPu=(u=>(u[u.OpenCombobox=0]="OpenCombobox",u[u.CloseCombobox=1]="CloseCombobox",u[u.GoToOption=2]="GoToOption",u[u.RegisterOption=3]="RegisterOption",u[u.UnregisterOption=4]="UnregisterOption",u[u.RegisterLabel=5]="RegisterLabel",u))(sPu||{});function V$(u,e=t=>t){let t=u.activeOptionIndex!==null?u.options[u.activeOptionIndex]:null,n=PNu(e(u.options.slice()),r=>r.dataRef.current.domRef.current),i=t?n.indexOf(t):null;return i===-1&&(i=null),{options:n,activeOptionIndex:i}}let lPu={1(u){var e;return(e=u.dataRef.current)!=null&&e.disabled||u.comboboxState===1?u:{...u,activeOptionIndex:null,comboboxState:1}},0(u){var e;if((e=u.dataRef.current)!=null&&e.disabled||u.comboboxState===0)return u;let t=u.activeOptionIndex;if(u.dataRef.current){let{isSelected:n}=u.dataRef.current,i=u.options.findIndex(r=>n(r.dataRef.current.value));i!==-1&&(t=i)}return{...u,comboboxState:0,activeOptionIndex:t}},2(u,e){var t,n,i,r;if((t=u.dataRef.current)!=null&&t.disabled||(n=u.dataRef.current)!=null&&n.optionsRef.current&&!((i=u.dataRef.current)!=null&&i.optionsPropsRef.current.static)&&u.comboboxState===1)return u;let a=V$(u);if(a.activeOptionIndex===null){let s=a.options.findIndex(l=>!l.dataRef.current.disabled);s!==-1&&(a.activeOptionIndex=s)}let o=$Nu(e,{resolveItems:()=>a.options,resolveActiveIndex:()=>a.activeOptionIndex,resolveId:s=>s.id,resolveDisabled:s=>s.dataRef.current.disabled});return{...u,...a,activeOptionIndex:o,activationTrigger:(r=e.trigger)!=null?r:1}},3:(u,e)=>{var t,n;let i={id:e.id,dataRef:e.dataRef},r=V$(u,o=>[...o,i]);u.activeOptionIndex===null&&(t=u.dataRef.current)!=null&&t.isSelected(e.dataRef.current.value)&&(r.activeOptionIndex=r.options.indexOf(i));let a={...u,...r,activationTrigger:1};return(n=u.dataRef.current)!=null&&n.__demoMode&&u.dataRef.current.value===void 0&&(a.activeOptionIndex=0),a},4:(u,e)=>{let t=V$(u,n=>{let i=n.findIndex(r=>r.id===e.id);return i!==-1&&n.splice(i,1),n});return{...u,...t,activationTrigger:1}},5:(u,e)=>({...u,labelId:e.id})},Iie=C.createContext(null);Iie.displayName="ComboboxActionsContext";function y7(u){let e=C.useContext(Iie);if(e===null){let t=new Error(`<${u} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,y7),t}return e}let Oie=C.createContext(null);Oie.displayName="ComboboxDataContext";function G6(u){let e=C.useContext(Oie);if(e===null){let t=new Error(`<${u} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,G6),t}return e}function cPu(u,e){return o4(e.type,lPu,u,e)}let dPu=C.Fragment;function hPu(u,e){let{value:t,defaultValue:n,onChange:i,form:r,name:a,by:o=(X,re)=>X===re,disabled:s=!1,__demoMode:l=!1,nullable:c=!1,multiple:d=!1,...h}=u,[E=d?[]:void 0,m]=XNu(t,i,n),[g,f]=C.useReducer(cPu,{dataRef:C.createRef(),comboboxState:l?0:1,options:[],activeOptionIndex:null,activationTrigger:1,labelId:null}),p=C.useRef(!1),D=C.useRef({static:!1,hold:!1}),x=C.useRef(null),b=C.useRef(null),k=C.useRef(null),A=C.useRef(null),F=pi(typeof o=="string"?(X,re)=>{let ge=o;return(X==null?void 0:X[ge])===(re==null?void 0:re[ge])}:o),S=C.useCallback(X=>o4(w.mode,{1:()=>E.some(re=>F(re,X)),0:()=>F(E,X)}),[E]),w=C.useMemo(()=>({...g,optionsPropsRef:D,labelRef:x,inputRef:b,buttonRef:k,optionsRef:A,value:E,defaultValue:n,disabled:s,mode:d?1:0,get activeOptionIndex(){if(p.current&&g.activeOptionIndex===null&&g.options.length>0){let X=g.options.findIndex(re=>!re.dataRef.current.disabled);if(X!==-1)return X}return g.activeOptionIndex},compare:F,isSelected:S,nullable:c,__demoMode:l}),[E,n,s,d,c,l,g]),z=C.useRef(w.activeOptionIndex!==null?w.options[w.activeOptionIndex]:null);C.useEffect(()=>{let X=w.activeOptionIndex!==null?w.options[w.activeOptionIndex]:null;z.current!==X&&(z.current=X)}),M0(()=>{g.dataRef.current=w},[w]),INu([w.buttonRef,w.inputRef,w.optionsRef],()=>V.closeCombobox(),w.comboboxState===0);let N=C.useMemo(()=>({open:w.comboboxState===0,disabled:s,activeIndex:w.activeOptionIndex,activeOption:w.activeOptionIndex===null?null:w.options[w.activeOptionIndex].dataRef.current.value,value:E}),[w,s,E]),O=pi(X=>{let re=w.options.find(ge=>ge.id===X);re&&H(re.dataRef.current.value)}),y=pi(()=>{if(w.activeOptionIndex!==null){let{dataRef:X,id:re}=w.options[w.activeOptionIndex];H(X.current.value),V.goToOption(Ja.Specific,re)}}),_=pi(()=>{f({type:0}),p.current=!0}),L=pi(()=>{f({type:1}),p.current=!1}),T=pi((X,re,ge)=>(p.current=!1,X===Ja.Specific?f({type:2,focus:Ja.Specific,id:re,trigger:ge}):f({type:2,focus:X,trigger:ge}))),R=pi((X,re)=>(f({type:3,id:X,dataRef:re}),()=>{var ge;((ge=z.current)==null?void 0:ge.id)===X&&(p.current=!0),f({type:4,id:X})})),I=pi(X=>(f({type:5,id:X}),()=>f({type:5,id:null}))),H=pi(X=>o4(w.mode,{0(){return m==null?void 0:m(X)},1(){let re=w.value.slice(),ge=re.findIndex(_e=>F(_e,X));return ge===-1?re.push(X):re.splice(ge,1),m==null?void 0:m(re)}})),V=C.useMemo(()=>({onChange:H,registerOption:R,registerLabel:I,goToOption:T,closeCombobox:L,openCombobox:_,selectActiveOption:y,selectOption:O}),[]),U=e===null?{}:{ref:e},J=C.useRef(null),Y=Nie();return C.useEffect(()=>{J.current&&n!==void 0&&Y.addEventListener(J.current,"reset",()=>{m==null||m(n)})},[J,m]),M.createElement(Iie.Provider,{value:V},M.createElement(Oie.Provider,{value:w},M.createElement(QNu,{value:o4(w.comboboxState,{0:My.Open,1:My.Closed})},a!=null&&E!=null&&RRe({[a]:E}).map(([X,re],ge)=>M.createElement(ZNu,{features:jRe.Hidden,ref:ge===0?_e=>{var Ve;J.current=(Ve=_e==null?void 0:_e.closest("form"))!=null?Ve:null}:void 0,...VY({key:X,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:r,name:X,value:re})})),nD({ourProps:U,theirProps:h,slot:N,defaultTag:dPu,name:"Combobox"}))))}let EPu="input";function mPu(u,e){var t,n,i,r;let a=k7(),{id:o=`headlessui-combobox-input-${a}`,onChange:s,displayValue:l,type:c="text",...d}=u,h=G6("Combobox.Input"),E=y7("Combobox.Input"),m=F7(h.inputRef,e),g=iPu(h.inputRef),f=C.useRef(!1),p=Nie(),D=pi(()=>{E.onChange(null),h.optionsRef.current&&(h.optionsRef.current.scrollTop=0),E.goToOption(Ja.Nothing)}),x=function(){var y;return typeof l=="function"&&h.value!==void 0?(y=l(h.value))!=null?y:"":typeof h.value=="string"?h.value:""}();qDe(([y,_],[L,T])=>{if(f.current)return;let R=h.inputRef.current;R&&((T===0&&_===1||y!==L)&&(R.value=y),requestAnimationFrame(()=>{if(f.current||!R||(g==null?void 0:g.activeElement)!==R)return;let{selectionStart:I,selectionEnd:H}=R;Math.abs((H??0)-(I??0))===0&&I===0&&R.setSelectionRange(R.value.length,R.value.length)}))},[x,h.comboboxState,g]),qDe(([y],[_])=>{if(y===0&&_===1){if(f.current)return;let L=h.inputRef.current;if(!L)return;let T=L.value,{selectionStart:R,selectionEnd:I,selectionDirection:H}=L;L.value="",L.value=T,H!==null?L.setSelectionRange(R,I,H):L.setSelectionRange(R,I)}},[h.comboboxState]);let b=C.useRef(!1),k=pi(()=>{b.current=!0}),A=pi(()=>{p.nextFrame(()=>{b.current=!1})}),F=pi(y=>{switch(f.current=!0,y.key){case h0.Enter:if(f.current=!1,h.comboboxState!==0||b.current)return;if(y.preventDefault(),y.stopPropagation(),h.activeOptionIndex===null){E.closeCombobox();return}E.selectActiveOption(),h.mode===0&&E.closeCombobox();break;case h0.ArrowDown:return f.current=!1,y.preventDefault(),y.stopPropagation(),o4(h.comboboxState,{0:()=>{E.goToOption(Ja.Next)},1:()=>{E.openCombobox()}});case h0.ArrowUp:return f.current=!1,y.preventDefault(),y.stopPropagation(),o4(h.comboboxState,{0:()=>{E.goToOption(Ja.Previous)},1:()=>{E.openCombobox(),p.nextFrame(()=>{h.value||E.goToOption(Ja.Last)})}});case h0.Home:if(y.shiftKey)break;return f.current=!1,y.preventDefault(),y.stopPropagation(),E.goToOption(Ja.First);case h0.PageUp:return f.current=!1,y.preventDefault(),y.stopPropagation(),E.goToOption(Ja.First);case h0.End:if(y.shiftKey)break;return f.current=!1,y.preventDefault(),y.stopPropagation(),E.goToOption(Ja.Last);case h0.PageDown:return f.current=!1,y.preventDefault(),y.stopPropagation(),E.goToOption(Ja.Last);case h0.Escape:return f.current=!1,h.comboboxState!==0?void 0:(y.preventDefault(),h.optionsRef.current&&!h.optionsPropsRef.current.static&&y.stopPropagation(),h.nullable&&h.mode===0&&h.value===null&&D(),E.closeCombobox());case h0.Tab:if(f.current=!1,h.comboboxState!==0)return;h.mode===0&&E.selectActiveOption(),E.closeCombobox();break}}),S=pi(y=>{s==null||s(y),h.nullable&&h.mode===0&&y.target.value===""&&D(),E.openCombobox()}),w=pi(()=>{f.current=!1}),z=Tie(()=>{if(h.labelId)return[h.labelId].join(" ")},[h.labelId]),N=C.useMemo(()=>({open:h.comboboxState===0,disabled:h.disabled}),[h]),O={ref:m,id:o,role:"combobox",type:c,"aria-controls":(t=h.optionsRef.current)==null?void 0:t.id,"aria-expanded":h.comboboxState===0,"aria-activedescendant":h.activeOptionIndex===null||(n=h.options[h.activeOptionIndex])==null?void 0:n.id,"aria-labelledby":z,"aria-autocomplete":"list",defaultValue:(r=(i=u.defaultValue)!=null?i:h.defaultValue!==void 0?l==null?void 0:l(h.defaultValue):null)!=null?r:h.defaultValue,disabled:h.disabled,onCompositionStart:k,onCompositionEnd:A,onKeyDown:F,onChange:S,onBlur:w};return nD({ourProps:O,theirProps:d,slot:N,defaultTag:EPu,name:"Combobox.Input"})}let gPu="button";function fPu(u,e){var t;let n=G6("Combobox.Button"),i=y7("Combobox.Button"),r=F7(n.buttonRef,e),a=k7(),{id:o=`headlessui-combobox-button-${a}`,...s}=u,l=Nie(),c=pi(g=>{switch(g.key){case h0.ArrowDown:return g.preventDefault(),g.stopPropagation(),n.comboboxState===1&&i.openCombobox(),l.nextFrame(()=>{var f;return(f=n.inputRef.current)==null?void 0:f.focus({preventScroll:!0})});case h0.ArrowUp:return g.preventDefault(),g.stopPropagation(),n.comboboxState===1&&(i.openCombobox(),l.nextFrame(()=>{n.value||i.goToOption(Ja.Last)})),l.nextFrame(()=>{var f;return(f=n.inputRef.current)==null?void 0:f.focus({preventScroll:!0})});case h0.Escape:return n.comboboxState!==0?void 0:(g.preventDefault(),n.optionsRef.current&&!n.optionsPropsRef.current.static&&g.stopPropagation(),i.closeCombobox(),l.nextFrame(()=>{var f;return(f=n.inputRef.current)==null?void 0:f.focus({preventScroll:!0})}));default:return}}),d=pi(g=>{if(GNu(g.currentTarget))return g.preventDefault();n.comboboxState===0?i.closeCombobox():(g.preventDefault(),i.openCombobox()),l.nextFrame(()=>{var f;return(f=n.inputRef.current)==null?void 0:f.focus({preventScroll:!0})})}),h=Tie(()=>{if(n.labelId)return[n.labelId,o].join(" ")},[n.labelId,o]),E=C.useMemo(()=>({open:n.comboboxState===0,disabled:n.disabled,value:n.value}),[n]),m={ref:r,id:o,type:ONu(u,n.buttonRef),tabIndex:-1,"aria-haspopup":"listbox","aria-controls":(t=n.optionsRef.current)==null?void 0:t.id,"aria-expanded":n.comboboxState===0,"aria-labelledby":h,disabled:n.disabled,onClick:d,onKeyDown:c};return nD({ourProps:m,theirProps:s,slot:E,defaultTag:gPu,name:"Combobox.Button"})}let pPu="label";function DPu(u,e){let t=k7(),{id:n=`headlessui-combobox-label-${t}`,...i}=u,r=G6("Combobox.Label"),a=y7("Combobox.Label"),o=F7(r.labelRef,e);M0(()=>a.registerLabel(n),[n]);let s=pi(()=>{var c;return(c=r.inputRef.current)==null?void 0:c.focus({preventScroll:!0})}),l=C.useMemo(()=>({open:r.comboboxState===0,disabled:r.disabled}),[r]);return nD({ourProps:{ref:o,id:n,onClick:s},theirProps:i,slot:l,defaultTag:pPu,name:"Combobox.Label"})}let xPu="ul",vPu=HY.RenderStrategy|HY.Static;function CPu(u,e){let t=k7(),{id:n=`headlessui-combobox-options-${t}`,hold:i=!1,...r}=u,a=G6("Combobox.Options"),o=F7(a.optionsRef,e),s=YNu(),l=(()=>s!==null?(s&My.Open)===My.Open:a.comboboxState===0)();M0(()=>{var E;a.optionsPropsRef.current.static=(E=u.static)!=null?E:!1},[a.optionsPropsRef,u.static]),M0(()=>{a.optionsPropsRef.current.hold=i},[a.optionsPropsRef,i]),HNu({container:a.optionsRef.current,enabled:a.comboboxState===0,accept(E){return E.getAttribute("role")==="option"?NodeFilter.FILTER_REJECT:E.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(E){E.setAttribute("role","none")}});let c=Tie(()=>{var E,m;return(m=a.labelId)!=null?m:(E=a.buttonRef.current)==null?void 0:E.id},[a.labelId,a.buttonRef.current]),d=C.useMemo(()=>({open:a.comboboxState===0}),[a]),h={"aria-labelledby":c,role:"listbox","aria-multiselectable":a.mode===1?!0:void 0,id:n,ref:o};return nD({ourProps:h,theirProps:r,slot:d,defaultTag:xPu,features:vPu,visible:l,name:"Combobox.Options"})}let bPu="li";function kPu(u,e){var t,n;let i=k7(),{id:r=`headlessui-combobox-option-${i}`,disabled:a=!1,value:o,...s}=u,l=G6("Combobox.Option"),c=y7("Combobox.Option"),d=l.activeOptionIndex!==null?l.options[l.activeOptionIndex].id===r:!1,h=l.isSelected(o),E=C.useRef(null),m=b7({disabled:a,value:o,domRef:E,textValue:(n=(t=E.current)==null?void 0:t.textContent)==null?void 0:n.toLowerCase()}),g=F7(e,E),f=pi(()=>c.selectOption(r));M0(()=>c.registerOption(r,m),[m,r]);let p=C.useRef(!l.__demoMode);M0(()=>{if(!l.__demoMode)return;let w=JT();return w.requestAnimationFrame(()=>{p.current=!0}),w.dispose},[]),M0(()=>{if(l.comboboxState!==0||!d||!p.current||l.activationTrigger===0)return;let w=JT();return w.requestAnimationFrame(()=>{var z,N;(N=(z=E.current)==null?void 0:z.scrollIntoView)==null||N.call(z,{block:"nearest"})}),w.dispose},[E,d,l.comboboxState,l.activationTrigger,l.activeOptionIndex]);let D=pi(w=>{if(a)return w.preventDefault();f(),l.mode===0&&c.closeCombobox(),nPu()||requestAnimationFrame(()=>{var z;return(z=l.inputRef.current)==null?void 0:z.focus()})}),x=pi(()=>{if(a)return c.goToOption(Ja.Nothing);c.goToOption(Ja.Specific,r)}),b=ePu(),k=pi(w=>b.update(w)),A=pi(w=>{b.wasMoved(w)&&(a||d||c.goToOption(Ja.Specific,r,0))}),F=pi(w=>{b.wasMoved(w)&&(a||d&&(l.optionsPropsRef.current.hold||c.goToOption(Ja.Nothing)))}),S=C.useMemo(()=>({active:d,selected:h,disabled:a}),[d,h,a]);return nD({ourProps:{id:r,ref:g,role:"option",tabIndex:a===!0?void 0:-1,"aria-disabled":a===!0?!0:void 0,"aria-selected":h,disabled:void 0,onClick:D,onFocus:x,onPointerEnter:k,onMouseEnter:k,onPointerMove:A,onMouseMove:A,onPointerLeave:F,onMouseLeave:F},theirProps:s,slot:S,defaultTag:bPu,name:"Combobox.Option"})}let FPu=iD(hPu),yPu=iD(fPu),APu=iD(mPu),_Pu=iD(DPu),SPu=iD(CPu),BPu=iD(kPu),HD=Object.assign(FPu,{Input:APu,Button:yPu,Label:_Pu,Options:SPu,Option:BPu});var wPu=Object.defineProperty,Fe=(u,e)=>wPu(u,"name",{value:e,configurable:!0});function Mg(u){const e=C.createContext(null);return e.displayName=u,e}Fe(Mg,"createNullableContext");function Tg(u){function e(t){var n;const i=C.useContext(u);if(i===null&&t!=null&&t.nonNull)throw new Error(`Tried to use \`${((n=t.caller)==null?void 0:n.name)||e.caller.name}\` without the necessary context. Make sure to render the \`${u.displayName}Provider\` component higher up the tree.`);return i}return Fe(e,"useGivenContext"),Object.defineProperty(e,"name",{value:`use${u.displayName}`}),e}Fe(Tg,"createContextHook");const HRe=Mg("StorageContext");function VRe(u){const e=C.useRef(!0),[t,n]=C.useState(new nY(u.storage));return C.useEffect(()=>{e.current?e.current=!1:n(new nY(u.storage))},[u.storage]),B.jsx(HRe.Provider,{value:t,children:u.children})}Fe(VRe,"StorageContextProvider");const Ng=Tg(HRe),LPu=Fe(({title:u,titleId:e,...t})=>C.createElement("svg",{height:"1em",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":e,...t},u?C.createElement("title",{id:e},u):null,C.createElement("path",{d:"M5.0484 1.40838C6.12624 0.33054 7.87376 0.330541 8.9516 1.40838L12.5916 5.0484C13.6695 6.12624 13.6695 7.87376 12.5916 8.9516L8.9516 12.5916C7.87376 13.6695 6.12624 13.6695 5.0484 12.5916L1.40838 8.9516C0.33054 7.87376 0.330541 6.12624 1.40838 5.0484L5.0484 1.40838Z",stroke:"currentColor",strokeWidth:1.2}),C.createElement("rect",{x:6,y:6,width:2,height:2,rx:1,fill:"currentColor"})),"SvgArgument"),zPu=Fe(({title:u,titleId:e,...t})=>C.createElement("svg",{height:"1em",viewBox:"0 0 14 9",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":e,...t},u?C.createElement("title",{id:e},u):null,C.createElement("path",{d:"M1 1L7 7L13 1",stroke:"currentColor",strokeWidth:1.5})),"SvgChevronDown"),MPu=Fe(({title:u,titleId:e,...t})=>C.createElement("svg",{height:"1em",viewBox:"0 0 7 10",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":e,...t},u?C.createElement("title",{id:e},u):null,C.createElement("path",{d:"M6 1.04819L2 5.04819L6 9.04819",stroke:"currentColor",strokeWidth:1.75})),"SvgChevronLeft"),TPu=Fe(({title:u,titleId:e,...t})=>C.createElement("svg",{height:"1em",viewBox:"0 0 14 9",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":e,...t},u?C.createElement("title",{id:e},u):null,C.createElement("path",{d:"M13 8L7 2L1 8",stroke:"currentColor",strokeWidth:1.5})),"SvgChevronUp"),NPu=Fe(({title:u,titleId:e,...t})=>C.createElement("svg",{height:"1em",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":e,...t},u?C.createElement("title",{id:e},u):null,C.createElement("path",{d:"M1 1L12.9998 12.9997",stroke:"currentColor",strokeWidth:1.5}),C.createElement("path",{d:"M13 1L1.00079 13.0003",stroke:"currentColor",strokeWidth:1.5})),"SvgClose"),PPu=Fe(({title:u,titleId:e,...t})=>C.createElement("svg",{height:"1em",viewBox:"-2 -2 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":e,...t},u?C.createElement("title",{id:e},u):null,C.createElement("path",{d:"M11.25 14.2105V15.235C11.25 16.3479 10.3479 17.25 9.23501 17.25H2.76499C1.65214 17.25 0.75 16.3479 0.75 15.235L0.75 8.76499C0.75 7.65214 1.65214 6.75 2.76499 6.75L3.78947 6.75",stroke:"currentColor",strokeWidth:1.5}),C.createElement("rect",{x:6.75,y:.75,width:10.5,height:10.5,rx:2.2069,stroke:"currentColor",strokeWidth:1.5})),"SvgCopy"),RPu=Fe(({title:u,titleId:e,...t})=>C.createElement("svg",{height:"1em",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":e,...t},u?C.createElement("title",{id:e},u):null,C.createElement("path",{d:"M5.0484 1.40838C6.12624 0.33054 7.87376 0.330541 8.9516 1.40838L12.5916 5.0484C13.6695 6.12624 13.6695 7.87376 12.5916 8.9516L8.9516 12.5916C7.87376 13.6695 6.12624 13.6695 5.0484 12.5916L1.40838 8.9516C0.33054 7.87376 0.330541 6.12624 1.40838 5.0484L5.0484 1.40838Z",stroke:"currentColor",strokeWidth:1.2}),C.createElement("path",{d:"M5 9L9 5",stroke:"currentColor",strokeWidth:1.2}),C.createElement("path",{d:"M5 5L9 9",stroke:"currentColor",strokeWidth:1.2})),"SvgDeprecatedArgument"),IPu=Fe(({title:u,titleId:e,...t})=>C.createElement("svg",{height:"1em",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":e,...t},u?C.createElement("title",{id:e},u):null,C.createElement("path",{d:"M4 8L8 4",stroke:"currentColor",strokeWidth:1.2}),C.createElement("path",{d:"M4 4L8 8",stroke:"currentColor",strokeWidth:1.2}),C.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.5 1.2H9C9.99411 1.2 10.8 2.00589 10.8 3V9C10.8 9.99411 9.99411 10.8 9 10.8H8.5V12H9C10.6569 12 12 10.6569 12 9V3C12 1.34315 10.6569 0 9 0H8.5V1.2ZM3.5 1.2V0H3C1.34315 0 0 1.34315 0 3V9C0 10.6569 1.34315 12 3 12H3.5V10.8H3C2.00589 10.8 1.2 9.99411 1.2 9V3C1.2 2.00589 2.00589 1.2 3 1.2H3.5Z",fill:"currentColor"})),"SvgDeprecatedEnumValue"),OPu=Fe(({title:u,titleId:e,...t})=>C.createElement("svg",{height:"1em",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":e,...t},u?C.createElement("title",{id:e},u):null,C.createElement("rect",{x:.6,y:.6,width:10.8,height:10.8,rx:3.4,stroke:"currentColor",strokeWidth:1.2}),C.createElement("path",{d:"M4 8L8 4",stroke:"currentColor",strokeWidth:1.2}),C.createElement("path",{d:"M4 4L8 8",stroke:"currentColor",strokeWidth:1.2})),"SvgDeprecatedField"),jPu=Fe(({title:u,titleId:e,...t})=>C.createElement("svg",{height:"1em",viewBox:"0 0.5 12 12",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":e,...t},u?C.createElement("title",{id:e},u):null,C.createElement("rect",{x:7,y:5.5,width:2,height:2,rx:1,transform:"rotate(90 7 5.5)",fill:"currentColor"}),C.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.8 9L10.8 9.5C10.8 10.4941 9.99411 11.3 9 11.3L3 11.3C2.00589 11.3 1.2 10.4941 1.2 9.5L1.2 9L-3.71547e-07 9L-3.93402e-07 9.5C-4.65826e-07 11.1569 1.34314 12.5 3 12.5L9 12.5C10.6569 12.5 12 11.1569 12 9.5L12 9L10.8 9ZM10.8 4L12 4L12 3.5C12 1.84315 10.6569 0.5 9 0.5L3 0.5C1.34315 0.5 -5.87117e-08 1.84315 -1.31135e-07 3.5L-1.5299e-07 4L1.2 4L1.2 3.5C1.2 2.50589 2.00589 1.7 3 1.7L9 1.7C9.99411 1.7 10.8 2.50589 10.8 3.5L10.8 4Z",fill:"currentColor"})),"SvgDirective"),HPu=Fe(({title:u,titleId:e,...t})=>C.createElement("svg",{height:"1em",viewBox:"0 0 20 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":e,...t},u?C.createElement("title",{id:e},u):null,C.createElement("path",{d:"M0.75 3C0.75 1.75736 1.75736 0.75 3 0.75H17.25C17.8023 0.75 18.25 1.19772 18.25 1.75V5.25",stroke:"currentColor",strokeWidth:1.5}),C.createElement("path",{d:"M0.75 3C0.75 4.24264 1.75736 5.25 3 5.25H18.25C18.8023 5.25 19.25 5.69771 19.25 6.25V22.25C19.25 22.8023 18.8023 23.25 18.25 23.25H3C1.75736 23.25 0.75 22.2426 0.75 21V3Z",stroke:"currentColor",strokeWidth:1.5}),C.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3 5.25C1.75736 5.25 0.75 4.24264 0.75 3V21C0.75 22.2426 1.75736 23.25 3 23.25H18.25C18.8023 23.25 19.25 22.8023 19.25 22.25V6.25C19.25 5.69771 18.8023 5.25 18.25 5.25H3ZM13 11L6 11V12.5L13 12.5V11Z",fill:"currentColor"})),"SvgDocsFilled"),VPu=Fe(({title:u,titleId:e,...t})=>C.createElement("svg",{height:"1em",viewBox:"0 0 20 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":e,...t},u?C.createElement("title",{id:e},u):null,C.createElement("path",{d:"M0.75 3C0.75 4.24264 1.75736 5.25 3 5.25H17.25M0.75 3C0.75 1.75736 1.75736 0.75 3 0.75H16.25C16.8023 0.75 17.25 1.19772 17.25 1.75V5.25M0.75 3V21C0.75 22.2426 1.75736 23.25 3 23.25H18.25C18.8023 23.25 19.25 22.8023 19.25 22.25V6.25C19.25 5.69771 18.8023 5.25 18.25 5.25H17.25",stroke:"currentColor",strokeWidth:1.5}),C.createElement("line",{x1:13,y1:11.75,x2:6,y2:11.75,stroke:"currentColor",strokeWidth:1.5})),"SvgDocs"),$Pu=Fe(({title:u,titleId:e,...t})=>C.createElement("svg",{height:"1em",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":e,...t},u?C.createElement("title",{id:e},u):null,C.createElement("rect",{x:5,y:5,width:2,height:2,rx:1,fill:"currentColor"}),C.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.5 1.2H9C9.99411 1.2 10.8 2.00589 10.8 3V9C10.8 9.99411 9.99411 10.8 9 10.8H8.5V12H9C10.6569 12 12 10.6569 12 9V3C12 1.34315 10.6569 0 9 0H8.5V1.2ZM3.5 1.2V0H3C1.34315 0 0 1.34315 0 3V9C0 10.6569 1.34315 12 3 12H3.5V10.8H3C2.00589 10.8 1.2 9.99411 1.2 9V3C1.2 2.00589 2.00589 1.2 3 1.2H3.5Z",fill:"currentColor"})),"SvgEnumValue"),KPu=Fe(({title:u,titleId:e,...t})=>C.createElement("svg",{height:"1em",viewBox:"0 0 12 13",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":e,...t},u?C.createElement("title",{id:e},u):null,C.createElement("rect",{x:.6,y:1.1,width:10.8,height:10.8,rx:2.4,stroke:"currentColor",strokeWidth:1.2}),C.createElement("rect",{x:5,y:5.5,width:2,height:2,rx:1,fill:"currentColor"})),"SvgField"),WPu=Fe(({title:u,titleId:e,...t})=>C.createElement("svg",{height:"1em",viewBox:"0 0 24 20",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":e,...t},u?C.createElement("title",{id:e},u):null,C.createElement("path",{d:"M1.59375 9.52344L4.87259 12.9944L8.07872 9.41249",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"square"}),C.createElement("path",{d:"M13.75 5.25V10.75H18.75",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"square"}),C.createElement("path",{d:"M4.95427 11.9332C4.55457 10.0629 4.74441 8.11477 5.49765 6.35686C6.25089 4.59894 7.5305 3.11772 9.16034 2.11709C10.7902 1.11647 12.6901 0.645626 14.5986 0.769388C16.5071 0.893151 18.3303 1.60543 19.8172 2.80818C21.3042 4.01093 22.3818 5.64501 22.9017 7.48548C23.4216 9.32595 23.3582 11.2823 22.7203 13.0853C22.0824 14.8883 20.9013 16.4492 19.3396 17.5532C17.778 18.6572 15.9125 19.25 14 19.25",stroke:"currentColor",strokeWidth:1.5})),"SvgHistory"),GPu=Fe(({title:u,titleId:e,...t})=>C.createElement("svg",{height:"1em",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":e,...t},u?C.createElement("title",{id:e},u):null,C.createElement("circle",{cx:6,cy:6,r:5.4,stroke:"currentColor",strokeWidth:1.2,strokeDasharray:"4.241025 4.241025",transform:"rotate(22.5)","transform-origin":"center"}),C.createElement("circle",{cx:6,cy:6,r:1,fill:"currentColor"})),"SvgImplements"),UPu=Fe(({title:u,titleId:e,...t})=>C.createElement("svg",{height:"1em",viewBox:"0 0 19 18",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":e,...t},u?C.createElement("title",{id:e},u):null,C.createElement("path",{d:"M1.5 14.5653C1.5 15.211 1.75652 15.8303 2.21314 16.2869C2.66975 16.7435 3.28905 17 3.9348 17C4.58054 17 5.19984 16.7435 5.65646 16.2869C6.11307 15.8303 6.36959 15.211 6.36959 14.5653V12.1305H3.9348C3.28905 12.1305 2.66975 12.387 2.21314 12.8437C1.75652 13.3003 1.5 13.9195 1.5 14.5653Z",stroke:"currentColor",strokeWidth:1.125,strokeLinecap:"round",strokeLinejoin:"round"}),C.createElement("path",{d:"M3.9348 1.00063C3.28905 1.00063 2.66975 1.25715 2.21314 1.71375C1.75652 2.17035 1.5 2.78964 1.5 3.43537C1.5 4.0811 1.75652 4.70038 2.21314 5.15698C2.66975 5.61358 3.28905 5.8701 3.9348 5.8701H6.36959V3.43537C6.36959 2.78964 6.11307 2.17035 5.65646 1.71375C5.19984 1.25715 4.58054 1.00063 3.9348 1.00063Z",stroke:"currentColor",strokeWidth:1.125,strokeLinecap:"round",strokeLinejoin:"round"}),C.createElement("path",{d:"M15.0652 12.1305H12.6304V14.5653C12.6304 15.0468 12.7732 15.5175 13.0407 15.9179C13.3083 16.3183 13.6885 16.6304 14.1334 16.8147C14.5783 16.9989 15.0679 17.0472 15.5402 16.9532C16.0125 16.8593 16.4464 16.6274 16.7869 16.2869C17.1274 15.9464 17.3593 15.5126 17.4532 15.0403C17.5472 14.568 17.4989 14.0784 17.3147 13.6335C17.1304 13.1886 16.8183 12.8084 16.4179 12.5409C16.0175 12.2733 15.5468 12.1305 15.0652 12.1305Z",stroke:"currentColor",strokeWidth:1.125,strokeLinecap:"round",strokeLinejoin:"round"}),C.createElement("path",{d:"M12.6318 5.86775H6.36955V12.1285H12.6318V5.86775Z",stroke:"currentColor",strokeWidth:1.125,strokeLinecap:"round",strokeLinejoin:"round"}),C.createElement("path",{d:"M17.5 3.43473C17.5 2.789 17.2435 2.16972 16.7869 1.71312C16.3303 1.25652 15.711 1 15.0652 1C14.4195 1 13.8002 1.25652 13.3435 1.71312C12.8869 2.16972 12.6304 2.789 12.6304 3.43473V5.86946H15.0652C15.711 5.86946 16.3303 5.61295 16.7869 5.15635C17.2435 4.69975 17.5 4.08046 17.5 3.43473Z",stroke:"currentColor",strokeWidth:1.125,strokeLinecap:"round",strokeLinejoin:"round"})),"SvgKeyboardShortcut"),qPu=Fe(({title:u,titleId:e,...t})=>C.createElement("svg",{height:"1em",viewBox:"0 0 13 13",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":e,...t},u?C.createElement("title",{id:e},u):null,C.createElement("circle",{cx:5,cy:5,r:4.35,stroke:"currentColor",strokeWidth:1.3}),C.createElement("line",{x1:8.45962,y1:8.54038,x2:11.7525,y2:11.8333,stroke:"currentColor",strokeWidth:1.3})),"SvgMagnifyingGlass"),JPu=Fe(({title:u,titleId:e,...t})=>C.createElement("svg",{height:"1em",viewBox:"-2 -2 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":e,...t},u?C.createElement("title",{id:e},u):null,C.createElement("path",{d:"M17.2492 6V2.9569C17.2492 1.73806 16.2611 0.75 15.0423 0.75L2.9569 0.75C1.73806 0.75 0.75 1.73806 0.75 2.9569L0.75 6",stroke:"currentColor",strokeWidth:1.5}),C.createElement("path",{d:"M0.749873 12V15.0431C0.749873 16.2619 1.73794 17.25 2.95677 17.25H15.0421C16.261 17.25 17.249 16.2619 17.249 15.0431V12",stroke:"currentColor",strokeWidth:1.5}),C.createElement("path",{d:"M6 4.5L9 7.5L12 4.5",stroke:"currentColor",strokeWidth:1.5}),C.createElement("path",{d:"M12 13.5L9 10.5L6 13.5",stroke:"currentColor",strokeWidth:1.5})),"SvgMerge"),ZPu=Fe(({title:u,titleId:e,...t})=>C.createElement("svg",{height:"1em",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":e,...t},u?C.createElement("title",{id:e},u):null,C.createElement("path",{d:"M0.75 13.25L0.0554307 12.967C-0.0593528 13.2488 0.00743073 13.5719 0.224488 13.7851C0.441545 13.9983 0.765869 14.0592 1.04549 13.9393L0.75 13.25ZM12.8214 1.83253L12.2911 2.36286L12.2911 2.36286L12.8214 1.83253ZM12.8214 3.90194L13.3517 4.43227L12.8214 3.90194ZM10.0981 1.17859L9.56773 0.648259L10.0981 1.17859ZM12.1675 1.17859L12.6978 0.648258L12.6978 0.648257L12.1675 1.17859ZM2.58049 8.75697L3.27506 9.03994L2.58049 8.75697ZM2.70066 8.57599L3.23099 9.10632L2.70066 8.57599ZM5.2479 11.4195L4.95355 10.7297L5.2479 11.4195ZM5.42036 11.303L4.89003 10.7727L5.42036 11.303ZM4.95355 10.7297C4.08882 11.0987 3.41842 11.362 2.73535 11.6308C2.05146 11.9 1.35588 12.1743 0.454511 12.5607L1.04549 13.9393C1.92476 13.5624 2.60256 13.2951 3.28469 13.0266C3.96762 12.7578 4.65585 12.4876 5.54225 12.1093L4.95355 10.7297ZM1.44457 13.533L3.27506 9.03994L1.88592 8.474L0.0554307 12.967L1.44457 13.533ZM3.23099 9.10632L10.6284 1.70892L9.56773 0.648259L2.17033 8.04566L3.23099 9.10632ZM11.6371 1.70892L12.2911 2.36286L13.3517 1.3022L12.6978 0.648258L11.6371 1.70892ZM12.2911 3.37161L4.89003 10.7727L5.95069 11.8333L13.3517 4.43227L12.2911 3.37161ZM12.2911 2.36286C12.5696 2.64142 12.5696 3.09305 12.2911 3.37161L13.3517 4.43227C14.2161 3.56792 14.2161 2.16654 13.3517 1.3022L12.2911 2.36286ZM10.6284 1.70892C10.9069 1.43036 11.3586 1.43036 11.6371 1.70892L12.6978 0.648257C11.8335 -0.216088 10.4321 -0.216084 9.56773 0.648259L10.6284 1.70892ZM3.27506 9.03994C3.26494 9.06479 3.24996 9.08735 3.23099 9.10632L2.17033 8.04566C2.04793 8.16806 1.95123 8.31369 1.88592 8.474L3.27506 9.03994ZM5.54225 12.1093C5.69431 12.0444 5.83339 11.9506 5.95069 11.8333L4.89003 10.7727C4.90863 10.7541 4.92988 10.7398 4.95355 10.7297L5.54225 12.1093Z",fill:"currentColor"}),C.createElement("path",{d:"M11.5 4.5L9.5 2.5",stroke:"currentColor",strokeWidth:1.4026,strokeLinecap:"round",strokeLinejoin:"round"}),C.createElement("path",{d:"M5.5 10.5L3.5 8.5",stroke:"currentColor",strokeWidth:1.4026,strokeLinecap:"round",strokeLinejoin:"round"})),"SvgPen"),YPu=Fe(({title:u,titleId:e,...t})=>C.createElement("svg",{height:"1em",viewBox:"0 0 16 18",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":e,...t},u?C.createElement("title",{id:e},u):null,C.createElement("path",{d:"M1.32226e-07 1.6609C7.22332e-08 0.907329 0.801887 0.424528 1.46789 0.777117L15.3306 8.11621C16.0401 8.49182 16.0401 9.50818 15.3306 9.88379L1.46789 17.2229C0.801886 17.5755 1.36076e-06 17.0927 1.30077e-06 16.3391L1.32226e-07 1.6609Z",fill:"currentColor"})),"SvgPlay"),QPu=Fe(({title:u,titleId:e,...t})=>C.createElement("svg",{height:"1em",viewBox:"0 0 10 16",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":e,...t},u?C.createElement("title",{id:e},u):null,C.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.25 9.25V13.5H5.75V9.25L10 9.25V7.75L5.75 7.75V3.5H4.25V7.75L0 7.75V9.25L4.25 9.25Z",fill:"currentColor"})),"SvgPlus"),XPu=Fe(({title:u,titleId:e,...t})=>C.createElement("svg",{width:25,height:25,viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":e,...t},u?C.createElement("title",{id:e},u):null,C.createElement("path",{d:"M10.2852 24.0745L13.7139 18.0742",stroke:"currentColor",strokeWidth:1.5625}),C.createElement("path",{d:"M14.5742 24.0749L17.1457 19.7891",stroke:"currentColor",strokeWidth:1.5625}),C.createElement("path",{d:"M19.4868 24.0735L20.7229 21.7523C21.3259 20.6143 21.5457 19.3122 21.3496 18.0394C21.1535 16.7666 20.5519 15.591 19.6342 14.6874L23.7984 6.87853C24.0123 6.47728 24.0581 6.00748 23.9256 5.57249C23.7932 5.1375 23.4933 4.77294 23.0921 4.55901C22.6908 4.34509 22.221 4.29932 21.7861 4.43178C21.3511 4.56424 20.9865 4.86408 20.7726 5.26533L16.6084 13.0742C15.3474 12.8142 14.0362 12.9683 12.8699 13.5135C11.7035 14.0586 10.7443 14.9658 10.135 16.1L6 24.0735",stroke:"currentColor",strokeWidth:1.5625}),C.createElement("path",{d:"M4 15L5 13L7 12L5 11L4 9L3 11L1 12L3 13L4 15Z",stroke:"currentColor",strokeWidth:1.5625,strokeLinejoin:"round"}),C.createElement("path",{d:"M11.5 8L12.6662 5.6662L15 4.5L12.6662 3.3338L11.5 1L10.3338 3.3338L8 4.5L10.3338 5.6662L11.5 8Z",stroke:"currentColor",strokeWidth:1.5625,strokeLinejoin:"round"})),"SvgPrettify"),eRu=Fe(({title:u,titleId:e,...t})=>C.createElement("svg",{height:"1em",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":e,...t},u?C.createElement("title",{id:e},u):null,C.createElement("path",{d:"M4.75 9.25H1.25V12.75",stroke:"currentColor",strokeWidth:1,strokeLinecap:"square"}),C.createElement("path",{d:"M11.25 6.75H14.75V3.25",stroke:"currentColor",strokeWidth:1,strokeLinecap:"square"}),C.createElement("path",{d:"M14.1036 6.65539C13.8 5.27698 13.0387 4.04193 11.9437 3.15131C10.8487 2.26069 9.48447 1.76694 8.0731 1.75043C6.66173 1.73392 5.28633 2.19563 4.17079 3.0604C3.05526 3.92516 2.26529 5.14206 1.92947 6.513",stroke:"currentColor",strokeWidth:1}),C.createElement("path",{d:"M1.89635 9.34461C2.20001 10.723 2.96131 11.9581 4.05631 12.8487C5.15131 13.7393 6.51553 14.2331 7.9269 14.2496C9.33827 14.2661 10.7137 13.8044 11.8292 12.9396C12.9447 12.0748 13.7347 10.8579 14.0705 9.487",stroke:"currentColor",strokeWidth:1})),"SvgReload"),tRu=Fe(({title:u,titleId:e,...t})=>C.createElement("svg",{height:"1em",viewBox:"0 0 13 13",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":e,...t},u?C.createElement("title",{id:e},u):null,C.createElement("rect",{x:.6,y:.6,width:11.8,height:11.8,rx:5.9,stroke:"currentColor",strokeWidth:1.2}),C.createElement("path",{d:"M4.25 7.5C4.25 6 5.75 5 6.5 6.5C7.25 8 8.75 7 8.75 5.5",stroke:"currentColor",strokeWidth:1.2})),"SvgRootType"),uRu=Fe(({title:u,titleId:e,...t})=>C.createElement("svg",{height:"1em",viewBox:"0 0 21 20",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":e,...t},u?C.createElement("title",{id:e},u):null,C.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.29186 1.92702C9.06924 1.82745 8.87014 1.68202 8.70757 1.50024L7.86631 0.574931C7.62496 0.309957 7.30773 0.12592 6.95791 0.0479385C6.60809 -0.0300431 6.24274 0.00182978 5.91171 0.139208C5.58068 0.276585 5.3001 0.512774 5.10828 0.815537C4.91645 1.1183 4.82272 1.47288 4.83989 1.83089L4.90388 3.08019C4.91612 3.32348 4.87721 3.56662 4.78968 3.79394C4.70215 4.02126 4.56794 4.2277 4.39571 4.39994C4.22347 4.57219 4.01704 4.7064 3.78974 4.79394C3.56243 4.88147 3.3193 4.92038 3.07603 4.90814L1.8308 4.84414C1.47162 4.82563 1.11553 4.91881 0.811445 5.11086C0.507359 5.30292 0.270203 5.58443 0.132561 5.91671C-0.00508149 6.249 -0.0364554 6.61576 0.0427496 6.9666C0.121955 7.31744 0.307852 7.63514 0.5749 7.87606L1.50016 8.71204C1.68193 8.87461 1.82735 9.07373 1.92692 9.29636C2.02648 9.51898 2.07794 9.76012 2.07794 10.004C2.07794 10.2479 2.02648 10.489 1.92692 10.7116C1.82735 10.9343 1.68193 11.1334 1.50016 11.296L0.5749 12.1319C0.309856 12.3729 0.125575 12.6898 0.0471809 13.0393C-0.0312128 13.3888 9.64098e-05 13.754 0.13684 14.0851C0.273583 14.4162 0.509106 14.6971 0.811296 14.8894C1.11349 15.0817 1.46764 15.1762 1.82546 15.1599L3.0707 15.0959C3.31397 15.0836 3.5571 15.1225 3.7844 15.2101C4.01171 15.2976 4.21814 15.4318 4.39037 15.6041C4.56261 15.7763 4.69682 15.9827 4.78435 16.2101C4.87188 16.4374 4.91078 16.6805 4.89855 16.9238L4.83455 18.1691C4.81605 18.5283 4.90921 18.8844 5.10126 19.1885C5.2933 19.4926 5.5748 19.7298 5.90707 19.8674C6.23934 20.0051 6.60608 20.0365 6.9569 19.9572C7.30772 19.878 7.6254 19.6921 7.86631 19.4251L8.7129 18.4998C8.87547 18.318 9.07458 18.1725 9.29719 18.073C9.51981 17.9734 9.76093 17.9219 10.0048 17.9219C10.2487 17.9219 10.4898 17.9734 10.7124 18.073C10.935 18.1725 11.1341 18.318 11.2967 18.4998L12.1326 19.4251C12.3735 19.6921 12.6912 19.878 13.042 19.9572C13.3929 20.0365 13.7596 20.0051 14.0919 19.8674C14.4241 19.7298 14.7056 19.4926 14.8977 19.1885C15.0897 18.8844 15.1829 18.5283 15.1644 18.1691L15.1004 16.9238C15.0882 16.6805 15.1271 16.4374 15.2146 16.2101C15.3021 15.9827 15.4363 15.7763 15.6086 15.6041C15.7808 15.4318 15.9872 15.2976 16.2145 15.2101C16.4418 15.1225 16.685 15.0836 16.9282 15.0959L18.1735 15.1599C18.5326 15.1784 18.8887 15.0852 19.1928 14.8931C19.4969 14.7011 19.7341 14.4196 19.8717 14.0873C20.0093 13.755 20.0407 13.3882 19.9615 13.0374C19.8823 12.6866 19.6964 12.3689 19.4294 12.1279L18.5041 11.292C18.3223 11.1294 18.1769 10.9303 18.0774 10.7076C17.9778 10.485 17.9263 10.2439 17.9263 10C17.9263 9.75612 17.9778 9.51499 18.0774 9.29236C18.1769 9.06973 18.3223 8.87062 18.5041 8.70804L19.4294 7.87206C19.6964 7.63114 19.8823 7.31344 19.9615 6.9626C20.0407 6.61176 20.0093 6.245 19.8717 5.91271C19.7341 5.58043 19.4969 5.29892 19.1928 5.10686C18.8887 4.91481 18.5326 4.82163 18.1735 4.84014L16.9282 4.90414C16.685 4.91638 16.4418 4.87747 16.2145 4.78994C15.9872 4.7024 15.7808 4.56818 15.6086 4.39594C15.4363 4.2237 15.3021 4.01726 15.2146 3.78994C15.1271 3.56262 15.0882 3.31948 15.1004 3.07619L15.1644 1.83089C15.1829 1.4717 15.0897 1.11559 14.8977 0.811487C14.7056 0.507385 14.4241 0.270217 14.0919 0.132568C13.7596 -0.00508182 13.3929 -0.0364573 13.042 0.0427519C12.6912 0.121961 12.3735 0.307869 12.1326 0.574931L11.2914 1.50024C11.1288 1.68202 10.9297 1.82745 10.7071 1.92702C10.4845 2.02659 10.2433 2.07805 9.99947 2.07805C9.7556 2.07805 9.51448 2.02659 9.29186 1.92702ZM14.3745 10C14.3745 12.4162 12.4159 14.375 9.99977 14.375C7.58365 14.375 5.625 12.4162 5.625 10C5.625 7.58375 7.58365 5.625 9.99977 5.625C12.4159 5.625 14.3745 7.58375 14.3745 10Z",fill:"currentColor"})),"SvgSettings"),nRu=Fe(({title:u,titleId:e,...t})=>C.createElement("svg",{height:"1em",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":e,...t},u?C.createElement("title",{id:e},u):null,C.createElement("path",{d:"M6.5782 1.07092C6.71096 0.643026 7.28904 0.643027 7.4218 1.07092L8.59318 4.84622C8.65255 5.03758 8.82284 5.16714 9.01498 5.16714L12.8056 5.16714C13.2353 5.16714 13.4139 5.74287 13.0663 6.00732L9.99962 8.34058C9.84418 8.45885 9.77913 8.66848 9.83851 8.85984L11.0099 12.6351C11.1426 13.063 10.675 13.4189 10.3274 13.1544L7.26069 10.8211C7.10524 10.7029 6.89476 10.7029 6.73931 10.8211L3.6726 13.1544C3.32502 13.4189 2.85735 13.063 2.99012 12.6351L4.16149 8.85984C4.22087 8.66848 4.15582 8.45885 4.00038 8.34058L0.933671 6.00732C0.586087 5.74287 0.764722 5.16714 1.19436 5.16714L4.98502 5.16714C5.17716 5.16714 5.34745 5.03758 5.40682 4.84622L6.5782 1.07092Z",fill:"currentColor",stroke:"currentColor"})),"SvgStarFilled"),iRu=Fe(({title:u,titleId:e,...t})=>C.createElement("svg",{height:"1em",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":e,...t},u?C.createElement("title",{id:e},u):null,C.createElement("path",{d:"M6.5782 1.07092C6.71096 0.643026 7.28904 0.643027 7.4218 1.07092L8.59318 4.84622C8.65255 5.03758 8.82284 5.16714 9.01498 5.16714L12.8056 5.16714C13.2353 5.16714 13.4139 5.74287 13.0663 6.00732L9.99962 8.34058C9.84418 8.45885 9.77913 8.66848 9.83851 8.85984L11.0099 12.6351C11.1426 13.063 10.675 13.4189 10.3274 13.1544L7.26069 10.8211C7.10524 10.7029 6.89476 10.7029 6.73931 10.8211L3.6726 13.1544C3.32502 13.4189 2.85735 13.063 2.99012 12.6351L4.16149 8.85984C4.22087 8.66848 4.15582 8.45885 4.00038 8.34058L0.933671 6.00732C0.586087 5.74287 0.764722 5.16714 1.19436 5.16714L4.98502 5.16714C5.17716 5.16714 5.34745 5.03758 5.40682 4.84622L6.5782 1.07092Z",stroke:"currentColor",strokeWidth:1.5})),"SvgStar"),rRu=Fe(({title:u,titleId:e,...t})=>C.createElement("svg",{height:"1em",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":e,...t},u?C.createElement("title",{id:e},u):null,C.createElement("rect",{width:16,height:16,rx:2,fill:"currentColor"})),"SvgStop"),aRu=Fe(({title:u,titleId:e,...t})=>C.createElement("svg",{width:"1em",height:"5em",xmlns:"http://www.w3.org/2000/svg",fillRule:"evenodd","aria-hidden":"true",viewBox:"0 0 23 23",style:{height:"1.5em"},clipRule:"evenodd","aria-labelledby":e,...t},u===void 0?C.createElement("title",{id:e},"trash icon"):u?C.createElement("title",{id:e},u):null,C.createElement("path",{d:"M19 24h-14c-1.104 0-2-.896-2-2v-17h-1v-2h6v-1.5c0-.827.673-1.5 1.5-1.5h5c.825 0 1.5.671 1.5 1.5v1.5h6v2h-1v17c0 1.104-.896 2-2 2zm0-19h-14v16.5c0 .276.224.5.5.5h13c.276 0 .5-.224.5-.5v-16.5zm-7 7.586l3.293-3.293 1.414 1.414-3.293 3.293 3.293 3.293-1.414 1.414-3.293-3.293-3.293 3.293-1.414-1.414 3.293-3.293-3.293-3.293 1.414-1.414 3.293 3.293zm2-10.586h-4v1h4v-1z",fill:"currentColor",strokeWidth:.25,stroke:"currentColor"})),"SvgTrash"),oRu=Fe(({title:u,titleId:e,...t})=>C.createElement("svg",{height:"1em",viewBox:"0 0 13 13",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":e,...t},u?C.createElement("title",{id:e},u):null,C.createElement("rect",{x:.6,y:.6,width:11.8,height:11.8,rx:5.9,stroke:"currentColor",strokeWidth:1.2}),C.createElement("rect",{x:5.5,y:5.5,width:2,height:2,rx:1,fill:"currentColor"})),"SvgType"),sRu=Bn(LPu),lRu=Bn(zPu),cRu=Bn(MPu),dRu=Bn(TPu),jie=Bn(NPu),hRu=Bn(PPu),ERu=Bn(RPu),mRu=Bn(IPu),gRu=Bn(OPu),fRu=Bn(jPu),pRu=Bn(HPu,"filled docs icon"),DRu=Bn(VPu),xRu=Bn($Pu),vRu=Bn(KPu),CRu=Bn(WPu),bRu=Bn(GPu),kRu=Bn(UPu),FRu=Bn(qPu),yRu=Bn(JPu),ARu=Bn(ZPu),_Ru=Bn(YPu),SRu=Bn(QPu),BRu=Bn(XPu),wRu=Bn(eRu),LRu=Bn(tRu),zRu=Bn(uRu),MRu=Bn(nRu,"filled star icon"),TRu=Bn(iRu),NRu=Bn(rRu),PRu=Bn(aRu,"trash icon"),bS=Bn(oRu);function Bn(u,e=u.name.replace("Svg","").replaceAll(/([A-Z])/g," $1").trimStart().toLowerCase()+" icon"){return u.defaultProps={title:e},u}Fe(Bn,"generateIcon");const la=C.forwardRef((u,e)=>B.jsx("button",{...u,ref:e,className:Ha("graphiql-un-styled",u.className)}));la.displayName="UnStyledButton";const Ac=C.forwardRef((u,e)=>B.jsx("button",{...u,ref:e,className:Ha("graphiql-button",{success:"graphiql-button-success",error:"graphiql-button-error"}[u.state],u.className)}));Ac.displayName="Button";const $Y=C.forwardRef((u,e)=>B.jsx("div",{...u,ref:e,className:Ha("graphiql-button-group",u.className)}));$Y.displayName="ButtonGroup";const A7=Fe((u,e)=>Object.entries(e).reduce((t,[n,i])=>(t[n]=i,t),u),"createComponentGroup"),$Re=C.forwardRef((u,e)=>B.jsx(ZZt,{asChild:!0,children:B.jsxs(la,{...u,ref:e,type:"button",className:Ha("graphiql-dialog-close",u.className),children:[B.jsx(CNe,{children:"Close dialog"}),B.jsx(jie,{})]})}));$Re.displayName="Dialog.Close";function KRe({children:u,...e}){return B.jsx($Zt,{...e,children:B.jsxs(WZt,{children:[B.jsx(GZt,{className:"graphiql-dialog-overlay"}),B.jsx(UZt,{className:"graphiql-dialog",children:u})]})})}Fe(KRe,"DialogRoot");const VD=A7(KRe,{Close:$Re,Title:qZt,Trigger:KZt,Description:JZt}),WRe=C.forwardRef((u,e)=>B.jsx(EQt,{asChild:!0,children:B.jsx("button",{...u,ref:e,className:Ha("graphiql-un-styled",u.className)})}));WRe.displayName="DropdownMenuButton";function GRe({children:u,align:e="start",sideOffset:t=5,className:n,...i}){return B.jsx(mQt,{children:B.jsx(gQt,{align:e,sideOffset:t,className:Ha("graphiql-dropdown-content",n),...i,children:u})})}Fe(GRe,"Content");const RRu=Fe(({className:u,children:e,...t})=>B.jsx(fQt,{className:Ha("graphiql-dropdown-item",u),...t,children:e}),"Item"),GE=A7(hQt,{Button:WRe,Item:RRu,Content:GRe}),ZT=new lwu({breaks:!0,linkify:!0}),V1=C.forwardRef(({children:u,onlyShowFirstChild:e,type:t,...n},i)=>B.jsx("div",{...n,ref:i,className:Ha(`graphiql-markdown-${t}`,e&&"graphiql-markdown-preview",n.className),dangerouslySetInnerHTML:{__html:ZT.render(u)}}));V1.displayName="MarkdownContent";const Hie=C.forwardRef((u,e)=>B.jsx("div",{...u,ref:e,className:Ha("graphiql-spinner",u.className)}));Hie.displayName="Spinner";function URe({children:u,align:e="start",side:t="bottom",sideOffset:n=5,label:i}){return B.jsxs(CNu,{children:[B.jsx(bNu,{asChild:!0,children:u}),B.jsx(kNu,{children:B.jsx(FNu,{className:"graphiql-tooltip",align:e,side:t,sideOffset:n,children:i})})]})}Fe(URe,"TooltipRoot");const Ao=A7(URe,{Provider:vNu}),qRe=C.forwardRef(({isActive:u,value:e,children:t,className:n,...i},r)=>B.jsx(zRe.Item,{...i,ref:r,value:e,"aria-selected":u?"true":void 0,role:"tab",className:Ha("graphiql-tab",u&&"graphiql-tab-active",n),children:t}));qRe.displayName="Tab";const JRe=C.forwardRef((u,e)=>B.jsx(la,{...u,ref:e,type:"button",className:Ha("graphiql-tab-button",u.className),children:u.children}));JRe.displayName="Tab.Button";const ZRe=C.forwardRef((u,e)=>B.jsx(Ao,{label:"Close Tab",children:B.jsx(la,{"aria-label":"Close Tab",...u,ref:e,type:"button",className:Ha("graphiql-tab-close",u.className),children:B.jsx(jie,{})})}));ZRe.displayName="Tab.Close";const $$=A7(qRe,{Button:JRe,Close:ZRe}),YRe=C.forwardRef(({values:u,onReorder:e,children:t,className:n,...i},r)=>B.jsx(zRe.Group,{...i,ref:r,values:u,onReorder:e,axis:"x",role:"tablist",className:Ha("graphiql-tabs",n),children:t}));YRe.displayName="Tabs";const QRe=Mg("HistoryContext");function XRe(u){var e;const t=Ng(),n=C.useRef(new Oqt(t||new nY(null),u.maxHistoryLength||IRu)),[i,r]=C.useState(((e=n.current)==null?void 0:e.queries)||[]),a=C.useCallback(h=>{var E;(E=n.current)==null||E.updateHistory(h),r(n.current.queries)},[]),o=C.useCallback((h,E)=>{n.current.editLabel(h,E),r(n.current.queries)},[]),s=C.useCallback(h=>{n.current.toggleFavorite(h),r(n.current.queries)},[]),l=C.useCallback(h=>h,[]),c=C.useCallback((h,E=!1)=>{n.current.deleteHistory(h,E),r(n.current.queries)},[]),d=C.useMemo(()=>({addToHistory:a,editLabel:o,items:i,toggleFavorite:s,setActive:l,deleteFromHistory:c}),[a,o,i,s,l,c]);return B.jsx(QRe.Provider,{value:d,children:u.children})}Fe(XRe,"HistoryContextProvider");const bO=Tg(QRe),IRu=20;function eIe(){const{items:u,deleteFromHistory:e}=bO({nonNull:!0});let t=u.slice().map((o,s)=>({...o,index:s})).reverse();const n=t.filter(o=>o.favorite);n.length&&(t=t.filter(o=>!o.favorite));const[i,r]=C.useState(null);C.useEffect(()=>{i&&setTimeout(()=>{r(null)},2e3)},[i]);const a=C.useCallback(()=>{try{for(const o of t)e(o,!0);r("success")}catch{r("error")}},[e,t]);return B.jsxs("section",{"aria-label":"History",className:"graphiql-history",children:[B.jsxs("div",{className:"graphiql-history-header",children:["History",(i||t.length>0)&&B.jsx(Ac,{type:"button",state:i||void 0,disabled:!t.length,onClick:a,children:{success:"Cleared",error:"Failed to Clear"}[i]||"Clear"})]}),!!n.length&&B.jsx("ul",{className:"graphiql-history-items",children:n.map(o=>B.jsx(Ty,{item:o},o.index))}),!!n.length&&!!t.length&&B.jsx("div",{className:"graphiql-history-item-spacer"}),!!t.length&&B.jsx("ul",{className:"graphiql-history-items",children:t.map(o=>B.jsx(Ty,{item:o},o.index))})]})}Fe(eIe,"History");function Ty(u){const{editLabel:e,toggleFavorite:t,deleteFromHistory:n,setActive:i}=bO({nonNull:!0,caller:Ty}),{headerEditor:r,queryEditor:a,variableEditor:o}=Ko({nonNull:!0,caller:Ty}),s=C.useRef(null),l=C.useRef(null),[c,d]=C.useState(!1);C.useEffect(()=>{var x;c&&((x=s.current)==null||x.focus())},[c]);const h=u.item.label||u.item.operationName||tIe(u.item.query),E=C.useCallback(()=>{var x;d(!1);const{index:b,...k}=u.item;e({...k,label:(x=s.current)==null?void 0:x.value},b)},[e,u.item]),m=C.useCallback(()=>{d(!1)},[]),g=C.useCallback(x=>{x.stopPropagation(),d(!0)},[]),f=C.useCallback(()=>{const{query:x,variables:b,headers:k}=u.item;a==null||a.setValue(x??""),o==null||o.setValue(b??""),r==null||r.setValue(k??""),i(u.item)},[r,u.item,a,i,o]),p=C.useCallback(x=>{x.stopPropagation(),n(u.item)},[u.item,n]),D=C.useCallback(x=>{x.stopPropagation(),t(u.item)},[u.item,t]);return B.jsx("li",{className:Ha("graphiql-history-item",c&&"editable"),children:c?B.jsxs(B.Fragment,{children:[B.jsx("input",{type:"text",defaultValue:u.item.label,ref:s,onKeyDown:x=>{x.key==="Esc"?d(!1):x.key==="Enter"&&(d(!1),e({...u.item,label:x.currentTarget.value}))},placeholder:"Type a label"}),B.jsx(la,{type:"button",ref:l,onClick:E,children:"Save"}),B.jsx(la,{type:"button",ref:l,onClick:m,children:B.jsx(jie,{})})]}):B.jsxs(B.Fragment,{children:[B.jsx(Ao,{label:"Set active",children:B.jsx(la,{type:"button",className:"graphiql-history-item-label",onClick:f,"aria-label":"Set active",children:h})}),B.jsx(Ao,{label:"Edit label",children:B.jsx(la,{type:"button",className:"graphiql-history-item-action",onClick:g,"aria-label":"Edit label",children:B.jsx(ARu,{"aria-hidden":"true"})})}),B.jsx(Ao,{label:u.item.favorite?"Remove favorite":"Add favorite",children:B.jsx(la,{type:"button",className:"graphiql-history-item-action",onClick:D,"aria-label":u.item.favorite?"Remove favorite":"Add favorite",children:u.item.favorite?B.jsx(MRu,{"aria-hidden":"true"}):B.jsx(TRu,{"aria-hidden":"true"})})}),B.jsx(Ao,{label:"Delete from history",children:B.jsx(la,{type:"button",className:"graphiql-history-item-action",onClick:p,"aria-label":"Delete from history",children:B.jsx(PRu,{"aria-hidden":"true"})})})]})})}Fe(Ty,"HistoryItem");function tIe(u){return u==null?void 0:u.split(` `).map(e=>e.replace(/#(.*)/,"")).join(" ").replaceAll("{"," { ").replaceAll("}"," } ").replaceAll(/[\s]{2,}/g," ")}Fe(tIe,"formatQuery");const uIe=Mg("ExecutionContext");function YT({fetcher:u,getDefaultFieldNames:e,children:t,operationName:n}){if(!u)throw new TypeError("The `ExecutionContextProvider` component requires a `fetcher` function to be passed as prop.");const{externalFragments:i,headerEditor:r,queryEditor:a,responseEditor:o,variableEditor:s,updateActiveTabValues:l}=Ko({nonNull:!0,caller:YT}),c=bO(),d=tN({getDefaultFieldNames:e,caller:YT}),[h,E]=C.useState(!1),[m,g]=C.useState(null),f=C.useRef(0),p=C.useCallback(()=>{m==null||m.unsubscribe(),E(!1),g(null)},[m]),D=C.useCallback(async()=>{if(!a||!o)return;if(m){p();return}const k=Fe(y=>{o.setValue(y),l({response:y})},"setResponse");f.current+=1;const A=f.current;let F=d()||a.getValue();const S=s==null?void 0:s.getValue();let w;try{w=KY({json:S,errorMessageParse:"Variables are invalid JSON",errorMessageType:"Variables are not a JSON object."})}catch(y){k(y instanceof Error?y.message:`${y}`);return}const z=r==null?void 0:r.getValue();let N;try{N=KY({json:z,errorMessageParse:"Headers are invalid JSON",errorMessageType:"Headers are not a JSON object."})}catch(y){k(y instanceof Error?y.message:`${y}`);return}if(i){const y=a.documentAST?bJt(a.documentAST,i):[];y.length>0&&(F+=` `+y.map(_=>u0(_)).join(` -`))}k(""),E(!0);const O=n??a.operationName??void 0;c==null||c.addToHistory({query:F,variables:S,headers:z,operationName:O});try{let y={data:{}};const _=Fe(R=>{if(A!==f.current)return;let I=Array.isArray(R)?R:!1;if(!I&&typeof R=="object"&&R!==null&&"hasNext"in R&&(I=[R]),I){const H={data:y.data},V=[...(y==null?void 0:y.errors)||[],...I.flatMap(U=>U.errors).filter(Boolean)];V.length&&(H.errors=V);for(const U of I){const{path:J,data:Y,errors:X,...re}=U;if(J){if(!Y)throw new Error(`Expected part to contain a data property, but got ${U}`);OJt(H.data,J,Y,{merge:!0})}else Y&&(H.data=Y);y={...H,...re}}E(!1),k(uY(y))}else{const H=uY(R);E(!1),k(H)}},"handleResponse"),L=u({query:F,variables:w,operationName:O},{headers:N??void 0,documentAST:a.documentAST??void 0}),T=await Promise.resolve(L);if($Te(T))g(T.subscribe({next(R){_(R)},error(R){E(!1),R&&k(vy(R)),g(null)},complete(){E(!1),g(null)}}));else if(KTe(T)){g({unsubscribe:()=>{var R,I;return(I=(R=T[Symbol.asyncIterator]()).return)==null?void 0:I.call(R)}});for await(const R of T)_(R);E(!1),g(null)}else _(T)}catch(y){E(!1),k(vy(y)),g(null)}},[d,i,u,r,c,n,a,o,p,m,l,s]),x=!!m,b=C.useMemo(()=>({isFetching:h,isSubscribed:x,operationName:n??null,run:D,stop:p}),[h,x,n,D,p]);return B.jsx(uIe.Provider,{value:b,children:t})}Fe(YT,"ExecutionContextProvider");const _7=Tg(uIe);function KY({json:u,errorMessageParse:e,errorMessageType:t}){let n;try{n=u&&u.trim()!==""?JSON.parse(u):void 0}catch(r){throw new Error(`${e}: ${r instanceof Error?r.message:r}.`)}const i=typeof n=="object"&&n!==null&&!Array.isArray(n);if(n!==void 0&&!i)throw new Error(t);return n}Fe(KY,"tryParseJsonObject");const kO="graphiql",FO="sublime";let nIe=!1;typeof window=="object"&&(nIe=window.navigator.platform.toLowerCase().indexOf("mac")===0);const yO={[nIe?"Cmd-F":"Ctrl-F"]:"findPersistent","Cmd-G":"findPersistent","Ctrl-G":"findPersistent","Ctrl-Left":"goSubwordLeft","Ctrl-Right":"goSubwordRight","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight"};async function U6(u,e){const t=await Te(()=>import("./codemirror.es-52e8b92d.js"),["./codemirror.es-52e8b92d.js","./codemirror.es2-5884f31a.js"],import.meta.url).then(n=>n.c).then(n=>typeof n=="function"?n:n.default);return await Promise.all((e==null?void 0:e.useCommonAddons)===!1?u:[Te(()=>import("./show-hint.es-b981493e.js"),["./show-hint.es-b981493e.js","./codemirror.es2-5884f31a.js"],import.meta.url).then(n=>n.s),Te(()=>import("./matchbrackets.es-97d2e827.js"),["./matchbrackets.es-97d2e827.js","./codemirror.es2-5884f31a.js","./matchbrackets.es2-f53f57e6.js"],import.meta.url).then(n=>n.m),Te(()=>import("./closebrackets.es-e969742b.js"),["./closebrackets.es-e969742b.js","./codemirror.es2-5884f31a.js"],import.meta.url).then(n=>n.c),Te(()=>import("./brace-fold.es-f2e3735d.js"),["./brace-fold.es-f2e3735d.js","./codemirror.es2-5884f31a.js"],import.meta.url).then(n=>n.b),Te(()=>import("./foldgutter.es-b6cee46a.js"),["./foldgutter.es-b6cee46a.js","./codemirror.es2-5884f31a.js"],import.meta.url).then(n=>n.f),Te(()=>import("./lint.es-fe7166bb.js"),["./lint.es-fe7166bb.js","./codemirror.es2-5884f31a.js"],import.meta.url).then(n=>n.l),Te(()=>import("./searchcursor.es-b1a352a2.js"),["./searchcursor.es-b1a352a2.js","./codemirror.es2-5884f31a.js","./searchcursor.es2-cbfe7cae.js"],import.meta.url).then(n=>n.s),Te(()=>import("./jump-to-line.es-d901ea33.js"),["./jump-to-line.es-d901ea33.js","./codemirror.es2-5884f31a.js","./dialog.es2-02b3b4e7.js"],import.meta.url).then(n=>n.j),Te(()=>import("./dialog.es-dffe62e7.js"),["./dialog.es-dffe62e7.js","./codemirror.es2-5884f31a.js","./dialog.es2-02b3b4e7.js"],import.meta.url).then(n=>n.d),Te(()=>import("./sublime.es-e2a3eb60.js"),["./sublime.es-e2a3eb60.js","./codemirror.es2-5884f31a.js","./searchcursor.es2-cbfe7cae.js","./matchbrackets.es2-f53f57e6.js"],import.meta.url).then(n=>n.s),...u]),t}Fe(U6,"importCodeMirror");const ORu=Fe(u=>u?u0(u):"","printDefault");function Vie({field:u}){if(!("defaultValue"in u)||u.defaultValue===void 0)return null;const e=U5(u.defaultValue,u.type);return e?B.jsxs(B.Fragment,{children:[" = ",B.jsx("span",{className:"graphiql-doc-explorer-default-value",children:ORu(e)})]}):null}Fe(Vie,"DefaultValue");const iIe=Mg("SchemaContext");function $ie(u){if(!u.fetcher)throw new TypeError("The `SchemaContextProvider` component requires a `fetcher` function to be passed as prop.");const{initialHeaders:e,headerEditor:t}=Ko({nonNull:!0,caller:$ie}),[n,i]=C.useState(),[r,a]=C.useState(!1),[o,s]=C.useState(null),l=C.useRef(0);C.useEffect(()=>{i(UZ(u.schema)||u.schema===null||u.schema===void 0?u.schema:void 0),l.current++},[u.schema]);const c=C.useRef(e);C.useEffect(()=>{t&&(c.current=t.getValue())});const{introspectionQuery:d,introspectionQueryName:h,introspectionQuerySansSubscriptions:E}=rIe({inputValueDeprecation:u.inputValueDeprecation,introspectionQueryName:u.introspectionQueryName,schemaDescription:u.schemaDescription}),{fetcher:m,onSchemaChange:g,dangerouslyAssumeSchemaIsValid:f,children:p}=u,D=C.useCallback(()=>{if(UZ(u.schema)||u.schema===null)return;const k=++l.current,A=u.schema;async function F(){if(A)return A;const S=aIe(c.current);if(!S.isValidJSON){s("Introspection failed as headers are invalid.");return}const w=S.headers?{headers:S.headers}:{},z=Tfe(m({query:d,operationName:h},w));if(!Mfe(z)){s("Fetcher did not return a Promise for introspection.");return}a(!0),s(null);let N=await z;if(typeof N!="object"||N===null||!("data"in N)){const y=Tfe(m({query:E,operationName:h},w));if(!Mfe(y))throw new Error("Fetcher did not return a Promise for introspection.");N=await y}if(a(!1),N!=null&&N.data&&"__schema"in N.data)return N.data;const O=typeof N=="string"?N:uY(N);s(O)}Fe(F,"fetchIntrospectionData"),F().then(S=>{if(!(k!==l.current||!S))try{const w=MWt(S);i(w),g==null||g(w)}catch(w){s(vy(w))}}).catch(S=>{k===l.current&&(s(vy(S)),a(!1))})},[m,h,d,E,g,u.schema]);C.useEffect(()=>{D()},[D]),C.useEffect(()=>{function k(A){A.ctrlKey&&A.key==="R"&&D()}return Fe(k,"triggerIntrospection"),window.addEventListener("keydown",k),()=>window.removeEventListener("keydown",k)});const x=C.useMemo(()=>!n||f?[]:lTe(n),[n,f]),b=C.useMemo(()=>({fetchError:o,introspect:D,isFetching:r,schema:n,validationErrors:x}),[o,D,r,n,x]);return B.jsx(iIe.Provider,{value:b,children:p})}Fe($ie,"SchemaContextProvider");const X1=Tg(iIe);function rIe({inputValueDeprecation:u,introspectionQueryName:e,schemaDescription:t}){return C.useMemo(()=>{const n=e||"IntrospectionQuery";let i=zWt({inputValueDeprecation:u,schemaDescription:t});e&&(i=i.replace("query IntrospectionQuery",`query ${n}`));const r=i.replace("subscriptionType { name }","");return{introspectionQueryName:n,introspectionQuery:i,introspectionQuerySansSubscriptions:r}},[u,e,t])}Fe(rIe,"useIntrospectionQuery");function aIe(u){let e=null,t=!0;try{u&&(e=JSON.parse(u))}catch{t=!1}return{headers:e,isValidJSON:t}}Fe(aIe,"parseHeaderString");const kS={name:"Docs"},oIe=Mg("ExplorerContext");function Kie(u){const{schema:e,validationErrors:t}=X1({nonNull:!0,caller:Kie}),[n,i]=C.useState([kS]),r=C.useCallback(l=>{i(c=>c.at(-1).def===l.def?c:[...c,l])},[]),a=C.useCallback(()=>{i(l=>l.length>1?l.slice(0,-1):l)},[]),o=C.useCallback(()=>{i(l=>l.length===1?l:[kS])},[]);C.useEffect(()=>{e==null||t.length>0?o():i(l=>{if(l.length===1)return l;const c=[kS];let d=null;for(const h of l)if(h!==kS)if(h.def)if(Rne(h.def)){const E=e.getType(h.def.name);if(E)c.push({name:h.name,def:E}),d=E;else break}else{if(d===null)break;if(qi(d)||jo(d)){const E=d.getFields()[h.name];if(E)c.push({name:h.name,def:E});else break}else{if(wg(d)||$0(d)||Ji(d)||Il(d))break;{const E=d;if(E.args.find(m=>m.name===h.name))c.push({name:h.name,def:E});else break}}}else d=null,c.push(h);return c})},[o,e,t]);const s=C.useMemo(()=>({explorerNavStack:n,push:r,pop:a,reset:o}),[n,r,a,o]);return B.jsx(oIe.Provider,{value:s,children:u.children})}Fe(Kie,"ExplorerContextProvider");const Pg=Tg(oIe);function Ny(u,e){return Mr(u)?B.jsxs(B.Fragment,{children:[Ny(u.ofType,e),"!"]}):ms(u)?B.jsxs(B.Fragment,{children:["[",Ny(u.ofType,e),"]"]}):e(u)}Fe(Ny,"renderType");function Rc(u){const{push:e}=Pg({nonNull:!0,caller:Rc});return u.type?Ny(u.type,t=>B.jsx("a",{className:"graphiql-doc-explorer-type-name",onClick:n=>{n.preventDefault(),e({name:t.name,def:t})},href:"#",children:t.name})):null}Fe(Rc,"TypeLink");function Py({arg:u,showDefaultValue:e,inline:t}){const n=B.jsxs("span",{children:[B.jsx("span",{className:"graphiql-doc-explorer-argument-name",children:u.name}),": ",B.jsx(Rc,{type:u.type}),e!==!1&&B.jsx(Vie,{field:u})]});return t?n:B.jsxs("div",{className:"graphiql-doc-explorer-argument",children:[n,u.description?B.jsx(V1,{type:"description",children:u.description}):null,u.deprecationReason?B.jsxs("div",{className:"graphiql-doc-explorer-argument-deprecation",children:[B.jsx("div",{className:"graphiql-doc-explorer-argument-deprecation-label",children:"Deprecated"}),B.jsx(V1,{type:"deprecation",children:u.deprecationReason})]}):null]})}Fe(Py,"Argument");function Wie(u){return u.children?B.jsxs("div",{className:"graphiql-doc-explorer-deprecation",children:[B.jsx("div",{className:"graphiql-doc-explorer-deprecation-label",children:"Deprecated"}),B.jsx(V1,{type:"deprecation",onlyShowFirstChild:u.preview??!0,children:u.children})]}):null}Fe(Wie,"DeprecationReason");function sIe({directive:u}){return B.jsxs("span",{className:"graphiql-doc-explorer-directive",children:["@",u.name.value]})}Fe(sIe,"Directive");function K0(u){const e=jRu[u.title];return B.jsxs("div",{children:[B.jsxs("div",{className:"graphiql-doc-explorer-section-title",children:[B.jsx(e,{}),u.title]}),B.jsx("div",{className:"graphiql-doc-explorer-section-content",children:u.children})]})}Fe(K0,"ExplorerSection");const jRu={Arguments:sRu,"Deprecated Arguments":ERu,"Deprecated Enum Values":mRu,"Deprecated Fields":gRu,Directives:fRu,"Enum Values":xRu,Fields:vRu,Implements:bRu,Implementations:bS,"Possible Types":bS,"Root Types":LRu,Type:bS,"All Schema Types":bS};function lIe(u){return B.jsxs(B.Fragment,{children:[u.field.description?B.jsx(V1,{type:"description",children:u.field.description}):null,B.jsx(Wie,{preview:!1,children:u.field.deprecationReason}),B.jsx(K0,{title:"Type",children:B.jsx(Rc,{type:u.field.type})}),B.jsx(cIe,{field:u.field}),B.jsx(dIe,{field:u.field})]})}Fe(lIe,"FieldDocumentation");function cIe({field:u}){const[e,t]=C.useState(!1),n=C.useCallback(()=>{t(!0)},[]);if(!("args"in u))return null;const i=[],r=[];for(const a of u.args)a.deprecationReason?r.push(a):i.push(a);return B.jsxs(B.Fragment,{children:[i.length>0?B.jsx(K0,{title:"Arguments",children:i.map(a=>B.jsx(Py,{arg:a},a.name))}):null,r.length>0?e||i.length===0?B.jsx(K0,{title:"Deprecated Arguments",children:r.map(a=>B.jsx(Py,{arg:a},a.name))}):B.jsx(Ac,{type:"button",onClick:n,children:"Show Deprecated Arguments"}):null]})}Fe(cIe,"Arguments");function dIe({field:u}){var e;const t=((e=u.astNode)==null?void 0:e.directives)||[];return!t||t.length===0?null:B.jsx(K0,{title:"Directives",children:t.map(n=>B.jsx("div",{children:B.jsx(sIe,{directive:n})},n.name.value))})}Fe(dIe,"Directives");function hIe(u){var e,t,n,i;const r=u.schema.getQueryType(),a=(t=(e=u.schema).getMutationType)==null?void 0:t.call(e),o=(i=(n=u.schema).getSubscriptionType)==null?void 0:i.call(n),s=u.schema.getTypeMap(),l=[r==null?void 0:r.name,a==null?void 0:a.name,o==null?void 0:o.name];return B.jsxs(B.Fragment,{children:[B.jsx(V1,{type:"description",children:u.schema.description||"A GraphQL schema provides a root type for each kind of operation."}),B.jsxs(K0,{title:"Root Types",children:[r?B.jsxs("div",{children:[B.jsx("span",{className:"graphiql-doc-explorer-root-type",children:"query"}),": ",B.jsx(Rc,{type:r})]}):null,a&&B.jsxs("div",{children:[B.jsx("span",{className:"graphiql-doc-explorer-root-type",children:"mutation"}),": ",B.jsx(Rc,{type:a})]}),o&&B.jsxs("div",{children:[B.jsx("span",{className:"graphiql-doc-explorer-root-type",children:"subscription"}),": ",B.jsx(Rc,{type:o})]})]}),B.jsx(K0,{title:"All Schema Types",children:s&&B.jsx("div",{children:Object.values(s).map(c=>l.includes(c.name)||c.name.startsWith("__")?null:B.jsx("div",{children:B.jsx(Rc,{type:c})},c.name))})})]})}Fe(hIe,"SchemaDocumentation");function Cp(u,e){let t;return function(...n){t&&window.clearTimeout(t),t=window.setTimeout(()=>{t=null,e(...n)},u)}}Fe(Cp,"debounce");function Gie(){const{explorerNavStack:u,push:e}=Pg({nonNull:!0,caller:Gie}),t=C.useRef(null),n=QT(),[i,r]=C.useState(""),[a,o]=C.useState(n(i)),s=C.useMemo(()=>Cp(200,E=>{o(n(E))}),[n]);C.useEffect(()=>{s(i)},[s,i]),C.useEffect(()=>{function E(m){var g;m.metaKey&&m.key==="k"&&((g=t.current)==null||g.focus())}return Fe(E,"handleKeyDown"),window.addEventListener("keydown",E),()=>window.removeEventListener("keydown",E)},[]);const l=u.at(-1),c=C.useCallback(E=>{e("field"in E?{name:E.field.name,def:E.field}:{name:E.type.name,def:E.type})},[e]),d=C.useRef(!1),h=C.useCallback(E=>{d.current=E.type==="focus"},[]);return u.length===1||qi(l.def)||Ji(l.def)||jo(l.def)?B.jsxs(HD,{as:"div",className:"graphiql-doc-explorer-search",onChange:c,"data-state":d?void 0:"idle","aria-label":`Search ${l.name}...`,children:[B.jsxs("div",{className:"graphiql-doc-explorer-search-input",onClick:()=>{var E;(E=t.current)==null||E.focus()},children:[B.jsx(FRu,{}),B.jsx(HD.Input,{autoComplete:"off",onFocus:h,onBlur:h,onChange:E=>r(E.target.value),placeholder:"⌘ K",ref:t,value:i,"data-cy":"doc-explorer-input"})]}),d.current&&B.jsxs(HD.Options,{"data-cy":"doc-explorer-list",children:[a.within.length+a.types.length+a.fields.length===0?B.jsx("li",{className:"graphiql-doc-explorer-search-empty",children:"No results found"}):a.within.map((E,m)=>B.jsx(HD.Option,{value:E,"data-cy":"doc-explorer-option",children:B.jsx(WY,{field:E.field,argument:E.argument})},`within-${m}`)),a.within.length>0&&a.types.length+a.fields.length>0?B.jsx("div",{className:"graphiql-doc-explorer-search-divider",children:"Other results"}):null,a.types.map((E,m)=>B.jsx(HD.Option,{value:E,"data-cy":"doc-explorer-option",children:B.jsx(XT,{type:E.type})},`type-${m}`)),a.fields.map((E,m)=>B.jsxs(HD.Option,{value:E,"data-cy":"doc-explorer-option",children:[B.jsx(XT,{type:E.type}),".",B.jsx(WY,{field:E.field,argument:E.argument})]},`field-${m}`))]})]}):null}Fe(Gie,"Search");function QT(u){const{explorerNavStack:e}=Pg({nonNull:!0,caller:u||QT}),{schema:t}=X1({nonNull:!0,caller:u||QT}),n=e.at(-1);return C.useCallback(i=>{const r={within:[],types:[],fields:[]};if(!t)return r;const a=n.def,o=t.getTypeMap();let s=Object.keys(o);a&&(s=s.filter(l=>l!==a.name),s.unshift(a.name));for(const l of s){if(r.within.length+r.types.length+r.fields.length>=100)break;const c=o[l];if(a!==c&&Q8(l,i)&&r.types.push({type:c}),!qi(c)&&!Ji(c)&&!jo(c))continue;const d=c.getFields();for(const h in d){const E=d[h];let m;if(!Q8(h,i))if("args"in E){if(m=E.args.filter(g=>Q8(g.name,i)),m.length===0)continue}else continue;r[a===c?"within":"fields"].push(...m?m.map(g=>({type:c,field:E,argument:g})):[{type:c,field:E}])}}return r},[n.def,t])}Fe(QT,"useSearchResults");function Q8(u,e){try{const t=e.replaceAll(/[^_0-9A-Za-z]/g,n=>"\\"+n);return u.search(new RegExp(t,"i"))!==-1}catch{return u.toLowerCase().includes(e.toLowerCase())}}Fe(Q8,"isMatch");function XT(u){return B.jsx("span",{className:"graphiql-doc-explorer-search-type",children:u.type.name})}Fe(XT,"Type");function WY({field:u,argument:e}){return B.jsxs(B.Fragment,{children:[B.jsx("span",{className:"graphiql-doc-explorer-search-field",children:u.name}),e?B.jsxs(B.Fragment,{children:["(",B.jsx("span",{className:"graphiql-doc-explorer-search-argument",children:e.name}),":"," ",Ny(e.type,t=>B.jsx(XT,{type:t})),")"]}):null]})}Fe(WY,"Field$1");function EIe(u){const{push:e}=Pg({nonNull:!0});return B.jsx("a",{className:"graphiql-doc-explorer-field-name",onClick:t=>{t.preventDefault(),e({name:u.field.name,def:u.field})},href:"#",children:u.field.name})}Fe(EIe,"FieldLink");function mIe(u){return Rne(u.type)?B.jsxs(B.Fragment,{children:[u.type.description?B.jsx(V1,{type:"description",children:u.type.description}):null,B.jsx(gIe,{type:u.type}),B.jsx(fIe,{type:u.type}),B.jsx(pIe,{type:u.type}),B.jsx(DIe,{type:u.type})]}):null}Fe(mIe,"TypeDocumentation");function gIe({type:u}){return qi(u)&&u.getInterfaces().length>0?B.jsx(K0,{title:"Implements",children:u.getInterfaces().map(e=>B.jsx("div",{children:B.jsx(Rc,{type:e})},e.name))}):null}Fe(gIe,"ImplementsInterfaces");function fIe({type:u}){const[e,t]=C.useState(!1),n=C.useCallback(()=>{t(!0)},[]);if(!qi(u)&&!Ji(u)&&!jo(u))return null;const i=u.getFields(),r=[],a=[];for(const o of Object.keys(i).map(s=>i[s]))o.deprecationReason?a.push(o):r.push(o);return B.jsxs(B.Fragment,{children:[r.length>0?B.jsx(K0,{title:"Fields",children:r.map(o=>B.jsx(GY,{field:o},o.name))}):null,a.length>0?e||r.length===0?B.jsx(K0,{title:"Deprecated Fields",children:a.map(o=>B.jsx(GY,{field:o},o.name))}):B.jsx(Ac,{type:"button",onClick:n,children:"Show Deprecated Fields"}):null]})}Fe(fIe,"Fields");function GY({field:u}){const e="args"in u?u.args.filter(t=>!t.deprecationReason):[];return B.jsxs("div",{className:"graphiql-doc-explorer-item",children:[B.jsxs("div",{children:[B.jsx(EIe,{field:u}),e.length>0?B.jsxs(B.Fragment,{children:["(",B.jsx("span",{children:e.map(t=>e.length===1?B.jsx(Py,{arg:t,inline:!0},t.name):B.jsx("div",{className:"graphiql-doc-explorer-argument-multiple",children:B.jsx(Py,{arg:t,inline:!0})},t.name))}),")"]}):null,": ",B.jsx(Rc,{type:u.type}),B.jsx(Vie,{field:u})]}),u.description?B.jsx(V1,{type:"description",onlyShowFirstChild:!0,children:u.description}):null,B.jsx(Wie,{children:u.deprecationReason})]})}Fe(GY,"Field");function pIe({type:u}){const[e,t]=C.useState(!1),n=C.useCallback(()=>{t(!0)},[]);if(!$0(u))return null;const i=[],r=[];for(const a of u.getValues())a.deprecationReason?r.push(a):i.push(a);return B.jsxs(B.Fragment,{children:[i.length>0?B.jsx(K0,{title:"Enum Values",children:i.map(a=>B.jsx(UY,{value:a},a.name))}):null,r.length>0?e||i.length===0?B.jsx(K0,{title:"Deprecated Enum Values",children:r.map(a=>B.jsx(UY,{value:a},a.name))}):B.jsx(Ac,{type:"button",onClick:n,children:"Show Deprecated Values"}):null]})}Fe(pIe,"EnumValues");function UY({value:u}){return B.jsxs("div",{className:"graphiql-doc-explorer-item",children:[B.jsx("div",{className:"graphiql-doc-explorer-enum-value",children:u.name}),u.description?B.jsx(V1,{type:"description",children:u.description}):null,u.deprecationReason?B.jsx(V1,{type:"deprecation",children:u.deprecationReason}):null]})}Fe(UY,"EnumValue");function DIe({type:u}){const{schema:e}=X1({nonNull:!0});return!e||!_m(u)?null:B.jsx(K0,{title:Ji(u)?"Implementations":"Possible Types",children:e.getPossibleTypes(u).map(t=>B.jsx("div",{children:B.jsx(Rc,{type:t})},t.name))})}Fe(DIe,"PossibleTypes");function eN(){const{fetchError:u,isFetching:e,schema:t,validationErrors:n}=X1({nonNull:!0,caller:eN}),{explorerNavStack:i,pop:r}=Pg({nonNull:!0,caller:eN}),a=i.at(-1);let o=null;u?o=B.jsx("div",{className:"graphiql-doc-explorer-error",children:"Error fetching schema"}):n.length>0?o=B.jsxs("div",{className:"graphiql-doc-explorer-error",children:["Schema is invalid: ",n[0].message]}):e?o=B.jsx(Hie,{}):t?i.length===1?o=B.jsx(hIe,{schema:t}):Nne(a.def)?o=B.jsx(mIe,{type:a.def}):a.def&&(o=B.jsx(lIe,{field:a.def})):o=B.jsx("div",{className:"graphiql-doc-explorer-error",children:"No GraphQL schema available"});let s;return i.length>1&&(s=i.at(-2).name),B.jsxs("section",{className:"graphiql-doc-explorer","aria-label":"Documentation Explorer",children:[B.jsxs("div",{className:"graphiql-doc-explorer-header",children:[B.jsxs("div",{className:"graphiql-doc-explorer-header-content",children:[s&&B.jsxs("a",{href:"#",className:"graphiql-doc-explorer-back",onClick:l=>{l.preventDefault(),r()},"aria-label":`Go back to ${s}`,children:[B.jsx(cRu,{}),s]}),B.jsx("div",{className:"graphiql-doc-explorer-title",children:a.name})]}),B.jsx(Gie,{},a.name)]}),B.jsx("div",{className:"graphiql-doc-explorer-content",children:o})]})}Fe(eN,"DocExplorer");const Ry={title:"Documentation Explorer",icon:Fe(function(){const u=AO();return(u==null?void 0:u.visiblePlugin)===Ry?B.jsx(pRu,{}):B.jsx(DRu,{})},"Icon"),content:eN},ZDe={title:"History",icon:CRu,content:eIe},xIe=Mg("PluginContext");function vIe(u){const e=Ng(),t=Pg(),n=bO(),i=!!t,r=!!n,a=C.useMemo(()=>{const E=[],m={};i&&(E.push(Ry),m[Ry.title]=!0),r&&(E.push(ZDe),m[ZDe.title]=!0);for(const g of u.plugins||[]){if(typeof g.title!="string"||!g.title)throw new Error("All GraphiQL plugins must have a unique title");if(m[g.title])throw new Error(`All GraphiQL plugins must have a unique title, found two plugins with the title '${g.title}'`);E.push(g),m[g.title]=!0}return E},[i,r,u.plugins]),[o,s]=C.useState(()=>{const E=e==null?void 0:e.get(YDe);return a.find(g=>g.title===E)||(E&&(e==null||e.set(YDe,"")),u.visiblePlugin&&a.find(g=>(typeof u.visiblePlugin=="string"?g.title:g)===u.visiblePlugin)||null)}),{onTogglePluginVisibility:l,children:c}=u,d=C.useCallback(E=>{const m=E&&a.find(g=>(typeof E=="string"?g.title:g)===E)||null;s(g=>m===g?g:(l==null||l(m),m))},[l,a]);C.useEffect(()=>{u.visiblePlugin&&d(u.visiblePlugin)},[a,u.visiblePlugin,d]);const h=C.useMemo(()=>({plugins:a,setVisiblePlugin:d,visiblePlugin:o}),[a,d,o]);return B.jsx(xIe.Provider,{value:h,children:c})}Fe(vIe,"PluginContextProvider");const AO=Tg(xIe),YDe="visiblePlugin";function CIe(u,e,t,n,i,r){U6([],{useCommonAddons:!1}).then(o=>{let s,l,c,d,h,E,m,g,f;o.on(e,"select",(p,D)=>{if(!s){const x=D.parentNode;s=document.createElement("div"),s.className="CodeMirror-hint-information",x.append(s);const b=document.createElement("header");b.className="CodeMirror-hint-information-header",s.append(b),l=document.createElement("span"),l.className="CodeMirror-hint-information-field-name",b.append(l),c=document.createElement("span"),c.className="CodeMirror-hint-information-type-name-pill",b.append(c),d=document.createElement("span"),c.append(d),h=document.createElement("a"),h.className="CodeMirror-hint-information-type-name",h.href="javascript:void 0",h.addEventListener("click",a),c.append(h),E=document.createElement("span"),c.append(E),m=document.createElement("div"),m.className="CodeMirror-hint-information-description",s.append(m),g=document.createElement("div"),g.className="CodeMirror-hint-information-deprecation",s.append(g);const k=document.createElement("span");k.className="CodeMirror-hint-information-deprecation-label",k.textContent="Deprecated",g.append(k),f=document.createElement("div"),f.className="CodeMirror-hint-information-deprecation-reason",g.append(f);const A=parseInt(window.getComputedStyle(s).paddingBottom.replace(/px$/,""),10)||0,F=parseInt(window.getComputedStyle(s).maxHeight.replace(/px$/,""),10)||0,S=Fe(()=>{s&&(s.style.paddingTop=x.scrollTop+A+"px",s.style.maxHeight=x.scrollTop+F+"px")},"handleScroll");x.addEventListener("scroll",S);let w;x.addEventListener("DOMNodeRemoved",w=Fe(z=>{z.target===x&&(x.removeEventListener("scroll",S),x.removeEventListener("DOMNodeRemoved",w),s&&s.removeEventListener("click",a),s=null,l=null,c=null,d=null,h=null,E=null,m=null,g=null,f=null,w=null)},"onRemoveFn"))}if(l&&(l.textContent=p.text),c&&d&&h&&E)if(p.type){c.style.display="inline";const x=Fe(b=>{Mr(b)?(E.textContent="!"+E.textContent,x(b.ofType)):ms(b)?(d.textContent+="[",E.textContent="]"+E.textContent,x(b.ofType)):h.textContent=b.name},"renderType");d.textContent="",E.textContent="",x(p.type)}else d.textContent="",h.textContent="",E.textContent="",c.style.display="none";m&&(p.description?(m.style.display="block",m.innerHTML=ZT.render(p.description)):(m.style.display="none",m.innerHTML="")),g&&f&&(p.deprecationReason?(g.style.display="block",f.innerHTML=ZT.render(p.deprecationReason)):(g.style.display="none",f.innerHTML=""))})});function a(o){if(!t||!n||!i||!(o.currentTarget instanceof HTMLElement))return;const s=o.currentTarget.textContent||"",l=t.getType(s);l&&(i.setVisiblePlugin(Ry),n.push({name:l.name,def:l}),r==null||r(l))}Fe(a,"onClickHintInformation")}Fe(CIe,"onHasCompletion");function $b(u,e){C.useEffect(()=>{u&&typeof e=="string"&&e!==u.getValue()&&u.setValue(e)},[u,e])}Fe($b,"useSynchronizeValue");function S7(u,e,t){C.useEffect(()=>{u&&u.setOption(e,t)},[u,e,t])}Fe(S7,"useSynchronizeOption");function Uie(u,e,t,n,i){const{updateActiveTabValues:r}=Ko({nonNull:!0,caller:i}),a=Ng();C.useEffect(()=>{if(!u)return;const o=Cp(500,c=>{!a||t===null||a.set(t,c)}),s=Cp(100,c=>{r({[n]:c})}),l=Fe((c,d)=>{if(!d)return;const h=c.getValue();o(h),s(h),e==null||e(h)},"handleChange");return u.on("change",l),()=>u.off("change",l)},[e,u,a,t,n,r])}Fe(Uie,"useChangeHandler");function qie(u,e,t){const{schema:n}=X1({nonNull:!0,caller:t}),i=Pg(),r=AO();C.useEffect(()=>{if(!u)return;const a=Fe((o,s)=>{CIe(o,s,n,i,r,l=>{e==null||e({kind:"Type",type:l,schema:n||void 0})})},"handleCompletion");return u.on("hasCompletion",a),()=>u.off("hasCompletion",a)},[e,u,i,r,n])}Fe(qie,"useCompletion");function Ic(u,e,t){C.useEffect(()=>{if(u){for(const n of e)u.removeKeyMap(n);if(t){const n={};for(const i of e)n[i]=()=>t();u.addKeyMap(n)}}},[u,e,t])}Fe(Ic,"useKeyMap");function _O({caller:u,onCopyQuery:e}={}){const{queryEditor:t}=Ko({nonNull:!0,caller:u||_O});return C.useCallback(()=>{if(!t)return;const n=t.getValue();WJt(n),e==null||e(n)},[t,e])}Fe(_O,"useCopyQuery");function bp({caller:u}={}){const{queryEditor:e}=Ko({nonNull:!0,caller:u||bp}),{schema:t}=X1({nonNull:!0,caller:bp});return C.useCallback(()=>{const n=e==null?void 0:e.documentAST,i=e==null?void 0:e.getValue();!n||!i||e.setValue(u0(Nqt(n,t)))},[e,t])}Fe(bp,"useMergeQuery");function q6({caller:u}={}){const{queryEditor:e,headerEditor:t,variableEditor:n}=Ko({nonNull:!0,caller:u||q6});return C.useCallback(()=>{if(n){const i=n.getValue();try{const r=JSON.stringify(JSON.parse(i),null,2);r!==i&&n.setValue(r)}catch{}}if(t){const i=t.getValue();try{const r=JSON.stringify(JSON.parse(i),null,2);r!==i&&t.setValue(r)}catch{}}if(e){const i=e.getValue(),r=u0(Bg(i));r!==i&&e.setValue(r)}},[e,n,t])}Fe(q6,"usePrettifyEditors");function tN({getDefaultFieldNames:u,caller:e}={}){const{schema:t}=X1({nonNull:!0,caller:e||tN}),{queryEditor:n}=Ko({nonNull:!0,caller:e||tN});return C.useCallback(()=>{if(!n)return;const i=n.getValue(),{insertions:r,result:a}=Bqt(t,i,u);return r&&r.length>0&&n.operation(()=>{const o=n.getCursor(),s=n.indexFromPos(o);n.setValue(a||"");let l=0;const c=r.map(({index:h,string:E})=>n.markText(n.posFromIndex(h+l),n.posFromIndex(h+(l+=E.length)),{className:"auto-inserted-leaf",clearOnEnter:!0,title:"Automatically added leaf fields"}));setTimeout(()=>{for(const h of c)h.clear()},7e3);let d=s;for(const{index:h,string:E}of r)h{let E=!0;return U6([Te(()=>import("./javascript.es-3c6957c5.js"),["./javascript.es-3c6957c5.js","./codemirror.es2-5884f31a.js"],import.meta.url).then(m=>m.j)]).then(m=>{if(!E)return;const g=h.current;if(!g)return;const f=m(g,{value:r,lineNumbers:!0,tabSize:2,mode:{name:"javascript",json:!0},theme:u,autoCloseBrackets:!0,matchBrackets:!0,showCursorWhenSelecting:!0,readOnly:n?"nocursor":!1,foldGutter:!0,gutters:["CodeMirror-linenumbers","CodeMirror-foldgutter"],extraKeys:yO});f.addKeyMap({"Cmd-Space"(){f.showHint({completeSingle:!1,container:g})},"Ctrl-Space"(){f.showHint({completeSingle:!1,container:g})},"Alt-Space"(){f.showHint({completeSingle:!1,container:g})},"Shift-Space"(){f.showHint({completeSingle:!1,container:g})}}),f.on("keyup",(p,D)=>{const{code:x,key:b,shiftKey:k}=D,A=x.startsWith("Key"),F=!k&&x.startsWith("Digit");(A||F||b==="_"||b==='"')&&p.execCommand("autocomplete")}),o(f)}),()=>{E=!1}},[u,r,n,o]),S7(a,"keyMap",e),Uie(a,t,s?X8:null,"headers",Z5),Ic(a,["Cmd-Enter","Ctrl-Enter"],l==null?void 0:l.run),Ic(a,["Shift-Ctrl-P"],d),Ic(a,["Shift-Ctrl-M"],c),h}Fe(Z5,"useHeaderEditor");const X8="headers",HRu=Array.from({length:11},(u,e)=>String.fromCharCode(8192+e)).concat(["\u2028","\u2029"," "," "]),VRu=new RegExp("["+HRu.join("")+"]","g");function bIe(u){return u.replace(VRu," ")}Fe(bIe,"normalizeWhitespace");function pE({editorTheme:u=kO,keyMap:e=FO,onClickReference:t,onCopyQuery:n,onEdit:i,readOnly:r=!1}={},a){const{schema:o}=X1({nonNull:!0,caller:a||pE}),{externalFragments:s,initialQuery:l,queryEditor:c,setOperationName:d,setQueryEditor:h,validationRules:E,variableEditor:m,updateActiveTabValues:g}=Ko({nonNull:!0,caller:a||pE}),f=_7(),p=Ng(),D=Pg(),x=AO(),b=_O({caller:a||pE,onCopyQuery:n}),k=bp({caller:a||pE}),A=q6({caller:a||pE}),F=C.useRef(null),S=C.useRef(),w=C.useRef(()=>{});C.useEffect(()=>{w.current=O=>{if(!(!D||!x)){switch(x.setVisiblePlugin(Ry),O.kind){case"Type":{D.push({name:O.type.name,def:O.type});break}case"Field":{D.push({name:O.field.name,def:O.field});break}case"Argument":{O.field&&D.push({name:O.field.name,def:O.field});break}case"EnumValue":{O.type&&D.push({name:O.type.name,def:O.type});break}}t==null||t(O)}}},[D,t,x]),C.useEffect(()=>{let O=!0;return U6([Te(()=>import("./comment.es-39699bae.js"),["./comment.es-39699bae.js","./codemirror.es2-5884f31a.js"],import.meta.url).then(y=>y.c),Te(()=>import("./search.es-1c15f5ea.js"),["./search.es-1c15f5ea.js","./codemirror.es2-5884f31a.js","./searchcursor.es2-cbfe7cae.js","./dialog.es2-02b3b4e7.js"],import.meta.url).then(y=>y.s),Te(()=>import("./hint.es-f6098be7.js"),["./hint.es-f6098be7.js","./codemirror.es-52e8b92d.js","./codemirror.es2-5884f31a.js","./show-hint.es-b981493e.js","./Range-52ddcb6a.js"],import.meta.url),Te(()=>import("./lint.es2-5aecff45.js"),["./lint.es2-5aecff45.js","./codemirror.es-52e8b92d.js","./codemirror.es2-5884f31a.js","./Range-52ddcb6a.js"],import.meta.url),Te(()=>import("./info.es-8a2f4160.js"),["./info.es-8a2f4160.js","./codemirror.es-52e8b92d.js","./codemirror.es2-5884f31a.js","./SchemaReference.es-1ed706aa.js","./forEachState.es-b2033c2b.js","./info-addon.es-c9b2027b.js"],import.meta.url),Te(()=>import("./jump.es-013c793d.js"),["./jump.es-013c793d.js","./codemirror.es-52e8b92d.js","./codemirror.es2-5884f31a.js","./SchemaReference.es-1ed706aa.js","./forEachState.es-b2033c2b.js"],import.meta.url),Te(()=>import("./mode.es-44172034.js"),["./mode.es-44172034.js","./codemirror.es-52e8b92d.js","./codemirror.es2-5884f31a.js","./mode-indent.es-057a4f6a.js"],import.meta.url)]).then(y=>{if(!O)return;S.current=y;const _=F.current;if(!_)return;const L=y(_,{value:l,lineNumbers:!0,tabSize:2,foldGutter:!0,mode:"graphql",theme:u,autoCloseBrackets:!0,matchBrackets:!0,showCursorWhenSelecting:!0,readOnly:r?"nocursor":!1,lint:{schema:void 0,validationRules:null,externalFragments:void 0},hintOptions:{schema:void 0,closeOnUnfocus:!1,completeSingle:!1,container:_,externalFragments:void 0},info:{schema:void 0,renderDescription:R=>ZT.render(R),onClick(R){w.current(R)}},jump:{schema:void 0,onClick(R){w.current(R)}},gutters:["CodeMirror-linenumbers","CodeMirror-foldgutter"],extraKeys:{...yO,"Cmd-S"(){},"Ctrl-S"(){}}});L.addKeyMap({"Cmd-Space"(){L.showHint({completeSingle:!0,container:_})},"Ctrl-Space"(){L.showHint({completeSingle:!0,container:_})},"Alt-Space"(){L.showHint({completeSingle:!0,container:_})},"Shift-Space"(){L.showHint({completeSingle:!0,container:_})},"Shift-Alt-Space"(){L.showHint({completeSingle:!0,container:_})}}),L.on("keyup",(R,I)=>{$Ru.test(I.key)&&R.execCommand("autocomplete")});let T=!1;L.on("startCompletion",()=>{T=!0}),L.on("endCompletion",()=>{T=!1}),L.on("keydown",(R,I)=>{I.key==="Escape"&&T&&I.stopPropagation()}),L.on("beforeChange",(R,I)=>{var H;if(I.origin==="paste"){const V=I.text.map(bIe);(H=I.update)==null||H.call(I,I.from,I.to,V)}}),L.documentAST=null,L.operationName=null,L.operations=null,L.variableToType=null,h(L)}),()=>{O=!1}},[u,l,r,h]),S7(c,"keyMap",e),C.useEffect(()=>{if(!c)return;function O(_){var L;const T=yJt(o,_.getValue()),R=Pqt(_.operations??void 0,_.operationName??void 0,T==null?void 0:T.operations);return _.documentAST=(T==null?void 0:T.documentAST)??null,_.operationName=R??null,_.operations=(T==null?void 0:T.operations)??null,m&&(m.state.lint.linterOptions.variableToType=T==null?void 0:T.variableToType,m.options.lint.variableToType=T==null?void 0:T.variableToType,m.options.hintOptions.variableToType=T==null?void 0:T.variableToType,(L=S.current)==null||L.signal(m,"change",m)),T?{...T,operationName:R}:null}Fe(O,"getAndUpdateOperationFacts");const y=Cp(100,_=>{const L=_.getValue();p==null||p.set(AIe,L);const T=_.operationName,R=O(_);(R==null?void 0:R.operationName)!==void 0&&(p==null||p.set(KRu,R.operationName)),i==null||i(L,R==null?void 0:R.documentAST),R!=null&&R.operationName&&T!==R.operationName&&d(R.operationName),g({query:L,operationName:(R==null?void 0:R.operationName)??null})});return O(c),c.on("change",y),()=>c.off("change",y)},[i,c,o,d,p,m,g]),kIe(c,o??null,S),FIe(c,E??null,S),yIe(c,s,S),qie(c,t||null,pE);const z=f==null?void 0:f.run,N=C.useCallback(()=>{var O;if(!z||!c||!c.operations||!c.hasFocus()){z==null||z();return}const y=c.indexFromPos(c.getCursor());let _;for(const L of c.operations)L.loc&&L.loc.start<=y&&L.loc.end>=y&&(_=(O=L.name)==null?void 0:O.value);_&&_!==c.operationName&&d(_),z()},[c,z,d]);return Ic(c,["Cmd-Enter","Ctrl-Enter"],N),Ic(c,["Shift-Ctrl-C"],b),Ic(c,["Shift-Ctrl-P","Shift-Ctrl-F"],A),Ic(c,["Shift-Ctrl-M"],k),F}Fe(pE,"useQueryEditor");function kIe(u,e,t){C.useEffect(()=>{if(!u)return;const n=u.options.lint.schema!==e;u.state.lint.linterOptions.schema=e,u.options.lint.schema=e,u.options.hintOptions.schema=e,u.options.info.schema=e,u.options.jump.schema=e,n&&t.current&&t.current.signal(u,"change",u)},[u,e,t])}Fe(kIe,"useSynchronizeSchema");function FIe(u,e,t){C.useEffect(()=>{if(!u)return;const n=u.options.lint.validationRules!==e;u.state.lint.linterOptions.validationRules=e,u.options.lint.validationRules=e,n&&t.current&&t.current.signal(u,"change",u)},[u,e,t])}Fe(FIe,"useSynchronizeValidationRules");function yIe(u,e,t){const n=C.useMemo(()=>[...e.values()],[e]);C.useEffect(()=>{if(!u)return;const i=u.options.lint.externalFragments!==n;u.state.lint.linterOptions.externalFragments=n,u.options.lint.externalFragments=n,u.options.hintOptions.externalFragments=n,i&&t.current&&t.current.signal(u,"change",u)},[u,n,t])}Fe(yIe,"useSynchronizeExternalFragments");const $Ru=/^[a-zA-Z0-9_@(]$/,AIe="query",KRu="operationName";function _Ie({defaultQuery:u,defaultHeaders:e,headers:t,defaultTabs:n,query:i,variables:r,storage:a,shouldPersistHeaders:o}){const s=a==null?void 0:a.get(Oy);try{if(!s)throw new Error("Storage for tabs is empty");const l=JSON.parse(s),c=o?t:void 0;if(SIe(l)){const d=Iy({query:i,variables:r,headers:c});let h=-1;for(let E=0;E=0)l.activeTabIndex=h;else{const E=i?SO(i):null;l.tabs.push({id:Qie(),hash:d,title:E||Xie,query:i,variables:r,headers:t,operationName:E,response:null}),l.activeTabIndex=l.tabs.length-1}return l}throw new Error("Storage for tabs is invalid")}catch{return{activeTabIndex:0,tabs:(n||[{query:i??u,variables:r,headers:t??e}]).map(Zie)}}}Fe(_Ie,"getDefaultTabState");function SIe(u){return u&&typeof u=="object"&&!Array.isArray(u)&&wIe(u,"activeTabIndex")&&"tabs"in u&&Array.isArray(u.tabs)&&u.tabs.every(BIe)}Fe(SIe,"isTabsState");function BIe(u){return u&&typeof u=="object"&&!Array.isArray(u)&&qY(u,"id")&&qY(u,"title")&&u5(u,"query")&&u5(u,"variables")&&u5(u,"headers")&&u5(u,"operationName")&&u5(u,"response")}Fe(BIe,"isTabState");function wIe(u,e){return e in u&&typeof u[e]=="number"}Fe(wIe,"hasNumberKey");function qY(u,e){return e in u&&typeof u[e]=="string"}Fe(qY,"hasStringKey");function u5(u,e){return e in u&&(typeof u[e]=="string"||u[e]===null)}Fe(u5,"hasStringOrNullKey");function LIe({queryEditor:u,variableEditor:e,headerEditor:t,responseEditor:n}){return C.useCallback(i=>{const r=(u==null?void 0:u.getValue())??null,a=(e==null?void 0:e.getValue())??null,o=(t==null?void 0:t.getValue())??null,s=(u==null?void 0:u.operationName)??null,l=(n==null?void 0:n.getValue())??null;return Yie(i,{query:r,variables:a,headers:o,response:l,operationName:s})},[u,e,t,n])}Fe(LIe,"useSynchronizeActiveTabValues");function Jie(u,e=!1){return JSON.stringify(u,(t,n)=>t==="hash"||t==="response"||!e&&t==="headers"?null:n)}Fe(Jie,"serializeTabState");function zIe({storage:u,shouldPersistHeaders:e}){const t=C.useMemo(()=>Cp(500,n=>{u==null||u.set(Oy,n)}),[u]);return C.useCallback(n=>{t(Jie(n,e))},[e,t])}Fe(zIe,"useStoreTabs");function MIe({queryEditor:u,variableEditor:e,headerEditor:t,responseEditor:n}){return C.useCallback(({query:i,variables:r,headers:a,response:o})=>{u==null||u.setValue(i??""),e==null||e.setValue(r??""),t==null||t.setValue(a??""),n==null||n.setValue(o??"")},[t,u,n,e])}Fe(MIe,"useSetEditorValues");function Zie({query:u=null,variables:e=null,headers:t=null}={}){return{id:Qie(),hash:Iy({query:u,variables:e,headers:t}),title:u&&SO(u)||Xie,query:u,variables:e,headers:t,operationName:null,response:null}}Fe(Zie,"createTab");function Yie(u,e){return{...u,tabs:u.tabs.map((t,n)=>{if(n!==u.activeTabIndex)return t;const i={...t,...e};return{...i,hash:Iy(i),title:i.operationName||(i.query?SO(i.query):void 0)||Xie}})}}Fe(Yie,"setPropertiesInActiveTab");function Qie(){const u=Fe(()=>Math.floor((1+Math.random())*65536).toString(16).slice(1),"s4");return`${u()}${u()}-${u()}-${u()}-${u()}-${u()}${u()}${u()}`}Fe(Qie,"guid");function Iy(u){return[u.query??"",u.variables??"",u.headers??""].join("|")}Fe(Iy,"hashFromTabContents");function SO(u){const e=/^(?!#).*(query|subscription|mutation)\s+([a-zA-Z0-9_]+)/m.exec(u);return(e==null?void 0:e[2])??null}Fe(SO,"fuzzyExtractOperationName");function TIe(u){const e=u==null?void 0:u.get(Oy);if(e){const t=JSON.parse(e);u==null||u.set(Oy,JSON.stringify(t,(n,i)=>n==="headers"?null:i))}}Fe(TIe,"clearHeadersFromTabs");const Xie="",Oy="tabState";function Mf({editorTheme:u=kO,keyMap:e=FO,onClickReference:t,onEdit:n,readOnly:i=!1}={},r){const{initialVariables:a,variableEditor:o,setVariableEditor:s}=Ko({nonNull:!0,caller:r||Mf}),l=_7(),c=bp({caller:r||Mf}),d=q6({caller:r||Mf}),h=C.useRef(null),E=C.useRef();return C.useEffect(()=>{let m=!0;return U6([Te(()=>import("./hint.es2-a97d8435.js"),["./hint.es2-a97d8435.js","./codemirror.es-52e8b92d.js","./codemirror.es2-5884f31a.js","./forEachState.es-b2033c2b.js"],import.meta.url),Te(()=>import("./lint.es3-d27d0d47.js"),["./lint.es3-d27d0d47.js","./codemirror.es-52e8b92d.js","./codemirror.es2-5884f31a.js"],import.meta.url),Te(()=>import("./mode.es2-0674d90c.js"),["./mode.es2-0674d90c.js","./codemirror.es-52e8b92d.js","./codemirror.es2-5884f31a.js","./mode-indent.es-057a4f6a.js"],import.meta.url)]).then(g=>{if(!m)return;E.current=g;const f=h.current;if(!f)return;const p=g(f,{value:a,lineNumbers:!0,tabSize:2,mode:"graphql-variables",theme:u,autoCloseBrackets:!0,matchBrackets:!0,showCursorWhenSelecting:!0,readOnly:i?"nocursor":!1,foldGutter:!0,lint:{variableToType:void 0},hintOptions:{closeOnUnfocus:!1,completeSingle:!1,container:f,variableToType:void 0},gutters:["CodeMirror-linenumbers","CodeMirror-foldgutter"],extraKeys:yO});p.addKeyMap({"Cmd-Space"(){p.showHint({completeSingle:!1,container:f})},"Ctrl-Space"(){p.showHint({completeSingle:!1,container:f})},"Alt-Space"(){p.showHint({completeSingle:!1,container:f})},"Shift-Space"(){p.showHint({completeSingle:!1,container:f})}}),p.on("keyup",(D,x)=>{const{code:b,key:k,shiftKey:A}=x,F=b.startsWith("Key"),S=!A&&b.startsWith("Digit");(F||S||k==="_"||k==='"')&&D.execCommand("autocomplete")}),s(p)}),()=>{m=!1}},[u,a,i,s]),S7(o,"keyMap",e),Uie(o,n,NIe,"variables",Mf),qie(o,t||null,Mf),Ic(o,["Cmd-Enter","Ctrl-Enter"],l==null?void 0:l.run),Ic(o,["Shift-Ctrl-P"],d),Ic(o,["Shift-Ctrl-M"],c),h}Fe(Mf,"useVariableEditor");const NIe="variables",PIe=Mg("EditorContext");function RIe(u){const e=Ng(),[t,n]=C.useState(null),[i,r]=C.useState(null),[a,o]=C.useState(null),[s,l]=C.useState(null),[c,d]=C.useState(()=>{const R=(e==null?void 0:e.get(K$))!==null;return u.shouldPersistHeaders!==!1&&R?(e==null?void 0:e.get(K$))==="true":!!u.shouldPersistHeaders});$b(t,u.headers),$b(i,u.query),$b(a,u.response),$b(s,u.variables);const h=zIe({storage:e,shouldPersistHeaders:c}),[E]=C.useState(()=>{const R=u.query??(e==null?void 0:e.get(AIe))??null,I=u.variables??(e==null?void 0:e.get(NIe))??null,H=u.headers??(e==null?void 0:e.get(X8))??null,V=u.response??"",U=_Ie({query:R,variables:I,headers:H,defaultTabs:u.defaultTabs,defaultQuery:u.defaultQuery||WRu,defaultHeaders:u.defaultHeaders,storage:e,shouldPersistHeaders:c});return h(U),{query:R??(U.activeTabIndex===0?U.tabs[0].query:null)??"",variables:I??"",headers:H??u.defaultHeaders??"",response:V,tabState:U}}),[m,g]=C.useState(E.tabState),f=C.useCallback(R=>{if(R){e==null||e.set(X8,(t==null?void 0:t.getValue())??"");const I=Jie(m,!0);e==null||e.set(Oy,I)}else e==null||e.set(X8,""),TIe(e);d(R),e==null||e.set(K$,R.toString())},[e,m,t]),p=C.useRef();C.useEffect(()=>{const R=!!u.shouldPersistHeaders;(p==null?void 0:p.current)!==R&&(f(R),p.current=R)},[u.shouldPersistHeaders,f]);const D=LIe({queryEditor:i,variableEditor:s,headerEditor:t,responseEditor:a}),x=MIe({queryEditor:i,variableEditor:s,headerEditor:t,responseEditor:a}),{onTabChange:b,defaultHeaders:k,children:A}=u,F=C.useCallback(()=>{g(R=>{const I=D(R),H={tabs:[...I.tabs,Zie({headers:k})],activeTabIndex:I.tabs.length};return h(H),x(H.tabs[H.activeTabIndex]),b==null||b(H),H})},[k,b,x,h,D]),S=C.useCallback(R=>{g(I=>{const H={...I,activeTabIndex:R};return h(H),x(H.tabs[H.activeTabIndex]),b==null||b(H),H})},[b,x,h]),w=C.useCallback(R=>{g(I=>{const H=I.tabs[I.activeTabIndex],V={tabs:R,activeTabIndex:R.indexOf(H)};return h(V),x(V.tabs[V.activeTabIndex]),b==null||b(V),V})},[b,x,h]),z=C.useCallback(R=>{g(I=>{const H={tabs:I.tabs.filter((V,U)=>R!==U),activeTabIndex:Math.max(I.activeTabIndex-1,0)};return h(H),x(H.tabs[H.activeTabIndex]),b==null||b(H),H})},[b,x,h]),N=C.useCallback(R=>{g(I=>{const H=Yie(I,R);return h(H),b==null||b(H),H})},[b,h]),{onEditOperationName:O}=u,y=C.useCallback(R=>{i&&(i.operationName=R,N({operationName:R}),O==null||O(R))},[O,i,N]),_=C.useMemo(()=>{const R=new Map;if(Array.isArray(u.externalFragments))for(const I of u.externalFragments)R.set(I.name.value,I);else if(typeof u.externalFragments=="string")ad(Bg(u.externalFragments,{}),{FragmentDefinition(I){R.set(I.name.value,I)}});else if(u.externalFragments)throw new Error("The `externalFragments` prop must either be a string that contains the fragment definitions in SDL or a list of FragmentDefinitionNode objects.");return R},[u.externalFragments]),L=C.useMemo(()=>u.validationRules||[],[u.validationRules]),T=C.useMemo(()=>({...m,addTab:F,changeTab:S,moveTab:w,closeTab:z,updateActiveTabValues:N,headerEditor:t,queryEditor:i,responseEditor:a,variableEditor:s,setHeaderEditor:n,setQueryEditor:r,setResponseEditor:o,setVariableEditor:l,setOperationName:y,initialQuery:E.query,initialVariables:E.variables,initialHeaders:E.headers,initialResponse:E.response,externalFragments:_,validationRules:L,shouldPersistHeaders:c,setShouldPersistHeaders:f}),[m,F,S,w,z,N,t,i,a,s,y,E,_,L,c,f]);return B.jsx(PIe.Provider,{value:T,children:A})}Fe(RIe,"EditorContextProvider");const Ko=Tg(PIe),K$="shouldPersistHeaders",WRu=`# Welcome to GraphiQL +`))}k(""),E(!0);const O=n??a.operationName??void 0;c==null||c.addToHistory({query:F,variables:S,headers:z,operationName:O});try{let y={data:{}};const _=Fe(R=>{if(A!==f.current)return;let I=Array.isArray(R)?R:!1;if(!I&&typeof R=="object"&&R!==null&&"hasNext"in R&&(I=[R]),I){const H={data:y.data},V=[...(y==null?void 0:y.errors)||[],...I.flatMap(U=>U.errors).filter(Boolean)];V.length&&(H.errors=V);for(const U of I){const{path:J,data:Y,errors:X,...re}=U;if(J){if(!Y)throw new Error(`Expected part to contain a data property, but got ${U}`);OJt(H.data,J,Y,{merge:!0})}else Y&&(H.data=Y);y={...H,...re}}E(!1),k(uY(y))}else{const H=uY(R);E(!1),k(H)}},"handleResponse"),L=u({query:F,variables:w,operationName:O},{headers:N??void 0,documentAST:a.documentAST??void 0}),T=await Promise.resolve(L);if($Te(T))g(T.subscribe({next(R){_(R)},error(R){E(!1),R&&k(vy(R)),g(null)},complete(){E(!1),g(null)}}));else if(KTe(T)){g({unsubscribe:()=>{var R,I;return(I=(R=T[Symbol.asyncIterator]()).return)==null?void 0:I.call(R)}});for await(const R of T)_(R);E(!1),g(null)}else _(T)}catch(y){E(!1),k(vy(y)),g(null)}},[d,i,u,r,c,n,a,o,p,m,l,s]),x=!!m,b=C.useMemo(()=>({isFetching:h,isSubscribed:x,operationName:n??null,run:D,stop:p}),[h,x,n,D,p]);return B.jsx(uIe.Provider,{value:b,children:t})}Fe(YT,"ExecutionContextProvider");const _7=Tg(uIe);function KY({json:u,errorMessageParse:e,errorMessageType:t}){let n;try{n=u&&u.trim()!==""?JSON.parse(u):void 0}catch(r){throw new Error(`${e}: ${r instanceof Error?r.message:r}.`)}const i=typeof n=="object"&&n!==null&&!Array.isArray(n);if(n!==void 0&&!i)throw new Error(t);return n}Fe(KY,"tryParseJsonObject");const kO="graphiql",FO="sublime";let nIe=!1;typeof window=="object"&&(nIe=window.navigator.platform.toLowerCase().indexOf("mac")===0);const yO={[nIe?"Cmd-F":"Ctrl-F"]:"findPersistent","Cmd-G":"findPersistent","Ctrl-G":"findPersistent","Ctrl-Left":"goSubwordLeft","Ctrl-Right":"goSubwordRight","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight"};async function U6(u,e){const t=await Te(()=>import("./codemirror.es-52e8b92d.js"),["./codemirror.es-52e8b92d.js","./codemirror.es2-5884f31a.js"],import.meta.url).then(n=>n.c).then(n=>typeof n=="function"?n:n.default);return await Promise.all((e==null?void 0:e.useCommonAddons)===!1?u:[Te(()=>import("./show-hint.es-b981493e.js"),["./show-hint.es-b981493e.js","./codemirror.es2-5884f31a.js"],import.meta.url).then(n=>n.s),Te(()=>import("./matchbrackets.es-97d2e827.js"),["./matchbrackets.es-97d2e827.js","./codemirror.es2-5884f31a.js","./matchbrackets.es2-f53f57e6.js"],import.meta.url).then(n=>n.m),Te(()=>import("./closebrackets.es-e969742b.js"),["./closebrackets.es-e969742b.js","./codemirror.es2-5884f31a.js"],import.meta.url).then(n=>n.c),Te(()=>import("./brace-fold.es-f2e3735d.js"),["./brace-fold.es-f2e3735d.js","./codemirror.es2-5884f31a.js"],import.meta.url).then(n=>n.b),Te(()=>import("./foldgutter.es-b6cee46a.js"),["./foldgutter.es-b6cee46a.js","./codemirror.es2-5884f31a.js"],import.meta.url).then(n=>n.f),Te(()=>import("./lint.es-fe7166bb.js"),["./lint.es-fe7166bb.js","./codemirror.es2-5884f31a.js"],import.meta.url).then(n=>n.l),Te(()=>import("./searchcursor.es-b1a352a2.js"),["./searchcursor.es-b1a352a2.js","./codemirror.es2-5884f31a.js","./searchcursor.es2-cbfe7cae.js"],import.meta.url).then(n=>n.s),Te(()=>import("./jump-to-line.es-d901ea33.js"),["./jump-to-line.es-d901ea33.js","./codemirror.es2-5884f31a.js","./dialog.es2-02b3b4e7.js"],import.meta.url).then(n=>n.j),Te(()=>import("./dialog.es-dffe62e7.js"),["./dialog.es-dffe62e7.js","./codemirror.es2-5884f31a.js","./dialog.es2-02b3b4e7.js"],import.meta.url).then(n=>n.d),Te(()=>import("./sublime.es-e2a3eb60.js"),["./sublime.es-e2a3eb60.js","./codemirror.es2-5884f31a.js","./searchcursor.es2-cbfe7cae.js","./matchbrackets.es2-f53f57e6.js"],import.meta.url).then(n=>n.s),...u]),t}Fe(U6,"importCodeMirror");const ORu=Fe(u=>u?u0(u):"","printDefault");function Vie({field:u}){if(!("defaultValue"in u)||u.defaultValue===void 0)return null;const e=U5(u.defaultValue,u.type);return e?B.jsxs(B.Fragment,{children:[" = ",B.jsx("span",{className:"graphiql-doc-explorer-default-value",children:ORu(e)})]}):null}Fe(Vie,"DefaultValue");const iIe=Mg("SchemaContext");function $ie(u){if(!u.fetcher)throw new TypeError("The `SchemaContextProvider` component requires a `fetcher` function to be passed as prop.");const{initialHeaders:e,headerEditor:t}=Ko({nonNull:!0,caller:$ie}),[n,i]=C.useState(),[r,a]=C.useState(!1),[o,s]=C.useState(null),l=C.useRef(0);C.useEffect(()=>{i(UZ(u.schema)||u.schema===null||u.schema===void 0?u.schema:void 0),l.current++},[u.schema]);const c=C.useRef(e);C.useEffect(()=>{t&&(c.current=t.getValue())});const{introspectionQuery:d,introspectionQueryName:h,introspectionQuerySansSubscriptions:E}=rIe({inputValueDeprecation:u.inputValueDeprecation,introspectionQueryName:u.introspectionQueryName,schemaDescription:u.schemaDescription}),{fetcher:m,onSchemaChange:g,dangerouslyAssumeSchemaIsValid:f,children:p}=u,D=C.useCallback(()=>{if(UZ(u.schema)||u.schema===null)return;const k=++l.current,A=u.schema;async function F(){if(A)return A;const S=aIe(c.current);if(!S.isValidJSON){s("Introspection failed as headers are invalid.");return}const w=S.headers?{headers:S.headers}:{},z=Tfe(m({query:d,operationName:h},w));if(!Mfe(z)){s("Fetcher did not return a Promise for introspection.");return}a(!0),s(null);let N=await z;if(typeof N!="object"||N===null||!("data"in N)){const y=Tfe(m({query:E,operationName:h},w));if(!Mfe(y))throw new Error("Fetcher did not return a Promise for introspection.");N=await y}if(a(!1),N!=null&&N.data&&"__schema"in N.data)return N.data;const O=typeof N=="string"?N:uY(N);s(O)}Fe(F,"fetchIntrospectionData"),F().then(S=>{if(!(k!==l.current||!S))try{const w=MWt(S);i(w),g==null||g(w)}catch(w){s(vy(w))}}).catch(S=>{k===l.current&&(s(vy(S)),a(!1))})},[m,h,d,E,g,u.schema]);C.useEffect(()=>{D()},[D]),C.useEffect(()=>{function k(A){A.ctrlKey&&A.key==="R"&&D()}return Fe(k,"triggerIntrospection"),window.addEventListener("keydown",k),()=>window.removeEventListener("keydown",k)});const x=C.useMemo(()=>!n||f?[]:lTe(n),[n,f]),b=C.useMemo(()=>({fetchError:o,introspect:D,isFetching:r,schema:n,validationErrors:x}),[o,D,r,n,x]);return B.jsx(iIe.Provider,{value:b,children:p})}Fe($ie,"SchemaContextProvider");const X1=Tg(iIe);function rIe({inputValueDeprecation:u,introspectionQueryName:e,schemaDescription:t}){return C.useMemo(()=>{const n=e||"IntrospectionQuery";let i=zWt({inputValueDeprecation:u,schemaDescription:t});e&&(i=i.replace("query IntrospectionQuery",`query ${n}`));const r=i.replace("subscriptionType { name }","");return{introspectionQueryName:n,introspectionQuery:i,introspectionQuerySansSubscriptions:r}},[u,e,t])}Fe(rIe,"useIntrospectionQuery");function aIe(u){let e=null,t=!0;try{u&&(e=JSON.parse(u))}catch{t=!1}return{headers:e,isValidJSON:t}}Fe(aIe,"parseHeaderString");const kS={name:"Docs"},oIe=Mg("ExplorerContext");function Kie(u){const{schema:e,validationErrors:t}=X1({nonNull:!0,caller:Kie}),[n,i]=C.useState([kS]),r=C.useCallback(l=>{i(c=>c.at(-1).def===l.def?c:[...c,l])},[]),a=C.useCallback(()=>{i(l=>l.length>1?l.slice(0,-1):l)},[]),o=C.useCallback(()=>{i(l=>l.length===1?l:[kS])},[]);C.useEffect(()=>{e==null||t.length>0?o():i(l=>{if(l.length===1)return l;const c=[kS];let d=null;for(const h of l)if(h!==kS)if(h.def)if(Rne(h.def)){const E=e.getType(h.def.name);if(E)c.push({name:h.name,def:E}),d=E;else break}else{if(d===null)break;if(qi(d)||jo(d)){const E=d.getFields()[h.name];if(E)c.push({name:h.name,def:E});else break}else{if(wg(d)||$0(d)||Ji(d)||Il(d))break;{const E=d;if(E.args.find(m=>m.name===h.name))c.push({name:h.name,def:E});else break}}}else d=null,c.push(h);return c})},[o,e,t]);const s=C.useMemo(()=>({explorerNavStack:n,push:r,pop:a,reset:o}),[n,r,a,o]);return B.jsx(oIe.Provider,{value:s,children:u.children})}Fe(Kie,"ExplorerContextProvider");const Pg=Tg(oIe);function Ny(u,e){return Mr(u)?B.jsxs(B.Fragment,{children:[Ny(u.ofType,e),"!"]}):ms(u)?B.jsxs(B.Fragment,{children:["[",Ny(u.ofType,e),"]"]}):e(u)}Fe(Ny,"renderType");function Rc(u){const{push:e}=Pg({nonNull:!0,caller:Rc});return u.type?Ny(u.type,t=>B.jsx("a",{className:"graphiql-doc-explorer-type-name",onClick:n=>{n.preventDefault(),e({name:t.name,def:t})},href:"#",children:t.name})):null}Fe(Rc,"TypeLink");function Py({arg:u,showDefaultValue:e,inline:t}){const n=B.jsxs("span",{children:[B.jsx("span",{className:"graphiql-doc-explorer-argument-name",children:u.name}),": ",B.jsx(Rc,{type:u.type}),e!==!1&&B.jsx(Vie,{field:u})]});return t?n:B.jsxs("div",{className:"graphiql-doc-explorer-argument",children:[n,u.description?B.jsx(V1,{type:"description",children:u.description}):null,u.deprecationReason?B.jsxs("div",{className:"graphiql-doc-explorer-argument-deprecation",children:[B.jsx("div",{className:"graphiql-doc-explorer-argument-deprecation-label",children:"Deprecated"}),B.jsx(V1,{type:"deprecation",children:u.deprecationReason})]}):null]})}Fe(Py,"Argument");function Wie(u){return u.children?B.jsxs("div",{className:"graphiql-doc-explorer-deprecation",children:[B.jsx("div",{className:"graphiql-doc-explorer-deprecation-label",children:"Deprecated"}),B.jsx(V1,{type:"deprecation",onlyShowFirstChild:u.preview??!0,children:u.children})]}):null}Fe(Wie,"DeprecationReason");function sIe({directive:u}){return B.jsxs("span",{className:"graphiql-doc-explorer-directive",children:["@",u.name.value]})}Fe(sIe,"Directive");function K0(u){const e=jRu[u.title];return B.jsxs("div",{children:[B.jsxs("div",{className:"graphiql-doc-explorer-section-title",children:[B.jsx(e,{}),u.title]}),B.jsx("div",{className:"graphiql-doc-explorer-section-content",children:u.children})]})}Fe(K0,"ExplorerSection");const jRu={Arguments:sRu,"Deprecated Arguments":ERu,"Deprecated Enum Values":mRu,"Deprecated Fields":gRu,Directives:fRu,"Enum Values":xRu,Fields:vRu,Implements:bRu,Implementations:bS,"Possible Types":bS,"Root Types":LRu,Type:bS,"All Schema Types":bS};function lIe(u){return B.jsxs(B.Fragment,{children:[u.field.description?B.jsx(V1,{type:"description",children:u.field.description}):null,B.jsx(Wie,{preview:!1,children:u.field.deprecationReason}),B.jsx(K0,{title:"Type",children:B.jsx(Rc,{type:u.field.type})}),B.jsx(cIe,{field:u.field}),B.jsx(dIe,{field:u.field})]})}Fe(lIe,"FieldDocumentation");function cIe({field:u}){const[e,t]=C.useState(!1),n=C.useCallback(()=>{t(!0)},[]);if(!("args"in u))return null;const i=[],r=[];for(const a of u.args)a.deprecationReason?r.push(a):i.push(a);return B.jsxs(B.Fragment,{children:[i.length>0?B.jsx(K0,{title:"Arguments",children:i.map(a=>B.jsx(Py,{arg:a},a.name))}):null,r.length>0?e||i.length===0?B.jsx(K0,{title:"Deprecated Arguments",children:r.map(a=>B.jsx(Py,{arg:a},a.name))}):B.jsx(Ac,{type:"button",onClick:n,children:"Show Deprecated Arguments"}):null]})}Fe(cIe,"Arguments");function dIe({field:u}){var e;const t=((e=u.astNode)==null?void 0:e.directives)||[];return!t||t.length===0?null:B.jsx(K0,{title:"Directives",children:t.map(n=>B.jsx("div",{children:B.jsx(sIe,{directive:n})},n.name.value))})}Fe(dIe,"Directives");function hIe(u){var e,t,n,i;const r=u.schema.getQueryType(),a=(t=(e=u.schema).getMutationType)==null?void 0:t.call(e),o=(i=(n=u.schema).getSubscriptionType)==null?void 0:i.call(n),s=u.schema.getTypeMap(),l=[r==null?void 0:r.name,a==null?void 0:a.name,o==null?void 0:o.name];return B.jsxs(B.Fragment,{children:[B.jsx(V1,{type:"description",children:u.schema.description||"A GraphQL schema provides a root type for each kind of operation."}),B.jsxs(K0,{title:"Root Types",children:[r?B.jsxs("div",{children:[B.jsx("span",{className:"graphiql-doc-explorer-root-type",children:"query"}),": ",B.jsx(Rc,{type:r})]}):null,a&&B.jsxs("div",{children:[B.jsx("span",{className:"graphiql-doc-explorer-root-type",children:"mutation"}),": ",B.jsx(Rc,{type:a})]}),o&&B.jsxs("div",{children:[B.jsx("span",{className:"graphiql-doc-explorer-root-type",children:"subscription"}),": ",B.jsx(Rc,{type:o})]})]}),B.jsx(K0,{title:"All Schema Types",children:s&&B.jsx("div",{children:Object.values(s).map(c=>l.includes(c.name)||c.name.startsWith("__")?null:B.jsx("div",{children:B.jsx(Rc,{type:c})},c.name))})})]})}Fe(hIe,"SchemaDocumentation");function Cp(u,e){let t;return function(...n){t&&window.clearTimeout(t),t=window.setTimeout(()=>{t=null,e(...n)},u)}}Fe(Cp,"debounce");function Gie(){const{explorerNavStack:u,push:e}=Pg({nonNull:!0,caller:Gie}),t=C.useRef(null),n=QT(),[i,r]=C.useState(""),[a,o]=C.useState(n(i)),s=C.useMemo(()=>Cp(200,E=>{o(n(E))}),[n]);C.useEffect(()=>{s(i)},[s,i]),C.useEffect(()=>{function E(m){var g;m.metaKey&&m.key==="k"&&((g=t.current)==null||g.focus())}return Fe(E,"handleKeyDown"),window.addEventListener("keydown",E),()=>window.removeEventListener("keydown",E)},[]);const l=u.at(-1),c=C.useCallback(E=>{e("field"in E?{name:E.field.name,def:E.field}:{name:E.type.name,def:E.type})},[e]),d=C.useRef(!1),h=C.useCallback(E=>{d.current=E.type==="focus"},[]);return u.length===1||qi(l.def)||Ji(l.def)||jo(l.def)?B.jsxs(HD,{as:"div",className:"graphiql-doc-explorer-search",onChange:c,"data-state":d?void 0:"idle","aria-label":`Search ${l.name}...`,children:[B.jsxs("div",{className:"graphiql-doc-explorer-search-input",onClick:()=>{var E;(E=t.current)==null||E.focus()},children:[B.jsx(FRu,{}),B.jsx(HD.Input,{autoComplete:"off",onFocus:h,onBlur:h,onChange:E=>r(E.target.value),placeholder:"⌘ K",ref:t,value:i,"data-cy":"doc-explorer-input"})]}),d.current&&B.jsxs(HD.Options,{"data-cy":"doc-explorer-list",children:[a.within.length+a.types.length+a.fields.length===0?B.jsx("li",{className:"graphiql-doc-explorer-search-empty",children:"No results found"}):a.within.map((E,m)=>B.jsx(HD.Option,{value:E,"data-cy":"doc-explorer-option",children:B.jsx(WY,{field:E.field,argument:E.argument})},`within-${m}`)),a.within.length>0&&a.types.length+a.fields.length>0?B.jsx("div",{className:"graphiql-doc-explorer-search-divider",children:"Other results"}):null,a.types.map((E,m)=>B.jsx(HD.Option,{value:E,"data-cy":"doc-explorer-option",children:B.jsx(XT,{type:E.type})},`type-${m}`)),a.fields.map((E,m)=>B.jsxs(HD.Option,{value:E,"data-cy":"doc-explorer-option",children:[B.jsx(XT,{type:E.type}),".",B.jsx(WY,{field:E.field,argument:E.argument})]},`field-${m}`))]})]}):null}Fe(Gie,"Search");function QT(u){const{explorerNavStack:e}=Pg({nonNull:!0,caller:u||QT}),{schema:t}=X1({nonNull:!0,caller:u||QT}),n=e.at(-1);return C.useCallback(i=>{const r={within:[],types:[],fields:[]};if(!t)return r;const a=n.def,o=t.getTypeMap();let s=Object.keys(o);a&&(s=s.filter(l=>l!==a.name),s.unshift(a.name));for(const l of s){if(r.within.length+r.types.length+r.fields.length>=100)break;const c=o[l];if(a!==c&&Q8(l,i)&&r.types.push({type:c}),!qi(c)&&!Ji(c)&&!jo(c))continue;const d=c.getFields();for(const h in d){const E=d[h];let m;if(!Q8(h,i))if("args"in E){if(m=E.args.filter(g=>Q8(g.name,i)),m.length===0)continue}else continue;r[a===c?"within":"fields"].push(...m?m.map(g=>({type:c,field:E,argument:g})):[{type:c,field:E}])}}return r},[n.def,t])}Fe(QT,"useSearchResults");function Q8(u,e){try{const t=e.replaceAll(/[^_0-9A-Za-z]/g,n=>"\\"+n);return u.search(new RegExp(t,"i"))!==-1}catch{return u.toLowerCase().includes(e.toLowerCase())}}Fe(Q8,"isMatch");function XT(u){return B.jsx("span",{className:"graphiql-doc-explorer-search-type",children:u.type.name})}Fe(XT,"Type");function WY({field:u,argument:e}){return B.jsxs(B.Fragment,{children:[B.jsx("span",{className:"graphiql-doc-explorer-search-field",children:u.name}),e?B.jsxs(B.Fragment,{children:["(",B.jsx("span",{className:"graphiql-doc-explorer-search-argument",children:e.name}),":"," ",Ny(e.type,t=>B.jsx(XT,{type:t})),")"]}):null]})}Fe(WY,"Field$1");function EIe(u){const{push:e}=Pg({nonNull:!0});return B.jsx("a",{className:"graphiql-doc-explorer-field-name",onClick:t=>{t.preventDefault(),e({name:u.field.name,def:u.field})},href:"#",children:u.field.name})}Fe(EIe,"FieldLink");function mIe(u){return Rne(u.type)?B.jsxs(B.Fragment,{children:[u.type.description?B.jsx(V1,{type:"description",children:u.type.description}):null,B.jsx(gIe,{type:u.type}),B.jsx(fIe,{type:u.type}),B.jsx(pIe,{type:u.type}),B.jsx(DIe,{type:u.type})]}):null}Fe(mIe,"TypeDocumentation");function gIe({type:u}){return qi(u)&&u.getInterfaces().length>0?B.jsx(K0,{title:"Implements",children:u.getInterfaces().map(e=>B.jsx("div",{children:B.jsx(Rc,{type:e})},e.name))}):null}Fe(gIe,"ImplementsInterfaces");function fIe({type:u}){const[e,t]=C.useState(!1),n=C.useCallback(()=>{t(!0)},[]);if(!qi(u)&&!Ji(u)&&!jo(u))return null;const i=u.getFields(),r=[],a=[];for(const o of Object.keys(i).map(s=>i[s]))o.deprecationReason?a.push(o):r.push(o);return B.jsxs(B.Fragment,{children:[r.length>0?B.jsx(K0,{title:"Fields",children:r.map(o=>B.jsx(GY,{field:o},o.name))}):null,a.length>0?e||r.length===0?B.jsx(K0,{title:"Deprecated Fields",children:a.map(o=>B.jsx(GY,{field:o},o.name))}):B.jsx(Ac,{type:"button",onClick:n,children:"Show Deprecated Fields"}):null]})}Fe(fIe,"Fields");function GY({field:u}){const e="args"in u?u.args.filter(t=>!t.deprecationReason):[];return B.jsxs("div",{className:"graphiql-doc-explorer-item",children:[B.jsxs("div",{children:[B.jsx(EIe,{field:u}),e.length>0?B.jsxs(B.Fragment,{children:["(",B.jsx("span",{children:e.map(t=>e.length===1?B.jsx(Py,{arg:t,inline:!0},t.name):B.jsx("div",{className:"graphiql-doc-explorer-argument-multiple",children:B.jsx(Py,{arg:t,inline:!0})},t.name))}),")"]}):null,": ",B.jsx(Rc,{type:u.type}),B.jsx(Vie,{field:u})]}),u.description?B.jsx(V1,{type:"description",onlyShowFirstChild:!0,children:u.description}):null,B.jsx(Wie,{children:u.deprecationReason})]})}Fe(GY,"Field");function pIe({type:u}){const[e,t]=C.useState(!1),n=C.useCallback(()=>{t(!0)},[]);if(!$0(u))return null;const i=[],r=[];for(const a of u.getValues())a.deprecationReason?r.push(a):i.push(a);return B.jsxs(B.Fragment,{children:[i.length>0?B.jsx(K0,{title:"Enum Values",children:i.map(a=>B.jsx(UY,{value:a},a.name))}):null,r.length>0?e||i.length===0?B.jsx(K0,{title:"Deprecated Enum Values",children:r.map(a=>B.jsx(UY,{value:a},a.name))}):B.jsx(Ac,{type:"button",onClick:n,children:"Show Deprecated Values"}):null]})}Fe(pIe,"EnumValues");function UY({value:u}){return B.jsxs("div",{className:"graphiql-doc-explorer-item",children:[B.jsx("div",{className:"graphiql-doc-explorer-enum-value",children:u.name}),u.description?B.jsx(V1,{type:"description",children:u.description}):null,u.deprecationReason?B.jsx(V1,{type:"deprecation",children:u.deprecationReason}):null]})}Fe(UY,"EnumValue");function DIe({type:u}){const{schema:e}=X1({nonNull:!0});return!e||!_m(u)?null:B.jsx(K0,{title:Ji(u)?"Implementations":"Possible Types",children:e.getPossibleTypes(u).map(t=>B.jsx("div",{children:B.jsx(Rc,{type:t})},t.name))})}Fe(DIe,"PossibleTypes");function eN(){const{fetchError:u,isFetching:e,schema:t,validationErrors:n}=X1({nonNull:!0,caller:eN}),{explorerNavStack:i,pop:r}=Pg({nonNull:!0,caller:eN}),a=i.at(-1);let o=null;u?o=B.jsx("div",{className:"graphiql-doc-explorer-error",children:"Error fetching schema"}):n.length>0?o=B.jsxs("div",{className:"graphiql-doc-explorer-error",children:["Schema is invalid: ",n[0].message]}):e?o=B.jsx(Hie,{}):t?i.length===1?o=B.jsx(hIe,{schema:t}):Nne(a.def)?o=B.jsx(mIe,{type:a.def}):a.def&&(o=B.jsx(lIe,{field:a.def})):o=B.jsx("div",{className:"graphiql-doc-explorer-error",children:"No GraphQL schema available"});let s;return i.length>1&&(s=i.at(-2).name),B.jsxs("section",{className:"graphiql-doc-explorer","aria-label":"Documentation Explorer",children:[B.jsxs("div",{className:"graphiql-doc-explorer-header",children:[B.jsxs("div",{className:"graphiql-doc-explorer-header-content",children:[s&&B.jsxs("a",{href:"#",className:"graphiql-doc-explorer-back",onClick:l=>{l.preventDefault(),r()},"aria-label":`Go back to ${s}`,children:[B.jsx(cRu,{}),s]}),B.jsx("div",{className:"graphiql-doc-explorer-title",children:a.name})]}),B.jsx(Gie,{},a.name)]}),B.jsx("div",{className:"graphiql-doc-explorer-content",children:o})]})}Fe(eN,"DocExplorer");const Ry={title:"Documentation Explorer",icon:Fe(function(){const u=AO();return(u==null?void 0:u.visiblePlugin)===Ry?B.jsx(pRu,{}):B.jsx(DRu,{})},"Icon"),content:eN},ZDe={title:"History",icon:CRu,content:eIe},xIe=Mg("PluginContext");function vIe(u){const e=Ng(),t=Pg(),n=bO(),i=!!t,r=!!n,a=C.useMemo(()=>{const E=[],m={};i&&(E.push(Ry),m[Ry.title]=!0),r&&(E.push(ZDe),m[ZDe.title]=!0);for(const g of u.plugins||[]){if(typeof g.title!="string"||!g.title)throw new Error("All GraphiQL plugins must have a unique title");if(m[g.title])throw new Error(`All GraphiQL plugins must have a unique title, found two plugins with the title '${g.title}'`);E.push(g),m[g.title]=!0}return E},[i,r,u.plugins]),[o,s]=C.useState(()=>{const E=e==null?void 0:e.get(YDe);return a.find(g=>g.title===E)||(E&&(e==null||e.set(YDe,"")),u.visiblePlugin&&a.find(g=>(typeof u.visiblePlugin=="string"?g.title:g)===u.visiblePlugin)||null)}),{onTogglePluginVisibility:l,children:c}=u,d=C.useCallback(E=>{const m=E&&a.find(g=>(typeof E=="string"?g.title:g)===E)||null;s(g=>m===g?g:(l==null||l(m),m))},[l,a]);C.useEffect(()=>{u.visiblePlugin&&d(u.visiblePlugin)},[a,u.visiblePlugin,d]);const h=C.useMemo(()=>({plugins:a,setVisiblePlugin:d,visiblePlugin:o}),[a,d,o]);return B.jsx(xIe.Provider,{value:h,children:c})}Fe(vIe,"PluginContextProvider");const AO=Tg(xIe),YDe="visiblePlugin";function CIe(u,e,t,n,i,r){U6([],{useCommonAddons:!1}).then(o=>{let s,l,c,d,h,E,m,g,f;o.on(e,"select",(p,D)=>{if(!s){const x=D.parentNode;s=document.createElement("div"),s.className="CodeMirror-hint-information",x.append(s);const b=document.createElement("header");b.className="CodeMirror-hint-information-header",s.append(b),l=document.createElement("span"),l.className="CodeMirror-hint-information-field-name",b.append(l),c=document.createElement("span"),c.className="CodeMirror-hint-information-type-name-pill",b.append(c),d=document.createElement("span"),c.append(d),h=document.createElement("a"),h.className="CodeMirror-hint-information-type-name",h.href="javascript:void 0",h.addEventListener("click",a),c.append(h),E=document.createElement("span"),c.append(E),m=document.createElement("div"),m.className="CodeMirror-hint-information-description",s.append(m),g=document.createElement("div"),g.className="CodeMirror-hint-information-deprecation",s.append(g);const k=document.createElement("span");k.className="CodeMirror-hint-information-deprecation-label",k.textContent="Deprecated",g.append(k),f=document.createElement("div"),f.className="CodeMirror-hint-information-deprecation-reason",g.append(f);const A=parseInt(window.getComputedStyle(s).paddingBottom.replace(/px$/,""),10)||0,F=parseInt(window.getComputedStyle(s).maxHeight.replace(/px$/,""),10)||0,S=Fe(()=>{s&&(s.style.paddingTop=x.scrollTop+A+"px",s.style.maxHeight=x.scrollTop+F+"px")},"handleScroll");x.addEventListener("scroll",S);let w;x.addEventListener("DOMNodeRemoved",w=Fe(z=>{z.target===x&&(x.removeEventListener("scroll",S),x.removeEventListener("DOMNodeRemoved",w),s&&s.removeEventListener("click",a),s=null,l=null,c=null,d=null,h=null,E=null,m=null,g=null,f=null,w=null)},"onRemoveFn"))}if(l&&(l.textContent=p.text),c&&d&&h&&E)if(p.type){c.style.display="inline";const x=Fe(b=>{Mr(b)?(E.textContent="!"+E.textContent,x(b.ofType)):ms(b)?(d.textContent+="[",E.textContent="]"+E.textContent,x(b.ofType)):h.textContent=b.name},"renderType");d.textContent="",E.textContent="",x(p.type)}else d.textContent="",h.textContent="",E.textContent="",c.style.display="none";m&&(p.description?(m.style.display="block",m.innerHTML=ZT.render(p.description)):(m.style.display="none",m.innerHTML="")),g&&f&&(p.deprecationReason?(g.style.display="block",f.innerHTML=ZT.render(p.deprecationReason)):(g.style.display="none",f.innerHTML=""))})});function a(o){if(!t||!n||!i||!(o.currentTarget instanceof HTMLElement))return;const s=o.currentTarget.textContent||"",l=t.getType(s);l&&(i.setVisiblePlugin(Ry),n.push({name:l.name,def:l}),r==null||r(l))}Fe(a,"onClickHintInformation")}Fe(CIe,"onHasCompletion");function $b(u,e){C.useEffect(()=>{u&&typeof e=="string"&&e!==u.getValue()&&u.setValue(e)},[u,e])}Fe($b,"useSynchronizeValue");function S7(u,e,t){C.useEffect(()=>{u&&u.setOption(e,t)},[u,e,t])}Fe(S7,"useSynchronizeOption");function Uie(u,e,t,n,i){const{updateActiveTabValues:r}=Ko({nonNull:!0,caller:i}),a=Ng();C.useEffect(()=>{if(!u)return;const o=Cp(500,c=>{!a||t===null||a.set(t,c)}),s=Cp(100,c=>{r({[n]:c})}),l=Fe((c,d)=>{if(!d)return;const h=c.getValue();o(h),s(h),e==null||e(h)},"handleChange");return u.on("change",l),()=>u.off("change",l)},[e,u,a,t,n,r])}Fe(Uie,"useChangeHandler");function qie(u,e,t){const{schema:n}=X1({nonNull:!0,caller:t}),i=Pg(),r=AO();C.useEffect(()=>{if(!u)return;const a=Fe((o,s)=>{CIe(o,s,n,i,r,l=>{e==null||e({kind:"Type",type:l,schema:n||void 0})})},"handleCompletion");return u.on("hasCompletion",a),()=>u.off("hasCompletion",a)},[e,u,i,r,n])}Fe(qie,"useCompletion");function Ic(u,e,t){C.useEffect(()=>{if(u){for(const n of e)u.removeKeyMap(n);if(t){const n={};for(const i of e)n[i]=()=>t();u.addKeyMap(n)}}},[u,e,t])}Fe(Ic,"useKeyMap");function _O({caller:u,onCopyQuery:e}={}){const{queryEditor:t}=Ko({nonNull:!0,caller:u||_O});return C.useCallback(()=>{if(!t)return;const n=t.getValue();WJt(n),e==null||e(n)},[t,e])}Fe(_O,"useCopyQuery");function bp({caller:u}={}){const{queryEditor:e}=Ko({nonNull:!0,caller:u||bp}),{schema:t}=X1({nonNull:!0,caller:bp});return C.useCallback(()=>{const n=e==null?void 0:e.documentAST,i=e==null?void 0:e.getValue();!n||!i||e.setValue(u0(Nqt(n,t)))},[e,t])}Fe(bp,"useMergeQuery");function q6({caller:u}={}){const{queryEditor:e,headerEditor:t,variableEditor:n}=Ko({nonNull:!0,caller:u||q6});return C.useCallback(()=>{if(n){const i=n.getValue();try{const r=JSON.stringify(JSON.parse(i),null,2);r!==i&&n.setValue(r)}catch{}}if(t){const i=t.getValue();try{const r=JSON.stringify(JSON.parse(i),null,2);r!==i&&t.setValue(r)}catch{}}if(e){const i=e.getValue(),r=u0(Bg(i));r!==i&&e.setValue(r)}},[e,n,t])}Fe(q6,"usePrettifyEditors");function tN({getDefaultFieldNames:u,caller:e}={}){const{schema:t}=X1({nonNull:!0,caller:e||tN}),{queryEditor:n}=Ko({nonNull:!0,caller:e||tN});return C.useCallback(()=>{if(!n)return;const i=n.getValue(),{insertions:r,result:a}=Bqt(t,i,u);return r&&r.length>0&&n.operation(()=>{const o=n.getCursor(),s=n.indexFromPos(o);n.setValue(a||"");let l=0;const c=r.map(({index:h,string:E})=>n.markText(n.posFromIndex(h+l),n.posFromIndex(h+(l+=E.length)),{className:"auto-inserted-leaf",clearOnEnter:!0,title:"Automatically added leaf fields"}));setTimeout(()=>{for(const h of c)h.clear()},7e3);let d=s;for(const{index:h,string:E}of r)h{let E=!0;return U6([Te(()=>import("./javascript.es-3c6957c5.js"),["./javascript.es-3c6957c5.js","./codemirror.es2-5884f31a.js"],import.meta.url).then(m=>m.j)]).then(m=>{if(!E)return;const g=h.current;if(!g)return;const f=m(g,{value:r,lineNumbers:!0,tabSize:2,mode:{name:"javascript",json:!0},theme:u,autoCloseBrackets:!0,matchBrackets:!0,showCursorWhenSelecting:!0,readOnly:n?"nocursor":!1,foldGutter:!0,gutters:["CodeMirror-linenumbers","CodeMirror-foldgutter"],extraKeys:yO});f.addKeyMap({"Cmd-Space"(){f.showHint({completeSingle:!1,container:g})},"Ctrl-Space"(){f.showHint({completeSingle:!1,container:g})},"Alt-Space"(){f.showHint({completeSingle:!1,container:g})},"Shift-Space"(){f.showHint({completeSingle:!1,container:g})}}),f.on("keyup",(p,D)=>{const{code:x,key:b,shiftKey:k}=D,A=x.startsWith("Key"),F=!k&&x.startsWith("Digit");(A||F||b==="_"||b==='"')&&p.execCommand("autocomplete")}),o(f)}),()=>{E=!1}},[u,r,n,o]),S7(a,"keyMap",e),Uie(a,t,s?X8:null,"headers",Z5),Ic(a,["Cmd-Enter","Ctrl-Enter"],l==null?void 0:l.run),Ic(a,["Shift-Ctrl-P"],d),Ic(a,["Shift-Ctrl-M"],c),h}Fe(Z5,"useHeaderEditor");const X8="headers",HRu=Array.from({length:11},(u,e)=>String.fromCharCode(8192+e)).concat(["\u2028","\u2029"," "," "]),VRu=new RegExp("["+HRu.join("")+"]","g");function bIe(u){return u.replace(VRu," ")}Fe(bIe,"normalizeWhitespace");function pE({editorTheme:u=kO,keyMap:e=FO,onClickReference:t,onCopyQuery:n,onEdit:i,readOnly:r=!1}={},a){const{schema:o}=X1({nonNull:!0,caller:a||pE}),{externalFragments:s,initialQuery:l,queryEditor:c,setOperationName:d,setQueryEditor:h,validationRules:E,variableEditor:m,updateActiveTabValues:g}=Ko({nonNull:!0,caller:a||pE}),f=_7(),p=Ng(),D=Pg(),x=AO(),b=_O({caller:a||pE,onCopyQuery:n}),k=bp({caller:a||pE}),A=q6({caller:a||pE}),F=C.useRef(null),S=C.useRef(),w=C.useRef(()=>{});C.useEffect(()=>{w.current=O=>{if(!(!D||!x)){switch(x.setVisiblePlugin(Ry),O.kind){case"Type":{D.push({name:O.type.name,def:O.type});break}case"Field":{D.push({name:O.field.name,def:O.field});break}case"Argument":{O.field&&D.push({name:O.field.name,def:O.field});break}case"EnumValue":{O.type&&D.push({name:O.type.name,def:O.type});break}}t==null||t(O)}}},[D,t,x]),C.useEffect(()=>{let O=!0;return U6([Te(()=>import("./comment.es-39699bae.js"),["./comment.es-39699bae.js","./codemirror.es2-5884f31a.js"],import.meta.url).then(y=>y.c),Te(()=>import("./search.es-1c15f5ea.js"),["./search.es-1c15f5ea.js","./codemirror.es2-5884f31a.js","./searchcursor.es2-cbfe7cae.js","./dialog.es2-02b3b4e7.js"],import.meta.url).then(y=>y.s),Te(()=>import("./hint.es-ba4ca906.js"),["./hint.es-ba4ca906.js","./codemirror.es-52e8b92d.js","./codemirror.es2-5884f31a.js","./show-hint.es-b981493e.js","./Range-52ddcb6a.js"],import.meta.url),Te(()=>import("./lint.es2-6f9142d2.js"),["./lint.es2-6f9142d2.js","./codemirror.es-52e8b92d.js","./codemirror.es2-5884f31a.js","./Range-52ddcb6a.js"],import.meta.url),Te(()=>import("./info.es-bd2a11c8.js"),["./info.es-bd2a11c8.js","./codemirror.es-52e8b92d.js","./codemirror.es2-5884f31a.js","./SchemaReference.es-fa096cc0.js","./forEachState.es-b2033c2b.js","./info-addon.es-c9b2027b.js"],import.meta.url),Te(()=>import("./jump.es-d1be1961.js"),["./jump.es-d1be1961.js","./codemirror.es-52e8b92d.js","./codemirror.es2-5884f31a.js","./SchemaReference.es-fa096cc0.js","./forEachState.es-b2033c2b.js"],import.meta.url),Te(()=>import("./mode.es-cb4af5fb.js"),["./mode.es-cb4af5fb.js","./codemirror.es-52e8b92d.js","./codemirror.es2-5884f31a.js","./mode-indent.es-057a4f6a.js"],import.meta.url)]).then(y=>{if(!O)return;S.current=y;const _=F.current;if(!_)return;const L=y(_,{value:l,lineNumbers:!0,tabSize:2,foldGutter:!0,mode:"graphql",theme:u,autoCloseBrackets:!0,matchBrackets:!0,showCursorWhenSelecting:!0,readOnly:r?"nocursor":!1,lint:{schema:void 0,validationRules:null,externalFragments:void 0},hintOptions:{schema:void 0,closeOnUnfocus:!1,completeSingle:!1,container:_,externalFragments:void 0},info:{schema:void 0,renderDescription:R=>ZT.render(R),onClick(R){w.current(R)}},jump:{schema:void 0,onClick(R){w.current(R)}},gutters:["CodeMirror-linenumbers","CodeMirror-foldgutter"],extraKeys:{...yO,"Cmd-S"(){},"Ctrl-S"(){}}});L.addKeyMap({"Cmd-Space"(){L.showHint({completeSingle:!0,container:_})},"Ctrl-Space"(){L.showHint({completeSingle:!0,container:_})},"Alt-Space"(){L.showHint({completeSingle:!0,container:_})},"Shift-Space"(){L.showHint({completeSingle:!0,container:_})},"Shift-Alt-Space"(){L.showHint({completeSingle:!0,container:_})}}),L.on("keyup",(R,I)=>{$Ru.test(I.key)&&R.execCommand("autocomplete")});let T=!1;L.on("startCompletion",()=>{T=!0}),L.on("endCompletion",()=>{T=!1}),L.on("keydown",(R,I)=>{I.key==="Escape"&&T&&I.stopPropagation()}),L.on("beforeChange",(R,I)=>{var H;if(I.origin==="paste"){const V=I.text.map(bIe);(H=I.update)==null||H.call(I,I.from,I.to,V)}}),L.documentAST=null,L.operationName=null,L.operations=null,L.variableToType=null,h(L)}),()=>{O=!1}},[u,l,r,h]),S7(c,"keyMap",e),C.useEffect(()=>{if(!c)return;function O(_){var L;const T=yJt(o,_.getValue()),R=Pqt(_.operations??void 0,_.operationName??void 0,T==null?void 0:T.operations);return _.documentAST=(T==null?void 0:T.documentAST)??null,_.operationName=R??null,_.operations=(T==null?void 0:T.operations)??null,m&&(m.state.lint.linterOptions.variableToType=T==null?void 0:T.variableToType,m.options.lint.variableToType=T==null?void 0:T.variableToType,m.options.hintOptions.variableToType=T==null?void 0:T.variableToType,(L=S.current)==null||L.signal(m,"change",m)),T?{...T,operationName:R}:null}Fe(O,"getAndUpdateOperationFacts");const y=Cp(100,_=>{const L=_.getValue();p==null||p.set(AIe,L);const T=_.operationName,R=O(_);(R==null?void 0:R.operationName)!==void 0&&(p==null||p.set(KRu,R.operationName)),i==null||i(L,R==null?void 0:R.documentAST),R!=null&&R.operationName&&T!==R.operationName&&d(R.operationName),g({query:L,operationName:(R==null?void 0:R.operationName)??null})});return O(c),c.on("change",y),()=>c.off("change",y)},[i,c,o,d,p,m,g]),kIe(c,o??null,S),FIe(c,E??null,S),yIe(c,s,S),qie(c,t||null,pE);const z=f==null?void 0:f.run,N=C.useCallback(()=>{var O;if(!z||!c||!c.operations||!c.hasFocus()){z==null||z();return}const y=c.indexFromPos(c.getCursor());let _;for(const L of c.operations)L.loc&&L.loc.start<=y&&L.loc.end>=y&&(_=(O=L.name)==null?void 0:O.value);_&&_!==c.operationName&&d(_),z()},[c,z,d]);return Ic(c,["Cmd-Enter","Ctrl-Enter"],N),Ic(c,["Shift-Ctrl-C"],b),Ic(c,["Shift-Ctrl-P","Shift-Ctrl-F"],A),Ic(c,["Shift-Ctrl-M"],k),F}Fe(pE,"useQueryEditor");function kIe(u,e,t){C.useEffect(()=>{if(!u)return;const n=u.options.lint.schema!==e;u.state.lint.linterOptions.schema=e,u.options.lint.schema=e,u.options.hintOptions.schema=e,u.options.info.schema=e,u.options.jump.schema=e,n&&t.current&&t.current.signal(u,"change",u)},[u,e,t])}Fe(kIe,"useSynchronizeSchema");function FIe(u,e,t){C.useEffect(()=>{if(!u)return;const n=u.options.lint.validationRules!==e;u.state.lint.linterOptions.validationRules=e,u.options.lint.validationRules=e,n&&t.current&&t.current.signal(u,"change",u)},[u,e,t])}Fe(FIe,"useSynchronizeValidationRules");function yIe(u,e,t){const n=C.useMemo(()=>[...e.values()],[e]);C.useEffect(()=>{if(!u)return;const i=u.options.lint.externalFragments!==n;u.state.lint.linterOptions.externalFragments=n,u.options.lint.externalFragments=n,u.options.hintOptions.externalFragments=n,i&&t.current&&t.current.signal(u,"change",u)},[u,n,t])}Fe(yIe,"useSynchronizeExternalFragments");const $Ru=/^[a-zA-Z0-9_@(]$/,AIe="query",KRu="operationName";function _Ie({defaultQuery:u,defaultHeaders:e,headers:t,defaultTabs:n,query:i,variables:r,storage:a,shouldPersistHeaders:o}){const s=a==null?void 0:a.get(Oy);try{if(!s)throw new Error("Storage for tabs is empty");const l=JSON.parse(s),c=o?t:void 0;if(SIe(l)){const d=Iy({query:i,variables:r,headers:c});let h=-1;for(let E=0;E=0)l.activeTabIndex=h;else{const E=i?SO(i):null;l.tabs.push({id:Qie(),hash:d,title:E||Xie,query:i,variables:r,headers:t,operationName:E,response:null}),l.activeTabIndex=l.tabs.length-1}return l}throw new Error("Storage for tabs is invalid")}catch{return{activeTabIndex:0,tabs:(n||[{query:i??u,variables:r,headers:t??e}]).map(Zie)}}}Fe(_Ie,"getDefaultTabState");function SIe(u){return u&&typeof u=="object"&&!Array.isArray(u)&&wIe(u,"activeTabIndex")&&"tabs"in u&&Array.isArray(u.tabs)&&u.tabs.every(BIe)}Fe(SIe,"isTabsState");function BIe(u){return u&&typeof u=="object"&&!Array.isArray(u)&&qY(u,"id")&&qY(u,"title")&&u5(u,"query")&&u5(u,"variables")&&u5(u,"headers")&&u5(u,"operationName")&&u5(u,"response")}Fe(BIe,"isTabState");function wIe(u,e){return e in u&&typeof u[e]=="number"}Fe(wIe,"hasNumberKey");function qY(u,e){return e in u&&typeof u[e]=="string"}Fe(qY,"hasStringKey");function u5(u,e){return e in u&&(typeof u[e]=="string"||u[e]===null)}Fe(u5,"hasStringOrNullKey");function LIe({queryEditor:u,variableEditor:e,headerEditor:t,responseEditor:n}){return C.useCallback(i=>{const r=(u==null?void 0:u.getValue())??null,a=(e==null?void 0:e.getValue())??null,o=(t==null?void 0:t.getValue())??null,s=(u==null?void 0:u.operationName)??null,l=(n==null?void 0:n.getValue())??null;return Yie(i,{query:r,variables:a,headers:o,response:l,operationName:s})},[u,e,t,n])}Fe(LIe,"useSynchronizeActiveTabValues");function Jie(u,e=!1){return JSON.stringify(u,(t,n)=>t==="hash"||t==="response"||!e&&t==="headers"?null:n)}Fe(Jie,"serializeTabState");function zIe({storage:u,shouldPersistHeaders:e}){const t=C.useMemo(()=>Cp(500,n=>{u==null||u.set(Oy,n)}),[u]);return C.useCallback(n=>{t(Jie(n,e))},[e,t])}Fe(zIe,"useStoreTabs");function MIe({queryEditor:u,variableEditor:e,headerEditor:t,responseEditor:n}){return C.useCallback(({query:i,variables:r,headers:a,response:o})=>{u==null||u.setValue(i??""),e==null||e.setValue(r??""),t==null||t.setValue(a??""),n==null||n.setValue(o??"")},[t,u,n,e])}Fe(MIe,"useSetEditorValues");function Zie({query:u=null,variables:e=null,headers:t=null}={}){return{id:Qie(),hash:Iy({query:u,variables:e,headers:t}),title:u&&SO(u)||Xie,query:u,variables:e,headers:t,operationName:null,response:null}}Fe(Zie,"createTab");function Yie(u,e){return{...u,tabs:u.tabs.map((t,n)=>{if(n!==u.activeTabIndex)return t;const i={...t,...e};return{...i,hash:Iy(i),title:i.operationName||(i.query?SO(i.query):void 0)||Xie}})}}Fe(Yie,"setPropertiesInActiveTab");function Qie(){const u=Fe(()=>Math.floor((1+Math.random())*65536).toString(16).slice(1),"s4");return`${u()}${u()}-${u()}-${u()}-${u()}-${u()}${u()}${u()}`}Fe(Qie,"guid");function Iy(u){return[u.query??"",u.variables??"",u.headers??""].join("|")}Fe(Iy,"hashFromTabContents");function SO(u){const e=/^(?!#).*(query|subscription|mutation)\s+([a-zA-Z0-9_]+)/m.exec(u);return(e==null?void 0:e[2])??null}Fe(SO,"fuzzyExtractOperationName");function TIe(u){const e=u==null?void 0:u.get(Oy);if(e){const t=JSON.parse(e);u==null||u.set(Oy,JSON.stringify(t,(n,i)=>n==="headers"?null:i))}}Fe(TIe,"clearHeadersFromTabs");const Xie="",Oy="tabState";function Mf({editorTheme:u=kO,keyMap:e=FO,onClickReference:t,onEdit:n,readOnly:i=!1}={},r){const{initialVariables:a,variableEditor:o,setVariableEditor:s}=Ko({nonNull:!0,caller:r||Mf}),l=_7(),c=bp({caller:r||Mf}),d=q6({caller:r||Mf}),h=C.useRef(null),E=C.useRef();return C.useEffect(()=>{let m=!0;return U6([Te(()=>import("./hint.es2-700ec1c6.js"),["./hint.es2-700ec1c6.js","./codemirror.es-52e8b92d.js","./codemirror.es2-5884f31a.js","./forEachState.es-b2033c2b.js"],import.meta.url),Te(()=>import("./lint.es3-68bd1209.js"),["./lint.es3-68bd1209.js","./codemirror.es-52e8b92d.js","./codemirror.es2-5884f31a.js"],import.meta.url),Te(()=>import("./mode.es2-43dc28bc.js"),["./mode.es2-43dc28bc.js","./codemirror.es-52e8b92d.js","./codemirror.es2-5884f31a.js","./mode-indent.es-057a4f6a.js"],import.meta.url)]).then(g=>{if(!m)return;E.current=g;const f=h.current;if(!f)return;const p=g(f,{value:a,lineNumbers:!0,tabSize:2,mode:"graphql-variables",theme:u,autoCloseBrackets:!0,matchBrackets:!0,showCursorWhenSelecting:!0,readOnly:i?"nocursor":!1,foldGutter:!0,lint:{variableToType:void 0},hintOptions:{closeOnUnfocus:!1,completeSingle:!1,container:f,variableToType:void 0},gutters:["CodeMirror-linenumbers","CodeMirror-foldgutter"],extraKeys:yO});p.addKeyMap({"Cmd-Space"(){p.showHint({completeSingle:!1,container:f})},"Ctrl-Space"(){p.showHint({completeSingle:!1,container:f})},"Alt-Space"(){p.showHint({completeSingle:!1,container:f})},"Shift-Space"(){p.showHint({completeSingle:!1,container:f})}}),p.on("keyup",(D,x)=>{const{code:b,key:k,shiftKey:A}=x,F=b.startsWith("Key"),S=!A&&b.startsWith("Digit");(F||S||k==="_"||k==='"')&&D.execCommand("autocomplete")}),s(p)}),()=>{m=!1}},[u,a,i,s]),S7(o,"keyMap",e),Uie(o,n,NIe,"variables",Mf),qie(o,t||null,Mf),Ic(o,["Cmd-Enter","Ctrl-Enter"],l==null?void 0:l.run),Ic(o,["Shift-Ctrl-P"],d),Ic(o,["Shift-Ctrl-M"],c),h}Fe(Mf,"useVariableEditor");const NIe="variables",PIe=Mg("EditorContext");function RIe(u){const e=Ng(),[t,n]=C.useState(null),[i,r]=C.useState(null),[a,o]=C.useState(null),[s,l]=C.useState(null),[c,d]=C.useState(()=>{const R=(e==null?void 0:e.get(K$))!==null;return u.shouldPersistHeaders!==!1&&R?(e==null?void 0:e.get(K$))==="true":!!u.shouldPersistHeaders});$b(t,u.headers),$b(i,u.query),$b(a,u.response),$b(s,u.variables);const h=zIe({storage:e,shouldPersistHeaders:c}),[E]=C.useState(()=>{const R=u.query??(e==null?void 0:e.get(AIe))??null,I=u.variables??(e==null?void 0:e.get(NIe))??null,H=u.headers??(e==null?void 0:e.get(X8))??null,V=u.response??"",U=_Ie({query:R,variables:I,headers:H,defaultTabs:u.defaultTabs,defaultQuery:u.defaultQuery||WRu,defaultHeaders:u.defaultHeaders,storage:e,shouldPersistHeaders:c});return h(U),{query:R??(U.activeTabIndex===0?U.tabs[0].query:null)??"",variables:I??"",headers:H??u.defaultHeaders??"",response:V,tabState:U}}),[m,g]=C.useState(E.tabState),f=C.useCallback(R=>{if(R){e==null||e.set(X8,(t==null?void 0:t.getValue())??"");const I=Jie(m,!0);e==null||e.set(Oy,I)}else e==null||e.set(X8,""),TIe(e);d(R),e==null||e.set(K$,R.toString())},[e,m,t]),p=C.useRef();C.useEffect(()=>{const R=!!u.shouldPersistHeaders;(p==null?void 0:p.current)!==R&&(f(R),p.current=R)},[u.shouldPersistHeaders,f]);const D=LIe({queryEditor:i,variableEditor:s,headerEditor:t,responseEditor:a}),x=MIe({queryEditor:i,variableEditor:s,headerEditor:t,responseEditor:a}),{onTabChange:b,defaultHeaders:k,children:A}=u,F=C.useCallback(()=>{g(R=>{const I=D(R),H={tabs:[...I.tabs,Zie({headers:k})],activeTabIndex:I.tabs.length};return h(H),x(H.tabs[H.activeTabIndex]),b==null||b(H),H})},[k,b,x,h,D]),S=C.useCallback(R=>{g(I=>{const H={...I,activeTabIndex:R};return h(H),x(H.tabs[H.activeTabIndex]),b==null||b(H),H})},[b,x,h]),w=C.useCallback(R=>{g(I=>{const H=I.tabs[I.activeTabIndex],V={tabs:R,activeTabIndex:R.indexOf(H)};return h(V),x(V.tabs[V.activeTabIndex]),b==null||b(V),V})},[b,x,h]),z=C.useCallback(R=>{g(I=>{const H={tabs:I.tabs.filter((V,U)=>R!==U),activeTabIndex:Math.max(I.activeTabIndex-1,0)};return h(H),x(H.tabs[H.activeTabIndex]),b==null||b(H),H})},[b,x,h]),N=C.useCallback(R=>{g(I=>{const H=Yie(I,R);return h(H),b==null||b(H),H})},[b,h]),{onEditOperationName:O}=u,y=C.useCallback(R=>{i&&(i.operationName=R,N({operationName:R}),O==null||O(R))},[O,i,N]),_=C.useMemo(()=>{const R=new Map;if(Array.isArray(u.externalFragments))for(const I of u.externalFragments)R.set(I.name.value,I);else if(typeof u.externalFragments=="string")ad(Bg(u.externalFragments,{}),{FragmentDefinition(I){R.set(I.name.value,I)}});else if(u.externalFragments)throw new Error("The `externalFragments` prop must either be a string that contains the fragment definitions in SDL or a list of FragmentDefinitionNode objects.");return R},[u.externalFragments]),L=C.useMemo(()=>u.validationRules||[],[u.validationRules]),T=C.useMemo(()=>({...m,addTab:F,changeTab:S,moveTab:w,closeTab:z,updateActiveTabValues:N,headerEditor:t,queryEditor:i,responseEditor:a,variableEditor:s,setHeaderEditor:n,setQueryEditor:r,setResponseEditor:o,setVariableEditor:l,setOperationName:y,initialQuery:E.query,initialVariables:E.variables,initialHeaders:E.headers,initialResponse:E.response,externalFragments:_,validationRules:L,shouldPersistHeaders:c,setShouldPersistHeaders:f}),[m,F,S,w,z,N,t,i,a,s,y,E,_,L,c,f]);return B.jsx(PIe.Provider,{value:T,children:A})}Fe(RIe,"EditorContextProvider");const Ko=Tg(PIe),K$="shouldPersistHeaders",WRu=`# Welcome to GraphiQL # # GraphiQL is an in-browser tool for writing, validating, and # testing GraphQL queries. @@ -1094,7 +1094,7 @@ ${c}`)}yield yield _h(l.map(c=>c.body))}}catch(l){i={error:l}}finally{try{s&&!s. # Auto Complete: Ctrl-Space (or just start typing) # -`;function uN({isHidden:u,...e}){const{headerEditor:t}=Ko({nonNull:!0,caller:uN}),n=Z5(e,uN);return C.useEffect(()=>{u||t==null||t.refresh()},[t,u]),B.jsx("div",{className:Ha("graphiql-editor",u&&"hidden"),ref:n})}Fe(uN,"HeaderEditor");function nN(u){var e;const[t,n]=C.useState({width:null,height:null}),[i,r]=C.useState(null),a=C.useRef(null),o=(e=ere(u.token))==null?void 0:e.href;C.useEffect(()=>{if(a.current){if(!o){n({width:null,height:null}),r(null);return}fetch(o,{method:"HEAD"}).then(l=>{r(l.headers.get("Content-Type"))}).catch(()=>{r(null)})}},[o]);const s=t.width!==null&&t.height!==null?B.jsxs("div",{children:[t.width,"x",t.height,i===null?null:" "+i]}):null;return B.jsxs("div",{children:[B.jsx("img",{onLoad:()=>{var l,c;n({width:((l=a.current)==null?void 0:l.naturalWidth)??null,height:((c=a.current)==null?void 0:c.naturalHeight)??null})},ref:a,src:o}),s]})}Fe(nN,"ImagePreview");nN.shouldRender=Fe(function(u){const e=ere(u);return e?IIe(e):!1},"shouldRender");function ere(u){if(u.type!=="string")return;const e=u.string.slice(1).slice(0,-1).trim();try{const{location:t}=window;return new URL(e,t.protocol+"//"+t.host)}catch{return}}Fe(ere,"tokenToURL");function IIe(u){return/(bmp|gif|jpeg|jpg|png|svg)$/.test(u.pathname)}Fe(IIe,"isImageURL");function tre(u){const e=pE(u,tre);return B.jsx("div",{className:"graphiql-editor",ref:e})}Fe(tre,"QueryEditor");function iN({responseTooltip:u,editorTheme:e=kO,keyMap:t=FO}={},n){const{fetchError:i,validationErrors:r}=X1({nonNull:!0,caller:n||iN}),{initialResponse:a,responseEditor:o,setResponseEditor:s}=Ko({nonNull:!0,caller:n||iN}),l=C.useRef(null),c=C.useRef(u);return C.useEffect(()=>{c.current=u},[u]),C.useEffect(()=>{let d=!0;return U6([Te(()=>import("./foldgutter.es-b6cee46a.js"),["./foldgutter.es-b6cee46a.js","./codemirror.es2-5884f31a.js"],import.meta.url).then(h=>h.f),Te(()=>import("./brace-fold.es-f2e3735d.js"),["./brace-fold.es-f2e3735d.js","./codemirror.es2-5884f31a.js"],import.meta.url).then(h=>h.b),Te(()=>import("./dialog.es-dffe62e7.js"),["./dialog.es-dffe62e7.js","./codemirror.es2-5884f31a.js","./dialog.es2-02b3b4e7.js"],import.meta.url).then(h=>h.d),Te(()=>import("./search.es-1c15f5ea.js"),["./search.es-1c15f5ea.js","./codemirror.es2-5884f31a.js","./searchcursor.es2-cbfe7cae.js","./dialog.es2-02b3b4e7.js"],import.meta.url).then(h=>h.s),Te(()=>import("./searchcursor.es-b1a352a2.js"),["./searchcursor.es-b1a352a2.js","./codemirror.es2-5884f31a.js","./searchcursor.es2-cbfe7cae.js"],import.meta.url).then(h=>h.s),Te(()=>import("./jump-to-line.es-d901ea33.js"),["./jump-to-line.es-d901ea33.js","./codemirror.es2-5884f31a.js","./dialog.es2-02b3b4e7.js"],import.meta.url).then(h=>h.j),Te(()=>import("./sublime.es-e2a3eb60.js"),["./sublime.es-e2a3eb60.js","./codemirror.es2-5884f31a.js","./searchcursor.es2-cbfe7cae.js","./matchbrackets.es2-f53f57e6.js"],import.meta.url).then(h=>h.s),Te(()=>import("./mode.es3-e4cb70b6.js"),["./mode.es3-e4cb70b6.js","./codemirror.es-52e8b92d.js","./codemirror.es2-5884f31a.js","./mode-indent.es-057a4f6a.js"],import.meta.url),Te(()=>import("./info-addon.es-c9b2027b.js"),["./info-addon.es-c9b2027b.js","./codemirror.es-52e8b92d.js","./codemirror.es2-5884f31a.js"],import.meta.url)],{useCommonAddons:!1}).then(h=>{if(!d)return;const E=document.createElement("div");h.registerHelper("info","graphql-results",(f,p,D,x)=>{const b=[],k=c.current;return k&&b.push(B.jsx(k,{pos:x,token:f})),nN.shouldRender(f)&&b.push(B.jsx(nN,{token:f},"image-preview")),b.length?(zx.render(b,E),E):(zx.unmountComponentAtNode(E),null)});const m=l.current;if(!m)return;const g=h(m,{value:a,lineWrapping:!0,readOnly:!0,theme:e,mode:"graphql-results",foldGutter:!0,gutters:["CodeMirror-foldgutter"],info:!0,extraKeys:yO});s(g)}),()=>{d=!1}},[e,a,s]),S7(o,"keyMap",t),C.useEffect(()=>{i&&(o==null||o.setValue(i)),r.length>0&&(o==null||o.setValue(vy(r)))},[o,i,r]),l}Fe(iN,"useResponseEditor");function ure(u){const e=iN(u,ure);return B.jsx("section",{className:"result-window","aria-label":"Result Window","aria-live":"polite","aria-atomic":"true",ref:e})}Fe(ure,"ResponseEditor");function rN({isHidden:u,...e}){const{variableEditor:t}=Ko({nonNull:!0,caller:rN}),n=Mf(e,rN);return C.useEffect(()=>{t&&!u&&t.refresh()},[t,u]),B.jsx("div",{className:Ha("graphiql-editor",u&&"hidden"),ref:n})}Fe(rN,"VariableEditor");function OIe({children:u,dangerouslyAssumeSchemaIsValid:e,defaultQuery:t,defaultHeaders:n,defaultTabs:i,externalFragments:r,fetcher:a,getDefaultFieldNames:o,headers:s,inputValueDeprecation:l,introspectionQueryName:c,maxHistoryLength:d,onEditOperationName:h,onSchemaChange:E,onTabChange:m,onTogglePluginVisibility:g,operationName:f,plugins:p,query:D,response:x,schema:b,schemaDescription:k,shouldPersistHeaders:A,storage:F,validationRules:S,variables:w,visiblePlugin:z}){return B.jsx(VRe,{storage:F,children:B.jsx(XRe,{maxHistoryLength:d,children:B.jsx(RIe,{defaultQuery:t,defaultHeaders:n,defaultTabs:i,externalFragments:r,headers:s,onEditOperationName:h,onTabChange:m,query:D,response:x,shouldPersistHeaders:A,validationRules:S,variables:w,children:B.jsx($ie,{dangerouslyAssumeSchemaIsValid:e,fetcher:a,inputValueDeprecation:l,introspectionQueryName:c,onSchemaChange:E,schema:b,schemaDescription:k,children:B.jsx(YT,{getDefaultFieldNames:o,fetcher:a,operationName:f,children:B.jsx(Kie,{children:B.jsx(vIe,{onTogglePluginVisibility:g,plugins:p,visiblePlugin:z,children:u})})})})})})})}Fe(OIe,"GraphiQLProvider");function jIe(){const u=Ng(),[e,t]=C.useState(()=>{if(!u)return null;const i=u.get(W$);switch(i){case"light":return"light";case"dark":return"dark";default:return typeof i=="string"&&u.set(W$,""),null}});C.useLayoutEffect(()=>{typeof window>"u"||(document.body.classList.remove("graphiql-light","graphiql-dark"),e&&document.body.classList.add(`graphiql-${e}`))},[e]);const n=C.useCallback(i=>{u==null||u.set(W$,i||""),t(i)},[u]);return C.useMemo(()=>({theme:e,setTheme:n}),[e,n])}Fe(jIe,"useTheme");const W$="theme";function eB({defaultSizeRelation:u=GRu,direction:e,initiallyHidden:t,onHiddenElementChange:n,sizeThresholdFirst:i=100,sizeThresholdSecond:r=100,storageKey:a}){const o=Ng(),s=C.useMemo(()=>Cp(500,D=>{a&&(o==null||o.set(a,D))}),[o,a]),[l,c]=C.useState(()=>{const D=a&&(o==null?void 0:o.get(a));return D===FS||t==="first"?"first":D===yS||t==="second"?"second":null}),d=C.useCallback(D=>{D!==l&&(c(D),n==null||n(D))},[l,n]),h=C.useRef(null),E=C.useRef(null),m=C.useRef(null),g=C.useRef(`${u}`);C.useLayoutEffect(()=>{const D=a&&(o==null?void 0:o.get(a))||g.current;h.current&&(h.current.style.display="flex",h.current.style.flex=D===FS||D===yS?g.current:D),m.current&&(m.current.style.display="flex",m.current.style.flex="1"),E.current&&(E.current.style.display="flex")},[e,o,a]);const f=C.useCallback(D=>{const x=D==="first"?h.current:m.current;if(x&&(x.style.left="-1000px",x.style.position="absolute",x.style.opacity="0",x.style.height="500px",x.style.width="500px",h.current)){const b=parseFloat(h.current.style.flex);(!Number.isFinite(b)||b<1)&&(h.current.style.flex="1")}},[]),p=C.useCallback(D=>{const x=D==="first"?h.current:m.current;if(x&&(x.style.width="",x.style.height="",x.style.opacity="",x.style.position="",x.style.left="",o&&a)){const b=o.get(a);h.current&&b!==FS&&b!==yS&&(h.current.style.flex=b||g.current)}},[o,a]);return C.useLayoutEffect(()=>{l==="first"?f("first"):p("first"),l==="second"?f("second"):p("second")},[l,f,p]),C.useEffect(()=>{if(!E.current||!h.current||!m.current)return;const D=E.current,x=h.current,b=x.parentElement,k=e==="horizontal"?"clientX":"clientY",A=e==="horizontal"?"left":"top",F=e==="horizontal"?"right":"bottom",S=e==="horizontal"?"clientWidth":"clientHeight";function w(N){N.preventDefault();const O=N[k]-D.getBoundingClientRect()[A];function y(L){if(L.buttons===0)return _();const T=L[k]-b.getBoundingClientRect()[A]-O,R=b.getBoundingClientRect()[F]-L[k]+O-D[S];if(T{D.removeEventListener("mousedown",w),D.removeEventListener("dblclick",z)}},[e,d,i,r,s]),C.useMemo(()=>({dragBarRef:E,hiddenElement:l,firstRef:h,setHiddenElement:c,secondRef:m}),[l,c])}Fe(eB,"useDragResize");const GRu=1,FS="hide-first",yS="hide-second",tB=C.forwardRef(({label:u,onClick:e,...t},n)=>{const[i,r]=C.useState(null),a=C.useCallback(o=>{try{e==null||e(o),r(null)}catch(s){r(s instanceof Error?s:new Error(`Toolbar button click failed: ${s}`))}},[e]);return B.jsx(Ao,{label:u,children:B.jsx(la,{...t,ref:n,type:"button",className:Ha("graphiql-toolbar-button",i&&"error",t.className),onClick:a,"aria-label":i?i.message:u,"aria-invalid":i?"true":t["aria-invalid"]})})});tB.displayName="ToolbarButton";function aN(){const{queryEditor:u,setOperationName:e}=Ko({nonNull:!0,caller:aN}),{isFetching:t,isSubscribed:n,operationName:i,run:r,stop:a}=_7({nonNull:!0,caller:aN}),o=(u==null?void 0:u.operations)||[],s=o.length>1&&typeof i!="string",l=t||n,c=`${l?"Stop":"Execute"} query (Ctrl-Enter)`,d={type:"button",className:"graphiql-execute-button",children:l?B.jsx(NRu,{}):B.jsx(_Ru,{}),"aria-label":c};return s&&!l?B.jsxs(GE,{children:[B.jsx(Ao,{label:c,children:B.jsx(GE.Button,{...d})}),B.jsx(GE.Content,{children:o.map((h,E)=>{const m=h.name?h.name.value:``;return B.jsx(GE.Item,{onSelect:()=>{var g;const f=(g=h.name)==null?void 0:g.value;u&&f&&f!==u.operationName&&e(f),r()},children:m},`${m}-${E}`)})})]}):B.jsx(Ao,{label:c,children:B.jsx("button",{...d,onClick:()=>{l?a():r()}})})}Fe(aN,"ExecuteButton");const URu=Fe(({button:u,children:e,label:t,...n})=>B.jsxs(GE,{...n,children:[B.jsx(Ao,{label:t,children:B.jsx(GE.Button,{className:Ha("graphiql-un-styled graphiql-toolbar-menu",n.className),"aria-label":t,children:u})}),B.jsx(GE.Content,{children:e})]}),"ToolbarMenuRoot");A7(URu,{Item:GE.Item});var JY=globalThis&&globalThis.__assign||function(){return JY=Object.assign||function(u){for(var e,t=1,n=arguments.length;t0)&&!(i=n.next()).done;)r.push(i.value)}catch(o){a={error:o}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(a)throw a.error}}return r},JRu=parseInt(M.version.slice(0,2),10);if(JRu<16)throw new Error(["GraphiQL 0.18.0 and after is not compatible with React 15 or below.","If you are using a CDN source (jsdelivr, unpkg, etc), follow this example:","https://github.com/graphql/graphiql/blob/master/examples/graphiql-cdn/index.html#L49"].join(` +`;function uN({isHidden:u,...e}){const{headerEditor:t}=Ko({nonNull:!0,caller:uN}),n=Z5(e,uN);return C.useEffect(()=>{u||t==null||t.refresh()},[t,u]),B.jsx("div",{className:Ha("graphiql-editor",u&&"hidden"),ref:n})}Fe(uN,"HeaderEditor");function nN(u){var e;const[t,n]=C.useState({width:null,height:null}),[i,r]=C.useState(null),a=C.useRef(null),o=(e=ere(u.token))==null?void 0:e.href;C.useEffect(()=>{if(a.current){if(!o){n({width:null,height:null}),r(null);return}fetch(o,{method:"HEAD"}).then(l=>{r(l.headers.get("Content-Type"))}).catch(()=>{r(null)})}},[o]);const s=t.width!==null&&t.height!==null?B.jsxs("div",{children:[t.width,"x",t.height,i===null?null:" "+i]}):null;return B.jsxs("div",{children:[B.jsx("img",{onLoad:()=>{var l,c;n({width:((l=a.current)==null?void 0:l.naturalWidth)??null,height:((c=a.current)==null?void 0:c.naturalHeight)??null})},ref:a,src:o}),s]})}Fe(nN,"ImagePreview");nN.shouldRender=Fe(function(u){const e=ere(u);return e?IIe(e):!1},"shouldRender");function ere(u){if(u.type!=="string")return;const e=u.string.slice(1).slice(0,-1).trim();try{const{location:t}=window;return new URL(e,t.protocol+"//"+t.host)}catch{return}}Fe(ere,"tokenToURL");function IIe(u){return/(bmp|gif|jpeg|jpg|png|svg)$/.test(u.pathname)}Fe(IIe,"isImageURL");function tre(u){const e=pE(u,tre);return B.jsx("div",{className:"graphiql-editor",ref:e})}Fe(tre,"QueryEditor");function iN({responseTooltip:u,editorTheme:e=kO,keyMap:t=FO}={},n){const{fetchError:i,validationErrors:r}=X1({nonNull:!0,caller:n||iN}),{initialResponse:a,responseEditor:o,setResponseEditor:s}=Ko({nonNull:!0,caller:n||iN}),l=C.useRef(null),c=C.useRef(u);return C.useEffect(()=>{c.current=u},[u]),C.useEffect(()=>{let d=!0;return U6([Te(()=>import("./foldgutter.es-b6cee46a.js"),["./foldgutter.es-b6cee46a.js","./codemirror.es2-5884f31a.js"],import.meta.url).then(h=>h.f),Te(()=>import("./brace-fold.es-f2e3735d.js"),["./brace-fold.es-f2e3735d.js","./codemirror.es2-5884f31a.js"],import.meta.url).then(h=>h.b),Te(()=>import("./dialog.es-dffe62e7.js"),["./dialog.es-dffe62e7.js","./codemirror.es2-5884f31a.js","./dialog.es2-02b3b4e7.js"],import.meta.url).then(h=>h.d),Te(()=>import("./search.es-1c15f5ea.js"),["./search.es-1c15f5ea.js","./codemirror.es2-5884f31a.js","./searchcursor.es2-cbfe7cae.js","./dialog.es2-02b3b4e7.js"],import.meta.url).then(h=>h.s),Te(()=>import("./searchcursor.es-b1a352a2.js"),["./searchcursor.es-b1a352a2.js","./codemirror.es2-5884f31a.js","./searchcursor.es2-cbfe7cae.js"],import.meta.url).then(h=>h.s),Te(()=>import("./jump-to-line.es-d901ea33.js"),["./jump-to-line.es-d901ea33.js","./codemirror.es2-5884f31a.js","./dialog.es2-02b3b4e7.js"],import.meta.url).then(h=>h.j),Te(()=>import("./sublime.es-e2a3eb60.js"),["./sublime.es-e2a3eb60.js","./codemirror.es2-5884f31a.js","./searchcursor.es2-cbfe7cae.js","./matchbrackets.es2-f53f57e6.js"],import.meta.url).then(h=>h.s),Te(()=>import("./mode.es3-96240929.js"),["./mode.es3-96240929.js","./codemirror.es-52e8b92d.js","./codemirror.es2-5884f31a.js","./mode-indent.es-057a4f6a.js"],import.meta.url),Te(()=>import("./info-addon.es-c9b2027b.js"),["./info-addon.es-c9b2027b.js","./codemirror.es-52e8b92d.js","./codemirror.es2-5884f31a.js"],import.meta.url)],{useCommonAddons:!1}).then(h=>{if(!d)return;const E=document.createElement("div");h.registerHelper("info","graphql-results",(f,p,D,x)=>{const b=[],k=c.current;return k&&b.push(B.jsx(k,{pos:x,token:f})),nN.shouldRender(f)&&b.push(B.jsx(nN,{token:f},"image-preview")),b.length?(zx.render(b,E),E):(zx.unmountComponentAtNode(E),null)});const m=l.current;if(!m)return;const g=h(m,{value:a,lineWrapping:!0,readOnly:!0,theme:e,mode:"graphql-results",foldGutter:!0,gutters:["CodeMirror-foldgutter"],info:!0,extraKeys:yO});s(g)}),()=>{d=!1}},[e,a,s]),S7(o,"keyMap",t),C.useEffect(()=>{i&&(o==null||o.setValue(i)),r.length>0&&(o==null||o.setValue(vy(r)))},[o,i,r]),l}Fe(iN,"useResponseEditor");function ure(u){const e=iN(u,ure);return B.jsx("section",{className:"result-window","aria-label":"Result Window","aria-live":"polite","aria-atomic":"true",ref:e})}Fe(ure,"ResponseEditor");function rN({isHidden:u,...e}){const{variableEditor:t}=Ko({nonNull:!0,caller:rN}),n=Mf(e,rN);return C.useEffect(()=>{t&&!u&&t.refresh()},[t,u]),B.jsx("div",{className:Ha("graphiql-editor",u&&"hidden"),ref:n})}Fe(rN,"VariableEditor");function OIe({children:u,dangerouslyAssumeSchemaIsValid:e,defaultQuery:t,defaultHeaders:n,defaultTabs:i,externalFragments:r,fetcher:a,getDefaultFieldNames:o,headers:s,inputValueDeprecation:l,introspectionQueryName:c,maxHistoryLength:d,onEditOperationName:h,onSchemaChange:E,onTabChange:m,onTogglePluginVisibility:g,operationName:f,plugins:p,query:D,response:x,schema:b,schemaDescription:k,shouldPersistHeaders:A,storage:F,validationRules:S,variables:w,visiblePlugin:z}){return B.jsx(VRe,{storage:F,children:B.jsx(XRe,{maxHistoryLength:d,children:B.jsx(RIe,{defaultQuery:t,defaultHeaders:n,defaultTabs:i,externalFragments:r,headers:s,onEditOperationName:h,onTabChange:m,query:D,response:x,shouldPersistHeaders:A,validationRules:S,variables:w,children:B.jsx($ie,{dangerouslyAssumeSchemaIsValid:e,fetcher:a,inputValueDeprecation:l,introspectionQueryName:c,onSchemaChange:E,schema:b,schemaDescription:k,children:B.jsx(YT,{getDefaultFieldNames:o,fetcher:a,operationName:f,children:B.jsx(Kie,{children:B.jsx(vIe,{onTogglePluginVisibility:g,plugins:p,visiblePlugin:z,children:u})})})})})})})}Fe(OIe,"GraphiQLProvider");function jIe(){const u=Ng(),[e,t]=C.useState(()=>{if(!u)return null;const i=u.get(W$);switch(i){case"light":return"light";case"dark":return"dark";default:return typeof i=="string"&&u.set(W$,""),null}});C.useLayoutEffect(()=>{typeof window>"u"||(document.body.classList.remove("graphiql-light","graphiql-dark"),e&&document.body.classList.add(`graphiql-${e}`))},[e]);const n=C.useCallback(i=>{u==null||u.set(W$,i||""),t(i)},[u]);return C.useMemo(()=>({theme:e,setTheme:n}),[e,n])}Fe(jIe,"useTheme");const W$="theme";function eB({defaultSizeRelation:u=GRu,direction:e,initiallyHidden:t,onHiddenElementChange:n,sizeThresholdFirst:i=100,sizeThresholdSecond:r=100,storageKey:a}){const o=Ng(),s=C.useMemo(()=>Cp(500,D=>{a&&(o==null||o.set(a,D))}),[o,a]),[l,c]=C.useState(()=>{const D=a&&(o==null?void 0:o.get(a));return D===FS||t==="first"?"first":D===yS||t==="second"?"second":null}),d=C.useCallback(D=>{D!==l&&(c(D),n==null||n(D))},[l,n]),h=C.useRef(null),E=C.useRef(null),m=C.useRef(null),g=C.useRef(`${u}`);C.useLayoutEffect(()=>{const D=a&&(o==null?void 0:o.get(a))||g.current;h.current&&(h.current.style.display="flex",h.current.style.flex=D===FS||D===yS?g.current:D),m.current&&(m.current.style.display="flex",m.current.style.flex="1"),E.current&&(E.current.style.display="flex")},[e,o,a]);const f=C.useCallback(D=>{const x=D==="first"?h.current:m.current;if(x&&(x.style.left="-1000px",x.style.position="absolute",x.style.opacity="0",x.style.height="500px",x.style.width="500px",h.current)){const b=parseFloat(h.current.style.flex);(!Number.isFinite(b)||b<1)&&(h.current.style.flex="1")}},[]),p=C.useCallback(D=>{const x=D==="first"?h.current:m.current;if(x&&(x.style.width="",x.style.height="",x.style.opacity="",x.style.position="",x.style.left="",o&&a)){const b=o.get(a);h.current&&b!==FS&&b!==yS&&(h.current.style.flex=b||g.current)}},[o,a]);return C.useLayoutEffect(()=>{l==="first"?f("first"):p("first"),l==="second"?f("second"):p("second")},[l,f,p]),C.useEffect(()=>{if(!E.current||!h.current||!m.current)return;const D=E.current,x=h.current,b=x.parentElement,k=e==="horizontal"?"clientX":"clientY",A=e==="horizontal"?"left":"top",F=e==="horizontal"?"right":"bottom",S=e==="horizontal"?"clientWidth":"clientHeight";function w(N){N.preventDefault();const O=N[k]-D.getBoundingClientRect()[A];function y(L){if(L.buttons===0)return _();const T=L[k]-b.getBoundingClientRect()[A]-O,R=b.getBoundingClientRect()[F]-L[k]+O-D[S];if(T{D.removeEventListener("mousedown",w),D.removeEventListener("dblclick",z)}},[e,d,i,r,s]),C.useMemo(()=>({dragBarRef:E,hiddenElement:l,firstRef:h,setHiddenElement:c,secondRef:m}),[l,c])}Fe(eB,"useDragResize");const GRu=1,FS="hide-first",yS="hide-second",tB=C.forwardRef(({label:u,onClick:e,...t},n)=>{const[i,r]=C.useState(null),a=C.useCallback(o=>{try{e==null||e(o),r(null)}catch(s){r(s instanceof Error?s:new Error(`Toolbar button click failed: ${s}`))}},[e]);return B.jsx(Ao,{label:u,children:B.jsx(la,{...t,ref:n,type:"button",className:Ha("graphiql-toolbar-button",i&&"error",t.className),onClick:a,"aria-label":i?i.message:u,"aria-invalid":i?"true":t["aria-invalid"]})})});tB.displayName="ToolbarButton";function aN(){const{queryEditor:u,setOperationName:e}=Ko({nonNull:!0,caller:aN}),{isFetching:t,isSubscribed:n,operationName:i,run:r,stop:a}=_7({nonNull:!0,caller:aN}),o=(u==null?void 0:u.operations)||[],s=o.length>1&&typeof i!="string",l=t||n,c=`${l?"Stop":"Execute"} query (Ctrl-Enter)`,d={type:"button",className:"graphiql-execute-button",children:l?B.jsx(NRu,{}):B.jsx(_Ru,{}),"aria-label":c};return s&&!l?B.jsxs(GE,{children:[B.jsx(Ao,{label:c,children:B.jsx(GE.Button,{...d})}),B.jsx(GE.Content,{children:o.map((h,E)=>{const m=h.name?h.name.value:``;return B.jsx(GE.Item,{onSelect:()=>{var g;const f=(g=h.name)==null?void 0:g.value;u&&f&&f!==u.operationName&&e(f),r()},children:m},`${m}-${E}`)})})]}):B.jsx(Ao,{label:c,children:B.jsx("button",{...d,onClick:()=>{l?a():r()}})})}Fe(aN,"ExecuteButton");const URu=Fe(({button:u,children:e,label:t,...n})=>B.jsxs(GE,{...n,children:[B.jsx(Ao,{label:t,children:B.jsx(GE.Button,{className:Ha("graphiql-un-styled graphiql-toolbar-menu",n.className),"aria-label":t,children:u})}),B.jsx(GE.Content,{children:e})]}),"ToolbarMenuRoot");A7(URu,{Item:GE.Item});var JY=globalThis&&globalThis.__assign||function(){return JY=Object.assign||function(u){for(var e,t=1,n=arguments.length;t0)&&!(i=n.next()).done;)r.push(i.value)}catch(o){a={error:o}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(a)throw a.error}}return r},JRu=parseInt(M.version.slice(0,2),10);if(JRu<16)throw new Error(["GraphiQL 0.18.0 and after is not compatible with React 15 or below.","If you are using a CDN source (jsdelivr, unpkg, etc), follow this example:","https://github.com/graphql/graphiql/blob/master/examples/graphiql-cdn/index.html#L49"].join(` `));function UE(u){var e,t=u.dangerouslyAssumeSchemaIsValid,n=u.defaultQuery,i=u.defaultTabs,r=u.externalFragments,a=u.fetcher,o=u.getDefaultFieldNames,s=u.headers,l=u.inputValueDeprecation,c=u.introspectionQueryName,d=u.maxHistoryLength,h=u.onEditOperationName,E=u.onSchemaChange,m=u.onTabChange,g=u.onTogglePluginVisibility,f=u.operationName,p=u.plugins,D=u.query,x=u.response,b=u.schema,k=u.schemaDescription,A=u.shouldPersistHeaders,F=u.storage,S=u.validationRules,w=u.variables,z=u.visiblePlugin,N=u.defaultHeaders,O=qRu(u,["dangerouslyAssumeSchemaIsValid","defaultQuery","defaultTabs","externalFragments","fetcher","getDefaultFieldNames","headers","inputValueDeprecation","introspectionQueryName","maxHistoryLength","onEditOperationName","onSchemaChange","onTabChange","onTogglePluginVisibility","operationName","plugins","query","response","schema","schemaDescription","shouldPersistHeaders","storage","validationRules","variables","visiblePlugin","defaultHeaders"]);if(typeof a!="function")throw new TypeError("The `GraphiQL` component requires a `fetcher` function to be passed as prop.");return M.createElement(OIe,{getDefaultFieldNames:o,dangerouslyAssumeSchemaIsValid:t,defaultQuery:n,defaultHeaders:N,defaultTabs:i,externalFragments:r,fetcher:a,headers:s,inputValueDeprecation:l,introspectionQueryName:c,maxHistoryLength:d,onEditOperationName:h,onSchemaChange:E,onTabChange:m,onTogglePluginVisibility:g,plugins:p,visiblePlugin:z,operationName:f,query:D,response:x,schema:b,schemaDescription:k,shouldPersistHeaders:A,storage:F,validationRules:S,variables:w},M.createElement(ZRu,JY({showPersistHeadersSettings:A!==!1,disableTabs:(e=O.disableTabs)!==null&&e!==void 0?e:!1},O)))}UE.Logo=HIe;UE.Toolbar=VIe;UE.Footer=$Ie;function ZRu(u){var e,t,n,i,r=(e=u.isHeadersEditorEnabled)!==null&&e!==void 0?e:!0,a=Ko({nonNull:!0}),o=_7({nonNull:!0}),s=X1({nonNull:!0}),l=Ng(),c=AO(),d=_O({onCopyQuery:u.onCopyQuery}),h=bp(),E=q6(),m=jIe(),g=m.theme,f=m.setTheme,p=(t=c==null?void 0:c.visiblePlugin)===null||t===void 0?void 0:t.content,D=eB({defaultSizeRelation:1/3,direction:"horizontal",initiallyHidden:c!=null&&c.visiblePlugin?void 0:"first",onHiddenElementChange:function(de){de==="first"&&(c==null||c.setVisiblePlugin(null))},sizeThresholdSecond:200,storageKey:"docExplorerFlex"}),x=eB({direction:"horizontal",storageKey:"editorFlex"}),b=eB({defaultSizeRelation:3,direction:"vertical",initiallyHidden:function(){if(!(u.defaultEditorToolsVisibility==="variables"||u.defaultEditorToolsVisibility==="headers"))return typeof u.defaultEditorToolsVisibility=="boolean"?u.defaultEditorToolsVisibility?void 0:"second":a.initialVariables||a.initialHeaders?void 0:"second"}(),sizeThresholdSecond:60,storageKey:"secondaryEditorFlex"}),k=uB(C.useState(function(){return u.defaultEditorToolsVisibility==="variables"||u.defaultEditorToolsVisibility==="headers"?u.defaultEditorToolsVisibility:!a.initialVariables&&a.initialHeaders&&r?"headers":"variables"}),2),A=k[0],F=k[1],S=uB(C.useState(null),2),w=S[0],z=S[1],N=uB(C.useState(null),2),O=N[0],y=N[1],_=M.Children.toArray(u.children),L=_.find(function(de){return U$(de,UE.Logo)})||M.createElement(UE.Logo,null),T=_.find(function(de){return U$(de,UE.Toolbar)})||M.createElement(M.Fragment,null,M.createElement(tB,{onClick:E,label:"Prettify query (Shift-Ctrl-P)"},M.createElement(BRu,{className:"graphiql-toolbar-icon","aria-hidden":"true"})),M.createElement(tB,{onClick:h,label:"Merge fragments into query (Shift-Ctrl-M)"},M.createElement(yRu,{className:"graphiql-toolbar-icon","aria-hidden":"true"})),M.createElement(tB,{onClick:d,label:"Copy query (Shift-Ctrl-C)"},M.createElement(hRu,{className:"graphiql-toolbar-icon","aria-hidden":"true"})),((n=u.toolbar)===null||n===void 0?void 0:n.additionalContent)&&u.toolbar.additionalContent,((i=u.toolbar)===null||i===void 0?void 0:i.additionalComponent)&&M.createElement(u.toolbar.additionalComponent,null)),R=_.find(function(de){return U$(de,UE.Footer)}),I=C.useCallback(function(){D.hiddenElement==="first"&&D.setHiddenElement(null)},[D]),H=C.useCallback(function(){try{l==null||l.clear(),y("success")}catch{y("error")}},[l]),V=C.useCallback(function(de){a.setShouldPersistHeaders(de.currentTarget.dataset.value==="true")},[a]),U=C.useCallback(function(de){var he=de.currentTarget.dataset.theme;f(he||null)},[f]),J=a.addTab,Y=s.introspect,X=a.moveTab,re=C.useCallback(function(de){z(de.currentTarget.dataset.value)},[]),ge=C.useCallback(function(de){var he=c,Be=Number(de.currentTarget.dataset.index),je=he.plugins.find(function(qt,ou){return Be===ou}),bt=je===he.visiblePlugin;bt?(he.setVisiblePlugin(null),D.setHiddenElement("first")):(he.setVisiblePlugin(je),D.setHiddenElement(null))},[c,D]),_e=C.useCallback(function(de){b.hiddenElement==="second"&&b.setHiddenElement(null),F(de.currentTarget.dataset.name)},[b]),Ve=C.useCallback(function(){b.setHiddenElement(b.hiddenElement==="second"?null:"second")},[b]),Ue=C.useCallback(function(de){de||z(null)},[]),qe=C.useCallback(function(de){de||(z(null),y(null))},[]),Se=M.createElement(Ao,{label:"Add tab"},M.createElement(la,{type:"button",className:"graphiql-tab-add",onClick:J,"aria-label":"Add tab"},M.createElement(SRu,{"aria-hidden":"true"})));return M.createElement(Ao.Provider,null,M.createElement("div",{"data-testid":"graphiql-container",className:"graphiql-container"},M.createElement("div",{className:"graphiql-sidebar"},M.createElement("div",{className:"graphiql-sidebar-section"},c==null?void 0:c.plugins.map(function(de,he){var Be=de===c.visiblePlugin,je="".concat(Be?"Hide":"Show"," ").concat(de.title),bt=de.icon;return M.createElement(Ao,{key:de.title,label:je},M.createElement(la,{type:"button",className:Be?"active":"",onClick:ge,"data-index":he,"aria-label":je},M.createElement(bt,{"aria-hidden":"true"})))})),M.createElement("div",{className:"graphiql-sidebar-section"},M.createElement(Ao,{label:"Re-fetch GraphQL schema"},M.createElement(la,{type:"button",disabled:s.isFetching,onClick:Y,"aria-label":"Re-fetch GraphQL schema"},M.createElement(wRu,{className:s.isFetching?"graphiql-spin":"","aria-hidden":"true"}))),M.createElement(Ao,{label:"Open short keys dialog"},M.createElement(la,{type:"button","data-value":"short-keys",onClick:re,"aria-label":"Open short keys dialog"},M.createElement(kRu,{"aria-hidden":"true"}))),M.createElement(Ao,{label:"Open settings dialog"},M.createElement(la,{type:"button","data-value":"settings",onClick:re,"aria-label":"Open settings dialog"},M.createElement(zRu,{"aria-hidden":"true"}))))),M.createElement("div",{className:"graphiql-main"},M.createElement("div",{ref:D.firstRef,style:{minWidth:"200px"}},M.createElement("div",{className:"graphiql-plugin"},p?M.createElement(p,null):null)),(c==null?void 0:c.visiblePlugin)&&M.createElement("div",{className:"graphiql-horizontal-drag-bar",ref:D.dragBarRef}),M.createElement("div",{ref:D.secondRef,className:"graphiql-sessions"},M.createElement("div",{className:"graphiql-session-header"},u.disableTabs?null:M.createElement(YRe,{values:a.tabs,onReorder:X,"aria-label":"Select active operation"},a.tabs.length>1&&M.createElement(M.Fragment,null,a.tabs.map(function(de,he){return M.createElement($$,{key:de.id,value:de,isActive:he===a.activeTabIndex},M.createElement($$.Button,{"aria-controls":"graphiql-session",id:"graphiql-session-tab-".concat(he),onClick:function(){o.stop(),a.changeTab(he)}},de.title),M.createElement($$.Close,{onClick:function(){a.activeTabIndex===he&&o.stop(),a.closeTab(he)}}))}),Se)),M.createElement("div",{className:"graphiql-session-header-right"},a.tabs.length===1&&Se,L)),M.createElement("div",{role:"tabpanel",id:"graphiql-session",className:"graphiql-session","aria-labelledby":"graphiql-session-tab-".concat(a.activeTabIndex)},M.createElement("div",{ref:x.firstRef},M.createElement("div",{className:"graphiql-editors".concat(a.tabs.length===1?" full-height":"")},M.createElement("div",{ref:b.firstRef},M.createElement("section",{className:"graphiql-query-editor","aria-label":"Query Editor"},M.createElement(tre,{editorTheme:u.editorTheme,keyMap:u.keyMap,onClickReference:I,onCopyQuery:u.onCopyQuery,onEdit:u.onEditQuery,readOnly:u.readOnly}),M.createElement("div",{className:"graphiql-toolbar",role:"toolbar","aria-label":"Editor Commands"},M.createElement(aN,null),T))),M.createElement("div",{ref:b.dragBarRef},M.createElement("div",{className:"graphiql-editor-tools"},M.createElement(la,{type:"button",className:A==="variables"&&b.hiddenElement!=="second"?"active":"",onClick:_e,"data-name":"variables"},"Variables"),r&&M.createElement(la,{type:"button",className:A==="headers"&&b.hiddenElement!=="second"?"active":"",onClick:_e,"data-name":"headers"},"Headers"),M.createElement(Ao,{label:b.hiddenElement==="second"?"Show editor tools":"Hide editor tools"},M.createElement(la,{type:"button",onClick:Ve,"aria-label":b.hiddenElement==="second"?"Show editor tools":"Hide editor tools",className:"graphiql-toggle-editor-tools"},b.hiddenElement==="second"?M.createElement(dRu,{className:"graphiql-chevron-icon","aria-hidden":"true"}):M.createElement(lRu,{className:"graphiql-chevron-icon","aria-hidden":"true"}))))),M.createElement("div",{ref:b.secondRef},M.createElement("section",{className:"graphiql-editor-tool","aria-label":A==="variables"?"Variables":"Headers"},M.createElement(rN,{editorTheme:u.editorTheme,isHidden:A!=="variables",keyMap:u.keyMap,onEdit:u.onEditVariables,onClickReference:I,readOnly:u.readOnly}),r&&M.createElement(uN,{editorTheme:u.editorTheme,isHidden:A!=="headers",keyMap:u.keyMap,onEdit:u.onEditHeaders,readOnly:u.readOnly}))))),M.createElement("div",{className:"graphiql-horizontal-drag-bar",ref:x.dragBarRef}),M.createElement("div",{ref:x.secondRef},M.createElement("div",{className:"graphiql-response"},o.isFetching?M.createElement(Hie,null):null,M.createElement(ure,{editorTheme:u.editorTheme,responseTooltip:u.responseTooltip,keyMap:u.keyMap}),R))))),M.createElement(VD,{open:w==="short-keys",onOpenChange:Ue},M.createElement("div",{className:"graphiql-dialog-header"},M.createElement(VD.Title,{className:"graphiql-dialog-title"},"Short Keys"),M.createElement(VD.Close,null)),M.createElement("div",{className:"graphiql-dialog-section"},M.createElement(QRu,{keyMap:u.keyMap||"sublime"}))),M.createElement(VD,{open:w==="settings",onOpenChange:qe},M.createElement("div",{className:"graphiql-dialog-header"},M.createElement(VD.Title,{className:"graphiql-dialog-title"},"Settings"),M.createElement(VD.Close,null)),u.showPersistHeadersSettings?M.createElement("div",{className:"graphiql-dialog-section"},M.createElement("div",null,M.createElement("div",{className:"graphiql-dialog-section-title"},"Persist headers"),M.createElement("div",{className:"graphiql-dialog-section-caption"},"Save headers upon reloading."," ",M.createElement("span",{className:"graphiql-warning-text"},"Only enable if you trust this device."))),M.createElement($Y,null,M.createElement(Ac,{type:"button",id:"enable-persist-headers",className:a.shouldPersistHeaders?"active":"","data-value":"true",onClick:V},"On"),M.createElement(Ac,{type:"button",id:"disable-persist-headers",className:a.shouldPersistHeaders?"":"active",onClick:V},"Off"))):null,M.createElement("div",{className:"graphiql-dialog-section"},M.createElement("div",null,M.createElement("div",{className:"graphiql-dialog-section-title"},"Theme"),M.createElement("div",{className:"graphiql-dialog-section-caption"},"Adjust how the interface looks like.")),M.createElement($Y,null,M.createElement(Ac,{type:"button",className:g===null?"active":"",onClick:U},"System"),M.createElement(Ac,{type:"button",className:g==="light"?"active":"","data-theme":"light",onClick:U},"Light"),M.createElement(Ac,{type:"button",className:g==="dark"?"active":"","data-theme":"dark",onClick:U},"Dark"))),l?M.createElement("div",{className:"graphiql-dialog-section"},M.createElement("div",null,M.createElement("div",{className:"graphiql-dialog-section-title"},"Clear storage"),M.createElement("div",{className:"graphiql-dialog-section-caption"},"Remove all locally stored data and start fresh.")),M.createElement(Ac,{type:"button",state:O||void 0,disabled:O==="success",onClick:H},{success:"Cleared data",error:"Failed"}[O]||"Clear data")):null)))}var G$=typeof window<"u"&&window.navigator.platform.toLowerCase().indexOf("mac")===0?"Cmd":"Ctrl",YRu=Object.entries({"Search in editor":[G$,"F"],"Search in documentation":[G$,"K"],"Execute query":[G$,"Enter"],"Prettify editors":["Ctrl","Shift","P"],"Merge fragments definitions into operation definition":["Ctrl","Shift","M"],"Copy query":["Ctrl","Shift","C"],"Re-fetch schema using introspection":["Ctrl","Shift","R"]});function QRu(u){var e=u.keyMap;return M.createElement("div",null,M.createElement("table",{className:"graphiql-table"},M.createElement("thead",null,M.createElement("tr",null,M.createElement("th",null,"Short Key"),M.createElement("th",null,"Function"))),M.createElement("tbody",null,YRu.map(function(t){var n=uB(t,2),i=n[0],r=n[1];return M.createElement("tr",{key:i},M.createElement("td",null,r.map(function(a,o,s){return M.createElement(C.Fragment,{key:a},M.createElement("code",{className:"graphiql-key"},a),o!==s.length-1&&" + ")})),M.createElement("td",null,i))}))),M.createElement("p",null,"The editors use"," ",M.createElement("a",{href:"https://codemirror.net/5/doc/manual.html#keymaps",target:"_blank",rel:"noopener noreferrer"},"CodeMirror Key Maps")," ","that add more short keys. This instance of Graph",M.createElement("em",null,"i"),"QL uses"," ",M.createElement("code",null,e),"."))}function HIe(u){return M.createElement("div",{className:"graphiql-logo"},u.children||M.createElement("a",{className:"graphiql-logo-link",href:"https://github.com/graphql/graphiql",target:"_blank",rel:"noreferrer"},"Graph",M.createElement("em",null,"i"),"QL"))}HIe.displayName="GraphiQLLogo";function VIe(u){return M.createElement(M.Fragment,null,u.children)}VIe.displayName="GraphiQLToolbar";function $Ie(u){return M.createElement("div",{className:"graphiql-footer"},u.children)}$Ie.displayName="GraphiQLFooter";function U$(u,e){var t;return!((t=u==null?void 0:u.type)===null||t===void 0)&&t.displayName&&u.type.displayName===e.displayName?!0:u.type===e}/** * @remix-run/router v1.14.2 * diff --git a/assets/info.es-8a2f4160.js b/assets/info.es-bd2a11c8.js similarity index 94% rename from assets/info.es-8a2f4160.js rename to assets/info.es-bd2a11c8.js index 7f77cfbb..e27b7e39 100644 --- a/assets/info.es-8a2f4160.js +++ b/assets/info.es-bd2a11c8.js @@ -1 +1 @@ -import{C as g}from"./codemirror.es-52e8b92d.js";import{E as L,L as C,R as M,_ as x,G as V,O as l}from"./SchemaReference.es-1ed706aa.js";import"./info-addon.es-c9b2027b.js";import"./codemirror.es2-5884f31a.js";import"./forEachState.es-b2033c2b.js";import{X as u,Y as f}from"./index-42855235.js";var k=Object.defineProperty,d=(r,e)=>k(r,"name",{value:e,configurable:!0});g.registerHelper("info","graphql",(r,e)=>{if(!e.schema||!r.state)return;const{kind:i,step:t}=r.state,n=L(e.schema,r.state);if(i==="Field"&&t===0&&n.fieldDef||i==="AliasedField"&&t===2&&n.fieldDef){const c=document.createElement("div");c.className="CodeMirror-info-header",v(c,n,e);const o=document.createElement("div");return o.append(c),p(o,e,n.fieldDef),o}if(i==="Directive"&&t===1&&n.directiveDef){const c=document.createElement("div");c.className="CodeMirror-info-header",D(c,n,e);const o=document.createElement("div");return o.append(c),p(o,e,n.directiveDef),o}if(i==="Argument"&&t===0&&n.argDef){const c=document.createElement("div");c.className="CodeMirror-info-header",y(c,n,e);const o=document.createElement("div");return o.append(c),p(o,e,n.argDef),o}if(i==="EnumValue"&&n.enumValue&&n.enumValue.description){const c=document.createElement("div");c.className="CodeMirror-info-header",N(c,n,e);const o=document.createElement("div");return o.append(c),p(o,e,n.enumValue),o}if(i==="NamedType"&&n.type&&n.type.description){const c=document.createElement("div");c.className="CodeMirror-info-header",m(c,n,e,n.type);const o=document.createElement("div");return o.append(c),p(o,e,n.type),o}});function v(r,e,i){E(r,e,i),s(r,e,i,e.type)}d(v,"renderField");function E(r,e,i){var t;const n=((t=e.fieldDef)===null||t===void 0?void 0:t.name)||"";a(r,n,"field-name",i,C(e))}d(E,"renderQualifiedField");function D(r,e,i){var t;const n="@"+(((t=e.directiveDef)===null||t===void 0?void 0:t.name)||"");a(r,n,"directive-name",i,M(e))}d(D,"renderDirective");function y(r,e,i){var t;const n=((t=e.argDef)===null||t===void 0?void 0:t.name)||"";a(r,n,"arg-name",i,x(e)),s(r,e,i,e.inputType)}d(y,"renderArg");function N(r,e,i){var t;const n=((t=e.enumValue)===null||t===void 0?void 0:t.name)||"";m(r,e,i,e.inputType),a(r,"."),a(r,n,"enum-value",i,V(e))}d(N,"renderEnumValue");function s(r,e,i,t){const n=document.createElement("span");n.className="type-name-pill",t instanceof u?(m(n,e,i,t.ofType),a(n,"!")):t instanceof f?(a(n,"["),m(n,e,i,t.ofType),a(n,"]")):a(n,(t==null?void 0:t.name)||"","type-name",i,l(e,t)),r.append(n)}d(s,"renderTypeAnnotation");function m(r,e,i,t){t instanceof u?(m(r,e,i,t.ofType),a(r,"!")):t instanceof f?(a(r,"["),m(r,e,i,t.ofType),a(r,"]")):a(r,(t==null?void 0:t.name)||"","type-name",i,l(e,t))}d(m,"renderType");function p(r,e,i){const{description:t}=i;if(t){const n=document.createElement("div");n.className="info-description",e.renderDescription?n.innerHTML=e.renderDescription(t):n.append(document.createTextNode(t)),r.append(n)}T(r,e,i)}d(p,"renderDescription");function T(r,e,i){const t=i.deprecationReason;if(t){const n=document.createElement("div");n.className="info-deprecation",r.append(n);const c=document.createElement("span");c.className="info-deprecation-label",c.append(document.createTextNode("Deprecated")),n.append(c);const o=document.createElement("div");o.className="info-deprecation-reason",e.renderDescription?o.innerHTML=e.renderDescription(t):o.append(document.createTextNode(t)),n.append(o)}}d(T,"renderDeprecation");function a(r,e,i="",t={onClick:null},n=null){if(i){const{onClick:c}=t;let o;c?(o=document.createElement("a"),o.href="javascript:void 0",o.addEventListener("click",h=>{c(n,h)})):o=document.createElement("span"),o.className=i,o.append(document.createTextNode(e)),r.append(o)}else r.append(document.createTextNode(e))}d(a,"text"); +import{C as g}from"./codemirror.es-52e8b92d.js";import{E as L,L as C,R as M,_ as x,G as V,O as l}from"./SchemaReference.es-fa096cc0.js";import"./info-addon.es-c9b2027b.js";import"./codemirror.es2-5884f31a.js";import"./forEachState.es-b2033c2b.js";import{X as u,Y as f}from"./index-3e3bc65f.js";var k=Object.defineProperty,d=(r,e)=>k(r,"name",{value:e,configurable:!0});g.registerHelper("info","graphql",(r,e)=>{if(!e.schema||!r.state)return;const{kind:i,step:t}=r.state,n=L(e.schema,r.state);if(i==="Field"&&t===0&&n.fieldDef||i==="AliasedField"&&t===2&&n.fieldDef){const c=document.createElement("div");c.className="CodeMirror-info-header",v(c,n,e);const o=document.createElement("div");return o.append(c),p(o,e,n.fieldDef),o}if(i==="Directive"&&t===1&&n.directiveDef){const c=document.createElement("div");c.className="CodeMirror-info-header",D(c,n,e);const o=document.createElement("div");return o.append(c),p(o,e,n.directiveDef),o}if(i==="Argument"&&t===0&&n.argDef){const c=document.createElement("div");c.className="CodeMirror-info-header",y(c,n,e);const o=document.createElement("div");return o.append(c),p(o,e,n.argDef),o}if(i==="EnumValue"&&n.enumValue&&n.enumValue.description){const c=document.createElement("div");c.className="CodeMirror-info-header",N(c,n,e);const o=document.createElement("div");return o.append(c),p(o,e,n.enumValue),o}if(i==="NamedType"&&n.type&&n.type.description){const c=document.createElement("div");c.className="CodeMirror-info-header",m(c,n,e,n.type);const o=document.createElement("div");return o.append(c),p(o,e,n.type),o}});function v(r,e,i){E(r,e,i),s(r,e,i,e.type)}d(v,"renderField");function E(r,e,i){var t;const n=((t=e.fieldDef)===null||t===void 0?void 0:t.name)||"";a(r,n,"field-name",i,C(e))}d(E,"renderQualifiedField");function D(r,e,i){var t;const n="@"+(((t=e.directiveDef)===null||t===void 0?void 0:t.name)||"");a(r,n,"directive-name",i,M(e))}d(D,"renderDirective");function y(r,e,i){var t;const n=((t=e.argDef)===null||t===void 0?void 0:t.name)||"";a(r,n,"arg-name",i,x(e)),s(r,e,i,e.inputType)}d(y,"renderArg");function N(r,e,i){var t;const n=((t=e.enumValue)===null||t===void 0?void 0:t.name)||"";m(r,e,i,e.inputType),a(r,"."),a(r,n,"enum-value",i,V(e))}d(N,"renderEnumValue");function s(r,e,i,t){const n=document.createElement("span");n.className="type-name-pill",t instanceof u?(m(n,e,i,t.ofType),a(n,"!")):t instanceof f?(a(n,"["),m(n,e,i,t.ofType),a(n,"]")):a(n,(t==null?void 0:t.name)||"","type-name",i,l(e,t)),r.append(n)}d(s,"renderTypeAnnotation");function m(r,e,i,t){t instanceof u?(m(r,e,i,t.ofType),a(r,"!")):t instanceof f?(a(r,"["),m(r,e,i,t.ofType),a(r,"]")):a(r,(t==null?void 0:t.name)||"","type-name",i,l(e,t))}d(m,"renderType");function p(r,e,i){const{description:t}=i;if(t){const n=document.createElement("div");n.className="info-description",e.renderDescription?n.innerHTML=e.renderDescription(t):n.append(document.createTextNode(t)),r.append(n)}T(r,e,i)}d(p,"renderDescription");function T(r,e,i){const t=i.deprecationReason;if(t){const n=document.createElement("div");n.className="info-deprecation",r.append(n);const c=document.createElement("span");c.className="info-deprecation-label",c.append(document.createTextNode("Deprecated")),n.append(c);const o=document.createElement("div");o.className="info-deprecation-reason",e.renderDescription?o.innerHTML=e.renderDescription(t):o.append(document.createTextNode(t)),n.append(o)}}d(T,"renderDeprecation");function a(r,e,i="",t={onClick:null},n=null){if(i){const{onClick:c}=t;let o;c?(o=document.createElement("a"),o.href="javascript:void 0",o.addEventListener("click",h=>{c(n,h)})):o=document.createElement("span"),o.className=i,o.append(document.createTextNode(e)),r.append(o)}else r.append(document.createTextNode(e))}d(a,"text"); diff --git a/assets/javascript-683b6ed1.js b/assets/javascript-fa0a3918.js similarity index 89% rename from assets/javascript-683b6ed1.js rename to assets/javascript-fa0a3918.js index 7fb28ed7..d222a082 100644 --- a/assets/javascript-683b6ed1.js +++ b/assets/javascript-fa0a3918.js @@ -1,4 +1,4 @@ -import{conf as t,language as e}from"./typescript-25bb18d7.js";import"./index-42855235.js";/*!----------------------------------------------------------------------------- +import{conf as t,language as e}from"./typescript-7a1a6d4d.js";import"./index-3e3bc65f.js";/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166) * Released under the MIT license diff --git a/assets/jsonMode-8d6aeb1f.js b/assets/jsonMode-deeab77f.js similarity index 99% rename from assets/jsonMode-8d6aeb1f.js rename to assets/jsonMode-deeab77f.js index f3735885..ce8fbd12 100644 --- a/assets/jsonMode-8d6aeb1f.js +++ b/assets/jsonMode-deeab77f.js @@ -1,4 +1,4 @@ -var Ge=Object.defineProperty;var Qe=(e,n,i)=>n in e?Ge(e,n,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[n]=i;var C=(e,n,i)=>(Qe(e,typeof n!="symbol"?n+"":n,i),i);import{m as Ze}from"./index-42855235.js";/*!----------------------------------------------------------------------------- +var Ge=Object.defineProperty;var Qe=(e,n,i)=>n in e?Ge(e,n,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[n]=i;var C=(e,n,i)=>(Qe(e,typeof n!="symbol"?n+"":n,i),i);import{m as Ze}from"./index-3e3bc65f.js";/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166) * Released under the MIT license diff --git a/assets/jump.es-013c793d.js b/assets/jump.es-d1be1961.js similarity index 95% rename from assets/jump.es-013c793d.js rename to assets/jump.es-d1be1961.js index 10c420b5..5295e8eb 100644 --- a/assets/jump.es-013c793d.js +++ b/assets/jump.es-d1be1961.js @@ -1 +1 @@ -import{C as u}from"./codemirror.es-52e8b92d.js";import{E as g,L as M,R as k,_ as v,G as y,O}from"./SchemaReference.es-1ed706aa.js";import"./codemirror.es2-5884f31a.js";import"./forEachState.es-b2033c2b.js";import"./index-42855235.js";var D=Object.defineProperty,s=(t,n)=>D(t,"name",{value:n,configurable:!0});u.defineOption("jump",!1,(t,n,i)=>{if(i&&i!==u.Init){const e=t.state.jump.onMouseOver;u.off(t.getWrapperElement(),"mouseover",e);const r=t.state.jump.onMouseOut;u.off(t.getWrapperElement(),"mouseout",r),u.off(document,"keydown",t.state.jump.onKeyDown),delete t.state.jump}if(n){const e=t.state.jump={options:n,onMouseOver:c.bind(null,t),onMouseOut:d.bind(null,t),onKeyDown:f.bind(null,t)};u.on(t.getWrapperElement(),"mouseover",e.onMouseOver),u.on(t.getWrapperElement(),"mouseout",e.onMouseOut),u.on(document,"keydown",e.onKeyDown)}});function c(t,n){const i=n.target||n.srcElement;if(!(i instanceof HTMLElement)||(i==null?void 0:i.nodeName)!=="SPAN")return;const e=i.getBoundingClientRect(),r={left:(e.left+e.right)/2,top:(e.top+e.bottom)/2};t.state.jump.cursor=r,t.state.jump.isHoldingModifier&&p(t)}s(c,"onMouseOver");function d(t){if(!t.state.jump.isHoldingModifier&&t.state.jump.cursor){t.state.jump.cursor=null;return}t.state.jump.isHoldingModifier&&t.state.jump.marker&&l(t)}s(d,"onMouseOut");function f(t,n){if(t.state.jump.isHoldingModifier||!j(n.key))return;t.state.jump.isHoldingModifier=!0,t.state.jump.cursor&&p(t);const i=s(o=>{o.code===n.code&&(t.state.jump.isHoldingModifier=!1,t.state.jump.marker&&l(t),u.off(document,"keyup",i),u.off(document,"click",e),t.off("mousedown",r))},"onKeyUp"),e=s(o=>{const{destination:a,options:m}=t.state.jump;a&&m.onClick(a,o)},"onClick"),r=s((o,a)=>{t.state.jump.destination&&(a.codemirrorIgnore=!0)},"onMouseDown");u.on(document,"keyup",i),u.on(document,"click",e),t.on("mousedown",r)}s(f,"onKeyDown");const w=typeof navigator<"u"&&navigator&&navigator.appVersion.includes("Mac");function j(t){return t===(w?"Meta":"Control")}s(j,"isJumpModifier");function p(t){if(t.state.jump.marker)return;const{cursor:n,options:i}=t.state.jump,e=t.coordsChar(n),r=t.getTokenAt(e,!0),o=i.getDestination||t.getHelper(e,"jump");if(o){const a=o(r,i,t);if(a){const m=t.markText({line:e.line,ch:r.start},{line:e.line,ch:r.end},{className:"CodeMirror-jump-token"});t.state.jump.marker=m,t.state.jump.destination=a}}}s(p,"enableJumpMode");function l(t){const{marker:n}=t.state.jump;t.state.jump.marker=null,t.state.jump.destination=null,n.clear()}s(l,"disableJumpMode");u.registerHelper("jump","graphql",(t,n)=>{if(!n.schema||!n.onClick||!t.state)return;const{state:i}=t,{kind:e,step:r}=i,o=g(n.schema,i);if(e==="Field"&&r===0&&o.fieldDef||e==="AliasedField"&&r===2&&o.fieldDef)return M(o);if(e==="Directive"&&r===1&&o.directiveDef)return k(o);if(e==="Argument"&&r===0&&o.argDef)return v(o);if(e==="EnumValue"&&o.enumValue)return y(o);if(e==="NamedType"&&o.type)return O(o)}); +import{C as u}from"./codemirror.es-52e8b92d.js";import{E as g,L as M,R as k,_ as v,G as y,O}from"./SchemaReference.es-fa096cc0.js";import"./codemirror.es2-5884f31a.js";import"./forEachState.es-b2033c2b.js";import"./index-3e3bc65f.js";var D=Object.defineProperty,s=(t,n)=>D(t,"name",{value:n,configurable:!0});u.defineOption("jump",!1,(t,n,i)=>{if(i&&i!==u.Init){const e=t.state.jump.onMouseOver;u.off(t.getWrapperElement(),"mouseover",e);const r=t.state.jump.onMouseOut;u.off(t.getWrapperElement(),"mouseout",r),u.off(document,"keydown",t.state.jump.onKeyDown),delete t.state.jump}if(n){const e=t.state.jump={options:n,onMouseOver:c.bind(null,t),onMouseOut:d.bind(null,t),onKeyDown:f.bind(null,t)};u.on(t.getWrapperElement(),"mouseover",e.onMouseOver),u.on(t.getWrapperElement(),"mouseout",e.onMouseOut),u.on(document,"keydown",e.onKeyDown)}});function c(t,n){const i=n.target||n.srcElement;if(!(i instanceof HTMLElement)||(i==null?void 0:i.nodeName)!=="SPAN")return;const e=i.getBoundingClientRect(),r={left:(e.left+e.right)/2,top:(e.top+e.bottom)/2};t.state.jump.cursor=r,t.state.jump.isHoldingModifier&&p(t)}s(c,"onMouseOver");function d(t){if(!t.state.jump.isHoldingModifier&&t.state.jump.cursor){t.state.jump.cursor=null;return}t.state.jump.isHoldingModifier&&t.state.jump.marker&&l(t)}s(d,"onMouseOut");function f(t,n){if(t.state.jump.isHoldingModifier||!j(n.key))return;t.state.jump.isHoldingModifier=!0,t.state.jump.cursor&&p(t);const i=s(o=>{o.code===n.code&&(t.state.jump.isHoldingModifier=!1,t.state.jump.marker&&l(t),u.off(document,"keyup",i),u.off(document,"click",e),t.off("mousedown",r))},"onKeyUp"),e=s(o=>{const{destination:a,options:m}=t.state.jump;a&&m.onClick(a,o)},"onClick"),r=s((o,a)=>{t.state.jump.destination&&(a.codemirrorIgnore=!0)},"onMouseDown");u.on(document,"keyup",i),u.on(document,"click",e),t.on("mousedown",r)}s(f,"onKeyDown");const w=typeof navigator<"u"&&navigator&&navigator.appVersion.includes("Mac");function j(t){return t===(w?"Meta":"Control")}s(j,"isJumpModifier");function p(t){if(t.state.jump.marker)return;const{cursor:n,options:i}=t.state.jump,e=t.coordsChar(n),r=t.getTokenAt(e,!0),o=i.getDestination||t.getHelper(e,"jump");if(o){const a=o(r,i,t);if(a){const m=t.markText({line:e.line,ch:r.start},{line:e.line,ch:r.end},{className:"CodeMirror-jump-token"});t.state.jump.marker=m,t.state.jump.destination=a}}}s(p,"enableJumpMode");function l(t){const{marker:n}=t.state.jump;t.state.jump.marker=null,t.state.jump.destination=null,n.clear()}s(l,"disableJumpMode");u.registerHelper("jump","graphql",(t,n)=>{if(!n.schema||!n.onClick||!t.state)return;const{state:i}=t,{kind:e,step:r}=i,o=g(n.schema,i);if(e==="Field"&&r===0&&o.fieldDef||e==="AliasedField"&&r===2&&o.fieldDef)return M(o);if(e==="Directive"&&r===1&&o.directiveDef)return k(o);if(e==="Argument"&&r===0&&o.argDef)return v(o);if(e==="EnumValue"&&o.enumValue)return y(o);if(e==="NamedType"&&o.type)return O(o)}); diff --git a/assets/lint.es2-5aecff45.js b/assets/lint.es2-6f9142d2.js similarity index 99% rename from assets/lint.es2-5aecff45.js rename to assets/lint.es2-6f9142d2.js index 89231257..c59ee002 100644 --- a/assets/lint.es2-5aecff45.js +++ b/assets/lint.es2-6f9142d2.js @@ -1,4 +1,4 @@ -import{C as q}from"./codemirror.es-52e8b92d.js";import{K as u,G as p,d as _,i as ue,a as S,n as fe,b as w,s as F,c as h,e as R,p as v,f as X,h as y,j as T,D as E,O as G,k as Ae,l as Pe,o as O,q as P,r as I,u as k,v as te,w as ke,x as Ue,y as de,z as $,A as pe,B as U,C as Ve,E as je,F as Le,H as Me,I as Ye,J as Xe,L as Be,M as re,T as me,N as ge,P as Te,Q as qe,R as Ge,S as Je,U as Qe,V as He,W as Ke}from"./index-42855235.js";import{R as Ee,P as V}from"./Range-52ddcb6a.js";import"./codemirror.es2-5884f31a.js";function We(e){return e.kind===u.OPERATION_DEFINITION||e.kind===u.FRAGMENT_DEFINITION}function ze(e){return e.kind===u.SCHEMA_DEFINITION||B(e)||e.kind===u.DIRECTIVE_DEFINITION}function B(e){return e.kind===u.SCALAR_TYPE_DEFINITION||e.kind===u.OBJECT_TYPE_DEFINITION||e.kind===u.INTERFACE_TYPE_DEFINITION||e.kind===u.UNION_TYPE_DEFINITION||e.kind===u.ENUM_TYPE_DEFINITION||e.kind===u.INPUT_OBJECT_TYPE_DEFINITION}function Ze(e){return e.kind===u.SCHEMA_EXTENSION||Ne(e)}function Ne(e){return e.kind===u.SCALAR_TYPE_EXTENSION||e.kind===u.OBJECT_TYPE_EXTENSION||e.kind===u.INTERFACE_TYPE_EXTENSION||e.kind===u.UNION_TYPE_EXTENSION||e.kind===u.ENUM_TYPE_EXTENSION||e.kind===u.INPUT_OBJECT_TYPE_EXTENSION}function ve(e){return{Document(t){for(const n of t.definitions)if(!We(n)){const r=n.kind===u.SCHEMA_DEFINITION||n.kind===u.SCHEMA_EXTENSION?"schema":'"'+n.name.value+'"';e.reportError(new p(`The ${r} definition is not executable.`,{nodes:n}))}return!1}}}function xe(e){return{Field(t){const n=e.getParentType();if(n&&!e.getFieldDef()){const i=e.getSchema(),s=t.name.value;let a=_("to use an inline fragment on",en(i,n,s));a===""&&(a=_(nn(n,s))),e.reportError(new p(`Cannot query field "${s}" on type "${n.name}".`+a,{nodes:t}))}}}}function en(e,t,n){if(!ue(t))return[];const r=new Set,i=Object.create(null);for(const a of e.getPossibleTypes(t))if(a.getFields()[n]){r.add(a),i[a.name]=1;for(const o of a.getInterfaces()){var s;o.getFields()[n]&&(r.add(o),i[o.name]=((s=i[o.name])!==null&&s!==void 0?s:0)+1)}}return[...r].sort((a,o)=>{const l=i[o.name]-i[a.name];return l!==0?l:S(a)&&e.isSubType(a,o)?-1:S(o)&&e.isSubType(o,a)?1:fe(a.name,o.name)}).map(a=>a.name)}function nn(e,t){if(w(e)||S(e)){const n=Object.keys(e.getFields());return F(t,n)}return[]}function tn(e){return{InlineFragment(t){const n=t.typeCondition;if(n){const r=h(e.getSchema(),n);if(r&&!R(r)){const i=v(n);e.reportError(new p(`Fragment cannot condition on non composite type "${i}".`,{nodes:n}))}}},FragmentDefinition(t){const n=h(e.getSchema(),t.typeCondition);if(n&&!R(n)){const r=v(t.typeCondition);e.reportError(new p(`Fragment "${t.name.value}" cannot condition on non composite type "${r}".`,{nodes:t.typeCondition}))}}}}function rn(e){return{...sn(e),Argument(t){const n=e.getArgument(),r=e.getFieldDef(),i=e.getParentType();if(!n&&r&&i){const s=t.name.value,a=r.args.map(l=>l.name),o=F(s,a);e.reportError(new p(`Unknown argument "${s}" on field "${i.name}.${r.name}".`+_(o),{nodes:t}))}}}}function sn(e){const t=Object.create(null),n=e.getSchema(),r=n?n.getDirectives():X;for(const a of r)t[a.name]=a.args.map(o=>o.name);const i=e.getDocument().definitions;for(const a of i)if(a.kind===u.DIRECTIVE_DEFINITION){var s;const o=(s=a.arguments)!==null&&s!==void 0?s:[];t[a.name.value]=o.map(l=>l.name.value)}return{Directive(a){const o=a.name.value,l=t[o];if(a.arguments&&l)for(const c of a.arguments){const f=c.name.value;if(!l.includes(f)){const d=F(f,l);e.reportError(new p(`Unknown argument "${f}" on directive "@${o}".`+_(d),{nodes:c}))}}return!1}}}function ye(e){const t=Object.create(null),n=e.getSchema(),r=n?n.getDirectives():X;for(const s of r)t[s.name]=s.locations;const i=e.getDocument().definitions;for(const s of i)s.kind===u.DIRECTIVE_DEFINITION&&(t[s.name.value]=s.locations.map(a=>a.value));return{Directive(s,a,o,l,c){const f=s.name.value,d=t[f];if(!d){e.reportError(new p(`Unknown directive "@${f}".`,{nodes:s}));return}const m=on(c);m&&!d.includes(m)&&e.reportError(new p(`Directive "@${f}" may not be used on ${m}.`,{nodes:s}))}}}function on(e){const t=e[e.length-1];switch("kind"in t||y(!1),t.kind){case u.OPERATION_DEFINITION:return an(t.operation);case u.FIELD:return E.FIELD;case u.FRAGMENT_SPREAD:return E.FRAGMENT_SPREAD;case u.INLINE_FRAGMENT:return E.INLINE_FRAGMENT;case u.FRAGMENT_DEFINITION:return E.FRAGMENT_DEFINITION;case u.VARIABLE_DEFINITION:return E.VARIABLE_DEFINITION;case u.SCHEMA_DEFINITION:case u.SCHEMA_EXTENSION:return E.SCHEMA;case u.SCALAR_TYPE_DEFINITION:case u.SCALAR_TYPE_EXTENSION:return E.SCALAR;case u.OBJECT_TYPE_DEFINITION:case u.OBJECT_TYPE_EXTENSION:return E.OBJECT;case u.FIELD_DEFINITION:return E.FIELD_DEFINITION;case u.INTERFACE_TYPE_DEFINITION:case u.INTERFACE_TYPE_EXTENSION:return E.INTERFACE;case u.UNION_TYPE_DEFINITION:case u.UNION_TYPE_EXTENSION:return E.UNION;case u.ENUM_TYPE_DEFINITION:case u.ENUM_TYPE_EXTENSION:return E.ENUM;case u.ENUM_VALUE_DEFINITION:return E.ENUM_VALUE;case u.INPUT_OBJECT_TYPE_DEFINITION:case u.INPUT_OBJECT_TYPE_EXTENSION:return E.INPUT_OBJECT;case u.INPUT_VALUE_DEFINITION:{const n=e[e.length-3];return"kind"in n||y(!1),n.kind===u.INPUT_OBJECT_TYPE_DEFINITION?E.INPUT_FIELD_DEFINITION:E.ARGUMENT_DEFINITION}default:y(!1,"Unexpected kind: "+T(t.kind))}}function an(e){switch(e){case G.QUERY:return E.QUERY;case G.MUTATION:return E.MUTATION;case G.SUBSCRIPTION:return E.SUBSCRIPTION}}function Ie(e){return{FragmentSpread(t){const n=t.name.value;e.getFragment(n)||e.reportError(new p(`Unknown fragment "${n}".`,{nodes:t.name}))}}}function he(e){const t=e.getSchema(),n=t?t.getTypeMap():Object.create(null),r=Object.create(null);for(const s of e.getDocument().definitions)B(s)&&(r[s.name.value]=!0);const i=[...Object.keys(n),...Object.keys(r)];return{NamedType(s,a,o,l,c){const f=s.name.value;if(!n[f]&&!r[f]){var d;const m=(d=c[2])!==null&&d!==void 0?d:o,g=m!=null&&ln(m);if(g&&ie.includes(f))return;const N=F(f,g?ie.concat(i):i);e.reportError(new p(`Unknown type "${f}".`+_(N),{nodes:s}))}}}}const ie=[...Ae,...Pe].map(e=>e.name);function ln(e){return"kind"in e&&(ze(e)||Ze(e))}function cn(e){let t=0;return{Document(n){t=n.definitions.filter(r=>r.kind===u.OPERATION_DEFINITION).length},OperationDefinition(n){!n.name&&t>1&&e.reportError(new p("This anonymous operation must be the only defined operation.",{nodes:n}))}}}function un(e){var t,n,r;const i=e.getSchema(),s=(t=(n=(r=i==null?void 0:i.astNode)!==null&&r!==void 0?r:i==null?void 0:i.getQueryType())!==null&&n!==void 0?n:i==null?void 0:i.getMutationType())!==null&&t!==void 0?t:i==null?void 0:i.getSubscriptionType();let a=0;return{SchemaDefinition(o){if(s){e.reportError(new p("Cannot define a new schema within a schema extension.",{nodes:o}));return}a>0&&e.reportError(new p("Must provide only one schema definition.",{nodes:o})),++a}}}function fn(e){const t=Object.create(null),n=[],r=Object.create(null);return{OperationDefinition:()=>!1,FragmentDefinition(s){return i(s),!1}};function i(s){if(t[s.name.value])return;const a=s.name.value;t[a]=!0;const o=e.getFragmentSpreads(s.selectionSet);if(o.length!==0){r[a]=n.length;for(const l of o){const c=l.name.value,f=r[c];if(n.push(l),f===void 0){const d=e.getFragment(c);d&&i(d)}else{const d=n.slice(f),m=d.slice(0,-1).map(g=>'"'+g.name.value+'"').join(", ");e.reportError(new p(`Cannot spread fragment "${c}" within itself`+(m!==""?` via ${m}.`:"."),{nodes:d}))}n.pop()}r[a]=void 0}}}function dn(e){let t=Object.create(null);return{OperationDefinition:{enter(){t=Object.create(null)},leave(n){const r=e.getRecursiveVariableUsages(n);for(const{node:i}of r){const s=i.name.value;t[s]!==!0&&e.reportError(new p(n.name?`Variable "$${s}" is not defined by operation "${n.name.value}".`:`Variable "$${s}" is not defined.`,{nodes:[i,n]}))}}},VariableDefinition(n){t[n.variable.name.value]=!0}}}function Oe(e){const t=[],n=[];return{OperationDefinition(r){return t.push(r),!1},FragmentDefinition(r){return n.push(r),!1},Document:{leave(){const r=Object.create(null);for(const i of t)for(const s of e.getRecursivelyReferencedFragments(i))r[s.name.value]=!0;for(const i of n){const s=i.name.value;r[s]!==!0&&e.reportError(new p(`Fragment "${s}" is never used.`,{nodes:i}))}}}}}function pn(e){let t=[];return{OperationDefinition:{enter(){t=[]},leave(n){const r=Object.create(null),i=e.getRecursiveVariableUsages(n);for(const{node:s}of i)r[s.name.value]=!0;for(const s of t){const a=s.variable.name.value;r[a]!==!0&&e.reportError(new p(n.name?`Variable "$${a}" is never used in operation "${n.name.value}".`:`Variable "$${a}" is never used.`,{nodes:s}))}}},VariableDefinition(n){t.push(n)}}}function z(e){switch(e.kind){case u.OBJECT:return{...e,fields:mn(e.fields)};case u.LIST:return{...e,values:e.values.map(z)};case u.INT:case u.FLOAT:case u.STRING:case u.BOOLEAN:case u.NULL:case u.ENUM:case u.VARIABLE:return e}}function mn(e){return e.map(t=>({...t,value:z(t.value)})).sort((t,n)=>fe(t.name.value,n.name.value))}function De(e){return Array.isArray(e)?e.map(([t,n])=>`subfields "${t}" conflict because `+De(n)).join(" and "):e}function gn(e){const t=new In,n=new Map;return{SelectionSet(r){const i=Tn(e,n,t,e.getParentType(),r);for(const[[s,a],o,l]of i){const c=De(a);e.reportError(new p(`Fields "${s}" conflict because ${c}. Use different aliases on the fields to fetch both if this was intentional.`,{nodes:o.concat(l)}))}}}}function Tn(e,t,n,r,i){const s=[],[a,o]=M(e,t,r,i);if(Nn(e,s,t,n,a),o.length!==0)for(let l=0;l1)for(let o=0;o[s.value,a]));return n.every(s=>{const a=s.value,o=i.get(s.name.value);return o===void 0?!1:se(a)===se(o)})}function se(e){return v(z(e))}function Q(e,t){return P(e)?P(t)?Q(e.ofType,t.ofType):!0:P(t)?!0:I(e)?I(t)?Q(e.ofType,t.ofType):!0:I(t)?!0:k(e)||k(t)?e!==t:!1}function M(e,t,n,r){const i=t.get(r);if(i)return i;const s=Object.create(null),a=Object.create(null);be(e,n,r,s,a);const o=[s,Object.keys(a)];return t.set(r,o),o}function H(e,t,n){const r=t.get(n.selectionSet);if(r)return r;const i=h(e.getSchema(),n.typeCondition);return M(e,t,i,n.selectionSet)}function be(e,t,n,r,i){for(const s of n.selections)switch(s.kind){case u.FIELD:{const a=s.name.value;let o;(w(t)||S(t))&&(o=t.getFields()[a]);const l=s.alias?s.alias.value:a;r[l]||(r[l]=[]),r[l].push([t,s,o]);break}case u.FRAGMENT_SPREAD:i[s.name.value]=!0;break;case u.INLINE_FRAGMENT:{const a=s.typeCondition,o=a?h(e.getSchema(),a):t;be(e,o,s.selectionSet,r,i);break}}}function yn(e,t,n,r){if(e.length>0)return[[t,e.map(([i])=>i)],[n,...e.map(([,i])=>i).flat()],[r,...e.map(([,,i])=>i).flat()]]}class In{constructor(){this._data=new Map}has(t,n,r){var i;const[s,a]=ts.name.value));for(const s of r.args)if(!i.has(s.name)&&pe(s)){const a=T(s.type);e.reportError(new p(`Field "${r.name}" argument "${s.name}" of type "${a}" is required, but it was not provided.`,{nodes:t}))}}}}}function Fn(e){var t;const n=Object.create(null),r=e.getSchema(),i=(t=r==null?void 0:r.getDirectives())!==null&&t!==void 0?t:X;for(const o of i)n[o.name]=U(o.args.filter(pe),l=>l.name);const s=e.getDocument().definitions;for(const o of s)if(o.kind===u.DIRECTIVE_DEFINITION){var a;const l=(a=o.arguments)!==null&&a!==void 0?a:[];n[o.name.value]=U(l.filter(Rn),c=>c.name.value)}return{Directive:{leave(o){const l=o.name.value,c=n[l];if(c){var f;const d=(f=o.arguments)!==null&&f!==void 0?f:[],m=new Set(d.map(g=>g.name.value));for(const[g,N]of Object.entries(c))if(!m.has(g)){const b=Ve(N.type)?T(N.type):v(N.type);e.reportError(new p(`Directive "@${l}" argument "${g}" of type "${b}" is required, but it was not provided.`,{nodes:o}))}}}}}}function Rn(e){return e.type.kind===u.NON_NULL_TYPE&&e.defaultValue==null}function $n(e){return{Field(t){const n=e.getType(),r=t.selectionSet;if(n){if(k(O(n))){if(r){const i=t.name.value,s=T(n);e.reportError(new p(`Field "${i}" must not have a selection since type "${s}" has no subfields.`,{nodes:r}))}}else if(!r){const i=t.name.value,s=T(n);e.reportError(new p(`Field "${i}" of type "${s}" must have a selection of subfields. Did you mean "${i} { ... }"?`,{nodes:t}))}}}}}function Cn(e,t,n){var r;const i={},s=(r=t.arguments)!==null&&r!==void 0?r:[],a=U(s,o=>o.name.value);for(const o of e.args){const l=o.name,c=o.type,f=a[l];if(!f){if(o.defaultValue!==void 0)i[l]=o.defaultValue;else if(I(c))throw new p(`Argument "${l}" of required type "${T(c)}" was not provided.`,{nodes:t});continue}const d=f.value;let m=d.kind===u.NULL;if(d.kind===u.VARIABLE){const N=d.name.value;if(n==null||!An(n,N)){if(o.defaultValue!==void 0)i[l]=o.defaultValue;else if(I(c))throw new p(`Argument "${l}" of required type "${T(c)}" was provided the variable "$${N}" which was not provided a runtime value.`,{nodes:d});continue}m=n[N]==null}if(m&&I(c))throw new p(`Argument "${l}" of non-null type "${T(c)}" must not be null.`,{nodes:d});const g=je(d,c,n);if(g===void 0)throw new p(`Argument "${l}" has invalid value ${v(d)}.`,{nodes:d});i[l]=g}return i}function oe(e,t,n){var r;const i=(r=t.directives)===null||r===void 0?void 0:r.find(s=>s.name.value===e.name);if(i)return Cn(e,i,n)}function An(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Pn(e,t,n,r,i){const s=new Map;return K(e,t,n,r,i,s,new Set),s}function K(e,t,n,r,i,s,a){for(const o of i.selections)switch(o.kind){case u.FIELD:{if(!J(n,o))continue;const l=kn(o),c=s.get(l);c!==void 0?c.push(o):s.set(l,[o]);break}case u.INLINE_FRAGMENT:{if(!J(n,o)||!ae(e,o,r))continue;K(e,t,n,r,o.selectionSet,s,a);break}case u.FRAGMENT_SPREAD:{const l=o.name.value;if(a.has(l)||!J(n,o))continue;a.add(l);const c=t[l];if(!c||!ae(e,c,r))continue;K(e,t,n,r,c.selectionSet,s,a);break}}}function J(e,t){const n=oe(Le,t,e);if((n==null?void 0:n.if)===!0)return!1;const r=oe(Me,t,e);return(r==null?void 0:r.if)!==!1}function ae(e,t,n){const r=t.typeCondition;if(!r)return!0;const i=h(e,r);return i===n?!0:ue(i)?e.isSubType(i,n):!1}function kn(e){return e.alias?e.alias.value:e.name.value}function Un(e){return{OperationDefinition(t){if(t.operation==="subscription"){const n=e.getSchema(),r=n.getSubscriptionType();if(r){const i=t.name?t.name.value:null,s=Object.create(null),a=e.getDocument(),o=Object.create(null);for(const c of a.definitions)c.kind===u.FRAGMENT_DEFINITION&&(o[c.name.value]=c);const l=Pn(n,o,s,r,t.selectionSet);if(l.size>1){const d=[...l.values()].slice(1).flat();e.reportError(new p(i!=null?`Subscription "${i}" must select only one top level field.`:"Anonymous Subscription must select only one top level field.",{nodes:d}))}for(const c of l.values())c[0].name.value.startsWith("__")&&e.reportError(new p(i!=null?`Subscription "${i}" must not select an introspection top level field.`:"Anonymous Subscription must not select an introspection top level field.",{nodes:c}))}}}}}function Se(e,t){const n=new Map;for(const r of e){const i=t(r),s=n.get(i);s===void 0?n.set(i,[r]):s.push(r)}return n}function we(e){return{Field:t,Directive:t};function t(n){var r;const i=(r=n.arguments)!==null&&r!==void 0?r:[],s=Se(i,a=>a.name.value);for(const[a,o]of s)o.length>1&&e.reportError(new p(`There can be only one argument named "${a}".`,{nodes:o.map(l=>l.name)}))}}function Vn(e){const t=Object.create(null),n=e.getSchema();return{DirectiveDefinition(r){const i=r.name.value;if(n!=null&&n.getDirective(i)){e.reportError(new p(`Directive "@${i}" already exists in the schema. It cannot be redefined.`,{nodes:r.name}));return}return t[i]?e.reportError(new p(`There can be only one directive named "@${i}".`,{nodes:[t[i],r.name]})):t[i]=r.name,!1}}}function Fe(e){const t=Object.create(null),n=e.getSchema(),r=n?n.getDirectives():X;for(const o of r)t[o.name]=!o.isRepeatable;const i=e.getDocument().definitions;for(const o of i)o.kind===u.DIRECTIVE_DEFINITION&&(t[o.name.value]=!o.repeatable);const s=Object.create(null),a=Object.create(null);return{enter(o){if(!("directives"in o)||!o.directives)return;let l;if(o.kind===u.SCHEMA_DEFINITION||o.kind===u.SCHEMA_EXTENSION)l=s;else if(B(o)||Ne(o)){const c=o.name.value;l=a[c],l===void 0&&(a[c]=l=Object.create(null))}else l=Object.create(null);for(const c of o.directives){const f=c.name.value;t[f]&&(l[f]?e.reportError(new p(`The directive "@${f}" can only be used once at this location.`,{nodes:[l[f],c]})):l[f]=c)}}}}function jn(e){const t=e.getSchema(),n=t?t.getTypeMap():Object.create(null),r=Object.create(null);return{EnumTypeDefinition:i,EnumTypeExtension:i};function i(s){var a;const o=s.name.value;r[o]||(r[o]=Object.create(null));const l=(a=s.values)!==null&&a!==void 0?a:[],c=r[o];for(const f of l){const d=f.name.value,m=n[o];de(m)&&m.getValue(d)?e.reportError(new p(`Enum value "${o}.${d}" already exists in the schema. It cannot also be defined in this type extension.`,{nodes:f.name})):c[d]?e.reportError(new p(`Enum value "${o}.${d}" can only be defined once.`,{nodes:[c[d],f.name]})):c[d]=f.name}return!1}}function Ln(e){const t=e.getSchema(),n=t?t.getTypeMap():Object.create(null),r=Object.create(null);return{InputObjectTypeDefinition:i,InputObjectTypeExtension:i,InterfaceTypeDefinition:i,InterfaceTypeExtension:i,ObjectTypeDefinition:i,ObjectTypeExtension:i};function i(s){var a;const o=s.name.value;r[o]||(r[o]=Object.create(null));const l=(a=s.fields)!==null&&a!==void 0?a:[],c=r[o];for(const f of l){const d=f.name.value;Mn(n[o],d)?e.reportError(new p(`Field "${o}.${d}" already exists in the schema. It cannot also be defined in this type extension.`,{nodes:f.name})):c[d]?e.reportError(new p(`Field "${o}.${d}" can only be defined once.`,{nodes:[c[d],f.name]})):c[d]=f.name}return!1}}function Mn(e,t){return w(e)||S(e)||$(e)?e.getFields()[t]!=null:!1}function Yn(e){const t=Object.create(null);return{OperationDefinition:()=>!1,FragmentDefinition(n){const r=n.name.value;return t[r]?e.reportError(new p(`There can be only one fragment named "${r}".`,{nodes:[t[r],n.name]})):t[r]=n.name,!1}}}function Re(e){const t=[];let n=Object.create(null);return{ObjectValue:{enter(){t.push(n),n=Object.create(null)},leave(){const r=t.pop();r||y(!1),n=r}},ObjectField(r){const i=r.name.value;n[i]?e.reportError(new p(`There can be only one input field named "${i}".`,{nodes:[n[i],r.name]})):n[i]=r.name}}}function Xn(e){const t=Object.create(null);return{OperationDefinition(n){const r=n.name;return r&&(t[r.value]?e.reportError(new p(`There can be only one operation named "${r.value}".`,{nodes:[t[r.value],r]})):t[r.value]=r),!1},FragmentDefinition:()=>!1}}function Bn(e){const t=e.getSchema(),n=Object.create(null),r=t?{query:t.getQueryType(),mutation:t.getMutationType(),subscription:t.getSubscriptionType()}:{};return{SchemaDefinition:i,SchemaExtension:i};function i(s){var a;const o=(a=s.operationTypes)!==null&&a!==void 0?a:[];for(const l of o){const c=l.operation,f=n[c];r[c]?e.reportError(new p(`Type for ${c} already defined in the schema. It cannot be redefined.`,{nodes:l})):f?e.reportError(new p(`There can be only one ${c} type in schema.`,{nodes:[f,l]})):n[c]=l}return!1}}function qn(e){const t=Object.create(null),n=e.getSchema();return{ScalarTypeDefinition:r,ObjectTypeDefinition:r,InterfaceTypeDefinition:r,UnionTypeDefinition:r,EnumTypeDefinition:r,InputObjectTypeDefinition:r};function r(i){const s=i.name.value;if(n!=null&&n.getType(s)){e.reportError(new p(`Type "${s}" already exists in the schema. It cannot also be defined in this type definition.`,{nodes:i.name}));return}return t[s]?e.reportError(new p(`There can be only one type named "${s}".`,{nodes:[t[s],i.name]})):t[s]=i.name,!1}}function Gn(e){return{OperationDefinition(t){var n;const r=(n=t.variableDefinitions)!==null&&n!==void 0?n:[],i=Se(r,s=>s.variable.name.value);for(const[s,a]of i)a.length>1&&e.reportError(new p(`There can be only one variable named "$${s}".`,{nodes:a.map(o=>o.variable.name)}))}}}function Jn(e){return{ListValue(t){const n=Ye(e.getParentInputType());if(!P(n))return D(e,t),!1},ObjectValue(t){const n=O(e.getInputType());if(!$(n))return D(e,t),!1;const r=U(t.fields,i=>i.name.value);for(const i of Object.values(n.getFields()))if(!r[i.name]&&Xe(i)){const a=T(i.type);e.reportError(new p(`Field "${n.name}.${i.name}" of required type "${a}" was not provided.`,{nodes:t}))}},ObjectField(t){const n=O(e.getParentInputType());if(!e.getInputType()&&$(n)){const i=F(t.name.value,Object.keys(n.getFields()));e.reportError(new p(`Field "${t.name.value}" is not defined by type "${n.name}".`+_(i),{nodes:t}))}},NullValue(t){const n=e.getInputType();I(n)&&e.reportError(new p(`Expected value of type "${T(n)}", found ${v(t)}.`,{nodes:t}))},EnumValue:t=>D(e,t),IntValue:t=>D(e,t),FloatValue:t=>D(e,t),StringValue:t=>D(e,t),BooleanValue:t=>D(e,t)}}function D(e,t){const n=e.getInputType();if(!n)return;const r=O(n);if(!k(r)){const i=T(n);e.reportError(new p(`Expected value of type "${i}", found ${v(t)}.`,{nodes:t}));return}try{if(r.parseLiteral(t,void 0)===void 0){const s=T(n);e.reportError(new p(`Expected value of type "${s}", found ${v(t)}.`,{nodes:t}))}}catch(i){const s=T(n);i instanceof p?e.reportError(i):e.reportError(new p(`Expected value of type "${s}", found ${v(t)}; `+i.message,{nodes:t,originalError:i}))}}function Qn(e){return{VariableDefinition(t){const n=h(e.getSchema(),t.type);if(n!==void 0&&!Be(n)){const r=t.variable.name.value,i=v(t.type);e.reportError(new p(`Variable "$${r}" cannot be non-input type "${i}".`,{nodes:t.type}))}}}}function Hn(e){let t=Object.create(null);return{OperationDefinition:{enter(){t=Object.create(null)},leave(n){const r=e.getRecursiveVariableUsages(n);for(const{node:i,type:s,defaultValue:a}of r){const o=i.name.value,l=t[o];if(l&&s){const c=e.getSchema(),f=h(c,l.type);if(f&&!Kn(c,f,l.defaultValue,s,a)){const d=T(f),m=T(s);e.reportError(new p(`Variable "$${o}" of type "${d}" used in position expecting type "${m}".`,{nodes:[l,i]}))}}}}},VariableDefinition(n){t[n.variable.name.value]=n}}}function Kn(e,t,n,r,i){if(I(r)&&!I(t)){if(!(n!=null&&n.kind!==u.NULL)&&!(i!==void 0))return!1;const o=r.ofType;return re(e,t,o)}return re(e,t,r)}const $e=Object.freeze([ve,Xn,cn,Un,he,tn,Qn,$n,xe,Yn,Ie,Oe,hn,fn,Gn,dn,pn,ye,Fe,rn,we,Jn,wn,Hn,gn,Re]);class Wn{constructor(t,n){this._ast=t,this._fragments=void 0,this._fragmentSpreads=new Map,this._recursivelyReferencedFragments=new Map,this._onError=n}get[Symbol.toStringTag](){return"ASTValidationContext"}reportError(t){this._onError(t)}getDocument(){return this._ast}getFragment(t){let n;if(this._fragments)n=this._fragments;else{n=Object.create(null);for(const r of this.getDocument().definitions)r.kind===u.FRAGMENT_DEFINITION&&(n[r.name.value]=r);this._fragments=n}return n[t]}getFragmentSpreads(t){let n=this._fragmentSpreads.get(t);if(!n){n=[];const r=[t];let i;for(;i=r.pop();)for(const s of i.selections)s.kind===u.FRAGMENT_SPREAD?n.push(s):s.selectionSet&&r.push(s.selectionSet);this._fragmentSpreads.set(t,n)}return n}getRecursivelyReferencedFragments(t){let n=this._recursivelyReferencedFragments.get(t);if(!n){n=[];const r=Object.create(null),i=[t.selectionSet];let s;for(;s=i.pop();)for(const a of this.getFragmentSpreads(s)){const o=a.name.value;if(r[o]!==!0){r[o]=!0;const l=this.getFragment(o);l&&(n.push(l),i.push(l.selectionSet))}}this._recursivelyReferencedFragments.set(t,n)}return n}}class zn extends Wn{constructor(t,n,r,i){super(n,i),this._schema=t,this._typeInfo=r,this._variableUsages=new Map,this._recursiveVariableUsages=new Map}get[Symbol.toStringTag](){return"ValidationContext"}getSchema(){return this._schema}getVariableUsages(t){let n=this._variableUsages.get(t);if(!n){const r=[],i=new me(this._schema);ge(t,Te(i,{VariableDefinition:()=>!1,Variable(s){r.push({node:s,type:i.getInputType(),defaultValue:i.getDefaultValue()})}})),n=r,this._variableUsages.set(t,n)}return n}getRecursiveVariableUsages(t){let n=this._recursiveVariableUsages.get(t);if(!n){n=this.getVariableUsages(t);for(const r of this.getRecursivelyReferencedFragments(t))n=n.concat(this.getVariableUsages(r));this._recursiveVariableUsages.set(t,n)}return n}getType(){return this._typeInfo.getType()}getParentType(){return this._typeInfo.getParentType()}getInputType(){return this._typeInfo.getInputType()}getParentInputType(){return this._typeInfo.getParentInputType()}getFieldDef(){return this._typeInfo.getFieldDef()}getDirective(){return this._typeInfo.getDirective()}getArgument(){return this._typeInfo.getArgument()}getEnumValue(){return this._typeInfo.getEnumValue()}}function Ce(e,t,n=$e,r,i=new me(e)){var s;const a=(s=r==null?void 0:r.maxErrors)!==null&&s!==void 0?s:100;t||qe(!1,"Must provide document."),Ge(e);const o=Object.freeze({}),l=[],c=new zn(e,t,i,d=>{if(l.length>=a)throw l.push(new p("Too many validation errors, error limit reached. Validation aborted.")),o;l.push(d)}),f=Je(n.map(d=>d(c)));try{ge(t,Te(i,f))}catch(d){if(d!==o)throw d}return l}function Zn(e){return{Field(t){const n=e.getFieldDef(),r=n==null?void 0:n.deprecationReason;if(n&&r!=null){const i=e.getParentType();i!=null||y(!1),e.reportError(new p(`The field ${i.name}.${n.name} is deprecated. ${r}`,{nodes:t}))}},Argument(t){const n=e.getArgument(),r=n==null?void 0:n.deprecationReason;if(n&&r!=null){const i=e.getDirective();if(i!=null)e.reportError(new p(`Directive "@${i.name}" argument "${n.name}" is deprecated. ${r}`,{nodes:t}));else{const s=e.getParentType(),a=e.getFieldDef();s!=null&&a!=null||y(!1),e.reportError(new p(`Field "${s.name}.${a.name}" argument "${n.name}" is deprecated. ${r}`,{nodes:t}))}}},ObjectField(t){const n=O(e.getParentInputType());if($(n)){const r=n.getFields()[t.name.value],i=r==null?void 0:r.deprecationReason;i!=null&&e.reportError(new p(`The input field ${n.name}.${r.name} is deprecated. ${i}`,{nodes:t}))}},EnumValue(t){const n=e.getEnumValue(),r=n==null?void 0:n.deprecationReason;if(n&&r!=null){const i=O(e.getInputType());i!=null||y(!1),e.reportError(new p(`The enum value "${i.name}.${n.name}" is deprecated. ${r}`,{nodes:t}))}}}}const xn=[un,Bn,qn,jn,Ln,Vn,he,ye,Fe,Dn,we,Re];function et(e,t,n,r,i){const s=$e.filter(o=>!(o===Oe||o===ve||r&&o===Ie));return n&&Array.prototype.push.apply(s,n),i&&Array.prototype.push.apply(s,xn),Ce(e,t,s).filter(o=>{if(o.message.includes("Unknown directive")&&o.nodes){const l=o.nodes[0];if(l&&l.kind===u.DIRECTIVE){const c=l.name.value;if(c==="arguments"||c==="argumentDefinitions")return!1}}return!0})}const A={Error:"Error",Warning:"Warning",Information:"Information",Hint:"Hint"},W={[A.Error]:1,[A.Warning]:2,[A.Information]:3,[A.Hint]:4},Y=(e,t)=>{if(!e)throw new Error(t)};function nt(e,t=null,n,r,i){var s,a;let o=null,l="";i&&(l=typeof i=="string"?i:i.reduce((f,d)=>f+v(d)+` +import{C as q}from"./codemirror.es-52e8b92d.js";import{K as u,G as p,d as _,i as ue,a as S,n as fe,b as w,s as F,c as h,e as R,p as v,f as X,h as y,j as T,D as E,O as G,k as Ae,l as Pe,o as O,q as P,r as I,u as k,v as te,w as ke,x as Ue,y as de,z as $,A as pe,B as U,C as Ve,E as je,F as Le,H as Me,I as Ye,J as Xe,L as Be,M as re,T as me,N as ge,P as Te,Q as qe,R as Ge,S as Je,U as Qe,V as He,W as Ke}from"./index-3e3bc65f.js";import{R as Ee,P as V}from"./Range-52ddcb6a.js";import"./codemirror.es2-5884f31a.js";function We(e){return e.kind===u.OPERATION_DEFINITION||e.kind===u.FRAGMENT_DEFINITION}function ze(e){return e.kind===u.SCHEMA_DEFINITION||B(e)||e.kind===u.DIRECTIVE_DEFINITION}function B(e){return e.kind===u.SCALAR_TYPE_DEFINITION||e.kind===u.OBJECT_TYPE_DEFINITION||e.kind===u.INTERFACE_TYPE_DEFINITION||e.kind===u.UNION_TYPE_DEFINITION||e.kind===u.ENUM_TYPE_DEFINITION||e.kind===u.INPUT_OBJECT_TYPE_DEFINITION}function Ze(e){return e.kind===u.SCHEMA_EXTENSION||Ne(e)}function Ne(e){return e.kind===u.SCALAR_TYPE_EXTENSION||e.kind===u.OBJECT_TYPE_EXTENSION||e.kind===u.INTERFACE_TYPE_EXTENSION||e.kind===u.UNION_TYPE_EXTENSION||e.kind===u.ENUM_TYPE_EXTENSION||e.kind===u.INPUT_OBJECT_TYPE_EXTENSION}function ve(e){return{Document(t){for(const n of t.definitions)if(!We(n)){const r=n.kind===u.SCHEMA_DEFINITION||n.kind===u.SCHEMA_EXTENSION?"schema":'"'+n.name.value+'"';e.reportError(new p(`The ${r} definition is not executable.`,{nodes:n}))}return!1}}}function xe(e){return{Field(t){const n=e.getParentType();if(n&&!e.getFieldDef()){const i=e.getSchema(),s=t.name.value;let a=_("to use an inline fragment on",en(i,n,s));a===""&&(a=_(nn(n,s))),e.reportError(new p(`Cannot query field "${s}" on type "${n.name}".`+a,{nodes:t}))}}}}function en(e,t,n){if(!ue(t))return[];const r=new Set,i=Object.create(null);for(const a of e.getPossibleTypes(t))if(a.getFields()[n]){r.add(a),i[a.name]=1;for(const o of a.getInterfaces()){var s;o.getFields()[n]&&(r.add(o),i[o.name]=((s=i[o.name])!==null&&s!==void 0?s:0)+1)}}return[...r].sort((a,o)=>{const l=i[o.name]-i[a.name];return l!==0?l:S(a)&&e.isSubType(a,o)?-1:S(o)&&e.isSubType(o,a)?1:fe(a.name,o.name)}).map(a=>a.name)}function nn(e,t){if(w(e)||S(e)){const n=Object.keys(e.getFields());return F(t,n)}return[]}function tn(e){return{InlineFragment(t){const n=t.typeCondition;if(n){const r=h(e.getSchema(),n);if(r&&!R(r)){const i=v(n);e.reportError(new p(`Fragment cannot condition on non composite type "${i}".`,{nodes:n}))}}},FragmentDefinition(t){const n=h(e.getSchema(),t.typeCondition);if(n&&!R(n)){const r=v(t.typeCondition);e.reportError(new p(`Fragment "${t.name.value}" cannot condition on non composite type "${r}".`,{nodes:t.typeCondition}))}}}}function rn(e){return{...sn(e),Argument(t){const n=e.getArgument(),r=e.getFieldDef(),i=e.getParentType();if(!n&&r&&i){const s=t.name.value,a=r.args.map(l=>l.name),o=F(s,a);e.reportError(new p(`Unknown argument "${s}" on field "${i.name}.${r.name}".`+_(o),{nodes:t}))}}}}function sn(e){const t=Object.create(null),n=e.getSchema(),r=n?n.getDirectives():X;for(const a of r)t[a.name]=a.args.map(o=>o.name);const i=e.getDocument().definitions;for(const a of i)if(a.kind===u.DIRECTIVE_DEFINITION){var s;const o=(s=a.arguments)!==null&&s!==void 0?s:[];t[a.name.value]=o.map(l=>l.name.value)}return{Directive(a){const o=a.name.value,l=t[o];if(a.arguments&&l)for(const c of a.arguments){const f=c.name.value;if(!l.includes(f)){const d=F(f,l);e.reportError(new p(`Unknown argument "${f}" on directive "@${o}".`+_(d),{nodes:c}))}}return!1}}}function ye(e){const t=Object.create(null),n=e.getSchema(),r=n?n.getDirectives():X;for(const s of r)t[s.name]=s.locations;const i=e.getDocument().definitions;for(const s of i)s.kind===u.DIRECTIVE_DEFINITION&&(t[s.name.value]=s.locations.map(a=>a.value));return{Directive(s,a,o,l,c){const f=s.name.value,d=t[f];if(!d){e.reportError(new p(`Unknown directive "@${f}".`,{nodes:s}));return}const m=on(c);m&&!d.includes(m)&&e.reportError(new p(`Directive "@${f}" may not be used on ${m}.`,{nodes:s}))}}}function on(e){const t=e[e.length-1];switch("kind"in t||y(!1),t.kind){case u.OPERATION_DEFINITION:return an(t.operation);case u.FIELD:return E.FIELD;case u.FRAGMENT_SPREAD:return E.FRAGMENT_SPREAD;case u.INLINE_FRAGMENT:return E.INLINE_FRAGMENT;case u.FRAGMENT_DEFINITION:return E.FRAGMENT_DEFINITION;case u.VARIABLE_DEFINITION:return E.VARIABLE_DEFINITION;case u.SCHEMA_DEFINITION:case u.SCHEMA_EXTENSION:return E.SCHEMA;case u.SCALAR_TYPE_DEFINITION:case u.SCALAR_TYPE_EXTENSION:return E.SCALAR;case u.OBJECT_TYPE_DEFINITION:case u.OBJECT_TYPE_EXTENSION:return E.OBJECT;case u.FIELD_DEFINITION:return E.FIELD_DEFINITION;case u.INTERFACE_TYPE_DEFINITION:case u.INTERFACE_TYPE_EXTENSION:return E.INTERFACE;case u.UNION_TYPE_DEFINITION:case u.UNION_TYPE_EXTENSION:return E.UNION;case u.ENUM_TYPE_DEFINITION:case u.ENUM_TYPE_EXTENSION:return E.ENUM;case u.ENUM_VALUE_DEFINITION:return E.ENUM_VALUE;case u.INPUT_OBJECT_TYPE_DEFINITION:case u.INPUT_OBJECT_TYPE_EXTENSION:return E.INPUT_OBJECT;case u.INPUT_VALUE_DEFINITION:{const n=e[e.length-3];return"kind"in n||y(!1),n.kind===u.INPUT_OBJECT_TYPE_DEFINITION?E.INPUT_FIELD_DEFINITION:E.ARGUMENT_DEFINITION}default:y(!1,"Unexpected kind: "+T(t.kind))}}function an(e){switch(e){case G.QUERY:return E.QUERY;case G.MUTATION:return E.MUTATION;case G.SUBSCRIPTION:return E.SUBSCRIPTION}}function Ie(e){return{FragmentSpread(t){const n=t.name.value;e.getFragment(n)||e.reportError(new p(`Unknown fragment "${n}".`,{nodes:t.name}))}}}function he(e){const t=e.getSchema(),n=t?t.getTypeMap():Object.create(null),r=Object.create(null);for(const s of e.getDocument().definitions)B(s)&&(r[s.name.value]=!0);const i=[...Object.keys(n),...Object.keys(r)];return{NamedType(s,a,o,l,c){const f=s.name.value;if(!n[f]&&!r[f]){var d;const m=(d=c[2])!==null&&d!==void 0?d:o,g=m!=null&&ln(m);if(g&&ie.includes(f))return;const N=F(f,g?ie.concat(i):i);e.reportError(new p(`Unknown type "${f}".`+_(N),{nodes:s}))}}}}const ie=[...Ae,...Pe].map(e=>e.name);function ln(e){return"kind"in e&&(ze(e)||Ze(e))}function cn(e){let t=0;return{Document(n){t=n.definitions.filter(r=>r.kind===u.OPERATION_DEFINITION).length},OperationDefinition(n){!n.name&&t>1&&e.reportError(new p("This anonymous operation must be the only defined operation.",{nodes:n}))}}}function un(e){var t,n,r;const i=e.getSchema(),s=(t=(n=(r=i==null?void 0:i.astNode)!==null&&r!==void 0?r:i==null?void 0:i.getQueryType())!==null&&n!==void 0?n:i==null?void 0:i.getMutationType())!==null&&t!==void 0?t:i==null?void 0:i.getSubscriptionType();let a=0;return{SchemaDefinition(o){if(s){e.reportError(new p("Cannot define a new schema within a schema extension.",{nodes:o}));return}a>0&&e.reportError(new p("Must provide only one schema definition.",{nodes:o})),++a}}}function fn(e){const t=Object.create(null),n=[],r=Object.create(null);return{OperationDefinition:()=>!1,FragmentDefinition(s){return i(s),!1}};function i(s){if(t[s.name.value])return;const a=s.name.value;t[a]=!0;const o=e.getFragmentSpreads(s.selectionSet);if(o.length!==0){r[a]=n.length;for(const l of o){const c=l.name.value,f=r[c];if(n.push(l),f===void 0){const d=e.getFragment(c);d&&i(d)}else{const d=n.slice(f),m=d.slice(0,-1).map(g=>'"'+g.name.value+'"').join(", ");e.reportError(new p(`Cannot spread fragment "${c}" within itself`+(m!==""?` via ${m}.`:"."),{nodes:d}))}n.pop()}r[a]=void 0}}}function dn(e){let t=Object.create(null);return{OperationDefinition:{enter(){t=Object.create(null)},leave(n){const r=e.getRecursiveVariableUsages(n);for(const{node:i}of r){const s=i.name.value;t[s]!==!0&&e.reportError(new p(n.name?`Variable "$${s}" is not defined by operation "${n.name.value}".`:`Variable "$${s}" is not defined.`,{nodes:[i,n]}))}}},VariableDefinition(n){t[n.variable.name.value]=!0}}}function Oe(e){const t=[],n=[];return{OperationDefinition(r){return t.push(r),!1},FragmentDefinition(r){return n.push(r),!1},Document:{leave(){const r=Object.create(null);for(const i of t)for(const s of e.getRecursivelyReferencedFragments(i))r[s.name.value]=!0;for(const i of n){const s=i.name.value;r[s]!==!0&&e.reportError(new p(`Fragment "${s}" is never used.`,{nodes:i}))}}}}}function pn(e){let t=[];return{OperationDefinition:{enter(){t=[]},leave(n){const r=Object.create(null),i=e.getRecursiveVariableUsages(n);for(const{node:s}of i)r[s.name.value]=!0;for(const s of t){const a=s.variable.name.value;r[a]!==!0&&e.reportError(new p(n.name?`Variable "$${a}" is never used in operation "${n.name.value}".`:`Variable "$${a}" is never used.`,{nodes:s}))}}},VariableDefinition(n){t.push(n)}}}function z(e){switch(e.kind){case u.OBJECT:return{...e,fields:mn(e.fields)};case u.LIST:return{...e,values:e.values.map(z)};case u.INT:case u.FLOAT:case u.STRING:case u.BOOLEAN:case u.NULL:case u.ENUM:case u.VARIABLE:return e}}function mn(e){return e.map(t=>({...t,value:z(t.value)})).sort((t,n)=>fe(t.name.value,n.name.value))}function De(e){return Array.isArray(e)?e.map(([t,n])=>`subfields "${t}" conflict because `+De(n)).join(" and "):e}function gn(e){const t=new In,n=new Map;return{SelectionSet(r){const i=Tn(e,n,t,e.getParentType(),r);for(const[[s,a],o,l]of i){const c=De(a);e.reportError(new p(`Fields "${s}" conflict because ${c}. Use different aliases on the fields to fetch both if this was intentional.`,{nodes:o.concat(l)}))}}}}function Tn(e,t,n,r,i){const s=[],[a,o]=M(e,t,r,i);if(Nn(e,s,t,n,a),o.length!==0)for(let l=0;l1)for(let o=0;o[s.value,a]));return n.every(s=>{const a=s.value,o=i.get(s.name.value);return o===void 0?!1:se(a)===se(o)})}function se(e){return v(z(e))}function Q(e,t){return P(e)?P(t)?Q(e.ofType,t.ofType):!0:P(t)?!0:I(e)?I(t)?Q(e.ofType,t.ofType):!0:I(t)?!0:k(e)||k(t)?e!==t:!1}function M(e,t,n,r){const i=t.get(r);if(i)return i;const s=Object.create(null),a=Object.create(null);be(e,n,r,s,a);const o=[s,Object.keys(a)];return t.set(r,o),o}function H(e,t,n){const r=t.get(n.selectionSet);if(r)return r;const i=h(e.getSchema(),n.typeCondition);return M(e,t,i,n.selectionSet)}function be(e,t,n,r,i){for(const s of n.selections)switch(s.kind){case u.FIELD:{const a=s.name.value;let o;(w(t)||S(t))&&(o=t.getFields()[a]);const l=s.alias?s.alias.value:a;r[l]||(r[l]=[]),r[l].push([t,s,o]);break}case u.FRAGMENT_SPREAD:i[s.name.value]=!0;break;case u.INLINE_FRAGMENT:{const a=s.typeCondition,o=a?h(e.getSchema(),a):t;be(e,o,s.selectionSet,r,i);break}}}function yn(e,t,n,r){if(e.length>0)return[[t,e.map(([i])=>i)],[n,...e.map(([,i])=>i).flat()],[r,...e.map(([,,i])=>i).flat()]]}class In{constructor(){this._data=new Map}has(t,n,r){var i;const[s,a]=ts.name.value));for(const s of r.args)if(!i.has(s.name)&&pe(s)){const a=T(s.type);e.reportError(new p(`Field "${r.name}" argument "${s.name}" of type "${a}" is required, but it was not provided.`,{nodes:t}))}}}}}function Fn(e){var t;const n=Object.create(null),r=e.getSchema(),i=(t=r==null?void 0:r.getDirectives())!==null&&t!==void 0?t:X;for(const o of i)n[o.name]=U(o.args.filter(pe),l=>l.name);const s=e.getDocument().definitions;for(const o of s)if(o.kind===u.DIRECTIVE_DEFINITION){var a;const l=(a=o.arguments)!==null&&a!==void 0?a:[];n[o.name.value]=U(l.filter(Rn),c=>c.name.value)}return{Directive:{leave(o){const l=o.name.value,c=n[l];if(c){var f;const d=(f=o.arguments)!==null&&f!==void 0?f:[],m=new Set(d.map(g=>g.name.value));for(const[g,N]of Object.entries(c))if(!m.has(g)){const b=Ve(N.type)?T(N.type):v(N.type);e.reportError(new p(`Directive "@${l}" argument "${g}" of type "${b}" is required, but it was not provided.`,{nodes:o}))}}}}}}function Rn(e){return e.type.kind===u.NON_NULL_TYPE&&e.defaultValue==null}function $n(e){return{Field(t){const n=e.getType(),r=t.selectionSet;if(n){if(k(O(n))){if(r){const i=t.name.value,s=T(n);e.reportError(new p(`Field "${i}" must not have a selection since type "${s}" has no subfields.`,{nodes:r}))}}else if(!r){const i=t.name.value,s=T(n);e.reportError(new p(`Field "${i}" of type "${s}" must have a selection of subfields. Did you mean "${i} { ... }"?`,{nodes:t}))}}}}}function Cn(e,t,n){var r;const i={},s=(r=t.arguments)!==null&&r!==void 0?r:[],a=U(s,o=>o.name.value);for(const o of e.args){const l=o.name,c=o.type,f=a[l];if(!f){if(o.defaultValue!==void 0)i[l]=o.defaultValue;else if(I(c))throw new p(`Argument "${l}" of required type "${T(c)}" was not provided.`,{nodes:t});continue}const d=f.value;let m=d.kind===u.NULL;if(d.kind===u.VARIABLE){const N=d.name.value;if(n==null||!An(n,N)){if(o.defaultValue!==void 0)i[l]=o.defaultValue;else if(I(c))throw new p(`Argument "${l}" of required type "${T(c)}" was provided the variable "$${N}" which was not provided a runtime value.`,{nodes:d});continue}m=n[N]==null}if(m&&I(c))throw new p(`Argument "${l}" of non-null type "${T(c)}" must not be null.`,{nodes:d});const g=je(d,c,n);if(g===void 0)throw new p(`Argument "${l}" has invalid value ${v(d)}.`,{nodes:d});i[l]=g}return i}function oe(e,t,n){var r;const i=(r=t.directives)===null||r===void 0?void 0:r.find(s=>s.name.value===e.name);if(i)return Cn(e,i,n)}function An(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Pn(e,t,n,r,i){const s=new Map;return K(e,t,n,r,i,s,new Set),s}function K(e,t,n,r,i,s,a){for(const o of i.selections)switch(o.kind){case u.FIELD:{if(!J(n,o))continue;const l=kn(o),c=s.get(l);c!==void 0?c.push(o):s.set(l,[o]);break}case u.INLINE_FRAGMENT:{if(!J(n,o)||!ae(e,o,r))continue;K(e,t,n,r,o.selectionSet,s,a);break}case u.FRAGMENT_SPREAD:{const l=o.name.value;if(a.has(l)||!J(n,o))continue;a.add(l);const c=t[l];if(!c||!ae(e,c,r))continue;K(e,t,n,r,c.selectionSet,s,a);break}}}function J(e,t){const n=oe(Le,t,e);if((n==null?void 0:n.if)===!0)return!1;const r=oe(Me,t,e);return(r==null?void 0:r.if)!==!1}function ae(e,t,n){const r=t.typeCondition;if(!r)return!0;const i=h(e,r);return i===n?!0:ue(i)?e.isSubType(i,n):!1}function kn(e){return e.alias?e.alias.value:e.name.value}function Un(e){return{OperationDefinition(t){if(t.operation==="subscription"){const n=e.getSchema(),r=n.getSubscriptionType();if(r){const i=t.name?t.name.value:null,s=Object.create(null),a=e.getDocument(),o=Object.create(null);for(const c of a.definitions)c.kind===u.FRAGMENT_DEFINITION&&(o[c.name.value]=c);const l=Pn(n,o,s,r,t.selectionSet);if(l.size>1){const d=[...l.values()].slice(1).flat();e.reportError(new p(i!=null?`Subscription "${i}" must select only one top level field.`:"Anonymous Subscription must select only one top level field.",{nodes:d}))}for(const c of l.values())c[0].name.value.startsWith("__")&&e.reportError(new p(i!=null?`Subscription "${i}" must not select an introspection top level field.`:"Anonymous Subscription must not select an introspection top level field.",{nodes:c}))}}}}}function Se(e,t){const n=new Map;for(const r of e){const i=t(r),s=n.get(i);s===void 0?n.set(i,[r]):s.push(r)}return n}function we(e){return{Field:t,Directive:t};function t(n){var r;const i=(r=n.arguments)!==null&&r!==void 0?r:[],s=Se(i,a=>a.name.value);for(const[a,o]of s)o.length>1&&e.reportError(new p(`There can be only one argument named "${a}".`,{nodes:o.map(l=>l.name)}))}}function Vn(e){const t=Object.create(null),n=e.getSchema();return{DirectiveDefinition(r){const i=r.name.value;if(n!=null&&n.getDirective(i)){e.reportError(new p(`Directive "@${i}" already exists in the schema. It cannot be redefined.`,{nodes:r.name}));return}return t[i]?e.reportError(new p(`There can be only one directive named "@${i}".`,{nodes:[t[i],r.name]})):t[i]=r.name,!1}}}function Fe(e){const t=Object.create(null),n=e.getSchema(),r=n?n.getDirectives():X;for(const o of r)t[o.name]=!o.isRepeatable;const i=e.getDocument().definitions;for(const o of i)o.kind===u.DIRECTIVE_DEFINITION&&(t[o.name.value]=!o.repeatable);const s=Object.create(null),a=Object.create(null);return{enter(o){if(!("directives"in o)||!o.directives)return;let l;if(o.kind===u.SCHEMA_DEFINITION||o.kind===u.SCHEMA_EXTENSION)l=s;else if(B(o)||Ne(o)){const c=o.name.value;l=a[c],l===void 0&&(a[c]=l=Object.create(null))}else l=Object.create(null);for(const c of o.directives){const f=c.name.value;t[f]&&(l[f]?e.reportError(new p(`The directive "@${f}" can only be used once at this location.`,{nodes:[l[f],c]})):l[f]=c)}}}}function jn(e){const t=e.getSchema(),n=t?t.getTypeMap():Object.create(null),r=Object.create(null);return{EnumTypeDefinition:i,EnumTypeExtension:i};function i(s){var a;const o=s.name.value;r[o]||(r[o]=Object.create(null));const l=(a=s.values)!==null&&a!==void 0?a:[],c=r[o];for(const f of l){const d=f.name.value,m=n[o];de(m)&&m.getValue(d)?e.reportError(new p(`Enum value "${o}.${d}" already exists in the schema. It cannot also be defined in this type extension.`,{nodes:f.name})):c[d]?e.reportError(new p(`Enum value "${o}.${d}" can only be defined once.`,{nodes:[c[d],f.name]})):c[d]=f.name}return!1}}function Ln(e){const t=e.getSchema(),n=t?t.getTypeMap():Object.create(null),r=Object.create(null);return{InputObjectTypeDefinition:i,InputObjectTypeExtension:i,InterfaceTypeDefinition:i,InterfaceTypeExtension:i,ObjectTypeDefinition:i,ObjectTypeExtension:i};function i(s){var a;const o=s.name.value;r[o]||(r[o]=Object.create(null));const l=(a=s.fields)!==null&&a!==void 0?a:[],c=r[o];for(const f of l){const d=f.name.value;Mn(n[o],d)?e.reportError(new p(`Field "${o}.${d}" already exists in the schema. It cannot also be defined in this type extension.`,{nodes:f.name})):c[d]?e.reportError(new p(`Field "${o}.${d}" can only be defined once.`,{nodes:[c[d],f.name]})):c[d]=f.name}return!1}}function Mn(e,t){return w(e)||S(e)||$(e)?e.getFields()[t]!=null:!1}function Yn(e){const t=Object.create(null);return{OperationDefinition:()=>!1,FragmentDefinition(n){const r=n.name.value;return t[r]?e.reportError(new p(`There can be only one fragment named "${r}".`,{nodes:[t[r],n.name]})):t[r]=n.name,!1}}}function Re(e){const t=[];let n=Object.create(null);return{ObjectValue:{enter(){t.push(n),n=Object.create(null)},leave(){const r=t.pop();r||y(!1),n=r}},ObjectField(r){const i=r.name.value;n[i]?e.reportError(new p(`There can be only one input field named "${i}".`,{nodes:[n[i],r.name]})):n[i]=r.name}}}function Xn(e){const t=Object.create(null);return{OperationDefinition(n){const r=n.name;return r&&(t[r.value]?e.reportError(new p(`There can be only one operation named "${r.value}".`,{nodes:[t[r.value],r]})):t[r.value]=r),!1},FragmentDefinition:()=>!1}}function Bn(e){const t=e.getSchema(),n=Object.create(null),r=t?{query:t.getQueryType(),mutation:t.getMutationType(),subscription:t.getSubscriptionType()}:{};return{SchemaDefinition:i,SchemaExtension:i};function i(s){var a;const o=(a=s.operationTypes)!==null&&a!==void 0?a:[];for(const l of o){const c=l.operation,f=n[c];r[c]?e.reportError(new p(`Type for ${c} already defined in the schema. It cannot be redefined.`,{nodes:l})):f?e.reportError(new p(`There can be only one ${c} type in schema.`,{nodes:[f,l]})):n[c]=l}return!1}}function qn(e){const t=Object.create(null),n=e.getSchema();return{ScalarTypeDefinition:r,ObjectTypeDefinition:r,InterfaceTypeDefinition:r,UnionTypeDefinition:r,EnumTypeDefinition:r,InputObjectTypeDefinition:r};function r(i){const s=i.name.value;if(n!=null&&n.getType(s)){e.reportError(new p(`Type "${s}" already exists in the schema. It cannot also be defined in this type definition.`,{nodes:i.name}));return}return t[s]?e.reportError(new p(`There can be only one type named "${s}".`,{nodes:[t[s],i.name]})):t[s]=i.name,!1}}function Gn(e){return{OperationDefinition(t){var n;const r=(n=t.variableDefinitions)!==null&&n!==void 0?n:[],i=Se(r,s=>s.variable.name.value);for(const[s,a]of i)a.length>1&&e.reportError(new p(`There can be only one variable named "$${s}".`,{nodes:a.map(o=>o.variable.name)}))}}}function Jn(e){return{ListValue(t){const n=Ye(e.getParentInputType());if(!P(n))return D(e,t),!1},ObjectValue(t){const n=O(e.getInputType());if(!$(n))return D(e,t),!1;const r=U(t.fields,i=>i.name.value);for(const i of Object.values(n.getFields()))if(!r[i.name]&&Xe(i)){const a=T(i.type);e.reportError(new p(`Field "${n.name}.${i.name}" of required type "${a}" was not provided.`,{nodes:t}))}},ObjectField(t){const n=O(e.getParentInputType());if(!e.getInputType()&&$(n)){const i=F(t.name.value,Object.keys(n.getFields()));e.reportError(new p(`Field "${t.name.value}" is not defined by type "${n.name}".`+_(i),{nodes:t}))}},NullValue(t){const n=e.getInputType();I(n)&&e.reportError(new p(`Expected value of type "${T(n)}", found ${v(t)}.`,{nodes:t}))},EnumValue:t=>D(e,t),IntValue:t=>D(e,t),FloatValue:t=>D(e,t),StringValue:t=>D(e,t),BooleanValue:t=>D(e,t)}}function D(e,t){const n=e.getInputType();if(!n)return;const r=O(n);if(!k(r)){const i=T(n);e.reportError(new p(`Expected value of type "${i}", found ${v(t)}.`,{nodes:t}));return}try{if(r.parseLiteral(t,void 0)===void 0){const s=T(n);e.reportError(new p(`Expected value of type "${s}", found ${v(t)}.`,{nodes:t}))}}catch(i){const s=T(n);i instanceof p?e.reportError(i):e.reportError(new p(`Expected value of type "${s}", found ${v(t)}; `+i.message,{nodes:t,originalError:i}))}}function Qn(e){return{VariableDefinition(t){const n=h(e.getSchema(),t.type);if(n!==void 0&&!Be(n)){const r=t.variable.name.value,i=v(t.type);e.reportError(new p(`Variable "$${r}" cannot be non-input type "${i}".`,{nodes:t.type}))}}}}function Hn(e){let t=Object.create(null);return{OperationDefinition:{enter(){t=Object.create(null)},leave(n){const r=e.getRecursiveVariableUsages(n);for(const{node:i,type:s,defaultValue:a}of r){const o=i.name.value,l=t[o];if(l&&s){const c=e.getSchema(),f=h(c,l.type);if(f&&!Kn(c,f,l.defaultValue,s,a)){const d=T(f),m=T(s);e.reportError(new p(`Variable "$${o}" of type "${d}" used in position expecting type "${m}".`,{nodes:[l,i]}))}}}}},VariableDefinition(n){t[n.variable.name.value]=n}}}function Kn(e,t,n,r,i){if(I(r)&&!I(t)){if(!(n!=null&&n.kind!==u.NULL)&&!(i!==void 0))return!1;const o=r.ofType;return re(e,t,o)}return re(e,t,r)}const $e=Object.freeze([ve,Xn,cn,Un,he,tn,Qn,$n,xe,Yn,Ie,Oe,hn,fn,Gn,dn,pn,ye,Fe,rn,we,Jn,wn,Hn,gn,Re]);class Wn{constructor(t,n){this._ast=t,this._fragments=void 0,this._fragmentSpreads=new Map,this._recursivelyReferencedFragments=new Map,this._onError=n}get[Symbol.toStringTag](){return"ASTValidationContext"}reportError(t){this._onError(t)}getDocument(){return this._ast}getFragment(t){let n;if(this._fragments)n=this._fragments;else{n=Object.create(null);for(const r of this.getDocument().definitions)r.kind===u.FRAGMENT_DEFINITION&&(n[r.name.value]=r);this._fragments=n}return n[t]}getFragmentSpreads(t){let n=this._fragmentSpreads.get(t);if(!n){n=[];const r=[t];let i;for(;i=r.pop();)for(const s of i.selections)s.kind===u.FRAGMENT_SPREAD?n.push(s):s.selectionSet&&r.push(s.selectionSet);this._fragmentSpreads.set(t,n)}return n}getRecursivelyReferencedFragments(t){let n=this._recursivelyReferencedFragments.get(t);if(!n){n=[];const r=Object.create(null),i=[t.selectionSet];let s;for(;s=i.pop();)for(const a of this.getFragmentSpreads(s)){const o=a.name.value;if(r[o]!==!0){r[o]=!0;const l=this.getFragment(o);l&&(n.push(l),i.push(l.selectionSet))}}this._recursivelyReferencedFragments.set(t,n)}return n}}class zn extends Wn{constructor(t,n,r,i){super(n,i),this._schema=t,this._typeInfo=r,this._variableUsages=new Map,this._recursiveVariableUsages=new Map}get[Symbol.toStringTag](){return"ValidationContext"}getSchema(){return this._schema}getVariableUsages(t){let n=this._variableUsages.get(t);if(!n){const r=[],i=new me(this._schema);ge(t,Te(i,{VariableDefinition:()=>!1,Variable(s){r.push({node:s,type:i.getInputType(),defaultValue:i.getDefaultValue()})}})),n=r,this._variableUsages.set(t,n)}return n}getRecursiveVariableUsages(t){let n=this._recursiveVariableUsages.get(t);if(!n){n=this.getVariableUsages(t);for(const r of this.getRecursivelyReferencedFragments(t))n=n.concat(this.getVariableUsages(r));this._recursiveVariableUsages.set(t,n)}return n}getType(){return this._typeInfo.getType()}getParentType(){return this._typeInfo.getParentType()}getInputType(){return this._typeInfo.getInputType()}getParentInputType(){return this._typeInfo.getParentInputType()}getFieldDef(){return this._typeInfo.getFieldDef()}getDirective(){return this._typeInfo.getDirective()}getArgument(){return this._typeInfo.getArgument()}getEnumValue(){return this._typeInfo.getEnumValue()}}function Ce(e,t,n=$e,r,i=new me(e)){var s;const a=(s=r==null?void 0:r.maxErrors)!==null&&s!==void 0?s:100;t||qe(!1,"Must provide document."),Ge(e);const o=Object.freeze({}),l=[],c=new zn(e,t,i,d=>{if(l.length>=a)throw l.push(new p("Too many validation errors, error limit reached. Validation aborted.")),o;l.push(d)}),f=Je(n.map(d=>d(c)));try{ge(t,Te(i,f))}catch(d){if(d!==o)throw d}return l}function Zn(e){return{Field(t){const n=e.getFieldDef(),r=n==null?void 0:n.deprecationReason;if(n&&r!=null){const i=e.getParentType();i!=null||y(!1),e.reportError(new p(`The field ${i.name}.${n.name} is deprecated. ${r}`,{nodes:t}))}},Argument(t){const n=e.getArgument(),r=n==null?void 0:n.deprecationReason;if(n&&r!=null){const i=e.getDirective();if(i!=null)e.reportError(new p(`Directive "@${i.name}" argument "${n.name}" is deprecated. ${r}`,{nodes:t}));else{const s=e.getParentType(),a=e.getFieldDef();s!=null&&a!=null||y(!1),e.reportError(new p(`Field "${s.name}.${a.name}" argument "${n.name}" is deprecated. ${r}`,{nodes:t}))}}},ObjectField(t){const n=O(e.getParentInputType());if($(n)){const r=n.getFields()[t.name.value],i=r==null?void 0:r.deprecationReason;i!=null&&e.reportError(new p(`The input field ${n.name}.${r.name} is deprecated. ${i}`,{nodes:t}))}},EnumValue(t){const n=e.getEnumValue(),r=n==null?void 0:n.deprecationReason;if(n&&r!=null){const i=O(e.getInputType());i!=null||y(!1),e.reportError(new p(`The enum value "${i.name}.${n.name}" is deprecated. ${r}`,{nodes:t}))}}}}const xn=[un,Bn,qn,jn,Ln,Vn,he,ye,Fe,Dn,we,Re];function et(e,t,n,r,i){const s=$e.filter(o=>!(o===Oe||o===ve||r&&o===Ie));return n&&Array.prototype.push.apply(s,n),i&&Array.prototype.push.apply(s,xn),Ce(e,t,s).filter(o=>{if(o.message.includes("Unknown directive")&&o.nodes){const l=o.nodes[0];if(l&&l.kind===u.DIRECTIVE){const c=l.name.value;if(c==="arguments"||c==="argumentDefinitions")return!1}}return!0})}const A={Error:"Error",Warning:"Warning",Information:"Information",Hint:"Hint"},W={[A.Error]:1,[A.Warning]:2,[A.Information]:3,[A.Hint]:4},Y=(e,t)=>{if(!e)throw new Error(t)};function nt(e,t=null,n,r,i){var s,a;let o=null,l="";i&&(l=typeof i=="string"?i:i.reduce((f,d)=>f+v(d)+` `,""));const c=l?`${e} diff --git a/assets/lint.es3-d27d0d47.js b/assets/lint.es3-68bd1209.js similarity index 98% rename from assets/lint.es3-d27d0d47.js rename to assets/lint.es3-68bd1209.js index cf0cee7b..f481a656 100644 --- a/assets/lint.es3-d27d0d47.js +++ b/assets/lint.es3-68bd1209.js @@ -1 +1 @@ -import{C as H}from"./codemirror.es-52e8b92d.js";import"./codemirror.es2-5884f31a.js";import{X as B,Y as J,Z as P,_ as U,a6 as D}from"./index-42855235.js";var M=Object.defineProperty,n=(e,r)=>M(e,"name",{value:r,configurable:!0});function L(e){d=e,x=e.length,s=u=g=-1,a(),N();const r=S();return p("EOF"),r}n(L,"jsonParse");let d,x,s,u,g,t,l;function S(){const e=s,r=[];if(p("{"),!v("}")){do r.push(V());while(v(","));p("}")}return{kind:"Object",start:e,end:g,members:r}}n(S,"parseObj");function V(){const e=s,r=l==="String"?j():null;p("String"),p(":");const i=T();return{kind:"Member",start:e,end:g,key:r,value:i}}n(V,"parseMember");function G(){const e=s,r=[];if(p("["),!v("]")){do r.push(T());while(v(","));p("]")}return{kind:"Array",start:e,end:g,values:r}}n(G,"parseArr");function T(){switch(l){case"[":return G();case"{":return S();case"String":case"Number":case"Boolean":case"Null":const e=j();return N(),e}p("Value")}n(T,"parseVal");function j(){return{kind:l,start:s,end:u,value:JSON.parse(d.slice(s,u))}}n(j,"curToken");function p(e){if(l===e){N();return}let r;if(l==="EOF")r="[end of file]";else if(u-s>1)r="`"+d.slice(s,u)+"`";else{const i=d.slice(s).match(/^.+?\b/);r="`"+(i?i[0]:d[s])+"`"}throw m(`Expected ${e} but found ${r}.`)}n(p,"expect");class F extends Error{constructor(r,i){super(r),this.position=i}}n(F,"JSONSyntaxError");function m(e){return new F(e,{start:s,end:u})}n(m,"syntaxError");function v(e){if(l===e)return N(),!0}n(v,"skip");function a(){return u31;)if(t===92)switch(t=a(),t){case 34:case 47:case 92:case 98:case 102:case 110:case 114:case 116:a();break;case 117:a(),k(),k(),k(),k();break;default:throw m("Bad character escape sequence.")}else{if(u===x)throw m("Unterminated string.");a()}if(t===34){a();return}throw m("Unterminated string.")}n(Q,"readString");function k(){if(t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102)return a();throw m("Expected hexadecimal digit.")}n(k,"readHex");function I(){t===45&&a(),t===48?a():w(),t===46&&(a(),w()),(t===69||t===101)&&(t=a(),(t===43||t===45)&&a(),w())}n(I,"readNumber");function w(){if(t<48||t>57)throw m("Expected decimal digit.");do a();while(t>=48&&t<=57)}n(w,"readDigits");H.registerHelper("lint","graphql-variables",(e,r,i)=>{if(!e)return[];let f;try{f=L(e)}catch(c){if(c instanceof F)return[O(i,c.position,c.message)];throw c}const{variableToType:o}=r;return o?A(i,o,f):[]});function A(e,r,i){var f;const o=[];for(const c of i.members)if(c){const b=(f=c.key)===null||f===void 0?void 0:f.value,h=r[b];if(h)for(const[E,C]of y(h,c.value))o.push(O(e,E,C));else o.push(O(e,c.key,`Variable "$${b}" does not appear in any GraphQL query.`))}return o}n(A,"validateVariables");function y(e,r){if(!e||!r)return[];if(e instanceof B)return r.kind==="Null"?[[r,`Type "${e}" is non-nullable and cannot be null.`]]:y(e.ofType,r);if(r.kind==="Null")return[];if(e instanceof J){const i=e.ofType;if(r.kind==="Array"){const f=r.values||[];return $(f,o=>y(i,o))}return y(i,r)}if(e instanceof P){if(r.kind!=="Object")return[[r,`Type "${e}" must be an Object.`]];const i=Object.create(null),f=$(r.members,o=>{var c;const b=(c=o==null?void 0:o.key)===null||c===void 0?void 0:c.value;i[b]=!0;const h=e.getFields()[b];if(!h)return[[o.key,`Type "${e}" does not have a field "${b}".`]];const E=h?h.type:void 0;return y(E,o.value)});for(const o of Object.keys(e.getFields())){const c=e.getFields()[o];!i[o]&&c.type instanceof B&&!c.defaultValue&&f.push([r,`Object of type "${e}" is missing required field "${o}".`])}return f}return e.name==="Boolean"&&r.kind!=="Boolean"||e.name==="String"&&r.kind!=="String"||e.name==="ID"&&r.kind!=="Number"&&r.kind!=="String"||e.name==="Float"&&r.kind!=="Number"||e.name==="Int"&&(r.kind!=="Number"||(r.value|0)!==r.value)?[[r,`Expected value of type "${e}".`]]:(e instanceof U||e instanceof D)&&(r.kind!=="String"&&r.kind!=="Number"&&r.kind!=="Boolean"&&r.kind!=="Null"||q(e.parseValue(r.value)))?[[r,`Expected value of type "${e}".`]]:[]}n(y,"validateValue");function O(e,r,i){return{message:i,severity:"error",type:"validation",from:e.posFromIndex(r.start),to:e.posFromIndex(r.end)}}n(O,"lintError");function q(e){return e==null||e!==e}n(q,"isNullish");function $(e,r){return Array.prototype.concat.apply([],e.map(r))}n($,"mapCat"); +import{C as H}from"./codemirror.es-52e8b92d.js";import"./codemirror.es2-5884f31a.js";import{X as B,Y as J,Z as P,_ as U,a6 as D}from"./index-3e3bc65f.js";var M=Object.defineProperty,n=(e,r)=>M(e,"name",{value:r,configurable:!0});function L(e){d=e,x=e.length,s=u=g=-1,a(),N();const r=S();return p("EOF"),r}n(L,"jsonParse");let d,x,s,u,g,t,l;function S(){const e=s,r=[];if(p("{"),!v("}")){do r.push(V());while(v(","));p("}")}return{kind:"Object",start:e,end:g,members:r}}n(S,"parseObj");function V(){const e=s,r=l==="String"?j():null;p("String"),p(":");const i=T();return{kind:"Member",start:e,end:g,key:r,value:i}}n(V,"parseMember");function G(){const e=s,r=[];if(p("["),!v("]")){do r.push(T());while(v(","));p("]")}return{kind:"Array",start:e,end:g,values:r}}n(G,"parseArr");function T(){switch(l){case"[":return G();case"{":return S();case"String":case"Number":case"Boolean":case"Null":const e=j();return N(),e}p("Value")}n(T,"parseVal");function j(){return{kind:l,start:s,end:u,value:JSON.parse(d.slice(s,u))}}n(j,"curToken");function p(e){if(l===e){N();return}let r;if(l==="EOF")r="[end of file]";else if(u-s>1)r="`"+d.slice(s,u)+"`";else{const i=d.slice(s).match(/^.+?\b/);r="`"+(i?i[0]:d[s])+"`"}throw m(`Expected ${e} but found ${r}.`)}n(p,"expect");class F extends Error{constructor(r,i){super(r),this.position=i}}n(F,"JSONSyntaxError");function m(e){return new F(e,{start:s,end:u})}n(m,"syntaxError");function v(e){if(l===e)return N(),!0}n(v,"skip");function a(){return u31;)if(t===92)switch(t=a(),t){case 34:case 47:case 92:case 98:case 102:case 110:case 114:case 116:a();break;case 117:a(),k(),k(),k(),k();break;default:throw m("Bad character escape sequence.")}else{if(u===x)throw m("Unterminated string.");a()}if(t===34){a();return}throw m("Unterminated string.")}n(Q,"readString");function k(){if(t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102)return a();throw m("Expected hexadecimal digit.")}n(k,"readHex");function I(){t===45&&a(),t===48?a():w(),t===46&&(a(),w()),(t===69||t===101)&&(t=a(),(t===43||t===45)&&a(),w())}n(I,"readNumber");function w(){if(t<48||t>57)throw m("Expected decimal digit.");do a();while(t>=48&&t<=57)}n(w,"readDigits");H.registerHelper("lint","graphql-variables",(e,r,i)=>{if(!e)return[];let f;try{f=L(e)}catch(c){if(c instanceof F)return[O(i,c.position,c.message)];throw c}const{variableToType:o}=r;return o?A(i,o,f):[]});function A(e,r,i){var f;const o=[];for(const c of i.members)if(c){const b=(f=c.key)===null||f===void 0?void 0:f.value,h=r[b];if(h)for(const[E,C]of y(h,c.value))o.push(O(e,E,C));else o.push(O(e,c.key,`Variable "$${b}" does not appear in any GraphQL query.`))}return o}n(A,"validateVariables");function y(e,r){if(!e||!r)return[];if(e instanceof B)return r.kind==="Null"?[[r,`Type "${e}" is non-nullable and cannot be null.`]]:y(e.ofType,r);if(r.kind==="Null")return[];if(e instanceof J){const i=e.ofType;if(r.kind==="Array"){const f=r.values||[];return $(f,o=>y(i,o))}return y(i,r)}if(e instanceof P){if(r.kind!=="Object")return[[r,`Type "${e}" must be an Object.`]];const i=Object.create(null),f=$(r.members,o=>{var c;const b=(c=o==null?void 0:o.key)===null||c===void 0?void 0:c.value;i[b]=!0;const h=e.getFields()[b];if(!h)return[[o.key,`Type "${e}" does not have a field "${b}".`]];const E=h?h.type:void 0;return y(E,o.value)});for(const o of Object.keys(e.getFields())){const c=e.getFields()[o];!i[o]&&c.type instanceof B&&!c.defaultValue&&f.push([r,`Object of type "${e}" is missing required field "${o}".`])}return f}return e.name==="Boolean"&&r.kind!=="Boolean"||e.name==="String"&&r.kind!=="String"||e.name==="ID"&&r.kind!=="Number"&&r.kind!=="String"||e.name==="Float"&&r.kind!=="Number"||e.name==="Int"&&(r.kind!=="Number"||(r.value|0)!==r.value)?[[r,`Expected value of type "${e}".`]]:(e instanceof U||e instanceof D)&&(r.kind!=="String"&&r.kind!=="Number"&&r.kind!=="Boolean"&&r.kind!=="Null"||q(e.parseValue(r.value)))?[[r,`Expected value of type "${e}".`]]:[]}n(y,"validateValue");function O(e,r,i){return{message:i,severity:"error",type:"validation",from:e.posFromIndex(r.start),to:e.posFromIndex(r.end)}}n(O,"lintError");function q(e){return e==null||e!==e}n(q,"isNullish");function $(e,r){return Array.prototype.concat.apply([],e.map(r))}n($,"mapCat"); diff --git a/assets/liquid-64baec53.js b/assets/liquid-635c256b.js similarity index 98% rename from assets/liquid-64baec53.js rename to assets/liquid-635c256b.js index 1442ca47..9545c494 100644 --- a/assets/liquid-64baec53.js +++ b/assets/liquid-635c256b.js @@ -1,4 +1,4 @@ -import{m as d}from"./index-42855235.js";/*!----------------------------------------------------------------------------- +import{m as d}from"./index-3e3bc65f.js";/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166) * Released under the MIT license diff --git a/assets/mdx-5f87c1bb.js b/assets/mdx-5637cf5b.js similarity index 98% rename from assets/mdx-5f87c1bb.js rename to assets/mdx-5637cf5b.js index a08f2c9b..403fbb18 100644 --- a/assets/mdx-5f87c1bb.js +++ b/assets/mdx-5637cf5b.js @@ -1,4 +1,4 @@ -import{m as d}from"./index-42855235.js";/*!----------------------------------------------------------------------------- +import{m as d}from"./index-3e3bc65f.js";/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166) * Released under the MIT license diff --git a/assets/mode.es-44172034.js b/assets/mode.es-cb4af5fb.js similarity index 89% rename from assets/mode.es-44172034.js rename to assets/mode.es-cb4af5fb.js index 3ef894f8..d75b8e6b 100644 --- a/assets/mode.es-44172034.js +++ b/assets/mode.es-cb4af5fb.js @@ -1 +1 @@ -import{C as r}from"./codemirror.es-52e8b92d.js";import{W as o,a2 as s,a3 as i,a4 as n}from"./index-42855235.js";import{r as l}from"./mode-indent.es-057a4f6a.js";import"./codemirror.es2-5884f31a.js";var c=Object.defineProperty,p=(e,a)=>c(e,"name",{value:a,configurable:!0});const m=p(e=>{const a=o({eatWhitespace:t=>t.eatWhile(s),lexRules:i,parseRules:n,editorConfig:{tabSize:e.tabSize}});return{config:e,startState:a.startState,token:a.token,indent:l,electricInput:/^\s*[})\]]/,fold:"brace",lineComment:"#",closeBrackets:{pairs:'()[]{}""',explode:"()[]{}"}}},"graphqlModeFactory");r.defineMode("graphql",m); +import{C as r}from"./codemirror.es-52e8b92d.js";import{W as o,a2 as s,a3 as i,a4 as n}from"./index-3e3bc65f.js";import{r as l}from"./mode-indent.es-057a4f6a.js";import"./codemirror.es2-5884f31a.js";var c=Object.defineProperty,p=(e,a)=>c(e,"name",{value:a,configurable:!0});const m=p(e=>{const a=o({eatWhitespace:t=>t.eatWhile(s),lexRules:i,parseRules:n,editorConfig:{tabSize:e.tabSize}});return{config:e,startState:a.startState,token:a.token,indent:l,electricInput:/^\s*[})\]]/,fold:"brace",lineComment:"#",closeBrackets:{pairs:'()[]{}""',explode:"()[]{}"}}},"graphqlModeFactory");r.defineMode("graphql",m); diff --git a/assets/mode.es2-0674d90c.js b/assets/mode.es2-43dc28bc.js similarity index 95% rename from assets/mode.es2-0674d90c.js rename to assets/mode.es2-43dc28bc.js index 24724357..0dd88ac0 100644 --- a/assets/mode.es2-0674d90c.js +++ b/assets/mode.es2-43dc28bc.js @@ -1 +1 @@ -import{C as s}from"./codemirror.es-52e8b92d.js";import{W as o,a7 as e,a8 as l,a9 as n,aa as r}from"./index-42855235.js";import{r as c}from"./mode-indent.es-057a4f6a.js";import"./codemirror.es2-5884f31a.js";var b=Object.defineProperty,d=(a,t)=>b(a,"name",{value:t,configurable:!0});s.defineMode("graphql-variables",a=>{const t=o({eatWhitespace:u=>u.eatSpace(),lexRules:m,parseRules:V,editorConfig:{tabSize:a.tabSize}});return{config:a,startState:t.startState,token:t.token,indent:c,electricInput:/^\s*[}\]]/,fold:"brace",closeBrackets:{pairs:'[]{}""',explode:"[]{}"}}});const m={Punctuation:/^\[|]|\{|\}|:|,/,Number:/^-?(?:0|(?:[1-9][0-9]*))(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?/,String:/^"(?:[^"\\]|\\(?:"|\/|\\|b|f|n|r|t|u[0-9a-fA-F]{4}))*"?/,Keyword:/^true|false|null/},V={Document:[e("{"),l("Variable",n(e(","))),e("}")],Variable:[i("variable"),e(":"),"Value"],Value(a){switch(a.kind){case"Number":return"NumberValue";case"String":return"StringValue";case"Punctuation":switch(a.value){case"[":return"ListValue";case"{":return"ObjectValue"}return null;case"Keyword":switch(a.value){case"true":case"false":return"BooleanValue";case"null":return"NullValue"}return null}},NumberValue:[r("Number","number")],StringValue:[r("String","string")],BooleanValue:[r("Keyword","builtin")],NullValue:[r("Keyword","keyword")],ListValue:[e("["),l("Value",n(e(","))),e("]")],ObjectValue:[e("{"),l("ObjectField",n(e(","))),e("}")],ObjectField:[i("attribute"),e(":"),"Value"]};function i(a){return{style:a,match:t=>t.kind==="String",update(t,u){t.name=u.value.slice(1,-1)}}}d(i,"namedKey"); +import{C as s}from"./codemirror.es-52e8b92d.js";import{W as o,a7 as e,a8 as l,a9 as n,aa as r}from"./index-3e3bc65f.js";import{r as c}from"./mode-indent.es-057a4f6a.js";import"./codemirror.es2-5884f31a.js";var b=Object.defineProperty,d=(a,t)=>b(a,"name",{value:t,configurable:!0});s.defineMode("graphql-variables",a=>{const t=o({eatWhitespace:u=>u.eatSpace(),lexRules:m,parseRules:V,editorConfig:{tabSize:a.tabSize}});return{config:a,startState:t.startState,token:t.token,indent:c,electricInput:/^\s*[}\]]/,fold:"brace",closeBrackets:{pairs:'[]{}""',explode:"[]{}"}}});const m={Punctuation:/^\[|]|\{|\}|:|,/,Number:/^-?(?:0|(?:[1-9][0-9]*))(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?/,String:/^"(?:[^"\\]|\\(?:"|\/|\\|b|f|n|r|t|u[0-9a-fA-F]{4}))*"?/,Keyword:/^true|false|null/},V={Document:[e("{"),l("Variable",n(e(","))),e("}")],Variable:[i("variable"),e(":"),"Value"],Value(a){switch(a.kind){case"Number":return"NumberValue";case"String":return"StringValue";case"Punctuation":switch(a.value){case"[":return"ListValue";case"{":return"ObjectValue"}return null;case"Keyword":switch(a.value){case"true":case"false":return"BooleanValue";case"null":return"NullValue"}return null}},NumberValue:[r("Number","number")],StringValue:[r("String","string")],BooleanValue:[r("Keyword","builtin")],NullValue:[r("Keyword","keyword")],ListValue:[e("["),l("Value",n(e(","))),e("]")],ObjectValue:[e("{"),l("ObjectField",n(e(","))),e("}")],ObjectField:[i("attribute"),e(":"),"Value"]};function i(a){return{style:a,match:t=>t.kind==="String",update(t,u){t.name=u.value.slice(1,-1)}}}d(i,"namedKey"); diff --git a/assets/mode.es3-e4cb70b6.js b/assets/mode.es3-96240929.js similarity index 95% rename from assets/mode.es3-e4cb70b6.js rename to assets/mode.es3-96240929.js index cc5692cd..1f37ca43 100644 --- a/assets/mode.es3-e4cb70b6.js +++ b/assets/mode.es3-96240929.js @@ -1 +1 @@ -import{C as n}from"./codemirror.es-52e8b92d.js";import{W as s,a7 as e,a8 as a,aa as r}from"./index-42855235.js";import{r as i}from"./mode-indent.es-057a4f6a.js";import"./codemirror.es2-5884f31a.js";n.defineMode("graphql-results",t=>{const u=s({eatWhitespace:l=>l.eatSpace(),lexRules:o,parseRules:c,editorConfig:{tabSize:t.tabSize}});return{config:t,startState:u.startState,token:u.token,indent:i,electricInput:/^\s*[}\]]/,fold:"brace",closeBrackets:{pairs:'[]{}""',explode:"[]{}"}}});const o={Punctuation:/^\[|]|\{|\}|:|,/,Number:/^-?(?:0|(?:[1-9][0-9]*))(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?/,String:/^"(?:[^"\\]|\\(?:"|\/|\\|b|f|n|r|t|u[0-9a-fA-F]{4}))*"?/,Keyword:/^true|false|null/},c={Document:[e("{"),a("Entry",e(",")),e("}")],Entry:[r("String","def"),e(":"),"Value"],Value(t){switch(t.kind){case"Number":return"NumberValue";case"String":return"StringValue";case"Punctuation":switch(t.value){case"[":return"ListValue";case"{":return"ObjectValue"}return null;case"Keyword":switch(t.value){case"true":case"false":return"BooleanValue";case"null":return"NullValue"}return null}},NumberValue:[r("Number","number")],StringValue:[r("String","string")],BooleanValue:[r("Keyword","builtin")],NullValue:[r("Keyword","keyword")],ListValue:[e("["),a("Value",e(",")),e("]")],ObjectValue:[e("{"),a("ObjectField",e(",")),e("}")],ObjectField:[r("String","property"),e(":"),"Value"]}; +import{C as n}from"./codemirror.es-52e8b92d.js";import{W as s,a7 as e,a8 as a,aa as r}from"./index-3e3bc65f.js";import{r as i}from"./mode-indent.es-057a4f6a.js";import"./codemirror.es2-5884f31a.js";n.defineMode("graphql-results",t=>{const u=s({eatWhitespace:l=>l.eatSpace(),lexRules:o,parseRules:c,editorConfig:{tabSize:t.tabSize}});return{config:t,startState:u.startState,token:u.token,indent:i,electricInput:/^\s*[}\]]/,fold:"brace",closeBrackets:{pairs:'[]{}""',explode:"[]{}"}}});const o={Punctuation:/^\[|]|\{|\}|:|,/,Number:/^-?(?:0|(?:[1-9][0-9]*))(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?/,String:/^"(?:[^"\\]|\\(?:"|\/|\\|b|f|n|r|t|u[0-9a-fA-F]{4}))*"?/,Keyword:/^true|false|null/},c={Document:[e("{"),a("Entry",e(",")),e("}")],Entry:[r("String","def"),e(":"),"Value"],Value(t){switch(t.kind){case"Number":return"NumberValue";case"String":return"StringValue";case"Punctuation":switch(t.value){case"[":return"ListValue";case"{":return"ObjectValue"}return null;case"Keyword":switch(t.value){case"true":case"false":return"BooleanValue";case"null":return"NullValue"}return null}},NumberValue:[r("Number","number")],StringValue:[r("String","string")],BooleanValue:[r("Keyword","builtin")],NullValue:[r("Keyword","keyword")],ListValue:[e("["),a("Value",e(",")),e("]")],ObjectValue:[e("{"),a("ObjectField",e(",")),e("}")],ObjectField:[r("String","property"),e(":"),"Value"]}; diff --git a/assets/python-9156f981.js b/assets/python-44c5b0d9.js similarity index 98% rename from assets/python-9156f981.js rename to assets/python-44c5b0d9.js index 066e40e2..c45ccce3 100644 --- a/assets/python-9156f981.js +++ b/assets/python-44c5b0d9.js @@ -1,4 +1,4 @@ -import{m as a}from"./index-42855235.js";/*!----------------------------------------------------------------------------- +import{m as a}from"./index-3e3bc65f.js";/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166) * Released under the MIT license diff --git a/assets/razor-00ea269a.js b/assets/razor-7d4f3a02.js similarity index 99% rename from assets/razor-00ea269a.js rename to assets/razor-7d4f3a02.js index 0932c7ac..b42db9c3 100644 --- a/assets/razor-00ea269a.js +++ b/assets/razor-7d4f3a02.js @@ -1,4 +1,4 @@ -import{m as s}from"./index-42855235.js";/*!----------------------------------------------------------------------------- +import{m as s}from"./index-3e3bc65f.js";/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166) * Released under the MIT license diff --git a/assets/tsMode-a6256fd0.js b/assets/tsMode-d3096867.js similarity index 99% rename from assets/tsMode-a6256fd0.js rename to assets/tsMode-d3096867.js index 46c28ea6..10d1cebf 100644 --- a/assets/tsMode-a6256fd0.js +++ b/assets/tsMode-d3096867.js @@ -1,4 +1,4 @@ -var M=Object.defineProperty;var R=(e,t,r)=>t in e?M(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var _=(e,t,r)=>(R(e,typeof t!="symbol"?t+"":t,r),r);import{t as K,m as E}from"./index-42855235.js";/*!----------------------------------------------------------------------------- +var M=Object.defineProperty;var R=(e,t,r)=>t in e?M(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var _=(e,t,r)=>(R(e,typeof t!="symbol"?t+"":t,r),r);import{t as K,m as E}from"./index-3e3bc65f.js";/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166) * Released under the MIT license diff --git a/assets/typescript-25bb18d7.js b/assets/typescript-7a1a6d4d.js similarity index 98% rename from assets/typescript-25bb18d7.js rename to assets/typescript-7a1a6d4d.js index 18e90f19..cbc8b514 100644 --- a/assets/typescript-25bb18d7.js +++ b/assets/typescript-7a1a6d4d.js @@ -1,4 +1,4 @@ -import{m as a}from"./index-42855235.js";/*!----------------------------------------------------------------------------- +import{m as a}from"./index-3e3bc65f.js";/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166) * Released under the MIT license diff --git a/assets/xml-69a62d23.js b/assets/xml-4f671360.js similarity index 97% rename from assets/xml-69a62d23.js rename to assets/xml-4f671360.js index 02014475..5deef0c2 100644 --- a/assets/xml-69a62d23.js +++ b/assets/xml-4f671360.js @@ -1,4 +1,4 @@ -import{m}from"./index-42855235.js";/*!----------------------------------------------------------------------------- +import{m}from"./index-3e3bc65f.js";/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166) * Released under the MIT license diff --git a/assets/yaml-46c0b391.js b/assets/yaml-94097e24.js similarity index 98% rename from assets/yaml-46c0b391.js rename to assets/yaml-94097e24.js index 8f0ab606..289e6c1b 100644 --- a/assets/yaml-46c0b391.js +++ b/assets/yaml-94097e24.js @@ -1,4 +1,4 @@ -import{m as i}from"./index-42855235.js";/*!----------------------------------------------------------------------------- +import{m as i}from"./index-3e3bc65f.js";/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166) * Released under the MIT license diff --git a/index.html b/index.html index 908f4c05..fa405b40 100644 --- a/index.html +++ b/index.html @@ -8,7 +8,7 @@ content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" /> daed - +