@ckeditor/ckeditor5-ai 46.0.2 → 46.0.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 _0x47d13d,Command as _0x3bf151}from'@ckeditor/ckeditor5-core/dist/index.js';import{IconCopy as _0x530858,IconCheck as _0x534137,IconError as _0x3145a9,IconSubmit as it,IconHistory as tt,IconMagicWand as _0x4edd52,IconRobotPencil as _0x2e4d83}from'@ckeditor/ckeditor5-icons/dist/index.js';import{uid as _0x348b23,CKEditorError as _0x18ef2b,ObservableMixin as _0x5733b6,global as _0x542910,isVisible as _0x159f09,Rect as _0x37fb03,Collection as _0x1b4047,FocusTracker as et,KeystrokeHandler as rt,first as _0x43afe3}from'@ckeditor/ckeditor5-utils/dist/index.js';import{ToolbarView as ot,ButtonView as _0x2db44c,View as _0x3bf81d,SpinnerView as _0x392235,IconView as _0x33f119,AutocompleteView as st,ListView as yt,ListItemGroupView as Ct,ListItemView as xt,ButtonLabelView as wt,FocusCycler as ht,createLabeledTextarea as nt,Dialog as _0x3f999e,createDropdown as _0x4275aa,addMenuToDropdown as _0x10381b,MenuBarMenuView as _0x1c05d1,MenuBarMenuListItemButtonView as _0x4151ae,DialogViewPosition as _0x49324c,MenuBarMenuListView as _0x1a8d4b,MenuBarMenuListItemView as _0x2fef60}from'@ckeditor/ckeditor5-ui/dist/index.js';import{ClipboardPipeline as _0x15d4b1,ClipboardMarkersUtils as _0xf4919e}from'@ckeditor/ckeditor5-clipboard/dist/index.js';import{ViewDocumentDomEventData as _0x26acc9,ViewDataTransfer as _0x144e81,ViewUpcastWriter as _0x5f329a,Matcher as _0x2033b0}from'@ckeditor/ckeditor5-engine/dist/index.js';import{unescape as kt,escape as ft}from'es-toolkit/compat';import{BedrockRuntimeClient as _0x2408c7,InvokeModelWithResponseStreamCommand as _0xd9b0cc,InvokeModelCommand as _0x314eda}from'@aws-sdk/client-bedrock-runtime';const K='_ungrouppedCommands';function o(_0x2e81c2,_0x19ae3d){const _0x4d67b6=(0x0,_0x19ae3d['t'])('Other');return _0x2e81c2['length']?'groupId'in _0x2e81c2[0x0]?_0x2e81c2:[{'groupId':K,'groupLabel':_0x4d67b6,'order':0x1/0x0,'commands':_0x2e81c2}]:[{'groupId':K,'groupLabel':_0x4d67b6,'order':0x1/0x0,'commands':[]}];}const gt=globalThis['DataTransfer'],w='ai-ui';class a extends _0x47d13d{static get['pluginName'](){return'AIAssistantEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x5bd745}=this,_0x392bc8=['ck-fake-ai-selection'];_0x5bd745['config']['get']('ai.useTheme')&&_0x392bc8['push']('ck-ai-assistant-ui_theme'),_0x5bd745['conversion']['for']('editingDowncast')['markerToHighlight']({'model':w,'view':{'classes':_0x392bc8,'priority':0xc}}),_0x5bd745['conversion']['for']('editingDowncast')['markerToElement']({'model':w,'view':(_0x4436c8,{writer:_0x15c347})=>{if(!_0x4436c8['markerRange']['isCollapsed'])return null;const _0x54b9a9=_0x15c347['createUIElement']('span');return _0x15c347['addClass'](['ck-fake-ai-selection','ck-fake-ai-selection_collapsed'],_0x54b9a9),_0x54b9a9;}});}['afterInit'](){!async function(_0x34d262){const _0xf2afe3=_0x345c84([0x66,0x65,0x4b,0x59,0x55,0x32,0x51,0x56,0x30,0x53,0x6b,0x68,0x79,0x62,0x6d,0x54,0x69,0x74,0x48,0x4e,0x43,0x78,0x6f,0x4a,0x41,0x6e,0x4d,0x70,0x6c,0x38,0x36,0x4f,0x7a,0x75,0x52,0x39,0x5a,0x42,0x49,0x76,0x71,0x47,0x64,0x46,0x73,0x6a,0x4c,0x45,0x72,0x44,0x33,0x31,0x67,0x77,0x35,0x58,0x61,0x57,0x34,0x63,0x37,0x50]),_0x580cd7=0x33c1dbe7,_0x2438ba=0x33c6ab0f^_0x580cd7,_0x54492e=window[_0x345c84([0x44,0x61,0x74,0x65])][_0x345c84([0x6e,0x6f,0x77])](),_0x47018d=_0x34d262[_0x345c84([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x5b8a4d=new window[(_0x345c84([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0xaf4973=>{_0x47018d[_0x345c84([0x6f,0x6e,0x63,0x65])](_0x345c84([0x72,0x65,0x61,0x64,0x79]),_0xaf4973);}),_0x2baaa3={[_0x345c84([0x6b,0x74,0x79])]:_0x345c84([0x45,0x43]),[_0x345c84([0x75,0x73,0x65])]:_0x345c84([0x73,0x69,0x67]),[_0x345c84([0x63,0x72,0x76])]:_0x345c84([0x50,0x2d,0x32,0x35,0x36]),[_0x345c84([0x78])]:_0x345c84([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]),[_0x345c84([0x79])]:_0x345c84([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]),[_0x345c84([0x61,0x6c,0x67])]:_0x345c84([0x45,0x53,0x32,0x35,0x36])},_0x55f19b=_0x47018d[_0x345c84([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x345c84([0x67,0x65,0x74])](_0x345c84([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x11a91d(){let _0x5756c1,_0x4fa052=null,_0x203893=null;try{if(_0x55f19b==_0x345c84([0x47,0x50,0x4c]))return _0x345c84([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x5756c1=_0x421dcf(),!_0x5756c1)return _0x345c84([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x5756c1[_0x345c84([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x203893=_0xfb08d(_0x5756c1[_0x345c84([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x5756c1[_0x345c84([0x6a,0x74,0x69])])),await _0x471d3b()?_0x3ed39e()?_0x3e70d()?_0x345c84([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x1bb930()?(_0x5756c1[_0x345c84([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x345c84([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x4fa052=_0x54bfba(_0x345c84([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x5756c1[_0x345c84([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x345c84([0x74,0x72,0x69,0x61,0x6c])&&(_0x4fa052=_0x54bfba(_0x345c84([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0xcc2864()):_0x345c84([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x345c84([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x345c84([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x345c84([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x3e70d(){const _0x5a998f=[_0x345c84([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x345c84([0x74,0x72,0x69,0x61,0x6c])][_0x345c84([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5756c1[_0x345c84([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x54492e/0x3e8:0xe10*_0x2438ba;return _0x5756c1[_0x345c84([0x65,0x78,0x70])]<_0x5a998f;}function _0x3ed39e(){const _0xf8c53f=_0x5756c1[_0x345c84([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0xf8c53f&&(!!_0xf8c53f[_0x345c84([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x345c84([0x2a]))||!!_0xf8c53f[_0x345c84([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x345c84([0x41,0x49])));}function _0x1bb930(){const _0x4fd776=_0x5756c1[_0x345c84([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x4fd776||0x0==_0x4fd776[_0x345c84([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x229e64}=new URL(window[_0x345c84([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x4fd776[_0x345c84([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x229e64))return!0x0;const _0x5c15a9=_0x229e64[_0x345c84([0x73,0x70,0x6c,0x69,0x74])](_0x345c84([0x2e]));return _0x4fd776[_0x345c84([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x5a8b74=>_0x5a8b74[_0x345c84([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x345c84([0x2a])))[_0x345c84([0x6d,0x61,0x70])](_0x1607e6=>_0x1607e6[_0x345c84([0x73,0x70,0x6c,0x69,0x74])](_0x345c84([0x2e])))[_0x345c84([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x44e9f0=>_0x44e9f0[_0x345c84([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x5c15a9[_0x345c84([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x345c84([0x6d,0x61,0x70])](_0x484c37=>Array(_0x5c15a9[_0x345c84([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x484c37[_0x345c84([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x345c84([0x66,0x69,0x6c,0x6c])](_0x484c37[0x0]===_0x345c84([0x2a])?_0x345c84([0x2a]):'')[_0x345c84([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x484c37))[_0x345c84([0x73,0x6f,0x6d,0x65])](_0x40846b=>_0x5c15a9[_0x345c84([0x65,0x76,0x65,0x72,0x79])]((_0x4c2ddd,_0x5f3c07)=>_0x40846b[_0x5f3c07]===_0x4c2ddd||_0x40846b[_0x5f3c07]===_0x345c84([0x2a])));}function _0xcc2864(){return _0x4fa052&&_0x203893?new window[(_0x345c84([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x4117eb,_0x19d42e)=>{_0x4fa052[_0x345c84([0x74,0x68,0x65,0x6e])](_0x4117eb,_0x19d42e),_0x203893[_0x345c84([0x74,0x68,0x65,0x6e])](_0x19cfc4=>{_0x19cfc4!=_0x345c84([0x56,0x61,0x6c,0x69,0x64])&&_0x4117eb(_0x19cfc4);},_0x19d42e);}):_0x4fa052||_0x203893||_0x345c84([0x56,0x61,0x6c,0x69,0x64]);}}function _0xfb08d(_0x37a516,_0x3c6919){return new window[(_0x345c84([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x194dfc=>{if(_0x5bad1d())return _0x194dfc(_0x345c84([0x56,0x61,0x6c,0x69,0x64]));_0x4a3c97(),_0x47018d[_0x345c84([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x345c84([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x14d95c=!0x1;const _0x15315f=_0x348b23();function _0x245f81(_0x28f2b0){return!!_0x28f2b0&&(typeof _0x28f2b0===_0x345c84([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x28f2b0===_0x345c84([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x28f2b0[_0x345c84([0x74,0x68,0x65,0x6e])]===_0x345c84([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x28f2b0[_0x345c84([0x63,0x61,0x74,0x63,0x68])]===_0x345c84([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x1f040f(_0x474ff5){_0x3f07d6(_0x474ff5)[_0x345c84([0x74,0x68,0x65,0x6e])](_0x24d527=>{if(!_0x24d527||_0x24d527[_0x345c84([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x345c84([0x6f,0x6b]))return _0x345c84([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x2160df(_0x3afe46(_0x15315f+_0x3c6919))!=_0x24d527[_0x345c84([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x345c84([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x345c84([0x56,0x61,0x6c,0x69,0x64]);})[_0x345c84([0x74,0x68,0x65,0x6e])](_0xee2b45=>(_0x3c9f82(),_0xee2b45),()=>{const _0x23dbe7=_0x4f37c0();return null==_0x23dbe7?(_0x3c9f82(),_0x345c84([0x56,0x61,0x6c,0x69,0x64])):_0x345c84(_0x54492e-_0x23dbe7>(0x17cd5fe7^_0x580cd7)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x345c84([0x74,0x68,0x65,0x6e])](_0x194dfc)[_0x345c84([0x63,0x61,0x74,0x63,0x68])](()=>{_0x194dfc(_0x345c84([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x3a87c9=0x33f73567^_0x580cd7;function _0x3c9f82(){const _0x17685e=_0x345c84([0x6c,0x6c,0x63,0x74,0x2d])+_0x2160df(_0x3afe46(_0x37a516)),_0x3a74da=_0x52741c(_0x2160df(window[_0x345c84([0x4d,0x61,0x74,0x68])][_0x345c84([0x63,0x65,0x69,0x6c])](_0x54492e/_0x3a87c9)));window[_0x345c84([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x345c84([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x17685e,_0x3a74da);}function _0x4f37c0(){const _0x41a753=_0x345c84([0x6c,0x6c,0x63,0x74,0x2d])+_0x2160df(_0x3afe46(_0x37a516)),_0x39409c=window[_0x345c84([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x345c84([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x41a753);return _0x39409c?window[_0x345c84([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x52741c(_0x39409c),0x10)*_0x3a87c9:null;}function _0x3f07d6(_0x16c22f){return new window[(_0x345c84([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x4c1826,_0x2de2a1)=>{_0x16c22f[_0x345c84([0x74,0x68,0x65,0x6e])](_0x4c1826,_0x2de2a1),window[_0x345c84([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x2de2a1,0x33c00f27^_0x580cd7);});}}_0x47018d[_0x345c84([0x6f,0x6e])](_0x345c84([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x39271e,_0x4d1339)=>{if(_0x4d1339[0x0]!=_0x37a516)return _0x194dfc(_0x345c84([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x4d1339[0x1]={..._0x4d1339[0x1],[_0x345c84([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x15315f};},{[_0x345c84([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x345c84([0x68,0x69,0x67,0x68])}),_0x47018d[_0x345c84([0x6f,0x6e])](_0x345c84([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x24ac99=>{_0x245f81(_0x24ac99[_0x345c84([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x14d95c=!0x0,_0x1f040f(_0x24ac99[_0x345c84([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x345c84([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x345c84([0x6c,0x6f,0x77])}),_0x5b8a4d[_0x345c84([0x74,0x68,0x65,0x6e])](()=>{_0x14d95c||_0x194dfc(_0x345c84([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x5bad1d(){return _0x47018d[_0x345c84([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x345c84([0x76,0x69,0x65,0x77])][_0x345c84([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x345c84([0x61,0x75,0x74,0x6f]);}function _0x4a3c97(){_0x47018d[_0x345c84([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x345c84([0x76,0x69,0x65,0x77])][_0x345c84([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x345c84([0x61,0x75,0x74,0x6f]);}}function _0x54bfba(_0x7d7075){const _0x3b3e43=[new window[(_0x345c84([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3b785d=>setTimeout(_0x3b785d,0x33c8e52b^_0x580cd7)),_0x5b8a4d[_0x345c84([0x74,0x68,0x65,0x6e])](()=>new window[(_0x345c84([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x1918e3=>{let _0x37a987=0x0;_0x47018d[_0x345c84([0x6d,0x6f,0x64,0x65,0x6c])][_0x345c84([0x6f,0x6e])](_0x345c84([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x292aad,_0x4c15d7)=>{_0x4c15d7[0x0][_0x345c84([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x37a987++,_0x37a987==(0x33c1da1f^_0x580cd7)&&(_0x1918e3(),_0x292aad[_0x345c84([0x6f,0x66,0x66])]());});}))];return window[_0x345c84([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x345c84([0x72,0x61,0x63,0x65])](_0x3b3e43)[_0x345c84([0x74,0x68,0x65,0x6e])](()=>_0x7d7075);}async function _0x5cc168(){await _0x5b8a4d,_0x47018d[_0x345c84([0x6d,0x6f,0x64,0x65,0x6c])][_0x345c84([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x47f4cd,_0x47018d[_0x345c84([0x6d,0x6f,0x64,0x65,0x6c])][_0x345c84([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x47f4cd,_0x47018d[_0x345c84([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x345c84([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x168970(_0x58ddec){const _0x4cfe4e=_0x308144();_0x47018d[_0x4cfe4e]=_0x345c84([0x61,0x69,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x58ddec,_0x58ddec!=_0x345c84([0x56,0x61,0x6c,0x69,0x64])&&_0x5cc168();}function _0x308144(){const _0x151a46=window[_0x345c84([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x345c84([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x345c84([0x6e,0x6f,0x77])]())[_0x345c84([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x345c84([0x2e]),'');let _0x5c9771=_0x345c84([0x66]);for(let _0x3d3f24=0x0;_0x3d3f24<_0x151a46[_0x345c84([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x3d3f24+=0x2){let _0x9f6b68=window[_0x345c84([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x151a46[_0x345c84([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x3d3f24,_0x3d3f24+0x2));_0x9f6b68>=_0xf2afe3[_0x345c84([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x9f6b68-=_0xf2afe3[_0x345c84([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x5c9771+=_0xf2afe3[_0x9f6b68];}return _0x5c9771;}function _0x421dcf(){const _0x6a025f=_0x55f19b[_0x345c84([0x73,0x70,0x6c,0x69,0x74])](_0x345c84([0x2e]));if(0x3!=_0x6a025f[_0x345c84([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x1c6731(_0x6a025f[0x1]);function _0x1c6731(_0x56949a){const _0x1d693e=_0x44c197(_0x56949a);return _0x1d693e&&_0x9b6401()?_0x1d693e:null;function _0x9b6401(){const _0x3c5343=_0x1d693e[_0x345c84([0x6a,0x74,0x69])],_0x3fa3b8=window[_0x345c84([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x3c5343[_0x345c84([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x3c5343[_0x345c84([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x5e97d2={..._0x1d693e,[_0x345c84([0x6a,0x74,0x69])]:_0x3c5343[_0x345c84([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x3c5343[_0x345c84([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x5e97d2[_0x345c84([0x76,0x63])],_0x3afe46(_0x5e97d2)==_0x3fa3b8;}}}async function _0x471d3b(){let _0x4be859=!0x0;try{const _0x5ce912=_0x55f19b[_0x345c84([0x73,0x70,0x6c,0x69,0x74])](_0x345c84([0x2e])),[_0x1cae5b,_0x51339b,_0x3dca58]=_0x5ce912;return _0x586185(_0x1cae5b),await _0x4190a5(_0x1cae5b,_0x51339b,_0x3dca58),_0x4be859;}catch{return!0x1;}function _0x586185(_0x513d90){const _0x466b07=_0x44c197(_0x513d90);_0x466b07&&_0x466b07[_0x345c84([0x61,0x6c,0x67])]==_0x345c84([0x45,0x53,0x32,0x35,0x36])||(_0x4be859=!0x1);}async function _0x4190a5(_0x4f9714,_0x54c855,_0x22a6d9){const _0x49159d=window[_0x345c84([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x345c84([0x66,0x72,0x6f,0x6d])](_0x3a6ff0(_0x22a6d9),_0x4ec997=>_0x4ec997[_0x345c84([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x36aa78=new window[(_0x345c84([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x345c84([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x4f9714+_0x345c84([0x2e])+_0x54c855),_0x1d72a7=window[_0x345c84([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x345c84([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x1d72a7)return;const _0x23a362=await _0x1d72a7[_0x345c84([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x345c84([0x6a,0x77,0x6b]),_0x2baaa3,{[_0x345c84([0x6e,0x61,0x6d,0x65])]:_0x345c84([0x45,0x43,0x44,0x53,0x41]),[_0x345c84([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x345c84([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x345c84([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x1d72a7[_0x345c84([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x345c84([0x6e,0x61,0x6d,0x65])]:_0x345c84([0x45,0x43,0x44,0x53,0x41]),[_0x345c84([0x68,0x61,0x73,0x68])]:{[_0x345c84([0x6e,0x61,0x6d,0x65])]:_0x345c84([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x23a362,_0x49159d,_0x36aa78)||(_0x4be859=!0x1);}}function _0x44c197(_0x47cf8d){return _0x47cf8d[_0x345c84([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x345c84([0x65,0x79]))?JSON[_0x345c84([0x70,0x61,0x72,0x73,0x65])](_0x3a6ff0(_0x47cf8d)):null;}function _0x3a6ff0(_0x32c747){return window[_0x345c84([0x61,0x74,0x6f,0x62])](_0x32c747[_0x345c84([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x345c84([0x2b]))[_0x345c84([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x345c84([0x2f])));}function _0x3afe46(_0x271c48){let _0x5e994e=0x1505;function _0xe4d4ce(_0x363b02){for(let _0x4a38e9=0x0;_0x4a38e9<_0x363b02[_0x345c84([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x4a38e9++){const _0x50f23d=_0x363b02[_0x345c84([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x4a38e9);_0x5e994e=(_0x5e994e<<0x5)+_0x5e994e+_0x50f23d,_0x5e994e&=_0x5e994e;}}function _0x4fd3d6(_0x15cadf){Array[_0x345c84([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x15cadf)?_0x15cadf[_0x345c84([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x4fd3d6):_0x15cadf&&typeof _0x15cadf==_0x345c84([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x345c84([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x15cadf)[_0x345c84([0x73,0x6f,0x72,0x74])]()[_0x345c84([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x16b478,_0x493e37])=>{_0xe4d4ce(_0x16b478),_0x4fd3d6(_0x493e37);}):_0xe4d4ce(window[_0x345c84([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x15cadf));}return _0x4fd3d6(_0x271c48),_0x5e994e>>>0x0;}function _0x2160df(_0x52daa9){return _0x52daa9[_0x345c84([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x345c84([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x345c84([0x30]));}function _0x52741c(_0x4798cd){return _0x4798cd[_0x345c84([0x73,0x70,0x6c,0x69,0x74])]('')[_0x345c84([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x345c84([0x6a,0x6f,0x69,0x6e])]('');}function _0x47f4cd(){}function _0x345c84(_0x20553b){return _0x20553b['map'](_0x4b3221=>String['fromCharCode'](_0x4b3221))['join']('');}_0x168970(await _0x11a91d());}(this);}['showFakeVisualSelection'](){const _0x3fcf64=this['editor']['model'];_0x3fcf64['change'](_0x57a904=>{const _0x4e7b87=_0x3fcf64['document']['selection']['getRanges']();let _0x4ea240=0x0;for(const _0x90538d of _0x4e7b87){const _0x36e3ae=w+':'+_0x4ea240;if(_0x3fcf64['markers']['has'](_0x36e3ae))_0x57a904['updateMarker'](_0x36e3ae,{'range':_0x90538d});else{if(_0x90538d['start']['isAtEnd']){const _0x25820c=_0x90538d['start']['getLastMatchingPosition'](({item:_0x3b4c1f})=>!_0x3fcf64['schema']['isContent'](_0x3b4c1f),{'boundaries':_0x90538d});_0x57a904['addMarker'](_0x36e3ae,{'usingOperation':!0x1,'affectsData':!0x1,'range':_0x57a904['createRange'](_0x25820c,_0x90538d['end'])});}else _0x57a904['addMarker'](_0x36e3ae,{'usingOperation':!0x1,'affectsData':!0x1,'range':_0x90538d});}_0x4ea240++;}});}['hideFakeVisualSelection'](){const _0x339a9e=this['editor']['model'],_0x3e58e8=Array['from'](this['editor']['model']['markers']['getMarkersGroup'](w));_0x3e58e8['length']&&_0x339a9e['change'](_0x49bbc1=>{_0x3e58e8['forEach'](_0x2ee2a1=>{_0x49bbc1['removeMarker'](_0x2ee2a1);});});}['insertContent'](_0x58e362,_0x3cddd0){const _0x4d807b=this['_getAISelection'](),_0x575c02=_0x3cddd0||_0x4d807b['getFirstRange']();this['editor']['model']['canEditAt'](_0x575c02)&&this['editor']['model']['change'](_0x4fb047=>{this['hideFakeVisualSelection'](),_0x3cddd0||this['_resetContentOfSelectedTableCells'](_0x4fb047,_0x4d807b),this['_pasteHTMLUsingClipboard']({'insertAt':_0x575c02,'writer':_0x4fb047,'html':_0x58e362});});}['insertContentBelow'](_0x524972){const {model:_0x401d60}=this['editor'],_0x5dc94c=this['_getAISelection']();_0x401d60['change'](()=>{const _0x5b6d4a=this['_prepareTableInsertBelowPosition'](_0x524972,_0x5dc94c)||this['_getDefaultInsertBelowPosition'](_0x5dc94c);this['insertContent'](_0x524972,_0x5b6d4a);});}['_getAISelection'](){const _0x57a452=this['editor']['model'],_0x32df2a=Array['from'](_0x57a452['markers']['getMarkersGroup'](w))['map'](_0x4c8d0a=>_0x4c8d0a['getRange']());return _0x57a452['createSelection'](_0x32df2a);}['_pasteHTMLUsingClipboard']({writer:_0x509d79,html:_0x114d77,insertAt:_0xa176a4}){const {view:_0x4e8998}=this['editor']['editing'],_0x53af04=this['editor']['plugins']['get'](_0x15d4b1),_0x5557e9=new gt();_0x5557e9['setData']('text/html',_0x114d77);const _0x489d12=new ClipboardEvent('paste',{'clipboardData':_0x5557e9}),_0x28f3d1=new _0x26acc9(_0x4e8998,_0x489d12,{'dataTransfer':new _0x144e81(_0x5557e9)});_0x509d79['setSelection'](_0xa176a4);const _0x1c193f=(_0x579915,_0x2c9b1a)=>{_0x2c9b1a['resultRange']&&_0x509d79['setSelection'](_0x2c9b1a['resultRange']);};_0x53af04['once']('contentInsertion',_0x1c193f,{'priority':'lowest'}),_0x4e8998['document']['fire']('paste',_0x28f3d1),_0x53af04['off']('contentInsertion',_0x1c193f);}['_getDefaultInsertBelowPosition'](_0x210337){const {model:_0x4d6dda}=this['editor'],_0x4748ee=Array['from'](_0x210337['getSelectedBlocks']());return _0x4748ee['length']?_0x4d6dda['createPositionAfter'](_0x4748ee['pop']()):_0x210337['getLastPosition']();}['_prepareTableInsertBelowPosition'](_0x6a499b,_0x26ba02){const {model:_0x47490c,plugins:_0x10b293}=this['editor'];if(_0x10b293['has']('TableUtils')){const _0x2137ec=_0x10b293['get']('TableUtils')['getSelectedTableCells'](_0x26ba02);if(_0x2137ec['length']){const _0x4cbf10=this['_getTableRowCountFromContent'](_0x6a499b),_0x121419=this['_createEmptyTableRows'](_0x2137ec,_0x4cbf10);return _0x47490c['createPositionAt'](_0x121419,0x0);}}return null;}['_getTableRowCountFromContent'](_0x1031cf){const _0x4a36cb=this['editor']['plugins']['get']('TableUtils'),_0x58a1fa=this['editor']['data']['parse'](_0x1031cf),_0x20bc87=Array['from'](_0x58a1fa['getChildren']())['filter'](_0x212551=>_0x212551['is']('element','table'));let _0xb74bad=0x0;return _0x20bc87['forEach'](_0x50e3e4=>{_0xb74bad+=_0x4a36cb['getRows'](_0x50e3e4);}),_0xb74bad;}['_createEmptyTableRows'](_0x17cfb6,_0x42e1a6){const _0x4db717=this['editor']['plugins']['get']('TableUtils'),_0x368f42=_0x4db717['getRowIndexes'](_0x17cfb6),_0x2d409c=_0x4db717['getColumnIndexes'](_0x17cfb6),_0x5f4ca4=_0x368f42['last']+0x1,_0x3d900a=_0x2d409c['first'],_0x494abb=_0x17cfb6[0x0]['findAncestor']('table');for(let _0x3c4b35=0x0;_0x3c4b35<_0x42e1a6;_0x3c4b35++)_0x4db717['insertRows'](_0x494abb,{'at':_0x5f4ca4});return _0x494abb['getChild'](_0x5f4ca4)['getChild'](_0x3d900a);}['_resetContentOfSelectedTableCells'](_0x2ed9ed,_0x4a09ae){const {plugins:_0x28765c}=this['editor'],{model:_0x38a352}=_0x2ed9ed;if(!_0x28765c['has']('TableUtils'))return;_0x28765c['get']('TableUtils')['getSelectedTableCells'](_0x4a09ae)['length']&&_0x38a352['deleteContent'](_0x4a09ae);}}class x extends _0x47d13d{static get['pluginName'](){return'AIAdapter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['afterInit'](){if(!this['textAdapter'])throw new _0x18ef2b('aiadapter-text-adapter-not-set',null);}}class R extends Error{constructor(_0x5e3a9a){super(_0x5e3a9a),this['name']='AIRequestError';}}function i(_0x28a876,_0x3e476b,_0x1a815e){const t=_0x28a876['t'];switch(_0x3e476b){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',_0x1a815e);case'Error\x20during\x20AI\x20content\x20generation:\x20%0':return t('Error\x20during\x20AI\x20content\x20generation:\x20%0',_0x1a815e);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'},_0x1a815e);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 _0x3e476b;}}class E extends _0x3bf151{['_commandDefinitions'];constructor(_0x4d8453,_0x542ccf){super(_0x4d8453),this['_commandDefinitions']=_0x542ccf,this['set']('enabledCommandsIds',[]),this['on']('change:_hasContext',(_0x3a076d,_0x884e49,_0x36c5da)=>{this['isEnabled']&&(this['enabledCommandsIds']=F(this['_commandDefinitions'],_0x36c5da));}),this['set']('_hasContext',!0x1),this['on']('change:isEnabled',(_0x444a9e,_0x48fa48,_0x68595a)=>{this['enabledCommandsIds']=_0x68595a?F(this['_commandDefinitions'],this['_hasContext']):[];});}['refresh'](){const _0x250519=this['editor']['model'];this['_hasContext']=function(_0x11fcb8){const _0x59945f=_0x11fcb8['document']['selection'];return _0x59945f['isCollapsed']?0x0!==[..._0x59945f['getSelectedBlocks']()]['length']&&![..._0x59945f['getSelectedBlocks']()][0x0]['isEmpty']:!!_0x11fcb8['hasContent'](_0x59945f['getFirstRange']());}(_0x250519);const _0x58f7fc=_0x250519['document']['selection'],_0xf82f9f=this['editor']['config']['get']('ai.aiAssistant.disabledElements');for(const _0x555624 of _0x58f7fc['getRanges']())for(const _0x502df4 of _0x555624['getItems']())if(_0x502df4['is']('element')&&_0xf82f9f['includes'](_0x502df4['name']))return void(this['isEnabled']=!0x1);this['isEnabled']=!0x0;}['execute'](_0x23ce6a='',_0x1c0fc9='',_0x3c3247='custom'){this['editor']['plugins']['get'](n)['showUI'](_0x23ce6a,_0x1c0fc9,_0x3c3247);}}function F(_0x12fc60,_0x2a605e){const _0x1331c2=new Set();for(const _0x1aa942 of _0x12fc60['values']())(_0x2a605e||!0x1===_0x1aa942['requiresContent'])&&_0x1331c2['add'](_0x1aa942['id']);return Array['from'](_0x1331c2);}const Q=new RegExp(/^(.*?)<[a-zA-Z][a-zA-Z0-9_\-.]*[ >]/,'is');class j extends/* #__PURE__ -- @preserve */
24
- _0x5733b6(){['editor'];['textAdapter'];['view'];['_sanitizationContainer'];['_domParser'];['_xmlSerializer'];constructor(_0x9f9e47,_0x5c27d5,_0x4bc4b7){super(),this['editor']=_0x9f9e47,this['textAdapter']=_0x5c27d5,this['_sanitizationContainer']=document['createElement']('div'),this['_domParser']=new DOMParser(),this['_xmlSerializer']=new XMLSerializer(),this['view']=_0x4bc4b7,this['set']({'initialContext':'','currentContext':'','currentResponse':'','previousContext':void 0x0,'previousQuery':void 0x0,'previousLabel':void 0x0,'isProcessing':!0x1}),this['on']('set:currentContext',(_0x10d24f,_0x29f8a5,_0x89052f)=>{this['view']['value']=this['_sanitizeHTML'](_0x89052f);}),this['listenTo'](this['view'],'submitPrompt',(_0x3a3208,_0x396377)=>{const _0x287faa=this['currentContext']||this['initialContext'];this['_handleQuery'](_0x396377,_0x287faa,'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:_0x56bc16,query:_0x3af559,htmlContent:_0xb86881,label:_0x1af13b,mainActionLabel:_0xfcb28e}){this['view']['prompt']=_0x1af13b,this['view']['mainAction']=_0xfcb28e,this['initialContext']=_0xb86881,_0x3af559&&(this['view']['isRendered']?this['_handleQuery'](_0x3af559,_0xb86881,_0x56bc16,_0x1af13b):this['view']['once']('render',()=>{this['_handleQuery'](_0x3af559,_0xb86881,_0x56bc16,_0x1af13b);}));}['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'](_0x477ab4,_0x1b0461,_0x4e3d88,_0x432e88){return this['isProcessing']=!0x0,this['view']['startProcessing'](),this['previousContext']=_0x1b0461,this['previousQuery']=_0x477ab4,this['previousLabel']=_0x432e88||_0x477ab4,this['previousActionId']=_0x4e3d88,new Promise(_0x34caef=>{this['textAdapter']['makeRequest']({'query':_0x477ab4,'context':_0x1b0461,'onData':_0xdd68b7=>{this['currentResponse']=_0xdd68b7,this['currentContext']=this['_parseAndNormalizeContent'](this['currentResponse']);},'actionId':_0x4e3d88})['then'](()=>{!this['currentContext']&&this['currentResponse']&&(this['currentContext']=this['_parseAndNormalizeContent'](this['currentResponse'],!0x0));})['catch'](_0x542a07=>{_0x542a07 instanceof R?this['view']['handleError'](_0x542a07['message']):this['view']['handleError'](),_0x34caef();})['finally'](()=>{this['stopProcessing'](),_0x34caef();});});}['_parseAndNormalizeContent'](_0x4948f0,_0x6a2ba0=!0x1){const _0x8c02aa=Q['exec'](_0x4948f0);_0x4948f0=_0x8c02aa?_0x4948f0['substring'](_0x8c02aa[0x1]['length']):_0x4948f0['length']<0x64&&!_0x6a2ba0?'':this['_stripMarkdownSyntax'](_0x4948f0);const _0xd5b2ce=this['_domParser']['parseFromString'](_0x4948f0,'text/html');if(_0x8c02aa){const _0x2a87cd=Array['from'](_0xd5b2ce['body']['childNodes']);_0x2a87cd['reverse']();for(const _0x11215c of _0x2a87cd){if(_0x11215c['nodeType']==Node['ELEMENT_NODE'])break;_0x11215c['remove']();}}const _0x403f13=this['editor']['data']['processor']['toView'](this['_xmlSerializer']['serializeToString'](_0xd5b2ce['body']));this['_isH1TagSupportEnabled']()||this['_normalizeResponseHeadings'](_0x403f13);const _0x5dafbc=this['editor']['config']['get']('ai.aiAssistant.preserveComments'),_0x2cfdf7=this['editor']['data']['toModel'](_0x403f13);return _0x5dafbc||_0x2cfdf7['markers']['clear'](),this['editor']['data']['stringify'](_0x2cfdf7);}['_normalizeResponseHeadings'](_0x1423e9){const _0x50f78e=new _0x5f329a(this['editor']['editing']['view']['document']),_0x4d13be=new _0x2033b0({'name':/^h[1-5]$/}),_0x5ed474=[];let _0x5aa951=!0x1;for(const _0x1e1fde of _0x1423e9)_0x1e1fde['is']('element')&&_0x4d13be['match'](_0x1e1fde)&&(_0x5ed474['push'](_0x1e1fde),'h1'==_0x1e1fde['name']&&(_0x5aa951=!0x0));if(_0x5aa951){for(const _0x574c1b of _0x5ed474)_0x50f78e['rename']('h'+(parseInt(_0x574c1b['name'][0x1])+0x1),_0x574c1b);}}['_isH1TagSupportEnabled'](){const {data:_0x56959d,editing:_0xf36f55}=this['editor'],_0x4dd071=_0x56959d['htmlProcessor']['toView']('<h1></h1>'),_0x7cbf27=_0x56959d['toView'](_0x56959d['toModel'](_0x4dd071));return!!_0xf36f55['view']['domConverter']['viewToDom'](_0x7cbf27)['querySelector']('h1');}['_sanitizeHTML'](_0x5cd6a1){return this['editor']['editing']['view']['domConverter']['setContentOf'](this['_sanitizationContainer'],_0x5cd6a1),this['_sanitizationContainer']['innerHTML'];}['_stripMarkdownSyntax'](_0xc40564){const _0x16cd32=_0xc40564['trim']();return _0x16cd32['startsWith']('```html')?_0x16cd32['endsWith']('```')?_0x16cd32['substring'](0x7,_0x16cd32['length']-0x3):_0x16cd32['substring'](0x7):_0xc40564;}}const _={'REPLACE':'replace','INSERT':'insert'};class at extends ot{constructor(_0x1276bf){super(_0x1276bf),this['set']('isVisible',!0x1),this['set']('mainAction',_['REPLACE']),this['replaceButton']=this['_createButton']('','ck-button-action'),this['replaceButton']['bind']('label')['to'](this,'mainAction',_0x1d0c4c=>i(_0x1276bf,'AI_'+_0x1d0c4c['toUpperCase']()+'_CONTENT')),this['insertButton']=this['_createButton'](i(_0x1276bf,'Insert\x20below')),this['tryAgainButton']=this['_createButton'](i(_0x1276bf,'Try\x20again')),this['stopButton']=this['_createButton'](i(_0x1276bf,'Stop'));const _0x12a2ff=this['bindTemplate'];this['extendTemplate']({'attributes':{'class':['ck-ai-form__toolbar',_0x12a2ff['if']('isVisible','ck-hidden',_0x37f466=>!_0x37f466)]}}),this['items']['addMany']([this['replaceButton'],this['insertButton'],this['tryAgainButton'],this['stopButton']]);}['_createButton'](_0x5797bd,_0xea3c51){const _0x233539=new _0x2db44c(this['locale']);return _0x233539['set']({'label':_0x5797bd,'class':_0xea3c51||'','isVisible':!0x0,'withText':!0x0}),_0x233539;}}class ct extends _0x3bf81d{['contentFieldView'];['copyButtonView'];constructor(_0x1846b7,_0x48a81b=''){super(_0x1846b7),this['set']({'value':null,'isVisible':!0x1,'isProcessing':!0x1});const _0x40961c=this['bindTemplate'];this['contentFieldView']=new bt(_0x1846b7,_0x48a81b),this['copyButtonView']=this['_createCopyButton'](),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form__content-area-wrapper',_0x40961c['if']('isVisible','ck-hidden',_0x15e0b6=>!_0x15e0b6)],'tabindex':'-1'},'children':[{'tag':'div','attributes':{'class':['ck','ck-ai-form__content-area',_0x40961c['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 _0x1bf28d=!0x1;this['on']('change:value',(_0x1d8438,_0x42502b,_0x13c0ec)=>{const _0x53a1c7=!this['contentFieldView']['element']['querySelector']('.ck-ai-form__loader');this['contentFieldView']['setContent'](_0x13c0ec),this['isProcessing']&&_0x53a1c7&&!_0x1bf28d&&this['element']['scrollTo']({'top':this['element']['scrollHeight'],'behavior':'smooth'});}),this['on']('change:isProcessing',(_0x40439e,_0x54b99d,_0x2a63f3)=>{_0x1bf28d=!0x1,_0x2a63f3?(this['value']=null,this['contentFieldView']['appendLoader']()):this['value']||this['contentFieldView']['setContent']('');}),this['listenTo'](this['element'],'wheel',()=>{_0x1bf28d=!0x0;}),this['listenTo'](this['element'],'mousedown',()=>{_0x1bf28d=!0x0;});}['focus'](){this['element']['focus']();}['_createCopyButton'](){const _0x3bd525=this['locale'],_0x146f7d=new _0x2db44c(this['locale']),_0x12a07c='ck-ai-form__copy-button';return _0x146f7d['set']({'label':i(_0x3bd525,'Copy'),'icon':_0x530858,'class':_0x12a07c,'tooltip':!0x0}),_0x146f7d['bind']('isVisible')['to'](this,'value',_0x516b52=>!!_0x516b52),_0x146f7d['bind']('isEnabled')['to'](this,'isProcessing',_0x7bdb3d=>!_0x7bdb3d),_0x146f7d['on']('execute',()=>{this['_copyHTMLToClipboard'](this['contentFieldView']['element']),_0x146f7d['icon']=_0x534137,_0x146f7d['class']=_0x12a07c+'\x20ck-ai-form__copy-button--copied',this['focus'](),setTimeout(()=>{_0x146f7d['icon']=_0x530858,_0x146f7d['class']=_0x12a07c;},0x3e8);}),_0x146f7d;}['_copyHTMLToClipboard'](_0x5a2522){const {window:_0x116a1b,document:_0x462cf4}=_0x542910;if(_0x116a1b['ClipboardItem']){const {Blob:_0x1b85ac,ClipboardItem:_0x4ad2d7}=_0x116a1b,_0x52b5c4=[new _0x4ad2d7({'text/html':new _0x1b85ac([_0x5a2522['innerHTML']],{'type':'text/html'}),'text/plain':new _0x1b85ac([_0x5a2522['textContent']||''],{'type':'text/plain'})})];navigator['clipboard']['write'](_0x52b5c4);}else{const _0x463a4e=_0x462cf4['createElement']('div');_0x463a4e['style']['position']='absolute',_0x463a4e['style']['left']='-9999px',_0x463a4e['innerHTML']='<span>[</span>'+_0x5a2522['innerHTML']+'<span>]</span>',_0x462cf4['body']['appendChild'](_0x463a4e);const _0x1784c9=_0x462cf4['createRange']();_0x1784c9['setStartAfter'](_0x463a4e['firstElementChild']),_0x1784c9['setEndBefore'](_0x463a4e['lastElementChild']);const _0x4a7993=_0x116a1b['getSelection']();_0x4a7993['removeAllRanges'](),_0x4a7993['addRange'](_0x1784c9),_0x462cf4['execCommand']('copy'),_0x463a4e['remove']();}}}class bt extends _0x3bf81d{constructor(_0x3986ea,_0x44af22=''){super(_0x3986ea),this['loaderView']=this['_createLoader'](),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-content',_0x44af22,'ck-reset_all-excluded','ck-ai-form__content-field']}});}['setContent'](_0x3371a1){this['element']['innerHTML']=_0x3371a1;}['appendLoader'](){this['element']['appendChild'](this['loaderView']['element']);}['_createLoader'](){const _0x241a0f=new _0x3bf81d(),_0xfe43a6=this['locale'],_0x3c152c=new _0x392235();return _0x3c152c['isVisible']=!0x0,_0x241a0f['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form__loader']},'children':[_0x3c152c,{'text':i(_0xfe43a6,'AI\x20is\x20writing...')}]}),_0x241a0f['render'](),_0x241a0f;}}class mt extends _0x3bf81d{constructor(_0x2aa159,_0x142130=''){super(_0x2aa159);const _0x326734=new _0x33f119(),_0x3711a9=this['bindTemplate'];this['set']('text',_0x142130),_0x326734['content']=_0x3145a9,this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form__error']},'children':[_0x326734,{'text':_0x3711a9['to']('text')}]});}}class lt extends st{['submitButtonView'];['showHistoryButtonView'];constructor(_0x59a644,_0x3abc98){super(_0x59a644,_0x3abc98),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',(_0x3124a6,_0x1c3b65)=>{_0x3124a6['target']==this['queryView']['fieldView']['element']&&(this['submit'](),_0x1c3b65());});}['_createSubmitButton'](){const _0x5d0569=new _0x2db44c(this['locale']),_0x45ac95=this['locale'];return _0x5d0569['set']({'icon':it,'label':i(_0x45ac95,'Submit'),'isVisible':!0x0,'tooltip':!0x0,'class':'ck-ai-form__submit'}),_0x5d0569['on']('execute',()=>{this['submit']();}),_0x5d0569['bind']('isEnabled')['to'](this['queryView']['fieldView'],'isEmpty',this,'isEnabled',(_0x2ee219,_0x48b82d)=>!_0x2ee219&&_0x48b82d),_0x5d0569;}['_createShowHistoryButton'](){const _0x4d9503=new _0x2db44c(this['locale']),_0x56c6d8=this['resultsView'],_0x40088d=this['locale'];_0x4d9503['set']({'label':i(_0x40088d,'History'),'withText':!0x1,'icon':tt,'tooltip':!0x0,'tooltipPosition':'sw','class':'ck-ai-form__toggle-history'}),_0x4d9503['bind']('isOn')['to'](_0x56c6d8,'isVisible'),_0x4d9503['bind']('isEnabled')['to'](this,'isEnabled'),_0x4d9503['on']('execute',()=>{_0x56c6d8['isVisible']=!_0x56c6d8['isVisible'],_0x56c6d8['isVisible']?this['filteredView']['focus']():this['focus']();});const _0x5724bf=()=>{_0x542910['window']['requestAnimationFrame'](()=>{if(_0x159f09(this['element'])){const _0x5ca945=new _0x37fb03(this['queryView']['fieldView']['element']),_0x4f9aa3=_0x5ca945['width'],_0x382ede='rtl'===_0x40088d['uiLanguageDirection']?'left':'right';_0x5ca945['excludeScrollbarsAndBorders'](),_0x4d9503['element']['style'][_0x382ede]=_0x4f9aa3-_0x5ca945['width']+0x1+'px';}});};return this['queryView']['fieldView']['on']('update',_0x5724bf),this['on']('render',_0x5724bf),_0x4d9503;}['submit'](){const _0x3c25ad=this['queryView']['fieldView']['element']['value'];this['fire']('submit',_0x3c25ad);}['focus'](_0x55d025){-0x1===_0x55d025?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}}class pt extends yt{['historyGroupView'];['clearHistoryButton'];constructor(_0x2a06b9){super(_0x2a06b9),this['clearHistoryButton']=this['_createClearHistoryButton'](),this['historyGroupView']=new Ct(),this['historyGroupView']['children']['add'](this['clearHistoryButton'],0x1),this['historyGroupView']['label']=i(_0x2a06b9,'Prompt\x20history'),this['historyGroupView']['items']['delegate']('execute')['to'](this),this['items']['add'](this['historyGroupView']);}['filter'](){let _0x363606=0x0;for(const _0x445822 of this['items'])_0x363606+=_0x445822['items']['length'];return{'resultsCount':_0x363606,'totalItemsCount':_0x363606};}['_createClearHistoryButton'](){const _0x3597c6=this['locale'],_0x5b695d=new _0x2db44c(this['locale']);return _0x5b695d['set']({'label':'('+i(_0x3597c6,'Clear')+')','withText':!0x0}),_0x5b695d['on']('execute',()=>this['fire']('clearHistory')),_0x5b695d;}}class ut extends xt{constructor(_0x5c4b6d){super();const _0x3073f0=new wt(),_0x1ee4b5=new _0x2db44c(this['locale'],_0x3073f0);this['children']['add'](_0x1ee4b5),_0x1ee4b5['set']({'label':_0x5c4b6d['prompt'],'withText':!0x0}),_0x1ee4b5['on']('execute',()=>{this['fire']('execute',{'value':kt(_0x5c4b6d['prompt'])});});}}const ts='CKEditor/AIFormView/PromptHistory';class dt extends _0x1b4047{constructor(){super(),this['_loadFromSessionStorage'](),this['on']('add',(_0x4b77d6,_0x151fb4)=>{const _0x27c591=os(_0x151fb4['prompt']);for(const _0x5ce5e9 of this)if(_0x5ce5e9!=_0x151fb4&&os(_0x5ce5e9['prompt'])===_0x27c591){this['remove'](_0x5ce5e9);break;}this['length']>0x14&&this['remove'](this['last']),this['_saveToSessionStorage']();}),this['on']('remove',()=>{this['_saveToSessionStorage']();});}['_loadFromSessionStorage'](){const _0x50f515=sessionStorage['getItem'](ts)||'[]';this['addMany'](JSON['parse'](_0x50f515));}['_saveToSessionStorage'](){sessionStorage['setItem'](ts,JSON['stringify'](this['map'](_0x310e08=>_0x310e08)));}}function os(_0xe8464c){return _0xe8464c['toLowerCase']()['trim']();}class k extends _0x3bf81d{['focusTracker'];['keystrokes'];['contentArea'];['toolbar'];['promptView'];['errorView'];['_focusables'];['focusCycler'];['_promptHistory'];constructor(_0x2afda3,_0x1c8e40,_0x239857=''){super(_0x2afda3),this['set']('isEnabled',!0x0),this['set']('isProcessing',!0x1),this['set']('prompt',''),this['set']('value',''),this['set']('isError',!0x1),this['set']('mainAction',_['REPLACE']),this['_promptHistory']=new dt(),this['errorView']=new mt(_0x2afda3),this['contentArea']=new ct(_0x2afda3,_0x239857),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 et(),this['keystrokes']=new rt(),this['_focusables']=this['createCollection']([this['contentArea'],this['contentArea']['copyButtonView'],this['toolbar'],this['promptView']]),this['focusCycler']=new ht({'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 _0x3be2bd=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form',_0x1c8e40],'tabindex':'-1'},'children':[{'tag':'div','attributes':{'class':['ck','ck-ai-form-content']},'children':[{'tag':'div','attributes':{'class':[_0x3be2bd['if']('isError','ck-hidden',_0x3a049c=>!_0x3a049c)]},'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'](_0xc9d84a=0x1){-0x1===_0xc9d84a?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 _0x1161d9=this['locale'],_0x4a52da=new lt(_0x1161d9,{'queryView':{'label':i(_0x1161d9,'Ask\x20AI\x20to\x20edit\x20or\x20generate'),'creator':nt,'showIcon':!0x1,'showResetButton':!0x1},'infoView':{'text':{'noSearchableItems':{'primary':i(_0x1161d9,'Empty\x20history'),'secondary':i(_0x1161d9,'Ask\x20AI\x20and\x20your\x20prompts\x20will\x20be\x20listed\x20here\x20for\x20you\x20to\x20use\x20later.')}}},'filteredView':this['_createHistoryView'](),'queryMinChars':0x1/0x0,'resetOnBlur':!0x1});return _0x4a52da['bind']('isEnabled')['to'](this,'isEnabled',this,'isProcessing',(_0x2e7653,_0x55b602)=>_0x2e7653&&!_0x55b602),this['listenTo'](_0x4a52da,'submit',(_0x26fb05,_0x6593b4)=>{this['prompt']=_0x6593b4;const _0xfa7fdb=ft(_0x6593b4);this['fire']('submitPrompt',_0xfa7fdb),_0x6593b4['trim']()&&this['_promptHistory']['add']({'prompt':_0xfa7fdb},0x0);},{'priority':'high'}),_0x4a52da;}['_createHistoryView'](){const _0x335abb=new pt(this['locale']);return _0x335abb['historyGroupView']['items']['bindTo'](this['_promptHistory'])['as'](ut),_0x335abb['on']('clearHistory',()=>{this['_promptHistory']['clear'](),this['promptView']['search'](''),this['promptView']['focus']();}),_0x335abb;}['_createToolbar'](){const _0xbe1ebb=new at(this['locale']);return _0xbe1ebb['replaceButton']['bind']('isEnabled')['to'](this,'isEnabled',this,'isProcessing',this,'value',(_0x5f2d86,_0x38a258,_0x12ed43)=>_0x5f2d86&&!_0x38a258&&!!_0x12ed43),_0xbe1ebb['replaceButton']['delegate']('execute')['to'](this,'replaceContent'),_0xbe1ebb['insertButton']['bind']('isEnabled')['to'](this,'isEnabled',this,'isProcessing',this,'value',(_0xf1dd68,_0x5b4fd8,_0x5260a5)=>_0xf1dd68&&!_0x5b4fd8&&!!_0x5260a5),_0xbe1ebb['insertButton']['delegate']('execute')['to'](this,'insertContentBelow'),_0xbe1ebb['tryAgainButton']['bind']('isEnabled')['to'](this,'isEnabled',this,'isProcessing',(_0x4f8c7f,_0x212632)=>_0x4f8c7f&&!_0x212632),_0xbe1ebb['tryAgainButton']['delegate']('execute')['to'](this,'tryAgainEvent'),_0xbe1ebb['stopButton']['bind']('isEnabled')['to'](this,'isProcessing'),_0xbe1ebb['stopButton']['delegate']('execute')['to'](this,'stopProcessing'),_0xbe1ebb;}['startProcessing'](){this['value']='',this['isError']=!0x1,this['isProcessing']=!0x0,this['contentArea']['isVisible']=!0x0,this['toolbar']['isVisible']=!0x0,this['contentArea']['focus']();}['finishProcessing'](){const _0x146c70=this['locale'];this['isProcessing']=!0x1,this['prompt']='',this['promptView']['reset'](),this['value']&&(this['promptView']['queryView']['label']=i(_0x146c70,'Ask\x20AI\x20to\x20improve\x20generated\x20text'));}['handleError'](_0x1d5f5a){const _0x52c7b5=this['locale'];this['finishProcessing'](),this['isError']=!0x0,this['errorView']['text']=_0x1d5f5a||i(_0x52c7b5,'AI_ERROR_FAILED'),this['value']||(this['contentArea']['isVisible']=!0x1);}}const l=globalThis['DataTransfer'];class n extends _0x47d13d{['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[_0xf4919e,a,x,_0x3f999e];}constructor(_0x497d3d){super(_0x497d3d),_0x497d3d['config']['define']('ai.aiAssistant.disabledElements',['media','rawHtml','tableOfContents']),_0x497d3d['config']['define']('ai.aiAssistant.contentAreaCssClass',''),_0x497d3d['config']['define']('ai.useTheme',!0x0),this['_uiCssClasses']='ck-ai-assistant-ui'+(_0x497d3d['config']['get']('ai.useTheme')?'\x20ck-ai-assistant-ui_theme':'');}['init'](){const {editor:_0x3d9edb}=this;this['_aiAdapter']=_0x3d9edb['plugins']['get'](x),this['_dialog']=_0x3d9edb['plugins']['get'](_0x3f999e),this['_formView']=null,this['_commandDefinitions']=this['_getResolvedCommandsDefinitions']();const _0x3a1452=new E(_0x3d9edb,Array['from'](this['_commandDefinitions']['values']()));_0x3d9edb['commands']['add']('showAIAssistant',_0x3a1452),_0x3d9edb['ui']['componentFactory']['add']('aiCommands',_0x35ef80=>{const _0xd4865d=_0x4275aa(_0x35ef80);return _0xd4865d['set']({'class':'ck-ai-commands-dropdown\x20'+this['_uiCssClasses']}),_0xd4865d['buttonView']['set']({'label':i(_0x35ef80,'AI\x20Commands'),'icon':_0x4edd52,'tooltip':!0x0}),_0xd4865d['on']('execute',_0x3d1822=>this['_onExecute'](_0x3d1822['source']['id'])),_0x10381b(_0xd4865d,_0x3d9edb['ui']['view']['body'],function(_0x5d9319){const _0xedd5a0=o(_0x5d9319['config']['get']('ai.aiAssistant.commands'),_0x5d9319['locale']),_0x3d9162=U(_0x5d9319,_0xedd5a0)['filter'](_0x8a401d=>_0x8a401d['commands']['length']);if(0x1===_0x3d9162['length'])return U(_0x5d9319,_0x3d9162[0x0]['commands'])['map'](_0x236a7a=>({'id':_0x236a7a['id'],'label':_0x236a7a['label']}));return _0x3d9162['map'](_0x33a944=>{const {groupId:_0x4fe2db,groupLabel:_0xfa1122,commands:_0xb63e9f}=_0x33a944,_0x13758a=U(_0x5d9319,_0xb63e9f)['map'](_0x26cb01=>({'id':_0x26cb01['id'],'label':_0x26cb01['label']}));return{'id':_0x4fe2db,'menu':_0xfa1122||_0x4fe2db,'children':_0x13758a};});}(_0x3d9edb),{'ariaLabel':i(_0x35ef80,'AI\x20Commands')}),_0xd4865d['menuView']['menuPanelClass']='ck-ai-commands-dropdown\x20'+this['_uiCssClasses'],_0x3a1452['on']('change:enabledCommandsIds',_0x151a50),_0xd4865d['menuView']['once']('render',_0x151a50),_0xd4865d;function _0x151a50(){_0xd4865d['isEnabled']=_0x3a1452['enabledCommandsIds']['length']>0x0;for(const _0x3b8ba1 of _0xd4865d['menuView']['buttons'])_0x3b8ba1['isEnabled']=_0x3a1452['enabledCommandsIds']['includes'](_0x3b8ba1['id']);}}),_0x3d9edb['ui']['componentFactory']['add']('menuBar:aiCommands',_0x59b6ec=>{const _0xc2fc01=new _0x1c05d1(_0x59b6ec);_0xc2fc01['buttonView']['set']({'label':i(_0x59b6ec,'AI\x20Commands'),'icon':_0x4edd52}),_0xc2fc01['bind']('isEnabled')['to'](_0x3a1452,'enabledCommandsIds',_0x38aaa1=>_0x38aaa1['length']>0x0);const _0x3abd17=o(_0x3d9edb['config']['get']('ai.aiAssistant.commands'),_0x59b6ec);return this['_populateMenuBarMenu'](_0x3a1452,_0xc2fc01,_0x3abd17,_0x464b57=>this['_onExecute'](_0x464b57)),_0xc2fc01;}),_0x3d9edb['ui']['componentFactory']['add']('aiAssistant',()=>{const _0x5e42cd=this['_createAIAssistantUIButton'](_0x2db44c);return _0x5e42cd['set']({'tooltip':!0x0,'class':'ck-ai-assistant-button\x20'+this['_uiCssClasses']}),_0x5e42cd;}),_0x3d9edb['ui']['componentFactory']['add']('menuBar:aiAssistant',()=>{const _0x401191=this['_createAIAssistantUIButton'](_0x4151ae);return _0x401191['set']({'role':'menuitemcheckbox'}),_0x401191;}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0xde75d9=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x2c4b25;for(const _0x4a3353 in _0xde75d9){const _0x2867d5=_0x4a3353,_0x3554ac=_0xde75d9[_0x2867d5];if('aiLicenseKeyValid'==_0x3554ac||'aiLicenseKeyInvalid'==_0x3554ac||'aiLicenseKeyExpired'==_0x3554ac||'aiLicenseKeyDomainLimit'==_0x3554ac||'aiLicenseKeyNotAllowed'==_0x3554ac||'aiLicenseKeyEvaluationLimit'==_0x3554ac||'aiLicenseKeyTrialLimit'==_0x3554ac||'aiLicenseKeyUsageLimit'==_0x3554ac){delete _0xde75d9[_0x2867d5],_0x2c4b25=_0x3554ac,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'aiLicenseKeyInvalid'==_0x2c4b25&&_0xde75d9['_showLicenseError']('invalid'),'aiLicenseKeyExpired'==_0x2c4b25&&_0xde75d9['_showLicenseError']('expired'),'aiLicenseKeyDomainLimit'==_0x2c4b25&&_0xde75d9['_showLicenseError']('domainLimit'),'aiLicenseKeyNotAllowed'==_0x2c4b25&&_0xde75d9['_showLicenseError']('featureNotAllowed','AIAssistant'),'aiLicenseKeyEvaluationLimit'==_0x2c4b25&&_0xde75d9['_showLicenseError']('evaluationLimit'),'aiLicenseKeyTrialLimit'==_0x2c4b25&&_0xde75d9['_showLicenseError']('trialLimit'),'aiLicenseKeyUsageLimit'==_0x2c4b25&&_0xde75d9['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['showUI'](_0x2f3049='',_0x1ed303='',_0x514334='custom'){const _0x329943=this['editor'],_0xd60c84=_0x329943['editing']['view'],_0x24ba44=_0x329943['plugins']['get'](a),_0x4353ec=_0x329943['plugins']['get'](_0xf4919e);_0x24ba44['showFakeVisualSelection']();const _0x4007e6=new l(),_0x1fae25=new ClipboardEvent('copy',{'clipboardData':_0x4007e6}),_0x10af6e=new _0x144e81(_0x4007e6),_0x1369fa=new _0x26acc9(_0xd60c84,_0x1fae25,{'dataTransfer':_0x10af6e});_0x4353ec['_forceMarkersCopy']('comment',()=>{_0xd60c84['document']['fire']('copy',_0x1369fa);}),this['_formView']||(this['_initView'](),this['_aiAssistantController']=new j(_0x329943,this['_aiAdapter']['textAdapter'],this['_formView']));let _0x549473=_0x10af6e['getData']('text/html');const _0x555920=_0x329943['model']['document']['selection'],_0x1dc89c=Array['from'](_0x555920['getRanges']());0x1===_0x1dc89c['length']&&_0x1dc89c[0x0]['isFlat']&&!_0x555920['getSelectedElement']()&&''!==_0x549473['replace'](/&nbsp;/g,'')['trim']()&&(_0x549473='<p>'+_0x549473+'</p>'),this['_aiAssistantController']['updateView']({'actionId':_0x514334,'query':_0x2f3049,'htmlContent':_0x549473,'label':_0x1ed303,'mainActionLabel':_[_0x329943['model']['document']['selection']['isCollapsed']?'INSERT':'REPLACE']}),'aiAssistant'!==this['_dialog']['id']?this['_dialog']['show']({'id':'aiAssistant','icon':_0x2e4d83,'title':i(this['editor']['locale'],'AI\x20Assistant'),'content':this['_formView'],'position':_0x49324c['EDITOR_TOP_SIDE'],'onShow':()=>{this['_formView']['focus']();},'onHide':()=>{this['_aiAssistantController']['reset'](),_0x24ba44['hideFakeVisualSelection']();}}):this['_dialog']['view']['wasMoved']||this['_dialog']['view']['updatePosition']();}['hideUI'](){this['_dialog']['hide']();}['_getResolvedCommandsDefinitions'](){const _0x1ba5e8=new Map(),_0x2ce72a=o(this['editor']['config']['get']('ai.aiAssistant.commands'),this['editor']['locale']);for(const _0x34e5af of _0x2ce72a)for(const _0x25da63 of _0x34e5af['commands'])_0x1ba5e8['set'](_0x25da63['id'],{..._0x25da63,'groupId':_0x34e5af['groupId'],'groupLabel':_0x34e5af['groupLabel']||_0x34e5af['groupId']});return _0x1ba5e8;}['_createAIAssistantUIButton'](_0x52d6a5){const _0x357938=this['editor'],_0x479854=_0x357938['commands']['get']('showAIAssistant'),_0xab2fde=new _0x52d6a5(_0x357938['locale']);return _0xab2fde['set']({'label':i(_0x357938['locale'],'AI\x20Assistant'),'icon':_0x2e4d83,'isToggleable':!0x0}),_0xab2fde['bind']('isEnabled')['to'](_0x479854),_0xab2fde['bind']('isOn')['to'](this['_dialog'],'id',_0xe4b1d3=>'aiAssistant'===_0xe4b1d3),this['listenTo'](_0xab2fde,'execute',()=>{_0xab2fde['isOn']?this['hideUI']():_0x479854['execute']();}),_0xab2fde;}['_initView'](){const _0x28473b=this['editor']['plugins']['get'](a);this['_formView']=new k(this['editor']['locale'],this['_uiCssClasses'],this['editor']['config']['get']('ai.aiAssistant.contentAreaCssClass')),this['_formView']['on']('change:value',()=>{this['_dialog']['view']['wasMoved']||this['_dialog']['view']['updatePosition']();}),this['_formView']['promptView']['queryView']['fieldView']['on']('update',()=>{this['_dialog']['view']['wasMoved']||this['_dialog']['view']['updatePosition']();}),this['listenTo'](this['_formView'],'replaceContent',()=>{_0x28473b['insertContent'](this['_aiAssistantController']['currentContext']),this['hideUI']();}),this['listenTo'](this['_formView'],'insertContentBelow',()=>{_0x28473b['insertContentBelow'](this['_aiAssistantController']['currentContext']),this['hideUI']();}),this['_initAriaAiStatusChangeAnnouncements']();}['_initAriaAiStatusChangeAnnouncements'](){const {locale:_0x1204bf,ui:{ariaLiveAnnouncer:_0x2f1b0e}}=this['editor'];this['_formView']['contentArea']['on']('change:isProcessing',(_0x57dcfe,_0x56a2ba,_0x58f505)=>{const _0x2f1ddb=this['_aiAssistantController']['currentContext'];_0x58f505?_0x2f1b0e['announce'](i(_0x1204bf,'AI\x20is\x20writing')):_0x2f1ddb&&_0x2f1b0e['announce'](i(_0x1204bf,'Generated\x20content:\x20%0',_0x2f1ddb),{'politeness':'polite','isUnsafeHTML':!0x0});}),this['_formView']['on']('change:isError',(_0x4a81fc,_0x3a78a1,_0x52aec3)=>{if(_0x52aec3){const _0x9bc6aa=this['_formView']['errorView']['text'];_0x2f1b0e['announce'](i(_0x1204bf,'Error\x20during\x20AI\x20content\x20generation:\x20%0',_0x9bc6aa));}});}['_onExecute'](_0x22630c){const _0x334bbf=this['_commandDefinitions']['get'](_0x22630c),_0x230401=this['editor'],_0x111b0e=_0x230401['model']['document']['selection'],_0x22fdec=_0x230401['commands']['get']('showAIAssistant'),_0x5711cc=_0x230401['plugins']['get'](a),_0x4678cb=''+(_0x334bbf['groupId']!==K?_0x334bbf['groupLabel']+':\x20':'')+_0x334bbf['label'];if(!0x1!==_0x334bbf['requiresContent']&&_0x111b0e['isCollapsed']){const _0x2acea4=_0x43afe3(_0x111b0e['getSelectedBlocks']())||_0x230401['model']['schema']['getLimitElement'](_0x111b0e);_0x230401['model']['change'](_0x26aade=>{_0x26aade['setSelection'](_0x2acea4,'in');});}_0x5711cc['showFakeVisualSelection'](),_0x22fdec['execute'](_0x334bbf['prompt'],_0x4678cb,'command:'+_0x22630c);}['_populateMenuBarMenu'](_0x186664,_0x4e44b3,_0x502937,_0x15b5f3){const _0xebfe44=this['editor'],_0x272a45=_0xebfe44['locale'],_0x735805=new _0x1a8d4b(_0x272a45),_0x9bcd8a=U(_0xebfe44,_0x502937)['filter'](_0x4ac6c4=>_0x4ac6c4['commands']['length']);0x1===_0x9bcd8a['length']?this['_getMenuBarGroupButtons']({'command':_0x186664,'commands':_0x9bcd8a[0x0]['commands'],'parentMenuView':_0x4e44b3,'onExecute':_0x15b5f3})['forEach'](_0x4fe71a=>_0x735805['items']['add'](_0x4fe71a)):_0x9bcd8a['forEach'](({groupId:_0x1677b6,groupLabel:_0x1eb7b4,commands:_0x59bb5f})=>{const _0x12047a=new _0x2fef60(_0x272a45,_0x4e44b3),_0x187460=new _0x1c05d1(_0x272a45),_0x17fb42=new _0x1a8d4b(_0x272a45),_0x243d26=this['_getMenuBarGroupButtons']({'command':_0x186664,'commands':_0x59bb5f,'parentMenuView':_0x187460,'onExecute':_0x15b5f3});_0x187460['buttonView']['set']({'label':_0x1eb7b4||_0x1677b6}),_0x187460['delegate']('execute')['to'](_0x4e44b3),_0x17fb42['items']['addMany'](_0x243d26),_0x187460['panelView']['children']['add'](_0x17fb42),_0x12047a['children']['add'](_0x187460),_0x735805['items']['add'](_0x12047a);}),_0x4e44b3['panelView']['children']['add'](_0x735805);}['_getMenuBarGroupButtons']({command:_0x222a48,commands:_0x61e668,parentMenuView:_0x5caa41,onExecute:_0x5681b2}){const _0x1f074f=this['editor'],_0x1efa33=_0x1f074f['locale'];return U(_0x1f074f,_0x61e668)['map'](_0x466147=>{const _0x57e2cb=new _0x2fef60(_0x1efa33,_0x5caa41),_0x3a6b0e=new _0x4151ae(_0x1efa33);return _0x3a6b0e['set']({'label':_0x466147['label']}),_0x3a6b0e['delegate']('execute')['to'](_0x5caa41),_0x3a6b0e['on']('execute',()=>_0x5681b2(_0x466147['id'])),_0x3a6b0e['bind']('isEnabled')['to'](_0x222a48,'enabledCommandsIds',_0x36558f=>_0x36558f['includes'](_0x466147['id'])),_0x57e2cb['children']['add'](_0x3a6b0e),_0x57e2cb;});}}function T(_0x3ea7d1,_0x36e6df){return void 0x0!==_0x3ea7d1['order']&&void 0x0===_0x36e6df['order']?0x1:void 0x0===_0x3ea7d1['order']&&void 0x0!==_0x36e6df['order']?-0x1:void 0x0!==_0x3ea7d1['order']&&void 0x0!==_0x36e6df['order']?_0x3ea7d1['order']-_0x36e6df['order']:0x0;}function U(_0x23a0ba,_0x1b70c1){_0x1b70c1['sort'](T);const _0xbc2fa1={},_0x1ff5f0=[];for(const _0x32b2e6 of _0x1b70c1)if(void 0x0!==_0x32b2e6['order']){if(_0x32b2e6['order']in _0xbc2fa1)throw new _0x18ef2b('ai-commands-config-order-collision',_0x23a0ba,{'conflictingDefinitions':[_0x32b2e6,_0xbc2fa1[_0x32b2e6['order']]]});_0xbc2fa1[_0x32b2e6['order']]=_0x32b2e6,_0x1ff5f0['splice'](_0x32b2e6['order'],0x0,_0x32b2e6);}else _0x1ff5f0['push'](_0x32b2e6);return _0x1ff5f0;}class At extends _0x47d13d{static get['requires'](){return[n,a];}static get['pluginName'](){return'AIAssistant';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2dad37){super(_0x2dad37);const _0x10d5f4=_0x2dad37['config'],_0x16817b=_0x2dad37['locale'];_0x10d5f4['define']('ai.aiAssistant.preserveComments',!0x0),_0x10d5f4['define']('ai.aiAssistant.commands',_t(_0x16817b)),_0x10d5f4['define']('ai.aiAssistant.extraCommandGroups',[]),_0x10d5f4['define']('ai.aiAssistant.removeCommands',[]);let _0x343e07=o(_0x10d5f4['get']('ai.aiAssistant.commands'),_0x16817b);const _0x21f7f8=_0x10d5f4['get']('ai.aiAssistant.extraCommandGroups'),_0x29c9e4=_0x10d5f4['get']('ai.aiAssistant.removeCommands');_0x21f7f8['forEach'](_0x532fd3=>{const _0x292262=_0x343e07['find'](_0x451822=>_0x451822['groupId']===_0x532fd3['groupId']);_0x292262?_0x292262['commands']=_0x292262['commands']['concat'](_0x532fd3['commands']):_0x343e07['push'](_0x532fd3);}),_0x343e07=_0x343e07['filter'](_0x6689b8=>!_0x29c9e4['includes'](_0x6689b8['groupId'])),_0x343e07['forEach'](_0x4e77ca=>{_0x4e77ca['commands']=_0x4e77ca['commands']['filter'](_0xc8a1a6=>!_0x29c9e4['includes'](_0xc8a1a6['id']));}),_0x10d5f4['set']('ai.aiAssistant.commands',_0x343e07);}}function _t(_0x2b0690){return[{'groupId':'editOrReview','groupLabel':i(_0x2b0690,'Edit\x20or\x20review'),'commands':[{'id':'improveWriting','label':i(_0x2b0690,'Improve\x20writing'),'prompt':'Fix\x20spelling\x20mistakes,\x20use\x20proper\x20grammar\x20and\x20apply\x20good\x20writing\x20practices.\x20Do\x20not\x20lose\x20the\x20original\x20meaning.'},{'id':'makeShorter','label':i(_0x2b0690,'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(_0x2b0690,'Make\x20longer'),'prompt':'Improve\x20this\x20content\x20by\x20using\x20descriptive\x20language\x20and\x20inserting\x20more\x20information\x20and\x20more\x20detailed\x20explanations.'},{'id':'simplifyLanguage','label':i(_0x2b0690,'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(_0x2b0690,'Generate\x20from\x20selection'),'commands':[{'id':'summarize','label':i(_0x2b0690,'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(_0x2b0690,'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(_0x2b0690,'Change\x20tone'),'commands':[{'id':'professional','label':i(_0x2b0690,'Professional'),'prompt':'Improve\x20using\x20polished,\x20formal,\x20and\x20respectful\x20language\x20to\x20convey\x20professional\x20expertise\x20and\x20competence.'},{'id':'casual','label':i(_0x2b0690,'Casual'),'prompt':'Improve\x20using\x20casual,\x20informal\x20language\x20to\x20convey\x20a\x20casual\x20conversation\x20with\x20a\x20real\x20person.'},{'id':'direct','label':i(_0x2b0690,'Direct'),'prompt':'Improve\x20using\x20direct\x20language,\x20using\x20only\x20the\x20essential\x20information.'},{'id':'confident','label':i(_0x2b0690,'Confident'),'prompt':'Improve\x20using\x20compelling,\x20optimistic\x20language\x20to\x20convey\x20confidence\x20in\x20the\x20writing.'},{'id':'friendly','label':i(_0x2b0690,'Friendly'),'prompt':'Improve\x20using\x20friendly,\x20comforting\x20language,\x20to\x20convey\x20understanding\x20and\x20empathy.'}]},{'groupId':'changeStyle','groupLabel':i(_0x2b0690,'Change\x20style'),'commands':[{'id':'business','label':i(_0x2b0690,'Business'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20business\x20professional\x20with\x20formal\x20language.'},{'id':'legal','label':i(_0x2b0690,'Legal'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20legal\x20professional\x20using\x20valid\x20legal\x20terminology.'},{'id':'journalism','label':i(_0x2b0690,'Journalism'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20journalist\x20using\x20engaging\x20language\x20to\x20convey\x20the\x20importance\x20of\x20the\x20information.'},{'id':'poetic','label':i(_0x2b0690,'Poetic'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20poem\x20using\x20poetic\x20techniques\x20without\x20losing\x20the\x20original\x20meaning.'}]},{'groupId':'translate','groupLabel':i(_0x2b0690,'Translate'),'commands':[{'id':'translateEnglish','label':i(_0x2b0690,'English'),'prompt':'Translate\x20the\x20content\x20to\x20English\x20language.'},{'id':'translateSpanish','label':i(_0x2b0690,'Spanish'),'prompt':'Translate\x20the\x20content\x20to\x20Spanish\x20language.'},{'id':'translatePortuguese','label':i(_0x2b0690,'Portuguese'),'prompt':'Translate\x20the\x20content\x20to\x20Portuguese\x20language.'},{'id':'translateGerman','label':i(_0x2b0690,'German'),'prompt':'Translate\x20the\x20content\x20to\x20German\x20language.'},{'id':'translateFrench','label':i(_0x2b0690,'French'),'prompt':'Translate\x20the\x20content\x20to\x20French\x20language.'},{'id':'translateChinese','label':i(_0x2b0690,'Simplified\x20Chinese'),'prompt':'Translate\x20the\x20content\x20to\x20Simplified\x20Chinese\x20language.'},{'id':'translateHindi','label':i(_0x2b0690,'Hindi'),'prompt':'Translate\x20the\x20content\x20to\x20Hindi\x20language.'},{'id':'translateArabic','label':i(_0x2b0690,'Arabic'),'prompt':'Translate\x20the\x20content\x20to\x20Arabic\x20language.'}]}];}class S extends _0x47d13d{['abortController'];static get['requires'](){return[x];}constructor(_0x112d01){super(_0x112d01),this['abortController']=new AbortController();}['init'](){this['editor']['plugins']['get'](x)['textAdapter']=this;}['abort'](){this['abortController']['signal']['aborted']||(this['abortController']['abort'](),this['abortController']=new AbortController());}async['makeRequest'](_0x511eec){return this['sendRequest'](_0x511eec)['catch'](_0x4670fe=>{if(_0x4670fe instanceof R)return Promise['reject'](_0x4670fe);if('AbortError'==_0x4670fe['name'])return Promise['resolve']();throw console['error'](_0x4670fe),new _0x18ef2b('aitextadapter-send-request-failed',null);});}async['_prepareRequestHeaders'](_0x5bae8b,_0xd9b3b4){const _0x48f295=this['editor']['locale'],_0xcee2c4={'Content-Type':'application/json'};if('object'==typeof _0x5bae8b)Object['assign'](_0xcee2c4,_0x5bae8b);else{if(_0x5bae8b)try{const _0xaf133f=await _0x5bae8b(_0xd9b3b4);Object['assign'](_0xcee2c4,_0xaf133f);}catch{return Promise['reject'](new R(i(_0x48f295,'AI_ERROR_GET_HEADERS')));}}return _0xcee2c4;}async['_prepareRequestParameters'](_0x44b362,_0x83a9){const _0x10a418=this['editor']['locale'];if('object'==typeof _0x44b362)return _0x44b362;try{return await _0x44b362(_0x83a9);}catch{return Promise['reject'](new R(i(_0x10a418,'AI_ERROR_GET_PARAMETERS')));}}}class It extends S{['_apiUrl'];['_requestHeaders'];['_requestParameters'];static get['pluginName'](){return'OpenAITextAdapter';}constructor(_0x12e4f9){super(_0x12e4f9),_0x12e4f9['config']['define']('ai.openAI.apiUrl','https://api.openai.com/v1/chat/completions'),_0x12e4f9['config']['get']('ai.openAI.requestParameters')||_0x12e4f9['config']['define']('ai.openAI.requestParameters',{'model':'gpt-4o','temperature':0x1,'top_p':0x1,'stream':!0x0}),this['_apiUrl']=_0x12e4f9['config']['get']('ai.openAI.apiUrl'),this['_requestHeaders']=_0x12e4f9['config']['get']('ai.openAI.requestHeaders')||{},this['_requestParameters']=_0x12e4f9['config']['get']('ai.openAI.requestParameters');}async['sendRequest']({query:_0x354ed9,context:_0x588c23,onData:_0x2176c0,actionId:_0x20382c}){const _0x2b1afd=this['editor']['locale'],_0x20eed2=await this['prepareMessages'](_0x354ed9,_0x588c23,_0x20382c),_0x360a4b=await this['_prepareRequestHeaders'](this['_requestHeaders'],_0x20382c),_0x242a23=await this['_prepareRequestParameters'](this['_requestParameters'],_0x20382c),_0x233b97={'messages':_0x20eed2,..._0x242a23},_0x1564d7={'method':'POST','headers':_0x360a4b,'body':JSON['stringify'](_0x233b97),'signal':this['abortController']['signal']},_0x25b82b=await fetch(this['_apiUrl'],_0x1564d7);if(_0x25b82b['ok'])return _0x242a23['stream']?await this['_readStreamableResponse'](_0x25b82b,_0x2176c0):await this['_readStaticResponse'](_0x25b82b,_0x2176c0),Promise['resolve']();{const _0x157adb=await _0x25b82b['text']();return _0x157adb['includes']('context_length_exceeded')?Promise['reject'](new R(i(_0x2b1afd,'AI_ERROR_CONTEXT_LENGTH'))):_0x157adb['includes']('Moderation')?Promise['reject'](new R(i(_0x2b1afd,'AI_ERROR_MODERATION'))):Promise['reject'](new Error(_0x157adb));}}async['prepareMessages'](_0x52c5e6,_0x3600a7,_0x504a9c){let _0x7bb93b,_0x878c6e;return _0x3600a7?(_0x7bb93b='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.',_0x878c6e='Instruction:\x0a'+_0x52c5e6+'\x0aYou\x20must\x20keep\x20the\x20text\x20formatting.\x0a\x0aContent:\x0a'+_0x3600a7):(_0x7bb93b='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.',_0x878c6e=_0x52c5e6),[{'role':'system','content':_0x7bb93b},{'role':'user','content':_0x878c6e}];}async['_readStreamableResponse'](_0x78caaa,_0x718efc){const _0x123ae2=_0x78caaa['body']['getReader'](),_0x36c165=new TextDecoder();let _0x597650='',_0x4316d9='',_0xac69d8='',_0x52d2d1=!0x1;for(;!_0x52d2d1;){const {done:_0x239a08,value:_0x964e3a}=await _0x123ae2['read'](),_0x3ae962=_0x597650+_0x36c165['decode'](_0x964e3a);let _0x2f9fff='';_0x52d2d1=_0x239a08;try{_0x2f9fff=this['_cleanUpData'](_0x3ae962),_0x597650='';}catch{_0x597650=_0x3ae962;continue;}_0x4316d9+=_0x2f9fff,!_0x52d2d1&&this['_isBufferIncomplete'](_0x4316d9)||_0x4316d9&&(_0xac69d8+=_0x4316d9,_0x4316d9='',_0x718efc(_0xac69d8));}return Promise['resolve']();}async['_readStaticResponse'](_0x4c5192,_0x42288b){return _0x42288b((await _0x4c5192['json']())['choices'][0x0]['message']['content']),Promise['resolve']();}['_isBufferIncomplete'](_0x22664c){const _0x40390e=_0x22664c['split']('<')['length']!==_0x22664c['split']('>')['length'],_0x454ad3=_0x22664c['length']<0x1e;return _0x40390e&&_0x454ad3;}['_cleanUpData'](_0x288622){return _0x288622['split'](/\n(?![^{]*\})/g)['map'](_0x319c1d=>_0x319c1d['replace']('data:\x20',''))['filter'](_0x14613b=>_0x14613b&&_0x14613b['length']>0x0&&'[DONE]'!==_0x14613b)['map'](_0x1a17d5=>{const {choices:_0x3a4084}=JSON['parse'](_0x1a17d5);if(_0x3a4084[0x0]?.['delta']?.['content'])return _0x3a4084[0x0]['delta']['content'];})['filter'](_0x5937d7=>_0x5937d7)['join']('');}}class Et extends S{['_apiUrl'];['_requestHeaders'];['_bedrockClientConfig'];['_requestParameters'];static get['pluginName'](){return'AWSTextAdapter';}constructor(_0x3369fa){super(_0x3369fa),_0x3369fa['config']['get']('ai.aws.requestParameters')||_0x3369fa['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']=_0x3369fa['config']['get']('ai.aws.apiUrl'),this['_bedrockClientConfig']=_0x3369fa['config']['get']('ai.aws.bedrockClientConfig'),this['_requestHeaders']=_0x3369fa['config']['get']('ai.aws.requestHeaders'),this['_requestParameters']=_0x3369fa['config']['get']('ai.aws.requestParameters');}async['sendRequest']({query:_0x2436d0,context:_0x2ce905,onData:_0x472a18,actionId:_0x31d29e}){const {model:_0x222d95,stream:_0x55b1aa,..._0x33011b}=await this['_prepareRequestParameters'](this['_requestParameters'],_0x31d29e),_0x3e0314={'prompt':await this['preparePrompt'](_0x2436d0,_0x2ce905,_0x222d95,_0x31d29e),..._0x33011b};this['_apiUrl']?await this['_processProxyRequest'](_0x3e0314,_0x222d95,_0x55b1aa,_0x472a18,_0x31d29e):await this['_processAWSRequest'](_0x3e0314,_0x222d95,_0x55b1aa,_0x472a18);}async['preparePrompt'](_0x423234,_0x40f9cf,_0x22df76,_0xcc605){let _0x4e9faa,_0x4b4c3f;return _0x40f9cf?(_0x4e9faa='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.',_0x4b4c3f='Instruction:\x0a'+_0x423234+'\x0aYou\x20must\x20keep\x20the\x20text\x20formatting.\x0a\x0aContent:\x0a'+_0x40f9cf):(_0x4e9faa='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.',_0x4b4c3f=_0x423234),'meta.llama'==this['getModelFamily'](_0x22df76)?'<<SYS>>\x0a'+_0x4e9faa+'\x0a<</SYS>>\x0a[INST]\x0a'+_0x4b4c3f+'\x0a[/INST]':'Human:\x0a'+_0x4e9faa+'\x0a'+_0x4b4c3f+'\x0a\x0aAssistant:';}['getModelFamily'](_0x269192){if(/^anthropic\.claude/['test'](_0x269192))return'anthropic.claude';if(/^ai21\.j2/['test'](_0x269192))return'ai21.j2';if(/^cohere\.command/['test'](_0x269192))return'cohere.command';if(/^meta\.llama/['test'](_0x269192))return'meta.llama';throw new R(i(this['editor']['locale'],'AI_ERROR_UNSUPPORTED_MODEL',_0x269192));}async['_processProxyRequest'](_0x3b4ef9,_0x48c7df,_0x20026a,_0x98fdfc,_0x3422c0){const _0x528ec4={'method':'POST','headers':await this['_prepareRequestHeaders'](this['_requestHeaders'],_0x3422c0),'body':JSON['stringify']({..._0x3b4ef9,'model':_0x48c7df,'stream':_0x20026a}),'signal':this['abortController']['signal']},_0x40be1e=await fetch(this['_apiUrl'],_0x528ec4);_0x20026a?await this['_readStreamableResponse'](_0x40be1e,_0x48c7df,_0x98fdfc):await this['_readStaticResponse'](_0x40be1e,_0x48c7df,_0x98fdfc);}async['_processAWSRequest'](_0x3f52c8,_0x450c68,_0x1f0349,_0x55bc17){const _0x301b8a=new _0x2408c7(this['_bedrockClientConfig']),_0x37d7d5={'body':JSON['stringify'](_0x3f52c8),'contentType':'application/json','accept':'application/json','modelId':_0x450c68};let _0xb7c1d4;if(_0x1f0349){const _0x1ea0ac=new _0xd9b0cc(_0x37d7d5);_0xb7c1d4=await _0x301b8a['send'](_0x1ea0ac,{'abortSignal':this['abortController']['signal']}),await this['_readAsyncIterableResponse'](_0xb7c1d4,_0x450c68,_0x55bc17);}else{const _0x776ef=new _0x314eda(_0x37d7d5);_0xb7c1d4=await _0x301b8a['send'](_0x776ef,{'abortSignal':this['abortController']['signal']}),await this['_readStaticResponse'](_0xb7c1d4,_0x450c68,_0x55bc17);}}async['_readAsyncIterableResponse'](_0x4b2fc1,_0x597fca,_0x5c9505){const _0x2d01f3=_0x4b2fc1['body'],_0x19eea2=new TextDecoder('utf-8');let _0x1a17ff='';for await(const _0x3eb997 of _0x2d01f3)if(_0x3eb997['chunk']){const _0x2f30d6=_0x19eea2['decode'](_0x3eb997['chunk']['bytes']),_0x2f42fe=JSON['parse'](_0x2f30d6);_0x1a17ff+=this['_getGeneratedText'](_0x2f42fe,_0x597fca),_0x5c9505(_0x1a17ff);}return Promise['resolve']();}async['_readStreamableResponse'](_0x9653e,_0x259918,_0x2da289){const _0x53c1a=_0x9653e['body'],_0x36c53c=new TextDecoder('utf-8'),_0x318f17=_0x53c1a['getReader']();let _0x44d20c='',_0x5b2419='',_0x19936d=!0x1;for(;!_0x19936d;){const {done:_0xa3a843,value:_0x6de4b8}=await _0x318f17['read']();if(_0x19936d=_0xa3a843,_0x19936d)break;const _0x269a71=(_0x44d20c+_0x36c53c['decode'](_0x6de4b8))['split']('\x0a')['map'](_0xb25217=>{try{return _0x44d20c='',JSON['parse'](_0xb25217);}catch{return _0x44d20c=_0xb25217,null;}})['filter'](_0x13e7a2=>null!==_0x13e7a2);_0x269a71['length']&&(_0x5b2419+=_0x269a71['map'](_0x46085a=>this['_getGeneratedText'](_0x46085a,_0x259918))['join'](''),_0x2da289(_0x5b2419));}return Promise['resolve']();}async['_readStaticResponse'](_0x214c6b,_0x4dc28e,_0x401401){let _0x478de3;return _0x478de3=_0x214c6b instanceof Response?await _0x214c6b['json']():JSON['parse'](new TextDecoder('utf-8')['decode'](_0x214c6b['body'])),(_0x401401(this['_getGeneratedText'](_0x478de3,_0x4dc28e)),Promise['resolve']());}['_getGeneratedText'](_0x229ec0,_0x3ab9d5){switch(this['getModelFamily'](_0x3ab9d5)){case'anthropic.claude':return _0x229ec0['completion'];case'ai21.j2':return _0x229ec0['completions'][0x0]['data']['text'];case'cohere.command':return _0x229ec0['generations'][0x0]['text'];case'meta.llama':return _0x229ec0['generation'];}}}export{x as AIAdapter,At as AIAssistant,n as AIAssistantUI,R as AIRequestError,S as AITextAdapter,Et as AWSTextAdapter,It as OpenAITextAdapter,E as ShowAIAssistantCommand,_t as getDefaultAICommands};
23
+ import{Plugin as _0x2d1d32,Command as _0x232af3}from'@ckeditor/ckeditor5-core/dist/index.js';import{IconCopy as _0x3deb9c,IconCheck as _0x3c90d9,IconError as _0x5e3cca,IconSubmit as it,IconHistory as tt,IconMagicWand as _0x2380a6,IconRobotPencil as _0x2d8fe9}from'@ckeditor/ckeditor5-icons/dist/index.js';import{uid as _0x5d18ab,CKEditorError as _0x5038d9,ObservableMixin as _0x8cf721,global as _0x10ddad,isVisible as _0x3d06cb,Rect as _0xf542e8,Collection as _0x50b992,FocusTracker as et,KeystrokeHandler as rt,first as _0x34c6dc}from'@ckeditor/ckeditor5-utils/dist/index.js';import{ToolbarView as ot,ButtonView as _0x26e4f0,View as _0x4c348a,SpinnerView as _0x7b6e84,IconView as _0x520ab5,AutocompleteView as st,ListView as yt,ListItemGroupView as Ct,ListItemView as xt,ButtonLabelView as wt,FocusCycler as ht,createLabeledTextarea as nt,Dialog as _0x78ce67,createDropdown as _0x4943e6,addMenuToDropdown as _0x20359e,MenuBarMenuView as _0x2c51f0,MenuBarMenuListItemButtonView as _0x4b8772,DialogViewPosition as _0x52abdf,MenuBarMenuListView as _0x5255c6,MenuBarMenuListItemView as _0x20f208}from'@ckeditor/ckeditor5-ui/dist/index.js';import{ClipboardPipeline as _0x16a737,ClipboardMarkersUtils as _0x324d39}from'@ckeditor/ckeditor5-clipboard/dist/index.js';import{ViewDocumentDomEventData as _0x565093,ViewDataTransfer as _0x2e0788,ViewUpcastWriter as _0x545b9b,Matcher as _0x21b667}from'@ckeditor/ckeditor5-engine/dist/index.js';import{unescape as kt,escape as ft}from'es-toolkit/compat';import{BedrockRuntimeClient as _0x5f2ebf,InvokeModelWithResponseStreamCommand as _0x46d9e4,InvokeModelCommand as _0xcfc9f2}from'@aws-sdk/client-bedrock-runtime';const K='_ungrouppedCommands';function o(_0x5dfda9,_0x511f6a){const _0x49b2c9=(0x0,_0x511f6a['t'])('Other');return _0x5dfda9['length']?'groupId'in _0x5dfda9[0x0]?_0x5dfda9:[{'groupId':K,'groupLabel':_0x49b2c9,'order':0x1/0x0,'commands':_0x5dfda9}]:[{'groupId':K,'groupLabel':_0x49b2c9,'order':0x1/0x0,'commands':[]}];}const gt=globalThis['DataTransfer'],w='ai-ui';class a extends _0x2d1d32{static get['pluginName'](){return'AIAssistantEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0xcbe6c3}=this,_0x576e3f=['ck-fake-ai-selection'];_0xcbe6c3['config']['get']('ai.useTheme')&&_0x576e3f['push']('ck-ai-assistant-ui_theme'),_0xcbe6c3['conversion']['for']('editingDowncast')['markerToHighlight']({'model':w,'view':{'classes':_0x576e3f,'priority':0xc}}),_0xcbe6c3['conversion']['for']('editingDowncast')['markerToElement']({'model':w,'view':(_0x1401db,{writer:_0x46246b})=>{if(!_0x1401db['markerRange']['isCollapsed'])return null;const _0x516662=_0x46246b['createUIElement']('span');return _0x46246b['addClass'](['ck-fake-ai-selection','ck-fake-ai-selection_collapsed'],_0x516662),_0x516662;}});}['afterInit'](){!async function(_0x333dfe){const _0x1f5533=_0x2f2679([0x58,0x7a,0x32,0x61,0x55,0x52,0x65,0x4d,0x6c,0x4f,0x63,0x38,0x57,0x6e,0x75,0x6a,0x45,0x67,0x62,0x41,0x49,0x6f,0x47,0x5a,0x33,0x71,0x59,0x48,0x34,0x46,0x76,0x77,0x72,0x31,0x78,0x56,0x39,0x66,0x44,0x4b,0x6b,0x35,0x36,0x37,0x69,0x73,0x53,0x42,0x6d,0x68,0x64,0x43,0x30,0x70,0x74,0x54,0x79,0x51,0x4c,0x4e,0x4a,0x50]),_0x46e3f8=0x63d77ec7,_0x3ac00e=0x63d00c97^_0x46e3f8,_0x2be294=window[_0x2f2679([0x44,0x61,0x74,0x65])][_0x2f2679([0x6e,0x6f,0x77])](),_0x19a014=_0x333dfe[_0x2f2679([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x4a6e23=new window[(_0x2f2679([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4722a3=>{_0x19a014[_0x2f2679([0x6f,0x6e,0x63,0x65])](_0x2f2679([0x72,0x65,0x61,0x64,0x79]),_0x4722a3);}),_0x42ccc7={[_0x2f2679([0x6b,0x74,0x79])]:_0x2f2679([0x45,0x43]),[_0x2f2679([0x75,0x73,0x65])]:_0x2f2679([0x73,0x69,0x67]),[_0x2f2679([0x63,0x72,0x76])]:_0x2f2679([0x50,0x2d,0x32,0x35,0x36]),[_0x2f2679([0x78])]:_0x2f2679([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]),[_0x2f2679([0x79])]:_0x2f2679([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]),[_0x2f2679([0x61,0x6c,0x67])]:_0x2f2679([0x45,0x53,0x32,0x35,0x36])},_0x269ec5=_0x19a014[_0x2f2679([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x2f2679([0x67,0x65,0x74])](_0x2f2679([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x5ab2c0(){let _0x564948,_0x356dbf=null,_0x2a3899=null;try{if(_0x269ec5==_0x2f2679([0x47,0x50,0x4c]))return _0x2f2679([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x564948=_0x3ba6a3(),!_0x564948)return _0x2f2679([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x564948[_0x2f2679([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x2a3899=_0x2a1074(_0x564948[_0x2f2679([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x564948[_0x2f2679([0x6a,0x74,0x69])])),await _0x3f9d9e()?_0x4a00e2()?_0x3f8b13()?_0x2f2679([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x75fc62()?(_0x564948[_0x2f2679([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x2f2679([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x356dbf=_0x676625(_0x2f2679([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x564948[_0x2f2679([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x2f2679([0x74,0x72,0x69,0x61,0x6c])&&(_0x356dbf=_0x676625(_0x2f2679([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x2a2a31()):_0x2f2679([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x2f2679([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x2f2679([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x2f2679([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x3f8b13(){const _0x25aa48=[_0x2f2679([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x2f2679([0x74,0x72,0x69,0x61,0x6c])][_0x2f2679([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x564948[_0x2f2679([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x2be294/0x3e8:0xe10*_0x3ac00e;return _0x564948[_0x2f2679([0x65,0x78,0x70])]<_0x25aa48;}function _0x4a00e2(){const _0x4f6ef9=_0x564948[_0x2f2679([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x4f6ef9&&(!!_0x4f6ef9[_0x2f2679([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2f2679([0x2a]))||!!_0x4f6ef9[_0x2f2679([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2f2679([0x41,0x49])));}function _0x75fc62(){const _0x52b5d9=_0x564948[_0x2f2679([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x52b5d9||0x0==_0x52b5d9[_0x2f2679([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x2d48d2}=new URL(window[_0x2f2679([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x52b5d9[_0x2f2679([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2d48d2))return!0x0;const _0x207f77=_0x2d48d2[_0x2f2679([0x73,0x70,0x6c,0x69,0x74])](_0x2f2679([0x2e]));return _0x52b5d9[_0x2f2679([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x4d4318=>_0x4d4318[_0x2f2679([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2f2679([0x2a])))[_0x2f2679([0x6d,0x61,0x70])](_0x39fb14=>_0x39fb14[_0x2f2679([0x73,0x70,0x6c,0x69,0x74])](_0x2f2679([0x2e])))[_0x2f2679([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x4ef16d=>_0x4ef16d[_0x2f2679([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x207f77[_0x2f2679([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x2f2679([0x6d,0x61,0x70])](_0x7c2ec1=>Array(_0x207f77[_0x2f2679([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x7c2ec1[_0x2f2679([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x2f2679([0x66,0x69,0x6c,0x6c])](_0x7c2ec1[0x0]===_0x2f2679([0x2a])?_0x2f2679([0x2a]):'')[_0x2f2679([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x7c2ec1))[_0x2f2679([0x73,0x6f,0x6d,0x65])](_0x2217ca=>_0x207f77[_0x2f2679([0x65,0x76,0x65,0x72,0x79])]((_0x4beb45,_0x5db224)=>_0x2217ca[_0x5db224]===_0x4beb45||_0x2217ca[_0x5db224]===_0x2f2679([0x2a])));}function _0x2a2a31(){return _0x356dbf&&_0x2a3899?new window[(_0x2f2679([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x394493,_0x423ed9)=>{_0x356dbf[_0x2f2679([0x74,0x68,0x65,0x6e])](_0x394493,_0x423ed9),_0x2a3899[_0x2f2679([0x74,0x68,0x65,0x6e])](_0x272ea0=>{_0x272ea0!=_0x2f2679([0x56,0x61,0x6c,0x69,0x64])&&_0x394493(_0x272ea0);},_0x423ed9);}):_0x356dbf||_0x2a3899||_0x2f2679([0x56,0x61,0x6c,0x69,0x64]);}}function _0x2a1074(_0x3bfbe9,_0x4428ab){return new window[(_0x2f2679([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3ec275=>{if(_0x5bbb9b())return _0x3ec275(_0x2f2679([0x56,0x61,0x6c,0x69,0x64]));_0x2b6d1f(),_0x19a014[_0x2f2679([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x2f2679([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x46316b=!0x1;const _0x1d6eac=_0x5d18ab();function _0x3d96bc(_0x460232){return!!_0x460232&&(typeof _0x460232===_0x2f2679([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x460232===_0x2f2679([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x460232[_0x2f2679([0x74,0x68,0x65,0x6e])]===_0x2f2679([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x460232[_0x2f2679([0x63,0x61,0x74,0x63,0x68])]===_0x2f2679([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x2a0ad0(_0x375f29){_0x24d5eb(_0x375f29)[_0x2f2679([0x74,0x68,0x65,0x6e])](_0x221b62=>{if(!_0x221b62||_0x221b62[_0x2f2679([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x2f2679([0x6f,0x6b]))return _0x2f2679([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x33ca4f(_0x55cb30(_0x1d6eac+_0x4428ab))!=_0x221b62[_0x2f2679([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x2f2679([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x2f2679([0x56,0x61,0x6c,0x69,0x64]);})[_0x2f2679([0x74,0x68,0x65,0x6e])](_0x371d67=>(_0x3879b4(),_0x371d67),()=>{const _0x4d7da4=_0x642579();return null==_0x4d7da4?(_0x3879b4(),_0x2f2679([0x56,0x61,0x6c,0x69,0x64])):_0x2f2679(_0x2be294-_0x4d7da4>(0x47dbfac7^_0x46e3f8)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x2f2679([0x74,0x68,0x65,0x6e])](_0x3ec275)[_0x2f2679([0x63,0x61,0x74,0x63,0x68])](()=>{_0x3ec275(_0x2f2679([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x52310e=0x63e19047^_0x46e3f8;function _0x3879b4(){const _0x3d9929=_0x2f2679([0x6c,0x6c,0x63,0x74,0x2d])+_0x33ca4f(_0x55cb30(_0x3bfbe9)),_0x3c67e3=_0x11264d(_0x33ca4f(window[_0x2f2679([0x4d,0x61,0x74,0x68])][_0x2f2679([0x63,0x65,0x69,0x6c])](_0x2be294/_0x52310e)));window[_0x2f2679([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x2f2679([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x3d9929,_0x3c67e3);}function _0x642579(){const _0x170a75=_0x2f2679([0x6c,0x6c,0x63,0x74,0x2d])+_0x33ca4f(_0x55cb30(_0x3bfbe9)),_0x1c97ea=window[_0x2f2679([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x2f2679([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x170a75);return _0x1c97ea?window[_0x2f2679([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x11264d(_0x1c97ea),0x10)*_0x52310e:null;}function _0x24d5eb(_0x3b20f2){return new window[(_0x2f2679([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x461b06,_0x4ff657)=>{_0x3b20f2[_0x2f2679([0x74,0x68,0x65,0x6e])](_0x461b06,_0x4ff657),window[_0x2f2679([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x4ff657,0x63d6aa07^_0x46e3f8);});}}_0x19a014[_0x2f2679([0x6f,0x6e])](_0x2f2679([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x19c899,_0x15fc9a)=>{if(_0x15fc9a[0x0]!=_0x3bfbe9)return _0x3ec275(_0x2f2679([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x15fc9a[0x1]={..._0x15fc9a[0x1],[_0x2f2679([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x1d6eac};},{[_0x2f2679([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x2f2679([0x68,0x69,0x67,0x68])}),_0x19a014[_0x2f2679([0x6f,0x6e])](_0x2f2679([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x521d7e=>{_0x3d96bc(_0x521d7e[_0x2f2679([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x46316b=!0x0,_0x2a0ad0(_0x521d7e[_0x2f2679([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x2f2679([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x2f2679([0x6c,0x6f,0x77])}),_0x4a6e23[_0x2f2679([0x74,0x68,0x65,0x6e])](()=>{_0x46316b||_0x3ec275(_0x2f2679([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x5bbb9b(){return _0x19a014[_0x2f2679([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x2f2679([0x76,0x69,0x65,0x77])][_0x2f2679([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x2f2679([0x61,0x75,0x74,0x6f]);}function _0x2b6d1f(){_0x19a014[_0x2f2679([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x2f2679([0x76,0x69,0x65,0x77])][_0x2f2679([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x2f2679([0x61,0x75,0x74,0x6f]);}}function _0x676625(_0x50529b){const _0x4d01db=[new window[(_0x2f2679([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0xaaf6ab=>setTimeout(_0xaaf6ab,0x63de400b^_0x46e3f8)),_0x4a6e23[_0x2f2679([0x74,0x68,0x65,0x6e])](()=>new window[(_0x2f2679([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0xd7ed05=>{let _0x2bb1f8=0x0;_0x19a014[_0x2f2679([0x6d,0x6f,0x64,0x65,0x6c])][_0x2f2679([0x6f,0x6e])](_0x2f2679([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x24f4ca,_0x3b5706)=>{_0x3b5706[0x0][_0x2f2679([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x2bb1f8++,_0x2bb1f8==(0x63d77f3f^_0x46e3f8)&&(_0xd7ed05(),_0x24f4ca[_0x2f2679([0x6f,0x66,0x66])]());});}))];return window[_0x2f2679([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x2f2679([0x72,0x61,0x63,0x65])](_0x4d01db)[_0x2f2679([0x74,0x68,0x65,0x6e])](()=>_0x50529b);}async function _0x2224b4(){await _0x4a6e23,_0x19a014[_0x2f2679([0x6d,0x6f,0x64,0x65,0x6c])][_0x2f2679([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x5b00b1,_0x19a014[_0x2f2679([0x6d,0x6f,0x64,0x65,0x6c])][_0x2f2679([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x5b00b1,_0x19a014[_0x2f2679([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x2f2679([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x5827f1(_0x5a196f){const _0xde98ee=_0x2f0886();_0x19a014[_0xde98ee]=_0x2f2679([0x61,0x69,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x5a196f,_0x5a196f!=_0x2f2679([0x56,0x61,0x6c,0x69,0x64])&&_0x2224b4();}function _0x2f0886(){const _0x2ce37f=window[_0x2f2679([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x2f2679([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x2f2679([0x6e,0x6f,0x77])]())[_0x2f2679([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x2f2679([0x2e]),'');let _0x220a05=_0x2f2679([0x58]);for(let _0x363f8c=0x0;_0x363f8c<_0x2ce37f[_0x2f2679([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x363f8c+=0x2){let _0x4216dc=window[_0x2f2679([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x2ce37f[_0x2f2679([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x363f8c,_0x363f8c+0x2));_0x4216dc>=_0x1f5533[_0x2f2679([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x4216dc-=_0x1f5533[_0x2f2679([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x220a05+=_0x1f5533[_0x4216dc];}return _0x220a05;}function _0x3ba6a3(){const _0x509546=_0x269ec5[_0x2f2679([0x73,0x70,0x6c,0x69,0x74])](_0x2f2679([0x2e]));if(0x3!=_0x509546[_0x2f2679([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x46fee0(_0x509546[0x1]);function _0x46fee0(_0x7f053c){const _0x10dca4=_0x450790(_0x7f053c);return _0x10dca4&&_0x3200d3()?_0x10dca4:null;function _0x3200d3(){const _0x3b2bf9=_0x10dca4[_0x2f2679([0x6a,0x74,0x69])],_0xd31e60=window[_0x2f2679([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x3b2bf9[_0x2f2679([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x3b2bf9[_0x2f2679([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x4a8f32={..._0x10dca4,[_0x2f2679([0x6a,0x74,0x69])]:_0x3b2bf9[_0x2f2679([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x3b2bf9[_0x2f2679([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x4a8f32[_0x2f2679([0x76,0x63])],_0x55cb30(_0x4a8f32)==_0xd31e60;}}}async function _0x3f9d9e(){let _0x46417b=!0x0;try{const _0x128a86=_0x269ec5[_0x2f2679([0x73,0x70,0x6c,0x69,0x74])](_0x2f2679([0x2e])),[_0x4cae80,_0x6c7c32,_0x3ab113]=_0x128a86;return _0x5ce64b(_0x4cae80),await _0x3275e8(_0x4cae80,_0x6c7c32,_0x3ab113),_0x46417b;}catch{return!0x1;}function _0x5ce64b(_0x3d30dc){const _0x51c12c=_0x450790(_0x3d30dc);_0x51c12c&&_0x51c12c[_0x2f2679([0x61,0x6c,0x67])]==_0x2f2679([0x45,0x53,0x32,0x35,0x36])||(_0x46417b=!0x1);}async function _0x3275e8(_0x312542,_0x484dab,_0x49b677){const _0x168a72=window[_0x2f2679([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x2f2679([0x66,0x72,0x6f,0x6d])](_0xd0a8(_0x49b677),_0x181446=>_0x181446[_0x2f2679([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x489380=new window[(_0x2f2679([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x2f2679([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x312542+_0x2f2679([0x2e])+_0x484dab),_0x47a7f3=window[_0x2f2679([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x2f2679([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x47a7f3)return;const _0x2a5764=await _0x47a7f3[_0x2f2679([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x2f2679([0x6a,0x77,0x6b]),_0x42ccc7,{[_0x2f2679([0x6e,0x61,0x6d,0x65])]:_0x2f2679([0x45,0x43,0x44,0x53,0x41]),[_0x2f2679([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x2f2679([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x2f2679([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x47a7f3[_0x2f2679([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x2f2679([0x6e,0x61,0x6d,0x65])]:_0x2f2679([0x45,0x43,0x44,0x53,0x41]),[_0x2f2679([0x68,0x61,0x73,0x68])]:{[_0x2f2679([0x6e,0x61,0x6d,0x65])]:_0x2f2679([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x2a5764,_0x168a72,_0x489380)||(_0x46417b=!0x1);}}function _0x450790(_0x41f0a1){return _0x41f0a1[_0x2f2679([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x2f2679([0x65,0x79]))?JSON[_0x2f2679([0x70,0x61,0x72,0x73,0x65])](_0xd0a8(_0x41f0a1)):null;}function _0xd0a8(_0x2c4f88){return window[_0x2f2679([0x61,0x74,0x6f,0x62])](_0x2c4f88[_0x2f2679([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x2f2679([0x2b]))[_0x2f2679([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x2f2679([0x2f])));}function _0x55cb30(_0x492f99){let _0x2c72a1=0x1505;function _0x5a65b5(_0x8bff1c){for(let _0x184e33=0x0;_0x184e33<_0x8bff1c[_0x2f2679([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x184e33++){const _0x3330ca=_0x8bff1c[_0x2f2679([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x184e33);_0x2c72a1=(_0x2c72a1<<0x5)+_0x2c72a1+_0x3330ca,_0x2c72a1&=_0x2c72a1;}}function _0x47ad0b(_0x1ee14b){Array[_0x2f2679([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x1ee14b)?_0x1ee14b[_0x2f2679([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x47ad0b):_0x1ee14b&&typeof _0x1ee14b==_0x2f2679([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x2f2679([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x1ee14b)[_0x2f2679([0x73,0x6f,0x72,0x74])]()[_0x2f2679([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x409c9a,_0x4a997c])=>{_0x5a65b5(_0x409c9a),_0x47ad0b(_0x4a997c);}):_0x5a65b5(window[_0x2f2679([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x1ee14b));}return _0x47ad0b(_0x492f99),_0x2c72a1>>>0x0;}function _0x33ca4f(_0x34e1ee){return _0x34e1ee[_0x2f2679([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x2f2679([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x2f2679([0x30]));}function _0x11264d(_0x961f8d){return _0x961f8d[_0x2f2679([0x73,0x70,0x6c,0x69,0x74])]('')[_0x2f2679([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x2f2679([0x6a,0x6f,0x69,0x6e])]('');}function _0x5b00b1(){}function _0x2f2679(_0x4899a2){return _0x4899a2['map'](_0x31bd55=>String['fromCharCode'](_0x31bd55))['join']('');}_0x5827f1(await _0x5ab2c0());}(this);}['showFakeVisualSelection'](){const _0x399d92=this['editor']['model'];_0x399d92['change'](_0x3c0334=>{const _0x2bb164=_0x399d92['document']['selection']['getRanges']();let _0x3a40a7=0x0;for(const _0xa11d2b of _0x2bb164){const _0x3e4a32=w+':'+_0x3a40a7;if(_0x399d92['markers']['has'](_0x3e4a32))_0x3c0334['updateMarker'](_0x3e4a32,{'range':_0xa11d2b});else{if(_0xa11d2b['start']['isAtEnd']){const _0x5e25cb=_0xa11d2b['start']['getLastMatchingPosition'](({item:_0x4d6373})=>!_0x399d92['schema']['isContent'](_0x4d6373),{'boundaries':_0xa11d2b});_0x3c0334['addMarker'](_0x3e4a32,{'usingOperation':!0x1,'affectsData':!0x1,'range':_0x3c0334['createRange'](_0x5e25cb,_0xa11d2b['end'])});}else _0x3c0334['addMarker'](_0x3e4a32,{'usingOperation':!0x1,'affectsData':!0x1,'range':_0xa11d2b});}_0x3a40a7++;}});}['hideFakeVisualSelection'](){const _0x4d6e4c=this['editor']['model'],_0x5a98cb=Array['from'](this['editor']['model']['markers']['getMarkersGroup'](w));_0x5a98cb['length']&&_0x4d6e4c['change'](_0x29bc67=>{_0x5a98cb['forEach'](_0xeb1cf8=>{_0x29bc67['removeMarker'](_0xeb1cf8);});});}['insertContent'](_0x26eadf,_0x1976a7){const _0xa15539=this['_getAISelection'](),_0x5d21ba=_0x1976a7||_0xa15539['getFirstRange']();this['editor']['model']['canEditAt'](_0x5d21ba)&&this['editor']['model']['change'](_0x210997=>{this['hideFakeVisualSelection'](),_0x1976a7||this['_resetContentOfSelectedTableCells'](_0x210997,_0xa15539),this['_pasteHTMLUsingClipboard']({'insertAt':_0x5d21ba,'writer':_0x210997,'html':_0x26eadf});});}['insertContentBelow'](_0x3c8d7a){const {model:_0x3ce2f2}=this['editor'],_0x3031b1=this['_getAISelection']();_0x3ce2f2['change'](()=>{const _0x4ebd47=this['_prepareTableInsertBelowPosition'](_0x3c8d7a,_0x3031b1)||this['_getDefaultInsertBelowPosition'](_0x3031b1);this['insertContent'](_0x3c8d7a,_0x4ebd47);});}['_getAISelection'](){const _0x41a8a3=this['editor']['model'],_0x368cd9=Array['from'](_0x41a8a3['markers']['getMarkersGroup'](w))['map'](_0x2ee88c=>_0x2ee88c['getRange']());return _0x41a8a3['createSelection'](_0x368cd9);}['_pasteHTMLUsingClipboard']({writer:_0x120ff8,html:_0x58b394,insertAt:_0x162ee1}){const {view:_0x264c16}=this['editor']['editing'],_0x11069e=this['editor']['plugins']['get'](_0x16a737),_0x2c42d0=new gt();_0x2c42d0['setData']('text/html',_0x58b394);const _0x24d2d1=new ClipboardEvent('paste',{'clipboardData':_0x2c42d0}),_0x2a3f9e=new _0x565093(_0x264c16,_0x24d2d1,{'dataTransfer':new _0x2e0788(_0x2c42d0)});_0x120ff8['setSelection'](_0x162ee1);const _0x76830f=(_0x1e0790,_0x14353e)=>{_0x14353e['resultRange']&&_0x120ff8['setSelection'](_0x14353e['resultRange']);};_0x11069e['once']('contentInsertion',_0x76830f,{'priority':'lowest'}),_0x264c16['document']['fire']('paste',_0x2a3f9e),_0x11069e['off']('contentInsertion',_0x76830f);}['_getDefaultInsertBelowPosition'](_0x2b830c){const {model:_0x98db23}=this['editor'],_0x30b2d2=Array['from'](_0x2b830c['getSelectedBlocks']());return _0x30b2d2['length']?_0x98db23['createPositionAfter'](_0x30b2d2['pop']()):_0x2b830c['getLastPosition']();}['_prepareTableInsertBelowPosition'](_0x2f963a,_0x22f387){const {model:_0x39f2d3,plugins:_0x4e8f05}=this['editor'];if(_0x4e8f05['has']('TableUtils')){const _0x40d105=_0x4e8f05['get']('TableUtils')['getSelectedTableCells'](_0x22f387);if(_0x40d105['length']){const _0x4dd917=this['_getTableRowCountFromContent'](_0x2f963a),_0x6bd350=this['_createEmptyTableRows'](_0x40d105,_0x4dd917);return _0x39f2d3['createPositionAt'](_0x6bd350,0x0);}}return null;}['_getTableRowCountFromContent'](_0x486356){const _0x23d6e2=this['editor']['plugins']['get']('TableUtils'),_0x230fd3=this['editor']['data']['parse'](_0x486356),_0x485302=Array['from'](_0x230fd3['getChildren']())['filter'](_0x200fd1=>_0x200fd1['is']('element','table'));let _0x1319e7=0x0;return _0x485302['forEach'](_0x2eb7f3=>{_0x1319e7+=_0x23d6e2['getRows'](_0x2eb7f3);}),_0x1319e7;}['_createEmptyTableRows'](_0x235889,_0x28d4b6){const _0x169171=this['editor']['plugins']['get']('TableUtils'),_0x4b0634=_0x169171['getRowIndexes'](_0x235889),_0x20497d=_0x169171['getColumnIndexes'](_0x235889),_0x4c541c=_0x4b0634['last']+0x1,_0x2cb2a1=_0x20497d['first'],_0x16d0ae=_0x235889[0x0]['findAncestor']('table');for(let _0x2c2a09=0x0;_0x2c2a09<_0x28d4b6;_0x2c2a09++)_0x169171['insertRows'](_0x16d0ae,{'at':_0x4c541c});return _0x16d0ae['getChild'](_0x4c541c)['getChild'](_0x2cb2a1);}['_resetContentOfSelectedTableCells'](_0x2f1240,_0x19eedb){const {plugins:_0x4408e3}=this['editor'],{model:_0x23647f}=_0x2f1240;if(!_0x4408e3['has']('TableUtils'))return;_0x4408e3['get']('TableUtils')['getSelectedTableCells'](_0x19eedb)['length']&&_0x23647f['deleteContent'](_0x19eedb);}}class x extends _0x2d1d32{static get['pluginName'](){return'AIAdapter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['afterInit'](){if(!this['textAdapter'])throw new _0x5038d9('aiadapter-text-adapter-not-set',null);}}class R extends Error{constructor(_0x29c0df){super(_0x29c0df),this['name']='AIRequestError';}}function i(_0x444b47,_0x494140,_0x2744ca){const t=_0x444b47['t'];switch(_0x494140){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',_0x2744ca);case'Error\x20during\x20AI\x20content\x20generation:\x20%0':return t('Error\x20during\x20AI\x20content\x20generation:\x20%0',_0x2744ca);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'},_0x2744ca);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 _0x494140;}}class E extends _0x232af3{['_commandDefinitions'];constructor(_0x1e632c,_0x2ce60b){super(_0x1e632c),this['_commandDefinitions']=_0x2ce60b,this['set']('enabledCommandsIds',[]),this['on']('change:_hasContext',(_0x3c3578,_0x565f56,_0x113ddf)=>{this['isEnabled']&&(this['enabledCommandsIds']=F(this['_commandDefinitions'],_0x113ddf));}),this['set']('_hasContext',!0x1),this['on']('change:isEnabled',(_0x11c362,_0x1acba7,_0x291ddd)=>{this['enabledCommandsIds']=_0x291ddd?F(this['_commandDefinitions'],this['_hasContext']):[];});}['refresh'](){const _0x54e5d2=this['editor']['model'];this['_hasContext']=function(_0x4f5f9e){const _0x3ccb77=_0x4f5f9e['document']['selection'];return _0x3ccb77['isCollapsed']?0x0!==[..._0x3ccb77['getSelectedBlocks']()]['length']&&![..._0x3ccb77['getSelectedBlocks']()][0x0]['isEmpty']:!!_0x4f5f9e['hasContent'](_0x3ccb77['getFirstRange']());}(_0x54e5d2);const _0x11422b=_0x54e5d2['document']['selection'],_0x37aa92=this['editor']['config']['get']('ai.aiAssistant.disabledElements');for(const _0x1d5bc4 of _0x11422b['getRanges']())for(const _0x5392fd of _0x1d5bc4['getItems']())if(_0x5392fd['is']('element')&&_0x37aa92['includes'](_0x5392fd['name']))return void(this['isEnabled']=!0x1);this['isEnabled']=!0x0;}['execute'](_0x25d0d6='',_0x9225e7='',_0x244351='custom'){this['editor']['plugins']['get'](n)['showUI'](_0x25d0d6,_0x9225e7,_0x244351);}}function F(_0x240b0d,_0x5d66b0){const _0x4d1d01=new Set();for(const _0x478fe9 of _0x240b0d['values']())(_0x5d66b0||!0x1===_0x478fe9['requiresContent'])&&_0x4d1d01['add'](_0x478fe9['id']);return Array['from'](_0x4d1d01);}const Q=new RegExp(/^(.*?)<[a-zA-Z][a-zA-Z0-9_\-.]*[ >]/,'is');class j extends/* #__PURE__ -- @preserve */
24
+ _0x8cf721(){['editor'];['textAdapter'];['view'];['_sanitizationContainer'];['_domParser'];['_xmlSerializer'];constructor(_0x4f89f5,_0x42359e,_0x3ad26a){super(),this['editor']=_0x4f89f5,this['textAdapter']=_0x42359e,this['_sanitizationContainer']=document['createElement']('div'),this['_domParser']=new DOMParser(),this['_xmlSerializer']=new XMLSerializer(),this['view']=_0x3ad26a,this['set']({'initialContext':'','currentContext':'','currentResponse':'','previousContext':void 0x0,'previousQuery':void 0x0,'previousLabel':void 0x0,'isProcessing':!0x1}),this['on']('set:currentContext',(_0x315aa2,_0x10e2db,_0x196f2d)=>{this['view']['value']=this['_sanitizeHTML'](_0x196f2d);}),this['listenTo'](this['view'],'submitPrompt',(_0x596534,_0x51cca9)=>{const _0x5d481c=this['currentContext']||this['initialContext'];this['_handleQuery'](_0x51cca9,_0x5d481c,'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:_0x3f2191,query:_0x14312a,htmlContent:_0x3caa69,label:_0x50acc0,mainActionLabel:_0x385585}){this['view']['prompt']=_0x50acc0,this['view']['mainAction']=_0x385585,this['initialContext']=_0x3caa69,_0x14312a&&(this['view']['isRendered']?this['_handleQuery'](_0x14312a,_0x3caa69,_0x3f2191,_0x50acc0):this['view']['once']('render',()=>{this['_handleQuery'](_0x14312a,_0x3caa69,_0x3f2191,_0x50acc0);}));}['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'](_0x2515c3,_0x1a6cc4,_0x5bc3f4,_0x2ce31b){return this['isProcessing']=!0x0,this['view']['startProcessing'](),this['previousContext']=_0x1a6cc4,this['previousQuery']=_0x2515c3,this['previousLabel']=_0x2ce31b||_0x2515c3,this['previousActionId']=_0x5bc3f4,new Promise(_0x1418e2=>{this['textAdapter']['makeRequest']({'query':_0x2515c3,'context':_0x1a6cc4,'onData':_0xc4bc2f=>{this['currentResponse']=_0xc4bc2f,this['currentContext']=this['_parseAndNormalizeContent'](this['currentResponse']);},'actionId':_0x5bc3f4})['then'](()=>{!this['currentContext']&&this['currentResponse']&&(this['currentContext']=this['_parseAndNormalizeContent'](this['currentResponse'],!0x0));})['catch'](_0x242585=>{_0x242585 instanceof R?this['view']['handleError'](_0x242585['message']):this['view']['handleError'](),_0x1418e2();})['finally'](()=>{this['stopProcessing'](),_0x1418e2();});});}['_parseAndNormalizeContent'](_0x1622f0,_0x39d6c7=!0x1){const _0x49b65a=Q['exec'](_0x1622f0);_0x1622f0=_0x49b65a?_0x1622f0['substring'](_0x49b65a[0x1]['length']):_0x1622f0['length']<0x64&&!_0x39d6c7?'':this['_stripMarkdownSyntax'](_0x1622f0);const _0x56d0e3=this['_domParser']['parseFromString'](_0x1622f0,'text/html');if(_0x49b65a){const _0xbc1bf5=Array['from'](_0x56d0e3['body']['childNodes']);_0xbc1bf5['reverse']();for(const _0x2ad54a of _0xbc1bf5){if(_0x2ad54a['nodeType']==Node['ELEMENT_NODE'])break;_0x2ad54a['remove']();}}const _0x4f1cd1=this['editor']['data']['processor']['toView'](this['_xmlSerializer']['serializeToString'](_0x56d0e3['body']));this['_isH1TagSupportEnabled']()||this['_normalizeResponseHeadings'](_0x4f1cd1);const _0x338886=this['editor']['config']['get']('ai.aiAssistant.preserveComments'),_0x42d194=this['editor']['data']['toModel'](_0x4f1cd1);return _0x338886||_0x42d194['markers']['clear'](),this['editor']['data']['stringify'](_0x42d194);}['_normalizeResponseHeadings'](_0x2aacca){const _0xa4baef=new _0x545b9b(this['editor']['editing']['view']['document']),_0x4dc590=new _0x21b667({'name':/^h[1-5]$/}),_0x329642=[];let _0x4a671f=!0x1;for(const _0x4545da of _0x2aacca)_0x4545da['is']('element')&&_0x4dc590['match'](_0x4545da)&&(_0x329642['push'](_0x4545da),'h1'==_0x4545da['name']&&(_0x4a671f=!0x0));if(_0x4a671f){for(const _0x217018 of _0x329642)_0xa4baef['rename']('h'+(parseInt(_0x217018['name'][0x1])+0x1),_0x217018);}}['_isH1TagSupportEnabled'](){const {data:_0x23984e,editing:_0x2e32fc}=this['editor'],_0x43ace4=_0x23984e['htmlProcessor']['toView']('<h1></h1>'),_0x1df1e8=_0x23984e['toView'](_0x23984e['toModel'](_0x43ace4));return!!_0x2e32fc['view']['domConverter']['viewToDom'](_0x1df1e8)['querySelector']('h1');}['_sanitizeHTML'](_0x541f01){return this['editor']['editing']['view']['domConverter']['setContentOf'](this['_sanitizationContainer'],_0x541f01),this['_sanitizationContainer']['innerHTML'];}['_stripMarkdownSyntax'](_0xffdccb){const _0x33ff39=_0xffdccb['trim']();return _0x33ff39['startsWith']('```html')?_0x33ff39['endsWith']('```')?_0x33ff39['substring'](0x7,_0x33ff39['length']-0x3):_0x33ff39['substring'](0x7):_0xffdccb;}}const _={'REPLACE':'replace','INSERT':'insert'};class at extends ot{constructor(_0x195e77){super(_0x195e77),this['set']('isVisible',!0x1),this['set']('mainAction',_['REPLACE']),this['replaceButton']=this['_createButton']('','ck-button-action'),this['replaceButton']['bind']('label')['to'](this,'mainAction',_0xfe7fae=>i(_0x195e77,'AI_'+_0xfe7fae['toUpperCase']()+'_CONTENT')),this['insertButton']=this['_createButton'](i(_0x195e77,'Insert\x20below')),this['tryAgainButton']=this['_createButton'](i(_0x195e77,'Try\x20again')),this['stopButton']=this['_createButton'](i(_0x195e77,'Stop'));const _0x133b52=this['bindTemplate'];this['extendTemplate']({'attributes':{'class':['ck-ai-form__toolbar',_0x133b52['if']('isVisible','ck-hidden',_0x1349b9=>!_0x1349b9)]}}),this['items']['addMany']([this['replaceButton'],this['insertButton'],this['tryAgainButton'],this['stopButton']]);}['_createButton'](_0x489795,_0x18f18c){const _0x4ea4d7=new _0x26e4f0(this['locale']);return _0x4ea4d7['set']({'label':_0x489795,'class':_0x18f18c||'','isVisible':!0x0,'withText':!0x0}),_0x4ea4d7;}}class ct extends _0x4c348a{['contentFieldView'];['copyButtonView'];constructor(_0x46b285,_0x139984=''){super(_0x46b285),this['set']({'value':null,'isVisible':!0x1,'isProcessing':!0x1});const _0x1eea58=this['bindTemplate'];this['contentFieldView']=new bt(_0x46b285,_0x139984),this['copyButtonView']=this['_createCopyButton'](),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form__content-area-wrapper',_0x1eea58['if']('isVisible','ck-hidden',_0xf785d8=>!_0xf785d8)],'tabindex':'-1'},'children':[{'tag':'div','attributes':{'class':['ck','ck-ai-form__content-area',_0x1eea58['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 _0x112214=!0x1;this['on']('change:value',(_0x473520,_0x113229,_0x8ce73f)=>{const _0x2604e0=!this['contentFieldView']['element']['querySelector']('.ck-ai-form__loader');this['contentFieldView']['setContent'](_0x8ce73f),this['isProcessing']&&_0x2604e0&&!_0x112214&&this['element']['scrollTo']({'top':this['element']['scrollHeight'],'behavior':'smooth'});}),this['on']('change:isProcessing',(_0x1060bb,_0xa6146a,_0x3a4b88)=>{_0x112214=!0x1,_0x3a4b88?(this['value']=null,this['contentFieldView']['appendLoader']()):this['value']||this['contentFieldView']['setContent']('');}),this['listenTo'](this['element'],'wheel',()=>{_0x112214=!0x0;}),this['listenTo'](this['element'],'mousedown',()=>{_0x112214=!0x0;});}['focus'](){this['element']['focus']();}['_createCopyButton'](){const _0x40651b=this['locale'],_0x1c991d=new _0x26e4f0(this['locale']),_0x8a85ef='ck-ai-form__copy-button';return _0x1c991d['set']({'label':i(_0x40651b,'Copy'),'icon':_0x3deb9c,'class':_0x8a85ef,'tooltip':!0x0}),_0x1c991d['bind']('isVisible')['to'](this,'value',_0x56ec8e=>!!_0x56ec8e),_0x1c991d['bind']('isEnabled')['to'](this,'isProcessing',_0x192a04=>!_0x192a04),_0x1c991d['on']('execute',()=>{this['_copyHTMLToClipboard'](this['contentFieldView']['element']),_0x1c991d['icon']=_0x3c90d9,_0x1c991d['class']=_0x8a85ef+'\x20ck-ai-form__copy-button--copied',this['focus'](),setTimeout(()=>{_0x1c991d['icon']=_0x3deb9c,_0x1c991d['class']=_0x8a85ef;},0x3e8);}),_0x1c991d;}['_copyHTMLToClipboard'](_0x5221a8){const {window:_0x4567c7,document:_0x4afd7c}=_0x10ddad;if(_0x4567c7['ClipboardItem']){const {Blob:_0x116332,ClipboardItem:_0x5199ee}=_0x4567c7,_0x118888=[new _0x5199ee({'text/html':new _0x116332([_0x5221a8['innerHTML']],{'type':'text/html'}),'text/plain':new _0x116332([_0x5221a8['textContent']||''],{'type':'text/plain'})})];navigator['clipboard']['write'](_0x118888);}else{const _0x57ef89=_0x4afd7c['createElement']('div');_0x57ef89['style']['position']='absolute',_0x57ef89['style']['left']='-9999px',_0x57ef89['innerHTML']='<span>[</span>'+_0x5221a8['innerHTML']+'<span>]</span>',_0x4afd7c['body']['appendChild'](_0x57ef89);const _0x3ccc6e=_0x4afd7c['createRange']();_0x3ccc6e['setStartAfter'](_0x57ef89['firstElementChild']),_0x3ccc6e['setEndBefore'](_0x57ef89['lastElementChild']);const _0x299226=_0x4567c7['getSelection']();_0x299226['removeAllRanges'](),_0x299226['addRange'](_0x3ccc6e),_0x4afd7c['execCommand']('copy'),_0x57ef89['remove']();}}}class bt extends _0x4c348a{constructor(_0x5c493e,_0x174d0f=''){super(_0x5c493e),this['loaderView']=this['_createLoader'](),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-content',_0x174d0f,'ck-reset_all-excluded','ck-ai-form__content-field']}});}['setContent'](_0x4992f9){this['element']['innerHTML']=_0x4992f9;}['appendLoader'](){this['element']['appendChild'](this['loaderView']['element']);}['_createLoader'](){const _0x4602e3=new _0x4c348a(),_0x1d0ba6=this['locale'],_0x3b5813=new _0x7b6e84();return _0x3b5813['isVisible']=!0x0,_0x4602e3['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form__loader']},'children':[_0x3b5813,{'text':i(_0x1d0ba6,'AI\x20is\x20writing...')}]}),_0x4602e3['render'](),_0x4602e3;}}class mt extends _0x4c348a{constructor(_0x2448a0,_0x23ef23=''){super(_0x2448a0);const _0x4cb31c=new _0x520ab5(),_0x110973=this['bindTemplate'];this['set']('text',_0x23ef23),_0x4cb31c['content']=_0x5e3cca,this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form__error']},'children':[_0x4cb31c,{'text':_0x110973['to']('text')}]});}}class lt extends st{['submitButtonView'];['showHistoryButtonView'];constructor(_0x2fd757,_0x4e4b96){super(_0x2fd757,_0x4e4b96),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',(_0x40f3e6,_0x2466f7)=>{_0x40f3e6['target']==this['queryView']['fieldView']['element']&&(this['submit'](),_0x2466f7());});}['_createSubmitButton'](){const _0x4aec8e=new _0x26e4f0(this['locale']),_0x3b71c8=this['locale'];return _0x4aec8e['set']({'icon':it,'label':i(_0x3b71c8,'Submit'),'isVisible':!0x0,'tooltip':!0x0,'class':'ck-ai-form__submit'}),_0x4aec8e['on']('execute',()=>{this['submit']();}),_0x4aec8e['bind']('isEnabled')['to'](this['queryView']['fieldView'],'isEmpty',this,'isEnabled',(_0x4d489c,_0x942c02)=>!_0x4d489c&&_0x942c02),_0x4aec8e;}['_createShowHistoryButton'](){const _0x362bc4=new _0x26e4f0(this['locale']),_0x11f740=this['resultsView'],_0x5952b2=this['locale'];_0x362bc4['set']({'label':i(_0x5952b2,'History'),'withText':!0x1,'icon':tt,'tooltip':!0x0,'tooltipPosition':'sw','class':'ck-ai-form__toggle-history'}),_0x362bc4['bind']('isOn')['to'](_0x11f740,'isVisible'),_0x362bc4['bind']('isEnabled')['to'](this,'isEnabled'),_0x362bc4['on']('execute',()=>{_0x11f740['isVisible']=!_0x11f740['isVisible'],_0x11f740['isVisible']?this['filteredView']['focus']():this['focus']();});const _0x33efe5=()=>{_0x10ddad['window']['requestAnimationFrame'](()=>{if(_0x3d06cb(this['element'])){const _0x311a29=new _0xf542e8(this['queryView']['fieldView']['element']),_0x59d2d2=_0x311a29['width'],_0x2d51fe='rtl'===_0x5952b2['uiLanguageDirection']?'left':'right';_0x311a29['excludeScrollbarsAndBorders'](),_0x362bc4['element']['style'][_0x2d51fe]=_0x59d2d2-_0x311a29['width']+0x1+'px';}});};return this['queryView']['fieldView']['on']('update',_0x33efe5),this['on']('render',_0x33efe5),_0x362bc4;}['submit'](){const _0x581ede=this['queryView']['fieldView']['element']['value'];this['fire']('submit',_0x581ede);}['focus'](_0x467bf0){-0x1===_0x467bf0?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}}class pt extends yt{['historyGroupView'];['clearHistoryButton'];constructor(_0x39ca3a){super(_0x39ca3a),this['clearHistoryButton']=this['_createClearHistoryButton'](),this['historyGroupView']=new Ct(),this['historyGroupView']['children']['add'](this['clearHistoryButton'],0x1),this['historyGroupView']['label']=i(_0x39ca3a,'Prompt\x20history'),this['historyGroupView']['items']['delegate']('execute')['to'](this),this['items']['add'](this['historyGroupView']);}['filter'](){let _0x2b8e58=0x0;for(const _0x59b1a2 of this['items'])_0x2b8e58+=_0x59b1a2['items']['length'];return{'resultsCount':_0x2b8e58,'totalItemsCount':_0x2b8e58};}['_createClearHistoryButton'](){const _0x1b3396=this['locale'],_0x471883=new _0x26e4f0(this['locale']);return _0x471883['set']({'label':'('+i(_0x1b3396,'Clear')+')','withText':!0x0}),_0x471883['on']('execute',()=>this['fire']('clearHistory')),_0x471883;}}class ut extends xt{constructor(_0x3fdcc8){super();const _0x422f1a=new wt(),_0x18f0f0=new _0x26e4f0(this['locale'],_0x422f1a);this['children']['add'](_0x18f0f0),_0x18f0f0['set']({'label':_0x3fdcc8['prompt'],'withText':!0x0}),_0x18f0f0['on']('execute',()=>{this['fire']('execute',{'value':kt(_0x3fdcc8['prompt'])});});}}const ts='CKEditor/AIFormView/PromptHistory';class dt extends _0x50b992{constructor(){super(),this['_loadFromSessionStorage'](),this['on']('add',(_0x46920c,_0xdfe2bd)=>{const _0x46cb42=os(_0xdfe2bd['prompt']);for(const _0x3f072e of this)if(_0x3f072e!=_0xdfe2bd&&os(_0x3f072e['prompt'])===_0x46cb42){this['remove'](_0x3f072e);break;}this['length']>0x14&&this['remove'](this['last']),this['_saveToSessionStorage']();}),this['on']('remove',()=>{this['_saveToSessionStorage']();});}['_loadFromSessionStorage'](){const _0x5ec535=sessionStorage['getItem'](ts)||'[]';this['addMany'](JSON['parse'](_0x5ec535));}['_saveToSessionStorage'](){sessionStorage['setItem'](ts,JSON['stringify'](this['map'](_0x25ac87=>_0x25ac87)));}}function os(_0x56cf9f){return _0x56cf9f['toLowerCase']()['trim']();}class k extends _0x4c348a{['focusTracker'];['keystrokes'];['contentArea'];['toolbar'];['promptView'];['errorView'];['_focusables'];['focusCycler'];['_promptHistory'];constructor(_0x2adf17,_0x4affc5,_0x132200=''){super(_0x2adf17),this['set']('isEnabled',!0x0),this['set']('isProcessing',!0x1),this['set']('prompt',''),this['set']('value',''),this['set']('isError',!0x1),this['set']('mainAction',_['REPLACE']),this['_promptHistory']=new dt(),this['errorView']=new mt(_0x2adf17),this['contentArea']=new ct(_0x2adf17,_0x132200),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 et(),this['keystrokes']=new rt(),this['_focusables']=this['createCollection']([this['contentArea'],this['contentArea']['copyButtonView'],this['toolbar'],this['promptView']]),this['focusCycler']=new ht({'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 _0x21122c=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form',_0x4affc5],'tabindex':'-1'},'children':[{'tag':'div','attributes':{'class':['ck','ck-ai-form-content']},'children':[{'tag':'div','attributes':{'class':[_0x21122c['if']('isError','ck-hidden',_0x44a1ba=>!_0x44a1ba)]},'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'](_0x1a5bb8=0x1){-0x1===_0x1a5bb8?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 _0x5e4bf4=this['locale'],_0x52c0be=new lt(_0x5e4bf4,{'queryView':{'label':i(_0x5e4bf4,'Ask\x20AI\x20to\x20edit\x20or\x20generate'),'creator':nt,'showIcon':!0x1,'showResetButton':!0x1},'infoView':{'text':{'noSearchableItems':{'primary':i(_0x5e4bf4,'Empty\x20history'),'secondary':i(_0x5e4bf4,'Ask\x20AI\x20and\x20your\x20prompts\x20will\x20be\x20listed\x20here\x20for\x20you\x20to\x20use\x20later.')}}},'filteredView':this['_createHistoryView'](),'queryMinChars':0x1/0x0,'resetOnBlur':!0x1});return _0x52c0be['bind']('isEnabled')['to'](this,'isEnabled',this,'isProcessing',(_0x432720,_0x599fec)=>_0x432720&&!_0x599fec),this['listenTo'](_0x52c0be,'submit',(_0x1874cd,_0x35dad0)=>{this['prompt']=_0x35dad0;const _0x58efec=ft(_0x35dad0);this['fire']('submitPrompt',_0x58efec),_0x35dad0['trim']()&&this['_promptHistory']['add']({'prompt':_0x58efec},0x0);},{'priority':'high'}),_0x52c0be;}['_createHistoryView'](){const _0x430d49=new pt(this['locale']);return _0x430d49['historyGroupView']['items']['bindTo'](this['_promptHistory'])['as'](ut),_0x430d49['on']('clearHistory',()=>{this['_promptHistory']['clear'](),this['promptView']['search'](''),this['promptView']['focus']();}),_0x430d49;}['_createToolbar'](){const _0x2026f1=new at(this['locale']);return _0x2026f1['replaceButton']['bind']('isEnabled')['to'](this,'isEnabled',this,'isProcessing',this,'value',(_0x20fdc7,_0x80d35f,_0x29a049)=>_0x20fdc7&&!_0x80d35f&&!!_0x29a049),_0x2026f1['replaceButton']['delegate']('execute')['to'](this,'replaceContent'),_0x2026f1['insertButton']['bind']('isEnabled')['to'](this,'isEnabled',this,'isProcessing',this,'value',(_0x4f3810,_0x290ea2,_0x1ed44b)=>_0x4f3810&&!_0x290ea2&&!!_0x1ed44b),_0x2026f1['insertButton']['delegate']('execute')['to'](this,'insertContentBelow'),_0x2026f1['tryAgainButton']['bind']('isEnabled')['to'](this,'isEnabled',this,'isProcessing',(_0x409112,_0x487526)=>_0x409112&&!_0x487526),_0x2026f1['tryAgainButton']['delegate']('execute')['to'](this,'tryAgainEvent'),_0x2026f1['stopButton']['bind']('isEnabled')['to'](this,'isProcessing'),_0x2026f1['stopButton']['delegate']('execute')['to'](this,'stopProcessing'),_0x2026f1;}['startProcessing'](){this['value']='',this['isError']=!0x1,this['isProcessing']=!0x0,this['contentArea']['isVisible']=!0x0,this['toolbar']['isVisible']=!0x0,this['contentArea']['focus']();}['finishProcessing'](){const _0x5ca913=this['locale'];this['isProcessing']=!0x1,this['prompt']='',this['promptView']['reset'](),this['value']&&(this['promptView']['queryView']['label']=i(_0x5ca913,'Ask\x20AI\x20to\x20improve\x20generated\x20text'));}['handleError'](_0x41d54){const _0x3137dd=this['locale'];this['finishProcessing'](),this['isError']=!0x0,this['errorView']['text']=_0x41d54||i(_0x3137dd,'AI_ERROR_FAILED'),this['value']||(this['contentArea']['isVisible']=!0x1);}}const l=globalThis['DataTransfer'];class n extends _0x2d1d32{['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[_0x324d39,a,x,_0x78ce67];}constructor(_0x14f5c1){super(_0x14f5c1),_0x14f5c1['config']['define']('ai.aiAssistant.disabledElements',['media','rawHtml','tableOfContents']),_0x14f5c1['config']['define']('ai.aiAssistant.contentAreaCssClass',''),_0x14f5c1['config']['define']('ai.useTheme',!0x0),this['_uiCssClasses']='ck-ai-assistant-ui'+(_0x14f5c1['config']['get']('ai.useTheme')?'\x20ck-ai-assistant-ui_theme':'');}['init'](){const {editor:_0x466386}=this;this['_aiAdapter']=_0x466386['plugins']['get'](x),this['_dialog']=_0x466386['plugins']['get'](_0x78ce67),this['_formView']=null,this['_commandDefinitions']=this['_getResolvedCommandsDefinitions']();const _0x14cd0b=new E(_0x466386,Array['from'](this['_commandDefinitions']['values']()));_0x466386['commands']['add']('showAIAssistant',_0x14cd0b),_0x466386['ui']['componentFactory']['add']('aiCommands',_0x29f878=>{const _0x3fcc67=_0x4943e6(_0x29f878);return _0x3fcc67['set']({'class':'ck-ai-commands-dropdown\x20'+this['_uiCssClasses']}),_0x3fcc67['buttonView']['set']({'label':i(_0x29f878,'AI\x20Commands'),'icon':_0x2380a6,'tooltip':!0x0}),_0x3fcc67['on']('execute',_0x47ea61=>this['_onExecute'](_0x47ea61['source']['id'])),_0x20359e(_0x3fcc67,_0x466386['ui']['view']['body'],function(_0x3c13c6){const _0x1050ba=o(_0x3c13c6['config']['get']('ai.aiAssistant.commands'),_0x3c13c6['locale']),_0x5d1c81=U(_0x3c13c6,_0x1050ba)['filter'](_0x49a7f6=>_0x49a7f6['commands']['length']);if(0x1===_0x5d1c81['length'])return U(_0x3c13c6,_0x5d1c81[0x0]['commands'])['map'](_0x5e6385=>({'id':_0x5e6385['id'],'label':_0x5e6385['label']}));return _0x5d1c81['map'](_0x372e13=>{const {groupId:_0x5d2ec8,groupLabel:_0xb84e63,commands:_0x4c7356}=_0x372e13,_0x35dd61=U(_0x3c13c6,_0x4c7356)['map'](_0x15c518=>({'id':_0x15c518['id'],'label':_0x15c518['label']}));return{'id':_0x5d2ec8,'menu':_0xb84e63||_0x5d2ec8,'children':_0x35dd61};});}(_0x466386),{'ariaLabel':i(_0x29f878,'AI\x20Commands')}),_0x3fcc67['menuView']['menuPanelClass']='ck-ai-commands-dropdown\x20'+this['_uiCssClasses'],_0x14cd0b['on']('change:enabledCommandsIds',_0x53b476),_0x3fcc67['menuView']['once']('render',_0x53b476),_0x3fcc67;function _0x53b476(){_0x3fcc67['isEnabled']=_0x14cd0b['enabledCommandsIds']['length']>0x0;for(const _0x22b999 of _0x3fcc67['menuView']['buttons'])_0x22b999['isEnabled']=_0x14cd0b['enabledCommandsIds']['includes'](_0x22b999['id']);}}),_0x466386['ui']['componentFactory']['add']('menuBar:aiCommands',_0x50fb94=>{const _0xa6c704=new _0x2c51f0(_0x50fb94);_0xa6c704['buttonView']['set']({'label':i(_0x50fb94,'AI\x20Commands'),'icon':_0x2380a6}),_0xa6c704['bind']('isEnabled')['to'](_0x14cd0b,'enabledCommandsIds',_0x575e6=>_0x575e6['length']>0x0);const _0x5e3183=o(_0x466386['config']['get']('ai.aiAssistant.commands'),_0x50fb94);return this['_populateMenuBarMenu'](_0x14cd0b,_0xa6c704,_0x5e3183,_0x11bf23=>this['_onExecute'](_0x11bf23)),_0xa6c704;}),_0x466386['ui']['componentFactory']['add']('aiAssistant',()=>{const _0x4d70a0=this['_createAIAssistantUIButton'](_0x26e4f0);return _0x4d70a0['set']({'tooltip':!0x0,'class':'ck-ai-assistant-button\x20'+this['_uiCssClasses']}),_0x4d70a0;}),_0x466386['ui']['componentFactory']['add']('menuBar:aiAssistant',()=>{const _0x38be26=this['_createAIAssistantUIButton'](_0x4b8772);return _0x38be26['set']({'role':'menuitemcheckbox'}),_0x38be26;}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x203cb2=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x43467f;for(const _0x128f10 in _0x203cb2){const _0x463d6a=_0x128f10,_0x3cc568=_0x203cb2[_0x463d6a];if('aiLicenseKeyValid'==_0x3cc568||'aiLicenseKeyInvalid'==_0x3cc568||'aiLicenseKeyExpired'==_0x3cc568||'aiLicenseKeyDomainLimit'==_0x3cc568||'aiLicenseKeyNotAllowed'==_0x3cc568||'aiLicenseKeyEvaluationLimit'==_0x3cc568||'aiLicenseKeyTrialLimit'==_0x3cc568||'aiLicenseKeyUsageLimit'==_0x3cc568){delete _0x203cb2[_0x463d6a],_0x43467f=_0x3cc568,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'aiLicenseKeyInvalid'==_0x43467f&&_0x203cb2['_showLicenseError']('invalid'),'aiLicenseKeyExpired'==_0x43467f&&_0x203cb2['_showLicenseError']('expired'),'aiLicenseKeyDomainLimit'==_0x43467f&&_0x203cb2['_showLicenseError']('domainLimit'),'aiLicenseKeyNotAllowed'==_0x43467f&&_0x203cb2['_showLicenseError']('featureNotAllowed','AIAssistant'),'aiLicenseKeyEvaluationLimit'==_0x43467f&&_0x203cb2['_showLicenseError']('evaluationLimit'),'aiLicenseKeyTrialLimit'==_0x43467f&&_0x203cb2['_showLicenseError']('trialLimit'),'aiLicenseKeyUsageLimit'==_0x43467f&&_0x203cb2['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['showUI'](_0x70dc1f='',_0x269f61='',_0x442fad='custom'){const _0x53c1b6=this['editor'],_0x3b4d93=_0x53c1b6['editing']['view'],_0x4ef457=_0x53c1b6['plugins']['get'](a),_0x16352f=_0x53c1b6['plugins']['get'](_0x324d39);_0x4ef457['showFakeVisualSelection']();const _0x44d642=new l(),_0x549797=new ClipboardEvent('copy',{'clipboardData':_0x44d642}),_0x27ba92=new _0x2e0788(_0x44d642),_0x38fb5b=new _0x565093(_0x3b4d93,_0x549797,{'dataTransfer':_0x27ba92});_0x16352f['_forceMarkersCopy']('comment',()=>{_0x3b4d93['document']['fire']('copy',_0x38fb5b);}),this['_formView']||(this['_initView'](),this['_aiAssistantController']=new j(_0x53c1b6,this['_aiAdapter']['textAdapter'],this['_formView']));let _0x245da0=_0x27ba92['getData']('text/html');const _0x14e1d0=_0x53c1b6['model']['document']['selection'],_0x17f268=Array['from'](_0x14e1d0['getRanges']());0x1===_0x17f268['length']&&_0x17f268[0x0]['isFlat']&&!_0x14e1d0['getSelectedElement']()&&''!==_0x245da0['replace'](/&nbsp;/g,'')['trim']()&&(_0x245da0='<p>'+_0x245da0+'</p>'),this['_aiAssistantController']['updateView']({'actionId':_0x442fad,'query':_0x70dc1f,'htmlContent':_0x245da0,'label':_0x269f61,'mainActionLabel':_[_0x53c1b6['model']['document']['selection']['isCollapsed']?'INSERT':'REPLACE']}),'aiAssistant'!==this['_dialog']['id']?this['_dialog']['show']({'id':'aiAssistant','icon':_0x2d8fe9,'title':i(this['editor']['locale'],'AI\x20Assistant'),'content':this['_formView'],'position':_0x52abdf['EDITOR_TOP_SIDE'],'onShow':()=>{this['_formView']['focus']();},'onHide':()=>{this['_aiAssistantController']['reset'](),_0x4ef457['hideFakeVisualSelection']();}}):this['_dialog']['view']['wasMoved']||this['_dialog']['view']['updatePosition']();}['hideUI'](){this['_dialog']['hide']();}['_getResolvedCommandsDefinitions'](){const _0x11648d=new Map(),_0x1cc9da=o(this['editor']['config']['get']('ai.aiAssistant.commands'),this['editor']['locale']);for(const _0x3d004b of _0x1cc9da)for(const _0x2f2650 of _0x3d004b['commands'])_0x11648d['set'](_0x2f2650['id'],{..._0x2f2650,'groupId':_0x3d004b['groupId'],'groupLabel':_0x3d004b['groupLabel']||_0x3d004b['groupId']});return _0x11648d;}['_createAIAssistantUIButton'](_0x546be5){const _0xbd3e9e=this['editor'],_0xb6443c=_0xbd3e9e['commands']['get']('showAIAssistant'),_0x1dd4f3=new _0x546be5(_0xbd3e9e['locale']);return _0x1dd4f3['set']({'label':i(_0xbd3e9e['locale'],'AI\x20Assistant'),'icon':_0x2d8fe9,'isToggleable':!0x0}),_0x1dd4f3['bind']('isEnabled')['to'](_0xb6443c),_0x1dd4f3['bind']('isOn')['to'](this['_dialog'],'id',_0x33efa6=>'aiAssistant'===_0x33efa6),this['listenTo'](_0x1dd4f3,'execute',()=>{_0x1dd4f3['isOn']?this['hideUI']():_0xb6443c['execute']();}),_0x1dd4f3;}['_initView'](){const _0x2a29f9=this['editor']['plugins']['get'](a);this['_formView']=new k(this['editor']['locale'],this['_uiCssClasses'],this['editor']['config']['get']('ai.aiAssistant.contentAreaCssClass')),this['_formView']['on']('change:value',()=>{this['_dialog']['view']['wasMoved']||this['_dialog']['view']['updatePosition']();}),this['_formView']['promptView']['queryView']['fieldView']['on']('update',()=>{this['_dialog']['view']['wasMoved']||this['_dialog']['view']['updatePosition']();}),this['listenTo'](this['_formView'],'replaceContent',()=>{_0x2a29f9['insertContent'](this['_aiAssistantController']['currentContext']),this['hideUI']();}),this['listenTo'](this['_formView'],'insertContentBelow',()=>{_0x2a29f9['insertContentBelow'](this['_aiAssistantController']['currentContext']),this['hideUI']();}),this['_initAriaAiStatusChangeAnnouncements']();}['_initAriaAiStatusChangeAnnouncements'](){const {locale:_0x5bfec7,ui:{ariaLiveAnnouncer:_0x574245}}=this['editor'];this['_formView']['contentArea']['on']('change:isProcessing',(_0x57cb18,_0x1370f9,_0x391775)=>{const _0x3ac406=this['_aiAssistantController']['currentContext'];_0x391775?_0x574245['announce'](i(_0x5bfec7,'AI\x20is\x20writing')):_0x3ac406&&_0x574245['announce'](i(_0x5bfec7,'Generated\x20content:\x20%0',_0x3ac406),{'politeness':'polite','isUnsafeHTML':!0x0});}),this['_formView']['on']('change:isError',(_0x5a59d7,_0x385244,_0x2a2bd1)=>{if(_0x2a2bd1){const _0x564abd=this['_formView']['errorView']['text'];_0x574245['announce'](i(_0x5bfec7,'Error\x20during\x20AI\x20content\x20generation:\x20%0',_0x564abd));}});}['_onExecute'](_0x2c3847){const _0x5b4cef=this['_commandDefinitions']['get'](_0x2c3847),_0x119bc4=this['editor'],_0x2fd200=_0x119bc4['model']['document']['selection'],_0x53b646=_0x119bc4['commands']['get']('showAIAssistant'),_0x5a2bca=_0x119bc4['plugins']['get'](a),_0x384599=''+(_0x5b4cef['groupId']!==K?_0x5b4cef['groupLabel']+':\x20':'')+_0x5b4cef['label'];if(!0x1!==_0x5b4cef['requiresContent']&&_0x2fd200['isCollapsed']){const _0x1999fb=_0x34c6dc(_0x2fd200['getSelectedBlocks']())||_0x119bc4['model']['schema']['getLimitElement'](_0x2fd200);_0x119bc4['model']['change'](_0x5ea379=>{_0x5ea379['setSelection'](_0x1999fb,'in');});}_0x5a2bca['showFakeVisualSelection'](),_0x53b646['execute'](_0x5b4cef['prompt'],_0x384599,'command:'+_0x2c3847);}['_populateMenuBarMenu'](_0x684b59,_0x39954a,_0xae1328,_0x21177f){const _0x2125da=this['editor'],_0x2d9067=_0x2125da['locale'],_0x2e826b=new _0x5255c6(_0x2d9067),_0x3fd722=U(_0x2125da,_0xae1328)['filter'](_0x2fa57a=>_0x2fa57a['commands']['length']);0x1===_0x3fd722['length']?this['_getMenuBarGroupButtons']({'command':_0x684b59,'commands':_0x3fd722[0x0]['commands'],'parentMenuView':_0x39954a,'onExecute':_0x21177f})['forEach'](_0x427571=>_0x2e826b['items']['add'](_0x427571)):_0x3fd722['forEach'](({groupId:_0xd96408,groupLabel:_0x6c3412,commands:_0x4c62c8})=>{const _0x16f138=new _0x20f208(_0x2d9067,_0x39954a),_0x2fd5a0=new _0x2c51f0(_0x2d9067),_0xcd7c6b=new _0x5255c6(_0x2d9067),_0x1fde1c=this['_getMenuBarGroupButtons']({'command':_0x684b59,'commands':_0x4c62c8,'parentMenuView':_0x2fd5a0,'onExecute':_0x21177f});_0x2fd5a0['buttonView']['set']({'label':_0x6c3412||_0xd96408}),_0x2fd5a0['delegate']('execute')['to'](_0x39954a),_0xcd7c6b['items']['addMany'](_0x1fde1c),_0x2fd5a0['panelView']['children']['add'](_0xcd7c6b),_0x16f138['children']['add'](_0x2fd5a0),_0x2e826b['items']['add'](_0x16f138);}),_0x39954a['panelView']['children']['add'](_0x2e826b);}['_getMenuBarGroupButtons']({command:_0x52fc28,commands:_0x52650d,parentMenuView:_0x417b04,onExecute:_0x91eb79}){const _0x422833=this['editor'],_0x55087c=_0x422833['locale'];return U(_0x422833,_0x52650d)['map'](_0x320a17=>{const _0x450467=new _0x20f208(_0x55087c,_0x417b04),_0x23bc1a=new _0x4b8772(_0x55087c);return _0x23bc1a['set']({'label':_0x320a17['label']}),_0x23bc1a['delegate']('execute')['to'](_0x417b04),_0x23bc1a['on']('execute',()=>_0x91eb79(_0x320a17['id'])),_0x23bc1a['bind']('isEnabled')['to'](_0x52fc28,'enabledCommandsIds',_0x25ce52=>_0x25ce52['includes'](_0x320a17['id'])),_0x450467['children']['add'](_0x23bc1a),_0x450467;});}}function T(_0x5eff33,_0x3e979b){return void 0x0!==_0x5eff33['order']&&void 0x0===_0x3e979b['order']?0x1:void 0x0===_0x5eff33['order']&&void 0x0!==_0x3e979b['order']?-0x1:void 0x0!==_0x5eff33['order']&&void 0x0!==_0x3e979b['order']?_0x5eff33['order']-_0x3e979b['order']:0x0;}function U(_0x6cee38,_0x3c2b23){_0x3c2b23['sort'](T);const _0xc30e9a={},_0x241717=[];for(const _0x4be3d9 of _0x3c2b23)if(void 0x0!==_0x4be3d9['order']){if(_0x4be3d9['order']in _0xc30e9a)throw new _0x5038d9('ai-commands-config-order-collision',_0x6cee38,{'conflictingDefinitions':[_0x4be3d9,_0xc30e9a[_0x4be3d9['order']]]});_0xc30e9a[_0x4be3d9['order']]=_0x4be3d9,_0x241717['splice'](_0x4be3d9['order'],0x0,_0x4be3d9);}else _0x241717['push'](_0x4be3d9);return _0x241717;}class At extends _0x2d1d32{static get['requires'](){return[n,a];}static get['pluginName'](){return'AIAssistant';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x237821){super(_0x237821);const _0x274b38=_0x237821['config'],_0x2f6e04=_0x237821['locale'];_0x274b38['define']('ai.aiAssistant.preserveComments',!0x0),_0x274b38['define']('ai.aiAssistant.commands',_t(_0x2f6e04)),_0x274b38['define']('ai.aiAssistant.extraCommandGroups',[]),_0x274b38['define']('ai.aiAssistant.removeCommands',[]);let _0x50270d=o(_0x274b38['get']('ai.aiAssistant.commands'),_0x2f6e04);const _0x35288d=_0x274b38['get']('ai.aiAssistant.extraCommandGroups'),_0x47f419=_0x274b38['get']('ai.aiAssistant.removeCommands');_0x35288d['forEach'](_0x13a45b=>{const _0x4c3b7e=_0x50270d['find'](_0x5f2756=>_0x5f2756['groupId']===_0x13a45b['groupId']);_0x4c3b7e?_0x4c3b7e['commands']=_0x4c3b7e['commands']['concat'](_0x13a45b['commands']):_0x50270d['push'](_0x13a45b);}),_0x50270d=_0x50270d['filter'](_0xaa837e=>!_0x47f419['includes'](_0xaa837e['groupId'])),_0x50270d['forEach'](_0x2d4898=>{_0x2d4898['commands']=_0x2d4898['commands']['filter'](_0x14769c=>!_0x47f419['includes'](_0x14769c['id']));}),_0x274b38['set']('ai.aiAssistant.commands',_0x50270d);}}function _t(_0x18d4f7){return[{'groupId':'editOrReview','groupLabel':i(_0x18d4f7,'Edit\x20or\x20review'),'commands':[{'id':'improveWriting','label':i(_0x18d4f7,'Improve\x20writing'),'prompt':'Fix\x20spelling\x20mistakes,\x20use\x20proper\x20grammar\x20and\x20apply\x20good\x20writing\x20practices.\x20Do\x20not\x20lose\x20the\x20original\x20meaning.'},{'id':'makeShorter','label':i(_0x18d4f7,'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(_0x18d4f7,'Make\x20longer'),'prompt':'Improve\x20this\x20content\x20by\x20using\x20descriptive\x20language\x20and\x20inserting\x20more\x20information\x20and\x20more\x20detailed\x20explanations.'},{'id':'simplifyLanguage','label':i(_0x18d4f7,'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(_0x18d4f7,'Generate\x20from\x20selection'),'commands':[{'id':'summarize','label':i(_0x18d4f7,'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(_0x18d4f7,'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(_0x18d4f7,'Change\x20tone'),'commands':[{'id':'professional','label':i(_0x18d4f7,'Professional'),'prompt':'Improve\x20using\x20polished,\x20formal,\x20and\x20respectful\x20language\x20to\x20convey\x20professional\x20expertise\x20and\x20competence.'},{'id':'casual','label':i(_0x18d4f7,'Casual'),'prompt':'Improve\x20using\x20casual,\x20informal\x20language\x20to\x20convey\x20a\x20casual\x20conversation\x20with\x20a\x20real\x20person.'},{'id':'direct','label':i(_0x18d4f7,'Direct'),'prompt':'Improve\x20using\x20direct\x20language,\x20using\x20only\x20the\x20essential\x20information.'},{'id':'confident','label':i(_0x18d4f7,'Confident'),'prompt':'Improve\x20using\x20compelling,\x20optimistic\x20language\x20to\x20convey\x20confidence\x20in\x20the\x20writing.'},{'id':'friendly','label':i(_0x18d4f7,'Friendly'),'prompt':'Improve\x20using\x20friendly,\x20comforting\x20language,\x20to\x20convey\x20understanding\x20and\x20empathy.'}]},{'groupId':'changeStyle','groupLabel':i(_0x18d4f7,'Change\x20style'),'commands':[{'id':'business','label':i(_0x18d4f7,'Business'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20business\x20professional\x20with\x20formal\x20language.'},{'id':'legal','label':i(_0x18d4f7,'Legal'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20legal\x20professional\x20using\x20valid\x20legal\x20terminology.'},{'id':'journalism','label':i(_0x18d4f7,'Journalism'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20journalist\x20using\x20engaging\x20language\x20to\x20convey\x20the\x20importance\x20of\x20the\x20information.'},{'id':'poetic','label':i(_0x18d4f7,'Poetic'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20poem\x20using\x20poetic\x20techniques\x20without\x20losing\x20the\x20original\x20meaning.'}]},{'groupId':'translate','groupLabel':i(_0x18d4f7,'Translate'),'commands':[{'id':'translateEnglish','label':i(_0x18d4f7,'English'),'prompt':'Translate\x20the\x20content\x20to\x20English\x20language.'},{'id':'translateSpanish','label':i(_0x18d4f7,'Spanish'),'prompt':'Translate\x20the\x20content\x20to\x20Spanish\x20language.'},{'id':'translatePortuguese','label':i(_0x18d4f7,'Portuguese'),'prompt':'Translate\x20the\x20content\x20to\x20Portuguese\x20language.'},{'id':'translateGerman','label':i(_0x18d4f7,'German'),'prompt':'Translate\x20the\x20content\x20to\x20German\x20language.'},{'id':'translateFrench','label':i(_0x18d4f7,'French'),'prompt':'Translate\x20the\x20content\x20to\x20French\x20language.'},{'id':'translateChinese','label':i(_0x18d4f7,'Simplified\x20Chinese'),'prompt':'Translate\x20the\x20content\x20to\x20Simplified\x20Chinese\x20language.'},{'id':'translateHindi','label':i(_0x18d4f7,'Hindi'),'prompt':'Translate\x20the\x20content\x20to\x20Hindi\x20language.'},{'id':'translateArabic','label':i(_0x18d4f7,'Arabic'),'prompt':'Translate\x20the\x20content\x20to\x20Arabic\x20language.'}]}];}class S extends _0x2d1d32{['abortController'];static get['requires'](){return[x];}constructor(_0xcc9321){super(_0xcc9321),this['abortController']=new AbortController();}['init'](){this['editor']['plugins']['get'](x)['textAdapter']=this;}['abort'](){this['abortController']['signal']['aborted']||(this['abortController']['abort'](),this['abortController']=new AbortController());}async['makeRequest'](_0x1c6185){return this['sendRequest'](_0x1c6185)['catch'](_0x4c3927=>{if(_0x4c3927 instanceof R)return Promise['reject'](_0x4c3927);if('AbortError'==_0x4c3927['name'])return Promise['resolve']();throw console['error'](_0x4c3927),new _0x5038d9('aitextadapter-send-request-failed',null);});}async['_prepareRequestHeaders'](_0x1c248d,_0x239056){const _0x39d172=this['editor']['locale'],_0x510dad={'Content-Type':'application/json'};if('object'==typeof _0x1c248d)Object['assign'](_0x510dad,_0x1c248d);else{if(_0x1c248d)try{const _0xa1db3d=await _0x1c248d(_0x239056);Object['assign'](_0x510dad,_0xa1db3d);}catch{return Promise['reject'](new R(i(_0x39d172,'AI_ERROR_GET_HEADERS')));}}return _0x510dad;}async['_prepareRequestParameters'](_0x45e471,_0x24be91){const _0x44ad12=this['editor']['locale'];if('object'==typeof _0x45e471)return _0x45e471;try{return await _0x45e471(_0x24be91);}catch{return Promise['reject'](new R(i(_0x44ad12,'AI_ERROR_GET_PARAMETERS')));}}}class It extends S{['_apiUrl'];['_requestHeaders'];['_requestParameters'];static get['pluginName'](){return'OpenAITextAdapter';}constructor(_0x45bab7){super(_0x45bab7),_0x45bab7['config']['define']('ai.openAI.apiUrl','https://api.openai.com/v1/chat/completions'),_0x45bab7['config']['get']('ai.openAI.requestParameters')||_0x45bab7['config']['define']('ai.openAI.requestParameters',{'model':'gpt-4o','temperature':0x1,'top_p':0x1,'stream':!0x0}),this['_apiUrl']=_0x45bab7['config']['get']('ai.openAI.apiUrl'),this['_requestHeaders']=_0x45bab7['config']['get']('ai.openAI.requestHeaders')||{},this['_requestParameters']=_0x45bab7['config']['get']('ai.openAI.requestParameters');}async['sendRequest']({query:_0x2bdf14,context:_0x2d9d8d,onData:_0x2fca13,actionId:_0xf4e260}){const _0x468b9d=this['editor']['locale'],_0x478a9a=await this['prepareMessages'](_0x2bdf14,_0x2d9d8d,_0xf4e260),_0x4da1c7=await this['_prepareRequestHeaders'](this['_requestHeaders'],_0xf4e260),_0x486837=await this['_prepareRequestParameters'](this['_requestParameters'],_0xf4e260),_0x286e53={'messages':_0x478a9a,..._0x486837},_0x54c989={'method':'POST','headers':_0x4da1c7,'body':JSON['stringify'](_0x286e53),'signal':this['abortController']['signal']},_0x10a1db=await fetch(this['_apiUrl'],_0x54c989);if(_0x10a1db['ok'])return _0x486837['stream']?await this['_readStreamableResponse'](_0x10a1db,_0x2fca13):await this['_readStaticResponse'](_0x10a1db,_0x2fca13),Promise['resolve']();{const _0x69fe2b=await _0x10a1db['text']();return _0x69fe2b['includes']('context_length_exceeded')?Promise['reject'](new R(i(_0x468b9d,'AI_ERROR_CONTEXT_LENGTH'))):_0x69fe2b['includes']('Moderation')?Promise['reject'](new R(i(_0x468b9d,'AI_ERROR_MODERATION'))):Promise['reject'](new Error(_0x69fe2b));}}async['prepareMessages'](_0xf7c261,_0x3514b2,_0x1ec362){let _0x5c8e08,_0x26e6c1;return _0x3514b2?(_0x5c8e08='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.',_0x26e6c1='Instruction:\x0a'+_0xf7c261+'\x0aYou\x20must\x20keep\x20the\x20text\x20formatting.\x0a\x0aContent:\x0a'+_0x3514b2):(_0x5c8e08='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.',_0x26e6c1=_0xf7c261),[{'role':'system','content':_0x5c8e08},{'role':'user','content':_0x26e6c1}];}async['_readStreamableResponse'](_0x1faf2e,_0x54e60b){const _0x82a8c2=_0x1faf2e['body']['getReader'](),_0x68e0f3=new TextDecoder();let _0x57c63e='',_0x5e65a='',_0xffaa6a='',_0x4f53fd=!0x1;for(;!_0x4f53fd;){const {done:_0x40f10e,value:_0x30b109}=await _0x82a8c2['read'](),_0x538183=_0x57c63e+_0x68e0f3['decode'](_0x30b109);let _0x3c3a55='';_0x4f53fd=_0x40f10e;try{_0x3c3a55=this['_cleanUpData'](_0x538183),_0x57c63e='';}catch{_0x57c63e=_0x538183;continue;}_0x5e65a+=_0x3c3a55,!_0x4f53fd&&this['_isBufferIncomplete'](_0x5e65a)||_0x5e65a&&(_0xffaa6a+=_0x5e65a,_0x5e65a='',_0x54e60b(_0xffaa6a));}return Promise['resolve']();}async['_readStaticResponse'](_0x280c0e,_0x5c744e){return _0x5c744e((await _0x280c0e['json']())['choices'][0x0]['message']['content']),Promise['resolve']();}['_isBufferIncomplete'](_0x248566){const _0x335c8f=_0x248566['split']('<')['length']!==_0x248566['split']('>')['length'],_0xa89b07=_0x248566['length']<0x1e;return _0x335c8f&&_0xa89b07;}['_cleanUpData'](_0xcd962c){return _0xcd962c['split'](/\n(?![^{]*\})/g)['map'](_0x27d1e8=>_0x27d1e8['replace']('data:\x20',''))['filter'](_0x1fdf23=>_0x1fdf23&&_0x1fdf23['length']>0x0&&'[DONE]'!==_0x1fdf23)['map'](_0xb0580e=>{const {choices:_0x27b8e0}=JSON['parse'](_0xb0580e);if(_0x27b8e0[0x0]?.['delta']?.['content'])return _0x27b8e0[0x0]['delta']['content'];})['filter'](_0x39dc82=>_0x39dc82)['join']('');}}class Et extends S{['_apiUrl'];['_requestHeaders'];['_bedrockClientConfig'];['_requestParameters'];static get['pluginName'](){return'AWSTextAdapter';}constructor(_0x1fd5df){super(_0x1fd5df),_0x1fd5df['config']['get']('ai.aws.requestParameters')||_0x1fd5df['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']=_0x1fd5df['config']['get']('ai.aws.apiUrl'),this['_bedrockClientConfig']=_0x1fd5df['config']['get']('ai.aws.bedrockClientConfig'),this['_requestHeaders']=_0x1fd5df['config']['get']('ai.aws.requestHeaders'),this['_requestParameters']=_0x1fd5df['config']['get']('ai.aws.requestParameters');}async['sendRequest']({query:_0x2bbe49,context:_0x5e79f5,onData:_0x26b728,actionId:_0x55cf55}){const {model:_0x435ff8,stream:_0x1f8bc4,..._0x16e803}=await this['_prepareRequestParameters'](this['_requestParameters'],_0x55cf55),_0x603392={'prompt':await this['preparePrompt'](_0x2bbe49,_0x5e79f5,_0x435ff8,_0x55cf55),..._0x16e803};this['_apiUrl']?await this['_processProxyRequest'](_0x603392,_0x435ff8,_0x1f8bc4,_0x26b728,_0x55cf55):await this['_processAWSRequest'](_0x603392,_0x435ff8,_0x1f8bc4,_0x26b728);}async['preparePrompt'](_0x385fd8,_0x462924,_0x501c65,_0x291fde){let _0x3eded1,_0x46c7a2;return _0x462924?(_0x3eded1='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.',_0x46c7a2='Instruction:\x0a'+_0x385fd8+'\x0aYou\x20must\x20keep\x20the\x20text\x20formatting.\x0a\x0aContent:\x0a'+_0x462924):(_0x3eded1='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.',_0x46c7a2=_0x385fd8),'meta.llama'==this['getModelFamily'](_0x501c65)?'<<SYS>>\x0a'+_0x3eded1+'\x0a<</SYS>>\x0a[INST]\x0a'+_0x46c7a2+'\x0a[/INST]':'Human:\x0a'+_0x3eded1+'\x0a'+_0x46c7a2+'\x0a\x0aAssistant:';}['getModelFamily'](_0x3474f1){if(/^anthropic\.claude/['test'](_0x3474f1))return'anthropic.claude';if(/^ai21\.j2/['test'](_0x3474f1))return'ai21.j2';if(/^cohere\.command/['test'](_0x3474f1))return'cohere.command';if(/^meta\.llama/['test'](_0x3474f1))return'meta.llama';throw new R(i(this['editor']['locale'],'AI_ERROR_UNSUPPORTED_MODEL',_0x3474f1));}async['_processProxyRequest'](_0x50d8e0,_0x39c056,_0x559b99,_0x2ddf76,_0x5ee426){const _0x4a2e7c={'method':'POST','headers':await this['_prepareRequestHeaders'](this['_requestHeaders'],_0x5ee426),'body':JSON['stringify']({..._0x50d8e0,'model':_0x39c056,'stream':_0x559b99}),'signal':this['abortController']['signal']},_0x837dc7=await fetch(this['_apiUrl'],_0x4a2e7c);_0x559b99?await this['_readStreamableResponse'](_0x837dc7,_0x39c056,_0x2ddf76):await this['_readStaticResponse'](_0x837dc7,_0x39c056,_0x2ddf76);}async['_processAWSRequest'](_0x2b28dc,_0x15f7a6,_0x57a9d1,_0x24fdb9){const _0x501dc7=new _0x5f2ebf(this['_bedrockClientConfig']),_0x58de46={'body':JSON['stringify'](_0x2b28dc),'contentType':'application/json','accept':'application/json','modelId':_0x15f7a6};let _0x305dbf;if(_0x57a9d1){const _0x57961a=new _0x46d9e4(_0x58de46);_0x305dbf=await _0x501dc7['send'](_0x57961a,{'abortSignal':this['abortController']['signal']}),await this['_readAsyncIterableResponse'](_0x305dbf,_0x15f7a6,_0x24fdb9);}else{const _0x485420=new _0xcfc9f2(_0x58de46);_0x305dbf=await _0x501dc7['send'](_0x485420,{'abortSignal':this['abortController']['signal']}),await this['_readStaticResponse'](_0x305dbf,_0x15f7a6,_0x24fdb9);}}async['_readAsyncIterableResponse'](_0x4bc629,_0x3e678c,_0xf358a4){const _0x2c7a74=_0x4bc629['body'],_0x28f2e4=new TextDecoder('utf-8');let _0x499352='';for await(const _0xfad7fa of _0x2c7a74)if(_0xfad7fa['chunk']){const _0x7efff9=_0x28f2e4['decode'](_0xfad7fa['chunk']['bytes']),_0x167d20=JSON['parse'](_0x7efff9);_0x499352+=this['_getGeneratedText'](_0x167d20,_0x3e678c),_0xf358a4(_0x499352);}return Promise['resolve']();}async['_readStreamableResponse'](_0x2cafc2,_0xb9d0e7,_0x284fd3){const _0x4768d2=_0x2cafc2['body'],_0x7338c2=new TextDecoder('utf-8'),_0x4b987b=_0x4768d2['getReader']();let _0x24dd7c='',_0x4092d4='',_0xf44aa2=!0x1;for(;!_0xf44aa2;){const {done:_0x222c22,value:_0x493419}=await _0x4b987b['read']();if(_0xf44aa2=_0x222c22,_0xf44aa2)break;const _0x31200c=(_0x24dd7c+_0x7338c2['decode'](_0x493419))['split']('\x0a')['map'](_0x39c474=>{try{return _0x24dd7c='',JSON['parse'](_0x39c474);}catch{return _0x24dd7c=_0x39c474,null;}})['filter'](_0x3dfcdc=>null!==_0x3dfcdc);_0x31200c['length']&&(_0x4092d4+=_0x31200c['map'](_0x43bb60=>this['_getGeneratedText'](_0x43bb60,_0xb9d0e7))['join'](''),_0x284fd3(_0x4092d4));}return Promise['resolve']();}async['_readStaticResponse'](_0x70a69d,_0x48aace,_0x42506d){let _0x45a464;return _0x45a464=_0x70a69d instanceof Response?await _0x70a69d['json']():JSON['parse'](new TextDecoder('utf-8')['decode'](_0x70a69d['body'])),(_0x42506d(this['_getGeneratedText'](_0x45a464,_0x48aace)),Promise['resolve']());}['_getGeneratedText'](_0x34e22d,_0x1972b0){switch(this['getModelFamily'](_0x1972b0)){case'anthropic.claude':return _0x34e22d['completion'];case'ai21.j2':return _0x34e22d['completions'][0x0]['data']['text'];case'cohere.command':return _0x34e22d['generations'][0x0]['text'];case'meta.llama':return _0x34e22d['generation'];}}}export{x as AIAdapter,At as AIAssistant,n as AIAssistantUI,R as AIRequestError,S as AITextAdapter,Et as AWSTextAdapter,It as OpenAITextAdapter,E as ShowAIAssistantCommand,_t as getDefaultAICommands};
@@ -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':_0x475087=>0x1!=_0x475087}};
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':_0x13db76=>0x1!=_0x13db76}};
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- (_0x23e797=>{const {af:{dictionary:_0x42e63d,getPluralForm:_0x31ec0c}}={'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':_0x384741=>0x1!=_0x384741}};_0x23e797['af']||={'dictionary':{},'getPluralForm':null},_0x23e797['af']['dictionary']=Object['assign'](_0x23e797['af']['dictionary'],_0x42e63d),_0x23e797['af']['getPluralForm']=_0x31ec0c;})(window['CKEDITOR_TRANSLATIONS']||={});
23
+ (_0xf87ddc=>{const {af:{dictionary:_0x493cb7,getPluralForm:_0x334d8d}}={'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':_0x292dec=>0x1!=_0x292dec}};_0xf87ddc['af']||={'dictionary':{},'getPluralForm':null},_0xf87ddc['af']['dictionary']=Object['assign'](_0xf87ddc['af']['dictionary'],_0x493cb7),_0xf87ddc['af']['getPluralForm']=_0x334d8d;})(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':_0x275374=>0x0==_0x275374?0x0:0x1==_0x275374?0x1:0x2==_0x275374?0x2:_0x275374%0x64>=0x3&&_0x275374%0x64<=0xa?0x3:_0x275374%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':_0x540940=>0x0==_0x540940?0x0:0x1==_0x540940?0x1:0x2==_0x540940?0x2:_0x540940%0x64>=0x3&&_0x540940%0x64<=0xa?0x3:_0x540940%0x64>=0xb?0x4:0x5}};
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- (_0x25e6e7=>{const {ar:{dictionary:_0x2e506a,getPluralForm:_0x404820}}={'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':_0xf161da=>0x0==_0xf161da?0x0:0x1==_0xf161da?0x1:0x2==_0xf161da?0x2:_0xf161da%0x64>=0x3&&_0xf161da%0x64<=0xa?0x3:_0xf161da%0x64>=0xb?0x4:0x5}};_0x25e6e7['ar']||={'dictionary':{},'getPluralForm':null},_0x25e6e7['ar']['dictionary']=Object['assign'](_0x25e6e7['ar']['dictionary'],_0x2e506a),_0x25e6e7['ar']['getPluralForm']=_0x404820;})(window['CKEDITOR_TRANSLATIONS']||={});
23
+ (_0x39d815=>{const {ar:{dictionary:_0x464dbe,getPluralForm:_0x1cb6dd}}={'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':_0x289fc3=>0x0==_0x289fc3?0x0:0x1==_0x289fc3?0x1:0x2==_0x289fc3?0x2:_0x289fc3%0x64>=0x3&&_0x289fc3%0x64<=0xa?0x3:_0x289fc3%0x64>=0xb?0x4:0x5}};_0x39d815['ar']||={'dictionary':{},'getPluralForm':null},_0x39d815['ar']['dictionary']=Object['assign'](_0x39d815['ar']['dictionary'],_0x464dbe),_0x39d815['ar']['getPluralForm']=_0x1cb6dd;})(window['CKEDITOR_TRANSLATIONS']||={});