arrmatura 4.2.2 → 5.0.2
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/README.md +30 -25
- package/commons/auth/UserService.ts +107 -0
- package/commons/auth/index.ts +4 -0
- package/commons/auth/user.xml +66 -0
- package/commons/components/buttons.xml +23 -0
- package/commons/components/index.ts +13 -0
- package/commons/components/inputs.xml +33 -0
- package/commons/components/layouts.xml +77 -0
- package/commons/components/media.xml +21 -0
- package/commons/components/modal.xml +37 -0
- package/commons/components/navigation.xml +59 -0
- package/commons/components/popups.xml +12 -0
- package/commons/components/searchbar.xml +40 -0
- package/commons/components/table.xml +120 -0
- package/commons/components/toasts.xml +13 -0
- package/commons/components/viewport.xml +48 -0
- package/commons/forms/FieldItem.xml +20 -0
- package/commons/forms/FormController.ts +73 -0
- package/commons/forms/Item.ts +68 -0
- package/commons/forms/ItemCollection.ts +152 -0
- package/commons/forms/ItemController.ts +62 -0
- package/commons/forms/MetadataService.ts +45 -0
- package/commons/forms/MultiEnumField.xml +44 -0
- package/commons/forms/MultivalueController.ts +49 -0
- package/commons/forms/SmartareaField.xml +51 -0
- package/commons/forms/SuggestionController.ts +80 -0
- package/commons/forms/SuggestionField.xml +28 -0
- package/commons/forms/fields.xml +138 -0
- package/commons/forms/form.xml +37 -0
- package/commons/forms/index.ts +29 -0
- package/commons/index.ts +6 -0
- package/commons/pipes/index.ts +21 -0
- package/commons/pipes/showCounts.ts +16 -0
- package/commons/services/ErrorHandlingService.ts +11 -0
- package/commons/services/FirebaseService.ts +185 -0
- package/commons/services/GSheetsService.ts +92 -0
- package/commons/services/HeartbeatService.ts +35 -0
- package/commons/services/Invoke.ts +13 -0
- package/commons/services/JsonpService.ts +18 -0
- package/commons/services/Loader.ts +17 -0
- package/commons/services/LocalStorage.ts +46 -0
- package/commons/services/NavigationService.ts +55 -0
- package/commons/services/Service.ts +68 -0
- package/commons/services/ServiceWorker.ts +111 -0
- package/commons/services/ToastService.ts +49 -0
- package/commons/services/index.ts +14 -0
- package/core/Arrmatura.ts +79 -0
- package/core/CNode.ts +112 -0
- package/core/Component.ts +431 -0
- package/core/Platform.ts +3 -0
- package/core/cnodes/composition.ts +100 -0
- package/core/cnodes/conditionals.ts +51 -0
- package/core/cnodes/elementary.ts +45 -0
- package/core/cnodes/iterations.ts +94 -0
- package/core/cnodes/routing.ts +25 -0
- package/core/compileNode.ts +39 -0
- package/core/expression.ts +73 -0
- package/core/index.ts +2 -0
- package/core/register.ts +43 -0
- package/core/utils.ts +25 -0
- package/core-web/WebPlatform.ts +25 -0
- package/core-web/attributes.ts +197 -0
- package/core-web/elements.ts +64 -0
- package/core-web/index.ts +19 -0
- package/core-web/reflow.ts +30 -0
- package/core-web/type.ts +19 -0
- package/docs/index.js +191 -4077
- package/lib/arrayGroupBy.ts +19 -0
- package/lib/arraySortBy.ts +49 -0
- package/lib/arrayToObject.ts +18 -0
- package/lib/codus.ts +25 -0
- package/lib/consts.ts +3 -0
- package/lib/createListeners.ts +12 -0
- package/lib/curry.ts +8 -0
- package/lib/dateFormat.ts +69 -0
- package/lib/dateOf.ts +31 -0
- package/lib/dateParseISO8601.ts +27 -0
- package/lib/fx.ts +62 -0
- package/lib/guid.ts +7 -0
- package/lib/index.ts +19 -0
- package/lib/l10n.ts +40 -0
- package/lib/nextId.ts +9 -0
- package/lib/noop.ts +8 -0
- package/lib/obj.ts +62 -0
- package/lib/predicat.ts +26 -0
- package/lib/resources.ru.ts +20 -0
- package/lib/resources.ts +20 -0
- package/lib/scalar.ts +25 -0
- package/lib/str.ts +76 -0
- package/lib/urls.ts +91 -0
- package/lib/xml.ts +117 -0
- package/package.json +17 -8
- package/docs/index.js.map +0 -1
package/docs/index.js
CHANGED
|
@@ -1,4091 +1,205 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
else {
|
|
7
|
-
var a = factory();
|
|
8
|
-
for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];
|
|
9
|
-
}
|
|
10
|
-
})(this, function() {
|
|
11
|
-
return /******/ (function(modules) { // webpackBootstrap
|
|
12
|
-
/******/ // The module cache
|
|
13
|
-
/******/ var installedModules = {};
|
|
14
|
-
/******/
|
|
15
|
-
/******/ // The require function
|
|
16
|
-
/******/ function __webpack_require__(moduleId) {
|
|
17
|
-
/******/
|
|
18
|
-
/******/ // Check if module is in cache
|
|
19
|
-
/******/ if(installedModules[moduleId]) {
|
|
20
|
-
/******/ return installedModules[moduleId].exports;
|
|
21
|
-
/******/ }
|
|
22
|
-
/******/ // Create a new module (and put it into the cache)
|
|
23
|
-
/******/ var module = installedModules[moduleId] = {
|
|
24
|
-
/******/ i: moduleId,
|
|
25
|
-
/******/ l: false,
|
|
26
|
-
/******/ exports: {}
|
|
27
|
-
/******/ };
|
|
28
|
-
/******/
|
|
29
|
-
/******/ // Execute the module function
|
|
30
|
-
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
|
31
|
-
/******/
|
|
32
|
-
/******/ // Flag the module as loaded
|
|
33
|
-
/******/ module.l = true;
|
|
34
|
-
/******/
|
|
35
|
-
/******/ // Return the exports of the module
|
|
36
|
-
/******/ return module.exports;
|
|
37
|
-
/******/ }
|
|
38
|
-
/******/
|
|
39
|
-
/******/
|
|
40
|
-
/******/ // expose the modules object (__webpack_modules__)
|
|
41
|
-
/******/ __webpack_require__.m = modules;
|
|
42
|
-
/******/
|
|
43
|
-
/******/ // expose the module cache
|
|
44
|
-
/******/ __webpack_require__.c = installedModules;
|
|
45
|
-
/******/
|
|
46
|
-
/******/ // define getter function for harmony exports
|
|
47
|
-
/******/ __webpack_require__.d = function(exports, name, getter) {
|
|
48
|
-
/******/ if(!__webpack_require__.o(exports, name)) {
|
|
49
|
-
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
|
|
50
|
-
/******/ }
|
|
51
|
-
/******/ };
|
|
52
|
-
/******/
|
|
53
|
-
/******/ // define __esModule on exports
|
|
54
|
-
/******/ __webpack_require__.r = function(exports) {
|
|
55
|
-
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
56
|
-
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
57
|
-
/******/ }
|
|
58
|
-
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
|
59
|
-
/******/ };
|
|
60
|
-
/******/
|
|
61
|
-
/******/ // create a fake namespace object
|
|
62
|
-
/******/ // mode & 1: value is a module id, require it
|
|
63
|
-
/******/ // mode & 2: merge all properties of value into the ns
|
|
64
|
-
/******/ // mode & 4: return value when already ns object
|
|
65
|
-
/******/ // mode & 8|1: behave like require
|
|
66
|
-
/******/ __webpack_require__.t = function(value, mode) {
|
|
67
|
-
/******/ if(mode & 1) value = __webpack_require__(value);
|
|
68
|
-
/******/ if(mode & 8) return value;
|
|
69
|
-
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
|
|
70
|
-
/******/ var ns = Object.create(null);
|
|
71
|
-
/******/ __webpack_require__.r(ns);
|
|
72
|
-
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
|
|
73
|
-
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
|
|
74
|
-
/******/ return ns;
|
|
75
|
-
/******/ };
|
|
76
|
-
/******/
|
|
77
|
-
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
|
78
|
-
/******/ __webpack_require__.n = function(module) {
|
|
79
|
-
/******/ var getter = module && module.__esModule ?
|
|
80
|
-
/******/ function getDefault() { return module['default']; } :
|
|
81
|
-
/******/ function getModuleExports() { return module; };
|
|
82
|
-
/******/ __webpack_require__.d(getter, 'a', getter);
|
|
83
|
-
/******/ return getter;
|
|
84
|
-
/******/ };
|
|
85
|
-
/******/
|
|
86
|
-
/******/ // Object.prototype.hasOwnProperty.call
|
|
87
|
-
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
|
88
|
-
/******/
|
|
89
|
-
/******/ // __webpack_public_path__
|
|
90
|
-
/******/ __webpack_require__.p = "";
|
|
91
|
-
/******/
|
|
92
|
-
/******/
|
|
93
|
-
/******/ // Load entry module and return exports
|
|
94
|
-
/******/ return __webpack_require__(__webpack_require__.s = 0);
|
|
95
|
-
/******/ })
|
|
96
|
-
/************************************************************************/
|
|
97
|
-
/******/ ({
|
|
98
|
-
|
|
99
|
-
/***/ "./index.js":
|
|
100
|
-
/*!******************!*\
|
|
101
|
-
!*** ./index.js ***!
|
|
102
|
-
\******************/
|
|
103
|
-
/*! exports provided: launch */
|
|
104
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
105
|
-
|
|
106
|
-
"use strict";
|
|
107
|
-
__webpack_require__.r(__webpack_exports__);
|
|
108
|
-
/* harmony import */ var _lib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./lib */ "./lib/index.js");
|
|
109
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "launch", function() { return _lib__WEBPACK_IMPORTED_MODULE_0__["launch"]; });
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
/***/ }),
|
|
114
|
-
|
|
115
|
-
/***/ "./lib/compile.expr.js":
|
|
116
|
-
/*!*****************************!*\
|
|
117
|
-
!*** ./lib/compile.expr.js ***!
|
|
118
|
-
\*****************************/
|
|
119
|
-
/*! exports provided: withPipes, compileExpression */
|
|
120
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
121
|
-
|
|
122
|
-
"use strict";
|
|
123
|
-
__webpack_require__.r(__webpack_exports__);
|
|
124
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "withPipes", function() { return withPipes; });
|
|
125
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "compileExpression", function() { return compileExpression; });
|
|
126
|
-
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./utils */ "./lib/utils.js");
|
|
127
|
-
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
128
|
-
|
|
129
|
-
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
130
|
-
|
|
131
|
-
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
132
|
-
|
|
133
|
-
function _toArray(arr) { return _arrayWithHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableRest(); }
|
|
134
|
-
|
|
135
|
-
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
136
|
-
|
|
137
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
138
|
-
|
|
139
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
140
|
-
|
|
141
|
-
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); }
|
|
142
|
-
|
|
143
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
var RE_SINGLE_PLACEHOLDER = /^\{([^}]+)\}$/;
|
|
147
|
-
var RE_PLACEHOLDER = /\{([^}]+)\}/g;
|
|
148
|
-
|
|
149
|
-
function pipe(value, key) {
|
|
150
|
-
var _key$split = key.split(':'),
|
|
151
|
-
_key$split2 = _toArray(_key$split),
|
|
152
|
-
id = _key$split2[0],
|
|
153
|
-
args = _key$split2.slice(1);
|
|
154
|
-
|
|
155
|
-
try {
|
|
156
|
-
var fn = this.pipes(id);
|
|
157
|
-
var $ = this;
|
|
158
|
-
return fn.apply($.impl, [value].concat(_toConsumableArray(args.map(function (a) {
|
|
159
|
-
return a[0] === '@' ? $.container.get(a.slice(1)) : Object(_utils__WEBPACK_IMPORTED_MODULE_0__["parseValue"])(a);
|
|
160
|
-
}))));
|
|
161
|
-
} catch (ex) {
|
|
162
|
-
console.error('ERROR: pipe ' + id, ex);
|
|
163
|
-
return value;
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
function withPipes(pipes) {
|
|
168
|
-
return !pipes.length ? function (c, v) {
|
|
169
|
-
return v;
|
|
170
|
-
} : function (c, initialValue) {
|
|
171
|
-
return pipes.reduce(function (r, pk) {
|
|
172
|
-
return pipe.call(c, r, pk);
|
|
173
|
-
}, initialValue);
|
|
174
|
-
};
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
function stringInterpolation(v) {
|
|
178
|
-
var fnx = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
179
|
-
var pattern = v.replace(RE_PLACEHOLDER, function (_, expr) {
|
|
180
|
-
fnx.push(placeholder(expr));
|
|
181
|
-
return '{{' + (fnx.length - 1) + '}}';
|
|
182
|
-
});
|
|
183
|
-
return function (c) {
|
|
184
|
-
return !fnx.length ? pattern : pattern.replace(/\{\{(\d+)\}\}/g, function (s, idx) {
|
|
185
|
-
var r = fnx[idx](c);
|
|
186
|
-
return !r && r !== 0 ? '' : r;
|
|
187
|
-
});
|
|
188
|
-
};
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
function resourceExpression(expr) {
|
|
192
|
-
var _expr$split$map = expr.split('|').map(function (s) {
|
|
193
|
-
return s.trim();
|
|
194
|
-
}),
|
|
195
|
-
_expr$split$map2 = _toArray(_expr$split$map),
|
|
196
|
-
key = _expr$split$map2[0],
|
|
197
|
-
pipes = _expr$split$map2.slice(1);
|
|
198
|
-
|
|
199
|
-
var intrpltn = stringInterpolation(key);
|
|
200
|
-
return !pipes.length ? function (c) {
|
|
201
|
-
return c.res(intrpltn(c));
|
|
202
|
-
} : function (pipec) {
|
|
203
|
-
return function (c) {
|
|
204
|
-
return pipec(c, c.res(intrpltn(c)));
|
|
205
|
-
};
|
|
206
|
-
}(withPipes(pipes));
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
function placeholder(expr) {
|
|
210
|
-
var _expr$split$map3 = expr.split('|').map(function (s) {
|
|
211
|
-
return s.trim();
|
|
212
|
-
}),
|
|
213
|
-
_expr$split$map4 = _toArray(_expr$split$map3),
|
|
214
|
-
key = _expr$split$map4[0],
|
|
215
|
-
pipes = _expr$split$map4.slice(1);
|
|
216
|
-
|
|
217
|
-
var fn = key[0] === ':' ? function (c) {
|
|
218
|
-
return c.res(key.slice(1));
|
|
219
|
-
} : function (c) {
|
|
220
|
-
return c.container.get(key);
|
|
221
|
-
};
|
|
222
|
-
if (!pipes.length) return fn;
|
|
223
|
-
return function (c) {
|
|
224
|
-
return pipes.reduce(function (r, pk) {
|
|
225
|
-
return pipe.call(c, r, pk);
|
|
226
|
-
}, fn(c));
|
|
227
|
-
};
|
|
228
|
-
}
|
|
229
|
-
|
|
230
|
-
function compileExpression(v) {
|
|
231
|
-
if (typeof v !== 'string') {
|
|
232
|
-
return function () {
|
|
233
|
-
return v;
|
|
234
|
-
};
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
if (v[0] === ':') {
|
|
238
|
-
return resourceExpression(v.slice(1).trim());
|
|
239
|
-
}
|
|
240
|
-
|
|
241
|
-
if (!v.includes('{')) {
|
|
242
|
-
var vv = Object(_utils__WEBPACK_IMPORTED_MODULE_0__["parseValue"])(v);
|
|
243
|
-
return function () {
|
|
244
|
-
return vv;
|
|
245
|
-
};
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
if (v.match(RE_SINGLE_PLACEHOLDER)) {
|
|
249
|
-
return placeholder(v.slice(1, -1).trim());
|
|
250
|
-
}
|
|
251
|
-
|
|
252
|
-
return stringInterpolation(v);
|
|
253
|
-
}
|
|
254
|
-
|
|
255
|
-
/***/ }),
|
|
256
|
-
|
|
257
|
-
/***/ "./lib/compile.js":
|
|
258
|
-
/*!************************!*\
|
|
259
|
-
!*** ./lib/compile.js ***!
|
|
260
|
-
\************************/
|
|
261
|
-
/*! exports provided: compiledNodeMap, compileFor, compileIf, compileTag, compileRegularNode, compileNode, compileTemplate */
|
|
262
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
263
|
-
|
|
264
|
-
"use strict";
|
|
265
|
-
__webpack_require__.r(__webpack_exports__);
|
|
266
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "compiledNodeMap", function() { return compiledNodeMap; });
|
|
267
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "compileFor", function() { return compileFor; });
|
|
268
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "compileIf", function() { return compileIf; });
|
|
269
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "compileTag", function() { return compileTag; });
|
|
270
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "compileRegularNode", function() { return compileRegularNode; });
|
|
271
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "compileNode", function() { return compileNode; });
|
|
272
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "compileTemplate", function() { return compileTemplate; });
|
|
273
|
-
/* harmony import */ var _node__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node */ "./lib/node.js");
|
|
274
|
-
/* harmony import */ var _compile_expr__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./compile.expr */ "./lib/compile.expr.js");
|
|
275
|
-
/* harmony import */ var _xml_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./xml.js */ "./lib/xml.js");
|
|
276
|
-
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./utils */ "./lib/utils.js");
|
|
277
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
278
|
-
|
|
279
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
280
|
-
|
|
281
|
-
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
282
|
-
|
|
283
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
284
|
-
|
|
285
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
286
|
-
|
|
287
|
-
function _iterableToArrayLimit(arr, i) { if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
288
|
-
|
|
289
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
var compiledNodeMap = function compiledNodeMap(nodes) {
|
|
296
|
-
return nodes ? nodes.map(compileNode).reduce(function (map, node) {
|
|
297
|
-
return map.set(node.uid, node);
|
|
298
|
-
}, new Map()) : null;
|
|
299
|
-
};
|
|
300
|
-
function compileFor(r) {
|
|
301
|
-
var _r$extractAttr$split = r.extractAttr('ui:for').split(' '),
|
|
302
|
-
_r$extractAttr$split2 = _slicedToArray(_r$extractAttr$split, 3),
|
|
303
|
-
itemName = _r$extractAttr$split2[0],
|
|
304
|
-
prep = _r$extractAttr$split2[1],
|
|
305
|
-
_r$extractAttr$split3 = _r$extractAttr$split2[2],
|
|
306
|
-
expr = _r$extractAttr$split3 === void 0 ? prep : _r$extractAttr$split3;
|
|
307
|
-
|
|
308
|
-
return compileNode(new _node__WEBPACK_IMPORTED_MODULE_0__["Node"]('ui:for', new Map([['items', '{:<'.includes(expr[0]) ? expr : "{".concat(expr, "}")]]), [new _node__WEBPACK_IMPORTED_MODULE_0__["Node"]('ui:item', new Map([['itemName', itemName]]), [r])]));
|
|
309
|
-
}
|
|
310
|
-
function compileIf(r) {
|
|
311
|
-
var tag = r.tag,
|
|
312
|
-
nodes = r.nodes;
|
|
313
|
-
|
|
314
|
-
var _filterMapKey = Object(_utils__WEBPACK_IMPORTED_MODULE_3__["filterMapKey"])(r.attrs, 'ui:if'),
|
|
315
|
-
_filterMapKey2 = _slicedToArray(_filterMapKey, 2),
|
|
316
|
-
expr = _filterMapKey2[0],
|
|
317
|
-
attrs = _filterMapKey2[1];
|
|
318
|
-
|
|
319
|
-
var iff = {};
|
|
320
|
-
var ifNode = new _node__WEBPACK_IMPORTED_MODULE_0__["Node"]('ui:fragment');
|
|
321
|
-
|
|
322
|
-
if (expr[0] === '<' && expr[1] === '-') {
|
|
323
|
-
ifNode.addPropertyConnector(expr, function (condition) {
|
|
324
|
-
return {
|
|
325
|
-
condition: condition
|
|
326
|
-
};
|
|
327
|
-
});
|
|
328
|
-
} else if (expr.slice(0, 5) === 'slot(') {
|
|
329
|
-
ifNode.addPropertyResolver(function (slotId) {
|
|
330
|
-
return function (c) {
|
|
331
|
-
return Object(_utils__WEBPACK_IMPORTED_MODULE_3__["hasSlot"])(c, slotId);
|
|
332
|
-
};
|
|
333
|
-
}(expr.slice(5, -1)), 'condition');
|
|
334
|
-
} else {
|
|
335
|
-
ifNode.addPropertyResolver(Object(_compile_expr__WEBPACK_IMPORTED_MODULE_1__["compileExpression"])(expr[0] === '{' ? expr : "{".concat(expr, "}")), 'condition');
|
|
336
|
-
}
|
|
337
|
-
|
|
338
|
-
var $then = new _node__WEBPACK_IMPORTED_MODULE_0__["Node"](tag, attrs, nodes);
|
|
339
|
-
|
|
340
|
-
if (nodes && nodes.length) {
|
|
341
|
-
var ifElse = nodes.find(function (e) {
|
|
342
|
-
return e.tag === 'ui:else';
|
|
343
|
-
});
|
|
344
|
-
var ifThen = nodes.find(function (e) {
|
|
345
|
-
return e.tag === 'ui:then';
|
|
346
|
-
});
|
|
347
|
-
|
|
348
|
-
if (ifElse) {
|
|
349
|
-
iff["else"] = compiledNodeMap(ifElse.nodes);
|
|
350
|
-
$then.nodes = ifThen ? ifThen.nodes : nodes.filter(function (e) {
|
|
351
|
-
return e !== ifElse;
|
|
352
|
-
});
|
|
353
|
-
} else if (ifThen) {
|
|
354
|
-
$then.nodes = ifThen.nodes;
|
|
355
|
-
}
|
|
356
|
-
}
|
|
357
|
-
|
|
358
|
-
iff.then = compiledNodeMap([$then]);
|
|
359
|
-
return Object.assign(ifNode, {
|
|
360
|
-
getNodes: function getNodes($) {
|
|
361
|
-
return $.state.condition ? iff.then : iff["else"];
|
|
362
|
-
}
|
|
363
|
-
});
|
|
364
|
-
}
|
|
365
|
-
function compileTag(r) {
|
|
366
|
-
var uid0 = r.uid,
|
|
367
|
-
nodes = r.nodes;
|
|
368
|
-
|
|
369
|
-
var _filterMapKey3 = Object(_utils__WEBPACK_IMPORTED_MODULE_3__["filterMapKey"])(r.attrs, 'tag'),
|
|
370
|
-
_filterMapKey4 = _slicedToArray(_filterMapKey3, 2),
|
|
371
|
-
expr = _filterMapKey4[0],
|
|
372
|
-
attrs = _filterMapKey4[1];
|
|
373
|
-
|
|
374
|
-
var node = compileRegularNode(new _node__WEBPACK_IMPORTED_MODULE_0__["Node"]('', attrs, nodes));
|
|
375
|
-
|
|
376
|
-
if (expr[0] === '<' && expr[1] === '-') {
|
|
377
|
-
r.addPropertyConnector(expr, function (tag) {
|
|
378
|
-
return {
|
|
379
|
-
tag: tag
|
|
380
|
-
};
|
|
381
|
-
});
|
|
382
|
-
} else {
|
|
383
|
-
r.addPropertyResolver(Object(_compile_expr__WEBPACK_IMPORTED_MODULE_1__["compileExpression"])(expr), 'tag');
|
|
384
|
-
}
|
|
385
|
-
|
|
386
|
-
return Object.assign(r, {
|
|
387
|
-
tag: 'ui:fragment',
|
|
388
|
-
getNodes: function getNodes($) {
|
|
389
|
-
var tag = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : $.state.tag;
|
|
390
|
-
var uid = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : uid0 + ':' + tag;
|
|
391
|
-
return Object(_utils__WEBPACK_IMPORTED_MODULE_3__["wrapNode"])(Object.assign(node, {
|
|
392
|
-
tag: tag,
|
|
393
|
-
uid: uid
|
|
394
|
-
}));
|
|
395
|
-
}
|
|
396
|
-
});
|
|
397
|
-
}
|
|
398
|
-
function compileRegularNode(r) {
|
|
399
|
-
r.attrs.forEach(function (v, k) {
|
|
400
|
-
if (k === 'id') {
|
|
401
|
-
r.id = v;
|
|
402
|
-
r.addInitialState(_defineProperty({}, k, v));
|
|
403
|
-
} else if (k === 'ui:ref') {
|
|
404
|
-
r.refId = v;
|
|
405
|
-
} else if (k === 'ui:props') {
|
|
406
|
-
if (v[0] === '<' && v[1] === '-') {
|
|
407
|
-
r.addPropertyConnector(v, Function.ID);
|
|
408
|
-
} else {
|
|
409
|
-
r.addPropertyResolver(Object(_compile_expr__WEBPACK_IMPORTED_MODULE_1__["compileExpression"])(v));
|
|
410
|
-
}
|
|
411
|
-
} else {
|
|
412
|
-
if (typeof v !== 'string') {
|
|
413
|
-
r.addInitialState(_defineProperty({}, k, v));
|
|
414
|
-
} else {
|
|
415
|
-
if (v[0] === '<' && v[1] === '-') {
|
|
416
|
-
r.addPropertyConnector(v, function (rr) {
|
|
417
|
-
return _defineProperty({}, k, rr);
|
|
418
|
-
});
|
|
419
|
-
} else if (v[0] === '-' && v[1] === '>') {
|
|
420
|
-
r.addEmitter(v, k);
|
|
421
|
-
} else {
|
|
422
|
-
if (!v.includes('{') && v[0] !== ':') {
|
|
423
|
-
r.addInitialState(_defineProperty({}, k, v));
|
|
424
|
-
} else {
|
|
425
|
-
r.addPropertyResolver(Object(_compile_expr__WEBPACK_IMPORTED_MODULE_1__["compileExpression"])(v), k);
|
|
426
|
-
}
|
|
427
|
-
}
|
|
428
|
-
}
|
|
429
|
-
}
|
|
430
|
-
});
|
|
431
|
-
return Object.assign(r, {
|
|
432
|
-
nodeMap: compiledNodeMap(r.nodes)
|
|
433
|
-
});
|
|
434
|
-
}
|
|
435
|
-
function compileNode(node) {
|
|
436
|
-
if (node.attrs.has('ui:for')) {
|
|
437
|
-
return compileFor(node);
|
|
438
|
-
}
|
|
439
|
-
|
|
440
|
-
if (node.attrs.has('ui:if')) {
|
|
441
|
-
return compileIf(node);
|
|
442
|
-
}
|
|
443
|
-
|
|
444
|
-
if (node.tag === 'ui:tag') {
|
|
445
|
-
return compileTag(node);
|
|
446
|
-
}
|
|
447
|
-
|
|
448
|
-
return compileRegularNode(node);
|
|
449
|
-
}
|
|
450
|
-
function compileTemplate(text, name) {
|
|
451
|
-
try {
|
|
452
|
-
var T = compiledNodeMap(text ? Object(_xml_js__WEBPACK_IMPORTED_MODULE_2__["parseXML"])(text, name).nodes : []);
|
|
453
|
-
return T;
|
|
454
|
-
} catch (ex) {
|
|
455
|
-
// eslint-disable-next-line no-console
|
|
456
|
-
console.error('compile ' + name, ex);
|
|
457
|
-
}
|
|
458
|
-
|
|
459
|
-
return [];
|
|
460
|
-
}
|
|
461
|
-
|
|
462
|
-
/***/ }),
|
|
463
|
-
|
|
464
|
-
/***/ "./lib/component.js":
|
|
465
|
-
/*!**************************!*\
|
|
466
|
-
!*** ./lib/component.js ***!
|
|
467
|
-
\**************************/
|
|
468
|
-
/*! exports provided: ContainerComponent */
|
|
469
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
470
|
-
|
|
471
|
-
"use strict";
|
|
472
|
-
__webpack_require__.r(__webpack_exports__);
|
|
473
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ContainerComponent", function() { return ContainerComponent; });
|
|
474
|
-
/* harmony import */ var _component_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./component.utils */ "./lib/component.utils.js");
|
|
475
|
-
/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./utils.js */ "./lib/utils.js");
|
|
476
|
-
/* harmony import */ var _register_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./register.js */ "./lib/register.js");
|
|
477
|
-
/* harmony import */ var _element__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./element */ "./lib/element.js");
|
|
478
|
-
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
479
|
-
|
|
480
|
-
function _get(target, property, receiver) { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get(target, property, receiver || target); }
|
|
481
|
-
|
|
482
|
-
function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }
|
|
483
|
-
|
|
484
|
-
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
485
|
-
|
|
486
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
487
|
-
|
|
488
|
-
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
489
|
-
|
|
490
|
-
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
491
|
-
|
|
492
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
493
|
-
|
|
494
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
|
495
|
-
|
|
496
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
497
|
-
|
|
498
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
499
|
-
|
|
500
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
501
|
-
|
|
502
|
-
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
503
|
-
|
|
504
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
505
|
-
|
|
506
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
507
|
-
|
|
508
|
-
function _iterableToArrayLimit(arr, i) { if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
509
|
-
|
|
510
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
511
|
-
|
|
512
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
513
|
-
|
|
514
|
-
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
515
|
-
|
|
516
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
517
|
-
|
|
518
|
-
/* eslint-disable no-console */
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
/**
|
|
524
|
-
* Component class.
|
|
525
|
-
*/
|
|
526
|
-
|
|
527
|
-
var Component = /*#__PURE__*/function () {
|
|
528
|
-
function Component(Ctor, node, parent, container) {
|
|
529
|
-
var _this = this;
|
|
530
|
-
|
|
531
|
-
_classCallCheck(this, Component);
|
|
532
|
-
|
|
533
|
-
Object.assign(this, {
|
|
534
|
-
node: node,
|
|
535
|
-
uid: node.uid,
|
|
536
|
-
tag: node.tag,
|
|
537
|
-
id: node.id,
|
|
538
|
-
state: {},
|
|
539
|
-
parent: parent,
|
|
540
|
-
container: container
|
|
541
|
-
});
|
|
542
|
-
|
|
543
|
-
if (parent) {
|
|
544
|
-
this.parent = parent;
|
|
545
|
-
this.app = parent.app;
|
|
546
|
-
this.impl = new Ctor(this.getInitialState(), this);
|
|
547
|
-
} else {
|
|
548
|
-
this.impl = this.app = new Ctor(this.getInitialState(), this);
|
|
549
|
-
}
|
|
550
|
-
|
|
551
|
-
this.impl.$ = this;
|
|
552
|
-
|
|
553
|
-
if (this.refId) {
|
|
554
|
-
var hidden = this.app[this.refId];
|
|
555
|
-
this.app[this.refId] = this;
|
|
556
|
-
this.defer(function () {
|
|
557
|
-
_this.app[_this.refId] = hidden;
|
|
558
|
-
});
|
|
559
|
-
}
|
|
560
|
-
}
|
|
561
|
-
|
|
562
|
-
_createClass(Component, [{
|
|
563
|
-
key: "getInitialState",
|
|
564
|
-
value: function getInitialState() {
|
|
565
|
-
return this.node.resolveProps(this, true);
|
|
566
|
-
} // --- State
|
|
567
|
-
|
|
568
|
-
}, {
|
|
569
|
-
key: "up",
|
|
570
|
-
value: function up() {
|
|
571
|
-
var _this2 = this;
|
|
572
|
-
|
|
573
|
-
var Δ = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
574
|
-
var force = arguments.length > 1 ? arguments[1] : undefined;
|
|
575
|
-
|
|
576
|
-
if (this.isDone) {
|
|
577
|
-
return null;
|
|
578
|
-
}
|
|
579
|
-
|
|
580
|
-
if (Δ.then && Δ["catch"]) {
|
|
581
|
-
return Object(_component_utils__WEBPACK_IMPORTED_MODULE_0__["upAsync"])(this, Δ);
|
|
582
|
-
}
|
|
583
|
-
|
|
584
|
-
var changes = [];
|
|
585
|
-
Object.entries(Δ).forEach(function (_ref) {
|
|
586
|
-
var _ref2 = _slicedToArray(_ref, 2),
|
|
587
|
-
k = _ref2[0],
|
|
588
|
-
v = _ref2[1];
|
|
589
|
-
|
|
590
|
-
if (v && v.then && v["catch"]) {
|
|
591
|
-
Object(_component_utils__WEBPACK_IMPORTED_MODULE_0__["upAsync"])(_this2, v, k);
|
|
592
|
-
} else if (k && typeof v !== 'undefined' && v !== _this2.state[k]) {
|
|
593
|
-
changes.push([v, k]);
|
|
594
|
-
_this2.state[k] = v;
|
|
595
|
-
}
|
|
596
|
-
});
|
|
597
|
-
|
|
598
|
-
if (changes.length || force) {
|
|
599
|
-
if (this.impl.stateChanged) {
|
|
600
|
-
this.impl.stateChanged(changes);
|
|
601
|
-
} else {
|
|
602
|
-
changes.forEach(function (_ref3) {
|
|
603
|
-
var _ref4 = _slicedToArray(_ref3, 2),
|
|
604
|
-
v = _ref4[0],
|
|
605
|
-
k = _ref4[1];
|
|
606
|
-
|
|
607
|
-
var setter = _this2.impl[Object(_component_utils__WEBPACK_IMPORTED_MODULE_0__["methodName"])(k, 'set')];
|
|
608
|
-
|
|
609
|
-
if (setter) {
|
|
610
|
-
setter.call(_this2.impl, v);
|
|
611
|
-
} else {
|
|
612
|
-
_this2.impl[k] = v;
|
|
613
|
-
}
|
|
614
|
-
});
|
|
615
|
-
}
|
|
616
|
-
|
|
617
|
-
this.recontent();
|
|
618
|
-
|
|
619
|
-
if (this.refId) {
|
|
620
|
-
this.notify();
|
|
621
|
-
}
|
|
622
|
-
}
|
|
623
|
-
}
|
|
624
|
-
}, {
|
|
625
|
-
key: "get",
|
|
626
|
-
value: function get(propId) {
|
|
627
|
-
return Object(_component_utils__WEBPACK_IMPORTED_MODULE_0__["propGetter"])(this, propId)();
|
|
628
|
-
} // --- Left Arrow.
|
|
629
|
-
|
|
630
|
-
}, {
|
|
631
|
-
key: "notify",
|
|
632
|
-
value: function notify() {
|
|
633
|
-
if (this.listeners && !this.notifying) {
|
|
634
|
-
this.notifying = true;
|
|
635
|
-
this.listeners.forEach(function (e) {
|
|
636
|
-
return e();
|
|
637
|
-
});
|
|
638
|
-
this.notifying = false;
|
|
639
|
-
}
|
|
640
|
-
}
|
|
641
|
-
}, {
|
|
642
|
-
key: "subscribe",
|
|
643
|
-
value: function subscribe(target, fn) {
|
|
644
|
-
var _this3 = this;
|
|
645
|
-
|
|
646
|
-
var uuid = Object(_component_utils__WEBPACK_IMPORTED_MODULE_0__["nextId"])();
|
|
647
|
-
var listeners = this.listeners || (this.listeners = new Map());
|
|
648
|
-
listeners.set(uuid, function () {
|
|
649
|
-
try {
|
|
650
|
-
target.up(fn(_this3));
|
|
651
|
-
} catch (ex) {
|
|
652
|
-
console.error(_this3.tag + _this3.uid + ' notify ', ex);
|
|
653
|
-
}
|
|
654
|
-
});
|
|
655
|
-
return {
|
|
656
|
-
payload: fn(this),
|
|
657
|
-
cancel: function cancel() {
|
|
658
|
-
return listeners["delete"](uuid);
|
|
659
|
-
}
|
|
660
|
-
};
|
|
661
|
-
}
|
|
662
|
-
}, {
|
|
663
|
-
key: "connect",
|
|
664
|
-
value: function connect(key, applicator) {
|
|
665
|
-
var _key$split = key.split('.'),
|
|
666
|
-
_key$split2 = _slicedToArray(_key$split, 2),
|
|
667
|
-
refId = _key$split2[0],
|
|
668
|
-
propId = _key$split2[1];
|
|
669
|
-
|
|
670
|
-
var ref = refId === 'this' ? this.impl : this.app[refId];
|
|
671
|
-
|
|
672
|
-
if (!ref) {
|
|
673
|
-
return console.error('connect: No such ref ' + refId, key);
|
|
674
|
-
}
|
|
675
|
-
|
|
676
|
-
return ref.subscribe(this, function (c) {
|
|
677
|
-
return Object(_component_utils__WEBPACK_IMPORTED_MODULE_0__["applyValue"])(c.get(propId), applicator);
|
|
678
|
-
});
|
|
679
|
-
} // --- Right Arrow.
|
|
680
|
-
|
|
681
|
-
}, {
|
|
682
|
-
key: "emit",
|
|
683
|
-
value: function emit(key, data) {
|
|
684
|
-
var $ = this;
|
|
685
|
-
|
|
686
|
-
if (!key || !key.includes('.')) {
|
|
687
|
-
return $.up(key ? _defineProperty({}, key, data) : data);
|
|
688
|
-
}
|
|
689
|
-
|
|
690
|
-
var _key$split3 = key.split('.'),
|
|
691
|
-
_key$split4 = _slicedToArray(_key$split3, 2),
|
|
692
|
-
type = _key$split4[0],
|
|
693
|
-
target = _key$split4[1]; // const event = { data, ...data }
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
var ref = type === 'this' ? $ : $.app[type];
|
|
697
|
-
|
|
698
|
-
if (!ref) {
|
|
699
|
-
console.warn('emit: No such ref ' + type);
|
|
700
|
-
return;
|
|
701
|
-
}
|
|
702
|
-
|
|
703
|
-
try {
|
|
704
|
-
var propId = Object(_component_utils__WEBPACK_IMPORTED_MODULE_0__["methodName"])(target, 'on');
|
|
705
|
-
var impl = ref.impl;
|
|
706
|
-
var method = impl[propId];
|
|
707
|
-
|
|
708
|
-
if (!method) {
|
|
709
|
-
Function["throw"]('emit ' + type + ': No such method ' + propId);
|
|
710
|
-
}
|
|
711
|
-
|
|
712
|
-
var result = method.call(impl, data, impl, ref);
|
|
713
|
-
this.log(type + ':' + propId, result, data, impl);
|
|
714
|
-
|
|
715
|
-
if (result) {
|
|
716
|
-
ref.up(result);
|
|
717
|
-
}
|
|
718
|
-
} catch (ex) {
|
|
719
|
-
console.error('emit ' + key + ':', ex);
|
|
720
|
-
}
|
|
721
|
-
} // --- Life-cycle hooks.
|
|
722
|
-
|
|
723
|
-
}, {
|
|
724
|
-
key: "init",
|
|
725
|
-
value: function init(initials) {
|
|
726
|
-
var _this4 = this;
|
|
727
|
-
|
|
728
|
-
if (this.isDone || this.isInited) {
|
|
729
|
-
return;
|
|
730
|
-
}
|
|
731
|
-
|
|
732
|
-
this.isInited = true;
|
|
733
|
-
var all = [];
|
|
734
|
-
var initializers = this.node.initializers;
|
|
735
|
-
|
|
736
|
-
if (initializers && initializers.length) {
|
|
737
|
-
initializers.map(function (f) {
|
|
738
|
-
return f(_this4);
|
|
739
|
-
}).forEach(function (r) {
|
|
740
|
-
if (!r) return;
|
|
741
|
-
var payload = r.payload,
|
|
742
|
-
cancel = r.cancel;
|
|
743
|
-
|
|
744
|
-
_this4.defer(cancel);
|
|
745
|
-
|
|
746
|
-
if (payload && payload.then) {
|
|
747
|
-
all.push(payload);
|
|
748
|
-
} else {
|
|
749
|
-
Object.assign(initials, payload);
|
|
750
|
-
}
|
|
751
|
-
});
|
|
752
|
-
}
|
|
753
|
-
|
|
754
|
-
if (all.length) {
|
|
755
|
-
Promise.all(all).then(function (args) {
|
|
756
|
-
_this4.up(args.reduce(function (r, e) {
|
|
757
|
-
return Object.assign(r, e);
|
|
758
|
-
}, initials), true);
|
|
759
|
-
|
|
760
|
-
if (_this4.impl.init) {
|
|
761
|
-
var d = _this4.impl.init(_this4);
|
|
762
|
-
|
|
763
|
-
if (d) {
|
|
764
|
-
_this4.up(d);
|
|
765
|
-
}
|
|
766
|
-
}
|
|
767
|
-
});
|
|
768
|
-
} else {
|
|
769
|
-
this.up(initials, true);
|
|
770
|
-
|
|
771
|
-
if (this.impl.init) {
|
|
772
|
-
var d = this.impl.init(this);
|
|
773
|
-
|
|
774
|
-
if (d) {
|
|
775
|
-
this.up(d);
|
|
776
|
-
}
|
|
777
|
-
}
|
|
778
|
-
}
|
|
779
|
-
|
|
780
|
-
return this;
|
|
781
|
-
}
|
|
782
|
-
}, {
|
|
783
|
-
key: "done",
|
|
784
|
-
value: function done() {
|
|
785
|
-
var _this5 = this;
|
|
786
|
-
|
|
787
|
-
if (this.isDone) {
|
|
788
|
-
return;
|
|
789
|
-
}
|
|
790
|
-
|
|
791
|
-
this.isDone = true;
|
|
792
|
-
|
|
793
|
-
if (this.impl.done) {
|
|
794
|
-
this.impl.done(this);
|
|
795
|
-
}
|
|
796
|
-
|
|
797
|
-
if (this.children) {
|
|
798
|
-
this.children.forEach(function (c) {
|
|
799
|
-
c.parent = null;
|
|
800
|
-
c.done();
|
|
801
|
-
});
|
|
802
|
-
}
|
|
803
|
-
|
|
804
|
-
if (this.parent) {
|
|
805
|
-
this.parent.children["delete"](this.uid);
|
|
806
|
-
}
|
|
807
|
-
|
|
808
|
-
if (this.defered) {
|
|
809
|
-
this.defered.forEach(function (f) {
|
|
810
|
-
return f(_this5);
|
|
811
|
-
});
|
|
812
|
-
delete this.defered;
|
|
813
|
-
}
|
|
814
|
-
|
|
815
|
-
this.impl.$ = null;
|
|
816
|
-
['parent', 'app', 'children', 'container', 'impl', 'state'].forEach(function (k) {
|
|
817
|
-
delete _this5[k];
|
|
818
|
-
});
|
|
819
|
-
} // --- Routines.
|
|
820
|
-
|
|
821
|
-
}, {
|
|
822
|
-
key: "raceCondition",
|
|
823
|
-
value: function raceCondition(key) {
|
|
824
|
-
var COUNTERS = this.$weak || (this.$weak = new Map());
|
|
825
|
-
var counter = 1 + (COUNTERS.get(key) || 0);
|
|
826
|
-
COUNTERS.set(key, counter);
|
|
827
|
-
return function (fn) {
|
|
828
|
-
if (counter === COUNTERS.get(key)) {
|
|
829
|
-
counter = 0;
|
|
830
|
-
fn();
|
|
831
|
-
}
|
|
832
|
-
};
|
|
833
|
-
}
|
|
834
|
-
}, {
|
|
835
|
-
key: "defer",
|
|
836
|
-
value: function defer(fn) {
|
|
837
|
-
if (fn && typeof fn === 'function') {
|
|
838
|
-
(this.defered || (this.defered = [])).push(fn);
|
|
839
|
-
}
|
|
840
|
-
}
|
|
841
|
-
}, {
|
|
842
|
-
key: "log",
|
|
843
|
-
value: function log() {
|
|
844
|
-
var _console;
|
|
845
|
-
|
|
846
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
847
|
-
args[_key] = arguments[_key];
|
|
848
|
-
}
|
|
849
|
-
|
|
850
|
-
(_console = console).log.apply(_console, ['' + this.tag + '@' + this.uid].concat(args));
|
|
851
|
-
}
|
|
852
|
-
}, {
|
|
853
|
-
key: "res",
|
|
854
|
-
value: function res(key) {
|
|
855
|
-
return Object(_component_utils__WEBPACK_IMPORTED_MODULE_0__["res"])(this.app, key);
|
|
856
|
-
}
|
|
857
|
-
}, {
|
|
858
|
-
key: "pipes",
|
|
859
|
-
value: function pipes(key) {
|
|
860
|
-
return Object(_component_utils__WEBPACK_IMPORTED_MODULE_0__["pipes"])(this.app, key);
|
|
861
|
-
}
|
|
862
|
-
}, {
|
|
863
|
-
key: "toString",
|
|
864
|
-
value: function toString() {
|
|
865
|
-
return Object(_utils_js__WEBPACK_IMPORTED_MODULE_1__["stringifyComponent"])(this);
|
|
866
|
-
} // --- Content Reconciliation.
|
|
867
|
-
|
|
868
|
-
}, {
|
|
869
|
-
key: "recontent",
|
|
870
|
-
value: function recontent() {
|
|
871
|
-
_recontent(this, this.container, this.content);
|
|
872
|
-
}
|
|
873
|
-
}, {
|
|
874
|
-
key: "refId",
|
|
875
|
-
get: function get() {
|
|
876
|
-
return this.node.refId;
|
|
877
|
-
}
|
|
878
|
-
}, {
|
|
879
|
-
key: "content",
|
|
880
|
-
get: function get() {
|
|
881
|
-
return this.node.getNodes ? this.node.getNodes(this) : this.node.nodeMap;
|
|
882
|
-
}
|
|
883
|
-
}]);
|
|
884
|
-
|
|
885
|
-
return Component;
|
|
886
|
-
}();
|
|
887
|
-
|
|
888
|
-
function _recontent(parent, container, content) {
|
|
889
|
-
parent.last = parent.first = null;
|
|
890
|
-
container.app.requestReflow();
|
|
891
|
-
(parent.children || Array.EMPTY).forEach(function (c) {
|
|
892
|
-
return !content || !content.has(c.uid) ? c.done() : 0;
|
|
893
|
-
});
|
|
894
|
-
if (!content || !content.size) return;
|
|
895
|
-
var children = parent.children || (parent.children = new Map());
|
|
896
|
-
var p = null;
|
|
897
|
-
content.forEach(function (node, uid) {
|
|
898
|
-
var c = null;
|
|
899
|
-
|
|
900
|
-
if (node.tag === 'ui:slot') {
|
|
901
|
-
var snode = node.clone(node.uid);
|
|
902
|
-
snode.id = node.id;
|
|
903
|
-
snode.nodeMap = Object(_utils_js__WEBPACK_IMPORTED_MODULE_1__["filterSlotNodes"])(node.id, container);
|
|
904
|
-
c = children.get(uid) || Object(_utils_js__WEBPACK_IMPORTED_MODULE_1__["setNodeMap"])(children, new Component(Object(_register_js__WEBPACK_IMPORTED_MODULE_2__["getByTag"])('ui:fragment'), snode, parent, container.container));
|
|
905
|
-
} else {
|
|
906
|
-
var Registered = Object(_register_js__WEBPACK_IMPORTED_MODULE_2__["getByTag"])(node.tag);
|
|
907
|
-
var Ctor = Ctors[node.tag] || (Registered ? ContainerComponent : Component);
|
|
908
|
-
c = children.get(uid) || Object(_utils_js__WEBPACK_IMPORTED_MODULE_1__["setNodeMap"])(children, new Ctor(Registered || _element__WEBPACK_IMPORTED_MODULE_3__["Element"], node, parent, container));
|
|
909
|
-
}
|
|
910
|
-
|
|
911
|
-
c.next = null;
|
|
912
|
-
p = (p || parent)[p ? 'next' : 'first'] = c;
|
|
913
|
-
});
|
|
914
|
-
children.forEach(function (c) {
|
|
915
|
-
return !c.isInited ? c.init(c.node.resolveProps(c, true)) : c.up(c.node.resolveProps(c, false), true);
|
|
916
|
-
});
|
|
917
|
-
}
|
|
918
|
-
|
|
919
|
-
var ContainerComponent = /*#__PURE__*/function (_Component) {
|
|
920
|
-
_inherits(ContainerComponent, _Component);
|
|
921
|
-
|
|
922
|
-
var _super = _createSuper(ContainerComponent);
|
|
923
|
-
|
|
924
|
-
function ContainerComponent() {
|
|
925
|
-
_classCallCheck(this, ContainerComponent);
|
|
926
|
-
|
|
927
|
-
return _super.apply(this, arguments);
|
|
928
|
-
}
|
|
929
|
-
|
|
930
|
-
_createClass(ContainerComponent, [{
|
|
931
|
-
key: "recontent",
|
|
932
|
-
value: function recontent() {
|
|
933
|
-
_recontent(this, this, this.impl.constructor.getTemplate());
|
|
934
|
-
}
|
|
935
|
-
}]);
|
|
936
|
-
|
|
937
|
-
return ContainerComponent;
|
|
938
|
-
}(Component);
|
|
939
|
-
|
|
940
|
-
var ForComponent = /*#__PURE__*/function (_Component2) {
|
|
941
|
-
_inherits(ForComponent, _Component2);
|
|
942
|
-
|
|
943
|
-
var _super2 = _createSuper(ForComponent);
|
|
944
|
-
|
|
945
|
-
function ForComponent() {
|
|
946
|
-
_classCallCheck(this, ForComponent);
|
|
947
|
-
|
|
948
|
-
return _super2.apply(this, arguments);
|
|
949
|
-
}
|
|
950
|
-
|
|
951
|
-
_createClass(ForComponent, [{
|
|
952
|
-
key: "recontent",
|
|
953
|
-
value: function recontent() {
|
|
954
|
-
var nodes = new Map();
|
|
955
|
-
var items = this.state.items;
|
|
956
|
-
|
|
957
|
-
if (items && items.length) {
|
|
958
|
-
if (!items.forEach) {
|
|
959
|
-
Function["throw"]('[ui:for] Items has no forEach() ' + items);
|
|
960
|
-
}
|
|
961
|
-
|
|
962
|
-
var itemNode = this.node.nodes[0];
|
|
963
|
-
var itemName = itemNode.get('itemName');
|
|
964
|
-
var pkHash = {};
|
|
965
|
-
items.forEach(function (datum) {
|
|
966
|
-
var pk = "".concat(datum.id || '');
|
|
967
|
-
|
|
968
|
-
if (!pk || pkHash[pk]) {
|
|
969
|
-
console.error('ERROR: wrong item id: ' + pk, datum);
|
|
970
|
-
return;
|
|
971
|
-
}
|
|
972
|
-
|
|
973
|
-
pkHash[pk] = pk;
|
|
974
|
-
Object(_utils_js__WEBPACK_IMPORTED_MODULE_1__["setNodeMap"])(nodes, itemNode.clone(pk).addPropertyResolver(function (c) {
|
|
975
|
-
return datum;
|
|
976
|
-
}, itemName));
|
|
977
|
-
});
|
|
978
|
-
}
|
|
979
|
-
|
|
980
|
-
_recontent(this, this.container, nodes);
|
|
981
|
-
}
|
|
982
|
-
}]);
|
|
983
|
-
|
|
984
|
-
return ForComponent;
|
|
985
|
-
}(Component);
|
|
986
|
-
|
|
987
|
-
var ItemComponent = /*#__PURE__*/function (_Component3) {
|
|
988
|
-
_inherits(ItemComponent, _Component3);
|
|
989
|
-
|
|
990
|
-
var _super3 = _createSuper(ItemComponent);
|
|
991
|
-
|
|
992
|
-
function ItemComponent() {
|
|
993
|
-
_classCallCheck(this, ItemComponent);
|
|
994
|
-
|
|
995
|
-
return _super3.apply(this, arguments);
|
|
996
|
-
}
|
|
997
|
-
|
|
998
|
-
_createClass(ItemComponent, [{
|
|
999
|
-
key: "recontent",
|
|
1000
|
-
value: function recontent() {
|
|
1001
|
-
_recontent(this, this, this.content);
|
|
1002
|
-
}
|
|
1003
|
-
}, {
|
|
1004
|
-
key: "emit",
|
|
1005
|
-
value: function emit(key, data) {
|
|
1006
|
-
return this.container.emit(key, data);
|
|
1007
|
-
}
|
|
1008
|
-
}, {
|
|
1009
|
-
key: "get",
|
|
1010
|
-
value: function get(propId) {
|
|
1011
|
-
return propId.startsWith(this.state.itemName) ? _get(_getPrototypeOf(ItemComponent.prototype), "get", this).call(this, propId) : this.container.get(propId);
|
|
1012
|
-
}
|
|
1013
|
-
}]);
|
|
1014
|
-
|
|
1015
|
-
return ItemComponent;
|
|
1016
|
-
}(Component);
|
|
1017
|
-
|
|
1018
|
-
var Ctors = {
|
|
1019
|
-
'ui:fragment': Component,
|
|
1020
|
-
'ui:for': ForComponent,
|
|
1021
|
-
'ui:item': ItemComponent
|
|
1022
|
-
};
|
|
1023
|
-
|
|
1024
|
-
/***/ }),
|
|
1025
|
-
|
|
1026
|
-
/***/ "./lib/component.utils.js":
|
|
1
|
+
!function webpackUniversalModuleDefinition(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var r=t();for(var n in r)("object"==typeof exports?exports:e)[n]=r[n]}}(this,(function(){return function(e){var t={};function __webpack_require__(r){if(t[r])return t[r].exports;var n=t[r]={i:r,l:!1,exports:{}};return e[r].call(n.exports,n,n.exports,__webpack_require__),n.l=!0,n.exports}return __webpack_require__.m=e,__webpack_require__.c=t,__webpack_require__.d=function(e,t,r){__webpack_require__.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},__webpack_require__.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},__webpack_require__.t=function(e,t){if(1&t&&(e=__webpack_require__(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(__webpack_require__.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)__webpack_require__.d(r,n,function(t){return e[t]}.bind(null,n));return r},__webpack_require__.n=function(e){var t=e&&e.__esModule?function getDefault(){return e.default}:function getModuleExports(){return e};return __webpack_require__.d(t,"a",t),t},__webpack_require__.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},__webpack_require__.p="",__webpack_require__(__webpack_require__.s=0)}({"./core-web/WebPlatform.ts":
|
|
2
|
+
/*!*********************************!*\
|
|
3
|
+
!*** ./core-web/WebPlatform.ts ***!
|
|
4
|
+
\*********************************/
|
|
5
|
+
/*! no static exports found */function(e,t,r){var n=r(/*! @babel/runtime/helpers/interopRequireDefault */"./node_modules/@babel/runtime/helpers/interopRequireDefault.js");Object.defineProperty(t,"__esModule",{value:!0}),t.WebPlatform=void 0;var o=n(r(/*! @babel/runtime/helpers/classCallCheck */"./node_modules/@babel/runtime/helpers/classCallCheck.js")),i=n(r(/*! @babel/runtime/helpers/createClass */"./node_modules/@babel/runtime/helpers/createClass.js")),u=r(/*! ./elements */"./core-web/elements.ts"),s=r(/*! ./reflow */"./core-web/reflow.ts"),l=function(){function WebPlatform(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"root";(0,o.default)(this,WebPlatform),"string"==typeof e&&(e=document.getElementById(e)||window.document.body),this.rootElement=e||window.document.body}return(0,i.default)(WebPlatform,[{key:"createTextElement",value:function createTextElement(e,t){return new u.DomTextElement(e)}},{key:"createElement",value:function createElement(e,t,r){return new u.DomElement(e,t,r)}},{key:"reflow",value:function reflow(e){(0,s.reflow)(e,this.rootElement)}}]),WebPlatform}();t.WebPlatform=l},"./core-web/attributes.ts":
|
|
1027
6
|
/*!********************************!*\
|
|
1028
|
-
!*** ./
|
|
7
|
+
!*** ./core-web/attributes.ts ***!
|
|
1029
8
|
\********************************/
|
|
1030
|
-
/*! exports
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
function
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
function
|
|
1047
|
-
|
|
1048
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
1049
|
-
|
|
1050
|
-
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); }
|
|
1051
|
-
|
|
1052
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
1053
|
-
|
|
1054
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
1055
|
-
|
|
1056
|
-
var COUNTER = 1;
|
|
1057
|
-
|
|
1058
|
-
var fnId = function fnId(e) {
|
|
1059
|
-
return e;
|
|
1060
|
-
};
|
|
1061
|
-
|
|
1062
|
-
var nextId = function nextId() {
|
|
1063
|
-
var p = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
1064
|
-
return p + COUNTER++;
|
|
1065
|
-
};
|
|
1066
|
-
var applyValue = function applyValue(value) {
|
|
1067
|
-
var fn = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : fnId;
|
|
1068
|
-
return value && value.then ? value.then(fn) : fn(value);
|
|
1069
|
-
};
|
|
1070
|
-
var methodName = function methodName(x) {
|
|
1071
|
-
var pre = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
|
|
1072
|
-
|
|
1073
|
-
if (!x) {
|
|
1074
|
-
return pre;
|
|
1075
|
-
}
|
|
1076
|
-
|
|
1077
|
-
var s = "".concat(x);
|
|
1078
|
-
return pre + s[0].toUpperCase() + s.slice(1);
|
|
1079
|
-
};
|
|
1080
|
-
var upAsync = function upAsync($, promise, key) {
|
|
1081
|
-
var racer = $.raceCondition('set:' + (key || 'up'));
|
|
1082
|
-
|
|
1083
|
-
var up = function up(r) {
|
|
1084
|
-
return racer(function () {
|
|
1085
|
-
return $.up(r);
|
|
1086
|
-
});
|
|
1087
|
-
};
|
|
1088
|
-
|
|
1089
|
-
if (key && key !== '...') {
|
|
1090
|
-
var akey = key.replace('Promise', '');
|
|
1091
|
-
promise.then(function (val) {
|
|
1092
|
-
var _up;
|
|
1093
|
-
|
|
1094
|
-
return up((_up = {}, _defineProperty(_up, akey + 'Error', null), _defineProperty(_up, akey, val), _up));
|
|
1095
|
-
}, function (error) {
|
|
1096
|
-
return up(_defineProperty({}, akey + 'Error', error));
|
|
1097
|
-
});
|
|
1098
|
-
} else {
|
|
1099
|
-
promise.then(up, function (error) {
|
|
1100
|
-
return up({
|
|
1101
|
-
error: error
|
|
1102
|
-
});
|
|
1103
|
-
});
|
|
1104
|
-
}
|
|
1105
|
-
|
|
1106
|
-
return promise;
|
|
1107
|
-
};
|
|
1108
|
-
var propGetter = function propGetter($, key) {
|
|
1109
|
-
var map = $.$propFnMap || ($.$propFnMap = {});
|
|
1110
|
-
var fn = map[key];
|
|
1111
|
-
|
|
1112
|
-
if (fn) {
|
|
1113
|
-
return fn;
|
|
1114
|
-
}
|
|
1115
|
-
|
|
1116
|
-
var impl = $.impl;
|
|
1117
|
-
var instant = impl[key];
|
|
1118
|
-
|
|
1119
|
-
if (instant && typeof instant === 'function') {
|
|
1120
|
-
var bound = instant.bind(impl);
|
|
1121
|
-
|
|
1122
|
-
fn = function fn() {
|
|
1123
|
-
return bound;
|
|
1124
|
-
};
|
|
1125
|
-
} else {
|
|
1126
|
-
var _key$split = key.split('.'),
|
|
1127
|
-
_key$split2 = _toArray(_key$split),
|
|
1128
|
-
pk = _key$split2[0],
|
|
1129
|
-
path = _key$split2.slice(1);
|
|
1130
|
-
|
|
1131
|
-
var gettr = impl[methodName(pk, 'get')];
|
|
1132
|
-
var fn0 = gettr ? function () {
|
|
1133
|
-
return gettr.call(impl);
|
|
1134
|
-
} : function () {
|
|
1135
|
-
return impl[pk];
|
|
1136
|
-
};
|
|
1137
|
-
fn = !path.length ? fn0 : function () {
|
|
1138
|
-
return path.reduce(function (r, p) {
|
|
1139
|
-
return r && p in r ? r[p] : undefined;
|
|
1140
|
-
}, fn0());
|
|
1141
|
-
};
|
|
1142
|
-
}
|
|
1143
|
-
|
|
1144
|
-
map[key] = fn;
|
|
1145
|
-
return fn;
|
|
1146
|
-
};
|
|
1147
|
-
var res = function res(app, key) {
|
|
1148
|
-
var _key$split3 = key.split('.'),
|
|
1149
|
-
_key$split4 = _toArray(_key$split3),
|
|
1150
|
-
id = _key$split4[0],
|
|
1151
|
-
deep = _key$split4.slice(1);
|
|
1152
|
-
|
|
1153
|
-
var target = id === 'app' ? app : app.resources[id];
|
|
1154
|
-
|
|
1155
|
-
if (!target || deep.length === 0) {
|
|
1156
|
-
return target;
|
|
1157
|
-
}
|
|
1158
|
-
|
|
1159
|
-
if (deep.length === 1) {
|
|
1160
|
-
return target[deep[0]];
|
|
1161
|
-
}
|
|
1162
|
-
|
|
1163
|
-
return deep.reduce(function (r, k) {
|
|
1164
|
-
return r ? r[k] : null;
|
|
1165
|
-
}, target);
|
|
1166
|
-
};
|
|
1167
|
-
var pipes = function pipes(app, key) {
|
|
1168
|
-
var _key$split5 = key.split('.'),
|
|
1169
|
-
_key$split6 = _toArray(_key$split5),
|
|
1170
|
-
id = _key$split6[0],
|
|
1171
|
-
deep = _key$split6.slice(1);
|
|
1172
|
-
|
|
1173
|
-
var target = app.pipes && app.pipes[id];
|
|
1174
|
-
|
|
1175
|
-
if (!target || deep.length === 0) {
|
|
1176
|
-
return target;
|
|
1177
|
-
}
|
|
1178
|
-
|
|
1179
|
-
if (deep.length === 1) {
|
|
1180
|
-
return target[deep[0]];
|
|
1181
|
-
}
|
|
1182
|
-
|
|
1183
|
-
return deep.reduce(function (r, k) {
|
|
1184
|
-
return r ? r[k] : null;
|
|
1185
|
-
}, target);
|
|
1186
|
-
};
|
|
1187
|
-
|
|
1188
|
-
/***/ }),
|
|
1189
|
-
|
|
1190
|
-
/***/ "./lib/dom.attrs.js":
|
|
1191
|
-
/*!**************************!*\
|
|
1192
|
-
!*** ./lib/dom.attrs.js ***!
|
|
1193
|
-
\**************************/
|
|
1194
|
-
/*! exports provided: applyAttributes, cleanupAttributes */
|
|
1195
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1196
|
-
|
|
1197
|
-
"use strict";
|
|
1198
|
-
__webpack_require__.r(__webpack_exports__);
|
|
1199
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "applyAttributes", function() { return applyAttributes; });
|
|
1200
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cleanupAttributes", function() { return cleanupAttributes; });
|
|
1201
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
1202
|
-
|
|
1203
|
-
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
1204
|
-
|
|
1205
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
1206
|
-
|
|
1207
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
1208
|
-
|
|
1209
|
-
function _iterableToArrayLimit(arr, i) { if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
1210
|
-
|
|
1211
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
1212
|
-
|
|
1213
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
|
1214
|
-
|
|
1215
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
1216
|
-
|
|
1217
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
1218
|
-
|
|
1219
|
-
var camelize = function camelize(key) {
|
|
1220
|
-
var sep = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '_';
|
|
1221
|
-
var jn = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : ' ';
|
|
1222
|
-
return ('' + key).split(sep).map(function (s, i) {
|
|
1223
|
-
return i ? s[0].toUpperCase() + s.slice(1) : s;
|
|
1224
|
-
}).join(jn);
|
|
1225
|
-
}; // DOM
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
var ATTR_SETTERS = {
|
|
1229
|
-
'#text': function text(e, v) {
|
|
1230
|
-
return e.textContent = v == null ? '' : v;
|
|
1231
|
-
},
|
|
1232
|
-
disabled: function disabled(e, v) {
|
|
1233
|
-
return e.disabled = v ? true : null;
|
|
1234
|
-
},
|
|
1235
|
-
"class": function _class(e, v) {
|
|
1236
|
-
e.className = v;
|
|
1237
|
-
},
|
|
1238
|
-
selected: function selected(e, v) {
|
|
1239
|
-
return e.selected = v ? true : null;
|
|
1240
|
-
},
|
|
1241
|
-
value: function value(e, v) {
|
|
1242
|
-
return e.value = v == null ? '' : v;
|
|
1243
|
-
},
|
|
1244
|
-
checked: function checked(e, v) {
|
|
1245
|
-
return e.checked = !!v;
|
|
1246
|
-
},
|
|
1247
|
-
init: function init(e, v) {
|
|
1248
|
-
var _this = this;
|
|
1249
|
-
|
|
1250
|
-
this.init = function () {
|
|
1251
|
-
return v(e, _this);
|
|
1252
|
-
};
|
|
1253
|
-
},
|
|
1254
|
-
data: function data(e, v) {
|
|
1255
|
-
if (v && e.$dataset) {
|
|
1256
|
-
Object.keys(e.$dataset).forEach(function (k) {
|
|
1257
|
-
if (v[k] == null) {
|
|
1258
|
-
e.dataset[camelize(k, '-', '')] = null;
|
|
1259
|
-
}
|
|
1260
|
-
});
|
|
1261
|
-
e.$dataset = _objectSpread(_objectSpread({}, e.$dataset), v);
|
|
1262
|
-
} else {
|
|
1263
|
-
e.$dataset = v ? _objectSpread({}, v) : e.$dataset || {};
|
|
1264
|
-
}
|
|
1265
|
-
|
|
1266
|
-
if (v) {
|
|
1267
|
-
Object.keys(v).forEach(function (k) {
|
|
1268
|
-
e.dataset[camelize(k, '-', '')] = v[k];
|
|
1269
|
-
});
|
|
1270
|
-
}
|
|
1271
|
-
},
|
|
1272
|
-
click: function click(e, v) {
|
|
1273
|
-
var _this2 = this;
|
|
1274
|
-
|
|
1275
|
-
setAttribute.call(this, 'click:click', !v ? null : function (ev) {
|
|
1276
|
-
_this2.$attributes.click(_objectSpread({}, e.$dataset), ev);
|
|
1277
|
-
|
|
1278
|
-
return false;
|
|
1279
|
-
});
|
|
1280
|
-
},
|
|
1281
|
-
'bubble-click': function bubbleClick(e, v) {
|
|
1282
|
-
var _this3 = this;
|
|
1283
|
-
|
|
1284
|
-
setAttribute.call(this, 'bubbled-click:click', !v ? null : function (ev) {
|
|
1285
|
-
_this3.$attributes['bubble-click'](_objectSpread({}, e.$dataset), ev);
|
|
1286
|
-
|
|
1287
|
-
return true;
|
|
1288
|
-
});
|
|
1289
|
-
},
|
|
1290
|
-
blur: function blur(e, v) {
|
|
1291
|
-
var _this4 = this;
|
|
1292
|
-
|
|
1293
|
-
setAttribute.call(this, 'blur:blur', !v ? null : function (ev) {
|
|
1294
|
-
_this4.$attributes.blur(_objectSpread({}, e.$dataset), ev);
|
|
1295
|
-
|
|
1296
|
-
return false;
|
|
1297
|
-
});
|
|
1298
|
-
},
|
|
1299
|
-
dblclick: function dblclick(e, v) {
|
|
1300
|
-
var _this5 = this;
|
|
1301
|
-
|
|
1302
|
-
setAttribute.call(this, 'dblclick:dblclick', !v ? null : function (ev) {
|
|
1303
|
-
_this5.$attributes.dblclick(_objectSpread({}, e.$dataset), ev);
|
|
1304
|
-
|
|
1305
|
-
return false;
|
|
1306
|
-
});
|
|
1307
|
-
},
|
|
1308
|
-
scroll: function scroll(e, v) {
|
|
1309
|
-
var _this6 = this;
|
|
1310
|
-
|
|
1311
|
-
setAttribute.call(this, 'scroll:scroll', !v ? null : function (ev) {
|
|
1312
|
-
_this6.$attributes.scroll(_objectSpread({}, e.$dataset), ev);
|
|
1313
|
-
|
|
1314
|
-
return false;
|
|
1315
|
-
});
|
|
1316
|
-
},
|
|
1317
|
-
touchstart: function touchstart(e, v) {
|
|
1318
|
-
var _this7 = this;
|
|
1319
|
-
|
|
1320
|
-
var h = !v ? null : function (ev) {
|
|
1321
|
-
_this7.$attributes.touchstart(_objectSpread(_objectSpread({}, e.$dataset), {}, {
|
|
1322
|
-
x: ev.pageX || ev.changedTouches[0].screenX,
|
|
1323
|
-
y: ev.pageY || ev.changedTouches[0].screenY
|
|
1324
|
-
}), ev);
|
|
1325
|
-
|
|
1326
|
-
return false;
|
|
1327
|
-
};
|
|
1328
|
-
setAttribute.call(this, 'touchstart:touchstart', h);
|
|
1329
|
-
setAttribute.call(this, 'touchstart:mousedown', h);
|
|
1330
|
-
},
|
|
1331
|
-
touch: function touch(e, v) {
|
|
1332
|
-
var _this8 = this;
|
|
1333
|
-
|
|
1334
|
-
var data = _objectSpread({}, e.$dataset);
|
|
1335
|
-
|
|
1336
|
-
var hs = !v ? null : function (ev) {
|
|
1337
|
-
data.active = true;
|
|
1338
|
-
data.x = ev.pageX || ev.changedTouches[0].screenX;
|
|
1339
|
-
data.y = ev.pageY || ev.changedTouches[0].screenY;
|
|
1340
|
-
return false;
|
|
1341
|
-
};
|
|
1342
|
-
setAttribute.call(this, 'touch:touchstart', hs);
|
|
1343
|
-
setAttribute.call(this, 'touch:mousedown', hs);
|
|
1344
|
-
var h = !v ? function () {
|
|
1345
|
-
return null;
|
|
1346
|
-
} : function (stop) {
|
|
1347
|
-
return function (ev) {
|
|
1348
|
-
if (data.active) {
|
|
1349
|
-
data.active = !stop;
|
|
1350
|
-
data.xx = ev.pageX || ev.changedTouches[0].screenX;
|
|
1351
|
-
data.yy = ev.pageY || ev.changedTouches[0].screenY;
|
|
1352
|
-
data.dx = data.xx - data.x;
|
|
1353
|
-
data.dy = data.yy - data.y;
|
|
1354
|
-
|
|
1355
|
-
_this8.$attributes.touch(data, ev);
|
|
1356
|
-
}
|
|
1357
|
-
|
|
1358
|
-
return false;
|
|
1359
|
-
};
|
|
1360
|
-
};
|
|
1361
|
-
setAttribute.call(this, 'touch:touchcancel', h(true));
|
|
1362
|
-
setAttribute.call(this, 'touch:touchend', h(true));
|
|
1363
|
-
setAttribute.call(this, 'touch:mouseup', h(true));
|
|
1364
|
-
setAttribute.call(this, 'touch:touchmove', h(false));
|
|
1365
|
-
setAttribute.call(this, 'touch:mousemove', h(false));
|
|
1366
|
-
},
|
|
1367
|
-
error: function error(e, v) {
|
|
1368
|
-
var _this9 = this;
|
|
1369
|
-
|
|
1370
|
-
setAttribute.call(this, 'error:error', !v ? null : function (ev) {
|
|
1371
|
-
var fn = _this9.getAttribute('error');
|
|
1372
|
-
|
|
1373
|
-
fn && fn(_objectSpread({}, e.$dataset), ev);
|
|
1374
|
-
return false;
|
|
1375
|
-
});
|
|
1376
|
-
},
|
|
1377
|
-
keypress: function keypress(e, v) {
|
|
1378
|
-
var _this10 = this;
|
|
1379
|
-
|
|
1380
|
-
setAttribute.call(this, 'keypress:keyup', !v ? null : function (ev) {
|
|
1381
|
-
if (ev.keyCode !== 13 && ev.keyCode !== 27) {
|
|
1382
|
-
var fn = _this10.$attributes.keypress;
|
|
1383
|
-
fn && fn(_objectSpread({
|
|
1384
|
-
value: e.value
|
|
1385
|
-
}, e.$dataset), ev);
|
|
1386
|
-
setTimeout(function () {
|
|
1387
|
-
return e.focus();
|
|
1388
|
-
}, 0);
|
|
1389
|
-
}
|
|
1390
|
-
|
|
1391
|
-
return false;
|
|
1392
|
-
});
|
|
1393
|
-
},
|
|
1394
|
-
enter: function enter(e, v) {
|
|
1395
|
-
var _this11 = this;
|
|
1396
|
-
|
|
1397
|
-
setAttribute.call(this, 'enter:keyup', !v ? null : function (ev) {
|
|
1398
|
-
if (ev.keyCode === 13) {
|
|
1399
|
-
_this11.$attributes.enter(_objectSpread({
|
|
1400
|
-
value: e.value
|
|
1401
|
-
}, e.$dataset), ev);
|
|
1402
|
-
}
|
|
1403
|
-
|
|
1404
|
-
if (ev.keyCode === 13 || ev.keyCode === 27) {
|
|
1405
|
-
e.blur();
|
|
1406
|
-
}
|
|
1407
|
-
|
|
1408
|
-
return false;
|
|
1409
|
-
});
|
|
1410
|
-
},
|
|
1411
|
-
change: function change(e, v) {
|
|
1412
|
-
var _this12 = this;
|
|
1413
|
-
|
|
1414
|
-
setAttribute.call(this, 'change:change', !v ? null : function (ev) {
|
|
1415
|
-
_this12.$attributes.change(_objectSpread({
|
|
1416
|
-
value: e.value
|
|
1417
|
-
}, e.$dataset), ev);
|
|
1418
|
-
|
|
1419
|
-
return false;
|
|
1420
|
-
});
|
|
1421
|
-
},
|
|
1422
|
-
toggle: function toggle(e, v) {
|
|
1423
|
-
var _this13 = this;
|
|
1424
|
-
|
|
1425
|
-
setAttribute.call(this, 'toggle:change', !v ? null : function (ev) {
|
|
1426
|
-
_this13.$attributes.toggle(_objectSpread({
|
|
1427
|
-
value: e.checked
|
|
1428
|
-
}, e.$dataset), ev);
|
|
1429
|
-
|
|
1430
|
-
return false;
|
|
1431
|
-
});
|
|
1432
|
-
}
|
|
1433
|
-
};
|
|
1434
|
-
function applyAttributes(changes) {
|
|
1435
|
-
var _this14 = this;
|
|
1436
|
-
|
|
1437
|
-
var attrs = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.$attributes || (this.$attributes = {});
|
|
1438
|
-
var e = this.elt;
|
|
1439
|
-
changes.forEach(function (_ref) {
|
|
1440
|
-
var _ref2 = _slicedToArray(_ref, 2),
|
|
1441
|
-
value = _ref2[0],
|
|
1442
|
-
key = _ref2[1];
|
|
1443
|
-
|
|
1444
|
-
if (value !== attrs[key]) {
|
|
1445
|
-
var setter = ATTR_SETTERS[key];
|
|
1446
|
-
|
|
1447
|
-
if (setter) {
|
|
1448
|
-
setter.call(_this14, e, value);
|
|
1449
|
-
} else {
|
|
1450
|
-
setAttribute.call(_this14, key, value);
|
|
1451
|
-
}
|
|
1452
|
-
}
|
|
1453
|
-
|
|
1454
|
-
attrs[key] = value;
|
|
1455
|
-
});
|
|
1456
|
-
}
|
|
1457
|
-
function cleanupAttributes() {
|
|
1458
|
-
this.$attributes = null;
|
|
1459
|
-
}
|
|
1460
|
-
|
|
1461
|
-
function setAttribute(key, value) {
|
|
1462
|
-
var _this15 = this;
|
|
1463
|
-
|
|
1464
|
-
if (value != null) {
|
|
1465
|
-
if (typeof value === 'function') {
|
|
1466
|
-
var fnValue = function fnValue() {
|
|
1467
|
-
if (!_this15.isDone) {
|
|
1468
|
-
value.apply(void 0, arguments);
|
|
1469
|
-
}
|
|
1470
|
-
};
|
|
1471
|
-
|
|
1472
|
-
if (!this.listeners) {
|
|
1473
|
-
this.listeners = new Map();
|
|
1474
|
-
}
|
|
1475
|
-
|
|
1476
|
-
if (!this.listeners.has(key)) {
|
|
1477
|
-
var _key$split = key.split(':'),
|
|
1478
|
-
_key$split2 = _slicedToArray(_key$split, 2),
|
|
1479
|
-
akey = _key$split2[0],
|
|
1480
|
-
_key$split2$ = _key$split2[1],
|
|
1481
|
-
ekey = _key$split2$ === void 0 ? akey : _key$split2$;
|
|
1482
|
-
|
|
1483
|
-
this.elt.addEventListener(ekey, fnValue, false);
|
|
1484
|
-
this.listeners.set(key, fnValue);
|
|
1485
|
-
}
|
|
1486
|
-
} else {
|
|
1487
|
-
this.elt.setAttribute(key, value);
|
|
1488
|
-
}
|
|
1489
|
-
} else {
|
|
1490
|
-
if (this.listeners && this.listeners.has(key)) {
|
|
1491
|
-
var _key$split3 = key.split(':'),
|
|
1492
|
-
_key$split4 = _slicedToArray(_key$split3, 2),
|
|
1493
|
-
_akey = _key$split4[0],
|
|
1494
|
-
_key$split4$ = _key$split4[1],
|
|
1495
|
-
_ekey = _key$split4$ === void 0 ? _akey : _key$split4$;
|
|
1496
|
-
|
|
1497
|
-
this.elt.removeEventListener(_ekey, this.listeners.get(key));
|
|
1498
|
-
this.listeners["delete"](key);
|
|
1499
|
-
} else {
|
|
1500
|
-
this.elt.removeAttribute(key);
|
|
1501
|
-
}
|
|
1502
|
-
}
|
|
1503
|
-
}
|
|
1504
|
-
|
|
1505
|
-
/***/ }),
|
|
1506
|
-
|
|
1507
|
-
/***/ "./lib/element.js":
|
|
1508
|
-
/*!************************!*\
|
|
1509
|
-
!*** ./lib/element.js ***!
|
|
1510
|
-
\************************/
|
|
1511
|
-
/*! exports provided: Element */
|
|
1512
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1513
|
-
|
|
1514
|
-
"use strict";
|
|
1515
|
-
__webpack_require__.r(__webpack_exports__);
|
|
1516
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Element", function() { return Element; });
|
|
1517
|
-
/* harmony import */ var _dom_attrs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./dom.attrs */ "./lib/dom.attrs.js");
|
|
1518
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
1519
|
-
|
|
1520
|
-
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
1521
|
-
|
|
1522
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
var Element = /*#__PURE__*/function () {
|
|
1526
|
-
function Element(attrs, $, elt) {
|
|
1527
|
-
_classCallCheck(this, Element);
|
|
1528
|
-
|
|
1529
|
-
this.$ = $;
|
|
1530
|
-
this.$.isElementary = true;
|
|
1531
|
-
this.elt = elt || ($.tag === '#text' ? document.createTextNode('') : document.createElement($.tag));
|
|
1532
|
-
this.elt.impl = this;
|
|
1533
|
-
}
|
|
1534
|
-
|
|
1535
|
-
_createClass(Element, [{
|
|
1536
|
-
key: "done",
|
|
1537
|
-
value: function done() {
|
|
1538
|
-
this.elt.parentElement && this.elt.parentElement.removeChild(this.elt);
|
|
1539
|
-
_dom_attrs__WEBPACK_IMPORTED_MODULE_0__["cleanupAttributes"].call(this);
|
|
1540
|
-
this.elt = null;
|
|
1541
|
-
}
|
|
1542
|
-
}, {
|
|
1543
|
-
key: "stateChanged",
|
|
1544
|
-
value: function stateChanged(attrs) {
|
|
1545
|
-
_dom_attrs__WEBPACK_IMPORTED_MODULE_0__["applyAttributes"].call(this, attrs);
|
|
1546
|
-
}
|
|
1547
|
-
}]);
|
|
1548
|
-
|
|
1549
|
-
return Element;
|
|
1550
|
-
}();
|
|
1551
|
-
|
|
1552
|
-
/***/ }),
|
|
1553
|
-
|
|
1554
|
-
/***/ "./lib/index.js":
|
|
1555
|
-
/*!**********************!*\
|
|
1556
|
-
!*** ./lib/index.js ***!
|
|
1557
|
-
\**********************/
|
|
1558
|
-
/*! exports provided: launch */
|
|
1559
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1560
|
-
|
|
1561
|
-
"use strict";
|
|
1562
|
-
__webpack_require__.r(__webpack_exports__);
|
|
1563
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "launch", function() { return launch; });
|
|
1564
|
-
/* harmony import */ var _component_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./component.js */ "./lib/component.js");
|
|
1565
|
-
/* harmony import */ var _register_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./register.js */ "./lib/register.js");
|
|
1566
|
-
/* harmony import */ var _node__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./node */ "./lib/node.js");
|
|
1567
|
-
/* harmony import */ var _types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../types */ "./types/index.js");
|
|
1568
|
-
/* harmony import */ var _pipes__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../pipes */ "./pipes/index.js");
|
|
1569
|
-
/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./utils.js */ "./lib/utils.js");
|
|
1570
|
-
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
1571
|
-
|
|
1572
|
-
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
1573
|
-
|
|
1574
|
-
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
1575
|
-
|
|
1576
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
1577
|
-
|
|
1578
|
-
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); }
|
|
1579
|
-
|
|
1580
|
-
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
1581
|
-
|
|
1582
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
1583
|
-
|
|
1584
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
|
1585
|
-
|
|
1586
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
1587
|
-
|
|
1588
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
1589
|
-
|
|
1590
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
1591
|
-
|
|
1592
|
-
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
1593
|
-
|
|
1594
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
1595
|
-
|
|
1596
|
-
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
1597
|
-
|
|
1598
|
-
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
function launch() {
|
|
1607
|
-
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
1608
|
-
types = _ref.types,
|
|
1609
|
-
_ref$template = _ref.template,
|
|
1610
|
-
template = _ref$template === void 0 ? '<App/>' : _ref$template,
|
|
1611
|
-
_ref$rootElement = _ref.rootElement,
|
|
1612
|
-
rootElement = _ref$rootElement === void 0 ? document.body : _ref$rootElement,
|
|
1613
|
-
pipes = _ref.pipes,
|
|
1614
|
-
props = _objectWithoutProperties(_ref, ["types", "template", "rootElement", "pipes"]);
|
|
1615
|
-
|
|
1616
|
-
var $AppContext = /*#__PURE__*/function () {
|
|
1617
|
-
function $AppContext() {
|
|
1618
|
-
var _this = this;
|
|
1619
|
-
|
|
1620
|
-
_classCallCheck(this, $AppContext);
|
|
1621
|
-
|
|
1622
|
-
this.elt = rootElement;
|
|
1623
|
-
this.app = this;
|
|
1624
|
-
this.pipes = _objectSpread(_objectSpread({}, _pipes__WEBPACK_IMPORTED_MODULE_4__["default"]), pipes);
|
|
1625
|
-
|
|
1626
|
-
this.reflow = function () {
|
|
1627
|
-
Object(_utils_js__WEBPACK_IMPORTED_MODULE_5__["arrangeElements"])(_this.$, _this.elt);
|
|
1628
|
-
_this.reflowId = null;
|
|
1629
|
-
};
|
|
1630
|
-
}
|
|
1631
|
-
|
|
1632
|
-
_createClass($AppContext, [{
|
|
1633
|
-
key: "requestReflow",
|
|
1634
|
-
value: function requestReflow() {
|
|
1635
|
-
if (this.reflowId) return;
|
|
1636
|
-
this.reflowId = setTimeout(this.reflow, 10);
|
|
1637
|
-
}
|
|
1638
|
-
}]);
|
|
1639
|
-
|
|
1640
|
-
return $AppContext;
|
|
1641
|
-
}();
|
|
1642
|
-
|
|
1643
|
-
Object(_register_js__WEBPACK_IMPORTED_MODULE_1__["registerTypes"])([Object.assign($AppContext, {
|
|
1644
|
-
template: template
|
|
1645
|
-
})].concat(_toConsumableArray(_types__WEBPACK_IMPORTED_MODULE_3__["default"]), _toConsumableArray(types)));
|
|
1646
|
-
var top = new _component_js__WEBPACK_IMPORTED_MODULE_0__["ContainerComponent"]($AppContext, new _node__WEBPACK_IMPORTED_MODULE_2__["Node"]('#top'));
|
|
1647
|
-
top.up(props);
|
|
1648
|
-
return top.impl;
|
|
1649
|
-
}
|
|
1650
|
-
|
|
1651
|
-
if ((typeof window === "undefined" ? "undefined" : _typeof(window)) === 'object') {
|
|
1652
|
-
window.launch = launch;
|
|
1653
|
-
}
|
|
1654
|
-
|
|
1655
|
-
/***/ }),
|
|
1656
|
-
|
|
1657
|
-
/***/ "./lib/node.js":
|
|
1658
|
-
/*!*********************!*\
|
|
1659
|
-
!*** ./lib/node.js ***!
|
|
1660
|
-
\*********************/
|
|
1661
|
-
/*! exports provided: Node */
|
|
1662
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1663
|
-
|
|
1664
|
-
"use strict";
|
|
1665
|
-
__webpack_require__.r(__webpack_exports__);
|
|
1666
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Node", function() { return Node; });
|
|
1667
|
-
/* harmony import */ var _compile_expr__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./compile.expr */ "./lib/compile.expr.js");
|
|
1668
|
-
/* harmony import */ var _xml_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./xml.utils */ "./lib/xml.utils.js");
|
|
1669
|
-
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./utils */ "./lib/utils.js");
|
|
1670
|
-
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
1671
|
-
|
|
1672
|
-
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
1673
|
-
|
|
1674
|
-
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
1675
|
-
|
|
1676
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
|
1677
|
-
|
|
1678
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
1679
|
-
|
|
1680
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
1681
|
-
|
|
1682
|
-
function _toArray(arr) { return _arrayWithHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableRest(); }
|
|
1683
|
-
|
|
1684
|
-
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); }
|
|
1685
|
-
|
|
1686
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
1687
|
-
|
|
1688
|
-
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
1689
|
-
|
|
1690
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
1691
|
-
|
|
1692
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
1693
|
-
|
|
1694
|
-
function _iterableToArrayLimit(arr, i) { if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
1695
|
-
|
|
1696
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
1697
|
-
|
|
1698
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
1699
|
-
|
|
1700
|
-
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
1701
|
-
|
|
1702
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
var UID = 1;
|
|
1708
|
-
var Node = /*#__PURE__*/function () {
|
|
1709
|
-
function Node(tag) {
|
|
1710
|
-
var attrs = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : new Map();
|
|
1711
|
-
var nodes = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
|
|
1712
|
-
|
|
1713
|
-
_classCallCheck(this, Node);
|
|
1714
|
-
|
|
1715
|
-
this.uid = '' + UID++;
|
|
1716
|
-
this.tag = tag || '';
|
|
1717
|
-
this.attrs = attrs;
|
|
1718
|
-
this.nodes = nodes;
|
|
1719
|
-
} // --- attrs
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
_createClass(Node, [{
|
|
1723
|
-
key: "updateAttrs",
|
|
1724
|
-
value: function updateAttrs(attrs) {
|
|
1725
|
-
var _this = this;
|
|
1726
|
-
|
|
1727
|
-
attrs.forEach(function (v, k) {
|
|
1728
|
-
return _this.attrs.set(k, v);
|
|
1729
|
-
});
|
|
1730
|
-
return this;
|
|
1731
|
-
}
|
|
1732
|
-
}, {
|
|
1733
|
-
key: "updateAttrsFormObject",
|
|
1734
|
-
value: function updateAttrsFormObject(obj) {
|
|
1735
|
-
var _this2 = this;
|
|
1736
|
-
|
|
1737
|
-
Object.entries(obj).forEach(function (_ref) {
|
|
1738
|
-
var _ref2 = _slicedToArray(_ref, 2),
|
|
1739
|
-
k = _ref2[0],
|
|
1740
|
-
v = _ref2[1];
|
|
1741
|
-
|
|
1742
|
-
return _this2.attrs.set(k, v);
|
|
1743
|
-
});
|
|
1744
|
-
return this;
|
|
1745
|
-
}
|
|
1746
|
-
}, {
|
|
1747
|
-
key: "setAttrs",
|
|
1748
|
-
value: function setAttrs() {
|
|
1749
|
-
var attrs = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
1750
|
-
this.attrs = attrs;
|
|
1751
|
-
return this;
|
|
1752
|
-
}
|
|
1753
|
-
}, {
|
|
1754
|
-
key: "get",
|
|
1755
|
-
value: function get(key) {
|
|
1756
|
-
var val = this.attrs.get(key);
|
|
1757
|
-
return val;
|
|
1758
|
-
}
|
|
1759
|
-
}, {
|
|
1760
|
-
key: "extractAttr",
|
|
1761
|
-
value: function extractAttr(key) {
|
|
1762
|
-
var val = this.get(key);
|
|
1763
|
-
this.attrs["delete"](key);
|
|
1764
|
-
return val;
|
|
1765
|
-
} // --- Nodes
|
|
1766
|
-
|
|
1767
|
-
}, {
|
|
1768
|
-
key: "setNodes",
|
|
1769
|
-
value: function setNodes() {
|
|
1770
|
-
var nodes = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
1771
|
-
this.nodes = nodes;
|
|
1772
|
-
return this;
|
|
1773
|
-
}
|
|
1774
|
-
}, {
|
|
1775
|
-
key: "addChild",
|
|
1776
|
-
value: function addChild(tag, attrs) {
|
|
1777
|
-
var e = new Node(tag, attrs);
|
|
1778
|
-
this.nodes.push(e);
|
|
1779
|
-
return e;
|
|
1780
|
-
} // --- text
|
|
1781
|
-
|
|
1782
|
-
}, {
|
|
1783
|
-
key: "setText",
|
|
1784
|
-
value: function setText(text) {
|
|
1785
|
-
this.attrs.set('#text', Object(_xml_utils__WEBPACK_IMPORTED_MODULE_1__["decodeXmlEntities"])(text));
|
|
1786
|
-
} // --- compiled
|
|
1787
|
-
|
|
1788
|
-
}, {
|
|
1789
|
-
key: "addPropertyResolver",
|
|
1790
|
-
value: function addPropertyResolver(getter, propKey) {
|
|
1791
|
-
(this.$propertyResolvers || (this.$propertyResolvers = [])).push(propKey ? function (c, acc) {
|
|
1792
|
-
return Object(_utils__WEBPACK_IMPORTED_MODULE_2__["setKeyVal"])(acc, propKey, getter(c));
|
|
1793
|
-
} : function (c, acc) {
|
|
1794
|
-
return Object.entries(getter(c) || {}).forEach(function (_ref3) {
|
|
1795
|
-
var _ref4 = _slicedToArray(_ref3, 2),
|
|
1796
|
-
key = _ref4[0],
|
|
1797
|
-
val = _ref4[1];
|
|
1798
|
-
|
|
1799
|
-
return Object(_utils__WEBPACK_IMPORTED_MODULE_2__["setKeyVal"])(acc, key, val);
|
|
1800
|
-
});
|
|
1801
|
-
});
|
|
1802
|
-
return this;
|
|
1803
|
-
}
|
|
1804
|
-
}, {
|
|
1805
|
-
key: "addInitialState",
|
|
1806
|
-
value: function addInitialState(values) {
|
|
1807
|
-
var obj = this.initialState || (this.initialState = {});
|
|
1808
|
-
Object.entries(values).forEach(function (_ref5) {
|
|
1809
|
-
var _ref6 = _slicedToArray(_ref5, 2),
|
|
1810
|
-
key = _ref6[0],
|
|
1811
|
-
val = _ref6[1];
|
|
1812
|
-
|
|
1813
|
-
return Object(_utils__WEBPACK_IMPORTED_MODULE_2__["setKeyVal"])(obj, key, val);
|
|
1814
|
-
});
|
|
1815
|
-
return this;
|
|
1816
|
-
}
|
|
1817
|
-
}, {
|
|
1818
|
-
key: "addPropertyConnector",
|
|
1819
|
-
value: function addPropertyConnector(v, getter) {
|
|
1820
|
-
var _v$slice$split$map = v.slice(2).split('|').map(function (s) {
|
|
1821
|
-
return s.trim();
|
|
1822
|
-
}),
|
|
1823
|
-
_v$slice$split$map2 = _toArray(_v$slice$split$map),
|
|
1824
|
-
key = _v$slice$split$map2[0],
|
|
1825
|
-
pipes = _v$slice$split$map2.slice(1);
|
|
1826
|
-
|
|
1827
|
-
var pipec = Object(_compile_expr__WEBPACK_IMPORTED_MODULE_0__["withPipes"])(pipes);
|
|
1828
|
-
this.initializers.push(function (c) {
|
|
1829
|
-
return c.connect(key, function (rr) {
|
|
1830
|
-
return getter(pipec(c, rr));
|
|
1831
|
-
});
|
|
1832
|
-
});
|
|
1833
|
-
}
|
|
1834
|
-
}, {
|
|
1835
|
-
key: "addEmitter",
|
|
1836
|
-
value: function addEmitter(v, k) {
|
|
1837
|
-
var _v$slice$split$map3 = v.slice(2).split('|').map(function (s) {
|
|
1838
|
-
return s.trim();
|
|
1839
|
-
}),
|
|
1840
|
-
_v$slice$split$map4 = _toArray(_v$slice$split$map3),
|
|
1841
|
-
key = _v$slice$split$map4[0],
|
|
1842
|
-
pipes = _v$slice$split$map4.slice(1);
|
|
1843
|
-
|
|
1844
|
-
var pipec = Object(_compile_expr__WEBPACK_IMPORTED_MODULE_0__["withPipes"])(pipes);
|
|
1845
|
-
this.initializers.push(function (c) {
|
|
1846
|
-
return {
|
|
1847
|
-
payload: _defineProperty({}, k, function (data) {
|
|
1848
|
-
return c.container.emit(key, pipec(c, data));
|
|
1849
|
-
})
|
|
1850
|
-
};
|
|
1851
|
-
});
|
|
1852
|
-
}
|
|
1853
|
-
}, {
|
|
1854
|
-
key: "resolveProps",
|
|
1855
|
-
value: function resolveProps(c, isInitial) {
|
|
1856
|
-
var props = this.$propertyResolvers ? this.$propertyResolvers.reduce(function (r, fn) {
|
|
1857
|
-
fn(c, r);
|
|
1858
|
-
return r;
|
|
1859
|
-
}, {}) : {};
|
|
1860
|
-
var initialState = this.initialState;
|
|
1861
|
-
|
|
1862
|
-
if (isInitial && initialState) {
|
|
1863
|
-
props = _objectSpread(_objectSpread({}, initialState), props);
|
|
1864
|
-
}
|
|
1865
|
-
|
|
1866
|
-
if (props.data && initialState && initialState.data) {
|
|
1867
|
-
props.data = _objectSpread(_objectSpread({}, initialState.data), props.data);
|
|
1868
|
-
}
|
|
1869
|
-
|
|
1870
|
-
return props;
|
|
1871
|
-
} // --- utils
|
|
1872
|
-
|
|
1873
|
-
}, {
|
|
1874
|
-
key: "clone",
|
|
1875
|
-
value: function clone(uid) {
|
|
1876
|
-
var tag = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.tag;
|
|
1877
|
-
return Object.assign(new Node(this.tag), {
|
|
1878
|
-
uid: uid,
|
|
1879
|
-
tag: tag,
|
|
1880
|
-
attrs: this.attrs,
|
|
1881
|
-
nodes: this.nodes,
|
|
1882
|
-
nodeMap: this.nodeMap,
|
|
1883
|
-
getNodes: this.getNodes,
|
|
1884
|
-
$propertyResolvers: this.$propertyResolvers ? _toConsumableArray(this.$propertyResolvers) : null,
|
|
1885
|
-
initialState: this.initialState ? _objectSpread({}, this.initialState) : null,
|
|
1886
|
-
$initializers: this.$initializers ? _toConsumableArray(this.$initializers) : null
|
|
1887
|
-
});
|
|
1888
|
-
}
|
|
1889
|
-
}, {
|
|
1890
|
-
key: "toString",
|
|
1891
|
-
value: function toString() {
|
|
1892
|
-
return Object(_xml_utils__WEBPACK_IMPORTED_MODULE_1__["stringifyNode"])(this);
|
|
1893
|
-
}
|
|
1894
|
-
}, {
|
|
1895
|
-
key: "firstChild",
|
|
1896
|
-
get: function get() {
|
|
1897
|
-
return this.nodes.values().next;
|
|
1898
|
-
}
|
|
1899
|
-
}, {
|
|
1900
|
-
key: "initializers",
|
|
1901
|
-
get: function get() {
|
|
1902
|
-
return this.$initializers || (this.$initializers = []);
|
|
1903
|
-
}
|
|
1904
|
-
}]);
|
|
1905
|
-
|
|
1906
|
-
return Node;
|
|
1907
|
-
}();
|
|
1908
|
-
|
|
1909
|
-
/***/ }),
|
|
1910
|
-
|
|
1911
|
-
/***/ "./lib/register.js":
|
|
1912
|
-
/*!*************************!*\
|
|
1913
|
-
!*** ./lib/register.js ***!
|
|
1914
|
-
\*************************/
|
|
1915
|
-
/*! exports provided: registerTypes, getByTag */
|
|
1916
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1917
|
-
|
|
1918
|
-
"use strict";
|
|
1919
|
-
__webpack_require__.r(__webpack_exports__);
|
|
1920
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "registerTypes", function() { return registerTypes; });
|
|
1921
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getByTag", function() { return getByTag; });
|
|
1922
|
-
/* harmony import */ var _compile_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./compile.js */ "./lib/compile.js");
|
|
1923
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
var COUNTER = 1;
|
|
1927
|
-
|
|
1928
|
-
var nextId = function nextId() {
|
|
1929
|
-
var p = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
1930
|
-
return p + COUNTER++;
|
|
1931
|
-
};
|
|
1932
|
-
|
|
1933
|
-
var fnName = function fnName(ctor) {
|
|
1934
|
-
return (/^function\s+([\w$]+)\s*\(/.exec(ctor.toString()) || [])[1] || nextId('$C');
|
|
1935
|
-
};
|
|
1936
|
-
|
|
1937
|
-
var Fragment = function Fragment() {
|
|
1938
|
-
_classCallCheck(this, Fragment);
|
|
1939
|
-
};
|
|
1940
|
-
|
|
1941
|
-
var REGISTRY = new Map([['ui:fragment', Fragment], ['ui:for', Fragment], ['ui:item', Fragment], ['ui:slot', Fragment]]);
|
|
1942
|
-
|
|
1943
|
-
var reg = function reg(ctr) {
|
|
1944
|
-
if (typeof ctr === 'string') {
|
|
1945
|
-
ctr.replace(/<component\sid="(.+)">([\s\S]*?)<\/component>/gm, function (_, NAME, TEMPLATE) {
|
|
1946
|
-
return reg({
|
|
1947
|
-
NAME: NAME,
|
|
1948
|
-
TEMPLATE: TEMPLATE
|
|
1949
|
-
});
|
|
1950
|
-
});
|
|
1951
|
-
return;
|
|
1952
|
-
}
|
|
1953
|
-
|
|
1954
|
-
var ctor = typeof ctr === 'function' ? ctr : Object.assign(function () {}, ctr);
|
|
1955
|
-
var name = ctor.NAME || ctor.name || fnName(ctor);
|
|
1956
|
-
var text = ctor.TEMPLATE || ctor.template || ctor.prototype.TEMPLATE;
|
|
1957
|
-
|
|
1958
|
-
ctor.getTemplate = function () {
|
|
1959
|
-
return ctor.$template || (ctor.$template = Object(_compile_js__WEBPACK_IMPORTED_MODULE_0__["compileTemplate"])(text, name));
|
|
1960
|
-
};
|
|
1961
|
-
|
|
1962
|
-
REGISTRY.set(name, ctor);
|
|
1963
|
-
};
|
|
1964
|
-
|
|
1965
|
-
var registerTypes = function registerTypes(types) {
|
|
1966
|
-
return types.forEach(reg);
|
|
1967
|
-
};
|
|
1968
|
-
var getByTag = function getByTag(tag) {
|
|
1969
|
-
return REGISTRY.get(tag);
|
|
1970
|
-
};
|
|
1971
|
-
|
|
1972
|
-
/***/ }),
|
|
1973
|
-
|
|
1974
|
-
/***/ "./lib/utils.js":
|
|
1975
|
-
/*!**********************!*\
|
|
1976
|
-
!*** ./lib/utils.js ***!
|
|
1977
|
-
\**********************/
|
|
1978
|
-
/*! exports provided: parseValue, setNodeMap, wrapNode, arrangeElements, hasSlot, filterMapKey, setKeyVal, stringifyComponent, filterSlotNodes */
|
|
1979
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1980
|
-
|
|
1981
|
-
"use strict";
|
|
1982
|
-
__webpack_require__.r(__webpack_exports__);
|
|
1983
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "parseValue", function() { return parseValue; });
|
|
1984
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setNodeMap", function() { return setNodeMap; });
|
|
1985
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "wrapNode", function() { return wrapNode; });
|
|
1986
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "arrangeElements", function() { return arrangeElements; });
|
|
1987
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hasSlot", function() { return hasSlot; });
|
|
1988
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "filterMapKey", function() { return filterMapKey; });
|
|
1989
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setKeyVal", function() { return setKeyVal; });
|
|
1990
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "stringifyComponent", function() { return stringifyComponent; });
|
|
1991
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "filterSlotNodes", function() { return filterSlotNodes; });
|
|
1992
|
-
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
1993
|
-
|
|
1994
|
-
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
1995
|
-
|
|
1996
|
-
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); }
|
|
1997
|
-
|
|
1998
|
-
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
1999
|
-
|
|
2000
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
2001
|
-
|
|
2002
|
-
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
2003
|
-
|
|
2004
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
2005
|
-
|
|
2006
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
2007
|
-
|
|
2008
|
-
function _iterableToArrayLimit(arr, i) { if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
2009
|
-
|
|
2010
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
2011
|
-
|
|
2012
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
|
2013
|
-
|
|
2014
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
2015
|
-
|
|
2016
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
2017
|
-
|
|
2018
|
-
Array.EMPTY = [];
|
|
2019
|
-
Object.assign(Function, {
|
|
2020
|
-
ID: function ID(x) {
|
|
2021
|
-
return x;
|
|
2022
|
-
},
|
|
2023
|
-
next: function (COUNTER) {
|
|
2024
|
-
return function () {
|
|
2025
|
-
var p = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
2026
|
-
return p + COUNTER++;
|
|
2027
|
-
};
|
|
2028
|
-
}(1),
|
|
2029
|
-
// system
|
|
2030
|
-
"throw": function _throw(error) {
|
|
2031
|
-
var ErrorType = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Error;
|
|
2032
|
-
throw typeof error === 'string' ? new ErrorType(error) : error;
|
|
2033
|
-
}
|
|
2034
|
-
});
|
|
2035
|
-
var parseValue = function (map) {
|
|
2036
|
-
return function (value) {
|
|
2037
|
-
if (value && '1234567890+-'.includes(value[0]) && value.length <= 17) {
|
|
2038
|
-
var num = +value;
|
|
2039
|
-
return isNaN(num) ? value : num;
|
|
2040
|
-
}
|
|
2041
|
-
|
|
2042
|
-
return value in map ? map[value] : value;
|
|
2043
|
-
};
|
|
2044
|
-
}({
|
|
2045
|
-
"true": true,
|
|
2046
|
-
"false": false,
|
|
2047
|
-
"null": null,
|
|
2048
|
-
undefined: undefined
|
|
2049
|
-
});
|
|
2050
|
-
var setNodeMap = function setNodeMap() {
|
|
2051
|
-
var map = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : new Map();
|
|
2052
|
-
var node = arguments.length > 1 ? arguments[1] : undefined;
|
|
2053
|
-
|
|
2054
|
-
if (node) {
|
|
2055
|
-
map.set(node.uid, node);
|
|
2056
|
-
}
|
|
2057
|
-
|
|
2058
|
-
return node;
|
|
2059
|
-
};
|
|
2060
|
-
var wrapNode = function wrapNode(n) {
|
|
2061
|
-
return new Map([[n.uid, n]]);
|
|
2062
|
-
};
|
|
2063
|
-
|
|
2064
|
-
function appendElt(e, p, cursor) {
|
|
2065
|
-
var before = cursor ? cursor.nextSibling : p.firstChild;
|
|
2066
|
-
|
|
2067
|
-
if (!before) {
|
|
2068
|
-
if (p !== e.parentElement) {
|
|
2069
|
-
p.appendChild(e);
|
|
2070
|
-
}
|
|
2071
|
-
} else if (e !== before) {
|
|
2072
|
-
p.insertBefore(e, before);
|
|
2073
|
-
}
|
|
2074
|
-
|
|
2075
|
-
return e;
|
|
2076
|
-
}
|
|
2077
|
-
|
|
2078
|
-
function arrangeElements($, parent) {
|
|
2079
|
-
var cursor = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
|
|
2080
|
-
|
|
2081
|
-
for (var p = $.first; p; p = p.next) {
|
|
2082
|
-
if (p.isElementary) {
|
|
2083
|
-
var e = p.impl.elt;
|
|
2084
|
-
|
|
2085
|
-
if (e) {
|
|
2086
|
-
arrangeElements(p, e);
|
|
2087
|
-
cursor = appendElt(e, parent, cursor);
|
|
2088
|
-
}
|
|
2089
|
-
} else {
|
|
2090
|
-
cursor = arrangeElements(p, parent, cursor);
|
|
2091
|
-
}
|
|
2092
|
-
}
|
|
2093
|
-
|
|
2094
|
-
return cursor;
|
|
2095
|
-
}
|
|
2096
|
-
var hasSlot = function hasSlot(c, id) {
|
|
2097
|
-
var r = false;
|
|
2098
|
-
var _c$container = c.container,
|
|
2099
|
-
tag = _c$container.tag,
|
|
2100
|
-
content = _c$container.content;
|
|
2101
|
-
if (!content) return r;
|
|
2102
|
-
|
|
2103
|
-
if (id && id !== 'default') {
|
|
2104
|
-
content.forEach(function (e) {
|
|
2105
|
-
r = r || e.tag === tag + ':' + id;
|
|
2106
|
-
});
|
|
2107
|
-
} else {
|
|
2108
|
-
content.forEach(function (e) {
|
|
2109
|
-
r = r || e.tag.slice(0, tag.length + 1) !== tag + ':';
|
|
2110
|
-
});
|
|
2111
|
-
}
|
|
2112
|
-
|
|
2113
|
-
return r;
|
|
2114
|
-
};
|
|
2115
|
-
var filterMapKey = function filterMapKey(src, key) {
|
|
2116
|
-
var r = new Map();
|
|
2117
|
-
src.forEach(function (v, k) {
|
|
2118
|
-
if (k !== key) {
|
|
2119
|
-
r.set(k, v);
|
|
2120
|
-
}
|
|
2121
|
-
});
|
|
2122
|
-
return [src.get(key), r];
|
|
2123
|
-
};
|
|
2124
|
-
var setKeyVal = function setKeyVal(acc, k, val) {
|
|
2125
|
-
if (k.slice(0, 5) === 'data-') {
|
|
2126
|
-
acc.data = acc.data ? _objectSpread(_objectSpread({}, acc.data), {}, _defineProperty({}, k.slice(5), val)) : _defineProperty({}, k.slice(5), val);
|
|
2127
|
-
} else {
|
|
2128
|
-
acc[k] = val;
|
|
2129
|
-
}
|
|
2130
|
-
};
|
|
2131
|
-
|
|
2132
|
-
var stringifyAttrs = function stringifyAttrs(attrs) {
|
|
2133
|
-
if (!attrs) {
|
|
2134
|
-
return '';
|
|
2135
|
-
}
|
|
2136
|
-
|
|
2137
|
-
var r = [];
|
|
2138
|
-
Object.entries(attrs).forEach(function (_ref2) {
|
|
2139
|
-
var _ref3 = _slicedToArray(_ref2, 2),
|
|
2140
|
-
k = _ref3[0],
|
|
2141
|
-
v = _ref3[1];
|
|
2142
|
-
|
|
2143
|
-
if (v && k !== '#text') {
|
|
2144
|
-
r.push(' ' + k + '="' + v + '"');
|
|
2145
|
-
}
|
|
2146
|
-
});
|
|
2147
|
-
return r.join('');
|
|
2148
|
-
};
|
|
2149
|
-
|
|
2150
|
-
function stringifyComponent(_ref4) {
|
|
2151
|
-
var uid = _ref4.uid,
|
|
2152
|
-
tag = _ref4.tag,
|
|
2153
|
-
state = _ref4.state,
|
|
2154
|
-
container = _ref4.container,
|
|
2155
|
-
_ref4$children = _ref4.children,
|
|
2156
|
-
children = _ref4$children === void 0 ? new Map() : _ref4$children;
|
|
2157
|
-
var tab = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
|
|
2158
|
-
var sattrs = stringifyAttrs(state);
|
|
2159
|
-
|
|
2160
|
-
var ssubs = _toConsumableArray(children.values()).map(function (c) {
|
|
2161
|
-
return stringifyComponent(c, " ".concat(tab));
|
|
2162
|
-
}).join('\n');
|
|
2163
|
-
|
|
2164
|
-
var text = state && state['#text'];
|
|
2165
|
-
var stext = text ? " ".concat(tab).concat(text) : '';
|
|
2166
|
-
|
|
2167
|
-
if (tag === '#text') {
|
|
2168
|
-
return stext.trim();
|
|
2169
|
-
}
|
|
2170
|
-
|
|
2171
|
-
return "".concat(tab, "<").concat(tag, "#").concat(uid, " ").concat(container ? container.uid : '-').concat(sattrs) + (!ssubs && !stext ? '/>' : ">\n".concat(ssubs).concat(stext, "\n").concat(tab, "</").concat(tag, "#").concat(uid, ">"));
|
|
2172
|
-
}
|
|
2173
|
-
function filterSlotNodes(slotId, container) {
|
|
2174
|
-
var content = container.content,
|
|
2175
|
-
tag = container.tag;
|
|
2176
|
-
if (!content) return null;
|
|
2177
|
-
var r = new Map();
|
|
2178
|
-
content.forEach(function (v) {
|
|
2179
|
-
if (slotId) {
|
|
2180
|
-
if (v.tag === tag + ':' + slotId) {
|
|
2181
|
-
v.nodeMap.forEach(function (vv) {
|
|
2182
|
-
return setNodeMap(r, vv);
|
|
2183
|
-
});
|
|
2184
|
-
}
|
|
2185
|
-
} else if (v.tag.slice(0, tag.length + 1) !== tag + ':') {
|
|
2186
|
-
setNodeMap(r, v);
|
|
2187
|
-
}
|
|
2188
|
-
});
|
|
2189
|
-
return r;
|
|
2190
|
-
}
|
|
2191
|
-
|
|
2192
|
-
/***/ }),
|
|
2193
|
-
|
|
2194
|
-
/***/ "./lib/xml.js":
|
|
2195
|
-
/*!********************!*\
|
|
2196
|
-
!*** ./lib/xml.js ***!
|
|
2197
|
-
\********************/
|
|
2198
|
-
/*! exports provided: parseXML */
|
|
2199
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
2200
|
-
|
|
2201
|
-
"use strict";
|
|
2202
|
-
__webpack_require__.r(__webpack_exports__);
|
|
2203
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "parseXML", function() { return parseXML; });
|
|
2204
|
-
/* harmony import */ var _node__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node */ "./lib/node.js");
|
|
2205
|
-
/* harmony import */ var _xml_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./xml.utils */ "./lib/xml.utils.js");
|
|
2206
|
-
|
|
2207
|
-
// XML Parse for templates. XML -> NodeTree
|
|
2208
|
-
|
|
2209
|
-
var RE_EMPTY = /^\s*$/;
|
|
2210
|
-
var RE_XML_COMMENT = /<!--((?!-->)[\s\S])*-->/g;
|
|
2211
|
-
var RE_XML_TAG = /(<)(\/?)([a-zа-я][a-zа-я0-9-:]*)((?:\s+[a-z][a-z0-9-:]+(?:="[^"]*"|={[^}]*})?)*)\s*(\/?)>/gi;
|
|
2212
|
-
var SINGLE_TAGS = 'img input br col'.split(' ').reduce(function (r, e) {
|
|
2213
|
-
r[e] = 1;
|
|
2214
|
-
return r;
|
|
2215
|
-
}, {});
|
|
2216
|
-
var parseXML = function parseXML(_s, key) {
|
|
2217
|
-
var s = ('' + _s).trim().replace(RE_XML_COMMENT, '');
|
|
2218
|
-
|
|
2219
|
-
var ctx = [new _node__WEBPACK_IMPORTED_MODULE_0__["Node"]()];
|
|
2220
|
-
var lastIndex = 0; // head text omitted
|
|
2221
|
-
|
|
2222
|
-
for (var e = RE_XML_TAG.exec(s); e; e = RE_XML_TAG.exec(s)) {
|
|
2223
|
-
// preceding text
|
|
2224
|
-
var text = e.index && s.slice(lastIndex, e.index);
|
|
2225
|
-
|
|
2226
|
-
if (text && !text.match(RE_EMPTY)) {
|
|
2227
|
-
ctx[0].addChild('#text').setText(text);
|
|
2228
|
-
} // closing tag
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
if (e[2]) {
|
|
2232
|
-
if (ctx[0].tag !== e[3]) {
|
|
2233
|
-
throw new Error((key || '') + ' XML Parse closing tag does not match at: ' + e.index + ' near ' + e.input.slice(Math.max(e.index - 150, 0), e.index) + '^^^^' + e.input.slice(e.index, Math.min(e.index + 150, e.input.length)));
|
|
2234
|
-
}
|
|
2235
|
-
|
|
2236
|
-
ctx.shift();
|
|
2237
|
-
} else {
|
|
2238
|
-
var sAttrs = e[4].trim();
|
|
2239
|
-
var elt = ctx[0].addChild(e[3], sAttrs ? Object(_xml_utils__WEBPACK_IMPORTED_MODULE_1__["parseAttrs"])(sAttrs) : undefined); // not single tag
|
|
2240
|
-
|
|
2241
|
-
if (!(e[5] || e[3] in SINGLE_TAGS)) {
|
|
2242
|
-
ctx.unshift(elt);
|
|
2243
|
-
|
|
2244
|
-
if (ctx.length === 1) {
|
|
2245
|
-
throw new Error('Parse error at: ' + e[0]);
|
|
2246
|
-
}
|
|
2247
|
-
}
|
|
2248
|
-
} // up past index
|
|
2249
|
-
|
|
2250
|
-
|
|
2251
|
-
lastIndex = RE_XML_TAG.lastIndex;
|
|
2252
|
-
} // tail text omitted
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
return ctx[0];
|
|
2256
|
-
};
|
|
2257
|
-
|
|
2258
|
-
/***/ }),
|
|
2259
|
-
|
|
2260
|
-
/***/ "./lib/xml.utils.js":
|
|
2261
|
-
/*!**************************!*\
|
|
2262
|
-
!*** ./lib/xml.utils.js ***!
|
|
2263
|
-
\**************************/
|
|
2264
|
-
/*! exports provided: escapeXml, skipQoutes, decodeXmlEntities, parseAttrs, stringifyNode */
|
|
2265
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
2266
|
-
|
|
2267
|
-
"use strict";
|
|
2268
|
-
__webpack_require__.r(__webpack_exports__);
|
|
2269
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "escapeXml", function() { return escapeXml; });
|
|
2270
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "skipQoutes", function() { return skipQoutes; });
|
|
2271
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "decodeXmlEntities", function() { return decodeXmlEntities; });
|
|
2272
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "parseAttrs", function() { return parseAttrs; });
|
|
2273
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "stringifyNode", function() { return stringifyNode; });
|
|
2274
|
-
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./utils */ "./lib/utils.js");
|
|
2275
|
-
|
|
2276
|
-
var RE_ESCAPE_XML_ENTITY = /["'&<>]/g;
|
|
2277
|
-
var ESCAPE_XML_ENTITY = {
|
|
2278
|
-
34: '"',
|
|
2279
|
-
38: '&',
|
|
2280
|
-
39: ''',
|
|
2281
|
-
60: '<',
|
|
2282
|
-
62: '>'
|
|
2283
|
-
};
|
|
2284
|
-
|
|
2285
|
-
var FN_ESCAPE_XML_ENTITY = function FN_ESCAPE_XML_ENTITY(m) {
|
|
2286
|
-
return ESCAPE_XML_ENTITY[m.charCodeAt(0)];
|
|
2287
|
-
};
|
|
2288
|
-
|
|
2289
|
-
var RE_XML_ENTITY = /&#?[0-9a-z]{3,5};/g;
|
|
2290
|
-
var RE_ATTRS = /([a-z][a-zA-Z0-9-:]+)(="[^"]*"|={[^}]*})?/g;
|
|
2291
|
-
var SUBST_XML_ENTITY = {
|
|
2292
|
-
amp: '&',
|
|
2293
|
-
gt: '>',
|
|
2294
|
-
lt: '<',
|
|
2295
|
-
quot: '"',
|
|
2296
|
-
nbsp: ' '
|
|
2297
|
-
};
|
|
2298
|
-
|
|
2299
|
-
var FN_XML_ENTITY = function FN_XML_ENTITY(_) {
|
|
2300
|
-
var s = _.substring(1, _.length - 1);
|
|
2301
|
-
|
|
2302
|
-
return s[0] === '#' ? String.fromCharCode(+s.slice(1)) : SUBST_XML_ENTITY[s] || ' ';
|
|
2303
|
-
};
|
|
2304
|
-
|
|
2305
|
-
var escapeXml = function escapeXml(s) {
|
|
2306
|
-
return !s ? '' : ('' + s).replace(RE_ESCAPE_XML_ENTITY, FN_ESCAPE_XML_ENTITY);
|
|
2307
|
-
};
|
|
2308
|
-
var skipQoutes = function skipQoutes(s) {
|
|
2309
|
-
return s[0] === '"' && s[s.length - 1] === '"' ? s.slice(1, -1) : s;
|
|
2310
|
-
};
|
|
2311
|
-
var decodeXmlEntities = function decodeXmlEntities() {
|
|
2312
|
-
var s = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
2313
|
-
return s.replace(RE_XML_ENTITY, FN_XML_ENTITY);
|
|
2314
|
-
};
|
|
2315
|
-
var parseAttrs = function parseAttrs(s) {
|
|
2316
|
-
var r = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : new Map();
|
|
2317
|
-
|
|
2318
|
-
for (var e = RE_ATTRS.exec(s); e; e = RE_ATTRS.exec(s)) {
|
|
2319
|
-
r.set(e[1], !e[2] ? true : Object(_utils__WEBPACK_IMPORTED_MODULE_0__["parseValue"])(decodeXmlEntities(skipQoutes(e[2].slice(1)))));
|
|
2320
|
-
}
|
|
2321
|
-
|
|
2322
|
-
return r;
|
|
2323
|
-
};
|
|
2324
|
-
|
|
2325
|
-
var stringifyAttrs = function stringifyAttrs(attrs) {
|
|
2326
|
-
if (!attrs || !attrs.size) {
|
|
2327
|
-
return '';
|
|
2328
|
-
}
|
|
2329
|
-
|
|
2330
|
-
var r = [];
|
|
2331
|
-
attrs.forEach(function (v, k) {
|
|
2332
|
-
if (v && k !== '#text') {
|
|
2333
|
-
r.push(' ' + k + '="' + escapeXml(v) + '"');
|
|
2334
|
-
}
|
|
2335
|
-
});
|
|
2336
|
-
return r.join('');
|
|
2337
|
-
};
|
|
2338
|
-
|
|
2339
|
-
function stringifyNode(_ref) {
|
|
2340
|
-
var tag = _ref.tag,
|
|
2341
|
-
attrs = _ref.attrs,
|
|
2342
|
-
_ref$nodes = _ref.nodes,
|
|
2343
|
-
nodes = _ref$nodes === void 0 ? [] : _ref$nodes;
|
|
2344
|
-
var tab = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
|
|
2345
|
-
var sattrs = stringifyAttrs(attrs);
|
|
2346
|
-
var ssubs = nodes.map(function (c) {
|
|
2347
|
-
return stringifyNode(c, " ".concat(tab));
|
|
2348
|
-
}).join('\n');
|
|
2349
|
-
var text = attrs && attrs.get('#text');
|
|
2350
|
-
var stext = text ? " ".concat(tab).concat(escapeXml(text)) : '';
|
|
2351
|
-
|
|
2352
|
-
if (tag === '#text') {
|
|
2353
|
-
return stext.trim();
|
|
2354
|
-
}
|
|
2355
|
-
|
|
2356
|
-
return "".concat(tab, "<").concat(tag).concat(sattrs) + (!ssubs && !stext ? '/>' : ">\n".concat(ssubs).concat(stext, "\n").concat(tab, "</").concat(tag, ">"));
|
|
2357
|
-
}
|
|
2358
|
-
|
|
2359
|
-
/***/ }),
|
|
2360
|
-
|
|
2361
|
-
/***/ "./pipes/arr.js":
|
|
2362
|
-
/*!**********************!*\
|
|
2363
|
-
!*** ./pipes/arr.js ***!
|
|
2364
|
-
\**********************/
|
|
2365
|
-
/*! exports provided: default */
|
|
2366
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
2367
|
-
|
|
2368
|
-
"use strict";
|
|
2369
|
-
__webpack_require__.r(__webpack_exports__);
|
|
2370
|
-
/** ***********************
|
|
2371
|
-
* Arrays.
|
|
2372
|
-
*/
|
|
2373
|
-
/* harmony default export */ __webpack_exports__["default"] = ({
|
|
2374
|
-
slice: function slice(x) {
|
|
2375
|
-
var b = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
2376
|
-
var e = arguments.length > 2 ? arguments[2] : undefined;
|
|
2377
|
-
return x ? x.slice(b, e) : [];
|
|
2378
|
-
},
|
|
2379
|
-
|
|
2380
|
-
/**
|
|
2381
|
-
* Builds histogram on given field for given list.
|
|
2382
|
-
*
|
|
2383
|
-
* @param {*} list source
|
|
2384
|
-
* @param {*} field to be used as group key
|
|
2385
|
-
*/
|
|
2386
|
-
groupBy: function groupBy(list) {
|
|
2387
|
-
var field = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'type';
|
|
2388
|
-
var result = {};
|
|
2389
|
-
var fieldFn = typeof field === 'string' ? function (e) {
|
|
2390
|
-
return e[field];
|
|
2391
|
-
} : field;
|
|
2392
|
-
|
|
2393
|
-
var iter = function iter(v, entry) {
|
|
2394
|
-
var slot = result[v] || (result[v] = {
|
|
2395
|
-
id: v,
|
|
2396
|
-
count: 0,
|
|
2397
|
-
subs: []
|
|
2398
|
-
});
|
|
2399
|
-
slot.count++;
|
|
2400
|
-
(slot.items || (slot.items = slot.subs)).push(entry);
|
|
2401
|
-
};
|
|
2402
|
-
|
|
2403
|
-
(list || []).forEach(function (e) {
|
|
2404
|
-
var value = fieldFn(e);
|
|
2405
|
-
|
|
2406
|
-
if (Array.isArray(value)) {
|
|
2407
|
-
value.forEach(function (v) {
|
|
2408
|
-
return iter(v, e);
|
|
2409
|
-
});
|
|
2410
|
-
} else {
|
|
2411
|
-
iter(value, e);
|
|
2412
|
-
}
|
|
2413
|
-
});
|
|
2414
|
-
return result;
|
|
2415
|
-
},
|
|
2416
|
-
|
|
2417
|
-
/**
|
|
2418
|
-
* Sorts array by element property.
|
|
2419
|
-
*
|
|
2420
|
-
* @param {*} arr source
|
|
2421
|
-
* @param {*} property element property to sort by
|
|
2422
|
-
* @param {*} order
|
|
2423
|
-
*/
|
|
2424
|
-
sortBy: function sortBy(arr) {
|
|
2425
|
-
var property = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'name';
|
|
2426
|
-
var order = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;
|
|
2427
|
-
var fn = property;
|
|
2428
|
-
|
|
2429
|
-
if (typeof property === 'string') {
|
|
2430
|
-
if (property[0] === '-') {
|
|
2431
|
-
/* eslint-disable */
|
|
2432
|
-
order = -1;
|
|
2433
|
-
property = property.substr(1);
|
|
2434
|
-
}
|
|
2435
|
-
|
|
2436
|
-
fn = function fn(e) {
|
|
2437
|
-
return e[property];
|
|
2438
|
-
};
|
|
2439
|
-
}
|
|
2440
|
-
|
|
2441
|
-
function compare(a, b) {
|
|
2442
|
-
var aa = fn(a);
|
|
2443
|
-
var bb = fn(b);
|
|
2444
|
-
/* eslint-disable */
|
|
2445
|
-
|
|
2446
|
-
return aa < bb ? -order : aa > bb ? order : 0;
|
|
2447
|
-
}
|
|
2448
|
-
|
|
2449
|
-
return (arr || []).slice(0).sort(compare);
|
|
2450
|
-
},
|
|
2451
|
-
|
|
2452
|
-
/**
|
|
2453
|
-
* Produces key/value index on given array.
|
|
2454
|
-
*
|
|
2455
|
-
* @param {*} arr source array
|
|
2456
|
-
* @param {*} idKey id key
|
|
2457
|
-
* @param {*} valKey value key
|
|
2458
|
-
*/
|
|
2459
|
-
hash: function hash(arr) {
|
|
2460
|
-
var idKey = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'id';
|
|
2461
|
-
var valKey = arguments.length > 2 ? arguments[2] : undefined;
|
|
2462
|
-
var r = {};
|
|
2463
|
-
|
|
2464
|
-
if (arr) {
|
|
2465
|
-
var isKeyFn = typeof idKey === 'string' ? function (e) {
|
|
2466
|
-
return e[idKey];
|
|
2467
|
-
} : idKey;
|
|
2468
|
-
arr.forEach(function (e) {
|
|
2469
|
-
r[isKeyFn(e)] = valKey ? e[valKey] : e;
|
|
2470
|
-
});
|
|
2471
|
-
}
|
|
2472
|
-
|
|
2473
|
-
return r;
|
|
2474
|
-
}
|
|
2475
|
-
});
|
|
2476
|
-
|
|
2477
|
-
/***/ }),
|
|
2478
|
-
|
|
2479
|
-
/***/ "./pipes/date.js":
|
|
2480
|
-
/*!***********************!*\
|
|
2481
|
-
!*** ./pipes/date.js ***!
|
|
2482
|
-
\***********************/
|
|
2483
|
-
/*! exports provided: default */
|
|
2484
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
2485
|
-
|
|
2486
|
-
"use strict";
|
|
2487
|
-
__webpack_require__.r(__webpack_exports__);
|
|
2488
|
-
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
2489
|
-
|
|
2490
|
-
var R = {
|
|
2491
|
-
ru: {
|
|
2492
|
-
monthNames: ['', 'Январь', 'Февраль', 'Март', 'Апрель', 'Май', 'Июнь', 'Июль', 'Август', 'Сентябрь', 'Октябрь', 'Ноябрь', 'Декабрь'],
|
|
2493
|
-
monthNamesShort: ['', 'Янв', 'Фев', 'Мар', 'Апр', 'Май', 'Июн', 'Июл', 'Авг', 'Сен', 'Окт', 'Ноя', 'Дек'],
|
|
2494
|
-
dayNames: ['Воскресенье', 'Понедельник', 'Вторник', 'Среда', 'Четверг', 'Пятница', 'Суббота'],
|
|
2495
|
-
dayNamesShort: ['Вс', 'Пн', 'Вт', 'Ср', 'Чт', 'Пт', 'Сб']
|
|
2496
|
-
},
|
|
2497
|
-
en: {
|
|
2498
|
-
monthNames: ['', 'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'],
|
|
2499
|
-
monthNamesShort: ['', 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
|
|
2500
|
-
dayNames: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],
|
|
2501
|
-
dayNamesShort: ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa']
|
|
2502
|
-
}
|
|
2503
|
-
};
|
|
2504
|
-
var DATE_FORMATTERS = {
|
|
2505
|
-
hh: function hh(date) {
|
|
2506
|
-
return String.pad(date.getHours());
|
|
2507
|
-
},
|
|
2508
|
-
ii: function ii(date) {
|
|
2509
|
-
return String.pad(date.getMinutes());
|
|
2510
|
-
},
|
|
2511
|
-
hi: function hi(date) {
|
|
2512
|
-
return String.pad(date.getHours()) + ':' + String.pad(date.getMinutes());
|
|
2513
|
-
},
|
|
2514
|
-
dd: function dd(date) {
|
|
2515
|
-
return String.pad(date.getDate());
|
|
2516
|
-
},
|
|
2517
|
-
w: function w(date) {
|
|
2518
|
-
return '' + Date.l18n("dayNames.".concat(date.getDay()));
|
|
2519
|
-
},
|
|
2520
|
-
ww: function ww(date) {
|
|
2521
|
-
return '' + Date.l18n("dayNamesShort.".concat(date.getDay()));
|
|
2522
|
-
},
|
|
2523
|
-
d: function d(date) {
|
|
2524
|
-
return '' + date.getDate();
|
|
2525
|
-
},
|
|
2526
|
-
mmmm: function mmmm(date) {
|
|
2527
|
-
return Date.monthName(date.getMonth() + 1, '');
|
|
2528
|
-
},
|
|
2529
|
-
mmm: function mmm(date) {
|
|
2530
|
-
return Date.monthName(date.getMonth() + 1, 'Short');
|
|
2531
|
-
},
|
|
2532
|
-
mm: function mm(date) {
|
|
2533
|
-
return String.pad(date.getMonth() + 1);
|
|
2534
|
-
},
|
|
2535
|
-
yyyy: function yyyy(date) {
|
|
2536
|
-
return "".concat(date.getFullYear());
|
|
2537
|
-
},
|
|
2538
|
-
ll: function ll(date) {
|
|
2539
|
-
return "".concat(date.getTime());
|
|
2540
|
-
},
|
|
2541
|
-
z: function z(date) {
|
|
2542
|
-
return "Z".concat(Date.formatTimezone(date.getTimezoneOffset()));
|
|
2543
|
-
}
|
|
2544
|
-
};
|
|
2545
|
-
/* harmony default export */ __webpack_exports__["default"] = ({
|
|
2546
|
-
orNow: function orNow(x) {
|
|
2547
|
-
return x ? Date.narrow(x) : new Date();
|
|
2548
|
-
},
|
|
2549
|
-
l18n: function l18n(key) {
|
|
2550
|
-
return Object.dig(R[Date.LOCALE || 'ru'], key);
|
|
2551
|
-
},
|
|
2552
|
-
daysInMonth: function daysInMonth(month, year) {
|
|
2553
|
-
return new Date(year, month + 1, 0).getDate();
|
|
2554
|
-
},
|
|
2555
|
-
firstOfWeek: function firstOfWeek(d) {
|
|
2556
|
-
var x = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Date.narrow(d);
|
|
2557
|
-
return new Date(x.getFullYear(), x.getMonth(), x.getDate() - x.getDay());
|
|
2558
|
-
},
|
|
2559
|
-
monthName: function monthName(m) {
|
|
2560
|
-
var mode = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
|
|
2561
|
-
return Date.l18n("monthNames".concat(mode, ".").concat(m));
|
|
2562
|
-
},
|
|
2563
|
-
fractions: function fractions() {
|
|
2564
|
-
var x = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : new Date();
|
|
2565
|
-
return [x.getFullYear(), x.getMonth(), x.getDate(), x.getHours(), x.getMinutes(), x.getSeconds(), x.getMilliseconds()];
|
|
2566
|
-
},
|
|
2567
|
-
parseISO8601: function parseISO8601(x) {
|
|
2568
|
-
Function.assert(typeof x === 'string', "Date.parseISO8601: not a string: ".concat(x));
|
|
2569
|
-
|
|
2570
|
-
if (x.length === 10) {
|
|
2571
|
-
x += 'T12:00';
|
|
2572
|
-
}
|
|
2573
|
-
|
|
2574
|
-
var timebits = /^([0-9]{4})-([0-9]{2})-([0-9]{2})[ T]([0-9]{2}):([0-9]{2})(?::([0-9]*)(\.[0-9]*)?)?(Z?)(([+-])([0-9]{2})([0-9]{2}))?/;
|
|
2575
|
-
var m = timebits.exec(x);
|
|
2576
|
-
|
|
2577
|
-
if (!m) {
|
|
2578
|
-
return null;
|
|
2579
|
-
}
|
|
2580
|
-
|
|
2581
|
-
var tz = m[8] ? !m[9] ? 0 : (m[10] === '+' ? -1 : +1) * (parseInt(m[11]) * 60 + parseInt(m[12])) : new Date().getTimezoneOffset(); // utcdate is milliseconds since the epoch
|
|
2582
|
-
|
|
2583
|
-
var utcdate = Date.UTC(parseInt(m[1]), parseInt(m[2]) - 1, // months are zero-offset (!)
|
|
2584
|
-
parseInt(m[3]), parseInt(m[4]), parseInt(m[5]), // hh:mm
|
|
2585
|
-
m[6] && parseInt(m[6]) || 0, // optional seconds
|
|
2586
|
-
m[7] && parseFloat(m[7]) || 0);
|
|
2587
|
-
return new Date(utcdate + tz * 60000);
|
|
2588
|
-
},
|
|
2589
|
-
|
|
2590
|
-
/**
|
|
2591
|
-
* Universal all-weather converter to Date.
|
|
2592
|
-
*
|
|
2593
|
-
* @param {*} x any value to be converted to date
|
|
2594
|
-
* @returns Date instance or null
|
|
2595
|
-
*/
|
|
2596
|
-
narrow: function narrow(x) {
|
|
2597
|
-
var type = _typeof(x);
|
|
2598
|
-
|
|
2599
|
-
if (x == null) {
|
|
2600
|
-
return null;
|
|
2601
|
-
} // eslint-disable-next-line eqeqeq
|
|
2602
|
-
|
|
2603
|
-
|
|
2604
|
-
if (type === 'number' || +x == x) {
|
|
2605
|
-
return new Date(+x);
|
|
2606
|
-
}
|
|
2607
|
-
|
|
2608
|
-
if (type === 'object') {
|
|
2609
|
-
// Date already
|
|
2610
|
-
if (x.getTime) {
|
|
2611
|
-
return x;
|
|
2612
|
-
} // having a date re-presentation method
|
|
2613
|
-
|
|
2614
|
-
|
|
2615
|
-
if (x.toDate) {
|
|
2616
|
-
return x.toDate();
|
|
2617
|
-
} // firestore timestamp for web
|
|
2618
|
-
|
|
2619
|
-
|
|
2620
|
-
if (x.seconds && x.nanoseconds != null) {
|
|
2621
|
-
return new Date(x.seconds * 1000 + x.nanoseconds);
|
|
2622
|
-
}
|
|
2623
|
-
}
|
|
2624
|
-
|
|
2625
|
-
return Date.parseISO8601(x);
|
|
2626
|
-
},
|
|
2627
|
-
formatTimezone: function formatTimezone(tzOffset) {
|
|
2628
|
-
var toNumber = Number(tzOffset);
|
|
2629
|
-
return toNumber ? toNumber >= 0 ? "+".concat(String.pad(toNumber / 60), ":").concat(String.pad(toNumber % 60)) : "-".concat(String.pad(-toNumber / 60), ":").concat(String.pad(-toNumber % 60)) : '';
|
|
2630
|
-
},
|
|
2631
|
-
format: function format(x) {
|
|
2632
|
-
var format = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'yyyy-mm-dd';
|
|
2633
|
-
|
|
2634
|
-
if (!x) {
|
|
2635
|
-
return '';
|
|
2636
|
-
}
|
|
2637
|
-
|
|
2638
|
-
var date = Date.narrow(x);
|
|
2639
|
-
return !date ? '' : format.replace(/[_]/g, '\n').replace(/[hidwmylz]+/g, function (key) {
|
|
2640
|
-
var fn = DATE_FORMATTERS[key];
|
|
2641
|
-
return fn ? fn(date) : key;
|
|
2642
|
-
});
|
|
2643
|
-
},
|
|
2644
|
-
dateKey: function dateKey(d) {
|
|
2645
|
-
var ms = Date.narrow(d).getTime();
|
|
2646
|
-
return Date.format(ms - ms % (24 * 3600000) + 12 * 3600000, 'yyyy-mm-dd');
|
|
2647
|
-
}
|
|
2648
|
-
});
|
|
2649
|
-
|
|
2650
|
-
/***/ }),
|
|
2651
|
-
|
|
2652
|
-
/***/ "./pipes/index.js":
|
|
2653
|
-
/*!************************!*\
|
|
2654
|
-
!*** ./pipes/index.js ***!
|
|
2655
|
-
\************************/
|
|
2656
|
-
/*! exports provided: default */
|
|
2657
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
2658
|
-
|
|
2659
|
-
"use strict";
|
|
2660
|
-
__webpack_require__.r(__webpack_exports__);
|
|
2661
|
-
/* harmony import */ var _obj_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./obj.js */ "./pipes/obj.js");
|
|
2662
|
-
/* harmony import */ var _str_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./str.js */ "./pipes/str.js");
|
|
2663
|
-
/* harmony import */ var _arr_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./arr.js */ "./pipes/arr.js");
|
|
2664
|
-
/* harmony import */ var _date_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./date.js */ "./pipes/date.js");
|
|
2665
|
-
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
2666
|
-
|
|
2667
|
-
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
2668
|
-
|
|
2669
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
2670
|
-
|
|
2671
|
-
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); }
|
|
2672
|
-
|
|
2673
|
-
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
2674
|
-
|
|
2675
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
2676
|
-
|
|
2677
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
2678
|
-
|
|
2679
|
-
|
|
2680
|
-
|
|
2681
|
-
|
|
2682
|
-
// useful pipes
|
|
2683
|
-
|
|
2684
|
-
/* harmony default export */ __webpack_exports__["default"] = ({
|
|
2685
|
-
ID: function ID(x) {
|
|
2686
|
-
return x;
|
|
2687
|
-
},
|
|
2688
|
-
next: function (COUNTER) {
|
|
2689
|
-
return function () {
|
|
2690
|
-
var p = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
2691
|
-
return p + COUNTER++;
|
|
2692
|
-
};
|
|
2693
|
-
}(1),
|
|
2694
|
-
// system
|
|
2695
|
-
"throw": function _throw(error) {
|
|
2696
|
-
var ErrorType = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Error;
|
|
2697
|
-
throw typeof error === 'string' ? new ErrorType(error) : error;
|
|
2698
|
-
},
|
|
2699
|
-
assert: function assert(b, error) {
|
|
2700
|
-
var ErrorType = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : Error;
|
|
2701
|
-
|
|
2702
|
-
if (!b) {
|
|
2703
|
-
throw typeof error === 'string' ? new ErrorType(error) : error;
|
|
2704
|
-
}
|
|
2705
|
-
},
|
|
2706
|
-
log: function log(x, pre) {
|
|
2707
|
-
console.log(pre || 'pipe', x);
|
|
2708
|
-
return x;
|
|
2709
|
-
},
|
|
2710
|
-
track: function track(fn, x, y) {
|
|
2711
|
-
return function () {
|
|
2712
|
-
console.log('track', x || y);
|
|
2713
|
-
return (fn || Function.ID).apply(void 0, arguments);
|
|
2714
|
-
};
|
|
2715
|
-
},
|
|
2716
|
-
// eslint-disable-next-line no-debugger
|
|
2717
|
-
"debugger": function _debugger() {
|
|
2718
|
-
debugger;
|
|
2719
|
-
},
|
|
2720
|
-
// data structures
|
|
2721
|
-
dot: function dot(x, k) {
|
|
2722
|
-
return x && k in x ? x[k] : undefined;
|
|
2723
|
-
},
|
|
2724
|
-
wrap: function wrap(x, k) {
|
|
2725
|
-
return _defineProperty({}, k, x);
|
|
2726
|
-
},
|
|
2727
|
-
includes: function includes(x, p) {
|
|
2728
|
-
return x.includes && x.includes(p);
|
|
2729
|
-
},
|
|
2730
|
-
dig: function dig(o, steps) {
|
|
2731
|
-
return (steps.reduce ? steps : steps.split('.')).reduce(function (r, e) {
|
|
2732
|
-
return r ? r[e] : undefined;
|
|
2733
|
-
}, o);
|
|
2734
|
-
},
|
|
2735
|
-
// logical
|
|
2736
|
-
then: function then(x) {
|
|
2737
|
-
var p = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
|
|
2738
|
-
var n = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
|
|
2739
|
-
return x ? p : n;
|
|
2740
|
-
},
|
|
2741
|
-
not: function not(x) {
|
|
2742
|
-
return !x;
|
|
2743
|
-
},
|
|
2744
|
-
isUndefined: function isUndefined(x) {
|
|
2745
|
-
return typeof x === 'undefined';
|
|
2746
|
-
},
|
|
2747
|
-
isTrue: function isTrue(x) {
|
|
2748
|
-
return x === true;
|
|
2749
|
-
},
|
|
2750
|
-
isFalse: function isFalse(x) {
|
|
2751
|
-
return x === false;
|
|
2752
|
-
},
|
|
2753
|
-
or: function or(x, s) {
|
|
2754
|
-
return x || s;
|
|
2755
|
-
},
|
|
2756
|
-
and: function and(x, s) {
|
|
2757
|
-
return x && s;
|
|
2758
|
-
},
|
|
2759
|
-
// math
|
|
2760
|
-
// eslint-disable-next-line eqeqeq
|
|
2761
|
-
equals: function equals(x, p) {
|
|
2762
|
-
return x == p;
|
|
2763
|
-
},
|
|
2764
|
-
greater: function greater(x, p) {
|
|
2765
|
-
return x > p;
|
|
2766
|
-
},
|
|
2767
|
-
less: function less(x, p) {
|
|
2768
|
-
return x < p;
|
|
2769
|
-
},
|
|
2770
|
-
plus: function plus(x, alt) {
|
|
2771
|
-
return +x + +alt;
|
|
2772
|
-
},
|
|
2773
|
-
minus: function minus(x, alt) {
|
|
2774
|
-
return +x - +alt;
|
|
2775
|
-
},
|
|
2776
|
-
multiply: function multiply(x, alt) {
|
|
2777
|
-
return +x * +alt;
|
|
2778
|
-
},
|
|
2779
|
-
compose: function compose() {
|
|
2780
|
-
for (var _len = arguments.length, ff = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
2781
|
-
ff[_key] = arguments[_key];
|
|
2782
|
-
}
|
|
2783
|
-
|
|
2784
|
-
return function (x0) {
|
|
2785
|
-
return ff.reduceRight(function (x, f) {
|
|
2786
|
-
return f(x);
|
|
2787
|
-
}, x0);
|
|
2788
|
-
};
|
|
2789
|
-
},
|
|
2790
|
-
swap: function swap(f) {
|
|
2791
|
-
return function (a, b) {
|
|
2792
|
-
return f(b, a);
|
|
2793
|
-
};
|
|
2794
|
-
},
|
|
2795
|
-
curry: function () {
|
|
2796
|
-
var _curry = function _curry(fn, args0, lengthLimit) {
|
|
2797
|
-
var fx = function fx(args) {
|
|
2798
|
-
return args.length >= lengthLimit ? fn.apply(void 0, _toConsumableArray(args)) : _curry(fn, args, lengthLimit - args.length);
|
|
2799
|
-
};
|
|
2800
|
-
|
|
2801
|
-
return function () {
|
|
2802
|
-
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
2803
|
-
args[_key2] = arguments[_key2];
|
|
2804
|
-
}
|
|
2805
|
-
|
|
2806
|
-
return fx([].concat(_toConsumableArray(args0), args));
|
|
2807
|
-
};
|
|
2808
|
-
};
|
|
2809
|
-
|
|
2810
|
-
return function (f) {
|
|
2811
|
-
for (var _len3 = arguments.length, args = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {
|
|
2812
|
-
args[_key3 - 1] = arguments[_key3];
|
|
2813
|
-
}
|
|
2814
|
-
|
|
2815
|
-
return _curry(f, args, f.length);
|
|
2816
|
-
};
|
|
2817
|
-
}(),
|
|
2818
|
-
|
|
2819
|
-
/* Simple GUID generator. */
|
|
2820
|
-
guid: function (s4) {
|
|
2821
|
-
return function () {
|
|
2822
|
-
return "".concat(s4()).concat(s4(), "-").concat(s4(), "-").concat(s4(), "-").concat(s4(), "-").concat(s4()).concat(s4()).concat(s4());
|
|
2823
|
-
};
|
|
2824
|
-
}(function () {
|
|
2825
|
-
return Math.floor((1 + Math.random()) * 0x10000).toString(16).substring(1);
|
|
2826
|
-
}),
|
|
2827
|
-
|
|
2828
|
-
/* Simple hash function. */
|
|
2829
|
-
hash: function hash(s) {
|
|
2830
|
-
var a = 1;
|
|
2831
|
-
var c = 0;
|
|
2832
|
-
var h;
|
|
2833
|
-
var o;
|
|
2834
|
-
|
|
2835
|
-
if (s) {
|
|
2836
|
-
a = 0;
|
|
2837
|
-
/* jshint plusplus:false bitwise:false */
|
|
2838
|
-
|
|
2839
|
-
for (h = s.length - 1; h >= 0; h--) {
|
|
2840
|
-
o = s.charCodeAt(h);
|
|
2841
|
-
a = (a << 6 & 268435455) + o + (o << 14);
|
|
2842
|
-
c = a & 266338304;
|
|
2843
|
-
a = c !== 0 ? a ^ c >> 21 : a;
|
|
2844
|
-
}
|
|
2845
|
-
}
|
|
2846
|
-
|
|
2847
|
-
return String(a);
|
|
2848
|
-
},
|
|
2849
|
-
str: _str_js__WEBPACK_IMPORTED_MODULE_1__["default"],
|
|
2850
|
-
arr: _arr_js__WEBPACK_IMPORTED_MODULE_2__["default"],
|
|
2851
|
-
obj: _obj_js__WEBPACK_IMPORTED_MODULE_0__["default"],
|
|
2852
|
-
date: Object.assign(function (s, format) {
|
|
2853
|
-
return _date_js__WEBPACK_IMPORTED_MODULE_3__["default"].format(s, format);
|
|
2854
|
-
}, _date_js__WEBPACK_IMPORTED_MODULE_3__["default"])
|
|
2855
|
-
});
|
|
2856
|
-
|
|
2857
|
-
/***/ }),
|
|
2858
|
-
|
|
2859
|
-
/***/ "./pipes/obj.js":
|
|
2860
|
-
/*!**********************!*\
|
|
2861
|
-
!*** ./pipes/obj.js ***!
|
|
2862
|
-
\**********************/
|
|
2863
|
-
/*! exports provided: default */
|
|
2864
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
2865
|
-
|
|
2866
|
-
"use strict";
|
|
2867
|
-
__webpack_require__.r(__webpack_exports__);
|
|
2868
|
-
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
2869
|
-
|
|
2870
|
-
Object.EMPTY = Object.freeze({});
|
|
2871
|
-
/* harmony default export */ __webpack_exports__["default"] = ({
|
|
2872
|
-
/**
|
|
2873
|
-
* Checks if argument is empty .
|
|
2874
|
-
*/
|
|
2875
|
-
isEmpty: function isEmpty(x) {
|
|
2876
|
-
if (!x) {
|
|
2877
|
-
return true;
|
|
2878
|
-
}
|
|
2879
|
-
|
|
2880
|
-
if (x instanceof Object) {
|
|
2881
|
-
// (zero-length array)
|
|
2882
|
-
if (Array.isArray(x)) {
|
|
2883
|
-
return x.length === 0;
|
|
2884
|
-
} // (zero-size map)
|
|
2885
|
-
|
|
2886
|
-
|
|
2887
|
-
if (x instanceof Map) {
|
|
2888
|
-
return x.size === 0;
|
|
2889
|
-
} // (has no props)
|
|
2890
|
-
|
|
2891
|
-
|
|
2892
|
-
return Object.keys(x).length === 0;
|
|
2893
|
-
}
|
|
2894
|
-
|
|
2895
|
-
return false;
|
|
2896
|
-
},
|
|
2897
|
-
decode: function decode(val) {
|
|
2898
|
-
var value = decodeURIComponent(val);
|
|
2899
|
-
|
|
2900
|
-
if ('{['.indexOf(value[0]) > -1) {
|
|
2901
|
-
return JSON.parse(value);
|
|
2902
|
-
}
|
|
2903
|
-
|
|
2904
|
-
return Object.decodePrimitive(val);
|
|
2905
|
-
},
|
|
2906
|
-
decodePrimitive: function (map) {
|
|
2907
|
-
return function (value) {
|
|
2908
|
-
if (value && '1234567890+-'.includes(value[0]) && value.length <= 17) {
|
|
2909
|
-
var num = +value;
|
|
2910
|
-
return isNaN(num) ? value : num;
|
|
2911
|
-
}
|
|
2912
|
-
|
|
2913
|
-
return value in map ? map[value] : value;
|
|
2914
|
-
};
|
|
2915
|
-
}({
|
|
2916
|
-
"true": true,
|
|
2917
|
-
"false": false,
|
|
2918
|
-
"null": null,
|
|
2919
|
-
undefined: undefined
|
|
2920
|
-
}),
|
|
2921
|
-
encode: function encode(value) {
|
|
2922
|
-
return encodeURIComponent(_typeof(value) === 'object' ? JSON.stringify(value) : "".concat(value));
|
|
2923
|
-
}
|
|
2924
|
-
});
|
|
2925
|
-
|
|
2926
|
-
/***/ }),
|
|
2927
|
-
|
|
2928
|
-
/***/ "./pipes/str.js":
|
|
2929
|
-
/*!**********************!*\
|
|
2930
|
-
!*** ./pipes/str.js ***!
|
|
2931
|
-
\**********************/
|
|
2932
|
-
/*! exports provided: default */
|
|
2933
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
2934
|
-
|
|
2935
|
-
"use strict";
|
|
2936
|
-
__webpack_require__.r(__webpack_exports__);
|
|
2937
|
-
function capitalize(x) {
|
|
2938
|
-
if (!x) {
|
|
2939
|
-
return x;
|
|
2940
|
-
}
|
|
2941
|
-
|
|
2942
|
-
var s = "".concat(x);
|
|
2943
|
-
return s[0].toUpperCase() + s.slice(1);
|
|
2944
|
-
}
|
|
2945
|
-
|
|
2946
|
-
function camelize(s) {
|
|
2947
|
-
var sep = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '_';
|
|
2948
|
-
return s && s.length && s.split(sep).map(function (t, i) {
|
|
2949
|
-
return i ? capitalize(t) : t;
|
|
2950
|
-
}).join('') || '';
|
|
2951
|
-
}
|
|
2952
|
-
/**
|
|
2953
|
-
* Formats given string template with params.
|
|
2954
|
-
*
|
|
2955
|
-
* Template should contain placeholders like `{someKey}`,
|
|
2956
|
-
* which will be replaced with value by key from params.
|
|
2957
|
-
*
|
|
2958
|
-
* @param {string} template string template
|
|
2959
|
-
* @param {object} params hash with parameters
|
|
2960
|
-
*/
|
|
2961
|
-
|
|
2962
|
-
|
|
2963
|
-
/* harmony default export */ __webpack_exports__["default"] = ({
|
|
2964
|
-
format: function format(template, params) {
|
|
2965
|
-
return "".concat(template || '').replace(/\{([\S]+)\}/i, function (_, key) {
|
|
2966
|
-
return (params && params[key]) != null ? params[key] : '';
|
|
2967
|
-
});
|
|
2968
|
-
},
|
|
2969
|
-
wrap: function wrap(x, template) {
|
|
2970
|
-
return !x ? '' : "".concat(template || '*').replace('*', x);
|
|
2971
|
-
},
|
|
2972
|
-
tail: function tail(x) {
|
|
2973
|
-
var sep = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '.';
|
|
2974
|
-
|
|
2975
|
-
if (!x) {
|
|
2976
|
-
return '';
|
|
2977
|
-
}
|
|
2978
|
-
|
|
2979
|
-
var pos = x.lastIndexOf(sep);
|
|
2980
|
-
return pos === -1 ? x : x.slice(pos + sep.length);
|
|
2981
|
-
},
|
|
2982
|
-
lastTail: function lastTail(key) {
|
|
2983
|
-
var sep = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '.';
|
|
2984
|
-
return ('' + key).split(sep).slice(-1)[0];
|
|
2985
|
-
},
|
|
2986
|
-
head: function head(x) {
|
|
2987
|
-
var sep = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '.';
|
|
2988
|
-
|
|
2989
|
-
if (!x) {
|
|
2990
|
-
return '';
|
|
2991
|
-
}
|
|
2992
|
-
|
|
2993
|
-
var pos = x.indexOf(sep);
|
|
2994
|
-
return pos === -1 ? x : x.slice(0, pos);
|
|
2995
|
-
},
|
|
2996
|
-
pad: function pad(x) {
|
|
2997
|
-
var size = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 2;
|
|
2998
|
-
var fill = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '0';
|
|
2999
|
-
var s = String(x);
|
|
3000
|
-
|
|
3001
|
-
while (s.length < size) {
|
|
3002
|
-
s = "".concat(fill).concat(s);
|
|
3003
|
-
}
|
|
3004
|
-
|
|
3005
|
-
return s;
|
|
3006
|
-
},
|
|
3007
|
-
capitalize: capitalize,
|
|
3008
|
-
camelize: camelize,
|
|
3009
|
-
mirror: function mirror(x) {
|
|
3010
|
-
return (x || '').split('').reduce(function (r, c) {
|
|
3011
|
-
return c + r;
|
|
3012
|
-
}, '');
|
|
3013
|
-
},
|
|
3014
|
-
snakeCase: function snakeCase(x) {
|
|
3015
|
-
return (x || '').replace(/([a-z])([A-Z])/g, '$1_$2');
|
|
3016
|
-
},
|
|
3017
|
-
proper: function proper(s) {
|
|
3018
|
-
return capitalize(camelize(s));
|
|
3019
|
-
},
|
|
3020
|
-
upper: function upper(s) {
|
|
3021
|
-
return ('' + s).toUpperCase();
|
|
3022
|
-
}
|
|
3023
|
-
});
|
|
3024
|
-
|
|
3025
|
-
/***/ }),
|
|
3026
|
-
|
|
3027
|
-
/***/ "./pipes/url.js":
|
|
3028
|
-
/*!**********************!*\
|
|
3029
|
-
!*** ./pipes/url.js ***!
|
|
3030
|
-
\**********************/
|
|
3031
|
-
/*! exports provided: default */
|
|
3032
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
3033
|
-
|
|
3034
|
-
"use strict";
|
|
3035
|
-
__webpack_require__.r(__webpack_exports__);
|
|
3036
|
-
/* harmony import */ var _obj_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./obj.js */ "./pipes/obj.js");
|
|
3037
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
3038
|
-
|
|
3039
|
-
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
3040
|
-
|
|
3041
|
-
function _iterableToArrayLimit(arr, i) { if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
3042
|
-
|
|
3043
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
3044
|
-
|
|
3045
|
-
function _createForOfIteratorHelper(o, allowArrayLike) { var it; if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e2) { throw _e2; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e3) { didErr = true; err = _e3; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
|
|
3046
|
-
|
|
3047
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
3048
|
-
|
|
3049
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
3050
|
-
|
|
3051
|
-
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
3052
|
-
|
|
3053
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
|
3054
|
-
|
|
3055
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
3056
|
-
|
|
3057
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
3058
|
-
|
|
3059
|
-
|
|
3060
|
-
/* harmony default export */ __webpack_exports__["default"] = ({
|
|
3061
|
-
/**
|
|
3062
|
-
* Parses string into URL object like `{type, target, path, params, data }`.
|
|
3063
|
-
*
|
|
3064
|
-
* @param {string} s string in format: `type:target/path?params#data`
|
|
3065
|
-
* @param {object} r optional target object
|
|
3066
|
-
* @returns URL object
|
|
3067
|
-
*/
|
|
3068
|
-
parse: function parse(s) {
|
|
3069
|
-
var r = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
3070
|
-
|
|
3071
|
-
if (!s) {
|
|
3072
|
-
return _objectSpread({
|
|
3073
|
-
path: [],
|
|
3074
|
-
params: {},
|
|
3075
|
-
target: ''
|
|
3076
|
-
}, r);
|
|
3077
|
-
}
|
|
3078
|
-
|
|
3079
|
-
if (_typeof(s) === 'object') {
|
|
3080
|
-
return _objectSpread(_objectSpread({
|
|
3081
|
-
path: [],
|
|
3082
|
-
params: {},
|
|
3083
|
-
target: ''
|
|
3084
|
-
}, r), s);
|
|
3085
|
-
}
|
|
3086
|
-
|
|
3087
|
-
var p; // extract type:
|
|
3088
|
-
|
|
3089
|
-
p = s.indexOf(':');
|
|
3090
|
-
|
|
3091
|
-
if (p > -1) {
|
|
3092
|
-
r.type = s.slice(0, p);
|
|
3093
|
-
s = s.slice(p + 1);
|
|
3094
|
-
} // extract data:
|
|
3095
|
-
|
|
3096
|
-
|
|
3097
|
-
p = s.indexOf('#');
|
|
3098
|
-
|
|
3099
|
-
if (p > -1) {
|
|
3100
|
-
r.data = Object.decode(s.slice(p + 1));
|
|
3101
|
-
s = s.slice(0, p);
|
|
3102
|
-
} // extract query params:
|
|
3103
|
-
|
|
3104
|
-
|
|
3105
|
-
p = s.indexOf('?');
|
|
3106
|
-
r.params = r.params || {};
|
|
3107
|
-
|
|
3108
|
-
if (p > -1) {
|
|
3109
|
-
var _iterator = _createForOfIteratorHelper(s.slice(p + 1).split('&')),
|
|
3110
|
-
_step;
|
|
3111
|
-
|
|
3112
|
-
try {
|
|
3113
|
-
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
3114
|
-
var param = _step.value;
|
|
3115
|
-
|
|
3116
|
-
var _param$split = param.split('='),
|
|
3117
|
-
_param$split2 = _slicedToArray(_param$split, 2),
|
|
3118
|
-
key = _param$split2[0],
|
|
3119
|
-
value = _param$split2[1];
|
|
3120
|
-
|
|
3121
|
-
if (value) {
|
|
3122
|
-
r.params[key] = _obj_js__WEBPACK_IMPORTED_MODULE_0__["default"].decode(value);
|
|
3123
|
-
}
|
|
3124
|
-
}
|
|
3125
|
-
} catch (err) {
|
|
3126
|
-
_iterator.e(err);
|
|
3127
|
-
} finally {
|
|
3128
|
-
_iterator.f();
|
|
3129
|
-
}
|
|
3130
|
-
|
|
3131
|
-
s = s.slice(0, p);
|
|
3132
|
-
} // target and path:
|
|
3133
|
-
|
|
3134
|
-
|
|
3135
|
-
var path = r.path = s.split('/').map(decodeURIComponent);
|
|
3136
|
-
|
|
3137
|
-
while (path.length && !r.target) {
|
|
3138
|
-
r.target = path.shift();
|
|
3139
|
-
}
|
|
3140
|
-
|
|
3141
|
-
return r;
|
|
3142
|
-
},
|
|
3143
|
-
|
|
3144
|
-
/**
|
|
3145
|
-
* Represents an URL object as a string
|
|
3146
|
-
*
|
|
3147
|
-
* @param {object} r URL object like `{type, target, path, params, data }`
|
|
3148
|
-
* @returns string in format `type://target/path?params#data`
|
|
3149
|
-
*/
|
|
3150
|
-
stringify: function stringify(r) {
|
|
3151
|
-
var result = '';
|
|
3152
|
-
|
|
3153
|
-
if (!r) {
|
|
3154
|
-
return result;
|
|
3155
|
-
}
|
|
3156
|
-
|
|
3157
|
-
if (typeof r === 'string') {
|
|
3158
|
-
return r;
|
|
3159
|
-
}
|
|
3160
|
-
|
|
3161
|
-
if (r.target) {
|
|
3162
|
-
if (r.type) {
|
|
3163
|
-
result += "".concat(r.type, "://");
|
|
3164
|
-
}
|
|
3165
|
-
|
|
3166
|
-
result += r.target;
|
|
3167
|
-
}
|
|
3168
|
-
|
|
3169
|
-
if (r.path) {
|
|
3170
|
-
result += "/".concat(Array.isArray(r.path) ? r.path.map(encodeURIComponent).join('/') : r.path);
|
|
3171
|
-
}
|
|
3172
|
-
|
|
3173
|
-
var params = r.params;
|
|
3174
|
-
|
|
3175
|
-
if (params) {
|
|
3176
|
-
var keys = Object.keys(params).filter(function (key) {
|
|
3177
|
-
return params[key] != null;
|
|
3178
|
-
});
|
|
3179
|
-
|
|
3180
|
-
if (keys.length) {
|
|
3181
|
-
result += "?".concat(keys.map(function (key) {
|
|
3182
|
-
return "".concat(key, "=").concat(_obj_js__WEBPACK_IMPORTED_MODULE_0__["default"].encode(params[key]));
|
|
3183
|
-
}).join('&'));
|
|
3184
|
-
}
|
|
3185
|
-
}
|
|
3186
|
-
|
|
3187
|
-
if (r.data) {
|
|
3188
|
-
result += "#".concat(_obj_js__WEBPACK_IMPORTED_MODULE_0__["default"].encode(r.data));
|
|
3189
|
-
}
|
|
3190
|
-
|
|
3191
|
-
return result;
|
|
3192
|
-
}
|
|
3193
|
-
});
|
|
3194
|
-
|
|
3195
|
-
/***/ }),
|
|
3196
|
-
|
|
3197
|
-
/***/ "./types/Form.js":
|
|
9
|
+
/*! no static exports found */function(e,t,r){var n=r(/*! @babel/runtime/helpers/interopRequireDefault */"./node_modules/@babel/runtime/helpers/interopRequireDefault.js");Object.defineProperty(t,"__esModule",{value:!0}),t.ATTR_SETTERS=void 0,t.setAttribute=setAttribute;var o,i=n(r(/*! @babel/runtime/helpers/defineProperty */"./node_modules/@babel/runtime/helpers/defineProperty.js")),u=n(r(/*! @babel/runtime/helpers/slicedToArray */"./node_modules/@babel/runtime/helpers/slicedToArray.js")),s=n(r(/*! @babel/runtime/helpers/extends */"./node_modules/@babel/runtime/helpers/extends.js")),l=function camelize(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"_",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:" ";return(""+e).split(t).map((function(e,t){return t?e[0].toUpperCase()+e.slice(1):e})).join(r)},a=function setListener(e,t,r,n){var o=t.split(":")[0];setAttribute(e,t,n?function(t){return e.$attributes[o]((0,s.default)({},r.$dataset),t),!1}:null)};function setAttribute(e,t,r){var n;if(null!=r)if("function"==typeof r){var o=function fnValue(){e.isDone||r.apply(void 0,arguments)};if(e.listeners||(e.listeners=new Map),!e.listeners.has(t)){var i=t.split(":"),s=(0,u.default)(i,2),l=s[0],a=s[1],c=void 0===a?l:a;e.element.addEventListener(c,o,!1),e.listeners.set(t,o)}}else e.element.setAttribute(t,r);else if(null!=(n=e.listeners)&&n.has(t)){var d=t.split(":"),f=(0,u.default)(d,2),p=f[0],m=f[1],h=void 0===m?p:m;e.element.removeEventListener(h,e.listeners.get(t)),e.listeners.delete(t)}else e.element.removeAttribute(t)}var c=(o={disabled:function disabled(e,t,r){return t.disabled=!!r||null},class:function _class(e,t,r){t.className=String(r||"")},selected:function selected(e,t,r){return t.selected=!!r||null},value:function value(e,t,r){return t.value=null==r?"":r},checked:function checked(e,t,r){return t.checked=!!r},init:function init(e,t,r){var n=r;e.init=function(){return n(t,e)}},data:function data(e,t,r){var n=r;n&&t.$dataset?(Object.keys(t.$dataset).forEach((function(e){null==n[e]&&(t.dataset[l(e,"-","")]=null)})),t.$dataset=(0,s.default)({},t.$dataset,n)):t.$dataset=n?(0,s.default)({},n):t.$dataset||{},n&&Object.keys(n).forEach((function(e){t.dataset[l(e,"-","")]=n[e]}))},click:function click(e,t,r){return a(e,"click:click",t,r)}},(0,i.default)(o,"bubble-click",(function bubbleClick(e,t,r){return a(e,"bubble-click:click",t,r)})),(0,i.default)(o,"blur",(function blur(e,t,r){return a(e,"blur:blur",t,r)})),(0,i.default)(o,"dblclick",(function dblclick(e,t,r){return a(e,"dblclick:dblclick",t,r)})),(0,i.default)(o,"scroll",(function scroll(e,t,r){return a(e,"scroll:scroll",t,r)})),(0,i.default)(o,"touchstart",(function touchstart(e,t,r){var n=r?function(r){return e.$attributes.touchstart((0,s.default)({},t.$dataset,{x:r.pageX||r.changedTouches[0].screenX,y:r.pageY||r.changedTouches[0].screenY}),r),!1}:null;setAttribute(e,"touchstart:touchstart",n),setAttribute(e,"touchstart:mousedown",n)})),(0,i.default)(o,"touch",(function touch(e,t,r){var n=(0,s.default)({},t.$dataset),o=r?function(e){return n.active=!0,n.x=e.pageX||e.changedTouches[0].screenX,n.y=e.pageY||e.changedTouches[0].screenY,!1}:null;setAttribute(e,"touch:touchstart",o),setAttribute(e,"touch:mousedown",o);var i=r?function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return function(r){return n.active&&(n.active=!t,n.xx=r.pageX||r.changedTouches[0].screenX,n.yy=r.pageY||r.changedTouches[0].screenY,n.dx=n.xx-n.x,n.dy=n.yy-n.y,e.$attributes.touch(n,r)),!1}}:function(){return null};setAttribute(e,"touch:touchcancel",i(!0)),setAttribute(e,"touch:touchend",i(!0)),setAttribute(e,"touch:mouseup",i(!0)),setAttribute(e,"touch:touchmove",i(!1)),setAttribute(e,"touch:mousemove",i(!1))})),(0,i.default)(o,"keypress",(function keypress(e,t,r){setAttribute(e,"keypress:keyup",r?function(r){if(13!==r.keyCode&&27!==r.keyCode){var n=e.$attributes.keypress;n&&n((0,s.default)({value:t.value},t.$dataset),r),setTimeout((function(){return t.focus()}),0)}return!1}:null)})),(0,i.default)(o,"enter",(function enter(e,t,r){setAttribute(e,"enter:keyup",r?function(r){return 13===r.keyCode&&e.$attributes.enter((0,s.default)({value:t.value},t.$dataset),r),13!==r.keyCode&&27!==r.keyCode||t.blur(),!1}:null)})),(0,i.default)(o,"change",(function change(e,t,r){setAttribute(e,"change:change",r?function(r){return e.$attributes.change((0,s.default)({value:t.value},t.$dataset),r),!1}:null)})),(0,i.default)(o,"toggle",(function toggle(e,t,r){setAttribute(e,"toggle:change",r?function(r){return e.$attributes.toggle((0,s.default)({value:t.checked},t.$dataset),r),!1}:null)})),o);t.ATTR_SETTERS=c},"./core-web/elements.ts":
|
|
10
|
+
/*!******************************!*\
|
|
11
|
+
!*** ./core-web/elements.ts ***!
|
|
12
|
+
\******************************/
|
|
13
|
+
/*! no static exports found */function(e,t,r){var n=r(/*! @babel/runtime/helpers/interopRequireDefault */"./node_modules/@babel/runtime/helpers/interopRequireDefault.js");Object.defineProperty(t,"__esModule",{value:!0}),t.DomTextElement=t.DomElement=void 0;var o=n(r(/*! @babel/runtime/helpers/defineProperty */"./node_modules/@babel/runtime/helpers/defineProperty.js")),i=n(r(/*! @babel/runtime/helpers/extends */"./node_modules/@babel/runtime/helpers/extends.js")),u=n(r(/*! @babel/runtime/helpers/classCallCheck */"./node_modules/@babel/runtime/helpers/classCallCheck.js")),s=n(r(/*! @babel/runtime/helpers/createClass */"./node_modules/@babel/runtime/helpers/createClass.js")),l=r(/*! ./attributes */"./core-web/attributes.ts"),a=function(){function DomElement(e,t,r){(0,u.default)(this,DomElement),this.isDone=!1,this.$=r,this.element=document.createElement(e),this.element.impl=this}return(0,s.default)(DomElement,[{key:"done",value:function done(){var e,t;null==(e=this.element)||null==(t=e.parentElement)||t.removeChild(this.element),this.$attributes=void 0}},{key:"stateChanged",value:function stateChanged(e){var t=this,r=this.$attributes||(this.$attributes={}),n=this.element;e.forEach((function(e,u){if(e!==r[u]){var s=l.ATTR_SETTERS[u];s?s(t,n,e):"data-"===u.slice(0,5)?l.ATTR_SETTERS.data(t,n,(0,i.default)({},n.$dataset,(0,o.default)({},u.slice(5),e))):(0,l.setAttribute)(t,u,e)}r[u]=e}))}}]),DomElement}();t.DomElement=a;var c=function(){function DomTextElement(e){(0,u.default)(this,DomTextElement),this.element=document.createTextNode(String(e.text||""))}return(0,s.default)(DomTextElement,[{key:"done",value:function done(){var e;null==(e=this.element.parentElement)||e.removeChild(this.element)}},{key:"stateChanged",value:function stateChanged(e){e.has("text")&&(this.element.textContent=e.get("text"))}}]),DomTextElement}();t.DomTextElement=c},"./core-web/index.ts":
|
|
14
|
+
/*!***************************!*\
|
|
15
|
+
!*** ./core-web/index.ts ***!
|
|
16
|
+
\***************************/
|
|
17
|
+
/*! no static exports found */function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.arrmatura=arrmatura;var n=r(/*! ../core */"./core/index.ts"),o=r(/*! ./WebPlatform */"./core-web/WebPlatform.ts");function arrmatura(e,t){var r=t.rootElement,i=t.pipes,u=t.functions,s=void 0===u?i:u,l=t.types,a=t.resources;n.Platform.instance=new o.WebPlatform(r),new n.CArrmaturaNode(e,{functions:s,types:l,resources:a}).launch()}Object.defineProperty(window,"arrmatura",{value:arrmatura})},"./core-web/reflow.ts":
|
|
18
|
+
/*!****************************!*\
|
|
19
|
+
!*** ./core-web/reflow.ts ***!
|
|
20
|
+
\****************************/
|
|
21
|
+
/*! no static exports found */function(e,t){function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function appendElt(e,t,r){var n=r?r.nextSibling:t.firstChild;return n?e!==n&&t.insertBefore(e,n):t!==e.parentElement&&t.appendChild(e),e}Object.defineProperty(t,"__esModule",{value:!0}),t.reflow=function reflow(e,t,r){if(e.children)for(var n,o=function _createForOfIteratorHelperLoose(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(r)return(r=r.call(e)).next.bind(r);if(Array.isArray(e)||(r=function _unsupportedIterableToArray(e,t){if(!e)return;if("string"==typeof e)return _arrayLikeToArray(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _arrayLikeToArray(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(e.children.values());!(n=o()).done;){var i=n.value,u=i.impl.element;u?u&&(reflow(i,u),r=appendElt(u,t,r)):r=reflow(i,t,r)}return r}},"./core/Arrmatura.ts":
|
|
22
|
+
/*!***************************!*\
|
|
23
|
+
!*** ./core/Arrmatura.ts ***!
|
|
24
|
+
\***************************/
|
|
25
|
+
/*! no static exports found */function(e,t,r){var n=r(/*! @babel/runtime/helpers/interopRequireDefault */"./node_modules/@babel/runtime/helpers/interopRequireDefault.js");Object.defineProperty(t,"__esModule",{value:!0}),t.CArrmaturaNode=t.Arrmatura=void 0;var o=n(r(/*! @babel/runtime/helpers/toArray */"./node_modules/@babel/runtime/helpers/toArray.js")),i=n(r(/*! @babel/runtime/helpers/classCallCheck */"./node_modules/@babel/runtime/helpers/classCallCheck.js")),u=n(r(/*! @babel/runtime/helpers/createClass */"./node_modules/@babel/runtime/helpers/createClass.js")),s=n(r(/*! @babel/runtime/helpers/inherits */"./node_modules/@babel/runtime/helpers/inherits.js")),l=n(r(/*! @babel/runtime/helpers/possibleConstructorReturn */"./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")),a=n(r(/*! @babel/runtime/helpers/getPrototypeOf */"./node_modules/@babel/runtime/helpers/getPrototypeOf.js")),c=r(/*! ./CNode */"./core/CNode.ts"),d=r(/*! ./compileNode */"./core/compileNode.ts"),f=r(/*! ./Component */"./core/Component.ts"),p=r(/*! ../lib/xml */"./lib/xml.ts"),m=r(/*! ./Platform */"./core/Platform.ts"),h=r(/*! ./register */"./core/register.ts");function _createSuper(e){var t=function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function _createSuperInternal(){var r,n=(0,a.default)(e);if(t){var o=(0,a.default)(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return(0,l.default)(this,r)}}var b=function(e){(0,s.default)(Arrmatura,e);var t=_createSuper(Arrmatura);function Arrmatura(){return(0,i.default)(this,Arrmatura),t.apply(this,arguments)}return(0,u.default)(Arrmatura,[{key:"displayName",get:function get(){return"Arrmatura"}},{key:"arrmatura",get:function get(){return this}},{key:"requestReflow",value:function requestReflow(){var e=this;this.reflowId||(this.reflowId=setTimeout((function(){m.Platform.instance.reflow(e),e.reflowId=void 0}),10))}},{key:"res",value:function res(e){var t=e.split("."),r=(0,o.default)(t),n=r[0],i=r.slice(1),u=this.node.resources,s=void 0===u?{}:u,l=n?null==s?void 0:s[n]:s;return l&&0!==i.length?1===i.length?l[i[0]]:i.reduce((function(e,t){return e?e[t]:null}),l):l}},{key:"pipe",value:function pipe(e){var t,r=e.split("."),n=(0,o.default)(r),i=n[0],u=n.slice(1),s=null==(t=this.node.functions)?void 0:t[i];return s&&0!==u.length?1===u.length?s[u[0]]:u.reduce((function(e,t){return e?e[t]:null}),s):s}}]),Arrmatura}(f.Component);t.Arrmatura=b;var y=function(e){(0,s.default)(CArrmaturaNode,e);var t=_createSuper(CArrmaturaNode);function CArrmaturaNode(e,r){var n,o=r.types,u=r.functions,s=r.resources;return(0,i.default)(this,CArrmaturaNode),n=t.call(this),(0,h.registerTypes)(o),n.functions=u,n.resources=s,n.content=(0,d.compileNodes)((0,p.xmlParse)(e)),n}return(0,u.default)(CArrmaturaNode,[{key:"ComponentConstructor",get:function get(){return b}},{key:"launch",value:function launch(){var e=this.createComponent();e.up({},!0),console.log(e.toString())}}]),CArrmaturaNode}(c.CNode);t.CArrmaturaNode=y},"./core/CNode.ts":
|
|
3198
26
|
/*!***********************!*\
|
|
3199
|
-
!*** ./
|
|
27
|
+
!*** ./core/CNode.ts ***!
|
|
3200
28
|
\***********************/
|
|
3201
|
-
/*! exports
|
|
3202
|
-
|
|
3203
|
-
|
|
3204
|
-
|
|
3205
|
-
|
|
3206
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FormField", function() { return FormField; });
|
|
3207
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Form", function() { return Form; });
|
|
3208
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
|
3209
|
-
|
|
3210
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
3211
|
-
|
|
3212
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
3213
|
-
|
|
3214
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
3215
|
-
|
|
3216
|
-
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
3217
|
-
|
|
3218
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
3219
|
-
|
|
3220
|
-
var FIELD_TYPES = {
|
|
3221
|
-
bool: 'SwitchField'
|
|
3222
|
-
};
|
|
3223
|
-
var FormField = /*#__PURE__*/function () {
|
|
3224
|
-
function FormField() {
|
|
3225
|
-
_classCallCheck(this, FormField);
|
|
3226
|
-
}
|
|
3227
|
-
|
|
3228
|
-
_createClass(FormField, [{
|
|
3229
|
-
key: "onChange",
|
|
3230
|
-
value: function onChange(_ref) {
|
|
3231
|
-
var value = _ref.value;
|
|
3232
|
-
var form = this.form;
|
|
3233
|
-
var field = this.field;
|
|
3234
|
-
var id = field.id;
|
|
3235
|
-
form.data = _objectSpread(_objectSpread({}, form.data), {}, _defineProperty({}, id, value));
|
|
3236
|
-
form.change && form.change(form.data);
|
|
3237
|
-
}
|
|
3238
|
-
}, {
|
|
3239
|
-
key: "TEMPLATE",
|
|
3240
|
-
get: function get() {
|
|
3241
|
-
return (
|
|
3242
|
-
/* html */
|
|
3243
|
-
"\n <ui:fragment>\n <ui:tag tag={fieldType} ui:props={fieldProps} onChange={onChange}/>\n </ui:fragment>"
|
|
3244
|
-
);
|
|
3245
|
-
}
|
|
3246
|
-
}, {
|
|
3247
|
-
key: "fieldType",
|
|
3248
|
-
get: function get() {
|
|
3249
|
-
var type = this.field.type || 'text';
|
|
3250
|
-
return FIELD_TYPES[type] || String.capitalize(type) + 'Field';
|
|
3251
|
-
}
|
|
3252
|
-
}, {
|
|
3253
|
-
key: "fieldProps",
|
|
3254
|
-
get: function get() {
|
|
3255
|
-
var field = this.field;
|
|
3256
|
-
var form = this.form;
|
|
3257
|
-
var id = field.id;
|
|
3258
|
-
var data = form.data || {};
|
|
3259
|
-
var value = data[id];
|
|
3260
|
-
return _objectSpread(_objectSpread({}, field), {}, {
|
|
3261
|
-
error: form.error && form.error.fields && form.error.fields[id] || null,
|
|
3262
|
-
|
|
3263
|
-
get disabled() {
|
|
3264
|
-
return field.disabled && field.disabled(this.value, this.data);
|
|
3265
|
-
},
|
|
3266
|
-
|
|
3267
|
-
value: value === undefined ? null : value,
|
|
3268
|
-
caption: field.caption || field.name,
|
|
3269
|
-
data: data
|
|
3270
|
-
});
|
|
3271
|
-
}
|
|
3272
|
-
}]);
|
|
3273
|
-
|
|
3274
|
-
return FormField;
|
|
3275
|
-
}();
|
|
3276
|
-
var Form = /*#__PURE__*/function () {
|
|
3277
|
-
function Form() {
|
|
3278
|
-
_classCallCheck(this, Form);
|
|
3279
|
-
}
|
|
3280
|
-
|
|
3281
|
-
_createClass(Form, [{
|
|
3282
|
-
key: "getForm",
|
|
3283
|
-
value: function getForm() {
|
|
3284
|
-
return this;
|
|
3285
|
-
}
|
|
3286
|
-
}, {
|
|
3287
|
-
key: "getFields",
|
|
3288
|
-
value: function getFields() {
|
|
3289
|
-
return this.fields || Object.keys(this.data).map(function (id) {
|
|
3290
|
-
return {
|
|
3291
|
-
id: id,
|
|
3292
|
-
caption: id
|
|
3293
|
-
};
|
|
3294
|
-
});
|
|
3295
|
-
}
|
|
3296
|
-
}, {
|
|
3297
|
-
key: "TEMPLATE",
|
|
3298
|
-
get: function get() {
|
|
3299
|
-
return (
|
|
3300
|
-
/* html */
|
|
3301
|
-
"\n <div autocomplete=\"off\" class=\"form-horizontal\">\n <FormField ui:for=\"field of fields\" field={field} form={form}/>\n </div>"
|
|
3302
|
-
);
|
|
3303
|
-
}
|
|
3304
|
-
}]);
|
|
3305
|
-
|
|
3306
|
-
return Form;
|
|
3307
|
-
}();
|
|
3308
|
-
|
|
3309
|
-
/***/ }),
|
|
3310
|
-
|
|
3311
|
-
/***/ "./types/NavigationService.js":
|
|
3312
|
-
/*!************************************!*\
|
|
3313
|
-
!*** ./types/NavigationService.js ***!
|
|
3314
|
-
\************************************/
|
|
3315
|
-
/*! exports provided: NavigationService */
|
|
3316
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
3317
|
-
|
|
3318
|
-
"use strict";
|
|
3319
|
-
__webpack_require__.r(__webpack_exports__);
|
|
3320
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NavigationService", function() { return NavigationService; });
|
|
3321
|
-
/* harmony import */ var _Service__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Service */ "./types/Service.js");
|
|
3322
|
-
/* harmony import */ var _pipes_url__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../pipes/url */ "./pipes/url.js");
|
|
3323
|
-
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
3324
|
-
|
|
3325
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
|
3326
|
-
|
|
3327
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
3328
|
-
|
|
3329
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
3330
|
-
|
|
3331
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
3332
|
-
|
|
3333
|
-
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
3334
|
-
|
|
3335
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
3336
|
-
|
|
3337
|
-
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
3338
|
-
|
|
3339
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
3340
|
-
|
|
3341
|
-
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
3342
|
-
|
|
3343
|
-
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
3344
|
-
|
|
3345
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
3346
|
-
|
|
3347
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
|
3348
|
-
|
|
3349
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
3350
|
-
|
|
3351
|
-
|
|
3352
|
-
|
|
3353
|
-
var NavigationService = /*#__PURE__*/function (_Service) {
|
|
3354
|
-
_inherits(NavigationService, _Service);
|
|
3355
|
-
|
|
3356
|
-
var _super = _createSuper(NavigationService);
|
|
3357
|
-
|
|
3358
|
-
function NavigationService() {
|
|
3359
|
-
_classCallCheck(this, NavigationService);
|
|
3360
|
-
|
|
3361
|
-
return _super.apply(this, arguments);
|
|
3362
|
-
}
|
|
3363
|
-
|
|
3364
|
-
_createClass(NavigationService, [{
|
|
3365
|
-
key: "init",
|
|
3366
|
-
value: function init() {
|
|
3367
|
-
var _this = this;
|
|
3368
|
-
|
|
3369
|
-
this.prevHash = '';
|
|
3370
|
-
|
|
3371
|
-
this.hashchange = function () {
|
|
3372
|
-
var hash = window.location.hash.slice(1);
|
|
3373
|
-
|
|
3374
|
-
if (hash[0] === '/' && hash !== _this.prevHash) {
|
|
3375
|
-
_this.emit('this.hash', {
|
|
3376
|
-
value: hash.slice(1)
|
|
3377
|
-
});
|
|
3378
|
-
|
|
3379
|
-
_this.prevHash = hash;
|
|
3380
|
-
} else if (!_this.prevHash) {
|
|
3381
|
-
_this.emit('this.hash', {
|
|
3382
|
-
value: 'main'
|
|
3383
|
-
});
|
|
3384
|
-
|
|
3385
|
-
_this.prevHash = '/main';
|
|
3386
|
-
}
|
|
3387
|
-
};
|
|
3388
|
-
|
|
3389
|
-
window.addEventListener('hashchange', this.hashchange);
|
|
3390
|
-
setTimeout(function () {
|
|
3391
|
-
return _this.hashchange();
|
|
3392
|
-
}, 0);
|
|
3393
|
-
}
|
|
3394
|
-
}, {
|
|
3395
|
-
key: "done",
|
|
3396
|
-
value: function done() {
|
|
3397
|
-
window.removeEventListener('hashchange', this.hashchange);
|
|
3398
|
-
}
|
|
3399
|
-
}, {
|
|
3400
|
-
key: "update",
|
|
3401
|
-
value: function update(d) {
|
|
3402
|
-
var _url$parse = _pipes_url__WEBPACK_IMPORTED_MODULE_1__["default"].parse(d),
|
|
3403
|
-
target = _url$parse.target,
|
|
3404
|
-
_url$parse$path = _url$parse.path,
|
|
3405
|
-
path = _url$parse$path === void 0 ? ['*'] : _url$parse$path,
|
|
3406
|
-
params = _url$parse.params;
|
|
3407
|
-
|
|
3408
|
-
var state = {
|
|
3409
|
-
target: (!target || target === '*' ? this.target : target) || 'main',
|
|
3410
|
-
path: path[0] === '*' ? this.path : path,
|
|
3411
|
-
params: params.reset ? _objectSpread(_objectSpread({}, params), {}, {
|
|
3412
|
-
reset: null
|
|
3413
|
-
}) : _objectSpread(_objectSpread({}, this.params), params)
|
|
3414
|
-
};
|
|
3415
|
-
window.location.hash = this.prevHash = '/' + _pipes_url__WEBPACK_IMPORTED_MODULE_1__["default"].stringify(state);
|
|
3416
|
-
return state;
|
|
3417
|
-
}
|
|
3418
|
-
}, {
|
|
3419
|
-
key: "getRoute",
|
|
3420
|
-
value: function getRoute() {
|
|
3421
|
-
return {
|
|
3422
|
-
target: this.target,
|
|
3423
|
-
path: this.path,
|
|
3424
|
-
params: this.params
|
|
3425
|
-
};
|
|
3426
|
-
}
|
|
3427
|
-
}, {
|
|
3428
|
-
key: "onHash",
|
|
3429
|
-
value: function onHash(_ref) {
|
|
3430
|
-
var value = _ref.value;
|
|
3431
|
-
return this.update(value);
|
|
3432
|
-
}
|
|
3433
|
-
}, {
|
|
3434
|
-
key: "onParams",
|
|
3435
|
-
value: function onParams(params) {
|
|
3436
|
-
return this.update({
|
|
3437
|
-
params: _objectSpread(_objectSpread({}, params), {}, {
|
|
3438
|
-
data: null
|
|
3439
|
-
})
|
|
3440
|
-
});
|
|
3441
|
-
}
|
|
3442
|
-
}]);
|
|
3443
|
-
|
|
3444
|
-
return NavigationService;
|
|
3445
|
-
}(_Service__WEBPACK_IMPORTED_MODULE_0__["Service"]);
|
|
3446
|
-
|
|
3447
|
-
/***/ }),
|
|
3448
|
-
|
|
3449
|
-
/***/ "./types/Service.js":
|
|
29
|
+
/*! no static exports found */function(e,t,r){var n=r(/*! @babel/runtime/helpers/interopRequireDefault */"./node_modules/@babel/runtime/helpers/interopRequireDefault.js");Object.defineProperty(t,"__esModule",{value:!0}),t.CNode=void 0;var o=n(r(/*! @babel/runtime/helpers/toConsumableArray */"./node_modules/@babel/runtime/helpers/toConsumableArray.js")),i=n(r(/*! @babel/runtime/helpers/extends */"./node_modules/@babel/runtime/helpers/extends.js")),u=n(r(/*! @babel/runtime/helpers/defineProperty */"./node_modules/@babel/runtime/helpers/defineProperty.js")),s=n(r(/*! @babel/runtime/helpers/slicedToArray */"./node_modules/@babel/runtime/helpers/slicedToArray.js")),l=n(r(/*! @babel/runtime/helpers/classCallCheck */"./node_modules/@babel/runtime/helpers/classCallCheck.js")),a=n(r(/*! @babel/runtime/helpers/createClass */"./node_modules/@babel/runtime/helpers/createClass.js")),c=r(/*! nextId */"./lib/nextId.ts"),d=r(/*! noop */"./lib/noop.ts"),f=r(/*! ./expression */"./core/expression.ts"),p=function(){function CNode(){(0,l.default)(this,CNode),this.uid=(0,c.nextId)("N"),this.propertyResolvers=[],this.initializers=[]}return(0,a.default)(CNode,[{key:"createComponent",value:function createComponent(e,t){return new this.ComponentConstructor(this,e,t)}},{key:"addInitialState",value:function addInitialState(e){return this.initialState=Object.entries(e).reduce((function(e,t){var r=(0,s.default)(t,2),n=r[0],o=r[1];return e[n]=o,e}),this.initialState||{}),this}},{key:"addPropertyResolver",value:function addPropertyResolver(e,t){return this.propertyResolvers.push((function(r,n){return n[t]=e(r),n})),this}},{key:"addPropertiesResolver",value:function addPropertiesResolver(e){return this.propertyResolvers.push((function(t,r){var n=e(t);return n&&"object"==typeof n&&Object.entries(n).forEach((function(e){var t=(0,s.default)(e,2),n=t[0],o=t[1];r[n]=o})),r})),this}},{key:"addPropertyConnector",value:function addPropertyConnector(e,t){var r=(0,f.compilePipeExpression)(e),n=r.key,o=r.pipec;this.initializers.push((function(e){return e.connect(n,(function(r){return t(o(e,r))}))}))}},{key:"addEmitter",value:function addEmitter(e,t){var r=(0,f.compilePipeExpression)(e),n=r.key,o=r.pipec;this.initializers.push((function(e){return{payload:(0,u.default)({},t,(function(t){var r;return null==(r=e.scope)?void 0:r.emit(n,o(e,t))}))}}))}},{key:"resolveInitialProps",value:function resolveInitialProps(e){return this.resolveProps(e,(0,i.default)({},this.initialState))}},{key:"resolveProps",value:function resolveProps(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.propertyResolvers.reduce((function(t,r){return r(e,t)}),t)}},{key:"compileAttribute",value:function compileAttribute(e,t){if("id"===e)this.addInitialState((0,u.default)({},e,t));else if(e.startsWith("ui:")){var r=String(t);"ui:ref"===e?this.refId=r:"ui:props"===e&&("<"===r[0]&&"-"===r[1]?this.addPropertyConnector(r.slice(2),d.identity):this.addPropertiesResolver((0,f.compileExpression)(t)))}else"string"!=typeof t?this.addInitialState((0,u.default)({},e,t)):"<"===t[0]&&"-"===t[1]?this.addPropertyConnector(t.slice(2),(function(t){return(0,u.default)({},e,t)})):"-"===t[0]&&">"===t[1]?this.addEmitter(t.slice(2),e):t.includes("{")||":"===t[0]?this.addPropertyResolver((0,f.compileExpression)(t),e):this.addInitialState((0,u.default)({},e,t));return this}},{key:"compileAttributes",value:function compileAttributes(e){var t=this;e&&Object.entries(e).forEach((function(e){return t.compileAttribute.apply(t,(0,o.default)(e))}))}}]),CNode}();t.CNode=p},"./core/Component.ts":
|
|
30
|
+
/*!***************************!*\
|
|
31
|
+
!*** ./core/Component.ts ***!
|
|
32
|
+
\***************************/
|
|
33
|
+
/*! no static exports found */function(e,t,r){var n=r(/*! @babel/runtime/helpers/interopRequireDefault */"./node_modules/@babel/runtime/helpers/interopRequireDefault.js");Object.defineProperty(t,"__esModule",{value:!0}),t.Component=void 0;var o=n(r(/*! @babel/runtime/helpers/toConsumableArray */"./node_modules/@babel/runtime/helpers/toConsumableArray.js")),i=n(r(/*! @babel/runtime/helpers/toArray */"./node_modules/@babel/runtime/helpers/toArray.js")),u=n(r(/*! @babel/runtime/helpers/defineProperty */"./node_modules/@babel/runtime/helpers/defineProperty.js")),s=n(r(/*! @babel/runtime/helpers/slicedToArray */"./node_modules/@babel/runtime/helpers/slicedToArray.js")),l=n(r(/*! @babel/runtime/helpers/extends */"./node_modules/@babel/runtime/helpers/extends.js")),a=n(r(/*! @babel/runtime/helpers/classCallCheck */"./node_modules/@babel/runtime/helpers/classCallCheck.js")),c=n(r(/*! @babel/runtime/helpers/createClass */"./node_modules/@babel/runtime/helpers/createClass.js")),d=n(r(/*! @babel/runtime/helpers/classPrivateFieldLooseBase */"./node_modules/@babel/runtime/helpers/classPrivateFieldLooseBase.js")),f=n(r(/*! @babel/runtime/helpers/classPrivateFieldLooseKey */"./node_modules/@babel/runtime/helpers/classPrivateFieldLooseKey.js")),p=r(/*! ./utils */"./core/utils.ts"),m=r(/*! scalar */"./lib/scalar.ts"),h=r(/*! createListeners */"./lib/createListeners.ts"),b=(0,f.default)("isInited"),y=(0,f.default)("isDone"),v=(0,f.default)("listeners"),_=(0,f.default)("defered"),g=(0,f.default)("weak"),C=(0,f.default)("refs"),x=(0,f.default)("propFnMap"),j=function(){function Component(e,t,r){(0,a.default)(this,Component),this._node=e,this.state={},Object.defineProperty(this,b,{writable:!0,value:!1}),Object.defineProperty(this,y,{writable:!0,value:!1}),Object.defineProperty(this,v,{writable:!0,value:void 0}),Object.defineProperty(this,_,{writable:!0,value:[]}),Object.defineProperty(this,g,{writable:!0,value:void 0}),Object.defineProperty(this,C,{writable:!0,value:void 0}),Object.defineProperty(this,x,{writable:!0,value:void 0}),this.scope=r||this,this._parent=t,this.impl=this.createImplementation(this.getInitialState()),this.refId&&this.scope.addComponentReference(this.refId,this)}return(0,c.default)(Component,[{key:"parent",get:function get(){return this._parent||this}},{key:"node",get:function get(){return this._node}},{key:"displayName",get:function get(){return"🔹"}},{key:"arrmatura",get:function get(){return this.parent.arrmatura}},{key:"uid",get:function get(){return this.node.uid}},{key:"createImplementation",value:function createImplementation(e){return(0,l.default)({},e)}},{key:"getInitialState",value:function getInitialState(){return this.node.resolveInitialProps(this)}},{key:"up",value:function up(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!(0,d.default)(this,y)[y])if(t.then&&t.catch)this.upAsync(t);else{var n=new Map;Object.entries(t).forEach((function(t){var r=(0,s.default)(t,2),o=r[0],i=r[1],u=i;i&&u.then&&u.catch?e.upAsync(u,o):o&&void 0!==i&&i!==e.state[o]&&(n.set(o,i),e.state[o]=i)})),(n.size||r)&&(this.stateChanged(n),this.recontent(),this.refId&&this.notify())}}},{key:"upAsync",value:function upAsync(e,t){var r=this,n=this.raceCondition("set:"+t),o=function up(e){return n((function(){return r.up(e)}))};if(t&&"*"!==t){var i=t.replace("Promise","");e.then((function(e){return o((0,u.default)({},i,e))}))}else e.then(o);return e}},{key:"stateChanged",value:function stateChanged(e){var t=this;this.impl.stateChanged?this.impl.stateChanged(e):e.forEach((function(e,r){var n=t.impl[(0,p.methodName)(r,"set")];"function"==typeof n?n.call(t.impl,e):t.impl[r]=e}))}},{key:"get",value:function get(e){var t=(0,d.default)(this,x)[x]||((0,d.default)(this,x)[x]={}),r=t[e];if(r)return r();var n=this.impl,o=n[e];if(o&&"function"==typeof o){var u=o.bind(n);r=function fn(){return u}}else{var s=e.split("."),l=(0,i.default)(s),a=l[0],c=l.slice(1),f=n[(0,p.methodName)(a,"get")],m="function"==typeof f?function(){return f.call(n)}:function(){return n[a]};r=c.length?function(){return c.reduce((function(e,t){return e&&t in e?e[t]:void 0}),m())}:m}return t[e]=r,r()}},{key:"getFromScope",value:function getFromScope(e){return this.scope.get(e)}},{key:"notify",value:function notify(){var e;null==(e=(0,d.default)(this,v)[v])||e.notify()}},{key:"subscribe",value:function subscribe(e,t){var r=this,n=(0,d.default)(this,v)[v]||((0,d.default)(this,v)[v]=(0,h.createListeners)());return{payload:t(this),cancel:n.add((function(){try{var n=t(r);e.up(n)}catch(e){r.logError("Notify ",e)}}))}}},{key:"connect",value:function connect(e,t){var r=e.split("."),n=(0,s.default)(r,2),o=n[0],i=n[1],u=void 0===i?"*":i,l=this.scope.getByRef(o);if(l)return l.subscribe(this,(function(e){return(0,p.applyValue)("*"===u?e.impl:e.get(u),t)}));this.logError("Connect: No such ref: "+o)}},{key:"emit",value:function emit(e,t){if(!e||!e.includes("."))return this.up(e?(0,u.default)({},e,t):t),void this.log("update:"+e,t,this.impl);var r=e.split("."),n=(0,s.default)(r,2),o=n[0],i=n[1];try{var l=this.getByRef(o);if(!l)throw new Error("No such reference: "+o);var a=(0,p.methodName)(i,"on"),c=l.impl,d=c[a];if(!d||"function"!=typeof d)throw new Error("No such method "+o+"."+a);var f=d.call(c,t,c,l);this.log(o+":"+a,f,t,c),f&&l.up(f)}catch(t){this.logError("emit "+e+":",t)}}},{key:"init",value:function init(e){var t=this;if(!(0,d.default)(this,y)[y]&&!(0,d.default)(this,b)[b]){(0,d.default)(this,b)[b]=!0;var r=[],n=this.node.initializers;if(null!=n&&n.length&&n.map((function(e){return e(t)})).forEach((function(n){if(n){var o=n.payload,i=n.cancel;i&&t.defer(i),o&&o.then?r.push(o):(0,l.default)(e,o)}})),r.length)Promise.all(r).then((function(r){if(t.up(r.reduce((function(e,t){return(0,l.default)(e,t)}),e),!0),t.impl.init){var n=t.impl.init(t);n&&t.up(n)}}));else if(this.up(e,!0),this.impl.init){var o=this.impl.init(this);o&&this.up(o)}return this}}},{key:"done",value:function done(){var e,t,r,n,o,i=this;if(!(0,d.default)(this,y)[y]){(0,d.default)(this,y)[y]=!0,null==(e=(t=this.impl).done)||e.call(t,this);var u=this._parent;this._parent=void 0,null==(r=this.children)||r.forEach((function(e){return e.done()})),null==u||null==(n=u.children)||n.delete(this.uid),null==(o=(0,d.default)(this,_)[_])||o.forEach((function(e){return e(i)})),(0,d.default)(this,_)[_]=void 0,this.impl.$=null}}},{key:"content",get:function get(){return this.node.content}},{key:"recontentScope",get:function get(){return this.scope}},{key:"setupChildren",value:function setupChildren(e){this.children=e,e.forEach((function(e){return e.settleAsChild()}))}},{key:"settleAsChild",value:function settleAsChild(){(0,d.default)(this,b)[b]?this.up(this.node.resolveProps(this),!0):this.init(this.node.resolveInitialProps(this))}},{key:"recontent",value:function recontent(){var e,t=this,r=this.recontentScope,n=this.content;this.arrmatura.requestReflow(),null==(e=this.children)||e.forEach((function(e,t){null!=n&&n.get(t)||e.done()}));var o=new Map;null==n||n.forEach((function(e,n){var i,u=(null==(i=t.children)?void 0:i.get(n))||e.createComponent(t,r);o.set(u.uid,u)})),this.setupChildren(o)}},{key:"refId",get:function get(){return this._node.refId}},{key:"refs",get:function get(){return(0,d.default)(this,C)[C]||((0,d.default)(this,C)[C]={})}},{key:"getByRef",value:function getByRef(e){if("this"===e)return this;var t=this.refs[e]||null;return t||(this===this.scope?null:this.scope.getByRef(e))}},{key:"addComponentReference",value:function addComponentReference(e,t){this.refs[e]=t}},{key:"pipe",value:function pipe(e){return this.arrmatura.pipe(e)}},{key:"applyPipe",value:function applyPipe(e,t){var r=this;try{var n=e.split(":"),u=(0,i.default)(n),s=u[0],l=u.slice(1);return this.pipe(s).apply(this.impl,[t].concat((0,o.default)(l.map((function(e){return"@"===e[0]?r.getFromScope(e.slice(1)):(0,m.scalarParse)(e)})))))}catch(r){return this.logError("ERROR: pipe "+e,r),t}}},{key:"raceCondition",value:function raceCondition(e){var t=(0,d.default)(this,g)[g]||((0,d.default)(this,g)[g]=new Map),r=1+(t.get(e)||0);return t.set(e,r),function(n){r===t.get(e)&&(r=0,n())}}},{key:"defer",value:function defer(e){e&&"function"==typeof e&&((0,d.default)(this,_)[_]||((0,d.default)(this,_)[_]=[])).push(e)}},{key:"log",value:function log(){for(var e,t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];(e=console).log.apply(e,[this.displayName+":"+this.uid].concat(r))}},{key:"logError",value:function logError(){for(var e,t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];(e=console).error.apply(e,["⛔ ERROR: "+this.displayName+":"+this.uid].concat(r))}},{key:"res",value:function res(e){return this.arrmatura.res(e)}},{key:"stringify",value:function stringify(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=this.uid,r=this.displayName,n=void 0===r?t:r,i=this.state,u=this.children;if("#text"===n)return""+e+i.text;var s=null!=u&&u.size?(0,o.default)(u.values()).map((function(t){return t.stringify(" "+e)})).join("\n"):"";return e+"<"+n+(0,p.stringifyState)(i)+(s?">\n"+s+"\n"+e+"</"+n+">":"/>")}},{key:"toString",value:function toString(){return this.stringify()}}]),Component}();t.Component=j},"./core/Platform.ts":
|
|
3450
34
|
/*!**************************!*\
|
|
3451
|
-
!*** ./
|
|
35
|
+
!*** ./core/Platform.ts ***!
|
|
3452
36
|
\**************************/
|
|
3453
|
-
/*! exports
|
|
3454
|
-
|
|
3455
|
-
|
|
3456
|
-
|
|
3457
|
-
|
|
3458
|
-
|
|
3459
|
-
|
|
3460
|
-
|
|
3461
|
-
function
|
|
3462
|
-
|
|
3463
|
-
|
|
3464
|
-
|
|
3465
|
-
var
|
|
3466
|
-
|
|
3467
|
-
|
|
3468
|
-
|
|
3469
|
-
|
|
3470
|
-
this.$ = $;
|
|
3471
|
-
}
|
|
3472
|
-
/**
|
|
3473
|
-
* Framework
|
|
3474
|
-
*/
|
|
3475
|
-
|
|
3476
|
-
|
|
3477
|
-
_createClass(Service, [{
|
|
3478
|
-
key: "lookupService",
|
|
3479
|
-
value: function lookupService(ref) {
|
|
3480
|
-
return this.$.app && this.$.app[ref] ? this.$.app[ref].impl : null;
|
|
3481
|
-
}
|
|
3482
|
-
}, {
|
|
3483
|
-
key: "up",
|
|
3484
|
-
value: function up() {
|
|
3485
|
-
var _this$$;
|
|
3486
|
-
|
|
3487
|
-
return (_this$$ = this.$).up.apply(_this$$, arguments);
|
|
3488
|
-
}
|
|
3489
|
-
}, {
|
|
3490
|
-
key: "defer",
|
|
3491
|
-
value: function defer() {
|
|
3492
|
-
var _this$$2;
|
|
3493
|
-
|
|
3494
|
-
return (_this$$2 = this.$).defer.apply(_this$$2, arguments);
|
|
3495
|
-
}
|
|
3496
|
-
}, {
|
|
3497
|
-
key: "emit",
|
|
3498
|
-
value: function emit() {
|
|
3499
|
-
var _this$$3;
|
|
3500
|
-
|
|
3501
|
-
return (_this$$3 = this.$).emit.apply(_this$$3, arguments);
|
|
3502
|
-
}
|
|
3503
|
-
}, {
|
|
3504
|
-
key: "log",
|
|
3505
|
-
value: function log() {
|
|
3506
|
-
var _console;
|
|
3507
|
-
|
|
3508
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
3509
|
-
args[_key] = arguments[_key];
|
|
3510
|
-
}
|
|
3511
|
-
|
|
3512
|
-
(_console = console).log.apply(_console, [this.$.ref + ': '].concat(args));
|
|
3513
|
-
|
|
3514
|
-
return args[0];
|
|
3515
|
-
}
|
|
3516
|
-
/**
|
|
3517
|
-
* Error handling
|
|
3518
|
-
*/
|
|
3519
|
-
|
|
3520
|
-
}, {
|
|
3521
|
-
key: "handleError",
|
|
3522
|
-
value: function handleError(_ref) {
|
|
3523
|
-
var _ref$message = _ref.message,
|
|
3524
|
-
message = _ref$message === void 0 ? '' : _ref$message,
|
|
3525
|
-
_ref$code = _ref.code,
|
|
3526
|
-
code = _ref$code === void 0 ? '' : _ref$code;
|
|
3527
|
-
// may overriden from props
|
|
3528
|
-
var handler = this.lookupService('errorHandler');
|
|
3529
|
-
|
|
3530
|
-
if (handler) {
|
|
3531
|
-
handler.handleError({
|
|
3532
|
-
message: message,
|
|
3533
|
-
code: code,
|
|
3534
|
-
source: this.$.ref
|
|
3535
|
-
});
|
|
3536
|
-
} else {
|
|
3537
|
-
console.error(this.$.ref + ': ERROR: ', message, code);
|
|
3538
|
-
}
|
|
3539
|
-
}
|
|
3540
|
-
}, {
|
|
3541
|
-
key: "safe",
|
|
3542
|
-
value: function safe(p, def) {
|
|
3543
|
-
var _this = this;
|
|
3544
|
-
|
|
3545
|
-
return p["catch"](function (error) {
|
|
3546
|
-
_this.handleError(error);
|
|
3547
|
-
|
|
3548
|
-
return def ? def(error) : {
|
|
3549
|
-
error: error
|
|
3550
|
-
};
|
|
3551
|
-
});
|
|
3552
|
-
}
|
|
3553
|
-
}, {
|
|
3554
|
-
key: "onClearError",
|
|
3555
|
-
value: function onClearError() {
|
|
3556
|
-
return {
|
|
3557
|
-
error: null
|
|
3558
|
-
};
|
|
3559
|
-
}
|
|
3560
|
-
}]);
|
|
3561
|
-
|
|
3562
|
-
return Service;
|
|
3563
|
-
}();
|
|
3564
|
-
|
|
3565
|
-
/***/ }),
|
|
3566
|
-
|
|
3567
|
-
/***/ "./types/ServiceWorker.js":
|
|
37
|
+
/*! no static exports found */function(e,t,r){var n=r(/*! @babel/runtime/helpers/interopRequireDefault */"./node_modules/@babel/runtime/helpers/interopRequireDefault.js");Object.defineProperty(t,"__esModule",{value:!0}),t.Platform=void 0;var o=n(r(/*! @babel/runtime/helpers/classCallCheck */"./node_modules/@babel/runtime/helpers/classCallCheck.js"));t.Platform=function Platform(){(0,o.default)(this,Platform)}},"./core/cnodes/composition.ts":
|
|
38
|
+
/*!************************************!*\
|
|
39
|
+
!*** ./core/cnodes/composition.ts ***!
|
|
40
|
+
\************************************/
|
|
41
|
+
/*! no static exports found */function(e,t,r){var n=r(/*! @babel/runtime/helpers/interopRequireDefault */"./node_modules/@babel/runtime/helpers/interopRequireDefault.js");Object.defineProperty(t,"__esModule",{value:!0}),t.SlotComponent=t.CompositeComponent=t.CSlotNode=t.CFragmentNode=t.CCompositeNode=void 0;var o=n(r(/*! @babel/runtime/helpers/classCallCheck */"./node_modules/@babel/runtime/helpers/classCallCheck.js")),i=n(r(/*! @babel/runtime/helpers/createClass */"./node_modules/@babel/runtime/helpers/createClass.js")),u=n(r(/*! @babel/runtime/helpers/inherits */"./node_modules/@babel/runtime/helpers/inherits.js")),s=n(r(/*! @babel/runtime/helpers/possibleConstructorReturn */"./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")),l=n(r(/*! @babel/runtime/helpers/getPrototypeOf */"./node_modules/@babel/runtime/helpers/getPrototypeOf.js")),a=n(r(/*! @babel/runtime/helpers/slicedToArray */"./node_modules/@babel/runtime/helpers/slicedToArray.js")),c=r(/*! ../CNode */"./core/CNode.ts"),d=r(/*! ../compileNode */"./core/compileNode.ts"),f=r(/*! ../Component */"./core/Component.ts"),p=r(/*! ../register */"./core/register.ts");function _createSuper(e){var t=function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function _createSuperInternal(){var r,n=(0,l.default)(e);if(t){var o=(0,l.default)(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return(0,s.default)(this,r)}}var m=function(e){(0,u.default)(SlotComponent,e);var t=_createSuper(SlotComponent);function SlotComponent(){return(0,o.default)(this,SlotComponent),t.apply(this,arguments)}return(0,i.default)(SlotComponent,[{key:"displayName",get:function get(){return"🔸"}},{key:"compositeScope",get:function get(){return this.scope}},{key:"content",get:function get(){return this.compositeScope.slotContent(this.node.id)}},{key:"recontentScope",get:function get(){return this.compositeScope.scope}}]),SlotComponent}(f.Component);t.SlotComponent=m;var h=function(e){(0,u.default)(CSlotNode,e);var t=_createSuper(CSlotNode);function CSlotNode(e){var r,n;return(0,o.default)(this,CSlotNode),(n=t.call(this)).id=null==(r=e.attrs)?void 0:r.id,n}return(0,i.default)(CSlotNode,[{key:"ComponentConstructor",get:function get(){return m}}]),CSlotNode}(c.CNode);t.CSlotNode=h;var b=function(e){(0,u.default)(CompositeComponent,e);var t=_createSuper(CompositeComponent);function CompositeComponent(){return(0,o.default)(this,CompositeComponent),t.apply(this,arguments)}return(0,i.default)(CompositeComponent,[{key:"displayName",get:function get(){return"💠"+this.node.definition.tag}},{key:"content",get:function get(){return this.node.definition.content}},{key:"recontentScope",get:function get(){return this}},{key:"slotContent",value:function slotContent(e){return this.node.slotContent[e||"default"]}},{key:"createImplementation",value:function createImplementation(e){return new this.node.definition.Ctor(e,this)}}]),CompositeComponent}(f.Component);t.CompositeComponent=b;var y=function(e){(0,u.default)(CCompositeNode,e);var t=_createSuper(CCompositeNode);function CCompositeNode(e){var r,n=e.tag,i=e.attrs,u=e.nodes;return(0,o.default)(this,CCompositeNode),(r=t.call(this)).definition=(0,p.getByTag)(n),r.compileAttributes(i),r.slotContent=function compileSlots(e,t){var r=(null==t?void 0:t.reduce((function(t,r){var n=r.tag.startsWith(e+":"),o=n?r.tag.split(":")[1]:"default";return t[o]=(t[o]||[]).concat(n?r.nodes||[]:r),t}),{}))||{};return Object.entries(r).reduce((function(e,t){var r=(0,a.default)(t,2),n=r[0],o=r[1];return e[n]=(0,d.compileNodes)(o),e}),{})}(n,u),r}return(0,i.default)(CCompositeNode,[{key:"ComponentConstructor",get:function get(){return b}}]),CCompositeNode}(c.CNode);t.CCompositeNode=y;var v=function(e){(0,u.default)(CFragmentNode,e);var t=_createSuper(CFragmentNode);function CFragmentNode(e){var r,n=e.nodes;return(0,o.default)(this,CFragmentNode),(r=t.call(this)).content=(0,d.compileNodes)(n),r}return(0,i.default)(CFragmentNode,[{key:"ComponentConstructor",get:function get(){return f.Component}}]),CFragmentNode}(c.CNode);t.CFragmentNode=v},"./core/cnodes/conditionals.ts":
|
|
42
|
+
/*!*************************************!*\
|
|
43
|
+
!*** ./core/cnodes/conditionals.ts ***!
|
|
44
|
+
\*************************************/
|
|
45
|
+
/*! no static exports found */function(e,t,r){var n=r(/*! @babel/runtime/helpers/interopRequireDefault */"./node_modules/@babel/runtime/helpers/interopRequireDefault.js");Object.defineProperty(t,"__esModule",{value:!0}),t.CIfNode=void 0;var o=n(r(/*! @babel/runtime/helpers/extends */"./node_modules/@babel/runtime/helpers/extends.js")),i=n(r(/*! @babel/runtime/helpers/classCallCheck */"./node_modules/@babel/runtime/helpers/classCallCheck.js")),u=n(r(/*! @babel/runtime/helpers/createClass */"./node_modules/@babel/runtime/helpers/createClass.js")),s=n(r(/*! @babel/runtime/helpers/inherits */"./node_modules/@babel/runtime/helpers/inherits.js")),l=n(r(/*! @babel/runtime/helpers/possibleConstructorReturn */"./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")),a=n(r(/*! @babel/runtime/helpers/getPrototypeOf */"./node_modules/@babel/runtime/helpers/getPrototypeOf.js")),c=r(/*! ../CNode */"./core/CNode.ts"),d=r(/*! ../expression */"./core/expression.ts"),f=r(/*! ../compileNode */"./core/compileNode.ts");function _createSuper(e){var t=function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function _createSuperInternal(){var r,n=(0,a.default)(e);if(t){var o=(0,a.default)(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return(0,l.default)(this,r)}}var p=function(e){(0,s.default)(IfComponent,e);var t=_createSuper(IfComponent);function IfComponent(){return(0,i.default)(this,IfComponent),t.apply(this,arguments)}return(0,u.default)(IfComponent,[{key:"content",get:function get(){return this.state.condition?this.node.then:this.node.else}}]),IfComponent}(r(/*! ../Component */"./core/Component.ts").Component),m=function(e){(0,s.default)(CIfNode,e);var t=_createSuper(CIfNode);function CIfNode(e,r){var n;return(0,i.default)(this,CIfNode),(n=t.call(this)).compileCondition(r),n.compileBranches(e),n}return(0,u.default)(CIfNode,[{key:"ComponentConstructor",get:function get(){return p}},{key:"compileBranches",value:function compileBranches(e){var t=e.nodes,r=[e];if(null!=t&&t.length){var n=t.find((function(e){return"ui:else"===e.tag})),i=t.find((function(e){return"ui:then"===e.tag}));n?(this.else=(0,f.compileNodes)(n.nodes),r=i?i.nodes:[(0,o.default)(e,{nodes:t.filter((function(e){return e!==n}))})]):i&&(r=i.nodes)}this.then=(0,f.compileNodes)(r)}},{key:"compileCondition",value:function compileCondition(e){if("<"===e[0]&&"-"===e[1])this.addPropertyConnector(e.slice(2),(function(e){return{condition:e}}));else if("slot("===e.slice(0,5)){var t=e.slice(5,-1);this.addPropertyResolver((function(e){return null==e.scope.slotContent?void 0:e.scope.slotContent(t)}),"condition")}else this.addPropertyResolver((0,d.compileExpression)("{"===e[0]?e:"{"+e+"}"),"condition")}}]),CIfNode}(c.CNode);t.CIfNode=m},"./core/cnodes/elementary.ts":
|
|
46
|
+
/*!***********************************!*\
|
|
47
|
+
!*** ./core/cnodes/elementary.ts ***!
|
|
48
|
+
\***********************************/
|
|
49
|
+
/*! no static exports found */function(e,t,r){var n=r(/*! @babel/runtime/helpers/interopRequireDefault */"./node_modules/@babel/runtime/helpers/interopRequireDefault.js");Object.defineProperty(t,"__esModule",{value:!0}),t.TextElementComponent=t.ElementComponent=t.CTextElementNode=t.CElementNode=void 0;var o=n(r(/*! @babel/runtime/helpers/classCallCheck */"./node_modules/@babel/runtime/helpers/classCallCheck.js")),i=n(r(/*! @babel/runtime/helpers/createClass */"./node_modules/@babel/runtime/helpers/createClass.js")),u=n(r(/*! @babel/runtime/helpers/inherits */"./node_modules/@babel/runtime/helpers/inherits.js")),s=n(r(/*! @babel/runtime/helpers/possibleConstructorReturn */"./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")),l=n(r(/*! @babel/runtime/helpers/getPrototypeOf */"./node_modules/@babel/runtime/helpers/getPrototypeOf.js")),a=r(/*! ../Platform */"./core/Platform.ts"),c=r(/*! ../CNode */"./core/CNode.ts"),d=r(/*! ../compileNode */"./core/compileNode.ts"),f=r(/*! ../Component */"./core/Component.ts");function _createSuper(e){var t=function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function _createSuperInternal(){var r,n=(0,l.default)(e);if(t){var o=(0,l.default)(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return(0,s.default)(this,r)}}var p=function(e){(0,u.default)(ElementComponent,e);var t=_createSuper(ElementComponent);function ElementComponent(){return(0,o.default)(this,ElementComponent),t.apply(this,arguments)}return(0,i.default)(ElementComponent,[{key:"displayName",get:function get(){return this.node.tag}},{key:"createImplementation",value:function createImplementation(e){return a.Platform.instance.createElement(this.node.tag,e,this)}}]),ElementComponent}(f.Component);t.ElementComponent=p;var m=function(e){(0,u.default)(TextElementComponent,e);var t=_createSuper(TextElementComponent);function TextElementComponent(){return(0,o.default)(this,TextElementComponent),t.apply(this,arguments)}return(0,i.default)(TextElementComponent,[{key:"createImplementation",value:function createImplementation(e){return a.Platform.instance.createTextElement(e,this)}}]),TextElementComponent}(f.Component);t.TextElementComponent=m;var h=function(e){(0,u.default)(CElementNode,e);var t=_createSuper(CElementNode);function CElementNode(e){var r;return(0,o.default)(this,CElementNode),(r=t.call(this)).tag=e.tag,r.content=(0,d.compileNodes)(e.nodes),r.compileAttributes(e.attrs),r}return(0,i.default)(CElementNode,[{key:"ComponentConstructor",get:function get(){return p}}]),CElementNode}(c.CNode);t.CElementNode=h;var b=function(e){(0,u.default)(CTextElementNode,e);var t=_createSuper(CTextElementNode);function CTextElementNode(e){var r;return(0,o.default)(this,CTextElementNode),(r=t.call(this)).tag=e.tag,r.compileAttributes(e.attrs),r}return(0,i.default)(CTextElementNode,[{key:"ComponentConstructor",get:function get(){return m}}]),CTextElementNode}(c.CNode);t.CTextElementNode=b},"./core/cnodes/iterations.ts":
|
|
50
|
+
/*!***********************************!*\
|
|
51
|
+
!*** ./core/cnodes/iterations.ts ***!
|
|
52
|
+
\***********************************/
|
|
53
|
+
/*! no static exports found */function(e,t,r){var n=r(/*! @babel/runtime/helpers/interopRequireDefault */"./node_modules/@babel/runtime/helpers/interopRequireDefault.js");Object.defineProperty(t,"__esModule",{value:!0}),t.CItemNode=t.CForNode=void 0;var o=n(r(/*! @babel/runtime/helpers/extends */"./node_modules/@babel/runtime/helpers/extends.js")),i=n(r(/*! @babel/runtime/helpers/get */"./node_modules/@babel/runtime/helpers/get.js")),u=n(r(/*! @babel/runtime/helpers/slicedToArray */"./node_modules/@babel/runtime/helpers/slicedToArray.js")),s=n(r(/*! @babel/runtime/helpers/classCallCheck */"./node_modules/@babel/runtime/helpers/classCallCheck.js")),l=n(r(/*! @babel/runtime/helpers/createClass */"./node_modules/@babel/runtime/helpers/createClass.js")),a=n(r(/*! @babel/runtime/helpers/inherits */"./node_modules/@babel/runtime/helpers/inherits.js")),c=n(r(/*! @babel/runtime/helpers/possibleConstructorReturn */"./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")),d=n(r(/*! @babel/runtime/helpers/getPrototypeOf */"./node_modules/@babel/runtime/helpers/getPrototypeOf.js")),f=r(/*! ../CNode */"./core/CNode.ts"),p=r(/*! ../compileNode */"./core/compileNode.ts"),m=r(/*! ../Component */"./core/Component.ts");function _createSuper(e){var t=function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function _createSuperInternal(){var r,n=(0,d.default)(e);if(t){var o=(0,d.default)(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return(0,c.default)(this,r)}}var h=function(e){(0,a.default)(ForComponent,e);var t=_createSuper(ForComponent);function ForComponent(){var e;(0,s.default)(this,ForComponent);for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return(e=t.call.apply(t,[this].concat(n))).pkHash={},e}return(0,l.default)(ForComponent,[{key:"displayName",get:function get(){return"🔹"}},{key:"content",get:function get(){var e=this,t=this.state.each,r=this.node.itemNode,n=new Map;if(this.pkHash={},null!=t&&t.length){if(!t.forEach)throw new Error("[ui:for] Items has no forEach() "+t);t.forEach((function(t){var o=t.id;if(null!=o){var i=String(o);if(e.pkHash[i])console.error("ERROR: duplicate item id: "+i,t);else{e.pkHash[i]=t;var u=r.cloneWithDatum(t).addPropertyResolver((function(){return e.pkHash[i]}),r.itemName);n.set(u.uid,u)}}else console.error("ERROR: empty item id: ",t)}))}return n}}]),ForComponent}(m.Component),b=function(e){(0,a.default)(CForNode,e);var t=_createSuper(CForNode);function CForNode(e,r){var n,o=(0,u.default)(r,3),i=o[0],l=o[1],a=o[2],c=void 0===a?l:a;return(0,s.default)(this,CForNode),(n=t.call(this)).itemNode=new v(i,(0,p.compileNodes)([e])),n.compileAttribute("each","{:<".includes(c[0])?c:"{"+c+"}"),n}return(0,l.default)(CForNode,[{key:"ComponentConstructor",get:function get(){return h}}]),CForNode}(f.CNode);t.CForNode=b;var y=function(e){(0,a.default)(ItemComponent,e);var t=_createSuper(ItemComponent);function ItemComponent(){return(0,s.default)(this,ItemComponent),t.apply(this,arguments)}return(0,l.default)(ItemComponent,[{key:"displayName",get:function get(){return"🔹"}},{key:"recontentScope",get:function get(){return this}},{key:"emit",value:function emit(e,t){return this.scope.emit(e,t)}},{key:"get",value:function get(e){var t=this.node.itemName;return e.startsWith(t+".")||e===t?(0,i.default)((0,d.default)(ItemComponent.prototype),"get",this).call(this,e):this.scope.get(e)}}]),ItemComponent}(m.Component),v=function(e){(0,a.default)(CItemNode,e);var t=_createSuper(CItemNode);function CItemNode(e,r){var n;return(0,s.default)(this,CItemNode),(n=t.call(this)).itemName=e,n.content=r,n}return(0,l.default)(CItemNode,[{key:"cloneWithDatum",value:function cloneWithDatum(e){var t=this.uid+"#"+e.id;return(0,o.default)(new CItemNode(this.itemName,this.content),{uid:t})}},{key:"ComponentConstructor",get:function get(){return y}}]),CItemNode}(f.CNode);t.CItemNode=v},"./core/cnodes/routing.ts":
|
|
3568
54
|
/*!********************************!*\
|
|
3569
|
-
!*** ./
|
|
55
|
+
!*** ./core/cnodes/routing.ts ***!
|
|
3570
56
|
\********************************/
|
|
3571
|
-
/*! exports
|
|
3572
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
3573
|
-
|
|
3574
|
-
"use strict";
|
|
3575
|
-
__webpack_require__.r(__webpack_exports__);
|
|
3576
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ServiceWorker", function() { return ServiceWorker; });
|
|
3577
|
-
/* harmony import */ var _Service__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Service */ "./types/Service.js");
|
|
3578
|
-
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
3579
|
-
|
|
3580
|
-
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
3581
|
-
|
|
3582
|
-
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
3583
|
-
|
|
3584
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
3585
|
-
|
|
3586
|
-
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); }
|
|
3587
|
-
|
|
3588
|
-
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
3589
|
-
|
|
3590
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
3591
|
-
|
|
3592
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
3593
|
-
|
|
3594
|
-
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
3595
|
-
|
|
3596
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
3597
|
-
|
|
3598
|
-
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
3599
|
-
|
|
3600
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
3601
|
-
|
|
3602
|
-
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
3603
|
-
|
|
3604
|
-
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
3605
|
-
|
|
3606
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
3607
|
-
|
|
3608
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
|
3609
|
-
|
|
3610
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
3611
|
-
|
|
3612
|
-
|
|
3613
|
-
var ServiceWorker = /*#__PURE__*/function (_Service) {
|
|
3614
|
-
_inherits(ServiceWorker, _Service);
|
|
3615
|
-
|
|
3616
|
-
var _super = _createSuper(ServiceWorker);
|
|
3617
|
-
|
|
3618
|
-
function ServiceWorker() {
|
|
3619
|
-
_classCallCheck(this, ServiceWorker);
|
|
3620
|
-
|
|
3621
|
-
return _super.apply(this, arguments);
|
|
3622
|
-
}
|
|
3623
|
-
|
|
3624
|
-
_createClass(ServiceWorker, [{
|
|
3625
|
-
key: "init",
|
|
3626
|
-
value: function init() {
|
|
3627
|
-
var _this = this;
|
|
3628
|
-
|
|
3629
|
-
try {
|
|
3630
|
-
Function.assert(this.api, 'Service Workers are not supported');
|
|
3631
|
-
var _this$source = this.source,
|
|
3632
|
-
source = _this$source === void 0 ? '/service-worker.js' : _this$source,
|
|
3633
|
-
_this$scope = this.scope,
|
|
3634
|
-
scope = _this$scope === void 0 ? '/' : _this$scope,
|
|
3635
|
-
push = this.push;
|
|
3636
|
-
this.api.register(source, {
|
|
3637
|
-
scope: scope
|
|
3638
|
-
}).then(function (registration) {
|
|
3639
|
-
return _this.registered(registration);
|
|
3640
|
-
}).then(function () {
|
|
3641
|
-
return _this.ready(function () {
|
|
3642
|
-
return _this.log('Service Worker Ready');
|
|
3643
|
-
});
|
|
3644
|
-
});
|
|
3645
|
-
this.api.addEventListener('message', function (ev) {
|
|
3646
|
-
return _this.onMessage(ev);
|
|
3647
|
-
});
|
|
3648
|
-
|
|
3649
|
-
if (push) {
|
|
3650
|
-
this.subscribe();
|
|
3651
|
-
}
|
|
3652
|
-
} catch (error) {
|
|
3653
|
-
this.fallback(error);
|
|
3654
|
-
}
|
|
3655
|
-
} // ensures that `fn` executed when api is ready
|
|
3656
|
-
|
|
3657
|
-
}, {
|
|
3658
|
-
key: "ready",
|
|
3659
|
-
value: function ready(fn) {
|
|
3660
|
-
return this.api.ready.then(fn);
|
|
3661
|
-
}
|
|
3662
|
-
}, {
|
|
3663
|
-
key: "fallback",
|
|
3664
|
-
value: function fallback(error) {
|
|
3665
|
-
this.log(error);
|
|
3666
|
-
} // hook on registered
|
|
3667
|
-
|
|
3668
|
-
}, {
|
|
3669
|
-
key: "registered",
|
|
3670
|
-
value: function registered(registration) {
|
|
3671
|
-
this.log('Service Worker Registered');
|
|
3672
|
-
return registration;
|
|
3673
|
-
}
|
|
3674
|
-
/**
|
|
3675
|
-
* Push
|
|
3676
|
-
*/
|
|
3677
|
-
|
|
3678
|
-
}, {
|
|
3679
|
-
key: "withPushManager",
|
|
3680
|
-
value: function withPushManager(fn) {
|
|
3681
|
-
return this.ready(function (_ref) {
|
|
3682
|
-
var pushManager = _ref.pushManager;
|
|
3683
|
-
return pushManager;
|
|
3684
|
-
}).then(fn);
|
|
3685
|
-
}
|
|
3686
|
-
}, {
|
|
3687
|
-
key: "unsubscribe",
|
|
3688
|
-
value: function unsubscribe() {
|
|
3689
|
-
var _this2 = this;
|
|
3690
|
-
|
|
3691
|
-
this.withPushManager(function (pushManager) {
|
|
3692
|
-
return pushManager.getSubscription();
|
|
3693
|
-
}).then(function (ss) {
|
|
3694
|
-
return ss && ss.unsubscribe();
|
|
3695
|
-
}).then(function () {
|
|
3696
|
-
return _this2.saveSubscription();
|
|
3697
|
-
})["catch"](function (e) {
|
|
3698
|
-
console.log('Error thrown while unsubscribing from push messaging.', e);
|
|
3699
|
-
});
|
|
3700
|
-
}
|
|
3701
|
-
}, {
|
|
3702
|
-
key: "subscribe",
|
|
3703
|
-
value: function subscribe() {
|
|
3704
|
-
var _this3 = this;
|
|
3705
|
-
|
|
3706
|
-
function urlBase64ToUint8Array(base64String) {
|
|
3707
|
-
var padding = '='.repeat((4 - base64String.length % 4) % 4);
|
|
3708
|
-
var base64 = (base64String + padding).replace(/-/g, '+').replace(/_/g, '/');
|
|
3709
|
-
var rawData = window.atob(base64);
|
|
3710
|
-
return Uint8Array.from(_toConsumableArray(rawData).map(function (_char) {
|
|
3711
|
-
return _char.charCodeAt(0);
|
|
3712
|
-
}));
|
|
3713
|
-
}
|
|
3714
|
-
|
|
3715
|
-
if (Notification.permission === 'granted') {
|
|
3716
|
-
/* do our magic */
|
|
3717
|
-
} else if (Notification.permission === 'blocked') {
|
|
3718
|
-
/* the user has previously denied push. Can't reprompt. */
|
|
3719
|
-
} else {
|
|
3720
|
-
/* show a prompt to the user */
|
|
3721
|
-
}
|
|
3722
|
-
|
|
3723
|
-
var applicationServerKey = urlBase64ToUint8Array(this.vapidPublicKey);
|
|
3724
|
-
this.withPushManager(function (pushManager) {
|
|
3725
|
-
return pushManager.getSubscription() // .then((ss) => ss && ss.unsubscribe())
|
|
3726
|
-
.then(function (ss) {
|
|
3727
|
-
return ss || pushManager.subscribe({
|
|
3728
|
-
userVisibleOnly: true,
|
|
3729
|
-
applicationServerKey: applicationServerKey
|
|
3730
|
-
});
|
|
3731
|
-
}).then(function (subscription) {
|
|
3732
|
-
return _this3.saveSubscription(subscription.toJSON());
|
|
3733
|
-
})["catch"](function (err) {
|
|
3734
|
-
if (Notification.permission === 'denied') {
|
|
3735
|
-
_this3.log('The user has blocked notifications.');
|
|
3736
|
-
}
|
|
3737
|
-
|
|
3738
|
-
_this3.handleError(err);
|
|
3739
|
-
});
|
|
3740
|
-
});
|
|
3741
|
-
} // to be overriden from props
|
|
3742
|
-
|
|
3743
|
-
}, {
|
|
3744
|
-
key: "saveSubscription",
|
|
3745
|
-
value: function saveSubscription(ss) {
|
|
3746
|
-
this.subscription = ss;
|
|
3747
|
-
}
|
|
3748
|
-
/**
|
|
3749
|
-
* Intercommunication between service worker.
|
|
3750
|
-
*/
|
|
3751
|
-
// handles a message posted from Service worker.
|
|
3752
|
-
|
|
3753
|
-
}, {
|
|
3754
|
-
key: "onMessage",
|
|
3755
|
-
value: function onMessage(payload) {
|
|
3756
|
-
this.log('onMessage', payload);
|
|
3757
|
-
}
|
|
3758
|
-
}, {
|
|
3759
|
-
key: "api",
|
|
3760
|
-
get: function get() {
|
|
3761
|
-
return navigator.serviceWorker;
|
|
3762
|
-
}
|
|
3763
|
-
}]);
|
|
3764
|
-
|
|
3765
|
-
return ServiceWorker;
|
|
3766
|
-
}(_Service__WEBPACK_IMPORTED_MODULE_0__["Service"]);
|
|
3767
|
-
|
|
3768
|
-
/***/ }),
|
|
3769
|
-
|
|
3770
|
-
/***/ "./types/elements.html":
|
|
57
|
+
/*! no static exports found */function(e,t,r){var n=r(/*! @babel/runtime/helpers/interopRequireDefault */"./node_modules/@babel/runtime/helpers/interopRequireDefault.js");Object.defineProperty(t,"__esModule",{value:!0}),t.DynamicTagComponent=t.CDynamicTagNode=void 0;var o=n(r(/*! @babel/runtime/helpers/extends */"./node_modules/@babel/runtime/helpers/extends.js")),i=n(r(/*! @babel/runtime/helpers/classCallCheck */"./node_modules/@babel/runtime/helpers/classCallCheck.js")),u=n(r(/*! @babel/runtime/helpers/createClass */"./node_modules/@babel/runtime/helpers/createClass.js")),s=n(r(/*! @babel/runtime/helpers/inherits */"./node_modules/@babel/runtime/helpers/inherits.js")),l=n(r(/*! @babel/runtime/helpers/possibleConstructorReturn */"./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")),a=n(r(/*! @babel/runtime/helpers/getPrototypeOf */"./node_modules/@babel/runtime/helpers/getPrototypeOf.js")),c=r(/*! ../CNode */"./core/CNode.ts"),d=r(/*! ../compileNode */"./core/compileNode.ts");function _createSuper(e){var t=function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function _createSuperInternal(){var r,n=(0,a.default)(e);if(t){var o=(0,a.default)(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return(0,l.default)(this,r)}}var f=function(e){(0,s.default)(DynamicTagComponent,e);var t=_createSuper(DynamicTagComponent);function DynamicTagComponent(){return(0,i.default)(this,DynamicTagComponent),t.apply(this,arguments)}return(0,u.default)(DynamicTagComponent,[{key:"content",get:function get(){var e=this.state.tag,t=this.node.uid+":"+e;return new Map([[t,(0,o.default)((0,d.compileNode)((0,o.default)(this.node.xml,{tag:e})),{uid:t})]])}}]),DynamicTagComponent}(r(/*! ../Component */"./core/Component.ts").Component);t.DynamicTagComponent=f;var p=function(e){(0,s.default)(CDynamicTagNode,e);var t=_createSuper(CDynamicTagNode);function CDynamicTagNode(e,r){var n;return(0,i.default)(this,CDynamicTagNode),(n=t.call(this)).compileAttribute("tag",r),n.xml=e,n}return(0,u.default)(CDynamicTagNode,[{key:"ComponentConstructor",get:function get(){return f}}]),CDynamicTagNode}(c.CNode);t.CDynamicTagNode=p},"./core/compileNode.ts":
|
|
3771
58
|
/*!*****************************!*\
|
|
3772
|
-
!*** ./
|
|
59
|
+
!*** ./core/compileNode.ts ***!
|
|
3773
60
|
\*****************************/
|
|
3774
|
-
/*! exports
|
|
3775
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
3776
|
-
|
|
3777
|
-
"use strict";
|
|
3778
|
-
__webpack_require__.r(__webpack_exports__);
|
|
3779
|
-
/* harmony default export */ __webpack_exports__["default"] = ("<component id=\"Icon\">\n <i class=\"fa{bundle|or:s} fa-{type} {class}\" style={style} data={data} click={click}></i>\n</component>\n\n<component id=\"Img\">\n <img src={src|or:@default} alt={alt} class=\"img {class}\" style={style} />\n</component>\n\n<component id=\"Avatar\">\n <figure class=\"avatar {large|then:avatar-lg}\">\n <Img src={src}\n alt={alt}\n default=\"data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==\" />\n </figure>\n</component>\n\n<component id=\"Button\">\n <button class=\"btn btn-{mode} {primary|then:btn-primary} {disabled|or:@busy|then:disabled} {class} {large|then:btn-lg} {link|then:btn-link} c-hand\"\n style={style}\n data={data}\n click={action|track:@trackId:@caption}>\n <i ui:if={busy} class=\"loading mx-2\"></i>\n <Icon ui:if={icon} bundle={iconBundle} type={icon} class=\"mx-2\" />\n <span ui:if={caption} style=\"white-space:nowrap; overflow: hidden; text-overflow: ellipsis;\">{caption}</span>\n </button>\n</component>\n\n<component id=\"FAB\">\n <button class=\"btn2 {tooltip|then:tooltip} tooltip-left fixed bg-primary circle c-hand {class}\"\n style=\"position: fixed;border:none; right:1.5rem; bottom:1.5rem; width: 2.5rem; height: 2.5rem; z-index:5;\"\n data={data} data-tooltip={tooltip|or:} click={action|track:@trackId:big}>\n <Icon type={icon|or:plus} />\n </button>\n</component>\n\n<component id=\"Modal\">\n <div class=\"modal modal {open|then:active}\">\n <a class=\"modal-overlay\" aria-label=\"Close\" data={data} click={close}></a>\n <div class=\"modal-container\">\n <div class=\"modal-header\">\n <a class=\"btn btn-clear float-right\" aria-label=\":close\" data={data} click={close}></a>\n <div class=\"modal-title h5\" ui:if={title}>{title}</div>\n <ui:slot id=\"header\" />\n </div>\n <div class=\"modal-body\" style=\"max-height: 70vh;\">\n <div class=\"content\">\n <ui:slot />\n </div>\n </div>\n <div class=\"modal-footer\">\n <ui:slot id=\"footer\" />\n </div>\n </div>\n </div>\n</component>\n\n<component id=\"Tabs\">\n <ul class=\"tab tab-block\">\n <li class=\"tab-item {item.id|equals:@value|then:active} c-hand\" ui:for=\"item of items\">\n <a data={data} data-id={item.id} click={action}>\n <Icon ui:if={item.icon} type={item.icon} bundle={item.iconBundle} class=\"mx-2\" />\n {item.name}\n </a>\n </li>\n </ul>\n</component>");
|
|
3780
|
-
|
|
3781
|
-
/***/ }),
|
|
3782
|
-
|
|
3783
|
-
/***/ "./types/fields.html":
|
|
3784
|
-
/*!***************************!*\
|
|
3785
|
-
!*** ./types/fields.html ***!
|
|
3786
|
-
\***************************/
|
|
3787
|
-
/*! exports provided: default */
|
|
3788
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
3789
|
-
|
|
3790
|
-
"use strict";
|
|
3791
|
-
__webpack_require__.r(__webpack_exports__);
|
|
3792
|
-
/* harmony default export */ __webpack_exports__["default"] = ("<component id=\"FieldItem\">\n <div class=\"columns form-group {error|then:has-error} {class}\">\n <div class=\" col-4 col-sm-12\">\n <label class=\"form-label\" for=\"input-example-1\">\n {caption}\n <sup ui:if={required}\n class=\"text-error\">✱</sup>\n </label>\n </div>\n <div class=\"col-8 col-sm-12\">\n <ui:slot />\n <p class=\"form-input-hint\" ui:if={error}>{error}</p>\n </div>\n </div>\n</component>\n\n<component id=\"TextField\">\n <FieldItem caption={caption} error={error} required={required}>\n <input class=\"form-input\"\n type=\"text\"\n disabled={disabled}\n placeholder={placeholder|or:@caption}\n value={value}\n change={onChange}>\n </FieldItem>\n</component>\n\n<component id=\"DateField\">\n <FieldItem caption={caption} error={error} required={required}>\n <input class=\"form-input\"\n disabled={disabled}\n type=\"date\"\n placeholder={caption}\n value={value}\n change={onChange}>\n </FieldItem>\n</component>\n\n<component id=\"DateTimeField\">\n <FieldItem caption=\"{caption}\" error={error} required={required}>\n <input class=\"form-input\"\n disabled={disabled}\n type=\"datetime-local\"\n placeholder={caption}\n value={value|date:yyyy-mm-ddTt}\n change={onChange}>\n </FieldItem>\n</component>\n\n<component id=\"NumberField\">\n <FieldItem caption={caption} error={error} required={required}>\n <input class=\"form-input\"\n disabled={disabled}\n type=\"number\"\n placeholder={caption}\n value={value}\n change={onChange}>\n </FieldItem>\n</component>\n\n<component id=\"TextareaField\">\n <FieldItem caption={caption} error={error} required={required}>\n <textarea\n class=\"form-input\"\n style=\"min-height: 15vw\"\n disabled={disabled} placeholder={caption} rows=\"3\" change={onChange} value={value}></textarea>\n </FieldItem>\n</component>\n\n<component id=\"SwitchField\">\n <div class=\"form-group\">\n <div class=\"col-sm-12\">\n <label class=\"form-switch\">\n <span>{caption}</span>\n <input type=\"checkbox\" toggle={onChange} data={data} checked={value|not|not}>\n <i class=\"form-icon\"></i>\n </label>\n </div>\n </div>\n</component>\n\n<component id=\"EnumField\">\n <FieldItem caption={caption} class={class} error={error} required={required}>\n <Select class=\"form-select\"\n change={onChange}\n value={value|or:@defaultValue}\n data={data}\n options=\":enums.{typeSpec}\"\n emptyCaption={emptyCaption}\n disabled={disabled} />\n </FieldItem>\n</component>\n\n<component id=\"SelectField\">\n <FieldItem caption={caption} class={class} error={error} required={required}>\n <Select class=\"form-select\"\n change={onChange}\n value={value|or:@defaultValue}\n data={data}\n options={options}\n emptyCaption={emptyCaption}\n disabled={disabled} />\n </FieldItem>\n</component>\n\n<component id=\"RadioField\">\n <FieldItem caption={caption} error={error} required={required}>\n <RadioGroup change={onChange}\n value={value} data={data} options=\":enums.{typeSpec}\"\n disabled={disabled} />\n </FieldItem>\n</component>");
|
|
3793
|
-
|
|
3794
|
-
/***/ }),
|
|
3795
|
-
|
|
3796
|
-
/***/ "./types/index.js":
|
|
3797
|
-
/*!************************!*\
|
|
3798
|
-
!*** ./types/index.js ***!
|
|
3799
|
-
\************************/
|
|
3800
|
-
/*! exports provided: default */
|
|
3801
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
3802
|
-
|
|
3803
|
-
"use strict";
|
|
3804
|
-
__webpack_require__.r(__webpack_exports__);
|
|
3805
|
-
/* harmony import */ var _elements_html__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./elements.html */ "./types/elements.html");
|
|
3806
|
-
/* harmony import */ var _table_html__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./table.html */ "./types/table.html");
|
|
3807
|
-
/* harmony import */ var _inputs_html__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./inputs.html */ "./types/inputs.html");
|
|
3808
|
-
/* harmony import */ var _fields_html__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./fields.html */ "./types/fields.html");
|
|
3809
|
-
/* harmony import */ var _layouts_html__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./layouts.html */ "./types/layouts.html");
|
|
3810
|
-
/* harmony import */ var _viewport_html__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./viewport.html */ "./types/viewport.html");
|
|
3811
|
-
/* harmony import */ var _NavigationService__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./NavigationService */ "./types/NavigationService.js");
|
|
3812
|
-
/* harmony import */ var _ServiceWorker__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./ServiceWorker */ "./types/ServiceWorker.js");
|
|
3813
|
-
/* harmony import */ var _Form__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./Form */ "./types/Form.js");
|
|
3814
|
-
/* harmony import */ var _services__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./services */ "./types/services.js");
|
|
3815
|
-
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
3816
|
-
|
|
3817
|
-
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
3818
|
-
|
|
3819
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
3820
|
-
|
|
3821
|
-
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); }
|
|
3822
|
-
|
|
3823
|
-
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
3824
|
-
|
|
3825
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
3826
|
-
|
|
3827
|
-
|
|
3828
|
-
|
|
3829
|
-
|
|
3830
|
-
|
|
3831
|
-
|
|
3832
|
-
|
|
3833
|
-
|
|
3834
|
-
|
|
3835
|
-
|
|
3836
|
-
|
|
3837
|
-
/* harmony default export */ __webpack_exports__["default"] = ([_ServiceWorker__WEBPACK_IMPORTED_MODULE_7__["ServiceWorker"], _NavigationService__WEBPACK_IMPORTED_MODULE_6__["NavigationService"]].concat(_toConsumableArray(Object.values(_Form__WEBPACK_IMPORTED_MODULE_8__)), _toConsumableArray(Object.values(_services__WEBPACK_IMPORTED_MODULE_9__)), [_elements_html__WEBPACK_IMPORTED_MODULE_0__["default"], _table_html__WEBPACK_IMPORTED_MODULE_1__["default"], _fields_html__WEBPACK_IMPORTED_MODULE_3__["default"], _viewport_html__WEBPACK_IMPORTED_MODULE_5__["default"], _layouts_html__WEBPACK_IMPORTED_MODULE_4__["default"], _inputs_html__WEBPACK_IMPORTED_MODULE_2__["default"]]));
|
|
3838
|
-
|
|
3839
|
-
/***/ }),
|
|
3840
|
-
|
|
3841
|
-
/***/ "./types/inputs.html":
|
|
3842
|
-
/*!***************************!*\
|
|
3843
|
-
!*** ./types/inputs.html ***!
|
|
3844
|
-
\***************************/
|
|
3845
|
-
/*! exports provided: default */
|
|
3846
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
3847
|
-
|
|
3848
|
-
"use strict";
|
|
3849
|
-
__webpack_require__.r(__webpack_exports__);
|
|
3850
|
-
/* harmony default export */ __webpack_exports__["default"] = ("<component id=\"Select\">\n <select class=\"{class}\" change={change} disabled={disabled} data={data}>\n <option selected={value|not} value=\"\" ui:if={value|not|or:@emptyCaption}>{emptyCaption}</option>\n <option ui:for=\"option of options\" selected={option.id|equals:@value} value={option.id}>\n {option.name}\n </option>\n </select>\n</component>\n\n<component id=\"RadioGroup\">\n <div class=\"{class}\">\n <label class=\"form-radio\" ui:for=\"option of options\">\n <input type=\"radio\" name={id|or:rg}\n value={option.id}\n checked={option.id|equals:@value} change={change} data={data}\n disabled={disabled}>\n <i class=\"form-icon\"></i>{option.name}\n </label>\n </div>\n</component>\n\n<component id=\"Dropdown\">\n <div class=\"dropdown\">\n <a href=\"#\" class=\"btn btn-link dropdown-toggle\" tabindex=\"0\">\n {data|selectedName}<i class=\"icon icon-caret\"></i>\n </a>\n <!-- menu component -->\n <ul class=\"menu\" style=\"right:0;left:auto;\">\n <li ui:for=\"item of data\" class=\"menu-item {item.id|equals:@value|then:active}\"\n data-id={item.id}\n data-name={item.name}\n click={change}>\n <a>{item.name}</a>\n </li>\n </ul>\n </div>\n</component>\n\n<component id=\"DateTimeInput\">\n <input class=\"form-input flatpickr-input\"\n init={:support.initFlatpickr}\n disabled={disabled}\n type=\"text\"\n placeholder={placeholder}\n value={value|support.setFlatpickrValue}\n change={change}>\n</component>\n\n<component id=\"SearchBar\">\n <span class=\"ant-input-search ant-input-affix-wrapper\">\n <input placeholder=\"Поиск...\" class=\"ant-input\" type=\"text\"\n value={value} enter={action}\n style=\"min-height:40px;\">\n <span class=\"ant-input-suffix\">\n <i class=\"anticon anticon-search ant-input-search-icon\" style=\"margin-top: 4px;\"></i>\n </span>\n </span>\n</component>");
|
|
3851
|
-
|
|
3852
|
-
/***/ }),
|
|
3853
|
-
|
|
3854
|
-
/***/ "./types/layouts.html":
|
|
61
|
+
/*! no static exports found */function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.compileNodes=t.compileNode=void 0;var n=r(/*! ./cnodes/composition */"./core/cnodes/composition.ts"),o=r(/*! ./cnodes/routing */"./core/cnodes/routing.ts"),i=r(/*! ./cnodes/elementary */"./core/cnodes/elementary.ts"),u=r(/*! ./cnodes/iterations */"./core/cnodes/iterations.ts"),s=r(/*! ./cnodes/conditionals */"./core/cnodes/conditionals.ts"),l=function compileNode(e){var t=e.tag,r=e.attrs,l=null==r?void 0:r["ui:for"];if(l)return delete r["ui:for"],new u.CForNode(e,String(l).trim().split(" "));var a=null==r?void 0:r["ui:if"];if(a)return delete r["ui:if"],new s.CIfNode(e,String(a));if("ui:tag"===t){var c=(null==r?void 0:r.tag)||t;return null==r||delete r.tag,new o.CDynamicTagNode(e,String(c))}return"ui:slot"===t?new n.CSlotNode(e):"ui:fragment"===t?new n.CFragmentNode(e):"#text"===t?new i.CTextElementNode(e):t[0].match(/[A-Z]/)?new n.CCompositeNode(e):new i.CElementNode(e)};t.compileNode=l;t.compileNodes=function compileNodes(e){return new Map((null==e?void 0:e.map(l).map((function(e){return[e.uid,e]})))||[])}},"./core/expression.ts":
|
|
3855
62
|
/*!****************************!*\
|
|
3856
|
-
!*** ./
|
|
63
|
+
!*** ./core/expression.ts ***!
|
|
3857
64
|
\****************************/
|
|
3858
|
-
/*! exports
|
|
3859
|
-
|
|
3860
|
-
|
|
3861
|
-
|
|
3862
|
-
|
|
3863
|
-
/* harmony default export */ __webpack_exports__["default"] = ("<component id=\"LoadingIndicator\">\n <div class=\"loading {large|then:loading-lg} {class}\" />\n</component>\n\n<component id=\"EmptyData\">\n <div class=\"empty {class}\">\n <div class=\"empty-icon\">\n <Icon type={icon|or:people} />\n </div>\n <p class=\"empty-title h5\">{title}</p>\n <p ui:if={subtitle} class=\"empty-subtitle\">{subtitle}</p>\n <div class=\"empty-action\">\n <ui:slot />\n </div>\n </div>\n</component>\n\n<component id=\"Panel\">\n <h6 class=\"mt-2 pt-2 px-2 text-gray\" ui:if=\"caption\">{caption}</h6>\n <div class=\"panel {class}\" style={style}>\n <small class=\"p-2 bg-secondary\" ui:if={hint}>{hint}</small>\n <div class=\"panel-header\" ui:if=\"slot(title)\">\n <div class=\"panel-title\">\n <ui:slot id=\"title\" key=\"panel-title\" />\n </div>\n </div>\n <div class=\"panel-nav\" ui:if=\"slot(nav)\">\n <ui:slot id=\"nav\" />\n </div>\n <div class=\"panel-body p-2\">\n <ui:slot />\n </div>\n <div class=\"panel-footer\" ui:if=\"slot(footer)\">\n <ui:slot id=\"footer\" />\n </div>\n </div>\n</component>\n\n<component id=\"Grid\">\n <div class=\"columns {class}\">\n <ui:slot />\n </div>\n</component>\n\n<component id=\"Col\">\n <div class=\"col-{size|or:6} col-sm-12 {class}\">\n <ui:slot />\n </div>\n</component>\n<component id=\"Centroid\">\n <div class=\"{class}\" style=\"display: flex;align-items: center;justify-content: center;{style}\">\n <ui:slot />\n </div>\n</component>\n\n<component id=\"FlexBox\">\n <div class=\"{class}\" style=\"display: flex;align-items: stretch;justify-content:space-around;{style}\">\n <ui:slot />\n </div>\n</component>\n\n<component id=\"Tile\">\n <div class=\"tile {centered|then:tile-centered} m-2 {class}\">\n <div class=\"tile-icon\" ui:if={image}>\n <Avatar src={image} />\n </div>\n <div class=\"tile-icon\" ui:if={icon}>\n <Icon type={icon} />\n </div>\n <div class=\"tile-content\">\n <div class=\"tile-title text-bold\" ui:if={title}>{title}</div>\n <div class=\"tile-subtitle\" ui:if={subtitle}>{subtitle}</div>\n <ui:slot />\n </div>\n <div class=\"tile-action btn-group\" ui:if=\"slot(actions)\">\n <ui:slot id=\"actions\" />\n </div>\n </div>\n</component>\n\n\n<component id=\"Card\">\n <div class=\"card\" style={style}>\n <div class=\"card-image\" ui:if={image}>\n <img src={image} class=\"img-responsive\" />\n </div>\n <div class=\"card-header\">\n <a ui:if={title} href={link}>\n <h5 class=\"card-title\">{title}</h5>\n </a>\n <div ui:if={subtitle} class=\"card-subtitle text-gray\">{subtitle}</div>\n <ui:slot id=\"header\" />\n </div>\n <div class=\"card-body\">\n <ui:slot />\n </div>\n <div class=\"card-footer\">\n <ui:slot id=\"footer\" />\n </div>\n </div>\n</component>\n\n<component id=\"Popover\">\n <div class=\"popover popover-right\">\n <ui:slot />\n <div class=\"popover-container\">\n <div class=\"card\">\n <div class=\"card-header\">\n <ui:slot id=\"body\" />\n </div>\n </div>\n </div>\n </div>\n</component>");
|
|
3864
|
-
|
|
3865
|
-
/***/ }),
|
|
3866
|
-
|
|
3867
|
-
/***/ "./types/services.js":
|
|
3868
|
-
/*!***************************!*\
|
|
3869
|
-
!*** ./types/services.js ***!
|
|
3870
|
-
\***************************/
|
|
3871
|
-
/*! exports provided: Invoke, Loader, ErrorHandlingService, ToastService */
|
|
3872
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
3873
|
-
|
|
3874
|
-
"use strict";
|
|
3875
|
-
__webpack_require__.r(__webpack_exports__);
|
|
3876
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Invoke", function() { return Invoke; });
|
|
3877
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Loader", function() { return Loader; });
|
|
3878
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ErrorHandlingService", function() { return ErrorHandlingService; });
|
|
3879
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ToastService", function() { return ToastService; });
|
|
3880
|
-
/* harmony import */ var _Service__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Service */ "./types/Service.js");
|
|
3881
|
-
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
3882
|
-
|
|
3883
|
-
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
3884
|
-
|
|
3885
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
3886
|
-
|
|
3887
|
-
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
3888
|
-
|
|
3889
|
-
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
3890
|
-
|
|
3891
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
3892
|
-
|
|
3893
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
|
3894
|
-
|
|
3895
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
3896
|
-
|
|
3897
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
|
3898
|
-
|
|
3899
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
3900
|
-
|
|
3901
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
3902
|
-
|
|
3903
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
3904
|
-
|
|
3905
|
-
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
3906
|
-
|
|
3907
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
3908
|
-
|
|
3909
|
-
|
|
3910
|
-
var Invoke = /*#__PURE__*/function () {
|
|
3911
|
-
function Invoke() {
|
|
3912
|
-
_classCallCheck(this, Invoke);
|
|
3913
|
-
}
|
|
3914
|
-
|
|
3915
|
-
_createClass(Invoke, [{
|
|
3916
|
-
key: "init",
|
|
3917
|
-
value: function init() {
|
|
3918
|
-
var _this = this;
|
|
3919
|
-
|
|
3920
|
-
if (this.delay) {
|
|
3921
|
-
setTimeout(function () {
|
|
3922
|
-
if (!_this.isDone) {
|
|
3923
|
-
_this.action(_this.data);
|
|
3924
|
-
}
|
|
3925
|
-
}, this.delay * 1000);
|
|
3926
|
-
} else {
|
|
3927
|
-
this.action(this.data);
|
|
3928
|
-
}
|
|
3929
|
-
}
|
|
3930
|
-
}]);
|
|
3931
|
-
|
|
3932
|
-
return Invoke;
|
|
3933
|
-
}();
|
|
3934
|
-
var Loader = /*#__PURE__*/function () {
|
|
3935
|
-
function Loader() {
|
|
3936
|
-
_classCallCheck(this, Loader);
|
|
3937
|
-
}
|
|
3938
|
-
|
|
3939
|
-
_createClass(Loader, [{
|
|
3940
|
-
key: "init",
|
|
3941
|
-
value: function init() {
|
|
3942
|
-
this.reload();
|
|
3943
|
-
}
|
|
3944
|
-
}, {
|
|
3945
|
-
key: "setTrigger",
|
|
3946
|
-
value: function setTrigger(val) {
|
|
3947
|
-
this.trigger = val;
|
|
3948
|
-
this.reload();
|
|
3949
|
-
}
|
|
3950
|
-
}, {
|
|
3951
|
-
key: "reload",
|
|
3952
|
-
value: function reload() {
|
|
3953
|
-
var from = this.from,
|
|
3954
|
-
data = this.data,
|
|
3955
|
-
into = this.into;
|
|
3956
|
-
|
|
3957
|
-
if (from && into) {
|
|
3958
|
-
from({
|
|
3959
|
-
data: data,
|
|
3960
|
-
callback: function callback(error, result) {
|
|
3961
|
-
return into(_objectSpread({
|
|
3962
|
-
error: error
|
|
3963
|
-
}, result));
|
|
3964
|
-
}
|
|
3965
|
-
});
|
|
3966
|
-
}
|
|
3967
|
-
}
|
|
3968
|
-
}]);
|
|
3969
|
-
|
|
3970
|
-
return Loader;
|
|
3971
|
-
}();
|
|
3972
|
-
var ErrorHandlingService = /*#__PURE__*/function (_Service) {
|
|
3973
|
-
_inherits(ErrorHandlingService, _Service);
|
|
3974
|
-
|
|
3975
|
-
var _super = _createSuper(ErrorHandlingService);
|
|
3976
|
-
|
|
3977
|
-
function ErrorHandlingService() {
|
|
3978
|
-
_classCallCheck(this, ErrorHandlingService);
|
|
3979
|
-
|
|
3980
|
-
return _super.apply(this, arguments);
|
|
3981
|
-
}
|
|
3982
|
-
|
|
3983
|
-
_createClass(ErrorHandlingService, [{
|
|
3984
|
-
key: "handleError",
|
|
3985
|
-
value: function handleError(_ref) {
|
|
3986
|
-
var _ref$message = _ref.message,
|
|
3987
|
-
message = _ref$message === void 0 ? '' : _ref$message,
|
|
3988
|
-
code = _ref.code,
|
|
3989
|
-
_ref$source = _ref.source,
|
|
3990
|
-
source = _ref$source === void 0 ? {} : _ref$source;
|
|
3991
|
-
this.show({
|
|
3992
|
-
message: source + ': ' + message,
|
|
3993
|
-
code: code,
|
|
3994
|
-
mode: 'error'
|
|
3995
|
-
});
|
|
3996
|
-
}
|
|
3997
|
-
}, {
|
|
3998
|
-
key: "show",
|
|
3999
|
-
value: function show(_ref2) {
|
|
4000
|
-
var _ref2$message = _ref2.message,
|
|
4001
|
-
message = _ref2$message === void 0 ? '' : _ref2$message,
|
|
4002
|
-
_ref2$code = _ref2.code,
|
|
4003
|
-
code = _ref2$code === void 0 ? '' : _ref2$code,
|
|
4004
|
-
source = _ref2.source;
|
|
4005
|
-
console.error(source + ': ERROR: ', code, message);
|
|
4006
|
-
}
|
|
4007
|
-
}]);
|
|
4008
|
-
|
|
4009
|
-
return ErrorHandlingService;
|
|
4010
|
-
}(_Service__WEBPACK_IMPORTED_MODULE_0__["Service"]);
|
|
4011
|
-
var ToastService = /*#__PURE__*/function (_Service2) {
|
|
4012
|
-
_inherits(ToastService, _Service2);
|
|
4013
|
-
|
|
4014
|
-
var _super2 = _createSuper(ToastService);
|
|
4015
|
-
|
|
4016
|
-
function ToastService() {
|
|
4017
|
-
_classCallCheck(this, ToastService);
|
|
4018
|
-
|
|
4019
|
-
return _super2.apply(this, arguments);
|
|
4020
|
-
}
|
|
4021
|
-
|
|
4022
|
-
_createClass(ToastService, [{
|
|
4023
|
-
key: "onSend",
|
|
4024
|
-
value: function onSend(_ref3) {
|
|
4025
|
-
var _this2 = this;
|
|
4026
|
-
|
|
4027
|
-
var data = _ref3.data;
|
|
4028
|
-
return {
|
|
4029
|
-
top: _objectSpread(_objectSpread({}, data), {}, {
|
|
4030
|
-
close: function close() {
|
|
4031
|
-
return _this2.emit('this.close');
|
|
4032
|
-
},
|
|
4033
|
-
closeAfter: 5
|
|
4034
|
-
})
|
|
4035
|
-
};
|
|
4036
|
-
}
|
|
4037
|
-
}, {
|
|
4038
|
-
key: "onClose",
|
|
4039
|
-
value: function onClose() {
|
|
4040
|
-
return {
|
|
4041
|
-
top: null
|
|
4042
|
-
};
|
|
4043
|
-
}
|
|
4044
|
-
}]);
|
|
4045
|
-
|
|
4046
|
-
return ToastService;
|
|
4047
|
-
}(_Service__WEBPACK_IMPORTED_MODULE_0__["Service"]);
|
|
4048
|
-
|
|
4049
|
-
/***/ }),
|
|
4050
|
-
|
|
4051
|
-
/***/ "./types/table.html":
|
|
65
|
+
/*! no static exports found */function(e,t,r){var n=r(/*! @babel/runtime/helpers/interopRequireDefault */"./node_modules/@babel/runtime/helpers/interopRequireDefault.js");Object.defineProperty(t,"__esModule",{value:!0}),t.compileExpression=function compileExpression(e){if("string"!=typeof e)return function(){return e};if(":"===e[0])return function resourceExpression(e){var t=compilePipeExpression(e),r=t.key,n=t.pipec,o=stringInterpolation(r);return n.length?function(e){return n(e,e.res(o(e)))}:function(e){return e.res(o(e))}}(e.slice(1).trim());if(!e.includes("{")){var t=(0,i.scalarParse)(e);return function(){return t}}if(e.match(u))return placeholder(e.slice(1,-1).trim());return stringInterpolation(e)},t.compilePipeExpression=compilePipeExpression,t.withPipes=withPipes;var o=n(r(/*! @babel/runtime/helpers/toArray */"./node_modules/@babel/runtime/helpers/toArray.js")),i=r(/*! scalar */"./lib/scalar.ts"),u=/^\{([^}]+)\}$/,s=/\{([^}]+)\}/g,l=function withNoPipes(e,t){return t};function withPipes(e){return e.length?function(t,r){return e.reduce((function(e,r){return t.applyPipe(r,e)}),r)}:l}function compilePipeExpression(e){var t=function splitExpression(e){return e.split("|").map((function(e){return e.trim()}))}(e),r=(0,o.default)(t);return{key:r[0],pipec:withPipes(r.slice(1))}}function stringInterpolation(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=e.trim().replace(s,(function(e,r){return t.push(placeholder(r)),"{{"+(t.length-1)+"}}"}));return t.length?function(e){return r.replace(/\{\{(\d+)\}\}/g,(function(r,n){var o=t[Number(n)](e);return o||0===o?String(o):""})).replace(/\s+/g," ")}:function(e){return r}}function placeholder(e){var t,r=compilePipeExpression(e),n=r.key,o=r.pipec,i=":"===n[0]?(t=n.slice(1),function(e){return e.res(t)}):function(e){return e.getFromScope(n)};return o.length?function(e){return o(e,i(e))}:i}},"./core/index.ts":
|
|
66
|
+
/*!***********************!*\
|
|
67
|
+
!*** ./core/index.ts ***!
|
|
68
|
+
\***********************/
|
|
69
|
+
/*! no static exports found */function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0});var n=r(/*! ./Arrmatura */"./core/Arrmatura.ts");Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===n[e]||Object.defineProperty(t,e,{enumerable:!0,get:function get(){return n[e]}}))}));var o=r(/*! ./Platform */"./core/Platform.ts");Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===o[e]||Object.defineProperty(t,e,{enumerable:!0,get:function get(){return o[e]}}))}))},"./core/register.ts":
|
|
4052
70
|
/*!**************************!*\
|
|
4053
|
-
!*** ./
|
|
71
|
+
!*** ./core/register.ts ***!
|
|
4054
72
|
\**************************/
|
|
4055
|
-
/*! exports
|
|
4056
|
-
|
|
4057
|
-
|
|
4058
|
-
|
|
4059
|
-
|
|
4060
|
-
|
|
4061
|
-
|
|
4062
|
-
|
|
4063
|
-
|
|
4064
|
-
|
|
4065
|
-
|
|
4066
|
-
|
|
4067
|
-
|
|
4068
|
-
|
|
4069
|
-
|
|
4070
|
-
|
|
4071
|
-
"
|
|
4072
|
-
|
|
4073
|
-
|
|
4074
|
-
|
|
4075
|
-
|
|
4076
|
-
|
|
4077
|
-
|
|
4078
|
-
|
|
4079
|
-
|
|
4080
|
-
|
|
4081
|
-
|
|
4082
|
-
|
|
4083
|
-
|
|
4084
|
-
|
|
4085
|
-
|
|
4086
|
-
|
|
4087
|
-
|
|
4088
|
-
|
|
4089
|
-
|
|
4090
|
-
|
|
4091
|
-
|
|
73
|
+
/*! no static exports found */function(e,t,r){var n=r(/*! @babel/runtime/helpers/interopRequireDefault */"./node_modules/@babel/runtime/helpers/interopRequireDefault.js");Object.defineProperty(t,"__esModule",{value:!0}),t.registerTypes=t.getByTag=t.REGISTRY=t.ComponentDefinition=void 0;var o=n(r(/*! @babel/runtime/helpers/classCallCheck */"./node_modules/@babel/runtime/helpers/classCallCheck.js")),i=n(r(/*! @babel/runtime/helpers/createClass */"./node_modules/@babel/runtime/helpers/createClass.js")),u=r(/*! ./compileNode */"./core/compileNode.ts"),s=r(/*! xml */"./lib/xml.ts"),l=r(/*! ./utils */"./core/utils.ts"),a=function(){function ComponentDefinition(e){var t=e.tag,r=e.template,n=e.Ctor;(0,o.default)(this,ComponentDefinition),this.tag=t,this.template=r,this.Ctor=n||function(){}}return(0,i.default)(ComponentDefinition,[{key:"content",get:function get(){return this.$templateContent||(this.$templateContent=(0,u.compileNodes)((0,s.xmlParse)(this.template)))}}]),ComponentDefinition}();t.ComponentDefinition=a;var c=new Map;t.REGISTRY=c;var d=function setInfo(e){return c.set(e.tag,new a(e))},f=function registerType(e){"string"==typeof e?e.replace(/<component\s+id="(.+)">([\s\S]*?)<\/component>/gm,(function(e,t,r){return d({tag:t,template:r.trim()}),""})):d("function"==typeof e?{Ctor:e,tag:e.name||(0,l.fnName)(e)}:e)};t.registerTypes=function registerTypes(e){return null==e?void 0:e.forEach(f)};t.getByTag=function getByTag(e){return c.get(e)||function notFound(e){return new a({tag:e,template:"<b>??"+e+"??</b>"})}(e)}},"./core/utils.ts":
|
|
74
|
+
/*!***********************!*\
|
|
75
|
+
!*** ./core/utils.ts ***!
|
|
76
|
+
\***********************/
|
|
77
|
+
/*! no static exports found */function(e,t,r){var n=r(/*! @babel/runtime/helpers/interopRequireDefault */"./node_modules/@babel/runtime/helpers/interopRequireDefault.js");Object.defineProperty(t,"__esModule",{value:!0}),t.stringifyState=t.methodName=t.fnName=t.applyValue=void 0;var o=n(r(/*! @babel/runtime/helpers/slicedToArray */"./node_modules/@babel/runtime/helpers/slicedToArray.js")),i=r(/*! nextId */"./lib/nextId.ts"),u=r(/*! noop */"./lib/noop.ts"),s=r(/*! xml */"./lib/xml.ts");t.applyValue=function applyValue(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.identity;return null!=e&&e.then?e.then(t):t(e)};t.fnName=function fnName(e){return(/^function\s+([\w$]+)\s*\(/.exec(e.toString())||[])[1]||(0,i.nextId)("C")};t.methodName=function methodName(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=""+(e||"");return t+r[0].toUpperCase()+r.slice(1)};t.stringifyState=function stringifyState(e){if(!e)return"";var t=[];return Object.entries(e).forEach((function(e){var r=(0,o.default)(e,2),n=r[0],i=r[1];i&&t.push(" "+n+'="'+(0,s.attributesToString)(i)+'"')})),t.length?t.join(""):""}},"./lib/createListeners.ts":
|
|
78
|
+
/*!********************************!*\
|
|
79
|
+
!*** ./lib/createListeners.ts ***!
|
|
80
|
+
\********************************/
|
|
81
|
+
/*! no static exports found */function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.createListeners=function createListeners(){var e=new Set;return{add:function add(t){return e.add(t),function(){return e.delete(t)}},notify:function notify(t){e.forEach((function(e){return e(t)}))}}}},"./lib/nextId.ts":
|
|
82
|
+
/*!***********************!*\
|
|
83
|
+
!*** ./lib/nextId.ts ***!
|
|
84
|
+
\***********************/
|
|
85
|
+
/*! no static exports found */function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.nextId=void 0;var r=1;t.nextId=function nextId(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return e+r++}},"./lib/noop.ts":
|
|
86
|
+
/*!*********************!*\
|
|
87
|
+
!*** ./lib/noop.ts ***!
|
|
88
|
+
\*********************/
|
|
89
|
+
/*! no static exports found */function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.noop=t.identity=void 0;t.noop=function noop(){};t.identity=function identity(e){return e}},"./lib/scalar.ts":
|
|
90
|
+
/*!***********************!*\
|
|
91
|
+
!*** ./lib/scalar.ts ***!
|
|
92
|
+
\***********************/
|
|
93
|
+
/*! no static exports found */function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.scalarParse=void 0;t.scalarParse=function scalarParse(e){if("undefined"!==e){if("null"===e)return null;if("true"===e)return!0;if("false"===e)return!1;if("0"===e)return 0;if(""===e)return"";if(e&&"1234567890+-".includes(e[0])&&e.length<=17){var t=+e;return isNaN(t)?e:t}return e}}},"./lib/xml.ts":
|
|
94
|
+
/*!********************!*\
|
|
95
|
+
!*** ./lib/xml.ts ***!
|
|
96
|
+
\********************/
|
|
97
|
+
/*! no static exports found */function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.xmlParse=t.skipQoutes=t.escapeXml=t.decodeXmlEntities=t.attributesToString=void 0,t.xmlStringify=function xmlStringify(e){var t=e.tag,r=e.attrs,n=e.nodes,o=void 0===n?[]:n,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if("#text"===t)return""+i+_(String((null==r?void 0:r.text)||""));var u=g(r),s=o.map((function(e){return xmlStringify(e," "+i)})).join("\n");return i+"<"+t+u+(s?">\n"+s+"\n"+i+"</"+t+">":"/>")};var n=r(/*! ./scalar */"./lib/scalar.ts"),o=/([a-z][a-zA-Z0-9-:]+)(="[^"]*"|={[^}]*})?/g,i=/^\s*$/,u=/<!--((?!-->)[\s\S])*-->/g,s=/(<)(\/?)([a-zа-я][a-zа-я0-9-:]*)((?:\s+[a-z][a-z0-9-:]+(?:="[^"]*"|={[^}]*})?)*)\s*(\/?)>/gi,l={img:1,input:1,br:1,col:1},a=/&#?[0-9a-z]{3,5};/g,c={amp:"&",gt:">",lt:"<",quot:'"',nbsp:" "},d={34:""",38:"&",39:"'",60:"<",62:">"},f=/["'&<>]/g,p=function FN_ESCAPE_XML_ENTITY(e){return d[e.charCodeAt(0)]},m=function FN_XML_ENTITY(e){var t=e.substring(1,e.length-1);return"#"===t[0]?String.fromCharCode(+t.slice(1)):c[t]||" "},h=function skipQoutes(e){return'"'===e[0]&&'"'===e[e.length-1]?e.slice(1,-1):e};t.skipQoutes=h;var b=function decodeXmlEntities(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return e.replace(a,m)};t.decodeXmlEntities=b;var y=function addNode(e,t){var r={tag:t};return(e.nodes||(e.nodes=[])).push(r),r},v=function parseAttrs(e,t){if(t){e.attrs={};for(var r=o.exec(t);r;r=o.exec(t)){var i=!r[2]||(0,n.scalarParse)(b(h(r[2].slice(1))));e.attrs[r[1]]=i}}},_=function escapeXml(e){return e?(""+e).replace(f,p):""};t.escapeXml=_;var g=function attributesToString(e){return"object"==typeof e?Array.isArray(e)?e.length?"["+attributesToString(e[0])+" x"+e.length+"]":"[]":"{"+Object.keys(e).toString()+"}":e};t.attributesToString=g;t.xmlParse=function xmlParse(e){for(var t=[{tag:"#root"}],r=String(e).trim().replace(u,""),n=0,o=s.exec(r);o;o=s.exec(r)){var a=o.index&&r.slice(n,o.index);if(a&&!a.match(i))y(t[0],"#text").attrs={text:b(a)};if(o[2]){if(t[0].tag!==o[3])throw new Error(" XML Parse closing tag does not match at: "+o.index+" near "+o.input.slice(Math.max(o.index-150,0),o.index)+"^^^^"+o.input.slice(o.index,Math.min(o.index+150,o.input.length)));t.shift()}else{var c=y(t[0],o[3]);if(v(c,o[4].trim()),!o[5]&&!(o[3]in l)&&(t.unshift(c),1===t.length))throw new Error("Parse error at: "+o[0])}n=s.lastIndex}return t[0].nodes||[]}},"./node_modules/@babel/runtime/helpers/arrayLikeToArray.js":
|
|
98
|
+
/*!*****************************************************************!*\
|
|
99
|
+
!*** ./node_modules/@babel/runtime/helpers/arrayLikeToArray.js ***!
|
|
100
|
+
\*****************************************************************/
|
|
101
|
+
/*! no static exports found */function(e,t){e.exports=function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n},e.exports.default=e.exports,e.exports.__esModule=!0},"./node_modules/@babel/runtime/helpers/arrayWithHoles.js":
|
|
102
|
+
/*!***************************************************************!*\
|
|
103
|
+
!*** ./node_modules/@babel/runtime/helpers/arrayWithHoles.js ***!
|
|
104
|
+
\***************************************************************/
|
|
105
|
+
/*! no static exports found */function(e,t){e.exports=function _arrayWithHoles(e){if(Array.isArray(e))return e},e.exports.default=e.exports,e.exports.__esModule=!0},"./node_modules/@babel/runtime/helpers/arrayWithoutHoles.js":
|
|
106
|
+
/*!******************************************************************!*\
|
|
107
|
+
!*** ./node_modules/@babel/runtime/helpers/arrayWithoutHoles.js ***!
|
|
108
|
+
\******************************************************************/
|
|
109
|
+
/*! no static exports found */function(e,t,r){var n=r(/*! ./arrayLikeToArray.js */"./node_modules/@babel/runtime/helpers/arrayLikeToArray.js");e.exports=function _arrayWithoutHoles(e){if(Array.isArray(e))return n(e)},e.exports.default=e.exports,e.exports.__esModule=!0},"./node_modules/@babel/runtime/helpers/assertThisInitialized.js":
|
|
110
|
+
/*!**********************************************************************!*\
|
|
111
|
+
!*** ./node_modules/@babel/runtime/helpers/assertThisInitialized.js ***!
|
|
112
|
+
\**********************************************************************/
|
|
113
|
+
/*! no static exports found */function(e,t){e.exports=function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e},e.exports.default=e.exports,e.exports.__esModule=!0},"./node_modules/@babel/runtime/helpers/classCallCheck.js":
|
|
114
|
+
/*!***************************************************************!*\
|
|
115
|
+
!*** ./node_modules/@babel/runtime/helpers/classCallCheck.js ***!
|
|
116
|
+
\***************************************************************/
|
|
117
|
+
/*! no static exports found */function(e,t){e.exports=function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},e.exports.default=e.exports,e.exports.__esModule=!0},"./node_modules/@babel/runtime/helpers/classPrivateFieldLooseBase.js":
|
|
118
|
+
/*!***************************************************************************!*\
|
|
119
|
+
!*** ./node_modules/@babel/runtime/helpers/classPrivateFieldLooseBase.js ***!
|
|
120
|
+
\***************************************************************************/
|
|
121
|
+
/*! no static exports found */function(e,t){e.exports=function _classPrivateFieldBase(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e},e.exports.default=e.exports,e.exports.__esModule=!0},"./node_modules/@babel/runtime/helpers/classPrivateFieldLooseKey.js":
|
|
122
|
+
/*!**************************************************************************!*\
|
|
123
|
+
!*** ./node_modules/@babel/runtime/helpers/classPrivateFieldLooseKey.js ***!
|
|
124
|
+
\**************************************************************************/
|
|
125
|
+
/*! no static exports found */function(e,t){var r=0;e.exports=function _classPrivateFieldKey(e){return"__private_"+r+++"_"+e},e.exports.default=e.exports,e.exports.__esModule=!0},"./node_modules/@babel/runtime/helpers/createClass.js":
|
|
126
|
+
/*!************************************************************!*\
|
|
127
|
+
!*** ./node_modules/@babel/runtime/helpers/createClass.js ***!
|
|
128
|
+
\************************************************************/
|
|
129
|
+
/*! no static exports found */function(e,t){function _defineProperties(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}e.exports=function _createClass(e,t,r){return t&&_defineProperties(e.prototype,t),r&&_defineProperties(e,r),e},e.exports.default=e.exports,e.exports.__esModule=!0},"./node_modules/@babel/runtime/helpers/defineProperty.js":
|
|
130
|
+
/*!***************************************************************!*\
|
|
131
|
+
!*** ./node_modules/@babel/runtime/helpers/defineProperty.js ***!
|
|
132
|
+
\***************************************************************/
|
|
133
|
+
/*! no static exports found */function(e,t){e.exports=function _defineProperty(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e},e.exports.default=e.exports,e.exports.__esModule=!0},"./node_modules/@babel/runtime/helpers/extends.js":
|
|
134
|
+
/*!********************************************************!*\
|
|
135
|
+
!*** ./node_modules/@babel/runtime/helpers/extends.js ***!
|
|
136
|
+
\********************************************************/
|
|
137
|
+
/*! no static exports found */function(e,t){function _extends(){return e.exports=_extends=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},e.exports.default=e.exports,e.exports.__esModule=!0,_extends.apply(this,arguments)}e.exports=_extends,e.exports.default=e.exports,e.exports.__esModule=!0},"./node_modules/@babel/runtime/helpers/get.js":
|
|
138
|
+
/*!****************************************************!*\
|
|
139
|
+
!*** ./node_modules/@babel/runtime/helpers/get.js ***!
|
|
140
|
+
\****************************************************/
|
|
141
|
+
/*! no static exports found */function(e,t,r){var n=r(/*! ./superPropBase.js */"./node_modules/@babel/runtime/helpers/superPropBase.js");function _get(t,r,o){return"undefined"!=typeof Reflect&&Reflect.get?(e.exports=_get=Reflect.get,e.exports.default=e.exports,e.exports.__esModule=!0):(e.exports=_get=function _get(e,t,r){var o=n(e,t);if(o){var i=Object.getOwnPropertyDescriptor(o,t);return i.get?i.get.call(r):i.value}},e.exports.default=e.exports,e.exports.__esModule=!0),_get(t,r,o||t)}e.exports=_get,e.exports.default=e.exports,e.exports.__esModule=!0},"./node_modules/@babel/runtime/helpers/getPrototypeOf.js":
|
|
142
|
+
/*!***************************************************************!*\
|
|
143
|
+
!*** ./node_modules/@babel/runtime/helpers/getPrototypeOf.js ***!
|
|
144
|
+
\***************************************************************/
|
|
145
|
+
/*! no static exports found */function(e,t){function _getPrototypeOf(t){return e.exports=_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(e){return e.__proto__||Object.getPrototypeOf(e)},e.exports.default=e.exports,e.exports.__esModule=!0,_getPrototypeOf(t)}e.exports=_getPrototypeOf,e.exports.default=e.exports,e.exports.__esModule=!0},"./node_modules/@babel/runtime/helpers/inherits.js":
|
|
146
|
+
/*!*********************************************************!*\
|
|
147
|
+
!*** ./node_modules/@babel/runtime/helpers/inherits.js ***!
|
|
148
|
+
\*********************************************************/
|
|
149
|
+
/*! no static exports found */function(e,t,r){var n=r(/*! ./setPrototypeOf.js */"./node_modules/@babel/runtime/helpers/setPrototypeOf.js");e.exports=function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&n(e,t)},e.exports.default=e.exports,e.exports.__esModule=!0},"./node_modules/@babel/runtime/helpers/interopRequireDefault.js":
|
|
150
|
+
/*!**********************************************************************!*\
|
|
151
|
+
!*** ./node_modules/@babel/runtime/helpers/interopRequireDefault.js ***!
|
|
152
|
+
\**********************************************************************/
|
|
153
|
+
/*! no static exports found */function(e,t){e.exports=function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}},e.exports.default=e.exports,e.exports.__esModule=!0},"./node_modules/@babel/runtime/helpers/iterableToArray.js":
|
|
154
|
+
/*!****************************************************************!*\
|
|
155
|
+
!*** ./node_modules/@babel/runtime/helpers/iterableToArray.js ***!
|
|
156
|
+
\****************************************************************/
|
|
157
|
+
/*! no static exports found */function(e,t){e.exports=function _iterableToArray(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)},e.exports.default=e.exports,e.exports.__esModule=!0},"./node_modules/@babel/runtime/helpers/iterableToArrayLimit.js":
|
|
158
|
+
/*!*********************************************************************!*\
|
|
159
|
+
!*** ./node_modules/@babel/runtime/helpers/iterableToArrayLimit.js ***!
|
|
160
|
+
\*********************************************************************/
|
|
161
|
+
/*! no static exports found */function(e,t){e.exports=function _iterableToArrayLimit(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i=[],u=!0,s=!1;try{for(r=r.call(e);!(u=(n=r.next()).done)&&(i.push(n.value),!t||i.length!==t);u=!0);}catch(e){s=!0,o=e}finally{try{u||null==r.return||r.return()}finally{if(s)throw o}}return i}},e.exports.default=e.exports,e.exports.__esModule=!0},"./node_modules/@babel/runtime/helpers/nonIterableRest.js":
|
|
162
|
+
/*!****************************************************************!*\
|
|
163
|
+
!*** ./node_modules/@babel/runtime/helpers/nonIterableRest.js ***!
|
|
164
|
+
\****************************************************************/
|
|
165
|
+
/*! no static exports found */function(e,t){e.exports=function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.default=e.exports,e.exports.__esModule=!0},"./node_modules/@babel/runtime/helpers/nonIterableSpread.js":
|
|
166
|
+
/*!******************************************************************!*\
|
|
167
|
+
!*** ./node_modules/@babel/runtime/helpers/nonIterableSpread.js ***!
|
|
168
|
+
\******************************************************************/
|
|
169
|
+
/*! no static exports found */function(e,t){e.exports=function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.default=e.exports,e.exports.__esModule=!0},"./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js":
|
|
170
|
+
/*!**************************************************************************!*\
|
|
171
|
+
!*** ./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js ***!
|
|
172
|
+
\**************************************************************************/
|
|
173
|
+
/*! no static exports found */function(e,t,r){var n=r(/*! @babel/runtime/helpers/typeof */"./node_modules/@babel/runtime/helpers/typeof.js").default,o=r(/*! ./assertThisInitialized.js */"./node_modules/@babel/runtime/helpers/assertThisInitialized.js");e.exports=function _possibleConstructorReturn(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return o(e)},e.exports.default=e.exports,e.exports.__esModule=!0},"./node_modules/@babel/runtime/helpers/setPrototypeOf.js":
|
|
174
|
+
/*!***************************************************************!*\
|
|
175
|
+
!*** ./node_modules/@babel/runtime/helpers/setPrototypeOf.js ***!
|
|
176
|
+
\***************************************************************/
|
|
177
|
+
/*! no static exports found */function(e,t){function _setPrototypeOf(t,r){return e.exports=_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(e,t){return e.__proto__=t,e},e.exports.default=e.exports,e.exports.__esModule=!0,_setPrototypeOf(t,r)}e.exports=_setPrototypeOf,e.exports.default=e.exports,e.exports.__esModule=!0},"./node_modules/@babel/runtime/helpers/slicedToArray.js":
|
|
178
|
+
/*!**************************************************************!*\
|
|
179
|
+
!*** ./node_modules/@babel/runtime/helpers/slicedToArray.js ***!
|
|
180
|
+
\**************************************************************/
|
|
181
|
+
/*! no static exports found */function(e,t,r){var n=r(/*! ./arrayWithHoles.js */"./node_modules/@babel/runtime/helpers/arrayWithHoles.js"),o=r(/*! ./iterableToArrayLimit.js */"./node_modules/@babel/runtime/helpers/iterableToArrayLimit.js"),i=r(/*! ./unsupportedIterableToArray.js */"./node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js"),u=r(/*! ./nonIterableRest.js */"./node_modules/@babel/runtime/helpers/nonIterableRest.js");e.exports=function _slicedToArray(e,t){return n(e)||o(e,t)||i(e,t)||u()},e.exports.default=e.exports,e.exports.__esModule=!0},"./node_modules/@babel/runtime/helpers/superPropBase.js":
|
|
182
|
+
/*!**************************************************************!*\
|
|
183
|
+
!*** ./node_modules/@babel/runtime/helpers/superPropBase.js ***!
|
|
184
|
+
\**************************************************************/
|
|
185
|
+
/*! no static exports found */function(e,t,r){var n=r(/*! ./getPrototypeOf.js */"./node_modules/@babel/runtime/helpers/getPrototypeOf.js");e.exports=function _superPropBase(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=n(e)););return e},e.exports.default=e.exports,e.exports.__esModule=!0},"./node_modules/@babel/runtime/helpers/toArray.js":
|
|
186
|
+
/*!********************************************************!*\
|
|
187
|
+
!*** ./node_modules/@babel/runtime/helpers/toArray.js ***!
|
|
188
|
+
\********************************************************/
|
|
189
|
+
/*! no static exports found */function(e,t,r){var n=r(/*! ./arrayWithHoles.js */"./node_modules/@babel/runtime/helpers/arrayWithHoles.js"),o=r(/*! ./iterableToArray.js */"./node_modules/@babel/runtime/helpers/iterableToArray.js"),i=r(/*! ./unsupportedIterableToArray.js */"./node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js"),u=r(/*! ./nonIterableRest.js */"./node_modules/@babel/runtime/helpers/nonIterableRest.js");e.exports=function _toArray(e){return n(e)||o(e)||i(e)||u()},e.exports.default=e.exports,e.exports.__esModule=!0},"./node_modules/@babel/runtime/helpers/toConsumableArray.js":
|
|
190
|
+
/*!******************************************************************!*\
|
|
191
|
+
!*** ./node_modules/@babel/runtime/helpers/toConsumableArray.js ***!
|
|
192
|
+
\******************************************************************/
|
|
193
|
+
/*! no static exports found */function(e,t,r){var n=r(/*! ./arrayWithoutHoles.js */"./node_modules/@babel/runtime/helpers/arrayWithoutHoles.js"),o=r(/*! ./iterableToArray.js */"./node_modules/@babel/runtime/helpers/iterableToArray.js"),i=r(/*! ./unsupportedIterableToArray.js */"./node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js"),u=r(/*! ./nonIterableSpread.js */"./node_modules/@babel/runtime/helpers/nonIterableSpread.js");e.exports=function _toConsumableArray(e){return n(e)||o(e)||i(e)||u()},e.exports.default=e.exports,e.exports.__esModule=!0},"./node_modules/@babel/runtime/helpers/typeof.js":
|
|
194
|
+
/*!*******************************************************!*\
|
|
195
|
+
!*** ./node_modules/@babel/runtime/helpers/typeof.js ***!
|
|
196
|
+
\*******************************************************/
|
|
197
|
+
/*! no static exports found */function(e,t){function _typeof(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?(e.exports=_typeof=function _typeof(e){return typeof e},e.exports.default=e.exports,e.exports.__esModule=!0):(e.exports=_typeof=function _typeof(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.default=e.exports,e.exports.__esModule=!0),_typeof(t)}e.exports=_typeof,e.exports.default=e.exports,e.exports.__esModule=!0},"./node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js":
|
|
198
|
+
/*!***************************************************************************!*\
|
|
199
|
+
!*** ./node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js ***!
|
|
200
|
+
\***************************************************************************/
|
|
201
|
+
/*! no static exports found */function(e,t,r){var n=r(/*! ./arrayLikeToArray.js */"./node_modules/@babel/runtime/helpers/arrayLikeToArray.js");e.exports=function _unsupportedIterableToArray(e,t){if(e){if("string"==typeof e)return n(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}},e.exports.default=e.exports,e.exports.__esModule=!0},0:
|
|
202
|
+
/*!*********************************!*\
|
|
203
|
+
!*** multi ./core-web/index.ts ***!
|
|
204
|
+
\*********************************/
|
|
205
|
+
/*! no static exports found */function(e,t,r){e.exports=r(/*! ./core-web/index.ts */"./core-web/index.ts")}})}));
|