webpackHotUpdate(0,{

/***/ 230:
/***/ (function(module, __webpack_exports__) {

"use strict";
eval("throw new Error(\"Module build failed: SyntaxError: Unexpected token (46:4)\\n\\n\\u001b[0m \\u001b[90m 44 | \\u001b[39m    \\u001b[36mconst\\u001b[39m instance \\u001b[33m=\\u001b[39m \\u001b[33mKevoreeInstanceLoader\\u001b[39m\\u001b[33m.\\u001b[39mrequire(\\u001b[36mthis\\u001b[39m\\u001b[33m.\\u001b[39mprops\\u001b[33m.\\u001b[39minstance\\u001b[33m.\\u001b[39mpath)\\u001b[33m;\\u001b[39m\\n \\u001b[90m 45 | \\u001b[39m    \\u001b[36mconst\\u001b[39m\\n\\u001b[31m\\u001b[1m>\\u001b[22m\\u001b[39m\\u001b[90m 46 | \\u001b[39m    \\u001b[36mconst\\u001b[39m { name\\u001b[33m,\\u001b[39m version } \\u001b[33m=\\u001b[39m \\u001b[36mthis\\u001b[39m\\u001b[33m.\\u001b[39mprops\\u001b[33m.\\u001b[39minstance\\u001b[33m.\\u001b[39mgetModelEntity()\\u001b[33m.\\u001b[39mtypeDefinition\\u001b[33m;\\u001b[39m\\n \\u001b[90m    | \\u001b[39m    \\u001b[31m\\u001b[1m^\\u001b[22m\\u001b[39m\\n \\u001b[90m 47 | \\u001b[39m\\n \\u001b[90m 48 | \\u001b[39m    \\u001b[36mreturn\\u001b[39m (\\n \\u001b[90m 49 | \\u001b[39m      \\u001b[33m<\\u001b[39m\\u001b[33mdiv\\u001b[39m className\\u001b[33m=\\u001b[39m\\u001b[32m\\\"tile-container\\\"\\u001b[39m\\u001b[33m>\\u001b[39m\\u001b[0m\\n\");//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjMwLmpzIiwic291cmNlcyI6W10sIm1hcHBpbmdzIjoiIiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///230\n");

/***/ }),

/***/ 231:
false,

/***/ 43:
false,

/***/ 73:
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(4);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(5);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_tiny_conf__ = __webpack_require__(11);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_tiny_conf___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_tiny_conf__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_kevoree_kevscript__ = __webpack_require__(74);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_kevoree_kevscript___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_kevoree_kevscript__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_kevoree_core__ = __webpack_require__(209);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_kevoree_core___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_kevoree_core__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_kevoree_library__ = __webpack_require__(6);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_kevoree_library___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_kevoree_library__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__lib_logger_factory__ = __webpack_require__(66);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__lib_Resolver__ = __webpack_require__(211);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__lib_InstanceLoader__ = __webpack_require__(213);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__Collapsable__ = __webpack_require__(214);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__Error__ = __webpack_require__(45);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__Description__ = __webpack_require__(217);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__Dictionary__ = __webpack_require__(219);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__Inputs__ = __webpack_require__(222);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_14__Outputs__ = __webpack_require__(226);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_15__Tile__ = __webpack_require__(230);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_15__Tile___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_15__Tile__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_16__lib_model_helper__ = __webpack_require__(23);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_17__app_css__ = __webpack_require__(232);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_17__app_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_17__app_css__);\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nconst INSTANCE_NAME = 'comp';\n\nclass App extends __WEBPACK_IMPORTED_MODULE_0_react___default.a.Component {\n\n  constructor(props) {\n    super(props);\n    __WEBPACK_IMPORTED_MODULE_2_tiny_conf___default.a.set('registry', {\n      host: 'registry.kevoree.org',\n      port: 443,\n      ssl: true\n    });\n    this.logger = __WEBPACK_IMPORTED_MODULE_6__lib_logger_factory__[\"a\" /* default */].create('Kevoree Browser Tester');\n    this.resolver = new __WEBPACK_IMPORTED_MODULE_7__lib_Resolver__[\"a\" /* default */](this.props.model.packages[0].deployUnits[0].hashcode);\n    this.kevs = new __WEBPACK_IMPORTED_MODULE_3_kevoree_kevscript___default.a(__WEBPACK_IMPORTED_MODULE_6__lib_logger_factory__[\"a\" /* default */].create('KevScript'));\n    this.core = new __WEBPACK_IMPORTED_MODULE_4_kevoree_core___default.a(this.resolver, this.kevs, __WEBPACK_IMPORTED_MODULE_6__lib_logger_factory__[\"a\" /* default */]);\n    this.factory = new __WEBPACK_IMPORTED_MODULE_5_kevoree_library___default.a.factory.DefaultKevoreeFactory();\n\n    this.state = {\n      instance: null\n    };\n  }\n\n  componentDidMount() {\n    const loader = this.factory.createJSONLoader();\n    const kevlib = loader.loadModelFromString(JSON.stringify(this.props.model)).get(0);\n\n    this.core.start('node0');\n    this.kevs.parse(this.props.script, kevlib).then(({ model }) => {\n      return this.core.deploy(model);\n    }).catch(error => {\n      this.setState({ error });\n    });\n\n    this.core.on('deployed', () => {\n      const currentKeys = Object.keys(this.core.nodeInstance.adaptationEngine.modelObjMapper.map);\n      const registeredKeys = Object.keys(__WEBPACK_IMPORTED_MODULE_8__lib_InstanceLoader__[\"a\" /* default */].getInstances());\n\n      currentKeys.forEach(key => {\n        const instance = this.core.nodeInstance.adaptationEngine.modelObjMapper.map[key];\n        if (instance && typeof instance.uiFactory === 'function') {\n          if (!__WEBPACK_IMPORTED_MODULE_8__lib_InstanceLoader__[\"a\" /* default */].has(key)) {\n            __WEBPACK_IMPORTED_MODULE_8__lib_InstanceLoader__[\"a\" /* default */].register(key, instance);\n            if (instance.name === INSTANCE_NAME) {\n              this.setState({ instance });\n              document.title = `${instance.getModelEntity().typeDefinition.name} - Kevoree Browser Tester`;\n            }\n          }\n        }\n      });\n\n      for (let i = 0; i < registeredKeys.length; i++) {\n        const hasKey = currentKeys.find(key => registeredKeys[i] === key);\n        if (!hasKey) {\n          // clean removed instance\n          __WEBPACK_IMPORTED_MODULE_8__lib_InstanceLoader__[\"a\" /* default */].remove(registeredKeys[i]);\n        }\n      }\n    });\n\n    this.core.on('error', error => {\n      this.setState({ error });\n    });\n  }\n\n  render() {\n    if (this.state.error) {\n      return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n        'div',\n        { className: 'container' },\n        __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n          'div',\n          { className: 'header' },\n          __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n            'h2',\n            null,\n            'Kevoree Browser Tester'\n          )\n        ),\n        __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_10__Error__[\"a\" /* default */], { error: this.state.error })\n      );\n    } else {\n      if (this.state.instance) {\n        const modelInstance = this.state.instance.getModelEntity();\n        const tdef = modelInstance.typeDefinition;\n        const inputs = tdef.provided.array;\n        const outputs = tdef.required.array;\n\n        return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n          'div',\n          { className: 'container' },\n          __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n            'div',\n            { className: 'header' },\n            __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n              'h2',\n              null,\n              'Kevoree Browser Tester'\n            )\n          ),\n          __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n            'div',\n            { className: 'content' },\n            __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n              'div',\n              { className: 'left' },\n              __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n                'div',\n                { className: 'panel' },\n                __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n                  __WEBPACK_IMPORTED_MODULE_9__Collapsable__[\"a\" /* default */],\n                  { title: Object(__WEBPACK_IMPORTED_MODULE_16__lib_model_helper__[\"a\" /* getType */])(tdef.metaClassName()) },\n                  __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_11__Description__[\"a\" /* default */], { instance: this.state.instance })\n                ),\n                __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n                  __WEBPACK_IMPORTED_MODULE_9__Collapsable__[\"a\" /* default */],\n                  { title: 'Parameters' },\n                  __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_12__Dictionary__[\"a\" /* default */], { instance: this.state.instance })\n                ),\n                __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n                  __WEBPACK_IMPORTED_MODULE_9__Collapsable__[\"a\" /* default */],\n                  { title: 'Inputs' },\n                  __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_13__Inputs__[\"a\" /* default */], { inputs: inputs, instance: this.state.instance })\n                )\n              )\n            ),\n            __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n              'div',\n              { className: 'right' },\n              __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n                'div',\n                { className: 'panel' },\n                __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n                  __WEBPACK_IMPORTED_MODULE_9__Collapsable__[\"a\" /* default */],\n                  { title: 'Tile', style: { flex: '1 0 auto' } },\n                  __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n                    'div',\n                    { className: 'outer-container' },\n                    __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n                      'div',\n                      { className: 'inner-container' },\n                      __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_15__Tile__[\"default\"], { instance: this.state.instance })\n                    )\n                  )\n                ),\n                __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n                  __WEBPACK_IMPORTED_MODULE_9__Collapsable__[\"a\" /* default */],\n                  { title: 'Outputs', style: { flex: '100' } },\n                  __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_14__Outputs__[\"a\" /* default */], { outputs: outputs, instance: this.state.instance })\n                )\n              )\n            )\n          )\n        );\n      } else {\n        return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n          'div',\n          { className: 'loading' },\n          __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n            'strong',\n            null,\n            'Loading...'\n          )\n        );\n      }\n    }\n  }\n}\n/* harmony export (immutable) */ __webpack_exports__[\"a\"] = App;\n\n\nApp.propTypes = {\n  model: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.object,\n  script: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string\n};//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64, \n//# sourceURL=webpack-internal:///73\n");

/***/ })

})