UNPKG

neweb

Version:

[![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Dependency Status][daviddm-image]][daviddm-url] [![Coverage percentage][coveralls-image]][coveralls-url] [![experimental](http://badges.github.io/stability-badges/dist/ex

334 lines (267 loc) 936 kB
/******/ (function(modules) { // webpackBootstrap /******/ // The module cache /******/ var installedModules = {}; /******/ /******/ // The require function /******/ function __webpack_require__(moduleId) { /******/ /******/ // Check if module is in cache /******/ if(installedModules[moduleId]) { /******/ return installedModules[moduleId].exports; /******/ } /******/ // Create a new module (and put it into the cache) /******/ var module = installedModules[moduleId] = { /******/ i: moduleId, /******/ l: false, /******/ exports: {} /******/ }; /******/ /******/ // Execute the module function /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); /******/ /******/ // Flag the module as loaded /******/ module.l = true; /******/ /******/ // Return the exports of the module /******/ return module.exports; /******/ } /******/ /******/ /******/ // expose the modules object (__webpack_modules__) /******/ __webpack_require__.m = modules; /******/ /******/ // expose the module cache /******/ __webpack_require__.c = installedModules; /******/ /******/ // define getter function for harmony exports /******/ __webpack_require__.d = function(exports, name, getter) { /******/ if(!__webpack_require__.o(exports, name)) { /******/ Object.defineProperty(exports, name, { /******/ configurable: false, /******/ enumerable: true, /******/ get: getter /******/ }); /******/ } /******/ }; /******/ /******/ // define __esModule on exports /******/ __webpack_require__.r = function(exports) { /******/ Object.defineProperty(exports, '__esModule', { value: true }); /******/ }; /******/ /******/ // getDefaultExport function for compatibility with non-harmony modules /******/ __webpack_require__.n = function(module) { /******/ var getter = module && module.__esModule ? /******/ function getDefault() { return module['default']; } : /******/ function getModuleExports() { return module; }; /******/ __webpack_require__.d(getter, 'a', getter); /******/ return getter; /******/ }; /******/ /******/ // Object.prototype.hasOwnProperty.call /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; /******/ /******/ // __webpack_public_path__ /******/ __webpack_require__.p = ""; /******/ /******/ /******/ // Load entry module and return exports /******/ return __webpack_require__(__webpack_require__.s = "./client/bootstrap.js"); /******/ }) /************************************************************************/ /******/ ({ /***/ "./client/ClientApp.js": /*!*****************************!*\ !*** ./client/ClientApp.js ***! \*****************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval("\r\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nclass ClientApp {\r\n constructor(config) {\r\n this.config = config;\r\n }\r\n getPageClass(routePage) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n yield this.loadModules(routePage.modules);\r\n return () => {\r\n //\r\n };\r\n });\r\n }\r\n loadModules(modules) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n yield this.config.modulesManager.preloadModules(modules);\r\n });\r\n }\r\n getFrameViewClass(pageFrame) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n yield this.config.modulesManager.preloadModules(pageFrame.modules);\r\n return (yield this.config.modulesManager.loadModule(\"local\", \"frames/\" + pageFrame.frameName + \"/view\", pageFrame.frameVersion)).default;\r\n });\r\n }\r\n}\r\nexports.default = ClientApp;\r\n\n\n//# sourceURL=webpack:///./client/ClientApp.js?"); /***/ }), /***/ "./client/ClientModulesManager.js": /*!****************************************!*\ !*** ./client/ClientModulesManager.js ***! \****************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval("\r\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nconst React = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\r\nconst ReactDOM = __webpack_require__(/*! react-dom */ \"./node_modules/react-dom/index.js\");\r\nconst common_1 = __webpack_require__(/*! ./../common */ \"./common.js\");\r\nconst NewebCommon = __webpack_require__(/*! ./../common */ \"./common.js\");\r\nclass ClientModulesManager {\r\n constructor(config) {\r\n this.config = config;\r\n this.modules = [];\r\n this.modules.push({\r\n name: \"react\",\r\n version: undefined,\r\n type: \"npm\",\r\n content: \"\",\r\n exports: React,\r\n });\r\n this.modules.push({\r\n name: \"react-dom\",\r\n version: undefined,\r\n type: \"npm\",\r\n content: \"\",\r\n exports: ReactDOM,\r\n });\r\n this.modules.push({\r\n name: \"neweb\",\r\n version: undefined,\r\n type: \"npm\",\r\n content: \"\",\r\n exports: NewebCommon,\r\n });\r\n }\r\n preloadModules(modules) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n yield Promise.all(modules.map((mod) => __awaiter(this, void 0, void 0, function* () {\r\n if (yield this.hasModule(mod.type, mod.name, mod.version)) {\r\n return;\r\n }\r\n const response = yield fetch(this.config.address + \"/\" + mod.type + \"/\"\r\n + mod.name.replace(/\\//gi, \"~\") + \"/\" + mod.version + \".js\");\r\n if (response.status !== 200) {\r\n throw new Error(\"Invalid response::\" + (yield response.text()));\r\n }\r\n const content = yield response.text();\r\n yield this.addModule(mod.type, mod.name, mod.version, content);\r\n })));\r\n });\r\n }\r\n hasModule(type, name, version) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n const mod = this.modules.find((m) => m.type === type && m.name === name && (!version || m.version === version));\r\n if (mod) {\r\n return true;\r\n }\r\n const content = localStorage.getItem(this.getModuleStorageName(type, name, version));\r\n if (content) {\r\n this.modules.push({\r\n content,\r\n name,\r\n type,\r\n version,\r\n exports: undefined,\r\n });\r\n return true;\r\n }\r\n return false;\r\n });\r\n }\r\n addModule(type, name, version, content) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n if (yield this.hasModule(type, name, version)) {\r\n return;\r\n }\r\n this.modules.push({\r\n name,\r\n version,\r\n type,\r\n content,\r\n exports: undefined,\r\n });\r\n localStorage.setItem(this.getModuleStorageName(type, name, version), content);\r\n });\r\n }\r\n loadModule(type, name, version) {\r\n /*\r\n const mod = this.modules.find((m) => m.type === type && m.name === name && (!version || m.version === version));\r\n if (!mod) {\r\n throw new Error(\"Not found module \" + type + \"::\" + name + \"::\" + version);\r\n }\r\n const content = localStorage.getItem(\"__neweb_module_\" + type + \"~\" + name + \"~\" + version);\r\n if (content) {\r\n this.addModule(type, name, version, content);\r\n }*/\r\n if (!this.hasModule(type, name, version)) {\r\n throw new Error(\"Not found module \" + type + \"::\" + name + \"::\" + version);\r\n }\r\n const mod = this.modules.find((m) => m.type === type && m.name === name && (!version || m.version === version));\r\n if (!mod) {\r\n throw new Error(\"Not found module \" + type + \"::\" + name + \"::\" + version);\r\n }\r\n if (typeof (mod.exports) === \"undefined\") {\r\n mod.exports = this.evalModule(mod.content);\r\n }\r\n return mod.exports;\r\n }\r\n evalModule(content) {\r\n window[common_1.REQUIRE_FUNC_NAME] = this.loadModule.bind(this);\r\n // tslint:disable-next-line:no-eval\r\n return eval(content);\r\n }\r\n getModuleStorageName(type, name, version) {\r\n return \"__neweb_module_\" + type + \"~\" + name + \"~\" + version;\r\n }\r\n}\r\nexports.default = ClientModulesManager;\r\n\n\n//# sourceURL=webpack:///./client/ClientModulesManager.js?"); /***/ }), /***/ "./client/ClientPageMetaManager.js": /*!*****************************************!*\ !*** ./client/ClientPageMetaManager.js ***! \*****************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval("\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nclass ClientPageMetaManager {\r\n update(page) {\r\n document.title = page.title || \"\";\r\n const head = document.getElementsByTagName(\"head\")[0];\r\n let isStartRemove = false;\r\n let metaEndNode;\r\n for (const child of head.childNodes) {\r\n if (isStartRemove) {\r\n if (child.nodeType === 8 && child.nodeValue === \"__page_meta_end__\") {\r\n metaEndNode = child;\r\n break;\r\n }\r\n head.removeChild(child);\r\n continue;\r\n }\r\n if (child.nodeType === 8 && child.nodeValue === \"__page_meta_start__\") {\r\n isStartRemove = true;\r\n }\r\n }\r\n if (page.meta && page.meta.length > 0 && metaEndNode) {\r\n for (const meta of page.meta) {\r\n const metaEl = document.createElement(\"meta\");\r\n metaEl.name = meta.name;\r\n metaEl.content = meta.content;\r\n head.insertBefore(metaEl, metaEndNode);\r\n }\r\n }\r\n }\r\n}\r\nexports.default = ClientPageMetaManager;\r\n\n\n//# sourceURL=webpack:///./client/ClientPageMetaManager.js?"); /***/ }), /***/ "./client/ClientPageRenderer.js": /*!**************************************!*\ !*** ./client/ClientPageRenderer.js ***! \**************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval("\r\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nconst onemitter_1 = __webpack_require__(/*! onemitter */ \"./node_modules/onemitter/index.js\");\r\nconst React = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\r\nconst ReactDOM = __webpack_require__(/*! react-dom */ \"./node_modules/react-dom/index.js\");\r\nconst NavigateContext_1 = __webpack_require__(/*! ./NavigateContext */ \"./client/NavigateContext.js\");\r\nconst ReactOnemitter_1 = __webpack_require__(/*! ./ReactOnemitter */ \"./client/ReactOnemitter.js\");\r\nconst RootComponent_1 = __webpack_require__(/*! ./RootComponent */ \"./client/RootComponent.js\");\r\nclass ClientPageRenderer {\r\n constructor(config) {\r\n this.config = config;\r\n this.rootChildrenEmitter = onemitter_1.default();\r\n this.frames = {};\r\n }\r\n loadPage(page) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n yield Promise.all(page.frames.map((f) => this.createFrame(f)));\r\n this.renderFrame(page.rootFrame);\r\n this.currentPage = page;\r\n });\r\n }\r\n newPage(page) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n yield Promise.all(page.frames.map((frame) => __awaiter(this, void 0, void 0, function* () {\r\n if (!this.frames[frame.frameId]) {\r\n yield this.createFrame(frame);\r\n }\r\n else {\r\n this.updateFrame(frame);\r\n }\r\n })));\r\n // TODO delete old frames\r\n this.renderFrame(page.rootFrame);\r\n this.rootChildrenEmitter.emit(this.frames[page.rootFrame].element);\r\n this.currentPage = page;\r\n });\r\n }\r\n setMethods(params) {\r\n this.navigate = params.navigate;\r\n this.dispatch = params.dispatch;\r\n this.seansStatusEmitter = params.seansStatusEmitter;\r\n this.networkStatusEmitter = params.networkStatusEmitter;\r\n this.historyContext = params.historyContext;\r\n }\r\n initialize() {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n this.rootElement = React.createElement(RootComponent_1.default, {\r\n children: this.rootChildrenEmitter,\r\n seansStatusEmitter: this.seansStatusEmitter,\r\n networkStatusEmitter: this.networkStatusEmitter,\r\n historyContext: this.historyContext,\r\n });\r\n return new Promise((resolve) => {\r\n this.rootChildrenEmitter.emit(this.frames[this.currentPage.rootFrame].element);\r\n ReactDOM.hydrate(React.createElement(NavigateContext_1.default.Provider, {\r\n value: this.navigate,\r\n children: this.rootElement,\r\n }), this.config.rootHtmlElement, resolve);\r\n });\r\n });\r\n }\r\n emitFrameControllerData(params) {\r\n if (this.frames[params.frameId]) {\r\n this.frames[params.frameId].propsEmitter.emit(Object.assign({}, this.frames[params.frameId].propsEmitter.get(), { data: params.data }));\r\n }\r\n }\r\n renderFrame(pageFrameId) {\r\n const frame = this.frames[pageFrameId];\r\n const places = {};\r\n Object.keys(frame.frame.frames).map((framePlace) => {\r\n const childFrameId = frame.frame.frames[framePlace];\r\n this.renderFrame(childFrameId);\r\n places[framePlace] = this.frames[childFrameId].element;\r\n });\r\n const oldProps = frame.propsEmitter.get();\r\n const newProps = {};\r\n Object.keys(oldProps).map((propName) => {\r\n if (propName === \"data\"\r\n || propName === \"history\"\r\n || propName === \"params\" || propName === \"dispatch\" || propName === \"navigate\") {\r\n newProps[propName] = oldProps[propName];\r\n }\r\n else if (places[propName]) {\r\n newProps[propName] = places[propName];\r\n }\r\n else {\r\n newProps[propName] = undefined;\r\n }\r\n });\r\n frame.propsEmitter.emit(Object.assign({}, newProps, places));\r\n }\r\n updateFrame(pageFrame) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n const oldFrame = this.frames[pageFrame.frameId];\r\n const props = {};\r\n if (JSON.stringify(oldFrame.frame.params) !== JSON.stringify(pageFrame.params)) {\r\n oldFrame.frame.params = pageFrame.params;\r\n props.params = pageFrame.params;\r\n }\r\n oldFrame.propsEmitter.emit(Object.assign({}, oldFrame.propsEmitter.get(), props));\r\n oldFrame.frame.frames = pageFrame.frames;\r\n });\r\n }\r\n createFrame(pageFrame) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n const ViewClass = yield this.config.app.getFrameViewClass(pageFrame);\r\n const data = pageFrame.data;\r\n const params = pageFrame.params;\r\n const props = {\r\n data,\r\n params,\r\n navigate: this.navigate,\r\n history: this.historyContext,\r\n dispatch: (actionName, ...args) => this.dispatch({\r\n frameId: pageFrame.frameId,\r\n actionName,\r\n args,\r\n }),\r\n };\r\n const propsEmitter = onemitter_1.default({ value: props });\r\n this.frames[pageFrame.frameId] = {\r\n propsEmitter,\r\n element: React.createElement(ReactOnemitter_1.default, {\r\n key: pageFrame.frameId,\r\n componentEmitter: onemitter_1.default({ value: ViewClass }),\r\n propsEmitter,\r\n }),\r\n frame: pageFrame,\r\n };\r\n });\r\n }\r\n}\r\nexports.default = ClientPageRenderer;\r\n\n\n//# sourceURL=webpack:///./client/ClientPageRenderer.js?"); /***/ }), /***/ "./client/ClientSeance.js": /*!********************************!*\ !*** ./client/ClientSeance.js ***! \********************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval("\r\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nconst onemitter_1 = __webpack_require__(/*! onemitter */ \"./node_modules/onemitter/index.js\");\r\nclass ClientSeance {\r\n constructor(config) {\r\n this.config = config;\r\n this.seansStatusEmitter = onemitter_1.default();\r\n this.networkStatusEmitter = onemitter_1.default();\r\n }\r\n initialize(initialInfo) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n this.seansId = initialInfo.seanceId;\r\n this.seansStatusEmitter.emit(\"initializing\");\r\n this.networkStatusEmitter.emit(this.config.socket.connected ? \"connected\" : \"disconnected\");\r\n this.historyContext = {\r\n push: (url) => {\r\n history.pushState(url, \"\", url);\r\n this.navigate(url);\r\n },\r\n replace: (url) => {\r\n history.replaceState(url, \"\", url);\r\n this.navigate(url);\r\n },\r\n };\r\n this.config.pageRenderer.setMethods({\r\n dispatch: (params) => this.dispatch(params),\r\n navigate: (url) => this.navigate(url),\r\n seansStatusEmitter: this.seansStatusEmitter,\r\n networkStatusEmitter: this.networkStatusEmitter,\r\n historyContext: this.historyContext,\r\n });\r\n if (initialInfo.page) {\r\n yield this.loadPage(initialInfo.page);\r\n yield this.config.pageRenderer.loadPage(initialInfo.page);\r\n yield this.config.pageRenderer.initialize();\r\n }\r\n this.config.socket.on(\"connect\", () => this.networkStatusEmitter.emit(\"connected\"));\r\n this.config.socket.on(\"connect_error\", () => this.networkStatusEmitter.emit(\"disconnected\"));\r\n this.config.socket.on(\"connect_timeout\", () => this.networkStatusEmitter.emit(\"disconnected\"));\r\n this.config.socket.on(\"error\", () => this.networkStatusEmitter.emit(\"disconnected\"));\r\n this.config.socket.on(\"reconnect\", () => this.networkStatusEmitter.emit(\"connected\"));\r\n this.config.socket.on(\"reconnect_attempt\", () => this.networkStatusEmitter.emit(\"connecting\"));\r\n this.config.socket.on(\"reconnect_error\", () => this.networkStatusEmitter.emit(\"disconnected\"));\r\n this.config.socket.on(\"reconnect_failed\", () => this.networkStatusEmitter.emit(\"disconnected\"));\r\n this.config.socket.on(\"frame-controller-data\", (params) => {\r\n this.config.pageRenderer.emitFrameControllerData(params);\r\n });\r\n this.config.socket.on(\"new-page\", (params) => __awaiter(this, void 0, void 0, function* () {\r\n yield this.config.pageRenderer.newPage(params.page);\r\n history.replaceState(params.page.url, params.page.title || \"\", params.page.url);\r\n this.config.pageMetaManager.update(params.page);\r\n this.seansStatusEmitter.emit(\"ready\");\r\n }));\r\n yield new Promise((resolve) => {\r\n this.config.socket.emit(\"initialize\", { seanceId: this.config.seanceId }, resolve);\r\n });\r\n history.replaceState(window.location.href, \"\", window.location.href);\r\n window.onpopstate = (e) => {\r\n this.navigate(e.state);\r\n };\r\n this.seansStatusEmitter.emit(\"ready\");\r\n });\r\n }\r\n navigate(url) {\r\n this.seansStatusEmitter.emit(\"navigating\");\r\n this.config.socket.emit(\"navigate\", { url });\r\n }\r\n dispatch(params) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n yield new Promise((resolve) => {\r\n this.config.socket.emit(\"frame-controller-dispatch\", params, resolve);\r\n });\r\n });\r\n }\r\n loadPage(page) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n yield this.config.app.getPageClass(page);\r\n });\r\n }\r\n}\r\nexports.default = ClientSeance;\r\n\n\n//# sourceURL=webpack:///./client/ClientSeance.js?"); /***/ }), /***/ "./client/HistoryContext.js": /*!**********************************!*\ !*** ./client/HistoryContext.js ***! \**********************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval("\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nconst React = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\r\nexports.default = React.createContext();\r\n\n\n//# sourceURL=webpack:///./client/HistoryContext.js?"); /***/ }), /***/ "./client/Link.js": /*!************************!*\ !*** ./client/Link.js ***! \************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval("\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nconst React = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\r\nconst HistoryContext_1 = __webpack_require__(/*! ./HistoryContext */ \"./client/HistoryContext.js\");\r\nexports.default = (props) => React.createElement(HistoryContext_1.default, {\r\n children: (history) => React.createElement(\"a\", Object.assign({}, props, { onClick: (e) => {\r\n if (props.target !== \"_blank\" && !e.ctrlKey && props.href) {\r\n e.preventDefault();\r\n history.push(props.href);\r\n }\r\n } })),\r\n});\r\n\n\n//# sourceURL=webpack:///./client/Link.js?"); /***/ }), /***/ "./client/NavigateContext.js": /*!***********************************!*\ !*** ./client/NavigateContext.js ***! \***********************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval("\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nconst React = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\r\nexports.default = React.createContext();\r\n\n\n//# sourceURL=webpack:///./client/NavigateContext.js?"); /***/ }), /***/ "./client/NetworkStatusContext.js": /*!****************************************!*\ !*** ./client/NetworkStatusContext.js ***! \****************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval("\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nconst React = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\r\nexports.default = React.createContext(\"disconnected\");\r\n\n\n//# sourceURL=webpack:///./client/NetworkStatusContext.js?"); /***/ }), /***/ "./client/ReactOnemitter.js": /*!**********************************!*\ !*** ./client/ReactOnemitter.js ***! \**********************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval("\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nconst react_1 = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\r\nclass ReactOnemitter extends react_1.Component {\r\n componentWillMount() {\r\n this.propsEmitterCallback = (props) => {\r\n this.setState(props);\r\n };\r\n this.componentEmitterCallback = (component) => {\r\n this.setState({ ___component: component });\r\n };\r\n const state = this.props.propsEmitter.has() ? Object.assign({}, this.props.propsEmitter.get()) : {};\r\n if (this.props.componentEmitter.has()) {\r\n state.___component = this.props.componentEmitter.get();\r\n }\r\n this.props.propsEmitter.on(this.propsEmitterCallback);\r\n this.props.componentEmitter.on(this.componentEmitterCallback);\r\n this.setState(state);\r\n }\r\n componentWillUnmount() {\r\n this.props.propsEmitter.off(this.propsEmitterCallback);\r\n this.props.componentEmitter.off(this.componentEmitterCallback);\r\n }\r\n render() {\r\n const props = Object.assign({}, this.state);\r\n delete props.___component;\r\n return react_1.createElement(this.state.___component, props);\r\n }\r\n}\r\nexports.default = ReactOnemitter;\r\n\n\n//# sourceURL=webpack:///./client/ReactOnemitter.js?"); /***/ }), /***/ "./client/RootComponent.js": /*!*********************************!*\ !*** ./client/RootComponent.js ***! \*********************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval("\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nconst React = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\r\nconst common_1 = __webpack_require__(/*! ./../common */ \"./common.js\");\r\nclass RootComponent extends React.Component {\r\n constructor() {\r\n super(...arguments);\r\n this.state = { children: undefined, seansStatus: \"unknown\", networkStatus: \"\" };\r\n }\r\n componentWillMount() {\r\n this.setState({ children: this.props.children.has() ? this.props.children.get() : undefined });\r\n this.callback = (children) => {\r\n this.setState({ children });\r\n };\r\n this.props.children.on(this.callback);\r\n // seansStatus\r\n this.setState({\r\n seansStatus: this.props.seansStatusEmitter.has() ? this.props.seansStatusEmitter.get() :\r\n undefined,\r\n });\r\n this.seansStatusCallback = (status) => {\r\n this.setState({ seansStatus: status });\r\n };\r\n this.props.seansStatusEmitter.on(this.seansStatusCallback);\r\n // networkStatus\r\n this.setState({\r\n networkStatus: this.props.networkStatusEmitter.has() ? this.props.networkStatusEmitter.get() :\r\n undefined,\r\n });\r\n this.networkStatusCallback = (status) => {\r\n this.setState({ networkStatus: status });\r\n };\r\n this.props.networkStatusEmitter.on(this.networkStatusCallback);\r\n }\r\n componentWillUnmount() {\r\n this.props.children.off(this.callback);\r\n this.props.networkStatusEmitter.off(this.networkStatusCallback);\r\n this.props.seansStatusEmitter.off(this.seansStatusCallback);\r\n }\r\n render() {\r\n return React.createElement(common_1.HistoryContext.Provider, {\r\n value: this.props.historyContext,\r\n children: React.createElement(common_1.NetworkStatusContext.Provider, {\r\n children: React.createElement(common_1.SeansStatusContext.Provider, {\r\n value: this.state.seansStatus,\r\n children: this.state.children,\r\n }),\r\n value: this.state.networkStatus,\r\n }),\r\n });\r\n }\r\n}\r\nexports.default = RootComponent;\r\n\n\n//# sourceURL=webpack:///./client/RootComponent.js?"); /***/ }), /***/ "./client/SeansStatusContext.js": /*!**************************************!*\ !*** ./client/SeansStatusContext.js ***! \**************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval("\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nconst React = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\r\nexports.default = React.createContext(\"initializing\");\r\n\n\n//# sourceURL=webpack:///./client/SeansStatusContext.js?"); /***/ }), /***/ "./client/bootstrap.js": /*!*****************************!*\ !*** ./client/bootstrap.js ***! \*****************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval("\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nconst SocketIOClient = __webpack_require__(/*! socket.io-client */ \"./node_modules/socket.io-client/lib/index.js\");\r\nconst common_1 = __webpack_require__(/*! ../common */ \"./common.js\");\r\nconst ClientApp_1 = __webpack_require__(/*! ./ClientApp */ \"./client/ClientApp.js\");\r\nconst ClientModulesManager_1 = __webpack_require__(/*! ./ClientModulesManager */ \"./client/ClientModulesManager.js\");\r\nconst ClientPageMetaManager_1 = __webpack_require__(/*! ./ClientPageMetaManager */ \"./client/ClientPageMetaManager.js\");\r\nconst ClientPageRenderer_1 = __webpack_require__(/*! ./ClientPageRenderer */ \"./client/ClientPageRenderer.js\");\r\nconst ClientSeance_1 = __webpack_require__(/*! ./ClientSeance */ \"./client/ClientSeance.js\");\r\nconst initial = window[common_1.INITIAL_VAR];\r\nconst socket = SocketIOClient(window.location.protocol + \"//\" + window.location.host);\r\nconst modulesManager = new ClientModulesManager_1.default({\r\n address: window.location.protocol + \"//\" + window.location.host + \"/modules\",\r\n});\r\nconst app = new ClientApp_1.default({\r\n modulesManager,\r\n});\r\nconst pageRenderer = new ClientPageRenderer_1.default({\r\n app,\r\n rootHtmlElement: document.getElementById(\"root\"),\r\n});\r\nconst pageMetaManager = new ClientPageMetaManager_1.default();\r\nconst seance = new ClientSeance_1.default({\r\n app,\r\n seanceId: initial.seanceId,\r\n socket,\r\n pageRenderer,\r\n pageMetaManager,\r\n});\r\nconst logger = console;\r\nseance.initialize(initial).then(() => {\r\n window.dispatchEvent(new Event(\"neweb-seans-initialized\"));\r\n logger.log(\"Initialized\");\r\n});\r\n\n\n//# sourceURL=webpack:///./client/bootstrap.js?"); /***/ }), /***/ "./common.js": /*!*******************!*\ !*** ./common.js ***! \*******************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval("\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.INITIAL_VAR = \"__initial\";\r\nexports.REQUIRE_FUNC_NAME = \"loadModule\";\r\nvar NavigateContext_1 = __webpack_require__(/*! ./client/NavigateContext */ \"./client/NavigateContext.js\");\r\nexports.NavigateContext = NavigateContext_1.default;\r\nvar SeansStatusContext_1 = __webpack_require__(/*! ./client/SeansStatusContext */ \"./client/SeansStatusContext.js\");\r\nexports.SeansStatusContext = SeansStatusContext_1.default;\r\nvar NetworkStatusContext_1 = __webpack_require__(/*! ./client/NetworkStatusContext */ \"./client/NetworkStatusContext.js\");\r\nexports.NetworkStatusContext = NetworkStatusContext_1.default;\r\nvar HistoryContext_1 = __webpack_require__(/*! ./client/HistoryContext */ \"./client/HistoryContext.js\");\r\nexports.HistoryContext = HistoryContext_1.default;\r\nvar Link_1 = __webpack_require__(/*! ./client/Link */ \"./client/Link.js\");\r\nexports.Link = Link_1.default;\r\n\n\n//# sourceURL=webpack:///./common.js?"); /***/ }), /***/ "./node_modules/after/index.js": /*!*************************************!*\ !*** ./node_modules/after/index.js ***! \*************************************/ /*! no static exports found */ /***/ (function(module, exports) { eval("module.exports = after\n\nfunction after(count, callback, err_cb) {\n var bail = false\n err_cb = err_cb || noop\n proxy.count = count\n\n return (count === 0) ? callback() : proxy\n\n function proxy(err, result) {\n if (proxy.count <= 0) {\n throw new Error('after called too many times')\n }\n --proxy.count\n\n // after first error, rest are passed to err_cb\n if (err) {\n bail = true\n callback(err)\n // future error callbacks will go to error handler\n callback = err_cb\n } else if (proxy.count === 0 && !bail) {\n callback(null, result)\n }\n }\n}\n\nfunction noop() {}\n\n\n//# sourceURL=webpack:///./node_modules/after/index.js?"); /***/ }), /***/ "./node_modules/arraybuffer.slice/index.js": /*!*************************************************!*\ !*** ./node_modules/arraybuffer.slice/index.js ***! \*************************************************/ /*! no static exports found */ /***/ (function(module, exports) { eval("/**\n * An abstraction for slicing an arraybuffer even when\n * ArrayBuffer.prototype.slice is not supported\n *\n * @api public\n */\n\nmodule.exports = function(arraybuffer, start, end) {\n var bytes = arraybuffer.byteLength;\n start = start || 0;\n end = end || bytes;\n\n if (arraybuffer.slice) { return arraybuffer.slice(start, end); }\n\n if (start < 0) { start += bytes; }\n if (end < 0) { end += bytes; }\n if (end > bytes) { end = bytes; }\n\n if (start >= bytes || start >= end || bytes === 0) {\n return new ArrayBuffer(0);\n }\n\n var abv = new Uint8Array(arraybuffer);\n var result = new Uint8Array(end - start);\n for (var i = start, ii = 0; i < end; i++, ii++) {\n result[ii] = abv[i];\n }\n return result.buffer;\n};\n\n\n//# sourceURL=webpack:///./node_modules/arraybuffer.slice/index.js?"); /***/ }), /***/ "./node_modules/backo2/index.js": /*!**************************************!*\ !*** ./node_modules/backo2/index.js ***! \**************************************/ /*! no static exports found */ /***/ (function(module, exports) { eval("\n/**\n * Expose `Backoff`.\n */\n\nmodule.exports = Backoff;\n\n/**\n * Initialize backoff timer with `opts`.\n *\n * - `min` initial timeout in milliseconds [100]\n * - `max` max timeout [10000]\n * - `jitter` [0]\n * - `factor` [2]\n *\n * @param {Object} opts\n * @api public\n */\n\nfunction Backoff(opts) {\n opts = opts || {};\n this.ms = opts.min || 100;\n this.max = opts.max || 10000;\n this.factor = opts.factor || 2;\n this.jitter = opts.jitter > 0 && opts.jitter <= 1 ? opts.jitter : 0;\n this.attempts = 0;\n}\n\n/**\n * Return the backoff duration.\n *\n * @return {Number}\n * @api public\n */\n\nBackoff.prototype.duration = function(){\n var ms = this.ms * Math.pow(this.factor, this.attempts++);\n if (this.jitter) {\n var rand = Math.random();\n var deviation = Math.floor(rand * this.jitter * ms);\n ms = (Math.floor(rand * 10) & 1) == 0 ? ms - deviation : ms + deviation;\n }\n return Math.min(ms, this.max) | 0;\n};\n\n/**\n * Reset the number of attempts.\n *\n * @api public\n */\n\nBackoff.prototype.reset = function(){\n this.attempts = 0;\n};\n\n/**\n * Set the minimum duration\n *\n * @api public\n */\n\nBackoff.prototype.setMin = function(min){\n this.ms = min;\n};\n\n/**\n * Set the maximum duration\n *\n * @api public\n */\n\nBackoff.prototype.setMax = function(max){\n this.max = max;\n};\n\n/**\n * Set the jitter\n *\n * @api public\n */\n\nBackoff.prototype.setJitter = function(jitter){\n this.jitter = jitter;\n};\n\n\n\n//# sourceURL=webpack:///./node_modules/backo2/index.js?"); /***/ }), /***/ "./node_modules/base64-arraybuffer/lib/base64-arraybuffer.js": /*!*******************************************************************!*\ !*** ./node_modules/base64-arraybuffer/lib/base64-arraybuffer.js ***! \*******************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { eval("/*\n * base64-arraybuffer\n * https://github.com/niklasvh/base64-arraybuffer\n *\n * Copyright (c) 2012 Niklas von Hertzen\n * Licensed under the MIT license.\n */\n(function(){\n \"use strict\";\n\n var chars = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\";\n\n // Use a lookup table to find the index.\n var lookup = new Uint8Array(256);\n for (var i = 0; i < chars.length; i++) {\n lookup[chars.charCodeAt(i)] = i;\n }\n\n exports.encode = function(arraybuffer) {\n var bytes = new Uint8Array(arraybuffer),\n i, len = bytes.length, base64 = \"\";\n\n for (i = 0; i < len; i+=3) {\n base64 += chars[bytes[i] >> 2];\n base64 += chars[((bytes[i] & 3) << 4) | (bytes[i + 1] >> 4)];\n base64 += chars[((bytes[i + 1] & 15) << 2) | (bytes[i + 2] >> 6)];\n base64 += chars[bytes[i + 2] & 63];\n }\n\n if ((len % 3) === 2) {\n base64 = base64.substring(0, base64.length - 1) + \"=\";\n } else if (len % 3 === 1) {\n base64 = base64.substring(0, base64.length - 2) + \"==\";\n }\n\n return base64;\n };\n\n exports.decode = function(base64) {\n var bufferLength = base64.length * 0.75,\n len = base64.length, i, p = 0,\n encoded1, encoded2, encoded3, encoded4;\n\n if (base64[base64.length - 1] === \"=\") {\n bufferLength--;\n if (base64[base64.length - 2] === \"=\") {\n bufferLength--;\n }\n }\n\n var arraybuffer = new ArrayBuffer(bufferLength),\n bytes = new Uint8Array(arraybuffer);\n\n for (i = 0; i < len; i+=4) {\n encoded1 = lookup[base64.charCodeAt(i)];\n encoded2 = lookup[base64.charCodeAt(i+1)];\n encoded3 = lookup[base64.charCodeAt(i+2)];\n encoded4 = lookup[base64.charCodeAt(i+3)];\n\n bytes[p++] = (encoded1 << 2) | (encoded2 >> 4);\n bytes[p++] = ((encoded2 & 15) << 4) | (encoded3 >> 2);\n bytes[p++] = ((encoded3 & 3) << 6) | (encoded4 & 63);\n }\n\n return arraybuffer;\n };\n})();\n\n\n//# sourceURL=webpack:///./node_modules/base64-arraybuffer/lib/base64-arraybuffer.js?"); /***/ }), /***/ "./node_modules/blob/index.js": /*!************************************!*\ !*** ./node_modules/blob/index.js ***! \************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { eval("/* WEBPACK VAR INJECTION */(function(global) {/**\n * Create a blob builder even when vendor prefixes exist\n */\n\nvar BlobBuilder = global.BlobBuilder\n || global.WebKitBlobBuilder\n || global.MSBlobBuilder\n || global.MozBlobBuilder;\n\n/**\n * Check if Blob constructor is supported\n */\n\nvar blobSupported = (function() {\n try {\n var a = new Blob(['hi']);\n return a.size === 2;\n } catch(e) {\n return false;\n }\n})();\n\n/**\n * Check if Blob constructor supports ArrayBufferViews\n * Fails in Safari 6, so we need to map to ArrayBuffers there.\n */\n\nvar blobSupportsArrayBufferView = blobSupported && (function() {\n try {\n var b = new Blob([new Uint8Array([1,2])]);\n return b.size === 2;\n } catch(e) {\n return false;\n }\n})();\n\n/**\n * Check if BlobBuilder is supported\n */\n\nvar blobBuilderSupported = BlobBuilder\n && BlobBuilder.prototype.append\n && BlobBuilder.prototype.getBlob;\n\n/**\n * Helper function that maps ArrayBufferViews to ArrayBuffers\n * Used by BlobBuilder constructor and old browsers that didn't\n * support it in the Blob constructor.\n */\n\nfunction mapArrayBufferViews(ary) {\n for (var i = 0; i < ary.length; i++) {\n var chunk = ary[i];\n if (chunk.buffer instanceof ArrayBuffer) {\n var buf = chunk.buffer;\n\n // if this is a subarray, make a copy so we only\n // include the subarray region from the underlying buffer\n if (chunk.byteLength !== buf.byteLength) {\n var copy = new Uint8Array(chunk.byteLength);\n copy.set(new Uint8Array(buf, chunk.byteOffset, chunk.byteLength));\n buf = copy.buffer;\n }\n\n ary[i] = buf;\n }\n }\n}\n\nfunction BlobBuilderConstructor(ary, options) {\n options = options || {};\n\n var bb = new BlobBuilder();\n mapArrayBufferViews(ary);\n\n for (var i = 0; i < ary.length; i++) {\n bb.append(ary[i]);\n }\n\n return (options.type) ? bb.getBlob(options.type) : bb.getBlob();\n};\n\nfunction BlobConstructor(ary, options) {\n mapArrayBufferViews(ary);\n return new Blob(ary, options || {});\n};\n\nmodule.exports = (function() {\n if (blobSupported) {\n return blobSupportsArrayBufferView ? global.Blob : BlobConstructor;\n } else if (blobBuilderSupported) {\n return BlobBuilderConstructor;\n } else {\n return undefined;\n }\n})();\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/global.js */ \"./node_modules/webpack/buildin/global.js\")))\n\n//# sourceURL=webpack:///./node_modules/blob/index.js?"); /***/ }), /***/ "./node_modules/component-bind/index.js": /*!**********************************************!*\ !*** ./node_modules/component-bind/index.js ***! \**********************************************/ /*! no static exports found */ /***/ (function(module, exports) { eval("/**\n * Slice reference.\n */\n\nvar slice = [].slice;\n\n/**\n * Bind `obj` to `fn`.\n *\n * @param {Object} obj\n * @param {Function|String} fn or string\n * @return {Function}\n * @api public\n */\n\nmodule.exports = function(obj, fn){\n if ('string' == typeof fn) fn = obj[fn];\n if ('function' != typeof fn) throw new Error('bind() requires a function');\n var args = slice.call(arguments, 2);\n return function(){\n return fn.apply(obj, args.concat(slice.call(arguments)));\n }\n};\n\n\n//# sourceURL=webpack:///./node_modules/component-bind/index.js?"); /***/ }), /***/ "./node_modules/component-emitter/index.js": /*!*************************************************!*\ !*** ./node_modules/component-emitter/index.js ***! \*************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { eval("\r\n/**\r\n * Expose `Emitter`.\r\n */\r\n\r\nif (true) {\r\n module.exports = Emitter;\r\n}\r\n\r\n/**\r\n * Initialize a new `Emitter`.\r\n *\r\n * @api public\r\n */\r\n\r\nfunction Emitter(obj) {\r\n if (obj) return mixin(obj);\r\n};\r\n\r\n/**\r\n * Mixin the emitter properties.\r\n *\r\n * @param {Object} obj\r\n * @return {Object}\r\n * @api private\r\n */\r\n\r\nfunction mixin(obj) {\r\n for (var key in Emitter.prototype) {\r\n obj[key] = Emitter.prototype[key];\r\n }\r\n return obj;\r\n}\r\n\r\n/**\r\n * Listen on the given `event` with `fn`.\r\n *\r\n * @param {String} event\r\n * @param {Function} fn\r\n * @return {Emitter}\r\n * @api public\r\n */\r\n\r\nEmitter.prototype.on =\r\nEmitter.prototype.addEventListener = function(event, fn){\r\n this._callbacks = this._callbacks || {};\r\n (this._callbacks['$' + event] = this._callbacks['$' + event] || [])\r\n .push(fn);\r\n return this;\r\n};\r\n\r\n/**\r\n * Adds an `event` listener that will be invoked a single\r\n * time then automatically removed.\r\n *\r\n * @param {String} event\r\n * @param {Function} fn\r\n * @return {Emitter}\r\n * @api public\r\n */\r\n\r\nEmitter.prototype.once = function(event, fn){\r\n function on() {\r\n this.off(event, on);\r\n fn.apply(this, arguments);\r\n }\r\n\r\n on.fn = fn;\r\n this.on(event, on);\r\n return this;\r\n};\r\n\r\n/**\r\n * Remove the given callback for `event` or all\r\n * registered callbacks.\r\n *\r\n * @param {String} event\r\n * @param {Function} fn\r\n * @return {Emitter}\r\n * @api public\r\n */\r\n\r\nEmitter.prototype.off =\r\nEmitter.prototype.removeListener =\r\nEmitter.prototype.removeAllListeners =\r\nEmitter.prototype.removeEventListener = function(event, fn){\r\n this._callbacks = this._callbacks || {};\r\n\r\n // all\r\n if (0 == arguments.length) {\r\n this._callbacks = {};\r\n return this;\r\n }\r\n\r\n // specific event\r\n var callbacks = this._callbacks['$' + event];\r\n if (!callbacks) return this;\r\n\r\n // remove all handlers\r\n if (1 == arguments.length) {\r\n delete this._callbacks['$' + event];\r\n return this;\r\n }\r\n\r\n // remove specific handler\r\n var cb;\r\n for (var i = 0; i < callbacks.length; i++) {\r\n cb = callbacks[i];\r\n if (cb === fn || cb.fn === fn) {\r\n callbacks.splice(i, 1);\r\n break;\r\n }\r\n }\r\n return this;\r\n};\r\n\r\n/**\r\n * Emit `event` with the given args.\r\n *\r\n * @param {String} event\r\n * @param {Mixed} ...\r\n * @return {Emitter}\r\n */\r\n\r\nEmitter.prototype.emit = function(event){\r\n this._callbacks = this._callbacks || {};\r\n var args = [].slice.call(arguments, 1)\r\n , callbacks = this._callbacks['$' + event];\r\n\r\n if (callbacks) {\r\n callbacks = callbacks.slice(0);\r\n for (var i = 0, len = callbacks.length; i < len; ++i) {\r\n callbacks[i].apply(this, args);\r\n }\r\n }\r\n\r\n return this;\r\n};\r\n\r\n/**\r\n * Return array of callbacks for `event`.\r\n *\r\n * @param {String} event\r\n * @return {Array}\r\n * @api public\r\n */\r\n\r\nEmitter.prototype.listeners = function(event){\r\n this._callbacks = this._callbacks || {};\r\n return this._callbacks['$' + event] || [];\r\n};\r\n\r\n/**\r\n * Check if this emitter has `event` handlers.\r\n *\r\n * @param {String} event\r\n * @return {Boolean}\r\n * @api public\r\n */\r\n\r\nEmitter.prototype.hasListeners = function(event){\r\n return !! this.listeners(event).length;\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/component-emitter/index.js?"); /***/ }), /***/ "./node_modules/component-inherit/index.js": /*!*************************************************!*\ !*** ./node_modules/component-inherit/index.js ***! \*************************************************/ /*! no static exports found */ /***/ (function(module, exports) { eval("\nmodule.exports = function(a, b){\n var fn = function(){};\n fn.prototype = b.prototype;\n a.prototype = new fn;\n a.prototype.constructor = a;\n};\n\n//# sourceURL=webpack:///./node_modules/component-inherit/index.js?"); /***/ }), /***/ "./node_modules/engine.io-client/lib/index.js": /*!****************************************************!*\ !*** ./node_modules/engine.io-client/lib/index.js ***! \****************************************************/ /*!