/*
	MIT License http://www.opensource.org/licenses/mit-license.php
	Author Tobias Koppers @sokra
*/
/*globals hotAddUpdateChunk parentHotUpdateCallback importScripts XMLHttpRequest $require$ $hotChunkFilename$ $hotMainFilename$ */
module.exports = function() {
	function webpackHotUpdateCallback(chunkId, moreModules) { // eslint-disable-line no-unused-vars
		hotAddUpdateChunk(chunkId, moreModules);
		if(parentHotUpdateCallback) parentHotUpdateCallback(chunkId, moreModules);
	} //$semicolon

	function hotDownloadUpdateChunk(chunkId) { // eslint-disable-line no-unused-vars
		importScripts($require$.p + $hotChunkFilename$);
	}

	function hotDownloadManifest(callback) { // eslint-disable-line no-unused-vars
		if(typeof XMLHttpRequest === "undefined")
			return callback(new Error("No browser support"));
		try {
			var request = new XMLHttpRequest();
			var requestPath = $require$.p + $hotMainFilename$;
			request.open("GET", requestPath, true);
			request.timeout = 10000;
			request.send(null);
		} catch(err) {
			return callback(err);
		}
		request.onreadystatechange = function() {
			if(request.readyState !== 4) return;
			if(request.status === 0) {
				// timeout
				callback(new Error("Manifest request to " + requestPath + " timed out."));
			} else if(request.status === 404) {
				// no update available
				callback();
			} else if(request.status !== 200 && request.status !== 304) {
				// other failure
				callback(new Error("Manifest request to " + requestPath + " failed."));
			} else {
				// success
				try {
					var update = JSON.parse(request.responseText);
				} catch(e) {
					callback(e);
					return;
				}
				callback(null, update);
			}
		};
	}

	function hotDiposeChunk(chunkId) {
		delete installedChunks[chunkId];
	}
};

@@ -705,16 +705,66 @@
 ed-vars%0A
+%09%09return new Promise(function(resolve, reject) %7B%0A%09
 %09%09if(typ
@@ -802,31 +802,30 @@
 ed%22)%0A%09%09%09
+%09
 return 
-callback
+reject
 (new Err
@@ -853,22 +853,24 @@
 t%22));%0A%09%09
+%09
 try %7B%0A
+%09
 %09%09%09var r
@@ -903,16 +903,17 @@
 t();%0A%09%09%09
+%09
 var requ
@@ -955,16 +955,17 @@
 ename$;%0A
+%09
 %09%09%09reque
@@ -998,24 +998,25 @@
 , true);%0A%09%09%09
+%09
 request.time
@@ -1031,16 +1031,17 @@
 000;%0A%09%09%09
+%09
 request.
@@ -1052,16 +1052,17 @@
 (null);%0A
+%09
 %09%09%7D catc
@@ -1077,36 +1077,37 @@
 %0A%09%09%09
+%09
 return 
-callback
+reject
 (err);%0A
+%09
 %09%09%7D%0A%09%09
+%09
 requ
@@ -1143,24 +1143,25 @@
 tion() %7B%0A%09%09%09
+%09
 if(request.r
@@ -1185,16 +1185,17 @@
 return;%0A
+%09
 %09%09%09if(re
@@ -1220,16 +1220,17 @@
 ) %7B%0A%09%09%09%09
+%09
 // timeo
@@ -1232,32 +1232,31 @@
 timeout%0A%09%09%09%09
-callback
+%09reject
 (new Error(%22
@@ -1309,24 +1309,25 @@
 out.%22));%0A%09%09%09
+%09
 %7D else if(re
@@ -1354,16 +1354,17 @@
 ) %7B%0A%09%09%09%09
+%09
 // no up
@@ -1386,20 +1386,21 @@
 %09%09%09%09
-callback
+%09resolve
 ();%0A
+%09
 %09%09%09%7D
@@ -1464,16 +1464,17 @@
 ) %7B%0A%09%09%09%09
+%09
 // other
@@ -1486,24 +1486,23 @@
 ure%0A%09%09%09%09
-callback
+%09reject
 (new Err
@@ -1560,16 +1560,17 @@
 %22));%0A%09%09%09
+%09
 %7D else %7B
@@ -1570,16 +1570,17 @@
  else %7B%0A
+%09
 %09%09%09%09// s
@@ -1590,22 +1590,24 @@
 ess%0A%09%09%09%09
+%09
 try %7B%0A
+%09
 %09%09%09%09%09var
@@ -1654,16 +1654,17 @@
 t);%0A%09%09%09%09
+%09
 %7D catch(
@@ -1677,21 +1677,21 @@
 %09%09%09%09
-callback
+%09reject
 (e);%0A
+%09
 %09%09%09%09
@@ -1707,29 +1707,24 @@
 %09%09%09%09
+%09
 %7D%0A%09%09%09%09
-callback(null, 
+%09resolve(
 upda
@@ -1732,16 +1732,22 @@
 e);%0A
+%09%09%09%09%7D%0A
 %09%09%09%7D%0A%09%09%7D
 ;%0A%09%7D
@@ -1742,16 +1742,17 @@
 %09%09%09%7D%0A%09%09%7D
+)
 ;%0A%09%7D%0A%0A%09f

Convert webworker template runtime to Promise-based API