jodit-pro 4.18.9 → 4.18.12

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 (348) hide show
  1. package/es2015/jodit.css +1 -1
  2. package/es2015/jodit.fat.min.js +13 -13
  3. package/es2015/jodit.js +286 -48
  4. package/es2015/jodit.min.js +14 -14
  5. package/es2015/plugins/ai-assistant-pro/ai-assistant-pro.css +1 -1
  6. package/es2015/plugins/ai-assistant-pro/ai-assistant-pro.js +19 -1
  7. package/es2015/plugins/ai-assistant-pro/ai-assistant-pro.min.js +3 -3
  8. package/es2015/plugins/autocomplete/autocomplete.css +1 -1
  9. package/es2015/plugins/autocomplete/autocomplete.js +1 -1
  10. package/es2015/plugins/autocomplete/autocomplete.min.js +1 -1
  11. package/es2015/plugins/backup/backup.css +1 -1
  12. package/es2015/plugins/backup/backup.js +14 -7
  13. package/es2015/plugins/backup/backup.min.js +2 -2
  14. package/es2015/plugins/button-generator/button-generator.css +1 -1
  15. package/es2015/plugins/button-generator/button-generator.js +26 -19
  16. package/es2015/plugins/button-generator/button-generator.min.js +3 -3
  17. package/es2015/plugins/change-case/change-case.js +1 -1
  18. package/es2015/plugins/change-case/change-case.min.js +1 -1
  19. package/es2015/plugins/chart/chart.css +1 -1
  20. package/es2015/plugins/chart/chart.js +1 -1
  21. package/es2015/plugins/chart/chart.min.js +1 -1
  22. package/es2015/plugins/color-picker/color-picker.css +1 -1
  23. package/es2015/plugins/color-picker/color-picker.js +1 -1
  24. package/es2015/plugins/color-picker/color-picker.min.js +1 -1
  25. package/es2015/plugins/emoji/emoji.css +1 -1
  26. package/es2015/plugins/emoji/emoji.js +1 -1
  27. package/es2015/plugins/emoji/emoji.min.js +1 -1
  28. package/es2015/plugins/export-docs/export-docs.js +1 -1
  29. package/es2015/plugins/export-docs/export-docs.min.js +1 -1
  30. package/es2015/plugins/finder/finder.css +1 -1
  31. package/es2015/plugins/finder/finder.js +1 -1
  32. package/es2015/plugins/finder/finder.min.js +1 -1
  33. package/es2015/plugins/google-maps/google-maps.css +1 -1
  34. package/es2015/plugins/google-maps/google-maps.js +1 -1
  35. package/es2015/plugins/google-maps/google-maps.min.js +1 -1
  36. package/es2015/plugins/google-search/google-search.js +1 -1
  37. package/es2015/plugins/google-search/google-search.min.js +1 -1
  38. package/es2015/plugins/highlight-signature/highlight-signature.js +1 -1
  39. package/es2015/plugins/highlight-signature/highlight-signature.min.js +1 -1
  40. package/es2015/plugins/iframe-editor/iframe-editor.css +1 -1
  41. package/es2015/plugins/iframe-editor/iframe-editor.js +1 -1
  42. package/es2015/plugins/iframe-editor/iframe-editor.min.js +1 -1
  43. package/es2015/plugins/image-editor-pro/image-editor-pro.css +1 -1
  44. package/es2015/plugins/image-editor-pro/image-editor-pro.js +1 -1
  45. package/es2015/plugins/image-editor-pro/image-editor-pro.min.js +1 -1
  46. package/es2015/plugins/keyboard/keyboard.css +1 -1
  47. package/es2015/plugins/keyboard/keyboard.js +1 -1
  48. package/es2015/plugins/keyboard/keyboard.min.js +1 -1
  49. package/es2015/plugins/math/math.css +1 -1
  50. package/es2015/plugins/math/math.js +1 -1
  51. package/es2015/plugins/math/math.min.js +1 -1
  52. package/es2015/plugins/mobile-view/mobile-view.js +1 -1
  53. package/es2015/plugins/mobile-view/mobile-view.min.js +1 -1
  54. package/es2015/plugins/page-break/page-break.js +1 -1
  55. package/es2015/plugins/page-break/page-break.min.js +1 -1
  56. package/es2015/plugins/paste-code/paste-code.css +1 -1
  57. package/es2015/plugins/paste-code/paste-code.js +1 -1
  58. package/es2015/plugins/paste-code/paste-code.min.js +1 -1
  59. package/es2015/plugins/paste-from-word/paste-from-word.js +1 -1
  60. package/es2015/plugins/paste-from-word/paste-from-word.min.js +1 -1
  61. package/es2015/plugins/show-blocks/show-blocks.js +1 -1
  62. package/es2015/plugins/show-blocks/show-blocks.min.js +1 -1
  63. package/es2015/plugins/style/style.css +1 -1
  64. package/es2015/plugins/style/style.js +1 -1
  65. package/es2015/plugins/style/style.min.js +1 -1
  66. package/es2015/plugins/templates/templates.css +1 -1
  67. package/es2015/plugins/templates/templates.js +1 -1
  68. package/es2015/plugins/templates/templates.min.js +1 -1
  69. package/es2015/plugins/todo-list/todo-list.css +1 -1
  70. package/es2015/plugins/todo-list/todo-list.js +1 -1
  71. package/es2015/plugins/todo-list/todo-list.min.js +1 -1
  72. package/es2015/plugins/translate/translate.css +1 -1
  73. package/es2015/plugins/translate/translate.js +1 -1
  74. package/es2015/plugins/translate/translate.min.js +1 -1
  75. package/es2015/plugins/tune-block/tune-block.css +1 -1
  76. package/es2015/plugins/tune-block/tune-block.js +1 -1
  77. package/es2015/plugins/tune-block/tune-block.min.js +1 -1
  78. package/es2018/jodit.fat.min.js +16 -16
  79. package/es2018/jodit.min.js +8 -8
  80. package/es2018/plugins/ai-assistant-pro/ai-assistant-pro.min.js +3 -3
  81. package/es2018/plugins/autocomplete/autocomplete.min.js +1 -1
  82. package/es2018/plugins/backup/backup.min.js +2 -2
  83. package/es2018/plugins/button-generator/button-generator.min.js +3 -3
  84. package/es2018/plugins/change-case/change-case.min.js +1 -1
  85. package/es2018/plugins/chart/chart.min.js +1 -1
  86. package/es2018/plugins/color-picker/color-picker.min.js +1 -1
  87. package/es2018/plugins/emoji/emoji.min.js +1 -1
  88. package/es2018/plugins/export-docs/export-docs.min.js +1 -1
  89. package/es2018/plugins/finder/finder.min.js +1 -1
  90. package/es2018/plugins/google-maps/google-maps.min.js +1 -1
  91. package/es2018/plugins/google-search/google-search.min.js +1 -1
  92. package/es2018/plugins/highlight-signature/highlight-signature.min.js +1 -1
  93. package/es2018/plugins/iframe-editor/iframe-editor.min.js +1 -1
  94. package/es2018/plugins/image-editor-pro/image-editor-pro.min.js +1 -1
  95. package/es2018/plugins/keyboard/keyboard.min.js +1 -1
  96. package/es2018/plugins/math/math.min.js +1 -1
  97. package/es2018/plugins/mobile-view/mobile-view.min.js +1 -1
  98. package/es2018/plugins/page-break/page-break.min.js +1 -1
  99. package/es2018/plugins/paste-code/paste-code.min.js +1 -1
  100. package/es2018/plugins/paste-from-word/paste-from-word.min.js +1 -1
  101. package/es2018/plugins/show-blocks/show-blocks.min.js +1 -1
  102. package/es2018/plugins/style/style.min.js +1 -1
  103. package/es2018/plugins/templates/templates.min.js +1 -1
  104. package/es2018/plugins/todo-list/todo-list.min.js +1 -1
  105. package/es2018/plugins/translate/translate.min.js +1 -1
  106. package/es2018/plugins/tune-block/tune-block.min.js +1 -1
  107. package/es2021/jodit.css +1 -1
  108. package/es2021/jodit.fat.min.js +19 -19
  109. package/es2021/jodit.js +286 -48
  110. package/es2021/jodit.min.js +8 -8
  111. package/es2021/plugins/ai-assistant-pro/ai-assistant-pro.css +1 -1
  112. package/es2021/plugins/ai-assistant-pro/ai-assistant-pro.js +19 -1
  113. package/es2021/plugins/ai-assistant-pro/ai-assistant-pro.min.js +3 -3
  114. package/es2021/plugins/autocomplete/autocomplete.css +1 -1
  115. package/es2021/plugins/autocomplete/autocomplete.js +1 -1
  116. package/es2021/plugins/autocomplete/autocomplete.min.js +1 -1
  117. package/es2021/plugins/backup/backup.css +1 -1
  118. package/es2021/plugins/backup/backup.js +14 -7
  119. package/es2021/plugins/backup/backup.min.js +2 -2
  120. package/es2021/plugins/button-generator/button-generator.css +1 -1
  121. package/es2021/plugins/button-generator/button-generator.js +26 -19
  122. package/es2021/plugins/button-generator/button-generator.min.js +3 -3
  123. package/es2021/plugins/change-case/change-case.js +1 -1
  124. package/es2021/plugins/change-case/change-case.min.js +1 -1
  125. package/es2021/plugins/chart/chart.css +1 -1
  126. package/es2021/plugins/chart/chart.js +1 -1
  127. package/es2021/plugins/chart/chart.min.js +1 -1
  128. package/es2021/plugins/color-picker/color-picker.css +1 -1
  129. package/es2021/plugins/color-picker/color-picker.js +1 -1
  130. package/es2021/plugins/color-picker/color-picker.min.js +1 -1
  131. package/es2021/plugins/emoji/emoji.css +1 -1
  132. package/es2021/plugins/emoji/emoji.js +1 -1
  133. package/es2021/plugins/emoji/emoji.min.js +1 -1
  134. package/es2021/plugins/export-docs/export-docs.js +1 -1
  135. package/es2021/plugins/export-docs/export-docs.min.js +1 -1
  136. package/es2021/plugins/finder/finder.css +1 -1
  137. package/es2021/plugins/finder/finder.js +1 -1
  138. package/es2021/plugins/finder/finder.min.js +1 -1
  139. package/es2021/plugins/google-maps/google-maps.css +1 -1
  140. package/es2021/plugins/google-maps/google-maps.js +1 -1
  141. package/es2021/plugins/google-maps/google-maps.min.js +1 -1
  142. package/es2021/plugins/google-search/google-search.js +1 -1
  143. package/es2021/plugins/google-search/google-search.min.js +1 -1
  144. package/es2021/plugins/highlight-signature/highlight-signature.js +1 -1
  145. package/es2021/plugins/highlight-signature/highlight-signature.min.js +1 -1
  146. package/es2021/plugins/iframe-editor/iframe-editor.css +1 -1
  147. package/es2021/plugins/iframe-editor/iframe-editor.js +1 -1
  148. package/es2021/plugins/iframe-editor/iframe-editor.min.js +1 -1
  149. package/es2021/plugins/image-editor-pro/image-editor-pro.css +1 -1
  150. package/es2021/plugins/image-editor-pro/image-editor-pro.js +1 -1
  151. package/es2021/plugins/image-editor-pro/image-editor-pro.min.js +1 -1
  152. package/es2021/plugins/keyboard/keyboard.css +1 -1
  153. package/es2021/plugins/keyboard/keyboard.js +1 -1
  154. package/es2021/plugins/keyboard/keyboard.min.js +1 -1
  155. package/es2021/plugins/math/math.css +1 -1
  156. package/es2021/plugins/math/math.js +1 -1
  157. package/es2021/plugins/math/math.min.js +1 -1
  158. package/es2021/plugins/mobile-view/mobile-view.js +1 -1
  159. package/es2021/plugins/mobile-view/mobile-view.min.js +1 -1
  160. package/es2021/plugins/page-break/page-break.js +1 -1
  161. package/es2021/plugins/page-break/page-break.min.js +1 -1
  162. package/es2021/plugins/paste-code/paste-code.css +1 -1
  163. package/es2021/plugins/paste-code/paste-code.js +1 -1
  164. package/es2021/plugins/paste-code/paste-code.min.js +1 -1
  165. package/es2021/plugins/paste-from-word/paste-from-word.js +1 -1
  166. package/es2021/plugins/paste-from-word/paste-from-word.min.js +1 -1
  167. package/es2021/plugins/show-blocks/show-blocks.js +1 -1
  168. package/es2021/plugins/show-blocks/show-blocks.min.js +1 -1
  169. package/es2021/plugins/style/style.css +1 -1
  170. package/es2021/plugins/style/style.js +1 -1
  171. package/es2021/plugins/style/style.min.js +1 -1
  172. package/es2021/plugins/templates/templates.css +1 -1
  173. package/es2021/plugins/templates/templates.js +1 -1
  174. package/es2021/plugins/templates/templates.min.js +1 -1
  175. package/es2021/plugins/todo-list/todo-list.css +1 -1
  176. package/es2021/plugins/todo-list/todo-list.js +1 -1
  177. package/es2021/plugins/todo-list/todo-list.min.js +1 -1
  178. package/es2021/plugins/translate/translate.css +1 -1
  179. package/es2021/plugins/translate/translate.js +1 -1
  180. package/es2021/plugins/translate/translate.min.js +1 -1
  181. package/es2021/plugins/tune-block/tune-block.css +1 -1
  182. package/es2021/plugins/tune-block/tune-block.js +1 -1
  183. package/es2021/plugins/tune-block/tune-block.min.js +1 -1
  184. package/es2021.en/jodit.css +1 -1
  185. package/es2021.en/jodit.fat.min.js +17 -17
  186. package/es2021.en/jodit.js +286 -48
  187. package/es2021.en/jodit.min.js +8 -8
  188. package/es2021.en/plugins/ai-assistant-pro/ai-assistant-pro.css +1 -1
  189. package/es2021.en/plugins/ai-assistant-pro/ai-assistant-pro.js +19 -1
  190. package/es2021.en/plugins/ai-assistant-pro/ai-assistant-pro.min.js +26 -26
  191. package/es2021.en/plugins/autocomplete/autocomplete.css +1 -1
  192. package/es2021.en/plugins/autocomplete/autocomplete.js +1 -1
  193. package/es2021.en/plugins/autocomplete/autocomplete.min.js +1 -1
  194. package/es2021.en/plugins/backup/backup.css +1 -1
  195. package/es2021.en/plugins/backup/backup.js +14 -7
  196. package/es2021.en/plugins/backup/backup.min.js +2 -2
  197. package/es2021.en/plugins/button-generator/button-generator.css +1 -1
  198. package/es2021.en/plugins/button-generator/button-generator.js +26 -19
  199. package/es2021.en/plugins/button-generator/button-generator.min.js +3 -3
  200. package/es2021.en/plugins/change-case/change-case.js +1 -1
  201. package/es2021.en/plugins/change-case/change-case.min.js +1 -1
  202. package/es2021.en/plugins/chart/chart.css +1 -1
  203. package/es2021.en/plugins/chart/chart.js +1 -1
  204. package/es2021.en/plugins/chart/chart.min.js +1 -1
  205. package/es2021.en/plugins/color-picker/color-picker.css +1 -1
  206. package/es2021.en/plugins/color-picker/color-picker.js +1 -1
  207. package/es2021.en/plugins/color-picker/color-picker.min.js +1 -1
  208. package/es2021.en/plugins/emoji/emoji.css +1 -1
  209. package/es2021.en/plugins/emoji/emoji.js +1 -1
  210. package/es2021.en/plugins/emoji/emoji.min.js +1 -1
  211. package/es2021.en/plugins/export-docs/export-docs.js +1 -1
  212. package/es2021.en/plugins/export-docs/export-docs.min.js +1 -1
  213. package/es2021.en/plugins/finder/finder.css +1 -1
  214. package/es2021.en/plugins/finder/finder.js +1 -1
  215. package/es2021.en/plugins/finder/finder.min.js +1 -1
  216. package/es2021.en/plugins/google-maps/google-maps.css +1 -1
  217. package/es2021.en/plugins/google-maps/google-maps.js +1 -1
  218. package/es2021.en/plugins/google-maps/google-maps.min.js +1 -1
  219. package/es2021.en/plugins/google-search/google-search.js +1 -1
  220. package/es2021.en/plugins/google-search/google-search.min.js +1 -1
  221. package/es2021.en/plugins/highlight-signature/highlight-signature.js +1 -1
  222. package/es2021.en/plugins/highlight-signature/highlight-signature.min.js +1 -1
  223. package/es2021.en/plugins/iframe-editor/iframe-editor.css +1 -1
  224. package/es2021.en/plugins/iframe-editor/iframe-editor.js +1 -1
  225. package/es2021.en/plugins/iframe-editor/iframe-editor.min.js +1 -1
  226. package/es2021.en/plugins/image-editor-pro/image-editor-pro.css +1 -1
  227. package/es2021.en/plugins/image-editor-pro/image-editor-pro.js +1 -1
  228. package/es2021.en/plugins/image-editor-pro/image-editor-pro.min.js +1 -1
  229. package/es2021.en/plugins/keyboard/keyboard.css +1 -1
  230. package/es2021.en/plugins/keyboard/keyboard.js +1 -1
  231. package/es2021.en/plugins/keyboard/keyboard.min.js +1 -1
  232. package/es2021.en/plugins/math/math.css +1 -1
  233. package/es2021.en/plugins/math/math.js +1 -1
  234. package/es2021.en/plugins/math/math.min.js +1 -1
  235. package/es2021.en/plugins/mobile-view/mobile-view.js +1 -1
  236. package/es2021.en/plugins/mobile-view/mobile-view.min.js +1 -1
  237. package/es2021.en/plugins/page-break/page-break.js +1 -1
  238. package/es2021.en/plugins/page-break/page-break.min.js +1 -1
  239. package/es2021.en/plugins/paste-code/paste-code.css +1 -1
  240. package/es2021.en/plugins/paste-code/paste-code.js +1 -1
  241. package/es2021.en/plugins/paste-code/paste-code.min.js +1 -1
  242. package/es2021.en/plugins/paste-from-word/paste-from-word.js +1 -1
  243. package/es2021.en/plugins/paste-from-word/paste-from-word.min.js +1 -1
  244. package/es2021.en/plugins/show-blocks/show-blocks.js +1 -1
  245. package/es2021.en/plugins/show-blocks/show-blocks.min.js +1 -1
  246. package/es2021.en/plugins/style/style.css +1 -1
  247. package/es2021.en/plugins/style/style.js +1 -1
  248. package/es2021.en/plugins/style/style.min.js +1 -1
  249. package/es2021.en/plugins/templates/templates.css +1 -1
  250. package/es2021.en/plugins/templates/templates.js +1 -1
  251. package/es2021.en/plugins/templates/templates.min.js +1 -1
  252. package/es2021.en/plugins/todo-list/todo-list.css +1 -1
  253. package/es2021.en/plugins/todo-list/todo-list.js +1 -1
  254. package/es2021.en/plugins/todo-list/todo-list.min.js +1 -1
  255. package/es2021.en/plugins/translate/translate.css +1 -1
  256. package/es2021.en/plugins/translate/translate.js +1 -1
  257. package/es2021.en/plugins/translate/translate.min.js +1 -1
  258. package/es2021.en/plugins/tune-block/tune-block.css +1 -1
  259. package/es2021.en/plugins/tune-block/tune-block.js +1 -1
  260. package/es2021.en/plugins/tune-block/tune-block.min.js +1 -1
  261. package/es5/jodit.css +2 -2
  262. package/es5/jodit.fat.min.js +2 -2
  263. package/es5/jodit.js +298 -44
  264. package/es5/jodit.min.css +2 -2
  265. package/es5/jodit.min.js +2 -2
  266. package/es5/plugins/ai-assistant-pro/ai-assistant-pro.css +1 -1
  267. package/es5/plugins/ai-assistant-pro/ai-assistant-pro.js +19 -1
  268. package/es5/plugins/ai-assistant-pro/ai-assistant-pro.min.js +2 -2
  269. package/es5/plugins/autocomplete/autocomplete.css +1 -1
  270. package/es5/plugins/autocomplete/autocomplete.js +1 -1
  271. package/es5/plugins/autocomplete/autocomplete.min.js +1 -1
  272. package/es5/plugins/backup/backup.css +1 -1
  273. package/es5/plugins/backup/backup.js +14 -7
  274. package/es5/plugins/backup/backup.min.js +2 -2
  275. package/es5/plugins/button-generator/button-generator.css +1 -1
  276. package/es5/plugins/button-generator/button-generator.js +26 -19
  277. package/es5/plugins/button-generator/button-generator.min.js +2 -2
  278. package/es5/plugins/change-case/change-case.js +1 -1
  279. package/es5/plugins/change-case/change-case.min.js +1 -1
  280. package/es5/plugins/chart/chart.css +1 -1
  281. package/es5/plugins/chart/chart.js +1 -1
  282. package/es5/plugins/chart/chart.min.js +1 -1
  283. package/es5/plugins/color-picker/color-picker.css +1 -1
  284. package/es5/plugins/color-picker/color-picker.js +1 -1
  285. package/es5/plugins/color-picker/color-picker.min.js +1 -1
  286. package/es5/plugins/emoji/emoji.css +1 -1
  287. package/es5/plugins/emoji/emoji.js +1 -1
  288. package/es5/plugins/emoji/emoji.min.js +1 -1
  289. package/es5/plugins/export-docs/export-docs.js +1 -1
  290. package/es5/plugins/export-docs/export-docs.min.js +1 -1
  291. package/es5/plugins/finder/finder.css +1 -1
  292. package/es5/plugins/finder/finder.js +1 -1
  293. package/es5/plugins/finder/finder.min.js +1 -1
  294. package/es5/plugins/google-maps/google-maps.css +1 -1
  295. package/es5/plugins/google-maps/google-maps.js +1 -1
  296. package/es5/plugins/google-maps/google-maps.min.js +1 -1
  297. package/es5/plugins/google-search/google-search.js +1 -1
  298. package/es5/plugins/google-search/google-search.min.js +1 -1
  299. package/es5/plugins/highlight-signature/highlight-signature.js +1 -1
  300. package/es5/plugins/highlight-signature/highlight-signature.min.js +1 -1
  301. package/es5/plugins/iframe-editor/iframe-editor.css +1 -1
  302. package/es5/plugins/iframe-editor/iframe-editor.js +1 -1
  303. package/es5/plugins/iframe-editor/iframe-editor.min.js +1 -1
  304. package/es5/plugins/image-editor-pro/image-editor-pro.css +1 -1
  305. package/es5/plugins/image-editor-pro/image-editor-pro.js +1 -1
  306. package/es5/plugins/image-editor-pro/image-editor-pro.min.js +1 -1
  307. package/es5/plugins/keyboard/keyboard.css +1 -1
  308. package/es5/plugins/keyboard/keyboard.js +1 -1
  309. package/es5/plugins/keyboard/keyboard.min.js +1 -1
  310. package/es5/plugins/math/math.css +1 -1
  311. package/es5/plugins/math/math.js +1 -1
  312. package/es5/plugins/math/math.min.js +1 -1
  313. package/es5/plugins/mobile-view/mobile-view.js +1 -1
  314. package/es5/plugins/mobile-view/mobile-view.min.js +1 -1
  315. package/es5/plugins/page-break/page-break.js +1 -1
  316. package/es5/plugins/page-break/page-break.min.js +1 -1
  317. package/es5/plugins/paste-code/paste-code.css +1 -1
  318. package/es5/plugins/paste-code/paste-code.js +1 -1
  319. package/es5/plugins/paste-code/paste-code.min.js +1 -1
  320. package/es5/plugins/paste-from-word/paste-from-word.js +1 -1
  321. package/es5/plugins/paste-from-word/paste-from-word.min.js +1 -1
  322. package/es5/plugins/show-blocks/show-blocks.js +1 -1
  323. package/es5/plugins/show-blocks/show-blocks.min.js +1 -1
  324. package/es5/plugins/style/style.css +1 -1
  325. package/es5/plugins/style/style.js +1 -1
  326. package/es5/plugins/style/style.min.js +1 -1
  327. package/es5/plugins/templates/templates.css +1 -1
  328. package/es5/plugins/templates/templates.js +1 -1
  329. package/es5/plugins/templates/templates.min.js +1 -1
  330. package/es5/plugins/todo-list/todo-list.css +1 -1
  331. package/es5/plugins/todo-list/todo-list.js +1 -1
  332. package/es5/plugins/todo-list/todo-list.min.js +1 -1
  333. package/es5/plugins/translate/translate.css +1 -1
  334. package/es5/plugins/translate/translate.js +1 -1
  335. package/es5/plugins/translate/translate.min.js +1 -1
  336. package/es5/plugins/tune-block/tune-block.css +1 -1
  337. package/es5/plugins/tune-block/tune-block.js +1 -1
  338. package/es5/plugins/tune-block/tune-block.min.js +1 -1
  339. package/es5/polyfills.fat.min.js +1 -1
  340. package/es5/polyfills.js +1 -1
  341. package/es5/polyfills.min.js +1 -1
  342. package/esm/plugins/ai-assistant-pro/ai-assistant-pro.js +2 -2
  343. package/esm/plugins/ai-assistant-pro/core/panel-resize.d.ts +4 -0
  344. package/esm/plugins/ai-assistant-pro/core/panel-resize.js +1 -1
  345. package/esm/plugins/backup/ui/item.js +1 -1
  346. package/esm/plugins/button-generator/ui/form/form.js +2 -2
  347. package/package.json +1 -1
  348. package/types/plugins/ai-assistant-pro/core/panel-resize.d.ts +4 -0
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * jodit-pro - PRO Version of Jodit Editor
3
3
  * Author: Chupurnov Valerii <chupurnov@gmail.com>
4
- * Version: v4.18.9
4
+ * Version: v4.18.12
5
5
  * Url: https://xdsoft.net/jodit/pro/
6
6
  * License(s): SEE LICENSE IN LICENSE.md
7
7
  */
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * jodit-pro - PRO Version of Jodit Editor
3
3
  * Author: Chupurnov Valerii <chupurnov@gmail.com>
4
- * Version: v4.18.9
4
+ * Version: v4.18.12
5
5
  * Url: https://xdsoft.net/jodit/pro/
6
6
  * License(s): SEE LICENSE IN LICENSE.md
7
7
  */
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * jodit-pro - PRO Version of Jodit Editor
3
3
  * Author: Chupurnov Valerii <chupurnov@gmail.com>
4
- * Version: v4.18.9
4
+ * Version: v4.18.12
5
5
  * Url: https://xdsoft.net/jodit/pro/
6
6
  * License(s): SEE LICENSE IN LICENSE.md
7
7
  */
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * jodit-pro - PRO Version of Jodit Editor
3
3
  * Author: Chupurnov Valerii <chupurnov@gmail.com>
4
- * Version: v4.18.9
4
+ * Version: v4.18.12
5
5
  * Url: https://xdsoft.net/jodit/pro/
6
6
  * License(s): SEE LICENSE IN LICENSE.md
7
7
  */
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * jodit-pro - PRO Version of Jodit Editor
3
3
  * Author: Chupurnov Valerii <chupurnov@gmail.com>
4
- * Version: v4.18.9
4
+ * Version: v4.18.12
5
5
  * Url: https://xdsoft.net/jodit/pro/
6
6
  * License(s): SEE LICENSE IN LICENSE.md
7
7
  */
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * jodit-pro - PRO Version of Jodit Editor
3
3
  * Author: Chupurnov Valerii <chupurnov@gmail.com>
4
- * Version: v4.18.9
4
+ * Version: v4.18.12
5
5
  * Url: https://xdsoft.net/jodit/pro/
6
6
  * License(s): SEE LICENSE IN LICENSE.md
7
7
  */
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * jodit-pro - PRO Version of Jodit Editor
3
3
  * Author: Chupurnov Valerii <chupurnov@gmail.com>
4
- * Version: v4.18.9
4
+ * Version: v4.18.12
5
5
  * Url: https://xdsoft.net/jodit/pro/
6
6
  * License(s): SEE LICENSE IN LICENSE.md
7
7
  */
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * jodit-pro - PRO Version of Jodit Editor
3
3
  * Author: Chupurnov Valerii <chupurnov@gmail.com>
4
- * Version: v4.18.9
4
+ * Version: v4.18.12
5
5
  * Url: https://xdsoft.net/jodit/pro/
6
6
  * License(s): SEE LICENSE IN LICENSE.md
7
7
  */
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * jodit-pro - PRO Version of Jodit Editor
3
3
  * Author: Chupurnov Valerii <chupurnov@gmail.com>
4
- * Version: v4.18.9
4
+ * Version: v4.18.12
5
5
  * Url: https://xdsoft.net/jodit/pro/
6
6
  * License(s): SEE LICENSE IN LICENSE.md
7
7
  */
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * jodit-pro - PRO Version of Jodit Editor
3
3
  * Author: Chupurnov Valerii <chupurnov@gmail.com>
4
- * Version: v4.18.9
4
+ * Version: v4.18.12
5
5
  * Url: https://xdsoft.net/jodit/pro/
6
6
  * License(s): SEE LICENSE IN LICENSE.md
7
7
  */
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * jodit-pro - PRO Version of Jodit Editor
3
3
  * Author: Chupurnov Valerii <chupurnov@gmail.com>
4
- * Version: v4.18.9
4
+ * Version: v4.18.12
5
5
  * Url: https://xdsoft.net/jodit/pro/
6
6
  * License(s): SEE LICENSE IN LICENSE.md
7
7
  */
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * jodit-pro - PRO Version of Jodit Editor
3
3
  * Author: Chupurnov Valerii <chupurnov@gmail.com>
4
- * Version: v4.18.9
4
+ * Version: v4.18.12
5
5
  * Url: https://xdsoft.net/jodit/pro/
6
6
  * License(s): SEE LICENSE IN LICENSE.md
7
7
  */
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * jodit-pro - PRO Version of Jodit Editor
3
3
  * Author: Chupurnov Valerii <chupurnov@gmail.com>
4
- * Version: v4.18.9
4
+ * Version: v4.18.12
5
5
  * Url: https://xdsoft.net/jodit/pro/
6
6
  * License(s): SEE LICENSE IN LICENSE.md
7
7
  */
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * jodit-pro - PRO Version of Jodit Editor
3
3
  * Author: Chupurnov Valerii <chupurnov@gmail.com>
4
- * Version: v4.18.9
4
+ * Version: v4.18.12
5
5
  * Url: https://xdsoft.net/jodit/pro/
6
6
  * License(s): SEE LICENSE IN LICENSE.md
7
7
  */
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * jodit-pro - PRO Version of Jodit Editor
3
3
  * Author: Chupurnov Valerii <chupurnov@gmail.com>
4
- * Version: v4.18.9
4
+ * Version: v4.18.12
5
5
  * Url: https://xdsoft.net/jodit/pro/
6
6
  * License(s): SEE LICENSE IN LICENSE.md
7
7
  */
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * jodit-pro - PRO Version of Jodit Editor
3
3
  * Author: Chupurnov Valerii <chupurnov@gmail.com>
4
- * Version: v4.18.9
4
+ * Version: v4.18.12
5
5
  * Url: https://xdsoft.net/jodit/pro/
6
6
  * License(s): SEE LICENSE IN LICENSE.md
7
7
  */
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * jodit-pro - PRO Version of Jodit Editor
3
3
  * Author: Chupurnov Valerii <chupurnov@gmail.com>
4
- * Version: v4.18.9
4
+ * Version: v4.18.12
5
5
  * Url: https://xdsoft.net/jodit/pro/
6
6
  * License(s): SEE LICENSE IN LICENSE.md
7
7
  */
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * jodit-pro - PRO Version of Jodit Editor
3
3
  * Author: Chupurnov Valerii <chupurnov@gmail.com>
4
- * Version: v4.18.9
4
+ * Version: v4.18.12
5
5
  * Url: https://xdsoft.net/jodit/pro/
6
6
  * License(s): SEE LICENSE IN LICENSE.md
7
7
  */
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * jodit-pro - PRO Version of Jodit Editor
3
3
  * Author: Chupurnov Valerii <chupurnov@gmail.com>
4
- * Version: v4.18.9
4
+ * Version: v4.18.12
5
5
  * Url: https://xdsoft.net/jodit/pro/
6
6
  * License(s): SEE LICENSE IN LICENSE.md
7
7
  */
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * jodit-pro - PRO Version of Jodit Editor
3
3
  * Author: Chupurnov Valerii <chupurnov@gmail.com>
4
- * Version: v4.18.9
4
+ * Version: v4.18.12
5
5
  * Url: https://xdsoft.net/jodit/pro/
6
6
  * License(s): SEE LICENSE IN LICENSE.md
7
7
  */
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * jodit-pro - PRO Version of Jodit Editor
3
3
  * Author: Chupurnov Valerii <chupurnov@gmail.com>
4
- * Version: v4.18.9
4
+ * Version: v4.18.12
5
5
  * Url: https://xdsoft.net/jodit/pro/
6
6
  * License(s): SEE LICENSE IN LICENSE.md
7
7
  */
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * jodit-pro - PRO Version of Jodit Editor
3
3
  * Author: Chupurnov Valerii <chupurnov@gmail.com>
4
- * Version: v4.18.9
4
+ * Version: v4.18.12
5
5
  * Url: https://xdsoft.net/jodit/pro/
6
6
  * License(s): SEE LICENSE IN LICENSE.md
7
7
  */
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * jodit-pro - PRO Version of Jodit Editor
3
3
  * Author: Chupurnov Valerii <chupurnov@gmail.com>
4
- * Version: v4.18.9
4
+ * Version: v4.18.12
5
5
  * Url: https://xdsoft.net/jodit/pro/
6
6
  * License(s): SEE LICENSE IN LICENSE.md
7
7
  */
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * jodit-pro - PRO Version of Jodit Editor
3
3
  * Author: Chupurnov Valerii <chupurnov@gmail.com>
4
- * Version: v4.18.9
4
+ * Version: v4.18.12
5
5
  * Url: https://xdsoft.net/jodit/pro/
6
6
  * License(s): SEE LICENSE IN LICENSE.md
7
7
  */
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * jodit-pro - PRO Version of Jodit Editor
3
3
  * Author: Chupurnov Valerii <chupurnov@gmail.com>
4
- * Version: v4.18.9
4
+ * Version: v4.18.12
5
5
  * Url: https://xdsoft.net/jodit/pro/
6
6
  * License(s): SEE LICENSE IN LICENSE.md
7
7
  */
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * jodit-pro - PRO Version of Jodit Editor
3
3
  * Author: Chupurnov Valerii <chupurnov@gmail.com>
4
- * Version: v4.18.9
4
+ * Version: v4.18.12
5
5
  * Url: https://xdsoft.net/jodit/pro/
6
6
  * License(s): SEE LICENSE IN LICENSE.md
7
7
  */
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * jodit-pro - PRO Version of Jodit Editor
3
3
  * Author: Chupurnov Valerii <chupurnov@gmail.com>
4
- * Version: v4.18.9
4
+ * Version: v4.18.12
5
5
  * Url: https://xdsoft.net/jodit/pro/
6
6
  * License(s): SEE LICENSE IN LICENSE.md
7
7
  */
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * jodit-pro - PRO Version of Jodit Editor
3
3
  * Author: Chupurnov Valerii <chupurnov@gmail.com>
4
- * Version: v4.18.9
4
+ * Version: v4.18.12
5
5
  * Url: https://xdsoft.net/jodit/pro/
6
6
  * License(s): SEE LICENSE IN LICENSE.md
7
7
  */
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * jodit-pro - PRO Version of Jodit Editor
3
3
  * Author: Chupurnov Valerii <chupurnov@gmail.com>
4
- * Version: v4.18.9
4
+ * Version: v4.18.12
5
5
  * Url: https://xdsoft.net/jodit/pro/
6
6
  * License(s): SEE LICENSE IN LICENSE.md
7
7
  */
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * jodit-pro - PRO Version of Jodit Editor
3
3
  * Author: Chupurnov Valerii <chupurnov@gmail.com>
4
- * Version: v4.18.9
4
+ * Version: v4.18.12
5
5
  * Url: https://xdsoft.net/jodit/pro/
6
6
  * License(s): SEE LICENSE IN LICENSE.md
7
7
  */
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * jodit-pro - PRO Version of Jodit Editor
3
3
  * Author: Chupurnov Valerii <chupurnov@gmail.com>
4
- * Version: v4.18.9
4
+ * Version: v4.18.12
5
5
  * Url: https://xdsoft.net/jodit/pro/
6
6
  * License(s): SEE LICENSE IN LICENSE.md
7
7
  */
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * jodit-pro - PRO Version of Jodit Editor
3
3
  * Author: Chupurnov Valerii <chupurnov@gmail.com>
4
- * Version: v4.18.9
4
+ * Version: v4.18.12
5
5
  * Url: https://xdsoft.net/jodit/pro/
6
6
  * License(s): SEE LICENSE IN LICENSE.md
7
7
  */
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * jodit-pro - PRO Version of Jodit Editor
3
3
  * Author: Chupurnov Valerii <chupurnov@gmail.com>
4
- * Version: v4.18.9
4
+ * Version: v4.18.12
5
5
  * Url: https://xdsoft.net/jodit/pro/
6
6
  * License(s): SEE LICENSE IN LICENSE.md
7
7
  */
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * jodit-pro - PRO Version of Jodit Editor
3
3
  * Author: Chupurnov Valerii <chupurnov@gmail.com>
4
- * Version: v4.18.9
4
+ * Version: v4.18.12
5
5
  * Url: https://xdsoft.net/jodit/pro/
6
6
  * License(s): SEE LICENSE IN LICENSE.md
7
7
  */
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * jodit-pro - PRO Version of Jodit Editor
3
3
  * Author: Chupurnov Valerii <chupurnov@gmail.com>
4
- * Version: v4.18.9
4
+ * Version: v4.18.12
5
5
  * Url: https://xdsoft.net/jodit/pro/
6
6
  * License(s): SEE LICENSE IN LICENSE.md
7
7
  */
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * jodit-pro - PRO Version of Jodit Editor
3
3
  * Author: Chupurnov Valerii <chupurnov@gmail.com>
4
- * Version: v4.18.9
4
+ * Version: v4.18.12
5
5
  * Url: https://xdsoft.net/jodit/pro/
6
6
  * License(s): SEE LICENSE IN LICENSE.md
7
7
  */
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * jodit-pro - PRO Version of Jodit Editor
3
3
  * Author: Chupurnov Valerii <chupurnov@gmail.com>
4
- * Version: v4.18.9
4
+ * Version: v4.18.12
5
5
  * Url: https://xdsoft.net/jodit/pro/
6
6
  * License(s): SEE LICENSE IN LICENSE.md
7
7
  */
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * jodit-pro - PRO Version of Jodit Editor
3
3
  * Author: Chupurnov Valerii <chupurnov@gmail.com>
4
- * Version: v4.18.9
4
+ * Version: v4.18.12
5
5
  * Url: https://xdsoft.net/jodit/pro/
6
6
  * License(s): SEE LICENSE IN LICENSE.md
7
7
  */
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * jodit-pro - PRO Version of Jodit Editor
3
3
  * Author: Chupurnov Valerii <chupurnov@gmail.com>
4
- * Version: v4.18.9
4
+ * Version: v4.18.12
5
5
  * Url: https://xdsoft.net/jodit/pro/
6
6
  * License(s): SEE LICENSE IN LICENSE.md
7
7
  */
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * jodit-pro - PRO Version of Jodit Editor
3
3
  * Author: Chupurnov Valerii <chupurnov@gmail.com>
4
- * Version: v4.18.9
4
+ * Version: v4.18.12
5
5
  * Url: https://xdsoft.net/jodit/pro/
6
6
  * License(s): SEE LICENSE IN LICENSE.md
7
7
  */
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * jodit-pro - PRO Version of Jodit Editor
3
3
  * Author: Chupurnov Valerii <chupurnov@gmail.com>
4
- * Version: v4.18.9
4
+ * Version: v4.18.12
5
5
  * Url: https://xdsoft.net/jodit/pro/
6
6
  * License(s): SEE LICENSE IN LICENSE.md
7
7
  */
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * jodit-pro - PRO Version of Jodit Editor
3
3
  * Author: Chupurnov Valerii <chupurnov@gmail.com>
4
- * Version: v4.18.9
4
+ * Version: v4.18.12
5
5
  * Url: https://xdsoft.net/jodit/pro/
6
6
  * License(s): SEE LICENSE IN LICENSE.md
7
7
  */
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * jodit-pro - PRO Version of Jodit Editor
3
3
  * Author: Chupurnov Valerii <chupurnov@gmail.com>
4
- * Version: v4.18.9
4
+ * Version: v4.18.12
5
5
  * Url: https://xdsoft.net/jodit/pro/
6
6
  * License(s): SEE LICENSE IN LICENSE.md
7
7
  */
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * jodit-pro - PRO Version of Jodit Editor
3
3
  * Author: Chupurnov Valerii <chupurnov@gmail.com>
4
- * Version: v4.18.9
4
+ * Version: v4.18.12
5
5
  * Url: https://xdsoft.net/jodit/pro/
6
6
  * License(s): SEE LICENSE IN LICENSE.md
7
7
  */
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * jodit-pro - PRO Version of Jodit Editor
3
3
  * Author: Chupurnov Valerii <chupurnov@gmail.com>
4
- * Version: v4.18.9
4
+ * Version: v4.18.12
5
5
  * Url: https://xdsoft.net/jodit/pro/
6
6
  * License(s): SEE LICENSE IN LICENSE.md
7
7
  */
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * jodit-pro - PRO Version of Jodit Editor
3
3
  * Author: Chupurnov Valerii <chupurnov@gmail.com>
4
- * Version: v4.18.9
4
+ * Version: v4.18.12
5
5
  * Url: https://xdsoft.net/jodit/pro/
6
6
  * License(s): SEE LICENSE IN LICENSE.md
7
7
  */
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * jodit-pro - PRO Version of Jodit Editor
3
3
  * Author: Chupurnov Valerii <chupurnov@gmail.com>
4
- * Version: v4.18.9
4
+ * Version: v4.18.12
5
5
  * Url: https://xdsoft.net/jodit/pro/
6
6
  * License(s): SEE LICENSE IN LICENSE.md
7
7
  */
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * jodit-pro - PRO Version of Jodit Editor
3
3
  * Author: Chupurnov Valerii <chupurnov@gmail.com>
4
- * Version: v4.18.9
4
+ * Version: v4.18.12
5
5
  * Url: https://xdsoft.net/jodit/pro/
6
6
  * License(s): SEE LICENSE IN LICENSE.md
7
7
  */
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * jodit-pro - PRO Version of Jodit Editor
3
3
  * Author: Chupurnov Valerii <chupurnov@gmail.com>
4
- * Version: v4.18.9
4
+ * Version: v4.18.12
5
5
  * Url: https://xdsoft.net/jodit/pro/
6
6
  * License(s): SEE LICENSE IN LICENSE.md
7
7
  */
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * jodit-pro - PRO Version of Jodit Editor
3
3
  * Author: Chupurnov Valerii <chupurnov@gmail.com>
4
- * Version: v4.18.9
4
+ * Version: v4.18.12
5
5
  * Url: https://xdsoft.net/jodit/pro/
6
6
  * License(s): SEE LICENSE IN LICENSE.md
7
7
  */
package/es5/polyfills.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * jodit-pro - PRO Version of Jodit Editor
3
3
  * Author: Chupurnov Valerii <chupurnov@gmail.com>
4
- * Version: v4.18.9
4
+ * Version: v4.18.12
5
5
  * Url: https://xdsoft.net/jodit/pro/
6
6
  * License(s): SEE LICENSE IN LICENSE.md
7
7
  */
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * jodit-pro - PRO Version of Jodit Editor
3
3
  * Author: Chupurnov Valerii <chupurnov@gmail.com>
4
- * Version: v4.18.9
4
+ * Version: v4.18.12
5
5
  * Url: https://xdsoft.net/jodit/pro/
6
6
  * License(s): SEE LICENSE IN LICENSE.md
7
7
  */
@@ -1,3 +1,3 @@
1
- var b=Object.defineProperty;var _=(M,t)=>b(M,"name",{value:t,configurable:!0});var f,h=function(M,t,e,a){var s=arguments.length,i=s<3?t:a===null?a=Object.getOwnPropertyDescriptor(t,e):a,n;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(M,t,e,a);else for(var o=M.length-1;o>=0;o--)(n=M[o])&&(i=(s<3?n(i):s>3?n(t,e,i):n(t,e))||i);return s>3&&i&&Object.defineProperty(t,e,i),i};import"./config.js";import{APIClient as R}from"./helpers/api-client.js";import{PermissionManager as E}from"./helpers/permission-manager.js";import{StateManager as O}from"./helpers/state-manager.js";import{createStorageProvider as k,WebStorageConversationStorage as W}from"./helpers/storage/index.js";import{ToolRegistry as z}from"./helpers/tool-registry.js";import{UIMainPanel as F}from"./ui/main-panel/index.js";import{applyTheme as L,areAllToolCallsExecuted as H,createNewConversation as y,createUserMessage as j,deleteConversationWithCleanup as q,executeToolCall as Q,findMessagesWithPendingToolCalls as $,findParentMessageId as V,getCurrentSelectionContext as A,handleBackToList as N,handleConversationSearch as U,handleConversationSelect as B,handleToolApproval as G,handleToolDenial as J,invertMode as X,isTerminalToolCallStatus as Y,loadInitialData as Z,processArtifacts as K,processFinalResponse as tt,processStreamingResponse as et,resizeInPanelView as T,updateToolCallInMessage as st}from"./core/index.js";import*as at from"./langs/index.js";import{IS_PROD as it}from"jodit/esm/core/constants.js";import{cache as u,cached as p,component as nt,debounce as ot,watch as d}from"jodit/esm/core/decorators/index.js";import{extendLang as rt}from"jodit/esm/core/global.js";import{isAbortError as w,isString as lt}from"jodit/esm/core/helpers/index.js";import{Plugin as ht}from"jodit/esm/core/plugin/index.js";import{JoditPro as ct}from"../../jodit-pro.js";import{UIFlightPosition as D}from"../../traits/flight-position/flight-position.js";import{UIResize as S}from"../../traits/resize/resize.js";let l=(f=class extends ht{constructor(){super(...arguments),this.buttons=[{name:"aiAssistantPro",group:"insert"},{name:"aiCommandsPro",group:"insert"}],this.textAutocompleteSource=null,this.textAutocompleteCache=new Map,this.__initedPromise=null,this.__openedMode=null}get state(){return this.stateManager.state}get toolRegistry(){return new z(this.j)}get permissionManager(){return new E(this.j,this.toolRegistry)}get apiClient(){return new R(this.j,this.toolRegistry)}get storage(){const{storage:t,storageKey:e,maxConversations:a}=this.j.o.aiAssistantPro;if(typeof t=="string"){const s=k(t,e);return new W(s,a)}return t}get stateManager(){return new O(this.j)}get mainPanel(){return new F(this.j,this.stateManager.state,this.j.o.aiAssistantPro,t=>{const e=this.stateManager.getCurrentConversation();e&&this.stateManager.setCurrentConversation({...e,...t})})}get dialog(){const t=this.j.dlg({resizable:this.j.o.aiAssistantPro.resizable,eventEmmiter:this.j.e});return t.e.on(t,"afterClose",()=>{this.j.e.fire("closeAIAssistantPro.ai-assistant-pro")}),t}setupTextAutocomplete(){const{textAutocompleteEnabled:t,textAutocompleteApiRequest:e,textAutocompleteMinQueryLength:a,textAutocompleteMaxSuggestions:s,textAutocompleteDebounceMs:i,textAutocompleteCacheTTL:n,textAutocompleteCacheMaxSize:o}=this.j.o.aiAssistantPro;if(!t||!e)return;this.j.o.autocomplete={...this.j.o.autocomplete,displayMode:"inline"};const r=this.textAutocompleteCache;let c=null;this.textAutocompleteSource=v=>{if(v.length<a)return[];const P=`${v}:${s}`;if(n>0){const g=r.get(P);if(g&&Date.now()-g.ts<n)return g.data.map(m=>({value:m,title:m}))}c&&clearTimeout(c);const I=new AbortController;return new Promise(g=>{c=setTimeout(async()=>{try{const m=await e(v,s,I.signal);if(Array.isArray(m)){const x=m.slice(0,s);if(n>0){if(r.size>=o){const C=r.keys().next().value;C!=null&&r.delete(C)}r.set(P,{ts:Date.now(),data:x})}g(x.map(C=>({value:C,title:C})));return}g([])}catch{g([])}},i)})},this.j.e.fire("registerAutocompleteSource",this.textAutocompleteSource)}afterInit(){rt(at),this.setupEventListeners(),this.setupTextAutocomplete(),this.j.async.promise(t=>{const{initiallyOpened:e,persistOpenState:a}=this.j.o.aiAssistantPro;let s=e;if(a){this.storage.getGlobalSettings().then(i=>{if(i?.isOpen!=null&&(s=i.isOpen),s)return this.openAssistant()}).catch(()=>null).finally(()=>t(void 0));return}t(void 0)}).catch(()=>null)}__loadData(){return this.__initedPromise?this.__initedPromise:this.isDestructed?Promise.reject():(this.__initedPromise=this.j.async.promise(t=>{this.loadInitialData().then(t)}).catch(()=>null),this.__initedPromise)}async loadInitialData(){this.mainPanel.setMod("ready",!0),await Z(this.j,this.storage,this.stateManager),await this.restorePendingToolCalls()}async restorePendingToolCalls(){const t=this.stateManager.getCurrentConversation();if(!t)return;const e=$(t);if(e.length!==0)for(const a of e)await this.handleToolCalls(a.id)}setupEventListeners(){this.j.e.on("selectConversation.ai-assistant-pro",async t=>{try{await this.__loadData(),await B(t,this.storage,this.stateManager)}catch(e){it||console.log(e)}}),this.j.e.on("newConversation.ai-assistant-pro",async()=>{await this.__loadData();const t=y(this.j,this.state.defaultModel,this.state.defaultTemperature);this.stateManager.setCurrentConversation(t)}),this.j.e.on("deleteConversation.ai-assistant-pro",async t=>{await this.__loadData(),await this.deleteConversation(t)}),this.j.e.on("renameConversation.ai-assistant-pro",async(t,e)=>{await this.__loadData(),await this.renameConversation(t,e)}),this.j.e.on("backToList.ai-assistant-pro",async()=>{await this.__loadData(),await N(this.storage,this.stateManager)}),this.j.e.on("removeContext.ai-assistant-pro",async t=>{await this.__loadData(),this.stateManager.removeSelectionContext(t)}),this.j.e.on("approveToolCall.ai-assistant-pro",async(t,e)=>{try{await this.__loadData();const a=await G(t,e,this.stateManager,this.permissionManager,this.storage);if(a){const s=this.stateManager.getCurrentConversation();if(!s)return;const i=s.messages.find(n=>{var o;return(o=n.toolCalls)===null||o===void 0?void 0:o.some(r=>r.id===a.id)});if(!i)return;await this.executeToolCall(i.id,a)}}catch(a){if(w(a))return;this.stateManager.setError(a instanceof Error?a.message:String(a))}}),this.j.e.on("denyToolCall.ai-assistant-pro",async t=>{await this.__loadData(),await J(this.j,t,this.stateManager,this.storage)}),this.j.e.on("abortRequest.ai-assistant-pro",async()=>{await this.__loadData(),this.apiClient.abort(),this.stateManager.setLoading(!1)})}__applyTheme(){L(this.j,this.stateManager.state.theme,this.stateManager.state.displayMode,this.mainPanel.container,this.dialog)}async openAssistant(){if(this.stateManager.isOpen()){this.stateManager.close(),await this.__closeInContainer();return}await this.__loadData(),!this.isDestructed&&(this.stateManager.open(),await this.__openInContainer(),this.j.o.aiAssistantPro.includeSelectionByDefault&&!this.j.s.isCollapsed()&&this.addCurrentSelectionToContext())}async __openInContainer(){const{resizable:t,allowClose:e,flightPanelHeight:a}=this.j.o.aiAssistantPro,{displayMode:s="right",panelWidth:i,panelHeight:n}=this.stateManager.state;switch(this.__applyTheme(),this.mainPanel.setMod("displayMode",s),this.mainPanel.setMod("allowClose",e),this.mainPanel.setParentView(s==="dialog"||s==="flight"?this.dialog:this.j),this.__openedMode=s,s){case"dialog":{this.dialog.setSize(i,n).open().setContent(this.mainPanel.container);break}case"flight":{D.install(this.mainPanel,this.j.container,{panelHeight:a,containerClassName:this.getFullElName("flight-container")});break}default:{t&&(S.remove(this.mainPanel),S.install(this.mainPanel,X(s),{handleClassName:this.getFullElName("ai-assistent-resize-handle"),onResize:_(({newSize:o})=>{const r=s==="left"||s==="right"?o:i,c=s==="top"||s==="bottom"?o:n;return this.stateManager.state.panelWidth=r,this.stateManager.state.panelHeight=c,!0},"onResize")})),this.j.currentPlace.slots[s].appendChild(this.mainPanel.container),T(this.j,s,i,n);break}}}__onResizeInPanelView(){const{displayMode:t,panelWidth:e,panelHeight:a}=this.stateManager.state;T(this.j,t,e,a)}async __closeInContainer(){const{displayMode:t}=await this.stateManager.state;switch(this.__openedMode!==t&&this.__openedMode==="dialog"&&this.dialog.close(),this.__openedMode!==t&&this.__openedMode==="flight"&&this.__closeFlightMode(),t){case"dialog":{this.dialog.close();break}case"flight":{this.__closeFlightMode();break}default:{this.mainPanel.container.remove();break}}}__closeFlightMode(){D.remove(this.mainPanel)}__onSavedStateChange(){var t;const e=this.stateManager.state;return this.storage.saveGlobalSettings({displayMode:e.displayMode,panelWidth:e.panelWidth,panelHeight:e.panelHeight,theme:e.theme,defaultModel:e.defaultModel,defaultTemperature:e.defaultTemperature,currentConversationId:(t=e.currentConversation)===null||t===void 0?void 0:t.id,...this.j.o.aiAssistantPro.persistOpenState?{isOpen:e.isOpen}:{}})}async closeAssistant(){this.stateManager.isOpen()&&(await this.__loadData(),this.stateManager.close(),this.__closeInContainer())}async addCurrentSelectionToContext(){await this.__loadData();const t=A(this.j);t&&this.stateManager.addSelectionContext(t)}async executeQuickCommand(t){const{quickCommandsSilentMode:e,quickCommandsDisplayMode:a}=this.j.o.aiAssistantPro,s=this.j.o.aiAssistant;let i;if(s&&s[t]&&lt(s[t])&&(i=s[t]),!i){this.j.e.fire("error",`Command not found: ${t}`);return}const n=this.j.s.isCollapsed()?this.j.value:this.j.s.html;if(!n)return;const o=s?.aiCommonPrefixPrompt||"",r=s?.aiCommonSuffixPrompt||"",c=`${o}${i}${r}
1
+ var b=Object.defineProperty;var v=(M,t)=>b(M,"name",{value:t,configurable:!0});var f,h=function(M,t,e,a){var s=arguments.length,i=s<3?t:a===null?a=Object.getOwnPropertyDescriptor(t,e):a,n;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(M,t,e,a);else for(var o=M.length-1;o>=0;o--)(n=M[o])&&(i=(s<3?n(i):s>3?n(t,e,i):n(t,e))||i);return s>3&&i&&Object.defineProperty(t,e,i),i};import"./config.js";import{APIClient as R}from"./helpers/api-client.js";import{PermissionManager as E}from"./helpers/permission-manager.js";import{StateManager as O}from"./helpers/state-manager.js";import{createStorageProvider as k,WebStorageConversationStorage as z}from"./helpers/storage/index.js";import{ToolRegistry as W}from"./helpers/tool-registry.js";import{UIMainPanel as F}from"./ui/main-panel/index.js";import{applyTheme as L,areAllToolCallsExecuted as H,clearPanelViewSize as q,createNewConversation as y,createUserMessage as j,deleteConversationWithCleanup as Q,executeToolCall as $,findMessagesWithPendingToolCalls as V,findParentMessageId as N,getCurrentSelectionContext as A,handleBackToList as U,handleConversationSearch as B,handleConversationSelect as G,handleToolApproval as J,handleToolDenial as X,invertMode as Y,isTerminalToolCallStatus as Z,loadInitialData as K,processArtifacts as tt,processFinalResponse as et,processStreamingResponse as st,resizeInPanelView as T,updateToolCallInMessage as at}from"./core/index.js";import*as it from"./langs/index.js";import{IS_PROD as nt}from"jodit/esm/core/constants.js";import{cache as g,cached as p,component as ot,debounce as rt,watch as d}from"jodit/esm/core/decorators/index.js";import{extendLang as lt}from"jodit/esm/core/global.js";import{isAbortError as w,isString as ht}from"jodit/esm/core/helpers/index.js";import{Plugin as ct}from"jodit/esm/core/plugin/index.js";import{JoditPro as dt}from"../../jodit-pro.js";import{UIFlightPosition as S}from"../../traits/flight-position/flight-position.js";import{UIResize as D}from"../../traits/resize/resize.js";let l=(f=class extends ct{constructor(){super(...arguments),this.buttons=[{name:"aiAssistantPro",group:"insert"},{name:"aiCommandsPro",group:"insert"}],this.textAutocompleteSource=null,this.textAutocompleteCache=new Map,this.__initedPromise=null,this.__openedMode=null}get state(){return this.stateManager.state}get toolRegistry(){return new W(this.j)}get permissionManager(){return new E(this.j,this.toolRegistry)}get apiClient(){return new R(this.j,this.toolRegistry)}get storage(){const{storage:t,storageKey:e,maxConversations:a}=this.j.o.aiAssistantPro;if(typeof t=="string"){const s=k(t,e);return new z(s,a)}return t}get stateManager(){return new O(this.j)}get mainPanel(){return new F(this.j,this.stateManager.state,this.j.o.aiAssistantPro,t=>{const e=this.stateManager.getCurrentConversation();e&&this.stateManager.setCurrentConversation({...e,...t})})}get dialog(){const t=this.j.dlg({resizable:this.j.o.aiAssistantPro.resizable,eventEmmiter:this.j.e});return t.e.on(t,"afterClose",()=>{this.j.e.fire("closeAIAssistantPro.ai-assistant-pro")}),t}setupTextAutocomplete(){const{textAutocompleteEnabled:t,textAutocompleteApiRequest:e,textAutocompleteMinQueryLength:a,textAutocompleteMaxSuggestions:s,textAutocompleteDebounceMs:i,textAutocompleteCacheTTL:n,textAutocompleteCacheMaxSize:o}=this.j.o.aiAssistantPro;if(!t||!e)return;this.j.o.autocomplete={...this.j.o.autocomplete,displayMode:"inline"};const r=this.textAutocompleteCache;let c=null;this.textAutocompleteSource=_=>{if(_.length<a)return[];const P=`${_}:${s}`;if(n>0){const u=r.get(P);if(u&&Date.now()-u.ts<n)return u.data.map(m=>({value:m,title:m}))}c&&clearTimeout(c);const I=new AbortController;return new Promise(u=>{c=setTimeout(async()=>{try{const m=await e(_,s,I.signal);if(Array.isArray(m)){const x=m.slice(0,s);if(n>0){if(r.size>=o){const C=r.keys().next().value;C!=null&&r.delete(C)}r.set(P,{ts:Date.now(),data:x})}u(x.map(C=>({value:C,title:C})));return}u([])}catch{u([])}},i)})},this.j.e.fire("registerAutocompleteSource",this.textAutocompleteSource)}afterInit(){lt(it),this.setupEventListeners(),this.setupTextAutocomplete(),this.j.async.promise(t=>{const{initiallyOpened:e,persistOpenState:a}=this.j.o.aiAssistantPro;let s=e;if(a){this.storage.getGlobalSettings().then(i=>{if(i?.isOpen!=null&&(s=i.isOpen),s)return this.openAssistant()}).catch(()=>null).finally(()=>t(void 0));return}t(void 0)}).catch(()=>null)}__loadData(){return this.__initedPromise?this.__initedPromise:this.isDestructed?Promise.reject():(this.__initedPromise=this.j.async.promise(t=>{this.loadInitialData().then(t)}).catch(()=>null),this.__initedPromise)}async loadInitialData(){this.mainPanel.setMod("ready",!0),await K(this.j,this.storage,this.stateManager),await this.restorePendingToolCalls()}async restorePendingToolCalls(){const t=this.stateManager.getCurrentConversation();if(!t)return;const e=V(t);if(e.length!==0)for(const a of e)await this.handleToolCalls(a.id)}setupEventListeners(){this.j.e.on("selectConversation.ai-assistant-pro",async t=>{try{await this.__loadData(),await G(t,this.storage,this.stateManager)}catch(e){nt||console.log(e)}}),this.j.e.on("newConversation.ai-assistant-pro",async()=>{await this.__loadData();const t=y(this.j,this.state.defaultModel,this.state.defaultTemperature);this.stateManager.setCurrentConversation(t)}),this.j.e.on("deleteConversation.ai-assistant-pro",async t=>{await this.__loadData(),await this.deleteConversation(t)}),this.j.e.on("renameConversation.ai-assistant-pro",async(t,e)=>{await this.__loadData(),await this.renameConversation(t,e)}),this.j.e.on("backToList.ai-assistant-pro",async()=>{await this.__loadData(),await U(this.storage,this.stateManager)}),this.j.e.on("removeContext.ai-assistant-pro",async t=>{await this.__loadData(),this.stateManager.removeSelectionContext(t)}),this.j.e.on("approveToolCall.ai-assistant-pro",async(t,e)=>{try{await this.__loadData();const a=await J(t,e,this.stateManager,this.permissionManager,this.storage);if(a){const s=this.stateManager.getCurrentConversation();if(!s)return;const i=s.messages.find(n=>{var o;return(o=n.toolCalls)===null||o===void 0?void 0:o.some(r=>r.id===a.id)});if(!i)return;await this.executeToolCall(i.id,a)}}catch(a){if(w(a))return;this.stateManager.setError(a instanceof Error?a.message:String(a))}}),this.j.e.on("denyToolCall.ai-assistant-pro",async t=>{await this.__loadData(),await X(this.j,t,this.stateManager,this.storage)}),this.j.e.on("abortRequest.ai-assistant-pro",async()=>{await this.__loadData(),this.apiClient.abort(),this.stateManager.setLoading(!1)})}__applyTheme(){L(this.j,this.stateManager.state.theme,this.stateManager.state.displayMode,this.mainPanel.container,this.dialog)}async openAssistant(){if(this.stateManager.isOpen()){this.stateManager.close(),await this.__closeInContainer();return}await this.__loadData(),!this.isDestructed&&(this.stateManager.open(),await this.__openInContainer(),this.j.o.aiAssistantPro.includeSelectionByDefault&&!this.j.s.isCollapsed()&&this.addCurrentSelectionToContext())}async __openInContainer(){const{resizable:t,allowClose:e,flightPanelHeight:a}=this.j.o.aiAssistantPro,{displayMode:s="right",panelWidth:i,panelHeight:n}=this.stateManager.state;switch(this.__applyTheme(),this.mainPanel.setMod("displayMode",s),this.mainPanel.setMod("allowClose",e),this.mainPanel.setParentView(s==="dialog"||s==="flight"?this.dialog:this.j),this.__openedMode=s,s){case"dialog":{this.dialog.setSize(i,n).open().setContent(this.mainPanel.container);break}case"flight":{S.install(this.mainPanel,this.j.container,{panelHeight:a,containerClassName:this.getFullElName("flight-container")});break}default:{t&&(D.remove(this.mainPanel),D.install(this.mainPanel,Y(s),{handleClassName:this.getFullElName("ai-assistent-resize-handle"),onResize:v(({newSize:o})=>{const r=s==="left"||s==="right"?o:i,c=s==="top"||s==="bottom"?o:n;return this.stateManager.state.panelWidth=r,this.stateManager.state.panelHeight=c,!0},"onResize")})),this.j.currentPlace.slots[s].appendChild(this.mainPanel.container),T(this.j,s,i,n);break}}}__onResizeInPanelView(){if(this.__openedMode==null)return;const{displayMode:t,panelWidth:e,panelHeight:a}=this.stateManager.state;T(this.j,t,e,a)}async __closeInContainer(){const{displayMode:t}=await this.stateManager.state;switch(this.__openedMode!==t&&this.__openedMode==="dialog"&&this.dialog.close(),this.__openedMode!==t&&this.__openedMode==="flight"&&this.__closeFlightMode(),t){case"dialog":{this.dialog.close();break}case"flight":{this.__closeFlightMode();break}default:{this.mainPanel.container.remove(),q(this.j,t);break}}this.__openedMode=null}__closeFlightMode(){S.remove(this.mainPanel)}__onSavedStateChange(){var t;const e=this.stateManager.state;return this.storage.saveGlobalSettings({displayMode:e.displayMode,panelWidth:e.panelWidth,panelHeight:e.panelHeight,theme:e.theme,defaultModel:e.defaultModel,defaultTemperature:e.defaultTemperature,currentConversationId:(t=e.currentConversation)===null||t===void 0?void 0:t.id,...this.j.o.aiAssistantPro.persistOpenState?{isOpen:e.isOpen}:{}})}async closeAssistant(){this.stateManager.isOpen()&&(await this.__loadData(),this.stateManager.close(),this.__closeInContainer())}async addCurrentSelectionToContext(){await this.__loadData();const t=A(this.j);t&&this.stateManager.addSelectionContext(t)}async executeQuickCommand(t){const{quickCommandsSilentMode:e,quickCommandsDisplayMode:a}=this.j.o.aiAssistantPro,s=this.j.o.aiAssistant;let i;if(s&&s[t]&&ht(s[t])&&(i=s[t]),!i){this.j.e.fire("error",`Command not found: ${t}`);return}const n=this.j.s.isCollapsed()?this.j.value:this.j.s.html;if(!n)return;const o=s?.aiCommonPrefixPrompt||"",r=s?.aiCommonSuffixPrompt||"",c=`${o}${i}${r}
2
2
 
3
- ${n}`.trim();e?await this.__executeQuickCommandSilent(c,n):await this.__executeQuickCommandWithPanel(c,a)}async __executeQuickCommandSilent(t,e){await this.__loadData(),this.j.progressbar.show().progress(100);try{const a=j(t),s=y(this.j,this.state.defaultModel,this.state.defaultTemperature,[a]),i=await this.apiClient.sendRequest(s.id,s.messages,null,[],s.options);if(i.mode==="final"){const n=i.response.content;n&&this.j.s.insertHTML(n)}}catch(a){w(a)||this.j.e.fire("error",a)}finally{this.j.progressbar.hide()}}async __executeQuickCommandWithPanel(t,e){await this.__loadData();const a=this.stateManager.state.displayMode;this.stateManager.state.displayMode=e;const s=A(this.j);s&&this.stateManager.addSelectionContext(s),this.stateManager.isOpen()||await this.openAssistant(),await this.sendMessage(t),this.stateManager.state.displayMode=a}async sendMessage(t){await this.__loadData();let e=this.stateManager.getCurrentConversation();const a=this.stateManager.getEditingMessageId();if(a&&e){const i=e.messages.findIndex(n=>n.id===a);if(i!==-1){const n=e.messages.slice(0,i),o={...e,messages:n,updatedAt:Date.now()};this.stateManager.setCurrentConversation(o),await this.storage.save(o),this.stateManager.clearEditingMessage(),e=o}}e||(e=y(this.j,this.state.defaultModel,this.state.defaultTemperature),this.stateManager.setCurrentConversation(e));let s=null;t.trim()&&(s=j(t),e.title||(e={...e,title:t}),e={...e,updated:Date.now(),messages:[...e.messages,s]}),this.stateManager.setCurrentConversation({...e}),s&&this.j.e.fire("messageSent.ai-assistant-pro",s),this.stateManager.setLoading(!0),this.stateManager.clearError();try{await this.sendRequestToAI(0),this.stateManager.clearSelectionContexts()}catch(i){if(w(i))return;this.stateManager.setError(i instanceof Error?i.message:String(i))}finally{this.stateManager.setLoading(!1)}}async sendRequestToAI(t=0){const e=this.j.o.aiAssistantPro.maxRecursionToolCallDepth;if(t>=e)throw Error(`Max recursion depth ${e} reached for tool calls`);let a=this.stateManager.getCurrentConversation();if(!a)return;const s=V(a),[i]=await Promise.all([this.apiClient.sendRequest(a.id,a.messages,s,this.stateManager.getSelectionContexts(),a.options),this.storage.save(a)]);let n,o;if(i.mode==="stream"){const r=await et(this.stateManager,i,a);n=r.aiMessage,o=r.index,a=r.conversation}else{const r=tt(i,a);n=r.aiMessage,o=r.index,a=r.conversation}a=await K(this.j,n,a,o),this.j.e.fire("messageReceived.ai-assistant-pro",n),this.stateManager.setCurrentConversation({...a}),await this.storage.save(a),await this.handleToolCalls(n.id,t)}async deleteConversation(t){await this.__loadData(),await q(this.j,t,this.storage,this.stateManager,this.permissionManager)}async renameConversation(t,e){var a;const s=await this.storage.get(t);if(!s)return;const i={...s,title:e,updated:Date.now()};await this.storage.save(i),((a=this.state.currentConversation)===null||a===void 0?void 0:a.id)===t&&this.stateManager.setCurrentConversation(i);const n=await this.storage.list();this.stateManager.setConversations(n)}async searchConversations(t){await this.__loadData(),await U(t,this.storage,this.stateManager)}async handleToolCalls(t,e=0){const a=this.stateManager.getCurrentConversation();if(!a)return;const s=a.messages.find(c=>c.id===t);if(!s)return;const i=s.toolCalls;if(!i||i.length===0)return;const n=i.filter(c=>!Y(c.status));if(n.length===0)return;const{approved:o,needsPermission:r}=this.permissionManager.filterToolCalls(n,a.permissions);this.stateManager.setPendingToolCalls(r);for(const c of o)await this.executeToolCall(t,c,e)}async executeToolCall(t,e,a=0){let s=this.stateManager.getCurrentConversation();if(!s)return;const i=await Q(this.j,e,this.toolRegistry),n=s.messages.findIndex(c=>c.id===t);if(n===-1)return;const o=s.messages[n],r=s.messages.slice();r[n]=st(o,i),s={...s,messages:r,updated:Date.now()},this.stateManager.setCurrentConversation(s),H(s)&&await this.sendRequestToAI(a+1)}async copyMessage(t){const e=this.stateManager.getCurrentConversation();if(!e)return;const a=e.messages.find(s=>s.id===t);if(a)try{await navigator.clipboard.writeText(a.content),this.j.message.success("Message copied to clipboard")}catch{this.j.e.fire("error",new Error("Failed to copy message"))}}async restartFromMessage(t){const e=this.stateManager.getCurrentConversation();if(!e)return;const a=e.messages.findIndex(o=>o.id===t);if(a===-1)return;const s=e.messages[a];if(s.role!=="user")return;await this.__loadData();const i=e.messages.slice(0,a),n={...e,messages:i,updatedAt:Date.now()};this.stateManager.setCurrentConversation(n),await this.storage.save(n),await this.sendMessage(s.content)}async editMessage(t){const e=this.stateManager.getCurrentConversation();if(!e)return;const a=e.messages.find(s=>s.id===t);!a||a.role!=="user"||(this.stateManager.setEditingMessageId(t),this.mainPanel.inputArea.setValue(a.content),this.mainPanel.inputArea.focus())}cancelEditMessage(){this.stateManager.isEditingMessage()&&(this.stateManager.clearEditingMessage(),this.mainPanel.inputArea.setValue(""))}async deleteMessage(t){await this.__loadData();const e=this.stateManager.getCurrentConversation();if(!e||e.messages.findIndex(n=>n.id===t)===-1)return;const s=e.messages.filter(n=>n.id!==t),i={...e,messages:s,updatedAt:Date.now()};this.stateManager.setCurrentConversation(i),await this.storage.save(i)}beforeDestruct(){var t,e,a,s,i,n,o,r;this.textAutocompleteSource&&(this.j.e.fire("unregisterAutocompleteSource",this.textAutocompleteSource),this.textAutocompleteSource=null),this.textAutocompleteCache.clear(),this.__closeFlightMode(),(t=p(this,"toolRegistry"))===null||t===void 0||t.destruct(),(e=p(this,"permissionManager"))===null||e===void 0||e.destruct(),(a=p(this,"apiClient"))===null||a===void 0||a.destruct(),(s=p(this,"stateManager"))===null||s===void 0||s.destruct(),(i=p(this,"mainPanel"))===null||i===void 0||i.destruct(),(n=p(this,"dialog"))===null||n===void 0||n.destruct(),(r=(o=p(this,"storage"))===null||o===void 0?void 0:o.close)===null||r===void 0||r.call(o)}},_(f,"aiAssistantPro"),f);l.requires=["license","autocomplete"],h([u],l.prototype,"toolRegistry",null),h([u],l.prototype,"permissionManager",null),h([u],l.prototype,"apiClient",null),h([u],l.prototype,"storage",null),h([u],l.prototype,"stateManager",null),h([u],l.prototype,"mainPanel",null),h([u],l.prototype,"dialog",null),h([d("state.theme")],l.prototype,"__applyTheme",null),h([d(":openAIAssistantPro.ai-assistant-pro")],l.prototype,"openAssistant",null),h([d([":resize","state.panelWidth","state.panelHeight"])],l.prototype,"__onResizeInPanelView",null),h([d(["state.isOpen","state.displayMode","state.panelWidth","state.panelHeight","state.theme","state.defaultModel","state.defaultTemperature","state.currentConversation"]),ot()],l.prototype,"__onSavedStateChange",null),h([d(":closeAIAssistantPro.ai-assistant-pro")],l.prototype,"closeAssistant",null),h([d(":addContextToAIAssistant.ai-assistant-pro")],l.prototype,"addCurrentSelectionToContext",null),h([d(":executeQuickCommand.ai-assistant-pro")],l.prototype,"executeQuickCommand",null),h([d(":sendMessage.ai-assistant-pro")],l.prototype,"sendMessage",null),h([d(":searchConversations.ai-assistant-pro")],l.prototype,"searchConversations",null),h([d(":copyMessage.ai-assistant-pro")],l.prototype,"copyMessage",null),h([d(":restartFromMessage.ai-assistant-pro")],l.prototype,"restartFromMessage",null),h([d(":editMessage.ai-assistant-pro")],l.prototype,"editMessage",null),h([d(":cancelEditMessage.ai-assistant-pro")],l.prototype,"cancelEditMessage",null),h([d(":deleteMessage.ai-assistant-pro")],l.prototype,"deleteMessage",null),l=h([nt],l);ct.plugins.add("aiAssistantPro",l);export{l as aiAssistantPro};
3
+ ${n}`.trim();e?await this.__executeQuickCommandSilent(c,n):await this.__executeQuickCommandWithPanel(c,a)}async __executeQuickCommandSilent(t,e){await this.__loadData(),this.j.progressbar.show().progress(100);try{const a=j(t),s=y(this.j,this.state.defaultModel,this.state.defaultTemperature,[a]),i=await this.apiClient.sendRequest(s.id,s.messages,null,[],s.options);if(i.mode==="final"){const n=i.response.content;n&&this.j.s.insertHTML(n)}}catch(a){w(a)||this.j.e.fire("error",a)}finally{this.j.progressbar.hide()}}async __executeQuickCommandWithPanel(t,e){await this.__loadData();const a=this.stateManager.state.displayMode;this.stateManager.state.displayMode=e;const s=A(this.j);s&&this.stateManager.addSelectionContext(s),this.stateManager.isOpen()||await this.openAssistant(),await this.sendMessage(t),this.stateManager.state.displayMode=a}async sendMessage(t){await this.__loadData();let e=this.stateManager.getCurrentConversation();const a=this.stateManager.getEditingMessageId();if(a&&e){const i=e.messages.findIndex(n=>n.id===a);if(i!==-1){const n=e.messages.slice(0,i),o={...e,messages:n,updatedAt:Date.now()};this.stateManager.setCurrentConversation(o),await this.storage.save(o),this.stateManager.clearEditingMessage(),e=o}}e||(e=y(this.j,this.state.defaultModel,this.state.defaultTemperature),this.stateManager.setCurrentConversation(e));let s=null;t.trim()&&(s=j(t),e.title||(e={...e,title:t}),e={...e,updated:Date.now(),messages:[...e.messages,s]}),this.stateManager.setCurrentConversation({...e}),s&&this.j.e.fire("messageSent.ai-assistant-pro",s),this.stateManager.setLoading(!0),this.stateManager.clearError();try{await this.sendRequestToAI(0),this.stateManager.clearSelectionContexts()}catch(i){if(w(i))return;this.stateManager.setError(i instanceof Error?i.message:String(i))}finally{this.stateManager.setLoading(!1)}}async sendRequestToAI(t=0){const e=this.j.o.aiAssistantPro.maxRecursionToolCallDepth;if(t>=e)throw Error(`Max recursion depth ${e} reached for tool calls`);let a=this.stateManager.getCurrentConversation();if(!a)return;const s=N(a),[i]=await Promise.all([this.apiClient.sendRequest(a.id,a.messages,s,this.stateManager.getSelectionContexts(),a.options),this.storage.save(a)]);let n,o;if(i.mode==="stream"){const r=await st(this.stateManager,i,a);n=r.aiMessage,o=r.index,a=r.conversation}else{const r=et(i,a);n=r.aiMessage,o=r.index,a=r.conversation}a=await tt(this.j,n,a,o),this.j.e.fire("messageReceived.ai-assistant-pro",n),this.stateManager.setCurrentConversation({...a}),await this.storage.save(a),await this.handleToolCalls(n.id,t)}async deleteConversation(t){await this.__loadData(),await Q(this.j,t,this.storage,this.stateManager,this.permissionManager)}async renameConversation(t,e){var a;const s=await this.storage.get(t);if(!s)return;const i={...s,title:e,updated:Date.now()};await this.storage.save(i),((a=this.state.currentConversation)===null||a===void 0?void 0:a.id)===t&&this.stateManager.setCurrentConversation(i);const n=await this.storage.list();this.stateManager.setConversations(n)}async searchConversations(t){await this.__loadData(),await B(t,this.storage,this.stateManager)}async handleToolCalls(t,e=0){const a=this.stateManager.getCurrentConversation();if(!a)return;const s=a.messages.find(c=>c.id===t);if(!s)return;const i=s.toolCalls;if(!i||i.length===0)return;const n=i.filter(c=>!Z(c.status));if(n.length===0)return;const{approved:o,needsPermission:r}=this.permissionManager.filterToolCalls(n,a.permissions);this.stateManager.setPendingToolCalls(r);for(const c of o)await this.executeToolCall(t,c,e)}async executeToolCall(t,e,a=0){let s=this.stateManager.getCurrentConversation();if(!s)return;const i=await $(this.j,e,this.toolRegistry),n=s.messages.findIndex(c=>c.id===t);if(n===-1)return;const o=s.messages[n],r=s.messages.slice();r[n]=at(o,i),s={...s,messages:r,updated:Date.now()},this.stateManager.setCurrentConversation(s),H(s)&&await this.sendRequestToAI(a+1)}async copyMessage(t){const e=this.stateManager.getCurrentConversation();if(!e)return;const a=e.messages.find(s=>s.id===t);if(a)try{await navigator.clipboard.writeText(a.content),this.j.message.success("Message copied to clipboard")}catch{this.j.e.fire("error",new Error("Failed to copy message"))}}async restartFromMessage(t){const e=this.stateManager.getCurrentConversation();if(!e)return;const a=e.messages.findIndex(o=>o.id===t);if(a===-1)return;const s=e.messages[a];if(s.role!=="user")return;await this.__loadData();const i=e.messages.slice(0,a),n={...e,messages:i,updatedAt:Date.now()};this.stateManager.setCurrentConversation(n),await this.storage.save(n),await this.sendMessage(s.content)}async editMessage(t){const e=this.stateManager.getCurrentConversation();if(!e)return;const a=e.messages.find(s=>s.id===t);!a||a.role!=="user"||(this.stateManager.setEditingMessageId(t),this.mainPanel.inputArea.setValue(a.content),this.mainPanel.inputArea.focus())}cancelEditMessage(){this.stateManager.isEditingMessage()&&(this.stateManager.clearEditingMessage(),this.mainPanel.inputArea.setValue(""))}async deleteMessage(t){await this.__loadData();const e=this.stateManager.getCurrentConversation();if(!e||e.messages.findIndex(n=>n.id===t)===-1)return;const s=e.messages.filter(n=>n.id!==t),i={...e,messages:s,updatedAt:Date.now()};this.stateManager.setCurrentConversation(i),await this.storage.save(i)}beforeDestruct(){var t,e,a,s,i,n,o,r;this.textAutocompleteSource&&(this.j.e.fire("unregisterAutocompleteSource",this.textAutocompleteSource),this.textAutocompleteSource=null),this.textAutocompleteCache.clear(),this.__closeFlightMode(),(t=p(this,"toolRegistry"))===null||t===void 0||t.destruct(),(e=p(this,"permissionManager"))===null||e===void 0||e.destruct(),(a=p(this,"apiClient"))===null||a===void 0||a.destruct(),(s=p(this,"stateManager"))===null||s===void 0||s.destruct(),(i=p(this,"mainPanel"))===null||i===void 0||i.destruct(),(n=p(this,"dialog"))===null||n===void 0||n.destruct(),(r=(o=p(this,"storage"))===null||o===void 0?void 0:o.close)===null||r===void 0||r.call(o)}},v(f,"aiAssistantPro"),f);l.requires=["license","autocomplete"],h([g],l.prototype,"toolRegistry",null),h([g],l.prototype,"permissionManager",null),h([g],l.prototype,"apiClient",null),h([g],l.prototype,"storage",null),h([g],l.prototype,"stateManager",null),h([g],l.prototype,"mainPanel",null),h([g],l.prototype,"dialog",null),h([d("state.theme")],l.prototype,"__applyTheme",null),h([d(":openAIAssistantPro.ai-assistant-pro")],l.prototype,"openAssistant",null),h([d([":resize","state.panelWidth","state.panelHeight"])],l.prototype,"__onResizeInPanelView",null),h([d(["state.isOpen","state.displayMode","state.panelWidth","state.panelHeight","state.theme","state.defaultModel","state.defaultTemperature","state.currentConversation"]),rt()],l.prototype,"__onSavedStateChange",null),h([d(":closeAIAssistantPro.ai-assistant-pro")],l.prototype,"closeAssistant",null),h([d(":addContextToAIAssistant.ai-assistant-pro")],l.prototype,"addCurrentSelectionToContext",null),h([d(":executeQuickCommand.ai-assistant-pro")],l.prototype,"executeQuickCommand",null),h([d(":sendMessage.ai-assistant-pro")],l.prototype,"sendMessage",null),h([d(":searchConversations.ai-assistant-pro")],l.prototype,"searchConversations",null),h([d(":copyMessage.ai-assistant-pro")],l.prototype,"copyMessage",null),h([d(":restartFromMessage.ai-assistant-pro")],l.prototype,"restartFromMessage",null),h([d(":editMessage.ai-assistant-pro")],l.prototype,"editMessage",null),h([d(":cancelEditMessage.ai-assistant-pro")],l.prototype,"cancelEditMessage",null),h([d(":deleteMessage.ai-assistant-pro")],l.prototype,"deleteMessage",null),l=h([ot],l);dt.plugins.add("aiAssistantPro",l);export{l as aiAssistantPro};