@ckeditor/ckeditor5-ai 45.2.1-alpha.4 → 45.2.1-alpha.6

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/build/ai.js +1 -1
  2. package/dist/index.js +2 -2
  3. package/dist/translations/af.js +1 -1
  4. package/dist/translations/af.umd.js +1 -1
  5. package/dist/translations/ar.js +1 -1
  6. package/dist/translations/ar.umd.js +1 -1
  7. package/dist/translations/ast.js +1 -1
  8. package/dist/translations/ast.umd.js +1 -1
  9. package/dist/translations/az.js +1 -1
  10. package/dist/translations/az.umd.js +1 -1
  11. package/dist/translations/be.js +1 -1
  12. package/dist/translations/be.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 +9 -9
  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 _0x24be83,Command as _0x3b6f50}from'@ckeditor/ckeditor5-core/dist/index.js';import{IconCopy as _0x48000c,IconCheck as _0x82a084,IconError as tt,IconSubmit as ht,IconHistory as et,IconMagicWand as _0x5cc321,IconRobotPencil as _0x1ba8b2}from'@ckeditor/ckeditor5-icons/dist/index.js';import{uid as _0x7dd84a,CKEditorError as _0x3df4a5,ObservableMixin as _0x31e075,global as _0x486dbc,isVisible as ot,Rect as it,Collection as _0xa69dd1,FocusTracker as mt,KeystrokeHandler as ut,first as _0x10427a}from'@ckeditor/ckeditor5-utils/dist/index.js';import{ToolbarView as at,ButtonView as _0x3ba105,View as _0x41bb21,SpinnerView as _0x25ff57,IconView as rt,AutocompleteView as nt,ListView as Ct,ListItemGroupView as Ht,ListItemView as xt,ButtonLabelView as kt,FocusCycler as pt,createLabeledTextarea as dt,Dialog as _0x48dcc0,createDropdown as _0xc1ab74,addMenuToDropdown as _0x148d12,MenuBarMenuView as _0x4d2962,MenuBarMenuListItemButtonView as _0xb36004,DialogViewPosition as _0x5c5b7a,MenuBarMenuListView as _0x11db6e,MenuBarMenuListItemView as _0x20962f}from'@ckeditor/ckeditor5-ui/dist/index.js';import{ClipboardPipeline as _0x72575,ClipboardMarkersUtils as _0x5d43fb}from'@ckeditor/ckeditor5-clipboard/dist/index.js';import{DomEventData as _0x5b2225,DataTransfer as _0x396a44,UpcastWriter as _0x1e34e1,Matcher as _0x3e5c48}from'@ckeditor/ckeditor5-engine/dist/index.js';import{unescape as jt,escape as yt}from'es-toolkit/compat';import{BedrockRuntimeClient as _0x8eb376,InvokeModelWithResponseStreamCommand as _0x5002fb,InvokeModelCommand as _0x4d6306}from'@aws-sdk/client-bedrock-runtime';const x='_ungrouppedCommands';function o(_0xf9797e,_0x31d51c){const _0x120326=(0x0,_0x31d51c['t'])('Other');return _0xf9797e['length']?'groupId'in _0xf9797e[0x0]?_0xf9797e:[{'groupId':x,'groupLabel':_0x120326,'order':0x1/0x0,'commands':_0xf9797e}]:[{'groupId':x,'groupLabel':_0x120326,'order':0x1/0x0,'commands':[]}];}const gt=globalThis['DataTransfer'],f='ai-ui';class a extends _0x24be83{static get['pluginName'](){return'AIAssistantEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x4e940c}=this,_0x3f5149=['ck-fake-ai-selection'];_0x4e940c['config']['get']('ai.useTheme')&&_0x3f5149['push']('ck-ai-assistant-ui_theme'),_0x4e940c['conversion']['for']('editingDowncast')['markerToHighlight']({'model':f,'view':{'classes':_0x3f5149,'priority':0xc}}),_0x4e940c['conversion']['for']('editingDowncast')['markerToElement']({'model':f,'view':(_0x4eab06,{writer:_0x4f355f})=>{if(!_0x4eab06['markerRange']['isCollapsed'])return null;const _0x1c75be=_0x4f355f['createUIElement']('span');return _0x4f355f['addClass'](['ck-fake-ai-selection','ck-fake-ai-selection_collapsed'],_0x1c75be),_0x1c75be;}});}['afterInit'](){!async function(_0x28e9b8){const _0x55dba2=_0x52f3ad([0x6c,0x52,0x30,0x44,0x4c,0x68,0x6f,0x4a,0x41,0x78,0x57,0x50,0x73,0x47,0x51,0x61,0x4d,0x54,0x72,0x63,0x31,0x35,0x38,0x56,0x45,0x37,0x67,0x53,0x49,0x6b,0x6e,0x4b,0x70,0x76,0x43,0x58,0x33,0x32,0x71,0x55,0x66,0x6d,0x75,0x62,0x77,0x4e,0x48,0x69,0x42,0x59,0x34,0x39,0x79,0x46,0x4f,0x7a,0x5a,0x64,0x36,0x6a,0x65,0x74]),_0x1d4706=0x554bf556,_0x30bb02=0x554c9e56^_0x1d4706,_0x2f3074=window[_0x52f3ad([0x44,0x61,0x74,0x65])][_0x52f3ad([0x6e,0x6f,0x77])](),_0x4a680f=_0x28e9b8[_0x52f3ad([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x4a2833=new window[(_0x52f3ad([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x13cefb=>{_0x4a680f[_0x52f3ad([0x6f,0x6e,0x63,0x65])](_0x52f3ad([0x72,0x65,0x61,0x64,0x79]),_0x13cefb);}),_0x290f65={[_0x52f3ad([0x6b,0x74,0x79])]:_0x52f3ad([0x45,0x43]),[_0x52f3ad([0x75,0x73,0x65])]:_0x52f3ad([0x73,0x69,0x67]),[_0x52f3ad([0x63,0x72,0x76])]:_0x52f3ad([0x50,0x2d,0x32,0x35,0x36]),[_0x52f3ad([0x78])]:_0x52f3ad([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]),[_0x52f3ad([0x79])]:_0x52f3ad([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]),[_0x52f3ad([0x61,0x6c,0x67])]:_0x52f3ad([0x45,0x53,0x32,0x35,0x36])},_0x4b57d1=_0x4a680f[_0x52f3ad([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x52f3ad([0x67,0x65,0x74])](_0x52f3ad([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x37f998(){let _0x119515,_0x40a87b=null,_0x369d39=null;try{if(_0x4b57d1==_0x52f3ad([0x47,0x50,0x4c]))return _0x52f3ad([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x119515=_0xadc1a1(),!_0x119515)return _0x52f3ad([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x119515[_0x52f3ad([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x369d39=_0x2a3a4e(_0x119515[_0x52f3ad([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x119515[_0x52f3ad([0x6a,0x74,0x69])])),await _0x4fcd92()?_0x740b34()?_0x50a3cf()?_0x52f3ad([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x2d240a()?(_0x119515[_0x52f3ad([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x52f3ad([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x40a87b=_0x350aec(_0x52f3ad([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x119515[_0x52f3ad([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x52f3ad([0x74,0x72,0x69,0x61,0x6c])&&(_0x40a87b=_0x350aec(_0x52f3ad([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x486966()):_0x52f3ad([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x52f3ad([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x52f3ad([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x52f3ad([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x50a3cf(){const _0x137204=[_0x52f3ad([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x52f3ad([0x74,0x72,0x69,0x61,0x6c])][_0x52f3ad([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x119515[_0x52f3ad([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x2f3074/0x3e8:0xe10*_0x30bb02;return _0x119515[_0x52f3ad([0x65,0x78,0x70])]<_0x137204;}function _0x740b34(){const _0x27a43b=_0x119515[_0x52f3ad([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x27a43b&&(!!_0x27a43b[_0x52f3ad([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x52f3ad([0x2a]))||!!_0x27a43b[_0x52f3ad([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x52f3ad([0x41,0x49])));}function _0x2d240a(){const _0x2e120b=_0x119515[_0x52f3ad([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x2e120b||0x0==_0x2e120b[_0x52f3ad([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x50c1c2}=new URL(window[_0x52f3ad([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x2e120b[_0x52f3ad([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x50c1c2))return!0x0;const _0x37f77d=_0x50c1c2[_0x52f3ad([0x73,0x70,0x6c,0x69,0x74])](_0x52f3ad([0x2e]));return _0x2e120b[_0x52f3ad([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x2b21c7=>_0x2b21c7[_0x52f3ad([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x52f3ad([0x2a])))[_0x52f3ad([0x6d,0x61,0x70])](_0x158b32=>_0x158b32[_0x52f3ad([0x73,0x70,0x6c,0x69,0x74])](_0x52f3ad([0x2e])))[_0x52f3ad([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x55f481=>_0x55f481[_0x52f3ad([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x37f77d[_0x52f3ad([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x52f3ad([0x6d,0x61,0x70])](_0x7816b=>Array(_0x37f77d[_0x52f3ad([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x7816b[_0x52f3ad([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x52f3ad([0x66,0x69,0x6c,0x6c])](_0x7816b[0x0]===_0x52f3ad([0x2a])?_0x52f3ad([0x2a]):'')[_0x52f3ad([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x7816b))[_0x52f3ad([0x73,0x6f,0x6d,0x65])](_0x3bf1f0=>_0x37f77d[_0x52f3ad([0x65,0x76,0x65,0x72,0x79])]((_0x49f3e5,_0x34d5c2)=>_0x3bf1f0[_0x34d5c2]===_0x49f3e5||_0x3bf1f0[_0x34d5c2]===_0x52f3ad([0x2a])));}function _0x486966(){return _0x40a87b&&_0x369d39?new window[(_0x52f3ad([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x556ce4,_0x703419)=>{_0x40a87b[_0x52f3ad([0x74,0x68,0x65,0x6e])](_0x556ce4,_0x703419),_0x369d39[_0x52f3ad([0x74,0x68,0x65,0x6e])](_0xd70df2=>{_0xd70df2!=_0x52f3ad([0x56,0x61,0x6c,0x69,0x64])&&_0x556ce4(_0xd70df2);},_0x703419);}):_0x40a87b||_0x369d39||_0x52f3ad([0x56,0x61,0x6c,0x69,0x64]);}}function _0x2a3a4e(_0x3490d1,_0x323265){return new window[(_0x52f3ad([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x536717=>{if(_0x5419a7())return _0x536717(_0x52f3ad([0x56,0x61,0x6c,0x69,0x64]));_0x394e8d(),_0x4a680f[_0x52f3ad([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x52f3ad([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x3338b1=!0x1;const _0x53b2a3=_0x7dd84a();function _0x457f71(_0x250471){return!!_0x250471&&(typeof _0x250471===_0x52f3ad([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x250471===_0x52f3ad([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x250471[_0x52f3ad([0x74,0x68,0x65,0x6e])]===_0x52f3ad([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x250471[_0x52f3ad([0x63,0x61,0x74,0x63,0x68])]===_0x52f3ad([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x539490(_0x37f614){_0x24e1e1(_0x37f614)[_0x52f3ad([0x74,0x68,0x65,0x6e])](_0x19d2c9=>{if(!_0x19d2c9||_0x19d2c9[_0x52f3ad([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x52f3ad([0x6f,0x6b]))return _0x52f3ad([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x1e0edf(_0x190904(_0x53b2a3+_0x323265))!=_0x19d2c9[_0x52f3ad([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x52f3ad([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x52f3ad([0x56,0x61,0x6c,0x69,0x64]);})[_0x52f3ad([0x74,0x68,0x65,0x6e])](_0x2efa7e=>(_0x16c6dd(),_0x2efa7e),()=>{const _0x5e2154=_0x50f832();return null==_0x5e2154?(_0x16c6dd(),_0x52f3ad([0x56,0x61,0x6c,0x69,0x64])):_0x52f3ad(_0x2f3074-_0x5e2154>(0x71477156^_0x1d4706)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x52f3ad([0x74,0x68,0x65,0x6e])](_0x536717)[_0x52f3ad([0x63,0x61,0x74,0x63,0x68])](()=>{_0x536717(_0x52f3ad([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x50e74c=0x557d1bd6^_0x1d4706;function _0x16c6dd(){const _0x19690a=_0x52f3ad([0x6c,0x6c,0x63,0x74,0x2d])+_0x1e0edf(_0x190904(_0x3490d1)),_0x30a499=_0x38ca75(_0x1e0edf(window[_0x52f3ad([0x4d,0x61,0x74,0x68])][_0x52f3ad([0x63,0x65,0x69,0x6c])](_0x2f3074/_0x50e74c)));window[_0x52f3ad([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x52f3ad([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x19690a,_0x30a499);}function _0x50f832(){const _0x203fb2=_0x52f3ad([0x6c,0x6c,0x63,0x74,0x2d])+_0x1e0edf(_0x190904(_0x3490d1)),_0x7cd5e6=window[_0x52f3ad([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x52f3ad([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x203fb2);return _0x7cd5e6?window[_0x52f3ad([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x38ca75(_0x7cd5e6),0x10)*_0x50e74c:null;}function _0x24e1e1(_0x5ac3e8){return new window[(_0x52f3ad([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x2ba12c,_0x195d25)=>{_0x5ac3e8[_0x52f3ad([0x74,0x68,0x65,0x6e])](_0x2ba12c,_0x195d25),window[_0x52f3ad([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x195d25,0x554a2196^_0x1d4706);});}}_0x4a680f[_0x52f3ad([0x6f,0x6e])](_0x52f3ad([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0xff7411,_0x286f1f)=>{if(_0x286f1f[0x0]!=_0x3490d1)return _0x536717(_0x52f3ad([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x286f1f[0x1]={..._0x286f1f[0x1],[_0x52f3ad([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x53b2a3};},{[_0x52f3ad([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x52f3ad([0x68,0x69,0x67,0x68])}),_0x4a680f[_0x52f3ad([0x6f,0x6e])](_0x52f3ad([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0xece640=>{_0x457f71(_0xece640[_0x52f3ad([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x3338b1=!0x0,_0x539490(_0xece640[_0x52f3ad([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x52f3ad([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x52f3ad([0x6c,0x6f,0x77])}),_0x4a2833[_0x52f3ad([0x74,0x68,0x65,0x6e])](()=>{_0x3338b1||_0x536717(_0x52f3ad([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x5419a7(){return _0x4a680f[_0x52f3ad([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x52f3ad([0x76,0x69,0x65,0x77])][_0x52f3ad([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x52f3ad([0x61,0x75,0x74,0x6f]);}function _0x394e8d(){_0x4a680f[_0x52f3ad([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x52f3ad([0x76,0x69,0x65,0x77])][_0x52f3ad([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x52f3ad([0x61,0x75,0x74,0x6f]);}}function _0x350aec(_0x1a8239){const _0xddb585=[new window[(_0x52f3ad([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x24fd25=>setTimeout(_0x24fd25,0x5542cb9a^_0x1d4706)),_0x4a2833[_0x52f3ad([0x74,0x68,0x65,0x6e])](()=>new window[(_0x52f3ad([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x5b4695=>{let _0x1139f9=0x0;_0x4a680f[_0x52f3ad([0x6d,0x6f,0x64,0x65,0x6c])][_0x52f3ad([0x6f,0x6e])](_0x52f3ad([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x5e6b5e,_0x2b76dc)=>{_0x2b76dc[0x0][_0x52f3ad([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x1139f9++,_0x1139f9==(0x554bf4ae^_0x1d4706)&&(_0x5b4695(),_0x5e6b5e[_0x52f3ad([0x6f,0x66,0x66])]());});}))];return window[_0x52f3ad([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x52f3ad([0x72,0x61,0x63,0x65])](_0xddb585)[_0x52f3ad([0x74,0x68,0x65,0x6e])](()=>_0x1a8239);}async function _0x5bb799(){await _0x4a2833,_0x4a680f[_0x52f3ad([0x6d,0x6f,0x64,0x65,0x6c])][_0x52f3ad([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x3b59f3,_0x4a680f[_0x52f3ad([0x6d,0x6f,0x64,0x65,0x6c])][_0x52f3ad([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x3b59f3,_0x4a680f[_0x52f3ad([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x52f3ad([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x481065(_0x141686){const _0x3c6c2d=_0x2751e0();_0x4a680f[_0x3c6c2d]=_0x52f3ad([0x61,0x69,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x141686,_0x141686!=_0x52f3ad([0x56,0x61,0x6c,0x69,0x64])&&_0x5bb799();}function _0x2751e0(){const _0x12f24f=window[_0x52f3ad([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x52f3ad([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x52f3ad([0x6e,0x6f,0x77])]())[_0x52f3ad([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x52f3ad([0x2e]),'');let _0x26f745=_0x52f3ad([0x6c]);for(let _0x1cb831=0x0;_0x1cb831<_0x12f24f[_0x52f3ad([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x1cb831+=0x2){let _0xa1d2e9=window[_0x52f3ad([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x12f24f[_0x52f3ad([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x1cb831,_0x1cb831+0x2));_0xa1d2e9>=_0x55dba2[_0x52f3ad([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0xa1d2e9-=_0x55dba2[_0x52f3ad([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x26f745+=_0x55dba2[_0xa1d2e9];}return _0x26f745;}function _0xadc1a1(){const _0xff35bf=_0x4b57d1[_0x52f3ad([0x73,0x70,0x6c,0x69,0x74])](_0x52f3ad([0x2e]));if(0x3!=_0xff35bf[_0x52f3ad([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x48efad(_0xff35bf[0x1]);function _0x48efad(_0x64bdcb){const _0x40663a=_0x448f27(_0x64bdcb);return _0x40663a&&_0x1637d9()?_0x40663a:null;function _0x1637d9(){const _0xa94b65=_0x40663a[_0x52f3ad([0x6a,0x74,0x69])],_0x3c91c9=window[_0x52f3ad([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0xa94b65[_0x52f3ad([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0xa94b65[_0x52f3ad([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x28d2cc={..._0x40663a,[_0x52f3ad([0x6a,0x74,0x69])]:_0xa94b65[_0x52f3ad([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0xa94b65[_0x52f3ad([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x28d2cc[_0x52f3ad([0x76,0x63])],_0x190904(_0x28d2cc)==_0x3c91c9;}}}async function _0x4fcd92(){let _0x4512cc=!0x0;try{const _0x5921a8=_0x4b57d1[_0x52f3ad([0x73,0x70,0x6c,0x69,0x74])](_0x52f3ad([0x2e])),[_0x31101a,_0xd89359,_0x498e1d]=_0x5921a8;return _0x2c5326(_0x31101a),await _0x59914d(_0x31101a,_0xd89359,_0x498e1d),_0x4512cc;}catch{return!0x1;}function _0x2c5326(_0x15015c){const _0x2a83fa=_0x448f27(_0x15015c);_0x2a83fa&&_0x2a83fa[_0x52f3ad([0x61,0x6c,0x67])]==_0x52f3ad([0x45,0x53,0x32,0x35,0x36])||(_0x4512cc=!0x1);}async function _0x59914d(_0x11205c,_0x5e2e80,_0x2f6074){const _0x5a949f=window[_0x52f3ad([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x52f3ad([0x66,0x72,0x6f,0x6d])](_0x56cff3(_0x2f6074),_0x5a6f7b=>_0x5a6f7b[_0x52f3ad([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x36073f=new window[(_0x52f3ad([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x52f3ad([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x11205c+_0x52f3ad([0x2e])+_0x5e2e80),_0x5f9eda=window[_0x52f3ad([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x52f3ad([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x5f9eda)return;const _0x406438=await _0x5f9eda[_0x52f3ad([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x52f3ad([0x6a,0x77,0x6b]),_0x290f65,{[_0x52f3ad([0x6e,0x61,0x6d,0x65])]:_0x52f3ad([0x45,0x43,0x44,0x53,0x41]),[_0x52f3ad([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x52f3ad([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x52f3ad([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x5f9eda[_0x52f3ad([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x52f3ad([0x6e,0x61,0x6d,0x65])]:_0x52f3ad([0x45,0x43,0x44,0x53,0x41]),[_0x52f3ad([0x68,0x61,0x73,0x68])]:{[_0x52f3ad([0x6e,0x61,0x6d,0x65])]:_0x52f3ad([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x406438,_0x5a949f,_0x36073f)||(_0x4512cc=!0x1);}}function _0x448f27(_0x59f618){return _0x59f618[_0x52f3ad([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x52f3ad([0x65,0x79]))?JSON[_0x52f3ad([0x70,0x61,0x72,0x73,0x65])](_0x56cff3(_0x59f618)):null;}function _0x56cff3(_0x29e63f){return window[_0x52f3ad([0x61,0x74,0x6f,0x62])](_0x29e63f[_0x52f3ad([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x52f3ad([0x2b]))[_0x52f3ad([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x52f3ad([0x2f])));}function _0x190904(_0x382678){let _0x4009f9=0x1505;function _0xe4d9ae(_0x2e4028){for(let _0x3dd49b=0x0;_0x3dd49b<_0x2e4028[_0x52f3ad([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x3dd49b++){const _0x2c6187=_0x2e4028[_0x52f3ad([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x3dd49b);_0x4009f9=(_0x4009f9<<0x5)+_0x4009f9+_0x2c6187,_0x4009f9&=_0x4009f9;}}function _0x557083(_0x2a7eee){Array[_0x52f3ad([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x2a7eee)?_0x2a7eee[_0x52f3ad([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x557083):_0x2a7eee&&typeof _0x2a7eee==_0x52f3ad([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x52f3ad([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x2a7eee)[_0x52f3ad([0x73,0x6f,0x72,0x74])]()[_0x52f3ad([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x45f785,_0x1f2f11])=>{_0xe4d9ae(_0x45f785),_0x557083(_0x1f2f11);}):_0xe4d9ae(window[_0x52f3ad([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x2a7eee));}return _0x557083(_0x382678),_0x4009f9>>>0x0;}function _0x1e0edf(_0x5d8e32){return _0x5d8e32[_0x52f3ad([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x52f3ad([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x52f3ad([0x30]));}function _0x38ca75(_0x3b0ebb){return _0x3b0ebb[_0x52f3ad([0x73,0x70,0x6c,0x69,0x74])]('')[_0x52f3ad([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x52f3ad([0x6a,0x6f,0x69,0x6e])]('');}function _0x3b59f3(){}function _0x52f3ad(_0x125a3f){return _0x125a3f['map'](_0x6db63f=>String['fromCharCode'](_0x6db63f))['join']('');}_0x481065(await _0x37f998());}(this);}['showFakeVisualSelection'](){const _0x2cd177=this['editor']['model'];_0x2cd177['change'](_0x27a416=>{const _0x3f307c=_0x2cd177['document']['selection']['getRanges']();let _0x1438ca=0x0;for(const _0x4e463a of _0x3f307c){const _0x8d5cb5=f+':'+_0x1438ca;if(_0x2cd177['markers']['has'](_0x8d5cb5))_0x27a416['updateMarker'](_0x8d5cb5,{'range':_0x4e463a});else{if(_0x4e463a['start']['isAtEnd']){const _0x338bfb=_0x4e463a['start']['getLastMatchingPosition'](({item:_0x17a33d})=>!_0x2cd177['schema']['isContent'](_0x17a33d),{'boundaries':_0x4e463a});_0x27a416['addMarker'](_0x8d5cb5,{'usingOperation':!0x1,'affectsData':!0x1,'range':_0x27a416['createRange'](_0x338bfb,_0x4e463a['end'])});}else _0x27a416['addMarker'](_0x8d5cb5,{'usingOperation':!0x1,'affectsData':!0x1,'range':_0x4e463a});}_0x1438ca++;}});}['hideFakeVisualSelection'](){const _0x581ee6=this['editor']['model'],_0x461145=Array['from'](this['editor']['model']['markers']['getMarkersGroup'](f));_0x461145['length']&&_0x581ee6['change'](_0x147e99=>{_0x461145['forEach'](_0x2025d7=>{_0x147e99['removeMarker'](_0x2025d7);});});}['insertContent'](_0x5bf78d,_0x422bdc){const _0x4a6db8=this['_getAISelection'](),_0x283a6c=_0x422bdc||_0x4a6db8['getFirstRange']();this['editor']['model']['canEditAt'](_0x283a6c)&&this['editor']['model']['change'](_0x20fe82=>{this['hideFakeVisualSelection'](),_0x422bdc||this['_resetContentOfSelectedTableCells'](_0x20fe82,_0x4a6db8),this['_pasteHTMLUsingClipboard']({'insertAt':_0x283a6c,'writer':_0x20fe82,'html':_0x5bf78d});});}['insertContentBelow'](_0x1b9c61){const {model:_0x27376d}=this['editor'],_0xfdbaa9=this['_getAISelection']();_0x27376d['change'](()=>{const _0x1f1c71=this['_prepareTableInsertBelowPosition'](_0x1b9c61,_0xfdbaa9)||this['_getDefaultInsertBelowPosition'](_0xfdbaa9);this['insertContent'](_0x1b9c61,_0x1f1c71);});}['_getAISelection'](){const _0x418862=this['editor']['model'],_0x2799f7=Array['from'](_0x418862['markers']['getMarkersGroup'](f))['map'](_0x12f660=>_0x12f660['getRange']());return _0x418862['createSelection'](_0x2799f7);}['_pasteHTMLUsingClipboard']({writer:_0x1d82b1,html:_0x53d1dc,insertAt:_0x4f1155}){const {view:_0x3b64e2}=this['editor']['editing'],_0x3f80d9=this['editor']['plugins']['get'](_0x72575),_0x5c49f3=new gt();_0x5c49f3['setData']('text/html',_0x53d1dc);const _0x4a3f48=new ClipboardEvent('paste',{'clipboardData':_0x5c49f3}),_0x3762cb=new _0x5b2225(_0x3b64e2,_0x4a3f48,{'dataTransfer':new _0x396a44(_0x5c49f3)});_0x1d82b1['setSelection'](_0x4f1155);const _0x40693e=(_0xa9a58,_0x1ecfa2)=>{_0x1ecfa2['resultRange']&&_0x1d82b1['setSelection'](_0x1ecfa2['resultRange']);};_0x3f80d9['once']('contentInsertion',_0x40693e,{'priority':'lowest'}),_0x3b64e2['document']['fire']('paste',_0x3762cb),_0x3f80d9['off']('contentInsertion',_0x40693e);}['_getDefaultInsertBelowPosition'](_0x15ddf4){const {model:_0x55ace9}=this['editor'],_0x2ecf3f=Array['from'](_0x15ddf4['getSelectedBlocks']());return _0x2ecf3f['length']?_0x55ace9['createPositionAfter'](_0x2ecf3f['pop']()):_0x15ddf4['getLastPosition']();}['_prepareTableInsertBelowPosition'](_0x227eee,_0x1f1a81){const {model:_0x55f530,plugins:_0x3b7a4a}=this['editor'];if(_0x3b7a4a['has']('TableUtils')){const _0x5d5855=_0x3b7a4a['get']('TableUtils')['getSelectedTableCells'](_0x1f1a81);if(_0x5d5855['length']){const _0x2a30ed=this['_getTableRowCountFromContent'](_0x227eee),_0x4045df=this['_createEmptyTableRows'](_0x5d5855,_0x2a30ed);return _0x55f530['createPositionAt'](_0x4045df,0x0);}}return null;}['_getTableRowCountFromContent'](_0x27956a){const _0x40a1cb=this['editor']['plugins']['get']('TableUtils'),_0x1ddd75=this['editor']['data']['parse'](_0x27956a),_0xce58ac=Array['from'](_0x1ddd75['getChildren']())['filter'](_0x5b255f=>_0x5b255f['is']('element','table'));let _0x5f0bf9=0x0;return _0xce58ac['forEach'](_0x57de97=>{_0x5f0bf9+=_0x40a1cb['getRows'](_0x57de97);}),_0x5f0bf9;}['_createEmptyTableRows'](_0x8f5b42,_0x4e335e){const _0x477b7b=this['editor']['plugins']['get']('TableUtils'),_0x523206=_0x477b7b['getRowIndexes'](_0x8f5b42),_0x446076=_0x477b7b['getColumnIndexes'](_0x8f5b42),_0x1d454d=_0x523206['last']+0x1,_0x3e7e5b=_0x446076['first'],_0x2b8149=_0x8f5b42[0x0]['findAncestor']('table');for(let _0xd9a98d=0x0;_0xd9a98d<_0x4e335e;_0xd9a98d++)_0x477b7b['insertRows'](_0x2b8149,{'at':_0x1d454d});return _0x2b8149['getChild'](_0x1d454d)['getChild'](_0x3e7e5b);}['_resetContentOfSelectedTableCells'](_0x3a8f11,_0x1a4032){const {plugins:_0x1d9fa9}=this['editor'],{model:_0x4c9e73}=_0x3a8f11;if(!_0x1d9fa9['has']('TableUtils'))return;_0x1d9fa9['get']('TableUtils')['getSelectedTableCells'](_0x1a4032)['length']&&_0x4c9e73['deleteContent'](_0x1a4032);}}class E extends _0x24be83{static get['pluginName'](){return'AIAdapter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['afterInit'](){if(!this['textAdapter'])throw new _0x3df4a5('aiadapter-text-adapter-not-set',null);}}class R extends Error{constructor(_0x2f9a01){super(_0x2f9a01),this['name']='AIRequestError';}}function i(_0x59b639,_0x4f9665,_0x39057f){const t=_0x59b639['t'];switch(_0x4f9665){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',_0x39057f);case'Error\x20during\x20AI\x20content\x20generation:\x20%0':return t('Error\x20during\x20AI\x20content\x20generation:\x20%0',_0x39057f);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'},_0x39057f);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 _0x4f9665;}}class j extends _0x3b6f50{['_commandDefinitions'];constructor(_0x320ce6,_0xb83b0d){super(_0x320ce6),this['_commandDefinitions']=_0xb83b0d,this['set']('enabledCommandsIds',[]),this['on']('change:_hasContext',(_0xc4dc0b,_0x9ab05f,_0x157739)=>{this['isEnabled']&&(this['enabledCommandsIds']=G(this['_commandDefinitions'],_0x157739));}),this['set']('_hasContext',!0x1),this['on']('change:isEnabled',(_0x1eb276,_0x1cae81,_0x31721e)=>{this['enabledCommandsIds']=_0x31721e?G(this['_commandDefinitions'],this['_hasContext']):[];});}['refresh'](){const _0x47d82a=this['editor']['model'];this['_hasContext']=function(_0x3dbbf2){const _0x22ad4a=_0x3dbbf2['document']['selection'];return _0x22ad4a['isCollapsed']?0x0!==[..._0x22ad4a['getSelectedBlocks']()]['length']&&![..._0x22ad4a['getSelectedBlocks']()][0x0]['isEmpty']:!!_0x3dbbf2['hasContent'](_0x22ad4a['getFirstRange']());}(_0x47d82a);const _0x24367f=_0x47d82a['document']['selection'],_0x45ff7f=this['editor']['config']['get']('ai.aiAssistant.disabledElements');for(const _0x504447 of _0x24367f['getRanges']())for(const _0x5205a of _0x504447['getItems']())if(_0x5205a['is']('element')&&_0x45ff7f['includes'](_0x5205a['name']))return void(this['isEnabled']=!0x1);this['isEnabled']=!0x0;}['execute'](_0x448207='',_0x37ff1d='',_0x23abe3='custom'){this['editor']['plugins']['get'](n)['showUI'](_0x448207,_0x37ff1d,_0x23abe3);}}function G(_0x9d210d,_0x57a9dc){const _0x1e9a3e=new Set();for(const _0x443bce of _0x9d210d['values']())(_0x57a9dc||!0x1===_0x443bce['requiresContent'])&&_0x1e9a3e['add'](_0x443bce['id']);return Array['from'](_0x1e9a3e);}const Z=new RegExp(/^(.*?)<[a-zA-Z][a-zA-Z0-9_\-.]*[ >]/,'is');class k extends/* #__PURE__ -- @preserve */
24
- _0x31e075(){['editor'];['textAdapter'];['view'];['_sanitizationContainer'];['_domParser'];['_xmlSerializer'];constructor(_0x18e4a1,_0x31f83f,_0x30f762){super(),this['editor']=_0x18e4a1,this['textAdapter']=_0x31f83f,this['_sanitizationContainer']=document['createElement']('div'),this['_domParser']=new DOMParser(),this['_xmlSerializer']=new XMLSerializer(),this['view']=_0x30f762,this['set']({'initialContext':'','currentContext':'','currentResponse':'','previousContext':void 0x0,'previousQuery':void 0x0,'previousLabel':void 0x0,'isProcessing':!0x1}),this['on']('set:currentContext',(_0x390aa4,_0x4081d2,_0x559bf1)=>{this['view']['value']=this['_sanitizeHTML'](_0x559bf1);}),this['listenTo'](this['view'],'submitPrompt',(_0x5bb324,_0x1843e8)=>{const _0x1f74e5=this['currentContext']||this['initialContext'];this['_handleQuery'](_0x1843e8,_0x1f74e5,'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:_0x85b2bc,query:_0x18cffd,htmlContent:_0x3b9ad3,label:_0x25f538,mainActionLabel:_0x598bd1}){this['view']['prompt']=_0x25f538,this['view']['mainAction']=_0x598bd1,this['initialContext']=_0x3b9ad3,_0x18cffd&&(this['view']['isRendered']?this['_handleQuery'](_0x18cffd,_0x3b9ad3,_0x85b2bc,_0x25f538):this['view']['once']('render',()=>{this['_handleQuery'](_0x18cffd,_0x3b9ad3,_0x85b2bc,_0x25f538);}));}['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'](_0x2d7e97,_0x30304b,_0x423564,_0x4e5870){return this['isProcessing']=!0x0,this['view']['startProcessing'](),this['previousContext']=_0x30304b,this['previousQuery']=_0x2d7e97,this['previousLabel']=_0x4e5870||_0x2d7e97,this['previousActionId']=_0x423564,new Promise(_0x4197b6=>{this['textAdapter']['makeRequest']({'query':_0x2d7e97,'context':_0x30304b,'onData':_0x1b0040=>{this['currentResponse']=_0x1b0040,this['currentContext']=this['_parseAndNormalizeContent'](this['currentResponse']);},'actionId':_0x423564})['then'](()=>{!this['currentContext']&&this['currentResponse']&&(this['currentContext']=this['_parseAndNormalizeContent'](this['currentResponse'],!0x0));})['catch'](_0x4fac56=>{_0x4fac56 instanceof R?this['view']['handleError'](_0x4fac56['message']):this['view']['handleError'](),_0x4197b6();})['finally'](()=>{this['stopProcessing'](),_0x4197b6();});});}['_parseAndNormalizeContent'](_0x24541e,_0x3a1f45=!0x1){const _0x2a03e3=Z['exec'](_0x24541e);_0x24541e=_0x2a03e3?_0x24541e['substring'](_0x2a03e3[0x1]['length']):_0x24541e['length']<0x64&&!_0x3a1f45?'':this['_stripMarkdownSyntax'](_0x24541e);const _0x4ef0cc=this['_domParser']['parseFromString'](_0x24541e,'text/html');if(_0x2a03e3){const _0x5a8a48=Array['from'](_0x4ef0cc['body']['childNodes']);_0x5a8a48['reverse']();for(const _0x2c573c of _0x5a8a48){if(_0x2c573c['nodeType']==Node['ELEMENT_NODE'])break;_0x2c573c['remove']();}}const _0xe2cc4f=this['editor']['data']['processor']['toView'](this['_xmlSerializer']['serializeToString'](_0x4ef0cc['body']));this['_isH1TagSupportEnabled']()||this['_normalizeResponseHeadings'](_0xe2cc4f);const _0x172e00=this['editor']['config']['get']('ai.aiAssistant.preserveComments'),_0x57d01d=this['editor']['data']['toModel'](_0xe2cc4f);return _0x172e00||_0x57d01d['markers']['clear'](),this['editor']['data']['stringify'](_0x57d01d);}['_normalizeResponseHeadings'](_0x27a766){const _0x5a256b=new _0x1e34e1(this['editor']['editing']['view']['document']),_0x12beb0=new _0x3e5c48({'name':/^h[1-5]$/}),_0x4c7f79=[];let _0x43732b=!0x1;for(const _0xc62489 of _0x27a766)_0xc62489['is']('element')&&_0x12beb0['match'](_0xc62489)&&(_0x4c7f79['push'](_0xc62489),'h1'==_0xc62489['name']&&(_0x43732b=!0x0));if(_0x43732b){for(const _0x313a39 of _0x4c7f79)_0x5a256b['rename']('h'+(parseInt(_0x313a39['name'][0x1])+0x1),_0x313a39);}}['_isH1TagSupportEnabled'](){const {data:_0x12d9ef,editing:_0x4e6c70}=this['editor'],_0x50496e=_0x12d9ef['htmlProcessor']['toView']('<h1></h1>'),_0x299321=_0x12d9ef['toView'](_0x12d9ef['toModel'](_0x50496e));return!!_0x4e6c70['view']['domConverter']['viewToDom'](_0x299321)['querySelector']('h1');}['_sanitizeHTML'](_0x519ecc){return this['editor']['editing']['view']['domConverter']['setContentOf'](this['_sanitizationContainer'],_0x519ecc),this['_sanitizationContainer']['innerHTML'];}['_stripMarkdownSyntax'](_0x263cf9){const _0x4fadec=_0x263cf9['trim']();return _0x4fadec['startsWith']('```html')?_0x4fadec['endsWith']('```')?_0x4fadec['substring'](0x7,_0x4fadec['length']-0x3):_0x4fadec['substring'](0x7):_0x263cf9;}}const M={'REPLACE':'replace','INSERT':'insert'};class lt extends at{constructor(_0x1874d5){super(_0x1874d5),this['set']('isVisible',!0x1),this['set']('mainAction',M['REPLACE']),this['replaceButton']=this['_createButton']('','ck-button-action'),this['replaceButton']['bind']('label')['to'](this,'mainAction',_0x5013b2=>i(_0x1874d5,'AI_'+_0x5013b2['toUpperCase']()+'_CONTENT')),this['insertButton']=this['_createButton'](i(_0x1874d5,'Insert\x20below')),this['tryAgainButton']=this['_createButton'](i(_0x1874d5,'Try\x20again')),this['stopButton']=this['_createButton'](i(_0x1874d5,'Stop'));const _0x549984=this['bindTemplate'];this['extendTemplate']({'attributes':{'class':['ck-ai-form__toolbar',_0x549984['if']('isVisible','ck-hidden',_0x4e9e50=>!_0x4e9e50)]}}),this['items']['addMany']([this['replaceButton'],this['insertButton'],this['tryAgainButton'],this['stopButton']]);}['_createButton'](_0x898c64,_0x55c268){const _0x2ab875=new _0x3ba105(this['locale']);return _0x2ab875['set']({'label':_0x898c64,'class':_0x55c268||'','isVisible':!0x0,'withText':!0x0}),_0x2ab875;}}class Y extends _0x41bb21{['contentFieldView'];['copyButtonView'];constructor(_0x3b291f,_0x50779a=''){super(_0x3b291f),this['set']({'value':null,'isVisible':!0x1,'isProcessing':!0x1});const _0x2f8bdd=this['bindTemplate'];this['contentFieldView']=new At(_0x3b291f,_0x50779a),this['copyButtonView']=this['_createCopyButton'](),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form__content-area-wrapper',_0x2f8bdd['if']('isVisible','ck-hidden',_0x562ff0=>!_0x562ff0)],'tabindex':'-1'},'children':[{'tag':'div','attributes':{'class':['ck','ck-ai-form__content-area',_0x2f8bdd['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 _0x15c4fe=!0x1;this['on']('change:value',(_0x529224,_0x1c4f26,_0x1fd3f7)=>{const _0x1484df=!this['contentFieldView']['element']['querySelector']('.ck-ai-form__loader');this['contentFieldView']['setContent'](_0x1fd3f7),this['isProcessing']&&_0x1484df&&!_0x15c4fe&&this['element']['scrollTo']({'top':this['element']['scrollHeight'],'behavior':'smooth'});}),this['on']('change:isProcessing',(_0x21d86e,_0x73410b,_0x318e2c)=>{_0x15c4fe=!0x1,_0x318e2c?(this['value']=null,this['contentFieldView']['appendLoader']()):this['value']||this['contentFieldView']['setContent']('');}),this['listenTo'](this['element'],'wheel',()=>{_0x15c4fe=!0x0;}),this['listenTo'](this['element'],'mousedown',()=>{_0x15c4fe=!0x0;});}['focus'](){this['element']['focus']();}['_createCopyButton'](){const _0x225efa=this['locale'],_0x12efa8=new _0x3ba105(this['locale']),_0x2303c3='ck-ai-form__copy-button';return _0x12efa8['set']({'label':i(_0x225efa,'Copy'),'icon':_0x48000c,'class':_0x2303c3,'tooltip':!0x0}),_0x12efa8['bind']('isVisible')['to'](this,'value',_0x265818=>!!_0x265818),_0x12efa8['bind']('isEnabled')['to'](this,'isProcessing',_0x1cf286=>!_0x1cf286),_0x12efa8['on']('execute',()=>{this['_copyHTMLToClipboard'](this['contentFieldView']['element']),_0x12efa8['icon']=_0x82a084,_0x12efa8['class']=_0x2303c3+'\x20ck-ai-form__copy-button--copied',this['focus'](),setTimeout(()=>{_0x12efa8['icon']=_0x48000c,_0x12efa8['class']=_0x2303c3;},0x3e8);}),_0x12efa8;}['_copyHTMLToClipboard'](_0x4e316e){const {window:_0x238363,document:_0x3df504}=_0x486dbc;if(_0x238363['ClipboardItem']){const {Blob:_0x5e4a54,ClipboardItem:_0x39637a}=_0x238363,_0x122d91=[new _0x39637a({'text/html':new _0x5e4a54([_0x4e316e['innerHTML']],{'type':'text/html'}),'text/plain':new _0x5e4a54([_0x4e316e['textContent']||''],{'type':'text/plain'})})];navigator['clipboard']['write'](_0x122d91);}else{const _0x5b9292=_0x3df504['createElement']('div');_0x5b9292['style']['position']='absolute',_0x5b9292['style']['left']='-9999px',_0x5b9292['innerHTML']='<span>[</span>'+_0x4e316e['innerHTML']+'<span>]</span>',_0x3df504['body']['appendChild'](_0x5b9292);const _0x34e59a=_0x3df504['createRange']();_0x34e59a['setStartAfter'](_0x5b9292['firstElementChild']),_0x34e59a['setEndBefore'](_0x5b9292['lastElementChild']);const _0x284368=_0x238363['getSelection']();_0x284368['removeAllRanges'](),_0x284368['addRange'](_0x34e59a),_0x3df504['execCommand']('copy'),_0x5b9292['remove']();}}}class At extends _0x41bb21{constructor(_0x3445fc,_0x4b683d=''){super(_0x3445fc),this['loaderView']=this['_createLoader'](),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-content',_0x4b683d,'ck-reset_all-excluded','ck-ai-form__content-field']}});}['setContent'](_0xe0236d){this['element']['innerHTML']=_0xe0236d;}['appendLoader'](){this['element']['appendChild'](this['loaderView']['element']);}['_createLoader'](){const _0x162967=new _0x41bb21(),_0x1e188e=this['locale'],_0x4346a9=new _0x25ff57();return _0x4346a9['isVisible']=!0x0,_0x162967['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form__loader']},'children':[_0x4346a9,{'text':i(_0x1e188e,'AI\x20is\x20writing...')}]}),_0x162967['render'](),_0x162967;}}class st extends _0x41bb21{constructor(_0x551a8a,_0x521fc4=''){super(_0x551a8a);const _0x3813b0=new rt(),_0x1ebb57=this['bindTemplate'];this['set']('text',_0x521fc4),_0x3813b0['content']=tt,this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form__error']},'children':[_0x3813b0,{'text':_0x1ebb57['to']('text')}]});}}class ct extends nt{['submitButtonView'];['showHistoryButtonView'];constructor(_0x3ad263,_0x1189ca){super(_0x3ad263,_0x1189ca),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',(_0x49a19e,_0x1ace00)=>{_0x49a19e['target']==this['queryView']['fieldView']['element']&&(this['submit'](),_0x1ace00());});}['_createSubmitButton'](){const _0x110d33=new _0x3ba105(this['locale']),_0x46cc98=this['locale'];return _0x110d33['set']({'icon':ht,'label':i(_0x46cc98,'Submit'),'isVisible':!0x0,'tooltip':!0x0,'class':'ck-ai-form__submit'}),_0x110d33['on']('execute',()=>{this['submit']();}),_0x110d33['bind']('isEnabled')['to'](this['queryView']['fieldView'],'isEmpty',this,'isEnabled',(_0x14d003,_0x5a4e03)=>!_0x14d003&&_0x5a4e03),_0x110d33;}['_createShowHistoryButton'](){const _0x192c76=new _0x3ba105(this['locale']),_0x15ed92=this['resultsView'],_0x429832=this['locale'];_0x192c76['set']({'label':i(_0x429832,'History'),'withText':!0x1,'icon':et,'tooltip':!0x0,'tooltipPosition':'sw','class':'ck-ai-form__toggle-history'}),_0x192c76['bind']('isOn')['to'](_0x15ed92,'isVisible'),_0x192c76['bind']('isEnabled')['to'](this,'isEnabled'),_0x192c76['on']('execute',()=>{_0x15ed92['isVisible']=!_0x15ed92['isVisible'],_0x15ed92['isVisible']?this['filteredView']['focus']():this['focus']();});const _0x30de73=()=>{_0x486dbc['window']['requestAnimationFrame'](()=>{if(ot(this['element'])){const _0x2a134c=new it(this['queryView']['fieldView']['element']),_0x2735b5=_0x2a134c['width'],_0x30340d='rtl'===_0x429832['uiLanguageDirection']?'left':'right';_0x2a134c['excludeScrollbarsAndBorders'](),_0x192c76['element']['style'][_0x30340d]=_0x2735b5-_0x2a134c['width']+0x1+'px';}});};return this['queryView']['fieldView']['on']('update',_0x30de73),this['on']('render',_0x30de73),_0x192c76;}['submit'](){const _0x5e4d8d=this['queryView']['fieldView']['element']['value'];this['fire']('submit',_0x5e4d8d);}['focus'](_0x4d4d7f){-0x1===_0x4d4d7f?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}}class ft extends Ct{['historyGroupView'];['clearHistoryButton'];constructor(_0x27d83c){super(_0x27d83c),this['clearHistoryButton']=this['_createClearHistoryButton'](),this['historyGroupView']=new Ht(),this['historyGroupView']['children']['add'](this['clearHistoryButton'],0x1),this['historyGroupView']['label']=i(_0x27d83c,'Prompt\x20history'),this['historyGroupView']['items']['delegate']('execute')['to'](this),this['items']['add'](this['historyGroupView']);}['filter'](){let _0x3cef34=0x0;for(const _0xd56804 of this['items'])_0x3cef34+=_0xd56804['items']['length'];return{'resultsCount':_0x3cef34,'totalItemsCount':_0x3cef34};}['_createClearHistoryButton'](){const _0x134e14=this['locale'],_0x142d7c=new _0x3ba105(this['locale']);return _0x142d7c['set']({'label':'('+i(_0x134e14,'Clear')+')','withText':!0x0}),_0x142d7c['on']('execute',()=>this['fire']('clearHistory')),_0x142d7c;}}class bt extends xt{constructor(_0x509c8f){super();const _0x416100=new kt(),_0x301ed5=new _0x3ba105(this['locale'],_0x416100);this['children']['add'](_0x301ed5),_0x301ed5['set']({'label':_0x509c8f['prompt'],'withText':!0x0}),_0x301ed5['on']('execute',()=>{this['fire']('execute',{'value':jt(_0x509c8f['prompt'])});});}}const ts='CKEditor/AIFormView/PromptHistory';class wt extends _0xa69dd1{constructor(){super(),this['_loadFromSessionStorage'](),this['on']('add',(_0x318879,_0x4d673e)=>{const _0x94cd51=os(_0x4d673e['prompt']);for(const _0x119898 of this)if(_0x119898!=_0x4d673e&&os(_0x119898['prompt'])===_0x94cd51){this['remove'](_0x119898);break;}this['length']>0x14&&this['remove'](this['last']),this['_saveToSessionStorage']();}),this['on']('remove',()=>{this['_saveToSessionStorage']();});}['_loadFromSessionStorage'](){const _0x2de300=sessionStorage['getItem'](ts)||'[]';this['addMany'](JSON['parse'](_0x2de300));}['_saveToSessionStorage'](){sessionStorage['setItem'](ts,JSON['stringify'](this['map'](_0x2cf22e=>_0x2cf22e)));}}function os(_0x1ef1b4){return _0x1ef1b4['toLowerCase']()['trim']();}class _ extends _0x41bb21{['focusTracker'];['keystrokes'];['contentArea'];['toolbar'];['promptView'];['errorView'];['_focusables'];['focusCycler'];['_promptHistory'];constructor(_0x3ace37,_0x205276,_0xb4c884=''){super(_0x3ace37),this['set']('isEnabled',!0x0),this['set']('isProcessing',!0x1),this['set']('prompt',''),this['set']('value',''),this['set']('isError',!0x1),this['set']('mainAction',M['REPLACE']),this['_promptHistory']=new wt(),this['errorView']=new st(_0x3ace37),this['contentArea']=new Y(_0x3ace37,_0xb4c884),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 mt(),this['keystrokes']=new ut(),this['_focusables']=this['createCollection']([this['contentArea'],this['contentArea']['copyButtonView'],this['toolbar'],this['promptView']]),this['focusCycler']=new pt({'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 _0x259a0b=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form',_0x205276],'tabindex':'-1'},'children':[{'tag':'div','attributes':{'class':['ck','ck-ai-form-content']},'children':[{'tag':'div','attributes':{'class':[_0x259a0b['if']('isError','ck-hidden',_0x43009c=>!_0x43009c)]},'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'](_0x31038c=0x1){-0x1===_0x31038c?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 _0x2845a2=this['locale'],_0x4c680b=new ct(_0x2845a2,{'queryView':{'label':i(_0x2845a2,'Ask\x20AI\x20to\x20edit\x20or\x20generate'),'creator':dt,'showIcon':!0x1,'showResetButton':!0x1},'infoView':{'text':{'noSearchableItems':{'primary':i(_0x2845a2,'Empty\x20history'),'secondary':i(_0x2845a2,'Ask\x20AI\x20and\x20your\x20prompts\x20will\x20be\x20listed\x20here\x20for\x20you\x20to\x20use\x20later.')}}},'filteredView':this['_createHistoryView'](),'queryMinChars':0x1/0x0,'resetOnBlur':!0x1});return _0x4c680b['bind']('isEnabled')['to'](this,'isEnabled',this,'isProcessing',(_0x3addae,_0x514412)=>_0x3addae&&!_0x514412),this['listenTo'](_0x4c680b,'submit',(_0x178e8f,_0xec2bc3)=>{this['prompt']=_0xec2bc3;const _0x19ccfb=yt(_0xec2bc3);this['fire']('submitPrompt',_0x19ccfb),_0xec2bc3['trim']()&&this['_promptHistory']['add']({'prompt':_0x19ccfb},0x0);},{'priority':'high'}),_0x4c680b;}['_createHistoryView'](){const _0x10106d=new ft(this['locale']);return _0x10106d['historyGroupView']['items']['bindTo'](this['_promptHistory'])['as'](bt),_0x10106d['on']('clearHistory',()=>{this['_promptHistory']['clear'](),this['promptView']['search'](''),this['promptView']['focus']();}),_0x10106d;}['_createToolbar'](){const _0x4e0d55=new lt(this['locale']);return _0x4e0d55['replaceButton']['bind']('isEnabled')['to'](this,'isEnabled',this,'isProcessing',this,'value',(_0xd5d86c,_0x494ca7,_0x5ab389)=>_0xd5d86c&&!_0x494ca7&&!!_0x5ab389),_0x4e0d55['replaceButton']['delegate']('execute')['to'](this,'replaceContent'),_0x4e0d55['insertButton']['bind']('isEnabled')['to'](this,'isEnabled',this,'isProcessing',this,'value',(_0xa8f7ff,_0x558fdb,_0x20f807)=>_0xa8f7ff&&!_0x558fdb&&!!_0x20f807),_0x4e0d55['insertButton']['delegate']('execute')['to'](this,'insertContentBelow'),_0x4e0d55['tryAgainButton']['bind']('isEnabled')['to'](this,'isEnabled',this,'isProcessing',(_0x46a62a,_0x16ffe0)=>_0x46a62a&&!_0x16ffe0),_0x4e0d55['tryAgainButton']['delegate']('execute')['to'](this,'tryAgainEvent'),_0x4e0d55['stopButton']['bind']('isEnabled')['to'](this,'isProcessing'),_0x4e0d55['stopButton']['delegate']('execute')['to'](this,'stopProcessing'),_0x4e0d55;}['startProcessing'](){this['value']='',this['isError']=!0x1,this['isProcessing']=!0x0,this['contentArea']['isVisible']=!0x0,this['toolbar']['isVisible']=!0x0,this['contentArea']['focus']();}['finishProcessing'](){const _0x72760f=this['locale'];this['isProcessing']=!0x1,this['prompt']='',this['promptView']['reset'](),this['value']&&(this['promptView']['queryView']['label']=i(_0x72760f,'Ask\x20AI\x20to\x20improve\x20generated\x20text'));}['handleError'](_0x18cf45){const _0x33ce58=this['locale'];this['finishProcessing'](),this['isError']=!0x0,this['errorView']['text']=_0x18cf45||i(_0x33ce58,'AI_ERROR_FAILED'),this['value']||(this['contentArea']['isVisible']=!0x1);}}const w=globalThis['DataTransfer'];class n extends _0x24be83{['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[_0x5d43fb,a,E,_0x48dcc0];}constructor(_0x134667){super(_0x134667),_0x134667['config']['define']('ai.aiAssistant.disabledElements',['media','rawHtml','tableOfContents']),_0x134667['config']['define']('ai.aiAssistant.contentAreaCssClass',''),_0x134667['config']['define']('ai.useTheme',!0x0),this['_uiCssClasses']='ck-ai-assistant-ui'+(_0x134667['config']['get']('ai.useTheme')?'\x20ck-ai-assistant-ui_theme':'');}['init'](){const {editor:_0x4ace63}=this;this['_aiAdapter']=_0x4ace63['plugins']['get'](E),this['_dialog']=_0x4ace63['plugins']['get'](_0x48dcc0),this['_formView']=null,this['_commandDefinitions']=this['_getResolvedCommandsDefinitions']();const _0x29f8fa=new j(_0x4ace63,Array['from'](this['_commandDefinitions']['values']()));_0x4ace63['commands']['add']('showAIAssistant',_0x29f8fa),_0x4ace63['ui']['componentFactory']['add']('aiCommands',_0x23f87f=>{const _0x45fee8=_0xc1ab74(_0x23f87f);return _0x45fee8['set']({'class':'ck-ai-commands-dropdown\x20'+this['_uiCssClasses']}),_0x45fee8['buttonView']['set']({'label':i(_0x23f87f,'AI\x20Commands'),'icon':_0x5cc321,'tooltip':!0x0}),_0x45fee8['on']('execute',_0x38c895=>this['_onExecute'](_0x38c895['source']['id'])),_0x148d12(_0x45fee8,_0x4ace63['ui']['view']['body'],function(_0x2ea765){const _0x3de503=o(_0x2ea765['config']['get']('ai.aiAssistant.commands'),_0x2ea765['locale']),_0x59fd53=U(_0x2ea765,_0x3de503)['filter'](_0x58890f=>_0x58890f['commands']['length']);if(0x1===_0x59fd53['length'])return U(_0x2ea765,_0x59fd53[0x0]['commands'])['map'](_0x18492c=>({'id':_0x18492c['id'],'label':_0x18492c['label']}));return _0x59fd53['map'](_0x51ab25=>{const {groupId:_0xecdd3b,groupLabel:_0x47d45a,commands:_0x3f4c6a}=_0x51ab25,_0x5edc44=U(_0x2ea765,_0x3f4c6a)['map'](_0x3d1c71=>({'id':_0x3d1c71['id'],'label':_0x3d1c71['label']}));return{'id':_0xecdd3b,'menu':_0x47d45a||_0xecdd3b,'children':_0x5edc44};});}(_0x4ace63),{'ariaLabel':i(_0x23f87f,'AI\x20Commands')}),_0x45fee8['menuView']['menuPanelClass']='ck-ai-commands-dropdown\x20'+this['_uiCssClasses'],_0x29f8fa['on']('change:enabledCommandsIds',_0xe2d3e5),_0x45fee8['menuView']['once']('render',_0xe2d3e5),_0x45fee8;function _0xe2d3e5(){_0x45fee8['isEnabled']=_0x29f8fa['enabledCommandsIds']['length']>0x0;for(const _0xea590d of _0x45fee8['menuView']['buttons'])_0xea590d['isEnabled']=_0x29f8fa['enabledCommandsIds']['includes'](_0xea590d['id']);}}),_0x4ace63['ui']['componentFactory']['add']('menuBar:aiCommands',_0x2201e2=>{const _0x434364=new _0x4d2962(_0x2201e2);_0x434364['buttonView']['set']({'label':i(_0x2201e2,'AI\x20Commands'),'icon':_0x5cc321}),_0x434364['bind']('isEnabled')['to'](_0x29f8fa,'enabledCommandsIds',_0x5a6d85=>_0x5a6d85['length']>0x0);const _0x13620c=o(_0x4ace63['config']['get']('ai.aiAssistant.commands'),_0x2201e2);return this['_populateMenuBarMenu'](_0x29f8fa,_0x434364,_0x13620c,_0x47e824=>this['_onExecute'](_0x47e824)),_0x434364;}),_0x4ace63['ui']['componentFactory']['add']('aiAssistant',()=>{const _0x4d2f9a=this['_createAIAssistantUIButton'](_0x3ba105);return _0x4d2f9a['set']({'tooltip':!0x0,'class':'ck-ai-assistant-button\x20'+this['_uiCssClasses']}),_0x4d2f9a;}),_0x4ace63['ui']['componentFactory']['add']('menuBar:aiAssistant',()=>{const _0x4b91b2=this['_createAIAssistantUIButton'](_0xb36004);return _0x4b91b2['set']({'role':'menuitemcheckbox'}),_0x4b91b2;}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x1ff95f=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x5ce132;for(const _0x5e5840 in _0x1ff95f){const _0x3d9c37=_0x5e5840,_0x1279ab=_0x1ff95f[_0x3d9c37];if('aiLicenseKeyValid'==_0x1279ab||'aiLicenseKeyInvalid'==_0x1279ab||'aiLicenseKeyExpired'==_0x1279ab||'aiLicenseKeyDomainLimit'==_0x1279ab||'aiLicenseKeyNotAllowed'==_0x1279ab||'aiLicenseKeyEvaluationLimit'==_0x1279ab||'aiLicenseKeyTrialLimit'==_0x1279ab||'aiLicenseKeyUsageLimit'==_0x1279ab){delete _0x1ff95f[_0x3d9c37],_0x5ce132=_0x1279ab,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'aiLicenseKeyInvalid'==_0x5ce132&&_0x1ff95f['_showLicenseError']('invalid'),'aiLicenseKeyExpired'==_0x5ce132&&_0x1ff95f['_showLicenseError']('expired'),'aiLicenseKeyDomainLimit'==_0x5ce132&&_0x1ff95f['_showLicenseError']('domainLimit'),'aiLicenseKeyNotAllowed'==_0x5ce132&&_0x1ff95f['_showLicenseError']('featureNotAllowed','AIAssistant'),'aiLicenseKeyEvaluationLimit'==_0x5ce132&&_0x1ff95f['_showLicenseError']('evaluationLimit'),'aiLicenseKeyTrialLimit'==_0x5ce132&&_0x1ff95f['_showLicenseError']('trialLimit'),'aiLicenseKeyUsageLimit'==_0x5ce132&&_0x1ff95f['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['showUI'](_0x1e2a19='',_0x44db3a='',_0x1510ee='custom'){const _0x543f12=this['editor'],_0x5dc108=_0x543f12['editing']['view'],_0x2fb129=_0x543f12['plugins']['get'](a),_0x17b4cc=_0x543f12['plugins']['get'](_0x5d43fb);_0x2fb129['showFakeVisualSelection']();const _0x2e3130=new w(),_0x2900e2=new ClipboardEvent('copy',{'clipboardData':_0x2e3130}),_0x240215=new _0x396a44(_0x2e3130),_0x3b308a=new _0x5b2225(_0x5dc108,_0x2900e2,{'dataTransfer':_0x240215});_0x17b4cc['_forceMarkersCopy']('comment',()=>{_0x5dc108['document']['fire']('copy',_0x3b308a);}),this['_formView']||(this['_initView'](),this['_aiAssistantController']=new k(_0x543f12,this['_aiAdapter']['textAdapter'],this['_formView']));let _0x15a723=_0x240215['getData']('text/html');const _0x15fbe7=_0x543f12['model']['document']['selection'],_0x3cac54=Array['from'](_0x15fbe7['getRanges']());0x1===_0x3cac54['length']&&_0x3cac54[0x0]['isFlat']&&!_0x15fbe7['getSelectedElement']()&&''!==_0x15a723['replace'](/&nbsp;/g,'')['trim']()&&(_0x15a723='<p>'+_0x15a723+'</p>'),this['_aiAssistantController']['updateView']({'actionId':_0x1510ee,'query':_0x1e2a19,'htmlContent':_0x15a723,'label':_0x44db3a,'mainActionLabel':M[_0x543f12['model']['document']['selection']['isCollapsed']?'INSERT':'REPLACE']}),'aiAssistant'!==this['_dialog']['id']?this['_dialog']['show']({'id':'aiAssistant','icon':_0x1ba8b2,'title':i(this['editor']['locale'],'AI\x20Assistant'),'content':this['_formView'],'position':_0x5c5b7a['EDITOR_TOP_SIDE'],'onShow':()=>{this['_formView']['focus']();},'onHide':()=>{this['_aiAssistantController']['reset'](),_0x2fb129['hideFakeVisualSelection']();}}):this['_dialog']['view']['wasMoved']||this['_dialog']['view']['updatePosition']();}['hideUI'](){this['_dialog']['hide']();}['_getResolvedCommandsDefinitions'](){const _0x418734=new Map(),_0x480ed6=o(this['editor']['config']['get']('ai.aiAssistant.commands'),this['editor']['locale']);for(const _0x376bd5 of _0x480ed6)for(const _0x17f4ba of _0x376bd5['commands'])_0x418734['set'](_0x17f4ba['id'],{..._0x17f4ba,'groupId':_0x376bd5['groupId'],'groupLabel':_0x376bd5['groupLabel']||_0x376bd5['groupId']});return _0x418734;}['_createAIAssistantUIButton'](_0x330709){const _0x143b6d=this['editor'],_0x18644f=_0x143b6d['commands']['get']('showAIAssistant'),_0xb701f8=new _0x330709(_0x143b6d['locale']);return _0xb701f8['set']({'label':i(_0x143b6d['locale'],'AI\x20Assistant'),'icon':_0x1ba8b2,'isToggleable':!0x0}),_0xb701f8['bind']('isEnabled')['to'](_0x18644f),_0xb701f8['bind']('isOn')['to'](this['_dialog'],'id',_0x19f032=>'aiAssistant'===_0x19f032),this['listenTo'](_0xb701f8,'execute',()=>{_0xb701f8['isOn']?this['hideUI']():_0x18644f['execute']();}),_0xb701f8;}['_initView'](){const _0x52823b=this['editor']['plugins']['get'](a);this['_formView']=new _(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',()=>{_0x52823b['insertContent'](this['_aiAssistantController']['currentContext']),this['hideUI']();}),this['listenTo'](this['_formView'],'insertContentBelow',()=>{_0x52823b['insertContentBelow'](this['_aiAssistantController']['currentContext']),this['hideUI']();}),this['_initAriaAiStatusChangeAnnouncements']();}['_initAriaAiStatusChangeAnnouncements'](){const {locale:_0xe9f66b,ui:{ariaLiveAnnouncer:_0x2ab812}}=this['editor'];this['_formView']['contentArea']['on']('change:isProcessing',(_0x25e864,_0x24b512,_0x3bafa9)=>{const _0x52ae71=this['_aiAssistantController']['currentContext'];_0x3bafa9?_0x2ab812['announce'](i(_0xe9f66b,'AI\x20is\x20writing')):_0x52ae71&&_0x2ab812['announce'](i(_0xe9f66b,'Generated\x20content:\x20%0',_0x52ae71),{'politeness':'polite','isUnsafeHTML':!0x0});}),this['_formView']['on']('change:isError',(_0x118a18,_0x297602,_0x1177ae)=>{if(_0x1177ae){const _0x45d11a=this['_formView']['errorView']['text'];_0x2ab812['announce'](i(_0xe9f66b,'Error\x20during\x20AI\x20content\x20generation:\x20%0',_0x45d11a));}});}['_onExecute'](_0x225062){const _0x1f3ff6=this['_commandDefinitions']['get'](_0x225062),_0x2a3b17=this['editor'],_0x27b85c=_0x2a3b17['model']['document']['selection'],_0x1a08cd=_0x2a3b17['commands']['get']('showAIAssistant'),_0x1128d6=_0x2a3b17['plugins']['get'](a),_0x8ee17a=''+(_0x1f3ff6['groupId']!==x?_0x1f3ff6['groupLabel']+':\x20':'')+_0x1f3ff6['label'];if(!0x1!==_0x1f3ff6['requiresContent']&&_0x27b85c['isCollapsed']){const _0x341a9c=_0x10427a(_0x27b85c['getSelectedBlocks']())||_0x2a3b17['model']['schema']['getLimitElement'](_0x27b85c);_0x2a3b17['model']['change'](_0x49b140=>{_0x49b140['setSelection'](_0x341a9c,'in');});}_0x1128d6['showFakeVisualSelection'](),_0x1a08cd['execute'](_0x1f3ff6['prompt'],_0x8ee17a,'command:'+_0x225062);}['_populateMenuBarMenu'](_0x5cb912,_0x1b9600,_0x1be536,_0x28dc0d){const _0x51ebd6=this['editor'],_0x26c60e=_0x51ebd6['locale'],_0x339fbc=new _0x11db6e(_0x26c60e),_0x59e310=U(_0x51ebd6,_0x1be536)['filter'](_0x5a6ed9=>_0x5a6ed9['commands']['length']);0x1===_0x59e310['length']?this['_getMenuBarGroupButtons']({'command':_0x5cb912,'commands':_0x59e310[0x0]['commands'],'parentMenuView':_0x1b9600,'onExecute':_0x28dc0d})['forEach'](_0x10b49e=>_0x339fbc['items']['add'](_0x10b49e)):_0x59e310['forEach'](({groupId:_0x34504b,groupLabel:_0x3f43be,commands:_0x4f4aff})=>{const _0x386fe5=new _0x20962f(_0x26c60e,_0x1b9600),_0x8b382a=new _0x4d2962(_0x26c60e),_0x1785c2=new _0x11db6e(_0x26c60e),_0x150567=this['_getMenuBarGroupButtons']({'command':_0x5cb912,'commands':_0x4f4aff,'parentMenuView':_0x8b382a,'onExecute':_0x28dc0d});_0x8b382a['buttonView']['set']({'label':_0x3f43be||_0x34504b}),_0x8b382a['delegate']('execute')['to'](_0x1b9600),_0x1785c2['items']['addMany'](_0x150567),_0x8b382a['panelView']['children']['add'](_0x1785c2),_0x386fe5['children']['add'](_0x8b382a),_0x339fbc['items']['add'](_0x386fe5);}),_0x1b9600['panelView']['children']['add'](_0x339fbc);}['_getMenuBarGroupButtons']({command:_0x1e7a62,commands:_0x19ee31,parentMenuView:_0x1273ee,onExecute:_0x30326b}){const _0x26e96c=this['editor'],_0x1f0065=_0x26e96c['locale'];return U(_0x26e96c,_0x19ee31)['map'](_0x2f961f=>{const _0x1cb9ed=new _0x20962f(_0x1f0065,_0x1273ee),_0x103343=new _0xb36004(_0x1f0065);return _0x103343['set']({'label':_0x2f961f['label']}),_0x103343['delegate']('execute')['to'](_0x1273ee),_0x103343['on']('execute',()=>_0x30326b(_0x2f961f['id'])),_0x103343['bind']('isEnabled')['to'](_0x1e7a62,'enabledCommandsIds',_0x3d0038=>_0x3d0038['includes'](_0x2f961f['id'])),_0x1cb9ed['children']['add'](_0x103343),_0x1cb9ed;});}}function B(_0x92b8ea,_0x22ddb5){return void 0x0!==_0x92b8ea['order']&&void 0x0===_0x22ddb5['order']?0x1:void 0x0===_0x92b8ea['order']&&void 0x0!==_0x22ddb5['order']?-0x1:void 0x0!==_0x92b8ea['order']&&void 0x0!==_0x22ddb5['order']?_0x92b8ea['order']-_0x22ddb5['order']:0x0;}function U(_0x16ab73,_0x7a0f85){_0x7a0f85['sort'](B);const _0xddd407={},_0x2090e2=[];for(const _0x503f78 of _0x7a0f85)if(void 0x0!==_0x503f78['order']){if(_0x503f78['order']in _0xddd407)throw new _0x3df4a5('ai-commands-config-order-collision',_0x16ab73,{'conflictingDefinitions':[_0x503f78,_0xddd407[_0x503f78['order']]]});_0xddd407[_0x503f78['order']]=_0x503f78,_0x2090e2['splice'](_0x503f78['order'],0x0,_0x503f78);}else _0x2090e2['push'](_0x503f78);return _0x2090e2;}class r extends _0x24be83{static get['requires'](){return[n,a];}static get['pluginName'](){return'AIAssistant';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x405250){super(_0x405250);const _0x20997b=_0x405250['config'],_0x212afa=_0x405250['locale'];_0x20997b['define']('ai.aiAssistant.preserveComments',!0x0),_0x20997b['define']('ai.aiAssistant.commands',function(_0x18389f){return[{'groupId':'editOrReview','groupLabel':i(_0x18389f,'Edit\x20or\x20review'),'commands':[{'id':'improveWriting','label':i(_0x18389f,'Improve\x20writing'),'prompt':'Fix\x20spelling\x20mistakes,\x20use\x20proper\x20grammar\x20and\x20apply\x20good\x20writing\x20practices.\x20Do\x20not\x20lose\x20the\x20original\x20meaning.'},{'id':'makeShorter','label':i(_0x18389f,'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(_0x18389f,'Make\x20longer'),'prompt':'Improve\x20this\x20content\x20by\x20using\x20descriptive\x20language\x20and\x20inserting\x20more\x20information\x20and\x20more\x20detailed\x20explanations.'},{'id':'simplifyLanguage','label':i(_0x18389f,'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(_0x18389f,'Generate\x20from\x20selection'),'commands':[{'id':'summarize','label':i(_0x18389f,'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(_0x18389f,'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(_0x18389f,'Change\x20tone'),'commands':[{'id':'professional','label':i(_0x18389f,'Professional'),'prompt':'Improve\x20using\x20polished,\x20formal,\x20and\x20respectful\x20language\x20to\x20convey\x20professional\x20expertise\x20and\x20competence.'},{'id':'casual','label':i(_0x18389f,'Casual'),'prompt':'Improve\x20using\x20casual,\x20informal\x20language\x20to\x20convey\x20a\x20casual\x20conversation\x20with\x20a\x20real\x20person.'},{'id':'direct','label':i(_0x18389f,'Direct'),'prompt':'Improve\x20using\x20direct\x20language,\x20using\x20only\x20the\x20essential\x20information.'},{'id':'confident','label':i(_0x18389f,'Confident'),'prompt':'Improve\x20using\x20compelling,\x20optimistic\x20language\x20to\x20convey\x20confidence\x20in\x20the\x20writing.'},{'id':'friendly','label':i(_0x18389f,'Friendly'),'prompt':'Improve\x20using\x20friendly,\x20comforting\x20language,\x20to\x20convey\x20understanding\x20and\x20empathy.'}]},{'groupId':'changeStyle','groupLabel':i(_0x18389f,'Change\x20style'),'commands':[{'id':'business','label':i(_0x18389f,'Business'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20business\x20professional\x20with\x20formal\x20language.'},{'id':'legal','label':i(_0x18389f,'Legal'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20legal\x20professional\x20using\x20valid\x20legal\x20terminology.'},{'id':'journalism','label':i(_0x18389f,'Journalism'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20journalist\x20using\x20engaging\x20language\x20to\x20convey\x20the\x20importance\x20of\x20the\x20information.'},{'id':'poetic','label':i(_0x18389f,'Poetic'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20poem\x20using\x20poetic\x20techniques\x20without\x20losing\x20the\x20original\x20meaning.'}]},{'groupId':'translate','groupLabel':i(_0x18389f,'Translate'),'commands':[{'id':'translateEnglish','label':i(_0x18389f,'English'),'prompt':'Translate\x20the\x20content\x20to\x20English\x20language.'},{'id':'translateSpanish','label':i(_0x18389f,'Spanish'),'prompt':'Translate\x20the\x20content\x20to\x20Spanish\x20language.'},{'id':'translatePortuguese','label':i(_0x18389f,'Portuguese'),'prompt':'Translate\x20the\x20content\x20to\x20Portuguese\x20language.'},{'id':'translateGerman','label':i(_0x18389f,'German'),'prompt':'Translate\x20the\x20content\x20to\x20German\x20language.'},{'id':'translateFrench','label':i(_0x18389f,'French'),'prompt':'Translate\x20the\x20content\x20to\x20French\x20language.'},{'id':'translateChinese','label':i(_0x18389f,'Simplified\x20Chinese'),'prompt':'Translate\x20the\x20content\x20to\x20Simplified\x20Chinese\x20language.'},{'id':'translateHindi','label':i(_0x18389f,'Hindi'),'prompt':'Translate\x20the\x20content\x20to\x20Hindi\x20language.'},{'id':'translateArabic','label':i(_0x18389f,'Arabic'),'prompt':'Translate\x20the\x20content\x20to\x20Arabic\x20language.'}]}];}(_0x212afa)),_0x20997b['define']('ai.aiAssistant.extraCommandGroups',[]),_0x20997b['define']('ai.aiAssistant.removeCommands',[]);let _0x2060d2=o(_0x20997b['get']('ai.aiAssistant.commands'),_0x212afa);const _0x4a1462=_0x20997b['get']('ai.aiAssistant.extraCommandGroups'),_0x4af170=_0x20997b['get']('ai.aiAssistant.removeCommands');_0x4a1462['forEach'](_0x3a8e4a=>{const _0x87eda6=_0x2060d2['find'](_0x21f563=>_0x21f563['groupId']===_0x3a8e4a['groupId']);_0x87eda6?_0x87eda6['commands']=_0x87eda6['commands']['concat'](_0x3a8e4a['commands']):_0x2060d2['push'](_0x3a8e4a);}),_0x2060d2=_0x2060d2['filter'](_0x1f9f81=>!_0x4af170['includes'](_0x1f9f81['groupId'])),_0x2060d2['forEach'](_0x5810fd=>{_0x5810fd['commands']=_0x5810fd['commands']['filter'](_0x4b176b=>!_0x4af170['includes'](_0x4b176b['id']));}),_0x20997b['set']('ai.aiAssistant.commands',_0x2060d2);}}class P extends _0x24be83{['abortController'];static get['requires'](){return[E];}constructor(_0x1e5040){super(_0x1e5040),this['abortController']=new AbortController();}['init'](){this['editor']['plugins']['get'](E)['textAdapter']=this;}['abort'](){this['abortController']['signal']['aborted']||(this['abortController']['abort'](),this['abortController']=new AbortController());}async['makeRequest'](_0x5763ea){return this['sendRequest'](_0x5763ea)['catch'](_0x4814c3=>{if(_0x4814c3 instanceof R)return Promise['reject'](_0x4814c3);if('AbortError'==_0x4814c3['name'])return Promise['resolve']();throw console['error'](_0x4814c3),new _0x3df4a5('aitextadapter-send-request-failed',null);});}async['_prepareRequestHeaders'](_0x3ba88a,_0x8e59c7){const _0x219f9e=this['editor']['locale'],_0x1a817f={'Content-Type':'application/json'};if('object'==typeof _0x3ba88a)Object['assign'](_0x1a817f,_0x3ba88a);else{if(_0x3ba88a)try{const _0x2a0df3=await _0x3ba88a(_0x8e59c7);Object['assign'](_0x1a817f,_0x2a0df3);}catch{return Promise['reject'](new R(i(_0x219f9e,'AI_ERROR_GET_HEADERS')));}}return _0x1a817f;}async['_prepareRequestParameters'](_0x3c0d57,_0x3a9579){const _0x59da7c=this['editor']['locale'];if('object'==typeof _0x3c0d57)return _0x3c0d57;try{return await _0x3c0d57(_0x3a9579);}catch{return Promise['reject'](new R(i(_0x59da7c,'AI_ERROR_GET_PARAMETERS')));}}}class O extends P{['_apiUrl'];['_requestHeaders'];['_requestParameters'];static get['pluginName'](){return'OpenAITextAdapter';}constructor(_0x373d97){super(_0x373d97),_0x373d97['config']['define']('ai.openAI.apiUrl','https://api.openai.com/v1/chat/completions'),_0x373d97['config']['get']('ai.openAI.requestParameters')||_0x373d97['config']['define']('ai.openAI.requestParameters',{'model':'gpt-3.5-turbo','max_tokens':0x7d0,'temperature':0x1,'top_p':0x1,'stream':!0x0}),this['_apiUrl']=_0x373d97['config']['get']('ai.openAI.apiUrl'),this['_requestHeaders']=_0x373d97['config']['get']('ai.openAI.requestHeaders')||{},this['_requestParameters']=_0x373d97['config']['get']('ai.openAI.requestParameters');}async['sendRequest']({query:_0x398746,context:_0x267197,onData:_0x3cf8ea,actionId:_0x41e49a}){const _0x29bc2c=this['editor']['locale'],_0xec4d56=await this['prepareMessages'](_0x398746,_0x267197,_0x41e49a),_0x3384a8=await this['_prepareRequestHeaders'](this['_requestHeaders'],_0x41e49a),_0x37048c=await this['_prepareRequestParameters'](this['_requestParameters'],_0x41e49a),_0x59ceb9={'messages':_0xec4d56,..._0x37048c},_0x149575={'method':'POST','headers':_0x3384a8,'body':JSON['stringify'](_0x59ceb9),'signal':this['abortController']['signal']},_0x5eb761=await fetch(this['_apiUrl'],_0x149575);if(_0x5eb761['ok'])return _0x37048c['stream']?await this['_readStreamableResponse'](_0x5eb761,_0x3cf8ea):await this['_readStaticResponse'](_0x5eb761,_0x3cf8ea),Promise['resolve']();{const _0x23bc3b=await _0x5eb761['text']();return _0x23bc3b['includes']('context_length_exceeded')?Promise['reject'](new R(i(_0x29bc2c,'AI_ERROR_CONTEXT_LENGTH'))):_0x23bc3b['includes']('Moderation')?Promise['reject'](new R(i(_0x29bc2c,'AI_ERROR_MODERATION'))):Promise['reject'](new Error(_0x23bc3b));}}async['prepareMessages'](_0x22fd41,_0x112bf2,_0x54f688){let _0x4b274c,_0x44d0f6;return _0x112bf2?(_0x4b274c='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.',_0x44d0f6='Instruction:\x0a'+_0x22fd41+'\x0aYou\x20must\x20keep\x20the\x20text\x20formatting.\x0a\x0aContent:\x0a'+_0x112bf2):(_0x4b274c='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.',_0x44d0f6=_0x22fd41),[{'role':'system','content':_0x4b274c},{'role':'user','content':_0x44d0f6}];}async['_readStreamableResponse'](_0x3ed2d6,_0x376e4b){const _0x333ee7=_0x3ed2d6['body']['getReader'](),_0x582feb=new TextDecoder();let _0x20bbd7='',_0x2c6632='',_0x20d718='',_0x12dcbc=!0x1;for(;!_0x12dcbc;){const {done:_0x19d1ef,value:_0x305deb}=await _0x333ee7['read'](),_0x5c8783=_0x20bbd7+_0x582feb['decode'](_0x305deb);let _0x2c3d12='';_0x12dcbc=_0x19d1ef;try{_0x2c3d12=this['_cleanUpData'](_0x5c8783),_0x20bbd7='';}catch{_0x20bbd7=_0x5c8783;continue;}_0x2c6632+=_0x2c3d12,!_0x12dcbc&&this['_isBufferIncomplete'](_0x2c6632)||_0x2c6632&&(_0x20d718+=_0x2c6632,_0x2c6632='',_0x376e4b(_0x20d718));}return Promise['resolve']();}async['_readStaticResponse'](_0x3760e2,_0x2411cb){return _0x2411cb((await _0x3760e2['json']())['choices'][0x0]['message']['content']),Promise['resolve']();}['_isBufferIncomplete'](_0x3e43e7){const _0x2e6928=_0x3e43e7['split']('<')['length']!==_0x3e43e7['split']('>')['length'],_0x13773c=_0x3e43e7['length']<0x1e;return _0x2e6928&&_0x13773c;}['_cleanUpData'](_0xe758){return _0xe758['split'](/\n(?![^{]*\})/g)['map'](_0x37b96e=>_0x37b96e['replace']('data:\x20',''))['filter'](_0x5ea8b6=>_0x5ea8b6&&_0x5ea8b6['length']>0x0&&'[DONE]'!==_0x5ea8b6)['map'](_0x33bf0c=>{const {choices:_0x5ae15b}=JSON['parse'](_0x33bf0c);if(_0x5ae15b[0x0]?.['delta']?.['content'])return _0x5ae15b[0x0]['delta']['content'];})['filter'](_0x19b0eb=>_0x19b0eb)['join']('');}}class D extends P{['_apiUrl'];['_requestHeaders'];['_bedrockClientConfig'];['_requestParameters'];static get['pluginName'](){return'AWSTextAdapter';}constructor(_0x1d0c12){super(_0x1d0c12),_0x1d0c12['config']['get']('ai.aws.requestParameters')||_0x1d0c12['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']=_0x1d0c12['config']['get']('ai.aws.apiUrl'),this['_bedrockClientConfig']=_0x1d0c12['config']['get']('ai.aws.bedrockClientConfig'),this['_requestHeaders']=_0x1d0c12['config']['get']('ai.aws.requestHeaders'),this['_requestParameters']=_0x1d0c12['config']['get']('ai.aws.requestParameters');}async['sendRequest']({query:_0x289ddd,context:_0x5b3bdd,onData:_0x47c0ae,actionId:_0x12fb38}){const {model:_0x437741,stream:_0x3bedb9,..._0x213728}=await this['_prepareRequestParameters'](this['_requestParameters'],_0x12fb38),_0xbbbd1e={'prompt':await this['preparePrompt'](_0x289ddd,_0x5b3bdd,_0x437741,_0x12fb38),..._0x213728};this['_apiUrl']?await this['_processProxyRequest'](_0xbbbd1e,_0x437741,_0x3bedb9,_0x47c0ae,_0x12fb38):await this['_processAWSRequest'](_0xbbbd1e,_0x437741,_0x3bedb9,_0x47c0ae);}async['preparePrompt'](_0x5731a6,_0x42cec8,_0x52a22f,_0x5493a7){let _0x1041ce,_0xeb358;return _0x42cec8?(_0x1041ce='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.',_0xeb358='Instruction:\x0a'+_0x5731a6+'\x0aYou\x20must\x20keep\x20the\x20text\x20formatting.\x0a\x0aContent:\x0a'+_0x42cec8):(_0x1041ce='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.',_0xeb358=_0x5731a6),'meta.llama'==this['getModelFamily'](_0x52a22f)?'<<SYS>>\x0a'+_0x1041ce+'\x0a<</SYS>>\x0a[INST]\x0a'+_0xeb358+'\x0a[/INST]':'Human:\x0a'+_0x1041ce+'\x0a'+_0xeb358+'\x0a\x0aAssistant:';}['getModelFamily'](_0x456a1c){if(/^anthropic\.claude/['test'](_0x456a1c))return'anthropic.claude';if(/^ai21\.j2/['test'](_0x456a1c))return'ai21.j2';if(/^cohere\.command/['test'](_0x456a1c))return'cohere.command';if(/^meta\.llama/['test'](_0x456a1c))return'meta.llama';throw new R(i(this['editor']['locale'],'AI_ERROR_UNSUPPORTED_MODEL',_0x456a1c));}async['_processProxyRequest'](_0x13454f,_0x2f7553,_0x3d50e6,_0x278ef5,_0xd4d0f3){const _0x1dcab0={'method':'POST','headers':await this['_prepareRequestHeaders'](this['_requestHeaders'],_0xd4d0f3),'body':JSON['stringify']({..._0x13454f,'model':_0x2f7553,'stream':_0x3d50e6}),'signal':this['abortController']['signal']},_0x3c9e69=await fetch(this['_apiUrl'],_0x1dcab0);_0x3d50e6?await this['_readStreamableResponse'](_0x3c9e69,_0x2f7553,_0x278ef5):await this['_readStaticResponse'](_0x3c9e69,_0x2f7553,_0x278ef5);}async['_processAWSRequest'](_0x5175dd,_0x48be9a,_0x43a395,_0x4defc7){const _0x1e3040=new _0x8eb376(this['_bedrockClientConfig']),_0x2a604b={'body':JSON['stringify'](_0x5175dd),'contentType':'application/json','accept':'application/json','modelId':_0x48be9a};let _0x288de3;if(_0x43a395){const _0x27ff1b=new _0x5002fb(_0x2a604b);_0x288de3=await _0x1e3040['send'](_0x27ff1b,{'abortSignal':this['abortController']['signal']}),await this['_readAsyncIterableResponse'](_0x288de3,_0x48be9a,_0x4defc7);}else{const _0x19c516=new _0x4d6306(_0x2a604b);_0x288de3=await _0x1e3040['send'](_0x19c516,{'abortSignal':this['abortController']['signal']}),await this['_readStaticResponse'](_0x288de3,_0x48be9a,_0x4defc7);}}async['_readAsyncIterableResponse'](_0x30153a,_0xbc4e71,_0x20af6c){const _0x38b2eb=_0x30153a['body'],_0x45b61c=new TextDecoder('utf-8');let _0x1d7677='';for await(const _0xe9a734 of _0x38b2eb)if(_0xe9a734['chunk']){const _0x588828=_0x45b61c['decode'](_0xe9a734['chunk']['bytes']),_0x9861bb=JSON['parse'](_0x588828);_0x1d7677+=this['_getGeneratedText'](_0x9861bb,_0xbc4e71),_0x20af6c(_0x1d7677);}return Promise['resolve']();}async['_readStreamableResponse'](_0x2f5d31,_0x30ba71,_0x1b2bd3){const _0x15791a=_0x2f5d31['body'],_0x56449d=new TextDecoder('utf-8'),_0x54abd8=_0x15791a['getReader']();let _0x34c670='',_0x7e37f4='',_0x584e2b=!0x1;for(;!_0x584e2b;){const {done:_0x8552a2,value:_0x3c3b5b}=await _0x54abd8['read']();if(_0x584e2b=_0x8552a2,_0x584e2b)break;const _0x181002=(_0x34c670+_0x56449d['decode'](_0x3c3b5b))['split']('\x0a')['map'](_0x10be6a=>{try{return _0x34c670='',JSON['parse'](_0x10be6a);}catch{return _0x34c670=_0x10be6a,null;}})['filter'](_0x40f120=>null!==_0x40f120);_0x181002['length']&&(_0x7e37f4+=_0x181002['map'](_0x2efe92=>this['_getGeneratedText'](_0x2efe92,_0x30ba71))['join'](''),_0x1b2bd3(_0x7e37f4));}return Promise['resolve']();}async['_readStaticResponse'](_0x283b8e,_0x406289,_0x439eab){let _0x3e3677;return _0x3e3677=_0x283b8e instanceof Response?await _0x283b8e['json']():JSON['parse'](Buffer['from'](_0x283b8e['body'])['toString']('utf8')),(_0x439eab(this['_getGeneratedText'](_0x3e3677,_0x406289)),Promise['resolve']());}['_getGeneratedText'](_0x5002b,_0x30eb32){switch(this['getModelFamily'](_0x30eb32)){case'anthropic.claude':return _0x5002b['completion'];case'ai21.j2':return _0x5002b['completions'][0x0]['data']['text'];case'cohere.command':return _0x5002b['generations'][0x0]['text'];case'meta.llama':return _0x5002b['generation'];}}}export{E as AIAdapter,r as AIAssistant,n as AIAssistantUI,R as AIRequestError,P as AITextAdapter,D as AWSTextAdapter,O as OpenAITextAdapter};
23
+ import{Plugin as _0x20d875,Command as _0x4bf5bf}from'@ckeditor/ckeditor5-core/dist/index.js';import{IconCopy as _0x171f83,IconCheck as _0xc7bbc8,IconError as tt,IconSubmit as ht,IconHistory as et,IconMagicWand as _0x1d99dc,IconRobotPencil as _0x4004c0}from'@ckeditor/ckeditor5-icons/dist/index.js';import{uid as _0x99f444,CKEditorError as _0x2e40f7,ObservableMixin as _0x1cb62e,global as _0x968ec2,isVisible as ot,Rect as it,Collection as _0x56bb48,FocusTracker as mt,KeystrokeHandler as ut,first as _0x15db7c}from'@ckeditor/ckeditor5-utils/dist/index.js';import{ToolbarView as at,ButtonView as _0x4fbeea,View as _0x25421b,SpinnerView as _0x30186b,IconView as rt,AutocompleteView as nt,ListView as Ct,ListItemGroupView as Ht,ListItemView as xt,ButtonLabelView as kt,FocusCycler as pt,createLabeledTextarea as dt,Dialog as _0xac8cba,createDropdown as _0x57d579,addMenuToDropdown as _0x1af8da,MenuBarMenuView as _0x10ae44,MenuBarMenuListItemButtonView as _0x288c59,DialogViewPosition as _0x14a8e3,MenuBarMenuListView as _0xb10bb2,MenuBarMenuListItemView as _0x577f0a}from'@ckeditor/ckeditor5-ui/dist/index.js';import{ClipboardPipeline as _0x50bfeb,ClipboardMarkersUtils as _0x867061}from'@ckeditor/ckeditor5-clipboard/dist/index.js';import{DomEventData as _0x5a93e8,DataTransfer as _0x5050b0,UpcastWriter as _0x419714,Matcher as _0x27fb87}from'@ckeditor/ckeditor5-engine/dist/index.js';import{unescape as jt,escape as yt}from'es-toolkit/compat';import{BedrockRuntimeClient as _0x36eda2,InvokeModelWithResponseStreamCommand as _0x55a4cf,InvokeModelCommand as _0x1805c7}from'@aws-sdk/client-bedrock-runtime';const x='_ungrouppedCommands';function o(_0x1b9944,_0x53ebde){const _0x3559f2=(0x0,_0x53ebde['t'])('Other');return _0x1b9944['length']?'groupId'in _0x1b9944[0x0]?_0x1b9944:[{'groupId':x,'groupLabel':_0x3559f2,'order':0x1/0x0,'commands':_0x1b9944}]:[{'groupId':x,'groupLabel':_0x3559f2,'order':0x1/0x0,'commands':[]}];}const gt=globalThis['DataTransfer'],f='ai-ui';class a extends _0x20d875{static get['pluginName'](){return'AIAssistantEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x1a6acb}=this,_0x3fbcc1=['ck-fake-ai-selection'];_0x1a6acb['config']['get']('ai.useTheme')&&_0x3fbcc1['push']('ck-ai-assistant-ui_theme'),_0x1a6acb['conversion']['for']('editingDowncast')['markerToHighlight']({'model':f,'view':{'classes':_0x3fbcc1,'priority':0xc}}),_0x1a6acb['conversion']['for']('editingDowncast')['markerToElement']({'model':f,'view':(_0x2796f1,{writer:_0x41baaa})=>{if(!_0x2796f1['markerRange']['isCollapsed'])return null;const _0x661392=_0x41baaa['createUIElement']('span');return _0x41baaa['addClass'](['ck-fake-ai-selection','ck-fake-ai-selection_collapsed'],_0x661392),_0x661392;}});}['afterInit'](){!async function(_0x505871){const _0x534bbe=_0x2e523c([0x50,0x6d,0x66,0x49,0x34,0x72,0x54,0x57,0x4a,0x6a,0x76,0x73,0x46,0x69,0x75,0x47,0x51,0x5a,0x64,0x38,0x77,0x61,0x48,0x44,0x63,0x71,0x58,0x30,0x42,0x32,0x6c,0x6f,0x59,0x6b,0x4f,0x43,0x70,0x4b,0x55,0x45,0x4e,0x4c,0x53,0x39,0x7a,0x33,0x4d,0x79,0x56,0x78,0x6e,0x62,0x74,0x68,0x35,0x31,0x65,0x37,0x36,0x67,0x41,0x52]),_0x1c0d1a=0x45f676a,_0x135469=0x4580c22^_0x1c0d1a,_0x35265e=window[_0x2e523c([0x44,0x61,0x74,0x65])][_0x2e523c([0x6e,0x6f,0x77])](),_0x5e2143=_0x505871[_0x2e523c([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x280129=new window[(_0x2e523c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4a44c7=>{_0x5e2143[_0x2e523c([0x6f,0x6e,0x63,0x65])](_0x2e523c([0x72,0x65,0x61,0x64,0x79]),_0x4a44c7);}),_0x34dd11={[_0x2e523c([0x6b,0x74,0x79])]:_0x2e523c([0x45,0x43]),[_0x2e523c([0x75,0x73,0x65])]:_0x2e523c([0x73,0x69,0x67]),[_0x2e523c([0x63,0x72,0x76])]:_0x2e523c([0x50,0x2d,0x32,0x35,0x36]),[_0x2e523c([0x78])]:_0x2e523c([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]),[_0x2e523c([0x79])]:_0x2e523c([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]),[_0x2e523c([0x61,0x6c,0x67])]:_0x2e523c([0x45,0x53,0x32,0x35,0x36])},_0x17b99c=_0x5e2143[_0x2e523c([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x2e523c([0x67,0x65,0x74])](_0x2e523c([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x2d381c(){let _0x1514cd,_0x586a0e=null,_0x52868c=null;try{if(_0x17b99c==_0x2e523c([0x47,0x50,0x4c]))return _0x2e523c([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x1514cd=_0x54f058(),!_0x1514cd)return _0x2e523c([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x1514cd[_0x2e523c([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x52868c=_0x225642(_0x1514cd[_0x2e523c([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x1514cd[_0x2e523c([0x6a,0x74,0x69])])),await _0x41e04a()?_0x1b9499()?_0x35bdb1()?_0x2e523c([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x55d6f4()?(_0x1514cd[_0x2e523c([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x2e523c([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x586a0e=_0x5575d6(_0x2e523c([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x1514cd[_0x2e523c([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x2e523c([0x74,0x72,0x69,0x61,0x6c])&&(_0x586a0e=_0x5575d6(_0x2e523c([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x2a5e6d()):_0x2e523c([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x2e523c([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x2e523c([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x2e523c([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x35bdb1(){const _0x55bd99=[_0x2e523c([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x2e523c([0x74,0x72,0x69,0x61,0x6c])][_0x2e523c([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1514cd[_0x2e523c([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x35265e/0x3e8:0xe10*_0x135469;return _0x1514cd[_0x2e523c([0x65,0x78,0x70])]<_0x55bd99;}function _0x1b9499(){const _0x28b7dd=_0x1514cd[_0x2e523c([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x28b7dd&&(!!_0x28b7dd[_0x2e523c([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2e523c([0x2a]))||!!_0x28b7dd[_0x2e523c([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2e523c([0x41,0x49])));}function _0x55d6f4(){const _0x9b4491=_0x1514cd[_0x2e523c([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x9b4491||0x0==_0x9b4491[_0x2e523c([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x500fa8}=new URL(window[_0x2e523c([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x9b4491[_0x2e523c([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x500fa8))return!0x0;const _0x23a8ca=_0x500fa8[_0x2e523c([0x73,0x70,0x6c,0x69,0x74])](_0x2e523c([0x2e]));return _0x9b4491[_0x2e523c([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x4471ce=>_0x4471ce[_0x2e523c([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2e523c([0x2a])))[_0x2e523c([0x6d,0x61,0x70])](_0x1ebd2a=>_0x1ebd2a[_0x2e523c([0x73,0x70,0x6c,0x69,0x74])](_0x2e523c([0x2e])))[_0x2e523c([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x2ab16c=>_0x2ab16c[_0x2e523c([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x23a8ca[_0x2e523c([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x2e523c([0x6d,0x61,0x70])](_0x4142f4=>Array(_0x23a8ca[_0x2e523c([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x4142f4[_0x2e523c([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x2e523c([0x66,0x69,0x6c,0x6c])](_0x4142f4[0x0]===_0x2e523c([0x2a])?_0x2e523c([0x2a]):'')[_0x2e523c([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x4142f4))[_0x2e523c([0x73,0x6f,0x6d,0x65])](_0x2d0fbe=>_0x23a8ca[_0x2e523c([0x65,0x76,0x65,0x72,0x79])]((_0x3ecc93,_0x2f411e)=>_0x2d0fbe[_0x2f411e]===_0x3ecc93||_0x2d0fbe[_0x2f411e]===_0x2e523c([0x2a])));}function _0x2a5e6d(){return _0x586a0e&&_0x52868c?new window[(_0x2e523c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x51e471,_0xba26fd)=>{_0x586a0e[_0x2e523c([0x74,0x68,0x65,0x6e])](_0x51e471,_0xba26fd),_0x52868c[_0x2e523c([0x74,0x68,0x65,0x6e])](_0x4b8a84=>{_0x4b8a84!=_0x2e523c([0x56,0x61,0x6c,0x69,0x64])&&_0x51e471(_0x4b8a84);},_0xba26fd);}):_0x586a0e||_0x52868c||_0x2e523c([0x56,0x61,0x6c,0x69,0x64]);}}function _0x225642(_0x1bfe55,_0x1cdba7){return new window[(_0x2e523c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x397baf=>{if(_0x222566())return _0x397baf(_0x2e523c([0x56,0x61,0x6c,0x69,0x64]));_0x43099e(),_0x5e2143[_0x2e523c([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x2e523c([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0xe20ecb=!0x1;const _0x3be8bb=_0x99f444();function _0x176861(_0x24c969){return!!_0x24c969&&(typeof _0x24c969===_0x2e523c([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x24c969===_0x2e523c([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x24c969[_0x2e523c([0x74,0x68,0x65,0x6e])]===_0x2e523c([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x24c969[_0x2e523c([0x63,0x61,0x74,0x63,0x68])]===_0x2e523c([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x584cdb(_0x4a581){_0x870105(_0x4a581)[_0x2e523c([0x74,0x68,0x65,0x6e])](_0x2dd733=>{if(!_0x2dd733||_0x2dd733[_0x2e523c([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x2e523c([0x6f,0x6b]))return _0x2e523c([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x2d72a4(_0x4735f6(_0x3be8bb+_0x1cdba7))!=_0x2dd733[_0x2e523c([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x2e523c([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x2e523c([0x56,0x61,0x6c,0x69,0x64]);})[_0x2e523c([0x74,0x68,0x65,0x6e])](_0x2a9e23=>(_0x46d404(),_0x2a9e23),()=>{const _0x44a52b=_0x492ee0();return null==_0x44a52b?(_0x46d404(),_0x2e523c([0x56,0x61,0x6c,0x69,0x64])):_0x2e523c(_0x35265e-_0x44a52b>(0x2053e36a^_0x1c0d1a)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x2e523c([0x74,0x68,0x65,0x6e])](_0x397baf)[_0x2e523c([0x63,0x61,0x74,0x63,0x68])](()=>{_0x397baf(_0x2e523c([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0xdaf0f8=0x46989ea^_0x1c0d1a;function _0x46d404(){const _0x32cb2a=_0x2e523c([0x6c,0x6c,0x63,0x74,0x2d])+_0x2d72a4(_0x4735f6(_0x1bfe55)),_0x32b83b=_0x1533a3(_0x2d72a4(window[_0x2e523c([0x4d,0x61,0x74,0x68])][_0x2e523c([0x63,0x65,0x69,0x6c])](_0x35265e/_0xdaf0f8)));window[_0x2e523c([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x2e523c([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x32cb2a,_0x32b83b);}function _0x492ee0(){const _0x3b700f=_0x2e523c([0x6c,0x6c,0x63,0x74,0x2d])+_0x2d72a4(_0x4735f6(_0x1bfe55)),_0x9d4bf7=window[_0x2e523c([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x2e523c([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x3b700f);return _0x9d4bf7?window[_0x2e523c([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x1533a3(_0x9d4bf7),0x10)*_0xdaf0f8:null;}function _0x870105(_0x4dd7ab){return new window[(_0x2e523c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x52673c,_0x3aa650)=>{_0x4dd7ab[_0x2e523c([0x74,0x68,0x65,0x6e])](_0x52673c,_0x3aa650),window[_0x2e523c([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x3aa650,0x45eb3aa^_0x1c0d1a);});}}_0x5e2143[_0x2e523c([0x6f,0x6e])](_0x2e523c([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x4e30a7,_0x4c7d0d)=>{if(_0x4c7d0d[0x0]!=_0x1bfe55)return _0x397baf(_0x2e523c([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x4c7d0d[0x1]={..._0x4c7d0d[0x1],[_0x2e523c([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x3be8bb};},{[_0x2e523c([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x2e523c([0x68,0x69,0x67,0x68])}),_0x5e2143[_0x2e523c([0x6f,0x6e])](_0x2e523c([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x24570b=>{_0x176861(_0x24570b[_0x2e523c([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0xe20ecb=!0x0,_0x584cdb(_0x24570b[_0x2e523c([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x2e523c([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x2e523c([0x6c,0x6f,0x77])}),_0x280129[_0x2e523c([0x74,0x68,0x65,0x6e])](()=>{_0xe20ecb||_0x397baf(_0x2e523c([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x222566(){return _0x5e2143[_0x2e523c([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x2e523c([0x76,0x69,0x65,0x77])][_0x2e523c([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x2e523c([0x61,0x75,0x74,0x6f]);}function _0x43099e(){_0x5e2143[_0x2e523c([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x2e523c([0x76,0x69,0x65,0x77])][_0x2e523c([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x2e523c([0x61,0x75,0x74,0x6f]);}}function _0x5575d6(_0x321d40){const _0x536043=[new window[(_0x2e523c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x67d45e=>setTimeout(_0x67d45e,0x45659a6^_0x1c0d1a)),_0x280129[_0x2e523c([0x74,0x68,0x65,0x6e])](()=>new window[(_0x2e523c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4c1716=>{let _0x134f51=0x0;_0x5e2143[_0x2e523c([0x6d,0x6f,0x64,0x65,0x6c])][_0x2e523c([0x6f,0x6e])](_0x2e523c([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x2626ba,_0x5b1ad1)=>{_0x5b1ad1[0x0][_0x2e523c([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x134f51++,_0x134f51==(0x45f6692^_0x1c0d1a)&&(_0x4c1716(),_0x2626ba[_0x2e523c([0x6f,0x66,0x66])]());});}))];return window[_0x2e523c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x2e523c([0x72,0x61,0x63,0x65])](_0x536043)[_0x2e523c([0x74,0x68,0x65,0x6e])](()=>_0x321d40);}async function _0x4d0b26(){await _0x280129,_0x5e2143[_0x2e523c([0x6d,0x6f,0x64,0x65,0x6c])][_0x2e523c([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0xcf1ca7,_0x5e2143[_0x2e523c([0x6d,0x6f,0x64,0x65,0x6c])][_0x2e523c([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0xcf1ca7,_0x5e2143[_0x2e523c([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x2e523c([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x18dd8f(_0x59061f){const _0x1cca0f=_0x15daf7();_0x5e2143[_0x1cca0f]=_0x2e523c([0x61,0x69,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x59061f,_0x59061f!=_0x2e523c([0x56,0x61,0x6c,0x69,0x64])&&_0x4d0b26();}function _0x15daf7(){const _0x24696e=window[_0x2e523c([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x2e523c([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x2e523c([0x6e,0x6f,0x77])]())[_0x2e523c([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x2e523c([0x2e]),'');let _0x43e25d=_0x2e523c([0x50]);for(let _0x45ca0a=0x0;_0x45ca0a<_0x24696e[_0x2e523c([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x45ca0a+=0x2){let _0x2f5e37=window[_0x2e523c([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x24696e[_0x2e523c([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x45ca0a,_0x45ca0a+0x2));_0x2f5e37>=_0x534bbe[_0x2e523c([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x2f5e37-=_0x534bbe[_0x2e523c([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x43e25d+=_0x534bbe[_0x2f5e37];}return _0x43e25d;}function _0x54f058(){const _0x1938e3=_0x17b99c[_0x2e523c([0x73,0x70,0x6c,0x69,0x74])](_0x2e523c([0x2e]));if(0x3!=_0x1938e3[_0x2e523c([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x587313(_0x1938e3[0x1]);function _0x587313(_0xe879b8){const _0x2adb4c=_0x3667d3(_0xe879b8);return _0x2adb4c&&_0x228657()?_0x2adb4c:null;function _0x228657(){const _0x59cc30=_0x2adb4c[_0x2e523c([0x6a,0x74,0x69])],_0x13c2f6=window[_0x2e523c([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x59cc30[_0x2e523c([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x59cc30[_0x2e523c([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x472e8a={..._0x2adb4c,[_0x2e523c([0x6a,0x74,0x69])]:_0x59cc30[_0x2e523c([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x59cc30[_0x2e523c([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x472e8a[_0x2e523c([0x76,0x63])],_0x4735f6(_0x472e8a)==_0x13c2f6;}}}async function _0x41e04a(){let _0x1c1e7=!0x0;try{const _0x5bc0fd=_0x17b99c[_0x2e523c([0x73,0x70,0x6c,0x69,0x74])](_0x2e523c([0x2e])),[_0xae21e2,_0x47b119,_0x5f1e48]=_0x5bc0fd;return _0x370f9b(_0xae21e2),await _0x18913b(_0xae21e2,_0x47b119,_0x5f1e48),_0x1c1e7;}catch{return!0x1;}function _0x370f9b(_0x501d17){const _0x2fc6ad=_0x3667d3(_0x501d17);_0x2fc6ad&&_0x2fc6ad[_0x2e523c([0x61,0x6c,0x67])]==_0x2e523c([0x45,0x53,0x32,0x35,0x36])||(_0x1c1e7=!0x1);}async function _0x18913b(_0x307f29,_0x550a10,_0x482710){const _0x35de39=window[_0x2e523c([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x2e523c([0x66,0x72,0x6f,0x6d])](_0x33ea5c(_0x482710),_0x5c9ab0=>_0x5c9ab0[_0x2e523c([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x560b95=new window[(_0x2e523c([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x2e523c([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x307f29+_0x2e523c([0x2e])+_0x550a10),_0x116a41=window[_0x2e523c([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x2e523c([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x116a41)return;const _0x1c70a2=await _0x116a41[_0x2e523c([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x2e523c([0x6a,0x77,0x6b]),_0x34dd11,{[_0x2e523c([0x6e,0x61,0x6d,0x65])]:_0x2e523c([0x45,0x43,0x44,0x53,0x41]),[_0x2e523c([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x2e523c([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x2e523c([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x116a41[_0x2e523c([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x2e523c([0x6e,0x61,0x6d,0x65])]:_0x2e523c([0x45,0x43,0x44,0x53,0x41]),[_0x2e523c([0x68,0x61,0x73,0x68])]:{[_0x2e523c([0x6e,0x61,0x6d,0x65])]:_0x2e523c([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x1c70a2,_0x35de39,_0x560b95)||(_0x1c1e7=!0x1);}}function _0x3667d3(_0x5df823){return _0x5df823[_0x2e523c([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x2e523c([0x65,0x79]))?JSON[_0x2e523c([0x70,0x61,0x72,0x73,0x65])](_0x33ea5c(_0x5df823)):null;}function _0x33ea5c(_0x1c47f4){return window[_0x2e523c([0x61,0x74,0x6f,0x62])](_0x1c47f4[_0x2e523c([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x2e523c([0x2b]))[_0x2e523c([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x2e523c([0x2f])));}function _0x4735f6(_0x4f546c){let _0x1b1961=0x1505;function _0x1ea696(_0x3eba46){for(let _0xcd4461=0x0;_0xcd4461<_0x3eba46[_0x2e523c([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0xcd4461++){const _0x1273d0=_0x3eba46[_0x2e523c([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0xcd4461);_0x1b1961=(_0x1b1961<<0x5)+_0x1b1961+_0x1273d0,_0x1b1961&=_0x1b1961;}}function _0x5ef0d2(_0x45796d){Array[_0x2e523c([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x45796d)?_0x45796d[_0x2e523c([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x5ef0d2):_0x45796d&&typeof _0x45796d==_0x2e523c([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x2e523c([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x45796d)[_0x2e523c([0x73,0x6f,0x72,0x74])]()[_0x2e523c([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x23ccfe,_0x17a8d1])=>{_0x1ea696(_0x23ccfe),_0x5ef0d2(_0x17a8d1);}):_0x1ea696(window[_0x2e523c([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x45796d));}return _0x5ef0d2(_0x4f546c),_0x1b1961>>>0x0;}function _0x2d72a4(_0x46735e){return _0x46735e[_0x2e523c([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x2e523c([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x2e523c([0x30]));}function _0x1533a3(_0x2b27c1){return _0x2b27c1[_0x2e523c([0x73,0x70,0x6c,0x69,0x74])]('')[_0x2e523c([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x2e523c([0x6a,0x6f,0x69,0x6e])]('');}function _0xcf1ca7(){}function _0x2e523c(_0x2b5adf){return _0x2b5adf['map'](_0x3791c7=>String['fromCharCode'](_0x3791c7))['join']('');}_0x18dd8f(await _0x2d381c());}(this);}['showFakeVisualSelection'](){const _0x241cf2=this['editor']['model'];_0x241cf2['change'](_0x1a0963=>{const _0x53976a=_0x241cf2['document']['selection']['getRanges']();let _0x1cab2c=0x0;for(const _0x16f976 of _0x53976a){const _0x5c46ce=f+':'+_0x1cab2c;if(_0x241cf2['markers']['has'](_0x5c46ce))_0x1a0963['updateMarker'](_0x5c46ce,{'range':_0x16f976});else{if(_0x16f976['start']['isAtEnd']){const _0x5d17ba=_0x16f976['start']['getLastMatchingPosition'](({item:_0x172c62})=>!_0x241cf2['schema']['isContent'](_0x172c62),{'boundaries':_0x16f976});_0x1a0963['addMarker'](_0x5c46ce,{'usingOperation':!0x1,'affectsData':!0x1,'range':_0x1a0963['createRange'](_0x5d17ba,_0x16f976['end'])});}else _0x1a0963['addMarker'](_0x5c46ce,{'usingOperation':!0x1,'affectsData':!0x1,'range':_0x16f976});}_0x1cab2c++;}});}['hideFakeVisualSelection'](){const _0x25457e=this['editor']['model'],_0x1abd90=Array['from'](this['editor']['model']['markers']['getMarkersGroup'](f));_0x1abd90['length']&&_0x25457e['change'](_0x4cff7b=>{_0x1abd90['forEach'](_0x40c1ce=>{_0x4cff7b['removeMarker'](_0x40c1ce);});});}['insertContent'](_0x28570c,_0x3e2e36){const _0x21e2d4=this['_getAISelection'](),_0x2720e5=_0x3e2e36||_0x21e2d4['getFirstRange']();this['editor']['model']['canEditAt'](_0x2720e5)&&this['editor']['model']['change'](_0x3ef57c=>{this['hideFakeVisualSelection'](),_0x3e2e36||this['_resetContentOfSelectedTableCells'](_0x3ef57c,_0x21e2d4),this['_pasteHTMLUsingClipboard']({'insertAt':_0x2720e5,'writer':_0x3ef57c,'html':_0x28570c});});}['insertContentBelow'](_0x5e37d3){const {model:_0x4c6d84}=this['editor'],_0x386311=this['_getAISelection']();_0x4c6d84['change'](()=>{const _0x53b935=this['_prepareTableInsertBelowPosition'](_0x5e37d3,_0x386311)||this['_getDefaultInsertBelowPosition'](_0x386311);this['insertContent'](_0x5e37d3,_0x53b935);});}['_getAISelection'](){const _0x1756bb=this['editor']['model'],_0x3c37ca=Array['from'](_0x1756bb['markers']['getMarkersGroup'](f))['map'](_0x210cd3=>_0x210cd3['getRange']());return _0x1756bb['createSelection'](_0x3c37ca);}['_pasteHTMLUsingClipboard']({writer:_0x309156,html:_0x39492b,insertAt:_0x277dd2}){const {view:_0x4f1b40}=this['editor']['editing'],_0x56f7ff=this['editor']['plugins']['get'](_0x50bfeb),_0x588ad4=new gt();_0x588ad4['setData']('text/html',_0x39492b);const _0x131372=new ClipboardEvent('paste',{'clipboardData':_0x588ad4}),_0x9d22e6=new _0x5a93e8(_0x4f1b40,_0x131372,{'dataTransfer':new _0x5050b0(_0x588ad4)});_0x309156['setSelection'](_0x277dd2);const _0x48a902=(_0x4b0933,_0x2e8136)=>{_0x2e8136['resultRange']&&_0x309156['setSelection'](_0x2e8136['resultRange']);};_0x56f7ff['once']('contentInsertion',_0x48a902,{'priority':'lowest'}),_0x4f1b40['document']['fire']('paste',_0x9d22e6),_0x56f7ff['off']('contentInsertion',_0x48a902);}['_getDefaultInsertBelowPosition'](_0x11910c){const {model:_0x248ee1}=this['editor'],_0x129e5f=Array['from'](_0x11910c['getSelectedBlocks']());return _0x129e5f['length']?_0x248ee1['createPositionAfter'](_0x129e5f['pop']()):_0x11910c['getLastPosition']();}['_prepareTableInsertBelowPosition'](_0xf681d0,_0x481fc6){const {model:_0x778ef4,plugins:_0x2bd1e4}=this['editor'];if(_0x2bd1e4['has']('TableUtils')){const _0x51f87b=_0x2bd1e4['get']('TableUtils')['getSelectedTableCells'](_0x481fc6);if(_0x51f87b['length']){const _0x8c22b7=this['_getTableRowCountFromContent'](_0xf681d0),_0x3cf79e=this['_createEmptyTableRows'](_0x51f87b,_0x8c22b7);return _0x778ef4['createPositionAt'](_0x3cf79e,0x0);}}return null;}['_getTableRowCountFromContent'](_0xf1b53e){const _0x30b952=this['editor']['plugins']['get']('TableUtils'),_0x2cb858=this['editor']['data']['parse'](_0xf1b53e),_0x301c7c=Array['from'](_0x2cb858['getChildren']())['filter'](_0x2d2d7a=>_0x2d2d7a['is']('element','table'));let _0x21bda1=0x0;return _0x301c7c['forEach'](_0x3bca3c=>{_0x21bda1+=_0x30b952['getRows'](_0x3bca3c);}),_0x21bda1;}['_createEmptyTableRows'](_0x3c72ba,_0x2e205f){const _0x2face6=this['editor']['plugins']['get']('TableUtils'),_0x326eb1=_0x2face6['getRowIndexes'](_0x3c72ba),_0x31242b=_0x2face6['getColumnIndexes'](_0x3c72ba),_0x3ceff7=_0x326eb1['last']+0x1,_0x4d5133=_0x31242b['first'],_0x26766c=_0x3c72ba[0x0]['findAncestor']('table');for(let _0x351fcd=0x0;_0x351fcd<_0x2e205f;_0x351fcd++)_0x2face6['insertRows'](_0x26766c,{'at':_0x3ceff7});return _0x26766c['getChild'](_0x3ceff7)['getChild'](_0x4d5133);}['_resetContentOfSelectedTableCells'](_0x5799d4,_0x2f5a52){const {plugins:_0x11255c}=this['editor'],{model:_0x3d8127}=_0x5799d4;if(!_0x11255c['has']('TableUtils'))return;_0x11255c['get']('TableUtils')['getSelectedTableCells'](_0x2f5a52)['length']&&_0x3d8127['deleteContent'](_0x2f5a52);}}class E extends _0x20d875{static get['pluginName'](){return'AIAdapter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['afterInit'](){if(!this['textAdapter'])throw new _0x2e40f7('aiadapter-text-adapter-not-set',null);}}class R extends Error{constructor(_0x2e76d8){super(_0x2e76d8),this['name']='AIRequestError';}}function i(_0x1d983f,_0x48469c,_0x3bd3e8){const t=_0x1d983f['t'];switch(_0x48469c){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',_0x3bd3e8);case'Error\x20during\x20AI\x20content\x20generation:\x20%0':return t('Error\x20during\x20AI\x20content\x20generation:\x20%0',_0x3bd3e8);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'},_0x3bd3e8);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 _0x48469c;}}class j extends _0x4bf5bf{['_commandDefinitions'];constructor(_0x30be91,_0x12f4eb){super(_0x30be91),this['_commandDefinitions']=_0x12f4eb,this['set']('enabledCommandsIds',[]),this['on']('change:_hasContext',(_0x2faa45,_0x44a9e2,_0x3e60b8)=>{this['isEnabled']&&(this['enabledCommandsIds']=G(this['_commandDefinitions'],_0x3e60b8));}),this['set']('_hasContext',!0x1),this['on']('change:isEnabled',(_0x35521e,_0x549c7c,_0x4560ca)=>{this['enabledCommandsIds']=_0x4560ca?G(this['_commandDefinitions'],this['_hasContext']):[];});}['refresh'](){const _0x38ed01=this['editor']['model'];this['_hasContext']=function(_0x5735df){const _0x265fd4=_0x5735df['document']['selection'];return _0x265fd4['isCollapsed']?0x0!==[..._0x265fd4['getSelectedBlocks']()]['length']&&![..._0x265fd4['getSelectedBlocks']()][0x0]['isEmpty']:!!_0x5735df['hasContent'](_0x265fd4['getFirstRange']());}(_0x38ed01);const _0x200ea2=_0x38ed01['document']['selection'],_0x5e3a09=this['editor']['config']['get']('ai.aiAssistant.disabledElements');for(const _0x2220f7 of _0x200ea2['getRanges']())for(const _0x13bacf of _0x2220f7['getItems']())if(_0x13bacf['is']('element')&&_0x5e3a09['includes'](_0x13bacf['name']))return void(this['isEnabled']=!0x1);this['isEnabled']=!0x0;}['execute'](_0x21173a='',_0x2b3416='',_0x21c4a8='custom'){this['editor']['plugins']['get'](n)['showUI'](_0x21173a,_0x2b3416,_0x21c4a8);}}function G(_0x55c05b,_0x4b49e0){const _0x1613d7=new Set();for(const _0x3f61fe of _0x55c05b['values']())(_0x4b49e0||!0x1===_0x3f61fe['requiresContent'])&&_0x1613d7['add'](_0x3f61fe['id']);return Array['from'](_0x1613d7);}const Z=new RegExp(/^(.*?)<[a-zA-Z][a-zA-Z0-9_\-.]*[ >]/,'is');class k extends/* #__PURE__ -- @preserve */
24
+ _0x1cb62e(){['editor'];['textAdapter'];['view'];['_sanitizationContainer'];['_domParser'];['_xmlSerializer'];constructor(_0x29a93f,_0x35b79f,_0x821184){super(),this['editor']=_0x29a93f,this['textAdapter']=_0x35b79f,this['_sanitizationContainer']=document['createElement']('div'),this['_domParser']=new DOMParser(),this['_xmlSerializer']=new XMLSerializer(),this['view']=_0x821184,this['set']({'initialContext':'','currentContext':'','currentResponse':'','previousContext':void 0x0,'previousQuery':void 0x0,'previousLabel':void 0x0,'isProcessing':!0x1}),this['on']('set:currentContext',(_0x8cd4f3,_0x251813,_0x550f30)=>{this['view']['value']=this['_sanitizeHTML'](_0x550f30);}),this['listenTo'](this['view'],'submitPrompt',(_0x594790,_0x5195e8)=>{const _0x2039e1=this['currentContext']||this['initialContext'];this['_handleQuery'](_0x5195e8,_0x2039e1,'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:_0x13a09f,query:_0x1ac000,htmlContent:_0x2c61ab,label:_0x37cdde,mainActionLabel:_0xb7d3b}){this['view']['prompt']=_0x37cdde,this['view']['mainAction']=_0xb7d3b,this['initialContext']=_0x2c61ab,_0x1ac000&&(this['view']['isRendered']?this['_handleQuery'](_0x1ac000,_0x2c61ab,_0x13a09f,_0x37cdde):this['view']['once']('render',()=>{this['_handleQuery'](_0x1ac000,_0x2c61ab,_0x13a09f,_0x37cdde);}));}['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'](_0x2bc044,_0x21aa1c,_0x4ca2bd,_0x36a4c0){return this['isProcessing']=!0x0,this['view']['startProcessing'](),this['previousContext']=_0x21aa1c,this['previousQuery']=_0x2bc044,this['previousLabel']=_0x36a4c0||_0x2bc044,this['previousActionId']=_0x4ca2bd,new Promise(_0x2702b3=>{this['textAdapter']['makeRequest']({'query':_0x2bc044,'context':_0x21aa1c,'onData':_0x87291e=>{this['currentResponse']=_0x87291e,this['currentContext']=this['_parseAndNormalizeContent'](this['currentResponse']);},'actionId':_0x4ca2bd})['then'](()=>{!this['currentContext']&&this['currentResponse']&&(this['currentContext']=this['_parseAndNormalizeContent'](this['currentResponse'],!0x0));})['catch'](_0x2e6267=>{_0x2e6267 instanceof R?this['view']['handleError'](_0x2e6267['message']):this['view']['handleError'](),_0x2702b3();})['finally'](()=>{this['stopProcessing'](),_0x2702b3();});});}['_parseAndNormalizeContent'](_0x592f5f,_0x31a592=!0x1){const _0x4d0a96=Z['exec'](_0x592f5f);_0x592f5f=_0x4d0a96?_0x592f5f['substring'](_0x4d0a96[0x1]['length']):_0x592f5f['length']<0x64&&!_0x31a592?'':this['_stripMarkdownSyntax'](_0x592f5f);const _0x5e987c=this['_domParser']['parseFromString'](_0x592f5f,'text/html');if(_0x4d0a96){const _0x2569ea=Array['from'](_0x5e987c['body']['childNodes']);_0x2569ea['reverse']();for(const _0x5129d0 of _0x2569ea){if(_0x5129d0['nodeType']==Node['ELEMENT_NODE'])break;_0x5129d0['remove']();}}const _0x59dbd3=this['editor']['data']['processor']['toView'](this['_xmlSerializer']['serializeToString'](_0x5e987c['body']));this['_isH1TagSupportEnabled']()||this['_normalizeResponseHeadings'](_0x59dbd3);const _0x258dc3=this['editor']['config']['get']('ai.aiAssistant.preserveComments'),_0x3e76f0=this['editor']['data']['toModel'](_0x59dbd3);return _0x258dc3||_0x3e76f0['markers']['clear'](),this['editor']['data']['stringify'](_0x3e76f0);}['_normalizeResponseHeadings'](_0x24316b){const _0x1a85f9=new _0x419714(this['editor']['editing']['view']['document']),_0x63013=new _0x27fb87({'name':/^h[1-5]$/}),_0x26805b=[];let _0x373688=!0x1;for(const _0x271cd9 of _0x24316b)_0x271cd9['is']('element')&&_0x63013['match'](_0x271cd9)&&(_0x26805b['push'](_0x271cd9),'h1'==_0x271cd9['name']&&(_0x373688=!0x0));if(_0x373688){for(const _0x399093 of _0x26805b)_0x1a85f9['rename']('h'+(parseInt(_0x399093['name'][0x1])+0x1),_0x399093);}}['_isH1TagSupportEnabled'](){const {data:_0xb9dd21,editing:_0x1568fa}=this['editor'],_0x356af9=_0xb9dd21['htmlProcessor']['toView']('<h1></h1>'),_0x2b3047=_0xb9dd21['toView'](_0xb9dd21['toModel'](_0x356af9));return!!_0x1568fa['view']['domConverter']['viewToDom'](_0x2b3047)['querySelector']('h1');}['_sanitizeHTML'](_0x526d06){return this['editor']['editing']['view']['domConverter']['setContentOf'](this['_sanitizationContainer'],_0x526d06),this['_sanitizationContainer']['innerHTML'];}['_stripMarkdownSyntax'](_0x256027){const _0x44f28c=_0x256027['trim']();return _0x44f28c['startsWith']('```html')?_0x44f28c['endsWith']('```')?_0x44f28c['substring'](0x7,_0x44f28c['length']-0x3):_0x44f28c['substring'](0x7):_0x256027;}}const M={'REPLACE':'replace','INSERT':'insert'};class lt extends at{constructor(_0xf71d94){super(_0xf71d94),this['set']('isVisible',!0x1),this['set']('mainAction',M['REPLACE']),this['replaceButton']=this['_createButton']('','ck-button-action'),this['replaceButton']['bind']('label')['to'](this,'mainAction',_0x30a4ca=>i(_0xf71d94,'AI_'+_0x30a4ca['toUpperCase']()+'_CONTENT')),this['insertButton']=this['_createButton'](i(_0xf71d94,'Insert\x20below')),this['tryAgainButton']=this['_createButton'](i(_0xf71d94,'Try\x20again')),this['stopButton']=this['_createButton'](i(_0xf71d94,'Stop'));const _0x15abe1=this['bindTemplate'];this['extendTemplate']({'attributes':{'class':['ck-ai-form__toolbar',_0x15abe1['if']('isVisible','ck-hidden',_0x593390=>!_0x593390)]}}),this['items']['addMany']([this['replaceButton'],this['insertButton'],this['tryAgainButton'],this['stopButton']]);}['_createButton'](_0x3b1ae3,_0x1ada3f){const _0x4f7dfc=new _0x4fbeea(this['locale']);return _0x4f7dfc['set']({'label':_0x3b1ae3,'class':_0x1ada3f||'','isVisible':!0x0,'withText':!0x0}),_0x4f7dfc;}}class Y extends _0x25421b{['contentFieldView'];['copyButtonView'];constructor(_0x313405,_0x56220f=''){super(_0x313405),this['set']({'value':null,'isVisible':!0x1,'isProcessing':!0x1});const _0x247063=this['bindTemplate'];this['contentFieldView']=new At(_0x313405,_0x56220f),this['copyButtonView']=this['_createCopyButton'](),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form__content-area-wrapper',_0x247063['if']('isVisible','ck-hidden',_0x4c1f4f=>!_0x4c1f4f)],'tabindex':'-1'},'children':[{'tag':'div','attributes':{'class':['ck','ck-ai-form__content-area',_0x247063['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 _0x8ac9b1=!0x1;this['on']('change:value',(_0x2c846d,_0x4326af,_0xbf6fa5)=>{const _0x269da1=!this['contentFieldView']['element']['querySelector']('.ck-ai-form__loader');this['contentFieldView']['setContent'](_0xbf6fa5),this['isProcessing']&&_0x269da1&&!_0x8ac9b1&&this['element']['scrollTo']({'top':this['element']['scrollHeight'],'behavior':'smooth'});}),this['on']('change:isProcessing',(_0x57f416,_0x35b95c,_0x4ed071)=>{_0x8ac9b1=!0x1,_0x4ed071?(this['value']=null,this['contentFieldView']['appendLoader']()):this['value']||this['contentFieldView']['setContent']('');}),this['listenTo'](this['element'],'wheel',()=>{_0x8ac9b1=!0x0;}),this['listenTo'](this['element'],'mousedown',()=>{_0x8ac9b1=!0x0;});}['focus'](){this['element']['focus']();}['_createCopyButton'](){const _0x176429=this['locale'],_0x48176e=new _0x4fbeea(this['locale']),_0x17bdf4='ck-ai-form__copy-button';return _0x48176e['set']({'label':i(_0x176429,'Copy'),'icon':_0x171f83,'class':_0x17bdf4,'tooltip':!0x0}),_0x48176e['bind']('isVisible')['to'](this,'value',_0x2dc4a1=>!!_0x2dc4a1),_0x48176e['bind']('isEnabled')['to'](this,'isProcessing',_0x414b39=>!_0x414b39),_0x48176e['on']('execute',()=>{this['_copyHTMLToClipboard'](this['contentFieldView']['element']),_0x48176e['icon']=_0xc7bbc8,_0x48176e['class']=_0x17bdf4+'\x20ck-ai-form__copy-button--copied',this['focus'](),setTimeout(()=>{_0x48176e['icon']=_0x171f83,_0x48176e['class']=_0x17bdf4;},0x3e8);}),_0x48176e;}['_copyHTMLToClipboard'](_0x10846f){const {window:_0x3723a8,document:_0x430ee8}=_0x968ec2;if(_0x3723a8['ClipboardItem']){const {Blob:_0x35ef3f,ClipboardItem:_0xb5a9ca}=_0x3723a8,_0x5b50a9=[new _0xb5a9ca({'text/html':new _0x35ef3f([_0x10846f['innerHTML']],{'type':'text/html'}),'text/plain':new _0x35ef3f([_0x10846f['textContent']||''],{'type':'text/plain'})})];navigator['clipboard']['write'](_0x5b50a9);}else{const _0x270c6b=_0x430ee8['createElement']('div');_0x270c6b['style']['position']='absolute',_0x270c6b['style']['left']='-9999px',_0x270c6b['innerHTML']='<span>[</span>'+_0x10846f['innerHTML']+'<span>]</span>',_0x430ee8['body']['appendChild'](_0x270c6b);const _0x54dd6a=_0x430ee8['createRange']();_0x54dd6a['setStartAfter'](_0x270c6b['firstElementChild']),_0x54dd6a['setEndBefore'](_0x270c6b['lastElementChild']);const _0x5e7e1e=_0x3723a8['getSelection']();_0x5e7e1e['removeAllRanges'](),_0x5e7e1e['addRange'](_0x54dd6a),_0x430ee8['execCommand']('copy'),_0x270c6b['remove']();}}}class At extends _0x25421b{constructor(_0x381a46,_0x9b4520=''){super(_0x381a46),this['loaderView']=this['_createLoader'](),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-content',_0x9b4520,'ck-reset_all-excluded','ck-ai-form__content-field']}});}['setContent'](_0x245095){this['element']['innerHTML']=_0x245095;}['appendLoader'](){this['element']['appendChild'](this['loaderView']['element']);}['_createLoader'](){const _0x2a294a=new _0x25421b(),_0x1c568b=this['locale'],_0xc29a2c=new _0x30186b();return _0xc29a2c['isVisible']=!0x0,_0x2a294a['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form__loader']},'children':[_0xc29a2c,{'text':i(_0x1c568b,'AI\x20is\x20writing...')}]}),_0x2a294a['render'](),_0x2a294a;}}class st extends _0x25421b{constructor(_0x425655,_0xba8959=''){super(_0x425655);const _0x178bf6=new rt(),_0x1102cd=this['bindTemplate'];this['set']('text',_0xba8959),_0x178bf6['content']=tt,this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form__error']},'children':[_0x178bf6,{'text':_0x1102cd['to']('text')}]});}}class ct extends nt{['submitButtonView'];['showHistoryButtonView'];constructor(_0x28eb92,_0x3b266e){super(_0x28eb92,_0x3b266e),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',(_0x1b9c59,_0x30517f)=>{_0x1b9c59['target']==this['queryView']['fieldView']['element']&&(this['submit'](),_0x30517f());});}['_createSubmitButton'](){const _0x3847ff=new _0x4fbeea(this['locale']),_0x1af001=this['locale'];return _0x3847ff['set']({'icon':ht,'label':i(_0x1af001,'Submit'),'isVisible':!0x0,'tooltip':!0x0,'class':'ck-ai-form__submit'}),_0x3847ff['on']('execute',()=>{this['submit']();}),_0x3847ff['bind']('isEnabled')['to'](this['queryView']['fieldView'],'isEmpty',this,'isEnabled',(_0x3460bf,_0x48e40d)=>!_0x3460bf&&_0x48e40d),_0x3847ff;}['_createShowHistoryButton'](){const _0x495988=new _0x4fbeea(this['locale']),_0x3a3a4b=this['resultsView'],_0x22b391=this['locale'];_0x495988['set']({'label':i(_0x22b391,'History'),'withText':!0x1,'icon':et,'tooltip':!0x0,'tooltipPosition':'sw','class':'ck-ai-form__toggle-history'}),_0x495988['bind']('isOn')['to'](_0x3a3a4b,'isVisible'),_0x495988['bind']('isEnabled')['to'](this,'isEnabled'),_0x495988['on']('execute',()=>{_0x3a3a4b['isVisible']=!_0x3a3a4b['isVisible'],_0x3a3a4b['isVisible']?this['filteredView']['focus']():this['focus']();});const _0x32fd3b=()=>{_0x968ec2['window']['requestAnimationFrame'](()=>{if(ot(this['element'])){const _0xd81904=new it(this['queryView']['fieldView']['element']),_0x421c46=_0xd81904['width'],_0x552d28='rtl'===_0x22b391['uiLanguageDirection']?'left':'right';_0xd81904['excludeScrollbarsAndBorders'](),_0x495988['element']['style'][_0x552d28]=_0x421c46-_0xd81904['width']+0x1+'px';}});};return this['queryView']['fieldView']['on']('update',_0x32fd3b),this['on']('render',_0x32fd3b),_0x495988;}['submit'](){const _0x2ba008=this['queryView']['fieldView']['element']['value'];this['fire']('submit',_0x2ba008);}['focus'](_0x162a33){-0x1===_0x162a33?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}}class ft extends Ct{['historyGroupView'];['clearHistoryButton'];constructor(_0x12b513){super(_0x12b513),this['clearHistoryButton']=this['_createClearHistoryButton'](),this['historyGroupView']=new Ht(),this['historyGroupView']['children']['add'](this['clearHistoryButton'],0x1),this['historyGroupView']['label']=i(_0x12b513,'Prompt\x20history'),this['historyGroupView']['items']['delegate']('execute')['to'](this),this['items']['add'](this['historyGroupView']);}['filter'](){let _0x410996=0x0;for(const _0x1f18e9 of this['items'])_0x410996+=_0x1f18e9['items']['length'];return{'resultsCount':_0x410996,'totalItemsCount':_0x410996};}['_createClearHistoryButton'](){const _0x52dc48=this['locale'],_0x51b0bd=new _0x4fbeea(this['locale']);return _0x51b0bd['set']({'label':'('+i(_0x52dc48,'Clear')+')','withText':!0x0}),_0x51b0bd['on']('execute',()=>this['fire']('clearHistory')),_0x51b0bd;}}class bt extends xt{constructor(_0x52712c){super();const _0x74d52=new kt(),_0x1c1d56=new _0x4fbeea(this['locale'],_0x74d52);this['children']['add'](_0x1c1d56),_0x1c1d56['set']({'label':_0x52712c['prompt'],'withText':!0x0}),_0x1c1d56['on']('execute',()=>{this['fire']('execute',{'value':jt(_0x52712c['prompt'])});});}}const ts='CKEditor/AIFormView/PromptHistory';class wt extends _0x56bb48{constructor(){super(),this['_loadFromSessionStorage'](),this['on']('add',(_0xafb5d1,_0x1f32c2)=>{const _0x59dc39=os(_0x1f32c2['prompt']);for(const _0x3fe699 of this)if(_0x3fe699!=_0x1f32c2&&os(_0x3fe699['prompt'])===_0x59dc39){this['remove'](_0x3fe699);break;}this['length']>0x14&&this['remove'](this['last']),this['_saveToSessionStorage']();}),this['on']('remove',()=>{this['_saveToSessionStorage']();});}['_loadFromSessionStorage'](){const _0x514641=sessionStorage['getItem'](ts)||'[]';this['addMany'](JSON['parse'](_0x514641));}['_saveToSessionStorage'](){sessionStorage['setItem'](ts,JSON['stringify'](this['map'](_0x5d848f=>_0x5d848f)));}}function os(_0x1bcea1){return _0x1bcea1['toLowerCase']()['trim']();}class _ extends _0x25421b{['focusTracker'];['keystrokes'];['contentArea'];['toolbar'];['promptView'];['errorView'];['_focusables'];['focusCycler'];['_promptHistory'];constructor(_0x1abf1c,_0x41bb5b,_0x70deea=''){super(_0x1abf1c),this['set']('isEnabled',!0x0),this['set']('isProcessing',!0x1),this['set']('prompt',''),this['set']('value',''),this['set']('isError',!0x1),this['set']('mainAction',M['REPLACE']),this['_promptHistory']=new wt(),this['errorView']=new st(_0x1abf1c),this['contentArea']=new Y(_0x1abf1c,_0x70deea),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 mt(),this['keystrokes']=new ut(),this['_focusables']=this['createCollection']([this['contentArea'],this['contentArea']['copyButtonView'],this['toolbar'],this['promptView']]),this['focusCycler']=new pt({'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 _0x42ffca=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form',_0x41bb5b],'tabindex':'-1'},'children':[{'tag':'div','attributes':{'class':['ck','ck-ai-form-content']},'children':[{'tag':'div','attributes':{'class':[_0x42ffca['if']('isError','ck-hidden',_0xd7c6e5=>!_0xd7c6e5)]},'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'](_0x34b123=0x1){-0x1===_0x34b123?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 _0x452ead=this['locale'],_0x5e4712=new ct(_0x452ead,{'queryView':{'label':i(_0x452ead,'Ask\x20AI\x20to\x20edit\x20or\x20generate'),'creator':dt,'showIcon':!0x1,'showResetButton':!0x1},'infoView':{'text':{'noSearchableItems':{'primary':i(_0x452ead,'Empty\x20history'),'secondary':i(_0x452ead,'Ask\x20AI\x20and\x20your\x20prompts\x20will\x20be\x20listed\x20here\x20for\x20you\x20to\x20use\x20later.')}}},'filteredView':this['_createHistoryView'](),'queryMinChars':0x1/0x0,'resetOnBlur':!0x1});return _0x5e4712['bind']('isEnabled')['to'](this,'isEnabled',this,'isProcessing',(_0x24fb0d,_0x2548be)=>_0x24fb0d&&!_0x2548be),this['listenTo'](_0x5e4712,'submit',(_0x7f264d,_0x211d13)=>{this['prompt']=_0x211d13;const _0x47d8f1=yt(_0x211d13);this['fire']('submitPrompt',_0x47d8f1),_0x211d13['trim']()&&this['_promptHistory']['add']({'prompt':_0x47d8f1},0x0);},{'priority':'high'}),_0x5e4712;}['_createHistoryView'](){const _0x5a271b=new ft(this['locale']);return _0x5a271b['historyGroupView']['items']['bindTo'](this['_promptHistory'])['as'](bt),_0x5a271b['on']('clearHistory',()=>{this['_promptHistory']['clear'](),this['promptView']['search'](''),this['promptView']['focus']();}),_0x5a271b;}['_createToolbar'](){const _0x56e61b=new lt(this['locale']);return _0x56e61b['replaceButton']['bind']('isEnabled')['to'](this,'isEnabled',this,'isProcessing',this,'value',(_0x3ab61f,_0x23da59,_0x211266)=>_0x3ab61f&&!_0x23da59&&!!_0x211266),_0x56e61b['replaceButton']['delegate']('execute')['to'](this,'replaceContent'),_0x56e61b['insertButton']['bind']('isEnabled')['to'](this,'isEnabled',this,'isProcessing',this,'value',(_0x2374ee,_0x5d86e1,_0x316c2a)=>_0x2374ee&&!_0x5d86e1&&!!_0x316c2a),_0x56e61b['insertButton']['delegate']('execute')['to'](this,'insertContentBelow'),_0x56e61b['tryAgainButton']['bind']('isEnabled')['to'](this,'isEnabled',this,'isProcessing',(_0x1f618b,_0x2a9e1c)=>_0x1f618b&&!_0x2a9e1c),_0x56e61b['tryAgainButton']['delegate']('execute')['to'](this,'tryAgainEvent'),_0x56e61b['stopButton']['bind']('isEnabled')['to'](this,'isProcessing'),_0x56e61b['stopButton']['delegate']('execute')['to'](this,'stopProcessing'),_0x56e61b;}['startProcessing'](){this['value']='',this['isError']=!0x1,this['isProcessing']=!0x0,this['contentArea']['isVisible']=!0x0,this['toolbar']['isVisible']=!0x0,this['contentArea']['focus']();}['finishProcessing'](){const _0x4c600b=this['locale'];this['isProcessing']=!0x1,this['prompt']='',this['promptView']['reset'](),this['value']&&(this['promptView']['queryView']['label']=i(_0x4c600b,'Ask\x20AI\x20to\x20improve\x20generated\x20text'));}['handleError'](_0x2bd636){const _0x136d28=this['locale'];this['finishProcessing'](),this['isError']=!0x0,this['errorView']['text']=_0x2bd636||i(_0x136d28,'AI_ERROR_FAILED'),this['value']||(this['contentArea']['isVisible']=!0x1);}}const w=globalThis['DataTransfer'];class n extends _0x20d875{['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[_0x867061,a,E,_0xac8cba];}constructor(_0x3410c6){super(_0x3410c6),_0x3410c6['config']['define']('ai.aiAssistant.disabledElements',['media','rawHtml','tableOfContents']),_0x3410c6['config']['define']('ai.aiAssistant.contentAreaCssClass',''),_0x3410c6['config']['define']('ai.useTheme',!0x0),this['_uiCssClasses']='ck-ai-assistant-ui'+(_0x3410c6['config']['get']('ai.useTheme')?'\x20ck-ai-assistant-ui_theme':'');}['init'](){const {editor:_0x4d55d0}=this;this['_aiAdapter']=_0x4d55d0['plugins']['get'](E),this['_dialog']=_0x4d55d0['plugins']['get'](_0xac8cba),this['_formView']=null,this['_commandDefinitions']=this['_getResolvedCommandsDefinitions']();const _0x1e55db=new j(_0x4d55d0,Array['from'](this['_commandDefinitions']['values']()));_0x4d55d0['commands']['add']('showAIAssistant',_0x1e55db),_0x4d55d0['ui']['componentFactory']['add']('aiCommands',_0x1886d1=>{const _0x15b218=_0x57d579(_0x1886d1);return _0x15b218['set']({'class':'ck-ai-commands-dropdown\x20'+this['_uiCssClasses']}),_0x15b218['buttonView']['set']({'label':i(_0x1886d1,'AI\x20Commands'),'icon':_0x1d99dc,'tooltip':!0x0}),_0x15b218['on']('execute',_0x487bb8=>this['_onExecute'](_0x487bb8['source']['id'])),_0x1af8da(_0x15b218,_0x4d55d0['ui']['view']['body'],function(_0x4346be){const _0x511db9=o(_0x4346be['config']['get']('ai.aiAssistant.commands'),_0x4346be['locale']),_0x159a9f=U(_0x4346be,_0x511db9)['filter'](_0x1c3572=>_0x1c3572['commands']['length']);if(0x1===_0x159a9f['length'])return U(_0x4346be,_0x159a9f[0x0]['commands'])['map'](_0xb5ea4b=>({'id':_0xb5ea4b['id'],'label':_0xb5ea4b['label']}));return _0x159a9f['map'](_0x28d307=>{const {groupId:_0xb29cc4,groupLabel:_0x2e2d11,commands:_0x47b326}=_0x28d307,_0x3c2366=U(_0x4346be,_0x47b326)['map'](_0x462894=>({'id':_0x462894['id'],'label':_0x462894['label']}));return{'id':_0xb29cc4,'menu':_0x2e2d11||_0xb29cc4,'children':_0x3c2366};});}(_0x4d55d0),{'ariaLabel':i(_0x1886d1,'AI\x20Commands')}),_0x15b218['menuView']['menuPanelClass']='ck-ai-commands-dropdown\x20'+this['_uiCssClasses'],_0x1e55db['on']('change:enabledCommandsIds',_0x16e615),_0x15b218['menuView']['once']('render',_0x16e615),_0x15b218;function _0x16e615(){_0x15b218['isEnabled']=_0x1e55db['enabledCommandsIds']['length']>0x0;for(const _0x4a850d of _0x15b218['menuView']['buttons'])_0x4a850d['isEnabled']=_0x1e55db['enabledCommandsIds']['includes'](_0x4a850d['id']);}}),_0x4d55d0['ui']['componentFactory']['add']('menuBar:aiCommands',_0x2ff09b=>{const _0x2788e8=new _0x10ae44(_0x2ff09b);_0x2788e8['buttonView']['set']({'label':i(_0x2ff09b,'AI\x20Commands'),'icon':_0x1d99dc}),_0x2788e8['bind']('isEnabled')['to'](_0x1e55db,'enabledCommandsIds',_0x4e86f6=>_0x4e86f6['length']>0x0);const _0x372b33=o(_0x4d55d0['config']['get']('ai.aiAssistant.commands'),_0x2ff09b);return this['_populateMenuBarMenu'](_0x1e55db,_0x2788e8,_0x372b33,_0xb47d8a=>this['_onExecute'](_0xb47d8a)),_0x2788e8;}),_0x4d55d0['ui']['componentFactory']['add']('aiAssistant',()=>{const _0xd4f106=this['_createAIAssistantUIButton'](_0x4fbeea);return _0xd4f106['set']({'tooltip':!0x0,'class':'ck-ai-assistant-button\x20'+this['_uiCssClasses']}),_0xd4f106;}),_0x4d55d0['ui']['componentFactory']['add']('menuBar:aiAssistant',()=>{const _0x35e7f3=this['_createAIAssistantUIButton'](_0x288c59);return _0x35e7f3['set']({'role':'menuitemcheckbox'}),_0x35e7f3;}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x3fc165=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x378796;for(const _0x3b9599 in _0x3fc165){const _0x39bbe7=_0x3b9599,_0x551697=_0x3fc165[_0x39bbe7];if('aiLicenseKeyValid'==_0x551697||'aiLicenseKeyInvalid'==_0x551697||'aiLicenseKeyExpired'==_0x551697||'aiLicenseKeyDomainLimit'==_0x551697||'aiLicenseKeyNotAllowed'==_0x551697||'aiLicenseKeyEvaluationLimit'==_0x551697||'aiLicenseKeyTrialLimit'==_0x551697||'aiLicenseKeyUsageLimit'==_0x551697){delete _0x3fc165[_0x39bbe7],_0x378796=_0x551697,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'aiLicenseKeyInvalid'==_0x378796&&_0x3fc165['_showLicenseError']('invalid'),'aiLicenseKeyExpired'==_0x378796&&_0x3fc165['_showLicenseError']('expired'),'aiLicenseKeyDomainLimit'==_0x378796&&_0x3fc165['_showLicenseError']('domainLimit'),'aiLicenseKeyNotAllowed'==_0x378796&&_0x3fc165['_showLicenseError']('featureNotAllowed','AIAssistant'),'aiLicenseKeyEvaluationLimit'==_0x378796&&_0x3fc165['_showLicenseError']('evaluationLimit'),'aiLicenseKeyTrialLimit'==_0x378796&&_0x3fc165['_showLicenseError']('trialLimit'),'aiLicenseKeyUsageLimit'==_0x378796&&_0x3fc165['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['showUI'](_0x41a227='',_0x3e80a8='',_0x377079='custom'){const _0x5863e9=this['editor'],_0x2fa8ca=_0x5863e9['editing']['view'],_0x471246=_0x5863e9['plugins']['get'](a),_0x268213=_0x5863e9['plugins']['get'](_0x867061);_0x471246['showFakeVisualSelection']();const _0x25742f=new w(),_0x24d848=new ClipboardEvent('copy',{'clipboardData':_0x25742f}),_0xb10caf=new _0x5050b0(_0x25742f),_0x3dd817=new _0x5a93e8(_0x2fa8ca,_0x24d848,{'dataTransfer':_0xb10caf});_0x268213['_forceMarkersCopy']('comment',()=>{_0x2fa8ca['document']['fire']('copy',_0x3dd817);}),this['_formView']||(this['_initView'](),this['_aiAssistantController']=new k(_0x5863e9,this['_aiAdapter']['textAdapter'],this['_formView']));let _0x5268b2=_0xb10caf['getData']('text/html');const _0x1a35b9=_0x5863e9['model']['document']['selection'],_0xa6b4a8=Array['from'](_0x1a35b9['getRanges']());0x1===_0xa6b4a8['length']&&_0xa6b4a8[0x0]['isFlat']&&!_0x1a35b9['getSelectedElement']()&&''!==_0x5268b2['replace'](/&nbsp;/g,'')['trim']()&&(_0x5268b2='<p>'+_0x5268b2+'</p>'),this['_aiAssistantController']['updateView']({'actionId':_0x377079,'query':_0x41a227,'htmlContent':_0x5268b2,'label':_0x3e80a8,'mainActionLabel':M[_0x5863e9['model']['document']['selection']['isCollapsed']?'INSERT':'REPLACE']}),'aiAssistant'!==this['_dialog']['id']?this['_dialog']['show']({'id':'aiAssistant','icon':_0x4004c0,'title':i(this['editor']['locale'],'AI\x20Assistant'),'content':this['_formView'],'position':_0x14a8e3['EDITOR_TOP_SIDE'],'onShow':()=>{this['_formView']['focus']();},'onHide':()=>{this['_aiAssistantController']['reset'](),_0x471246['hideFakeVisualSelection']();}}):this['_dialog']['view']['wasMoved']||this['_dialog']['view']['updatePosition']();}['hideUI'](){this['_dialog']['hide']();}['_getResolvedCommandsDefinitions'](){const _0x2e4e64=new Map(),_0x3fe44=o(this['editor']['config']['get']('ai.aiAssistant.commands'),this['editor']['locale']);for(const _0x20639d of _0x3fe44)for(const _0x3cfb54 of _0x20639d['commands'])_0x2e4e64['set'](_0x3cfb54['id'],{..._0x3cfb54,'groupId':_0x20639d['groupId'],'groupLabel':_0x20639d['groupLabel']||_0x20639d['groupId']});return _0x2e4e64;}['_createAIAssistantUIButton'](_0x5954fc){const _0x10f1a3=this['editor'],_0x45cba0=_0x10f1a3['commands']['get']('showAIAssistant'),_0x5de1bf=new _0x5954fc(_0x10f1a3['locale']);return _0x5de1bf['set']({'label':i(_0x10f1a3['locale'],'AI\x20Assistant'),'icon':_0x4004c0,'isToggleable':!0x0}),_0x5de1bf['bind']('isEnabled')['to'](_0x45cba0),_0x5de1bf['bind']('isOn')['to'](this['_dialog'],'id',_0x2bf8ed=>'aiAssistant'===_0x2bf8ed),this['listenTo'](_0x5de1bf,'execute',()=>{_0x5de1bf['isOn']?this['hideUI']():_0x45cba0['execute']();}),_0x5de1bf;}['_initView'](){const _0x14bb82=this['editor']['plugins']['get'](a);this['_formView']=new _(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',()=>{_0x14bb82['insertContent'](this['_aiAssistantController']['currentContext']),this['hideUI']();}),this['listenTo'](this['_formView'],'insertContentBelow',()=>{_0x14bb82['insertContentBelow'](this['_aiAssistantController']['currentContext']),this['hideUI']();}),this['_initAriaAiStatusChangeAnnouncements']();}['_initAriaAiStatusChangeAnnouncements'](){const {locale:_0x431dd3,ui:{ariaLiveAnnouncer:_0x280c67}}=this['editor'];this['_formView']['contentArea']['on']('change:isProcessing',(_0x550d53,_0x20b4f6,_0x546796)=>{const _0x2f67ea=this['_aiAssistantController']['currentContext'];_0x546796?_0x280c67['announce'](i(_0x431dd3,'AI\x20is\x20writing')):_0x2f67ea&&_0x280c67['announce'](i(_0x431dd3,'Generated\x20content:\x20%0',_0x2f67ea),{'politeness':'polite','isUnsafeHTML':!0x0});}),this['_formView']['on']('change:isError',(_0x5bfe02,_0x1d141e,_0x9467c6)=>{if(_0x9467c6){const _0x8a1a17=this['_formView']['errorView']['text'];_0x280c67['announce'](i(_0x431dd3,'Error\x20during\x20AI\x20content\x20generation:\x20%0',_0x8a1a17));}});}['_onExecute'](_0x238951){const _0x44b5d7=this['_commandDefinitions']['get'](_0x238951),_0x2374d5=this['editor'],_0x46a447=_0x2374d5['model']['document']['selection'],_0x5827d5=_0x2374d5['commands']['get']('showAIAssistant'),_0x487c0a=_0x2374d5['plugins']['get'](a),_0x2af69e=''+(_0x44b5d7['groupId']!==x?_0x44b5d7['groupLabel']+':\x20':'')+_0x44b5d7['label'];if(!0x1!==_0x44b5d7['requiresContent']&&_0x46a447['isCollapsed']){const _0x3e2720=_0x15db7c(_0x46a447['getSelectedBlocks']())||_0x2374d5['model']['schema']['getLimitElement'](_0x46a447);_0x2374d5['model']['change'](_0x1aeb47=>{_0x1aeb47['setSelection'](_0x3e2720,'in');});}_0x487c0a['showFakeVisualSelection'](),_0x5827d5['execute'](_0x44b5d7['prompt'],_0x2af69e,'command:'+_0x238951);}['_populateMenuBarMenu'](_0x278c6f,_0x1d9e0d,_0x42b4be,_0x2afc16){const _0x59ff6a=this['editor'],_0x1f4ef2=_0x59ff6a['locale'],_0x35c810=new _0xb10bb2(_0x1f4ef2),_0x43bfb6=U(_0x59ff6a,_0x42b4be)['filter'](_0x2e3d79=>_0x2e3d79['commands']['length']);0x1===_0x43bfb6['length']?this['_getMenuBarGroupButtons']({'command':_0x278c6f,'commands':_0x43bfb6[0x0]['commands'],'parentMenuView':_0x1d9e0d,'onExecute':_0x2afc16})['forEach'](_0x2c3797=>_0x35c810['items']['add'](_0x2c3797)):_0x43bfb6['forEach'](({groupId:_0x49371d,groupLabel:_0x18960c,commands:_0x2960ad})=>{const _0x3719d9=new _0x577f0a(_0x1f4ef2,_0x1d9e0d),_0x244c65=new _0x10ae44(_0x1f4ef2),_0x5744b8=new _0xb10bb2(_0x1f4ef2),_0x5ae1c5=this['_getMenuBarGroupButtons']({'command':_0x278c6f,'commands':_0x2960ad,'parentMenuView':_0x244c65,'onExecute':_0x2afc16});_0x244c65['buttonView']['set']({'label':_0x18960c||_0x49371d}),_0x244c65['delegate']('execute')['to'](_0x1d9e0d),_0x5744b8['items']['addMany'](_0x5ae1c5),_0x244c65['panelView']['children']['add'](_0x5744b8),_0x3719d9['children']['add'](_0x244c65),_0x35c810['items']['add'](_0x3719d9);}),_0x1d9e0d['panelView']['children']['add'](_0x35c810);}['_getMenuBarGroupButtons']({command:_0xd159f9,commands:_0x118779,parentMenuView:_0x105436,onExecute:_0x423fd2}){const _0x29600c=this['editor'],_0x3bca51=_0x29600c['locale'];return U(_0x29600c,_0x118779)['map'](_0x163cce=>{const _0xecc22c=new _0x577f0a(_0x3bca51,_0x105436),_0x48c148=new _0x288c59(_0x3bca51);return _0x48c148['set']({'label':_0x163cce['label']}),_0x48c148['delegate']('execute')['to'](_0x105436),_0x48c148['on']('execute',()=>_0x423fd2(_0x163cce['id'])),_0x48c148['bind']('isEnabled')['to'](_0xd159f9,'enabledCommandsIds',_0x5ddfaf=>_0x5ddfaf['includes'](_0x163cce['id'])),_0xecc22c['children']['add'](_0x48c148),_0xecc22c;});}}function B(_0x4a01bd,_0x19fa6f){return void 0x0!==_0x4a01bd['order']&&void 0x0===_0x19fa6f['order']?0x1:void 0x0===_0x4a01bd['order']&&void 0x0!==_0x19fa6f['order']?-0x1:void 0x0!==_0x4a01bd['order']&&void 0x0!==_0x19fa6f['order']?_0x4a01bd['order']-_0x19fa6f['order']:0x0;}function U(_0x4b33b9,_0x4b5747){_0x4b5747['sort'](B);const _0xeb953f={},_0x58142a=[];for(const _0x5392ea of _0x4b5747)if(void 0x0!==_0x5392ea['order']){if(_0x5392ea['order']in _0xeb953f)throw new _0x2e40f7('ai-commands-config-order-collision',_0x4b33b9,{'conflictingDefinitions':[_0x5392ea,_0xeb953f[_0x5392ea['order']]]});_0xeb953f[_0x5392ea['order']]=_0x5392ea,_0x58142a['splice'](_0x5392ea['order'],0x0,_0x5392ea);}else _0x58142a['push'](_0x5392ea);return _0x58142a;}class r extends _0x20d875{static get['requires'](){return[n,a];}static get['pluginName'](){return'AIAssistant';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x8602de){super(_0x8602de);const _0x316f90=_0x8602de['config'],_0x515017=_0x8602de['locale'];_0x316f90['define']('ai.aiAssistant.preserveComments',!0x0),_0x316f90['define']('ai.aiAssistant.commands',function(_0x37fa25){return[{'groupId':'editOrReview','groupLabel':i(_0x37fa25,'Edit\x20or\x20review'),'commands':[{'id':'improveWriting','label':i(_0x37fa25,'Improve\x20writing'),'prompt':'Fix\x20spelling\x20mistakes,\x20use\x20proper\x20grammar\x20and\x20apply\x20good\x20writing\x20practices.\x20Do\x20not\x20lose\x20the\x20original\x20meaning.'},{'id':'makeShorter','label':i(_0x37fa25,'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(_0x37fa25,'Make\x20longer'),'prompt':'Improve\x20this\x20content\x20by\x20using\x20descriptive\x20language\x20and\x20inserting\x20more\x20information\x20and\x20more\x20detailed\x20explanations.'},{'id':'simplifyLanguage','label':i(_0x37fa25,'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(_0x37fa25,'Generate\x20from\x20selection'),'commands':[{'id':'summarize','label':i(_0x37fa25,'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(_0x37fa25,'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(_0x37fa25,'Change\x20tone'),'commands':[{'id':'professional','label':i(_0x37fa25,'Professional'),'prompt':'Improve\x20using\x20polished,\x20formal,\x20and\x20respectful\x20language\x20to\x20convey\x20professional\x20expertise\x20and\x20competence.'},{'id':'casual','label':i(_0x37fa25,'Casual'),'prompt':'Improve\x20using\x20casual,\x20informal\x20language\x20to\x20convey\x20a\x20casual\x20conversation\x20with\x20a\x20real\x20person.'},{'id':'direct','label':i(_0x37fa25,'Direct'),'prompt':'Improve\x20using\x20direct\x20language,\x20using\x20only\x20the\x20essential\x20information.'},{'id':'confident','label':i(_0x37fa25,'Confident'),'prompt':'Improve\x20using\x20compelling,\x20optimistic\x20language\x20to\x20convey\x20confidence\x20in\x20the\x20writing.'},{'id':'friendly','label':i(_0x37fa25,'Friendly'),'prompt':'Improve\x20using\x20friendly,\x20comforting\x20language,\x20to\x20convey\x20understanding\x20and\x20empathy.'}]},{'groupId':'changeStyle','groupLabel':i(_0x37fa25,'Change\x20style'),'commands':[{'id':'business','label':i(_0x37fa25,'Business'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20business\x20professional\x20with\x20formal\x20language.'},{'id':'legal','label':i(_0x37fa25,'Legal'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20legal\x20professional\x20using\x20valid\x20legal\x20terminology.'},{'id':'journalism','label':i(_0x37fa25,'Journalism'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20journalist\x20using\x20engaging\x20language\x20to\x20convey\x20the\x20importance\x20of\x20the\x20information.'},{'id':'poetic','label':i(_0x37fa25,'Poetic'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20poem\x20using\x20poetic\x20techniques\x20without\x20losing\x20the\x20original\x20meaning.'}]},{'groupId':'translate','groupLabel':i(_0x37fa25,'Translate'),'commands':[{'id':'translateEnglish','label':i(_0x37fa25,'English'),'prompt':'Translate\x20the\x20content\x20to\x20English\x20language.'},{'id':'translateSpanish','label':i(_0x37fa25,'Spanish'),'prompt':'Translate\x20the\x20content\x20to\x20Spanish\x20language.'},{'id':'translatePortuguese','label':i(_0x37fa25,'Portuguese'),'prompt':'Translate\x20the\x20content\x20to\x20Portuguese\x20language.'},{'id':'translateGerman','label':i(_0x37fa25,'German'),'prompt':'Translate\x20the\x20content\x20to\x20German\x20language.'},{'id':'translateFrench','label':i(_0x37fa25,'French'),'prompt':'Translate\x20the\x20content\x20to\x20French\x20language.'},{'id':'translateChinese','label':i(_0x37fa25,'Simplified\x20Chinese'),'prompt':'Translate\x20the\x20content\x20to\x20Simplified\x20Chinese\x20language.'},{'id':'translateHindi','label':i(_0x37fa25,'Hindi'),'prompt':'Translate\x20the\x20content\x20to\x20Hindi\x20language.'},{'id':'translateArabic','label':i(_0x37fa25,'Arabic'),'prompt':'Translate\x20the\x20content\x20to\x20Arabic\x20language.'}]}];}(_0x515017)),_0x316f90['define']('ai.aiAssistant.extraCommandGroups',[]),_0x316f90['define']('ai.aiAssistant.removeCommands',[]);let _0x34967b=o(_0x316f90['get']('ai.aiAssistant.commands'),_0x515017);const _0x58b1ce=_0x316f90['get']('ai.aiAssistant.extraCommandGroups'),_0x2d1676=_0x316f90['get']('ai.aiAssistant.removeCommands');_0x58b1ce['forEach'](_0x88fd68=>{const _0x10e235=_0x34967b['find'](_0xaae3e2=>_0xaae3e2['groupId']===_0x88fd68['groupId']);_0x10e235?_0x10e235['commands']=_0x10e235['commands']['concat'](_0x88fd68['commands']):_0x34967b['push'](_0x88fd68);}),_0x34967b=_0x34967b['filter'](_0x5cd16f=>!_0x2d1676['includes'](_0x5cd16f['groupId'])),_0x34967b['forEach'](_0x4a7ba6=>{_0x4a7ba6['commands']=_0x4a7ba6['commands']['filter'](_0x239381=>!_0x2d1676['includes'](_0x239381['id']));}),_0x316f90['set']('ai.aiAssistant.commands',_0x34967b);}}class P extends _0x20d875{['abortController'];static get['requires'](){return[E];}constructor(_0x287b1d){super(_0x287b1d),this['abortController']=new AbortController();}['init'](){this['editor']['plugins']['get'](E)['textAdapter']=this;}['abort'](){this['abortController']['signal']['aborted']||(this['abortController']['abort'](),this['abortController']=new AbortController());}async['makeRequest'](_0x483ad8){return this['sendRequest'](_0x483ad8)['catch'](_0x96a0e8=>{if(_0x96a0e8 instanceof R)return Promise['reject'](_0x96a0e8);if('AbortError'==_0x96a0e8['name'])return Promise['resolve']();throw console['error'](_0x96a0e8),new _0x2e40f7('aitextadapter-send-request-failed',null);});}async['_prepareRequestHeaders'](_0x445a7e,_0xe5076b){const _0x4502db=this['editor']['locale'],_0x59e7b4={'Content-Type':'application/json'};if('object'==typeof _0x445a7e)Object['assign'](_0x59e7b4,_0x445a7e);else{if(_0x445a7e)try{const _0x17be71=await _0x445a7e(_0xe5076b);Object['assign'](_0x59e7b4,_0x17be71);}catch{return Promise['reject'](new R(i(_0x4502db,'AI_ERROR_GET_HEADERS')));}}return _0x59e7b4;}async['_prepareRequestParameters'](_0x3e4970,_0x1f3cae){const _0x2becd0=this['editor']['locale'];if('object'==typeof _0x3e4970)return _0x3e4970;try{return await _0x3e4970(_0x1f3cae);}catch{return Promise['reject'](new R(i(_0x2becd0,'AI_ERROR_GET_PARAMETERS')));}}}class O extends P{['_apiUrl'];['_requestHeaders'];['_requestParameters'];static get['pluginName'](){return'OpenAITextAdapter';}constructor(_0x22b6d2){super(_0x22b6d2),_0x22b6d2['config']['define']('ai.openAI.apiUrl','https://api.openai.com/v1/chat/completions'),_0x22b6d2['config']['get']('ai.openAI.requestParameters')||_0x22b6d2['config']['define']('ai.openAI.requestParameters',{'model':'gpt-3.5-turbo','max_tokens':0x7d0,'temperature':0x1,'top_p':0x1,'stream':!0x0}),this['_apiUrl']=_0x22b6d2['config']['get']('ai.openAI.apiUrl'),this['_requestHeaders']=_0x22b6d2['config']['get']('ai.openAI.requestHeaders')||{},this['_requestParameters']=_0x22b6d2['config']['get']('ai.openAI.requestParameters');}async['sendRequest']({query:_0x6b9e0f,context:_0x1e7311,onData:_0x51a912,actionId:_0xff9390}){const _0x902111=this['editor']['locale'],_0x162c30=await this['prepareMessages'](_0x6b9e0f,_0x1e7311,_0xff9390),_0x21ccd2=await this['_prepareRequestHeaders'](this['_requestHeaders'],_0xff9390),_0x1dcf83=await this['_prepareRequestParameters'](this['_requestParameters'],_0xff9390),_0x332024={'messages':_0x162c30,..._0x1dcf83},_0x3c92c8={'method':'POST','headers':_0x21ccd2,'body':JSON['stringify'](_0x332024),'signal':this['abortController']['signal']},_0x2834c9=await fetch(this['_apiUrl'],_0x3c92c8);if(_0x2834c9['ok'])return _0x1dcf83['stream']?await this['_readStreamableResponse'](_0x2834c9,_0x51a912):await this['_readStaticResponse'](_0x2834c9,_0x51a912),Promise['resolve']();{const _0x2996cc=await _0x2834c9['text']();return _0x2996cc['includes']('context_length_exceeded')?Promise['reject'](new R(i(_0x902111,'AI_ERROR_CONTEXT_LENGTH'))):_0x2996cc['includes']('Moderation')?Promise['reject'](new R(i(_0x902111,'AI_ERROR_MODERATION'))):Promise['reject'](new Error(_0x2996cc));}}async['prepareMessages'](_0x27c906,_0x440cde,_0x2a56e1){let _0x3645e7,_0x428b07;return _0x440cde?(_0x3645e7='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.',_0x428b07='Instruction:\x0a'+_0x27c906+'\x0aYou\x20must\x20keep\x20the\x20text\x20formatting.\x0a\x0aContent:\x0a'+_0x440cde):(_0x3645e7='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.',_0x428b07=_0x27c906),[{'role':'system','content':_0x3645e7},{'role':'user','content':_0x428b07}];}async['_readStreamableResponse'](_0xda82b6,_0x5eb84e){const _0x98d9a5=_0xda82b6['body']['getReader'](),_0x569c47=new TextDecoder();let _0x1382dd='',_0x15efdf='',_0x43c382='',_0x1b2085=!0x1;for(;!_0x1b2085;){const {done:_0x2184c7,value:_0x34d2e8}=await _0x98d9a5['read'](),_0x51f5ee=_0x1382dd+_0x569c47['decode'](_0x34d2e8);let _0x29468f='';_0x1b2085=_0x2184c7;try{_0x29468f=this['_cleanUpData'](_0x51f5ee),_0x1382dd='';}catch{_0x1382dd=_0x51f5ee;continue;}_0x15efdf+=_0x29468f,!_0x1b2085&&this['_isBufferIncomplete'](_0x15efdf)||_0x15efdf&&(_0x43c382+=_0x15efdf,_0x15efdf='',_0x5eb84e(_0x43c382));}return Promise['resolve']();}async['_readStaticResponse'](_0x3078db,_0x2b339d){return _0x2b339d((await _0x3078db['json']())['choices'][0x0]['message']['content']),Promise['resolve']();}['_isBufferIncomplete'](_0x37997f){const _0x536d12=_0x37997f['split']('<')['length']!==_0x37997f['split']('>')['length'],_0x267f38=_0x37997f['length']<0x1e;return _0x536d12&&_0x267f38;}['_cleanUpData'](_0x5f0caa){return _0x5f0caa['split'](/\n(?![^{]*\})/g)['map'](_0x973f10=>_0x973f10['replace']('data:\x20',''))['filter'](_0x2c090b=>_0x2c090b&&_0x2c090b['length']>0x0&&'[DONE]'!==_0x2c090b)['map'](_0x3785a3=>{const {choices:_0x288c27}=JSON['parse'](_0x3785a3);if(_0x288c27[0x0]?.['delta']?.['content'])return _0x288c27[0x0]['delta']['content'];})['filter'](_0x907ed4=>_0x907ed4)['join']('');}}class D extends P{['_apiUrl'];['_requestHeaders'];['_bedrockClientConfig'];['_requestParameters'];static get['pluginName'](){return'AWSTextAdapter';}constructor(_0x446986){super(_0x446986),_0x446986['config']['get']('ai.aws.requestParameters')||_0x446986['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']=_0x446986['config']['get']('ai.aws.apiUrl'),this['_bedrockClientConfig']=_0x446986['config']['get']('ai.aws.bedrockClientConfig'),this['_requestHeaders']=_0x446986['config']['get']('ai.aws.requestHeaders'),this['_requestParameters']=_0x446986['config']['get']('ai.aws.requestParameters');}async['sendRequest']({query:_0x5b9b71,context:_0x131163,onData:_0x2a4f83,actionId:_0x2df1d3}){const {model:_0x232226,stream:_0x59b684,..._0x2de273}=await this['_prepareRequestParameters'](this['_requestParameters'],_0x2df1d3),_0x55a47d={'prompt':await this['preparePrompt'](_0x5b9b71,_0x131163,_0x232226,_0x2df1d3),..._0x2de273};this['_apiUrl']?await this['_processProxyRequest'](_0x55a47d,_0x232226,_0x59b684,_0x2a4f83,_0x2df1d3):await this['_processAWSRequest'](_0x55a47d,_0x232226,_0x59b684,_0x2a4f83);}async['preparePrompt'](_0x9b98bc,_0x385d1b,_0x3e9f36,_0x3c7942){let _0x13854d,_0x3af5fc;return _0x385d1b?(_0x13854d='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.',_0x3af5fc='Instruction:\x0a'+_0x9b98bc+'\x0aYou\x20must\x20keep\x20the\x20text\x20formatting.\x0a\x0aContent:\x0a'+_0x385d1b):(_0x13854d='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.',_0x3af5fc=_0x9b98bc),'meta.llama'==this['getModelFamily'](_0x3e9f36)?'<<SYS>>\x0a'+_0x13854d+'\x0a<</SYS>>\x0a[INST]\x0a'+_0x3af5fc+'\x0a[/INST]':'Human:\x0a'+_0x13854d+'\x0a'+_0x3af5fc+'\x0a\x0aAssistant:';}['getModelFamily'](_0x130c94){if(/^anthropic\.claude/['test'](_0x130c94))return'anthropic.claude';if(/^ai21\.j2/['test'](_0x130c94))return'ai21.j2';if(/^cohere\.command/['test'](_0x130c94))return'cohere.command';if(/^meta\.llama/['test'](_0x130c94))return'meta.llama';throw new R(i(this['editor']['locale'],'AI_ERROR_UNSUPPORTED_MODEL',_0x130c94));}async['_processProxyRequest'](_0x24b38e,_0x14ee82,_0x55fa4e,_0x4adc07,_0x428ff4){const _0x56a7d4={'method':'POST','headers':await this['_prepareRequestHeaders'](this['_requestHeaders'],_0x428ff4),'body':JSON['stringify']({..._0x24b38e,'model':_0x14ee82,'stream':_0x55fa4e}),'signal':this['abortController']['signal']},_0x2cefe9=await fetch(this['_apiUrl'],_0x56a7d4);_0x55fa4e?await this['_readStreamableResponse'](_0x2cefe9,_0x14ee82,_0x4adc07):await this['_readStaticResponse'](_0x2cefe9,_0x14ee82,_0x4adc07);}async['_processAWSRequest'](_0x4e2985,_0x2adc6e,_0x4fb61f,_0x253737){const _0xed6a0c=new _0x36eda2(this['_bedrockClientConfig']),_0x42b96e={'body':JSON['stringify'](_0x4e2985),'contentType':'application/json','accept':'application/json','modelId':_0x2adc6e};let _0x1bc60d;if(_0x4fb61f){const _0x31e489=new _0x55a4cf(_0x42b96e);_0x1bc60d=await _0xed6a0c['send'](_0x31e489,{'abortSignal':this['abortController']['signal']}),await this['_readAsyncIterableResponse'](_0x1bc60d,_0x2adc6e,_0x253737);}else{const _0x51a7ab=new _0x1805c7(_0x42b96e);_0x1bc60d=await _0xed6a0c['send'](_0x51a7ab,{'abortSignal':this['abortController']['signal']}),await this['_readStaticResponse'](_0x1bc60d,_0x2adc6e,_0x253737);}}async['_readAsyncIterableResponse'](_0x1db774,_0x2f2133,_0x189aa8){const _0x3af810=_0x1db774['body'],_0x467360=new TextDecoder('utf-8');let _0x955a7c='';for await(const _0xe19eb2 of _0x3af810)if(_0xe19eb2['chunk']){const _0x43b354=_0x467360['decode'](_0xe19eb2['chunk']['bytes']),_0xa64e4b=JSON['parse'](_0x43b354);_0x955a7c+=this['_getGeneratedText'](_0xa64e4b,_0x2f2133),_0x189aa8(_0x955a7c);}return Promise['resolve']();}async['_readStreamableResponse'](_0x1a89f8,_0x57d800,_0x220ff1){const _0x48ac51=_0x1a89f8['body'],_0x24144c=new TextDecoder('utf-8'),_0x56fa35=_0x48ac51['getReader']();let _0x1d57f9='',_0x32cafd='',_0x545dc7=!0x1;for(;!_0x545dc7;){const {done:_0x20cc97,value:_0x1e6b73}=await _0x56fa35['read']();if(_0x545dc7=_0x20cc97,_0x545dc7)break;const _0x26656f=(_0x1d57f9+_0x24144c['decode'](_0x1e6b73))['split']('\x0a')['map'](_0x5812f8=>{try{return _0x1d57f9='',JSON['parse'](_0x5812f8);}catch{return _0x1d57f9=_0x5812f8,null;}})['filter'](_0x49d6be=>null!==_0x49d6be);_0x26656f['length']&&(_0x32cafd+=_0x26656f['map'](_0x4052ba=>this['_getGeneratedText'](_0x4052ba,_0x57d800))['join'](''),_0x220ff1(_0x32cafd));}return Promise['resolve']();}async['_readStaticResponse'](_0xcb3380,_0x1fd43f,_0x31ba4c){let _0x5681ed;return _0x5681ed=_0xcb3380 instanceof Response?await _0xcb3380['json']():JSON['parse'](Buffer['from'](_0xcb3380['body'])['toString']('utf8')),(_0x31ba4c(this['_getGeneratedText'](_0x5681ed,_0x1fd43f)),Promise['resolve']());}['_getGeneratedText'](_0x41cb72,_0x2d0de2){switch(this['getModelFamily'](_0x2d0de2)){case'anthropic.claude':return _0x41cb72['completion'];case'ai21.j2':return _0x41cb72['completions'][0x0]['data']['text'];case'cohere.command':return _0x41cb72['generations'][0x0]['text'];case'meta.llama':return _0x41cb72['generation'];}}}export{E as AIAdapter,r as AIAssistant,n as AIAssistantUI,R as AIRequestError,P as AITextAdapter,D as AWSTextAdapter,O 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':_0x478642=>0x1!=_0x478642}};
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':_0x278300=>0x1!=_0x278300}};
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- (_0x14bac1=>{const {af:{dictionary:_0x57c6d7,getPluralForm:_0x2f3260}}={'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':_0x3214df=>0x1!=_0x3214df}};_0x14bac1['af']||={'dictionary':{},'getPluralForm':null},_0x14bac1['af']['dictionary']=Object['assign'](_0x14bac1['af']['dictionary'],_0x57c6d7),_0x14bac1['af']['getPluralForm']=_0x2f3260;})(window['CKEDITOR_TRANSLATIONS']||={});
23
+ (_0x55e452=>{const {af:{dictionary:_0xf87a19,getPluralForm:_0x28766e}}={'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':_0x427e98=>0x1!=_0x427e98}};_0x55e452['af']||={'dictionary':{},'getPluralForm':null},_0x55e452['af']['dictionary']=Object['assign'](_0x55e452['af']['dictionary'],_0xf87a19),_0x55e452['af']['getPluralForm']=_0x28766e;})(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':_0x264f14=>0x0==_0x264f14?0x0:0x1==_0x264f14?0x1:0x2==_0x264f14?0x2:_0x264f14%0x64>=0x3&&_0x264f14%0x64<=0xa?0x3:_0x264f14%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':_0xd65f4a=>0x0==_0xd65f4a?0x0:0x1==_0xd65f4a?0x1:0x2==_0xd65f4a?0x2:_0xd65f4a%0x64>=0x3&&_0xd65f4a%0x64<=0xa?0x3:_0xd65f4a%0x64>=0xb?0x4:0x5}};
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- (_0x270381=>{const {ar:{dictionary:_0x22c84e,getPluralForm:_0x52521e}}={'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':_0x33f52f=>0x0==_0x33f52f?0x0:0x1==_0x33f52f?0x1:0x2==_0x33f52f?0x2:_0x33f52f%0x64>=0x3&&_0x33f52f%0x64<=0xa?0x3:_0x33f52f%0x64>=0xb?0x4:0x5}};_0x270381['ar']||={'dictionary':{},'getPluralForm':null},_0x270381['ar']['dictionary']=Object['assign'](_0x270381['ar']['dictionary'],_0x22c84e),_0x270381['ar']['getPluralForm']=_0x52521e;})(window['CKEDITOR_TRANSLATIONS']||={});
23
+ (_0x3055e7=>{const {ar:{dictionary:_0xfc022,getPluralForm:_0x21210a}}={'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':_0x3a9c6f=>0x0==_0x3a9c6f?0x0:0x1==_0x3a9c6f?0x1:0x2==_0x3a9c6f?0x2:_0x3a9c6f%0x64>=0x3&&_0x3a9c6f%0x64<=0xa?0x3:_0x3a9c6f%0x64>=0xb?0x4:0x5}};_0x3055e7['ar']||={'dictionary':{},'getPluralForm':null},_0x3055e7['ar']['dictionary']=Object['assign'](_0x3055e7['ar']['dictionary'],_0xfc022),_0x3055e7['ar']['getPluralForm']=_0x21210a;})(window['CKEDITOR_TRANSLATIONS']||={});