1 line
179 KiB
JSON
1 line
179 KiB
JSON
|
{"id":"../../../.nvm/versions/node/v10.13.0/lib/node_modules/parcel-bundler/src/builtins/hmr-runtime.js","dependencies":[{"name":"/Users/philkunz/gitlab/pushrocks_meta/smartlog-destination-devtools/package.json","includedInParent":true,"mtime":1542067438335},{"name":"/Users/philkunz/.nvm/versions/node/v10.13.0/lib/node_modules/parcel-bundler/package.json","includedInParent":true,"mtime":1542068253946},{"name":"/Users/philkunz/.nvm/versions/node/v10.13.0/lib/node_modules/parcel-bundler/src/.babelrc","includedInParent":true,"mtime":1539263651000}],"generated":{"js":"var global = arguments[3];\nvar OVERLAY_ID = '__parcel__error__overlay__';\nvar OldModule = module.bundle.Module;\n\nfunction Module(moduleName) {\n OldModule.call(this, moduleName);\n this.hot = {\n data: module.bundle.hotData,\n _acceptCallbacks: [],\n _disposeCallbacks: [],\n accept: function (fn) {\n this._acceptCallbacks.push(fn || function () {});\n },\n dispose: function (fn) {\n this._disposeCallbacks.push(fn);\n }\n };\n module.bundle.hotData = null;\n}\n\nmodule.bundle.Module = Module;\nvar parent = module.bundle.parent;\n\nif ((!parent || !parent.isParcelRequire) && typeof WebSocket !== 'undefined') {\n var hostname = \"\" || location.hostname;\n var protocol = location.protocol === 'https:' ? 'wss' : 'ws';\n var ws = new WebSocket(protocol + '://' + hostname + ':' + \"57186\" + '/');\n\n ws.onmessage = function (event) {\n var data = JSON.parse(event.data);\n\n if (data.type === 'update') {\n console.clear();\n data.assets.forEach(function (asset) {\n hmrApply(global.parcelRequire, asset);\n });\n data.assets.forEach(function (asset) {\n if (!asset.isNew) {\n hmrAccept(global.parcelRequire, asset.id);\n }\n });\n }\n\n if (data.type === 'reload') {\n ws.close();\n\n ws.onclose = function () {\n location.reload();\n };\n }\n\n if (data.type === 'error-resolved') {\n console.log('[parcel] ✨ Error resolved');\n removeErrorOverlay();\n }\n\n if (data.type === 'error') {\n console.error('[parcel] 🚨 ' + data.error.message + '\\n' + data.error.stack);\n removeErrorOverlay();\n var overlay = createErrorOverlay(data);\n document.body.appendChild(overlay);\n }\n };\n}\n\nfunction removeErrorOverlay() {\n var overlay = document.getElementById(OVERLAY_ID);\n\n if (overlay) {\n overlay.remove();\n }\n}\n\nfunction createErrorOverlay(data) {\n var overlay = document.createElement('div');\n overlay.id = OVERLAY_ID; // html encode message and stack trace\n\n var message = document.createElement('div');\n var stackTrace = document.createElement('pre');\n message.innerText = data.error.message;\n stackTrace.innerText = data.error.stack;\n overlay.innerHTML = '<div style=\"background: black; font-size: 16px; color: white; position: fixed; height: 100%; width: 100%; top: 0px; left: 0px; padding: 30px; opacity: 0.85; font-family: Menlo, Consolas, monospace; z-index: 9999;\">' + '<span style=\"background: red; padding: 2px 4px; border-radius: 2px;\">ERROR</span>' + '<span style=\"top: 2px; margin-left: 5px; position: relative;\">🚨</span>' + '<div style=\"font-size: 18px; font-weight: bold; margin-top: 20px;\">' + message.innerHTML + '</div>' + '<pre>' + stackTrace.innerHTML + '</pre>' + '</div>';\n return overlay;\n}\n\nfunction getParents(bundle, id) {\n var modules = bundle.modules;\n\n if (!modules) {\n return [];\n }\n\n var parents = [];\n var k, d, dep;\n\n for (k in modules) {\n for (d in modules[k][1]) {\n dep = modules[k][1][d];\n\n if (dep === id || Array.isArray(dep) && dep[dep.length - 1] === id) {\n parents.push(k);\n }\n }\n }\n\n if (bundle.parent) {\n parents = parents.concat(getParents(bundle.parent, id));\n }\n\n return parents;\n}\n\nfunction hmrApply(bundle, asset) {\n var modules = bundle.modules;\n\n if (!modules) {\n return;\n }\n\n if (modules[asset.id] || !bundle.parent) {\n var fn = new Function('r
|