jodit 4.2.27 → 4.2.32

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 (156) hide show
  1. package/.nvmrc +1 -1
  2. package/CHANGELOG.md +104 -5
  3. package/es2015/jodit.css +11 -1
  4. package/es2015/jodit.fat.min.css +1 -1
  5. package/es2015/jodit.fat.min.js +2 -2
  6. package/es2015/jodit.js +330 -230
  7. package/es2015/jodit.min.css +1 -1
  8. package/es2015/jodit.min.js +2 -2
  9. package/es2015/plugins/debug/debug.js +1 -1
  10. package/es2015/plugins/debug/debug.min.js +1 -1
  11. package/es2015/plugins/speech-recognize/speech-recognize.css +1 -1
  12. package/es2015/plugins/speech-recognize/speech-recognize.js +25 -18
  13. package/es2015/plugins/speech-recognize/speech-recognize.min.js +2 -2
  14. package/es2018/jodit.css +11 -1
  15. package/es2018/jodit.fat.min.css +1 -1
  16. package/es2018/jodit.fat.min.js +2 -2
  17. package/es2018/jodit.js +324 -224
  18. package/es2018/jodit.min.css +1 -1
  19. package/es2018/jodit.min.js +2 -2
  20. package/es2018/plugins/debug/debug.js +1 -1
  21. package/es2018/plugins/debug/debug.min.js +1 -1
  22. package/es2018/plugins/speech-recognize/speech-recognize.css +1 -1
  23. package/es2018/plugins/speech-recognize/speech-recognize.js +25 -18
  24. package/es2018/plugins/speech-recognize/speech-recognize.min.js +2 -2
  25. package/es2021/jodit.css +11 -1
  26. package/es2021/jodit.fat.min.css +1 -1
  27. package/es2021/jodit.fat.min.js +2 -2
  28. package/es2021/jodit.js +324 -224
  29. package/es2021/jodit.min.css +1 -1
  30. package/es2021/jodit.min.js +2 -2
  31. package/es2021/plugins/debug/debug.js +1 -1
  32. package/es2021/plugins/debug/debug.min.js +1 -1
  33. package/es2021/plugins/speech-recognize/speech-recognize.css +1 -1
  34. package/es2021/plugins/speech-recognize/speech-recognize.js +25 -18
  35. package/es2021/plugins/speech-recognize/speech-recognize.min.js +2 -2
  36. package/es2021.en/jodit.css +11 -1
  37. package/es2021.en/jodit.fat.min.css +1 -1
  38. package/es2021.en/jodit.fat.min.js +2 -2
  39. package/es2021.en/jodit.js +299 -218
  40. package/es2021.en/jodit.min.css +1 -1
  41. package/es2021.en/jodit.min.js +2 -2
  42. package/es2021.en/plugins/debug/debug.js +1 -1
  43. package/es2021.en/plugins/debug/debug.min.js +1 -1
  44. package/es2021.en/plugins/speech-recognize/speech-recognize.css +1 -1
  45. package/es2021.en/plugins/speech-recognize/speech-recognize.js +25 -18
  46. package/es2021.en/plugins/speech-recognize/speech-recognize.min.js +2 -2
  47. package/es5/164.fat.min.js +10 -0
  48. package/es5/164.js +4939 -0
  49. package/es5/164.min.js +10 -0
  50. package/es5/5.fat.min.js +10 -0
  51. package/es5/5.js +76 -0
  52. package/es5/5.min.js +10 -0
  53. package/es5/jodit.css +12 -2
  54. package/es5/jodit.fat.min.css +1 -1
  55. package/es5/jodit.fat.min.js +2 -2
  56. package/es5/jodit.js +753 -5684
  57. package/es5/jodit.min.css +3 -3
  58. package/es5/jodit.min.js +2 -2
  59. package/es5/plugins/debug/debug.js +1 -1
  60. package/es5/plugins/debug/debug.min.js +1 -1
  61. package/es5/plugins/speech-recognize/speech-recognize.css +1 -1
  62. package/es5/plugins/speech-recognize/speech-recognize.js +26 -19
  63. package/es5/plugins/speech-recognize/speech-recognize.min.js +2 -2
  64. package/esm/config.js +3 -7
  65. package/esm/core/async/async.js +2 -1
  66. package/esm/core/constants.d.ts +2 -0
  67. package/esm/core/constants.js +10 -6
  68. package/esm/core/decorators/watch/watch.js +0 -1
  69. package/esm/core/dom/dom.js +2 -2
  70. package/esm/core/event-emitter/event-emitter.js +3 -3
  71. package/esm/core/global.js +13 -3
  72. package/esm/core/helpers/array/to-array.d.ts +1 -6
  73. package/esm/core/helpers/array/to-array.js +1 -1
  74. package/esm/core/helpers/async/set-timeout.d.ts +0 -3
  75. package/esm/core/helpers/async/set-timeout.js +3 -2
  76. package/esm/core/helpers/checker/has-browser-color-picker.d.ts +0 -3
  77. package/esm/core/helpers/checker/has-browser-color-picker.js +2 -1
  78. package/esm/core/helpers/checker/is-url.d.ts +0 -3
  79. package/esm/core/helpers/checker/is-url.js +2 -1
  80. package/esm/core/helpers/html/apply-styles.js +3 -3
  81. package/esm/core/helpers/html/clean-from-word.js +2 -1
  82. package/esm/core/helpers/html/htmlspecialchars.d.ts +0 -3
  83. package/esm/core/helpers/html/htmlspecialchars.js +2 -1
  84. package/esm/core/helpers/normalize/normalize-size.d.ts +1 -1
  85. package/esm/core/helpers/size/get-scroll-parent.js +3 -2
  86. package/esm/core/helpers/utils/complete-url.js +2 -1
  87. package/esm/core/helpers/utils/convert-media-url-to-video-embed.js +2 -1
  88. package/esm/core/helpers/utils/default-language.js +3 -2
  89. package/esm/core/helpers/utils/reset.js +3 -3
  90. package/esm/core/request/ajax.js +2 -1
  91. package/esm/core/selection/selection.js +1 -0
  92. package/esm/core/selection/style/api/has-same-style.js +15 -10
  93. package/esm/core/selection/style/api/toggle-attributes.js +2 -1
  94. package/esm/core/selection/style/commit-style.d.ts +1 -1
  95. package/esm/core/ui/form/inputs/file/file.d.ts +1 -0
  96. package/esm/core/ui/form/inputs/file/file.js +1 -0
  97. package/esm/core/ui/form/validators/input.d.ts +3 -3
  98. package/esm/core/ui/form/validators/select.d.ts +1 -1
  99. package/esm/jodit.js +3 -0
  100. package/esm/modules/file-browser/config.js +9 -1
  101. package/esm/modules/file-browser/data-provider.js +0 -1
  102. package/esm/modules/file-browser/file-browser.js +0 -1
  103. package/esm/modules/table/table.js +0 -1
  104. package/esm/modules/toolbar/button/button.d.ts +1 -1
  105. package/esm/plugins/backspace/cases/check-remove-char.js +1 -0
  106. package/esm/plugins/clean-html/config.d.ts +3 -3
  107. package/esm/plugins/iframe/config.d.ts +15 -3
  108. package/esm/plugins/iframe/config.js +1 -0
  109. package/esm/plugins/iframe/iframe.js +3 -0
  110. package/esm/plugins/indent/helpers.d.ts +1 -1
  111. package/esm/plugins/inline-popup/config/items/a.d.ts +2 -2
  112. package/esm/plugins/inline-popup/config/items/cells.d.ts +1 -1
  113. package/esm/plugins/inline-popup/config/items/img.d.ts +1 -1
  114. package/esm/plugins/search/config.js +2 -2
  115. package/esm/plugins/search/helpers/highlight-text-ranges.js +3 -1
  116. package/esm/plugins/source/editor/engines/ace.d.ts +0 -1
  117. package/esm/plugins/speech-recognize/config.js +1 -1
  118. package/esm/plugins/speech-recognize/helpers/api.d.ts +1 -1
  119. package/esm/plugins/speech-recognize/helpers/api.js +5 -2
  120. package/esm/plugins/speech-recognize/helpers/sound.js +6 -4
  121. package/esm/plugins/stat/config.d.ts +1 -0
  122. package/esm/plugins/stat/config.js +1 -0
  123. package/esm/plugins/stat/stat.js +14 -3
  124. package/esm/plugins/symbols/langs/index.d.ts +2 -1
  125. package/esm/plugins/symbols/langs/index.js +2 -1
  126. package/esm/plugins/symbols/langs/ua.d.ts +1 -0
  127. package/esm/plugins/symbols/langs/ua.js +9 -0
  128. package/esm/polyfills.d.ts +10 -0
  129. package/esm/polyfills.js +54 -0
  130. package/esm/tsconfig.json +1 -1
  131. package/package.json +1 -1
  132. package/types/core/constants.d.ts +2 -0
  133. package/types/core/helpers/array/to-array.d.ts +1 -6
  134. package/types/core/helpers/async/set-timeout.d.ts +0 -3
  135. package/types/core/helpers/checker/has-browser-color-picker.d.ts +0 -3
  136. package/types/core/helpers/checker/is-url.d.ts +0 -3
  137. package/types/core/helpers/html/htmlspecialchars.d.ts +0 -3
  138. package/types/core/helpers/normalize/normalize-size.d.ts +1 -1
  139. package/types/core/selection/style/commit-style.d.ts +1 -1
  140. package/types/core/ui/form/inputs/file/file.d.ts +1 -0
  141. package/types/core/ui/form/validators/input.d.ts +3 -3
  142. package/types/core/ui/form/validators/select.d.ts +1 -1
  143. package/types/modules/toolbar/button/button.d.ts +1 -1
  144. package/types/plugins/clean-html/config.d.ts +3 -3
  145. package/types/plugins/iframe/config.d.ts +15 -3
  146. package/types/plugins/indent/helpers.d.ts +1 -1
  147. package/types/plugins/inline-popup/config/items/a.d.ts +2 -2
  148. package/types/plugins/inline-popup/config/items/cells.d.ts +1 -1
  149. package/types/plugins/inline-popup/config/items/img.d.ts +1 -1
  150. package/types/plugins/source/editor/engines/ace.d.ts +0 -1
  151. package/types/plugins/speech-recognize/helpers/api.d.ts +1 -1
  152. package/types/plugins/stat/config.d.ts +1 -0
  153. package/types/plugins/symbols/langs/index.d.ts +2 -1
  154. package/types/plugins/symbols/langs/ua.d.ts +1 -0
  155. package/types/polyfills.d.ts +10 -0
  156. package/types/tsconfig.json +1 -1
package/es2021/jodit.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * jodit - Jodit is an awesome and useful wysiwyg editor with filebrowser
3
3
  * Author: Chupurnov <chupurnov@gmail.com> (https://xdsoft.net/jodit/)
4
- * Version: v4.2.27
4
+ * Version: v4.2.32
5
5
  * Url: https://xdsoft.net/jodit/
6
6
  * License(s): MIT
7
7
  */
@@ -247,16 +247,12 @@ class Config {
247
247
  showPlaceholder: false
248
248
  }
249
249
  };
250
- this.ownerDocument = (typeof document !== 'undefined'
251
- ? document
252
- : null);
250
+ this.ownerDocument = jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalDocument;
253
251
  /**
254
252
  * Allows you to specify the window in which the editor will be created. Default - window
255
253
  * This is necessary if you are creating the editor inside an iframe but the code is running in the parent window
256
254
  */
257
- this.ownerWindow = (typeof window !== 'undefined'
258
- ? window
259
- : null);
255
+ this.ownerWindow = jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalWindow;
260
256
  /**
261
257
  * Shadow root if Jodit was created in it
262
258
  *
@@ -1030,16 +1026,16 @@ Config.prototype.controls = {};
1030
1026
  /* harmony export */ j: function() { return /* binding */ Async; }
1031
1027
  /* harmony export */ });
1032
1028
  /* harmony import */ var jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17352);
1033
- /* harmony import */ var jodit_core_helpers_async__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(59146);
1029
+ /* harmony import */ var jodit_core_helpers_async__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(89044);
1034
1030
  /* harmony import */ var jodit_core_helpers_checker_is_abort_error__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(99951);
1035
1031
  /* harmony import */ var jodit_core_helpers_checker_is_function__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(69052);
1036
- /* harmony import */ var jodit_core_helpers_checker_is_number__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(2461);
1032
+ /* harmony import */ var jodit_core_helpers_checker_is_number__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(2461);
1037
1033
  /* harmony import */ var jodit_core_helpers_checker_is_plain_object__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(25376);
1038
1034
  /* harmony import */ var jodit_core_helpers_checker_is_promise__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(92039);
1039
1035
  /* harmony import */ var jodit_core_helpers_checker_is_string__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(98253);
1040
- /* harmony import */ var jodit_core_helpers_checker_is_void__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(35642);
1041
- /* harmony import */ var jodit_core_helpers_utils_assert__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(28712);
1042
- /* harmony import */ var jodit_core_helpers_utils_assert__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(jodit_core_helpers_utils_assert__WEBPACK_IMPORTED_MODULE_1__);
1036
+ /* harmony import */ var jodit_core_helpers_checker_is_void__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(35642);
1037
+ /* harmony import */ var jodit_core_helpers_utils_assert__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(28712);
1038
+ /* harmony import */ var jodit_core_helpers_utils_assert__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(jodit_core_helpers_utils_assert__WEBPACK_IMPORTED_MODULE_2__);
1043
1039
  /* harmony import */ var jodit_core_helpers_utils_error_errors_abort_error__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(21567);
1044
1040
  /*!
1045
1041
  * Jodit Editor (https://xdsoft.net/jodit/)
@@ -1090,17 +1086,18 @@ class Async {
1090
1086
  return 0;
1091
1087
  }
1092
1088
  let options = {};
1093
- if ((0,jodit_core_helpers_checker_is_void__WEBPACK_IMPORTED_MODULE_2__/* .isVoid */ .R)(timeout)) {
1089
+ if ((0,jodit_core_helpers_checker_is_void__WEBPACK_IMPORTED_MODULE_3__/* .isVoid */ .R)(timeout)) {
1094
1090
  timeout = 0;
1095
1091
  }
1096
- if (!(0,jodit_core_helpers_checker_is_number__WEBPACK_IMPORTED_MODULE_3__/* .isNumber */ .E)(timeout)) {
1092
+ if (!(0,jodit_core_helpers_checker_is_number__WEBPACK_IMPORTED_MODULE_4__/* .isNumber */ .E)(timeout)) {
1097
1093
  options = timeout;
1098
1094
  timeout = options.timeout || 0;
1099
1095
  }
1100
1096
  if (options.label) {
1101
1097
  this.clearLabel(options.label);
1102
1098
  }
1103
- const timer = (0,jodit_core_helpers_async__WEBPACK_IMPORTED_MODULE_4__/* .setTimeout */ .w)(callback, timeout, ...args), key = options.label || timer;
1099
+ const timer = (0,jodit_core_helpers_async__WEBPACK_IMPORTED_MODULE_1__/* .setTimeout */ .w)(callback, timeout, ...args);
1100
+ const key = options.label || timer;
1104
1101
  this.timers.set(key, timer);
1105
1102
  this.__callbacks.set(key, callback);
1106
1103
  return timer;
@@ -1116,7 +1113,7 @@ class Async {
1116
1113
  }
1117
1114
  clearLabel(label) {
1118
1115
  if (label && this.timers.has(label)) {
1119
- (0,jodit_core_helpers_async__WEBPACK_IMPORTED_MODULE_4__/* .clearTimeout */ .D)(this.timers.get(label));
1116
+ (0,jodit_core_helpers_async__WEBPACK_IMPORTED_MODULE_1__/* .clearTimeout */ .D)(this.timers.get(label));
1120
1117
  this.timers.delete(label);
1121
1118
  this.__callbacks.delete(label);
1122
1119
  }
@@ -1125,7 +1122,7 @@ class Async {
1125
1122
  if ((0,jodit_core_helpers_checker_is_string__WEBPACK_IMPORTED_MODULE_5__/* .isString */ .K)(timerOrLabel)) {
1126
1123
  return this.clearLabel(timerOrLabel);
1127
1124
  }
1128
- (0,jodit_core_helpers_async__WEBPACK_IMPORTED_MODULE_4__/* .clearTimeout */ .D)(timerOrLabel);
1125
+ (0,jodit_core_helpers_async__WEBPACK_IMPORTED_MODULE_1__/* .clearTimeout */ .D)(timerOrLabel);
1129
1126
  this.timers.delete(timerOrLabel);
1130
1127
  this.__callbacks.delete(timerOrLabel);
1131
1128
  }
@@ -1167,7 +1164,7 @@ class Async {
1167
1164
  if (!timer && firstCallImmediately) {
1168
1165
  callFn(...args);
1169
1166
  }
1170
- (0,jodit_core_helpers_async__WEBPACK_IMPORTED_MODULE_4__/* .clearTimeout */ .D)(timer);
1167
+ (0,jodit_core_helpers_async__WEBPACK_IMPORTED_MODULE_1__/* .clearTimeout */ .D)(timer);
1171
1168
  timer = this.setTimeout(() => callFn(...args), (0,jodit_core_helpers_checker_is_function__WEBPACK_IMPORTED_MODULE_7__/* .isFunction */ .T)(timeout) ? timeout() : timeout);
1172
1169
  this.timers.set(fn, timer);
1173
1170
  }
@@ -1321,7 +1318,7 @@ class Async {
1321
1318
  clear() {
1322
1319
  this.requestsIdle.forEach(key => this.cancelIdleCallback(key));
1323
1320
  this.requestsRaf.forEach(key => this.cancelAnimationFrame(key));
1324
- this.timers.forEach(key => (0,jodit_core_helpers_async__WEBPACK_IMPORTED_MODULE_4__/* .clearTimeout */ .D)(this.timers.get(key)));
1321
+ this.timers.forEach(key => (0,jodit_core_helpers_async__WEBPACK_IMPORTED_MODULE_1__/* .clearTimeout */ .D)(this.timers.get(key)));
1325
1322
  this.timers.clear();
1326
1323
  this.promisesRejections.forEach(reject => reject());
1327
1324
  this.promisesRejections.clear();
@@ -1730,6 +1727,8 @@ __webpack_require__.r(__webpack_exports__);
1730
1727
  /* harmony export */ TEXT_PLAIN: function() { return /* binding */ TEXT_PLAIN; },
1731
1728
  /* harmony export */ TEXT_RTF: function() { return /* binding */ TEXT_RTF; },
1732
1729
  /* harmony export */ TOKENS: function() { return /* binding */ TOKENS; },
1730
+ /* harmony export */ globalDocument: function() { return /* binding */ globalDocument; },
1731
+ /* harmony export */ globalWindow: function() { return /* binding */ globalWindow; },
1733
1732
  /* harmony export */ lang: function() { return /* binding */ lang; }
1734
1733
  /* harmony export */ });
1735
1734
  /*!
@@ -1737,7 +1736,7 @@ __webpack_require__.r(__webpack_exports__);
1737
1736
  * Released under MIT see LICENSE.txt in the project root for license information.
1738
1737
  * Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
1739
1738
  */
1740
- const APP_VERSION = "4.2.27";
1739
+ const APP_VERSION = "4.2.32";
1741
1740
  // prettier-ignore
1742
1741
  const ES = "es2021";
1743
1742
  const IS_ES_MODERN = true;
@@ -1756,6 +1755,10 @@ const INVISIBLE_SPACE_REG_EXP_START = () => /^[\uFEFF]+/g;
1756
1755
  const SPACE_REG_EXP = () => /[\s\n\t\r\uFEFF\u200b]+/g;
1757
1756
  const SPACE_REG_EXP_START = () => /^[\s\n\t\r\uFEFF\u200b]+/g;
1758
1757
  const SPACE_REG_EXP_END = () => /[\s\n\t\r\uFEFF\u200b]+$/g;
1758
+ const globalWindow = typeof window !== 'undefined' ? window : undefined;
1759
+ const globalDocument = typeof document !== 'undefined'
1760
+ ? document
1761
+ : undefined;
1759
1762
  const IS_BLOCK = /^(ADDRESS|ARTICLE|ASIDE|BLOCKQUOTE|CANVAS|DD|DFN|DIV|DL|DT|FIELDSET|FIGCAPTION|FIGURE|FOOTER|FORM|H[1-6]|HEADER|HGROUP|HR|LI|MAIN|NAV|NOSCRIPT|OUTPUT|P|PRE|RUBY|SCRIPT|STYLE|OBJECT|OL|SECTION|IFRAME|JODIT|JODIT-MEDIA|UL|TR|TD|TH|TBODY|THEAD|TFOOT|TABLE|BODY|HTML|VIDEO)$/i;
1760
1763
  const IS_INLINE = /^(STRONG|SPAN|I|EM|B|SUP|SUB|A|U)$/i;
1761
1764
  const LIST_TAGS = new Set(['ul', 'ol']);
@@ -1880,8 +1883,8 @@ const INSERT_AS_TEXT = 'insert_as_text';
1880
1883
  */
1881
1884
  const INSERT_ONLY_TEXT = 'insert_only_text';
1882
1885
  const SAFE_COUNT_CHANGE_CALL = 10;
1883
- const IS_MAC = typeof window !== 'undefined' &&
1884
- /Mac|iPod|iPhone|iPad/.test(window.navigator.platform);
1886
+ const IS_MAC = typeof globalWindow !== 'undefined' &&
1887
+ /Mac|iPod|iPhone|iPad/.test(globalWindow.navigator.platform);
1885
1888
  const KEY_ALIASES = {
1886
1889
  add: '+',
1887
1890
  break: 'pause',
@@ -1909,7 +1912,7 @@ const BASE_PATH = (() => {
1909
1912
  if (typeof document === 'undefined') {
1910
1913
  return '';
1911
1914
  }
1912
- const script = document.currentScript, removeScriptName = (s) => {
1915
+ const script = globalDocument.currentScript, removeScriptName = (s) => {
1913
1916
  const parts = s.split('/');
1914
1917
  if (/\.js/.test(parts[parts.length - 1])) {
1915
1918
  return parts.slice(0, parts.length - 1).join('/') + '/';
@@ -1919,11 +1922,11 @@ const BASE_PATH = (() => {
1919
1922
  if (script) {
1920
1923
  return removeScriptName(script.src);
1921
1924
  }
1922
- const scripts = document.querySelectorAll('script[src]');
1925
+ const scripts = globalDocument.querySelectorAll('script[src]');
1923
1926
  if (scripts && scripts.length) {
1924
1927
  return removeScriptName(scripts[scripts.length - 1].src);
1925
1928
  }
1926
- return window.location.href;
1929
+ return globalWindow.location.href;
1927
1930
  })();
1928
1931
  const TEMP_ATTR = 'data-jodit-temp';
1929
1932
  const lang = {};
@@ -2667,7 +2670,6 @@ function watch(observeFields, opts) {
2667
2670
  const [objectPath, eventName] = field.split(':');
2668
2671
  let ctx = context;
2669
2672
  if (objectPath.length) {
2670
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
2671
2673
  ctx = component.get(objectPath);
2672
2674
  }
2673
2675
  if ((0,jodit_core_helpers_checker_is_function__WEBPACK_IMPORTED_MODULE_3__/* .isFunction */ .T)(ctx)) {
@@ -3328,7 +3330,7 @@ class Dom {
3328
3330
  * Move all content to another element
3329
3331
  */
3330
3332
  static moveContent(from, to, inStart = false, filter = () => true) {
3331
- const fragment = (from.ownerDocument || document).createDocumentFragment();
3333
+ const fragment = (from.ownerDocument || jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalDocument).createDocumentFragment();
3332
3334
  (0,jodit_core_helpers_array_to_array__WEBPACK_IMPORTED_MODULE_1__/* .toArray */ .$)(from.childNodes)
3333
3335
  .filter(elm => {
3334
3336
  if (filter(elm)) {
@@ -3785,7 +3787,7 @@ class EventEmitter {
3785
3787
  passive: true,
3786
3788
  capture: options?.capture ?? false
3787
3789
  }
3788
- : options?.capture ?? false;
3790
+ : (options?.capture ?? false);
3789
3791
  syntheticCallback.options = eOpts;
3790
3792
  subject.addEventListener(event, syntheticCallback, eOpts);
3791
3793
  this.__memoryDOMSubjectToHandler(subject, syntheticCallback);
@@ -4016,7 +4018,7 @@ class EventEmitter {
4016
4018
  this.__domEventsMap = new Map();
4017
4019
  this.__mutedEvents = new Set();
4018
4020
  this.__key = '__JoditEventEmitterNamespaces';
4019
- this.__doc = document;
4021
+ this.__doc = jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalDocument;
4020
4022
  this.__prepareEvent = (e) => {
4021
4023
  if (e.cancelBubble) {
4022
4024
  return;
@@ -4510,9 +4512,19 @@ function getContainer(jodit, classFunc, tag = 'div', createInsideEditor = false)
4510
4512
  const view = (0,jodit_core_helpers_checker_is_view_object__WEBPACK_IMPORTED_MODULE_6__/* .isViewObject */ .h)(jodit) ? jodit : jodit.j;
4511
4513
  if (!data[key]) {
4512
4514
  let c = view.c;
4513
- let body = (0,jodit_core_helpers_checker_is_jodit_object__WEBPACK_IMPORTED_MODULE_7__/* .isJoditObject */ .y)(jodit) && jodit.o.shadowRoot
4514
- ? jodit.o.shadowRoot
4515
- : jodit.od.body;
4515
+ let body;
4516
+ if ((0,jodit_core_helpers_checker_is_jodit_object__WEBPACK_IMPORTED_MODULE_7__/* .isJoditObject */ .y)(jodit) && jodit.o.shadowRoot) {
4517
+ body = jodit.o.shadowRoot;
4518
+ }
4519
+ else {
4520
+ body = jodit.od.body;
4521
+ if ((0,jodit_core_helpers_checker_is_jodit_object__WEBPACK_IMPORTED_MODULE_7__/* .isJoditObject */ .y)(jodit)) {
4522
+ const dialog = _dom__WEBPACK_IMPORTED_MODULE_3__/* .Dom */ .J.closest(jodit.container, 'dialog', jodit.od.body);
4523
+ if (dialog) {
4524
+ body = dialog;
4525
+ }
4526
+ }
4527
+ }
4516
4528
  if (createInsideEditor &&
4517
4529
  (0,jodit_core_helpers_checker_is_jodit_object__WEBPACK_IMPORTED_MODULE_7__/* .isJoditObject */ .y)(jodit) &&
4518
4530
  jodit.od !== jodit.ed) {
@@ -4666,7 +4678,7 @@ function splitArray(a) {
4666
4678
  const toArray = function toArray(...args) {
4667
4679
  const func = (0,jodit_core_helpers_checker_is_native_function__WEBPACK_IMPORTED_MODULE_1__/* .isNativeFunction */ .a)(Array.from)
4668
4680
  ? Array.from
4669
- : (0,jodit_core_helpers_utils_reset__WEBPACK_IMPORTED_MODULE_0__/* .reset */ .c)('Array.from') ?? Array.from;
4681
+ : ((0,jodit_core_helpers_utils_reset__WEBPACK_IMPORTED_MODULE_0__/* .reset */ .c)('Array.from') ?? Array.from);
4670
4682
  return func.apply(Array, args);
4671
4683
  };
4672
4684
 
@@ -4703,6 +4715,7 @@ const toArray = function toArray(...args) {
4703
4715
  /* harmony export */ D: function() { return /* binding */ clearTimeout; },
4704
4716
  /* harmony export */ w: function() { return /* binding */ setTimeout; }
4705
4717
  /* harmony export */ });
4718
+ /* harmony import */ var jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17352);
4706
4719
  /*!
4707
4720
  * Jodit Editor (https://xdsoft.net/jodit/)
4708
4721
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -4711,6 +4724,7 @@ const toArray = function toArray(...args) {
4711
4724
  /**
4712
4725
  * @module helpers/async
4713
4726
  */
4727
+
4714
4728
  /**
4715
4729
  * Create async callback if set timeout value - else call function immediately
4716
4730
  */
@@ -4719,7 +4733,7 @@ function setTimeout(callback, timeout, ...args) {
4719
4733
  callback.call(null, ...args);
4720
4734
  }
4721
4735
  else {
4722
- return window.setTimeout(callback, timeout, ...args);
4736
+ return jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalWindow.setTimeout(callback, timeout, ...args);
4723
4737
  }
4724
4738
  return 0;
4725
4739
  }
@@ -4727,7 +4741,7 @@ function setTimeout(callback, timeout, ...args) {
4727
4741
  * Clear timeout
4728
4742
  */
4729
4743
  function clearTimeout(timer) {
4730
- window.clearTimeout(timer);
4744
+ jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalWindow.clearTimeout(timer);
4731
4745
  }
4732
4746
 
4733
4747
 
@@ -4740,6 +4754,7 @@ function clearTimeout(timer) {
4740
4754
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
4741
4755
  /* harmony export */ k: function() { return /* binding */ hasBrowserColorPicker; }
4742
4756
  /* harmony export */ });
4757
+ /* harmony import */ var jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17352);
4743
4758
  /*!
4744
4759
  * Jodit Editor (https://xdsoft.net/jodit/)
4745
4760
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -4748,13 +4763,14 @@ function clearTimeout(timer) {
4748
4763
  /**
4749
4764
  * @module helpers/checker
4750
4765
  */
4766
+
4751
4767
  /**
4752
4768
  * Check if browser has a color picker (a new HTML5 attribute for input tag)
4753
4769
  */
4754
4770
  function hasBrowserColorPicker() {
4755
4771
  let supportsColor = true;
4756
4772
  try {
4757
- const a = document.createElement('input');
4773
+ const a = jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalDocument.createElement('input');
4758
4774
  a.type = 'color';
4759
4775
  a.value = '!';
4760
4776
  supportsColor = a.type === 'color' && a.value !== '!';
@@ -5404,6 +5420,7 @@ function isStringArray(value) {
5404
5420
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
5405
5421
  /* harmony export */ m: function() { return /* binding */ isURL; }
5406
5422
  /* harmony export */ });
5423
+ /* harmony import */ var jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17352);
5407
5424
  /*!
5408
5425
  * Jodit Editor (https://xdsoft.net/jodit/)
5409
5426
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -5412,6 +5429,7 @@ function isStringArray(value) {
5412
5429
  /**
5413
5430
  * @module helpers/checker
5414
5431
  */
5432
+
5415
5433
  /**
5416
5434
  * Check if a string is an url
5417
5435
  */
@@ -5428,7 +5446,7 @@ function isURL(str) {
5428
5446
  return false;
5429
5447
  }
5430
5448
  }
5431
- const a = document.createElement('a');
5449
+ const a = jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalDocument.createElement('a');
5432
5450
  a.href = str;
5433
5451
  return Boolean(a.hostname);
5434
5452
  }
@@ -5663,9 +5681,9 @@ function applyStyles(html) {
5663
5681
  }
5664
5682
  html = html.substring(html.indexOf('<html '), html.length);
5665
5683
  html = html.substring(0, html.lastIndexOf('</html>') + '</html>'.length);
5666
- const iframe = document.createElement('iframe');
5684
+ const iframe = jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalDocument.createElement('iframe');
5667
5685
  iframe.style.display = 'none';
5668
- document.body.appendChild(iframe);
5686
+ jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalDocument.body.appendChild(iframe);
5669
5687
  let convertedString = '', collection = [];
5670
5688
  try {
5671
5689
  const iframeDoc = iframe.contentDocument ||
@@ -5736,9 +5754,10 @@ function applyStyles(html) {
5736
5754
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
5737
5755
  /* harmony export */ w: function() { return /* binding */ cleanFromWord; }
5738
5756
  /* harmony export */ });
5739
- /* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(55186);
5740
- /* harmony import */ var jodit_core_helpers_array_to_array__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(42448);
5741
- /* harmony import */ var jodit_core_helpers_string_trim__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(59101);
5757
+ /* harmony import */ var jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17352);
5758
+ /* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(55186);
5759
+ /* harmony import */ var jodit_core_helpers_array_to_array__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(42448);
5760
+ /* harmony import */ var jodit_core_helpers_string_trim__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(59101);
5742
5761
  /*!
5743
5762
  * Jodit Editor (https://xdsoft.net/jodit/)
5744
5763
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -5750,6 +5769,7 @@ function applyStyles(html) {
5750
5769
 
5751
5770
 
5752
5771
 
5772
+
5753
5773
  /**
5754
5774
  * The method automatically cleans up content from Microsoft Word and other HTML sources to ensure clean, compliant
5755
5775
  * content that matches the look and feel of the site.
@@ -5761,11 +5781,11 @@ function cleanFromWord(html) {
5761
5781
  }
5762
5782
  let convertedString = '';
5763
5783
  try {
5764
- const div = document.createElement('div');
5784
+ const div = jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalDocument.createElement('div');
5765
5785
  div.innerHTML = html;
5766
5786
  const marks = [];
5767
5787
  if (div.firstChild) {
5768
- jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.each(div, node => {
5788
+ jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.each(div, node => {
5769
5789
  if (!node) {
5770
5790
  return;
5771
5791
  }
@@ -5780,10 +5800,10 @@ function cleanFromWord(html) {
5780
5800
  case 'W:SDT':
5781
5801
  case 'W:SDTPR':
5782
5802
  case 'FONT':
5783
- jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.unwrap(node);
5803
+ jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.unwrap(node);
5784
5804
  break;
5785
5805
  default:
5786
- (0,jodit_core_helpers_array_to_array__WEBPACK_IMPORTED_MODULE_1__/* .toArray */ .$)(node.attributes).forEach((attr) => {
5806
+ (0,jodit_core_helpers_array_to_array__WEBPACK_IMPORTED_MODULE_2__/* .toArray */ .$)(node.attributes).forEach((attr) => {
5787
5807
  if ([
5788
5808
  'src',
5789
5809
  'href',
@@ -5802,14 +5822,14 @@ function cleanFromWord(html) {
5802
5822
  }
5803
5823
  });
5804
5824
  }
5805
- jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.safeRemove.apply(null, marks);
5825
+ jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.safeRemove.apply(null, marks);
5806
5826
  convertedString = div.innerHTML;
5807
5827
  }
5808
5828
  catch (e) { }
5809
5829
  if (convertedString) {
5810
5830
  html = convertedString;
5811
5831
  }
5812
- html = html.split(/(\n)/).filter(jodit_core_helpers_string_trim__WEBPACK_IMPORTED_MODULE_2__/* .trim */ .Bq).join('\n');
5832
+ html = html.split(/(\n)/).filter(jodit_core_helpers_string_trim__WEBPACK_IMPORTED_MODULE_3__/* .trim */ .Bq).join('\n');
5813
5833
  return html
5814
5834
  .replace(/<(\/)?(html|colgroup|col|o:p)[^>]*>/g, '')
5815
5835
  .replace(/<!--[^>]*>/g, '');
@@ -5825,6 +5845,7 @@ function cleanFromWord(html) {
5825
5845
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
5826
5846
  /* harmony export */ G: function() { return /* binding */ htmlspecialchars; }
5827
5847
  /* harmony export */ });
5848
+ /* harmony import */ var jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17352);
5828
5849
  /*!
5829
5850
  * Jodit Editor (https://xdsoft.net/jodit/)
5830
5851
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -5833,11 +5854,12 @@ function cleanFromWord(html) {
5833
5854
  /**
5834
5855
  * @module helpers/html
5835
5856
  */
5857
+
5836
5858
  /**
5837
5859
  * Convert special characters to HTML entities
5838
5860
  */
5839
5861
  function htmlspecialchars(html) {
5840
- const tmp = document.createElement('div');
5862
+ const tmp = jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalDocument.createElement('div');
5841
5863
  tmp.textContent = html;
5842
5864
  return tmp.innerHTML;
5843
5865
  }
@@ -6558,8 +6580,9 @@ const getContentWidth = (element, win) => {
6558
6580
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
6559
6581
  /* harmony export */ m: function() { return /* binding */ getScrollParent; }
6560
6582
  /* harmony export */ });
6561
- /* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(55186);
6562
- /* harmony import */ var jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(97369);
6583
+ /* harmony import */ var jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17352);
6584
+ /* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(55186);
6585
+ /* harmony import */ var jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(97369);
6563
6586
  /*!
6564
6587
  * Jodit Editor (https://xdsoft.net/jodit/)
6565
6588
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -6567,19 +6590,20 @@ const getContentWidth = (element, win) => {
6567
6590
  */
6568
6591
 
6569
6592
 
6593
+
6570
6594
  function getScrollParent(node) {
6571
6595
  if (!node) {
6572
6596
  return null;
6573
6597
  }
6574
- const isElement = jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.isHTMLElement(node);
6575
- const overflowY = isElement && (0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_1__.css)(node, 'overflowY');
6598
+ const isElement = jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isHTMLElement(node);
6599
+ const overflowY = isElement && (0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_2__.css)(node, 'overflowY');
6576
6600
  const isScrollable = isElement && overflowY !== 'visible' && overflowY !== 'hidden';
6577
6601
  if (isScrollable && node.scrollHeight >= node.clientHeight) {
6578
6602
  return node;
6579
6603
  }
6580
6604
  return (getScrollParent(node.parentNode) ||
6581
- document.scrollingElement ||
6582
- document.body);
6605
+ jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalDocument.scrollingElement ||
6606
+ jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalDocument.body);
6583
6607
  }
6584
6608
 
6585
6609
 
@@ -7503,16 +7527,18 @@ const buildQuery = (data, prefix) => {
7503
7527
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
7504
7528
  /* harmony export */ X: function() { return /* binding */ completeUrl; }
7505
7529
  /* harmony export */ });
7530
+ /* harmony import */ var jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17352);
7506
7531
  /*!
7507
7532
  * Jodit Editor (https://xdsoft.net/jodit/)
7508
7533
  * Released under MIT see LICENSE.txt in the project root for license information.
7509
7534
  * Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
7510
7535
  */
7536
+
7511
7537
  /**
7512
7538
  * @module helpers/utils
7513
7539
  */
7514
7540
  const completeUrl = (url) => {
7515
- if (window.location.protocol === 'file:' && /^\/\//.test(url)) {
7541
+ if (jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalWindow.location.protocol === 'file:' && /^\/\//.test(url)) {
7516
7542
  url = 'https:' + url;
7517
7543
  }
7518
7544
  return url;
@@ -7629,8 +7655,9 @@ function ConfigFlatten(obj) {
7629
7655
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
7630
7656
  /* harmony export */ m: function() { return /* binding */ convertMediaUrlToVideoEmbed; }
7631
7657
  /* harmony export */ });
7632
- /* harmony import */ var jodit_core_helpers_checker_is_url__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6939);
7633
- /* harmony import */ var _parse_query__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(70807);
7658
+ /* harmony import */ var jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17352);
7659
+ /* harmony import */ var jodit_core_helpers_checker_is_url__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6939);
7660
+ /* harmony import */ var _parse_query__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(70807);
7634
7661
  /*!
7635
7662
  * Jodit Editor (https://xdsoft.net/jodit/)
7636
7663
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -7641,14 +7668,15 @@ function ConfigFlatten(obj) {
7641
7668
  */
7642
7669
 
7643
7670
 
7671
+
7644
7672
  /**
7645
7673
  * Javascript url pattern converter replace youtube/vimeo url in embed code.
7646
7674
  */
7647
7675
  const convertMediaUrlToVideoEmbed = (url, width = 400, height = 345) => {
7648
- if (!(0,jodit_core_helpers_checker_is_url__WEBPACK_IMPORTED_MODULE_0__/* .isURL */ .m)(url)) {
7676
+ if (!(0,jodit_core_helpers_checker_is_url__WEBPACK_IMPORTED_MODULE_1__/* .isURL */ .m)(url)) {
7649
7677
  return url;
7650
7678
  }
7651
- const parser = document.createElement('a'), pattern1 = /(?:http?s?:\/\/)?(?:www\.)?(?:vimeo\.com)\/?(.+)/g;
7679
+ const parser = jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalDocument.createElement('a'), pattern1 = /(?:http?s?:\/\/)?(?:www\.)?(?:vimeo\.com)\/?(.+)/g;
7652
7680
  parser.href = url;
7653
7681
  if (!width) {
7654
7682
  width = 400;
@@ -7674,7 +7702,7 @@ const convertMediaUrlToVideoEmbed = (url, width = 400, height = 345) => {
7674
7702
  case 'youtu.be':
7675
7703
  case 'www.youtu.be': {
7676
7704
  const query = parser.search
7677
- ? (0,_parse_query__WEBPACK_IMPORTED_MODULE_1__/* .parseQuery */ .m)(parser.search)
7705
+ ? (0,_parse_query__WEBPACK_IMPORTED_MODULE_2__/* .parseQuery */ .m)(parser.search)
7678
7706
  : { v: parser.pathname.substr(1) };
7679
7707
  return query.v
7680
7708
  ? '<iframe width="' +
@@ -7868,7 +7896,8 @@ const dataBind = (elm, key, value) => {
7868
7896
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
7869
7897
  /* harmony export */ e: function() { return /* binding */ defaultLanguage; }
7870
7898
  /* harmony export */ });
7871
- /* harmony import */ var jodit_core_helpers_checker_is_string__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(98253);
7899
+ /* harmony import */ var jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17352);
7900
+ /* harmony import */ var jodit_core_helpers_checker_is_string__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(98253);
7872
7901
  /*!
7873
7902
  * Jodit Editor (https://xdsoft.net/jodit/)
7874
7903
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -7878,15 +7907,16 @@ const dataBind = (elm, key, value) => {
7878
7907
  * @module helpers/utils
7879
7908
  */
7880
7909
 
7910
+
7881
7911
  /**
7882
7912
  * Try define user language
7883
7913
  */
7884
7914
  const defaultLanguage = (language, defaultLanguage = 'en') => {
7885
- if (language !== 'auto' && (0,jodit_core_helpers_checker_is_string__WEBPACK_IMPORTED_MODULE_0__/* .isString */ .K)(language)) {
7915
+ if (language !== 'auto' && (0,jodit_core_helpers_checker_is_string__WEBPACK_IMPORTED_MODULE_1__/* .isString */ .K)(language)) {
7886
7916
  return language;
7887
7917
  }
7888
- if (document.documentElement && document.documentElement.lang) {
7889
- return document.documentElement.lang;
7918
+ if (jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalDocument.documentElement && jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalDocument.documentElement.lang) {
7919
+ return jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalDocument.documentElement.lang;
7890
7920
  }
7891
7921
  if (navigator.language) {
7892
7922
  return navigator.language.substring(0, 2);
@@ -8637,10 +8667,10 @@ const map = {};
8637
8667
  */
8638
8668
  function reset(key) {
8639
8669
  if (!(key in map)) {
8640
- const iframe = document.createElement('iframe');
8670
+ const iframe = jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalDocument.createElement('iframe');
8641
8671
  try {
8642
8672
  iframe.src = 'about:blank';
8643
- document.body.appendChild(iframe);
8673
+ jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalDocument.body.appendChild(iframe);
8644
8674
  if (!iframe.contentWindow) {
8645
8675
  return null;
8646
8676
  }
@@ -9567,14 +9597,15 @@ Plugin.requires = [];
9567
9597
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
9568
9598
  /* harmony export */ d: function() { return /* binding */ Ajax; }
9569
9599
  /* harmony export */ });
9570
- /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(31635);
9600
+ /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(31635);
9571
9601
  /* harmony import */ var jodit_core_async__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(64890);
9572
- /* harmony import */ var jodit_core_decorators_autobind_autobind__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(26318);
9573
- /* harmony import */ var jodit_core_helpers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(65147);
9574
- /* harmony import */ var jodit_core_helpers_utils_error__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(50156);
9575
- /* harmony import */ var jodit_config__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(36115);
9576
- /* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(27337);
9577
- /* harmony import */ var _response__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(91672);
9602
+ /* harmony import */ var jodit_core_constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(17352);
9603
+ /* harmony import */ var jodit_core_decorators_autobind_autobind__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(26318);
9604
+ /* harmony import */ var jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(65147);
9605
+ /* harmony import */ var jodit_core_helpers_utils_error__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(50156);
9606
+ /* harmony import */ var jodit_config__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(36115);
9607
+ /* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(27337);
9608
+ /* harmony import */ var _response__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(91672);
9578
9609
  /*!
9579
9610
  * Jodit Editor (https://xdsoft.net/jodit/)
9580
9611
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -9588,33 +9619,34 @@ Plugin.requires = [];
9588
9619
 
9589
9620
 
9590
9621
 
9622
+
9591
9623
  class Ajax {
9592
9624
  className() {
9593
9625
  return 'Ajax';
9594
9626
  }
9595
- constructor(options, defaultAjaxOptions = jodit_config__WEBPACK_IMPORTED_MODULE_3__/* .Config */ .T.prototype.defaultAjaxOptions) {
9627
+ constructor(options, defaultAjaxOptions = jodit_config__WEBPACK_IMPORTED_MODULE_4__/* .Config */ .T.prototype.defaultAjaxOptions) {
9596
9628
  this.__async = new jodit_core_async__WEBPACK_IMPORTED_MODULE_0__/* .Async */ .j();
9597
9629
  this.__isFulfilled = false;
9598
9630
  this.__activated = false;
9599
9631
  this.__isDestructed = false;
9600
- this.options = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_1__.ConfigProto)(options || {}, defaultAjaxOptions);
9632
+ this.options = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.ConfigProto)(options || {}, defaultAjaxOptions);
9601
9633
  this.xhr = this.o.xhr ? this.o.xhr() : new XMLHttpRequest();
9602
9634
  }
9603
9635
  __buildParams(obj, prefix) {
9604
- if ((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_1__.isPlainObject)(obj) &&
9636
+ if ((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.isPlainObject)(obj) &&
9605
9637
  this.options.contentType &&
9606
9638
  this.options.contentType.includes('application/json')) {
9607
9639
  return JSON.stringify(obj);
9608
9640
  }
9609
- if ((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_1__.isFunction)(this.o.queryBuild)) {
9641
+ if ((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.isFunction)(this.o.queryBuild)) {
9610
9642
  return this.o.queryBuild.call(this, obj, prefix);
9611
9643
  }
9612
- if ((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_1__.isString)(obj) ||
9613
- obj instanceof window.FormData ||
9614
- (typeof obj === 'object' && obj != null && (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_1__.isFunction)(obj.append))) {
9644
+ if ((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.isString)(obj) ||
9645
+ obj instanceof jodit_core_constants__WEBPACK_IMPORTED_MODULE_1__.globalWindow.FormData ||
9646
+ (typeof obj === 'object' && obj != null && (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.isFunction)(obj.append))) {
9615
9647
  return obj;
9616
9648
  }
9617
- return (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_1__.buildQuery)(obj);
9649
+ return (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.buildQuery)(obj);
9618
9650
  }
9619
9651
  get o() {
9620
9652
  return this.options;
@@ -9637,16 +9669,16 @@ class Ajax {
9637
9669
  return this.__async.promise(async (resolve, reject) => {
9638
9670
  const onReject = () => {
9639
9671
  this.__isFulfilled = true;
9640
- reject(jodit_core_helpers_utils_error__WEBPACK_IMPORTED_MODULE_2__/* .connection */ .FI('Connection error'));
9672
+ reject(jodit_core_helpers_utils_error__WEBPACK_IMPORTED_MODULE_3__/* .connection */ .FI('Connection error'));
9641
9673
  };
9642
9674
  const onResolve = () => {
9643
9675
  this.__isFulfilled = true;
9644
- resolve(new _response__WEBPACK_IMPORTED_MODULE_5__/* .Response */ .Y(request, xhr.status, xhr.statusText, !xhr.responseType ? xhr.responseText : xhr.response));
9676
+ resolve(new _response__WEBPACK_IMPORTED_MODULE_6__/* .Response */ .Y(request, xhr.status, xhr.statusText, !xhr.responseType ? xhr.responseText : xhr.response));
9645
9677
  };
9646
9678
  xhr.onload = onResolve;
9647
9679
  xhr.onabort = () => {
9648
9680
  this.__isFulfilled = true;
9649
- reject(jodit_core_helpers_utils_error__WEBPACK_IMPORTED_MODULE_2__/* .abort */ .h2('Abort connection'));
9681
+ reject(jodit_core_helpers_utils_error__WEBPACK_IMPORTED_MODULE_3__/* .abort */ .h2('Abort connection'));
9650
9682
  };
9651
9683
  xhr.onerror = onReject;
9652
9684
  xhr.ontimeout = onReject;
@@ -9668,7 +9700,7 @@ class Ajax {
9668
9700
  }
9669
9701
  else if (xhr.statusText) {
9670
9702
  this.__isFulfilled = true;
9671
- reject(jodit_core_helpers_utils_error__WEBPACK_IMPORTED_MODULE_2__/* .connection */ .FI(xhr.statusText));
9703
+ reject(jodit_core_helpers_utils_error__WEBPACK_IMPORTED_MODULE_3__/* .connection */ .FI(xhr.statusText));
9672
9704
  }
9673
9705
  }
9674
9706
  };
@@ -9679,7 +9711,7 @@ class Ajax {
9679
9711
  xhr.setRequestHeader('Content-type', o.contentType);
9680
9712
  }
9681
9713
  let { headers } = o;
9682
- if ((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_1__.isFunction)(headers)) {
9714
+ if ((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.isFunction)(headers)) {
9683
9715
  headers = await headers.call(this);
9684
9716
  }
9685
9717
  if (headers && xhr.setRequestHeader) {
@@ -9695,22 +9727,22 @@ class Ajax {
9695
9727
  }
9696
9728
  prepareRequest() {
9697
9729
  if (!this.o.url) {
9698
- throw jodit_core_helpers_utils_error__WEBPACK_IMPORTED_MODULE_2__/* .error */ .z3('Need URL for AJAX request');
9730
+ throw jodit_core_helpers_utils_error__WEBPACK_IMPORTED_MODULE_3__/* .error */ .z3('Need URL for AJAX request');
9699
9731
  }
9700
9732
  let url = this.o.url;
9701
9733
  const data = this.o.data;
9702
9734
  const method = (this.o.method || 'get').toLowerCase();
9703
- if (method === 'get' && data && (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_1__.isPlainObject)(data)) {
9735
+ if (method === 'get' && data && (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.isPlainObject)(data)) {
9704
9736
  const qIndex = url.indexOf('?');
9705
9737
  if (qIndex !== -1) {
9706
- const urlData = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_1__.parseQuery)(url);
9738
+ const urlData = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.parseQuery)(url);
9707
9739
  url =
9708
9740
  url.substring(0, qIndex) +
9709
9741
  '?' +
9710
- (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_1__.buildQuery)({ ...urlData, ...data });
9742
+ (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.buildQuery)({ ...urlData, ...data });
9711
9743
  }
9712
9744
  else {
9713
- url += '?' + (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_1__.buildQuery)(this.o.data);
9745
+ url += '?' + (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.buildQuery)(this.o.data);
9714
9746
  }
9715
9747
  }
9716
9748
  const request = {
@@ -9734,8 +9766,8 @@ class Ajax {
9734
9766
  }
9735
9767
  }
9736
9768
  Ajax.log = [];
9737
- (0,tslib__WEBPACK_IMPORTED_MODULE_6__/* .__decorate */ .Cg)([
9738
- jodit_core_decorators_autobind_autobind__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .Ay
9769
+ (0,tslib__WEBPACK_IMPORTED_MODULE_7__/* .__decorate */ .Cg)([
9770
+ jodit_core_decorators_autobind_autobind__WEBPACK_IMPORTED_MODULE_8__/* ["default"] */ .Ay
9739
9771
  ], Ajax.prototype, "destruct", null);
9740
9772
 
9741
9773
 
@@ -10620,6 +10652,7 @@ class Selection {
10620
10652
  /**
10621
10653
  * Call callback for all selection node
10622
10654
  */
10655
+ // eslint-disable-next-line complexity
10623
10656
  eachSelection(callback) {
10624
10657
  const sel = this.sel;
10625
10658
  if (!sel || !sel.rangeCount) {
@@ -11400,12 +11433,13 @@ function getSuitParent(style, node, root) {
11400
11433
  /* harmony export */ Y: function() { return /* binding */ hasSameStyleKeys; },
11401
11434
  /* harmony export */ g: function() { return /* binding */ hasSameStyle; }
11402
11435
  /* harmony export */ });
11403
- /* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(55186);
11404
- /* harmony import */ var jodit_core_helpers_checker_is_void__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(35642);
11405
- /* harmony import */ var jodit_core_helpers_normalize_normalize_css_value__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(59678);
11406
- /* harmony import */ var jodit_core_helpers_utils_assert__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(28712);
11407
- /* harmony import */ var jodit_core_helpers_utils_assert__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(jodit_core_helpers_utils_assert__WEBPACK_IMPORTED_MODULE_1__);
11408
- /* harmony import */ var jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(38322);
11436
+ /* harmony import */ var jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17352);
11437
+ /* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(55186);
11438
+ /* harmony import */ var jodit_core_helpers_checker_is_void__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(35642);
11439
+ /* harmony import */ var jodit_core_helpers_normalize_normalize_css_value__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(59678);
11440
+ /* harmony import */ var jodit_core_helpers_utils_assert__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(28712);
11441
+ /* harmony import */ var jodit_core_helpers_utils_assert__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(jodit_core_helpers_utils_assert__WEBPACK_IMPORTED_MODULE_2__);
11442
+ /* harmony import */ var jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(38322);
11409
11443
  /*!
11410
11444
  * Jodit Editor (https://xdsoft.net/jodit/)
11411
11445
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -11416,48 +11450,53 @@ function getSuitParent(style, node, root) {
11416
11450
 
11417
11451
 
11418
11452
 
11453
+
11419
11454
  /**
11420
11455
  * Element has the same styles as in the commit
11421
11456
  * @private
11422
11457
  */
11423
11458
  function hasSameStyle(elm, rules) {
11424
- return Boolean(!jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.isTag(elm, 'font') &&
11425
- jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.isHTMLElement(elm) &&
11459
+ return Boolean(!jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isTag(elm, 'font') &&
11460
+ jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isHTMLElement(elm) &&
11426
11461
  Object.keys(rules).every(property => {
11427
- const value = (0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_2__/* .css */ .A)(elm, property, true);
11462
+ const value = (0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_3__/* .css */ .A)(elm, property, true);
11428
11463
  if (value === '' &&
11429
11464
  (rules[property] === '' || rules[property] == null)) {
11430
11465
  return true;
11431
11466
  }
11432
- return (!(0,jodit_core_helpers_checker_is_void__WEBPACK_IMPORTED_MODULE_3__/* .isVoid */ .R)(value) &&
11467
+ return (!(0,jodit_core_helpers_checker_is_void__WEBPACK_IMPORTED_MODULE_4__/* .isVoid */ .R)(value) &&
11433
11468
  value !== '' &&
11434
- !(0,jodit_core_helpers_checker_is_void__WEBPACK_IMPORTED_MODULE_3__/* .isVoid */ .R)(rules[property]) &&
11435
- (0,jodit_core_helpers_normalize_normalize_css_value__WEBPACK_IMPORTED_MODULE_4__/* .normalizeCssValue */ .iy)(property, rules[property])
11469
+ !(0,jodit_core_helpers_checker_is_void__WEBPACK_IMPORTED_MODULE_4__/* .isVoid */ .R)(rules[property]) &&
11470
+ (0,jodit_core_helpers_normalize_normalize_css_value__WEBPACK_IMPORTED_MODULE_5__/* .normalizeCssValue */ .iy)(property, rules[property])
11436
11471
  .toString()
11437
11472
  .toLowerCase() === value.toString().toLowerCase());
11438
11473
  }));
11439
11474
  }
11440
- const elm = document.createElement('div');
11441
- elm.style.color = 'red';
11442
- void 0;
11443
- void 0;
11444
- void 0;
11475
+ if (jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalDocument) {
11476
+ const elm = jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalDocument.createElement('div');
11477
+ elm.style.color = 'red';
11478
+ void 0;
11479
+ void 0;
11480
+ void 0;
11481
+ }
11445
11482
  /**
11446
11483
  * Element has the similar styles keys
11447
11484
  */
11448
11485
  function hasSameStyleKeys(elm, rules) {
11449
- return Boolean(!jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.isTag(elm, 'font') &&
11450
- jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.isHTMLElement(elm) &&
11486
+ return Boolean(!jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isTag(elm, 'font') &&
11487
+ jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isHTMLElement(elm) &&
11451
11488
  Object.keys(rules).every(property => {
11452
- const value = (0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_2__/* .css */ .A)(elm, property, true);
11489
+ const value = (0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_3__/* .css */ .A)(elm, property, true);
11453
11490
  return value !== '';
11454
11491
  }));
11455
11492
  }
11456
- const elm2 = document.createElement('div');
11457
- elm2.style.color = 'red';
11458
- void 0;
11459
- void 0;
11460
- void 0;
11493
+ if (jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalDocument) {
11494
+ const elm2 = jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalDocument.createElement('div');
11495
+ elm2.style.color = 'red';
11496
+ void 0;
11497
+ void 0;
11498
+ void 0;
11499
+ }
11461
11500
 
11462
11501
 
11463
11502
  /***/ }),
@@ -11838,16 +11877,17 @@ function wrapList(commitStyle, wrapper, jodit) {
11838
11877
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
11839
11878
  /* harmony export */ Y: function() { return /* binding */ toggleAttributes; }
11840
11879
  /* harmony export */ });
11841
- /* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(55186);
11842
- /* harmony import */ var jodit_core_global__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(56298);
11843
- /* harmony import */ var jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(9823);
11844
- /* harmony import */ var jodit_core_helpers_normalize_normalize_css_value__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(59678);
11845
- /* harmony import */ var jodit_core_helpers_size_object_size__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(95350);
11846
- /* harmony import */ var jodit_core_helpers_string_kebab_case__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(449);
11847
- /* harmony import */ var jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(97369);
11848
- /* harmony import */ var jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(38322);
11849
- /* harmony import */ var jodit_core_helpers_utils_data_bind__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(72197);
11850
- /* harmony import */ var jodit_core_selection_style_constants__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(12043);
11880
+ /* harmony import */ var jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17352);
11881
+ /* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(55186);
11882
+ /* harmony import */ var jodit_core_global__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(56298);
11883
+ /* harmony import */ var jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(9823);
11884
+ /* harmony import */ var jodit_core_helpers_normalize_normalize_css_value__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(59678);
11885
+ /* harmony import */ var jodit_core_helpers_size_object_size__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(95350);
11886
+ /* harmony import */ var jodit_core_helpers_string_kebab_case__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(449);
11887
+ /* harmony import */ var jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(97369);
11888
+ /* harmony import */ var jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(38322);
11889
+ /* harmony import */ var jodit_core_helpers_utils_data_bind__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(72197);
11890
+ /* harmony import */ var jodit_core_selection_style_constants__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(12043);
11851
11891
  /*!
11852
11892
  * Jodit Editor (https://xdsoft.net/jodit/)
11853
11893
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -11863,6 +11903,7 @@ function wrapList(commitStyle, wrapper, jodit) {
11863
11903
 
11864
11904
 
11865
11905
 
11906
+
11866
11907
  const tak = 'toggleAttributes';
11867
11908
  /**
11868
11909
  * Toggles attributes
@@ -11874,7 +11915,7 @@ function toggleAttributes(commitStyle, elm, jodit, mode, dry = false) {
11874
11915
  }
11875
11916
  !dry && commitStyle.setApplied(elm, tak);
11876
11917
  const { attributes } = commitStyle.options;
11877
- if (attributes && (0,jodit_core_helpers_size_object_size__WEBPACK_IMPORTED_MODULE_3__/* .size */ .E)(attributes) > 0) {
11918
+ if (attributes && (0,jodit_core_helpers_size_object_size__WEBPACK_IMPORTED_MODULE_4__/* .size */ .E)(attributes) > 0) {
11878
11919
  Object.keys(attributes).forEach((key) => {
11879
11920
  const value = attributes[key];
11880
11921
  switch (key) {
@@ -11896,24 +11937,24 @@ function toggleAttributes(commitStyle, elm, jodit, mode, dry = false) {
11896
11937
  function toggleStyle(commitStyle, jodit, style, elm, dry, mode) {
11897
11938
  void 0;
11898
11939
  Object.keys(style).forEach((rule) => {
11899
- const inlineValue = elm.style.getPropertyValue((0,jodit_core_helpers_string_kebab_case__WEBPACK_IMPORTED_MODULE_6__/* .kebabCase */ .k)(rule));
11940
+ const inlineValue = elm.style.getPropertyValue((0,jodit_core_helpers_string_kebab_case__WEBPACK_IMPORTED_MODULE_7__/* .kebabCase */ .k)(rule));
11900
11941
  const newValue = style[rule];
11901
11942
  if (inlineValue === '' && newValue == null) {
11902
11943
  return;
11903
11944
  }
11904
11945
  if (getNativeCSSValue(jodit, elm, rule) ===
11905
- (0,jodit_core_helpers_normalize_normalize_css_value__WEBPACK_IMPORTED_MODULE_7__/* .normalizeCssValue */ .iy)(rule, newValue)) {
11946
+ (0,jodit_core_helpers_normalize_normalize_css_value__WEBPACK_IMPORTED_MODULE_8__/* .normalizeCssValue */ .iy)(rule, newValue)) {
11906
11947
  if (!inlineValue) {
11907
11948
  return;
11908
11949
  }
11909
- !dry && (0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_8__/* .css */ .A)(elm, rule, null);
11910
- mode = jodit_core_selection_style_constants__WEBPACK_IMPORTED_MODULE_9__/* .UNSET */ .Ag;
11950
+ !dry && (0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_9__/* .css */ .A)(elm, rule, null);
11951
+ mode = jodit_core_selection_style_constants__WEBPACK_IMPORTED_MODULE_10__/* .UNSET */ .Ag;
11911
11952
  mode = removeExtraStyleAttribute(commitStyle, elm, mode);
11912
11953
  return;
11913
11954
  }
11914
- mode = jodit_core_selection_style_constants__WEBPACK_IMPORTED_MODULE_9__/* .CHANGE */ .PL;
11955
+ mode = jodit_core_selection_style_constants__WEBPACK_IMPORTED_MODULE_10__/* .CHANGE */ .PL;
11915
11956
  if (!dry) {
11916
- (0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_8__/* .css */ .A)(elm, rule, newValue);
11957
+ (0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_9__/* .css */ .A)(elm, rule, newValue);
11917
11958
  mode = removeExtraStyleAttribute(commitStyle, elm, mode);
11918
11959
  }
11919
11960
  });
@@ -11921,19 +11962,19 @@ function toggleStyle(commitStyle, jodit, style, elm, dry, mode) {
11921
11962
  }
11922
11963
  function toggleClass(jodit, value, elm, mode, dry) {
11923
11964
  void 0;
11924
- const hook = jodit.e.fire.bind(jodit.e, `${jodit_core_selection_style_constants__WEBPACK_IMPORTED_MODULE_9__/* ._PREFIX */ .ar}AfterToggleAttribute`);
11965
+ const hook = jodit.e.fire.bind(jodit.e, `${jodit_core_selection_style_constants__WEBPACK_IMPORTED_MODULE_10__/* ._PREFIX */ .ar}AfterToggleAttribute`);
11925
11966
  if (elm.classList.contains(value.toString())) {
11926
- mode = jodit_core_selection_style_constants__WEBPACK_IMPORTED_MODULE_9__/* .UNSET */ .Ag;
11967
+ mode = jodit_core_selection_style_constants__WEBPACK_IMPORTED_MODULE_10__/* .UNSET */ .Ag;
11927
11968
  if (!dry) {
11928
11969
  elm.classList.remove(value);
11929
11970
  if (elm.classList.length === 0) {
11930
- (0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_4__.attr)(elm, 'class', null);
11971
+ (0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_5__.attr)(elm, 'class', null);
11931
11972
  hook(mode, elm, 'class', null);
11932
11973
  }
11933
11974
  }
11934
11975
  }
11935
11976
  else {
11936
- mode = jodit_core_selection_style_constants__WEBPACK_IMPORTED_MODULE_9__/* .CHANGE */ .PL;
11977
+ mode = jodit_core_selection_style_constants__WEBPACK_IMPORTED_MODULE_10__/* .CHANGE */ .PL;
11937
11978
  if (!dry) {
11938
11979
  elm.classList.add(value);
11939
11980
  hook(mode, elm, 'class', value);
@@ -11943,16 +11984,16 @@ function toggleClass(jodit, value, elm, mode, dry) {
11943
11984
  }
11944
11985
  function toggleAttribute(jodit, value, elm, key, dry, mode) {
11945
11986
  void 0;
11946
- const hook = jodit.e.fire.bind(jodit.e, `${jodit_core_selection_style_constants__WEBPACK_IMPORTED_MODULE_9__/* ._PREFIX */ .ar}AfterToggleAttribute`);
11947
- if ((0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_4__.attr)(elm, key) === value) {
11948
- !dry && (0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_4__.attr)(elm, key, null);
11949
- mode = jodit_core_selection_style_constants__WEBPACK_IMPORTED_MODULE_9__/* .UNSET */ .Ag;
11987
+ const hook = jodit.e.fire.bind(jodit.e, `${jodit_core_selection_style_constants__WEBPACK_IMPORTED_MODULE_10__/* ._PREFIX */ .ar}AfterToggleAttribute`);
11988
+ if ((0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_5__.attr)(elm, key) === value) {
11989
+ !dry && (0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_5__.attr)(elm, key, null);
11990
+ mode = jodit_core_selection_style_constants__WEBPACK_IMPORTED_MODULE_10__/* .UNSET */ .Ag;
11950
11991
  !dry && hook(mode, elm, key, value);
11951
11992
  return mode;
11952
11993
  }
11953
- mode = jodit_core_selection_style_constants__WEBPACK_IMPORTED_MODULE_9__/* .CHANGE */ .PL;
11994
+ mode = jodit_core_selection_style_constants__WEBPACK_IMPORTED_MODULE_10__/* .CHANGE */ .PL;
11954
11995
  if (!dry) {
11955
- (0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_4__.attr)(elm, key, value);
11996
+ (0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_5__.attr)(elm, key, value);
11956
11997
  hook(mode, elm, key, value);
11957
11998
  }
11958
11999
  return mode;
@@ -11962,11 +12003,11 @@ function toggleAttribute(jodit, value, elm, key, dry, mode) {
11962
12003
  * and if it is default, it removes the element itself
11963
12004
  */
11964
12005
  function removeExtraStyleAttribute(commitStyle, elm, mode) {
11965
- if (!(0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_4__.attr)(elm, 'style')) {
11966
- (0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_4__.attr)(elm, 'style', null);
12006
+ if (!(0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_5__.attr)(elm, 'style')) {
12007
+ (0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_5__.attr)(elm, 'style', null);
11967
12008
  if (elm.tagName.toLowerCase() === commitStyle.defaultTag) {
11968
- jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.unwrap(elm);
11969
- mode = jodit_core_selection_style_constants__WEBPACK_IMPORTED_MODULE_9__/* .UNWRAP */ .OJ;
12009
+ jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.unwrap(elm);
12010
+ mode = jodit_core_selection_style_constants__WEBPACK_IMPORTED_MODULE_10__/* .UNWRAP */ .OJ;
11970
12011
  }
11971
12012
  }
11972
12013
  return mode;
@@ -11975,12 +12016,12 @@ function removeExtraStyleAttribute(commitStyle, elm, mode) {
11975
12016
  * Creates an iframe into which elements will be inserted to test their default styles in the browser
11976
12017
  */
11977
12018
  function getShadowRoot(jodit) {
11978
- if ((0,jodit_core_helpers_utils_data_bind__WEBPACK_IMPORTED_MODULE_5__/* .dataBind */ .m)(jodit, 'shadowRoot') !== undefined) {
11979
- return (0,jodit_core_helpers_utils_data_bind__WEBPACK_IMPORTED_MODULE_5__/* .dataBind */ .m)(jodit, 'shadowRoot');
12019
+ if ((0,jodit_core_helpers_utils_data_bind__WEBPACK_IMPORTED_MODULE_6__/* .dataBind */ .m)(jodit, 'shadowRoot') !== undefined) {
12020
+ return (0,jodit_core_helpers_utils_data_bind__WEBPACK_IMPORTED_MODULE_6__/* .dataBind */ .m)(jodit, 'shadowRoot');
11980
12021
  }
11981
- const container = (0,jodit_core_global__WEBPACK_IMPORTED_MODULE_1__/* .getContainer */ .My)(jodit);
11982
- const iframe = document.createElement('iframe');
11983
- (0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_8__/* .css */ .A)(iframe, {
12022
+ const container = (0,jodit_core_global__WEBPACK_IMPORTED_MODULE_2__/* .getContainer */ .My)(jodit);
12023
+ const iframe = jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalDocument.createElement('iframe');
12024
+ (0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_9__/* .css */ .A)(iframe, {
11984
12025
  width: 0,
11985
12026
  height: 0,
11986
12027
  position: 'absolute',
@@ -11990,7 +12031,7 @@ function getShadowRoot(jodit) {
11990
12031
  container.appendChild(iframe);
11991
12032
  const doc = iframe.contentWindow?.document;
11992
12033
  const shadowRoot = !doc ? jodit.od.body : doc.body;
11993
- (0,jodit_core_helpers_utils_data_bind__WEBPACK_IMPORTED_MODULE_5__/* .dataBind */ .m)(jodit, 'shadowRoot', shadowRoot);
12034
+ (0,jodit_core_helpers_utils_data_bind__WEBPACK_IMPORTED_MODULE_6__/* .dataBind */ .m)(jodit, 'shadowRoot', shadowRoot);
11994
12035
  return shadowRoot;
11995
12036
  }
11996
12037
  /**
@@ -12001,8 +12042,8 @@ function getNativeCSSValue(jodit, elm, key) {
12001
12042
  newElm.style.cssText = elm.style.cssText;
12002
12043
  const root = getShadowRoot(jodit);
12003
12044
  root.appendChild(newElm);
12004
- const result = (0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_8__/* .css */ .A)(newElm, key);
12005
- jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.safeRemove(newElm);
12045
+ const result = (0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_9__/* .css */ .A)(newElm, key);
12046
+ jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.safeRemove(newElm);
12006
12047
  return result;
12007
12048
  }
12008
12049
 
@@ -14030,6 +14071,7 @@ let UIFileInput = class UIFileInput extends jodit_core_ui_form_inputs_input_inpu
14030
14071
  }
14031
14072
  createContainer(options) {
14032
14073
  this.button = new jodit_core_ui_button_button_button__WEBPACK_IMPORTED_MODULE_0__/* .UIButton */ .lD(this.j, {
14074
+ tooltip: options.tooltip,
14033
14075
  icon: {
14034
14076
  name: 'plus'
14035
14077
  }
@@ -14466,8 +14508,8 @@ __webpack_require__.r(__webpack_exports__);
14466
14508
  /* harmony export */ required: function() { return /* binding */ required; },
14467
14509
  /* harmony export */ url: function() { return /* binding */ url; }
14468
14510
  /* harmony export */ });
14469
- /* harmony import */ var jodit_core_helpers_checker_is_url__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6939);
14470
- /* harmony import */ var jodit_core_helpers_string_trim__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(59101);
14511
+ /* harmony import */ var jodit_core_helpers_checker_is_url__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6939);
14512
+ /* harmony import */ var jodit_core_helpers_string_trim__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(59101);
14471
14513
  /*!
14472
14514
  * Jodit Editor (https://xdsoft.net/jodit/)
14473
14515
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -14479,7 +14521,7 @@ __webpack_require__.r(__webpack_exports__);
14479
14521
  * Input is required
14480
14522
  */
14481
14523
  const required = function (input) {
14482
- if (!(0,jodit_core_helpers_string_trim__WEBPACK_IMPORTED_MODULE_0__/* .trim */ .Bq)(input.value).length) {
14524
+ if (!(0,jodit_core_helpers_string_trim__WEBPACK_IMPORTED_MODULE_1__/* .trim */ .Bq)(input.value).length) {
14483
14525
  input.error = 'Please fill out this field';
14484
14526
  return false;
14485
14527
  }
@@ -14489,7 +14531,7 @@ const required = function (input) {
14489
14531
  * Input value should be valid URL
14490
14532
  */
14491
14533
  const url = function (input) {
14492
- if (!(0,jodit_core_helpers_checker_is_url__WEBPACK_IMPORTED_MODULE_1__/* .isURL */ .m)((0,jodit_core_helpers_string_trim__WEBPACK_IMPORTED_MODULE_0__/* .trim */ .Bq)(input.value))) {
14534
+ if (!(0,jodit_core_helpers_checker_is_url__WEBPACK_IMPORTED_MODULE_0__/* .isURL */ .m)((0,jodit_core_helpers_string_trim__WEBPACK_IMPORTED_MODULE_1__/* .trim */ .Bq)(input.value))) {
14493
14535
  input.error = 'Please enter a web address';
14494
14536
  return false;
14495
14537
  }
@@ -17043,6 +17085,9 @@ let Jodit = Jodit_1 = class Jodit extends jodit_modules__WEBPACK_IMPORTED_MODULE
17043
17085
  }
17044
17086
  }
17045
17087
  catch (e) {
17088
+ if (!jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.IS_PROD) {
17089
+ throw e;
17090
+ }
17046
17091
  this.destruct();
17047
17092
  throw e;
17048
17093
  }
@@ -19033,10 +19078,12 @@ jodit_config__WEBPACK_IMPORTED_MODULE_3__/* .Config */ .T.prototype.filebrowser
19033
19078
  jodit_config__WEBPACK_IMPORTED_MODULE_3__/* .Config */ .T.prototype.controls.filebrowser = {
19034
19079
  upload: {
19035
19080
  icon: 'plus',
19081
+ tooltip: 'Upload file',
19036
19082
  isInput: true,
19037
19083
  isDisabled: (browser) => !browser.dataProvider.canI('FileUpload'),
19038
- getContent: (filebrowser) => {
19084
+ getContent: (filebrowser, btnInt) => {
19039
19085
  const btn = new jodit_core_ui_form_inputs_file_file__WEBPACK_IMPORTED_MODULE_2__/* .UIFileInput */ .n(filebrowser, {
19086
+ tooltip: btnInt.control.tooltip,
19040
19087
  onlyImages: filebrowser.state.onlyImages
19041
19088
  });
19042
19089
  filebrowser.e.fire('bindUploader.filebrowser', btn.container);
@@ -19045,6 +19092,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_3__/* .Config */ .T.prototype.controls.fil
19045
19092
  },
19046
19093
  remove: {
19047
19094
  icon: 'bin',
19095
+ tooltip: 'Remove file',
19048
19096
  isDisabled: (browser) => {
19049
19097
  return (!browser.state.activeElements.length ||
19050
19098
  !browser.dataProvider.canI('FileRemove'));
@@ -19054,11 +19102,13 @@ jodit_config__WEBPACK_IMPORTED_MODULE_3__/* .Config */ .T.prototype.controls.fil
19054
19102
  }
19055
19103
  },
19056
19104
  update: {
19105
+ tooltip: 'Update file list',
19057
19106
  exec: (editor) => {
19058
19107
  editor.e.fire('update.filebrowser');
19059
19108
  }
19060
19109
  },
19061
19110
  select: {
19111
+ tooltip: 'Select file',
19062
19112
  icon: 'check',
19063
19113
  isDisabled: (browser) => !browser.state.activeElements.length,
19064
19114
  exec: (editor) => {
@@ -19066,6 +19116,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_3__/* .Config */ .T.prototype.controls.fil
19066
19116
  }
19067
19117
  },
19068
19118
  edit: {
19119
+ tooltip: 'Edit image',
19069
19120
  icon: 'pencil',
19070
19121
  isDisabled: (browser) => {
19071
19122
  const selected = browser.state.activeElements;
@@ -19079,6 +19130,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_3__/* .Config */ .T.prototype.controls.fil
19079
19130
  }
19080
19131
  },
19081
19132
  tiles: {
19133
+ tooltip: 'Tiles view',
19082
19134
  icon: 'th',
19083
19135
  isActive: (filebrowser) => filebrowser.state.view === 'tiles',
19084
19136
  exec: (filebrowser) => {
@@ -19086,6 +19138,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_3__/* .Config */ .T.prototype.controls.fil
19086
19138
  }
19087
19139
  },
19088
19140
  list: {
19141
+ tooltip: 'List view',
19089
19142
  icon: 'th-list',
19090
19143
  isActive: (filebrowser) => filebrowser.state.view === 'list',
19091
19144
  exec: (filebrowser) => {
@@ -19499,7 +19552,6 @@ let DataProvider = class DataProvider {
19499
19552
  data: {}
19500
19553
  };
19501
19554
  }
19502
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
19503
19555
  const query = this.o[type];
19504
19556
  if (query.data === undefined) {
19505
19557
  query.data = {
@@ -19745,7 +19797,6 @@ let FileBrowser = class FileBrowser extends jodit_core_view_view_with_toolbar__W
19745
19797
  get dataProvider() {
19746
19798
  return (0,_factories__WEBPACK_IMPORTED_MODULE_16__/* .makeDataProvider */ .S)(this, this.options);
19747
19799
  }
19748
- // eslint-disable-next-line no-unused-vars
19749
19800
  onSelect(callback) {
19750
19801
  return () => {
19751
19802
  if (this.state.activeElements.length) {
@@ -22258,7 +22309,6 @@ class Table extends jodit_core_component__WEBPACK_IMPORTED_MODULE_0__/* .ViewCom
22258
22309
  const selector = (0,jodit_core_helpers___WEBPACK_IMPORTED_MODULE_5__.cssPath)(td);
22259
22310
  selector && selectors.push(selector);
22260
22311
  });
22261
- // eslint-disable-next-line no-prototype-builtins
22262
22312
  style.innerHTML = selectors.length
22263
22313
  ? selectors.join(',') +
22264
22314
  `{${this.jodit.options.table.selectionCellStyle}}`
@@ -26057,6 +26107,7 @@ function checkNotCollapsed(jodit) {
26057
26107
  * ```
26058
26108
  * @private
26059
26109
  */
26110
+ // eslint-disable-next-line complexity
26060
26111
  function checkRemoveChar(jodit, fakeNode, backspace, mode) {
26061
26112
  const step = backspace ? -1 : 1;
26062
26113
  const anotherSibling = jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.sibling(fakeNode, !backspace);
@@ -30853,6 +30904,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_0__/* .Config */ .T.prototype.iframeStyle
30853
30904
  '-ms-user-select: none' +
30854
30905
  '}';
30855
30906
  jodit_config__WEBPACK_IMPORTED_MODULE_0__/* .Config */ .T.prototype.iframeCSSLinks = [];
30907
+ jodit_config__WEBPACK_IMPORTED_MODULE_0__/* .Config */ .T.prototype.iframeSandbox = null;
30856
30908
 
30857
30909
 
30858
30910
  /***/ }),
@@ -30929,6 +30981,9 @@ function iframe(editor) {
30929
30981
  iframe.setAttribute('allowtransparency', 'true');
30930
30982
  iframe.setAttribute('tabindex', opt.tabIndex.toString());
30931
30983
  iframe.setAttribute('frameborder', '0');
30984
+ if (opt.iframeSandbox != null) {
30985
+ iframe.setAttribute('sandbox', opt.iframeSandbox);
30986
+ }
30932
30987
  editor.workplace.appendChild(iframe);
30933
30988
  editor.iframe = iframe;
30934
30989
  const result = editor.e.fire('generateDocumentStructure.iframe', null, editor);
@@ -36700,13 +36755,13 @@ function generateCriticalCSS(jodit) {
36700
36755
  /* harmony import */ var jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17352);
36701
36756
  /* harmony import */ var jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(71842);
36702
36757
  /* harmony import */ var jodit_core_global__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(56298);
36703
- /* harmony import */ var jodit_core_helpers_utils_default_language__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(17527);
36704
- /* harmony import */ var jodit_core_helpers_utils_print__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(98434);
36705
- /* harmony import */ var jodit_core_ui_icon__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(931);
36706
- /* harmony import */ var jodit_config__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(36115);
36707
- /* harmony import */ var _lib_generate_critical_css__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(11131);
36708
- /* harmony import */ var _print_svg__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(59827);
36709
- /* harmony import */ var _print_svg__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_print_svg__WEBPACK_IMPORTED_MODULE_7__);
36758
+ /* harmony import */ var jodit_core_helpers_utils_default_language__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(17527);
36759
+ /* harmony import */ var jodit_core_helpers_utils_print__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(98434);
36760
+ /* harmony import */ var jodit_core_ui_icon__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(931);
36761
+ /* harmony import */ var jodit_config__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(36115);
36762
+ /* harmony import */ var _lib_generate_critical_css__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(11131);
36763
+ /* harmony import */ var _print_svg__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(59827);
36764
+ /* harmony import */ var _print_svg__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_print_svg__WEBPACK_IMPORTED_MODULE_8__);
36710
36765
  /*!
36711
36766
  * Jodit Editor (https://xdsoft.net/jodit/)
36712
36767
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -36721,8 +36776,8 @@ function generateCriticalCSS(jodit) {
36721
36776
 
36722
36777
 
36723
36778
 
36724
- jodit_core_ui_icon__WEBPACK_IMPORTED_MODULE_4__/* .Icon */ .I.set('print', (_print_svg__WEBPACK_IMPORTED_MODULE_7___default()));
36725
- jodit_config__WEBPACK_IMPORTED_MODULE_5__/* .Config */ .T.prototype.controls.print = {
36779
+ jodit_core_ui_icon__WEBPACK_IMPORTED_MODULE_5__/* .Icon */ .I.set('print', (_print_svg__WEBPACK_IMPORTED_MODULE_8___default()));
36780
+ jodit_config__WEBPACK_IMPORTED_MODULE_6__/* .Config */ .T.prototype.controls.print = {
36726
36781
  exec: (editor) => {
36727
36782
  const iframe = editor.create.element('iframe');
36728
36783
  Object.assign(iframe.style, {
@@ -36733,7 +36788,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_5__/* .Config */ .T.prototype.controls.pri
36733
36788
  height: 0,
36734
36789
  border: 0
36735
36790
  });
36736
- (0,jodit_core_global__WEBPACK_IMPORTED_MODULE_2__/* .getContainer */ .My)(editor, jodit_config__WEBPACK_IMPORTED_MODULE_5__/* .Config */ .T).appendChild(iframe);
36791
+ (0,jodit_core_global__WEBPACK_IMPORTED_MODULE_2__/* .getContainer */ .My)(editor, jodit_config__WEBPACK_IMPORTED_MODULE_6__/* .Config */ .T).appendChild(iframe);
36737
36792
  const afterFinishPrint = () => {
36738
36793
  editor.e.off(editor.ow, 'mousemove', afterFinishPrint);
36739
36794
  jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.safeRemove(iframe);
@@ -36749,12 +36804,12 @@ jodit_config__WEBPACK_IMPORTED_MODULE_5__/* .Config */ .T.prototype.controls.pri
36749
36804
  }
36750
36805
  else {
36751
36806
  myWindow.document.write('<!doctype html><html lang="' +
36752
- (0,jodit_core_helpers_utils_default_language__WEBPACK_IMPORTED_MODULE_8__/* .defaultLanguage */ .e)(editor.o.language) +
36807
+ (0,jodit_core_helpers_utils_default_language__WEBPACK_IMPORTED_MODULE_3__/* .defaultLanguage */ .e)(editor.o.language) +
36753
36808
  '"><head><title></title></head><style>' +
36754
- (0,_lib_generate_critical_css__WEBPACK_IMPORTED_MODULE_6__/* .generateCriticalCSS */ .Y)(editor) +
36809
+ (0,_lib_generate_critical_css__WEBPACK_IMPORTED_MODULE_7__/* .generateCriticalCSS */ .Y)(editor) +
36755
36810
  '</style><body></body></html>');
36756
36811
  myWindow.document.close();
36757
- (0,jodit_core_helpers_utils_print__WEBPACK_IMPORTED_MODULE_3__/* .previewBox */ .u)(editor, undefined, 'px', myWindow.document.body);
36812
+ (0,jodit_core_helpers_utils_print__WEBPACK_IMPORTED_MODULE_4__/* .previewBox */ .u)(editor, undefined, 'px', myWindow.document.body);
36758
36813
  }
36759
36814
  const style = myWindow.document.createElement('style');
36760
36815
  style.innerHTML = `@media print {
@@ -37830,10 +37885,11 @@ jodit_core_global__WEBPACK_IMPORTED_MODULE_3__/* .pluginSystem */ .fg.add('resiz
37830
37885
  /***/ (function(__unused_webpack_module, __unused_webpack___webpack_exports__, __webpack_require__) {
37831
37886
 
37832
37887
  "use strict";
37833
- /* harmony import */ var jodit_core_ui_icon__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(931);
37834
- /* harmony import */ var jodit_config__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(36115);
37835
- /* harmony import */ var _search_svg__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(21917);
37836
- /* harmony import */ var _search_svg__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_search_svg__WEBPACK_IMPORTED_MODULE_2__);
37888
+ /* harmony import */ var jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17352);
37889
+ /* harmony import */ var jodit_core_ui_icon__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(931);
37890
+ /* harmony import */ var jodit_config__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(36115);
37891
+ /* harmony import */ var _search_svg__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(21917);
37892
+ /* harmony import */ var _search_svg__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_search_svg__WEBPACK_IMPORTED_MODULE_3__);
37837
37893
  /*!
37838
37894
  * Jodit Editor (https://xdsoft.net/jodit/)
37839
37895
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -37843,14 +37899,14 @@ jodit_core_global__WEBPACK_IMPORTED_MODULE_3__/* .pluginSystem */ .fg.add('resiz
37843
37899
 
37844
37900
 
37845
37901
 
37846
- jodit_config__WEBPACK_IMPORTED_MODULE_1__/* .Config */ .T.prototype.useSearch = true;
37847
- jodit_config__WEBPACK_IMPORTED_MODULE_1__/* .Config */ .T.prototype.search = {
37902
+
37903
+ jodit_config__WEBPACK_IMPORTED_MODULE_2__/* .Config */ .T.prototype.useSearch = true;
37904
+ jodit_config__WEBPACK_IMPORTED_MODULE_2__/* .Config */ .T.prototype.search = {
37848
37905
  lazyIdleTimeout: 0,
37849
- // @ts-ignore Because Highlight is not defined in the types TS 5.3.3
37850
- useCustomHighlightAPI: typeof window.Highlight !== 'undefined'
37906
+ useCustomHighlightAPI: jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalWindow && typeof jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalWindow.Highlight !== 'undefined'
37851
37907
  };
37852
- jodit_core_ui_icon__WEBPACK_IMPORTED_MODULE_0__/* .Icon */ .I.set('search', (_search_svg__WEBPACK_IMPORTED_MODULE_2___default()));
37853
- jodit_config__WEBPACK_IMPORTED_MODULE_1__/* .Config */ .T.prototype.controls.find = {
37908
+ jodit_core_ui_icon__WEBPACK_IMPORTED_MODULE_1__/* .Icon */ .I.set('search', (_search_svg__WEBPACK_IMPORTED_MODULE_3___default()));
37909
+ jodit_config__WEBPACK_IMPORTED_MODULE_2__/* .Config */ .T.prototype.controls.find = {
37854
37910
  tooltip: 'Find',
37855
37911
  icon: 'search',
37856
37912
  exec(jodit, _, { control }) {
@@ -37891,8 +37947,9 @@ jodit_config__WEBPACK_IMPORTED_MODULE_1__/* .Config */ .T.prototype.controls.fin
37891
37947
  /* harmony export */ _B: function() { return /* binding */ highlightTextRanges; },
37892
37948
  /* harmony export */ zy: function() { return /* binding */ getSelectionWrappers; }
37893
37949
  /* harmony export */ });
37894
- /* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(55186);
37895
- /* harmony import */ var jodit_core_helpers_utils_selector__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(58720);
37950
+ /* harmony import */ var jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17352);
37951
+ /* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(55186);
37952
+ /* harmony import */ var jodit_core_helpers_utils_selector__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(58720);
37896
37953
  /*!
37897
37954
  * Jodit Editor (https://xdsoft.net/jodit/)
37898
37955
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -37900,6 +37957,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_1__/* .Config */ .T.prototype.controls.fin
37900
37957
  */
37901
37958
 
37902
37959
 
37960
+
37903
37961
  /**
37904
37962
  * @private
37905
37963
  */
@@ -37918,15 +37976,15 @@ function highlightTextRanges(jodit, rng, restRanges, ci, root) {
37918
37976
  const span = ci.element('span', {
37919
37977
  [TMP_ATTR]: true
37920
37978
  });
37921
- jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.markTemporary(span);
37979
+ jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.markTemporary(span);
37922
37980
  normalizeRanges(rng, restRanges, ci);
37923
37981
  let next = rng.startContainer;
37924
37982
  do {
37925
37983
  if (!next) {
37926
37984
  break;
37927
37985
  }
37928
- if (jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.isText(next) && !isSelectionWrapper(next.parentNode)) {
37929
- jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.wrap(next, span.cloneNode(), ci);
37986
+ if (jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isText(next) && !isSelectionWrapper(next.parentNode)) {
37987
+ jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.wrap(next, span.cloneNode(), ci);
37930
37988
  }
37931
37989
  if (next === rng.endContainer) {
37932
37990
  break;
@@ -37945,13 +38003,13 @@ function highlightTextRanges(jodit, rng, restRanges, ci, root) {
37945
38003
  * @private
37946
38004
  */
37947
38005
  function getSelectionWrappers(root) {
37948
- return (0,jodit_core_helpers_utils_selector__WEBPACK_IMPORTED_MODULE_1__.$$)(`[${TMP_ATTR}]`, root);
38006
+ return (0,jodit_core_helpers_utils_selector__WEBPACK_IMPORTED_MODULE_2__.$$)(`[${TMP_ATTR}]`, root);
37949
38007
  }
37950
38008
  /**
37951
38009
  * @private
37952
38010
  */
37953
38011
  function clearSelectionWrappers(root) {
37954
- getSelectionWrappers(root).forEach(span => jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.unwrap(span));
38012
+ getSelectionWrappers(root).forEach(span => jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.unwrap(span));
37955
38013
  }
37956
38014
  /**
37957
38015
  * @private
@@ -37963,12 +38021,13 @@ function clearSelectionWrappersFromHTML(root) {
37963
38021
  * @private
37964
38022
  */
37965
38023
  function isSelectionWrapper(node) {
37966
- return jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.isElement(node) && node.hasAttribute(TMP_ATTR);
38024
+ return jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isElement(node) && node.hasAttribute(TMP_ATTR);
37967
38025
  }
37968
38026
  function checkNativeSelectionMethod(jodit, rng, restRanges) {
37969
38027
  if (jodit.o.search.useCustomHighlightAPI &&
37970
38028
  // @ts-ignore Because Highlight is not defined in the types TS 5.3.3
37971
- typeof window.Highlight !== 'undefined') {
38029
+ jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalWindow &&
38030
+ typeof jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalWindow.Highlight !== 'undefined') {
37972
38031
  const ranges = [rng, ...restRanges].map(rng => {
37973
38032
  const range = jodit.selection.createRange();
37974
38033
  range.setStart(rng.startContainer, rng.startOffset);
@@ -37992,7 +38051,7 @@ function normalizeRanges(rng, restRanges, ci) {
37992
38051
  if (rng.startOffset !== 0) {
37993
38052
  const text = ci.text(startText.substring(0, rng.startOffset));
37994
38053
  rng.startContainer.nodeValue = startText.substring(rng.startOffset);
37995
- jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.before(rng.startContainer, text);
38054
+ jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.before(rng.startContainer, text);
37996
38055
  if (rng.startContainer === rng.endContainer) {
37997
38056
  diff = rng.startOffset;
37998
38057
  rng.endOffset -= diff;
@@ -38003,7 +38062,7 @@ function normalizeRanges(rng, restRanges, ci) {
38003
38062
  if (rng.endOffset !== endText.length) {
38004
38063
  const text = ci.text(endText.substring(rng.endOffset));
38005
38064
  rng.endContainer.nodeValue = endText.substring(0, rng.endOffset);
38006
- jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.after(rng.endContainer, text);
38065
+ jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.after(rng.endContainer, text);
38007
38066
  for (const range of restRanges) {
38008
38067
  if (range.startContainer === rng.endContainer) {
38009
38068
  range.startContainer = text;
@@ -40874,6 +40933,7 @@ jodit_core_global__WEBPACK_IMPORTED_MODULE_1__/* .pluginSystem */ .fg.add('spell
40874
40933
 
40875
40934
  jodit_config__WEBPACK_IMPORTED_MODULE_0__/* .Config */ .T.prototype.showCharsCounter = true;
40876
40935
  jodit_config__WEBPACK_IMPORTED_MODULE_0__/* .Config */ .T.prototype.countHTMLChars = false;
40936
+ jodit_config__WEBPACK_IMPORTED_MODULE_0__/* .Config */ .T.prototype.countTextSpaces = false;
40877
40937
  jodit_config__WEBPACK_IMPORTED_MODULE_0__/* .Config */ .T.prototype.showWordsCounter = true;
40878
40938
 
40879
40939
 
@@ -40920,9 +40980,20 @@ class stat extends jodit_core_plugin_plugin__WEBPACK_IMPORTED_MODULE_3__/* .Plug
40920
40980
  this.calc = this.j.async.throttle(() => {
40921
40981
  const text = this.j.text;
40922
40982
  if (this.j.o.showCharsCounter && this.charCounter) {
40923
- const chars = this.j.o.countHTMLChars
40924
- ? this.j.value
40925
- : text.replace((0,jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.SPACE_REG_EXP)(), '');
40983
+ let chars;
40984
+ if (this.j.o.countHTMLChars) {
40985
+ chars = this.j.value;
40986
+ }
40987
+ else {
40988
+ if (this.j.o.countTextSpaces) {
40989
+ chars = text
40990
+ .replace((0,jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.INVISIBLE_SPACE_REG_EXP)(), '')
40991
+ .replace(/[\r\n]/g, '');
40992
+ }
40993
+ else {
40994
+ chars = text.replace((0,jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.SPACE_REG_EXP)(), '');
40995
+ }
40996
+ }
40926
40997
  this.charCounter.textContent = this.j.i18n('Chars: %d', chars.length);
40927
40998
  }
40928
40999
  if (this.j.o.showWordsCounter && this.wordCounter) {
@@ -41556,8 +41627,9 @@ __webpack_require__.r(__webpack_exports__);
41556
41627
  /* harmony export */ pt_br: function() { return /* reexport module object */ _pt_br_js__WEBPACK_IMPORTED_MODULE_16__; },
41557
41628
  /* harmony export */ ru: function() { return /* reexport module object */ _ru_js__WEBPACK_IMPORTED_MODULE_17__; },
41558
41629
  /* harmony export */ tr: function() { return /* reexport module object */ _tr_js__WEBPACK_IMPORTED_MODULE_18__; },
41559
- /* harmony export */ zh_cn: function() { return /* reexport module object */ _zh_cn_js__WEBPACK_IMPORTED_MODULE_19__; },
41560
- /* harmony export */ zh_tw: function() { return /* reexport module object */ _zh_tw_js__WEBPACK_IMPORTED_MODULE_20__; }
41630
+ /* harmony export */ ua: function() { return /* reexport module object */ _ua_js__WEBPACK_IMPORTED_MODULE_19__; },
41631
+ /* harmony export */ zh_cn: function() { return /* reexport module object */ _zh_cn_js__WEBPACK_IMPORTED_MODULE_20__; },
41632
+ /* harmony export */ zh_tw: function() { return /* reexport module object */ _zh_tw_js__WEBPACK_IMPORTED_MODULE_21__; }
41561
41633
  /* harmony export */ });
41562
41634
  /* harmony import */ var _ar_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(37605);
41563
41635
  /* harmony import */ var _ar_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_ar_js__WEBPACK_IMPORTED_MODULE_0__);
@@ -41597,10 +41669,12 @@ __webpack_require__.r(__webpack_exports__);
41597
41669
  /* harmony import */ var _ru_js__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(_ru_js__WEBPACK_IMPORTED_MODULE_17__);
41598
41670
  /* harmony import */ var _tr_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(98376);
41599
41671
  /* harmony import */ var _tr_js__WEBPACK_IMPORTED_MODULE_18___default = /*#__PURE__*/__webpack_require__.n(_tr_js__WEBPACK_IMPORTED_MODULE_18__);
41600
- /* harmony import */ var _zh_cn_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(47238);
41601
- /* harmony import */ var _zh_cn_js__WEBPACK_IMPORTED_MODULE_19___default = /*#__PURE__*/__webpack_require__.n(_zh_cn_js__WEBPACK_IMPORTED_MODULE_19__);
41602
- /* harmony import */ var _zh_tw_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(72386);
41603
- /* harmony import */ var _zh_tw_js__WEBPACK_IMPORTED_MODULE_20___default = /*#__PURE__*/__webpack_require__.n(_zh_tw_js__WEBPACK_IMPORTED_MODULE_20__);
41672
+ /* harmony import */ var _ua_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(28776);
41673
+ /* harmony import */ var _ua_js__WEBPACK_IMPORTED_MODULE_19___default = /*#__PURE__*/__webpack_require__.n(_ua_js__WEBPACK_IMPORTED_MODULE_19__);
41674
+ /* harmony import */ var _zh_cn_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(47238);
41675
+ /* harmony import */ var _zh_cn_js__WEBPACK_IMPORTED_MODULE_20___default = /*#__PURE__*/__webpack_require__.n(_zh_cn_js__WEBPACK_IMPORTED_MODULE_20__);
41676
+ /* harmony import */ var _zh_tw_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(72386);
41677
+ /* harmony import */ var _zh_tw_js__WEBPACK_IMPORTED_MODULE_21___default = /*#__PURE__*/__webpack_require__.n(_zh_tw_js__WEBPACK_IMPORTED_MODULE_21__);
41604
41678
  /*!
41605
41679
  * Jodit Editor (https://xdsoft.net/jodit/)
41606
41680
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -41628,6 +41702,7 @@ __webpack_require__.r(__webpack_exports__);
41628
41702
 
41629
41703
 
41630
41704
 
41705
+
41631
41706
 
41632
41707
 
41633
41708
  /***/ }),
@@ -41783,6 +41858,23 @@ module.exports = {
41783
41858
  };
41784
41859
 
41785
41860
 
41861
+ /***/ }),
41862
+
41863
+ /***/ 28776:
41864
+ /***/ (function(module) {
41865
+
41866
+ "use strict";
41867
+
41868
+ /*!
41869
+ * Jodit Editor (https://xdsoft.net/jodit/)
41870
+ * Released under MIT see LICENSE.txt in the project root for license information.
41871
+ * Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
41872
+ */
41873
+ module.exports = {
41874
+ symbols: 'символ'
41875
+ };
41876
+
41877
+
41786
41878
  /***/ }),
41787
41879
 
41788
41880
  /***/ 47238:
@@ -43854,7 +43946,7 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
43854
43946
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
43855
43947
  PERFORMANCE OF THIS SOFTWARE.
43856
43948
  ***************************************************************************** */
43857
- /* global Reflect, Promise, SuppressedError, Symbol */
43949
+ /* global Reflect, Promise, SuppressedError, Symbol, Iterator */
43858
43950
 
43859
43951
  var extendStatics = function(d, b) {
43860
43952
  extendStatics = Object.setPrototypeOf ||
@@ -43965,8 +44057,8 @@ function __awaiter(thisArg, _arguments, P, generator) {
43965
44057
  }
43966
44058
 
43967
44059
  function __generator(thisArg, body) {
43968
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
43969
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
44060
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
44061
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
43970
44062
  function verb(n) { return function (v) { return step([n, v]); }; }
43971
44063
  function step(op) {
43972
44064
  if (f) throw new TypeError("Generator is already executing.");
@@ -44070,8 +44162,9 @@ function __await(v) {
44070
44162
  function __asyncGenerator(thisArg, _arguments, generator) {
44071
44163
  if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
44072
44164
  var g = generator.apply(thisArg, _arguments || []), i, q = [];
44073
- return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
44074
- function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
44165
+ return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;
44166
+ function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }
44167
+ function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }
44075
44168
  function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
44076
44169
  function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
44077
44170
  function fulfill(value) { resume("next", value); }
@@ -44137,16 +44230,18 @@ function __classPrivateFieldIn(state, receiver) {
44137
44230
  function __addDisposableResource(env, value, async) {
44138
44231
  if (value !== null && value !== void 0) {
44139
44232
  if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected.");
44140
- var dispose;
44233
+ var dispose, inner;
44141
44234
  if (async) {
44142
- if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined.");
44143
- dispose = value[Symbol.asyncDispose];
44235
+ if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined.");
44236
+ dispose = value[Symbol.asyncDispose];
44144
44237
  }
44145
44238
  if (dispose === void 0) {
44146
- if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined.");
44147
- dispose = value[Symbol.dispose];
44239
+ if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined.");
44240
+ dispose = value[Symbol.dispose];
44241
+ if (async) inner = dispose;
44148
44242
  }
44149
44243
  if (typeof dispose !== "function") throw new TypeError("Object not disposable.");
44244
+ if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };
44150
44245
  env.stack.push({ value: value, dispose: dispose, async: async });
44151
44246
  }
44152
44247
  else if (async) {
@@ -44165,17 +44260,22 @@ function __disposeResources(env) {
44165
44260
  env.error = env.hasError ? new _SuppressedError(e, env.error, "An error was suppressed during disposal.") : e;
44166
44261
  env.hasError = true;
44167
44262
  }
44263
+ var r, s = 0;
44168
44264
  function next() {
44169
- while (env.stack.length) {
44170
- var rec = env.stack.pop();
44265
+ while (r = env.stack.pop()) {
44171
44266
  try {
44172
- var result = rec.dispose && rec.dispose.call(rec.value);
44173
- if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); });
44267
+ if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);
44268
+ if (r.dispose) {
44269
+ var result = r.dispose.call(r.value);
44270
+ if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });
44271
+ }
44272
+ else s |= 1;
44174
44273
  }
44175
44274
  catch (e) {
44176
- fail(e);
44275
+ fail(e);
44177
44276
  }
44178
44277
  }
44278
+ if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();
44179
44279
  if (env.hasError) throw env.error;
44180
44280
  }
44181
44281
  return next();