@abi-software/simulationvuer 0.4.4 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/simulationvuer.common.js +1047 -227
- package/dist/simulationvuer.common.js.map +1 -1
- package/dist/simulationvuer.css +1 -1
- package/dist/simulationvuer.umd.js +1047 -227
- package/dist/simulationvuer.umd.js.map +1 -1
- package/dist/simulationvuer.umd.min.js +1 -1
- package/dist/simulationvuer.umd.min.js.map +1 -1
- package/package.json +3 -2
- package/src/.DS_Store +0 -0
- package/src/App.vue +6 -4
- package/src/components/SimulationVuer.vue +138 -200
- package/src/components/common.js +29 -0
- package/src/components/configuration.js +139 -0
- package/src/components/json.js +373 -0
- package/src/components/ui.js +273 -0
- package/vue.config.js +2 -1
|
@@ -96,73 +96,80 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
|
96
96
|
/************************************************************************/
|
|
97
97
|
/******/ ({
|
|
98
98
|
|
|
99
|
-
/***/ "
|
|
99
|
+
/***/ "020d":
|
|
100
100
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
101
101
|
|
|
102
102
|
"use strict";
|
|
103
|
-
/* harmony import */ var
|
|
104
|
-
/* harmony import */ var
|
|
103
|
+
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_button_css_vue_type_style_index_2_id_3e94221a_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("dccf");
|
|
104
|
+
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_button_css_vue_type_style_index_2_id_3e94221a_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_button_css_vue_type_style_index_2_id_3e94221a_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__);
|
|
105
105
|
/* unused harmony reexport * */
|
|
106
106
|
|
|
107
107
|
|
|
108
108
|
/***/ }),
|
|
109
109
|
|
|
110
|
-
/***/ "
|
|
111
|
-
/***/ (function(module, exports
|
|
112
|
-
|
|
113
|
-
// extracted by mini-css-extract-plugin
|
|
114
|
-
|
|
115
|
-
/***/ }),
|
|
116
|
-
|
|
117
|
-
/***/ "30f9":
|
|
118
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
110
|
+
/***/ "13e3":
|
|
111
|
+
/***/ (function(module, exports) {
|
|
119
112
|
|
|
120
|
-
|
|
113
|
+
module.exports = require("core-js/modules/web.dom-collections.for-each.js");
|
|
121
114
|
|
|
122
115
|
/***/ }),
|
|
123
116
|
|
|
124
|
-
/***/ "
|
|
117
|
+
/***/ "1e1f":
|
|
125
118
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
126
119
|
|
|
127
120
|
"use strict";
|
|
128
|
-
/* harmony import */ var
|
|
129
|
-
/* harmony import */ var
|
|
121
|
+
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_container_css_vue_type_style_index_3_id_3e94221a_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("df2b");
|
|
122
|
+
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_container_css_vue_type_style_index_3_id_3e94221a_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_container_css_vue_type_style_index_3_id_3e94221a_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__);
|
|
130
123
|
/* unused harmony reexport * */
|
|
131
124
|
|
|
132
125
|
|
|
133
126
|
/***/ }),
|
|
134
127
|
|
|
135
|
-
/***/ "
|
|
128
|
+
/***/ "30df":
|
|
136
129
|
/***/ (function(module, exports) {
|
|
137
130
|
|
|
138
|
-
module.exports = require("core-js/modules/es.
|
|
131
|
+
module.exports = require("core-js/modules/es.regexp.to-string.js");
|
|
139
132
|
|
|
140
133
|
/***/ }),
|
|
141
134
|
|
|
142
|
-
/***/ "
|
|
135
|
+
/***/ "379f":
|
|
136
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
137
|
+
|
|
138
|
+
// extracted by mini-css-extract-plugin
|
|
139
|
+
|
|
140
|
+
/***/ }),
|
|
141
|
+
|
|
142
|
+
/***/ "4391":
|
|
143
143
|
/***/ (function(module, exports) {
|
|
144
144
|
|
|
145
|
-
module.exports = require("core-js/modules/es.
|
|
145
|
+
module.exports = require("core-js/modules/es.array.map.js");
|
|
146
146
|
|
|
147
147
|
/***/ }),
|
|
148
148
|
|
|
149
|
-
/***/ "
|
|
149
|
+
/***/ "47b7":
|
|
150
150
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
151
151
|
|
|
152
152
|
"use strict";
|
|
153
|
-
/* harmony import */ var
|
|
154
|
-
/* harmony import */ var
|
|
153
|
+
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_SimulationVuer_vue_vue_type_style_index_0_id_3e94221a_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("aaaf");
|
|
154
|
+
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_SimulationVuer_vue_vue_type_style_index_0_id_3e94221a_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_SimulationVuer_vue_vue_type_style_index_0_id_3e94221a_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__);
|
|
155
155
|
/* unused harmony reexport * */
|
|
156
156
|
|
|
157
157
|
|
|
158
158
|
/***/ }),
|
|
159
159
|
|
|
160
|
-
/***/ "
|
|
160
|
+
/***/ "4933":
|
|
161
|
+
/***/ (function(module, exports) {
|
|
162
|
+
|
|
163
|
+
module.exports = require("core-js/modules/es.symbol.description.js");
|
|
164
|
+
|
|
165
|
+
/***/ }),
|
|
166
|
+
|
|
167
|
+
/***/ "5b43":
|
|
161
168
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
162
169
|
|
|
163
170
|
"use strict";
|
|
164
|
-
/* harmony import */ var
|
|
165
|
-
/* harmony import */ var
|
|
171
|
+
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_select_css_vue_type_style_index_6_id_3e94221a_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("660d");
|
|
172
|
+
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_select_css_vue_type_style_index_6_id_3e94221a_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_select_css_vue_type_style_index_6_id_3e94221a_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__);
|
|
166
173
|
/* unused harmony reexport * */
|
|
167
174
|
|
|
168
175
|
|
|
@@ -175,29 +182,50 @@ module.exports = require("element-ui");
|
|
|
175
182
|
|
|
176
183
|
/***/ }),
|
|
177
184
|
|
|
178
|
-
/***/ "
|
|
179
|
-
/***/ (function(module, exports
|
|
185
|
+
/***/ "6378":
|
|
186
|
+
/***/ (function(module, exports) {
|
|
180
187
|
|
|
181
|
-
|
|
188
|
+
module.exports = require("core-js/modules/es.string.replace.js");
|
|
182
189
|
|
|
183
190
|
/***/ }),
|
|
184
191
|
|
|
185
|
-
/***/ "
|
|
192
|
+
/***/ "660d":
|
|
186
193
|
/***/ (function(module, exports, __webpack_require__) {
|
|
187
194
|
|
|
188
195
|
// extracted by mini-css-extract-plugin
|
|
189
196
|
|
|
190
197
|
/***/ }),
|
|
191
198
|
|
|
192
|
-
/***/ "
|
|
199
|
+
/***/ "7a96":
|
|
193
200
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
194
201
|
|
|
195
202
|
"use strict";
|
|
196
|
-
/* harmony import */ var
|
|
197
|
-
/* harmony import */ var
|
|
203
|
+
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_slider_css_vue_type_style_index_7_id_3e94221a_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("da9e");
|
|
204
|
+
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_slider_css_vue_type_style_index_7_id_3e94221a_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_slider_css_vue_type_style_index_7_id_3e94221a_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__);
|
|
198
205
|
/* unused harmony reexport * */
|
|
199
206
|
|
|
200
207
|
|
|
208
|
+
/***/ }),
|
|
209
|
+
|
|
210
|
+
/***/ "8518":
|
|
211
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
212
|
+
|
|
213
|
+
// extracted by mini-css-extract-plugin
|
|
214
|
+
|
|
215
|
+
/***/ }),
|
|
216
|
+
|
|
217
|
+
/***/ "85f7":
|
|
218
|
+
/***/ (function(module, exports) {
|
|
219
|
+
|
|
220
|
+
module.exports = require("core-js/modules/es.array.includes.js");
|
|
221
|
+
|
|
222
|
+
/***/ }),
|
|
223
|
+
|
|
224
|
+
/***/ "86d1":
|
|
225
|
+
/***/ (function(module, exports) {
|
|
226
|
+
|
|
227
|
+
module.exports = require("core-js/modules/es.regexp.constructor.js");
|
|
228
|
+
|
|
201
229
|
/***/ }),
|
|
202
230
|
|
|
203
231
|
/***/ "8bbf":
|
|
@@ -207,24 +235,28 @@ module.exports = require("vue");
|
|
|
207
235
|
|
|
208
236
|
/***/ }),
|
|
209
237
|
|
|
210
|
-
/***/ "
|
|
238
|
+
/***/ "8f10":
|
|
211
239
|
/***/ (function(module, exports, __webpack_require__) {
|
|
212
240
|
|
|
213
241
|
// extracted by mini-css-extract-plugin
|
|
214
242
|
|
|
215
243
|
/***/ }),
|
|
216
244
|
|
|
217
|
-
/***/ "
|
|
218
|
-
/***/ (function(module,
|
|
245
|
+
/***/ "9043":
|
|
246
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
247
|
+
|
|
248
|
+
"use strict";
|
|
249
|
+
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_input_number_css_vue_type_style_index_4_id_3e94221a_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8518");
|
|
250
|
+
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_input_number_css_vue_type_style_index_4_id_3e94221a_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_input_number_css_vue_type_style_index_4_id_3e94221a_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__);
|
|
251
|
+
/* unused harmony reexport * */
|
|
219
252
|
|
|
220
|
-
// extracted by mini-css-extract-plugin
|
|
221
253
|
|
|
222
254
|
/***/ }),
|
|
223
255
|
|
|
224
|
-
/***/ "
|
|
225
|
-
/***/ (function(module, exports
|
|
256
|
+
/***/ "97d3":
|
|
257
|
+
/***/ (function(module, exports) {
|
|
226
258
|
|
|
227
|
-
|
|
259
|
+
module.exports = require("core-js/modules/es.object.to-string.js");
|
|
228
260
|
|
|
229
261
|
/***/ }),
|
|
230
262
|
|
|
@@ -242,34 +274,51 @@ module.exports = require("@soda/get-current-script");
|
|
|
242
274
|
|
|
243
275
|
/***/ }),
|
|
244
276
|
|
|
245
|
-
/***/ "
|
|
246
|
-
/***/ (function(module,
|
|
277
|
+
/***/ "9e9d":
|
|
278
|
+
/***/ (function(module, exports) {
|
|
247
279
|
|
|
248
|
-
|
|
249
|
-
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_slider_css_vue_type_style_index_7_id_0727c9cb_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("eb37");
|
|
250
|
-
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_slider_css_vue_type_style_index_7_id_0727c9cb_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_slider_css_vue_type_style_index_7_id_0727c9cb_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__);
|
|
251
|
-
/* unused harmony reexport * */
|
|
280
|
+
module.exports = require("jsonschema");
|
|
252
281
|
|
|
282
|
+
/***/ }),
|
|
283
|
+
|
|
284
|
+
/***/ "aaaf":
|
|
285
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
286
|
+
|
|
287
|
+
// extracted by mini-css-extract-plugin
|
|
288
|
+
|
|
289
|
+
/***/ }),
|
|
290
|
+
|
|
291
|
+
/***/ "be94":
|
|
292
|
+
/***/ (function(module, exports) {
|
|
293
|
+
|
|
294
|
+
module.exports = require("core-js/modules/es.array.join.js");
|
|
253
295
|
|
|
254
296
|
/***/ }),
|
|
255
297
|
|
|
256
|
-
/***/ "
|
|
298
|
+
/***/ "c8a6":
|
|
299
|
+
/***/ (function(module, exports) {
|
|
300
|
+
|
|
301
|
+
module.exports = require("core-js/modules/es.regexp.exec.js");
|
|
302
|
+
|
|
303
|
+
/***/ }),
|
|
304
|
+
|
|
305
|
+
/***/ "c9af":
|
|
257
306
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
258
307
|
|
|
259
308
|
"use strict";
|
|
260
|
-
/* harmony import */ var
|
|
261
|
-
/* harmony import */ var
|
|
309
|
+
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_option_css_vue_type_style_index_5_id_3e94221a_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("8f10");
|
|
310
|
+
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_option_css_vue_type_style_index_5_id_3e94221a_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_option_css_vue_type_style_index_5_id_3e94221a_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__);
|
|
262
311
|
/* unused harmony reexport * */
|
|
263
312
|
|
|
264
313
|
|
|
265
314
|
/***/ }),
|
|
266
315
|
|
|
267
|
-
/***/ "
|
|
316
|
+
/***/ "d7fe":
|
|
268
317
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
269
318
|
|
|
270
319
|
"use strict";
|
|
271
|
-
/* harmony import */ var
|
|
272
|
-
/* harmony import */ var
|
|
320
|
+
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_aside_css_vue_type_style_index_1_id_3e94221a_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("379f");
|
|
321
|
+
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_aside_css_vue_type_style_index_1_id_3e94221a_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_aside_css_vue_type_style_index_1_id_3e94221a_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__);
|
|
273
322
|
/* unused harmony reexport * */
|
|
274
323
|
|
|
275
324
|
|
|
@@ -282,6 +331,13 @@ module.exports = require("@abi-software/plotvuer/dist/plotvuer.css");
|
|
|
282
331
|
|
|
283
332
|
/***/ }),
|
|
284
333
|
|
|
334
|
+
/***/ "da9e":
|
|
335
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
336
|
+
|
|
337
|
+
// extracted by mini-css-extract-plugin
|
|
338
|
+
|
|
339
|
+
/***/ }),
|
|
340
|
+
|
|
285
341
|
/***/ "db0a":
|
|
286
342
|
/***/ (function(module, exports) {
|
|
287
343
|
|
|
@@ -289,13 +345,27 @@ module.exports = require("core-js/modules/es.function.name.js");
|
|
|
289
345
|
|
|
290
346
|
/***/ }),
|
|
291
347
|
|
|
292
|
-
/***/ "
|
|
348
|
+
/***/ "dccf":
|
|
293
349
|
/***/ (function(module, exports, __webpack_require__) {
|
|
294
350
|
|
|
295
351
|
// extracted by mini-css-extract-plugin
|
|
296
352
|
|
|
297
353
|
/***/ }),
|
|
298
354
|
|
|
355
|
+
/***/ "df2b":
|
|
356
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
357
|
+
|
|
358
|
+
// extracted by mini-css-extract-plugin
|
|
359
|
+
|
|
360
|
+
/***/ }),
|
|
361
|
+
|
|
362
|
+
/***/ "ea64":
|
|
363
|
+
/***/ (function(module, exports) {
|
|
364
|
+
|
|
365
|
+
module.exports = require("core-js/modules/es.object.keys.js");
|
|
366
|
+
|
|
367
|
+
/***/ }),
|
|
368
|
+
|
|
299
369
|
/***/ "f164":
|
|
300
370
|
/***/ (function(module, exports) {
|
|
301
371
|
|
|
@@ -303,6 +373,13 @@ module.exports = require("@abi-software/plotvuer");
|
|
|
303
373
|
|
|
304
374
|
/***/ }),
|
|
305
375
|
|
|
376
|
+
/***/ "f989":
|
|
377
|
+
/***/ (function(module, exports) {
|
|
378
|
+
|
|
379
|
+
module.exports = require("core-js/modules/es.number.constructor.js");
|
|
380
|
+
|
|
381
|
+
/***/ }),
|
|
382
|
+
|
|
306
383
|
/***/ "fae3":
|
|
307
384
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
308
385
|
|
|
@@ -337,25 +414,28 @@ if (typeof window !== 'undefined') {
|
|
|
337
414
|
// Indicate to webpack that this file can be concatenated
|
|
338
415
|
/* harmony default export */ var setPublicPath = (null);
|
|
339
416
|
|
|
340
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"
|
|
341
|
-
var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{directives:[{name:"loading",rawName:"v-loading",value:(_vm.simulationBeingComputed),expression:"simulationBeingComputed"}],staticClass:"simulation-vuer",attrs:{"element-loading-text":
|
|
417
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"143c7da7-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/SimulationVuer.vue?vue&type=template&id=3e94221a&scoped=true&
|
|
418
|
+
var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{directives:[{name:"loading",rawName:"v-loading",value:(_vm.simulationBeingComputed),expression:"simulationBeingComputed"}],staticClass:"simulation-vuer",attrs:{"element-loading-text":"Loading simulation results..."}},[(!_vm.hasValidJson)?_c('p',{staticClass:"default error"},[_c('span',{staticClass:"error"},[_vm._v("Error:")]),_vm._v(" an unknown or invalid model was provided.")]):_vm._e(),(_vm.hasValidJson)?_c('div',{staticClass:"main"},[_c('div',{staticClass:"main-left"},[_c('p',{staticClass:"default title"},[_vm._v(_vm._s(_vm.title))]),_c('el-divider'),_c('p',{staticClass:"default input-parameters"},[_vm._v("Input parameters")]),_c('div',{ref:"input"}),_c('div',{staticClass:"primary-button"},[_c('el-button',{attrs:{"type":"primary","size":"mini"},on:{"click":function($event){return _vm.runSimulation()}}},[_vm._v("Run simulation")])],1),_c('div',{staticClass:"secondary-button"},[_c('el-button',{attrs:{"size":"mini"},on:{"click":function($event){return _vm.goToOsparc()}}},[_vm._v("Go to oSPARC")])],1),_c('div',{staticClass:"secondary-button"},[_c('el-button',{attrs:{"size":"mini"},on:{"click":function($event){return _vm.viewDataset()}}},[_vm._v("View dataset")])],1),_c('p',{staticClass:"default note"},[_vm._v("Additional parameters are available on oSPARC")])],1),_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.simulationValid),expression:"simulationValid"}],ref:"output",staticClass:"main-right"},_vm._l((_vm.json.output.plots),function(outputPlot,index){return _c('PlotVuer',{key:("output-" + index),attrs:{"layout-input":_vm.layout[index],"dataInput":_vm.simulationData[index],"plotType":'plotly-only'}})}),1),_c('div',{directives:[{name:"show",rawName:"v-show",value:(!_vm.simulationValid),expression:"!simulationValid"}],staticClass:"main-right"},[_c('p',{staticClass:"default error"},[_c('span',{staticClass:"error"},[_vm._v("Error:")]),_vm._v(" "),_c('span',{domProps:{"innerHTML":_vm._s(_vm.errorMessage)}}),_vm._v(".")])])]):_vm._e()])}
|
|
342
419
|
var staticRenderFns = []
|
|
343
420
|
|
|
344
421
|
|
|
345
|
-
// CONCATENATED MODULE: ./src/components/SimulationVuer.vue?vue&type=template&id=
|
|
422
|
+
// CONCATENATED MODULE: ./src/components/SimulationVuer.vue?vue&type=template&id=3e94221a&scoped=true&
|
|
346
423
|
|
|
347
424
|
// EXTERNAL MODULE: external "core-js/modules/es.function.name.js"
|
|
348
425
|
var es_function_name_js_ = __webpack_require__("db0a");
|
|
349
426
|
|
|
427
|
+
// EXTERNAL MODULE: external "core-js/modules/web.dom-collections.for-each.js"
|
|
428
|
+
var web_dom_collections_for_each_js_ = __webpack_require__("13e3");
|
|
429
|
+
|
|
430
|
+
// EXTERNAL MODULE: external "core-js/modules/es.object.keys.js"
|
|
431
|
+
var es_object_keys_js_ = __webpack_require__("ea64");
|
|
432
|
+
|
|
350
433
|
// EXTERNAL MODULE: external "core-js/modules/es.symbol.js"
|
|
351
434
|
var es_symbol_js_ = __webpack_require__("9b22");
|
|
352
435
|
|
|
353
436
|
// EXTERNAL MODULE: external "core-js/modules/es.symbol.description.js"
|
|
354
437
|
var es_symbol_description_js_ = __webpack_require__("4933");
|
|
355
438
|
|
|
356
|
-
// EXTERNAL MODULE: external "core-js/modules/es.array.map.js"
|
|
357
|
-
var es_array_map_js_ = __webpack_require__("4391");
|
|
358
|
-
|
|
359
439
|
// EXTERNAL MODULE: external "vue"
|
|
360
440
|
var external_vue_ = __webpack_require__("8bbf");
|
|
361
441
|
var external_vue_default = /*#__PURE__*/__webpack_require__.n(external_vue_);
|
|
@@ -369,11 +449,821 @@ var plotvuer_css_ = __webpack_require__("d856");
|
|
|
369
449
|
// EXTERNAL MODULE: external "element-ui"
|
|
370
450
|
var external_element_ui_ = __webpack_require__("5f72");
|
|
371
451
|
|
|
452
|
+
// CONCATENATED MODULE: ./src/components/configuration.js
|
|
453
|
+
function jsonForNormalModel() {
|
|
454
|
+
return {
|
|
455
|
+
input: [{
|
|
456
|
+
defaultValue: 0,
|
|
457
|
+
id: "sm",
|
|
458
|
+
name: "Simulation mode",
|
|
459
|
+
possibleValues: [{
|
|
460
|
+
name: "Normal sinus rhythm",
|
|
461
|
+
value: 0
|
|
462
|
+
}, {
|
|
463
|
+
name: "Stellate stimulation",
|
|
464
|
+
value: 1
|
|
465
|
+
}, {
|
|
466
|
+
name: "Vagal stimulation",
|
|
467
|
+
value: 2
|
|
468
|
+
}]
|
|
469
|
+
}, {
|
|
470
|
+
defaultValue: 0,
|
|
471
|
+
enabled: "(sm == 1) || (sm == 2)",
|
|
472
|
+
id: "sl",
|
|
473
|
+
maximumValue: 10,
|
|
474
|
+
minimumValue: 0,
|
|
475
|
+
name: "Stimulation level"
|
|
476
|
+
}],
|
|
477
|
+
output: {
|
|
478
|
+
data: [{
|
|
479
|
+
id: "time",
|
|
480
|
+
name: "environment/time"
|
|
481
|
+
}, {
|
|
482
|
+
id: "vm",
|
|
483
|
+
name: "Membrane/V"
|
|
484
|
+
}],
|
|
485
|
+
plots: [{
|
|
486
|
+
xAxisTitle: "Time (s)",
|
|
487
|
+
xValue: "time",
|
|
488
|
+
yAxisTitle: "Membrane potential (mV)",
|
|
489
|
+
yValue: "vm"
|
|
490
|
+
}]
|
|
491
|
+
},
|
|
492
|
+
parameters: [{
|
|
493
|
+
name: "Rate_modulation_experiments/Iso_1_uM",
|
|
494
|
+
value: "(sm == 0) ? 0.0 : 1.0"
|
|
495
|
+
}, {
|
|
496
|
+
name: "Rate_modulation_experiments/ACh",
|
|
497
|
+
value: "(sm == 0) ? 0.0 : (sm === 1) ? (1.0 - 0.1 * sl) * 22.0e-6 : 22.0e-6 + 0.1 * sl * (38.0e-6 - 22.0e-6)"
|
|
498
|
+
}],
|
|
499
|
+
simulation: {
|
|
500
|
+
endingPoint: 3.0,
|
|
501
|
+
pointInterval: 0.001
|
|
502
|
+
}
|
|
503
|
+
};
|
|
504
|
+
}
|
|
505
|
+
function jsonForCompositeModel() {
|
|
506
|
+
return {
|
|
507
|
+
input: [{
|
|
508
|
+
defaultValue: 300,
|
|
509
|
+
id: "sf",
|
|
510
|
+
maximumValue: 1000,
|
|
511
|
+
minimumValue: 0,
|
|
512
|
+
name: "Spike frequency"
|
|
513
|
+
}, {
|
|
514
|
+
defaultValue: 10,
|
|
515
|
+
id: "sn",
|
|
516
|
+
maximumValue: 30,
|
|
517
|
+
minimumValue: 0,
|
|
518
|
+
name: "Spike number"
|
|
519
|
+
}, {
|
|
520
|
+
defaultValue: 10,
|
|
521
|
+
id: "sa",
|
|
522
|
+
maximumValue: 30,
|
|
523
|
+
minimumValue: 0,
|
|
524
|
+
name: "Spike amplitude"
|
|
525
|
+
}],
|
|
526
|
+
output: {
|
|
527
|
+
data: [{
|
|
528
|
+
id: "sa",
|
|
529
|
+
name: "Brain_stem/w"
|
|
530
|
+
}, {
|
|
531
|
+
id: "time",
|
|
532
|
+
name: "environment/time"
|
|
533
|
+
}, {
|
|
534
|
+
id: "vm",
|
|
535
|
+
name: "Membrane/V"
|
|
536
|
+
}],
|
|
537
|
+
plots: [{
|
|
538
|
+
xAxisTitle: "Time (s)",
|
|
539
|
+
xValue: "time",
|
|
540
|
+
yAxisTitle: "Spike amplitude",
|
|
541
|
+
yValue: "100.0 * sa"
|
|
542
|
+
}, {
|
|
543
|
+
xAxisTitle: "Time (s)",
|
|
544
|
+
xValue: "time",
|
|
545
|
+
yAxisTitle: "Membrane potential (mV)",
|
|
546
|
+
yValue: "vm"
|
|
547
|
+
}]
|
|
548
|
+
},
|
|
549
|
+
parameters: [{
|
|
550
|
+
name: "Brain_stem/t_period",
|
|
551
|
+
value: "sf"
|
|
552
|
+
}, {
|
|
553
|
+
name: "Brain_stem/w_n",
|
|
554
|
+
value: "sn"
|
|
555
|
+
}, {
|
|
556
|
+
name: "Brain_stem/w_value",
|
|
557
|
+
value: "0.01 * sa"
|
|
558
|
+
}]
|
|
559
|
+
};
|
|
560
|
+
}
|
|
561
|
+
// EXTERNAL MODULE: external "core-js/modules/es.regexp.constructor.js"
|
|
562
|
+
var es_regexp_constructor_js_ = __webpack_require__("86d1");
|
|
563
|
+
|
|
564
|
+
// EXTERNAL MODULE: external "core-js/modules/es.regexp.exec.js"
|
|
565
|
+
var es_regexp_exec_js_ = __webpack_require__("c8a6");
|
|
566
|
+
|
|
567
|
+
// EXTERNAL MODULE: external "core-js/modules/es.regexp.to-string.js"
|
|
568
|
+
var es_regexp_to_string_js_ = __webpack_require__("30df");
|
|
569
|
+
|
|
570
|
+
// EXTERNAL MODULE: external "core-js/modules/es.string.replace.js"
|
|
571
|
+
var es_string_replace_js_ = __webpack_require__("6378");
|
|
572
|
+
|
|
573
|
+
// CONCATENATED MODULE: ./src/components/common.js
|
|
574
|
+
|
|
575
|
+
|
|
576
|
+
|
|
577
|
+
|
|
578
|
+
|
|
579
|
+
|
|
580
|
+
function doEvaluateValue(value, from, to) {
|
|
581
|
+
if (from !== undefined) {
|
|
582
|
+
var re = new RegExp("\\b".concat(from, "\\b"), 'g');
|
|
583
|
+
value = value.replace(re, to);
|
|
584
|
+
}
|
|
585
|
+
|
|
586
|
+
return value;
|
|
587
|
+
}
|
|
588
|
+
|
|
589
|
+
function evaluateValue(ui, value) {
|
|
590
|
+
ui.discreteElements.forEach(function (discreteElement) {
|
|
591
|
+
value = doEvaluateValue(value, discreteElement.id, discreteElement.select.vModel);
|
|
592
|
+
});
|
|
593
|
+
ui.scalarElements.forEach(function (scalarElement) {
|
|
594
|
+
value = doEvaluateValue(value, scalarElement.id, scalarElement.input_number.vModel);
|
|
595
|
+
});
|
|
596
|
+
return Function("return " + value + ";")();
|
|
597
|
+
}
|
|
598
|
+
function evaluateSimulationValue(parent, results, value, i) {
|
|
599
|
+
parent.json.output.data.forEach(function (data) {
|
|
600
|
+
value = doEvaluateValue(value, data.id, results[parent.simulationDataId[data.id]][i]);
|
|
601
|
+
});
|
|
602
|
+
return Function("return " + value + ";")();
|
|
603
|
+
}
|
|
604
|
+
// EXTERNAL MODULE: external "core-js/modules/es.object.to-string.js"
|
|
605
|
+
var es_object_to_string_js_ = __webpack_require__("97d3");
|
|
606
|
+
|
|
607
|
+
// EXTERNAL MODULE: external "core-js/modules/es.array.map.js"
|
|
608
|
+
var es_array_map_js_ = __webpack_require__("4391");
|
|
609
|
+
|
|
610
|
+
// EXTERNAL MODULE: external "core-js/modules/es.array.includes.js"
|
|
611
|
+
var es_array_includes_js_ = __webpack_require__("85f7");
|
|
612
|
+
|
|
613
|
+
// EXTERNAL MODULE: external "core-js/modules/es.string.includes.js"
|
|
614
|
+
var es_string_includes_js_ = __webpack_require__("fd22");
|
|
615
|
+
|
|
616
|
+
// EXTERNAL MODULE: external "core-js/modules/es.array.join.js"
|
|
617
|
+
var es_array_join_js_ = __webpack_require__("be94");
|
|
618
|
+
|
|
619
|
+
// EXTERNAL MODULE: external "jsonschema"
|
|
620
|
+
var external_jsonschema_ = __webpack_require__("9e9d");
|
|
621
|
+
|
|
622
|
+
// CONCATENATED MODULE: ./src/components/json.js
|
|
623
|
+
|
|
624
|
+
|
|
625
|
+
|
|
626
|
+
|
|
627
|
+
|
|
628
|
+
|
|
629
|
+
|
|
630
|
+
|
|
631
|
+
function validJson(json) {
|
|
632
|
+
// Check the JSON against our schema.
|
|
633
|
+
var validator = new external_jsonschema_["Validator"]();
|
|
634
|
+
var schema = {
|
|
635
|
+
additionalProperties: false,
|
|
636
|
+
properties: {
|
|
637
|
+
input: {
|
|
638
|
+
items: {
|
|
639
|
+
oneOf: [{
|
|
640
|
+
additionalProperties: false,
|
|
641
|
+
properties: {
|
|
642
|
+
defaultValue: {
|
|
643
|
+
required: true,
|
|
644
|
+
type: "number"
|
|
645
|
+
},
|
|
646
|
+
id: {
|
|
647
|
+
type: "string"
|
|
648
|
+
},
|
|
649
|
+
name: {
|
|
650
|
+
required: true,
|
|
651
|
+
type: "string"
|
|
652
|
+
},
|
|
653
|
+
possibleValues: {
|
|
654
|
+
items: {
|
|
655
|
+
additionalProperties: false,
|
|
656
|
+
properties: {
|
|
657
|
+
name: {
|
|
658
|
+
required: true,
|
|
659
|
+
type: "string"
|
|
660
|
+
},
|
|
661
|
+
value: {
|
|
662
|
+
required: true,
|
|
663
|
+
type: "number"
|
|
664
|
+
}
|
|
665
|
+
},
|
|
666
|
+
type: "object"
|
|
667
|
+
},
|
|
668
|
+
minItems: 1,
|
|
669
|
+
required: true,
|
|
670
|
+
type: "array"
|
|
671
|
+
}
|
|
672
|
+
}
|
|
673
|
+
}, {
|
|
674
|
+
additionalProperties: false,
|
|
675
|
+
properties: {
|
|
676
|
+
defaultValue: {
|
|
677
|
+
required: true,
|
|
678
|
+
type: "number"
|
|
679
|
+
},
|
|
680
|
+
enabled: {
|
|
681
|
+
type: "string"
|
|
682
|
+
},
|
|
683
|
+
id: {
|
|
684
|
+
type: "string"
|
|
685
|
+
},
|
|
686
|
+
maximumValue: {
|
|
687
|
+
required: true,
|
|
688
|
+
type: "number"
|
|
689
|
+
},
|
|
690
|
+
minimumValue: {
|
|
691
|
+
required: true,
|
|
692
|
+
type: "number"
|
|
693
|
+
},
|
|
694
|
+
name: {
|
|
695
|
+
required: true,
|
|
696
|
+
type: "string"
|
|
697
|
+
}
|
|
698
|
+
}
|
|
699
|
+
}],
|
|
700
|
+
type: "object"
|
|
701
|
+
},
|
|
702
|
+
minItems: 1,
|
|
703
|
+
type: "array"
|
|
704
|
+
},
|
|
705
|
+
output: {
|
|
706
|
+
additionalProperties: false,
|
|
707
|
+
properties: {
|
|
708
|
+
data: {
|
|
709
|
+
items: {
|
|
710
|
+
additionalProperties: false,
|
|
711
|
+
properties: {
|
|
712
|
+
id: {
|
|
713
|
+
type: "string"
|
|
714
|
+
},
|
|
715
|
+
name: {
|
|
716
|
+
required: true,
|
|
717
|
+
type: "string"
|
|
718
|
+
}
|
|
719
|
+
},
|
|
720
|
+
type: "object"
|
|
721
|
+
},
|
|
722
|
+
type: "array"
|
|
723
|
+
},
|
|
724
|
+
plots: {
|
|
725
|
+
items: {
|
|
726
|
+
additionalProperties: false,
|
|
727
|
+
properties: {
|
|
728
|
+
xAxisTitle: {
|
|
729
|
+
required: true,
|
|
730
|
+
type: "string"
|
|
731
|
+
},
|
|
732
|
+
xValue: {
|
|
733
|
+
required: true,
|
|
734
|
+
type: "string"
|
|
735
|
+
},
|
|
736
|
+
yAxisTitle: {
|
|
737
|
+
required: true,
|
|
738
|
+
type: "string"
|
|
739
|
+
},
|
|
740
|
+
yValue: {
|
|
741
|
+
required: true,
|
|
742
|
+
type: "string"
|
|
743
|
+
}
|
|
744
|
+
},
|
|
745
|
+
type: "object"
|
|
746
|
+
},
|
|
747
|
+
maxItems: 9,
|
|
748
|
+
minItems: 1,
|
|
749
|
+
required: true,
|
|
750
|
+
type: "array"
|
|
751
|
+
}
|
|
752
|
+
},
|
|
753
|
+
required: true,
|
|
754
|
+
type: "object"
|
|
755
|
+
},
|
|
756
|
+
parameters: {
|
|
757
|
+
items: {
|
|
758
|
+
additionalProperties: false,
|
|
759
|
+
properties: {
|
|
760
|
+
name: {
|
|
761
|
+
required: true,
|
|
762
|
+
type: "string"
|
|
763
|
+
},
|
|
764
|
+
value: {
|
|
765
|
+
required: true,
|
|
766
|
+
type: "string"
|
|
767
|
+
}
|
|
768
|
+
},
|
|
769
|
+
type: "object"
|
|
770
|
+
},
|
|
771
|
+
type: "array"
|
|
772
|
+
},
|
|
773
|
+
simulation: {
|
|
774
|
+
additionalProperties: false,
|
|
775
|
+
properties: {
|
|
776
|
+
endingPoint: {
|
|
777
|
+
required: true,
|
|
778
|
+
type: "number"
|
|
779
|
+
},
|
|
780
|
+
pointInterval: {
|
|
781
|
+
required: true,
|
|
782
|
+
type: "number"
|
|
783
|
+
}
|
|
784
|
+
},
|
|
785
|
+
type: "object"
|
|
786
|
+
}
|
|
787
|
+
},
|
|
788
|
+
type: "object"
|
|
789
|
+
};
|
|
790
|
+
var result = validator.validate(json, schema, {
|
|
791
|
+
nestedErrors: true
|
|
792
|
+
});
|
|
793
|
+
|
|
794
|
+
if (!result.valid) {
|
|
795
|
+
console.warn(result.toString());
|
|
796
|
+
return false;
|
|
797
|
+
} // Make sure that the input information makes sense.
|
|
798
|
+
|
|
799
|
+
|
|
800
|
+
var inputIdUsed = [];
|
|
801
|
+
var inputValid = json.input.every(function (input) {
|
|
802
|
+
if (input.id !== undefined) {
|
|
803
|
+
if (input.id === "") {
|
|
804
|
+
console.warn("JSON: an input id must not be empty.");
|
|
805
|
+
return false;
|
|
806
|
+
}
|
|
807
|
+
|
|
808
|
+
if (inputIdUsed[input.id]) {
|
|
809
|
+
console.warn("JSON: an input id must be unique (" + input.id + " is used more than once).");
|
|
810
|
+
return false;
|
|
811
|
+
}
|
|
812
|
+
|
|
813
|
+
inputIdUsed[input.id] = true;
|
|
814
|
+
}
|
|
815
|
+
|
|
816
|
+
if (input.name === "") {
|
|
817
|
+
console.warn("JSON: an input name must not be empty.");
|
|
818
|
+
return false;
|
|
819
|
+
}
|
|
820
|
+
|
|
821
|
+
if (input.possibleValues !== undefined) {
|
|
822
|
+
if (!input.possibleValues.every(function (possibleValue) {
|
|
823
|
+
if (possibleValue.name === "") {
|
|
824
|
+
console.warn("JSON: an input possible value must not have an empty name.");
|
|
825
|
+
return false;
|
|
826
|
+
}
|
|
827
|
+
|
|
828
|
+
return true;
|
|
829
|
+
})) {
|
|
830
|
+
return false;
|
|
831
|
+
}
|
|
832
|
+
|
|
833
|
+
var values = input.possibleValues.map(function (value) {
|
|
834
|
+
return value.value;
|
|
835
|
+
});
|
|
836
|
+
var valueUsed = [];
|
|
837
|
+
|
|
838
|
+
if (!values.every(function (value) {
|
|
839
|
+
if (valueUsed[value]) {
|
|
840
|
+
console.warn("JSON: an input possible value must have a unique value (" + value + " is used more than once).");
|
|
841
|
+
return false;
|
|
842
|
+
}
|
|
843
|
+
|
|
844
|
+
valueUsed[value] = true;
|
|
845
|
+
return true;
|
|
846
|
+
})) {
|
|
847
|
+
return false;
|
|
848
|
+
}
|
|
849
|
+
|
|
850
|
+
if (!values.includes(input.defaultValue)) {
|
|
851
|
+
console.warn("JSON: the input default value (" + input.defaultValue + ") must be one of the possible values (" + values.join(", ") + ").");
|
|
852
|
+
return false;
|
|
853
|
+
}
|
|
854
|
+
}
|
|
855
|
+
|
|
856
|
+
if (input.enabled !== undefined) {
|
|
857
|
+
if (input.enabled === "") {
|
|
858
|
+
console.warn("JSON: an input enabled must not be empty.");
|
|
859
|
+
return false;
|
|
860
|
+
}
|
|
861
|
+
}
|
|
862
|
+
|
|
863
|
+
if (input.minimumValue !== undefined && input.maximumValue !== undefined) {
|
|
864
|
+
if (input.minimumValue >= input.maximumValue) {
|
|
865
|
+
console.warn("JSON: the input minimum value (" + input.minimumValue + ") must be lower than the maximum value (" + input.maximumValue + ").");
|
|
866
|
+
return false;
|
|
867
|
+
}
|
|
868
|
+
|
|
869
|
+
if (input.defaultValue < input.minimumValue || input.defaultValue > input.maximumValue) {
|
|
870
|
+
console.warn("JSON: the input default value (" + input.defaultValue + ") must be greater or equal to the minimum value (" + input.minimumValue + ") and lower or equal to the maximum value (" + input.maximumValue + ").");
|
|
871
|
+
return false;
|
|
872
|
+
}
|
|
873
|
+
}
|
|
874
|
+
|
|
875
|
+
return true;
|
|
876
|
+
});
|
|
877
|
+
|
|
878
|
+
if (!inputValid) {
|
|
879
|
+
return false;
|
|
880
|
+
} // Make sure that the output information makes sense.
|
|
881
|
+
|
|
882
|
+
|
|
883
|
+
var outputIdUsed = [];
|
|
884
|
+
var outputDataValid = json.output.data.every(function (outputData) {
|
|
885
|
+
if (outputData.id !== undefined) {
|
|
886
|
+
if (outputData.id === "") {
|
|
887
|
+
console.warn("JSON: an output data id must not be empty.");
|
|
888
|
+
return false;
|
|
889
|
+
}
|
|
890
|
+
|
|
891
|
+
if (outputIdUsed[outputData.id]) {
|
|
892
|
+
console.warn("JSON: an output data id must be unique (" + outputData.id + " is used more than once).");
|
|
893
|
+
return false;
|
|
894
|
+
}
|
|
895
|
+
|
|
896
|
+
outputIdUsed[outputData.id] = true;
|
|
897
|
+
}
|
|
898
|
+
|
|
899
|
+
if (outputData.name === "") {
|
|
900
|
+
console.warn("JSON: an output data name must not be empty.");
|
|
901
|
+
return false;
|
|
902
|
+
}
|
|
903
|
+
|
|
904
|
+
return true;
|
|
905
|
+
});
|
|
906
|
+
|
|
907
|
+
if (!outputDataValid) {
|
|
908
|
+
return false;
|
|
909
|
+
}
|
|
910
|
+
|
|
911
|
+
var outputPlotsValid = json.output.plots.every(function (outputPlot) {
|
|
912
|
+
if (outputPlot.xAxisTitle === "") {
|
|
913
|
+
console.warn("JSON: an output plot X axis title must not be empty.");
|
|
914
|
+
return false;
|
|
915
|
+
}
|
|
916
|
+
|
|
917
|
+
if (outputPlot.xValue === "") {
|
|
918
|
+
console.warn("JSON: an output plot X value must not be empty.");
|
|
919
|
+
return false;
|
|
920
|
+
}
|
|
921
|
+
|
|
922
|
+
if (outputPlot.yAxisTitle === "") {
|
|
923
|
+
console.warn("JSON: an output plot Y axis title must not be empty.");
|
|
924
|
+
return false;
|
|
925
|
+
}
|
|
926
|
+
|
|
927
|
+
if (outputPlot.yValue === "") {
|
|
928
|
+
console.warn("JSON: an output plot Y value must not be empty.");
|
|
929
|
+
return false;
|
|
930
|
+
}
|
|
931
|
+
|
|
932
|
+
return true;
|
|
933
|
+
});
|
|
934
|
+
|
|
935
|
+
if (!outputPlotsValid) {
|
|
936
|
+
return false;
|
|
937
|
+
} // Make sure that the parameters information makes sense.
|
|
938
|
+
|
|
939
|
+
|
|
940
|
+
var parametersValid = json.parameters.every(function (parameter) {
|
|
941
|
+
if (parameter.name === "") {
|
|
942
|
+
console.warn("JSON: a parameter name must not be empty.");
|
|
943
|
+
return false;
|
|
944
|
+
}
|
|
945
|
+
|
|
946
|
+
if (parameter.value === "") {
|
|
947
|
+
console.warn("JSON: a parameter value must not be empty.");
|
|
948
|
+
return false;
|
|
949
|
+
}
|
|
950
|
+
|
|
951
|
+
return true;
|
|
952
|
+
});
|
|
953
|
+
|
|
954
|
+
if (!parametersValid) {
|
|
955
|
+
return false;
|
|
956
|
+
} // Make sure that the simulation information makes sense.
|
|
957
|
+
|
|
958
|
+
|
|
959
|
+
if (json.simulation !== undefined) {
|
|
960
|
+
if (json.simulation.endingPoint <= 0.0) {
|
|
961
|
+
console.warn("JSON: a simulation ending point must be greater than zero.");
|
|
962
|
+
return false;
|
|
963
|
+
}
|
|
964
|
+
|
|
965
|
+
if (json.simulation.pointInterval <= 0.0) {
|
|
966
|
+
console.warn("JSON: a simulation point interval must be greater than zero.");
|
|
967
|
+
return false;
|
|
968
|
+
}
|
|
969
|
+
}
|
|
970
|
+
|
|
971
|
+
return true;
|
|
972
|
+
}
|
|
973
|
+
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js
|
|
974
|
+
function _classCallCheck(instance, Constructor) {
|
|
975
|
+
if (!(instance instanceof Constructor)) {
|
|
976
|
+
throw new TypeError("Cannot call a class as a function");
|
|
977
|
+
}
|
|
978
|
+
}
|
|
979
|
+
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/createClass.js
|
|
980
|
+
function _defineProperties(target, props) {
|
|
981
|
+
for (var i = 0; i < props.length; i++) {
|
|
982
|
+
var descriptor = props[i];
|
|
983
|
+
descriptor.enumerable = descriptor.enumerable || false;
|
|
984
|
+
descriptor.configurable = true;
|
|
985
|
+
if ("value" in descriptor) descriptor.writable = true;
|
|
986
|
+
Object.defineProperty(target, descriptor.key, descriptor);
|
|
987
|
+
}
|
|
988
|
+
}
|
|
989
|
+
|
|
990
|
+
function _createClass(Constructor, protoProps, staticProps) {
|
|
991
|
+
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
992
|
+
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
993
|
+
return Constructor;
|
|
994
|
+
}
|
|
995
|
+
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js
|
|
996
|
+
function _defineProperty(obj, key, value) {
|
|
997
|
+
if (key in obj) {
|
|
998
|
+
Object.defineProperty(obj, key, {
|
|
999
|
+
value: value,
|
|
1000
|
+
enumerable: true,
|
|
1001
|
+
configurable: true,
|
|
1002
|
+
writable: true
|
|
1003
|
+
});
|
|
1004
|
+
} else {
|
|
1005
|
+
obj[key] = value;
|
|
1006
|
+
}
|
|
1007
|
+
|
|
1008
|
+
return obj;
|
|
1009
|
+
}
|
|
1010
|
+
// EXTERNAL MODULE: external "core-js/modules/es.number.constructor.js"
|
|
1011
|
+
var es_number_constructor_js_ = __webpack_require__("f989");
|
|
1012
|
+
|
|
1013
|
+
// CONCATENATED MODULE: ./src/components/ui.js
|
|
1014
|
+
|
|
1015
|
+
|
|
1016
|
+
|
|
1017
|
+
|
|
1018
|
+
|
|
1019
|
+
|
|
1020
|
+
|
|
1021
|
+
|
|
1022
|
+
function prepareForUi(parent) {
|
|
1023
|
+
var index = -1;
|
|
1024
|
+
parent.json.output.data.forEach(function (data) {
|
|
1025
|
+
parent.simulationDataId[data.id] = data.name;
|
|
1026
|
+
});
|
|
1027
|
+
parent.json.output.plots.forEach(function (outputPlot) {
|
|
1028
|
+
++index;
|
|
1029
|
+
parent.layout[index] = {
|
|
1030
|
+
xaxis: {
|
|
1031
|
+
title: {
|
|
1032
|
+
text: outputPlot.xAxisTitle,
|
|
1033
|
+
font: {
|
|
1034
|
+
size: 10
|
|
1035
|
+
}
|
|
1036
|
+
}
|
|
1037
|
+
},
|
|
1038
|
+
yaxis: {
|
|
1039
|
+
title: {
|
|
1040
|
+
text: outputPlot.yAxisTitle,
|
|
1041
|
+
font: {
|
|
1042
|
+
size: 10
|
|
1043
|
+
}
|
|
1044
|
+
}
|
|
1045
|
+
}
|
|
1046
|
+
};
|
|
1047
|
+
parent.simulationData[index] = [{}];
|
|
1048
|
+
});
|
|
1049
|
+
}
|
|
1050
|
+
var VueContainer = external_vue_default.a.extend({
|
|
1051
|
+
template: "\n <div class=\"sliders-and-fields\"/>\n "
|
|
1052
|
+
});
|
|
1053
|
+
var VueInputNumber = external_vue_default.a.extend({
|
|
1054
|
+
methods: {
|
|
1055
|
+
emitSynchroniseSliderAndInputNumber: function emitSynchroniseSliderAndInputNumber(value) {
|
|
1056
|
+
this.$emit("synchroniseSliderAndInputNumber", this.index, value);
|
|
1057
|
+
}
|
|
1058
|
+
},
|
|
1059
|
+
props: {
|
|
1060
|
+
disabled: Boolean,
|
|
1061
|
+
index: Number,
|
|
1062
|
+
maximumValue: Number,
|
|
1063
|
+
minimumValue: Number,
|
|
1064
|
+
parent: Object,
|
|
1065
|
+
vModel: Number
|
|
1066
|
+
},
|
|
1067
|
+
template: "\n <el-input-number class=\"scalar\" size=\"mini\" v-model=\"vModel\" :controls=\"false\" :disabled=\"disabled\" :max=\"maximumValue\" :min=\"minimumValue\" @change=\"emitSynchroniseSliderAndInputNumber\" />\n "
|
|
1068
|
+
});
|
|
1069
|
+
var VueLabel = external_vue_default.a.extend({
|
|
1070
|
+
props: {
|
|
1071
|
+
classes: String,
|
|
1072
|
+
label: String
|
|
1073
|
+
},
|
|
1074
|
+
template: "\n <p :class=\"classes\">{{ label }}</p>\n "
|
|
1075
|
+
});
|
|
1076
|
+
var VueSelect = external_vue_default.a.extend({
|
|
1077
|
+
methods: {
|
|
1078
|
+
emitSelectionChanged: function emitSelectionChanged(value) {
|
|
1079
|
+
this.$emit("selectionChanged", this.index, value);
|
|
1080
|
+
}
|
|
1081
|
+
},
|
|
1082
|
+
props: {
|
|
1083
|
+
index: Number,
|
|
1084
|
+
parent: Object,
|
|
1085
|
+
possibleValues: Array,
|
|
1086
|
+
vModel: Number
|
|
1087
|
+
},
|
|
1088
|
+
template: "\n <el-select class=\"discrete\" popper-class=\"discrete-popper\" size=\"mini\" v-model=\"vModel\" :popper-append-to-body=\"false\" @change=\"emitSelectionChanged\">\n <el-option v-for=\"possibleValue in possibleValues\" :key=\"possibleValue.value\" :label=\"possibleValue.name\" :value=\"possibleValue.value\" />\n </el-select>\n "
|
|
1089
|
+
});
|
|
1090
|
+
var VueSlider = external_vue_default.a.extend({
|
|
1091
|
+
methods: {
|
|
1092
|
+
emitSynchroniseSliderAndInputNumber: function emitSynchroniseSliderAndInputNumber(value) {
|
|
1093
|
+
this.$emit("synchroniseSliderAndInputNumber", this.index, value);
|
|
1094
|
+
}
|
|
1095
|
+
},
|
|
1096
|
+
props: {
|
|
1097
|
+
disabled: Boolean,
|
|
1098
|
+
index: Number,
|
|
1099
|
+
maximumValue: Number,
|
|
1100
|
+
parent: Object,
|
|
1101
|
+
vModel: Number
|
|
1102
|
+
},
|
|
1103
|
+
template: "\n <el-slider v-model=\"vModel\" :disabled=\"disabled\" :max=\"maximumValue\" :show-input=\"false\" :show-tooltip=\"false\" @input=\"emitSynchroniseSliderAndInputNumber\" />\n "
|
|
1104
|
+
});
|
|
1105
|
+
|
|
1106
|
+
var ui_Ui = /*#__PURE__*/function () {
|
|
1107
|
+
function Ui(parent) {
|
|
1108
|
+
var _this = this;
|
|
1109
|
+
|
|
1110
|
+
_classCallCheck(this, Ui);
|
|
1111
|
+
|
|
1112
|
+
_defineProperty(this, "discreteElements", []);
|
|
1113
|
+
|
|
1114
|
+
_defineProperty(this, "scalarElements", []);
|
|
1115
|
+
|
|
1116
|
+
// Generate the UI for the input fields.
|
|
1117
|
+
var inputRoot = parent.$refs.input;
|
|
1118
|
+
var isPreviousDiscrete = true;
|
|
1119
|
+
var slidersAndFieldsContainer = undefined;
|
|
1120
|
+
var firstScalarInput = true;
|
|
1121
|
+
var discreteElementIndex = -1;
|
|
1122
|
+
var scalarElementIndex = -1;
|
|
1123
|
+
parent.json.input.forEach(function (input) {
|
|
1124
|
+
// Determine whether we are dealing with a discrete or a scalar input.
|
|
1125
|
+
var isDiscrete = input.possibleValues !== undefined; // Determine our element mode and create a container for our sliders and
|
|
1126
|
+
// input numbers, if needed.
|
|
1127
|
+
|
|
1128
|
+
if (!isDiscrete && isPreviousDiscrete) {
|
|
1129
|
+
slidersAndFieldsContainer = new VueContainer();
|
|
1130
|
+
|
|
1131
|
+
_this.addVueElement(inputRoot, inputRoot, slidersAndFieldsContainer);
|
|
1132
|
+
}
|
|
1133
|
+
|
|
1134
|
+
isPreviousDiscrete = isDiscrete; // Add the Label.
|
|
1135
|
+
|
|
1136
|
+
var label = new VueLabel({
|
|
1137
|
+
propsData: {
|
|
1138
|
+
classes: "default " + (isDiscrete ? "discrete" : firstScalarInput ? "first-scalar" : "scalar"),
|
|
1139
|
+
label: input.name
|
|
1140
|
+
}
|
|
1141
|
+
});
|
|
1142
|
+
|
|
1143
|
+
_this.addVueElement(inputRoot, isDiscrete ? inputRoot : slidersAndFieldsContainer.$el, label);
|
|
1144
|
+
|
|
1145
|
+
firstScalarInput = isDiscrete; // Add a drop-down list or a slider and a text box depending on whether
|
|
1146
|
+
// we are dealing with a discrete or a scalar input.
|
|
1147
|
+
|
|
1148
|
+
if (isDiscrete) {
|
|
1149
|
+
// Add the drop-down list.
|
|
1150
|
+
++discreteElementIndex;
|
|
1151
|
+
var select = new VueSelect({
|
|
1152
|
+
propsData: {
|
|
1153
|
+
index: discreteElementIndex,
|
|
1154
|
+
parent: _this,
|
|
1155
|
+
possibleValues: input.possibleValues,
|
|
1156
|
+
vModel: input.defaultValue
|
|
1157
|
+
}
|
|
1158
|
+
});
|
|
1159
|
+
|
|
1160
|
+
_this.addVueElement(inputRoot, inputRoot, select);
|
|
1161
|
+
|
|
1162
|
+
select.$on("selectionChanged", _this.selectionChanged); // Keep track of the select and its id.
|
|
1163
|
+
|
|
1164
|
+
_this.discreteElements[discreteElementIndex] = {
|
|
1165
|
+
id: input.id,
|
|
1166
|
+
select: select
|
|
1167
|
+
};
|
|
1168
|
+
} else {
|
|
1169
|
+
// Add the slider and input number.
|
|
1170
|
+
++scalarElementIndex;
|
|
1171
|
+
var slider = new VueSlider({
|
|
1172
|
+
propsData: {
|
|
1173
|
+
index: scalarElementIndex,
|
|
1174
|
+
maximumValue: input.maximumValue,
|
|
1175
|
+
parent: _this,
|
|
1176
|
+
vModel: input.defaultValue
|
|
1177
|
+
}
|
|
1178
|
+
});
|
|
1179
|
+
var inputNumber = new VueInputNumber({
|
|
1180
|
+
propsData: {
|
|
1181
|
+
index: scalarElementIndex,
|
|
1182
|
+
maximumValue: input.maximumValue,
|
|
1183
|
+
minimumValue: input.minimumValue,
|
|
1184
|
+
parent: _this,
|
|
1185
|
+
vModel: input.defaultValue
|
|
1186
|
+
}
|
|
1187
|
+
});
|
|
1188
|
+
|
|
1189
|
+
_this.addVueElement(inputRoot, slidersAndFieldsContainer.$el, slider);
|
|
1190
|
+
|
|
1191
|
+
_this.addVueElement(inputRoot, slidersAndFieldsContainer.$el, inputNumber);
|
|
1192
|
+
|
|
1193
|
+
slider.$on("synchroniseSliderAndInputNumber", _this.synchroniseSliderAndInputNumber);
|
|
1194
|
+
inputNumber.$on("synchroniseSliderAndInputNumber", _this.synchroniseSliderAndInputNumber); // Keep track of the slider and input number.
|
|
1195
|
+
|
|
1196
|
+
_this.scalarElements[scalarElementIndex] = {
|
|
1197
|
+
enabled: input.enabled,
|
|
1198
|
+
id: input.id,
|
|
1199
|
+
input_number: inputNumber,
|
|
1200
|
+
slider: slider
|
|
1201
|
+
};
|
|
1202
|
+
}
|
|
1203
|
+
}); // Configure the PlotVuer's.
|
|
1204
|
+
// Note: the PlotVuer's are created in SimulationVuer.vue since we can't
|
|
1205
|
+
// create them dynamically. So, all we need to do here is to configure
|
|
1206
|
+
// them.
|
|
1207
|
+
|
|
1208
|
+
parent.$refs.output.classList.add("x" + parent.json.output.plots.length); // Enable/disable all the elements by pretending that a selection changed.
|
|
1209
|
+
|
|
1210
|
+
this.selectionChanged();
|
|
1211
|
+
}
|
|
1212
|
+
|
|
1213
|
+
_createClass(Ui, [{
|
|
1214
|
+
key: "setVueAttributes",
|
|
1215
|
+
value: function setVueAttributes(root, element) {
|
|
1216
|
+
var _this2 = this;
|
|
1217
|
+
|
|
1218
|
+
root.attributes.forEach(function (attribute) {
|
|
1219
|
+
element.setAttribute(attribute.nodeName, attribute.nodeValue);
|
|
1220
|
+
});
|
|
1221
|
+
element.children.forEach(function (childElement) {
|
|
1222
|
+
_this2.setVueAttributes(root, childElement);
|
|
1223
|
+
});
|
|
1224
|
+
}
|
|
1225
|
+
}, {
|
|
1226
|
+
key: "addVueElement",
|
|
1227
|
+
value: function addVueElement(root, parent, element) {
|
|
1228
|
+
element.$mount();
|
|
1229
|
+
this.setVueAttributes(root, element.$el);
|
|
1230
|
+
parent.appendChild(element.$el);
|
|
1231
|
+
}
|
|
1232
|
+
}, {
|
|
1233
|
+
key: "selectionChanged",
|
|
1234
|
+
value: function selectionChanged() {
|
|
1235
|
+
// Enable/disable all the scalar elements.
|
|
1236
|
+
var ui = this instanceof Ui ? this : this.parent;
|
|
1237
|
+
ui.scalarElements.forEach(function (scalarElement) {
|
|
1238
|
+
var enabled = scalarElement.enabled;
|
|
1239
|
+
|
|
1240
|
+
if (enabled !== undefined) {
|
|
1241
|
+
var disabled = !evaluateValue(ui, enabled);
|
|
1242
|
+
scalarElement.slider.disabled = disabled;
|
|
1243
|
+
scalarElement.input_number.disabled = disabled;
|
|
1244
|
+
}
|
|
1245
|
+
});
|
|
1246
|
+
}
|
|
1247
|
+
}, {
|
|
1248
|
+
key: "synchroniseSliderAndInputNumber",
|
|
1249
|
+
value: function synchroniseSliderAndInputNumber(index, value) {
|
|
1250
|
+
// Make sure that both a slider and its corresponding input number have
|
|
1251
|
+
// the same value.
|
|
1252
|
+
this.parent.scalarElements[index].slider.vModel = value;
|
|
1253
|
+
this.parent.scalarElements[index].input_number.vModel = value;
|
|
1254
|
+
}
|
|
1255
|
+
}]);
|
|
1256
|
+
|
|
1257
|
+
return Ui;
|
|
1258
|
+
}();
|
|
1259
|
+
|
|
1260
|
+
|
|
372
1261
|
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/SimulationVuer.vue?vue&type=script&lang=js&
|
|
373
1262
|
|
|
374
1263
|
|
|
375
1264
|
|
|
376
1265
|
|
|
1266
|
+
|
|
377
1267
|
//
|
|
378
1268
|
//
|
|
379
1269
|
//
|
|
@@ -404,39 +1294,15 @@ var external_element_ui_ = __webpack_require__("5f72");
|
|
|
404
1294
|
//
|
|
405
1295
|
//
|
|
406
1296
|
//
|
|
407
|
-
//
|
|
408
|
-
//
|
|
409
|
-
//
|
|
410
|
-
//
|
|
411
|
-
//
|
|
412
|
-
//
|
|
413
|
-
//
|
|
414
|
-
//
|
|
415
|
-
//
|
|
416
|
-
//
|
|
417
|
-
//
|
|
418
|
-
//
|
|
419
|
-
//
|
|
420
|
-
//
|
|
421
|
-
//
|
|
422
|
-
//
|
|
423
|
-
//
|
|
424
|
-
//
|
|
425
|
-
//
|
|
426
|
-
//
|
|
427
|
-
//
|
|
428
|
-
//
|
|
429
|
-
//
|
|
430
|
-
//
|
|
431
|
-
//
|
|
432
|
-
//
|
|
433
|
-
//
|
|
434
|
-
//
|
|
435
1297
|
|
|
436
1298
|
|
|
437
1299
|
|
|
438
1300
|
|
|
439
|
-
|
|
1301
|
+
|
|
1302
|
+
|
|
1303
|
+
|
|
1304
|
+
|
|
1305
|
+
|
|
440
1306
|
external_vue_default.a.use(external_element_ui_["Aside"]);
|
|
441
1307
|
external_vue_default.a.use(external_element_ui_["Button"]);
|
|
442
1308
|
external_vue_default.a.use(external_element_ui_["Container"]);
|
|
@@ -454,82 +1320,28 @@ external_vue_default.a.use(external_element_ui_["Slider"]);
|
|
|
454
1320
|
},
|
|
455
1321
|
props: {
|
|
456
1322
|
apiLocation: {
|
|
457
|
-
|
|
458
|
-
|
|
1323
|
+
required: true,
|
|
1324
|
+
type: String
|
|
459
1325
|
},
|
|
460
1326
|
entry: {
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
*/
|
|
464
|
-
entry: Object
|
|
1327
|
+
required: true,
|
|
1328
|
+
type: Object
|
|
465
1329
|
}
|
|
466
1330
|
},
|
|
467
1331
|
data: function data() {
|
|
468
|
-
var title = this.entry ? this.entry.name : "";
|
|
469
|
-
var subtitle = this.entry ? this.entry.description : "";
|
|
470
1332
|
return {
|
|
471
1333
|
mode: 0,
|
|
1334
|
+
//---GRY--- TO BE DELETED!
|
|
1335
|
+
json: {},
|
|
1336
|
+
hasValidJson: true,
|
|
472
1337
|
errorMessage: "",
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
simulationModes: [{
|
|
477
|
-
label: "Normal sinus rhythm",
|
|
478
|
-
value: 0
|
|
479
|
-
}, {
|
|
480
|
-
label: "Stellate stimulation",
|
|
481
|
-
value: 1
|
|
482
|
-
}, {
|
|
483
|
-
label: "Vagal stimulation",
|
|
484
|
-
value: 2
|
|
485
|
-
}],
|
|
486
|
-
simulationSpikeLayout: {
|
|
487
|
-
xaxis: {
|
|
488
|
-
title: {
|
|
489
|
-
text: "Time (s)",
|
|
490
|
-
font: {
|
|
491
|
-
size: 10
|
|
492
|
-
}
|
|
493
|
-
}
|
|
494
|
-
},
|
|
495
|
-
yaxis: {
|
|
496
|
-
title: {
|
|
497
|
-
text: "Spike amplitude",
|
|
498
|
-
font: {
|
|
499
|
-
size: 10
|
|
500
|
-
}
|
|
501
|
-
}
|
|
502
|
-
}
|
|
503
|
-
},
|
|
504
|
-
simulationSpikeFrequency: 300,
|
|
505
|
-
simulationSpikeNumber: 10,
|
|
506
|
-
simulationSpikeAmplitude: 10,
|
|
507
|
-
// The real value is 100 times smaller.
|
|
508
|
-
simulationSpikeData: NoSimulationData,
|
|
509
|
-
simulationPotentialLayout: {
|
|
510
|
-
xaxis: {
|
|
511
|
-
title: {
|
|
512
|
-
text: "Time (s)",
|
|
513
|
-
font: {
|
|
514
|
-
size: 10
|
|
515
|
-
}
|
|
516
|
-
}
|
|
517
|
-
},
|
|
518
|
-
yaxis: {
|
|
519
|
-
title: {
|
|
520
|
-
text: "Membrane potential (mV)",
|
|
521
|
-
font: {
|
|
522
|
-
size: 10
|
|
523
|
-
}
|
|
524
|
-
}
|
|
525
|
-
}
|
|
526
|
-
},
|
|
527
|
-
simulationPotentialData: NoSimulationData,
|
|
1338
|
+
layout: [],
|
|
1339
|
+
simulationData: [],
|
|
1340
|
+
simulationDataId: {},
|
|
528
1341
|
simulationBeingComputed: false,
|
|
529
|
-
simulationBeingComputedLabel: "Loading simulation results...",
|
|
530
1342
|
simulationValid: true,
|
|
531
|
-
|
|
532
|
-
|
|
1343
|
+
title: this.entry !== undefined ? this.entry.name : "",
|
|
1344
|
+
ui: null
|
|
533
1345
|
};
|
|
534
1346
|
},
|
|
535
1347
|
methods: {
|
|
@@ -539,56 +1351,38 @@ external_vue_default.a.use(external_element_ui_["Slider"]);
|
|
|
539
1351
|
viewDataset: function viewDataset() {
|
|
540
1352
|
window.open(this.entry.dataset, "_blank");
|
|
541
1353
|
},
|
|
542
|
-
simulationModeChanged: function simulationModeChanged() {
|
|
543
|
-
this.simulationPotentialData = NoSimulationData;
|
|
544
|
-
this.simulationValid = true;
|
|
545
|
-
},
|
|
546
1354
|
runSimulation: function runSimulation() {
|
|
547
1355
|
var _this = this;
|
|
548
1356
|
|
|
549
1357
|
this.simulationBeingComputed = true;
|
|
550
1358
|
var request = {
|
|
551
1359
|
model_url: this.entry.resource,
|
|
552
|
-
json_config: {
|
|
553
|
-
output: ["Membrane/V"]
|
|
554
|
-
}
|
|
1360
|
+
json_config: {}
|
|
555
1361
|
}; // Specify the ending point and point interval for the normal mode (since
|
|
556
1362
|
// our resource is a CellML file).
|
|
557
1363
|
|
|
558
|
-
if (this.
|
|
559
|
-
request.json_config
|
|
560
|
-
"Ending point":
|
|
561
|
-
"Point interval":
|
|
562
|
-
};
|
|
563
|
-
} // Apply a stellate/vagal stimulation, if needed.
|
|
564
|
-
// Notes:
|
|
565
|
-
// - this.simulationMode:
|
|
566
|
-
// - 0: normal sinus rhythm;
|
|
567
|
-
// - 1: stellate stimulation; and
|
|
568
|
-
// - 2: vagal stimulation.
|
|
569
|
-
// - this.stimulationLevel has a value in [0; 10], but to compute ACh, we
|
|
570
|
-
// need a value in [0; 1].
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
if (this.simulationMode !== 0) {
|
|
574
|
-
request.json_config["parameters"] = {
|
|
575
|
-
"Rate_modulation_experiments/Iso_1_uM": 1.0,
|
|
576
|
-
"Rate_modulation_experiments/ACh": this.simulationMode === 1 ? (1.0 - 0.1 * this.stimulationLevel) * 22.0e-6 : 22.0e-6 + 0.1 * this.stimulationLevel * (38.0e-6 - 22.0e-6)
|
|
1364
|
+
if (this.json.simulation !== undefined) {
|
|
1365
|
+
request.json_config.simulation = {
|
|
1366
|
+
"Ending point": this.json.simulation.endingPoint,
|
|
1367
|
+
"Point interval": this.json.simulation.pointInterval
|
|
577
1368
|
};
|
|
578
|
-
} //
|
|
1369
|
+
} // Specify the simulation parameters.
|
|
579
1370
|
|
|
580
1371
|
|
|
581
|
-
if (this.
|
|
582
|
-
request.json_config
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
} // Request the spikes if we are in composite mode.
|
|
1372
|
+
if (this.json.parameters != undefined) {
|
|
1373
|
+
request.json_config.parameters = {};
|
|
1374
|
+
this.json.parameters.forEach(function (parameter) {
|
|
1375
|
+
request.json_config.parameters[parameter.name] = evaluateValue(_this.ui, parameter.value);
|
|
1376
|
+
});
|
|
1377
|
+
} // Specify what we want to retrieve.
|
|
588
1378
|
|
|
589
1379
|
|
|
590
|
-
if (this.
|
|
591
|
-
|
|
1380
|
+
if (this.json.output.data !== undefined) {
|
|
1381
|
+
var index = -1;
|
|
1382
|
+
request.json_config.output = [];
|
|
1383
|
+
this.json.output.data.forEach(function (outputData) {
|
|
1384
|
+
request.json_config.output[++index] = outputData.name;
|
|
1385
|
+
});
|
|
592
1386
|
} // Run the simulation.
|
|
593
1387
|
|
|
594
1388
|
|
|
@@ -605,22 +1399,25 @@ external_vue_default.a.use(external_element_ui_["Slider"]);
|
|
|
605
1399
|
_this.simulationValid = response.status === "ok";
|
|
606
1400
|
|
|
607
1401
|
if (_this.simulationValid) {
|
|
608
|
-
// Retrieve the
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
}];
|
|
617
|
-
} // Retrieve the potential data.
|
|
1402
|
+
// Retrieve and post-process the simulation data.
|
|
1403
|
+
var _index = -1;
|
|
1404
|
+
|
|
1405
|
+
var iMax = response.results[_this.simulationDataId[Object.keys(_this.simulationDataId)[0]]].length;
|
|
1406
|
+
|
|
1407
|
+
_this.json.output.plots.forEach(function (outputPlot) {
|
|
1408
|
+
var xValue = [];
|
|
1409
|
+
var yValue = [];
|
|
618
1410
|
|
|
1411
|
+
for (var i = 0; i < iMax; ++i) {
|
|
1412
|
+
xValue[i] = evaluateSimulationValue(_this, response.results, outputPlot.xValue, i);
|
|
1413
|
+
yValue[i] = evaluateSimulationValue(_this, response.results, outputPlot.yValue, i);
|
|
1414
|
+
}
|
|
619
1415
|
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
1416
|
+
_this.simulationData[++_index] = [{
|
|
1417
|
+
x: xValue,
|
|
1418
|
+
y: yValue
|
|
1419
|
+
}];
|
|
1420
|
+
});
|
|
624
1421
|
} else {
|
|
625
1422
|
_this.errorMessage = response.description;
|
|
626
1423
|
}
|
|
@@ -634,47 +1431,63 @@ external_vue_default.a.use(external_element_ui_["Slider"]);
|
|
|
634
1431
|
xmlhttp.send(JSON.stringify(request));
|
|
635
1432
|
}
|
|
636
1433
|
},
|
|
637
|
-
|
|
638
|
-
//
|
|
639
|
-
//
|
|
640
|
-
// - 0: normal mode; and
|
|
641
|
-
// - 1: composite mode.
|
|
1434
|
+
created: function created() {
|
|
1435
|
+
// Manually (for now) specify the JSON configuration to be used by either
|
|
1436
|
+
// the normal model or the composite model.
|
|
642
1437
|
this.mode = -1;
|
|
643
1438
|
|
|
644
|
-
if (this.entry) {
|
|
1439
|
+
if (this.entry !== undefined) {
|
|
645
1440
|
if (this.entry.resource === "https://models.physiomeproject.org/workspace/486/rawfile/55879cbc485e2d4c41f3dc6d60424b849f94c4ee/HumanSAN_Fabbri_Fantini_Wilders_Severi_2017.cellml") {
|
|
646
1441
|
this.mode = 0;
|
|
1442
|
+
this.json = jsonForNormalModel();
|
|
647
1443
|
} else if (this.entry.resource === "https://models.physiomeproject.org/workspace/698/rawfile/f3fc911063ac72ed44e84c0c5af28df41c25d452/fabbri_et_al_based_composite_SAN_model.sedml") {
|
|
648
1444
|
this.mode = 1;
|
|
1445
|
+
this.json = jsonForCompositeModel();
|
|
649
1446
|
}
|
|
1447
|
+
} // Make sure that the JSON configuration is valid.
|
|
1448
|
+
|
|
1449
|
+
|
|
1450
|
+
this.hasValidJson = validJson(this.json);
|
|
1451
|
+
|
|
1452
|
+
if (!this.hasValidJson) {
|
|
1453
|
+
return;
|
|
1454
|
+
} // Prepare ourselves for the UI by initialising some data.
|
|
1455
|
+
|
|
1456
|
+
|
|
1457
|
+
prepareForUi(this);
|
|
1458
|
+
},
|
|
1459
|
+
mounted: function mounted() {
|
|
1460
|
+
// Finish mounting by creating the UI for the given simulation dataset.
|
|
1461
|
+
if (this.hasValidJson) {
|
|
1462
|
+
this.ui = new ui_Ui(this);
|
|
650
1463
|
}
|
|
651
1464
|
}
|
|
652
1465
|
});
|
|
653
1466
|
// CONCATENATED MODULE: ./src/components/SimulationVuer.vue?vue&type=script&lang=js&
|
|
654
1467
|
/* harmony default export */ var components_SimulationVuervue_type_script_lang_js_ = (SimulationVuervue_type_script_lang_js_);
|
|
655
|
-
// EXTERNAL MODULE: ./src/components/SimulationVuer.vue?vue&type=style&index=0&id=
|
|
656
|
-
var
|
|
1468
|
+
// EXTERNAL MODULE: ./src/components/SimulationVuer.vue?vue&type=style&index=0&id=3e94221a&scoped=true&lang=css&
|
|
1469
|
+
var SimulationVuervue_type_style_index_0_id_3e94221a_scoped_true_lang_css_ = __webpack_require__("47b7");
|
|
657
1470
|
|
|
658
|
-
// EXTERNAL MODULE: ./src/styles/purple/aside.css?vue&type=style&index=1&id=
|
|
659
|
-
var
|
|
1471
|
+
// EXTERNAL MODULE: ./src/styles/purple/aside.css?vue&type=style&index=1&id=3e94221a&scoped=true&lang=css&
|
|
1472
|
+
var asidevue_type_style_index_1_id_3e94221a_scoped_true_lang_css_ = __webpack_require__("d7fe");
|
|
660
1473
|
|
|
661
|
-
// EXTERNAL MODULE: ./src/styles/purple/button.css?vue&type=style&index=2&id=
|
|
662
|
-
var
|
|
1474
|
+
// EXTERNAL MODULE: ./src/styles/purple/button.css?vue&type=style&index=2&id=3e94221a&scoped=true&lang=css&
|
|
1475
|
+
var buttonvue_type_style_index_2_id_3e94221a_scoped_true_lang_css_ = __webpack_require__("020d");
|
|
663
1476
|
|
|
664
|
-
// EXTERNAL MODULE: ./src/styles/purple/container.css?vue&type=style&index=3&id=
|
|
665
|
-
var
|
|
1477
|
+
// EXTERNAL MODULE: ./src/styles/purple/container.css?vue&type=style&index=3&id=3e94221a&scoped=true&lang=css&
|
|
1478
|
+
var containervue_type_style_index_3_id_3e94221a_scoped_true_lang_css_ = __webpack_require__("1e1f");
|
|
666
1479
|
|
|
667
|
-
// EXTERNAL MODULE: ./src/styles/purple/input-number.css?vue&type=style&index=4&id=
|
|
668
|
-
var
|
|
1480
|
+
// EXTERNAL MODULE: ./src/styles/purple/input-number.css?vue&type=style&index=4&id=3e94221a&scoped=true&lang=css&
|
|
1481
|
+
var input_numbervue_type_style_index_4_id_3e94221a_scoped_true_lang_css_ = __webpack_require__("9043");
|
|
669
1482
|
|
|
670
|
-
// EXTERNAL MODULE: ./src/styles/purple/option.css?vue&type=style&index=5&id=
|
|
671
|
-
var
|
|
1483
|
+
// EXTERNAL MODULE: ./src/styles/purple/option.css?vue&type=style&index=5&id=3e94221a&scoped=true&lang=css&
|
|
1484
|
+
var optionvue_type_style_index_5_id_3e94221a_scoped_true_lang_css_ = __webpack_require__("c9af");
|
|
672
1485
|
|
|
673
|
-
// EXTERNAL MODULE: ./src/styles/purple/select.css?vue&type=style&index=6&id=
|
|
674
|
-
var
|
|
1486
|
+
// EXTERNAL MODULE: ./src/styles/purple/select.css?vue&type=style&index=6&id=3e94221a&scoped=true&lang=css&
|
|
1487
|
+
var selectvue_type_style_index_6_id_3e94221a_scoped_true_lang_css_ = __webpack_require__("5b43");
|
|
675
1488
|
|
|
676
|
-
// EXTERNAL MODULE: ./src/styles/purple/slider.css?vue&type=style&index=7&id=
|
|
677
|
-
var
|
|
1489
|
+
// EXTERNAL MODULE: ./src/styles/purple/slider.css?vue&type=style&index=7&id=3e94221a&scoped=true&lang=css&
|
|
1490
|
+
var slidervue_type_style_index_7_id_3e94221a_scoped_true_lang_css_ = __webpack_require__("7a96");
|
|
678
1491
|
|
|
679
1492
|
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
|
|
680
1493
|
/* globals __VUE_SSR_CONTEXT__ */
|
|
@@ -798,7 +1611,7 @@ var component = normalizeComponent(
|
|
|
798
1611
|
staticRenderFns,
|
|
799
1612
|
false,
|
|
800
1613
|
null,
|
|
801
|
-
"
|
|
1614
|
+
"3e94221a",
|
|
802
1615
|
null
|
|
803
1616
|
|
|
804
1617
|
)
|
|
@@ -814,6 +1627,13 @@ var component = normalizeComponent(
|
|
|
814
1627
|
|
|
815
1628
|
|
|
816
1629
|
|
|
1630
|
+
/***/ }),
|
|
1631
|
+
|
|
1632
|
+
/***/ "fd22":
|
|
1633
|
+
/***/ (function(module, exports) {
|
|
1634
|
+
|
|
1635
|
+
module.exports = require("core-js/modules/es.string.includes.js");
|
|
1636
|
+
|
|
817
1637
|
/***/ })
|
|
818
1638
|
|
|
819
1639
|
/******/ });
|