@ckeditor/ckeditor5-ai 0.0.0-nightly-20231214.0 → 0.0.0-nightly-20231216.0

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 (48) hide show
  1. package/build/ai.js +1 -1
  2. package/package.json +4 -3
  3. package/src/adapters/aiadapter.d.ts +2 -2
  4. package/src/adapters/aiadapter.js +1 -1
  5. package/src/adapters/aitextadapter.d.ts +2 -2
  6. package/src/adapters/aitextadapter.js +1 -1
  7. package/src/adapters/awstextadapter.d.ts +2 -2
  8. package/src/adapters/awstextadapter.js +1 -1
  9. package/src/adapters/openaitextadapter.d.ts +2 -2
  10. package/src/adapters/openaitextadapter.js +1 -1
  11. package/src/aiassistant.d.ts +4 -4
  12. package/src/aiassistant.js +1 -1
  13. package/src/aiassistantediting.d.ts +2 -2
  14. package/src/aiassistantediting.js +1 -1
  15. package/src/aiassistantui.d.ts +4 -4
  16. package/src/aiassistantui.js +1 -1
  17. package/src/aiconfig.d.ts +3 -3
  18. package/src/augmentation.d.ts +6 -6
  19. package/src/index.d.ts +6 -6
  20. package/src/index.js +1 -1
  21. package/src/ui/aiassistantcontroller.d.ts +6 -6
  22. package/src/ui/aiassistantcontroller.js +1 -1
  23. package/src/ui/dropdown/aicommandslistview.d.ts +1 -1
  24. package/src/ui/dropdown/aicommandslistview.js +1 -1
  25. package/src/ui/dropdown/buttonlabelwithhighlightview.d.ts +1 -1
  26. package/src/ui/dropdown/buttonlabelwithhighlightview.js +1 -1
  27. package/src/ui/dropdown/labelwithhighlightview.d.ts +1 -1
  28. package/src/ui/dropdown/labelwithhighlightview.js +1 -1
  29. package/src/ui/form/aiformcontentarea.d.ts +2 -2
  30. package/src/ui/form/aiformcontentarea.js +1 -1
  31. package/src/ui/form/aiformerrorview.d.ts +2 -2
  32. package/src/ui/form/aiformerrorview.js +1 -1
  33. package/src/ui/form/aiformpromptview.d.ts +2 -2
  34. package/src/ui/form/aiformpromptview.js +1 -1
  35. package/src/ui/form/aiformtoolbarview.d.ts +2 -2
  36. package/src/ui/form/aiformtoolbarview.js +1 -1
  37. package/src/ui/form/aiformview.d.ts +6 -6
  38. package/src/ui/form/aiformview.js +1 -1
  39. package/src/ui/form/aihistorylistitemview.d.ts +2 -2
  40. package/src/ui/form/aihistorylistitemview.js +1 -1
  41. package/src/ui/form/aihistorylistview.d.ts +2 -2
  42. package/src/ui/form/aihistorylistview.js +1 -1
  43. package/src/ui/form/prompthistory.d.ts +1 -1
  44. package/src/ui/form/prompthistory.js +1 -1
  45. package/src/ui/showaiassistantcommand.d.ts +1 -1
  46. package/src/ui/showaiassistantcommand.js +1 -1
  47. package/src/utils/common-translations.d.ts +1 -1
  48. package/src/utils/common-translations.js +1 -1
@@ -5,8 +5,8 @@
5
5
  /**
6
6
  * @module ai/ui/aiformcontentarea
7
7
  */
8
- import { type Locale } from 'ckeditor5/src/utils';
9
- import { View, ButtonView } from 'ckeditor5/src/ui';
8
+ import { type Locale } from 'ckeditor5/src/utils.js';
9
+ import { View, ButtonView } from 'ckeditor5/src/ui.js';
10
10
  /**
11
11
  * A class representing the text area view of the AI assistant.
12
12
  */
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x374f=['ck-ai-form__loader','execute','removeAllRanges','style','loaderView','div','setEndBefore','lastElementChild','setContent','appendChild','value','appendLoader','ck-ai-form__content-area-wrapper','change:isProcessing','copyButtonView','innerHTML','smooth','ck-ai-form__copy-button','.ck-ai-form__loader','_createCopyButton','isEnabled','contentFieldView','_copyHTMLToClipboard','ck-ai-form__content-field','addRange','execCommand','class','textContent','text/html','isVisible','left','wheel','isProcessing','change:value','setTemplate','Copy','focus','setStartAfter','ClipboardItem','createElement','<span>[</span>','locale','write','render','<span>]</span>','set','ck-content','listenTo','ck-ai-form__content-area--processing','scrollHeight','icon','element','-9999px','AI\x20is\x20writing...','createRange','\x20ck-ai-form__copy-button--copied','ck-ai-form__copy-button-wrapper','copy','check','mousedown','scrollTo'];(function(_0x534239,_0x374fb4){const _0x114140=function(_0x35bf13){while(--_0x35bf13){_0x534239['push'](_0x534239['shift']());}};_0x114140(++_0x374fb4);}(_0x374f,0x1c2));const _0x1141=function(_0x534239,_0x374fb4){_0x534239=_0x534239-0x0;let _0x114140=_0x374f[_0x534239];return _0x114140;};import{global as _0x4efa33}from'ckeditor5/src/utils';import{View as _0x14b586,ButtonView as _0x21b2ac,SpinnerView as _0x16caac}from'ckeditor5/src/ui';import _0x287983 from'../../../theme/icons/copy.svg';import{getTranslation as _0x736dca}from'../../utils/common-translations';import{icons as _0x5339ab}from'ckeditor5/src/core';export default class Y extends _0x14b586{constructor(_0x75daf7,_0x5c01ca=''){super(_0x75daf7),this[_0x1141('0x16')]({'value':null,'isVisible':!0x1,'isProcessing':!0x1});const _0x20e02a=this['bindTemplate'];this[_0x1141('0x3b')]=new ContentFieldView(_0x75daf7,_0x5c01ca),this[_0x1141('0x34')]=this[_0x1141('0x39')](),this['setTemplate']({'tag':_0x1141('0x2b'),'attributes':{'class':['ck',_0x1141('0x32'),_0x20e02a['if'](_0x1141('0x6'),'ck-hidden',_0x3bca07=>!_0x3bca07)],'tabindex':'-1'},'children':[{'tag':_0x1141('0x2b'),'attributes':{'class':['ck','ck-ai-form__content-area',_0x20e02a['if'](_0x1141('0x9'),_0x1141('0x19'))]},'children':[this['contentFieldView'],{'tag':_0x1141('0x2b'),'attributes':{'class':['ck',_0x1141('0x21')]},'children':[this[_0x1141('0x34')]]}]}]});}[_0x1141('0x14')](){super[_0x1141('0x14')](),this[_0x1141('0x30')]&&this[_0x1141('0x3b')][_0x1141('0x2e')](this[_0x1141('0x30')]);let _0xb9241f=!0x1;this['on'](_0x1141('0xa'),(_0xf8d9b,_0x7fb460,_0x668a3d)=>{const _0x51e554=!this[_0x1141('0x3b')][_0x1141('0x1c')]['querySelector'](_0x1141('0x38'));this[_0x1141('0x3b')]['setContent'](_0x668a3d),this[_0x1141('0x9')]&&_0x51e554&&!_0xb9241f&&this[_0x1141('0x1c')][_0x1141('0x25')]({'top':this[_0x1141('0x1c')][_0x1141('0x1a')],'behavior':_0x1141('0x36')});}),this['on'](_0x1141('0x33'),(_0x3d46bd,_0x969403,_0x5a0018)=>{_0xb9241f=!0x1,_0x5a0018?(this['value']=null,this[_0x1141('0x3b')][_0x1141('0x31')]()):this[_0x1141('0x30')]||this[_0x1141('0x3b')]['setContent']('');}),this['listenTo'](this[_0x1141('0x1c')],_0x1141('0x8'),()=>{_0xb9241f=!0x0;}),this[_0x1141('0x18')](this['element'],_0x1141('0x24'),()=>{_0xb9241f=!0x0;});}[_0x1141('0xd')](){this[_0x1141('0x1c')][_0x1141('0xd')]();}[_0x1141('0x39')](){const _0x3ceb9a=this[_0x1141('0x12')],_0x5b56a1=new _0x21b2ac(this[_0x1141('0x12')]),_0xf4919d=_0x1141('0x37');return _0x5b56a1['set']({'label':_0x736dca(_0x3ceb9a,_0x1141('0xc')),'icon':_0x287983,'class':_0xf4919d,'tooltip':!0x0}),_0x5b56a1['bind'](_0x1141('0x6'))['to'](this,_0x1141('0x30'),_0x1cde5a=>!!_0x1cde5a),_0x5b56a1['bind'](_0x1141('0x3a'))['to'](this,_0x1141('0x9'),_0x29f706=>!_0x29f706),_0x5b56a1['on'](_0x1141('0x27'),()=>{this[_0x1141('0x3c')](this[_0x1141('0x3b')][_0x1141('0x1c')]),_0x5b56a1[_0x1141('0x1b')]=_0x5339ab[_0x1141('0x23')],_0x5b56a1[_0x1141('0x3')]=_0xf4919d+_0x1141('0x20'),this[_0x1141('0xd')](),setTimeout(()=>{_0x5b56a1[_0x1141('0x1b')]=_0x287983,_0x5b56a1[_0x1141('0x3')]=_0xf4919d;},0x3e8);}),_0x5b56a1;}[_0x1141('0x3c')](_0x35bca3){const {window:_0x4ffbdb,document:_0x4a6e6b}=_0x4efa33;if(_0x4ffbdb[_0x1141('0xf')]){const {Blob:_0x7c7daa,ClipboardItem:_0x3e6bb7}=_0x4ffbdb,_0x35ea5c=[new _0x3e6bb7({'text/html':new _0x7c7daa([_0x35bca3[_0x1141('0x35')]],{'type':_0x1141('0x5')}),'text/plain':new _0x7c7daa([_0x35bca3[_0x1141('0x4')]||''],{'type':'text/plain'})})];navigator['clipboard'][_0x1141('0x13')](_0x35ea5c);}else{const _0x32e8cd=_0x4a6e6b[_0x1141('0x10')](_0x1141('0x2b'));_0x32e8cd[_0x1141('0x29')]['position']='absolute',_0x32e8cd[_0x1141('0x29')][_0x1141('0x7')]=_0x1141('0x1d'),_0x32e8cd['innerHTML']=_0x1141('0x11')+_0x35bca3[_0x1141('0x35')]+_0x1141('0x15'),_0x4a6e6b['body']['appendChild'](_0x32e8cd);const _0x5287f8=_0x4a6e6b[_0x1141('0x1f')]();_0x5287f8[_0x1141('0xe')](_0x32e8cd['firstElementChild']),_0x5287f8[_0x1141('0x2c')](_0x32e8cd[_0x1141('0x2d')]);const _0x2cf2a7=_0x4ffbdb['getSelection']();_0x2cf2a7[_0x1141('0x28')](),_0x2cf2a7[_0x1141('0x1')](_0x5287f8),_0x4a6e6b[_0x1141('0x2')](_0x1141('0x22')),_0x32e8cd['remove']();}}}export class ContentFieldView extends _0x14b586{constructor(_0xe7fad1,_0x5a55f1=''){super(_0xe7fad1),this[_0x1141('0x2a')]=this['_createLoader'](),this[_0x1141('0xb')]({'tag':_0x1141('0x2b'),'attributes':{'class':['ck',_0x1141('0x17'),_0x5a55f1,'ck-reset_all-excluded',_0x1141('0x0')]}});}[_0x1141('0x2e')](_0x5e3fd2){this['element'][_0x1141('0x35')]=_0x5e3fd2;}[_0x1141('0x31')](){this[_0x1141('0x1c')][_0x1141('0x2f')](this['loaderView'][_0x1141('0x1c')]);}['_createLoader'](){const _0x3eafba=new _0x14b586(),_0x1b3077=this[_0x1141('0x12')],_0x362c31=new _0x16caac();return _0x362c31[_0x1141('0x6')]=!0x0,_0x3eafba[_0x1141('0xb')]({'tag':_0x1141('0x2b'),'attributes':{'class':['ck',_0x1141('0x26')]},'children':[_0x362c31,{'text':_0x736dca(_0x1b3077,_0x1141('0x1e'))}]}),_0x3eafba['render'](),_0x3eafba;}}
23
+ const _0x3bf0=['ck-ai-form__copy-button-wrapper','ck-ai-form__content-area--processing','getSelection','position','querySelector','mousedown','ck-content','_copyHTMLToClipboard','listenTo','ck-ai-form__copy-button','icon','_createLoader','absolute','isEnabled','innerHTML','change:isProcessing','createElement','_createCopyButton','execCommand','body','clipboard','text/plain','value','lastElementChild','addRange','div','isProcessing','element','isVisible','ck-ai-form__loader','execute','class','contentFieldView','style','AI\x20is\x20writing...','setTemplate','ck-ai-form__content-area-wrapper','setStartAfter','setContent','write','-9999px','createRange','copyButtonView','left','locale','\x20ck-ai-form__copy-button--copied','loaderView','.ck-ai-form__loader','scrollTo','ck-reset_all-excluded','check','<span>[</span>','scrollHeight','ck-ai-form__content-field','change:value','removeAllRanges','render','bind','appendChild','focus','smooth','ck-hidden','appendLoader','firstElementChild','remove','<span>]</span>'];(function(_0x3fc9a9,_0x3bf0b3){const _0x2802c4=function(_0x16ea2f){while(--_0x16ea2f){_0x3fc9a9['push'](_0x3fc9a9['shift']());}};_0x2802c4(++_0x3bf0b3);}(_0x3bf0,0x170));const _0x2802=function(_0x3fc9a9,_0x3bf0b3){_0x3fc9a9=_0x3fc9a9-0x0;let _0x2802c4=_0x3bf0[_0x3fc9a9];return _0x2802c4;};import{global as _0x3ec3ed}from'ckeditor5/src/utils.js';import{View as _0x354e49,ButtonView as _0x1ae60a,SpinnerView as _0x216b2f}from'ckeditor5/src/ui.js';import _0x2a0ca1 from'../../../theme/icons/copy.svg';import{getTranslation as _0xc5dde0}from'../../utils/common-translations.js';import{icons as _0x61ac51}from'ckeditor5/src/core.js';export default class Z extends _0x354e49{constructor(_0x21b738,_0x3746bf=''){super(_0x21b738),this['set']({'value':null,'isVisible':!0x1,'isProcessing':!0x1});const _0x319d34=this['bindTemplate'];this[_0x2802('0x3c')]=new ContentFieldView(_0x21b738,_0x3746bf),this[_0x2802('0x4')]=this['_createCopyButton'](),this[_0x2802('0x3f')]({'tag':_0x2802('0x35'),'attributes':{'class':['ck',_0x2802('0x40'),_0x319d34['if'](_0x2802('0x38'),_0x2802('0x17'),_0x25ca36=>!_0x25ca36)],'tabindex':'-1'},'children':[{'tag':'div','attributes':{'class':['ck','ck-ai-form__content-area',_0x319d34['if'](_0x2802('0x36'),_0x2802('0x1d'))]},'children':[this[_0x2802('0x3c')],{'tag':'div','attributes':{'class':['ck',_0x2802('0x1c')]},'children':[this['copyButtonView']]}]}]});}[_0x2802('0x12')](){super[_0x2802('0x12')](),this['value']&&this[_0x2802('0x3c')]['setContent'](this[_0x2802('0x32')]);let _0x515567=!0x1;this['on'](_0x2802('0x10'),(_0x2585d2,_0x50b9b9,_0x101a7d)=>{const _0x345b3e=!this['contentFieldView'][_0x2802('0x37')][_0x2802('0x20')](_0x2802('0x9'));this[_0x2802('0x3c')][_0x2802('0x0')](_0x101a7d),this[_0x2802('0x36')]&&_0x345b3e&&!_0x515567&&this[_0x2802('0x37')][_0x2802('0xa')]({'top':this['element'][_0x2802('0xe')],'behavior':_0x2802('0x16')});}),this['on'](_0x2802('0x2b'),(_0x1dc142,_0xa2a3bc,_0xd3868a)=>{_0x515567=!0x1,_0xd3868a?(this[_0x2802('0x32')]=null,this[_0x2802('0x3c')]['appendLoader']()):this['value']||this['contentFieldView'][_0x2802('0x0')]('');}),this[_0x2802('0x24')](this[_0x2802('0x37')],'wheel',()=>{_0x515567=!0x0;}),this[_0x2802('0x24')](this[_0x2802('0x37')],_0x2802('0x21'),()=>{_0x515567=!0x0;});}[_0x2802('0x15')](){this[_0x2802('0x37')]['focus']();}[_0x2802('0x2d')](){const _0x3a657a=this[_0x2802('0x6')],_0x335f2e=new _0x1ae60a(this[_0x2802('0x6')]),_0x440e46=_0x2802('0x25');return _0x335f2e['set']({'label':_0xc5dde0(_0x3a657a,'Copy'),'icon':_0x2a0ca1,'class':_0x440e46,'tooltip':!0x0}),_0x335f2e[_0x2802('0x13')](_0x2802('0x38'))['to'](this,_0x2802('0x32'),_0x357315=>!!_0x357315),_0x335f2e[_0x2802('0x13')](_0x2802('0x29'))['to'](this,_0x2802('0x36'),_0x5b29da=>!_0x5b29da),_0x335f2e['on'](_0x2802('0x3a'),()=>{this[_0x2802('0x23')](this['contentFieldView'][_0x2802('0x37')]),_0x335f2e[_0x2802('0x26')]=_0x61ac51[_0x2802('0xc')],_0x335f2e[_0x2802('0x3b')]=_0x440e46+_0x2802('0x7'),this[_0x2802('0x15')](),setTimeout(()=>{_0x335f2e[_0x2802('0x26')]=_0x2a0ca1,_0x335f2e[_0x2802('0x3b')]=_0x440e46;},0x3e8);}),_0x335f2e;}['_copyHTMLToClipboard'](_0x82b1d5){const {window:_0x25a2a4,document:_0x34413a}=_0x3ec3ed;if(_0x25a2a4['ClipboardItem']){const {Blob:_0x1e1be8,ClipboardItem:_0xb1dc63}=_0x25a2a4,_0x4aae1f=[new _0xb1dc63({'text/html':new _0x1e1be8([_0x82b1d5['innerHTML']],{'type':'text/html'}),'text/plain':new _0x1e1be8([_0x82b1d5['textContent']||''],{'type':_0x2802('0x31')})})];navigator[_0x2802('0x30')][_0x2802('0x1')](_0x4aae1f);}else{const _0x43dd07=_0x34413a[_0x2802('0x2c')]('div');_0x43dd07[_0x2802('0x3d')][_0x2802('0x1f')]=_0x2802('0x28'),_0x43dd07['style'][_0x2802('0x5')]=_0x2802('0x2'),_0x43dd07[_0x2802('0x2a')]=_0x2802('0xd')+_0x82b1d5['innerHTML']+_0x2802('0x1b'),_0x34413a[_0x2802('0x2f')][_0x2802('0x14')](_0x43dd07);const _0x25c1d3=_0x34413a[_0x2802('0x3')]();_0x25c1d3[_0x2802('0x41')](_0x43dd07[_0x2802('0x19')]),_0x25c1d3['setEndBefore'](_0x43dd07[_0x2802('0x33')]);const _0x4f30b0=_0x25a2a4[_0x2802('0x1e')]();_0x4f30b0[_0x2802('0x11')](),_0x4f30b0[_0x2802('0x34')](_0x25c1d3),_0x34413a[_0x2802('0x2e')]('copy'),_0x43dd07[_0x2802('0x1a')]();}}}export class ContentFieldView extends _0x354e49{constructor(_0x5a2c48,_0x118f40=''){super(_0x5a2c48),this[_0x2802('0x8')]=this['_createLoader'](),this[_0x2802('0x3f')]({'tag':_0x2802('0x35'),'attributes':{'class':['ck',_0x2802('0x22'),_0x118f40,_0x2802('0xb'),_0x2802('0xf')]}});}[_0x2802('0x0')](_0x5a8f5a){this[_0x2802('0x37')][_0x2802('0x2a')]=_0x5a8f5a;}[_0x2802('0x18')](){this[_0x2802('0x37')]['appendChild'](this[_0x2802('0x8')]['element']);}[_0x2802('0x27')](){const _0x2a21d9=new _0x354e49(),_0x4f5587=this[_0x2802('0x6')],_0x4fb38a=new _0x216b2f();return _0x4fb38a[_0x2802('0x38')]=!0x0,_0x2a21d9[_0x2802('0x3f')]({'tag':_0x2802('0x35'),'attributes':{'class':['ck',_0x2802('0x39')]},'children':[_0x4fb38a,{'text':_0xc5dde0(_0x4f5587,_0x2802('0x3e'))}]}),_0x2a21d9[_0x2802('0x12')](),_0x2a21d9;}}
@@ -5,8 +5,8 @@
5
5
  /**
6
6
  * @module ai/ui/aiformerrorview
7
7
  */
8
- import type { Locale } from 'ckeditor5/src/utils';
9
- import { View } from 'ckeditor5/src/ui';
8
+ import type { Locale } from 'ckeditor5/src/utils.js';
9
+ import { View } from 'ckeditor5/src/ui.js';
10
10
  /**
11
11
  * A class representing the error view of the AI assistant.
12
12
  */
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x49a0=['text','ck-ai-form__error','bindTemplate','setTemplate','content','div'];(function(_0x1e2a4b,_0x49a017){const _0x334bd1=function(_0xefe5f7){while(--_0xefe5f7){_0x1e2a4b['push'](_0x1e2a4b['shift']());}};_0x334bd1(++_0x49a017);}(_0x49a0,0xe2));const _0x334b=function(_0x1e2a4b,_0x49a017){_0x1e2a4b=_0x1e2a4b-0x0;let _0x334bd1=_0x49a0[_0x1e2a4b];return _0x334bd1;};import{View as _0x299388,IconView as _0xf3e9d4}from'ckeditor5/src/ui';import _0x23e9d7 from'../../../theme/icons/error.svg';export default class et extends _0x299388{constructor(_0x9b8bbd,_0x2471f1=''){super(_0x9b8bbd);const _0x87bde1=new _0xf3e9d4(),_0x4c5763=this[_0x334b('0x4')];this['set']('text',_0x2471f1),_0x87bde1[_0x334b('0x0')]=_0x23e9d7,this[_0x334b('0x5')]({'tag':_0x334b('0x1'),'attributes':{'class':['ck',_0x334b('0x3')]},'children':[_0x87bde1,{'text':_0x4c5763['to'](_0x334b('0x2'))}]});}}
23
+ const _0xbc9f=['ck-ai-form__error','setTemplate','bindTemplate','div','text','content'];(function(_0x20efd3,_0xbc9f5a){const _0x2755e1=function(_0x5841a8){while(--_0x5841a8){_0x20efd3['push'](_0x20efd3['shift']());}};_0x2755e1(++_0xbc9f5a);}(_0xbc9f,0xee));const _0x2755=function(_0x20efd3,_0xbc9f5a){_0x20efd3=_0x20efd3-0x0;let _0x2755e1=_0xbc9f[_0x20efd3];return _0x2755e1;};import{View as _0xe8c9fa,IconView as _0x44fc48}from'ckeditor5/src/ui.js';import _0x2e486c from'../../../theme/icons/error.svg';export default class et extends _0xe8c9fa{constructor(_0x517570,_0x444a2e=''){super(_0x517570);const _0x3ce87d=new _0x44fc48(),_0x204f13=this[_0x2755('0x4')];this['set'](_0x2755('0x0'),_0x444a2e),_0x3ce87d[_0x2755('0x1')]=_0x2e486c,this[_0x2755('0x3')]({'tag':_0x2755('0x5'),'attributes':{'class':['ck',_0x2755('0x2')]},'children':[_0x3ce87d,{'text':_0x204f13['to']('text')}]});}}
@@ -5,8 +5,8 @@
5
5
  /**
6
6
  * @module ai/ui/aiformpromptview
7
7
  */
8
- import { type Locale } from 'ckeditor5/src/utils';
9
- import { AutocompleteView, ButtonView, type TextareaView, type AutocompleteViewConfig } from 'ckeditor5/src/ui';
8
+ import { type Locale } from 'ckeditor5/src/utils.js';
9
+ import { AutocompleteView, ButtonView, type TextareaView, type AutocompleteViewConfig } from 'ckeditor5/src/ui.js';
10
10
  /**
11
11
  * A textarea field allowing to ask AI.
12
12
  */
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x3b1e=['enter','_createShowHistoryButton','filteredView','update','queryView','history','set','right','style','isOn','execute','focusFirst','submitButtonView','keystrokes','showHistoryButtonView','bind','isVisible','value','Submit','ck-ai-form__submit','locale','uiLanguageDirection','fieldWrapperChildren','target','focus','rtl','History','isEnabled','fieldView','resultsView','add','_createSubmitButton','excludeScrollbarsAndBorders','element','submit','width','render','focusCycler','children'];(function(_0x2d795c,_0x3b1ed0){const _0x363bcb=function(_0x434eb0){while(--_0x434eb0){_0x2d795c['push'](_0x2d795c['shift']());}};_0x363bcb(++_0x3b1ed0);}(_0x3b1e,0x123));const _0x363b=function(_0x2d795c,_0x3b1ed0){_0x2d795c=_0x2d795c-0x0;let _0x363bcb=_0x3b1e[_0x2d795c];return _0x363bcb;};import{Rect as _0x29e254,global as _0x56dc99,isVisible as _0x3c0f96}from'ckeditor5/src/utils';import{AutocompleteView as _0x4db736,ButtonView as _0x34ac9d}from'ckeditor5/src/ui';import{icons as _0x1998d4}from'ckeditor5/src/core';import{getTranslation as _0x15278c}from'../../utils/common-translations';import _0x10fd9e from'../../../theme/icons/submit.svg';export default class ht extends _0x4db736{constructor(_0x4dddf3,_0x22f392){super(_0x4dddf3,_0x22f392),this['queryView'][_0x363b('0xa')]['minRows']=0x1,this[_0x363b('0x19')][_0x363b('0xa')]['maxRows']=0x3,this[_0x363b('0x21')]=this[_0x363b('0xd')](),this[_0x363b('0x23')]=this[_0x363b('0x16')](),this['focusableChildren']['add'](this[_0x363b('0x23')],0x1),this['focusableChildren']['add'](this[_0x363b('0x21')]);}[_0x363b('0x12')](){super[_0x363b('0x12')](),this[_0x363b('0x19')][_0x363b('0x4')][_0x363b('0xc')](this[_0x363b('0x23')]),this[_0x363b('0x14')][_0x363b('0xc')](this[_0x363b('0x21')]),this[_0x363b('0x22')][_0x363b('0x1b')](_0x363b('0x15'),(_0x493a26,_0x490ed8)=>{_0x493a26[_0x363b('0x5')]==this[_0x363b('0x19')]['fieldView'][_0x363b('0xf')]&&(this[_0x363b('0x10')](),_0x490ed8());});}[_0x363b('0xd')](){const _0x347c08=new _0x34ac9d(this[_0x363b('0x2')]),_0x3f0f39=this['locale'];return _0x347c08[_0x363b('0x1b')]({'icon':_0x10fd9e,'label':_0x15278c(_0x3f0f39,_0x363b('0x0')),'isVisible':!0x0,'tooltip':!0x0,'class':_0x363b('0x1')}),_0x347c08['on'](_0x363b('0x1f'),()=>{this[_0x363b('0x10')]();}),_0x347c08[_0x363b('0x24')](_0x363b('0x9'))['to'](this[_0x363b('0x19')][_0x363b('0xa')],'isEmpty',this,'isEnabled',(_0x30e235,_0x2e9e57)=>!_0x30e235&&_0x2e9e57),_0x347c08;}['_createShowHistoryButton'](){const _0x11d771=new _0x34ac9d(this[_0x363b('0x2')]),_0x412427=this[_0x363b('0xb')],_0x4e749c=this['locale'];_0x11d771[_0x363b('0x1b')]({'label':_0x15278c(_0x4e749c,_0x363b('0x8')),'withText':!0x1,'icon':_0x1998d4[_0x363b('0x1a')],'tooltip':!0x0,'tooltipPosition':'sw','class':'ck-ai-form__toggle-history'}),_0x11d771[_0x363b('0x24')](_0x363b('0x1e'))['to'](_0x412427,_0x363b('0x25')),_0x11d771['bind'](_0x363b('0x9'))['to'](this,'isEnabled'),_0x11d771['on'](_0x363b('0x1f'),()=>{_0x412427[_0x363b('0x25')]=!_0x412427[_0x363b('0x25')],_0x412427[_0x363b('0x25')]?this[_0x363b('0x17')][_0x363b('0x6')]():this['focus']();});const _0x57fca6=()=>{_0x56dc99['window']['requestAnimationFrame'](()=>{if(_0x3c0f96(this[_0x363b('0xf')])){const _0x29d5c4=new _0x29e254(this[_0x363b('0x19')][_0x363b('0xa')][_0x363b('0xf')]),_0x4e4c3c=_0x29d5c4[_0x363b('0x11')],_0xd479bb=_0x363b('0x7')===_0x4e749c[_0x363b('0x3')]?'left':_0x363b('0x1c');_0x29d5c4[_0x363b('0xe')](),_0x11d771[_0x363b('0xf')][_0x363b('0x1d')][_0xd479bb]=_0x4e4c3c-_0x29d5c4[_0x363b('0x11')]+0x1+'px';}});};return this[_0x363b('0x19')]['fieldView']['on'](_0x363b('0x18'),_0x57fca6),this['on'](_0x363b('0x12'),_0x57fca6),_0x11d771;}[_0x363b('0x10')](){const _0x45723b=this[_0x363b('0x19')][_0x363b('0xa')][_0x363b('0xf')][_0x363b('0x26')];this['fire']('submit',_0x45723b);}[_0x363b('0x6')](_0x4b3562){-0x1===_0x4b3562?this[_0x363b('0x13')]['focusLast']():this[_0x363b('0x13')][_0x363b('0x20')]();}}
23
+ const _0x4d05=['focusCycler','render','rtl','showHistoryButtonView','requestAnimationFrame','enter','queryView','minRows','isEnabled','right','maxRows','window','set','bind','ck-ai-form__submit','execute','isEmpty','excludeScrollbarsAndBorders','resultsView','_createShowHistoryButton','width','add','focusableChildren','submit','isVisible','update','left','fieldView','element','submitButtonView','history','filteredView','ck-ai-form__toggle-history','uiLanguageDirection','locale','focus','fieldWrapperChildren','style'];(function(_0x3871a2,_0x4d051e){const _0x51a60b=function(_0x501207){while(--_0x501207){_0x3871a2['push'](_0x3871a2['shift']());}};_0x51a60b(++_0x4d051e);}(_0x4d05,0x151));const _0x51a6=function(_0x3871a2,_0x4d051e){_0x3871a2=_0x3871a2-0x0;let _0x51a60b=_0x4d05[_0x3871a2];return _0x51a60b;};import{Rect as _0x293d28,global as _0x466960,isVisible as _0x5e192d}from'ckeditor5/src/utils.js';import{AutocompleteView as _0x18e358,ButtonView as _0x24e415}from'ckeditor5/src/ui.js';import{icons as _0x4a69a6}from'ckeditor5/src/core.js';import{getTranslation as _0x2a64b3}from'../../utils/common-translations.js';import _0xeceddd from'../../../theme/icons/submit.svg';export default class ht extends _0x18e358{constructor(_0x55cd69,_0x43c59d){super(_0x55cd69,_0x43c59d),this['queryView'][_0x51a6('0x20')][_0x51a6('0xc')]=0x1,this['queryView'][_0x51a6('0x20')][_0x51a6('0xf')]=0x3,this['submitButtonView']=this['_createSubmitButton'](),this[_0x51a6('0x8')]=this['_createShowHistoryButton'](),this[_0x51a6('0x1b')][_0x51a6('0x1a')](this[_0x51a6('0x8')],0x1),this['focusableChildren'][_0x51a6('0x1a')](this[_0x51a6('0x22')]);}[_0x51a6('0x6')](){super['render'](),this['queryView'][_0x51a6('0x3')][_0x51a6('0x1a')](this[_0x51a6('0x8')]),this['children'][_0x51a6('0x1a')](this[_0x51a6('0x22')]),this['keystrokes'][_0x51a6('0x11')](_0x51a6('0xa'),(_0x50e13c,_0x4dfe0a)=>{_0x50e13c['target']==this['queryView'][_0x51a6('0x20')][_0x51a6('0x21')]&&(this['submit'](),_0x4dfe0a());});}['_createSubmitButton'](){const _0x3b4eb2=new _0x24e415(this[_0x51a6('0x1')]),_0x168ce5=this['locale'];return _0x3b4eb2['set']({'icon':_0xeceddd,'label':_0x2a64b3(_0x168ce5,'Submit'),'isVisible':!0x0,'tooltip':!0x0,'class':_0x51a6('0x13')}),_0x3b4eb2['on'](_0x51a6('0x14'),()=>{this[_0x51a6('0x1c')]();}),_0x3b4eb2[_0x51a6('0x12')](_0x51a6('0xd'))['to'](this[_0x51a6('0xb')][_0x51a6('0x20')],_0x51a6('0x15'),this,_0x51a6('0xd'),(_0x29d530,_0x532130)=>!_0x29d530&&_0x532130),_0x3b4eb2;}[_0x51a6('0x18')](){const _0x5ef713=new _0x24e415(this[_0x51a6('0x1')]),_0x2946a2=this[_0x51a6('0x17')],_0x2a0abf=this['locale'];_0x5ef713['set']({'label':_0x2a64b3(_0x2a0abf,'History'),'withText':!0x1,'icon':_0x4a69a6[_0x51a6('0x23')],'tooltip':!0x0,'tooltipPosition':'sw','class':_0x51a6('0x25')}),_0x5ef713[_0x51a6('0x12')]('isOn')['to'](_0x2946a2,_0x51a6('0x1d')),_0x5ef713[_0x51a6('0x12')](_0x51a6('0xd'))['to'](this,'isEnabled'),_0x5ef713['on']('execute',()=>{_0x2946a2[_0x51a6('0x1d')]=!_0x2946a2[_0x51a6('0x1d')],_0x2946a2[_0x51a6('0x1d')]?this[_0x51a6('0x24')][_0x51a6('0x2')]():this[_0x51a6('0x2')]();});const _0x5e9518=()=>{_0x466960[_0x51a6('0x10')][_0x51a6('0x9')](()=>{if(_0x5e192d(this[_0x51a6('0x21')])){const _0xb43802=new _0x293d28(this[_0x51a6('0xb')]['fieldView'][_0x51a6('0x21')]),_0x42b7eb=_0xb43802[_0x51a6('0x19')],_0x362f97=_0x51a6('0x7')===_0x2a0abf[_0x51a6('0x0')]?_0x51a6('0x1f'):_0x51a6('0xe');_0xb43802[_0x51a6('0x16')](),_0x5ef713['element'][_0x51a6('0x4')][_0x362f97]=_0x42b7eb-_0xb43802[_0x51a6('0x19')]+0x1+'px';}});};return this[_0x51a6('0xb')][_0x51a6('0x20')]['on'](_0x51a6('0x1e'),_0x5e9518),this['on'](_0x51a6('0x6'),_0x5e9518),_0x5ef713;}[_0x51a6('0x1c')](){const _0xc9e6d5=this[_0x51a6('0xb')][_0x51a6('0x20')]['element']['value'];this['fire']('submit',_0xc9e6d5);}[_0x51a6('0x2')](_0x4254e7){-0x1===_0x4254e7?this[_0x51a6('0x5')]['focusLast']():this['focusCycler']['focusFirst']();}}
@@ -5,8 +5,8 @@
5
5
  /**
6
6
  * @module ai/ui/aiformtoolbarview
7
7
  */
8
- import type { Locale } from 'ckeditor5/src/utils';
9
- import { ToolbarView, ButtonView } from 'ckeditor5/src/ui';
8
+ import type { Locale } from 'ckeditor5/src/utils.js';
9
+ import { ToolbarView, ButtonView } from 'ckeditor5/src/ui.js';
10
10
  /**
11
11
  * The action name affecting the label of {@link ~AIFormToolbarView#replaceButton}.
12
12
  */
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x1f36=['Stop','items','insert','bind','Insert\x20below','ck-hidden','AI_','isVisible','INSERT','toUpperCase','_createButton','extendTemplate','locale','replace','REPLACE','replaceButton','mainAction','bindTemplate','label','_CONTENT','set','stopButton','tryAgainButton','insertButton'];(function(_0x45b33e,_0x1f36eb){const _0x4e2363=function(_0x4ee979){while(--_0x4ee979){_0x45b33e['push'](_0x45b33e['shift']());}};_0x4e2363(++_0x1f36eb);}(_0x1f36,0x189));const _0x4e23=function(_0x45b33e,_0x1f36eb){_0x45b33e=_0x45b33e-0x0;let _0x4e2363=_0x1f36[_0x45b33e];return _0x4e2363;};import{ToolbarView as _0x231e84,ButtonView as _0x48c396}from'ckeditor5/src/ui';import{getTranslation as _0x4e0d35}from'../../utils/common-translations';export var AIFormToolbarViewMainActionLabel;!function(_0x5b36b0){_0x5b36b0['REPLACE']=_0x4e23('0x4'),_0x5b36b0[_0x4e23('0x17')]=_0x4e23('0x11');}(AIFormToolbarViewMainActionLabel||(AIFormToolbarViewMainActionLabel={}));export default class ti extends _0x231e84{constructor(_0x36b19c){super(_0x36b19c),this[_0x4e23('0xb')]('isVisible',!0x1),this['set'](_0x4e23('0x7'),AIFormToolbarViewMainActionLabel[_0x4e23('0x5')]),this[_0x4e23('0x6')]=this[_0x4e23('0x1')]('','ck-button-action'),this[_0x4e23('0x6')][_0x4e23('0x12')](_0x4e23('0x9'))['to'](this,'mainAction',_0x44d8e8=>_0x4e0d35(_0x36b19c,_0x4e23('0x15')+_0x44d8e8[_0x4e23('0x0')]()+_0x4e23('0xa'))),this['insertButton']=this[_0x4e23('0x1')](_0x4e0d35(_0x36b19c,_0x4e23('0x13'))),this[_0x4e23('0xd')]=this[_0x4e23('0x1')](_0x4e0d35(_0x36b19c,'Try\x20again')),this['stopButton']=this[_0x4e23('0x1')](_0x4e0d35(_0x36b19c,_0x4e23('0xf')));const _0x5aef36=this[_0x4e23('0x8')];this[_0x4e23('0x2')]({'attributes':{'class':['ck-ai-form__toolbar',_0x5aef36['if'](_0x4e23('0x16'),_0x4e23('0x14'),_0x1e4099=>!_0x1e4099)]}}),this[_0x4e23('0x10')]['addMany']([this['replaceButton'],this[_0x4e23('0xe')],this['tryAgainButton'],this[_0x4e23('0xc')]]);}[_0x4e23('0x1')](_0xcf413,_0x2a6ba3){const _0x3b5f9a=new _0x48c396(this[_0x4e23('0x3')]);return _0x3b5f9a['set']({'label':_0xcf413,'class':_0x2a6ba3||'','isVisible':!0x0,'withText':!0x0}),_0x3b5f9a;}}
23
+ const _0x1662=['label','ck-button-action','_createButton','isVisible','Insert\x20below','addMany','Try\x20again','_CONTENT','insertButton','bind','items','tryAgainButton','REPLACE','INSERT','replace','locale','replaceButton','bindTemplate','stopButton','toUpperCase','set','insert','extendTemplate','ck-ai-form__toolbar'];(function(_0x31d825,_0x16627b){const _0x29d438=function(_0x498ec1){while(--_0x498ec1){_0x31d825['push'](_0x31d825['shift']());}};_0x29d438(++_0x16627b);}(_0x1662,0x135));const _0x29d4=function(_0x31d825,_0x16627b){_0x31d825=_0x31d825-0x0;let _0x29d438=_0x1662[_0x31d825];return _0x29d438;};import{ToolbarView as _0x38c639,ButtonView as _0x535cfe}from'ckeditor5/src/ui.js';import{getTranslation as _0x1c3eed}from'../../utils/common-translations.js';export var AIFormToolbarViewMainActionLabel;!function(_0x1683ee){_0x1683ee[_0x29d4('0xf')]=_0x29d4('0x11'),_0x1683ee[_0x29d4('0x10')]=_0x29d4('0x0');}(AIFormToolbarViewMainActionLabel||(AIFormToolbarViewMainActionLabel={}));export default class ti extends _0x38c639{constructor(_0x30a512){super(_0x30a512),this['set'](_0x29d4('0x6'),!0x1),this[_0x29d4('0x17')]('mainAction',AIFormToolbarViewMainActionLabel[_0x29d4('0xf')]),this[_0x29d4('0x13')]=this['_createButton']('',_0x29d4('0x4')),this[_0x29d4('0x13')][_0x29d4('0xc')](_0x29d4('0x3'))['to'](this,'mainAction',_0x3f0c55=>_0x1c3eed(_0x30a512,'AI_'+_0x3f0c55[_0x29d4('0x16')]()+_0x29d4('0xa'))),this[_0x29d4('0xb')]=this[_0x29d4('0x5')](_0x1c3eed(_0x30a512,_0x29d4('0x7'))),this[_0x29d4('0xe')]=this['_createButton'](_0x1c3eed(_0x30a512,_0x29d4('0x9'))),this[_0x29d4('0x15')]=this[_0x29d4('0x5')](_0x1c3eed(_0x30a512,'Stop'));const _0x26666b=this[_0x29d4('0x14')];this[_0x29d4('0x1')]({'attributes':{'class':[_0x29d4('0x2'),_0x26666b['if'](_0x29d4('0x6'),'ck-hidden',_0xfaa859=>!_0xfaa859)]}}),this[_0x29d4('0xd')][_0x29d4('0x8')]([this[_0x29d4('0x13')],this[_0x29d4('0xb')],this[_0x29d4('0xe')],this[_0x29d4('0x15')]]);}[_0x29d4('0x5')](_0x4ee36a,_0x3cb987){const _0x3b9140=new _0x535cfe(this[_0x29d4('0x12')]);return _0x3b9140[_0x29d4('0x17')]({'label':_0x4ee36a,'class':_0x3cb987||'','isVisible':!0x0,'withText':!0x0}),_0x3b9140;}}
@@ -5,12 +5,12 @@
5
5
  /**
6
6
  * @module ai/ui/aiformview
7
7
  */
8
- import { FocusTracker, KeystrokeHandler, type Locale } from 'ckeditor5/src/utils';
9
- import { View, FormHeaderView } from 'ckeditor5/src/ui';
10
- import AIFormToolbarView, { AIFormToolbarViewMainActionLabel } from './aiformtoolbarview';
11
- import AIFormContentArea from './aiformcontentarea';
12
- import AIFormErrorView from './aiformerrorview';
13
- import AIFormPromptView from './aiformpromptview';
8
+ import { FocusTracker, KeystrokeHandler, type Locale } from 'ckeditor5/src/utils.js';
9
+ import { View, FormHeaderView } from 'ckeditor5/src/ui.js';
10
+ import AIFormToolbarView, { AIFormToolbarViewMainActionLabel } from './aiformtoolbarview.js';
11
+ import AIFormContentArea from './aiformcontentarea.js';
12
+ import AIFormErrorView from './aiformerrorview.js';
13
+ import AIFormPromptView from './aiformpromptview.js';
14
14
  /**
15
15
  * A class representing the form view of the AI assistant.
16
16
  */
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x4260=['startProcessing','reset','tab','errorView','trim','set','render','Empty\x20history','tryAgainEvent','bindTo','replaceContent','tryAgainButton','stopButton','submit','isProcessing','finishProcessing','bind','prompt','Ask\x20AI\x20to\x20improve\x20generated\x20text','insertContentBelow','insertButton','_focusables','isError','historyGroupView','_createHistoryView','focusCycler','text','locale','fire','search','Ask\x20AI\x20to\x20edit\x20or\x20generate','execute','isEnabled','handleError','focusNext','REPLACE','replaceButton','toolbar','stop','high','_focusCycler','ck-ai-form-content','items','_createPromptView','focusTracker','focusFirst','contentArea','fieldView','listenTo','label','bindTemplate','value','focus','_promptHistory','copyButtonView','div','isVisible','forwardCycle','focusPrevious','element','_createToolbar','add','header','ck-hidden','mainAction','backwardCycle','setTemplate','keystrokes','queryView','AI\x20Assistant','promptView'];(function(_0x5c6b58,_0x426003){const _0x4e7c2c=function(_0x10b11c){while(--_0x10b11c){_0x5c6b58['push'](_0x5c6b58['shift']());}};_0x4e7c2c(++_0x426003);}(_0x4260,0x1e8));const _0x4e7c=function(_0x5c6b58,_0x426003){_0x5c6b58=_0x5c6b58-0x0;let _0x4e7c2c=_0x4260[_0x5c6b58];return _0x4e7c2c;};import{FocusTracker as _0x4fd0d4,KeystrokeHandler as _0x2d95e9}from'ckeditor5/src/utils';import{View as _0x2da825,FocusCycler as _0x14119c,createLabeledTextarea as _0x309d5f,FormHeaderView as _0x1e48b3}from'ckeditor5/src/ui';import _0x42bd2d,{AIFormToolbarViewMainActionLabel as _0xe9df45}from'./aiformtoolbarview';import _0x11440e from'./aiformcontentarea';import _0xe8c4cf from'./aiformerrorview';import _0x478eb9 from'./aiformpromptview';import _0x3ee439 from'./aihistorylistview';import _0x34de1b from'./aihistorylistitemview';import _0x3b436a from'./prompthistory';import{getTranslation as _0x34361d}from'../../utils/common-translations';import{escape as _0x3fcbdc}from'lodash-es';import _0x36e263 from'../../../theme/icons/robot-pencil.svg';export default class v extends _0x2da825{constructor(_0x1cd06f,_0x1cd952,_0x28b7e4=''){super(_0x1cd06f),this['set'](_0x4e7c('0x29'),!0x0),this[_0x4e7c('0xe')]('isProcessing',!0x1),this[_0x4e7c('0xe')](_0x4e7c('0x1a'),''),this[_0x4e7c('0xe')]('value',''),this[_0x4e7c('0xe')](_0x4e7c('0x1f'),!0x1),this[_0x4e7c('0xe')](_0x4e7c('0x2'),_0xe9df45[_0x4e7c('0x2c')]),this['_promptHistory']=new _0x3b436a(),this[_0x4e7c('0xc')]=new _0xe8c4cf(_0x1cd06f),this[_0x4e7c('0x0')]=new _0x1e48b3(_0x1cd06f,{'label':_0x34361d(_0x1cd06f,_0x4e7c('0x7')),'icon':_0x36e263}),this[_0x4e7c('0x37')]=new _0x11440e(_0x1cd06f,_0x28b7e4),this[_0x4e7c('0x37')][_0x4e7c('0x19')](_0x4e7c('0x17'))['to'](this),this[_0x4e7c('0x37')][_0x4e7c('0x19')](_0x4e7c('0x3c'))['to'](this),this['toolbar']=this[_0x4e7c('0x45')](),this[_0x4e7c('0x2e')][_0x4e7c('0x19')](_0x4e7c('0x2'))['to'](this),this[_0x4e7c('0x8')]=this[_0x4e7c('0x34')](),this[_0x4e7c('0x35')]=new _0x4fd0d4(),this[_0x4e7c('0x5')]=new _0x2d95e9(),this[_0x4e7c('0x1e')]=this['createCollection']([this[_0x4e7c('0x37')],this[_0x4e7c('0x37')][_0x4e7c('0x3f')],this[_0x4e7c('0x2e')],this[_0x4e7c('0x8')]]),this[_0x4e7c('0x31')]=new _0x14119c({'focusables':this[_0x4e7c('0x1e')],'focusTracker':this[_0x4e7c('0x35')],'keystrokeHandler':this[_0x4e7c('0x5')],'actions':{'focusPrevious':'shift\x20+\x20tab','focusNext':_0x4e7c('0xb')}}),this[_0x4e7c('0x8')][_0x4e7c('0x22')]['on'](_0x4e7c('0x42'),_0x569a6a=>{this['_focusCycler'][_0x4e7c('0x2b')](),_0x569a6a['stop']();}),this[_0x4e7c('0x8')]['focusCycler']['on'](_0x4e7c('0x3'),_0x5444f7=>{this['_focusCycler'][_0x4e7c('0x43')](),_0x5444f7[_0x4e7c('0x2f')]();}),this[_0x4e7c('0x8')][_0x4e7c('0x6')][_0x4e7c('0x38')][_0x4e7c('0x19')](_0x4e7c('0x3c'))['to'](this,_0x4e7c('0x1a'));const _0x11c6d9=this[_0x4e7c('0x3b')];this[_0x4e7c('0x4')]({'tag':_0x4e7c('0x40'),'attributes':{'class':['ck','ck-ai-form',_0x1cd952],'tabindex':'-1'},'children':[this[_0x4e7c('0x0')],{'tag':'div','attributes':{'class':['ck',_0x4e7c('0x32')]},'children':[{'tag':_0x4e7c('0x40'),'attributes':{'class':[_0x11c6d9['if'](_0x4e7c('0x1f'),_0x4e7c('0x1'),_0x49ee2d=>!_0x49ee2d)]},'children':[this[_0x4e7c('0xc')]]},this[_0x4e7c('0x37')],this[_0x4e7c('0x2e')],this[_0x4e7c('0x8')]]}]});}[_0x4e7c('0xf')](){super['render'](),this[_0x4e7c('0x35')][_0x4e7c('0x46')](this[_0x4e7c('0x37')][_0x4e7c('0x44')]),this['focusTracker'][_0x4e7c('0x46')](this[_0x4e7c('0x37')][_0x4e7c('0x3f')][_0x4e7c('0x44')]),this[_0x4e7c('0x35')]['add'](this[_0x4e7c('0x2e')]['element']),this['focusTracker']['add'](this[_0x4e7c('0x8')][_0x4e7c('0x44')]),this[_0x4e7c('0x5')][_0x4e7c('0x39')](this[_0x4e7c('0x44')]);}[_0x4e7c('0x3d')](){this['_focusCycler'][_0x4e7c('0x36')]();}[_0x4e7c('0xa')](){this['prompt']='',this[_0x4e7c('0x3c')]='',this[_0x4e7c('0x1f')]=!0x1,this[_0x4e7c('0x8')]['reset'](),this[_0x4e7c('0x37')][_0x4e7c('0x41')]=!0x1,this[_0x4e7c('0x2e')][_0x4e7c('0x41')]=!0x1;}[_0x4e7c('0x34')](){const _0x167b45=this[_0x4e7c('0x24')],_0x5e4771=new _0x478eb9(_0x167b45,{'queryView':{'label':_0x34361d(_0x167b45,_0x4e7c('0x27')),'creator':_0x309d5f,'showIcon':!0x1,'showResetButton':!0x1},'infoView':{'text':{'noSearchableItems':{'primary':_0x34361d(_0x167b45,_0x4e7c('0x10')),'secondary':_0x34361d(_0x167b45,'Ask\x20AI\x20and\x20your\x20prompts\x20will\x20be\x20listed\x20here\x20for\x20you\x20to\x20use\x20later.')}}},'filteredView':this[_0x4e7c('0x21')](),'queryMinChars':0x1/0x0,'resetOnBlur':!0x1});return _0x5e4771[_0x4e7c('0x19')]('isEnabled')['to'](this,_0x4e7c('0x29'),this,'isProcessing',(_0x38f482,_0x539b3f)=>_0x38f482&&!_0x539b3f),this[_0x4e7c('0x39')](_0x5e4771,_0x4e7c('0x16'),(_0x2bfeed,_0x12fedf)=>{this['prompt']=_0x12fedf;const _0x2ffc23=_0x3fcbdc(_0x12fedf);this[_0x4e7c('0x25')]('submitPrompt',_0x2ffc23),_0x12fedf[_0x4e7c('0xd')]()&&this[_0x4e7c('0x3e')][_0x4e7c('0x46')]({'prompt':_0x2ffc23},0x0);},{'priority':_0x4e7c('0x30')}),_0x5e4771;}[_0x4e7c('0x21')](){const _0x4b4ee2=new _0x3ee439(this[_0x4e7c('0x24')]);return _0x4b4ee2[_0x4e7c('0x20')][_0x4e7c('0x33')][_0x4e7c('0x12')](this[_0x4e7c('0x3e')])['as'](_0x34de1b),_0x4b4ee2['on']('clearHistory',()=>{this['_promptHistory']['clear'](),this[_0x4e7c('0x8')][_0x4e7c('0x26')](''),this[_0x4e7c('0x8')][_0x4e7c('0x3d')]();}),_0x4b4ee2;}['_createToolbar'](){const _0x55ba04=new _0x42bd2d(this[_0x4e7c('0x24')]);return _0x55ba04[_0x4e7c('0x2d')][_0x4e7c('0x19')](_0x4e7c('0x29'))['to'](this,'isEnabled',this,_0x4e7c('0x17'),this,_0x4e7c('0x3c'),(_0x2e2875,_0x184f00,_0x249b4e)=>_0x2e2875&&!_0x184f00&&!!_0x249b4e),_0x55ba04[_0x4e7c('0x2d')]['delegate']('execute')['to'](this,_0x4e7c('0x13')),_0x55ba04[_0x4e7c('0x1d')][_0x4e7c('0x19')](_0x4e7c('0x29'))['to'](this,'isEnabled',this,_0x4e7c('0x17'),this,_0x4e7c('0x3c'),(_0x2f0463,_0x246cac,_0x4881d6)=>_0x2f0463&&!_0x246cac&&!!_0x4881d6),_0x55ba04['insertButton']['delegate'](_0x4e7c('0x28'))['to'](this,_0x4e7c('0x1c')),_0x55ba04['tryAgainButton'][_0x4e7c('0x19')]('isEnabled')['to'](this,_0x4e7c('0x29'),this,'isProcessing',(_0x48c778,_0x5c8f8c)=>_0x48c778&&!_0x5c8f8c),_0x55ba04[_0x4e7c('0x14')]['delegate']('execute')['to'](this,_0x4e7c('0x11')),_0x55ba04[_0x4e7c('0x15')][_0x4e7c('0x19')](_0x4e7c('0x29'))['to'](this,_0x4e7c('0x17')),_0x55ba04[_0x4e7c('0x15')]['delegate']('execute')['to'](this,'stopProcessing'),_0x55ba04;}[_0x4e7c('0x9')](){this[_0x4e7c('0x3c')]='',this[_0x4e7c('0x1f')]=!0x1,this[_0x4e7c('0x17')]=!0x0,this[_0x4e7c('0x37')]['isVisible']=!0x0,this[_0x4e7c('0x2e')][_0x4e7c('0x41')]=!0x0,this['contentArea']['focus']();}['finishProcessing'](){const _0x45dbdb=this[_0x4e7c('0x24')];this[_0x4e7c('0x17')]=!0x1,this[_0x4e7c('0x1a')]='',this['promptView'][_0x4e7c('0xa')](),this[_0x4e7c('0x3c')]&&(this['promptView'][_0x4e7c('0x6')][_0x4e7c('0x3a')]=_0x34361d(_0x45dbdb,_0x4e7c('0x1b')));}[_0x4e7c('0x2a')](_0x437315){const _0x4b37fb=this['locale'];this[_0x4e7c('0x18')](),this[_0x4e7c('0x1f')]=!0x0,this['errorView'][_0x4e7c('0x23')]=_0x437315||_0x34361d(_0x4b37fb,'AI_ERROR_FAILED'),this[_0x4e7c('0x3c')]||(this[_0x4e7c('0x37')]['isVisible']=!0x1);}}
23
+ const _0x16bc=['clear','Empty\x20history','isEnabled','locale','reset','promptView','ck-ai-form','clearHistory','focus','startProcessing','execute','stopProcessing','items','_createToolbar','delegate','label','div','AI\x20Assistant','text','Ask\x20AI\x20to\x20improve\x20generated\x20text','handleError','listenTo','element','add','isError','toolbar','historyGroupView','tryAgainEvent','focusCycler','submitPrompt','bindTo','REPLACE','set','_promptHistory','insertButton','_focusables','focusPrevious','replaceContent','_createPromptView','keystrokes','replaceButton','ck-hidden','Ask\x20AI\x20and\x20your\x20prompts\x20will\x20be\x20listed\x20here\x20for\x20you\x20to\x20use\x20later.','errorView','focusTracker','high','forwardCycle','copyButtonView','submit','contentArea','mainAction','tab','Ask\x20AI\x20to\x20edit\x20or\x20generate','_focusCycler','ck-ai-form-content','setTemplate','prompt','header','isProcessing','AI_ERROR_FAILED','focusNext','bindTemplate','fieldView','value','bind','stopButton','createCollection','backwardCycle','search','shift\x20+\x20tab','stop','tryAgainButton','fire','queryView','isVisible','finishProcessing','trim'];(function(_0x4b377e,_0x16bce7){const _0x435b1a=function(_0x54f358){while(--_0x54f358){_0x4b377e['push'](_0x4b377e['shift']());}};_0x435b1a(++_0x16bce7);}(_0x16bc,0x1a0));const _0x435b=function(_0x4b377e,_0x16bce7){_0x4b377e=_0x4b377e-0x0;let _0x435b1a=_0x16bc[_0x4b377e];return _0x435b1a;};import{FocusTracker as _0x27aa5b,KeystrokeHandler as _0x441e8f}from'ckeditor5/src/utils.js';import{View as _0x37b29f,FocusCycler as _0x41b0e9,createLabeledTextarea as _0x1515c3,FormHeaderView as _0x597e6e}from'ckeditor5/src/ui.js';import _0x3105c9,{AIFormToolbarViewMainActionLabel as _0x9f60f1}from'./aiformtoolbarview.js';import _0x28a901 from'./aiformcontentarea.js';import _0x2bf552 from'./aiformerrorview.js';import _0x3f0237 from'./aiformpromptview.js';import _0x183f18 from'./aihistorylistview.js';import _0x4e8a13 from'./aihistorylistitemview.js';import _0x247839 from'./prompthistory.js';import{getTranslation as _0x861c55}from'../../utils/common-translations.js';import{escape as _0x4970fd}from'lodash-es';import _0x531217 from'../../../theme/icons/robot-pencil.svg';export default class v extends _0x37b29f{constructor(_0x12afab,_0x47fc84,_0x53aa5f=''){super(_0x12afab),this[_0x435b('0x1')]('isEnabled',!0x0),this[_0x435b('0x1')](_0x435b('0x1b'),!0x1),this[_0x435b('0x1')](_0x435b('0x19'),''),this[_0x435b('0x1')](_0x435b('0x20'),''),this[_0x435b('0x1')]('isError',!0x1),this['set'](_0x435b('0x13'),_0x9f60f1[_0x435b('0x0')]),this[_0x435b('0x2')]=new _0x247839(),this[_0x435b('0xc')]=new _0x2bf552(_0x12afab),this[_0x435b('0x1a')]=new _0x597e6e(_0x12afab,{'label':_0x861c55(_0x12afab,_0x435b('0x3f')),'icon':_0x531217}),this[_0x435b('0x12')]=new _0x28a901(_0x12afab,_0x53aa5f),this['contentArea']['bind'](_0x435b('0x1b'))['to'](this),this['contentArea'][_0x435b('0x21')](_0x435b('0x20'))['to'](this),this[_0x435b('0x47')]=this[_0x435b('0x3b')](),this[_0x435b('0x47')][_0x435b('0x21')](_0x435b('0x13'))['to'](this),this[_0x435b('0x33')]=this[_0x435b('0x7')](),this[_0x435b('0xd')]=new _0x27aa5b(),this[_0x435b('0x8')]=new _0x441e8f(),this[_0x435b('0x4')]=this[_0x435b('0x23')]([this[_0x435b('0x12')],this['contentArea'][_0x435b('0x10')],this[_0x435b('0x47')],this['promptView']]),this[_0x435b('0x16')]=new _0x41b0e9({'focusables':this[_0x435b('0x4')],'focusTracker':this[_0x435b('0xd')],'keystrokeHandler':this[_0x435b('0x8')],'actions':{'focusPrevious':_0x435b('0x26'),'focusNext':_0x435b('0x14')}}),this[_0x435b('0x33')][_0x435b('0x4a')]['on'](_0x435b('0xf'),_0xcdc61e=>{this[_0x435b('0x16')][_0x435b('0x1d')](),_0xcdc61e[_0x435b('0x27')]();}),this[_0x435b('0x33')][_0x435b('0x4a')]['on'](_0x435b('0x24'),_0x5e5742=>{this[_0x435b('0x16')][_0x435b('0x5')](),_0x5e5742[_0x435b('0x27')]();}),this[_0x435b('0x33')][_0x435b('0x2a')][_0x435b('0x1f')][_0x435b('0x21')]('value')['to'](this,_0x435b('0x19'));const _0x471d27=this[_0x435b('0x1e')];this[_0x435b('0x18')]({'tag':_0x435b('0x3e'),'attributes':{'class':['ck',_0x435b('0x34'),_0x47fc84],'tabindex':'-1'},'children':[this['header'],{'tag':'div','attributes':{'class':['ck',_0x435b('0x17')]},'children':[{'tag':_0x435b('0x3e'),'attributes':{'class':[_0x471d27['if']('isError',_0x435b('0xa'),_0x4e7ca4=>!_0x4e7ca4)]},'children':[this[_0x435b('0xc')]]},this[_0x435b('0x12')],this['toolbar'],this[_0x435b('0x33')]]}]});}['render'](){super['render'](),this[_0x435b('0xd')][_0x435b('0x45')](this[_0x435b('0x12')]['element']),this[_0x435b('0xd')][_0x435b('0x45')](this[_0x435b('0x12')][_0x435b('0x10')][_0x435b('0x44')]),this[_0x435b('0xd')][_0x435b('0x45')](this[_0x435b('0x47')][_0x435b('0x44')]),this[_0x435b('0xd')]['add'](this['promptView'][_0x435b('0x44')]),this[_0x435b('0x8')][_0x435b('0x43')](this[_0x435b('0x44')]);}[_0x435b('0x36')](){this[_0x435b('0x16')]['focusFirst']();}[_0x435b('0x32')](){this[_0x435b('0x19')]='',this[_0x435b('0x20')]='',this[_0x435b('0x46')]=!0x1,this[_0x435b('0x33')][_0x435b('0x32')](),this['contentArea']['isVisible']=!0x1,this[_0x435b('0x47')][_0x435b('0x2b')]=!0x1;}[_0x435b('0x7')](){const _0xfd6dc4=this[_0x435b('0x31')],_0x30a541=new _0x3f0237(_0xfd6dc4,{'queryView':{'label':_0x861c55(_0xfd6dc4,_0x435b('0x15')),'creator':_0x1515c3,'showIcon':!0x1,'showResetButton':!0x1},'infoView':{'text':{'noSearchableItems':{'primary':_0x861c55(_0xfd6dc4,_0x435b('0x2f')),'secondary':_0x861c55(_0xfd6dc4,_0x435b('0xb'))}}},'filteredView':this['_createHistoryView'](),'queryMinChars':0x1/0x0,'resetOnBlur':!0x1});return _0x30a541[_0x435b('0x21')](_0x435b('0x30'))['to'](this,'isEnabled',this,_0x435b('0x1b'),(_0x353240,_0x574b06)=>_0x353240&&!_0x574b06),this[_0x435b('0x43')](_0x30a541,_0x435b('0x11'),(_0x20583d,_0x4f7af3)=>{this[_0x435b('0x19')]=_0x4f7af3;const _0x5621ea=_0x4970fd(_0x4f7af3);this[_0x435b('0x29')](_0x435b('0x4b'),_0x5621ea),_0x4f7af3[_0x435b('0x2d')]()&&this[_0x435b('0x2')]['add']({'prompt':_0x5621ea},0x0);},{'priority':_0x435b('0xe')}),_0x30a541;}['_createHistoryView'](){const _0x48fac8=new _0x183f18(this[_0x435b('0x31')]);return _0x48fac8[_0x435b('0x48')][_0x435b('0x3a')][_0x435b('0x4c')](this[_0x435b('0x2')])['as'](_0x4e8a13),_0x48fac8['on'](_0x435b('0x35'),()=>{this['_promptHistory'][_0x435b('0x2e')](),this[_0x435b('0x33')][_0x435b('0x25')](''),this['promptView']['focus']();}),_0x48fac8;}[_0x435b('0x3b')](){const _0xfdcacb=new _0x3105c9(this['locale']);return _0xfdcacb[_0x435b('0x9')][_0x435b('0x21')](_0x435b('0x30'))['to'](this,_0x435b('0x30'),this,'isProcessing',this,_0x435b('0x20'),(_0x1d111a,_0x5540f1,_0x28c65d)=>_0x1d111a&&!_0x5540f1&&!!_0x28c65d),_0xfdcacb[_0x435b('0x9')][_0x435b('0x3c')](_0x435b('0x38'))['to'](this,_0x435b('0x6')),_0xfdcacb[_0x435b('0x3')][_0x435b('0x21')]('isEnabled')['to'](this,_0x435b('0x30'),this,'isProcessing',this,'value',(_0x128c8e,_0x2bc622,_0x18a478)=>_0x128c8e&&!_0x2bc622&&!!_0x18a478),_0xfdcacb[_0x435b('0x3')][_0x435b('0x3c')](_0x435b('0x38'))['to'](this,'insertContentBelow'),_0xfdcacb[_0x435b('0x28')][_0x435b('0x21')](_0x435b('0x30'))['to'](this,_0x435b('0x30'),this,_0x435b('0x1b'),(_0x1c0eb0,_0x4deefc)=>_0x1c0eb0&&!_0x4deefc),_0xfdcacb[_0x435b('0x28')][_0x435b('0x3c')](_0x435b('0x38'))['to'](this,_0x435b('0x49')),_0xfdcacb['stopButton']['bind']('isEnabled')['to'](this,_0x435b('0x1b')),_0xfdcacb[_0x435b('0x22')][_0x435b('0x3c')](_0x435b('0x38'))['to'](this,_0x435b('0x39')),_0xfdcacb;}[_0x435b('0x37')](){this[_0x435b('0x20')]='',this['isError']=!0x1,this[_0x435b('0x1b')]=!0x0,this[_0x435b('0x12')][_0x435b('0x2b')]=!0x0,this[_0x435b('0x47')]['isVisible']=!0x0,this[_0x435b('0x12')][_0x435b('0x36')]();}['finishProcessing'](){const _0x3f3096=this[_0x435b('0x31')];this[_0x435b('0x1b')]=!0x1,this[_0x435b('0x19')]='',this[_0x435b('0x33')][_0x435b('0x32')](),this[_0x435b('0x20')]&&(this[_0x435b('0x33')]['queryView'][_0x435b('0x3d')]=_0x861c55(_0x3f3096,_0x435b('0x41')));}[_0x435b('0x42')](_0x12e6d4){const _0x5232fa=this['locale'];this[_0x435b('0x2c')](),this[_0x435b('0x46')]=!0x0,this[_0x435b('0xc')][_0x435b('0x40')]=_0x12e6d4||_0x861c55(_0x5232fa,_0x435b('0x1c')),this[_0x435b('0x20')]||(this['contentArea'][_0x435b('0x2b')]=!0x1);}}
@@ -5,8 +5,8 @@
5
5
  /**
6
6
  * @module ai/ui/aihistorylistitemview
7
7
  */
8
- import { ListItemView } from 'ckeditor5/src/ui';
9
- import type { PromptHistoryEntry } from './prompthistory';
8
+ import { ListItemView } from 'ckeditor5/src/ui.js';
9
+ import type { PromptHistoryEntry } from './prompthistory.js';
10
10
  /**
11
11
  * A list item view that displays a historical prompt
12
12
  */
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x1f44=['execute','prompt','fire','set','locale','add'];(function(_0x3479df,_0x1f44f9){const _0x18c141=function(_0x3476bf){while(--_0x3476bf){_0x3479df['push'](_0x3479df['shift']());}};_0x18c141(++_0x1f44f9);}(_0x1f44,0x140));const _0x18c1=function(_0x3479df,_0x1f44f9){_0x3479df=_0x3479df-0x0;let _0x18c141=_0x1f44[_0x3479df];return _0x18c141;};import{ListItemView as _0x188efa,ButtonView as _0x201c1b}from'ckeditor5/src/ui';import _0x1e0b32 from'../dropdown/buttonlabelwithhighlightview';import{unescape as _0x4bdd00}from'lodash-es';export default class pt extends _0x188efa{constructor(_0x5d13d4){super();const _0x248fb7=new _0x1e0b32(),_0x5b0def=new _0x201c1b(this[_0x18c1('0x2')],_0x248fb7);this['children'][_0x18c1('0x3')](_0x5b0def),_0x5b0def[_0x18c1('0x1')]({'label':_0x5d13d4[_0x18c1('0x5')],'withText':!0x0}),_0x5b0def['on']('execute',()=>{this[_0x18c1('0x0')](_0x18c1('0x4'),{'value':_0x4bdd00(_0x5d13d4[_0x18c1('0x5')])});});}}
23
+ const _0x1636=['prompt','add','children','fire','locale','execute','set'];(function(_0x150a23,_0x1636d1){const _0x36e097=function(_0x3f389a){while(--_0x3f389a){_0x150a23['push'](_0x150a23['shift']());}};_0x36e097(++_0x1636d1);}(_0x1636,0x69));const _0x36e0=function(_0x150a23,_0x1636d1){_0x150a23=_0x150a23-0x0;let _0x36e097=_0x1636[_0x150a23];return _0x36e097;};import{ListItemView as _0x96b59a,ButtonView as _0x3d883a}from'ckeditor5/src/ui.js';import _0xd4776d from'../dropdown/buttonlabelwithhighlightview.js';import{unescape as _0x5977c9}from'lodash-es';export default class os extends _0x96b59a{constructor(_0x35ca90){super();const _0xe043de=new _0xd4776d(),_0x577a5a=new _0x3d883a(this[_0x36e0('0x4')],_0xe043de);this[_0x36e0('0x2')][_0x36e0('0x1')](_0x577a5a),_0x577a5a[_0x36e0('0x6')]({'label':_0x35ca90[_0x36e0('0x0')],'withText':!0x0}),_0x577a5a['on']('execute',()=>{this[_0x36e0('0x3')](_0x36e0('0x5'),{'value':_0x5977c9(_0x35ca90['prompt'])});});}}
@@ -5,8 +5,8 @@
5
5
  /**
6
6
  * @module ai/ui/aihistorylistview
7
7
  */
8
- import { ListView, ListItemGroupView, ButtonView, type FilteredView } from 'ckeditor5/src/ui';
9
- import type { Locale } from 'ckeditor5/src/utils';
8
+ import { ListView, ListItemGroupView, ButtonView, type FilteredView } from 'ckeditor5/src/ui.js';
9
+ import type { Locale } from 'ckeditor5/src/utils.js';
10
10
  /**
11
11
  * A list view that displays a list of AI prompts with filter pass-through.
12
12
  *
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x40fa=['historyGroupView','add','_createClearHistoryButton','execute','length','label','delegate','clearHistory','children','clearHistoryButton','Clear','Prompt\x20history','items','filter','set','locale'];(function(_0x4f0495,_0x40fa69){const _0x350744=function(_0x52dcee){while(--_0x52dcee){_0x4f0495['push'](_0x4f0495['shift']());}};_0x350744(++_0x40fa69);}(_0x40fa,0x1b0));const _0x3507=function(_0x4f0495,_0x40fa69){_0x4f0495=_0x4f0495-0x0;let _0x350744=_0x40fa[_0x4f0495];return _0x350744;};import{ListView as _0x5a3971,ListItemGroupView as _0x31a471,ButtonView as _0x3455d7}from'ckeditor5/src/ui';import{getTranslation as _0x4d83db}from'../../utils/common-translations';export default class ut extends _0x5a3971{constructor(_0x5de4b0){super(_0x5de4b0),this['clearHistoryButton']=this[_0x3507('0x2')](),this[_0x3507('0x0')]=new _0x31a471(),this['historyGroupView'][_0x3507('0x8')][_0x3507('0x1')](this[_0x3507('0x9')],0x1),this[_0x3507('0x0')][_0x3507('0x5')]=_0x4d83db(_0x5de4b0,_0x3507('0xb')),this['historyGroupView'][_0x3507('0xc')][_0x3507('0x6')]('execute')['to'](this),this['items']['add'](this[_0x3507('0x0')]);}[_0x3507('0xd')](){let _0x302581=0x0;for(const _0x55998a of this[_0x3507('0xc')])_0x302581+=_0x55998a[_0x3507('0xc')][_0x3507('0x4')];return{'resultsCount':_0x302581,'totalItemsCount':_0x302581};}[_0x3507('0x2')](){const _0x56de7d=this['locale'],_0x13dd55=new _0x3455d7(this[_0x3507('0xf')]);return _0x13dd55[_0x3507('0xe')]({'label':'('+_0x4d83db(_0x56de7d,_0x3507('0xa'))+')','withText':!0x0}),_0x13dd55['on'](_0x3507('0x3'),()=>this['fire'](_0x3507('0x7'))),_0x13dd55;}}
23
+ const _0x5988=['Prompt\x20history','add','_createClearHistoryButton','delegate','items','children','length','filter','clearHistoryButton','fire','historyGroupView','label','clearHistory','locale'];(function(_0x402e44,_0x598877){const _0x656b36=function(_0x38475f){while(--_0x38475f){_0x402e44['push'](_0x402e44['shift']());}};_0x656b36(++_0x598877);}(_0x5988,0x171));const _0x656b=function(_0x402e44,_0x598877){_0x402e44=_0x402e44-0x0;let _0x656b36=_0x5988[_0x402e44];return _0x656b36;};import{ListView as _0x39ab4f,ListItemGroupView as _0x1aab47,ButtonView as _0x3cfe53}from'ckeditor5/src/ui.js';import{getTranslation as _0x1ab027}from'../../utils/common-translations.js';export default class hs extends _0x39ab4f{constructor(_0x8c2e57){super(_0x8c2e57),this[_0x656b('0x3')]=this[_0x656b('0xb')](),this[_0x656b('0x5')]=new _0x1aab47(),this[_0x656b('0x5')][_0x656b('0x0')][_0x656b('0xa')](this[_0x656b('0x3')],0x1),this['historyGroupView'][_0x656b('0x6')]=_0x1ab027(_0x8c2e57,_0x656b('0x9')),this[_0x656b('0x5')][_0x656b('0xd')][_0x656b('0xc')]('execute')['to'](this),this['items'][_0x656b('0xa')](this['historyGroupView']);}[_0x656b('0x2')](){let _0x437605=0x0;for(const _0x2e57fd of this['items'])_0x437605+=_0x2e57fd[_0x656b('0xd')][_0x656b('0x1')];return{'resultsCount':_0x437605,'totalItemsCount':_0x437605};}['_createClearHistoryButton'](){const _0x4b488f=this[_0x656b('0x8')],_0x30b905=new _0x3cfe53(this[_0x656b('0x8')]);return _0x30b905['set']({'label':'('+_0x1ab027(_0x4b488f,'Clear')+')','withText':!0x0}),_0x30b905['on']('execute',()=>this[_0x656b('0x4')](_0x656b('0x7'))),_0x30b905;}}
@@ -2,7 +2,7 @@
2
2
  * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
3
3
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
4
  */
5
- import { Collection } from 'ckeditor5/src/utils';
5
+ import { Collection } from 'ckeditor5/src/utils.js';
6
6
  /**
7
7
  * A collection that stores the prompt history in the session storage as a side effect.
8
8
  */
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x5541=['_saveToSessionStorage','parse','remove','add','length','prompt','addMany','_loadFromSessionStorage','setItem','stringify'];(function(_0x19d3b0,_0x554119){const _0x236699=function(_0x373785){while(--_0x373785){_0x19d3b0['push'](_0x19d3b0['shift']());}};_0x236699(++_0x554119);}(_0x5541,0xd0));const _0x2366=function(_0x19d3b0,_0x554119){_0x19d3b0=_0x19d3b0-0x0;let _0x236699=_0x5541[_0x19d3b0];return _0x236699;};import{Collection as _0x22d683}from'ckeditor5/src/utils';const ts='CKEditor/AIFormView/PromptHistory';export default class dt extends _0x22d683{constructor(){super(),this[_0x2366('0x9')](),this['on'](_0x2366('0x5'),(_0x4f3a58,_0x2eee5f)=>{const _0x3e22e5=os(_0x2eee5f['prompt']);for(const _0x18b1d8 of this)if(_0x18b1d8!=_0x2eee5f&&os(_0x18b1d8[_0x2366('0x7')])===_0x3e22e5){this[_0x2366('0x4')](_0x18b1d8);break;}this[_0x2366('0x6')]>0x14&&this[_0x2366('0x4')](this['last']),this[_0x2366('0x2')]();}),this['on'](_0x2366('0x4'),()=>{this[_0x2366('0x2')]();});}[_0x2366('0x9')](){const _0x2d3501=sessionStorage['getItem'](ts)||'[]';this[_0x2366('0x8')](JSON[_0x2366('0x3')](_0x2d3501));}[_0x2366('0x2')](){sessionStorage[_0x2366('0x0')](ts,JSON[_0x2366('0x1')](this['map'](_0x59ddfd=>_0x59ddfd)));}}function os(_0xca03af){return _0xca03af['toLowerCase']()['trim']();}
23
+ const _0x5bbe=['setItem','addMany','add','trim','parse','last','getItem','length','map','prompt','remove','stringify','toLowerCase','_saveToSessionStorage'];(function(_0x47fd66,_0x5bbe21){const _0x4d7be0=function(_0x3a1b65){while(--_0x3a1b65){_0x47fd66['push'](_0x47fd66['shift']());}};_0x4d7be0(++_0x5bbe21);}(_0x5bbe,0x192));const _0x4d7b=function(_0x47fd66,_0x5bbe21){_0x47fd66=_0x47fd66-0x0;let _0x4d7be0=_0x5bbe[_0x47fd66];return _0x4d7be0;};import{Collection as _0x7fe4b8}from'ckeditor5/src/utils.js';const Ss='CKEditor/AIFormView/PromptHistory';export default class ns extends _0x7fe4b8{constructor(){super(),this['_loadFromSessionStorage'](),this['on'](_0x4d7b('0x6'),(_0x5f1f81,_0x50c1c2)=>{const _0x430f15=ds(_0x50c1c2[_0x4d7b('0xd')]);for(const _0xeada01 of this)if(_0xeada01!=_0x50c1c2&&ds(_0xeada01[_0x4d7b('0xd')])===_0x430f15){this[_0x4d7b('0x0')](_0xeada01);break;}this[_0x4d7b('0xb')]>0x14&&this[_0x4d7b('0x0')](this[_0x4d7b('0x9')]),this['_saveToSessionStorage']();}),this['on']('remove',()=>{this[_0x4d7b('0x3')]();});}['_loadFromSessionStorage'](){const _0x51f5dc=sessionStorage[_0x4d7b('0xa')](Ss)||'[]';this[_0x4d7b('0x5')](JSON[_0x4d7b('0x8')](_0x51f5dc));}[_0x4d7b('0x3')](){sessionStorage[_0x4d7b('0x4')](Ss,JSON[_0x4d7b('0x1')](this[_0x4d7b('0xc')](_0x487e41=>_0x487e41)));}}function ds(_0x464d07){return _0x464d07[_0x4d7b('0x2')]()[_0x4d7b('0x7')]();}
@@ -6,7 +6,7 @@
6
6
  * @module ai/ui/showaiassistantcommand
7
7
  * @publicApi
8
8
  */
9
- import { Command } from 'ckeditor5/src/core';
9
+ import { Command } from 'ckeditor5/src/core.js';
10
10
  /**
11
11
  * Command that shows the AI Assistant user interface.
12
12
  */
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x32c8=['get','document','custom','element','includes','name','ai.aiAssistant.disabledElements','isEnabled','model','showUI','plugins','config','refresh','editor','getItems'];(function(_0x45db9b,_0x32c8e7){const _0x48a0a1=function(_0x566c29){while(--_0x566c29){_0x45db9b['push'](_0x45db9b['shift']());}};_0x48a0a1(++_0x32c8e7);}(_0x32c8,0x189));const _0x48a0=function(_0x45db9b,_0x32c8e7){_0x45db9b=_0x45db9b-0x0;let _0x48a0a1=_0x32c8[_0x45db9b];return _0x48a0a1;};import{Command as _0x6d41c8}from'ckeditor5/src/core';import _0x62219c from'../aiassistantui';export default class I extends _0x6d41c8{[_0x48a0('0x9')](){const _0x4607a3=this['editor'][_0x48a0('0x5')][_0x48a0('0xd')]['selection'],_0x2e9902=this[_0x48a0('0xa')][_0x48a0('0x8')][_0x48a0('0xc')](_0x48a0('0x3'));for(const _0x7e4271 of _0x4607a3['getRanges']())for(const _0x596ab1 of _0x7e4271[_0x48a0('0xb')]())if(_0x596ab1['is'](_0x48a0('0x0'))&&_0x2e9902[_0x48a0('0x1')](_0x596ab1[_0x48a0('0x2')]))return void(this[_0x48a0('0x4')]=!0x1);this[_0x48a0('0x4')]=!0x0;}['execute'](_0x52b07a='',_0x4e2973='',_0x542031=_0x48a0('0xe')){this[_0x48a0('0xa')][_0x48a0('0x7')][_0x48a0('0xc')](_0x62219c)[_0x48a0('0x6')](_0x52b07a,_0x4e2973,_0x542031);}}
23
+ const _0x3a56=['config','refresh','getRanges','model','name','includes','getItems','editor','isEnabled','showUI','element','custom','execute','selection'];(function(_0x50eade,_0x3a562c){const _0x520f69=function(_0x5a8ee7){while(--_0x5a8ee7){_0x50eade['push'](_0x50eade['shift']());}};_0x520f69(++_0x3a562c);}(_0x3a56,0x1b8));const _0x520f=function(_0x50eade,_0x3a562c){_0x50eade=_0x50eade-0x0;let _0x520f69=_0x3a56[_0x50eade];return _0x520f69;};import{Command as _0x128fe8}from'ckeditor5/src/core.js';import _0x141326 from'../aiassistantui.js';export default class I extends _0x128fe8{[_0x520f('0x9')](){const _0x150156=this['editor'][_0x520f('0xb')]['document'][_0x520f('0x7')],_0xc042c9=this[_0x520f('0x1')][_0x520f('0x8')]['get']('ai.aiAssistant.disabledElements');for(const _0xc5fb2c of _0x150156[_0x520f('0xa')]())for(const _0x1f4779 of _0xc5fb2c[_0x520f('0x0')]())if(_0x1f4779['is'](_0x520f('0x4'))&&_0xc042c9[_0x520f('0xd')](_0x1f4779[_0x520f('0xc')]))return void(this[_0x520f('0x2')]=!0x1);this[_0x520f('0x2')]=!0x0;}[_0x520f('0x6')](_0x283a7c='',_0x1cdf15='',_0x276626=_0x520f('0x5')){this['editor']['plugins']['get'](_0x141326)[_0x520f('0x3')](_0x283a7c,_0x1cdf15,_0x276626);}}
@@ -5,5 +5,5 @@
5
5
  /**
6
6
  * @module ai/utils/common-translations
7
7
  */
8
- import type { Locale } from 'ckeditor5/src/utils';
8
+ import type { Locale } from 'ckeditor5/src/utils.js';
9
9
  export declare function getTranslation(locale: Locale, id: string, values?: string | Array<string> | number): string;
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- export function getTranslation(_0x59c2ef,_0x395203,_0x39cead){const t=_0x59c2ef['t'];switch(_0x395203){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'Translate\x20to\x20%0':return t('Translate\x20to\x20%0',_0x39cead);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'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'Search\x20AI\x20command':return t('Search\x20AI\x20command');case'No\x20commands\x20found':return t('No\x20commands\x20found');case'No\x20commands\x20available':return t('No\x20commands\x20available');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'},_0x39cead);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 _0x395203;}}
23
+ export function getTranslation(_0x2f6204,_0x5f31aa,_0x11c002){const t=_0x2f6204['t'];switch(_0x5f31aa){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'Translate\x20to\x20%0':return t('Translate\x20to\x20%0',_0x11c002);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'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'Search\x20AI\x20command':return t('Search\x20AI\x20command');case'No\x20commands\x20found':return t('No\x20commands\x20found');case'No\x20commands\x20available':return t('No\x20commands\x20available');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'},_0x11c002);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 _0x5f31aa;}}