@ckeditor/ckeditor5-ai 0.0.0-nightly-20240116.0 → 0.0.0-nightly-20240118.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 (104) hide show
  1. package/LICENSE.md +13 -5
  2. package/README.md +9 -10
  3. package/build/ai.js +6 -6
  4. package/build/translations/ar.js +1 -1
  5. package/build/translations/bg.js +1 -1
  6. package/build/translations/bn.js +1 -1
  7. package/build/translations/ca.js +1 -1
  8. package/build/translations/cs.js +1 -1
  9. package/build/translations/da.js +1 -1
  10. package/build/translations/de.js +1 -1
  11. package/build/translations/el.js +1 -1
  12. package/build/translations/es.js +1 -1
  13. package/build/translations/et.js +1 -1
  14. package/build/translations/fi.js +1 -1
  15. package/build/translations/fr.js +1 -1
  16. package/build/translations/he.js +1 -1
  17. package/build/translations/hi.js +1 -1
  18. package/build/translations/hu.js +1 -1
  19. package/build/translations/id.js +1 -1
  20. package/build/translations/it.js +1 -1
  21. package/build/translations/ja.js +1 -1
  22. package/build/translations/ko.js +1 -1
  23. package/build/translations/lt.js +1 -1
  24. package/build/translations/lv.js +1 -1
  25. package/build/translations/ms.js +1 -1
  26. package/build/translations/nl.js +1 -1
  27. package/build/translations/no.js +1 -1
  28. package/build/translations/pl.js +1 -1
  29. package/build/translations/pt-br.js +1 -1
  30. package/build/translations/pt.js +1 -1
  31. package/build/translations/ro.js +1 -1
  32. package/build/translations/ru.js +1 -1
  33. package/build/translations/sk.js +1 -1
  34. package/build/translations/sr.js +1 -1
  35. package/build/translations/sv.js +1 -1
  36. package/build/translations/th.js +1 -1
  37. package/build/translations/tr.js +1 -1
  38. package/build/translations/uk.js +1 -1
  39. package/build/translations/vi.js +1 -1
  40. package/build/translations/zh-cn.js +1 -1
  41. package/build/translations/zh.js +1 -1
  42. package/lang/translations/ar.po +2 -2
  43. package/lang/translations/bg.po +2 -2
  44. package/lang/translations/bn.po +2 -2
  45. package/lang/translations/ca.po +2 -2
  46. package/lang/translations/cs.po +2 -2
  47. package/lang/translations/da.po +2 -2
  48. package/lang/translations/de.po +2 -2
  49. package/lang/translations/el.po +2 -2
  50. package/lang/translations/es.po +2 -2
  51. package/lang/translations/et.po +2 -2
  52. package/lang/translations/fi.po +2 -2
  53. package/lang/translations/fr.po +2 -2
  54. package/lang/translations/he.po +2 -2
  55. package/lang/translations/hi.po +2 -2
  56. package/lang/translations/hu.po +2 -2
  57. package/lang/translations/id.po +2 -2
  58. package/lang/translations/it.po +2 -2
  59. package/lang/translations/ja.po +2 -2
  60. package/lang/translations/ko.po +2 -2
  61. package/lang/translations/lt.po +2 -2
  62. package/lang/translations/lv.po +2 -2
  63. package/lang/translations/ms.po +2 -2
  64. package/lang/translations/nl.po +2 -2
  65. package/lang/translations/no.po +2 -2
  66. package/lang/translations/pl.po +2 -2
  67. package/lang/translations/pt-br.po +2 -2
  68. package/lang/translations/pt.po +2 -2
  69. package/lang/translations/ro.po +2 -2
  70. package/lang/translations/ru.po +2 -2
  71. package/lang/translations/sk.po +2 -2
  72. package/lang/translations/sr.po +2 -2
  73. package/lang/translations/sv.po +2 -2
  74. package/lang/translations/th.po +2 -2
  75. package/lang/translations/tr.po +2 -2
  76. package/lang/translations/uk.po +2 -2
  77. package/lang/translations/vi.po +2 -2
  78. package/lang/translations/zh-cn.po +2 -2
  79. package/lang/translations/zh.po +2 -2
  80. package/package.json +6 -6
  81. package/src/adapters/aiadapter.js +1 -1
  82. package/src/adapters/aitextadapter.js +1 -1
  83. package/src/adapters/awstextadapter.d.ts +21 -21
  84. package/src/adapters/awstextadapter.js +1 -1
  85. package/src/adapters/openaitextadapter.js +1 -1
  86. package/src/aiassistant.js +1 -1
  87. package/src/aiassistantediting.js +1 -1
  88. package/src/aiassistantui.js +1 -1
  89. package/src/aiconfig.d.ts +1 -1
  90. package/src/ui/aiassistantcontroller.js +1 -1
  91. package/src/ui/dropdown/aicommandslistview.js +1 -1
  92. package/src/ui/dropdown/buttonlabelwithhighlightview.js +1 -1
  93. package/src/ui/dropdown/labelwithhighlightview.js +1 -1
  94. package/src/ui/form/aiformcontentarea.js +1 -1
  95. package/src/ui/form/aiformerrorview.js +1 -1
  96. package/src/ui/form/aiformpromptview.js +1 -1
  97. package/src/ui/form/aiformtoolbarview.js +1 -1
  98. package/src/ui/form/aiformview.js +1 -1
  99. package/src/ui/form/aihistorylistitemview.js +1 -1
  100. package/src/ui/form/aihistorylistview.js +1 -1
  101. package/src/ui/form/prompthistory.js +1 -1
  102. package/src/ui/showaiassistantcommand.js +1 -1
  103. package/src/utils/common-translations.js +1 -1
  104. package/theme/ai-form.css +13 -1
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x5f0d=['fieldWrapperChildren','render','minRows','focusCycler','locale','execute','value','enter','history','ck-ai-form__submit','_createShowHistoryButton','requestAnimationFrame','submit','isVisible','submitButtonView','queryView','update','focus','bind','add','Submit','focusLast','resultsView','focusableChildren','style','excludeScrollbarsAndBorders','isOn','showHistoryButtonView','width','element','isEnabled','_createSubmitButton','History','fieldView','right','window','uiLanguageDirection','left','fire','target','set'];(function(_0x4bb6f8,_0x5f0d7e){const _0x2081b4=function(_0x33307c){while(--_0x33307c){_0x4bb6f8['push'](_0x4bb6f8['shift']());}};_0x2081b4(++_0x5f0d7e);}(_0x5f0d,0x1a2));const _0x2081=function(_0x4bb6f8,_0x5f0d7e){_0x4bb6f8=_0x4bb6f8-0x0;let _0x2081b4=_0x5f0d[_0x4bb6f8];return _0x2081b4;};import{Rect as _0x24df7f,global as _0x27e60c,isVisible as _0x23da32}from'ckeditor5/src/utils.js';import{AutocompleteView as _0x43ca9c,ButtonView as _0x557d16}from'ckeditor5/src/ui.js';import{icons as _0x4f8f9c}from'ckeditor5/src/core.js';import{getTranslation as _0x51b750}from'../../utils/common-translations.js';import _0x232dcf from'../../../theme/icons/submit.svg';export default class ht extends _0x43ca9c{constructor(_0x57162c,_0x46b60d){super(_0x57162c,_0x46b60d),this[_0x2081('0x7')][_0x2081('0x19')][_0x2081('0x23')]=0x1,this[_0x2081('0x7')]['fieldView']['maxRows']=0x3,this[_0x2081('0x6')]=this[_0x2081('0x17')](),this['showHistoryButtonView']=this[_0x2081('0x2')](),this[_0x2081('0xf')][_0x2081('0xb')](this[_0x2081('0x13')],0x1),this['focusableChildren'][_0x2081('0xb')](this['submitButtonView']);}['render'](){super[_0x2081('0x22')](),this[_0x2081('0x7')][_0x2081('0x21')]['add'](this[_0x2081('0x13')]),this['children'][_0x2081('0xb')](this[_0x2081('0x6')]),this['keystrokes'][_0x2081('0x20')](_0x2081('0x28'),(_0x23d99c,_0x5a9ca4)=>{_0x23d99c[_0x2081('0x1f')]==this[_0x2081('0x7')]['fieldView'][_0x2081('0x15')]&&(this[_0x2081('0x4')](),_0x5a9ca4());});}[_0x2081('0x17')](){const _0x271cfa=new _0x557d16(this['locale']),_0xcd5d55=this['locale'];return _0x271cfa[_0x2081('0x20')]({'icon':_0x232dcf,'label':_0x51b750(_0xcd5d55,_0x2081('0xc')),'isVisible':!0x0,'tooltip':!0x0,'class':_0x2081('0x1')}),_0x271cfa['on'](_0x2081('0x26'),()=>{this[_0x2081('0x4')]();}),_0x271cfa[_0x2081('0xa')](_0x2081('0x16'))['to'](this[_0x2081('0x7')][_0x2081('0x19')],'isEmpty',this,_0x2081('0x16'),(_0x58531f,_0x498ea6)=>!_0x58531f&&_0x498ea6),_0x271cfa;}[_0x2081('0x2')](){const _0x3e88c7=new _0x557d16(this['locale']),_0x466dd3=this[_0x2081('0xe')],_0x298dea=this[_0x2081('0x25')];_0x3e88c7[_0x2081('0x20')]({'label':_0x51b750(_0x298dea,_0x2081('0x18')),'withText':!0x1,'icon':_0x4f8f9c[_0x2081('0x0')],'tooltip':!0x0,'tooltipPosition':'sw','class':'ck-ai-form__toggle-history'}),_0x3e88c7[_0x2081('0xa')](_0x2081('0x12'))['to'](_0x466dd3,_0x2081('0x5')),_0x3e88c7[_0x2081('0xa')](_0x2081('0x16'))['to'](this,_0x2081('0x16')),_0x3e88c7['on'](_0x2081('0x26'),()=>{_0x466dd3[_0x2081('0x5')]=!_0x466dd3['isVisible'],_0x466dd3['isVisible']?this['filteredView'][_0x2081('0x9')]():this[_0x2081('0x9')]();});const _0x302bf9=()=>{_0x27e60c[_0x2081('0x1b')][_0x2081('0x3')](()=>{if(_0x23da32(this[_0x2081('0x15')])){const _0x4142f6=new _0x24df7f(this[_0x2081('0x7')]['fieldView'][_0x2081('0x15')]),_0x1941d2=_0x4142f6[_0x2081('0x14')],_0xd6d995='rtl'===_0x298dea[_0x2081('0x1c')]?_0x2081('0x1d'):_0x2081('0x1a');_0x4142f6[_0x2081('0x11')](),_0x3e88c7[_0x2081('0x15')][_0x2081('0x10')][_0xd6d995]=_0x1941d2-_0x4142f6[_0x2081('0x14')]+0x1+'px';}});};return this[_0x2081('0x7')][_0x2081('0x19')]['on'](_0x2081('0x8'),_0x302bf9),this['on'](_0x2081('0x22'),_0x302bf9),_0x3e88c7;}[_0x2081('0x4')](){const _0x98509d=this[_0x2081('0x7')][_0x2081('0x19')][_0x2081('0x15')][_0x2081('0x27')];this[_0x2081('0x1e')](_0x2081('0x4'),_0x98509d);}['focus'](_0x4ebd0b){-0x1===_0x4ebd0b?this[_0x2081('0x24')][_0x2081('0xd')]():this[_0x2081('0x24')]['focusFirst']();}}
23
+ const _0x3ca6=['rtl','focusFirst','update','target','children','showHistoryButtonView','set','focusCycler','focusableChildren','history','width','queryView','left','execute','submitButtonView','isOn','fieldWrapperChildren','value','resultsView','ck-ai-form__submit','isEnabled','locale','uiLanguageDirection','right','fieldView','isVisible','minRows','_createShowHistoryButton','element','maxRows','ck-ai-form__toggle-history','render','window','fire','focus','excludeScrollbarsAndBorders','add','focusLast','requestAnimationFrame','bind','Submit','keystrokes','submit'];(function(_0x392fbc,_0x3ca648){const _0x4c1f86=function(_0x4d621d){while(--_0x4d621d){_0x392fbc['push'](_0x392fbc['shift']());}};_0x4c1f86(++_0x3ca648);}(_0x3ca6,0x154));const _0x4c1f=function(_0x392fbc,_0x3ca648){_0x392fbc=_0x392fbc-0x0;let _0x4c1f86=_0x3ca6[_0x392fbc];return _0x4c1f86;};import{Rect as _0x312d8f,global as _0x27da9f,isVisible as _0x48c997}from'ckeditor5/src/utils.js';import{AutocompleteView as _0x3d1302,ButtonView as _0x1e2bb6}from'ckeditor5/src/ui.js';import{icons as _0x13c03a}from'ckeditor5/src/core.js';import{getTranslation as _0x38a760}from'../../utils/common-translations.js';import _0x5ae05f from'../../../theme/icons/submit.svg';export default class ht extends _0x3d1302{constructor(_0x3cc59f,_0xef0bbc){super(_0x3cc59f,_0xef0bbc),this[_0x4c1f('0xf')]['fieldView'][_0x4c1f('0x1e')]=0x1,this[_0x4c1f('0xf')][_0x4c1f('0x1c')][_0x4c1f('0x21')]=0x3,this[_0x4c1f('0x12')]=this['_createSubmitButton'](),this[_0x4c1f('0x9')]=this[_0x4c1f('0x1f')](),this['focusableChildren']['add'](this[_0x4c1f('0x9')],0x1),this[_0x4c1f('0xc')]['add'](this['submitButtonView']);}['render'](){super[_0x4c1f('0x23')](),this[_0x4c1f('0xf')][_0x4c1f('0x14')][_0x4c1f('0x28')](this[_0x4c1f('0x9')]),this[_0x4c1f('0x8')][_0x4c1f('0x28')](this['submitButtonView']),this[_0x4c1f('0x2')][_0x4c1f('0xa')]('enter',(_0x354874,_0x22d62b)=>{_0x354874[_0x4c1f('0x7')]==this[_0x4c1f('0xf')]['fieldView']['element']&&(this[_0x4c1f('0x3')](),_0x22d62b());});}['_createSubmitButton'](){const _0x1e7dd4=new _0x1e2bb6(this['locale']),_0x4e756a=this[_0x4c1f('0x19')];return _0x1e7dd4['set']({'icon':_0x5ae05f,'label':_0x38a760(_0x4e756a,_0x4c1f('0x1')),'isVisible':!0x0,'tooltip':!0x0,'class':_0x4c1f('0x17')}),_0x1e7dd4['on'](_0x4c1f('0x11'),()=>{this['submit']();}),_0x1e7dd4[_0x4c1f('0x0')]('isEnabled')['to'](this[_0x4c1f('0xf')][_0x4c1f('0x1c')],'isEmpty',this,'isEnabled',(_0x3821ea,_0x3aa061)=>!_0x3821ea&&_0x3aa061),_0x1e7dd4;}[_0x4c1f('0x1f')](){const _0x38d1d8=new _0x1e2bb6(this[_0x4c1f('0x19')]),_0x9b0d5a=this[_0x4c1f('0x16')],_0x11b1ac=this['locale'];_0x38d1d8[_0x4c1f('0xa')]({'label':_0x38a760(_0x11b1ac,'History'),'withText':!0x1,'icon':_0x13c03a[_0x4c1f('0xd')],'tooltip':!0x0,'tooltipPosition':'sw','class':_0x4c1f('0x22')}),_0x38d1d8[_0x4c1f('0x0')](_0x4c1f('0x13'))['to'](_0x9b0d5a,_0x4c1f('0x1d')),_0x38d1d8[_0x4c1f('0x0')](_0x4c1f('0x18'))['to'](this,_0x4c1f('0x18')),_0x38d1d8['on'](_0x4c1f('0x11'),()=>{_0x9b0d5a[_0x4c1f('0x1d')]=!_0x9b0d5a['isVisible'],_0x9b0d5a['isVisible']?this['filteredView'][_0x4c1f('0x26')]():this[_0x4c1f('0x26')]();});const _0x10f6f0=()=>{_0x27da9f[_0x4c1f('0x24')][_0x4c1f('0x2a')](()=>{if(_0x48c997(this[_0x4c1f('0x20')])){const _0x113eca=new _0x312d8f(this[_0x4c1f('0xf')]['fieldView'][_0x4c1f('0x20')]),_0x17b519=_0x113eca[_0x4c1f('0xe')],_0x3eae2e=_0x4c1f('0x4')===_0x11b1ac[_0x4c1f('0x1a')]?_0x4c1f('0x10'):_0x4c1f('0x1b');_0x113eca[_0x4c1f('0x27')](),_0x38d1d8[_0x4c1f('0x20')]['style'][_0x3eae2e]=_0x17b519-_0x113eca[_0x4c1f('0xe')]+0x1+'px';}});};return this[_0x4c1f('0xf')][_0x4c1f('0x1c')]['on'](_0x4c1f('0x6'),_0x10f6f0),this['on']('render',_0x10f6f0),_0x38d1d8;}[_0x4c1f('0x3')](){const _0x160d6e=this[_0x4c1f('0xf')][_0x4c1f('0x1c')]['element'][_0x4c1f('0x15')];this[_0x4c1f('0x25')]('submit',_0x160d6e);}[_0x4c1f('0x26')](_0x1306c9){-0x1===_0x1306c9?this[_0x4c1f('0xb')][_0x4c1f('0x29')]():this[_0x4c1f('0xb')][_0x4c1f('0x5')]();}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x33a1=['Try\x20again','_CONTENT','_createButton','items','bindTemplate','locale','mainAction','ck-button-action','AI_','insert','ck-hidden','ck-ai-form__toolbar','tryAgainButton','REPLACE','bind','isVisible','stopButton','replace','set','Stop','insertButton','replaceButton'];(function(_0x274089,_0x33a11e){const _0xee94bd=function(_0x36c824){while(--_0x36c824){_0x274089['push'](_0x274089['shift']());}};_0xee94bd(++_0x33a11e);}(_0x33a1,0x109));const _0xee94=function(_0x274089,_0x33a11e){_0x274089=_0x274089-0x0;let _0xee94bd=_0x33a1[_0x274089];return _0xee94bd;};import{ToolbarView as _0x526bb9,ButtonView as _0x25724c}from'ckeditor5/src/ui.js';import{getTranslation as _0x42e277}from'../../utils/common-translations.js';export const AIFormToolbarViewMainActionLabel={'REPLACE':_0xee94('0x10'),'INSERT':_0xee94('0x8')};export default class at extends _0x526bb9{constructor(_0x35a179){super(_0x35a179),this[_0xee94('0x11')](_0xee94('0xe'),!0x1),this['set'](_0xee94('0x5'),AIFormToolbarViewMainActionLabel[_0xee94('0xc')]),this[_0xee94('0x14')]=this['_createButton']('',_0xee94('0x6')),this['replaceButton'][_0xee94('0xd')]('label')['to'](this,_0xee94('0x5'),_0x2bb976=>_0x42e277(_0x35a179,_0xee94('0x7')+_0x2bb976['toUpperCase']()+_0xee94('0x0'))),this[_0xee94('0x13')]=this[_0xee94('0x1')](_0x42e277(_0x35a179,'Insert\x20below')),this[_0xee94('0xb')]=this['_createButton'](_0x42e277(_0x35a179,_0xee94('0x15'))),this[_0xee94('0xf')]=this['_createButton'](_0x42e277(_0x35a179,_0xee94('0x12')));const _0xd8364a=this[_0xee94('0x3')];this['extendTemplate']({'attributes':{'class':[_0xee94('0xa'),_0xd8364a['if'](_0xee94('0xe'),_0xee94('0x9'),_0x4a6770=>!_0x4a6770)]}}),this[_0xee94('0x2')]['addMany']([this[_0xee94('0x14')],this['insertButton'],this[_0xee94('0xb')],this[_0xee94('0xf')]]);}[_0xee94('0x1')](_0x27eac9,_0x50dadd){const _0x5e0506=new _0x25724c(this[_0xee94('0x4')]);return _0x5e0506[_0xee94('0x11')]({'label':_0x27eac9,'class':_0x50dadd||'','isVisible':!0x0,'withText':!0x0}),_0x5e0506;}}
23
+ const _0x5aa5=['items','toUpperCase','_CONTENT','replaceButton','replace','isVisible','mainAction','set','label','ck-button-action','ck-hidden','bind','ck-ai-form__toolbar','extendTemplate','tryAgainButton','AI_','_createButton','bindTemplate','insert','insertButton'];(function(_0x7db6e9,_0x5aa557){const _0x4ec477=function(_0x239708){while(--_0x239708){_0x7db6e9['push'](_0x7db6e9['shift']());}};_0x4ec477(++_0x5aa557);}(_0x5aa5,0x85));const _0x4ec4=function(_0x7db6e9,_0x5aa557){_0x7db6e9=_0x7db6e9-0x0;let _0x4ec477=_0x5aa5[_0x7db6e9];return _0x4ec477;};import{ToolbarView as _0x457082,ButtonView as _0x327251}from'ckeditor5/src/ui.js';import{getTranslation as _0x221712}from'../../utils/common-translations.js';export const AIFormToolbarViewMainActionLabel={'REPLACE':_0x4ec4('0xb'),'INSERT':_0x4ec4('0x5')};export default class at extends _0x457082{constructor(_0x5d59f9){super(_0x5d59f9),this['set'](_0x4ec4('0xc'),!0x1),this[_0x4ec4('0xe')](_0x4ec4('0xd'),AIFormToolbarViewMainActionLabel['REPLACE']),this['replaceButton']=this[_0x4ec4('0x3')]('',_0x4ec4('0x10')),this[_0x4ec4('0xa')][_0x4ec4('0x12')](_0x4ec4('0xf'))['to'](this,_0x4ec4('0xd'),_0x8bb4b4=>_0x221712(_0x5d59f9,_0x4ec4('0x2')+_0x8bb4b4[_0x4ec4('0x8')]()+_0x4ec4('0x9'))),this['insertButton']=this[_0x4ec4('0x3')](_0x221712(_0x5d59f9,'Insert\x20below')),this[_0x4ec4('0x1')]=this[_0x4ec4('0x3')](_0x221712(_0x5d59f9,'Try\x20again')),this['stopButton']=this['_createButton'](_0x221712(_0x5d59f9,'Stop'));const _0x195854=this[_0x4ec4('0x4')];this[_0x4ec4('0x0')]({'attributes':{'class':[_0x4ec4('0x13'),_0x195854['if'](_0x4ec4('0xc'),_0x4ec4('0x11'),_0x322108=>!_0x322108)]}}),this[_0x4ec4('0x7')]['addMany']([this['replaceButton'],this[_0x4ec4('0x6')],this[_0x4ec4('0x1')],this['stopButton']]);}[_0x4ec4('0x3')](_0x4c5fad,_0x4c4e07){const _0x58b065=new _0x327251(this['locale']);return _0x58b065[_0x4ec4('0xe')]({'label':_0x4c5fad,'class':_0x4c4e07||'','isVisible':!0x0,'withText':!0x0}),_0x58b065;}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x2b61=['fieldView','focusFirst','div','ck-hidden','_createToolbar','copyButtonView','label','submitPrompt','ck-ai-form-content','keystrokes','insertButton','stopButton','REPLACE','submit','_promptHistory','focusNext','insertContentBelow','_focusables','clear','promptView','element','tab','createCollection','focusTracker','focus','toolbar','delegate','isError','prompt','focusPrevious','contentArea','bindTo','items','high','finishProcessing','forwardCycle','tryAgainEvent','errorView','isEnabled','execute','tryAgainButton','search','replaceButton','bind','_createPromptView','fire','stopProcessing','isVisible','handleError','focusCycler','render','locale','add','_createHistoryView','mainAction','stop','reset','set','isProcessing','backwardCycle','bindTemplate','value'];(function(_0x381363,_0x2b613e){const _0x157c9f=function(_0x41b4f7){while(--_0x41b4f7){_0x381363['push'](_0x381363['shift']());}};_0x157c9f(++_0x2b613e);}(_0x2b61,0x14f));const _0x157c=function(_0x381363,_0x2b613e){_0x381363=_0x381363-0x0;let _0x157c9f=_0x2b61[_0x381363];return _0x157c9f;};import{FocusTracker as _0x48e13d,KeystrokeHandler as _0x214c94}from'ckeditor5/src/utils.js';import{View as _0x368e15,FocusCycler as _0x34fa46,createLabeledTextarea as _0x18bc92}from'ckeditor5/src/ui.js';import _0x5c14be,{AIFormToolbarViewMainActionLabel as _0x3abf29}from'./aiformtoolbarview.js';import _0x1605b9 from'./aiformcontentarea.js';import _0x3b3981 from'./aiformerrorview.js';import _0x2c9ef4 from'./aiformpromptview.js';import _0x567881 from'./aihistorylistview.js';import _0x147657 from'./aihistorylistitemview.js';import _0x535e2 from'./prompthistory.js';import{getTranslation as _0x2918f9}from'../../utils/common-translations.js';import{escape as _0x9c6a7a}from'lodash-es';export default class v extends _0x368e15{constructor(_0x579fdd,_0x19d5b2,_0x2da037=''){super(_0x579fdd),this[_0x157c('0x20')](_0x157c('0xd'),!0x0),this['set'](_0x157c('0x21'),!0x1),this['set'](_0x157c('0x3'),''),this[_0x157c('0x20')](_0x157c('0x24'),''),this[_0x157c('0x20')](_0x157c('0x2'),!0x1),this[_0x157c('0x20')]('mainAction',_0x3abf29[_0x157c('0x31')]),this[_0x157c('0x33')]=new _0x535e2(),this[_0x157c('0xc')]=new _0x3b3981(_0x579fdd),this[_0x157c('0x5')]=new _0x1605b9(_0x579fdd,_0x2da037),this['contentArea'][_0x157c('0x12')](_0x157c('0x21'))['to'](this),this[_0x157c('0x5')]['bind']('value')['to'](this),this[_0x157c('0x0')]=this[_0x157c('0x29')](),this[_0x157c('0x0')][_0x157c('0x12')](_0x157c('0x1d'))['to'](this),this[_0x157c('0x38')]=this[_0x157c('0x13')](),this['focusTracker']=new _0x48e13d(),this['keystrokes']=new _0x214c94(),this[_0x157c('0x36')]=this[_0x157c('0x3b')]([this[_0x157c('0x5')],this[_0x157c('0x5')]['copyButtonView'],this[_0x157c('0x0')],this[_0x157c('0x38')]]),this[_0x157c('0x18')]=new _0x34fa46({'focusables':this['_focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this[_0x157c('0x2e')],'actions':{'focusPrevious':'shift\x20+\x20tab','focusNext':_0x157c('0x3a')}}),this['promptView'][_0x157c('0x18')]['on'](_0x157c('0xa'),_0x2cff0c=>{this[_0x157c('0x18')][_0x157c('0x34')](),_0x2cff0c['stop']();}),this[_0x157c('0x38')][_0x157c('0x18')]['on'](_0x157c('0x22'),_0x24fc5e=>{this[_0x157c('0x18')][_0x157c('0x4')](),_0x24fc5e[_0x157c('0x1e')]();}),this[_0x157c('0x38')]['queryView'][_0x157c('0x25')][_0x157c('0x12')](_0x157c('0x24'))['to'](this,'prompt');const _0x4b343f=this[_0x157c('0x23')];this['setTemplate']({'tag':_0x157c('0x27'),'attributes':{'class':['ck','ck-ai-form',_0x19d5b2],'tabindex':'-1'},'children':[{'tag':_0x157c('0x27'),'attributes':{'class':['ck',_0x157c('0x2d')]},'children':[{'tag':_0x157c('0x27'),'attributes':{'class':[_0x4b343f['if'](_0x157c('0x2'),_0x157c('0x28'),_0x174513=>!_0x174513)]},'children':[this['errorView']]},this[_0x157c('0x5')],this[_0x157c('0x0')],this[_0x157c('0x38')]]}]});}[_0x157c('0x19')](){super[_0x157c('0x19')](),this[_0x157c('0x3c')][_0x157c('0x1b')](this[_0x157c('0x5')]['element']),this[_0x157c('0x3c')][_0x157c('0x1b')](this[_0x157c('0x5')][_0x157c('0x2a')][_0x157c('0x39')]),this[_0x157c('0x3c')][_0x157c('0x1b')](this[_0x157c('0x0')]['element']),this[_0x157c('0x3c')]['add'](this[_0x157c('0x38')][_0x157c('0x39')]),this[_0x157c('0x2e')]['listenTo'](this[_0x157c('0x39')]);}['focus'](_0x5b525c=0x1){-0x1===_0x5b525c?this[_0x157c('0x18')]['focusLast']():this[_0x157c('0x18')][_0x157c('0x26')]();}[_0x157c('0x1f')](){this[_0x157c('0x3')]='',this[_0x157c('0x24')]='',this[_0x157c('0x2')]=!0x1,this[_0x157c('0x38')][_0x157c('0x1f')](),this['contentArea']['isVisible']=!0x1,this[_0x157c('0x0')]['isVisible']=!0x1;}[_0x157c('0x13')](){const _0x35f670=this[_0x157c('0x1a')],_0x56402a=new _0x2c9ef4(_0x35f670,{'queryView':{'label':_0x2918f9(_0x35f670,'Ask\x20AI\x20to\x20edit\x20or\x20generate'),'creator':_0x18bc92,'showIcon':!0x1,'showResetButton':!0x1},'infoView':{'text':{'noSearchableItems':{'primary':_0x2918f9(_0x35f670,'Empty\x20history'),'secondary':_0x2918f9(_0x35f670,'Ask\x20AI\x20and\x20your\x20prompts\x20will\x20be\x20listed\x20here\x20for\x20you\x20to\x20use\x20later.')}}},'filteredView':this[_0x157c('0x1c')](),'queryMinChars':0x1/0x0,'resetOnBlur':!0x1});return _0x56402a[_0x157c('0x12')](_0x157c('0xd'))['to'](this,_0x157c('0xd'),this,_0x157c('0x21'),(_0x451d39,_0x5a2b34)=>_0x451d39&&!_0x5a2b34),this['listenTo'](_0x56402a,_0x157c('0x32'),(_0x1da50d,_0x43b3aa)=>{this[_0x157c('0x3')]=_0x43b3aa;const _0x16606a=_0x9c6a7a(_0x43b3aa);this[_0x157c('0x14')](_0x157c('0x2c'),_0x16606a),_0x43b3aa['trim']()&&this['_promptHistory'][_0x157c('0x1b')]({'prompt':_0x16606a},0x0);},{'priority':_0x157c('0x8')}),_0x56402a;}['_createHistoryView'](){const _0x246618=new _0x567881(this['locale']);return _0x246618['historyGroupView'][_0x157c('0x7')][_0x157c('0x6')](this[_0x157c('0x33')])['as'](_0x147657),_0x246618['on']('clearHistory',()=>{this[_0x157c('0x33')][_0x157c('0x37')](),this[_0x157c('0x38')][_0x157c('0x10')](''),this['promptView'][_0x157c('0x3d')]();}),_0x246618;}[_0x157c('0x29')](){const _0x14aef7=new _0x5c14be(this['locale']);return _0x14aef7[_0x157c('0x11')][_0x157c('0x12')](_0x157c('0xd'))['to'](this,_0x157c('0xd'),this,'isProcessing',this,_0x157c('0x24'),(_0x214abf,_0x4ec698,_0x1d1741)=>_0x214abf&&!_0x4ec698&&!!_0x1d1741),_0x14aef7[_0x157c('0x11')][_0x157c('0x1')](_0x157c('0xe'))['to'](this,'replaceContent'),_0x14aef7[_0x157c('0x2f')]['bind'](_0x157c('0xd'))['to'](this,_0x157c('0xd'),this,_0x157c('0x21'),this,_0x157c('0x24'),(_0x2110c7,_0x262785,_0x1b2f4e)=>_0x2110c7&&!_0x262785&&!!_0x1b2f4e),_0x14aef7[_0x157c('0x2f')]['delegate'](_0x157c('0xe'))['to'](this,_0x157c('0x35')),_0x14aef7[_0x157c('0xf')][_0x157c('0x12')](_0x157c('0xd'))['to'](this,_0x157c('0xd'),this,_0x157c('0x21'),(_0x19665d,_0x4141c7)=>_0x19665d&&!_0x4141c7),_0x14aef7[_0x157c('0xf')][_0x157c('0x1')](_0x157c('0xe'))['to'](this,_0x157c('0xb')),_0x14aef7[_0x157c('0x30')][_0x157c('0x12')]('isEnabled')['to'](this,_0x157c('0x21')),_0x14aef7[_0x157c('0x30')][_0x157c('0x1')](_0x157c('0xe'))['to'](this,_0x157c('0x15')),_0x14aef7;}['startProcessing'](){this[_0x157c('0x24')]='',this[_0x157c('0x2')]=!0x1,this['isProcessing']=!0x0,this[_0x157c('0x5')][_0x157c('0x16')]=!0x0,this['toolbar'][_0x157c('0x16')]=!0x0,this[_0x157c('0x5')]['focus']();}[_0x157c('0x9')](){const _0x21cac1=this['locale'];this[_0x157c('0x21')]=!0x1,this['prompt']='',this[_0x157c('0x38')]['reset'](),this['value']&&(this['promptView']['queryView'][_0x157c('0x2b')]=_0x2918f9(_0x21cac1,'Ask\x20AI\x20to\x20improve\x20generated\x20text'));}[_0x157c('0x17')](_0x4f2a0d){const _0x4f2f18=this[_0x157c('0x1a')];this['finishProcessing'](),this[_0x157c('0x2')]=!0x0,this['errorView']['text']=_0x4f2a0d||_0x2918f9(_0x4f2f18,'AI_ERROR_FAILED'),this['value']||(this[_0x157c('0x5')][_0x157c('0x16')]=!0x1);}}
23
+ const _0x7676=['listenTo','focusCycler','search','fieldView','_focusables','_createToolbar','tab','items','Empty\x20history','AI_ERROR_FAILED','finishProcessing','backwardCycle','focusTracker','clearHistory','stopButton','focusPrevious','delegate','createCollection','ck-ai-form-content','startProcessing','submitPrompt','bindTemplate','add','focusLast','div','execute','submit','ck-ai-form','trim','queryView','focusNext','mainAction','copyButtonView','insertContentBelow','_createPromptView','REPLACE','isError','ck-hidden','Ask\x20AI\x20and\x20your\x20prompts\x20will\x20be\x20listed\x20here\x20for\x20you\x20to\x20use\x20later.','high','_createHistoryView','shift\x20+\x20tab','reset','errorView','fire','set','isVisible','keystrokes','contentArea','toolbar','locale','isEnabled','stop','prompt','isProcessing','tryAgainButton','promptView','bindTo','tryAgainEvent','bind','_promptHistory','Ask\x20AI\x20to\x20improve\x20generated\x20text','text','element','value','insertButton','forwardCycle','render','focus'];(function(_0x34ba10,_0x76767c){const _0x8d10bb=function(_0x7f2986){while(--_0x7f2986){_0x34ba10['push'](_0x34ba10['shift']());}};_0x8d10bb(++_0x76767c);}(_0x7676,0x141));const _0x8d10=function(_0x34ba10,_0x76767c){_0x34ba10=_0x34ba10-0x0;let _0x8d10bb=_0x7676[_0x34ba10];return _0x8d10bb;};import{FocusTracker as _0x227307,KeystrokeHandler as _0x2361b6}from'ckeditor5/src/utils.js';import{View as _0x5e2e2a,FocusCycler as _0x173011,createLabeledTextarea as _0x294840}from'ckeditor5/src/ui.js';import _0x48426b,{AIFormToolbarViewMainActionLabel as _0x463643}from'./aiformtoolbarview.js';import _0x39e919 from'./aiformcontentarea.js';import _0xc7ddfa from'./aiformerrorview.js';import _0x3c3023 from'./aiformpromptview.js';import _0x5c0db6 from'./aihistorylistview.js';import _0x503564 from'./aihistorylistitemview.js';import _0x1ed2fa from'./prompthistory.js';import{getTranslation as _0x3076cc}from'../../utils/common-translations.js';import{escape as _0x4ff001}from'lodash-es';export default class v extends _0x5e2e2a{constructor(_0x5891a7,_0x20b804,_0x5ca228=''){super(_0x5891a7),this[_0x8d10('0x0')](_0x8d10('0x6'),!0x0),this[_0x8d10('0x0')](_0x8d10('0x9'),!0x1),this['set'](_0x8d10('0x8'),''),this[_0x8d10('0x0')](_0x8d10('0x13'),''),this[_0x8d10('0x0')](_0x8d10('0x3c'),!0x1),this[_0x8d10('0x0')](_0x8d10('0x37'),_0x463643[_0x8d10('0x3b')]),this[_0x8d10('0xf')]=new _0x1ed2fa(),this[_0x8d10('0x43')]=new _0xc7ddfa(_0x5891a7),this[_0x8d10('0x3')]=new _0x39e919(_0x5891a7,_0x5ca228),this[_0x8d10('0x3')][_0x8d10('0xe')]('isProcessing')['to'](this),this[_0x8d10('0x3')][_0x8d10('0xe')](_0x8d10('0x13'))['to'](this),this[_0x8d10('0x4')]=this['_createToolbar'](),this['toolbar'][_0x8d10('0xe')](_0x8d10('0x37'))['to'](this),this[_0x8d10('0xb')]=this[_0x8d10('0x3a')](),this[_0x8d10('0x24')]=new _0x227307(),this[_0x8d10('0x2')]=new _0x2361b6(),this[_0x8d10('0x1c')]=this[_0x8d10('0x29')]([this['contentArea'],this[_0x8d10('0x3')]['copyButtonView'],this[_0x8d10('0x4')],this[_0x8d10('0xb')]]),this[_0x8d10('0x19')]=new _0x173011({'focusables':this[_0x8d10('0x1c')],'focusTracker':this[_0x8d10('0x24')],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':_0x8d10('0x41'),'focusNext':_0x8d10('0x1e')}}),this['promptView'][_0x8d10('0x19')]['on'](_0x8d10('0x15'),_0x50fbb9=>{this[_0x8d10('0x19')][_0x8d10('0x36')](),_0x50fbb9[_0x8d10('0x7')]();}),this[_0x8d10('0xb')][_0x8d10('0x19')]['on'](_0x8d10('0x23'),_0x17cde0=>{this[_0x8d10('0x19')][_0x8d10('0x27')](),_0x17cde0[_0x8d10('0x7')]();}),this[_0x8d10('0xb')]['queryView'][_0x8d10('0x1b')][_0x8d10('0xe')](_0x8d10('0x13'))['to'](this,'prompt');const _0x380920=this[_0x8d10('0x2d')];this['setTemplate']({'tag':_0x8d10('0x30'),'attributes':{'class':['ck',_0x8d10('0x33'),_0x20b804],'tabindex':'-1'},'children':[{'tag':_0x8d10('0x30'),'attributes':{'class':['ck',_0x8d10('0x2a')]},'children':[{'tag':_0x8d10('0x30'),'attributes':{'class':[_0x380920['if'](_0x8d10('0x3c'),_0x8d10('0x3d'),_0x208b4f=>!_0x208b4f)]},'children':[this['errorView']]},this['contentArea'],this[_0x8d10('0x4')],this[_0x8d10('0xb')]]}]});}[_0x8d10('0x16')](){super[_0x8d10('0x16')](),this[_0x8d10('0x24')]['add'](this[_0x8d10('0x3')]['element']),this[_0x8d10('0x24')][_0x8d10('0x2e')](this[_0x8d10('0x3')][_0x8d10('0x38')]['element']),this[_0x8d10('0x24')]['add'](this[_0x8d10('0x4')][_0x8d10('0x12')]),this['focusTracker'][_0x8d10('0x2e')](this[_0x8d10('0xb')][_0x8d10('0x12')]),this[_0x8d10('0x2')]['listenTo'](this[_0x8d10('0x12')]);}[_0x8d10('0x17')](_0x324caf=0x1){-0x1===_0x324caf?this['focusCycler'][_0x8d10('0x2f')]():this['focusCycler']['focusFirst']();}[_0x8d10('0x42')](){this['prompt']='',this['value']='',this[_0x8d10('0x3c')]=!0x1,this[_0x8d10('0xb')][_0x8d10('0x42')](),this['contentArea']['isVisible']=!0x1,this[_0x8d10('0x4')][_0x8d10('0x1')]=!0x1;}[_0x8d10('0x3a')](){const _0x25cd98=this[_0x8d10('0x5')],_0xd06f=new _0x3c3023(_0x25cd98,{'queryView':{'label':_0x3076cc(_0x25cd98,'Ask\x20AI\x20to\x20edit\x20or\x20generate'),'creator':_0x294840,'showIcon':!0x1,'showResetButton':!0x1},'infoView':{'text':{'noSearchableItems':{'primary':_0x3076cc(_0x25cd98,_0x8d10('0x20')),'secondary':_0x3076cc(_0x25cd98,_0x8d10('0x3e'))}}},'filteredView':this[_0x8d10('0x40')](),'queryMinChars':0x1/0x0,'resetOnBlur':!0x1});return _0xd06f[_0x8d10('0xe')](_0x8d10('0x6'))['to'](this,'isEnabled',this,_0x8d10('0x9'),(_0x2c09e3,_0x121a8f)=>_0x2c09e3&&!_0x121a8f),this[_0x8d10('0x18')](_0xd06f,_0x8d10('0x32'),(_0x1461c2,_0x57051f)=>{this[_0x8d10('0x8')]=_0x57051f;const _0x34c77e=_0x4ff001(_0x57051f);this[_0x8d10('0x44')](_0x8d10('0x2c'),_0x34c77e),_0x57051f[_0x8d10('0x34')]()&&this[_0x8d10('0xf')][_0x8d10('0x2e')]({'prompt':_0x34c77e},0x0);},{'priority':_0x8d10('0x3f')}),_0xd06f;}['_createHistoryView'](){const _0x63c3c6=new _0x5c0db6(this['locale']);return _0x63c3c6['historyGroupView'][_0x8d10('0x1f')][_0x8d10('0xc')](this[_0x8d10('0xf')])['as'](_0x503564),_0x63c3c6['on'](_0x8d10('0x25'),()=>{this['_promptHistory']['clear'](),this[_0x8d10('0xb')][_0x8d10('0x1a')](''),this[_0x8d10('0xb')][_0x8d10('0x17')]();}),_0x63c3c6;}[_0x8d10('0x1d')](){const _0x2a2b57=new _0x48426b(this['locale']);return _0x2a2b57['replaceButton'][_0x8d10('0xe')](_0x8d10('0x6'))['to'](this,_0x8d10('0x6'),this,_0x8d10('0x9'),this,_0x8d10('0x13'),(_0x1a4606,_0x99f868,_0x52a8f3)=>_0x1a4606&&!_0x99f868&&!!_0x52a8f3),_0x2a2b57['replaceButton']['delegate'](_0x8d10('0x31'))['to'](this,'replaceContent'),_0x2a2b57[_0x8d10('0x14')][_0x8d10('0xe')]('isEnabled')['to'](this,_0x8d10('0x6'),this,_0x8d10('0x9'),this,_0x8d10('0x13'),(_0x1b11d9,_0x40dd36,_0x550733)=>_0x1b11d9&&!_0x40dd36&&!!_0x550733),_0x2a2b57[_0x8d10('0x14')]['delegate'](_0x8d10('0x31'))['to'](this,_0x8d10('0x39')),_0x2a2b57['tryAgainButton'][_0x8d10('0xe')]('isEnabled')['to'](this,'isEnabled',this,'isProcessing',(_0x537605,_0x3d8316)=>_0x537605&&!_0x3d8316),_0x2a2b57[_0x8d10('0xa')]['delegate']('execute')['to'](this,_0x8d10('0xd')),_0x2a2b57[_0x8d10('0x26')][_0x8d10('0xe')]('isEnabled')['to'](this,_0x8d10('0x9')),_0x2a2b57[_0x8d10('0x26')][_0x8d10('0x28')](_0x8d10('0x31'))['to'](this,'stopProcessing'),_0x2a2b57;}[_0x8d10('0x2b')](){this['value']='',this[_0x8d10('0x3c')]=!0x1,this[_0x8d10('0x9')]=!0x0,this[_0x8d10('0x3')][_0x8d10('0x1')]=!0x0,this[_0x8d10('0x4')]['isVisible']=!0x0,this[_0x8d10('0x3')][_0x8d10('0x17')]();}[_0x8d10('0x22')](){const _0x3a77b8=this[_0x8d10('0x5')];this[_0x8d10('0x9')]=!0x1,this[_0x8d10('0x8')]='',this[_0x8d10('0xb')]['reset'](),this[_0x8d10('0x13')]&&(this[_0x8d10('0xb')][_0x8d10('0x35')]['label']=_0x3076cc(_0x3a77b8,_0x8d10('0x10')));}['handleError'](_0x3a45df){const _0x3914c5=this[_0x8d10('0x5')];this[_0x8d10('0x22')](),this[_0x8d10('0x3c')]=!0x0,this[_0x8d10('0x43')][_0x8d10('0x11')]=_0x3a45df||_0x3076cc(_0x3914c5,_0x8d10('0x21')),this[_0x8d10('0x13')]||(this[_0x8d10('0x3')][_0x8d10('0x1')]=!0x1);}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x4315=['fire','set','locale','children','add','prompt'];(function(_0x398237,_0x431507){const _0x4058ef=function(_0x59c068){while(--_0x59c068){_0x398237['push'](_0x398237['shift']());}};_0x4058ef(++_0x431507);}(_0x4315,0x155));const _0x4058=function(_0x398237,_0x431507){_0x398237=_0x398237-0x0;let _0x4058ef=_0x4315[_0x398237];return _0x4058ef;};import{ListItemView as _0x49d2c4,ButtonView as _0x2feb6f}from'ckeditor5/src/ui.js';import _0x431cdb from'../dropdown/buttonlabelwithhighlightview.js';import{unescape as _0xac2b88}from'lodash-es';export default class hs extends _0x49d2c4{constructor(_0x41f30b){super();const _0x15ba66=new _0x431cdb(),_0x400e48=new _0x2feb6f(this[_0x4058('0x3')],_0x15ba66);this[_0x4058('0x4')][_0x4058('0x5')](_0x400e48),_0x400e48[_0x4058('0x2')]({'label':_0x41f30b['prompt'],'withText':!0x0}),_0x400e48['on']('execute',()=>{this[_0x4058('0x1')]('execute',{'value':_0xac2b88(_0x41f30b[_0x4058('0x0')])});});}}
23
+ const _0x156c=['add','children','execute','prompt','set'];(function(_0x2f26fe,_0x156c8f){const _0x171960=function(_0x39a64e){while(--_0x39a64e){_0x2f26fe['push'](_0x2f26fe['shift']());}};_0x171960(++_0x156c8f);}(_0x156c,0x12a));const _0x1719=function(_0x2f26fe,_0x156c8f){_0x2f26fe=_0x2f26fe-0x0;let _0x171960=_0x156c[_0x2f26fe];return _0x171960;};import{ListItemView as _0x592955,ButtonView as _0x392671}from'ckeditor5/src/ui.js';import _0x282f04 from'../dropdown/buttonlabelwithhighlightview.js';import{unescape as _0x3aa31b}from'lodash-es';export default class hs extends _0x592955{constructor(_0xb4b54c){super();const _0xf885ca=new _0x282f04(),_0x1c6655=new _0x392671(this['locale'],_0xf885ca);this[_0x1719('0x3')][_0x1719('0x2')](_0x1c6655),_0x1c6655[_0x1719('0x1')]({'label':_0xb4b54c[_0x1719('0x0')],'withText':!0x0}),_0x1c6655['on'](_0x1719('0x4'),()=>{this['fire'](_0x1719('0x4'),{'value':_0x3aa31b(_0xb4b54c[_0x1719('0x0')])});});}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x5858=['add','delegate','label','length','clearHistoryButton','locale','set','Prompt\x20history','_createClearHistoryButton','children','items','historyGroupView'];(function(_0x106fca,_0x5858c3){const _0x50d63b=function(_0x3b2b97){while(--_0x3b2b97){_0x106fca['push'](_0x106fca['shift']());}};_0x50d63b(++_0x5858c3);}(_0x5858,0xa9));const _0x50d6=function(_0x106fca,_0x5858c3){_0x106fca=_0x106fca-0x0;let _0x50d63b=_0x5858[_0x106fca];return _0x50d63b;};import{ListView as _0x306472,ListItemGroupView as _0x2f72de,ButtonView as _0xbcc5f7}from'ckeditor5/src/ui.js';import{getTranslation as _0x35bd9e}from'../../utils/common-translations.js';export default class rs extends _0x306472{constructor(_0x2f147f){super(_0x2f147f),this[_0x50d6('0x3')]=this[_0x50d6('0x7')](),this[_0x50d6('0xa')]=new _0x2f72de(),this['historyGroupView'][_0x50d6('0x8')][_0x50d6('0xb')](this[_0x50d6('0x3')],0x1),this['historyGroupView'][_0x50d6('0x1')]=_0x35bd9e(_0x2f147f,_0x50d6('0x6')),this[_0x50d6('0xa')][_0x50d6('0x9')][_0x50d6('0x0')]('execute')['to'](this),this[_0x50d6('0x9')]['add'](this['historyGroupView']);}['filter'](){let _0x4ee9d8=0x0;for(const _0x121703 of this[_0x50d6('0x9')])_0x4ee9d8+=_0x121703[_0x50d6('0x9')][_0x50d6('0x2')];return{'resultsCount':_0x4ee9d8,'totalItemsCount':_0x4ee9d8};}[_0x50d6('0x7')](){const _0x580999=this['locale'],_0x4a288c=new _0xbcc5f7(this[_0x50d6('0x4')]);return _0x4a288c[_0x50d6('0x5')]({'label':'('+_0x35bd9e(_0x580999,'Clear')+')','withText':!0x0}),_0x4a288c['on']('execute',()=>this['fire']('clearHistory')),_0x4a288c;}}
23
+ const _0x42d1=['Prompt\x20history','items','clearHistoryButton','clearHistory','length','locale','Clear','fire','delegate','add','execute','_createClearHistoryButton','historyGroupView','label','filter'];(function(_0x5f349e,_0x42d160){const _0x317bbe=function(_0x1dc5b8){while(--_0x1dc5b8){_0x5f349e['push'](_0x5f349e['shift']());}};_0x317bbe(++_0x42d160);}(_0x42d1,0x1f4));const _0x317b=function(_0x5f349e,_0x42d160){_0x5f349e=_0x5f349e-0x0;let _0x317bbe=_0x42d1[_0x5f349e];return _0x317bbe;};import{ListView as _0x4cab08,ListItemGroupView as _0x426feb,ButtonView as _0x41e27c}from'ckeditor5/src/ui.js';import{getTranslation as _0x3b3718}from'../../utils/common-translations.js';export default class rs extends _0x4cab08{constructor(_0x34e249){super(_0x34e249),this[_0x317b('0xc')]=this[_0x317b('0x6')](),this[_0x317b('0x7')]=new _0x426feb(),this['historyGroupView']['children'][_0x317b('0x4')](this[_0x317b('0xc')],0x1),this['historyGroupView'][_0x317b('0x8')]=_0x3b3718(_0x34e249,_0x317b('0xa')),this[_0x317b('0x7')][_0x317b('0xb')][_0x317b('0x3')](_0x317b('0x5'))['to'](this),this[_0x317b('0xb')][_0x317b('0x4')](this[_0x317b('0x7')]);}[_0x317b('0x9')](){let _0x5e6495=0x0;for(const _0x523cec of this[_0x317b('0xb')])_0x5e6495+=_0x523cec[_0x317b('0xb')][_0x317b('0xe')];return{'resultsCount':_0x5e6495,'totalItemsCount':_0x5e6495};}['_createClearHistoryButton'](){const _0x9b7be7=this[_0x317b('0x0')],_0x449e6e=new _0x41e27c(this[_0x317b('0x0')]);return _0x449e6e['set']({'label':'('+_0x3b3718(_0x9b7be7,_0x317b('0x1'))+')','withText':!0x0}),_0x449e6e['on'](_0x317b('0x5'),()=>this[_0x317b('0x2')](_0x317b('0xd'))),_0x449e6e;}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0xf576=['setItem','last','add','_loadFromSessionStorage','toLowerCase','getItem','prompt','_saveToSessionStorage','parse','remove','trim','addMany','CKEditor/AIFormView/PromptHistory','length','map'];(function(_0x1099a8,_0xf576aa){const _0x54ca99=function(_0x5af653){while(--_0x5af653){_0x1099a8['push'](_0x1099a8['shift']());}};_0x54ca99(++_0xf576aa);}(_0xf576,0x68));const _0x54ca=function(_0x1099a8,_0xf576aa){_0x1099a8=_0x1099a8-0x0;let _0x54ca99=_0xf576[_0x1099a8];return _0x54ca99;};import{Collection as _0x41f1f9}from'ckeditor5/src/utils.js';const cs=_0x54ca('0xd');export default class os extends _0x41f1f9{constructor(){super(),this[_0x54ca('0x4')](),this['on'](_0x54ca('0x3'),(_0x4ed20f,_0x25c186)=>{const _0x10f1d9=Ss(_0x25c186[_0x54ca('0x7')]);for(const _0x64e803 of this)if(_0x64e803!=_0x25c186&&Ss(_0x64e803[_0x54ca('0x7')])===_0x10f1d9){this['remove'](_0x64e803);break;}this[_0x54ca('0xe')]>0x14&&this[_0x54ca('0xa')](this[_0x54ca('0x2')]),this[_0x54ca('0x8')]();}),this['on'](_0x54ca('0xa'),()=>{this[_0x54ca('0x8')]();});}['_loadFromSessionStorage'](){const _0x298a15=sessionStorage[_0x54ca('0x6')](cs)||'[]';this[_0x54ca('0xc')](JSON[_0x54ca('0x9')](_0x298a15));}[_0x54ca('0x8')](){sessionStorage[_0x54ca('0x1')](cs,JSON['stringify'](this[_0x54ca('0x0')](_0x5303cc=>_0x5303cc)));}}function Ss(_0x57bb18){return _0x57bb18[_0x54ca('0x5')]()[_0x54ca('0xb')]();}
23
+ const _0x1649=['remove','prompt','stringify','getItem','parse','add','_saveToSessionStorage','trim','CKEditor/AIFormView/PromptHistory','_loadFromSessionStorage','map'];(function(_0x1d8891,_0x16490d){const _0x220deb=function(_0x3ddd67){while(--_0x3ddd67){_0x1d8891['push'](_0x1d8891['shift']());}};_0x220deb(++_0x16490d);}(_0x1649,0xe0));const _0x220d=function(_0x1d8891,_0x16490d){_0x1d8891=_0x1d8891-0x0;let _0x220deb=_0x1649[_0x1d8891];return _0x220deb;};import{Collection as _0x4df774}from'ckeditor5/src/utils.js';const cs=_0x220d('0x4');export default class os extends _0x4df774{constructor(){super(),this[_0x220d('0x5')](),this['on'](_0x220d('0x1'),(_0x2f9bb9,_0x52e8ff)=>{const _0x4cef36=Ss(_0x52e8ff[_0x220d('0x8')]);for(const _0xbe6bb1 of this)if(_0xbe6bb1!=_0x52e8ff&&Ss(_0xbe6bb1['prompt'])===_0x4cef36){this[_0x220d('0x7')](_0xbe6bb1);break;}this['length']>0x14&&this[_0x220d('0x7')](this['last']),this['_saveToSessionStorage']();}),this['on'](_0x220d('0x7'),()=>{this[_0x220d('0x2')]();});}[_0x220d('0x5')](){const _0x49f745=sessionStorage[_0x220d('0xa')](cs)||'[]';this['addMany'](JSON[_0x220d('0x0')](_0x49f745));}[_0x220d('0x2')](){sessionStorage['setItem'](cs,JSON[_0x220d('0x9')](this[_0x220d('0x6')](_0x4b698c=>_0x4b698c)));}}function Ss(_0xd67a9b){return _0xd67a9b['toLowerCase']()[_0x220d('0x3')]();}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x5d09=['name','custom','showUI','includes','getItems','isEnabled','editor','getRanges','get','refresh','config','selection','plugins','element','model','execute'];(function(_0x455652,_0x5d0929){const _0x638055=function(_0x160c75){while(--_0x160c75){_0x455652['push'](_0x455652['shift']());}};_0x638055(++_0x5d0929);}(_0x5d09,0x187));const _0x6380=function(_0x455652,_0x5d0929){_0x455652=_0x455652-0x0;let _0x638055=_0x5d09[_0x455652];return _0x638055;};import{Command as _0x1b481b}from'ckeditor5/src/core.js';import _0x2decb3 from'../aiassistantui.js';export default class g extends _0x1b481b{[_0x6380('0x2')](){const _0x2a3d51=this['editor'][_0x6380('0x7')]['document'][_0x6380('0x4')],_0x1918c4=this[_0x6380('0xf')][_0x6380('0x3')]['get']('ai.aiAssistant.disabledElements');for(const _0x51c100 of _0x2a3d51[_0x6380('0x0')]())for(const _0x36e0ff of _0x51c100[_0x6380('0xd')]())if(_0x36e0ff['is'](_0x6380('0x6'))&&_0x1918c4[_0x6380('0xc')](_0x36e0ff[_0x6380('0x9')]))return void(this[_0x6380('0xe')]=!0x1);this[_0x6380('0xe')]=!0x0;}[_0x6380('0x8')](_0x505e03='',_0x4bf0d5='',_0x3b3c7f=_0x6380('0xa')){this[_0x6380('0xf')][_0x6380('0x5')][_0x6380('0x1')](_0x2decb3)[_0x6380('0xb')](_0x505e03,_0x4bf0d5,_0x3b3c7f);}}
23
+ const _0xa448=['getRanges','editor','refresh','showUI','config','model','selection','name','execute','ai.aiAssistant.disabledElements','plugins','element','includes','isEnabled','get'];(function(_0x10eb99,_0xa448df){const _0x108654=function(_0x2e5ad5){while(--_0x2e5ad5){_0x10eb99['push'](_0x10eb99['shift']());}};_0x108654(++_0xa448df);}(_0xa448,0xab));const _0x1086=function(_0x10eb99,_0xa448df){_0x10eb99=_0x10eb99-0x0;let _0x108654=_0xa448[_0x10eb99];return _0x108654;};import{Command as _0x1e5645}from'ckeditor5/src/core.js';import _0x1cd99e from'../aiassistantui.js';export default class g extends _0x1e5645{[_0x1086('0xb')](){const _0x3c5734=this[_0x1086('0xa')][_0x1086('0xe')]['document'][_0x1086('0x0')],_0x2c63ed=this[_0x1086('0xa')][_0x1086('0xd')][_0x1086('0x8')](_0x1086('0x3'));for(const _0x331efa of _0x3c5734[_0x1086('0x9')]())for(const _0x4f0deb of _0x331efa['getItems']())if(_0x4f0deb['is'](_0x1086('0x5'))&&_0x2c63ed[_0x1086('0x6')](_0x4f0deb[_0x1086('0x1')]))return void(this['isEnabled']=!0x1);this[_0x1086('0x7')]=!0x0;}[_0x1086('0x2')](_0x1008a0='',_0x2b963a='',_0x6fc602='custom'){this[_0x1086('0xa')][_0x1086('0x4')][_0x1086('0x8')](_0x1cd99e)[_0x1086('0xc')](_0x1008a0,_0x2b963a,_0x6fc602);}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- export function getTranslation(_0x2fa434,_0x1affe6,_0x3462ff){const t=_0x2fa434['t'];switch(_0x1affe6){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',_0x3462ff);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'},_0x3462ff);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 _0x1affe6;}}
23
+ export function getTranslation(_0x26c977,_0x3d75c7,_0x44cba8){const t=_0x26c977['t'];switch(_0x3d75c7){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',_0x44cba8);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'},_0x44cba8);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 _0x3d75c7;}}
package/theme/ai-form.css CHANGED
@@ -23,8 +23,13 @@
23
23
  .ck .ck-ai-form {
24
24
  width: var(--ck-ai-form-view-width);
25
25
 
26
+ /* Don't overflow the parent dialog container */
27
+ max-width: 100%;
28
+
26
29
  @mixin ck-media-phone {
27
- --ck-ai-form-view-width: 350px;
30
+ /* Allow the for the layout to be fluid in narrow viewports to avoid breaking it due to limited
31
+ * horizontal space (https://github.com/cksource/ckeditor5-commercial/issues/5913). */
32
+ --ck-ai-form-view-width: 100vw;
28
33
  }
29
34
 
30
35
  & .ck-ai-form-content {
@@ -185,6 +190,13 @@
185
190
  @mixin ck-dir rtl {
186
191
  padding-left: 30px;
187
192
  }
193
+
194
+ /* Squash the textarea horizontally if necessary on narrow layouts
195
+ * to avoid breaking the layout even at the cost of the placeholder
196
+ * being cut off (https://github.com/cksource/ckeditor5-commercial/issues/5913). */
197
+ @mixin ck-media-phone {
198
+ --ck-input-width: auto;
199
+ }
188
200
  }
189
201
 
190
202
  /* Prompt history group */