UNPKG

ruru

Version:

Grafast-flavoured GraphiQL distribution

2 lines 7.61 kB
export const __webpack_esm_id__=5198;export const __webpack_esm_ids__=[3653,5198];export const __webpack_esm_modules__={80041(e,t,i){i.r(t),i.d(t,{getRoot:()=>d,hasDriveLetter:()=>_,isEqualOrParent:()=>a,isPathSeparator:()=>o,isWindowsDriveLetter:()=>u,toPosixPath:()=>h,toSlashes:()=>c});var r=i(60942),s=i(69958),n=i(60891);function o(e){return 47===e||92===e}function c(e){return e.replace(/[\\/]/g,r.posix.sep)}function h(e){return-1===e.indexOf("/")&&(e=c(e)),/^[a-zA-Z]:(\/|$)/.test(e)&&(e="/"+e),e}function d(e,t=r.posix.sep){if(!e)return"";const i=e.length,s=e.charCodeAt(0);if(o(s)){if(o(e.charCodeAt(1))&&!o(e.charCodeAt(2))){let r=3;const s=r;for(;r<i&&!o(e.charCodeAt(r));r++);if(s!==r&&!o(e.charCodeAt(r+1)))for(r+=1;r<i;r++)if(o(e.charCodeAt(r)))return e.slice(0,r+1).replace(/[\\/]/g,t)}return t}if(u(s)&&58===e.charCodeAt(1))return o(e.charCodeAt(2))?e.slice(0,2)+t:e.slice(0,2);let n=e.indexOf("://");if(-1!==n)for(n+=3;n<i;n++)if(o(e.charCodeAt(n)))return e.slice(0,n+1);return""}function a(e,t,i,s=r.sep){if(e===t)return!0;if(!e||!t)return!1;if(t.length>e.length)return!1;if(i){if(!(0,n.startsWithIgnoreCase)(e,t))return!1;if(t.length===e.length)return!0;let i=t.length;return t.charAt(t.length-1)===s&&i--,e.charAt(i)===s}return t.charAt(t.length-1)!==s&&(t+=s),0===e.indexOf(t)}function u(e){return e>=65&&e<=90||e>=97&&e<=122}function _(e,t=s.isWindows){return!!t&&u(e.charCodeAt(0))&&58===e.charCodeAt(1)}},84838(e,t,i){i.r(t),i.d(t,{score:()=>n});var r=i(16611),s=i(60942);function n(e,t,i,o,c,h){if(Array.isArray(e)){let r=0;for(const s of e){const e=n(s,t,i,o,c,h);if(10===e)return e;e>r&&(r=e)}return r}if("string"==typeof e)return o?"*"===e?5:e===i?10:0:0;if(e){const{language:n,pattern:d,scheme:a,hasAccessToAllModels:u,notebookType:_}=e;if(!o&&!u)return 0;_&&c&&(t=c);let l=0;if(a)if(a===t.scheme)l=10;else{if("*"!==a)return 0;l=5}if(n)if(n===i)l=10;else{if("*"!==n)return 0;l=Math.max(l,5)}if(_)if(_===h)l=10;else{if("*"!==_||void 0===h)return 0;l=Math.max(l,5)}if(d){let e;if(e="string"==typeof d?d:{...d,base:(0,s.normalize)(d.base)},e!==t.fsPath&&!(0,r.match)(e,t.fsPath))return 0;l=10}return l}return 0}},33653(e,t,i){i.r(t),i.d(t,{ILanguageFeaturesService:()=>r});const r=(0,i(35184).createDecorator)("ILanguageFeaturesService")},50022(e,t,i){i.d(t,{LanguageFeaturesService:()=>l}),i.r(t);var r=i(22573),s=i(32293),n=i(92692),o=i(84838);function c(e){return"string"!=typeof e&&(Array.isArray(e)?e.every(c):!!e.exclusive)}class h{constructor(e,t,i,r,s){this.uri=e,this.languageId=t,this.notebookUri=i,this.notebookType=r,this.recursive=s}equals(e){return this.notebookType===e.notebookType&&this.languageId===e.languageId&&this.uri.toString()===e.uri.toString()&&this.notebookUri?.toString()===e.notebookUri?.toString()&&this.recursive===e.recursive}}class d{constructor(e){this._notebookInfoResolver=e,this._clock=0,this._entries=[],this._onDidChange=new r.Emitter,this.onDidChange=this._onDidChange.event}register(e,t){let i={selector:e,provider:t,_score:-1,_time:this._clock++};return this._entries.push(i),this._lastCandidate=void 0,this._onDidChange.fire(this._entries.length),(0,s.toDisposable)(()=>{if(i){const e=this._entries.indexOf(i);e>=0&&(this._entries.splice(e,1),this._lastCandidate=void 0,this._onDidChange.fire(this._entries.length),i=void 0)}})}has(e){return this.all(e).length>0}all(e){if(!e)return[];this._updateScores(e,!1);const t=[];for(const e of this._entries)e._score>0&&t.push(e.provider);return t}ordered(e,t=!1){const i=[];return this._orderedForEach(e,t,e=>i.push(e.provider)),i}orderedGroups(e){const t=[];let i,r;return this._orderedForEach(e,!1,e=>{i&&r===e._score?i.push(e.provider):(r=e._score,i=[e.provider],t.push(i))}),t}_orderedForEach(e,t,i){this._updateScores(e,t);for(const e of this._entries)e._score>0&&i(e)}_updateScores(e,t){const i=this._notebookInfoResolver?.(e.uri),r=i?new h(e.uri,e.getLanguageId(),i.uri,i.type,t):new h(e.uri,e.getLanguageId(),void 0,void 0,t);if(!this._lastCandidate?.equals(r)){this._lastCandidate=r;for(const i of this._entries)if(i._score=(0,o.score)(i.selector,r.uri,r.languageId,(0,n.shouldSynchronizeModel)(e),r.notebookUri,r.notebookType),c(i.selector)&&i._score>0){if(!t){for(const e of this._entries)e._score=0;i._score=1e3;break}i._score=0}this._entries.sort(d._compareByScoreAndTime)}}static _compareByScoreAndTime(e,t){return e._score<t._score?1:e._score>t._score?-1:a(e.selector)&&!a(t.selector)?1:!a(e.selector)&&a(t.selector)?-1:e._time<t._time?1:e._time>t._time?-1:0}}function a(e){return"string"!=typeof e&&(Array.isArray(e)?e.some(a):Boolean(e.isBuiltin))}var u=i(33653),_=i(17531);class l{constructor(){this.referenceProvider=new d(this._score.bind(this)),this.renameProvider=new d(this._score.bind(this)),this.newSymbolNamesProvider=new d(this._score.bind(this)),this.codeActionProvider=new d(this._score.bind(this)),this.definitionProvider=new d(this._score.bind(this)),this.typeDefinitionProvider=new d(this._score.bind(this)),this.declarationProvider=new d(this._score.bind(this)),this.implementationProvider=new d(this._score.bind(this)),this.documentSymbolProvider=new d(this._score.bind(this)),this.inlayHintsProvider=new d(this._score.bind(this)),this.colorProvider=new d(this._score.bind(this)),this.codeLensProvider=new d(this._score.bind(this)),this.documentFormattingEditProvider=new d(this._score.bind(this)),this.documentRangeFormattingEditProvider=new d(this._score.bind(this)),this.onTypeFormattingEditProvider=new d(this._score.bind(this)),this.signatureHelpProvider=new d(this._score.bind(this)),this.hoverProvider=new d(this._score.bind(this)),this.documentHighlightProvider=new d(this._score.bind(this)),this.multiDocumentHighlightProvider=new d(this._score.bind(this)),this.selectionRangeProvider=new d(this._score.bind(this)),this.foldingRangeProvider=new d(this._score.bind(this)),this.linkProvider=new d(this._score.bind(this)),this.inlineCompletionsProvider=new d(this._score.bind(this)),this.inlineEditProvider=new d(this._score.bind(this)),this.completionProvider=new d(this._score.bind(this)),this.linkedEditingRangeProvider=new d(this._score.bind(this)),this.documentRangeSemanticTokensProvider=new d(this._score.bind(this)),this.documentSemanticTokensProvider=new d(this._score.bind(this)),this.documentDropEditProvider=new d(this._score.bind(this)),this.documentPasteEditProvider=new d(this._score.bind(this))}_score(e){return this._notebookTypeResolver?.(e)}}(0,_.registerSingleton)(u.ILanguageFeaturesService,l,1)},72015(e,t,i){i.r(t),i.d(t,{SyncDescriptor:()=>r});class r{constructor(e,t=[],i=!1){this.ctor=e,this.staticArguments=t,this.supportsDelayedInstantiation=i}}},17531(e,t,i){i.r(t),i.d(t,{getSingletonServiceDescriptors:()=>o,registerSingleton:()=>n});var r=i(72015);const s=[];function n(e,t,i){t instanceof r.SyncDescriptor||(t=new r.SyncDescriptor(t,[],Boolean(i))),s.push([e,t])}function o(){return s}},35184(e,t,i){var r;i.r(t),i.d(t,{IInstantiationService:()=>s,_util:()=>r,createDecorator:()=>n}),function(e){e.serviceIds=new Map,e.DI_TARGET="$di$target",e.DI_DEPENDENCIES="$di$dependencies",e.getServiceDependencies=function(t){return t[e.DI_DEPENDENCIES]||[]}}(r||(r={}));const s=n("instantiationService");function n(e){if(r.serviceIds.has(e))return r.serviceIds.get(e);const t=function(e,i,s){if(3!==arguments.length)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");!function(e,t,i){t[r.DI_TARGET]===t?t[r.DI_DEPENDENCIES].push({id:e,index:i}):(t[r.DI_DEPENDENCIES]=[{id:e,index:i}],t[r.DI_TARGET]=t)}(t,e,s)};return t.toString=()=>e,r.serviceIds.set(e,t),t}}}; //# sourceMappingURL=5198.js.map