Liferay.Loader.define("liferay!template-web$codemirror@5.65.2/addon/tern/worker",["module","exports","require"],(function(e,t,r){window;{var n;this.onmessage=function(e){var t=e.data;switch(t.type){case"init":return function startServer(e,t,r){r&&importScripts.apply(null,r);n=new tern.Server({getFile:getFile,async:!0,defs:e,plugins:t})}(t.defs,t.plugins,t.scripts);case"add":return n.addFile(t.name,t.text);case"del":return n.delFile(t.name);case"req":return n.request(t.body,(function(e,r){postMessage({id:t.id,body:r,err:e&&String(e)})}));case"getFile":var r=s[t.id];return delete s[t.id],r(t.err,t.text);default:throw new Error("Unknown message type: "+t.type)}};var i=0,s={};function getFile(e,t){postMessage({type:"getFile",name:e,id:++i}),s[i]=t}this.console={log:function(e){postMessage({type:"debug",message:e})}}}}));
//# sourceMappingURL=worker.js.map