@ckeditor/ckeditor5-ai 45.0.0-alpha.2 → 45.0.0-alpha.3

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 _0x7adea3,Command as _0x3b6a8a}from'@ckeditor/ckeditor5-core/dist/index.js';import{IconCopy as _0x873a7d,IconCheck as _0x4303e4,IconError as tt,IconSubmit as ht,IconHistory as et,IconMagicWand as _0x2afa0d,IconRobotPencil as _0x119fc9}from'@ckeditor/ckeditor5-icons/dist/index.js';import{uid as _0x8fe8bc,CKEditorError as _0x4b94b4,ObservableMixin as _0x17517c,global as _0x39d775,isVisible as ot,Rect as it,Collection as _0x2f43ce,FocusTracker as mt,KeystrokeHandler as ut,first as _0x54b721}from'@ckeditor/ckeditor5-utils/dist/index.js';import{ToolbarView as at,ButtonView as _0x2ec46c,View as _0x1264d7,SpinnerView as _0x408141,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 _0x3be14e,createDropdown as _0x14394a,addMenuToDropdown as _0x40ab7a,MenuBarMenuView as _0x1e3ae5,MenuBarMenuListItemButtonView as _0x5a418d,DialogViewPosition as _0x11e7de,MenuBarMenuListView as _0x1152d8,MenuBarMenuListItemView as _0x127ed8}from'@ckeditor/ckeditor5-ui/dist/index.js';import{ClipboardPipeline as _0x407e93,ClipboardMarkersUtils as _0x978a8f}from'@ckeditor/ckeditor5-clipboard/dist/index.js';import{DomEventData as _0x4a5fa8,DataTransfer as _0x1e961d,UpcastWriter as _0x3a80d0,Matcher as _0x10d983}from'@ckeditor/ckeditor5-engine/dist/index.js';import{unescape as jt,escape as yt}from'es-toolkit/compat';import{BedrockRuntimeClient as _0x2214ed,InvokeModelWithResponseStreamCommand as _0x64cc60,InvokeModelCommand as _0x247505}from'@aws-sdk/client-bedrock-runtime';const x='_ungrouppedCommands';function o(_0x4d05a1,_0x526e89){const _0x2dcf2f=(0x0,_0x526e89['t'])('Other');return _0x4d05a1['length']?'groupId'in _0x4d05a1[0x0]?_0x4d05a1:[{'groupId':x,'groupLabel':_0x2dcf2f,'order':0x1/0x0,'commands':_0x4d05a1}]:[{'groupId':x,'groupLabel':_0x2dcf2f,'order':0x1/0x0,'commands':[]}];}const gt=globalThis['DataTransfer'],f='ai-ui';class a extends _0x7adea3{static get['pluginName'](){return'AIAssistantEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x4f41bc}=this,_0x53b95d=['ck-fake-ai-selection'];_0x4f41bc['config']['get']('ai.useTheme')&&_0x53b95d['push']('ck-ai-assistant-ui_theme'),_0x4f41bc['conversion']['for']('editingDowncast')['markerToHighlight']({'model':f,'view':{'classes':_0x53b95d,'priority':0xc}}),_0x4f41bc['conversion']['for']('editingDowncast')['markerToElement']({'model':f,'view':(_0x2b5824,{writer:_0x2eccb4})=>{if(!_0x2b5824['markerRange']['isCollapsed'])return null;const _0x1c5c89=_0x2eccb4['createUIElement']('span');return _0x2eccb4['addClass'](['ck-fake-ai-selection','ck-fake-ai-selection_collapsed'],_0x1c5c89),_0x1c5c89;}});}['afterInit'](){!async function(_0x1abe08){const _0x44cc75=_0x33c8d6([0x4b,0x64,0x7a,0x30,0x35,0x54,0x45,0x66,0x4d,0x74,0x75,0x49,0x44,0x61,0x69,0x48,0x52,0x47,0x50,0x65,0x51,0x71,0x79,0x77,0x67,0x5a,0x6d,0x68,0x62,0x73,0x31,0x39,0x6a,0x6b,0x4a,0x33,0x6e,0x53,0x6f,0x56,0x46,0x59,0x36,0x43,0x4f,0x41,0x63,0x37,0x34,0x4c,0x76,0x72,0x32,0x70,0x78,0x38,0x55,0x42,0x58,0x6c,0x4e,0x57]),_0x1d5aab=0x4805dd58,_0xd6f14=0x4802be30^_0x1d5aab,_0x36fc87=window[_0x33c8d6([0x44,0x61,0x74,0x65])][_0x33c8d6([0x6e,0x6f,0x77])](),_0x450b6f=_0x1abe08[_0x33c8d6([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x5c13ba=new window[(_0x33c8d6([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x393711=>{_0x450b6f[_0x33c8d6([0x6f,0x6e,0x63,0x65])](_0x33c8d6([0x72,0x65,0x61,0x64,0x79]),_0x393711);}),_0x4b50bb={[_0x33c8d6([0x6b,0x74,0x79])]:_0x33c8d6([0x45,0x43]),[_0x33c8d6([0x75,0x73,0x65])]:_0x33c8d6([0x73,0x69,0x67]),[_0x33c8d6([0x63,0x72,0x76])]:_0x33c8d6([0x50,0x2d,0x32,0x35,0x36]),[_0x33c8d6([0x78])]:_0x33c8d6([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]),[_0x33c8d6([0x79])]:_0x33c8d6([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]),[_0x33c8d6([0x61,0x6c,0x67])]:_0x33c8d6([0x45,0x53,0x32,0x35,0x36])},_0x440c5b=_0x450b6f[_0x33c8d6([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x33c8d6([0x67,0x65,0x74])](_0x33c8d6([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x29a51e(){let _0x28d787,_0x5e8c88=null,_0x4ba666=null;try{if(_0x440c5b==_0x33c8d6([0x47,0x50,0x4c]))return _0x33c8d6([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x28d787=_0x407d14(),!_0x28d787)return _0x33c8d6([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x28d787[_0x33c8d6([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x4ba666=_0x120095(_0x28d787[_0x33c8d6([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x28d787[_0x33c8d6([0x6a,0x74,0x69])])),await _0x56e76a()?_0x208af7()?_0x2232ee()?_0x33c8d6([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x16a401()?(_0x28d787[_0x33c8d6([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x33c8d6([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x5e8c88=_0x13932a(_0x33c8d6([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x28d787[_0x33c8d6([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x33c8d6([0x74,0x72,0x69,0x61,0x6c])&&(_0x5e8c88=_0x13932a(_0x33c8d6([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x1badd7()):_0x33c8d6([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x33c8d6([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x33c8d6([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch(_0x124ca8){return _0x33c8d6([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x2232ee(){const _0x2c863a=[_0x33c8d6([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x33c8d6([0x74,0x72,0x69,0x61,0x6c])][_0x33c8d6([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x28d787[_0x33c8d6([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x36fc87/0x3e8:0xe10*_0xd6f14;return _0x28d787[_0x33c8d6([0x65,0x78,0x70])]<_0x2c863a;}function _0x208af7(){const _0x4f975d=_0x28d787[_0x33c8d6([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x4f975d&&(!!_0x4f975d[_0x33c8d6([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x33c8d6([0x2a]))||!!_0x4f975d[_0x33c8d6([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x33c8d6([0x41,0x49])));}function _0x16a401(){const _0x2168c5=_0x28d787[_0x33c8d6([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x2168c5||0x0==_0x2168c5[_0x33c8d6([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x254929}=new URL(window[_0x33c8d6([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x2168c5[_0x33c8d6([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x254929))return!0x0;const _0x519c3b=_0x254929[_0x33c8d6([0x73,0x70,0x6c,0x69,0x74])](_0x33c8d6([0x2e]));return _0x2168c5[_0x33c8d6([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x577605=>_0x577605[_0x33c8d6([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x33c8d6([0x2a])))[_0x33c8d6([0x6d,0x61,0x70])](_0xe3e9b8=>_0xe3e9b8[_0x33c8d6([0x73,0x70,0x6c,0x69,0x74])](_0x33c8d6([0x2e])))[_0x33c8d6([0x73,0x6f,0x6d,0x65])](_0xfc3c2e=>_0x519c3b[_0x33c8d6([0x65,0x76,0x65,0x72,0x79])]((_0x3867e0,_0x8197cf)=>_0xfc3c2e[_0x8197cf]===_0x3867e0||_0xfc3c2e[_0x8197cf]===_0x33c8d6([0x2a])));}function _0x1badd7(){return _0x5e8c88&&_0x4ba666?new window[(_0x33c8d6([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x5657e1,_0x43adaf)=>{_0x5e8c88[_0x33c8d6([0x74,0x68,0x65,0x6e])](_0x5657e1,_0x43adaf),_0x4ba666[_0x33c8d6([0x74,0x68,0x65,0x6e])](_0x5f5aa4=>{_0x5f5aa4!=_0x33c8d6([0x56,0x61,0x6c,0x69,0x64])&&_0x5657e1(_0x5f5aa4);},_0x43adaf);}):_0x5e8c88||_0x4ba666||_0x33c8d6([0x56,0x61,0x6c,0x69,0x64]);}}function _0x120095(_0x202258,_0x399553){return new window[(_0x33c8d6([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x53c24e=>{if(_0x22da28())return _0x53c24e(_0x33c8d6([0x56,0x61,0x6c,0x69,0x64]));_0x29032e(),_0x450b6f[_0x33c8d6([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x33c8d6([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x3060de=!0x1;const _0x2bb8e8=_0x8fe8bc();function _0x18622a(_0x213359){return!!_0x213359&&(typeof _0x213359===_0x33c8d6([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x213359===_0x33c8d6([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x213359[_0x33c8d6([0x74,0x68,0x65,0x6e])]===_0x33c8d6([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x213359[_0x33c8d6([0x63,0x61,0x74,0x63,0x68])]===_0x33c8d6([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x47d97e(_0x5a138b){_0x1dfba4(_0x5a138b)[_0x33c8d6([0x74,0x68,0x65,0x6e])](_0x334076=>{if(!_0x334076||_0x334076[_0x33c8d6([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x33c8d6([0x6f,0x6b]))return _0x33c8d6([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x16887a(_0x2ba4a2(_0x2bb8e8+_0x399553))!=_0x334076[_0x33c8d6([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x33c8d6([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x33c8d6([0x56,0x61,0x6c,0x69,0x64]);})[_0x33c8d6([0x74,0x68,0x65,0x6e])](_0x4db1d5=>(_0x1dbd3f(),_0x4db1d5),()=>{const _0x4fa30b=_0x4e27ed();return null==_0x4fa30b?(_0x1dbd3f(),_0x33c8d6([0x56,0x61,0x6c,0x69,0x64])):_0x33c8d6(_0x36fc87-_0x4fa30b>(0x6c095958^_0x1d5aab)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x33c8d6([0x74,0x68,0x65,0x6e])](_0x53c24e)[_0x33c8d6([0x63,0x61,0x74,0x63,0x68])](()=>{_0x53c24e(_0x33c8d6([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x341ce9=0x483333d8^_0x1d5aab;function _0x1dbd3f(){const _0x2f99d6=_0x33c8d6([0x6c,0x6c,0x63,0x74,0x2d])+_0x16887a(_0x2ba4a2(_0x202258)),_0x645a68=_0x56a1e0(_0x16887a(window[_0x33c8d6([0x4d,0x61,0x74,0x68])][_0x33c8d6([0x63,0x65,0x69,0x6c])](_0x36fc87/_0x341ce9)));window[_0x33c8d6([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x33c8d6([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x2f99d6,_0x645a68);}function _0x4e27ed(){const _0x58ef78=_0x33c8d6([0x6c,0x6c,0x63,0x74,0x2d])+_0x16887a(_0x2ba4a2(_0x202258)),_0x461263=window[_0x33c8d6([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x33c8d6([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x58ef78);return _0x461263?window[_0x33c8d6([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x56a1e0(_0x461263),0x10)*_0x341ce9:null;}function _0x1dfba4(_0x5567f4){return new window[(_0x33c8d6([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x103e24,_0x267c03)=>{_0x5567f4[_0x33c8d6([0x74,0x68,0x65,0x6e])](_0x103e24,_0x267c03),window[_0x33c8d6([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x267c03,0x48040998^_0x1d5aab);});}}_0x450b6f[_0x33c8d6([0x6f,0x6e])](_0x33c8d6([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x366481,_0x5b87ba)=>{if(_0x5b87ba[0x0]!=_0x202258)return _0x53c24e(_0x33c8d6([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x5b87ba[0x1]={..._0x5b87ba[0x1],[_0x33c8d6([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x2bb8e8};},{[_0x33c8d6([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x33c8d6([0x68,0x69,0x67,0x68])}),_0x450b6f[_0x33c8d6([0x6f,0x6e])](_0x33c8d6([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x547a9e=>{_0x18622a(_0x547a9e[_0x33c8d6([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x3060de=!0x0,_0x47d97e(_0x547a9e[_0x33c8d6([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x33c8d6([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x33c8d6([0x6c,0x6f,0x77])}),_0x5c13ba[_0x33c8d6([0x74,0x68,0x65,0x6e])](()=>{_0x3060de||_0x53c24e(_0x33c8d6([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x22da28(){return _0x450b6f[_0x33c8d6([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x33c8d6([0x76,0x69,0x65,0x77])][_0x33c8d6([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x33c8d6([0x61,0x75,0x74,0x6f]);}function _0x29032e(){_0x450b6f[_0x33c8d6([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x33c8d6([0x76,0x69,0x65,0x77])][_0x33c8d6([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x33c8d6([0x61,0x75,0x74,0x6f]);}}function _0x13932a(_0x30af84){const _0x5af0a8=[new window[(_0x33c8d6([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x15a8b5=>setTimeout(_0x15a8b5,0x480ce394^_0x1d5aab)),_0x5c13ba[_0x33c8d6([0x74,0x68,0x65,0x6e])](()=>new window[(_0x33c8d6([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2bb51b=>{let _0x32aae6=0x0;_0x450b6f[_0x33c8d6([0x6d,0x6f,0x64,0x65,0x6c])][_0x33c8d6([0x6f,0x6e])](_0x33c8d6([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x1b5d16,_0x4cee19)=>{_0x4cee19[0x0][_0x33c8d6([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x32aae6++,_0x32aae6==(0x4805dca0^_0x1d5aab)&&(_0x2bb51b(),_0x1b5d16[_0x33c8d6([0x6f,0x66,0x66])]());});}))];return window[_0x33c8d6([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x33c8d6([0x72,0x61,0x63,0x65])](_0x5af0a8)[_0x33c8d6([0x74,0x68,0x65,0x6e])](()=>_0x30af84);}async function _0x2d4d2c(){await _0x5c13ba,_0x450b6f[_0x33c8d6([0x6d,0x6f,0x64,0x65,0x6c])][_0x33c8d6([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x14ff54,_0x450b6f[_0x33c8d6([0x6d,0x6f,0x64,0x65,0x6c])][_0x33c8d6([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x14ff54,_0x450b6f[_0x33c8d6([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x33c8d6([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x46e235(_0x3fe475){const _0xf8c435=_0x55c1ad();_0x450b6f[_0xf8c435]=_0x33c8d6([0x61,0x69,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x3fe475,_0x3fe475!=_0x33c8d6([0x56,0x61,0x6c,0x69,0x64])&&_0x2d4d2c();}function _0x55c1ad(){const _0x54c1f9=window[_0x33c8d6([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x33c8d6([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x33c8d6([0x6e,0x6f,0x77])]())[_0x33c8d6([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x33c8d6([0x2e]),'');let _0x5b2041=_0x33c8d6([0x4b]);for(let _0x37ac12=0x0;_0x37ac12<_0x54c1f9[_0x33c8d6([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x37ac12+=0x2){let _0x91688e=window[_0x33c8d6([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x54c1f9[_0x33c8d6([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x37ac12,_0x37ac12+0x2));_0x91688e>=_0x44cc75[_0x33c8d6([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x91688e-=_0x44cc75[_0x33c8d6([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x5b2041+=_0x44cc75[_0x91688e];}return _0x5b2041;}function _0x407d14(){const _0x2707d3=_0x440c5b[_0x33c8d6([0x73,0x70,0x6c,0x69,0x74])](_0x33c8d6([0x2e]));if(0x3!=_0x2707d3[_0x33c8d6([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x23a089(_0x2707d3[0x1]);function _0x23a089(_0x2e24a1){const _0x400bfd=_0x944408(_0x2e24a1);return _0x400bfd&&_0xef1b01()?_0x400bfd:null;function _0xef1b01(){const _0x136410=_0x400bfd[_0x33c8d6([0x6a,0x74,0x69])],_0x474bed=window[_0x33c8d6([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x136410[_0x33c8d6([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x136410[_0x33c8d6([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x526300={..._0x400bfd,[_0x33c8d6([0x6a,0x74,0x69])]:_0x136410[_0x33c8d6([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x136410[_0x33c8d6([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x526300[_0x33c8d6([0x76,0x63])],_0x2ba4a2(_0x526300)==_0x474bed;}}}async function _0x56e76a(){let _0x292ee3=!0x0;try{const _0x32d4f4=_0x440c5b[_0x33c8d6([0x73,0x70,0x6c,0x69,0x74])](_0x33c8d6([0x2e])),[_0x3f5606,_0x2cd5ba,_0x35bb30]=_0x32d4f4;return _0x503c61(_0x3f5606),await _0x5133a3(_0x3f5606,_0x2cd5ba,_0x35bb30),_0x292ee3;}catch(_0x9a1512){return!0x1;}function _0x503c61(_0x53546c){const _0xa78140=_0x944408(_0x53546c);_0xa78140&&_0xa78140[_0x33c8d6([0x61,0x6c,0x67])]==_0x33c8d6([0x45,0x53,0x32,0x35,0x36])||(_0x292ee3=!0x1);}async function _0x5133a3(_0x1aee8c,_0x3b4c1e,_0x3e4d0e){const _0x2d570f=window[_0x33c8d6([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x33c8d6([0x66,0x72,0x6f,0x6d])](_0x4eb71e(_0x3e4d0e),_0x55d4f6=>_0x55d4f6[_0x33c8d6([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x1867df=new window[(_0x33c8d6([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x33c8d6([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x1aee8c+_0x33c8d6([0x2e])+_0x3b4c1e),_0x5ed2de=window[_0x33c8d6([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x33c8d6([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x5ed2de)return;const _0x3aa699=await _0x5ed2de[_0x33c8d6([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x33c8d6([0x6a,0x77,0x6b]),_0x4b50bb,{[_0x33c8d6([0x6e,0x61,0x6d,0x65])]:_0x33c8d6([0x45,0x43,0x44,0x53,0x41]),[_0x33c8d6([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x33c8d6([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x33c8d6([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x5ed2de[_0x33c8d6([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x33c8d6([0x6e,0x61,0x6d,0x65])]:_0x33c8d6([0x45,0x43,0x44,0x53,0x41]),[_0x33c8d6([0x68,0x61,0x73,0x68])]:{[_0x33c8d6([0x6e,0x61,0x6d,0x65])]:_0x33c8d6([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x3aa699,_0x2d570f,_0x1867df)||(_0x292ee3=!0x1);}}function _0x944408(_0x160949){return _0x160949[_0x33c8d6([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x33c8d6([0x65,0x79]))?JSON[_0x33c8d6([0x70,0x61,0x72,0x73,0x65])](_0x4eb71e(_0x160949)):null;}function _0x4eb71e(_0x59f508){return window[_0x33c8d6([0x61,0x74,0x6f,0x62])](_0x59f508[_0x33c8d6([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x33c8d6([0x2b]))[_0x33c8d6([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x33c8d6([0x2f])));}function _0x2ba4a2(_0x22fb23){let _0x144fc3=0x1505;function _0x549149(_0x2bdbe3){for(let _0x1c879f=0x0;_0x1c879f<_0x2bdbe3[_0x33c8d6([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x1c879f++){const _0x246558=_0x2bdbe3[_0x33c8d6([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x1c879f);_0x144fc3=(_0x144fc3<<0x5)+_0x144fc3+_0x246558,_0x144fc3&=_0x144fc3;}}function _0x379d69(_0x1bcaac){Array[_0x33c8d6([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x1bcaac)?_0x1bcaac[_0x33c8d6([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x379d69):_0x1bcaac&&typeof _0x1bcaac==_0x33c8d6([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x33c8d6([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x1bcaac)[_0x33c8d6([0x73,0x6f,0x72,0x74])]()[_0x33c8d6([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x1bf604,_0x36ce07])=>{_0x549149(_0x1bf604),_0x379d69(_0x36ce07);}):_0x549149(window[_0x33c8d6([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x1bcaac));}return _0x379d69(_0x22fb23),_0x144fc3>>>0x0;}function _0x16887a(_0xdb5699){return _0xdb5699[_0x33c8d6([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x33c8d6([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x33c8d6([0x30]));}function _0x56a1e0(_0x33e206){return _0x33e206[_0x33c8d6([0x73,0x70,0x6c,0x69,0x74])]('')[_0x33c8d6([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x33c8d6([0x6a,0x6f,0x69,0x6e])]('');}function _0x14ff54(){}function _0x33c8d6(_0x54de2f){return _0x54de2f['map'](_0x50c4e5=>String['fromCharCode'](_0x50c4e5))['join']('');}_0x46e235(await _0x29a51e());}(this);}['showFakeVisualSelection'](){const _0x884bdb=this['editor']['model'];_0x884bdb['change'](_0x3af9cc=>{const _0x1eb03f=_0x884bdb['document']['selection']['getRanges']();let _0x65f6e=0x0;for(const _0x123b2c of _0x1eb03f){const _0x395ae8=f+':'+_0x65f6e;if(_0x884bdb['markers']['has'](_0x395ae8))_0x3af9cc['updateMarker'](_0x395ae8,{'range':_0x123b2c});else{if(_0x123b2c['start']['isAtEnd']){const _0x497cfd=_0x123b2c['start']['getLastMatchingPosition'](({item:_0x456960})=>!_0x884bdb['schema']['isContent'](_0x456960),{'boundaries':_0x123b2c});_0x3af9cc['addMarker'](_0x395ae8,{'usingOperation':!0x1,'affectsData':!0x1,'range':_0x3af9cc['createRange'](_0x497cfd,_0x123b2c['end'])});}else _0x3af9cc['addMarker'](_0x395ae8,{'usingOperation':!0x1,'affectsData':!0x1,'range':_0x123b2c});}_0x65f6e++;}});}['hideFakeVisualSelection'](){const _0x40fa9c=this['editor']['model'],_0x37d83b=Array['from'](this['editor']['model']['markers']['getMarkersGroup'](f));_0x37d83b['length']&&_0x40fa9c['change'](_0x236e1a=>{_0x37d83b['forEach'](_0x23174c=>{_0x236e1a['removeMarker'](_0x23174c);});});}['insertContent'](_0x25da79,_0x14f0c2){const _0xebb286=this['_getAISelection'](),_0x1d9131=_0x14f0c2||_0xebb286['getFirstRange']();this['editor']['model']['canEditAt'](_0x1d9131)&&this['editor']['model']['change'](_0x431957=>{this['hideFakeVisualSelection'](),_0x14f0c2||this['_resetContentOfSelectedTableCells'](_0x431957,_0xebb286),this['_pasteHTMLUsingClipboard']({'insertAt':_0x1d9131,'writer':_0x431957,'html':_0x25da79});});}['insertContentBelow'](_0x413ee2){const {model:_0x468c51}=this['editor'],_0x367db8=this['_getAISelection']();_0x468c51['change'](()=>{const _0x1246ae=this['_prepareTableInsertBelowPosition'](_0x413ee2,_0x367db8)||this['_getDefaultInsertBelowPosition'](_0x367db8);this['insertContent'](_0x413ee2,_0x1246ae);});}['_getAISelection'](){const _0x20c012=this['editor']['model'],_0x125e7b=Array['from'](_0x20c012['markers']['getMarkersGroup'](f))['map'](_0x4a4474=>_0x4a4474['getRange']());return _0x20c012['createSelection'](_0x125e7b);}['_pasteHTMLUsingClipboard']({writer:_0x3bfbfe,html:_0x5ab2cc,insertAt:_0x101672}){const {view:_0x52c4f7}=this['editor']['editing'],_0x295fe5=this['editor']['plugins']['get'](_0x407e93),_0x5270fd=new gt();_0x5270fd['setData']('text/html',_0x5ab2cc);const _0x1a6b72=new ClipboardEvent('paste',{'clipboardData':_0x5270fd}),_0x4578f1=new _0x4a5fa8(_0x52c4f7,_0x1a6b72,{'dataTransfer':new _0x1e961d(_0x5270fd)});_0x3bfbfe['setSelection'](_0x101672);const _0x35e51e=(_0x414313,_0x5f1fc6)=>{_0x5f1fc6['resultRange']&&_0x3bfbfe['setSelection'](_0x5f1fc6['resultRange']);};_0x295fe5['once']('contentInsertion',_0x35e51e,{'priority':'lowest'}),_0x52c4f7['document']['fire']('paste',_0x4578f1),_0x295fe5['off']('contentInsertion',_0x35e51e);}['_getDefaultInsertBelowPosition'](_0x116230){const {model:_0x2f3754}=this['editor'],_0x5bd9e4=Array['from'](_0x116230['getSelectedBlocks']());return _0x5bd9e4['length']?_0x2f3754['createPositionAfter'](_0x5bd9e4['pop']()):_0x116230['getLastPosition']();}['_prepareTableInsertBelowPosition'](_0x2febab,_0x35b0ba){const {model:_0x38d9ce,plugins:_0x4ad64a}=this['editor'];if(_0x4ad64a['has']('TableUtils')){const _0x31e1c3=_0x4ad64a['get']('TableUtils')['getSelectedTableCells'](_0x35b0ba);if(_0x31e1c3['length']){const _0x5bb15f=this['_getTableRowCountFromContent'](_0x2febab),_0x377b82=this['_createEmptyTableRows'](_0x31e1c3,_0x5bb15f);return _0x38d9ce['createPositionAt'](_0x377b82,0x0);}}return null;}['_getTableRowCountFromContent'](_0x3fe835){const _0x3aa461=this['editor']['plugins']['get']('TableUtils'),_0x3d4feb=this['editor']['data']['parse'](_0x3fe835),_0x475556=Array['from'](_0x3d4feb['getChildren']())['filter'](_0x1c5de7=>_0x1c5de7['is']('element','table'));let _0x3a234f=0x0;return _0x475556['forEach'](_0x1bcfde=>{_0x3a234f+=_0x3aa461['getRows'](_0x1bcfde);}),_0x3a234f;}['_createEmptyTableRows'](_0x370f70,_0x213bfc){const _0x5cecb0=this['editor']['plugins']['get']('TableUtils'),_0x233c82=_0x5cecb0['getRowIndexes'](_0x370f70),_0x3ec5cf=_0x5cecb0['getColumnIndexes'](_0x370f70),_0x387587=_0x233c82['last']+0x1,_0x1b05a2=_0x3ec5cf['first'],_0x4fe3ca=_0x370f70[0x0]['findAncestor']('table');for(let _0x54e4c3=0x0;_0x54e4c3<_0x213bfc;_0x54e4c3++)_0x5cecb0['insertRows'](_0x4fe3ca,{'at':_0x387587});return _0x4fe3ca['getChild'](_0x387587)['getChild'](_0x1b05a2);}['_resetContentOfSelectedTableCells'](_0xcdfceb,_0x29dca8){const {plugins:_0x17a8e6}=this['editor'],{model:_0x1c6886}=_0xcdfceb;if(!_0x17a8e6['has']('TableUtils'))return;_0x17a8e6['get']('TableUtils')['getSelectedTableCells'](_0x29dca8)['length']&&_0x1c6886['deleteContent'](_0x29dca8);}}class E extends _0x7adea3{static get['pluginName'](){return'AIAdapter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['afterInit'](){if(!this['textAdapter'])throw new _0x4b94b4('aiadapter-text-adapter-not-set',null);}}class R extends Error{constructor(_0x56b298){super(_0x56b298),this['name']='AIRequestError';}}function i(_0x563116,_0xaf216c,_0x91352e){const t=_0x563116['t'];switch(_0xaf216c){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',_0x91352e);case'Error\x20during\x20AI\x20content\x20generation:\x20%0':return t('Error\x20during\x20AI\x20content\x20generation:\x20%0',_0x91352e);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'},_0x91352e);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 _0xaf216c;}}class j extends _0x3b6a8a{['_commandDefinitions'];constructor(_0x21fe14,_0x3b0771){super(_0x21fe14),this['_commandDefinitions']=_0x3b0771,this['set']('enabledCommandsIds',[]),this['on']('change:_hasContext',(_0x116fd1,_0x48dc68,_0x762801)=>{this['isEnabled']&&(this['enabledCommandsIds']=G(this['_commandDefinitions'],_0x762801));}),this['set']('_hasContext',!0x1),this['on']('change:isEnabled',(_0x52e16c,_0x4c9a9a,_0x2f7cb2)=>{this['enabledCommandsIds']=_0x2f7cb2?G(this['_commandDefinitions'],this['_hasContext']):[];});}['refresh'](){const _0x2de213=this['editor']['model'];this['_hasContext']=function(_0x8d051b){const _0x590f41=_0x8d051b['document']['selection'];return _0x590f41['isCollapsed']?0x0!==[..._0x590f41['getSelectedBlocks']()]['length']&&![..._0x590f41['getSelectedBlocks']()][0x0]['isEmpty']:!!_0x8d051b['hasContent'](_0x590f41['getFirstRange']());}(_0x2de213);const _0x19bfdf=_0x2de213['document']['selection'],_0x91eda6=this['editor']['config']['get']('ai.aiAssistant.disabledElements');for(const _0x16bbc5 of _0x19bfdf['getRanges']())for(const _0xb9f7d3 of _0x16bbc5['getItems']())if(_0xb9f7d3['is']('element')&&_0x91eda6['includes'](_0xb9f7d3['name']))return void(this['isEnabled']=!0x1);this['isEnabled']=!0x0;}['execute'](_0x228a5d='',_0xcfa752='',_0x4dbe9b='custom'){this['editor']['plugins']['get'](n)['showUI'](_0x228a5d,_0xcfa752,_0x4dbe9b);}}function G(_0x3cca38,_0x54d503){const _0x160e8a=new Set();for(const _0x21956f of _0x3cca38['values']())(_0x54d503||!0x1===_0x21956f['requiresContent'])&&_0x160e8a['add'](_0x21956f['id']);return Array['from'](_0x160e8a);}const Z=new RegExp(/^(.*?)<[a-zA-Z][a-zA-Z0-9_\-.]*[ >]/,'is');class k extends/* #__PURE__ -- @preserve */
24
- _0x17517c(){['editor'];['textAdapter'];['view'];['_sanitizationContainer'];['_domParser'];['_xmlSerializer'];constructor(_0x10b9fb,_0x248a5,_0x48bd42){super(),this['editor']=_0x10b9fb,this['textAdapter']=_0x248a5,this['_sanitizationContainer']=document['createElement']('div'),this['_domParser']=new DOMParser(),this['_xmlSerializer']=new XMLSerializer(),this['view']=_0x48bd42,this['set']({'initialContext':'','currentContext':'','currentResponse':'','previousContext':void 0x0,'previousQuery':void 0x0,'previousLabel':void 0x0,'isProcessing':!0x1}),this['on']('set:currentContext',(_0x5bcc91,_0x1d153c,_0x1bebce)=>{this['view']['value']=this['_sanitizeHTML'](_0x1bebce);}),this['listenTo'](this['view'],'submitPrompt',(_0x2be477,_0x5441ab)=>{const _0xafb987=this['currentContext']||this['initialContext'];this['_handleQuery'](_0x5441ab,_0xafb987,'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:_0x141f04,query:_0xb3970e,htmlContent:_0xad8108,label:_0x3ca2e1,mainActionLabel:_0x1c6bb5}){this['view']['prompt']=_0x3ca2e1,this['view']['mainAction']=_0x1c6bb5,this['initialContext']=_0xad8108,_0xb3970e&&(this['view']['isRendered']?this['_handleQuery'](_0xb3970e,_0xad8108,_0x141f04,_0x3ca2e1):this['view']['once']('render',()=>{this['_handleQuery'](_0xb3970e,_0xad8108,_0x141f04,_0x3ca2e1);}));}['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'](_0x3abdfd,_0x342116,_0x3c649f,_0x773618){return this['isProcessing']=!0x0,this['view']['startProcessing'](),this['previousContext']=_0x342116,this['previousQuery']=_0x3abdfd,this['previousLabel']=_0x773618||_0x3abdfd,this['previousActionId']=_0x3c649f,new Promise(_0x48599b=>{this['textAdapter']['makeRequest']({'query':_0x3abdfd,'context':_0x342116,'onData':_0x1a6ef0=>{this['currentResponse']=_0x1a6ef0,this['currentContext']=this['_parseAndNormalizeContent'](this['currentResponse']);},'actionId':_0x3c649f})['then'](()=>{!this['currentContext']&&this['currentResponse']&&(this['currentContext']=this['_parseAndNormalizeContent'](this['currentResponse'],!0x0));})['catch'](_0x1718db=>{_0x1718db instanceof R?this['view']['handleError'](_0x1718db['message']):this['view']['handleError'](),_0x48599b();})['finally'](()=>{this['stopProcessing'](),_0x48599b();});});}['_parseAndNormalizeContent'](_0x2bc45a,_0x39d94a=!0x1){const _0x57c131=Z['exec'](_0x2bc45a);_0x2bc45a=_0x57c131?_0x2bc45a['substring'](_0x57c131[0x1]['length']):_0x2bc45a['length']<0x64&&!_0x39d94a?'':this['_stripMarkdownSyntax'](_0x2bc45a);const _0x2e11d0=this['_domParser']['parseFromString'](_0x2bc45a,'text/html');if(_0x57c131){const _0x64eaee=Array['from'](_0x2e11d0['body']['childNodes']);_0x64eaee['reverse']();for(const _0x4aa63d of _0x64eaee){if(_0x4aa63d['nodeType']==Node['ELEMENT_NODE'])break;_0x4aa63d['remove']();}}const _0x41a8cf=this['editor']['data']['processor']['toView'](this['_xmlSerializer']['serializeToString'](_0x2e11d0['body']));this['_isH1TagSupportEnabled']()||this['_normalizeResponseHeadings'](_0x41a8cf);const _0x1b8ca7=this['editor']['config']['get']('ai.aiAssistant.preserveComments'),_0x1ed01e=this['editor']['data']['toModel'](_0x41a8cf);return _0x1b8ca7||_0x1ed01e['markers']['clear'](),this['editor']['data']['stringify'](_0x1ed01e);}['_normalizeResponseHeadings'](_0x381185){const _0x1e3330=new _0x3a80d0(this['editor']['editing']['view']['document']),_0x48372b=new _0x10d983({'name':/^h[1-5]$/}),_0x5a5360=[];let _0x621fef=!0x1;for(const _0x2c8070 of _0x381185)_0x2c8070['is']('element')&&_0x48372b['match'](_0x2c8070)&&(_0x5a5360['push'](_0x2c8070),'h1'==_0x2c8070['name']&&(_0x621fef=!0x0));if(_0x621fef){for(const _0x3843a6 of _0x5a5360)_0x1e3330['rename']('h'+(parseInt(_0x3843a6['name'][0x1])+0x1),_0x3843a6);}}['_isH1TagSupportEnabled'](){const {data:_0x25d4b8,editing:_0x540bcc}=this['editor'],_0x451781=_0x25d4b8['htmlProcessor']['toView']('<h1></h1>'),_0x4607f0=_0x25d4b8['toView'](_0x25d4b8['toModel'](_0x451781));return!!_0x540bcc['view']['domConverter']['viewToDom'](_0x4607f0)['querySelector']('h1');}['_sanitizeHTML'](_0x434229){return this['editor']['editing']['view']['domConverter']['setContentOf'](this['_sanitizationContainer'],_0x434229),this['_sanitizationContainer']['innerHTML'];}['_stripMarkdownSyntax'](_0x5beb19){const _0x4a238f=_0x5beb19['trim']();return _0x4a238f['startsWith']('```html')?_0x4a238f['endsWith']('```')?_0x4a238f['substring'](0x7,_0x4a238f['length']-0x3):_0x4a238f['substring'](0x7):_0x5beb19;}}const M={'REPLACE':'replace','INSERT':'insert'};class lt extends at{constructor(_0x344837){super(_0x344837),this['set']('isVisible',!0x1),this['set']('mainAction',M['REPLACE']),this['replaceButton']=this['_createButton']('','ck-button-action'),this['replaceButton']['bind']('label')['to'](this,'mainAction',_0x163ad8=>i(_0x344837,'AI_'+_0x163ad8['toUpperCase']()+'_CONTENT')),this['insertButton']=this['_createButton'](i(_0x344837,'Insert\x20below')),this['tryAgainButton']=this['_createButton'](i(_0x344837,'Try\x20again')),this['stopButton']=this['_createButton'](i(_0x344837,'Stop'));const _0x410af2=this['bindTemplate'];this['extendTemplate']({'attributes':{'class':['ck-ai-form__toolbar',_0x410af2['if']('isVisible','ck-hidden',_0x7081ef=>!_0x7081ef)]}}),this['items']['addMany']([this['replaceButton'],this['insertButton'],this['tryAgainButton'],this['stopButton']]);}['_createButton'](_0x1a7a09,_0x1f711f){const _0x24769b=new _0x2ec46c(this['locale']);return _0x24769b['set']({'label':_0x1a7a09,'class':_0x1f711f||'','isVisible':!0x0,'withText':!0x0}),_0x24769b;}}class Y extends _0x1264d7{['contentFieldView'];['copyButtonView'];constructor(_0x6e042e,_0x5e654b=''){super(_0x6e042e),this['set']({'value':null,'isVisible':!0x1,'isProcessing':!0x1});const _0x1f83a8=this['bindTemplate'];this['contentFieldView']=new At(_0x6e042e,_0x5e654b),this['copyButtonView']=this['_createCopyButton'](),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form__content-area-wrapper',_0x1f83a8['if']('isVisible','ck-hidden',_0xac916d=>!_0xac916d)],'tabindex':'-1'},'children':[{'tag':'div','attributes':{'class':['ck','ck-ai-form__content-area',_0x1f83a8['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 _0x1683cf=!0x1;this['on']('change:value',(_0x31fcc5,_0x1ea66c,_0x337da4)=>{const _0x40f1bc=!this['contentFieldView']['element']['querySelector']('.ck-ai-form__loader');this['contentFieldView']['setContent'](_0x337da4),this['isProcessing']&&_0x40f1bc&&!_0x1683cf&&this['element']['scrollTo']({'top':this['element']['scrollHeight'],'behavior':'smooth'});}),this['on']('change:isProcessing',(_0x114809,_0x2900ea,_0x1bc6f4)=>{_0x1683cf=!0x1,_0x1bc6f4?(this['value']=null,this['contentFieldView']['appendLoader']()):this['value']||this['contentFieldView']['setContent']('');}),this['listenTo'](this['element'],'wheel',()=>{_0x1683cf=!0x0;}),this['listenTo'](this['element'],'mousedown',()=>{_0x1683cf=!0x0;});}['focus'](){this['element']['focus']();}['_createCopyButton'](){const _0x335359=this['locale'],_0x25c513=new _0x2ec46c(this['locale']),_0x53a716='ck-ai-form__copy-button';return _0x25c513['set']({'label':i(_0x335359,'Copy'),'icon':_0x873a7d,'class':_0x53a716,'tooltip':!0x0}),_0x25c513['bind']('isVisible')['to'](this,'value',_0x103c83=>!!_0x103c83),_0x25c513['bind']('isEnabled')['to'](this,'isProcessing',_0x4d2ef4=>!_0x4d2ef4),_0x25c513['on']('execute',()=>{this['_copyHTMLToClipboard'](this['contentFieldView']['element']),_0x25c513['icon']=_0x4303e4,_0x25c513['class']=_0x53a716+'\x20ck-ai-form__copy-button--copied',this['focus'](),setTimeout(()=>{_0x25c513['icon']=_0x873a7d,_0x25c513['class']=_0x53a716;},0x3e8);}),_0x25c513;}['_copyHTMLToClipboard'](_0x3cf4d3){const {window:_0x543bc8,document:_0x8c0a55}=_0x39d775;if(_0x543bc8['ClipboardItem']){const {Blob:_0x39ef5d,ClipboardItem:_0x27a2bc}=_0x543bc8,_0x251095=[new _0x27a2bc({'text/html':new _0x39ef5d([_0x3cf4d3['innerHTML']],{'type':'text/html'}),'text/plain':new _0x39ef5d([_0x3cf4d3['textContent']||''],{'type':'text/plain'})})];navigator['clipboard']['write'](_0x251095);}else{const _0x16aa93=_0x8c0a55['createElement']('div');_0x16aa93['style']['position']='absolute',_0x16aa93['style']['left']='-9999px',_0x16aa93['innerHTML']='<span>[</span>'+_0x3cf4d3['innerHTML']+'<span>]</span>',_0x8c0a55['body']['appendChild'](_0x16aa93);const _0x215dc6=_0x8c0a55['createRange']();_0x215dc6['setStartAfter'](_0x16aa93['firstElementChild']),_0x215dc6['setEndBefore'](_0x16aa93['lastElementChild']);const _0x5e09ec=_0x543bc8['getSelection']();_0x5e09ec['removeAllRanges'](),_0x5e09ec['addRange'](_0x215dc6),_0x8c0a55['execCommand']('copy'),_0x16aa93['remove']();}}}class At extends _0x1264d7{constructor(_0x7f6647,_0x473497=''){super(_0x7f6647),this['loaderView']=this['_createLoader'](),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-content',_0x473497,'ck-reset_all-excluded','ck-ai-form__content-field']}});}['setContent'](_0x4862be){this['element']['innerHTML']=_0x4862be;}['appendLoader'](){this['element']['appendChild'](this['loaderView']['element']);}['_createLoader'](){const _0x21c893=new _0x1264d7(),_0x468032=this['locale'],_0x13e595=new _0x408141();return _0x13e595['isVisible']=!0x0,_0x21c893['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form__loader']},'children':[_0x13e595,{'text':i(_0x468032,'AI\x20is\x20writing...')}]}),_0x21c893['render'](),_0x21c893;}}class st extends _0x1264d7{constructor(_0x3b9732,_0x576126=''){super(_0x3b9732);const _0x4bd1f9=new rt(),_0x5a4c95=this['bindTemplate'];this['set']('text',_0x576126),_0x4bd1f9['content']=tt,this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form__error']},'children':[_0x4bd1f9,{'text':_0x5a4c95['to']('text')}]});}}class ct extends nt{['submitButtonView'];['showHistoryButtonView'];constructor(_0x21603d,_0x53ad91){super(_0x21603d,_0x53ad91),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',(_0x4e58be,_0x596e7c)=>{_0x4e58be['target']==this['queryView']['fieldView']['element']&&(this['submit'](),_0x596e7c());});}['_createSubmitButton'](){const _0x4615a7=new _0x2ec46c(this['locale']),_0x531749=this['locale'];return _0x4615a7['set']({'icon':ht,'label':i(_0x531749,'Submit'),'isVisible':!0x0,'tooltip':!0x0,'class':'ck-ai-form__submit'}),_0x4615a7['on']('execute',()=>{this['submit']();}),_0x4615a7['bind']('isEnabled')['to'](this['queryView']['fieldView'],'isEmpty',this,'isEnabled',(_0x11b4f3,_0x1d4dd9)=>!_0x11b4f3&&_0x1d4dd9),_0x4615a7;}['_createShowHistoryButton'](){const _0x3e3fab=new _0x2ec46c(this['locale']),_0x267d3e=this['resultsView'],_0x99a934=this['locale'];_0x3e3fab['set']({'label':i(_0x99a934,'History'),'withText':!0x1,'icon':et,'tooltip':!0x0,'tooltipPosition':'sw','class':'ck-ai-form__toggle-history'}),_0x3e3fab['bind']('isOn')['to'](_0x267d3e,'isVisible'),_0x3e3fab['bind']('isEnabled')['to'](this,'isEnabled'),_0x3e3fab['on']('execute',()=>{_0x267d3e['isVisible']=!_0x267d3e['isVisible'],_0x267d3e['isVisible']?this['filteredView']['focus']():this['focus']();});const _0x8b9f20=()=>{_0x39d775['window']['requestAnimationFrame'](()=>{if(ot(this['element'])){const _0x19183b=new it(this['queryView']['fieldView']['element']),_0x346c48=_0x19183b['width'],_0x2c6a6a='rtl'===_0x99a934['uiLanguageDirection']?'left':'right';_0x19183b['excludeScrollbarsAndBorders'](),_0x3e3fab['element']['style'][_0x2c6a6a]=_0x346c48-_0x19183b['width']+0x1+'px';}});};return this['queryView']['fieldView']['on']('update',_0x8b9f20),this['on']('render',_0x8b9f20),_0x3e3fab;}['submit'](){const _0x199a29=this['queryView']['fieldView']['element']['value'];this['fire']('submit',_0x199a29);}['focus'](_0x157770){-0x1===_0x157770?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}}class ft extends Ct{['historyGroupView'];['clearHistoryButton'];constructor(_0x4ad606){super(_0x4ad606),this['clearHistoryButton']=this['_createClearHistoryButton'](),this['historyGroupView']=new Ht(),this['historyGroupView']['children']['add'](this['clearHistoryButton'],0x1),this['historyGroupView']['label']=i(_0x4ad606,'Prompt\x20history'),this['historyGroupView']['items']['delegate']('execute')['to'](this),this['items']['add'](this['historyGroupView']);}['filter'](){let _0x1494b2=0x0;for(const _0x1bcf6f of this['items'])_0x1494b2+=_0x1bcf6f['items']['length'];return{'resultsCount':_0x1494b2,'totalItemsCount':_0x1494b2};}['_createClearHistoryButton'](){const _0x42e8ec=this['locale'],_0x4c598b=new _0x2ec46c(this['locale']);return _0x4c598b['set']({'label':'('+i(_0x42e8ec,'Clear')+')','withText':!0x0}),_0x4c598b['on']('execute',()=>this['fire']('clearHistory')),_0x4c598b;}}class bt extends xt{constructor(_0x481648){super();const _0x5cfbf2=new kt(),_0x3f9a0d=new _0x2ec46c(this['locale'],_0x5cfbf2);this['children']['add'](_0x3f9a0d),_0x3f9a0d['set']({'label':_0x481648['prompt'],'withText':!0x0}),_0x3f9a0d['on']('execute',()=>{this['fire']('execute',{'value':jt(_0x481648['prompt'])});});}}const ts='CKEditor/AIFormView/PromptHistory';class wt extends _0x2f43ce{constructor(){super(),this['_loadFromSessionStorage'](),this['on']('add',(_0x1b8089,_0x1c8006)=>{const _0x5b6060=os(_0x1c8006['prompt']);for(const _0x444935 of this)if(_0x444935!=_0x1c8006&&os(_0x444935['prompt'])===_0x5b6060){this['remove'](_0x444935);break;}this['length']>0x14&&this['remove'](this['last']),this['_saveToSessionStorage']();}),this['on']('remove',()=>{this['_saveToSessionStorage']();});}['_loadFromSessionStorage'](){const _0x209156=sessionStorage['getItem'](ts)||'[]';this['addMany'](JSON['parse'](_0x209156));}['_saveToSessionStorage'](){sessionStorage['setItem'](ts,JSON['stringify'](this['map'](_0x421669=>_0x421669)));}}function os(_0x5b5ae3){return _0x5b5ae3['toLowerCase']()['trim']();}class _ extends _0x1264d7{['focusTracker'];['keystrokes'];['contentArea'];['toolbar'];['promptView'];['errorView'];['_focusables'];['focusCycler'];['_promptHistory'];constructor(_0x41e1a1,_0x3e3495,_0x3da092=''){super(_0x41e1a1),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(_0x41e1a1),this['contentArea']=new Y(_0x41e1a1,_0x3da092),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 _0x104d2a=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form',_0x3e3495],'tabindex':'-1'},'children':[{'tag':'div','attributes':{'class':['ck','ck-ai-form-content']},'children':[{'tag':'div','attributes':{'class':[_0x104d2a['if']('isError','ck-hidden',_0x568712=>!_0x568712)]},'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'](_0x5e1089=0x1){-0x1===_0x5e1089?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 _0x774d48=this['locale'],_0x50f858=new ct(_0x774d48,{'queryView':{'label':i(_0x774d48,'Ask\x20AI\x20to\x20edit\x20or\x20generate'),'creator':dt,'showIcon':!0x1,'showResetButton':!0x1},'infoView':{'text':{'noSearchableItems':{'primary':i(_0x774d48,'Empty\x20history'),'secondary':i(_0x774d48,'Ask\x20AI\x20and\x20your\x20prompts\x20will\x20be\x20listed\x20here\x20for\x20you\x20to\x20use\x20later.')}}},'filteredView':this['_createHistoryView'](),'queryMinChars':0x1/0x0,'resetOnBlur':!0x1});return _0x50f858['bind']('isEnabled')['to'](this,'isEnabled',this,'isProcessing',(_0x28c512,_0x31e094)=>_0x28c512&&!_0x31e094),this['listenTo'](_0x50f858,'submit',(_0x1b4d6f,_0x5e8c38)=>{this['prompt']=_0x5e8c38;const _0x3e58a4=yt(_0x5e8c38);this['fire']('submitPrompt',_0x3e58a4),_0x5e8c38['trim']()&&this['_promptHistory']['add']({'prompt':_0x3e58a4},0x0);},{'priority':'high'}),_0x50f858;}['_createHistoryView'](){const _0x1306c5=new ft(this['locale']);return _0x1306c5['historyGroupView']['items']['bindTo'](this['_promptHistory'])['as'](bt),_0x1306c5['on']('clearHistory',()=>{this['_promptHistory']['clear'](),this['promptView']['search'](''),this['promptView']['focus']();}),_0x1306c5;}['_createToolbar'](){const _0x16cb46=new lt(this['locale']);return _0x16cb46['replaceButton']['bind']('isEnabled')['to'](this,'isEnabled',this,'isProcessing',this,'value',(_0x58ef14,_0x51f38d,_0x44ec20)=>_0x58ef14&&!_0x51f38d&&!!_0x44ec20),_0x16cb46['replaceButton']['delegate']('execute')['to'](this,'replaceContent'),_0x16cb46['insertButton']['bind']('isEnabled')['to'](this,'isEnabled',this,'isProcessing',this,'value',(_0x2cd528,_0x5a8a26,_0x91fff8)=>_0x2cd528&&!_0x5a8a26&&!!_0x91fff8),_0x16cb46['insertButton']['delegate']('execute')['to'](this,'insertContentBelow'),_0x16cb46['tryAgainButton']['bind']('isEnabled')['to'](this,'isEnabled',this,'isProcessing',(_0x1750c5,_0x29e486)=>_0x1750c5&&!_0x29e486),_0x16cb46['tryAgainButton']['delegate']('execute')['to'](this,'tryAgainEvent'),_0x16cb46['stopButton']['bind']('isEnabled')['to'](this,'isProcessing'),_0x16cb46['stopButton']['delegate']('execute')['to'](this,'stopProcessing'),_0x16cb46;}['startProcessing'](){this['value']='',this['isError']=!0x1,this['isProcessing']=!0x0,this['contentArea']['isVisible']=!0x0,this['toolbar']['isVisible']=!0x0,this['contentArea']['focus']();}['finishProcessing'](){const _0x1b9fa0=this['locale'];this['isProcessing']=!0x1,this['prompt']='',this['promptView']['reset'](),this['value']&&(this['promptView']['queryView']['label']=i(_0x1b9fa0,'Ask\x20AI\x20to\x20improve\x20generated\x20text'));}['handleError'](_0x100ea3){const _0x4bfb0b=this['locale'];this['finishProcessing'](),this['isError']=!0x0,this['errorView']['text']=_0x100ea3||i(_0x4bfb0b,'AI_ERROR_FAILED'),this['value']||(this['contentArea']['isVisible']=!0x1);}}const w=globalThis['DataTransfer'];class n extends _0x7adea3{['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[_0x978a8f,a,E,_0x3be14e];}constructor(_0xfa6ac7){super(_0xfa6ac7),_0xfa6ac7['config']['define']('ai.aiAssistant.disabledElements',['media','rawHtml','tableOfContents']),_0xfa6ac7['config']['define']('ai.aiAssistant.contentAreaCssClass',''),_0xfa6ac7['config']['define']('ai.useTheme',!0x0),this['_uiCssClasses']='ck-ai-assistant-ui'+(_0xfa6ac7['config']['get']('ai.useTheme')?'\x20ck-ai-assistant-ui_theme':'');}['init'](){const {editor:_0x804729}=this;this['_aiAdapter']=_0x804729['plugins']['get'](E),this['_dialog']=_0x804729['plugins']['get'](_0x3be14e),this['_formView']=null,this['_commandDefinitions']=this['_getResolvedCommandsDefinitions']();const _0x514b48=new j(_0x804729,Array['from'](this['_commandDefinitions']['values']()));_0x804729['commands']['add']('showAIAssistant',_0x514b48),_0x804729['ui']['componentFactory']['add']('aiCommands',_0x1931b8=>{const _0x2e7682=_0x14394a(_0x1931b8);return _0x2e7682['set']({'class':'ck-ai-commands-dropdown\x20'+this['_uiCssClasses']}),_0x2e7682['buttonView']['set']({'label':i(_0x1931b8,'AI\x20Commands'),'icon':_0x2afa0d,'tooltip':!0x0}),_0x2e7682['on']('execute',_0xd784e2=>this['_onExecute'](_0xd784e2['source']['id'])),_0x40ab7a(_0x2e7682,_0x804729['ui']['view']['body'],function(_0x2b4707){const _0x36dc7a=o(_0x2b4707['config']['get']('ai.aiAssistant.commands'),_0x2b4707['locale']),_0x569bd6=U(_0x2b4707,_0x36dc7a)['filter'](_0x19a689=>_0x19a689['commands']['length']);if(0x1===_0x569bd6['length'])return U(_0x2b4707,_0x569bd6[0x0]['commands'])['map'](_0x13b0e3=>({'id':_0x13b0e3['id'],'label':_0x13b0e3['label']}));return _0x569bd6['map'](_0x5c67e4=>{const {groupId:_0x52bb8c,groupLabel:_0x127614,commands:_0x1d9076}=_0x5c67e4,_0x1d1eb6=U(_0x2b4707,_0x1d9076)['map'](_0x5b4da5=>({'id':_0x5b4da5['id'],'label':_0x5b4da5['label']}));return{'id':_0x52bb8c,'menu':_0x127614||_0x52bb8c,'children':_0x1d1eb6};});}(_0x804729),{'ariaLabel':i(_0x1931b8,'AI\x20Commands')}),_0x2e7682['menuView']['menuPanelClass']='ck-ai-commands-dropdown\x20'+this['_uiCssClasses'],_0x514b48['on']('change:enabledCommandsIds',_0x5dec93),_0x2e7682['menuView']['once']('render',_0x5dec93),_0x2e7682;function _0x5dec93(){_0x2e7682['isEnabled']=_0x514b48['enabledCommandsIds']['length']>0x0;for(const _0xd3010b of _0x2e7682['menuView']['buttons'])_0xd3010b['isEnabled']=_0x514b48['enabledCommandsIds']['includes'](_0xd3010b['id']);}}),_0x804729['ui']['componentFactory']['add']('menuBar:aiCommands',_0x1e1f97=>{const _0x503ba9=new _0x1e3ae5(_0x1e1f97);_0x503ba9['buttonView']['set']({'label':i(_0x1e1f97,'AI\x20Commands'),'icon':_0x2afa0d}),_0x503ba9['bind']('isEnabled')['to'](_0x514b48,'enabledCommandsIds',_0x28108c=>_0x28108c['length']>0x0);const _0x40d7cf=o(_0x804729['config']['get']('ai.aiAssistant.commands'),_0x1e1f97);return this['_populateMenuBarMenu'](_0x514b48,_0x503ba9,_0x40d7cf,_0x3644a3=>this['_onExecute'](_0x3644a3)),_0x503ba9;}),_0x804729['ui']['componentFactory']['add']('aiAssistant',()=>{const _0x1c2975=this['_createAIAssistantUIButton'](_0x2ec46c);return _0x1c2975['set']({'tooltip':!0x0,'class':'ck-ai-assistant-button\x20'+this['_uiCssClasses']}),_0x1c2975;}),_0x804729['ui']['componentFactory']['add']('menuBar:aiAssistant',()=>{const _0x3036f2=this['_createAIAssistantUIButton'](_0x5a418d);return _0x3036f2['set']({'role':'menuitemcheckbox'}),_0x3036f2;}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x3e093a=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x15d2f6;for(const _0x44e76b in _0x3e093a){const _0x461682=_0x44e76b,_0x465a6c=_0x3e093a[_0x461682];if('aiLicenseKeyValid'==_0x465a6c||'aiLicenseKeyInvalid'==_0x465a6c||'aiLicenseKeyExpired'==_0x465a6c||'aiLicenseKeyDomainLimit'==_0x465a6c||'aiLicenseKeyNotAllowed'==_0x465a6c||'aiLicenseKeyEvaluationLimit'==_0x465a6c||'aiLicenseKeyTrialLimit'==_0x465a6c||'aiLicenseKeyUsageLimit'==_0x465a6c){delete _0x3e093a[_0x461682],_0x15d2f6=_0x465a6c,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'aiLicenseKeyInvalid'==_0x15d2f6&&_0x3e093a['_showLicenseError']('invalid'),'aiLicenseKeyExpired'==_0x15d2f6&&_0x3e093a['_showLicenseError']('expired'),'aiLicenseKeyDomainLimit'==_0x15d2f6&&_0x3e093a['_showLicenseError']('domainLimit'),'aiLicenseKeyNotAllowed'==_0x15d2f6&&_0x3e093a['_showLicenseError']('featureNotAllowed','AIAssistant'),'aiLicenseKeyEvaluationLimit'==_0x15d2f6&&_0x3e093a['_showLicenseError']('evaluationLimit'),'aiLicenseKeyTrialLimit'==_0x15d2f6&&_0x3e093a['_showLicenseError']('trialLimit'),'aiLicenseKeyUsageLimit'==_0x15d2f6&&_0x3e093a['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['showUI'](_0xc5e4b6='',_0x486bb7='',_0x5a38d9='custom'){const _0x309f07=this['editor'],_0x4e9ef1=_0x309f07['editing']['view'],_0x1ea6ed=_0x309f07['plugins']['get'](a),_0x381244=_0x309f07['plugins']['get'](_0x978a8f);_0x1ea6ed['showFakeVisualSelection']();const _0x44205a=new w(),_0x478c75=new ClipboardEvent('copy',{'clipboardData':_0x44205a}),_0x4fcd3a=new _0x1e961d(_0x44205a),_0x4100c6=new _0x4a5fa8(_0x4e9ef1,_0x478c75,{'dataTransfer':_0x4fcd3a});_0x381244['_forceMarkersCopy']('comment',()=>{_0x4e9ef1['document']['fire']('copy',_0x4100c6);}),this['_formView']||(this['_initView'](),this['_aiAssistantController']=new k(_0x309f07,this['_aiAdapter']['textAdapter'],this['_formView']));let _0x1a5bf8=_0x4fcd3a['getData']('text/html');const _0x437aed=_0x309f07['model']['document']['selection'],_0x10bd4f=Array['from'](_0x437aed['getRanges']());0x1===_0x10bd4f['length']&&_0x10bd4f[0x0]['isFlat']&&!_0x437aed['getSelectedElement']()&&''!==_0x1a5bf8['replace'](/&nbsp;/g,'')['trim']()&&(_0x1a5bf8='<p>'+_0x1a5bf8+'</p>'),this['_aiAssistantController']['updateView']({'actionId':_0x5a38d9,'query':_0xc5e4b6,'htmlContent':_0x1a5bf8,'label':_0x486bb7,'mainActionLabel':M[_0x309f07['model']['document']['selection']['isCollapsed']?'INSERT':'REPLACE']}),'aiAssistant'!==this['_dialog']['id']?this['_dialog']['show']({'id':'aiAssistant','icon':_0x119fc9,'title':i(this['editor']['locale'],'AI\x20Assistant'),'content':this['_formView'],'position':_0x11e7de['EDITOR_TOP_SIDE'],'onShow':()=>{this['_formView']['focus']();},'onHide':()=>{this['_aiAssistantController']['reset'](),_0x1ea6ed['hideFakeVisualSelection']();}}):this['_dialog']['view']['wasMoved']||this['_dialog']['view']['updatePosition']();}['hideUI'](){this['_dialog']['hide']();}['_getResolvedCommandsDefinitions'](){const _0x5b4a47=new Map(),_0x239831=o(this['editor']['config']['get']('ai.aiAssistant.commands'),this['editor']['locale']);for(const _0x45629b of _0x239831)for(const _0x3c62b0 of _0x45629b['commands'])_0x5b4a47['set'](_0x3c62b0['id'],{..._0x3c62b0,'groupId':_0x45629b['groupId'],'groupLabel':_0x45629b['groupLabel']||_0x45629b['groupId']});return _0x5b4a47;}['_createAIAssistantUIButton'](_0x1f2cb6){const _0x16817f=this['editor'],_0x3d5242=_0x16817f['commands']['get']('showAIAssistant'),_0x3b9be0=new _0x1f2cb6(_0x16817f['locale']);return _0x3b9be0['set']({'label':i(_0x16817f['locale'],'AI\x20Assistant'),'icon':_0x119fc9,'isToggleable':!0x0}),_0x3b9be0['bind']('isEnabled')['to'](_0x3d5242),_0x3b9be0['bind']('isOn')['to'](this['_dialog'],'id',_0x5eafab=>'aiAssistant'===_0x5eafab),this['listenTo'](_0x3b9be0,'execute',()=>{_0x3b9be0['isOn']?this['hideUI']():_0x3d5242['execute']();}),_0x3b9be0;}['_initView'](){const _0x20dbac=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',()=>{_0x20dbac['insertContent'](this['_aiAssistantController']['currentContext']),this['hideUI']();}),this['listenTo'](this['_formView'],'insertContentBelow',()=>{_0x20dbac['insertContentBelow'](this['_aiAssistantController']['currentContext']),this['hideUI']();}),this['_initAriaAiStatusChangeAnnouncements']();}['_initAriaAiStatusChangeAnnouncements'](){const {locale:_0x4e9630,ui:{ariaLiveAnnouncer:_0x2188f6}}=this['editor'];this['_formView']['contentArea']['on']('change:isProcessing',(_0x1eeaec,_0x4a32ce,_0x98511c)=>{const _0x776e6f=this['_aiAssistantController']['currentContext'];_0x98511c?_0x2188f6['announce'](i(_0x4e9630,'AI\x20is\x20writing')):_0x776e6f&&_0x2188f6['announce'](i(_0x4e9630,'Generated\x20content:\x20%0',_0x776e6f),{'politeness':'polite','isUnsafeHTML':!0x0});}),this['_formView']['on']('change:isError',(_0x41f3e7,_0x4e3ef,_0x363481)=>{if(_0x363481){const _0x21ca47=this['_formView']['errorView']['text'];_0x2188f6['announce'](i(_0x4e9630,'Error\x20during\x20AI\x20content\x20generation:\x20%0',_0x21ca47));}});}['_onExecute'](_0x141822){const _0xf275a5=this['_commandDefinitions']['get'](_0x141822),_0x46d6fe=this['editor'],_0x3e5903=_0x46d6fe['model']['document']['selection'],_0xec3fc=_0x46d6fe['commands']['get']('showAIAssistant'),_0x36f0f4=_0x46d6fe['plugins']['get'](a),_0x17b17d=''+(_0xf275a5['groupId']!==x?_0xf275a5['groupLabel']+':\x20':'')+_0xf275a5['label'];if(!0x1!==_0xf275a5['requiresContent']&&_0x3e5903['isCollapsed']){const _0x1be7aa=_0x54b721(_0x3e5903['getSelectedBlocks']())||_0x46d6fe['model']['schema']['getLimitElement'](_0x3e5903);_0x46d6fe['model']['change'](_0x2b8ea6=>{_0x2b8ea6['setSelection'](_0x1be7aa,'in');});}_0x36f0f4['showFakeVisualSelection'](),_0xec3fc['execute'](_0xf275a5['prompt'],_0x17b17d,'command:'+_0x141822);}['_populateMenuBarMenu'](_0x1c9f0e,_0xac2fc5,_0xf2c620,_0x2dbe9f){const _0x5c6469=this['editor'],_0x4dc98f=_0x5c6469['locale'],_0x223396=new _0x1152d8(_0x4dc98f),_0x36403c=U(_0x5c6469,_0xf2c620)['filter'](_0x13617e=>_0x13617e['commands']['length']);0x1===_0x36403c['length']?this['_getMenuBarGroupButtons']({'command':_0x1c9f0e,'commands':_0x36403c[0x0]['commands'],'parentMenuView':_0xac2fc5,'onExecute':_0x2dbe9f})['forEach'](_0x54fefa=>_0x223396['items']['add'](_0x54fefa)):_0x36403c['forEach'](({groupId:_0x1c5f94,groupLabel:_0x5de442,commands:_0x4cb296})=>{const _0x173bdd=new _0x127ed8(_0x4dc98f,_0xac2fc5),_0x23ad3b=new _0x1e3ae5(_0x4dc98f),_0x290ce1=new _0x1152d8(_0x4dc98f),_0x71638e=this['_getMenuBarGroupButtons']({'command':_0x1c9f0e,'commands':_0x4cb296,'parentMenuView':_0x23ad3b,'onExecute':_0x2dbe9f});_0x23ad3b['buttonView']['set']({'label':_0x5de442||_0x1c5f94}),_0x23ad3b['delegate']('execute')['to'](_0xac2fc5),_0x290ce1['items']['addMany'](_0x71638e),_0x23ad3b['panelView']['children']['add'](_0x290ce1),_0x173bdd['children']['add'](_0x23ad3b),_0x223396['items']['add'](_0x173bdd);}),_0xac2fc5['panelView']['children']['add'](_0x223396);}['_getMenuBarGroupButtons']({command:_0x16ae19,commands:_0x1daa04,parentMenuView:_0x33474f,onExecute:_0x2beeae}){const _0x5b3b41=this['editor'],_0x28a8c8=_0x5b3b41['locale'];return U(_0x5b3b41,_0x1daa04)['map'](_0x299699=>{const _0x4db381=new _0x127ed8(_0x28a8c8,_0x33474f),_0x5d1c34=new _0x5a418d(_0x28a8c8);return _0x5d1c34['set']({'label':_0x299699['label']}),_0x5d1c34['delegate']('execute')['to'](_0x33474f),_0x5d1c34['on']('execute',()=>_0x2beeae(_0x299699['id'])),_0x5d1c34['bind']('isEnabled')['to'](_0x16ae19,'enabledCommandsIds',_0x1d4664=>_0x1d4664['includes'](_0x299699['id'])),_0x4db381['children']['add'](_0x5d1c34),_0x4db381;});}}function B(_0x12f1df,_0x3377bf){return void 0x0!==_0x12f1df['order']&&void 0x0===_0x3377bf['order']?0x1:void 0x0===_0x12f1df['order']&&void 0x0!==_0x3377bf['order']?-0x1:void 0x0!==_0x12f1df['order']&&void 0x0!==_0x3377bf['order']?_0x12f1df['order']-_0x3377bf['order']:0x0;}function U(_0x414aef,_0xbf674e){_0xbf674e['sort'](B);const _0x45f497={},_0x304dee=[];for(const _0x40a1c3 of _0xbf674e)if(void 0x0!==_0x40a1c3['order']){if(_0x40a1c3['order']in _0x45f497)throw new _0x4b94b4('ai-commands-config-order-collision',_0x414aef,{'conflictingDefinitions':[_0x40a1c3,_0x45f497[_0x40a1c3['order']]]});_0x45f497[_0x40a1c3['order']]=_0x40a1c3,_0x304dee['splice'](_0x40a1c3['order'],0x0,_0x40a1c3);}else _0x304dee['push'](_0x40a1c3);return _0x304dee;}class r extends _0x7adea3{static get['requires'](){return[n,a];}static get['pluginName'](){return'AIAssistant';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x138bcb){super(_0x138bcb);const _0x385fa1=_0x138bcb['config'],_0x594e4e=_0x138bcb['locale'];_0x385fa1['define']('ai.aiAssistant.preserveComments',!0x0),_0x385fa1['define']('ai.aiAssistant.commands',function(_0x121688){return[{'groupId':'editOrReview','groupLabel':i(_0x121688,'Edit\x20or\x20review'),'commands':[{'id':'improveWriting','label':i(_0x121688,'Improve\x20writing'),'prompt':'Fix\x20spelling\x20mistakes,\x20use\x20proper\x20grammar\x20and\x20apply\x20good\x20writing\x20practices.\x20Do\x20not\x20lose\x20the\x20original\x20meaning.'},{'id':'makeShorter','label':i(_0x121688,'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(_0x121688,'Make\x20longer'),'prompt':'Improve\x20this\x20content\x20by\x20using\x20descriptive\x20language\x20and\x20inserting\x20more\x20information\x20and\x20more\x20detailed\x20explanations.'},{'id':'simplifyLanguage','label':i(_0x121688,'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(_0x121688,'Generate\x20from\x20selection'),'commands':[{'id':'summarize','label':i(_0x121688,'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(_0x121688,'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(_0x121688,'Change\x20tone'),'commands':[{'id':'professional','label':i(_0x121688,'Professional'),'prompt':'Improve\x20using\x20polished,\x20formal,\x20and\x20respectful\x20language\x20to\x20convey\x20professional\x20expertise\x20and\x20competence.'},{'id':'casual','label':i(_0x121688,'Casual'),'prompt':'Improve\x20using\x20casual,\x20informal\x20language\x20to\x20convey\x20a\x20casual\x20conversation\x20with\x20a\x20real\x20person.'},{'id':'direct','label':i(_0x121688,'Direct'),'prompt':'Improve\x20using\x20direct\x20language,\x20using\x20only\x20the\x20essential\x20information.'},{'id':'confident','label':i(_0x121688,'Confident'),'prompt':'Improve\x20using\x20compelling,\x20optimistic\x20language\x20to\x20convey\x20confidence\x20in\x20the\x20writing.'},{'id':'friendly','label':i(_0x121688,'Friendly'),'prompt':'Improve\x20using\x20friendly,\x20comforting\x20language,\x20to\x20convey\x20understanding\x20and\x20empathy.'}]},{'groupId':'changeStyle','groupLabel':i(_0x121688,'Change\x20style'),'commands':[{'id':'business','label':i(_0x121688,'Business'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20business\x20professional\x20with\x20formal\x20language.'},{'id':'legal','label':i(_0x121688,'Legal'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20legal\x20professional\x20using\x20valid\x20legal\x20terminology.'},{'id':'journalism','label':i(_0x121688,'Journalism'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20journalist\x20using\x20engaging\x20language\x20to\x20convey\x20the\x20importance\x20of\x20the\x20information.'},{'id':'poetic','label':i(_0x121688,'Poetic'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20poem\x20using\x20poetic\x20techniques\x20without\x20losing\x20the\x20original\x20meaning.'}]},{'groupId':'translate','groupLabel':i(_0x121688,'Translate'),'commands':[{'id':'translateEnglish','label':i(_0x121688,'English'),'prompt':'Translate\x20the\x20content\x20to\x20English\x20language.'},{'id':'translateSpanish','label':i(_0x121688,'Spanish'),'prompt':'Translate\x20the\x20content\x20to\x20Spanish\x20language.'},{'id':'translatePortuguese','label':i(_0x121688,'Portuguese'),'prompt':'Translate\x20the\x20content\x20to\x20Portuguese\x20language.'},{'id':'translateGerman','label':i(_0x121688,'German'),'prompt':'Translate\x20the\x20content\x20to\x20German\x20language.'},{'id':'translateFrench','label':i(_0x121688,'French'),'prompt':'Translate\x20the\x20content\x20to\x20French\x20language.'},{'id':'translateChinese','label':i(_0x121688,'Simplified\x20Chinese'),'prompt':'Translate\x20the\x20content\x20to\x20Simplified\x20Chinese\x20language.'},{'id':'translateHindi','label':i(_0x121688,'Hindi'),'prompt':'Translate\x20the\x20content\x20to\x20Hindi\x20language.'},{'id':'translateArabic','label':i(_0x121688,'Arabic'),'prompt':'Translate\x20the\x20content\x20to\x20Arabic\x20language.'}]}];}(_0x594e4e)),_0x385fa1['define']('ai.aiAssistant.extraCommandGroups',[]),_0x385fa1['define']('ai.aiAssistant.removeCommands',[]);let _0x716cec=o(_0x385fa1['get']('ai.aiAssistant.commands'),_0x594e4e);const _0x5146df=_0x385fa1['get']('ai.aiAssistant.extraCommandGroups'),_0x194f7b=_0x385fa1['get']('ai.aiAssistant.removeCommands');_0x5146df['forEach'](_0x80b0b6=>{const _0x590898=_0x716cec['find'](_0x37eef5=>_0x37eef5['groupId']===_0x80b0b6['groupId']);_0x590898?_0x590898['commands']=_0x590898['commands']['concat'](_0x80b0b6['commands']):_0x716cec['push'](_0x80b0b6);}),_0x716cec=_0x716cec['filter'](_0x6cfe8e=>!_0x194f7b['includes'](_0x6cfe8e['groupId'])),_0x716cec['forEach'](_0x2d75b3=>{_0x2d75b3['commands']=_0x2d75b3['commands']['filter'](_0x2e1898=>!_0x194f7b['includes'](_0x2e1898['id']));}),_0x385fa1['set']('ai.aiAssistant.commands',_0x716cec);}}class P extends _0x7adea3{['abortController'];static get['requires'](){return[E];}constructor(_0x47a4ca){super(_0x47a4ca),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'](_0x20dfb8){return this['sendRequest'](_0x20dfb8)['catch'](_0x36ae97=>{if(_0x36ae97 instanceof R)return Promise['reject'](_0x36ae97);if('AbortError'==_0x36ae97['name'])return Promise['resolve']();throw console['error'](_0x36ae97),new _0x4b94b4('aitextadapter-send-request-failed',null);});}async['_prepareRequestHeaders'](_0x1a153f,_0xc1224a){const _0xe4d0af=this['editor']['locale'],_0x43e188={'Content-Type':'application/json'};if('object'==typeof _0x1a153f)Object['assign'](_0x43e188,_0x1a153f);else{if(_0x1a153f)try{const _0x23daba=await _0x1a153f(_0xc1224a);Object['assign'](_0x43e188,_0x23daba);}catch(_0x4f2ae3){return Promise['reject'](new R(i(_0xe4d0af,'AI_ERROR_GET_HEADERS')));}}return _0x43e188;}async['_prepareRequestParameters'](_0x16be38,_0xa6173a){const _0x37eb32=this['editor']['locale'];if('object'==typeof _0x16be38)return _0x16be38;try{return await _0x16be38(_0xa6173a);}catch(_0x140879){return Promise['reject'](new R(i(_0x37eb32,'AI_ERROR_GET_PARAMETERS')));}}}class O extends P{['_apiUrl'];['_requestHeaders'];['_requestParameters'];static get['pluginName'](){return'OpenAITextAdapter';}constructor(_0x5cb773){super(_0x5cb773),_0x5cb773['config']['define']('ai.openAI.apiUrl','https://api.openai.com/v1/chat/completions'),_0x5cb773['config']['get']('ai.openAI.requestParameters')||_0x5cb773['config']['define']('ai.openAI.requestParameters',{'model':'gpt-3.5-turbo','max_tokens':0x7d0,'temperature':0x1,'top_p':0x1,'stream':!0x0}),this['_apiUrl']=_0x5cb773['config']['get']('ai.openAI.apiUrl'),this['_requestHeaders']=_0x5cb773['config']['get']('ai.openAI.requestHeaders')||{},this['_requestParameters']=_0x5cb773['config']['get']('ai.openAI.requestParameters');}async['sendRequest']({query:_0x55150a,context:_0x35cf97,onData:_0x252017,actionId:_0x19a90d}){const _0x48bc52=this['editor']['locale'],_0x2075bf=await this['prepareMessages'](_0x55150a,_0x35cf97,_0x19a90d),_0x444293=await this['_prepareRequestHeaders'](this['_requestHeaders'],_0x19a90d),_0xcaf265=await this['_prepareRequestParameters'](this['_requestParameters'],_0x19a90d),_0x27a67a={'messages':_0x2075bf,..._0xcaf265},_0x10fc35={'method':'POST','headers':_0x444293,'body':JSON['stringify'](_0x27a67a),'signal':this['abortController']['signal']},_0x5a4b2c=await fetch(this['_apiUrl'],_0x10fc35);if(_0x5a4b2c['ok'])return _0xcaf265['stream']?await this['_readStreamableResponse'](_0x5a4b2c,_0x252017):await this['_readStaticResponse'](_0x5a4b2c,_0x252017),Promise['resolve']();{const _0x2855e1=await _0x5a4b2c['text']();return _0x2855e1['includes']('context_length_exceeded')?Promise['reject'](new R(i(_0x48bc52,'AI_ERROR_CONTEXT_LENGTH'))):_0x2855e1['includes']('Moderation')?Promise['reject'](new R(i(_0x48bc52,'AI_ERROR_MODERATION'))):Promise['reject'](new Error(_0x2855e1));}}async['prepareMessages'](_0xbbaca7,_0x1f1c7e,_0x1efb89){let _0x29fefd,_0x589dcf;return _0x1f1c7e?(_0x29fefd='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.',_0x589dcf='Instruction:\x0a'+_0xbbaca7+'\x0aYou\x20must\x20keep\x20the\x20text\x20formatting.\x0a\x0aContent:\x0a'+_0x1f1c7e):(_0x29fefd='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.',_0x589dcf=_0xbbaca7),[{'role':'system','content':_0x29fefd},{'role':'user','content':_0x589dcf}];}async['_readStreamableResponse'](_0x2001a3,_0x57b263){const _0x4ad512=_0x2001a3['body']['getReader'](),_0x1293a6=new TextDecoder();let _0x55d570='',_0x9590cd='',_0xc8de50='',_0x142c3b=!0x1;for(;!_0x142c3b;){const {done:_0x28cb3e,value:_0x43696b}=await _0x4ad512['read'](),_0x9819d2=_0x55d570+_0x1293a6['decode'](_0x43696b);let _0x5e8bfe='';_0x142c3b=_0x28cb3e;try{_0x5e8bfe=this['_cleanUpData'](_0x9819d2),_0x55d570='';}catch(_0x5b89b0){_0x55d570=_0x9819d2;continue;}_0x9590cd+=_0x5e8bfe,!_0x142c3b&&this['_isBufferIncomplete'](_0x9590cd)||_0x9590cd&&(_0xc8de50+=_0x9590cd,_0x9590cd='',_0x57b263(_0xc8de50));}return Promise['resolve']();}async['_readStaticResponse'](_0x1a7d44,_0x429636){return _0x429636((await _0x1a7d44['json']())['choices'][0x0]['message']['content']),Promise['resolve']();}['_isBufferIncomplete'](_0x1eaa18){const _0x1dc34d=_0x1eaa18['split']('<')['length']!==_0x1eaa18['split']('>')['length'],_0x4cbe1b=_0x1eaa18['length']<0x1e;return _0x1dc34d&&_0x4cbe1b;}['_cleanUpData'](_0x2515f1){return _0x2515f1['split'](/\n(?![^{]*\})/g)['map'](_0xc5745=>_0xc5745['replace']('data:\x20',''))['filter'](_0x1eb384=>_0x1eb384&&_0x1eb384['length']>0x0&&'[DONE]'!==_0x1eb384)['map'](_0xe78d13=>{const {choices:_0x56a85c}=JSON['parse'](_0xe78d13);if(_0x56a85c[0x0]?.['delta']?.['content'])return _0x56a85c[0x0]['delta']['content'];})['filter'](_0x1d6720=>_0x1d6720)['join']('');}}class D extends P{['_apiUrl'];['_requestHeaders'];['_bedrockClientConfig'];['_requestParameters'];static get['pluginName'](){return'AWSTextAdapter';}constructor(_0x2d1ebb){super(_0x2d1ebb),_0x2d1ebb['config']['get']('ai.aws.requestParameters')||_0x2d1ebb['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']=_0x2d1ebb['config']['get']('ai.aws.apiUrl'),this['_bedrockClientConfig']=_0x2d1ebb['config']['get']('ai.aws.bedrockClientConfig'),this['_requestHeaders']=_0x2d1ebb['config']['get']('ai.aws.requestHeaders'),this['_requestParameters']=_0x2d1ebb['config']['get']('ai.aws.requestParameters');}async['sendRequest']({query:_0x3803f5,context:_0x3562de,onData:_0x1b57f0,actionId:_0x2f2d25}){const {model:_0x56092a,stream:_0x3d0134,..._0x53bbe4}=await this['_prepareRequestParameters'](this['_requestParameters'],_0x2f2d25),_0x2401ea={'prompt':await this['preparePrompt'](_0x3803f5,_0x3562de,_0x56092a,_0x2f2d25),..._0x53bbe4};this['_apiUrl']?await this['_processProxyRequest'](_0x2401ea,_0x56092a,_0x3d0134,_0x1b57f0,_0x2f2d25):await this['_processAWSRequest'](_0x2401ea,_0x56092a,_0x3d0134,_0x1b57f0);}async['preparePrompt'](_0x1092af,_0x155361,_0x43e61f,_0x31e58e){let _0x66c790,_0x544ea4;return _0x155361?(_0x66c790='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.',_0x544ea4='Instruction:\x0a'+_0x1092af+'\x0aYou\x20must\x20keep\x20the\x20text\x20formatting.\x0a\x0aContent:\x0a'+_0x155361):(_0x66c790='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.',_0x544ea4=_0x1092af),'meta.llama'==this['getModelFamily'](_0x43e61f)?'<<SYS>>\x0a'+_0x66c790+'\x0a<</SYS>>\x0a[INST]\x0a'+_0x544ea4+'\x0a[/INST]':'Human:\x0a'+_0x66c790+'\x0a'+_0x544ea4+'\x0a\x0aAssistant:';}['getModelFamily'](_0x4c9ca2){if(/^anthropic\.claude/['test'](_0x4c9ca2))return'anthropic.claude';if(/^ai21\.j2/['test'](_0x4c9ca2))return'ai21.j2';if(/^cohere\.command/['test'](_0x4c9ca2))return'cohere.command';if(/^meta\.llama/['test'](_0x4c9ca2))return'meta.llama';throw new R(i(this['editor']['locale'],'AI_ERROR_UNSUPPORTED_MODEL',_0x4c9ca2));}async['_processProxyRequest'](_0x23b4de,_0x22c719,_0x5932ab,_0x2d853f,_0x1c5b9d){const _0x2bbc6f={'method':'POST','headers':await this['_prepareRequestHeaders'](this['_requestHeaders'],_0x1c5b9d),'body':JSON['stringify']({..._0x23b4de,'model':_0x22c719,'stream':_0x5932ab}),'signal':this['abortController']['signal']},_0x43652e=await fetch(this['_apiUrl'],_0x2bbc6f);_0x5932ab?await this['_readStreamableResponse'](_0x43652e,_0x22c719,_0x2d853f):await this['_readStaticResponse'](_0x43652e,_0x22c719,_0x2d853f);}async['_processAWSRequest'](_0x4db2f1,_0x41848d,_0x3d5cc6,_0x50fdb9){const _0x210d7b=new _0x2214ed(this['_bedrockClientConfig']),_0x11aded={'body':JSON['stringify'](_0x4db2f1),'contentType':'application/json','accept':'application/json','modelId':_0x41848d};let _0x1011cf;if(_0x3d5cc6){const _0xa5bd80=new _0x64cc60(_0x11aded);_0x1011cf=await _0x210d7b['send'](_0xa5bd80,{'abortSignal':this['abortController']['signal']}),await this['_readAsyncIterableResponse'](_0x1011cf,_0x41848d,_0x50fdb9);}else{const _0x24ec29=new _0x247505(_0x11aded);_0x1011cf=await _0x210d7b['send'](_0x24ec29,{'abortSignal':this['abortController']['signal']}),await this['_readStaticResponse'](_0x1011cf,_0x41848d,_0x50fdb9);}}async['_readAsyncIterableResponse'](_0x4153fb,_0x3ea3f6,_0x11ccdf){const _0x3ffd3a=_0x4153fb['body'],_0x17d5b5=new TextDecoder('utf-8');let _0x1b0f0f='';for await(const _0x35ce3e of _0x3ffd3a)if(_0x35ce3e['chunk']){const _0x38352c=_0x17d5b5['decode'](_0x35ce3e['chunk']['bytes']),_0x19d40c=JSON['parse'](_0x38352c);_0x1b0f0f+=this['_getGeneratedText'](_0x19d40c,_0x3ea3f6),_0x11ccdf(_0x1b0f0f);}return Promise['resolve']();}async['_readStreamableResponse'](_0x2047e2,_0x28fa99,_0x1354f1){const _0x5eae15=_0x2047e2['body'],_0x19d615=new TextDecoder('utf-8'),_0x49a6a3=_0x5eae15['getReader']();let _0x2a8854='',_0x3a89dc='',_0x46995e=!0x1;for(;!_0x46995e;){const {done:_0x30e138,value:_0x47c2aa}=await _0x49a6a3['read']();if(_0x46995e=_0x30e138,_0x46995e)break;const _0x2f13da=(_0x2a8854+_0x19d615['decode'](_0x47c2aa))['split']('\x0a')['map'](_0x1b6c04=>{try{return _0x2a8854='',JSON['parse'](_0x1b6c04);}catch(_0x49c9c3){return _0x2a8854=_0x1b6c04,null;}})['filter'](_0x3acb75=>null!==_0x3acb75);_0x2f13da['length']&&(_0x3a89dc+=_0x2f13da['map'](_0x5def85=>this['_getGeneratedText'](_0x5def85,_0x28fa99))['join'](''),_0x1354f1(_0x3a89dc));}return Promise['resolve']();}async['_readStaticResponse'](_0x3001dd,_0x27c656,_0x8c81b4){let _0x1e3285;return _0x1e3285=_0x3001dd instanceof Response?await _0x3001dd['json']():JSON['parse'](Buffer['from'](_0x3001dd['body'])['toString']('utf8')),(_0x8c81b4(this['_getGeneratedText'](_0x1e3285,_0x27c656)),Promise['resolve']());}['_getGeneratedText'](_0x368536,_0x3b9e3e){switch(this['getModelFamily'](_0x3b9e3e)){case'anthropic.claude':return _0x368536['completion'];case'ai21.j2':return _0x368536['completions'][0x0]['data']['text'];case'cohere.command':return _0x368536['generations'][0x0]['text'];case'meta.llama':return _0x368536['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 _0x4e9706,Command as _0x254919}from'@ckeditor/ckeditor5-core/dist/index.js';import{IconCopy as _0x3c188b,IconCheck as _0x14d873,IconError as tt,IconSubmit as ht,IconHistory as et,IconMagicWand as _0x116a3f,IconRobotPencil as _0x51c1b4}from'@ckeditor/ckeditor5-icons/dist/index.js';import{uid as _0x50c129,CKEditorError as _0x163809,ObservableMixin as _0x261290,global as _0x150524,isVisible as ot,Rect as it,Collection as _0x460103,FocusTracker as mt,KeystrokeHandler as ut,first as _0x3c08c}from'@ckeditor/ckeditor5-utils/dist/index.js';import{ToolbarView as at,ButtonView as _0x3d395b,View as _0x5b2cce,SpinnerView as _0x474a81,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 _0x5eb473,createDropdown as _0x17f9bd,addMenuToDropdown as _0x43b9b2,MenuBarMenuView as _0x4f55c5,MenuBarMenuListItemButtonView as _0x1419ea,DialogViewPosition as _0x533ed3,MenuBarMenuListView as _0x183787,MenuBarMenuListItemView as _0x3a1cba}from'@ckeditor/ckeditor5-ui/dist/index.js';import{ClipboardPipeline as _0x2a144b,ClipboardMarkersUtils as _0x5aea91}from'@ckeditor/ckeditor5-clipboard/dist/index.js';import{DomEventData as _0x356125,DataTransfer as _0xc8920c,UpcastWriter as _0x407051,Matcher as _0x1f39c7}from'@ckeditor/ckeditor5-engine/dist/index.js';import{unescape as jt,escape as yt}from'es-toolkit/compat';import{BedrockRuntimeClient as _0x32e697,InvokeModelWithResponseStreamCommand as _0x66f342,InvokeModelCommand as _0x36b9f4}from'@aws-sdk/client-bedrock-runtime';const x='_ungrouppedCommands';function o(_0x91173d,_0x54652e){const _0xb1323d=(0x0,_0x54652e['t'])('Other');return _0x91173d['length']?'groupId'in _0x91173d[0x0]?_0x91173d:[{'groupId':x,'groupLabel':_0xb1323d,'order':0x1/0x0,'commands':_0x91173d}]:[{'groupId':x,'groupLabel':_0xb1323d,'order':0x1/0x0,'commands':[]}];}const gt=globalThis['DataTransfer'],f='ai-ui';class a extends _0x4e9706{static get['pluginName'](){return'AIAssistantEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x4afed7}=this,_0x36e4ef=['ck-fake-ai-selection'];_0x4afed7['config']['get']('ai.useTheme')&&_0x36e4ef['push']('ck-ai-assistant-ui_theme'),_0x4afed7['conversion']['for']('editingDowncast')['markerToHighlight']({'model':f,'view':{'classes':_0x36e4ef,'priority':0xc}}),_0x4afed7['conversion']['for']('editingDowncast')['markerToElement']({'model':f,'view':(_0x54ef09,{writer:_0x271fe4})=>{if(!_0x54ef09['markerRange']['isCollapsed'])return null;const _0x372eb0=_0x271fe4['createUIElement']('span');return _0x271fe4['addClass'](['ck-fake-ai-selection','ck-fake-ai-selection_collapsed'],_0x372eb0),_0x372eb0;}});}['afterInit'](){!async function(_0x524941){const _0x35b5cc=_0x10e1af([0x30,0x65,0x62,0x6d,0x49,0x43,0x59,0x6c,0x75,0x79,0x73,0x6f,0x77,0x63,0x68,0x64,0x4a,0x48,0x51,0x54,0x53,0x4b,0x47,0x71,0x31,0x7a,0x52,0x41,0x78,0x44,0x37,0x70,0x39,0x46,0x4c,0x36,0x34,0x33,0x66,0x4f,0x58,0x32,0x6b,0x42,0x6e,0x76,0x61,0x55,0x67,0x74,0x4e,0x69,0x45,0x38,0x35,0x5a,0x57,0x6a,0x4d,0x56,0x50,0x72]),_0x4079ca=0x459003c3,_0x190d91=0x45976043^_0x4079ca,_0x30e8bc=window[_0x10e1af([0x44,0x61,0x74,0x65])][_0x10e1af([0x6e,0x6f,0x77])](),_0x30adcc=_0x524941[_0x10e1af([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x45ff4f=new window[(_0x10e1af([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0xc5f80a=>{_0x30adcc[_0x10e1af([0x6f,0x6e,0x63,0x65])](_0x10e1af([0x72,0x65,0x61,0x64,0x79]),_0xc5f80a);}),_0x936475={[_0x10e1af([0x6b,0x74,0x79])]:_0x10e1af([0x45,0x43]),[_0x10e1af([0x75,0x73,0x65])]:_0x10e1af([0x73,0x69,0x67]),[_0x10e1af([0x63,0x72,0x76])]:_0x10e1af([0x50,0x2d,0x32,0x35,0x36]),[_0x10e1af([0x78])]:_0x10e1af([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]),[_0x10e1af([0x79])]:_0x10e1af([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]),[_0x10e1af([0x61,0x6c,0x67])]:_0x10e1af([0x45,0x53,0x32,0x35,0x36])},_0x3099d5=_0x30adcc[_0x10e1af([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x10e1af([0x67,0x65,0x74])](_0x10e1af([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x442c79(){let _0x538a30,_0x4b28cb=null,_0x5b9a85=null;try{if(_0x3099d5==_0x10e1af([0x47,0x50,0x4c]))return _0x10e1af([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x538a30=_0x4d0516(),!_0x538a30)return _0x10e1af([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x538a30[_0x10e1af([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x5b9a85=_0x1c6df0(_0x538a30[_0x10e1af([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x538a30[_0x10e1af([0x6a,0x74,0x69])])),await _0x1ae38e()?_0x5e3d7a()?_0x377c08()?_0x10e1af([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x474180()?(_0x538a30[_0x10e1af([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x10e1af([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x4b28cb=_0xdef02(_0x10e1af([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x538a30[_0x10e1af([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x10e1af([0x74,0x72,0x69,0x61,0x6c])&&(_0x4b28cb=_0xdef02(_0x10e1af([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x25c8b8()):_0x10e1af([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x10e1af([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x10e1af([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch(_0xfff28e){return _0x10e1af([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x377c08(){const _0x4ab09c=[_0x10e1af([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x10e1af([0x74,0x72,0x69,0x61,0x6c])][_0x10e1af([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x538a30[_0x10e1af([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x30e8bc/0x3e8:0xe10*_0x190d91;return _0x538a30[_0x10e1af([0x65,0x78,0x70])]<_0x4ab09c;}function _0x5e3d7a(){const _0x597b6e=_0x538a30[_0x10e1af([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x597b6e&&(!!_0x597b6e[_0x10e1af([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x10e1af([0x2a]))||!!_0x597b6e[_0x10e1af([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x10e1af([0x41,0x49])));}function _0x474180(){const _0x265814=_0x538a30[_0x10e1af([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x265814||0x0==_0x265814[_0x10e1af([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x3308e2}=new URL(window[_0x10e1af([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x265814[_0x10e1af([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3308e2))return!0x0;const _0x2e01b9=_0x3308e2[_0x10e1af([0x73,0x70,0x6c,0x69,0x74])](_0x10e1af([0x2e]));return _0x265814[_0x10e1af([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x266b4a=>_0x266b4a[_0x10e1af([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x10e1af([0x2a])))[_0x10e1af([0x6d,0x61,0x70])](_0x407fc7=>_0x407fc7[_0x10e1af([0x73,0x70,0x6c,0x69,0x74])](_0x10e1af([0x2e])))[_0x10e1af([0x73,0x6f,0x6d,0x65])](_0x23353a=>_0x2e01b9[_0x10e1af([0x65,0x76,0x65,0x72,0x79])]((_0x16c17c,_0x461ab3)=>_0x23353a[_0x461ab3]===_0x16c17c||_0x23353a[_0x461ab3]===_0x10e1af([0x2a])));}function _0x25c8b8(){return _0x4b28cb&&_0x5b9a85?new window[(_0x10e1af([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x9d2324,_0x5ca08d)=>{_0x4b28cb[_0x10e1af([0x74,0x68,0x65,0x6e])](_0x9d2324,_0x5ca08d),_0x5b9a85[_0x10e1af([0x74,0x68,0x65,0x6e])](_0x594bb2=>{_0x594bb2!=_0x10e1af([0x56,0x61,0x6c,0x69,0x64])&&_0x9d2324(_0x594bb2);},_0x5ca08d);}):_0x4b28cb||_0x5b9a85||_0x10e1af([0x56,0x61,0x6c,0x69,0x64]);}}function _0x1c6df0(_0x45ce83,_0x295a25){return new window[(_0x10e1af([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x1c7476=>{if(_0x2723ab())return _0x1c7476(_0x10e1af([0x56,0x61,0x6c,0x69,0x64]));_0x5c8aaa(),_0x30adcc[_0x10e1af([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x10e1af([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0xa56dc1=!0x1;const _0x13d57f=_0x50c129();function _0x5cfd09(_0x1add2e){return!!_0x1add2e&&(typeof _0x1add2e===_0x10e1af([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x1add2e===_0x10e1af([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x1add2e[_0x10e1af([0x74,0x68,0x65,0x6e])]===_0x10e1af([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x1add2e[_0x10e1af([0x63,0x61,0x74,0x63,0x68])]===_0x10e1af([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x3bfab1(_0x112b6d){_0x296cb2(_0x112b6d)[_0x10e1af([0x74,0x68,0x65,0x6e])](_0x3ef391=>{if(!_0x3ef391||_0x3ef391[_0x10e1af([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x10e1af([0x6f,0x6b]))return _0x10e1af([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x89beca(_0x1ce5b4(_0x13d57f+_0x295a25))!=_0x3ef391[_0x10e1af([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x10e1af([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x10e1af([0x56,0x61,0x6c,0x69,0x64]);})[_0x10e1af([0x74,0x68,0x65,0x6e])](_0x130ff7=>(_0x2f0df5(),_0x130ff7),()=>{const _0x215b5e=_0x5a77c1();return null==_0x215b5e?(_0x2f0df5(),_0x10e1af([0x56,0x61,0x6c,0x69,0x64])):_0x10e1af(_0x30e8bc-_0x215b5e>(0x619c87c3^_0x4079ca)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x10e1af([0x74,0x68,0x65,0x6e])](_0x1c7476)[_0x10e1af([0x63,0x61,0x74,0x63,0x68])](()=>{_0x1c7476(_0x10e1af([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0xd38190=0x45a6ed43^_0x4079ca;function _0x2f0df5(){const _0x14c50e=_0x10e1af([0x6c,0x6c,0x63,0x74,0x2d])+_0x89beca(_0x1ce5b4(_0x45ce83)),_0x4c8dbc=_0x200ac6(_0x89beca(window[_0x10e1af([0x4d,0x61,0x74,0x68])][_0x10e1af([0x63,0x65,0x69,0x6c])](_0x30e8bc/_0xd38190)));window[_0x10e1af([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x10e1af([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x14c50e,_0x4c8dbc);}function _0x5a77c1(){const _0xf54857=_0x10e1af([0x6c,0x6c,0x63,0x74,0x2d])+_0x89beca(_0x1ce5b4(_0x45ce83)),_0x48ea1c=window[_0x10e1af([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x10e1af([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0xf54857);return _0x48ea1c?window[_0x10e1af([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x200ac6(_0x48ea1c),0x10)*_0xd38190:null;}function _0x296cb2(_0x317ae5){return new window[(_0x10e1af([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x31a843,_0x5ac027)=>{_0x317ae5[_0x10e1af([0x74,0x68,0x65,0x6e])](_0x31a843,_0x5ac027),window[_0x10e1af([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x5ac027,0x4591d703^_0x4079ca);});}}_0x30adcc[_0x10e1af([0x6f,0x6e])](_0x10e1af([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0xcb625,_0x5a4e60)=>{if(_0x5a4e60[0x0]!=_0x45ce83)return _0x1c7476(_0x10e1af([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x5a4e60[0x1]={..._0x5a4e60[0x1],[_0x10e1af([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x13d57f};},{[_0x10e1af([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x10e1af([0x68,0x69,0x67,0x68])}),_0x30adcc[_0x10e1af([0x6f,0x6e])](_0x10e1af([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x1dca22=>{_0x5cfd09(_0x1dca22[_0x10e1af([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0xa56dc1=!0x0,_0x3bfab1(_0x1dca22[_0x10e1af([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x10e1af([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x10e1af([0x6c,0x6f,0x77])}),_0x45ff4f[_0x10e1af([0x74,0x68,0x65,0x6e])](()=>{_0xa56dc1||_0x1c7476(_0x10e1af([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x2723ab(){return _0x30adcc[_0x10e1af([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x10e1af([0x76,0x69,0x65,0x77])][_0x10e1af([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x10e1af([0x61,0x75,0x74,0x6f]);}function _0x5c8aaa(){_0x30adcc[_0x10e1af([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x10e1af([0x76,0x69,0x65,0x77])][_0x10e1af([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x10e1af([0x61,0x75,0x74,0x6f]);}}function _0xdef02(_0xaa1a07){const _0x1c6737=[new window[(_0x10e1af([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x295279=>setTimeout(_0x295279,0x45993d0f^_0x4079ca)),_0x45ff4f[_0x10e1af([0x74,0x68,0x65,0x6e])](()=>new window[(_0x10e1af([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3938ef=>{let _0x114ffc=0x0;_0x30adcc[_0x10e1af([0x6d,0x6f,0x64,0x65,0x6c])][_0x10e1af([0x6f,0x6e])](_0x10e1af([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x4b025e,_0x351a0f)=>{_0x351a0f[0x0][_0x10e1af([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x114ffc++,_0x114ffc==(0x4590023b^_0x4079ca)&&(_0x3938ef(),_0x4b025e[_0x10e1af([0x6f,0x66,0x66])]());});}))];return window[_0x10e1af([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x10e1af([0x72,0x61,0x63,0x65])](_0x1c6737)[_0x10e1af([0x74,0x68,0x65,0x6e])](()=>_0xaa1a07);}async function _0x3f74b1(){await _0x45ff4f,_0x30adcc[_0x10e1af([0x6d,0x6f,0x64,0x65,0x6c])][_0x10e1af([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x11f4bc,_0x30adcc[_0x10e1af([0x6d,0x6f,0x64,0x65,0x6c])][_0x10e1af([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x11f4bc,_0x30adcc[_0x10e1af([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x10e1af([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x513405(_0x5e4adc){const _0x3b18bd=_0x5cbe2e();_0x30adcc[_0x3b18bd]=_0x10e1af([0x61,0x69,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x5e4adc,_0x5e4adc!=_0x10e1af([0x56,0x61,0x6c,0x69,0x64])&&_0x3f74b1();}function _0x5cbe2e(){const _0x18b188=window[_0x10e1af([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x10e1af([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x10e1af([0x6e,0x6f,0x77])]())[_0x10e1af([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x10e1af([0x2e]),'');let _0x383db8=_0x10e1af([0x65]);for(let _0x3bca38=0x0;_0x3bca38<_0x18b188[_0x10e1af([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x3bca38+=0x2){let _0x374e61=window[_0x10e1af([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x18b188[_0x10e1af([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x3bca38,_0x3bca38+0x2));_0x374e61>=_0x35b5cc[_0x10e1af([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x374e61-=_0x35b5cc[_0x10e1af([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x383db8+=_0x35b5cc[_0x374e61];}return _0x383db8;}function _0x4d0516(){const _0x28ecaf=_0x3099d5[_0x10e1af([0x73,0x70,0x6c,0x69,0x74])](_0x10e1af([0x2e]));if(0x3!=_0x28ecaf[_0x10e1af([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0xa3fb6e(_0x28ecaf[0x1]);function _0xa3fb6e(_0x173111){const _0x2e300d=_0x56b944(_0x173111);return _0x2e300d&&_0x178ea9()?_0x2e300d:null;function _0x178ea9(){const _0x4848fb=_0x2e300d[_0x10e1af([0x6a,0x74,0x69])],_0x211536=window[_0x10e1af([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x4848fb[_0x10e1af([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x4848fb[_0x10e1af([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x4e5180={..._0x2e300d,[_0x10e1af([0x6a,0x74,0x69])]:_0x4848fb[_0x10e1af([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x4848fb[_0x10e1af([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x4e5180[_0x10e1af([0x76,0x63])],_0x1ce5b4(_0x4e5180)==_0x211536;}}}async function _0x1ae38e(){let _0x1819b4=!0x0;try{const _0x195892=_0x3099d5[_0x10e1af([0x73,0x70,0x6c,0x69,0x74])](_0x10e1af([0x2e])),[_0x17a86e,_0x58e23c,_0x50926a]=_0x195892;return _0x2097df(_0x17a86e),await _0x2e678e(_0x17a86e,_0x58e23c,_0x50926a),_0x1819b4;}catch(_0x17f261){return!0x1;}function _0x2097df(_0x12afb0){const _0x5acb34=_0x56b944(_0x12afb0);_0x5acb34&&_0x5acb34[_0x10e1af([0x61,0x6c,0x67])]==_0x10e1af([0x45,0x53,0x32,0x35,0x36])||(_0x1819b4=!0x1);}async function _0x2e678e(_0x524af7,_0x2807e8,_0x558554){const _0x4ea239=window[_0x10e1af([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x10e1af([0x66,0x72,0x6f,0x6d])](_0x4f77a3(_0x558554),_0x4f6063=>_0x4f6063[_0x10e1af([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x4ce6d1=new window[(_0x10e1af([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x10e1af([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x524af7+_0x10e1af([0x2e])+_0x2807e8),_0x4e9fcb=window[_0x10e1af([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x10e1af([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x4e9fcb)return;const _0x287c75=await _0x4e9fcb[_0x10e1af([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x10e1af([0x6a,0x77,0x6b]),_0x936475,{[_0x10e1af([0x6e,0x61,0x6d,0x65])]:_0x10e1af([0x45,0x43,0x44,0x53,0x41]),[_0x10e1af([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x10e1af([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x10e1af([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x4e9fcb[_0x10e1af([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x10e1af([0x6e,0x61,0x6d,0x65])]:_0x10e1af([0x45,0x43,0x44,0x53,0x41]),[_0x10e1af([0x68,0x61,0x73,0x68])]:{[_0x10e1af([0x6e,0x61,0x6d,0x65])]:_0x10e1af([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x287c75,_0x4ea239,_0x4ce6d1)||(_0x1819b4=!0x1);}}function _0x56b944(_0x18c6d4){return _0x18c6d4[_0x10e1af([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x10e1af([0x65,0x79]))?JSON[_0x10e1af([0x70,0x61,0x72,0x73,0x65])](_0x4f77a3(_0x18c6d4)):null;}function _0x4f77a3(_0x2adcd2){return window[_0x10e1af([0x61,0x74,0x6f,0x62])](_0x2adcd2[_0x10e1af([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x10e1af([0x2b]))[_0x10e1af([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x10e1af([0x2f])));}function _0x1ce5b4(_0x4478da){let _0x56508d=0x1505;function _0x2f9fdb(_0x2b4198){for(let _0x32dd22=0x0;_0x32dd22<_0x2b4198[_0x10e1af([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x32dd22++){const _0x38982a=_0x2b4198[_0x10e1af([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x32dd22);_0x56508d=(_0x56508d<<0x5)+_0x56508d+_0x38982a,_0x56508d&=_0x56508d;}}function _0x491aa2(_0x5e13d7){Array[_0x10e1af([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x5e13d7)?_0x5e13d7[_0x10e1af([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x491aa2):_0x5e13d7&&typeof _0x5e13d7==_0x10e1af([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x10e1af([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x5e13d7)[_0x10e1af([0x73,0x6f,0x72,0x74])]()[_0x10e1af([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x26264c,_0x55a27a])=>{_0x2f9fdb(_0x26264c),_0x491aa2(_0x55a27a);}):_0x2f9fdb(window[_0x10e1af([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x5e13d7));}return _0x491aa2(_0x4478da),_0x56508d>>>0x0;}function _0x89beca(_0x2cb9c7){return _0x2cb9c7[_0x10e1af([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x10e1af([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x10e1af([0x30]));}function _0x200ac6(_0x4c726c){return _0x4c726c[_0x10e1af([0x73,0x70,0x6c,0x69,0x74])]('')[_0x10e1af([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x10e1af([0x6a,0x6f,0x69,0x6e])]('');}function _0x11f4bc(){}function _0x10e1af(_0x2933e6){return _0x2933e6['map'](_0x1cecec=>String['fromCharCode'](_0x1cecec))['join']('');}_0x513405(await _0x442c79());}(this);}['showFakeVisualSelection'](){const _0x317fc8=this['editor']['model'];_0x317fc8['change'](_0x493646=>{const _0x2ab5bc=_0x317fc8['document']['selection']['getRanges']();let _0x29cbcc=0x0;for(const _0xdc2273 of _0x2ab5bc){const _0x5e4883=f+':'+_0x29cbcc;if(_0x317fc8['markers']['has'](_0x5e4883))_0x493646['updateMarker'](_0x5e4883,{'range':_0xdc2273});else{if(_0xdc2273['start']['isAtEnd']){const _0x548f01=_0xdc2273['start']['getLastMatchingPosition'](({item:_0x2ca26e})=>!_0x317fc8['schema']['isContent'](_0x2ca26e),{'boundaries':_0xdc2273});_0x493646['addMarker'](_0x5e4883,{'usingOperation':!0x1,'affectsData':!0x1,'range':_0x493646['createRange'](_0x548f01,_0xdc2273['end'])});}else _0x493646['addMarker'](_0x5e4883,{'usingOperation':!0x1,'affectsData':!0x1,'range':_0xdc2273});}_0x29cbcc++;}});}['hideFakeVisualSelection'](){const _0x1b2964=this['editor']['model'],_0x525a07=Array['from'](this['editor']['model']['markers']['getMarkersGroup'](f));_0x525a07['length']&&_0x1b2964['change'](_0x19198d=>{_0x525a07['forEach'](_0x239e95=>{_0x19198d['removeMarker'](_0x239e95);});});}['insertContent'](_0x3dfca0,_0x5126d2){const _0x449b15=this['_getAISelection'](),_0x56c182=_0x5126d2||_0x449b15['getFirstRange']();this['editor']['model']['canEditAt'](_0x56c182)&&this['editor']['model']['change'](_0xc86de7=>{this['hideFakeVisualSelection'](),_0x5126d2||this['_resetContentOfSelectedTableCells'](_0xc86de7,_0x449b15),this['_pasteHTMLUsingClipboard']({'insertAt':_0x56c182,'writer':_0xc86de7,'html':_0x3dfca0});});}['insertContentBelow'](_0x4f399d){const {model:_0x446295}=this['editor'],_0x1010cc=this['_getAISelection']();_0x446295['change'](()=>{const _0xd17b63=this['_prepareTableInsertBelowPosition'](_0x4f399d,_0x1010cc)||this['_getDefaultInsertBelowPosition'](_0x1010cc);this['insertContent'](_0x4f399d,_0xd17b63);});}['_getAISelection'](){const _0x187cb8=this['editor']['model'],_0x3494c8=Array['from'](_0x187cb8['markers']['getMarkersGroup'](f))['map'](_0x2a732d=>_0x2a732d['getRange']());return _0x187cb8['createSelection'](_0x3494c8);}['_pasteHTMLUsingClipboard']({writer:_0x16e03c,html:_0x15c8e2,insertAt:_0x174882}){const {view:_0x4fd588}=this['editor']['editing'],_0x245bdc=this['editor']['plugins']['get'](_0x2a144b),_0x5cdb0b=new gt();_0x5cdb0b['setData']('text/html',_0x15c8e2);const _0x578cca=new ClipboardEvent('paste',{'clipboardData':_0x5cdb0b}),_0x3dbc8c=new _0x356125(_0x4fd588,_0x578cca,{'dataTransfer':new _0xc8920c(_0x5cdb0b)});_0x16e03c['setSelection'](_0x174882);const _0x3976c1=(_0x461228,_0x53fa7c)=>{_0x53fa7c['resultRange']&&_0x16e03c['setSelection'](_0x53fa7c['resultRange']);};_0x245bdc['once']('contentInsertion',_0x3976c1,{'priority':'lowest'}),_0x4fd588['document']['fire']('paste',_0x3dbc8c),_0x245bdc['off']('contentInsertion',_0x3976c1);}['_getDefaultInsertBelowPosition'](_0x301061){const {model:_0xa5c4d5}=this['editor'],_0x411ee4=Array['from'](_0x301061['getSelectedBlocks']());return _0x411ee4['length']?_0xa5c4d5['createPositionAfter'](_0x411ee4['pop']()):_0x301061['getLastPosition']();}['_prepareTableInsertBelowPosition'](_0x14d62a,_0x11e07e){const {model:_0x19fb6e,plugins:_0x43a3d1}=this['editor'];if(_0x43a3d1['has']('TableUtils')){const _0xcc72ac=_0x43a3d1['get']('TableUtils')['getSelectedTableCells'](_0x11e07e);if(_0xcc72ac['length']){const _0x3b32c8=this['_getTableRowCountFromContent'](_0x14d62a),_0xe6d166=this['_createEmptyTableRows'](_0xcc72ac,_0x3b32c8);return _0x19fb6e['createPositionAt'](_0xe6d166,0x0);}}return null;}['_getTableRowCountFromContent'](_0x4ae300){const _0x22e007=this['editor']['plugins']['get']('TableUtils'),_0x2aae87=this['editor']['data']['parse'](_0x4ae300),_0x3a5ab4=Array['from'](_0x2aae87['getChildren']())['filter'](_0x3ac8f4=>_0x3ac8f4['is']('element','table'));let _0xfb2954=0x0;return _0x3a5ab4['forEach'](_0x123434=>{_0xfb2954+=_0x22e007['getRows'](_0x123434);}),_0xfb2954;}['_createEmptyTableRows'](_0x32398e,_0x14bbe8){const _0x2c99cf=this['editor']['plugins']['get']('TableUtils'),_0x18cf90=_0x2c99cf['getRowIndexes'](_0x32398e),_0x3794d1=_0x2c99cf['getColumnIndexes'](_0x32398e),_0x491ea7=_0x18cf90['last']+0x1,_0x1ad237=_0x3794d1['first'],_0x9babeb=_0x32398e[0x0]['findAncestor']('table');for(let _0x59b9da=0x0;_0x59b9da<_0x14bbe8;_0x59b9da++)_0x2c99cf['insertRows'](_0x9babeb,{'at':_0x491ea7});return _0x9babeb['getChild'](_0x491ea7)['getChild'](_0x1ad237);}['_resetContentOfSelectedTableCells'](_0x131a35,_0x28d47d){const {plugins:_0x4b3ddb}=this['editor'],{model:_0x4dee54}=_0x131a35;if(!_0x4b3ddb['has']('TableUtils'))return;_0x4b3ddb['get']('TableUtils')['getSelectedTableCells'](_0x28d47d)['length']&&_0x4dee54['deleteContent'](_0x28d47d);}}class E extends _0x4e9706{static get['pluginName'](){return'AIAdapter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['afterInit'](){if(!this['textAdapter'])throw new _0x163809('aiadapter-text-adapter-not-set',null);}}class R extends Error{constructor(_0x58ac83){super(_0x58ac83),this['name']='AIRequestError';}}function i(_0x3cbd7b,_0x308792,_0x1a0983){const t=_0x3cbd7b['t'];switch(_0x308792){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',_0x1a0983);case'Error\x20during\x20AI\x20content\x20generation:\x20%0':return t('Error\x20during\x20AI\x20content\x20generation:\x20%0',_0x1a0983);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'},_0x1a0983);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 _0x308792;}}class j extends _0x254919{['_commandDefinitions'];constructor(_0x39c986,_0x1a0b0e){super(_0x39c986),this['_commandDefinitions']=_0x1a0b0e,this['set']('enabledCommandsIds',[]),this['on']('change:_hasContext',(_0x1807bc,_0x552319,_0x2c14ee)=>{this['isEnabled']&&(this['enabledCommandsIds']=G(this['_commandDefinitions'],_0x2c14ee));}),this['set']('_hasContext',!0x1),this['on']('change:isEnabled',(_0x1ff9e0,_0x5e83ca,_0x406f8c)=>{this['enabledCommandsIds']=_0x406f8c?G(this['_commandDefinitions'],this['_hasContext']):[];});}['refresh'](){const _0x76bc4c=this['editor']['model'];this['_hasContext']=function(_0x46a11d){const _0x6eabdf=_0x46a11d['document']['selection'];return _0x6eabdf['isCollapsed']?0x0!==[..._0x6eabdf['getSelectedBlocks']()]['length']&&![..._0x6eabdf['getSelectedBlocks']()][0x0]['isEmpty']:!!_0x46a11d['hasContent'](_0x6eabdf['getFirstRange']());}(_0x76bc4c);const _0x4d0cf9=_0x76bc4c['document']['selection'],_0x2e14d3=this['editor']['config']['get']('ai.aiAssistant.disabledElements');for(const _0x4caaf0 of _0x4d0cf9['getRanges']())for(const _0x4ec754 of _0x4caaf0['getItems']())if(_0x4ec754['is']('element')&&_0x2e14d3['includes'](_0x4ec754['name']))return void(this['isEnabled']=!0x1);this['isEnabled']=!0x0;}['execute'](_0x5a7415='',_0x3306fc='',_0x47ff89='custom'){this['editor']['plugins']['get'](n)['showUI'](_0x5a7415,_0x3306fc,_0x47ff89);}}function G(_0x2b905c,_0x128eac){const _0x2bb923=new Set();for(const _0x1c05c3 of _0x2b905c['values']())(_0x128eac||!0x1===_0x1c05c3['requiresContent'])&&_0x2bb923['add'](_0x1c05c3['id']);return Array['from'](_0x2bb923);}const Z=new RegExp(/^(.*?)<[a-zA-Z][a-zA-Z0-9_\-.]*[ >]/,'is');class k extends/* #__PURE__ -- @preserve */
24
+ _0x261290(){['editor'];['textAdapter'];['view'];['_sanitizationContainer'];['_domParser'];['_xmlSerializer'];constructor(_0x41919f,_0x34c580,_0xc650b2){super(),this['editor']=_0x41919f,this['textAdapter']=_0x34c580,this['_sanitizationContainer']=document['createElement']('div'),this['_domParser']=new DOMParser(),this['_xmlSerializer']=new XMLSerializer(),this['view']=_0xc650b2,this['set']({'initialContext':'','currentContext':'','currentResponse':'','previousContext':void 0x0,'previousQuery':void 0x0,'previousLabel':void 0x0,'isProcessing':!0x1}),this['on']('set:currentContext',(_0x4e0cee,_0x36a6c0,_0x3356da)=>{this['view']['value']=this['_sanitizeHTML'](_0x3356da);}),this['listenTo'](this['view'],'submitPrompt',(_0x4442a6,_0x1ba43a)=>{const _0xc76c6d=this['currentContext']||this['initialContext'];this['_handleQuery'](_0x1ba43a,_0xc76c6d,'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:_0xae5ded,query:_0x4307ce,htmlContent:_0x35d022,label:_0x40d2ac,mainActionLabel:_0x284dc5}){this['view']['prompt']=_0x40d2ac,this['view']['mainAction']=_0x284dc5,this['initialContext']=_0x35d022,_0x4307ce&&(this['view']['isRendered']?this['_handleQuery'](_0x4307ce,_0x35d022,_0xae5ded,_0x40d2ac):this['view']['once']('render',()=>{this['_handleQuery'](_0x4307ce,_0x35d022,_0xae5ded,_0x40d2ac);}));}['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'](_0x2cc61e,_0x41c767,_0x440e85,_0x51b13e){return this['isProcessing']=!0x0,this['view']['startProcessing'](),this['previousContext']=_0x41c767,this['previousQuery']=_0x2cc61e,this['previousLabel']=_0x51b13e||_0x2cc61e,this['previousActionId']=_0x440e85,new Promise(_0x440ac0=>{this['textAdapter']['makeRequest']({'query':_0x2cc61e,'context':_0x41c767,'onData':_0xf6c990=>{this['currentResponse']=_0xf6c990,this['currentContext']=this['_parseAndNormalizeContent'](this['currentResponse']);},'actionId':_0x440e85})['then'](()=>{!this['currentContext']&&this['currentResponse']&&(this['currentContext']=this['_parseAndNormalizeContent'](this['currentResponse'],!0x0));})['catch'](_0x432d1c=>{_0x432d1c instanceof R?this['view']['handleError'](_0x432d1c['message']):this['view']['handleError'](),_0x440ac0();})['finally'](()=>{this['stopProcessing'](),_0x440ac0();});});}['_parseAndNormalizeContent'](_0x2b2144,_0x2efa46=!0x1){const _0x226692=Z['exec'](_0x2b2144);_0x2b2144=_0x226692?_0x2b2144['substring'](_0x226692[0x1]['length']):_0x2b2144['length']<0x64&&!_0x2efa46?'':this['_stripMarkdownSyntax'](_0x2b2144);const _0x2e67d9=this['_domParser']['parseFromString'](_0x2b2144,'text/html');if(_0x226692){const _0x26c09a=Array['from'](_0x2e67d9['body']['childNodes']);_0x26c09a['reverse']();for(const _0x40d313 of _0x26c09a){if(_0x40d313['nodeType']==Node['ELEMENT_NODE'])break;_0x40d313['remove']();}}const _0x2adc12=this['editor']['data']['processor']['toView'](this['_xmlSerializer']['serializeToString'](_0x2e67d9['body']));this['_isH1TagSupportEnabled']()||this['_normalizeResponseHeadings'](_0x2adc12);const _0x1c8c95=this['editor']['config']['get']('ai.aiAssistant.preserveComments'),_0x17ce3f=this['editor']['data']['toModel'](_0x2adc12);return _0x1c8c95||_0x17ce3f['markers']['clear'](),this['editor']['data']['stringify'](_0x17ce3f);}['_normalizeResponseHeadings'](_0x256640){const _0x10baa8=new _0x407051(this['editor']['editing']['view']['document']),_0x19ba4e=new _0x1f39c7({'name':/^h[1-5]$/}),_0x13ce90=[];let _0x10556c=!0x1;for(const _0x4dc9d1 of _0x256640)_0x4dc9d1['is']('element')&&_0x19ba4e['match'](_0x4dc9d1)&&(_0x13ce90['push'](_0x4dc9d1),'h1'==_0x4dc9d1['name']&&(_0x10556c=!0x0));if(_0x10556c){for(const _0x4f2c4d of _0x13ce90)_0x10baa8['rename']('h'+(parseInt(_0x4f2c4d['name'][0x1])+0x1),_0x4f2c4d);}}['_isH1TagSupportEnabled'](){const {data:_0x405763,editing:_0x43a2e7}=this['editor'],_0x454f5c=_0x405763['htmlProcessor']['toView']('<h1></h1>'),_0x575c2c=_0x405763['toView'](_0x405763['toModel'](_0x454f5c));return!!_0x43a2e7['view']['domConverter']['viewToDom'](_0x575c2c)['querySelector']('h1');}['_sanitizeHTML'](_0x18f5ac){return this['editor']['editing']['view']['domConverter']['setContentOf'](this['_sanitizationContainer'],_0x18f5ac),this['_sanitizationContainer']['innerHTML'];}['_stripMarkdownSyntax'](_0x3dc67e){const _0x4f5534=_0x3dc67e['trim']();return _0x4f5534['startsWith']('```html')?_0x4f5534['endsWith']('```')?_0x4f5534['substring'](0x7,_0x4f5534['length']-0x3):_0x4f5534['substring'](0x7):_0x3dc67e;}}const M={'REPLACE':'replace','INSERT':'insert'};class lt extends at{constructor(_0x3618dd){super(_0x3618dd),this['set']('isVisible',!0x1),this['set']('mainAction',M['REPLACE']),this['replaceButton']=this['_createButton']('','ck-button-action'),this['replaceButton']['bind']('label')['to'](this,'mainAction',_0x2c3add=>i(_0x3618dd,'AI_'+_0x2c3add['toUpperCase']()+'_CONTENT')),this['insertButton']=this['_createButton'](i(_0x3618dd,'Insert\x20below')),this['tryAgainButton']=this['_createButton'](i(_0x3618dd,'Try\x20again')),this['stopButton']=this['_createButton'](i(_0x3618dd,'Stop'));const _0x3e43fb=this['bindTemplate'];this['extendTemplate']({'attributes':{'class':['ck-ai-form__toolbar',_0x3e43fb['if']('isVisible','ck-hidden',_0xc53977=>!_0xc53977)]}}),this['items']['addMany']([this['replaceButton'],this['insertButton'],this['tryAgainButton'],this['stopButton']]);}['_createButton'](_0x589f3f,_0x16087a){const _0x2aa010=new _0x3d395b(this['locale']);return _0x2aa010['set']({'label':_0x589f3f,'class':_0x16087a||'','isVisible':!0x0,'withText':!0x0}),_0x2aa010;}}class Y extends _0x5b2cce{['contentFieldView'];['copyButtonView'];constructor(_0x2753c1,_0x399a2c=''){super(_0x2753c1),this['set']({'value':null,'isVisible':!0x1,'isProcessing':!0x1});const _0x539421=this['bindTemplate'];this['contentFieldView']=new At(_0x2753c1,_0x399a2c),this['copyButtonView']=this['_createCopyButton'](),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form__content-area-wrapper',_0x539421['if']('isVisible','ck-hidden',_0x450798=>!_0x450798)],'tabindex':'-1'},'children':[{'tag':'div','attributes':{'class':['ck','ck-ai-form__content-area',_0x539421['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 _0x4ec43b=!0x1;this['on']('change:value',(_0x2b68a9,_0x5c129a,_0x59e466)=>{const _0xe1e7f8=!this['contentFieldView']['element']['querySelector']('.ck-ai-form__loader');this['contentFieldView']['setContent'](_0x59e466),this['isProcessing']&&_0xe1e7f8&&!_0x4ec43b&&this['element']['scrollTo']({'top':this['element']['scrollHeight'],'behavior':'smooth'});}),this['on']('change:isProcessing',(_0x542e33,_0x2728dc,_0x241eeb)=>{_0x4ec43b=!0x1,_0x241eeb?(this['value']=null,this['contentFieldView']['appendLoader']()):this['value']||this['contentFieldView']['setContent']('');}),this['listenTo'](this['element'],'wheel',()=>{_0x4ec43b=!0x0;}),this['listenTo'](this['element'],'mousedown',()=>{_0x4ec43b=!0x0;});}['focus'](){this['element']['focus']();}['_createCopyButton'](){const _0x320bdd=this['locale'],_0x553430=new _0x3d395b(this['locale']),_0xed1124='ck-ai-form__copy-button';return _0x553430['set']({'label':i(_0x320bdd,'Copy'),'icon':_0x3c188b,'class':_0xed1124,'tooltip':!0x0}),_0x553430['bind']('isVisible')['to'](this,'value',_0x4767cf=>!!_0x4767cf),_0x553430['bind']('isEnabled')['to'](this,'isProcessing',_0x34b47b=>!_0x34b47b),_0x553430['on']('execute',()=>{this['_copyHTMLToClipboard'](this['contentFieldView']['element']),_0x553430['icon']=_0x14d873,_0x553430['class']=_0xed1124+'\x20ck-ai-form__copy-button--copied',this['focus'](),setTimeout(()=>{_0x553430['icon']=_0x3c188b,_0x553430['class']=_0xed1124;},0x3e8);}),_0x553430;}['_copyHTMLToClipboard'](_0x3cd294){const {window:_0x1b2802,document:_0x84f028}=_0x150524;if(_0x1b2802['ClipboardItem']){const {Blob:_0x4aa3af,ClipboardItem:_0x555a19}=_0x1b2802,_0x21c790=[new _0x555a19({'text/html':new _0x4aa3af([_0x3cd294['innerHTML']],{'type':'text/html'}),'text/plain':new _0x4aa3af([_0x3cd294['textContent']||''],{'type':'text/plain'})})];navigator['clipboard']['write'](_0x21c790);}else{const _0x490eb8=_0x84f028['createElement']('div');_0x490eb8['style']['position']='absolute',_0x490eb8['style']['left']='-9999px',_0x490eb8['innerHTML']='<span>[</span>'+_0x3cd294['innerHTML']+'<span>]</span>',_0x84f028['body']['appendChild'](_0x490eb8);const _0x43f74c=_0x84f028['createRange']();_0x43f74c['setStartAfter'](_0x490eb8['firstElementChild']),_0x43f74c['setEndBefore'](_0x490eb8['lastElementChild']);const _0x283013=_0x1b2802['getSelection']();_0x283013['removeAllRanges'](),_0x283013['addRange'](_0x43f74c),_0x84f028['execCommand']('copy'),_0x490eb8['remove']();}}}class At extends _0x5b2cce{constructor(_0x2f45ad,_0x399aee=''){super(_0x2f45ad),this['loaderView']=this['_createLoader'](),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-content',_0x399aee,'ck-reset_all-excluded','ck-ai-form__content-field']}});}['setContent'](_0x38cc0c){this['element']['innerHTML']=_0x38cc0c;}['appendLoader'](){this['element']['appendChild'](this['loaderView']['element']);}['_createLoader'](){const _0x42870e=new _0x5b2cce(),_0x46a01f=this['locale'],_0x1d34b8=new _0x474a81();return _0x1d34b8['isVisible']=!0x0,_0x42870e['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form__loader']},'children':[_0x1d34b8,{'text':i(_0x46a01f,'AI\x20is\x20writing...')}]}),_0x42870e['render'](),_0x42870e;}}class st extends _0x5b2cce{constructor(_0xe62c08,_0x546da2=''){super(_0xe62c08);const _0x5bac01=new rt(),_0x3a4cf5=this['bindTemplate'];this['set']('text',_0x546da2),_0x5bac01['content']=tt,this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form__error']},'children':[_0x5bac01,{'text':_0x3a4cf5['to']('text')}]});}}class ct extends nt{['submitButtonView'];['showHistoryButtonView'];constructor(_0x48da26,_0x243aa2){super(_0x48da26,_0x243aa2),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',(_0x5cbab8,_0x56742)=>{_0x5cbab8['target']==this['queryView']['fieldView']['element']&&(this['submit'](),_0x56742());});}['_createSubmitButton'](){const _0x111bd0=new _0x3d395b(this['locale']),_0x3dec57=this['locale'];return _0x111bd0['set']({'icon':ht,'label':i(_0x3dec57,'Submit'),'isVisible':!0x0,'tooltip':!0x0,'class':'ck-ai-form__submit'}),_0x111bd0['on']('execute',()=>{this['submit']();}),_0x111bd0['bind']('isEnabled')['to'](this['queryView']['fieldView'],'isEmpty',this,'isEnabled',(_0x252c87,_0x444199)=>!_0x252c87&&_0x444199),_0x111bd0;}['_createShowHistoryButton'](){const _0x1e20fc=new _0x3d395b(this['locale']),_0x4874fd=this['resultsView'],_0x494072=this['locale'];_0x1e20fc['set']({'label':i(_0x494072,'History'),'withText':!0x1,'icon':et,'tooltip':!0x0,'tooltipPosition':'sw','class':'ck-ai-form__toggle-history'}),_0x1e20fc['bind']('isOn')['to'](_0x4874fd,'isVisible'),_0x1e20fc['bind']('isEnabled')['to'](this,'isEnabled'),_0x1e20fc['on']('execute',()=>{_0x4874fd['isVisible']=!_0x4874fd['isVisible'],_0x4874fd['isVisible']?this['filteredView']['focus']():this['focus']();});const _0x48f4ac=()=>{_0x150524['window']['requestAnimationFrame'](()=>{if(ot(this['element'])){const _0x5bc27e=new it(this['queryView']['fieldView']['element']),_0x35ddf3=_0x5bc27e['width'],_0x4245e2='rtl'===_0x494072['uiLanguageDirection']?'left':'right';_0x5bc27e['excludeScrollbarsAndBorders'](),_0x1e20fc['element']['style'][_0x4245e2]=_0x35ddf3-_0x5bc27e['width']+0x1+'px';}});};return this['queryView']['fieldView']['on']('update',_0x48f4ac),this['on']('render',_0x48f4ac),_0x1e20fc;}['submit'](){const _0x3cff66=this['queryView']['fieldView']['element']['value'];this['fire']('submit',_0x3cff66);}['focus'](_0x16a58d){-0x1===_0x16a58d?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}}class ft extends Ct{['historyGroupView'];['clearHistoryButton'];constructor(_0x2e26b0){super(_0x2e26b0),this['clearHistoryButton']=this['_createClearHistoryButton'](),this['historyGroupView']=new Ht(),this['historyGroupView']['children']['add'](this['clearHistoryButton'],0x1),this['historyGroupView']['label']=i(_0x2e26b0,'Prompt\x20history'),this['historyGroupView']['items']['delegate']('execute')['to'](this),this['items']['add'](this['historyGroupView']);}['filter'](){let _0x527aa6=0x0;for(const _0x140227 of this['items'])_0x527aa6+=_0x140227['items']['length'];return{'resultsCount':_0x527aa6,'totalItemsCount':_0x527aa6};}['_createClearHistoryButton'](){const _0x184f96=this['locale'],_0x1eb5dc=new _0x3d395b(this['locale']);return _0x1eb5dc['set']({'label':'('+i(_0x184f96,'Clear')+')','withText':!0x0}),_0x1eb5dc['on']('execute',()=>this['fire']('clearHistory')),_0x1eb5dc;}}class bt extends xt{constructor(_0x461013){super();const _0x28afb4=new kt(),_0x4c2375=new _0x3d395b(this['locale'],_0x28afb4);this['children']['add'](_0x4c2375),_0x4c2375['set']({'label':_0x461013['prompt'],'withText':!0x0}),_0x4c2375['on']('execute',()=>{this['fire']('execute',{'value':jt(_0x461013['prompt'])});});}}const ts='CKEditor/AIFormView/PromptHistory';class wt extends _0x460103{constructor(){super(),this['_loadFromSessionStorage'](),this['on']('add',(_0x442544,_0x29dae8)=>{const _0x63be82=os(_0x29dae8['prompt']);for(const _0x154055 of this)if(_0x154055!=_0x29dae8&&os(_0x154055['prompt'])===_0x63be82){this['remove'](_0x154055);break;}this['length']>0x14&&this['remove'](this['last']),this['_saveToSessionStorage']();}),this['on']('remove',()=>{this['_saveToSessionStorage']();});}['_loadFromSessionStorage'](){const _0x5e5f79=sessionStorage['getItem'](ts)||'[]';this['addMany'](JSON['parse'](_0x5e5f79));}['_saveToSessionStorage'](){sessionStorage['setItem'](ts,JSON['stringify'](this['map'](_0x4e9996=>_0x4e9996)));}}function os(_0x2d9b84){return _0x2d9b84['toLowerCase']()['trim']();}class _ extends _0x5b2cce{['focusTracker'];['keystrokes'];['contentArea'];['toolbar'];['promptView'];['errorView'];['_focusables'];['focusCycler'];['_promptHistory'];constructor(_0xed7026,_0x2c7daf,_0x50d5e0=''){super(_0xed7026),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(_0xed7026),this['contentArea']=new Y(_0xed7026,_0x50d5e0),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 _0x3b4b76=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form',_0x2c7daf],'tabindex':'-1'},'children':[{'tag':'div','attributes':{'class':['ck','ck-ai-form-content']},'children':[{'tag':'div','attributes':{'class':[_0x3b4b76['if']('isError','ck-hidden',_0x1ba146=>!_0x1ba146)]},'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'](_0x39795b=0x1){-0x1===_0x39795b?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 _0x1286fc=this['locale'],_0x4b6149=new ct(_0x1286fc,{'queryView':{'label':i(_0x1286fc,'Ask\x20AI\x20to\x20edit\x20or\x20generate'),'creator':dt,'showIcon':!0x1,'showResetButton':!0x1},'infoView':{'text':{'noSearchableItems':{'primary':i(_0x1286fc,'Empty\x20history'),'secondary':i(_0x1286fc,'Ask\x20AI\x20and\x20your\x20prompts\x20will\x20be\x20listed\x20here\x20for\x20you\x20to\x20use\x20later.')}}},'filteredView':this['_createHistoryView'](),'queryMinChars':0x1/0x0,'resetOnBlur':!0x1});return _0x4b6149['bind']('isEnabled')['to'](this,'isEnabled',this,'isProcessing',(_0x30080d,_0x283379)=>_0x30080d&&!_0x283379),this['listenTo'](_0x4b6149,'submit',(_0x4fa1a3,_0x140c1d)=>{this['prompt']=_0x140c1d;const _0x396133=yt(_0x140c1d);this['fire']('submitPrompt',_0x396133),_0x140c1d['trim']()&&this['_promptHistory']['add']({'prompt':_0x396133},0x0);},{'priority':'high'}),_0x4b6149;}['_createHistoryView'](){const _0x3a2b82=new ft(this['locale']);return _0x3a2b82['historyGroupView']['items']['bindTo'](this['_promptHistory'])['as'](bt),_0x3a2b82['on']('clearHistory',()=>{this['_promptHistory']['clear'](),this['promptView']['search'](''),this['promptView']['focus']();}),_0x3a2b82;}['_createToolbar'](){const _0x2b2966=new lt(this['locale']);return _0x2b2966['replaceButton']['bind']('isEnabled')['to'](this,'isEnabled',this,'isProcessing',this,'value',(_0x3875e9,_0x594d80,_0x4c8110)=>_0x3875e9&&!_0x594d80&&!!_0x4c8110),_0x2b2966['replaceButton']['delegate']('execute')['to'](this,'replaceContent'),_0x2b2966['insertButton']['bind']('isEnabled')['to'](this,'isEnabled',this,'isProcessing',this,'value',(_0x2b1417,_0xb74294,_0x251f20)=>_0x2b1417&&!_0xb74294&&!!_0x251f20),_0x2b2966['insertButton']['delegate']('execute')['to'](this,'insertContentBelow'),_0x2b2966['tryAgainButton']['bind']('isEnabled')['to'](this,'isEnabled',this,'isProcessing',(_0x4ae4ac,_0x3928f3)=>_0x4ae4ac&&!_0x3928f3),_0x2b2966['tryAgainButton']['delegate']('execute')['to'](this,'tryAgainEvent'),_0x2b2966['stopButton']['bind']('isEnabled')['to'](this,'isProcessing'),_0x2b2966['stopButton']['delegate']('execute')['to'](this,'stopProcessing'),_0x2b2966;}['startProcessing'](){this['value']='',this['isError']=!0x1,this['isProcessing']=!0x0,this['contentArea']['isVisible']=!0x0,this['toolbar']['isVisible']=!0x0,this['contentArea']['focus']();}['finishProcessing'](){const _0x238b68=this['locale'];this['isProcessing']=!0x1,this['prompt']='',this['promptView']['reset'](),this['value']&&(this['promptView']['queryView']['label']=i(_0x238b68,'Ask\x20AI\x20to\x20improve\x20generated\x20text'));}['handleError'](_0x2414eb){const _0x5c2b36=this['locale'];this['finishProcessing'](),this['isError']=!0x0,this['errorView']['text']=_0x2414eb||i(_0x5c2b36,'AI_ERROR_FAILED'),this['value']||(this['contentArea']['isVisible']=!0x1);}}const w=globalThis['DataTransfer'];class n extends _0x4e9706{['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[_0x5aea91,a,E,_0x5eb473];}constructor(_0x54a34d){super(_0x54a34d),_0x54a34d['config']['define']('ai.aiAssistant.disabledElements',['media','rawHtml','tableOfContents']),_0x54a34d['config']['define']('ai.aiAssistant.contentAreaCssClass',''),_0x54a34d['config']['define']('ai.useTheme',!0x0),this['_uiCssClasses']='ck-ai-assistant-ui'+(_0x54a34d['config']['get']('ai.useTheme')?'\x20ck-ai-assistant-ui_theme':'');}['init'](){const {editor:_0x35a2e8}=this;this['_aiAdapter']=_0x35a2e8['plugins']['get'](E),this['_dialog']=_0x35a2e8['plugins']['get'](_0x5eb473),this['_formView']=null,this['_commandDefinitions']=this['_getResolvedCommandsDefinitions']();const _0x4928a9=new j(_0x35a2e8,Array['from'](this['_commandDefinitions']['values']()));_0x35a2e8['commands']['add']('showAIAssistant',_0x4928a9),_0x35a2e8['ui']['componentFactory']['add']('aiCommands',_0x323e7a=>{const _0x348425=_0x17f9bd(_0x323e7a);return _0x348425['set']({'class':'ck-ai-commands-dropdown\x20'+this['_uiCssClasses']}),_0x348425['buttonView']['set']({'label':i(_0x323e7a,'AI\x20Commands'),'icon':_0x116a3f,'tooltip':!0x0}),_0x348425['on']('execute',_0x4dbe45=>this['_onExecute'](_0x4dbe45['source']['id'])),_0x43b9b2(_0x348425,_0x35a2e8['ui']['view']['body'],function(_0x487f0a){const _0x2f7beb=o(_0x487f0a['config']['get']('ai.aiAssistant.commands'),_0x487f0a['locale']),_0x4b44ec=U(_0x487f0a,_0x2f7beb)['filter'](_0x591ad8=>_0x591ad8['commands']['length']);if(0x1===_0x4b44ec['length'])return U(_0x487f0a,_0x4b44ec[0x0]['commands'])['map'](_0x1fe90f=>({'id':_0x1fe90f['id'],'label':_0x1fe90f['label']}));return _0x4b44ec['map'](_0x3c6753=>{const {groupId:_0x20799a,groupLabel:_0x2f62f5,commands:_0x2e8675}=_0x3c6753,_0x17485f=U(_0x487f0a,_0x2e8675)['map'](_0x5dc30b=>({'id':_0x5dc30b['id'],'label':_0x5dc30b['label']}));return{'id':_0x20799a,'menu':_0x2f62f5||_0x20799a,'children':_0x17485f};});}(_0x35a2e8),{'ariaLabel':i(_0x323e7a,'AI\x20Commands')}),_0x348425['menuView']['menuPanelClass']='ck-ai-commands-dropdown\x20'+this['_uiCssClasses'],_0x4928a9['on']('change:enabledCommandsIds',_0x177fb4),_0x348425['menuView']['once']('render',_0x177fb4),_0x348425;function _0x177fb4(){_0x348425['isEnabled']=_0x4928a9['enabledCommandsIds']['length']>0x0;for(const _0x3373cc of _0x348425['menuView']['buttons'])_0x3373cc['isEnabled']=_0x4928a9['enabledCommandsIds']['includes'](_0x3373cc['id']);}}),_0x35a2e8['ui']['componentFactory']['add']('menuBar:aiCommands',_0x183ae1=>{const _0x265457=new _0x4f55c5(_0x183ae1);_0x265457['buttonView']['set']({'label':i(_0x183ae1,'AI\x20Commands'),'icon':_0x116a3f}),_0x265457['bind']('isEnabled')['to'](_0x4928a9,'enabledCommandsIds',_0x453432=>_0x453432['length']>0x0);const _0x26849b=o(_0x35a2e8['config']['get']('ai.aiAssistant.commands'),_0x183ae1);return this['_populateMenuBarMenu'](_0x4928a9,_0x265457,_0x26849b,_0x5fecc8=>this['_onExecute'](_0x5fecc8)),_0x265457;}),_0x35a2e8['ui']['componentFactory']['add']('aiAssistant',()=>{const _0x123db0=this['_createAIAssistantUIButton'](_0x3d395b);return _0x123db0['set']({'tooltip':!0x0,'class':'ck-ai-assistant-button\x20'+this['_uiCssClasses']}),_0x123db0;}),_0x35a2e8['ui']['componentFactory']['add']('menuBar:aiAssistant',()=>{const _0x229cdb=this['_createAIAssistantUIButton'](_0x1419ea);return _0x229cdb['set']({'role':'menuitemcheckbox'}),_0x229cdb;}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x43c8f1=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x22919b;for(const _0x2f07d5 in _0x43c8f1){const _0x1fa85f=_0x2f07d5,_0x337bef=_0x43c8f1[_0x1fa85f];if('aiLicenseKeyValid'==_0x337bef||'aiLicenseKeyInvalid'==_0x337bef||'aiLicenseKeyExpired'==_0x337bef||'aiLicenseKeyDomainLimit'==_0x337bef||'aiLicenseKeyNotAllowed'==_0x337bef||'aiLicenseKeyEvaluationLimit'==_0x337bef||'aiLicenseKeyTrialLimit'==_0x337bef||'aiLicenseKeyUsageLimit'==_0x337bef){delete _0x43c8f1[_0x1fa85f],_0x22919b=_0x337bef,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'aiLicenseKeyInvalid'==_0x22919b&&_0x43c8f1['_showLicenseError']('invalid'),'aiLicenseKeyExpired'==_0x22919b&&_0x43c8f1['_showLicenseError']('expired'),'aiLicenseKeyDomainLimit'==_0x22919b&&_0x43c8f1['_showLicenseError']('domainLimit'),'aiLicenseKeyNotAllowed'==_0x22919b&&_0x43c8f1['_showLicenseError']('featureNotAllowed','AIAssistant'),'aiLicenseKeyEvaluationLimit'==_0x22919b&&_0x43c8f1['_showLicenseError']('evaluationLimit'),'aiLicenseKeyTrialLimit'==_0x22919b&&_0x43c8f1['_showLicenseError']('trialLimit'),'aiLicenseKeyUsageLimit'==_0x22919b&&_0x43c8f1['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['showUI'](_0x1bc9dc='',_0x3483b6='',_0x220218='custom'){const _0x16d432=this['editor'],_0x2d3fb9=_0x16d432['editing']['view'],_0x110533=_0x16d432['plugins']['get'](a),_0xfb77e5=_0x16d432['plugins']['get'](_0x5aea91);_0x110533['showFakeVisualSelection']();const _0x105cd9=new w(),_0x2bbabd=new ClipboardEvent('copy',{'clipboardData':_0x105cd9}),_0x4387e5=new _0xc8920c(_0x105cd9),_0xf34557=new _0x356125(_0x2d3fb9,_0x2bbabd,{'dataTransfer':_0x4387e5});_0xfb77e5['_forceMarkersCopy']('comment',()=>{_0x2d3fb9['document']['fire']('copy',_0xf34557);}),this['_formView']||(this['_initView'](),this['_aiAssistantController']=new k(_0x16d432,this['_aiAdapter']['textAdapter'],this['_formView']));let _0x10c00a=_0x4387e5['getData']('text/html');const _0x255f64=_0x16d432['model']['document']['selection'],_0x279c8a=Array['from'](_0x255f64['getRanges']());0x1===_0x279c8a['length']&&_0x279c8a[0x0]['isFlat']&&!_0x255f64['getSelectedElement']()&&''!==_0x10c00a['replace'](/&nbsp;/g,'')['trim']()&&(_0x10c00a='<p>'+_0x10c00a+'</p>'),this['_aiAssistantController']['updateView']({'actionId':_0x220218,'query':_0x1bc9dc,'htmlContent':_0x10c00a,'label':_0x3483b6,'mainActionLabel':M[_0x16d432['model']['document']['selection']['isCollapsed']?'INSERT':'REPLACE']}),'aiAssistant'!==this['_dialog']['id']?this['_dialog']['show']({'id':'aiAssistant','icon':_0x51c1b4,'title':i(this['editor']['locale'],'AI\x20Assistant'),'content':this['_formView'],'position':_0x533ed3['EDITOR_TOP_SIDE'],'onShow':()=>{this['_formView']['focus']();},'onHide':()=>{this['_aiAssistantController']['reset'](),_0x110533['hideFakeVisualSelection']();}}):this['_dialog']['view']['wasMoved']||this['_dialog']['view']['updatePosition']();}['hideUI'](){this['_dialog']['hide']();}['_getResolvedCommandsDefinitions'](){const _0x388524=new Map(),_0x4a7c18=o(this['editor']['config']['get']('ai.aiAssistant.commands'),this['editor']['locale']);for(const _0x585998 of _0x4a7c18)for(const _0x3b8bd8 of _0x585998['commands'])_0x388524['set'](_0x3b8bd8['id'],{..._0x3b8bd8,'groupId':_0x585998['groupId'],'groupLabel':_0x585998['groupLabel']||_0x585998['groupId']});return _0x388524;}['_createAIAssistantUIButton'](_0xfd9d5d){const _0x1cc52c=this['editor'],_0x3a1d05=_0x1cc52c['commands']['get']('showAIAssistant'),_0x27cb6d=new _0xfd9d5d(_0x1cc52c['locale']);return _0x27cb6d['set']({'label':i(_0x1cc52c['locale'],'AI\x20Assistant'),'icon':_0x51c1b4,'isToggleable':!0x0}),_0x27cb6d['bind']('isEnabled')['to'](_0x3a1d05),_0x27cb6d['bind']('isOn')['to'](this['_dialog'],'id',_0x29ecd3=>'aiAssistant'===_0x29ecd3),this['listenTo'](_0x27cb6d,'execute',()=>{_0x27cb6d['isOn']?this['hideUI']():_0x3a1d05['execute']();}),_0x27cb6d;}['_initView'](){const _0x30c756=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',()=>{_0x30c756['insertContent'](this['_aiAssistantController']['currentContext']),this['hideUI']();}),this['listenTo'](this['_formView'],'insertContentBelow',()=>{_0x30c756['insertContentBelow'](this['_aiAssistantController']['currentContext']),this['hideUI']();}),this['_initAriaAiStatusChangeAnnouncements']();}['_initAriaAiStatusChangeAnnouncements'](){const {locale:_0x17ecdb,ui:{ariaLiveAnnouncer:_0x37add5}}=this['editor'];this['_formView']['contentArea']['on']('change:isProcessing',(_0x5d1ab0,_0x511b2f,_0x3983ea)=>{const _0x23ce74=this['_aiAssistantController']['currentContext'];_0x3983ea?_0x37add5['announce'](i(_0x17ecdb,'AI\x20is\x20writing')):_0x23ce74&&_0x37add5['announce'](i(_0x17ecdb,'Generated\x20content:\x20%0',_0x23ce74),{'politeness':'polite','isUnsafeHTML':!0x0});}),this['_formView']['on']('change:isError',(_0x1a1c61,_0x152f16,_0x3f5717)=>{if(_0x3f5717){const _0x35d160=this['_formView']['errorView']['text'];_0x37add5['announce'](i(_0x17ecdb,'Error\x20during\x20AI\x20content\x20generation:\x20%0',_0x35d160));}});}['_onExecute'](_0x46ff2e){const _0x488475=this['_commandDefinitions']['get'](_0x46ff2e),_0x5b2d45=this['editor'],_0xcf2baf=_0x5b2d45['model']['document']['selection'],_0x315fd9=_0x5b2d45['commands']['get']('showAIAssistant'),_0x3e4c69=_0x5b2d45['plugins']['get'](a),_0x4d36dc=''+(_0x488475['groupId']!==x?_0x488475['groupLabel']+':\x20':'')+_0x488475['label'];if(!0x1!==_0x488475['requiresContent']&&_0xcf2baf['isCollapsed']){const _0x33e959=_0x3c08c(_0xcf2baf['getSelectedBlocks']())||_0x5b2d45['model']['schema']['getLimitElement'](_0xcf2baf);_0x5b2d45['model']['change'](_0x28fbbf=>{_0x28fbbf['setSelection'](_0x33e959,'in');});}_0x3e4c69['showFakeVisualSelection'](),_0x315fd9['execute'](_0x488475['prompt'],_0x4d36dc,'command:'+_0x46ff2e);}['_populateMenuBarMenu'](_0x382d0c,_0x470c5d,_0x4a12af,_0x4f071){const _0x14ce9e=this['editor'],_0x1f1a96=_0x14ce9e['locale'],_0x3c9166=new _0x183787(_0x1f1a96),_0x1569ed=U(_0x14ce9e,_0x4a12af)['filter'](_0x3dcbf5=>_0x3dcbf5['commands']['length']);0x1===_0x1569ed['length']?this['_getMenuBarGroupButtons']({'command':_0x382d0c,'commands':_0x1569ed[0x0]['commands'],'parentMenuView':_0x470c5d,'onExecute':_0x4f071})['forEach'](_0x328acf=>_0x3c9166['items']['add'](_0x328acf)):_0x1569ed['forEach'](({groupId:_0x18f0aa,groupLabel:_0xa558ef,commands:_0x3de178})=>{const _0x1f6a53=new _0x3a1cba(_0x1f1a96,_0x470c5d),_0x41e4fb=new _0x4f55c5(_0x1f1a96),_0x3d4cf6=new _0x183787(_0x1f1a96),_0x1c8ded=this['_getMenuBarGroupButtons']({'command':_0x382d0c,'commands':_0x3de178,'parentMenuView':_0x41e4fb,'onExecute':_0x4f071});_0x41e4fb['buttonView']['set']({'label':_0xa558ef||_0x18f0aa}),_0x41e4fb['delegate']('execute')['to'](_0x470c5d),_0x3d4cf6['items']['addMany'](_0x1c8ded),_0x41e4fb['panelView']['children']['add'](_0x3d4cf6),_0x1f6a53['children']['add'](_0x41e4fb),_0x3c9166['items']['add'](_0x1f6a53);}),_0x470c5d['panelView']['children']['add'](_0x3c9166);}['_getMenuBarGroupButtons']({command:_0x4dd9d1,commands:_0x1bfb09,parentMenuView:_0xf7b569,onExecute:_0x2769fe}){const _0xd2c1f5=this['editor'],_0x19e06f=_0xd2c1f5['locale'];return U(_0xd2c1f5,_0x1bfb09)['map'](_0x5a4f4d=>{const _0x4df8b9=new _0x3a1cba(_0x19e06f,_0xf7b569),_0x5eef43=new _0x1419ea(_0x19e06f);return _0x5eef43['set']({'label':_0x5a4f4d['label']}),_0x5eef43['delegate']('execute')['to'](_0xf7b569),_0x5eef43['on']('execute',()=>_0x2769fe(_0x5a4f4d['id'])),_0x5eef43['bind']('isEnabled')['to'](_0x4dd9d1,'enabledCommandsIds',_0x152a14=>_0x152a14['includes'](_0x5a4f4d['id'])),_0x4df8b9['children']['add'](_0x5eef43),_0x4df8b9;});}}function B(_0x3da4c3,_0x2caf89){return void 0x0!==_0x3da4c3['order']&&void 0x0===_0x2caf89['order']?0x1:void 0x0===_0x3da4c3['order']&&void 0x0!==_0x2caf89['order']?-0x1:void 0x0!==_0x3da4c3['order']&&void 0x0!==_0x2caf89['order']?_0x3da4c3['order']-_0x2caf89['order']:0x0;}function U(_0x32718e,_0x13d6fe){_0x13d6fe['sort'](B);const _0x83a72={},_0x51323a=[];for(const _0x3cb990 of _0x13d6fe)if(void 0x0!==_0x3cb990['order']){if(_0x3cb990['order']in _0x83a72)throw new _0x163809('ai-commands-config-order-collision',_0x32718e,{'conflictingDefinitions':[_0x3cb990,_0x83a72[_0x3cb990['order']]]});_0x83a72[_0x3cb990['order']]=_0x3cb990,_0x51323a['splice'](_0x3cb990['order'],0x0,_0x3cb990);}else _0x51323a['push'](_0x3cb990);return _0x51323a;}class r extends _0x4e9706{static get['requires'](){return[n,a];}static get['pluginName'](){return'AIAssistant';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0xf9ef10){super(_0xf9ef10);const _0x2fbf40=_0xf9ef10['config'],_0x3c4b27=_0xf9ef10['locale'];_0x2fbf40['define']('ai.aiAssistant.preserveComments',!0x0),_0x2fbf40['define']('ai.aiAssistant.commands',function(_0x18d232){return[{'groupId':'editOrReview','groupLabel':i(_0x18d232,'Edit\x20or\x20review'),'commands':[{'id':'improveWriting','label':i(_0x18d232,'Improve\x20writing'),'prompt':'Fix\x20spelling\x20mistakes,\x20use\x20proper\x20grammar\x20and\x20apply\x20good\x20writing\x20practices.\x20Do\x20not\x20lose\x20the\x20original\x20meaning.'},{'id':'makeShorter','label':i(_0x18d232,'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(_0x18d232,'Make\x20longer'),'prompt':'Improve\x20this\x20content\x20by\x20using\x20descriptive\x20language\x20and\x20inserting\x20more\x20information\x20and\x20more\x20detailed\x20explanations.'},{'id':'simplifyLanguage','label':i(_0x18d232,'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(_0x18d232,'Generate\x20from\x20selection'),'commands':[{'id':'summarize','label':i(_0x18d232,'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(_0x18d232,'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(_0x18d232,'Change\x20tone'),'commands':[{'id':'professional','label':i(_0x18d232,'Professional'),'prompt':'Improve\x20using\x20polished,\x20formal,\x20and\x20respectful\x20language\x20to\x20convey\x20professional\x20expertise\x20and\x20competence.'},{'id':'casual','label':i(_0x18d232,'Casual'),'prompt':'Improve\x20using\x20casual,\x20informal\x20language\x20to\x20convey\x20a\x20casual\x20conversation\x20with\x20a\x20real\x20person.'},{'id':'direct','label':i(_0x18d232,'Direct'),'prompt':'Improve\x20using\x20direct\x20language,\x20using\x20only\x20the\x20essential\x20information.'},{'id':'confident','label':i(_0x18d232,'Confident'),'prompt':'Improve\x20using\x20compelling,\x20optimistic\x20language\x20to\x20convey\x20confidence\x20in\x20the\x20writing.'},{'id':'friendly','label':i(_0x18d232,'Friendly'),'prompt':'Improve\x20using\x20friendly,\x20comforting\x20language,\x20to\x20convey\x20understanding\x20and\x20empathy.'}]},{'groupId':'changeStyle','groupLabel':i(_0x18d232,'Change\x20style'),'commands':[{'id':'business','label':i(_0x18d232,'Business'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20business\x20professional\x20with\x20formal\x20language.'},{'id':'legal','label':i(_0x18d232,'Legal'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20legal\x20professional\x20using\x20valid\x20legal\x20terminology.'},{'id':'journalism','label':i(_0x18d232,'Journalism'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20journalist\x20using\x20engaging\x20language\x20to\x20convey\x20the\x20importance\x20of\x20the\x20information.'},{'id':'poetic','label':i(_0x18d232,'Poetic'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20poem\x20using\x20poetic\x20techniques\x20without\x20losing\x20the\x20original\x20meaning.'}]},{'groupId':'translate','groupLabel':i(_0x18d232,'Translate'),'commands':[{'id':'translateEnglish','label':i(_0x18d232,'English'),'prompt':'Translate\x20the\x20content\x20to\x20English\x20language.'},{'id':'translateSpanish','label':i(_0x18d232,'Spanish'),'prompt':'Translate\x20the\x20content\x20to\x20Spanish\x20language.'},{'id':'translatePortuguese','label':i(_0x18d232,'Portuguese'),'prompt':'Translate\x20the\x20content\x20to\x20Portuguese\x20language.'},{'id':'translateGerman','label':i(_0x18d232,'German'),'prompt':'Translate\x20the\x20content\x20to\x20German\x20language.'},{'id':'translateFrench','label':i(_0x18d232,'French'),'prompt':'Translate\x20the\x20content\x20to\x20French\x20language.'},{'id':'translateChinese','label':i(_0x18d232,'Simplified\x20Chinese'),'prompt':'Translate\x20the\x20content\x20to\x20Simplified\x20Chinese\x20language.'},{'id':'translateHindi','label':i(_0x18d232,'Hindi'),'prompt':'Translate\x20the\x20content\x20to\x20Hindi\x20language.'},{'id':'translateArabic','label':i(_0x18d232,'Arabic'),'prompt':'Translate\x20the\x20content\x20to\x20Arabic\x20language.'}]}];}(_0x3c4b27)),_0x2fbf40['define']('ai.aiAssistant.extraCommandGroups',[]),_0x2fbf40['define']('ai.aiAssistant.removeCommands',[]);let _0x90041=o(_0x2fbf40['get']('ai.aiAssistant.commands'),_0x3c4b27);const _0x4d9bf2=_0x2fbf40['get']('ai.aiAssistant.extraCommandGroups'),_0x4678ad=_0x2fbf40['get']('ai.aiAssistant.removeCommands');_0x4d9bf2['forEach'](_0x2fec87=>{const _0x5e7774=_0x90041['find'](_0x154050=>_0x154050['groupId']===_0x2fec87['groupId']);_0x5e7774?_0x5e7774['commands']=_0x5e7774['commands']['concat'](_0x2fec87['commands']):_0x90041['push'](_0x2fec87);}),_0x90041=_0x90041['filter'](_0x2cf937=>!_0x4678ad['includes'](_0x2cf937['groupId'])),_0x90041['forEach'](_0x23108c=>{_0x23108c['commands']=_0x23108c['commands']['filter'](_0x9432c4=>!_0x4678ad['includes'](_0x9432c4['id']));}),_0x2fbf40['set']('ai.aiAssistant.commands',_0x90041);}}class P extends _0x4e9706{['abortController'];static get['requires'](){return[E];}constructor(_0x3a4056){super(_0x3a4056),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'](_0x4769e9){return this['sendRequest'](_0x4769e9)['catch'](_0x370a2d=>{if(_0x370a2d instanceof R)return Promise['reject'](_0x370a2d);if('AbortError'==_0x370a2d['name'])return Promise['resolve']();throw console['error'](_0x370a2d),new _0x163809('aitextadapter-send-request-failed',null);});}async['_prepareRequestHeaders'](_0x5bb443,_0x13d9e8){const _0x591f2b=this['editor']['locale'],_0x5ae708={'Content-Type':'application/json'};if('object'==typeof _0x5bb443)Object['assign'](_0x5ae708,_0x5bb443);else{if(_0x5bb443)try{const _0x1aee75=await _0x5bb443(_0x13d9e8);Object['assign'](_0x5ae708,_0x1aee75);}catch(_0xc6aef3){return Promise['reject'](new R(i(_0x591f2b,'AI_ERROR_GET_HEADERS')));}}return _0x5ae708;}async['_prepareRequestParameters'](_0x5d98a5,_0xa7cf27){const _0x13122b=this['editor']['locale'];if('object'==typeof _0x5d98a5)return _0x5d98a5;try{return await _0x5d98a5(_0xa7cf27);}catch(_0x3f8619){return Promise['reject'](new R(i(_0x13122b,'AI_ERROR_GET_PARAMETERS')));}}}class O extends P{['_apiUrl'];['_requestHeaders'];['_requestParameters'];static get['pluginName'](){return'OpenAITextAdapter';}constructor(_0x1058e0){super(_0x1058e0),_0x1058e0['config']['define']('ai.openAI.apiUrl','https://api.openai.com/v1/chat/completions'),_0x1058e0['config']['get']('ai.openAI.requestParameters')||_0x1058e0['config']['define']('ai.openAI.requestParameters',{'model':'gpt-3.5-turbo','max_tokens':0x7d0,'temperature':0x1,'top_p':0x1,'stream':!0x0}),this['_apiUrl']=_0x1058e0['config']['get']('ai.openAI.apiUrl'),this['_requestHeaders']=_0x1058e0['config']['get']('ai.openAI.requestHeaders')||{},this['_requestParameters']=_0x1058e0['config']['get']('ai.openAI.requestParameters');}async['sendRequest']({query:_0x38482c,context:_0x57fd7d,onData:_0x4aeadd,actionId:_0x4ab1e5}){const _0x5bf16c=this['editor']['locale'],_0x2df092=await this['prepareMessages'](_0x38482c,_0x57fd7d,_0x4ab1e5),_0x4af7ba=await this['_prepareRequestHeaders'](this['_requestHeaders'],_0x4ab1e5),_0x15c196=await this['_prepareRequestParameters'](this['_requestParameters'],_0x4ab1e5),_0x4577b4={'messages':_0x2df092,..._0x15c196},_0x5c0539={'method':'POST','headers':_0x4af7ba,'body':JSON['stringify'](_0x4577b4),'signal':this['abortController']['signal']},_0x3ce3e4=await fetch(this['_apiUrl'],_0x5c0539);if(_0x3ce3e4['ok'])return _0x15c196['stream']?await this['_readStreamableResponse'](_0x3ce3e4,_0x4aeadd):await this['_readStaticResponse'](_0x3ce3e4,_0x4aeadd),Promise['resolve']();{const _0x725db0=await _0x3ce3e4['text']();return _0x725db0['includes']('context_length_exceeded')?Promise['reject'](new R(i(_0x5bf16c,'AI_ERROR_CONTEXT_LENGTH'))):_0x725db0['includes']('Moderation')?Promise['reject'](new R(i(_0x5bf16c,'AI_ERROR_MODERATION'))):Promise['reject'](new Error(_0x725db0));}}async['prepareMessages'](_0x38a717,_0x238b0d,_0x13ae1a){let _0x1e2b0e,_0x21be72;return _0x238b0d?(_0x1e2b0e='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.',_0x21be72='Instruction:\x0a'+_0x38a717+'\x0aYou\x20must\x20keep\x20the\x20text\x20formatting.\x0a\x0aContent:\x0a'+_0x238b0d):(_0x1e2b0e='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.',_0x21be72=_0x38a717),[{'role':'system','content':_0x1e2b0e},{'role':'user','content':_0x21be72}];}async['_readStreamableResponse'](_0x32fe7f,_0x35b0fa){const _0x2ff471=_0x32fe7f['body']['getReader'](),_0x12abc8=new TextDecoder();let _0x3d8476='',_0xd589d3='',_0x3c1474='',_0x185cc4=!0x1;for(;!_0x185cc4;){const {done:_0x3e0b7c,value:_0x641370}=await _0x2ff471['read'](),_0x9ee6df=_0x3d8476+_0x12abc8['decode'](_0x641370);let _0x23ea95='';_0x185cc4=_0x3e0b7c;try{_0x23ea95=this['_cleanUpData'](_0x9ee6df),_0x3d8476='';}catch(_0x15ead2){_0x3d8476=_0x9ee6df;continue;}_0xd589d3+=_0x23ea95,!_0x185cc4&&this['_isBufferIncomplete'](_0xd589d3)||_0xd589d3&&(_0x3c1474+=_0xd589d3,_0xd589d3='',_0x35b0fa(_0x3c1474));}return Promise['resolve']();}async['_readStaticResponse'](_0x241d6f,_0x14ec88){return _0x14ec88((await _0x241d6f['json']())['choices'][0x0]['message']['content']),Promise['resolve']();}['_isBufferIncomplete'](_0x59ccbe){const _0x43ef5c=_0x59ccbe['split']('<')['length']!==_0x59ccbe['split']('>')['length'],_0x44834a=_0x59ccbe['length']<0x1e;return _0x43ef5c&&_0x44834a;}['_cleanUpData'](_0x5ea473){return _0x5ea473['split'](/\n(?![^{]*\})/g)['map'](_0x5265c5=>_0x5265c5['replace']('data:\x20',''))['filter'](_0x34c3ea=>_0x34c3ea&&_0x34c3ea['length']>0x0&&'[DONE]'!==_0x34c3ea)['map'](_0x4318e5=>{const {choices:_0x4e2d5a}=JSON['parse'](_0x4318e5);if(_0x4e2d5a[0x0]?.['delta']?.['content'])return _0x4e2d5a[0x0]['delta']['content'];})['filter'](_0x3ea37c=>_0x3ea37c)['join']('');}}class D extends P{['_apiUrl'];['_requestHeaders'];['_bedrockClientConfig'];['_requestParameters'];static get['pluginName'](){return'AWSTextAdapter';}constructor(_0x6a0375){super(_0x6a0375),_0x6a0375['config']['get']('ai.aws.requestParameters')||_0x6a0375['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']=_0x6a0375['config']['get']('ai.aws.apiUrl'),this['_bedrockClientConfig']=_0x6a0375['config']['get']('ai.aws.bedrockClientConfig'),this['_requestHeaders']=_0x6a0375['config']['get']('ai.aws.requestHeaders'),this['_requestParameters']=_0x6a0375['config']['get']('ai.aws.requestParameters');}async['sendRequest']({query:_0x2cf70e,context:_0x15a162,onData:_0x30243e,actionId:_0x29eefd}){const {model:_0x587ea0,stream:_0x8f61c9,..._0x49bd93}=await this['_prepareRequestParameters'](this['_requestParameters'],_0x29eefd),_0x1e2dbd={'prompt':await this['preparePrompt'](_0x2cf70e,_0x15a162,_0x587ea0,_0x29eefd),..._0x49bd93};this['_apiUrl']?await this['_processProxyRequest'](_0x1e2dbd,_0x587ea0,_0x8f61c9,_0x30243e,_0x29eefd):await this['_processAWSRequest'](_0x1e2dbd,_0x587ea0,_0x8f61c9,_0x30243e);}async['preparePrompt'](_0xa7d2d8,_0x2d98ee,_0x5fbe6c,_0x4901a3){let _0x331699,_0x57ebfa;return _0x2d98ee?(_0x331699='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.',_0x57ebfa='Instruction:\x0a'+_0xa7d2d8+'\x0aYou\x20must\x20keep\x20the\x20text\x20formatting.\x0a\x0aContent:\x0a'+_0x2d98ee):(_0x331699='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.',_0x57ebfa=_0xa7d2d8),'meta.llama'==this['getModelFamily'](_0x5fbe6c)?'<<SYS>>\x0a'+_0x331699+'\x0a<</SYS>>\x0a[INST]\x0a'+_0x57ebfa+'\x0a[/INST]':'Human:\x0a'+_0x331699+'\x0a'+_0x57ebfa+'\x0a\x0aAssistant:';}['getModelFamily'](_0x14d2af){if(/^anthropic\.claude/['test'](_0x14d2af))return'anthropic.claude';if(/^ai21\.j2/['test'](_0x14d2af))return'ai21.j2';if(/^cohere\.command/['test'](_0x14d2af))return'cohere.command';if(/^meta\.llama/['test'](_0x14d2af))return'meta.llama';throw new R(i(this['editor']['locale'],'AI_ERROR_UNSUPPORTED_MODEL',_0x14d2af));}async['_processProxyRequest'](_0x25331b,_0x7398e5,_0x232050,_0x4b6789,_0xdb7ac){const _0x583dd6={'method':'POST','headers':await this['_prepareRequestHeaders'](this['_requestHeaders'],_0xdb7ac),'body':JSON['stringify']({..._0x25331b,'model':_0x7398e5,'stream':_0x232050}),'signal':this['abortController']['signal']},_0x27d811=await fetch(this['_apiUrl'],_0x583dd6);_0x232050?await this['_readStreamableResponse'](_0x27d811,_0x7398e5,_0x4b6789):await this['_readStaticResponse'](_0x27d811,_0x7398e5,_0x4b6789);}async['_processAWSRequest'](_0xcfaa65,_0x159679,_0x22f24b,_0x4d1dc0){const _0x5793f6=new _0x32e697(this['_bedrockClientConfig']),_0x37a692={'body':JSON['stringify'](_0xcfaa65),'contentType':'application/json','accept':'application/json','modelId':_0x159679};let _0x444cb1;if(_0x22f24b){const _0x1373cd=new _0x66f342(_0x37a692);_0x444cb1=await _0x5793f6['send'](_0x1373cd,{'abortSignal':this['abortController']['signal']}),await this['_readAsyncIterableResponse'](_0x444cb1,_0x159679,_0x4d1dc0);}else{const _0x183165=new _0x36b9f4(_0x37a692);_0x444cb1=await _0x5793f6['send'](_0x183165,{'abortSignal':this['abortController']['signal']}),await this['_readStaticResponse'](_0x444cb1,_0x159679,_0x4d1dc0);}}async['_readAsyncIterableResponse'](_0x31e24f,_0x4e3a44,_0x16d5a6){const _0xde30fe=_0x31e24f['body'],_0x16dede=new TextDecoder('utf-8');let _0x1da9b7='';for await(const _0x1f8976 of _0xde30fe)if(_0x1f8976['chunk']){const _0x32f74e=_0x16dede['decode'](_0x1f8976['chunk']['bytes']),_0x1cd345=JSON['parse'](_0x32f74e);_0x1da9b7+=this['_getGeneratedText'](_0x1cd345,_0x4e3a44),_0x16d5a6(_0x1da9b7);}return Promise['resolve']();}async['_readStreamableResponse'](_0x148dcb,_0x3b6896,_0x28b204){const _0x596485=_0x148dcb['body'],_0x5192a1=new TextDecoder('utf-8'),_0x1c126f=_0x596485['getReader']();let _0x44edf8='',_0x16953b='',_0x4d10be=!0x1;for(;!_0x4d10be;){const {done:_0x59318a,value:_0x47acb0}=await _0x1c126f['read']();if(_0x4d10be=_0x59318a,_0x4d10be)break;const _0x89af44=(_0x44edf8+_0x5192a1['decode'](_0x47acb0))['split']('\x0a')['map'](_0x4bcbad=>{try{return _0x44edf8='',JSON['parse'](_0x4bcbad);}catch(_0x57861e){return _0x44edf8=_0x4bcbad,null;}})['filter'](_0x4d023e=>null!==_0x4d023e);_0x89af44['length']&&(_0x16953b+=_0x89af44['map'](_0x2cc575=>this['_getGeneratedText'](_0x2cc575,_0x3b6896))['join'](''),_0x28b204(_0x16953b));}return Promise['resolve']();}async['_readStaticResponse'](_0x143ed0,_0x47469e,_0x2a5fa4){let _0x5421ed;return _0x5421ed=_0x143ed0 instanceof Response?await _0x143ed0['json']():JSON['parse'](Buffer['from'](_0x143ed0['body'])['toString']('utf8')),(_0x2a5fa4(this['_getGeneratedText'](_0x5421ed,_0x47469e)),Promise['resolve']());}['_getGeneratedText'](_0x48f507,_0x572328){switch(this['getModelFamily'](_0x572328)){case'anthropic.claude':return _0x48f507['completion'];case'ai21.j2':return _0x48f507['completions'][0x0]['data']['text'];case'cohere.command':return _0x48f507['generations'][0x0]['text'];case'meta.llama':return _0x48f507['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':_0x329444=>0x1!=_0x329444}};
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':_0x430b6f=>0x1!=_0x430b6f}};
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- (_0x39fb85=>{const {af:{dictionary:_0x506cb8,getPluralForm:_0x1aed18}}={'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':_0x3b0952=>0x1!=_0x3b0952}};_0x39fb85['af']||={'dictionary':{},'getPluralForm':null},_0x39fb85['af']['dictionary']=Object['assign'](_0x39fb85['af']['dictionary'],_0x506cb8),_0x39fb85['af']['getPluralForm']=_0x1aed18;})(window['CKEDITOR_TRANSLATIONS']||={});
23
+ (_0x6168f6=>{const {af:{dictionary:_0x531594,getPluralForm:_0x193c2a}}={'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':_0x25306f=>0x1!=_0x25306f}};_0x6168f6['af']||={'dictionary':{},'getPluralForm':null},_0x6168f6['af']['dictionary']=Object['assign'](_0x6168f6['af']['dictionary'],_0x531594),_0x6168f6['af']['getPluralForm']=_0x193c2a;})(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':_0x2032c2=>0x0==_0x2032c2?0x0:0x1==_0x2032c2?0x1:0x2==_0x2032c2?0x2:_0x2032c2%0x64>=0x3&&_0x2032c2%0x64<=0xa?0x3:_0x2032c2%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':_0x5dc12d=>0x0==_0x5dc12d?0x0:0x1==_0x5dc12d?0x1:0x2==_0x5dc12d?0x2:_0x5dc12d%0x64>=0x3&&_0x5dc12d%0x64<=0xa?0x3:_0x5dc12d%0x64>=0xb?0x4:0x5}};
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- (_0x33cab5=>{const {ar:{dictionary:_0x189093,getPluralForm:_0x40bd7c}}={'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':_0x440c9d=>0x0==_0x440c9d?0x0:0x1==_0x440c9d?0x1:0x2==_0x440c9d?0x2:_0x440c9d%0x64>=0x3&&_0x440c9d%0x64<=0xa?0x3:_0x440c9d%0x64>=0xb?0x4:0x5}};_0x33cab5['ar']||={'dictionary':{},'getPluralForm':null},_0x33cab5['ar']['dictionary']=Object['assign'](_0x33cab5['ar']['dictionary'],_0x189093),_0x33cab5['ar']['getPluralForm']=_0x40bd7c;})(window['CKEDITOR_TRANSLATIONS']||={});
23
+ (_0x1cd9da=>{const {ar:{dictionary:_0x5b6c70,getPluralForm:_0x55d0d6}}={'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':_0x25e6c9=>0x0==_0x25e6c9?0x0:0x1==_0x25e6c9?0x1:0x2==_0x25e6c9?0x2:_0x25e6c9%0x64>=0x3&&_0x25e6c9%0x64<=0xa?0x3:_0x25e6c9%0x64>=0xb?0x4:0x5}};_0x1cd9da['ar']||={'dictionary':{},'getPluralForm':null},_0x1cd9da['ar']['dictionary']=Object['assign'](_0x1cd9da['ar']['dictionary'],_0x5b6c70),_0x1cd9da['ar']['getPluralForm']=_0x55d0d6;})(window['CKEDITOR_TRANSLATIONS']||={});