@json-editor/json-editor 2.6.0 → 2.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/build.yml +12 -3
- package/CHANGELOG.md +34 -0
- package/README.md +163 -18
- package/dist/jsoneditor.js +2 -2
- package/dist/nonmin/jsoneditor.js +2710 -651
- package/dist/nonmin/jsoneditor.js.map +1 -1
- package/docs/cleave.html +1 -1
- package/docs/datetime.html +1 -1
- package/docs/describedby.html +1 -1
- package/docs/form-submission.html +162 -0
- package/docs/index.html +2 -2
- package/docs/materialize_css.html +1 -1
- package/docs/radio.html +1 -1
- package/docs/select2.html +1 -1
- package/docs/selectize.html +1 -1
- package/docs/starrating.html +1 -1
- package/docs/wysiwyg.html +1 -1
- package/package.json +4 -3
- package/release-notes.md +2 -0
- package/src/core.js +36 -37
- package/src/defaults.js +10 -2
- package/src/editor.js +1 -1
- package/src/editors/array.js +12 -1
- package/src/editors/autocomplete.js +4 -3
- package/src/editors/button.js +1 -1
- package/src/editors/checkbox.js +3 -1
- package/src/editors/hidden.js +3 -1
- package/src/editors/multiselect.js +17 -6
- package/src/editors/object.js +3 -4
- package/src/editors/radio.js +8 -3
- package/src/editors/select.js +3 -1
- package/src/editors/signature.js +3 -1
- package/src/editors/string.js +7 -1
- package/src/editors/table.js +20 -2
- package/src/editors/upload.js +1 -1
- package/src/editors/uuid.js +2 -12
- package/src/iconlib.js +1 -1
- package/src/schemaloader.js +231 -108
- package/src/style.css +3 -0
- package/src/style.css.js +1 -1
- package/src/theme.js +0 -2
- package/src/themes/bootstrap3.js +1 -0
- package/src/themes/spectre.js +2 -1
- package/src/utilities.js +18 -0
- package/src/validator.js +36 -34
- package/tests/codeceptjs/codecept.json +1 -1
- package/tests/codeceptjs/core_test.js +104 -0
- package/tests/codeceptjs/editors/advanced_test.js +1 -1
- package/tests/codeceptjs/editors/array_test.js +74 -0
- package/tests/codeceptjs/editors/autocomplete_test.js +16 -0
- package/tests/codeceptjs/editors/button_test.js +10 -3
- package/tests/codeceptjs/editors/integer_test.js +7 -2
- package/tests/codeceptjs/editors/jodit_test.js +3 -3
- package/tests/codeceptjs/editors/object_test.js +29 -9
- package/tests/codeceptjs/editors/range_test.js +12 -0
- package/tests/codeceptjs/editors/uuid_test.js +31 -4
- package/tests/docker-compose.yml +1 -1
- package/tests/fixtures/definitions.json +22 -0
- package/tests/fixtures/properties.json +20 -0
- package/tests/pages/array-checkboxes-infotext.html +52 -0
- package/tests/pages/array-move-events.html +4 -2
- package/tests/pages/array-unique-items-sort.html +78 -0
- package/tests/pages/autocomplete.html +69 -0
- package/tests/pages/button-icons.html +38 -0
- package/tests/pages/core.html +4 -2
- package/tests/pages/error-messages.html +47 -0
- package/tests/pages/grid-strict.html +6 -10
- package/tests/pages/grid.html +0 -4
- package/tests/pages/issues/issue-gh-812.html +4 -2
- package/tests/pages/meta_schema.json +14 -0
- package/tests/pages/object-required-properties.html +7 -7
- package/tests/pages/object-with-dependencies-array.html +29 -19
- package/tests/pages/range.html +60 -0
- package/tests/pages/ready.html +43 -0
- package/tests/pages/references.html +162 -0
- package/tests/pages/string-simplemde-editor.html +81 -0
- package/tests/pages/table-move-events.html +4 -1
- package/tests/pages/urn.html +11 -8
- package/tests/pages/use-name-attributes.html +206 -0
- package/tests/pages/uuid.html +89 -50
- package/tests/pages/validation-messages.json +705 -0
- package/tests/unit/core.spec.js +79 -66
- package/tests/unit/editor.spec.js +20 -8
- package/tests/unit/editors/array.spec.js +3 -2
- package/tests/unit/editors/object.spec.js +3 -1
- package/tests/unit/editors/table.spec.js +4 -2
- package/tests/unit/schemaloader.spec.js +77 -105
- package/tests/unit/validator.spec.js +2 -2
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* * @name JSON Editor
|
|
4
4
|
* * @description JSON Schema Based Editor
|
|
5
5
|
* * This library is the continuation of jdorn's great work (see also https://github.com/jdorn/json-editor/issues/800)
|
|
6
|
-
* * @version "2.
|
|
6
|
+
* * @version "2.8.0"
|
|
7
7
|
* * @author Jeremy Dorn
|
|
8
8
|
* * @see https://github.com/jdorn/json-editor/
|
|
9
9
|
* * @see https://github.com/json-editor/json-editor
|
|
@@ -192,6 +192,22 @@ module.exports = function (S, index, unicode) {
|
|
|
192
192
|
};
|
|
193
193
|
|
|
194
194
|
|
|
195
|
+
/***/ }),
|
|
196
|
+
|
|
197
|
+
/***/ "./node_modules/core-js/internals/an-instance.js":
|
|
198
|
+
/*!*******************************************************!*\
|
|
199
|
+
!*** ./node_modules/core-js/internals/an-instance.js ***!
|
|
200
|
+
\*******************************************************/
|
|
201
|
+
/*! no static exports found */
|
|
202
|
+
/***/ (function(module, exports) {
|
|
203
|
+
|
|
204
|
+
module.exports = function (it, Constructor, name) {
|
|
205
|
+
if (!(it instanceof Constructor)) {
|
|
206
|
+
throw TypeError('Incorrect ' + (name ? name + ' ' : '') + 'invocation');
|
|
207
|
+
} return it;
|
|
208
|
+
};
|
|
209
|
+
|
|
210
|
+
|
|
195
211
|
/***/ }),
|
|
196
212
|
|
|
197
213
|
/***/ "./node_modules/core-js/internals/an-object.js":
|
|
@@ -1042,6 +1058,32 @@ module.exports = {
|
|
|
1042
1058
|
};
|
|
1043
1059
|
|
|
1044
1060
|
|
|
1061
|
+
/***/ }),
|
|
1062
|
+
|
|
1063
|
+
/***/ "./node_modules/core-js/internals/engine-is-browser.js":
|
|
1064
|
+
/*!*************************************************************!*\
|
|
1065
|
+
!*** ./node_modules/core-js/internals/engine-is-browser.js ***!
|
|
1066
|
+
\*************************************************************/
|
|
1067
|
+
/*! no static exports found */
|
|
1068
|
+
/***/ (function(module, exports) {
|
|
1069
|
+
|
|
1070
|
+
module.exports = typeof window == 'object';
|
|
1071
|
+
|
|
1072
|
+
|
|
1073
|
+
/***/ }),
|
|
1074
|
+
|
|
1075
|
+
/***/ "./node_modules/core-js/internals/engine-is-ios.js":
|
|
1076
|
+
/*!*********************************************************!*\
|
|
1077
|
+
!*** ./node_modules/core-js/internals/engine-is-ios.js ***!
|
|
1078
|
+
\*********************************************************/
|
|
1079
|
+
/*! no static exports found */
|
|
1080
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
1081
|
+
|
|
1082
|
+
var userAgent = __webpack_require__(/*! ../internals/engine-user-agent */ "./node_modules/core-js/internals/engine-user-agent.js");
|
|
1083
|
+
|
|
1084
|
+
module.exports = /(?:iphone|ipod|ipad).*applewebkit/i.test(userAgent);
|
|
1085
|
+
|
|
1086
|
+
|
|
1045
1087
|
/***/ }),
|
|
1046
1088
|
|
|
1047
1089
|
/***/ "./node_modules/core-js/internals/engine-is-node.js":
|
|
@@ -1057,6 +1099,20 @@ var global = __webpack_require__(/*! ../internals/global */ "./node_modules/core
|
|
|
1057
1099
|
module.exports = classof(global.process) == 'process';
|
|
1058
1100
|
|
|
1059
1101
|
|
|
1102
|
+
/***/ }),
|
|
1103
|
+
|
|
1104
|
+
/***/ "./node_modules/core-js/internals/engine-is-webos-webkit.js":
|
|
1105
|
+
/*!******************************************************************!*\
|
|
1106
|
+
!*** ./node_modules/core-js/internals/engine-is-webos-webkit.js ***!
|
|
1107
|
+
\******************************************************************/
|
|
1108
|
+
/*! no static exports found */
|
|
1109
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
1110
|
+
|
|
1111
|
+
var userAgent = __webpack_require__(/*! ../internals/engine-user-agent */ "./node_modules/core-js/internals/engine-user-agent.js");
|
|
1112
|
+
|
|
1113
|
+
module.exports = /web0s(?!.*chrome)/i.test(userAgent);
|
|
1114
|
+
|
|
1115
|
+
|
|
1060
1116
|
/***/ }),
|
|
1061
1117
|
|
|
1062
1118
|
/***/ "./node_modules/core-js/internals/engine-user-agent.js":
|
|
@@ -1572,6 +1628,25 @@ module.exports = function hasOwn(it, key) {
|
|
|
1572
1628
|
module.exports = {};
|
|
1573
1629
|
|
|
1574
1630
|
|
|
1631
|
+
/***/ }),
|
|
1632
|
+
|
|
1633
|
+
/***/ "./node_modules/core-js/internals/host-report-errors.js":
|
|
1634
|
+
/*!**************************************************************!*\
|
|
1635
|
+
!*** ./node_modules/core-js/internals/host-report-errors.js ***!
|
|
1636
|
+
\**************************************************************/
|
|
1637
|
+
/*! no static exports found */
|
|
1638
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
1639
|
+
|
|
1640
|
+
var global = __webpack_require__(/*! ../internals/global */ "./node_modules/core-js/internals/global.js");
|
|
1641
|
+
|
|
1642
|
+
module.exports = function (a, b) {
|
|
1643
|
+
var console = global.console;
|
|
1644
|
+
if (console && console.error) {
|
|
1645
|
+
arguments.length === 1 ? console.error(a) : console.error(a, b);
|
|
1646
|
+
}
|
|
1647
|
+
};
|
|
1648
|
+
|
|
1649
|
+
|
|
1575
1650
|
/***/ }),
|
|
1576
1651
|
|
|
1577
1652
|
/***/ "./node_modules/core-js/internals/html.js":
|
|
@@ -1882,6 +1957,75 @@ module.exports = function (it) {
|
|
|
1882
1957
|
};
|
|
1883
1958
|
|
|
1884
1959
|
|
|
1960
|
+
/***/ }),
|
|
1961
|
+
|
|
1962
|
+
/***/ "./node_modules/core-js/internals/iterate.js":
|
|
1963
|
+
/*!***************************************************!*\
|
|
1964
|
+
!*** ./node_modules/core-js/internals/iterate.js ***!
|
|
1965
|
+
\***************************************************/
|
|
1966
|
+
/*! no static exports found */
|
|
1967
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
1968
|
+
|
|
1969
|
+
var anObject = __webpack_require__(/*! ../internals/an-object */ "./node_modules/core-js/internals/an-object.js");
|
|
1970
|
+
var isArrayIteratorMethod = __webpack_require__(/*! ../internals/is-array-iterator-method */ "./node_modules/core-js/internals/is-array-iterator-method.js");
|
|
1971
|
+
var toLength = __webpack_require__(/*! ../internals/to-length */ "./node_modules/core-js/internals/to-length.js");
|
|
1972
|
+
var bind = __webpack_require__(/*! ../internals/function-bind-context */ "./node_modules/core-js/internals/function-bind-context.js");
|
|
1973
|
+
var getIteratorMethod = __webpack_require__(/*! ../internals/get-iterator-method */ "./node_modules/core-js/internals/get-iterator-method.js");
|
|
1974
|
+
var iteratorClose = __webpack_require__(/*! ../internals/iterator-close */ "./node_modules/core-js/internals/iterator-close.js");
|
|
1975
|
+
|
|
1976
|
+
var Result = function (stopped, result) {
|
|
1977
|
+
this.stopped = stopped;
|
|
1978
|
+
this.result = result;
|
|
1979
|
+
};
|
|
1980
|
+
|
|
1981
|
+
module.exports = function (iterable, unboundFunction, options) {
|
|
1982
|
+
var that = options && options.that;
|
|
1983
|
+
var AS_ENTRIES = !!(options && options.AS_ENTRIES);
|
|
1984
|
+
var IS_ITERATOR = !!(options && options.IS_ITERATOR);
|
|
1985
|
+
var INTERRUPTED = !!(options && options.INTERRUPTED);
|
|
1986
|
+
var fn = bind(unboundFunction, that, 1 + AS_ENTRIES + INTERRUPTED);
|
|
1987
|
+
var iterator, iterFn, index, length, result, next, step;
|
|
1988
|
+
|
|
1989
|
+
var stop = function (condition) {
|
|
1990
|
+
if (iterator) iteratorClose(iterator);
|
|
1991
|
+
return new Result(true, condition);
|
|
1992
|
+
};
|
|
1993
|
+
|
|
1994
|
+
var callFn = function (value) {
|
|
1995
|
+
if (AS_ENTRIES) {
|
|
1996
|
+
anObject(value);
|
|
1997
|
+
return INTERRUPTED ? fn(value[0], value[1], stop) : fn(value[0], value[1]);
|
|
1998
|
+
} return INTERRUPTED ? fn(value, stop) : fn(value);
|
|
1999
|
+
};
|
|
2000
|
+
|
|
2001
|
+
if (IS_ITERATOR) {
|
|
2002
|
+
iterator = iterable;
|
|
2003
|
+
} else {
|
|
2004
|
+
iterFn = getIteratorMethod(iterable);
|
|
2005
|
+
if (typeof iterFn != 'function') throw TypeError('Target is not iterable');
|
|
2006
|
+
// optimisation for array iterators
|
|
2007
|
+
if (isArrayIteratorMethod(iterFn)) {
|
|
2008
|
+
for (index = 0, length = toLength(iterable.length); length > index; index++) {
|
|
2009
|
+
result = callFn(iterable[index]);
|
|
2010
|
+
if (result && result instanceof Result) return result;
|
|
2011
|
+
} return new Result(false);
|
|
2012
|
+
}
|
|
2013
|
+
iterator = iterFn.call(iterable);
|
|
2014
|
+
}
|
|
2015
|
+
|
|
2016
|
+
next = iterator.next;
|
|
2017
|
+
while (!(step = next.call(iterator)).done) {
|
|
2018
|
+
try {
|
|
2019
|
+
result = callFn(step.value);
|
|
2020
|
+
} catch (error) {
|
|
2021
|
+
iteratorClose(iterator);
|
|
2022
|
+
throw error;
|
|
2023
|
+
}
|
|
2024
|
+
if (typeof result == 'object' && result && result instanceof Result) return result;
|
|
2025
|
+
} return new Result(false);
|
|
2026
|
+
};
|
|
2027
|
+
|
|
2028
|
+
|
|
1885
2029
|
/***/ }),
|
|
1886
2030
|
|
|
1887
2031
|
/***/ "./node_modules/core-js/internals/iterator-close.js":
|
|
@@ -1970,6 +2114,113 @@ module.exports = {
|
|
|
1970
2114
|
module.exports = {};
|
|
1971
2115
|
|
|
1972
2116
|
|
|
2117
|
+
/***/ }),
|
|
2118
|
+
|
|
2119
|
+
/***/ "./node_modules/core-js/internals/microtask.js":
|
|
2120
|
+
/*!*****************************************************!*\
|
|
2121
|
+
!*** ./node_modules/core-js/internals/microtask.js ***!
|
|
2122
|
+
\*****************************************************/
|
|
2123
|
+
/*! no static exports found */
|
|
2124
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
2125
|
+
|
|
2126
|
+
var global = __webpack_require__(/*! ../internals/global */ "./node_modules/core-js/internals/global.js");
|
|
2127
|
+
var getOwnPropertyDescriptor = __webpack_require__(/*! ../internals/object-get-own-property-descriptor */ "./node_modules/core-js/internals/object-get-own-property-descriptor.js").f;
|
|
2128
|
+
var macrotask = __webpack_require__(/*! ../internals/task */ "./node_modules/core-js/internals/task.js").set;
|
|
2129
|
+
var IS_IOS = __webpack_require__(/*! ../internals/engine-is-ios */ "./node_modules/core-js/internals/engine-is-ios.js");
|
|
2130
|
+
var IS_WEBOS_WEBKIT = __webpack_require__(/*! ../internals/engine-is-webos-webkit */ "./node_modules/core-js/internals/engine-is-webos-webkit.js");
|
|
2131
|
+
var IS_NODE = __webpack_require__(/*! ../internals/engine-is-node */ "./node_modules/core-js/internals/engine-is-node.js");
|
|
2132
|
+
|
|
2133
|
+
var MutationObserver = global.MutationObserver || global.WebKitMutationObserver;
|
|
2134
|
+
var document = global.document;
|
|
2135
|
+
var process = global.process;
|
|
2136
|
+
var Promise = global.Promise;
|
|
2137
|
+
// Node.js 11 shows ExperimentalWarning on getting `queueMicrotask`
|
|
2138
|
+
var queueMicrotaskDescriptor = getOwnPropertyDescriptor(global, 'queueMicrotask');
|
|
2139
|
+
var queueMicrotask = queueMicrotaskDescriptor && queueMicrotaskDescriptor.value;
|
|
2140
|
+
|
|
2141
|
+
var flush, head, last, notify, toggle, node, promise, then;
|
|
2142
|
+
|
|
2143
|
+
// modern engines have queueMicrotask method
|
|
2144
|
+
if (!queueMicrotask) {
|
|
2145
|
+
flush = function () {
|
|
2146
|
+
var parent, fn;
|
|
2147
|
+
if (IS_NODE && (parent = process.domain)) parent.exit();
|
|
2148
|
+
while (head) {
|
|
2149
|
+
fn = head.fn;
|
|
2150
|
+
head = head.next;
|
|
2151
|
+
try {
|
|
2152
|
+
fn();
|
|
2153
|
+
} catch (error) {
|
|
2154
|
+
if (head) notify();
|
|
2155
|
+
else last = undefined;
|
|
2156
|
+
throw error;
|
|
2157
|
+
}
|
|
2158
|
+
} last = undefined;
|
|
2159
|
+
if (parent) parent.enter();
|
|
2160
|
+
};
|
|
2161
|
+
|
|
2162
|
+
// browsers with MutationObserver, except iOS - https://github.com/zloirock/core-js/issues/339
|
|
2163
|
+
// also except WebOS Webkit https://github.com/zloirock/core-js/issues/898
|
|
2164
|
+
if (!IS_IOS && !IS_NODE && !IS_WEBOS_WEBKIT && MutationObserver && document) {
|
|
2165
|
+
toggle = true;
|
|
2166
|
+
node = document.createTextNode('');
|
|
2167
|
+
new MutationObserver(flush).observe(node, { characterData: true });
|
|
2168
|
+
notify = function () {
|
|
2169
|
+
node.data = toggle = !toggle;
|
|
2170
|
+
};
|
|
2171
|
+
// environments with maybe non-completely correct, but existent Promise
|
|
2172
|
+
} else if (Promise && Promise.resolve) {
|
|
2173
|
+
// Promise.resolve without an argument throws an error in LG WebOS 2
|
|
2174
|
+
promise = Promise.resolve(undefined);
|
|
2175
|
+
// workaround of WebKit ~ iOS Safari 10.1 bug
|
|
2176
|
+
promise.constructor = Promise;
|
|
2177
|
+
then = promise.then;
|
|
2178
|
+
notify = function () {
|
|
2179
|
+
then.call(promise, flush);
|
|
2180
|
+
};
|
|
2181
|
+
// Node.js without promises
|
|
2182
|
+
} else if (IS_NODE) {
|
|
2183
|
+
notify = function () {
|
|
2184
|
+
process.nextTick(flush);
|
|
2185
|
+
};
|
|
2186
|
+
// for other environments - macrotask based on:
|
|
2187
|
+
// - setImmediate
|
|
2188
|
+
// - MessageChannel
|
|
2189
|
+
// - window.postMessag
|
|
2190
|
+
// - onreadystatechange
|
|
2191
|
+
// - setTimeout
|
|
2192
|
+
} else {
|
|
2193
|
+
notify = function () {
|
|
2194
|
+
// strange IE + webpack dev server bug - use .call(global)
|
|
2195
|
+
macrotask.call(global, flush);
|
|
2196
|
+
};
|
|
2197
|
+
}
|
|
2198
|
+
}
|
|
2199
|
+
|
|
2200
|
+
module.exports = queueMicrotask || function (fn) {
|
|
2201
|
+
var task = { fn: fn, next: undefined };
|
|
2202
|
+
if (last) last.next = task;
|
|
2203
|
+
if (!head) {
|
|
2204
|
+
head = task;
|
|
2205
|
+
notify();
|
|
2206
|
+
} last = task;
|
|
2207
|
+
};
|
|
2208
|
+
|
|
2209
|
+
|
|
2210
|
+
/***/ }),
|
|
2211
|
+
|
|
2212
|
+
/***/ "./node_modules/core-js/internals/native-promise-constructor.js":
|
|
2213
|
+
/*!**********************************************************************!*\
|
|
2214
|
+
!*** ./node_modules/core-js/internals/native-promise-constructor.js ***!
|
|
2215
|
+
\**********************************************************************/
|
|
2216
|
+
/*! no static exports found */
|
|
2217
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
2218
|
+
|
|
2219
|
+
var global = __webpack_require__(/*! ../internals/global */ "./node_modules/core-js/internals/global.js");
|
|
2220
|
+
|
|
2221
|
+
module.exports = global.Promise;
|
|
2222
|
+
|
|
2223
|
+
|
|
1973
2224
|
/***/ }),
|
|
1974
2225
|
|
|
1975
2226
|
/***/ "./node_modules/core-js/internals/native-symbol.js":
|
|
@@ -2009,6 +2260,36 @@ var WeakMap = global.WeakMap;
|
|
|
2009
2260
|
module.exports = typeof WeakMap === 'function' && /native code/.test(inspectSource(WeakMap));
|
|
2010
2261
|
|
|
2011
2262
|
|
|
2263
|
+
/***/ }),
|
|
2264
|
+
|
|
2265
|
+
/***/ "./node_modules/core-js/internals/new-promise-capability.js":
|
|
2266
|
+
/*!******************************************************************!*\
|
|
2267
|
+
!*** ./node_modules/core-js/internals/new-promise-capability.js ***!
|
|
2268
|
+
\******************************************************************/
|
|
2269
|
+
/*! no static exports found */
|
|
2270
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
2271
|
+
|
|
2272
|
+
"use strict";
|
|
2273
|
+
|
|
2274
|
+
var aFunction = __webpack_require__(/*! ../internals/a-function */ "./node_modules/core-js/internals/a-function.js");
|
|
2275
|
+
|
|
2276
|
+
var PromiseCapability = function (C) {
|
|
2277
|
+
var resolve, reject;
|
|
2278
|
+
this.promise = new C(function ($$resolve, $$reject) {
|
|
2279
|
+
if (resolve !== undefined || reject !== undefined) throw TypeError('Bad Promise constructor');
|
|
2280
|
+
resolve = $$resolve;
|
|
2281
|
+
reject = $$reject;
|
|
2282
|
+
});
|
|
2283
|
+
this.resolve = aFunction(resolve);
|
|
2284
|
+
this.reject = aFunction(reject);
|
|
2285
|
+
};
|
|
2286
|
+
|
|
2287
|
+
// 25.4.1.5 NewPromiseCapability(C)
|
|
2288
|
+
module.exports.f = function (C) {
|
|
2289
|
+
return new PromiseCapability(C);
|
|
2290
|
+
};
|
|
2291
|
+
|
|
2292
|
+
|
|
2012
2293
|
/***/ }),
|
|
2013
2294
|
|
|
2014
2295
|
/***/ "./node_modules/core-js/internals/not-a-regexp.js":
|
|
@@ -2633,6 +2914,64 @@ var global = __webpack_require__(/*! ../internals/global */ "./node_modules/core
|
|
|
2633
2914
|
module.exports = global;
|
|
2634
2915
|
|
|
2635
2916
|
|
|
2917
|
+
/***/ }),
|
|
2918
|
+
|
|
2919
|
+
/***/ "./node_modules/core-js/internals/perform.js":
|
|
2920
|
+
/*!***************************************************!*\
|
|
2921
|
+
!*** ./node_modules/core-js/internals/perform.js ***!
|
|
2922
|
+
\***************************************************/
|
|
2923
|
+
/*! no static exports found */
|
|
2924
|
+
/***/ (function(module, exports) {
|
|
2925
|
+
|
|
2926
|
+
module.exports = function (exec) {
|
|
2927
|
+
try {
|
|
2928
|
+
return { error: false, value: exec() };
|
|
2929
|
+
} catch (error) {
|
|
2930
|
+
return { error: true, value: error };
|
|
2931
|
+
}
|
|
2932
|
+
};
|
|
2933
|
+
|
|
2934
|
+
|
|
2935
|
+
/***/ }),
|
|
2936
|
+
|
|
2937
|
+
/***/ "./node_modules/core-js/internals/promise-resolve.js":
|
|
2938
|
+
/*!***********************************************************!*\
|
|
2939
|
+
!*** ./node_modules/core-js/internals/promise-resolve.js ***!
|
|
2940
|
+
\***********************************************************/
|
|
2941
|
+
/*! no static exports found */
|
|
2942
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
2943
|
+
|
|
2944
|
+
var anObject = __webpack_require__(/*! ../internals/an-object */ "./node_modules/core-js/internals/an-object.js");
|
|
2945
|
+
var isObject = __webpack_require__(/*! ../internals/is-object */ "./node_modules/core-js/internals/is-object.js");
|
|
2946
|
+
var newPromiseCapability = __webpack_require__(/*! ../internals/new-promise-capability */ "./node_modules/core-js/internals/new-promise-capability.js");
|
|
2947
|
+
|
|
2948
|
+
module.exports = function (C, x) {
|
|
2949
|
+
anObject(C);
|
|
2950
|
+
if (isObject(x) && x.constructor === C) return x;
|
|
2951
|
+
var promiseCapability = newPromiseCapability.f(C);
|
|
2952
|
+
var resolve = promiseCapability.resolve;
|
|
2953
|
+
resolve(x);
|
|
2954
|
+
return promiseCapability.promise;
|
|
2955
|
+
};
|
|
2956
|
+
|
|
2957
|
+
|
|
2958
|
+
/***/ }),
|
|
2959
|
+
|
|
2960
|
+
/***/ "./node_modules/core-js/internals/redefine-all.js":
|
|
2961
|
+
/*!********************************************************!*\
|
|
2962
|
+
!*** ./node_modules/core-js/internals/redefine-all.js ***!
|
|
2963
|
+
\********************************************************/
|
|
2964
|
+
/*! no static exports found */
|
|
2965
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
2966
|
+
|
|
2967
|
+
var redefine = __webpack_require__(/*! ../internals/redefine */ "./node_modules/core-js/internals/redefine.js");
|
|
2968
|
+
|
|
2969
|
+
module.exports = function (target, src, options) {
|
|
2970
|
+
for (var key in src) redefine(target, key, src[key], options);
|
|
2971
|
+
return target;
|
|
2972
|
+
};
|
|
2973
|
+
|
|
2974
|
+
|
|
2636
2975
|
/***/ }),
|
|
2637
2976
|
|
|
2638
2977
|
/***/ "./node_modules/core-js/internals/redefine.js":
|
|
@@ -3178,6 +3517,124 @@ module.exports = {
|
|
|
3178
3517
|
};
|
|
3179
3518
|
|
|
3180
3519
|
|
|
3520
|
+
/***/ }),
|
|
3521
|
+
|
|
3522
|
+
/***/ "./node_modules/core-js/internals/task.js":
|
|
3523
|
+
/*!************************************************!*\
|
|
3524
|
+
!*** ./node_modules/core-js/internals/task.js ***!
|
|
3525
|
+
\************************************************/
|
|
3526
|
+
/*! no static exports found */
|
|
3527
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
3528
|
+
|
|
3529
|
+
var global = __webpack_require__(/*! ../internals/global */ "./node_modules/core-js/internals/global.js");
|
|
3530
|
+
var fails = __webpack_require__(/*! ../internals/fails */ "./node_modules/core-js/internals/fails.js");
|
|
3531
|
+
var bind = __webpack_require__(/*! ../internals/function-bind-context */ "./node_modules/core-js/internals/function-bind-context.js");
|
|
3532
|
+
var html = __webpack_require__(/*! ../internals/html */ "./node_modules/core-js/internals/html.js");
|
|
3533
|
+
var createElement = __webpack_require__(/*! ../internals/document-create-element */ "./node_modules/core-js/internals/document-create-element.js");
|
|
3534
|
+
var IS_IOS = __webpack_require__(/*! ../internals/engine-is-ios */ "./node_modules/core-js/internals/engine-is-ios.js");
|
|
3535
|
+
var IS_NODE = __webpack_require__(/*! ../internals/engine-is-node */ "./node_modules/core-js/internals/engine-is-node.js");
|
|
3536
|
+
|
|
3537
|
+
var location = global.location;
|
|
3538
|
+
var set = global.setImmediate;
|
|
3539
|
+
var clear = global.clearImmediate;
|
|
3540
|
+
var process = global.process;
|
|
3541
|
+
var MessageChannel = global.MessageChannel;
|
|
3542
|
+
var Dispatch = global.Dispatch;
|
|
3543
|
+
var counter = 0;
|
|
3544
|
+
var queue = {};
|
|
3545
|
+
var ONREADYSTATECHANGE = 'onreadystatechange';
|
|
3546
|
+
var defer, channel, port;
|
|
3547
|
+
|
|
3548
|
+
var run = function (id) {
|
|
3549
|
+
// eslint-disable-next-line no-prototype-builtins -- safe
|
|
3550
|
+
if (queue.hasOwnProperty(id)) {
|
|
3551
|
+
var fn = queue[id];
|
|
3552
|
+
delete queue[id];
|
|
3553
|
+
fn();
|
|
3554
|
+
}
|
|
3555
|
+
};
|
|
3556
|
+
|
|
3557
|
+
var runner = function (id) {
|
|
3558
|
+
return function () {
|
|
3559
|
+
run(id);
|
|
3560
|
+
};
|
|
3561
|
+
};
|
|
3562
|
+
|
|
3563
|
+
var listener = function (event) {
|
|
3564
|
+
run(event.data);
|
|
3565
|
+
};
|
|
3566
|
+
|
|
3567
|
+
var post = function (id) {
|
|
3568
|
+
// old engines have not location.origin
|
|
3569
|
+
global.postMessage(id + '', location.protocol + '//' + location.host);
|
|
3570
|
+
};
|
|
3571
|
+
|
|
3572
|
+
// Node.js 0.9+ & IE10+ has setImmediate, otherwise:
|
|
3573
|
+
if (!set || !clear) {
|
|
3574
|
+
set = function setImmediate(fn) {
|
|
3575
|
+
var args = [];
|
|
3576
|
+
var i = 1;
|
|
3577
|
+
while (arguments.length > i) args.push(arguments[i++]);
|
|
3578
|
+
queue[++counter] = function () {
|
|
3579
|
+
// eslint-disable-next-line no-new-func -- spec requirement
|
|
3580
|
+
(typeof fn == 'function' ? fn : Function(fn)).apply(undefined, args);
|
|
3581
|
+
};
|
|
3582
|
+
defer(counter);
|
|
3583
|
+
return counter;
|
|
3584
|
+
};
|
|
3585
|
+
clear = function clearImmediate(id) {
|
|
3586
|
+
delete queue[id];
|
|
3587
|
+
};
|
|
3588
|
+
// Node.js 0.8-
|
|
3589
|
+
if (IS_NODE) {
|
|
3590
|
+
defer = function (id) {
|
|
3591
|
+
process.nextTick(runner(id));
|
|
3592
|
+
};
|
|
3593
|
+
// Sphere (JS game engine) Dispatch API
|
|
3594
|
+
} else if (Dispatch && Dispatch.now) {
|
|
3595
|
+
defer = function (id) {
|
|
3596
|
+
Dispatch.now(runner(id));
|
|
3597
|
+
};
|
|
3598
|
+
// Browsers with MessageChannel, includes WebWorkers
|
|
3599
|
+
// except iOS - https://github.com/zloirock/core-js/issues/624
|
|
3600
|
+
} else if (MessageChannel && !IS_IOS) {
|
|
3601
|
+
channel = new MessageChannel();
|
|
3602
|
+
port = channel.port2;
|
|
3603
|
+
channel.port1.onmessage = listener;
|
|
3604
|
+
defer = bind(port.postMessage, port, 1);
|
|
3605
|
+
// Browsers with postMessage, skip WebWorkers
|
|
3606
|
+
// IE8 has postMessage, but it's sync & typeof its postMessage is 'object'
|
|
3607
|
+
} else if (
|
|
3608
|
+
global.addEventListener &&
|
|
3609
|
+
typeof postMessage == 'function' &&
|
|
3610
|
+
!global.importScripts &&
|
|
3611
|
+
location && location.protocol !== 'file:' &&
|
|
3612
|
+
!fails(post)
|
|
3613
|
+
) {
|
|
3614
|
+
defer = post;
|
|
3615
|
+
global.addEventListener('message', listener, false);
|
|
3616
|
+
// IE8-
|
|
3617
|
+
} else if (ONREADYSTATECHANGE in createElement('script')) {
|
|
3618
|
+
defer = function (id) {
|
|
3619
|
+
html.appendChild(createElement('script'))[ONREADYSTATECHANGE] = function () {
|
|
3620
|
+
html.removeChild(this);
|
|
3621
|
+
run(id);
|
|
3622
|
+
};
|
|
3623
|
+
};
|
|
3624
|
+
// Rest old browsers
|
|
3625
|
+
} else {
|
|
3626
|
+
defer = function (id) {
|
|
3627
|
+
setTimeout(runner(id), 0);
|
|
3628
|
+
};
|
|
3629
|
+
}
|
|
3630
|
+
}
|
|
3631
|
+
|
|
3632
|
+
module.exports = {
|
|
3633
|
+
set: set,
|
|
3634
|
+
clear: clear
|
|
3635
|
+
};
|
|
3636
|
+
|
|
3637
|
+
|
|
3181
3638
|
/***/ }),
|
|
3182
3639
|
|
|
3183
3640
|
/***/ "./node_modules/core-js/internals/this-number-value.js":
|
|
@@ -4725,26 +5182,430 @@ $({ global: true, forced: parseInt != parseIntImplementation }, {
|
|
|
4725
5182
|
|
|
4726
5183
|
/***/ }),
|
|
4727
5184
|
|
|
4728
|
-
/***/ "./node_modules/core-js/modules/es.
|
|
4729
|
-
|
|
4730
|
-
!*** ./node_modules/core-js/modules/es.
|
|
4731
|
-
|
|
5185
|
+
/***/ "./node_modules/core-js/modules/es.promise.js":
|
|
5186
|
+
/*!****************************************************!*\
|
|
5187
|
+
!*** ./node_modules/core-js/modules/es.promise.js ***!
|
|
5188
|
+
\****************************************************/
|
|
4732
5189
|
/*! no static exports found */
|
|
4733
5190
|
/***/ (function(module, exports, __webpack_require__) {
|
|
4734
5191
|
|
|
5192
|
+
"use strict";
|
|
5193
|
+
|
|
4735
5194
|
var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
|
|
5195
|
+
var IS_PURE = __webpack_require__(/*! ../internals/is-pure */ "./node_modules/core-js/internals/is-pure.js");
|
|
5196
|
+
var global = __webpack_require__(/*! ../internals/global */ "./node_modules/core-js/internals/global.js");
|
|
4736
5197
|
var getBuiltIn = __webpack_require__(/*! ../internals/get-built-in */ "./node_modules/core-js/internals/get-built-in.js");
|
|
4737
|
-
var
|
|
4738
|
-
var
|
|
5198
|
+
var NativePromise = __webpack_require__(/*! ../internals/native-promise-constructor */ "./node_modules/core-js/internals/native-promise-constructor.js");
|
|
5199
|
+
var redefine = __webpack_require__(/*! ../internals/redefine */ "./node_modules/core-js/internals/redefine.js");
|
|
5200
|
+
var redefineAll = __webpack_require__(/*! ../internals/redefine-all */ "./node_modules/core-js/internals/redefine-all.js");
|
|
5201
|
+
var setPrototypeOf = __webpack_require__(/*! ../internals/object-set-prototype-of */ "./node_modules/core-js/internals/object-set-prototype-of.js");
|
|
5202
|
+
var setToStringTag = __webpack_require__(/*! ../internals/set-to-string-tag */ "./node_modules/core-js/internals/set-to-string-tag.js");
|
|
5203
|
+
var setSpecies = __webpack_require__(/*! ../internals/set-species */ "./node_modules/core-js/internals/set-species.js");
|
|
4739
5204
|
var isObject = __webpack_require__(/*! ../internals/is-object */ "./node_modules/core-js/internals/is-object.js");
|
|
4740
|
-
var
|
|
4741
|
-
var
|
|
4742
|
-
var
|
|
4743
|
-
|
|
4744
|
-
var
|
|
5205
|
+
var aFunction = __webpack_require__(/*! ../internals/a-function */ "./node_modules/core-js/internals/a-function.js");
|
|
5206
|
+
var anInstance = __webpack_require__(/*! ../internals/an-instance */ "./node_modules/core-js/internals/an-instance.js");
|
|
5207
|
+
var inspectSource = __webpack_require__(/*! ../internals/inspect-source */ "./node_modules/core-js/internals/inspect-source.js");
|
|
5208
|
+
var iterate = __webpack_require__(/*! ../internals/iterate */ "./node_modules/core-js/internals/iterate.js");
|
|
5209
|
+
var checkCorrectnessOfIteration = __webpack_require__(/*! ../internals/check-correctness-of-iteration */ "./node_modules/core-js/internals/check-correctness-of-iteration.js");
|
|
5210
|
+
var speciesConstructor = __webpack_require__(/*! ../internals/species-constructor */ "./node_modules/core-js/internals/species-constructor.js");
|
|
5211
|
+
var task = __webpack_require__(/*! ../internals/task */ "./node_modules/core-js/internals/task.js").set;
|
|
5212
|
+
var microtask = __webpack_require__(/*! ../internals/microtask */ "./node_modules/core-js/internals/microtask.js");
|
|
5213
|
+
var promiseResolve = __webpack_require__(/*! ../internals/promise-resolve */ "./node_modules/core-js/internals/promise-resolve.js");
|
|
5214
|
+
var hostReportErrors = __webpack_require__(/*! ../internals/host-report-errors */ "./node_modules/core-js/internals/host-report-errors.js");
|
|
5215
|
+
var newPromiseCapabilityModule = __webpack_require__(/*! ../internals/new-promise-capability */ "./node_modules/core-js/internals/new-promise-capability.js");
|
|
5216
|
+
var perform = __webpack_require__(/*! ../internals/perform */ "./node_modules/core-js/internals/perform.js");
|
|
5217
|
+
var InternalStateModule = __webpack_require__(/*! ../internals/internal-state */ "./node_modules/core-js/internals/internal-state.js");
|
|
5218
|
+
var isForced = __webpack_require__(/*! ../internals/is-forced */ "./node_modules/core-js/internals/is-forced.js");
|
|
5219
|
+
var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "./node_modules/core-js/internals/well-known-symbol.js");
|
|
5220
|
+
var IS_BROWSER = __webpack_require__(/*! ../internals/engine-is-browser */ "./node_modules/core-js/internals/engine-is-browser.js");
|
|
5221
|
+
var IS_NODE = __webpack_require__(/*! ../internals/engine-is-node */ "./node_modules/core-js/internals/engine-is-node.js");
|
|
5222
|
+
var V8_VERSION = __webpack_require__(/*! ../internals/engine-v8-version */ "./node_modules/core-js/internals/engine-v8-version.js");
|
|
4745
5223
|
|
|
4746
|
-
|
|
4747
|
-
|
|
5224
|
+
var SPECIES = wellKnownSymbol('species');
|
|
5225
|
+
var PROMISE = 'Promise';
|
|
5226
|
+
var getInternalState = InternalStateModule.get;
|
|
5227
|
+
var setInternalState = InternalStateModule.set;
|
|
5228
|
+
var getInternalPromiseState = InternalStateModule.getterFor(PROMISE);
|
|
5229
|
+
var NativePromisePrototype = NativePromise && NativePromise.prototype;
|
|
5230
|
+
var PromiseConstructor = NativePromise;
|
|
5231
|
+
var PromiseConstructorPrototype = NativePromisePrototype;
|
|
5232
|
+
var TypeError = global.TypeError;
|
|
5233
|
+
var document = global.document;
|
|
5234
|
+
var process = global.process;
|
|
5235
|
+
var newPromiseCapability = newPromiseCapabilityModule.f;
|
|
5236
|
+
var newGenericPromiseCapability = newPromiseCapability;
|
|
5237
|
+
var DISPATCH_EVENT = !!(document && document.createEvent && global.dispatchEvent);
|
|
5238
|
+
var NATIVE_REJECTION_EVENT = typeof PromiseRejectionEvent == 'function';
|
|
5239
|
+
var UNHANDLED_REJECTION = 'unhandledrejection';
|
|
5240
|
+
var REJECTION_HANDLED = 'rejectionhandled';
|
|
5241
|
+
var PENDING = 0;
|
|
5242
|
+
var FULFILLED = 1;
|
|
5243
|
+
var REJECTED = 2;
|
|
5244
|
+
var HANDLED = 1;
|
|
5245
|
+
var UNHANDLED = 2;
|
|
5246
|
+
var SUBCLASSING = false;
|
|
5247
|
+
var Internal, OwnPromiseCapability, PromiseWrapper, nativeThen;
|
|
5248
|
+
|
|
5249
|
+
var FORCED = isForced(PROMISE, function () {
|
|
5250
|
+
var GLOBAL_CORE_JS_PROMISE = inspectSource(PromiseConstructor) !== String(PromiseConstructor);
|
|
5251
|
+
// V8 6.6 (Node 10 and Chrome 66) have a bug with resolving custom thenables
|
|
5252
|
+
// https://bugs.chromium.org/p/chromium/issues/detail?id=830565
|
|
5253
|
+
// We can't detect it synchronously, so just check versions
|
|
5254
|
+
if (!GLOBAL_CORE_JS_PROMISE && V8_VERSION === 66) return true;
|
|
5255
|
+
// We need Promise#finally in the pure version for preventing prototype pollution
|
|
5256
|
+
if (IS_PURE && !PromiseConstructorPrototype['finally']) return true;
|
|
5257
|
+
// We can't use @@species feature detection in V8 since it causes
|
|
5258
|
+
// deoptimization and performance degradation
|
|
5259
|
+
// https://github.com/zloirock/core-js/issues/679
|
|
5260
|
+
if (V8_VERSION >= 51 && /native code/.test(PromiseConstructor)) return false;
|
|
5261
|
+
// Detect correctness of subclassing with @@species support
|
|
5262
|
+
var promise = new PromiseConstructor(function (resolve) { resolve(1); });
|
|
5263
|
+
var FakePromise = function (exec) {
|
|
5264
|
+
exec(function () { /* empty */ }, function () { /* empty */ });
|
|
5265
|
+
};
|
|
5266
|
+
var constructor = promise.constructor = {};
|
|
5267
|
+
constructor[SPECIES] = FakePromise;
|
|
5268
|
+
SUBCLASSING = promise.then(function () { /* empty */ }) instanceof FakePromise;
|
|
5269
|
+
if (!SUBCLASSING) return true;
|
|
5270
|
+
// Unhandled rejections tracking support, NodeJS Promise without it fails @@species test
|
|
5271
|
+
return !GLOBAL_CORE_JS_PROMISE && IS_BROWSER && !NATIVE_REJECTION_EVENT;
|
|
5272
|
+
});
|
|
5273
|
+
|
|
5274
|
+
var INCORRECT_ITERATION = FORCED || !checkCorrectnessOfIteration(function (iterable) {
|
|
5275
|
+
PromiseConstructor.all(iterable)['catch'](function () { /* empty */ });
|
|
5276
|
+
});
|
|
5277
|
+
|
|
5278
|
+
// helpers
|
|
5279
|
+
var isThenable = function (it) {
|
|
5280
|
+
var then;
|
|
5281
|
+
return isObject(it) && typeof (then = it.then) == 'function' ? then : false;
|
|
5282
|
+
};
|
|
5283
|
+
|
|
5284
|
+
var notify = function (state, isReject) {
|
|
5285
|
+
if (state.notified) return;
|
|
5286
|
+
state.notified = true;
|
|
5287
|
+
var chain = state.reactions;
|
|
5288
|
+
microtask(function () {
|
|
5289
|
+
var value = state.value;
|
|
5290
|
+
var ok = state.state == FULFILLED;
|
|
5291
|
+
var index = 0;
|
|
5292
|
+
// variable length - can't use forEach
|
|
5293
|
+
while (chain.length > index) {
|
|
5294
|
+
var reaction = chain[index++];
|
|
5295
|
+
var handler = ok ? reaction.ok : reaction.fail;
|
|
5296
|
+
var resolve = reaction.resolve;
|
|
5297
|
+
var reject = reaction.reject;
|
|
5298
|
+
var domain = reaction.domain;
|
|
5299
|
+
var result, then, exited;
|
|
5300
|
+
try {
|
|
5301
|
+
if (handler) {
|
|
5302
|
+
if (!ok) {
|
|
5303
|
+
if (state.rejection === UNHANDLED) onHandleUnhandled(state);
|
|
5304
|
+
state.rejection = HANDLED;
|
|
5305
|
+
}
|
|
5306
|
+
if (handler === true) result = value;
|
|
5307
|
+
else {
|
|
5308
|
+
if (domain) domain.enter();
|
|
5309
|
+
result = handler(value); // can throw
|
|
5310
|
+
if (domain) {
|
|
5311
|
+
domain.exit();
|
|
5312
|
+
exited = true;
|
|
5313
|
+
}
|
|
5314
|
+
}
|
|
5315
|
+
if (result === reaction.promise) {
|
|
5316
|
+
reject(TypeError('Promise-chain cycle'));
|
|
5317
|
+
} else if (then = isThenable(result)) {
|
|
5318
|
+
then.call(result, resolve, reject);
|
|
5319
|
+
} else resolve(result);
|
|
5320
|
+
} else reject(value);
|
|
5321
|
+
} catch (error) {
|
|
5322
|
+
if (domain && !exited) domain.exit();
|
|
5323
|
+
reject(error);
|
|
5324
|
+
}
|
|
5325
|
+
}
|
|
5326
|
+
state.reactions = [];
|
|
5327
|
+
state.notified = false;
|
|
5328
|
+
if (isReject && !state.rejection) onUnhandled(state);
|
|
5329
|
+
});
|
|
5330
|
+
};
|
|
5331
|
+
|
|
5332
|
+
var dispatchEvent = function (name, promise, reason) {
|
|
5333
|
+
var event, handler;
|
|
5334
|
+
if (DISPATCH_EVENT) {
|
|
5335
|
+
event = document.createEvent('Event');
|
|
5336
|
+
event.promise = promise;
|
|
5337
|
+
event.reason = reason;
|
|
5338
|
+
event.initEvent(name, false, true);
|
|
5339
|
+
global.dispatchEvent(event);
|
|
5340
|
+
} else event = { promise: promise, reason: reason };
|
|
5341
|
+
if (!NATIVE_REJECTION_EVENT && (handler = global['on' + name])) handler(event);
|
|
5342
|
+
else if (name === UNHANDLED_REJECTION) hostReportErrors('Unhandled promise rejection', reason);
|
|
5343
|
+
};
|
|
5344
|
+
|
|
5345
|
+
var onUnhandled = function (state) {
|
|
5346
|
+
task.call(global, function () {
|
|
5347
|
+
var promise = state.facade;
|
|
5348
|
+
var value = state.value;
|
|
5349
|
+
var IS_UNHANDLED = isUnhandled(state);
|
|
5350
|
+
var result;
|
|
5351
|
+
if (IS_UNHANDLED) {
|
|
5352
|
+
result = perform(function () {
|
|
5353
|
+
if (IS_NODE) {
|
|
5354
|
+
process.emit('unhandledRejection', value, promise);
|
|
5355
|
+
} else dispatchEvent(UNHANDLED_REJECTION, promise, value);
|
|
5356
|
+
});
|
|
5357
|
+
// Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should
|
|
5358
|
+
state.rejection = IS_NODE || isUnhandled(state) ? UNHANDLED : HANDLED;
|
|
5359
|
+
if (result.error) throw result.value;
|
|
5360
|
+
}
|
|
5361
|
+
});
|
|
5362
|
+
};
|
|
5363
|
+
|
|
5364
|
+
var isUnhandled = function (state) {
|
|
5365
|
+
return state.rejection !== HANDLED && !state.parent;
|
|
5366
|
+
};
|
|
5367
|
+
|
|
5368
|
+
var onHandleUnhandled = function (state) {
|
|
5369
|
+
task.call(global, function () {
|
|
5370
|
+
var promise = state.facade;
|
|
5371
|
+
if (IS_NODE) {
|
|
5372
|
+
process.emit('rejectionHandled', promise);
|
|
5373
|
+
} else dispatchEvent(REJECTION_HANDLED, promise, state.value);
|
|
5374
|
+
});
|
|
5375
|
+
};
|
|
5376
|
+
|
|
5377
|
+
var bind = function (fn, state, unwrap) {
|
|
5378
|
+
return function (value) {
|
|
5379
|
+
fn(state, value, unwrap);
|
|
5380
|
+
};
|
|
5381
|
+
};
|
|
5382
|
+
|
|
5383
|
+
var internalReject = function (state, value, unwrap) {
|
|
5384
|
+
if (state.done) return;
|
|
5385
|
+
state.done = true;
|
|
5386
|
+
if (unwrap) state = unwrap;
|
|
5387
|
+
state.value = value;
|
|
5388
|
+
state.state = REJECTED;
|
|
5389
|
+
notify(state, true);
|
|
5390
|
+
};
|
|
5391
|
+
|
|
5392
|
+
var internalResolve = function (state, value, unwrap) {
|
|
5393
|
+
if (state.done) return;
|
|
5394
|
+
state.done = true;
|
|
5395
|
+
if (unwrap) state = unwrap;
|
|
5396
|
+
try {
|
|
5397
|
+
if (state.facade === value) throw TypeError("Promise can't be resolved itself");
|
|
5398
|
+
var then = isThenable(value);
|
|
5399
|
+
if (then) {
|
|
5400
|
+
microtask(function () {
|
|
5401
|
+
var wrapper = { done: false };
|
|
5402
|
+
try {
|
|
5403
|
+
then.call(value,
|
|
5404
|
+
bind(internalResolve, wrapper, state),
|
|
5405
|
+
bind(internalReject, wrapper, state)
|
|
5406
|
+
);
|
|
5407
|
+
} catch (error) {
|
|
5408
|
+
internalReject(wrapper, error, state);
|
|
5409
|
+
}
|
|
5410
|
+
});
|
|
5411
|
+
} else {
|
|
5412
|
+
state.value = value;
|
|
5413
|
+
state.state = FULFILLED;
|
|
5414
|
+
notify(state, false);
|
|
5415
|
+
}
|
|
5416
|
+
} catch (error) {
|
|
5417
|
+
internalReject({ done: false }, error, state);
|
|
5418
|
+
}
|
|
5419
|
+
};
|
|
5420
|
+
|
|
5421
|
+
// constructor polyfill
|
|
5422
|
+
if (FORCED) {
|
|
5423
|
+
// 25.4.3.1 Promise(executor)
|
|
5424
|
+
PromiseConstructor = function Promise(executor) {
|
|
5425
|
+
anInstance(this, PromiseConstructor, PROMISE);
|
|
5426
|
+
aFunction(executor);
|
|
5427
|
+
Internal.call(this);
|
|
5428
|
+
var state = getInternalState(this);
|
|
5429
|
+
try {
|
|
5430
|
+
executor(bind(internalResolve, state), bind(internalReject, state));
|
|
5431
|
+
} catch (error) {
|
|
5432
|
+
internalReject(state, error);
|
|
5433
|
+
}
|
|
5434
|
+
};
|
|
5435
|
+
PromiseConstructorPrototype = PromiseConstructor.prototype;
|
|
5436
|
+
// eslint-disable-next-line no-unused-vars -- required for `.length`
|
|
5437
|
+
Internal = function Promise(executor) {
|
|
5438
|
+
setInternalState(this, {
|
|
5439
|
+
type: PROMISE,
|
|
5440
|
+
done: false,
|
|
5441
|
+
notified: false,
|
|
5442
|
+
parent: false,
|
|
5443
|
+
reactions: [],
|
|
5444
|
+
rejection: false,
|
|
5445
|
+
state: PENDING,
|
|
5446
|
+
value: undefined
|
|
5447
|
+
});
|
|
5448
|
+
};
|
|
5449
|
+
Internal.prototype = redefineAll(PromiseConstructorPrototype, {
|
|
5450
|
+
// `Promise.prototype.then` method
|
|
5451
|
+
// https://tc39.es/ecma262/#sec-promise.prototype.then
|
|
5452
|
+
then: function then(onFulfilled, onRejected) {
|
|
5453
|
+
var state = getInternalPromiseState(this);
|
|
5454
|
+
var reaction = newPromiseCapability(speciesConstructor(this, PromiseConstructor));
|
|
5455
|
+
reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true;
|
|
5456
|
+
reaction.fail = typeof onRejected == 'function' && onRejected;
|
|
5457
|
+
reaction.domain = IS_NODE ? process.domain : undefined;
|
|
5458
|
+
state.parent = true;
|
|
5459
|
+
state.reactions.push(reaction);
|
|
5460
|
+
if (state.state != PENDING) notify(state, false);
|
|
5461
|
+
return reaction.promise;
|
|
5462
|
+
},
|
|
5463
|
+
// `Promise.prototype.catch` method
|
|
5464
|
+
// https://tc39.es/ecma262/#sec-promise.prototype.catch
|
|
5465
|
+
'catch': function (onRejected) {
|
|
5466
|
+
return this.then(undefined, onRejected);
|
|
5467
|
+
}
|
|
5468
|
+
});
|
|
5469
|
+
OwnPromiseCapability = function () {
|
|
5470
|
+
var promise = new Internal();
|
|
5471
|
+
var state = getInternalState(promise);
|
|
5472
|
+
this.promise = promise;
|
|
5473
|
+
this.resolve = bind(internalResolve, state);
|
|
5474
|
+
this.reject = bind(internalReject, state);
|
|
5475
|
+
};
|
|
5476
|
+
newPromiseCapabilityModule.f = newPromiseCapability = function (C) {
|
|
5477
|
+
return C === PromiseConstructor || C === PromiseWrapper
|
|
5478
|
+
? new OwnPromiseCapability(C)
|
|
5479
|
+
: newGenericPromiseCapability(C);
|
|
5480
|
+
};
|
|
5481
|
+
|
|
5482
|
+
if (!IS_PURE && typeof NativePromise == 'function' && NativePromisePrototype !== Object.prototype) {
|
|
5483
|
+
nativeThen = NativePromisePrototype.then;
|
|
5484
|
+
|
|
5485
|
+
if (!SUBCLASSING) {
|
|
5486
|
+
// make `Promise#then` return a polyfilled `Promise` for native promise-based APIs
|
|
5487
|
+
redefine(NativePromisePrototype, 'then', function then(onFulfilled, onRejected) {
|
|
5488
|
+
var that = this;
|
|
5489
|
+
return new PromiseConstructor(function (resolve, reject) {
|
|
5490
|
+
nativeThen.call(that, resolve, reject);
|
|
5491
|
+
}).then(onFulfilled, onRejected);
|
|
5492
|
+
// https://github.com/zloirock/core-js/issues/640
|
|
5493
|
+
}, { unsafe: true });
|
|
5494
|
+
|
|
5495
|
+
// makes sure that native promise-based APIs `Promise#catch` properly works with patched `Promise#then`
|
|
5496
|
+
redefine(NativePromisePrototype, 'catch', PromiseConstructorPrototype['catch'], { unsafe: true });
|
|
5497
|
+
}
|
|
5498
|
+
|
|
5499
|
+
// make `.constructor === Promise` work for native promise-based APIs
|
|
5500
|
+
try {
|
|
5501
|
+
delete NativePromisePrototype.constructor;
|
|
5502
|
+
} catch (error) { /* empty */ }
|
|
5503
|
+
|
|
5504
|
+
// make `instanceof Promise` work for native promise-based APIs
|
|
5505
|
+
if (setPrototypeOf) {
|
|
5506
|
+
setPrototypeOf(NativePromisePrototype, PromiseConstructorPrototype);
|
|
5507
|
+
}
|
|
5508
|
+
}
|
|
5509
|
+
}
|
|
5510
|
+
|
|
5511
|
+
$({ global: true, wrap: true, forced: FORCED }, {
|
|
5512
|
+
Promise: PromiseConstructor
|
|
5513
|
+
});
|
|
5514
|
+
|
|
5515
|
+
setToStringTag(PromiseConstructor, PROMISE, false, true);
|
|
5516
|
+
setSpecies(PROMISE);
|
|
5517
|
+
|
|
5518
|
+
PromiseWrapper = getBuiltIn(PROMISE);
|
|
5519
|
+
|
|
5520
|
+
// statics
|
|
5521
|
+
$({ target: PROMISE, stat: true, forced: FORCED }, {
|
|
5522
|
+
// `Promise.reject` method
|
|
5523
|
+
// https://tc39.es/ecma262/#sec-promise.reject
|
|
5524
|
+
reject: function reject(r) {
|
|
5525
|
+
var capability = newPromiseCapability(this);
|
|
5526
|
+
capability.reject.call(undefined, r);
|
|
5527
|
+
return capability.promise;
|
|
5528
|
+
}
|
|
5529
|
+
});
|
|
5530
|
+
|
|
5531
|
+
$({ target: PROMISE, stat: true, forced: IS_PURE || FORCED }, {
|
|
5532
|
+
// `Promise.resolve` method
|
|
5533
|
+
// https://tc39.es/ecma262/#sec-promise.resolve
|
|
5534
|
+
resolve: function resolve(x) {
|
|
5535
|
+
return promiseResolve(IS_PURE && this === PromiseWrapper ? PromiseConstructor : this, x);
|
|
5536
|
+
}
|
|
5537
|
+
});
|
|
5538
|
+
|
|
5539
|
+
$({ target: PROMISE, stat: true, forced: INCORRECT_ITERATION }, {
|
|
5540
|
+
// `Promise.all` method
|
|
5541
|
+
// https://tc39.es/ecma262/#sec-promise.all
|
|
5542
|
+
all: function all(iterable) {
|
|
5543
|
+
var C = this;
|
|
5544
|
+
var capability = newPromiseCapability(C);
|
|
5545
|
+
var resolve = capability.resolve;
|
|
5546
|
+
var reject = capability.reject;
|
|
5547
|
+
var result = perform(function () {
|
|
5548
|
+
var $promiseResolve = aFunction(C.resolve);
|
|
5549
|
+
var values = [];
|
|
5550
|
+
var counter = 0;
|
|
5551
|
+
var remaining = 1;
|
|
5552
|
+
iterate(iterable, function (promise) {
|
|
5553
|
+
var index = counter++;
|
|
5554
|
+
var alreadyCalled = false;
|
|
5555
|
+
values.push(undefined);
|
|
5556
|
+
remaining++;
|
|
5557
|
+
$promiseResolve.call(C, promise).then(function (value) {
|
|
5558
|
+
if (alreadyCalled) return;
|
|
5559
|
+
alreadyCalled = true;
|
|
5560
|
+
values[index] = value;
|
|
5561
|
+
--remaining || resolve(values);
|
|
5562
|
+
}, reject);
|
|
5563
|
+
});
|
|
5564
|
+
--remaining || resolve(values);
|
|
5565
|
+
});
|
|
5566
|
+
if (result.error) reject(result.value);
|
|
5567
|
+
return capability.promise;
|
|
5568
|
+
},
|
|
5569
|
+
// `Promise.race` method
|
|
5570
|
+
// https://tc39.es/ecma262/#sec-promise.race
|
|
5571
|
+
race: function race(iterable) {
|
|
5572
|
+
var C = this;
|
|
5573
|
+
var capability = newPromiseCapability(C);
|
|
5574
|
+
var reject = capability.reject;
|
|
5575
|
+
var result = perform(function () {
|
|
5576
|
+
var $promiseResolve = aFunction(C.resolve);
|
|
5577
|
+
iterate(iterable, function (promise) {
|
|
5578
|
+
$promiseResolve.call(C, promise).then(capability.resolve, reject);
|
|
5579
|
+
});
|
|
5580
|
+
});
|
|
5581
|
+
if (result.error) reject(result.value);
|
|
5582
|
+
return capability.promise;
|
|
5583
|
+
}
|
|
5584
|
+
});
|
|
5585
|
+
|
|
5586
|
+
|
|
5587
|
+
/***/ }),
|
|
5588
|
+
|
|
5589
|
+
/***/ "./node_modules/core-js/modules/es.reflect.construct.js":
|
|
5590
|
+
/*!**************************************************************!*\
|
|
5591
|
+
!*** ./node_modules/core-js/modules/es.reflect.construct.js ***!
|
|
5592
|
+
\**************************************************************/
|
|
5593
|
+
/*! no static exports found */
|
|
5594
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
5595
|
+
|
|
5596
|
+
var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
|
|
5597
|
+
var getBuiltIn = __webpack_require__(/*! ../internals/get-built-in */ "./node_modules/core-js/internals/get-built-in.js");
|
|
5598
|
+
var aFunction = __webpack_require__(/*! ../internals/a-function */ "./node_modules/core-js/internals/a-function.js");
|
|
5599
|
+
var anObject = __webpack_require__(/*! ../internals/an-object */ "./node_modules/core-js/internals/an-object.js");
|
|
5600
|
+
var isObject = __webpack_require__(/*! ../internals/is-object */ "./node_modules/core-js/internals/is-object.js");
|
|
5601
|
+
var create = __webpack_require__(/*! ../internals/object-create */ "./node_modules/core-js/internals/object-create.js");
|
|
5602
|
+
var bind = __webpack_require__(/*! ../internals/function-bind */ "./node_modules/core-js/internals/function-bind.js");
|
|
5603
|
+
var fails = __webpack_require__(/*! ../internals/fails */ "./node_modules/core-js/internals/fails.js");
|
|
5604
|
+
|
|
5605
|
+
var nativeConstruct = getBuiltIn('Reflect', 'construct');
|
|
5606
|
+
|
|
5607
|
+
// `Reflect.construct` method
|
|
5608
|
+
// https://tc39.es/ecma262/#sec-reflect.construct
|
|
4748
5609
|
// MS Edge supports only 2 arguments and argumentsList argument is optional
|
|
4749
5610
|
// FF Nightly sets third argument as `new.target`, but does not create `this` from it
|
|
4750
5611
|
var NEW_TARGET_BUG = fails(function () {
|
|
@@ -5934,6 +6795,765 @@ $({ global: true, bind: true, forced: MSIE }, {
|
|
|
5934
6795
|
});
|
|
5935
6796
|
|
|
5936
6797
|
|
|
6798
|
+
/***/ }),
|
|
6799
|
+
|
|
6800
|
+
/***/ "./node_modules/regenerator-runtime/runtime.js":
|
|
6801
|
+
/*!*****************************************************!*\
|
|
6802
|
+
!*** ./node_modules/regenerator-runtime/runtime.js ***!
|
|
6803
|
+
\*****************************************************/
|
|
6804
|
+
/*! no static exports found */
|
|
6805
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
6806
|
+
|
|
6807
|
+
/**
|
|
6808
|
+
* Copyright (c) 2014-present, Facebook, Inc.
|
|
6809
|
+
*
|
|
6810
|
+
* This source code is licensed under the MIT license found in the
|
|
6811
|
+
* LICENSE file in the root directory of this source tree.
|
|
6812
|
+
*/
|
|
6813
|
+
|
|
6814
|
+
var runtime = (function (exports) {
|
|
6815
|
+
"use strict";
|
|
6816
|
+
|
|
6817
|
+
var Op = Object.prototype;
|
|
6818
|
+
var hasOwn = Op.hasOwnProperty;
|
|
6819
|
+
var undefined; // More compressible than void 0.
|
|
6820
|
+
var $Symbol = typeof Symbol === "function" ? Symbol : {};
|
|
6821
|
+
var iteratorSymbol = $Symbol.iterator || "@@iterator";
|
|
6822
|
+
var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";
|
|
6823
|
+
var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
|
|
6824
|
+
|
|
6825
|
+
function define(obj, key, value) {
|
|
6826
|
+
Object.defineProperty(obj, key, {
|
|
6827
|
+
value: value,
|
|
6828
|
+
enumerable: true,
|
|
6829
|
+
configurable: true,
|
|
6830
|
+
writable: true
|
|
6831
|
+
});
|
|
6832
|
+
return obj[key];
|
|
6833
|
+
}
|
|
6834
|
+
try {
|
|
6835
|
+
// IE 8 has a broken Object.defineProperty that only works on DOM objects.
|
|
6836
|
+
define({}, "");
|
|
6837
|
+
} catch (err) {
|
|
6838
|
+
define = function(obj, key, value) {
|
|
6839
|
+
return obj[key] = value;
|
|
6840
|
+
};
|
|
6841
|
+
}
|
|
6842
|
+
|
|
6843
|
+
function wrap(innerFn, outerFn, self, tryLocsList) {
|
|
6844
|
+
// If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.
|
|
6845
|
+
var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;
|
|
6846
|
+
var generator = Object.create(protoGenerator.prototype);
|
|
6847
|
+
var context = new Context(tryLocsList || []);
|
|
6848
|
+
|
|
6849
|
+
// The ._invoke method unifies the implementations of the .next,
|
|
6850
|
+
// .throw, and .return methods.
|
|
6851
|
+
generator._invoke = makeInvokeMethod(innerFn, self, context);
|
|
6852
|
+
|
|
6853
|
+
return generator;
|
|
6854
|
+
}
|
|
6855
|
+
exports.wrap = wrap;
|
|
6856
|
+
|
|
6857
|
+
// Try/catch helper to minimize deoptimizations. Returns a completion
|
|
6858
|
+
// record like context.tryEntries[i].completion. This interface could
|
|
6859
|
+
// have been (and was previously) designed to take a closure to be
|
|
6860
|
+
// invoked without arguments, but in all the cases we care about we
|
|
6861
|
+
// already have an existing method we want to call, so there's no need
|
|
6862
|
+
// to create a new function object. We can even get away with assuming
|
|
6863
|
+
// the method takes exactly one argument, since that happens to be true
|
|
6864
|
+
// in every case, so we don't have to touch the arguments object. The
|
|
6865
|
+
// only additional allocation required is the completion record, which
|
|
6866
|
+
// has a stable shape and so hopefully should be cheap to allocate.
|
|
6867
|
+
function tryCatch(fn, obj, arg) {
|
|
6868
|
+
try {
|
|
6869
|
+
return { type: "normal", arg: fn.call(obj, arg) };
|
|
6870
|
+
} catch (err) {
|
|
6871
|
+
return { type: "throw", arg: err };
|
|
6872
|
+
}
|
|
6873
|
+
}
|
|
6874
|
+
|
|
6875
|
+
var GenStateSuspendedStart = "suspendedStart";
|
|
6876
|
+
var GenStateSuspendedYield = "suspendedYield";
|
|
6877
|
+
var GenStateExecuting = "executing";
|
|
6878
|
+
var GenStateCompleted = "completed";
|
|
6879
|
+
|
|
6880
|
+
// Returning this object from the innerFn has the same effect as
|
|
6881
|
+
// breaking out of the dispatch switch statement.
|
|
6882
|
+
var ContinueSentinel = {};
|
|
6883
|
+
|
|
6884
|
+
// Dummy constructor functions that we use as the .constructor and
|
|
6885
|
+
// .constructor.prototype properties for functions that return Generator
|
|
6886
|
+
// objects. For full spec compliance, you may wish to configure your
|
|
6887
|
+
// minifier not to mangle the names of these two functions.
|
|
6888
|
+
function Generator() {}
|
|
6889
|
+
function GeneratorFunction() {}
|
|
6890
|
+
function GeneratorFunctionPrototype() {}
|
|
6891
|
+
|
|
6892
|
+
// This is a polyfill for %IteratorPrototype% for environments that
|
|
6893
|
+
// don't natively support it.
|
|
6894
|
+
var IteratorPrototype = {};
|
|
6895
|
+
IteratorPrototype[iteratorSymbol] = function () {
|
|
6896
|
+
return this;
|
|
6897
|
+
};
|
|
6898
|
+
|
|
6899
|
+
var getProto = Object.getPrototypeOf;
|
|
6900
|
+
var NativeIteratorPrototype = getProto && getProto(getProto(values([])));
|
|
6901
|
+
if (NativeIteratorPrototype &&
|
|
6902
|
+
NativeIteratorPrototype !== Op &&
|
|
6903
|
+
hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {
|
|
6904
|
+
// This environment has a native %IteratorPrototype%; use it instead
|
|
6905
|
+
// of the polyfill.
|
|
6906
|
+
IteratorPrototype = NativeIteratorPrototype;
|
|
6907
|
+
}
|
|
6908
|
+
|
|
6909
|
+
var Gp = GeneratorFunctionPrototype.prototype =
|
|
6910
|
+
Generator.prototype = Object.create(IteratorPrototype);
|
|
6911
|
+
GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;
|
|
6912
|
+
GeneratorFunctionPrototype.constructor = GeneratorFunction;
|
|
6913
|
+
GeneratorFunction.displayName = define(
|
|
6914
|
+
GeneratorFunctionPrototype,
|
|
6915
|
+
toStringTagSymbol,
|
|
6916
|
+
"GeneratorFunction"
|
|
6917
|
+
);
|
|
6918
|
+
|
|
6919
|
+
// Helper for defining the .next, .throw, and .return methods of the
|
|
6920
|
+
// Iterator interface in terms of a single ._invoke method.
|
|
6921
|
+
function defineIteratorMethods(prototype) {
|
|
6922
|
+
["next", "throw", "return"].forEach(function(method) {
|
|
6923
|
+
define(prototype, method, function(arg) {
|
|
6924
|
+
return this._invoke(method, arg);
|
|
6925
|
+
});
|
|
6926
|
+
});
|
|
6927
|
+
}
|
|
6928
|
+
|
|
6929
|
+
exports.isGeneratorFunction = function(genFun) {
|
|
6930
|
+
var ctor = typeof genFun === "function" && genFun.constructor;
|
|
6931
|
+
return ctor
|
|
6932
|
+
? ctor === GeneratorFunction ||
|
|
6933
|
+
// For the native GeneratorFunction constructor, the best we can
|
|
6934
|
+
// do is to check its .name property.
|
|
6935
|
+
(ctor.displayName || ctor.name) === "GeneratorFunction"
|
|
6936
|
+
: false;
|
|
6937
|
+
};
|
|
6938
|
+
|
|
6939
|
+
exports.mark = function(genFun) {
|
|
6940
|
+
if (Object.setPrototypeOf) {
|
|
6941
|
+
Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
|
|
6942
|
+
} else {
|
|
6943
|
+
genFun.__proto__ = GeneratorFunctionPrototype;
|
|
6944
|
+
define(genFun, toStringTagSymbol, "GeneratorFunction");
|
|
6945
|
+
}
|
|
6946
|
+
genFun.prototype = Object.create(Gp);
|
|
6947
|
+
return genFun;
|
|
6948
|
+
};
|
|
6949
|
+
|
|
6950
|
+
// Within the body of any async function, `await x` is transformed to
|
|
6951
|
+
// `yield regeneratorRuntime.awrap(x)`, so that the runtime can test
|
|
6952
|
+
// `hasOwn.call(value, "__await")` to determine if the yielded value is
|
|
6953
|
+
// meant to be awaited.
|
|
6954
|
+
exports.awrap = function(arg) {
|
|
6955
|
+
return { __await: arg };
|
|
6956
|
+
};
|
|
6957
|
+
|
|
6958
|
+
function AsyncIterator(generator, PromiseImpl) {
|
|
6959
|
+
function invoke(method, arg, resolve, reject) {
|
|
6960
|
+
var record = tryCatch(generator[method], generator, arg);
|
|
6961
|
+
if (record.type === "throw") {
|
|
6962
|
+
reject(record.arg);
|
|
6963
|
+
} else {
|
|
6964
|
+
var result = record.arg;
|
|
6965
|
+
var value = result.value;
|
|
6966
|
+
if (value &&
|
|
6967
|
+
typeof value === "object" &&
|
|
6968
|
+
hasOwn.call(value, "__await")) {
|
|
6969
|
+
return PromiseImpl.resolve(value.__await).then(function(value) {
|
|
6970
|
+
invoke("next", value, resolve, reject);
|
|
6971
|
+
}, function(err) {
|
|
6972
|
+
invoke("throw", err, resolve, reject);
|
|
6973
|
+
});
|
|
6974
|
+
}
|
|
6975
|
+
|
|
6976
|
+
return PromiseImpl.resolve(value).then(function(unwrapped) {
|
|
6977
|
+
// When a yielded Promise is resolved, its final value becomes
|
|
6978
|
+
// the .value of the Promise<{value,done}> result for the
|
|
6979
|
+
// current iteration.
|
|
6980
|
+
result.value = unwrapped;
|
|
6981
|
+
resolve(result);
|
|
6982
|
+
}, function(error) {
|
|
6983
|
+
// If a rejected Promise was yielded, throw the rejection back
|
|
6984
|
+
// into the async generator function so it can be handled there.
|
|
6985
|
+
return invoke("throw", error, resolve, reject);
|
|
6986
|
+
});
|
|
6987
|
+
}
|
|
6988
|
+
}
|
|
6989
|
+
|
|
6990
|
+
var previousPromise;
|
|
6991
|
+
|
|
6992
|
+
function enqueue(method, arg) {
|
|
6993
|
+
function callInvokeWithMethodAndArg() {
|
|
6994
|
+
return new PromiseImpl(function(resolve, reject) {
|
|
6995
|
+
invoke(method, arg, resolve, reject);
|
|
6996
|
+
});
|
|
6997
|
+
}
|
|
6998
|
+
|
|
6999
|
+
return previousPromise =
|
|
7000
|
+
// If enqueue has been called before, then we want to wait until
|
|
7001
|
+
// all previous Promises have been resolved before calling invoke,
|
|
7002
|
+
// so that results are always delivered in the correct order. If
|
|
7003
|
+
// enqueue has not been called before, then it is important to
|
|
7004
|
+
// call invoke immediately, without waiting on a callback to fire,
|
|
7005
|
+
// so that the async generator function has the opportunity to do
|
|
7006
|
+
// any necessary setup in a predictable way. This predictability
|
|
7007
|
+
// is why the Promise constructor synchronously invokes its
|
|
7008
|
+
// executor callback, and why async functions synchronously
|
|
7009
|
+
// execute code before the first await. Since we implement simple
|
|
7010
|
+
// async functions in terms of async generators, it is especially
|
|
7011
|
+
// important to get this right, even though it requires care.
|
|
7012
|
+
previousPromise ? previousPromise.then(
|
|
7013
|
+
callInvokeWithMethodAndArg,
|
|
7014
|
+
// Avoid propagating failures to Promises returned by later
|
|
7015
|
+
// invocations of the iterator.
|
|
7016
|
+
callInvokeWithMethodAndArg
|
|
7017
|
+
) : callInvokeWithMethodAndArg();
|
|
7018
|
+
}
|
|
7019
|
+
|
|
7020
|
+
// Define the unified helper method that is used to implement .next,
|
|
7021
|
+
// .throw, and .return (see defineIteratorMethods).
|
|
7022
|
+
this._invoke = enqueue;
|
|
7023
|
+
}
|
|
7024
|
+
|
|
7025
|
+
defineIteratorMethods(AsyncIterator.prototype);
|
|
7026
|
+
AsyncIterator.prototype[asyncIteratorSymbol] = function () {
|
|
7027
|
+
return this;
|
|
7028
|
+
};
|
|
7029
|
+
exports.AsyncIterator = AsyncIterator;
|
|
7030
|
+
|
|
7031
|
+
// Note that simple async functions are implemented on top of
|
|
7032
|
+
// AsyncIterator objects; they just return a Promise for the value of
|
|
7033
|
+
// the final result produced by the iterator.
|
|
7034
|
+
exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {
|
|
7035
|
+
if (PromiseImpl === void 0) PromiseImpl = Promise;
|
|
7036
|
+
|
|
7037
|
+
var iter = new AsyncIterator(
|
|
7038
|
+
wrap(innerFn, outerFn, self, tryLocsList),
|
|
7039
|
+
PromiseImpl
|
|
7040
|
+
);
|
|
7041
|
+
|
|
7042
|
+
return exports.isGeneratorFunction(outerFn)
|
|
7043
|
+
? iter // If outerFn is a generator, return the full iterator.
|
|
7044
|
+
: iter.next().then(function(result) {
|
|
7045
|
+
return result.done ? result.value : iter.next();
|
|
7046
|
+
});
|
|
7047
|
+
};
|
|
7048
|
+
|
|
7049
|
+
function makeInvokeMethod(innerFn, self, context) {
|
|
7050
|
+
var state = GenStateSuspendedStart;
|
|
7051
|
+
|
|
7052
|
+
return function invoke(method, arg) {
|
|
7053
|
+
if (state === GenStateExecuting) {
|
|
7054
|
+
throw new Error("Generator is already running");
|
|
7055
|
+
}
|
|
7056
|
+
|
|
7057
|
+
if (state === GenStateCompleted) {
|
|
7058
|
+
if (method === "throw") {
|
|
7059
|
+
throw arg;
|
|
7060
|
+
}
|
|
7061
|
+
|
|
7062
|
+
// Be forgiving, per 25.3.3.3.3 of the spec:
|
|
7063
|
+
// https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume
|
|
7064
|
+
return doneResult();
|
|
7065
|
+
}
|
|
7066
|
+
|
|
7067
|
+
context.method = method;
|
|
7068
|
+
context.arg = arg;
|
|
7069
|
+
|
|
7070
|
+
while (true) {
|
|
7071
|
+
var delegate = context.delegate;
|
|
7072
|
+
if (delegate) {
|
|
7073
|
+
var delegateResult = maybeInvokeDelegate(delegate, context);
|
|
7074
|
+
if (delegateResult) {
|
|
7075
|
+
if (delegateResult === ContinueSentinel) continue;
|
|
7076
|
+
return delegateResult;
|
|
7077
|
+
}
|
|
7078
|
+
}
|
|
7079
|
+
|
|
7080
|
+
if (context.method === "next") {
|
|
7081
|
+
// Setting context._sent for legacy support of Babel's
|
|
7082
|
+
// function.sent implementation.
|
|
7083
|
+
context.sent = context._sent = context.arg;
|
|
7084
|
+
|
|
7085
|
+
} else if (context.method === "throw") {
|
|
7086
|
+
if (state === GenStateSuspendedStart) {
|
|
7087
|
+
state = GenStateCompleted;
|
|
7088
|
+
throw context.arg;
|
|
7089
|
+
}
|
|
7090
|
+
|
|
7091
|
+
context.dispatchException(context.arg);
|
|
7092
|
+
|
|
7093
|
+
} else if (context.method === "return") {
|
|
7094
|
+
context.abrupt("return", context.arg);
|
|
7095
|
+
}
|
|
7096
|
+
|
|
7097
|
+
state = GenStateExecuting;
|
|
7098
|
+
|
|
7099
|
+
var record = tryCatch(innerFn, self, context);
|
|
7100
|
+
if (record.type === "normal") {
|
|
7101
|
+
// If an exception is thrown from innerFn, we leave state ===
|
|
7102
|
+
// GenStateExecuting and loop back for another invocation.
|
|
7103
|
+
state = context.done
|
|
7104
|
+
? GenStateCompleted
|
|
7105
|
+
: GenStateSuspendedYield;
|
|
7106
|
+
|
|
7107
|
+
if (record.arg === ContinueSentinel) {
|
|
7108
|
+
continue;
|
|
7109
|
+
}
|
|
7110
|
+
|
|
7111
|
+
return {
|
|
7112
|
+
value: record.arg,
|
|
7113
|
+
done: context.done
|
|
7114
|
+
};
|
|
7115
|
+
|
|
7116
|
+
} else if (record.type === "throw") {
|
|
7117
|
+
state = GenStateCompleted;
|
|
7118
|
+
// Dispatch the exception by looping back around to the
|
|
7119
|
+
// context.dispatchException(context.arg) call above.
|
|
7120
|
+
context.method = "throw";
|
|
7121
|
+
context.arg = record.arg;
|
|
7122
|
+
}
|
|
7123
|
+
}
|
|
7124
|
+
};
|
|
7125
|
+
}
|
|
7126
|
+
|
|
7127
|
+
// Call delegate.iterator[context.method](context.arg) and handle the
|
|
7128
|
+
// result, either by returning a { value, done } result from the
|
|
7129
|
+
// delegate iterator, or by modifying context.method and context.arg,
|
|
7130
|
+
// setting context.delegate to null, and returning the ContinueSentinel.
|
|
7131
|
+
function maybeInvokeDelegate(delegate, context) {
|
|
7132
|
+
var method = delegate.iterator[context.method];
|
|
7133
|
+
if (method === undefined) {
|
|
7134
|
+
// A .throw or .return when the delegate iterator has no .throw
|
|
7135
|
+
// method always terminates the yield* loop.
|
|
7136
|
+
context.delegate = null;
|
|
7137
|
+
|
|
7138
|
+
if (context.method === "throw") {
|
|
7139
|
+
// Note: ["return"] must be used for ES3 parsing compatibility.
|
|
7140
|
+
if (delegate.iterator["return"]) {
|
|
7141
|
+
// If the delegate iterator has a return method, give it a
|
|
7142
|
+
// chance to clean up.
|
|
7143
|
+
context.method = "return";
|
|
7144
|
+
context.arg = undefined;
|
|
7145
|
+
maybeInvokeDelegate(delegate, context);
|
|
7146
|
+
|
|
7147
|
+
if (context.method === "throw") {
|
|
7148
|
+
// If maybeInvokeDelegate(context) changed context.method from
|
|
7149
|
+
// "return" to "throw", let that override the TypeError below.
|
|
7150
|
+
return ContinueSentinel;
|
|
7151
|
+
}
|
|
7152
|
+
}
|
|
7153
|
+
|
|
7154
|
+
context.method = "throw";
|
|
7155
|
+
context.arg = new TypeError(
|
|
7156
|
+
"The iterator does not provide a 'throw' method");
|
|
7157
|
+
}
|
|
7158
|
+
|
|
7159
|
+
return ContinueSentinel;
|
|
7160
|
+
}
|
|
7161
|
+
|
|
7162
|
+
var record = tryCatch(method, delegate.iterator, context.arg);
|
|
7163
|
+
|
|
7164
|
+
if (record.type === "throw") {
|
|
7165
|
+
context.method = "throw";
|
|
7166
|
+
context.arg = record.arg;
|
|
7167
|
+
context.delegate = null;
|
|
7168
|
+
return ContinueSentinel;
|
|
7169
|
+
}
|
|
7170
|
+
|
|
7171
|
+
var info = record.arg;
|
|
7172
|
+
|
|
7173
|
+
if (! info) {
|
|
7174
|
+
context.method = "throw";
|
|
7175
|
+
context.arg = new TypeError("iterator result is not an object");
|
|
7176
|
+
context.delegate = null;
|
|
7177
|
+
return ContinueSentinel;
|
|
7178
|
+
}
|
|
7179
|
+
|
|
7180
|
+
if (info.done) {
|
|
7181
|
+
// Assign the result of the finished delegate to the temporary
|
|
7182
|
+
// variable specified by delegate.resultName (see delegateYield).
|
|
7183
|
+
context[delegate.resultName] = info.value;
|
|
7184
|
+
|
|
7185
|
+
// Resume execution at the desired location (see delegateYield).
|
|
7186
|
+
context.next = delegate.nextLoc;
|
|
7187
|
+
|
|
7188
|
+
// If context.method was "throw" but the delegate handled the
|
|
7189
|
+
// exception, let the outer generator proceed normally. If
|
|
7190
|
+
// context.method was "next", forget context.arg since it has been
|
|
7191
|
+
// "consumed" by the delegate iterator. If context.method was
|
|
7192
|
+
// "return", allow the original .return call to continue in the
|
|
7193
|
+
// outer generator.
|
|
7194
|
+
if (context.method !== "return") {
|
|
7195
|
+
context.method = "next";
|
|
7196
|
+
context.arg = undefined;
|
|
7197
|
+
}
|
|
7198
|
+
|
|
7199
|
+
} else {
|
|
7200
|
+
// Re-yield the result returned by the delegate method.
|
|
7201
|
+
return info;
|
|
7202
|
+
}
|
|
7203
|
+
|
|
7204
|
+
// The delegate iterator is finished, so forget it and continue with
|
|
7205
|
+
// the outer generator.
|
|
7206
|
+
context.delegate = null;
|
|
7207
|
+
return ContinueSentinel;
|
|
7208
|
+
}
|
|
7209
|
+
|
|
7210
|
+
// Define Generator.prototype.{next,throw,return} in terms of the
|
|
7211
|
+
// unified ._invoke helper method.
|
|
7212
|
+
defineIteratorMethods(Gp);
|
|
7213
|
+
|
|
7214
|
+
define(Gp, toStringTagSymbol, "Generator");
|
|
7215
|
+
|
|
7216
|
+
// A Generator should always return itself as the iterator object when the
|
|
7217
|
+
// @@iterator function is called on it. Some browsers' implementations of the
|
|
7218
|
+
// iterator prototype chain incorrectly implement this, causing the Generator
|
|
7219
|
+
// object to not be returned from this call. This ensures that doesn't happen.
|
|
7220
|
+
// See https://github.com/facebook/regenerator/issues/274 for more details.
|
|
7221
|
+
Gp[iteratorSymbol] = function() {
|
|
7222
|
+
return this;
|
|
7223
|
+
};
|
|
7224
|
+
|
|
7225
|
+
Gp.toString = function() {
|
|
7226
|
+
return "[object Generator]";
|
|
7227
|
+
};
|
|
7228
|
+
|
|
7229
|
+
function pushTryEntry(locs) {
|
|
7230
|
+
var entry = { tryLoc: locs[0] };
|
|
7231
|
+
|
|
7232
|
+
if (1 in locs) {
|
|
7233
|
+
entry.catchLoc = locs[1];
|
|
7234
|
+
}
|
|
7235
|
+
|
|
7236
|
+
if (2 in locs) {
|
|
7237
|
+
entry.finallyLoc = locs[2];
|
|
7238
|
+
entry.afterLoc = locs[3];
|
|
7239
|
+
}
|
|
7240
|
+
|
|
7241
|
+
this.tryEntries.push(entry);
|
|
7242
|
+
}
|
|
7243
|
+
|
|
7244
|
+
function resetTryEntry(entry) {
|
|
7245
|
+
var record = entry.completion || {};
|
|
7246
|
+
record.type = "normal";
|
|
7247
|
+
delete record.arg;
|
|
7248
|
+
entry.completion = record;
|
|
7249
|
+
}
|
|
7250
|
+
|
|
7251
|
+
function Context(tryLocsList) {
|
|
7252
|
+
// The root entry object (effectively a try statement without a catch
|
|
7253
|
+
// or a finally block) gives us a place to store values thrown from
|
|
7254
|
+
// locations where there is no enclosing try statement.
|
|
7255
|
+
this.tryEntries = [{ tryLoc: "root" }];
|
|
7256
|
+
tryLocsList.forEach(pushTryEntry, this);
|
|
7257
|
+
this.reset(true);
|
|
7258
|
+
}
|
|
7259
|
+
|
|
7260
|
+
exports.keys = function(object) {
|
|
7261
|
+
var keys = [];
|
|
7262
|
+
for (var key in object) {
|
|
7263
|
+
keys.push(key);
|
|
7264
|
+
}
|
|
7265
|
+
keys.reverse();
|
|
7266
|
+
|
|
7267
|
+
// Rather than returning an object with a next method, we keep
|
|
7268
|
+
// things simple and return the next function itself.
|
|
7269
|
+
return function next() {
|
|
7270
|
+
while (keys.length) {
|
|
7271
|
+
var key = keys.pop();
|
|
7272
|
+
if (key in object) {
|
|
7273
|
+
next.value = key;
|
|
7274
|
+
next.done = false;
|
|
7275
|
+
return next;
|
|
7276
|
+
}
|
|
7277
|
+
}
|
|
7278
|
+
|
|
7279
|
+
// To avoid creating an additional object, we just hang the .value
|
|
7280
|
+
// and .done properties off the next function object itself. This
|
|
7281
|
+
// also ensures that the minifier will not anonymize the function.
|
|
7282
|
+
next.done = true;
|
|
7283
|
+
return next;
|
|
7284
|
+
};
|
|
7285
|
+
};
|
|
7286
|
+
|
|
7287
|
+
function values(iterable) {
|
|
7288
|
+
if (iterable) {
|
|
7289
|
+
var iteratorMethod = iterable[iteratorSymbol];
|
|
7290
|
+
if (iteratorMethod) {
|
|
7291
|
+
return iteratorMethod.call(iterable);
|
|
7292
|
+
}
|
|
7293
|
+
|
|
7294
|
+
if (typeof iterable.next === "function") {
|
|
7295
|
+
return iterable;
|
|
7296
|
+
}
|
|
7297
|
+
|
|
7298
|
+
if (!isNaN(iterable.length)) {
|
|
7299
|
+
var i = -1, next = function next() {
|
|
7300
|
+
while (++i < iterable.length) {
|
|
7301
|
+
if (hasOwn.call(iterable, i)) {
|
|
7302
|
+
next.value = iterable[i];
|
|
7303
|
+
next.done = false;
|
|
7304
|
+
return next;
|
|
7305
|
+
}
|
|
7306
|
+
}
|
|
7307
|
+
|
|
7308
|
+
next.value = undefined;
|
|
7309
|
+
next.done = true;
|
|
7310
|
+
|
|
7311
|
+
return next;
|
|
7312
|
+
};
|
|
7313
|
+
|
|
7314
|
+
return next.next = next;
|
|
7315
|
+
}
|
|
7316
|
+
}
|
|
7317
|
+
|
|
7318
|
+
// Return an iterator with no values.
|
|
7319
|
+
return { next: doneResult };
|
|
7320
|
+
}
|
|
7321
|
+
exports.values = values;
|
|
7322
|
+
|
|
7323
|
+
function doneResult() {
|
|
7324
|
+
return { value: undefined, done: true };
|
|
7325
|
+
}
|
|
7326
|
+
|
|
7327
|
+
Context.prototype = {
|
|
7328
|
+
constructor: Context,
|
|
7329
|
+
|
|
7330
|
+
reset: function(skipTempReset) {
|
|
7331
|
+
this.prev = 0;
|
|
7332
|
+
this.next = 0;
|
|
7333
|
+
// Resetting context._sent for legacy support of Babel's
|
|
7334
|
+
// function.sent implementation.
|
|
7335
|
+
this.sent = this._sent = undefined;
|
|
7336
|
+
this.done = false;
|
|
7337
|
+
this.delegate = null;
|
|
7338
|
+
|
|
7339
|
+
this.method = "next";
|
|
7340
|
+
this.arg = undefined;
|
|
7341
|
+
|
|
7342
|
+
this.tryEntries.forEach(resetTryEntry);
|
|
7343
|
+
|
|
7344
|
+
if (!skipTempReset) {
|
|
7345
|
+
for (var name in this) {
|
|
7346
|
+
// Not sure about the optimal order of these conditions:
|
|
7347
|
+
if (name.charAt(0) === "t" &&
|
|
7348
|
+
hasOwn.call(this, name) &&
|
|
7349
|
+
!isNaN(+name.slice(1))) {
|
|
7350
|
+
this[name] = undefined;
|
|
7351
|
+
}
|
|
7352
|
+
}
|
|
7353
|
+
}
|
|
7354
|
+
},
|
|
7355
|
+
|
|
7356
|
+
stop: function() {
|
|
7357
|
+
this.done = true;
|
|
7358
|
+
|
|
7359
|
+
var rootEntry = this.tryEntries[0];
|
|
7360
|
+
var rootRecord = rootEntry.completion;
|
|
7361
|
+
if (rootRecord.type === "throw") {
|
|
7362
|
+
throw rootRecord.arg;
|
|
7363
|
+
}
|
|
7364
|
+
|
|
7365
|
+
return this.rval;
|
|
7366
|
+
},
|
|
7367
|
+
|
|
7368
|
+
dispatchException: function(exception) {
|
|
7369
|
+
if (this.done) {
|
|
7370
|
+
throw exception;
|
|
7371
|
+
}
|
|
7372
|
+
|
|
7373
|
+
var context = this;
|
|
7374
|
+
function handle(loc, caught) {
|
|
7375
|
+
record.type = "throw";
|
|
7376
|
+
record.arg = exception;
|
|
7377
|
+
context.next = loc;
|
|
7378
|
+
|
|
7379
|
+
if (caught) {
|
|
7380
|
+
// If the dispatched exception was caught by a catch block,
|
|
7381
|
+
// then let that catch block handle the exception normally.
|
|
7382
|
+
context.method = "next";
|
|
7383
|
+
context.arg = undefined;
|
|
7384
|
+
}
|
|
7385
|
+
|
|
7386
|
+
return !! caught;
|
|
7387
|
+
}
|
|
7388
|
+
|
|
7389
|
+
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
7390
|
+
var entry = this.tryEntries[i];
|
|
7391
|
+
var record = entry.completion;
|
|
7392
|
+
|
|
7393
|
+
if (entry.tryLoc === "root") {
|
|
7394
|
+
// Exception thrown outside of any try block that could handle
|
|
7395
|
+
// it, so set the completion value of the entire function to
|
|
7396
|
+
// throw the exception.
|
|
7397
|
+
return handle("end");
|
|
7398
|
+
}
|
|
7399
|
+
|
|
7400
|
+
if (entry.tryLoc <= this.prev) {
|
|
7401
|
+
var hasCatch = hasOwn.call(entry, "catchLoc");
|
|
7402
|
+
var hasFinally = hasOwn.call(entry, "finallyLoc");
|
|
7403
|
+
|
|
7404
|
+
if (hasCatch && hasFinally) {
|
|
7405
|
+
if (this.prev < entry.catchLoc) {
|
|
7406
|
+
return handle(entry.catchLoc, true);
|
|
7407
|
+
} else if (this.prev < entry.finallyLoc) {
|
|
7408
|
+
return handle(entry.finallyLoc);
|
|
7409
|
+
}
|
|
7410
|
+
|
|
7411
|
+
} else if (hasCatch) {
|
|
7412
|
+
if (this.prev < entry.catchLoc) {
|
|
7413
|
+
return handle(entry.catchLoc, true);
|
|
7414
|
+
}
|
|
7415
|
+
|
|
7416
|
+
} else if (hasFinally) {
|
|
7417
|
+
if (this.prev < entry.finallyLoc) {
|
|
7418
|
+
return handle(entry.finallyLoc);
|
|
7419
|
+
}
|
|
7420
|
+
|
|
7421
|
+
} else {
|
|
7422
|
+
throw new Error("try statement without catch or finally");
|
|
7423
|
+
}
|
|
7424
|
+
}
|
|
7425
|
+
}
|
|
7426
|
+
},
|
|
7427
|
+
|
|
7428
|
+
abrupt: function(type, arg) {
|
|
7429
|
+
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
7430
|
+
var entry = this.tryEntries[i];
|
|
7431
|
+
if (entry.tryLoc <= this.prev &&
|
|
7432
|
+
hasOwn.call(entry, "finallyLoc") &&
|
|
7433
|
+
this.prev < entry.finallyLoc) {
|
|
7434
|
+
var finallyEntry = entry;
|
|
7435
|
+
break;
|
|
7436
|
+
}
|
|
7437
|
+
}
|
|
7438
|
+
|
|
7439
|
+
if (finallyEntry &&
|
|
7440
|
+
(type === "break" ||
|
|
7441
|
+
type === "continue") &&
|
|
7442
|
+
finallyEntry.tryLoc <= arg &&
|
|
7443
|
+
arg <= finallyEntry.finallyLoc) {
|
|
7444
|
+
// Ignore the finally entry if control is not jumping to a
|
|
7445
|
+
// location outside the try/catch block.
|
|
7446
|
+
finallyEntry = null;
|
|
7447
|
+
}
|
|
7448
|
+
|
|
7449
|
+
var record = finallyEntry ? finallyEntry.completion : {};
|
|
7450
|
+
record.type = type;
|
|
7451
|
+
record.arg = arg;
|
|
7452
|
+
|
|
7453
|
+
if (finallyEntry) {
|
|
7454
|
+
this.method = "next";
|
|
7455
|
+
this.next = finallyEntry.finallyLoc;
|
|
7456
|
+
return ContinueSentinel;
|
|
7457
|
+
}
|
|
7458
|
+
|
|
7459
|
+
return this.complete(record);
|
|
7460
|
+
},
|
|
7461
|
+
|
|
7462
|
+
complete: function(record, afterLoc) {
|
|
7463
|
+
if (record.type === "throw") {
|
|
7464
|
+
throw record.arg;
|
|
7465
|
+
}
|
|
7466
|
+
|
|
7467
|
+
if (record.type === "break" ||
|
|
7468
|
+
record.type === "continue") {
|
|
7469
|
+
this.next = record.arg;
|
|
7470
|
+
} else if (record.type === "return") {
|
|
7471
|
+
this.rval = this.arg = record.arg;
|
|
7472
|
+
this.method = "return";
|
|
7473
|
+
this.next = "end";
|
|
7474
|
+
} else if (record.type === "normal" && afterLoc) {
|
|
7475
|
+
this.next = afterLoc;
|
|
7476
|
+
}
|
|
7477
|
+
|
|
7478
|
+
return ContinueSentinel;
|
|
7479
|
+
},
|
|
7480
|
+
|
|
7481
|
+
finish: function(finallyLoc) {
|
|
7482
|
+
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
7483
|
+
var entry = this.tryEntries[i];
|
|
7484
|
+
if (entry.finallyLoc === finallyLoc) {
|
|
7485
|
+
this.complete(entry.completion, entry.afterLoc);
|
|
7486
|
+
resetTryEntry(entry);
|
|
7487
|
+
return ContinueSentinel;
|
|
7488
|
+
}
|
|
7489
|
+
}
|
|
7490
|
+
},
|
|
7491
|
+
|
|
7492
|
+
"catch": function(tryLoc) {
|
|
7493
|
+
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
7494
|
+
var entry = this.tryEntries[i];
|
|
7495
|
+
if (entry.tryLoc === tryLoc) {
|
|
7496
|
+
var record = entry.completion;
|
|
7497
|
+
if (record.type === "throw") {
|
|
7498
|
+
var thrown = record.arg;
|
|
7499
|
+
resetTryEntry(entry);
|
|
7500
|
+
}
|
|
7501
|
+
return thrown;
|
|
7502
|
+
}
|
|
7503
|
+
}
|
|
7504
|
+
|
|
7505
|
+
// The context.catch method must only be called with a location
|
|
7506
|
+
// argument that corresponds to a known catch block.
|
|
7507
|
+
throw new Error("illegal catch attempt");
|
|
7508
|
+
},
|
|
7509
|
+
|
|
7510
|
+
delegateYield: function(iterable, resultName, nextLoc) {
|
|
7511
|
+
this.delegate = {
|
|
7512
|
+
iterator: values(iterable),
|
|
7513
|
+
resultName: resultName,
|
|
7514
|
+
nextLoc: nextLoc
|
|
7515
|
+
};
|
|
7516
|
+
|
|
7517
|
+
if (this.method === "next") {
|
|
7518
|
+
// Deliberately forget the last sent value so that we don't
|
|
7519
|
+
// accidentally pass it on to the delegate.
|
|
7520
|
+
this.arg = undefined;
|
|
7521
|
+
}
|
|
7522
|
+
|
|
7523
|
+
return ContinueSentinel;
|
|
7524
|
+
}
|
|
7525
|
+
};
|
|
7526
|
+
|
|
7527
|
+
// Regardless of whether this script is executing as a CommonJS module
|
|
7528
|
+
// or not, return the runtime object so that we can declare the variable
|
|
7529
|
+
// regeneratorRuntime in the outer scope, which allows this module to be
|
|
7530
|
+
// injected easily by `bin/regenerator --include-runtime script.js`.
|
|
7531
|
+
return exports;
|
|
7532
|
+
|
|
7533
|
+
}(
|
|
7534
|
+
// If this script is executing as a CommonJS module, use module.exports
|
|
7535
|
+
// as the regeneratorRuntime namespace. Otherwise create a new empty
|
|
7536
|
+
// object. Either way, the resulting object will be used to initialize
|
|
7537
|
+
// the regeneratorRuntime variable at the top of this file.
|
|
7538
|
+
true ? module.exports : undefined
|
|
7539
|
+
));
|
|
7540
|
+
|
|
7541
|
+
try {
|
|
7542
|
+
regeneratorRuntime = runtime;
|
|
7543
|
+
} catch (accidentalStrictMode) {
|
|
7544
|
+
// This module should not be running in strict mode, so the above
|
|
7545
|
+
// assignment should always work unless something is misconfigured. Just
|
|
7546
|
+
// in case runtime.js accidentally runs in strict mode, we can escape
|
|
7547
|
+
// strict mode using a global Function call. This could conceivably fail
|
|
7548
|
+
// if a Content Security Policy forbids using Function, but in that case
|
|
7549
|
+
// the proper solution is to fix the accidental strict mode problem. If
|
|
7550
|
+
// you've misconfigured your bundler to force strict mode and applied a
|
|
7551
|
+
// CSP to forbid Function, and you're not willing to fix either of those
|
|
7552
|
+
// problems, please detail your unique predicament in a GitHub issue.
|
|
7553
|
+
Function("r", "regeneratorRuntime = r")(runtime);
|
|
7554
|
+
}
|
|
7555
|
+
|
|
7556
|
+
|
|
5937
7557
|
/***/ }),
|
|
5938
7558
|
|
|
5939
7559
|
/***/ "./node_modules/webpack/buildin/global.js":
|
|
@@ -5977,62 +7597,66 @@ module.exports = g;
|
|
|
5977
7597
|
"use strict";
|
|
5978
7598
|
__webpack_require__.r(__webpack_exports__);
|
|
5979
7599
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "JSONEditor", function() { return JSONEditor; });
|
|
5980
|
-
/* harmony import */ var
|
|
5981
|
-
/* harmony import */ var
|
|
5982
|
-
/* harmony import */ var
|
|
5983
|
-
/* harmony import */ var
|
|
5984
|
-
/* harmony import */ var
|
|
5985
|
-
/* harmony import */ var
|
|
5986
|
-
/* harmony import */ var
|
|
5987
|
-
/* harmony import */ var
|
|
5988
|
-
/* harmony import */ var
|
|
5989
|
-
/* harmony import */ var
|
|
5990
|
-
/* harmony import */ var
|
|
5991
|
-
/* harmony import */ var
|
|
5992
|
-
/* harmony import */ var
|
|
5993
|
-
/* harmony import */ var
|
|
5994
|
-
/* harmony import */ var
|
|
5995
|
-
/* harmony import */ var
|
|
5996
|
-
/* harmony import */ var
|
|
5997
|
-
/* harmony import */ var
|
|
5998
|
-
/* harmony import */ var
|
|
5999
|
-
/* harmony import */ var
|
|
6000
|
-
/* harmony import */ var
|
|
6001
|
-
/* harmony import */ var
|
|
6002
|
-
/* harmony import */ var
|
|
6003
|
-
/* harmony import */ var
|
|
6004
|
-
/* harmony import */ var
|
|
6005
|
-
/* harmony import */ var
|
|
6006
|
-
/* harmony import */ var
|
|
6007
|
-
/* harmony import */ var
|
|
6008
|
-
/* harmony import */ var
|
|
6009
|
-
/* harmony import */ var
|
|
6010
|
-
/* harmony import */ var
|
|
6011
|
-
/* harmony import */ var
|
|
6012
|
-
/* harmony import */ var
|
|
6013
|
-
/* harmony import */ var
|
|
6014
|
-
/* harmony import */ var
|
|
6015
|
-
/* harmony import */ var
|
|
6016
|
-
/* harmony import */ var
|
|
6017
|
-
/* harmony import */ var
|
|
6018
|
-
/* harmony import */ var
|
|
6019
|
-
/* harmony import */ var
|
|
6020
|
-
/* harmony import */ var
|
|
6021
|
-
/* harmony import */ var
|
|
6022
|
-
/* harmony import */ var
|
|
6023
|
-
/* harmony import */ var
|
|
6024
|
-
/* harmony import */ var
|
|
6025
|
-
/* harmony import */ var
|
|
6026
|
-
/* harmony import */ var
|
|
6027
|
-
/* harmony import */ var
|
|
6028
|
-
/* harmony import */ var
|
|
6029
|
-
/* harmony import */ var
|
|
6030
|
-
/* harmony import */ var
|
|
6031
|
-
/* harmony import */ var
|
|
6032
|
-
/* harmony import */ var
|
|
6033
|
-
/* harmony import */ var
|
|
6034
|
-
/* harmony import */ var
|
|
6035
|
-
/* harmony import */ var
|
|
7600
|
+
/* harmony import */ var regenerator_runtime_runtime_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! regenerator-runtime/runtime.js */ "./node_modules/regenerator-runtime/runtime.js");
|
|
7601
|
+
/* harmony import */ var regenerator_runtime_runtime_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(regenerator_runtime_runtime_js__WEBPACK_IMPORTED_MODULE_0__);
|
|
7602
|
+
/* harmony import */ var core_js_modules_es_date_to_string_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.date.to-string.js */ "./node_modules/core-js/modules/es.date.to-string.js");
|
|
7603
|
+
/* harmony import */ var core_js_modules_es_date_to_string_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_date_to_string_js__WEBPACK_IMPORTED_MODULE_1__);
|
|
7604
|
+
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core-js/modules/es.object.to-string.js */ "./node_modules/core-js/modules/es.object.to-string.js");
|
|
7605
|
+
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_2__);
|
|
7606
|
+
/* harmony import */ var core_js_modules_es_regexp_to_string_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core-js/modules/es.regexp.to-string.js */ "./node_modules/core-js/modules/es.regexp.to-string.js");
|
|
7607
|
+
/* harmony import */ var core_js_modules_es_regexp_to_string_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_regexp_to_string_js__WEBPACK_IMPORTED_MODULE_3__);
|
|
7608
|
+
/* harmony import */ var core_js_modules_es_array_reduce_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! core-js/modules/es.array.reduce.js */ "./node_modules/core-js/modules/es.array.reduce.js");
|
|
7609
|
+
/* harmony import */ var core_js_modules_es_array_reduce_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_reduce_js__WEBPACK_IMPORTED_MODULE_4__);
|
|
7610
|
+
/* harmony import */ var core_js_modules_es_object_values_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! core-js/modules/es.object.values.js */ "./node_modules/core-js/modules/es.object.values.js");
|
|
7611
|
+
/* harmony import */ var core_js_modules_es_object_values_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_values_js__WEBPACK_IMPORTED_MODULE_5__);
|
|
7612
|
+
/* harmony import */ var core_js_modules_es_array_find_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! core-js/modules/es.array.find.js */ "./node_modules/core-js/modules/es.array.find.js");
|
|
7613
|
+
/* harmony import */ var core_js_modules_es_array_find_js__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_find_js__WEBPACK_IMPORTED_MODULE_6__);
|
|
7614
|
+
/* harmony import */ var core_js_modules_es_array_for_each_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! core-js/modules/es.array.for-each.js */ "./node_modules/core-js/modules/es.array.for-each.js");
|
|
7615
|
+
/* harmony import */ var core_js_modules_es_array_for_each_js__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_for_each_js__WEBPACK_IMPORTED_MODULE_7__);
|
|
7616
|
+
/* harmony import */ var core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ "./node_modules/core-js/modules/web.dom-collections.for-each.js");
|
|
7617
|
+
/* harmony import */ var core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_8__);
|
|
7618
|
+
/* harmony import */ var core_js_modules_es_object_keys_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! core-js/modules/es.object.keys.js */ "./node_modules/core-js/modules/es.object.keys.js");
|
|
7619
|
+
/* harmony import */ var core_js_modules_es_object_keys_js__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_keys_js__WEBPACK_IMPORTED_MODULE_9__);
|
|
7620
|
+
/* harmony import */ var core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! core-js/modules/es.array.concat.js */ "./node_modules/core-js/modules/es.array.concat.js");
|
|
7621
|
+
/* harmony import */ var core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_10__);
|
|
7622
|
+
/* harmony import */ var core_js_modules_es_object_assign_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! core-js/modules/es.object.assign.js */ "./node_modules/core-js/modules/es.object.assign.js");
|
|
7623
|
+
/* harmony import */ var core_js_modules_es_object_assign_js__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_assign_js__WEBPACK_IMPORTED_MODULE_11__);
|
|
7624
|
+
/* harmony import */ var core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! core-js/modules/es.object.define-property.js */ "./node_modules/core-js/modules/es.object.define-property.js");
|
|
7625
|
+
/* harmony import */ var core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_12__);
|
|
7626
|
+
/* harmony import */ var core_js_modules_es_promise_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! core-js/modules/es.promise.js */ "./node_modules/core-js/modules/es.promise.js");
|
|
7627
|
+
/* harmony import */ var core_js_modules_es_promise_js__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_promise_js__WEBPACK_IMPORTED_MODULE_13__);
|
|
7628
|
+
/* harmony import */ var core_js_modules_es_array_is_array_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! core-js/modules/es.array.is-array.js */ "./node_modules/core-js/modules/es.array.is-array.js");
|
|
7629
|
+
/* harmony import */ var core_js_modules_es_array_is_array_js__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_is_array_js__WEBPACK_IMPORTED_MODULE_14__);
|
|
7630
|
+
/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! core-js/modules/es.symbol.js */ "./node_modules/core-js/modules/es.symbol.js");
|
|
7631
|
+
/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_15__);
|
|
7632
|
+
/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! core-js/modules/es.symbol.description.js */ "./node_modules/core-js/modules/es.symbol.description.js");
|
|
7633
|
+
/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_16__);
|
|
7634
|
+
/* harmony import */ var core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ "./node_modules/core-js/modules/es.symbol.iterator.js");
|
|
7635
|
+
/* harmony import */ var core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_17__);
|
|
7636
|
+
/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! core-js/modules/es.array.iterator.js */ "./node_modules/core-js/modules/es.array.iterator.js");
|
|
7637
|
+
/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_18___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_18__);
|
|
7638
|
+
/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! core-js/modules/es.string.iterator.js */ "./node_modules/core-js/modules/es.string.iterator.js");
|
|
7639
|
+
/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_19___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_19__);
|
|
7640
|
+
/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ "./node_modules/core-js/modules/web.dom-collections.iterator.js");
|
|
7641
|
+
/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_20___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_20__);
|
|
7642
|
+
/* harmony import */ var core_js_modules_es_array_from_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! core-js/modules/es.array.from.js */ "./node_modules/core-js/modules/es.array.from.js");
|
|
7643
|
+
/* harmony import */ var core_js_modules_es_array_from_js__WEBPACK_IMPORTED_MODULE_21___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_from_js__WEBPACK_IMPORTED_MODULE_21__);
|
|
7644
|
+
/* harmony import */ var core_js_modules_es_array_slice_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! core-js/modules/es.array.slice.js */ "./node_modules/core-js/modules/es.array.slice.js");
|
|
7645
|
+
/* harmony import */ var core_js_modules_es_array_slice_js__WEBPACK_IMPORTED_MODULE_22___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_slice_js__WEBPACK_IMPORTED_MODULE_22__);
|
|
7646
|
+
/* harmony import */ var core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! core-js/modules/es.function.name.js */ "./node_modules/core-js/modules/es.function.name.js");
|
|
7647
|
+
/* harmony import */ var core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_23___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_23__);
|
|
7648
|
+
/* harmony import */ var _defaults_js__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./defaults.js */ "./src/defaults.js");
|
|
7649
|
+
/* harmony import */ var _validator_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./validator.js */ "./src/validator.js");
|
|
7650
|
+
/* harmony import */ var _schemaloader_js__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./schemaloader.js */ "./src/schemaloader.js");
|
|
7651
|
+
/* harmony import */ var _editors_index_js__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./editors/index.js */ "./src/editors/index.js");
|
|
7652
|
+
/* harmony import */ var _templates_index_js__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./templates/index.js */ "./src/templates/index.js");
|
|
7653
|
+
/* harmony import */ var _iconlibs_index_js__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ./iconlibs/index.js */ "./src/iconlibs/index.js");
|
|
7654
|
+
/* harmony import */ var _themes_index_js__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ./themes/index.js */ "./src/themes/index.js");
|
|
7655
|
+
/* harmony import */ var _utilities_js__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ./utilities.js */ "./src/utilities.js");
|
|
7656
|
+
/* harmony import */ var _editor__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ./editor */ "./src/editor.js");
|
|
7657
|
+
/* harmony import */ var _theme__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ./theme */ "./src/theme.js");
|
|
7658
|
+
/* harmony import */ var _iconlib__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ./iconlib */ "./src/iconlib.js");
|
|
7659
|
+
/* harmony import */ var _style_css_js__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ./style.css.js */ "./src/style.css.js");
|
|
6036
7660
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
6037
7661
|
|
|
6038
7662
|
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."); }
|
|
@@ -6067,6 +7691,12 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
6067
7691
|
|
|
6068
7692
|
|
|
6069
7693
|
|
|
7694
|
+
|
|
7695
|
+
|
|
7696
|
+
|
|
7697
|
+
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
7698
|
+
|
|
7699
|
+
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
6070
7700
|
|
|
6071
7701
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
6072
7702
|
|
|
@@ -6096,7 +7726,7 @@ var JSONEditor = /*#__PURE__*/function () {
|
|
|
6096
7726
|
|
|
6097
7727
|
if (!(element instanceof Element)) throw new Error('element should be an instance of Element');
|
|
6098
7728
|
this.element = element;
|
|
6099
|
-
this.options = Object(
|
|
7729
|
+
this.options = Object(_utilities_js__WEBPACK_IMPORTED_MODULE_31__["extend"])({}, JSONEditor.defaults.options, options);
|
|
6100
7730
|
this.ready = false;
|
|
6101
7731
|
this.copyClipboard = null;
|
|
6102
7732
|
this.schema = this.options.schema;
|
|
@@ -6110,10 +7740,12 @@ var JSONEditor = /*#__PURE__*/function () {
|
|
|
6110
7740
|
/* Load editors and selected theme style rules */
|
|
6111
7741
|
|
|
6112
7742
|
if (!themeClass) throw new Error("Unknown theme ".concat(themeName));
|
|
6113
|
-
this.element.setAttribute('data-theme', themeName);
|
|
7743
|
+
this.element.setAttribute('data-theme', themeName);
|
|
7744
|
+
this.element.classList.add('je-not-loaded');
|
|
7745
|
+
this.element.classList.remove('je-ready'); // eslint-disable-next-line new-cap
|
|
6114
7746
|
|
|
6115
7747
|
this.theme = new themeClass(this);
|
|
6116
|
-
var rules = Object(
|
|
7748
|
+
var rules = Object(_utilities_js__WEBPACK_IMPORTED_MODULE_31__["extend"])(_style_css_js__WEBPACK_IMPORTED_MODULE_35__["default"], this.getEditorsRules());
|
|
6117
7749
|
/* Call addNewStyleRulesToShadowRoot if shadowRoot is found, otherwise call addNewStyleRules */
|
|
6118
7750
|
|
|
6119
7751
|
var addRules = function addRules(themeName, rules, shadowRoot) {
|
|
@@ -6122,97 +7754,118 @@ var JSONEditor = /*#__PURE__*/function () {
|
|
|
6122
7754
|
|
|
6123
7755
|
if (!this.theme.options.disable_theme_rules) {
|
|
6124
7756
|
/* Attempt to locate a shadowRoot parent (i.e. in Web Components) */
|
|
6125
|
-
var shadowRoot = Object(
|
|
7757
|
+
var shadowRoot = Object(_utilities_js__WEBPACK_IMPORTED_MODULE_31__["getShadowParent"])(this.element);
|
|
6126
7758
|
addRules('default', rules, shadowRoot);
|
|
6127
7759
|
|
|
6128
|
-
if (typeof themeClass.rules !== 'undefined') {
|
|
6129
|
-
addRules(themeName, themeClass.rules, shadowRoot);
|
|
6130
|
-
}
|
|
6131
|
-
}
|
|
6132
|
-
/* Init icon class */
|
|
6133
|
-
|
|
6134
|
-
|
|
6135
|
-
var iconClass = JSONEditor.defaults.iconlibs[this.options.iconlib || JSONEditor.defaults.iconlib]; // eslint-disable-next-line new-cap
|
|
6136
|
-
|
|
6137
|
-
if (iconClass) this.iconlib = new iconClass();
|
|
6138
|
-
this.root_container = this.theme.getContainer();
|
|
6139
|
-
this.element.appendChild(this.root_container);
|
|
6140
|
-
/* Fetch all external refs via ajax */
|
|
6141
|
-
|
|
6142
|
-
var fetchUrl = document.location.origin + document.location.pathname.toString();
|
|
6143
|
-
var loader = new _schemaloader_js__WEBPACK_IMPORTED_MODULE_24__["SchemaLoader"](this.options);
|
|
6144
|
-
var location = document.location.toString();
|
|
6145
|
-
|
|
6146
|
-
this.expandSchema = function (schema, fileBase) {
|
|
6147
|
-
return loader.expandSchema(schema, fileBase);
|
|
6148
|
-
};
|
|
6149
|
-
|
|
6150
|
-
this.expandRefs = function (schema, fileBase) {
|
|
6151
|
-
return loader.expandRefs(schema, fileBase);
|
|
6152
|
-
};
|
|
6153
|
-
|
|
6154
|
-
this.refs = loader.refs;
|
|
6155
|
-
loader.load(this.schema, function (schema) {
|
|
6156
|
-
var validatorOptions = _this.options.custom_validators ? {
|
|
6157
|
-
custom_validators: _this.options.custom_validators
|
|
6158
|
-
} : {};
|
|
6159
|
-
_this.validator = new _validator_js__WEBPACK_IMPORTED_MODULE_23__["Validator"](_this, null, validatorOptions, JSONEditor.defaults);
|
|
6160
|
-
|
|
6161
|
-
var editorClass = _this.getEditorClass(schema);
|
|
7760
|
+
if (typeof themeClass.rules !== 'undefined') {
|
|
7761
|
+
addRules(themeName, themeClass.rules, shadowRoot);
|
|
7762
|
+
}
|
|
7763
|
+
}
|
|
7764
|
+
/* Init icon class */
|
|
6162
7765
|
|
|
6163
|
-
_this.root = _this.createEditor(editorClass, {
|
|
6164
|
-
jsoneditor: _this,
|
|
6165
|
-
schema: schema,
|
|
6166
|
-
required: true,
|
|
6167
|
-
container: _this.root_container
|
|
6168
|
-
});
|
|
6169
7766
|
|
|
6170
|
-
|
|
7767
|
+
var iconClass = JSONEditor.defaults.iconlibs[this.options.iconlib || JSONEditor.defaults.iconlib]; // eslint-disable-next-line new-cap
|
|
6171
7768
|
|
|
6172
|
-
|
|
7769
|
+
if (iconClass) this.iconlib = new iconClass();
|
|
7770
|
+
this.root_container = this.theme.getContainer();
|
|
7771
|
+
this.element.appendChild(this.root_container);
|
|
7772
|
+
this.promise = this.load();
|
|
7773
|
+
}
|
|
6173
7774
|
|
|
6174
|
-
|
|
6175
|
-
|
|
7775
|
+
_createClass(JSONEditor, [{
|
|
7776
|
+
key: "load",
|
|
7777
|
+
value: function () {
|
|
7778
|
+
var _load = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
|
|
7779
|
+
var _this2 = this;
|
|
6176
7780
|
|
|
7781
|
+
var fetchUrl, loader, location, schema, validatorOptions, editorClass;
|
|
7782
|
+
return regeneratorRuntime.wrap(function _callee$(_context) {
|
|
7783
|
+
while (1) {
|
|
7784
|
+
switch (_context.prev = _context.next) {
|
|
7785
|
+
case 0:
|
|
7786
|
+
fetchUrl = document.location.origin + document.location.pathname.toString();
|
|
7787
|
+
loader = new _schemaloader_js__WEBPACK_IMPORTED_MODULE_26__["SchemaLoader"](this.options);
|
|
7788
|
+
|
|
7789
|
+
this.expandSchema = function (schema) {
|
|
7790
|
+
return loader.expandSchema(schema);
|
|
7791
|
+
};
|
|
7792
|
+
|
|
7793
|
+
this.expandRefs = function (schema, fileBase) {
|
|
7794
|
+
return loader.expandRefs(schema, fileBase);
|
|
7795
|
+
};
|
|
7796
|
+
|
|
7797
|
+
location = document.location.toString();
|
|
7798
|
+
_context.next = 7;
|
|
7799
|
+
return loader.load(this.schema, fetchUrl, location);
|
|
7800
|
+
|
|
7801
|
+
case 7:
|
|
7802
|
+
schema = _context.sent;
|
|
7803
|
+
validatorOptions = this.options.custom_validators ? {
|
|
7804
|
+
custom_validators: this.options.custom_validators
|
|
7805
|
+
} : {};
|
|
7806
|
+
this.validator = new _validator_js__WEBPACK_IMPORTED_MODULE_25__["Validator"](this, null, validatorOptions, JSONEditor.defaults);
|
|
7807
|
+
editorClass = this.getEditorClass(schema);
|
|
7808
|
+
this.root = this.createEditor(editorClass, {
|
|
7809
|
+
jsoneditor: this,
|
|
7810
|
+
schema: schema,
|
|
7811
|
+
required: true,
|
|
7812
|
+
container: this.root_container
|
|
7813
|
+
});
|
|
7814
|
+
this.root.preBuild();
|
|
7815
|
+
this.root.build();
|
|
7816
|
+
this.root.postBuild();
|
|
7817
|
+
/* Starting data */
|
|
6177
7818
|
|
|
6178
|
-
|
|
6179
|
-
|
|
7819
|
+
if (Object(_utilities_js__WEBPACK_IMPORTED_MODULE_31__["hasOwnProperty"])(this.options, 'startval')) this.root.setValue(this.options.startval);
|
|
7820
|
+
this.validation_results = this.validator.validate(this.root.getValue());
|
|
7821
|
+
this.root.showValidationErrors(this.validation_results);
|
|
7822
|
+
this.ready = true;
|
|
7823
|
+
this.element.classList.remove('je-not-loaded');
|
|
7824
|
+
this.element.classList.add('je-ready');
|
|
7825
|
+
/* Fire ready event asynchronously */
|
|
6180
7826
|
|
|
6181
|
-
|
|
7827
|
+
window.requestAnimationFrame(function () {
|
|
7828
|
+
if (!_this2.ready) return;
|
|
7829
|
+
_this2.validation_results = _this2.validator.validate(_this2.root.getValue());
|
|
6182
7830
|
|
|
6183
|
-
|
|
6184
|
-
/* Fire ready event asynchronously */
|
|
7831
|
+
_this2.root.showValidationErrors(_this2.validation_results);
|
|
6185
7832
|
|
|
6186
|
-
|
|
6187
|
-
if (!_this.ready) return;
|
|
6188
|
-
_this.validation_results = _this.validator.validate(_this.root.getValue());
|
|
7833
|
+
_this2.trigger('ready');
|
|
6189
7834
|
|
|
6190
|
-
|
|
7835
|
+
_this2.trigger('change');
|
|
7836
|
+
});
|
|
6191
7837
|
|
|
6192
|
-
|
|
7838
|
+
case 22:
|
|
7839
|
+
case "end":
|
|
7840
|
+
return _context.stop();
|
|
7841
|
+
}
|
|
7842
|
+
}
|
|
7843
|
+
}, _callee, this);
|
|
7844
|
+
}));
|
|
6193
7845
|
|
|
6194
|
-
|
|
6195
|
-
|
|
6196
|
-
|
|
6197
|
-
}
|
|
7846
|
+
function load() {
|
|
7847
|
+
return _load.apply(this, arguments);
|
|
7848
|
+
}
|
|
6198
7849
|
|
|
6199
|
-
|
|
7850
|
+
return load;
|
|
7851
|
+
}()
|
|
7852
|
+
}, {
|
|
6200
7853
|
key: "getValue",
|
|
6201
7854
|
value: function getValue() {
|
|
6202
|
-
if (!this.ready) throw new Error(
|
|
7855
|
+
if (!this.ready) throw new Error('JSON Editor not ready yet. Make sure the load method is complete');
|
|
6203
7856
|
return this.root.getValue();
|
|
6204
7857
|
}
|
|
6205
7858
|
}, {
|
|
6206
7859
|
key: "setValue",
|
|
6207
7860
|
value: function setValue(value) {
|
|
6208
|
-
if (!this.ready) throw new Error(
|
|
7861
|
+
if (!this.ready) throw new Error('JSON Editor not ready yet. Make sure the load method is complete');
|
|
6209
7862
|
this.root.setValue(value);
|
|
6210
7863
|
return this;
|
|
6211
7864
|
}
|
|
6212
7865
|
}, {
|
|
6213
7866
|
key: "validate",
|
|
6214
7867
|
value: function validate(value) {
|
|
6215
|
-
if (!this.ready) throw new Error(
|
|
7868
|
+
if (!this.ready) throw new Error('JSON Editor not ready yet. Make sure the load method is complete');
|
|
6216
7869
|
/* Custom value */
|
|
6217
7870
|
|
|
6218
7871
|
if (arguments.length === 1) {
|
|
@@ -6305,7 +7958,7 @@ var JSONEditor = /*#__PURE__*/function () {
|
|
|
6305
7958
|
key: "getEditorsRules",
|
|
6306
7959
|
value: function getEditorsRules() {
|
|
6307
7960
|
var extendRule = function extendRule(rules, editorClass) {
|
|
6308
|
-
return editorClass.rules ? Object(
|
|
7961
|
+
return editorClass.rules ? Object(_utilities_js__WEBPACK_IMPORTED_MODULE_31__["extend"])(rules, editorClass.rules) : rules;
|
|
6309
7962
|
};
|
|
6310
7963
|
|
|
6311
7964
|
return Object.values(JSONEditor.defaults.editors).reduce(extendRule, {});
|
|
@@ -6327,34 +7980,34 @@ var JSONEditor = /*#__PURE__*/function () {
|
|
|
6327
7980
|
key: "createEditor",
|
|
6328
7981
|
value: function createEditor(editorClass, options) {
|
|
6329
7982
|
var depthCounter = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;
|
|
6330
|
-
options = Object(
|
|
7983
|
+
options = Object(_utilities_js__WEBPACK_IMPORTED_MODULE_31__["extend"])({}, editorClass.options || {}, options); // eslint-disable-next-line new-cap
|
|
6331
7984
|
|
|
6332
7985
|
return new editorClass(options, JSONEditor.defaults, depthCounter);
|
|
6333
7986
|
}
|
|
6334
7987
|
}, {
|
|
6335
7988
|
key: "onChange",
|
|
6336
7989
|
value: function onChange() {
|
|
6337
|
-
var
|
|
7990
|
+
var _this3 = this;
|
|
6338
7991
|
|
|
6339
7992
|
if (!this.ready) return;
|
|
6340
7993
|
if (this.firing_change) return;
|
|
6341
7994
|
this.firing_change = true;
|
|
6342
7995
|
window.requestAnimationFrame(function () {
|
|
6343
|
-
|
|
6344
|
-
if (!
|
|
7996
|
+
_this3.firing_change = false;
|
|
7997
|
+
if (!_this3.ready) return;
|
|
6345
7998
|
/* Validate and cache results */
|
|
6346
7999
|
|
|
6347
|
-
|
|
8000
|
+
_this3.validation_results = _this3.validator.validate(_this3.root.getValue());
|
|
6348
8001
|
|
|
6349
|
-
if (
|
|
6350
|
-
|
|
8002
|
+
if (_this3.options.show_errors !== 'never') {
|
|
8003
|
+
_this3.root.showValidationErrors(_this3.validation_results);
|
|
6351
8004
|
} else {
|
|
6352
|
-
|
|
8005
|
+
_this3.root.showValidationErrors([]);
|
|
6353
8006
|
}
|
|
6354
8007
|
/* Fire change event */
|
|
6355
8008
|
|
|
6356
8009
|
|
|
6357
|
-
|
|
8010
|
+
_this3.trigger('change');
|
|
6358
8011
|
});
|
|
6359
8012
|
return this;
|
|
6360
8013
|
}
|
|
@@ -6526,14 +8179,14 @@ var JSONEditor = /*#__PURE__*/function () {
|
|
|
6526
8179
|
|
|
6527
8180
|
return JSONEditor;
|
|
6528
8181
|
}();
|
|
6529
|
-
JSONEditor.defaults =
|
|
6530
|
-
JSONEditor.AbstractEditor =
|
|
6531
|
-
JSONEditor.AbstractTheme =
|
|
6532
|
-
JSONEditor.AbstractIconLib =
|
|
6533
|
-
Object.assign(JSONEditor.defaults.themes,
|
|
6534
|
-
Object.assign(JSONEditor.defaults.editors,
|
|
6535
|
-
Object.assign(JSONEditor.defaults.templates,
|
|
6536
|
-
Object.assign(JSONEditor.defaults.iconlibs,
|
|
8182
|
+
JSONEditor.defaults = _defaults_js__WEBPACK_IMPORTED_MODULE_24__["defaults"];
|
|
8183
|
+
JSONEditor.AbstractEditor = _editor__WEBPACK_IMPORTED_MODULE_32__["AbstractEditor"];
|
|
8184
|
+
JSONEditor.AbstractTheme = _theme__WEBPACK_IMPORTED_MODULE_33__["AbstractTheme"];
|
|
8185
|
+
JSONEditor.AbstractIconLib = _iconlib__WEBPACK_IMPORTED_MODULE_34__["AbstractIconLib"];
|
|
8186
|
+
Object.assign(JSONEditor.defaults.themes, _themes_index_js__WEBPACK_IMPORTED_MODULE_30__["themes"]);
|
|
8187
|
+
Object.assign(JSONEditor.defaults.editors, _editors_index_js__WEBPACK_IMPORTED_MODULE_27__["editors"]);
|
|
8188
|
+
Object.assign(JSONEditor.defaults.templates, _templates_index_js__WEBPACK_IMPORTED_MODULE_28__["templates"]);
|
|
8189
|
+
Object.assign(JSONEditor.defaults.iconlibs, _iconlibs_index_js__WEBPACK_IMPORTED_MODULE_29__["iconlibs"]);
|
|
6537
8190
|
|
|
6538
8191
|
/***/ }),
|
|
6539
8192
|
|
|
@@ -7040,10 +8693,16 @@ function upload(type, file, cbs) {
|
|
|
7040
8693
|
/* String translate function */
|
|
7041
8694
|
|
|
7042
8695
|
|
|
7043
|
-
function translate(key, variables) {
|
|
8696
|
+
function translate(key, variables, schema) {
|
|
8697
|
+
var schemaMessages = {};
|
|
8698
|
+
|
|
8699
|
+
if (schema && schema.options && schema.options.error_messages && schema.options.error_messages[defaults.language]) {
|
|
8700
|
+
schemaMessages = schema.options.error_messages[defaults.language];
|
|
8701
|
+
}
|
|
8702
|
+
|
|
7044
8703
|
var lang = defaults.languages[defaults.language];
|
|
7045
8704
|
if (!lang) throw new Error("Unknown language ".concat(defaults.language));
|
|
7046
|
-
var string = lang[key] || defaults.languages[default_language][key] || key;
|
|
8705
|
+
var string = schemaMessages[key] || lang[key] || defaults.languages[default_language][key] || key;
|
|
7047
8706
|
|
|
7048
8707
|
if (variables) {
|
|
7049
8708
|
for (var i = 0; i < variables.length; i++) {
|
|
@@ -7064,6 +8723,7 @@ function translateProperty(text, variables) {
|
|
|
7064
8723
|
|
|
7065
8724
|
var options = {
|
|
7066
8725
|
upload: upload,
|
|
8726
|
+
use_name_attributes: true,
|
|
7067
8727
|
prompt_before_delete: true,
|
|
7068
8728
|
use_default_values: true,
|
|
7069
8729
|
max_depth: 0
|
|
@@ -7389,7 +9049,7 @@ var AbstractEditor = /*#__PURE__*/function () {
|
|
|
7389
9049
|
this.dependenciesFulfilled = false;
|
|
7390
9050
|
} else if (Array.isArray(choices)) {
|
|
7391
9051
|
this.dependenciesFulfilled = choices.some(function (choice) {
|
|
7392
|
-
if (value === choice) {
|
|
9052
|
+
if (JSON.stringify(value) === JSON.stringify(choice)) {
|
|
7393
9053
|
return true;
|
|
7394
9054
|
}
|
|
7395
9055
|
});
|
|
@@ -8246,33 +9906,35 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
8246
9906
|
/* harmony import */ var core_js_modules_es_array_map_js__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_map_js__WEBPACK_IMPORTED_MODULE_9__);
|
|
8247
9907
|
/* harmony import */ var core_js_modules_es_array_filter_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! core-js/modules/es.array.filter.js */ "./node_modules/core-js/modules/es.array.filter.js");
|
|
8248
9908
|
/* harmony import */ var core_js_modules_es_array_filter_js__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_filter_js__WEBPACK_IMPORTED_MODULE_10__);
|
|
8249
|
-
/* harmony import */ var
|
|
8250
|
-
/* harmony import */ var
|
|
8251
|
-
/* harmony import */ var
|
|
8252
|
-
/* harmony import */ var
|
|
8253
|
-
/* harmony import */ var
|
|
8254
|
-
/* harmony import */ var
|
|
8255
|
-
/* harmony import */ var
|
|
8256
|
-
/* harmony import */ var
|
|
8257
|
-
/* harmony import */ var
|
|
8258
|
-
/* harmony import */ var
|
|
8259
|
-
/* harmony import */ var
|
|
8260
|
-
/* harmony import */ var
|
|
8261
|
-
/* harmony import */ var
|
|
8262
|
-
/* harmony import */ var
|
|
8263
|
-
/* harmony import */ var
|
|
8264
|
-
/* harmony import */ var
|
|
8265
|
-
/* harmony import */ var
|
|
8266
|
-
/* harmony import */ var
|
|
8267
|
-
/* harmony import */ var
|
|
8268
|
-
/* harmony import */ var
|
|
8269
|
-
/* harmony import */ var
|
|
8270
|
-
/* harmony import */ var
|
|
8271
|
-
/* harmony import */ var
|
|
8272
|
-
/* harmony import */ var
|
|
8273
|
-
/* harmony import */ var
|
|
8274
|
-
/* harmony import */ var
|
|
8275
|
-
/* harmony import */ var
|
|
9909
|
+
/* harmony import */ var core_js_modules_es_object_keys_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! core-js/modules/es.object.keys.js */ "./node_modules/core-js/modules/es.object.keys.js");
|
|
9910
|
+
/* harmony import */ var core_js_modules_es_object_keys_js__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_keys_js__WEBPACK_IMPORTED_MODULE_11__);
|
|
9911
|
+
/* harmony import */ var core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ "./node_modules/core-js/modules/es.object.set-prototype-of.js");
|
|
9912
|
+
/* harmony import */ var core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_12__);
|
|
9913
|
+
/* harmony import */ var core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ "./node_modules/core-js/modules/es.object.get-prototype-of.js");
|
|
9914
|
+
/* harmony import */ var core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_13__);
|
|
9915
|
+
/* harmony import */ var core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! core-js/modules/es.reflect.construct.js */ "./node_modules/core-js/modules/es.reflect.construct.js");
|
|
9916
|
+
/* harmony import */ var core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_14__);
|
|
9917
|
+
/* harmony import */ var core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! core-js/modules/es.object.create.js */ "./node_modules/core-js/modules/es.object.create.js");
|
|
9918
|
+
/* harmony import */ var core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_15__);
|
|
9919
|
+
/* harmony import */ var core_js_modules_es_reflect_get_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! core-js/modules/es.reflect.get.js */ "./node_modules/core-js/modules/es.reflect.get.js");
|
|
9920
|
+
/* harmony import */ var core_js_modules_es_reflect_get_js__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_reflect_get_js__WEBPACK_IMPORTED_MODULE_16__);
|
|
9921
|
+
/* harmony import */ var core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ "./node_modules/core-js/modules/es.object.get-own-property-descriptor.js");
|
|
9922
|
+
/* harmony import */ var core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_17__);
|
|
9923
|
+
/* harmony import */ var core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! core-js/modules/es.object.define-property.js */ "./node_modules/core-js/modules/es.object.define-property.js");
|
|
9924
|
+
/* harmony import */ var core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_18___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_18__);
|
|
9925
|
+
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! core-js/modules/es.object.to-string.js */ "./node_modules/core-js/modules/es.object.to-string.js");
|
|
9926
|
+
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_19___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_19__);
|
|
9927
|
+
/* harmony import */ var core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ "./node_modules/core-js/modules/es.symbol.iterator.js");
|
|
9928
|
+
/* harmony import */ var core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_20___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_20__);
|
|
9929
|
+
/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! core-js/modules/es.array.iterator.js */ "./node_modules/core-js/modules/es.array.iterator.js");
|
|
9930
|
+
/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_21___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_21__);
|
|
9931
|
+
/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! core-js/modules/es.string.iterator.js */ "./node_modules/core-js/modules/es.string.iterator.js");
|
|
9932
|
+
/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_22___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_22__);
|
|
9933
|
+
/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ "./node_modules/core-js/modules/web.dom-collections.iterator.js");
|
|
9934
|
+
/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_23___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_23__);
|
|
9935
|
+
/* harmony import */ var _editor_js__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ../editor.js */ "./src/editor.js");
|
|
9936
|
+
/* harmony import */ var _utilities_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ../utilities.js */ "./src/utilities.js");
|
|
9937
|
+
/* harmony import */ var _array_css_js__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./array.css.js */ "./src/editors/array.css.js");
|
|
8276
9938
|
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); }
|
|
8277
9939
|
|
|
8278
9940
|
|
|
@@ -8297,6 +9959,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "functi
|
|
|
8297
9959
|
|
|
8298
9960
|
|
|
8299
9961
|
|
|
9962
|
+
|
|
8300
9963
|
|
|
8301
9964
|
|
|
8302
9965
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
@@ -8550,13 +10213,13 @@ var ArrayEditor = /*#__PURE__*/function (_AbstractEditor) {
|
|
|
8550
10213
|
if (this.schema.additionalItems === true) {
|
|
8551
10214
|
return {};
|
|
8552
10215
|
} else if (this.schema.additionalItems) {
|
|
8553
|
-
return Object(
|
|
10216
|
+
return Object(_utilities_js__WEBPACK_IMPORTED_MODULE_25__["extend"])({}, this.schema.additionalItems);
|
|
8554
10217
|
}
|
|
8555
10218
|
} else {
|
|
8556
|
-
return Object(
|
|
10219
|
+
return Object(_utilities_js__WEBPACK_IMPORTED_MODULE_25__["extend"])({}, this.schema.items[i]);
|
|
8557
10220
|
}
|
|
8558
10221
|
} else if (this.schema.items) {
|
|
8559
|
-
return Object(
|
|
10222
|
+
return Object(_utilities_js__WEBPACK_IMPORTED_MODULE_25__["extend"])({}, this.schema.items);
|
|
8560
10223
|
} else {
|
|
8561
10224
|
return {};
|
|
8562
10225
|
}
|
|
@@ -8969,6 +10632,7 @@ var ArrayEditor = /*#__PURE__*/function (_AbstractEditor) {
|
|
|
8969
10632
|
var _this9 = this;
|
|
8970
10633
|
|
|
8971
10634
|
var button = this.getButton(this.getItemTitle(), 'copy', 'button_copy_row_title', [this.getItemTitle()]);
|
|
10635
|
+
var schema = this.schema;
|
|
8972
10636
|
button.classList.add('copy', 'json-editor-btntype-copy');
|
|
8973
10637
|
button.setAttribute('data-i', i);
|
|
8974
10638
|
button.addEventListener('click', function (e) {
|
|
@@ -8979,6 +10643,19 @@ var ArrayEditor = /*#__PURE__*/function (_AbstractEditor) {
|
|
|
8979
10643
|
var i = e.currentTarget.getAttribute('data-i') * 1;
|
|
8980
10644
|
value.forEach(function (row, j) {
|
|
8981
10645
|
if (j === i) {
|
|
10646
|
+
/* Force generation of new UUID if the item has been cloned. */
|
|
10647
|
+
if (schema.items.type === 'string' && schema.items.format === 'uuid') {
|
|
10648
|
+
row = Object(_utilities_js__WEBPACK_IMPORTED_MODULE_25__["generateUUID"])();
|
|
10649
|
+
} else if (schema.items.type === 'object' && schema.items.properties) {
|
|
10650
|
+
for (var _i = 0, _Object$keys = Object.keys(row); _i < _Object$keys.length; _i++) {
|
|
10651
|
+
var key = _Object$keys[_i];
|
|
10652
|
+
|
|
10653
|
+
if (schema.items.properties && schema.items.properties[key] && schema.items.properties[key].format === 'uuid') {
|
|
10654
|
+
row[key] = Object(_utilities_js__WEBPACK_IMPORTED_MODULE_25__["generateUUID"])();
|
|
10655
|
+
}
|
|
10656
|
+
}
|
|
10657
|
+
}
|
|
10658
|
+
|
|
8982
10659
|
value.push(row);
|
|
8983
10660
|
}
|
|
8984
10661
|
});
|
|
@@ -9074,7 +10751,7 @@ var ArrayEditor = /*#__PURE__*/function (_AbstractEditor) {
|
|
|
9074
10751
|
/* If it should start collapsed */
|
|
9075
10752
|
|
|
9076
10753
|
if (this.options.collapsed) {
|
|
9077
|
-
Object(
|
|
10754
|
+
Object(_utilities_js__WEBPACK_IMPORTED_MODULE_25__["trigger"])(this.toggle_button, 'click');
|
|
9078
10755
|
}
|
|
9079
10756
|
/* Collapse button disabled */
|
|
9080
10757
|
|
|
@@ -9272,8 +10949,8 @@ var ArrayEditor = /*#__PURE__*/function (_AbstractEditor) {
|
|
|
9272
10949
|
}]);
|
|
9273
10950
|
|
|
9274
10951
|
return ArrayEditor;
|
|
9275
|
-
}(
|
|
9276
|
-
ArrayEditor.rules =
|
|
10952
|
+
}(_editor_js__WEBPACK_IMPORTED_MODULE_24__["AbstractEditor"]);
|
|
10953
|
+
ArrayEditor.rules = _array_css_js__WEBPACK_IMPORTED_MODULE_26__["default"];
|
|
9277
10954
|
|
|
9278
10955
|
/***/ }),
|
|
9279
10956
|
|
|
@@ -10096,6 +11773,8 @@ var AutocompleteEditor = /*#__PURE__*/function (_StringEditor) {
|
|
|
10096
11773
|
}, {
|
|
10097
11774
|
key: "afterInputReady",
|
|
10098
11775
|
value: function afterInputReady() {
|
|
11776
|
+
var _this = this;
|
|
11777
|
+
|
|
10099
11778
|
var options;
|
|
10100
11779
|
|
|
10101
11780
|
if (window.Autocomplete && !this.autocomplete_instance) {
|
|
@@ -10103,17 +11782,18 @@ var AutocompleteEditor = /*#__PURE__*/function (_StringEditor) {
|
|
|
10103
11782
|
|
|
10104
11783
|
/* single property options from schema "options.autocomplete" */
|
|
10105
11784
|
options = this.expandCallbacks('autocomplete', Object(_utilities_js__WEBPACK_IMPORTED_MODULE_15__["extend"])({}, {
|
|
10106
|
-
search: function search(jseditor
|
|
11785
|
+
search: function search(jseditor) {
|
|
10107
11786
|
// eslint-disable-next-line no-console
|
|
10108
11787
|
console.log("No \"search\" callback defined for autocomplete in property \"".concat(jseditor.key, "\""));
|
|
10109
11788
|
return [];
|
|
10110
11789
|
},
|
|
11790
|
+
onSubmit: function onSubmit() {
|
|
11791
|
+
_this.input.blur();
|
|
11792
|
+
},
|
|
10111
11793
|
baseClass: 'autocomplete'
|
|
10112
11794
|
}, this.defaults.options.autocomplete || {}, this.options.autocomplete || {}));
|
|
10113
11795
|
this.autocomplete_wrapper.classList.add(options.baseClass);
|
|
10114
11796
|
this.autocomplete_dropdown.classList.add("".concat(options.baseClass, "-result-list"));
|
|
10115
|
-
/* this.input.classList.add(options.baseClass + '-input'); */
|
|
10116
|
-
|
|
10117
11797
|
this.autocomplete_instance = new window.Autocomplete(this.autocomplete_wrapper, options);
|
|
10118
11798
|
}
|
|
10119
11799
|
|
|
@@ -10586,7 +12266,7 @@ var ButtonEditor = /*#__PURE__*/function (_AbstractEditor) {
|
|
|
10586
12266
|
window.alert("No button action defined for \"".concat(jseditor.path, "\""));
|
|
10587
12267
|
}
|
|
10588
12268
|
}, this.defaults.options.button || {}, this.options.button || {}));
|
|
10589
|
-
this.input = this.
|
|
12269
|
+
this.input = this.getButton(title, options.icon, title);
|
|
10590
12270
|
this.input.addEventListener('click', options.action, false);
|
|
10591
12271
|
|
|
10592
12272
|
if (this.schema.readOnly || this.schema.readonly || this.schema.template) {
|
|
@@ -10774,7 +12454,10 @@ var CheckboxEditor = /*#__PURE__*/function (_AbstractEditor) {
|
|
|
10774
12454
|
_get(_getPrototypeOf(CheckboxEditor.prototype), "register", this).call(this);
|
|
10775
12455
|
|
|
10776
12456
|
if (!this.input) return;
|
|
10777
|
-
|
|
12457
|
+
|
|
12458
|
+
if (this.jsoneditor.options.use_name_attributes) {
|
|
12459
|
+
this.input.setAttribute('name', this.formname);
|
|
12460
|
+
}
|
|
10778
12461
|
}
|
|
10779
12462
|
}, {
|
|
10780
12463
|
key: "unregister",
|
|
@@ -12291,7 +13974,10 @@ var HiddenEditor = /*#__PURE__*/function (_AbstractEditor) {
|
|
|
12291
13974
|
_get(_getPrototypeOf(HiddenEditor.prototype), "register", this).call(this);
|
|
12292
13975
|
|
|
12293
13976
|
if (!this.input) return;
|
|
12294
|
-
|
|
13977
|
+
|
|
13978
|
+
if (this.jsoneditor.options.use_name_attributes) {
|
|
13979
|
+
this.input.setAttribute('name', this.formname);
|
|
13980
|
+
}
|
|
12295
13981
|
}
|
|
12296
13982
|
}, {
|
|
12297
13983
|
key: "unregister",
|
|
@@ -13629,10 +15315,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
13629
15315
|
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_6__);
|
|
13630
15316
|
/* harmony import */ var core_js_modules_es_regexp_to_string_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! core-js/modules/es.regexp.to-string.js */ "./node_modules/core-js/modules/es.regexp.to-string.js");
|
|
13631
15317
|
/* harmony import */ var core_js_modules_es_regexp_to_string_js__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_regexp_to_string_js__WEBPACK_IMPORTED_MODULE_7__);
|
|
13632
|
-
/* harmony import */ var
|
|
13633
|
-
/* harmony import */ var
|
|
13634
|
-
/* harmony import */ var
|
|
13635
|
-
/* harmony import */ var
|
|
15318
|
+
/* harmony import */ var core_js_modules_es_array_map_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! core-js/modules/es.array.map.js */ "./node_modules/core-js/modules/es.array.map.js");
|
|
15319
|
+
/* harmony import */ var core_js_modules_es_array_map_js__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_map_js__WEBPACK_IMPORTED_MODULE_8__);
|
|
15320
|
+
/* harmony import */ var core_js_modules_es_array_is_array_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! core-js/modules/es.array.is-array.js */ "./node_modules/core-js/modules/es.array.is-array.js");
|
|
15321
|
+
/* harmony import */ var core_js_modules_es_array_is_array_js__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_is_array_js__WEBPACK_IMPORTED_MODULE_9__);
|
|
13636
15322
|
/* harmony import */ var core_js_modules_es_array_includes_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! core-js/modules/es.array.includes.js */ "./node_modules/core-js/modules/es.array.includes.js");
|
|
13637
15323
|
/* harmony import */ var core_js_modules_es_array_includes_js__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_includes_js__WEBPACK_IMPORTED_MODULE_10__);
|
|
13638
15324
|
/* harmony import */ var core_js_modules_es_string_includes_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! core-js/modules/es.string.includes.js */ "./node_modules/core-js/modules/es.string.includes.js");
|
|
@@ -13758,7 +15444,10 @@ var MultiSelectEditor = /*#__PURE__*/function (_AbstractEditor) {
|
|
|
13758
15444
|
_get(_getPrototypeOf(MultiSelectEditor.prototype), "register", this).call(this);
|
|
13759
15445
|
|
|
13760
15446
|
if (!this.input) return;
|
|
13761
|
-
|
|
15447
|
+
|
|
15448
|
+
if (this.jsoneditor.options.use_name_attributes) {
|
|
15449
|
+
this.input.setAttribute('name', this.formname);
|
|
15450
|
+
}
|
|
13762
15451
|
}
|
|
13763
15452
|
}, {
|
|
13764
15453
|
key: "unregister",
|
|
@@ -13787,17 +15476,22 @@ var MultiSelectEditor = /*#__PURE__*/function (_AbstractEditor) {
|
|
|
13787
15476
|
this.select_options = {};
|
|
13788
15477
|
this.select_values = {};
|
|
13789
15478
|
this.option_keys = [];
|
|
13790
|
-
this.
|
|
15479
|
+
this.option_enum = [];
|
|
13791
15480
|
var i;
|
|
13792
15481
|
var itemsSchema = this.jsoneditor.expandRefs(this.schema.items || {});
|
|
13793
15482
|
var e = itemsSchema["enum"] || [];
|
|
15483
|
+
var oe = itemsSchema.options ? itemsSchema.options["enum"] || [] : [];
|
|
15484
|
+
/* fallback to enum_titles, when options.enum is not present */
|
|
15485
|
+
|
|
13794
15486
|
var t = itemsSchema.options ? itemsSchema.options.enum_titles || [] : [];
|
|
13795
15487
|
|
|
13796
15488
|
for (i = 0; i < e.length; i++) {
|
|
13797
15489
|
/* If the sanitized value is different from the enum value, don't include it */
|
|
13798
15490
|
if (this.sanitize(e[i]) !== e[i]) continue;
|
|
15491
|
+
var d = oe[i] || {};
|
|
15492
|
+
if (!('title' in d)) d.title = "".concat(t[i] || e[i]);
|
|
13799
15493
|
this.option_keys.push("".concat(e[i]));
|
|
13800
|
-
this.
|
|
15494
|
+
this.option_enum.push(d);
|
|
13801
15495
|
this.select_values["".concat(e[i])] = e[i];
|
|
13802
15496
|
}
|
|
13803
15497
|
}
|
|
@@ -13822,9 +15516,15 @@ var MultiSelectEditor = /*#__PURE__*/function (_AbstractEditor) {
|
|
|
13822
15516
|
this.inputs[this.option_keys[i]] = this.theme.getCheckbox();
|
|
13823
15517
|
this.inputs[this.option_keys[i]].id = id;
|
|
13824
15518
|
this.select_options[this.option_keys[i]] = this.inputs[this.option_keys[i]];
|
|
13825
|
-
var label = this.theme.getCheckboxLabel(this.
|
|
15519
|
+
var label = this.theme.getCheckboxLabel(this.option_enum[i].title);
|
|
13826
15520
|
label.htmlFor = id;
|
|
13827
|
-
|
|
15521
|
+
|
|
15522
|
+
if (this.option_enum[i].infoText) {
|
|
15523
|
+
var infoButton = this.theme.getInfoButton(this.translateProperty(this.option_enum[i].infoText));
|
|
15524
|
+
label.appendChild(infoButton);
|
|
15525
|
+
}
|
|
15526
|
+
|
|
15527
|
+
this.controls['_' + this.option_keys[i]] = this.theme.getFormControl(label, this.inputs[this.option_keys[i]]);
|
|
13828
15528
|
}
|
|
13829
15529
|
|
|
13830
15530
|
this.control = this.theme.getMultiCheckboxHolder(this.controls, this.label, this.description, this.infoButton);
|
|
@@ -13833,7 +15533,9 @@ var MultiSelectEditor = /*#__PURE__*/function (_AbstractEditor) {
|
|
|
13833
15533
|
} else {
|
|
13834
15534
|
this.input_type = 'select';
|
|
13835
15535
|
this.input = this.theme.getSelectInput(this.option_keys, true);
|
|
13836
|
-
this.theme.setSelectOptions(this.input, this.option_keys, this.
|
|
15536
|
+
this.theme.setSelectOptions(this.input, this.option_keys, this.option_enum.map(function (e) {
|
|
15537
|
+
return e.title;
|
|
15538
|
+
}));
|
|
13837
15539
|
/* this.input.multiple = true; */
|
|
13838
15540
|
|
|
13839
15541
|
this.input.setAttribute('multiple', 'multiple');
|
|
@@ -14344,51 +16046,53 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
14344
16046
|
/* harmony import */ var core_js_modules_es_array_includes_js__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_includes_js__WEBPACK_IMPORTED_MODULE_12__);
|
|
14345
16047
|
/* harmony import */ var core_js_modules_es_string_includes_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! core-js/modules/es.string.includes.js */ "./node_modules/core-js/modules/es.string.includes.js");
|
|
14346
16048
|
/* harmony import */ var core_js_modules_es_string_includes_js__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_includes_js__WEBPACK_IMPORTED_MODULE_13__);
|
|
14347
|
-
/* harmony import */ var
|
|
14348
|
-
/* harmony import */ var
|
|
14349
|
-
/* harmony import */ var
|
|
14350
|
-
/* harmony import */ var
|
|
14351
|
-
/* harmony import */ var
|
|
14352
|
-
/* harmony import */ var
|
|
14353
|
-
/* harmony import */ var
|
|
14354
|
-
/* harmony import */ var
|
|
14355
|
-
/* harmony import */ var
|
|
14356
|
-
/* harmony import */ var
|
|
14357
|
-
/* harmony import */ var
|
|
14358
|
-
/* harmony import */ var
|
|
14359
|
-
/* harmony import */ var
|
|
14360
|
-
/* harmony import */ var
|
|
14361
|
-
/* harmony import */ var
|
|
14362
|
-
/* harmony import */ var
|
|
14363
|
-
/* harmony import */ var
|
|
14364
|
-
/* harmony import */ var
|
|
14365
|
-
/* harmony import */ var
|
|
14366
|
-
/* harmony import */ var
|
|
14367
|
-
/* harmony import */ var
|
|
14368
|
-
/* harmony import */ var
|
|
14369
|
-
/* harmony import */ var
|
|
14370
|
-
/* harmony import */ var
|
|
14371
|
-
/* harmony import */ var
|
|
14372
|
-
/* harmony import */ var
|
|
14373
|
-
/* harmony import */ var
|
|
14374
|
-
/* harmony import */ var
|
|
14375
|
-
/* harmony import */ var
|
|
14376
|
-
/* harmony import */ var
|
|
14377
|
-
/* harmony import */ var
|
|
14378
|
-
/* harmony import */ var
|
|
14379
|
-
/* harmony import */ var
|
|
14380
|
-
/* harmony import */ var
|
|
14381
|
-
/* harmony import */ var
|
|
14382
|
-
/* harmony import */ var
|
|
14383
|
-
/* harmony import */ var
|
|
14384
|
-
/* harmony import */ var
|
|
14385
|
-
/* harmony import */ var
|
|
14386
|
-
/* harmony import */ var
|
|
14387
|
-
/* harmony import */ var
|
|
14388
|
-
/* harmony import */ var
|
|
14389
|
-
/* harmony import */ var
|
|
14390
|
-
/* harmony import */ var
|
|
14391
|
-
/* harmony import */ var
|
|
16049
|
+
/* harmony import */ var core_js_modules_es_function_bind_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! core-js/modules/es.function.bind.js */ "./node_modules/core-js/modules/es.function.bind.js");
|
|
16050
|
+
/* harmony import */ var core_js_modules_es_function_bind_js__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_function_bind_js__WEBPACK_IMPORTED_MODULE_14__);
|
|
16051
|
+
/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! core-js/modules/es.symbol.js */ "./node_modules/core-js/modules/es.symbol.js");
|
|
16052
|
+
/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_15__);
|
|
16053
|
+
/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! core-js/modules/es.symbol.description.js */ "./node_modules/core-js/modules/es.symbol.description.js");
|
|
16054
|
+
/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_16__);
|
|
16055
|
+
/* harmony import */ var core_js_modules_es_array_reduce_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! core-js/modules/es.array.reduce.js */ "./node_modules/core-js/modules/es.array.reduce.js");
|
|
16056
|
+
/* harmony import */ var core_js_modules_es_array_reduce_js__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_reduce_js__WEBPACK_IMPORTED_MODULE_17__);
|
|
16057
|
+
/* harmony import */ var core_js_modules_es_array_find_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! core-js/modules/es.array.find.js */ "./node_modules/core-js/modules/es.array.find.js");
|
|
16058
|
+
/* harmony import */ var core_js_modules_es_array_find_js__WEBPACK_IMPORTED_MODULE_18___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_find_js__WEBPACK_IMPORTED_MODULE_18__);
|
|
16059
|
+
/* harmony import */ var core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ "./node_modules/core-js/modules/es.object.set-prototype-of.js");
|
|
16060
|
+
/* harmony import */ var core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_19___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_19__);
|
|
16061
|
+
/* harmony import */ var core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ "./node_modules/core-js/modules/es.object.get-prototype-of.js");
|
|
16062
|
+
/* harmony import */ var core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_20___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_20__);
|
|
16063
|
+
/* harmony import */ var core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! core-js/modules/es.reflect.construct.js */ "./node_modules/core-js/modules/es.reflect.construct.js");
|
|
16064
|
+
/* harmony import */ var core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_21___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_21__);
|
|
16065
|
+
/* harmony import */ var core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! core-js/modules/es.object.create.js */ "./node_modules/core-js/modules/es.object.create.js");
|
|
16066
|
+
/* harmony import */ var core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_22___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_22__);
|
|
16067
|
+
/* harmony import */ var core_js_modules_es_reflect_get_js__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! core-js/modules/es.reflect.get.js */ "./node_modules/core-js/modules/es.reflect.get.js");
|
|
16068
|
+
/* harmony import */ var core_js_modules_es_reflect_get_js__WEBPACK_IMPORTED_MODULE_23___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_reflect_get_js__WEBPACK_IMPORTED_MODULE_23__);
|
|
16069
|
+
/* harmony import */ var core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ "./node_modules/core-js/modules/es.object.get-own-property-descriptor.js");
|
|
16070
|
+
/* harmony import */ var core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_24___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_24__);
|
|
16071
|
+
/* harmony import */ var core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! core-js/modules/es.object.define-property.js */ "./node_modules/core-js/modules/es.object.define-property.js");
|
|
16072
|
+
/* harmony import */ var core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_25___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_25__);
|
|
16073
|
+
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! core-js/modules/es.object.to-string.js */ "./node_modules/core-js/modules/es.object.to-string.js");
|
|
16074
|
+
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_26___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_26__);
|
|
16075
|
+
/* harmony import */ var core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ "./node_modules/core-js/modules/es.symbol.iterator.js");
|
|
16076
|
+
/* harmony import */ var core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_27___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_27__);
|
|
16077
|
+
/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! core-js/modules/es.array.iterator.js */ "./node_modules/core-js/modules/es.array.iterator.js");
|
|
16078
|
+
/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_28___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_28__);
|
|
16079
|
+
/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! core-js/modules/es.string.iterator.js */ "./node_modules/core-js/modules/es.string.iterator.js");
|
|
16080
|
+
/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_29___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_29__);
|
|
16081
|
+
/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ "./node_modules/core-js/modules/web.dom-collections.iterator.js");
|
|
16082
|
+
/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_30___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_30__);
|
|
16083
|
+
/* harmony import */ var core_js_modules_es_array_slice_js__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! core-js/modules/es.array.slice.js */ "./node_modules/core-js/modules/es.array.slice.js");
|
|
16084
|
+
/* harmony import */ var core_js_modules_es_array_slice_js__WEBPACK_IMPORTED_MODULE_31___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_slice_js__WEBPACK_IMPORTED_MODULE_31__);
|
|
16085
|
+
/* harmony import */ var core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! core-js/modules/es.function.name.js */ "./node_modules/core-js/modules/es.function.name.js");
|
|
16086
|
+
/* harmony import */ var core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_32___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_32__);
|
|
16087
|
+
/* harmony import */ var core_js_modules_es_array_from_js__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! core-js/modules/es.array.from.js */ "./node_modules/core-js/modules/es.array.from.js");
|
|
16088
|
+
/* harmony import */ var core_js_modules_es_array_from_js__WEBPACK_IMPORTED_MODULE_33___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_from_js__WEBPACK_IMPORTED_MODULE_33__);
|
|
16089
|
+
/* harmony import */ var core_js_modules_es_object_get_own_property_descriptors_js__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptors.js */ "./node_modules/core-js/modules/es.object.get-own-property-descriptors.js");
|
|
16090
|
+
/* harmony import */ var core_js_modules_es_object_get_own_property_descriptors_js__WEBPACK_IMPORTED_MODULE_34___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_get_own_property_descriptors_js__WEBPACK_IMPORTED_MODULE_34__);
|
|
16091
|
+
/* harmony import */ var core_js_modules_es_object_define_properties_js__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! core-js/modules/es.object.define-properties.js */ "./node_modules/core-js/modules/es.object.define-properties.js");
|
|
16092
|
+
/* harmony import */ var core_js_modules_es_object_define_properties_js__WEBPACK_IMPORTED_MODULE_35___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_define_properties_js__WEBPACK_IMPORTED_MODULE_35__);
|
|
16093
|
+
/* harmony import */ var _editor_js__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ../editor.js */ "./src/editor.js");
|
|
16094
|
+
/* harmony import */ var _utilities_js__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! ../utilities.js */ "./src/utilities.js");
|
|
16095
|
+
/* harmony import */ var _object_css_js__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! ./object.css.js */ "./src/editors/object.css.js");
|
|
14392
16096
|
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; }
|
|
14393
16097
|
|
|
14394
16098
|
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; }
|
|
@@ -14443,6 +16147,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "functi
|
|
|
14443
16147
|
|
|
14444
16148
|
|
|
14445
16149
|
|
|
16150
|
+
|
|
14446
16151
|
|
|
14447
16152
|
|
|
14448
16153
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
@@ -14490,7 +16195,7 @@ var ObjectEditor = /*#__PURE__*/function (_AbstractEditor) {
|
|
|
14490
16195
|
_createClass(ObjectEditor, [{
|
|
14491
16196
|
key: "getDefault",
|
|
14492
16197
|
value: function getDefault() {
|
|
14493
|
-
return Object(
|
|
16198
|
+
return Object(_utilities_js__WEBPACK_IMPORTED_MODULE_37__["extend"])({}, this.schema["default"] || {});
|
|
14494
16199
|
}
|
|
14495
16200
|
}, {
|
|
14496
16201
|
key: "getChildEditors",
|
|
@@ -14850,7 +16555,7 @@ var ObjectEditor = /*#__PURE__*/function (_AbstractEditor) {
|
|
|
14850
16555
|
var firstTab = this.theme.getFirstTab(this.tabs_holder);
|
|
14851
16556
|
|
|
14852
16557
|
if (firstTab) {
|
|
14853
|
-
Object(
|
|
16558
|
+
Object(_utilities_js__WEBPACK_IMPORTED_MODULE_37__["trigger"])(firstTab, 'click');
|
|
14854
16559
|
}
|
|
14855
16560
|
|
|
14856
16561
|
return;
|
|
@@ -14882,7 +16587,7 @@ var ObjectEditor = /*#__PURE__*/function (_AbstractEditor) {
|
|
|
14882
16587
|
|
|
14883
16588
|
/* Schema declared directly in properties */
|
|
14884
16589
|
var schema = this.schema.properties[key] || {};
|
|
14885
|
-
schema = Object(
|
|
16590
|
+
schema = Object(_utilities_js__WEBPACK_IMPORTED_MODULE_37__["extend"])({}, schema);
|
|
14886
16591
|
var matched = !!this.schema.properties[key];
|
|
14887
16592
|
/* Any matching patternProperties should be merged in */
|
|
14888
16593
|
|
|
@@ -14901,7 +16606,7 @@ var ObjectEditor = /*#__PURE__*/function (_AbstractEditor) {
|
|
|
14901
16606
|
|
|
14902
16607
|
|
|
14903
16608
|
if (!matched && this.schema.additionalProperties && _typeof(this.schema.additionalProperties) === 'object') {
|
|
14904
|
-
schema = Object(
|
|
16609
|
+
schema = Object(_utilities_js__WEBPACK_IMPORTED_MODULE_37__["extend"])({}, this.schema.additionalProperties);
|
|
14905
16610
|
}
|
|
14906
16611
|
|
|
14907
16612
|
return schema;
|
|
@@ -15218,7 +16923,7 @@ var ObjectEditor = /*#__PURE__*/function (_AbstractEditor) {
|
|
|
15218
16923
|
this.addproperty_holder.appendChild(spacer);
|
|
15219
16924
|
/* Close properties modal if clicked outside modal */
|
|
15220
16925
|
|
|
15221
|
-
document.addEventListener('click', this.onOutsideModalClick);
|
|
16926
|
+
document.addEventListener('click', this.onOutsideModalClick.bind(this));
|
|
15222
16927
|
/* Description */
|
|
15223
16928
|
|
|
15224
16929
|
if (this.schema.description) {
|
|
@@ -15296,7 +17001,7 @@ var ObjectEditor = /*#__PURE__*/function (_AbstractEditor) {
|
|
|
15296
17001
|
});
|
|
15297
17002
|
|
|
15298
17003
|
if (this.rows[0]) {
|
|
15299
|
-
Object(
|
|
17004
|
+
Object(_utilities_js__WEBPACK_IMPORTED_MODULE_37__["trigger"])(this.rows[0].tab, 'click');
|
|
15300
17005
|
}
|
|
15301
17006
|
/* Show/Hide button */
|
|
15302
17007
|
|
|
@@ -15324,7 +17029,7 @@ var ObjectEditor = /*#__PURE__*/function (_AbstractEditor) {
|
|
|
15324
17029
|
/* If it should start collapsed */
|
|
15325
17030
|
|
|
15326
17031
|
if (this.options.collapsed) {
|
|
15327
|
-
Object(
|
|
17032
|
+
Object(_utilities_js__WEBPACK_IMPORTED_MODULE_37__["trigger"])(this.collapse_control, 'click');
|
|
15328
17033
|
}
|
|
15329
17034
|
/* Collapse button disabled */
|
|
15330
17035
|
|
|
@@ -15662,7 +17367,9 @@ var ObjectEditor = /*#__PURE__*/function (_AbstractEditor) {
|
|
|
15662
17367
|
}, {
|
|
15663
17368
|
key: "onOutsideModalClick",
|
|
15664
17369
|
value: function onOutsideModalClick(e) {
|
|
15665
|
-
|
|
17370
|
+
var path = e.path || e.composedPath && e.composedPath();
|
|
17371
|
+
|
|
17372
|
+
if (this.addproperty_holder && !this.addproperty_holder.contains(path[0]) && this.adding_property) {
|
|
15666
17373
|
e.preventDefault();
|
|
15667
17374
|
e.stopPropagation();
|
|
15668
17375
|
this.toggleAddProperty();
|
|
@@ -15782,7 +17489,7 @@ var ObjectEditor = /*#__PURE__*/function (_AbstractEditor) {
|
|
|
15782
17489
|
_this11.addproperty_checkboxes[i].disabled = _this11.addproperty_checkboxes[i].checked;
|
|
15783
17490
|
if (!_this11.addproperty_checkboxes[i].checked) showModal = true;
|
|
15784
17491
|
} else if (!(i in _this11.editors)) {
|
|
15785
|
-
if (!canAdd && !Object(
|
|
17492
|
+
if (!canAdd && !Object(_utilities_js__WEBPACK_IMPORTED_MODULE_37__["hasOwnProperty"])(_this11.schema.properties, i)) {
|
|
15786
17493
|
_this11.addproperty_checkboxes[i].disabled = true;
|
|
15787
17494
|
} else {
|
|
15788
17495
|
_this11.addproperty_checkboxes[i].disabled = false;
|
|
@@ -15931,8 +17638,8 @@ var ObjectEditor = /*#__PURE__*/function (_AbstractEditor) {
|
|
|
15931
17638
|
}]);
|
|
15932
17639
|
|
|
15933
17640
|
return ObjectEditor;
|
|
15934
|
-
}(
|
|
15935
|
-
ObjectEditor.rules =
|
|
17641
|
+
}(_editor_js__WEBPACK_IMPORTED_MODULE_36__["AbstractEditor"]);
|
|
17642
|
+
ObjectEditor.rules = _object_css_js__WEBPACK_IMPORTED_MODULE_38__["default"];
|
|
15936
17643
|
|
|
15937
17644
|
/***/ }),
|
|
15938
17645
|
|
|
@@ -15952,31 +17659,33 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
15952
17659
|
/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_1__);
|
|
15953
17660
|
/* harmony import */ var core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core-js/modules/es.array.concat.js */ "./node_modules/core-js/modules/es.array.concat.js");
|
|
15954
17661
|
/* harmony import */ var core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_2__);
|
|
15955
|
-
/* harmony import */ var
|
|
15956
|
-
/* harmony import */ var
|
|
15957
|
-
/* harmony import */ var
|
|
15958
|
-
/* harmony import */ var
|
|
15959
|
-
/* harmony import */ var
|
|
15960
|
-
/* harmony import */ var
|
|
15961
|
-
/* harmony import */ var
|
|
15962
|
-
/* harmony import */ var
|
|
15963
|
-
/* harmony import */ var
|
|
15964
|
-
/* harmony import */ var
|
|
15965
|
-
/* harmony import */ var
|
|
15966
|
-
/* harmony import */ var
|
|
15967
|
-
/* harmony import */ var
|
|
15968
|
-
/* harmony import */ var
|
|
15969
|
-
/* harmony import */ var
|
|
15970
|
-
/* harmony import */ var
|
|
15971
|
-
/* harmony import */ var
|
|
15972
|
-
/* harmony import */ var
|
|
15973
|
-
/* harmony import */ var
|
|
15974
|
-
/* harmony import */ var
|
|
15975
|
-
/* harmony import */ var
|
|
15976
|
-
/* harmony import */ var
|
|
15977
|
-
/* harmony import */ var
|
|
15978
|
-
/* harmony import */ var
|
|
15979
|
-
/* harmony import */ var
|
|
17662
|
+
/* harmony import */ var core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core-js/modules/es.function.name.js */ "./node_modules/core-js/modules/es.function.name.js");
|
|
17663
|
+
/* harmony import */ var core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_3__);
|
|
17664
|
+
/* harmony import */ var core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ "./node_modules/core-js/modules/es.object.set-prototype-of.js");
|
|
17665
|
+
/* harmony import */ var core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_4__);
|
|
17666
|
+
/* harmony import */ var core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ "./node_modules/core-js/modules/es.object.get-prototype-of.js");
|
|
17667
|
+
/* harmony import */ var core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_5__);
|
|
17668
|
+
/* harmony import */ var core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! core-js/modules/es.reflect.construct.js */ "./node_modules/core-js/modules/es.reflect.construct.js");
|
|
17669
|
+
/* harmony import */ var core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_6__);
|
|
17670
|
+
/* harmony import */ var core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! core-js/modules/es.object.create.js */ "./node_modules/core-js/modules/es.object.create.js");
|
|
17671
|
+
/* harmony import */ var core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_7__);
|
|
17672
|
+
/* harmony import */ var core_js_modules_es_reflect_get_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! core-js/modules/es.reflect.get.js */ "./node_modules/core-js/modules/es.reflect.get.js");
|
|
17673
|
+
/* harmony import */ var core_js_modules_es_reflect_get_js__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_reflect_get_js__WEBPACK_IMPORTED_MODULE_8__);
|
|
17674
|
+
/* harmony import */ var core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ "./node_modules/core-js/modules/es.object.get-own-property-descriptor.js");
|
|
17675
|
+
/* harmony import */ var core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_9__);
|
|
17676
|
+
/* harmony import */ var core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! core-js/modules/es.object.define-property.js */ "./node_modules/core-js/modules/es.object.define-property.js");
|
|
17677
|
+
/* harmony import */ var core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_10__);
|
|
17678
|
+
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! core-js/modules/es.object.to-string.js */ "./node_modules/core-js/modules/es.object.to-string.js");
|
|
17679
|
+
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_11__);
|
|
17680
|
+
/* harmony import */ var core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ "./node_modules/core-js/modules/es.symbol.iterator.js");
|
|
17681
|
+
/* harmony import */ var core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_12__);
|
|
17682
|
+
/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! core-js/modules/es.array.iterator.js */ "./node_modules/core-js/modules/es.array.iterator.js");
|
|
17683
|
+
/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_13__);
|
|
17684
|
+
/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! core-js/modules/es.string.iterator.js */ "./node_modules/core-js/modules/es.string.iterator.js");
|
|
17685
|
+
/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_14__);
|
|
17686
|
+
/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ "./node_modules/core-js/modules/web.dom-collections.iterator.js");
|
|
17687
|
+
/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_15__);
|
|
17688
|
+
/* harmony import */ var _select_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./select.js */ "./src/editors/select.js");
|
|
15980
17689
|
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); }
|
|
15981
17690
|
|
|
15982
17691
|
|
|
@@ -15995,6 +17704,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "functi
|
|
|
15995
17704
|
|
|
15996
17705
|
|
|
15997
17706
|
|
|
17707
|
+
|
|
15998
17708
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
15999
17709
|
|
|
16000
17710
|
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); } }
|
|
@@ -16063,11 +17773,16 @@ var RadioEditor = /*#__PURE__*/function (_SelectEditor) {
|
|
|
16063
17773
|
|
|
16064
17774
|
for (var i = 0; i < this.enum_values.length; i++) {
|
|
16065
17775
|
/* form radio elements */
|
|
16066
|
-
|
|
16067
|
-
name: this.formname,
|
|
17776
|
+
var attributes = {
|
|
16068
17777
|
id: "".concat(this.formname, "[").concat(i, "]"),
|
|
16069
17778
|
value: this.enum_values[i]
|
|
16070
|
-
}
|
|
17779
|
+
};
|
|
17780
|
+
|
|
17781
|
+
if (this.jsoneditor.options.use_name_attributes) {
|
|
17782
|
+
attributes.name = this.formname;
|
|
17783
|
+
}
|
|
17784
|
+
|
|
17785
|
+
this.input = this.theme.getFormRadio(attributes);
|
|
16071
17786
|
/* Set custom attributes on input element. Parameter is array of protected keys. Empty array if none. */
|
|
16072
17787
|
|
|
16073
17788
|
this.setInputAttributes(['id', 'value', 'name']);
|
|
@@ -16158,7 +17873,7 @@ var RadioEditor = /*#__PURE__*/function (_SelectEditor) {
|
|
|
16158
17873
|
}]);
|
|
16159
17874
|
|
|
16160
17875
|
return RadioEditor;
|
|
16161
|
-
}(
|
|
17876
|
+
}(_select_js__WEBPACK_IMPORTED_MODULE_16__["SelectEditor"]);
|
|
16162
17877
|
|
|
16163
17878
|
/***/ }),
|
|
16164
17879
|
|
|
@@ -16514,7 +18229,10 @@ var SelectEditor = /*#__PURE__*/function (_AbstractEditor) {
|
|
|
16514
18229
|
_get(_getPrototypeOf(SelectEditor.prototype), "register", this).call(this);
|
|
16515
18230
|
|
|
16516
18231
|
if (!this.input) return;
|
|
16517
|
-
|
|
18232
|
+
|
|
18233
|
+
if (this.jsoneditor.options.use_name_attributes) {
|
|
18234
|
+
this.input.setAttribute('name', this.formname);
|
|
18235
|
+
}
|
|
16518
18236
|
}
|
|
16519
18237
|
}, {
|
|
16520
18238
|
key: "unregister",
|
|
@@ -17503,7 +19221,11 @@ var SignatureEditor = /*#__PURE__*/function (_StringEditor) {
|
|
|
17503
19221
|
/* Create canvas for signature pad */
|
|
17504
19222
|
|
|
17505
19223
|
var canvas = document.createElement('canvas');
|
|
17506
|
-
|
|
19224
|
+
|
|
19225
|
+
if (this.jsoneditor.options.use_name_attributes) {
|
|
19226
|
+
canvas.setAttribute('name', formname);
|
|
19227
|
+
}
|
|
19228
|
+
|
|
17507
19229
|
canvas.classList.add('signature');
|
|
17508
19230
|
signatureContainer.appendChild(canvas);
|
|
17509
19231
|
this.signaturePad = new window.SignaturePad(canvas, {
|
|
@@ -18387,7 +20109,11 @@ var StringEditor = /*#__PURE__*/function (_AbstractEditor) {
|
|
|
18387
20109
|
_get(_getPrototypeOf(StringEditor.prototype), "register", this).call(this);
|
|
18388
20110
|
|
|
18389
20111
|
if (!this.input) return;
|
|
18390
|
-
|
|
20112
|
+
|
|
20113
|
+
if (this.jsoneditor.options.use_name_attributes) {
|
|
20114
|
+
this.input.setAttribute('name', this.formname);
|
|
20115
|
+
}
|
|
20116
|
+
|
|
18391
20117
|
this.input.setAttribute('aria-label', this.formname);
|
|
18392
20118
|
}
|
|
18393
20119
|
}, {
|
|
@@ -18608,6 +20334,12 @@ var StringEditor = /*#__PURE__*/function (_AbstractEditor) {
|
|
|
18608
20334
|
/* it will generate an error trying to append it to the missing parentNode */
|
|
18609
20335
|
if (_this.input.parentNode) _this.afterInputReady();
|
|
18610
20336
|
if (_this.adjust_height) _this.adjust_height(_this.input);
|
|
20337
|
+
|
|
20338
|
+
if (_this.format === 'range') {
|
|
20339
|
+
var output = _this.control.querySelector('output');
|
|
20340
|
+
|
|
20341
|
+
output.value = _this.input.value;
|
|
20342
|
+
}
|
|
18611
20343
|
});
|
|
18612
20344
|
/* Compile and store the template */
|
|
18613
20345
|
|
|
@@ -18835,32 +20567,34 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
18835
20567
|
/* harmony import */ var core_js_modules_es_array_some_js__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_some_js__WEBPACK_IMPORTED_MODULE_8__);
|
|
18836
20568
|
/* harmony import */ var core_js_modules_es_array_splice_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! core-js/modules/es.array.splice.js */ "./node_modules/core-js/modules/es.array.splice.js");
|
|
18837
20569
|
/* harmony import */ var core_js_modules_es_array_splice_js__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_splice_js__WEBPACK_IMPORTED_MODULE_9__);
|
|
18838
|
-
/* harmony import */ var
|
|
18839
|
-
/* harmony import */ var
|
|
18840
|
-
/* harmony import */ var
|
|
18841
|
-
/* harmony import */ var
|
|
18842
|
-
/* harmony import */ var
|
|
18843
|
-
/* harmony import */ var
|
|
18844
|
-
/* harmony import */ var
|
|
18845
|
-
/* harmony import */ var
|
|
18846
|
-
/* harmony import */ var
|
|
18847
|
-
/* harmony import */ var
|
|
18848
|
-
/* harmony import */ var
|
|
18849
|
-
/* harmony import */ var
|
|
18850
|
-
/* harmony import */ var
|
|
18851
|
-
/* harmony import */ var
|
|
18852
|
-
/* harmony import */ var
|
|
18853
|
-
/* harmony import */ var
|
|
18854
|
-
/* harmony import */ var
|
|
18855
|
-
/* harmony import */ var
|
|
18856
|
-
/* harmony import */ var
|
|
18857
|
-
/* harmony import */ var
|
|
18858
|
-
/* harmony import */ var
|
|
18859
|
-
/* harmony import */ var
|
|
18860
|
-
/* harmony import */ var
|
|
18861
|
-
/* harmony import */ var
|
|
18862
|
-
/* harmony import */ var
|
|
18863
|
-
/* harmony import */ var
|
|
20570
|
+
/* harmony import */ var core_js_modules_es_object_assign_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! core-js/modules/es.object.assign.js */ "./node_modules/core-js/modules/es.object.assign.js");
|
|
20571
|
+
/* harmony import */ var core_js_modules_es_object_assign_js__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_assign_js__WEBPACK_IMPORTED_MODULE_10__);
|
|
20572
|
+
/* harmony import */ var core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ "./node_modules/core-js/modules/es.object.set-prototype-of.js");
|
|
20573
|
+
/* harmony import */ var core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_11__);
|
|
20574
|
+
/* harmony import */ var core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ "./node_modules/core-js/modules/es.object.get-prototype-of.js");
|
|
20575
|
+
/* harmony import */ var core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_12__);
|
|
20576
|
+
/* harmony import */ var core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! core-js/modules/es.reflect.construct.js */ "./node_modules/core-js/modules/es.reflect.construct.js");
|
|
20577
|
+
/* harmony import */ var core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_13__);
|
|
20578
|
+
/* harmony import */ var core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! core-js/modules/es.object.create.js */ "./node_modules/core-js/modules/es.object.create.js");
|
|
20579
|
+
/* harmony import */ var core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_14__);
|
|
20580
|
+
/* harmony import */ var core_js_modules_es_reflect_get_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! core-js/modules/es.reflect.get.js */ "./node_modules/core-js/modules/es.reflect.get.js");
|
|
20581
|
+
/* harmony import */ var core_js_modules_es_reflect_get_js__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_reflect_get_js__WEBPACK_IMPORTED_MODULE_15__);
|
|
20582
|
+
/* harmony import */ var core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ "./node_modules/core-js/modules/es.object.get-own-property-descriptor.js");
|
|
20583
|
+
/* harmony import */ var core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_16__);
|
|
20584
|
+
/* harmony import */ var core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! core-js/modules/es.object.define-property.js */ "./node_modules/core-js/modules/es.object.define-property.js");
|
|
20585
|
+
/* harmony import */ var core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_17__);
|
|
20586
|
+
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! core-js/modules/es.object.to-string.js */ "./node_modules/core-js/modules/es.object.to-string.js");
|
|
20587
|
+
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_18___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_18__);
|
|
20588
|
+
/* harmony import */ var core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ "./node_modules/core-js/modules/es.symbol.iterator.js");
|
|
20589
|
+
/* harmony import */ var core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_19___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_19__);
|
|
20590
|
+
/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! core-js/modules/es.array.iterator.js */ "./node_modules/core-js/modules/es.array.iterator.js");
|
|
20591
|
+
/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_20___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_20__);
|
|
20592
|
+
/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! core-js/modules/es.string.iterator.js */ "./node_modules/core-js/modules/es.string.iterator.js");
|
|
20593
|
+
/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_21___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_21__);
|
|
20594
|
+
/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ "./node_modules/core-js/modules/web.dom-collections.iterator.js");
|
|
20595
|
+
/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_22___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_22__);
|
|
20596
|
+
/* harmony import */ var _array_js__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./array.js */ "./src/editors/array.js");
|
|
20597
|
+
/* harmony import */ var _utilities_js__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ../utilities.js */ "./src/utilities.js");
|
|
18864
20598
|
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); }
|
|
18865
20599
|
|
|
18866
20600
|
|
|
@@ -18884,6 +20618,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "functi
|
|
|
18884
20618
|
|
|
18885
20619
|
|
|
18886
20620
|
|
|
20621
|
+
|
|
18887
20622
|
|
|
18888
20623
|
|
|
18889
20624
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
@@ -19050,7 +20785,7 @@ var TableEditor = /*#__PURE__*/function (_ArrayEditor) {
|
|
|
19050
20785
|
}, {
|
|
19051
20786
|
key: "getItemDefault",
|
|
19052
20787
|
value: function getItemDefault() {
|
|
19053
|
-
return Object(
|
|
20788
|
+
return Object(_utilities_js__WEBPACK_IMPORTED_MODULE_24__["extend"])({}, {
|
|
19054
20789
|
"default": this.item_default
|
|
19055
20790
|
})["default"];
|
|
19056
20791
|
}
|
|
@@ -19062,7 +20797,7 @@ var TableEditor = /*#__PURE__*/function (_ArrayEditor) {
|
|
|
19062
20797
|
}, {
|
|
19063
20798
|
key: "getElementEditor",
|
|
19064
20799
|
value: function getElementEditor(i, ignore) {
|
|
19065
|
-
var schemaCopy = Object(
|
|
20800
|
+
var schemaCopy = Object(_utilities_js__WEBPACK_IMPORTED_MODULE_24__["extend"])({}, this.schema.items);
|
|
19066
20801
|
var editor = this.jsoneditor.getEditorClass(schemaCopy, this.jsoneditor);
|
|
19067
20802
|
var row = this.row_holder.appendChild(this.theme.getTableRow());
|
|
19068
20803
|
var holder = row;
|
|
@@ -19317,6 +21052,7 @@ var TableEditor = /*#__PURE__*/function (_ArrayEditor) {
|
|
|
19317
21052
|
var _this5 = this;
|
|
19318
21053
|
|
|
19319
21054
|
var button = this.getButton('', 'copy', 'button_copy_row_title_short');
|
|
21055
|
+
var schema = this.schema;
|
|
19320
21056
|
button.classList.add('copy', 'json-editor-btntype-copy');
|
|
19321
21057
|
button.setAttribute('data-i', i);
|
|
19322
21058
|
button.addEventListener('click', function (e) {
|
|
@@ -19326,7 +21062,27 @@ var TableEditor = /*#__PURE__*/function (_ArrayEditor) {
|
|
|
19326
21062
|
|
|
19327
21063
|
var value = _this5.getValue();
|
|
19328
21064
|
|
|
19329
|
-
|
|
21065
|
+
var newValue = value[j];
|
|
21066
|
+
/* On copy, recreate uuid if needed. */
|
|
21067
|
+
|
|
21068
|
+
if (schema.items.type === 'string' && schema.items.format === 'uuid') {
|
|
21069
|
+
newValue = Object(_utilities_js__WEBPACK_IMPORTED_MODULE_24__["generateUUID"])();
|
|
21070
|
+
} else if (schema.items.type === 'object' && schema.items.properties) {
|
|
21071
|
+
value.forEach(function (row, i) {
|
|
21072
|
+
if (j === i) {
|
|
21073
|
+
for (var _i = 0, _Object$keys = Object.keys(row); _i < _Object$keys.length; _i++) {
|
|
21074
|
+
var key = _Object$keys[_i];
|
|
21075
|
+
|
|
21076
|
+
if (schema.items.properties && schema.items.properties[key] && schema.items.properties[key].format === 'uuid') {
|
|
21077
|
+
newValue = Object.assign({}, value[j]);
|
|
21078
|
+
newValue[key] = Object(_utilities_js__WEBPACK_IMPORTED_MODULE_24__["generateUUID"])();
|
|
21079
|
+
}
|
|
21080
|
+
}
|
|
21081
|
+
}
|
|
21082
|
+
});
|
|
21083
|
+
}
|
|
21084
|
+
|
|
21085
|
+
value.splice(j + 1, 0, newValue);
|
|
19330
21086
|
|
|
19331
21087
|
_this5.setValue(value);
|
|
19332
21088
|
|
|
@@ -19418,7 +21174,7 @@ var TableEditor = /*#__PURE__*/function (_ArrayEditor) {
|
|
|
19418
21174
|
/* If it should start collapsed */
|
|
19419
21175
|
|
|
19420
21176
|
if (this.options.collapsed) {
|
|
19421
|
-
Object(
|
|
21177
|
+
Object(_utilities_js__WEBPACK_IMPORTED_MODULE_24__["trigger"])(this.toggle_button, 'click');
|
|
19422
21178
|
}
|
|
19423
21179
|
/* Collapse button disabled */
|
|
19424
21180
|
|
|
@@ -19522,7 +21278,7 @@ var TableEditor = /*#__PURE__*/function (_ArrayEditor) {
|
|
|
19522
21278
|
}]);
|
|
19523
21279
|
|
|
19524
21280
|
return TableEditor;
|
|
19525
|
-
}(
|
|
21281
|
+
}(_array_js__WEBPACK_IMPORTED_MODULE_23__["ArrayEditor"]);
|
|
19526
21282
|
|
|
19527
21283
|
/***/ }),
|
|
19528
21284
|
|
|
@@ -19957,7 +21713,7 @@ var UploadEditor = /*#__PURE__*/function (_AbstractEditor) {
|
|
|
19957
21713
|
|
|
19958
21714
|
if (this.options.auto_upload) {
|
|
19959
21715
|
uploadButton.dispatchEvent(new window.MouseEvent('click'));
|
|
19960
|
-
|
|
21716
|
+
uploadButton.parentNode.removeChild(uploadButton);
|
|
19961
21717
|
}
|
|
19962
21718
|
}
|
|
19963
21719
|
}, {
|
|
@@ -20049,43 +21805,36 @@ var UploadEditor = /*#__PURE__*/function (_AbstractEditor) {
|
|
|
20049
21805
|
"use strict";
|
|
20050
21806
|
__webpack_require__.r(__webpack_exports__);
|
|
20051
21807
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "UuidEditor", function() { return UuidEditor; });
|
|
20052
|
-
/* harmony import */ var
|
|
20053
|
-
/* harmony import */ var
|
|
20054
|
-
/* harmony import */ var
|
|
20055
|
-
/* harmony import */ var
|
|
20056
|
-
/* harmony import */ var
|
|
20057
|
-
/* harmony import */ var
|
|
20058
|
-
/* harmony import */ var
|
|
20059
|
-
/* harmony import */ var
|
|
20060
|
-
/* harmony import */ var
|
|
20061
|
-
/* harmony import */ var
|
|
20062
|
-
/* harmony import */ var
|
|
20063
|
-
/* harmony import */ var
|
|
20064
|
-
/* harmony import */ var
|
|
20065
|
-
/* harmony import */ var
|
|
20066
|
-
/* harmony import */ var
|
|
20067
|
-
/* harmony import */ var
|
|
20068
|
-
/* harmony import */ var
|
|
20069
|
-
/* harmony import */ var
|
|
20070
|
-
/* harmony import */ var
|
|
20071
|
-
/* harmony import */ var
|
|
20072
|
-
/* harmony import */ var
|
|
20073
|
-
/* harmony import */ var
|
|
20074
|
-
/* harmony import */ var
|
|
20075
|
-
/* harmony import */ var
|
|
20076
|
-
/* harmony import */ var
|
|
20077
|
-
/* harmony import */ var
|
|
20078
|
-
/* harmony import */ var
|
|
20079
|
-
/* harmony import */ var
|
|
20080
|
-
/* harmony import */ var
|
|
20081
|
-
/* harmony import */ var
|
|
20082
|
-
/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! core-js/modules/es.array.iterator.js */ "./node_modules/core-js/modules/es.array.iterator.js");
|
|
20083
|
-
/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_15__);
|
|
20084
|
-
/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! core-js/modules/es.string.iterator.js */ "./node_modules/core-js/modules/es.string.iterator.js");
|
|
20085
|
-
/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_16__);
|
|
20086
|
-
/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ "./node_modules/core-js/modules/web.dom-collections.iterator.js");
|
|
20087
|
-
/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_17__);
|
|
20088
|
-
/* harmony import */ var _string_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./string.js */ "./src/editors/string.js");
|
|
21808
|
+
/* harmony import */ var core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ "./node_modules/core-js/modules/es.object.set-prototype-of.js");
|
|
21809
|
+
/* harmony import */ var core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_0__);
|
|
21810
|
+
/* harmony import */ var core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ "./node_modules/core-js/modules/es.object.get-prototype-of.js");
|
|
21811
|
+
/* harmony import */ var core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_get_prototype_of_js__WEBPACK_IMPORTED_MODULE_1__);
|
|
21812
|
+
/* harmony import */ var core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core-js/modules/es.reflect.construct.js */ "./node_modules/core-js/modules/es.reflect.construct.js");
|
|
21813
|
+
/* harmony import */ var core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_2__);
|
|
21814
|
+
/* harmony import */ var core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core-js/modules/es.object.create.js */ "./node_modules/core-js/modules/es.object.create.js");
|
|
21815
|
+
/* harmony import */ var core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_create_js__WEBPACK_IMPORTED_MODULE_3__);
|
|
21816
|
+
/* harmony import */ var core_js_modules_es_reflect_get_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! core-js/modules/es.reflect.get.js */ "./node_modules/core-js/modules/es.reflect.get.js");
|
|
21817
|
+
/* harmony import */ var core_js_modules_es_reflect_get_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_reflect_get_js__WEBPACK_IMPORTED_MODULE_4__);
|
|
21818
|
+
/* harmony import */ var core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ "./node_modules/core-js/modules/es.object.get-own-property-descriptor.js");
|
|
21819
|
+
/* harmony import */ var core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_5__);
|
|
21820
|
+
/* harmony import */ var core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! core-js/modules/es.object.define-property.js */ "./node_modules/core-js/modules/es.object.define-property.js");
|
|
21821
|
+
/* harmony import */ var core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_6__);
|
|
21822
|
+
/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! core-js/modules/es.symbol.js */ "./node_modules/core-js/modules/es.symbol.js");
|
|
21823
|
+
/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_7__);
|
|
21824
|
+
/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! core-js/modules/es.symbol.description.js */ "./node_modules/core-js/modules/es.symbol.description.js");
|
|
21825
|
+
/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_8__);
|
|
21826
|
+
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! core-js/modules/es.object.to-string.js */ "./node_modules/core-js/modules/es.object.to-string.js");
|
|
21827
|
+
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_9__);
|
|
21828
|
+
/* harmony import */ var core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ "./node_modules/core-js/modules/es.symbol.iterator.js");
|
|
21829
|
+
/* harmony import */ var core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_10__);
|
|
21830
|
+
/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! core-js/modules/es.array.iterator.js */ "./node_modules/core-js/modules/es.array.iterator.js");
|
|
21831
|
+
/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_11__);
|
|
21832
|
+
/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! core-js/modules/es.string.iterator.js */ "./node_modules/core-js/modules/es.string.iterator.js");
|
|
21833
|
+
/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_12__);
|
|
21834
|
+
/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ "./node_modules/core-js/modules/web.dom-collections.iterator.js");
|
|
21835
|
+
/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_13__);
|
|
21836
|
+
/* harmony import */ var _utilities_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../utilities.js */ "./src/utilities.js");
|
|
21837
|
+
/* harmony import */ var _string_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./string.js */ "./src/editors/string.js");
|
|
20089
21838
|
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); }
|
|
20090
21839
|
|
|
20091
21840
|
|
|
@@ -20103,10 +21852,6 @@ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "functi
|
|
|
20103
21852
|
|
|
20104
21853
|
|
|
20105
21854
|
|
|
20106
|
-
|
|
20107
|
-
|
|
20108
|
-
|
|
20109
|
-
|
|
20110
21855
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
20111
21856
|
|
|
20112
21857
|
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); } }
|
|
@@ -20132,6 +21877,7 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
|
|
|
20132
21877
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
20133
21878
|
|
|
20134
21879
|
|
|
21880
|
+
|
|
20135
21881
|
var UuidEditor = /*#__PURE__*/function (_StringEditor) {
|
|
20136
21882
|
_inherits(UuidEditor, _StringEditor);
|
|
20137
21883
|
|
|
@@ -20189,19 +21935,7 @@ var UuidEditor = /*#__PURE__*/function (_StringEditor) {
|
|
|
20189
21935
|
}, {
|
|
20190
21936
|
key: "getUuid",
|
|
20191
21937
|
value: function getUuid() {
|
|
20192
|
-
|
|
20193
|
-
var d = new Date().getTime();
|
|
20194
|
-
|
|
20195
|
-
if (typeof performance !== 'undefined' && typeof performance.now === 'function') {
|
|
20196
|
-
d += performance.now();
|
|
20197
|
-
/* use high-precision timer if available */
|
|
20198
|
-
}
|
|
20199
|
-
|
|
20200
|
-
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
|
|
20201
|
-
var r = (d + Math.random() * 16) % 16 | 0;
|
|
20202
|
-
d = Math.floor(d / 16);
|
|
20203
|
-
return (c === 'x' ? r : r & 0x3 | 0x8).toString(16);
|
|
20204
|
-
});
|
|
21938
|
+
return Object(_utilities_js__WEBPACK_IMPORTED_MODULE_14__["generateUUID"])();
|
|
20205
21939
|
}
|
|
20206
21940
|
}, {
|
|
20207
21941
|
key: "testUuid",
|
|
@@ -20211,7 +21945,7 @@ var UuidEditor = /*#__PURE__*/function (_StringEditor) {
|
|
|
20211
21945
|
}]);
|
|
20212
21946
|
|
|
20213
21947
|
return UuidEditor;
|
|
20214
|
-
}(
|
|
21948
|
+
}(_string_js__WEBPACK_IMPORTED_MODULE_15__["StringEditor"]);
|
|
20215
21949
|
|
|
20216
21950
|
/***/ }),
|
|
20217
21951
|
|
|
@@ -20311,7 +22045,7 @@ var AbstractIconLib = /*#__PURE__*/function () {
|
|
|
20311
22045
|
_createClass(AbstractIconLib, [{
|
|
20312
22046
|
key: "getIconClass",
|
|
20313
22047
|
value: function getIconClass(key) {
|
|
20314
|
-
return this.mapping[key] ? this.icon_prefix + this.mapping[key] :
|
|
22048
|
+
return this.mapping[key] ? this.icon_prefix + this.mapping[key] : this.icon_prefix + key;
|
|
20315
22049
|
}
|
|
20316
22050
|
}, {
|
|
20317
22051
|
key: "getIcon",
|
|
@@ -21298,63 +23032,73 @@ var resolvers = [colorPicker, ip, ace, xhtml, markdown, jodit, autoComplete, uui
|
|
|
21298
23032
|
"use strict";
|
|
21299
23033
|
__webpack_require__.r(__webpack_exports__);
|
|
21300
23034
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SchemaLoader", function() { return SchemaLoader; });
|
|
21301
|
-
/* harmony import */ var
|
|
21302
|
-
/* harmony import */ var
|
|
21303
|
-
/* harmony import */ var
|
|
21304
|
-
/* harmony import */ var
|
|
21305
|
-
/* harmony import */ var
|
|
21306
|
-
/* harmony import */ var
|
|
21307
|
-
/* harmony import */ var
|
|
21308
|
-
/* harmony import */ var
|
|
21309
|
-
/* harmony import */ var
|
|
21310
|
-
/* harmony import */ var
|
|
21311
|
-
/* harmony import */ var
|
|
21312
|
-
/* harmony import */ var
|
|
21313
|
-
/* harmony import */ var
|
|
21314
|
-
/* harmony import */ var
|
|
21315
|
-
/* harmony import */ var
|
|
21316
|
-
/* harmony import */ var
|
|
21317
|
-
/* harmony import */ var
|
|
21318
|
-
/* harmony import */ var
|
|
21319
|
-
/* harmony import */ var
|
|
21320
|
-
/* harmony import */ var
|
|
21321
|
-
/* harmony import */ var
|
|
21322
|
-
/* harmony import */ var
|
|
21323
|
-
/* harmony import */ var
|
|
21324
|
-
/* harmony import */ var
|
|
23035
|
+
/* harmony import */ var regenerator_runtime_runtime_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! regenerator-runtime/runtime.js */ "./node_modules/regenerator-runtime/runtime.js");
|
|
23036
|
+
/* harmony import */ var regenerator_runtime_runtime_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(regenerator_runtime_runtime_js__WEBPACK_IMPORTED_MODULE_0__);
|
|
23037
|
+
/* harmony import */ var core_js_modules_es_array_for_each_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.array.for-each.js */ "./node_modules/core-js/modules/es.array.for-each.js");
|
|
23038
|
+
/* harmony import */ var core_js_modules_es_array_for_each_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_for_each_js__WEBPACK_IMPORTED_MODULE_1__);
|
|
23039
|
+
/* harmony import */ var core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ "./node_modules/core-js/modules/web.dom-collections.for-each.js");
|
|
23040
|
+
/* harmony import */ var core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_2__);
|
|
23041
|
+
/* harmony import */ var core_js_modules_es_object_entries_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core-js/modules/es.object.entries.js */ "./node_modules/core-js/modules/es.object.entries.js");
|
|
23042
|
+
/* harmony import */ var core_js_modules_es_object_entries_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_entries_js__WEBPACK_IMPORTED_MODULE_3__);
|
|
23043
|
+
/* harmony import */ var core_js_modules_es_array_is_array_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! core-js/modules/es.array.is-array.js */ "./node_modules/core-js/modules/es.array.is-array.js");
|
|
23044
|
+
/* harmony import */ var core_js_modules_es_array_is_array_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_is_array_js__WEBPACK_IMPORTED_MODULE_4__);
|
|
23045
|
+
/* harmony import */ var core_js_modules_es_array_reduce_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! core-js/modules/es.array.reduce.js */ "./node_modules/core-js/modules/es.array.reduce.js");
|
|
23046
|
+
/* harmony import */ var core_js_modules_es_array_reduce_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_reduce_js__WEBPACK_IMPORTED_MODULE_5__);
|
|
23047
|
+
/* harmony import */ var core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! core-js/modules/es.regexp.exec.js */ "./node_modules/core-js/modules/es.regexp.exec.js");
|
|
23048
|
+
/* harmony import */ var core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_6__);
|
|
23049
|
+
/* harmony import */ var core_js_modules_es_string_split_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! core-js/modules/es.string.split.js */ "./node_modules/core-js/modules/es.string.split.js");
|
|
23050
|
+
/* harmony import */ var core_js_modules_es_string_split_js__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_split_js__WEBPACK_IMPORTED_MODULE_7__);
|
|
23051
|
+
/* harmony import */ var core_js_modules_es_string_starts_with_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! core-js/modules/es.string.starts-with.js */ "./node_modules/core-js/modules/es.string.starts-with.js");
|
|
23052
|
+
/* harmony import */ var core_js_modules_es_string_starts_with_js__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_starts_with_js__WEBPACK_IMPORTED_MODULE_8__);
|
|
23053
|
+
/* harmony import */ var core_js_modules_es_object_keys_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! core-js/modules/es.object.keys.js */ "./node_modules/core-js/modules/es.object.keys.js");
|
|
23054
|
+
/* harmony import */ var core_js_modules_es_object_keys_js__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_keys_js__WEBPACK_IMPORTED_MODULE_9__);
|
|
23055
|
+
/* harmony import */ var core_js_modules_es_array_slice_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! core-js/modules/es.array.slice.js */ "./node_modules/core-js/modules/es.array.slice.js");
|
|
23056
|
+
/* harmony import */ var core_js_modules_es_array_slice_js__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_slice_js__WEBPACK_IMPORTED_MODULE_10__);
|
|
23057
|
+
/* harmony import */ var core_js_modules_es_array_map_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! core-js/modules/es.array.map.js */ "./node_modules/core-js/modules/es.array.map.js");
|
|
23058
|
+
/* harmony import */ var core_js_modules_es_array_map_js__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_map_js__WEBPACK_IMPORTED_MODULE_11__);
|
|
21325
23059
|
/* harmony import */ var core_js_modules_es_array_index_of_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! core-js/modules/es.array.index-of.js */ "./node_modules/core-js/modules/es.array.index-of.js");
|
|
21326
23060
|
/* harmony import */ var core_js_modules_es_array_index_of_js__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_index_of_js__WEBPACK_IMPORTED_MODULE_12__);
|
|
21327
|
-
/* harmony import */ var
|
|
21328
|
-
/* harmony import */ var
|
|
21329
|
-
/* harmony import */ var
|
|
21330
|
-
/* harmony import */ var
|
|
21331
|
-
/* harmony import */ var
|
|
21332
|
-
/* harmony import */ var
|
|
21333
|
-
/* harmony import */ var
|
|
21334
|
-
/* harmony import */ var
|
|
21335
|
-
/* harmony import */ var
|
|
21336
|
-
/* harmony import */ var
|
|
21337
|
-
/* harmony import */ var
|
|
21338
|
-
/* harmony import */ var
|
|
21339
|
-
/* harmony import */ var
|
|
21340
|
-
/* harmony import */ var
|
|
21341
|
-
/* harmony import */ var
|
|
21342
|
-
/* harmony import */ var
|
|
21343
|
-
/* harmony import */ var
|
|
21344
|
-
/* harmony import */ var
|
|
21345
|
-
/* harmony import */ var
|
|
21346
|
-
/* harmony import */ var
|
|
21347
|
-
/* harmony import */ var
|
|
21348
|
-
/* harmony import */ var
|
|
21349
|
-
/* harmony import */ var
|
|
21350
|
-
/* harmony import */ var
|
|
21351
|
-
/* harmony import */ var
|
|
21352
|
-
/* harmony import */ var
|
|
21353
|
-
/* harmony import */ var
|
|
21354
|
-
/* harmony import */ var
|
|
21355
|
-
/* harmony import */ var
|
|
21356
|
-
/* harmony import */ var
|
|
21357
|
-
/* harmony import */ var
|
|
23061
|
+
/* harmony import */ var core_js_modules_es_object_values_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! core-js/modules/es.object.values.js */ "./node_modules/core-js/modules/es.object.values.js");
|
|
23062
|
+
/* harmony import */ var core_js_modules_es_object_values_js__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_values_js__WEBPACK_IMPORTED_MODULE_13__);
|
|
23063
|
+
/* harmony import */ var core_js_modules_es_array_join_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! core-js/modules/es.array.join.js */ "./node_modules/core-js/modules/es.array.join.js");
|
|
23064
|
+
/* harmony import */ var core_js_modules_es_array_join_js__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_join_js__WEBPACK_IMPORTED_MODULE_14__);
|
|
23065
|
+
/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! core-js/modules/es.string.iterator.js */ "./node_modules/core-js/modules/es.string.iterator.js");
|
|
23066
|
+
/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_15__);
|
|
23067
|
+
/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! core-js/modules/es.array.iterator.js */ "./node_modules/core-js/modules/es.array.iterator.js");
|
|
23068
|
+
/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_16__);
|
|
23069
|
+
/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ "./node_modules/core-js/modules/web.dom-collections.iterator.js");
|
|
23070
|
+
/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_17__);
|
|
23071
|
+
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! core-js/modules/es.object.to-string.js */ "./node_modules/core-js/modules/es.object.to-string.js");
|
|
23072
|
+
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_18___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_18__);
|
|
23073
|
+
/* harmony import */ var core_js_modules_es_promise_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! core-js/modules/es.promise.js */ "./node_modules/core-js/modules/es.promise.js");
|
|
23074
|
+
/* harmony import */ var core_js_modules_es_promise_js__WEBPACK_IMPORTED_MODULE_19___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_promise_js__WEBPACK_IMPORTED_MODULE_19__);
|
|
23075
|
+
/* harmony import */ var core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! core-js/modules/es.array.concat.js */ "./node_modules/core-js/modules/es.array.concat.js");
|
|
23076
|
+
/* harmony import */ var core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_20___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_20__);
|
|
23077
|
+
/* harmony import */ var core_js_modules_es_array_includes_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! core-js/modules/es.array.includes.js */ "./node_modules/core-js/modules/es.array.includes.js");
|
|
23078
|
+
/* harmony import */ var core_js_modules_es_array_includes_js__WEBPACK_IMPORTED_MODULE_21___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_includes_js__WEBPACK_IMPORTED_MODULE_21__);
|
|
23079
|
+
/* harmony import */ var core_js_modules_es_string_includes_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! core-js/modules/es.string.includes.js */ "./node_modules/core-js/modules/es.string.includes.js");
|
|
23080
|
+
/* harmony import */ var core_js_modules_es_string_includes_js__WEBPACK_IMPORTED_MODULE_22___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_includes_js__WEBPACK_IMPORTED_MODULE_22__);
|
|
23081
|
+
/* harmony import */ var core_js_modules_es_array_filter_js__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! core-js/modules/es.array.filter.js */ "./node_modules/core-js/modules/es.array.filter.js");
|
|
23082
|
+
/* harmony import */ var core_js_modules_es_array_filter_js__WEBPACK_IMPORTED_MODULE_23___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_filter_js__WEBPACK_IMPORTED_MODULE_23__);
|
|
23083
|
+
/* harmony import */ var core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! core-js/modules/es.object.define-property.js */ "./node_modules/core-js/modules/es.object.define-property.js");
|
|
23084
|
+
/* harmony import */ var core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_24___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_define_property_js__WEBPACK_IMPORTED_MODULE_24__);
|
|
23085
|
+
/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! core-js/modules/es.symbol.js */ "./node_modules/core-js/modules/es.symbol.js");
|
|
23086
|
+
/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_25___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_25__);
|
|
23087
|
+
/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! core-js/modules/es.symbol.description.js */ "./node_modules/core-js/modules/es.symbol.description.js");
|
|
23088
|
+
/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_26___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_26__);
|
|
23089
|
+
/* harmony import */ var core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ "./node_modules/core-js/modules/es.symbol.iterator.js");
|
|
23090
|
+
/* harmony import */ var core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_27___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_27__);
|
|
23091
|
+
/* harmony import */ var core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! core-js/modules/es.function.name.js */ "./node_modules/core-js/modules/es.function.name.js");
|
|
23092
|
+
/* harmony import */ var core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_28___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_28__);
|
|
23093
|
+
/* harmony import */ var core_js_modules_es_array_from_js__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! core-js/modules/es.array.from.js */ "./node_modules/core-js/modules/es.array.from.js");
|
|
23094
|
+
/* harmony import */ var core_js_modules_es_array_from_js__WEBPACK_IMPORTED_MODULE_29___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_from_js__WEBPACK_IMPORTED_MODULE_29__);
|
|
23095
|
+
/* harmony import */ var _utilities_js__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ./utilities.js */ "./src/utilities.js");
|
|
23096
|
+
|
|
23097
|
+
|
|
23098
|
+
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
23099
|
+
|
|
23100
|
+
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
23101
|
+
|
|
21358
23102
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
21359
23103
|
|
|
21360
23104
|
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."); }
|
|
@@ -21394,6 +23138,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
21394
23138
|
|
|
21395
23139
|
|
|
21396
23140
|
|
|
23141
|
+
|
|
21397
23142
|
|
|
21398
23143
|
|
|
21399
23144
|
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); }
|
|
@@ -21405,14 +23150,56 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
21405
23150
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
21406
23151
|
|
|
21407
23152
|
|
|
23153
|
+
/**
|
|
23154
|
+
* Handles loading Schema and tracking references.
|
|
23155
|
+
*/
|
|
23156
|
+
|
|
21408
23157
|
var SchemaLoader = /*#__PURE__*/function () {
|
|
21409
23158
|
function SchemaLoader(options) {
|
|
21410
23159
|
_classCallCheck(this, SchemaLoader);
|
|
21411
23160
|
|
|
23161
|
+
/**
|
|
23162
|
+
* @prop {object}
|
|
23163
|
+
* Options of the schema. @see readme.
|
|
23164
|
+
*/
|
|
21412
23165
|
this.options = options || {};
|
|
23166
|
+
/**
|
|
23167
|
+
* @prop {object}
|
|
23168
|
+
* The orginial schema to load
|
|
23169
|
+
*/
|
|
23170
|
+
|
|
23171
|
+
this.schema = {};
|
|
23172
|
+
/**
|
|
23173
|
+
* @prop {object}
|
|
23174
|
+
* Storage of External ref. Exemple :
|
|
23175
|
+
* refs = {
|
|
23176
|
+
* "fully/realized/path/to/schema.json": { ... }
|
|
23177
|
+
* "mylocalschema.json": { ... }
|
|
23178
|
+
* }
|
|
23179
|
+
*/
|
|
23180
|
+
|
|
21413
23181
|
this.refs = this.options.refs || {};
|
|
23182
|
+
/**
|
|
23183
|
+
* @prop {object}
|
|
23184
|
+
* Mapping between the schema and ref. Exemple:
|
|
23185
|
+
* refs_with_info = {
|
|
23186
|
+
* "#/counter/1": "fully/realized/path/to/schema.json"
|
|
23187
|
+
* "#/counter/2": "mylocalschema.json"
|
|
23188
|
+
* }
|
|
23189
|
+
*/
|
|
23190
|
+
|
|
21414
23191
|
this.refs_with_info = {};
|
|
23192
|
+
/**
|
|
23193
|
+
* @prop {string}
|
|
23194
|
+
* String to eewrite external ref with.
|
|
23195
|
+
*/
|
|
23196
|
+
|
|
21415
23197
|
this.refs_prefix = '#/counter/';
|
|
23198
|
+
/**
|
|
23199
|
+
* @prop {int}
|
|
23200
|
+
* Counter of ref
|
|
23201
|
+
*/
|
|
23202
|
+
|
|
21416
23203
|
this.refs_counter = 1;
|
|
21417
23204
|
this._subSchema1 = {
|
|
21418
23205
|
/* Version 3 `type` */
|
|
@@ -21467,7 +23254,7 @@ var SchemaLoader = /*#__PURE__*/function () {
|
|
|
21467
23254
|
allOf: function allOf(schema, extended) {
|
|
21468
23255
|
var _this3 = this;
|
|
21469
23256
|
|
|
21470
|
-
var _extended = Object(
|
|
23257
|
+
var _extended = Object(_utilities_js__WEBPACK_IMPORTED_MODULE_30__["extend"])({}, extended);
|
|
21471
23258
|
|
|
21472
23259
|
Object.entries(schema.allOf).forEach(function (_ref5) {
|
|
21473
23260
|
var _ref6 = _slicedToArray(_ref5, 2),
|
|
@@ -21506,7 +23293,7 @@ var SchemaLoader = /*#__PURE__*/function () {
|
|
|
21506
23293
|
oneOf: function oneOf(schema, extended) {
|
|
21507
23294
|
var _this5 = this;
|
|
21508
23295
|
|
|
21509
|
-
var tmp = Object(
|
|
23296
|
+
var tmp = Object(_utilities_js__WEBPACK_IMPORTED_MODULE_30__["extend"])({}, extended);
|
|
21510
23297
|
delete tmp.oneOf;
|
|
21511
23298
|
schema.oneOf.reduce(function (e, s, i) {
|
|
21512
23299
|
e.oneOf[i] = _this5.extendSchemas(_this5.expandSchema(s), tmp);
|
|
@@ -21516,27 +23303,78 @@ var SchemaLoader = /*#__PURE__*/function () {
|
|
|
21516
23303
|
}
|
|
21517
23304
|
};
|
|
21518
23305
|
}
|
|
23306
|
+
/**
|
|
23307
|
+
* Fully loads and expands JSON schema for a provided schema object and URL.
|
|
23308
|
+
*
|
|
23309
|
+
* The callback receives a expanded JSON Schema object with references
|
|
23310
|
+
* replaced with loaded schemas.
|
|
23311
|
+
*
|
|
23312
|
+
* @param {object} schema - A JSON Schema.
|
|
23313
|
+
* @param {string} fetchUrl - Base path from which to store the definitions.
|
|
23314
|
+
* Typically the URI of the schema.
|
|
23315
|
+
* @param {*} location - The base URL from which to load relative paths.
|
|
23316
|
+
* @returns {object} A JSON Schema with references expanded.
|
|
23317
|
+
*/
|
|
23318
|
+
|
|
21519
23319
|
|
|
21520
23320
|
_createClass(SchemaLoader, [{
|
|
21521
23321
|
key: "load",
|
|
21522
|
-
value: function
|
|
21523
|
-
var
|
|
23322
|
+
value: function () {
|
|
23323
|
+
var _load = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(schema, fetchUrl, location) {
|
|
23324
|
+
return regeneratorRuntime.wrap(function _callee$(_context) {
|
|
23325
|
+
while (1) {
|
|
23326
|
+
switch (_context.prev = _context.next) {
|
|
23327
|
+
case 0:
|
|
23328
|
+
this.schema = schema;
|
|
23329
|
+
_context.next = 3;
|
|
23330
|
+
return this._asyncloadExternalRefs(schema, fetchUrl, this._getFileBase(location), true);
|
|
23331
|
+
|
|
23332
|
+
case 3:
|
|
23333
|
+
return _context.abrupt("return", this.expandRefs(schema));
|
|
23334
|
+
|
|
23335
|
+
case 4:
|
|
23336
|
+
case "end":
|
|
23337
|
+
return _context.stop();
|
|
23338
|
+
}
|
|
23339
|
+
}
|
|
23340
|
+
}, _callee, this);
|
|
23341
|
+
}));
|
|
21524
23342
|
|
|
21525
|
-
|
|
21526
|
-
|
|
23343
|
+
function load(_x, _x2, _x3) {
|
|
23344
|
+
return _load.apply(this, arguments);
|
|
23345
|
+
}
|
|
23346
|
+
|
|
23347
|
+
return load;
|
|
23348
|
+
}()
|
|
23349
|
+
/**
|
|
23350
|
+
* Recursively expands loaded references in a provided schema.
|
|
23351
|
+
*
|
|
23352
|
+
* @param {object} schema - A JSON Schema with references already loaded.
|
|
23353
|
+
* @param {boolean} recurseAllOf - Set true to recurse allOf properties.
|
|
23354
|
+
* @returns {object} A JSON Schema with references expanded.
|
|
23355
|
+
*/
|
|
21527
23356
|
|
|
21528
|
-
callback(_this6.expandRefs(schema));
|
|
21529
|
-
}, fetchUrl, this._getFileBase(location));
|
|
21530
|
-
}
|
|
21531
23357
|
}, {
|
|
21532
23358
|
key: "expandRefs",
|
|
21533
23359
|
value: function expandRefs(schema, recurseAllOf) {
|
|
21534
|
-
var
|
|
23360
|
+
var _this6 = this;
|
|
23361
|
+
|
|
23362
|
+
var _schema = Object(_utilities_js__WEBPACK_IMPORTED_MODULE_30__["extend"])({}, schema);
|
|
23363
|
+
|
|
23364
|
+
if (!_schema.$ref) return _schema; // This split the ref to get the Json point if it exists
|
|
23365
|
+
// exemple #/counter/1#/definition/address +
|
|
23366
|
+
// [1] -> /counter/1
|
|
23367
|
+
// [2] -> /definition/address
|
|
23368
|
+
|
|
23369
|
+
var refWithPointerSplit = _schema.$ref.split('#'); // If local ref
|
|
21535
23370
|
|
|
21536
|
-
var _schema = Object(_utilities_js__WEBPACK_IMPORTED_MODULE_28__["extend"])({}, schema);
|
|
21537
23371
|
|
|
21538
|
-
if (!_schema.$ref)
|
|
21539
|
-
|
|
23372
|
+
if (refWithPointerSplit.length === 2 && !this.refs_with_info[_schema.$ref]) {
|
|
23373
|
+
var sub = this.expandRecursivePointer(this.schema, refWithPointerSplit[1]);
|
|
23374
|
+
return this.extendSchemas(_schema, this.expandSchema(sub));
|
|
23375
|
+
}
|
|
23376
|
+
|
|
23377
|
+
var refObj = refWithPointerSplit.length > 2 ? this.refs_with_info['#' + refWithPointerSplit[1]] : this.refs_with_info[_schema.$ref];
|
|
21540
23378
|
delete _schema.$ref;
|
|
21541
23379
|
var fetchUrl = refObj.$ref.startsWith('#') ? refObj.fetchUrl : '';
|
|
21542
23380
|
|
|
@@ -21546,19 +23384,54 @@ var SchemaLoader = /*#__PURE__*/function () {
|
|
|
21546
23384
|
/* if reference not found */
|
|
21547
23385
|
// eslint-disable-next-line no-console
|
|
21548
23386
|
console.warn("reference:'".concat(ref, "' not found!"));
|
|
21549
|
-
} else if (recurseAllOf && Object(
|
|
23387
|
+
} else if (recurseAllOf && Object(_utilities_js__WEBPACK_IMPORTED_MODULE_30__["hasOwnProperty"])(this.refs[ref], 'allOf')) {
|
|
21550
23388
|
var allOf = this.refs[ref].allOf;
|
|
21551
23389
|
Object.keys(allOf).forEach(function (key) {
|
|
21552
|
-
allOf[key] =
|
|
23390
|
+
allOf[key] = _this6.expandRefs(allOf[key], true);
|
|
21553
23391
|
});
|
|
21554
23392
|
}
|
|
21555
23393
|
|
|
21556
|
-
|
|
23394
|
+
if (refWithPointerSplit.length > 2) {
|
|
23395
|
+
return this.extendSchemas(_schema, this.expandSchema(this.expandRecursivePointer(this.refs[ref], refWithPointerSplit[2])));
|
|
23396
|
+
} else {
|
|
23397
|
+
return this.extendSchemas(_schema, this.expandSchema(this.refs[ref]));
|
|
23398
|
+
}
|
|
23399
|
+
}
|
|
23400
|
+
/**
|
|
23401
|
+
* Returns a subschema based on a JSON Pointer path.
|
|
23402
|
+
* @param {object} schema - Schema too into
|
|
23403
|
+
* @param {string} pointer - path to look for
|
|
23404
|
+
* @param {object} original_schema - the Original schema
|
|
23405
|
+
* @returns the subschema pointed to by the path
|
|
23406
|
+
*/
|
|
23407
|
+
|
|
23408
|
+
}, {
|
|
23409
|
+
key: "expandRecursivePointer",
|
|
23410
|
+
value: function expandRecursivePointer(schema, pointer) {
|
|
23411
|
+
var subschema = schema;
|
|
23412
|
+
pointer.split('/').slice(1).forEach(function (i) {
|
|
23413
|
+
if (subschema[i]) {
|
|
23414
|
+
subschema = subschema[i];
|
|
23415
|
+
}
|
|
23416
|
+
}); // If the result is a pointer, let's go for another turn
|
|
23417
|
+
|
|
23418
|
+
if (subschema.$refs && subschema.$refs.startsWith('#')) {
|
|
23419
|
+
return this.expandRecursivePointer(schema, subschema.$refs);
|
|
23420
|
+
}
|
|
23421
|
+
|
|
23422
|
+
return subschema;
|
|
21557
23423
|
}
|
|
23424
|
+
/**
|
|
23425
|
+
* Expands a JSON schema and its references.
|
|
23426
|
+
*
|
|
23427
|
+
* @param {object} schema - A JSON Schema with references already loaded.
|
|
23428
|
+
* @returns {object} A JSON Schema with references expanded.
|
|
23429
|
+
*/
|
|
23430
|
+
|
|
21558
23431
|
}, {
|
|
21559
23432
|
key: "expandSchema",
|
|
21560
|
-
value: function expandSchema(schema
|
|
21561
|
-
var
|
|
23433
|
+
value: function expandSchema(schema) {
|
|
23434
|
+
var _this7 = this;
|
|
21562
23435
|
|
|
21563
23436
|
Object.entries(this._subSchema1).forEach(function (_ref7) {
|
|
21564
23437
|
var _ref8 = _slicedToArray(_ref7, 2),
|
|
@@ -21566,17 +23439,17 @@ var SchemaLoader = /*#__PURE__*/function () {
|
|
|
21566
23439
|
func = _ref8[1];
|
|
21567
23440
|
|
|
21568
23441
|
if (schema[key]) {
|
|
21569
|
-
func.call(
|
|
23442
|
+
func.call(_this7, schema);
|
|
21570
23443
|
}
|
|
21571
23444
|
});
|
|
21572
|
-
var extended = Object(
|
|
23445
|
+
var extended = Object(_utilities_js__WEBPACK_IMPORTED_MODULE_30__["extend"])({}, schema);
|
|
21573
23446
|
Object.entries(this._subSchema2).forEach(function (_ref9) {
|
|
21574
23447
|
var _ref10 = _slicedToArray(_ref9, 2),
|
|
21575
23448
|
key = _ref10[0],
|
|
21576
23449
|
func = _ref10[1];
|
|
21577
23450
|
|
|
21578
23451
|
if (schema[key]) {
|
|
21579
|
-
extended = func.call(
|
|
23452
|
+
extended = func.call(_this7, schema, extended);
|
|
21580
23453
|
}
|
|
21581
23454
|
});
|
|
21582
23455
|
return this.expandRefs(extended);
|
|
@@ -21590,36 +23463,55 @@ var SchemaLoader = /*#__PURE__*/function () {
|
|
|
21590
23463
|
}, {
|
|
21591
23464
|
key: "_expandSubSchema",
|
|
21592
23465
|
value: function _expandSubSchema(subschema) {
|
|
21593
|
-
var
|
|
23466
|
+
var _this8 = this;
|
|
21594
23467
|
|
|
21595
23468
|
/* Array of types */
|
|
21596
23469
|
if (Array.isArray(subschema)) return subschema.map(function (m) {
|
|
21597
|
-
return _typeof(m) === 'object' ?
|
|
23470
|
+
return _typeof(m) === 'object' ? _this8.expandSchema(m) : m;
|
|
21598
23471
|
});
|
|
21599
23472
|
/* Schema */
|
|
21600
23473
|
|
|
21601
23474
|
return this.expandSchema(subschema);
|
|
21602
23475
|
}
|
|
21603
|
-
|
|
21604
|
-
|
|
21605
|
-
|
|
21606
|
-
|
|
21607
|
-
|
|
21608
|
-
|
|
21609
|
-
|
|
21610
|
-
|
|
23476
|
+
/**
|
|
23477
|
+
* Rewrite the passed schema's JSON pointers to prepend with the current reference's path, so that it will be converted to a reference "counter".
|
|
23478
|
+
*
|
|
23479
|
+
* @example
|
|
23480
|
+
* In file "../otherreferencedfile.json", referenced from "schema.json":
|
|
23481
|
+
*
|
|
23482
|
+
* "$ref": "#/definitions/myschema" => "$ref": "../path/to/my/referenced/schemafile.json#/definitions/myschema"
|
|
23483
|
+
* ...which will then be parsed later in loadExternalReferences() to "$ref": "#/counter/1#/definitions/myschema"
|
|
23484
|
+
*
|
|
23485
|
+
* @param {object} schema - A JSON Schema with the definitions key present.
|
|
23486
|
+
* @param {string} path - Base path from which to store the definitions in refs. (exemple ../path/to/my/referenced/schemafile.json)
|
|
23487
|
+
* Typically the URI of the schema.
|
|
23488
|
+
*/
|
|
21611
23489
|
|
|
21612
|
-
|
|
21613
|
-
|
|
21614
|
-
|
|
21615
|
-
|
|
21616
|
-
|
|
23490
|
+
}, {
|
|
23491
|
+
key: "_manageRecursivePointer",
|
|
23492
|
+
value: function _manageRecursivePointer(schema, path) {
|
|
23493
|
+
Object.keys(schema).forEach(function (i) {
|
|
23494
|
+
if (schema[i].$ref && schema[i].$ref.indexOf('#') === 0) {
|
|
23495
|
+
schema[i].$ref = path + schema[i].$ref;
|
|
23496
|
+
}
|
|
23497
|
+
});
|
|
21617
23498
|
}
|
|
23499
|
+
/**
|
|
23500
|
+
* Recursively parse a (sub)schema to populate loader reference info.
|
|
23501
|
+
*
|
|
23502
|
+
* @param {object} schema - A JSON Schema
|
|
23503
|
+
* @param {string} fetchUrl - Base path from which to store the definitions.
|
|
23504
|
+
* @param {boolean} firstIteration - Is it the first time we load this function? Help making difference between external ref vs internal pointer
|
|
23505
|
+
* @returns {array} Refs in the format of uri => true if external.
|
|
23506
|
+
*/
|
|
23507
|
+
|
|
21618
23508
|
}, {
|
|
21619
23509
|
key: "_getExternalRefs",
|
|
21620
23510
|
value: function _getExternalRefs(schema, fetchUrl) {
|
|
21621
|
-
var
|
|
23511
|
+
var _this9 = this;
|
|
21622
23512
|
|
|
23513
|
+
var firstIteration = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
23514
|
+
if (!firstIteration) this._manageRecursivePointer(schema, fetchUrl);
|
|
21623
23515
|
var refs = {};
|
|
21624
23516
|
|
|
21625
23517
|
var mergeRefs = function mergeRefs(newrefs) {
|
|
@@ -21628,18 +23520,25 @@ var SchemaLoader = /*#__PURE__*/function () {
|
|
|
21628
23520
|
});
|
|
21629
23521
|
};
|
|
21630
23522
|
|
|
21631
|
-
if (schema.$ref && _typeof(schema.$ref) !== 'object') {
|
|
23523
|
+
if (schema.$ref && _typeof(schema.$ref) !== 'object' && !(schema.$ref.indexOf('#') === 0 && firstIteration)) {
|
|
23524
|
+
var refBase = schema.$ref;
|
|
23525
|
+
var pointer = ''; // Strip any JSON pointers found for external refs.
|
|
23526
|
+
|
|
23527
|
+
if (refBase.indexOf('#') > 0) refBase = refBase.substr(0, refBase.indexOf('#'));
|
|
23528
|
+
if (refBase !== schema.$ref) pointer = schema.$ref.substr(schema.$ref.indexOf('#')); // We use a fragment idenfier to track json pointer in top of our pointer
|
|
23529
|
+
|
|
21632
23530
|
var refCounter = this.refs_prefix + this.refs_counter++;
|
|
23531
|
+
var refPointer = refCounter + pointer;
|
|
21633
23532
|
|
|
21634
23533
|
if (schema.$ref.substr(0, 1) !== '#' && !this.refs[schema.$ref]) {
|
|
21635
|
-
refs[
|
|
23534
|
+
refs[refBase] = true;
|
|
21636
23535
|
}
|
|
21637
23536
|
|
|
21638
23537
|
this.refs_with_info[refCounter] = {
|
|
21639
23538
|
fetchUrl: fetchUrl,
|
|
21640
|
-
$ref:
|
|
23539
|
+
$ref: refBase
|
|
21641
23540
|
};
|
|
21642
|
-
schema.$ref =
|
|
23541
|
+
schema.$ref = refPointer;
|
|
21643
23542
|
}
|
|
21644
23543
|
|
|
21645
23544
|
Object.values(schema).forEach(function (value) {
|
|
@@ -21648,11 +23547,14 @@ var SchemaLoader = /*#__PURE__*/function () {
|
|
|
21648
23547
|
if (Array.isArray(value)) {
|
|
21649
23548
|
Object.values(value).forEach(function (e) {
|
|
21650
23549
|
if (e && _typeof(e) === 'object') {
|
|
21651
|
-
mergeRefs(
|
|
23550
|
+
mergeRefs(_this9._getExternalRefs(e, fetchUrl, firstIteration));
|
|
21652
23551
|
}
|
|
21653
23552
|
});
|
|
21654
23553
|
} else {
|
|
21655
|
-
|
|
23554
|
+
// Merge Ref if it's not a Pointer
|
|
23555
|
+
if (!value.$ref || !(typeof value.$ref === 'string' && value.$ref.startsWith('#'))) {
|
|
23556
|
+
mergeRefs(_this9._getExternalRefs(value, fetchUrl, firstIteration));
|
|
23557
|
+
}
|
|
21656
23558
|
}
|
|
21657
23559
|
});
|
|
21658
23560
|
|
|
@@ -21696,147 +23598,279 @@ var SchemaLoader = /*#__PURE__*/function () {
|
|
|
21696
23598
|
value: function _isUniformResourceName(uri) {
|
|
21697
23599
|
return uri.substr(0, 4) === 'urn:';
|
|
21698
23600
|
}
|
|
21699
|
-
|
|
21700
|
-
|
|
21701
|
-
|
|
21702
|
-
|
|
21703
|
-
|
|
21704
|
-
|
|
21705
|
-
|
|
21706
|
-
|
|
21707
|
-
|
|
21708
|
-
|
|
21709
|
-
|
|
21710
|
-
|
|
21711
|
-
|
|
21712
|
-
|
|
21713
|
-
|
|
21714
|
-
var urnResolver = _this12.options.urn_resolver;
|
|
21715
|
-
var urn = uri;
|
|
21716
|
-
|
|
21717
|
-
if (typeof urnResolver !== 'function') {
|
|
21718
|
-
// eslint-disable-next-line no-console
|
|
21719
|
-
console.log("No \"urn_resolver\" callback defined to resolve \"".concat(urn, "\""));
|
|
21720
|
-
throw new Error("Must set urn_resolver option to a callback to resolve ".concat(urn));
|
|
21721
|
-
} // theoretically a URN can contain a JSON pointer
|
|
21722
|
-
|
|
21723
|
-
|
|
21724
|
-
if (urn.indexOf('#') > 0) urn = urn.substr(0, urn.indexOf('#'));
|
|
21725
|
-
var response;
|
|
21726
|
-
|
|
21727
|
-
try {
|
|
21728
|
-
response = urnResolver(urn, function (responseText) {
|
|
21729
|
-
try {
|
|
21730
|
-
schema = JSON.parse(responseText);
|
|
21731
|
-
} catch (e) {
|
|
21732
|
-
// eslint-disable-next-line no-console
|
|
21733
|
-
console.log(e);
|
|
21734
|
-
throw new Error("Failed to parse external ref ".concat(urn));
|
|
21735
|
-
}
|
|
21736
|
-
|
|
21737
|
-
if (!(typeof schema === 'boolean' || _typeof(schema) === 'object') || schema === null || Array.isArray(schema)) {
|
|
21738
|
-
throw new Error("External ref does not contain a valid schema - ".concat(urn));
|
|
21739
|
-
}
|
|
21740
|
-
|
|
21741
|
-
_this12.refs[uri] = schema;
|
|
23601
|
+
/**
|
|
23602
|
+
* Loads external references via AJAX.
|
|
23603
|
+
*
|
|
23604
|
+
* Will fail if this.options.ajax is not set to true.
|
|
23605
|
+
*
|
|
23606
|
+
* @param {object} schema - JSON Schema with external references.
|
|
23607
|
+
* @param {string} fetchUrl - Base path from which to store the definitions.
|
|
23608
|
+
* Typically the URI of the schema.
|
|
23609
|
+
* @param {string} fileBase - The base URL from which to load relative paths.
|
|
23610
|
+
* Typically the URI of the schema minus filename, with trailing slash.
|
|
23611
|
+
* @param {boolean} firstIteration - Is it the first time we load this function? Help making difference between external ref vs internal pointer
|
|
23612
|
+
*
|
|
23613
|
+
* @return {boolean}
|
|
23614
|
+
* @throws Error
|
|
23615
|
+
*/
|
|
21742
23616
|
|
|
21743
|
-
|
|
23617
|
+
}, {
|
|
23618
|
+
key: "_asyncloadExternalRefs",
|
|
23619
|
+
value: function () {
|
|
23620
|
+
var _asyncloadExternalRefs2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2(schema, fetchUrl, fileBase) {
|
|
23621
|
+
var _this10 = this;
|
|
21744
23622
|
|
|
21745
|
-
|
|
21746
|
-
|
|
23623
|
+
var firstIteration,
|
|
23624
|
+
refs,
|
|
23625
|
+
waiting,
|
|
23626
|
+
_loop,
|
|
23627
|
+
_i2,
|
|
23628
|
+
_Object$keys,
|
|
23629
|
+
_ret,
|
|
23630
|
+
_args3 = arguments;
|
|
23631
|
+
|
|
23632
|
+
return regeneratorRuntime.wrap(function _callee2$(_context3) {
|
|
23633
|
+
while (1) {
|
|
23634
|
+
switch (_context3.prev = _context3.next) {
|
|
23635
|
+
case 0:
|
|
23636
|
+
firstIteration = _args3.length > 3 && _args3[3] !== undefined ? _args3[3] : false;
|
|
23637
|
+
refs = this._getExternalRefs(schema, fetchUrl, firstIteration);
|
|
23638
|
+
waiting = 0; // Loop into all schema references
|
|
23639
|
+
|
|
23640
|
+
_loop = /*#__PURE__*/regeneratorRuntime.mark(function _loop() {
|
|
23641
|
+
var uri, urnResolver, urn, _response, _externalSchema, url, response, externalSchema, newfileBase, pathItems;
|
|
23642
|
+
|
|
23643
|
+
return regeneratorRuntime.wrap(function _loop$(_context2) {
|
|
23644
|
+
while (1) {
|
|
23645
|
+
switch (_context2.prev = _context2.next) {
|
|
23646
|
+
case 0:
|
|
23647
|
+
uri = _Object$keys[_i2];
|
|
23648
|
+
|
|
23649
|
+
if (!(typeof uri === 'undefined')) {
|
|
23650
|
+
_context2.next = 3;
|
|
23651
|
+
break;
|
|
23652
|
+
}
|
|
23653
|
+
|
|
23654
|
+
return _context2.abrupt("return", "continue");
|
|
23655
|
+
|
|
23656
|
+
case 3:
|
|
23657
|
+
if (!_this10.refs[uri]) {
|
|
23658
|
+
_context2.next = 5;
|
|
23659
|
+
break;
|
|
23660
|
+
}
|
|
23661
|
+
|
|
23662
|
+
return _context2.abrupt("return", "continue");
|
|
23663
|
+
|
|
23664
|
+
case 5:
|
|
23665
|
+
if (!_this10._isUniformResourceName(uri)) {
|
|
23666
|
+
_context2.next = 40;
|
|
23667
|
+
break;
|
|
23668
|
+
}
|
|
23669
|
+
|
|
23670
|
+
_this10.refs[uri] = 'loading';
|
|
23671
|
+
waiting++;
|
|
23672
|
+
urnResolver = _this10.options.urn_resolver;
|
|
23673
|
+
urn = uri;
|
|
23674
|
+
|
|
23675
|
+
if (!(typeof urnResolver !== 'function')) {
|
|
23676
|
+
_context2.next = 13;
|
|
23677
|
+
break;
|
|
23678
|
+
}
|
|
23679
|
+
|
|
23680
|
+
// eslint-disable-next-line no-console
|
|
23681
|
+
console.log("No \"urn_resolver\" callback defined to resolve \"".concat(urn, "\""));
|
|
23682
|
+
throw new Error("Must set urn_resolver option to a callback to resolve ".concat(urn));
|
|
23683
|
+
|
|
23684
|
+
case 13:
|
|
23685
|
+
// theoretically a URN can contain a JSON pointer
|
|
23686
|
+
if (urn.indexOf('#') > 0) urn = urn.substr(0, urn.indexOf('#'));
|
|
23687
|
+
_context2.prev = 14;
|
|
23688
|
+
_context2.next = 17;
|
|
23689
|
+
return urnResolver(urn);
|
|
23690
|
+
|
|
23691
|
+
case 17:
|
|
23692
|
+
_response = _context2.sent;
|
|
23693
|
+
_context2.prev = 18;
|
|
23694
|
+
_externalSchema = JSON.parse(_response);
|
|
23695
|
+
_context2.next = 26;
|
|
23696
|
+
break;
|
|
23697
|
+
|
|
23698
|
+
case 22:
|
|
23699
|
+
_context2.prev = 22;
|
|
23700
|
+
_context2.t0 = _context2["catch"](18);
|
|
23701
|
+
// eslint-disable-next-line no-console
|
|
23702
|
+
console.log(_context2.t0);
|
|
23703
|
+
throw new Error("Failed to parse external ref ".concat(urn));
|
|
23704
|
+
|
|
23705
|
+
case 26:
|
|
23706
|
+
if (!(!(typeof _externalSchema === 'boolean' || _typeof(_externalSchema) === 'object') || _externalSchema === null || Array.isArray(_externalSchema))) {
|
|
23707
|
+
_context2.next = 28;
|
|
23708
|
+
break;
|
|
23709
|
+
}
|
|
23710
|
+
|
|
23711
|
+
throw new Error("External ref does not contain a valid schema - ".concat(urn));
|
|
23712
|
+
|
|
23713
|
+
case 28:
|
|
23714
|
+
_this10.refs[uri] = _externalSchema;
|
|
23715
|
+
_context2.next = 31;
|
|
23716
|
+
return _this10._asyncloadExternalRefs(_externalSchema, uri, fileBase);
|
|
23717
|
+
|
|
23718
|
+
case 31:
|
|
23719
|
+
_context2.next = 37;
|
|
23720
|
+
break;
|
|
23721
|
+
|
|
23722
|
+
case 33:
|
|
23723
|
+
_context2.prev = 33;
|
|
23724
|
+
_context2.t1 = _context2["catch"](14);
|
|
23725
|
+
// eslint-disable-next-line no-console
|
|
23726
|
+
console.log(_context2.t1);
|
|
23727
|
+
throw new Error("Failed to parse external ref ".concat(urn));
|
|
23728
|
+
|
|
23729
|
+
case 37:
|
|
23730
|
+
if (!(typeof _response === 'boolean')) {
|
|
23731
|
+
_context2.next = 39;
|
|
23732
|
+
break;
|
|
23733
|
+
}
|
|
23734
|
+
|
|
23735
|
+
throw new Error("External ref does not contain a valid schema - ".concat(urn));
|
|
23736
|
+
|
|
23737
|
+
case 39:
|
|
23738
|
+
return _context2.abrupt("return", "continue");
|
|
23739
|
+
|
|
23740
|
+
case 40:
|
|
23741
|
+
if (_this10.options.ajax) {
|
|
23742
|
+
_context2.next = 42;
|
|
23743
|
+
break;
|
|
23744
|
+
}
|
|
23745
|
+
|
|
23746
|
+
throw new Error("Must set ajax option to true to load external ref ".concat(uri));
|
|
23747
|
+
|
|
23748
|
+
case 42:
|
|
23749
|
+
waiting++;
|
|
23750
|
+
url = _this10._joinUrl(uri, fileBase);
|
|
23751
|
+
_context2.next = 46;
|
|
23752
|
+
return new Promise(function (resolve) {
|
|
23753
|
+
var r = new XMLHttpRequest();
|
|
23754
|
+
if (_this10.options.ajaxCredentials) r.withCredentials = _this10.options.ajaxCredentials;
|
|
23755
|
+
r.overrideMimeType('application/json');
|
|
23756
|
+
r.open('GET', url, true);
|
|
23757
|
+
|
|
23758
|
+
r.onload = function () {
|
|
23759
|
+
resolve(r);
|
|
23760
|
+
};
|
|
23761
|
+
|
|
23762
|
+
r.onerror = function (e) {
|
|
23763
|
+
resolve(undefined);
|
|
23764
|
+
};
|
|
23765
|
+
|
|
23766
|
+
r.send();
|
|
23767
|
+
});
|
|
23768
|
+
|
|
23769
|
+
case 46:
|
|
23770
|
+
response = _context2.sent;
|
|
23771
|
+
|
|
23772
|
+
if (!(typeof response === 'undefined')) {
|
|
23773
|
+
_context2.next = 49;
|
|
23774
|
+
break;
|
|
23775
|
+
}
|
|
23776
|
+
|
|
23777
|
+
throw new Error("Failed to fetch ref via ajax - ".concat(uri));
|
|
23778
|
+
|
|
23779
|
+
case 49:
|
|
23780
|
+
externalSchema = void 0;
|
|
23781
|
+
_context2.prev = 50;
|
|
23782
|
+
externalSchema = JSON.parse(response.responseText);
|
|
23783
|
+
_context2.next = 58;
|
|
23784
|
+
break;
|
|
23785
|
+
|
|
23786
|
+
case 54:
|
|
23787
|
+
_context2.prev = 54;
|
|
23788
|
+
_context2.t2 = _context2["catch"](50);
|
|
23789
|
+
// eslint-disable-next-line no-console
|
|
23790
|
+
console.log(_context2.t2);
|
|
23791
|
+
throw new Error("Failed to parse external ref ".concat(url));
|
|
23792
|
+
|
|
23793
|
+
case 58:
|
|
23794
|
+
if (!(!(typeof externalSchema === 'boolean' || _typeof(externalSchema) === 'object') || externalSchema === null || Array.isArray(externalSchema))) {
|
|
23795
|
+
_context2.next = 60;
|
|
23796
|
+
break;
|
|
23797
|
+
}
|
|
23798
|
+
|
|
23799
|
+
throw new Error("External ref does not contain a valid schema - ".concat(url));
|
|
23800
|
+
|
|
23801
|
+
case 60:
|
|
23802
|
+
_this10.refs[uri] = externalSchema;
|
|
23803
|
+
newfileBase = _this10._getFileBaseFromFileLocation(url); // Add leading slash.
|
|
23804
|
+
|
|
23805
|
+
if (url !== uri) {
|
|
23806
|
+
pathItems = url.split('/');
|
|
23807
|
+
url = (uri.substr(0, 1) === '/' ? '/' : '') + pathItems.pop();
|
|
23808
|
+
}
|
|
23809
|
+
|
|
23810
|
+
_context2.next = 65;
|
|
23811
|
+
return _this10._asyncloadExternalRefs(externalSchema, url, newfileBase);
|
|
23812
|
+
|
|
23813
|
+
case 65:
|
|
23814
|
+
case "end":
|
|
23815
|
+
return _context2.stop();
|
|
23816
|
+
}
|
|
23817
|
+
}
|
|
23818
|
+
}, _loop, null, [[14, 33], [18, 22], [50, 54]]);
|
|
23819
|
+
});
|
|
23820
|
+
_i2 = 0, _Object$keys = Object.keys(refs);
|
|
21747
23821
|
|
|
21748
|
-
|
|
21749
|
-
|
|
23822
|
+
case 5:
|
|
23823
|
+
if (!(_i2 < _Object$keys.length)) {
|
|
23824
|
+
_context3.next = 13;
|
|
23825
|
+
break;
|
|
21750
23826
|
}
|
|
21751
|
-
}, uri, '/');
|
|
21752
|
-
});
|
|
21753
|
-
} catch (e) {
|
|
21754
|
-
// eslint-disable-next-line no-console
|
|
21755
|
-
console.log(e);
|
|
21756
|
-
throw new Error("Failed to parse external ref ".concat(urn));
|
|
21757
|
-
}
|
|
21758
|
-
|
|
21759
|
-
if (typeof response !== 'boolean') {
|
|
21760
|
-
throw new Error("External ref does not contain a valid schema - ".concat(urn));
|
|
21761
|
-
} else if (response !== true) {
|
|
21762
|
-
throw new Error("External ref did not resolve - ".concat(urn));
|
|
21763
|
-
}
|
|
21764
|
-
|
|
21765
|
-
return;
|
|
21766
|
-
}
|
|
21767
|
-
|
|
21768
|
-
if (!_this12.options.ajax) throw new Error("Must set ajax option to true to load external ref ".concat(uri));
|
|
21769
|
-
_this12.refs[uri] = 'loading';
|
|
21770
|
-
waiting++;
|
|
21771
|
-
|
|
21772
|
-
var url = _this12._joinUrl(uri, fileBase);
|
|
21773
23827
|
|
|
21774
|
-
|
|
21775
|
-
r.overrideMimeType('application/json');
|
|
21776
|
-
r.open('GET', url, true);
|
|
21777
|
-
if (_this12.options.ajaxCredentials) r.withCredentials = _this12.options.ajaxCredentials;
|
|
23828
|
+
return _context3.delegateYield(_loop(), "t0", 7);
|
|
21778
23829
|
|
|
21779
|
-
|
|
21780
|
-
|
|
21781
|
-
/* Request succeeded */
|
|
23830
|
+
case 7:
|
|
23831
|
+
_ret = _context3.t0;
|
|
21782
23832
|
|
|
21783
|
-
|
|
21784
|
-
|
|
21785
|
-
|
|
21786
|
-
|
|
21787
|
-
_schema2 = JSON.parse(r.responseText);
|
|
21788
|
-
} catch (e) {
|
|
21789
|
-
// eslint-disable-next-line no-console
|
|
21790
|
-
console.log(e);
|
|
21791
|
-
throw new Error("Failed to parse external ref ".concat(url));
|
|
21792
|
-
}
|
|
23833
|
+
if (!(_ret === "continue")) {
|
|
23834
|
+
_context3.next = 10;
|
|
23835
|
+
break;
|
|
23836
|
+
}
|
|
21793
23837
|
|
|
21794
|
-
|
|
21795
|
-
throw new Error("External ref does not contain a valid schema - ".concat(url));
|
|
21796
|
-
}
|
|
23838
|
+
return _context3.abrupt("continue", 10);
|
|
21797
23839
|
|
|
21798
|
-
|
|
23840
|
+
case 10:
|
|
23841
|
+
_i2++;
|
|
23842
|
+
_context3.next = 5;
|
|
23843
|
+
break;
|
|
21799
23844
|
|
|
21800
|
-
|
|
23845
|
+
case 13:
|
|
23846
|
+
if (waiting) {
|
|
23847
|
+
_context3.next = 15;
|
|
23848
|
+
break;
|
|
23849
|
+
}
|
|
21801
23850
|
|
|
23851
|
+
return _context3.abrupt("return", true);
|
|
21802
23852
|
|
|
21803
|
-
|
|
21804
|
-
|
|
21805
|
-
|
|
23853
|
+
case 15:
|
|
23854
|
+
case "end":
|
|
23855
|
+
return _context3.stop();
|
|
21806
23856
|
}
|
|
21807
|
-
|
|
21808
|
-
_this12._getDefinitions(_schema2, "".concat(url, "#/definitions/"));
|
|
21809
|
-
|
|
21810
|
-
_this12._loadExternalRefs(_schema2, function () {
|
|
21811
|
-
waiting--;
|
|
21812
|
-
|
|
21813
|
-
if (done && !waiting) {
|
|
21814
|
-
callback();
|
|
21815
|
-
}
|
|
21816
|
-
}, url, _fileBase);
|
|
21817
|
-
} else {
|
|
21818
|
-
/* Request failed */
|
|
21819
|
-
// eslint-disable-next-line no-console
|
|
21820
|
-
console.log(r);
|
|
21821
|
-
throw new Error("Failed to fetch ref via ajax - ".concat(uri));
|
|
21822
23857
|
}
|
|
21823
|
-
};
|
|
21824
|
-
|
|
21825
|
-
r.send();
|
|
21826
|
-
});
|
|
21827
|
-
done = true;
|
|
23858
|
+
}, _callee2, this);
|
|
23859
|
+
}));
|
|
21828
23860
|
|
|
21829
|
-
|
|
21830
|
-
|
|
23861
|
+
function _asyncloadExternalRefs(_x4, _x5, _x6) {
|
|
23862
|
+
return _asyncloadExternalRefs2.apply(this, arguments);
|
|
21831
23863
|
}
|
|
21832
|
-
|
|
23864
|
+
|
|
23865
|
+
return _asyncloadExternalRefs;
|
|
23866
|
+
}()
|
|
21833
23867
|
}, {
|
|
21834
23868
|
key: "extendSchemas",
|
|
21835
23869
|
value: function extendSchemas(obj1, obj2) {
|
|
21836
|
-
var
|
|
23870
|
+
var _this11 = this;
|
|
21837
23871
|
|
|
21838
|
-
obj1 = Object(
|
|
21839
|
-
obj2 = Object(
|
|
23872
|
+
obj1 = Object(_utilities_js__WEBPACK_IMPORTED_MODULE_30__["extend"])({}, obj1);
|
|
23873
|
+
obj2 = Object(_utilities_js__WEBPACK_IMPORTED_MODULE_30__["extend"])({}, obj2);
|
|
21840
23874
|
var extended = {};
|
|
21841
23875
|
|
|
21842
23876
|
var isRequiredOrDefaultProperties = function isRequiredOrDefaultProperties(prop, val) {
|
|
@@ -21855,7 +23889,7 @@ var SchemaLoader = /*#__PURE__*/function () {
|
|
|
21855
23889
|
mergeType(val);
|
|
21856
23890
|
} else if (_typeof(val) === 'object' && !Array.isArray(val) && val !== null) {
|
|
21857
23891
|
/* Objects should be recursively merged */
|
|
21858
|
-
extended[prop] =
|
|
23892
|
+
extended[prop] = _this11.extendSchemas(val, obj2[prop]);
|
|
21859
23893
|
} else {
|
|
21860
23894
|
/* Otherwise, use the first value */
|
|
21861
23895
|
extended[prop] = val;
|
|
@@ -21937,6 +23971,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
21937
23971
|
".je-modal": "background-color:white;border:1px%20solid%20black;box-shadow:3px%203px%20black;position:absolute;z-index:10",
|
|
21938
23972
|
".je-infobutton-icon": "font-size:16px;font-weight:bold;padding:0.25rem;position:relative;display:inline-block",
|
|
21939
23973
|
".je-infobutton-tooltip": "font-size:12px;font-weight:normal;font-family:sans-serif;visibility:hidden;background-color:rgba(50%2C%2050%2C%2050%2C%200.75);margin:0%200.25rem;color:%23fafafa;padding:0.5rem%201rem;border-radius:0.25rem;width:20rem;position:absolute",
|
|
23974
|
+
".je-not-loaded": "pointer-events:none",
|
|
21940
23975
|
".je-header": "display:inline-block",
|
|
21941
23976
|
".je-upload-preview img": "float:left;margin:0%200.5rem%200.5rem%200;max-width:100%25;max-height:5rem",
|
|
21942
23977
|
".je-checkbox": "display:inline-block;width:auto",
|
|
@@ -22653,7 +24688,6 @@ var AbstractTheme = /*#__PURE__*/function () {
|
|
|
22653
24688
|
key: "getRangeOutput",
|
|
22654
24689
|
value: function getRangeOutput(input, startvalue) {
|
|
22655
24690
|
var output = document.createElement('output');
|
|
22656
|
-
output.value = startvalue || 0;
|
|
22657
24691
|
|
|
22658
24692
|
var updateOutput = function updateOutput(e) {
|
|
22659
24693
|
output.value = e.currentTarget.value;
|
|
@@ -23393,6 +25427,7 @@ var bootstrap3Theme = /*#__PURE__*/function (_AbstractTheme) {
|
|
|
23393
25427
|
|
|
23394
25428
|
if (label && (input.type === 'checkbox' || input.type === 'radio')) {
|
|
23395
25429
|
group.classList.add(input.type);
|
|
25430
|
+
if (infoText) label.appendChild(infoText);
|
|
23396
25431
|
label.insertBefore(input, label.firstChild);
|
|
23397
25432
|
group.appendChild(label);
|
|
23398
25433
|
} else {
|
|
@@ -25469,7 +27504,7 @@ var spectreTheme = /*#__PURE__*/function (_AbstractTheme) {
|
|
|
25469
27504
|
|
|
25470
27505
|
var icon = document.createElement('i');
|
|
25471
27506
|
icon.classList.add('form-icon');
|
|
25472
|
-
el.classList.add('form-checkbox', '
|
|
27507
|
+
el.classList.add('form-checkbox', 'pr-0');
|
|
25473
27508
|
el.insertBefore(icon, el.firstChild);
|
|
25474
27509
|
return el;
|
|
25475
27510
|
}
|
|
@@ -25582,6 +27617,7 @@ var spectreTheme = /*#__PURE__*/function (_AbstractTheme) {
|
|
|
25582
27617
|
|
|
25583
27618
|
if (label && (input.type === 'checkbox' || input.type === 'radio')) {
|
|
25584
27619
|
group.classList.add(input.type);
|
|
27620
|
+
if (infoText) label.appendChild(infoText);
|
|
25585
27621
|
label.insertBefore(input, label.firstChild);
|
|
25586
27622
|
group.appendChild(label);
|
|
25587
27623
|
} else {
|
|
@@ -26490,7 +28526,7 @@ tailwindTheme.rules = _tailwind_css_js__WEBPACK_IMPORTED_MODULE_17__["default"];
|
|
|
26490
28526
|
/*!**************************!*\
|
|
26491
28527
|
!*** ./src/utilities.js ***!
|
|
26492
28528
|
\**************************/
|
|
26493
|
-
/*! exports provided: isPlainObject, deepCopy, extend, trigger, getShadowParent, hasOwnProperty, isNumber, isInteger */
|
|
28529
|
+
/*! exports provided: isPlainObject, deepCopy, extend, trigger, getShadowParent, hasOwnProperty, isNumber, isInteger, generateUUID */
|
|
26494
28530
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
26495
28531
|
|
|
26496
28532
|
"use strict";
|
|
@@ -26503,6 +28539,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
26503
28539
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hasOwnProperty", function() { return hasOwnProperty; });
|
|
26504
28540
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isNumber", function() { return isNumber; });
|
|
26505
28541
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isInteger", function() { return isInteger; });
|
|
28542
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "generateUUID", function() { return generateUUID; });
|
|
26506
28543
|
/* harmony import */ var core_js_modules_es_array_is_array_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.array.is-array.js */ "./node_modules/core-js/modules/es.array.is-array.js");
|
|
26507
28544
|
/* harmony import */ var core_js_modules_es_array_is_array_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_is_array_js__WEBPACK_IMPORTED_MODULE_0__);
|
|
26508
28545
|
/* harmony import */ var core_js_modules_es_array_map_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.array.map.js */ "./node_modules/core-js/modules/es.array.map.js");
|
|
@@ -26527,18 +28564,21 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
26527
28564
|
/* harmony import */ var core_js_modules_es_parse_float_js__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_parse_float_js__WEBPACK_IMPORTED_MODULE_10__);
|
|
26528
28565
|
/* harmony import */ var core_js_modules_es_parse_int_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! core-js/modules/es.parse-int.js */ "./node_modules/core-js/modules/es.parse-int.js");
|
|
26529
28566
|
/* harmony import */ var core_js_modules_es_parse_int_js__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_parse_int_js__WEBPACK_IMPORTED_MODULE_11__);
|
|
26530
|
-
/* harmony import */ var
|
|
26531
|
-
/* harmony import */ var
|
|
26532
|
-
/* harmony import */ var
|
|
26533
|
-
/* harmony import */ var
|
|
26534
|
-
/* harmony import */ var
|
|
26535
|
-
/* harmony import */ var
|
|
26536
|
-
/* harmony import */ var
|
|
26537
|
-
/* harmony import */ var
|
|
26538
|
-
/* harmony import */ var
|
|
26539
|
-
/* harmony import */ var
|
|
26540
|
-
/* harmony import */ var
|
|
26541
|
-
/* harmony import */ var
|
|
28567
|
+
/* harmony import */ var core_js_modules_es_string_replace_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! core-js/modules/es.string.replace.js */ "./node_modules/core-js/modules/es.string.replace.js");
|
|
28568
|
+
/* harmony import */ var core_js_modules_es_string_replace_js__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_replace_js__WEBPACK_IMPORTED_MODULE_12__);
|
|
28569
|
+
/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! core-js/modules/es.symbol.js */ "./node_modules/core-js/modules/es.symbol.js");
|
|
28570
|
+
/* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_13__);
|
|
28571
|
+
/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! core-js/modules/es.symbol.description.js */ "./node_modules/core-js/modules/es.symbol.description.js");
|
|
28572
|
+
/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_14__);
|
|
28573
|
+
/* harmony import */ var core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ "./node_modules/core-js/modules/es.symbol.iterator.js");
|
|
28574
|
+
/* harmony import */ var core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_15__);
|
|
28575
|
+
/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! core-js/modules/es.array.iterator.js */ "./node_modules/core-js/modules/es.array.iterator.js");
|
|
28576
|
+
/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_16__);
|
|
28577
|
+
/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! core-js/modules/es.string.iterator.js */ "./node_modules/core-js/modules/es.string.iterator.js");
|
|
28578
|
+
/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_17__);
|
|
28579
|
+
/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ "./node_modules/core-js/modules/web.dom-collections.iterator.js");
|
|
28580
|
+
/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_18___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_18__);
|
|
28581
|
+
|
|
26542
28582
|
|
|
26543
28583
|
|
|
26544
28584
|
|
|
@@ -26642,6 +28682,25 @@ function isInteger(value) {
|
|
|
26642
28682
|
var v = parseInt(value);
|
|
26643
28683
|
return match !== null && !isNaN(v) && isFinite(v);
|
|
26644
28684
|
}
|
|
28685
|
+
/* This function generates a uuid.
|
|
28686
|
+
https://stackoverflow.com/questions/105034/create-guid-uuid-in-javascript
|
|
28687
|
+
TODO: It will be probably better to move to: https://www.npmjs.com/package/uuid
|
|
28688
|
+
*/
|
|
28689
|
+
|
|
28690
|
+
function generateUUID() {
|
|
28691
|
+
var d = new Date().getTime();
|
|
28692
|
+
|
|
28693
|
+
if (typeof performance !== 'undefined' && typeof performance.now === 'function') {
|
|
28694
|
+
d += performance.now();
|
|
28695
|
+
/* use high-precision timer if available */
|
|
28696
|
+
}
|
|
28697
|
+
|
|
28698
|
+
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
|
|
28699
|
+
var r = (d + Math.random() * 16) % 16 | 0;
|
|
28700
|
+
d = Math.floor(d / 16);
|
|
28701
|
+
return (c === 'x' ? r : r & 0x3 | 0x8).toString(16);
|
|
28702
|
+
});
|
|
28703
|
+
}
|
|
26645
28704
|
|
|
26646
28705
|
/***/ }),
|
|
26647
28706
|
|
|
@@ -26813,7 +28872,7 @@ var Validator = /*#__PURE__*/function () {
|
|
|
26813
28872
|
return [{
|
|
26814
28873
|
path: path,
|
|
26815
28874
|
property: 'const',
|
|
26816
|
-
message: this.translate('error_const')
|
|
28875
|
+
message: this.translate('error_const', null, schema)
|
|
26817
28876
|
}];
|
|
26818
28877
|
}
|
|
26819
28878
|
|
|
@@ -26829,7 +28888,7 @@ var Validator = /*#__PURE__*/function () {
|
|
|
26829
28888
|
return [{
|
|
26830
28889
|
path: path,
|
|
26831
28890
|
property: 'enum',
|
|
26832
|
-
message: this.translate('error_enum')
|
|
28891
|
+
message: this.translate('error_enum', null, schema)
|
|
26833
28892
|
}];
|
|
26834
28893
|
}
|
|
26835
28894
|
|
|
@@ -26866,7 +28925,7 @@ var Validator = /*#__PURE__*/function () {
|
|
|
26866
28925
|
return [{
|
|
26867
28926
|
path: path,
|
|
26868
28927
|
property: 'anyOf',
|
|
26869
|
-
message: this.translate('error_anyOf')
|
|
28928
|
+
message: this.translate('error_anyOf', null, schema)
|
|
26870
28929
|
}];
|
|
26871
28930
|
}
|
|
26872
28931
|
|
|
@@ -26896,7 +28955,7 @@ var Validator = /*#__PURE__*/function () {
|
|
|
26896
28955
|
errors.push({
|
|
26897
28956
|
path: path,
|
|
26898
28957
|
property: 'oneOf',
|
|
26899
|
-
message: this.translate('error_oneOf', [valid])
|
|
28958
|
+
message: this.translate('error_oneOf', [valid], schema)
|
|
26900
28959
|
});
|
|
26901
28960
|
errors.push.apply(errors, oneofErrors);
|
|
26902
28961
|
}
|
|
@@ -26908,7 +28967,7 @@ var Validator = /*#__PURE__*/function () {
|
|
|
26908
28967
|
return [{
|
|
26909
28968
|
path: path,
|
|
26910
28969
|
property: 'not',
|
|
26911
|
-
message: this.translate('error_not')
|
|
28970
|
+
message: this.translate('error_not', null, schema)
|
|
26912
28971
|
}];
|
|
26913
28972
|
}
|
|
26914
28973
|
|
|
@@ -26927,7 +28986,7 @@ var Validator = /*#__PURE__*/function () {
|
|
|
26927
28986
|
return [{
|
|
26928
28987
|
path: path,
|
|
26929
28988
|
property: 'type',
|
|
26930
|
-
message: this.translate('error_type_union')
|
|
28989
|
+
message: this.translate('error_type_union', null, schema)
|
|
26931
28990
|
}];
|
|
26932
28991
|
}
|
|
26933
28992
|
} else {
|
|
@@ -26940,14 +28999,14 @@ var Validator = /*#__PURE__*/function () {
|
|
|
26940
28999
|
return [{
|
|
26941
29000
|
path: path,
|
|
26942
29001
|
property: 'type',
|
|
26943
|
-
message: this.translate('error_type', [schema.format])
|
|
29002
|
+
message: this.translate('error_type', [schema.format], schema)
|
|
26944
29003
|
}];
|
|
26945
29004
|
}
|
|
26946
29005
|
} else if (!this._checkType(schema.type, value)) {
|
|
26947
29006
|
return [{
|
|
26948
29007
|
path: path,
|
|
26949
29008
|
property: 'type',
|
|
26950
|
-
message: this.translate('error_type', [schema.type])
|
|
29009
|
+
message: this.translate('error_type', [schema.type], schema)
|
|
26951
29010
|
}];
|
|
26952
29011
|
}
|
|
26953
29012
|
}
|
|
@@ -26967,7 +29026,7 @@ var Validator = /*#__PURE__*/function () {
|
|
|
26967
29026
|
return [{
|
|
26968
29027
|
path: path,
|
|
26969
29028
|
property: 'disallow',
|
|
26970
|
-
message: this.translate('error_disallow_union')
|
|
29029
|
+
message: this.translate('error_disallow_union', null, schema)
|
|
26971
29030
|
}];
|
|
26972
29031
|
}
|
|
26973
29032
|
} else {
|
|
@@ -26976,7 +29035,7 @@ var Validator = /*#__PURE__*/function () {
|
|
|
26976
29035
|
return [{
|
|
26977
29036
|
path: path,
|
|
26978
29037
|
property: 'disallow',
|
|
26979
|
-
message: this.translate('error_disallow', [schema.disallow])
|
|
29038
|
+
message: this.translate('error_disallow', [schema.disallow], schema)
|
|
26980
29039
|
}];
|
|
26981
29040
|
}
|
|
26982
29041
|
}
|
|
@@ -27007,7 +29066,7 @@ var Validator = /*#__PURE__*/function () {
|
|
|
27007
29066
|
return [{
|
|
27008
29067
|
path: path,
|
|
27009
29068
|
property: 'maximum',
|
|
27010
|
-
message: this.translate(schema.exclusiveMaximum ? 'error_maximum_excl' : 'error_maximum_incl', [schema.maximum])
|
|
29069
|
+
message: this.translate(schema.exclusiveMaximum ? 'error_maximum_excl' : 'error_maximum_incl', [schema.maximum], schema)
|
|
27011
29070
|
}];
|
|
27012
29071
|
}
|
|
27013
29072
|
|
|
@@ -27029,7 +29088,7 @@ var Validator = /*#__PURE__*/function () {
|
|
|
27029
29088
|
return [{
|
|
27030
29089
|
path: path,
|
|
27031
29090
|
property: 'minimum',
|
|
27032
|
-
message: this.translate(schema.exclusiveMinimum ? 'error_minimum_excl' : 'error_minimum_incl', [schema.minimum])
|
|
29091
|
+
message: this.translate(schema.exclusiveMinimum ? 'error_minimum_excl' : 'error_minimum_incl', [schema.minimum], schema)
|
|
27033
29092
|
}];
|
|
27034
29093
|
}
|
|
27035
29094
|
|
|
@@ -27044,7 +29103,7 @@ var Validator = /*#__PURE__*/function () {
|
|
|
27044
29103
|
errors.push({
|
|
27045
29104
|
path: path,
|
|
27046
29105
|
property: 'maxLength',
|
|
27047
|
-
message: this.translate('error_maxLength', [schema.maxLength])
|
|
29106
|
+
message: this.translate('error_maxLength', [schema.maxLength], schema)
|
|
27048
29107
|
});
|
|
27049
29108
|
}
|
|
27050
29109
|
|
|
@@ -27057,7 +29116,7 @@ var Validator = /*#__PURE__*/function () {
|
|
|
27057
29116
|
return [{
|
|
27058
29117
|
path: path,
|
|
27059
29118
|
property: 'minLength',
|
|
27060
|
-
message: this.translate(schema.minLength === 1 ? 'error_notempty' : 'error_minLength', [schema.minLength])
|
|
29119
|
+
message: this.translate(schema.minLength === 1 ? 'error_notempty' : 'error_minLength', [schema.minLength], schema)
|
|
27061
29120
|
}];
|
|
27062
29121
|
}
|
|
27063
29122
|
|
|
@@ -27070,7 +29129,7 @@ var Validator = /*#__PURE__*/function () {
|
|
|
27070
29129
|
return [{
|
|
27071
29130
|
path: path,
|
|
27072
29131
|
property: 'pattern',
|
|
27073
|
-
message: schema.options && schema.options.patternmessage ? schema.options.patternmessage : this.translate('error_pattern', [schema.pattern])
|
|
29132
|
+
message: schema.options && schema.options.patternmessage ? schema.options.patternmessage : this.translate('error_pattern', [schema.pattern], schema)
|
|
27074
29133
|
}];
|
|
27075
29134
|
}
|
|
27076
29135
|
|
|
@@ -27103,7 +29162,7 @@ var Validator = /*#__PURE__*/function () {
|
|
|
27103
29162
|
errors.push({
|
|
27104
29163
|
path: path,
|
|
27105
29164
|
property: 'additionalItems',
|
|
27106
|
-
message: this.translate('error_additionalItems')
|
|
29165
|
+
message: this.translate('error_additionalItems', null, schema)
|
|
27107
29166
|
});
|
|
27108
29167
|
break;
|
|
27109
29168
|
/* Default for `additionalItems` is an empty schema */
|
|
@@ -27127,7 +29186,7 @@ var Validator = /*#__PURE__*/function () {
|
|
|
27127
29186
|
return [{
|
|
27128
29187
|
path: path,
|
|
27129
29188
|
property: 'maxItems',
|
|
27130
|
-
message: this.translate('error_maxItems', [schema.maxItems])
|
|
29189
|
+
message: this.translate('error_maxItems', [schema.maxItems], schema)
|
|
27131
29190
|
}];
|
|
27132
29191
|
}
|
|
27133
29192
|
|
|
@@ -27138,7 +29197,7 @@ var Validator = /*#__PURE__*/function () {
|
|
|
27138
29197
|
return [{
|
|
27139
29198
|
path: path,
|
|
27140
29199
|
property: 'minItems',
|
|
27141
|
-
message: this.translate('error_minItems', [schema.minItems])
|
|
29200
|
+
message: this.translate('error_minItems', [schema.minItems], schema)
|
|
27142
29201
|
}];
|
|
27143
29202
|
}
|
|
27144
29203
|
|
|
@@ -27154,7 +29213,7 @@ var Validator = /*#__PURE__*/function () {
|
|
|
27154
29213
|
return [{
|
|
27155
29214
|
path: path,
|
|
27156
29215
|
property: 'uniqueItems',
|
|
27157
|
-
message: this.translate('error_uniqueItems')
|
|
29216
|
+
message: this.translate('error_uniqueItems', null, schema)
|
|
27158
29217
|
}];
|
|
27159
29218
|
}
|
|
27160
29219
|
|
|
@@ -27170,7 +29229,7 @@ var Validator = /*#__PURE__*/function () {
|
|
|
27170
29229
|
return [{
|
|
27171
29230
|
path: path,
|
|
27172
29231
|
property: 'maxProperties',
|
|
27173
|
-
message: this.translate('error_maxProperties', [schema.maxProperties])
|
|
29232
|
+
message: this.translate('error_maxProperties', [schema.maxProperties], schema)
|
|
27174
29233
|
}];
|
|
27175
29234
|
}
|
|
27176
29235
|
|
|
@@ -27181,7 +29240,7 @@ var Validator = /*#__PURE__*/function () {
|
|
|
27181
29240
|
return [{
|
|
27182
29241
|
path: path,
|
|
27183
29242
|
property: 'minProperties',
|
|
27184
|
-
message: this.translate('error_minProperties', [schema.minProperties])
|
|
29243
|
+
message: this.translate('error_minProperties', [schema.minProperties], schema)
|
|
27185
29244
|
}];
|
|
27186
29245
|
}
|
|
27187
29246
|
|
|
@@ -27205,7 +29264,7 @@ var Validator = /*#__PURE__*/function () {
|
|
|
27205
29264
|
errors.push({
|
|
27206
29265
|
path: path,
|
|
27207
29266
|
property: 'required',
|
|
27208
|
-
message: _this8.translate('error_required', [schema && schema.properties && schema.properties[e] && schema.properties[e].title ? schema.properties[e].title : e])
|
|
29267
|
+
message: _this8.translate('error_required', [schema && schema.properties && schema.properties[e] && schema.properties[e].title ? schema.properties[e].title : e], schema)
|
|
27209
29268
|
});
|
|
27210
29269
|
});
|
|
27211
29270
|
}
|
|
@@ -27274,7 +29333,7 @@ var Validator = /*#__PURE__*/function () {
|
|
|
27274
29333
|
errors.push({
|
|
27275
29334
|
path: path,
|
|
27276
29335
|
property: 'propertyNames',
|
|
27277
|
-
message: _this11.translate('error_property_names_false', [k])
|
|
29336
|
+
message: _this11.translate('error_property_names_false', [k], schema)
|
|
27278
29337
|
});
|
|
27279
29338
|
return "break";
|
|
27280
29339
|
}
|
|
@@ -27347,7 +29406,7 @@ var Validator = /*#__PURE__*/function () {
|
|
|
27347
29406
|
errors.push({
|
|
27348
29407
|
path: path,
|
|
27349
29408
|
property: 'propertyNames',
|
|
27350
|
-
message: _this11.translate('error_property_names_unsupported', [j])
|
|
29409
|
+
message: _this11.translate('error_property_names_unsupported', [j], schema)
|
|
27351
29410
|
});
|
|
27352
29411
|
return false;
|
|
27353
29412
|
}
|
|
@@ -27355,7 +29414,7 @@ var Validator = /*#__PURE__*/function () {
|
|
|
27355
29414
|
errors.push({
|
|
27356
29415
|
path: path,
|
|
27357
29416
|
property: 'propertyNames',
|
|
27358
|
-
message: _this11.translate(msg, [k])
|
|
29417
|
+
message: _this11.translate(msg, [k], schema)
|
|
27359
29418
|
});
|
|
27360
29419
|
return false;
|
|
27361
29420
|
});
|
|
@@ -27384,7 +29443,7 @@ var Validator = /*#__PURE__*/function () {
|
|
|
27384
29443
|
errors.push({
|
|
27385
29444
|
path: path,
|
|
27386
29445
|
property: 'additionalProperties',
|
|
27387
|
-
message: this.translate('error_additional_properties', [k])
|
|
29446
|
+
message: this.translate('error_additional_properties', [k], schema)
|
|
27388
29447
|
});
|
|
27389
29448
|
break;
|
|
27390
29449
|
/* Allowed */
|
|
@@ -27419,7 +29478,7 @@ var Validator = /*#__PURE__*/function () {
|
|
|
27419
29478
|
errors.push({
|
|
27420
29479
|
path: path,
|
|
27421
29480
|
property: 'dependencies',
|
|
27422
|
-
message: _this12.translate('error_dependency', [d])
|
|
29481
|
+
message: _this12.translate('error_dependency', [d], schema)
|
|
27423
29482
|
});
|
|
27424
29483
|
}
|
|
27425
29484
|
});
|
|
@@ -27583,7 +29642,7 @@ var Validator = /*#__PURE__*/function () {
|
|
|
27583
29642
|
return [{
|
|
27584
29643
|
path: path,
|
|
27585
29644
|
property: 'required',
|
|
27586
|
-
message: this.translate('error_notset')
|
|
29645
|
+
message: this.translate('error_notset', null, schema)
|
|
27587
29646
|
}];
|
|
27588
29647
|
}
|
|
27589
29648
|
|
|
@@ -27672,7 +29731,7 @@ var Validator = /*#__PURE__*/function () {
|
|
|
27672
29731
|
return [{
|
|
27673
29732
|
path: path,
|
|
27674
29733
|
property: 'format',
|
|
27675
|
-
message: this.translate('error_pattern', ['^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$'])
|
|
29734
|
+
message: this.translate('error_pattern', ['^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$'], schema)
|
|
27676
29735
|
}];
|
|
27677
29736
|
}
|
|
27678
29737
|
|
|
@@ -27698,7 +29757,7 @@ var Validator = /*#__PURE__*/function () {
|
|
|
27698
29757
|
return [{
|
|
27699
29758
|
path: path,
|
|
27700
29759
|
property: schema.multipleOf ? 'multipleOf' : 'divisibleBy',
|
|
27701
|
-
message: this.translate('error_multipleOf', [divisor])
|
|
29760
|
+
message: this.translate('error_multipleOf', [divisor], schema)
|
|
27702
29761
|
}];
|
|
27703
29762
|
}
|
|
27704
29763
|
|
|
@@ -27716,14 +29775,14 @@ var Validator = /*#__PURE__*/function () {
|
|
|
27716
29775
|
return [{
|
|
27717
29776
|
path: path,
|
|
27718
29777
|
property: 'format',
|
|
27719
|
-
message: _this15.translate('error_invalid_epoch')
|
|
29778
|
+
message: _this15.translate('error_invalid_epoch', null, schema)
|
|
27720
29779
|
}];
|
|
27721
29780
|
} else if (value !== Math.abs(parseInt(value))) {
|
|
27722
29781
|
/* not much to check for, so we assume value is ok if it's a positive number */
|
|
27723
29782
|
return [{
|
|
27724
29783
|
path: path,
|
|
27725
29784
|
property: 'format',
|
|
27726
|
-
message: _this15.translate("error_".concat(schema.format.replace(/-/g, '_')), [dateFormat])
|
|
29785
|
+
message: _this15.translate("error_".concat(schema.format.replace(/-/g, '_')), [dateFormat], schema)
|
|
27727
29786
|
}];
|
|
27728
29787
|
}
|
|
27729
29788
|
|
|
@@ -27756,7 +29815,7 @@ var Validator = /*#__PURE__*/function () {
|
|
|
27756
29815
|
return [{
|
|
27757
29816
|
path: path,
|
|
27758
29817
|
property: 'format',
|
|
27759
|
-
message: _this15.translate("error_".concat(editor.format.replace(/-/g, '_')), [errorDateFormat])
|
|
29818
|
+
message: _this15.translate("error_".concat(editor.format.replace(/-/g, '_')), [errorDateFormat], schema)
|
|
27760
29819
|
}];
|
|
27761
29820
|
}
|
|
27762
29821
|
}
|
|
@@ -27785,7 +29844,7 @@ var Validator = /*#__PURE__*/function () {
|
|
|
27785
29844
|
return [{
|
|
27786
29845
|
path: path,
|
|
27787
29846
|
property: 'format',
|
|
27788
|
-
message: this.translate("error_".concat(schema.format.replace(/-/g, '_')), [dateFormat])
|
|
29847
|
+
message: this.translate("error_".concat(schema.format.replace(/-/g, '_')), [dateFormat], schema)
|
|
27789
29848
|
}];
|
|
27790
29849
|
}
|
|
27791
29850
|
} else if (editor) {
|