jodit 4.5.11 → 4.5.14

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 (60) hide show
  1. package/CHANGELOG.md +36 -0
  2. package/es2015/jodit.css +1 -1
  3. package/es2015/jodit.fat.min.js +2 -2
  4. package/es2015/jodit.js +36175 -36175
  5. package/es2015/jodit.min.js +2 -2
  6. package/es2015/plugins/debug/debug.css +1 -1
  7. package/es2015/plugins/debug/debug.js +1 -1
  8. package/es2015/plugins/debug/debug.min.js +1 -1
  9. package/es2015/plugins/speech-recognize/speech-recognize.css +1 -1
  10. package/es2015/plugins/speech-recognize/speech-recognize.js +750 -750
  11. package/es2015/plugins/speech-recognize/speech-recognize.min.js +2 -2
  12. package/es2018/jodit.css +1 -1
  13. package/es2018/jodit.fat.min.js +2 -2
  14. package/es2018/jodit.js +36702 -36702
  15. package/es2018/jodit.min.js +2 -2
  16. package/es2018/plugins/debug/debug.css +1 -1
  17. package/es2018/plugins/debug/debug.js +1 -1
  18. package/es2018/plugins/debug/debug.min.js +1 -1
  19. package/es2018/plugins/speech-recognize/speech-recognize.css +1 -1
  20. package/es2018/plugins/speech-recognize/speech-recognize.js +750 -750
  21. package/es2018/plugins/speech-recognize/speech-recognize.min.js +2 -2
  22. package/es2021/jodit.css +1 -1
  23. package/es2021/jodit.fat.min.js +2 -2
  24. package/es2021/jodit.js +35844 -35844
  25. package/es2021/jodit.min.js +2 -2
  26. package/es2021/plugins/debug/debug.css +1 -1
  27. package/es2021/plugins/debug/debug.js +1 -1
  28. package/es2021/plugins/debug/debug.min.js +1 -1
  29. package/es2021/plugins/speech-recognize/speech-recognize.css +1 -1
  30. package/es2021/plugins/speech-recognize/speech-recognize.js +748 -748
  31. package/es2021/plugins/speech-recognize/speech-recognize.min.js +2 -2
  32. package/es2021.en/jodit.css +1 -1
  33. package/es2021.en/jodit.fat.min.js +2 -2
  34. package/es2021.en/jodit.js +34625 -34625
  35. package/es2021.en/jodit.min.js +2 -2
  36. package/es2021.en/plugins/debug/debug.css +1 -1
  37. package/es2021.en/plugins/debug/debug.js +1 -1
  38. package/es2021.en/plugins/debug/debug.min.js +1 -1
  39. package/es2021.en/plugins/speech-recognize/speech-recognize.css +1 -1
  40. package/es2021.en/plugins/speech-recognize/speech-recognize.js +224 -224
  41. package/es2021.en/plugins/speech-recognize/speech-recognize.min.js +2 -2
  42. package/es5/415.fat.min.js +2 -2
  43. package/es5/415.js +3902 -3900
  44. package/es5/415.min.js +2 -2
  45. package/es5/5.fat.min.js +1 -1
  46. package/es5/5.min.js +1 -1
  47. package/es5/jodit.css +2 -2
  48. package/es5/jodit.fat.min.js +2 -2
  49. package/es5/jodit.js +38058 -38058
  50. package/es5/jodit.min.css +2 -2
  51. package/es5/jodit.min.js +2 -2
  52. package/es5/plugins/debug/debug.css +1 -1
  53. package/es5/plugins/debug/debug.js +1 -1
  54. package/es5/plugins/debug/debug.min.js +1 -1
  55. package/es5/plugins/speech-recognize/speech-recognize.css +1 -1
  56. package/es5/plugins/speech-recognize/speech-recognize.js +800 -800
  57. package/es5/plugins/speech-recognize/speech-recognize.min.js +2 -2
  58. package/esm/core/constants.js +1 -1
  59. package/esm/plugins/all.js +3 -0
  60. package/package.json +1 -1
@@ -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.5.11
4
+ * Version: v4.5.14
5
5
  * Url: https://xdsoft.net/jodit/
6
6
  * License(s): MIT
7
7
  */
@@ -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.5.11
4
+ * Version: v4.5.14
5
5
  * Url: https://xdsoft.net/jodit/
6
6
  * License(s): MIT
7
7
  */
@@ -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.5.11
4
+ * Version: v4.5.14
5
5
  * Url: https://xdsoft.net/jodit/
6
6
  * License(s): MIT
7
7
  */
@@ -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.5.11
4
+ * Version: v4.5.14
5
5
  * Url: https://xdsoft.net/jodit/
6
6
  * License(s): MIT
7
7
  */
@@ -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.5.11
4
+ * Version: v4.5.14
5
5
  * Url: https://xdsoft.net/jodit/
6
6
  * License(s): MIT
7
7
  */
@@ -18,6 +18,220 @@
18
18
  })(self, function() {
19
19
  return (self["webpackChunkjodit"] = self["webpackChunkjodit"] || []).push([[882],{
20
20
 
21
+ /***/ 22227:
22
+ /***/ (function(module) {
23
+
24
+ module.exports = "<svg viewBox=\"0 0 16 16\" xml:space=\"preserve\" xmlns=\"http://www.w3.org/2000/svg\"> <path d=\"M8,11c1.657,0,3-1.343,3-3V3c0-1.657-1.343-3-3-3S5,1.343,5,3v5C5,9.657,6.343,11,8,11z\"/> <path d=\"M13,8V6h-1l0,1.844c0,1.92-1.282,3.688-3.164,4.071C6.266,12.438,4,10.479,4,8V6H3v2c0,2.414,1.721,4.434,4,4.899V15H5v1h6 v-1H9v-2.101C11.279,12.434,13,10.414,13,8z\"/> </svg>"
25
+
26
+ /***/ }),
27
+
28
+ /***/ 25202:
29
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
30
+
31
+ "use strict";
32
+ __webpack_require__.r(__webpack_exports__);
33
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
34
+ /* harmony export */ ar: function() { return /* reexport module object */ _ar_js__WEBPACK_IMPORTED_MODULE_0__; },
35
+ /* harmony export */ cs_cz: function() { return /* reexport module object */ _ar_js__WEBPACK_IMPORTED_MODULE_0__; },
36
+ /* harmony export */ de: function() { return /* reexport module object */ _ar_js__WEBPACK_IMPORTED_MODULE_0__; },
37
+ /* harmony export */ es: function() { return /* reexport module object */ _ar_js__WEBPACK_IMPORTED_MODULE_0__; },
38
+ /* harmony export */ fa: function() { return /* reexport module object */ _ar_js__WEBPACK_IMPORTED_MODULE_0__; },
39
+ /* harmony export */ fi: function() { return /* reexport module object */ _ar_js__WEBPACK_IMPORTED_MODULE_0__; },
40
+ /* harmony export */ fr: function() { return /* reexport module object */ _ar_js__WEBPACK_IMPORTED_MODULE_0__; },
41
+ /* harmony export */ he: function() { return /* reexport module object */ _ar_js__WEBPACK_IMPORTED_MODULE_0__; },
42
+ /* harmony export */ hu: function() { return /* reexport module object */ _ar_js__WEBPACK_IMPORTED_MODULE_0__; },
43
+ /* harmony export */ id: function() { return /* reexport module object */ _ar_js__WEBPACK_IMPORTED_MODULE_0__; },
44
+ /* harmony export */ it: function() { return /* reexport module object */ _ar_js__WEBPACK_IMPORTED_MODULE_0__; },
45
+ /* harmony export */ ja: function() { return /* reexport module object */ _ar_js__WEBPACK_IMPORTED_MODULE_0__; },
46
+ /* harmony export */ ko: function() { return /* reexport module object */ _ar_js__WEBPACK_IMPORTED_MODULE_0__; },
47
+ /* harmony export */ mn: function() { return /* reexport module object */ _ar_js__WEBPACK_IMPORTED_MODULE_0__; },
48
+ /* harmony export */ nl: function() { return /* reexport module object */ _ar_js__WEBPACK_IMPORTED_MODULE_0__; },
49
+ /* harmony export */ pl: function() { return /* reexport module object */ _ar_js__WEBPACK_IMPORTED_MODULE_0__; },
50
+ /* harmony export */ pt_br: function() { return /* reexport module object */ _ar_js__WEBPACK_IMPORTED_MODULE_0__; },
51
+ /* harmony export */ ru: function() { return /* reexport module object */ _ar_js__WEBPACK_IMPORTED_MODULE_0__; },
52
+ /* harmony export */ tr: function() { return /* reexport module object */ _ar_js__WEBPACK_IMPORTED_MODULE_0__; },
53
+ /* harmony export */ ua: function() { return /* reexport module object */ _ar_js__WEBPACK_IMPORTED_MODULE_0__; },
54
+ /* harmony export */ zh_cn: function() { return /* reexport module object */ _ar_js__WEBPACK_IMPORTED_MODULE_0__; },
55
+ /* harmony export */ zh_tw: function() { return /* reexport module object */ _ar_js__WEBPACK_IMPORTED_MODULE_0__; }
56
+ /* harmony export */ });
57
+ /* harmony import */ var _ar_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(41324);
58
+ /* harmony import */ var _ar_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_ar_js__WEBPACK_IMPORTED_MODULE_0__);
59
+ /*!
60
+ * Jodit Editor (https://xdsoft.net/jodit/)
61
+ * Released under MIT see LICENSE.txt in the project root for license information.
62
+ * Copyright (c) 2013-2025 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
63
+ */
64
+ // @ts-nocheck
65
+
66
+
67
+
68
+
69
+
70
+
71
+
72
+
73
+
74
+
75
+
76
+
77
+
78
+
79
+
80
+
81
+
82
+
83
+
84
+
85
+
86
+
87
+
88
+
89
+
90
+ /***/ }),
91
+
92
+ /***/ 37873:
93
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
94
+
95
+ "use strict";
96
+ __webpack_require__.r(__webpack_exports__);
97
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
98
+ /* harmony export */ SpeechRecognizeNative: function() { return /* binding */ SpeechRecognizeNative; }
99
+ /* harmony export */ });
100
+ /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(31635);
101
+ /* harmony import */ var jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(66927);
102
+ /* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(55186);
103
+ /* harmony import */ var jodit_core_global__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(56298);
104
+ /* harmony import */ var jodit_core_helpers_utils_utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(84976);
105
+ /* harmony import */ var jodit_core_plugin__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(71005);
106
+ /* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(71096);
107
+ /* harmony import */ var _jodit__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(46173);
108
+ /* harmony import */ var _helpers_exec_spell_command__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(50834);
109
+ /* harmony import */ var _langs__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(25202);
110
+ /*!
111
+ * Jodit Editor (https://xdsoft.net/jodit/)
112
+ * Released under MIT see LICENSE.txt in the project root for license information.
113
+ * Copyright (c) 2013-2025 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
114
+ */
115
+
116
+
117
+
118
+
119
+
120
+
121
+
122
+
123
+
124
+
125
+
126
+ class SpeechRecognizeNative extends jodit_core_plugin__WEBPACK_IMPORTED_MODULE_4__/* .Plugin */ .k {
127
+ constructor() {
128
+ super(...arguments);
129
+ this.buttons = [
130
+ {
131
+ group: 'state',
132
+ name: 'speechRecognize'
133
+ }
134
+ ];
135
+ this._commandToWord = {};
136
+ }
137
+ afterInit(jodit) {
138
+ const { commands } = jodit.o.speechRecognize;
139
+ if (commands) {
140
+ (0,jodit_core_global__WEBPACK_IMPORTED_MODULE_2__/* .extendLang */ .JW)(_langs__WEBPACK_IMPORTED_MODULE_7__);
141
+ (0,jodit_core_helpers_utils_utils__WEBPACK_IMPORTED_MODULE_3__/* .keys */ .HP)(commands, false).forEach(words => {
142
+ const keys = words.split('|');
143
+ keys.forEach(key => {
144
+ key = key.trim().toLowerCase();
145
+ this._commandToWord[key] = commands[words];
146
+ const translatedKeys = jodit.i18n(key);
147
+ if (translatedKeys !== key) {
148
+ translatedKeys.split('|').forEach(translatedKey => {
149
+ this._commandToWord[translatedKey.trim().toLowerCase()] = commands[words].trim();
150
+ });
151
+ }
152
+ });
153
+ });
154
+ }
155
+ }
156
+ beforeDestruct(jodit) {
157
+ jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.safeRemove(this.messagePopup);
158
+ }
159
+ onSpeechRecognizeProgressResult(text) {
160
+ if (!this.messagePopup) {
161
+ this.messagePopup = this.j.create.div('jodit-speech-recognize__popup');
162
+ }
163
+ this.j.workplace.appendChild(this.messagePopup);
164
+ this.j.async.clearTimeout(this.__hidePopupTimeout);
165
+ this.__hidePopupTimeout = this.j.async.setTimeout(() => {
166
+ jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.safeRemove(this.messagePopup);
167
+ }, 1000);
168
+ this.messagePopup.innerText = text + '|';
169
+ }
170
+ onSpeechRecognizeResult(text) {
171
+ this.j.async.clearTimeout(this.__hidePopupTimeout);
172
+ jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.safeRemove(this.messagePopup);
173
+ const { j } = this;
174
+ const { s } = j;
175
+ if (!this._checkCommand(text)) {
176
+ const { range } = s, node = s.current();
177
+ if (s.isCollapsed() &&
178
+ jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isText(node) &&
179
+ jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isOrContains(j.editor, node) &&
180
+ node.nodeValue) {
181
+ const sentence = node.nodeValue;
182
+ node.nodeValue =
183
+ sentence +
184
+ (/[\u00A0 ]\uFEFF*$/.test(sentence) ? '' : ' ') +
185
+ text;
186
+ range.setStartAfter(node);
187
+ s.selectRange(range);
188
+ j.synchronizeValues();
189
+ }
190
+ else {
191
+ s.insertHTML(text);
192
+ }
193
+ }
194
+ }
195
+ _checkCommand(command) {
196
+ command = command.toLowerCase().replace(/\./g, '');
197
+ if (this._commandToWord[command]) {
198
+ (0,_helpers_exec_spell_command__WEBPACK_IMPORTED_MODULE_8__/* .execSpellCommand */ .F)(this.j, this._commandToWord[command]);
199
+ return true;
200
+ }
201
+ return false;
202
+ }
203
+ }
204
+ (0,tslib__WEBPACK_IMPORTED_MODULE_9__/* .__decorate */ .Cg)([
205
+ (0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_0__/* .watch */ .w)(':speechRecognizeProgressResult')
206
+ ], SpeechRecognizeNative.prototype, "onSpeechRecognizeProgressResult", null);
207
+ (0,tslib__WEBPACK_IMPORTED_MODULE_9__/* .__decorate */ .Cg)([
208
+ (0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_0__/* .watch */ .w)(':speechRecognizeResult')
209
+ ], SpeechRecognizeNative.prototype, "onSpeechRecognizeResult", null);
210
+ _jodit__WEBPACK_IMPORTED_MODULE_6__/* .Jodit */ .x.plugins.add('speech-recognize', SpeechRecognizeNative);
211
+
212
+
213
+ /***/ }),
214
+
215
+ /***/ 50834:
216
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
217
+
218
+ "use strict";
219
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
220
+ /* harmony export */ F: function() { return /* binding */ execSpellCommand; }
221
+ /* harmony export */ });
222
+ /*!
223
+ * Jodit Editor (https://xdsoft.net/jodit/)
224
+ * Released under MIT see LICENSE.txt in the project root for license information.
225
+ * Copyright (c) 2013-2025 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
226
+ */
227
+ function execSpellCommand(jodit, commandSentence) {
228
+ const [command, value] = commandSentence.split('::');
229
+ jodit.execCommand(command, null, value);
230
+ }
231
+
232
+
233
+ /***/ }),
234
+
21
235
  /***/ 71096:
22
236
  /***/ (function(__unused_webpack_module, __unused_webpack___webpack_exports__, __webpack_require__) {
23
237
 
@@ -138,29 +352,6 @@ jodit_config__WEBPACK_IMPORTED_MODULE_3__/* .Config */ .T.prototype.controls.spe
138
352
  };
139
353
 
140
354
 
141
- /***/ }),
142
-
143
- /***/ 81629:
144
- /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
145
-
146
- "use strict";
147
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
148
- /* harmony export */ N: function() { return /* binding */ PII; },
149
- /* harmony export */ Z: function() { return /* binding */ WARN; }
150
- /* harmony export */ });
151
- /*!
152
- * Jodit Editor (https://xdsoft.net/jodit/)
153
- * Released under MIT see LICENSE.txt in the project root for license information.
154
- * Copyright (c) 2013-2025 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
155
- */
156
- /**
157
- * @module plugins/speech-recognize
158
- * @internal
159
- */
160
- const PII = 440;
161
- const WARN = 940;
162
-
163
-
164
355
  /***/ }),
165
356
 
166
357
  /***/ 71722:
@@ -185,22 +376,25 @@ const SpeechRecognition = jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.glob
185
376
 
186
377
  /***/ }),
187
378
 
188
- /***/ 50834:
379
+ /***/ 81629:
189
380
  /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
190
381
 
191
382
  "use strict";
192
383
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
193
- /* harmony export */ F: function() { return /* binding */ execSpellCommand; }
384
+ /* harmony export */ N: function() { return /* binding */ PII; },
385
+ /* harmony export */ Z: function() { return /* binding */ WARN; }
194
386
  /* harmony export */ });
195
387
  /*!
196
388
  * Jodit Editor (https://xdsoft.net/jodit/)
197
389
  * Released under MIT see LICENSE.txt in the project root for license information.
198
390
  * Copyright (c) 2013-2025 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
199
391
  */
200
- function execSpellCommand(jodit, commandSentence) {
201
- const [command, value] = commandSentence.split('::');
202
- jodit.execCommand(command, null, value);
203
- }
392
+ /**
393
+ * @module plugins/speech-recognize
394
+ * @internal
395
+ */
396
+ const PII = 440;
397
+ const WARN = 940;
204
398
 
205
399
 
206
400
  /***/ }),
@@ -439,200 +633,6 @@ function sound({ sec = 0.1, frequency = jodit_plugins_speech_recognize_constants
439
633
  }
440
634
 
441
635
 
442
- /***/ }),
443
-
444
- /***/ 25202:
445
- /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
446
-
447
- "use strict";
448
- __webpack_require__.r(__webpack_exports__);
449
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
450
- /* harmony export */ ar: function() { return /* reexport module object */ _ar_js__WEBPACK_IMPORTED_MODULE_0__; },
451
- /* harmony export */ cs_cz: function() { return /* reexport module object */ _ar_js__WEBPACK_IMPORTED_MODULE_0__; },
452
- /* harmony export */ de: function() { return /* reexport module object */ _ar_js__WEBPACK_IMPORTED_MODULE_0__; },
453
- /* harmony export */ es: function() { return /* reexport module object */ _ar_js__WEBPACK_IMPORTED_MODULE_0__; },
454
- /* harmony export */ fa: function() { return /* reexport module object */ _ar_js__WEBPACK_IMPORTED_MODULE_0__; },
455
- /* harmony export */ fi: function() { return /* reexport module object */ _ar_js__WEBPACK_IMPORTED_MODULE_0__; },
456
- /* harmony export */ fr: function() { return /* reexport module object */ _ar_js__WEBPACK_IMPORTED_MODULE_0__; },
457
- /* harmony export */ he: function() { return /* reexport module object */ _ar_js__WEBPACK_IMPORTED_MODULE_0__; },
458
- /* harmony export */ hu: function() { return /* reexport module object */ _ar_js__WEBPACK_IMPORTED_MODULE_0__; },
459
- /* harmony export */ id: function() { return /* reexport module object */ _ar_js__WEBPACK_IMPORTED_MODULE_0__; },
460
- /* harmony export */ it: function() { return /* reexport module object */ _ar_js__WEBPACK_IMPORTED_MODULE_0__; },
461
- /* harmony export */ ja: function() { return /* reexport module object */ _ar_js__WEBPACK_IMPORTED_MODULE_0__; },
462
- /* harmony export */ ko: function() { return /* reexport module object */ _ar_js__WEBPACK_IMPORTED_MODULE_0__; },
463
- /* harmony export */ mn: function() { return /* reexport module object */ _ar_js__WEBPACK_IMPORTED_MODULE_0__; },
464
- /* harmony export */ nl: function() { return /* reexport module object */ _ar_js__WEBPACK_IMPORTED_MODULE_0__; },
465
- /* harmony export */ pl: function() { return /* reexport module object */ _ar_js__WEBPACK_IMPORTED_MODULE_0__; },
466
- /* harmony export */ pt_br: function() { return /* reexport module object */ _ar_js__WEBPACK_IMPORTED_MODULE_0__; },
467
- /* harmony export */ ru: function() { return /* reexport module object */ _ar_js__WEBPACK_IMPORTED_MODULE_0__; },
468
- /* harmony export */ tr: function() { return /* reexport module object */ _ar_js__WEBPACK_IMPORTED_MODULE_0__; },
469
- /* harmony export */ ua: function() { return /* reexport module object */ _ar_js__WEBPACK_IMPORTED_MODULE_0__; },
470
- /* harmony export */ zh_cn: function() { return /* reexport module object */ _ar_js__WEBPACK_IMPORTED_MODULE_0__; },
471
- /* harmony export */ zh_tw: function() { return /* reexport module object */ _ar_js__WEBPACK_IMPORTED_MODULE_0__; }
472
- /* harmony export */ });
473
- /* harmony import */ var _ar_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(41324);
474
- /* harmony import */ var _ar_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_ar_js__WEBPACK_IMPORTED_MODULE_0__);
475
- /*!
476
- * Jodit Editor (https://xdsoft.net/jodit/)
477
- * Released under MIT see LICENSE.txt in the project root for license information.
478
- * Copyright (c) 2013-2025 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
479
- */
480
- // @ts-nocheck
481
-
482
-
483
-
484
-
485
-
486
-
487
-
488
-
489
-
490
-
491
-
492
-
493
-
494
-
495
-
496
-
497
-
498
-
499
-
500
-
501
-
502
-
503
-
504
-
505
-
506
- /***/ }),
507
-
508
- /***/ 37873:
509
- /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
510
-
511
- "use strict";
512
- __webpack_require__.r(__webpack_exports__);
513
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
514
- /* harmony export */ SpeechRecognizeNative: function() { return /* binding */ SpeechRecognizeNative; }
515
- /* harmony export */ });
516
- /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(31635);
517
- /* harmony import */ var jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(66927);
518
- /* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(55186);
519
- /* harmony import */ var jodit_core_global__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(56298);
520
- /* harmony import */ var jodit_core_helpers_utils_utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(84976);
521
- /* harmony import */ var jodit_core_plugin__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(71005);
522
- /* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(71096);
523
- /* harmony import */ var _jodit__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(46173);
524
- /* harmony import */ var _helpers_exec_spell_command__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(50834);
525
- /* harmony import */ var _langs__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(25202);
526
- /*!
527
- * Jodit Editor (https://xdsoft.net/jodit/)
528
- * Released under MIT see LICENSE.txt in the project root for license information.
529
- * Copyright (c) 2013-2025 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
530
- */
531
-
532
-
533
-
534
-
535
-
536
-
537
-
538
-
539
-
540
-
541
-
542
- class SpeechRecognizeNative extends jodit_core_plugin__WEBPACK_IMPORTED_MODULE_4__/* .Plugin */ .k {
543
- constructor() {
544
- super(...arguments);
545
- this.buttons = [
546
- {
547
- group: 'state',
548
- name: 'speechRecognize'
549
- }
550
- ];
551
- this._commandToWord = {};
552
- }
553
- afterInit(jodit) {
554
- const { commands } = jodit.o.speechRecognize;
555
- if (commands) {
556
- (0,jodit_core_global__WEBPACK_IMPORTED_MODULE_2__/* .extendLang */ .JW)(_langs__WEBPACK_IMPORTED_MODULE_7__);
557
- (0,jodit_core_helpers_utils_utils__WEBPACK_IMPORTED_MODULE_3__/* .keys */ .HP)(commands, false).forEach(words => {
558
- const keys = words.split('|');
559
- keys.forEach(key => {
560
- key = key.trim().toLowerCase();
561
- this._commandToWord[key] = commands[words];
562
- const translatedKeys = jodit.i18n(key);
563
- if (translatedKeys !== key) {
564
- translatedKeys.split('|').forEach(translatedKey => {
565
- this._commandToWord[translatedKey.trim().toLowerCase()] = commands[words].trim();
566
- });
567
- }
568
- });
569
- });
570
- }
571
- }
572
- beforeDestruct(jodit) {
573
- jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.safeRemove(this.messagePopup);
574
- }
575
- onSpeechRecognizeProgressResult(text) {
576
- if (!this.messagePopup) {
577
- this.messagePopup = this.j.create.div('jodit-speech-recognize__popup');
578
- }
579
- this.j.workplace.appendChild(this.messagePopup);
580
- this.j.async.clearTimeout(this.__hidePopupTimeout);
581
- this.__hidePopupTimeout = this.j.async.setTimeout(() => {
582
- jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.safeRemove(this.messagePopup);
583
- }, 1000);
584
- this.messagePopup.innerText = text + '|';
585
- }
586
- onSpeechRecognizeResult(text) {
587
- this.j.async.clearTimeout(this.__hidePopupTimeout);
588
- jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.safeRemove(this.messagePopup);
589
- const { j } = this;
590
- const { s } = j;
591
- if (!this._checkCommand(text)) {
592
- const { range } = s, node = s.current();
593
- if (s.isCollapsed() &&
594
- jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isText(node) &&
595
- jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isOrContains(j.editor, node) &&
596
- node.nodeValue) {
597
- const sentence = node.nodeValue;
598
- node.nodeValue =
599
- sentence +
600
- (/[\u00A0 ]\uFEFF*$/.test(sentence) ? '' : ' ') +
601
- text;
602
- range.setStartAfter(node);
603
- s.selectRange(range);
604
- j.synchronizeValues();
605
- }
606
- else {
607
- s.insertHTML(text);
608
- }
609
- }
610
- }
611
- _checkCommand(command) {
612
- command = command.toLowerCase().replace(/\./g, '');
613
- if (this._commandToWord[command]) {
614
- (0,_helpers_exec_spell_command__WEBPACK_IMPORTED_MODULE_8__/* .execSpellCommand */ .F)(this.j, this._commandToWord[command]);
615
- return true;
616
- }
617
- return false;
618
- }
619
- }
620
- (0,tslib__WEBPACK_IMPORTED_MODULE_9__/* .__decorate */ .Cg)([
621
- (0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_0__/* .watch */ .w)(':speechRecognizeProgressResult')
622
- ], SpeechRecognizeNative.prototype, "onSpeechRecognizeProgressResult", null);
623
- (0,tslib__WEBPACK_IMPORTED_MODULE_9__/* .__decorate */ .Cg)([
624
- (0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_0__/* .watch */ .w)(':speechRecognizeResult')
625
- ], SpeechRecognizeNative.prototype, "onSpeechRecognizeResult", null);
626
- _jodit__WEBPACK_IMPORTED_MODULE_6__/* .Jodit */ .x.plugins.add('speech-recognize', SpeechRecognizeNative);
627
-
628
-
629
- /***/ }),
630
-
631
- /***/ 22227:
632
- /***/ (function(module) {
633
-
634
- module.exports = "<svg viewBox=\"0 0 16 16\" xml:space=\"preserve\" xmlns=\"http://www.w3.org/2000/svg\"> <path d=\"M8,11c1.657,0,3-1.343,3-3V3c0-1.657-1.343-3-3-3S5,1.343,5,3v5C5,9.657,6.343,11,8,11z\"/> <path d=\"M13,8V6h-1l0,1.844c0,1.92-1.282,3.688-3.164,4.071C6.266,12.438,4,10.479,4,8V6H3v2c0,2.414,1.721,4.434,4,4.899V15H5v1h6 v-1H9v-2.101C11.279,12.434,13,10.414,13,8z\"/> </svg>"
635
-
636
636
  /***/ })
637
637
 
638
638
  },
@@ -1,10 +1,10 @@
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.5.11
4
+ * Version: v4.5.14
5
5
  * Url: https://xdsoft.net/jodit/
6
6
  * License(s): MIT
7
7
  */
8
8
 
9
9
 
10
- ((e,t)=>{if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var s=t();for(var i in s)("object"==typeof exports?exports:e)[i]=s[i]}})(self,(function(){return(self.webpackChunkjodit=self.webpackChunkjodit||[]).push([[882],{71096(e,t,s){"use strict";var i=s(9810),o=s(98253),n=s(26150),r=s(72197),u=s(931),a=s(36115),c=s(71722),h=s(93676),l=s(22227),p=s.n(l);a.T.prototype.speechRecognize={api:void 0!==c.o?c.o:null,sound:!0,continuous:!1,interimResults:!0,commands:{"newline|enter":"enter","delete|remove word|delete word":"backspaceWordButton",comma:"inserthtml::,",underline:"inserthtml::_",hyphen:"inserthtml::-",space:"inserthtml:: ",question:"inserthtml::?",dot:"inserthtml::.","quote|quotes|open quote":"inserthtml::'","header|header h1":"formatblock::h1","select all":"selectall"}},u.I.set("speech-recognize",p()),a.T.prototype.controls.speechRecognize={isVisible:e=>!!e.o.speechRecognize.api,isActive(e,t){const s=(0,r.m)(e,"speech");return!!s?.isEnabled},isDisabled:e=>!e.o.speechRecognize.api,exec(e,t,{button:s,control:u}){const{api:a,lang:c,continuous:l,interimResults:p,sound:d}=e.o.speechRecognize;if(!a)return void e.alert("Speech recognize API unsupported in your browser");let m=(0,r.m)(e,"speech");if(!m){const t=new a;m=new h.g(e.async,t),m.lang=(0,o.K)(c)?c:(0,n.C)(e.od.documentElement,"lang")??void 0,m.continuous=l,m.interimResults=p,m.sound=d,(0,r.m)(e,"speech",m),m.on("pulse",(e=>{s.setMod("pulse",e)})),m.on("result",(t=>e.e.fire("speechRecognizeResult",t))),m.on("progress",(t=>e.e.fire("speechRecognizeProgressResult",t))),m.on("error",(t=>e.message.error(t))),s.hookStatus("beforeDestruct",(()=>{(0,r.m)(e,"speech",null),m.destruct()}))}if(u.args){const e=u.args[0];if((0,i.L)(m[e]))return m[e]=!m[e],void(m.isEnabled&&m.restart())}m.toggle(),m.isEnabled&&s.setMod("pulse",!0),s.state.activated=m.isEnabled},name:"speechRecognize",command:"toggleSpeechRecognize",tooltip:"Speech Recognize",list:{sound:"Sound",interimResults:"Interim Results"},childTemplate(e,t,s){const i=(0,r.m)(e,"speech");return`<span class='jodit-speech-recognize__list-item'><input ${i?.[t]??e.o.speechRecognize[t]?"checked":""} class='jodit-checkbox' type='checkbox'>&nbsp;${s}</span>`},mods:{stroke:!1}}},81629(e,t,s){"use strict";s.d(t,{N(){return i},Z(){return o}});const i=440,o=940},71722(e,t,s){"use strict";s.d(t,{o(){return o}});var i=s(17352);const o=i.globalWindow?i.globalWindow.SpeechRecognition||i.globalWindow.webkitSpeechRecognition:void 0},50834(e,t,s){"use strict";function i(e,t){const[s,i]=t.split("::");e.execCommand(s,null,i)}s.d(t,{F(){return i}})},93676(e,t,s){"use strict";s.d(t,{g(){return c}});var i,o=s(31635),n=s(22664),r=s(43431),u=s(95473),a=s(81629);let c=i=class e extends r.h{set lang(e){this._lang=e,this._api.lang=e}get lang(){return this._lang}set continuous(e){this._continuous=e,this._api.continuous=e}get continuous(){return this._continuous}set interimResults(e){this._interimResults=e,this._api.interimResults=e}get interimResults(){return this._interimResults}constructor(e,t){super(),this.async=e,this._continuous=!1,this._interimResults=!1,this.sound=!0,this._isEnabled=!1,this._restartTimeout=0,this._onSpeechStart=e=>{this._isEnabled&&(this.async.clearTimeout(this._restartTimeout),this._restartTimeout=this.async.setTimeout((()=>{this.restart(),this.emit("pulse",!1),this._makeSound(a.Z)}),5e3),this.emit("pulse",!0))},this.__interimResults="",this._api=t,i._instances.add(this)}destruct(){this.stop(),i._instances.delete(this),super.destruct()}get isEnabled(){return this._isEnabled}start(){if(!this._isEnabled){this._isEnabled=!0,i._instances.forEach((e=>{e!==this&&e.stop()}));try{this._api.start()}catch(e){return this._onError(e),void this.stop()}this.__on("speechstart",this._onSpeechStart).__on("error",this._onError).__on("result",this._onProgress).__on("end",this._onResults)}}stop(){this._isEnabled&&(this._api.abort(),this._api.stop(),this.__off("speechstart",this._onSpeechStart).__off("error",this._onError).__off("result",this._onProgress).__off("end",this._onResults),this.async.clearTimeout(this._restartTimeout),this._isEnabled=!1,this.emit("pulse",!1))}toggle(){this._isEnabled?this.stop():this.start()}restart(){this.stop(),this.start()}__on(e,t){return this._api.addEventListener(e,t),this}__off(e,t){return this._api.removeEventListener(e,t),this}_onResults(e){this.emit("pulse",!1),this.emit("result",this.__interimResults),this.__interimResults="",this._makeSound(a.N),this.restart()}_onProgress(e){if(this._isEnabled&&(this.__interimResults="",e.results)){for(let t=0;e.results.length>t;t++){const s=e.results.item(t);if(s.length){const{transcript:e}=s.item(0);this.__interimResults+=e}}this.__interimResults&&this.emit("progress",this.__interimResults)}}_onError(e){"voice-unavailable"===e.error&&this.emit("error","Voice unavailable"),"not-allowed"===e.error&&this.emit("error","Not allowed"),"language-unavailable"!==e.error&&"language-not-supported"!==e.error||this.emit("error","Language unavailable"),this._makeSound(a.Z),this.emit("pulse",!1),this.stop()}_makeSound(e){this.sound&&(0,u.s)({frequency:e})}};c._instances=new Set,c=i=(0,o.Cg)([n.autobind],c)},95473(e,t,s){"use strict";s.d(t,{s(){return n}});var i=s(17352),o=s(81629);function n({sec:e=.1,frequency:t=o.N,gain:s=.1,type:n="sine"}={}){if(!i.globalWindow||void 0===i.globalWindow.AudioContext&&void 0===i.globalWindow.webkitAudioContext)return;const r=new(i.globalWindow.AudioContext||i.globalWindow.webkitAudioContext),u=r.createGain(),a=r.createOscillator();a.type=n,a.frequency.value=t,a.connect(u),u.connect(r.destination),a.start(),a.stop(r.currentTime+e),u.gain.value=s}},25202(e,t,s){"use strict";s.r(t),s.d(t,{ar(){return i},cs_cz(){return i},de(){return i},es(){return i},fa(){return i},fi(){return i},fr(){return i},he(){return i},hu(){return i},id(){return i},it(){return i},ja(){return i},ko(){return i},mn(){return i},nl(){return i},pl(){return i},pt_br(){return i},ru(){return i},tr(){return i},ua(){return i},zh_cn(){return i},zh_tw(){return i}});var i=s(41324)},37873(e,t,s){"use strict";s.r(t),s.d(t,{SpeechRecognizeNative(){return p}});var i=s(31635),o=s(66927),n=s(55186),r=s(56298),u=s(84976),a=s(71005),c=(s(71096),s(46173)),h=s(50834),l=s(25202);class p extends a.k{constructor(){super(...arguments),this.buttons=[{group:"state",name:"speechRecognize"}],this._commandToWord={}}afterInit(e){const{commands:t}=e.o.speechRecognize;t&&((0,r.JW)(l),(0,u.HP)(t,!1).forEach((s=>{s.split("|").forEach((i=>{i=i.trim().toLowerCase(),this._commandToWord[i]=t[s];const o=e.i18n(i);o!==i&&o.split("|").forEach((e=>{this._commandToWord[e.trim().toLowerCase()]=t[s].trim()}))}))})))}beforeDestruct(e){n.J.safeRemove(this.messagePopup)}onSpeechRecognizeProgressResult(e){this.messagePopup||(this.messagePopup=this.j.create.div("jodit-speech-recognize__popup")),this.j.workplace.appendChild(this.messagePopup),this.j.async.clearTimeout(this.__hidePopupTimeout),this.__hidePopupTimeout=this.j.async.setTimeout((()=>{n.J.safeRemove(this.messagePopup)}),1e3),this.messagePopup.innerText=e+"|"}onSpeechRecognizeResult(e){this.j.async.clearTimeout(this.__hidePopupTimeout),n.J.safeRemove(this.messagePopup);const{j:t}=this,{s}=t;if(!this._checkCommand(e)){const{range:i}=s,o=s.current();if(s.isCollapsed()&&n.J.isText(o)&&n.J.isOrContains(t.editor,o)&&o.nodeValue){const n=o.nodeValue;o.nodeValue=n+(/[\u00A0 ]\uFEFF*$/.test(n)?"":" ")+e,i.setStartAfter(o),s.selectRange(i),t.synchronizeValues()}else s.insertHTML(e)}}_checkCommand(e){return e=e.toLowerCase().replace(/\./g,""),!!this._commandToWord[e]&&((0,h.F)(this.j,this._commandToWord[e]),!0)}}(0,i.Cg)([(0,o.w)(":speechRecognizeProgressResult")],p.prototype,"onSpeechRecognizeProgressResult",null),(0,i.Cg)([(0,o.w)(":speechRecognizeResult")],p.prototype,"onSpeechRecognizeResult",null),c.x.plugins.add("speech-recognize",p)},22227(e){e.exports='<svg viewBox="0 0 16 16" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"> <path d="M8,11c1.657,0,3-1.343,3-3V3c0-1.657-1.343-3-3-3S5,1.343,5,3v5C5,9.657,6.343,11,8,11z"/> <path d="M13,8V6h-1l0,1.844c0,1.92-1.282,3.688-3.164,4.071C6.266,12.438,4,10.479,4,8V6H3v2c0,2.414,1.721,4.434,4,4.899V15H5v1h6 v-1H9v-2.101C11.279,12.434,13,10.414,13,8z"/> </svg>'}},e=>e(e.s=37873)])}));
10
+ ((e,t)=>{if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var s=t();for(var i in s)("object"==typeof exports?exports:e)[i]=s[i]}})(self,(function(){return(self.webpackChunkjodit=self.webpackChunkjodit||[]).push([[882],{22227(e){e.exports='<svg viewBox="0 0 16 16" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"> <path d="M8,11c1.657,0,3-1.343,3-3V3c0-1.657-1.343-3-3-3S5,1.343,5,3v5C5,9.657,6.343,11,8,11z"/> <path d="M13,8V6h-1l0,1.844c0,1.92-1.282,3.688-3.164,4.071C6.266,12.438,4,10.479,4,8V6H3v2c0,2.414,1.721,4.434,4,4.899V15H5v1h6 v-1H9v-2.101C11.279,12.434,13,10.414,13,8z"/> </svg>'},25202(e,t,s){"use strict";s.r(t),s.d(t,{ar(){return i},cs_cz(){return i},de(){return i},es(){return i},fa(){return i},fi(){return i},fr(){return i},he(){return i},hu(){return i},id(){return i},it(){return i},ja(){return i},ko(){return i},mn(){return i},nl(){return i},pl(){return i},pt_br(){return i},ru(){return i},tr(){return i},ua(){return i},zh_cn(){return i},zh_tw(){return i}});var i=s(41324)},37873(e,t,s){"use strict";s.r(t),s.d(t,{SpeechRecognizeNative(){return p}});var i=s(31635),o=s(66927),n=s(55186),r=s(56298),u=s(84976),a=s(71005),c=(s(71096),s(46173)),h=s(50834),l=s(25202);class p extends a.k{constructor(){super(...arguments),this.buttons=[{group:"state",name:"speechRecognize"}],this._commandToWord={}}afterInit(e){const{commands:t}=e.o.speechRecognize;t&&((0,r.JW)(l),(0,u.HP)(t,!1).forEach((s=>{s.split("|").forEach((i=>{i=i.trim().toLowerCase(),this._commandToWord[i]=t[s];const o=e.i18n(i);o!==i&&o.split("|").forEach((e=>{this._commandToWord[e.trim().toLowerCase()]=t[s].trim()}))}))})))}beforeDestruct(e){n.J.safeRemove(this.messagePopup)}onSpeechRecognizeProgressResult(e){this.messagePopup||(this.messagePopup=this.j.create.div("jodit-speech-recognize__popup")),this.j.workplace.appendChild(this.messagePopup),this.j.async.clearTimeout(this.__hidePopupTimeout),this.__hidePopupTimeout=this.j.async.setTimeout((()=>{n.J.safeRemove(this.messagePopup)}),1e3),this.messagePopup.innerText=e+"|"}onSpeechRecognizeResult(e){this.j.async.clearTimeout(this.__hidePopupTimeout),n.J.safeRemove(this.messagePopup);const{j:t}=this,{s}=t;if(!this._checkCommand(e)){const{range:i}=s,o=s.current();if(s.isCollapsed()&&n.J.isText(o)&&n.J.isOrContains(t.editor,o)&&o.nodeValue){const n=o.nodeValue;o.nodeValue=n+(/[\u00A0 ]\uFEFF*$/.test(n)?"":" ")+e,i.setStartAfter(o),s.selectRange(i),t.synchronizeValues()}else s.insertHTML(e)}}_checkCommand(e){return e=e.toLowerCase().replace(/\./g,""),!!this._commandToWord[e]&&((0,h.F)(this.j,this._commandToWord[e]),!0)}}(0,i.Cg)([(0,o.w)(":speechRecognizeProgressResult")],p.prototype,"onSpeechRecognizeProgressResult",null),(0,i.Cg)([(0,o.w)(":speechRecognizeResult")],p.prototype,"onSpeechRecognizeResult",null),c.x.plugins.add("speech-recognize",p)},50834(e,t,s){"use strict";function i(e,t){const[s,i]=t.split("::");e.execCommand(s,null,i)}s.d(t,{F(){return i}})},71096(e,t,s){"use strict";var i=s(9810),o=s(98253),n=s(26150),r=s(72197),u=s(931),a=s(36115),c=s(71722),h=s(93676),l=s(22227),p=s.n(l);a.T.prototype.speechRecognize={api:void 0!==c.o?c.o:null,sound:!0,continuous:!1,interimResults:!0,commands:{"newline|enter":"enter","delete|remove word|delete word":"backspaceWordButton",comma:"inserthtml::,",underline:"inserthtml::_",hyphen:"inserthtml::-",space:"inserthtml:: ",question:"inserthtml::?",dot:"inserthtml::.","quote|quotes|open quote":"inserthtml::'","header|header h1":"formatblock::h1","select all":"selectall"}},u.I.set("speech-recognize",p()),a.T.prototype.controls.speechRecognize={isVisible:e=>!!e.o.speechRecognize.api,isActive(e,t){const s=(0,r.m)(e,"speech");return!!s?.isEnabled},isDisabled:e=>!e.o.speechRecognize.api,exec(e,t,{button:s,control:u}){const{api:a,lang:c,continuous:l,interimResults:p,sound:d}=e.o.speechRecognize;if(!a)return void e.alert("Speech recognize API unsupported in your browser");let m=(0,r.m)(e,"speech");if(!m){const t=new a;m=new h.g(e.async,t),m.lang=(0,o.K)(c)?c:(0,n.C)(e.od.documentElement,"lang")??void 0,m.continuous=l,m.interimResults=p,m.sound=d,(0,r.m)(e,"speech",m),m.on("pulse",(e=>{s.setMod("pulse",e)})),m.on("result",(t=>e.e.fire("speechRecognizeResult",t))),m.on("progress",(t=>e.e.fire("speechRecognizeProgressResult",t))),m.on("error",(t=>e.message.error(t))),s.hookStatus("beforeDestruct",(()=>{(0,r.m)(e,"speech",null),m.destruct()}))}if(u.args){const e=u.args[0];if((0,i.L)(m[e]))return m[e]=!m[e],void(m.isEnabled&&m.restart())}m.toggle(),m.isEnabled&&s.setMod("pulse",!0),s.state.activated=m.isEnabled},name:"speechRecognize",command:"toggleSpeechRecognize",tooltip:"Speech Recognize",list:{sound:"Sound",interimResults:"Interim Results"},childTemplate(e,t,s){const i=(0,r.m)(e,"speech");return`<span class='jodit-speech-recognize__list-item'><input ${i?.[t]??e.o.speechRecognize[t]?"checked":""} class='jodit-checkbox' type='checkbox'>&nbsp;${s}</span>`},mods:{stroke:!1}}},71722(e,t,s){"use strict";s.d(t,{o(){return o}});var i=s(17352);const o=i.globalWindow?i.globalWindow.SpeechRecognition||i.globalWindow.webkitSpeechRecognition:void 0},81629(e,t,s){"use strict";s.d(t,{N(){return i},Z(){return o}});const i=440,o=940},93676(e,t,s){"use strict";s.d(t,{g(){return c}});var i,o=s(31635),n=s(22664),r=s(43431),u=s(95473),a=s(81629);let c=i=class e extends r.h{set lang(e){this._lang=e,this._api.lang=e}get lang(){return this._lang}set continuous(e){this._continuous=e,this._api.continuous=e}get continuous(){return this._continuous}set interimResults(e){this._interimResults=e,this._api.interimResults=e}get interimResults(){return this._interimResults}constructor(e,t){super(),this.async=e,this._continuous=!1,this._interimResults=!1,this.sound=!0,this._isEnabled=!1,this._restartTimeout=0,this._onSpeechStart=e=>{this._isEnabled&&(this.async.clearTimeout(this._restartTimeout),this._restartTimeout=this.async.setTimeout((()=>{this.restart(),this.emit("pulse",!1),this._makeSound(a.Z)}),5e3),this.emit("pulse",!0))},this.__interimResults="",this._api=t,i._instances.add(this)}destruct(){this.stop(),i._instances.delete(this),super.destruct()}get isEnabled(){return this._isEnabled}start(){if(!this._isEnabled){this._isEnabled=!0,i._instances.forEach((e=>{e!==this&&e.stop()}));try{this._api.start()}catch(e){return this._onError(e),void this.stop()}this.__on("speechstart",this._onSpeechStart).__on("error",this._onError).__on("result",this._onProgress).__on("end",this._onResults)}}stop(){this._isEnabled&&(this._api.abort(),this._api.stop(),this.__off("speechstart",this._onSpeechStart).__off("error",this._onError).__off("result",this._onProgress).__off("end",this._onResults),this.async.clearTimeout(this._restartTimeout),this._isEnabled=!1,this.emit("pulse",!1))}toggle(){this._isEnabled?this.stop():this.start()}restart(){this.stop(),this.start()}__on(e,t){return this._api.addEventListener(e,t),this}__off(e,t){return this._api.removeEventListener(e,t),this}_onResults(e){this.emit("pulse",!1),this.emit("result",this.__interimResults),this.__interimResults="",this._makeSound(a.N),this.restart()}_onProgress(e){if(this._isEnabled&&(this.__interimResults="",e.results)){for(let t=0;e.results.length>t;t++){const s=e.results.item(t);if(s.length){const{transcript:e}=s.item(0);this.__interimResults+=e}}this.__interimResults&&this.emit("progress",this.__interimResults)}}_onError(e){"voice-unavailable"===e.error&&this.emit("error","Voice unavailable"),"not-allowed"===e.error&&this.emit("error","Not allowed"),"language-unavailable"!==e.error&&"language-not-supported"!==e.error||this.emit("error","Language unavailable"),this._makeSound(a.Z),this.emit("pulse",!1),this.stop()}_makeSound(e){this.sound&&(0,u.s)({frequency:e})}};c._instances=new Set,c=i=(0,o.Cg)([n.autobind],c)},95473(e,t,s){"use strict";s.d(t,{s(){return n}});var i=s(17352),o=s(81629);function n({sec:e=.1,frequency:t=o.N,gain:s=.1,type:n="sine"}={}){if(!i.globalWindow||void 0===i.globalWindow.AudioContext&&void 0===i.globalWindow.webkitAudioContext)return;const r=new(i.globalWindow.AudioContext||i.globalWindow.webkitAudioContext),u=r.createGain(),a=r.createOscillator();a.type=n,a.frequency.value=t,a.connect(u),u.connect(r.destination),a.start(),a.stop(r.currentTime+e),u.gain.value=s}}},e=>e(e.s=37873)])}));