| 904 | `)):kl._None}static traceCreation(e,t){return e?new kl(1,t.name):kl._None}constructor(e,t){this.type=e,this.name=t,this._start=Date.now(),this._dep=[]}branch(e,t){const i=new kl(3,e.toString());return this._dep.push([e,t,i]),i}stop(){const e=Date.now()-this._start;kl._totals+=e;let t=!1;function i(o,r){const a=[],l=new Array(o+1).join(" ");for(const[c,d,u]of r._dep)if(d&&u){t=!0,a.push(`${l}CREATES -> ${c}`);const f=i(o+1,u);f&&a.push(f)}else a.push(`${l}uses -> ${c}`);return a.join(` |
| 905 | `)}const n=[`${this.type===1?"CREATE":"CALL"} ${this.name}`,`${i(1,this)}`,`DONE, took ${e.toFixed(2)}ms (grand total ${kl._totals.toFixed(2)}ms)`];(e>2||t)&&kl.all.add(n.join(` |
| 906 | `))}};kl.all=new Set,kl._None=new class extends kl{constructor(){super(0,null)}stop(){}branch(){return this}},kl._totals=0;let RD=kl;const det=new Set([ut.inMemory,ut.vscodeSourceControl,ut.walkThrough,ut.walkThroughSnippet,ut.vscodeChatCodeBlock,ut.vscodeTerminal]);class uet{constructor(){this._byResource=new bs,this._byOwner=new Map}set(e,t,i){let n=this._byResource.get(e);n||(n=new Map,this._byResource.set(e,n)),n.set(t,i);let o=this._byOwner.get(t);o||(o=new bs,this._byOwner.set(t,o)),o.set(e,i)}get(e,t){return this._byResource.get(e)?.get(t)}delete(e,t){let i=!1,n=!1;const o=this._byResource.get(e);o&&(i=o.delete(t));const r=this._byOwner.get(t);if(r&&(n=r.delete(e)),i!==n)throw new Error("illegal state");return i&&n}values(e){return typeof e=="string"?this._byOwner.get(e)?.values()??Gt.empty():nt.isUri(e)?this._byResource.get(e)?.values()??Gt.empty():Gt.map(Gt.concat(...this._byOwner.values()),t=>t[1])}}class het{constructor(e){this.errors=0,this.infos=0,this.warnings=0,this.unknowns=0,this._data=new bs,this._service=e,this._subscription=e.onMarkerChanged(this._update,this)}dispose(){this._subscription.dispose()}_update(e){for(const t of e){const i=this._data.get(t);i&&this._substract(i);const n=this._resourceStats(t);this._add(n),this._data.set(t,n)}}_resourceStats(e){const t={errors:0,warnings:0,infos:0,unknowns:0};if(det.has(e.scheme))return t;for(const{severity:i}of this._service.read({resource:e}))i===Bn.Error?t.errors+=1:i===Bn.Warning?t.warnings+=1:i===Bn.Info?t.infos+=1:t.unknowns+=1;return t}_substract(e){this.errors-=e.errors,this.warnings-=e.warnings,this.infos-=e.infos,this.unknowns-=e.unknowns}_add(e){this.errors+=e.errors,this.warnings+=e.warnings,this.infos+=e.infos,this.unknowns+=e.unknowns}}class Nb{constructor(){this._onMarkerChanged=new fhe({delay:0,merge:Nb._merge}),this.onMarkerChanged=this._onMarkerChanged.event,this._data=new uet,this._stats=new het(this),this._filteredResources=new bs}dispose(){this._stats.dispose(),this._onMarkerChanged.dispose()}remove(e,t){for(const i of t||[])this.changeOne(e,i,[])}changeOne(e,t,i){if(Fhe(i))this._data.delete(t,e)&&this._onMarkerChanged.fire([t]);else{const n=[];for(const o of i){const r=Nb._toMarker(e,t,o);r&&n.push(r)}this._data.set(t,e,n),this._onMarkerChanged.fire([t])}}static _toMarker(e,t,i){let{code:n,severity:o,message:r,source:a,startLineNumber:l,startColumn:c,endLineNumber:d,endColumn:u,relatedInformation:f,tags:p,origin:m}=i;if(r)return l=l>0?l:1,c=c>0?c:1,d=d>=l?d:l,u=u>0?u:c,{resource:t,owner:e,code:n,severity:o,message:r,source:a,startLineNumber:l,startColumn:c,endLineNumber:d,endColumn:u,relatedInformation:f,tags:p,origin:m}}changeAll(e,t){const i=[],n=this._data.values(e);if(n)for(const o of n){const r=Gt.first(o);r&&(i.push(r.resource),this._data.delete(r.resource,e))}if(zr(t)){const o=new bs;for(const{resource:r,marker:a}of t){const l=Nb._toMarker(e,r,a);if(!l)continue;const c=o.get(r);c?c.push(l):(o.set(r,[l]),i.push(r))}for(const[r,a]of o)this._data.set(r,e,a)}i.length>0&&this._onMarkerChanged.fire(i)}_createFilteredMarker(e,t){const i=t.length===1?v(1738,'Problems are paused because: "{0}"',t[0]):v(1739,'Problems are paused because: "{0}" and {1} more',t[0],t.length-1);return{owner:"markersFilter",resource:e,severity:Bn.Info,message:i,startLineNumber:1,startColumn:1,endLineNumber:1,endColumn:1}}read(e=Object.create(null)){let{owner:t,resource:i,severities:n,take:o}=e;if((!o||o<0)&&(o=-1),t&&i){const r=e.ignoreResourceFilters?void 0:this._filteredResources.get(i);if(r?.length)return[this._createFilteredMarker(i,r)];const a=this._data.get(i,t);if(!a)return[];const l=[];for(const c of a){if(o>0&&l.length===o)break;const d=e.ignoreResourceFilters?void 0:this._filteredResources.get(i);d?.length?l.push(this._createFilteredMarker(i,d)):Nb._accept(c,n)&&l.push(c)}return l}else{const r=!t&&!i?this._data.values():this._data.values(i??t),a=[],l=new mEe;for(const c of r)for(const d of c){if(l.has(d.resource))continue;if(o>0&&a.length===o)break;const u=e.ignoreResourceFilters?void 0:this._filteredResources.get(d.resource);u?.length?(a.push(this._createFilteredMarker(d.resource,u)),l.add(d.resource)):Nb._accept(d,n)&&a.push(d)}return a}}static _accept(e,t){return t===void 0||(t&e.severity)===e.severity}static _merge(e){const t=new bs;for(const i of e)for(const n of i)t.set(n,!0);return Array.from(t.keys())}}class fet extends X{get configurationModel(){return this._configurationModel}constructor(e){super(),this.logService=e,this._configurationModel=Ao.createEmptyModel(e)}reload(){return this.resetConfigurationModel(),this.configurationModel}getConfigurationDefaultOverrides(){return{}}resetConfigurationModel(){this._configurationModel=Ao.createEmptyModel(this.logService);const e=Wn.as(Tu.Configuration).getConfigurationProperties();this.updateConfigurationModel(Object.keys(e),e)}updateConfigurationModel(e,t){const i=this.getConfigurationDefaultOverrides();for(const n of e){const o=i[n],r=t[n];o!==void 0?this._configurationModel.setValue(n,o):r?this._configurationModel.setValue(n,lh(r.default)):this._configurationModel.removeValue(n)}}}class get extends X{constructor(e,t=[]){super(),this.logger=new kEe([e,...t]),this._register(e.onDidChangeLogLevel(i=>this.setLevel(i)))}get onDidChangeLogLevel(){return this.logger.onDidChangeLogLevel}setLevel(e){this.logger.setLevel(e)}getLevel(){return this.logger.getLevel()}trace(e,...t){this.logger.trace(e,...t)}debug(e,...t){this.logger.debug(e,...t)}info(e,...t){this.logger.info(e,...t)}warn(e,...t){this.logger.warn(e,...t)}error(e,...t){this.logger.error(e,...t)}}class pet{getParserClass(){throw new Error("not implemented in StandaloneTreeSitterLibraryService")}supportsLanguage(e,t){return!1}getLanguage(e,t,i){}getInjectionQueries(e,t){return null}getHighlightingQueries(e,t){return null}}var Xh=function(s,e,t,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(s,e,t,i);else for(var a=s.length-1;a>=0;a--)(r=s[a])&&(o=(n<3?r(o):n>3?r(e,t,o):r(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},Ds=function(s,e){return function(t,i){e(t,i,s)}};class met{constructor(e){this.disposed=!1,this.model=e,this._onWillDispose=new G}get textEditorModel(){return this.model}dispose(){this.disposed=!0,this._onWillDispose.fire()}}let Uq=class{constructor(e){this.modelService=e}createModelReference(e){const t=this.modelService.getModel(e);return t?Promise.resolve(new Wxe(new met(t))):Promise.reject(new Error("Model not found"))}};Uq=Xh([Ds(0,Tn)],Uq);const n5=class n5{show(){return n5.NULL_PROGRESS_RUNNER}async showWhile(e,t){await e}};n5.NULL_PROGRESS_RUNNER={done:()=>{},total:()=>{},worked:()=>{}};let $q=n5;class _et{withProgress(e,t,i){return t({report:()=>{}})}}class bet{constructor(){this.isExtensionDevelopment=!1,this.isBuilt=!1}}class vet{async confirm(e){return{confirmed:this.doConfirm(e.message,e.detail),checkboxChecked:!1}}doConfirm(e,t){let i=e;return t&&(i=i+` |
| 907 | |
| 908 | `+t),Mi.confirm(i)}async prompt(e){let t;if(this.doConfirm(e.message,e.detail)){const n=[...e.buttons??[]];e.cancelButton&&typeof e.cancelButton!="string"&&typeof e.cancelButton!="boolean"&&n.push(e.cancelButton),t=await n[0]?.run({checkboxChecked:!1})}return{result:t}}async error(e,t){await this.prompt({type:Pn.Error,message:e,detail:t})}}const iE=class iE{info(e){return this.notify({severity:Pn.Info,message:e})}warn(e){return this.notify({severity:Pn.Warning,message:e})}error(e){return this.notify({severity:Pn.Error,message:e})}notify(e){switch(e.severity){case Pn.Error:console.error(e.message);break;case Pn.Warning:console.warn(e.message);break;default:console.log(e.message);break}return iE.NO_OP}prompt(e,t,i,n){return iE.NO_OP}status(e,t){return{close:()=>{}}}};iE.NO_OP=new lAe;let jq=iE,qq=class{constructor(e){this._onWillExecuteCommand=new G,this._onDidExecuteCommand=new G,this.onDidExecuteCommand=this._onDidExecuteCommand.event,this._instantiationService=e}executeCommand(e,...t){const i=Xt.getCommand(e);if(!i)return Promise.reject(new Error(`command '${e}' not found`));try{this._onWillExecuteCommand.fire({commandId:e,args:t});const n=this._instantiationService.invokeFunction.apply(this._instantiationService,[i.handler,...t]);return this._onDidExecuteCommand.fire({commandId:e,args:t}),Promise.resolve(n)}catch(n){return Promise.reject(n)}}};qq=Xh([Ds(0,Ze)],qq);let c0=class extends YQe{constructor(e,t,i,n,o,r){super(e,t,i,n,o),this._cachedResolver=null,this._dynamicKeybindings=[],this._domNodeListeners=[];const a=p=>{const m=new re;m.add(J(p,xe.KEY_DOWN,_=>{const C=new Vi(_);this._dispatch(C,C.target)&&(C.preventDefault(),C.stopPropagation())})),m.add(J(p,xe.KEY_UP,_=>{const C=new Vi(_);this._singleModifierDispatch(C,C.target)&&C.preventDefault()})),this._domNodeListeners.push(new Cet(p,m))},l=p=>{for(let m=0;m<this._domNodeListeners.length;m++){const _=this._domNodeListeners[m];_.domNode===p&&(this._domNodeListeners.splice(m,1),_.dispose())}},c=p=>{p.getOption(70)||a(p.getContainerDomNode())},d=p=>{p.getOption(70)||l(p.getContainerDomNode())};this._register(r.onCodeEditorAdd(c)),this._register(r.onCodeEditorRemove(d)),r.listCodeEditors().forEach(c);const u=p=>{a(p.getContainerDomNode())},f=p=>{l(p.getContainerDomNode())};this._register(r.onDiffEditorAdd(u)),this._register(r.onDiffEditorRemove(f)),r.listDiffEditors().forEach(u)}addDynamicKeybinding(e,t,i,n){return Ld(Xt.registerCommand(e,i),this.addDynamicKeybindings([{keybinding:t,command:e,when:n}]))}addDynamicKeybindings(e){const t=e.map(i=>({keybinding:nH(i.keybinding,Ja),command:i.command??null,commandArgs:i.commandArgs,when:i.when,weight1:1e3,weight2:0,extensionId:null,isBuiltinExtension:!1}));return this._dynamicKeybindings=this._dynamicKeybindings.concat(t),this.updateResolver(),Ke(()=>{for(let i=0;i<this._dynamicKeybindings.length;i++)if(this._dynamicKeybindings[i]===t[0]){this._dynamicKeybindings.splice(i,t.length),this.updateResolver();return}})}updateResolver(){this._cachedResolver=null,this._onDidUpdateKeybindings.fire()}_getResolver(){if(!this._cachedResolver){const e=this._toNormalizedKeybindingItems(Lo.getDefaultKeybindings(),!0),t=this._toNormalizedKeybindingItems(this._dynamicKeybindings,!1);this._cachedResolver=new ID(e,t,i=>this._log(i))}return this._cachedResolver}_documentHasFocus(){return Mi.document.hasFocus()}_toNormalizedKeybindingItems(e,t){const i=[];let n=0;for(const o of e){const r=o.when||void 0,a=o.keybinding;if(!a)i[n++]=new Jle(void 0,o.command,o.commandArgs,r,t,null,!1);else{const l=zk.resolveKeybinding(a,Ja);for(const c of l)i[n++]=new Jle(c,o.command,o.commandArgs,r,t,null,!1)}}return i}resolveKeyboardEvent(e){const t=new Ig(e.ctrlKey,e.shiftKey,e.altKey,e.metaKey,e.keyCode);return new zk([t],Ja)}};c0=Xh([Ds(0,gt),Ds(1,an),Ds(2,Lr),Ds(3,Qn),Ds(4,rn),Ds(5,ni)],c0);class Cet extends X{constructor(e,t){super(),this.domNode=e,this._register(t)}}function yce(s){return!!s&&typeof s=="object"&&(!s.overrideIdentifier||typeof s.overrideIdentifier=="string")&&(!s.resource||s.resource instanceof nt)}let aP=class{constructor(e){this.logService=e,this._onDidChangeConfiguration=new G,this.onDidChangeConfiguration=this._onDidChangeConfiguration.event;const t=new fet(e);this._configuration=new BF(t.reload(),Ao.createEmptyModel(e),Ao.createEmptyModel(e),Ao.createEmptyModel(e),Ao.createEmptyModel(e),Ao.createEmptyModel(e),new bs,Ao.createEmptyModel(e),new bs,e),t.dispose()}getValue(e,t){const i=typeof e=="string"?e:void 0,n=yce(e)?e:yce(t)?t:{};return this._configuration.getValue(i,n,void 0)}updateValues(e){const t={data:this._configuration.toData()},i=[];for(const n of e){const[o,r]=n;this.getValue(o)!==r&&(this._configuration.updateValue(o,r),i.push(o))}if(i.length>0){const n=new jQe({keys:i,overrides:[]},t,this._configuration,void 0,this.logService);n.source=8,this._onDidChangeConfiguration.fire(n)}return Promise.resolve()}updateValue(e,t,i,n){return this.updateValues([[e,t]])}inspect(e,t={}){return this._configuration.inspect(e,t,void 0)}};aP=Xh([Ds(0,rn)],aP);let Kq=class{constructor(e,t,i){this.configurationService=e,this.modelService=t,this.languageService=i,this._onDidChangeConfiguration=new G,this.configurationService.onDidChangeConfiguration(n=>{this._onDidChangeConfiguration.fire({affectedKeys:n.affectedKeys,affectsConfiguration:(o,r)=>n.affectsConfiguration(r)})})}getValue(e,t,i){const n=K.isIPosition(t)?t:null,o=n?typeof i=="string"?i:void 0:typeof t=="string"?t:void 0,r=e?this.getLanguage(e,n):void 0;return typeof o>"u"?this.configurationService.getValue({resource:e,overrideIdentifier:r}):this.configurationService.getValue(o,{resource:e,overrideIdentifier:r})}getLanguage(e,t){const i=this.modelService.getModel(e);return i?t?i.getLanguageIdAtPosition(t.lineNumber,t.column):i.getLanguageId():this.languageService.guessLanguageIdByFilepathOrFirstLine(e)}};Kq=Xh([Ds(0,Lt),Ds(1,Tn),Ds(2,Xn)],Kq);let Gq=class{constructor(e){this.configurationService=e}getEOL(e,t){const i=this.configurationService.getValue("files.eol",{overrideIdentifier:t,resource:e});return i&&typeof i=="string"&&i!=="auto"?i:Aa||Ft?` |
| 909 | `:`\r |
nothing calls this directly
no outgoing calls
no test coverage detected