@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.
Files changed (3) hide show
  1. package/index.cjs.js +1476 -1526
  2. package/index.esm.js +1471 -1521
  3. package/package.json +1 -1
package/index.esm.js CHANGED
@@ -127,16 +127,16 @@ var r$6 = function(t) {
127
127
  }(t) : t;
128
128
  };
129
129
 
130
- function _array_like_to_array$f(arr, len) {
130
+ function _array_like_to_array$h(arr, len) {
131
131
  if (len == null || len > arr.length) len = arr.length;
132
132
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
133
133
  return arr2;
134
134
  }
135
- function _array_with_holes$9(arr) {
135
+ function _array_with_holes$b(arr) {
136
136
  if (Array.isArray(arr)) return arr;
137
137
  }
138
138
  function _array_without_holes$b(arr) {
139
- if (Array.isArray(arr)) return _array_like_to_array$f(arr);
139
+ if (Array.isArray(arr)) return _array_like_to_array$h(arr);
140
140
  }
141
141
  function _assert_this_initialized$d(self) {
142
142
  if (self === void 0) {
@@ -234,7 +234,7 @@ function _is_native_function$4(fn) {
234
234
  function _iterable_to_array$b(iter) {
235
235
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
236
236
  }
237
- function _iterable_to_array_limit$9(arr, i) {
237
+ function _iterable_to_array_limit$b(arr, i) {
238
238
  var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
239
239
  if (_i == null) return;
240
240
  var _arr = [];
@@ -258,7 +258,7 @@ function _iterable_to_array_limit$9(arr, i) {
258
258
  }
259
259
  return _arr;
260
260
  }
261
- function _non_iterable_rest$9() {
261
+ function _non_iterable_rest$b() {
262
262
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
263
263
  }
264
264
  function _non_iterable_spread$b() {
@@ -277,23 +277,23 @@ function _set_prototype_of$d(o, p) {
277
277
  };
278
278
  return _set_prototype_of$d(o, p);
279
279
  }
280
- function _sliced_to_array$9(arr, i) {
281
- return _array_with_holes$9(arr) || _iterable_to_array_limit$9(arr, i) || _unsupported_iterable_to_array$f(arr, i) || _non_iterable_rest$9();
280
+ function _sliced_to_array$b(arr, i) {
281
+ return _array_with_holes$b(arr) || _iterable_to_array_limit$b(arr, i) || _unsupported_iterable_to_array$h(arr, i) || _non_iterable_rest$b();
282
282
  }
283
283
  function _to_consumable_array$b(arr) {
284
- return _array_without_holes$b(arr) || _iterable_to_array$b(arr) || _unsupported_iterable_to_array$f(arr) || _non_iterable_spread$b();
284
+ return _array_without_holes$b(arr) || _iterable_to_array$b(arr) || _unsupported_iterable_to_array$h(arr) || _non_iterable_spread$b();
285
285
  }
286
286
  function _type_of$m(obj) {
287
287
  "@swc/helpers - typeof";
288
288
  return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
289
289
  }
290
- function _unsupported_iterable_to_array$f(o, minLen) {
290
+ function _unsupported_iterable_to_array$h(o, minLen) {
291
291
  if (!o) return;
292
- if (typeof o === "string") return _array_like_to_array$f(o, minLen);
292
+ if (typeof o === "string") return _array_like_to_array$h(o, minLen);
293
293
  var n = Object.prototype.toString.call(o).slice(8, -1);
294
294
  if (n === "Object" && o.constructor) n = o.constructor.name;
295
295
  if (n === "Map" || n === "Set") return Array.from(n);
296
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$f(o, minLen);
296
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$h(o, minLen);
297
297
  }
298
298
  function _wrap_native_super$4(Class) {
299
299
  var _cache = typeof Map === "function" ? new Map() : undefined;
@@ -709,7 +709,7 @@ var b$1 = /*#__PURE__*/ function(HTMLElement1) {
709
709
  var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
710
710
  try {
711
711
  for(var _iterator = this._$Ep[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
712
- var _step_value = _sliced_to_array$9(_step.value, 2), t = _step_value[0], _$s = _step_value[1];
712
+ var _step_value = _sliced_to_array$b(_step.value, 2), t = _step_value[0], _$s = _step_value[1];
713
713
  this[t] = _$s;
714
714
  }
715
715
  } catch (err) {
@@ -732,7 +732,7 @@ var b$1 = /*#__PURE__*/ function(HTMLElement1) {
732
732
  var _iteratorNormalCompletion1 = true, _didIteratorError1 = false, _iteratorError1 = undefined;
733
733
  if (t1.size > 0) try {
734
734
  for(var _iterator1 = t1[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true){
735
- var _step_value1 = _sliced_to_array$9(_step1.value, 2), _$s1 = _step_value1[0], i = _step_value1[1];
735
+ var _step_value1 = _sliced_to_array$b(_step1.value, 2), _$s1 = _step_value1[0], i = _step_value1[1];
736
736
  !0 !== i.wrapped || this._$AL.has(_$s1) || void 0 === this[_$s1] || this.P(_$s1, this[_$s1], i);
737
737
  }
738
738
  } catch (err) {
@@ -916,7 +916,7 @@ var b$1 = /*#__PURE__*/ function(HTMLElement1) {
916
916
  var _iteratorNormalCompletion1 = true, _didIteratorError1 = false, _iteratorError1 = undefined;
917
917
  if (void 0 !== s1) try {
918
918
  for(var _iterator1 = s1[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true){
919
- var _step_value = _sliced_to_array$9(_step1.value, 2), t2 = _step_value[0], i1 = _step_value[1];
919
+ var _step_value = _sliced_to_array$b(_step1.value, 2), t2 = _step_value[0], i1 = _step_value[1];
920
920
  this.elementProperties.set(t2, i1);
921
921
  }
922
922
  } catch (err) {
@@ -938,7 +938,7 @@ var b$1 = /*#__PURE__*/ function(HTMLElement1) {
938
938
  var _iteratorNormalCompletion2 = true, _didIteratorError2 = false, _iteratorError2 = undefined;
939
939
  try {
940
940
  for(var _iterator2 = this.elementProperties[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true){
941
- var _step_value1 = _sliced_to_array$9(_step2.value, 2), t3 = _step_value1[0], s2 = _step_value1[1];
941
+ var _step_value1 = _sliced_to_array$b(_step2.value, 2), t3 = _step_value1[0], s2 = _step_value1[1];
942
942
  var i2 = this._$Eu(t3, s2);
943
943
  void 0 !== i2 && this._$Eh.set(i2, t3);
944
944
  }
@@ -1010,16 +1010,16 @@ b$1.elementStyles = [], b$1.shadowRootOptions = {
1010
1010
  * @license
1011
1011
  * Copyright 2017 Google LLC
1012
1012
  * SPDX-License-Identifier: BSD-3-Clause
1013
- */ function _array_like_to_array$e(arr, len) {
1013
+ */ function _array_like_to_array$g(arr, len) {
1014
1014
  if (len == null || len > arr.length) len = arr.length;
1015
1015
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
1016
1016
  return arr2;
1017
1017
  }
1018
- function _array_with_holes$8(arr) {
1018
+ function _array_with_holes$a(arr) {
1019
1019
  if (Array.isArray(arr)) return arr;
1020
1020
  }
1021
1021
  function _array_without_holes$a(arr) {
1022
- if (Array.isArray(arr)) return _array_like_to_array$e(arr);
1022
+ if (Array.isArray(arr)) return _array_like_to_array$g(arr);
1023
1023
  }
1024
1024
  function _assert_this_initialized$c(self) {
1025
1025
  if (self === void 0) {
@@ -1068,7 +1068,7 @@ function _inherits$c(subClass, superClass) {
1068
1068
  function _iterable_to_array$a(iter) {
1069
1069
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
1070
1070
  }
1071
- function _iterable_to_array_limit$8(arr, i) {
1071
+ function _iterable_to_array_limit$a(arr, i) {
1072
1072
  var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
1073
1073
  if (_i == null) return;
1074
1074
  var _arr = [];
@@ -1092,7 +1092,7 @@ function _iterable_to_array_limit$8(arr, i) {
1092
1092
  }
1093
1093
  return _arr;
1094
1094
  }
1095
- function _non_iterable_rest$8() {
1095
+ function _non_iterable_rest$a() {
1096
1096
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
1097
1097
  }
1098
1098
  function _non_iterable_spread$a() {
@@ -1111,23 +1111,23 @@ function _set_prototype_of$c(o, p) {
1111
1111
  };
1112
1112
  return _set_prototype_of$c(o, p);
1113
1113
  }
1114
- function _sliced_to_array$8(arr, i) {
1115
- return _array_with_holes$8(arr) || _iterable_to_array_limit$8(arr, i) || _unsupported_iterable_to_array$e(arr, i) || _non_iterable_rest$8();
1114
+ function _sliced_to_array$a(arr, i) {
1115
+ return _array_with_holes$a(arr) || _iterable_to_array_limit$a(arr, i) || _unsupported_iterable_to_array$g(arr, i) || _non_iterable_rest$a();
1116
1116
  }
1117
1117
  function _to_consumable_array$a(arr) {
1118
- return _array_without_holes$a(arr) || _iterable_to_array$a(arr) || _unsupported_iterable_to_array$e(arr) || _non_iterable_spread$a();
1118
+ return _array_without_holes$a(arr) || _iterable_to_array$a(arr) || _unsupported_iterable_to_array$g(arr) || _non_iterable_spread$a();
1119
1119
  }
1120
1120
  function _type_of$l(obj) {
1121
1121
  "@swc/helpers - typeof";
1122
1122
  return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
1123
1123
  }
1124
- function _unsupported_iterable_to_array$e(o, minLen) {
1124
+ function _unsupported_iterable_to_array$g(o, minLen) {
1125
1125
  if (!o) return;
1126
- if (typeof o === "string") return _array_like_to_array$e(o, minLen);
1126
+ if (typeof o === "string") return _array_like_to_array$g(o, minLen);
1127
1127
  var n = Object.prototype.toString.call(o).slice(8, -1);
1128
1128
  if (n === "Object" && o.constructor) n = o.constructor.name;
1129
1129
  if (n === "Map" || n === "Set") return Array.from(n);
1130
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$e(o, minLen);
1130
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$g(o, minLen);
1131
1131
  }
1132
1132
  function _is_native_reflect_construct$c() {
1133
1133
  if (typeof Reflect === "undefined" || !Reflect.construct) return false;
@@ -1158,7 +1158,7 @@ var t$3 = globalThis, i$3 = t$3.trustedTypes, s$2 = i$3 ? i$3.createPolicy("lit-
1158
1158
  createHTML: function(t) {
1159
1159
  return t;
1160
1160
  }
1161
- }) : void 0, e$1 = "$lit$", h$1 = "lit$".concat((Math.random() + "").slice(9), "$"), o$2 = "?" + h$1, n$2 = "<".concat(o$2, ">"), r$4 = document, l$2 = function() {
1161
+ }) : 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() {
1162
1162
  return r$4.createComment("");
1163
1163
  }, c$1 = function(t) {
1164
1164
  return null === t || "object" != typeof t && "function" != typeof t;
@@ -1202,7 +1202,7 @@ var V = /*#__PURE__*/ function() {
1202
1202
  var r;
1203
1203
  this.parts = [];
1204
1204
  var c = 0, a = 0;
1205
- var u = t.length - 1, d = this.parts, _P = _sliced_to_array$8(P(t, s), 2), f = _P[0], v = _P[1];
1205
+ var u = t.length - 1, d = this.parts, _P = _sliced_to_array$a(P(t, s), 2), f = _P[0], v = _P[1];
1206
1206
  if (this.el = V.createElement(f, n), E.currentNode = this.el.content, 2 === s) {
1207
1207
  var _t;
1208
1208
  var t1 = this.el.content.firstChild;
@@ -1619,7 +1619,7 @@ var L = /*#__PURE__*/ function() {
1619
1619
  }();
1620
1620
  var Z$1 = t$3.litHtmlPolyfillSupport;
1621
1621
  var _litHtmlVersions;
1622
- 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.2");
1622
+ 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");
1623
1623
  var j$1 = function(t, i, s) {
1624
1624
  var _s_renderBefore;
1625
1625
  var e = (_s_renderBefore = s === null || s === void 0 ? void 0 : s.renderBefore) !== null && _s_renderBefore !== void 0 ? _s_renderBefore : i;
@@ -1807,7 +1807,7 @@ r$3 === null || r$3 === void 0 ? void 0 : r$3({
1807
1807
  LitElement: s$1
1808
1808
  });
1809
1809
  var _litElementVersions;
1810
- ((_litElementVersions = (_globalThis1 = globalThis).litElementVersions) !== null && _litElementVersions !== void 0 ? _litElementVersions : _globalThis1.litElementVersions = []).push("4.0.4");
1810
+ ((_litElementVersions = (_globalThis1 = globalThis).litElementVersions) !== null && _litElementVersions !== void 0 ? _litElementVersions : _globalThis1.litElementVersions = []).push("4.0.6");
1811
1811
 
1812
1812
  /**
1813
1813
  * @license
@@ -1821,7 +1821,7 @@ var _litElementVersions;
1821
1821
  };
1822
1822
  };
1823
1823
 
1824
- function _define_property$5(obj, key, value) {
1824
+ function _define_property$6(obj, key, value) {
1825
1825
  if (key in obj) {
1826
1826
  Object.defineProperty(obj, key, {
1827
1827
  value: value,
@@ -1834,7 +1834,7 @@ function _define_property$5(obj, key, value) {
1834
1834
  }
1835
1835
  return obj;
1836
1836
  }
1837
- function _object_spread$4(target) {
1837
+ function _object_spread$5(target) {
1838
1838
  for(var i = 1; i < arguments.length; i++){
1839
1839
  var source = arguments[i] != null ? arguments[i] : {};
1840
1840
  var ownKeys = Object.keys(source);
@@ -1844,12 +1844,12 @@ function _object_spread$4(target) {
1844
1844
  }));
1845
1845
  }
1846
1846
  ownKeys.forEach(function(key) {
1847
- _define_property$5(target, key, source[key]);
1847
+ _define_property$6(target, key, source[key]);
1848
1848
  });
1849
1849
  }
1850
1850
  return target;
1851
1851
  }
1852
- function ownKeys$2(object, enumerableOnly) {
1852
+ function ownKeys$3(object, enumerableOnly) {
1853
1853
  var keys = Object.keys(object);
1854
1854
  if (Object.getOwnPropertySymbols) {
1855
1855
  var symbols = Object.getOwnPropertySymbols(object);
@@ -1862,12 +1862,12 @@ function ownKeys$2(object, enumerableOnly) {
1862
1862
  }
1863
1863
  return keys;
1864
1864
  }
1865
- function _object_spread_props$2(target, source) {
1865
+ function _object_spread_props$3(target, source) {
1866
1866
  source = source != null ? source : {};
1867
1867
  if (Object.getOwnPropertyDescriptors) {
1868
1868
  Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
1869
1869
  } else {
1870
- ownKeys$2(Object(source)).forEach(function(key) {
1870
+ ownKeys$3(Object(source)).forEach(function(key) {
1871
1871
  Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
1872
1872
  });
1873
1873
  }
@@ -1912,7 +1912,7 @@ function n$1(t) {
1912
1912
  return function(e, o) {
1913
1913
  return "object" == typeof o ? r$2(t, e, o) : function(t, e, o) {
1914
1914
  var r = e.hasOwnProperty(o);
1915
- return e.constructor.createProperty(o, r ? _object_spread_props$2(_object_spread$4({}, t), {
1915
+ return e.constructor.createProperty(o, r ? _object_spread_props$3(_object_spread$5({}, t), {
1916
1916
  wrapped: !0
1917
1917
  }) : t), r ? Object.getOwnPropertyDescriptor(e, o) : void 0;
1918
1918
  }(t, e, o);
@@ -2011,7 +2011,7 @@ function isObjectOrArray(value) {
2011
2011
  * https://www.npmjs.com/package/ih
2012
2012
  * https://www.npmjs.com/package/mutatis
2013
2013
  * https://github.com/mariocasciaro/object-path-immutable
2014
- */ function _define_property$4(obj, key, value) {
2014
+ */ function _define_property$5(obj, key, value) {
2015
2015
  if (key in obj) {
2016
2016
  Object.defineProperty(obj, key, {
2017
2017
  value: value,
@@ -2024,7 +2024,7 @@ function isObjectOrArray(value) {
2024
2024
  }
2025
2025
  return obj;
2026
2026
  }
2027
- function _object_spread$3(target) {
2027
+ function _object_spread$4(target) {
2028
2028
  for(var i = 1; i < arguments.length; i++){
2029
2029
  var source = arguments[i] != null ? arguments[i] : {};
2030
2030
  var ownKeys = Object.keys(source);
@@ -2034,7 +2034,7 @@ function _object_spread$3(target) {
2034
2034
  }));
2035
2035
  }
2036
2036
  ownKeys.forEach(function(key) {
2037
- _define_property$4(target, key, source[key]);
2037
+ _define_property$5(target, key, source[key]);
2038
2038
  });
2039
2039
  }
2040
2040
  return target;
@@ -2055,7 +2055,7 @@ function _object_spread$3(target) {
2055
2055
  return copy;
2056
2056
  } else if (isJSONObject(value)) {
2057
2057
  // copy object properties
2058
- var copy1 = _object_spread$3({}, value);
2058
+ var copy1 = _object_spread$4({}, value);
2059
2059
  // copy all symbols
2060
2060
  Object.getOwnPropertySymbols(value).forEach(function(symbol) {
2061
2061
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
@@ -2423,13 +2423,13 @@ function parseFrom(fromPointer) {
2423
2423
  return parseJSONPointer(fromPointer);
2424
2424
  }
2425
2425
 
2426
- function _array_like_to_array$d(arr, len) {
2426
+ function _array_like_to_array$f(arr, len) {
2427
2427
  if (len == null || len > arr.length) len = arr.length;
2428
2428
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
2429
2429
  return arr2;
2430
2430
  }
2431
2431
  function _array_without_holes$9(arr) {
2432
- if (Array.isArray(arr)) return _array_like_to_array$d(arr);
2432
+ if (Array.isArray(arr)) return _array_like_to_array$f(arr);
2433
2433
  }
2434
2434
  function _iterable_to_array$9(iter) {
2435
2435
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
@@ -2438,15 +2438,15 @@ function _non_iterable_spread$9() {
2438
2438
  throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
2439
2439
  }
2440
2440
  function _to_consumable_array$9(arr) {
2441
- return _array_without_holes$9(arr) || _iterable_to_array$9(arr) || _unsupported_iterable_to_array$d(arr) || _non_iterable_spread$9();
2441
+ return _array_without_holes$9(arr) || _iterable_to_array$9(arr) || _unsupported_iterable_to_array$f(arr) || _non_iterable_spread$9();
2442
2442
  }
2443
- function _unsupported_iterable_to_array$d(o, minLen) {
2443
+ function _unsupported_iterable_to_array$f(o, minLen) {
2444
2444
  if (!o) return;
2445
- if (typeof o === "string") return _array_like_to_array$d(o, minLen);
2445
+ if (typeof o === "string") return _array_like_to_array$f(o, minLen);
2446
2446
  var n = Object.prototype.toString.call(o).slice(8, -1);
2447
2447
  if (n === "Object" && o.constructor) n = o.constructor.name;
2448
2448
  if (n === "Map" || n === "Set") return Array.from(n);
2449
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$d(o, minLen);
2449
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$f(o, minLen);
2450
2450
  }
2451
2451
  /**
2452
2452
  * Create the inverse of a set of json patch operations
@@ -2563,8 +2563,6 @@ function revertMove(document, path, from) {
2563
2563
  }
2564
2564
  }
2565
2565
 
2566
- var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
2567
-
2568
2566
  var jsonSourceMap = {};
2569
2567
 
2570
2568
  function _instanceof$i(left, right) {
@@ -8161,7 +8159,7 @@ var faLightbulb = {
8161
8159
  128161
8162
8160
  ],
8163
8161
  "f0eb",
8164
- "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.7l0 0c12.9 17.7 28.3 38.9 39.8 59.8c10.4 19 15.7 38.8 18.3 57.5H109c-2.2-12-5.9-23.7-11.8-34.5c-9.9-18-22.2-34.9-34.5-51.8l0 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.4l0 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.5H226.4c2.6-18.7 7.9-38.6 18.3-57.5c11.5-20.9 26.9-42.1 39.8-59.8l0 0 0 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-80V416H272v16c0 44.2-35.8 80-80 80z"
8162
+ "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"
8165
8163
  ]
8166
8164
  };
8167
8165
  var faSquareCheck$1 = {
@@ -8177,7 +8175,7 @@ var faSquareCheck$1 = {
8177
8175
  "check-square"
8178
8176
  ],
8179
8177
  "f14a",
8180
- "M64 80c-8.8 0-16 7.2-16 16V416c0 8.8 7.2 16 16 16H384c8.8 0 16-7.2 16-16V96c0-8.8-7.2-16-16-16H64zM0 96C0 60.7 28.7 32 64 32H384c35.3 0 64 28.7 64 64V416c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V96zM337 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"
8178
+ "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"
8181
8179
  ]
8182
8180
  };
8183
8181
  var faCheckSquare$1 = faSquareCheck$1;
@@ -8194,7 +8192,7 @@ var faSquare$1 = {
8194
8192
  61590
8195
8193
  ],
8196
8194
  "f0c8",
8197
- "M384 80c8.8 0 16 7.2 16 16V416c0 8.8-7.2 16-16 16H64c-8.8 0-16-7.2-16-16V96c0-8.8 7.2-16 16-16H384zM64 32C28.7 32 0 60.7 0 96V416c0 35.3 28.7 64 64 64H384c35.3 0 64-28.7 64-64V96c0-35.3-28.7-64-64-64H64z"
8195
+ "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"
8198
8196
  ]
8199
8197
  };
8200
8198
  var faClock = {
@@ -8208,7 +8206,7 @@ var faClock = {
8208
8206
  "clock-four"
8209
8207
  ],
8210
8208
  "f017",
8211
- "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 120V256c0 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.2V120c0-13.3-10.7-24-24-24s-24 10.7-24 24z"
8209
+ "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"
8212
8210
  ]
8213
8211
  };
8214
8212
 
@@ -8223,7 +8221,7 @@ var faTrashCan = {
8223
8221
  "trash-alt"
8224
8222
  ],
8225
8223
  "f2ed",
8226
- "M135.2 17.7C140.6 6.8 151.7 0 163.8 0H284.2c12.1 0 23.2 6.8 28.6 17.7L320 32h96c17.7 0 32 14.3 32 32s-14.3 32-32 32H32C14.3 96 0 81.7 0 64S14.3 32 32 32h96l7.2-14.3zM32 128H416V448c0 35.3-28.7 64-64 64H96c-35.3 0-64-28.7-64-64V128zm96 64c-8.8 0-16 7.2-16 16V432c0 8.8 7.2 16 16 16s16-7.2 16-16V208c0-8.8-7.2-16-16-16zm96 0c-8.8 0-16 7.2-16 16V432c0 8.8 7.2 16 16 16s16-7.2 16-16V208c0-8.8-7.2-16-16-16zm96 0c-8.8 0-16 7.2-16 16V432c0 8.8 7.2 16 16 16s16-7.2 16-16V208c0-8.8-7.2-16-16-16z"
8224
+ "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"
8227
8225
  ]
8228
8226
  };
8229
8227
  var faDownLeftAndUpRightToCenter = {
@@ -8236,7 +8234,7 @@ var faDownLeftAndUpRightToCenter = {
8236
8234
  "compress-alt"
8237
8235
  ],
8238
8236
  "f422",
8239
- "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.8H296c-13.3 0-24-10.7-24-24V72c0-9.7 5.8-18.5 14.8-22.2s19.3-1.7 26.2 5.2l39 39L439 7zM72 272H216c13.3 0 24 10.7 24 24V440c0 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"
8237
+ "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"
8240
8238
  ]
8241
8239
  };
8242
8240
  var faCaretRight = {
@@ -8260,7 +8258,7 @@ var faPaste = {
8260
8258
  "file-clipboard"
8261
8259
  ],
8262
8260
  "f0ea",
8263
- "M160 0c-23.7 0-44.4 12.9-55.4 32H48C21.5 32 0 53.5 0 80V400c0 26.5 21.5 48 48 48H192V176c0-44.2 35.8-80 80-80h48V80c0-26.5-21.5-48-48-48H215.4C204.4 12.9 183.7 0 160 0zM272 128c-26.5 0-48 21.5-48 48V448v16c0 26.5 21.5 48 48 48H464c26.5 0 48-21.5 48-48V243.9c0-12.7-5.1-24.9-14.1-33.9l-67.9-67.9c-9-9-21.2-14.1-33.9-14.1H320 272zM160 40a24 24 0 1 1 0 48 24 24 0 1 1 0-48z"
8261
+ "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"
8264
8262
  ]
8265
8263
  };
8266
8264
  var faCircleNotch = {
@@ -8329,7 +8327,7 @@ var faSquareCheck = {
8329
8327
  "check-square"
8330
8328
  ],
8331
8329
  "f14a",
8332
- "M64 32C28.7 32 0 60.7 0 96V416c0 35.3 28.7 64 64 64H384c35.3 0 64-28.7 64-64V96c0-35.3-28.7-64-64-64H64zM337 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"
8330
+ "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"
8333
8331
  ]
8334
8332
  };
8335
8333
  var faCheckSquare = faSquareCheck;
@@ -8343,7 +8341,7 @@ var faPenToSquare = {
8343
8341
  "edit"
8344
8342
  ],
8345
8343
  "f044",
8346
- "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 160V416c0 53 43 96 96 96H352c53 0 96-43 96-96V320c0-17.7-14.3-32-32-32s-32 14.3-32 32v96c0 17.7-14.3 32-32 32H96c-17.7 0-32-14.3-32-32V160c0-17.7 14.3-32 32-32h96c17.7 0 32-14.3 32-32s-14.3-32-32-32H96z"
8344
+ "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"
8347
8345
  ]
8348
8346
  };
8349
8347
  var faEdit = faPenToSquare;
@@ -8381,7 +8379,7 @@ var faSquareCaretUp = {
8381
8379
  "caret-square-up"
8382
8380
  ],
8383
8381
  "f151",
8384
- "M64 32C28.7 32 0 60.7 0 96V416c0 35.3 28.7 64 64 64H384c35.3 0 64-28.7 64-64V96c0-35.3-28.7-64-64-64H64zM224 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.4H120c-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"
8382
+ "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"
8385
8383
  ]
8386
8384
  };
8387
8385
  var faCaretSquareUp = faSquareCaretUp;
@@ -8393,7 +8391,7 @@ var faCaretUp = {
8393
8391
  512,
8394
8392
  [],
8395
8393
  "f0d8",
8396
- "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.8H288c12.9 0 24.6-7.8 29.6-19.8s2.2-25.7-6.9-34.9l-128-128z"
8394
+ "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"
8397
8395
  ]
8398
8396
  };
8399
8397
  var faSquare = {
@@ -8420,7 +8418,7 @@ var faFilter = {
8420
8418
  512,
8421
8419
  [],
8422
8420
  "f0b0",
8423
- "M3.9 54.9C10.5 40.9 24.5 32 40 32H472c15.5 0 29.5 8.9 36.1 22.9s4.6 30.5-5.2 42.5L320 320.9V448c0 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.6V320.9L9 97.3C-.7 85.4-2.8 68.8 3.9 54.9z"
8421
+ "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"
8424
8422
  ]
8425
8423
  };
8426
8424
  var faCode = {
@@ -8444,7 +8442,7 @@ var faWrench = {
8444
8442
  128295
8445
8443
  ],
8446
8444
  "f0ad",
8447
- "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.7H336c-8.8 0-16-7.2-16-16V118.6c0-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"
8445
+ "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"
8448
8446
  ]
8449
8447
  };
8450
8448
  var faEye = {
@@ -8486,7 +8484,7 @@ var faArrowRotateRight = {
8486
8484
  "redo"
8487
8485
  ],
8488
8486
  "f01e",
8489
- "M386.3 160H336c-17.7 0-32 14.3-32 32s14.3 32 32 32H464c17.7 0 32-14.3 32-32V64c0-17.7-14.3-32-32-32s-32 14.3-32 32v51.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"
8487
+ "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"
8490
8488
  ]
8491
8489
  };
8492
8490
  var faRedo = faArrowRotateRight;
@@ -8504,7 +8502,7 @@ var faArrowRotateLeft = {
8504
8502
  "undo"
8505
8503
  ],
8506
8504
  "f0e2",
8507
- "M125.7 160H176c17.7 0 32 14.3 32 32s-14.3 32-32 32H48c-17.7 0-32-14.3-32-32V64c0-17.7 14.3-32 32-32s32 14.3 32 32v51.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"
8505
+ "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"
8508
8506
  ]
8509
8507
  };
8510
8508
  var faUndo = faArrowRotateLeft;
@@ -8518,7 +8516,7 @@ var faCropSimple = {
8518
8516
  "crop-alt"
8519
8517
  ],
8520
8518
  "f565",
8521
- "M128 32c0-17.7-14.3-32-32-32S64 14.3 64 32V64H32C14.3 64 0 78.3 0 96s14.3 32 32 32H64V384c0 35.3 28.7 64 64 64H352V384H128V32zM384 480c0 17.7 14.3 32 32 32s32-14.3 32-32V448h32c17.7 0 32-14.3 32-32s-14.3-32-32-32H448l0-256c0-35.3-28.7-64-64-64L160 64v64l224 0 0 352z"
8519
+ "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"
8522
8520
  ]
8523
8521
  };
8524
8522
  var faCropAlt = faCropSimple;
@@ -8587,7 +8585,7 @@ var faArrowDownShortWide = {
8587
8585
  "sort-amount-down-alt"
8588
8586
  ],
8589
8587
  "f884",
8590
- "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.7V64c0-17.7 14.3-32 32-32s32 14.3 32 32V365.7l32.4-35.4c11.9-13 32.2-13.9 45.2-2s13.9 32.2 2 45.2l-88 96zM320 32h32c17.7 0 32 14.3 32 32s-14.3 32-32 32H320c-17.7 0-32-14.3-32-32s14.3-32 32-32zm0 128h96c17.7 0 32 14.3 32 32s-14.3 32-32 32H320c-17.7 0-32-14.3-32-32s14.3-32 32-32zm0 128H480c17.7 0 32 14.3 32 32s-14.3 32-32 32H320c-17.7 0-32-14.3-32-32s14.3-32 32-32zm0 128H544c17.7 0 32 14.3 32 32s-14.3 32-32 32H320c-17.7 0-32-14.3-32-32s14.3-32 32-32z"
8588
+ "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"
8591
8589
  ]
8592
8590
  };
8593
8591
  var faSortAmountDownAlt = faArrowDownShortWide;
@@ -8651,7 +8649,7 @@ var faCopy = {
8651
8649
  512,
8652
8650
  [],
8653
8651
  "f0c5",
8654
- "M208 0H332.1c12.7 0 24.9 5.1 33.9 14.1l67.9 67.9c9 9 14.1 21.2 14.1 33.9V336c0 26.5-21.5 48-48 48H208c-26.5 0-48-21.5-48-48V48c0-26.5 21.5-48 48-48zM48 128h80v64H64V448H256V416h64v48c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V176c0-26.5 21.5-48 48-48z"
8652
+ "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"
8655
8653
  ]
8656
8654
  };
8657
8655
  var faPlus = {
@@ -8666,7 +8664,7 @@ var faPlus = {
8666
8664
  "add"
8667
8665
  ],
8668
8666
  "2b",
8669
- "M256 80c0-17.7-14.3-32-32-32s-32 14.3-32 32V224H48c-17.7 0-32 14.3-32 32s14.3 32 32 32H192V432c0 17.7 14.3 32 32 32s32-14.3 32-32V288H400c17.7 0 32-14.3 32-32s-14.3-32-32-32H256V80z"
8667
+ "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"
8670
8668
  ]
8671
8669
  };
8672
8670
  var faXmark = {
@@ -8703,7 +8701,7 @@ var faRotate = {
8703
8701
  "sync-alt"
8704
8702
  ],
8705
8703
  "f2f1",
8706
- "M142.9 142.9c62.2-62.2 162.7-62.5 225.3-1L327 183c-6.9 6.9-8.9 17.2-5.2 26.2s12.5 14.8 22.2 14.8H463.5c0 0 0 0 0 0H472c13.3 0 24-10.7 24-24V72c0-9.7-5.8-18.5-14.8-22.2s-19.3-1.7-26.2 5.2L413.4 96.6c-87.6-86.5-228.7-86.2-315.8 1C73.2 122 55.6 150.7 44.8 181.4c-5.9 16.7 2.9 34.9 19.5 40.8s34.9-2.9 40.8-19.5c7.7-21.8 20.2-42.3 37.8-59.8zM16 312v7.6 .7V440c0 9.7 5.8 18.5 14.8 22.2s19.3 1.7 26.2-5.2l41.6-41.6c87.6 86.5 228.7 86.2 315.8-1c24.4-24.4 42.1-53.1 52.9-83.7c5.9-16.7-2.9-34.9-19.5-40.8s-34.9 2.9-40.8 19.5c-7.7 21.8-20.2 42.3-37.8 59.8c-62.2 62.2-162.7 62.5-225.3 1L185 329c6.9-6.9 8.9-17.2 5.2-26.2s-12.5-14.8-22.2-14.8H48.4h-.7H40c-13.3 0-24 10.7-24 24z"
8704
+ "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"
8707
8705
  ]
8708
8706
  };
8709
8707
  var faUpRightAndDownLeftFromCenter = {
@@ -8716,7 +8714,7 @@ var faUpRightAndDownLeftFromCenter = {
8716
8714
  "expand-alt"
8717
8715
  ],
8718
8716
  "f424",
8719
- "M344 0H488c13.3 0 24 10.7 24 24V168c0 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 512H24c-13.3 0-24-10.7-24-24V344c0-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"
8717
+ "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"
8720
8718
  ]
8721
8719
  };
8722
8720
  var faClone = {
@@ -8727,7 +8725,7 @@ var faClone = {
8727
8725
  512,
8728
8726
  [],
8729
8727
  "f24d",
8730
- "M288 448H64V224h64V160H64c-35.3 0-64 28.7-64 64V448c0 35.3 28.7 64 64 64H288c35.3 0 64-28.7 64-64V384H288v64zm-64-96H448c35.3 0 64-28.7 64-64V64c0-35.3-28.7-64-64-64H224c-35.3 0-64 28.7-64 64V288c0 35.3 28.7 64 64 64z"
8728
+ "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"
8731
8729
  ]
8732
8730
  };
8733
8731
  var faCheck = {
@@ -8756,7 +8754,7 @@ var faTriangleExclamation = {
8756
8754
  "warning"
8757
8755
  ],
8758
8756
  "f071",
8759
- "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 480H40c-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 24V296c0 13.3 10.7 24 24 24s24-10.7 24-24V184c0-13.3-10.7-24-24-24zm32 224a32 32 0 1 0 -64 0 32 32 0 1 0 64 0z"
8757
+ "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"
8760
8758
  ]
8761
8759
  };
8762
8760
  var faExclamationTriangle = faTriangleExclamation;
@@ -8859,12 +8857,12 @@ function memoizeOne(resultFn, isEqual) {
8859
8857
 
8860
8858
  /**
8861
8859
  The data structure for documents. @nonabstract
8862
- */ function _array_like_to_array$c(arr, len) {
8860
+ */ function _array_like_to_array$e(arr, len) {
8863
8861
  if (len == null || len > arr.length) len = arr.length;
8864
8862
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
8865
8863
  return arr2;
8866
8864
  }
8867
- function _array_with_holes$7(arr) {
8865
+ function _array_with_holes$9(arr) {
8868
8866
  if (Array.isArray(arr)) return arr;
8869
8867
  }
8870
8868
  function _assert_this_initialized$9(self) {
@@ -8954,7 +8952,7 @@ function _instanceof$f(left, right) {
8954
8952
  function _is_native_function$2(fn) {
8955
8953
  return Function.toString.call(fn).indexOf("[native code]") !== -1;
8956
8954
  }
8957
- function _iterable_to_array_limit$7(arr, i) {
8955
+ function _iterable_to_array_limit$9(arr, i) {
8958
8956
  var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
8959
8957
  if (_i == null) return;
8960
8958
  var _arr = [];
@@ -8978,7 +8976,7 @@ function _iterable_to_array_limit$7(arr, i) {
8978
8976
  }
8979
8977
  return _arr;
8980
8978
  }
8981
- function _non_iterable_rest$7() {
8979
+ function _non_iterable_rest$9() {
8982
8980
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
8983
8981
  }
8984
8982
  function _possible_constructor_return$9(self, call) {
@@ -8994,8 +8992,8 @@ function _set_prototype_of$9(o, p) {
8994
8992
  };
8995
8993
  return _set_prototype_of$9(o, p);
8996
8994
  }
8997
- function _sliced_to_array$7(arr, i) {
8998
- return _array_with_holes$7(arr) || _iterable_to_array_limit$7(arr, i) || _unsupported_iterable_to_array$c(arr, i) || _non_iterable_rest$7();
8995
+ function _sliced_to_array$9(arr, i) {
8996
+ return _array_with_holes$9(arr) || _iterable_to_array_limit$9(arr, i) || _unsupported_iterable_to_array$e(arr, i) || _non_iterable_rest$9();
8999
8997
  }
9000
8998
  function _super_prop_base$1(object, property) {
9001
8999
  while(!Object.prototype.hasOwnProperty.call(object, property)){
@@ -9008,13 +9006,13 @@ function _type_of$b(obj) {
9008
9006
  "@swc/helpers - typeof";
9009
9007
  return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
9010
9008
  }
9011
- function _unsupported_iterable_to_array$c(o, minLen) {
9009
+ function _unsupported_iterable_to_array$e(o, minLen) {
9012
9010
  if (!o) return;
9013
- if (typeof o === "string") return _array_like_to_array$c(o, minLen);
9011
+ if (typeof o === "string") return _array_like_to_array$e(o, minLen);
9014
9012
  var n = Object.prototype.toString.call(o).slice(8, -1);
9015
9013
  if (n === "Object" && o.constructor) n = o.constructor.name;
9016
9014
  if (n === "Map" || n === "Set") return Array.from(n);
9017
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$c(o, minLen);
9015
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$e(o, minLen);
9018
9016
  }
9019
9017
  function _wrap_native_super$2(Class) {
9020
9018
  var _cache = typeof Map === "function" ? new Map() : undefined;
@@ -9095,7 +9093,7 @@ var Text = /*#__PURE__*/ function() {
9095
9093
  */ key: "replace",
9096
9094
  value: function replace(from, to, text) {
9097
9095
  var ref;
9098
- ref = _sliced_to_array$7(clip(this, from, to), 2), from = ref[0], to = ref[1];
9096
+ ref = _sliced_to_array$9(clip(this, from, to), 2), from = ref[0], to = ref[1];
9099
9097
  var parts = [];
9100
9098
  this.decompose(0, from, parts, 2 /* Open.To */ );
9101
9099
  if (text.length) text.decompose(0, text.length, parts, 1 /* Open.From */ | 2 /* Open.To */ );
@@ -9118,7 +9116,7 @@ var Text = /*#__PURE__*/ function() {
9118
9116
  value: function slice(from) {
9119
9117
  var to = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : this.length;
9120
9118
  var ref;
9121
- ref = _sliced_to_array$7(clip(this, from, to), 2), from = ref[0], to = ref[1];
9119
+ ref = _sliced_to_array$9(clip(this, from, to), 2), from = ref[0], to = ref[1];
9122
9120
  var parts = [];
9123
9121
  this.decompose(from, to, parts, 0);
9124
9122
  return TextNode.from(parts, to - from);
@@ -9280,7 +9278,7 @@ var TextLeaf = /*#__PURE__*/ function(Text) {
9280
9278
  value: function replace(from, to, text) {
9281
9279
  if (!_instanceof$f(text, TextLeaf)) return _get$1(_get_prototype_of$9(TextLeaf.prototype), "replace", this).call(this, from, to, text);
9282
9280
  var ref;
9283
- ref = _sliced_to_array$7(clip(this, from, to), 2), from = ref[0], to = ref[1];
9281
+ ref = _sliced_to_array$9(clip(this, from, to), 2), from = ref[0], to = ref[1];
9284
9282
  var lines = appendText(this.text, appendText(text.text, sliceText(this.text, 0, from)), to);
9285
9283
  var newLen = this.length + text.length - (to - from);
9286
9284
  if (lines.length <= 32 /* Tree.Branch */ ) return new TextLeaf(lines, newLen);
@@ -9292,7 +9290,7 @@ var TextLeaf = /*#__PURE__*/ function(Text) {
9292
9290
  value: function sliceString(from) {
9293
9291
  var to = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : this.length, lineSep = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : "\n";
9294
9292
  var ref;
9295
- ref = _sliced_to_array$7(clip(this, from, to), 2), from = ref[0], to = ref[1];
9293
+ ref = _sliced_to_array$9(clip(this, from, to), 2), from = ref[0], to = ref[1];
9296
9294
  var result = "";
9297
9295
  for(var pos = 0, i = 0; pos <= to && i < this.text.length; i++){
9298
9296
  var line = this.text[i], end = pos + line.length;
@@ -9438,7 +9436,7 @@ var TextNode = /*#__PURE__*/ function(Text) {
9438
9436
  key: "replace",
9439
9437
  value: function replace(from, to, text) {
9440
9438
  var ref;
9441
- ref = _sliced_to_array$7(clip(this, from, to), 2), from = ref[0], to = ref[1];
9439
+ ref = _sliced_to_array$9(clip(this, from, to), 2), from = ref[0], to = ref[1];
9442
9440
  if (text.lines < this.lines) for(var i = 0, pos = 0; i < this.children.length; i++){
9443
9441
  var child = this.children[i], end = pos + child.length;
9444
9442
  // Fast path: if the change only affects one child and the
@@ -9464,7 +9462,7 @@ var TextNode = /*#__PURE__*/ function(Text) {
9464
9462
  value: function sliceString(from) {
9465
9463
  var to = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : this.length, lineSep = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : "\n";
9466
9464
  var ref;
9467
- ref = _sliced_to_array$7(clip(this, from, to), 2), from = ref[0], to = ref[1];
9465
+ ref = _sliced_to_array$9(clip(this, from, to), 2), from = ref[0], to = ref[1];
9468
9466
  var result = "";
9469
9467
  for(var i = 0, pos = 0; i < this.children.length && pos <= to; i++){
9470
9468
  var child = this.children[i], end = pos + child.length;
@@ -9505,7 +9503,7 @@ var TextNode = /*#__PURE__*/ function(Text) {
9505
9503
  value: function scanIdentical(other, dir) {
9506
9504
  if (!_instanceof$f(other, TextNode)) return 0;
9507
9505
  var length = 0;
9508
- var _ref = _sliced_to_array$7(dir > 0 ? [
9506
+ var _ref = _sliced_to_array$9(dir > 0 ? [
9509
9507
  0,
9510
9508
  0,
9511
9509
  this.children.length,
@@ -14033,13 +14031,13 @@ situation.
14033
14031
  return strict === true ? -1 : string.length;
14034
14032
  }
14035
14033
 
14036
- function _array_like_to_array$b(arr, len) {
14034
+ function _array_like_to_array$d(arr, len) {
14037
14035
  if (len == null || len > arr.length) len = arr.length;
14038
14036
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
14039
14037
  return arr2;
14040
14038
  }
14041
14039
  function _array_without_holes$8(arr) {
14042
- if (Array.isArray(arr)) return _array_like_to_array$b(arr);
14040
+ if (Array.isArray(arr)) return _array_like_to_array$d(arr);
14043
14041
  }
14044
14042
  function _class_call_check$f(instance, Constructor) {
14045
14043
  if (!(instance instanceof Constructor)) {
@@ -14067,15 +14065,15 @@ function _non_iterable_spread$8() {
14067
14065
  throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
14068
14066
  }
14069
14067
  function _to_consumable_array$8(arr) {
14070
- return _array_without_holes$8(arr) || _iterable_to_array$8(arr) || _unsupported_iterable_to_array$b(arr) || _non_iterable_spread$8();
14068
+ return _array_without_holes$8(arr) || _iterable_to_array$8(arr) || _unsupported_iterable_to_array$d(arr) || _non_iterable_spread$8();
14071
14069
  }
14072
- function _unsupported_iterable_to_array$b(o, minLen) {
14070
+ function _unsupported_iterable_to_array$d(o, minLen) {
14073
14071
  if (!o) return;
14074
- if (typeof o === "string") return _array_like_to_array$b(o, minLen);
14072
+ if (typeof o === "string") return _array_like_to_array$d(o, minLen);
14075
14073
  var n = Object.prototype.toString.call(o).slice(8, -1);
14076
14074
  if (n === "Object" && o.constructor) n = o.constructor.name;
14077
14075
  if (n === "Map" || n === "Set") return Array.from(n);
14078
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$b(o, minLen);
14076
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$d(o, minLen);
14079
14077
  }
14080
14078
  var C$1 = "ͼ";
14081
14079
  var COUNT = typeof Symbol == "undefined" ? "__" + C$1 : Symbol.for(C$1);
@@ -14375,16 +14373,16 @@ function keyName(event) {
14375
14373
  return name;
14376
14374
  }
14377
14375
 
14378
- function _array_like_to_array$a(arr, len) {
14376
+ function _array_like_to_array$c(arr, len) {
14379
14377
  if (len == null || len > arr.length) len = arr.length;
14380
14378
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
14381
14379
  return arr2;
14382
14380
  }
14383
- function _array_with_holes$6(arr) {
14381
+ function _array_with_holes$8(arr) {
14384
14382
  if (Array.isArray(arr)) return arr;
14385
14383
  }
14386
14384
  function _array_without_holes$7(arr) {
14387
- if (Array.isArray(arr)) return _array_like_to_array$a(arr);
14385
+ if (Array.isArray(arr)) return _array_like_to_array$c(arr);
14388
14386
  }
14389
14387
  function _assert_this_initialized$8(self) {
14390
14388
  if (self === void 0) {
@@ -14456,7 +14454,7 @@ function _instanceof$e(left, right) {
14456
14454
  function _iterable_to_array$7(iter) {
14457
14455
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
14458
14456
  }
14459
- function _iterable_to_array_limit$6(arr, i) {
14457
+ function _iterable_to_array_limit$8(arr, i) {
14460
14458
  var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
14461
14459
  if (_i == null) return;
14462
14460
  var _arr = [];
@@ -14480,7 +14478,7 @@ function _iterable_to_array_limit$6(arr, i) {
14480
14478
  }
14481
14479
  return _arr;
14482
14480
  }
14483
- function _non_iterable_rest$6() {
14481
+ function _non_iterable_rest$8() {
14484
14482
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
14485
14483
  }
14486
14484
  function _non_iterable_spread$7() {
@@ -14499,8 +14497,8 @@ function _set_prototype_of$8(o, p) {
14499
14497
  };
14500
14498
  return _set_prototype_of$8(o, p);
14501
14499
  }
14502
- function _sliced_to_array$6(arr, i) {
14503
- return _array_with_holes$6(arr) || _iterable_to_array_limit$6(arr, i) || _unsupported_iterable_to_array$a(arr, i) || _non_iterable_rest$6();
14500
+ function _sliced_to_array$8(arr, i) {
14501
+ return _array_with_holes$8(arr) || _iterable_to_array_limit$8(arr, i) || _unsupported_iterable_to_array$c(arr, i) || _non_iterable_rest$8();
14504
14502
  }
14505
14503
  function _super_prop_base(object, property) {
14506
14504
  while(!Object.prototype.hasOwnProperty.call(object, property)){
@@ -14510,19 +14508,19 @@ function _super_prop_base(object, property) {
14510
14508
  return object;
14511
14509
  }
14512
14510
  function _to_consumable_array$7(arr) {
14513
- return _array_without_holes$7(arr) || _iterable_to_array$7(arr) || _unsupported_iterable_to_array$a(arr) || _non_iterable_spread$7();
14511
+ return _array_without_holes$7(arr) || _iterable_to_array$7(arr) || _unsupported_iterable_to_array$c(arr) || _non_iterable_spread$7();
14514
14512
  }
14515
14513
  function _type_of$a(obj) {
14516
14514
  "@swc/helpers - typeof";
14517
14515
  return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
14518
14516
  }
14519
- function _unsupported_iterable_to_array$a(o, minLen) {
14517
+ function _unsupported_iterable_to_array$c(o, minLen) {
14520
14518
  if (!o) return;
14521
- if (typeof o === "string") return _array_like_to_array$a(o, minLen);
14519
+ if (typeof o === "string") return _array_like_to_array$c(o, minLen);
14522
14520
  var n = Object.prototype.toString.call(o).slice(8, -1);
14523
14521
  if (n === "Object" && o.constructor) n = o.constructor.name;
14524
14522
  if (n === "Map" || n === "Set") return Array.from(n);
14525
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$a(o, minLen);
14523
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$c(o, minLen);
14526
14524
  }
14527
14525
  function _is_native_reflect_construct$8() {
14528
14526
  if (typeof Reflect === "undefined" || !Reflect.construct) return false;
@@ -14739,13 +14737,14 @@ function scrollRectIntoView(dom, rect, side, x, y, xMargin, yMargin, ltr) {
14739
14737
  }
14740
14738
  }
14741
14739
  }
14742
- function scrollableParent(dom) {
14743
- var doc = dom.ownerDocument;
14740
+ function scrollableParents(dom) {
14741
+ var doc = dom.ownerDocument, x, y;
14744
14742
  for(var cur = dom.parentNode; cur;){
14745
- if (cur == doc.body) {
14743
+ if (cur == doc.body || x && y) {
14746
14744
  break;
14747
14745
  } else if (cur.nodeType == 1) {
14748
- if (cur.scrollHeight > cur.clientHeight || cur.scrollWidth > cur.clientWidth) return cur;
14746
+ if (!y && cur.scrollHeight > cur.clientHeight) y = cur;
14747
+ if (!x && cur.scrollWidth > cur.clientWidth) x = cur;
14749
14748
  cur = cur.assignedSlot || cur.parentNode;
14750
14749
  } else if (cur.nodeType == 11) {
14751
14750
  cur = cur.host;
@@ -14753,7 +14752,10 @@ function scrollableParent(dom) {
14753
14752
  break;
14754
14753
  }
14755
14754
  }
14756
- return null;
14755
+ return {
14756
+ x: x,
14757
+ y: y
14758
+ };
14757
14759
  }
14758
14760
  var DOMSelectionState = /*#__PURE__*/ function() {
14759
14761
  function DOMSelectionState() {
@@ -16033,11 +16035,11 @@ function combineAttrs(source, target) {
16033
16035
  }
16034
16036
  return target;
16035
16037
  }
16036
- var noAttrs = /*@__PURE__*/ Object.create(null);
16038
+ var noAttrs$1 = /*@__PURE__*/ Object.create(null);
16037
16039
  function attrsEq(a, b, ignore) {
16038
16040
  if (a == b) return true;
16039
- if (!a) a = noAttrs;
16040
- if (!b) b = noAttrs;
16041
+ if (!a) a = noAttrs$1;
16042
+ if (!b) b = noAttrs$1;
16041
16043
  var keysA = Object.keys(a), keysB = Object.keys(b);
16042
16044
  if (keysA.length - (ignore && keysA.indexOf(ignore) > -1 ? 1 : 0) != keysB.length - (ignore && keysB.indexOf(ignore) > -1 ? 1 : 0)) return false;
16043
16045
  var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
@@ -16282,8 +16284,8 @@ var LineView = /*#__PURE__*/ function(ContentView1) {
16282
16284
  },
16283
16285
  {
16284
16286
  key: "become",
16285
- value: function become(_other) {
16286
- return false;
16287
+ value: function become(other) {
16288
+ return _instanceof$e(other, LineView) && this.children.length == 0 && other.children.length == 0 && attrsEq(this.attrs, other.attrs) && this.breakAfter == other.breakAfter;
16287
16289
  }
16288
16290
  },
16289
16291
  {
@@ -17531,6 +17533,7 @@ var scrollIntoView$1 = /*@__PURE__*/ StateEffect.define({
17531
17533
  return t.map(ch);
17532
17534
  }
17533
17535
  });
17536
+ var setEditContextFormatting = /*@__PURE__*/ StateEffect.define();
17534
17537
  /**
17535
17538
  Log or report an unhandled exception in client code. Should
17536
17539
  probably only be used by extension code that allows client code to
@@ -17941,10 +17944,13 @@ var DocView = /*#__PURE__*/ function(ContentView1) {
17941
17944
  _this = _super.call(this);
17942
17945
  _this.view = view;
17943
17946
  _this.decorations = [];
17944
- _this.dynamicDecorationMap = [];
17947
+ _this.dynamicDecorationMap = [
17948
+ false
17949
+ ];
17945
17950
  _this.domChanged = null;
17946
17951
  _this.hasComposition = null;
17947
17952
  _this.markedForComposition = new Set;
17953
+ _this.editContextFormatting = Decoration.none;
17948
17954
  _this.lastCompositionAfterCursor = false;
17949
17955
  // Track a minimum width for the editor. When measuring sizes in
17950
17956
  // measureVisibleLineHeights, this is updated to point at the width
@@ -18000,8 +18006,9 @@ var DocView = /*#__PURE__*/ function(ContentView1) {
18000
18006
  this.minWidthTo = update.changes.mapPos(this.minWidthTo, 1);
18001
18007
  }
18002
18008
  }
18009
+ this.updateEditContextFormatting(update);
18003
18010
  var readCompositionAt = -1;
18004
- if (this.view.inputState.composing >= 0) {
18011
+ if (this.view.inputState.composing >= 0 && !this.view.observer.editContext) {
18005
18012
  if ((_a = this.domChanged) === null || _a === void 0 ? void 0 : _a.newSel) readCompositionAt = this.domChanged.newSel.head;
18006
18013
  else if (!touchesComposition(update.changes, this.hasComposition) && !update.selectionSet) readCompositionAt = update.state.selection.main.head;
18007
18014
  }
@@ -18129,6 +18136,52 @@ var DocView = /*#__PURE__*/ function(ContentView1) {
18129
18136
  if (composition) this.fixCompositionDOM(composition);
18130
18137
  }
18131
18138
  },
18139
+ {
18140
+ key: "updateEditContextFormatting",
18141
+ value: function updateEditContextFormatting(update) {
18142
+ this.editContextFormatting = this.editContextFormatting.map(update.changes);
18143
+ var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined, _iteratorNormalCompletion1 = true, _didIteratorError1 = false, _iteratorError1 = undefined;
18144
+ try {
18145
+ for(var _iterator = update.transactions[Symbol.iterator](), _step; !(_iteratorNormalCompletion1 = (_step = _iterator.next()).done); _iteratorNormalCompletion1 = true){
18146
+ var tr = _step.value;
18147
+ try {
18148
+ for(var _iterator1 = tr.effects[Symbol.iterator](), _step1; !(_iteratorNormalCompletion = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion = true){
18149
+ var effect = _step1.value;
18150
+ if (effect.is(setEditContextFormatting)) {
18151
+ this.editContextFormatting = effect.value;
18152
+ }
18153
+ }
18154
+ } catch (err) {
18155
+ _didIteratorError = true;
18156
+ _iteratorError = err;
18157
+ } finally{
18158
+ try {
18159
+ if (!_iteratorNormalCompletion && _iterator1.return != null) {
18160
+ _iterator1.return();
18161
+ }
18162
+ } finally{
18163
+ if (_didIteratorError) {
18164
+ throw _iteratorError;
18165
+ }
18166
+ }
18167
+ }
18168
+ }
18169
+ } catch (err) {
18170
+ _didIteratorError1 = true;
18171
+ _iteratorError1 = err;
18172
+ } finally{
18173
+ try {
18174
+ if (!_iteratorNormalCompletion1 && _iterator.return != null) {
18175
+ _iterator.return();
18176
+ }
18177
+ } finally{
18178
+ if (_didIteratorError1) {
18179
+ throw _iteratorError1;
18180
+ }
18181
+ }
18182
+ }
18183
+ }
18184
+ },
18132
18185
  {
18133
18186
  key: "compositionView",
18134
18187
  value: function compositionView(composition) {
@@ -18525,7 +18578,7 @@ var DocView = /*#__PURE__*/ function(ContentView1) {
18525
18578
  key: "updateDeco",
18526
18579
  value: function updateDeco() {
18527
18580
  var _this = this;
18528
- var i = 0;
18581
+ var i = 1;
18529
18582
  var allDeco = this.view.state.facet(decorations).map(function(d) {
18530
18583
  var dynamic = _this.dynamicDecorationMap[i++] = typeof d == "function";
18531
18584
  return dynamic ? d(_this.view) : d;
@@ -18539,7 +18592,9 @@ var DocView = /*#__PURE__*/ function(ContentView1) {
18539
18592
  this.dynamicDecorationMap[i++] = dynamicOuter;
18540
18593
  allDeco.push(RangeSet.join(outerDeco));
18541
18594
  }
18542
- this.decorations = _to_consumable_array$7(allDeco).concat([
18595
+ this.decorations = [
18596
+ this.editContextFormatting
18597
+ ].concat(_to_consumable_array$7(allDeco), [
18543
18598
  this.computeBlockGapDeco(),
18544
18599
  this.view.viewState.lineGapDeco
18545
18600
  ]);
@@ -19359,6 +19414,7 @@ var InputState = /*#__PURE__*/ function() {
19359
19414
  {
19360
19415
  key: "update",
19361
19416
  value: function update(update) {
19417
+ this.view.observer.update(update);
19362
19418
  if (this.mouseSelection) this.mouseSelection.update(update);
19363
19419
  if (this.draggedContent && update.docChanged) this.draggedContent = this.draggedContent.map(update.changes);
19364
19420
  if (update.transactions.length) this.lastKeyCode = this.lastSelectionTime = 0;
@@ -19476,7 +19532,7 @@ var MouseSelection = /*#__PURE__*/ function() {
19476
19532
  };
19477
19533
  this.scrolling = -1;
19478
19534
  this.lastEvent = startEvent;
19479
- this.scrollParent = scrollableParent(view.contentDOM);
19535
+ this.scrollParents = scrollableParents(view.contentDOM);
19480
19536
  this.atoms = view.state.facet(atomicRanges).map(function(f) {
19481
19537
  return f(view);
19482
19538
  });
@@ -19499,22 +19555,20 @@ var MouseSelection = /*#__PURE__*/ function() {
19499
19555
  {
19500
19556
  key: "move",
19501
19557
  value: function move(event) {
19502
- var _a;
19503
19558
  if (event.buttons == 0) return this.destroy();
19504
19559
  if (this.dragging || this.dragging == null && dist(this.startEvent, event) < 10) return;
19505
19560
  this.select(this.lastEvent = event);
19506
19561
  var sx = 0, sy = 0;
19507
- var rect = ((_a = this.scrollParent) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect()) || {
19508
- left: 0,
19509
- top: 0,
19510
- right: this.view.win.innerWidth,
19511
- bottom: this.view.win.innerHeight
19512
- };
19562
+ var left = 0, top = 0, right = this.view.win.innerWidth, bottom = this.view.win.innerHeight;
19563
+ var ref;
19564
+ if (this.scrollParents.x) ref = this.scrollParents.x.getBoundingClientRect(), left = ref.left, right = ref.right;
19565
+ var ref1;
19566
+ if (this.scrollParents.y) ref1 = this.scrollParents.y.getBoundingClientRect(), top = ref1.top, bottom = ref1.bottom;
19513
19567
  var margins = getScrollMargins(this.view);
19514
- if (event.clientX - margins.left <= rect.left + dragScrollMargin) sx = -dragScrollSpeed(rect.left - event.clientX);
19515
- else if (event.clientX + margins.right >= rect.right - dragScrollMargin) sx = dragScrollSpeed(event.clientX - rect.right);
19516
- if (event.clientY - margins.top <= rect.top + dragScrollMargin) sy = -dragScrollSpeed(rect.top - event.clientY);
19517
- else if (event.clientY + margins.bottom >= rect.bottom - dragScrollMargin) sy = dragScrollSpeed(event.clientY - rect.bottom);
19568
+ if (event.clientX - margins.left <= left + dragScrollMargin) sx = -dragScrollSpeed(left - event.clientX);
19569
+ else if (event.clientX + margins.right >= right - dragScrollMargin) sx = dragScrollSpeed(event.clientX - right);
19570
+ if (event.clientY - margins.top <= top + dragScrollMargin) sy = -dragScrollSpeed(top - event.clientY);
19571
+ else if (event.clientY + margins.bottom >= bottom - dragScrollMargin) sy = dragScrollSpeed(event.clientY - bottom);
19518
19572
  this.setScrollSpeed(sx, sy);
19519
19573
  }
19520
19574
  },
@@ -19557,12 +19611,16 @@ var MouseSelection = /*#__PURE__*/ function() {
19557
19611
  {
19558
19612
  key: "scroll",
19559
19613
  value: function scroll() {
19560
- if (this.scrollParent) {
19561
- this.scrollParent.scrollLeft += this.scrollSpeed.x;
19562
- this.scrollParent.scrollTop += this.scrollSpeed.y;
19563
- } else {
19564
- this.view.win.scrollBy(this.scrollSpeed.x, this.scrollSpeed.y);
19614
+ var _this_scrollSpeed = this.scrollSpeed, x = _this_scrollSpeed.x, y = _this_scrollSpeed.y;
19615
+ if (x && this.scrollParents.x) {
19616
+ this.scrollParents.x.scrollLeft += x;
19617
+ x = 0;
19618
+ }
19619
+ if (y && this.scrollParents.y) {
19620
+ this.scrollParents.y.scrollTop += y;
19621
+ y = 0;
19565
19622
  }
19623
+ if (x || y) this.view.win.scrollBy(x, y);
19566
19624
  if (this.dragging === false) this.select(this.lastEvent);
19567
19625
  }
19568
19626
  },
@@ -20099,6 +20157,7 @@ observers.blur = function(view) {
20099
20157
  updateForFocusChange(view);
20100
20158
  };
20101
20159
  observers.compositionstart = observers.compositionupdate = function(view) {
20160
+ if (view.observer.editContext) return; // Composition handled by edit context
20102
20161
  if (view.inputState.compositionFirstChange == null) view.inputState.compositionFirstChange = true;
20103
20162
  if (view.inputState.composing < 0) {
20104
20163
  // FIXME possibly set a timeout to clear it again on Android
@@ -20106,6 +20165,7 @@ observers.compositionstart = observers.compositionupdate = function(view) {
20106
20165
  }
20107
20166
  };
20108
20167
  observers.compositionend = function(view) {
20168
+ if (view.observer.editContext) return; // Composition handled by edit context
20109
20169
  view.inputState.composing = -1;
20110
20170
  view.inputState.compositionEndedAt = Date.now();
20111
20171
  view.inputState.compositionPendingKey = true;
@@ -21636,47 +21696,51 @@ var ViewState = /*#__PURE__*/ function() {
21636
21696
  }
21637
21697
  gaps.push(gap);
21638
21698
  };
21699
+ var checkLine = function(line) {
21700
+ if (line.length < doubleMargin || line.type != BlockType.Text) return;
21701
+ var structure = lineStructure(line.from, line.to, _this.stateDeco);
21702
+ if (structure.total < doubleMargin) return;
21703
+ var target = _this.scrollTarget ? _this.scrollTarget.range.head : null;
21704
+ var viewFrom, viewTo;
21705
+ if (wrapping) {
21706
+ var marginHeight = margin / _this.heightOracle.lineLength * _this.heightOracle.lineHeight;
21707
+ var top, bot;
21708
+ if (target != null) {
21709
+ var targetFrac = findFraction(structure, target);
21710
+ var spaceFrac = ((_this.visibleBottom - _this.visibleTop) / 2 + marginHeight) / line.height;
21711
+ top = targetFrac - spaceFrac;
21712
+ bot = targetFrac + spaceFrac;
21713
+ } else {
21714
+ top = (_this.visibleTop - line.top - marginHeight) / line.height;
21715
+ bot = (_this.visibleBottom - line.top + marginHeight) / line.height;
21716
+ }
21717
+ viewFrom = findPosition(structure, top);
21718
+ viewTo = findPosition(structure, bot);
21719
+ } else {
21720
+ var totalWidth = structure.total * _this.heightOracle.charWidth;
21721
+ var marginWidth = margin * _this.heightOracle.charWidth;
21722
+ var left, right;
21723
+ if (target != null) {
21724
+ var targetFrac1 = findFraction(structure, target);
21725
+ var spaceFrac1 = ((_this.pixelViewport.right - _this.pixelViewport.left) / 2 + marginWidth) / totalWidth;
21726
+ left = targetFrac1 - spaceFrac1;
21727
+ right = targetFrac1 + spaceFrac1;
21728
+ } else {
21729
+ left = (_this.pixelViewport.left - marginWidth) / totalWidth;
21730
+ right = (_this.pixelViewport.right + marginWidth) / totalWidth;
21731
+ }
21732
+ viewFrom = findPosition(structure, left);
21733
+ viewTo = findPosition(structure, right);
21734
+ }
21735
+ if (viewFrom > line.from) addGap(line.from, viewFrom, line, structure);
21736
+ if (viewTo < line.to) addGap(viewTo, line.to, line, structure);
21737
+ };
21639
21738
  var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
21640
21739
  try {
21641
21740
  for(var _iterator = this.viewportLines[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
21642
21741
  var line = _step.value;
21643
- if (line.length < doubleMargin) continue;
21644
- var structure = lineStructure(line.from, line.to, this.stateDeco);
21645
- if (structure.total < doubleMargin) continue;
21646
- var target = this.scrollTarget ? this.scrollTarget.range.head : null;
21647
- var viewFrom = void 0, viewTo = void 0;
21648
- if (wrapping) {
21649
- var marginHeight = margin / this.heightOracle.lineLength * this.heightOracle.lineHeight;
21650
- var top = void 0, bot = void 0;
21651
- if (target != null) {
21652
- var targetFrac = findFraction(structure, target);
21653
- var spaceFrac = ((this.visibleBottom - this.visibleTop) / 2 + marginHeight) / line.height;
21654
- top = targetFrac - spaceFrac;
21655
- bot = targetFrac + spaceFrac;
21656
- } else {
21657
- top = (this.visibleTop - line.top - marginHeight) / line.height;
21658
- bot = (this.visibleBottom - line.top + marginHeight) / line.height;
21659
- }
21660
- viewFrom = findPosition(structure, top);
21661
- viewTo = findPosition(structure, bot);
21662
- } else {
21663
- var totalWidth = structure.total * this.heightOracle.charWidth;
21664
- var marginWidth = margin * this.heightOracle.charWidth;
21665
- var left = void 0, right = void 0;
21666
- if (target != null) {
21667
- var targetFrac1 = findFraction(structure, target);
21668
- var spaceFrac1 = ((this.pixelViewport.right - this.pixelViewport.left) / 2 + marginWidth) / totalWidth;
21669
- left = targetFrac1 - spaceFrac1;
21670
- right = targetFrac1 + spaceFrac1;
21671
- } else {
21672
- left = (this.pixelViewport.left - marginWidth) / totalWidth;
21673
- right = (this.pixelViewport.right + marginWidth) / totalWidth;
21674
- }
21675
- viewFrom = findPosition(structure, left);
21676
- viewTo = findPosition(structure, right);
21677
- }
21678
- if (viewFrom > line.from) addGap(line.from, viewFrom, line, structure);
21679
- if (viewTo < line.to) addGap(viewTo, line.to, line, structure);
21742
+ if (Array.isArray(line.type)) line.type.forEach(checkLine);
21743
+ else checkLine(line);
21680
21744
  }
21681
21745
  } catch (err) {
21682
21746
  _didIteratorError = true;
@@ -22574,26 +22638,7 @@ function applyDOMChange(view, domChange) {
22574
22638
  };
22575
22639
  }
22576
22640
  if (change) {
22577
- if (browser.ios && view.inputState.flushIOSKey(change)) return true;
22578
- // Android browsers don't fire reasonable key events for enter,
22579
- // backspace, or delete. So this detects changes that look like
22580
- // they're caused by those keys, and reinterprets them as key
22581
- // events. (Some of these keys are also handled by beforeinput
22582
- // events and the pendingAndroidKey mechanism, but that's not
22583
- // reliable in all situations.)
22584
- if (browser.android && (change.to == sel.to && // GBoard will sometimes remove a space it just inserted
22585
- // after a completion when you press enter
22586
- (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;
22587
- var text = change.insert.toString();
22588
- if (view.inputState.composing >= 0) view.inputState.composing++;
22589
- var defaultTr;
22590
- var defaultInsert = function() {
22591
- return defaultTr || (defaultTr = applyDefaultInsert(view, change, newSel));
22592
- };
22593
- if (!view.state.facet(inputHandler$1).some(function(h) {
22594
- return h(view, change.from, change.to, text, defaultInsert);
22595
- })) view.dispatch(defaultInsert());
22596
- return true;
22641
+ return applyDOMChangeInner(view, change, newSel, lastKey);
22597
22642
  } else if (newSel && !newSel.main.eq(sel)) {
22598
22643
  var scrollIntoView = false, userEvent = "select";
22599
22644
  if (view.inputState.lastSelectionTime > Date.now() - 50) {
@@ -22610,6 +22655,30 @@ function applyDOMChange(view, domChange) {
22610
22655
  return false;
22611
22656
  }
22612
22657
  }
22658
+ function applyDOMChangeInner(view, change, newSel) {
22659
+ var lastKey = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : -1;
22660
+ if (browser.ios && view.inputState.flushIOSKey(change)) return true;
22661
+ var sel = view.state.selection.main;
22662
+ // Android browsers don't fire reasonable key events for enter,
22663
+ // backspace, or delete. So this detects changes that look like
22664
+ // they're caused by those keys, and reinterprets them as key
22665
+ // events. (Some of these keys are also handled by beforeinput
22666
+ // events and the pendingAndroidKey mechanism, but that's not
22667
+ // reliable in all situations.)
22668
+ if (browser.android && (change.to == sel.to && // GBoard will sometimes remove a space it just inserted
22669
+ // after a completion when you press enter
22670
+ (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;
22671
+ var text = change.insert.toString();
22672
+ if (view.inputState.composing >= 0) view.inputState.composing++;
22673
+ var defaultTr;
22674
+ var defaultInsert = function() {
22675
+ return defaultTr || (defaultTr = applyDefaultInsert(view, change, newSel));
22676
+ };
22677
+ if (!view.state.facet(inputHandler$1).some(function(h) {
22678
+ return h(view, change.from, change.to, text, defaultInsert);
22679
+ })) view.dispatch(defaultInsert());
22680
+ return true;
22681
+ }
22613
22682
  function applyDefaultInsert(view, change, newSel) {
22614
22683
  var tr, startState = view.state, sel = startState.selection.main;
22615
22684
  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) {
@@ -22739,6 +22808,7 @@ var DOMObserver = /*#__PURE__*/ function() {
22739
22808
  _class_call_check$e(this, DOMObserver);
22740
22809
  this.view = view;
22741
22810
  this.active = false;
22811
+ this.editContext = null;
22742
22812
  // The known selection. Kept in our own object, as opposed to just
22743
22813
  // directly accessing the selection because:
22744
22814
  // - Safari doesn't report the right selection in shadow DOM
@@ -22799,6 +22869,11 @@ var DOMObserver = /*#__PURE__*/ function() {
22799
22869
  })) _this.flushSoon();
22800
22870
  else _this.flush();
22801
22871
  });
22872
+ if (window.EditContext && view.constructor.EDIT_CONTEXT !== false && // Chrome <126 doesn't support inverted selections in edit context (#1392)
22873
+ !(browser.chrome && browser.chrome_version < 126)) {
22874
+ this.editContext = new EditContextManager(view);
22875
+ if (view.state.facet(editable)) view.contentDOM.editContext = this.editContext.editContext;
22876
+ }
22802
22877
  if (useCharData) this.onCharData = function(event) {
22803
22878
  _this.queue.push({
22804
22879
  target: event.target,
@@ -22854,6 +22929,7 @@ var DOMObserver = /*#__PURE__*/ function() {
22854
22929
  key: "onScroll",
22855
22930
  value: function onScroll(e) {
22856
22931
  if (this.intersecting) this.flush(false);
22932
+ if (this.editContext) this.view.requestMeasure(this.editContext.measureReq);
22857
22933
  this.onScrollChanged(e);
22858
22934
  }
22859
22935
  },
@@ -23301,6 +23377,15 @@ var DOMObserver = /*#__PURE__*/ function() {
23301
23377
  win.document.removeEventListener("selectionchange", this.onSelectionChange);
23302
23378
  }
23303
23379
  },
23380
+ {
23381
+ key: "update",
23382
+ value: function update(update) {
23383
+ if (this.editContext) {
23384
+ this.editContext.update(update);
23385
+ if (update.startState.facet(editable) != update.state.facet(editable)) update.view.contentDOM.editContext = update.state.facet(editable) ? this.editContext.editContext : null;
23386
+ }
23387
+ }
23388
+ },
23304
23389
  {
23305
23390
  key: "destroy",
23306
23391
  value: function destroy() {
@@ -23334,6 +23419,10 @@ var DOMObserver = /*#__PURE__*/ function() {
23334
23419
  clearTimeout(this.resizeTimeout);
23335
23420
  this.win.cancelAnimationFrame(this.delayedFlush);
23336
23421
  this.win.cancelAnimationFrame(this.flushingAndroidKey);
23422
+ if (this.editContext) {
23423
+ this.view.contentDOM.editContext = null;
23424
+ this.editContext.destroy();
23425
+ }
23337
23426
  }
23338
23427
  }
23339
23428
  ]);
@@ -23391,6 +23480,219 @@ function safariSelectionRangeHack(view, selection) {
23391
23480
  view.contentDOM.removeEventListener("beforeinput", read, true);
23392
23481
  return found ? buildSelectionRangeFromRange(view, found) : null;
23393
23482
  }
23483
+ var EditContextManager = /*#__PURE__*/ function() {
23484
+ function EditContextManager(view) {
23485
+ var _this = this;
23486
+ _class_call_check$e(this, EditContextManager);
23487
+ // The document window for which the text in the context is
23488
+ // maintained. For large documents, this may be smaller than the
23489
+ // editor document. This window always includes the selection head.
23490
+ this.from = 0;
23491
+ this.to = 0;
23492
+ // When applying a transaction, this is used to compare the change
23493
+ // made to the context content to the change in the transaction in
23494
+ // order to make the minimal changes to the context (since touching
23495
+ // that sometimes breaks series of multiple edits made for a single
23496
+ // user action on some Android keyboards)
23497
+ this.pendingContextChange = null;
23498
+ this.handlers = Object.create(null);
23499
+ this.resetRange(view.state);
23500
+ var context = this.editContext = new window.EditContext({
23501
+ text: view.state.doc.sliceString(this.from, this.to),
23502
+ selectionStart: this.toContextPos(Math.max(this.from, Math.min(this.to, view.state.selection.main.anchor))),
23503
+ selectionEnd: this.toContextPos(view.state.selection.main.head)
23504
+ });
23505
+ this.handlers.textupdate = function(e) {
23506
+ var anchor = view.state.selection.main.anchor;
23507
+ var change = {
23508
+ from: _this.toEditorPos(e.updateRangeStart),
23509
+ to: _this.toEditorPos(e.updateRangeEnd),
23510
+ insert: Text.of(e.text.split("\n"))
23511
+ };
23512
+ // If the window doesn't include the anchor, assume changes
23513
+ // adjacent to a side go up to the anchor.
23514
+ if (change.from == _this.from && anchor < _this.from) change.from = anchor;
23515
+ else if (change.to == _this.to && anchor > _this.to) change.to = anchor;
23516
+ // Edit contexts sometimes fire empty changes
23517
+ if (change.from == change.to && !change.insert.length) return;
23518
+ _this.pendingContextChange = change;
23519
+ applyDOMChangeInner(view, change, EditorSelection.single(_this.toEditorPos(e.selectionStart), _this.toEditorPos(e.selectionEnd)));
23520
+ // If the transaction didn't flush our change, revert it so
23521
+ // that the context is in sync with the editor state again.
23522
+ if (_this.pendingContextChange) {
23523
+ _this.revertPending(view.state);
23524
+ _this.setSelection(view.state);
23525
+ }
23526
+ };
23527
+ this.handlers.characterboundsupdate = function(e) {
23528
+ var rects = [], prev = null;
23529
+ for(var i = _this.toEditorPos(e.rangeStart), end = _this.toEditorPos(e.rangeEnd); i < end; i++){
23530
+ var rect = view.coordsForChar(i);
23531
+ prev = rect && new DOMRect(rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top) || prev || new DOMRect;
23532
+ rects.push(prev);
23533
+ }
23534
+ context.updateCharacterBounds(e.rangeStart, rects);
23535
+ };
23536
+ this.handlers.textformatupdate = function(e) {
23537
+ var deco = [];
23538
+ var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
23539
+ try {
23540
+ for(var _iterator = e.getTextFormats()[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
23541
+ var format = _step.value;
23542
+ var lineStyle = format.underlineStyle, thickness = format.underlineThickness;
23543
+ if (lineStyle != "None" && thickness != "None") {
23544
+ var style = "text-decoration: underline ".concat(lineStyle == "Dashed" ? "dashed " : lineStyle == "Squiggle" ? "wavy " : "").concat(thickness == "Thin" ? 1 : 2, "px");
23545
+ deco.push(Decoration.mark({
23546
+ attributes: {
23547
+ style: style
23548
+ }
23549
+ }).range(_this.toEditorPos(format.rangeStart), _this.toEditorPos(format.rangeEnd)));
23550
+ }
23551
+ }
23552
+ } catch (err) {
23553
+ _didIteratorError = true;
23554
+ _iteratorError = err;
23555
+ } finally{
23556
+ try {
23557
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
23558
+ _iterator.return();
23559
+ }
23560
+ } finally{
23561
+ if (_didIteratorError) {
23562
+ throw _iteratorError;
23563
+ }
23564
+ }
23565
+ }
23566
+ view.dispatch({
23567
+ effects: setEditContextFormatting.of(Decoration.set(deco))
23568
+ });
23569
+ };
23570
+ this.handlers.compositionstart = function() {
23571
+ if (view.inputState.composing < 0) {
23572
+ view.inputState.composing = 0;
23573
+ view.inputState.compositionFirstChange = true;
23574
+ }
23575
+ };
23576
+ this.handlers.compositionend = function() {
23577
+ view.inputState.composing = -1;
23578
+ view.inputState.compositionFirstChange = null;
23579
+ };
23580
+ for(var event in this.handlers)context.addEventListener(event, this.handlers[event]);
23581
+ this.measureReq = {
23582
+ read: function(view) {
23583
+ _this.editContext.updateControlBounds(view.contentDOM.getBoundingClientRect());
23584
+ var sel = getSelection(view.root);
23585
+ if (sel && sel.rangeCount) _this.editContext.updateSelectionBounds(sel.getRangeAt(0).getBoundingClientRect());
23586
+ }
23587
+ };
23588
+ }
23589
+ _create_class$b(EditContextManager, [
23590
+ {
23591
+ key: "applyEdits",
23592
+ value: function applyEdits(update) {
23593
+ var _this = this;
23594
+ var off = 0, abort = false, pending = this.pendingContextChange;
23595
+ update.changes.iterChanges(function(fromA, toA, _fromB, _toB, insert) {
23596
+ if (abort) return;
23597
+ var dLen = insert.length - (toA - fromA);
23598
+ if (pending && toA >= pending.to) {
23599
+ if (pending.from == fromA && pending.to == toA && pending.insert.eq(insert)) {
23600
+ pending = _this.pendingContextChange = null; // Match
23601
+ off += dLen;
23602
+ _this.to += dLen;
23603
+ return;
23604
+ } else {
23605
+ pending = null;
23606
+ _this.revertPending(update.state);
23607
+ }
23608
+ }
23609
+ fromA += off;
23610
+ toA += off;
23611
+ if (toA <= _this.from) {
23612
+ _this.from += dLen;
23613
+ _this.to += dLen;
23614
+ } else if (fromA < _this.to) {
23615
+ if (fromA < _this.from || toA > _this.to || _this.to - _this.from + insert.length > 30000 /* CxVp.MaxSize */ ) {
23616
+ abort = true;
23617
+ return;
23618
+ }
23619
+ _this.editContext.updateText(_this.toContextPos(fromA), _this.toContextPos(toA), insert.toString());
23620
+ _this.to += dLen;
23621
+ }
23622
+ off += dLen;
23623
+ });
23624
+ if (pending && !abort) this.revertPending(update.state);
23625
+ return !abort;
23626
+ }
23627
+ },
23628
+ {
23629
+ key: "update",
23630
+ value: function update(update) {
23631
+ var reverted = this.pendingContextChange;
23632
+ if (!this.applyEdits(update) || !this.rangeIsValid(update.state)) {
23633
+ this.pendingContextChange = null;
23634
+ this.resetRange(update.state);
23635
+ this.editContext.updateText(0, this.editContext.text.length, update.state.doc.sliceString(this.from, this.to));
23636
+ this.setSelection(update.state);
23637
+ } else if (update.docChanged || update.selectionSet || reverted) {
23638
+ this.setSelection(update.state);
23639
+ }
23640
+ if (update.geometryChanged || update.docChanged || update.selectionSet) update.view.requestMeasure(this.measureReq);
23641
+ }
23642
+ },
23643
+ {
23644
+ key: "resetRange",
23645
+ value: function resetRange(state) {
23646
+ var head = state.selection.main.head;
23647
+ this.from = Math.max(0, head - 10000 /* CxVp.Margin */ );
23648
+ this.to = Math.min(state.doc.length, head + 10000 /* CxVp.Margin */ );
23649
+ }
23650
+ },
23651
+ {
23652
+ key: "revertPending",
23653
+ value: function revertPending(state) {
23654
+ var pending = this.pendingContextChange;
23655
+ this.pendingContextChange = null;
23656
+ this.editContext.updateText(this.toContextPos(pending.from), this.toContextPos(pending.from + pending.insert.length), state.doc.sliceString(pending.from, pending.to));
23657
+ }
23658
+ },
23659
+ {
23660
+ key: "setSelection",
23661
+ value: function setSelection(state) {
23662
+ var main = state.selection.main;
23663
+ var start = this.toContextPos(Math.max(this.from, Math.min(this.to, main.anchor)));
23664
+ var end = this.toContextPos(main.head);
23665
+ if (this.editContext.selectionStart != start || this.editContext.selectionEnd != end) this.editContext.updateSelection(start, end);
23666
+ }
23667
+ },
23668
+ {
23669
+ key: "rangeIsValid",
23670
+ value: function rangeIsValid(state) {
23671
+ var head = state.selection.main.head;
23672
+ 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);
23673
+ }
23674
+ },
23675
+ {
23676
+ key: "toEditorPos",
23677
+ value: function toEditorPos(contextPos) {
23678
+ return contextPos + this.from;
23679
+ }
23680
+ },
23681
+ {
23682
+ key: "toContextPos",
23683
+ value: function toContextPos(editorPos) {
23684
+ return editorPos - this.from;
23685
+ }
23686
+ },
23687
+ {
23688
+ key: "destroy",
23689
+ value: function destroy() {
23690
+ for(var event in this.handlers)this.editContext.removeEventListener(event, this.handlers[event]);
23691
+ }
23692
+ }
23693
+ ]);
23694
+ return EditContextManager;
23695
+ }();
23394
23696
  // The editor's update state machine looks something like this:
23395
23697
  //
23396
23698
  // Idle → Updating ⇆ Idle (unchecked) → Measuring → Idle
@@ -24583,6 +24885,7 @@ transactions for editing actions.
24583
24885
  calling this.
24584
24886
  */ key: "destroy",
24585
24887
  value: function destroy() {
24888
+ if (this.root.activeElement == this.contentDOM) this.contentDOM.blur();
24586
24889
  var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
24587
24890
  try {
24588
24891
  for(var _iterator = this.plugins[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
@@ -26392,7 +26695,7 @@ going to happen when paired with
26392
26695
  [`rectangularSelection`](https://codemirror.net/6/docs/ref/#view.rectangularSelection).
26393
26696
  */ function crosshairCursor() {
26394
26697
  var options = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
26395
- var _keys_ = _sliced_to_array$6(keys[options.key || "Alt"], 2), code = _keys_[0], getter = _keys_[1];
26698
+ var _keys_ = _sliced_to_array$8(keys[options.key || "Alt"], 2), code = _keys_[0], getter = _keys_[1];
26396
26699
  var plugin = ViewPlugin.fromClass(/*#__PURE__*/ function() {
26397
26700
  function _class(view) {
26398
26701
  _class_call_check$e(this, _class);
@@ -28723,12 +29026,12 @@ line](https://codemirror.net/6/docs/ref/#view.highlightActiveLine).
28723
29026
 
28724
29027
  /**
28725
29028
  The default maximum length of a `TreeBuffer` node.
28726
- */ function _array_like_to_array$9(arr, len) {
29029
+ */ function _array_like_to_array$b(arr, len) {
28727
29030
  if (len == null || len > arr.length) len = arr.length;
28728
29031
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
28729
29032
  return arr2;
28730
29033
  }
28731
- function _array_with_holes$5(arr) {
29034
+ function _array_with_holes$7(arr) {
28732
29035
  if (Array.isArray(arr)) return arr;
28733
29036
  }
28734
29037
  function _assert_this_initialized$7(self) {
@@ -28782,7 +29085,7 @@ function _instanceof$d(left, right) {
28782
29085
  return left instanceof right;
28783
29086
  }
28784
29087
  }
28785
- function _iterable_to_array_limit$5(arr, i) {
29088
+ function _iterable_to_array_limit$7(arr, i) {
28786
29089
  var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
28787
29090
  if (_i == null) return;
28788
29091
  var _arr = [];
@@ -28806,7 +29109,7 @@ function _iterable_to_array_limit$5(arr, i) {
28806
29109
  }
28807
29110
  return _arr;
28808
29111
  }
28809
- function _non_iterable_rest$5() {
29112
+ function _non_iterable_rest$7() {
28810
29113
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
28811
29114
  }
28812
29115
  function _possible_constructor_return$7(self, call) {
@@ -28822,20 +29125,20 @@ function _set_prototype_of$7(o, p) {
28822
29125
  };
28823
29126
  return _set_prototype_of$7(o, p);
28824
29127
  }
28825
- function _sliced_to_array$5(arr, i) {
28826
- return _array_with_holes$5(arr) || _iterable_to_array_limit$5(arr, i) || _unsupported_iterable_to_array$9(arr, i) || _non_iterable_rest$5();
29128
+ function _sliced_to_array$7(arr, i) {
29129
+ return _array_with_holes$7(arr) || _iterable_to_array_limit$7(arr, i) || _unsupported_iterable_to_array$b(arr, i) || _non_iterable_rest$7();
28827
29130
  }
28828
29131
  function _type_of$9(obj) {
28829
29132
  "@swc/helpers - typeof";
28830
29133
  return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
28831
29134
  }
28832
- function _unsupported_iterable_to_array$9(o, minLen) {
29135
+ function _unsupported_iterable_to_array$b(o, minLen) {
28833
29136
  if (!o) return;
28834
- if (typeof o === "string") return _array_like_to_array$9(o, minLen);
29137
+ if (typeof o === "string") return _array_like_to_array$b(o, minLen);
28835
29138
  var n = Object.prototype.toString.call(o).slice(8, -1);
28836
29139
  if (n === "Object" && o.constructor) n = o.constructor.name;
28837
29140
  if (n === "Map" || n === "Set") return Array.from(n);
28838
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$9(o, minLen);
29141
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$b(o, minLen);
28839
29142
  }
28840
29143
  function _is_native_reflect_construct$7() {
28841
29144
  if (typeof Reflect === "undefined" || !Reflect.construct) return false;
@@ -29320,7 +29623,7 @@ move around to adjacent nodes.
29320
29623
  var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
29321
29624
  try {
29322
29625
  for(var _iterator = props[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
29323
- var _step_value = _sliced_to_array$5(_step.value, 2), prop = _step_value[0], value = _step_value[1];
29626
+ var _step_value = _sliced_to_array$7(_step.value, 2), prop = _step_value[0], value = _step_value[1];
29324
29627
  this.props[typeof prop == "number" ? prop : prop.id] = value;
29325
29628
  }
29326
29629
  } catch (err) {
@@ -32111,12 +32414,12 @@ In addition, these mappings are provided:
32111
32414
  }
32112
32415
  ]);
32113
32416
 
32114
- function _array_like_to_array$8(arr, len) {
32417
+ function _array_like_to_array$a(arr, len) {
32115
32418
  if (len == null || len > arr.length) len = arr.length;
32116
32419
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
32117
32420
  return arr2;
32118
32421
  }
32119
- function _array_with_holes$4(arr) {
32422
+ function _array_with_holes$6(arr) {
32120
32423
  if (Array.isArray(arr)) return arr;
32121
32424
  }
32122
32425
  function _assert_this_initialized$6(self) {
@@ -32144,7 +32447,7 @@ function _create_class$8(Constructor, protoProps, staticProps) {
32144
32447
  if (staticProps) _defineProperties$8(Constructor, staticProps);
32145
32448
  return Constructor;
32146
32449
  }
32147
- function _define_property$3(obj, key, value) {
32450
+ function _define_property$4(obj, key, value) {
32148
32451
  if (key in obj) {
32149
32452
  Object.defineProperty(obj, key, {
32150
32453
  value: value,
@@ -32183,7 +32486,7 @@ function _instanceof$c(left, right) {
32183
32486
  return left instanceof right;
32184
32487
  }
32185
32488
  }
32186
- function _iterable_to_array_limit$4(arr, i) {
32489
+ function _iterable_to_array_limit$6(arr, i) {
32187
32490
  var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
32188
32491
  if (_i == null) return;
32189
32492
  var _arr = [];
@@ -32207,7 +32510,7 @@ function _iterable_to_array_limit$4(arr, i) {
32207
32510
  }
32208
32511
  return _arr;
32209
32512
  }
32210
- function _non_iterable_rest$4() {
32513
+ function _non_iterable_rest$6() {
32211
32514
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
32212
32515
  }
32213
32516
  function _possible_constructor_return$6(self, call) {
@@ -32223,20 +32526,20 @@ function _set_prototype_of$6(o, p) {
32223
32526
  };
32224
32527
  return _set_prototype_of$6(o, p);
32225
32528
  }
32226
- function _sliced_to_array$4(arr, i) {
32227
- return _array_with_holes$4(arr) || _iterable_to_array_limit$4(arr, i) || _unsupported_iterable_to_array$8(arr, i) || _non_iterable_rest$4();
32529
+ function _sliced_to_array$6(arr, i) {
32530
+ return _array_with_holes$6(arr) || _iterable_to_array_limit$6(arr, i) || _unsupported_iterable_to_array$a(arr, i) || _non_iterable_rest$6();
32228
32531
  }
32229
32532
  function _type_of$8(obj) {
32230
32533
  "@swc/helpers - typeof";
32231
32534
  return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
32232
32535
  }
32233
- function _unsupported_iterable_to_array$8(o, minLen) {
32536
+ function _unsupported_iterable_to_array$a(o, minLen) {
32234
32537
  if (!o) return;
32235
- if (typeof o === "string") return _array_like_to_array$8(o, minLen);
32538
+ if (typeof o === "string") return _array_like_to_array$a(o, minLen);
32236
32539
  var n = Object.prototype.toString.call(o).slice(8, -1);
32237
32540
  if (n === "Object" && o.constructor) n = o.constructor.name;
32238
32541
  if (n === "Map" || n === "Set") return Array.from(n);
32239
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$8(o, minLen);
32542
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$a(o, minLen);
32240
32543
  }
32241
32544
  function _is_native_reflect_construct$6() {
32242
32545
  if (typeof Reflect === "undefined" || !Reflect.construct) return false;
@@ -34678,7 +34981,7 @@ for(var _i$1 = 0, _iter = [
34678
34981
  "propertyName"
34679
34982
  ]
34680
34983
  ]; _i$1 < _iter.length; _i$1++){
34681
- var _iter__i = _sliced_to_array$4(_iter[_i$1], 2), legacyName = _iter__i[0], name = _iter__i[1];
34984
+ var _iter__i = _sliced_to_array$6(_iter[_i$1], 2), legacyName = _iter__i[0], name = _iter__i[1];
34682
34985
  defaultTable[legacyName] = /*@__PURE__*/ createTokenType(noTokens, name);
34683
34986
  }
34684
34987
  function warnForPart(part, msg) {
@@ -34769,7 +35072,7 @@ function createTokenType(extra, tagStr) {
34769
35072
  id: typeArray.length,
34770
35073
  name: name1,
34771
35074
  props: [
34772
- styleTags(_define_property$3({}, name1, tags$1))
35075
+ styleTags(_define_property$4({}, name1, tags$1))
34773
35076
  ]
34774
35077
  });
34775
35078
  typeArray.push(type);
@@ -37114,8 +37417,7 @@ var LintState = /*#__PURE__*/ function() {
37114
37417
  attributes: {
37115
37418
  class: "cm-lintRange cm-lintRange-" + d.severity + (d.markClass ? " " + d.markClass : "")
37116
37419
  },
37117
- diagnostic: d,
37118
- inclusive: true
37420
+ diagnostic: d
37119
37421
  }).range(d.from, d.to);
37120
37422
  }), true);
37121
37423
  return new LintState(ranges, panel, findDiagnostic(ranges));
@@ -37219,8 +37521,7 @@ var lintState = /*@__PURE__*/ StateField.define({
37219
37521
  }
37220
37522
  });
37221
37523
  var activeMark = /*@__PURE__*/ Decoration.mark({
37222
- class: "cm-lintRange cm-lintRange-active",
37223
- inclusive: true
37524
+ class: "cm-lintRange cm-lintRange-active"
37224
37525
  });
37225
37526
  function lintTooltip(view, pos, side) {
37226
37527
  var diagnostics = view.state.field(lintState).diagnostics;
@@ -38090,16 +38391,16 @@ the diagnostics.
38090
38391
  ];
38091
38392
  }
38092
38393
 
38093
- function _array_like_to_array$7(arr, len) {
38394
+ function _array_like_to_array$9(arr, len) {
38094
38395
  if (len == null || len > arr.length) len = arr.length;
38095
38396
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
38096
38397
  return arr2;
38097
38398
  }
38098
- function _array_with_holes$3(arr) {
38399
+ function _array_with_holes$5(arr) {
38099
38400
  if (Array.isArray(arr)) return arr;
38100
38401
  }
38101
38402
  function _array_without_holes$6(arr) {
38102
- if (Array.isArray(arr)) return _array_like_to_array$7(arr);
38403
+ if (Array.isArray(arr)) return _array_like_to_array$9(arr);
38103
38404
  }
38104
38405
  function _assert_this_initialized$4(self) {
38105
38406
  if (self === void 0) {
@@ -38155,7 +38456,7 @@ function _instanceof$a(left, right) {
38155
38456
  function _iterable_to_array$6(iter) {
38156
38457
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
38157
38458
  }
38158
- function _iterable_to_array_limit$3(arr, i) {
38459
+ function _iterable_to_array_limit$5(arr, i) {
38159
38460
  var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
38160
38461
  if (_i == null) return;
38161
38462
  var _arr = [];
@@ -38179,7 +38480,7 @@ function _iterable_to_array_limit$3(arr, i) {
38179
38480
  }
38180
38481
  return _arr;
38181
38482
  }
38182
- function _non_iterable_rest$3() {
38483
+ function _non_iterable_rest$5() {
38183
38484
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
38184
38485
  }
38185
38486
  function _non_iterable_spread$6() {
@@ -38198,23 +38499,23 @@ function _set_prototype_of$4(o, p) {
38198
38499
  };
38199
38500
  return _set_prototype_of$4(o, p);
38200
38501
  }
38201
- function _sliced_to_array$3(arr, i) {
38202
- return _array_with_holes$3(arr) || _iterable_to_array_limit$3(arr, i) || _unsupported_iterable_to_array$7(arr, i) || _non_iterable_rest$3();
38502
+ function _sliced_to_array$5(arr, i) {
38503
+ return _array_with_holes$5(arr) || _iterable_to_array_limit$5(arr, i) || _unsupported_iterable_to_array$9(arr, i) || _non_iterable_rest$5();
38203
38504
  }
38204
38505
  function _to_consumable_array$6(arr) {
38205
- return _array_without_holes$6(arr) || _iterable_to_array$6(arr) || _unsupported_iterable_to_array$7(arr) || _non_iterable_spread$6();
38506
+ return _array_without_holes$6(arr) || _iterable_to_array$6(arr) || _unsupported_iterable_to_array$9(arr) || _non_iterable_spread$6();
38206
38507
  }
38207
38508
  function _type_of$6(obj) {
38208
38509
  "@swc/helpers - typeof";
38209
38510
  return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
38210
38511
  }
38211
- function _unsupported_iterable_to_array$7(o, minLen) {
38512
+ function _unsupported_iterable_to_array$9(o, minLen) {
38212
38513
  if (!o) return;
38213
- if (typeof o === "string") return _array_like_to_array$7(o, minLen);
38514
+ if (typeof o === "string") return _array_like_to_array$9(o, minLen);
38214
38515
  var n = Object.prototype.toString.call(o).slice(8, -1);
38215
38516
  if (n === "Object" && o.constructor) n = o.constructor.name;
38216
38517
  if (n === "Map" || n === "Set") return Array.from(n);
38217
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$7(o, minLen);
38518
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$9(o, minLen);
38218
38519
  }
38219
38520
  function _is_native_reflect_construct$4() {
38220
38521
  if (typeof Reflect === "undefined" || !Reflect.construct) return false;
@@ -39547,7 +39848,7 @@ var Parse = /*#__PURE__*/ function() {
39547
39848
  // the history of reductions only being available in an
39548
39849
  // expensive-to-access format in the stack buffers.)
39549
39850
  if (this.bigReductionCount > 300 /* Rec.MaxLeftAssociativeReductionCount */ && stacks.length == 1) {
39550
- var _stacks = _sliced_to_array$3(stacks, 1), s = _stacks[0];
39851
+ var _stacks = _sliced_to_array$5(stacks, 1), s = _stacks[0];
39551
39852
  while(s.forceReduce() && s.stack.length && s.stack[s.stack.length - 2] >= this.lastBigReductionStart){}
39552
39853
  this.bigReductionCount = this.lastBigReductionSize = 0;
39553
39854
  }
@@ -40320,16 +40621,16 @@ JSON language support.
40320
40621
  return new LanguageSupport(jsonLanguage);
40321
40622
  }
40322
40623
 
40323
- function _array_like_to_array$6(arr, len) {
40624
+ function _array_like_to_array$8(arr, len) {
40324
40625
  if (len == null || len > arr.length) len = arr.length;
40325
40626
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
40326
40627
  return arr2;
40327
40628
  }
40328
- function _array_with_holes$2(arr) {
40629
+ function _array_with_holes$4(arr) {
40329
40630
  if (Array.isArray(arr)) return arr;
40330
40631
  }
40331
40632
  function _array_without_holes$5(arr) {
40332
- if (Array.isArray(arr)) return _array_like_to_array$6(arr);
40633
+ if (Array.isArray(arr)) return _array_like_to_array$8(arr);
40333
40634
  }
40334
40635
  function _assert_this_initialized$3(self) {
40335
40636
  if (self === void 0) {
@@ -40378,7 +40679,7 @@ function _inherits$3(subClass, superClass) {
40378
40679
  function _iterable_to_array$5(iter) {
40379
40680
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
40380
40681
  }
40381
- function _iterable_to_array_limit$2(arr, i) {
40682
+ function _iterable_to_array_limit$4(arr, i) {
40382
40683
  var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
40383
40684
  if (_i == null) return;
40384
40685
  var _arr = [];
@@ -40402,7 +40703,7 @@ function _iterable_to_array_limit$2(arr, i) {
40402
40703
  }
40403
40704
  return _arr;
40404
40705
  }
40405
- function _non_iterable_rest$2() {
40706
+ function _non_iterable_rest$4() {
40406
40707
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
40407
40708
  }
40408
40709
  function _non_iterable_spread$5() {
@@ -40421,23 +40722,23 @@ function _set_prototype_of$3(o, p) {
40421
40722
  };
40422
40723
  return _set_prototype_of$3(o, p);
40423
40724
  }
40424
- function _sliced_to_array$2(arr, i) {
40425
- return _array_with_holes$2(arr) || _iterable_to_array_limit$2(arr, i) || _unsupported_iterable_to_array$6(arr, i) || _non_iterable_rest$2();
40725
+ function _sliced_to_array$4(arr, i) {
40726
+ return _array_with_holes$4(arr) || _iterable_to_array_limit$4(arr, i) || _unsupported_iterable_to_array$8(arr, i) || _non_iterable_rest$4();
40426
40727
  }
40427
40728
  function _to_consumable_array$5(arr) {
40428
- return _array_without_holes$5(arr) || _iterable_to_array$5(arr) || _unsupported_iterable_to_array$6(arr) || _non_iterable_spread$5();
40729
+ return _array_without_holes$5(arr) || _iterable_to_array$5(arr) || _unsupported_iterable_to_array$8(arr) || _non_iterable_spread$5();
40429
40730
  }
40430
40731
  function _type_of$5(obj) {
40431
40732
  "@swc/helpers - typeof";
40432
40733
  return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
40433
40734
  }
40434
- function _unsupported_iterable_to_array$6(o, minLen) {
40735
+ function _unsupported_iterable_to_array$8(o, minLen) {
40435
40736
  if (!o) return;
40436
- if (typeof o === "string") return _array_like_to_array$6(o, minLen);
40737
+ if (typeof o === "string") return _array_like_to_array$8(o, minLen);
40437
40738
  var n = Object.prototype.toString.call(o).slice(8, -1);
40438
40739
  if (n === "Object" && o.constructor) n = o.constructor.name;
40439
40740
  if (n === "Map" || n === "Set") return Array.from(n);
40440
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$6(o, minLen);
40741
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$8(o, minLen);
40441
40742
  }
40442
40743
  function _is_native_reflect_construct$3() {
40443
40744
  if (typeof Reflect === "undefined" || !Reflect.construct) return false;
@@ -40831,7 +41132,7 @@ function createLineDialog(view) {
40831
41132
  var match = /^([+-])?(\d+)?(:\d+)?(%)?$/.exec(input.value);
40832
41133
  if (!match) return;
40833
41134
  var state = view.state, startLine = state.doc.lineAt(state.selection.main.head);
40834
- var _match = _sliced_to_array$2(match, 5), sign = _match[1], ln = _match[2], cl = _match[3], percent = _match[4];
41135
+ var _match = _sliced_to_array$4(match, 5), sign = _match[1], ln = _match[2], cl = _match[3], percent = _match[4];
40835
41136
  var col = cl ? +cl.slice(1) : 0;
40836
41137
  var line = ln ? +ln : startLine.number;
40837
41138
  if (ln && percent) {
@@ -42008,16 +42309,16 @@ var searchExtensions = [
42008
42309
  baseTheme$2
42009
42310
  ];
42010
42311
 
42011
- function _array_like_to_array$5(arr, len) {
42312
+ function _array_like_to_array$7(arr, len) {
42012
42313
  if (len == null || len > arr.length) len = arr.length;
42013
42314
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
42014
42315
  return arr2;
42015
42316
  }
42016
- function _array_with_holes$1(arr) {
42317
+ function _array_with_holes$3(arr) {
42017
42318
  if (Array.isArray(arr)) return arr;
42018
42319
  }
42019
42320
  function _array_without_holes$4(arr) {
42020
- if (Array.isArray(arr)) return _array_like_to_array$5(arr);
42321
+ if (Array.isArray(arr)) return _array_like_to_array$7(arr);
42021
42322
  }
42022
42323
  function _assert_this_initialized$2(self) {
42023
42324
  if (self === void 0) {
@@ -42073,7 +42374,7 @@ function _instanceof$9(left, right) {
42073
42374
  function _iterable_to_array$4(iter) {
42074
42375
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
42075
42376
  }
42076
- function _iterable_to_array_limit$1(arr, i) {
42377
+ function _iterable_to_array_limit$3(arr, i) {
42077
42378
  var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
42078
42379
  if (_i == null) return;
42079
42380
  var _arr = [];
@@ -42097,7 +42398,7 @@ function _iterable_to_array_limit$1(arr, i) {
42097
42398
  }
42098
42399
  return _arr;
42099
42400
  }
42100
- function _non_iterable_rest$1() {
42401
+ function _non_iterable_rest$3() {
42101
42402
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
42102
42403
  }
42103
42404
  function _non_iterable_spread$4() {
@@ -42116,23 +42417,23 @@ function _set_prototype_of$2(o, p) {
42116
42417
  };
42117
42418
  return _set_prototype_of$2(o, p);
42118
42419
  }
42119
- function _sliced_to_array$1(arr, i) {
42120
- return _array_with_holes$1(arr) || _iterable_to_array_limit$1(arr, i) || _unsupported_iterable_to_array$5(arr, i) || _non_iterable_rest$1();
42420
+ function _sliced_to_array$3(arr, i) {
42421
+ return _array_with_holes$3(arr) || _iterable_to_array_limit$3(arr, i) || _unsupported_iterable_to_array$7(arr, i) || _non_iterable_rest$3();
42121
42422
  }
42122
42423
  function _to_consumable_array$4(arr) {
42123
- return _array_without_holes$4(arr) || _iterable_to_array$4(arr) || _unsupported_iterable_to_array$5(arr) || _non_iterable_spread$4();
42424
+ return _array_without_holes$4(arr) || _iterable_to_array$4(arr) || _unsupported_iterable_to_array$7(arr) || _non_iterable_spread$4();
42124
42425
  }
42125
42426
  function _type_of$4(obj) {
42126
42427
  "@swc/helpers - typeof";
42127
42428
  return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
42128
42429
  }
42129
- function _unsupported_iterable_to_array$5(o, minLen) {
42430
+ function _unsupported_iterable_to_array$7(o, minLen) {
42130
42431
  if (!o) return;
42131
- if (typeof o === "string") return _array_like_to_array$5(o, minLen);
42432
+ if (typeof o === "string") return _array_like_to_array$7(o, minLen);
42132
42433
  var n = Object.prototype.toString.call(o).slice(8, -1);
42133
42434
  if (n === "Object" && o.constructor) n = o.constructor.name;
42134
42435
  if (n === "Map" || n === "Set") return Array.from(n);
42135
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$5(o, minLen);
42436
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$7(o, minLen);
42136
42437
  }
42137
42438
  function _is_native_reflect_construct$2() {
42138
42439
  if (typeof Reflect === "undefined" || !Reflect.construct) return false;
@@ -42170,11 +42471,18 @@ An instance of this is passed to completion source functions.
42170
42471
  implicitly by typing. The usual way to respond to this is to
42171
42472
  only return completions when either there is part of a
42172
42473
  completable entity before the cursor, or `explicit` is true.
42173
- */ explicit) {
42474
+ */ explicit, /**
42475
+ The editor view. May be undefined if the context was created
42476
+ in a situation where there is no such view available, such as
42477
+ in synchronous updates via
42478
+ [`CompletionResult.update`](https://codemirror.net/6/docs/ref/#autocomplete.CompletionResult.update)
42479
+ or when called by test code.
42480
+ */ view) {
42174
42481
  _class_call_check$6(this, CompletionContext);
42175
42482
  this.state = state;
42176
42483
  this.pos = pos;
42177
42484
  this.explicit = explicit;
42485
+ this.view = view;
42178
42486
  /**
42179
42487
  @internal
42180
42488
  */ this.abortListeners = [];
@@ -42279,7 +42587,7 @@ completes them.
42279
42587
  label: o
42280
42588
  } : o;
42281
42589
  });
42282
- var _ref = _sliced_to_array$1(options.every(function(o) {
42590
+ var _ref = _sliced_to_array$3(options.every(function(o) {
42283
42591
  return /^\w+$/.test(o.label);
42284
42592
  }) ? [
42285
42593
  /\w*$/,
@@ -43316,7 +43624,7 @@ var CompletionState = /*#__PURE__*/ function() {
43316
43624
  {
43317
43625
  key: "attrs",
43318
43626
  get: function get() {
43319
- return this.open ? this.open.attrs : baseAttrs;
43627
+ return this.open ? this.open.attrs : this.active.length ? baseAttrs : noAttrs;
43320
43628
  }
43321
43629
  }
43322
43630
  ], [
@@ -43342,6 +43650,7 @@ function sameResults(a, b) {
43342
43650
  var baseAttrs = {
43343
43651
  "aria-autocomplete": "list"
43344
43652
  };
43653
+ var noAttrs = {};
43345
43654
  function makeAttrs(id, selected) {
43346
43655
  var result = {
43347
43656
  "aria-autocomplete": "list",
@@ -43352,12 +43661,13 @@ function makeAttrs(id, selected) {
43352
43661
  return result;
43353
43662
  }
43354
43663
  var none = [];
43355
- function getUserEvent(tr, conf) {
43664
+ function getUpdateType(tr, conf) {
43356
43665
  if (tr.isUserEvent("input.complete")) {
43357
43666
  var completion = tr.annotation(pickedCompletion);
43358
- if (completion && conf.activateOnCompletion(completion)) return "input";
43667
+ if (completion && conf.activateOnCompletion(completion)) return 4 /* UpdateType.Activate */ | 8 /* UpdateType.Reset */ ;
43359
43668
  }
43360
- return tr.isUserEvent("input.type") ? "input" : tr.isUserEvent("delete.backward") ? "delete" : null;
43669
+ var typing = tr.isUserEvent("input.type");
43670
+ 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 */ ;
43361
43671
  }
43362
43672
  var ActiveSource = /*#__PURE__*/ function() {
43363
43673
  function ActiveSource(source, state) {
@@ -43377,10 +43687,10 @@ var ActiveSource = /*#__PURE__*/ function() {
43377
43687
  {
43378
43688
  key: "update",
43379
43689
  value: function update(tr, conf) {
43380
- var event = getUserEvent(tr, conf), value = this;
43381
- if (event) value = value.handleUserEvent(tr, event, conf);
43382
- else if (tr.docChanged) value = value.handleChange(tr);
43383
- else if (tr.selection && value.state != 0 /* State.Inactive */ ) value = new ActiveSource(value.source, 0 /* State.Inactive */ );
43690
+ var type = getUpdateType(tr, conf), value = this;
43691
+ if (type & 8 /* UpdateType.Reset */ || type & 16 /* UpdateType.ResetIfTouching */ && this.touches(tr)) value = new ActiveSource(value.source, 0 /* State.Inactive */ );
43692
+ if (type & 4 /* UpdateType.Activate */ && value.state == 0 /* State.Inactive */ ) value = new ActiveSource(this.source, 1 /* State.Pending */ );
43693
+ value = value.updateFor(tr, type);
43384
43694
  var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
43385
43695
  try {
43386
43696
  for(var _iterator = tr.effects[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
@@ -43428,15 +43738,9 @@ var ActiveSource = /*#__PURE__*/ function() {
43428
43738
  }
43429
43739
  },
43430
43740
  {
43431
- key: "handleUserEvent",
43432
- value: function handleUserEvent(tr, type, conf) {
43433
- return type == "delete" || !conf.activateOnTyping ? this.map(tr.changes) : new ActiveSource(this.source, 1 /* State.Pending */ );
43434
- }
43435
- },
43436
- {
43437
- key: "handleChange",
43438
- value: function handleChange(tr) {
43439
- return tr.changes.touchesRange(cur(tr.startState)) ? new ActiveSource(this.source, 0 /* State.Inactive */ ) : this.map(tr.changes);
43741
+ key: "updateFor",
43742
+ value: function updateFor(tr, type) {
43743
+ return this.map(tr.changes);
43440
43744
  }
43441
43745
  },
43442
43746
  {
@@ -43444,6 +43748,12 @@ var ActiveSource = /*#__PURE__*/ function() {
43444
43748
  value: function map(changes) {
43445
43749
  return changes.empty || this.explicitPos < 0 ? this : new ActiveSource(this.source, this.state, changes.mapPos(this.explicitPos));
43446
43750
  }
43751
+ },
43752
+ {
43753
+ key: "touches",
43754
+ value: function touches(tr) {
43755
+ return tr.changes.touchesRange(cur(tr.state));
43756
+ }
43447
43757
  }
43448
43758
  ]);
43449
43759
  return ActiveSource;
@@ -43468,26 +43778,21 @@ var ActiveResult = /*#__PURE__*/ function(ActiveSource1) {
43468
43778
  }
43469
43779
  },
43470
43780
  {
43471
- key: "handleUserEvent",
43472
- value: function handleUserEvent(tr, type, conf) {
43781
+ key: "updateFor",
43782
+ value: function updateFor(tr, type) {
43473
43783
  var _a;
43784
+ if (!(type & 3 /* UpdateType.SimpleInteraction */ )) return this.map(tr.changes);
43474
43785
  var result = this.result;
43475
43786
  if (result.map && !tr.changes.empty) result = result.map(result, tr.changes);
43476
43787
  var from = tr.changes.mapPos(this.from), to = tr.changes.mapPos(this.to, 1);
43477
43788
  var pos = cur(tr.state);
43478
- if ((this.explicitPos < 0 ? pos <= from : pos < this.from) || pos > to || !result || type == "delete" && cur(tr.startState) == this.from) return new ActiveSource(this.source, type == "input" && conf.activateOnTyping ? 1 /* State.Pending */ : 0 /* State.Inactive */ );
43789
+ 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 */ );
43479
43790
  var explicitPos = this.explicitPos < 0 ? -1 : tr.changes.mapPos(this.explicitPos);
43480
43791
  if (checkValid(result.validFor, tr.state, from, to)) return new ActiveResult(this.source, explicitPos, result, from, to);
43481
43792
  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));
43482
43793
  return new ActiveSource(this.source, 1 /* State.Pending */ , explicitPos);
43483
43794
  }
43484
43795
  },
43485
- {
43486
- key: "handleChange",
43487
- value: function handleChange(tr) {
43488
- return tr.changes.touchesRange(this.from, this.to) ? new ActiveSource(this.source, 0 /* State.Inactive */ ) : this.map(tr.changes);
43489
- }
43490
- },
43491
43796
  {
43492
43797
  key: "map",
43493
43798
  value: function map(mapping) {
@@ -43496,6 +43801,12 @@ var ActiveResult = /*#__PURE__*/ function(ActiveSource1) {
43496
43801
  if (!result) return new ActiveSource(this.source, 0 /* State.Inactive */ );
43497
43802
  return new ActiveResult(this.source, this.explicitPos < 0 ? -1 : mapping.mapPos(this.explicitPos), this.result, mapping.mapPos(this.from), mapping.mapPos(this.to, 1));
43498
43803
  }
43804
+ },
43805
+ {
43806
+ key: "touches",
43807
+ value: function touches(tr) {
43808
+ return tr.changes.touchesRange(this.from, this.to);
43809
+ }
43499
43810
  }
43500
43811
  ]);
43501
43812
  return ActiveResult;
@@ -43643,7 +43954,8 @@ var completionPlugin = /*@__PURE__*/ ViewPlugin.fromClass(/*#__PURE__*/ function
43643
43954
  var conf = update.state.facet(completionConfig);
43644
43955
  if (!update.selectionSet && !update.docChanged && update.startState.field(completionState) == cState) return;
43645
43956
  var doesReset = update.transactions.some(function(tr) {
43646
- return (tr.selection || tr.docChanged) && !getUserEvent(tr, conf);
43957
+ var type = getUpdateType(tr, conf);
43958
+ return type & 8 /* UpdateType.Reset */ || (tr.selection || tr.docChanged) && !(type & 3 /* UpdateType.SimpleInteraction */ );
43647
43959
  });
43648
43960
  for(var i = 0; i < this.running.length; i++){
43649
43961
  var query = this.running[i];
@@ -43697,7 +44009,7 @@ var completionPlugin = /*@__PURE__*/ ViewPlugin.fromClass(/*#__PURE__*/ function
43697
44009
  if (this.composing != 0 /* CompositionState.None */ ) try {
43698
44010
  for(var _iterator1 = update.transactions[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true){
43699
44011
  var tr = _step1.value;
43700
- if (getUserEvent(tr, conf) == "input") this.composing = 2 /* CompositionState.Changed */ ;
44012
+ if (tr.isUserEvent("input.type")) this.composing = 2 /* CompositionState.Changed */ ;
43701
44013
  else if (this.composing == 2 /* CompositionState.Changed */ && tr.selection) this.composing = 3 /* CompositionState.ChangedAndMoved */ ;
43702
44014
  }
43703
44015
  } catch (err) {
@@ -43752,7 +44064,7 @@ var completionPlugin = /*@__PURE__*/ ViewPlugin.fromClass(/*#__PURE__*/ function
43752
44064
  value: function startQuery(active) {
43753
44065
  var _this = this;
43754
44066
  var state = this.view.state, pos = cur(state);
43755
- var context = new CompletionContext(state, pos, active.explicitPos == pos);
44067
+ var context = new CompletionContext(state, pos, active.explicitPos == pos, this.view);
43756
44068
  var pending = new RunningQuery(active, context);
43757
44069
  this.running.push(pending);
43758
44070
  Promise.resolve(active.source(context)).then(function(result) {
@@ -44597,6 +44909,7 @@ function _create_class$2(Constructor, protoProps, staticProps) {
44597
44909
  loop: for(var i = 0; i < str.length; i++){
44598
44910
  switch(str[i]){
44599
44911
  case " ":
44912
+ case "\xa0":
44600
44913
  {
44601
44914
  col += 1;
44602
44915
  continue loop;
@@ -45366,6 +45679,7 @@ Object.defineProperty(exports, "__esModule", {
45366
45679
  value: true
45367
45680
  });
45368
45681
  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;
45682
+ // eslint-disable-next-line @typescript-eslint/no-extraneous-class
45369
45683
  var _CodeOrName = function _CodeOrName() {
45370
45684
  _class_call_check(this, _CodeOrName);
45371
45685
  };
@@ -47593,7 +47907,7 @@ function par(x) {
47593
47907
 
47594
47908
  var util = {};
47595
47909
 
47596
- function _define_property$2(obj, key, value) {
47910
+ function _define_property$3(obj, key, value) {
47597
47911
  if (key in obj) {
47598
47912
  Object.defineProperty(obj, key, {
47599
47913
  value: value,
@@ -47613,7 +47927,7 @@ function _instanceof$8(left, right) {
47613
47927
  return left instanceof right;
47614
47928
  }
47615
47929
  }
47616
- function _object_spread$2(target) {
47930
+ function _object_spread$3(target) {
47617
47931
  for(var i = 1; i < arguments.length; i++){
47618
47932
  var source = arguments[i] != null ? arguments[i] : {};
47619
47933
  var ownKeys = Object.keys(source);
@@ -47623,7 +47937,7 @@ function _object_spread$2(target) {
47623
47937
  }));
47624
47938
  }
47625
47939
  ownKeys.forEach(function(key) {
47626
- _define_property$2(target, key, source[key]);
47940
+ _define_property$3(target, key, source[key]);
47627
47941
  });
47628
47942
  }
47629
47943
  return target;
@@ -47977,7 +48291,7 @@ util.mergeEvaluated = {
47977
48291
  });
47978
48292
  },
47979
48293
  mergeValues: function(from, to) {
47980
- return from === true ? true : _object_spread$2({}, from, to);
48294
+ return from === true ? true : _object_spread$3({}, from, to);
47981
48295
  },
47982
48296
  resultToName: evaluatedPropsToName
47983
48297
  }),
@@ -48606,7 +48920,7 @@ var dataType = {};
48606
48920
 
48607
48921
  var rules = {};
48608
48922
 
48609
- function _define_property$1(obj, key, value) {
48923
+ function _define_property$2(obj, key, value) {
48610
48924
  if (key in obj) {
48611
48925
  Object.defineProperty(obj, key, {
48612
48926
  value: value,
@@ -48619,7 +48933,7 @@ function _define_property$1(obj, key, value) {
48619
48933
  }
48620
48934
  return obj;
48621
48935
  }
48622
- function _object_spread$1(target) {
48936
+ function _object_spread$2(target) {
48623
48937
  for(var i = 1; i < arguments.length; i++){
48624
48938
  var source = arguments[i] != null ? arguments[i] : {};
48625
48939
  var ownKeys = Object.keys(source);
@@ -48629,12 +48943,12 @@ function _object_spread$1(target) {
48629
48943
  }));
48630
48944
  }
48631
48945
  ownKeys.forEach(function(key) {
48632
- _define_property$1(target, key, source[key]);
48946
+ _define_property$2(target, key, source[key]);
48633
48947
  });
48634
48948
  }
48635
48949
  return target;
48636
48950
  }
48637
- function ownKeys$1(object, enumerableOnly) {
48951
+ function ownKeys$2(object, enumerableOnly) {
48638
48952
  var keys = Object.keys(object);
48639
48953
  if (Object.getOwnPropertySymbols) {
48640
48954
  var symbols = Object.getOwnPropertySymbols(object);
@@ -48647,12 +48961,12 @@ function ownKeys$1(object, enumerableOnly) {
48647
48961
  }
48648
48962
  return keys;
48649
48963
  }
48650
- function _object_spread_props$1(target, source) {
48964
+ function _object_spread_props$2(target, source) {
48651
48965
  source = source != null ? source : {};
48652
48966
  if (Object.getOwnPropertyDescriptors) {
48653
48967
  Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
48654
48968
  } else {
48655
- ownKeys$1(Object(source)).forEach(function(key) {
48969
+ ownKeys$2(Object(source)).forEach(function(key) {
48656
48970
  Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
48657
48971
  });
48658
48972
  }
@@ -48696,7 +49010,7 @@ function getRules() {
48696
49010
  }
48697
49011
  };
48698
49012
  return {
48699
- types: _object_spread_props$1(_object_spread$1({}, groups), {
49013
+ types: _object_spread_props$2(_object_spread$2({}, groups), {
48700
49014
  integer: true,
48701
49015
  boolean: true,
48702
49016
  null: true
@@ -49423,13 +49737,13 @@ var keyword = {};
49423
49737
 
49424
49738
  var code = {};
49425
49739
 
49426
- function _array_like_to_array$4(arr, len) {
49740
+ function _array_like_to_array$6(arr, len) {
49427
49741
  if (len == null || len > arr.length) len = arr.length;
49428
49742
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
49429
49743
  return arr2;
49430
49744
  }
49431
49745
  function _array_without_holes$3(arr) {
49432
- if (Array.isArray(arr)) return _array_like_to_array$4(arr);
49746
+ if (Array.isArray(arr)) return _array_like_to_array$6(arr);
49433
49747
  }
49434
49748
  function _iterable_to_array$3(iter) {
49435
49749
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
@@ -49448,15 +49762,15 @@ function _tagged_template_literal$q(strings, raw) {
49448
49762
  }));
49449
49763
  }
49450
49764
  function _to_consumable_array$3(arr) {
49451
- return _array_without_holes$3(arr) || _iterable_to_array$3(arr) || _unsupported_iterable_to_array$4(arr) || _non_iterable_spread$3();
49765
+ return _array_without_holes$3(arr) || _iterable_to_array$3(arr) || _unsupported_iterable_to_array$6(arr) || _non_iterable_spread$3();
49452
49766
  }
49453
- function _unsupported_iterable_to_array$4(o, minLen) {
49767
+ function _unsupported_iterable_to_array$6(o, minLen) {
49454
49768
  if (!o) return;
49455
- if (typeof o === "string") return _array_like_to_array$4(o, minLen);
49769
+ if (typeof o === "string") return _array_like_to_array$6(o, minLen);
49456
49770
  var n = Object.prototype.toString.call(o).slice(8, -1);
49457
49771
  if (n === "Object" && o.constructor) n = o.constructor.name;
49458
49772
  if (n === "Map" || n === "Set") return Array.from(n);
49459
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$4(o, minLen);
49773
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$6(o, minLen);
49460
49774
  }
49461
49775
  function _templateObject$q() {
49462
49776
  var data = _tagged_template_literal$q([
@@ -50049,13 +50363,13 @@ keyword.validateKeywordUsage = validateKeywordUsage;
50049
50363
 
50050
50364
  var subschema = {};
50051
50365
 
50052
- function _array_like_to_array$3(arr, len) {
50366
+ function _array_like_to_array$5(arr, len) {
50053
50367
  if (len == null || len > arr.length) len = arr.length;
50054
50368
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
50055
50369
  return arr2;
50056
50370
  }
50057
50371
  function _array_without_holes$2(arr) {
50058
- if (Array.isArray(arr)) return _array_like_to_array$3(arr);
50372
+ if (Array.isArray(arr)) return _array_like_to_array$5(arr);
50059
50373
  }
50060
50374
  function _instanceof$7(left, right) {
50061
50375
  if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
@@ -50081,15 +50395,15 @@ function _tagged_template_literal$o(strings, raw) {
50081
50395
  }));
50082
50396
  }
50083
50397
  function _to_consumable_array$2(arr) {
50084
- return _array_without_holes$2(arr) || _iterable_to_array$2(arr) || _unsupported_iterable_to_array$3(arr) || _non_iterable_spread$2();
50398
+ return _array_without_holes$2(arr) || _iterable_to_array$2(arr) || _unsupported_iterable_to_array$5(arr) || _non_iterable_spread$2();
50085
50399
  }
50086
- function _unsupported_iterable_to_array$3(o, minLen) {
50400
+ function _unsupported_iterable_to_array$5(o, minLen) {
50087
50401
  if (!o) return;
50088
- if (typeof o === "string") return _array_like_to_array$3(o, minLen);
50402
+ if (typeof o === "string") return _array_like_to_array$5(o, minLen);
50089
50403
  var n = Object.prototype.toString.call(o).slice(8, -1);
50090
50404
  if (n === "Object" && o.constructor) n = o.constructor.name;
50091
50405
  if (n === "Map" || n === "Set") return Array.from(n);
50092
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$3(o, minLen);
50406
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$5(o, minLen);
50093
50407
  }
50094
50408
  function _templateObject$o() {
50095
50409
  var data = _tagged_template_literal$o([
@@ -50228,7 +50542,7 @@ function extendSubschemaMode(subschema, param) {
50228
50542
  }
50229
50543
  subschema.extendSubschemaMode = extendSubschemaMode;
50230
50544
 
50231
- var resolve$1 = {};
50545
+ var resolve$2 = {};
50232
50546
 
50233
50547
  // do not edit .js files directly - edit src/index.jst
50234
50548
  var fastDeepEqual = function equal(a, b) {
@@ -50342,12 +50656,12 @@ function escapeJsonPtr(str) {
50342
50656
  return str.replace(/~/g, "~0").replace(/\//g, "~1");
50343
50657
  }
50344
50658
 
50345
- Object.defineProperty(resolve$1, "__esModule", {
50659
+ Object.defineProperty(resolve$2, "__esModule", {
50346
50660
  value: true
50347
50661
  });
50348
- resolve$1.getSchemaRefs = resolve$1.resolveUrl = resolve$1.normalizeId = resolve$1._getFullPath = resolve$1.getFullPath = resolve$1.inlineRef = void 0;
50662
+ resolve$2.getSchemaRefs = resolve$2.resolveUrl = resolve$2.normalizeId = resolve$2._getFullPath = resolve$2.getFullPath = resolve$2.inlineRef = void 0;
50349
50663
  var util_1$m = util;
50350
- var equal$2 = fastDeepEqual;
50664
+ var equal$3 = fastDeepEqual;
50351
50665
  var traverse = jsonSchemaTraverse.exports;
50352
50666
  // TODO refactor to use keyword definitions
50353
50667
  var SIMPLE_INLINED = new Set([
@@ -50375,7 +50689,7 @@ function inlineRef(schema) {
50375
50689
  if (!limit) return false;
50376
50690
  return countKeys(schema) <= limit;
50377
50691
  }
50378
- resolve$1.inlineRef = inlineRef;
50692
+ resolve$2.inlineRef = inlineRef;
50379
50693
  var REF_KEYWORDS = new Set([
50380
50694
  "$ref",
50381
50695
  "$recursiveRef",
@@ -50413,22 +50727,22 @@ function getFullPath(resolver) {
50413
50727
  var p = resolver.parse(id);
50414
50728
  return _getFullPath(resolver, p);
50415
50729
  }
50416
- resolve$1.getFullPath = getFullPath;
50730
+ resolve$2.getFullPath = getFullPath;
50417
50731
  function _getFullPath(resolver, p) {
50418
50732
  var serialized = resolver.serialize(p);
50419
50733
  return serialized.split("#")[0] + "#";
50420
50734
  }
50421
- resolve$1._getFullPath = _getFullPath;
50735
+ resolve$2._getFullPath = _getFullPath;
50422
50736
  var TRAILING_SLASH_HASH = /#\/?$/;
50423
50737
  function normalizeId(id) {
50424
50738
  return id ? id.replace(TRAILING_SLASH_HASH, "") : "";
50425
50739
  }
50426
- resolve$1.normalizeId = normalizeId;
50740
+ resolve$2.normalizeId = normalizeId;
50427
50741
  function resolveUrl(resolver, baseId, id) {
50428
50742
  id = normalizeId(id);
50429
50743
  return resolver.resolve(baseId, id);
50430
50744
  }
50431
- resolve$1.resolveUrl = resolveUrl;
50745
+ resolve$2.resolveUrl = resolveUrl;
50432
50746
  var ANCHOR = /^[a-z_][-a-z0-9._]*$/i;
50433
50747
  function getSchemaRefs(schema, baseId) {
50434
50748
  var _this = this;
@@ -50480,13 +50794,13 @@ function getSchemaRefs(schema, baseId) {
50480
50794
  });
50481
50795
  return localRefs;
50482
50796
  function checkAmbiguosRef(sch1, sch2, ref) {
50483
- if (sch2 !== undefined && !equal$2(sch1, sch2)) throw ambiguos(ref);
50797
+ if (sch2 !== undefined && !equal$3(sch1, sch2)) throw ambiguos(ref);
50484
50798
  }
50485
50799
  function ambiguos(ref) {
50486
50800
  return new Error('reference "'.concat(ref, '" resolves to more than one schema'));
50487
50801
  }
50488
50802
  }
50489
- resolve$1.getSchemaRefs = getSchemaRefs;
50803
+ resolve$2.getSchemaRefs = getSchemaRefs;
50490
50804
 
50491
50805
  function _class_call_check$3(instance, Constructor) {
50492
50806
  if (!(instance instanceof Constructor)) {
@@ -50507,7 +50821,7 @@ function _create_class(Constructor, protoProps, staticProps) {
50507
50821
  if (staticProps) _defineProperties(Constructor, staticProps);
50508
50822
  return Constructor;
50509
50823
  }
50510
- function _define_property(obj, key, value) {
50824
+ function _define_property$1(obj, key, value) {
50511
50825
  if (key in obj) {
50512
50826
  Object.defineProperty(obj, key, {
50513
50827
  value: value,
@@ -50527,7 +50841,7 @@ function _instanceof$6(left, right) {
50527
50841
  return left instanceof right;
50528
50842
  }
50529
50843
  }
50530
- function _object_spread(target) {
50844
+ function _object_spread$1(target) {
50531
50845
  for(var i = 1; i < arguments.length; i++){
50532
50846
  var source = arguments[i] != null ? arguments[i] : {};
50533
50847
  var ownKeys = Object.keys(source);
@@ -50537,12 +50851,12 @@ function _object_spread(target) {
50537
50851
  }));
50538
50852
  }
50539
50853
  ownKeys.forEach(function(key) {
50540
- _define_property(target, key, source[key]);
50854
+ _define_property$1(target, key, source[key]);
50541
50855
  });
50542
50856
  }
50543
50857
  return target;
50544
50858
  }
50545
- function ownKeys(object, enumerableOnly) {
50859
+ function ownKeys$1(object, enumerableOnly) {
50546
50860
  var keys = Object.keys(object);
50547
50861
  if (Object.getOwnPropertySymbols) {
50548
50862
  var symbols = Object.getOwnPropertySymbols(object);
@@ -50555,12 +50869,12 @@ function ownKeys(object, enumerableOnly) {
50555
50869
  }
50556
50870
  return keys;
50557
50871
  }
50558
- function _object_spread_props(target, source) {
50872
+ function _object_spread_props$1(target, source) {
50559
50873
  source = source != null ? source : {};
50560
50874
  if (Object.getOwnPropertyDescriptors) {
50561
50875
  Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
50562
50876
  } else {
50563
- ownKeys(Object(source)).forEach(function(key) {
50877
+ ownKeys$1(Object(source)).forEach(function(key) {
50564
50878
  Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
50565
50879
  });
50566
50880
  }
@@ -50996,7 +51310,7 @@ var keyword_1 = keyword;
50996
51310
  var subschema_1 = subschema;
50997
51311
  var codegen_1$n = codegen;
50998
51312
  var names_1$3 = names$1;
50999
- var resolve_1$2 = resolve$1;
51313
+ var resolve_1$2 = resolve$2;
51000
51314
  var util_1$l = util;
51001
51315
  var errors_1 = errors;
51002
51316
  // schema compilation - generates validation function, subschemaCode (below) is used for subschemas
@@ -51499,7 +51813,7 @@ var KeywordCxt = /*#__PURE__*/ function() {
51499
51813
  var subschema = (0, subschema_1.getSubschema)(this.it, appl);
51500
51814
  (0, subschema_1.extendSubschemaData)(subschema, this.it, appl);
51501
51815
  (0, subschema_1.extendSubschemaMode)(subschema, appl);
51502
- var nextContext = _object_spread_props(_object_spread({}, this.it, subschema), {
51816
+ var nextContext = _object_spread_props$1(_object_spread$1({}, this.it, subschema), {
51503
51817
  items: undefined,
51504
51818
  props: undefined
51505
51819
  });
@@ -51864,7 +52178,7 @@ function _create_super(Derived) {
51864
52178
  Object.defineProperty(ref_error, "__esModule", {
51865
52179
  value: true
51866
52180
  });
51867
- var resolve_1$1 = resolve$1;
52181
+ var resolve_1$1 = resolve$2;
51868
52182
  var MissingRefError = /*#__PURE__*/ function(Error1) {
51869
52183
  _inherits(MissingRefError, Error1);
51870
52184
  var _super = _create_super(MissingRefError);
@@ -51929,7 +52243,7 @@ compile.resolveSchema = compile.getCompilingSchema = compile.resolveRef = compil
51929
52243
  var codegen_1$m = codegen;
51930
52244
  var validation_error_1 = validation_error;
51931
52245
  var names_1$2 = names$1;
51932
- var resolve_1 = resolve$1;
52246
+ var resolve_1 = resolve$2;
51933
52247
  var util_1$k = util;
51934
52248
  var validate_1$1 = validate;
51935
52249
  var SchemaEnv = function SchemaEnv(env) {
@@ -52062,7 +52376,7 @@ function resolveRef(root, baseId, ref) {
52062
52376
  ref = (0, resolve_1.resolveUrl)(this.opts.uriResolver, baseId, ref);
52063
52377
  var schOrFunc = root.refs[ref];
52064
52378
  if (schOrFunc) return schOrFunc;
52065
- var _sch = resolve.call(this, root, ref);
52379
+ var _sch = resolve$1.call(this, root, ref);
52066
52380
  if (_sch === undefined) {
52067
52381
  var schema = (_a = root.localRefs) === null || _a === void 0 ? void 0 : _a[ref]; // TODO maybe localRefs should hold SchemaEnv
52068
52382
  var schemaId = this.opts.schemaId;
@@ -52110,7 +52424,7 @@ function sameSchemaEnv(s1, s2) {
52110
52424
  }
52111
52425
  // resolve and compile the references ($ref)
52112
52426
  // TODO returns AnySchemaObject (if the schema can be inlined) or validation function
52113
- function resolve(root, ref // reference to resolve
52427
+ function resolve$1(root, ref // reference to resolve
52114
52428
  ) {
52115
52429
  var sch;
52116
52430
  while(typeof (sch = this.refs[ref]) == "string")ref = sch;
@@ -52238,1265 +52552,901 @@ var require$$9 = {
52238
52552
 
52239
52553
  var uri$1 = {};
52240
52554
 
52241
- var uri_all = {
52555
+ var fastUri$1 = {
52242
52556
  exports: {}
52243
52557
  };
52244
52558
 
52245
- (function (module, exports) {
52246
- function _instanceof(left, right) {
52247
- if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
52248
- return !!right[Symbol.hasInstance](left);
52559
+ var HEX$1 = {
52560
+ 0: 0,
52561
+ 1: 1,
52562
+ 2: 2,
52563
+ 3: 3,
52564
+ 4: 4,
52565
+ 5: 5,
52566
+ 6: 6,
52567
+ 7: 7,
52568
+ 8: 8,
52569
+ 9: 9,
52570
+ a: 10,
52571
+ A: 10,
52572
+ b: 11,
52573
+ B: 11,
52574
+ c: 12,
52575
+ C: 12,
52576
+ d: 13,
52577
+ D: 13,
52578
+ e: 14,
52579
+ E: 14,
52580
+ f: 15,
52581
+ F: 15
52582
+ };
52583
+ var scopedChars = {
52584
+ HEX: HEX$1
52585
+ };
52586
+
52587
+ function _array_like_to_array$4(arr, len) {
52588
+ if (len == null || len > arr.length) len = arr.length;
52589
+ for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
52590
+ return arr2;
52591
+ }
52592
+ function _array_with_holes$2(arr) {
52593
+ if (Array.isArray(arr)) return arr;
52594
+ }
52595
+ function _iterable_to_array_limit$2(arr, i) {
52596
+ var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
52597
+ if (_i == null) return;
52598
+ var _arr = [];
52599
+ var _n = true;
52600
+ var _d = false;
52601
+ var _s, _e;
52602
+ try {
52603
+ for(_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true){
52604
+ _arr.push(_s.value);
52605
+ if (i && _arr.length === i) break;
52606
+ }
52607
+ } catch (err) {
52608
+ _d = true;
52609
+ _e = err;
52610
+ } finally{
52611
+ try {
52612
+ if (!_n && _i["return"] != null) _i["return"]();
52613
+ } finally{
52614
+ if (_d) throw _e;
52615
+ }
52616
+ }
52617
+ return _arr;
52618
+ }
52619
+ function _non_iterable_rest$2() {
52620
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
52621
+ }
52622
+ function _sliced_to_array$2(arr, i) {
52623
+ return _array_with_holes$2(arr) || _iterable_to_array_limit$2(arr, i) || _unsupported_iterable_to_array$4(arr, i) || _non_iterable_rest$2();
52624
+ }
52625
+ function _unsupported_iterable_to_array$4(o, minLen) {
52626
+ if (!o) return;
52627
+ if (typeof o === "string") return _array_like_to_array$4(o, minLen);
52628
+ var n = Object.prototype.toString.call(o).slice(8, -1);
52629
+ if (n === "Object" && o.constructor) n = o.constructor.name;
52630
+ if (n === "Map" || n === "Set") return Array.from(n);
52631
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$4(o, minLen);
52632
+ }
52633
+ var HEX = scopedChars.HEX;
52634
+ function normalizeIPv4$1(host) {
52635
+ if (findToken(host, ".") < 3) {
52636
+ return {
52637
+ host: host,
52638
+ isIPV4: false
52639
+ };
52640
+ }
52641
+ 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")) || [];
52642
+ var _matches = _sliced_to_array$2(matches, 1), address = _matches[0];
52643
+ if (address) {
52644
+ return {
52645
+ host: stripLeadingZeros(address, "."),
52646
+ isIPV4: true
52647
+ };
52249
52648
  } else {
52250
- return left instanceof right;
52649
+ return {
52650
+ host: host,
52651
+ isIPV4: false
52652
+ };
52251
52653
  }
52252
52654
  }
52253
- /** @license URI.js v4.4.1 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */ (function(global, factory) {
52254
- factory(exports) ;
52255
- })(commonjsGlobal, function(exports1) {
52256
- function merge() {
52257
- for(var _len = arguments.length, sets = Array(_len), _key = 0; _key < _len; _key++){
52258
- sets[_key] = arguments[_key];
52655
+ /**
52656
+ * @param {string[]} input
52657
+ * @param {boolean} [keepZero=false]
52658
+ * @returns {string|undefined}
52659
+ */ function stringArrayToHexStripped(input) {
52660
+ var keepZero = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false;
52661
+ var acc = "";
52662
+ var strip = true;
52663
+ var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
52664
+ try {
52665
+ for(var _iterator = input[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
52666
+ var c = _step.value;
52667
+ if (HEX[c] === undefined) return undefined;
52668
+ if (c !== "0" && strip === true) strip = false;
52669
+ if (!strip) acc += c;
52259
52670
  }
52260
- if (sets.length > 1) {
52261
- sets[0] = sets[0].slice(0, -1);
52262
- var xl = sets.length - 1;
52263
- for(var x = 1; x < xl; ++x){
52264
- sets[x] = sets[x].slice(1, -1);
52671
+ } catch (err) {
52672
+ _didIteratorError = true;
52673
+ _iteratorError = err;
52674
+ } finally{
52675
+ try {
52676
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
52677
+ _iterator.return();
52678
+ }
52679
+ } finally{
52680
+ if (_didIteratorError) {
52681
+ throw _iteratorError;
52265
52682
  }
52266
- sets[xl] = sets[xl].slice(1);
52267
- return sets.join("");
52268
- } else {
52269
- return sets[0];
52270
52683
  }
52271
52684
  }
52272
- function subexp(str) {
52273
- return "(?:" + str + ")";
52685
+ if (keepZero && acc.length === 0) acc = "0";
52686
+ return acc;
52687
+ }
52688
+ function getIPV6(input) {
52689
+ var tokenCount = 0;
52690
+ var output = {
52691
+ error: false,
52692
+ address: "",
52693
+ zone: ""
52694
+ };
52695
+ var address = [];
52696
+ var buffer = [];
52697
+ var isZone = false;
52698
+ var endipv6Encountered = false;
52699
+ var endIpv6 = false;
52700
+ function consume() {
52701
+ if (buffer.length) {
52702
+ if (isZone === false) {
52703
+ var hex = stringArrayToHexStripped(buffer);
52704
+ if (hex !== undefined) {
52705
+ address.push(hex);
52706
+ } else {
52707
+ output.error = true;
52708
+ return false;
52709
+ }
52710
+ }
52711
+ buffer.length = 0;
52712
+ }
52713
+ return true;
52274
52714
  }
52275
- function typeOf(o) {
52276
- return o === undefined ? "undefined" : o === null ? "null" : Object.prototype.toString.call(o).split(" ").pop().split("]").shift().toLowerCase();
52715
+ for(var i = 0; i < input.length; i++){
52716
+ var cursor = input[i];
52717
+ if (cursor === "[" || cursor === "]") {
52718
+ continue;
52719
+ }
52720
+ if (cursor === ":") {
52721
+ if (endipv6Encountered === true) {
52722
+ endIpv6 = true;
52723
+ }
52724
+ if (!consume()) {
52725
+ break;
52726
+ }
52727
+ tokenCount++;
52728
+ address.push(":");
52729
+ if (tokenCount > 7) {
52730
+ // not valid
52731
+ output.error = true;
52732
+ break;
52733
+ }
52734
+ if (i - 1 >= 0 && input[i - 1] === ":") {
52735
+ endipv6Encountered = true;
52736
+ }
52737
+ continue;
52738
+ } else if (cursor === "%") {
52739
+ if (!consume()) {
52740
+ break;
52741
+ }
52742
+ // switch to zone detection
52743
+ isZone = true;
52744
+ } else {
52745
+ buffer.push(cursor);
52746
+ continue;
52747
+ }
52277
52748
  }
52278
- function toUpperCase(str) {
52279
- return str.toUpperCase();
52749
+ if (buffer.length) {
52750
+ if (isZone) {
52751
+ output.zone = buffer.join("");
52752
+ } else if (endIpv6) {
52753
+ address.push(buffer.join(""));
52754
+ } else {
52755
+ address.push(stringArrayToHexStripped(buffer));
52756
+ }
52280
52757
  }
52281
- function toArray(obj) {
52282
- return obj !== undefined && obj !== null ? _instanceof(obj, Array) ? obj : typeof obj.length !== "number" || obj.split || obj.setInterval || obj.call ? [
52283
- obj
52284
- ] : Array.prototype.slice.call(obj) : [];
52758
+ output.address = address.join("");
52759
+ return output;
52760
+ }
52761
+ function normalizeIPv6$1(host) {
52762
+ if (findToken(host, ":") < 2) {
52763
+ return {
52764
+ host: host,
52765
+ isIPV6: false
52766
+ };
52285
52767
  }
52286
- function assign(target, source) {
52287
- var obj = target;
52288
- if (source) {
52289
- for(var key in source){
52290
- obj[key] = source[key];
52291
- }
52768
+ var ipv6 = getIPV6(host);
52769
+ if (!ipv6.error) {
52770
+ var newHost = ipv6.address;
52771
+ var escapedHost = ipv6.address;
52772
+ if (ipv6.zone) {
52773
+ newHost += "%" + ipv6.zone;
52774
+ escapedHost += "%25" + ipv6.zone;
52292
52775
  }
52293
- return obj;
52294
- }
52295
- function buildExps(isIRI) {
52296
- var ALPHA$$ = "[A-Za-z]", DIGIT$$ = "[0-9]", HEXDIG$$ = merge(DIGIT$$, "[A-Fa-f]"), //case-insensitive
52297
- PCT_ENCODED$ = subexp(subexp("%[EFef]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%[89A-Fa-f]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%" + HEXDIG$$ + HEXDIG$$)), //expanded
52298
- 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
52299
- IPRIVATE$$ = isIRI ? "[\\uE000-\\uF8FF]" : "[]", //subset
52300
- 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
52301
- 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
52302
- IPV6ADDRESS2$ = subexp("\\:\\:" + subexp(H16$ + "\\:") + "{5}" + LS32$), // "::" 5( h16 ":" ) ls32
52303
- IPV6ADDRESS3$ = subexp(subexp(H16$) + "?\\:\\:" + subexp(H16$ + "\\:") + "{4}" + LS32$), //[ h16 ] "::" 4( h16 ":" ) ls32
52304
- IPV6ADDRESS4$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,1}" + H16$) + "?\\:\\:" + subexp(H16$ + "\\:") + "{3}" + LS32$), //[ *1( h16 ":" ) h16 ] "::" 3( h16 ":" ) ls32
52305
- IPV6ADDRESS5$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,2}" + H16$) + "?\\:\\:" + subexp(H16$ + "\\:") + "{2}" + LS32$), //[ *2( h16 ":" ) h16 ] "::" 2( h16 ":" ) ls32
52306
- IPV6ADDRESS6$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,3}" + H16$) + "?\\:\\:" + H16$ + "\\:" + LS32$), //[ *3( h16 ":" ) h16 ] "::" h16 ":" ls32
52307
- IPV6ADDRESS7$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,4}" + H16$) + "?\\:\\:" + LS32$), //[ *4( h16 ":" ) h16 ] "::" ls32
52308
- IPV6ADDRESS8$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,5}" + H16$) + "?\\:\\:" + H16$), //[ *5( h16 ":" ) h16 ] "::" h16
52309
- IPV6ADDRESS9$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,6}" + H16$) + "?\\:\\:"), //[ *6( h16 ":" ) h16 ] "::"
52310
- IPV6ADDRESS$ = subexp([
52311
- IPV6ADDRESS1$,
52312
- IPV6ADDRESS2$,
52313
- IPV6ADDRESS3$,
52314
- IPV6ADDRESS4$,
52315
- IPV6ADDRESS5$,
52316
- IPV6ADDRESS6$,
52317
- IPV6ADDRESS7$,
52318
- IPV6ADDRESS8$,
52319
- IPV6ADDRESS9$
52320
- ].join("|")), ZONEID$ = subexp(subexp(UNRESERVED$$ + "|" + PCT_ENCODED$) + "+"); //RFC 6874
52321
- 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$$)) + "*");
52322
52776
  return {
52323
- NOT_SCHEME: new RegExp(merge("[^]", ALPHA$$, DIGIT$$, "[\\+\\-\\.]"), "g"),
52324
- NOT_USERINFO: new RegExp(merge("[^\\%\\:]", UNRESERVED$$, SUB_DELIMS$$), "g"),
52325
- NOT_HOST: new RegExp(merge("[^\\%\\[\\]\\:]", UNRESERVED$$, SUB_DELIMS$$), "g"),
52326
- NOT_PATH: new RegExp(merge("[^\\%\\/\\:\\@]", UNRESERVED$$, SUB_DELIMS$$), "g"),
52327
- NOT_PATH_NOSCHEME: new RegExp(merge("[^\\%\\/\\@]", UNRESERVED$$, SUB_DELIMS$$), "g"),
52328
- NOT_QUERY: new RegExp(merge("[^\\%]", UNRESERVED$$, SUB_DELIMS$$, "[\\:\\@\\/\\?]", IPRIVATE$$), "g"),
52329
- NOT_FRAGMENT: new RegExp(merge("[^\\%]", UNRESERVED$$, SUB_DELIMS$$, "[\\:\\@\\/\\?]"), "g"),
52330
- ESCAPE: new RegExp(merge("[^]", UNRESERVED$$, SUB_DELIMS$$), "g"),
52331
- UNRESERVED: new RegExp(UNRESERVED$$, "g"),
52332
- OTHER_CHARS: new RegExp(merge("[^\\%]", UNRESERVED$$, RESERVED$$), "g"),
52333
- PCT_ENCODED: new RegExp(PCT_ENCODED$, "g"),
52334
- IPV4ADDRESS: new RegExp("^(" + IPV4ADDRESS$ + ")$"),
52335
- IPV6ADDRESS: new RegExp("^\\[?(" + IPV6ADDRESS$ + ")" + subexp(subexp("\\%25|\\%(?!" + HEXDIG$$ + "{2})") + "(" + ZONEID$ + ")") + "?\\]?$") //RFC 6874, with relaxed parsing rules
52777
+ host: newHost,
52778
+ escapedHost: escapedHost,
52779
+ isIPV6: true
52780
+ };
52781
+ } else {
52782
+ return {
52783
+ host: host,
52784
+ isIPV6: false
52336
52785
  };
52337
52786
  }
52338
- var URI_PROTOCOL = buildExps(false);
52339
- var IRI_PROTOCOL = buildExps(true);
52340
- var slicedToArray = function() {
52341
- function sliceIterator(arr, i) {
52342
- var _arr = [];
52343
- var _n = true;
52344
- var _d = false;
52345
- var _e = undefined;
52346
- try {
52347
- for(var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true){
52348
- _arr.push(_s.value);
52349
- if (i && _arr.length === i) break;
52350
- }
52351
- } catch (err) {
52352
- _d = true;
52353
- _e = err;
52354
- } finally{
52355
- try {
52356
- if (!_n && _i["return"]) _i["return"]();
52357
- } finally{
52358
- if (_d) throw _e;
52359
- }
52787
+ }
52788
+ function stripLeadingZeros(str, token) {
52789
+ var out = "";
52790
+ var skip = true;
52791
+ var l = str.length;
52792
+ for(var i = 0; i < l; i++){
52793
+ var c = str[i];
52794
+ if (c === "0" && skip) {
52795
+ if (i + 1 <= l && str[i + 1] === token || i + 1 === l) {
52796
+ out += c;
52797
+ skip = false;
52360
52798
  }
52361
- return _arr;
52362
- }
52363
- return function(arr, i) {
52364
- if (Array.isArray(arr)) {
52365
- return arr;
52366
- } else if (Symbol.iterator in Object(arr)) {
52367
- return sliceIterator(arr, i);
52799
+ } else {
52800
+ if (c === token) {
52801
+ skip = true;
52368
52802
  } else {
52369
- throw new TypeError("Invalid attempt to destructure non-iterable instance");
52803
+ skip = false;
52370
52804
  }
52371
- };
52372
- }();
52373
- var toConsumableArray = function toConsumableArray(arr) {
52374
- if (Array.isArray(arr)) {
52375
- for(var i = 0, arr2 = Array(arr.length); i < arr.length; i++)arr2[i] = arr[i];
52376
- return arr2;
52377
- } else {
52378
- return Array.from(arr);
52379
- }
52380
- };
52381
- /** Highest positive signed 32-bit float value */ var maxInt = 2147483647; // aka. 0x7FFFFFFF or 2^31-1
52382
- /** Bootstring parameters */ var base = 36;
52383
- var tMin = 1;
52384
- var tMax = 26;
52385
- var skew = 38;
52386
- var damp = 700;
52387
- var initialBias = 72;
52388
- var initialN = 128; // 0x80
52389
- var delimiter = "-"; // '\x2D'
52390
- /** Regular expressions */ var regexPunycode = /^xn--/;
52391
- var regexNonASCII = /[^\0-\x7E]/; // non-ASCII chars
52392
- var regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g; // RFC 3490 separators
52393
- /** Error messages */ var errors = {
52394
- "overflow": "Overflow: input needs wider integers to process",
52395
- "not-basic": "Illegal input >= 0x80 (not a basic code point)",
52396
- "invalid-input": "Invalid input"
52397
- };
52398
- /** Convenience shortcuts */ var baseMinusTMin = base - tMin;
52399
- var floor = Math.floor;
52400
- var stringFromCharCode = String.fromCharCode;
52401
- /*--------------------------------------------------------------------------*/ /**
52402
- * A generic error utility function.
52403
- * @private
52404
- * @param {String} type The error type.
52405
- * @returns {Error} Throws a `RangeError` with the applicable error message.
52406
- */ function error$1(type) {
52407
- throw new RangeError(errors[type]);
52805
+ out += c;
52806
+ }
52408
52807
  }
52409
- /**
52410
- * A generic `Array#map` utility function.
52411
- * @private
52412
- * @param {Array} array The array to iterate over.
52413
- * @param {Function} callback The function that gets called for every array
52414
- * item.
52415
- * @returns {Array} A new array of values returned by the callback function.
52416
- */ function map(array, fn) {
52417
- var result = [];
52418
- var length = array.length;
52419
- while(length--){
52420
- result[length] = fn(array[length]);
52808
+ return out;
52809
+ }
52810
+ function findToken(str, token) {
52811
+ var ind = 0;
52812
+ for(var i = 0; i < str.length; i++){
52813
+ if (str[i] === token) ind++;
52814
+ }
52815
+ return ind;
52816
+ }
52817
+ var RDS1 = RegExp("^\\.\\.?\\/", "u");
52818
+ var RDS2 = RegExp("^\\/\\.(?:\\/|$)", "u");
52819
+ var RDS3 = RegExp("^\\/\\.\\.(?:\\/|$)", "u");
52820
+ var RDS5 = RegExp("^\\/?(?:.|\\n)*?(?=\\/|$)", "u");
52821
+ function removeDotSegments$1(input) {
52822
+ var output = [];
52823
+ while(input.length){
52824
+ if (input.match(RDS1)) {
52825
+ input = input.replace(RDS1, "");
52826
+ } else if (input.match(RDS2)) {
52827
+ input = input.replace(RDS2, "/");
52828
+ } else if (input.match(RDS3)) {
52829
+ input = input.replace(RDS3, "/");
52830
+ output.pop();
52831
+ } else if (input === "." || input === "..") {
52832
+ input = "";
52833
+ } else {
52834
+ var im = input.match(RDS5);
52835
+ if (im) {
52836
+ var s = im[0];
52837
+ input = input.slice(s.length);
52838
+ output.push(s);
52839
+ } else {
52840
+ throw new Error("Unexpected dot segment condition");
52841
+ }
52421
52842
  }
52422
- return result;
52423
52843
  }
52424
- /**
52425
- * A simple `Array#map`-like wrapper to work with domain name strings or email
52426
- * addresses.
52427
- * @private
52428
- * @param {String} domain The domain name or email address.
52429
- * @param {Function} callback The function that gets called for every
52430
- * character.
52431
- * @returns {Array} A new string of characters returned by the callback
52432
- * function.
52433
- */ function mapDomain(string, fn) {
52434
- var parts = string.split("@");
52435
- var result = "";
52436
- if (parts.length > 1) {
52437
- // In email addresses, only the domain name should be punycoded. Leave
52438
- // the local part (i.e. everything up to `@`) intact.
52439
- result = parts[0] + "@";
52440
- string = parts[1];
52441
- }
52442
- // Avoid `split(regex)` for IE8 compatibility. See #17.
52443
- string = string.replace(regexSeparators, ".");
52444
- var labels = string.split(".");
52445
- var encoded = map(labels, fn).join(".");
52446
- return result + encoded;
52844
+ return output.join("");
52845
+ }
52846
+ function normalizeComponentEncoding$1(components, esc) {
52847
+ var func = esc !== true ? escape : unescape;
52848
+ if (components.scheme !== undefined) {
52849
+ components.scheme = func(components.scheme);
52447
52850
  }
52448
- /**
52449
- * Creates an array containing the numeric code points of each Unicode
52450
- * character in the string. While JavaScript uses UCS-2 internally,
52451
- * this function will convert a pair of surrogate halves (each of which
52452
- * UCS-2 exposes as separate characters) into a single code point,
52453
- * matching UTF-16.
52454
- * @see `punycode.ucs2.encode`
52455
- * @see <https://mathiasbynens.be/notes/javascript-encoding>
52456
- * @memberOf punycode.ucs2
52457
- * @name decode
52458
- * @param {String} string The Unicode input string (UCS-2).
52459
- * @returns {Array} The new array of code points.
52460
- */ function ucs2decode(string) {
52461
- var output = [];
52462
- var counter = 0;
52463
- var length = string.length;
52464
- while(counter < length){
52465
- var value = string.charCodeAt(counter++);
52466
- if (value >= 0xD800 && value <= 0xDBFF && counter < length) {
52467
- // It's a high surrogate, and there is a next character.
52468
- var extra = string.charCodeAt(counter++);
52469
- if ((extra & 0xFC00) == 0xDC00) {
52470
- // Low surrogate.
52471
- output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);
52472
- } else {
52473
- // It's an unmatched surrogate; only append this code unit, in case the
52474
- // next code unit is the high surrogate of a surrogate pair.
52475
- output.push(value);
52476
- counter--;
52477
- }
52851
+ if (components.userinfo !== undefined) {
52852
+ components.userinfo = func(components.userinfo);
52853
+ }
52854
+ if (components.host !== undefined) {
52855
+ components.host = func(components.host);
52856
+ }
52857
+ if (components.path !== undefined) {
52858
+ components.path = func(components.path);
52859
+ }
52860
+ if (components.query !== undefined) {
52861
+ components.query = func(components.query);
52862
+ }
52863
+ if (components.fragment !== undefined) {
52864
+ components.fragment = func(components.fragment);
52865
+ }
52866
+ return components;
52867
+ }
52868
+ function recomposeAuthority$1(components, options) {
52869
+ var uriTokens = [];
52870
+ if (components.userinfo !== undefined) {
52871
+ uriTokens.push(components.userinfo);
52872
+ uriTokens.push("@");
52873
+ }
52874
+ if (components.host !== undefined) {
52875
+ var host = unescape(components.host);
52876
+ var ipV4res = normalizeIPv4$1(host);
52877
+ if (ipV4res.isIPV4) {
52878
+ host = ipV4res.host;
52879
+ } else {
52880
+ var ipV6res = normalizeIPv6$1(ipV4res.host);
52881
+ if (ipV6res.isIPV6 === true) {
52882
+ host = "[".concat(ipV6res.escapedHost, "]");
52478
52883
  } else {
52479
- output.push(value);
52884
+ host = components.host;
52480
52885
  }
52481
52886
  }
52482
- return output;
52887
+ uriTokens.push(host);
52483
52888
  }
52484
- /**
52485
- * Creates a string based on an array of numeric code points.
52486
- * @see `punycode.ucs2.decode`
52487
- * @memberOf punycode.ucs2
52488
- * @name encode
52489
- * @param {Array} codePoints The array of numeric code points.
52490
- * @returns {String} The new Unicode string (UCS-2).
52491
- */ var ucs2encode = function ucs2encode(array) {
52492
- return String.fromCodePoint.apply(String, toConsumableArray(array));
52493
- };
52494
- /**
52495
- * Converts a basic code point into a digit/integer.
52496
- * @see `digitToBasic()`
52497
- * @private
52498
- * @param {Number} codePoint The basic numeric code point value.
52499
- * @returns {Number} The numeric value of a basic code point (for use in
52500
- * representing integers) in the range `0` to `base - 1`, or `base` if
52501
- * the code point does not represent a value.
52502
- */ var basicToDigit = function basicToDigit(codePoint) {
52503
- if (codePoint - 0x30 < 0x0A) {
52504
- return codePoint - 0x16;
52505
- }
52506
- if (codePoint - 0x41 < 0x1A) {
52507
- return codePoint - 0x41;
52508
- }
52509
- if (codePoint - 0x61 < 0x1A) {
52510
- return codePoint - 0x61;
52511
- }
52512
- return base;
52513
- };
52514
- /**
52515
- * Converts a digit/integer into a basic code point.
52516
- * @see `basicToDigit()`
52517
- * @private
52518
- * @param {Number} digit The numeric value of a basic code point.
52519
- * @returns {Number} The basic code point whose value (when used for
52520
- * representing integers) is `digit`, which needs to be in the range
52521
- * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is
52522
- * used; else, the lowercase form is used. The behavior is undefined
52523
- * if `flag` is non-zero and `digit` has no uppercase form.
52524
- */ var digitToBasic = function digitToBasic(digit, flag) {
52525
- // 0..25 map to ASCII a..z or A..Z
52526
- // 26..35 map to ASCII 0..9
52527
- return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5);
52528
- };
52529
- /**
52530
- * Bias adaptation function as per section 3.4 of RFC 3492.
52531
- * https://tools.ietf.org/html/rfc3492#section-3.4
52532
- * @private
52533
- */ var adapt = function adapt(delta, numPoints, firstTime) {
52534
- var k = 0;
52535
- delta = firstTime ? floor(delta / damp) : delta >> 1;
52536
- delta += floor(delta / numPoints);
52537
- for(; delta > baseMinusTMin * tMax >> 1; k += base){
52538
- delta = floor(delta / baseMinusTMin);
52539
- }
52540
- return floor(k + (baseMinusTMin + 1) * delta / (delta + skew));
52541
- };
52542
- /**
52543
- * Converts a Punycode string of ASCII-only symbols to a string of Unicode
52544
- * symbols.
52545
- * @memberOf punycode
52546
- * @param {String} input The Punycode string of ASCII-only symbols.
52547
- * @returns {String} The resulting string of Unicode symbols.
52548
- */ var decode = function decode(input) {
52549
- // Don't use UCS-2.
52550
- var output = [];
52551
- var inputLength = input.length;
52552
- var i = 0;
52553
- var n = initialN;
52554
- var bias = initialBias;
52555
- // Handle the basic code points: let `basic` be the number of input code
52556
- // points before the last delimiter, or `0` if there is none, then copy
52557
- // the first basic code points to the output.
52558
- var basic = input.lastIndexOf(delimiter);
52559
- if (basic < 0) {
52560
- basic = 0;
52561
- }
52562
- for(var j = 0; j < basic; ++j){
52563
- // if it's not a basic code point
52564
- if (input.charCodeAt(j) >= 0x80) {
52565
- error$1("not-basic");
52566
- }
52567
- output.push(input.charCodeAt(j));
52568
- }
52569
- // Main decoding loop: start just after the last delimiter if any basic code
52570
- // points were copied; start at the beginning otherwise.
52571
- for(var index = basic > 0 ? basic + 1 : 0; index < inputLength;)/* no final expression */ {
52572
- // `index` is the index of the next character to be consumed.
52573
- // Decode a generalized variable-length integer into `delta`,
52574
- // which gets added to `i`. The overflow checking is easier
52575
- // if we increase `i` as we go, then subtract off its starting
52576
- // value at the end to obtain `delta`.
52577
- var oldi = i;
52578
- for(var w = 1, k = base;; k += base){
52579
- if (index >= inputLength) {
52580
- error$1("invalid-input");
52581
- }
52582
- var digit = basicToDigit(input.charCodeAt(index++));
52583
- if (digit >= base || digit > floor((maxInt - i) / w)) {
52584
- error$1("overflow");
52585
- }
52586
- i += digit * w;
52587
- var t = k <= bias ? tMin : k >= bias + tMax ? tMax : k - bias;
52588
- if (digit < t) {
52589
- break;
52590
- }
52591
- var baseMinusT = base - t;
52592
- if (w > floor(maxInt / baseMinusT)) {
52593
- error$1("overflow");
52594
- }
52595
- w *= baseMinusT;
52596
- }
52597
- var out = output.length + 1;
52598
- bias = adapt(i - oldi, out, oldi == 0);
52599
- // `i` was supposed to wrap around from `out` to `0`,
52600
- // incrementing `n` each time, so we'll fix that now:
52601
- if (floor(i / out) > maxInt - n) {
52602
- error$1("overflow");
52603
- }
52604
- n += floor(i / out);
52605
- i %= out;
52606
- // Insert `n` at position `i` of the output.
52607
- output.splice(i++, 0, n);
52889
+ if (typeof components.port === "number" || typeof components.port === "string") {
52890
+ uriTokens.push(":");
52891
+ uriTokens.push(String(components.port));
52892
+ }
52893
+ return uriTokens.length ? uriTokens.join("") : undefined;
52894
+ }
52895
+ var utils = {
52896
+ recomposeAuthority: recomposeAuthority$1,
52897
+ normalizeComponentEncoding: normalizeComponentEncoding$1,
52898
+ removeDotSegments: removeDotSegments$1,
52899
+ normalizeIPv4: normalizeIPv4$1,
52900
+ normalizeIPv6: normalizeIPv6$1,
52901
+ stringArrayToHexStripped: stringArrayToHexStripped
52902
+ };
52903
+
52904
+ function _array_like_to_array$3(arr, len) {
52905
+ if (len == null || len > arr.length) len = arr.length;
52906
+ for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
52907
+ return arr2;
52908
+ }
52909
+ function _array_with_holes$1(arr) {
52910
+ if (Array.isArray(arr)) return arr;
52911
+ }
52912
+ function _iterable_to_array_limit$1(arr, i) {
52913
+ var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
52914
+ if (_i == null) return;
52915
+ var _arr = [];
52916
+ var _n = true;
52917
+ var _d = false;
52918
+ var _s, _e;
52919
+ try {
52920
+ for(_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true){
52921
+ _arr.push(_s.value);
52922
+ if (i && _arr.length === i) break;
52608
52923
  }
52609
- return String.fromCodePoint.apply(String, output);
52610
- };
52611
- /**
52612
- * Converts a string of Unicode symbols (e.g. a domain name label) to a
52613
- * Punycode string of ASCII-only symbols.
52614
- * @memberOf punycode
52615
- * @param {String} input The string of Unicode symbols.
52616
- * @returns {String} The resulting Punycode string of ASCII-only symbols.
52617
- */ var encode = function encode(input) {
52618
- var output = [];
52619
- // Convert the input in UCS-2 to an array of Unicode code points.
52620
- input = ucs2decode(input);
52621
- // Cache the length.
52622
- var inputLength = input.length;
52623
- // Initialize the state.
52624
- var n = initialN;
52625
- var delta = 0;
52626
- var bias = initialBias;
52627
- // Handle the basic code points.
52628
- var _iteratorNormalCompletion = true;
52629
- var _didIteratorError = false;
52630
- var _iteratorError = undefined;
52924
+ } catch (err) {
52925
+ _d = true;
52926
+ _e = err;
52927
+ } finally{
52631
52928
  try {
52632
- for(var _iterator = input[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
52633
- var _currentValue2 = _step.value;
52634
- if (_currentValue2 < 0x80) {
52635
- output.push(stringFromCharCode(_currentValue2));
52636
- }
52637
- }
52638
- } catch (err) {
52639
- _didIteratorError = true;
52640
- _iteratorError = err;
52929
+ if (!_n && _i["return"] != null) _i["return"]();
52641
52930
  } finally{
52642
- try {
52643
- if (!_iteratorNormalCompletion && _iterator.return) {
52644
- _iterator.return();
52645
- }
52646
- } finally{
52647
- if (_didIteratorError) {
52648
- throw _iteratorError;
52649
- }
52650
- }
52651
- }
52652
- var basicLength = output.length;
52653
- var handledCPCount = basicLength;
52654
- // `handledCPCount` is the number of code points that have been handled;
52655
- // `basicLength` is the number of basic code points.
52656
- // Finish the basic string with a delimiter unless it's empty.
52657
- if (basicLength) {
52658
- output.push(delimiter);
52931
+ if (_d) throw _e;
52659
52932
  }
52660
- // Main encoding loop:
52661
- while(handledCPCount < inputLength){
52662
- // All non-basic code points < n have been handled already. Find the next
52663
- // larger one:
52664
- var m = maxInt;
52665
- var _iteratorNormalCompletion2 = true;
52666
- var _didIteratorError2 = false;
52667
- var _iteratorError2 = undefined;
52668
- try {
52669
- for(var _iterator2 = input[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true){
52670
- var currentValue = _step2.value;
52671
- if (currentValue >= n && currentValue < m) {
52672
- m = currentValue;
52673
- }
52674
- }
52675
- // Increase `delta` enough to advance the decoder's <n,i> state to <m,0>,
52676
- // but guard against overflow.
52677
- } catch (err) {
52678
- _didIteratorError2 = true;
52679
- _iteratorError2 = err;
52680
- } finally{
52681
- try {
52682
- if (!_iteratorNormalCompletion2 && _iterator2.return) {
52683
- _iterator2.return();
52684
- }
52685
- } finally{
52686
- if (_didIteratorError2) {
52687
- throw _iteratorError2;
52688
- }
52689
- }
52690
- }
52691
- var handledCPCountPlusOne = handledCPCount + 1;
52692
- if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {
52693
- error$1("overflow");
52694
- }
52695
- delta += (m - n) * handledCPCountPlusOne;
52696
- n = m;
52697
- var _iteratorNormalCompletion3 = true;
52698
- var _didIteratorError3 = false;
52699
- var _iteratorError3 = undefined;
52700
- try {
52701
- for(var _iterator3 = input[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true){
52702
- var _currentValue = _step3.value;
52703
- if (_currentValue < n && ++delta > maxInt) {
52704
- error$1("overflow");
52705
- }
52706
- if (_currentValue == n) {
52707
- // Represent delta as a generalized variable-length integer.
52708
- var q = delta;
52709
- for(var k = base;; k += base){
52710
- var t = k <= bias ? tMin : k >= bias + tMax ? tMax : k - bias;
52711
- if (q < t) {
52712
- break;
52713
- }
52714
- var qMinusT = q - t;
52715
- var baseMinusT = base - t;
52716
- output.push(stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0)));
52717
- q = floor(qMinusT / baseMinusT);
52718
- }
52719
- output.push(stringFromCharCode(digitToBasic(q, 0)));
52720
- bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength);
52721
- delta = 0;
52722
- ++handledCPCount;
52723
- }
52724
- }
52725
- } catch (err) {
52726
- _didIteratorError3 = true;
52727
- _iteratorError3 = err;
52728
- } finally{
52729
- try {
52730
- if (!_iteratorNormalCompletion3 && _iterator3.return) {
52731
- _iterator3.return();
52732
- }
52733
- } finally{
52734
- if (_didIteratorError3) {
52735
- throw _iteratorError3;
52736
- }
52737
- }
52738
- }
52739
- ++delta;
52740
- ++n;
52933
+ }
52934
+ return _arr;
52935
+ }
52936
+ function _non_iterable_rest$1() {
52937
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
52938
+ }
52939
+ function _sliced_to_array$1(arr, i) {
52940
+ return _array_with_holes$1(arr) || _iterable_to_array_limit$1(arr, i) || _unsupported_iterable_to_array$3(arr, i) || _non_iterable_rest$1();
52941
+ }
52942
+ function _unsupported_iterable_to_array$3(o, minLen) {
52943
+ if (!o) return;
52944
+ if (typeof o === "string") return _array_like_to_array$3(o, minLen);
52945
+ var n = Object.prototype.toString.call(o).slice(8, -1);
52946
+ if (n === "Object" && o.constructor) n = o.constructor.name;
52947
+ if (n === "Map" || n === "Set") return Array.from(n);
52948
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$3(o, minLen);
52949
+ }
52950
+ var UUID_REG = RegExp("^[\\da-f]{8}\\b-[\\da-f]{4}\\b-[\\da-f]{4}\\b-[\\da-f]{4}\\b-[\\da-f]{12}$", "iu");
52951
+ var URN_REG = RegExp("([\\da-z][\\d\\-a-z]{0,31}):((?:[\\w!$'()*+,\\-.:;=@]|%[\\da-f]{2})+)", "iu");
52952
+ function isSecure(wsComponents) {
52953
+ return typeof wsComponents.secure === "boolean" ? wsComponents.secure : String(wsComponents.scheme).toLowerCase() === "wss";
52954
+ }
52955
+ function httpParse(components) {
52956
+ if (!components.host) {
52957
+ components.error = components.error || "HTTP URIs must have a host.";
52958
+ }
52959
+ return components;
52960
+ }
52961
+ function httpSerialize(components) {
52962
+ var secure = String(components.scheme).toLowerCase() === "https";
52963
+ // normalize the default port
52964
+ if (components.port === (secure ? 443 : 80) || components.port === "") {
52965
+ components.port = undefined;
52966
+ }
52967
+ // normalize the empty path
52968
+ if (!components.path) {
52969
+ components.path = "/";
52970
+ }
52971
+ // NOTE: We do not parse query strings for HTTP URIs
52972
+ // as WWW Form Url Encoded query strings are part of the HTML4+ spec,
52973
+ // and not the HTTP spec.
52974
+ return components;
52975
+ }
52976
+ function wsParse(wsComponents) {
52977
+ // indicate if the secure flag is set
52978
+ wsComponents.secure = isSecure(wsComponents);
52979
+ // construct resouce name
52980
+ wsComponents.resourceName = (wsComponents.path || "/") + (wsComponents.query ? "?" + wsComponents.query : "");
52981
+ wsComponents.path = undefined;
52982
+ wsComponents.query = undefined;
52983
+ return wsComponents;
52984
+ }
52985
+ function wsSerialize(wsComponents) {
52986
+ // normalize the default port
52987
+ if (wsComponents.port === (isSecure(wsComponents) ? 443 : 80) || wsComponents.port === "") {
52988
+ wsComponents.port = undefined;
52989
+ }
52990
+ // ensure scheme matches secure flag
52991
+ if (typeof wsComponents.secure === "boolean") {
52992
+ wsComponents.scheme = wsComponents.secure ? "wss" : "ws";
52993
+ wsComponents.secure = undefined;
52994
+ }
52995
+ // reconstruct path from resource name
52996
+ if (wsComponents.resourceName) {
52997
+ var _wsComponents_resourceName_split = _sliced_to_array$1(wsComponents.resourceName.split("?"), 2), path = _wsComponents_resourceName_split[0], query = _wsComponents_resourceName_split[1];
52998
+ wsComponents.path = path && path !== "/" ? path : undefined;
52999
+ wsComponents.query = query;
53000
+ wsComponents.resourceName = undefined;
53001
+ }
53002
+ // forbid fragment component
53003
+ wsComponents.fragment = undefined;
53004
+ return wsComponents;
53005
+ }
53006
+ function urnParse(urnComponents, options) {
53007
+ if (!urnComponents.path) {
53008
+ urnComponents.error = "URN can not be parsed";
53009
+ return urnComponents;
53010
+ }
53011
+ var matches = urnComponents.path.match(URN_REG);
53012
+ if (matches) {
53013
+ var scheme = options.scheme || urnComponents.scheme || "urn";
53014
+ urnComponents.nid = matches[1].toLowerCase();
53015
+ urnComponents.nss = matches[2];
53016
+ var urnScheme = "".concat(scheme, ":").concat(options.nid || urnComponents.nid);
53017
+ var schemeHandler = SCHEMES$1[urnScheme];
53018
+ urnComponents.path = undefined;
53019
+ if (schemeHandler) {
53020
+ urnComponents = schemeHandler.parse(urnComponents, options);
52741
53021
  }
52742
- return output.join("");
52743
- };
52744
- /**
52745
- * Converts a Punycode string representing a domain name or an email address
52746
- * to Unicode. Only the Punycoded parts of the input will be converted, i.e.
52747
- * it doesn't matter if you call it on a string that has already been
52748
- * converted to Unicode.
52749
- * @memberOf punycode
52750
- * @param {String} input The Punycoded domain name or email address to
52751
- * convert to Unicode.
52752
- * @returns {String} The Unicode representation of the given Punycode
52753
- * string.
52754
- */ var toUnicode = function toUnicode(input) {
52755
- return mapDomain(input, function(string) {
52756
- return regexPunycode.test(string) ? decode(string.slice(4).toLowerCase()) : string;
52757
- });
52758
- };
52759
- /**
52760
- * Converts a Unicode string representing a domain name or an email address to
52761
- * Punycode. Only the non-ASCII parts of the domain name will be converted,
52762
- * i.e. it doesn't matter if you call it with a domain that's already in
52763
- * ASCII.
52764
- * @memberOf punycode
52765
- * @param {String} input The domain name or email address to convert, as a
52766
- * Unicode string.
52767
- * @returns {String} The Punycode representation of the given domain name or
52768
- * email address.
52769
- */ var toASCII = function toASCII(input) {
52770
- return mapDomain(input, function(string) {
52771
- return regexNonASCII.test(string) ? "xn--" + encode(string) : string;
53022
+ } else {
53023
+ urnComponents.error = urnComponents.error || "URN can not be parsed.";
53024
+ }
53025
+ return urnComponents;
53026
+ }
53027
+ function urnSerialize(urnComponents, options) {
53028
+ var scheme = options.scheme || urnComponents.scheme || "urn";
53029
+ var nid = urnComponents.nid.toLowerCase();
53030
+ var urnScheme = "".concat(scheme, ":").concat(options.nid || nid);
53031
+ var schemeHandler = SCHEMES$1[urnScheme];
53032
+ if (schemeHandler) {
53033
+ urnComponents = schemeHandler.serialize(urnComponents, options);
53034
+ }
53035
+ var uriComponents = urnComponents;
53036
+ var nss = urnComponents.nss;
53037
+ uriComponents.path = "".concat(nid || options.nid, ":").concat(nss);
53038
+ options.skipEscape = true;
53039
+ return uriComponents;
53040
+ }
53041
+ function urnuuidParse(urnComponents, options) {
53042
+ var uuidComponents = urnComponents;
53043
+ uuidComponents.uuid = uuidComponents.nss;
53044
+ uuidComponents.nss = undefined;
53045
+ if (!options.tolerant && (!uuidComponents.uuid || !UUID_REG.test(uuidComponents.uuid))) {
53046
+ uuidComponents.error = uuidComponents.error || "UUID is not valid.";
53047
+ }
53048
+ return uuidComponents;
53049
+ }
53050
+ function urnuuidSerialize(uuidComponents) {
53051
+ var urnComponents = uuidComponents;
53052
+ // normalize UUID
53053
+ urnComponents.nss = (uuidComponents.uuid || "").toLowerCase();
53054
+ return urnComponents;
53055
+ }
53056
+ var http = {
53057
+ scheme: "http",
53058
+ domainHost: true,
53059
+ parse: httpParse,
53060
+ serialize: httpSerialize
53061
+ };
53062
+ var https = {
53063
+ scheme: "https",
53064
+ domainHost: http.domainHost,
53065
+ parse: httpParse,
53066
+ serialize: httpSerialize
53067
+ };
53068
+ var ws$1 = {
53069
+ scheme: "ws",
53070
+ domainHost: true,
53071
+ parse: wsParse,
53072
+ serialize: wsSerialize
53073
+ };
53074
+ var wss = {
53075
+ scheme: "wss",
53076
+ domainHost: ws$1.domainHost,
53077
+ parse: ws$1.parse,
53078
+ serialize: ws$1.serialize
53079
+ };
53080
+ var urn = {
53081
+ scheme: "urn",
53082
+ parse: urnParse,
53083
+ serialize: urnSerialize,
53084
+ skipNormalize: true
53085
+ };
53086
+ var urnuuid = {
53087
+ scheme: "urn:uuid",
53088
+ parse: urnuuidParse,
53089
+ serialize: urnuuidSerialize,
53090
+ skipNormalize: true
53091
+ };
53092
+ var SCHEMES$1 = {
53093
+ http: http,
53094
+ https: https,
53095
+ ws: ws$1,
53096
+ wss: wss,
53097
+ urn: urn,
53098
+ "urn:uuid": urnuuid
53099
+ };
53100
+ var schemes = SCHEMES$1;
53101
+
53102
+ function _define_property(obj, key, value) {
53103
+ if (key in obj) {
53104
+ Object.defineProperty(obj, key, {
53105
+ value: value,
53106
+ enumerable: true,
53107
+ configurable: true,
53108
+ writable: true
52772
53109
  });
52773
- };
52774
- /*--------------------------------------------------------------------------*/ /** Define the public API */ var punycode = {
52775
- /**
52776
- * A string representing the current Punycode.js version number.
52777
- * @memberOf punycode
52778
- * @type String
52779
- */ "version": "2.1.0",
52780
- /**
52781
- * An object of methods to convert from JavaScript's internal character
52782
- * representation (UCS-2) to Unicode code points, and back.
52783
- * @see <https://mathiasbynens.be/notes/javascript-encoding>
52784
- * @memberOf punycode
52785
- * @type Object
52786
- */ "ucs2": {
52787
- "decode": ucs2decode,
52788
- "encode": ucs2encode
52789
- },
52790
- "decode": decode,
52791
- "encode": encode,
52792
- "toASCII": toASCII,
52793
- "toUnicode": toUnicode
52794
- };
52795
- /**
52796
- * URI.js
52797
- *
52798
- * @fileoverview An RFC 3986 compliant, scheme extendable URI parsing/validating/resolving library for JavaScript.
52799
- * @author <a href="mailto:gary.court@gmail.com">Gary Court</a>
52800
- * @see http://github.com/garycourt/uri-js
52801
- */ /**
52802
- * Copyright 2011 Gary Court. All rights reserved.
52803
- *
52804
- * Redistribution and use in source and binary forms, with or without modification, are
52805
- * permitted provided that the following conditions are met:
52806
- *
52807
- * 1. Redistributions of source code must retain the above copyright notice, this list of
52808
- * conditions and the following disclaimer.
52809
- *
52810
- * 2. Redistributions in binary form must reproduce the above copyright notice, this list
52811
- * of conditions and the following disclaimer in the documentation and/or other materials
52812
- * provided with the distribution.
52813
- *
52814
- * THIS SOFTWARE IS PROVIDED BY GARY COURT ``AS IS'' AND ANY EXPRESS OR IMPLIED
52815
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
52816
- * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GARY COURT OR
52817
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
52818
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
52819
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
52820
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
52821
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
52822
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
52823
- *
52824
- * The views and conclusions contained in the software and documentation are those of the
52825
- * authors and should not be interpreted as representing official policies, either expressed
52826
- * or implied, of Gary Court.
52827
- */ var SCHEMES = {};
52828
- function pctEncChar(chr) {
52829
- var c = chr.charCodeAt(0);
52830
- var e = void 0;
52831
- if (c < 16) e = "%0" + c.toString(16).toUpperCase();
52832
- else if (c < 128) e = "%" + c.toString(16).toUpperCase();
52833
- else if (c < 2048) e = "%" + (c >> 6 | 192).toString(16).toUpperCase() + "%" + (c & 63 | 128).toString(16).toUpperCase();
52834
- else e = "%" + (c >> 12 | 224).toString(16).toUpperCase() + "%" + (c >> 6 & 63 | 128).toString(16).toUpperCase() + "%" + (c & 63 | 128).toString(16).toUpperCase();
52835
- return e;
53110
+ } else {
53111
+ obj[key] = value;
52836
53112
  }
52837
- function pctDecChars(str) {
52838
- var newStr = "";
52839
- var i = 0;
52840
- var il = str.length;
52841
- while(i < il){
52842
- var c = parseInt(str.substr(i + 1, 2), 16);
52843
- if (c < 128) {
52844
- newStr += String.fromCharCode(c);
52845
- i += 3;
52846
- } else if (c >= 194 && c < 224) {
52847
- if (il - i >= 6) {
52848
- var c2 = parseInt(str.substr(i + 4, 2), 16);
52849
- newStr += String.fromCharCode((c & 31) << 6 | c2 & 63);
52850
- } else {
52851
- newStr += str.substr(i, 6);
52852
- }
52853
- i += 6;
52854
- } else if (c >= 224) {
52855
- if (il - i >= 9) {
52856
- var _c = parseInt(str.substr(i + 4, 2), 16);
52857
- var c3 = parseInt(str.substr(i + 7, 2), 16);
52858
- newStr += String.fromCharCode((c & 15) << 12 | (_c & 63) << 6 | c3 & 63);
52859
- } else {
52860
- newStr += str.substr(i, 9);
52861
- }
52862
- i += 9;
52863
- } else {
52864
- newStr += str.substr(i, 3);
52865
- i += 3;
52866
- }
53113
+ return obj;
53114
+ }
53115
+ function _object_spread(target) {
53116
+ for(var i = 1; i < arguments.length; i++){
53117
+ var source = arguments[i] != null ? arguments[i] : {};
53118
+ var ownKeys = Object.keys(source);
53119
+ if (typeof Object.getOwnPropertySymbols === "function") {
53120
+ ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
53121
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
53122
+ }));
52867
53123
  }
52868
- return newStr;
53124
+ ownKeys.forEach(function(key) {
53125
+ _define_property(target, key, source[key]);
53126
+ });
52869
53127
  }
52870
- function _normalizeComponentEncoding(components, protocol) {
52871
- function decodeUnreserved(str) {
52872
- var decStr = pctDecChars(str);
52873
- return !decStr.match(protocol.UNRESERVED) ? str : decStr;
53128
+ return target;
53129
+ }
53130
+ function ownKeys(object, enumerableOnly) {
53131
+ var keys = Object.keys(object);
53132
+ if (Object.getOwnPropertySymbols) {
53133
+ var symbols = Object.getOwnPropertySymbols(object);
53134
+ if (enumerableOnly) {
53135
+ symbols = symbols.filter(function(sym) {
53136
+ return Object.getOwnPropertyDescriptor(object, sym).enumerable;
53137
+ });
52874
53138
  }
52875
- if (components.scheme) components.scheme = String(components.scheme).replace(protocol.PCT_ENCODED, decodeUnreserved).toLowerCase().replace(protocol.NOT_SCHEME, "");
52876
- if (components.userinfo !== undefined) components.userinfo = String(components.userinfo).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_USERINFO, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);
52877
- 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);
52878
- 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);
52879
- if (components.query !== undefined) components.query = String(components.query).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_QUERY, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);
52880
- if (components.fragment !== undefined) components.fragment = String(components.fragment).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_FRAGMENT, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);
52881
- return components;
53139
+ keys.push.apply(keys, symbols);
52882
53140
  }
52883
- function _stripLeadingZeros(str) {
52884
- return str.replace(/^0*(.*)/, "$1") || "0";
53141
+ return keys;
53142
+ }
53143
+ function _object_spread_props(target, source) {
53144
+ source = source != null ? source : {};
53145
+ if (Object.getOwnPropertyDescriptors) {
53146
+ Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
53147
+ } else {
53148
+ ownKeys(Object(source)).forEach(function(key) {
53149
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
53150
+ });
52885
53151
  }
52886
- function _normalizeIPv4(host, protocol) {
52887
- var matches = host.match(protocol.IPV4ADDRESS) || [];
52888
- var _matches = slicedToArray(matches, 2), address = _matches[1];
52889
- if (address) {
52890
- return address.split(".").map(_stripLeadingZeros).join(".");
52891
- } else {
52892
- return host;
52893
- }
52894
- }
52895
- function _normalizeIPv6(host, protocol) {
52896
- var matches = host.match(protocol.IPV6ADDRESS) || [];
52897
- var _matches2 = slicedToArray(matches, 3), address = _matches2[1], zone = _matches2[2];
52898
- if (address) {
52899
- var _address$toLowerCase$ = address.toLowerCase().split("::").reverse(), _address$toLowerCase$2 = slicedToArray(_address$toLowerCase$, 2), last = _address$toLowerCase$2[0], first = _address$toLowerCase$2[1];
52900
- var firstFields = first ? first.split(":").map(_stripLeadingZeros) : [];
52901
- var lastFields = last.split(":").map(_stripLeadingZeros);
52902
- var isLastFieldIPv4Address = protocol.IPV4ADDRESS.test(lastFields[lastFields.length - 1]);
52903
- var fieldCount = isLastFieldIPv4Address ? 7 : 8;
52904
- var lastFieldsStart = lastFields.length - fieldCount;
52905
- var fields = Array(fieldCount);
52906
- for(var x = 0; x < fieldCount; ++x){
52907
- fields[x] = firstFields[x] || lastFields[lastFieldsStart + x] || "";
52908
- }
52909
- if (isLastFieldIPv4Address) {
52910
- fields[fieldCount - 1] = _normalizeIPv4(fields[fieldCount - 1], protocol);
52911
- }
52912
- var allZeroFields = fields.reduce(function(acc, field, index) {
52913
- if (!field || field === "0") {
52914
- var lastLongest = acc[acc.length - 1];
52915
- if (lastLongest && lastLongest.index + lastLongest.length === index) {
52916
- lastLongest.length++;
52917
- } else {
52918
- acc.push({
52919
- index: index,
52920
- length: 1
52921
- });
52922
- }
52923
- }
52924
- return acc;
52925
- }, []);
52926
- var longestZeroFields = allZeroFields.sort(function(a, b) {
52927
- return b.length - a.length;
52928
- })[0];
52929
- var newHost = void 0;
52930
- if (longestZeroFields && longestZeroFields.length > 1) {
52931
- var newFirst = fields.slice(0, longestZeroFields.index);
52932
- var newLast = fields.slice(longestZeroFields.index + longestZeroFields.length);
52933
- newHost = newFirst.join(":") + "::" + newLast.join(":");
52934
- } else {
52935
- newHost = fields.join(":");
52936
- }
52937
- if (zone) {
52938
- newHost += "%" + zone;
52939
- }
52940
- return newHost;
53152
+ return target;
53153
+ }
53154
+ var _require = utils, normalizeIPv6 = _require.normalizeIPv6, normalizeIPv4 = _require.normalizeIPv4, removeDotSegments = _require.removeDotSegments, recomposeAuthority = _require.recomposeAuthority, normalizeComponentEncoding = _require.normalizeComponentEncoding;
53155
+ var SCHEMES = schemes;
53156
+ function normalize(uri, options) {
53157
+ if (typeof uri === "string") {
53158
+ uri = serialize(parse(uri, options), options);
53159
+ } else if (typeof uri === "object") {
53160
+ uri = parse(serialize(uri, options), options);
53161
+ }
53162
+ return uri;
53163
+ }
53164
+ function resolve(baseURI, relativeURI, options) {
53165
+ var schemelessOptions = Object.assign({
53166
+ scheme: "null"
53167
+ }, options);
53168
+ var resolved = resolveComponents(parse(baseURI, schemelessOptions), parse(relativeURI, schemelessOptions), schemelessOptions, true);
53169
+ return serialize(resolved, _object_spread_props(_object_spread({}, schemelessOptions), {
53170
+ skipEscape: true
53171
+ }));
53172
+ }
53173
+ function resolveComponents(base, relative, options, skipNormalization) {
53174
+ var target = {};
53175
+ if (!skipNormalization) {
53176
+ base = parse(serialize(base, options), options) // normalize base components
53177
+ ;
53178
+ relative = parse(serialize(relative, options), options) // normalize relative components
53179
+ ;
53180
+ }
53181
+ options = options || {};
53182
+ if (!options.tolerant && relative.scheme) {
53183
+ target.scheme = relative.scheme;
53184
+ // target.authority = relative.authority;
53185
+ target.userinfo = relative.userinfo;
53186
+ target.host = relative.host;
53187
+ target.port = relative.port;
53188
+ target.path = removeDotSegments(relative.path || "");
53189
+ target.query = relative.query;
53190
+ } else {
53191
+ if (relative.userinfo !== undefined || relative.host !== undefined || relative.port !== undefined) {
53192
+ // target.authority = relative.authority;
53193
+ target.userinfo = relative.userinfo;
53194
+ target.host = relative.host;
53195
+ target.port = relative.port;
53196
+ target.path = removeDotSegments(relative.path || "");
53197
+ target.query = relative.query;
52941
53198
  } else {
52942
- return host;
52943
- }
52944
- }
52945
- var URI_PARSE = /^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i;
52946
- var NO_MATCH_IS_UNDEFINED = "".match(/(){0}/)[1] === undefined;
52947
- function parse(uriString) {
52948
- var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
52949
- var components = {};
52950
- var protocol = options.iri !== false ? IRI_PROTOCOL : URI_PROTOCOL;
52951
- if (options.reference === "suffix") uriString = (options.scheme ? options.scheme + ":" : "") + "//" + uriString;
52952
- var matches = uriString.match(URI_PARSE);
52953
- if (matches) {
52954
- if (NO_MATCH_IS_UNDEFINED) {
52955
- //store each component
52956
- components.scheme = matches[1];
52957
- components.userinfo = matches[3];
52958
- components.host = matches[4];
52959
- components.port = parseInt(matches[5], 10);
52960
- components.path = matches[6] || "";
52961
- components.query = matches[7];
52962
- components.fragment = matches[8];
52963
- //fix port number
52964
- if (isNaN(components.port)) {
52965
- components.port = matches[5];
53199
+ if (!relative.path) {
53200
+ target.path = base.path;
53201
+ if (relative.query !== undefined) {
53202
+ target.query = relative.query;
53203
+ } else {
53204
+ target.query = base.query;
52966
53205
  }
52967
53206
  } else {
52968
- //IE FIX for improper RegExp matching
52969
- //store each component
52970
- components.scheme = matches[1] || undefined;
52971
- components.userinfo = uriString.indexOf("@") !== -1 ? matches[3] : undefined;
52972
- components.host = uriString.indexOf("//") !== -1 ? matches[4] : undefined;
52973
- components.port = parseInt(matches[5], 10);
52974
- components.path = matches[6] || "";
52975
- components.query = uriString.indexOf("?") !== -1 ? matches[7] : undefined;
52976
- components.fragment = uriString.indexOf("#") !== -1 ? matches[8] : undefined;
52977
- //fix port number
52978
- if (isNaN(components.port)) {
52979
- components.port = uriString.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/) ? matches[4] : undefined;
52980
- }
52981
- }
52982
- if (components.host) {
52983
- //normalize IP hosts
52984
- components.host = _normalizeIPv6(_normalizeIPv4(components.host, protocol), protocol);
52985
- }
52986
- //determine reference type
52987
- if (components.scheme === undefined && components.userinfo === undefined && components.host === undefined && components.port === undefined && !components.path && components.query === undefined) {
52988
- components.reference = "same-document";
52989
- } else if (components.scheme === undefined) {
52990
- components.reference = "relative";
52991
- } else if (components.fragment === undefined) {
52992
- components.reference = "absolute";
52993
- } else {
52994
- components.reference = "uri";
52995
- }
52996
- //check for reference errors
52997
- if (options.reference && options.reference !== "suffix" && options.reference !== components.reference) {
52998
- components.error = components.error || "URI is not a " + options.reference + " reference.";
52999
- }
53000
- //find scheme handler
53001
- var schemeHandler = SCHEMES[(options.scheme || components.scheme || "").toLowerCase()];
53002
- //check if scheme can't handle IRIs
53003
- if (!options.unicodeSupport && (!schemeHandler || !schemeHandler.unicodeSupport)) {
53004
- //if host component is a domain name
53005
- if (components.host && (options.domainHost || schemeHandler && schemeHandler.domainHost)) {
53006
- //convert Unicode IDN -> ASCII IDN
53007
- try {
53008
- components.host = punycode.toASCII(components.host.replace(protocol.PCT_ENCODED, pctDecChars).toLowerCase());
53009
- } catch (e) {
53010
- components.error = components.error || "Host's domain name can not be converted to ASCII via punycode: " + e;
53207
+ if (relative.path.charAt(0) === "/") {
53208
+ target.path = removeDotSegments(relative.path);
53209
+ } else {
53210
+ if ((base.userinfo !== undefined || base.host !== undefined || base.port !== undefined) && !base.path) {
53211
+ target.path = "/" + relative.path;
53212
+ } else if (!base.path) {
53213
+ target.path = relative.path;
53214
+ } else {
53215
+ target.path = base.path.slice(0, base.path.lastIndexOf("/") + 1) + relative.path;
53011
53216
  }
53217
+ target.path = removeDotSegments(target.path);
53012
53218
  }
53013
- //convert IRI -> URI
53014
- _normalizeComponentEncoding(components, URI_PROTOCOL);
53015
- } else {
53016
- //normalize encodings
53017
- _normalizeComponentEncoding(components, protocol);
53219
+ target.query = relative.query;
53018
53220
  }
53019
- //perform scheme specific parsing
53020
- if (schemeHandler && schemeHandler.parse) {
53021
- schemeHandler.parse(components, options);
53221
+ // target.authority = base.authority;
53222
+ target.userinfo = base.userinfo;
53223
+ target.host = base.host;
53224
+ target.port = base.port;
53225
+ }
53226
+ target.scheme = base.scheme;
53227
+ }
53228
+ target.fragment = relative.fragment;
53229
+ return target;
53230
+ }
53231
+ function equal$2(uriA, uriB, options) {
53232
+ if (typeof uriA === "string") {
53233
+ uriA = unescape(uriA);
53234
+ uriA = serialize(normalizeComponentEncoding(parse(uriA, options), true), _object_spread_props(_object_spread({}, options), {
53235
+ skipEscape: true
53236
+ }));
53237
+ } else if (typeof uriA === "object") {
53238
+ uriA = serialize(normalizeComponentEncoding(uriA, true), _object_spread_props(_object_spread({}, options), {
53239
+ skipEscape: true
53240
+ }));
53241
+ }
53242
+ if (typeof uriB === "string") {
53243
+ uriB = unescape(uriB);
53244
+ uriB = serialize(normalizeComponentEncoding(parse(uriB, options), true), _object_spread_props(_object_spread({}, options), {
53245
+ skipEscape: true
53246
+ }));
53247
+ } else if (typeof uriB === "object") {
53248
+ uriB = serialize(normalizeComponentEncoding(uriB, true), _object_spread_props(_object_spread({}, options), {
53249
+ skipEscape: true
53250
+ }));
53251
+ }
53252
+ return uriA.toLowerCase() === uriB.toLowerCase();
53253
+ }
53254
+ function serialize(cmpts, opts) {
53255
+ var components = {
53256
+ host: cmpts.host,
53257
+ scheme: cmpts.scheme,
53258
+ userinfo: cmpts.userinfo,
53259
+ port: cmpts.port,
53260
+ path: cmpts.path,
53261
+ query: cmpts.query,
53262
+ nid: cmpts.nid,
53263
+ nss: cmpts.nss,
53264
+ uuid: cmpts.uuid,
53265
+ fragment: cmpts.fragment,
53266
+ reference: cmpts.reference,
53267
+ resourceName: cmpts.resourceName,
53268
+ secure: cmpts.secure,
53269
+ error: ""
53270
+ };
53271
+ var options = Object.assign({}, opts);
53272
+ var uriTokens = [];
53273
+ // find scheme handler
53274
+ var schemeHandler = SCHEMES[(options.scheme || components.scheme || "").toLowerCase()];
53275
+ // perform scheme specific serialization
53276
+ if (schemeHandler && schemeHandler.serialize) schemeHandler.serialize(components, options);
53277
+ if (components.path !== undefined) {
53278
+ if (!options.skipEscape) {
53279
+ components.path = escape(components.path);
53280
+ if (components.scheme !== undefined) {
53281
+ components.path = components.path.split("%3A").join(":");
53022
53282
  }
53023
53283
  } else {
53024
- components.error = components.error || "URI can not be parsed.";
53284
+ components.path = unescape(components.path);
53025
53285
  }
53026
- return components;
53027
53286
  }
53028
- function _recomposeAuthority(components, options) {
53029
- var protocol = options.iri !== false ? IRI_PROTOCOL : URI_PROTOCOL;
53030
- var uriTokens = [];
53031
- if (components.userinfo !== undefined) {
53032
- uriTokens.push(components.userinfo);
53033
- uriTokens.push("@");
53287
+ if (options.reference !== "suffix" && components.scheme) {
53288
+ uriTokens.push(components.scheme);
53289
+ uriTokens.push(":");
53290
+ }
53291
+ var authority = recomposeAuthority(components, options);
53292
+ if (authority !== undefined) {
53293
+ if (options.reference !== "suffix") {
53294
+ uriTokens.push("//");
53034
53295
  }
53035
- if (components.host !== undefined) {
53036
- //normalize IP hosts, add brackets and escape zone separator for IPv6
53037
- uriTokens.push(_normalizeIPv6(_normalizeIPv4(String(components.host), protocol), protocol).replace(protocol.IPV6ADDRESS, function(_, $1, $2) {
53038
- return "[" + $1 + ($2 ? "%25" + $2 : "") + "]";
53039
- }));
53296
+ uriTokens.push(authority);
53297
+ if (components.path && components.path.charAt(0) !== "/") {
53298
+ uriTokens.push("/");
53299
+ }
53300
+ }
53301
+ if (components.path !== undefined) {
53302
+ var s = components.path;
53303
+ if (!options.absolutePath && (!schemeHandler || !schemeHandler.absolutePath)) {
53304
+ s = removeDotSegments(s);
53305
+ }
53306
+ if (authority === undefined) {
53307
+ s = s.replace(RegExp("^\\/\\/", "u"), "/%2F") // don't allow the path to start with "//"
53308
+ ;
53309
+ }
53310
+ uriTokens.push(s);
53311
+ }
53312
+ if (components.query !== undefined) {
53313
+ uriTokens.push("?");
53314
+ uriTokens.push(components.query);
53315
+ }
53316
+ if (components.fragment !== undefined) {
53317
+ uriTokens.push("#");
53318
+ uriTokens.push(components.fragment);
53319
+ }
53320
+ return uriTokens.join("");
53321
+ }
53322
+ var hexLookUp = Array.from({
53323
+ length: 127
53324
+ }, function(v, k) {
53325
+ return RegExp("[^!\"$&'()*+,\\-.;=_`a-z{}~]", "u").test(String.fromCharCode(k));
53326
+ });
53327
+ function nonSimpleDomain(value) {
53328
+ var code = 0;
53329
+ for(var i = 0, len = value.length; i < len; ++i){
53330
+ code = value.charCodeAt(i);
53331
+ if (code > 126 || hexLookUp[code]) {
53332
+ return true;
53040
53333
  }
53041
- if (typeof components.port === "number" || typeof components.port === "string") {
53042
- uriTokens.push(":");
53043
- uriTokens.push(String(components.port));
53044
- }
53045
- return uriTokens.length ? uriTokens.join("") : undefined;
53046
- }
53047
- var RDS1 = /^\.\.?\//;
53048
- var RDS2 = /^\/\.(\/|$)/;
53049
- var RDS3 = /^\/\.\.(\/|$)/;
53050
- var RDS5 = /^\/?(?:.|\n)*?(?=\/|$)/;
53051
- function removeDotSegments(input) {
53052
- var output = [];
53053
- while(input.length){
53054
- if (input.match(RDS1)) {
53055
- input = input.replace(RDS1, "");
53056
- } else if (input.match(RDS2)) {
53057
- input = input.replace(RDS2, "/");
53058
- } else if (input.match(RDS3)) {
53059
- input = input.replace(RDS3, "/");
53060
- output.pop();
53061
- } else if (input === "." || input === "..") {
53062
- input = "";
53334
+ }
53335
+ return false;
53336
+ }
53337
+ var URI_PARSE = RegExp("^(?:([^#/:?]+):)?(?:\\/\\/((?:([^#/?@]*)@)?(\\[[^#/?\\]]+\\]|[^#/:?]*)(?::(\\d*))?))?([^#?]*)(?:\\?([^#]*))?(?:#((?:.|[\\n\\r])*))?", "u");
53338
+ function parse(uri, opts) {
53339
+ var options = Object.assign({}, opts);
53340
+ var parsed = {
53341
+ scheme: undefined,
53342
+ userinfo: undefined,
53343
+ host: "",
53344
+ port: undefined,
53345
+ path: "",
53346
+ query: undefined,
53347
+ fragment: undefined
53348
+ };
53349
+ var gotEncoding = uri.indexOf("%") !== -1;
53350
+ var isIP = false;
53351
+ if (options.reference === "suffix") uri = (options.scheme ? options.scheme + ":" : "") + "//" + uri;
53352
+ var matches = uri.match(URI_PARSE);
53353
+ if (matches) {
53354
+ // store each component
53355
+ parsed.scheme = matches[1];
53356
+ parsed.userinfo = matches[3];
53357
+ parsed.host = matches[4];
53358
+ parsed.port = parseInt(matches[5], 10);
53359
+ parsed.path = matches[6] || "";
53360
+ parsed.query = matches[7];
53361
+ parsed.fragment = matches[8];
53362
+ // fix port number
53363
+ if (isNaN(parsed.port)) {
53364
+ parsed.port = matches[5];
53365
+ }
53366
+ if (parsed.host) {
53367
+ var ipv4result = normalizeIPv4(parsed.host);
53368
+ if (ipv4result.isIPV4 === false) {
53369
+ var ipv6result = normalizeIPv6(ipv4result.host, {
53370
+ isIPV4: false
53371
+ });
53372
+ parsed.host = ipv6result.host.toLowerCase();
53373
+ isIP = ipv6result.isIPV6;
53063
53374
  } else {
53064
- var im = input.match(RDS5);
53065
- if (im) {
53066
- var s = im[0];
53067
- input = input.slice(s.length);
53068
- output.push(s);
53069
- } else {
53070
- throw new Error("Unexpected dot segment condition");
53071
- }
53375
+ parsed.host = ipv4result.host;
53376
+ isIP = true;
53072
53377
  }
53073
53378
  }
53074
- return output.join("");
53075
- }
53076
- function serialize(components) {
53077
- var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
53078
- var protocol = options.iri ? IRI_PROTOCOL : URI_PROTOCOL;
53079
- var uriTokens = [];
53080
- //find scheme handler
53081
- var schemeHandler = SCHEMES[(options.scheme || components.scheme || "").toLowerCase()];
53082
- //perform scheme specific serialization
53083
- if (schemeHandler && schemeHandler.serialize) schemeHandler.serialize(components, options);
53084
- if (components.host) {
53085
- //if host component is an IPv6 address
53086
- if (protocol.IPV6ADDRESS.test(components.host)) ; else if (options.domainHost || schemeHandler && schemeHandler.domainHost) {
53087
- //convert IDN via punycode
53379
+ if (parsed.scheme === undefined && parsed.userinfo === undefined && parsed.host === undefined && parsed.port === undefined && !parsed.path && parsed.query === undefined) {
53380
+ parsed.reference = "same-document";
53381
+ } else if (parsed.scheme === undefined) {
53382
+ parsed.reference = "relative";
53383
+ } else if (parsed.fragment === undefined) {
53384
+ parsed.reference = "absolute";
53385
+ } else {
53386
+ parsed.reference = "uri";
53387
+ }
53388
+ // check for reference errors
53389
+ if (options.reference && options.reference !== "suffix" && options.reference !== parsed.reference) {
53390
+ parsed.error = parsed.error || "URI is not a " + options.reference + " reference.";
53391
+ }
53392
+ // find scheme handler
53393
+ var schemeHandler = SCHEMES[(options.scheme || parsed.scheme || "").toLowerCase()];
53394
+ // check if scheme can't handle IRIs
53395
+ if (!options.unicodeSupport && (!schemeHandler || !schemeHandler.unicodeSupport)) {
53396
+ // if host component is a domain name
53397
+ if (parsed.host && (options.domainHost || schemeHandler && schemeHandler.domainHost) && isIP === false && nonSimpleDomain(parsed.host)) {
53398
+ // convert Unicode IDN -> ASCII IDN
53088
53399
  try {
53089
- components.host = !options.iri ? punycode.toASCII(components.host.replace(protocol.PCT_ENCODED, pctDecChars).toLowerCase()) : punycode.toUnicode(components.host);
53400
+ parsed.host = URL.domainToASCII(parsed.host.toLowerCase());
53090
53401
  } catch (e) {
53091
- components.error = components.error || "Host's domain name can not be converted to " + (!options.iri ? "ASCII" : "Unicode") + " via punycode: " + e;
53402
+ parsed.error = parsed.error || "Host's domain name can not be converted to ASCII: " + e;
53092
53403
  }
53093
53404
  }
53405
+ // convert IRI -> URI
53094
53406
  }
53095
- //normalize encoding
53096
- _normalizeComponentEncoding(components, protocol);
53097
- if (options.reference !== "suffix" && components.scheme) {
53098
- uriTokens.push(components.scheme);
53099
- uriTokens.push(":");
53100
- }
53101
- var authority = _recomposeAuthority(components, options);
53102
- if (authority !== undefined) {
53103
- if (options.reference !== "suffix") {
53104
- uriTokens.push("//");
53407
+ if (!schemeHandler || schemeHandler && !schemeHandler.skipNormalize) {
53408
+ if (gotEncoding && parsed.scheme !== undefined) {
53409
+ parsed.scheme = unescape(parsed.scheme);
53105
53410
  }
53106
- uriTokens.push(authority);
53107
- if (components.path && components.path.charAt(0) !== "/") {
53108
- uriTokens.push("/");
53411
+ if (gotEncoding && parsed.userinfo !== undefined) {
53412
+ parsed.userinfo = unescape(parsed.userinfo);
53109
53413
  }
53110
- }
53111
- if (components.path !== undefined) {
53112
- var s = components.path;
53113
- if (!options.absolutePath && (!schemeHandler || !schemeHandler.absolutePath)) {
53114
- s = removeDotSegments(s);
53414
+ if (gotEncoding && parsed.host !== undefined) {
53415
+ parsed.host = unescape(parsed.host);
53115
53416
  }
53116
- if (authority === undefined) {
53117
- s = s.replace(/^\/\//, "/%2F"); //don't allow the path to start with "//"
53417
+ if (parsed.path !== undefined && parsed.path.length) {
53418
+ parsed.path = escape(unescape(parsed.path));
53419
+ }
53420
+ if (parsed.fragment !== undefined && parsed.fragment.length) {
53421
+ parsed.fragment = encodeURI(decodeURIComponent(parsed.fragment));
53118
53422
  }
53119
- uriTokens.push(s);
53120
- }
53121
- if (components.query !== undefined) {
53122
- uriTokens.push("?");
53123
- uriTokens.push(components.query);
53124
- }
53125
- if (components.fragment !== undefined) {
53126
- uriTokens.push("#");
53127
- uriTokens.push(components.fragment);
53128
53423
  }
53129
- return uriTokens.join(""); //merge tokens into a string
53130
- }
53131
- function resolveComponents(base, relative) {
53132
- var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
53133
- var skipNormalization = arguments[3];
53134
- var target = {};
53135
- if (!skipNormalization) {
53136
- base = parse(serialize(base, options), options); //normalize base components
53137
- relative = parse(serialize(relative, options), options); //normalize relative components
53424
+ // perform scheme specific parsing
53425
+ if (schemeHandler && schemeHandler.parse) {
53426
+ schemeHandler.parse(parsed, options);
53138
53427
  }
53139
- options = options || {};
53140
- if (!options.tolerant && relative.scheme) {
53141
- target.scheme = relative.scheme;
53142
- //target.authority = relative.authority;
53143
- target.userinfo = relative.userinfo;
53144
- target.host = relative.host;
53145
- target.port = relative.port;
53146
- target.path = removeDotSegments(relative.path || "");
53147
- target.query = relative.query;
53148
- } else {
53149
- if (relative.userinfo !== undefined || relative.host !== undefined || relative.port !== undefined) {
53150
- //target.authority = relative.authority;
53151
- target.userinfo = relative.userinfo;
53152
- target.host = relative.host;
53153
- target.port = relative.port;
53154
- target.path = removeDotSegments(relative.path || "");
53155
- target.query = relative.query;
53156
- } else {
53157
- if (!relative.path) {
53158
- target.path = base.path;
53159
- if (relative.query !== undefined) {
53160
- target.query = relative.query;
53161
- } else {
53162
- target.query = base.query;
53163
- }
53164
- } else {
53165
- if (relative.path.charAt(0) === "/") {
53166
- target.path = removeDotSegments(relative.path);
53167
- } else {
53168
- if ((base.userinfo !== undefined || base.host !== undefined || base.port !== undefined) && !base.path) {
53169
- target.path = "/" + relative.path;
53170
- } else if (!base.path) {
53171
- target.path = relative.path;
53172
- } else {
53173
- target.path = base.path.slice(0, base.path.lastIndexOf("/") + 1) + relative.path;
53174
- }
53175
- target.path = removeDotSegments(target.path);
53176
- }
53177
- target.query = relative.query;
53178
- }
53179
- //target.authority = base.authority;
53180
- target.userinfo = base.userinfo;
53181
- target.host = base.host;
53182
- target.port = base.port;
53183
- }
53184
- target.scheme = base.scheme;
53185
- }
53186
- target.fragment = relative.fragment;
53187
- return target;
53188
- }
53189
- function resolve(baseURI, relativeURI, options) {
53190
- var schemelessOptions = assign({
53191
- scheme: "null"
53192
- }, options);
53193
- return serialize(resolveComponents(parse(baseURI, schemelessOptions), parse(relativeURI, schemelessOptions), schemelessOptions, true), schemelessOptions);
53194
- }
53195
- function normalize(uri, options) {
53196
- if (typeof uri === "string") {
53197
- uri = serialize(parse(uri, options), options);
53198
- } else if (typeOf(uri) === "object") {
53199
- uri = parse(serialize(uri, options), options);
53200
- }
53201
- return uri;
53202
- }
53203
- function equal(uriA, uriB, options) {
53204
- if (typeof uriA === "string") {
53205
- uriA = serialize(parse(uriA, options), options);
53206
- } else if (typeOf(uriA) === "object") {
53207
- uriA = serialize(uriA, options);
53208
- }
53209
- if (typeof uriB === "string") {
53210
- uriB = serialize(parse(uriB, options), options);
53211
- } else if (typeOf(uriB) === "object") {
53212
- uriB = serialize(uriB, options);
53213
- }
53214
- return uriA === uriB;
53215
- }
53216
- function escapeComponent(str, options) {
53217
- return str && str.toString().replace(!options || !options.iri ? URI_PROTOCOL.ESCAPE : IRI_PROTOCOL.ESCAPE, pctEncChar);
53218
- }
53219
- function unescapeComponent(str, options) {
53220
- return str && str.toString().replace(!options || !options.iri ? URI_PROTOCOL.PCT_ENCODED : IRI_PROTOCOL.PCT_ENCODED, pctDecChars);
53221
- }
53222
- var handler = {
53223
- scheme: "http",
53224
- domainHost: true,
53225
- parse: function parse(components, options) {
53226
- //report missing host
53227
- if (!components.host) {
53228
- components.error = components.error || "HTTP URIs must have a host.";
53229
- }
53230
- return components;
53231
- },
53232
- serialize: function serialize(components, options) {
53233
- var secure = String(components.scheme).toLowerCase() === "https";
53234
- //normalize the default port
53235
- if (components.port === (secure ? 443 : 80) || components.port === "") {
53236
- components.port = undefined;
53237
- }
53238
- //normalize the empty path
53239
- if (!components.path) {
53240
- components.path = "/";
53241
- }
53242
- //NOTE: We do not parse query strings for HTTP URIs
53243
- //as WWW Form Url Encoded query strings are part of the HTML4+ spec,
53244
- //and not the HTTP spec.
53245
- return components;
53246
- }
53247
- };
53248
- var handler$1 = {
53249
- scheme: "https",
53250
- domainHost: handler.domainHost,
53251
- parse: handler.parse,
53252
- serialize: handler.serialize
53253
- };
53254
- function isSecure(wsComponents) {
53255
- return typeof wsComponents.secure === "boolean" ? wsComponents.secure : String(wsComponents.scheme).toLowerCase() === "wss";
53256
- }
53257
- //RFC 6455
53258
- var handler$2 = {
53259
- scheme: "ws",
53260
- domainHost: true,
53261
- parse: function parse(components, options) {
53262
- var wsComponents = components;
53263
- //indicate if the secure flag is set
53264
- wsComponents.secure = isSecure(wsComponents);
53265
- //construct resouce name
53266
- wsComponents.resourceName = (wsComponents.path || "/") + (wsComponents.query ? "?" + wsComponents.query : "");
53267
- wsComponents.path = undefined;
53268
- wsComponents.query = undefined;
53269
- return wsComponents;
53270
- },
53271
- serialize: function serialize(wsComponents, options) {
53272
- //normalize the default port
53273
- if (wsComponents.port === (isSecure(wsComponents) ? 443 : 80) || wsComponents.port === "") {
53274
- wsComponents.port = undefined;
53275
- }
53276
- //ensure scheme matches secure flag
53277
- if (typeof wsComponents.secure === "boolean") {
53278
- wsComponents.scheme = wsComponents.secure ? "wss" : "ws";
53279
- wsComponents.secure = undefined;
53280
- }
53281
- //reconstruct path from resource name
53282
- if (wsComponents.resourceName) {
53283
- var _wsComponents$resourc = wsComponents.resourceName.split("?"), _wsComponents$resourc2 = slicedToArray(_wsComponents$resourc, 2), path = _wsComponents$resourc2[0], query = _wsComponents$resourc2[1];
53284
- wsComponents.path = path && path !== "/" ? path : undefined;
53285
- wsComponents.query = query;
53286
- wsComponents.resourceName = undefined;
53287
- }
53288
- //forbid fragment component
53289
- wsComponents.fragment = undefined;
53290
- return wsComponents;
53291
- }
53292
- };
53293
- var handler$3 = {
53294
- scheme: "wss",
53295
- domainHost: handler$2.domainHost,
53296
- parse: handler$2.parse,
53297
- serialize: handler$2.serialize
53298
- };
53299
- var O = {};
53300
- //RFC 3986
53301
- var UNRESERVED$$ = "[A-Za-z0-9\\-\\.\\_\\~" + ("\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF" ) + "]";
53302
- var HEXDIG$$ = "[0-9A-Fa-f]"; //case-insensitive
53303
- var PCT_ENCODED$ = subexp(subexp("%[EFef]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%[89A-Fa-f]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%" + HEXDIG$$ + HEXDIG$$)); //expanded
53304
- //RFC 5322, except these symbols as per RFC 6068: @ : / ? # [ ] & ; =
53305
- //const ATEXT$$ = "[A-Za-z0-9\\!\\#\\$\\%\\&\\'\\*\\+\\-\\/\\=\\?\\^\\_\\`\\{\\|\\}\\~]";
53306
- //const WSP$$ = "[\\x20\\x09]";
53307
- //const OBS_QTEXT$$ = "[\\x01-\\x08\\x0B\\x0C\\x0E-\\x1F\\x7F]"; //(%d1-8 / %d11-12 / %d14-31 / %d127)
53308
- //const QTEXT$$ = merge("[\\x21\\x23-\\x5B\\x5D-\\x7E]", OBS_QTEXT$$); //%d33 / %d35-91 / %d93-126 / obs-qtext
53309
- //const VCHAR$$ = "[\\x21-\\x7E]";
53310
- //const WSP$$ = "[\\x20\\x09]";
53311
- //const OBS_QP$ = subexp("\\\\" + merge("[\\x00\\x0D\\x0A]", OBS_QTEXT$$)); //%d0 / CR / LF / obs-qtext
53312
- //const FWS$ = subexp(subexp(WSP$$ + "*" + "\\x0D\\x0A") + "?" + WSP$$ + "+");
53313
- //const QUOTED_PAIR$ = subexp(subexp("\\\\" + subexp(VCHAR$$ + "|" + WSP$$)) + "|" + OBS_QP$);
53314
- //const QUOTED_STRING$ = subexp('\\"' + subexp(FWS$ + "?" + QCONTENT$) + "*" + FWS$ + "?" + '\\"');
53315
- var ATEXT$$ = "[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]";
53316
- var QTEXT$$ = "[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]";
53317
- var VCHAR$$ = merge(QTEXT$$, '[\\"\\\\]');
53318
- var SOME_DELIMS$$ = "[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]";
53319
- var UNRESERVED = new RegExp(UNRESERVED$$, "g");
53320
- var PCT_ENCODED = new RegExp(PCT_ENCODED$, "g");
53321
- var NOT_LOCAL_PART = new RegExp(merge("[^]", ATEXT$$, "[\\.]", '[\\"]', VCHAR$$), "g");
53322
- var NOT_HFNAME = new RegExp(merge("[^]", UNRESERVED$$, SOME_DELIMS$$), "g");
53323
- var NOT_HFVALUE = NOT_HFNAME;
53324
- function decodeUnreserved(str) {
53325
- var decStr = pctDecChars(str);
53326
- return !decStr.match(UNRESERVED) ? str : decStr;
53327
- }
53328
- var handler$4 = {
53329
- scheme: "mailto",
53330
- parse: function parse$$1(components, options) {
53331
- var mailtoComponents = components;
53332
- var to = mailtoComponents.to = mailtoComponents.path ? mailtoComponents.path.split(",") : [];
53333
- mailtoComponents.path = undefined;
53334
- if (mailtoComponents.query) {
53335
- var unknownHeaders = false;
53336
- var headers = {};
53337
- var hfields = mailtoComponents.query.split("&");
53338
- for(var x = 0, xl = hfields.length; x < xl; ++x){
53339
- var hfield = hfields[x].split("=");
53340
- switch(hfield[0]){
53341
- case "to":
53342
- var toAddrs = hfield[1].split(",");
53343
- for(var _x = 0, _xl = toAddrs.length; _x < _xl; ++_x){
53344
- to.push(toAddrs[_x]);
53345
- }
53346
- break;
53347
- case "subject":
53348
- mailtoComponents.subject = unescapeComponent(hfield[1], options);
53349
- break;
53350
- case "body":
53351
- mailtoComponents.body = unescapeComponent(hfield[1], options);
53352
- break;
53353
- default:
53354
- unknownHeaders = true;
53355
- headers[unescapeComponent(hfield[0], options)] = unescapeComponent(hfield[1], options);
53356
- break;
53357
- }
53358
- }
53359
- if (unknownHeaders) mailtoComponents.headers = headers;
53360
- }
53361
- mailtoComponents.query = undefined;
53362
- for(var _x2 = 0, _xl2 = to.length; _x2 < _xl2; ++_x2){
53363
- var addr = to[_x2].split("@");
53364
- addr[0] = unescapeComponent(addr[0]);
53365
- if (!options.unicodeSupport) {
53366
- //convert Unicode IDN -> ASCII IDN
53367
- try {
53368
- addr[1] = punycode.toASCII(unescapeComponent(addr[1], options).toLowerCase());
53369
- } catch (e) {
53370
- mailtoComponents.error = mailtoComponents.error || "Email address's domain name can not be converted to ASCII via punycode: " + e;
53371
- }
53372
- } else {
53373
- addr[1] = unescapeComponent(addr[1], options).toLowerCase();
53374
- }
53375
- to[_x2] = addr.join("@");
53376
- }
53377
- return mailtoComponents;
53378
- },
53379
- serialize: function serialize$$1(mailtoComponents, options) {
53380
- var components = mailtoComponents;
53381
- var to = toArray(mailtoComponents.to);
53382
- if (to) {
53383
- for(var x = 0, xl = to.length; x < xl; ++x){
53384
- var toAddr = String(to[x]);
53385
- var atIdx = toAddr.lastIndexOf("@");
53386
- var localPart = toAddr.slice(0, atIdx).replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_LOCAL_PART, pctEncChar);
53387
- var domain = toAddr.slice(atIdx + 1);
53388
- //convert IDN via punycode
53389
- try {
53390
- domain = !options.iri ? punycode.toASCII(unescapeComponent(domain, options).toLowerCase()) : punycode.toUnicode(domain);
53391
- } catch (e) {
53392
- components.error = components.error || "Email address's domain name can not be converted to " + (!options.iri ? "ASCII" : "Unicode") + " via punycode: " + e;
53393
- }
53394
- to[x] = localPart + "@" + domain;
53395
- }
53396
- components.path = to.join(",");
53397
- }
53398
- var headers = mailtoComponents.headers = mailtoComponents.headers || {};
53399
- if (mailtoComponents.subject) headers["subject"] = mailtoComponents.subject;
53400
- if (mailtoComponents.body) headers["body"] = mailtoComponents.body;
53401
- var fields = [];
53402
- for(var name in headers){
53403
- if (headers[name] !== O[name]) {
53404
- 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));
53405
- }
53406
- }
53407
- if (fields.length) {
53408
- components.query = fields.join("&");
53409
- }
53410
- return components;
53411
- }
53412
- };
53413
- var URN_PARSE = /^([^\:]+)\:(.*)/;
53414
- //RFC 2141
53415
- var handler$5 = {
53416
- scheme: "urn",
53417
- parse: function parse$$1(components, options) {
53418
- var matches = components.path && components.path.match(URN_PARSE);
53419
- var urnComponents = components;
53420
- if (matches) {
53421
- var scheme = options.scheme || urnComponents.scheme || "urn";
53422
- var nid = matches[1].toLowerCase();
53423
- var nss = matches[2];
53424
- var urnScheme = scheme + ":" + (options.nid || nid);
53425
- var schemeHandler = SCHEMES[urnScheme];
53426
- urnComponents.nid = nid;
53427
- urnComponents.nss = nss;
53428
- urnComponents.path = undefined;
53429
- if (schemeHandler) {
53430
- urnComponents = schemeHandler.parse(urnComponents, options);
53431
- }
53432
- } else {
53433
- urnComponents.error = urnComponents.error || "URN can not be parsed.";
53434
- }
53435
- return urnComponents;
53436
- },
53437
- serialize: function serialize$$1(urnComponents, options) {
53438
- var scheme = options.scheme || urnComponents.scheme || "urn";
53439
- var nid = urnComponents.nid;
53440
- var urnScheme = scheme + ":" + (options.nid || nid);
53441
- var schemeHandler = SCHEMES[urnScheme];
53442
- if (schemeHandler) {
53443
- urnComponents = schemeHandler.serialize(urnComponents, options);
53444
- }
53445
- var uriComponents = urnComponents;
53446
- var nss = urnComponents.nss;
53447
- uriComponents.path = (nid || options.nid) + ":" + nss;
53448
- return uriComponents;
53449
- }
53450
- };
53451
- var UUID = /^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/;
53452
- //RFC 4122
53453
- var handler$6 = {
53454
- scheme: "urn:uuid",
53455
- parse: function parse(urnComponents, options) {
53456
- var uuidComponents = urnComponents;
53457
- uuidComponents.uuid = uuidComponents.nss;
53458
- uuidComponents.nss = undefined;
53459
- if (!options.tolerant && (!uuidComponents.uuid || !uuidComponents.uuid.match(UUID))) {
53460
- uuidComponents.error = uuidComponents.error || "UUID is not valid.";
53461
- }
53462
- return uuidComponents;
53463
- },
53464
- serialize: function serialize(uuidComponents, options) {
53465
- var urnComponents = uuidComponents;
53466
- //normalize UUID
53467
- urnComponents.nss = (uuidComponents.uuid || "").toLowerCase();
53468
- return urnComponents;
53469
- }
53470
- };
53471
- SCHEMES[handler.scheme] = handler;
53472
- SCHEMES[handler$1.scheme] = handler$1;
53473
- SCHEMES[handler$2.scheme] = handler$2;
53474
- SCHEMES[handler$3.scheme] = handler$3;
53475
- SCHEMES[handler$4.scheme] = handler$4;
53476
- SCHEMES[handler$5.scheme] = handler$5;
53477
- SCHEMES[handler$6.scheme] = handler$6;
53478
- exports1.SCHEMES = SCHEMES;
53479
- exports1.pctEncChar = pctEncChar;
53480
- exports1.pctDecChars = pctDecChars;
53481
- exports1.parse = parse;
53482
- exports1.removeDotSegments = removeDotSegments;
53483
- exports1.serialize = serialize;
53484
- exports1.resolveComponents = resolveComponents;
53485
- exports1.resolve = resolve;
53486
- exports1.normalize = normalize;
53487
- exports1.equal = equal;
53488
- exports1.escapeComponent = escapeComponent;
53489
- exports1.unescapeComponent = unescapeComponent;
53490
- Object.defineProperty(exports1, "__esModule", {
53491
- value: true
53492
- });
53493
- });
53494
- }(uri_all, uri_all.exports));
53428
+ } else {
53429
+ parsed.error = parsed.error || "URI can not be parsed.";
53430
+ }
53431
+ return parsed;
53432
+ }
53433
+ var fastUri = {
53434
+ SCHEMES: SCHEMES,
53435
+ normalize: normalize,
53436
+ resolve: resolve,
53437
+ resolveComponents: resolveComponents,
53438
+ equal: equal$2,
53439
+ serialize: serialize,
53440
+ parse: parse
53441
+ };
53442
+ fastUri$1.exports = fastUri;
53443
+ fastUri$1.exports.default = fastUri;
53444
+ fastUri$1.exports.fastUri = fastUri;
53495
53445
 
53496
53446
  Object.defineProperty(uri$1, "__esModule", {
53497
53447
  value: true
53498
53448
  });
53499
- var uri = uri_all.exports;
53449
+ var uri = fastUri$1.exports;
53500
53450
  uri.code = 'require("ajv/dist/runtime/uri").default';
53501
53451
  uri$1.default = uri;
53502
53452
 
@@ -53760,7 +53710,7 @@ var ref_error_1 = ref_error;
53760
53710
  var rules_1 = rules;
53761
53711
  var compile_1 = compile;
53762
53712
  var codegen_2 = codegen;
53763
- var resolve_1 = resolve$1;
53713
+ var resolve_1 = resolve$2;
53764
53714
  var dataType_1 = dataType;
53765
53715
  var util_1 = util;
53766
53716
  var $dataRefSchema = require$$9;