@ckeditor/ckeditor5-ai 40.0.0 → 40.2.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.
- package/LICENSE.md +2 -2
- package/README.md +1 -1
- package/build/ai.js +77 -2
- package/build/translations/af.js +1 -1
- package/build/translations/ar.js +1 -1
- package/build/translations/bg.js +1 -1
- package/build/translations/bn.js +1 -1
- package/build/translations/bs.js +1 -1
- package/build/translations/ca.js +1 -1
- package/build/translations/cs.js +1 -1
- package/build/translations/da.js +1 -1
- package/build/translations/de-ch.js +1 -1
- package/build/translations/de.js +1 -1
- package/build/translations/el.js +1 -1
- package/build/translations/en-au.js +1 -1
- package/build/translations/es-co.js +1 -1
- package/build/translations/es.js +1 -1
- package/build/translations/et.js +1 -1
- package/build/translations/fa.js +1 -1
- package/build/translations/fi.js +1 -1
- package/build/translations/fr.js +1 -1
- package/build/translations/gl.js +1 -1
- package/build/translations/he.js +1 -1
- package/build/translations/hi.js +1 -1
- package/build/translations/hr.js +1 -1
- package/build/translations/hu.js +1 -1
- package/build/translations/id.js +1 -1
- package/build/translations/it.js +1 -1
- package/build/translations/ja.js +1 -1
- package/build/translations/jv.js +1 -1
- package/build/translations/ko.js +1 -1
- package/build/translations/lt.js +1 -1
- package/build/translations/lv.js +1 -1
- package/build/translations/ms.js +1 -1
- package/build/translations/nl.js +1 -1
- package/build/translations/no.js +1 -1
- package/build/translations/pl.js +1 -1
- package/build/translations/pt-br.js +1 -1
- package/build/translations/pt.js +1 -1
- package/build/translations/ro.js +1 -1
- package/build/translations/ru.js +1 -1
- package/build/translations/sk.js +1 -1
- package/build/translations/sr-latn.js +1 -1
- package/build/translations/sr.js +1 -1
- package/build/translations/sv.js +1 -1
- package/build/translations/th.js +1 -1
- package/build/translations/tk.js +1 -1
- package/build/translations/tr.js +1 -1
- package/build/translations/ug.js +1 -1
- package/build/translations/uk.js +1 -1
- package/build/translations/ur.js +1 -1
- package/build/translations/uz.js +1 -0
- package/build/translations/vi.js +1 -1
- package/build/translations/zh-cn.js +1 -1
- package/build/translations/zh.js +1 -1
- package/ckeditor5-metadata.json +1 -1
- package/lang/contexts.json +4 -1
- package/lang/translations/af.po +60 -16
- package/lang/translations/ar.po +60 -16
- package/lang/translations/bg.po +60 -16
- package/lang/translations/bn.po +60 -16
- package/lang/translations/bs.po +60 -16
- package/lang/translations/ca.po +60 -16
- package/lang/translations/cs.po +60 -16
- package/lang/translations/da.po +60 -16
- package/lang/translations/de-ch.po +60 -16
- package/lang/translations/de.po +60 -16
- package/lang/translations/el.po +60 -16
- package/lang/translations/en-au.po +60 -16
- package/lang/translations/en.po +60 -16
- package/lang/translations/es-co.po +60 -16
- package/lang/translations/es.po +60 -16
- package/lang/translations/et.po +60 -16
- package/lang/translations/fa.po +60 -16
- package/lang/translations/fi.po +60 -16
- package/lang/translations/fr.po +60 -16
- package/lang/translations/gl.po +95 -51
- package/lang/translations/he.po +60 -16
- package/lang/translations/hi.po +60 -16
- package/lang/translations/hr.po +93 -49
- package/lang/translations/hu.po +60 -16
- package/lang/translations/id.po +60 -16
- package/lang/translations/it.po +60 -16
- package/lang/translations/ja.po +60 -16
- package/lang/translations/jv.po +60 -16
- package/lang/translations/ko.po +60 -16
- package/lang/translations/lt.po +60 -16
- package/lang/translations/lv.po +60 -16
- package/lang/translations/ms.po +60 -16
- package/lang/translations/nl.po +60 -16
- package/lang/translations/no.po +60 -16
- package/lang/translations/pl.po +60 -16
- package/lang/translations/pt-br.po +60 -16
- package/lang/translations/pt.po +60 -16
- package/lang/translations/ro.po +60 -16
- package/lang/translations/ru.po +60 -16
- package/lang/translations/sk.po +60 -16
- package/lang/translations/sr-latn.po +95 -51
- package/lang/translations/sr.po +60 -16
- package/lang/translations/sv.po +60 -16
- package/lang/translations/th.po +60 -16
- package/lang/translations/tk.po +60 -16
- package/lang/translations/tr.po +60 -16
- package/lang/translations/ug.po +96 -52
- package/lang/translations/uk.po +60 -16
- package/lang/translations/ur.po +60 -16
- package/lang/translations/uz.po +226 -0
- package/lang/translations/vi.po +60 -16
- package/lang/translations/zh-cn.po +60 -16
- package/lang/translations/zh.po +60 -16
- package/package.json +4 -3
- package/src/adapters/aiadapter.d.ts +48 -0
- package/src/adapters/aiadapter.js +23 -0
- package/src/adapters/aitextadapter.d.ts +146 -0
- package/src/adapters/aitextadapter.js +23 -0
- package/src/adapters/awstextadapter.d.ts +178 -0
- package/src/adapters/awstextadapter.js +23 -0
- package/src/adapters/openaitextadapter.d.ts +181 -0
- package/src/adapters/openaitextadapter.js +23 -0
- package/src/aiassistant.d.ts +386 -419
- package/src/aiassistant.js +1 -1
- package/src/aiassistantediting.d.ts +45 -45
- package/src/aiassistantediting.js +1 -1
- package/src/aiassistantui.d.ts +52 -46
- package/src/aiassistantui.js +1 -1
- package/src/aiconfig.d.ts +69 -0
- package/src/aiconfig.js +23 -0
- package/src/augmentation.d.ts +27 -26
- package/src/index.d.ts +13 -9
- package/src/index.js +1 -1
- package/src/ui/aiassistantcontroller.d.ts +109 -59
- package/src/ui/aiassistantcontroller.js +1 -1
- package/src/ui/dropdown/aicommandslistview.d.ts +22 -22
- package/src/ui/dropdown/aicommandslistview.js +1 -1
- package/src/ui/dropdown/buttonlabelwithhighlightview.d.ts +29 -29
- package/src/ui/dropdown/buttonlabelwithhighlightview.js +1 -1
- package/src/ui/dropdown/labelwithhighlightview.d.ts +25 -0
- package/src/ui/dropdown/labelwithhighlightview.js +23 -0
- package/src/ui/form/aiformcontentarea.d.ts +48 -48
- package/src/ui/form/aiformcontentarea.js +1 -1
- package/src/ui/form/aiformerrorview.d.ts +26 -26
- package/src/ui/form/aiformerrorview.js +1 -1
- package/src/ui/form/aiformpromptview.d.ts +46 -46
- package/src/ui/form/aiformpromptview.js +1 -1
- package/src/ui/form/aiformtoolbarview.d.ts +54 -41
- package/src/ui/form/aiformtoolbarview.js +1 -1
- package/src/ui/form/aiformview.d.ts +142 -131
- package/src/ui/form/aiformview.js +1 -1
- package/src/ui/form/aihistorylistitemview.d.ts +18 -18
- package/src/ui/form/aihistorylistitemview.js +1 -1
- package/src/ui/form/aihistorylistview.d.ts +35 -35
- package/src/ui/form/aihistorylistview.js +1 -1
- package/src/ui/form/prompthistory.d.ts +20 -20
- package/src/ui/form/prompthistory.js +1 -1
- package/src/ui/showaiassistantcommand.d.ts +29 -26
- package/src/ui/showaiassistantcommand.js +1 -1
- package/src/utils/common-translations.d.ts +9 -9
- package/src/utils/common-translations.js +1 -1
- package/theme/ai-form.css +58 -11
- package/theme/ai.css +20 -15
- package/src/aiconnector.d.ts +0 -44
- package/src/aiconnector.js +0 -23
|
@@ -1,46 +1,46 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
-
*/
|
|
5
|
-
/**
|
|
6
|
-
* @module ai/ui/aiformpromptview
|
|
7
|
-
*/
|
|
8
|
-
import { type Locale } from 'ckeditor5/src/utils';
|
|
9
|
-
import { AutocompleteView, ButtonView, type TextareaView, type AutocompleteViewConfig } from 'ckeditor5/src/ui';
|
|
10
|
-
/**
|
|
11
|
-
* A textarea field allowing to ask AI.
|
|
12
|
-
*/
|
|
13
|
-
export default class AIFormPromptView extends AutocompleteView<TextareaView> {
|
|
14
|
-
/**
|
|
15
|
-
* The submit button view.
|
|
16
|
-
*/
|
|
17
|
-
submitButtonView: ButtonView;
|
|
18
|
-
/**
|
|
19
|
-
* The button that shows and hides the history autocomplete panel.
|
|
20
|
-
*/
|
|
21
|
-
showHistoryButtonView: ButtonView;
|
|
22
|
-
/**
|
|
23
|
-
* Creates `AIFormPromptView` instance.
|
|
24
|
-
*
|
|
25
|
-
* @param locale The localization services instance.
|
|
26
|
-
* @param config Autocomplete config.
|
|
27
|
-
*/
|
|
28
|
-
constructor(locale: Locale, config: AutocompleteViewConfig<TextareaView>);
|
|
29
|
-
/**
|
|
30
|
-
* @inheritDoc
|
|
31
|
-
*/
|
|
32
|
-
render(): void;
|
|
33
|
-
/**
|
|
34
|
-
* @inheritDoc
|
|
35
|
-
*/
|
|
36
|
-
focus(direction?: 1 | -1): void;
|
|
37
|
-
}
|
|
38
|
-
/**
|
|
39
|
-
* Fired when the query is submitted by the user.
|
|
40
|
-
*
|
|
41
|
-
* @eventName ~AIFormPromptView#submit
|
|
42
|
-
*/
|
|
43
|
-
export type AIFormPromptViewSubmitEvent = {
|
|
44
|
-
name: 'submit';
|
|
45
|
-
args: [query: string];
|
|
46
|
-
};
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @module ai/ui/aiformpromptview
|
|
7
|
+
*/
|
|
8
|
+
import { type Locale } from 'ckeditor5/src/utils';
|
|
9
|
+
import { AutocompleteView, ButtonView, type TextareaView, type AutocompleteViewConfig } from 'ckeditor5/src/ui';
|
|
10
|
+
/**
|
|
11
|
+
* A textarea field allowing to ask AI.
|
|
12
|
+
*/
|
|
13
|
+
export default class AIFormPromptView extends AutocompleteView<TextareaView> {
|
|
14
|
+
/**
|
|
15
|
+
* The submit button view.
|
|
16
|
+
*/
|
|
17
|
+
submitButtonView: ButtonView;
|
|
18
|
+
/**
|
|
19
|
+
* The button that shows and hides the history autocomplete panel.
|
|
20
|
+
*/
|
|
21
|
+
showHistoryButtonView: ButtonView;
|
|
22
|
+
/**
|
|
23
|
+
* Creates `AIFormPromptView` instance.
|
|
24
|
+
*
|
|
25
|
+
* @param locale The localization services instance.
|
|
26
|
+
* @param config Autocomplete config.
|
|
27
|
+
*/
|
|
28
|
+
constructor(locale: Locale, config: AutocompleteViewConfig<TextareaView>);
|
|
29
|
+
/**
|
|
30
|
+
* @inheritDoc
|
|
31
|
+
*/
|
|
32
|
+
render(): void;
|
|
33
|
+
/**
|
|
34
|
+
* @inheritDoc
|
|
35
|
+
*/
|
|
36
|
+
focus(direction?: 1 | -1): void;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Fired when the query is submitted by the user.
|
|
40
|
+
*
|
|
41
|
+
* @eventName ~AIFormPromptView#submit
|
|
42
|
+
*/
|
|
43
|
+
export type AIFormPromptViewSubmitEvent = {
|
|
44
|
+
name: 'submit';
|
|
45
|
+
args: [query: string];
|
|
46
|
+
};
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x3caf=['showHistoryButtonView','_createShowHistoryButton','History','left','execute','locale','minRows','ck-ai-form__submit','maxRows','focus','focusCycler','right','isEnabled','excludeScrollbarsAndBorders','children','set','isEmpty','target','focusableChildren','rtl','add','element','style','keystrokes','value','fieldWrapperChildren','update','submitButtonView','resultsView','filteredView','focusFirst','width','queryView','window','bind','fieldView','Submit','ck-ai-form__toggle-history','_createSubmitButton','render','enter','isVisible','submit'];(function(_0xca40dd,_0x3caf3d){const _0x4722d0=function(_0x24a6b0){while(--_0x24a6b0){_0xca40dd['push'](_0xca40dd['shift']());}};_0x4722d0(++_0x3caf3d);}(_0x3caf,0x99));const _0x4722=function(_0xca40dd,_0x3caf3d){_0xca40dd=_0xca40dd-0x0;let _0x4722d0=_0x3caf[_0xca40dd];return _0x4722d0;};import{Rect as _0x13a09b,global as _0x58e7ce,isVisible as _0xbaa3d2}from'ckeditor5/src/utils';import{AutocompleteView as _0x3216dc,ButtonView as _0x1a2c14}from'ckeditor5/src/ui';import{icons as _0x369b45}from'ckeditor5/src/core';import{getTranslation as _0x3e761c}from'../../utils/common-translations';import _0x2ef7f7 from'../../../theme/icons/submit.svg';export default class ht extends _0x3216dc{constructor(_0x1dc6d7,_0x478e21){super(_0x1dc6d7,_0x478e21),this[_0x4722('0x8')]['fieldView'][_0x4722('0x19')]=0x1,this[_0x4722('0x8')][_0x4722('0xb')][_0x4722('0x1b')]=0x3,this[_0x4722('0x3')]=this[_0x4722('0xe')](),this[_0x4722('0x13')]=this[_0x4722('0x14')](),this[_0x4722('0x25')][_0x4722('0x27')](this[_0x4722('0x13')],0x1),this[_0x4722('0x25')][_0x4722('0x27')](this[_0x4722('0x3')]);}[_0x4722('0xf')](){super[_0x4722('0xf')](),this[_0x4722('0x8')][_0x4722('0x1')][_0x4722('0x27')](this[_0x4722('0x13')]),this[_0x4722('0x21')][_0x4722('0x27')](this[_0x4722('0x3')]),this[_0x4722('0x2a')][_0x4722('0x22')](_0x4722('0x10'),(_0xe5512a,_0x760f74)=>{_0xe5512a[_0x4722('0x24')]==this['queryView'][_0x4722('0xb')][_0x4722('0x28')]&&(this[_0x4722('0x12')](),_0x760f74());});}[_0x4722('0xe')](){const _0x539210=new _0x1a2c14(this['locale']),_0x344b7a=this[_0x4722('0x18')];return _0x539210['set']({'icon':_0x2ef7f7,'label':_0x3e761c(_0x344b7a,_0x4722('0xc')),'isVisible':!0x0,'tooltip':!0x0,'class':_0x4722('0x1a')}),_0x539210['on']('execute',()=>{this[_0x4722('0x12')]();}),_0x539210['bind'](_0x4722('0x1f'))['to'](this[_0x4722('0x8')][_0x4722('0xb')],_0x4722('0x23'),this,_0x4722('0x1f'),(_0x31a693,_0x12321c)=>!_0x31a693&&_0x12321c),_0x539210;}['_createShowHistoryButton'](){const _0x8142d=new _0x1a2c14(this['locale']),_0x4bd683=this[_0x4722('0x4')],_0x187b63=this[_0x4722('0x18')];_0x8142d[_0x4722('0x22')]({'label':_0x3e761c(_0x187b63,_0x4722('0x15')),'withText':!0x1,'icon':_0x369b45['history'],'tooltip':!0x0,'tooltipPosition':'sw','class':_0x4722('0xd')}),_0x8142d[_0x4722('0xa')]('isOn')['to'](_0x4bd683,_0x4722('0x11')),_0x8142d['bind']('isEnabled')['to'](this,_0x4722('0x1f')),_0x8142d['on'](_0x4722('0x17'),()=>{_0x4bd683[_0x4722('0x11')]=!_0x4bd683['isVisible'],_0x4bd683[_0x4722('0x11')]?this[_0x4722('0x5')][_0x4722('0x1c')]():this[_0x4722('0x1c')]();});const _0x13eb8b=()=>{_0x58e7ce[_0x4722('0x9')]['requestAnimationFrame'](()=>{if(_0xbaa3d2(this[_0x4722('0x28')])){const _0x5595d7=new _0x13a09b(this[_0x4722('0x8')][_0x4722('0xb')]['element']),_0xa75109=_0x5595d7[_0x4722('0x7')],_0x35b47c=_0x4722('0x26')===_0x187b63['uiLanguageDirection']?_0x4722('0x16'):_0x4722('0x1e');_0x5595d7[_0x4722('0x20')](),_0x8142d[_0x4722('0x28')][_0x4722('0x29')][_0x35b47c]=_0xa75109-_0x5595d7['width']+0x1+'px';}});};return this[_0x4722('0x8')][_0x4722('0xb')]['on'](_0x4722('0x2'),_0x13eb8b),this['on'](_0x4722('0xf'),_0x13eb8b),_0x8142d;}[_0x4722('0x12')](){const _0x383d0f=this[_0x4722('0x8')]['fieldView'][_0x4722('0x28')][_0x4722('0x0')];this['fire'](_0x4722('0x12'),_0x383d0f);}['focus'](_0x291896){-0x1===_0x291896?this[_0x4722('0x1d')]['focusLast']():this[_0x4722('0x1d')][_0x4722('0x6')]();}}
|
|
@@ -1,41 +1,54 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
-
*/
|
|
5
|
-
/**
|
|
6
|
-
* @module ai/ui/aiformtoolbarview
|
|
7
|
-
*/
|
|
8
|
-
import type { Locale } from 'ckeditor5/src/utils';
|
|
9
|
-
import { ToolbarView, ButtonView } from 'ckeditor5/src/ui';
|
|
10
|
-
/**
|
|
11
|
-
*
|
|
12
|
-
*/
|
|
13
|
-
export
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
*
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @module ai/ui/aiformtoolbarview
|
|
7
|
+
*/
|
|
8
|
+
import type { Locale } from 'ckeditor5/src/utils';
|
|
9
|
+
import { ToolbarView, ButtonView } from 'ckeditor5/src/ui';
|
|
10
|
+
/**
|
|
11
|
+
* The action name affecting the label of {@link ~AIFormToolbarView#replaceButton}.
|
|
12
|
+
*/
|
|
13
|
+
export declare enum AIFormToolbarViewMainActionLabel {
|
|
14
|
+
REPLACE = "replace",
|
|
15
|
+
INSERT = "insert"
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* A class representing the text area view of the AI assistant.
|
|
19
|
+
*/
|
|
20
|
+
export default class AIFormToolbarView extends ToolbarView {
|
|
21
|
+
/**
|
|
22
|
+
* Controls whether the toolbar is visible.
|
|
23
|
+
*
|
|
24
|
+
* @observable
|
|
25
|
+
* @default false
|
|
26
|
+
*/
|
|
27
|
+
isVisible: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* Button that is used to replace the selected content by the generated one.
|
|
30
|
+
*/
|
|
31
|
+
replaceButton: ButtonView;
|
|
32
|
+
/**
|
|
33
|
+
* Button that is used to insert the generated content below the selection.
|
|
34
|
+
*/
|
|
35
|
+
insertButton: ButtonView;
|
|
36
|
+
/**
|
|
37
|
+
* Button that is used to regenerate the response.
|
|
38
|
+
*/
|
|
39
|
+
tryAgainButton: ButtonView;
|
|
40
|
+
/**
|
|
41
|
+
* Button that is used to stop the processing of the request.
|
|
42
|
+
*/
|
|
43
|
+
stopButton: ButtonView;
|
|
44
|
+
/**
|
|
45
|
+
* The action name affecting the label of {@link #replaceButton}.
|
|
46
|
+
*
|
|
47
|
+
* @default 'replace'
|
|
48
|
+
*/
|
|
49
|
+
mainAction: AIFormToolbarViewMainActionLabel;
|
|
50
|
+
/**
|
|
51
|
+
* @inheritDoc
|
|
52
|
+
*/
|
|
53
|
+
constructor(locale: Locale);
|
|
54
|
+
}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x48b2=['Stop','bindTemplate','stopButton','ck-button-action','insertButton','extendTemplate','ck-ai-form__toolbar','_CONTENT','bind','items','addMany','tryAgainButton','replaceButton','REPLACE','mainAction','Insert\x20below','toUpperCase','_createButton','set','INSERT','isVisible','insert'];(function(_0x2a1ae1,_0x48b261){const _0x2eada0=function(_0x49b414){while(--_0x49b414){_0x2a1ae1['push'](_0x2a1ae1['shift']());}};_0x2eada0(++_0x48b261);}(_0x48b2,0x115));const _0x2ead=function(_0x2a1ae1,_0x48b261){_0x2a1ae1=_0x2a1ae1-0x0;let _0x2eada0=_0x48b2[_0x2a1ae1];return _0x2eada0;};import{ToolbarView as _0xa1ba7,ButtonView as _0xb0b868}from'ckeditor5/src/ui';import{getTranslation as _0x4290d4}from'../../utils/common-translations';export var AIFormToolbarViewMainActionLabel;!function(_0x505ae7){_0x505ae7[_0x2ead('0x0')]='replace',_0x505ae7[_0x2ead('0x6')]=_0x2ead('0x8');}(AIFormToolbarViewMainActionLabel||(AIFormToolbarViewMainActionLabel={}));export default class ti extends _0xa1ba7{constructor(_0x2251e4){super(_0x2251e4),this[_0x2ead('0x5')]('isVisible',!0x1),this[_0x2ead('0x5')]('mainAction',AIFormToolbarViewMainActionLabel[_0x2ead('0x0')]),this[_0x2ead('0x15')]=this[_0x2ead('0x4')]('',_0x2ead('0xc')),this[_0x2ead('0x15')][_0x2ead('0x11')]('label')['to'](this,_0x2ead('0x1'),_0x4ae650=>_0x4290d4(_0x2251e4,'AI_'+_0x4ae650[_0x2ead('0x3')]()+_0x2ead('0x10'))),this[_0x2ead('0xd')]=this['_createButton'](_0x4290d4(_0x2251e4,_0x2ead('0x2'))),this[_0x2ead('0x14')]=this[_0x2ead('0x4')](_0x4290d4(_0x2251e4,'Try\x20again')),this[_0x2ead('0xb')]=this[_0x2ead('0x4')](_0x4290d4(_0x2251e4,_0x2ead('0x9')));const _0x4d8159=this[_0x2ead('0xa')];this[_0x2ead('0xe')]({'attributes':{'class':[_0x2ead('0xf'),_0x4d8159['if'](_0x2ead('0x7'),'ck-hidden',_0x3b1991=>!_0x3b1991)]}}),this[_0x2ead('0x12')][_0x2ead('0x13')]([this[_0x2ead('0x15')],this['insertButton'],this[_0x2ead('0x14')],this['stopButton']]);}[_0x2ead('0x4')](_0x1422c8,_0x5a39de){const _0x526411=new _0xb0b868(this['locale']);return _0x526411[_0x2ead('0x5')]({'label':_0x1422c8,'class':_0x5a39de||'','isVisible':!0x0,'withText':!0x0}),_0x526411;}}
|
|
@@ -1,131 +1,142 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
-
*/
|
|
5
|
-
/**
|
|
6
|
-
* @module ai/ui/aiformview
|
|
7
|
-
*/
|
|
8
|
-
import { FocusTracker, KeystrokeHandler, type Locale } from 'ckeditor5/src/utils';
|
|
9
|
-
import { View, FormHeaderView } from 'ckeditor5/src/ui';
|
|
10
|
-
import AIFormToolbarView from './aiformtoolbarview';
|
|
11
|
-
import AIFormContentArea from './aiformcontentarea';
|
|
12
|
-
import AIFormErrorView from './aiformerrorview';
|
|
13
|
-
import AIFormPromptView from './aiformpromptview';
|
|
14
|
-
/**
|
|
15
|
-
* A class representing the form view of the AI assistant.
|
|
16
|
-
*/
|
|
17
|
-
export default class AIFormView extends View {
|
|
18
|
-
/**
|
|
19
|
-
* Tracks information about the DOM focus in the form.
|
|
20
|
-
*
|
|
21
|
-
* @readonly
|
|
22
|
-
*/
|
|
23
|
-
focusTracker: FocusTracker;
|
|
24
|
-
/**
|
|
25
|
-
* An instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}.
|
|
26
|
-
*
|
|
27
|
-
* @readonly
|
|
28
|
-
*/
|
|
29
|
-
keystrokes: KeystrokeHandler;
|
|
30
|
-
/**
|
|
31
|
-
* The view that represent the header of the form.
|
|
32
|
-
*/
|
|
33
|
-
header: FormHeaderView;
|
|
34
|
-
/**
|
|
35
|
-
* The text area view that is used to display AI response.
|
|
36
|
-
*/
|
|
37
|
-
contentArea: AIFormContentArea;
|
|
38
|
-
/**
|
|
39
|
-
* Toolbar view containing button views that manage the AI response and this form itself.
|
|
40
|
-
*/
|
|
41
|
-
toolbar: AIFormToolbarView;
|
|
42
|
-
/**
|
|
43
|
-
* The component used for handling the user's query, including history and submit buttons.
|
|
44
|
-
*/
|
|
45
|
-
promptView: AIFormPromptView;
|
|
46
|
-
/**
|
|
47
|
-
* View that is used to display the error message.
|
|
48
|
-
*/
|
|
49
|
-
errorView: AIFormErrorView;
|
|
50
|
-
/**
|
|
51
|
-
* The prompt text can be configured either during construction when the AI command has been selected,
|
|
52
|
-
* or later by submitting the {@link #labeledInput}, if it hasn't been previously initialized.
|
|
53
|
-
* After setting this value the AI request is triggered.
|
|
54
|
-
*/
|
|
55
|
-
prompt: string;
|
|
56
|
-
/**
|
|
57
|
-
* The value that is generated after user submitting the user prompt.
|
|
58
|
-
*/
|
|
59
|
-
value: string;
|
|
60
|
-
/**
|
|
61
|
-
* Flag that indicates if the AI assistant form view is enabled or disabled.
|
|
62
|
-
*
|
|
63
|
-
* If it is disabled, all interactive elements of this view are disabled as well.
|
|
64
|
-
*/
|
|
65
|
-
isEnabled: boolean;
|
|
66
|
-
/**
|
|
67
|
-
* Indicates if the AI request is processing.
|
|
68
|
-
*/
|
|
69
|
-
isProcessing: boolean;
|
|
70
|
-
/**
|
|
71
|
-
* Indicates if the AI request failed.
|
|
72
|
-
*/
|
|
73
|
-
isError: boolean;
|
|
74
|
-
/**
|
|
75
|
-
*
|
|
76
|
-
*
|
|
77
|
-
* @
|
|
78
|
-
*
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
*
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
*
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
*
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
*
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @module ai/ui/aiformview
|
|
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';
|
|
14
|
+
/**
|
|
15
|
+
* A class representing the form view of the AI assistant.
|
|
16
|
+
*/
|
|
17
|
+
export default class AIFormView extends View {
|
|
18
|
+
/**
|
|
19
|
+
* Tracks information about the DOM focus in the form.
|
|
20
|
+
*
|
|
21
|
+
* @readonly
|
|
22
|
+
*/
|
|
23
|
+
focusTracker: FocusTracker;
|
|
24
|
+
/**
|
|
25
|
+
* An instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}.
|
|
26
|
+
*
|
|
27
|
+
* @readonly
|
|
28
|
+
*/
|
|
29
|
+
keystrokes: KeystrokeHandler;
|
|
30
|
+
/**
|
|
31
|
+
* The view that represent the header of the form.
|
|
32
|
+
*/
|
|
33
|
+
header: FormHeaderView;
|
|
34
|
+
/**
|
|
35
|
+
* The text area view that is used to display AI response.
|
|
36
|
+
*/
|
|
37
|
+
contentArea: AIFormContentArea;
|
|
38
|
+
/**
|
|
39
|
+
* Toolbar view containing button views that manage the AI response and this form itself.
|
|
40
|
+
*/
|
|
41
|
+
toolbar: AIFormToolbarView;
|
|
42
|
+
/**
|
|
43
|
+
* The component used for handling the user's query, including history and submit buttons.
|
|
44
|
+
*/
|
|
45
|
+
promptView: AIFormPromptView;
|
|
46
|
+
/**
|
|
47
|
+
* View that is used to display the error message.
|
|
48
|
+
*/
|
|
49
|
+
errorView: AIFormErrorView;
|
|
50
|
+
/**
|
|
51
|
+
* The prompt text can be configured either during construction when the AI command has been selected,
|
|
52
|
+
* or later by submitting the {@link #labeledInput}, if it hasn't been previously initialized.
|
|
53
|
+
* After setting this value the AI request is triggered.
|
|
54
|
+
*/
|
|
55
|
+
prompt: string;
|
|
56
|
+
/**
|
|
57
|
+
* The value that is generated after user submitting the user prompt.
|
|
58
|
+
*/
|
|
59
|
+
value: string;
|
|
60
|
+
/**
|
|
61
|
+
* Flag that indicates if the AI assistant form view is enabled or disabled.
|
|
62
|
+
*
|
|
63
|
+
* If it is disabled, all interactive elements of this view are disabled as well.
|
|
64
|
+
*/
|
|
65
|
+
isEnabled: boolean;
|
|
66
|
+
/**
|
|
67
|
+
* Indicates if the AI request is processing.
|
|
68
|
+
*/
|
|
69
|
+
isProcessing: boolean;
|
|
70
|
+
/**
|
|
71
|
+
* Indicates if the AI request failed.
|
|
72
|
+
*/
|
|
73
|
+
isError: boolean;
|
|
74
|
+
/**
|
|
75
|
+
* The action name for the main insertion button in the {@link #toolbar}.
|
|
76
|
+
*
|
|
77
|
+
* See {@link module:ai/ui/aiformtoolbarview~AIFormToolbarView#replaceButton}.
|
|
78
|
+
*
|
|
79
|
+
* @default 'replace'
|
|
80
|
+
*/
|
|
81
|
+
mainAction: AIFormToolbarViewMainActionLabel;
|
|
82
|
+
/**
|
|
83
|
+
* Creates an instance of the {@link module:ai/ui/aiformview~AIFormView} class.
|
|
84
|
+
*
|
|
85
|
+
* @param locale The localization services instance.
|
|
86
|
+
*/
|
|
87
|
+
constructor(locale: Locale, uiClasses: string, contentAreaCssClass?: string);
|
|
88
|
+
/**
|
|
89
|
+
* @inheritDoc
|
|
90
|
+
*/
|
|
91
|
+
render(): void;
|
|
92
|
+
focus(): void;
|
|
93
|
+
/**
|
|
94
|
+
* Resets the form to the initial values.
|
|
95
|
+
*/
|
|
96
|
+
reset(): void;
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Fired when a user performed an action that should lead to replace the current selection by generated content.
|
|
100
|
+
*
|
|
101
|
+
* @eventName ~AIFormView#replaceContent
|
|
102
|
+
*/
|
|
103
|
+
export type ReplaceContentEvent = {
|
|
104
|
+
name: 'replaceContent';
|
|
105
|
+
args: [];
|
|
106
|
+
};
|
|
107
|
+
/**
|
|
108
|
+
* Fired when a user performed an action that should lead to insert generated content below the current selection.
|
|
109
|
+
*
|
|
110
|
+
* @eventName ~AIFormView#insertContentBelow
|
|
111
|
+
*/
|
|
112
|
+
export type InsertContentBelowEvent = {
|
|
113
|
+
name: 'insertContentBelow';
|
|
114
|
+
args: [];
|
|
115
|
+
};
|
|
116
|
+
/**
|
|
117
|
+
* Fired when a user performed an action that should lead to retry the previous request to AI.
|
|
118
|
+
*
|
|
119
|
+
* @eventName ~AIFormView#tryAgainEvent
|
|
120
|
+
*/
|
|
121
|
+
export type TryAgainEvent = {
|
|
122
|
+
name: 'tryAgainEvent';
|
|
123
|
+
args: [];
|
|
124
|
+
};
|
|
125
|
+
/**
|
|
126
|
+
* Fired when a user performed an action that should lead to stop the processing of AI.
|
|
127
|
+
*
|
|
128
|
+
* @eventName ~AIFormView#stopProcessing
|
|
129
|
+
*/
|
|
130
|
+
export type StopProcessingEvent = {
|
|
131
|
+
name: 'stopProcessing';
|
|
132
|
+
args: [];
|
|
133
|
+
};
|
|
134
|
+
/**
|
|
135
|
+
* Fired when a user performed an action that should lead to ask AI.
|
|
136
|
+
*
|
|
137
|
+
* @eventName ~AIFormView#submitPrompt
|
|
138
|
+
*/
|
|
139
|
+
export type SubmitPromptEvent = {
|
|
140
|
+
name: 'submitPrompt';
|
|
141
|
+
args: [prompt: string];
|
|
142
|
+
};
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x1432=['backwardCycle','clear','_focusCycler','tryAgainButton','focus','_promptHistory','focusCycler','ck-ai-form-content','submit','stopProcessing','reset','listenTo','isProcessing','replaceContent','focusFirst','value','createCollection','execute','copyButtonView','finishProcessing','replaceButton','clearHistory','Ask\x20AI\x20to\x20edit\x20or\x20generate','focusPrevious','fire','stop','tryAgainEvent','tab','promptView','div','ck-ai-form','search','focusTracker','submitPrompt','REPLACE','toolbar','errorView','Ask\x20AI\x20and\x20your\x20prompts\x20will\x20be\x20listed\x20here\x20for\x20you\x20to\x20use\x20later.','mainAction','bindTo','ck-hidden','keystrokes','text','isEnabled','Empty\x20history','insertButton','locale','contentArea','element','handleError','queryView','_createPromptView','historyGroupView','setTemplate','render','_createToolbar','items','isError','header','add','_focusables','shift\x20+\x20tab','isVisible','set','trim','delegate','bind','startProcessing','stopButton','prompt','label'];(function(_0x35f6bf,_0x14322a){const _0x2e8e51=function(_0x19751b){while(--_0x19751b){_0x35f6bf['push'](_0x35f6bf['shift']());}};_0x2e8e51(++_0x14322a);}(_0x1432,0x146));const _0x2e8e=function(_0x35f6bf,_0x14322a){_0x35f6bf=_0x35f6bf-0x0;let _0x2e8e51=_0x1432[_0x35f6bf];return _0x2e8e51;};import{FocusTracker as _0x38f336,KeystrokeHandler as _0x57545c}from'ckeditor5/src/utils';import{View as _0x20c254,FocusCycler as _0x16f9b8,createLabeledTextarea as _0x46d577,FormHeaderView as _0x5f1b03}from'ckeditor5/src/ui';import _0x43b247,{AIFormToolbarViewMainActionLabel as _0x50a861}from'./aiformtoolbarview';import _0x2ca7d4 from'./aiformcontentarea';import _0x9afdb8 from'./aiformerrorview';import _0x3dc9a4 from'./aiformpromptview';import _0x28264f from'./aihistorylistview';import _0x467837 from'./aihistorylistitemview';import _0x5559e9 from'./prompthistory';import{getTranslation as _0x5b3276}from'../../utils/common-translations';import{escape as _0x4b01a5}from'lodash-es';import _0x417305 from'../../../theme/icons/robot-pencil.svg';export default class v extends _0x20c254{constructor(_0x13c276,_0x449b60,_0x43b598=''){super(_0x13c276),this[_0x2e8e('0x15')](_0x2e8e('0x1'),!0x0),this[_0x2e8e('0x15')]('isProcessing',!0x1),this[_0x2e8e('0x15')]('prompt',''),this['set']('value',''),this[_0x2e8e('0x15')](_0x2e8e('0xf'),!0x1),this['set'](_0x2e8e('0x43'),_0x50a861[_0x2e8e('0x3f')]),this['_promptHistory']=new _0x5559e9(),this[_0x2e8e('0x41')]=new _0x9afdb8(_0x13c276),this['header']=new _0x5f1b03(_0x13c276,{'label':_0x5b3276(_0x13c276,'AI\x20Assistant'),'icon':_0x417305}),this[_0x2e8e('0x5')]=new _0x2ca7d4(_0x13c276,_0x43b598),this[_0x2e8e('0x5')][_0x2e8e('0x18')](_0x2e8e('0x29'))['to'](this),this[_0x2e8e('0x5')][_0x2e8e('0x18')](_0x2e8e('0x2c'))['to'](this),this[_0x2e8e('0x40')]=this[_0x2e8e('0xd')](),this['toolbar'][_0x2e8e('0x18')](_0x2e8e('0x43'))['to'](this),this['promptView']=this[_0x2e8e('0x9')](),this[_0x2e8e('0x3d')]=new _0x38f336(),this[_0x2e8e('0x46')]=new _0x57545c(),this[_0x2e8e('0x12')]=this[_0x2e8e('0x2d')]([this[_0x2e8e('0x5')],this[_0x2e8e('0x5')][_0x2e8e('0x2f')],this['toolbar'],this[_0x2e8e('0x39')]]),this[_0x2e8e('0x1f')]=new _0x16f9b8({'focusables':this['_focusables'],'focusTracker':this[_0x2e8e('0x3d')],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':_0x2e8e('0x13'),'focusNext':_0x2e8e('0x38')}}),this['promptView']['focusCycler']['on']('forwardCycle',_0x52c668=>{this[_0x2e8e('0x1f')]['focusNext'](),_0x52c668['stop']();}),this[_0x2e8e('0x39')][_0x2e8e('0x23')]['on'](_0x2e8e('0x1d'),_0x103cef=>{this['_focusCycler'][_0x2e8e('0x34')](),_0x103cef[_0x2e8e('0x36')]();}),this[_0x2e8e('0x39')][_0x2e8e('0x8')]['fieldView'][_0x2e8e('0x18')](_0x2e8e('0x2c'))['to'](this,_0x2e8e('0x1b'));const _0x550057=this['bindTemplate'];this[_0x2e8e('0xb')]({'tag':_0x2e8e('0x3a'),'attributes':{'class':['ck',_0x2e8e('0x3b'),_0x449b60],'tabindex':'-1'},'children':[this[_0x2e8e('0x10')],{'tag':'div','attributes':{'class':['ck',_0x2e8e('0x24')]},'children':[{'tag':_0x2e8e('0x3a'),'attributes':{'class':[_0x550057['if']('isError',_0x2e8e('0x45'),_0x5d42c1=>!_0x5d42c1)]},'children':[this[_0x2e8e('0x41')]]},this[_0x2e8e('0x5')],this[_0x2e8e('0x40')],this[_0x2e8e('0x39')]]}]});}[_0x2e8e('0xc')](){super[_0x2e8e('0xc')](),this[_0x2e8e('0x3d')][_0x2e8e('0x11')](this['contentArea'][_0x2e8e('0x6')]),this[_0x2e8e('0x3d')][_0x2e8e('0x11')](this[_0x2e8e('0x5')][_0x2e8e('0x2f')]['element']),this[_0x2e8e('0x3d')][_0x2e8e('0x11')](this[_0x2e8e('0x40')]['element']),this[_0x2e8e('0x3d')][_0x2e8e('0x11')](this[_0x2e8e('0x39')]['element']),this['keystrokes']['listenTo'](this[_0x2e8e('0x6')]);}[_0x2e8e('0x21')](){this[_0x2e8e('0x1f')][_0x2e8e('0x2b')]();}[_0x2e8e('0x27')](){this['prompt']='',this['value']='',this[_0x2e8e('0xf')]=!0x1,this[_0x2e8e('0x39')]['reset'](),this['contentArea'][_0x2e8e('0x14')]=!0x1,this[_0x2e8e('0x40')][_0x2e8e('0x14')]=!0x1;}[_0x2e8e('0x9')](){const _0x29fdd4=this[_0x2e8e('0x4')],_0x1bbd3c=new _0x3dc9a4(_0x29fdd4,{'queryView':{'label':_0x5b3276(_0x29fdd4,_0x2e8e('0x33')),'creator':_0x46d577,'showIcon':!0x1,'showResetButton':!0x1},'infoView':{'text':{'noSearchableItems':{'primary':_0x5b3276(_0x29fdd4,_0x2e8e('0x2')),'secondary':_0x5b3276(_0x29fdd4,_0x2e8e('0x42'))}}},'filteredView':this['_createHistoryView'](),'queryMinChars':0x1/0x0,'resetOnBlur':!0x1});return _0x1bbd3c['bind']('isEnabled')['to'](this,_0x2e8e('0x1'),this,_0x2e8e('0x29'),(_0x5a1579,_0x43d480)=>_0x5a1579&&!_0x43d480),this[_0x2e8e('0x28')](_0x1bbd3c,_0x2e8e('0x25'),(_0x47a9e8,_0x30f37f)=>{this[_0x2e8e('0x1b')]=_0x30f37f;const _0x5994e3=_0x4b01a5(_0x30f37f);this[_0x2e8e('0x35')](_0x2e8e('0x3e'),_0x5994e3),_0x30f37f[_0x2e8e('0x16')]()&&this[_0x2e8e('0x22')][_0x2e8e('0x11')]({'prompt':_0x5994e3},0x0);},{'priority':'high'}),_0x1bbd3c;}['_createHistoryView'](){const _0x4e553a=new _0x28264f(this[_0x2e8e('0x4')]);return _0x4e553a[_0x2e8e('0xa')][_0x2e8e('0xe')][_0x2e8e('0x44')](this[_0x2e8e('0x22')])['as'](_0x467837),_0x4e553a['on'](_0x2e8e('0x32'),()=>{this[_0x2e8e('0x22')][_0x2e8e('0x1e')](),this['promptView'][_0x2e8e('0x3c')](''),this['promptView'][_0x2e8e('0x21')]();}),_0x4e553a;}[_0x2e8e('0xd')](){const _0x2aacde=new _0x43b247(this[_0x2e8e('0x4')]);return _0x2aacde['replaceButton'][_0x2e8e('0x18')](_0x2e8e('0x1'))['to'](this,_0x2e8e('0x1'),this,_0x2e8e('0x29'),this,_0x2e8e('0x2c'),(_0x9c7b20,_0x548fd2,_0x2b93bd)=>_0x9c7b20&&!_0x548fd2&&!!_0x2b93bd),_0x2aacde[_0x2e8e('0x31')][_0x2e8e('0x17')](_0x2e8e('0x2e'))['to'](this,_0x2e8e('0x2a')),_0x2aacde['insertButton'][_0x2e8e('0x18')]('isEnabled')['to'](this,'isEnabled',this,_0x2e8e('0x29'),this,'value',(_0x5e0aec,_0x568c11,_0x553bac)=>_0x5e0aec&&!_0x568c11&&!!_0x553bac),_0x2aacde[_0x2e8e('0x3')][_0x2e8e('0x17')](_0x2e8e('0x2e'))['to'](this,'insertContentBelow'),_0x2aacde[_0x2e8e('0x20')][_0x2e8e('0x18')](_0x2e8e('0x1'))['to'](this,'isEnabled',this,_0x2e8e('0x29'),(_0x473b09,_0x59663f)=>_0x473b09&&!_0x59663f),_0x2aacde[_0x2e8e('0x20')][_0x2e8e('0x17')]('execute')['to'](this,_0x2e8e('0x37')),_0x2aacde[_0x2e8e('0x1a')]['bind'](_0x2e8e('0x1'))['to'](this,_0x2e8e('0x29')),_0x2aacde['stopButton'][_0x2e8e('0x17')]('execute')['to'](this,_0x2e8e('0x26')),_0x2aacde;}[_0x2e8e('0x19')](){this[_0x2e8e('0x2c')]='',this[_0x2e8e('0xf')]=!0x1,this[_0x2e8e('0x29')]=!0x0,this['contentArea'][_0x2e8e('0x14')]=!0x0,this[_0x2e8e('0x40')][_0x2e8e('0x14')]=!0x0,this[_0x2e8e('0x5')][_0x2e8e('0x21')]();}[_0x2e8e('0x30')](){const _0x3e2a89=this['locale'];this[_0x2e8e('0x29')]=!0x1,this[_0x2e8e('0x1b')]='',this[_0x2e8e('0x39')][_0x2e8e('0x27')](),this[_0x2e8e('0x2c')]&&(this[_0x2e8e('0x39')][_0x2e8e('0x8')][_0x2e8e('0x1c')]=_0x5b3276(_0x3e2a89,'Ask\x20AI\x20to\x20improve\x20generated\x20text'));}[_0x2e8e('0x7')](_0xe23341){const _0x124401=this[_0x2e8e('0x4')];this[_0x2e8e('0x30')](),this['isError']=!0x0,this[_0x2e8e('0x41')][_0x2e8e('0x0')]=_0xe23341||_0x5b3276(_0x124401,'AI_ERROR_FAILED'),this[_0x2e8e('0x2c')]||(this[_0x2e8e('0x5')][_0x2e8e('0x14')]=!0x1);}}
|