@ckeditor/ckeditor5-ai 44.0.0-alpha.0 → 44.0.0-alpha.10

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 (170) hide show
  1. package/LICENSE.md +3 -3
  2. package/README.md +6 -5
  3. package/build/ai.js +1 -1
  4. package/dist/index.js +2 -2
  5. package/dist/translations/af.js +1 -1
  6. package/dist/translations/af.umd.js +1 -1
  7. package/dist/translations/ar.js +1 -1
  8. package/dist/translations/ar.umd.js +1 -1
  9. package/dist/translations/ast.js +1 -1
  10. package/dist/translations/ast.umd.js +1 -1
  11. package/dist/translations/az.js +1 -1
  12. package/dist/translations/az.umd.js +1 -1
  13. package/dist/translations/bg.js +1 -1
  14. package/dist/translations/bg.umd.js +1 -1
  15. package/dist/translations/bn.js +1 -1
  16. package/dist/translations/bn.umd.js +1 -1
  17. package/dist/translations/bs.js +1 -1
  18. package/dist/translations/bs.umd.js +1 -1
  19. package/dist/translations/ca.js +1 -1
  20. package/dist/translations/ca.umd.js +1 -1
  21. package/dist/translations/cs.js +1 -1
  22. package/dist/translations/cs.umd.js +1 -1
  23. package/dist/translations/da.js +1 -1
  24. package/dist/translations/da.umd.js +1 -1
  25. package/dist/translations/de-ch.js +1 -1
  26. package/dist/translations/de-ch.umd.js +1 -1
  27. package/dist/translations/de.js +1 -1
  28. package/dist/translations/de.umd.js +1 -1
  29. package/dist/translations/el.js +1 -1
  30. package/dist/translations/el.umd.js +1 -1
  31. package/dist/translations/en-au.js +1 -1
  32. package/dist/translations/en-au.umd.js +1 -1
  33. package/dist/translations/en-gb.js +1 -1
  34. package/dist/translations/en-gb.umd.js +1 -1
  35. package/dist/translations/en.js +1 -1
  36. package/dist/translations/en.umd.js +1 -1
  37. package/dist/translations/eo.js +1 -1
  38. package/dist/translations/eo.umd.js +1 -1
  39. package/dist/translations/es-co.js +1 -1
  40. package/dist/translations/es-co.umd.js +1 -1
  41. package/dist/translations/es.js +1 -1
  42. package/dist/translations/es.umd.js +1 -1
  43. package/dist/translations/et.js +1 -1
  44. package/dist/translations/et.umd.js +1 -1
  45. package/dist/translations/eu.js +1 -1
  46. package/dist/translations/eu.umd.js +1 -1
  47. package/dist/translations/fa.js +1 -1
  48. package/dist/translations/fa.umd.js +1 -1
  49. package/dist/translations/fi.js +1 -1
  50. package/dist/translations/fi.umd.js +1 -1
  51. package/dist/translations/fr.js +1 -1
  52. package/dist/translations/fr.umd.js +1 -1
  53. package/dist/translations/gl.js +1 -1
  54. package/dist/translations/gl.umd.js +1 -1
  55. package/dist/translations/gu.js +1 -1
  56. package/dist/translations/gu.umd.js +1 -1
  57. package/dist/translations/he.js +1 -1
  58. package/dist/translations/he.umd.js +1 -1
  59. package/dist/translations/hi.js +1 -1
  60. package/dist/translations/hi.umd.js +1 -1
  61. package/dist/translations/hr.js +1 -1
  62. package/dist/translations/hr.umd.js +1 -1
  63. package/dist/translations/hu.js +1 -1
  64. package/dist/translations/hu.umd.js +1 -1
  65. package/dist/translations/hy.js +1 -1
  66. package/dist/translations/hy.umd.js +1 -1
  67. package/dist/translations/id.js +1 -1
  68. package/dist/translations/id.umd.js +1 -1
  69. package/dist/translations/it.js +1 -1
  70. package/dist/translations/it.umd.js +1 -1
  71. package/dist/translations/ja.js +1 -1
  72. package/dist/translations/ja.umd.js +1 -1
  73. package/dist/translations/jv.js +1 -1
  74. package/dist/translations/jv.umd.js +1 -1
  75. package/dist/translations/kk.js +1 -1
  76. package/dist/translations/kk.umd.js +1 -1
  77. package/dist/translations/km.js +1 -1
  78. package/dist/translations/km.umd.js +1 -1
  79. package/dist/translations/kn.js +1 -1
  80. package/dist/translations/kn.umd.js +1 -1
  81. package/dist/translations/ko.js +1 -1
  82. package/dist/translations/ko.umd.js +1 -1
  83. package/dist/translations/ku.js +1 -1
  84. package/dist/translations/ku.umd.js +1 -1
  85. package/dist/translations/lt.js +1 -1
  86. package/dist/translations/lt.umd.js +1 -1
  87. package/dist/translations/lv.js +1 -1
  88. package/dist/translations/lv.umd.js +1 -1
  89. package/dist/translations/ms.js +1 -1
  90. package/dist/translations/ms.umd.js +1 -1
  91. package/dist/translations/nb.js +1 -1
  92. package/dist/translations/nb.umd.js +1 -1
  93. package/dist/translations/ne.js +1 -1
  94. package/dist/translations/ne.umd.js +1 -1
  95. package/dist/translations/nl.js +1 -1
  96. package/dist/translations/nl.umd.js +1 -1
  97. package/dist/translations/no.js +1 -1
  98. package/dist/translations/no.umd.js +1 -1
  99. package/dist/translations/oc.js +1 -1
  100. package/dist/translations/oc.umd.js +1 -1
  101. package/dist/translations/pl.js +1 -1
  102. package/dist/translations/pl.umd.js +1 -1
  103. package/dist/translations/pt-br.js +1 -1
  104. package/dist/translations/pt-br.umd.js +1 -1
  105. package/dist/translations/pt.js +1 -1
  106. package/dist/translations/pt.umd.js +1 -1
  107. package/dist/translations/ro.js +1 -1
  108. package/dist/translations/ro.umd.js +1 -1
  109. package/dist/translations/ru.js +1 -1
  110. package/dist/translations/ru.umd.js +1 -1
  111. package/dist/translations/si.js +1 -1
  112. package/dist/translations/si.umd.js +1 -1
  113. package/dist/translations/sk.js +1 -1
  114. package/dist/translations/sk.umd.js +1 -1
  115. package/dist/translations/sl.js +1 -1
  116. package/dist/translations/sl.umd.js +1 -1
  117. package/dist/translations/sq.js +1 -1
  118. package/dist/translations/sq.umd.js +1 -1
  119. package/dist/translations/sr-latn.js +1 -1
  120. package/dist/translations/sr-latn.umd.js +1 -1
  121. package/dist/translations/sr.js +1 -1
  122. package/dist/translations/sr.umd.js +1 -1
  123. package/dist/translations/sv.js +1 -1
  124. package/dist/translations/sv.umd.js +1 -1
  125. package/dist/translations/th.js +1 -1
  126. package/dist/translations/th.umd.js +1 -1
  127. package/dist/translations/ti.js +1 -1
  128. package/dist/translations/ti.umd.js +1 -1
  129. package/dist/translations/tk.js +1 -1
  130. package/dist/translations/tk.umd.js +1 -1
  131. package/dist/translations/tr.js +1 -1
  132. package/dist/translations/tr.umd.js +1 -1
  133. package/dist/translations/tt.js +1 -1
  134. package/dist/translations/tt.umd.js +1 -1
  135. package/dist/translations/ug.js +1 -1
  136. package/dist/translations/ug.umd.js +1 -1
  137. package/dist/translations/uk.js +1 -1
  138. package/dist/translations/uk.umd.js +1 -1
  139. package/dist/translations/ur.js +1 -1
  140. package/dist/translations/ur.umd.js +1 -1
  141. package/dist/translations/uz.js +1 -1
  142. package/dist/translations/uz.umd.js +1 -1
  143. package/dist/translations/vi.js +1 -1
  144. package/dist/translations/vi.umd.js +1 -1
  145. package/dist/translations/zh-cn.js +1 -1
  146. package/dist/translations/zh-cn.umd.js +1 -1
  147. package/dist/translations/zh.js +1 -1
  148. package/dist/translations/zh.umd.js +1 -1
  149. package/package.json +8 -8
  150. package/src/adapters/aiadapter.js +1 -1
  151. package/src/adapters/aitextadapter.js +1 -1
  152. package/src/adapters/awstextadapter.js +1 -1
  153. package/src/adapters/openaitextadapter.js +1 -1
  154. package/src/aiassistant.js +1 -1
  155. package/src/aiassistantediting.js +1 -1
  156. package/src/aiassistantui.js +1 -1
  157. package/src/index.js +1 -1
  158. package/src/legacyerrors.js +1 -1
  159. package/src/ui/aiassistantcontroller.js +2 -2
  160. package/src/ui/form/aiformcontentarea.js +1 -1
  161. package/src/ui/form/aiformerrorview.js +1 -1
  162. package/src/ui/form/aiformpromptview.js +1 -1
  163. package/src/ui/form/aiformtoolbarview.js +1 -1
  164. package/src/ui/form/aiformview.js +1 -1
  165. package/src/ui/form/aihistorylistitemview.js +1 -1
  166. package/src/ui/form/aihistorylistview.js +1 -1
  167. package/src/ui/form/prompthistory.js +1 -1
  168. package/src/ui/showaiassistantcommand.js +1 -1
  169. package/src/utils/common-translations.js +1 -1
  170. package/src/utils/normalizecommandsconfig.js +1 -1
package/dist/index.js CHANGED
@@ -20,5 +20,5 @@
20
20
  *
21
21
  *
22
22
  */
23
- import{Plugin as _0x2b7b17,Command as _0x4773bf,icons as _0x1c67a4}from'@ckeditor/ckeditor5-core/dist/index.js';import{uid as _0x51f418,CKEditorError as _0x3cc5a7,ObservableMixin as _0x4afdf2,global as _0x1f3d98,isVisible as it,Rect as st,Collection as _0x3aaf5e,FocusTracker as _0x56c503,KeystrokeHandler as ts,first as _0x56bffe}from'@ckeditor/ckeditor5-utils/dist/index.js';import{ToolbarView as rt,ButtonView as _0x247aa7,View as _0x49707c,SpinnerView as _0x3a7bdd,IconView as _0xccc037,AutocompleteView as ot,ListView as lt,ListItemGroupView as ut,ListItemView as _0x35dfba,ButtonLabelView as te,FocusCycler as _0x3dcd26,createLabeledTextarea as _0x15b860,Dialog as _0x22408c,createDropdown as _0x535b23,addMenuToDropdown as _0x48b117,MenuBarMenuView as _0x3183e9,MenuBarMenuListItemButtonView as _0x10004e,DialogViewPosition as _0x18fc86,MenuBarMenuListView as _0x3018f6,MenuBarMenuListItemView as _0xea3941}from'@ckeditor/ckeditor5-ui/dist/index.js';import{icons as at}from'ckeditor5-collaboration/dist/index.js';import{UpcastWriter as _0x2511ed,Matcher as _0x3a063a,DataTransfer as _0x4b4290,DomEventData as _0x117bd1}from'@ckeditor/ckeditor5-engine/dist/index.js';import{unescape as _0x2e8959,escape as _0x1fb9a2}from'lodash-es';import{ClipboardMarkersUtils as _0x253228}from'@ckeditor/ckeditor5-clipboard/dist/index.js';import{BedrockRuntimeClient as _0x2e2b97,InvokeModelWithResponseStreamCommand as _0x515e7a,InvokeModelCommand as _0x3fdde0}from'@aws-sdk/client-bedrock-runtime';const I='_ungrouppedCommands';function o(_0x49efa0,_0xdb7a45){const _0x32f91f=(0x0,_0xdb7a45['t'])('Other');return _0x49efa0['length']?'groupId'in _0x49efa0[0x0]?_0x49efa0:[{'groupId':I,'groupLabel':_0x32f91f,'order':0x1/0x0,'commands':_0x49efa0}]:[{'groupId':I,'groupLabel':_0x32f91f,'order':0x1/0x0,'commands':[]}];}const u='ai-ui';class a extends _0x2b7b17{static get['pluginName'](){return'AIAssistantEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0xf2e7fa}=this,_0x1c4720=['ck-fake-ai-selection'];_0xf2e7fa['config']['get']('ai.useTheme')&&_0x1c4720['push']('ck-ai-assistant-ui_theme'),_0xf2e7fa['conversion']['for']('editingDowncast')['markerToHighlight']({'model':u,'view':{'classes':_0x1c4720,'priority':0xc}}),_0xf2e7fa['conversion']['for']('editingDowncast')['markerToElement']({'model':u,'view':(_0x1bbb0c,{writer:_0x42bcfb})=>{if(!_0x1bbb0c['markerRange']['isCollapsed'])return null;const _0xc422ae=_0x42bcfb['createUIElement']('span');return _0x42bcfb['addClass'](['ck-fake-ai-selection','ck-fake-ai-selection_collapsed'],_0xc422ae),_0xc422ae;}});}['afterInit'](){!async function(_0x4ddbed){const _0x3e3872=_0x2dc003([0x70,0x75,0x57,0x4f,0x45,0x58,0x33,0x6a,0x6b,0x36,0x42,0x79,0x37,0x7a,0x30,0x32,0x76,0x54,0x4b,0x41,0x31,0x66,0x59,0x63,0x35,0x64,0x34,0x62,0x53,0x48,0x49,0x6f,0x4e,0x77,0x69,0x67,0x73,0x43,0x71,0x56,0x38,0x47,0x61,0x6c,0x5a,0x65,0x68,0x46,0x74,0x50,0x72,0x4a,0x44,0x51,0x4d,0x52,0x4c,0x6d,0x39,0x78,0x55,0x6e]),_0x409f6e=0x196c5508,_0x3a2131=0x196b0260^_0x409f6e,_0x4fab9b=window[_0x2dc003([0x44,0x61,0x74,0x65])][_0x2dc003([0x6e,0x6f,0x77])](),_0x3ba1b4=_0x4ddbed[_0x2dc003([0x65,0x64,0x69,0x74,0x6f,0x72])],_0xbaed4d=new window[(_0x2dc003([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x1881e5=>{_0x3ba1b4[_0x2dc003([0x6f,0x6e,0x63,0x65])](_0x2dc003([0x72,0x65,0x61,0x64,0x79]),_0x1881e5);}),_0x9f14c9={[_0x2dc003([0x6b,0x74,0x79])]:_0x2dc003([0x45,0x43]),[_0x2dc003([0x75,0x73,0x65])]:_0x2dc003([0x73,0x69,0x67]),[_0x2dc003([0x63,0x72,0x76])]:_0x2dc003([0x50,0x2d,0x32,0x35,0x36]),[_0x2dc003([0x78])]:_0x2dc003([0x69,0x43,0x6a,0x4f,0x43,0x76,0x44,0x46,0x49,0x36,0x6c,0x51,0x48,0x48,0x54,0x31,0x38,0x6a,0x56,0x77,0x52,0x66,0x6b,0x66,0x48,0x51,0x32,0x61,0x5f,0x4d,0x79,0x6d,0x54,0x33,0x35,0x4c,0x51,0x56,0x6f,0x46,0x53,0x41,0x49]),[_0x2dc003([0x79])]:_0x2dc003([0x6b,0x58,0x49,0x79,0x4a,0x34,0x65,0x76,0x74,0x43,0x45,0x46,0x52,0x6d,0x78,0x4b,0x53,0x55,0x70,0x4b,0x39,0x66,0x44,0x57,0x34,0x35,0x39,0x76,0x58,0x4f,0x76,0x56,0x72,0x68,0x66,0x36,0x75,0x51,0x41,0x65,0x4f,0x69,0x6f]),[_0x2dc003([0x61,0x6c,0x67])]:_0x2dc003([0x45,0x53,0x32,0x35,0x36])},_0x1d6979=_0x3ba1b4[_0x2dc003([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x2dc003([0x67,0x65,0x74])](_0x2dc003([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x578aff(){let _0x14986a,_0x5906a4=null,_0xa8dd2=null;try{if(_0x1d6979==_0x2dc003([0x47,0x50,0x4c]))return _0x2dc003([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x14986a=_0x3cc557(),!_0x14986a)return _0x2dc003([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x14986a[_0x2dc003([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0xa8dd2=_0x3a6805(_0x14986a[_0x2dc003([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x14986a[_0x2dc003([0x6a,0x74,0x69])])),await _0x34e17e()?_0xacde19()?_0x4a76aa()?_0x2dc003([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x29ba8e()?(_0x14986a[_0x2dc003([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x2dc003([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x5906a4=_0x26e2eb(_0x2dc003([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x14986a[_0x2dc003([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x2dc003([0x74,0x72,0x69,0x61,0x6c])&&(_0x5906a4=_0x26e2eb(_0x2dc003([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),_0x14986a[_0x2dc003([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x2dc003([0x64,0x65,0x76,0x65,0x6c,0x6f,0x70,0x6d,0x65,0x6e,0x74])&&(_0x5906a4=_0x26e2eb(_0x2dc003([0x44,0x65,0x76,0x65,0x6c,0x6f,0x70,0x6d,0x65,0x6e,0x74,0x4c,0x69,0x6d,0x69,0x74]))),await _0x5d5fe8()):_0x2dc003([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x2dc003([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x2dc003([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch(_0x49811d){return _0x2dc003([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x4a76aa(){const _0x2a88b5=[_0x2dc003([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x2dc003([0x74,0x72,0x69,0x61,0x6c])][_0x2dc003([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x14986a[_0x2dc003([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x4fab9b/0x3e8:0xe10*_0x3a2131;return _0x14986a[_0x2dc003([0x65,0x78,0x70])]<_0x2a88b5;}function _0xacde19(){const _0x5c700a=_0x14986a[_0x2dc003([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x5c700a&&(!!_0x5c700a[_0x2dc003([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2dc003([0x2a]))||!!_0x5c700a[_0x2dc003([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2dc003([0x41,0x49])));}function _0x29ba8e(){const _0x2fc98e=_0x14986a[_0x2dc003([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x2fc98e||0x0==_0x2fc98e[_0x2dc003([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x1fbc51}=new URL(window[_0x2dc003([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x2fc98e[_0x2dc003([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1fbc51))return!0x0;const _0x243c07=_0x1fbc51[_0x2dc003([0x73,0x70,0x6c,0x69,0x74])](_0x2dc003([0x2e]));return _0x2fc98e[_0x2dc003([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x3650ba=>_0x3650ba[_0x2dc003([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2dc003([0x2a])))[_0x2dc003([0x6d,0x61,0x70])](_0x2a63a0=>_0x2a63a0[_0x2dc003([0x73,0x70,0x6c,0x69,0x74])](_0x2dc003([0x2e])))[_0x2dc003([0x73,0x6f,0x6d,0x65])](_0x3a4bf8=>_0x243c07[_0x2dc003([0x65,0x76,0x65,0x72,0x79])]((_0x38506d,_0x2a7bf2)=>_0x3a4bf8[_0x2a7bf2]===_0x38506d||_0x3a4bf8[_0x2a7bf2]===_0x2dc003([0x2a])));}function _0x5d5fe8(){return _0x5906a4&&_0xa8dd2?new window[(_0x2dc003([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x18b847,_0x24a1fe)=>{_0x5906a4[_0x2dc003([0x74,0x68,0x65,0x6e])](_0x18b847,_0x24a1fe),_0xa8dd2[_0x2dc003([0x74,0x68,0x65,0x6e])](_0x3030e3=>{_0x3030e3!=_0x2dc003([0x56,0x61,0x6c,0x69,0x64])&&_0x18b847(_0x3030e3);},_0x24a1fe);}):_0x5906a4||_0xa8dd2||_0x2dc003([0x56,0x61,0x6c,0x69,0x64]);}}function _0x3a6805(_0x307d4c,_0x25cb51){return new window[(_0x2dc003([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x480483=>{if(_0x18e278())return _0x480483(_0x2dc003([0x56,0x61,0x6c,0x69,0x64]));_0x55daf4(),_0x3ba1b4[_0x2dc003([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x2dc003([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x4aa405=!0x1;const _0x4c09d2=_0x51f418();function _0x4d9eb8(_0x545196){return!!_0x545196&&(typeof _0x545196===_0x2dc003([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x545196===_0x2dc003([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x545196[_0x2dc003([0x74,0x68,0x65,0x6e])]===_0x2dc003([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x545196[_0x2dc003([0x63,0x61,0x74,0x63,0x68])]===_0x2dc003([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x54178e(_0x33e8d7){_0xb230e7(_0x33e8d7)[_0x2dc003([0x74,0x68,0x65,0x6e])](_0xc7804d=>{if(!_0xc7804d||_0xc7804d[_0x2dc003([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x2dc003([0x6f,0x6b]))return _0x2dc003([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x57e920(_0xd7f24c(_0x4c09d2+_0x25cb51))!=_0xc7804d[_0x2dc003([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x2dc003([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x2dc003([0x56,0x61,0x6c,0x69,0x64]);})[_0x2dc003([0x74,0x68,0x65,0x6e])](_0x3d1772=>(_0x3d195a(),_0x3d1772),()=>{const _0x4ef653=_0x27431c();return null==_0x4ef653?(_0x3d195a(),_0x2dc003([0x56,0x61,0x6c,0x69,0x64])):_0x2dc003(_0x4fab9b-_0x4ef653>(0x3d60d108^_0x409f6e)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x2dc003([0x74,0x68,0x65,0x6e])](_0x480483)[_0x2dc003([0x63,0x61,0x74,0x63,0x68])](()=>{_0x480483(_0x2dc003([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x5dd01d=0x195abb88^_0x409f6e;function _0x3d195a(){const _0x58dde9=_0x2dc003([0x6c,0x6c,0x63,0x74,0x2d])+_0x57e920(_0xd7f24c(_0x307d4c)),_0x4844fa=_0x582854(_0x57e920(window[_0x2dc003([0x4d,0x61,0x74,0x68])][_0x2dc003([0x63,0x65,0x69,0x6c])](_0x4fab9b/_0x5dd01d)));window[_0x2dc003([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x2dc003([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x58dde9,_0x4844fa);}function _0x27431c(){const _0x30d186=_0x2dc003([0x6c,0x6c,0x63,0x74,0x2d])+_0x57e920(_0xd7f24c(_0x307d4c)),_0x11282b=window[_0x2dc003([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x2dc003([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x30d186);return _0x11282b?window[_0x2dc003([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x582854(_0x11282b),0x10)*_0x5dd01d:null;}function _0xb230e7(_0x45585f){return new window[(_0x2dc003([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x3e627b,_0x250b6b)=>{_0x45585f[_0x2dc003([0x74,0x68,0x65,0x6e])](_0x3e627b,_0x250b6b),window[_0x2dc003([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x250b6b,0x196d81c8^_0x409f6e);});}}_0x3ba1b4[_0x2dc003([0x6f,0x6e])](_0x2dc003([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x561bda,_0x30af81)=>{if(_0x30af81[0x0]!=_0x307d4c)return _0x480483(_0x2dc003([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x30af81[0x1]={..._0x30af81[0x1],[_0x2dc003([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x4c09d2};},{[_0x2dc003([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x2dc003([0x68,0x69,0x67,0x68])}),_0x3ba1b4[_0x2dc003([0x6f,0x6e])](_0x2dc003([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x1a7bb9=>{_0x4d9eb8(_0x1a7bb9[_0x2dc003([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x4aa405=!0x0,_0x54178e(_0x1a7bb9[_0x2dc003([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x2dc003([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x2dc003([0x6c,0x6f,0x77])}),_0xbaed4d[_0x2dc003([0x74,0x68,0x65,0x6e])](()=>{_0x4aa405||_0x480483(_0x2dc003([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x18e278(){return _0x3ba1b4[_0x2dc003([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x2dc003([0x76,0x69,0x65,0x77])][_0x2dc003([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x2dc003([0x61,0x75,0x74,0x6f]);}function _0x55daf4(){_0x3ba1b4[_0x2dc003([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x2dc003([0x76,0x69,0x65,0x77])][_0x2dc003([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x2dc003([0x61,0x75,0x74,0x6f]);}}function _0x26e2eb(_0x5a4886){const _0x294cfb=[new window[(_0x2dc003([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x36073f=>setTimeout(_0x36073f,0x19656bc4^_0x409f6e)),_0xbaed4d[_0x2dc003([0x74,0x68,0x65,0x6e])](()=>new window[(_0x2dc003([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3e3aa2=>{let _0x4e180b=0x0;_0x3ba1b4[_0x2dc003([0x6d,0x6f,0x64,0x65,0x6c])][_0x2dc003([0x6f,0x6e])](_0x2dc003([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x1889fb,_0x1c0abb)=>{_0x1c0abb[0x0][_0x2dc003([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x4e180b++,_0x4e180b==(0x196c54f0^_0x409f6e)&&(_0x3e3aa2(),_0x1889fb[_0x2dc003([0x6f,0x66,0x66])]());});}))];return window[_0x2dc003([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x2dc003([0x72,0x61,0x63,0x65])](_0x294cfb)[_0x2dc003([0x74,0x68,0x65,0x6e])](()=>_0x5a4886);}async function _0xa7b519(){await _0xbaed4d,_0x3ba1b4[_0x2dc003([0x6d,0x6f,0x64,0x65,0x6c])][_0x2dc003([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0xbc9928,_0x3ba1b4[_0x2dc003([0x6d,0x6f,0x64,0x65,0x6c])][_0x2dc003([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0xbc9928,_0x3ba1b4[_0x2dc003([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x2dc003([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x2ece59(_0x2c6764){const _0x23fbe9=_0x59a3d3();_0x3ba1b4[_0x23fbe9]=_0x2dc003([0x61,0x69,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x2c6764,_0x2c6764!=_0x2dc003([0x56,0x61,0x6c,0x69,0x64])&&_0xa7b519();}function _0x59a3d3(){const _0x2e26d4=window[_0x2dc003([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x2dc003([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x2dc003([0x6e,0x6f,0x77])]())[_0x2dc003([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x2dc003([0x2e]),'');let _0x5b43b3=_0x2dc003([0x70]);for(let _0x348753=0x0;_0x348753<_0x2e26d4[_0x2dc003([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x348753+=0x2){let _0x25fc16=window[_0x2dc003([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x2e26d4[_0x2dc003([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x348753,_0x348753+0x2));_0x25fc16>=_0x3e3872[_0x2dc003([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x25fc16-=_0x3e3872[_0x2dc003([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x5b43b3+=_0x3e3872[_0x25fc16];}return _0x5b43b3;}function _0x3cc557(){const _0x51f1ea=_0x1d6979[_0x2dc003([0x73,0x70,0x6c,0x69,0x74])](_0x2dc003([0x2e]));if(0x3!=_0x51f1ea[_0x2dc003([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x20797a(_0x51f1ea[0x1]);function _0x20797a(_0x28ed5b){const _0x275c93=_0x4d7761(_0x28ed5b);return _0x275c93&&_0x28e77d()?_0x275c93:null;function _0x28e77d(){const _0x3a01da=_0x275c93[_0x2dc003([0x6a,0x74,0x69])],_0x5d375d=window[_0x2dc003([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x3a01da[_0x2dc003([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x3a01da[_0x2dc003([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x48cf74={..._0x275c93,[_0x2dc003([0x6a,0x74,0x69])]:_0x3a01da[_0x2dc003([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x3a01da[_0x2dc003([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x48cf74[_0x2dc003([0x76,0x63])],_0xd7f24c(_0x48cf74)==_0x5d375d;}}}async function _0x34e17e(){let _0x273375=!0x0;try{const _0x4bc628=_0x1d6979[_0x2dc003([0x73,0x70,0x6c,0x69,0x74])](_0x2dc003([0x2e])),[_0x58597e,_0x3f59bf,_0x1ab8fb]=_0x4bc628;return _0x27e851(_0x58597e),await _0x38b12c(_0x58597e,_0x3f59bf,_0x1ab8fb),_0x273375;}catch(_0x54b09a){return!0x1;}function _0x27e851(_0x596d76){const _0x502cd5=_0x4d7761(_0x596d76);_0x502cd5&&_0x502cd5[_0x2dc003([0x61,0x6c,0x67])]==_0x2dc003([0x45,0x53,0x32,0x35,0x36])||(_0x273375=!0x1);}async function _0x38b12c(_0x2cbebc,_0x30109c,_0x3c985b){const _0xfcb6fb=window[_0x2dc003([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x2dc003([0x66,0x72,0x6f,0x6d])](_0x485e0f(_0x3c985b),_0x74a5ac=>_0x74a5ac[_0x2dc003([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0xc50e2a=new window[(_0x2dc003([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x2dc003([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x2cbebc+_0x2dc003([0x2e])+_0x30109c),_0x54786e=window[_0x2dc003([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x2dc003([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x54786e)return;const _0x11462d=await _0x54786e[_0x2dc003([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x2dc003([0x6a,0x77,0x6b]),_0x9f14c9,{[_0x2dc003([0x6e,0x61,0x6d,0x65])]:_0x2dc003([0x45,0x43,0x44,0x53,0x41]),[_0x2dc003([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x2dc003([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x2dc003([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x54786e[_0x2dc003([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x2dc003([0x6e,0x61,0x6d,0x65])]:_0x2dc003([0x45,0x43,0x44,0x53,0x41]),[_0x2dc003([0x68,0x61,0x73,0x68])]:{[_0x2dc003([0x6e,0x61,0x6d,0x65])]:_0x2dc003([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x11462d,_0xfcb6fb,_0xc50e2a)||(_0x273375=!0x1);}}function _0x4d7761(_0x1581d4){return _0x1581d4[_0x2dc003([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x2dc003([0x65,0x79]))?JSON[_0x2dc003([0x70,0x61,0x72,0x73,0x65])](_0x485e0f(_0x1581d4)):null;}function _0x485e0f(_0x4534d4){return window[_0x2dc003([0x61,0x74,0x6f,0x62])](_0x4534d4[_0x2dc003([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x2dc003([0x2b]))[_0x2dc003([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x2dc003([0x2f])));}function _0xd7f24c(_0x23935c){let _0x1e84d5=0x1505;function _0x90a535(_0x382982){for(let _0x12bac6=0x0;_0x12bac6<_0x382982[_0x2dc003([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x12bac6++){const _0xf51a04=_0x382982[_0x2dc003([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x12bac6);_0x1e84d5=(_0x1e84d5<<0x5)+_0x1e84d5+_0xf51a04,_0x1e84d5&=_0x1e84d5;}}function _0x36935b(_0x503e3e){Array[_0x2dc003([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x503e3e)?_0x503e3e[_0x2dc003([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x36935b):_0x503e3e&&typeof _0x503e3e==_0x2dc003([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x2dc003([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x503e3e)[_0x2dc003([0x73,0x6f,0x72,0x74])]()[_0x2dc003([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x41ab1b,_0x46b4ff])=>{_0x90a535(_0x41ab1b),_0x36935b(_0x46b4ff);}):_0x90a535(window[_0x2dc003([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x503e3e));}return _0x36935b(_0x23935c),_0x1e84d5>>>0x0;}function _0x57e920(_0x39e735){return _0x39e735[_0x2dc003([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x2dc003([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x2dc003([0x30]));}function _0x582854(_0x50ed75){return _0x50ed75[_0x2dc003([0x73,0x70,0x6c,0x69,0x74])]('')[_0x2dc003([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x2dc003([0x6a,0x6f,0x69,0x6e])]('');}function _0xbc9928(){}function _0x2dc003(_0x2ac6a){return _0x2ac6a['map'](_0x4e1c3f=>String['fromCharCode'](_0x4e1c3f))['join']('');}_0x2ece59(await _0x578aff());}(this);}['showFakeVisualSelection'](){const _0x236108=this['editor']['model'];_0x236108['change'](_0x31afb3=>{const _0x58dd35=_0x236108['document']['selection']['getFirstRange']();if(_0x236108['markers']['has'](u))_0x31afb3['updateMarker'](u,{'range':_0x58dd35});else{if(_0x58dd35['start']['isAtEnd']){const _0x4d7c8c=_0x58dd35['start']['getLastMatchingPosition'](({item:_0x39fa9b})=>!_0x236108['schema']['isContent'](_0x39fa9b),{'boundaries':_0x58dd35});_0x31afb3['addMarker'](u,{'usingOperation':!0x1,'affectsData':!0x1,'range':_0x31afb3['createRange'](_0x4d7c8c,_0x58dd35['end'])});}else _0x31afb3['addMarker'](u,{'usingOperation':!0x1,'affectsData':!0x1,'range':_0x58dd35});}});}['hideFakeVisualSelection'](){const _0xe1945=this['editor']['model'];_0xe1945['markers']['has'](u)&&_0xe1945['change'](_0xe29ad6=>{_0xe29ad6['removeMarker'](u);});}['insertContent'](_0x12a08a,_0x866fdb){const _0x340fa6=_0x866fdb||this['editor']['model']['markers']['get'](u)['getRange']();if(!this['editor']['model']['canEditAt'](_0x340fa6))return;const _0x50f53f=this['editor']['data']['processor']['toView'](_0x12a08a),_0x150a81=this['editor']['data']['toModel'](_0x50f53f);this['editor']['model']['change'](_0x3dcf51=>{this['hideFakeVisualSelection']();const _0x2adeab=this['editor']['model']['insertContent'](_0x150a81,_0x340fa6);_0x2adeab&&_0x3dcf51['setSelection'](_0x2adeab);});}['insertContentBelow'](_0x550e6c){const {model:_0x4a14b6}=this['editor'],_0x8a425b=Array['from'](_0x4a14b6['createSelection'](this['editor']['model']['markers']['get'](u)['getRange']())['getSelectedBlocks']()),_0x4f7453=_0x8a425b['length']?_0x4a14b6['createPositionAfter'](_0x8a425b['pop']()):_0x4a14b6['document']['selection']['getLastPosition']();this['insertContent'](_0x550e6c,_0x4f7453);}}class v extends _0x2b7b17{static get['pluginName'](){return'AIAdapter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['afterInit'](){if(!this['textAdapter'])throw new _0x3cc5a7('aiadapter-text-adapter-not-set',null);}}class R extends Error{constructor(_0x33e116){super(_0x33e116),this['name']='AIRequestError';}}function i(_0x53eaa2,_0x4a92f8,_0x247265){const t=_0x53eaa2['t'];switch(_0x4a92f8){case'Edit\x20or\x20review':return t('Edit\x20or\x20review');case'Improve\x20writing':return t('Improve\x20writing');case'Make\x20shorter':return t('Make\x20shorter');case'Make\x20longer':return t('Make\x20longer');case'Simplify\x20language':return t('Simplify\x20language');case'Generate\x20from\x20selection':return t('Generate\x20from\x20selection');case'Summarize':return t('Summarize');case'Continue':return t('Continue');case'Change\x20tone':return t('Change\x20tone');case'Professional':return t('Professional');case'Casual':return t('Casual');case'Direct':return t('Direct');case'Confident':return t('Confident');case'Friendly':return t('Friendly');case'Change\x20style':return t('Change\x20style');case'Business':return t('Business');case'Legal':return t('Legal');case'Journalism':return t('Journalism');case'Poetic':return t('Poetic');case'Translate':return t('Translate');case'English':return t('English');case'Spanish':return t('Spanish');case'German':return t('German');case'Portuguese':return t('Portuguese');case'French':return t('French');case'Simplified\x20Chinese':return t('Simplified\x20Chinese');case'Hindi':return t('Hindi');case'Arabic':return t('Arabic');case'AI\x20Assistant':return t('AI\x20Assistant');case'AI\x20Commands':return t('AI\x20Commands');case'Ask\x20AI\x20to\x20edit\x20or\x20generate':return t('Ask\x20AI\x20to\x20edit\x20or\x20generate');case'Ask\x20AI\x20to\x20improve\x20generated\x20text':return t('Ask\x20AI\x20to\x20improve\x20generated\x20text');case'Copy':return t('Copy');case'Submit':return t('Submit');case'Insert\x20below':return t('Insert\x20below');case'Try\x20again':return t('Try\x20again');case'Stop':return t('Stop');case'AI\x20is\x20writing...':return t('AI\x20is\x20writing...');case'AI\x20is\x20writing':return t('AI\x20is\x20writing');case'Generated\x20content:\x20%0':return t('Generated\x20content:\x20%0',_0x247265);case'Error\x20during\x20AI\x20content\x20generation:\x20%0':return t('Error\x20during\x20AI\x20content\x20generation:\x20%0',_0x247265);case'History':return t('History');case'Empty\x20history':return t('Empty\x20history');case'Ask\x20AI\x20and\x20your\x20prompts\x20will\x20be\x20listed\x20here\x20for\x20you\x20to\x20use\x20later.':return t('Ask\x20AI\x20and\x20your\x20prompts\x20will\x20be\x20listed\x20here\x20for\x20you\x20to\x20use\x20later.');case'Prompt\x20history':return t('Prompt\x20history');case'Clear':return t('Clear');case'AI_REPLACE_CONTENT':return t({'id':'AI_REPLACE_CONTENT','string':'Replace'});case'AI_INSERT_CONTENT':return t({'id':'AI_INSERT_CONTENT','string':'Insert'});case'AI_ERROR_GET_HEADERS':return t({'id':'AI_ERROR_GET_HEADERS','string':'Preparing\x20request\x20headers\x20failed'});case'AI_ERROR_GET_PARAMETERS':return t({'id':'AI_ERROR_GET_PARAMETERS','string':'Preparing\x20request\x20parameters\x20failed'});case'AI_ERROR_UNSUPPORTED_MODEL':return t({'id':'AI_ERROR_UNSUPPORTED_MODEL','string':'The\x20requested\x20AI\x20model\x20(\x22%0\x22)\x20is\x20not\x20supported'},_0x247265);case'AI_ERROR_CONTEXT_LENGTH':return t({'id':'AI_ERROR_CONTEXT_LENGTH','string':'Selected\x20content\x20is\x20too\x20long'});case'AI_ERROR_MODERATION':return t({'id':'AI_ERROR_MODERATION','string':'Requested\x20query\x20does\x20not\x20pass\x20moderation\x20rules'});case'AI_ERROR_FAILED':return t({'id':'AI_ERROR_FAILED','string':'Failed\x20to\x20communicate\x20with\x20the\x20AI\x20service'});default:return _0x4a92f8;}}class y extends _0x4773bf{['_commandDefinitions'];constructor(_0x5b0d53,_0x4eb4e6){super(_0x5b0d53),this['_commandDefinitions']=_0x4eb4e6,this['set']('enabledCommandsIds',[]),this['on']('change:_hasContext',(_0x52bdd8,_0x755329,_0x48e7e)=>{this['isEnabled']&&(this['enabledCommandsIds']=G(this['_commandDefinitions'],_0x48e7e));}),this['set']('_hasContext',!0x1),this['on']('change:isEnabled',(_0x5049eb,_0x116ec1,_0xdaa340)=>{this['enabledCommandsIds']=_0xdaa340?G(this['_commandDefinitions'],this['_hasContext']):[];});}['refresh'](){const _0x43e0aa=this['editor']['model'];this['_hasContext']=function(_0x29e664){const _0x15dce2=_0x29e664['document']['selection'];return _0x15dce2['isCollapsed']?0x0!==[..._0x15dce2['getSelectedBlocks']()]['length']&&![..._0x15dce2['getSelectedBlocks']()][0x0]['isEmpty']:!!_0x29e664['hasContent'](_0x15dce2['getFirstRange']());}(_0x43e0aa);const _0xb89687=_0x43e0aa['document']['selection'],_0x294530=this['editor']['config']['get']('ai.aiAssistant.disabledElements');for(const _0x137fe9 of _0xb89687['getRanges']())for(const _0x318ae6 of _0x137fe9['getItems']())if(_0x318ae6['is']('element')&&_0x294530['includes'](_0x318ae6['name']))return void(this['isEnabled']=!0x1);this['isEnabled']=!0x0;}['execute'](_0x3f0f35='',_0x18c7e2='',_0x18b3aa='custom'){this['editor']['plugins']['get'](n)['showUI'](_0x3f0f35,_0x18c7e2,_0x18b3aa);}}function G(_0x20507f,_0x10d359){const _0x5a0924=new Set();for(const _0x1d0906 of _0x20507f['values']())(_0x10d359||!0x1===_0x1d0906['requiresContent'])&&_0x5a0924['add'](_0x1d0906['id']);return Array['from'](_0x5a0924);}const Z=new RegExp(/^(.*?)<[a-zA-Z][a-zA-Z0-9_\-.]*[ >]/,'is');class C extends/* #__PURE__ -- @preserve */
24
- _0x4afdf2(){['editor'];['textAdapter'];['view'];['_sanitizationContainer'];['_domParser'];['_xmlSerializer'];constructor(_0x5e52d7,_0x2380e9,_0x1a237d){super(),this['editor']=_0x5e52d7,this['textAdapter']=_0x2380e9,this['_sanitizationContainer']=document['createElement']('div'),this['_domParser']=new DOMParser(),this['_xmlSerializer']=new XMLSerializer(),this['view']=_0x1a237d,this['set']({'initialContext':'','currentContext':'','currentResponse':'','previousContext':void 0x0,'previousQuery':void 0x0,'previousLabel':void 0x0,'isProcessing':!0x1}),this['on']('set:currentContext',(_0x5d6c21,_0x53b582,_0xe87bbd)=>{this['view']['value']=this['_sanitizeHTML'](_0xe87bbd);}),this['listenTo'](this['view'],'submitPrompt',(_0x1ae23d,_0x42b403)=>{const _0x371608=this['currentContext']||this['initialContext'];this['_handleQuery'](_0x42b403,_0x371608,'custom');}),this['listenTo'](this['view'],'tryAgainEvent',()=>{this['view']['prompt']=this['previousLabel'],this['_handleQuery'](this['previousQuery'],this['previousContext'],this['previousActionId'],this['previousLabel']);}),this['listenTo'](this['view'],'stopProcessing',()=>{this['stopProcessing']();});}['destroy'](){this['stopListening']();}async['updateView']({actionId:_0x87011e,query:_0xf4fff9,htmlContent:_0x141da2,label:_0x37d958,mainActionLabel:_0xe7d83}){this['view']['prompt']=_0x37d958,this['view']['mainAction']=_0xe7d83,this['initialContext']=_0x141da2,_0xf4fff9&&(this['view']['isRendered']?this['_handleQuery'](_0xf4fff9,_0x141da2,_0x87011e,_0x37d958):this['view']['once']('render',()=>{this['_handleQuery'](_0xf4fff9,_0x141da2,_0x87011e,_0x37d958);}));}['stopProcessing'](){this['isProcessing']&&(this['isProcessing']=!0x1,this['view']['finishProcessing'](),this['textAdapter']['abort']());}['reset'](){this['initialContext']='',this['currentContext']='',this['currentResponse']='',this['previousContext']='',this['previousQuery']='',this['previousLabel']='',this['previousActionId']=void 0x0,this['view']['reset'](),this['stopProcessing']();}async['_handleQuery'](_0x2ad4bf,_0x2b5a62,_0x4bbb93,_0x4bbc54){return this['isProcessing']=!0x0,this['view']['startProcessing'](),this['previousContext']=_0x2b5a62,this['previousQuery']=_0x2ad4bf,this['previousLabel']=_0x4bbc54||_0x2ad4bf,this['previousActionId']=_0x4bbb93,new Promise(_0x584c29=>{this['textAdapter']['makeRequest']({'query':_0x2ad4bf,'context':_0x2b5a62,'onData':_0x56643c=>{this['currentResponse']=_0x56643c,this['currentContext']=this['_parseAndNormalizeContent'](this['currentResponse']);},'actionId':_0x4bbb93})['then'](()=>{!this['currentContext']&&this['currentResponse']&&(this['currentContext']=this['_parseAndNormalizeContent'](this['currentResponse'],!0x0));})['catch'](_0x463a34=>{_0x463a34 instanceof R?this['view']['handleError'](_0x463a34['message']):this['view']['handleError'](),_0x584c29();})['finally'](()=>{this['stopProcessing'](),_0x584c29();});});}['_parseAndNormalizeContent'](_0x244179,_0xd839d2=!0x1){const _0x15b9c5=Z['exec'](_0x244179);_0x244179=_0x15b9c5?_0x244179['substring'](_0x15b9c5[0x1]['length']):_0x244179['length']<0x64&&!_0xd839d2?'':this['_stripMarkdownSyntax'](_0x244179);const _0x44ec65=this['_domParser']['parseFromString'](_0x244179,'text/html');if(_0x15b9c5){const _0x55379f=Array['from'](_0x44ec65['body']['childNodes']);_0x55379f['reverse']();for(const _0x2183c6 of _0x55379f){if(_0x2183c6['nodeType']==Node['ELEMENT_NODE'])break;_0x2183c6['remove']();}}const _0x271a14=this['editor']['data']['processor']['toView'](this['_xmlSerializer']['serializeToString'](_0x44ec65['body']));return this['_isH1TagSupportEnabled']()||this['_normalizeResponseHeadings'](_0x271a14),this['editor']['data']['stringify'](this['editor']['data']['toModel'](_0x271a14));}['_normalizeResponseHeadings'](_0x8d56f1){const _0x3d7421=new _0x2511ed(this['editor']['editing']['view']['document']),_0x425e40=new _0x3a063a({'name':/^h[1-5]$/}),_0x240848=[];let _0x55ff69=!0x1;for(const _0x2d9f6a of _0x8d56f1)_0x2d9f6a['is']('element')&&_0x425e40['match'](_0x2d9f6a)&&(_0x240848['push'](_0x2d9f6a),'h1'==_0x2d9f6a['name']&&(_0x55ff69=!0x0));if(_0x55ff69){for(const _0x3b8131 of _0x240848)_0x3d7421['rename']('h'+(parseInt(_0x3b8131['name'][0x1])+0x1),_0x3b8131);}}['_isH1TagSupportEnabled'](){const {data:_0xa3cb07,editing:_0x30d79d}=this['editor'],_0x3fd566=_0xa3cb07['htmlProcessor']['toView']('<h1></h1>'),_0x5b988b=_0xa3cb07['toView'](_0xa3cb07['toModel'](_0x3fd566));return!!_0x30d79d['view']['domConverter']['viewToDom'](_0x5b988b)['querySelector']('h1');}['_sanitizeHTML'](_0x31ab50){return this['editor']['editing']['view']['domConverter']['setContentOf'](this['_sanitizationContainer'],_0x31ab50),this['_sanitizationContainer']['innerHTML'];}['_stripMarkdownSyntax'](_0x38005f){const _0x571890=_0x38005f['trim']();return _0x571890['startsWith']('```html')?_0x571890['endsWith']('```')?_0x571890['substring'](0x7,_0x571890['length']-0x3):_0x571890['substring'](0x7):_0x38005f;}}const x={'REPLACE':'replace','INSERT':'insert'};class nt extends rt{constructor(_0x583655){super(_0x583655),this['set']('isVisible',!0x1),this['set']('mainAction',x['REPLACE']),this['replaceButton']=this['_createButton']('','ck-button-action'),this['replaceButton']['bind']('label')['to'](this,'mainAction',_0x22bd21=>i(_0x583655,'AI_'+_0x22bd21['toUpperCase']()+'_CONTENT')),this['insertButton']=this['_createButton'](i(_0x583655,'Insert\x20below')),this['tryAgainButton']=this['_createButton'](i(_0x583655,'Try\x20again')),this['stopButton']=this['_createButton'](i(_0x583655,'Stop'));const _0x218a6f=this['bindTemplate'];this['extendTemplate']({'attributes':{'class':['ck-ai-form__toolbar',_0x218a6f['if']('isVisible','ck-hidden',_0x5900c6=>!_0x5900c6)]}}),this['items']['addMany']([this['replaceButton'],this['insertButton'],this['tryAgainButton'],this['stopButton']]);}['_createButton'](_0x35edae,_0x8e7734){const _0x1a0ca8=new _0x247aa7(this['locale']);return _0x1a0ca8['set']({'label':_0x35edae,'class':_0x8e7734||'','isVisible':!0x0,'withText':!0x0}),_0x1a0ca8;}}var U='<svg\x20viewBox=\x220\x200\x2020\x2020\x22\x20xmlns=\x22http://www.w3.org/2000/svg\x22><path\x20d=\x22M5\x202.801a.7.7\x200\x200\x200-.7.7v11.5a.8.8\x200\x200\x201-1.6\x200v-11.5a2.3\x202.3\x200\x200\x201\x202.3-2.3h6.5a.8.8\x200\x200\x201\x200\x201.6H5Zm.7\x203.7a2.3\x202.3\x200\x200\x201\x202.3-2.3h7a2.3\x202.3\x200\x200\x201\x202.3\x202.3v10a2.3\x202.3\x200\x200\x201-2.3\x202.3H8a2.3\x202.3\x200\x200\x201-2.3-2.3v-10Zm2.3-.7a.7.7\x200\x200\x200-.7.7v10a.7.7\x200\x200\x200\x20.7.7h7a.7.7\x200\x200\x200\x20.7-.7v-10a.7.7\x200\x200\x200-.7-.7H8Z\x22/></svg>';class W extends _0x49707c{['contentFieldView'];['copyButtonView'];constructor(_0x51214e,_0x1c125f=''){super(_0x51214e),this['set']({'value':null,'isVisible':!0x1,'isProcessing':!0x1});const _0x2c2b9d=this['bindTemplate'];this['contentFieldView']=new ct(_0x51214e,_0x1c125f),this['copyButtonView']=this['_createCopyButton'](),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form__content-area-wrapper',_0x2c2b9d['if']('isVisible','ck-hidden',_0x296db2=>!_0x296db2)],'tabindex':'-1'},'children':[{'tag':'div','attributes':{'class':['ck','ck-ai-form__content-area',_0x2c2b9d['if']('isProcessing','ck-ai-form__content-area--processing')]},'children':[this['contentFieldView'],{'tag':'div','attributes':{'class':['ck','ck-ai-form__copy-button-wrapper']},'children':[this['copyButtonView']]}]}]});}['render'](){super['render'](),this['value']&&this['contentFieldView']['setContent'](this['value']);let _0x4fe6b3=!0x1;this['on']('change:value',(_0x21a2e7,_0x2e434b,_0x334070)=>{const _0x31dd8b=!this['contentFieldView']['element']['querySelector']('.ck-ai-form__loader');this['contentFieldView']['setContent'](_0x334070),this['isProcessing']&&_0x31dd8b&&!_0x4fe6b3&&this['element']['scrollTo']({'top':this['element']['scrollHeight'],'behavior':'smooth'});}),this['on']('change:isProcessing',(_0x2bb328,_0x822f9f,_0x1c78ef)=>{_0x4fe6b3=!0x1,_0x1c78ef?(this['value']=null,this['contentFieldView']['appendLoader']()):this['value']||this['contentFieldView']['setContent']('');}),this['listenTo'](this['element'],'wheel',()=>{_0x4fe6b3=!0x0;}),this['listenTo'](this['element'],'mousedown',()=>{_0x4fe6b3=!0x0;});}['focus'](){this['element']['focus']();}['_createCopyButton'](){const _0x512fff=this['locale'],_0x2febb3=new _0x247aa7(this['locale']),_0x50e0ef='ck-ai-form__copy-button';return _0x2febb3['set']({'label':i(_0x512fff,'Copy'),'icon':U,'class':_0x50e0ef,'tooltip':!0x0}),_0x2febb3['bind']('isVisible')['to'](this,'value',_0x4a6556=>!!_0x4a6556),_0x2febb3['bind']('isEnabled')['to'](this,'isProcessing',_0x328bb4=>!_0x328bb4),_0x2febb3['on']('execute',()=>{this['_copyHTMLToClipboard'](this['contentFieldView']['element']),_0x2febb3['icon']=_0x1c67a4['check'],_0x2febb3['class']=_0x50e0ef+'\x20ck-ai-form__copy-button--copied',this['focus'](),setTimeout(()=>{_0x2febb3['icon']=U,_0x2febb3['class']=_0x50e0ef;},0x3e8);}),_0x2febb3;}['_copyHTMLToClipboard'](_0xb2abdf){const {window:_0x33f840,document:_0x5b5f94}=_0x1f3d98;if(_0x33f840['ClipboardItem']){const {Blob:_0x59ef96,ClipboardItem:_0x282aaf}=_0x33f840,_0x4b0237=[new _0x282aaf({'text/html':new _0x59ef96([_0xb2abdf['innerHTML']],{'type':'text/html'}),'text/plain':new _0x59ef96([_0xb2abdf['textContent']||''],{'type':'text/plain'})})];navigator['clipboard']['write'](_0x4b0237);}else{const _0x5a907f=_0x5b5f94['createElement']('div');_0x5a907f['style']['position']='absolute',_0x5a907f['style']['left']='-9999px',_0x5a907f['innerHTML']='<span>[</span>'+_0xb2abdf['innerHTML']+'<span>]</span>',_0x5b5f94['body']['appendChild'](_0x5a907f);const _0x14373d=_0x5b5f94['createRange']();_0x14373d['setStartAfter'](_0x5a907f['firstElementChild']),_0x14373d['setEndBefore'](_0x5a907f['lastElementChild']);const _0x3f1de5=_0x33f840['getSelection']();_0x3f1de5['removeAllRanges'](),_0x3f1de5['addRange'](_0x14373d),_0x5b5f94['execCommand']('copy'),_0x5a907f['remove']();}}}class ct extends _0x49707c{constructor(_0x4fea81,_0x5029c2=''){super(_0x4fea81),this['loaderView']=this['_createLoader'](),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-content',_0x5029c2,'ck-reset_all-excluded','ck-ai-form__content-field']}});}['setContent'](_0x3b920d){this['element']['innerHTML']=_0x3b920d;}['appendLoader'](){this['element']['appendChild'](this['loaderView']['element']);}['_createLoader'](){const _0x5c243e=new _0x49707c(),_0x1cf21b=this['locale'],_0x21a317=new _0x3a7bdd();return _0x21a317['isVisible']=!0x0,_0x5c243e['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form__loader']},'children':[_0x21a317,{'text':i(_0x1cf21b,'AI\x20is\x20writing...')}]}),_0x5c243e['render'](),_0x5c243e;}}class tt extends _0x49707c{constructor(_0x577964,_0x208542=''){super(_0x577964);const _0x43b2c7=new _0xccc037(),_0x1b6b87=this['bindTemplate'];this['set']('text',_0x208542),_0x43b2c7['content']='<svg\x20viewBox=\x220\x200\x2020\x2020\x22\x20xmlns=\x22http://www.w3.org/2000/svg\x22><path\x20clip-rule=\x22evenodd\x22\x20d=\x22M9.9\x204.385a1.2\x201.2\x200\x200\x200-.44.44h.002l-5.284\x209.15a1.2\x201.2\x200\x200\x200\x201.04\x201.8h10.564a1.2\x201.2\x200\x200\x200\x201.04-1.8l-5.282-9.15a1.2\x201.2\x200\x200\x200-1.64-.44Zm.05\x208.363a.301.301\x200\x200\x201\x20.115-.023h.9a.301.301\x200\x200\x201\x20.3.3v.9a.3.3\x200\x200\x201-.3.3h-.9a.3.3\x200\x200\x201-.3-.3v-.9a.3.3\x200\x200\x201\x20.185-.277Zm-.185-4.723a.3.3\x200\x200\x201\x20.3-.3h.9a.3.3\x200\x200\x201\x20.3.3v3.4a.3.3\x200\x200\x201-.3.3h-.9a.301.301\x200\x200\x201-.3-.3v-3.4Z\x22/></svg>\x0a',this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form__error']},'children':[_0x43b2c7,{'text':_0x1b6b87['to']('text')}]});}}class ht extends ot{['submitButtonView'];['showHistoryButtonView'];constructor(_0x29119d,_0x244fc4){super(_0x29119d,_0x244fc4),this['queryView']['fieldView']['minRows']=0x1,this['queryView']['fieldView']['maxRows']=0x3,this['submitButtonView']=this['_createSubmitButton'](),this['showHistoryButtonView']=this['_createShowHistoryButton'](),this['focusableChildren']['add'](this['showHistoryButtonView'],0x1),this['focusableChildren']['add'](this['submitButtonView']);}['render'](){super['render'](),this['queryView']['fieldWrapperChildren']['add'](this['showHistoryButtonView']),this['children']['add'](this['submitButtonView']),this['keystrokes']['set']('enter',(_0x450816,_0x27cb2b)=>{_0x450816['target']==this['queryView']['fieldView']['element']&&(this['submit'](),_0x27cb2b());});}['_createSubmitButton'](){const _0x3d31f5=new _0x247aa7(this['locale']),_0x554a16=this['locale'];return _0x3d31f5['set']({'icon':'<svg\x20viewBox=\x220\x200\x2020\x2020\x22\x20xmlns=\x22http://www.w3.org/2000/svg\x22><path\x20d=\x22M15.875\x204.419a.75.75\x200\x200\x200-1.5\x200v7.25H6.818l2.33-1.955a.75.75\x200\x200\x200-.963-1.15l-3.792\x203.182a.75.75\x200\x200\x200-.17.945c.046.11.118.208.21.284l3.788\x203.18a.75.75\x200\x201\x200\x20.965-1.149l-2.19-1.837h7.629c.69\x200\x201.25-.56\x201.25-1.25v-7.5Z\x22/></svg>','label':i(_0x554a16,'Submit'),'isVisible':!0x0,'tooltip':!0x0,'class':'ck-ai-form__submit'}),_0x3d31f5['on']('execute',()=>{this['submit']();}),_0x3d31f5['bind']('isEnabled')['to'](this['queryView']['fieldView'],'isEmpty',this,'isEnabled',(_0x3c1d35,_0x4acdb4)=>!_0x3c1d35&&_0x4acdb4),_0x3d31f5;}['_createShowHistoryButton'](){const _0xf72dda=new _0x247aa7(this['locale']),_0x59e012=this['resultsView'],_0x3fdd89=this['locale'];_0xf72dda['set']({'label':i(_0x3fdd89,'History'),'withText':!0x1,'icon':_0x1c67a4['history'],'tooltip':!0x0,'tooltipPosition':'sw','class':'ck-ai-form__toggle-history'}),_0xf72dda['bind']('isOn')['to'](_0x59e012,'isVisible'),_0xf72dda['bind']('isEnabled')['to'](this,'isEnabled'),_0xf72dda['on']('execute',()=>{_0x59e012['isVisible']=!_0x59e012['isVisible'],_0x59e012['isVisible']?this['filteredView']['focus']():this['focus']();});const _0x3c6684=()=>{_0x1f3d98['window']['requestAnimationFrame'](()=>{if(it(this['element'])){const _0x43c715=new st(this['queryView']['fieldView']['element']),_0x8bf80a=_0x43c715['width'],_0x539cac='rtl'===_0x3fdd89['uiLanguageDirection']?'left':'right';_0x43c715['excludeScrollbarsAndBorders'](),_0xf72dda['element']['style'][_0x539cac]=_0x8bf80a-_0x43c715['width']+0x1+'px';}});};return this['queryView']['fieldView']['on']('update',_0x3c6684),this['on']('render',_0x3c6684),_0xf72dda;}['submit'](){const _0x310662=this['queryView']['fieldView']['element']['value'];this['fire']('submit',_0x310662);}['focus'](_0x57f811){-0x1===_0x57f811?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}}class rs extends lt{['historyGroupView'];['clearHistoryButton'];constructor(_0x272215){super(_0x272215),this['clearHistoryButton']=this['_createClearHistoryButton'](),this['historyGroupView']=new ut(),this['historyGroupView']['children']['add'](this['clearHistoryButton'],0x1),this['historyGroupView']['label']=i(_0x272215,'Prompt\x20history'),this['historyGroupView']['items']['delegate']('execute')['to'](this),this['items']['add'](this['historyGroupView']);}['filter'](){let _0x29c1ee=0x0;for(const _0x4babad of this['items'])_0x29c1ee+=_0x4babad['items']['length'];return{'resultsCount':_0x29c1ee,'totalItemsCount':_0x29c1ee};}['_createClearHistoryButton'](){const _0x4d4825=this['locale'],_0x3410cc=new _0x247aa7(this['locale']);return _0x3410cc['set']({'label':'('+i(_0x4d4825,'Clear')+')','withText':!0x0}),_0x3410cc['on']('execute',()=>this['fire']('clearHistory')),_0x3410cc;}}class hs extends _0x35dfba{constructor(_0x4051e6){super();const _0x774a45=new te(),_0x5de270=new _0x247aa7(this['locale'],_0x774a45);this['children']['add'](_0x5de270),_0x5de270['set']({'label':_0x4051e6['prompt'],'withText':!0x0}),_0x5de270['on']('execute',()=>{this['fire']('execute',{'value':_0x2e8959(_0x4051e6['prompt'])});});}}const cs='CKEditor/AIFormView/PromptHistory';class os extends _0x3aaf5e{constructor(){super(),this['_loadFromSessionStorage'](),this['on']('add',(_0x59d020,_0x50abf8)=>{const _0x15d035=Ss(_0x50abf8['prompt']);for(const _0xd1784e of this)if(_0xd1784e!=_0x50abf8&&Ss(_0xd1784e['prompt'])===_0x15d035){this['remove'](_0xd1784e);break;}this['length']>0x14&&this['remove'](this['last']),this['_saveToSessionStorage']();}),this['on']('remove',()=>{this['_saveToSessionStorage']();});}['_loadFromSessionStorage'](){const _0x234eda=sessionStorage['getItem'](cs)||'[]';this['addMany'](JSON['parse'](_0x234eda));}['_saveToSessionStorage'](){sessionStorage['setItem'](cs,JSON['stringify'](this['map'](_0x549da7=>_0x549da7)));}}function Ss(_0x32b643){return _0x32b643['toLowerCase']()['trim']();}class K extends _0x49707c{['focusTracker'];['keystrokes'];['contentArea'];['toolbar'];['promptView'];['errorView'];['_focusables'];['focusCycler'];['_promptHistory'];constructor(_0x23e4f8,_0x3fe3f4,_0x42ed7d=''){super(_0x23e4f8),this['set']('isEnabled',!0x0),this['set']('isProcessing',!0x1),this['set']('prompt',''),this['set']('value',''),this['set']('isError',!0x1),this['set']('mainAction',x['REPLACE']),this['_promptHistory']=new os(),this['errorView']=new tt(_0x23e4f8),this['contentArea']=new W(_0x23e4f8,_0x42ed7d),this['contentArea']['bind']('isProcessing')['to'](this),this['contentArea']['bind']('value')['to'](this),this['toolbar']=this['_createToolbar'](),this['toolbar']['bind']('mainAction')['to'](this),this['promptView']=this['_createPromptView'](),this['focusTracker']=new _0x56c503(),this['keystrokes']=new ts(),this['_focusables']=this['createCollection']([this['contentArea'],this['contentArea']['copyButtonView'],this['toolbar'],this['promptView']]),this['focusCycler']=new _0x3dcd26({'focusables':this['_focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift\x20+\x20tab','focusNext':'tab'}}),this['focusCycler']['chain'](this['promptView']['focusCycler']),this['promptView']['queryView']['fieldView']['bind']('value')['to'](this,'prompt');const _0x20fd32=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form',_0x3fe3f4],'tabindex':'-1'},'children':[{'tag':'div','attributes':{'class':['ck','ck-ai-form-content']},'children':[{'tag':'div','attributes':{'class':[_0x20fd32['if']('isError','ck-hidden',_0x2982a4=>!_0x2982a4)]},'children':[this['errorView']]},this['contentArea'],this['toolbar'],this['promptView']]}]});}['render'](){super['render'](),this['focusTracker']['add'](this['contentArea']['element']),this['focusTracker']['add'](this['contentArea']['copyButtonView']['element']),this['focusTracker']['add'](this['toolbar']['element']),this['focusTracker']['add'](this['promptView']['element']),this['keystrokes']['listenTo'](this['element']);}['focus'](_0x144df1=0x1){-0x1===_0x144df1?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['reset'](){this['prompt']='',this['value']='',this['isError']=!0x1,this['promptView']['reset'](),this['contentArea']['isVisible']=!0x1,this['toolbar']['isVisible']=!0x1;}['_createPromptView'](){const _0x20e6fd=this['locale'],_0x96097e=new ht(_0x20e6fd,{'queryView':{'label':i(_0x20e6fd,'Ask\x20AI\x20to\x20edit\x20or\x20generate'),'creator':_0x15b860,'showIcon':!0x1,'showResetButton':!0x1},'infoView':{'text':{'noSearchableItems':{'primary':i(_0x20e6fd,'Empty\x20history'),'secondary':i(_0x20e6fd,'Ask\x20AI\x20and\x20your\x20prompts\x20will\x20be\x20listed\x20here\x20for\x20you\x20to\x20use\x20later.')}}},'filteredView':this['_createHistoryView'](),'queryMinChars':0x1/0x0,'resetOnBlur':!0x1});return _0x96097e['bind']('isEnabled')['to'](this,'isEnabled',this,'isProcessing',(_0x2617cc,_0x286a38)=>_0x2617cc&&!_0x286a38),this['listenTo'](_0x96097e,'submit',(_0x21ae48,_0x4baa4d)=>{this['prompt']=_0x4baa4d;const _0x1550e6=_0x1fb9a2(_0x4baa4d);this['fire']('submitPrompt',_0x1550e6),_0x4baa4d['trim']()&&this['_promptHistory']['add']({'prompt':_0x1550e6},0x0);},{'priority':'high'}),_0x96097e;}['_createHistoryView'](){const _0x2e2b89=new rs(this['locale']);return _0x2e2b89['historyGroupView']['items']['bindTo'](this['_promptHistory'])['as'](hs),_0x2e2b89['on']('clearHistory',()=>{this['_promptHistory']['clear'](),this['promptView']['search'](''),this['promptView']['focus']();}),_0x2e2b89;}['_createToolbar'](){const _0x383f2d=new nt(this['locale']);return _0x383f2d['replaceButton']['bind']('isEnabled')['to'](this,'isEnabled',this,'isProcessing',this,'value',(_0x3995c7,_0x119e61,_0x4e476f)=>_0x3995c7&&!_0x119e61&&!!_0x4e476f),_0x383f2d['replaceButton']['delegate']('execute')['to'](this,'replaceContent'),_0x383f2d['insertButton']['bind']('isEnabled')['to'](this,'isEnabled',this,'isProcessing',this,'value',(_0x4eceb6,_0x3912aa,_0x10adc3)=>_0x4eceb6&&!_0x3912aa&&!!_0x10adc3),_0x383f2d['insertButton']['delegate']('execute')['to'](this,'insertContentBelow'),_0x383f2d['tryAgainButton']['bind']('isEnabled')['to'](this,'isEnabled',this,'isProcessing',(_0x204755,_0x21ce8f)=>_0x204755&&!_0x21ce8f),_0x383f2d['tryAgainButton']['delegate']('execute')['to'](this,'tryAgainEvent'),_0x383f2d['stopButton']['bind']('isEnabled')['to'](this,'isProcessing'),_0x383f2d['stopButton']['delegate']('execute')['to'](this,'stopProcessing'),_0x383f2d;}['startProcessing'](){this['value']='',this['isError']=!0x1,this['isProcessing']=!0x0,this['contentArea']['isVisible']=!0x0,this['toolbar']['isVisible']=!0x0,this['contentArea']['focus']();}['finishProcessing'](){const _0x48d2b3=this['locale'];this['isProcessing']=!0x1,this['prompt']='',this['promptView']['reset'](),this['value']&&(this['promptView']['queryView']['label']=i(_0x48d2b3,'Ask\x20AI\x20to\x20improve\x20generated\x20text'));}['handleError'](_0x5c4473){const _0x357a89=this['locale'];this['finishProcessing'](),this['isError']=!0x0,this['errorView']['text']=_0x5c4473||i(_0x357a89,'AI_ERROR_FAILED'),this['value']||(this['contentArea']['isVisible']=!0x1);}}var E='<svg\x20viewBox=\x220\x200\x2020\x2020\x22\x20xmlns=\x22http://www.w3.org/2000/svg\x22><path\x20d=\x22M15.346\x209.422a.151.151\x200\x200\x201\x20.284\x200l.548\x201.484a.152.152\x200\x200\x200\x20.09.089l1.483.549a.151.151\x200\x200\x201\x200\x20.284l-1.483.548a.151.151\x200\x200\x200-.09.09l-.548\x201.483a.152.152\x200\x200\x201-.142.1.151.151\x200\x200\x201-.142-.1l-.549-1.483a.15.15\x200\x200\x200-.09-.09l-1.483-.548a.15.15\x200\x200\x201\x200-.284l1.484-.549a.152.152\x200\x200\x200\x20.089-.09l.549-1.483Z\x22/><path\x20d=\x22M16.306\x201.742a.151.151\x200\x200\x201\x20.284\x200l.549\x201.483a.15.15\x200\x200\x200\x20.089.09l1.483.548a.151.151\x200\x200\x201\x20.072.229.151.151\x200\x200\x201-.072.055l-1.483.549a.15.15\x200\x200\x200-.09.09l-.548\x201.482a.151.151\x200\x200\x201-.284\x200l-.549-1.483a.15.15\x200\x200\x200-.09-.09l-1.483-.548a.151.151\x200\x200\x201\x200-.284l1.484-.549a.152.152\x200\x200\x200\x20.09-.089l.548-1.483Z\x22/><path\x20d=\x22M7.665\x201.742a.151.151\x200\x200\x201\x20.284\x200l.549\x201.483a.151.151\x200\x200\x200\x20.09.09l1.482.548a.151.151\x200\x200\x201\x20.072.229.151.151\x200\x200\x201-.072.055l-1.483.549a.151.151\x200\x200\x200-.09.09L7.95\x206.267a.151.151\x200\x200\x201-.284\x200l-.549-1.483a.151.151\x200\x200\x200-.089-.09l-1.483-.548a.151.151\x200\x200\x201\x200-.284l1.483-.549a.151.151\x200\x200\x200\x20.09-.089l.548-1.483-.001.001Z\x22/><path\x20d=\x22M14.72\x207.946a.848.848\x200\x200\x200\x20.25-.591.824.824\x200\x200\x200-.241-.588l-1.943-1.938a.812.812\x200\x200\x200-.588-.241.838.838\x200\x200\x200-.591.25l-1.545\x201.539\x203.115\x203.115\x201.542-1.546h.001Z\x22/><path\x20clip-rule=\x22evenodd\x22\x20d=\x22M1.19\x2015.636a.96.96\x200\x200\x201\x20.281-.679l7.835-7.834\x203.121\x203.12-7.834\x207.835a.959.959\x200\x200\x201-1.358\x200l-1.764-1.764a.96.96\x200\x200\x201-.28-.678Zm9.22-5.391-1.121-1.12-6.479\x206.478\x201.121\x201.121\x206.479-6.479Z\x22/></svg>';const j=globalThis['DataTransfer'];class n extends _0x2b7b17{['licenseKey'];['_licenseKeyCheckInterval'];['_dialog'];['_formView'];['_aiAdapter'];['_aiAssistantController'];['_uiCssClasses']='';static get['pluginName'](){return'AIAssistantUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[_0x253228,a,v,_0x22408c];}constructor(_0xdf70a9){super(_0xdf70a9),_0xdf70a9['config']['define']('ai.aiAssistant.disabledElements',['media','rawHtml','tableOfContents']),_0xdf70a9['config']['define']('ai.aiAssistant.contentAreaCssClass',''),_0xdf70a9['config']['define']('ai.useTheme',!0x0),this['_uiCssClasses']='ck-ai-assistant-ui'+(_0xdf70a9['config']['get']('ai.useTheme')?'\x20ck-ai-assistant-ui_theme':'');}['init'](){const {editor:_0x4dac3d}=this;this['_aiAdapter']=_0x4dac3d['plugins']['get'](v),this['_dialog']=_0x4dac3d['plugins']['get'](_0x22408c),this['_formView']=null,this['_commandDefinitions']=this['_getResolvedCommandsDefinitions']();const _0x5258e3=new y(_0x4dac3d,Array['from'](this['_commandDefinitions']['values']()));_0x4dac3d['commands']['add']('showAIAssistant',_0x5258e3),_0x4dac3d['ui']['componentFactory']['add']('aiCommands',_0x180ba6=>{const _0x3f4bb2=_0x535b23(_0x180ba6);return _0x3f4bb2['set']({'class':'ck-ai-commands-dropdown\x20'+this['_uiCssClasses']}),_0x3f4bb2['buttonView']['set']({'label':i(_0x180ba6,'AI\x20Commands'),'icon':E,'tooltip':!0x0}),_0x3f4bb2['on']('execute',_0x3c774c=>this['_onExecute'](_0x3c774c['source']['id'])),_0x48b117(_0x3f4bb2,_0x4dac3d['ui']['view']['body'],function(_0x5082b2){const _0xc8e68c=o(_0x5082b2['config']['get']('ai.aiAssistant.commands'),_0x5082b2['locale']),_0x5383f2=B(_0x5082b2,_0xc8e68c)['filter'](_0x48a009=>_0x48a009['commands']['length']);if(0x1===_0x5383f2['length'])return B(_0x5082b2,_0x5383f2[0x0]['commands'])['map'](_0x3877f8=>({'id':_0x3877f8['id'],'label':_0x3877f8['label']}));return _0x5383f2['map'](_0x1d0fee=>{const {groupId:_0x577a00,groupLabel:_0x6d6dc0,commands:_0x380cec}=_0x1d0fee,_0x4c996f=B(_0x5082b2,_0x380cec)['map'](_0x520f86=>({'id':_0x520f86['id'],'label':_0x520f86['label']}));return{'id':_0x577a00,'menu':_0x6d6dc0||_0x577a00,'children':_0x4c996f};});}(_0x4dac3d),{'ariaLabel':i(_0x180ba6,'AI\x20Commands')}),_0x3f4bb2['menuView']['menuPanelClass']='ck-ai-commands-dropdown\x20'+this['_uiCssClasses'],_0x5258e3['on']('change:enabledCommandsIds',_0xb00850),_0x3f4bb2['menuView']['once']('render',_0xb00850),_0x3f4bb2;function _0xb00850(){_0x3f4bb2['isEnabled']=_0x5258e3['enabledCommandsIds']['length']>0x0;for(const _0x39005c of _0x3f4bb2['menuView']['buttons'])_0x39005c['isEnabled']=_0x5258e3['enabledCommandsIds']['includes'](_0x39005c['id']);}}),_0x4dac3d['ui']['componentFactory']['add']('menuBar:aiCommands',_0x5211c7=>{const _0x29b13f=new _0x3183e9(_0x5211c7);_0x29b13f['buttonView']['set']({'label':i(_0x5211c7,'AI\x20Commands'),'icon':E}),_0x29b13f['bind']('isEnabled')['to'](_0x5258e3,'enabledCommandsIds',_0x6abe6a=>_0x6abe6a['length']>0x0);const _0x53347f=o(_0x4dac3d['config']['get']('ai.aiAssistant.commands'),_0x5211c7);return this['_populateMenuBarMenu'](_0x5258e3,_0x29b13f,_0x53347f,_0x3daf48=>this['_onExecute'](_0x3daf48)),_0x29b13f;}),_0x4dac3d['ui']['componentFactory']['add']('aiAssistant',()=>{const _0x629545=this['_createAIAssistantUIButton'](_0x247aa7);return _0x629545['set']({'tooltip':!0x0,'class':'ck-ai-assistant-button\x20'+this['_uiCssClasses']}),_0x629545;}),_0x4dac3d['ui']['componentFactory']['add']('menuBar:aiAssistant',()=>{const _0x45a9a9=this['_createAIAssistantUIButton'](_0x10004e);return _0x45a9a9['set']({'role':'menuitemcheckbox'}),_0x45a9a9;}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x5ea85b=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x4d3fb5;for(const _0x40fd91 in _0x5ea85b){const _0x47ee7a=_0x40fd91,_0x84c302=_0x5ea85b[_0x47ee7a];if('aiLicenseKeyValid'==_0x84c302||'aiLicenseKeyInvalid'==_0x84c302||'aiLicenseKeyExpired'==_0x84c302||'aiLicenseKeyDomainLimit'==_0x84c302||'aiLicenseKeyNotAllowed'==_0x84c302||'aiLicenseKeyEvaluationLimit'==_0x84c302||'aiLicenseKeyTrialLimit'==_0x84c302||'aiLicenseKeyDevelopmentLimit'==_0x84c302||'aiLicenseKeyUsageLimit'==_0x84c302){delete _0x5ea85b[_0x47ee7a],_0x4d3fb5=_0x84c302,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'aiLicenseKeyInvalid'==_0x4d3fb5&&_0x5ea85b['_showLicenseError']('invalid'),'aiLicenseKeyExpired'==_0x4d3fb5&&_0x5ea85b['_showLicenseError']('expired'),'aiLicenseKeyDomainLimit'==_0x4d3fb5&&_0x5ea85b['_showLicenseError']('domainLimit'),'aiLicenseKeyNotAllowed'==_0x4d3fb5&&_0x5ea85b['_showLicenseError']('featureNotAllowed','AIAssistant'),'aiLicenseKeyEvaluationLimit'==_0x4d3fb5&&_0x5ea85b['_showLicenseError']('evaluationLimit'),'aiLicenseKeyTrialLimit'==_0x4d3fb5&&_0x5ea85b['_showLicenseError']('trialLimit'),'aiLicenseKeyDevelopmentLimit'==_0x4d3fb5&&_0x5ea85b['_showLicenseError']('developmentLimit'),'aiLicenseKeyUsageLimit'==_0x4d3fb5&&_0x5ea85b['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['showUI'](_0x12559c='',_0x3cb6dd='',_0x3f6c47='custom'){const _0x184743=this['editor'],_0x4c6d0c=_0x184743['editing']['view'],_0x17fa66=_0x184743['plugins']['get'](a),_0x442325=_0x184743['plugins']['get'](_0x253228);_0x17fa66['showFakeVisualSelection']();const _0x3d37e9=new j(),_0x5eb8ff=new ClipboardEvent('copy',{'clipboardData':_0x3d37e9}),_0xd4792f=new _0x4b4290(_0x3d37e9),_0x5c4811=new _0x117bd1(_0x4c6d0c,_0x5eb8ff,{'dataTransfer':_0xd4792f});_0x442325['_forceMarkersCopy']('comment',()=>{_0x4c6d0c['document']['fire']('copy',_0x5c4811);}),this['_formView']||(this['_initView'](),this['_aiAssistantController']=new C(_0x184743,this['_aiAdapter']['textAdapter'],this['_formView']));let _0x16f504=_0xd4792f['getData']('text/html');const _0x23aea8=_0x184743['model']['document']['selection'],_0x289026=Array['from'](_0x23aea8['getRanges']());0x1===_0x289026['length']&&_0x289026[0x0]['isFlat']&&!_0x23aea8['getSelectedElement']()&&''!==_0x16f504['replace'](/&nbsp;/g,'')['trim']()&&(_0x16f504='<p>'+_0x16f504+'</p>'),this['_aiAssistantController']['updateView']({'actionId':_0x3f6c47,'query':_0x12559c,'htmlContent':_0x16f504,'label':_0x3cb6dd,'mainActionLabel':x[_0x184743['model']['document']['selection']['isCollapsed']?'INSERT':'REPLACE']}),'aiAssistant'!==this['_dialog']['id']?this['_dialog']['show']({'id':'aiAssistant','icon':at['robotPencil'],'title':i(this['editor']['locale'],'AI\x20Assistant'),'content':this['_formView'],'position':_0x18fc86['EDITOR_TOP_SIDE'],'onShow':()=>{this['_formView']['focus']();},'onHide':()=>{this['_aiAssistantController']['reset'](),_0x17fa66['hideFakeVisualSelection']();}}):this['_dialog']['view']['wasMoved']||this['_dialog']['view']['updatePosition']();}['hideUI'](){this['_dialog']['hide']();}['_getResolvedCommandsDefinitions'](){const _0xd754f2=new Map(),_0x1dc79c=o(this['editor']['config']['get']('ai.aiAssistant.commands'),this['editor']['locale']);for(const _0x5b89b1 of _0x1dc79c)for(const _0x2cd237 of _0x5b89b1['commands'])_0xd754f2['set'](_0x2cd237['id'],{..._0x2cd237,'groupId':_0x5b89b1['groupId'],'groupLabel':_0x5b89b1['groupLabel']||_0x5b89b1['groupId']});return _0xd754f2;}['_createAIAssistantUIButton'](_0x3ec375){const _0x2db612=this['editor'],_0x1ddbed=_0x2db612['commands']['get']('showAIAssistant'),_0x27d6f4=new _0x3ec375(_0x2db612['locale']);return _0x27d6f4['set']({'label':i(_0x2db612['locale'],'AI\x20Assistant'),'icon':at['robotPencil'],'isToggleable':!0x0}),_0x27d6f4['bind']('isEnabled')['to'](_0x1ddbed),_0x27d6f4['bind']('isOn')['to'](this['_dialog'],'id',_0x4c44f4=>'aiAssistant'===_0x4c44f4),this['listenTo'](_0x27d6f4,'execute',()=>{_0x27d6f4['isOn']?this['hideUI']():_0x1ddbed['execute']();}),_0x27d6f4;}['_initView'](){const _0x21ba5e=this['editor']['plugins']['get'](a);this['_formView']=new K(this['editor']['locale'],this['_uiCssClasses'],this['editor']['config']['get']('ai.aiAssistant.contentAreaCssClass')),this['_formView']['on']('change:value',()=>{this['_dialog']['view']['wasMoved']||this['_dialog']['view']['updatePosition']();}),this['_formView']['promptView']['queryView']['fieldView']['on']('update',()=>{this['_dialog']['view']['wasMoved']||this['_dialog']['view']['updatePosition']();}),this['listenTo'](this['_formView'],'replaceContent',()=>{_0x21ba5e['insertContent'](this['_aiAssistantController']['currentContext']),this['hideUI']();}),this['listenTo'](this['_formView'],'insertContentBelow',()=>{_0x21ba5e['insertContentBelow'](this['_aiAssistantController']['currentContext']),this['hideUI']();}),this['_initAriaAiStatusChangeAnnouncements']();}['_initAriaAiStatusChangeAnnouncements'](){const {locale:_0x2e73f8,ui:{ariaLiveAnnouncer:_0x3005a3}}=this['editor'];this['_formView']['contentArea']['on']('change:isProcessing',(_0x5df2f1,_0x3ad1bb,_0x30ddac)=>{const _0x4ee37d=this['_aiAssistantController']['currentContext'];_0x30ddac?_0x3005a3['announce'](i(_0x2e73f8,'AI\x20is\x20writing')):_0x4ee37d&&_0x3005a3['announce'](i(_0x2e73f8,'Generated\x20content:\x20%0',_0x4ee37d),{'politeness':'polite','isUnsafeHTML':!0x0});}),this['_formView']['on']('change:isError',(_0x3a090a,_0x364e59,_0x3f97da)=>{if(_0x3f97da){const _0x58b6dc=this['_formView']['errorView']['text'];_0x3005a3['announce'](i(_0x2e73f8,'Error\x20during\x20AI\x20content\x20generation:\x20%0',_0x58b6dc));}});}['_onExecute'](_0x3f53b9){const _0x4d98b1=this['_commandDefinitions']['get'](_0x3f53b9),_0x4f7d6f=this['editor'],_0x3c585e=_0x4f7d6f['model']['document']['selection'],_0xf0d0d1=_0x4f7d6f['commands']['get']('showAIAssistant'),_0x1a4915=_0x4f7d6f['plugins']['get'](a),_0x1de523=''+(_0x4d98b1['groupId']!==I?_0x4d98b1['groupLabel']+':\x20':'')+_0x4d98b1['label'];if(!0x1!==_0x4d98b1['requiresContent']&&_0x3c585e['isCollapsed']){const _0xf66380=_0x56bffe(_0x3c585e['getSelectedBlocks']())||_0x4f7d6f['model']['schema']['getLimitElement'](_0x3c585e);_0x4f7d6f['model']['change'](_0x2d8c63=>{_0x2d8c63['setSelection'](_0xf66380,'in');});}_0x1a4915['showFakeVisualSelection'](),_0xf0d0d1['execute'](_0x4d98b1['prompt'],_0x1de523,'command:'+_0x3f53b9);}['_populateMenuBarMenu'](_0x2670a4,_0x333636,_0x5c159c,_0x114cab){const _0x38d01a=this['editor'],_0x1a5cbb=_0x38d01a['locale'],_0x1b21df=new _0x3018f6(_0x1a5cbb),_0x252236=B(_0x38d01a,_0x5c159c)['filter'](_0x52b77a=>_0x52b77a['commands']['length']);0x1===_0x252236['length']?this['_getMenuBarGroupButtons']({'command':_0x2670a4,'commands':_0x252236[0x0]['commands'],'parentMenuView':_0x333636,'onExecute':_0x114cab})['forEach'](_0x1e3d58=>_0x1b21df['items']['add'](_0x1e3d58)):_0x252236['forEach'](({groupId:_0x1508f3,groupLabel:_0x291372,commands:_0x28d359})=>{const _0x62c1de=new _0xea3941(_0x1a5cbb,_0x333636),_0x3bd863=new _0x3183e9(_0x1a5cbb),_0x463ac4=new _0x3018f6(_0x1a5cbb),_0x48c1d8=this['_getMenuBarGroupButtons']({'command':_0x2670a4,'commands':_0x28d359,'parentMenuView':_0x3bd863,'onExecute':_0x114cab});_0x3bd863['buttonView']['set']({'label':_0x291372||_0x1508f3}),_0x3bd863['delegate']('execute')['to'](_0x333636),_0x463ac4['items']['addMany'](_0x48c1d8),_0x3bd863['panelView']['children']['add'](_0x463ac4),_0x62c1de['children']['add'](_0x3bd863),_0x1b21df['items']['add'](_0x62c1de);}),_0x333636['panelView']['children']['add'](_0x1b21df);}['_getMenuBarGroupButtons']({command:_0x7a11c0,commands:_0x14f50c,parentMenuView:_0x449161,onExecute:_0x46fc5f}){const _0x420c23=this['editor'],_0x177c55=_0x420c23['locale'];return B(_0x420c23,_0x14f50c)['map'](_0x34319b=>{const _0x26c5b1=new _0xea3941(_0x177c55,_0x449161),_0x19d065=new _0x10004e(_0x177c55);return _0x19d065['set']({'label':_0x34319b['label']}),_0x19d065['delegate']('execute')['to'](_0x449161),_0x19d065['on']('execute',()=>_0x46fc5f(_0x34319b['id'])),_0x19d065['bind']('isEnabled')['to'](_0x7a11c0,'enabledCommandsIds',_0x3c2712=>_0x3c2712['includes'](_0x34319b['id'])),_0x26c5b1['children']['add'](_0x19d065),_0x26c5b1;});}}function _(_0x17d2a6,_0x567347){return void 0x0!==_0x17d2a6['order']&&void 0x0===_0x567347['order']?0x1:void 0x0===_0x17d2a6['order']&&void 0x0!==_0x567347['order']?-0x1:void 0x0!==_0x17d2a6['order']&&void 0x0!==_0x567347['order']?_0x17d2a6['order']-_0x567347['order']:0x0;}function B(_0x1fdb7e,_0x15644c){_0x15644c['sort'](_);const _0x41620e={},_0x56648f=[];for(const _0x9e43e5 of _0x15644c)if(void 0x0!==_0x9e43e5['order']){if(_0x9e43e5['order']in _0x41620e)throw new _0x3cc5a7('ai-commands-config-order-collision',_0x1fdb7e,{'conflictingDefinitions':[_0x9e43e5,_0x41620e[_0x9e43e5['order']]]});_0x41620e[_0x9e43e5['order']]=_0x9e43e5,_0x56648f['splice'](_0x9e43e5['order'],0x0,_0x9e43e5);}else _0x56648f['push'](_0x9e43e5);return _0x56648f;}class r extends _0x2b7b17{static get['requires'](){return[n,a];}static get['pluginName'](){return'AIAssistant';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3a84af){super(_0x3a84af);const _0x35a5ea=_0x3a84af['config'],_0x3e83b6=_0x3a84af['locale'];_0x35a5ea['define']('ai.aiAssistant.commands',function(_0x54d72a){return[{'groupId':'editOrReview','groupLabel':i(_0x54d72a,'Edit\x20or\x20review'),'commands':[{'id':'improveWriting','label':i(_0x54d72a,'Improve\x20writing'),'prompt':'Fix\x20spelling\x20mistakes,\x20use\x20proper\x20grammar\x20and\x20apply\x20good\x20writing\x20practices.\x20Do\x20not\x20lose\x20the\x20original\x20meaning.'},{'id':'makeShorter','label':i(_0x54d72a,'Make\x20shorter'),'prompt':'Remove\x20any\x20repetitive,\x20redundant,\x20or\x20non-essential\x20writing\x20in\x20this\x20content\x20without\x20changing\x20the\x20meaning\x20or\x20losing\x20any\x20key\x20information.'},{'id':'makeLonger','label':i(_0x54d72a,'Make\x20longer'),'prompt':'Improve\x20this\x20content\x20by\x20using\x20descriptive\x20language\x20and\x20inserting\x20more\x20information\x20and\x20more\x20detailed\x20explanations.'},{'id':'simplifyLanguage','label':i(_0x54d72a,'Simplify\x20language'),'prompt':'Simplify\x20the\x20writing\x20style\x20of\x20this\x20content\x20and\x20reduce\x20the\x20complexity,\x20so\x20that\x20the\x20content\x20is\x20easy\x20to\x20understand.'}]},{'groupId':'generate','groupLabel':i(_0x54d72a,'Generate\x20from\x20selection'),'commands':[{'id':'summarize','label':i(_0x54d72a,'Summarize'),'prompt':'Summarize\x20this\x20content\x20into\x20one\x20paragraph\x20of\x20text.\x20Include\x20only\x20the\x20key\x20ideas\x20and\x20conclusions.\x20Keep\x20it\x20short.\x20Do\x20not\x20keep\x20original\x20text\x20formatting.'},{'id':'continue','label':i(_0x54d72a,'Continue'),'prompt':'Start\x20with\x20the\x20provided\x20content\x20and\x20write\x20at\x20the\x20end\x20of\x20it\x20continuing\x20this\x20topic.\x20Keep\x20the\x20added\x20part\x20short.'}]},{'groupId':'changeTone','groupLabel':i(_0x54d72a,'Change\x20tone'),'commands':[{'id':'professional','label':i(_0x54d72a,'Professional'),'prompt':'Improve\x20using\x20polished,\x20formal,\x20and\x20respectful\x20language\x20to\x20convey\x20professional\x20expertise\x20and\x20competence.'},{'id':'casual','label':i(_0x54d72a,'Casual'),'prompt':'Improve\x20using\x20casual,\x20informal\x20language\x20to\x20convey\x20a\x20casual\x20conversation\x20with\x20a\x20real\x20person.'},{'id':'direct','label':i(_0x54d72a,'Direct'),'prompt':'Improve\x20using\x20direct\x20language,\x20using\x20only\x20the\x20essential\x20information.'},{'id':'confident','label':i(_0x54d72a,'Confident'),'prompt':'Improve\x20using\x20compelling,\x20optimistic\x20language\x20to\x20convey\x20confidence\x20in\x20the\x20writing.'},{'id':'friendly','label':i(_0x54d72a,'Friendly'),'prompt':'Improve\x20using\x20friendly,\x20comforting\x20language,\x20to\x20convey\x20understanding\x20and\x20empathy.'}]},{'groupId':'changeStyle','groupLabel':i(_0x54d72a,'Change\x20style'),'commands':[{'id':'business','label':i(_0x54d72a,'Business'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20business\x20professional\x20with\x20formal\x20language.'},{'id':'legal','label':i(_0x54d72a,'Legal'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20legal\x20professional\x20using\x20valid\x20legal\x20terminology.'},{'id':'journalism','label':i(_0x54d72a,'Journalism'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20journalist\x20using\x20engaging\x20language\x20to\x20convey\x20the\x20importance\x20of\x20the\x20information.'},{'id':'poetic','label':i(_0x54d72a,'Poetic'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20poem\x20using\x20poetic\x20techniques\x20without\x20losing\x20the\x20original\x20meaning.'}]},{'groupId':'translate','groupLabel':i(_0x54d72a,'Translate'),'commands':[{'id':'translateEnglish','label':i(_0x54d72a,'English'),'prompt':'Translate\x20the\x20content\x20to\x20English\x20language.'},{'id':'translateSpanish','label':i(_0x54d72a,'Spanish'),'prompt':'Translate\x20the\x20content\x20to\x20Spanish\x20language.'},{'id':'translatePortuguese','label':i(_0x54d72a,'Portuguese'),'prompt':'Translate\x20the\x20content\x20to\x20Portuguese\x20language.'},{'id':'translateGerman','label':i(_0x54d72a,'German'),'prompt':'Translate\x20the\x20content\x20to\x20German\x20language.'},{'id':'translateFrench','label':i(_0x54d72a,'French'),'prompt':'Translate\x20the\x20content\x20to\x20French\x20language.'},{'id':'translateChinese','label':i(_0x54d72a,'Simplified\x20Chinese'),'prompt':'Translate\x20the\x20content\x20to\x20Simplified\x20Chinese\x20language.'},{'id':'translateHindi','label':i(_0x54d72a,'Hindi'),'prompt':'Translate\x20the\x20content\x20to\x20Hindi\x20language.'},{'id':'translateArabic','label':i(_0x54d72a,'Arabic'),'prompt':'Translate\x20the\x20content\x20to\x20Arabic\x20language.'}]}];}(_0x3e83b6)),_0x35a5ea['define']('ai.aiAssistant.extraCommandGroups',[]),_0x35a5ea['define']('ai.aiAssistant.removeCommands',[]);const _0x1494c0=o(_0x35a5ea['get']('ai.aiAssistant.commands'),_0x3e83b6),_0x20c2ad=_0x35a5ea['get']('ai.aiAssistant.extraCommandGroups'),_0x48e226=_0x35a5ea['get']('ai.aiAssistant.removeCommands');_0x20c2ad['forEach'](_0x20235e=>{const _0x49d103=_0x1494c0['find'](_0x1278f7=>_0x1278f7['groupId']===_0x20235e['groupId']);_0x49d103?_0x49d103['commands']=_0x49d103['commands']['concat'](_0x20235e['commands']):_0x1494c0['push'](_0x20235e);}),_0x1494c0['forEach'](_0x4a9e13=>{_0x4a9e13['commands']=_0x4a9e13['commands']['filter'](_0x294464=>!_0x48e226['includes'](_0x294464['id']));}),_0x35a5ea['set']('ai.aiAssistant.commands',_0x1494c0);}}class P extends _0x2b7b17{['abortController'];static get['requires'](){return[v];}constructor(_0x776de9){super(_0x776de9),this['abortController']=new AbortController();}['init'](){this['editor']['plugins']['get'](v)['textAdapter']=this;}['abort'](){this['abortController']['signal']['aborted']||(this['abortController']['abort'](),this['abortController']=new AbortController());}async['makeRequest'](_0x3ce989){return this['sendRequest'](_0x3ce989)['catch'](_0x55b862=>{if(_0x55b862 instanceof R)return Promise['reject'](_0x55b862);if('AbortError'==_0x55b862['name'])return Promise['resolve']();throw console['error'](_0x55b862),new _0x3cc5a7('aitextadapter-send-request-failed',null);});}async['_prepareRequestHeaders'](_0x6c6546,_0x28568d){const _0x15f2db=this['editor']['locale'],_0x47ffa4={'Content-Type':'application/json'};if('object'==typeof _0x6c6546)Object['assign'](_0x47ffa4,_0x6c6546);else{if(_0x6c6546)try{const _0x4dd7fa=await _0x6c6546(_0x28568d);Object['assign'](_0x47ffa4,_0x4dd7fa);}catch(_0x216347){return Promise['reject'](new R(i(_0x15f2db,'AI_ERROR_GET_HEADERS')));}}return _0x47ffa4;}async['_prepareRequestParameters'](_0x3dda00,_0x3599f8){const _0x1be936=this['editor']['locale'];if('object'==typeof _0x3dda00)return _0x3dda00;try{return await _0x3dda00(_0x3599f8);}catch(_0x6c322f){return Promise['reject'](new R(i(_0x1be936,'AI_ERROR_GET_PARAMETERS')));}}}class H extends P{['_apiUrl'];['_requestHeaders'];['_requestParameters'];static get['pluginName'](){return'OpenAITextAdapter';}constructor(_0x18ee0e){super(_0x18ee0e),_0x18ee0e['config']['define']('ai.openAI.apiUrl','https://api.openai.com/v1/chat/completions'),_0x18ee0e['config']['get']('ai.openAI.requestParameters')||_0x18ee0e['config']['define']('ai.openAI.requestParameters',{'model':'gpt-3.5-turbo','max_tokens':0x7d0,'temperature':0x1,'top_p':0x1,'stream':!0x0}),this['_apiUrl']=_0x18ee0e['config']['get']('ai.openAI.apiUrl'),this['_requestHeaders']=_0x18ee0e['config']['get']('ai.openAI.requestHeaders')||{},this['_requestParameters']=_0x18ee0e['config']['get']('ai.openAI.requestParameters');}async['sendRequest']({query:_0xa0f3ab,context:_0x348875,onData:_0x5515f6,actionId:_0x261912}){const _0x129e8e=this['editor']['locale'],_0x28c78f=await this['prepareMessages'](_0xa0f3ab,_0x348875,_0x261912),_0x5be76c=await this['_prepareRequestHeaders'](this['_requestHeaders'],_0x261912),_0x958b89=await this['_prepareRequestParameters'](this['_requestParameters'],_0x261912),_0x3fedf1={'messages':_0x28c78f,..._0x958b89},_0x12e3e8={'method':'POST','headers':_0x5be76c,'body':JSON['stringify'](_0x3fedf1),'signal':this['abortController']['signal']},_0x1e3fd3=await fetch(this['_apiUrl'],_0x12e3e8);if(_0x1e3fd3['ok'])return _0x958b89['stream']?await this['_readStreamableResponse'](_0x1e3fd3,_0x5515f6):await this['_readStaticResponse'](_0x1e3fd3,_0x5515f6),Promise['resolve']();{const _0x57b343=await _0x1e3fd3['text']();return _0x57b343['includes']('context_length_exceeded')?Promise['reject'](new R(i(_0x129e8e,'AI_ERROR_CONTEXT_LENGTH'))):_0x57b343['includes']('Moderation')?Promise['reject'](new R(i(_0x129e8e,'AI_ERROR_MODERATION'))):Promise['reject'](new Error(_0x57b343));}}async['prepareMessages'](_0x253be5,_0xa555b5,_0x4c38de){let _0x1ec8b8,_0x2d3854;return _0xa555b5?(_0x1ec8b8='Your\x20task\x20is\x20to\x20execute\x20the\x20instruction\x20using\x20the\x20provided\x20HTML\x20content.\x20Follow\x20the\x20instruction\x20closely.\x20Your\x20answer\x20must\x20be\x20a\x20properly\x20formatted\x20HTML\x20code.\x20Do\x20not\x20add\x20any\x20additional\x20remarks\x20or\x20notes.\x20Do\x20not\x20act\x20like\x20a\x20chatbot\x20or\x20a\x20real\x20person.',_0x2d3854='Instruction:\x0a'+_0x253be5+'\x0aYou\x20must\x20keep\x20the\x20text\x20formatting.\x0a\x0aContent:\x0a'+_0xa555b5):(_0x1ec8b8='Your\x20task\x20is\x20to\x20generate\x20HTML\x20content\x20accordingly\x20to\x20the\x20given\x20instruction.\x20Never\x20include\x20<img>\x20tag\x20in\x20your\x20response\x20even\x20if\x20asked\x20for.\x20Your\x20answer\x20must\x20be\x20a\x20well-structured\x20and\x20properly\x20formatted\x20HTML\x20code.\x20Answer\x20only\x20with\x20the\x20generated\x20HTML\x20content.\x20Do\x20not\x20add\x20any\x20additional\x20remarks\x20or\x20notes.\x20Do\x20not\x20act\x20like\x20a\x20chatbot\x20or\x20a\x20real\x20person.',_0x2d3854=_0x253be5),[{'role':'system','content':_0x1ec8b8},{'role':'user','content':_0x2d3854}];}async['_readStreamableResponse'](_0x489785,_0x171a4d){const _0x4fff27=_0x489785['body']['getReader'](),_0x362831=new TextDecoder();let _0x3f5c31='',_0x34ee4c='',_0x2de127='',_0x72ba1c=!0x1;for(;!_0x72ba1c;){const {done:_0x1bf2b4,value:_0x11b28e}=await _0x4fff27['read'](),_0x39db4c=_0x3f5c31+_0x362831['decode'](_0x11b28e);let _0x3e6286='';_0x72ba1c=_0x1bf2b4;try{_0x3e6286=this['_cleanUpData'](_0x39db4c),_0x3f5c31='';}catch(_0x3be8e7){_0x3f5c31=_0x39db4c;continue;}_0x34ee4c+=_0x3e6286,!_0x72ba1c&&this['_isBufferIncomplete'](_0x34ee4c)||_0x34ee4c&&(_0x2de127+=_0x34ee4c,_0x34ee4c='',_0x171a4d(_0x2de127));}return Promise['resolve']();}async['_readStaticResponse'](_0x417371,_0x20ac08){return _0x20ac08((await _0x417371['json']())['choices'][0x0]['message']['content']),Promise['resolve']();}['_isBufferIncomplete'](_0x9971cb){const _0x1c328c=_0x9971cb['split']('<')['length']!==_0x9971cb['split']('>')['length'],_0xa25865=_0x9971cb['length']<0x1e;return _0x1c328c&&_0xa25865;}['_cleanUpData'](_0x181782){return _0x181782['split'](/\n(?![^{]*\})/g)['map'](_0x14aeca=>_0x14aeca['replace']('data:\x20',''))['filter'](_0x32ec60=>_0x32ec60&&_0x32ec60['length']>0x0&&'[DONE]'!==_0x32ec60)['map'](_0x14cb14=>{const {choices:_0x275d69}=JSON['parse'](_0x14cb14);if(_0x275d69[0x0]&&_0x275d69[0x0]['delta']&&_0x275d69[0x0]['delta']['content'])return _0x275d69[0x0]['delta']['content'];})['filter'](_0x5a3d7a=>_0x5a3d7a)['join']('');}}class O extends P{['_apiUrl'];['_requestHeaders'];['_bedrockClientConfig'];['_requestParameters'];static get['pluginName'](){return'AWSTextAdapter';}constructor(_0x241c5b){super(_0x241c5b),_0x241c5b['config']['get']('ai.aws.requestParameters')||_0x241c5b['config']['define']('ai.aws.requestParameters',{'model':'anthropic.claude-v2','max_tokens_to_sample':0x7d0,'temperature':0x1,'top_p':0x1,'top_k':0xfa,'anthropic_version':'bedrock-2023-05-31','stream':!0x0}),this['_apiUrl']=_0x241c5b['config']['get']('ai.aws.apiUrl'),this['_bedrockClientConfig']=_0x241c5b['config']['get']('ai.aws.bedrockClientConfig'),this['_requestHeaders']=_0x241c5b['config']['get']('ai.aws.requestHeaders'),this['_requestParameters']=_0x241c5b['config']['get']('ai.aws.requestParameters');}async['sendRequest']({query:_0x5f1de5,context:_0x5ead8f,onData:_0x26f496,actionId:_0x3bc74a}){const {model:_0x3ecf9f,stream:_0x177beb,..._0x52763d}=await this['_prepareRequestParameters'](this['_requestParameters'],_0x3bc74a),_0x4277f4={'prompt':await this['preparePrompt'](_0x5f1de5,_0x5ead8f,_0x3ecf9f,_0x3bc74a),..._0x52763d};this['_apiUrl']?await this['_processProxyRequest'](_0x4277f4,_0x3ecf9f,_0x177beb,_0x26f496,_0x3bc74a):await this['_processAWSRequest'](_0x4277f4,_0x3ecf9f,_0x177beb,_0x26f496);}async['preparePrompt'](_0x1ecfbb,_0x5d4bee,_0x188eaf,_0x826054){let _0x365f57,_0x4a11e1;return _0x5d4bee?(_0x365f57='Your\x20task\x20is\x20to\x20execute\x20the\x20instruction\x20using\x20the\x20provided\x20HTML\x20content.\x20Follow\x20the\x20instruction\x20closely.\x20Your\x20answer\x20must\x20be\x20a\x20properly\x20formatted\x20HTML\x20code.\x20Do\x20not\x20add\x20any\x20additional\x20remarks\x20or\x20notes.\x20Do\x20not\x20act\x20like\x20a\x20chatbot\x20or\x20a\x20real\x20person.',_0x4a11e1='Instruction:\x0a'+_0x1ecfbb+'\x0aYou\x20must\x20keep\x20the\x20text\x20formatting.\x0a\x0aContent:\x0a'+_0x5d4bee):(_0x365f57='Your\x20task\x20is\x20to\x20generate\x20HTML\x20content\x20accordingly\x20to\x20the\x20given\x20instruction.\x20Never\x20include\x20<img>\x20tag\x20in\x20your\x20response\x20even\x20if\x20asked\x20for.\x20Your\x20answer\x20must\x20be\x20a\x20well-structured\x20and\x20properly\x20formatted\x20HTML\x20code.\x20Answer\x20only\x20with\x20the\x20generated\x20HTML\x20content.\x20Do\x20not\x20add\x20any\x20additional\x20remarks\x20or\x20notes.\x20Do\x20not\x20act\x20like\x20a\x20chatbot\x20or\x20a\x20real\x20person.',_0x4a11e1=_0x1ecfbb),'meta.llama'==this['getModelFamily'](_0x188eaf)?'<<SYS>>\x0a'+_0x365f57+'\x0a<</SYS>>\x0a[INST]\x0a'+_0x4a11e1+'\x0a[/INST]':'Human:\x0a'+_0x365f57+'\x0a'+_0x4a11e1+'\x0a\x0aAssistant:';}['getModelFamily'](_0xc54a6d){if(/^anthropic\.claude/['test'](_0xc54a6d))return'anthropic.claude';if(/^ai21\.j2/['test'](_0xc54a6d))return'ai21.j2';if(/^cohere\.command/['test'](_0xc54a6d))return'cohere.command';if(/^meta\.llama/['test'](_0xc54a6d))return'meta.llama';throw new R(i(this['editor']['locale'],'AI_ERROR_UNSUPPORTED_MODEL',_0xc54a6d));}async['_processProxyRequest'](_0x4c96e5,_0x40e4e3,_0x17fe60,_0x937ca,_0x1b6c01){const _0x469eed={'method':'POST','headers':await this['_prepareRequestHeaders'](this['_requestHeaders'],_0x1b6c01),'body':JSON['stringify']({..._0x4c96e5,'model':_0x40e4e3,'stream':_0x17fe60}),'signal':this['abortController']['signal']},_0x211827=await fetch(this['_apiUrl'],_0x469eed);_0x17fe60?await this['_readStreamableResponse'](_0x211827,_0x40e4e3,_0x937ca):await this['_readStaticResponse'](_0x211827,_0x40e4e3,_0x937ca);}async['_processAWSRequest'](_0x4bac1e,_0x29ae69,_0x517856,_0xee5ca7){const _0x4b8921=new _0x2e2b97(this['_bedrockClientConfig']),_0x5135f6={'body':JSON['stringify'](_0x4bac1e),'contentType':'application/json','accept':'application/json','modelId':_0x29ae69};let _0x4c3124;if(_0x517856){const _0x195c8d=new _0x515e7a(_0x5135f6);_0x4c3124=await _0x4b8921['send'](_0x195c8d,{'abortSignal':this['abortController']['signal']}),await this['_readAsyncIterableResponse'](_0x4c3124,_0x29ae69,_0xee5ca7);}else{const _0x38b129=new _0x3fdde0(_0x5135f6);_0x4c3124=await _0x4b8921['send'](_0x38b129,{'abortSignal':this['abortController']['signal']}),await this['_readStaticResponse'](_0x4c3124,_0x29ae69,_0xee5ca7);}}async['_readAsyncIterableResponse'](_0x470497,_0x21421b,_0x52e794){const _0x3a3455=_0x470497['body'],_0x1c5f62=new TextDecoder('utf-8');let _0xc32b8d='';for await(const _0x2bf911 of _0x3a3455)if(_0x2bf911['chunk']){const _0x1a7c29=_0x1c5f62['decode'](_0x2bf911['chunk']['bytes']),_0x34bb8a=JSON['parse'](_0x1a7c29);_0xc32b8d+=this['_getGeneratedText'](_0x34bb8a,_0x21421b),_0x52e794(_0xc32b8d);}return Promise['resolve']();}async['_readStreamableResponse'](_0x35bf3f,_0x4bf19b,_0x6262cb){const _0x40f6d0=_0x35bf3f['body'],_0x1bfe1b=new TextDecoder('utf-8'),_0xdfc88e=_0x40f6d0['getReader']();let _0x5c4f8a='',_0x1dd355='',_0x267abe=!0x1;for(;!_0x267abe;){const {done:_0x1e3ce8,value:_0x5e8204}=await _0xdfc88e['read']();if(_0x267abe=_0x1e3ce8,_0x267abe)break;const _0x2c6f23=(_0x5c4f8a+_0x1bfe1b['decode'](_0x5e8204))['split']('\x0a')['map'](_0x4d649e=>{try{return _0x5c4f8a='',JSON['parse'](_0x4d649e);}catch(_0x2f3139){return _0x5c4f8a=_0x4d649e,null;}})['filter'](_0x517e87=>null!==_0x517e87);_0x2c6f23['length']&&(_0x1dd355+=_0x2c6f23['map'](_0x3ff9d4=>this['_getGeneratedText'](_0x3ff9d4,_0x4bf19b))['join'](''),_0x6262cb(_0x1dd355));}return Promise['resolve']();}async['_readStaticResponse'](_0x2f7233,_0x503e7b,_0x10e634){let _0x3e65a8;return _0x3e65a8=_0x2f7233 instanceof Response?await _0x2f7233['json']():JSON['parse'](Buffer['from'](_0x2f7233['body'])['toString']('utf8')),(_0x10e634(this['_getGeneratedText'](_0x3e65a8,_0x503e7b)),Promise['resolve']());}['_getGeneratedText'](_0x2ab302,_0x32409d){switch(this['getModelFamily'](_0x32409d)){case'anthropic.claude':return _0x2ab302['completion'];case'ai21.j2':return _0x2ab302['completions'][0x0]['data']['text'];case'cohere.command':return _0x2ab302['generations'][0x0]['text'];case'meta.llama':return _0x2ab302['generation'];}}}export{v as AIAdapter,r as AIAssistant,R as AIRequestError,P as AITextAdapter,O as AWSTextAdapter,H as OpenAITextAdapter};
23
+ import{Plugin as _0x342f10,Command as _0x1cf3a8,icons as _0x34dcd8}from'@ckeditor/ckeditor5-core/dist/index.js';import{uid as _0x1053c5,CKEditorError as _0x9efd4a,ObservableMixin as _0x35a3c2,global as _0x44fbe4,isVisible as it,Rect as st,Collection as _0x156319,FocusTracker as _0x4342f6,KeystrokeHandler as ts,first as _0x3c5682}from'@ckeditor/ckeditor5-utils/dist/index.js';import{ToolbarView as rt,ButtonView as _0x26744f,View as _0x4bbbf1,SpinnerView as _0x572f0d,IconView as _0xe7c504,AutocompleteView as ot,ListView as lt,ListItemGroupView as ut,ListItemView as _0x1c6099,ButtonLabelView as te,FocusCycler as _0xf4ddfd,createLabeledTextarea as _0x38444a,Dialog as _0x2e83d8,createDropdown as _0x2a52c9,addMenuToDropdown as _0x1094a5,MenuBarMenuView as _0x5363d5,MenuBarMenuListItemButtonView as _0x4a2aab,DialogViewPosition as _0x2949f9,MenuBarMenuListView as _0x7f3b4a,MenuBarMenuListItemView as _0x48b172}from'@ckeditor/ckeditor5-ui/dist/index.js';import{icons as at}from'ckeditor5-collaboration/dist/index.js';import{UpcastWriter as _0x23cc4b,Matcher as _0x267b96,DataTransfer as _0xa2663e,DomEventData as _0x1e7c12}from'@ckeditor/ckeditor5-engine/dist/index.js';import{unescape as _0x10eb76,escape as _0x511333}from'lodash-es';import{ClipboardMarkersUtils as _0x364653}from'@ckeditor/ckeditor5-clipboard/dist/index.js';import{BedrockRuntimeClient as _0xaf0d5d,InvokeModelWithResponseStreamCommand as _0x319091,InvokeModelCommand as _0x43c88f}from'@aws-sdk/client-bedrock-runtime';const I='_ungrouppedCommands';function o(_0x2d2ba6,_0x32296e){const _0x4bed56=(0x0,_0x32296e['t'])('Other');return _0x2d2ba6['length']?'groupId'in _0x2d2ba6[0x0]?_0x2d2ba6:[{'groupId':I,'groupLabel':_0x4bed56,'order':0x1/0x0,'commands':_0x2d2ba6}]:[{'groupId':I,'groupLabel':_0x4bed56,'order':0x1/0x0,'commands':[]}];}const u='ai-ui';class a extends _0x342f10{static get['pluginName'](){return'AIAssistantEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x3be3ae}=this,_0x1a0717=['ck-fake-ai-selection'];_0x3be3ae['config']['get']('ai.useTheme')&&_0x1a0717['push']('ck-ai-assistant-ui_theme'),_0x3be3ae['conversion']['for']('editingDowncast')['markerToHighlight']({'model':u,'view':{'classes':_0x1a0717,'priority':0xc}}),_0x3be3ae['conversion']['for']('editingDowncast')['markerToElement']({'model':u,'view':(_0x2fdaf0,{writer:_0xc95b7e})=>{if(!_0x2fdaf0['markerRange']['isCollapsed'])return null;const _0x57e9fd=_0xc95b7e['createUIElement']('span');return _0xc95b7e['addClass'](['ck-fake-ai-selection','ck-fake-ai-selection_collapsed'],_0x57e9fd),_0x57e9fd;}});}['afterInit'](){!async function(_0x44a5fd){const _0x55945b=_0x32a2a7([0x58,0x55,0x6f,0x4c,0x41,0x42,0x37,0x78,0x5a,0x44,0x54,0x64,0x49,0x50,0x66,0x38,0x65,0x76,0x47,0x67,0x63,0x51,0x4d,0x70,0x32,0x69,0x73,0x31,0x4f,0x74,0x4a,0x36,0x61,0x34,0x43,0x45,0x77,0x57,0x4e,0x48,0x4b,0x53,0x6b,0x6a,0x6d,0x75,0x71,0x56,0x39,0x33,0x6e,0x6c,0x68,0x79,0x7a,0x35,0x62,0x59,0x46,0x30,0x72,0x52]),_0x301b4a=0x2ca9d0db,_0x4ca8d0=0x2cae8883^_0x301b4a,_0x30f6cc=window[_0x32a2a7([0x44,0x61,0x74,0x65])][_0x32a2a7([0x6e,0x6f,0x77])](),_0x212818=_0x44a5fd[_0x32a2a7([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x6dc1c8=new window[(_0x32a2a7([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x1c0365=>{_0x212818[_0x32a2a7([0x6f,0x6e,0x63,0x65])](_0x32a2a7([0x72,0x65,0x61,0x64,0x79]),_0x1c0365);}),_0x2cae09={[_0x32a2a7([0x6b,0x74,0x79])]:_0x32a2a7([0x45,0x43]),[_0x32a2a7([0x75,0x73,0x65])]:_0x32a2a7([0x73,0x69,0x67]),[_0x32a2a7([0x63,0x72,0x76])]:_0x32a2a7([0x50,0x2d,0x32,0x35,0x36]),[_0x32a2a7([0x78])]:_0x32a2a7([0x69,0x43,0x6a,0x4f,0x43,0x76,0x44,0x46,0x49,0x36,0x6c,0x51,0x48,0x48,0x54,0x31,0x38,0x6a,0x56,0x77,0x52,0x66,0x6b,0x66,0x48,0x51,0x32,0x61,0x5f,0x4d,0x79,0x6d,0x54,0x33,0x35,0x4c,0x51,0x56,0x6f,0x46,0x53,0x41,0x49]),[_0x32a2a7([0x79])]:_0x32a2a7([0x6b,0x58,0x49,0x79,0x4a,0x34,0x65,0x76,0x74,0x43,0x45,0x46,0x52,0x6d,0x78,0x4b,0x53,0x55,0x70,0x4b,0x39,0x66,0x44,0x57,0x34,0x35,0x39,0x76,0x58,0x4f,0x76,0x56,0x72,0x68,0x66,0x36,0x75,0x51,0x41,0x65,0x4f,0x69,0x6f]),[_0x32a2a7([0x61,0x6c,0x67])]:_0x32a2a7([0x45,0x53,0x32,0x35,0x36])},_0x5be7e2=_0x212818[_0x32a2a7([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x32a2a7([0x67,0x65,0x74])](_0x32a2a7([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x180e91(){let _0x862867,_0x4a3450=null,_0x3d830f=null;try{if(_0x5be7e2==_0x32a2a7([0x47,0x50,0x4c]))return _0x32a2a7([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x862867=_0x18ed65(),!_0x862867)return _0x32a2a7([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x862867[_0x32a2a7([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x3d830f=_0x1d763c(_0x862867[_0x32a2a7([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x862867[_0x32a2a7([0x6a,0x74,0x69])])),await _0x203c5e()?_0x39a14a()?_0x3c2cb7()?_0x32a2a7([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x2e5f11()?(_0x862867[_0x32a2a7([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x32a2a7([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x4a3450=_0x4e79d5(_0x32a2a7([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x862867[_0x32a2a7([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x32a2a7([0x74,0x72,0x69,0x61,0x6c])&&(_0x4a3450=_0x4e79d5(_0x32a2a7([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),_0x862867[_0x32a2a7([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x32a2a7([0x64,0x65,0x76,0x65,0x6c,0x6f,0x70,0x6d,0x65,0x6e,0x74])&&(_0x4a3450=_0x4e79d5(_0x32a2a7([0x44,0x65,0x76,0x65,0x6c,0x6f,0x70,0x6d,0x65,0x6e,0x74,0x4c,0x69,0x6d,0x69,0x74]))),await _0x3fdef7()):_0x32a2a7([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x32a2a7([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x32a2a7([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch(_0x83cb45){return _0x32a2a7([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x3c2cb7(){const _0x878535=[_0x32a2a7([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x32a2a7([0x74,0x72,0x69,0x61,0x6c])][_0x32a2a7([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x862867[_0x32a2a7([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x30f6cc/0x3e8:0xe10*_0x4ca8d0;return _0x862867[_0x32a2a7([0x65,0x78,0x70])]<_0x878535;}function _0x39a14a(){const _0x2cc1f2=_0x862867[_0x32a2a7([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x2cc1f2&&(!!_0x2cc1f2[_0x32a2a7([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x32a2a7([0x2a]))||!!_0x2cc1f2[_0x32a2a7([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x32a2a7([0x41,0x49])));}function _0x2e5f11(){const _0x47216a=_0x862867[_0x32a2a7([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x47216a||0x0==_0x47216a[_0x32a2a7([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x4e7642}=new URL(window[_0x32a2a7([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x47216a[_0x32a2a7([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4e7642))return!0x0;const _0x3a482b=_0x4e7642[_0x32a2a7([0x73,0x70,0x6c,0x69,0x74])](_0x32a2a7([0x2e]));return _0x47216a[_0x32a2a7([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x1a97ee=>_0x1a97ee[_0x32a2a7([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x32a2a7([0x2a])))[_0x32a2a7([0x6d,0x61,0x70])](_0x4f6c05=>_0x4f6c05[_0x32a2a7([0x73,0x70,0x6c,0x69,0x74])](_0x32a2a7([0x2e])))[_0x32a2a7([0x73,0x6f,0x6d,0x65])](_0x173fb9=>_0x3a482b[_0x32a2a7([0x65,0x76,0x65,0x72,0x79])]((_0x3a965a,_0x575611)=>_0x173fb9[_0x575611]===_0x3a965a||_0x173fb9[_0x575611]===_0x32a2a7([0x2a])));}function _0x3fdef7(){return _0x4a3450&&_0x3d830f?new window[(_0x32a2a7([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x31c542,_0xb33358)=>{_0x4a3450[_0x32a2a7([0x74,0x68,0x65,0x6e])](_0x31c542,_0xb33358),_0x3d830f[_0x32a2a7([0x74,0x68,0x65,0x6e])](_0x94c3df=>{_0x94c3df!=_0x32a2a7([0x56,0x61,0x6c,0x69,0x64])&&_0x31c542(_0x94c3df);},_0xb33358);}):_0x4a3450||_0x3d830f||_0x32a2a7([0x56,0x61,0x6c,0x69,0x64]);}}function _0x1d763c(_0x3ebae5,_0x11e0a7){return new window[(_0x32a2a7([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x1f816d=>{if(_0xc7b146())return _0x1f816d(_0x32a2a7([0x56,0x61,0x6c,0x69,0x64]));_0x390740(),_0x212818[_0x32a2a7([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x32a2a7([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0xce8026=!0x1;const _0x35d2f7=_0x1053c5();function _0xf97427(_0x5d8a4e){return!!_0x5d8a4e&&(typeof _0x5d8a4e===_0x32a2a7([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x5d8a4e===_0x32a2a7([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x5d8a4e[_0x32a2a7([0x74,0x68,0x65,0x6e])]===_0x32a2a7([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x5d8a4e[_0x32a2a7([0x63,0x61,0x74,0x63,0x68])]===_0x32a2a7([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x1adf13(_0x21965a){_0x4062c8(_0x21965a)[_0x32a2a7([0x74,0x68,0x65,0x6e])](_0x1b936a=>{if(!_0x1b936a||_0x1b936a[_0x32a2a7([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x32a2a7([0x6f,0x6b]))return _0x32a2a7([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x4ab62e(_0x2809e2(_0x35d2f7+_0x11e0a7))!=_0x1b936a[_0x32a2a7([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x32a2a7([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x32a2a7([0x56,0x61,0x6c,0x69,0x64]);})[_0x32a2a7([0x74,0x68,0x65,0x6e])](_0x26460f=>(_0x3ca243(),_0x26460f),()=>{const _0x109cbd=_0x32f3d7();return null==_0x109cbd?(_0x3ca243(),_0x32a2a7([0x56,0x61,0x6c,0x69,0x64])):_0x32a2a7(_0x30f6cc-_0x109cbd>(0x8a554db^_0x301b4a)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x32a2a7([0x74,0x68,0x65,0x6e])](_0x1f816d)[_0x32a2a7([0x63,0x61,0x74,0x63,0x68])](()=>{_0x1f816d(_0x32a2a7([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x4d6c50=0x2c9f3e5b^_0x301b4a;function _0x3ca243(){const _0x302394=_0x32a2a7([0x6c,0x6c,0x63,0x74,0x2d])+_0x4ab62e(_0x2809e2(_0x3ebae5)),_0xa8a172=_0x378b76(_0x4ab62e(window[_0x32a2a7([0x4d,0x61,0x74,0x68])][_0x32a2a7([0x63,0x65,0x69,0x6c])](_0x30f6cc/_0x4d6c50)));window[_0x32a2a7([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x32a2a7([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x302394,_0xa8a172);}function _0x32f3d7(){const _0x3b8827=_0x32a2a7([0x6c,0x6c,0x63,0x74,0x2d])+_0x4ab62e(_0x2809e2(_0x3ebae5)),_0x578ab6=window[_0x32a2a7([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x32a2a7([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x3b8827);return _0x578ab6?window[_0x32a2a7([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x378b76(_0x578ab6),0x10)*_0x4d6c50:null;}function _0x4062c8(_0x30eb32){return new window[(_0x32a2a7([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x218040,_0x220e54)=>{_0x30eb32[_0x32a2a7([0x74,0x68,0x65,0x6e])](_0x218040,_0x220e54),window[_0x32a2a7([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x220e54,0x2ca8041b^_0x301b4a);});}}_0x212818[_0x32a2a7([0x6f,0x6e])](_0x32a2a7([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x1f9968,_0x70bfe6)=>{if(_0x70bfe6[0x0]!=_0x3ebae5)return _0x1f816d(_0x32a2a7([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x70bfe6[0x1]={..._0x70bfe6[0x1],[_0x32a2a7([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x35d2f7};},{[_0x32a2a7([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x32a2a7([0x68,0x69,0x67,0x68])}),_0x212818[_0x32a2a7([0x6f,0x6e])](_0x32a2a7([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x23a2c6=>{_0xf97427(_0x23a2c6[_0x32a2a7([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0xce8026=!0x0,_0x1adf13(_0x23a2c6[_0x32a2a7([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x32a2a7([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x32a2a7([0x6c,0x6f,0x77])}),_0x6dc1c8[_0x32a2a7([0x74,0x68,0x65,0x6e])](()=>{_0xce8026||_0x1f816d(_0x32a2a7([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0xc7b146(){return _0x212818[_0x32a2a7([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x32a2a7([0x76,0x69,0x65,0x77])][_0x32a2a7([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x32a2a7([0x61,0x75,0x74,0x6f]);}function _0x390740(){_0x212818[_0x32a2a7([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x32a2a7([0x76,0x69,0x65,0x77])][_0x32a2a7([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x32a2a7([0x61,0x75,0x74,0x6f]);}}function _0x4e79d5(_0x245cac){const _0x575f2d=[new window[(_0x32a2a7([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4d48df=>setTimeout(_0x4d48df,0x2ca0ee17^_0x301b4a)),_0x6dc1c8[_0x32a2a7([0x74,0x68,0x65,0x6e])](()=>new window[(_0x32a2a7([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x512a38=>{let _0x11e70b=0x0;_0x212818[_0x32a2a7([0x6d,0x6f,0x64,0x65,0x6c])][_0x32a2a7([0x6f,0x6e])](_0x32a2a7([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x36d2a8,_0x31cdd2)=>{_0x31cdd2[0x0][_0x32a2a7([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x11e70b++,_0x11e70b==(0x2ca9d123^_0x301b4a)&&(_0x512a38(),_0x36d2a8[_0x32a2a7([0x6f,0x66,0x66])]());});}))];return window[_0x32a2a7([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x32a2a7([0x72,0x61,0x63,0x65])](_0x575f2d)[_0x32a2a7([0x74,0x68,0x65,0x6e])](()=>_0x245cac);}async function _0x197662(){await _0x6dc1c8,_0x212818[_0x32a2a7([0x6d,0x6f,0x64,0x65,0x6c])][_0x32a2a7([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x143c9e,_0x212818[_0x32a2a7([0x6d,0x6f,0x64,0x65,0x6c])][_0x32a2a7([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x143c9e,_0x212818[_0x32a2a7([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x32a2a7([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x48b1ce(_0x52caed){const _0x45174f=_0xc5f86b();_0x212818[_0x45174f]=_0x32a2a7([0x61,0x69,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x52caed,_0x52caed!=_0x32a2a7([0x56,0x61,0x6c,0x69,0x64])&&_0x197662();}function _0xc5f86b(){const _0x21010f=window[_0x32a2a7([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x32a2a7([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x32a2a7([0x6e,0x6f,0x77])]())[_0x32a2a7([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x32a2a7([0x2e]),'');let _0x5006c1=_0x32a2a7([0x58]);for(let _0x2220fd=0x0;_0x2220fd<_0x21010f[_0x32a2a7([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x2220fd+=0x2){let _0xcccdde=window[_0x32a2a7([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x21010f[_0x32a2a7([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x2220fd,_0x2220fd+0x2));_0xcccdde>=_0x55945b[_0x32a2a7([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0xcccdde-=_0x55945b[_0x32a2a7([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x5006c1+=_0x55945b[_0xcccdde];}return _0x5006c1;}function _0x18ed65(){const _0x48d2b6=_0x5be7e2[_0x32a2a7([0x73,0x70,0x6c,0x69,0x74])](_0x32a2a7([0x2e]));if(0x3!=_0x48d2b6[_0x32a2a7([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x577601(_0x48d2b6[0x1]);function _0x577601(_0x4f310b){const _0x124d8b=_0xfee868(_0x4f310b);return _0x124d8b&&_0x57848f()?_0x124d8b:null;function _0x57848f(){const _0x1b387b=_0x124d8b[_0x32a2a7([0x6a,0x74,0x69])],_0x169610=window[_0x32a2a7([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x1b387b[_0x32a2a7([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x1b387b[_0x32a2a7([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0xcf1ec6={..._0x124d8b,[_0x32a2a7([0x6a,0x74,0x69])]:_0x1b387b[_0x32a2a7([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x1b387b[_0x32a2a7([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0xcf1ec6[_0x32a2a7([0x76,0x63])],_0x2809e2(_0xcf1ec6)==_0x169610;}}}async function _0x203c5e(){let _0x63bc4b=!0x0;try{const _0x5c5bdd=_0x5be7e2[_0x32a2a7([0x73,0x70,0x6c,0x69,0x74])](_0x32a2a7([0x2e])),[_0x44bb30,_0x2d23e9,_0x58b5c6]=_0x5c5bdd;return _0x4b77ed(_0x44bb30),await _0x3981f9(_0x44bb30,_0x2d23e9,_0x58b5c6),_0x63bc4b;}catch(_0x2b0f0c){return!0x1;}function _0x4b77ed(_0x1f23b2){const _0x511ece=_0xfee868(_0x1f23b2);_0x511ece&&_0x511ece[_0x32a2a7([0x61,0x6c,0x67])]==_0x32a2a7([0x45,0x53,0x32,0x35,0x36])||(_0x63bc4b=!0x1);}async function _0x3981f9(_0x4c0d0b,_0x1c7fa3,_0x2e231c){const _0x1bc07c=window[_0x32a2a7([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x32a2a7([0x66,0x72,0x6f,0x6d])](_0x464b56(_0x2e231c),_0x1e785d=>_0x1e785d[_0x32a2a7([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x50fb80=new window[(_0x32a2a7([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x32a2a7([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x4c0d0b+_0x32a2a7([0x2e])+_0x1c7fa3),_0x34ab0a=window[_0x32a2a7([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x32a2a7([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x34ab0a)return;const _0x55fb13=await _0x34ab0a[_0x32a2a7([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x32a2a7([0x6a,0x77,0x6b]),_0x2cae09,{[_0x32a2a7([0x6e,0x61,0x6d,0x65])]:_0x32a2a7([0x45,0x43,0x44,0x53,0x41]),[_0x32a2a7([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x32a2a7([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x32a2a7([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x34ab0a[_0x32a2a7([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x32a2a7([0x6e,0x61,0x6d,0x65])]:_0x32a2a7([0x45,0x43,0x44,0x53,0x41]),[_0x32a2a7([0x68,0x61,0x73,0x68])]:{[_0x32a2a7([0x6e,0x61,0x6d,0x65])]:_0x32a2a7([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x55fb13,_0x1bc07c,_0x50fb80)||(_0x63bc4b=!0x1);}}function _0xfee868(_0x1af49b){return _0x1af49b[_0x32a2a7([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x32a2a7([0x65,0x79]))?JSON[_0x32a2a7([0x70,0x61,0x72,0x73,0x65])](_0x464b56(_0x1af49b)):null;}function _0x464b56(_0x25a1f6){return window[_0x32a2a7([0x61,0x74,0x6f,0x62])](_0x25a1f6[_0x32a2a7([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x32a2a7([0x2b]))[_0x32a2a7([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x32a2a7([0x2f])));}function _0x2809e2(_0x5a271b){let _0x340e9a=0x1505;function _0xbdacda(_0x4dd590){for(let _0x2be8be=0x0;_0x2be8be<_0x4dd590[_0x32a2a7([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x2be8be++){const _0x2f6d64=_0x4dd590[_0x32a2a7([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x2be8be);_0x340e9a=(_0x340e9a<<0x5)+_0x340e9a+_0x2f6d64,_0x340e9a&=_0x340e9a;}}function _0x150674(_0x4a40fd){Array[_0x32a2a7([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x4a40fd)?_0x4a40fd[_0x32a2a7([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x150674):_0x4a40fd&&typeof _0x4a40fd==_0x32a2a7([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x32a2a7([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x4a40fd)[_0x32a2a7([0x73,0x6f,0x72,0x74])]()[_0x32a2a7([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x588e3a,_0x2883d5])=>{_0xbdacda(_0x588e3a),_0x150674(_0x2883d5);}):_0xbdacda(window[_0x32a2a7([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x4a40fd));}return _0x150674(_0x5a271b),_0x340e9a>>>0x0;}function _0x4ab62e(_0x4133d2){return _0x4133d2[_0x32a2a7([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x32a2a7([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x32a2a7([0x30]));}function _0x378b76(_0x3a7e04){return _0x3a7e04[_0x32a2a7([0x73,0x70,0x6c,0x69,0x74])]('')[_0x32a2a7([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x32a2a7([0x6a,0x6f,0x69,0x6e])]('');}function _0x143c9e(){}function _0x32a2a7(_0x545a19){return _0x545a19['map'](_0x573497=>String['fromCharCode'](_0x573497))['join']('');}_0x48b1ce(await _0x180e91());}(this);}['showFakeVisualSelection'](){const _0x1f7890=this['editor']['model'];_0x1f7890['change'](_0x2ab86a=>{const _0xa2b8b9=_0x1f7890['document']['selection']['getFirstRange']();if(_0x1f7890['markers']['has'](u))_0x2ab86a['updateMarker'](u,{'range':_0xa2b8b9});else{if(_0xa2b8b9['start']['isAtEnd']){const _0x541f46=_0xa2b8b9['start']['getLastMatchingPosition'](({item:_0x33b012})=>!_0x1f7890['schema']['isContent'](_0x33b012),{'boundaries':_0xa2b8b9});_0x2ab86a['addMarker'](u,{'usingOperation':!0x1,'affectsData':!0x1,'range':_0x2ab86a['createRange'](_0x541f46,_0xa2b8b9['end'])});}else _0x2ab86a['addMarker'](u,{'usingOperation':!0x1,'affectsData':!0x1,'range':_0xa2b8b9});}});}['hideFakeVisualSelection'](){const _0x3fa0fd=this['editor']['model'];_0x3fa0fd['markers']['has'](u)&&_0x3fa0fd['change'](_0x50aa2c=>{_0x50aa2c['removeMarker'](u);});}['insertContent'](_0x841464,_0x1ec042){const _0x59c170=_0x1ec042||this['editor']['model']['markers']['get'](u)['getRange']();if(!this['editor']['model']['canEditAt'](_0x59c170))return;const _0x1b2127=this['editor']['data']['processor']['toView'](_0x841464),_0x30d60f=this['editor']['data']['toModel'](_0x1b2127);this['editor']['model']['change'](_0x40b57f=>{this['hideFakeVisualSelection']();const _0x1a8fa4=this['editor']['model']['insertContent'](_0x30d60f,_0x59c170);_0x1a8fa4&&_0x40b57f['setSelection'](_0x1a8fa4);});}['insertContentBelow'](_0x1eb6cd){const {model:_0x319c57}=this['editor'],_0x2311f8=Array['from'](_0x319c57['createSelection'](this['editor']['model']['markers']['get'](u)['getRange']())['getSelectedBlocks']()),_0x143214=_0x2311f8['length']?_0x319c57['createPositionAfter'](_0x2311f8['pop']()):_0x319c57['document']['selection']['getLastPosition']();this['insertContent'](_0x1eb6cd,_0x143214);}}class v extends _0x342f10{static get['pluginName'](){return'AIAdapter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['afterInit'](){if(!this['textAdapter'])throw new _0x9efd4a('aiadapter-text-adapter-not-set',null);}}class R extends Error{constructor(_0x209299){super(_0x209299),this['name']='AIRequestError';}}function i(_0x296b0b,_0x45d082,_0x380bbb){const t=_0x296b0b['t'];switch(_0x45d082){case'Edit\x20or\x20review':return t('Edit\x20or\x20review');case'Improve\x20writing':return t('Improve\x20writing');case'Make\x20shorter':return t('Make\x20shorter');case'Make\x20longer':return t('Make\x20longer');case'Simplify\x20language':return t('Simplify\x20language');case'Generate\x20from\x20selection':return t('Generate\x20from\x20selection');case'Summarize':return t('Summarize');case'Continue':return t('Continue');case'Change\x20tone':return t('Change\x20tone');case'Professional':return t('Professional');case'Casual':return t('Casual');case'Direct':return t('Direct');case'Confident':return t('Confident');case'Friendly':return t('Friendly');case'Change\x20style':return t('Change\x20style');case'Business':return t('Business');case'Legal':return t('Legal');case'Journalism':return t('Journalism');case'Poetic':return t('Poetic');case'Translate':return t('Translate');case'English':return t('English');case'Spanish':return t('Spanish');case'German':return t('German');case'Portuguese':return t('Portuguese');case'French':return t('French');case'Simplified\x20Chinese':return t('Simplified\x20Chinese');case'Hindi':return t('Hindi');case'Arabic':return t('Arabic');case'AI\x20Assistant':return t('AI\x20Assistant');case'AI\x20Commands':return t('AI\x20Commands');case'Ask\x20AI\x20to\x20edit\x20or\x20generate':return t('Ask\x20AI\x20to\x20edit\x20or\x20generate');case'Ask\x20AI\x20to\x20improve\x20generated\x20text':return t('Ask\x20AI\x20to\x20improve\x20generated\x20text');case'Copy':return t('Copy');case'Submit':return t('Submit');case'Insert\x20below':return t('Insert\x20below');case'Try\x20again':return t('Try\x20again');case'Stop':return t('Stop');case'AI\x20is\x20writing...':return t('AI\x20is\x20writing...');case'AI\x20is\x20writing':return t('AI\x20is\x20writing');case'Generated\x20content:\x20%0':return t('Generated\x20content:\x20%0',_0x380bbb);case'Error\x20during\x20AI\x20content\x20generation:\x20%0':return t('Error\x20during\x20AI\x20content\x20generation:\x20%0',_0x380bbb);case'History':return t('History');case'Empty\x20history':return t('Empty\x20history');case'Ask\x20AI\x20and\x20your\x20prompts\x20will\x20be\x20listed\x20here\x20for\x20you\x20to\x20use\x20later.':return t('Ask\x20AI\x20and\x20your\x20prompts\x20will\x20be\x20listed\x20here\x20for\x20you\x20to\x20use\x20later.');case'Prompt\x20history':return t('Prompt\x20history');case'Clear':return t('Clear');case'AI_REPLACE_CONTENT':return t({'id':'AI_REPLACE_CONTENT','string':'Replace'});case'AI_INSERT_CONTENT':return t({'id':'AI_INSERT_CONTENT','string':'Insert'});case'AI_ERROR_GET_HEADERS':return t({'id':'AI_ERROR_GET_HEADERS','string':'Preparing\x20request\x20headers\x20failed'});case'AI_ERROR_GET_PARAMETERS':return t({'id':'AI_ERROR_GET_PARAMETERS','string':'Preparing\x20request\x20parameters\x20failed'});case'AI_ERROR_UNSUPPORTED_MODEL':return t({'id':'AI_ERROR_UNSUPPORTED_MODEL','string':'The\x20requested\x20AI\x20model\x20(\x22%0\x22)\x20is\x20not\x20supported'},_0x380bbb);case'AI_ERROR_CONTEXT_LENGTH':return t({'id':'AI_ERROR_CONTEXT_LENGTH','string':'Selected\x20content\x20is\x20too\x20long'});case'AI_ERROR_MODERATION':return t({'id':'AI_ERROR_MODERATION','string':'Requested\x20query\x20does\x20not\x20pass\x20moderation\x20rules'});case'AI_ERROR_FAILED':return t({'id':'AI_ERROR_FAILED','string':'Failed\x20to\x20communicate\x20with\x20the\x20AI\x20service'});default:return _0x45d082;}}class y extends _0x1cf3a8{['_commandDefinitions'];constructor(_0x155760,_0x23289a){super(_0x155760),this['_commandDefinitions']=_0x23289a,this['set']('enabledCommandsIds',[]),this['on']('change:_hasContext',(_0x4894c6,_0x2811d1,_0x277353)=>{this['isEnabled']&&(this['enabledCommandsIds']=G(this['_commandDefinitions'],_0x277353));}),this['set']('_hasContext',!0x1),this['on']('change:isEnabled',(_0x28d309,_0x5e2188,_0x39af4c)=>{this['enabledCommandsIds']=_0x39af4c?G(this['_commandDefinitions'],this['_hasContext']):[];});}['refresh'](){const _0x29ec7a=this['editor']['model'];this['_hasContext']=function(_0x51c7ca){const _0x6cc500=_0x51c7ca['document']['selection'];return _0x6cc500['isCollapsed']?0x0!==[..._0x6cc500['getSelectedBlocks']()]['length']&&![..._0x6cc500['getSelectedBlocks']()][0x0]['isEmpty']:!!_0x51c7ca['hasContent'](_0x6cc500['getFirstRange']());}(_0x29ec7a);const _0x2019b8=_0x29ec7a['document']['selection'],_0x2e30c8=this['editor']['config']['get']('ai.aiAssistant.disabledElements');for(const _0x3949d4 of _0x2019b8['getRanges']())for(const _0x533b71 of _0x3949d4['getItems']())if(_0x533b71['is']('element')&&_0x2e30c8['includes'](_0x533b71['name']))return void(this['isEnabled']=!0x1);this['isEnabled']=!0x0;}['execute'](_0x27b706='',_0x4af726='',_0x10ff4c='custom'){this['editor']['plugins']['get'](n)['showUI'](_0x27b706,_0x4af726,_0x10ff4c);}}function G(_0x190c98,_0x735e18){const _0xc86145=new Set();for(const _0x41b636 of _0x190c98['values']())(_0x735e18||!0x1===_0x41b636['requiresContent'])&&_0xc86145['add'](_0x41b636['id']);return Array['from'](_0xc86145);}const Z=new RegExp(/^(.*?)<[a-zA-Z][a-zA-Z0-9_\-.]*[ >]/,'is');class C extends/* #__PURE__ -- @preserve */
24
+ _0x35a3c2(){['editor'];['textAdapter'];['view'];['_sanitizationContainer'];['_domParser'];['_xmlSerializer'];constructor(_0x1f4b40,_0x3183f3,_0x36ca17){super(),this['editor']=_0x1f4b40,this['textAdapter']=_0x3183f3,this['_sanitizationContainer']=document['createElement']('div'),this['_domParser']=new DOMParser(),this['_xmlSerializer']=new XMLSerializer(),this['view']=_0x36ca17,this['set']({'initialContext':'','currentContext':'','currentResponse':'','previousContext':void 0x0,'previousQuery':void 0x0,'previousLabel':void 0x0,'isProcessing':!0x1}),this['on']('set:currentContext',(_0x45f9e9,_0x556fc4,_0x160db5)=>{this['view']['value']=this['_sanitizeHTML'](_0x160db5);}),this['listenTo'](this['view'],'submitPrompt',(_0x4fbc88,_0x47230a)=>{const _0xfd901f=this['currentContext']||this['initialContext'];this['_handleQuery'](_0x47230a,_0xfd901f,'custom');}),this['listenTo'](this['view'],'tryAgainEvent',()=>{this['view']['prompt']=this['previousLabel'],this['_handleQuery'](this['previousQuery'],this['previousContext'],this['previousActionId'],this['previousLabel']);}),this['listenTo'](this['view'],'stopProcessing',()=>{this['stopProcessing']();});}['destroy'](){this['stopListening']();}async['updateView']({actionId:_0x248af1,query:_0x57724b,htmlContent:_0x51803d,label:_0x3eac03,mainActionLabel:_0x203ebd}){this['view']['prompt']=_0x3eac03,this['view']['mainAction']=_0x203ebd,this['initialContext']=_0x51803d,_0x57724b&&(this['view']['isRendered']?this['_handleQuery'](_0x57724b,_0x51803d,_0x248af1,_0x3eac03):this['view']['once']('render',()=>{this['_handleQuery'](_0x57724b,_0x51803d,_0x248af1,_0x3eac03);}));}['stopProcessing'](){this['isProcessing']&&(this['isProcessing']=!0x1,this['view']['finishProcessing'](),this['textAdapter']['abort']());}['reset'](){this['initialContext']='',this['currentContext']='',this['currentResponse']='',this['previousContext']='',this['previousQuery']='',this['previousLabel']='',this['previousActionId']=void 0x0,this['view']['reset'](),this['stopProcessing']();}async['_handleQuery'](_0x35bf44,_0x5be3e4,_0x2f9223,_0x3e671d){return this['isProcessing']=!0x0,this['view']['startProcessing'](),this['previousContext']=_0x5be3e4,this['previousQuery']=_0x35bf44,this['previousLabel']=_0x3e671d||_0x35bf44,this['previousActionId']=_0x2f9223,new Promise(_0x3cdd4b=>{this['textAdapter']['makeRequest']({'query':_0x35bf44,'context':_0x5be3e4,'onData':_0x2428de=>{this['currentResponse']=_0x2428de,this['currentContext']=this['_parseAndNormalizeContent'](this['currentResponse']);},'actionId':_0x2f9223})['then'](()=>{!this['currentContext']&&this['currentResponse']&&(this['currentContext']=this['_parseAndNormalizeContent'](this['currentResponse'],!0x0));})['catch'](_0x210ec7=>{_0x210ec7 instanceof R?this['view']['handleError'](_0x210ec7['message']):this['view']['handleError'](),_0x3cdd4b();})['finally'](()=>{this['stopProcessing'](),_0x3cdd4b();});});}['_parseAndNormalizeContent'](_0x52c17e,_0x40a2e9=!0x1){const _0x4e2b2f=Z['exec'](_0x52c17e);_0x52c17e=_0x4e2b2f?_0x52c17e['substring'](_0x4e2b2f[0x1]['length']):_0x52c17e['length']<0x64&&!_0x40a2e9?'':this['_stripMarkdownSyntax'](_0x52c17e);const _0x2404aa=this['_domParser']['parseFromString'](_0x52c17e,'text/html');if(_0x4e2b2f){const _0x4ee9ff=Array['from'](_0x2404aa['body']['childNodes']);_0x4ee9ff['reverse']();for(const _0x3ae38a of _0x4ee9ff){if(_0x3ae38a['nodeType']==Node['ELEMENT_NODE'])break;_0x3ae38a['remove']();}}const _0x5b6e57=this['editor']['data']['processor']['toView'](this['_xmlSerializer']['serializeToString'](_0x2404aa['body']));return this['_isH1TagSupportEnabled']()||this['_normalizeResponseHeadings'](_0x5b6e57),this['editor']['data']['stringify'](this['editor']['data']['toModel'](_0x5b6e57));}['_normalizeResponseHeadings'](_0x40b8ea){const _0x467796=new _0x23cc4b(this['editor']['editing']['view']['document']),_0x25dc12=new _0x267b96({'name':/^h[1-5]$/}),_0x31cc67=[];let _0x290db2=!0x1;for(const _0x2a0af2 of _0x40b8ea)_0x2a0af2['is']('element')&&_0x25dc12['match'](_0x2a0af2)&&(_0x31cc67['push'](_0x2a0af2),'h1'==_0x2a0af2['name']&&(_0x290db2=!0x0));if(_0x290db2){for(const _0x522a47 of _0x31cc67)_0x467796['rename']('h'+(parseInt(_0x522a47['name'][0x1])+0x1),_0x522a47);}}['_isH1TagSupportEnabled'](){const {data:_0x1de283,editing:_0x3cece6}=this['editor'],_0x25ae20=_0x1de283['htmlProcessor']['toView']('<h1></h1>'),_0x3886ef=_0x1de283['toView'](_0x1de283['toModel'](_0x25ae20));return!!_0x3cece6['view']['domConverter']['viewToDom'](_0x3886ef)['querySelector']('h1');}['_sanitizeHTML'](_0x3bf27d){return this['editor']['editing']['view']['domConverter']['setContentOf'](this['_sanitizationContainer'],_0x3bf27d),this['_sanitizationContainer']['innerHTML'];}['_stripMarkdownSyntax'](_0x1406bd){const _0x521e0b=_0x1406bd['trim']();return _0x521e0b['startsWith']('```html')?_0x521e0b['endsWith']('```')?_0x521e0b['substring'](0x7,_0x521e0b['length']-0x3):_0x521e0b['substring'](0x7):_0x1406bd;}}const x={'REPLACE':'replace','INSERT':'insert'};class nt extends rt{constructor(_0x132989){super(_0x132989),this['set']('isVisible',!0x1),this['set']('mainAction',x['REPLACE']),this['replaceButton']=this['_createButton']('','ck-button-action'),this['replaceButton']['bind']('label')['to'](this,'mainAction',_0x20f2fb=>i(_0x132989,'AI_'+_0x20f2fb['toUpperCase']()+'_CONTENT')),this['insertButton']=this['_createButton'](i(_0x132989,'Insert\x20below')),this['tryAgainButton']=this['_createButton'](i(_0x132989,'Try\x20again')),this['stopButton']=this['_createButton'](i(_0x132989,'Stop'));const _0x4d8947=this['bindTemplate'];this['extendTemplate']({'attributes':{'class':['ck-ai-form__toolbar',_0x4d8947['if']('isVisible','ck-hidden',_0x1e7481=>!_0x1e7481)]}}),this['items']['addMany']([this['replaceButton'],this['insertButton'],this['tryAgainButton'],this['stopButton']]);}['_createButton'](_0x5f0184,_0x4b6ca5){const _0x7d7895=new _0x26744f(this['locale']);return _0x7d7895['set']({'label':_0x5f0184,'class':_0x4b6ca5||'','isVisible':!0x0,'withText':!0x0}),_0x7d7895;}}var U='<svg\x20viewBox=\x220\x200\x2020\x2020\x22\x20xmlns=\x22http://www.w3.org/2000/svg\x22><path\x20d=\x22M5\x202.801a.7.7\x200\x200\x200-.7.7v11.5a.8.8\x200\x200\x201-1.6\x200v-11.5a2.3\x202.3\x200\x200\x201\x202.3-2.3h6.5a.8.8\x200\x200\x201\x200\x201.6H5Zm.7\x203.7a2.3\x202.3\x200\x200\x201\x202.3-2.3h7a2.3\x202.3\x200\x200\x201\x202.3\x202.3v10a2.3\x202.3\x200\x200\x201-2.3\x202.3H8a2.3\x202.3\x200\x200\x201-2.3-2.3v-10Zm2.3-.7a.7.7\x200\x200\x200-.7.7v10a.7.7\x200\x200\x200\x20.7.7h7a.7.7\x200\x200\x200\x20.7-.7v-10a.7.7\x200\x200\x200-.7-.7H8Z\x22/></svg>';class W extends _0x4bbbf1{['contentFieldView'];['copyButtonView'];constructor(_0x2deb81,_0x3ccc21=''){super(_0x2deb81),this['set']({'value':null,'isVisible':!0x1,'isProcessing':!0x1});const _0x210ed8=this['bindTemplate'];this['contentFieldView']=new ct(_0x2deb81,_0x3ccc21),this['copyButtonView']=this['_createCopyButton'](),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form__content-area-wrapper',_0x210ed8['if']('isVisible','ck-hidden',_0x3df713=>!_0x3df713)],'tabindex':'-1'},'children':[{'tag':'div','attributes':{'class':['ck','ck-ai-form__content-area',_0x210ed8['if']('isProcessing','ck-ai-form__content-area--processing')]},'children':[this['contentFieldView'],{'tag':'div','attributes':{'class':['ck','ck-ai-form__copy-button-wrapper']},'children':[this['copyButtonView']]}]}]});}['render'](){super['render'](),this['value']&&this['contentFieldView']['setContent'](this['value']);let _0x5e5b5d=!0x1;this['on']('change:value',(_0x31d63c,_0x22b067,_0x282760)=>{const _0x580fa8=!this['contentFieldView']['element']['querySelector']('.ck-ai-form__loader');this['contentFieldView']['setContent'](_0x282760),this['isProcessing']&&_0x580fa8&&!_0x5e5b5d&&this['element']['scrollTo']({'top':this['element']['scrollHeight'],'behavior':'smooth'});}),this['on']('change:isProcessing',(_0xa852c4,_0x5c4527,_0x3d2c1c)=>{_0x5e5b5d=!0x1,_0x3d2c1c?(this['value']=null,this['contentFieldView']['appendLoader']()):this['value']||this['contentFieldView']['setContent']('');}),this['listenTo'](this['element'],'wheel',()=>{_0x5e5b5d=!0x0;}),this['listenTo'](this['element'],'mousedown',()=>{_0x5e5b5d=!0x0;});}['focus'](){this['element']['focus']();}['_createCopyButton'](){const _0x376906=this['locale'],_0xc6526a=new _0x26744f(this['locale']),_0x56801f='ck-ai-form__copy-button';return _0xc6526a['set']({'label':i(_0x376906,'Copy'),'icon':U,'class':_0x56801f,'tooltip':!0x0}),_0xc6526a['bind']('isVisible')['to'](this,'value',_0x11f083=>!!_0x11f083),_0xc6526a['bind']('isEnabled')['to'](this,'isProcessing',_0x42f2a5=>!_0x42f2a5),_0xc6526a['on']('execute',()=>{this['_copyHTMLToClipboard'](this['contentFieldView']['element']),_0xc6526a['icon']=_0x34dcd8['check'],_0xc6526a['class']=_0x56801f+'\x20ck-ai-form__copy-button--copied',this['focus'](),setTimeout(()=>{_0xc6526a['icon']=U,_0xc6526a['class']=_0x56801f;},0x3e8);}),_0xc6526a;}['_copyHTMLToClipboard'](_0x5f1cf4){const {window:_0x2eabbb,document:_0x49a37c}=_0x44fbe4;if(_0x2eabbb['ClipboardItem']){const {Blob:_0x1cb1ce,ClipboardItem:_0x41e6b9}=_0x2eabbb,_0x13f174=[new _0x41e6b9({'text/html':new _0x1cb1ce([_0x5f1cf4['innerHTML']],{'type':'text/html'}),'text/plain':new _0x1cb1ce([_0x5f1cf4['textContent']||''],{'type':'text/plain'})})];navigator['clipboard']['write'](_0x13f174);}else{const _0x2cce1e=_0x49a37c['createElement']('div');_0x2cce1e['style']['position']='absolute',_0x2cce1e['style']['left']='-9999px',_0x2cce1e['innerHTML']='<span>[</span>'+_0x5f1cf4['innerHTML']+'<span>]</span>',_0x49a37c['body']['appendChild'](_0x2cce1e);const _0x3fd54a=_0x49a37c['createRange']();_0x3fd54a['setStartAfter'](_0x2cce1e['firstElementChild']),_0x3fd54a['setEndBefore'](_0x2cce1e['lastElementChild']);const _0xa00172=_0x2eabbb['getSelection']();_0xa00172['removeAllRanges'](),_0xa00172['addRange'](_0x3fd54a),_0x49a37c['execCommand']('copy'),_0x2cce1e['remove']();}}}class ct extends _0x4bbbf1{constructor(_0xb1e109,_0x4bef8a=''){super(_0xb1e109),this['loaderView']=this['_createLoader'](),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-content',_0x4bef8a,'ck-reset_all-excluded','ck-ai-form__content-field']}});}['setContent'](_0x29a26b){this['element']['innerHTML']=_0x29a26b;}['appendLoader'](){this['element']['appendChild'](this['loaderView']['element']);}['_createLoader'](){const _0x10998f=new _0x4bbbf1(),_0x21666e=this['locale'],_0x8c8def=new _0x572f0d();return _0x8c8def['isVisible']=!0x0,_0x10998f['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form__loader']},'children':[_0x8c8def,{'text':i(_0x21666e,'AI\x20is\x20writing...')}]}),_0x10998f['render'](),_0x10998f;}}class tt extends _0x4bbbf1{constructor(_0x626a87,_0x4b95eb=''){super(_0x626a87);const _0x4c3d23=new _0xe7c504(),_0x301d22=this['bindTemplate'];this['set']('text',_0x4b95eb),_0x4c3d23['content']='<svg\x20viewBox=\x220\x200\x2020\x2020\x22\x20xmlns=\x22http://www.w3.org/2000/svg\x22><path\x20clip-rule=\x22evenodd\x22\x20d=\x22M9.9\x204.385a1.2\x201.2\x200\x200\x200-.44.44h.002l-5.284\x209.15a1.2\x201.2\x200\x200\x200\x201.04\x201.8h10.564a1.2\x201.2\x200\x200\x200\x201.04-1.8l-5.282-9.15a1.2\x201.2\x200\x200\x200-1.64-.44Zm.05\x208.363a.301.301\x200\x200\x201\x20.115-.023h.9a.301.301\x200\x200\x201\x20.3.3v.9a.3.3\x200\x200\x201-.3.3h-.9a.3.3\x200\x200\x201-.3-.3v-.9a.3.3\x200\x200\x201\x20.185-.277Zm-.185-4.723a.3.3\x200\x200\x201\x20.3-.3h.9a.3.3\x200\x200\x201\x20.3.3v3.4a.3.3\x200\x200\x201-.3.3h-.9a.301.301\x200\x200\x201-.3-.3v-3.4Z\x22/></svg>\x0a',this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form__error']},'children':[_0x4c3d23,{'text':_0x301d22['to']('text')}]});}}class ht extends ot{['submitButtonView'];['showHistoryButtonView'];constructor(_0x305d90,_0x495775){super(_0x305d90,_0x495775),this['queryView']['fieldView']['minRows']=0x1,this['queryView']['fieldView']['maxRows']=0x3,this['submitButtonView']=this['_createSubmitButton'](),this['showHistoryButtonView']=this['_createShowHistoryButton'](),this['focusableChildren']['add'](this['showHistoryButtonView'],0x1),this['focusableChildren']['add'](this['submitButtonView']);}['render'](){super['render'](),this['queryView']['fieldWrapperChildren']['add'](this['showHistoryButtonView']),this['children']['add'](this['submitButtonView']),this['keystrokes']['set']('enter',(_0x140490,_0x42cb68)=>{_0x140490['target']==this['queryView']['fieldView']['element']&&(this['submit'](),_0x42cb68());});}['_createSubmitButton'](){const _0x11f8b6=new _0x26744f(this['locale']),_0x27495f=this['locale'];return _0x11f8b6['set']({'icon':'<svg\x20viewBox=\x220\x200\x2020\x2020\x22\x20xmlns=\x22http://www.w3.org/2000/svg\x22><path\x20d=\x22M15.875\x204.419a.75.75\x200\x200\x200-1.5\x200v7.25H6.818l2.33-1.955a.75.75\x200\x200\x200-.963-1.15l-3.792\x203.182a.75.75\x200\x200\x200-.17.945c.046.11.118.208.21.284l3.788\x203.18a.75.75\x200\x201\x200\x20.965-1.149l-2.19-1.837h7.629c.69\x200\x201.25-.56\x201.25-1.25v-7.5Z\x22/></svg>','label':i(_0x27495f,'Submit'),'isVisible':!0x0,'tooltip':!0x0,'class':'ck-ai-form__submit'}),_0x11f8b6['on']('execute',()=>{this['submit']();}),_0x11f8b6['bind']('isEnabled')['to'](this['queryView']['fieldView'],'isEmpty',this,'isEnabled',(_0x13e7d3,_0x414a32)=>!_0x13e7d3&&_0x414a32),_0x11f8b6;}['_createShowHistoryButton'](){const _0x54c4af=new _0x26744f(this['locale']),_0x513b3a=this['resultsView'],_0x3bf72d=this['locale'];_0x54c4af['set']({'label':i(_0x3bf72d,'History'),'withText':!0x1,'icon':_0x34dcd8['history'],'tooltip':!0x0,'tooltipPosition':'sw','class':'ck-ai-form__toggle-history'}),_0x54c4af['bind']('isOn')['to'](_0x513b3a,'isVisible'),_0x54c4af['bind']('isEnabled')['to'](this,'isEnabled'),_0x54c4af['on']('execute',()=>{_0x513b3a['isVisible']=!_0x513b3a['isVisible'],_0x513b3a['isVisible']?this['filteredView']['focus']():this['focus']();});const _0x3192d2=()=>{_0x44fbe4['window']['requestAnimationFrame'](()=>{if(it(this['element'])){const _0xe403c9=new st(this['queryView']['fieldView']['element']),_0xba8438=_0xe403c9['width'],_0x1487d0='rtl'===_0x3bf72d['uiLanguageDirection']?'left':'right';_0xe403c9['excludeScrollbarsAndBorders'](),_0x54c4af['element']['style'][_0x1487d0]=_0xba8438-_0xe403c9['width']+0x1+'px';}});};return this['queryView']['fieldView']['on']('update',_0x3192d2),this['on']('render',_0x3192d2),_0x54c4af;}['submit'](){const _0x179100=this['queryView']['fieldView']['element']['value'];this['fire']('submit',_0x179100);}['focus'](_0xaf82c8){-0x1===_0xaf82c8?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}}class rs extends lt{['historyGroupView'];['clearHistoryButton'];constructor(_0x51eff5){super(_0x51eff5),this['clearHistoryButton']=this['_createClearHistoryButton'](),this['historyGroupView']=new ut(),this['historyGroupView']['children']['add'](this['clearHistoryButton'],0x1),this['historyGroupView']['label']=i(_0x51eff5,'Prompt\x20history'),this['historyGroupView']['items']['delegate']('execute')['to'](this),this['items']['add'](this['historyGroupView']);}['filter'](){let _0x5a9703=0x0;for(const _0x2b42dd of this['items'])_0x5a9703+=_0x2b42dd['items']['length'];return{'resultsCount':_0x5a9703,'totalItemsCount':_0x5a9703};}['_createClearHistoryButton'](){const _0x9f6242=this['locale'],_0x2f1334=new _0x26744f(this['locale']);return _0x2f1334['set']({'label':'('+i(_0x9f6242,'Clear')+')','withText':!0x0}),_0x2f1334['on']('execute',()=>this['fire']('clearHistory')),_0x2f1334;}}class hs extends _0x1c6099{constructor(_0x23a402){super();const _0x37f677=new te(),_0x122970=new _0x26744f(this['locale'],_0x37f677);this['children']['add'](_0x122970),_0x122970['set']({'label':_0x23a402['prompt'],'withText':!0x0}),_0x122970['on']('execute',()=>{this['fire']('execute',{'value':_0x10eb76(_0x23a402['prompt'])});});}}const cs='CKEditor/AIFormView/PromptHistory';class os extends _0x156319{constructor(){super(),this['_loadFromSessionStorage'](),this['on']('add',(_0x5c022a,_0x1c503b)=>{const _0x510b64=Ss(_0x1c503b['prompt']);for(const _0x504d0b of this)if(_0x504d0b!=_0x1c503b&&Ss(_0x504d0b['prompt'])===_0x510b64){this['remove'](_0x504d0b);break;}this['length']>0x14&&this['remove'](this['last']),this['_saveToSessionStorage']();}),this['on']('remove',()=>{this['_saveToSessionStorage']();});}['_loadFromSessionStorage'](){const _0x3d559a=sessionStorage['getItem'](cs)||'[]';this['addMany'](JSON['parse'](_0x3d559a));}['_saveToSessionStorage'](){sessionStorage['setItem'](cs,JSON['stringify'](this['map'](_0x3fb2c9=>_0x3fb2c9)));}}function Ss(_0x4ff9e2){return _0x4ff9e2['toLowerCase']()['trim']();}class K extends _0x4bbbf1{['focusTracker'];['keystrokes'];['contentArea'];['toolbar'];['promptView'];['errorView'];['_focusables'];['focusCycler'];['_promptHistory'];constructor(_0x81aac4,_0x293e0b,_0x40d0e9=''){super(_0x81aac4),this['set']('isEnabled',!0x0),this['set']('isProcessing',!0x1),this['set']('prompt',''),this['set']('value',''),this['set']('isError',!0x1),this['set']('mainAction',x['REPLACE']),this['_promptHistory']=new os(),this['errorView']=new tt(_0x81aac4),this['contentArea']=new W(_0x81aac4,_0x40d0e9),this['contentArea']['bind']('isProcessing')['to'](this),this['contentArea']['bind']('value')['to'](this),this['toolbar']=this['_createToolbar'](),this['toolbar']['bind']('mainAction')['to'](this),this['promptView']=this['_createPromptView'](),this['focusTracker']=new _0x4342f6(),this['keystrokes']=new ts(),this['_focusables']=this['createCollection']([this['contentArea'],this['contentArea']['copyButtonView'],this['toolbar'],this['promptView']]),this['focusCycler']=new _0xf4ddfd({'focusables':this['_focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift\x20+\x20tab','focusNext':'tab'}}),this['focusCycler']['chain'](this['promptView']['focusCycler']),this['promptView']['queryView']['fieldView']['bind']('value')['to'](this,'prompt');const _0x59a6d0=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form',_0x293e0b],'tabindex':'-1'},'children':[{'tag':'div','attributes':{'class':['ck','ck-ai-form-content']},'children':[{'tag':'div','attributes':{'class':[_0x59a6d0['if']('isError','ck-hidden',_0x3a3b17=>!_0x3a3b17)]},'children':[this['errorView']]},this['contentArea'],this['toolbar'],this['promptView']]}]});}['render'](){super['render'](),this['focusTracker']['add'](this['contentArea']['element']),this['focusTracker']['add'](this['contentArea']['copyButtonView']['element']),this['focusTracker']['add'](this['toolbar']['element']),this['focusTracker']['add'](this['promptView']['element']),this['keystrokes']['listenTo'](this['element']);}['focus'](_0x503dd0=0x1){-0x1===_0x503dd0?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['reset'](){this['prompt']='',this['value']='',this['isError']=!0x1,this['promptView']['reset'](),this['contentArea']['isVisible']=!0x1,this['toolbar']['isVisible']=!0x1;}['_createPromptView'](){const _0x23dcf0=this['locale'],_0x126335=new ht(_0x23dcf0,{'queryView':{'label':i(_0x23dcf0,'Ask\x20AI\x20to\x20edit\x20or\x20generate'),'creator':_0x38444a,'showIcon':!0x1,'showResetButton':!0x1},'infoView':{'text':{'noSearchableItems':{'primary':i(_0x23dcf0,'Empty\x20history'),'secondary':i(_0x23dcf0,'Ask\x20AI\x20and\x20your\x20prompts\x20will\x20be\x20listed\x20here\x20for\x20you\x20to\x20use\x20later.')}}},'filteredView':this['_createHistoryView'](),'queryMinChars':0x1/0x0,'resetOnBlur':!0x1});return _0x126335['bind']('isEnabled')['to'](this,'isEnabled',this,'isProcessing',(_0x459ab2,_0x21df4a)=>_0x459ab2&&!_0x21df4a),this['listenTo'](_0x126335,'submit',(_0x448f66,_0x4b0791)=>{this['prompt']=_0x4b0791;const _0xdc95eb=_0x511333(_0x4b0791);this['fire']('submitPrompt',_0xdc95eb),_0x4b0791['trim']()&&this['_promptHistory']['add']({'prompt':_0xdc95eb},0x0);},{'priority':'high'}),_0x126335;}['_createHistoryView'](){const _0x4e2ddd=new rs(this['locale']);return _0x4e2ddd['historyGroupView']['items']['bindTo'](this['_promptHistory'])['as'](hs),_0x4e2ddd['on']('clearHistory',()=>{this['_promptHistory']['clear'](),this['promptView']['search'](''),this['promptView']['focus']();}),_0x4e2ddd;}['_createToolbar'](){const _0x2bee9c=new nt(this['locale']);return _0x2bee9c['replaceButton']['bind']('isEnabled')['to'](this,'isEnabled',this,'isProcessing',this,'value',(_0x2c4b45,_0x24f9ad,_0x5e66a8)=>_0x2c4b45&&!_0x24f9ad&&!!_0x5e66a8),_0x2bee9c['replaceButton']['delegate']('execute')['to'](this,'replaceContent'),_0x2bee9c['insertButton']['bind']('isEnabled')['to'](this,'isEnabled',this,'isProcessing',this,'value',(_0x4780f3,_0x375d64,_0x1dda9d)=>_0x4780f3&&!_0x375d64&&!!_0x1dda9d),_0x2bee9c['insertButton']['delegate']('execute')['to'](this,'insertContentBelow'),_0x2bee9c['tryAgainButton']['bind']('isEnabled')['to'](this,'isEnabled',this,'isProcessing',(_0x10ca79,_0x5206a1)=>_0x10ca79&&!_0x5206a1),_0x2bee9c['tryAgainButton']['delegate']('execute')['to'](this,'tryAgainEvent'),_0x2bee9c['stopButton']['bind']('isEnabled')['to'](this,'isProcessing'),_0x2bee9c['stopButton']['delegate']('execute')['to'](this,'stopProcessing'),_0x2bee9c;}['startProcessing'](){this['value']='',this['isError']=!0x1,this['isProcessing']=!0x0,this['contentArea']['isVisible']=!0x0,this['toolbar']['isVisible']=!0x0,this['contentArea']['focus']();}['finishProcessing'](){const _0x59f24d=this['locale'];this['isProcessing']=!0x1,this['prompt']='',this['promptView']['reset'](),this['value']&&(this['promptView']['queryView']['label']=i(_0x59f24d,'Ask\x20AI\x20to\x20improve\x20generated\x20text'));}['handleError'](_0x495cf9){const _0x257ada=this['locale'];this['finishProcessing'](),this['isError']=!0x0,this['errorView']['text']=_0x495cf9||i(_0x257ada,'AI_ERROR_FAILED'),this['value']||(this['contentArea']['isVisible']=!0x1);}}var E='<svg\x20viewBox=\x220\x200\x2020\x2020\x22\x20xmlns=\x22http://www.w3.org/2000/svg\x22><path\x20d=\x22M15.346\x209.422a.151.151\x200\x200\x201\x20.284\x200l.548\x201.484a.152.152\x200\x200\x200\x20.09.089l1.483.549a.151.151\x200\x200\x201\x200\x20.284l-1.483.548a.151.151\x200\x200\x200-.09.09l-.548\x201.483a.152.152\x200\x200\x201-.142.1.151.151\x200\x200\x201-.142-.1l-.549-1.483a.15.15\x200\x200\x200-.09-.09l-1.483-.548a.15.15\x200\x200\x201\x200-.284l1.484-.549a.152.152\x200\x200\x200\x20.089-.09l.549-1.483Z\x22/><path\x20d=\x22M16.306\x201.742a.151.151\x200\x200\x201\x20.284\x200l.549\x201.483a.15.15\x200\x200\x200\x20.089.09l1.483.548a.151.151\x200\x200\x201\x20.072.229.151.151\x200\x200\x201-.072.055l-1.483.549a.15.15\x200\x200\x200-.09.09l-.548\x201.482a.151.151\x200\x200\x201-.284\x200l-.549-1.483a.15.15\x200\x200\x200-.09-.09l-1.483-.548a.151.151\x200\x200\x201\x200-.284l1.484-.549a.152.152\x200\x200\x200\x20.09-.089l.548-1.483Z\x22/><path\x20d=\x22M7.665\x201.742a.151.151\x200\x200\x201\x20.284\x200l.549\x201.483a.151.151\x200\x200\x200\x20.09.09l1.482.548a.151.151\x200\x200\x201\x20.072.229.151.151\x200\x200\x201-.072.055l-1.483.549a.151.151\x200\x200\x200-.09.09L7.95\x206.267a.151.151\x200\x200\x201-.284\x200l-.549-1.483a.151.151\x200\x200\x200-.089-.09l-1.483-.548a.151.151\x200\x200\x201\x200-.284l1.483-.549a.151.151\x200\x200\x200\x20.09-.089l.548-1.483-.001.001Z\x22/><path\x20d=\x22M14.72\x207.946a.848.848\x200\x200\x200\x20.25-.591.824.824\x200\x200\x200-.241-.588l-1.943-1.938a.812.812\x200\x200\x200-.588-.241.838.838\x200\x200\x200-.591.25l-1.545\x201.539\x203.115\x203.115\x201.542-1.546h.001Z\x22/><path\x20clip-rule=\x22evenodd\x22\x20d=\x22M1.19\x2015.636a.96.96\x200\x200\x201\x20.281-.679l7.835-7.834\x203.121\x203.12-7.834\x207.835a.959.959\x200\x200\x201-1.358\x200l-1.764-1.764a.96.96\x200\x200\x201-.28-.678Zm9.22-5.391-1.121-1.12-6.479\x206.478\x201.121\x201.121\x206.479-6.479Z\x22/></svg>';const j=globalThis['DataTransfer'];class n extends _0x342f10{['licenseKey'];['_licenseKeyCheckInterval'];['_dialog'];['_formView'];['_aiAdapter'];['_aiAssistantController'];['_uiCssClasses']='';static get['pluginName'](){return'AIAssistantUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[_0x364653,a,v,_0x2e83d8];}constructor(_0x39b6af){super(_0x39b6af),_0x39b6af['config']['define']('ai.aiAssistant.disabledElements',['media','rawHtml','tableOfContents']),_0x39b6af['config']['define']('ai.aiAssistant.contentAreaCssClass',''),_0x39b6af['config']['define']('ai.useTheme',!0x0),this['_uiCssClasses']='ck-ai-assistant-ui'+(_0x39b6af['config']['get']('ai.useTheme')?'\x20ck-ai-assistant-ui_theme':'');}['init'](){const {editor:_0x2d78eb}=this;this['_aiAdapter']=_0x2d78eb['plugins']['get'](v),this['_dialog']=_0x2d78eb['plugins']['get'](_0x2e83d8),this['_formView']=null,this['_commandDefinitions']=this['_getResolvedCommandsDefinitions']();const _0xe254df=new y(_0x2d78eb,Array['from'](this['_commandDefinitions']['values']()));_0x2d78eb['commands']['add']('showAIAssistant',_0xe254df),_0x2d78eb['ui']['componentFactory']['add']('aiCommands',_0x5e7246=>{const _0x41b9c6=_0x2a52c9(_0x5e7246);return _0x41b9c6['set']({'class':'ck-ai-commands-dropdown\x20'+this['_uiCssClasses']}),_0x41b9c6['buttonView']['set']({'label':i(_0x5e7246,'AI\x20Commands'),'icon':E,'tooltip':!0x0}),_0x41b9c6['on']('execute',_0x1ff71a=>this['_onExecute'](_0x1ff71a['source']['id'])),_0x1094a5(_0x41b9c6,_0x2d78eb['ui']['view']['body'],function(_0xcda133){const _0x5198fe=o(_0xcda133['config']['get']('ai.aiAssistant.commands'),_0xcda133['locale']),_0x35a61d=B(_0xcda133,_0x5198fe)['filter'](_0x215003=>_0x215003['commands']['length']);if(0x1===_0x35a61d['length'])return B(_0xcda133,_0x35a61d[0x0]['commands'])['map'](_0x4c4abe=>({'id':_0x4c4abe['id'],'label':_0x4c4abe['label']}));return _0x35a61d['map'](_0x18db4e=>{const {groupId:_0x4f7212,groupLabel:_0x2eb759,commands:_0x384106}=_0x18db4e,_0x905040=B(_0xcda133,_0x384106)['map'](_0x1fd619=>({'id':_0x1fd619['id'],'label':_0x1fd619['label']}));return{'id':_0x4f7212,'menu':_0x2eb759||_0x4f7212,'children':_0x905040};});}(_0x2d78eb),{'ariaLabel':i(_0x5e7246,'AI\x20Commands')}),_0x41b9c6['menuView']['menuPanelClass']='ck-ai-commands-dropdown\x20'+this['_uiCssClasses'],_0xe254df['on']('change:enabledCommandsIds',_0x292936),_0x41b9c6['menuView']['once']('render',_0x292936),_0x41b9c6;function _0x292936(){_0x41b9c6['isEnabled']=_0xe254df['enabledCommandsIds']['length']>0x0;for(const _0x277484 of _0x41b9c6['menuView']['buttons'])_0x277484['isEnabled']=_0xe254df['enabledCommandsIds']['includes'](_0x277484['id']);}}),_0x2d78eb['ui']['componentFactory']['add']('menuBar:aiCommands',_0x38a6ed=>{const _0x4d82f9=new _0x5363d5(_0x38a6ed);_0x4d82f9['buttonView']['set']({'label':i(_0x38a6ed,'AI\x20Commands'),'icon':E}),_0x4d82f9['bind']('isEnabled')['to'](_0xe254df,'enabledCommandsIds',_0x555c69=>_0x555c69['length']>0x0);const _0x213e6=o(_0x2d78eb['config']['get']('ai.aiAssistant.commands'),_0x38a6ed);return this['_populateMenuBarMenu'](_0xe254df,_0x4d82f9,_0x213e6,_0x11459c=>this['_onExecute'](_0x11459c)),_0x4d82f9;}),_0x2d78eb['ui']['componentFactory']['add']('aiAssistant',()=>{const _0x7285b4=this['_createAIAssistantUIButton'](_0x26744f);return _0x7285b4['set']({'tooltip':!0x0,'class':'ck-ai-assistant-button\x20'+this['_uiCssClasses']}),_0x7285b4;}),_0x2d78eb['ui']['componentFactory']['add']('menuBar:aiAssistant',()=>{const _0x1b8162=this['_createAIAssistantUIButton'](_0x4a2aab);return _0x1b8162['set']({'role':'menuitemcheckbox'}),_0x1b8162;}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x2544b1=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x17baab;for(const _0x509946 in _0x2544b1){const _0x30562a=_0x509946,_0x2cd3d8=_0x2544b1[_0x30562a];if('aiLicenseKeyValid'==_0x2cd3d8||'aiLicenseKeyInvalid'==_0x2cd3d8||'aiLicenseKeyExpired'==_0x2cd3d8||'aiLicenseKeyDomainLimit'==_0x2cd3d8||'aiLicenseKeyNotAllowed'==_0x2cd3d8||'aiLicenseKeyEvaluationLimit'==_0x2cd3d8||'aiLicenseKeyTrialLimit'==_0x2cd3d8||'aiLicenseKeyDevelopmentLimit'==_0x2cd3d8||'aiLicenseKeyUsageLimit'==_0x2cd3d8){delete _0x2544b1[_0x30562a],_0x17baab=_0x2cd3d8,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'aiLicenseKeyInvalid'==_0x17baab&&_0x2544b1['_showLicenseError']('invalid'),'aiLicenseKeyExpired'==_0x17baab&&_0x2544b1['_showLicenseError']('expired'),'aiLicenseKeyDomainLimit'==_0x17baab&&_0x2544b1['_showLicenseError']('domainLimit'),'aiLicenseKeyNotAllowed'==_0x17baab&&_0x2544b1['_showLicenseError']('featureNotAllowed','AIAssistant'),'aiLicenseKeyEvaluationLimit'==_0x17baab&&_0x2544b1['_showLicenseError']('evaluationLimit'),'aiLicenseKeyTrialLimit'==_0x17baab&&_0x2544b1['_showLicenseError']('trialLimit'),'aiLicenseKeyDevelopmentLimit'==_0x17baab&&_0x2544b1['_showLicenseError']('developmentLimit'),'aiLicenseKeyUsageLimit'==_0x17baab&&_0x2544b1['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['showUI'](_0x189e64='',_0x4b69ca='',_0x1fb223='custom'){const _0xcd6178=this['editor'],_0x476b32=_0xcd6178['editing']['view'],_0x371bfb=_0xcd6178['plugins']['get'](a),_0x1d583b=_0xcd6178['plugins']['get'](_0x364653);_0x371bfb['showFakeVisualSelection']();const _0x374bf9=new j(),_0xae55fe=new ClipboardEvent('copy',{'clipboardData':_0x374bf9}),_0x35356e=new _0xa2663e(_0x374bf9),_0x4ef87f=new _0x1e7c12(_0x476b32,_0xae55fe,{'dataTransfer':_0x35356e});_0x1d583b['_forceMarkersCopy']('comment',()=>{_0x476b32['document']['fire']('copy',_0x4ef87f);}),this['_formView']||(this['_initView'](),this['_aiAssistantController']=new C(_0xcd6178,this['_aiAdapter']['textAdapter'],this['_formView']));let _0x3fe103=_0x35356e['getData']('text/html');const _0x7aca79=_0xcd6178['model']['document']['selection'],_0x18424b=Array['from'](_0x7aca79['getRanges']());0x1===_0x18424b['length']&&_0x18424b[0x0]['isFlat']&&!_0x7aca79['getSelectedElement']()&&''!==_0x3fe103['replace'](/&nbsp;/g,'')['trim']()&&(_0x3fe103='<p>'+_0x3fe103+'</p>'),this['_aiAssistantController']['updateView']({'actionId':_0x1fb223,'query':_0x189e64,'htmlContent':_0x3fe103,'label':_0x4b69ca,'mainActionLabel':x[_0xcd6178['model']['document']['selection']['isCollapsed']?'INSERT':'REPLACE']}),'aiAssistant'!==this['_dialog']['id']?this['_dialog']['show']({'id':'aiAssistant','icon':at['robotPencil'],'title':i(this['editor']['locale'],'AI\x20Assistant'),'content':this['_formView'],'position':_0x2949f9['EDITOR_TOP_SIDE'],'onShow':()=>{this['_formView']['focus']();},'onHide':()=>{this['_aiAssistantController']['reset'](),_0x371bfb['hideFakeVisualSelection']();}}):this['_dialog']['view']['wasMoved']||this['_dialog']['view']['updatePosition']();}['hideUI'](){this['_dialog']['hide']();}['_getResolvedCommandsDefinitions'](){const _0x1290d9=new Map(),_0x475b25=o(this['editor']['config']['get']('ai.aiAssistant.commands'),this['editor']['locale']);for(const _0x8f62cc of _0x475b25)for(const _0x1540a0 of _0x8f62cc['commands'])_0x1290d9['set'](_0x1540a0['id'],{..._0x1540a0,'groupId':_0x8f62cc['groupId'],'groupLabel':_0x8f62cc['groupLabel']||_0x8f62cc['groupId']});return _0x1290d9;}['_createAIAssistantUIButton'](_0xff5b6){const _0x6fc451=this['editor'],_0x500399=_0x6fc451['commands']['get']('showAIAssistant'),_0x214fdf=new _0xff5b6(_0x6fc451['locale']);return _0x214fdf['set']({'label':i(_0x6fc451['locale'],'AI\x20Assistant'),'icon':at['robotPencil'],'isToggleable':!0x0}),_0x214fdf['bind']('isEnabled')['to'](_0x500399),_0x214fdf['bind']('isOn')['to'](this['_dialog'],'id',_0x163060=>'aiAssistant'===_0x163060),this['listenTo'](_0x214fdf,'execute',()=>{_0x214fdf['isOn']?this['hideUI']():_0x500399['execute']();}),_0x214fdf;}['_initView'](){const _0x307bf3=this['editor']['plugins']['get'](a);this['_formView']=new K(this['editor']['locale'],this['_uiCssClasses'],this['editor']['config']['get']('ai.aiAssistant.contentAreaCssClass')),this['_formView']['on']('change:value',()=>{this['_dialog']['view']['wasMoved']||this['_dialog']['view']['updatePosition']();}),this['_formView']['promptView']['queryView']['fieldView']['on']('update',()=>{this['_dialog']['view']['wasMoved']||this['_dialog']['view']['updatePosition']();}),this['listenTo'](this['_formView'],'replaceContent',()=>{_0x307bf3['insertContent'](this['_aiAssistantController']['currentContext']),this['hideUI']();}),this['listenTo'](this['_formView'],'insertContentBelow',()=>{_0x307bf3['insertContentBelow'](this['_aiAssistantController']['currentContext']),this['hideUI']();}),this['_initAriaAiStatusChangeAnnouncements']();}['_initAriaAiStatusChangeAnnouncements'](){const {locale:_0x34538d,ui:{ariaLiveAnnouncer:_0x15d935}}=this['editor'];this['_formView']['contentArea']['on']('change:isProcessing',(_0x3fe37a,_0xd0db62,_0x4918ae)=>{const _0x1c87e2=this['_aiAssistantController']['currentContext'];_0x4918ae?_0x15d935['announce'](i(_0x34538d,'AI\x20is\x20writing')):_0x1c87e2&&_0x15d935['announce'](i(_0x34538d,'Generated\x20content:\x20%0',_0x1c87e2),{'politeness':'polite','isUnsafeHTML':!0x0});}),this['_formView']['on']('change:isError',(_0x3a2044,_0x17f9de,_0x57c478)=>{if(_0x57c478){const _0x2a30c7=this['_formView']['errorView']['text'];_0x15d935['announce'](i(_0x34538d,'Error\x20during\x20AI\x20content\x20generation:\x20%0',_0x2a30c7));}});}['_onExecute'](_0x408416){const _0x3d9ea4=this['_commandDefinitions']['get'](_0x408416),_0x41af54=this['editor'],_0xed951e=_0x41af54['model']['document']['selection'],_0x7e94ef=_0x41af54['commands']['get']('showAIAssistant'),_0x4e0b0e=_0x41af54['plugins']['get'](a),_0x143a0d=''+(_0x3d9ea4['groupId']!==I?_0x3d9ea4['groupLabel']+':\x20':'')+_0x3d9ea4['label'];if(!0x1!==_0x3d9ea4['requiresContent']&&_0xed951e['isCollapsed']){const _0x544807=_0x3c5682(_0xed951e['getSelectedBlocks']())||_0x41af54['model']['schema']['getLimitElement'](_0xed951e);_0x41af54['model']['change'](_0x113db3=>{_0x113db3['setSelection'](_0x544807,'in');});}_0x4e0b0e['showFakeVisualSelection'](),_0x7e94ef['execute'](_0x3d9ea4['prompt'],_0x143a0d,'command:'+_0x408416);}['_populateMenuBarMenu'](_0x131f2b,_0xaf5402,_0x5990ce,_0x174d81){const _0x4b6608=this['editor'],_0x1e7a80=_0x4b6608['locale'],_0x54b5ce=new _0x7f3b4a(_0x1e7a80),_0x3c7c8f=B(_0x4b6608,_0x5990ce)['filter'](_0x25c45a=>_0x25c45a['commands']['length']);0x1===_0x3c7c8f['length']?this['_getMenuBarGroupButtons']({'command':_0x131f2b,'commands':_0x3c7c8f[0x0]['commands'],'parentMenuView':_0xaf5402,'onExecute':_0x174d81})['forEach'](_0x539636=>_0x54b5ce['items']['add'](_0x539636)):_0x3c7c8f['forEach'](({groupId:_0x54e1bb,groupLabel:_0x409a8d,commands:_0x37ad2a})=>{const _0x1e8351=new _0x48b172(_0x1e7a80,_0xaf5402),_0x59ccdc=new _0x5363d5(_0x1e7a80),_0x24406d=new _0x7f3b4a(_0x1e7a80),_0x22643b=this['_getMenuBarGroupButtons']({'command':_0x131f2b,'commands':_0x37ad2a,'parentMenuView':_0x59ccdc,'onExecute':_0x174d81});_0x59ccdc['buttonView']['set']({'label':_0x409a8d||_0x54e1bb}),_0x59ccdc['delegate']('execute')['to'](_0xaf5402),_0x24406d['items']['addMany'](_0x22643b),_0x59ccdc['panelView']['children']['add'](_0x24406d),_0x1e8351['children']['add'](_0x59ccdc),_0x54b5ce['items']['add'](_0x1e8351);}),_0xaf5402['panelView']['children']['add'](_0x54b5ce);}['_getMenuBarGroupButtons']({command:_0x25796a,commands:_0x43dc36,parentMenuView:_0x50ea1c,onExecute:_0x38a5e0}){const _0xdd5a25=this['editor'],_0x4b4243=_0xdd5a25['locale'];return B(_0xdd5a25,_0x43dc36)['map'](_0x5a2dd9=>{const _0x248d3b=new _0x48b172(_0x4b4243,_0x50ea1c),_0x1221f6=new _0x4a2aab(_0x4b4243);return _0x1221f6['set']({'label':_0x5a2dd9['label']}),_0x1221f6['delegate']('execute')['to'](_0x50ea1c),_0x1221f6['on']('execute',()=>_0x38a5e0(_0x5a2dd9['id'])),_0x1221f6['bind']('isEnabled')['to'](_0x25796a,'enabledCommandsIds',_0x286503=>_0x286503['includes'](_0x5a2dd9['id'])),_0x248d3b['children']['add'](_0x1221f6),_0x248d3b;});}}function _(_0x3a0186,_0x54bb49){return void 0x0!==_0x3a0186['order']&&void 0x0===_0x54bb49['order']?0x1:void 0x0===_0x3a0186['order']&&void 0x0!==_0x54bb49['order']?-0x1:void 0x0!==_0x3a0186['order']&&void 0x0!==_0x54bb49['order']?_0x3a0186['order']-_0x54bb49['order']:0x0;}function B(_0x13f94a,_0x1f30ee){_0x1f30ee['sort'](_);const _0x112b05={},_0x4a4ddf=[];for(const _0x5cdc38 of _0x1f30ee)if(void 0x0!==_0x5cdc38['order']){if(_0x5cdc38['order']in _0x112b05)throw new _0x9efd4a('ai-commands-config-order-collision',_0x13f94a,{'conflictingDefinitions':[_0x5cdc38,_0x112b05[_0x5cdc38['order']]]});_0x112b05[_0x5cdc38['order']]=_0x5cdc38,_0x4a4ddf['splice'](_0x5cdc38['order'],0x0,_0x5cdc38);}else _0x4a4ddf['push'](_0x5cdc38);return _0x4a4ddf;}class r extends _0x342f10{static get['requires'](){return[n,a];}static get['pluginName'](){return'AIAssistant';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1c286e){super(_0x1c286e);const _0x5f1362=_0x1c286e['config'],_0x1f674c=_0x1c286e['locale'];_0x5f1362['define']('ai.aiAssistant.commands',function(_0x1982b5){return[{'groupId':'editOrReview','groupLabel':i(_0x1982b5,'Edit\x20or\x20review'),'commands':[{'id':'improveWriting','label':i(_0x1982b5,'Improve\x20writing'),'prompt':'Fix\x20spelling\x20mistakes,\x20use\x20proper\x20grammar\x20and\x20apply\x20good\x20writing\x20practices.\x20Do\x20not\x20lose\x20the\x20original\x20meaning.'},{'id':'makeShorter','label':i(_0x1982b5,'Make\x20shorter'),'prompt':'Remove\x20any\x20repetitive,\x20redundant,\x20or\x20non-essential\x20writing\x20in\x20this\x20content\x20without\x20changing\x20the\x20meaning\x20or\x20losing\x20any\x20key\x20information.'},{'id':'makeLonger','label':i(_0x1982b5,'Make\x20longer'),'prompt':'Improve\x20this\x20content\x20by\x20using\x20descriptive\x20language\x20and\x20inserting\x20more\x20information\x20and\x20more\x20detailed\x20explanations.'},{'id':'simplifyLanguage','label':i(_0x1982b5,'Simplify\x20language'),'prompt':'Simplify\x20the\x20writing\x20style\x20of\x20this\x20content\x20and\x20reduce\x20the\x20complexity,\x20so\x20that\x20the\x20content\x20is\x20easy\x20to\x20understand.'}]},{'groupId':'generate','groupLabel':i(_0x1982b5,'Generate\x20from\x20selection'),'commands':[{'id':'summarize','label':i(_0x1982b5,'Summarize'),'prompt':'Summarize\x20this\x20content\x20into\x20one\x20paragraph\x20of\x20text.\x20Include\x20only\x20the\x20key\x20ideas\x20and\x20conclusions.\x20Keep\x20it\x20short.\x20Do\x20not\x20keep\x20original\x20text\x20formatting.'},{'id':'continue','label':i(_0x1982b5,'Continue'),'prompt':'Start\x20with\x20the\x20provided\x20content\x20and\x20write\x20at\x20the\x20end\x20of\x20it\x20continuing\x20this\x20topic.\x20Keep\x20the\x20added\x20part\x20short.'}]},{'groupId':'changeTone','groupLabel':i(_0x1982b5,'Change\x20tone'),'commands':[{'id':'professional','label':i(_0x1982b5,'Professional'),'prompt':'Improve\x20using\x20polished,\x20formal,\x20and\x20respectful\x20language\x20to\x20convey\x20professional\x20expertise\x20and\x20competence.'},{'id':'casual','label':i(_0x1982b5,'Casual'),'prompt':'Improve\x20using\x20casual,\x20informal\x20language\x20to\x20convey\x20a\x20casual\x20conversation\x20with\x20a\x20real\x20person.'},{'id':'direct','label':i(_0x1982b5,'Direct'),'prompt':'Improve\x20using\x20direct\x20language,\x20using\x20only\x20the\x20essential\x20information.'},{'id':'confident','label':i(_0x1982b5,'Confident'),'prompt':'Improve\x20using\x20compelling,\x20optimistic\x20language\x20to\x20convey\x20confidence\x20in\x20the\x20writing.'},{'id':'friendly','label':i(_0x1982b5,'Friendly'),'prompt':'Improve\x20using\x20friendly,\x20comforting\x20language,\x20to\x20convey\x20understanding\x20and\x20empathy.'}]},{'groupId':'changeStyle','groupLabel':i(_0x1982b5,'Change\x20style'),'commands':[{'id':'business','label':i(_0x1982b5,'Business'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20business\x20professional\x20with\x20formal\x20language.'},{'id':'legal','label':i(_0x1982b5,'Legal'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20legal\x20professional\x20using\x20valid\x20legal\x20terminology.'},{'id':'journalism','label':i(_0x1982b5,'Journalism'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20journalist\x20using\x20engaging\x20language\x20to\x20convey\x20the\x20importance\x20of\x20the\x20information.'},{'id':'poetic','label':i(_0x1982b5,'Poetic'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20poem\x20using\x20poetic\x20techniques\x20without\x20losing\x20the\x20original\x20meaning.'}]},{'groupId':'translate','groupLabel':i(_0x1982b5,'Translate'),'commands':[{'id':'translateEnglish','label':i(_0x1982b5,'English'),'prompt':'Translate\x20the\x20content\x20to\x20English\x20language.'},{'id':'translateSpanish','label':i(_0x1982b5,'Spanish'),'prompt':'Translate\x20the\x20content\x20to\x20Spanish\x20language.'},{'id':'translatePortuguese','label':i(_0x1982b5,'Portuguese'),'prompt':'Translate\x20the\x20content\x20to\x20Portuguese\x20language.'},{'id':'translateGerman','label':i(_0x1982b5,'German'),'prompt':'Translate\x20the\x20content\x20to\x20German\x20language.'},{'id':'translateFrench','label':i(_0x1982b5,'French'),'prompt':'Translate\x20the\x20content\x20to\x20French\x20language.'},{'id':'translateChinese','label':i(_0x1982b5,'Simplified\x20Chinese'),'prompt':'Translate\x20the\x20content\x20to\x20Simplified\x20Chinese\x20language.'},{'id':'translateHindi','label':i(_0x1982b5,'Hindi'),'prompt':'Translate\x20the\x20content\x20to\x20Hindi\x20language.'},{'id':'translateArabic','label':i(_0x1982b5,'Arabic'),'prompt':'Translate\x20the\x20content\x20to\x20Arabic\x20language.'}]}];}(_0x1f674c)),_0x5f1362['define']('ai.aiAssistant.extraCommandGroups',[]),_0x5f1362['define']('ai.aiAssistant.removeCommands',[]);const _0x26bcf2=o(_0x5f1362['get']('ai.aiAssistant.commands'),_0x1f674c),_0x4078ef=_0x5f1362['get']('ai.aiAssistant.extraCommandGroups'),_0x493b7c=_0x5f1362['get']('ai.aiAssistant.removeCommands');_0x4078ef['forEach'](_0xc9de77=>{const _0x59676f=_0x26bcf2['find'](_0x4a33d5=>_0x4a33d5['groupId']===_0xc9de77['groupId']);_0x59676f?_0x59676f['commands']=_0x59676f['commands']['concat'](_0xc9de77['commands']):_0x26bcf2['push'](_0xc9de77);}),_0x26bcf2['forEach'](_0x323b57=>{_0x323b57['commands']=_0x323b57['commands']['filter'](_0x558b7d=>!_0x493b7c['includes'](_0x558b7d['id']));}),_0x5f1362['set']('ai.aiAssistant.commands',_0x26bcf2);}}class P extends _0x342f10{['abortController'];static get['requires'](){return[v];}constructor(_0x5ec4e2){super(_0x5ec4e2),this['abortController']=new AbortController();}['init'](){this['editor']['plugins']['get'](v)['textAdapter']=this;}['abort'](){this['abortController']['signal']['aborted']||(this['abortController']['abort'](),this['abortController']=new AbortController());}async['makeRequest'](_0x38d16f){return this['sendRequest'](_0x38d16f)['catch'](_0x41eaf8=>{if(_0x41eaf8 instanceof R)return Promise['reject'](_0x41eaf8);if('AbortError'==_0x41eaf8['name'])return Promise['resolve']();throw console['error'](_0x41eaf8),new _0x9efd4a('aitextadapter-send-request-failed',null);});}async['_prepareRequestHeaders'](_0x2536e5,_0x3c2012){const _0xac5772=this['editor']['locale'],_0x105239={'Content-Type':'application/json'};if('object'==typeof _0x2536e5)Object['assign'](_0x105239,_0x2536e5);else{if(_0x2536e5)try{const _0x3db5b0=await _0x2536e5(_0x3c2012);Object['assign'](_0x105239,_0x3db5b0);}catch(_0x3df4c1){return Promise['reject'](new R(i(_0xac5772,'AI_ERROR_GET_HEADERS')));}}return _0x105239;}async['_prepareRequestParameters'](_0x3fd0ff,_0x79d74a){const _0x2a5581=this['editor']['locale'];if('object'==typeof _0x3fd0ff)return _0x3fd0ff;try{return await _0x3fd0ff(_0x79d74a);}catch(_0x38a1a7){return Promise['reject'](new R(i(_0x2a5581,'AI_ERROR_GET_PARAMETERS')));}}}class H extends P{['_apiUrl'];['_requestHeaders'];['_requestParameters'];static get['pluginName'](){return'OpenAITextAdapter';}constructor(_0x473956){super(_0x473956),_0x473956['config']['define']('ai.openAI.apiUrl','https://api.openai.com/v1/chat/completions'),_0x473956['config']['get']('ai.openAI.requestParameters')||_0x473956['config']['define']('ai.openAI.requestParameters',{'model':'gpt-3.5-turbo','max_tokens':0x7d0,'temperature':0x1,'top_p':0x1,'stream':!0x0}),this['_apiUrl']=_0x473956['config']['get']('ai.openAI.apiUrl'),this['_requestHeaders']=_0x473956['config']['get']('ai.openAI.requestHeaders')||{},this['_requestParameters']=_0x473956['config']['get']('ai.openAI.requestParameters');}async['sendRequest']({query:_0x309bf0,context:_0x581ced,onData:_0x5098d5,actionId:_0x1f58e5}){const _0x2b8af2=this['editor']['locale'],_0x2210cd=await this['prepareMessages'](_0x309bf0,_0x581ced,_0x1f58e5),_0x58b10e=await this['_prepareRequestHeaders'](this['_requestHeaders'],_0x1f58e5),_0x3452d4=await this['_prepareRequestParameters'](this['_requestParameters'],_0x1f58e5),_0x8bf95c={'messages':_0x2210cd,..._0x3452d4},_0x3316f5={'method':'POST','headers':_0x58b10e,'body':JSON['stringify'](_0x8bf95c),'signal':this['abortController']['signal']},_0x2176a3=await fetch(this['_apiUrl'],_0x3316f5);if(_0x2176a3['ok'])return _0x3452d4['stream']?await this['_readStreamableResponse'](_0x2176a3,_0x5098d5):await this['_readStaticResponse'](_0x2176a3,_0x5098d5),Promise['resolve']();{const _0x421e32=await _0x2176a3['text']();return _0x421e32['includes']('context_length_exceeded')?Promise['reject'](new R(i(_0x2b8af2,'AI_ERROR_CONTEXT_LENGTH'))):_0x421e32['includes']('Moderation')?Promise['reject'](new R(i(_0x2b8af2,'AI_ERROR_MODERATION'))):Promise['reject'](new Error(_0x421e32));}}async['prepareMessages'](_0x55a9e3,_0x34343d,_0x1fd49e){let _0x3d2c54,_0x23aa6a;return _0x34343d?(_0x3d2c54='Your\x20task\x20is\x20to\x20execute\x20the\x20instruction\x20using\x20the\x20provided\x20HTML\x20content.\x20Follow\x20the\x20instruction\x20closely.\x20Your\x20answer\x20must\x20be\x20a\x20properly\x20formatted\x20HTML\x20code.\x20Do\x20not\x20add\x20any\x20additional\x20remarks\x20or\x20notes.\x20Do\x20not\x20act\x20like\x20a\x20chatbot\x20or\x20a\x20real\x20person.',_0x23aa6a='Instruction:\x0a'+_0x55a9e3+'\x0aYou\x20must\x20keep\x20the\x20text\x20formatting.\x0a\x0aContent:\x0a'+_0x34343d):(_0x3d2c54='Your\x20task\x20is\x20to\x20generate\x20HTML\x20content\x20accordingly\x20to\x20the\x20given\x20instruction.\x20Never\x20include\x20<img>\x20tag\x20in\x20your\x20response\x20even\x20if\x20asked\x20for.\x20Your\x20answer\x20must\x20be\x20a\x20well-structured\x20and\x20properly\x20formatted\x20HTML\x20code.\x20Answer\x20only\x20with\x20the\x20generated\x20HTML\x20content.\x20Do\x20not\x20add\x20any\x20additional\x20remarks\x20or\x20notes.\x20Do\x20not\x20act\x20like\x20a\x20chatbot\x20or\x20a\x20real\x20person.',_0x23aa6a=_0x55a9e3),[{'role':'system','content':_0x3d2c54},{'role':'user','content':_0x23aa6a}];}async['_readStreamableResponse'](_0x5dad2b,_0x404ccf){const _0x4bbe56=_0x5dad2b['body']['getReader'](),_0x224353=new TextDecoder();let _0x1972f8='',_0x4e59d8='',_0x3c3649='',_0x3ed7ca=!0x1;for(;!_0x3ed7ca;){const {done:_0x33c595,value:_0x4a44ee}=await _0x4bbe56['read'](),_0x1e215d=_0x1972f8+_0x224353['decode'](_0x4a44ee);let _0x7e885c='';_0x3ed7ca=_0x33c595;try{_0x7e885c=this['_cleanUpData'](_0x1e215d),_0x1972f8='';}catch(_0x1c2136){_0x1972f8=_0x1e215d;continue;}_0x4e59d8+=_0x7e885c,!_0x3ed7ca&&this['_isBufferIncomplete'](_0x4e59d8)||_0x4e59d8&&(_0x3c3649+=_0x4e59d8,_0x4e59d8='',_0x404ccf(_0x3c3649));}return Promise['resolve']();}async['_readStaticResponse'](_0x38c1fa,_0x300372){return _0x300372((await _0x38c1fa['json']())['choices'][0x0]['message']['content']),Promise['resolve']();}['_isBufferIncomplete'](_0x502578){const _0x8c30fd=_0x502578['split']('<')['length']!==_0x502578['split']('>')['length'],_0x4d2301=_0x502578['length']<0x1e;return _0x8c30fd&&_0x4d2301;}['_cleanUpData'](_0x4bef46){return _0x4bef46['split'](/\n(?![^{]*\})/g)['map'](_0x480fcd=>_0x480fcd['replace']('data:\x20',''))['filter'](_0x3dd7ad=>_0x3dd7ad&&_0x3dd7ad['length']>0x0&&'[DONE]'!==_0x3dd7ad)['map'](_0x2c786a=>{const {choices:_0x1bcb8e}=JSON['parse'](_0x2c786a);if(_0x1bcb8e[0x0]&&_0x1bcb8e[0x0]['delta']&&_0x1bcb8e[0x0]['delta']['content'])return _0x1bcb8e[0x0]['delta']['content'];})['filter'](_0x2de87b=>_0x2de87b)['join']('');}}class O extends P{['_apiUrl'];['_requestHeaders'];['_bedrockClientConfig'];['_requestParameters'];static get['pluginName'](){return'AWSTextAdapter';}constructor(_0x43ed91){super(_0x43ed91),_0x43ed91['config']['get']('ai.aws.requestParameters')||_0x43ed91['config']['define']('ai.aws.requestParameters',{'model':'anthropic.claude-v2','max_tokens_to_sample':0x7d0,'temperature':0x1,'top_p':0x1,'top_k':0xfa,'anthropic_version':'bedrock-2023-05-31','stream':!0x0}),this['_apiUrl']=_0x43ed91['config']['get']('ai.aws.apiUrl'),this['_bedrockClientConfig']=_0x43ed91['config']['get']('ai.aws.bedrockClientConfig'),this['_requestHeaders']=_0x43ed91['config']['get']('ai.aws.requestHeaders'),this['_requestParameters']=_0x43ed91['config']['get']('ai.aws.requestParameters');}async['sendRequest']({query:_0x5cd89a,context:_0x33df2e,onData:_0x24bf86,actionId:_0x4b73d2}){const {model:_0x72e1ec,stream:_0x5c3d2b,..._0x20e134}=await this['_prepareRequestParameters'](this['_requestParameters'],_0x4b73d2),_0x17a00d={'prompt':await this['preparePrompt'](_0x5cd89a,_0x33df2e,_0x72e1ec,_0x4b73d2),..._0x20e134};this['_apiUrl']?await this['_processProxyRequest'](_0x17a00d,_0x72e1ec,_0x5c3d2b,_0x24bf86,_0x4b73d2):await this['_processAWSRequest'](_0x17a00d,_0x72e1ec,_0x5c3d2b,_0x24bf86);}async['preparePrompt'](_0x191023,_0x28de82,_0x5cd18a,_0x3e5155){let _0x343b4e,_0x192efd;return _0x28de82?(_0x343b4e='Your\x20task\x20is\x20to\x20execute\x20the\x20instruction\x20using\x20the\x20provided\x20HTML\x20content.\x20Follow\x20the\x20instruction\x20closely.\x20Your\x20answer\x20must\x20be\x20a\x20properly\x20formatted\x20HTML\x20code.\x20Do\x20not\x20add\x20any\x20additional\x20remarks\x20or\x20notes.\x20Do\x20not\x20act\x20like\x20a\x20chatbot\x20or\x20a\x20real\x20person.',_0x192efd='Instruction:\x0a'+_0x191023+'\x0aYou\x20must\x20keep\x20the\x20text\x20formatting.\x0a\x0aContent:\x0a'+_0x28de82):(_0x343b4e='Your\x20task\x20is\x20to\x20generate\x20HTML\x20content\x20accordingly\x20to\x20the\x20given\x20instruction.\x20Never\x20include\x20<img>\x20tag\x20in\x20your\x20response\x20even\x20if\x20asked\x20for.\x20Your\x20answer\x20must\x20be\x20a\x20well-structured\x20and\x20properly\x20formatted\x20HTML\x20code.\x20Answer\x20only\x20with\x20the\x20generated\x20HTML\x20content.\x20Do\x20not\x20add\x20any\x20additional\x20remarks\x20or\x20notes.\x20Do\x20not\x20act\x20like\x20a\x20chatbot\x20or\x20a\x20real\x20person.',_0x192efd=_0x191023),'meta.llama'==this['getModelFamily'](_0x5cd18a)?'<<SYS>>\x0a'+_0x343b4e+'\x0a<</SYS>>\x0a[INST]\x0a'+_0x192efd+'\x0a[/INST]':'Human:\x0a'+_0x343b4e+'\x0a'+_0x192efd+'\x0a\x0aAssistant:';}['getModelFamily'](_0x3a8cc0){if(/^anthropic\.claude/['test'](_0x3a8cc0))return'anthropic.claude';if(/^ai21\.j2/['test'](_0x3a8cc0))return'ai21.j2';if(/^cohere\.command/['test'](_0x3a8cc0))return'cohere.command';if(/^meta\.llama/['test'](_0x3a8cc0))return'meta.llama';throw new R(i(this['editor']['locale'],'AI_ERROR_UNSUPPORTED_MODEL',_0x3a8cc0));}async['_processProxyRequest'](_0x452681,_0x46d1ff,_0x1b7620,_0xe1eab7,_0x14a5af){const _0x2dd909={'method':'POST','headers':await this['_prepareRequestHeaders'](this['_requestHeaders'],_0x14a5af),'body':JSON['stringify']({..._0x452681,'model':_0x46d1ff,'stream':_0x1b7620}),'signal':this['abortController']['signal']},_0x569335=await fetch(this['_apiUrl'],_0x2dd909);_0x1b7620?await this['_readStreamableResponse'](_0x569335,_0x46d1ff,_0xe1eab7):await this['_readStaticResponse'](_0x569335,_0x46d1ff,_0xe1eab7);}async['_processAWSRequest'](_0x52564e,_0x14b349,_0x6a975c,_0x1801f0){const _0xb4cb41=new _0xaf0d5d(this['_bedrockClientConfig']),_0x5a1188={'body':JSON['stringify'](_0x52564e),'contentType':'application/json','accept':'application/json','modelId':_0x14b349};let _0x204e13;if(_0x6a975c){const _0xcecc23=new _0x319091(_0x5a1188);_0x204e13=await _0xb4cb41['send'](_0xcecc23,{'abortSignal':this['abortController']['signal']}),await this['_readAsyncIterableResponse'](_0x204e13,_0x14b349,_0x1801f0);}else{const _0x1e81ee=new _0x43c88f(_0x5a1188);_0x204e13=await _0xb4cb41['send'](_0x1e81ee,{'abortSignal':this['abortController']['signal']}),await this['_readStaticResponse'](_0x204e13,_0x14b349,_0x1801f0);}}async['_readAsyncIterableResponse'](_0x55bdf6,_0x6c96b9,_0x4764bd){const _0x5674f6=_0x55bdf6['body'],_0x55fdaa=new TextDecoder('utf-8');let _0x2ea64c='';for await(const _0x47993e of _0x5674f6)if(_0x47993e['chunk']){const _0x408574=_0x55fdaa['decode'](_0x47993e['chunk']['bytes']),_0x2089eb=JSON['parse'](_0x408574);_0x2ea64c+=this['_getGeneratedText'](_0x2089eb,_0x6c96b9),_0x4764bd(_0x2ea64c);}return Promise['resolve']();}async['_readStreamableResponse'](_0x36f154,_0x4e8aa6,_0x22c337){const _0x44c006=_0x36f154['body'],_0x579a39=new TextDecoder('utf-8'),_0x527f9d=_0x44c006['getReader']();let _0x146cf5='',_0x574747='',_0x3eafc2=!0x1;for(;!_0x3eafc2;){const {done:_0x232d2c,value:_0x48e076}=await _0x527f9d['read']();if(_0x3eafc2=_0x232d2c,_0x3eafc2)break;const _0x363c37=(_0x146cf5+_0x579a39['decode'](_0x48e076))['split']('\x0a')['map'](_0x5a57f5=>{try{return _0x146cf5='',JSON['parse'](_0x5a57f5);}catch(_0x51cebf){return _0x146cf5=_0x5a57f5,null;}})['filter'](_0x454444=>null!==_0x454444);_0x363c37['length']&&(_0x574747+=_0x363c37['map'](_0x2721a9=>this['_getGeneratedText'](_0x2721a9,_0x4e8aa6))['join'](''),_0x22c337(_0x574747));}return Promise['resolve']();}async['_readStaticResponse'](_0x52f29c,_0x528666,_0x621809){let _0x2fac32;return _0x2fac32=_0x52f29c instanceof Response?await _0x52f29c['json']():JSON['parse'](Buffer['from'](_0x52f29c['body'])['toString']('utf8')),(_0x621809(this['_getGeneratedText'](_0x2fac32,_0x528666)),Promise['resolve']());}['_getGeneratedText'](_0x1db471,_0x3a4483){switch(this['getModelFamily'](_0x3a4483)){case'anthropic.claude':return _0x1db471['completion'];case'ai21.j2':return _0x1db471['completions'][0x0]['data']['text'];case'cohere.command':return _0x1db471['generations'][0x0]['text'];case'meta.llama':return _0x1db471['generation'];}}}export{v as AIAdapter,r as AIAssistant,R as AIRequestError,P as AITextAdapter,O as AWSTextAdapter,H as OpenAITextAdapter};
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- export default{'af':{'dictionary':{'Edit\x20or\x20review':'','Improve\x20writing':'','Make\x20shorter':'','Make\x20longer':'','Simplify\x20language':'','Generate\x20from\x20selection':'','Summarize':'','Continue':'','Change\x20tone':'','Professional':'','Casual':'','Direct':'','Confident':'','Friendly':'','Change\x20style':'','Business':'','Legal':'','Journalism':'','Poetic':'','Translate':'','English':'','Spanish':'','German':'','Portuguese':'','French':'','Simplified\x20Chinese':'','Hindi':'','Arabic':'','AI\x20Assistant':'','AI\x20Commands':'','Ask\x20AI\x20to\x20edit\x20or\x20generate':'','Ask\x20AI\x20to\x20improve\x20generated\x20text':'','Copy':'','Submit':'Indien','Insert\x20below':'','Try\x20again':'','Stop':'','AI\x20is\x20writing...':'','AI\x20is\x20writing':'','Generated\x20content:\x20%0':'','Error\x20during\x20AI\x20content\x20generation:\x20%0':'','History':'','Empty\x20history':'','Ask\x20AI\x20and\x20your\x20prompts\x20will\x20be\x20listed\x20here\x20for\x20you\x20to\x20use\x20later.':'','Prompt\x20history':'','AI_REPLACE_CONTENT':'Vervang','AI_INSERT_CONTENT':'','AI_ERROR_GET_HEADERS':'','AI_ERROR_GET_PARAMETERS':'','AI_ERROR_UNSUPPORTED_MODEL':'','AI_ERROR_CONTEXT_LENGTH':'','AI_ERROR_MODERATION':'','AI_ERROR_FAILED':'','Other':''},'getPluralForm':_0x3dff5c=>0x1!=_0x3dff5c}};
23
+ export default{'af':{'dictionary':{'Edit\x20or\x20review':'','Improve\x20writing':'','Make\x20shorter':'','Make\x20longer':'','Simplify\x20language':'','Generate\x20from\x20selection':'','Summarize':'','Continue':'','Change\x20tone':'','Professional':'','Casual':'','Direct':'','Confident':'','Friendly':'','Change\x20style':'','Business':'','Legal':'','Journalism':'','Poetic':'','Translate':'','English':'','Spanish':'','German':'','Portuguese':'','French':'','Simplified\x20Chinese':'','Hindi':'','Arabic':'','AI\x20Assistant':'','AI\x20Commands':'','Ask\x20AI\x20to\x20edit\x20or\x20generate':'','Ask\x20AI\x20to\x20improve\x20generated\x20text':'','Copy':'','Submit':'Indien','Insert\x20below':'','Try\x20again':'','Stop':'','AI\x20is\x20writing...':'','AI\x20is\x20writing':'','Generated\x20content:\x20%0':'','Error\x20during\x20AI\x20content\x20generation:\x20%0':'','History':'','Empty\x20history':'','Ask\x20AI\x20and\x20your\x20prompts\x20will\x20be\x20listed\x20here\x20for\x20you\x20to\x20use\x20later.':'','Prompt\x20history':'','AI_REPLACE_CONTENT':'Vervang','AI_INSERT_CONTENT':'','AI_ERROR_GET_HEADERS':'','AI_ERROR_GET_PARAMETERS':'','AI_ERROR_UNSUPPORTED_MODEL':'','AI_ERROR_CONTEXT_LENGTH':'','AI_ERROR_MODERATION':'','AI_ERROR_FAILED':'','Other':''},'getPluralForm':_0x4f7cd9=>0x1!=_0x4f7cd9}};
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- (_0x34cfc9=>{const {af:{dictionary:_0x2d3036,getPluralForm:_0x7ef657}}={'af':{'dictionary':{'Edit\x20or\x20review':'','Improve\x20writing':'','Make\x20shorter':'','Make\x20longer':'','Simplify\x20language':'','Generate\x20from\x20selection':'','Summarize':'','Continue':'','Change\x20tone':'','Professional':'','Casual':'','Direct':'','Confident':'','Friendly':'','Change\x20style':'','Business':'','Legal':'','Journalism':'','Poetic':'','Translate':'','English':'','Spanish':'','German':'','Portuguese':'','French':'','Simplified\x20Chinese':'','Hindi':'','Arabic':'','AI\x20Assistant':'','AI\x20Commands':'','Ask\x20AI\x20to\x20edit\x20or\x20generate':'','Ask\x20AI\x20to\x20improve\x20generated\x20text':'','Copy':'','Submit':'Indien','Insert\x20below':'','Try\x20again':'','Stop':'','AI\x20is\x20writing...':'','AI\x20is\x20writing':'','Generated\x20content:\x20%0':'','Error\x20during\x20AI\x20content\x20generation:\x20%0':'','History':'','Empty\x20history':'','Ask\x20AI\x20and\x20your\x20prompts\x20will\x20be\x20listed\x20here\x20for\x20you\x20to\x20use\x20later.':'','Prompt\x20history':'','AI_REPLACE_CONTENT':'Vervang','AI_INSERT_CONTENT':'','AI_ERROR_GET_HEADERS':'','AI_ERROR_GET_PARAMETERS':'','AI_ERROR_UNSUPPORTED_MODEL':'','AI_ERROR_CONTEXT_LENGTH':'','AI_ERROR_MODERATION':'','AI_ERROR_FAILED':'','Other':''},'getPluralForm':_0x129d01=>0x1!=_0x129d01}};_0x34cfc9['af']||={'dictionary':{},'getPluralForm':null},_0x34cfc9['af']['dictionary']=Object['assign'](_0x34cfc9['af']['dictionary'],_0x2d3036),_0x34cfc9['af']['getPluralForm']=_0x7ef657;})(window['CKEDITOR_TRANSLATIONS']||={});
23
+ (_0x4a5019=>{const {af:{dictionary:_0x3f5911,getPluralForm:_0x5ead04}}={'af':{'dictionary':{'Edit\x20or\x20review':'','Improve\x20writing':'','Make\x20shorter':'','Make\x20longer':'','Simplify\x20language':'','Generate\x20from\x20selection':'','Summarize':'','Continue':'','Change\x20tone':'','Professional':'','Casual':'','Direct':'','Confident':'','Friendly':'','Change\x20style':'','Business':'','Legal':'','Journalism':'','Poetic':'','Translate':'','English':'','Spanish':'','German':'','Portuguese':'','French':'','Simplified\x20Chinese':'','Hindi':'','Arabic':'','AI\x20Assistant':'','AI\x20Commands':'','Ask\x20AI\x20to\x20edit\x20or\x20generate':'','Ask\x20AI\x20to\x20improve\x20generated\x20text':'','Copy':'','Submit':'Indien','Insert\x20below':'','Try\x20again':'','Stop':'','AI\x20is\x20writing...':'','AI\x20is\x20writing':'','Generated\x20content:\x20%0':'','Error\x20during\x20AI\x20content\x20generation:\x20%0':'','History':'','Empty\x20history':'','Ask\x20AI\x20and\x20your\x20prompts\x20will\x20be\x20listed\x20here\x20for\x20you\x20to\x20use\x20later.':'','Prompt\x20history':'','AI_REPLACE_CONTENT':'Vervang','AI_INSERT_CONTENT':'','AI_ERROR_GET_HEADERS':'','AI_ERROR_GET_PARAMETERS':'','AI_ERROR_UNSUPPORTED_MODEL':'','AI_ERROR_CONTEXT_LENGTH':'','AI_ERROR_MODERATION':'','AI_ERROR_FAILED':'','Other':''},'getPluralForm':_0x47e8f3=>0x1!=_0x47e8f3}};_0x4a5019['af']||={'dictionary':{},'getPluralForm':null},_0x4a5019['af']['dictionary']=Object['assign'](_0x4a5019['af']['dictionary'],_0x3f5911),_0x4a5019['af']['getPluralForm']=_0x5ead04;})(window['CKEDITOR_TRANSLATIONS']||={});
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- export default{'ar':{'dictionary':{'Edit\x20or\x20review':'التحرير\x20أو\x20المراجعة','Improve\x20writing':'قم\x20بتحسين\x20الكتابة','Make\x20shorter':'اجعله\x20أقصر','Make\x20longer':'اجعله\x20أطول','Simplify\x20language':'قم\x20بتبسيط\x20اللغة','Generate\x20from\x20selection':'قم\x20بالإنشاء\x20من\x20التحديد','Summarize':'تلخيص','Continue':'متابعة','Change\x20tone':'تغيير\x20الأسلوب','Professional':'احترافي','Casual':'غير\x20رسمي','Direct':'مباشر','Confident':'لهجة\x20واثقة','Friendly':'ودي','Change\x20style':'تغيير\x20الأسلوب','Business':'تجاري','Legal':'قانوني','Journalism':'الكتابة\x20الصحفية','Poetic':'شِعري','Translate':'ترجِمْ','English':'الإنكليزية','Spanish':'الإسبانية','German':'الألمانية','Portuguese':'البرتغالية','French':'الفرنسية','Simplified\x20Chinese':'الصينية\x20المبسطة','Hindi':'الهندية','Arabic':'العربية','AI\x20Assistant':'مساعد\x20الذكاء\x20الاصطناعي','AI\x20Commands':'أوامر\x20الذكاء\x20الاصطناعي','Ask\x20AI\x20to\x20edit\x20or\x20generate':'اطلب\x20من\x20الذكاء\x20الاصطناعي\x20أن\x20يقوم\x20بالتحرير\x20أو\x20الإنشاء','Ask\x20AI\x20to\x20improve\x20generated\x20text':'اطلب\x20من\x20الذكاء\x20الاصطناعي\x20أن\x20يقوم\x20بتحسين\x20النص\x20الذي\x20تم\x20إنشاؤه','Copy':'نسخ','Submit':'إرسال','Insert\x20below':'أدخل\x20أدناه','Try\x20again':'حاول\x20مجددًا','Stop':'إيقاف','AI\x20is\x20writing...':'يقوم\x20الذكاء\x20الاصطناعي\x20بالكتابة...','AI\x20is\x20writing':'يكتب\x20الذكاء\x20الاصطناعي','Generated\x20content:\x20%0':'المحتوى\x20الذي\x20تم\x20إنشاؤه:\x20%0','Error\x20during\x20AI\x20content\x20generation:\x20%0':'حدث\x20خطأ\x20أثناء\x20إنشاء\x20محتوى\x20الذكاء\x20الاصطناعي:\x20%0','History':'سجل\x20المحفوظات','Empty\x20history':'السجل\x20فارغ','Ask\x20AI\x20and\x20your\x20prompts\x20will\x20be\x20listed\x20here\x20for\x20you\x20to\x20use\x20later.':'سيتم\x20إدراج\x20الطلبات\x20التي\x20طلبتها\x20من\x20الذكاء\x20الاصطناعي\x20والتوجيهات\x20الخاصة\x20بك\x20هنا\x20لكي\x20يتم\x20استخدامها\x20لاحقًا.','Prompt\x20history':'سجل\x20التوجيهات','AI_REPLACE_CONTENT':'استبدال','AI_INSERT_CONTENT':'إدراج','AI_ERROR_GET_HEADERS':'فشلت\x20عملية\x20تحضير\x20عناوين\x20الطلبات','AI_ERROR_GET_PARAMETERS':'لقد\x20فشلت\x20عملية\x20إعداد\x20معلمات\x20الطلب','AI_ERROR_UNSUPPORTED_MODEL':'إن\x20نموذج\x20AI\x20المطلوب\x20(\x22%0\x22)\x20غير\x20مدعوم','AI_ERROR_CONTEXT_LENGTH':'المحتوى\x20المحدد\x20طويل\x20جداً','AI_ERROR_MODERATION':'الاستعلام\x20المطلوب\x20لا\x20يجتاز\x20قواعد\x20الإشراف','AI_ERROR_FAILED':'لقد\x20فشل\x20التواصل\x20مع\x20خدمة\x20الذكاء\x20الاصطناعي','Other':'آخر'},'getPluralForm':_0x4b634b=>0x0==_0x4b634b?0x0:0x1==_0x4b634b?0x1:0x2==_0x4b634b?0x2:_0x4b634b%0x64>=0x3&&_0x4b634b%0x64<=0xa?0x3:_0x4b634b%0x64>=0xb?0x4:0x5}};
23
+ export default{'ar':{'dictionary':{'Edit\x20or\x20review':'التحرير\x20أو\x20المراجعة','Improve\x20writing':'قم\x20بتحسين\x20الكتابة','Make\x20shorter':'اجعله\x20أقصر','Make\x20longer':'اجعله\x20أطول','Simplify\x20language':'قم\x20بتبسيط\x20اللغة','Generate\x20from\x20selection':'قم\x20بالإنشاء\x20من\x20التحديد','Summarize':'تلخيص','Continue':'متابعة','Change\x20tone':'تغيير\x20الأسلوب','Professional':'احترافي','Casual':'غير\x20رسمي','Direct':'مباشر','Confident':'لهجة\x20واثقة','Friendly':'ودي','Change\x20style':'تغيير\x20الأسلوب','Business':'تجاري','Legal':'قانوني','Journalism':'الكتابة\x20الصحفية','Poetic':'شِعري','Translate':'ترجِمْ','English':'الإنكليزية','Spanish':'الإسبانية','German':'الألمانية','Portuguese':'البرتغالية','French':'الفرنسية','Simplified\x20Chinese':'الصينية\x20المبسطة','Hindi':'الهندية','Arabic':'العربية','AI\x20Assistant':'مساعد\x20الذكاء\x20الاصطناعي','AI\x20Commands':'أوامر\x20الذكاء\x20الاصطناعي','Ask\x20AI\x20to\x20edit\x20or\x20generate':'اطلب\x20من\x20الذكاء\x20الاصطناعي\x20أن\x20يقوم\x20بالتحرير\x20أو\x20الإنشاء','Ask\x20AI\x20to\x20improve\x20generated\x20text':'اطلب\x20من\x20الذكاء\x20الاصطناعي\x20أن\x20يقوم\x20بتحسين\x20النص\x20الذي\x20تم\x20إنشاؤه','Copy':'نسخ','Submit':'إرسال','Insert\x20below':'أدخل\x20أدناه','Try\x20again':'حاول\x20مجددًا','Stop':'إيقاف','AI\x20is\x20writing...':'يقوم\x20الذكاء\x20الاصطناعي\x20بالكتابة...','AI\x20is\x20writing':'يكتب\x20الذكاء\x20الاصطناعي','Generated\x20content:\x20%0':'المحتوى\x20الذي\x20تم\x20إنشاؤه:\x20%0','Error\x20during\x20AI\x20content\x20generation:\x20%0':'حدث\x20خطأ\x20أثناء\x20إنشاء\x20محتوى\x20الذكاء\x20الاصطناعي:\x20%0','History':'سجل\x20المحفوظات','Empty\x20history':'السجل\x20فارغ','Ask\x20AI\x20and\x20your\x20prompts\x20will\x20be\x20listed\x20here\x20for\x20you\x20to\x20use\x20later.':'سيتم\x20إدراج\x20الطلبات\x20التي\x20طلبتها\x20من\x20الذكاء\x20الاصطناعي\x20والتوجيهات\x20الخاصة\x20بك\x20هنا\x20لكي\x20يتم\x20استخدامها\x20لاحقًا.','Prompt\x20history':'سجل\x20التوجيهات','AI_REPLACE_CONTENT':'استبدال','AI_INSERT_CONTENT':'إدراج','AI_ERROR_GET_HEADERS':'فشلت\x20عملية\x20تحضير\x20عناوين\x20الطلبات','AI_ERROR_GET_PARAMETERS':'لقد\x20فشلت\x20عملية\x20إعداد\x20معلمات\x20الطلب','AI_ERROR_UNSUPPORTED_MODEL':'إن\x20نموذج\x20AI\x20المطلوب\x20(\x22%0\x22)\x20غير\x20مدعوم','AI_ERROR_CONTEXT_LENGTH':'المحتوى\x20المحدد\x20طويل\x20جداً','AI_ERROR_MODERATION':'الاستعلام\x20المطلوب\x20لا\x20يجتاز\x20قواعد\x20الإشراف','AI_ERROR_FAILED':'لقد\x20فشل\x20التواصل\x20مع\x20خدمة\x20الذكاء\x20الاصطناعي','Other':'آخر'},'getPluralForm':_0x73f631=>0x0==_0x73f631?0x0:0x1==_0x73f631?0x1:0x2==_0x73f631?0x2:_0x73f631%0x64>=0x3&&_0x73f631%0x64<=0xa?0x3:_0x73f631%0x64>=0xb?0x4:0x5}};
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- (_0x4fccd0=>{const {ar:{dictionary:_0x2a3d15,getPluralForm:_0x149ed2}}={'ar':{'dictionary':{'Edit\x20or\x20review':'التحرير\x20أو\x20المراجعة','Improve\x20writing':'قم\x20بتحسين\x20الكتابة','Make\x20shorter':'اجعله\x20أقصر','Make\x20longer':'اجعله\x20أطول','Simplify\x20language':'قم\x20بتبسيط\x20اللغة','Generate\x20from\x20selection':'قم\x20بالإنشاء\x20من\x20التحديد','Summarize':'تلخيص','Continue':'متابعة','Change\x20tone':'تغيير\x20الأسلوب','Professional':'احترافي','Casual':'غير\x20رسمي','Direct':'مباشر','Confident':'لهجة\x20واثقة','Friendly':'ودي','Change\x20style':'تغيير\x20الأسلوب','Business':'تجاري','Legal':'قانوني','Journalism':'الكتابة\x20الصحفية','Poetic':'شِعري','Translate':'ترجِمْ','English':'الإنكليزية','Spanish':'الإسبانية','German':'الألمانية','Portuguese':'البرتغالية','French':'الفرنسية','Simplified\x20Chinese':'الصينية\x20المبسطة','Hindi':'الهندية','Arabic':'العربية','AI\x20Assistant':'مساعد\x20الذكاء\x20الاصطناعي','AI\x20Commands':'أوامر\x20الذكاء\x20الاصطناعي','Ask\x20AI\x20to\x20edit\x20or\x20generate':'اطلب\x20من\x20الذكاء\x20الاصطناعي\x20أن\x20يقوم\x20بالتحرير\x20أو\x20الإنشاء','Ask\x20AI\x20to\x20improve\x20generated\x20text':'اطلب\x20من\x20الذكاء\x20الاصطناعي\x20أن\x20يقوم\x20بتحسين\x20النص\x20الذي\x20تم\x20إنشاؤه','Copy':'نسخ','Submit':'إرسال','Insert\x20below':'أدخل\x20أدناه','Try\x20again':'حاول\x20مجددًا','Stop':'إيقاف','AI\x20is\x20writing...':'يقوم\x20الذكاء\x20الاصطناعي\x20بالكتابة...','AI\x20is\x20writing':'يكتب\x20الذكاء\x20الاصطناعي','Generated\x20content:\x20%0':'المحتوى\x20الذي\x20تم\x20إنشاؤه:\x20%0','Error\x20during\x20AI\x20content\x20generation:\x20%0':'حدث\x20خطأ\x20أثناء\x20إنشاء\x20محتوى\x20الذكاء\x20الاصطناعي:\x20%0','History':'سجل\x20المحفوظات','Empty\x20history':'السجل\x20فارغ','Ask\x20AI\x20and\x20your\x20prompts\x20will\x20be\x20listed\x20here\x20for\x20you\x20to\x20use\x20later.':'سيتم\x20إدراج\x20الطلبات\x20التي\x20طلبتها\x20من\x20الذكاء\x20الاصطناعي\x20والتوجيهات\x20الخاصة\x20بك\x20هنا\x20لكي\x20يتم\x20استخدامها\x20لاحقًا.','Prompt\x20history':'سجل\x20التوجيهات','AI_REPLACE_CONTENT':'استبدال','AI_INSERT_CONTENT':'إدراج','AI_ERROR_GET_HEADERS':'فشلت\x20عملية\x20تحضير\x20عناوين\x20الطلبات','AI_ERROR_GET_PARAMETERS':'لقد\x20فشلت\x20عملية\x20إعداد\x20معلمات\x20الطلب','AI_ERROR_UNSUPPORTED_MODEL':'إن\x20نموذج\x20AI\x20المطلوب\x20(\x22%0\x22)\x20غير\x20مدعوم','AI_ERROR_CONTEXT_LENGTH':'المحتوى\x20المحدد\x20طويل\x20جداً','AI_ERROR_MODERATION':'الاستعلام\x20المطلوب\x20لا\x20يجتاز\x20قواعد\x20الإشراف','AI_ERROR_FAILED':'لقد\x20فشل\x20التواصل\x20مع\x20خدمة\x20الذكاء\x20الاصطناعي','Other':'آخر'},'getPluralForm':_0x30156d=>0x0==_0x30156d?0x0:0x1==_0x30156d?0x1:0x2==_0x30156d?0x2:_0x30156d%0x64>=0x3&&_0x30156d%0x64<=0xa?0x3:_0x30156d%0x64>=0xb?0x4:0x5}};_0x4fccd0['ar']||={'dictionary':{},'getPluralForm':null},_0x4fccd0['ar']['dictionary']=Object['assign'](_0x4fccd0['ar']['dictionary'],_0x2a3d15),_0x4fccd0['ar']['getPluralForm']=_0x149ed2;})(window['CKEDITOR_TRANSLATIONS']||={});
23
+ (_0x430a80=>{const {ar:{dictionary:_0x27f38d,getPluralForm:_0x584358}}={'ar':{'dictionary':{'Edit\x20or\x20review':'التحرير\x20أو\x20المراجعة','Improve\x20writing':'قم\x20بتحسين\x20الكتابة','Make\x20shorter':'اجعله\x20أقصر','Make\x20longer':'اجعله\x20أطول','Simplify\x20language':'قم\x20بتبسيط\x20اللغة','Generate\x20from\x20selection':'قم\x20بالإنشاء\x20من\x20التحديد','Summarize':'تلخيص','Continue':'متابعة','Change\x20tone':'تغيير\x20الأسلوب','Professional':'احترافي','Casual':'غير\x20رسمي','Direct':'مباشر','Confident':'لهجة\x20واثقة','Friendly':'ودي','Change\x20style':'تغيير\x20الأسلوب','Business':'تجاري','Legal':'قانوني','Journalism':'الكتابة\x20الصحفية','Poetic':'شِعري','Translate':'ترجِمْ','English':'الإنكليزية','Spanish':'الإسبانية','German':'الألمانية','Portuguese':'البرتغالية','French':'الفرنسية','Simplified\x20Chinese':'الصينية\x20المبسطة','Hindi':'الهندية','Arabic':'العربية','AI\x20Assistant':'مساعد\x20الذكاء\x20الاصطناعي','AI\x20Commands':'أوامر\x20الذكاء\x20الاصطناعي','Ask\x20AI\x20to\x20edit\x20or\x20generate':'اطلب\x20من\x20الذكاء\x20الاصطناعي\x20أن\x20يقوم\x20بالتحرير\x20أو\x20الإنشاء','Ask\x20AI\x20to\x20improve\x20generated\x20text':'اطلب\x20من\x20الذكاء\x20الاصطناعي\x20أن\x20يقوم\x20بتحسين\x20النص\x20الذي\x20تم\x20إنشاؤه','Copy':'نسخ','Submit':'إرسال','Insert\x20below':'أدخل\x20أدناه','Try\x20again':'حاول\x20مجددًا','Stop':'إيقاف','AI\x20is\x20writing...':'يقوم\x20الذكاء\x20الاصطناعي\x20بالكتابة...','AI\x20is\x20writing':'يكتب\x20الذكاء\x20الاصطناعي','Generated\x20content:\x20%0':'المحتوى\x20الذي\x20تم\x20إنشاؤه:\x20%0','Error\x20during\x20AI\x20content\x20generation:\x20%0':'حدث\x20خطأ\x20أثناء\x20إنشاء\x20محتوى\x20الذكاء\x20الاصطناعي:\x20%0','History':'سجل\x20المحفوظات','Empty\x20history':'السجل\x20فارغ','Ask\x20AI\x20and\x20your\x20prompts\x20will\x20be\x20listed\x20here\x20for\x20you\x20to\x20use\x20later.':'سيتم\x20إدراج\x20الطلبات\x20التي\x20طلبتها\x20من\x20الذكاء\x20الاصطناعي\x20والتوجيهات\x20الخاصة\x20بك\x20هنا\x20لكي\x20يتم\x20استخدامها\x20لاحقًا.','Prompt\x20history':'سجل\x20التوجيهات','AI_REPLACE_CONTENT':'استبدال','AI_INSERT_CONTENT':'إدراج','AI_ERROR_GET_HEADERS':'فشلت\x20عملية\x20تحضير\x20عناوين\x20الطلبات','AI_ERROR_GET_PARAMETERS':'لقد\x20فشلت\x20عملية\x20إعداد\x20معلمات\x20الطلب','AI_ERROR_UNSUPPORTED_MODEL':'إن\x20نموذج\x20AI\x20المطلوب\x20(\x22%0\x22)\x20غير\x20مدعوم','AI_ERROR_CONTEXT_LENGTH':'المحتوى\x20المحدد\x20طويل\x20جداً','AI_ERROR_MODERATION':'الاستعلام\x20المطلوب\x20لا\x20يجتاز\x20قواعد\x20الإشراف','AI_ERROR_FAILED':'لقد\x20فشل\x20التواصل\x20مع\x20خدمة\x20الذكاء\x20الاصطناعي','Other':'آخر'},'getPluralForm':_0x40e801=>0x0==_0x40e801?0x0:0x1==_0x40e801?0x1:0x2==_0x40e801?0x2:_0x40e801%0x64>=0x3&&_0x40e801%0x64<=0xa?0x3:_0x40e801%0x64>=0xb?0x4:0x5}};_0x430a80['ar']||={'dictionary':{},'getPluralForm':null},_0x430a80['ar']['dictionary']=Object['assign'](_0x430a80['ar']['dictionary'],_0x27f38d),_0x430a80['ar']['getPluralForm']=_0x584358;})(window['CKEDITOR_TRANSLATIONS']||={});