diff --git a/dist/index.js b/dist/index.js new file mode 100644 index 00000000..7f834fcc --- /dev/null +++ b/dist/index.js @@ -0,0 +1,2 @@ +"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("atom"),e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},i="object"==typeof e&&e&&e.Object===Object&&e,s="object"==typeof self&&self&&self.Object===Object&&self,r=i||s||Function("return this")(),n=r.Symbol,o=Object.prototype,a=o.hasOwnProperty,d=o.toString,l=n?n.toStringTag:void 0;var h=function(t){var e=a.call(t,l),i=t[l];try{t[l]=void 0;var s=!0}catch(t){}var r=d.call(t);return s&&(e?t[l]=i:delete t[l]),r},c=Object.prototype.toString;var u=function(t){return c.call(t)},p=n?n.toStringTag:void 0;var g=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":p&&p in Object(t)?h(t):u(t)};var f=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)};var m,v=function(t){if(!f(t))return!1;var e=g(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e},b=r["__core-js_shared__"],y=(m=/[^.]+$/.exec(b&&b.keys&&b.keys.IE_PROTO||""))?"Symbol(src)_1."+m:"";var w=function(t){return!!y&&y in t},_=Function.prototype.toString;var I=function(t){if(null!=t){try{return _.call(t)}catch(t){}try{return t+""}catch(t){}}return""},L=/^\[object .+?Constructor\]$/,E=Function.prototype,D=Object.prototype,M=E.toString,P=D.hasOwnProperty,C=RegExp("^"+M.call(P).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var j=function(t){return!(!f(t)||w(t))&&(v(t)?C:L).test(I(t))};var A=function(t,e){return null==t?void 0:t[e]};var O=function(t,e){var i=A(t,e);return j(i)?i:void 0},U=O(Object,"create");var S=function(){this.__data__=U?U(null):{},this.size=0};var $=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},N=Object.prototype.hasOwnProperty;var k=function(t){var e=this.__data__;if(U){var i=e[t];return"__lodash_hash_undefined__"===i?void 0:i}return N.call(e,t)?e[t]:void 0},T=Object.prototype.hasOwnProperty;var x=function(t){var e=this.__data__;return U?void 0!==e[t]:T.call(e,t)};var R=function(t,e){var i=this.__data__;return this.size+=this.has(t)?0:1,i[t]=U&&void 0===e?"__lodash_hash_undefined__":e,this};function F(t){var e=-1,i=null==t?0:t.length;for(this.clear();++e-1};var X=function(t,e){var i=this.__data__,s=V(i,t);return s<0?(++this.size,i.push([t,e])):i[s][1]=e,this};function H(t){var e=-1,i=null==t?0:t.length;for(this.clear();++e-1};var vt=function(t,e,i){for(var s=-1,r=null==t?0:t.length;++s=200){var l=e?null:It(t);if(l)return _t(l);o=!1,r=bt,d=new ct}else d=e?[]:a;t:for(;++s" • "+t);atom.notifications.addWarning("[Linter] "+t,{dismissable:!0,detail:`${e}\n${s.join("\n")}`})}const Mt=new Set(["error","warning","info"]);function Pt(e,i){const s=[];if(Array.isArray(i)){let e=!1,r=!1,n=!1,o=!1,a=!1,d=!1,l=!1,h=!1,c=!1;for(let u=0,{length:p}=i;ut.concat(e.getScopeDescriptor().getScopesArray()),["*"]))}let St;function $t(t,e,i){if(!t)return!0;if(i){let e=null;const i=atom.project.getPaths();for(let s=0,{length:r}=i;s!o.includes(t)),d=new Set;for(let t=0,e=a.length;t{this.delegates.delete(i)}),i.onDidUpdate(t=>{this.emitter.emit("did-update",{linter:i,messages:t})}),this.emitter.emit("observe",i),i}getProviders(){return Array.from(this.delegates)}observe(t){return this.delegates.forEach(t),this.emitter.on("observe",t)}onDidUpdate(t){return this.emitter.on("did-update",t)}dispose(){for(const t of this.delegates)t.dispose();this.subscriptions.dispose()}}var Bt=function(){return r.Date.now()};var zt=function(t){return null!=t&&"object"==typeof t};var qt=function(t){return"symbol"==typeof t||zt(t)&&"[object Symbol]"==g(t)},Vt=/^\s+|\s+$/g,Gt=/^[-+]0x[0-9a-f]+$/i,Kt=/^0b[01]+$/i,Wt=/^0o[0-7]+$/i,Yt=parseInt;var Xt=function(t){if("number"==typeof t)return t;if(qt(t))return NaN;if(f(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=f(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(Vt,"");var i=Kt.test(t);return i||Wt.test(t)?Yt(t.slice(2),i?2:8):Gt.test(t)?NaN:+t},Ht=Math.max,Jt=Math.min;var Qt=function(t,e,i){var s,r,n,o,a,d,l=0,h=!1,c=!1,u=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function p(e){var i=s,n=r;return s=r=void 0,l=e,o=t.apply(n,i)}function g(t){return l=t,a=setTimeout(v,e),h?p(t):o}function m(t){var i=t-d;return void 0===d||i>=e||i<0||c&&t-l>=n}function v(){var t=Bt();if(m(t))return b(t);a=setTimeout(v,function(t){var i=e-(t-d);return c?Jt(i,n-(t-l)):i}(t))}function b(t){return a=void 0,u&&s?p(t):(s=r=void 0,o)}function y(){var t=Bt(),i=m(t);if(s=arguments,r=this,d=t,i){if(void 0===a)return g(d);if(c)return clearTimeout(a),a=setTimeout(v,e),p(d)}return void 0===a&&(a=setTimeout(v,e)),o}return e=Xt(e)||0,f(i)&&(h=!!i.leading,n=(c="maxWait"in i)?Ht(Xt(i.maxWait)||0,e):n,u="trailing"in i?!!i.trailing:u),y.cancel=function(){void 0!==a&&clearTimeout(a),l=0,s=d=r=a=void 0},y.flush=function(){return void 0===a?o:b(Bt())},y};class Zt{constructor(){this.emitter=void 0,this.messages=void 0,this.messagesMap=void 0,this.subscriptions=void 0,this.debouncedUpdate=void 0,this.emitter=new t.Emitter,this.messages=[],this.messagesMap=new Set,this.subscriptions=new t.CompositeDisposable,this.debouncedUpdate=Qt(this.update,100,{leading:!0}),this.subscriptions.add(this.emitter)}set({messages:t,linter:e,buffer:i}){let s=null;for(const t of this.messagesMap)if(t.buffer===i&&t.linter===e){s=t;break}s?(s.messages=t,s.changed=!0):this.messagesMap.add({messages:t,linter:e,buffer:i,oldMessages:[],changed:!0,deleted:!1}),this.debouncedUpdate()}update(){const t={added:[],removed:[],messages:[]};for(const e of this.messagesMap){if(e.deleted){xt(t.removed,e.oldMessages),this.messagesMap.delete(e);continue}if(!e.changed){xt(t.messages,e.oldMessages);continue}const i=Tt(e.messages,e.oldMessages);if(null!==i){const{oldKept:s,oldRemoved:r,newAdded:n}=i;xt(t.added,n),xt(t.removed,r);const o=n.concat(s);xt(t.messages,o),e.oldMessages=o}}(t.added.length||t.removed.length)&&(this.messages=t.messages,this.emitter.emit("did-update-messages",t))}onDidUpdateMessages(t){return this.emitter.on("did-update-messages",t)}deleteByBuffer(t){for(const e of this.messagesMap)e.buffer===t&&(e.deleted=!0);this.debouncedUpdate()}deleteByLinter(t){for(const e of this.messagesMap)e.linter===t&&(e.deleted=!0);this.debouncedUpdate()}dispose(){this.subscriptions.dispose()}}class te{constructor(){this.emitter=void 0,this.linters=void 0,this.lintOnChange=void 0,this.ignoreVCS=void 0,this.ignoreGlob=void 0,this.lintPreviewTabs=void 0,this.subscriptions=void 0,this.disabledProviders=void 0,this.activeNotifications=void 0,this.emitter=new t.Emitter,this.linters=new Set,this.subscriptions=new t.CompositeDisposable,this.activeNotifications=new Set,this.subscriptions.add(atom.config.observe("linter.lintOnChange",t=>{this.lintOnChange=t})),this.subscriptions.add(atom.config.observe("core.excludeVcsIgnoredPaths",t=>{this.ignoreVCS=t})),this.subscriptions.add(atom.config.observe("linter.ignoreGlob",t=>{this.ignoreGlob=t})),this.subscriptions.add(atom.config.observe("linter.lintPreviewTabs",t=>{this.lintPreviewTabs=t})),this.subscriptions.add(atom.config.observe("linter.disabledProviders",t=>{this.disabledProviders=t})),this.subscriptions.add(this.emitter)}hasLinter(t){return this.linters.has(t)}addLinter(t){(function(t){const e=[];return t&&"object"==typeof t?("string"!=typeof t.name&&e.push("Linter.name must be a string"),("string"!=typeof t.scope||"file"!==t.scope&&"project"!==t.scope)&&e.push("Linter.scope must be either 'file' or 'project'"),"boolean"!=typeof t.lintsOnChange&&e.push("Linter.lintsOnChange must be a boolean"),Array.isArray(t.grammarScopes)||e.push("Linter.grammarScopes must be an Array"),"function"!=typeof t.lint&&e.push("Linter.lint must be a function")):e.push("Linter must be an object"),!e.length||(Dt("Invalid Linter received",`These issues were encountered while registering a Linter named '${t&&t.name?t.name:"Unknown"}'`,e),!1)})(t)&&(t[jt]=!0,void 0===t.__$sb_linter_request_latest&&(t.__$sb_linter_request_latest=0),void 0===t[At]&&(t[At]=0),t.__$sb_linter_version=2,this.linters.add(t))}getProviders(){return Array.from(this.linters)}deleteLinter(t){this.linters.has(t)&&(t[jt]=!1,this.linters.delete(t))}async lint({onChange:t,editor:e}){const i=e.getPath();if(t&&!this.lintOnChange||$t(e.getPath(),this.ignoreGlob,this.ignoreVCS)||!this.lintPreviewTabs&&atom.workspace.getActivePane().getPendingItem()===e)return!1;const s=Ut(e),r=[];for(const n of this.linters){if(!Ot(n,t,s))continue;if(this.disabledProviders.includes(n.name))continue;const o=++n.__$sb_linter_request_latest,a="file"===n.scope?e.getBuffer():null,d="file"===n.scope?i:null;this.emitter.emit("did-begin-linting",{number:o,linter:n,filePath:d}),r.push(new Promise((function(t){t(n.lint(e))})).then(t=>{if(this.emitter.emit("did-finish-linting",{number:o,linter:n,filePath:d}),n[At]>=o||!n[jt]||a&&!a.isAlive())return;if(n[At]=o,a&&!a.isAlive())return;if(null===t)return;let e=!0;!atom.inDevMode()&&Array.isArray(t)||(e=Pt(n.name,t)),e&&(kt(n.name,t),this.emitter.emit("did-update-messages",{messages:t,linter:n,buffer:a}))},t=>{this.emitter.emit("did-finish-linting",{number:o,linter:n,filePath:d}),console.error("[Linter] Error running "+n.name,t);const e="[Linter] Error running "+n.name;if(Array.from(this.activeNotifications).some(t=>t.getOptions().detail===e))return;const i=atom.notifications.addError(e,{detail:"See Console for more info.",dismissable:!0,buttons:[{text:"Open Console",onDidClick:()=>{atom.openDevTools(),i.dismiss()}},{text:"Cancel",onDidClick:()=>{i.dismiss()}}]})}))}return await Promise.all(r),!0}onDidUpdateMessages(t){return this.emitter.on("did-update-messages",t)}onDidBeginLinting(t){return this.emitter.on("did-begin-linting",t)}onDidFinishLinting(t){return this.emitter.on("did-finish-linting",t)}dispose(){this.activeNotifications.forEach(t=>t.dismiss()),this.activeNotifications.clear(),this.linters.clear(),this.subscriptions.dispose()}}class ee{constructor(e){if(this.editor=void 0,this.emitter=void 0,this.subscriptions=void 0,!atom.workspace.isTextEditor(e))throw new Error("EditorLinter expects a valid TextEditor");const i=e.getBuffer(),s=Qt(()=>{this.emitter.emit("should-lint",!1)},50,{leading:!0});this.editor=e,this.emitter=new t.Emitter,this.subscriptions=new t.CompositeDisposable,this.subscriptions.add(this.editor.onDidDestroy(()=>this.dispose())),this.subscriptions.add(this.editor.onDidSave(s)),this.subscriptions.add(i.onDidReload(s)),this.subscriptions.add(function(e,i,s){let r=null;const n=e.observe(i,(function(t){r&&r.dispose(),r=s.call(this,t)}));return new t.Disposable((function(){n.dispose(),r&&r.dispose()}))}(atom.config,"linter.lintOnChangeInterval",t=>i.onDidChange(Qt(()=>{this.emitter.emit("should-lint",!0)},t))))}getEditor(){return this.editor}lint(t=!1){this.emitter.emit("should-lint",t)}onShouldLint(t){return this.emitter.on("should-lint",t)}onDidDestroy(t){return this.emitter.on("did-destroy",t)}dispose(){this.emitter.emit("did-destroy"),this.subscriptions.dispose(),this.emitter.dispose()}}class ie{constructor(){this.emitter=void 0,this.lintOnOpen=void 0,this.subscriptions=void 0,this.editorLinters=void 0,this.emitter=new t.Emitter,this.subscriptions=new t.CompositeDisposable,this.editorLinters=new Map,this.subscriptions.add(this.emitter),this.subscriptions.add(atom.config.observe("linter.lintOnOpen",t=>{this.lintOnOpen=t}))}activate(){this.subscriptions.add(atom.workspace.observeTextEditors(t=>{this.createFromTextEditor(t)}))}get(t){return this.editorLinters.get(t)}createFromTextEditor(t){let e=this.editorLinters.get(t);return e||(e=new ee(t),e.onDidDestroy(()=>{this.editorLinters.delete(t)}),this.editorLinters.set(t,e),this.emitter.emit("observe",e),this.lintOnOpen&&e.lint(),e)}hasSibling(t){const e=t.getEditor().getBuffer();return Array.from(this.editorLinters.keys()).some(t=>t.getBuffer()===e)}observe(t){return this.editorLinters.forEach(t),this.emitter.on("observe",t)}dispose(){for(const t of this.editorLinters.values())t.dispose();this.subscriptions.dispose()}}let se,re,ne,oe;function ae(t){let e;if(t&&"object"==typeof t&&"string"==typeof t.name)e=t.name;else{if("string"!=typeof t)throw new Error("Unknown object passed to formatItem()");e=t}return" - "+e}function de(t,e){return t.name.localeCompare(e.name)}class le{constructor(){this.emitter=void 0,this.subscriptions=void 0,this.emitter=new t.Emitter,this.subscriptions=new t.CompositeDisposable,this.subscriptions.add(this.emitter),this.subscriptions.add(atom.commands.add("atom-workspace",{"linter:enable-linter":()=>this.enableLinter(),"linter:disable-linter":()=>this.disableLinter()})),this.subscriptions.add(atom.commands.add("atom-text-editor:not([mini])",{"linter:lint":()=>this.lint(),"linter:debug":()=>this.debug(),"linter:toggle-active-editor":()=>this.toggleActiveEditor()}))}lint(){this.emitter.emit("should-lint")}debug(){this.emitter.emit("should-debug")}enableLinter(){this.emitter.emit("should-toggle-linter","enable")}disableLinter(){this.emitter.emit("should-toggle-linter","disable")}toggleActiveEditor(){this.emitter.emit("should-toggle-active-editor")}showDebug(t,e,i){se||(se=require("../package.json"));const s=atom.workspace.getActiveTextEditor(),r=Ut(s),n=t.slice().sort(de),o=e.slice().sort(de),a=i.slice().sort(de),d=o.map(ae).join("\n"),l=n.map(ae).join("\n"),h=n.filter(t=>Ot(t,!1,r)).map(ae).join("\n"),c=r.map(ae).join("\n"),u=a.map(ae).join("\n"),p=atom.config.get("linter.ignoreGlob"),g=atom.config.get("core.excludeVcsIgnoredPaths"),f=atom.config.get("linter.disabledProviders").map(ae).join("\n"),m=$t(s.getPath(),p,g);atom.notifications.addInfo("Linter Debug Info",{detail:["Platform: "+process.platform,"Atom Version: "+atom.getVersion(),"Linter Version: "+se.version,"Opened file is ignored: "+(m?"Yes":"No"),"Matching Linter Providers: \n"+h,"Disabled Linter Providers: \n"+f,"Standard Linter Providers: \n"+l,"Indie Linter Providers: \n"+d,"UI Providers: \n"+u,"Ignore Glob: "+p,"VCS Ignored Paths are excluded: "+g,"Current File Scopes: \n"+c].join("\n"),dismissable:!0})}onShouldLint(t){return this.emitter.on("should-lint",t)}onShouldDebug(t){return this.emitter.on("should-debug",t)}onShouldToggleActiveEditor(t){return this.emitter.on("should-toggle-active-editor",t)}onShouldToggleLinter(t){return this.emitter.on("should-toggle-linter",t)}dispose(){this.subscriptions.dispose()}}class he{constructor(e,i){this.action=void 0,this.emitter=void 0,this.providers=void 0,this.subscriptions=void 0,this.disabledProviders=void 0,this.action=e,this.emitter=new t.Emitter,this.providers=i,this.subscriptions=new t.CompositeDisposable,this.subscriptions.add(this.emitter),this.subscriptions.add(atom.config.observe("linter.disabledProviders",t=>{this.disabledProviders=t}))}async getItems(){return"disable"===this.action?this.providers.filter(t=>!this.disabledProviders.includes(t)):this.disabledProviders}async process(t){if("disable"===this.action)this.disabledProviders.push(t),this.emitter.emit("did-disable",t);else{const e=this.disabledProviders.indexOf(t);-1!==e&&this.disabledProviders.splice(e,1)}atom.config.set("linter.disabledProviders",this.disabledProviders)}async show(){re||(re=require("atom-select-list"));const e=new re({items:await this.getItems(),emptyMessage:"No matches found",elementForItem:t=>{const e=document.createElement("li");return e.textContent=t,e},didConfirmSelection:t=>{this.process(t).catch(t=>console.error("[Linter] Unable to process toggle:",t)).then(()=>this.dispose())},didCancelSelection:()=>{this.dispose()},didConfirmEmptySelection:()=>{this.dispose()}}),i=atom.workspace.addModalPanel({item:e});e.focus(),this.subscriptions.add(new t.Disposable((function(){i.destroy()})))}onDidDispose(t){return this.emitter.on("did-dispose",t)}onDidDisable(t){return this.emitter.on("did-disable",t)}dispose(){this.emitter.emit("did-dispose"),this.subscriptions.dispose()}}class ce{constructor(){this.commands=void 0,this.registryUI=void 0,this.registryIndie=void 0,this.registryEditors=void 0,this.registryLinters=void 0,this.registryMessages=void 0,this.subscriptions=void 0,this.idleCallbacks=void 0,this.idleCallbacks=new Set,this.subscriptions=new t.CompositeDisposable,this.commands=new le,this.subscriptions.add(this.commands),this.commands.onShouldLint(()=>{this.registryEditorsInit();const t=this.registryEditors.get(atom.workspace.getActiveTextEditor());t&&t.lint()}),this.commands.onShouldToggleActiveEditor(()=>{const t=atom.workspace.getActiveTextEditor();this.registryEditorsInit();const e=this.registryEditors.get(t);e?e.dispose():t&&this.registryEditors.createFromTextEditor(t)}),this.commands.onShouldDebug(async()=>{this.registryUIInit(),this.registryIndieInit(),this.registryLintersInit(),this.commands.showDebug(this.registryLinters.getProviders(),this.registryIndie.getProviders(),this.registryUI.getProviders())}),this.commands.onShouldToggleLinter(t=>{this.registryLintersInit();const e=new he(t,Et(this.registryLinters.getProviders().map(t=>t.name)));e.onDidDispose(()=>{this.subscriptions.remove(e)}),e.onDidDisable(t=>{const e=this.registryLinters.getProviders().find(e=>e.name===t);e&&(this.registryMessagesInit(),this.registryMessages.deleteByLinter(e))}),e.show(),this.subscriptions.add(e)});const e=window.requestIdleCallback(function(){this.idleCallbacks.delete(e),this.subscriptions.add(atom.project.onDidChangePaths(()=>{this.commands.lint()}))}.bind(this));this.idleCallbacks.add(e);const i=window.requestIdleCallback(function(){this.idleCallbacks.delete(i),this.registryEditorsInit()}.bind(this));this.idleCallbacks.add(i)}dispose(){this.idleCallbacks.forEach(t=>window.cancelIdleCallback(t)),this.idleCallbacks.clear(),this.subscriptions.dispose()}registryEditorsInit(){this.registryEditors||(this.registryEditors=new ie,this.subscriptions.add(this.registryEditors),this.registryEditors.observe(t=>{t.onShouldLint(e=>{this.registryLintersInit(),this.registryLinters.lint({onChange:e,editor:t.getEditor()})}),t.onDidDestroy(()=>{this.registryMessagesInit(),this.registryEditors.hasSibling(t)||this.registryMessages.deleteByBuffer(t.getEditor().getBuffer())})}),this.registryEditors.activate())}registryLintersInit(){this.registryLinters||(this.registryLinters=new te,this.subscriptions.add(this.registryLinters),this.registryLinters.onDidUpdateMessages(({linter:t,messages:e,buffer:i})=>{this.registryMessagesInit(),this.registryMessages.set({linter:t,messages:e,buffer:i})}),this.registryLinters.onDidBeginLinting(({linter:t,filePath:e})=>{this.registryUIInit(),this.registryUI.didBeginLinting(t,e)}),this.registryLinters.onDidFinishLinting(({linter:t,filePath:e})=>{this.registryUIInit(),this.registryUI.didFinishLinting(t,e)}))}registryIndieInit(){this.registryIndie||(this.registryIndie=new Ft,this.subscriptions.add(this.registryIndie),this.registryIndie.observe(t=>{t.onDidDestroy(()=>{this.registryMessagesInit(),this.registryMessages.deleteByLinter(t)})}),this.registryIndie.onDidUpdate(({linter:t,messages:e})=>{this.registryMessagesInit(),this.registryMessages.set({linter:t,messages:e,buffer:null})}))}registryMessagesInit(){this.registryMessages||(this.registryMessages=new Zt,this.subscriptions.add(this.registryMessages),this.registryMessages.onDidUpdateMessages(t=>{this.registryUIInit(),this.registryUI.render(t)}))}registryUIInit(){this.registryUI||(this.registryUI=new Ct,this.subscriptions.add(this.registryUI))}addUI(t){this.registryUIInit(),this.registryUI.add(t),this.registryMessagesInit();const{messages:e}=this.registryMessages;e.length&&t.render({added:e,messages:e,removed:[]})}deleteUI(t){this.registryUIInit(),this.registryUI.delete(t)}addLinter(t){this.registryLintersInit(),this.registryLinters.addLinter(t)}deleteLinter(t){this.registryLintersInit(),this.registryLinters.deleteLinter(t),this.registryMessagesInit(),this.registryMessages.deleteByLinter(t)}addIndie(t){return this.registryIndieInit(),this.registryIndie.register(t,2)}}exports.activate=function(){oe=new t.CompositeDisposable,ne=new ce,oe.add(ne),oe.add(atom.packages.onDidActivateInitialPackages((function(){atom.inSpecMode()||require("atom-package-deps").install("linter",!0)})))},exports.consumeLinter=function(e){const i=[].concat(e);for(const t of i)ne.addLinter(t);return new t.Disposable(()=>{for(const t of i)ne.deleteLinter(t)})},exports.consumeUI=function(e){const i=[].concat(e);for(const t of i)ne.addUI(t);return new t.Disposable(()=>{for(const t of i)ne.deleteUI(t)})},exports.deactivate=function(){oe.dispose()},exports.provideIndie=function(){return t=>ne.addIndie(t)}; +//# sourceMappingURL=index.js.map diff --git a/dist/index.js.map b/dist/index.js.map new file mode 100644 index 00000000..2dfaeb6b --- /dev/null +++ b/dist/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../node_modules/lodash/_freeGlobal.js","../node_modules/lodash/_root.js","../node_modules/lodash/_Symbol.js","../node_modules/lodash/_getRawTag.js","../node_modules/lodash/_objectToString.js","../node_modules/lodash/_baseGetTag.js","../node_modules/lodash/isObject.js","../node_modules/lodash/isFunction.js","../node_modules/lodash/_isMasked.js","../node_modules/lodash/_coreJsData.js","../node_modules/lodash/_toSource.js","../node_modules/lodash/_baseIsNative.js","../node_modules/lodash/_getValue.js","../node_modules/lodash/_getNative.js","../node_modules/lodash/_nativeCreate.js","../node_modules/lodash/_hashClear.js","../node_modules/lodash/_hashDelete.js","../node_modules/lodash/_hashGet.js","../node_modules/lodash/_hashHas.js","../node_modules/lodash/_hashSet.js","../node_modules/lodash/_Hash.js","../node_modules/lodash/_listCacheClear.js","../node_modules/lodash/eq.js","../node_modules/lodash/_assocIndexOf.js","../node_modules/lodash/_listCacheDelete.js","../node_modules/lodash/_listCacheGet.js","../node_modules/lodash/_listCacheHas.js","../node_modules/lodash/_listCacheSet.js","../node_modules/lodash/_ListCache.js","../node_modules/lodash/_Map.js","../node_modules/lodash/_mapCacheClear.js","../node_modules/lodash/_isKeyable.js","../node_modules/lodash/_getMapData.js","../node_modules/lodash/_mapCacheDelete.js","../node_modules/lodash/_mapCacheGet.js","../node_modules/lodash/_mapCacheHas.js","../node_modules/lodash/_mapCacheSet.js","../node_modules/lodash/_MapCache.js","../node_modules/lodash/_setCacheAdd.js","../node_modules/lodash/_setCacheHas.js","../node_modules/lodash/_SetCache.js","../node_modules/lodash/_baseFindIndex.js","../node_modules/lodash/_baseIsNaN.js","../node_modules/lodash/_strictIndexOf.js","../node_modules/lodash/_baseIndexOf.js","../node_modules/lodash/_arrayIncludes.js","../node_modules/lodash/_arrayIncludesWith.js","../node_modules/lodash/_cacheHas.js","../node_modules/lodash/_Set.js","../node_modules/lodash/noop.js","../node_modules/lodash/_setToArray.js","../node_modules/lodash/_createSet.js","../node_modules/lodash/_baseUniq.js","../node_modules/lodash/uniq.js","../lib/validate/helpers.js","../lib/validate/index.js","../lib/ui-registry.js","../lib/helpers.js","../lib/indie-delegate.js","../lib/indie-registry.js","../node_modules/lodash/now.js","../node_modules/lodash/isObjectLike.js","../node_modules/lodash/isSymbol.js","../node_modules/lodash/toNumber.js","../node_modules/lodash/debounce.js","../lib/message-registry.js","../lib/linter-registry.js","../lib/editor-linter.js","../lib/editor-registry.js","../lib/commands.js","../lib/toggle-view.js","../lib/index.js","../lib/main.js"],"sourcesContent":["/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nmodule.exports = freeGlobal;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nmodule.exports = root;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nmodule.exports = Symbol;\n","var Symbol = require('./_Symbol');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\nmodule.exports = getRawTag;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nmodule.exports = objectToString;\n","var Symbol = require('./_Symbol'),\n getRawTag = require('./_getRawTag'),\n objectToString = require('./_objectToString');\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\nmodule.exports = baseGetTag;\n","/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\nmodule.exports = isObject;\n","var baseGetTag = require('./_baseGetTag'),\n isObject = require('./isObject');\n\n/** `Object#toString` result references. */\nvar asyncTag = '[object AsyncFunction]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n proxyTag = '[object Proxy]';\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n if (!isObject(value)) {\n return false;\n }\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n var tag = baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n}\n\nmodule.exports = isFunction;\n","var coreJsData = require('./_coreJsData');\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\n\nmodule.exports = isMasked;\n","var root = require('./_root');\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\nmodule.exports = coreJsData;\n","/** Used for built-in method references. */\nvar funcProto = Function.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\nmodule.exports = toSource;\n","var isFunction = require('./isFunction'),\n isMasked = require('./_isMasked'),\n isObject = require('./isObject'),\n toSource = require('./_toSource');\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\nmodule.exports = baseIsNative;\n","/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\nmodule.exports = getValue;\n","var baseIsNative = require('./_baseIsNative'),\n getValue = require('./_getValue');\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\nmodule.exports = getNative;\n","var getNative = require('./_getNative');\n\n/* Built-in method references that are verified to be native. */\nvar nativeCreate = getNative(Object, 'create');\n\nmodule.exports = nativeCreate;\n","var nativeCreate = require('./_nativeCreate');\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n}\n\nmodule.exports = hashClear;\n","/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n var result = this.has(key) && delete this.__data__[key];\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = hashDelete;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\nmodule.exports = hashGet;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n}\n\nmodule.exports = hashHas;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n var data = this.__data__;\n this.size += this.has(key) ? 0 : 1;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\nmodule.exports = hashSet;\n","var hashClear = require('./_hashClear'),\n hashDelete = require('./_hashDelete'),\n hashGet = require('./_hashGet'),\n hashHas = require('./_hashHas'),\n hashSet = require('./_hashSet');\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\nmodule.exports = Hash;\n","/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n}\n\nmodule.exports = listCacheClear;\n","/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\nmodule.exports = eq;\n","var eq = require('./eq');\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\nmodule.exports = assocIndexOf;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype;\n\n/** Built-in value references. */\nvar splice = arrayProto.splice;\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n --this.size;\n return true;\n}\n\nmodule.exports = listCacheDelete;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\nmodule.exports = listCacheGet;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n\nmodule.exports = listCacheHas;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n ++this.size;\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\nmodule.exports = listCacheSet;\n","var listCacheClear = require('./_listCacheClear'),\n listCacheDelete = require('./_listCacheDelete'),\n listCacheGet = require('./_listCacheGet'),\n listCacheHas = require('./_listCacheHas'),\n listCacheSet = require('./_listCacheSet');\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\nmodule.exports = ListCache;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Map = getNative(root, 'Map');\n\nmodule.exports = Map;\n","var Hash = require('./_Hash'),\n ListCache = require('./_ListCache'),\n Map = require('./_Map');\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}\n\nmodule.exports = mapCacheClear;\n","/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n}\n\nmodule.exports = isKeyable;\n","var isKeyable = require('./_isKeyable');\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\nmodule.exports = getMapData;\n","var getMapData = require('./_getMapData');\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n var result = getMapData(this, key)['delete'](key);\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = mapCacheDelete;\n","var getMapData = require('./_getMapData');\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n return getMapData(this, key).get(key);\n}\n\nmodule.exports = mapCacheGet;\n","var getMapData = require('./_getMapData');\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n return getMapData(this, key).has(key);\n}\n\nmodule.exports = mapCacheHas;\n","var getMapData = require('./_getMapData');\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n var data = getMapData(this, key),\n size = data.size;\n\n data.set(key, value);\n this.size += data.size == size ? 0 : 1;\n return this;\n}\n\nmodule.exports = mapCacheSet;\n","var mapCacheClear = require('./_mapCacheClear'),\n mapCacheDelete = require('./_mapCacheDelete'),\n mapCacheGet = require('./_mapCacheGet'),\n mapCacheHas = require('./_mapCacheHas'),\n mapCacheSet = require('./_mapCacheSet');\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\nmodule.exports = MapCache;\n","/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Adds `value` to the array cache.\n *\n * @private\n * @name add\n * @memberOf SetCache\n * @alias push\n * @param {*} value The value to cache.\n * @returns {Object} Returns the cache instance.\n */\nfunction setCacheAdd(value) {\n this.__data__.set(value, HASH_UNDEFINED);\n return this;\n}\n\nmodule.exports = setCacheAdd;\n","/**\n * Checks if `value` is in the array cache.\n *\n * @private\n * @name has\n * @memberOf SetCache\n * @param {*} value The value to search for.\n * @returns {number} Returns `true` if `value` is found, else `false`.\n */\nfunction setCacheHas(value) {\n return this.__data__.has(value);\n}\n\nmodule.exports = setCacheHas;\n","var MapCache = require('./_MapCache'),\n setCacheAdd = require('./_setCacheAdd'),\n setCacheHas = require('./_setCacheHas');\n\n/**\n *\n * Creates an array cache object to store unique values.\n *\n * @private\n * @constructor\n * @param {Array} [values] The values to cache.\n */\nfunction SetCache(values) {\n var index = -1,\n length = values == null ? 0 : values.length;\n\n this.__data__ = new MapCache;\n while (++index < length) {\n this.add(values[index]);\n }\n}\n\n// Add methods to `SetCache`.\nSetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\nSetCache.prototype.has = setCacheHas;\n\nmodule.exports = SetCache;\n","/**\n * The base implementation of `_.findIndex` and `_.findLastIndex` without\n * support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Function} predicate The function invoked per iteration.\n * @param {number} fromIndex The index to search from.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction baseFindIndex(array, predicate, fromIndex, fromRight) {\n var length = array.length,\n index = fromIndex + (fromRight ? 1 : -1);\n\n while ((fromRight ? index-- : ++index < length)) {\n if (predicate(array[index], index, array)) {\n return index;\n }\n }\n return -1;\n}\n\nmodule.exports = baseFindIndex;\n","/**\n * The base implementation of `_.isNaN` without support for number objects.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.\n */\nfunction baseIsNaN(value) {\n return value !== value;\n}\n\nmodule.exports = baseIsNaN;\n","/**\n * A specialized version of `_.indexOf` which performs strict equality\n * comparisons of values, i.e. `===`.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction strictIndexOf(array, value, fromIndex) {\n var index = fromIndex - 1,\n length = array.length;\n\n while (++index < length) {\n if (array[index] === value) {\n return index;\n }\n }\n return -1;\n}\n\nmodule.exports = strictIndexOf;\n","var baseFindIndex = require('./_baseFindIndex'),\n baseIsNaN = require('./_baseIsNaN'),\n strictIndexOf = require('./_strictIndexOf');\n\n/**\n * The base implementation of `_.indexOf` without `fromIndex` bounds checks.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction baseIndexOf(array, value, fromIndex) {\n return value === value\n ? strictIndexOf(array, value, fromIndex)\n : baseFindIndex(array, baseIsNaN, fromIndex);\n}\n\nmodule.exports = baseIndexOf;\n","var baseIndexOf = require('./_baseIndexOf');\n\n/**\n * A specialized version of `_.includes` for arrays without support for\n * specifying an index to search from.\n *\n * @private\n * @param {Array} [array] The array to inspect.\n * @param {*} target The value to search for.\n * @returns {boolean} Returns `true` if `target` is found, else `false`.\n */\nfunction arrayIncludes(array, value) {\n var length = array == null ? 0 : array.length;\n return !!length && baseIndexOf(array, value, 0) > -1;\n}\n\nmodule.exports = arrayIncludes;\n","/**\n * This function is like `arrayIncludes` except that it accepts a comparator.\n *\n * @private\n * @param {Array} [array] The array to inspect.\n * @param {*} target The value to search for.\n * @param {Function} comparator The comparator invoked per element.\n * @returns {boolean} Returns `true` if `target` is found, else `false`.\n */\nfunction arrayIncludesWith(array, value, comparator) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (comparator(value, array[index])) {\n return true;\n }\n }\n return false;\n}\n\nmodule.exports = arrayIncludesWith;\n","/**\n * Checks if a `cache` value for `key` exists.\n *\n * @private\n * @param {Object} cache The cache to query.\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction cacheHas(cache, key) {\n return cache.has(key);\n}\n\nmodule.exports = cacheHas;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Set = getNative(root, 'Set');\n\nmodule.exports = Set;\n","/**\n * This method returns `undefined`.\n *\n * @static\n * @memberOf _\n * @since 2.3.0\n * @category Util\n * @example\n *\n * _.times(2, _.noop);\n * // => [undefined, undefined]\n */\nfunction noop() {\n // No operation performed.\n}\n\nmodule.exports = noop;\n","/**\n * Converts `set` to an array of its values.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the values.\n */\nfunction setToArray(set) {\n var index = -1,\n result = Array(set.size);\n\n set.forEach(function(value) {\n result[++index] = value;\n });\n return result;\n}\n\nmodule.exports = setToArray;\n","var Set = require('./_Set'),\n noop = require('./noop'),\n setToArray = require('./_setToArray');\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/**\n * Creates a set object of `values`.\n *\n * @private\n * @param {Array} values The values to add to the set.\n * @returns {Object} Returns the new set.\n */\nvar createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) {\n return new Set(values);\n};\n\nmodule.exports = createSet;\n","var SetCache = require('./_SetCache'),\n arrayIncludes = require('./_arrayIncludes'),\n arrayIncludesWith = require('./_arrayIncludesWith'),\n cacheHas = require('./_cacheHas'),\n createSet = require('./_createSet'),\n setToArray = require('./_setToArray');\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/**\n * The base implementation of `_.uniqBy` without support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new duplicate free array.\n */\nfunction baseUniq(array, iteratee, comparator) {\n var index = -1,\n includes = arrayIncludes,\n length = array.length,\n isCommon = true,\n result = [],\n seen = result;\n\n if (comparator) {\n isCommon = false;\n includes = arrayIncludesWith;\n }\n else if (length >= LARGE_ARRAY_SIZE) {\n var set = iteratee ? null : createSet(array);\n if (set) {\n return setToArray(set);\n }\n isCommon = false;\n includes = cacheHas;\n seen = new SetCache;\n }\n else {\n seen = iteratee ? [] : result;\n }\n outer:\n while (++index < length) {\n var value = array[index],\n computed = iteratee ? iteratee(value) : value;\n\n value = (comparator || value !== 0) ? value : 0;\n if (isCommon && computed === computed) {\n var seenIndex = seen.length;\n while (seenIndex--) {\n if (seen[seenIndex] === computed) {\n continue outer;\n }\n }\n if (iteratee) {\n seen.push(computed);\n }\n result.push(value);\n }\n else if (!includes(seen, computed, comparator)) {\n if (seen !== result) {\n seen.push(computed);\n }\n result.push(value);\n }\n }\n return result;\n}\n\nmodule.exports = baseUniq;\n","var baseUniq = require('./_baseUniq');\n\n/**\n * Creates a duplicate-free version of an array, using\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons, in which only the first occurrence of each element\n * is kept. The order of result values is determined by the order they occur\n * in the array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @returns {Array} Returns the new duplicate free array.\n * @example\n *\n * _.uniq([2, 1, 2]);\n * // => [2, 1]\n */\nfunction uniq(array) {\n return (array && array.length) ? baseUniq(array) : [];\n}\n\nmodule.exports = uniq;\n","/* @flow */\n\nexport function showError(title: string, description: string, points: Array) {\n const renderedPoints = points.map(item => ` • ${item}`)\n atom.notifications.addWarning(`[Linter] ${title}`, {\n dismissable: true,\n detail: `${description}\\n${renderedPoints.join('\\n')}`,\n })\n}\n","/* @flow */\n\nimport { Range, Point } from 'atom'\nimport { showError } from './helpers'\nimport type { UI, Linter, Message, Indie } from '../types'\n\nconst VALID_SEVERITY = new Set(['error', 'warning', 'info'])\n\nfunction validateUI(ui: UI): boolean {\n const messages = []\n\n if (ui && typeof ui === 'object') {\n if (typeof ui.name !== 'string') {\n messages.push('UI.name must be a string')\n }\n if (typeof ui.didBeginLinting !== 'function') {\n messages.push('UI.didBeginLinting must be a function')\n }\n if (typeof ui.didFinishLinting !== 'function') {\n messages.push('UI.didFinishLinting must be a function')\n }\n if (typeof ui.render !== 'function') {\n messages.push('UI.render must be a function')\n }\n if (typeof ui.dispose !== 'function') {\n messages.push('UI.dispose must be a function')\n }\n } else {\n messages.push('UI must be an object')\n }\n\n if (messages.length) {\n showError(\n 'Invalid UI received',\n `These issues were encountered while registering the UI named '${ui && ui.name ? ui.name : 'Unknown'}'`,\n messages,\n )\n return false\n }\n\n return true\n}\n\nfunction validateLinter(linter: Linter): boolean {\n const messages = []\n\n if (linter && typeof linter === 'object') {\n if (typeof linter.name !== 'string') {\n messages.push('Linter.name must be a string')\n }\n if (typeof linter.scope !== 'string' || (linter.scope !== 'file' && linter.scope !== 'project')) {\n messages.push(\"Linter.scope must be either 'file' or 'project'\")\n }\n if (typeof linter.lintsOnChange !== 'boolean') {\n messages.push('Linter.lintsOnChange must be a boolean')\n }\n if (!Array.isArray(linter.grammarScopes)) {\n messages.push('Linter.grammarScopes must be an Array')\n }\n if (typeof linter.lint !== 'function') {\n messages.push('Linter.lint must be a function')\n }\n } else {\n messages.push('Linter must be an object')\n }\n\n if (messages.length) {\n showError(\n 'Invalid Linter received',\n `These issues were encountered while registering a Linter named '${linter && linter.name ? linter.name : 'Unknown'}'`,\n messages,\n )\n return false\n }\n\n return true\n}\n\nfunction validateIndie(indie: Indie): boolean {\n const messages = []\n\n if (indie && typeof indie === 'object') {\n if (typeof indie.name !== 'string') {\n messages.push('Indie.name must be a string')\n }\n } else {\n messages.push('Indie must be an object')\n }\n\n if (messages.length) {\n showError(\n 'Invalid Indie received',\n `These issues were encountered while registering an Indie Linter named '${\n indie && indie.name ? indie.name : 'Unknown'\n }'`,\n messages,\n )\n return false\n }\n\n return true\n}\n\nfunction validateMessages(linterName: string, entries: Array): boolean {\n const messages = []\n\n if (Array.isArray(entries)) {\n let invalidURL = false\n let invalidIcon = false\n let invalidExcerpt = false\n let invalidLocation = false\n let invalidSeverity = false\n let invalidSolution = false\n let invalidReference = false\n let invalidDescription = false\n let invalidLinterName = false\n\n for (let i = 0, { length } = entries; i < length; ++i) {\n const message = entries[i]\n const { reference } = message\n if (!invalidIcon && message.icon && typeof message.icon !== 'string') {\n invalidIcon = true\n messages.push('Message.icon must be a string')\n }\n if (\n !invalidLocation &&\n (!message.location ||\n typeof message.location !== 'object' ||\n typeof message.location.file !== 'string' ||\n typeof message.location.position !== 'object' ||\n !message.location.position)\n ) {\n invalidLocation = true\n messages.push('Message.location must be valid')\n } else if (!invalidLocation) {\n const range = Range.fromObject(message.location.position)\n if (\n Number.isNaN(range.start.row) ||\n Number.isNaN(range.start.column) ||\n Number.isNaN(range.end.row) ||\n Number.isNaN(range.end.column)\n ) {\n invalidLocation = true\n messages.push('Message.location.position should not contain NaN coordinates')\n }\n }\n if (!invalidSolution && message.solutions && !Array.isArray(message.solutions)) {\n invalidSolution = true\n messages.push('Message.solutions must be valid')\n }\n if (\n !invalidReference &&\n reference &&\n (typeof reference !== 'object' ||\n typeof reference.file !== 'string' ||\n typeof reference.position !== 'object' ||\n !reference.position)\n ) {\n invalidReference = true\n messages.push('Message.reference must be valid')\n } else if (!invalidReference && reference) {\n const position = Point.fromObject(reference.position)\n if (Number.isNaN(position.row) || Number.isNaN(position.column)) {\n invalidReference = true\n messages.push('Message.reference.position should not contain NaN coordinates')\n }\n }\n if (!invalidExcerpt && typeof message.excerpt !== 'string') {\n invalidExcerpt = true\n messages.push('Message.excerpt must be a string')\n }\n if (!invalidSeverity && !VALID_SEVERITY.has(message.severity)) {\n invalidSeverity = true\n messages.push(\"Message.severity must be 'error', 'warning' or 'info'\")\n }\n if (!invalidURL && message.url && typeof message.url !== 'string') {\n invalidURL = true\n messages.push('Message.url must be a string')\n }\n if (\n !invalidDescription &&\n message.description &&\n typeof message.description !== 'function' &&\n typeof message.description !== 'string'\n ) {\n invalidDescription = true\n messages.push('Message.description must be a function or string')\n }\n if (!invalidLinterName && message.linterName && typeof message.linterName !== 'string') {\n invalidLinterName = true\n messages.push('Message.linterName must be a string')\n }\n }\n } else {\n messages.push('Linter Result must be an Array')\n }\n\n if (messages.length) {\n showError(\n 'Invalid Linter Result received',\n `These issues were encountered while processing messages from a linter named '${linterName}'`,\n messages,\n )\n return false\n }\n\n return true\n}\n\nexport { validateUI as ui, validateLinter as linter, validateIndie as indie, validateMessages as messages }\n","/* @flow */\n\nimport { CompositeDisposable } from 'atom'\nimport { ui as validateUI } from './validate'\nimport type { Linter, UI, MessagesPatch } from './types'\n\nclass UIRegistry {\n providers: Set\n subscriptions: CompositeDisposable\n\n constructor() {\n this.providers = new Set()\n this.subscriptions = new CompositeDisposable()\n }\n add(ui: UI) {\n if (!this.providers.has(ui) && validateUI(ui)) {\n this.subscriptions.add(ui)\n this.providers.add(ui)\n }\n }\n delete(provider: UI) {\n if (this.providers.has(provider)) {\n provider.dispose()\n this.providers.delete(provider)\n }\n }\n getProviders(): Array {\n return Array.from(this.providers)\n }\n render(messages: MessagesPatch) {\n this.providers.forEach(function(provider) {\n provider.render(messages)\n })\n }\n didBeginLinting(linter: Linter, filePath: ?string = null) {\n this.providers.forEach(function(provider) {\n provider.didBeginLinting(linter, filePath)\n })\n }\n didFinishLinting(linter: Linter, filePath: ?string = null) {\n this.providers.forEach(function(provider) {\n provider.didFinishLinting(linter, filePath)\n })\n }\n dispose() {\n this.providers.clear()\n this.subscriptions.dispose()\n }\n}\n\nexport default UIRegistry\n","/* @flow */\n\nimport arrayUnique from 'lodash/uniq'\nimport { Disposable, Range, Point } from 'atom'\nimport type { TextEditor } from 'atom'\nimport type { Linter, Message } from './types'\n\nexport const $version = '__$sb_linter_version'\nexport const $activated = '__$sb_linter_activated'\nexport const $requestLatest = '__$sb_linter_request_latest'\nexport const $requestLastReceived = '__$sb_linter_request_last_received'\n\nexport function shouldTriggerLinter(linter: Linter, wasTriggeredOnChange: boolean, scopes: Array): boolean {\n if (wasTriggeredOnChange && !linter.lintsOnChange) {\n return false\n }\n return scopes.some(function(scope) {\n return linter.grammarScopes.includes(scope)\n })\n}\n\nexport function getEditorCursorScopes(textEditor: TextEditor): Array {\n return arrayUnique(\n textEditor.getCursors().reduce((scopes, cursor) => scopes.concat(cursor.getScopeDescriptor().getScopesArray()), ['*']),\n )\n}\n\nlet minimatch\nexport function isPathIgnored(filePath: ?string, ignoredGlob: string, ignoredVCS: boolean): boolean {\n if (!filePath) {\n return true\n }\n\n if (ignoredVCS) {\n let repository = null\n const projectPaths = atom.project.getPaths()\n for (let i = 0, { length } = projectPaths; i < length; ++i) {\n const projectPath = projectPaths[i]\n if (filePath.indexOf(projectPath) === 0) {\n repository = atom.project.getRepositories()[i]\n break\n }\n }\n if (repository && repository.isPathIgnored(filePath)) {\n return true\n }\n }\n const normalizedFilePath = process.platform === 'win32' ? filePath.replace(/\\\\/g, '/') : filePath\n if (!minimatch) {\n minimatch = require('minimatch')\n }\n return minimatch(normalizedFilePath, ignoredGlob)\n}\n\nexport function subscriptiveObserve(object: Object, eventName: string, callback: Function): Disposable {\n let subscription = null\n const eventSubscription = object.observe(eventName, function(props) {\n if (subscription) {\n subscription.dispose()\n }\n subscription = callback.call(this, props)\n })\n\n return new Disposable(function() {\n eventSubscription.dispose()\n if (subscription) {\n subscription.dispose()\n }\n })\n}\n\nexport function messageKey(message: Message) {\n const { reference } = message\n return [\n `$LINTER:${message.linterName}`,\n `$LOCATION:${message.location.file}$${message.location.position.start.row}$${message.location.position.start.column}$${\n message.location.position.end.row\n }$${message.location.position.end.column}`,\n reference\n ? `$REFERENCE:${reference.file}$${reference.position ? `${reference.position.row}$${reference.position.column}` : ''}`\n : '$REFERENCE:null',\n `$EXCERPT:${message.excerpt}`,\n `$SEVERITY:${message.severity}`,\n message.icon ? `$ICON:${message.icon}` : '$ICON:null',\n message.url ? `$URL:${message.url}` : '$URL:null',\n typeof message.description === 'string' ? `$DESCRIPTION:${message.description}` : '$DESCRIPTION:null',\n ].join('')\n}\n\nexport function normalizeMessages(linterName: string, messages: Array) {\n for (let i = 0, { length } = messages; i < length; ++i) {\n const message = messages[i]\n const { reference } = message\n if (Array.isArray(message.location.position)) {\n message.location.position = Range.fromObject(message.location.position)\n }\n if (reference && Array.isArray(reference.position)) {\n reference.position = Point.fromObject(reference.position)\n }\n if (message.solutions && message.solutions.length) {\n for (let j = 0, _length = message.solutions.length, solution; j < _length; j++) {\n solution = message.solutions[j]\n if (Array.isArray(solution.position)) {\n solution.position = Range.fromObject(solution.position)\n }\n }\n }\n message.version = 2\n if (!message.linterName) {\n message.linterName = linterName\n }\n message.key = messageKey(message)\n }\n}\n\n// update the key of the given messages\nexport function updateKeys(messages: Array) {\n for (let i = 0, { length } = messages; i < length; ++i) {\n messages[i].key = messageKey(messages[i])\n }\n}\n\n// create a map from keys to messages\nexport function createKeyMessageMap(messages: Array): Map {\n const keyMessageMap = new Map()\n for (let i = 0, { length } = messages; i < length; ++i) {\n const message = messages[i]\n keyMessageMap.set(message.key, message)\n }\n return keyMessageMap\n}\n\ninterface FlaggedMessages {\n oldKept: Array;\n oldRemoved: Array;\n newAdded: Array;\n}\n\n// This fast function returns the new messages and old messages by comparing their key against the cache.\n// This prevents re-rendering the already rendered messages\nexport function flagMessages(inputs: Array, oldMessages: Array): FlaggedMessages | null {\n // inputs check\n if (inputs === undefined || oldMessages === undefined) {\n return null\n }\n\n // All the messages of the linter are new, no need to diff\n // tag the messages for adding and save them to linter's cache\n if (!oldMessages.length) {\n // NOTE: No need to add .key here because normalizeMessages already does that\n return { oldKept: [], oldRemoved: [], newAdded: inputs }\n }\n\n // The linter has no messages anymore\n // tag all of its messages from cache for removal and empty the cache\n if (!inputs.length) {\n return { oldKept: [], oldRemoved: oldMessages, newAdded: [] }\n }\n\n // In all the other situations:\n // perform diff checking between the linter's new messages and its cache\n\n // create a map from keys to oldMessages\n const cache = createKeyMessageMap(oldMessages)\n\n // Find old kept and new added\n const newAdded: Set = new Set()\n const oldKept: Map = new Map()\n for (let iInput = 0, len = inputs.length; iInput < len; iInput++) {\n const input = inputs[iInput]\n if (cache.has(input.key)) {\n oldKept.set(input.key, input)\n } else {\n newAdded.add(input)\n }\n }\n\n // Find old removed\n const cacheKeys = Array.from(cache.keys())\n const oldKeptKeys = Array.from(oldKept.keys())\n\n const oldRemovedKeys = cacheKeys.filter(x => !oldKeptKeys.includes(x))\n\n const oldRemoved = new Set()\n for (let iRemoved = 0, RemovedKeysLen = oldRemovedKeys.length; iRemoved < RemovedKeysLen; iRemoved++) {\n oldRemoved.add(cache.get(oldRemovedKeys[iRemoved]))\n }\n\n return {\n oldKept: Array.from(oldKept.values()),\n oldRemoved: oldRemoved ? Array.from(oldRemoved) : [],\n newAdded: Array.from(newAdded),\n }\n}\n\n// fast mergeArray function\n// https://uilicious.com/blog/javascript-array-push-is-945x-faster-than-array-concat/\nexport function mergeArray(arr1: Array, arr2: Array) {\n if (!arr2.length) {\n return\n }\n Array.prototype.push.apply(arr1, arr2)\n}\n","/* @flow */\n\nimport { Emitter, CompositeDisposable } from 'atom'\nimport type { Disposable } from 'atom'\n\nimport * as Validate from './validate'\nimport { normalizeMessages } from './helpers'\nimport type { Indie, Message } from './types'\n\nexport default class IndieDelegate {\n indie: Indie\n scope: 'project'\n emitter: Emitter\n version: 2\n messages: Map>\n subscriptions: CompositeDisposable\n\n constructor(indie: Indie, version: 2) {\n this.indie = indie\n this.scope = 'project'\n this.version = version\n this.emitter = new Emitter()\n this.messages = new Map()\n this.subscriptions = new CompositeDisposable()\n\n this.subscriptions.add(this.emitter)\n }\n get name(): string {\n return this.indie.name\n }\n getMessages(): Array {\n return Array.from(this.messages.values()).reduce(function(toReturn, entry) {\n return toReturn.concat(entry)\n }, [])\n }\n clearMessages(): void {\n if (!this.subscriptions.disposed) {\n this.emitter.emit('did-update', [])\n this.messages.clear()\n }\n }\n setMessages(filePath: string | Array, messages: ?Array = null): void {\n // v2 Support from here on\n if (typeof filePath !== 'string' || !Array.isArray(messages)) {\n throw new Error('Invalid Parameters to setMessages()')\n }\n if (this.subscriptions.disposed || !Validate.messages(this.name, messages)) {\n return\n }\n messages.forEach(function(message) {\n if (message.location.file !== filePath) {\n console.debug('[Linter-UI-Default] Expected File', filePath, 'Message', message)\n throw new Error('message.location.file does not match the given filePath')\n }\n })\n\n normalizeMessages(this.name, messages)\n this.messages.set(filePath, messages)\n this.emitter.emit('did-update', this.getMessages())\n }\n setAllMessages(messages: Array): void {\n if (this.subscriptions.disposed) {\n return\n }\n\n if (atom.inDevMode() || !Array.isArray(messages)) {\n if (!Validate.messages(this.name, messages)) return\n }\n normalizeMessages(this.name, messages)\n\n this.messages.clear()\n for (let i = 0, { length } = messages; i < length; ++i) {\n const message: Message = messages[i]\n const filePath = message.location.file\n let fileMessages = this.messages.get(filePath)\n if (!fileMessages) {\n this.messages.set(filePath, (fileMessages = []))\n }\n fileMessages.push(message)\n }\n this.emitter.emit('did-update', this.getMessages())\n }\n onDidUpdate(callback: Function): Disposable {\n return this.emitter.on('did-update', callback)\n }\n onDidDestroy(callback: Function): Disposable {\n return this.emitter.on('did-destroy', callback)\n }\n dispose(): void {\n this.emitter.emit('did-destroy')\n this.subscriptions.dispose()\n this.messages.clear()\n }\n}\n","/* @flow */\n\nimport { Emitter, CompositeDisposable } from 'atom'\nimport type { Disposable } from 'atom'\n\nimport IndieDelegate from './indie-delegate'\nimport { indie as validateIndie } from './validate'\nimport type { Indie } from './types'\n\nclass IndieRegistry {\n emitter: Emitter\n delegates: Set\n subscriptions: CompositeDisposable\n\n constructor() {\n this.emitter = new Emitter()\n this.delegates = new Set()\n this.subscriptions = new CompositeDisposable()\n\n this.subscriptions.add(this.emitter)\n }\n // Public method\n register(config: Indie, version: 2): IndieDelegate {\n if (!validateIndie(config)) {\n throw new Error('Error registering Indie Linter')\n }\n const indieLinter = new IndieDelegate(config, version)\n this.delegates.add(indieLinter)\n indieLinter.onDidDestroy(() => {\n this.delegates.delete(indieLinter)\n })\n indieLinter.onDidUpdate(messages => {\n this.emitter.emit('did-update', { linter: indieLinter, messages })\n })\n this.emitter.emit('observe', indieLinter)\n\n return indieLinter\n }\n getProviders(): Array {\n return Array.from(this.delegates)\n }\n observe(callback: Function): Disposable {\n this.delegates.forEach(callback)\n return this.emitter.on('observe', callback)\n }\n onDidUpdate(callback: Function): Disposable {\n return this.emitter.on('did-update', callback)\n }\n dispose() {\n for (const entry of this.delegates) {\n entry.dispose()\n }\n this.subscriptions.dispose()\n }\n}\n\nexport default IndieRegistry\n","var root = require('./_root');\n\n/**\n * Gets the timestamp of the number of milliseconds that have elapsed since\n * the Unix epoch (1 January 1970 00:00:00 UTC).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Date\n * @returns {number} Returns the timestamp.\n * @example\n *\n * _.defer(function(stamp) {\n * console.log(_.now() - stamp);\n * }, _.now());\n * // => Logs the number of milliseconds it took for the deferred invocation.\n */\nvar now = function() {\n return root.Date.now();\n};\n\nmodule.exports = now;\n","/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nmodule.exports = isObjectLike;\n","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar symbolTag = '[object Symbol]';\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && baseGetTag(value) == symbolTag);\n}\n\nmodule.exports = isSymbol;\n","var isObject = require('./isObject'),\n isSymbol = require('./isSymbol');\n\n/** Used as references for various `Number` constants. */\nvar NAN = 0 / 0;\n\n/** Used to match leading and trailing whitespace. */\nvar reTrim = /^\\s+|\\s+$/g;\n\n/** Used to detect bad signed hexadecimal string values. */\nvar reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n/** Used to detect binary string values. */\nvar reIsBinary = /^0b[01]+$/i;\n\n/** Used to detect octal string values. */\nvar reIsOctal = /^0o[0-7]+$/i;\n\n/** Built-in method references without a dependency on `root`. */\nvar freeParseInt = parseInt;\n\n/**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\nfunction toNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol(value)) {\n return NAN;\n }\n if (isObject(value)) {\n var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n value = isObject(other) ? (other + '') : other;\n }\n if (typeof value != 'string') {\n return value === 0 ? value : +value;\n }\n value = value.replace(reTrim, '');\n var isBinary = reIsBinary.test(value);\n return (isBinary || reIsOctal.test(value))\n ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n : (reIsBadHex.test(value) ? NAN : +value);\n}\n\nmodule.exports = toNumber;\n","var isObject = require('./isObject'),\n now = require('./now'),\n toNumber = require('./toNumber');\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max,\n nativeMin = Math.min;\n\n/**\n * Creates a debounced function that delays invoking `func` until after `wait`\n * milliseconds have elapsed since the last time the debounced function was\n * invoked. The debounced function comes with a `cancel` method to cancel\n * delayed `func` invocations and a `flush` method to immediately invoke them.\n * Provide `options` to indicate whether `func` should be invoked on the\n * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\n * with the last arguments provided to the debounced function. Subsequent\n * calls to the debounced function return the result of the last `func`\n * invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the debounced function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.debounce` and `_.throttle`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to debounce.\n * @param {number} [wait=0] The number of milliseconds to delay.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=false]\n * Specify invoking on the leading edge of the timeout.\n * @param {number} [options.maxWait]\n * The maximum time `func` is allowed to be delayed before it's invoked.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new debounced function.\n * @example\n *\n * // Avoid costly calculations while the window size is in flux.\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n *\n * // Invoke `sendMail` when clicked, debouncing subsequent calls.\n * jQuery(element).on('click', _.debounce(sendMail, 300, {\n * 'leading': true,\n * 'trailing': false\n * }));\n *\n * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\n * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\n * var source = new EventSource('/stream');\n * jQuery(source).on('message', debounced);\n *\n * // Cancel the trailing debounced invocation.\n * jQuery(window).on('popstate', debounced.cancel);\n */\nfunction debounce(func, wait, options) {\n var lastArgs,\n lastThis,\n maxWait,\n result,\n timerId,\n lastCallTime,\n lastInvokeTime = 0,\n leading = false,\n maxing = false,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n wait = toNumber(wait) || 0;\n if (isObject(options)) {\n leading = !!options.leading;\n maxing = 'maxWait' in options;\n maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n\n function invokeFunc(time) {\n var args = lastArgs,\n thisArg = lastThis;\n\n lastArgs = lastThis = undefined;\n lastInvokeTime = time;\n result = func.apply(thisArg, args);\n return result;\n }\n\n function leadingEdge(time) {\n // Reset any `maxWait` timer.\n lastInvokeTime = time;\n // Start the timer for the trailing edge.\n timerId = setTimeout(timerExpired, wait);\n // Invoke the leading edge.\n return leading ? invokeFunc(time) : result;\n }\n\n function remainingWait(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime,\n timeWaiting = wait - timeSinceLastCall;\n\n return maxing\n ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)\n : timeWaiting;\n }\n\n function shouldInvoke(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime;\n\n // Either this is the first call, activity has stopped and we're at the\n // trailing edge, the system time has gone backwards and we're treating\n // it as the trailing edge, or we've hit the `maxWait` limit.\n return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||\n (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));\n }\n\n function timerExpired() {\n var time = now();\n if (shouldInvoke(time)) {\n return trailingEdge(time);\n }\n // Restart the timer.\n timerId = setTimeout(timerExpired, remainingWait(time));\n }\n\n function trailingEdge(time) {\n timerId = undefined;\n\n // Only invoke if we have `lastArgs` which means `func` has been\n // debounced at least once.\n if (trailing && lastArgs) {\n return invokeFunc(time);\n }\n lastArgs = lastThis = undefined;\n return result;\n }\n\n function cancel() {\n if (timerId !== undefined) {\n clearTimeout(timerId);\n }\n lastInvokeTime = 0;\n lastArgs = lastCallTime = lastThis = timerId = undefined;\n }\n\n function flush() {\n return timerId === undefined ? result : trailingEdge(now());\n }\n\n function debounced() {\n var time = now(),\n isInvoking = shouldInvoke(time);\n\n lastArgs = arguments;\n lastThis = this;\n lastCallTime = time;\n\n if (isInvoking) {\n if (timerId === undefined) {\n return leadingEdge(lastCallTime);\n }\n if (maxing) {\n // Handle invocations in a tight loop.\n clearTimeout(timerId);\n timerId = setTimeout(timerExpired, wait);\n return invokeFunc(lastCallTime);\n }\n }\n if (timerId === undefined) {\n timerId = setTimeout(timerExpired, wait);\n }\n return result;\n }\n debounced.cancel = cancel;\n debounced.flush = flush;\n return debounced;\n}\n\nmodule.exports = debounce;\n","/* @flow */\n\nimport { CompositeDisposable, Emitter } from 'atom'\nimport debounce from 'lodash/debounce'\nimport type { Disposable, TextBuffer } from 'atom'\nimport { flagMessages, mergeArray } from './helpers'\nimport type { MessagesPatch, Message, Linter } from './types'\n\ntype Linter$Message$Map = {\n buffer: ?TextBuffer,\n linter: Linter,\n changed: boolean,\n deleted: boolean,\n messages: Array,\n oldMessages: Array,\n}\n\nclass MessageRegistry {\n emitter: Emitter\n messages: Array\n messagesMap: Set\n subscriptions: CompositeDisposable\n debouncedUpdate: () => void\n\n constructor() {\n this.emitter = new Emitter()\n this.messages = []\n this.messagesMap = new Set()\n this.subscriptions = new CompositeDisposable()\n this.debouncedUpdate = debounce(this.update, 100, { leading: true })\n\n this.subscriptions.add(this.emitter)\n }\n set({ messages, linter, buffer }: { messages: Array, linter: Linter, buffer: TextBuffer }) {\n // check if the linter has been already set\n let found = null\n for (const entry of this.messagesMap) {\n if (entry.buffer === buffer && entry.linter === linter) {\n found = entry\n break\n }\n }\n\n if (found) {\n // found linter\n found.messages = messages\n found.changed = true\n } else {\n // new linter\n this.messagesMap.add({ messages, linter, buffer, oldMessages: [], changed: true, deleted: false })\n }\n this.debouncedUpdate()\n }\n update() {\n // the final object sent to UI that contains the messages tagged for adding/removeal. messages is all the kept + added messages\n const result = { added: [], removed: [], messages: [] }\n\n // looping over each linter\n for (const entry of this.messagesMap) {\n // if linter is deleted\n // tag the linter's cache for removal and delete it from the map\n if (entry.deleted) {\n mergeArray(result.removed, entry.oldMessages)\n this.messagesMap.delete(entry)\n continue\n }\n\n // if the linter is not changed\n // just use its cache (no added/removed and everything is kept) and skip the rest\n if (!entry.changed) {\n // TODO When this code acutally runs?!\n mergeArray(result.messages, entry.oldMessages)\n continue\n }\n\n // flag messages as oldKept, oldRemoved, newAdded\n const flaggedMessages = flagMessages(entry.messages, entry.oldMessages)\n\n // update the result and cache\n if (flaggedMessages !== null) {\n const { oldKept, oldRemoved, newAdded } = flaggedMessages\n mergeArray(result.added, newAdded)\n mergeArray(result.removed, oldRemoved)\n const allThisEntry = newAdded.concat(oldKept)\n mergeArray(result.messages, allThisEntry)\n entry.oldMessages = allThisEntry // update chache\n }\n }\n\n // if any messages is removed or added, then update the UI\n if (result.added.length || result.removed.length) {\n this.messages = result.messages\n this.emitter.emit('did-update-messages', result)\n }\n }\n onDidUpdateMessages(callback: (difference: MessagesPatch) => void): Disposable {\n return this.emitter.on('did-update-messages', callback)\n }\n deleteByBuffer(buffer: TextBuffer) {\n for (const entry of this.messagesMap) {\n if (entry.buffer === buffer) {\n entry.deleted = true\n }\n }\n this.debouncedUpdate()\n }\n deleteByLinter(linter: Linter) {\n for (const entry of this.messagesMap) {\n if (entry.linter === linter) {\n entry.deleted = true\n }\n }\n this.debouncedUpdate()\n }\n dispose() {\n this.subscriptions.dispose()\n }\n}\n\nexport default MessageRegistry\n","/* @flow */\n/* eslint-disable import/no-duplicates */\n\nimport { Emitter, CompositeDisposable } from 'atom'\nimport type { TextEditor, Disposable, Notification } from 'atom'\n\nimport * as Helpers from './helpers'\nimport * as Validate from './validate'\nimport { $version, $activated, $requestLatest, $requestLastReceived } from './helpers'\nimport type { Linter } from './types'\n\nclass LinterRegistry {\n emitter: Emitter\n linters: Set\n lintOnChange: boolean\n ignoreVCS: boolean\n ignoreGlob: string\n lintPreviewTabs: boolean\n subscriptions: CompositeDisposable\n disabledProviders: Array\n activeNotifications: Set\n\n constructor() {\n this.emitter = new Emitter()\n this.linters = new Set()\n this.subscriptions = new CompositeDisposable()\n this.activeNotifications = new Set()\n\n this.subscriptions.add(\n atom.config.observe('linter.lintOnChange', lintOnChange => {\n this.lintOnChange = lintOnChange\n }),\n )\n this.subscriptions.add(\n atom.config.observe('core.excludeVcsIgnoredPaths', ignoreVCS => {\n this.ignoreVCS = ignoreVCS\n }),\n )\n this.subscriptions.add(\n atom.config.observe('linter.ignoreGlob', ignoreGlob => {\n this.ignoreGlob = ignoreGlob\n }),\n )\n this.subscriptions.add(\n atom.config.observe('linter.lintPreviewTabs', lintPreviewTabs => {\n this.lintPreviewTabs = lintPreviewTabs\n }),\n )\n this.subscriptions.add(\n atom.config.observe('linter.disabledProviders', disabledProviders => {\n this.disabledProviders = disabledProviders\n }),\n )\n this.subscriptions.add(this.emitter)\n }\n hasLinter(linter: Linter): boolean {\n return this.linters.has(linter)\n }\n addLinter(linter: Linter) {\n if (!Validate.linter(linter)) {\n return\n }\n linter[$activated] = true\n if (typeof linter[$requestLatest] === 'undefined') {\n linter[$requestLatest] = 0\n }\n if (typeof linter[$requestLastReceived] === 'undefined') {\n linter[$requestLastReceived] = 0\n }\n linter[$version] = 2\n this.linters.add(linter)\n }\n getProviders(): Array {\n return Array.from(this.linters)\n }\n deleteLinter(linter: Linter) {\n if (!this.linters.has(linter)) {\n return\n }\n linter[$activated] = false\n this.linters.delete(linter)\n }\n async lint({ onChange, editor }: { onChange: boolean, editor: TextEditor }): Promise {\n const filePath = editor.getPath()\n\n if (\n (onChange && !this.lintOnChange) || // Lint-on-change mismatch\n // Ignored by VCS, Glob, or simply not saved anywhere yet\n Helpers.isPathIgnored(editor.getPath(), this.ignoreGlob, this.ignoreVCS) ||\n (!this.lintPreviewTabs && atom.workspace.getActivePane().getPendingItem() === editor) // Ignore Preview tabs\n ) {\n return false\n }\n\n const scopes = Helpers.getEditorCursorScopes(editor)\n\n const promises = []\n for (const linter of this.linters) {\n if (!Helpers.shouldTriggerLinter(linter, onChange, scopes)) {\n continue\n }\n if (this.disabledProviders.includes(linter.name)) {\n continue\n }\n const number = ++linter[$requestLatest]\n const statusBuffer = linter.scope === 'file' ? editor.getBuffer() : null\n const statusFilePath = linter.scope === 'file' ? filePath : null\n\n this.emitter.emit('did-begin-linting', { number, linter, filePath: statusFilePath })\n promises.push(\n new Promise(function(resolve) {\n // $FlowIgnore: Type too complex, duh\n resolve(linter.lint(editor))\n }).then(\n messages => {\n this.emitter.emit('did-finish-linting', { number, linter, filePath: statusFilePath })\n if (linter[$requestLastReceived] >= number || !linter[$activated] || (statusBuffer && !statusBuffer.isAlive())) {\n return\n }\n linter[$requestLastReceived] = number\n if (statusBuffer && !statusBuffer.isAlive()) {\n return\n }\n\n if (messages === null) {\n // NOTE: Do NOT update the messages when providers return null\n return\n }\n\n let validity = true\n // NOTE: We are calling it when results are not an array to show a nice notification\n if (atom.inDevMode() || !Array.isArray(messages)) {\n validity = Validate.messages(linter.name, messages)\n }\n if (!validity) {\n return\n }\n\n Helpers.normalizeMessages(linter.name, messages)\n this.emitter.emit('did-update-messages', { messages, linter, buffer: statusBuffer })\n },\n error => {\n this.emitter.emit('did-finish-linting', { number, linter, filePath: statusFilePath })\n\n console.error(`[Linter] Error running ${linter.name}`, error)\n const notificationMessage = `[Linter] Error running ${linter.name}`\n if (Array.from(this.activeNotifications).some(item => item.getOptions().detail === notificationMessage)) {\n // This message is still showing to the user!\n return\n }\n\n const notification = atom.notifications.addError(notificationMessage, {\n detail: 'See Console for more info.',\n dismissable: true,\n buttons: [\n {\n text: 'Open Console',\n onDidClick: () => {\n atom.openDevTools()\n notification.dismiss()\n },\n },\n {\n text: 'Cancel',\n onDidClick: () => {\n notification.dismiss()\n },\n },\n ],\n })\n },\n ),\n )\n }\n\n await Promise.all(promises)\n return true\n }\n onDidUpdateMessages(callback: Function): Disposable {\n return this.emitter.on('did-update-messages', callback)\n }\n onDidBeginLinting(callback: Function): Disposable {\n return this.emitter.on('did-begin-linting', callback)\n }\n onDidFinishLinting(callback: Function): Disposable {\n return this.emitter.on('did-finish-linting', callback)\n }\n dispose() {\n this.activeNotifications.forEach(notification => notification.dismiss())\n this.activeNotifications.clear()\n this.linters.clear()\n this.subscriptions.dispose()\n }\n}\n\nexport default LinterRegistry\n","/* @flow */\n\nimport { Emitter, CompositeDisposable, Disposable } from 'atom'\nimport debounce from 'lodash/debounce'\nimport type { TextEditor } from 'atom'\nimport { subscriptiveObserve } from './helpers'\n\nexport default class EditorLinter {\n editor: TextEditor\n emitter: Emitter\n subscriptions: CompositeDisposable\n\n constructor(editor: TextEditor) {\n if (!atom.workspace.isTextEditor(editor)) {\n throw new Error('EditorLinter expects a valid TextEditor')\n }\n const editorBuffer = editor.getBuffer()\n const debouncedLint = debounce(\n () => {\n this.emitter.emit('should-lint', false)\n },\n 50,\n { leading: true },\n )\n\n this.editor = editor\n this.emitter = new Emitter()\n this.subscriptions = new CompositeDisposable()\n\n this.subscriptions.add(this.editor.onDidDestroy(() => this.dispose()))\n // This debouncing is for beautifiers, if they change contents of the editor and save\n // Linter should count that group of events as one.\n this.subscriptions.add(this.editor.onDidSave(debouncedLint))\n // This is to relint in case of external changes to the opened file\n this.subscriptions.add(editorBuffer.onDidReload(debouncedLint))\n // NOTE: TextEditor::onDidChange immediately invokes the callback if the text editor was *just* created\n // Using TextBuffer::onDidChange doesn't have the same behavior so using it instead.\n this.subscriptions.add(\n subscriptiveObserve(atom.config, 'linter.lintOnChangeInterval', interval =>\n editorBuffer.onDidChange(\n debounce(() => {\n this.emitter.emit('should-lint', true)\n }, interval),\n ),\n ),\n )\n }\n getEditor(): TextEditor {\n return this.editor\n }\n lint(onChange: boolean = false) {\n this.emitter.emit('should-lint', onChange)\n }\n onShouldLint(callback: Function): Disposable {\n return this.emitter.on('should-lint', callback)\n }\n onDidDestroy(callback: Function): Disposable {\n return this.emitter.on('did-destroy', callback)\n }\n dispose() {\n this.emitter.emit('did-destroy')\n this.subscriptions.dispose()\n this.emitter.dispose()\n }\n}\n","/* @flow */\n\nimport { Emitter, CompositeDisposable } from 'atom'\nimport type { Disposable, TextEditor } from 'atom'\nimport EditorLinter from './editor-linter'\n\nclass EditorRegistry {\n emitter: Emitter\n lintOnOpen: boolean\n subscriptions: CompositeDisposable\n editorLinters: Map\n\n constructor() {\n this.emitter = new Emitter()\n this.subscriptions = new CompositeDisposable()\n this.editorLinters = new Map()\n\n this.subscriptions.add(this.emitter)\n this.subscriptions.add(\n atom.config.observe('linter.lintOnOpen', lintOnOpen => {\n this.lintOnOpen = lintOnOpen\n }),\n )\n }\n activate() {\n this.subscriptions.add(\n atom.workspace.observeTextEditors(textEditor => {\n this.createFromTextEditor(textEditor)\n }),\n )\n }\n get(textEditor: TextEditor): ?EditorLinter {\n return this.editorLinters.get(textEditor)\n }\n createFromTextEditor(textEditor: TextEditor): EditorLinter {\n let editorLinter = this.editorLinters.get(textEditor)\n if (editorLinter) {\n return editorLinter\n }\n editorLinter = new EditorLinter(textEditor)\n editorLinter.onDidDestroy(() => {\n this.editorLinters.delete(textEditor)\n })\n this.editorLinters.set(textEditor, editorLinter)\n this.emitter.emit('observe', editorLinter)\n if (this.lintOnOpen) {\n editorLinter.lint()\n }\n return editorLinter\n }\n hasSibling(editorLinter: EditorLinter): boolean {\n const buffer = editorLinter.getEditor().getBuffer()\n\n return Array.from(this.editorLinters.keys()).some(item => item.getBuffer() === buffer)\n }\n observe(callback: (editorLinter: EditorLinter) => void): Disposable {\n this.editorLinters.forEach(callback)\n return this.emitter.on('observe', callback)\n }\n dispose() {\n for (const entry of this.editorLinters.values()) {\n entry.dispose()\n }\n this.subscriptions.dispose()\n }\n}\n\nexport default EditorRegistry\n","/* @flow */\n\nimport { CompositeDisposable, Emitter } from 'atom'\nimport type { Disposable } from 'atom'\n\nimport * as Helpers from './helpers'\nimport type { Linter, UI } from './types'\nimport type IndieDelegate from './indie-delegate'\n\nlet manifest\n\nfunction formatItem(item) {\n let itemName\n if (item && typeof item === 'object' && typeof item.name === 'string') {\n itemName = item.name\n } else if (typeof item === 'string') {\n itemName = item\n } else {\n throw new Error('Unknown object passed to formatItem()')\n }\n return ` - ${itemName}`\n}\nfunction sortByName(item1, item2) {\n return item1.name.localeCompare(item2.name)\n}\n\nexport default class Commands {\n emitter: Emitter\n subscriptions: CompositeDisposable\n\n constructor() {\n this.emitter = new Emitter()\n this.subscriptions = new CompositeDisposable()\n\n this.subscriptions.add(this.emitter)\n this.subscriptions.add(\n atom.commands.add('atom-workspace', {\n 'linter:enable-linter': () => this.enableLinter(),\n 'linter:disable-linter': () => this.disableLinter(),\n }),\n )\n this.subscriptions.add(\n atom.commands.add('atom-text-editor:not([mini])', {\n 'linter:lint': () => this.lint(),\n 'linter:debug': () => this.debug(),\n 'linter:toggle-active-editor': () => this.toggleActiveEditor(),\n }),\n )\n }\n lint() {\n this.emitter.emit('should-lint')\n }\n debug() {\n this.emitter.emit('should-debug')\n }\n enableLinter() {\n this.emitter.emit('should-toggle-linter', 'enable')\n }\n disableLinter() {\n this.emitter.emit('should-toggle-linter', 'disable')\n }\n toggleActiveEditor() {\n this.emitter.emit('should-toggle-active-editor')\n }\n showDebug(standardLinters: Array, indieLinters: Array, uiProviders: Array) {\n if (!manifest) {\n manifest = require('../package.json')\n }\n\n const textEditor = atom.workspace.getActiveTextEditor()\n const textEditorScopes = Helpers.getEditorCursorScopes(textEditor)\n const sortedLinters = standardLinters.slice().sort(sortByName)\n const sortedIndieLinters = indieLinters.slice().sort(sortByName)\n const sortedUIProviders = uiProviders.slice().sort(sortByName)\n\n const indieLinterNames = sortedIndieLinters.map(formatItem).join('\\n')\n const standardLinterNames = sortedLinters.map(formatItem).join('\\n')\n const matchingStandardLinters = sortedLinters\n .filter(linter => Helpers.shouldTriggerLinter(linter, false, textEditorScopes))\n .map(formatItem)\n .join('\\n')\n const humanizedScopes = textEditorScopes.map(formatItem).join('\\n')\n const uiProviderNames = sortedUIProviders.map(formatItem).join('\\n')\n\n const ignoreGlob = atom.config.get('linter.ignoreGlob')\n const ignoreVCSIgnoredPaths = atom.config.get('core.excludeVcsIgnoredPaths')\n const disabledLinters = atom.config\n .get('linter.disabledProviders')\n .map(formatItem)\n .join('\\n')\n const filePathIgnored = Helpers.isPathIgnored(textEditor.getPath(), ignoreGlob, ignoreVCSIgnoredPaths)\n\n atom.notifications.addInfo('Linter Debug Info', {\n detail: [\n `Platform: ${process.platform}`,\n `Atom Version: ${atom.getVersion()}`,\n `Linter Version: ${manifest.version}`,\n `Opened file is ignored: ${filePathIgnored ? 'Yes' : 'No'}`,\n `Matching Linter Providers: \\n${matchingStandardLinters}`,\n `Disabled Linter Providers: \\n${disabledLinters}`,\n `Standard Linter Providers: \\n${standardLinterNames}`,\n `Indie Linter Providers: \\n${indieLinterNames}`,\n `UI Providers: \\n${uiProviderNames}`,\n `Ignore Glob: ${ignoreGlob}`,\n `VCS Ignored Paths are excluded: ${ignoreVCSIgnoredPaths}`,\n `Current File Scopes: \\n${humanizedScopes}`,\n ].join('\\n'),\n dismissable: true,\n })\n }\n onShouldLint(callback: Function): Disposable {\n return this.emitter.on('should-lint', callback)\n }\n onShouldDebug(callback: Function): Disposable {\n return this.emitter.on('should-debug', callback)\n }\n onShouldToggleActiveEditor(callback: Function): Disposable {\n return this.emitter.on('should-toggle-active-editor', callback)\n }\n onShouldToggleLinter(callback: Function): Disposable {\n return this.emitter.on('should-toggle-linter', callback)\n }\n dispose() {\n this.subscriptions.dispose()\n }\n}\n","/* @flow */\n\nimport { CompositeDisposable, Emitter, Disposable } from 'atom'\n\nlet SelectListView\ntype ToggleAction = 'enable' | 'disable'\n\nclass ToggleProviders {\n action: ToggleAction\n emitter: Emitter\n providers: Array\n subscriptions: CompositeDisposable\n disabledProviders: Array\n\n constructor(action: ToggleAction, providers: Array) {\n this.action = action\n this.emitter = new Emitter()\n this.providers = providers\n this.subscriptions = new CompositeDisposable()\n\n this.subscriptions.add(this.emitter)\n this.subscriptions.add(\n atom.config.observe('linter.disabledProviders', disabledProviders => {\n this.disabledProviders = disabledProviders\n }),\n )\n }\n async getItems(): Promise> {\n if (this.action === 'disable') {\n return this.providers.filter(name => !this.disabledProviders.includes(name))\n }\n return this.disabledProviders\n }\n async process(name: string): Promise {\n if (this.action === 'disable') {\n this.disabledProviders.push(name)\n this.emitter.emit('did-disable', name)\n } else {\n const index = this.disabledProviders.indexOf(name)\n if (index !== -1) {\n this.disabledProviders.splice(index, 1)\n }\n }\n atom.config.set('linter.disabledProviders', this.disabledProviders)\n }\n async show() {\n if (!SelectListView) {\n SelectListView = require('atom-select-list')\n }\n const selectListView = new SelectListView({\n items: await this.getItems(),\n emptyMessage: 'No matches found',\n elementForItem: item => {\n const li = document.createElement('li')\n li.textContent = item\n return li\n },\n didConfirmSelection: item => {\n this.process(item)\n .catch(e => console.error('[Linter] Unable to process toggle:', e))\n .then(() => this.dispose())\n },\n didCancelSelection: () => {\n this.dispose()\n },\n didConfirmEmptySelection: () => {\n this.dispose()\n },\n })\n const panel = atom.workspace.addModalPanel({ item: selectListView })\n\n selectListView.focus()\n this.subscriptions.add(\n new Disposable(function() {\n panel.destroy()\n }),\n )\n }\n onDidDispose(callback: () => any): Disposable {\n return this.emitter.on('did-dispose', callback)\n }\n onDidDisable(callback: (name: string) => any): Disposable {\n return this.emitter.on('did-disable', callback)\n }\n dispose() {\n this.emitter.emit('did-dispose')\n this.subscriptions.dispose()\n }\n}\n\nexport default ToggleProviders\n","/* @flow */\n\nimport { CompositeDisposable, Disposable } from 'atom'\n\nimport Linter from './main'\nimport type { UI, Linter as LinterProvider } from './types'\n\n// Internal variables\nlet instance: Linter\nlet subscriptions: CompositeDisposable\n\nexport function activate() {\n subscriptions = new CompositeDisposable()\n\n instance = new Linter()\n subscriptions.add(instance)\n\n subscriptions.add(\n atom.packages.onDidActivateInitialPackages(function() {\n if (!atom.inSpecMode()) {\n require('atom-package-deps').install('linter', true)\n }\n }),\n )\n}\nexport function consumeLinter(linter: LinterProvider): Disposable {\n const linters = [].concat(linter)\n for (const entry of linters) {\n instance.addLinter(entry)\n }\n return new Disposable(() => {\n for (const entry of linters) {\n instance.deleteLinter(entry)\n }\n })\n}\nexport function consumeUI(ui: UI): Disposable {\n const uis = [].concat(ui)\n for (const entry of uis) {\n instance.addUI(entry)\n }\n return new Disposable(() => {\n for (const entry of uis) {\n instance.deleteUI(entry)\n }\n })\n}\nexport function provideIndie(): Object {\n return indie => instance.addIndie(indie)\n}\nexport function deactivate() {\n subscriptions.dispose()\n}\n","/* @flow */\n\nimport arrayUnique from 'lodash/uniq'\nimport { CompositeDisposable } from 'atom'\n\nimport UIRegistry from './ui-registry'\nimport IndieRegistry from './indie-registry'\nimport MessageRegistry from './message-registry'\nimport LinterRegistry from './linter-registry'\nimport EditorsRegistry from './editor-registry'\nimport Commands from './commands'\nimport ToggleView from './toggle-view'\nimport type { UI, Linter as LinterProvider } from './types'\n\nclass Linter {\n commands: Commands\n registryUI: UIRegistry\n registryIndie: IndieRegistry\n registryEditors: EditorsRegistry\n registryLinters: LinterRegistry\n registryMessages: MessageRegistry\n subscriptions: CompositeDisposable\n idleCallbacks: Set\n\n constructor() {\n this.idleCallbacks = new Set()\n this.subscriptions = new CompositeDisposable()\n\n this.commands = new Commands()\n this.subscriptions.add(this.commands)\n\n this.commands.onShouldLint(() => {\n this.registryEditorsInit()\n const editorLinter = this.registryEditors.get(atom.workspace.getActiveTextEditor())\n if (editorLinter) {\n editorLinter.lint()\n }\n })\n this.commands.onShouldToggleActiveEditor(() => {\n const textEditor = atom.workspace.getActiveTextEditor()\n this.registryEditorsInit()\n const editor = this.registryEditors.get(textEditor)\n if (editor) {\n editor.dispose()\n } else if (textEditor) {\n this.registryEditors.createFromTextEditor(textEditor)\n }\n })\n this.commands.onShouldDebug(async () => {\n this.registryUIInit()\n this.registryIndieInit()\n this.registryLintersInit()\n this.commands.showDebug(\n this.registryLinters.getProviders(),\n this.registryIndie.getProviders(),\n this.registryUI.getProviders(),\n )\n })\n this.commands.onShouldToggleLinter(action => {\n this.registryLintersInit()\n const toggleView = new ToggleView(action, arrayUnique(this.registryLinters.getProviders().map(linter => linter.name)))\n toggleView.onDidDispose(() => {\n this.subscriptions.remove(toggleView)\n })\n toggleView.onDidDisable(name => {\n const linter = this.registryLinters.getProviders().find(entry => entry.name === name)\n if (linter) {\n this.registryMessagesInit()\n this.registryMessages.deleteByLinter(linter)\n }\n })\n toggleView.show()\n this.subscriptions.add(toggleView)\n })\n\n const projectPathChangeCallbackID = window.requestIdleCallback(\n function projectPathChange() {\n this.idleCallbacks.delete(projectPathChangeCallbackID)\n // NOTE: Atom triggers this on boot so wait a while\n this.subscriptions.add(\n atom.project.onDidChangePaths(() => {\n this.commands.lint()\n }),\n )\n }.bind(this),\n )\n this.idleCallbacks.add(projectPathChangeCallbackID)\n\n const registryEditorsInitCallbackID = window.requestIdleCallback(\n function registryEditorsIdleInit() {\n this.idleCallbacks.delete(registryEditorsInitCallbackID)\n // This will be called on the fly if needed, but needs to run on it's\n // own at some point or linting on open or on change will never trigger\n this.registryEditorsInit()\n }.bind(this),\n )\n this.idleCallbacks.add(registryEditorsInitCallbackID)\n }\n dispose() {\n this.idleCallbacks.forEach(callbackID => window.cancelIdleCallback(callbackID))\n this.idleCallbacks.clear()\n this.subscriptions.dispose()\n }\n\n registryEditorsInit() {\n if (this.registryEditors) {\n return\n }\n this.registryEditors = new EditorsRegistry()\n this.subscriptions.add(this.registryEditors)\n this.registryEditors.observe(editorLinter => {\n editorLinter.onShouldLint(onChange => {\n this.registryLintersInit()\n this.registryLinters.lint({ onChange, editor: editorLinter.getEditor() })\n })\n editorLinter.onDidDestroy(() => {\n this.registryMessagesInit()\n\n if (!this.registryEditors.hasSibling(editorLinter)) {\n this.registryMessages.deleteByBuffer(editorLinter.getEditor().getBuffer())\n }\n })\n })\n this.registryEditors.activate()\n }\n registryLintersInit() {\n if (this.registryLinters) {\n return\n }\n this.registryLinters = new LinterRegistry()\n this.subscriptions.add(this.registryLinters)\n this.registryLinters.onDidUpdateMessages(({ linter, messages, buffer }) => {\n this.registryMessagesInit()\n this.registryMessages.set({ linter, messages, buffer })\n })\n this.registryLinters.onDidBeginLinting(({ linter, filePath }) => {\n this.registryUIInit()\n this.registryUI.didBeginLinting(linter, filePath)\n })\n this.registryLinters.onDidFinishLinting(({ linter, filePath }) => {\n this.registryUIInit()\n this.registryUI.didFinishLinting(linter, filePath)\n })\n }\n registryIndieInit() {\n if (this.registryIndie) {\n return\n }\n this.registryIndie = new IndieRegistry()\n this.subscriptions.add(this.registryIndie)\n this.registryIndie.observe(indieLinter => {\n indieLinter.onDidDestroy(() => {\n this.registryMessagesInit()\n this.registryMessages.deleteByLinter(indieLinter)\n })\n })\n this.registryIndie.onDidUpdate(({ linter, messages }) => {\n this.registryMessagesInit()\n this.registryMessages.set({ linter, messages, buffer: null })\n })\n }\n registryMessagesInit() {\n if (this.registryMessages) {\n return\n }\n this.registryMessages = new MessageRegistry()\n this.subscriptions.add(this.registryMessages)\n this.registryMessages.onDidUpdateMessages(difference => {\n this.registryUIInit()\n this.registryUI.render(difference)\n })\n }\n registryUIInit() {\n if (this.registryUI) {\n return\n }\n this.registryUI = new UIRegistry()\n this.subscriptions.add(this.registryUI)\n }\n\n // API methods for providing/consuming services\n // UI\n addUI(ui: UI) {\n this.registryUIInit()\n this.registryUI.add(ui)\n this.registryMessagesInit()\n const { messages } = this.registryMessages\n if (messages.length) {\n ui.render({ added: messages, messages, removed: [] })\n }\n }\n deleteUI(ui: UI) {\n this.registryUIInit()\n this.registryUI.delete(ui)\n }\n // Standard Linter\n addLinter(linter: LinterProvider) {\n this.registryLintersInit()\n this.registryLinters.addLinter(linter)\n }\n deleteLinter(linter: LinterProvider) {\n this.registryLintersInit()\n this.registryLinters.deleteLinter(linter)\n this.registryMessagesInit()\n this.registryMessages.deleteByLinter(linter)\n }\n // Indie Linter\n addIndie(indie: Object) {\n this.registryIndieInit()\n return this.registryIndie.register(indie, 2)\n }\n}\n\nexport default Linter\n"],"names":["global","Object","freeSelf","self","freeGlobal","Function","root","Symbol","objectProto","prototype","hasOwnProperty","nativeObjectToString","toString","symToStringTag","toStringTag","undefined","module","value","isOwn","call","tag","unmasked","e","result","getRawTag","objectToString","type","uid","isObject","baseGetTag","maskSrcKey","exec","coreJsData","keys","IE_PROTO","func","funcToString","reIsHostCtor","funcProto","reIsNative","RegExp","replace","isMasked","isFunction","test","toSource","object","key","getValue","baseIsNative","getNative","__data__","nativeCreate","size","this","has","data","Hash","entries","index","length","clear","entry","set","hashClear","hashDelete","get","hashGet","hashHas","hashSet","other","array","eq","splice","Array","assocIndexOf","pop","push","ListCache","listCacheClear","listCacheDelete","listCacheGet","listCacheHas","listCacheSet","Map","map","isKeyable","getMapData","MapCache","mapCacheClear","mapCacheDelete","mapCacheGet","mapCacheHas","mapCacheSet","SetCache","values","add","setCacheAdd","setCacheHas","predicate","fromIndex","fromRight","strictIndexOf","baseFindIndex","baseIsNaN","baseIndexOf","comparator","cache","forEach","Set","setToArray","noop","iteratee","includes","arrayIncludes","isCommon","seen","arrayIncludesWith","createSet","cacheHas","outer","computed","seenIndex","baseUniq","showError","title","description","points","renderedPoints","item","atom","notifications","addWarning","dismissable","detail","join","VALID_SEVERITY","validateMessages","linterName","messages","isArray","invalidURL","invalidIcon","invalidExcerpt","invalidLocation","invalidSeverity","invalidSolution","invalidReference","invalidDescription","invalidLinterName","i","message","reference","icon","location","file","position","range","Range","fromObject","Number","isNaN","start","row","column","end","solutions","Point","excerpt","severity","url","UIRegistry","constructor","providers","subscriptions","CompositeDisposable","ui","name","didBeginLinting","didFinishLinting","render","dispose","validateUI","delete","provider","getProviders","from","linter","filePath","$activated","$requestLastReceived","shouldTriggerLinter","wasTriggeredOnChange","scopes","lintsOnChange","some","scope","grammarScopes","getEditorCursorScopes","textEditor","arrayUnique","getCursors","reduce","cursor","concat","getScopeDescriptor","getScopesArray","minimatch","isPathIgnored","ignoredGlob","ignoredVCS","repository","projectPaths","project","getPaths","projectPath","indexOf","getRepositories","normalizedFilePath","process","platform","require","messageKey","normalizeMessages","solution","j","_length","version","flagMessages","inputs","oldMessages","oldKept","oldRemoved","newAdded","keyMessageMap","createKeyMessageMap","iInput","len","input","cacheKeys","oldKeptKeys","oldRemovedKeys","filter","x","iRemoved","RemovedKeysLen","mergeArray","arr1","arr2","apply","IndieDelegate","indie","emitter","Emitter","getMessages","toReturn","clearMessages","disposed","emit","setMessages","Error","Validate","console","debug","setAllMessages","inDevMode","fileMessages","onDidUpdate","callback","on","onDidDestroy","IndieRegistry","delegates","register","config","validateIndie","indieLinter","observe","Date","now","isObjectLike","reTrim","reIsBadHex","reIsBinary","reIsOctal","freeParseInt","parseInt","isSymbol","valueOf","isBinary","slice","nativeMax","Math","max","nativeMin","min","wait","options","lastArgs","lastThis","maxWait","timerId","lastCallTime","lastInvokeTime","leading","maxing","trailing","TypeError","invokeFunc","time","args","thisArg","leadingEdge","setTimeout","timerExpired","shouldInvoke","timeSinceLastCall","trailingEdge","timeWaiting","remainingWait","debounced","isInvoking","arguments","clearTimeout","toNumber","cancel","flush","MessageRegistry","messagesMap","debouncedUpdate","debounce","update","buffer","found","changed","deleted","added","removed","flaggedMessages","allThisEntry","onDidUpdateMessages","deleteByBuffer","deleteByLinter","LinterRegistry","linters","lintOnChange","ignoreVCS","ignoreGlob","lintPreviewTabs","disabledProviders","activeNotifications","hasLinter","addLinter","lint","deleteLinter","onChange","editor","getPath","Helpers","workspace","getActivePane","getPendingItem","promises","number","statusBuffer","getBuffer","statusFilePath","Promise","resolve","then","isAlive","validity","error","notificationMessage","getOptions","notification","addError","buttons","text","onDidClick","openDevTools","dismiss","all","onDidBeginLinting","onDidFinishLinting","EditorLinter","isTextEditor","editorBuffer","debouncedLint","onDidSave","onDidReload","eventName","subscription","eventSubscription","props","Disposable","subscriptiveObserve","interval","onDidChange","getEditor","onShouldLint","EditorRegistry","lintOnOpen","editorLinters","activate","observeTextEditors","createFromTextEditor","editorLinter","hasSibling","manifest","SelectListView","instance","formatItem","itemName","sortByName","item1","item2","localeCompare","Commands","commands","enableLinter","disableLinter","toggleActiveEditor","showDebug","standardLinters","indieLinters","uiProviders","getActiveTextEditor","textEditorScopes","sortedLinters","sort","sortedIndieLinters","sortedUIProviders","indieLinterNames","standardLinterNames","matchingStandardLinters","humanizedScopes","uiProviderNames","ignoreVCSIgnoredPaths","disabledLinters","filePathIgnored","addInfo","getVersion","onShouldDebug","onShouldToggleActiveEditor","onShouldToggleLinter","ToggleProviders","action","selectListView","items","getItems","emptyMessage","elementForItem","li","document","createElement","textContent","didConfirmSelection","catch","didCancelSelection","didConfirmEmptySelection","panel","addModalPanel","focus","destroy","onDidDispose","onDidDisable","Linter","registryUI","registryIndie","registryEditors","registryLinters","registryMessages","idleCallbacks","registryEditorsInit","async","registryUIInit","registryIndieInit","registryLintersInit","toggleView","ToggleView","remove","find","registryMessagesInit","show","projectPathChangeCallbackID","window","requestIdleCallback","onDidChangePaths","bind","registryEditorsInitCallbackID","callbackID","cancelIdleCallback","EditorsRegistry","difference","addUI","deleteUI","addIndie","packages","onDidActivateInitialPackages","inSpecMode","install","uis"],"mappings":"6OACkC,iBAAVA,GAAsBA,GAAUA,EAAOC,SAAWA,QAAUD,ECEhFE,EAA0B,iBAARC,MAAoBA,MAAQA,KAAKF,SAAWA,QAAUE,OAGjEC,GAAcF,GAAYG,SAAS,cAATA,KCHxBC,EAAKC,OCAdC,EAAcP,OAAOQ,UAGrBC,EAAiBF,EAAYE,eAO7BC,EAAuBH,EAAYI,SAGnCC,EAAiBN,EAASA,EAAOO,iBAAcC,EA6BnDC,MApBA,SAAmBC,OACbC,EAAQR,EAAeS,KAAKF,EAAOJ,GACnCO,EAAMH,EAAMJ,OAGdI,EAAMJ,QAAkBE,MACpBM,GAAW,EACf,MAAOC,QAELC,EAASZ,EAAqBQ,KAAKF,UACnCI,IACEH,EACFD,EAAMJ,GAAkBO,SAEjBH,EAAMJ,IAGVU,GClCLZ,EAPcV,OAAOQ,UAOcG,SAavCI,MAJA,SAAwBC,UACfN,EAAqBQ,KAAKF,ICT/BJ,EAAiBN,EAASA,EAAOO,iBAAcC,EAkBnDC,MATA,SAAoBC,UACL,MAATA,OACeF,IAAVE,EAdQ,qBADL,gBAiBJJ,GAAkBA,KAAkBZ,OAAOgB,GAC/CO,EAAUP,GACVQ,EAAeR,ICMrBD,MALA,SAAkBC,OACZS,SAAcT,SACF,MAATA,IAA0B,UAARS,GAA4B,YAARA,ICS/CV,IChCMW,IDsBN,SAAoBV,OACbW,EAASX,UACL,MAILG,EAAMS,EAAWZ,SA3BT,qBA4BLG,GA3BI,8BA2BcA,GA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