@digipair/skill-web-jsoneditor 0.21.2 → 0.21.7
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/index.cjs.js +1476 -1526
- package/index.esm.js +1471 -1521
- package/package.json +1 -1
package/index.cjs.js
CHANGED
|
@@ -131,16 +131,16 @@ var r$6 = function(t) {
|
|
|
131
131
|
}(t) : t;
|
|
132
132
|
};
|
|
133
133
|
|
|
134
|
-
function _array_like_to_array$
|
|
134
|
+
function _array_like_to_array$h(arr, len) {
|
|
135
135
|
if (len == null || len > arr.length) len = arr.length;
|
|
136
136
|
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
137
137
|
return arr2;
|
|
138
138
|
}
|
|
139
|
-
function _array_with_holes$
|
|
139
|
+
function _array_with_holes$b(arr) {
|
|
140
140
|
if (Array.isArray(arr)) return arr;
|
|
141
141
|
}
|
|
142
142
|
function _array_without_holes$b(arr) {
|
|
143
|
-
if (Array.isArray(arr)) return _array_like_to_array$
|
|
143
|
+
if (Array.isArray(arr)) return _array_like_to_array$h(arr);
|
|
144
144
|
}
|
|
145
145
|
function _assert_this_initialized$d(self) {
|
|
146
146
|
if (self === void 0) {
|
|
@@ -238,7 +238,7 @@ function _is_native_function$4(fn) {
|
|
|
238
238
|
function _iterable_to_array$b(iter) {
|
|
239
239
|
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
240
240
|
}
|
|
241
|
-
function _iterable_to_array_limit$
|
|
241
|
+
function _iterable_to_array_limit$b(arr, i) {
|
|
242
242
|
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
243
243
|
if (_i == null) return;
|
|
244
244
|
var _arr = [];
|
|
@@ -262,7 +262,7 @@ function _iterable_to_array_limit$9(arr, i) {
|
|
|
262
262
|
}
|
|
263
263
|
return _arr;
|
|
264
264
|
}
|
|
265
|
-
function _non_iterable_rest$
|
|
265
|
+
function _non_iterable_rest$b() {
|
|
266
266
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
267
267
|
}
|
|
268
268
|
function _non_iterable_spread$b() {
|
|
@@ -281,23 +281,23 @@ function _set_prototype_of$d(o, p) {
|
|
|
281
281
|
};
|
|
282
282
|
return _set_prototype_of$d(o, p);
|
|
283
283
|
}
|
|
284
|
-
function _sliced_to_array$
|
|
285
|
-
return _array_with_holes$
|
|
284
|
+
function _sliced_to_array$b(arr, i) {
|
|
285
|
+
return _array_with_holes$b(arr) || _iterable_to_array_limit$b(arr, i) || _unsupported_iterable_to_array$h(arr, i) || _non_iterable_rest$b();
|
|
286
286
|
}
|
|
287
287
|
function _to_consumable_array$b(arr) {
|
|
288
|
-
return _array_without_holes$b(arr) || _iterable_to_array$b(arr) || _unsupported_iterable_to_array$
|
|
288
|
+
return _array_without_holes$b(arr) || _iterable_to_array$b(arr) || _unsupported_iterable_to_array$h(arr) || _non_iterable_spread$b();
|
|
289
289
|
}
|
|
290
290
|
function _type_of$m(obj) {
|
|
291
291
|
"@swc/helpers - typeof";
|
|
292
292
|
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
293
293
|
}
|
|
294
|
-
function _unsupported_iterable_to_array$
|
|
294
|
+
function _unsupported_iterable_to_array$h(o, minLen) {
|
|
295
295
|
if (!o) return;
|
|
296
|
-
if (typeof o === "string") return _array_like_to_array$
|
|
296
|
+
if (typeof o === "string") return _array_like_to_array$h(o, minLen);
|
|
297
297
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
298
298
|
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
299
299
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
300
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$
|
|
300
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$h(o, minLen);
|
|
301
301
|
}
|
|
302
302
|
function _wrap_native_super$4(Class) {
|
|
303
303
|
var _cache = typeof Map === "function" ? new Map() : undefined;
|
|
@@ -713,7 +713,7 @@ var b$1 = /*#__PURE__*/ function(HTMLElement1) {
|
|
|
713
713
|
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
714
714
|
try {
|
|
715
715
|
for(var _iterator = this._$Ep[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
|
|
716
|
-
var _step_value = _sliced_to_array$
|
|
716
|
+
var _step_value = _sliced_to_array$b(_step.value, 2), t = _step_value[0], _$s = _step_value[1];
|
|
717
717
|
this[t] = _$s;
|
|
718
718
|
}
|
|
719
719
|
} catch (err) {
|
|
@@ -736,7 +736,7 @@ var b$1 = /*#__PURE__*/ function(HTMLElement1) {
|
|
|
736
736
|
var _iteratorNormalCompletion1 = true, _didIteratorError1 = false, _iteratorError1 = undefined;
|
|
737
737
|
if (t1.size > 0) try {
|
|
738
738
|
for(var _iterator1 = t1[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true){
|
|
739
|
-
var _step_value1 = _sliced_to_array$
|
|
739
|
+
var _step_value1 = _sliced_to_array$b(_step1.value, 2), _$s1 = _step_value1[0], i = _step_value1[1];
|
|
740
740
|
!0 !== i.wrapped || this._$AL.has(_$s1) || void 0 === this[_$s1] || this.P(_$s1, this[_$s1], i);
|
|
741
741
|
}
|
|
742
742
|
} catch (err) {
|
|
@@ -920,7 +920,7 @@ var b$1 = /*#__PURE__*/ function(HTMLElement1) {
|
|
|
920
920
|
var _iteratorNormalCompletion1 = true, _didIteratorError1 = false, _iteratorError1 = undefined;
|
|
921
921
|
if (void 0 !== s1) try {
|
|
922
922
|
for(var _iterator1 = s1[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true){
|
|
923
|
-
var _step_value = _sliced_to_array$
|
|
923
|
+
var _step_value = _sliced_to_array$b(_step1.value, 2), t2 = _step_value[0], i1 = _step_value[1];
|
|
924
924
|
this.elementProperties.set(t2, i1);
|
|
925
925
|
}
|
|
926
926
|
} catch (err) {
|
|
@@ -942,7 +942,7 @@ var b$1 = /*#__PURE__*/ function(HTMLElement1) {
|
|
|
942
942
|
var _iteratorNormalCompletion2 = true, _didIteratorError2 = false, _iteratorError2 = undefined;
|
|
943
943
|
try {
|
|
944
944
|
for(var _iterator2 = this.elementProperties[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true){
|
|
945
|
-
var _step_value1 = _sliced_to_array$
|
|
945
|
+
var _step_value1 = _sliced_to_array$b(_step2.value, 2), t3 = _step_value1[0], s2 = _step_value1[1];
|
|
946
946
|
var i2 = this._$Eu(t3, s2);
|
|
947
947
|
void 0 !== i2 && this._$Eh.set(i2, t3);
|
|
948
948
|
}
|
|
@@ -1014,16 +1014,16 @@ b$1.elementStyles = [], b$1.shadowRootOptions = {
|
|
|
1014
1014
|
* @license
|
|
1015
1015
|
* Copyright 2017 Google LLC
|
|
1016
1016
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
1017
|
-
*/ function _array_like_to_array$
|
|
1017
|
+
*/ function _array_like_to_array$g(arr, len) {
|
|
1018
1018
|
if (len == null || len > arr.length) len = arr.length;
|
|
1019
1019
|
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
1020
1020
|
return arr2;
|
|
1021
1021
|
}
|
|
1022
|
-
function _array_with_holes$
|
|
1022
|
+
function _array_with_holes$a(arr) {
|
|
1023
1023
|
if (Array.isArray(arr)) return arr;
|
|
1024
1024
|
}
|
|
1025
1025
|
function _array_without_holes$a(arr) {
|
|
1026
|
-
if (Array.isArray(arr)) return _array_like_to_array$
|
|
1026
|
+
if (Array.isArray(arr)) return _array_like_to_array$g(arr);
|
|
1027
1027
|
}
|
|
1028
1028
|
function _assert_this_initialized$c(self) {
|
|
1029
1029
|
if (self === void 0) {
|
|
@@ -1072,7 +1072,7 @@ function _inherits$c(subClass, superClass) {
|
|
|
1072
1072
|
function _iterable_to_array$a(iter) {
|
|
1073
1073
|
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
1074
1074
|
}
|
|
1075
|
-
function _iterable_to_array_limit$
|
|
1075
|
+
function _iterable_to_array_limit$a(arr, i) {
|
|
1076
1076
|
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
1077
1077
|
if (_i == null) return;
|
|
1078
1078
|
var _arr = [];
|
|
@@ -1096,7 +1096,7 @@ function _iterable_to_array_limit$8(arr, i) {
|
|
|
1096
1096
|
}
|
|
1097
1097
|
return _arr;
|
|
1098
1098
|
}
|
|
1099
|
-
function _non_iterable_rest$
|
|
1099
|
+
function _non_iterable_rest$a() {
|
|
1100
1100
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
1101
1101
|
}
|
|
1102
1102
|
function _non_iterable_spread$a() {
|
|
@@ -1115,23 +1115,23 @@ function _set_prototype_of$c(o, p) {
|
|
|
1115
1115
|
};
|
|
1116
1116
|
return _set_prototype_of$c(o, p);
|
|
1117
1117
|
}
|
|
1118
|
-
function _sliced_to_array$
|
|
1119
|
-
return _array_with_holes$
|
|
1118
|
+
function _sliced_to_array$a(arr, i) {
|
|
1119
|
+
return _array_with_holes$a(arr) || _iterable_to_array_limit$a(arr, i) || _unsupported_iterable_to_array$g(arr, i) || _non_iterable_rest$a();
|
|
1120
1120
|
}
|
|
1121
1121
|
function _to_consumable_array$a(arr) {
|
|
1122
|
-
return _array_without_holes$a(arr) || _iterable_to_array$a(arr) || _unsupported_iterable_to_array$
|
|
1122
|
+
return _array_without_holes$a(arr) || _iterable_to_array$a(arr) || _unsupported_iterable_to_array$g(arr) || _non_iterable_spread$a();
|
|
1123
1123
|
}
|
|
1124
1124
|
function _type_of$l(obj) {
|
|
1125
1125
|
"@swc/helpers - typeof";
|
|
1126
1126
|
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
1127
1127
|
}
|
|
1128
|
-
function _unsupported_iterable_to_array$
|
|
1128
|
+
function _unsupported_iterable_to_array$g(o, minLen) {
|
|
1129
1129
|
if (!o) return;
|
|
1130
|
-
if (typeof o === "string") return _array_like_to_array$
|
|
1130
|
+
if (typeof o === "string") return _array_like_to_array$g(o, minLen);
|
|
1131
1131
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
1132
1132
|
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
1133
1133
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
1134
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$
|
|
1134
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$g(o, minLen);
|
|
1135
1135
|
}
|
|
1136
1136
|
function _is_native_reflect_construct$c() {
|
|
1137
1137
|
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
@@ -1162,7 +1162,7 @@ var t$3 = globalThis, i$3 = t$3.trustedTypes, s$2 = i$3 ? i$3.createPolicy("lit-
|
|
|
1162
1162
|
createHTML: function(t) {
|
|
1163
1163
|
return t;
|
|
1164
1164
|
}
|
|
1165
|
-
}) : void 0, e$1 = "$lit$", h$1 = "lit$".concat(
|
|
1165
|
+
}) : void 0, e$1 = "$lit$", h$1 = "lit$".concat(Math.random().toFixed(9).slice(2), "$"), o$2 = "?" + h$1, n$2 = "<".concat(o$2, ">"), r$4 = document, l$2 = function() {
|
|
1166
1166
|
return r$4.createComment("");
|
|
1167
1167
|
}, c$1 = function(t) {
|
|
1168
1168
|
return null === t || "object" != typeof t && "function" != typeof t;
|
|
@@ -1206,7 +1206,7 @@ var V = /*#__PURE__*/ function() {
|
|
|
1206
1206
|
var r;
|
|
1207
1207
|
this.parts = [];
|
|
1208
1208
|
var c = 0, a = 0;
|
|
1209
|
-
var u = t.length - 1, d = this.parts, _P = _sliced_to_array$
|
|
1209
|
+
var u = t.length - 1, d = this.parts, _P = _sliced_to_array$a(P(t, s), 2), f = _P[0], v = _P[1];
|
|
1210
1210
|
if (this.el = V.createElement(f, n), E.currentNode = this.el.content, 2 === s) {
|
|
1211
1211
|
var _t;
|
|
1212
1212
|
var t1 = this.el.content.firstChild;
|
|
@@ -1623,7 +1623,7 @@ var L = /*#__PURE__*/ function() {
|
|
|
1623
1623
|
}();
|
|
1624
1624
|
var Z$1 = t$3.litHtmlPolyfillSupport;
|
|
1625
1625
|
var _litHtmlVersions;
|
|
1626
|
-
Z$1 === null || Z$1 === void 0 ? void 0 : Z$1(V, M), ((_litHtmlVersions = (_t$1 = t$3).litHtmlVersions) !== null && _litHtmlVersions !== void 0 ? _litHtmlVersions : _t$1.litHtmlVersions = []).push("3.1.
|
|
1626
|
+
Z$1 === null || Z$1 === void 0 ? void 0 : Z$1(V, M), ((_litHtmlVersions = (_t$1 = t$3).litHtmlVersions) !== null && _litHtmlVersions !== void 0 ? _litHtmlVersions : _t$1.litHtmlVersions = []).push("3.1.4");
|
|
1627
1627
|
var j$1 = function(t, i, s) {
|
|
1628
1628
|
var _s_renderBefore;
|
|
1629
1629
|
var e = (_s_renderBefore = s === null || s === void 0 ? void 0 : s.renderBefore) !== null && _s_renderBefore !== void 0 ? _s_renderBefore : i;
|
|
@@ -1811,7 +1811,7 @@ r$3 === null || r$3 === void 0 ? void 0 : r$3({
|
|
|
1811
1811
|
LitElement: s$1
|
|
1812
1812
|
});
|
|
1813
1813
|
var _litElementVersions;
|
|
1814
|
-
((_litElementVersions = (_globalThis1 = globalThis).litElementVersions) !== null && _litElementVersions !== void 0 ? _litElementVersions : _globalThis1.litElementVersions = []).push("4.0.
|
|
1814
|
+
((_litElementVersions = (_globalThis1 = globalThis).litElementVersions) !== null && _litElementVersions !== void 0 ? _litElementVersions : _globalThis1.litElementVersions = []).push("4.0.6");
|
|
1815
1815
|
|
|
1816
1816
|
/**
|
|
1817
1817
|
* @license
|
|
@@ -1825,7 +1825,7 @@ var _litElementVersions;
|
|
|
1825
1825
|
};
|
|
1826
1826
|
};
|
|
1827
1827
|
|
|
1828
|
-
function _define_property$
|
|
1828
|
+
function _define_property$6(obj, key, value) {
|
|
1829
1829
|
if (key in obj) {
|
|
1830
1830
|
Object.defineProperty(obj, key, {
|
|
1831
1831
|
value: value,
|
|
@@ -1838,7 +1838,7 @@ function _define_property$5(obj, key, value) {
|
|
|
1838
1838
|
}
|
|
1839
1839
|
return obj;
|
|
1840
1840
|
}
|
|
1841
|
-
function _object_spread$
|
|
1841
|
+
function _object_spread$5(target) {
|
|
1842
1842
|
for(var i = 1; i < arguments.length; i++){
|
|
1843
1843
|
var source = arguments[i] != null ? arguments[i] : {};
|
|
1844
1844
|
var ownKeys = Object.keys(source);
|
|
@@ -1848,12 +1848,12 @@ function _object_spread$4(target) {
|
|
|
1848
1848
|
}));
|
|
1849
1849
|
}
|
|
1850
1850
|
ownKeys.forEach(function(key) {
|
|
1851
|
-
_define_property$
|
|
1851
|
+
_define_property$6(target, key, source[key]);
|
|
1852
1852
|
});
|
|
1853
1853
|
}
|
|
1854
1854
|
return target;
|
|
1855
1855
|
}
|
|
1856
|
-
function ownKeys$
|
|
1856
|
+
function ownKeys$3(object, enumerableOnly) {
|
|
1857
1857
|
var keys = Object.keys(object);
|
|
1858
1858
|
if (Object.getOwnPropertySymbols) {
|
|
1859
1859
|
var symbols = Object.getOwnPropertySymbols(object);
|
|
@@ -1866,12 +1866,12 @@ function ownKeys$2(object, enumerableOnly) {
|
|
|
1866
1866
|
}
|
|
1867
1867
|
return keys;
|
|
1868
1868
|
}
|
|
1869
|
-
function _object_spread_props$
|
|
1869
|
+
function _object_spread_props$3(target, source) {
|
|
1870
1870
|
source = source != null ? source : {};
|
|
1871
1871
|
if (Object.getOwnPropertyDescriptors) {
|
|
1872
1872
|
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
1873
1873
|
} else {
|
|
1874
|
-
ownKeys$
|
|
1874
|
+
ownKeys$3(Object(source)).forEach(function(key) {
|
|
1875
1875
|
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
1876
1876
|
});
|
|
1877
1877
|
}
|
|
@@ -1916,7 +1916,7 @@ function n$1(t) {
|
|
|
1916
1916
|
return function(e, o) {
|
|
1917
1917
|
return "object" == typeof o ? r$2(t, e, o) : function(t, e, o) {
|
|
1918
1918
|
var r = e.hasOwnProperty(o);
|
|
1919
|
-
return e.constructor.createProperty(o, r ? _object_spread_props$
|
|
1919
|
+
return e.constructor.createProperty(o, r ? _object_spread_props$3(_object_spread$5({}, t), {
|
|
1920
1920
|
wrapped: !0
|
|
1921
1921
|
}) : t), r ? Object.getOwnPropertyDescriptor(e, o) : void 0;
|
|
1922
1922
|
}(t, e, o);
|
|
@@ -2015,7 +2015,7 @@ function isObjectOrArray(value) {
|
|
|
2015
2015
|
* https://www.npmjs.com/package/ih
|
|
2016
2016
|
* https://www.npmjs.com/package/mutatis
|
|
2017
2017
|
* https://github.com/mariocasciaro/object-path-immutable
|
|
2018
|
-
*/ function _define_property$
|
|
2018
|
+
*/ function _define_property$5(obj, key, value) {
|
|
2019
2019
|
if (key in obj) {
|
|
2020
2020
|
Object.defineProperty(obj, key, {
|
|
2021
2021
|
value: value,
|
|
@@ -2028,7 +2028,7 @@ function isObjectOrArray(value) {
|
|
|
2028
2028
|
}
|
|
2029
2029
|
return obj;
|
|
2030
2030
|
}
|
|
2031
|
-
function _object_spread$
|
|
2031
|
+
function _object_spread$4(target) {
|
|
2032
2032
|
for(var i = 1; i < arguments.length; i++){
|
|
2033
2033
|
var source = arguments[i] != null ? arguments[i] : {};
|
|
2034
2034
|
var ownKeys = Object.keys(source);
|
|
@@ -2038,7 +2038,7 @@ function _object_spread$3(target) {
|
|
|
2038
2038
|
}));
|
|
2039
2039
|
}
|
|
2040
2040
|
ownKeys.forEach(function(key) {
|
|
2041
|
-
_define_property$
|
|
2041
|
+
_define_property$5(target, key, source[key]);
|
|
2042
2042
|
});
|
|
2043
2043
|
}
|
|
2044
2044
|
return target;
|
|
@@ -2059,7 +2059,7 @@ function _object_spread$3(target) {
|
|
|
2059
2059
|
return copy;
|
|
2060
2060
|
} else if (isJSONObject(value)) {
|
|
2061
2061
|
// copy object properties
|
|
2062
|
-
var copy1 = _object_spread$
|
|
2062
|
+
var copy1 = _object_spread$4({}, value);
|
|
2063
2063
|
// copy all symbols
|
|
2064
2064
|
Object.getOwnPropertySymbols(value).forEach(function(symbol) {
|
|
2065
2065
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
@@ -2427,13 +2427,13 @@ function parseFrom(fromPointer) {
|
|
|
2427
2427
|
return parseJSONPointer(fromPointer);
|
|
2428
2428
|
}
|
|
2429
2429
|
|
|
2430
|
-
function _array_like_to_array$
|
|
2430
|
+
function _array_like_to_array$f(arr, len) {
|
|
2431
2431
|
if (len == null || len > arr.length) len = arr.length;
|
|
2432
2432
|
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
2433
2433
|
return arr2;
|
|
2434
2434
|
}
|
|
2435
2435
|
function _array_without_holes$9(arr) {
|
|
2436
|
-
if (Array.isArray(arr)) return _array_like_to_array$
|
|
2436
|
+
if (Array.isArray(arr)) return _array_like_to_array$f(arr);
|
|
2437
2437
|
}
|
|
2438
2438
|
function _iterable_to_array$9(iter) {
|
|
2439
2439
|
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
@@ -2442,15 +2442,15 @@ function _non_iterable_spread$9() {
|
|
|
2442
2442
|
throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
2443
2443
|
}
|
|
2444
2444
|
function _to_consumable_array$9(arr) {
|
|
2445
|
-
return _array_without_holes$9(arr) || _iterable_to_array$9(arr) || _unsupported_iterable_to_array$
|
|
2445
|
+
return _array_without_holes$9(arr) || _iterable_to_array$9(arr) || _unsupported_iterable_to_array$f(arr) || _non_iterable_spread$9();
|
|
2446
2446
|
}
|
|
2447
|
-
function _unsupported_iterable_to_array$
|
|
2447
|
+
function _unsupported_iterable_to_array$f(o, minLen) {
|
|
2448
2448
|
if (!o) return;
|
|
2449
|
-
if (typeof o === "string") return _array_like_to_array$
|
|
2449
|
+
if (typeof o === "string") return _array_like_to_array$f(o, minLen);
|
|
2450
2450
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
2451
2451
|
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
2452
2452
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
2453
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$
|
|
2453
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$f(o, minLen);
|
|
2454
2454
|
}
|
|
2455
2455
|
/**
|
|
2456
2456
|
* Create the inverse of a set of json patch operations
|
|
@@ -2567,8 +2567,6 @@ function revertMove(document, path, from) {
|
|
|
2567
2567
|
}
|
|
2568
2568
|
}
|
|
2569
2569
|
|
|
2570
|
-
var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
|
|
2571
|
-
|
|
2572
2570
|
var jsonSourceMap = {};
|
|
2573
2571
|
|
|
2574
2572
|
function _instanceof$i(left, right) {
|
|
@@ -8165,7 +8163,7 @@ var faLightbulb = {
|
|
|
8165
8163
|
128161
|
|
8166
8164
|
],
|
|
8167
8165
|
"f0eb",
|
|
8168
|
-
"M297.2 248.9C311.6 228.3 320 203.2 320 176c0-70.7-57.3-128-128-128S64 105.3 64 176c0 27.2 8.4 52.3 22.8 72.9c3.7 5.3 8.1 11.3 12.8 17.
|
|
8166
|
+
"M297.2 248.9C311.6 228.3 320 203.2 320 176c0-70.7-57.3-128-128-128S64 105.3 64 176c0 27.2 8.4 52.3 22.8 72.9c3.7 5.3 8.1 11.3 12.8 17.7c0 0 0 0 0 0c12.9 17.7 28.3 38.9 39.8 59.8c10.4 19 15.7 38.8 18.3 57.5L109 384c-2.2-12-5.9-23.7-11.8-34.5c-9.9-18-22.2-34.9-34.5-51.8c0 0 0 0 0 0s0 0 0 0c-5.2-7.1-10.4-14.2-15.4-21.4C27.6 247.9 16 213.3 16 176C16 78.8 94.8 0 192 0s176 78.8 176 176c0 37.3-11.6 71.9-31.4 100.3c-5 7.2-10.2 14.3-15.4 21.4c0 0 0 0 0 0s0 0 0 0c-12.3 16.8-24.6 33.7-34.5 51.8c-5.9 10.8-9.6 22.5-11.8 34.5l-48.6 0c2.6-18.7 7.9-38.6 18.3-57.5c11.5-20.9 26.9-42.1 39.8-59.8c0 0 0 0 0 0s0 0 0 0s0 0 0 0c4.7-6.4 9-12.4 12.7-17.7zM192 128c-26.5 0-48 21.5-48 48c0 8.8-7.2 16-16 16s-16-7.2-16-16c0-44.2 35.8-80 80-80c8.8 0 16 7.2 16 16s-7.2 16-16 16zm0 384c-44.2 0-80-35.8-80-80l0-16 160 0 0 16c0 44.2-35.8 80-80 80z"
|
|
8169
8167
|
]
|
|
8170
8168
|
};
|
|
8171
8169
|
var faSquareCheck$1 = {
|
|
@@ -8181,7 +8179,7 @@ var faSquareCheck$1 = {
|
|
|
8181
8179
|
"check-square"
|
|
8182
8180
|
],
|
|
8183
8181
|
"f14a",
|
|
8184
|
-
"M64 80c-8.8 0-16 7.2-16
|
|
8182
|
+
"M64 80c-8.8 0-16 7.2-16 16l0 320c0 8.8 7.2 16 16 16l320 0c8.8 0 16-7.2 16-16l0-320c0-8.8-7.2-16-16-16L64 80zM0 96C0 60.7 28.7 32 64 32l320 0c35.3 0 64 28.7 64 64l0 320c0 35.3-28.7 64-64 64L64 480c-35.3 0-64-28.7-64-64L0 96zM337 209L209 337c-9.4 9.4-24.6 9.4-33.9 0l-64-64c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l47 47L303 175c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9z"
|
|
8185
8183
|
]
|
|
8186
8184
|
};
|
|
8187
8185
|
var faCheckSquare$1 = faSquareCheck$1;
|
|
@@ -8198,7 +8196,7 @@ var faSquare$1 = {
|
|
|
8198
8196
|
61590
|
|
8199
8197
|
],
|
|
8200
8198
|
"f0c8",
|
|
8201
|
-
"M384 80c8.8 0 16 7.2 16
|
|
8199
|
+
"M384 80c8.8 0 16 7.2 16 16l0 320c0 8.8-7.2 16-16 16L64 432c-8.8 0-16-7.2-16-16L48 96c0-8.8 7.2-16 16-16l320 0zM64 32C28.7 32 0 60.7 0 96L0 416c0 35.3 28.7 64 64 64l320 0c35.3 0 64-28.7 64-64l0-320c0-35.3-28.7-64-64-64L64 32z"
|
|
8202
8200
|
]
|
|
8203
8201
|
};
|
|
8204
8202
|
var faClock = {
|
|
@@ -8212,7 +8210,7 @@ var faClock = {
|
|
|
8212
8210
|
"clock-four"
|
|
8213
8211
|
],
|
|
8214
8212
|
"f017",
|
|
8215
|
-
"M464 256A208 208 0 1 1 48 256a208 208 0 1 1 416 0zM0 256a256 256 0 1 0 512 0A256 256 0 1 0 0 256zM232
|
|
8213
|
+
"M464 256A208 208 0 1 1 48 256a208 208 0 1 1 416 0zM0 256a256 256 0 1 0 512 0A256 256 0 1 0 0 256zM232 120l0 136c0 8 4 15.5 10.7 20l96 64c11 7.4 25.9 4.4 33.3-6.7s4.4-25.9-6.7-33.3L280 243.2 280 120c0-13.3-10.7-24-24-24s-24 10.7-24 24z"
|
|
8216
8214
|
]
|
|
8217
8215
|
};
|
|
8218
8216
|
|
|
@@ -8227,7 +8225,7 @@ var faTrashCan = {
|
|
|
8227
8225
|
"trash-alt"
|
|
8228
8226
|
],
|
|
8229
8227
|
"f2ed",
|
|
8230
|
-
"M135.2 17.7C140.6 6.8 151.7 0 163.8
|
|
8228
|
+
"M135.2 17.7C140.6 6.8 151.7 0 163.8 0L284.2 0c12.1 0 23.2 6.8 28.6 17.7L320 32l96 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 96C14.3 96 0 81.7 0 64S14.3 32 32 32l96 0 7.2-14.3zM32 128l384 0 0 320c0 35.3-28.7 64-64 64L96 512c-35.3 0-64-28.7-64-64l0-320zm96 64c-8.8 0-16 7.2-16 16l0 224c0 8.8 7.2 16 16 16s16-7.2 16-16l0-224c0-8.8-7.2-16-16-16zm96 0c-8.8 0-16 7.2-16 16l0 224c0 8.8 7.2 16 16 16s16-7.2 16-16l0-224c0-8.8-7.2-16-16-16zm96 0c-8.8 0-16 7.2-16 16l0 224c0 8.8 7.2 16 16 16s16-7.2 16-16l0-224c0-8.8-7.2-16-16-16z"
|
|
8231
8229
|
]
|
|
8232
8230
|
};
|
|
8233
8231
|
var faDownLeftAndUpRightToCenter = {
|
|
@@ -8240,7 +8238,7 @@ var faDownLeftAndUpRightToCenter = {
|
|
|
8240
8238
|
"compress-alt"
|
|
8241
8239
|
],
|
|
8242
8240
|
"f422",
|
|
8243
|
-
"M439 7c9.4-9.4 24.6-9.4 33.9 0l32 32c9.4 9.4 9.4 24.6 0 33.9l-87 87 39 39c6.9 6.9 8.9 17.2 5.2 26.2s-12.5 14.8-22.2 14.
|
|
8241
|
+
"M439 7c9.4-9.4 24.6-9.4 33.9 0l32 32c9.4 9.4 9.4 24.6 0 33.9l-87 87 39 39c6.9 6.9 8.9 17.2 5.2 26.2s-12.5 14.8-22.2 14.8l-144 0c-13.3 0-24-10.7-24-24l0-144c0-9.7 5.8-18.5 14.8-22.2s19.3-1.7 26.2 5.2l39 39L439 7zM72 272l144 0c13.3 0 24 10.7 24 24l0 144c0 9.7-5.8 18.5-14.8 22.2s-19.3 1.7-26.2-5.2l-39-39L73 505c-9.4 9.4-24.6 9.4-33.9 0L7 473c-9.4-9.4-9.4-24.6 0-33.9l87-87L55 313c-6.9-6.9-8.9-17.2-5.2-26.2s12.5-14.8 22.2-14.8z"
|
|
8244
8242
|
]
|
|
8245
8243
|
};
|
|
8246
8244
|
var faCaretRight = {
|
|
@@ -8264,7 +8262,7 @@ var faPaste = {
|
|
|
8264
8262
|
"file-clipboard"
|
|
8265
8263
|
],
|
|
8266
8264
|
"f0ea",
|
|
8267
|
-
"M160 0c-23.7 0-44.4 12.9-55.4
|
|
8265
|
+
"M160 0c-23.7 0-44.4 12.9-55.4 32L48 32C21.5 32 0 53.5 0 80L0 400c0 26.5 21.5 48 48 48l144 0 0-272c0-44.2 35.8-80 80-80l48 0 0-16c0-26.5-21.5-48-48-48l-56.6 0C204.4 12.9 183.7 0 160 0zM272 128c-26.5 0-48 21.5-48 48l0 272 0 16c0 26.5 21.5 48 48 48l192 0c26.5 0 48-21.5 48-48l0-220.1c0-12.7-5.1-24.9-14.1-33.9l-67.9-67.9c-9-9-21.2-14.1-33.9-14.1L320 128l-48 0zM160 40a24 24 0 1 1 0 48 24 24 0 1 1 0-48z"
|
|
8268
8266
|
]
|
|
8269
8267
|
};
|
|
8270
8268
|
var faCircleNotch = {
|
|
@@ -8333,7 +8331,7 @@ var faSquareCheck = {
|
|
|
8333
8331
|
"check-square"
|
|
8334
8332
|
],
|
|
8335
8333
|
"f14a",
|
|
8336
|
-
"M64 32C28.7 32 0 60.7 0
|
|
8334
|
+
"M64 32C28.7 32 0 60.7 0 96L0 416c0 35.3 28.7 64 64 64l320 0c35.3 0 64-28.7 64-64l0-320c0-35.3-28.7-64-64-64L64 32zM337 209L209 337c-9.4 9.4-24.6 9.4-33.9 0l-64-64c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l47 47L303 175c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9z"
|
|
8337
8335
|
]
|
|
8338
8336
|
};
|
|
8339
8337
|
var faCheckSquare = faSquareCheck;
|
|
@@ -8347,7 +8345,7 @@ var faPenToSquare = {
|
|
|
8347
8345
|
"edit"
|
|
8348
8346
|
],
|
|
8349
8347
|
"f044",
|
|
8350
|
-
"M471.6 21.7c-21.9-21.9-57.3-21.9-79.2 0L362.3 51.7l97.9 97.9 30.1-30.1c21.9-21.9 21.9-57.3 0-79.2L471.6 21.7zm-299.2 220c-6.1 6.1-10.8 13.6-13.5 21.9l-29.6 88.8c-2.9 8.6-.6 18.1 5.8 24.6s15.9 8.7 24.6 5.8l88.8-29.6c8.2-2.7 15.7-7.4 21.9-13.5L437.7 172.3 339.7 74.3 172.4 241.7zM96 64C43 64 0 107 0
|
|
8348
|
+
"M471.6 21.7c-21.9-21.9-57.3-21.9-79.2 0L362.3 51.7l97.9 97.9 30.1-30.1c21.9-21.9 21.9-57.3 0-79.2L471.6 21.7zm-299.2 220c-6.1 6.1-10.8 13.6-13.5 21.9l-29.6 88.8c-2.9 8.6-.6 18.1 5.8 24.6s15.9 8.7 24.6 5.8l88.8-29.6c8.2-2.7 15.7-7.4 21.9-13.5L437.7 172.3 339.7 74.3 172.4 241.7zM96 64C43 64 0 107 0 160L0 416c0 53 43 96 96 96l256 0c53 0 96-43 96-96l0-96c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 96c0 17.7-14.3 32-32 32L96 448c-17.7 0-32-14.3-32-32l0-256c0-17.7 14.3-32 32-32l96 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L96 64z"
|
|
8351
8349
|
]
|
|
8352
8350
|
};
|
|
8353
8351
|
var faEdit = faPenToSquare;
|
|
@@ -8385,7 +8383,7 @@ var faSquareCaretUp = {
|
|
|
8385
8383
|
"caret-square-up"
|
|
8386
8384
|
],
|
|
8387
8385
|
"f151",
|
|
8388
|
-
"M64 32C28.7 32 0 60.7 0
|
|
8386
|
+
"M64 32C28.7 32 0 60.7 0 96L0 416c0 35.3 28.7 64 64 64l320 0c35.3 0 64-28.7 64-64l0-320c0-35.3-28.7-64-64-64L64 32zM224 160c6.7 0 13 2.8 17.6 7.7l104 112c6.5 7 8.2 17.2 4.4 25.9s-12.5 14.4-22 14.4l-208 0c-9.5 0-18.2-5.7-22-14.4s-2.1-18.9 4.4-25.9l104-112c4.5-4.9 10.9-7.7 17.6-7.7z"
|
|
8389
8387
|
]
|
|
8390
8388
|
};
|
|
8391
8389
|
var faCaretSquareUp = faSquareCaretUp;
|
|
@@ -8397,7 +8395,7 @@ var faCaretUp = {
|
|
|
8397
8395
|
512,
|
|
8398
8396
|
[],
|
|
8399
8397
|
"f0d8",
|
|
8400
|
-
"M182.6 137.4c-12.5-12.5-32.8-12.5-45.3 0l-128 128c-9.2 9.2-11.9 22.9-6.9 34.9s16.6 19.8 29.6 19.
|
|
8398
|
+
"M182.6 137.4c-12.5-12.5-32.8-12.5-45.3 0l-128 128c-9.2 9.2-11.9 22.9-6.9 34.9s16.6 19.8 29.6 19.8l256 0c12.9 0 24.6-7.8 29.6-19.8s2.2-25.7-6.9-34.9l-128-128z"
|
|
8401
8399
|
]
|
|
8402
8400
|
};
|
|
8403
8401
|
var faSquare = {
|
|
@@ -8424,7 +8422,7 @@ var faFilter = {
|
|
|
8424
8422
|
512,
|
|
8425
8423
|
[],
|
|
8426
8424
|
"f0b0",
|
|
8427
|
-
"M3.9 54.9C10.5 40.9 24.5 32 40
|
|
8425
|
+
"M3.9 54.9C10.5 40.9 24.5 32 40 32l432 0c15.5 0 29.5 8.9 36.1 22.9s4.6 30.5-5.2 42.5L320 320.9 320 448c0 12.1-6.8 23.2-17.7 28.6s-23.8 4.3-33.5-3l-64-48c-8.1-6-12.8-15.5-12.8-25.6l0-79.1L9 97.3C-.7 85.4-2.8 68.8 3.9 54.9z"
|
|
8428
8426
|
]
|
|
8429
8427
|
};
|
|
8430
8428
|
var faCode = {
|
|
@@ -8448,7 +8446,7 @@ var faWrench = {
|
|
|
8448
8446
|
128295
|
|
8449
8447
|
],
|
|
8450
8448
|
"f0ad",
|
|
8451
|
-
"M352 320c88.4 0 160-71.6 160-160c0-15.3-2.2-30.1-6.2-44.2c-3.1-10.8-16.4-13.2-24.3-5.3l-76.8 76.8c-3 3-7.1 4.7-11.3 4.
|
|
8449
|
+
"M352 320c88.4 0 160-71.6 160-160c0-15.3-2.2-30.1-6.2-44.2c-3.1-10.8-16.4-13.2-24.3-5.3l-76.8 76.8c-3 3-7.1 4.7-11.3 4.7L336 192c-8.8 0-16-7.2-16-16l0-57.4c0-4.2 1.7-8.3 4.7-11.3l76.8-76.8c7.9-7.9 5.4-21.2-5.3-24.3C382.1 2.2 367.3 0 352 0C263.6 0 192 71.6 192 160c0 19.1 3.4 37.5 9.5 54.5L19.9 396.1C7.2 408.8 0 426.1 0 444.1C0 481.6 30.4 512 67.9 512c18 0 35.3-7.2 48-19.9L297.5 310.5c17 6.2 35.4 9.5 54.5 9.5zM80 408a24 24 0 1 1 0 48 24 24 0 1 1 0-48z"
|
|
8452
8450
|
]
|
|
8453
8451
|
};
|
|
8454
8452
|
var faEye = {
|
|
@@ -8490,7 +8488,7 @@ var faArrowRotateRight = {
|
|
|
8490
8488
|
"redo"
|
|
8491
8489
|
],
|
|
8492
8490
|
"f01e",
|
|
8493
|
-
"M386.3
|
|
8491
|
+
"M386.3 160L336 160c-17.7 0-32 14.3-32 32s14.3 32 32 32l128 0c17.7 0 32-14.3 32-32l0-128c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 51.2L414.4 97.6c-87.5-87.5-229.3-87.5-316.8 0s-87.5 229.3 0 316.8s229.3 87.5 316.8 0c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0c-62.5 62.5-163.8 62.5-226.3 0s-62.5-163.8 0-226.3s163.8-62.5 226.3 0L386.3 160z"
|
|
8494
8492
|
]
|
|
8495
8493
|
};
|
|
8496
8494
|
var faRedo = faArrowRotateRight;
|
|
@@ -8508,7 +8506,7 @@ var faArrowRotateLeft = {
|
|
|
8508
8506
|
"undo"
|
|
8509
8507
|
],
|
|
8510
8508
|
"f0e2",
|
|
8511
|
-
"M125.7
|
|
8509
|
+
"M125.7 160l50.3 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L48 224c-17.7 0-32-14.3-32-32L16 64c0-17.7 14.3-32 32-32s32 14.3 32 32l0 51.2L97.6 97.6c87.5-87.5 229.3-87.5 316.8 0s87.5 229.3 0 316.8s-229.3 87.5-316.8 0c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0c62.5 62.5 163.8 62.5 226.3 0s62.5-163.8 0-226.3s-163.8-62.5-226.3 0L125.7 160z"
|
|
8512
8510
|
]
|
|
8513
8511
|
};
|
|
8514
8512
|
var faUndo = faArrowRotateLeft;
|
|
@@ -8522,7 +8520,7 @@ var faCropSimple = {
|
|
|
8522
8520
|
"crop-alt"
|
|
8523
8521
|
],
|
|
8524
8522
|
"f565",
|
|
8525
|
-
"M128 32c0-17.7-14.3-32-32-32S64 14.3 64
|
|
8523
|
+
"M128 32c0-17.7-14.3-32-32-32S64 14.3 64 32l0 32L32 64C14.3 64 0 78.3 0 96s14.3 32 32 32l32 0 0 256c0 35.3 28.7 64 64 64l224 0 0-64-224 0 0-352zM384 480c0 17.7 14.3 32 32 32s32-14.3 32-32l0-32 32 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-32 0 0-256c0-35.3-28.7-64-64-64L160 64l0 64 224 0 0 352z"
|
|
8526
8524
|
]
|
|
8527
8525
|
};
|
|
8528
8526
|
var faCropAlt = faCropSimple;
|
|
@@ -8591,7 +8589,7 @@ var faArrowDownShortWide = {
|
|
|
8591
8589
|
"sort-amount-down-alt"
|
|
8592
8590
|
],
|
|
8593
8591
|
"f884",
|
|
8594
|
-
"M151.6 469.6C145.5 476.2 137 480 128 480s-17.5-3.8-23.6-10.4l-88-96c-11.9-13-11.1-33.3 2-45.2s33.3-11.1 45.2 2L96 365.
|
|
8592
|
+
"M151.6 469.6C145.5 476.2 137 480 128 480s-17.5-3.8-23.6-10.4l-88-96c-11.9-13-11.1-33.3 2-45.2s33.3-11.1 45.2 2L96 365.7 96 64c0-17.7 14.3-32 32-32s32 14.3 32 32l0 301.7 32.4-35.4c11.9-13 32.2-13.9 45.2-2s13.9 32.2 2 45.2l-88 96zM320 32l32 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-32 0c-17.7 0-32-14.3-32-32s14.3-32 32-32zm0 128l96 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-96 0c-17.7 0-32-14.3-32-32s14.3-32 32-32zm0 128l160 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-160 0c-17.7 0-32-14.3-32-32s14.3-32 32-32zm0 128l224 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-224 0c-17.7 0-32-14.3-32-32s14.3-32 32-32z"
|
|
8595
8593
|
]
|
|
8596
8594
|
};
|
|
8597
8595
|
var faSortAmountDownAlt = faArrowDownShortWide;
|
|
@@ -8655,7 +8653,7 @@ var faCopy = {
|
|
|
8655
8653
|
512,
|
|
8656
8654
|
[],
|
|
8657
8655
|
"f0c5",
|
|
8658
|
-
"M208
|
|
8656
|
+
"M208 0L332.1 0c12.7 0 24.9 5.1 33.9 14.1l67.9 67.9c9 9 14.1 21.2 14.1 33.9L448 336c0 26.5-21.5 48-48 48l-192 0c-26.5 0-48-21.5-48-48l0-288c0-26.5 21.5-48 48-48zM48 128l80 0 0 64-64 0 0 256 192 0 0-32 64 0 0 48c0 26.5-21.5 48-48 48L48 512c-26.5 0-48-21.5-48-48L0 176c0-26.5 21.5-48 48-48z"
|
|
8659
8657
|
]
|
|
8660
8658
|
};
|
|
8661
8659
|
var faPlus = {
|
|
@@ -8670,7 +8668,7 @@ var faPlus = {
|
|
|
8670
8668
|
"add"
|
|
8671
8669
|
],
|
|
8672
8670
|
"2b",
|
|
8673
|
-
"M256 80c0-17.7-14.3-32-32-32s-32 14.3-32
|
|
8671
|
+
"M256 80c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 144L48 224c-17.7 0-32 14.3-32 32s14.3 32 32 32l144 0 0 144c0 17.7 14.3 32 32 32s32-14.3 32-32l0-144 144 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-144 0 0-144z"
|
|
8674
8672
|
]
|
|
8675
8673
|
};
|
|
8676
8674
|
var faXmark = {
|
|
@@ -8707,7 +8705,7 @@ var faRotate = {
|
|
|
8707
8705
|
"sync-alt"
|
|
8708
8706
|
],
|
|
8709
8707
|
"f2f1",
|
|
8710
|
-
"M142.9 142.
|
|
8708
|
+
"M142.9 142.9c-17.5 17.5-30.1 38-37.8 59.8c-5.9 16.7-24.2 25.4-40.8 19.5s-25.4-24.2-19.5-40.8C55.6 150.7 73.2 122 97.6 97.6c87.2-87.2 228.3-87.5 315.8-1L455 55c6.9-6.9 17.2-8.9 26.2-5.2s14.8 12.5 14.8 22.2l0 128c0 13.3-10.7 24-24 24l-8.4 0c0 0 0 0 0 0L344 224c-9.7 0-18.5-5.8-22.2-14.8s-1.7-19.3 5.2-26.2l41.1-41.1c-62.6-61.5-163.1-61.2-225.3 1zM16 312c0-13.3 10.7-24 24-24l7.6 0 .7 0L168 288c9.7 0 18.5 5.8 22.2 14.8s1.7 19.3-5.2 26.2l-41.1 41.1c62.6 61.5 163.1 61.2 225.3-1c17.5-17.5 30.1-38 37.8-59.8c5.9-16.7 24.2-25.4 40.8-19.5s25.4 24.2 19.5 40.8c-10.8 30.6-28.4 59.3-52.9 83.8c-87.2 87.2-228.3 87.5-315.8 1L57 457c-6.9 6.9-17.2 8.9-26.2 5.2S16 449.7 16 440l0-119.6 0-.7 0-7.6z"
|
|
8711
8709
|
]
|
|
8712
8710
|
};
|
|
8713
8711
|
var faUpRightAndDownLeftFromCenter = {
|
|
@@ -8720,7 +8718,7 @@ var faUpRightAndDownLeftFromCenter = {
|
|
|
8720
8718
|
"expand-alt"
|
|
8721
8719
|
],
|
|
8722
8720
|
"f424",
|
|
8723
|
-
"M344
|
|
8721
|
+
"M344 0L488 0c13.3 0 24 10.7 24 24l0 144c0 9.7-5.8 18.5-14.8 22.2s-19.3 1.7-26.2-5.2l-39-39-87 87c-9.4 9.4-24.6 9.4-33.9 0l-32-32c-9.4-9.4-9.4-24.6 0-33.9l87-87L327 41c-6.9-6.9-8.9-17.2-5.2-26.2S334.3 0 344 0zM168 512L24 512c-13.3 0-24-10.7-24-24L0 344c0-9.7 5.8-18.5 14.8-22.2s19.3-1.7 26.2 5.2l39 39 87-87c9.4-9.4 24.6-9.4 33.9 0l32 32c9.4 9.4 9.4 24.6 0 33.9l-87 87 39 39c6.9 6.9 8.9 17.2 5.2 26.2s-12.5 14.8-22.2 14.8z"
|
|
8724
8722
|
]
|
|
8725
8723
|
};
|
|
8726
8724
|
var faClone = {
|
|
@@ -8731,7 +8729,7 @@ var faClone = {
|
|
|
8731
8729
|
512,
|
|
8732
8730
|
[],
|
|
8733
8731
|
"f24d",
|
|
8734
|
-
"M288
|
|
8732
|
+
"M288 448L64 448l0-224 64 0 0-64-64 0c-35.3 0-64 28.7-64 64L0 448c0 35.3 28.7 64 64 64l224 0c35.3 0 64-28.7 64-64l0-64-64 0 0 64zm-64-96l224 0c35.3 0 64-28.7 64-64l0-224c0-35.3-28.7-64-64-64L224 0c-35.3 0-64 28.7-64 64l0 224c0 35.3 28.7 64 64 64z"
|
|
8735
8733
|
]
|
|
8736
8734
|
};
|
|
8737
8735
|
var faCheck = {
|
|
@@ -8760,7 +8758,7 @@ var faTriangleExclamation = {
|
|
|
8760
8758
|
"warning"
|
|
8761
8759
|
],
|
|
8762
8760
|
"f071",
|
|
8763
|
-
"M256 32c14.2 0 27.3 7.5 34.5 19.8l216 368c7.3 12.4 7.3 27.7 .2 40.1S486.3 480 472
|
|
8761
|
+
"M256 32c14.2 0 27.3 7.5 34.5 19.8l216 368c7.3 12.4 7.3 27.7 .2 40.1S486.3 480 472 480L40 480c-14.3 0-27.6-7.7-34.7-20.1s-7-27.8 .2-40.1l216-368C228.7 39.5 241.8 32 256 32zm0 128c-13.3 0-24 10.7-24 24l0 112c0 13.3 10.7 24 24 24s24-10.7 24-24l0-112c0-13.3-10.7-24-24-24zm32 224a32 32 0 1 0 -64 0 32 32 0 1 0 64 0z"
|
|
8764
8762
|
]
|
|
8765
8763
|
};
|
|
8766
8764
|
var faExclamationTriangle = faTriangleExclamation;
|
|
@@ -8863,12 +8861,12 @@ function memoizeOne(resultFn, isEqual) {
|
|
|
8863
8861
|
|
|
8864
8862
|
/**
|
|
8865
8863
|
The data structure for documents. @nonabstract
|
|
8866
|
-
*/ function _array_like_to_array$
|
|
8864
|
+
*/ function _array_like_to_array$e(arr, len) {
|
|
8867
8865
|
if (len == null || len > arr.length) len = arr.length;
|
|
8868
8866
|
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
8869
8867
|
return arr2;
|
|
8870
8868
|
}
|
|
8871
|
-
function _array_with_holes$
|
|
8869
|
+
function _array_with_holes$9(arr) {
|
|
8872
8870
|
if (Array.isArray(arr)) return arr;
|
|
8873
8871
|
}
|
|
8874
8872
|
function _assert_this_initialized$9(self) {
|
|
@@ -8958,7 +8956,7 @@ function _instanceof$f(left, right) {
|
|
|
8958
8956
|
function _is_native_function$2(fn) {
|
|
8959
8957
|
return Function.toString.call(fn).indexOf("[native code]") !== -1;
|
|
8960
8958
|
}
|
|
8961
|
-
function _iterable_to_array_limit$
|
|
8959
|
+
function _iterable_to_array_limit$9(arr, i) {
|
|
8962
8960
|
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
8963
8961
|
if (_i == null) return;
|
|
8964
8962
|
var _arr = [];
|
|
@@ -8982,7 +8980,7 @@ function _iterable_to_array_limit$7(arr, i) {
|
|
|
8982
8980
|
}
|
|
8983
8981
|
return _arr;
|
|
8984
8982
|
}
|
|
8985
|
-
function _non_iterable_rest$
|
|
8983
|
+
function _non_iterable_rest$9() {
|
|
8986
8984
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
8987
8985
|
}
|
|
8988
8986
|
function _possible_constructor_return$9(self, call) {
|
|
@@ -8998,8 +8996,8 @@ function _set_prototype_of$9(o, p) {
|
|
|
8998
8996
|
};
|
|
8999
8997
|
return _set_prototype_of$9(o, p);
|
|
9000
8998
|
}
|
|
9001
|
-
function _sliced_to_array$
|
|
9002
|
-
return _array_with_holes$
|
|
8999
|
+
function _sliced_to_array$9(arr, i) {
|
|
9000
|
+
return _array_with_holes$9(arr) || _iterable_to_array_limit$9(arr, i) || _unsupported_iterable_to_array$e(arr, i) || _non_iterable_rest$9();
|
|
9003
9001
|
}
|
|
9004
9002
|
function _super_prop_base$1(object, property) {
|
|
9005
9003
|
while(!Object.prototype.hasOwnProperty.call(object, property)){
|
|
@@ -9012,13 +9010,13 @@ function _type_of$b(obj) {
|
|
|
9012
9010
|
"@swc/helpers - typeof";
|
|
9013
9011
|
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
9014
9012
|
}
|
|
9015
|
-
function _unsupported_iterable_to_array$
|
|
9013
|
+
function _unsupported_iterable_to_array$e(o, minLen) {
|
|
9016
9014
|
if (!o) return;
|
|
9017
|
-
if (typeof o === "string") return _array_like_to_array$
|
|
9015
|
+
if (typeof o === "string") return _array_like_to_array$e(o, minLen);
|
|
9018
9016
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
9019
9017
|
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
9020
9018
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
9021
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$
|
|
9019
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$e(o, minLen);
|
|
9022
9020
|
}
|
|
9023
9021
|
function _wrap_native_super$2(Class) {
|
|
9024
9022
|
var _cache = typeof Map === "function" ? new Map() : undefined;
|
|
@@ -9099,7 +9097,7 @@ var Text = /*#__PURE__*/ function() {
|
|
|
9099
9097
|
*/ key: "replace",
|
|
9100
9098
|
value: function replace(from, to, text) {
|
|
9101
9099
|
var ref;
|
|
9102
|
-
ref = _sliced_to_array$
|
|
9100
|
+
ref = _sliced_to_array$9(clip(this, from, to), 2), from = ref[0], to = ref[1];
|
|
9103
9101
|
var parts = [];
|
|
9104
9102
|
this.decompose(0, from, parts, 2 /* Open.To */ );
|
|
9105
9103
|
if (text.length) text.decompose(0, text.length, parts, 1 /* Open.From */ | 2 /* Open.To */ );
|
|
@@ -9122,7 +9120,7 @@ var Text = /*#__PURE__*/ function() {
|
|
|
9122
9120
|
value: function slice(from) {
|
|
9123
9121
|
var to = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : this.length;
|
|
9124
9122
|
var ref;
|
|
9125
|
-
ref = _sliced_to_array$
|
|
9123
|
+
ref = _sliced_to_array$9(clip(this, from, to), 2), from = ref[0], to = ref[1];
|
|
9126
9124
|
var parts = [];
|
|
9127
9125
|
this.decompose(from, to, parts, 0);
|
|
9128
9126
|
return TextNode.from(parts, to - from);
|
|
@@ -9284,7 +9282,7 @@ var TextLeaf = /*#__PURE__*/ function(Text) {
|
|
|
9284
9282
|
value: function replace(from, to, text) {
|
|
9285
9283
|
if (!_instanceof$f(text, TextLeaf)) return _get$1(_get_prototype_of$9(TextLeaf.prototype), "replace", this).call(this, from, to, text);
|
|
9286
9284
|
var ref;
|
|
9287
|
-
ref = _sliced_to_array$
|
|
9285
|
+
ref = _sliced_to_array$9(clip(this, from, to), 2), from = ref[0], to = ref[1];
|
|
9288
9286
|
var lines = appendText(this.text, appendText(text.text, sliceText(this.text, 0, from)), to);
|
|
9289
9287
|
var newLen = this.length + text.length - (to - from);
|
|
9290
9288
|
if (lines.length <= 32 /* Tree.Branch */ ) return new TextLeaf(lines, newLen);
|
|
@@ -9296,7 +9294,7 @@ var TextLeaf = /*#__PURE__*/ function(Text) {
|
|
|
9296
9294
|
value: function sliceString(from) {
|
|
9297
9295
|
var to = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : this.length, lineSep = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : "\n";
|
|
9298
9296
|
var ref;
|
|
9299
|
-
ref = _sliced_to_array$
|
|
9297
|
+
ref = _sliced_to_array$9(clip(this, from, to), 2), from = ref[0], to = ref[1];
|
|
9300
9298
|
var result = "";
|
|
9301
9299
|
for(var pos = 0, i = 0; pos <= to && i < this.text.length; i++){
|
|
9302
9300
|
var line = this.text[i], end = pos + line.length;
|
|
@@ -9442,7 +9440,7 @@ var TextNode = /*#__PURE__*/ function(Text) {
|
|
|
9442
9440
|
key: "replace",
|
|
9443
9441
|
value: function replace(from, to, text) {
|
|
9444
9442
|
var ref;
|
|
9445
|
-
ref = _sliced_to_array$
|
|
9443
|
+
ref = _sliced_to_array$9(clip(this, from, to), 2), from = ref[0], to = ref[1];
|
|
9446
9444
|
if (text.lines < this.lines) for(var i = 0, pos = 0; i < this.children.length; i++){
|
|
9447
9445
|
var child = this.children[i], end = pos + child.length;
|
|
9448
9446
|
// Fast path: if the change only affects one child and the
|
|
@@ -9468,7 +9466,7 @@ var TextNode = /*#__PURE__*/ function(Text) {
|
|
|
9468
9466
|
value: function sliceString(from) {
|
|
9469
9467
|
var to = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : this.length, lineSep = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : "\n";
|
|
9470
9468
|
var ref;
|
|
9471
|
-
ref = _sliced_to_array$
|
|
9469
|
+
ref = _sliced_to_array$9(clip(this, from, to), 2), from = ref[0], to = ref[1];
|
|
9472
9470
|
var result = "";
|
|
9473
9471
|
for(var i = 0, pos = 0; i < this.children.length && pos <= to; i++){
|
|
9474
9472
|
var child = this.children[i], end = pos + child.length;
|
|
@@ -9509,7 +9507,7 @@ var TextNode = /*#__PURE__*/ function(Text) {
|
|
|
9509
9507
|
value: function scanIdentical(other, dir) {
|
|
9510
9508
|
if (!_instanceof$f(other, TextNode)) return 0;
|
|
9511
9509
|
var length = 0;
|
|
9512
|
-
var _ref = _sliced_to_array$
|
|
9510
|
+
var _ref = _sliced_to_array$9(dir > 0 ? [
|
|
9513
9511
|
0,
|
|
9514
9512
|
0,
|
|
9515
9513
|
this.children.length,
|
|
@@ -14037,13 +14035,13 @@ situation.
|
|
|
14037
14035
|
return strict === true ? -1 : string.length;
|
|
14038
14036
|
}
|
|
14039
14037
|
|
|
14040
|
-
function _array_like_to_array$
|
|
14038
|
+
function _array_like_to_array$d(arr, len) {
|
|
14041
14039
|
if (len == null || len > arr.length) len = arr.length;
|
|
14042
14040
|
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
14043
14041
|
return arr2;
|
|
14044
14042
|
}
|
|
14045
14043
|
function _array_without_holes$8(arr) {
|
|
14046
|
-
if (Array.isArray(arr)) return _array_like_to_array$
|
|
14044
|
+
if (Array.isArray(arr)) return _array_like_to_array$d(arr);
|
|
14047
14045
|
}
|
|
14048
14046
|
function _class_call_check$f(instance, Constructor) {
|
|
14049
14047
|
if (!(instance instanceof Constructor)) {
|
|
@@ -14071,15 +14069,15 @@ function _non_iterable_spread$8() {
|
|
|
14071
14069
|
throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
14072
14070
|
}
|
|
14073
14071
|
function _to_consumable_array$8(arr) {
|
|
14074
|
-
return _array_without_holes$8(arr) || _iterable_to_array$8(arr) || _unsupported_iterable_to_array$
|
|
14072
|
+
return _array_without_holes$8(arr) || _iterable_to_array$8(arr) || _unsupported_iterable_to_array$d(arr) || _non_iterable_spread$8();
|
|
14075
14073
|
}
|
|
14076
|
-
function _unsupported_iterable_to_array$
|
|
14074
|
+
function _unsupported_iterable_to_array$d(o, minLen) {
|
|
14077
14075
|
if (!o) return;
|
|
14078
|
-
if (typeof o === "string") return _array_like_to_array$
|
|
14076
|
+
if (typeof o === "string") return _array_like_to_array$d(o, minLen);
|
|
14079
14077
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
14080
14078
|
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
14081
14079
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
14082
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$
|
|
14080
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$d(o, minLen);
|
|
14083
14081
|
}
|
|
14084
14082
|
var C$1 = "ͼ";
|
|
14085
14083
|
var COUNT = typeof Symbol == "undefined" ? "__" + C$1 : Symbol.for(C$1);
|
|
@@ -14379,16 +14377,16 @@ function keyName(event) {
|
|
|
14379
14377
|
return name;
|
|
14380
14378
|
}
|
|
14381
14379
|
|
|
14382
|
-
function _array_like_to_array$
|
|
14380
|
+
function _array_like_to_array$c(arr, len) {
|
|
14383
14381
|
if (len == null || len > arr.length) len = arr.length;
|
|
14384
14382
|
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
14385
14383
|
return arr2;
|
|
14386
14384
|
}
|
|
14387
|
-
function _array_with_holes$
|
|
14385
|
+
function _array_with_holes$8(arr) {
|
|
14388
14386
|
if (Array.isArray(arr)) return arr;
|
|
14389
14387
|
}
|
|
14390
14388
|
function _array_without_holes$7(arr) {
|
|
14391
|
-
if (Array.isArray(arr)) return _array_like_to_array$
|
|
14389
|
+
if (Array.isArray(arr)) return _array_like_to_array$c(arr);
|
|
14392
14390
|
}
|
|
14393
14391
|
function _assert_this_initialized$8(self) {
|
|
14394
14392
|
if (self === void 0) {
|
|
@@ -14460,7 +14458,7 @@ function _instanceof$e(left, right) {
|
|
|
14460
14458
|
function _iterable_to_array$7(iter) {
|
|
14461
14459
|
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
14462
14460
|
}
|
|
14463
|
-
function _iterable_to_array_limit$
|
|
14461
|
+
function _iterable_to_array_limit$8(arr, i) {
|
|
14464
14462
|
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
14465
14463
|
if (_i == null) return;
|
|
14466
14464
|
var _arr = [];
|
|
@@ -14484,7 +14482,7 @@ function _iterable_to_array_limit$6(arr, i) {
|
|
|
14484
14482
|
}
|
|
14485
14483
|
return _arr;
|
|
14486
14484
|
}
|
|
14487
|
-
function _non_iterable_rest$
|
|
14485
|
+
function _non_iterable_rest$8() {
|
|
14488
14486
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
14489
14487
|
}
|
|
14490
14488
|
function _non_iterable_spread$7() {
|
|
@@ -14503,8 +14501,8 @@ function _set_prototype_of$8(o, p) {
|
|
|
14503
14501
|
};
|
|
14504
14502
|
return _set_prototype_of$8(o, p);
|
|
14505
14503
|
}
|
|
14506
|
-
function _sliced_to_array$
|
|
14507
|
-
return _array_with_holes$
|
|
14504
|
+
function _sliced_to_array$8(arr, i) {
|
|
14505
|
+
return _array_with_holes$8(arr) || _iterable_to_array_limit$8(arr, i) || _unsupported_iterable_to_array$c(arr, i) || _non_iterable_rest$8();
|
|
14508
14506
|
}
|
|
14509
14507
|
function _super_prop_base(object, property) {
|
|
14510
14508
|
while(!Object.prototype.hasOwnProperty.call(object, property)){
|
|
@@ -14514,19 +14512,19 @@ function _super_prop_base(object, property) {
|
|
|
14514
14512
|
return object;
|
|
14515
14513
|
}
|
|
14516
14514
|
function _to_consumable_array$7(arr) {
|
|
14517
|
-
return _array_without_holes$7(arr) || _iterable_to_array$7(arr) || _unsupported_iterable_to_array$
|
|
14515
|
+
return _array_without_holes$7(arr) || _iterable_to_array$7(arr) || _unsupported_iterable_to_array$c(arr) || _non_iterable_spread$7();
|
|
14518
14516
|
}
|
|
14519
14517
|
function _type_of$a(obj) {
|
|
14520
14518
|
"@swc/helpers - typeof";
|
|
14521
14519
|
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
14522
14520
|
}
|
|
14523
|
-
function _unsupported_iterable_to_array$
|
|
14521
|
+
function _unsupported_iterable_to_array$c(o, minLen) {
|
|
14524
14522
|
if (!o) return;
|
|
14525
|
-
if (typeof o === "string") return _array_like_to_array$
|
|
14523
|
+
if (typeof o === "string") return _array_like_to_array$c(o, minLen);
|
|
14526
14524
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
14527
14525
|
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
14528
14526
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
14529
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$
|
|
14527
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$c(o, minLen);
|
|
14530
14528
|
}
|
|
14531
14529
|
function _is_native_reflect_construct$8() {
|
|
14532
14530
|
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
@@ -14743,13 +14741,14 @@ function scrollRectIntoView(dom, rect, side, x, y, xMargin, yMargin, ltr) {
|
|
|
14743
14741
|
}
|
|
14744
14742
|
}
|
|
14745
14743
|
}
|
|
14746
|
-
function
|
|
14747
|
-
var doc = dom.ownerDocument;
|
|
14744
|
+
function scrollableParents(dom) {
|
|
14745
|
+
var doc = dom.ownerDocument, x, y;
|
|
14748
14746
|
for(var cur = dom.parentNode; cur;){
|
|
14749
|
-
if (cur == doc.body) {
|
|
14747
|
+
if (cur == doc.body || x && y) {
|
|
14750
14748
|
break;
|
|
14751
14749
|
} else if (cur.nodeType == 1) {
|
|
14752
|
-
if (cur.scrollHeight > cur.clientHeight
|
|
14750
|
+
if (!y && cur.scrollHeight > cur.clientHeight) y = cur;
|
|
14751
|
+
if (!x && cur.scrollWidth > cur.clientWidth) x = cur;
|
|
14753
14752
|
cur = cur.assignedSlot || cur.parentNode;
|
|
14754
14753
|
} else if (cur.nodeType == 11) {
|
|
14755
14754
|
cur = cur.host;
|
|
@@ -14757,7 +14756,10 @@ function scrollableParent(dom) {
|
|
|
14757
14756
|
break;
|
|
14758
14757
|
}
|
|
14759
14758
|
}
|
|
14760
|
-
return
|
|
14759
|
+
return {
|
|
14760
|
+
x: x,
|
|
14761
|
+
y: y
|
|
14762
|
+
};
|
|
14761
14763
|
}
|
|
14762
14764
|
var DOMSelectionState = /*#__PURE__*/ function() {
|
|
14763
14765
|
function DOMSelectionState() {
|
|
@@ -16037,11 +16039,11 @@ function combineAttrs(source, target) {
|
|
|
16037
16039
|
}
|
|
16038
16040
|
return target;
|
|
16039
16041
|
}
|
|
16040
|
-
var noAttrs = /*@__PURE__*/ Object.create(null);
|
|
16042
|
+
var noAttrs$1 = /*@__PURE__*/ Object.create(null);
|
|
16041
16043
|
function attrsEq(a, b, ignore) {
|
|
16042
16044
|
if (a == b) return true;
|
|
16043
|
-
if (!a) a = noAttrs;
|
|
16044
|
-
if (!b) b = noAttrs;
|
|
16045
|
+
if (!a) a = noAttrs$1;
|
|
16046
|
+
if (!b) b = noAttrs$1;
|
|
16045
16047
|
var keysA = Object.keys(a), keysB = Object.keys(b);
|
|
16046
16048
|
if (keysA.length - (ignore && keysA.indexOf(ignore) > -1 ? 1 : 0) != keysB.length - (ignore && keysB.indexOf(ignore) > -1 ? 1 : 0)) return false;
|
|
16047
16049
|
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
@@ -16286,8 +16288,8 @@ var LineView = /*#__PURE__*/ function(ContentView1) {
|
|
|
16286
16288
|
},
|
|
16287
16289
|
{
|
|
16288
16290
|
key: "become",
|
|
16289
|
-
value: function become(
|
|
16290
|
-
return
|
|
16291
|
+
value: function become(other) {
|
|
16292
|
+
return _instanceof$e(other, LineView) && this.children.length == 0 && other.children.length == 0 && attrsEq(this.attrs, other.attrs) && this.breakAfter == other.breakAfter;
|
|
16291
16293
|
}
|
|
16292
16294
|
},
|
|
16293
16295
|
{
|
|
@@ -17535,6 +17537,7 @@ var scrollIntoView$1 = /*@__PURE__*/ StateEffect.define({
|
|
|
17535
17537
|
return t.map(ch);
|
|
17536
17538
|
}
|
|
17537
17539
|
});
|
|
17540
|
+
var setEditContextFormatting = /*@__PURE__*/ StateEffect.define();
|
|
17538
17541
|
/**
|
|
17539
17542
|
Log or report an unhandled exception in client code. Should
|
|
17540
17543
|
probably only be used by extension code that allows client code to
|
|
@@ -17945,10 +17948,13 @@ var DocView = /*#__PURE__*/ function(ContentView1) {
|
|
|
17945
17948
|
_this = _super.call(this);
|
|
17946
17949
|
_this.view = view;
|
|
17947
17950
|
_this.decorations = [];
|
|
17948
|
-
_this.dynamicDecorationMap = [
|
|
17951
|
+
_this.dynamicDecorationMap = [
|
|
17952
|
+
false
|
|
17953
|
+
];
|
|
17949
17954
|
_this.domChanged = null;
|
|
17950
17955
|
_this.hasComposition = null;
|
|
17951
17956
|
_this.markedForComposition = new Set;
|
|
17957
|
+
_this.editContextFormatting = Decoration.none;
|
|
17952
17958
|
_this.lastCompositionAfterCursor = false;
|
|
17953
17959
|
// Track a minimum width for the editor. When measuring sizes in
|
|
17954
17960
|
// measureVisibleLineHeights, this is updated to point at the width
|
|
@@ -18004,8 +18010,9 @@ var DocView = /*#__PURE__*/ function(ContentView1) {
|
|
|
18004
18010
|
this.minWidthTo = update.changes.mapPos(this.minWidthTo, 1);
|
|
18005
18011
|
}
|
|
18006
18012
|
}
|
|
18013
|
+
this.updateEditContextFormatting(update);
|
|
18007
18014
|
var readCompositionAt = -1;
|
|
18008
|
-
if (this.view.inputState.composing >= 0) {
|
|
18015
|
+
if (this.view.inputState.composing >= 0 && !this.view.observer.editContext) {
|
|
18009
18016
|
if ((_a = this.domChanged) === null || _a === void 0 ? void 0 : _a.newSel) readCompositionAt = this.domChanged.newSel.head;
|
|
18010
18017
|
else if (!touchesComposition(update.changes, this.hasComposition) && !update.selectionSet) readCompositionAt = update.state.selection.main.head;
|
|
18011
18018
|
}
|
|
@@ -18133,6 +18140,52 @@ var DocView = /*#__PURE__*/ function(ContentView1) {
|
|
|
18133
18140
|
if (composition) this.fixCompositionDOM(composition);
|
|
18134
18141
|
}
|
|
18135
18142
|
},
|
|
18143
|
+
{
|
|
18144
|
+
key: "updateEditContextFormatting",
|
|
18145
|
+
value: function updateEditContextFormatting(update) {
|
|
18146
|
+
this.editContextFormatting = this.editContextFormatting.map(update.changes);
|
|
18147
|
+
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined, _iteratorNormalCompletion1 = true, _didIteratorError1 = false, _iteratorError1 = undefined;
|
|
18148
|
+
try {
|
|
18149
|
+
for(var _iterator = update.transactions[Symbol.iterator](), _step; !(_iteratorNormalCompletion1 = (_step = _iterator.next()).done); _iteratorNormalCompletion1 = true){
|
|
18150
|
+
var tr = _step.value;
|
|
18151
|
+
try {
|
|
18152
|
+
for(var _iterator1 = tr.effects[Symbol.iterator](), _step1; !(_iteratorNormalCompletion = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion = true){
|
|
18153
|
+
var effect = _step1.value;
|
|
18154
|
+
if (effect.is(setEditContextFormatting)) {
|
|
18155
|
+
this.editContextFormatting = effect.value;
|
|
18156
|
+
}
|
|
18157
|
+
}
|
|
18158
|
+
} catch (err) {
|
|
18159
|
+
_didIteratorError = true;
|
|
18160
|
+
_iteratorError = err;
|
|
18161
|
+
} finally{
|
|
18162
|
+
try {
|
|
18163
|
+
if (!_iteratorNormalCompletion && _iterator1.return != null) {
|
|
18164
|
+
_iterator1.return();
|
|
18165
|
+
}
|
|
18166
|
+
} finally{
|
|
18167
|
+
if (_didIteratorError) {
|
|
18168
|
+
throw _iteratorError;
|
|
18169
|
+
}
|
|
18170
|
+
}
|
|
18171
|
+
}
|
|
18172
|
+
}
|
|
18173
|
+
} catch (err) {
|
|
18174
|
+
_didIteratorError1 = true;
|
|
18175
|
+
_iteratorError1 = err;
|
|
18176
|
+
} finally{
|
|
18177
|
+
try {
|
|
18178
|
+
if (!_iteratorNormalCompletion1 && _iterator.return != null) {
|
|
18179
|
+
_iterator.return();
|
|
18180
|
+
}
|
|
18181
|
+
} finally{
|
|
18182
|
+
if (_didIteratorError1) {
|
|
18183
|
+
throw _iteratorError1;
|
|
18184
|
+
}
|
|
18185
|
+
}
|
|
18186
|
+
}
|
|
18187
|
+
}
|
|
18188
|
+
},
|
|
18136
18189
|
{
|
|
18137
18190
|
key: "compositionView",
|
|
18138
18191
|
value: function compositionView(composition) {
|
|
@@ -18529,7 +18582,7 @@ var DocView = /*#__PURE__*/ function(ContentView1) {
|
|
|
18529
18582
|
key: "updateDeco",
|
|
18530
18583
|
value: function updateDeco() {
|
|
18531
18584
|
var _this = this;
|
|
18532
|
-
var i =
|
|
18585
|
+
var i = 1;
|
|
18533
18586
|
var allDeco = this.view.state.facet(decorations).map(function(d) {
|
|
18534
18587
|
var dynamic = _this.dynamicDecorationMap[i++] = typeof d == "function";
|
|
18535
18588
|
return dynamic ? d(_this.view) : d;
|
|
@@ -18543,7 +18596,9 @@ var DocView = /*#__PURE__*/ function(ContentView1) {
|
|
|
18543
18596
|
this.dynamicDecorationMap[i++] = dynamicOuter;
|
|
18544
18597
|
allDeco.push(RangeSet.join(outerDeco));
|
|
18545
18598
|
}
|
|
18546
|
-
this.decorations =
|
|
18599
|
+
this.decorations = [
|
|
18600
|
+
this.editContextFormatting
|
|
18601
|
+
].concat(_to_consumable_array$7(allDeco), [
|
|
18547
18602
|
this.computeBlockGapDeco(),
|
|
18548
18603
|
this.view.viewState.lineGapDeco
|
|
18549
18604
|
]);
|
|
@@ -19363,6 +19418,7 @@ var InputState = /*#__PURE__*/ function() {
|
|
|
19363
19418
|
{
|
|
19364
19419
|
key: "update",
|
|
19365
19420
|
value: function update(update) {
|
|
19421
|
+
this.view.observer.update(update);
|
|
19366
19422
|
if (this.mouseSelection) this.mouseSelection.update(update);
|
|
19367
19423
|
if (this.draggedContent && update.docChanged) this.draggedContent = this.draggedContent.map(update.changes);
|
|
19368
19424
|
if (update.transactions.length) this.lastKeyCode = this.lastSelectionTime = 0;
|
|
@@ -19480,7 +19536,7 @@ var MouseSelection = /*#__PURE__*/ function() {
|
|
|
19480
19536
|
};
|
|
19481
19537
|
this.scrolling = -1;
|
|
19482
19538
|
this.lastEvent = startEvent;
|
|
19483
|
-
this.
|
|
19539
|
+
this.scrollParents = scrollableParents(view.contentDOM);
|
|
19484
19540
|
this.atoms = view.state.facet(atomicRanges).map(function(f) {
|
|
19485
19541
|
return f(view);
|
|
19486
19542
|
});
|
|
@@ -19503,22 +19559,20 @@ var MouseSelection = /*#__PURE__*/ function() {
|
|
|
19503
19559
|
{
|
|
19504
19560
|
key: "move",
|
|
19505
19561
|
value: function move(event) {
|
|
19506
|
-
var _a;
|
|
19507
19562
|
if (event.buttons == 0) return this.destroy();
|
|
19508
19563
|
if (this.dragging || this.dragging == null && dist(this.startEvent, event) < 10) return;
|
|
19509
19564
|
this.select(this.lastEvent = event);
|
|
19510
19565
|
var sx = 0, sy = 0;
|
|
19511
|
-
var
|
|
19512
|
-
|
|
19513
|
-
|
|
19514
|
-
|
|
19515
|
-
|
|
19516
|
-
};
|
|
19566
|
+
var left = 0, top = 0, right = this.view.win.innerWidth, bottom = this.view.win.innerHeight;
|
|
19567
|
+
var ref;
|
|
19568
|
+
if (this.scrollParents.x) ref = this.scrollParents.x.getBoundingClientRect(), left = ref.left, right = ref.right;
|
|
19569
|
+
var ref1;
|
|
19570
|
+
if (this.scrollParents.y) ref1 = this.scrollParents.y.getBoundingClientRect(), top = ref1.top, bottom = ref1.bottom;
|
|
19517
19571
|
var margins = getScrollMargins(this.view);
|
|
19518
|
-
if (event.clientX - margins.left <=
|
|
19519
|
-
else if (event.clientX + margins.right >=
|
|
19520
|
-
if (event.clientY - margins.top <=
|
|
19521
|
-
else if (event.clientY + margins.bottom >=
|
|
19572
|
+
if (event.clientX - margins.left <= left + dragScrollMargin) sx = -dragScrollSpeed(left - event.clientX);
|
|
19573
|
+
else if (event.clientX + margins.right >= right - dragScrollMargin) sx = dragScrollSpeed(event.clientX - right);
|
|
19574
|
+
if (event.clientY - margins.top <= top + dragScrollMargin) sy = -dragScrollSpeed(top - event.clientY);
|
|
19575
|
+
else if (event.clientY + margins.bottom >= bottom - dragScrollMargin) sy = dragScrollSpeed(event.clientY - bottom);
|
|
19522
19576
|
this.setScrollSpeed(sx, sy);
|
|
19523
19577
|
}
|
|
19524
19578
|
},
|
|
@@ -19561,12 +19615,16 @@ var MouseSelection = /*#__PURE__*/ function() {
|
|
|
19561
19615
|
{
|
|
19562
19616
|
key: "scroll",
|
|
19563
19617
|
value: function scroll() {
|
|
19564
|
-
|
|
19565
|
-
|
|
19566
|
-
this.
|
|
19567
|
-
|
|
19568
|
-
|
|
19618
|
+
var _this_scrollSpeed = this.scrollSpeed, x = _this_scrollSpeed.x, y = _this_scrollSpeed.y;
|
|
19619
|
+
if (x && this.scrollParents.x) {
|
|
19620
|
+
this.scrollParents.x.scrollLeft += x;
|
|
19621
|
+
x = 0;
|
|
19622
|
+
}
|
|
19623
|
+
if (y && this.scrollParents.y) {
|
|
19624
|
+
this.scrollParents.y.scrollTop += y;
|
|
19625
|
+
y = 0;
|
|
19569
19626
|
}
|
|
19627
|
+
if (x || y) this.view.win.scrollBy(x, y);
|
|
19570
19628
|
if (this.dragging === false) this.select(this.lastEvent);
|
|
19571
19629
|
}
|
|
19572
19630
|
},
|
|
@@ -20103,6 +20161,7 @@ observers.blur = function(view) {
|
|
|
20103
20161
|
updateForFocusChange(view);
|
|
20104
20162
|
};
|
|
20105
20163
|
observers.compositionstart = observers.compositionupdate = function(view) {
|
|
20164
|
+
if (view.observer.editContext) return; // Composition handled by edit context
|
|
20106
20165
|
if (view.inputState.compositionFirstChange == null) view.inputState.compositionFirstChange = true;
|
|
20107
20166
|
if (view.inputState.composing < 0) {
|
|
20108
20167
|
// FIXME possibly set a timeout to clear it again on Android
|
|
@@ -20110,6 +20169,7 @@ observers.compositionstart = observers.compositionupdate = function(view) {
|
|
|
20110
20169
|
}
|
|
20111
20170
|
};
|
|
20112
20171
|
observers.compositionend = function(view) {
|
|
20172
|
+
if (view.observer.editContext) return; // Composition handled by edit context
|
|
20113
20173
|
view.inputState.composing = -1;
|
|
20114
20174
|
view.inputState.compositionEndedAt = Date.now();
|
|
20115
20175
|
view.inputState.compositionPendingKey = true;
|
|
@@ -21640,47 +21700,51 @@ var ViewState = /*#__PURE__*/ function() {
|
|
|
21640
21700
|
}
|
|
21641
21701
|
gaps.push(gap);
|
|
21642
21702
|
};
|
|
21703
|
+
var checkLine = function(line) {
|
|
21704
|
+
if (line.length < doubleMargin || line.type != BlockType.Text) return;
|
|
21705
|
+
var structure = lineStructure(line.from, line.to, _this.stateDeco);
|
|
21706
|
+
if (structure.total < doubleMargin) return;
|
|
21707
|
+
var target = _this.scrollTarget ? _this.scrollTarget.range.head : null;
|
|
21708
|
+
var viewFrom, viewTo;
|
|
21709
|
+
if (wrapping) {
|
|
21710
|
+
var marginHeight = margin / _this.heightOracle.lineLength * _this.heightOracle.lineHeight;
|
|
21711
|
+
var top, bot;
|
|
21712
|
+
if (target != null) {
|
|
21713
|
+
var targetFrac = findFraction(structure, target);
|
|
21714
|
+
var spaceFrac = ((_this.visibleBottom - _this.visibleTop) / 2 + marginHeight) / line.height;
|
|
21715
|
+
top = targetFrac - spaceFrac;
|
|
21716
|
+
bot = targetFrac + spaceFrac;
|
|
21717
|
+
} else {
|
|
21718
|
+
top = (_this.visibleTop - line.top - marginHeight) / line.height;
|
|
21719
|
+
bot = (_this.visibleBottom - line.top + marginHeight) / line.height;
|
|
21720
|
+
}
|
|
21721
|
+
viewFrom = findPosition(structure, top);
|
|
21722
|
+
viewTo = findPosition(structure, bot);
|
|
21723
|
+
} else {
|
|
21724
|
+
var totalWidth = structure.total * _this.heightOracle.charWidth;
|
|
21725
|
+
var marginWidth = margin * _this.heightOracle.charWidth;
|
|
21726
|
+
var left, right;
|
|
21727
|
+
if (target != null) {
|
|
21728
|
+
var targetFrac1 = findFraction(structure, target);
|
|
21729
|
+
var spaceFrac1 = ((_this.pixelViewport.right - _this.pixelViewport.left) / 2 + marginWidth) / totalWidth;
|
|
21730
|
+
left = targetFrac1 - spaceFrac1;
|
|
21731
|
+
right = targetFrac1 + spaceFrac1;
|
|
21732
|
+
} else {
|
|
21733
|
+
left = (_this.pixelViewport.left - marginWidth) / totalWidth;
|
|
21734
|
+
right = (_this.pixelViewport.right + marginWidth) / totalWidth;
|
|
21735
|
+
}
|
|
21736
|
+
viewFrom = findPosition(structure, left);
|
|
21737
|
+
viewTo = findPosition(structure, right);
|
|
21738
|
+
}
|
|
21739
|
+
if (viewFrom > line.from) addGap(line.from, viewFrom, line, structure);
|
|
21740
|
+
if (viewTo < line.to) addGap(viewTo, line.to, line, structure);
|
|
21741
|
+
};
|
|
21643
21742
|
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
21644
21743
|
try {
|
|
21645
21744
|
for(var _iterator = this.viewportLines[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
|
|
21646
21745
|
var line = _step.value;
|
|
21647
|
-
if (line.
|
|
21648
|
-
|
|
21649
|
-
if (structure.total < doubleMargin) continue;
|
|
21650
|
-
var target = this.scrollTarget ? this.scrollTarget.range.head : null;
|
|
21651
|
-
var viewFrom = void 0, viewTo = void 0;
|
|
21652
|
-
if (wrapping) {
|
|
21653
|
-
var marginHeight = margin / this.heightOracle.lineLength * this.heightOracle.lineHeight;
|
|
21654
|
-
var top = void 0, bot = void 0;
|
|
21655
|
-
if (target != null) {
|
|
21656
|
-
var targetFrac = findFraction(structure, target);
|
|
21657
|
-
var spaceFrac = ((this.visibleBottom - this.visibleTop) / 2 + marginHeight) / line.height;
|
|
21658
|
-
top = targetFrac - spaceFrac;
|
|
21659
|
-
bot = targetFrac + spaceFrac;
|
|
21660
|
-
} else {
|
|
21661
|
-
top = (this.visibleTop - line.top - marginHeight) / line.height;
|
|
21662
|
-
bot = (this.visibleBottom - line.top + marginHeight) / line.height;
|
|
21663
|
-
}
|
|
21664
|
-
viewFrom = findPosition(structure, top);
|
|
21665
|
-
viewTo = findPosition(structure, bot);
|
|
21666
|
-
} else {
|
|
21667
|
-
var totalWidth = structure.total * this.heightOracle.charWidth;
|
|
21668
|
-
var marginWidth = margin * this.heightOracle.charWidth;
|
|
21669
|
-
var left = void 0, right = void 0;
|
|
21670
|
-
if (target != null) {
|
|
21671
|
-
var targetFrac1 = findFraction(structure, target);
|
|
21672
|
-
var spaceFrac1 = ((this.pixelViewport.right - this.pixelViewport.left) / 2 + marginWidth) / totalWidth;
|
|
21673
|
-
left = targetFrac1 - spaceFrac1;
|
|
21674
|
-
right = targetFrac1 + spaceFrac1;
|
|
21675
|
-
} else {
|
|
21676
|
-
left = (this.pixelViewport.left - marginWidth) / totalWidth;
|
|
21677
|
-
right = (this.pixelViewport.right + marginWidth) / totalWidth;
|
|
21678
|
-
}
|
|
21679
|
-
viewFrom = findPosition(structure, left);
|
|
21680
|
-
viewTo = findPosition(structure, right);
|
|
21681
|
-
}
|
|
21682
|
-
if (viewFrom > line.from) addGap(line.from, viewFrom, line, structure);
|
|
21683
|
-
if (viewTo < line.to) addGap(viewTo, line.to, line, structure);
|
|
21746
|
+
if (Array.isArray(line.type)) line.type.forEach(checkLine);
|
|
21747
|
+
else checkLine(line);
|
|
21684
21748
|
}
|
|
21685
21749
|
} catch (err) {
|
|
21686
21750
|
_didIteratorError = true;
|
|
@@ -22578,26 +22642,7 @@ function applyDOMChange(view, domChange) {
|
|
|
22578
22642
|
};
|
|
22579
22643
|
}
|
|
22580
22644
|
if (change) {
|
|
22581
|
-
|
|
22582
|
-
// Android browsers don't fire reasonable key events for enter,
|
|
22583
|
-
// backspace, or delete. So this detects changes that look like
|
|
22584
|
-
// they're caused by those keys, and reinterprets them as key
|
|
22585
|
-
// events. (Some of these keys are also handled by beforeinput
|
|
22586
|
-
// events and the pendingAndroidKey mechanism, but that's not
|
|
22587
|
-
// reliable in all situations.)
|
|
22588
|
-
if (browser.android && (change.to == sel.to && // GBoard will sometimes remove a space it just inserted
|
|
22589
|
-
// after a completion when you press enter
|
|
22590
|
-
(change.from == sel.from || change.from == sel.from - 1 && view.state.sliceDoc(change.from, sel.from) == " ") && change.insert.length == 1 && change.insert.lines == 2 && dispatchKey(view.contentDOM, "Enter", 13) || (change.from == sel.from - 1 && change.to == sel.to && change.insert.length == 0 || lastKey == 8 && change.insert.length < change.to - change.from && change.to > sel.head) && dispatchKey(view.contentDOM, "Backspace", 8) || change.from == sel.from && change.to == sel.to + 1 && change.insert.length == 0 && dispatchKey(view.contentDOM, "Delete", 46))) return true;
|
|
22591
|
-
var text = change.insert.toString();
|
|
22592
|
-
if (view.inputState.composing >= 0) view.inputState.composing++;
|
|
22593
|
-
var defaultTr;
|
|
22594
|
-
var defaultInsert = function() {
|
|
22595
|
-
return defaultTr || (defaultTr = applyDefaultInsert(view, change, newSel));
|
|
22596
|
-
};
|
|
22597
|
-
if (!view.state.facet(inputHandler$1).some(function(h) {
|
|
22598
|
-
return h(view, change.from, change.to, text, defaultInsert);
|
|
22599
|
-
})) view.dispatch(defaultInsert());
|
|
22600
|
-
return true;
|
|
22645
|
+
return applyDOMChangeInner(view, change, newSel, lastKey);
|
|
22601
22646
|
} else if (newSel && !newSel.main.eq(sel)) {
|
|
22602
22647
|
var scrollIntoView = false, userEvent = "select";
|
|
22603
22648
|
if (view.inputState.lastSelectionTime > Date.now() - 50) {
|
|
@@ -22614,6 +22659,30 @@ function applyDOMChange(view, domChange) {
|
|
|
22614
22659
|
return false;
|
|
22615
22660
|
}
|
|
22616
22661
|
}
|
|
22662
|
+
function applyDOMChangeInner(view, change, newSel) {
|
|
22663
|
+
var lastKey = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : -1;
|
|
22664
|
+
if (browser.ios && view.inputState.flushIOSKey(change)) return true;
|
|
22665
|
+
var sel = view.state.selection.main;
|
|
22666
|
+
// Android browsers don't fire reasonable key events for enter,
|
|
22667
|
+
// backspace, or delete. So this detects changes that look like
|
|
22668
|
+
// they're caused by those keys, and reinterprets them as key
|
|
22669
|
+
// events. (Some of these keys are also handled by beforeinput
|
|
22670
|
+
// events and the pendingAndroidKey mechanism, but that's not
|
|
22671
|
+
// reliable in all situations.)
|
|
22672
|
+
if (browser.android && (change.to == sel.to && // GBoard will sometimes remove a space it just inserted
|
|
22673
|
+
// after a completion when you press enter
|
|
22674
|
+
(change.from == sel.from || change.from == sel.from - 1 && view.state.sliceDoc(change.from, sel.from) == " ") && change.insert.length == 1 && change.insert.lines == 2 && dispatchKey(view.contentDOM, "Enter", 13) || (change.from == sel.from - 1 && change.to == sel.to && change.insert.length == 0 || lastKey == 8 && change.insert.length < change.to - change.from && change.to > sel.head) && dispatchKey(view.contentDOM, "Backspace", 8) || change.from == sel.from && change.to == sel.to + 1 && change.insert.length == 0 && dispatchKey(view.contentDOM, "Delete", 46))) return true;
|
|
22675
|
+
var text = change.insert.toString();
|
|
22676
|
+
if (view.inputState.composing >= 0) view.inputState.composing++;
|
|
22677
|
+
var defaultTr;
|
|
22678
|
+
var defaultInsert = function() {
|
|
22679
|
+
return defaultTr || (defaultTr = applyDefaultInsert(view, change, newSel));
|
|
22680
|
+
};
|
|
22681
|
+
if (!view.state.facet(inputHandler$1).some(function(h) {
|
|
22682
|
+
return h(view, change.from, change.to, text, defaultInsert);
|
|
22683
|
+
})) view.dispatch(defaultInsert());
|
|
22684
|
+
return true;
|
|
22685
|
+
}
|
|
22617
22686
|
function applyDefaultInsert(view, change, newSel) {
|
|
22618
22687
|
var tr, startState = view.state, sel = startState.selection.main;
|
|
22619
22688
|
if (change.from >= sel.from && change.to <= sel.to && change.to - change.from >= (sel.to - sel.from) / 3 && (!newSel || newSel.main.empty && newSel.main.from == change.from + change.insert.length) && view.inputState.composing < 0) {
|
|
@@ -22743,6 +22812,7 @@ var DOMObserver = /*#__PURE__*/ function() {
|
|
|
22743
22812
|
_class_call_check$e(this, DOMObserver);
|
|
22744
22813
|
this.view = view;
|
|
22745
22814
|
this.active = false;
|
|
22815
|
+
this.editContext = null;
|
|
22746
22816
|
// The known selection. Kept in our own object, as opposed to just
|
|
22747
22817
|
// directly accessing the selection because:
|
|
22748
22818
|
// - Safari doesn't report the right selection in shadow DOM
|
|
@@ -22803,6 +22873,11 @@ var DOMObserver = /*#__PURE__*/ function() {
|
|
|
22803
22873
|
})) _this.flushSoon();
|
|
22804
22874
|
else _this.flush();
|
|
22805
22875
|
});
|
|
22876
|
+
if (window.EditContext && view.constructor.EDIT_CONTEXT !== false && // Chrome <126 doesn't support inverted selections in edit context (#1392)
|
|
22877
|
+
!(browser.chrome && browser.chrome_version < 126)) {
|
|
22878
|
+
this.editContext = new EditContextManager(view);
|
|
22879
|
+
if (view.state.facet(editable)) view.contentDOM.editContext = this.editContext.editContext;
|
|
22880
|
+
}
|
|
22806
22881
|
if (useCharData) this.onCharData = function(event) {
|
|
22807
22882
|
_this.queue.push({
|
|
22808
22883
|
target: event.target,
|
|
@@ -22858,6 +22933,7 @@ var DOMObserver = /*#__PURE__*/ function() {
|
|
|
22858
22933
|
key: "onScroll",
|
|
22859
22934
|
value: function onScroll(e) {
|
|
22860
22935
|
if (this.intersecting) this.flush(false);
|
|
22936
|
+
if (this.editContext) this.view.requestMeasure(this.editContext.measureReq);
|
|
22861
22937
|
this.onScrollChanged(e);
|
|
22862
22938
|
}
|
|
22863
22939
|
},
|
|
@@ -23305,6 +23381,15 @@ var DOMObserver = /*#__PURE__*/ function() {
|
|
|
23305
23381
|
win.document.removeEventListener("selectionchange", this.onSelectionChange);
|
|
23306
23382
|
}
|
|
23307
23383
|
},
|
|
23384
|
+
{
|
|
23385
|
+
key: "update",
|
|
23386
|
+
value: function update(update) {
|
|
23387
|
+
if (this.editContext) {
|
|
23388
|
+
this.editContext.update(update);
|
|
23389
|
+
if (update.startState.facet(editable) != update.state.facet(editable)) update.view.contentDOM.editContext = update.state.facet(editable) ? this.editContext.editContext : null;
|
|
23390
|
+
}
|
|
23391
|
+
}
|
|
23392
|
+
},
|
|
23308
23393
|
{
|
|
23309
23394
|
key: "destroy",
|
|
23310
23395
|
value: function destroy() {
|
|
@@ -23338,6 +23423,10 @@ var DOMObserver = /*#__PURE__*/ function() {
|
|
|
23338
23423
|
clearTimeout(this.resizeTimeout);
|
|
23339
23424
|
this.win.cancelAnimationFrame(this.delayedFlush);
|
|
23340
23425
|
this.win.cancelAnimationFrame(this.flushingAndroidKey);
|
|
23426
|
+
if (this.editContext) {
|
|
23427
|
+
this.view.contentDOM.editContext = null;
|
|
23428
|
+
this.editContext.destroy();
|
|
23429
|
+
}
|
|
23341
23430
|
}
|
|
23342
23431
|
}
|
|
23343
23432
|
]);
|
|
@@ -23395,6 +23484,219 @@ function safariSelectionRangeHack(view, selection) {
|
|
|
23395
23484
|
view.contentDOM.removeEventListener("beforeinput", read, true);
|
|
23396
23485
|
return found ? buildSelectionRangeFromRange(view, found) : null;
|
|
23397
23486
|
}
|
|
23487
|
+
var EditContextManager = /*#__PURE__*/ function() {
|
|
23488
|
+
function EditContextManager(view) {
|
|
23489
|
+
var _this = this;
|
|
23490
|
+
_class_call_check$e(this, EditContextManager);
|
|
23491
|
+
// The document window for which the text in the context is
|
|
23492
|
+
// maintained. For large documents, this may be smaller than the
|
|
23493
|
+
// editor document. This window always includes the selection head.
|
|
23494
|
+
this.from = 0;
|
|
23495
|
+
this.to = 0;
|
|
23496
|
+
// When applying a transaction, this is used to compare the change
|
|
23497
|
+
// made to the context content to the change in the transaction in
|
|
23498
|
+
// order to make the minimal changes to the context (since touching
|
|
23499
|
+
// that sometimes breaks series of multiple edits made for a single
|
|
23500
|
+
// user action on some Android keyboards)
|
|
23501
|
+
this.pendingContextChange = null;
|
|
23502
|
+
this.handlers = Object.create(null);
|
|
23503
|
+
this.resetRange(view.state);
|
|
23504
|
+
var context = this.editContext = new window.EditContext({
|
|
23505
|
+
text: view.state.doc.sliceString(this.from, this.to),
|
|
23506
|
+
selectionStart: this.toContextPos(Math.max(this.from, Math.min(this.to, view.state.selection.main.anchor))),
|
|
23507
|
+
selectionEnd: this.toContextPos(view.state.selection.main.head)
|
|
23508
|
+
});
|
|
23509
|
+
this.handlers.textupdate = function(e) {
|
|
23510
|
+
var anchor = view.state.selection.main.anchor;
|
|
23511
|
+
var change = {
|
|
23512
|
+
from: _this.toEditorPos(e.updateRangeStart),
|
|
23513
|
+
to: _this.toEditorPos(e.updateRangeEnd),
|
|
23514
|
+
insert: Text.of(e.text.split("\n"))
|
|
23515
|
+
};
|
|
23516
|
+
// If the window doesn't include the anchor, assume changes
|
|
23517
|
+
// adjacent to a side go up to the anchor.
|
|
23518
|
+
if (change.from == _this.from && anchor < _this.from) change.from = anchor;
|
|
23519
|
+
else if (change.to == _this.to && anchor > _this.to) change.to = anchor;
|
|
23520
|
+
// Edit contexts sometimes fire empty changes
|
|
23521
|
+
if (change.from == change.to && !change.insert.length) return;
|
|
23522
|
+
_this.pendingContextChange = change;
|
|
23523
|
+
applyDOMChangeInner(view, change, EditorSelection.single(_this.toEditorPos(e.selectionStart), _this.toEditorPos(e.selectionEnd)));
|
|
23524
|
+
// If the transaction didn't flush our change, revert it so
|
|
23525
|
+
// that the context is in sync with the editor state again.
|
|
23526
|
+
if (_this.pendingContextChange) {
|
|
23527
|
+
_this.revertPending(view.state);
|
|
23528
|
+
_this.setSelection(view.state);
|
|
23529
|
+
}
|
|
23530
|
+
};
|
|
23531
|
+
this.handlers.characterboundsupdate = function(e) {
|
|
23532
|
+
var rects = [], prev = null;
|
|
23533
|
+
for(var i = _this.toEditorPos(e.rangeStart), end = _this.toEditorPos(e.rangeEnd); i < end; i++){
|
|
23534
|
+
var rect = view.coordsForChar(i);
|
|
23535
|
+
prev = rect && new DOMRect(rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top) || prev || new DOMRect;
|
|
23536
|
+
rects.push(prev);
|
|
23537
|
+
}
|
|
23538
|
+
context.updateCharacterBounds(e.rangeStart, rects);
|
|
23539
|
+
};
|
|
23540
|
+
this.handlers.textformatupdate = function(e) {
|
|
23541
|
+
var deco = [];
|
|
23542
|
+
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
23543
|
+
try {
|
|
23544
|
+
for(var _iterator = e.getTextFormats()[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
|
|
23545
|
+
var format = _step.value;
|
|
23546
|
+
var lineStyle = format.underlineStyle, thickness = format.underlineThickness;
|
|
23547
|
+
if (lineStyle != "None" && thickness != "None") {
|
|
23548
|
+
var style = "text-decoration: underline ".concat(lineStyle == "Dashed" ? "dashed " : lineStyle == "Squiggle" ? "wavy " : "").concat(thickness == "Thin" ? 1 : 2, "px");
|
|
23549
|
+
deco.push(Decoration.mark({
|
|
23550
|
+
attributes: {
|
|
23551
|
+
style: style
|
|
23552
|
+
}
|
|
23553
|
+
}).range(_this.toEditorPos(format.rangeStart), _this.toEditorPos(format.rangeEnd)));
|
|
23554
|
+
}
|
|
23555
|
+
}
|
|
23556
|
+
} catch (err) {
|
|
23557
|
+
_didIteratorError = true;
|
|
23558
|
+
_iteratorError = err;
|
|
23559
|
+
} finally{
|
|
23560
|
+
try {
|
|
23561
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
23562
|
+
_iterator.return();
|
|
23563
|
+
}
|
|
23564
|
+
} finally{
|
|
23565
|
+
if (_didIteratorError) {
|
|
23566
|
+
throw _iteratorError;
|
|
23567
|
+
}
|
|
23568
|
+
}
|
|
23569
|
+
}
|
|
23570
|
+
view.dispatch({
|
|
23571
|
+
effects: setEditContextFormatting.of(Decoration.set(deco))
|
|
23572
|
+
});
|
|
23573
|
+
};
|
|
23574
|
+
this.handlers.compositionstart = function() {
|
|
23575
|
+
if (view.inputState.composing < 0) {
|
|
23576
|
+
view.inputState.composing = 0;
|
|
23577
|
+
view.inputState.compositionFirstChange = true;
|
|
23578
|
+
}
|
|
23579
|
+
};
|
|
23580
|
+
this.handlers.compositionend = function() {
|
|
23581
|
+
view.inputState.composing = -1;
|
|
23582
|
+
view.inputState.compositionFirstChange = null;
|
|
23583
|
+
};
|
|
23584
|
+
for(var event in this.handlers)context.addEventListener(event, this.handlers[event]);
|
|
23585
|
+
this.measureReq = {
|
|
23586
|
+
read: function(view) {
|
|
23587
|
+
_this.editContext.updateControlBounds(view.contentDOM.getBoundingClientRect());
|
|
23588
|
+
var sel = getSelection(view.root);
|
|
23589
|
+
if (sel && sel.rangeCount) _this.editContext.updateSelectionBounds(sel.getRangeAt(0).getBoundingClientRect());
|
|
23590
|
+
}
|
|
23591
|
+
};
|
|
23592
|
+
}
|
|
23593
|
+
_create_class$b(EditContextManager, [
|
|
23594
|
+
{
|
|
23595
|
+
key: "applyEdits",
|
|
23596
|
+
value: function applyEdits(update) {
|
|
23597
|
+
var _this = this;
|
|
23598
|
+
var off = 0, abort = false, pending = this.pendingContextChange;
|
|
23599
|
+
update.changes.iterChanges(function(fromA, toA, _fromB, _toB, insert) {
|
|
23600
|
+
if (abort) return;
|
|
23601
|
+
var dLen = insert.length - (toA - fromA);
|
|
23602
|
+
if (pending && toA >= pending.to) {
|
|
23603
|
+
if (pending.from == fromA && pending.to == toA && pending.insert.eq(insert)) {
|
|
23604
|
+
pending = _this.pendingContextChange = null; // Match
|
|
23605
|
+
off += dLen;
|
|
23606
|
+
_this.to += dLen;
|
|
23607
|
+
return;
|
|
23608
|
+
} else {
|
|
23609
|
+
pending = null;
|
|
23610
|
+
_this.revertPending(update.state);
|
|
23611
|
+
}
|
|
23612
|
+
}
|
|
23613
|
+
fromA += off;
|
|
23614
|
+
toA += off;
|
|
23615
|
+
if (toA <= _this.from) {
|
|
23616
|
+
_this.from += dLen;
|
|
23617
|
+
_this.to += dLen;
|
|
23618
|
+
} else if (fromA < _this.to) {
|
|
23619
|
+
if (fromA < _this.from || toA > _this.to || _this.to - _this.from + insert.length > 30000 /* CxVp.MaxSize */ ) {
|
|
23620
|
+
abort = true;
|
|
23621
|
+
return;
|
|
23622
|
+
}
|
|
23623
|
+
_this.editContext.updateText(_this.toContextPos(fromA), _this.toContextPos(toA), insert.toString());
|
|
23624
|
+
_this.to += dLen;
|
|
23625
|
+
}
|
|
23626
|
+
off += dLen;
|
|
23627
|
+
});
|
|
23628
|
+
if (pending && !abort) this.revertPending(update.state);
|
|
23629
|
+
return !abort;
|
|
23630
|
+
}
|
|
23631
|
+
},
|
|
23632
|
+
{
|
|
23633
|
+
key: "update",
|
|
23634
|
+
value: function update(update) {
|
|
23635
|
+
var reverted = this.pendingContextChange;
|
|
23636
|
+
if (!this.applyEdits(update) || !this.rangeIsValid(update.state)) {
|
|
23637
|
+
this.pendingContextChange = null;
|
|
23638
|
+
this.resetRange(update.state);
|
|
23639
|
+
this.editContext.updateText(0, this.editContext.text.length, update.state.doc.sliceString(this.from, this.to));
|
|
23640
|
+
this.setSelection(update.state);
|
|
23641
|
+
} else if (update.docChanged || update.selectionSet || reverted) {
|
|
23642
|
+
this.setSelection(update.state);
|
|
23643
|
+
}
|
|
23644
|
+
if (update.geometryChanged || update.docChanged || update.selectionSet) update.view.requestMeasure(this.measureReq);
|
|
23645
|
+
}
|
|
23646
|
+
},
|
|
23647
|
+
{
|
|
23648
|
+
key: "resetRange",
|
|
23649
|
+
value: function resetRange(state) {
|
|
23650
|
+
var head = state.selection.main.head;
|
|
23651
|
+
this.from = Math.max(0, head - 10000 /* CxVp.Margin */ );
|
|
23652
|
+
this.to = Math.min(state.doc.length, head + 10000 /* CxVp.Margin */ );
|
|
23653
|
+
}
|
|
23654
|
+
},
|
|
23655
|
+
{
|
|
23656
|
+
key: "revertPending",
|
|
23657
|
+
value: function revertPending(state) {
|
|
23658
|
+
var pending = this.pendingContextChange;
|
|
23659
|
+
this.pendingContextChange = null;
|
|
23660
|
+
this.editContext.updateText(this.toContextPos(pending.from), this.toContextPos(pending.from + pending.insert.length), state.doc.sliceString(pending.from, pending.to));
|
|
23661
|
+
}
|
|
23662
|
+
},
|
|
23663
|
+
{
|
|
23664
|
+
key: "setSelection",
|
|
23665
|
+
value: function setSelection(state) {
|
|
23666
|
+
var main = state.selection.main;
|
|
23667
|
+
var start = this.toContextPos(Math.max(this.from, Math.min(this.to, main.anchor)));
|
|
23668
|
+
var end = this.toContextPos(main.head);
|
|
23669
|
+
if (this.editContext.selectionStart != start || this.editContext.selectionEnd != end) this.editContext.updateSelection(start, end);
|
|
23670
|
+
}
|
|
23671
|
+
},
|
|
23672
|
+
{
|
|
23673
|
+
key: "rangeIsValid",
|
|
23674
|
+
value: function rangeIsValid(state) {
|
|
23675
|
+
var head = state.selection.main.head;
|
|
23676
|
+
return !(this.from > 0 && head - this.from < 500 /* CxVp.MinMargin */ || this.to < state.doc.length && this.to - head < 500 /* CxVp.MinMargin */ || this.to - this.from > 10000 /* CxVp.Margin */ * 3);
|
|
23677
|
+
}
|
|
23678
|
+
},
|
|
23679
|
+
{
|
|
23680
|
+
key: "toEditorPos",
|
|
23681
|
+
value: function toEditorPos(contextPos) {
|
|
23682
|
+
return contextPos + this.from;
|
|
23683
|
+
}
|
|
23684
|
+
},
|
|
23685
|
+
{
|
|
23686
|
+
key: "toContextPos",
|
|
23687
|
+
value: function toContextPos(editorPos) {
|
|
23688
|
+
return editorPos - this.from;
|
|
23689
|
+
}
|
|
23690
|
+
},
|
|
23691
|
+
{
|
|
23692
|
+
key: "destroy",
|
|
23693
|
+
value: function destroy() {
|
|
23694
|
+
for(var event in this.handlers)this.editContext.removeEventListener(event, this.handlers[event]);
|
|
23695
|
+
}
|
|
23696
|
+
}
|
|
23697
|
+
]);
|
|
23698
|
+
return EditContextManager;
|
|
23699
|
+
}();
|
|
23398
23700
|
// The editor's update state machine looks something like this:
|
|
23399
23701
|
//
|
|
23400
23702
|
// Idle → Updating ⇆ Idle (unchecked) → Measuring → Idle
|
|
@@ -24587,6 +24889,7 @@ transactions for editing actions.
|
|
|
24587
24889
|
calling this.
|
|
24588
24890
|
*/ key: "destroy",
|
|
24589
24891
|
value: function destroy() {
|
|
24892
|
+
if (this.root.activeElement == this.contentDOM) this.contentDOM.blur();
|
|
24590
24893
|
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
24591
24894
|
try {
|
|
24592
24895
|
for(var _iterator = this.plugins[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
|
|
@@ -26396,7 +26699,7 @@ going to happen when paired with
|
|
|
26396
26699
|
[`rectangularSelection`](https://codemirror.net/6/docs/ref/#view.rectangularSelection).
|
|
26397
26700
|
*/ function crosshairCursor() {
|
|
26398
26701
|
var options = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
26399
|
-
var _keys_ = _sliced_to_array$
|
|
26702
|
+
var _keys_ = _sliced_to_array$8(keys[options.key || "Alt"], 2), code = _keys_[0], getter = _keys_[1];
|
|
26400
26703
|
var plugin = ViewPlugin.fromClass(/*#__PURE__*/ function() {
|
|
26401
26704
|
function _class(view) {
|
|
26402
26705
|
_class_call_check$e(this, _class);
|
|
@@ -28727,12 +29030,12 @@ line](https://codemirror.net/6/docs/ref/#view.highlightActiveLine).
|
|
|
28727
29030
|
|
|
28728
29031
|
/**
|
|
28729
29032
|
The default maximum length of a `TreeBuffer` node.
|
|
28730
|
-
*/ function _array_like_to_array$
|
|
29033
|
+
*/ function _array_like_to_array$b(arr, len) {
|
|
28731
29034
|
if (len == null || len > arr.length) len = arr.length;
|
|
28732
29035
|
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
28733
29036
|
return arr2;
|
|
28734
29037
|
}
|
|
28735
|
-
function _array_with_holes$
|
|
29038
|
+
function _array_with_holes$7(arr) {
|
|
28736
29039
|
if (Array.isArray(arr)) return arr;
|
|
28737
29040
|
}
|
|
28738
29041
|
function _assert_this_initialized$7(self) {
|
|
@@ -28786,7 +29089,7 @@ function _instanceof$d(left, right) {
|
|
|
28786
29089
|
return left instanceof right;
|
|
28787
29090
|
}
|
|
28788
29091
|
}
|
|
28789
|
-
function _iterable_to_array_limit$
|
|
29092
|
+
function _iterable_to_array_limit$7(arr, i) {
|
|
28790
29093
|
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
28791
29094
|
if (_i == null) return;
|
|
28792
29095
|
var _arr = [];
|
|
@@ -28810,7 +29113,7 @@ function _iterable_to_array_limit$5(arr, i) {
|
|
|
28810
29113
|
}
|
|
28811
29114
|
return _arr;
|
|
28812
29115
|
}
|
|
28813
|
-
function _non_iterable_rest$
|
|
29116
|
+
function _non_iterable_rest$7() {
|
|
28814
29117
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
28815
29118
|
}
|
|
28816
29119
|
function _possible_constructor_return$7(self, call) {
|
|
@@ -28826,20 +29129,20 @@ function _set_prototype_of$7(o, p) {
|
|
|
28826
29129
|
};
|
|
28827
29130
|
return _set_prototype_of$7(o, p);
|
|
28828
29131
|
}
|
|
28829
|
-
function _sliced_to_array$
|
|
28830
|
-
return _array_with_holes$
|
|
29132
|
+
function _sliced_to_array$7(arr, i) {
|
|
29133
|
+
return _array_with_holes$7(arr) || _iterable_to_array_limit$7(arr, i) || _unsupported_iterable_to_array$b(arr, i) || _non_iterable_rest$7();
|
|
28831
29134
|
}
|
|
28832
29135
|
function _type_of$9(obj) {
|
|
28833
29136
|
"@swc/helpers - typeof";
|
|
28834
29137
|
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
28835
29138
|
}
|
|
28836
|
-
function _unsupported_iterable_to_array$
|
|
29139
|
+
function _unsupported_iterable_to_array$b(o, minLen) {
|
|
28837
29140
|
if (!o) return;
|
|
28838
|
-
if (typeof o === "string") return _array_like_to_array$
|
|
29141
|
+
if (typeof o === "string") return _array_like_to_array$b(o, minLen);
|
|
28839
29142
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
28840
29143
|
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
28841
29144
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
28842
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$
|
|
29145
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$b(o, minLen);
|
|
28843
29146
|
}
|
|
28844
29147
|
function _is_native_reflect_construct$7() {
|
|
28845
29148
|
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
@@ -29324,7 +29627,7 @@ move around to adjacent nodes.
|
|
|
29324
29627
|
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
29325
29628
|
try {
|
|
29326
29629
|
for(var _iterator = props[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
|
|
29327
|
-
var _step_value = _sliced_to_array$
|
|
29630
|
+
var _step_value = _sliced_to_array$7(_step.value, 2), prop = _step_value[0], value = _step_value[1];
|
|
29328
29631
|
this.props[typeof prop == "number" ? prop : prop.id] = value;
|
|
29329
29632
|
}
|
|
29330
29633
|
} catch (err) {
|
|
@@ -32115,12 +32418,12 @@ In addition, these mappings are provided:
|
|
|
32115
32418
|
}
|
|
32116
32419
|
]);
|
|
32117
32420
|
|
|
32118
|
-
function _array_like_to_array$
|
|
32421
|
+
function _array_like_to_array$a(arr, len) {
|
|
32119
32422
|
if (len == null || len > arr.length) len = arr.length;
|
|
32120
32423
|
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
32121
32424
|
return arr2;
|
|
32122
32425
|
}
|
|
32123
|
-
function _array_with_holes$
|
|
32426
|
+
function _array_with_holes$6(arr) {
|
|
32124
32427
|
if (Array.isArray(arr)) return arr;
|
|
32125
32428
|
}
|
|
32126
32429
|
function _assert_this_initialized$6(self) {
|
|
@@ -32148,7 +32451,7 @@ function _create_class$8(Constructor, protoProps, staticProps) {
|
|
|
32148
32451
|
if (staticProps) _defineProperties$8(Constructor, staticProps);
|
|
32149
32452
|
return Constructor;
|
|
32150
32453
|
}
|
|
32151
|
-
function _define_property$
|
|
32454
|
+
function _define_property$4(obj, key, value) {
|
|
32152
32455
|
if (key in obj) {
|
|
32153
32456
|
Object.defineProperty(obj, key, {
|
|
32154
32457
|
value: value,
|
|
@@ -32187,7 +32490,7 @@ function _instanceof$c(left, right) {
|
|
|
32187
32490
|
return left instanceof right;
|
|
32188
32491
|
}
|
|
32189
32492
|
}
|
|
32190
|
-
function _iterable_to_array_limit$
|
|
32493
|
+
function _iterable_to_array_limit$6(arr, i) {
|
|
32191
32494
|
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
32192
32495
|
if (_i == null) return;
|
|
32193
32496
|
var _arr = [];
|
|
@@ -32211,7 +32514,7 @@ function _iterable_to_array_limit$4(arr, i) {
|
|
|
32211
32514
|
}
|
|
32212
32515
|
return _arr;
|
|
32213
32516
|
}
|
|
32214
|
-
function _non_iterable_rest$
|
|
32517
|
+
function _non_iterable_rest$6() {
|
|
32215
32518
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
32216
32519
|
}
|
|
32217
32520
|
function _possible_constructor_return$6(self, call) {
|
|
@@ -32227,20 +32530,20 @@ function _set_prototype_of$6(o, p) {
|
|
|
32227
32530
|
};
|
|
32228
32531
|
return _set_prototype_of$6(o, p);
|
|
32229
32532
|
}
|
|
32230
|
-
function _sliced_to_array$
|
|
32231
|
-
return _array_with_holes$
|
|
32533
|
+
function _sliced_to_array$6(arr, i) {
|
|
32534
|
+
return _array_with_holes$6(arr) || _iterable_to_array_limit$6(arr, i) || _unsupported_iterable_to_array$a(arr, i) || _non_iterable_rest$6();
|
|
32232
32535
|
}
|
|
32233
32536
|
function _type_of$8(obj) {
|
|
32234
32537
|
"@swc/helpers - typeof";
|
|
32235
32538
|
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
32236
32539
|
}
|
|
32237
|
-
function _unsupported_iterable_to_array$
|
|
32540
|
+
function _unsupported_iterable_to_array$a(o, minLen) {
|
|
32238
32541
|
if (!o) return;
|
|
32239
|
-
if (typeof o === "string") return _array_like_to_array$
|
|
32542
|
+
if (typeof o === "string") return _array_like_to_array$a(o, minLen);
|
|
32240
32543
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
32241
32544
|
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
32242
32545
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
32243
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$
|
|
32546
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$a(o, minLen);
|
|
32244
32547
|
}
|
|
32245
32548
|
function _is_native_reflect_construct$6() {
|
|
32246
32549
|
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
@@ -34682,7 +34985,7 @@ for(var _i$1 = 0, _iter = [
|
|
|
34682
34985
|
"propertyName"
|
|
34683
34986
|
]
|
|
34684
34987
|
]; _i$1 < _iter.length; _i$1++){
|
|
34685
|
-
var _iter__i = _sliced_to_array$
|
|
34988
|
+
var _iter__i = _sliced_to_array$6(_iter[_i$1], 2), legacyName = _iter__i[0], name = _iter__i[1];
|
|
34686
34989
|
defaultTable[legacyName] = /*@__PURE__*/ createTokenType(noTokens, name);
|
|
34687
34990
|
}
|
|
34688
34991
|
function warnForPart(part, msg) {
|
|
@@ -34773,7 +35076,7 @@ function createTokenType(extra, tagStr) {
|
|
|
34773
35076
|
id: typeArray.length,
|
|
34774
35077
|
name: name1,
|
|
34775
35078
|
props: [
|
|
34776
|
-
styleTags(_define_property$
|
|
35079
|
+
styleTags(_define_property$4({}, name1, tags$1))
|
|
34777
35080
|
]
|
|
34778
35081
|
});
|
|
34779
35082
|
typeArray.push(type);
|
|
@@ -37118,8 +37421,7 @@ var LintState = /*#__PURE__*/ function() {
|
|
|
37118
37421
|
attributes: {
|
|
37119
37422
|
class: "cm-lintRange cm-lintRange-" + d.severity + (d.markClass ? " " + d.markClass : "")
|
|
37120
37423
|
},
|
|
37121
|
-
diagnostic: d
|
|
37122
|
-
inclusive: true
|
|
37424
|
+
diagnostic: d
|
|
37123
37425
|
}).range(d.from, d.to);
|
|
37124
37426
|
}), true);
|
|
37125
37427
|
return new LintState(ranges, panel, findDiagnostic(ranges));
|
|
@@ -37223,8 +37525,7 @@ var lintState = /*@__PURE__*/ StateField.define({
|
|
|
37223
37525
|
}
|
|
37224
37526
|
});
|
|
37225
37527
|
var activeMark = /*@__PURE__*/ Decoration.mark({
|
|
37226
|
-
class: "cm-lintRange cm-lintRange-active"
|
|
37227
|
-
inclusive: true
|
|
37528
|
+
class: "cm-lintRange cm-lintRange-active"
|
|
37228
37529
|
});
|
|
37229
37530
|
function lintTooltip(view, pos, side) {
|
|
37230
37531
|
var diagnostics = view.state.field(lintState).diagnostics;
|
|
@@ -38094,16 +38395,16 @@ the diagnostics.
|
|
|
38094
38395
|
];
|
|
38095
38396
|
}
|
|
38096
38397
|
|
|
38097
|
-
function _array_like_to_array$
|
|
38398
|
+
function _array_like_to_array$9(arr, len) {
|
|
38098
38399
|
if (len == null || len > arr.length) len = arr.length;
|
|
38099
38400
|
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
38100
38401
|
return arr2;
|
|
38101
38402
|
}
|
|
38102
|
-
function _array_with_holes$
|
|
38403
|
+
function _array_with_holes$5(arr) {
|
|
38103
38404
|
if (Array.isArray(arr)) return arr;
|
|
38104
38405
|
}
|
|
38105
38406
|
function _array_without_holes$6(arr) {
|
|
38106
|
-
if (Array.isArray(arr)) return _array_like_to_array$
|
|
38407
|
+
if (Array.isArray(arr)) return _array_like_to_array$9(arr);
|
|
38107
38408
|
}
|
|
38108
38409
|
function _assert_this_initialized$4(self) {
|
|
38109
38410
|
if (self === void 0) {
|
|
@@ -38159,7 +38460,7 @@ function _instanceof$a(left, right) {
|
|
|
38159
38460
|
function _iterable_to_array$6(iter) {
|
|
38160
38461
|
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
38161
38462
|
}
|
|
38162
|
-
function _iterable_to_array_limit$
|
|
38463
|
+
function _iterable_to_array_limit$5(arr, i) {
|
|
38163
38464
|
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
38164
38465
|
if (_i == null) return;
|
|
38165
38466
|
var _arr = [];
|
|
@@ -38183,7 +38484,7 @@ function _iterable_to_array_limit$3(arr, i) {
|
|
|
38183
38484
|
}
|
|
38184
38485
|
return _arr;
|
|
38185
38486
|
}
|
|
38186
|
-
function _non_iterable_rest$
|
|
38487
|
+
function _non_iterable_rest$5() {
|
|
38187
38488
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
38188
38489
|
}
|
|
38189
38490
|
function _non_iterable_spread$6() {
|
|
@@ -38202,23 +38503,23 @@ function _set_prototype_of$4(o, p) {
|
|
|
38202
38503
|
};
|
|
38203
38504
|
return _set_prototype_of$4(o, p);
|
|
38204
38505
|
}
|
|
38205
|
-
function _sliced_to_array$
|
|
38206
|
-
return _array_with_holes$
|
|
38506
|
+
function _sliced_to_array$5(arr, i) {
|
|
38507
|
+
return _array_with_holes$5(arr) || _iterable_to_array_limit$5(arr, i) || _unsupported_iterable_to_array$9(arr, i) || _non_iterable_rest$5();
|
|
38207
38508
|
}
|
|
38208
38509
|
function _to_consumable_array$6(arr) {
|
|
38209
|
-
return _array_without_holes$6(arr) || _iterable_to_array$6(arr) || _unsupported_iterable_to_array$
|
|
38510
|
+
return _array_without_holes$6(arr) || _iterable_to_array$6(arr) || _unsupported_iterable_to_array$9(arr) || _non_iterable_spread$6();
|
|
38210
38511
|
}
|
|
38211
38512
|
function _type_of$6(obj) {
|
|
38212
38513
|
"@swc/helpers - typeof";
|
|
38213
38514
|
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
38214
38515
|
}
|
|
38215
|
-
function _unsupported_iterable_to_array$
|
|
38516
|
+
function _unsupported_iterable_to_array$9(o, minLen) {
|
|
38216
38517
|
if (!o) return;
|
|
38217
|
-
if (typeof o === "string") return _array_like_to_array$
|
|
38518
|
+
if (typeof o === "string") return _array_like_to_array$9(o, minLen);
|
|
38218
38519
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
38219
38520
|
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
38220
38521
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
38221
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$
|
|
38522
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$9(o, minLen);
|
|
38222
38523
|
}
|
|
38223
38524
|
function _is_native_reflect_construct$4() {
|
|
38224
38525
|
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
@@ -39551,7 +39852,7 @@ var Parse = /*#__PURE__*/ function() {
|
|
|
39551
39852
|
// the history of reductions only being available in an
|
|
39552
39853
|
// expensive-to-access format in the stack buffers.)
|
|
39553
39854
|
if (this.bigReductionCount > 300 /* Rec.MaxLeftAssociativeReductionCount */ && stacks.length == 1) {
|
|
39554
|
-
var _stacks = _sliced_to_array$
|
|
39855
|
+
var _stacks = _sliced_to_array$5(stacks, 1), s = _stacks[0];
|
|
39555
39856
|
while(s.forceReduce() && s.stack.length && s.stack[s.stack.length - 2] >= this.lastBigReductionStart){}
|
|
39556
39857
|
this.bigReductionCount = this.lastBigReductionSize = 0;
|
|
39557
39858
|
}
|
|
@@ -40324,16 +40625,16 @@ JSON language support.
|
|
|
40324
40625
|
return new LanguageSupport(jsonLanguage);
|
|
40325
40626
|
}
|
|
40326
40627
|
|
|
40327
|
-
function _array_like_to_array$
|
|
40628
|
+
function _array_like_to_array$8(arr, len) {
|
|
40328
40629
|
if (len == null || len > arr.length) len = arr.length;
|
|
40329
40630
|
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
40330
40631
|
return arr2;
|
|
40331
40632
|
}
|
|
40332
|
-
function _array_with_holes$
|
|
40633
|
+
function _array_with_holes$4(arr) {
|
|
40333
40634
|
if (Array.isArray(arr)) return arr;
|
|
40334
40635
|
}
|
|
40335
40636
|
function _array_without_holes$5(arr) {
|
|
40336
|
-
if (Array.isArray(arr)) return _array_like_to_array$
|
|
40637
|
+
if (Array.isArray(arr)) return _array_like_to_array$8(arr);
|
|
40337
40638
|
}
|
|
40338
40639
|
function _assert_this_initialized$3(self) {
|
|
40339
40640
|
if (self === void 0) {
|
|
@@ -40382,7 +40683,7 @@ function _inherits$3(subClass, superClass) {
|
|
|
40382
40683
|
function _iterable_to_array$5(iter) {
|
|
40383
40684
|
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
40384
40685
|
}
|
|
40385
|
-
function _iterable_to_array_limit$
|
|
40686
|
+
function _iterable_to_array_limit$4(arr, i) {
|
|
40386
40687
|
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
40387
40688
|
if (_i == null) return;
|
|
40388
40689
|
var _arr = [];
|
|
@@ -40406,7 +40707,7 @@ function _iterable_to_array_limit$2(arr, i) {
|
|
|
40406
40707
|
}
|
|
40407
40708
|
return _arr;
|
|
40408
40709
|
}
|
|
40409
|
-
function _non_iterable_rest$
|
|
40710
|
+
function _non_iterable_rest$4() {
|
|
40410
40711
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
40411
40712
|
}
|
|
40412
40713
|
function _non_iterable_spread$5() {
|
|
@@ -40425,23 +40726,23 @@ function _set_prototype_of$3(o, p) {
|
|
|
40425
40726
|
};
|
|
40426
40727
|
return _set_prototype_of$3(o, p);
|
|
40427
40728
|
}
|
|
40428
|
-
function _sliced_to_array$
|
|
40429
|
-
return _array_with_holes$
|
|
40729
|
+
function _sliced_to_array$4(arr, i) {
|
|
40730
|
+
return _array_with_holes$4(arr) || _iterable_to_array_limit$4(arr, i) || _unsupported_iterable_to_array$8(arr, i) || _non_iterable_rest$4();
|
|
40430
40731
|
}
|
|
40431
40732
|
function _to_consumable_array$5(arr) {
|
|
40432
|
-
return _array_without_holes$5(arr) || _iterable_to_array$5(arr) || _unsupported_iterable_to_array$
|
|
40733
|
+
return _array_without_holes$5(arr) || _iterable_to_array$5(arr) || _unsupported_iterable_to_array$8(arr) || _non_iterable_spread$5();
|
|
40433
40734
|
}
|
|
40434
40735
|
function _type_of$5(obj) {
|
|
40435
40736
|
"@swc/helpers - typeof";
|
|
40436
40737
|
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
40437
40738
|
}
|
|
40438
|
-
function _unsupported_iterable_to_array$
|
|
40739
|
+
function _unsupported_iterable_to_array$8(o, minLen) {
|
|
40439
40740
|
if (!o) return;
|
|
40440
|
-
if (typeof o === "string") return _array_like_to_array$
|
|
40741
|
+
if (typeof o === "string") return _array_like_to_array$8(o, minLen);
|
|
40441
40742
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
40442
40743
|
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
40443
40744
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
40444
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$
|
|
40745
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$8(o, minLen);
|
|
40445
40746
|
}
|
|
40446
40747
|
function _is_native_reflect_construct$3() {
|
|
40447
40748
|
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
@@ -40835,7 +41136,7 @@ function createLineDialog(view) {
|
|
|
40835
41136
|
var match = /^([+-])?(\d+)?(:\d+)?(%)?$/.exec(input.value);
|
|
40836
41137
|
if (!match) return;
|
|
40837
41138
|
var state = view.state, startLine = state.doc.lineAt(state.selection.main.head);
|
|
40838
|
-
var _match = _sliced_to_array$
|
|
41139
|
+
var _match = _sliced_to_array$4(match, 5), sign = _match[1], ln = _match[2], cl = _match[3], percent = _match[4];
|
|
40839
41140
|
var col = cl ? +cl.slice(1) : 0;
|
|
40840
41141
|
var line = ln ? +ln : startLine.number;
|
|
40841
41142
|
if (ln && percent) {
|
|
@@ -41077,7 +41378,7 @@ function findNextOccurrence(state, query) {
|
|
|
41077
41378
|
var _loop = function(cycled1, cursor1) {
|
|
41078
41379
|
cursor1.next();
|
|
41079
41380
|
if (cursor1.done) {
|
|
41080
|
-
if (cycled1) return
|
|
41381
|
+
if (cycled1) return cycled = cycled1, cursor = cursor1, {
|
|
41081
41382
|
v: null
|
|
41082
41383
|
};
|
|
41083
41384
|
cursor1 = new SearchCursor(state.doc, query, 0, Math.max(0, ranges[ranges.length - 1].from - 1));
|
|
@@ -41085,16 +41386,16 @@ function findNextOccurrence(state, query) {
|
|
|
41085
41386
|
} else {
|
|
41086
41387
|
if (cycled1 && ranges.some(function(r) {
|
|
41087
41388
|
return r.from == cursor1.value.from;
|
|
41088
|
-
})) return
|
|
41389
|
+
})) return cycled = cycled1, cursor = cursor1, "continue";
|
|
41089
41390
|
if (fullWord) {
|
|
41090
41391
|
var word = state.wordAt(cursor1.value.from);
|
|
41091
|
-
if (!word || word.from != cursor1.value.from || word.to != cursor1.value.to) return
|
|
41392
|
+
if (!word || word.from != cursor1.value.from || word.to != cursor1.value.to) return cycled = cycled1, cursor = cursor1, "continue";
|
|
41092
41393
|
}
|
|
41093
|
-
return
|
|
41394
|
+
return cycled = cycled1, cursor = cursor1, {
|
|
41094
41395
|
v: cursor1.value
|
|
41095
41396
|
};
|
|
41096
41397
|
}
|
|
41097
|
-
|
|
41398
|
+
cycled = cycled1, cursor = cursor1;
|
|
41098
41399
|
};
|
|
41099
41400
|
var _state_selection = state.selection, main = _state_selection.main, ranges = _state_selection.ranges;
|
|
41100
41401
|
var word = state.wordAt(main.head), fullWord = word && word.from == main.from && word.to == main.to;
|
|
@@ -42012,16 +42313,16 @@ var searchExtensions = [
|
|
|
42012
42313
|
baseTheme$2
|
|
42013
42314
|
];
|
|
42014
42315
|
|
|
42015
|
-
function _array_like_to_array$
|
|
42316
|
+
function _array_like_to_array$7(arr, len) {
|
|
42016
42317
|
if (len == null || len > arr.length) len = arr.length;
|
|
42017
42318
|
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
42018
42319
|
return arr2;
|
|
42019
42320
|
}
|
|
42020
|
-
function _array_with_holes$
|
|
42321
|
+
function _array_with_holes$3(arr) {
|
|
42021
42322
|
if (Array.isArray(arr)) return arr;
|
|
42022
42323
|
}
|
|
42023
42324
|
function _array_without_holes$4(arr) {
|
|
42024
|
-
if (Array.isArray(arr)) return _array_like_to_array$
|
|
42325
|
+
if (Array.isArray(arr)) return _array_like_to_array$7(arr);
|
|
42025
42326
|
}
|
|
42026
42327
|
function _assert_this_initialized$2(self) {
|
|
42027
42328
|
if (self === void 0) {
|
|
@@ -42077,7 +42378,7 @@ function _instanceof$9(left, right) {
|
|
|
42077
42378
|
function _iterable_to_array$4(iter) {
|
|
42078
42379
|
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
42079
42380
|
}
|
|
42080
|
-
function _iterable_to_array_limit$
|
|
42381
|
+
function _iterable_to_array_limit$3(arr, i) {
|
|
42081
42382
|
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
42082
42383
|
if (_i == null) return;
|
|
42083
42384
|
var _arr = [];
|
|
@@ -42101,7 +42402,7 @@ function _iterable_to_array_limit$1(arr, i) {
|
|
|
42101
42402
|
}
|
|
42102
42403
|
return _arr;
|
|
42103
42404
|
}
|
|
42104
|
-
function _non_iterable_rest$
|
|
42405
|
+
function _non_iterable_rest$3() {
|
|
42105
42406
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
42106
42407
|
}
|
|
42107
42408
|
function _non_iterable_spread$4() {
|
|
@@ -42120,23 +42421,23 @@ function _set_prototype_of$2(o, p) {
|
|
|
42120
42421
|
};
|
|
42121
42422
|
return _set_prototype_of$2(o, p);
|
|
42122
42423
|
}
|
|
42123
|
-
function _sliced_to_array$
|
|
42124
|
-
return _array_with_holes$
|
|
42424
|
+
function _sliced_to_array$3(arr, i) {
|
|
42425
|
+
return _array_with_holes$3(arr) || _iterable_to_array_limit$3(arr, i) || _unsupported_iterable_to_array$7(arr, i) || _non_iterable_rest$3();
|
|
42125
42426
|
}
|
|
42126
42427
|
function _to_consumable_array$4(arr) {
|
|
42127
|
-
return _array_without_holes$4(arr) || _iterable_to_array$4(arr) || _unsupported_iterable_to_array$
|
|
42428
|
+
return _array_without_holes$4(arr) || _iterable_to_array$4(arr) || _unsupported_iterable_to_array$7(arr) || _non_iterable_spread$4();
|
|
42128
42429
|
}
|
|
42129
42430
|
function _type_of$4(obj) {
|
|
42130
42431
|
"@swc/helpers - typeof";
|
|
42131
42432
|
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
42132
42433
|
}
|
|
42133
|
-
function _unsupported_iterable_to_array$
|
|
42434
|
+
function _unsupported_iterable_to_array$7(o, minLen) {
|
|
42134
42435
|
if (!o) return;
|
|
42135
|
-
if (typeof o === "string") return _array_like_to_array$
|
|
42436
|
+
if (typeof o === "string") return _array_like_to_array$7(o, minLen);
|
|
42136
42437
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
42137
42438
|
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
42138
42439
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
42139
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$
|
|
42440
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$7(o, minLen);
|
|
42140
42441
|
}
|
|
42141
42442
|
function _is_native_reflect_construct$2() {
|
|
42142
42443
|
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
@@ -42174,11 +42475,18 @@ An instance of this is passed to completion source functions.
|
|
|
42174
42475
|
implicitly by typing. The usual way to respond to this is to
|
|
42175
42476
|
only return completions when either there is part of a
|
|
42176
42477
|
completable entity before the cursor, or `explicit` is true.
|
|
42177
|
-
*/ explicit
|
|
42478
|
+
*/ explicit, /**
|
|
42479
|
+
The editor view. May be undefined if the context was created
|
|
42480
|
+
in a situation where there is no such view available, such as
|
|
42481
|
+
in synchronous updates via
|
|
42482
|
+
[`CompletionResult.update`](https://codemirror.net/6/docs/ref/#autocomplete.CompletionResult.update)
|
|
42483
|
+
or when called by test code.
|
|
42484
|
+
*/ view) {
|
|
42178
42485
|
_class_call_check$6(this, CompletionContext);
|
|
42179
42486
|
this.state = state;
|
|
42180
42487
|
this.pos = pos;
|
|
42181
42488
|
this.explicit = explicit;
|
|
42489
|
+
this.view = view;
|
|
42182
42490
|
/**
|
|
42183
42491
|
@internal
|
|
42184
42492
|
*/ this.abortListeners = [];
|
|
@@ -42283,7 +42591,7 @@ completes them.
|
|
|
42283
42591
|
label: o
|
|
42284
42592
|
} : o;
|
|
42285
42593
|
});
|
|
42286
|
-
var _ref = _sliced_to_array$
|
|
42594
|
+
var _ref = _sliced_to_array$3(options.every(function(o) {
|
|
42287
42595
|
return /^\w+$/.test(o.label);
|
|
42288
42596
|
}) ? [
|
|
42289
42597
|
/\w*$/,
|
|
@@ -43320,7 +43628,7 @@ var CompletionState = /*#__PURE__*/ function() {
|
|
|
43320
43628
|
{
|
|
43321
43629
|
key: "attrs",
|
|
43322
43630
|
get: function get() {
|
|
43323
|
-
return this.open ? this.open.attrs : baseAttrs;
|
|
43631
|
+
return this.open ? this.open.attrs : this.active.length ? baseAttrs : noAttrs;
|
|
43324
43632
|
}
|
|
43325
43633
|
}
|
|
43326
43634
|
], [
|
|
@@ -43346,6 +43654,7 @@ function sameResults(a, b) {
|
|
|
43346
43654
|
var baseAttrs = {
|
|
43347
43655
|
"aria-autocomplete": "list"
|
|
43348
43656
|
};
|
|
43657
|
+
var noAttrs = {};
|
|
43349
43658
|
function makeAttrs(id, selected) {
|
|
43350
43659
|
var result = {
|
|
43351
43660
|
"aria-autocomplete": "list",
|
|
@@ -43356,12 +43665,13 @@ function makeAttrs(id, selected) {
|
|
|
43356
43665
|
return result;
|
|
43357
43666
|
}
|
|
43358
43667
|
var none = [];
|
|
43359
|
-
function
|
|
43668
|
+
function getUpdateType(tr, conf) {
|
|
43360
43669
|
if (tr.isUserEvent("input.complete")) {
|
|
43361
43670
|
var completion = tr.annotation(pickedCompletion);
|
|
43362
|
-
if (completion && conf.activateOnCompletion(completion)) return
|
|
43671
|
+
if (completion && conf.activateOnCompletion(completion)) return 4 /* UpdateType.Activate */ | 8 /* UpdateType.Reset */ ;
|
|
43363
43672
|
}
|
|
43364
|
-
|
|
43673
|
+
var typing = tr.isUserEvent("input.type");
|
|
43674
|
+
return typing && conf.activateOnTyping ? 4 /* UpdateType.Activate */ | 1 /* UpdateType.Typing */ : typing ? 1 /* UpdateType.Typing */ : tr.isUserEvent("delete.backward") ? 2 /* UpdateType.Backspacing */ : tr.selection ? 8 /* UpdateType.Reset */ : tr.docChanged ? 16 /* UpdateType.ResetIfTouching */ : 0 /* UpdateType.None */ ;
|
|
43365
43675
|
}
|
|
43366
43676
|
var ActiveSource = /*#__PURE__*/ function() {
|
|
43367
43677
|
function ActiveSource(source, state) {
|
|
@@ -43381,10 +43691,10 @@ var ActiveSource = /*#__PURE__*/ function() {
|
|
|
43381
43691
|
{
|
|
43382
43692
|
key: "update",
|
|
43383
43693
|
value: function update(tr, conf) {
|
|
43384
|
-
var
|
|
43385
|
-
if (
|
|
43386
|
-
|
|
43387
|
-
|
|
43694
|
+
var type = getUpdateType(tr, conf), value = this;
|
|
43695
|
+
if (type & 8 /* UpdateType.Reset */ || type & 16 /* UpdateType.ResetIfTouching */ && this.touches(tr)) value = new ActiveSource(value.source, 0 /* State.Inactive */ );
|
|
43696
|
+
if (type & 4 /* UpdateType.Activate */ && value.state == 0 /* State.Inactive */ ) value = new ActiveSource(this.source, 1 /* State.Pending */ );
|
|
43697
|
+
value = value.updateFor(tr, type);
|
|
43388
43698
|
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
43389
43699
|
try {
|
|
43390
43700
|
for(var _iterator = tr.effects[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
|
|
@@ -43432,15 +43742,9 @@ var ActiveSource = /*#__PURE__*/ function() {
|
|
|
43432
43742
|
}
|
|
43433
43743
|
},
|
|
43434
43744
|
{
|
|
43435
|
-
key: "
|
|
43436
|
-
value: function
|
|
43437
|
-
return
|
|
43438
|
-
}
|
|
43439
|
-
},
|
|
43440
|
-
{
|
|
43441
|
-
key: "handleChange",
|
|
43442
|
-
value: function handleChange(tr) {
|
|
43443
|
-
return tr.changes.touchesRange(cur(tr.startState)) ? new ActiveSource(this.source, 0 /* State.Inactive */ ) : this.map(tr.changes);
|
|
43745
|
+
key: "updateFor",
|
|
43746
|
+
value: function updateFor(tr, type) {
|
|
43747
|
+
return this.map(tr.changes);
|
|
43444
43748
|
}
|
|
43445
43749
|
},
|
|
43446
43750
|
{
|
|
@@ -43448,6 +43752,12 @@ var ActiveSource = /*#__PURE__*/ function() {
|
|
|
43448
43752
|
value: function map(changes) {
|
|
43449
43753
|
return changes.empty || this.explicitPos < 0 ? this : new ActiveSource(this.source, this.state, changes.mapPos(this.explicitPos));
|
|
43450
43754
|
}
|
|
43755
|
+
},
|
|
43756
|
+
{
|
|
43757
|
+
key: "touches",
|
|
43758
|
+
value: function touches(tr) {
|
|
43759
|
+
return tr.changes.touchesRange(cur(tr.state));
|
|
43760
|
+
}
|
|
43451
43761
|
}
|
|
43452
43762
|
]);
|
|
43453
43763
|
return ActiveSource;
|
|
@@ -43472,26 +43782,21 @@ var ActiveResult = /*#__PURE__*/ function(ActiveSource1) {
|
|
|
43472
43782
|
}
|
|
43473
43783
|
},
|
|
43474
43784
|
{
|
|
43475
|
-
key: "
|
|
43476
|
-
value: function
|
|
43785
|
+
key: "updateFor",
|
|
43786
|
+
value: function updateFor(tr, type) {
|
|
43477
43787
|
var _a;
|
|
43788
|
+
if (!(type & 3 /* UpdateType.SimpleInteraction */ )) return this.map(tr.changes);
|
|
43478
43789
|
var result = this.result;
|
|
43479
43790
|
if (result.map && !tr.changes.empty) result = result.map(result, tr.changes);
|
|
43480
43791
|
var from = tr.changes.mapPos(this.from), to = tr.changes.mapPos(this.to, 1);
|
|
43481
43792
|
var pos = cur(tr.state);
|
|
43482
|
-
if ((this.explicitPos < 0 ? pos <= from : pos < this.from) || pos > to || !result || type
|
|
43793
|
+
if ((this.explicitPos < 0 ? pos <= from : pos < this.from) || pos > to || !result || type & 2 /* UpdateType.Backspacing */ && cur(tr.startState) == this.from) return new ActiveSource(this.source, type & 4 /* UpdateType.Activate */ ? 1 /* State.Pending */ : 0 /* State.Inactive */ );
|
|
43483
43794
|
var explicitPos = this.explicitPos < 0 ? -1 : tr.changes.mapPos(this.explicitPos);
|
|
43484
43795
|
if (checkValid(result.validFor, tr.state, from, to)) return new ActiveResult(this.source, explicitPos, result, from, to);
|
|
43485
43796
|
if (result.update && (result = result.update(result, from, to, new CompletionContext(tr.state, pos, explicitPos >= 0)))) return new ActiveResult(this.source, explicitPos, result, result.from, (_a = result.to) !== null && _a !== void 0 ? _a : cur(tr.state));
|
|
43486
43797
|
return new ActiveSource(this.source, 1 /* State.Pending */ , explicitPos);
|
|
43487
43798
|
}
|
|
43488
43799
|
},
|
|
43489
|
-
{
|
|
43490
|
-
key: "handleChange",
|
|
43491
|
-
value: function handleChange(tr) {
|
|
43492
|
-
return tr.changes.touchesRange(this.from, this.to) ? new ActiveSource(this.source, 0 /* State.Inactive */ ) : this.map(tr.changes);
|
|
43493
|
-
}
|
|
43494
|
-
},
|
|
43495
43800
|
{
|
|
43496
43801
|
key: "map",
|
|
43497
43802
|
value: function map(mapping) {
|
|
@@ -43500,6 +43805,12 @@ var ActiveResult = /*#__PURE__*/ function(ActiveSource1) {
|
|
|
43500
43805
|
if (!result) return new ActiveSource(this.source, 0 /* State.Inactive */ );
|
|
43501
43806
|
return new ActiveResult(this.source, this.explicitPos < 0 ? -1 : mapping.mapPos(this.explicitPos), this.result, mapping.mapPos(this.from), mapping.mapPos(this.to, 1));
|
|
43502
43807
|
}
|
|
43808
|
+
},
|
|
43809
|
+
{
|
|
43810
|
+
key: "touches",
|
|
43811
|
+
value: function touches(tr) {
|
|
43812
|
+
return tr.changes.touchesRange(this.from, this.to);
|
|
43813
|
+
}
|
|
43503
43814
|
}
|
|
43504
43815
|
]);
|
|
43505
43816
|
return ActiveResult;
|
|
@@ -43647,7 +43958,8 @@ var completionPlugin = /*@__PURE__*/ ViewPlugin.fromClass(/*#__PURE__*/ function
|
|
|
43647
43958
|
var conf = update.state.facet(completionConfig);
|
|
43648
43959
|
if (!update.selectionSet && !update.docChanged && update.startState.field(completionState) == cState) return;
|
|
43649
43960
|
var doesReset = update.transactions.some(function(tr) {
|
|
43650
|
-
|
|
43961
|
+
var type = getUpdateType(tr, conf);
|
|
43962
|
+
return type & 8 /* UpdateType.Reset */ || (tr.selection || tr.docChanged) && !(type & 3 /* UpdateType.SimpleInteraction */ );
|
|
43651
43963
|
});
|
|
43652
43964
|
for(var i = 0; i < this.running.length; i++){
|
|
43653
43965
|
var query = this.running[i];
|
|
@@ -43701,7 +44013,7 @@ var completionPlugin = /*@__PURE__*/ ViewPlugin.fromClass(/*#__PURE__*/ function
|
|
|
43701
44013
|
if (this.composing != 0 /* CompositionState.None */ ) try {
|
|
43702
44014
|
for(var _iterator1 = update.transactions[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true){
|
|
43703
44015
|
var tr = _step1.value;
|
|
43704
|
-
if (
|
|
44016
|
+
if (tr.isUserEvent("input.type")) this.composing = 2 /* CompositionState.Changed */ ;
|
|
43705
44017
|
else if (this.composing == 2 /* CompositionState.Changed */ && tr.selection) this.composing = 3 /* CompositionState.ChangedAndMoved */ ;
|
|
43706
44018
|
}
|
|
43707
44019
|
} catch (err) {
|
|
@@ -43756,7 +44068,7 @@ var completionPlugin = /*@__PURE__*/ ViewPlugin.fromClass(/*#__PURE__*/ function
|
|
|
43756
44068
|
value: function startQuery(active) {
|
|
43757
44069
|
var _this = this;
|
|
43758
44070
|
var state = this.view.state, pos = cur(state);
|
|
43759
|
-
var context = new CompletionContext(state, pos, active.explicitPos == pos);
|
|
44071
|
+
var context = new CompletionContext(state, pos, active.explicitPos == pos, this.view);
|
|
43760
44072
|
var pending = new RunningQuery(active, context);
|
|
43761
44073
|
this.running.push(pending);
|
|
43762
44074
|
Promise.resolve(active.source(context)).then(function(result) {
|
|
@@ -44601,6 +44913,7 @@ function _create_class$2(Constructor, protoProps, staticProps) {
|
|
|
44601
44913
|
loop: for(var i = 0; i < str.length; i++){
|
|
44602
44914
|
switch(str[i]){
|
|
44603
44915
|
case " ":
|
|
44916
|
+
case "\xa0":
|
|
44604
44917
|
{
|
|
44605
44918
|
col += 1;
|
|
44606
44919
|
continue loop;
|
|
@@ -45370,6 +45683,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
45370
45683
|
value: true
|
|
45371
45684
|
});
|
|
45372
45685
|
exports.regexpCode = exports.getEsmExportName = exports.getProperty = exports.safeStringify = exports.stringify = exports.strConcat = exports.addCodeArg = exports.str = exports._ = exports.nil = exports._Code = exports.Name = exports.IDENTIFIER = exports._CodeOrName = void 0;
|
|
45686
|
+
// eslint-disable-next-line @typescript-eslint/no-extraneous-class
|
|
45373
45687
|
var _CodeOrName = function _CodeOrName() {
|
|
45374
45688
|
_class_call_check(this, _CodeOrName);
|
|
45375
45689
|
};
|
|
@@ -47597,7 +47911,7 @@ function par(x) {
|
|
|
47597
47911
|
|
|
47598
47912
|
var util = {};
|
|
47599
47913
|
|
|
47600
|
-
function _define_property$
|
|
47914
|
+
function _define_property$3(obj, key, value) {
|
|
47601
47915
|
if (key in obj) {
|
|
47602
47916
|
Object.defineProperty(obj, key, {
|
|
47603
47917
|
value: value,
|
|
@@ -47617,7 +47931,7 @@ function _instanceof$8(left, right) {
|
|
|
47617
47931
|
return left instanceof right;
|
|
47618
47932
|
}
|
|
47619
47933
|
}
|
|
47620
|
-
function _object_spread$
|
|
47934
|
+
function _object_spread$3(target) {
|
|
47621
47935
|
for(var i = 1; i < arguments.length; i++){
|
|
47622
47936
|
var source = arguments[i] != null ? arguments[i] : {};
|
|
47623
47937
|
var ownKeys = Object.keys(source);
|
|
@@ -47627,7 +47941,7 @@ function _object_spread$2(target) {
|
|
|
47627
47941
|
}));
|
|
47628
47942
|
}
|
|
47629
47943
|
ownKeys.forEach(function(key) {
|
|
47630
|
-
_define_property$
|
|
47944
|
+
_define_property$3(target, key, source[key]);
|
|
47631
47945
|
});
|
|
47632
47946
|
}
|
|
47633
47947
|
return target;
|
|
@@ -47981,7 +48295,7 @@ util.mergeEvaluated = {
|
|
|
47981
48295
|
});
|
|
47982
48296
|
},
|
|
47983
48297
|
mergeValues: function(from, to) {
|
|
47984
|
-
return from === true ? true : _object_spread$
|
|
48298
|
+
return from === true ? true : _object_spread$3({}, from, to);
|
|
47985
48299
|
},
|
|
47986
48300
|
resultToName: evaluatedPropsToName
|
|
47987
48301
|
}),
|
|
@@ -48610,7 +48924,7 @@ var dataType = {};
|
|
|
48610
48924
|
|
|
48611
48925
|
var rules = {};
|
|
48612
48926
|
|
|
48613
|
-
function _define_property$
|
|
48927
|
+
function _define_property$2(obj, key, value) {
|
|
48614
48928
|
if (key in obj) {
|
|
48615
48929
|
Object.defineProperty(obj, key, {
|
|
48616
48930
|
value: value,
|
|
@@ -48623,7 +48937,7 @@ function _define_property$1(obj, key, value) {
|
|
|
48623
48937
|
}
|
|
48624
48938
|
return obj;
|
|
48625
48939
|
}
|
|
48626
|
-
function _object_spread$
|
|
48940
|
+
function _object_spread$2(target) {
|
|
48627
48941
|
for(var i = 1; i < arguments.length; i++){
|
|
48628
48942
|
var source = arguments[i] != null ? arguments[i] : {};
|
|
48629
48943
|
var ownKeys = Object.keys(source);
|
|
@@ -48633,12 +48947,12 @@ function _object_spread$1(target) {
|
|
|
48633
48947
|
}));
|
|
48634
48948
|
}
|
|
48635
48949
|
ownKeys.forEach(function(key) {
|
|
48636
|
-
_define_property$
|
|
48950
|
+
_define_property$2(target, key, source[key]);
|
|
48637
48951
|
});
|
|
48638
48952
|
}
|
|
48639
48953
|
return target;
|
|
48640
48954
|
}
|
|
48641
|
-
function ownKeys$
|
|
48955
|
+
function ownKeys$2(object, enumerableOnly) {
|
|
48642
48956
|
var keys = Object.keys(object);
|
|
48643
48957
|
if (Object.getOwnPropertySymbols) {
|
|
48644
48958
|
var symbols = Object.getOwnPropertySymbols(object);
|
|
@@ -48651,12 +48965,12 @@ function ownKeys$1(object, enumerableOnly) {
|
|
|
48651
48965
|
}
|
|
48652
48966
|
return keys;
|
|
48653
48967
|
}
|
|
48654
|
-
function _object_spread_props$
|
|
48968
|
+
function _object_spread_props$2(target, source) {
|
|
48655
48969
|
source = source != null ? source : {};
|
|
48656
48970
|
if (Object.getOwnPropertyDescriptors) {
|
|
48657
48971
|
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
48658
48972
|
} else {
|
|
48659
|
-
ownKeys$
|
|
48973
|
+
ownKeys$2(Object(source)).forEach(function(key) {
|
|
48660
48974
|
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
48661
48975
|
});
|
|
48662
48976
|
}
|
|
@@ -48700,7 +49014,7 @@ function getRules() {
|
|
|
48700
49014
|
}
|
|
48701
49015
|
};
|
|
48702
49016
|
return {
|
|
48703
|
-
types: _object_spread_props$
|
|
49017
|
+
types: _object_spread_props$2(_object_spread$2({}, groups), {
|
|
48704
49018
|
integer: true,
|
|
48705
49019
|
boolean: true,
|
|
48706
49020
|
null: true
|
|
@@ -49427,13 +49741,13 @@ var keyword = {};
|
|
|
49427
49741
|
|
|
49428
49742
|
var code = {};
|
|
49429
49743
|
|
|
49430
|
-
function _array_like_to_array$
|
|
49744
|
+
function _array_like_to_array$6(arr, len) {
|
|
49431
49745
|
if (len == null || len > arr.length) len = arr.length;
|
|
49432
49746
|
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
49433
49747
|
return arr2;
|
|
49434
49748
|
}
|
|
49435
49749
|
function _array_without_holes$3(arr) {
|
|
49436
|
-
if (Array.isArray(arr)) return _array_like_to_array$
|
|
49750
|
+
if (Array.isArray(arr)) return _array_like_to_array$6(arr);
|
|
49437
49751
|
}
|
|
49438
49752
|
function _iterable_to_array$3(iter) {
|
|
49439
49753
|
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
@@ -49452,15 +49766,15 @@ function _tagged_template_literal$q(strings, raw) {
|
|
|
49452
49766
|
}));
|
|
49453
49767
|
}
|
|
49454
49768
|
function _to_consumable_array$3(arr) {
|
|
49455
|
-
return _array_without_holes$3(arr) || _iterable_to_array$3(arr) || _unsupported_iterable_to_array$
|
|
49769
|
+
return _array_without_holes$3(arr) || _iterable_to_array$3(arr) || _unsupported_iterable_to_array$6(arr) || _non_iterable_spread$3();
|
|
49456
49770
|
}
|
|
49457
|
-
function _unsupported_iterable_to_array$
|
|
49771
|
+
function _unsupported_iterable_to_array$6(o, minLen) {
|
|
49458
49772
|
if (!o) return;
|
|
49459
|
-
if (typeof o === "string") return _array_like_to_array$
|
|
49773
|
+
if (typeof o === "string") return _array_like_to_array$6(o, minLen);
|
|
49460
49774
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
49461
49775
|
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
49462
49776
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
49463
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$
|
|
49777
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$6(o, minLen);
|
|
49464
49778
|
}
|
|
49465
49779
|
function _templateObject$q() {
|
|
49466
49780
|
var data = _tagged_template_literal$q([
|
|
@@ -50053,13 +50367,13 @@ keyword.validateKeywordUsage = validateKeywordUsage;
|
|
|
50053
50367
|
|
|
50054
50368
|
var subschema = {};
|
|
50055
50369
|
|
|
50056
|
-
function _array_like_to_array$
|
|
50370
|
+
function _array_like_to_array$5(arr, len) {
|
|
50057
50371
|
if (len == null || len > arr.length) len = arr.length;
|
|
50058
50372
|
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
50059
50373
|
return arr2;
|
|
50060
50374
|
}
|
|
50061
50375
|
function _array_without_holes$2(arr) {
|
|
50062
|
-
if (Array.isArray(arr)) return _array_like_to_array$
|
|
50376
|
+
if (Array.isArray(arr)) return _array_like_to_array$5(arr);
|
|
50063
50377
|
}
|
|
50064
50378
|
function _instanceof$7(left, right) {
|
|
50065
50379
|
if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
|
|
@@ -50085,15 +50399,15 @@ function _tagged_template_literal$o(strings, raw) {
|
|
|
50085
50399
|
}));
|
|
50086
50400
|
}
|
|
50087
50401
|
function _to_consumable_array$2(arr) {
|
|
50088
|
-
return _array_without_holes$2(arr) || _iterable_to_array$2(arr) || _unsupported_iterable_to_array$
|
|
50402
|
+
return _array_without_holes$2(arr) || _iterable_to_array$2(arr) || _unsupported_iterable_to_array$5(arr) || _non_iterable_spread$2();
|
|
50089
50403
|
}
|
|
50090
|
-
function _unsupported_iterable_to_array$
|
|
50404
|
+
function _unsupported_iterable_to_array$5(o, minLen) {
|
|
50091
50405
|
if (!o) return;
|
|
50092
|
-
if (typeof o === "string") return _array_like_to_array$
|
|
50406
|
+
if (typeof o === "string") return _array_like_to_array$5(o, minLen);
|
|
50093
50407
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
50094
50408
|
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
50095
50409
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
50096
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$
|
|
50410
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$5(o, minLen);
|
|
50097
50411
|
}
|
|
50098
50412
|
function _templateObject$o() {
|
|
50099
50413
|
var data = _tagged_template_literal$o([
|
|
@@ -50232,7 +50546,7 @@ function extendSubschemaMode(subschema, param) {
|
|
|
50232
50546
|
}
|
|
50233
50547
|
subschema.extendSubschemaMode = extendSubschemaMode;
|
|
50234
50548
|
|
|
50235
|
-
var resolve$
|
|
50549
|
+
var resolve$2 = {};
|
|
50236
50550
|
|
|
50237
50551
|
// do not edit .js files directly - edit src/index.jst
|
|
50238
50552
|
var fastDeepEqual = function equal(a, b) {
|
|
@@ -50346,12 +50660,12 @@ function escapeJsonPtr(str) {
|
|
|
50346
50660
|
return str.replace(/~/g, "~0").replace(/\//g, "~1");
|
|
50347
50661
|
}
|
|
50348
50662
|
|
|
50349
|
-
Object.defineProperty(resolve$
|
|
50663
|
+
Object.defineProperty(resolve$2, "__esModule", {
|
|
50350
50664
|
value: true
|
|
50351
50665
|
});
|
|
50352
|
-
resolve$
|
|
50666
|
+
resolve$2.getSchemaRefs = resolve$2.resolveUrl = resolve$2.normalizeId = resolve$2._getFullPath = resolve$2.getFullPath = resolve$2.inlineRef = void 0;
|
|
50353
50667
|
var util_1$m = util;
|
|
50354
|
-
var equal$
|
|
50668
|
+
var equal$3 = fastDeepEqual;
|
|
50355
50669
|
var traverse = jsonSchemaTraverse.exports;
|
|
50356
50670
|
// TODO refactor to use keyword definitions
|
|
50357
50671
|
var SIMPLE_INLINED = new Set([
|
|
@@ -50379,7 +50693,7 @@ function inlineRef(schema) {
|
|
|
50379
50693
|
if (!limit) return false;
|
|
50380
50694
|
return countKeys(schema) <= limit;
|
|
50381
50695
|
}
|
|
50382
|
-
resolve$
|
|
50696
|
+
resolve$2.inlineRef = inlineRef;
|
|
50383
50697
|
var REF_KEYWORDS = new Set([
|
|
50384
50698
|
"$ref",
|
|
50385
50699
|
"$recursiveRef",
|
|
@@ -50417,22 +50731,22 @@ function getFullPath(resolver) {
|
|
|
50417
50731
|
var p = resolver.parse(id);
|
|
50418
50732
|
return _getFullPath(resolver, p);
|
|
50419
50733
|
}
|
|
50420
|
-
resolve$
|
|
50734
|
+
resolve$2.getFullPath = getFullPath;
|
|
50421
50735
|
function _getFullPath(resolver, p) {
|
|
50422
50736
|
var serialized = resolver.serialize(p);
|
|
50423
50737
|
return serialized.split("#")[0] + "#";
|
|
50424
50738
|
}
|
|
50425
|
-
resolve$
|
|
50739
|
+
resolve$2._getFullPath = _getFullPath;
|
|
50426
50740
|
var TRAILING_SLASH_HASH = /#\/?$/;
|
|
50427
50741
|
function normalizeId(id) {
|
|
50428
50742
|
return id ? id.replace(TRAILING_SLASH_HASH, "") : "";
|
|
50429
50743
|
}
|
|
50430
|
-
resolve$
|
|
50744
|
+
resolve$2.normalizeId = normalizeId;
|
|
50431
50745
|
function resolveUrl(resolver, baseId, id) {
|
|
50432
50746
|
id = normalizeId(id);
|
|
50433
50747
|
return resolver.resolve(baseId, id);
|
|
50434
50748
|
}
|
|
50435
|
-
resolve$
|
|
50749
|
+
resolve$2.resolveUrl = resolveUrl;
|
|
50436
50750
|
var ANCHOR = /^[a-z_][-a-z0-9._]*$/i;
|
|
50437
50751
|
function getSchemaRefs(schema, baseId) {
|
|
50438
50752
|
var _this = this;
|
|
@@ -50484,13 +50798,13 @@ function getSchemaRefs(schema, baseId) {
|
|
|
50484
50798
|
});
|
|
50485
50799
|
return localRefs;
|
|
50486
50800
|
function checkAmbiguosRef(sch1, sch2, ref) {
|
|
50487
|
-
if (sch2 !== undefined && !equal$
|
|
50801
|
+
if (sch2 !== undefined && !equal$3(sch1, sch2)) throw ambiguos(ref);
|
|
50488
50802
|
}
|
|
50489
50803
|
function ambiguos(ref) {
|
|
50490
50804
|
return new Error('reference "'.concat(ref, '" resolves to more than one schema'));
|
|
50491
50805
|
}
|
|
50492
50806
|
}
|
|
50493
|
-
resolve$
|
|
50807
|
+
resolve$2.getSchemaRefs = getSchemaRefs;
|
|
50494
50808
|
|
|
50495
50809
|
function _class_call_check$3(instance, Constructor) {
|
|
50496
50810
|
if (!(instance instanceof Constructor)) {
|
|
@@ -50511,7 +50825,7 @@ function _create_class(Constructor, protoProps, staticProps) {
|
|
|
50511
50825
|
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
50512
50826
|
return Constructor;
|
|
50513
50827
|
}
|
|
50514
|
-
function _define_property(obj, key, value) {
|
|
50828
|
+
function _define_property$1(obj, key, value) {
|
|
50515
50829
|
if (key in obj) {
|
|
50516
50830
|
Object.defineProperty(obj, key, {
|
|
50517
50831
|
value: value,
|
|
@@ -50531,7 +50845,7 @@ function _instanceof$6(left, right) {
|
|
|
50531
50845
|
return left instanceof right;
|
|
50532
50846
|
}
|
|
50533
50847
|
}
|
|
50534
|
-
function _object_spread(target) {
|
|
50848
|
+
function _object_spread$1(target) {
|
|
50535
50849
|
for(var i = 1; i < arguments.length; i++){
|
|
50536
50850
|
var source = arguments[i] != null ? arguments[i] : {};
|
|
50537
50851
|
var ownKeys = Object.keys(source);
|
|
@@ -50541,12 +50855,12 @@ function _object_spread(target) {
|
|
|
50541
50855
|
}));
|
|
50542
50856
|
}
|
|
50543
50857
|
ownKeys.forEach(function(key) {
|
|
50544
|
-
_define_property(target, key, source[key]);
|
|
50858
|
+
_define_property$1(target, key, source[key]);
|
|
50545
50859
|
});
|
|
50546
50860
|
}
|
|
50547
50861
|
return target;
|
|
50548
50862
|
}
|
|
50549
|
-
function ownKeys(object, enumerableOnly) {
|
|
50863
|
+
function ownKeys$1(object, enumerableOnly) {
|
|
50550
50864
|
var keys = Object.keys(object);
|
|
50551
50865
|
if (Object.getOwnPropertySymbols) {
|
|
50552
50866
|
var symbols = Object.getOwnPropertySymbols(object);
|
|
@@ -50559,12 +50873,12 @@ function ownKeys(object, enumerableOnly) {
|
|
|
50559
50873
|
}
|
|
50560
50874
|
return keys;
|
|
50561
50875
|
}
|
|
50562
|
-
function _object_spread_props(target, source) {
|
|
50876
|
+
function _object_spread_props$1(target, source) {
|
|
50563
50877
|
source = source != null ? source : {};
|
|
50564
50878
|
if (Object.getOwnPropertyDescriptors) {
|
|
50565
50879
|
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
50566
50880
|
} else {
|
|
50567
|
-
ownKeys(Object(source)).forEach(function(key) {
|
|
50881
|
+
ownKeys$1(Object(source)).forEach(function(key) {
|
|
50568
50882
|
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
50569
50883
|
});
|
|
50570
50884
|
}
|
|
@@ -51000,7 +51314,7 @@ var keyword_1 = keyword;
|
|
|
51000
51314
|
var subschema_1 = subschema;
|
|
51001
51315
|
var codegen_1$n = codegen;
|
|
51002
51316
|
var names_1$3 = names$1;
|
|
51003
|
-
var resolve_1$2 = resolve$
|
|
51317
|
+
var resolve_1$2 = resolve$2;
|
|
51004
51318
|
var util_1$l = util;
|
|
51005
51319
|
var errors_1 = errors;
|
|
51006
51320
|
// schema compilation - generates validation function, subschemaCode (below) is used for subschemas
|
|
@@ -51503,7 +51817,7 @@ var KeywordCxt = /*#__PURE__*/ function() {
|
|
|
51503
51817
|
var subschema = (0, subschema_1.getSubschema)(this.it, appl);
|
|
51504
51818
|
(0, subschema_1.extendSubschemaData)(subschema, this.it, appl);
|
|
51505
51819
|
(0, subschema_1.extendSubschemaMode)(subschema, appl);
|
|
51506
|
-
var nextContext = _object_spread_props(_object_spread({}, this.it, subschema), {
|
|
51820
|
+
var nextContext = _object_spread_props$1(_object_spread$1({}, this.it, subschema), {
|
|
51507
51821
|
items: undefined,
|
|
51508
51822
|
props: undefined
|
|
51509
51823
|
});
|
|
@@ -51868,7 +52182,7 @@ function _create_super(Derived) {
|
|
|
51868
52182
|
Object.defineProperty(ref_error, "__esModule", {
|
|
51869
52183
|
value: true
|
|
51870
52184
|
});
|
|
51871
|
-
var resolve_1$1 = resolve$
|
|
52185
|
+
var resolve_1$1 = resolve$2;
|
|
51872
52186
|
var MissingRefError = /*#__PURE__*/ function(Error1) {
|
|
51873
52187
|
_inherits(MissingRefError, Error1);
|
|
51874
52188
|
var _super = _create_super(MissingRefError);
|
|
@@ -51933,7 +52247,7 @@ compile.resolveSchema = compile.getCompilingSchema = compile.resolveRef = compil
|
|
|
51933
52247
|
var codegen_1$m = codegen;
|
|
51934
52248
|
var validation_error_1 = validation_error;
|
|
51935
52249
|
var names_1$2 = names$1;
|
|
51936
|
-
var resolve_1 = resolve$
|
|
52250
|
+
var resolve_1 = resolve$2;
|
|
51937
52251
|
var util_1$k = util;
|
|
51938
52252
|
var validate_1$1 = validate;
|
|
51939
52253
|
var SchemaEnv = function SchemaEnv(env) {
|
|
@@ -52066,7 +52380,7 @@ function resolveRef(root, baseId, ref) {
|
|
|
52066
52380
|
ref = (0, resolve_1.resolveUrl)(this.opts.uriResolver, baseId, ref);
|
|
52067
52381
|
var schOrFunc = root.refs[ref];
|
|
52068
52382
|
if (schOrFunc) return schOrFunc;
|
|
52069
|
-
var _sch = resolve.call(this, root, ref);
|
|
52383
|
+
var _sch = resolve$1.call(this, root, ref);
|
|
52070
52384
|
if (_sch === undefined) {
|
|
52071
52385
|
var schema = (_a = root.localRefs) === null || _a === void 0 ? void 0 : _a[ref]; // TODO maybe localRefs should hold SchemaEnv
|
|
52072
52386
|
var schemaId = this.opts.schemaId;
|
|
@@ -52114,7 +52428,7 @@ function sameSchemaEnv(s1, s2) {
|
|
|
52114
52428
|
}
|
|
52115
52429
|
// resolve and compile the references ($ref)
|
|
52116
52430
|
// TODO returns AnySchemaObject (if the schema can be inlined) or validation function
|
|
52117
|
-
function resolve(root, ref // reference to resolve
|
|
52431
|
+
function resolve$1(root, ref // reference to resolve
|
|
52118
52432
|
) {
|
|
52119
52433
|
var sch;
|
|
52120
52434
|
while(typeof (sch = this.refs[ref]) == "string")ref = sch;
|
|
@@ -52242,1265 +52556,901 @@ var require$$9 = {
|
|
|
52242
52556
|
|
|
52243
52557
|
var uri$1 = {};
|
|
52244
52558
|
|
|
52245
|
-
var
|
|
52559
|
+
var fastUri$1 = {
|
|
52246
52560
|
exports: {}
|
|
52247
52561
|
};
|
|
52248
52562
|
|
|
52249
|
-
|
|
52250
|
-
|
|
52251
|
-
|
|
52252
|
-
|
|
52563
|
+
var HEX$1 = {
|
|
52564
|
+
0: 0,
|
|
52565
|
+
1: 1,
|
|
52566
|
+
2: 2,
|
|
52567
|
+
3: 3,
|
|
52568
|
+
4: 4,
|
|
52569
|
+
5: 5,
|
|
52570
|
+
6: 6,
|
|
52571
|
+
7: 7,
|
|
52572
|
+
8: 8,
|
|
52573
|
+
9: 9,
|
|
52574
|
+
a: 10,
|
|
52575
|
+
A: 10,
|
|
52576
|
+
b: 11,
|
|
52577
|
+
B: 11,
|
|
52578
|
+
c: 12,
|
|
52579
|
+
C: 12,
|
|
52580
|
+
d: 13,
|
|
52581
|
+
D: 13,
|
|
52582
|
+
e: 14,
|
|
52583
|
+
E: 14,
|
|
52584
|
+
f: 15,
|
|
52585
|
+
F: 15
|
|
52586
|
+
};
|
|
52587
|
+
var scopedChars = {
|
|
52588
|
+
HEX: HEX$1
|
|
52589
|
+
};
|
|
52590
|
+
|
|
52591
|
+
function _array_like_to_array$4(arr, len) {
|
|
52592
|
+
if (len == null || len > arr.length) len = arr.length;
|
|
52593
|
+
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
52594
|
+
return arr2;
|
|
52595
|
+
}
|
|
52596
|
+
function _array_with_holes$2(arr) {
|
|
52597
|
+
if (Array.isArray(arr)) return arr;
|
|
52598
|
+
}
|
|
52599
|
+
function _iterable_to_array_limit$2(arr, i) {
|
|
52600
|
+
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
52601
|
+
if (_i == null) return;
|
|
52602
|
+
var _arr = [];
|
|
52603
|
+
var _n = true;
|
|
52604
|
+
var _d = false;
|
|
52605
|
+
var _s, _e;
|
|
52606
|
+
try {
|
|
52607
|
+
for(_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true){
|
|
52608
|
+
_arr.push(_s.value);
|
|
52609
|
+
if (i && _arr.length === i) break;
|
|
52610
|
+
}
|
|
52611
|
+
} catch (err) {
|
|
52612
|
+
_d = true;
|
|
52613
|
+
_e = err;
|
|
52614
|
+
} finally{
|
|
52615
|
+
try {
|
|
52616
|
+
if (!_n && _i["return"] != null) _i["return"]();
|
|
52617
|
+
} finally{
|
|
52618
|
+
if (_d) throw _e;
|
|
52619
|
+
}
|
|
52620
|
+
}
|
|
52621
|
+
return _arr;
|
|
52622
|
+
}
|
|
52623
|
+
function _non_iterable_rest$2() {
|
|
52624
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
52625
|
+
}
|
|
52626
|
+
function _sliced_to_array$2(arr, i) {
|
|
52627
|
+
return _array_with_holes$2(arr) || _iterable_to_array_limit$2(arr, i) || _unsupported_iterable_to_array$4(arr, i) || _non_iterable_rest$2();
|
|
52628
|
+
}
|
|
52629
|
+
function _unsupported_iterable_to_array$4(o, minLen) {
|
|
52630
|
+
if (!o) return;
|
|
52631
|
+
if (typeof o === "string") return _array_like_to_array$4(o, minLen);
|
|
52632
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
52633
|
+
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
52634
|
+
if (n === "Map" || n === "Set") return Array.from(n);
|
|
52635
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$4(o, minLen);
|
|
52636
|
+
}
|
|
52637
|
+
var HEX = scopedChars.HEX;
|
|
52638
|
+
function normalizeIPv4$1(host) {
|
|
52639
|
+
if (findToken(host, ".") < 3) {
|
|
52640
|
+
return {
|
|
52641
|
+
host: host,
|
|
52642
|
+
isIPV4: false
|
|
52643
|
+
};
|
|
52644
|
+
}
|
|
52645
|
+
var matches = host.match(RegExp("^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$", "u")) || [];
|
|
52646
|
+
var _matches = _sliced_to_array$2(matches, 1), address = _matches[0];
|
|
52647
|
+
if (address) {
|
|
52648
|
+
return {
|
|
52649
|
+
host: stripLeadingZeros(address, "."),
|
|
52650
|
+
isIPV4: true
|
|
52651
|
+
};
|
|
52253
52652
|
} else {
|
|
52254
|
-
return
|
|
52653
|
+
return {
|
|
52654
|
+
host: host,
|
|
52655
|
+
isIPV4: false
|
|
52656
|
+
};
|
|
52255
52657
|
}
|
|
52256
52658
|
}
|
|
52257
|
-
/**
|
|
52258
|
-
|
|
52259
|
-
|
|
52260
|
-
|
|
52261
|
-
|
|
52262
|
-
|
|
52659
|
+
/**
|
|
52660
|
+
* @param {string[]} input
|
|
52661
|
+
* @param {boolean} [keepZero=false]
|
|
52662
|
+
* @returns {string|undefined}
|
|
52663
|
+
*/ function stringArrayToHexStripped(input) {
|
|
52664
|
+
var keepZero = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false;
|
|
52665
|
+
var acc = "";
|
|
52666
|
+
var strip = true;
|
|
52667
|
+
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
52668
|
+
try {
|
|
52669
|
+
for(var _iterator = input[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
|
|
52670
|
+
var c = _step.value;
|
|
52671
|
+
if (HEX[c] === undefined) return undefined;
|
|
52672
|
+
if (c !== "0" && strip === true) strip = false;
|
|
52673
|
+
if (!strip) acc += c;
|
|
52263
52674
|
}
|
|
52264
|
-
|
|
52265
|
-
|
|
52266
|
-
|
|
52267
|
-
|
|
52268
|
-
|
|
52675
|
+
} catch (err) {
|
|
52676
|
+
_didIteratorError = true;
|
|
52677
|
+
_iteratorError = err;
|
|
52678
|
+
} finally{
|
|
52679
|
+
try {
|
|
52680
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
52681
|
+
_iterator.return();
|
|
52682
|
+
}
|
|
52683
|
+
} finally{
|
|
52684
|
+
if (_didIteratorError) {
|
|
52685
|
+
throw _iteratorError;
|
|
52269
52686
|
}
|
|
52270
|
-
sets[xl] = sets[xl].slice(1);
|
|
52271
|
-
return sets.join("");
|
|
52272
|
-
} else {
|
|
52273
|
-
return sets[0];
|
|
52274
52687
|
}
|
|
52275
52688
|
}
|
|
52276
|
-
|
|
52277
|
-
|
|
52689
|
+
if (keepZero && acc.length === 0) acc = "0";
|
|
52690
|
+
return acc;
|
|
52691
|
+
}
|
|
52692
|
+
function getIPV6(input) {
|
|
52693
|
+
var tokenCount = 0;
|
|
52694
|
+
var output = {
|
|
52695
|
+
error: false,
|
|
52696
|
+
address: "",
|
|
52697
|
+
zone: ""
|
|
52698
|
+
};
|
|
52699
|
+
var address = [];
|
|
52700
|
+
var buffer = [];
|
|
52701
|
+
var isZone = false;
|
|
52702
|
+
var endipv6Encountered = false;
|
|
52703
|
+
var endIpv6 = false;
|
|
52704
|
+
function consume() {
|
|
52705
|
+
if (buffer.length) {
|
|
52706
|
+
if (isZone === false) {
|
|
52707
|
+
var hex = stringArrayToHexStripped(buffer);
|
|
52708
|
+
if (hex !== undefined) {
|
|
52709
|
+
address.push(hex);
|
|
52710
|
+
} else {
|
|
52711
|
+
output.error = true;
|
|
52712
|
+
return false;
|
|
52713
|
+
}
|
|
52714
|
+
}
|
|
52715
|
+
buffer.length = 0;
|
|
52716
|
+
}
|
|
52717
|
+
return true;
|
|
52278
52718
|
}
|
|
52279
|
-
|
|
52280
|
-
|
|
52719
|
+
for(var i = 0; i < input.length; i++){
|
|
52720
|
+
var cursor = input[i];
|
|
52721
|
+
if (cursor === "[" || cursor === "]") {
|
|
52722
|
+
continue;
|
|
52723
|
+
}
|
|
52724
|
+
if (cursor === ":") {
|
|
52725
|
+
if (endipv6Encountered === true) {
|
|
52726
|
+
endIpv6 = true;
|
|
52727
|
+
}
|
|
52728
|
+
if (!consume()) {
|
|
52729
|
+
break;
|
|
52730
|
+
}
|
|
52731
|
+
tokenCount++;
|
|
52732
|
+
address.push(":");
|
|
52733
|
+
if (tokenCount > 7) {
|
|
52734
|
+
// not valid
|
|
52735
|
+
output.error = true;
|
|
52736
|
+
break;
|
|
52737
|
+
}
|
|
52738
|
+
if (i - 1 >= 0 && input[i - 1] === ":") {
|
|
52739
|
+
endipv6Encountered = true;
|
|
52740
|
+
}
|
|
52741
|
+
continue;
|
|
52742
|
+
} else if (cursor === "%") {
|
|
52743
|
+
if (!consume()) {
|
|
52744
|
+
break;
|
|
52745
|
+
}
|
|
52746
|
+
// switch to zone detection
|
|
52747
|
+
isZone = true;
|
|
52748
|
+
} else {
|
|
52749
|
+
buffer.push(cursor);
|
|
52750
|
+
continue;
|
|
52751
|
+
}
|
|
52281
52752
|
}
|
|
52282
|
-
|
|
52283
|
-
|
|
52753
|
+
if (buffer.length) {
|
|
52754
|
+
if (isZone) {
|
|
52755
|
+
output.zone = buffer.join("");
|
|
52756
|
+
} else if (endIpv6) {
|
|
52757
|
+
address.push(buffer.join(""));
|
|
52758
|
+
} else {
|
|
52759
|
+
address.push(stringArrayToHexStripped(buffer));
|
|
52760
|
+
}
|
|
52284
52761
|
}
|
|
52285
|
-
|
|
52286
|
-
|
|
52287
|
-
|
|
52288
|
-
|
|
52762
|
+
output.address = address.join("");
|
|
52763
|
+
return output;
|
|
52764
|
+
}
|
|
52765
|
+
function normalizeIPv6$1(host) {
|
|
52766
|
+
if (findToken(host, ":") < 2) {
|
|
52767
|
+
return {
|
|
52768
|
+
host: host,
|
|
52769
|
+
isIPV6: false
|
|
52770
|
+
};
|
|
52289
52771
|
}
|
|
52290
|
-
|
|
52291
|
-
|
|
52292
|
-
|
|
52293
|
-
|
|
52294
|
-
|
|
52295
|
-
|
|
52772
|
+
var ipv6 = getIPV6(host);
|
|
52773
|
+
if (!ipv6.error) {
|
|
52774
|
+
var newHost = ipv6.address;
|
|
52775
|
+
var escapedHost = ipv6.address;
|
|
52776
|
+
if (ipv6.zone) {
|
|
52777
|
+
newHost += "%" + ipv6.zone;
|
|
52778
|
+
escapedHost += "%25" + ipv6.zone;
|
|
52296
52779
|
}
|
|
52297
|
-
return obj;
|
|
52298
|
-
}
|
|
52299
|
-
function buildExps(isIRI) {
|
|
52300
|
-
var ALPHA$$ = "[A-Za-z]", DIGIT$$ = "[0-9]", HEXDIG$$ = merge(DIGIT$$, "[A-Fa-f]"), //case-insensitive
|
|
52301
|
-
PCT_ENCODED$ = subexp(subexp("%[EFef]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%[89A-Fa-f]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%" + HEXDIG$$ + HEXDIG$$)), //expanded
|
|
52302
|
-
GEN_DELIMS$$ = "[\\:\\/\\?\\#\\[\\]\\@]", SUB_DELIMS$$ = "[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]", RESERVED$$ = merge(GEN_DELIMS$$, SUB_DELIMS$$), UCSCHAR$$ = isIRI ? "[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]" : "[]", //subset, excludes bidi control characters
|
|
52303
|
-
IPRIVATE$$ = isIRI ? "[\\uE000-\\uF8FF]" : "[]", //subset
|
|
52304
|
-
UNRESERVED$$ = merge(ALPHA$$, DIGIT$$, "[\\-\\.\\_\\~]", UCSCHAR$$); subexp(ALPHA$$ + merge(ALPHA$$, DIGIT$$, "[\\+\\-\\.]") + "*"); subexp(subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\:]")) + "*"); var DEC_OCTET_RELAXED$ = subexp(subexp("25[0-5]") + "|" + subexp("2[0-4]" + DIGIT$$) + "|" + subexp("1" + DIGIT$$ + DIGIT$$) + "|" + subexp("0?[1-9]" + DIGIT$$) + "|0?0?" + DIGIT$$), //relaxed parsing rules
|
|
52305
|
-
IPV4ADDRESS$ = subexp(DEC_OCTET_RELAXED$ + "\\." + DEC_OCTET_RELAXED$ + "\\." + DEC_OCTET_RELAXED$ + "\\." + DEC_OCTET_RELAXED$), H16$ = subexp(HEXDIG$$ + "{1,4}"), LS32$ = subexp(subexp(H16$ + "\\:" + H16$) + "|" + IPV4ADDRESS$), IPV6ADDRESS1$ = subexp(subexp(H16$ + "\\:") + "{6}" + LS32$), // 6( h16 ":" ) ls32
|
|
52306
|
-
IPV6ADDRESS2$ = subexp("\\:\\:" + subexp(H16$ + "\\:") + "{5}" + LS32$), // "::" 5( h16 ":" ) ls32
|
|
52307
|
-
IPV6ADDRESS3$ = subexp(subexp(H16$) + "?\\:\\:" + subexp(H16$ + "\\:") + "{4}" + LS32$), //[ h16 ] "::" 4( h16 ":" ) ls32
|
|
52308
|
-
IPV6ADDRESS4$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,1}" + H16$) + "?\\:\\:" + subexp(H16$ + "\\:") + "{3}" + LS32$), //[ *1( h16 ":" ) h16 ] "::" 3( h16 ":" ) ls32
|
|
52309
|
-
IPV6ADDRESS5$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,2}" + H16$) + "?\\:\\:" + subexp(H16$ + "\\:") + "{2}" + LS32$), //[ *2( h16 ":" ) h16 ] "::" 2( h16 ":" ) ls32
|
|
52310
|
-
IPV6ADDRESS6$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,3}" + H16$) + "?\\:\\:" + H16$ + "\\:" + LS32$), //[ *3( h16 ":" ) h16 ] "::" h16 ":" ls32
|
|
52311
|
-
IPV6ADDRESS7$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,4}" + H16$) + "?\\:\\:" + LS32$), //[ *4( h16 ":" ) h16 ] "::" ls32
|
|
52312
|
-
IPV6ADDRESS8$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,5}" + H16$) + "?\\:\\:" + H16$), //[ *5( h16 ":" ) h16 ] "::" h16
|
|
52313
|
-
IPV6ADDRESS9$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,6}" + H16$) + "?\\:\\:"), //[ *6( h16 ":" ) h16 ] "::"
|
|
52314
|
-
IPV6ADDRESS$ = subexp([
|
|
52315
|
-
IPV6ADDRESS1$,
|
|
52316
|
-
IPV6ADDRESS2$,
|
|
52317
|
-
IPV6ADDRESS3$,
|
|
52318
|
-
IPV6ADDRESS4$,
|
|
52319
|
-
IPV6ADDRESS5$,
|
|
52320
|
-
IPV6ADDRESS6$,
|
|
52321
|
-
IPV6ADDRESS7$,
|
|
52322
|
-
IPV6ADDRESS8$,
|
|
52323
|
-
IPV6ADDRESS9$
|
|
52324
|
-
].join("|")), ZONEID$ = subexp(subexp(UNRESERVED$$ + "|" + PCT_ENCODED$) + "+"); //RFC 6874
|
|
52325
|
-
subexp("[vV]" + HEXDIG$$ + "+\\." + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\:]") + "+"); subexp(subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$)) + "*"); var PCHAR$ = subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\:\\@]")); subexp(subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\@]")) + "+"); subexp(subexp(PCHAR$ + "|" + merge("[\\/\\?]", IPRIVATE$$)) + "*");
|
|
52326
52780
|
return {
|
|
52327
|
-
|
|
52328
|
-
|
|
52329
|
-
|
|
52330
|
-
|
|
52331
|
-
|
|
52332
|
-
|
|
52333
|
-
|
|
52334
|
-
|
|
52335
|
-
UNRESERVED: new RegExp(UNRESERVED$$, "g"),
|
|
52336
|
-
OTHER_CHARS: new RegExp(merge("[^\\%]", UNRESERVED$$, RESERVED$$), "g"),
|
|
52337
|
-
PCT_ENCODED: new RegExp(PCT_ENCODED$, "g"),
|
|
52338
|
-
IPV4ADDRESS: new RegExp("^(" + IPV4ADDRESS$ + ")$"),
|
|
52339
|
-
IPV6ADDRESS: new RegExp("^\\[?(" + IPV6ADDRESS$ + ")" + subexp(subexp("\\%25|\\%(?!" + HEXDIG$$ + "{2})") + "(" + ZONEID$ + ")") + "?\\]?$") //RFC 6874, with relaxed parsing rules
|
|
52781
|
+
host: newHost,
|
|
52782
|
+
escapedHost: escapedHost,
|
|
52783
|
+
isIPV6: true
|
|
52784
|
+
};
|
|
52785
|
+
} else {
|
|
52786
|
+
return {
|
|
52787
|
+
host: host,
|
|
52788
|
+
isIPV6: false
|
|
52340
52789
|
};
|
|
52341
52790
|
}
|
|
52342
|
-
|
|
52343
|
-
|
|
52344
|
-
var
|
|
52345
|
-
|
|
52346
|
-
|
|
52347
|
-
|
|
52348
|
-
|
|
52349
|
-
|
|
52350
|
-
|
|
52351
|
-
|
|
52352
|
-
|
|
52353
|
-
if (i && _arr.length === i) break;
|
|
52354
|
-
}
|
|
52355
|
-
} catch (err) {
|
|
52356
|
-
_d = true;
|
|
52357
|
-
_e = err;
|
|
52358
|
-
} finally{
|
|
52359
|
-
try {
|
|
52360
|
-
if (!_n && _i["return"]) _i["return"]();
|
|
52361
|
-
} finally{
|
|
52362
|
-
if (_d) throw _e;
|
|
52363
|
-
}
|
|
52791
|
+
}
|
|
52792
|
+
function stripLeadingZeros(str, token) {
|
|
52793
|
+
var out = "";
|
|
52794
|
+
var skip = true;
|
|
52795
|
+
var l = str.length;
|
|
52796
|
+
for(var i = 0; i < l; i++){
|
|
52797
|
+
var c = str[i];
|
|
52798
|
+
if (c === "0" && skip) {
|
|
52799
|
+
if (i + 1 <= l && str[i + 1] === token || i + 1 === l) {
|
|
52800
|
+
out += c;
|
|
52801
|
+
skip = false;
|
|
52364
52802
|
}
|
|
52365
|
-
|
|
52366
|
-
|
|
52367
|
-
|
|
52368
|
-
if (Array.isArray(arr)) {
|
|
52369
|
-
return arr;
|
|
52370
|
-
} else if (Symbol.iterator in Object(arr)) {
|
|
52371
|
-
return sliceIterator(arr, i);
|
|
52803
|
+
} else {
|
|
52804
|
+
if (c === token) {
|
|
52805
|
+
skip = true;
|
|
52372
52806
|
} else {
|
|
52373
|
-
|
|
52807
|
+
skip = false;
|
|
52374
52808
|
}
|
|
52375
|
-
|
|
52376
|
-
|
|
52377
|
-
var toConsumableArray = function toConsumableArray(arr) {
|
|
52378
|
-
if (Array.isArray(arr)) {
|
|
52379
|
-
for(var i = 0, arr2 = Array(arr.length); i < arr.length; i++)arr2[i] = arr[i];
|
|
52380
|
-
return arr2;
|
|
52381
|
-
} else {
|
|
52382
|
-
return Array.from(arr);
|
|
52383
|
-
}
|
|
52384
|
-
};
|
|
52385
|
-
/** Highest positive signed 32-bit float value */ var maxInt = 2147483647; // aka. 0x7FFFFFFF or 2^31-1
|
|
52386
|
-
/** Bootstring parameters */ var base = 36;
|
|
52387
|
-
var tMin = 1;
|
|
52388
|
-
var tMax = 26;
|
|
52389
|
-
var skew = 38;
|
|
52390
|
-
var damp = 700;
|
|
52391
|
-
var initialBias = 72;
|
|
52392
|
-
var initialN = 128; // 0x80
|
|
52393
|
-
var delimiter = "-"; // '\x2D'
|
|
52394
|
-
/** Regular expressions */ var regexPunycode = /^xn--/;
|
|
52395
|
-
var regexNonASCII = /[^\0-\x7E]/; // non-ASCII chars
|
|
52396
|
-
var regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g; // RFC 3490 separators
|
|
52397
|
-
/** Error messages */ var errors = {
|
|
52398
|
-
"overflow": "Overflow: input needs wider integers to process",
|
|
52399
|
-
"not-basic": "Illegal input >= 0x80 (not a basic code point)",
|
|
52400
|
-
"invalid-input": "Invalid input"
|
|
52401
|
-
};
|
|
52402
|
-
/** Convenience shortcuts */ var baseMinusTMin = base - tMin;
|
|
52403
|
-
var floor = Math.floor;
|
|
52404
|
-
var stringFromCharCode = String.fromCharCode;
|
|
52405
|
-
/*--------------------------------------------------------------------------*/ /**
|
|
52406
|
-
* A generic error utility function.
|
|
52407
|
-
* @private
|
|
52408
|
-
* @param {String} type The error type.
|
|
52409
|
-
* @returns {Error} Throws a `RangeError` with the applicable error message.
|
|
52410
|
-
*/ function error$1(type) {
|
|
52411
|
-
throw new RangeError(errors[type]);
|
|
52809
|
+
out += c;
|
|
52810
|
+
}
|
|
52412
52811
|
}
|
|
52413
|
-
|
|
52414
|
-
|
|
52415
|
-
|
|
52416
|
-
|
|
52417
|
-
|
|
52418
|
-
|
|
52419
|
-
|
|
52420
|
-
|
|
52421
|
-
|
|
52422
|
-
|
|
52423
|
-
|
|
52424
|
-
|
|
52812
|
+
return out;
|
|
52813
|
+
}
|
|
52814
|
+
function findToken(str, token) {
|
|
52815
|
+
var ind = 0;
|
|
52816
|
+
for(var i = 0; i < str.length; i++){
|
|
52817
|
+
if (str[i] === token) ind++;
|
|
52818
|
+
}
|
|
52819
|
+
return ind;
|
|
52820
|
+
}
|
|
52821
|
+
var RDS1 = RegExp("^\\.\\.?\\/", "u");
|
|
52822
|
+
var RDS2 = RegExp("^\\/\\.(?:\\/|$)", "u");
|
|
52823
|
+
var RDS3 = RegExp("^\\/\\.\\.(?:\\/|$)", "u");
|
|
52824
|
+
var RDS5 = RegExp("^\\/?(?:.|\\n)*?(?=\\/|$)", "u");
|
|
52825
|
+
function removeDotSegments$1(input) {
|
|
52826
|
+
var output = [];
|
|
52827
|
+
while(input.length){
|
|
52828
|
+
if (input.match(RDS1)) {
|
|
52829
|
+
input = input.replace(RDS1, "");
|
|
52830
|
+
} else if (input.match(RDS2)) {
|
|
52831
|
+
input = input.replace(RDS2, "/");
|
|
52832
|
+
} else if (input.match(RDS3)) {
|
|
52833
|
+
input = input.replace(RDS3, "/");
|
|
52834
|
+
output.pop();
|
|
52835
|
+
} else if (input === "." || input === "..") {
|
|
52836
|
+
input = "";
|
|
52837
|
+
} else {
|
|
52838
|
+
var im = input.match(RDS5);
|
|
52839
|
+
if (im) {
|
|
52840
|
+
var s = im[0];
|
|
52841
|
+
input = input.slice(s.length);
|
|
52842
|
+
output.push(s);
|
|
52843
|
+
} else {
|
|
52844
|
+
throw new Error("Unexpected dot segment condition");
|
|
52845
|
+
}
|
|
52425
52846
|
}
|
|
52426
|
-
return result;
|
|
52427
52847
|
}
|
|
52428
|
-
|
|
52429
|
-
|
|
52430
|
-
|
|
52431
|
-
|
|
52432
|
-
|
|
52433
|
-
|
|
52434
|
-
* character.
|
|
52435
|
-
* @returns {Array} A new string of characters returned by the callback
|
|
52436
|
-
* function.
|
|
52437
|
-
*/ function mapDomain(string, fn) {
|
|
52438
|
-
var parts = string.split("@");
|
|
52439
|
-
var result = "";
|
|
52440
|
-
if (parts.length > 1) {
|
|
52441
|
-
// In email addresses, only the domain name should be punycoded. Leave
|
|
52442
|
-
// the local part (i.e. everything up to `@`) intact.
|
|
52443
|
-
result = parts[0] + "@";
|
|
52444
|
-
string = parts[1];
|
|
52445
|
-
}
|
|
52446
|
-
// Avoid `split(regex)` for IE8 compatibility. See #17.
|
|
52447
|
-
string = string.replace(regexSeparators, ".");
|
|
52448
|
-
var labels = string.split(".");
|
|
52449
|
-
var encoded = map(labels, fn).join(".");
|
|
52450
|
-
return result + encoded;
|
|
52848
|
+
return output.join("");
|
|
52849
|
+
}
|
|
52850
|
+
function normalizeComponentEncoding$1(components, esc) {
|
|
52851
|
+
var func = esc !== true ? escape : unescape;
|
|
52852
|
+
if (components.scheme !== undefined) {
|
|
52853
|
+
components.scheme = func(components.scheme);
|
|
52451
52854
|
}
|
|
52452
|
-
|
|
52453
|
-
|
|
52454
|
-
|
|
52455
|
-
|
|
52456
|
-
|
|
52457
|
-
|
|
52458
|
-
|
|
52459
|
-
|
|
52460
|
-
|
|
52461
|
-
|
|
52462
|
-
|
|
52463
|
-
|
|
52464
|
-
|
|
52465
|
-
|
|
52466
|
-
|
|
52467
|
-
|
|
52468
|
-
|
|
52469
|
-
|
|
52470
|
-
|
|
52471
|
-
|
|
52472
|
-
|
|
52473
|
-
|
|
52474
|
-
|
|
52475
|
-
|
|
52476
|
-
|
|
52477
|
-
|
|
52478
|
-
|
|
52479
|
-
|
|
52480
|
-
|
|
52481
|
-
|
|
52855
|
+
if (components.userinfo !== undefined) {
|
|
52856
|
+
components.userinfo = func(components.userinfo);
|
|
52857
|
+
}
|
|
52858
|
+
if (components.host !== undefined) {
|
|
52859
|
+
components.host = func(components.host);
|
|
52860
|
+
}
|
|
52861
|
+
if (components.path !== undefined) {
|
|
52862
|
+
components.path = func(components.path);
|
|
52863
|
+
}
|
|
52864
|
+
if (components.query !== undefined) {
|
|
52865
|
+
components.query = func(components.query);
|
|
52866
|
+
}
|
|
52867
|
+
if (components.fragment !== undefined) {
|
|
52868
|
+
components.fragment = func(components.fragment);
|
|
52869
|
+
}
|
|
52870
|
+
return components;
|
|
52871
|
+
}
|
|
52872
|
+
function recomposeAuthority$1(components, options) {
|
|
52873
|
+
var uriTokens = [];
|
|
52874
|
+
if (components.userinfo !== undefined) {
|
|
52875
|
+
uriTokens.push(components.userinfo);
|
|
52876
|
+
uriTokens.push("@");
|
|
52877
|
+
}
|
|
52878
|
+
if (components.host !== undefined) {
|
|
52879
|
+
var host = unescape(components.host);
|
|
52880
|
+
var ipV4res = normalizeIPv4$1(host);
|
|
52881
|
+
if (ipV4res.isIPV4) {
|
|
52882
|
+
host = ipV4res.host;
|
|
52883
|
+
} else {
|
|
52884
|
+
var ipV6res = normalizeIPv6$1(ipV4res.host);
|
|
52885
|
+
if (ipV6res.isIPV6 === true) {
|
|
52886
|
+
host = "[".concat(ipV6res.escapedHost, "]");
|
|
52482
52887
|
} else {
|
|
52483
|
-
|
|
52888
|
+
host = components.host;
|
|
52484
52889
|
}
|
|
52485
52890
|
}
|
|
52486
|
-
|
|
52891
|
+
uriTokens.push(host);
|
|
52487
52892
|
}
|
|
52488
|
-
|
|
52489
|
-
|
|
52490
|
-
|
|
52491
|
-
|
|
52492
|
-
|
|
52493
|
-
|
|
52494
|
-
|
|
52495
|
-
|
|
52496
|
-
|
|
52497
|
-
|
|
52498
|
-
|
|
52499
|
-
|
|
52500
|
-
|
|
52501
|
-
|
|
52502
|
-
|
|
52503
|
-
|
|
52504
|
-
|
|
52505
|
-
|
|
52506
|
-
|
|
52507
|
-
|
|
52508
|
-
|
|
52509
|
-
|
|
52510
|
-
|
|
52511
|
-
|
|
52512
|
-
|
|
52513
|
-
|
|
52514
|
-
|
|
52515
|
-
|
|
52516
|
-
|
|
52517
|
-
|
|
52518
|
-
|
|
52519
|
-
|
|
52520
|
-
|
|
52521
|
-
|
|
52522
|
-
* @param {Number} digit The numeric value of a basic code point.
|
|
52523
|
-
* @returns {Number} The basic code point whose value (when used for
|
|
52524
|
-
* representing integers) is `digit`, which needs to be in the range
|
|
52525
|
-
* `0` to `base - 1`. If `flag` is non-zero, the uppercase form is
|
|
52526
|
-
* used; else, the lowercase form is used. The behavior is undefined
|
|
52527
|
-
* if `flag` is non-zero and `digit` has no uppercase form.
|
|
52528
|
-
*/ var digitToBasic = function digitToBasic(digit, flag) {
|
|
52529
|
-
// 0..25 map to ASCII a..z or A..Z
|
|
52530
|
-
// 26..35 map to ASCII 0..9
|
|
52531
|
-
return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5);
|
|
52532
|
-
};
|
|
52533
|
-
/**
|
|
52534
|
-
* Bias adaptation function as per section 3.4 of RFC 3492.
|
|
52535
|
-
* https://tools.ietf.org/html/rfc3492#section-3.4
|
|
52536
|
-
* @private
|
|
52537
|
-
*/ var adapt = function adapt(delta, numPoints, firstTime) {
|
|
52538
|
-
var k = 0;
|
|
52539
|
-
delta = firstTime ? floor(delta / damp) : delta >> 1;
|
|
52540
|
-
delta += floor(delta / numPoints);
|
|
52541
|
-
for(; delta > baseMinusTMin * tMax >> 1; k += base){
|
|
52542
|
-
delta = floor(delta / baseMinusTMin);
|
|
52543
|
-
}
|
|
52544
|
-
return floor(k + (baseMinusTMin + 1) * delta / (delta + skew));
|
|
52545
|
-
};
|
|
52546
|
-
/**
|
|
52547
|
-
* Converts a Punycode string of ASCII-only symbols to a string of Unicode
|
|
52548
|
-
* symbols.
|
|
52549
|
-
* @memberOf punycode
|
|
52550
|
-
* @param {String} input The Punycode string of ASCII-only symbols.
|
|
52551
|
-
* @returns {String} The resulting string of Unicode symbols.
|
|
52552
|
-
*/ var decode = function decode(input) {
|
|
52553
|
-
// Don't use UCS-2.
|
|
52554
|
-
var output = [];
|
|
52555
|
-
var inputLength = input.length;
|
|
52556
|
-
var i = 0;
|
|
52557
|
-
var n = initialN;
|
|
52558
|
-
var bias = initialBias;
|
|
52559
|
-
// Handle the basic code points: let `basic` be the number of input code
|
|
52560
|
-
// points before the last delimiter, or `0` if there is none, then copy
|
|
52561
|
-
// the first basic code points to the output.
|
|
52562
|
-
var basic = input.lastIndexOf(delimiter);
|
|
52563
|
-
if (basic < 0) {
|
|
52564
|
-
basic = 0;
|
|
52565
|
-
}
|
|
52566
|
-
for(var j = 0; j < basic; ++j){
|
|
52567
|
-
// if it's not a basic code point
|
|
52568
|
-
if (input.charCodeAt(j) >= 0x80) {
|
|
52569
|
-
error$1("not-basic");
|
|
52570
|
-
}
|
|
52571
|
-
output.push(input.charCodeAt(j));
|
|
52572
|
-
}
|
|
52573
|
-
// Main decoding loop: start just after the last delimiter if any basic code
|
|
52574
|
-
// points were copied; start at the beginning otherwise.
|
|
52575
|
-
for(var index = basic > 0 ? basic + 1 : 0; index < inputLength;)/* no final expression */ {
|
|
52576
|
-
// `index` is the index of the next character to be consumed.
|
|
52577
|
-
// Decode a generalized variable-length integer into `delta`,
|
|
52578
|
-
// which gets added to `i`. The overflow checking is easier
|
|
52579
|
-
// if we increase `i` as we go, then subtract off its starting
|
|
52580
|
-
// value at the end to obtain `delta`.
|
|
52581
|
-
var oldi = i;
|
|
52582
|
-
for(var w = 1, k = base;; k += base){
|
|
52583
|
-
if (index >= inputLength) {
|
|
52584
|
-
error$1("invalid-input");
|
|
52585
|
-
}
|
|
52586
|
-
var digit = basicToDigit(input.charCodeAt(index++));
|
|
52587
|
-
if (digit >= base || digit > floor((maxInt - i) / w)) {
|
|
52588
|
-
error$1("overflow");
|
|
52589
|
-
}
|
|
52590
|
-
i += digit * w;
|
|
52591
|
-
var t = k <= bias ? tMin : k >= bias + tMax ? tMax : k - bias;
|
|
52592
|
-
if (digit < t) {
|
|
52593
|
-
break;
|
|
52594
|
-
}
|
|
52595
|
-
var baseMinusT = base - t;
|
|
52596
|
-
if (w > floor(maxInt / baseMinusT)) {
|
|
52597
|
-
error$1("overflow");
|
|
52598
|
-
}
|
|
52599
|
-
w *= baseMinusT;
|
|
52600
|
-
}
|
|
52601
|
-
var out = output.length + 1;
|
|
52602
|
-
bias = adapt(i - oldi, out, oldi == 0);
|
|
52603
|
-
// `i` was supposed to wrap around from `out` to `0`,
|
|
52604
|
-
// incrementing `n` each time, so we'll fix that now:
|
|
52605
|
-
if (floor(i / out) > maxInt - n) {
|
|
52606
|
-
error$1("overflow");
|
|
52607
|
-
}
|
|
52608
|
-
n += floor(i / out);
|
|
52609
|
-
i %= out;
|
|
52610
|
-
// Insert `n` at position `i` of the output.
|
|
52611
|
-
output.splice(i++, 0, n);
|
|
52893
|
+
if (typeof components.port === "number" || typeof components.port === "string") {
|
|
52894
|
+
uriTokens.push(":");
|
|
52895
|
+
uriTokens.push(String(components.port));
|
|
52896
|
+
}
|
|
52897
|
+
return uriTokens.length ? uriTokens.join("") : undefined;
|
|
52898
|
+
}
|
|
52899
|
+
var utils = {
|
|
52900
|
+
recomposeAuthority: recomposeAuthority$1,
|
|
52901
|
+
normalizeComponentEncoding: normalizeComponentEncoding$1,
|
|
52902
|
+
removeDotSegments: removeDotSegments$1,
|
|
52903
|
+
normalizeIPv4: normalizeIPv4$1,
|
|
52904
|
+
normalizeIPv6: normalizeIPv6$1,
|
|
52905
|
+
stringArrayToHexStripped: stringArrayToHexStripped
|
|
52906
|
+
};
|
|
52907
|
+
|
|
52908
|
+
function _array_like_to_array$3(arr, len) {
|
|
52909
|
+
if (len == null || len > arr.length) len = arr.length;
|
|
52910
|
+
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
52911
|
+
return arr2;
|
|
52912
|
+
}
|
|
52913
|
+
function _array_with_holes$1(arr) {
|
|
52914
|
+
if (Array.isArray(arr)) return arr;
|
|
52915
|
+
}
|
|
52916
|
+
function _iterable_to_array_limit$1(arr, i) {
|
|
52917
|
+
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
52918
|
+
if (_i == null) return;
|
|
52919
|
+
var _arr = [];
|
|
52920
|
+
var _n = true;
|
|
52921
|
+
var _d = false;
|
|
52922
|
+
var _s, _e;
|
|
52923
|
+
try {
|
|
52924
|
+
for(_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true){
|
|
52925
|
+
_arr.push(_s.value);
|
|
52926
|
+
if (i && _arr.length === i) break;
|
|
52612
52927
|
}
|
|
52613
|
-
|
|
52614
|
-
|
|
52615
|
-
|
|
52616
|
-
|
|
52617
|
-
* Punycode string of ASCII-only symbols.
|
|
52618
|
-
* @memberOf punycode
|
|
52619
|
-
* @param {String} input The string of Unicode symbols.
|
|
52620
|
-
* @returns {String} The resulting Punycode string of ASCII-only symbols.
|
|
52621
|
-
*/ var encode = function encode(input) {
|
|
52622
|
-
var output = [];
|
|
52623
|
-
// Convert the input in UCS-2 to an array of Unicode code points.
|
|
52624
|
-
input = ucs2decode(input);
|
|
52625
|
-
// Cache the length.
|
|
52626
|
-
var inputLength = input.length;
|
|
52627
|
-
// Initialize the state.
|
|
52628
|
-
var n = initialN;
|
|
52629
|
-
var delta = 0;
|
|
52630
|
-
var bias = initialBias;
|
|
52631
|
-
// Handle the basic code points.
|
|
52632
|
-
var _iteratorNormalCompletion = true;
|
|
52633
|
-
var _didIteratorError = false;
|
|
52634
|
-
var _iteratorError = undefined;
|
|
52928
|
+
} catch (err) {
|
|
52929
|
+
_d = true;
|
|
52930
|
+
_e = err;
|
|
52931
|
+
} finally{
|
|
52635
52932
|
try {
|
|
52636
|
-
|
|
52637
|
-
var _currentValue2 = _step.value;
|
|
52638
|
-
if (_currentValue2 < 0x80) {
|
|
52639
|
-
output.push(stringFromCharCode(_currentValue2));
|
|
52640
|
-
}
|
|
52641
|
-
}
|
|
52642
|
-
} catch (err) {
|
|
52643
|
-
_didIteratorError = true;
|
|
52644
|
-
_iteratorError = err;
|
|
52933
|
+
if (!_n && _i["return"] != null) _i["return"]();
|
|
52645
52934
|
} finally{
|
|
52646
|
-
|
|
52647
|
-
if (!_iteratorNormalCompletion && _iterator.return) {
|
|
52648
|
-
_iterator.return();
|
|
52649
|
-
}
|
|
52650
|
-
} finally{
|
|
52651
|
-
if (_didIteratorError) {
|
|
52652
|
-
throw _iteratorError;
|
|
52653
|
-
}
|
|
52654
|
-
}
|
|
52655
|
-
}
|
|
52656
|
-
var basicLength = output.length;
|
|
52657
|
-
var handledCPCount = basicLength;
|
|
52658
|
-
// `handledCPCount` is the number of code points that have been handled;
|
|
52659
|
-
// `basicLength` is the number of basic code points.
|
|
52660
|
-
// Finish the basic string with a delimiter unless it's empty.
|
|
52661
|
-
if (basicLength) {
|
|
52662
|
-
output.push(delimiter);
|
|
52935
|
+
if (_d) throw _e;
|
|
52663
52936
|
}
|
|
52664
|
-
|
|
52665
|
-
|
|
52666
|
-
|
|
52667
|
-
|
|
52668
|
-
|
|
52669
|
-
|
|
52670
|
-
|
|
52671
|
-
|
|
52672
|
-
|
|
52673
|
-
|
|
52674
|
-
|
|
52675
|
-
|
|
52676
|
-
|
|
52677
|
-
|
|
52678
|
-
|
|
52679
|
-
|
|
52680
|
-
|
|
52681
|
-
|
|
52682
|
-
|
|
52683
|
-
|
|
52684
|
-
|
|
52685
|
-
|
|
52686
|
-
|
|
52687
|
-
|
|
52688
|
-
|
|
52689
|
-
|
|
52690
|
-
|
|
52691
|
-
|
|
52692
|
-
|
|
52693
|
-
|
|
52694
|
-
|
|
52695
|
-
|
|
52696
|
-
|
|
52697
|
-
|
|
52698
|
-
|
|
52699
|
-
|
|
52700
|
-
|
|
52701
|
-
|
|
52702
|
-
|
|
52703
|
-
|
|
52704
|
-
|
|
52705
|
-
|
|
52706
|
-
|
|
52707
|
-
|
|
52708
|
-
|
|
52709
|
-
|
|
52710
|
-
|
|
52711
|
-
|
|
52712
|
-
|
|
52713
|
-
|
|
52714
|
-
|
|
52715
|
-
|
|
52716
|
-
|
|
52717
|
-
|
|
52718
|
-
|
|
52719
|
-
|
|
52720
|
-
|
|
52721
|
-
|
|
52722
|
-
|
|
52723
|
-
|
|
52724
|
-
|
|
52725
|
-
|
|
52726
|
-
|
|
52727
|
-
|
|
52728
|
-
|
|
52729
|
-
|
|
52730
|
-
|
|
52731
|
-
|
|
52732
|
-
|
|
52733
|
-
|
|
52734
|
-
|
|
52735
|
-
|
|
52736
|
-
|
|
52737
|
-
|
|
52738
|
-
|
|
52739
|
-
|
|
52740
|
-
|
|
52741
|
-
|
|
52742
|
-
|
|
52743
|
-
|
|
52744
|
-
|
|
52937
|
+
}
|
|
52938
|
+
return _arr;
|
|
52939
|
+
}
|
|
52940
|
+
function _non_iterable_rest$1() {
|
|
52941
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
52942
|
+
}
|
|
52943
|
+
function _sliced_to_array$1(arr, i) {
|
|
52944
|
+
return _array_with_holes$1(arr) || _iterable_to_array_limit$1(arr, i) || _unsupported_iterable_to_array$3(arr, i) || _non_iterable_rest$1();
|
|
52945
|
+
}
|
|
52946
|
+
function _unsupported_iterable_to_array$3(o, minLen) {
|
|
52947
|
+
if (!o) return;
|
|
52948
|
+
if (typeof o === "string") return _array_like_to_array$3(o, minLen);
|
|
52949
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
52950
|
+
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
52951
|
+
if (n === "Map" || n === "Set") return Array.from(n);
|
|
52952
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$3(o, minLen);
|
|
52953
|
+
}
|
|
52954
|
+
var UUID_REG = RegExp("^[\\da-f]{8}\\b-[\\da-f]{4}\\b-[\\da-f]{4}\\b-[\\da-f]{4}\\b-[\\da-f]{12}$", "iu");
|
|
52955
|
+
var URN_REG = RegExp("([\\da-z][\\d\\-a-z]{0,31}):((?:[\\w!$'()*+,\\-.:;=@]|%[\\da-f]{2})+)", "iu");
|
|
52956
|
+
function isSecure(wsComponents) {
|
|
52957
|
+
return typeof wsComponents.secure === "boolean" ? wsComponents.secure : String(wsComponents.scheme).toLowerCase() === "wss";
|
|
52958
|
+
}
|
|
52959
|
+
function httpParse(components) {
|
|
52960
|
+
if (!components.host) {
|
|
52961
|
+
components.error = components.error || "HTTP URIs must have a host.";
|
|
52962
|
+
}
|
|
52963
|
+
return components;
|
|
52964
|
+
}
|
|
52965
|
+
function httpSerialize(components) {
|
|
52966
|
+
var secure = String(components.scheme).toLowerCase() === "https";
|
|
52967
|
+
// normalize the default port
|
|
52968
|
+
if (components.port === (secure ? 443 : 80) || components.port === "") {
|
|
52969
|
+
components.port = undefined;
|
|
52970
|
+
}
|
|
52971
|
+
// normalize the empty path
|
|
52972
|
+
if (!components.path) {
|
|
52973
|
+
components.path = "/";
|
|
52974
|
+
}
|
|
52975
|
+
// NOTE: We do not parse query strings for HTTP URIs
|
|
52976
|
+
// as WWW Form Url Encoded query strings are part of the HTML4+ spec,
|
|
52977
|
+
// and not the HTTP spec.
|
|
52978
|
+
return components;
|
|
52979
|
+
}
|
|
52980
|
+
function wsParse(wsComponents) {
|
|
52981
|
+
// indicate if the secure flag is set
|
|
52982
|
+
wsComponents.secure = isSecure(wsComponents);
|
|
52983
|
+
// construct resouce name
|
|
52984
|
+
wsComponents.resourceName = (wsComponents.path || "/") + (wsComponents.query ? "?" + wsComponents.query : "");
|
|
52985
|
+
wsComponents.path = undefined;
|
|
52986
|
+
wsComponents.query = undefined;
|
|
52987
|
+
return wsComponents;
|
|
52988
|
+
}
|
|
52989
|
+
function wsSerialize(wsComponents) {
|
|
52990
|
+
// normalize the default port
|
|
52991
|
+
if (wsComponents.port === (isSecure(wsComponents) ? 443 : 80) || wsComponents.port === "") {
|
|
52992
|
+
wsComponents.port = undefined;
|
|
52993
|
+
}
|
|
52994
|
+
// ensure scheme matches secure flag
|
|
52995
|
+
if (typeof wsComponents.secure === "boolean") {
|
|
52996
|
+
wsComponents.scheme = wsComponents.secure ? "wss" : "ws";
|
|
52997
|
+
wsComponents.secure = undefined;
|
|
52998
|
+
}
|
|
52999
|
+
// reconstruct path from resource name
|
|
53000
|
+
if (wsComponents.resourceName) {
|
|
53001
|
+
var _wsComponents_resourceName_split = _sliced_to_array$1(wsComponents.resourceName.split("?"), 2), path = _wsComponents_resourceName_split[0], query = _wsComponents_resourceName_split[1];
|
|
53002
|
+
wsComponents.path = path && path !== "/" ? path : undefined;
|
|
53003
|
+
wsComponents.query = query;
|
|
53004
|
+
wsComponents.resourceName = undefined;
|
|
53005
|
+
}
|
|
53006
|
+
// forbid fragment component
|
|
53007
|
+
wsComponents.fragment = undefined;
|
|
53008
|
+
return wsComponents;
|
|
53009
|
+
}
|
|
53010
|
+
function urnParse(urnComponents, options) {
|
|
53011
|
+
if (!urnComponents.path) {
|
|
53012
|
+
urnComponents.error = "URN can not be parsed";
|
|
53013
|
+
return urnComponents;
|
|
53014
|
+
}
|
|
53015
|
+
var matches = urnComponents.path.match(URN_REG);
|
|
53016
|
+
if (matches) {
|
|
53017
|
+
var scheme = options.scheme || urnComponents.scheme || "urn";
|
|
53018
|
+
urnComponents.nid = matches[1].toLowerCase();
|
|
53019
|
+
urnComponents.nss = matches[2];
|
|
53020
|
+
var urnScheme = "".concat(scheme, ":").concat(options.nid || urnComponents.nid);
|
|
53021
|
+
var schemeHandler = SCHEMES$1[urnScheme];
|
|
53022
|
+
urnComponents.path = undefined;
|
|
53023
|
+
if (schemeHandler) {
|
|
53024
|
+
urnComponents = schemeHandler.parse(urnComponents, options);
|
|
52745
53025
|
}
|
|
52746
|
-
|
|
52747
|
-
|
|
52748
|
-
|
|
52749
|
-
|
|
52750
|
-
|
|
52751
|
-
|
|
52752
|
-
|
|
52753
|
-
|
|
52754
|
-
|
|
52755
|
-
|
|
52756
|
-
|
|
52757
|
-
|
|
52758
|
-
|
|
52759
|
-
|
|
52760
|
-
|
|
52761
|
-
|
|
52762
|
-
|
|
52763
|
-
|
|
52764
|
-
|
|
52765
|
-
|
|
52766
|
-
|
|
52767
|
-
|
|
52768
|
-
|
|
52769
|
-
|
|
52770
|
-
|
|
52771
|
-
|
|
52772
|
-
|
|
52773
|
-
|
|
52774
|
-
|
|
52775
|
-
|
|
53026
|
+
} else {
|
|
53027
|
+
urnComponents.error = urnComponents.error || "URN can not be parsed.";
|
|
53028
|
+
}
|
|
53029
|
+
return urnComponents;
|
|
53030
|
+
}
|
|
53031
|
+
function urnSerialize(urnComponents, options) {
|
|
53032
|
+
var scheme = options.scheme || urnComponents.scheme || "urn";
|
|
53033
|
+
var nid = urnComponents.nid.toLowerCase();
|
|
53034
|
+
var urnScheme = "".concat(scheme, ":").concat(options.nid || nid);
|
|
53035
|
+
var schemeHandler = SCHEMES$1[urnScheme];
|
|
53036
|
+
if (schemeHandler) {
|
|
53037
|
+
urnComponents = schemeHandler.serialize(urnComponents, options);
|
|
53038
|
+
}
|
|
53039
|
+
var uriComponents = urnComponents;
|
|
53040
|
+
var nss = urnComponents.nss;
|
|
53041
|
+
uriComponents.path = "".concat(nid || options.nid, ":").concat(nss);
|
|
53042
|
+
options.skipEscape = true;
|
|
53043
|
+
return uriComponents;
|
|
53044
|
+
}
|
|
53045
|
+
function urnuuidParse(urnComponents, options) {
|
|
53046
|
+
var uuidComponents = urnComponents;
|
|
53047
|
+
uuidComponents.uuid = uuidComponents.nss;
|
|
53048
|
+
uuidComponents.nss = undefined;
|
|
53049
|
+
if (!options.tolerant && (!uuidComponents.uuid || !UUID_REG.test(uuidComponents.uuid))) {
|
|
53050
|
+
uuidComponents.error = uuidComponents.error || "UUID is not valid.";
|
|
53051
|
+
}
|
|
53052
|
+
return uuidComponents;
|
|
53053
|
+
}
|
|
53054
|
+
function urnuuidSerialize(uuidComponents) {
|
|
53055
|
+
var urnComponents = uuidComponents;
|
|
53056
|
+
// normalize UUID
|
|
53057
|
+
urnComponents.nss = (uuidComponents.uuid || "").toLowerCase();
|
|
53058
|
+
return urnComponents;
|
|
53059
|
+
}
|
|
53060
|
+
var http = {
|
|
53061
|
+
scheme: "http",
|
|
53062
|
+
domainHost: true,
|
|
53063
|
+
parse: httpParse,
|
|
53064
|
+
serialize: httpSerialize
|
|
53065
|
+
};
|
|
53066
|
+
var https = {
|
|
53067
|
+
scheme: "https",
|
|
53068
|
+
domainHost: http.domainHost,
|
|
53069
|
+
parse: httpParse,
|
|
53070
|
+
serialize: httpSerialize
|
|
53071
|
+
};
|
|
53072
|
+
var ws$1 = {
|
|
53073
|
+
scheme: "ws",
|
|
53074
|
+
domainHost: true,
|
|
53075
|
+
parse: wsParse,
|
|
53076
|
+
serialize: wsSerialize
|
|
53077
|
+
};
|
|
53078
|
+
var wss = {
|
|
53079
|
+
scheme: "wss",
|
|
53080
|
+
domainHost: ws$1.domainHost,
|
|
53081
|
+
parse: ws$1.parse,
|
|
53082
|
+
serialize: ws$1.serialize
|
|
53083
|
+
};
|
|
53084
|
+
var urn = {
|
|
53085
|
+
scheme: "urn",
|
|
53086
|
+
parse: urnParse,
|
|
53087
|
+
serialize: urnSerialize,
|
|
53088
|
+
skipNormalize: true
|
|
53089
|
+
};
|
|
53090
|
+
var urnuuid = {
|
|
53091
|
+
scheme: "urn:uuid",
|
|
53092
|
+
parse: urnuuidParse,
|
|
53093
|
+
serialize: urnuuidSerialize,
|
|
53094
|
+
skipNormalize: true
|
|
53095
|
+
};
|
|
53096
|
+
var SCHEMES$1 = {
|
|
53097
|
+
http: http,
|
|
53098
|
+
https: https,
|
|
53099
|
+
ws: ws$1,
|
|
53100
|
+
wss: wss,
|
|
53101
|
+
urn: urn,
|
|
53102
|
+
"urn:uuid": urnuuid
|
|
53103
|
+
};
|
|
53104
|
+
var schemes = SCHEMES$1;
|
|
53105
|
+
|
|
53106
|
+
function _define_property(obj, key, value) {
|
|
53107
|
+
if (key in obj) {
|
|
53108
|
+
Object.defineProperty(obj, key, {
|
|
53109
|
+
value: value,
|
|
53110
|
+
enumerable: true,
|
|
53111
|
+
configurable: true,
|
|
53112
|
+
writable: true
|
|
52776
53113
|
});
|
|
52777
|
-
}
|
|
52778
|
-
|
|
52779
|
-
/**
|
|
52780
|
-
* A string representing the current Punycode.js version number.
|
|
52781
|
-
* @memberOf punycode
|
|
52782
|
-
* @type String
|
|
52783
|
-
*/ "version": "2.1.0",
|
|
52784
|
-
/**
|
|
52785
|
-
* An object of methods to convert from JavaScript's internal character
|
|
52786
|
-
* representation (UCS-2) to Unicode code points, and back.
|
|
52787
|
-
* @see <https://mathiasbynens.be/notes/javascript-encoding>
|
|
52788
|
-
* @memberOf punycode
|
|
52789
|
-
* @type Object
|
|
52790
|
-
*/ "ucs2": {
|
|
52791
|
-
"decode": ucs2decode,
|
|
52792
|
-
"encode": ucs2encode
|
|
52793
|
-
},
|
|
52794
|
-
"decode": decode,
|
|
52795
|
-
"encode": encode,
|
|
52796
|
-
"toASCII": toASCII,
|
|
52797
|
-
"toUnicode": toUnicode
|
|
52798
|
-
};
|
|
52799
|
-
/**
|
|
52800
|
-
* URI.js
|
|
52801
|
-
*
|
|
52802
|
-
* @fileoverview An RFC 3986 compliant, scheme extendable URI parsing/validating/resolving library for JavaScript.
|
|
52803
|
-
* @author <a href="mailto:gary.court@gmail.com">Gary Court</a>
|
|
52804
|
-
* @see http://github.com/garycourt/uri-js
|
|
52805
|
-
*/ /**
|
|
52806
|
-
* Copyright 2011 Gary Court. All rights reserved.
|
|
52807
|
-
*
|
|
52808
|
-
* Redistribution and use in source and binary forms, with or without modification, are
|
|
52809
|
-
* permitted provided that the following conditions are met:
|
|
52810
|
-
*
|
|
52811
|
-
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
|
52812
|
-
* conditions and the following disclaimer.
|
|
52813
|
-
*
|
|
52814
|
-
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
|
52815
|
-
* of conditions and the following disclaimer in the documentation and/or other materials
|
|
52816
|
-
* provided with the distribution.
|
|
52817
|
-
*
|
|
52818
|
-
* THIS SOFTWARE IS PROVIDED BY GARY COURT ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
|
52819
|
-
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
|
52820
|
-
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GARY COURT OR
|
|
52821
|
-
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
52822
|
-
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
52823
|
-
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
|
52824
|
-
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
|
52825
|
-
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
|
52826
|
-
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
52827
|
-
*
|
|
52828
|
-
* The views and conclusions contained in the software and documentation are those of the
|
|
52829
|
-
* authors and should not be interpreted as representing official policies, either expressed
|
|
52830
|
-
* or implied, of Gary Court.
|
|
52831
|
-
*/ var SCHEMES = {};
|
|
52832
|
-
function pctEncChar(chr) {
|
|
52833
|
-
var c = chr.charCodeAt(0);
|
|
52834
|
-
var e = void 0;
|
|
52835
|
-
if (c < 16) e = "%0" + c.toString(16).toUpperCase();
|
|
52836
|
-
else if (c < 128) e = "%" + c.toString(16).toUpperCase();
|
|
52837
|
-
else if (c < 2048) e = "%" + (c >> 6 | 192).toString(16).toUpperCase() + "%" + (c & 63 | 128).toString(16).toUpperCase();
|
|
52838
|
-
else e = "%" + (c >> 12 | 224).toString(16).toUpperCase() + "%" + (c >> 6 & 63 | 128).toString(16).toUpperCase() + "%" + (c & 63 | 128).toString(16).toUpperCase();
|
|
52839
|
-
return e;
|
|
53114
|
+
} else {
|
|
53115
|
+
obj[key] = value;
|
|
52840
53116
|
}
|
|
52841
|
-
|
|
52842
|
-
|
|
52843
|
-
|
|
52844
|
-
|
|
52845
|
-
|
|
52846
|
-
|
|
52847
|
-
|
|
52848
|
-
|
|
52849
|
-
|
|
52850
|
-
}
|
|
52851
|
-
if (il - i >= 6) {
|
|
52852
|
-
var c2 = parseInt(str.substr(i + 4, 2), 16);
|
|
52853
|
-
newStr += String.fromCharCode((c & 31) << 6 | c2 & 63);
|
|
52854
|
-
} else {
|
|
52855
|
-
newStr += str.substr(i, 6);
|
|
52856
|
-
}
|
|
52857
|
-
i += 6;
|
|
52858
|
-
} else if (c >= 224) {
|
|
52859
|
-
if (il - i >= 9) {
|
|
52860
|
-
var _c = parseInt(str.substr(i + 4, 2), 16);
|
|
52861
|
-
var c3 = parseInt(str.substr(i + 7, 2), 16);
|
|
52862
|
-
newStr += String.fromCharCode((c & 15) << 12 | (_c & 63) << 6 | c3 & 63);
|
|
52863
|
-
} else {
|
|
52864
|
-
newStr += str.substr(i, 9);
|
|
52865
|
-
}
|
|
52866
|
-
i += 9;
|
|
52867
|
-
} else {
|
|
52868
|
-
newStr += str.substr(i, 3);
|
|
52869
|
-
i += 3;
|
|
52870
|
-
}
|
|
53117
|
+
return obj;
|
|
53118
|
+
}
|
|
53119
|
+
function _object_spread(target) {
|
|
53120
|
+
for(var i = 1; i < arguments.length; i++){
|
|
53121
|
+
var source = arguments[i] != null ? arguments[i] : {};
|
|
53122
|
+
var ownKeys = Object.keys(source);
|
|
53123
|
+
if (typeof Object.getOwnPropertySymbols === "function") {
|
|
53124
|
+
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
53125
|
+
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
53126
|
+
}));
|
|
52871
53127
|
}
|
|
52872
|
-
|
|
53128
|
+
ownKeys.forEach(function(key) {
|
|
53129
|
+
_define_property(target, key, source[key]);
|
|
53130
|
+
});
|
|
52873
53131
|
}
|
|
52874
|
-
|
|
52875
|
-
|
|
52876
|
-
|
|
52877
|
-
|
|
53132
|
+
return target;
|
|
53133
|
+
}
|
|
53134
|
+
function ownKeys(object, enumerableOnly) {
|
|
53135
|
+
var keys = Object.keys(object);
|
|
53136
|
+
if (Object.getOwnPropertySymbols) {
|
|
53137
|
+
var symbols = Object.getOwnPropertySymbols(object);
|
|
53138
|
+
if (enumerableOnly) {
|
|
53139
|
+
symbols = symbols.filter(function(sym) {
|
|
53140
|
+
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
53141
|
+
});
|
|
52878
53142
|
}
|
|
52879
|
-
|
|
52880
|
-
if (components.userinfo !== undefined) components.userinfo = String(components.userinfo).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_USERINFO, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);
|
|
52881
|
-
if (components.host !== undefined) components.host = String(components.host).replace(protocol.PCT_ENCODED, decodeUnreserved).toLowerCase().replace(protocol.NOT_HOST, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);
|
|
52882
|
-
if (components.path !== undefined) components.path = String(components.path).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(components.scheme ? protocol.NOT_PATH : protocol.NOT_PATH_NOSCHEME, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);
|
|
52883
|
-
if (components.query !== undefined) components.query = String(components.query).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_QUERY, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);
|
|
52884
|
-
if (components.fragment !== undefined) components.fragment = String(components.fragment).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_FRAGMENT, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);
|
|
52885
|
-
return components;
|
|
53143
|
+
keys.push.apply(keys, symbols);
|
|
52886
53144
|
}
|
|
52887
|
-
|
|
52888
|
-
|
|
53145
|
+
return keys;
|
|
53146
|
+
}
|
|
53147
|
+
function _object_spread_props(target, source) {
|
|
53148
|
+
source = source != null ? source : {};
|
|
53149
|
+
if (Object.getOwnPropertyDescriptors) {
|
|
53150
|
+
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
53151
|
+
} else {
|
|
53152
|
+
ownKeys(Object(source)).forEach(function(key) {
|
|
53153
|
+
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
53154
|
+
});
|
|
52889
53155
|
}
|
|
52890
|
-
|
|
52891
|
-
|
|
52892
|
-
|
|
52893
|
-
|
|
52894
|
-
|
|
52895
|
-
|
|
52896
|
-
|
|
52897
|
-
|
|
52898
|
-
|
|
52899
|
-
|
|
52900
|
-
|
|
52901
|
-
|
|
52902
|
-
|
|
52903
|
-
|
|
52904
|
-
|
|
52905
|
-
|
|
52906
|
-
|
|
52907
|
-
|
|
52908
|
-
|
|
52909
|
-
|
|
52910
|
-
|
|
52911
|
-
|
|
52912
|
-
|
|
52913
|
-
|
|
52914
|
-
|
|
52915
|
-
|
|
52916
|
-
|
|
52917
|
-
|
|
52918
|
-
|
|
52919
|
-
|
|
52920
|
-
|
|
52921
|
-
|
|
52922
|
-
|
|
52923
|
-
|
|
52924
|
-
|
|
52925
|
-
|
|
52926
|
-
|
|
52927
|
-
|
|
52928
|
-
|
|
52929
|
-
|
|
52930
|
-
|
|
52931
|
-
|
|
52932
|
-
|
|
52933
|
-
|
|
52934
|
-
|
|
52935
|
-
|
|
52936
|
-
var newLast = fields.slice(longestZeroFields.index + longestZeroFields.length);
|
|
52937
|
-
newHost = newFirst.join(":") + "::" + newLast.join(":");
|
|
52938
|
-
} else {
|
|
52939
|
-
newHost = fields.join(":");
|
|
52940
|
-
}
|
|
52941
|
-
if (zone) {
|
|
52942
|
-
newHost += "%" + zone;
|
|
52943
|
-
}
|
|
52944
|
-
return newHost;
|
|
53156
|
+
return target;
|
|
53157
|
+
}
|
|
53158
|
+
var _require = utils, normalizeIPv6 = _require.normalizeIPv6, normalizeIPv4 = _require.normalizeIPv4, removeDotSegments = _require.removeDotSegments, recomposeAuthority = _require.recomposeAuthority, normalizeComponentEncoding = _require.normalizeComponentEncoding;
|
|
53159
|
+
var SCHEMES = schemes;
|
|
53160
|
+
function normalize(uri, options) {
|
|
53161
|
+
if (typeof uri === "string") {
|
|
53162
|
+
uri = serialize(parse(uri, options), options);
|
|
53163
|
+
} else if (typeof uri === "object") {
|
|
53164
|
+
uri = parse(serialize(uri, options), options);
|
|
53165
|
+
}
|
|
53166
|
+
return uri;
|
|
53167
|
+
}
|
|
53168
|
+
function resolve(baseURI, relativeURI, options) {
|
|
53169
|
+
var schemelessOptions = Object.assign({
|
|
53170
|
+
scheme: "null"
|
|
53171
|
+
}, options);
|
|
53172
|
+
var resolved = resolveComponents(parse(baseURI, schemelessOptions), parse(relativeURI, schemelessOptions), schemelessOptions, true);
|
|
53173
|
+
return serialize(resolved, _object_spread_props(_object_spread({}, schemelessOptions), {
|
|
53174
|
+
skipEscape: true
|
|
53175
|
+
}));
|
|
53176
|
+
}
|
|
53177
|
+
function resolveComponents(base, relative, options, skipNormalization) {
|
|
53178
|
+
var target = {};
|
|
53179
|
+
if (!skipNormalization) {
|
|
53180
|
+
base = parse(serialize(base, options), options) // normalize base components
|
|
53181
|
+
;
|
|
53182
|
+
relative = parse(serialize(relative, options), options) // normalize relative components
|
|
53183
|
+
;
|
|
53184
|
+
}
|
|
53185
|
+
options = options || {};
|
|
53186
|
+
if (!options.tolerant && relative.scheme) {
|
|
53187
|
+
target.scheme = relative.scheme;
|
|
53188
|
+
// target.authority = relative.authority;
|
|
53189
|
+
target.userinfo = relative.userinfo;
|
|
53190
|
+
target.host = relative.host;
|
|
53191
|
+
target.port = relative.port;
|
|
53192
|
+
target.path = removeDotSegments(relative.path || "");
|
|
53193
|
+
target.query = relative.query;
|
|
53194
|
+
} else {
|
|
53195
|
+
if (relative.userinfo !== undefined || relative.host !== undefined || relative.port !== undefined) {
|
|
53196
|
+
// target.authority = relative.authority;
|
|
53197
|
+
target.userinfo = relative.userinfo;
|
|
53198
|
+
target.host = relative.host;
|
|
53199
|
+
target.port = relative.port;
|
|
53200
|
+
target.path = removeDotSegments(relative.path || "");
|
|
53201
|
+
target.query = relative.query;
|
|
52945
53202
|
} else {
|
|
52946
|
-
|
|
52947
|
-
|
|
52948
|
-
|
|
52949
|
-
|
|
52950
|
-
|
|
52951
|
-
|
|
52952
|
-
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
52953
|
-
var components = {};
|
|
52954
|
-
var protocol = options.iri !== false ? IRI_PROTOCOL : URI_PROTOCOL;
|
|
52955
|
-
if (options.reference === "suffix") uriString = (options.scheme ? options.scheme + ":" : "") + "//" + uriString;
|
|
52956
|
-
var matches = uriString.match(URI_PARSE);
|
|
52957
|
-
if (matches) {
|
|
52958
|
-
if (NO_MATCH_IS_UNDEFINED) {
|
|
52959
|
-
//store each component
|
|
52960
|
-
components.scheme = matches[1];
|
|
52961
|
-
components.userinfo = matches[3];
|
|
52962
|
-
components.host = matches[4];
|
|
52963
|
-
components.port = parseInt(matches[5], 10);
|
|
52964
|
-
components.path = matches[6] || "";
|
|
52965
|
-
components.query = matches[7];
|
|
52966
|
-
components.fragment = matches[8];
|
|
52967
|
-
//fix port number
|
|
52968
|
-
if (isNaN(components.port)) {
|
|
52969
|
-
components.port = matches[5];
|
|
53203
|
+
if (!relative.path) {
|
|
53204
|
+
target.path = base.path;
|
|
53205
|
+
if (relative.query !== undefined) {
|
|
53206
|
+
target.query = relative.query;
|
|
53207
|
+
} else {
|
|
53208
|
+
target.query = base.query;
|
|
52970
53209
|
}
|
|
52971
53210
|
} else {
|
|
52972
|
-
|
|
52973
|
-
|
|
52974
|
-
|
|
52975
|
-
|
|
52976
|
-
|
|
52977
|
-
|
|
52978
|
-
|
|
52979
|
-
|
|
52980
|
-
|
|
52981
|
-
//fix port number
|
|
52982
|
-
if (isNaN(components.port)) {
|
|
52983
|
-
components.port = uriString.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/) ? matches[4] : undefined;
|
|
52984
|
-
}
|
|
52985
|
-
}
|
|
52986
|
-
if (components.host) {
|
|
52987
|
-
//normalize IP hosts
|
|
52988
|
-
components.host = _normalizeIPv6(_normalizeIPv4(components.host, protocol), protocol);
|
|
52989
|
-
}
|
|
52990
|
-
//determine reference type
|
|
52991
|
-
if (components.scheme === undefined && components.userinfo === undefined && components.host === undefined && components.port === undefined && !components.path && components.query === undefined) {
|
|
52992
|
-
components.reference = "same-document";
|
|
52993
|
-
} else if (components.scheme === undefined) {
|
|
52994
|
-
components.reference = "relative";
|
|
52995
|
-
} else if (components.fragment === undefined) {
|
|
52996
|
-
components.reference = "absolute";
|
|
52997
|
-
} else {
|
|
52998
|
-
components.reference = "uri";
|
|
52999
|
-
}
|
|
53000
|
-
//check for reference errors
|
|
53001
|
-
if (options.reference && options.reference !== "suffix" && options.reference !== components.reference) {
|
|
53002
|
-
components.error = components.error || "URI is not a " + options.reference + " reference.";
|
|
53003
|
-
}
|
|
53004
|
-
//find scheme handler
|
|
53005
|
-
var schemeHandler = SCHEMES[(options.scheme || components.scheme || "").toLowerCase()];
|
|
53006
|
-
//check if scheme can't handle IRIs
|
|
53007
|
-
if (!options.unicodeSupport && (!schemeHandler || !schemeHandler.unicodeSupport)) {
|
|
53008
|
-
//if host component is a domain name
|
|
53009
|
-
if (components.host && (options.domainHost || schemeHandler && schemeHandler.domainHost)) {
|
|
53010
|
-
//convert Unicode IDN -> ASCII IDN
|
|
53011
|
-
try {
|
|
53012
|
-
components.host = punycode.toASCII(components.host.replace(protocol.PCT_ENCODED, pctDecChars).toLowerCase());
|
|
53013
|
-
} catch (e) {
|
|
53014
|
-
components.error = components.error || "Host's domain name can not be converted to ASCII via punycode: " + e;
|
|
53211
|
+
if (relative.path.charAt(0) === "/") {
|
|
53212
|
+
target.path = removeDotSegments(relative.path);
|
|
53213
|
+
} else {
|
|
53214
|
+
if ((base.userinfo !== undefined || base.host !== undefined || base.port !== undefined) && !base.path) {
|
|
53215
|
+
target.path = "/" + relative.path;
|
|
53216
|
+
} else if (!base.path) {
|
|
53217
|
+
target.path = relative.path;
|
|
53218
|
+
} else {
|
|
53219
|
+
target.path = base.path.slice(0, base.path.lastIndexOf("/") + 1) + relative.path;
|
|
53015
53220
|
}
|
|
53221
|
+
target.path = removeDotSegments(target.path);
|
|
53016
53222
|
}
|
|
53017
|
-
|
|
53018
|
-
_normalizeComponentEncoding(components, URI_PROTOCOL);
|
|
53019
|
-
} else {
|
|
53020
|
-
//normalize encodings
|
|
53021
|
-
_normalizeComponentEncoding(components, protocol);
|
|
53223
|
+
target.query = relative.query;
|
|
53022
53224
|
}
|
|
53023
|
-
//
|
|
53024
|
-
|
|
53025
|
-
|
|
53225
|
+
// target.authority = base.authority;
|
|
53226
|
+
target.userinfo = base.userinfo;
|
|
53227
|
+
target.host = base.host;
|
|
53228
|
+
target.port = base.port;
|
|
53229
|
+
}
|
|
53230
|
+
target.scheme = base.scheme;
|
|
53231
|
+
}
|
|
53232
|
+
target.fragment = relative.fragment;
|
|
53233
|
+
return target;
|
|
53234
|
+
}
|
|
53235
|
+
function equal$2(uriA, uriB, options) {
|
|
53236
|
+
if (typeof uriA === "string") {
|
|
53237
|
+
uriA = unescape(uriA);
|
|
53238
|
+
uriA = serialize(normalizeComponentEncoding(parse(uriA, options), true), _object_spread_props(_object_spread({}, options), {
|
|
53239
|
+
skipEscape: true
|
|
53240
|
+
}));
|
|
53241
|
+
} else if (typeof uriA === "object") {
|
|
53242
|
+
uriA = serialize(normalizeComponentEncoding(uriA, true), _object_spread_props(_object_spread({}, options), {
|
|
53243
|
+
skipEscape: true
|
|
53244
|
+
}));
|
|
53245
|
+
}
|
|
53246
|
+
if (typeof uriB === "string") {
|
|
53247
|
+
uriB = unescape(uriB);
|
|
53248
|
+
uriB = serialize(normalizeComponentEncoding(parse(uriB, options), true), _object_spread_props(_object_spread({}, options), {
|
|
53249
|
+
skipEscape: true
|
|
53250
|
+
}));
|
|
53251
|
+
} else if (typeof uriB === "object") {
|
|
53252
|
+
uriB = serialize(normalizeComponentEncoding(uriB, true), _object_spread_props(_object_spread({}, options), {
|
|
53253
|
+
skipEscape: true
|
|
53254
|
+
}));
|
|
53255
|
+
}
|
|
53256
|
+
return uriA.toLowerCase() === uriB.toLowerCase();
|
|
53257
|
+
}
|
|
53258
|
+
function serialize(cmpts, opts) {
|
|
53259
|
+
var components = {
|
|
53260
|
+
host: cmpts.host,
|
|
53261
|
+
scheme: cmpts.scheme,
|
|
53262
|
+
userinfo: cmpts.userinfo,
|
|
53263
|
+
port: cmpts.port,
|
|
53264
|
+
path: cmpts.path,
|
|
53265
|
+
query: cmpts.query,
|
|
53266
|
+
nid: cmpts.nid,
|
|
53267
|
+
nss: cmpts.nss,
|
|
53268
|
+
uuid: cmpts.uuid,
|
|
53269
|
+
fragment: cmpts.fragment,
|
|
53270
|
+
reference: cmpts.reference,
|
|
53271
|
+
resourceName: cmpts.resourceName,
|
|
53272
|
+
secure: cmpts.secure,
|
|
53273
|
+
error: ""
|
|
53274
|
+
};
|
|
53275
|
+
var options = Object.assign({}, opts);
|
|
53276
|
+
var uriTokens = [];
|
|
53277
|
+
// find scheme handler
|
|
53278
|
+
var schemeHandler = SCHEMES[(options.scheme || components.scheme || "").toLowerCase()];
|
|
53279
|
+
// perform scheme specific serialization
|
|
53280
|
+
if (schemeHandler && schemeHandler.serialize) schemeHandler.serialize(components, options);
|
|
53281
|
+
if (components.path !== undefined) {
|
|
53282
|
+
if (!options.skipEscape) {
|
|
53283
|
+
components.path = escape(components.path);
|
|
53284
|
+
if (components.scheme !== undefined) {
|
|
53285
|
+
components.path = components.path.split("%3A").join(":");
|
|
53026
53286
|
}
|
|
53027
53287
|
} else {
|
|
53028
|
-
components.
|
|
53288
|
+
components.path = unescape(components.path);
|
|
53029
53289
|
}
|
|
53030
|
-
return components;
|
|
53031
53290
|
}
|
|
53032
|
-
|
|
53033
|
-
|
|
53034
|
-
|
|
53035
|
-
|
|
53036
|
-
|
|
53037
|
-
|
|
53291
|
+
if (options.reference !== "suffix" && components.scheme) {
|
|
53292
|
+
uriTokens.push(components.scheme);
|
|
53293
|
+
uriTokens.push(":");
|
|
53294
|
+
}
|
|
53295
|
+
var authority = recomposeAuthority(components, options);
|
|
53296
|
+
if (authority !== undefined) {
|
|
53297
|
+
if (options.reference !== "suffix") {
|
|
53298
|
+
uriTokens.push("//");
|
|
53038
53299
|
}
|
|
53039
|
-
|
|
53040
|
-
|
|
53041
|
-
uriTokens.push(
|
|
53042
|
-
|
|
53043
|
-
|
|
53300
|
+
uriTokens.push(authority);
|
|
53301
|
+
if (components.path && components.path.charAt(0) !== "/") {
|
|
53302
|
+
uriTokens.push("/");
|
|
53303
|
+
}
|
|
53304
|
+
}
|
|
53305
|
+
if (components.path !== undefined) {
|
|
53306
|
+
var s = components.path;
|
|
53307
|
+
if (!options.absolutePath && (!schemeHandler || !schemeHandler.absolutePath)) {
|
|
53308
|
+
s = removeDotSegments(s);
|
|
53309
|
+
}
|
|
53310
|
+
if (authority === undefined) {
|
|
53311
|
+
s = s.replace(RegExp("^\\/\\/", "u"), "/%2F") // don't allow the path to start with "//"
|
|
53312
|
+
;
|
|
53313
|
+
}
|
|
53314
|
+
uriTokens.push(s);
|
|
53315
|
+
}
|
|
53316
|
+
if (components.query !== undefined) {
|
|
53317
|
+
uriTokens.push("?");
|
|
53318
|
+
uriTokens.push(components.query);
|
|
53319
|
+
}
|
|
53320
|
+
if (components.fragment !== undefined) {
|
|
53321
|
+
uriTokens.push("#");
|
|
53322
|
+
uriTokens.push(components.fragment);
|
|
53323
|
+
}
|
|
53324
|
+
return uriTokens.join("");
|
|
53325
|
+
}
|
|
53326
|
+
var hexLookUp = Array.from({
|
|
53327
|
+
length: 127
|
|
53328
|
+
}, function(v, k) {
|
|
53329
|
+
return RegExp("[^!\"$&'()*+,\\-.;=_`a-z{}~]", "u").test(String.fromCharCode(k));
|
|
53330
|
+
});
|
|
53331
|
+
function nonSimpleDomain(value) {
|
|
53332
|
+
var code = 0;
|
|
53333
|
+
for(var i = 0, len = value.length; i < len; ++i){
|
|
53334
|
+
code = value.charCodeAt(i);
|
|
53335
|
+
if (code > 126 || hexLookUp[code]) {
|
|
53336
|
+
return true;
|
|
53044
53337
|
}
|
|
53045
|
-
|
|
53046
|
-
|
|
53047
|
-
|
|
53048
|
-
|
|
53049
|
-
|
|
53050
|
-
}
|
|
53051
|
-
var
|
|
53052
|
-
|
|
53053
|
-
|
|
53054
|
-
|
|
53055
|
-
|
|
53056
|
-
|
|
53057
|
-
|
|
53058
|
-
|
|
53059
|
-
|
|
53060
|
-
|
|
53061
|
-
|
|
53062
|
-
|
|
53063
|
-
|
|
53064
|
-
|
|
53065
|
-
|
|
53066
|
-
|
|
53338
|
+
}
|
|
53339
|
+
return false;
|
|
53340
|
+
}
|
|
53341
|
+
var URI_PARSE = RegExp("^(?:([^#/:?]+):)?(?:\\/\\/((?:([^#/?@]*)@)?(\\[[^#/?\\]]+\\]|[^#/:?]*)(?::(\\d*))?))?([^#?]*)(?:\\?([^#]*))?(?:#((?:.|[\\n\\r])*))?", "u");
|
|
53342
|
+
function parse(uri, opts) {
|
|
53343
|
+
var options = Object.assign({}, opts);
|
|
53344
|
+
var parsed = {
|
|
53345
|
+
scheme: undefined,
|
|
53346
|
+
userinfo: undefined,
|
|
53347
|
+
host: "",
|
|
53348
|
+
port: undefined,
|
|
53349
|
+
path: "",
|
|
53350
|
+
query: undefined,
|
|
53351
|
+
fragment: undefined
|
|
53352
|
+
};
|
|
53353
|
+
var gotEncoding = uri.indexOf("%") !== -1;
|
|
53354
|
+
var isIP = false;
|
|
53355
|
+
if (options.reference === "suffix") uri = (options.scheme ? options.scheme + ":" : "") + "//" + uri;
|
|
53356
|
+
var matches = uri.match(URI_PARSE);
|
|
53357
|
+
if (matches) {
|
|
53358
|
+
// store each component
|
|
53359
|
+
parsed.scheme = matches[1];
|
|
53360
|
+
parsed.userinfo = matches[3];
|
|
53361
|
+
parsed.host = matches[4];
|
|
53362
|
+
parsed.port = parseInt(matches[5], 10);
|
|
53363
|
+
parsed.path = matches[6] || "";
|
|
53364
|
+
parsed.query = matches[7];
|
|
53365
|
+
parsed.fragment = matches[8];
|
|
53366
|
+
// fix port number
|
|
53367
|
+
if (isNaN(parsed.port)) {
|
|
53368
|
+
parsed.port = matches[5];
|
|
53369
|
+
}
|
|
53370
|
+
if (parsed.host) {
|
|
53371
|
+
var ipv4result = normalizeIPv4(parsed.host);
|
|
53372
|
+
if (ipv4result.isIPV4 === false) {
|
|
53373
|
+
var ipv6result = normalizeIPv6(ipv4result.host, {
|
|
53374
|
+
isIPV4: false
|
|
53375
|
+
});
|
|
53376
|
+
parsed.host = ipv6result.host.toLowerCase();
|
|
53377
|
+
isIP = ipv6result.isIPV6;
|
|
53067
53378
|
} else {
|
|
53068
|
-
|
|
53069
|
-
|
|
53070
|
-
var s = im[0];
|
|
53071
|
-
input = input.slice(s.length);
|
|
53072
|
-
output.push(s);
|
|
53073
|
-
} else {
|
|
53074
|
-
throw new Error("Unexpected dot segment condition");
|
|
53075
|
-
}
|
|
53379
|
+
parsed.host = ipv4result.host;
|
|
53380
|
+
isIP = true;
|
|
53076
53381
|
}
|
|
53077
53382
|
}
|
|
53078
|
-
|
|
53079
|
-
|
|
53080
|
-
|
|
53081
|
-
|
|
53082
|
-
|
|
53083
|
-
|
|
53084
|
-
|
|
53085
|
-
|
|
53086
|
-
|
|
53087
|
-
|
|
53088
|
-
if (
|
|
53089
|
-
|
|
53090
|
-
|
|
53091
|
-
|
|
53383
|
+
if (parsed.scheme === undefined && parsed.userinfo === undefined && parsed.host === undefined && parsed.port === undefined && !parsed.path && parsed.query === undefined) {
|
|
53384
|
+
parsed.reference = "same-document";
|
|
53385
|
+
} else if (parsed.scheme === undefined) {
|
|
53386
|
+
parsed.reference = "relative";
|
|
53387
|
+
} else if (parsed.fragment === undefined) {
|
|
53388
|
+
parsed.reference = "absolute";
|
|
53389
|
+
} else {
|
|
53390
|
+
parsed.reference = "uri";
|
|
53391
|
+
}
|
|
53392
|
+
// check for reference errors
|
|
53393
|
+
if (options.reference && options.reference !== "suffix" && options.reference !== parsed.reference) {
|
|
53394
|
+
parsed.error = parsed.error || "URI is not a " + options.reference + " reference.";
|
|
53395
|
+
}
|
|
53396
|
+
// find scheme handler
|
|
53397
|
+
var schemeHandler = SCHEMES[(options.scheme || parsed.scheme || "").toLowerCase()];
|
|
53398
|
+
// check if scheme can't handle IRIs
|
|
53399
|
+
if (!options.unicodeSupport && (!schemeHandler || !schemeHandler.unicodeSupport)) {
|
|
53400
|
+
// if host component is a domain name
|
|
53401
|
+
if (parsed.host && (options.domainHost || schemeHandler && schemeHandler.domainHost) && isIP === false && nonSimpleDomain(parsed.host)) {
|
|
53402
|
+
// convert Unicode IDN -> ASCII IDN
|
|
53092
53403
|
try {
|
|
53093
|
-
|
|
53404
|
+
parsed.host = URL.domainToASCII(parsed.host.toLowerCase());
|
|
53094
53405
|
} catch (e) {
|
|
53095
|
-
|
|
53406
|
+
parsed.error = parsed.error || "Host's domain name can not be converted to ASCII: " + e;
|
|
53096
53407
|
}
|
|
53097
53408
|
}
|
|
53409
|
+
// convert IRI -> URI
|
|
53098
53410
|
}
|
|
53099
|
-
|
|
53100
|
-
|
|
53101
|
-
|
|
53102
|
-
uriTokens.push(components.scheme);
|
|
53103
|
-
uriTokens.push(":");
|
|
53104
|
-
}
|
|
53105
|
-
var authority = _recomposeAuthority(components, options);
|
|
53106
|
-
if (authority !== undefined) {
|
|
53107
|
-
if (options.reference !== "suffix") {
|
|
53108
|
-
uriTokens.push("//");
|
|
53411
|
+
if (!schemeHandler || schemeHandler && !schemeHandler.skipNormalize) {
|
|
53412
|
+
if (gotEncoding && parsed.scheme !== undefined) {
|
|
53413
|
+
parsed.scheme = unescape(parsed.scheme);
|
|
53109
53414
|
}
|
|
53110
|
-
|
|
53111
|
-
|
|
53112
|
-
uriTokens.push("/");
|
|
53415
|
+
if (gotEncoding && parsed.userinfo !== undefined) {
|
|
53416
|
+
parsed.userinfo = unescape(parsed.userinfo);
|
|
53113
53417
|
}
|
|
53114
|
-
|
|
53115
|
-
|
|
53116
|
-
var s = components.path;
|
|
53117
|
-
if (!options.absolutePath && (!schemeHandler || !schemeHandler.absolutePath)) {
|
|
53118
|
-
s = removeDotSegments(s);
|
|
53418
|
+
if (gotEncoding && parsed.host !== undefined) {
|
|
53419
|
+
parsed.host = unescape(parsed.host);
|
|
53119
53420
|
}
|
|
53120
|
-
if (
|
|
53121
|
-
|
|
53421
|
+
if (parsed.path !== undefined && parsed.path.length) {
|
|
53422
|
+
parsed.path = escape(unescape(parsed.path));
|
|
53423
|
+
}
|
|
53424
|
+
if (parsed.fragment !== undefined && parsed.fragment.length) {
|
|
53425
|
+
parsed.fragment = encodeURI(decodeURIComponent(parsed.fragment));
|
|
53122
53426
|
}
|
|
53123
|
-
uriTokens.push(s);
|
|
53124
|
-
}
|
|
53125
|
-
if (components.query !== undefined) {
|
|
53126
|
-
uriTokens.push("?");
|
|
53127
|
-
uriTokens.push(components.query);
|
|
53128
|
-
}
|
|
53129
|
-
if (components.fragment !== undefined) {
|
|
53130
|
-
uriTokens.push("#");
|
|
53131
|
-
uriTokens.push(components.fragment);
|
|
53132
53427
|
}
|
|
53133
|
-
|
|
53134
|
-
|
|
53135
|
-
|
|
53136
|
-
var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
53137
|
-
var skipNormalization = arguments[3];
|
|
53138
|
-
var target = {};
|
|
53139
|
-
if (!skipNormalization) {
|
|
53140
|
-
base = parse(serialize(base, options), options); //normalize base components
|
|
53141
|
-
relative = parse(serialize(relative, options), options); //normalize relative components
|
|
53428
|
+
// perform scheme specific parsing
|
|
53429
|
+
if (schemeHandler && schemeHandler.parse) {
|
|
53430
|
+
schemeHandler.parse(parsed, options);
|
|
53142
53431
|
}
|
|
53143
|
-
|
|
53144
|
-
|
|
53145
|
-
|
|
53146
|
-
|
|
53147
|
-
|
|
53148
|
-
|
|
53149
|
-
|
|
53150
|
-
|
|
53151
|
-
|
|
53152
|
-
|
|
53153
|
-
|
|
53154
|
-
|
|
53155
|
-
|
|
53156
|
-
|
|
53157
|
-
|
|
53158
|
-
|
|
53159
|
-
|
|
53160
|
-
} else {
|
|
53161
|
-
if (!relative.path) {
|
|
53162
|
-
target.path = base.path;
|
|
53163
|
-
if (relative.query !== undefined) {
|
|
53164
|
-
target.query = relative.query;
|
|
53165
|
-
} else {
|
|
53166
|
-
target.query = base.query;
|
|
53167
|
-
}
|
|
53168
|
-
} else {
|
|
53169
|
-
if (relative.path.charAt(0) === "/") {
|
|
53170
|
-
target.path = removeDotSegments(relative.path);
|
|
53171
|
-
} else {
|
|
53172
|
-
if ((base.userinfo !== undefined || base.host !== undefined || base.port !== undefined) && !base.path) {
|
|
53173
|
-
target.path = "/" + relative.path;
|
|
53174
|
-
} else if (!base.path) {
|
|
53175
|
-
target.path = relative.path;
|
|
53176
|
-
} else {
|
|
53177
|
-
target.path = base.path.slice(0, base.path.lastIndexOf("/") + 1) + relative.path;
|
|
53178
|
-
}
|
|
53179
|
-
target.path = removeDotSegments(target.path);
|
|
53180
|
-
}
|
|
53181
|
-
target.query = relative.query;
|
|
53182
|
-
}
|
|
53183
|
-
//target.authority = base.authority;
|
|
53184
|
-
target.userinfo = base.userinfo;
|
|
53185
|
-
target.host = base.host;
|
|
53186
|
-
target.port = base.port;
|
|
53187
|
-
}
|
|
53188
|
-
target.scheme = base.scheme;
|
|
53189
|
-
}
|
|
53190
|
-
target.fragment = relative.fragment;
|
|
53191
|
-
return target;
|
|
53192
|
-
}
|
|
53193
|
-
function resolve(baseURI, relativeURI, options) {
|
|
53194
|
-
var schemelessOptions = assign({
|
|
53195
|
-
scheme: "null"
|
|
53196
|
-
}, options);
|
|
53197
|
-
return serialize(resolveComponents(parse(baseURI, schemelessOptions), parse(relativeURI, schemelessOptions), schemelessOptions, true), schemelessOptions);
|
|
53198
|
-
}
|
|
53199
|
-
function normalize(uri, options) {
|
|
53200
|
-
if (typeof uri === "string") {
|
|
53201
|
-
uri = serialize(parse(uri, options), options);
|
|
53202
|
-
} else if (typeOf(uri) === "object") {
|
|
53203
|
-
uri = parse(serialize(uri, options), options);
|
|
53204
|
-
}
|
|
53205
|
-
return uri;
|
|
53206
|
-
}
|
|
53207
|
-
function equal(uriA, uriB, options) {
|
|
53208
|
-
if (typeof uriA === "string") {
|
|
53209
|
-
uriA = serialize(parse(uriA, options), options);
|
|
53210
|
-
} else if (typeOf(uriA) === "object") {
|
|
53211
|
-
uriA = serialize(uriA, options);
|
|
53212
|
-
}
|
|
53213
|
-
if (typeof uriB === "string") {
|
|
53214
|
-
uriB = serialize(parse(uriB, options), options);
|
|
53215
|
-
} else if (typeOf(uriB) === "object") {
|
|
53216
|
-
uriB = serialize(uriB, options);
|
|
53217
|
-
}
|
|
53218
|
-
return uriA === uriB;
|
|
53219
|
-
}
|
|
53220
|
-
function escapeComponent(str, options) {
|
|
53221
|
-
return str && str.toString().replace(!options || !options.iri ? URI_PROTOCOL.ESCAPE : IRI_PROTOCOL.ESCAPE, pctEncChar);
|
|
53222
|
-
}
|
|
53223
|
-
function unescapeComponent(str, options) {
|
|
53224
|
-
return str && str.toString().replace(!options || !options.iri ? URI_PROTOCOL.PCT_ENCODED : IRI_PROTOCOL.PCT_ENCODED, pctDecChars);
|
|
53225
|
-
}
|
|
53226
|
-
var handler = {
|
|
53227
|
-
scheme: "http",
|
|
53228
|
-
domainHost: true,
|
|
53229
|
-
parse: function parse(components, options) {
|
|
53230
|
-
//report missing host
|
|
53231
|
-
if (!components.host) {
|
|
53232
|
-
components.error = components.error || "HTTP URIs must have a host.";
|
|
53233
|
-
}
|
|
53234
|
-
return components;
|
|
53235
|
-
},
|
|
53236
|
-
serialize: function serialize(components, options) {
|
|
53237
|
-
var secure = String(components.scheme).toLowerCase() === "https";
|
|
53238
|
-
//normalize the default port
|
|
53239
|
-
if (components.port === (secure ? 443 : 80) || components.port === "") {
|
|
53240
|
-
components.port = undefined;
|
|
53241
|
-
}
|
|
53242
|
-
//normalize the empty path
|
|
53243
|
-
if (!components.path) {
|
|
53244
|
-
components.path = "/";
|
|
53245
|
-
}
|
|
53246
|
-
//NOTE: We do not parse query strings for HTTP URIs
|
|
53247
|
-
//as WWW Form Url Encoded query strings are part of the HTML4+ spec,
|
|
53248
|
-
//and not the HTTP spec.
|
|
53249
|
-
return components;
|
|
53250
|
-
}
|
|
53251
|
-
};
|
|
53252
|
-
var handler$1 = {
|
|
53253
|
-
scheme: "https",
|
|
53254
|
-
domainHost: handler.domainHost,
|
|
53255
|
-
parse: handler.parse,
|
|
53256
|
-
serialize: handler.serialize
|
|
53257
|
-
};
|
|
53258
|
-
function isSecure(wsComponents) {
|
|
53259
|
-
return typeof wsComponents.secure === "boolean" ? wsComponents.secure : String(wsComponents.scheme).toLowerCase() === "wss";
|
|
53260
|
-
}
|
|
53261
|
-
//RFC 6455
|
|
53262
|
-
var handler$2 = {
|
|
53263
|
-
scheme: "ws",
|
|
53264
|
-
domainHost: true,
|
|
53265
|
-
parse: function parse(components, options) {
|
|
53266
|
-
var wsComponents = components;
|
|
53267
|
-
//indicate if the secure flag is set
|
|
53268
|
-
wsComponents.secure = isSecure(wsComponents);
|
|
53269
|
-
//construct resouce name
|
|
53270
|
-
wsComponents.resourceName = (wsComponents.path || "/") + (wsComponents.query ? "?" + wsComponents.query : "");
|
|
53271
|
-
wsComponents.path = undefined;
|
|
53272
|
-
wsComponents.query = undefined;
|
|
53273
|
-
return wsComponents;
|
|
53274
|
-
},
|
|
53275
|
-
serialize: function serialize(wsComponents, options) {
|
|
53276
|
-
//normalize the default port
|
|
53277
|
-
if (wsComponents.port === (isSecure(wsComponents) ? 443 : 80) || wsComponents.port === "") {
|
|
53278
|
-
wsComponents.port = undefined;
|
|
53279
|
-
}
|
|
53280
|
-
//ensure scheme matches secure flag
|
|
53281
|
-
if (typeof wsComponents.secure === "boolean") {
|
|
53282
|
-
wsComponents.scheme = wsComponents.secure ? "wss" : "ws";
|
|
53283
|
-
wsComponents.secure = undefined;
|
|
53284
|
-
}
|
|
53285
|
-
//reconstruct path from resource name
|
|
53286
|
-
if (wsComponents.resourceName) {
|
|
53287
|
-
var _wsComponents$resourc = wsComponents.resourceName.split("?"), _wsComponents$resourc2 = slicedToArray(_wsComponents$resourc, 2), path = _wsComponents$resourc2[0], query = _wsComponents$resourc2[1];
|
|
53288
|
-
wsComponents.path = path && path !== "/" ? path : undefined;
|
|
53289
|
-
wsComponents.query = query;
|
|
53290
|
-
wsComponents.resourceName = undefined;
|
|
53291
|
-
}
|
|
53292
|
-
//forbid fragment component
|
|
53293
|
-
wsComponents.fragment = undefined;
|
|
53294
|
-
return wsComponents;
|
|
53295
|
-
}
|
|
53296
|
-
};
|
|
53297
|
-
var handler$3 = {
|
|
53298
|
-
scheme: "wss",
|
|
53299
|
-
domainHost: handler$2.domainHost,
|
|
53300
|
-
parse: handler$2.parse,
|
|
53301
|
-
serialize: handler$2.serialize
|
|
53302
|
-
};
|
|
53303
|
-
var O = {};
|
|
53304
|
-
//RFC 3986
|
|
53305
|
-
var UNRESERVED$$ = "[A-Za-z0-9\\-\\.\\_\\~" + ("\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF" ) + "]";
|
|
53306
|
-
var HEXDIG$$ = "[0-9A-Fa-f]"; //case-insensitive
|
|
53307
|
-
var PCT_ENCODED$ = subexp(subexp("%[EFef]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%[89A-Fa-f]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%" + HEXDIG$$ + HEXDIG$$)); //expanded
|
|
53308
|
-
//RFC 5322, except these symbols as per RFC 6068: @ : / ? # [ ] & ; =
|
|
53309
|
-
//const ATEXT$$ = "[A-Za-z0-9\\!\\#\\$\\%\\&\\'\\*\\+\\-\\/\\=\\?\\^\\_\\`\\{\\|\\}\\~]";
|
|
53310
|
-
//const WSP$$ = "[\\x20\\x09]";
|
|
53311
|
-
//const OBS_QTEXT$$ = "[\\x01-\\x08\\x0B\\x0C\\x0E-\\x1F\\x7F]"; //(%d1-8 / %d11-12 / %d14-31 / %d127)
|
|
53312
|
-
//const QTEXT$$ = merge("[\\x21\\x23-\\x5B\\x5D-\\x7E]", OBS_QTEXT$$); //%d33 / %d35-91 / %d93-126 / obs-qtext
|
|
53313
|
-
//const VCHAR$$ = "[\\x21-\\x7E]";
|
|
53314
|
-
//const WSP$$ = "[\\x20\\x09]";
|
|
53315
|
-
//const OBS_QP$ = subexp("\\\\" + merge("[\\x00\\x0D\\x0A]", OBS_QTEXT$$)); //%d0 / CR / LF / obs-qtext
|
|
53316
|
-
//const FWS$ = subexp(subexp(WSP$$ + "*" + "\\x0D\\x0A") + "?" + WSP$$ + "+");
|
|
53317
|
-
//const QUOTED_PAIR$ = subexp(subexp("\\\\" + subexp(VCHAR$$ + "|" + WSP$$)) + "|" + OBS_QP$);
|
|
53318
|
-
//const QUOTED_STRING$ = subexp('\\"' + subexp(FWS$ + "?" + QCONTENT$) + "*" + FWS$ + "?" + '\\"');
|
|
53319
|
-
var ATEXT$$ = "[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]";
|
|
53320
|
-
var QTEXT$$ = "[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]";
|
|
53321
|
-
var VCHAR$$ = merge(QTEXT$$, '[\\"\\\\]');
|
|
53322
|
-
var SOME_DELIMS$$ = "[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]";
|
|
53323
|
-
var UNRESERVED = new RegExp(UNRESERVED$$, "g");
|
|
53324
|
-
var PCT_ENCODED = new RegExp(PCT_ENCODED$, "g");
|
|
53325
|
-
var NOT_LOCAL_PART = new RegExp(merge("[^]", ATEXT$$, "[\\.]", '[\\"]', VCHAR$$), "g");
|
|
53326
|
-
var NOT_HFNAME = new RegExp(merge("[^]", UNRESERVED$$, SOME_DELIMS$$), "g");
|
|
53327
|
-
var NOT_HFVALUE = NOT_HFNAME;
|
|
53328
|
-
function decodeUnreserved(str) {
|
|
53329
|
-
var decStr = pctDecChars(str);
|
|
53330
|
-
return !decStr.match(UNRESERVED) ? str : decStr;
|
|
53331
|
-
}
|
|
53332
|
-
var handler$4 = {
|
|
53333
|
-
scheme: "mailto",
|
|
53334
|
-
parse: function parse$$1(components, options) {
|
|
53335
|
-
var mailtoComponents = components;
|
|
53336
|
-
var to = mailtoComponents.to = mailtoComponents.path ? mailtoComponents.path.split(",") : [];
|
|
53337
|
-
mailtoComponents.path = undefined;
|
|
53338
|
-
if (mailtoComponents.query) {
|
|
53339
|
-
var unknownHeaders = false;
|
|
53340
|
-
var headers = {};
|
|
53341
|
-
var hfields = mailtoComponents.query.split("&");
|
|
53342
|
-
for(var x = 0, xl = hfields.length; x < xl; ++x){
|
|
53343
|
-
var hfield = hfields[x].split("=");
|
|
53344
|
-
switch(hfield[0]){
|
|
53345
|
-
case "to":
|
|
53346
|
-
var toAddrs = hfield[1].split(",");
|
|
53347
|
-
for(var _x = 0, _xl = toAddrs.length; _x < _xl; ++_x){
|
|
53348
|
-
to.push(toAddrs[_x]);
|
|
53349
|
-
}
|
|
53350
|
-
break;
|
|
53351
|
-
case "subject":
|
|
53352
|
-
mailtoComponents.subject = unescapeComponent(hfield[1], options);
|
|
53353
|
-
break;
|
|
53354
|
-
case "body":
|
|
53355
|
-
mailtoComponents.body = unescapeComponent(hfield[1], options);
|
|
53356
|
-
break;
|
|
53357
|
-
default:
|
|
53358
|
-
unknownHeaders = true;
|
|
53359
|
-
headers[unescapeComponent(hfield[0], options)] = unescapeComponent(hfield[1], options);
|
|
53360
|
-
break;
|
|
53361
|
-
}
|
|
53362
|
-
}
|
|
53363
|
-
if (unknownHeaders) mailtoComponents.headers = headers;
|
|
53364
|
-
}
|
|
53365
|
-
mailtoComponents.query = undefined;
|
|
53366
|
-
for(var _x2 = 0, _xl2 = to.length; _x2 < _xl2; ++_x2){
|
|
53367
|
-
var addr = to[_x2].split("@");
|
|
53368
|
-
addr[0] = unescapeComponent(addr[0]);
|
|
53369
|
-
if (!options.unicodeSupport) {
|
|
53370
|
-
//convert Unicode IDN -> ASCII IDN
|
|
53371
|
-
try {
|
|
53372
|
-
addr[1] = punycode.toASCII(unescapeComponent(addr[1], options).toLowerCase());
|
|
53373
|
-
} catch (e) {
|
|
53374
|
-
mailtoComponents.error = mailtoComponents.error || "Email address's domain name can not be converted to ASCII via punycode: " + e;
|
|
53375
|
-
}
|
|
53376
|
-
} else {
|
|
53377
|
-
addr[1] = unescapeComponent(addr[1], options).toLowerCase();
|
|
53378
|
-
}
|
|
53379
|
-
to[_x2] = addr.join("@");
|
|
53380
|
-
}
|
|
53381
|
-
return mailtoComponents;
|
|
53382
|
-
},
|
|
53383
|
-
serialize: function serialize$$1(mailtoComponents, options) {
|
|
53384
|
-
var components = mailtoComponents;
|
|
53385
|
-
var to = toArray(mailtoComponents.to);
|
|
53386
|
-
if (to) {
|
|
53387
|
-
for(var x = 0, xl = to.length; x < xl; ++x){
|
|
53388
|
-
var toAddr = String(to[x]);
|
|
53389
|
-
var atIdx = toAddr.lastIndexOf("@");
|
|
53390
|
-
var localPart = toAddr.slice(0, atIdx).replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_LOCAL_PART, pctEncChar);
|
|
53391
|
-
var domain = toAddr.slice(atIdx + 1);
|
|
53392
|
-
//convert IDN via punycode
|
|
53393
|
-
try {
|
|
53394
|
-
domain = !options.iri ? punycode.toASCII(unescapeComponent(domain, options).toLowerCase()) : punycode.toUnicode(domain);
|
|
53395
|
-
} catch (e) {
|
|
53396
|
-
components.error = components.error || "Email address's domain name can not be converted to " + (!options.iri ? "ASCII" : "Unicode") + " via punycode: " + e;
|
|
53397
|
-
}
|
|
53398
|
-
to[x] = localPart + "@" + domain;
|
|
53399
|
-
}
|
|
53400
|
-
components.path = to.join(",");
|
|
53401
|
-
}
|
|
53402
|
-
var headers = mailtoComponents.headers = mailtoComponents.headers || {};
|
|
53403
|
-
if (mailtoComponents.subject) headers["subject"] = mailtoComponents.subject;
|
|
53404
|
-
if (mailtoComponents.body) headers["body"] = mailtoComponents.body;
|
|
53405
|
-
var fields = [];
|
|
53406
|
-
for(var name in headers){
|
|
53407
|
-
if (headers[name] !== O[name]) {
|
|
53408
|
-
fields.push(name.replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_HFNAME, pctEncChar) + "=" + headers[name].replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_HFVALUE, pctEncChar));
|
|
53409
|
-
}
|
|
53410
|
-
}
|
|
53411
|
-
if (fields.length) {
|
|
53412
|
-
components.query = fields.join("&");
|
|
53413
|
-
}
|
|
53414
|
-
return components;
|
|
53415
|
-
}
|
|
53416
|
-
};
|
|
53417
|
-
var URN_PARSE = /^([^\:]+)\:(.*)/;
|
|
53418
|
-
//RFC 2141
|
|
53419
|
-
var handler$5 = {
|
|
53420
|
-
scheme: "urn",
|
|
53421
|
-
parse: function parse$$1(components, options) {
|
|
53422
|
-
var matches = components.path && components.path.match(URN_PARSE);
|
|
53423
|
-
var urnComponents = components;
|
|
53424
|
-
if (matches) {
|
|
53425
|
-
var scheme = options.scheme || urnComponents.scheme || "urn";
|
|
53426
|
-
var nid = matches[1].toLowerCase();
|
|
53427
|
-
var nss = matches[2];
|
|
53428
|
-
var urnScheme = scheme + ":" + (options.nid || nid);
|
|
53429
|
-
var schemeHandler = SCHEMES[urnScheme];
|
|
53430
|
-
urnComponents.nid = nid;
|
|
53431
|
-
urnComponents.nss = nss;
|
|
53432
|
-
urnComponents.path = undefined;
|
|
53433
|
-
if (schemeHandler) {
|
|
53434
|
-
urnComponents = schemeHandler.parse(urnComponents, options);
|
|
53435
|
-
}
|
|
53436
|
-
} else {
|
|
53437
|
-
urnComponents.error = urnComponents.error || "URN can not be parsed.";
|
|
53438
|
-
}
|
|
53439
|
-
return urnComponents;
|
|
53440
|
-
},
|
|
53441
|
-
serialize: function serialize$$1(urnComponents, options) {
|
|
53442
|
-
var scheme = options.scheme || urnComponents.scheme || "urn";
|
|
53443
|
-
var nid = urnComponents.nid;
|
|
53444
|
-
var urnScheme = scheme + ":" + (options.nid || nid);
|
|
53445
|
-
var schemeHandler = SCHEMES[urnScheme];
|
|
53446
|
-
if (schemeHandler) {
|
|
53447
|
-
urnComponents = schemeHandler.serialize(urnComponents, options);
|
|
53448
|
-
}
|
|
53449
|
-
var uriComponents = urnComponents;
|
|
53450
|
-
var nss = urnComponents.nss;
|
|
53451
|
-
uriComponents.path = (nid || options.nid) + ":" + nss;
|
|
53452
|
-
return uriComponents;
|
|
53453
|
-
}
|
|
53454
|
-
};
|
|
53455
|
-
var UUID = /^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/;
|
|
53456
|
-
//RFC 4122
|
|
53457
|
-
var handler$6 = {
|
|
53458
|
-
scheme: "urn:uuid",
|
|
53459
|
-
parse: function parse(urnComponents, options) {
|
|
53460
|
-
var uuidComponents = urnComponents;
|
|
53461
|
-
uuidComponents.uuid = uuidComponents.nss;
|
|
53462
|
-
uuidComponents.nss = undefined;
|
|
53463
|
-
if (!options.tolerant && (!uuidComponents.uuid || !uuidComponents.uuid.match(UUID))) {
|
|
53464
|
-
uuidComponents.error = uuidComponents.error || "UUID is not valid.";
|
|
53465
|
-
}
|
|
53466
|
-
return uuidComponents;
|
|
53467
|
-
},
|
|
53468
|
-
serialize: function serialize(uuidComponents, options) {
|
|
53469
|
-
var urnComponents = uuidComponents;
|
|
53470
|
-
//normalize UUID
|
|
53471
|
-
urnComponents.nss = (uuidComponents.uuid || "").toLowerCase();
|
|
53472
|
-
return urnComponents;
|
|
53473
|
-
}
|
|
53474
|
-
};
|
|
53475
|
-
SCHEMES[handler.scheme] = handler;
|
|
53476
|
-
SCHEMES[handler$1.scheme] = handler$1;
|
|
53477
|
-
SCHEMES[handler$2.scheme] = handler$2;
|
|
53478
|
-
SCHEMES[handler$3.scheme] = handler$3;
|
|
53479
|
-
SCHEMES[handler$4.scheme] = handler$4;
|
|
53480
|
-
SCHEMES[handler$5.scheme] = handler$5;
|
|
53481
|
-
SCHEMES[handler$6.scheme] = handler$6;
|
|
53482
|
-
exports1.SCHEMES = SCHEMES;
|
|
53483
|
-
exports1.pctEncChar = pctEncChar;
|
|
53484
|
-
exports1.pctDecChars = pctDecChars;
|
|
53485
|
-
exports1.parse = parse;
|
|
53486
|
-
exports1.removeDotSegments = removeDotSegments;
|
|
53487
|
-
exports1.serialize = serialize;
|
|
53488
|
-
exports1.resolveComponents = resolveComponents;
|
|
53489
|
-
exports1.resolve = resolve;
|
|
53490
|
-
exports1.normalize = normalize;
|
|
53491
|
-
exports1.equal = equal;
|
|
53492
|
-
exports1.escapeComponent = escapeComponent;
|
|
53493
|
-
exports1.unescapeComponent = unescapeComponent;
|
|
53494
|
-
Object.defineProperty(exports1, "__esModule", {
|
|
53495
|
-
value: true
|
|
53496
|
-
});
|
|
53497
|
-
});
|
|
53498
|
-
}(uri_all, uri_all.exports));
|
|
53432
|
+
} else {
|
|
53433
|
+
parsed.error = parsed.error || "URI can not be parsed.";
|
|
53434
|
+
}
|
|
53435
|
+
return parsed;
|
|
53436
|
+
}
|
|
53437
|
+
var fastUri = {
|
|
53438
|
+
SCHEMES: SCHEMES,
|
|
53439
|
+
normalize: normalize,
|
|
53440
|
+
resolve: resolve,
|
|
53441
|
+
resolveComponents: resolveComponents,
|
|
53442
|
+
equal: equal$2,
|
|
53443
|
+
serialize: serialize,
|
|
53444
|
+
parse: parse
|
|
53445
|
+
};
|
|
53446
|
+
fastUri$1.exports = fastUri;
|
|
53447
|
+
fastUri$1.exports.default = fastUri;
|
|
53448
|
+
fastUri$1.exports.fastUri = fastUri;
|
|
53499
53449
|
|
|
53500
53450
|
Object.defineProperty(uri$1, "__esModule", {
|
|
53501
53451
|
value: true
|
|
53502
53452
|
});
|
|
53503
|
-
var uri =
|
|
53453
|
+
var uri = fastUri$1.exports;
|
|
53504
53454
|
uri.code = 'require("ajv/dist/runtime/uri").default';
|
|
53505
53455
|
uri$1.default = uri;
|
|
53506
53456
|
|
|
@@ -53764,7 +53714,7 @@ var ref_error_1 = ref_error;
|
|
|
53764
53714
|
var rules_1 = rules;
|
|
53765
53715
|
var compile_1 = compile;
|
|
53766
53716
|
var codegen_2 = codegen;
|
|
53767
|
-
var resolve_1 = resolve$
|
|
53717
|
+
var resolve_1 = resolve$2;
|
|
53768
53718
|
var dataType_1 = dataType;
|
|
53769
53719
|
var util_1 = util;
|
|
53770
53720
|
var $dataRefSchema = require$$9;
|