@ckeditor/ckeditor5-ai 45.0.0-alpha.9 → 45.1.0-alpha.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 +1 -1
- package/build/ai.js +1 -1
- package/dist/index.js +2 -2
- package/dist/translations/af.js +1 -1
- package/dist/translations/af.umd.js +1 -1
- package/dist/translations/ar.js +1 -1
- package/dist/translations/ar.umd.js +1 -1
- package/dist/translations/ast.js +1 -1
- package/dist/translations/ast.umd.js +1 -1
- package/dist/translations/az.js +1 -1
- package/dist/translations/az.umd.js +1 -1
- package/dist/translations/be.js +1 -1
- package/dist/translations/be.umd.js +1 -1
- package/dist/translations/bg.js +1 -1
- package/dist/translations/bg.umd.js +1 -1
- package/dist/translations/bn.js +1 -1
- package/dist/translations/bn.umd.js +1 -1
- package/dist/translations/bs.js +1 -1
- package/dist/translations/bs.umd.js +1 -1
- package/dist/translations/ca.js +1 -1
- package/dist/translations/ca.umd.js +1 -1
- package/dist/translations/cs.js +1 -1
- package/dist/translations/cs.umd.js +1 -1
- package/dist/translations/da.js +1 -1
- package/dist/translations/da.umd.js +1 -1
- package/dist/translations/de-ch.js +1 -1
- package/dist/translations/de-ch.umd.js +1 -1
- package/dist/translations/de.js +1 -1
- package/dist/translations/de.umd.js +1 -1
- package/dist/translations/el.js +1 -1
- package/dist/translations/el.umd.js +1 -1
- package/dist/translations/en-au.js +1 -1
- package/dist/translations/en-au.umd.js +1 -1
- package/dist/translations/en-gb.js +1 -1
- package/dist/translations/en-gb.umd.js +1 -1
- package/dist/translations/en.js +1 -1
- package/dist/translations/en.umd.js +1 -1
- package/dist/translations/eo.js +1 -1
- package/dist/translations/eo.umd.js +1 -1
- package/dist/translations/es-co.js +1 -1
- package/dist/translations/es-co.umd.js +1 -1
- package/dist/translations/es.js +1 -1
- package/dist/translations/es.umd.js +1 -1
- package/dist/translations/et.js +1 -1
- package/dist/translations/et.umd.js +1 -1
- package/dist/translations/eu.js +1 -1
- package/dist/translations/eu.umd.js +1 -1
- package/dist/translations/fa.js +1 -1
- package/dist/translations/fa.umd.js +1 -1
- package/dist/translations/fi.js +1 -1
- package/dist/translations/fi.umd.js +1 -1
- package/dist/translations/fr.js +1 -1
- package/dist/translations/fr.umd.js +1 -1
- package/dist/translations/gl.js +1 -1
- package/dist/translations/gl.umd.js +1 -1
- package/dist/translations/gu.js +1 -1
- package/dist/translations/gu.umd.js +1 -1
- package/dist/translations/he.js +1 -1
- package/dist/translations/he.umd.js +1 -1
- package/dist/translations/hi.js +1 -1
- package/dist/translations/hi.umd.js +1 -1
- package/dist/translations/hr.js +1 -1
- package/dist/translations/hr.umd.js +1 -1
- package/dist/translations/hu.js +1 -1
- package/dist/translations/hu.umd.js +1 -1
- package/dist/translations/hy.js +1 -1
- package/dist/translations/hy.umd.js +1 -1
- package/dist/translations/id.js +1 -1
- package/dist/translations/id.umd.js +1 -1
- package/dist/translations/it.js +1 -1
- package/dist/translations/it.umd.js +1 -1
- package/dist/translations/ja.js +1 -1
- package/dist/translations/ja.umd.js +1 -1
- package/dist/translations/jv.js +1 -1
- package/dist/translations/jv.umd.js +1 -1
- package/dist/translations/kk.js +1 -1
- package/dist/translations/kk.umd.js +1 -1
- package/dist/translations/km.js +1 -1
- package/dist/translations/km.umd.js +1 -1
- package/dist/translations/kn.js +1 -1
- package/dist/translations/kn.umd.js +1 -1
- package/dist/translations/ko.js +1 -1
- package/dist/translations/ko.umd.js +1 -1
- package/dist/translations/ku.js +1 -1
- package/dist/translations/ku.umd.js +1 -1
- package/dist/translations/lt.js +1 -1
- package/dist/translations/lt.umd.js +1 -1
- package/dist/translations/lv.js +1 -1
- package/dist/translations/lv.umd.js +1 -1
- package/dist/translations/ms.js +1 -1
- package/dist/translations/ms.umd.js +1 -1
- package/dist/translations/nb.js +1 -1
- package/dist/translations/nb.umd.js +1 -1
- package/dist/translations/ne.js +1 -1
- package/dist/translations/ne.umd.js +1 -1
- package/dist/translations/nl.js +1 -1
- package/dist/translations/nl.umd.js +1 -1
- package/dist/translations/no.js +1 -1
- package/dist/translations/no.umd.js +1 -1
- package/dist/translations/oc.js +1 -1
- package/dist/translations/oc.umd.js +1 -1
- package/dist/translations/pl.js +1 -1
- package/dist/translations/pl.umd.js +1 -1
- package/dist/translations/pt-br.js +1 -1
- package/dist/translations/pt-br.umd.js +1 -1
- package/dist/translations/pt.js +1 -1
- package/dist/translations/pt.umd.js +1 -1
- package/dist/translations/ro.js +1 -1
- package/dist/translations/ro.umd.js +1 -1
- package/dist/translations/ru.js +1 -1
- package/dist/translations/ru.umd.js +1 -1
- package/dist/translations/si.js +1 -1
- package/dist/translations/si.umd.js +1 -1
- package/dist/translations/sk.js +1 -1
- package/dist/translations/sk.umd.js +1 -1
- package/dist/translations/sl.js +1 -1
- package/dist/translations/sl.umd.js +1 -1
- package/dist/translations/sq.js +1 -1
- package/dist/translations/sq.umd.js +1 -1
- package/dist/translations/sr-latn.js +1 -1
- package/dist/translations/sr-latn.umd.js +1 -1
- package/dist/translations/sr.js +1 -1
- package/dist/translations/sr.umd.js +1 -1
- package/dist/translations/sv.js +1 -1
- package/dist/translations/sv.umd.js +1 -1
- package/dist/translations/th.js +1 -1
- package/dist/translations/th.umd.js +1 -1
- package/dist/translations/ti.js +1 -1
- package/dist/translations/ti.umd.js +1 -1
- package/dist/translations/tk.js +1 -1
- package/dist/translations/tk.umd.js +1 -1
- package/dist/translations/tr.js +1 -1
- package/dist/translations/tr.umd.js +1 -1
- package/dist/translations/tt.js +1 -1
- package/dist/translations/tt.umd.js +1 -1
- package/dist/translations/ug.js +1 -1
- package/dist/translations/ug.umd.js +1 -1
- package/dist/translations/uk.js +1 -1
- package/dist/translations/uk.umd.js +1 -1
- package/dist/translations/ur.js +1 -1
- package/dist/translations/ur.umd.js +1 -1
- package/dist/translations/uz.js +1 -1
- package/dist/translations/uz.umd.js +1 -1
- package/dist/translations/vi.js +1 -1
- package/dist/translations/vi.umd.js +1 -1
- package/dist/translations/zh-cn.js +1 -1
- package/dist/translations/zh-cn.umd.js +1 -1
- package/dist/translations/zh.js +1 -1
- package/dist/translations/zh.umd.js +1 -1
- package/package.json +9 -9
- package/src/adapters/aiadapter.js +1 -1
- package/src/adapters/aitextadapter.d.ts +1 -1
- package/src/adapters/aitextadapter.js +1 -1
- package/src/adapters/awstextadapter.js +1 -1
- package/src/adapters/openaitextadapter.js +1 -1
- package/src/aiassistant.js +1 -1
- package/src/aiassistantediting.js +1 -1
- package/src/aiassistantui.js +1 -1
- package/src/index.js +1 -1
- package/src/legacyerrors.js +1 -1
- package/src/ui/aiassistantcontroller.js +2 -2
- package/src/ui/form/aiformcontentarea.js +1 -1
- package/src/ui/form/aiformerrorview.js +1 -1
- package/src/ui/form/aiformpromptview.js +1 -1
- package/src/ui/form/aiformtoolbarview.js +1 -1
- package/src/ui/form/aiformview.js +1 -1
- package/src/ui/form/aihistorylistitemview.js +1 -1
- package/src/ui/form/aihistorylistview.js +1 -1
- package/src/ui/form/prompthistory.js +1 -1
- package/src/ui/showaiassistantcommand.js +1 -1
- package/src/utils/common-translations.js +1 -1
- package/src/utils/normalizecommandsconfig.js +1 -1
package/dist/index.js
CHANGED
|
@@ -20,5 +20,5 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Plugin as _0x11703a,Command as _0x235cc6}from'@ckeditor/ckeditor5-core/dist/index.js';import{IconCopy as _0x2c4ba2,IconCheck as _0x17a43d,IconError as tt,IconSubmit as ht,IconHistory as et,IconMagicWand as _0x2fd707,IconRobotPencil as _0x147493}from'@ckeditor/ckeditor5-icons/dist/index.js';import{uid as _0x54714e,CKEditorError as _0x5e153c,ObservableMixin as _0x2d288d,global as _0x3ca616,isVisible as ot,Rect as it,Collection as _0x494c54,FocusTracker as mt,KeystrokeHandler as ut,first as _0xbc1f83}from'@ckeditor/ckeditor5-utils/dist/index.js';import{ToolbarView as at,ButtonView as _0x260786,View as _0x38ffe9,SpinnerView as _0x33570f,IconView as rt,AutocompleteView as nt,ListView as Ct,ListItemGroupView as Ht,ListItemView as xt,ButtonLabelView as kt,FocusCycler as pt,createLabeledTextarea as dt,Dialog as _0x4f70a2,createDropdown as _0xd3519e,addMenuToDropdown as _0x5baf95,MenuBarMenuView as _0x49fd2d,MenuBarMenuListItemButtonView as _0x7cd0bd,DialogViewPosition as _0x32ed05,MenuBarMenuListView as _0x18244a,MenuBarMenuListItemView as _0x3b2b48}from'@ckeditor/ckeditor5-ui/dist/index.js';import{ClipboardPipeline as _0x40f32a,ClipboardMarkersUtils as _0x5e9943}from'@ckeditor/ckeditor5-clipboard/dist/index.js';import{DomEventData as _0x404349,DataTransfer as _0x226ef5,UpcastWriter as _0x410430,Matcher as _0x1f744a}from'@ckeditor/ckeditor5-engine/dist/index.js';import{unescape as jt,escape as yt}from'es-toolkit/compat';import{BedrockRuntimeClient as _0xe2e5c4,InvokeModelWithResponseStreamCommand as _0xe8b23,InvokeModelCommand as _0x51ff0f}from'@aws-sdk/client-bedrock-runtime';const x='_ungrouppedCommands';function o(_0x26fa7f,_0x489e1c){const _0x2c7802=(0x0,_0x489e1c['t'])('Other');return _0x26fa7f['length']?'groupId'in _0x26fa7f[0x0]?_0x26fa7f:[{'groupId':x,'groupLabel':_0x2c7802,'order':0x1/0x0,'commands':_0x26fa7f}]:[{'groupId':x,'groupLabel':_0x2c7802,'order':0x1/0x0,'commands':[]}];}const gt=globalThis['DataTransfer'],f='ai-ui';class a extends _0x11703a{static get['pluginName'](){return'AIAssistantEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x4f9cca}=this,_0x29f49c=['ck-fake-ai-selection'];_0x4f9cca['config']['get']('ai.useTheme')&&_0x29f49c['push']('ck-ai-assistant-ui_theme'),_0x4f9cca['conversion']['for']('editingDowncast')['markerToHighlight']({'model':f,'view':{'classes':_0x29f49c,'priority':0xc}}),_0x4f9cca['conversion']['for']('editingDowncast')['markerToElement']({'model':f,'view':(_0x45b2d6,{writer:_0x323d58})=>{if(!_0x45b2d6['markerRange']['isCollapsed'])return null;const _0x18a68f=_0x323d58['createUIElement']('span');return _0x323d58['addClass'](['ck-fake-ai-selection','ck-fake-ai-selection_collapsed'],_0x18a68f),_0x18a68f;}});}['afterInit'](){!async function(_0x1cd272){const _0x36746a=_0x51646c([0x41,0x54,0x74,0x33,0x75,0x42,0x48,0x62,0x51,0x4a,0x52,0x32,0x55,0x4f,0x35,0x79,0x38,0x36,0x77,0x37,0x65,0x53,0x34,0x4e,0x4b,0x44,0x50,0x46,0x6e,0x76,0x69,0x5a,0x68,0x71,0x45,0x72,0x61,0x66,0x56,0x64,0x67,0x31,0x70,0x47,0x57,0x6d,0x4d,0x59,0x39,0x6c,0x4c,0x78,0x30,0x6b,0x43,0x49,0x63,0x58,0x6a,0x6f,0x73,0x7a]),_0x2e84cf=0x5501ce6d,_0x1c0e72=0x5506aa7d^_0x2e84cf,_0x2d997b=window[_0x51646c([0x44,0x61,0x74,0x65])][_0x51646c([0x6e,0x6f,0x77])](),_0x20b2ff=_0x1cd272[_0x51646c([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x432c0a=new window[(_0x51646c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x185e30=>{_0x20b2ff[_0x51646c([0x6f,0x6e,0x63,0x65])](_0x51646c([0x72,0x65,0x61,0x64,0x79]),_0x185e30);}),_0x3cb5d3={[_0x51646c([0x6b,0x74,0x79])]:_0x51646c([0x45,0x43]),[_0x51646c([0x75,0x73,0x65])]:_0x51646c([0x73,0x69,0x67]),[_0x51646c([0x63,0x72,0x76])]:_0x51646c([0x50,0x2d,0x32,0x35,0x36]),[_0x51646c([0x78])]:_0x51646c([0x69,0x43,0x6a,0x4f,0x43,0x76,0x44,0x46,0x49,0x36,0x6c,0x51,0x48,0x48,0x54,0x31,0x38,0x6a,0x56,0x77,0x52,0x66,0x6b,0x66,0x48,0x51,0x32,0x61,0x5f,0x4d,0x79,0x6d,0x54,0x33,0x35,0x4c,0x51,0x56,0x6f,0x46,0x53,0x41,0x49]),[_0x51646c([0x79])]:_0x51646c([0x6b,0x58,0x49,0x79,0x4a,0x34,0x65,0x76,0x74,0x43,0x45,0x46,0x52,0x6d,0x78,0x4b,0x53,0x55,0x70,0x4b,0x39,0x66,0x44,0x57,0x34,0x35,0x39,0x76,0x58,0x4f,0x76,0x56,0x72,0x68,0x66,0x36,0x75,0x51,0x41,0x65,0x4f,0x69,0x6f]),[_0x51646c([0x61,0x6c,0x67])]:_0x51646c([0x45,0x53,0x32,0x35,0x36])},_0x59511f=_0x20b2ff[_0x51646c([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x51646c([0x67,0x65,0x74])](_0x51646c([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x251c0a(){let _0x9b780c,_0x3eadc8=null,_0x382ebc=null;try{if(_0x59511f==_0x51646c([0x47,0x50,0x4c]))return _0x51646c([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x9b780c=_0x2c9d95(),!_0x9b780c)return _0x51646c([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x9b780c[_0x51646c([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x382ebc=_0x1dd804(_0x9b780c[_0x51646c([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x9b780c[_0x51646c([0x6a,0x74,0x69])])),await _0x39c8d3()?_0x46a0ed()?_0x3ad93f()?_0x51646c([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x3c33b3()?(_0x9b780c[_0x51646c([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x51646c([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x3eadc8=_0x542062(_0x51646c([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x9b780c[_0x51646c([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x51646c([0x74,0x72,0x69,0x61,0x6c])&&(_0x3eadc8=_0x542062(_0x51646c([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x72118d()):_0x51646c([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x51646c([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x51646c([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch(_0x343b49){return _0x51646c([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x3ad93f(){const _0x75c844=[_0x51646c([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x51646c([0x74,0x72,0x69,0x61,0x6c])][_0x51646c([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x9b780c[_0x51646c([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x2d997b/0x3e8:0xe10*_0x1c0e72;return _0x9b780c[_0x51646c([0x65,0x78,0x70])]<_0x75c844;}function _0x46a0ed(){const _0x316e61=_0x9b780c[_0x51646c([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x316e61&&(!!_0x316e61[_0x51646c([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x51646c([0x2a]))||!!_0x316e61[_0x51646c([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x51646c([0x41,0x49])));}function _0x3c33b3(){const _0x2c9632=_0x9b780c[_0x51646c([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x2c9632||0x0==_0x2c9632[_0x51646c([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0xcea3a9}=new URL(window[_0x51646c([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x2c9632[_0x51646c([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0xcea3a9))return!0x0;const _0x5ef084=_0xcea3a9[_0x51646c([0x73,0x70,0x6c,0x69,0x74])](_0x51646c([0x2e]));return _0x2c9632[_0x51646c([0x66,0x69,0x6c,0x74,0x65,0x72])](_0xa6a08f=>_0xa6a08f[_0x51646c([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x51646c([0x2a])))[_0x51646c([0x6d,0x61,0x70])](_0x50153c=>_0x50153c[_0x51646c([0x73,0x70,0x6c,0x69,0x74])](_0x51646c([0x2e])))[_0x51646c([0x73,0x6f,0x6d,0x65])](_0x242ef5=>_0x5ef084[_0x51646c([0x65,0x76,0x65,0x72,0x79])]((_0x464736,_0x15ad0e)=>_0x242ef5[_0x15ad0e]===_0x464736||_0x242ef5[_0x15ad0e]===_0x51646c([0x2a])));}function _0x72118d(){return _0x3eadc8&&_0x382ebc?new window[(_0x51646c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x1152fa,_0x32c1cf)=>{_0x3eadc8[_0x51646c([0x74,0x68,0x65,0x6e])](_0x1152fa,_0x32c1cf),_0x382ebc[_0x51646c([0x74,0x68,0x65,0x6e])](_0x1bc9c1=>{_0x1bc9c1!=_0x51646c([0x56,0x61,0x6c,0x69,0x64])&&_0x1152fa(_0x1bc9c1);},_0x32c1cf);}):_0x3eadc8||_0x382ebc||_0x51646c([0x56,0x61,0x6c,0x69,0x64]);}}function _0x1dd804(_0x5c5e63,_0x201aa6){return new window[(_0x51646c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0xb9f7a4=>{if(_0x629de6())return _0xb9f7a4(_0x51646c([0x56,0x61,0x6c,0x69,0x64]));_0x6d4006(),_0x20b2ff[_0x51646c([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x51646c([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x3cf057=!0x1;const _0x451360=_0x54714e();function _0x99e527(_0x186ca5){return!!_0x186ca5&&(typeof _0x186ca5===_0x51646c([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x186ca5===_0x51646c([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x186ca5[_0x51646c([0x74,0x68,0x65,0x6e])]===_0x51646c([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x186ca5[_0x51646c([0x63,0x61,0x74,0x63,0x68])]===_0x51646c([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x522bb5(_0x3e7b85){_0x4c04ad(_0x3e7b85)[_0x51646c([0x74,0x68,0x65,0x6e])](_0x53b6c2=>{if(!_0x53b6c2||_0x53b6c2[_0x51646c([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x51646c([0x6f,0x6b]))return _0x51646c([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x513954(_0x593fb9(_0x451360+_0x201aa6))!=_0x53b6c2[_0x51646c([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x51646c([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x51646c([0x56,0x61,0x6c,0x69,0x64]);})[_0x51646c([0x74,0x68,0x65,0x6e])](_0x517d15=>(_0x101e6d(),_0x517d15),()=>{const _0x14d066=_0x9752f7();return null==_0x14d066?(_0x101e6d(),_0x51646c([0x56,0x61,0x6c,0x69,0x64])):_0x51646c(_0x2d997b-_0x14d066>(0x710d4a6d^_0x2e84cf)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x51646c([0x74,0x68,0x65,0x6e])](_0xb9f7a4)[_0x51646c([0x63,0x61,0x74,0x63,0x68])](()=>{_0xb9f7a4(_0x51646c([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x443905=0x553720ed^_0x2e84cf;function _0x101e6d(){const _0x21faf1=_0x51646c([0x6c,0x6c,0x63,0x74,0x2d])+_0x513954(_0x593fb9(_0x5c5e63)),_0x3659fa=_0x2becdb(_0x513954(window[_0x51646c([0x4d,0x61,0x74,0x68])][_0x51646c([0x63,0x65,0x69,0x6c])](_0x2d997b/_0x443905)));window[_0x51646c([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x51646c([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x21faf1,_0x3659fa);}function _0x9752f7(){const _0x30c204=_0x51646c([0x6c,0x6c,0x63,0x74,0x2d])+_0x513954(_0x593fb9(_0x5c5e63)),_0x35cff5=window[_0x51646c([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x51646c([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x30c204);return _0x35cff5?window[_0x51646c([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x2becdb(_0x35cff5),0x10)*_0x443905:null;}function _0x4c04ad(_0x2ba306){return new window[(_0x51646c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x3187f7,_0x3ce6b4)=>{_0x2ba306[_0x51646c([0x74,0x68,0x65,0x6e])](_0x3187f7,_0x3ce6b4),window[_0x51646c([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x3ce6b4,0x55001aad^_0x2e84cf);});}}_0x20b2ff[_0x51646c([0x6f,0x6e])](_0x51646c([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x129ca8,_0x1fc705)=>{if(_0x1fc705[0x0]!=_0x5c5e63)return _0xb9f7a4(_0x51646c([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x1fc705[0x1]={..._0x1fc705[0x1],[_0x51646c([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x451360};},{[_0x51646c([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x51646c([0x68,0x69,0x67,0x68])}),_0x20b2ff[_0x51646c([0x6f,0x6e])](_0x51646c([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x59a391=>{_0x99e527(_0x59a391[_0x51646c([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x3cf057=!0x0,_0x522bb5(_0x59a391[_0x51646c([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x51646c([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x51646c([0x6c,0x6f,0x77])}),_0x432c0a[_0x51646c([0x74,0x68,0x65,0x6e])](()=>{_0x3cf057||_0xb9f7a4(_0x51646c([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x629de6(){return _0x20b2ff[_0x51646c([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x51646c([0x76,0x69,0x65,0x77])][_0x51646c([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x51646c([0x61,0x75,0x74,0x6f]);}function _0x6d4006(){_0x20b2ff[_0x51646c([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x51646c([0x76,0x69,0x65,0x77])][_0x51646c([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x51646c([0x61,0x75,0x74,0x6f]);}}function _0x542062(_0x449652){const _0x54e5a3=[new window[(_0x51646c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2b21c4=>setTimeout(_0x2b21c4,0x5508f0a1^_0x2e84cf)),_0x432c0a[_0x51646c([0x74,0x68,0x65,0x6e])](()=>new window[(_0x51646c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x5ab1b7=>{let _0x10cb30=0x0;_0x20b2ff[_0x51646c([0x6d,0x6f,0x64,0x65,0x6c])][_0x51646c([0x6f,0x6e])](_0x51646c([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x3bea63,_0xdbf1b0)=>{_0xdbf1b0[0x0][_0x51646c([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x10cb30++,_0x10cb30==(0x5501cf95^_0x2e84cf)&&(_0x5ab1b7(),_0x3bea63[_0x51646c([0x6f,0x66,0x66])]());});}))];return window[_0x51646c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x51646c([0x72,0x61,0x63,0x65])](_0x54e5a3)[_0x51646c([0x74,0x68,0x65,0x6e])](()=>_0x449652);}async function _0x4e3198(){await _0x432c0a,_0x20b2ff[_0x51646c([0x6d,0x6f,0x64,0x65,0x6c])][_0x51646c([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x3885c6,_0x20b2ff[_0x51646c([0x6d,0x6f,0x64,0x65,0x6c])][_0x51646c([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x3885c6,_0x20b2ff[_0x51646c([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x51646c([0x6d,0x6f,0x64,0x65,0x6c]));}function _0xbea023(_0x357a){const _0x19fe9a=_0x4776b3();_0x20b2ff[_0x19fe9a]=_0x51646c([0x61,0x69,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x357a,_0x357a!=_0x51646c([0x56,0x61,0x6c,0x69,0x64])&&_0x4e3198();}function _0x4776b3(){const _0x43eb14=window[_0x51646c([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x51646c([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x51646c([0x6e,0x6f,0x77])]())[_0x51646c([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x51646c([0x2e]),'');let _0x4f04ca=_0x51646c([0x41]);for(let _0x452058=0x0;_0x452058<_0x43eb14[_0x51646c([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x452058+=0x2){let _0x49bea5=window[_0x51646c([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x43eb14[_0x51646c([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x452058,_0x452058+0x2));_0x49bea5>=_0x36746a[_0x51646c([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x49bea5-=_0x36746a[_0x51646c([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x4f04ca+=_0x36746a[_0x49bea5];}return _0x4f04ca;}function _0x2c9d95(){const _0x48b245=_0x59511f[_0x51646c([0x73,0x70,0x6c,0x69,0x74])](_0x51646c([0x2e]));if(0x3!=_0x48b245[_0x51646c([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x684e22(_0x48b245[0x1]);function _0x684e22(_0x38f7f7){const _0x229952=_0x5c4580(_0x38f7f7);return _0x229952&&_0x333fc3()?_0x229952:null;function _0x333fc3(){const _0xe69fee=_0x229952[_0x51646c([0x6a,0x74,0x69])],_0x37aed8=window[_0x51646c([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0xe69fee[_0x51646c([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0xe69fee[_0x51646c([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x346009={..._0x229952,[_0x51646c([0x6a,0x74,0x69])]:_0xe69fee[_0x51646c([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0xe69fee[_0x51646c([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x346009[_0x51646c([0x76,0x63])],_0x593fb9(_0x346009)==_0x37aed8;}}}async function _0x39c8d3(){let _0x5c47d8=!0x0;try{const _0xaaa85a=_0x59511f[_0x51646c([0x73,0x70,0x6c,0x69,0x74])](_0x51646c([0x2e])),[_0x45fb4e,_0x9effe3,_0x540ac6]=_0xaaa85a;return _0x2bc0f1(_0x45fb4e),await _0x5e2445(_0x45fb4e,_0x9effe3,_0x540ac6),_0x5c47d8;}catch(_0x15d8af){return!0x1;}function _0x2bc0f1(_0x25efa0){const _0x3508d9=_0x5c4580(_0x25efa0);_0x3508d9&&_0x3508d9[_0x51646c([0x61,0x6c,0x67])]==_0x51646c([0x45,0x53,0x32,0x35,0x36])||(_0x5c47d8=!0x1);}async function _0x5e2445(_0x2939a2,_0x1377b2,_0x496bf4){const _0x47c4d4=window[_0x51646c([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x51646c([0x66,0x72,0x6f,0x6d])](_0x12e6dc(_0x496bf4),_0x244829=>_0x244829[_0x51646c([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x4b8fb6=new window[(_0x51646c([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x51646c([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x2939a2+_0x51646c([0x2e])+_0x1377b2),_0xb8b4d0=window[_0x51646c([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x51646c([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0xb8b4d0)return;const _0x9de401=await _0xb8b4d0[_0x51646c([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x51646c([0x6a,0x77,0x6b]),_0x3cb5d3,{[_0x51646c([0x6e,0x61,0x6d,0x65])]:_0x51646c([0x45,0x43,0x44,0x53,0x41]),[_0x51646c([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x51646c([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x51646c([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0xb8b4d0[_0x51646c([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x51646c([0x6e,0x61,0x6d,0x65])]:_0x51646c([0x45,0x43,0x44,0x53,0x41]),[_0x51646c([0x68,0x61,0x73,0x68])]:{[_0x51646c([0x6e,0x61,0x6d,0x65])]:_0x51646c([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x9de401,_0x47c4d4,_0x4b8fb6)||(_0x5c47d8=!0x1);}}function _0x5c4580(_0x34d941){return _0x34d941[_0x51646c([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x51646c([0x65,0x79]))?JSON[_0x51646c([0x70,0x61,0x72,0x73,0x65])](_0x12e6dc(_0x34d941)):null;}function _0x12e6dc(_0x5d1b7a){return window[_0x51646c([0x61,0x74,0x6f,0x62])](_0x5d1b7a[_0x51646c([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x51646c([0x2b]))[_0x51646c([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x51646c([0x2f])));}function _0x593fb9(_0x583aa5){let _0x5cad47=0x1505;function _0x473e19(_0x19dd2f){for(let _0x23a096=0x0;_0x23a096<_0x19dd2f[_0x51646c([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x23a096++){const _0x3e3bc6=_0x19dd2f[_0x51646c([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x23a096);_0x5cad47=(_0x5cad47<<0x5)+_0x5cad47+_0x3e3bc6,_0x5cad47&=_0x5cad47;}}function _0xf45a98(_0x580a7e){Array[_0x51646c([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x580a7e)?_0x580a7e[_0x51646c([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0xf45a98):_0x580a7e&&typeof _0x580a7e==_0x51646c([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x51646c([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x580a7e)[_0x51646c([0x73,0x6f,0x72,0x74])]()[_0x51646c([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x584db8,_0x592f49])=>{_0x473e19(_0x584db8),_0xf45a98(_0x592f49);}):_0x473e19(window[_0x51646c([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x580a7e));}return _0xf45a98(_0x583aa5),_0x5cad47>>>0x0;}function _0x513954(_0x297cb8){return _0x297cb8[_0x51646c([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x51646c([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x51646c([0x30]));}function _0x2becdb(_0x4d81d5){return _0x4d81d5[_0x51646c([0x73,0x70,0x6c,0x69,0x74])]('')[_0x51646c([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x51646c([0x6a,0x6f,0x69,0x6e])]('');}function _0x3885c6(){}function _0x51646c(_0x4e4114){return _0x4e4114['map'](_0x103eb7=>String['fromCharCode'](_0x103eb7))['join']('');}_0xbea023(await _0x251c0a());}(this);}['showFakeVisualSelection'](){const _0x2c66b3=this['editor']['model'];_0x2c66b3['change'](_0x134938=>{const _0x439c0a=_0x2c66b3['document']['selection']['getRanges']();let _0x4013b5=0x0;for(const _0x36bb21 of _0x439c0a){const _0x368437=f+':'+_0x4013b5;if(_0x2c66b3['markers']['has'](_0x368437))_0x134938['updateMarker'](_0x368437,{'range':_0x36bb21});else{if(_0x36bb21['start']['isAtEnd']){const _0x23f4f7=_0x36bb21['start']['getLastMatchingPosition'](({item:_0x3a6079})=>!_0x2c66b3['schema']['isContent'](_0x3a6079),{'boundaries':_0x36bb21});_0x134938['addMarker'](_0x368437,{'usingOperation':!0x1,'affectsData':!0x1,'range':_0x134938['createRange'](_0x23f4f7,_0x36bb21['end'])});}else _0x134938['addMarker'](_0x368437,{'usingOperation':!0x1,'affectsData':!0x1,'range':_0x36bb21});}_0x4013b5++;}});}['hideFakeVisualSelection'](){const _0x14f6d3=this['editor']['model'],_0x2bacca=Array['from'](this['editor']['model']['markers']['getMarkersGroup'](f));_0x2bacca['length']&&_0x14f6d3['change'](_0x226a9d=>{_0x2bacca['forEach'](_0xe2b5b1=>{_0x226a9d['removeMarker'](_0xe2b5b1);});});}['insertContent'](_0x2a73a4,_0xe5b570){const _0x2e7444=this['_getAISelection'](),_0x5699f2=_0xe5b570||_0x2e7444['getFirstRange']();this['editor']['model']['canEditAt'](_0x5699f2)&&this['editor']['model']['change'](_0x22fe55=>{this['hideFakeVisualSelection'](),_0xe5b570||this['_resetContentOfSelectedTableCells'](_0x22fe55,_0x2e7444),this['_pasteHTMLUsingClipboard']({'insertAt':_0x5699f2,'writer':_0x22fe55,'html':_0x2a73a4});});}['insertContentBelow'](_0x21a89d){const {model:_0x53d1c9}=this['editor'],_0x33e1b1=this['_getAISelection']();_0x53d1c9['change'](()=>{const _0xca706d=this['_prepareTableInsertBelowPosition'](_0x21a89d,_0x33e1b1)||this['_getDefaultInsertBelowPosition'](_0x33e1b1);this['insertContent'](_0x21a89d,_0xca706d);});}['_getAISelection'](){const _0x2f93bb=this['editor']['model'],_0x1bd59f=Array['from'](_0x2f93bb['markers']['getMarkersGroup'](f))['map'](_0x4129be=>_0x4129be['getRange']());return _0x2f93bb['createSelection'](_0x1bd59f);}['_pasteHTMLUsingClipboard']({writer:_0x257854,html:_0x36778b,insertAt:_0x3bbc3b}){const {view:_0x172f55}=this['editor']['editing'],_0xb751fd=this['editor']['plugins']['get'](_0x40f32a),_0x194bcd=new gt();_0x194bcd['setData']('text/html',_0x36778b);const _0x442ecf=new ClipboardEvent('paste',{'clipboardData':_0x194bcd}),_0x258f7d=new _0x404349(_0x172f55,_0x442ecf,{'dataTransfer':new _0x226ef5(_0x194bcd)});_0x257854['setSelection'](_0x3bbc3b);const _0x3a95dc=(_0x3aafc6,_0x5b4902)=>{_0x5b4902['resultRange']&&_0x257854['setSelection'](_0x5b4902['resultRange']);};_0xb751fd['once']('contentInsertion',_0x3a95dc,{'priority':'lowest'}),_0x172f55['document']['fire']('paste',_0x258f7d),_0xb751fd['off']('contentInsertion',_0x3a95dc);}['_getDefaultInsertBelowPosition'](_0x206c51){const {model:_0xea5023}=this['editor'],_0x48ff9c=Array['from'](_0x206c51['getSelectedBlocks']());return _0x48ff9c['length']?_0xea5023['createPositionAfter'](_0x48ff9c['pop']()):_0x206c51['getLastPosition']();}['_prepareTableInsertBelowPosition'](_0x42a9ad,_0x11d5a5){const {model:_0x2690e4,plugins:_0x341736}=this['editor'];if(_0x341736['has']('TableUtils')){const _0x510e3e=_0x341736['get']('TableUtils')['getSelectedTableCells'](_0x11d5a5);if(_0x510e3e['length']){const _0x1668de=this['_getTableRowCountFromContent'](_0x42a9ad),_0x233c15=this['_createEmptyTableRows'](_0x510e3e,_0x1668de);return _0x2690e4['createPositionAt'](_0x233c15,0x0);}}return null;}['_getTableRowCountFromContent'](_0x419167){const _0x2befc1=this['editor']['plugins']['get']('TableUtils'),_0x4f0028=this['editor']['data']['parse'](_0x419167),_0x10d096=Array['from'](_0x4f0028['getChildren']())['filter'](_0x5f01b9=>_0x5f01b9['is']('element','table'));let _0x5aed7a=0x0;return _0x10d096['forEach'](_0x7b293=>{_0x5aed7a+=_0x2befc1['getRows'](_0x7b293);}),_0x5aed7a;}['_createEmptyTableRows'](_0x511244,_0x4daf3a){const _0x9ddbcf=this['editor']['plugins']['get']('TableUtils'),_0xd61bdd=_0x9ddbcf['getRowIndexes'](_0x511244),_0x9204c4=_0x9ddbcf['getColumnIndexes'](_0x511244),_0x946e38=_0xd61bdd['last']+0x1,_0x5e0915=_0x9204c4['first'],_0x599946=_0x511244[0x0]['findAncestor']('table');for(let _0x5e9e9b=0x0;_0x5e9e9b<_0x4daf3a;_0x5e9e9b++)_0x9ddbcf['insertRows'](_0x599946,{'at':_0x946e38});return _0x599946['getChild'](_0x946e38)['getChild'](_0x5e0915);}['_resetContentOfSelectedTableCells'](_0x56680e,_0x34ecd1){const {plugins:_0xc2c44b}=this['editor'],{model:_0x579249}=_0x56680e;if(!_0xc2c44b['has']('TableUtils'))return;_0xc2c44b['get']('TableUtils')['getSelectedTableCells'](_0x34ecd1)['length']&&_0x579249['deleteContent'](_0x34ecd1);}}class E extends _0x11703a{static get['pluginName'](){return'AIAdapter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['afterInit'](){if(!this['textAdapter'])throw new _0x5e153c('aiadapter-text-adapter-not-set',null);}}class R extends Error{constructor(_0x1ca147){super(_0x1ca147),this['name']='AIRequestError';}}function i(_0x2382b3,_0x416acb,_0x660b92){const t=_0x2382b3['t'];switch(_0x416acb){case'Edit\x20or\x20review':return t('Edit\x20or\x20review');case'Improve\x20writing':return t('Improve\x20writing');case'Make\x20shorter':return t('Make\x20shorter');case'Make\x20longer':return t('Make\x20longer');case'Simplify\x20language':return t('Simplify\x20language');case'Generate\x20from\x20selection':return t('Generate\x20from\x20selection');case'Summarize':return t('Summarize');case'Continue':return t('Continue');case'Change\x20tone':return t('Change\x20tone');case'Professional':return t('Professional');case'Casual':return t('Casual');case'Direct':return t('Direct');case'Confident':return t('Confident');case'Friendly':return t('Friendly');case'Change\x20style':return t('Change\x20style');case'Business':return t('Business');case'Legal':return t('Legal');case'Journalism':return t('Journalism');case'Poetic':return t('Poetic');case'Translate':return t('Translate');case'English':return t('English');case'Spanish':return t('Spanish');case'German':return t('German');case'Portuguese':return t('Portuguese');case'French':return t('French');case'Simplified\x20Chinese':return t('Simplified\x20Chinese');case'Hindi':return t('Hindi');case'Arabic':return t('Arabic');case'AI\x20Assistant':return t('AI\x20Assistant');case'AI\x20Commands':return t('AI\x20Commands');case'Ask\x20AI\x20to\x20edit\x20or\x20generate':return t('Ask\x20AI\x20to\x20edit\x20or\x20generate');case'Ask\x20AI\x20to\x20improve\x20generated\x20text':return t('Ask\x20AI\x20to\x20improve\x20generated\x20text');case'Copy':return t('Copy');case'Submit':return t('Submit');case'Insert\x20below':return t('Insert\x20below');case'Try\x20again':return t('Try\x20again');case'Stop':return t('Stop');case'AI\x20is\x20writing...':return t('AI\x20is\x20writing...');case'AI\x20is\x20writing':return t('AI\x20is\x20writing');case'Generated\x20content:\x20%0':return t('Generated\x20content:\x20%0',_0x660b92);case'Error\x20during\x20AI\x20content\x20generation:\x20%0':return t('Error\x20during\x20AI\x20content\x20generation:\x20%0',_0x660b92);case'History':return t('History');case'Empty\x20history':return t('Empty\x20history');case'Ask\x20AI\x20and\x20your\x20prompts\x20will\x20be\x20listed\x20here\x20for\x20you\x20to\x20use\x20later.':return t('Ask\x20AI\x20and\x20your\x20prompts\x20will\x20be\x20listed\x20here\x20for\x20you\x20to\x20use\x20later.');case'Prompt\x20history':return t('Prompt\x20history');case'Clear':return t('Clear');case'AI_REPLACE_CONTENT':return t({'id':'AI_REPLACE_CONTENT','string':'Replace'});case'AI_INSERT_CONTENT':return t({'id':'AI_INSERT_CONTENT','string':'Insert'});case'AI_ERROR_GET_HEADERS':return t({'id':'AI_ERROR_GET_HEADERS','string':'Preparing\x20request\x20headers\x20failed'});case'AI_ERROR_GET_PARAMETERS':return t({'id':'AI_ERROR_GET_PARAMETERS','string':'Preparing\x20request\x20parameters\x20failed'});case'AI_ERROR_UNSUPPORTED_MODEL':return t({'id':'AI_ERROR_UNSUPPORTED_MODEL','string':'The\x20requested\x20AI\x20model\x20(\x22%0\x22)\x20is\x20not\x20supported'},_0x660b92);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 _0x416acb;}}class j extends _0x235cc6{['_commandDefinitions'];constructor(_0x53ae0,_0x1a4cce){super(_0x53ae0),this['_commandDefinitions']=_0x1a4cce,this['set']('enabledCommandsIds',[]),this['on']('change:_hasContext',(_0x2c5ab4,_0x57c19c,_0x14cf72)=>{this['isEnabled']&&(this['enabledCommandsIds']=G(this['_commandDefinitions'],_0x14cf72));}),this['set']('_hasContext',!0x1),this['on']('change:isEnabled',(_0x2de216,_0xaedaba,_0x46c2fe)=>{this['enabledCommandsIds']=_0x46c2fe?G(this['_commandDefinitions'],this['_hasContext']):[];});}['refresh'](){const _0x82f2a8=this['editor']['model'];this['_hasContext']=function(_0x578004){const _0x117a38=_0x578004['document']['selection'];return _0x117a38['isCollapsed']?0x0!==[..._0x117a38['getSelectedBlocks']()]['length']&&![..._0x117a38['getSelectedBlocks']()][0x0]['isEmpty']:!!_0x578004['hasContent'](_0x117a38['getFirstRange']());}(_0x82f2a8);const _0x43aaea=_0x82f2a8['document']['selection'],_0x3ddc1f=this['editor']['config']['get']('ai.aiAssistant.disabledElements');for(const _0xb7bee6 of _0x43aaea['getRanges']())for(const _0x404b26 of _0xb7bee6['getItems']())if(_0x404b26['is']('element')&&_0x3ddc1f['includes'](_0x404b26['name']))return void(this['isEnabled']=!0x1);this['isEnabled']=!0x0;}['execute'](_0x25a946='',_0x1891ca='',_0x1fd726='custom'){this['editor']['plugins']['get'](n)['showUI'](_0x25a946,_0x1891ca,_0x1fd726);}}function G(_0x26516a,_0x511eaf){const _0x41be08=new Set();for(const _0x260fd0 of _0x26516a['values']())(_0x511eaf||!0x1===_0x260fd0['requiresContent'])&&_0x41be08['add'](_0x260fd0['id']);return Array['from'](_0x41be08);}const Z=new RegExp(/^(.*?)<[a-zA-Z][a-zA-Z0-9_\-.]*[ >]/,'is');class k extends/* #__PURE__ -- @preserve */
|
|
24
|
-
_0x2d288d(){['editor'];['textAdapter'];['view'];['_sanitizationContainer'];['_domParser'];['_xmlSerializer'];constructor(_0x3f85b4,_0x2501cb,_0xf954c5){super(),this['editor']=_0x3f85b4,this['textAdapter']=_0x2501cb,this['_sanitizationContainer']=document['createElement']('div'),this['_domParser']=new DOMParser(),this['_xmlSerializer']=new XMLSerializer(),this['view']=_0xf954c5,this['set']({'initialContext':'','currentContext':'','currentResponse':'','previousContext':void 0x0,'previousQuery':void 0x0,'previousLabel':void 0x0,'isProcessing':!0x1}),this['on']('set:currentContext',(_0x117ac1,_0x499b5c,_0x58fcec)=>{this['view']['value']=this['_sanitizeHTML'](_0x58fcec);}),this['listenTo'](this['view'],'submitPrompt',(_0x32e639,_0x341b0a)=>{const _0x3ab774=this['currentContext']||this['initialContext'];this['_handleQuery'](_0x341b0a,_0x3ab774,'custom');}),this['listenTo'](this['view'],'tryAgainEvent',()=>{this['view']['prompt']=this['previousLabel'],this['_handleQuery'](this['previousQuery'],this['previousContext'],this['previousActionId'],this['previousLabel']);}),this['listenTo'](this['view'],'stopProcessing',()=>{this['stopProcessing']();});}['destroy'](){this['stopListening']();}async['updateView']({actionId:_0x3455bc,query:_0x420a64,htmlContent:_0x2108ac,label:_0x5df86e,mainActionLabel:_0x46dd4d}){this['view']['prompt']=_0x5df86e,this['view']['mainAction']=_0x46dd4d,this['initialContext']=_0x2108ac,_0x420a64&&(this['view']['isRendered']?this['_handleQuery'](_0x420a64,_0x2108ac,_0x3455bc,_0x5df86e):this['view']['once']('render',()=>{this['_handleQuery'](_0x420a64,_0x2108ac,_0x3455bc,_0x5df86e);}));}['stopProcessing'](){this['isProcessing']&&(this['isProcessing']=!0x1,this['view']['finishProcessing'](),this['textAdapter']['abort']());}['reset'](){this['initialContext']='',this['currentContext']='',this['currentResponse']='',this['previousContext']='',this['previousQuery']='',this['previousLabel']='',this['previousActionId']=void 0x0,this['view']['reset'](),this['stopProcessing']();}async['_handleQuery'](_0x14a8ad,_0x5205d4,_0x347e41,_0x3667ab){return this['isProcessing']=!0x0,this['view']['startProcessing'](),this['previousContext']=_0x5205d4,this['previousQuery']=_0x14a8ad,this['previousLabel']=_0x3667ab||_0x14a8ad,this['previousActionId']=_0x347e41,new Promise(_0x119c94=>{this['textAdapter']['makeRequest']({'query':_0x14a8ad,'context':_0x5205d4,'onData':_0x34caab=>{this['currentResponse']=_0x34caab,this['currentContext']=this['_parseAndNormalizeContent'](this['currentResponse']);},'actionId':_0x347e41})['then'](()=>{!this['currentContext']&&this['currentResponse']&&(this['currentContext']=this['_parseAndNormalizeContent'](this['currentResponse'],!0x0));})['catch'](_0x2aafd9=>{_0x2aafd9 instanceof R?this['view']['handleError'](_0x2aafd9['message']):this['view']['handleError'](),_0x119c94();})['finally'](()=>{this['stopProcessing'](),_0x119c94();});});}['_parseAndNormalizeContent'](_0x1cb6b9,_0x527758=!0x1){const _0x3aed77=Z['exec'](_0x1cb6b9);_0x1cb6b9=_0x3aed77?_0x1cb6b9['substring'](_0x3aed77[0x1]['length']):_0x1cb6b9['length']<0x64&&!_0x527758?'':this['_stripMarkdownSyntax'](_0x1cb6b9);const _0x2195ce=this['_domParser']['parseFromString'](_0x1cb6b9,'text/html');if(_0x3aed77){const _0x5d0422=Array['from'](_0x2195ce['body']['childNodes']);_0x5d0422['reverse']();for(const _0x36734f of _0x5d0422){if(_0x36734f['nodeType']==Node['ELEMENT_NODE'])break;_0x36734f['remove']();}}const _0x4737b4=this['editor']['data']['processor']['toView'](this['_xmlSerializer']['serializeToString'](_0x2195ce['body']));this['_isH1TagSupportEnabled']()||this['_normalizeResponseHeadings'](_0x4737b4);const _0x5d1406=this['editor']['config']['get']('ai.aiAssistant.preserveComments'),_0x397c01=this['editor']['data']['toModel'](_0x4737b4);return _0x5d1406||_0x397c01['markers']['clear'](),this['editor']['data']['stringify'](_0x397c01);}['_normalizeResponseHeadings'](_0x3bf5d8){const _0x2c6c37=new _0x410430(this['editor']['editing']['view']['document']),_0x3592f2=new _0x1f744a({'name':/^h[1-5]$/}),_0xf4e1f6=[];let _0x132711=!0x1;for(const _0x4d844a of _0x3bf5d8)_0x4d844a['is']('element')&&_0x3592f2['match'](_0x4d844a)&&(_0xf4e1f6['push'](_0x4d844a),'h1'==_0x4d844a['name']&&(_0x132711=!0x0));if(_0x132711){for(const _0x160e90 of _0xf4e1f6)_0x2c6c37['rename']('h'+(parseInt(_0x160e90['name'][0x1])+0x1),_0x160e90);}}['_isH1TagSupportEnabled'](){const {data:_0xdcab7,editing:_0x3b7e20}=this['editor'],_0x4f89de=_0xdcab7['htmlProcessor']['toView']('<h1></h1>'),_0x45fd62=_0xdcab7['toView'](_0xdcab7['toModel'](_0x4f89de));return!!_0x3b7e20['view']['domConverter']['viewToDom'](_0x45fd62)['querySelector']('h1');}['_sanitizeHTML'](_0x264e6){return this['editor']['editing']['view']['domConverter']['setContentOf'](this['_sanitizationContainer'],_0x264e6),this['_sanitizationContainer']['innerHTML'];}['_stripMarkdownSyntax'](_0x2387ee){const _0x5c96e3=_0x2387ee['trim']();return _0x5c96e3['startsWith']('```html')?_0x5c96e3['endsWith']('```')?_0x5c96e3['substring'](0x7,_0x5c96e3['length']-0x3):_0x5c96e3['substring'](0x7):_0x2387ee;}}const M={'REPLACE':'replace','INSERT':'insert'};class lt extends at{constructor(_0x3e07b6){super(_0x3e07b6),this['set']('isVisible',!0x1),this['set']('mainAction',M['REPLACE']),this['replaceButton']=this['_createButton']('','ck-button-action'),this['replaceButton']['bind']('label')['to'](this,'mainAction',_0x18936e=>i(_0x3e07b6,'AI_'+_0x18936e['toUpperCase']()+'_CONTENT')),this['insertButton']=this['_createButton'](i(_0x3e07b6,'Insert\x20below')),this['tryAgainButton']=this['_createButton'](i(_0x3e07b6,'Try\x20again')),this['stopButton']=this['_createButton'](i(_0x3e07b6,'Stop'));const _0x3dc1e3=this['bindTemplate'];this['extendTemplate']({'attributes':{'class':['ck-ai-form__toolbar',_0x3dc1e3['if']('isVisible','ck-hidden',_0x33bae3=>!_0x33bae3)]}}),this['items']['addMany']([this['replaceButton'],this['insertButton'],this['tryAgainButton'],this['stopButton']]);}['_createButton'](_0x423be7,_0x4f8d92){const _0x3b0a4a=new _0x260786(this['locale']);return _0x3b0a4a['set']({'label':_0x423be7,'class':_0x4f8d92||'','isVisible':!0x0,'withText':!0x0}),_0x3b0a4a;}}class Y extends _0x38ffe9{['contentFieldView'];['copyButtonView'];constructor(_0x38e6d1,_0x3589e1=''){super(_0x38e6d1),this['set']({'value':null,'isVisible':!0x1,'isProcessing':!0x1});const _0x1b3034=this['bindTemplate'];this['contentFieldView']=new At(_0x38e6d1,_0x3589e1),this['copyButtonView']=this['_createCopyButton'](),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form__content-area-wrapper',_0x1b3034['if']('isVisible','ck-hidden',_0x2328df=>!_0x2328df)],'tabindex':'-1'},'children':[{'tag':'div','attributes':{'class':['ck','ck-ai-form__content-area',_0x1b3034['if']('isProcessing','ck-ai-form__content-area--processing')]},'children':[this['contentFieldView'],{'tag':'div','attributes':{'class':['ck','ck-ai-form__copy-button-wrapper']},'children':[this['copyButtonView']]}]}]});}['render'](){super['render'](),this['value']&&this['contentFieldView']['setContent'](this['value']);let _0xd4279=!0x1;this['on']('change:value',(_0x12f4bf,_0x3fbee9,_0x353f56)=>{const _0x4e53d6=!this['contentFieldView']['element']['querySelector']('.ck-ai-form__loader');this['contentFieldView']['setContent'](_0x353f56),this['isProcessing']&&_0x4e53d6&&!_0xd4279&&this['element']['scrollTo']({'top':this['element']['scrollHeight'],'behavior':'smooth'});}),this['on']('change:isProcessing',(_0x1faf92,_0x489a8c,_0x2450ef)=>{_0xd4279=!0x1,_0x2450ef?(this['value']=null,this['contentFieldView']['appendLoader']()):this['value']||this['contentFieldView']['setContent']('');}),this['listenTo'](this['element'],'wheel',()=>{_0xd4279=!0x0;}),this['listenTo'](this['element'],'mousedown',()=>{_0xd4279=!0x0;});}['focus'](){this['element']['focus']();}['_createCopyButton'](){const _0x4db2f1=this['locale'],_0x48793b=new _0x260786(this['locale']),_0x37aa91='ck-ai-form__copy-button';return _0x48793b['set']({'label':i(_0x4db2f1,'Copy'),'icon':_0x2c4ba2,'class':_0x37aa91,'tooltip':!0x0}),_0x48793b['bind']('isVisible')['to'](this,'value',_0x2d4fa0=>!!_0x2d4fa0),_0x48793b['bind']('isEnabled')['to'](this,'isProcessing',_0xb3d5f4=>!_0xb3d5f4),_0x48793b['on']('execute',()=>{this['_copyHTMLToClipboard'](this['contentFieldView']['element']),_0x48793b['icon']=_0x17a43d,_0x48793b['class']=_0x37aa91+'\x20ck-ai-form__copy-button--copied',this['focus'](),setTimeout(()=>{_0x48793b['icon']=_0x2c4ba2,_0x48793b['class']=_0x37aa91;},0x3e8);}),_0x48793b;}['_copyHTMLToClipboard'](_0x2a8aca){const {window:_0x2d114f,document:_0x55ca4a}=_0x3ca616;if(_0x2d114f['ClipboardItem']){const {Blob:_0x219e49,ClipboardItem:_0x1b0550}=_0x2d114f,_0xaf6d51=[new _0x1b0550({'text/html':new _0x219e49([_0x2a8aca['innerHTML']],{'type':'text/html'}),'text/plain':new _0x219e49([_0x2a8aca['textContent']||''],{'type':'text/plain'})})];navigator['clipboard']['write'](_0xaf6d51);}else{const _0x25350c=_0x55ca4a['createElement']('div');_0x25350c['style']['position']='absolute',_0x25350c['style']['left']='-9999px',_0x25350c['innerHTML']='<span>[</span>'+_0x2a8aca['innerHTML']+'<span>]</span>',_0x55ca4a['body']['appendChild'](_0x25350c);const _0x555f11=_0x55ca4a['createRange']();_0x555f11['setStartAfter'](_0x25350c['firstElementChild']),_0x555f11['setEndBefore'](_0x25350c['lastElementChild']);const _0x435060=_0x2d114f['getSelection']();_0x435060['removeAllRanges'](),_0x435060['addRange'](_0x555f11),_0x55ca4a['execCommand']('copy'),_0x25350c['remove']();}}}class At extends _0x38ffe9{constructor(_0x4fa6ba,_0x5b1c33=''){super(_0x4fa6ba),this['loaderView']=this['_createLoader'](),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-content',_0x5b1c33,'ck-reset_all-excluded','ck-ai-form__content-field']}});}['setContent'](_0x5935c6){this['element']['innerHTML']=_0x5935c6;}['appendLoader'](){this['element']['appendChild'](this['loaderView']['element']);}['_createLoader'](){const _0x57cef7=new _0x38ffe9(),_0x994771=this['locale'],_0x546929=new _0x33570f();return _0x546929['isVisible']=!0x0,_0x57cef7['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form__loader']},'children':[_0x546929,{'text':i(_0x994771,'AI\x20is\x20writing...')}]}),_0x57cef7['render'](),_0x57cef7;}}class st extends _0x38ffe9{constructor(_0x139854,_0x1a5497=''){super(_0x139854);const _0x206720=new rt(),_0x3e8f87=this['bindTemplate'];this['set']('text',_0x1a5497),_0x206720['content']=tt,this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form__error']},'children':[_0x206720,{'text':_0x3e8f87['to']('text')}]});}}class ct extends nt{['submitButtonView'];['showHistoryButtonView'];constructor(_0x1d826e,_0x4bda0f){super(_0x1d826e,_0x4bda0f),this['queryView']['fieldView']['minRows']=0x1,this['queryView']['fieldView']['maxRows']=0x3,this['submitButtonView']=this['_createSubmitButton'](),this['showHistoryButtonView']=this['_createShowHistoryButton'](),this['focusableChildren']['add'](this['showHistoryButtonView'],0x1),this['focusableChildren']['add'](this['submitButtonView']);}['render'](){super['render'](),this['queryView']['fieldWrapperChildren']['add'](this['showHistoryButtonView']),this['children']['add'](this['submitButtonView']),this['keystrokes']['set']('enter',(_0xd76e0b,_0x13c32d)=>{_0xd76e0b['target']==this['queryView']['fieldView']['element']&&(this['submit'](),_0x13c32d());});}['_createSubmitButton'](){const _0x2c96ad=new _0x260786(this['locale']),_0x55cb19=this['locale'];return _0x2c96ad['set']({'icon':ht,'label':i(_0x55cb19,'Submit'),'isVisible':!0x0,'tooltip':!0x0,'class':'ck-ai-form__submit'}),_0x2c96ad['on']('execute',()=>{this['submit']();}),_0x2c96ad['bind']('isEnabled')['to'](this['queryView']['fieldView'],'isEmpty',this,'isEnabled',(_0x5a6bda,_0x415f12)=>!_0x5a6bda&&_0x415f12),_0x2c96ad;}['_createShowHistoryButton'](){const _0x16e195=new _0x260786(this['locale']),_0x38ea25=this['resultsView'],_0x15b216=this['locale'];_0x16e195['set']({'label':i(_0x15b216,'History'),'withText':!0x1,'icon':et,'tooltip':!0x0,'tooltipPosition':'sw','class':'ck-ai-form__toggle-history'}),_0x16e195['bind']('isOn')['to'](_0x38ea25,'isVisible'),_0x16e195['bind']('isEnabled')['to'](this,'isEnabled'),_0x16e195['on']('execute',()=>{_0x38ea25['isVisible']=!_0x38ea25['isVisible'],_0x38ea25['isVisible']?this['filteredView']['focus']():this['focus']();});const _0xcfac36=()=>{_0x3ca616['window']['requestAnimationFrame'](()=>{if(ot(this['element'])){const _0x4f649b=new it(this['queryView']['fieldView']['element']),_0x189d7b=_0x4f649b['width'],_0x592cec='rtl'===_0x15b216['uiLanguageDirection']?'left':'right';_0x4f649b['excludeScrollbarsAndBorders'](),_0x16e195['element']['style'][_0x592cec]=_0x189d7b-_0x4f649b['width']+0x1+'px';}});};return this['queryView']['fieldView']['on']('update',_0xcfac36),this['on']('render',_0xcfac36),_0x16e195;}['submit'](){const _0x11a4f2=this['queryView']['fieldView']['element']['value'];this['fire']('submit',_0x11a4f2);}['focus'](_0xf48f04){-0x1===_0xf48f04?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}}class ft extends Ct{['historyGroupView'];['clearHistoryButton'];constructor(_0x4f66e6){super(_0x4f66e6),this['clearHistoryButton']=this['_createClearHistoryButton'](),this['historyGroupView']=new Ht(),this['historyGroupView']['children']['add'](this['clearHistoryButton'],0x1),this['historyGroupView']['label']=i(_0x4f66e6,'Prompt\x20history'),this['historyGroupView']['items']['delegate']('execute')['to'](this),this['items']['add'](this['historyGroupView']);}['filter'](){let _0x5ab423=0x0;for(const _0x3df429 of this['items'])_0x5ab423+=_0x3df429['items']['length'];return{'resultsCount':_0x5ab423,'totalItemsCount':_0x5ab423};}['_createClearHistoryButton'](){const _0x28cbe6=this['locale'],_0x1f631a=new _0x260786(this['locale']);return _0x1f631a['set']({'label':'('+i(_0x28cbe6,'Clear')+')','withText':!0x0}),_0x1f631a['on']('execute',()=>this['fire']('clearHistory')),_0x1f631a;}}class bt extends xt{constructor(_0x35eb10){super();const _0x1e0a68=new kt(),_0x272140=new _0x260786(this['locale'],_0x1e0a68);this['children']['add'](_0x272140),_0x272140['set']({'label':_0x35eb10['prompt'],'withText':!0x0}),_0x272140['on']('execute',()=>{this['fire']('execute',{'value':jt(_0x35eb10['prompt'])});});}}const ts='CKEditor/AIFormView/PromptHistory';class wt extends _0x494c54{constructor(){super(),this['_loadFromSessionStorage'](),this['on']('add',(_0x29a241,_0x1060b9)=>{const _0x1f7552=os(_0x1060b9['prompt']);for(const _0x4f2871 of this)if(_0x4f2871!=_0x1060b9&&os(_0x4f2871['prompt'])===_0x1f7552){this['remove'](_0x4f2871);break;}this['length']>0x14&&this['remove'](this['last']),this['_saveToSessionStorage']();}),this['on']('remove',()=>{this['_saveToSessionStorage']();});}['_loadFromSessionStorage'](){const _0x2dcd79=sessionStorage['getItem'](ts)||'[]';this['addMany'](JSON['parse'](_0x2dcd79));}['_saveToSessionStorage'](){sessionStorage['setItem'](ts,JSON['stringify'](this['map'](_0xe540dd=>_0xe540dd)));}}function os(_0x285004){return _0x285004['toLowerCase']()['trim']();}class _ extends _0x38ffe9{['focusTracker'];['keystrokes'];['contentArea'];['toolbar'];['promptView'];['errorView'];['_focusables'];['focusCycler'];['_promptHistory'];constructor(_0x3df449,_0x666ee7,_0x3c3f19=''){super(_0x3df449),this['set']('isEnabled',!0x0),this['set']('isProcessing',!0x1),this['set']('prompt',''),this['set']('value',''),this['set']('isError',!0x1),this['set']('mainAction',M['REPLACE']),this['_promptHistory']=new wt(),this['errorView']=new st(_0x3df449),this['contentArea']=new Y(_0x3df449,_0x3c3f19),this['contentArea']['bind']('isProcessing')['to'](this),this['contentArea']['bind']('value')['to'](this),this['toolbar']=this['_createToolbar'](),this['toolbar']['bind']('mainAction')['to'](this),this['promptView']=this['_createPromptView'](),this['focusTracker']=new mt(),this['keystrokes']=new ut(),this['_focusables']=this['createCollection']([this['contentArea'],this['contentArea']['copyButtonView'],this['toolbar'],this['promptView']]),this['focusCycler']=new pt({'focusables':this['_focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift\x20+\x20tab','focusNext':'tab'}}),this['focusCycler']['chain'](this['promptView']['focusCycler']),this['promptView']['queryView']['fieldView']['bind']('value')['to'](this,'prompt');const _0x50fc04=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form',_0x666ee7],'tabindex':'-1'},'children':[{'tag':'div','attributes':{'class':['ck','ck-ai-form-content']},'children':[{'tag':'div','attributes':{'class':[_0x50fc04['if']('isError','ck-hidden',_0x303a95=>!_0x303a95)]},'children':[this['errorView']]},this['contentArea'],this['toolbar'],this['promptView']]}]});}['render'](){super['render'](),this['focusTracker']['add'](this['contentArea']['element']),this['focusTracker']['add'](this['contentArea']['copyButtonView']['element']),this['focusTracker']['add'](this['toolbar']['element']),this['focusTracker']['add'](this['promptView']['element']),this['keystrokes']['listenTo'](this['element']);}['focus'](_0x47796e=0x1){-0x1===_0x47796e?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['reset'](){this['prompt']='',this['value']='',this['isError']=!0x1,this['promptView']['reset'](),this['contentArea']['isVisible']=!0x1,this['toolbar']['isVisible']=!0x1;}['_createPromptView'](){const _0x2c5356=this['locale'],_0x310486=new ct(_0x2c5356,{'queryView':{'label':i(_0x2c5356,'Ask\x20AI\x20to\x20edit\x20or\x20generate'),'creator':dt,'showIcon':!0x1,'showResetButton':!0x1},'infoView':{'text':{'noSearchableItems':{'primary':i(_0x2c5356,'Empty\x20history'),'secondary':i(_0x2c5356,'Ask\x20AI\x20and\x20your\x20prompts\x20will\x20be\x20listed\x20here\x20for\x20you\x20to\x20use\x20later.')}}},'filteredView':this['_createHistoryView'](),'queryMinChars':0x1/0x0,'resetOnBlur':!0x1});return _0x310486['bind']('isEnabled')['to'](this,'isEnabled',this,'isProcessing',(_0xc87924,_0x466250)=>_0xc87924&&!_0x466250),this['listenTo'](_0x310486,'submit',(_0xbf4988,_0x42fab2)=>{this['prompt']=_0x42fab2;const _0x3d181d=yt(_0x42fab2);this['fire']('submitPrompt',_0x3d181d),_0x42fab2['trim']()&&this['_promptHistory']['add']({'prompt':_0x3d181d},0x0);},{'priority':'high'}),_0x310486;}['_createHistoryView'](){const _0x41b934=new ft(this['locale']);return _0x41b934['historyGroupView']['items']['bindTo'](this['_promptHistory'])['as'](bt),_0x41b934['on']('clearHistory',()=>{this['_promptHistory']['clear'](),this['promptView']['search'](''),this['promptView']['focus']();}),_0x41b934;}['_createToolbar'](){const _0x3fdb1c=new lt(this['locale']);return _0x3fdb1c['replaceButton']['bind']('isEnabled')['to'](this,'isEnabled',this,'isProcessing',this,'value',(_0x3b4d89,_0x5788fd,_0x3dcf44)=>_0x3b4d89&&!_0x5788fd&&!!_0x3dcf44),_0x3fdb1c['replaceButton']['delegate']('execute')['to'](this,'replaceContent'),_0x3fdb1c['insertButton']['bind']('isEnabled')['to'](this,'isEnabled',this,'isProcessing',this,'value',(_0x2d17d5,_0x134550,_0x5d2d69)=>_0x2d17d5&&!_0x134550&&!!_0x5d2d69),_0x3fdb1c['insertButton']['delegate']('execute')['to'](this,'insertContentBelow'),_0x3fdb1c['tryAgainButton']['bind']('isEnabled')['to'](this,'isEnabled',this,'isProcessing',(_0x226c7d,_0x437f23)=>_0x226c7d&&!_0x437f23),_0x3fdb1c['tryAgainButton']['delegate']('execute')['to'](this,'tryAgainEvent'),_0x3fdb1c['stopButton']['bind']('isEnabled')['to'](this,'isProcessing'),_0x3fdb1c['stopButton']['delegate']('execute')['to'](this,'stopProcessing'),_0x3fdb1c;}['startProcessing'](){this['value']='',this['isError']=!0x1,this['isProcessing']=!0x0,this['contentArea']['isVisible']=!0x0,this['toolbar']['isVisible']=!0x0,this['contentArea']['focus']();}['finishProcessing'](){const _0xe2ed94=this['locale'];this['isProcessing']=!0x1,this['prompt']='',this['promptView']['reset'](),this['value']&&(this['promptView']['queryView']['label']=i(_0xe2ed94,'Ask\x20AI\x20to\x20improve\x20generated\x20text'));}['handleError'](_0x27d24e){const _0x4062b4=this['locale'];this['finishProcessing'](),this['isError']=!0x0,this['errorView']['text']=_0x27d24e||i(_0x4062b4,'AI_ERROR_FAILED'),this['value']||(this['contentArea']['isVisible']=!0x1);}}const w=globalThis['DataTransfer'];class n extends _0x11703a{['licenseKey'];['_licenseKeyCheckInterval'];['_dialog'];['_formView'];['_aiAdapter'];['_aiAssistantController'];['_uiCssClasses']='';static get['pluginName'](){return'AIAssistantUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[_0x5e9943,a,E,_0x4f70a2];}constructor(_0x4b7f43){super(_0x4b7f43),_0x4b7f43['config']['define']('ai.aiAssistant.disabledElements',['media','rawHtml','tableOfContents']),_0x4b7f43['config']['define']('ai.aiAssistant.contentAreaCssClass',''),_0x4b7f43['config']['define']('ai.useTheme',!0x0),this['_uiCssClasses']='ck-ai-assistant-ui'+(_0x4b7f43['config']['get']('ai.useTheme')?'\x20ck-ai-assistant-ui_theme':'');}['init'](){const {editor:_0x1690dc}=this;this['_aiAdapter']=_0x1690dc['plugins']['get'](E),this['_dialog']=_0x1690dc['plugins']['get'](_0x4f70a2),this['_formView']=null,this['_commandDefinitions']=this['_getResolvedCommandsDefinitions']();const _0x3f89ad=new j(_0x1690dc,Array['from'](this['_commandDefinitions']['values']()));_0x1690dc['commands']['add']('showAIAssistant',_0x3f89ad),_0x1690dc['ui']['componentFactory']['add']('aiCommands',_0x163294=>{const _0x4b46b0=_0xd3519e(_0x163294);return _0x4b46b0['set']({'class':'ck-ai-commands-dropdown\x20'+this['_uiCssClasses']}),_0x4b46b0['buttonView']['set']({'label':i(_0x163294,'AI\x20Commands'),'icon':_0x2fd707,'tooltip':!0x0}),_0x4b46b0['on']('execute',_0x4c589e=>this['_onExecute'](_0x4c589e['source']['id'])),_0x5baf95(_0x4b46b0,_0x1690dc['ui']['view']['body'],function(_0x55fb02){const _0x1a91ad=o(_0x55fb02['config']['get']('ai.aiAssistant.commands'),_0x55fb02['locale']),_0x38efb6=U(_0x55fb02,_0x1a91ad)['filter'](_0x7d8b39=>_0x7d8b39['commands']['length']);if(0x1===_0x38efb6['length'])return U(_0x55fb02,_0x38efb6[0x0]['commands'])['map'](_0x2982af=>({'id':_0x2982af['id'],'label':_0x2982af['label']}));return _0x38efb6['map'](_0x1603a2=>{const {groupId:_0x3d1933,groupLabel:_0x1d5cdf,commands:_0x129ce2}=_0x1603a2,_0x1ffb79=U(_0x55fb02,_0x129ce2)['map'](_0x4e1bd0=>({'id':_0x4e1bd0['id'],'label':_0x4e1bd0['label']}));return{'id':_0x3d1933,'menu':_0x1d5cdf||_0x3d1933,'children':_0x1ffb79};});}(_0x1690dc),{'ariaLabel':i(_0x163294,'AI\x20Commands')}),_0x4b46b0['menuView']['menuPanelClass']='ck-ai-commands-dropdown\x20'+this['_uiCssClasses'],_0x3f89ad['on']('change:enabledCommandsIds',_0x15988d),_0x4b46b0['menuView']['once']('render',_0x15988d),_0x4b46b0;function _0x15988d(){_0x4b46b0['isEnabled']=_0x3f89ad['enabledCommandsIds']['length']>0x0;for(const _0x3c2cbd of _0x4b46b0['menuView']['buttons'])_0x3c2cbd['isEnabled']=_0x3f89ad['enabledCommandsIds']['includes'](_0x3c2cbd['id']);}}),_0x1690dc['ui']['componentFactory']['add']('menuBar:aiCommands',_0x25381f=>{const _0x6586e5=new _0x49fd2d(_0x25381f);_0x6586e5['buttonView']['set']({'label':i(_0x25381f,'AI\x20Commands'),'icon':_0x2fd707}),_0x6586e5['bind']('isEnabled')['to'](_0x3f89ad,'enabledCommandsIds',_0x3bad24=>_0x3bad24['length']>0x0);const _0x5cbd4a=o(_0x1690dc['config']['get']('ai.aiAssistant.commands'),_0x25381f);return this['_populateMenuBarMenu'](_0x3f89ad,_0x6586e5,_0x5cbd4a,_0x57d18b=>this['_onExecute'](_0x57d18b)),_0x6586e5;}),_0x1690dc['ui']['componentFactory']['add']('aiAssistant',()=>{const _0x29acc9=this['_createAIAssistantUIButton'](_0x260786);return _0x29acc9['set']({'tooltip':!0x0,'class':'ck-ai-assistant-button\x20'+this['_uiCssClasses']}),_0x29acc9;}),_0x1690dc['ui']['componentFactory']['add']('menuBar:aiAssistant',()=>{const _0x4ca86a=this['_createAIAssistantUIButton'](_0x7cd0bd);return _0x4ca86a['set']({'role':'menuitemcheckbox'}),_0x4ca86a;}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x5d592e=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x4b5c20;for(const _0x10072b in _0x5d592e){const _0x299537=_0x10072b,_0x8f50d4=_0x5d592e[_0x299537];if('aiLicenseKeyValid'==_0x8f50d4||'aiLicenseKeyInvalid'==_0x8f50d4||'aiLicenseKeyExpired'==_0x8f50d4||'aiLicenseKeyDomainLimit'==_0x8f50d4||'aiLicenseKeyNotAllowed'==_0x8f50d4||'aiLicenseKeyEvaluationLimit'==_0x8f50d4||'aiLicenseKeyTrialLimit'==_0x8f50d4||'aiLicenseKeyUsageLimit'==_0x8f50d4){delete _0x5d592e[_0x299537],_0x4b5c20=_0x8f50d4,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'aiLicenseKeyInvalid'==_0x4b5c20&&_0x5d592e['_showLicenseError']('invalid'),'aiLicenseKeyExpired'==_0x4b5c20&&_0x5d592e['_showLicenseError']('expired'),'aiLicenseKeyDomainLimit'==_0x4b5c20&&_0x5d592e['_showLicenseError']('domainLimit'),'aiLicenseKeyNotAllowed'==_0x4b5c20&&_0x5d592e['_showLicenseError']('featureNotAllowed','AIAssistant'),'aiLicenseKeyEvaluationLimit'==_0x4b5c20&&_0x5d592e['_showLicenseError']('evaluationLimit'),'aiLicenseKeyTrialLimit'==_0x4b5c20&&_0x5d592e['_showLicenseError']('trialLimit'),'aiLicenseKeyUsageLimit'==_0x4b5c20&&_0x5d592e['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['showUI'](_0x5a52d7='',_0x51ae7e='',_0x5014c9='custom'){const _0x37fb4d=this['editor'],_0x2c5ab3=_0x37fb4d['editing']['view'],_0x4e2b66=_0x37fb4d['plugins']['get'](a),_0x2f5c38=_0x37fb4d['plugins']['get'](_0x5e9943);_0x4e2b66['showFakeVisualSelection']();const _0x5d88dd=new w(),_0x4ea956=new ClipboardEvent('copy',{'clipboardData':_0x5d88dd}),_0x3be5e6=new _0x226ef5(_0x5d88dd),_0x1c7a94=new _0x404349(_0x2c5ab3,_0x4ea956,{'dataTransfer':_0x3be5e6});_0x2f5c38['_forceMarkersCopy']('comment',()=>{_0x2c5ab3['document']['fire']('copy',_0x1c7a94);}),this['_formView']||(this['_initView'](),this['_aiAssistantController']=new k(_0x37fb4d,this['_aiAdapter']['textAdapter'],this['_formView']));let _0x17d268=_0x3be5e6['getData']('text/html');const _0x25ed45=_0x37fb4d['model']['document']['selection'],_0x3a7459=Array['from'](_0x25ed45['getRanges']());0x1===_0x3a7459['length']&&_0x3a7459[0x0]['isFlat']&&!_0x25ed45['getSelectedElement']()&&''!==_0x17d268['replace'](/ /g,'')['trim']()&&(_0x17d268='<p>'+_0x17d268+'</p>'),this['_aiAssistantController']['updateView']({'actionId':_0x5014c9,'query':_0x5a52d7,'htmlContent':_0x17d268,'label':_0x51ae7e,'mainActionLabel':M[_0x37fb4d['model']['document']['selection']['isCollapsed']?'INSERT':'REPLACE']}),'aiAssistant'!==this['_dialog']['id']?this['_dialog']['show']({'id':'aiAssistant','icon':_0x147493,'title':i(this['editor']['locale'],'AI\x20Assistant'),'content':this['_formView'],'position':_0x32ed05['EDITOR_TOP_SIDE'],'onShow':()=>{this['_formView']['focus']();},'onHide':()=>{this['_aiAssistantController']['reset'](),_0x4e2b66['hideFakeVisualSelection']();}}):this['_dialog']['view']['wasMoved']||this['_dialog']['view']['updatePosition']();}['hideUI'](){this['_dialog']['hide']();}['_getResolvedCommandsDefinitions'](){const _0x1af841=new Map(),_0x3d5ea9=o(this['editor']['config']['get']('ai.aiAssistant.commands'),this['editor']['locale']);for(const _0x24dac4 of _0x3d5ea9)for(const _0x424163 of _0x24dac4['commands'])_0x1af841['set'](_0x424163['id'],{..._0x424163,'groupId':_0x24dac4['groupId'],'groupLabel':_0x24dac4['groupLabel']||_0x24dac4['groupId']});return _0x1af841;}['_createAIAssistantUIButton'](_0x22a05e){const _0x1b824b=this['editor'],_0x121994=_0x1b824b['commands']['get']('showAIAssistant'),_0x5d8132=new _0x22a05e(_0x1b824b['locale']);return _0x5d8132['set']({'label':i(_0x1b824b['locale'],'AI\x20Assistant'),'icon':_0x147493,'isToggleable':!0x0}),_0x5d8132['bind']('isEnabled')['to'](_0x121994),_0x5d8132['bind']('isOn')['to'](this['_dialog'],'id',_0x3429a7=>'aiAssistant'===_0x3429a7),this['listenTo'](_0x5d8132,'execute',()=>{_0x5d8132['isOn']?this['hideUI']():_0x121994['execute']();}),_0x5d8132;}['_initView'](){const _0x4770d0=this['editor']['plugins']['get'](a);this['_formView']=new _(this['editor']['locale'],this['_uiCssClasses'],this['editor']['config']['get']('ai.aiAssistant.contentAreaCssClass')),this['_formView']['on']('change:value',()=>{this['_dialog']['view']['wasMoved']||this['_dialog']['view']['updatePosition']();}),this['_formView']['promptView']['queryView']['fieldView']['on']('update',()=>{this['_dialog']['view']['wasMoved']||this['_dialog']['view']['updatePosition']();}),this['listenTo'](this['_formView'],'replaceContent',()=>{_0x4770d0['insertContent'](this['_aiAssistantController']['currentContext']),this['hideUI']();}),this['listenTo'](this['_formView'],'insertContentBelow',()=>{_0x4770d0['insertContentBelow'](this['_aiAssistantController']['currentContext']),this['hideUI']();}),this['_initAriaAiStatusChangeAnnouncements']();}['_initAriaAiStatusChangeAnnouncements'](){const {locale:_0x1c8a09,ui:{ariaLiveAnnouncer:_0x2e8e51}}=this['editor'];this['_formView']['contentArea']['on']('change:isProcessing',(_0x5ad663,_0x447349,_0x1898c4)=>{const _0x16a77f=this['_aiAssistantController']['currentContext'];_0x1898c4?_0x2e8e51['announce'](i(_0x1c8a09,'AI\x20is\x20writing')):_0x16a77f&&_0x2e8e51['announce'](i(_0x1c8a09,'Generated\x20content:\x20%0',_0x16a77f),{'politeness':'polite','isUnsafeHTML':!0x0});}),this['_formView']['on']('change:isError',(_0x1ee7d9,_0x32b013,_0x5ca5a4)=>{if(_0x5ca5a4){const _0x3e3103=this['_formView']['errorView']['text'];_0x2e8e51['announce'](i(_0x1c8a09,'Error\x20during\x20AI\x20content\x20generation:\x20%0',_0x3e3103));}});}['_onExecute'](_0x55f244){const _0x34bc1e=this['_commandDefinitions']['get'](_0x55f244),_0x12d76c=this['editor'],_0x1d2950=_0x12d76c['model']['document']['selection'],_0x17c674=_0x12d76c['commands']['get']('showAIAssistant'),_0x892167=_0x12d76c['plugins']['get'](a),_0x838f56=''+(_0x34bc1e['groupId']!==x?_0x34bc1e['groupLabel']+':\x20':'')+_0x34bc1e['label'];if(!0x1!==_0x34bc1e['requiresContent']&&_0x1d2950['isCollapsed']){const _0x5c3113=_0xbc1f83(_0x1d2950['getSelectedBlocks']())||_0x12d76c['model']['schema']['getLimitElement'](_0x1d2950);_0x12d76c['model']['change'](_0x58bfdd=>{_0x58bfdd['setSelection'](_0x5c3113,'in');});}_0x892167['showFakeVisualSelection'](),_0x17c674['execute'](_0x34bc1e['prompt'],_0x838f56,'command:'+_0x55f244);}['_populateMenuBarMenu'](_0x5437de,_0x42f5b6,_0x5eaaf8,_0x1f2f39){const _0x4826d1=this['editor'],_0x97d559=_0x4826d1['locale'],_0x4f0233=new _0x18244a(_0x97d559),_0x5d2c6a=U(_0x4826d1,_0x5eaaf8)['filter'](_0x278469=>_0x278469['commands']['length']);0x1===_0x5d2c6a['length']?this['_getMenuBarGroupButtons']({'command':_0x5437de,'commands':_0x5d2c6a[0x0]['commands'],'parentMenuView':_0x42f5b6,'onExecute':_0x1f2f39})['forEach'](_0x6222c6=>_0x4f0233['items']['add'](_0x6222c6)):_0x5d2c6a['forEach'](({groupId:_0x3c325b,groupLabel:_0x14540c,commands:_0x84af39})=>{const _0x28b39d=new _0x3b2b48(_0x97d559,_0x42f5b6),_0x3b0ac1=new _0x49fd2d(_0x97d559),_0x1e8ee4=new _0x18244a(_0x97d559),_0x1b96d9=this['_getMenuBarGroupButtons']({'command':_0x5437de,'commands':_0x84af39,'parentMenuView':_0x3b0ac1,'onExecute':_0x1f2f39});_0x3b0ac1['buttonView']['set']({'label':_0x14540c||_0x3c325b}),_0x3b0ac1['delegate']('execute')['to'](_0x42f5b6),_0x1e8ee4['items']['addMany'](_0x1b96d9),_0x3b0ac1['panelView']['children']['add'](_0x1e8ee4),_0x28b39d['children']['add'](_0x3b0ac1),_0x4f0233['items']['add'](_0x28b39d);}),_0x42f5b6['panelView']['children']['add'](_0x4f0233);}['_getMenuBarGroupButtons']({command:_0x4d278b,commands:_0x1aef70,parentMenuView:_0x2cc085,onExecute:_0x27d1ec}){const _0x17b4b8=this['editor'],_0x1061f7=_0x17b4b8['locale'];return U(_0x17b4b8,_0x1aef70)['map'](_0x1f7475=>{const _0x5092f2=new _0x3b2b48(_0x1061f7,_0x2cc085),_0x4593bd=new _0x7cd0bd(_0x1061f7);return _0x4593bd['set']({'label':_0x1f7475['label']}),_0x4593bd['delegate']('execute')['to'](_0x2cc085),_0x4593bd['on']('execute',()=>_0x27d1ec(_0x1f7475['id'])),_0x4593bd['bind']('isEnabled')['to'](_0x4d278b,'enabledCommandsIds',_0x45afde=>_0x45afde['includes'](_0x1f7475['id'])),_0x5092f2['children']['add'](_0x4593bd),_0x5092f2;});}}function B(_0x2acf78,_0x4a82cd){return void 0x0!==_0x2acf78['order']&&void 0x0===_0x4a82cd['order']?0x1:void 0x0===_0x2acf78['order']&&void 0x0!==_0x4a82cd['order']?-0x1:void 0x0!==_0x2acf78['order']&&void 0x0!==_0x4a82cd['order']?_0x2acf78['order']-_0x4a82cd['order']:0x0;}function U(_0x122b66,_0x4982d5){_0x4982d5['sort'](B);const _0x15fb91={},_0x5ee2dd=[];for(const _0x160d94 of _0x4982d5)if(void 0x0!==_0x160d94['order']){if(_0x160d94['order']in _0x15fb91)throw new _0x5e153c('ai-commands-config-order-collision',_0x122b66,{'conflictingDefinitions':[_0x160d94,_0x15fb91[_0x160d94['order']]]});_0x15fb91[_0x160d94['order']]=_0x160d94,_0x5ee2dd['splice'](_0x160d94['order'],0x0,_0x160d94);}else _0x5ee2dd['push'](_0x160d94);return _0x5ee2dd;}class r extends _0x11703a{static get['requires'](){return[n,a];}static get['pluginName'](){return'AIAssistant';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x655d36){super(_0x655d36);const _0x971499=_0x655d36['config'],_0x2ce61d=_0x655d36['locale'];_0x971499['define']('ai.aiAssistant.preserveComments',!0x0),_0x971499['define']('ai.aiAssistant.commands',function(_0x290878){return[{'groupId':'editOrReview','groupLabel':i(_0x290878,'Edit\x20or\x20review'),'commands':[{'id':'improveWriting','label':i(_0x290878,'Improve\x20writing'),'prompt':'Fix\x20spelling\x20mistakes,\x20use\x20proper\x20grammar\x20and\x20apply\x20good\x20writing\x20practices.\x20Do\x20not\x20lose\x20the\x20original\x20meaning.'},{'id':'makeShorter','label':i(_0x290878,'Make\x20shorter'),'prompt':'Remove\x20any\x20repetitive,\x20redundant,\x20or\x20non-essential\x20writing\x20in\x20this\x20content\x20without\x20changing\x20the\x20meaning\x20or\x20losing\x20any\x20key\x20information.'},{'id':'makeLonger','label':i(_0x290878,'Make\x20longer'),'prompt':'Improve\x20this\x20content\x20by\x20using\x20descriptive\x20language\x20and\x20inserting\x20more\x20information\x20and\x20more\x20detailed\x20explanations.'},{'id':'simplifyLanguage','label':i(_0x290878,'Simplify\x20language'),'prompt':'Simplify\x20the\x20writing\x20style\x20of\x20this\x20content\x20and\x20reduce\x20the\x20complexity,\x20so\x20that\x20the\x20content\x20is\x20easy\x20to\x20understand.'}]},{'groupId':'generate','groupLabel':i(_0x290878,'Generate\x20from\x20selection'),'commands':[{'id':'summarize','label':i(_0x290878,'Summarize'),'prompt':'Summarize\x20this\x20content\x20into\x20one\x20paragraph\x20of\x20text.\x20Include\x20only\x20the\x20key\x20ideas\x20and\x20conclusions.\x20Keep\x20it\x20short.\x20Do\x20not\x20keep\x20original\x20text\x20formatting.'},{'id':'continue','label':i(_0x290878,'Continue'),'prompt':'Start\x20with\x20the\x20provided\x20content\x20and\x20write\x20at\x20the\x20end\x20of\x20it\x20continuing\x20this\x20topic.\x20Keep\x20the\x20added\x20part\x20short.'}]},{'groupId':'changeTone','groupLabel':i(_0x290878,'Change\x20tone'),'commands':[{'id':'professional','label':i(_0x290878,'Professional'),'prompt':'Improve\x20using\x20polished,\x20formal,\x20and\x20respectful\x20language\x20to\x20convey\x20professional\x20expertise\x20and\x20competence.'},{'id':'casual','label':i(_0x290878,'Casual'),'prompt':'Improve\x20using\x20casual,\x20informal\x20language\x20to\x20convey\x20a\x20casual\x20conversation\x20with\x20a\x20real\x20person.'},{'id':'direct','label':i(_0x290878,'Direct'),'prompt':'Improve\x20using\x20direct\x20language,\x20using\x20only\x20the\x20essential\x20information.'},{'id':'confident','label':i(_0x290878,'Confident'),'prompt':'Improve\x20using\x20compelling,\x20optimistic\x20language\x20to\x20convey\x20confidence\x20in\x20the\x20writing.'},{'id':'friendly','label':i(_0x290878,'Friendly'),'prompt':'Improve\x20using\x20friendly,\x20comforting\x20language,\x20to\x20convey\x20understanding\x20and\x20empathy.'}]},{'groupId':'changeStyle','groupLabel':i(_0x290878,'Change\x20style'),'commands':[{'id':'business','label':i(_0x290878,'Business'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20business\x20professional\x20with\x20formal\x20language.'},{'id':'legal','label':i(_0x290878,'Legal'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20legal\x20professional\x20using\x20valid\x20legal\x20terminology.'},{'id':'journalism','label':i(_0x290878,'Journalism'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20journalist\x20using\x20engaging\x20language\x20to\x20convey\x20the\x20importance\x20of\x20the\x20information.'},{'id':'poetic','label':i(_0x290878,'Poetic'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20poem\x20using\x20poetic\x20techniques\x20without\x20losing\x20the\x20original\x20meaning.'}]},{'groupId':'translate','groupLabel':i(_0x290878,'Translate'),'commands':[{'id':'translateEnglish','label':i(_0x290878,'English'),'prompt':'Translate\x20the\x20content\x20to\x20English\x20language.'},{'id':'translateSpanish','label':i(_0x290878,'Spanish'),'prompt':'Translate\x20the\x20content\x20to\x20Spanish\x20language.'},{'id':'translatePortuguese','label':i(_0x290878,'Portuguese'),'prompt':'Translate\x20the\x20content\x20to\x20Portuguese\x20language.'},{'id':'translateGerman','label':i(_0x290878,'German'),'prompt':'Translate\x20the\x20content\x20to\x20German\x20language.'},{'id':'translateFrench','label':i(_0x290878,'French'),'prompt':'Translate\x20the\x20content\x20to\x20French\x20language.'},{'id':'translateChinese','label':i(_0x290878,'Simplified\x20Chinese'),'prompt':'Translate\x20the\x20content\x20to\x20Simplified\x20Chinese\x20language.'},{'id':'translateHindi','label':i(_0x290878,'Hindi'),'prompt':'Translate\x20the\x20content\x20to\x20Hindi\x20language.'},{'id':'translateArabic','label':i(_0x290878,'Arabic'),'prompt':'Translate\x20the\x20content\x20to\x20Arabic\x20language.'}]}];}(_0x2ce61d)),_0x971499['define']('ai.aiAssistant.extraCommandGroups',[]),_0x971499['define']('ai.aiAssistant.removeCommands',[]);let _0x12a898=o(_0x971499['get']('ai.aiAssistant.commands'),_0x2ce61d);const _0x3c2ab8=_0x971499['get']('ai.aiAssistant.extraCommandGroups'),_0x1768a3=_0x971499['get']('ai.aiAssistant.removeCommands');_0x3c2ab8['forEach'](_0xf2e2d8=>{const _0x1bdf01=_0x12a898['find'](_0x40fa5f=>_0x40fa5f['groupId']===_0xf2e2d8['groupId']);_0x1bdf01?_0x1bdf01['commands']=_0x1bdf01['commands']['concat'](_0xf2e2d8['commands']):_0x12a898['push'](_0xf2e2d8);}),_0x12a898=_0x12a898['filter'](_0x4fa71a=>!_0x1768a3['includes'](_0x4fa71a['groupId'])),_0x12a898['forEach'](_0x3a63a6=>{_0x3a63a6['commands']=_0x3a63a6['commands']['filter'](_0xc4c3e8=>!_0x1768a3['includes'](_0xc4c3e8['id']));}),_0x971499['set']('ai.aiAssistant.commands',_0x12a898);}}class P extends _0x11703a{['abortController'];static get['requires'](){return[E];}constructor(_0x71d5be){super(_0x71d5be),this['abortController']=new AbortController();}['init'](){this['editor']['plugins']['get'](E)['textAdapter']=this;}['abort'](){this['abortController']['signal']['aborted']||(this['abortController']['abort'](),this['abortController']=new AbortController());}async['makeRequest'](_0x521917){return this['sendRequest'](_0x521917)['catch'](_0x58bf77=>{if(_0x58bf77 instanceof R)return Promise['reject'](_0x58bf77);if('AbortError'==_0x58bf77['name'])return Promise['resolve']();throw console['error'](_0x58bf77),new _0x5e153c('aitextadapter-send-request-failed',null);});}async['_prepareRequestHeaders'](_0x1e2720,_0x51af71){const _0x27bdb7=this['editor']['locale'],_0x1ee206={'Content-Type':'application/json'};if('object'==typeof _0x1e2720)Object['assign'](_0x1ee206,_0x1e2720);else{if(_0x1e2720)try{const _0x41fdea=await _0x1e2720(_0x51af71);Object['assign'](_0x1ee206,_0x41fdea);}catch(_0x1430f1){return Promise['reject'](new R(i(_0x27bdb7,'AI_ERROR_GET_HEADERS')));}}return _0x1ee206;}async['_prepareRequestParameters'](_0x17cc68,_0xf3f1c){const _0x43496e=this['editor']['locale'];if('object'==typeof _0x17cc68)return _0x17cc68;try{return await _0x17cc68(_0xf3f1c);}catch(_0x2bee1d){return Promise['reject'](new R(i(_0x43496e,'AI_ERROR_GET_PARAMETERS')));}}}class O extends P{['_apiUrl'];['_requestHeaders'];['_requestParameters'];static get['pluginName'](){return'OpenAITextAdapter';}constructor(_0x1978b9){super(_0x1978b9),_0x1978b9['config']['define']('ai.openAI.apiUrl','https://api.openai.com/v1/chat/completions'),_0x1978b9['config']['get']('ai.openAI.requestParameters')||_0x1978b9['config']['define']('ai.openAI.requestParameters',{'model':'gpt-3.5-turbo','max_tokens':0x7d0,'temperature':0x1,'top_p':0x1,'stream':!0x0}),this['_apiUrl']=_0x1978b9['config']['get']('ai.openAI.apiUrl'),this['_requestHeaders']=_0x1978b9['config']['get']('ai.openAI.requestHeaders')||{},this['_requestParameters']=_0x1978b9['config']['get']('ai.openAI.requestParameters');}async['sendRequest']({query:_0x47e9ff,context:_0x38f973,onData:_0x384560,actionId:_0x4c6c2e}){const _0x2ef5a9=this['editor']['locale'],_0x388305=await this['prepareMessages'](_0x47e9ff,_0x38f973,_0x4c6c2e),_0xf9a305=await this['_prepareRequestHeaders'](this['_requestHeaders'],_0x4c6c2e),_0x100ce3=await this['_prepareRequestParameters'](this['_requestParameters'],_0x4c6c2e),_0x34690f={'messages':_0x388305,..._0x100ce3},_0x5e45d3={'method':'POST','headers':_0xf9a305,'body':JSON['stringify'](_0x34690f),'signal':this['abortController']['signal']},_0x127138=await fetch(this['_apiUrl'],_0x5e45d3);if(_0x127138['ok'])return _0x100ce3['stream']?await this['_readStreamableResponse'](_0x127138,_0x384560):await this['_readStaticResponse'](_0x127138,_0x384560),Promise['resolve']();{const _0x4373f1=await _0x127138['text']();return _0x4373f1['includes']('context_length_exceeded')?Promise['reject'](new R(i(_0x2ef5a9,'AI_ERROR_CONTEXT_LENGTH'))):_0x4373f1['includes']('Moderation')?Promise['reject'](new R(i(_0x2ef5a9,'AI_ERROR_MODERATION'))):Promise['reject'](new Error(_0x4373f1));}}async['prepareMessages'](_0x4a94f1,_0x3698a5,_0x41d541){let _0x5d6f84,_0x142730;return _0x3698a5?(_0x5d6f84='Your\x20task\x20is\x20to\x20execute\x20the\x20instruction\x20using\x20the\x20provided\x20HTML\x20content.\x20Follow\x20the\x20instruction\x20closely.\x20Your\x20answer\x20must\x20be\x20a\x20properly\x20formatted\x20HTML\x20code.\x20Do\x20not\x20add\x20any\x20additional\x20remarks\x20or\x20notes.\x20Do\x20not\x20act\x20like\x20a\x20chatbot\x20or\x20a\x20real\x20person.',_0x142730='Instruction:\x0a'+_0x4a94f1+'\x0aYou\x20must\x20keep\x20the\x20text\x20formatting.\x0a\x0aContent:\x0a'+_0x3698a5):(_0x5d6f84='Your\x20task\x20is\x20to\x20generate\x20HTML\x20content\x20accordingly\x20to\x20the\x20given\x20instruction.\x20Never\x20include\x20<img>\x20tag\x20in\x20your\x20response\x20even\x20if\x20asked\x20for.\x20Your\x20answer\x20must\x20be\x20a\x20well-structured\x20and\x20properly\x20formatted\x20HTML\x20code.\x20Answer\x20only\x20with\x20the\x20generated\x20HTML\x20content.\x20Do\x20not\x20add\x20any\x20additional\x20remarks\x20or\x20notes.\x20Do\x20not\x20act\x20like\x20a\x20chatbot\x20or\x20a\x20real\x20person.',_0x142730=_0x4a94f1),[{'role':'system','content':_0x5d6f84},{'role':'user','content':_0x142730}];}async['_readStreamableResponse'](_0x290ee2,_0x57ecad){const _0x20e1ce=_0x290ee2['body']['getReader'](),_0x18f406=new TextDecoder();let _0x3b351c='',_0x24231a='',_0x1c19cf='',_0x53998c=!0x1;for(;!_0x53998c;){const {done:_0x5b2761,value:_0x362f10}=await _0x20e1ce['read'](),_0x449320=_0x3b351c+_0x18f406['decode'](_0x362f10);let _0x24c09d='';_0x53998c=_0x5b2761;try{_0x24c09d=this['_cleanUpData'](_0x449320),_0x3b351c='';}catch(_0x333e2a){_0x3b351c=_0x449320;continue;}_0x24231a+=_0x24c09d,!_0x53998c&&this['_isBufferIncomplete'](_0x24231a)||_0x24231a&&(_0x1c19cf+=_0x24231a,_0x24231a='',_0x57ecad(_0x1c19cf));}return Promise['resolve']();}async['_readStaticResponse'](_0xbcb13b,_0x45d351){return _0x45d351((await _0xbcb13b['json']())['choices'][0x0]['message']['content']),Promise['resolve']();}['_isBufferIncomplete'](_0x5a306e){const _0x2274b0=_0x5a306e['split']('<')['length']!==_0x5a306e['split']('>')['length'],_0xb92e7f=_0x5a306e['length']<0x1e;return _0x2274b0&&_0xb92e7f;}['_cleanUpData'](_0xe4529){return _0xe4529['split'](/\n(?![^{]*\})/g)['map'](_0x181cec=>_0x181cec['replace']('data:\x20',''))['filter'](_0xff88b0=>_0xff88b0&&_0xff88b0['length']>0x0&&'[DONE]'!==_0xff88b0)['map'](_0x1a6a5a=>{const {choices:_0x327bc9}=JSON['parse'](_0x1a6a5a);if(_0x327bc9[0x0]?.['delta']?.['content'])return _0x327bc9[0x0]['delta']['content'];})['filter'](_0x5b951f=>_0x5b951f)['join']('');}}class D extends P{['_apiUrl'];['_requestHeaders'];['_bedrockClientConfig'];['_requestParameters'];static get['pluginName'](){return'AWSTextAdapter';}constructor(_0x48f141){super(_0x48f141),_0x48f141['config']['get']('ai.aws.requestParameters')||_0x48f141['config']['define']('ai.aws.requestParameters',{'model':'anthropic.claude-v2','max_tokens_to_sample':0x7d0,'temperature':0x1,'top_p':0x1,'top_k':0xfa,'anthropic_version':'bedrock-2023-05-31','stream':!0x0}),this['_apiUrl']=_0x48f141['config']['get']('ai.aws.apiUrl'),this['_bedrockClientConfig']=_0x48f141['config']['get']('ai.aws.bedrockClientConfig'),this['_requestHeaders']=_0x48f141['config']['get']('ai.aws.requestHeaders'),this['_requestParameters']=_0x48f141['config']['get']('ai.aws.requestParameters');}async['sendRequest']({query:_0x29a40c,context:_0x1996fd,onData:_0xd5c42a,actionId:_0x2d6b76}){const {model:_0x4e5bd7,stream:_0x44990c,..._0x117faa}=await this['_prepareRequestParameters'](this['_requestParameters'],_0x2d6b76),_0x1c60f3={'prompt':await this['preparePrompt'](_0x29a40c,_0x1996fd,_0x4e5bd7,_0x2d6b76),..._0x117faa};this['_apiUrl']?await this['_processProxyRequest'](_0x1c60f3,_0x4e5bd7,_0x44990c,_0xd5c42a,_0x2d6b76):await this['_processAWSRequest'](_0x1c60f3,_0x4e5bd7,_0x44990c,_0xd5c42a);}async['preparePrompt'](_0x2e3867,_0x2cae15,_0xefced2,_0x5609da){let _0x5e0033,_0x468187;return _0x2cae15?(_0x5e0033='Your\x20task\x20is\x20to\x20execute\x20the\x20instruction\x20using\x20the\x20provided\x20HTML\x20content.\x20Follow\x20the\x20instruction\x20closely.\x20Your\x20answer\x20must\x20be\x20a\x20properly\x20formatted\x20HTML\x20code.\x20Do\x20not\x20add\x20any\x20additional\x20remarks\x20or\x20notes.\x20Do\x20not\x20act\x20like\x20a\x20chatbot\x20or\x20a\x20real\x20person.',_0x468187='Instruction:\x0a'+_0x2e3867+'\x0aYou\x20must\x20keep\x20the\x20text\x20formatting.\x0a\x0aContent:\x0a'+_0x2cae15):(_0x5e0033='Your\x20task\x20is\x20to\x20generate\x20HTML\x20content\x20accordingly\x20to\x20the\x20given\x20instruction.\x20Never\x20include\x20<img>\x20tag\x20in\x20your\x20response\x20even\x20if\x20asked\x20for.\x20Your\x20answer\x20must\x20be\x20a\x20well-structured\x20and\x20properly\x20formatted\x20HTML\x20code.\x20Answer\x20only\x20with\x20the\x20generated\x20HTML\x20content.\x20Do\x20not\x20add\x20any\x20additional\x20remarks\x20or\x20notes.\x20Do\x20not\x20act\x20like\x20a\x20chatbot\x20or\x20a\x20real\x20person.',_0x468187=_0x2e3867),'meta.llama'==this['getModelFamily'](_0xefced2)?'<<SYS>>\x0a'+_0x5e0033+'\x0a<</SYS>>\x0a[INST]\x0a'+_0x468187+'\x0a[/INST]':'Human:\x0a'+_0x5e0033+'\x0a'+_0x468187+'\x0a\x0aAssistant:';}['getModelFamily'](_0x236908){if(/^anthropic\.claude/['test'](_0x236908))return'anthropic.claude';if(/^ai21\.j2/['test'](_0x236908))return'ai21.j2';if(/^cohere\.command/['test'](_0x236908))return'cohere.command';if(/^meta\.llama/['test'](_0x236908))return'meta.llama';throw new R(i(this['editor']['locale'],'AI_ERROR_UNSUPPORTED_MODEL',_0x236908));}async['_processProxyRequest'](_0x5dd9c4,_0x9e007d,_0x303894,_0x282e63,_0x4c47cd){const _0x1e0ec9={'method':'POST','headers':await this['_prepareRequestHeaders'](this['_requestHeaders'],_0x4c47cd),'body':JSON['stringify']({..._0x5dd9c4,'model':_0x9e007d,'stream':_0x303894}),'signal':this['abortController']['signal']},_0x1c92ea=await fetch(this['_apiUrl'],_0x1e0ec9);_0x303894?await this['_readStreamableResponse'](_0x1c92ea,_0x9e007d,_0x282e63):await this['_readStaticResponse'](_0x1c92ea,_0x9e007d,_0x282e63);}async['_processAWSRequest'](_0x3096a9,_0x57da0b,_0x4b5f11,_0x11923e){const _0x481fdc=new _0xe2e5c4(this['_bedrockClientConfig']),_0x88d7b6={'body':JSON['stringify'](_0x3096a9),'contentType':'application/json','accept':'application/json','modelId':_0x57da0b};let _0x5a5eb1;if(_0x4b5f11){const _0x5791dc=new _0xe8b23(_0x88d7b6);_0x5a5eb1=await _0x481fdc['send'](_0x5791dc,{'abortSignal':this['abortController']['signal']}),await this['_readAsyncIterableResponse'](_0x5a5eb1,_0x57da0b,_0x11923e);}else{const _0x1852c3=new _0x51ff0f(_0x88d7b6);_0x5a5eb1=await _0x481fdc['send'](_0x1852c3,{'abortSignal':this['abortController']['signal']}),await this['_readStaticResponse'](_0x5a5eb1,_0x57da0b,_0x11923e);}}async['_readAsyncIterableResponse'](_0x53ebe4,_0x22aa96,_0x2ed220){const _0x5d56b1=_0x53ebe4['body'],_0x58b31e=new TextDecoder('utf-8');let _0x21fa5e='';for await(const _0x53f0a7 of _0x5d56b1)if(_0x53f0a7['chunk']){const _0x3ab223=_0x58b31e['decode'](_0x53f0a7['chunk']['bytes']),_0x4f87b8=JSON['parse'](_0x3ab223);_0x21fa5e+=this['_getGeneratedText'](_0x4f87b8,_0x22aa96),_0x2ed220(_0x21fa5e);}return Promise['resolve']();}async['_readStreamableResponse'](_0x57beb1,_0x25a47a,_0x3a4aa7){const _0x1ff80d=_0x57beb1['body'],_0x220ef0=new TextDecoder('utf-8'),_0x58b2db=_0x1ff80d['getReader']();let _0x4a6d75='',_0x28ba88='',_0x614a7a=!0x1;for(;!_0x614a7a;){const {done:_0x4bb125,value:_0x14caf9}=await _0x58b2db['read']();if(_0x614a7a=_0x4bb125,_0x614a7a)break;const _0x207016=(_0x4a6d75+_0x220ef0['decode'](_0x14caf9))['split']('\x0a')['map'](_0x11abd4=>{try{return _0x4a6d75='',JSON['parse'](_0x11abd4);}catch(_0x4bbcda){return _0x4a6d75=_0x11abd4,null;}})['filter'](_0x4ccf43=>null!==_0x4ccf43);_0x207016['length']&&(_0x28ba88+=_0x207016['map'](_0x28424e=>this['_getGeneratedText'](_0x28424e,_0x25a47a))['join'](''),_0x3a4aa7(_0x28ba88));}return Promise['resolve']();}async['_readStaticResponse'](_0x265705,_0x4a44dc,_0x348449){let _0x43de23;return _0x43de23=_0x265705 instanceof Response?await _0x265705['json']():JSON['parse'](Buffer['from'](_0x265705['body'])['toString']('utf8')),(_0x348449(this['_getGeneratedText'](_0x43de23,_0x4a44dc)),Promise['resolve']());}['_getGeneratedText'](_0x4fbd18,_0x210fee){switch(this['getModelFamily'](_0x210fee)){case'anthropic.claude':return _0x4fbd18['completion'];case'ai21.j2':return _0x4fbd18['completions'][0x0]['data']['text'];case'cohere.command':return _0x4fbd18['generations'][0x0]['text'];case'meta.llama':return _0x4fbd18['generation'];}}}export{E as AIAdapter,r as AIAssistant,n as AIAssistantUI,R as AIRequestError,P as AITextAdapter,D as AWSTextAdapter,O as OpenAITextAdapter};
|
|
23
|
+
import{Plugin as _0x10058d,Command as _0x17e1b6}from'@ckeditor/ckeditor5-core/dist/index.js';import{IconCopy as _0x5ad3c1,IconCheck as _0x15d5a6,IconError as tt,IconSubmit as ht,IconHistory as et,IconMagicWand as _0x38d71b,IconRobotPencil as _0x4646d8}from'@ckeditor/ckeditor5-icons/dist/index.js';import{uid as _0x30815e,CKEditorError as _0x18b185,ObservableMixin as _0x50d075,global as _0x4877bc,isVisible as ot,Rect as it,Collection as _0x3c554f,FocusTracker as mt,KeystrokeHandler as ut,first as _0x21ac4a}from'@ckeditor/ckeditor5-utils/dist/index.js';import{ToolbarView as at,ButtonView as _0x16a741,View as _0x102de5,SpinnerView as _0x2a10d0,IconView as rt,AutocompleteView as nt,ListView as Ct,ListItemGroupView as Ht,ListItemView as xt,ButtonLabelView as kt,FocusCycler as pt,createLabeledTextarea as dt,Dialog as _0x1f1261,createDropdown as _0x37e6ff,addMenuToDropdown as _0x3b9015,MenuBarMenuView as _0xa15c9d,MenuBarMenuListItemButtonView as _0x551047,DialogViewPosition as _0xc49ce0,MenuBarMenuListView as _0x22dfa8,MenuBarMenuListItemView as _0x580b79}from'@ckeditor/ckeditor5-ui/dist/index.js';import{ClipboardPipeline as _0x4c0f95,ClipboardMarkersUtils as _0x2beb13}from'@ckeditor/ckeditor5-clipboard/dist/index.js';import{DomEventData as _0x1ee063,DataTransfer as _0xa3a525,UpcastWriter as _0x55dbfc,Matcher as _0x379e14}from'@ckeditor/ckeditor5-engine/dist/index.js';import{unescape as jt,escape as yt}from'es-toolkit/compat';import{BedrockRuntimeClient as _0x5083d8,InvokeModelWithResponseStreamCommand as _0x5a3a84,InvokeModelCommand as _0x17bd69}from'@aws-sdk/client-bedrock-runtime';const x='_ungrouppedCommands';function o(_0xaa7ee4,_0x2913b6){const _0x11dc56=(0x0,_0x2913b6['t'])('Other');return _0xaa7ee4['length']?'groupId'in _0xaa7ee4[0x0]?_0xaa7ee4:[{'groupId':x,'groupLabel':_0x11dc56,'order':0x1/0x0,'commands':_0xaa7ee4}]:[{'groupId':x,'groupLabel':_0x11dc56,'order':0x1/0x0,'commands':[]}];}const gt=globalThis['DataTransfer'],f='ai-ui';class a extends _0x10058d{static get['pluginName'](){return'AIAssistantEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0xea6739}=this,_0x23656c=['ck-fake-ai-selection'];_0xea6739['config']['get']('ai.useTheme')&&_0x23656c['push']('ck-ai-assistant-ui_theme'),_0xea6739['conversion']['for']('editingDowncast')['markerToHighlight']({'model':f,'view':{'classes':_0x23656c,'priority':0xc}}),_0xea6739['conversion']['for']('editingDowncast')['markerToElement']({'model':f,'view':(_0x238df9,{writer:_0x14fecf})=>{if(!_0x238df9['markerRange']['isCollapsed'])return null;const _0x59851d=_0x14fecf['createUIElement']('span');return _0x14fecf['addClass'](['ck-fake-ai-selection','ck-fake-ai-selection_collapsed'],_0x59851d),_0x59851d;}});}['afterInit'](){!async function(_0x2a3026){const _0x526766=_0x3eab41([0x45,0x39,0x73,0x74,0x4a,0x72,0x35,0x4c,0x31,0x33,0x4e,0x30,0x57,0x44,0x56,0x5a,0x4f,0x67,0x50,0x4d,0x76,0x46,0x63,0x71,0x48,0x53,0x42,0x69,0x6d,0x65,0x62,0x6e,0x58,0x49,0x75,0x34,0x64,0x66,0x7a,0x55,0x68,0x70,0x43,0x6b,0x52,0x59,0x61,0x6f,0x78,0x54,0x32,0x51,0x41,0x79,0x38,0x47,0x4b,0x36,0x37,0x6c,0x6a,0x77]),_0x12bd0f=0x40f0eef3,_0x5d5139=0x40f789db^_0x12bd0f,_0x28d675=window[_0x3eab41([0x44,0x61,0x74,0x65])][_0x3eab41([0x6e,0x6f,0x77])](),_0x47b3a9=_0x2a3026[_0x3eab41([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x5af959=new window[(_0x3eab41([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x17adf0=>{_0x47b3a9[_0x3eab41([0x6f,0x6e,0x63,0x65])](_0x3eab41([0x72,0x65,0x61,0x64,0x79]),_0x17adf0);}),_0x371b56={[_0x3eab41([0x6b,0x74,0x79])]:_0x3eab41([0x45,0x43]),[_0x3eab41([0x75,0x73,0x65])]:_0x3eab41([0x73,0x69,0x67]),[_0x3eab41([0x63,0x72,0x76])]:_0x3eab41([0x50,0x2d,0x32,0x35,0x36]),[_0x3eab41([0x78])]:_0x3eab41([0x69,0x43,0x6a,0x4f,0x43,0x76,0x44,0x46,0x49,0x36,0x6c,0x51,0x48,0x48,0x54,0x31,0x38,0x6a,0x56,0x77,0x52,0x66,0x6b,0x66,0x48,0x51,0x32,0x61,0x5f,0x4d,0x79,0x6d,0x54,0x33,0x35,0x4c,0x51,0x56,0x6f,0x46,0x53,0x41,0x49]),[_0x3eab41([0x79])]:_0x3eab41([0x6b,0x58,0x49,0x79,0x4a,0x34,0x65,0x76,0x74,0x43,0x45,0x46,0x52,0x6d,0x78,0x4b,0x53,0x55,0x70,0x4b,0x39,0x66,0x44,0x57,0x34,0x35,0x39,0x76,0x58,0x4f,0x76,0x56,0x72,0x68,0x66,0x36,0x75,0x51,0x41,0x65,0x4f,0x69,0x6f]),[_0x3eab41([0x61,0x6c,0x67])]:_0x3eab41([0x45,0x53,0x32,0x35,0x36])},_0x1ed9c3=_0x47b3a9[_0x3eab41([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x3eab41([0x67,0x65,0x74])](_0x3eab41([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x77ff1(){let _0x1bc241,_0x1fcd9f=null,_0x514df6=null;try{if(_0x1ed9c3==_0x3eab41([0x47,0x50,0x4c]))return _0x3eab41([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x1bc241=_0x696861(),!_0x1bc241)return _0x3eab41([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x1bc241[_0x3eab41([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x514df6=_0x1aa6e4(_0x1bc241[_0x3eab41([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x1bc241[_0x3eab41([0x6a,0x74,0x69])])),await _0x4a6fca()?_0x116971()?_0x2c1dc5()?_0x3eab41([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0xc326f6()?(_0x1bc241[_0x3eab41([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x3eab41([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x1fcd9f=_0x81590e(_0x3eab41([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x1bc241[_0x3eab41([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x3eab41([0x74,0x72,0x69,0x61,0x6c])&&(_0x1fcd9f=_0x81590e(_0x3eab41([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x5a1167()):_0x3eab41([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x3eab41([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x3eab41([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch(_0x4a5df3){return _0x3eab41([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x2c1dc5(){const _0x438b73=[_0x3eab41([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x3eab41([0x74,0x72,0x69,0x61,0x6c])][_0x3eab41([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1bc241[_0x3eab41([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x28d675/0x3e8:0xe10*_0x5d5139;return _0x1bc241[_0x3eab41([0x65,0x78,0x70])]<_0x438b73;}function _0x116971(){const _0x388a6b=_0x1bc241[_0x3eab41([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x388a6b&&(!!_0x388a6b[_0x3eab41([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3eab41([0x2a]))||!!_0x388a6b[_0x3eab41([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3eab41([0x41,0x49])));}function _0xc326f6(){const _0x295776=_0x1bc241[_0x3eab41([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x295776||0x0==_0x295776[_0x3eab41([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x11bc5b}=new URL(window[_0x3eab41([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x295776[_0x3eab41([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x11bc5b))return!0x0;const _0x1da49c=_0x11bc5b[_0x3eab41([0x73,0x70,0x6c,0x69,0x74])](_0x3eab41([0x2e]));return _0x295776[_0x3eab41([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x1bbe3a=>_0x1bbe3a[_0x3eab41([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3eab41([0x2a])))[_0x3eab41([0x6d,0x61,0x70])](_0x66b7ce=>_0x66b7ce[_0x3eab41([0x73,0x70,0x6c,0x69,0x74])](_0x3eab41([0x2e])))[_0x3eab41([0x73,0x6f,0x6d,0x65])](_0x40cf25=>_0x1da49c[_0x3eab41([0x65,0x76,0x65,0x72,0x79])]((_0x22788d,_0x11a6dd)=>_0x40cf25[_0x11a6dd]===_0x22788d||_0x40cf25[_0x11a6dd]===_0x3eab41([0x2a])));}function _0x5a1167(){return _0x1fcd9f&&_0x514df6?new window[(_0x3eab41([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x3a3feb,_0x382431)=>{_0x1fcd9f[_0x3eab41([0x74,0x68,0x65,0x6e])](_0x3a3feb,_0x382431),_0x514df6[_0x3eab41([0x74,0x68,0x65,0x6e])](_0x5ae0b6=>{_0x5ae0b6!=_0x3eab41([0x56,0x61,0x6c,0x69,0x64])&&_0x3a3feb(_0x5ae0b6);},_0x382431);}):_0x1fcd9f||_0x514df6||_0x3eab41([0x56,0x61,0x6c,0x69,0x64]);}}function _0x1aa6e4(_0x7ef77,_0x2960d2){return new window[(_0x3eab41([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x577fb9=>{if(_0x52184f())return _0x577fb9(_0x3eab41([0x56,0x61,0x6c,0x69,0x64]));_0x4f6662(),_0x47b3a9[_0x3eab41([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x3eab41([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x2b47ba=!0x1;const _0x5be587=_0x30815e();function _0x334bf7(_0x2cc42f){return!!_0x2cc42f&&(typeof _0x2cc42f===_0x3eab41([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x2cc42f===_0x3eab41([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x2cc42f[_0x3eab41([0x74,0x68,0x65,0x6e])]===_0x3eab41([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x2cc42f[_0x3eab41([0x63,0x61,0x74,0x63,0x68])]===_0x3eab41([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0xa4ec71(_0x2d9f6b){_0x5e3dac(_0x2d9f6b)[_0x3eab41([0x74,0x68,0x65,0x6e])](_0xba592e=>{if(!_0xba592e||_0xba592e[_0x3eab41([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x3eab41([0x6f,0x6b]))return _0x3eab41([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x51bd23(_0x3d8060(_0x5be587+_0x2960d2))!=_0xba592e[_0x3eab41([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x3eab41([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x3eab41([0x56,0x61,0x6c,0x69,0x64]);})[_0x3eab41([0x74,0x68,0x65,0x6e])](_0xbe7e0e=>(_0x1757ea(),_0xbe7e0e),()=>{const _0x3019bb=_0x2822cb();return null==_0x3019bb?(_0x1757ea(),_0x3eab41([0x56,0x61,0x6c,0x69,0x64])):_0x3eab41(_0x28d675-_0x3019bb>(0x64fc6af3^_0x12bd0f)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x3eab41([0x74,0x68,0x65,0x6e])](_0x577fb9)[_0x3eab41([0x63,0x61,0x74,0x63,0x68])](()=>{_0x577fb9(_0x3eab41([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0xc81962=0x40c60073^_0x12bd0f;function _0x1757ea(){const _0x33c169=_0x3eab41([0x6c,0x6c,0x63,0x74,0x2d])+_0x51bd23(_0x3d8060(_0x7ef77)),_0x47758e=_0x495b23(_0x51bd23(window[_0x3eab41([0x4d,0x61,0x74,0x68])][_0x3eab41([0x63,0x65,0x69,0x6c])](_0x28d675/_0xc81962)));window[_0x3eab41([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x3eab41([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x33c169,_0x47758e);}function _0x2822cb(){const _0x552f21=_0x3eab41([0x6c,0x6c,0x63,0x74,0x2d])+_0x51bd23(_0x3d8060(_0x7ef77)),_0x58b081=window[_0x3eab41([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x3eab41([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x552f21);return _0x58b081?window[_0x3eab41([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x495b23(_0x58b081),0x10)*_0xc81962:null;}function _0x5e3dac(_0xcb0784){return new window[(_0x3eab41([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x1e59f2,_0x2e328a)=>{_0xcb0784[_0x3eab41([0x74,0x68,0x65,0x6e])](_0x1e59f2,_0x2e328a),window[_0x3eab41([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x2e328a,0x40f13a33^_0x12bd0f);});}}_0x47b3a9[_0x3eab41([0x6f,0x6e])](_0x3eab41([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x5f1f20,_0x47a10c)=>{if(_0x47a10c[0x0]!=_0x7ef77)return _0x577fb9(_0x3eab41([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x47a10c[0x1]={..._0x47a10c[0x1],[_0x3eab41([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x5be587};},{[_0x3eab41([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x3eab41([0x68,0x69,0x67,0x68])}),_0x47b3a9[_0x3eab41([0x6f,0x6e])](_0x3eab41([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x5d428c=>{_0x334bf7(_0x5d428c[_0x3eab41([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x2b47ba=!0x0,_0xa4ec71(_0x5d428c[_0x3eab41([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x3eab41([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x3eab41([0x6c,0x6f,0x77])}),_0x5af959[_0x3eab41([0x74,0x68,0x65,0x6e])](()=>{_0x2b47ba||_0x577fb9(_0x3eab41([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x52184f(){return _0x47b3a9[_0x3eab41([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x3eab41([0x76,0x69,0x65,0x77])][_0x3eab41([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x3eab41([0x61,0x75,0x74,0x6f]);}function _0x4f6662(){_0x47b3a9[_0x3eab41([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x3eab41([0x76,0x69,0x65,0x77])][_0x3eab41([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x3eab41([0x61,0x75,0x74,0x6f]);}}function _0x81590e(_0x35223e){const _0xca191a=[new window[(_0x3eab41([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3c726c=>setTimeout(_0x3c726c,0x40f9d03f^_0x12bd0f)),_0x5af959[_0x3eab41([0x74,0x68,0x65,0x6e])](()=>new window[(_0x3eab41([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0xf83523=>{let _0x2c49fb=0x0;_0x47b3a9[_0x3eab41([0x6d,0x6f,0x64,0x65,0x6c])][_0x3eab41([0x6f,0x6e])](_0x3eab41([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x145d09,_0x231208)=>{_0x231208[0x0][_0x3eab41([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x2c49fb++,_0x2c49fb==(0x40f0ef0b^_0x12bd0f)&&(_0xf83523(),_0x145d09[_0x3eab41([0x6f,0x66,0x66])]());});}))];return window[_0x3eab41([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x3eab41([0x72,0x61,0x63,0x65])](_0xca191a)[_0x3eab41([0x74,0x68,0x65,0x6e])](()=>_0x35223e);}async function _0x1ee0b6(){await _0x5af959,_0x47b3a9[_0x3eab41([0x6d,0x6f,0x64,0x65,0x6c])][_0x3eab41([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x45a519,_0x47b3a9[_0x3eab41([0x6d,0x6f,0x64,0x65,0x6c])][_0x3eab41([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x45a519,_0x47b3a9[_0x3eab41([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x3eab41([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x4e76ad(_0x1f38d1){const _0x46178e=_0x2845a5();_0x47b3a9[_0x46178e]=_0x3eab41([0x61,0x69,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x1f38d1,_0x1f38d1!=_0x3eab41([0x56,0x61,0x6c,0x69,0x64])&&_0x1ee0b6();}function _0x2845a5(){const _0x2d6a32=window[_0x3eab41([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x3eab41([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x3eab41([0x6e,0x6f,0x77])]())[_0x3eab41([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x3eab41([0x2e]),'');let _0x15ff5e=_0x3eab41([0x45]);for(let _0x3a3171=0x0;_0x3a3171<_0x2d6a32[_0x3eab41([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x3a3171+=0x2){let _0x5a4a21=window[_0x3eab41([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x2d6a32[_0x3eab41([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x3a3171,_0x3a3171+0x2));_0x5a4a21>=_0x526766[_0x3eab41([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x5a4a21-=_0x526766[_0x3eab41([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x15ff5e+=_0x526766[_0x5a4a21];}return _0x15ff5e;}function _0x696861(){const _0x51b8c8=_0x1ed9c3[_0x3eab41([0x73,0x70,0x6c,0x69,0x74])](_0x3eab41([0x2e]));if(0x3!=_0x51b8c8[_0x3eab41([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0xf5c06c(_0x51b8c8[0x1]);function _0xf5c06c(_0x16a41c){const _0xf6e4e7=_0x42de15(_0x16a41c);return _0xf6e4e7&&_0x15b9d3()?_0xf6e4e7:null;function _0x15b9d3(){const _0x529d64=_0xf6e4e7[_0x3eab41([0x6a,0x74,0x69])],_0x497f97=window[_0x3eab41([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x529d64[_0x3eab41([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x529d64[_0x3eab41([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x50459a={..._0xf6e4e7,[_0x3eab41([0x6a,0x74,0x69])]:_0x529d64[_0x3eab41([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x529d64[_0x3eab41([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x50459a[_0x3eab41([0x76,0x63])],_0x3d8060(_0x50459a)==_0x497f97;}}}async function _0x4a6fca(){let _0x468cfe=!0x0;try{const _0x47a574=_0x1ed9c3[_0x3eab41([0x73,0x70,0x6c,0x69,0x74])](_0x3eab41([0x2e])),[_0x503454,_0x3f8797,_0x5c3445]=_0x47a574;return _0x2c3d44(_0x503454),await _0x10d97f(_0x503454,_0x3f8797,_0x5c3445),_0x468cfe;}catch(_0x5b0b4e){return!0x1;}function _0x2c3d44(_0x553792){const _0x315294=_0x42de15(_0x553792);_0x315294&&_0x315294[_0x3eab41([0x61,0x6c,0x67])]==_0x3eab41([0x45,0x53,0x32,0x35,0x36])||(_0x468cfe=!0x1);}async function _0x10d97f(_0x59dfe4,_0x100d68,_0x4f7d07){const _0x4bf232=window[_0x3eab41([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x3eab41([0x66,0x72,0x6f,0x6d])](_0xe66d8a(_0x4f7d07),_0xb27b2e=>_0xb27b2e[_0x3eab41([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x41a59b=new window[(_0x3eab41([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x3eab41([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x59dfe4+_0x3eab41([0x2e])+_0x100d68),_0x573e59=window[_0x3eab41([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x3eab41([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x573e59)return;const _0x58b668=await _0x573e59[_0x3eab41([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x3eab41([0x6a,0x77,0x6b]),_0x371b56,{[_0x3eab41([0x6e,0x61,0x6d,0x65])]:_0x3eab41([0x45,0x43,0x44,0x53,0x41]),[_0x3eab41([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x3eab41([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x3eab41([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x573e59[_0x3eab41([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x3eab41([0x6e,0x61,0x6d,0x65])]:_0x3eab41([0x45,0x43,0x44,0x53,0x41]),[_0x3eab41([0x68,0x61,0x73,0x68])]:{[_0x3eab41([0x6e,0x61,0x6d,0x65])]:_0x3eab41([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x58b668,_0x4bf232,_0x41a59b)||(_0x468cfe=!0x1);}}function _0x42de15(_0xd34f39){return _0xd34f39[_0x3eab41([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x3eab41([0x65,0x79]))?JSON[_0x3eab41([0x70,0x61,0x72,0x73,0x65])](_0xe66d8a(_0xd34f39)):null;}function _0xe66d8a(_0x34f51c){return window[_0x3eab41([0x61,0x74,0x6f,0x62])](_0x34f51c[_0x3eab41([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x3eab41([0x2b]))[_0x3eab41([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x3eab41([0x2f])));}function _0x3d8060(_0x48de29){let _0x47a9ce=0x1505;function _0x56380c(_0x1ea3d0){for(let _0x786c96=0x0;_0x786c96<_0x1ea3d0[_0x3eab41([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x786c96++){const _0xf87942=_0x1ea3d0[_0x3eab41([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x786c96);_0x47a9ce=(_0x47a9ce<<0x5)+_0x47a9ce+_0xf87942,_0x47a9ce&=_0x47a9ce;}}function _0x323815(_0x140eba){Array[_0x3eab41([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x140eba)?_0x140eba[_0x3eab41([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x323815):_0x140eba&&typeof _0x140eba==_0x3eab41([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x3eab41([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x140eba)[_0x3eab41([0x73,0x6f,0x72,0x74])]()[_0x3eab41([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x4b9ebe,_0x476e27])=>{_0x56380c(_0x4b9ebe),_0x323815(_0x476e27);}):_0x56380c(window[_0x3eab41([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x140eba));}return _0x323815(_0x48de29),_0x47a9ce>>>0x0;}function _0x51bd23(_0x508401){return _0x508401[_0x3eab41([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x3eab41([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x3eab41([0x30]));}function _0x495b23(_0x226fd1){return _0x226fd1[_0x3eab41([0x73,0x70,0x6c,0x69,0x74])]('')[_0x3eab41([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x3eab41([0x6a,0x6f,0x69,0x6e])]('');}function _0x45a519(){}function _0x3eab41(_0xa4f95d){return _0xa4f95d['map'](_0x19b092=>String['fromCharCode'](_0x19b092))['join']('');}_0x4e76ad(await _0x77ff1());}(this);}['showFakeVisualSelection'](){const _0x2fa007=this['editor']['model'];_0x2fa007['change'](_0x3ded24=>{const _0x41fb26=_0x2fa007['document']['selection']['getRanges']();let _0x227ab2=0x0;for(const _0x6bb2bf of _0x41fb26){const _0x4bd9d2=f+':'+_0x227ab2;if(_0x2fa007['markers']['has'](_0x4bd9d2))_0x3ded24['updateMarker'](_0x4bd9d2,{'range':_0x6bb2bf});else{if(_0x6bb2bf['start']['isAtEnd']){const _0xf20858=_0x6bb2bf['start']['getLastMatchingPosition'](({item:_0x1588e2})=>!_0x2fa007['schema']['isContent'](_0x1588e2),{'boundaries':_0x6bb2bf});_0x3ded24['addMarker'](_0x4bd9d2,{'usingOperation':!0x1,'affectsData':!0x1,'range':_0x3ded24['createRange'](_0xf20858,_0x6bb2bf['end'])});}else _0x3ded24['addMarker'](_0x4bd9d2,{'usingOperation':!0x1,'affectsData':!0x1,'range':_0x6bb2bf});}_0x227ab2++;}});}['hideFakeVisualSelection'](){const _0x281cd8=this['editor']['model'],_0x28a828=Array['from'](this['editor']['model']['markers']['getMarkersGroup'](f));_0x28a828['length']&&_0x281cd8['change'](_0x2e9383=>{_0x28a828['forEach'](_0x55e370=>{_0x2e9383['removeMarker'](_0x55e370);});});}['insertContent'](_0x3d24be,_0x132b21){const _0x2b27cc=this['_getAISelection'](),_0x1c49f8=_0x132b21||_0x2b27cc['getFirstRange']();this['editor']['model']['canEditAt'](_0x1c49f8)&&this['editor']['model']['change'](_0x5a674b=>{this['hideFakeVisualSelection'](),_0x132b21||this['_resetContentOfSelectedTableCells'](_0x5a674b,_0x2b27cc),this['_pasteHTMLUsingClipboard']({'insertAt':_0x1c49f8,'writer':_0x5a674b,'html':_0x3d24be});});}['insertContentBelow'](_0x3ae8d2){const {model:_0x187177}=this['editor'],_0x24d41c=this['_getAISelection']();_0x187177['change'](()=>{const _0x48c7df=this['_prepareTableInsertBelowPosition'](_0x3ae8d2,_0x24d41c)||this['_getDefaultInsertBelowPosition'](_0x24d41c);this['insertContent'](_0x3ae8d2,_0x48c7df);});}['_getAISelection'](){const _0x572b44=this['editor']['model'],_0x526a80=Array['from'](_0x572b44['markers']['getMarkersGroup'](f))['map'](_0x3fc242=>_0x3fc242['getRange']());return _0x572b44['createSelection'](_0x526a80);}['_pasteHTMLUsingClipboard']({writer:_0xbf3f59,html:_0xbfb476,insertAt:_0x32b510}){const {view:_0x380224}=this['editor']['editing'],_0x1f1697=this['editor']['plugins']['get'](_0x4c0f95),_0x33ab7c=new gt();_0x33ab7c['setData']('text/html',_0xbfb476);const _0x352b38=new ClipboardEvent('paste',{'clipboardData':_0x33ab7c}),_0x532540=new _0x1ee063(_0x380224,_0x352b38,{'dataTransfer':new _0xa3a525(_0x33ab7c)});_0xbf3f59['setSelection'](_0x32b510);const _0x2536f7=(_0x3c8129,_0xadf812)=>{_0xadf812['resultRange']&&_0xbf3f59['setSelection'](_0xadf812['resultRange']);};_0x1f1697['once']('contentInsertion',_0x2536f7,{'priority':'lowest'}),_0x380224['document']['fire']('paste',_0x532540),_0x1f1697['off']('contentInsertion',_0x2536f7);}['_getDefaultInsertBelowPosition'](_0x55f779){const {model:_0x3f9581}=this['editor'],_0x1da5e8=Array['from'](_0x55f779['getSelectedBlocks']());return _0x1da5e8['length']?_0x3f9581['createPositionAfter'](_0x1da5e8['pop']()):_0x55f779['getLastPosition']();}['_prepareTableInsertBelowPosition'](_0x241e19,_0x2a9eaa){const {model:_0x32cad5,plugins:_0x15af7d}=this['editor'];if(_0x15af7d['has']('TableUtils')){const _0x18c0ec=_0x15af7d['get']('TableUtils')['getSelectedTableCells'](_0x2a9eaa);if(_0x18c0ec['length']){const _0x111db9=this['_getTableRowCountFromContent'](_0x241e19),_0x9245c1=this['_createEmptyTableRows'](_0x18c0ec,_0x111db9);return _0x32cad5['createPositionAt'](_0x9245c1,0x0);}}return null;}['_getTableRowCountFromContent'](_0x42bcf4){const _0x489a62=this['editor']['plugins']['get']('TableUtils'),_0x2e8596=this['editor']['data']['parse'](_0x42bcf4),_0x80f6c=Array['from'](_0x2e8596['getChildren']())['filter'](_0x50bd2a=>_0x50bd2a['is']('element','table'));let _0x46eb79=0x0;return _0x80f6c['forEach'](_0x2bef8c=>{_0x46eb79+=_0x489a62['getRows'](_0x2bef8c);}),_0x46eb79;}['_createEmptyTableRows'](_0x17136b,_0x58a917){const _0x24abfa=this['editor']['plugins']['get']('TableUtils'),_0x395995=_0x24abfa['getRowIndexes'](_0x17136b),_0x15f59b=_0x24abfa['getColumnIndexes'](_0x17136b),_0x18085c=_0x395995['last']+0x1,_0x3c9786=_0x15f59b['first'],_0x200710=_0x17136b[0x0]['findAncestor']('table');for(let _0x5d8720=0x0;_0x5d8720<_0x58a917;_0x5d8720++)_0x24abfa['insertRows'](_0x200710,{'at':_0x18085c});return _0x200710['getChild'](_0x18085c)['getChild'](_0x3c9786);}['_resetContentOfSelectedTableCells'](_0x23fd85,_0x5d66f1){const {plugins:_0x50616d}=this['editor'],{model:_0x382518}=_0x23fd85;if(!_0x50616d['has']('TableUtils'))return;_0x50616d['get']('TableUtils')['getSelectedTableCells'](_0x5d66f1)['length']&&_0x382518['deleteContent'](_0x5d66f1);}}class E extends _0x10058d{static get['pluginName'](){return'AIAdapter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['afterInit'](){if(!this['textAdapter'])throw new _0x18b185('aiadapter-text-adapter-not-set',null);}}class R extends Error{constructor(_0x4c6b57){super(_0x4c6b57),this['name']='AIRequestError';}}function i(_0x4f63a8,_0x146b74,_0x1d029a){const t=_0x4f63a8['t'];switch(_0x146b74){case'Edit\x20or\x20review':return t('Edit\x20or\x20review');case'Improve\x20writing':return t('Improve\x20writing');case'Make\x20shorter':return t('Make\x20shorter');case'Make\x20longer':return t('Make\x20longer');case'Simplify\x20language':return t('Simplify\x20language');case'Generate\x20from\x20selection':return t('Generate\x20from\x20selection');case'Summarize':return t('Summarize');case'Continue':return t('Continue');case'Change\x20tone':return t('Change\x20tone');case'Professional':return t('Professional');case'Casual':return t('Casual');case'Direct':return t('Direct');case'Confident':return t('Confident');case'Friendly':return t('Friendly');case'Change\x20style':return t('Change\x20style');case'Business':return t('Business');case'Legal':return t('Legal');case'Journalism':return t('Journalism');case'Poetic':return t('Poetic');case'Translate':return t('Translate');case'English':return t('English');case'Spanish':return t('Spanish');case'German':return t('German');case'Portuguese':return t('Portuguese');case'French':return t('French');case'Simplified\x20Chinese':return t('Simplified\x20Chinese');case'Hindi':return t('Hindi');case'Arabic':return t('Arabic');case'AI\x20Assistant':return t('AI\x20Assistant');case'AI\x20Commands':return t('AI\x20Commands');case'Ask\x20AI\x20to\x20edit\x20or\x20generate':return t('Ask\x20AI\x20to\x20edit\x20or\x20generate');case'Ask\x20AI\x20to\x20improve\x20generated\x20text':return t('Ask\x20AI\x20to\x20improve\x20generated\x20text');case'Copy':return t('Copy');case'Submit':return t('Submit');case'Insert\x20below':return t('Insert\x20below');case'Try\x20again':return t('Try\x20again');case'Stop':return t('Stop');case'AI\x20is\x20writing...':return t('AI\x20is\x20writing...');case'AI\x20is\x20writing':return t('AI\x20is\x20writing');case'Generated\x20content:\x20%0':return t('Generated\x20content:\x20%0',_0x1d029a);case'Error\x20during\x20AI\x20content\x20generation:\x20%0':return t('Error\x20during\x20AI\x20content\x20generation:\x20%0',_0x1d029a);case'History':return t('History');case'Empty\x20history':return t('Empty\x20history');case'Ask\x20AI\x20and\x20your\x20prompts\x20will\x20be\x20listed\x20here\x20for\x20you\x20to\x20use\x20later.':return t('Ask\x20AI\x20and\x20your\x20prompts\x20will\x20be\x20listed\x20here\x20for\x20you\x20to\x20use\x20later.');case'Prompt\x20history':return t('Prompt\x20history');case'Clear':return t('Clear');case'AI_REPLACE_CONTENT':return t({'id':'AI_REPLACE_CONTENT','string':'Replace'});case'AI_INSERT_CONTENT':return t({'id':'AI_INSERT_CONTENT','string':'Insert'});case'AI_ERROR_GET_HEADERS':return t({'id':'AI_ERROR_GET_HEADERS','string':'Preparing\x20request\x20headers\x20failed'});case'AI_ERROR_GET_PARAMETERS':return t({'id':'AI_ERROR_GET_PARAMETERS','string':'Preparing\x20request\x20parameters\x20failed'});case'AI_ERROR_UNSUPPORTED_MODEL':return t({'id':'AI_ERROR_UNSUPPORTED_MODEL','string':'The\x20requested\x20AI\x20model\x20(\x22%0\x22)\x20is\x20not\x20supported'},_0x1d029a);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 _0x146b74;}}class j extends _0x17e1b6{['_commandDefinitions'];constructor(_0xaa6d26,_0xa0d29f){super(_0xaa6d26),this['_commandDefinitions']=_0xa0d29f,this['set']('enabledCommandsIds',[]),this['on']('change:_hasContext',(_0x34d485,_0x51480b,_0x18a439)=>{this['isEnabled']&&(this['enabledCommandsIds']=G(this['_commandDefinitions'],_0x18a439));}),this['set']('_hasContext',!0x1),this['on']('change:isEnabled',(_0xf751a0,_0x1a7a9c,_0x1b1481)=>{this['enabledCommandsIds']=_0x1b1481?G(this['_commandDefinitions'],this['_hasContext']):[];});}['refresh'](){const _0x243650=this['editor']['model'];this['_hasContext']=function(_0x39bdba){const _0xd47b13=_0x39bdba['document']['selection'];return _0xd47b13['isCollapsed']?0x0!==[..._0xd47b13['getSelectedBlocks']()]['length']&&![..._0xd47b13['getSelectedBlocks']()][0x0]['isEmpty']:!!_0x39bdba['hasContent'](_0xd47b13['getFirstRange']());}(_0x243650);const _0x23393b=_0x243650['document']['selection'],_0x30dcb9=this['editor']['config']['get']('ai.aiAssistant.disabledElements');for(const _0x1e70e7 of _0x23393b['getRanges']())for(const _0x373672 of _0x1e70e7['getItems']())if(_0x373672['is']('element')&&_0x30dcb9['includes'](_0x373672['name']))return void(this['isEnabled']=!0x1);this['isEnabled']=!0x0;}['execute'](_0x115583='',_0x1105be='',_0x5d2adf='custom'){this['editor']['plugins']['get'](n)['showUI'](_0x115583,_0x1105be,_0x5d2adf);}}function G(_0x332c7e,_0x4f57e5){const _0x2b9d6b=new Set();for(const _0x5d1f1f of _0x332c7e['values']())(_0x4f57e5||!0x1===_0x5d1f1f['requiresContent'])&&_0x2b9d6b['add'](_0x5d1f1f['id']);return Array['from'](_0x2b9d6b);}const Z=new RegExp(/^(.*?)<[a-zA-Z][a-zA-Z0-9_\-.]*[ >]/,'is');class k extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x50d075(){['editor'];['textAdapter'];['view'];['_sanitizationContainer'];['_domParser'];['_xmlSerializer'];constructor(_0x5695aa,_0x48c2af,_0x532165){super(),this['editor']=_0x5695aa,this['textAdapter']=_0x48c2af,this['_sanitizationContainer']=document['createElement']('div'),this['_domParser']=new DOMParser(),this['_xmlSerializer']=new XMLSerializer(),this['view']=_0x532165,this['set']({'initialContext':'','currentContext':'','currentResponse':'','previousContext':void 0x0,'previousQuery':void 0x0,'previousLabel':void 0x0,'isProcessing':!0x1}),this['on']('set:currentContext',(_0x4996d5,_0x239e35,_0x5a8407)=>{this['view']['value']=this['_sanitizeHTML'](_0x5a8407);}),this['listenTo'](this['view'],'submitPrompt',(_0x56abb3,_0xd9251f)=>{const _0x33806e=this['currentContext']||this['initialContext'];this['_handleQuery'](_0xd9251f,_0x33806e,'custom');}),this['listenTo'](this['view'],'tryAgainEvent',()=>{this['view']['prompt']=this['previousLabel'],this['_handleQuery'](this['previousQuery'],this['previousContext'],this['previousActionId'],this['previousLabel']);}),this['listenTo'](this['view'],'stopProcessing',()=>{this['stopProcessing']();});}['destroy'](){this['stopListening']();}async['updateView']({actionId:_0x454639,query:_0x3fcdc3,htmlContent:_0x3295de,label:_0x302263,mainActionLabel:_0x5610c5}){this['view']['prompt']=_0x302263,this['view']['mainAction']=_0x5610c5,this['initialContext']=_0x3295de,_0x3fcdc3&&(this['view']['isRendered']?this['_handleQuery'](_0x3fcdc3,_0x3295de,_0x454639,_0x302263):this['view']['once']('render',()=>{this['_handleQuery'](_0x3fcdc3,_0x3295de,_0x454639,_0x302263);}));}['stopProcessing'](){this['isProcessing']&&(this['isProcessing']=!0x1,this['view']['finishProcessing'](),this['textAdapter']['abort']());}['reset'](){this['initialContext']='',this['currentContext']='',this['currentResponse']='',this['previousContext']='',this['previousQuery']='',this['previousLabel']='',this['previousActionId']=void 0x0,this['view']['reset'](),this['stopProcessing']();}async['_handleQuery'](_0x55719a,_0x161f60,_0x3218e5,_0x4fa2b0){return this['isProcessing']=!0x0,this['view']['startProcessing'](),this['previousContext']=_0x161f60,this['previousQuery']=_0x55719a,this['previousLabel']=_0x4fa2b0||_0x55719a,this['previousActionId']=_0x3218e5,new Promise(_0x347d45=>{this['textAdapter']['makeRequest']({'query':_0x55719a,'context':_0x161f60,'onData':_0x539a3f=>{this['currentResponse']=_0x539a3f,this['currentContext']=this['_parseAndNormalizeContent'](this['currentResponse']);},'actionId':_0x3218e5})['then'](()=>{!this['currentContext']&&this['currentResponse']&&(this['currentContext']=this['_parseAndNormalizeContent'](this['currentResponse'],!0x0));})['catch'](_0x3b83c8=>{_0x3b83c8 instanceof R?this['view']['handleError'](_0x3b83c8['message']):this['view']['handleError'](),_0x347d45();})['finally'](()=>{this['stopProcessing'](),_0x347d45();});});}['_parseAndNormalizeContent'](_0x29efee,_0x3f2fb0=!0x1){const _0x208edb=Z['exec'](_0x29efee);_0x29efee=_0x208edb?_0x29efee['substring'](_0x208edb[0x1]['length']):_0x29efee['length']<0x64&&!_0x3f2fb0?'':this['_stripMarkdownSyntax'](_0x29efee);const _0x2fb7e0=this['_domParser']['parseFromString'](_0x29efee,'text/html');if(_0x208edb){const _0x2f2e44=Array['from'](_0x2fb7e0['body']['childNodes']);_0x2f2e44['reverse']();for(const _0x100a64 of _0x2f2e44){if(_0x100a64['nodeType']==Node['ELEMENT_NODE'])break;_0x100a64['remove']();}}const _0x3e0a7b=this['editor']['data']['processor']['toView'](this['_xmlSerializer']['serializeToString'](_0x2fb7e0['body']));this['_isH1TagSupportEnabled']()||this['_normalizeResponseHeadings'](_0x3e0a7b);const _0x2b2ae0=this['editor']['config']['get']('ai.aiAssistant.preserveComments'),_0x1f21a6=this['editor']['data']['toModel'](_0x3e0a7b);return _0x2b2ae0||_0x1f21a6['markers']['clear'](),this['editor']['data']['stringify'](_0x1f21a6);}['_normalizeResponseHeadings'](_0x71bab8){const _0x1ce8a7=new _0x55dbfc(this['editor']['editing']['view']['document']),_0x238421=new _0x379e14({'name':/^h[1-5]$/}),_0x5d9b34=[];let _0x251b8c=!0x1;for(const _0x46ff92 of _0x71bab8)_0x46ff92['is']('element')&&_0x238421['match'](_0x46ff92)&&(_0x5d9b34['push'](_0x46ff92),'h1'==_0x46ff92['name']&&(_0x251b8c=!0x0));if(_0x251b8c){for(const _0x990319 of _0x5d9b34)_0x1ce8a7['rename']('h'+(parseInt(_0x990319['name'][0x1])+0x1),_0x990319);}}['_isH1TagSupportEnabled'](){const {data:_0x1a52d7,editing:_0x4a06f3}=this['editor'],_0x1a7dcf=_0x1a52d7['htmlProcessor']['toView']('<h1></h1>'),_0x3ef42a=_0x1a52d7['toView'](_0x1a52d7['toModel'](_0x1a7dcf));return!!_0x4a06f3['view']['domConverter']['viewToDom'](_0x3ef42a)['querySelector']('h1');}['_sanitizeHTML'](_0x12dee7){return this['editor']['editing']['view']['domConverter']['setContentOf'](this['_sanitizationContainer'],_0x12dee7),this['_sanitizationContainer']['innerHTML'];}['_stripMarkdownSyntax'](_0x48639b){const _0x51a544=_0x48639b['trim']();return _0x51a544['startsWith']('```html')?_0x51a544['endsWith']('```')?_0x51a544['substring'](0x7,_0x51a544['length']-0x3):_0x51a544['substring'](0x7):_0x48639b;}}const M={'REPLACE':'replace','INSERT':'insert'};class lt extends at{constructor(_0x4d123b){super(_0x4d123b),this['set']('isVisible',!0x1),this['set']('mainAction',M['REPLACE']),this['replaceButton']=this['_createButton']('','ck-button-action'),this['replaceButton']['bind']('label')['to'](this,'mainAction',_0x2070e9=>i(_0x4d123b,'AI_'+_0x2070e9['toUpperCase']()+'_CONTENT')),this['insertButton']=this['_createButton'](i(_0x4d123b,'Insert\x20below')),this['tryAgainButton']=this['_createButton'](i(_0x4d123b,'Try\x20again')),this['stopButton']=this['_createButton'](i(_0x4d123b,'Stop'));const _0x85f4c=this['bindTemplate'];this['extendTemplate']({'attributes':{'class':['ck-ai-form__toolbar',_0x85f4c['if']('isVisible','ck-hidden',_0x3db947=>!_0x3db947)]}}),this['items']['addMany']([this['replaceButton'],this['insertButton'],this['tryAgainButton'],this['stopButton']]);}['_createButton'](_0x5c71af,_0x1b14d3){const _0x451892=new _0x16a741(this['locale']);return _0x451892['set']({'label':_0x5c71af,'class':_0x1b14d3||'','isVisible':!0x0,'withText':!0x0}),_0x451892;}}class Y extends _0x102de5{['contentFieldView'];['copyButtonView'];constructor(_0xbbf083,_0x5cd245=''){super(_0xbbf083),this['set']({'value':null,'isVisible':!0x1,'isProcessing':!0x1});const _0x4f318f=this['bindTemplate'];this['contentFieldView']=new At(_0xbbf083,_0x5cd245),this['copyButtonView']=this['_createCopyButton'](),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form__content-area-wrapper',_0x4f318f['if']('isVisible','ck-hidden',_0x493c28=>!_0x493c28)],'tabindex':'-1'},'children':[{'tag':'div','attributes':{'class':['ck','ck-ai-form__content-area',_0x4f318f['if']('isProcessing','ck-ai-form__content-area--processing')]},'children':[this['contentFieldView'],{'tag':'div','attributes':{'class':['ck','ck-ai-form__copy-button-wrapper']},'children':[this['copyButtonView']]}]}]});}['render'](){super['render'](),this['value']&&this['contentFieldView']['setContent'](this['value']);let _0x335e22=!0x1;this['on']('change:value',(_0xacd903,_0x126656,_0x1fe9f2)=>{const _0x37ecdd=!this['contentFieldView']['element']['querySelector']('.ck-ai-form__loader');this['contentFieldView']['setContent'](_0x1fe9f2),this['isProcessing']&&_0x37ecdd&&!_0x335e22&&this['element']['scrollTo']({'top':this['element']['scrollHeight'],'behavior':'smooth'});}),this['on']('change:isProcessing',(_0xea4d15,_0x44011b,_0x46afbd)=>{_0x335e22=!0x1,_0x46afbd?(this['value']=null,this['contentFieldView']['appendLoader']()):this['value']||this['contentFieldView']['setContent']('');}),this['listenTo'](this['element'],'wheel',()=>{_0x335e22=!0x0;}),this['listenTo'](this['element'],'mousedown',()=>{_0x335e22=!0x0;});}['focus'](){this['element']['focus']();}['_createCopyButton'](){const _0x39bc72=this['locale'],_0x5f09bd=new _0x16a741(this['locale']),_0x273a1a='ck-ai-form__copy-button';return _0x5f09bd['set']({'label':i(_0x39bc72,'Copy'),'icon':_0x5ad3c1,'class':_0x273a1a,'tooltip':!0x0}),_0x5f09bd['bind']('isVisible')['to'](this,'value',_0x5552a3=>!!_0x5552a3),_0x5f09bd['bind']('isEnabled')['to'](this,'isProcessing',_0x10a6c6=>!_0x10a6c6),_0x5f09bd['on']('execute',()=>{this['_copyHTMLToClipboard'](this['contentFieldView']['element']),_0x5f09bd['icon']=_0x15d5a6,_0x5f09bd['class']=_0x273a1a+'\x20ck-ai-form__copy-button--copied',this['focus'](),setTimeout(()=>{_0x5f09bd['icon']=_0x5ad3c1,_0x5f09bd['class']=_0x273a1a;},0x3e8);}),_0x5f09bd;}['_copyHTMLToClipboard'](_0x6c3463){const {window:_0x3b5420,document:_0x174498}=_0x4877bc;if(_0x3b5420['ClipboardItem']){const {Blob:_0x34e200,ClipboardItem:_0x13d16f}=_0x3b5420,_0x22f224=[new _0x13d16f({'text/html':new _0x34e200([_0x6c3463['innerHTML']],{'type':'text/html'}),'text/plain':new _0x34e200([_0x6c3463['textContent']||''],{'type':'text/plain'})})];navigator['clipboard']['write'](_0x22f224);}else{const _0xcb180a=_0x174498['createElement']('div');_0xcb180a['style']['position']='absolute',_0xcb180a['style']['left']='-9999px',_0xcb180a['innerHTML']='<span>[</span>'+_0x6c3463['innerHTML']+'<span>]</span>',_0x174498['body']['appendChild'](_0xcb180a);const _0x480156=_0x174498['createRange']();_0x480156['setStartAfter'](_0xcb180a['firstElementChild']),_0x480156['setEndBefore'](_0xcb180a['lastElementChild']);const _0x261ece=_0x3b5420['getSelection']();_0x261ece['removeAllRanges'](),_0x261ece['addRange'](_0x480156),_0x174498['execCommand']('copy'),_0xcb180a['remove']();}}}class At extends _0x102de5{constructor(_0x21a420,_0x23be19=''){super(_0x21a420),this['loaderView']=this['_createLoader'](),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-content',_0x23be19,'ck-reset_all-excluded','ck-ai-form__content-field']}});}['setContent'](_0x49118d){this['element']['innerHTML']=_0x49118d;}['appendLoader'](){this['element']['appendChild'](this['loaderView']['element']);}['_createLoader'](){const _0xfa2f8=new _0x102de5(),_0x3975e7=this['locale'],_0x5a792e=new _0x2a10d0();return _0x5a792e['isVisible']=!0x0,_0xfa2f8['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form__loader']},'children':[_0x5a792e,{'text':i(_0x3975e7,'AI\x20is\x20writing...')}]}),_0xfa2f8['render'](),_0xfa2f8;}}class st extends _0x102de5{constructor(_0x48ea9a,_0x1024a5=''){super(_0x48ea9a);const _0x482e5e=new rt(),_0x817920=this['bindTemplate'];this['set']('text',_0x1024a5),_0x482e5e['content']=tt,this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form__error']},'children':[_0x482e5e,{'text':_0x817920['to']('text')}]});}}class ct extends nt{['submitButtonView'];['showHistoryButtonView'];constructor(_0x53299b,_0x3d236f){super(_0x53299b,_0x3d236f),this['queryView']['fieldView']['minRows']=0x1,this['queryView']['fieldView']['maxRows']=0x3,this['submitButtonView']=this['_createSubmitButton'](),this['showHistoryButtonView']=this['_createShowHistoryButton'](),this['focusableChildren']['add'](this['showHistoryButtonView'],0x1),this['focusableChildren']['add'](this['submitButtonView']);}['render'](){super['render'](),this['queryView']['fieldWrapperChildren']['add'](this['showHistoryButtonView']),this['children']['add'](this['submitButtonView']),this['keystrokes']['set']('enter',(_0x49704f,_0x5755cb)=>{_0x49704f['target']==this['queryView']['fieldView']['element']&&(this['submit'](),_0x5755cb());});}['_createSubmitButton'](){const _0x18e3e3=new _0x16a741(this['locale']),_0x112400=this['locale'];return _0x18e3e3['set']({'icon':ht,'label':i(_0x112400,'Submit'),'isVisible':!0x0,'tooltip':!0x0,'class':'ck-ai-form__submit'}),_0x18e3e3['on']('execute',()=>{this['submit']();}),_0x18e3e3['bind']('isEnabled')['to'](this['queryView']['fieldView'],'isEmpty',this,'isEnabled',(_0x2e8bfc,_0x20b689)=>!_0x2e8bfc&&_0x20b689),_0x18e3e3;}['_createShowHistoryButton'](){const _0x5e2031=new _0x16a741(this['locale']),_0x2ca03d=this['resultsView'],_0x42eabf=this['locale'];_0x5e2031['set']({'label':i(_0x42eabf,'History'),'withText':!0x1,'icon':et,'tooltip':!0x0,'tooltipPosition':'sw','class':'ck-ai-form__toggle-history'}),_0x5e2031['bind']('isOn')['to'](_0x2ca03d,'isVisible'),_0x5e2031['bind']('isEnabled')['to'](this,'isEnabled'),_0x5e2031['on']('execute',()=>{_0x2ca03d['isVisible']=!_0x2ca03d['isVisible'],_0x2ca03d['isVisible']?this['filteredView']['focus']():this['focus']();});const _0x493041=()=>{_0x4877bc['window']['requestAnimationFrame'](()=>{if(ot(this['element'])){const _0x2d103d=new it(this['queryView']['fieldView']['element']),_0x28f5fd=_0x2d103d['width'],_0x1ce79c='rtl'===_0x42eabf['uiLanguageDirection']?'left':'right';_0x2d103d['excludeScrollbarsAndBorders'](),_0x5e2031['element']['style'][_0x1ce79c]=_0x28f5fd-_0x2d103d['width']+0x1+'px';}});};return this['queryView']['fieldView']['on']('update',_0x493041),this['on']('render',_0x493041),_0x5e2031;}['submit'](){const _0xc94dc2=this['queryView']['fieldView']['element']['value'];this['fire']('submit',_0xc94dc2);}['focus'](_0xe579ee){-0x1===_0xe579ee?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}}class ft extends Ct{['historyGroupView'];['clearHistoryButton'];constructor(_0x482ba5){super(_0x482ba5),this['clearHistoryButton']=this['_createClearHistoryButton'](),this['historyGroupView']=new Ht(),this['historyGroupView']['children']['add'](this['clearHistoryButton'],0x1),this['historyGroupView']['label']=i(_0x482ba5,'Prompt\x20history'),this['historyGroupView']['items']['delegate']('execute')['to'](this),this['items']['add'](this['historyGroupView']);}['filter'](){let _0x4e3971=0x0;for(const _0x14aa52 of this['items'])_0x4e3971+=_0x14aa52['items']['length'];return{'resultsCount':_0x4e3971,'totalItemsCount':_0x4e3971};}['_createClearHistoryButton'](){const _0x4ebfe8=this['locale'],_0x5b867a=new _0x16a741(this['locale']);return _0x5b867a['set']({'label':'('+i(_0x4ebfe8,'Clear')+')','withText':!0x0}),_0x5b867a['on']('execute',()=>this['fire']('clearHistory')),_0x5b867a;}}class bt extends xt{constructor(_0x502f35){super();const _0x57acf3=new kt(),_0x1f0d28=new _0x16a741(this['locale'],_0x57acf3);this['children']['add'](_0x1f0d28),_0x1f0d28['set']({'label':_0x502f35['prompt'],'withText':!0x0}),_0x1f0d28['on']('execute',()=>{this['fire']('execute',{'value':jt(_0x502f35['prompt'])});});}}const ts='CKEditor/AIFormView/PromptHistory';class wt extends _0x3c554f{constructor(){super(),this['_loadFromSessionStorage'](),this['on']('add',(_0x3d3781,_0x13c355)=>{const _0x273085=os(_0x13c355['prompt']);for(const _0xbaa565 of this)if(_0xbaa565!=_0x13c355&&os(_0xbaa565['prompt'])===_0x273085){this['remove'](_0xbaa565);break;}this['length']>0x14&&this['remove'](this['last']),this['_saveToSessionStorage']();}),this['on']('remove',()=>{this['_saveToSessionStorage']();});}['_loadFromSessionStorage'](){const _0x48467f=sessionStorage['getItem'](ts)||'[]';this['addMany'](JSON['parse'](_0x48467f));}['_saveToSessionStorage'](){sessionStorage['setItem'](ts,JSON['stringify'](this['map'](_0x2ba852=>_0x2ba852)));}}function os(_0x40a8e1){return _0x40a8e1['toLowerCase']()['trim']();}class _ extends _0x102de5{['focusTracker'];['keystrokes'];['contentArea'];['toolbar'];['promptView'];['errorView'];['_focusables'];['focusCycler'];['_promptHistory'];constructor(_0x4385b0,_0x267027,_0x1aee4c=''){super(_0x4385b0),this['set']('isEnabled',!0x0),this['set']('isProcessing',!0x1),this['set']('prompt',''),this['set']('value',''),this['set']('isError',!0x1),this['set']('mainAction',M['REPLACE']),this['_promptHistory']=new wt(),this['errorView']=new st(_0x4385b0),this['contentArea']=new Y(_0x4385b0,_0x1aee4c),this['contentArea']['bind']('isProcessing')['to'](this),this['contentArea']['bind']('value')['to'](this),this['toolbar']=this['_createToolbar'](),this['toolbar']['bind']('mainAction')['to'](this),this['promptView']=this['_createPromptView'](),this['focusTracker']=new mt(),this['keystrokes']=new ut(),this['_focusables']=this['createCollection']([this['contentArea'],this['contentArea']['copyButtonView'],this['toolbar'],this['promptView']]),this['focusCycler']=new pt({'focusables':this['_focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift\x20+\x20tab','focusNext':'tab'}}),this['focusCycler']['chain'](this['promptView']['focusCycler']),this['promptView']['queryView']['fieldView']['bind']('value')['to'](this,'prompt');const _0x3499c6=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form',_0x267027],'tabindex':'-1'},'children':[{'tag':'div','attributes':{'class':['ck','ck-ai-form-content']},'children':[{'tag':'div','attributes':{'class':[_0x3499c6['if']('isError','ck-hidden',_0x561dea=>!_0x561dea)]},'children':[this['errorView']]},this['contentArea'],this['toolbar'],this['promptView']]}]});}['render'](){super['render'](),this['focusTracker']['add'](this['contentArea']['element']),this['focusTracker']['add'](this['contentArea']['copyButtonView']['element']),this['focusTracker']['add'](this['toolbar']['element']),this['focusTracker']['add'](this['promptView']['element']),this['keystrokes']['listenTo'](this['element']);}['focus'](_0x5cd2b3=0x1){-0x1===_0x5cd2b3?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['reset'](){this['prompt']='',this['value']='',this['isError']=!0x1,this['promptView']['reset'](),this['contentArea']['isVisible']=!0x1,this['toolbar']['isVisible']=!0x1;}['_createPromptView'](){const _0xa0ef41=this['locale'],_0x1b788c=new ct(_0xa0ef41,{'queryView':{'label':i(_0xa0ef41,'Ask\x20AI\x20to\x20edit\x20or\x20generate'),'creator':dt,'showIcon':!0x1,'showResetButton':!0x1},'infoView':{'text':{'noSearchableItems':{'primary':i(_0xa0ef41,'Empty\x20history'),'secondary':i(_0xa0ef41,'Ask\x20AI\x20and\x20your\x20prompts\x20will\x20be\x20listed\x20here\x20for\x20you\x20to\x20use\x20later.')}}},'filteredView':this['_createHistoryView'](),'queryMinChars':0x1/0x0,'resetOnBlur':!0x1});return _0x1b788c['bind']('isEnabled')['to'](this,'isEnabled',this,'isProcessing',(_0xf30eaf,_0x5a18b3)=>_0xf30eaf&&!_0x5a18b3),this['listenTo'](_0x1b788c,'submit',(_0x5d5357,_0x5ebf43)=>{this['prompt']=_0x5ebf43;const _0x449a35=yt(_0x5ebf43);this['fire']('submitPrompt',_0x449a35),_0x5ebf43['trim']()&&this['_promptHistory']['add']({'prompt':_0x449a35},0x0);},{'priority':'high'}),_0x1b788c;}['_createHistoryView'](){const _0x3b5c18=new ft(this['locale']);return _0x3b5c18['historyGroupView']['items']['bindTo'](this['_promptHistory'])['as'](bt),_0x3b5c18['on']('clearHistory',()=>{this['_promptHistory']['clear'](),this['promptView']['search'](''),this['promptView']['focus']();}),_0x3b5c18;}['_createToolbar'](){const _0x34d3c1=new lt(this['locale']);return _0x34d3c1['replaceButton']['bind']('isEnabled')['to'](this,'isEnabled',this,'isProcessing',this,'value',(_0x4ecb05,_0x32e1ad,_0x9d0c6)=>_0x4ecb05&&!_0x32e1ad&&!!_0x9d0c6),_0x34d3c1['replaceButton']['delegate']('execute')['to'](this,'replaceContent'),_0x34d3c1['insertButton']['bind']('isEnabled')['to'](this,'isEnabled',this,'isProcessing',this,'value',(_0x33d37e,_0x2e81fb,_0x3228ff)=>_0x33d37e&&!_0x2e81fb&&!!_0x3228ff),_0x34d3c1['insertButton']['delegate']('execute')['to'](this,'insertContentBelow'),_0x34d3c1['tryAgainButton']['bind']('isEnabled')['to'](this,'isEnabled',this,'isProcessing',(_0x3c4436,_0x19ddd7)=>_0x3c4436&&!_0x19ddd7),_0x34d3c1['tryAgainButton']['delegate']('execute')['to'](this,'tryAgainEvent'),_0x34d3c1['stopButton']['bind']('isEnabled')['to'](this,'isProcessing'),_0x34d3c1['stopButton']['delegate']('execute')['to'](this,'stopProcessing'),_0x34d3c1;}['startProcessing'](){this['value']='',this['isError']=!0x1,this['isProcessing']=!0x0,this['contentArea']['isVisible']=!0x0,this['toolbar']['isVisible']=!0x0,this['contentArea']['focus']();}['finishProcessing'](){const _0x1e801a=this['locale'];this['isProcessing']=!0x1,this['prompt']='',this['promptView']['reset'](),this['value']&&(this['promptView']['queryView']['label']=i(_0x1e801a,'Ask\x20AI\x20to\x20improve\x20generated\x20text'));}['handleError'](_0x25ee2c){const _0x2cbe7a=this['locale'];this['finishProcessing'](),this['isError']=!0x0,this['errorView']['text']=_0x25ee2c||i(_0x2cbe7a,'AI_ERROR_FAILED'),this['value']||(this['contentArea']['isVisible']=!0x1);}}const w=globalThis['DataTransfer'];class n extends _0x10058d{['licenseKey'];['_licenseKeyCheckInterval'];['_dialog'];['_formView'];['_aiAdapter'];['_aiAssistantController'];['_uiCssClasses']='';static get['pluginName'](){return'AIAssistantUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[_0x2beb13,a,E,_0x1f1261];}constructor(_0x1a3dd3){super(_0x1a3dd3),_0x1a3dd3['config']['define']('ai.aiAssistant.disabledElements',['media','rawHtml','tableOfContents']),_0x1a3dd3['config']['define']('ai.aiAssistant.contentAreaCssClass',''),_0x1a3dd3['config']['define']('ai.useTheme',!0x0),this['_uiCssClasses']='ck-ai-assistant-ui'+(_0x1a3dd3['config']['get']('ai.useTheme')?'\x20ck-ai-assistant-ui_theme':'');}['init'](){const {editor:_0x5e40f4}=this;this['_aiAdapter']=_0x5e40f4['plugins']['get'](E),this['_dialog']=_0x5e40f4['plugins']['get'](_0x1f1261),this['_formView']=null,this['_commandDefinitions']=this['_getResolvedCommandsDefinitions']();const _0xac30de=new j(_0x5e40f4,Array['from'](this['_commandDefinitions']['values']()));_0x5e40f4['commands']['add']('showAIAssistant',_0xac30de),_0x5e40f4['ui']['componentFactory']['add']('aiCommands',_0x30dfa1=>{const _0x2dd61d=_0x37e6ff(_0x30dfa1);return _0x2dd61d['set']({'class':'ck-ai-commands-dropdown\x20'+this['_uiCssClasses']}),_0x2dd61d['buttonView']['set']({'label':i(_0x30dfa1,'AI\x20Commands'),'icon':_0x38d71b,'tooltip':!0x0}),_0x2dd61d['on']('execute',_0x286edf=>this['_onExecute'](_0x286edf['source']['id'])),_0x3b9015(_0x2dd61d,_0x5e40f4['ui']['view']['body'],function(_0x47801d){const _0x3b5f67=o(_0x47801d['config']['get']('ai.aiAssistant.commands'),_0x47801d['locale']),_0x5daf5e=U(_0x47801d,_0x3b5f67)['filter'](_0x627b39=>_0x627b39['commands']['length']);if(0x1===_0x5daf5e['length'])return U(_0x47801d,_0x5daf5e[0x0]['commands'])['map'](_0x2cfff2=>({'id':_0x2cfff2['id'],'label':_0x2cfff2['label']}));return _0x5daf5e['map'](_0x3aa3b5=>{const {groupId:_0x29d548,groupLabel:_0x3f3357,commands:_0x52c5b6}=_0x3aa3b5,_0x57dfb4=U(_0x47801d,_0x52c5b6)['map'](_0x445b29=>({'id':_0x445b29['id'],'label':_0x445b29['label']}));return{'id':_0x29d548,'menu':_0x3f3357||_0x29d548,'children':_0x57dfb4};});}(_0x5e40f4),{'ariaLabel':i(_0x30dfa1,'AI\x20Commands')}),_0x2dd61d['menuView']['menuPanelClass']='ck-ai-commands-dropdown\x20'+this['_uiCssClasses'],_0xac30de['on']('change:enabledCommandsIds',_0x52e946),_0x2dd61d['menuView']['once']('render',_0x52e946),_0x2dd61d;function _0x52e946(){_0x2dd61d['isEnabled']=_0xac30de['enabledCommandsIds']['length']>0x0;for(const _0x51bc11 of _0x2dd61d['menuView']['buttons'])_0x51bc11['isEnabled']=_0xac30de['enabledCommandsIds']['includes'](_0x51bc11['id']);}}),_0x5e40f4['ui']['componentFactory']['add']('menuBar:aiCommands',_0x11691d=>{const _0x403334=new _0xa15c9d(_0x11691d);_0x403334['buttonView']['set']({'label':i(_0x11691d,'AI\x20Commands'),'icon':_0x38d71b}),_0x403334['bind']('isEnabled')['to'](_0xac30de,'enabledCommandsIds',_0x39e5b5=>_0x39e5b5['length']>0x0);const _0x2bb200=o(_0x5e40f4['config']['get']('ai.aiAssistant.commands'),_0x11691d);return this['_populateMenuBarMenu'](_0xac30de,_0x403334,_0x2bb200,_0x4f8fa8=>this['_onExecute'](_0x4f8fa8)),_0x403334;}),_0x5e40f4['ui']['componentFactory']['add']('aiAssistant',()=>{const _0x2d9357=this['_createAIAssistantUIButton'](_0x16a741);return _0x2d9357['set']({'tooltip':!0x0,'class':'ck-ai-assistant-button\x20'+this['_uiCssClasses']}),_0x2d9357;}),_0x5e40f4['ui']['componentFactory']['add']('menuBar:aiAssistant',()=>{const _0x12a9a0=this['_createAIAssistantUIButton'](_0x551047);return _0x12a9a0['set']({'role':'menuitemcheckbox'}),_0x12a9a0;}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x2c3000=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x263efe;for(const _0x486ae7 in _0x2c3000){const _0x5a293b=_0x486ae7,_0x8fce4f=_0x2c3000[_0x5a293b];if('aiLicenseKeyValid'==_0x8fce4f||'aiLicenseKeyInvalid'==_0x8fce4f||'aiLicenseKeyExpired'==_0x8fce4f||'aiLicenseKeyDomainLimit'==_0x8fce4f||'aiLicenseKeyNotAllowed'==_0x8fce4f||'aiLicenseKeyEvaluationLimit'==_0x8fce4f||'aiLicenseKeyTrialLimit'==_0x8fce4f||'aiLicenseKeyUsageLimit'==_0x8fce4f){delete _0x2c3000[_0x5a293b],_0x263efe=_0x8fce4f,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'aiLicenseKeyInvalid'==_0x263efe&&_0x2c3000['_showLicenseError']('invalid'),'aiLicenseKeyExpired'==_0x263efe&&_0x2c3000['_showLicenseError']('expired'),'aiLicenseKeyDomainLimit'==_0x263efe&&_0x2c3000['_showLicenseError']('domainLimit'),'aiLicenseKeyNotAllowed'==_0x263efe&&_0x2c3000['_showLicenseError']('featureNotAllowed','AIAssistant'),'aiLicenseKeyEvaluationLimit'==_0x263efe&&_0x2c3000['_showLicenseError']('evaluationLimit'),'aiLicenseKeyTrialLimit'==_0x263efe&&_0x2c3000['_showLicenseError']('trialLimit'),'aiLicenseKeyUsageLimit'==_0x263efe&&_0x2c3000['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['showUI'](_0x522135='',_0x54965f='',_0x4d052e='custom'){const _0x3cd37b=this['editor'],_0x36c208=_0x3cd37b['editing']['view'],_0x18131a=_0x3cd37b['plugins']['get'](a),_0x135f3a=_0x3cd37b['plugins']['get'](_0x2beb13);_0x18131a['showFakeVisualSelection']();const _0x80473a=new w(),_0x48ce4f=new ClipboardEvent('copy',{'clipboardData':_0x80473a}),_0x242164=new _0xa3a525(_0x80473a),_0x1dec63=new _0x1ee063(_0x36c208,_0x48ce4f,{'dataTransfer':_0x242164});_0x135f3a['_forceMarkersCopy']('comment',()=>{_0x36c208['document']['fire']('copy',_0x1dec63);}),this['_formView']||(this['_initView'](),this['_aiAssistantController']=new k(_0x3cd37b,this['_aiAdapter']['textAdapter'],this['_formView']));let _0x26a092=_0x242164['getData']('text/html');const _0x9ae8df=_0x3cd37b['model']['document']['selection'],_0x190897=Array['from'](_0x9ae8df['getRanges']());0x1===_0x190897['length']&&_0x190897[0x0]['isFlat']&&!_0x9ae8df['getSelectedElement']()&&''!==_0x26a092['replace'](/ /g,'')['trim']()&&(_0x26a092='<p>'+_0x26a092+'</p>'),this['_aiAssistantController']['updateView']({'actionId':_0x4d052e,'query':_0x522135,'htmlContent':_0x26a092,'label':_0x54965f,'mainActionLabel':M[_0x3cd37b['model']['document']['selection']['isCollapsed']?'INSERT':'REPLACE']}),'aiAssistant'!==this['_dialog']['id']?this['_dialog']['show']({'id':'aiAssistant','icon':_0x4646d8,'title':i(this['editor']['locale'],'AI\x20Assistant'),'content':this['_formView'],'position':_0xc49ce0['EDITOR_TOP_SIDE'],'onShow':()=>{this['_formView']['focus']();},'onHide':()=>{this['_aiAssistantController']['reset'](),_0x18131a['hideFakeVisualSelection']();}}):this['_dialog']['view']['wasMoved']||this['_dialog']['view']['updatePosition']();}['hideUI'](){this['_dialog']['hide']();}['_getResolvedCommandsDefinitions'](){const _0x329fc4=new Map(),_0xc98aa7=o(this['editor']['config']['get']('ai.aiAssistant.commands'),this['editor']['locale']);for(const _0x4f99c6 of _0xc98aa7)for(const _0xc71c3f of _0x4f99c6['commands'])_0x329fc4['set'](_0xc71c3f['id'],{..._0xc71c3f,'groupId':_0x4f99c6['groupId'],'groupLabel':_0x4f99c6['groupLabel']||_0x4f99c6['groupId']});return _0x329fc4;}['_createAIAssistantUIButton'](_0x5d71bb){const _0x26da66=this['editor'],_0x40566e=_0x26da66['commands']['get']('showAIAssistant'),_0x37b846=new _0x5d71bb(_0x26da66['locale']);return _0x37b846['set']({'label':i(_0x26da66['locale'],'AI\x20Assistant'),'icon':_0x4646d8,'isToggleable':!0x0}),_0x37b846['bind']('isEnabled')['to'](_0x40566e),_0x37b846['bind']('isOn')['to'](this['_dialog'],'id',_0x219c03=>'aiAssistant'===_0x219c03),this['listenTo'](_0x37b846,'execute',()=>{_0x37b846['isOn']?this['hideUI']():_0x40566e['execute']();}),_0x37b846;}['_initView'](){const _0xef874f=this['editor']['plugins']['get'](a);this['_formView']=new _(this['editor']['locale'],this['_uiCssClasses'],this['editor']['config']['get']('ai.aiAssistant.contentAreaCssClass')),this['_formView']['on']('change:value',()=>{this['_dialog']['view']['wasMoved']||this['_dialog']['view']['updatePosition']();}),this['_formView']['promptView']['queryView']['fieldView']['on']('update',()=>{this['_dialog']['view']['wasMoved']||this['_dialog']['view']['updatePosition']();}),this['listenTo'](this['_formView'],'replaceContent',()=>{_0xef874f['insertContent'](this['_aiAssistantController']['currentContext']),this['hideUI']();}),this['listenTo'](this['_formView'],'insertContentBelow',()=>{_0xef874f['insertContentBelow'](this['_aiAssistantController']['currentContext']),this['hideUI']();}),this['_initAriaAiStatusChangeAnnouncements']();}['_initAriaAiStatusChangeAnnouncements'](){const {locale:_0x123b88,ui:{ariaLiveAnnouncer:_0x33617c}}=this['editor'];this['_formView']['contentArea']['on']('change:isProcessing',(_0x44fba0,_0x27dd79,_0x2dc145)=>{const _0x280bbb=this['_aiAssistantController']['currentContext'];_0x2dc145?_0x33617c['announce'](i(_0x123b88,'AI\x20is\x20writing')):_0x280bbb&&_0x33617c['announce'](i(_0x123b88,'Generated\x20content:\x20%0',_0x280bbb),{'politeness':'polite','isUnsafeHTML':!0x0});}),this['_formView']['on']('change:isError',(_0x5ed8a3,_0x25ddfb,_0xfa3be2)=>{if(_0xfa3be2){const _0x2f99b6=this['_formView']['errorView']['text'];_0x33617c['announce'](i(_0x123b88,'Error\x20during\x20AI\x20content\x20generation:\x20%0',_0x2f99b6));}});}['_onExecute'](_0x1e2d1c){const _0x2885c6=this['_commandDefinitions']['get'](_0x1e2d1c),_0x4b105d=this['editor'],_0x11280b=_0x4b105d['model']['document']['selection'],_0x5e4da9=_0x4b105d['commands']['get']('showAIAssistant'),_0x2f48b2=_0x4b105d['plugins']['get'](a),_0x32dd5a=''+(_0x2885c6['groupId']!==x?_0x2885c6['groupLabel']+':\x20':'')+_0x2885c6['label'];if(!0x1!==_0x2885c6['requiresContent']&&_0x11280b['isCollapsed']){const _0x406ea1=_0x21ac4a(_0x11280b['getSelectedBlocks']())||_0x4b105d['model']['schema']['getLimitElement'](_0x11280b);_0x4b105d['model']['change'](_0x40ef37=>{_0x40ef37['setSelection'](_0x406ea1,'in');});}_0x2f48b2['showFakeVisualSelection'](),_0x5e4da9['execute'](_0x2885c6['prompt'],_0x32dd5a,'command:'+_0x1e2d1c);}['_populateMenuBarMenu'](_0x477391,_0x187d8f,_0x539c83,_0x370a2e){const _0xbfd40a=this['editor'],_0x5580db=_0xbfd40a['locale'],_0x1942e1=new _0x22dfa8(_0x5580db),_0xd7d1b=U(_0xbfd40a,_0x539c83)['filter'](_0x7bdca5=>_0x7bdca5['commands']['length']);0x1===_0xd7d1b['length']?this['_getMenuBarGroupButtons']({'command':_0x477391,'commands':_0xd7d1b[0x0]['commands'],'parentMenuView':_0x187d8f,'onExecute':_0x370a2e})['forEach'](_0x389bbc=>_0x1942e1['items']['add'](_0x389bbc)):_0xd7d1b['forEach'](({groupId:_0x38fd37,groupLabel:_0x1d24cf,commands:_0x4ee8a9})=>{const _0x2bfa21=new _0x580b79(_0x5580db,_0x187d8f),_0x1ddac2=new _0xa15c9d(_0x5580db),_0x20613d=new _0x22dfa8(_0x5580db),_0x569ebd=this['_getMenuBarGroupButtons']({'command':_0x477391,'commands':_0x4ee8a9,'parentMenuView':_0x1ddac2,'onExecute':_0x370a2e});_0x1ddac2['buttonView']['set']({'label':_0x1d24cf||_0x38fd37}),_0x1ddac2['delegate']('execute')['to'](_0x187d8f),_0x20613d['items']['addMany'](_0x569ebd),_0x1ddac2['panelView']['children']['add'](_0x20613d),_0x2bfa21['children']['add'](_0x1ddac2),_0x1942e1['items']['add'](_0x2bfa21);}),_0x187d8f['panelView']['children']['add'](_0x1942e1);}['_getMenuBarGroupButtons']({command:_0x56592f,commands:_0xc85391,parentMenuView:_0x5b441c,onExecute:_0x2acd1a}){const _0x2a1cd0=this['editor'],_0x1ed1f4=_0x2a1cd0['locale'];return U(_0x2a1cd0,_0xc85391)['map'](_0x293cf5=>{const _0x1806b6=new _0x580b79(_0x1ed1f4,_0x5b441c),_0x4f7824=new _0x551047(_0x1ed1f4);return _0x4f7824['set']({'label':_0x293cf5['label']}),_0x4f7824['delegate']('execute')['to'](_0x5b441c),_0x4f7824['on']('execute',()=>_0x2acd1a(_0x293cf5['id'])),_0x4f7824['bind']('isEnabled')['to'](_0x56592f,'enabledCommandsIds',_0x15f396=>_0x15f396['includes'](_0x293cf5['id'])),_0x1806b6['children']['add'](_0x4f7824),_0x1806b6;});}}function B(_0x5c2492,_0x348660){return void 0x0!==_0x5c2492['order']&&void 0x0===_0x348660['order']?0x1:void 0x0===_0x5c2492['order']&&void 0x0!==_0x348660['order']?-0x1:void 0x0!==_0x5c2492['order']&&void 0x0!==_0x348660['order']?_0x5c2492['order']-_0x348660['order']:0x0;}function U(_0x4a79b0,_0x359922){_0x359922['sort'](B);const _0x4ed163={},_0x5cf76d=[];for(const _0x418a9c of _0x359922)if(void 0x0!==_0x418a9c['order']){if(_0x418a9c['order']in _0x4ed163)throw new _0x18b185('ai-commands-config-order-collision',_0x4a79b0,{'conflictingDefinitions':[_0x418a9c,_0x4ed163[_0x418a9c['order']]]});_0x4ed163[_0x418a9c['order']]=_0x418a9c,_0x5cf76d['splice'](_0x418a9c['order'],0x0,_0x418a9c);}else _0x5cf76d['push'](_0x418a9c);return _0x5cf76d;}class r extends _0x10058d{static get['requires'](){return[n,a];}static get['pluginName'](){return'AIAssistant';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x5b8273){super(_0x5b8273);const _0x4d2432=_0x5b8273['config'],_0x45a212=_0x5b8273['locale'];_0x4d2432['define']('ai.aiAssistant.preserveComments',!0x0),_0x4d2432['define']('ai.aiAssistant.commands',function(_0x1b1b4b){return[{'groupId':'editOrReview','groupLabel':i(_0x1b1b4b,'Edit\x20or\x20review'),'commands':[{'id':'improveWriting','label':i(_0x1b1b4b,'Improve\x20writing'),'prompt':'Fix\x20spelling\x20mistakes,\x20use\x20proper\x20grammar\x20and\x20apply\x20good\x20writing\x20practices.\x20Do\x20not\x20lose\x20the\x20original\x20meaning.'},{'id':'makeShorter','label':i(_0x1b1b4b,'Make\x20shorter'),'prompt':'Remove\x20any\x20repetitive,\x20redundant,\x20or\x20non-essential\x20writing\x20in\x20this\x20content\x20without\x20changing\x20the\x20meaning\x20or\x20losing\x20any\x20key\x20information.'},{'id':'makeLonger','label':i(_0x1b1b4b,'Make\x20longer'),'prompt':'Improve\x20this\x20content\x20by\x20using\x20descriptive\x20language\x20and\x20inserting\x20more\x20information\x20and\x20more\x20detailed\x20explanations.'},{'id':'simplifyLanguage','label':i(_0x1b1b4b,'Simplify\x20language'),'prompt':'Simplify\x20the\x20writing\x20style\x20of\x20this\x20content\x20and\x20reduce\x20the\x20complexity,\x20so\x20that\x20the\x20content\x20is\x20easy\x20to\x20understand.'}]},{'groupId':'generate','groupLabel':i(_0x1b1b4b,'Generate\x20from\x20selection'),'commands':[{'id':'summarize','label':i(_0x1b1b4b,'Summarize'),'prompt':'Summarize\x20this\x20content\x20into\x20one\x20paragraph\x20of\x20text.\x20Include\x20only\x20the\x20key\x20ideas\x20and\x20conclusions.\x20Keep\x20it\x20short.\x20Do\x20not\x20keep\x20original\x20text\x20formatting.'},{'id':'continue','label':i(_0x1b1b4b,'Continue'),'prompt':'Start\x20with\x20the\x20provided\x20content\x20and\x20write\x20at\x20the\x20end\x20of\x20it\x20continuing\x20this\x20topic.\x20Keep\x20the\x20added\x20part\x20short.'}]},{'groupId':'changeTone','groupLabel':i(_0x1b1b4b,'Change\x20tone'),'commands':[{'id':'professional','label':i(_0x1b1b4b,'Professional'),'prompt':'Improve\x20using\x20polished,\x20formal,\x20and\x20respectful\x20language\x20to\x20convey\x20professional\x20expertise\x20and\x20competence.'},{'id':'casual','label':i(_0x1b1b4b,'Casual'),'prompt':'Improve\x20using\x20casual,\x20informal\x20language\x20to\x20convey\x20a\x20casual\x20conversation\x20with\x20a\x20real\x20person.'},{'id':'direct','label':i(_0x1b1b4b,'Direct'),'prompt':'Improve\x20using\x20direct\x20language,\x20using\x20only\x20the\x20essential\x20information.'},{'id':'confident','label':i(_0x1b1b4b,'Confident'),'prompt':'Improve\x20using\x20compelling,\x20optimistic\x20language\x20to\x20convey\x20confidence\x20in\x20the\x20writing.'},{'id':'friendly','label':i(_0x1b1b4b,'Friendly'),'prompt':'Improve\x20using\x20friendly,\x20comforting\x20language,\x20to\x20convey\x20understanding\x20and\x20empathy.'}]},{'groupId':'changeStyle','groupLabel':i(_0x1b1b4b,'Change\x20style'),'commands':[{'id':'business','label':i(_0x1b1b4b,'Business'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20business\x20professional\x20with\x20formal\x20language.'},{'id':'legal','label':i(_0x1b1b4b,'Legal'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20legal\x20professional\x20using\x20valid\x20legal\x20terminology.'},{'id':'journalism','label':i(_0x1b1b4b,'Journalism'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20journalist\x20using\x20engaging\x20language\x20to\x20convey\x20the\x20importance\x20of\x20the\x20information.'},{'id':'poetic','label':i(_0x1b1b4b,'Poetic'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20poem\x20using\x20poetic\x20techniques\x20without\x20losing\x20the\x20original\x20meaning.'}]},{'groupId':'translate','groupLabel':i(_0x1b1b4b,'Translate'),'commands':[{'id':'translateEnglish','label':i(_0x1b1b4b,'English'),'prompt':'Translate\x20the\x20content\x20to\x20English\x20language.'},{'id':'translateSpanish','label':i(_0x1b1b4b,'Spanish'),'prompt':'Translate\x20the\x20content\x20to\x20Spanish\x20language.'},{'id':'translatePortuguese','label':i(_0x1b1b4b,'Portuguese'),'prompt':'Translate\x20the\x20content\x20to\x20Portuguese\x20language.'},{'id':'translateGerman','label':i(_0x1b1b4b,'German'),'prompt':'Translate\x20the\x20content\x20to\x20German\x20language.'},{'id':'translateFrench','label':i(_0x1b1b4b,'French'),'prompt':'Translate\x20the\x20content\x20to\x20French\x20language.'},{'id':'translateChinese','label':i(_0x1b1b4b,'Simplified\x20Chinese'),'prompt':'Translate\x20the\x20content\x20to\x20Simplified\x20Chinese\x20language.'},{'id':'translateHindi','label':i(_0x1b1b4b,'Hindi'),'prompt':'Translate\x20the\x20content\x20to\x20Hindi\x20language.'},{'id':'translateArabic','label':i(_0x1b1b4b,'Arabic'),'prompt':'Translate\x20the\x20content\x20to\x20Arabic\x20language.'}]}];}(_0x45a212)),_0x4d2432['define']('ai.aiAssistant.extraCommandGroups',[]),_0x4d2432['define']('ai.aiAssistant.removeCommands',[]);let _0x50e81c=o(_0x4d2432['get']('ai.aiAssistant.commands'),_0x45a212);const _0x1aa1d9=_0x4d2432['get']('ai.aiAssistant.extraCommandGroups'),_0x5148fb=_0x4d2432['get']('ai.aiAssistant.removeCommands');_0x1aa1d9['forEach'](_0x57d96d=>{const _0x53dc94=_0x50e81c['find'](_0x4b124e=>_0x4b124e['groupId']===_0x57d96d['groupId']);_0x53dc94?_0x53dc94['commands']=_0x53dc94['commands']['concat'](_0x57d96d['commands']):_0x50e81c['push'](_0x57d96d);}),_0x50e81c=_0x50e81c['filter'](_0x302ea8=>!_0x5148fb['includes'](_0x302ea8['groupId'])),_0x50e81c['forEach'](_0x4037e2=>{_0x4037e2['commands']=_0x4037e2['commands']['filter'](_0x497fd5=>!_0x5148fb['includes'](_0x497fd5['id']));}),_0x4d2432['set']('ai.aiAssistant.commands',_0x50e81c);}}class P extends _0x10058d{['abortController'];static get['requires'](){return[E];}constructor(_0x5f4003){super(_0x5f4003),this['abortController']=new AbortController();}['init'](){this['editor']['plugins']['get'](E)['textAdapter']=this;}['abort'](){this['abortController']['signal']['aborted']||(this['abortController']['abort'](),this['abortController']=new AbortController());}async['makeRequest'](_0x46051f){return this['sendRequest'](_0x46051f)['catch'](_0x125f4b=>{if(_0x125f4b instanceof R)return Promise['reject'](_0x125f4b);if('AbortError'==_0x125f4b['name'])return Promise['resolve']();throw console['error'](_0x125f4b),new _0x18b185('aitextadapter-send-request-failed',null);});}async['_prepareRequestHeaders'](_0xa9de3a,_0x5da85d){const _0x552fdb=this['editor']['locale'],_0x3fcc3c={'Content-Type':'application/json'};if('object'==typeof _0xa9de3a)Object['assign'](_0x3fcc3c,_0xa9de3a);else{if(_0xa9de3a)try{const _0x58ca10=await _0xa9de3a(_0x5da85d);Object['assign'](_0x3fcc3c,_0x58ca10);}catch(_0xfaef93){return Promise['reject'](new R(i(_0x552fdb,'AI_ERROR_GET_HEADERS')));}}return _0x3fcc3c;}async['_prepareRequestParameters'](_0x209696,_0x11581c){const _0x4ff2f4=this['editor']['locale'];if('object'==typeof _0x209696)return _0x209696;try{return await _0x209696(_0x11581c);}catch(_0x301c81){return Promise['reject'](new R(i(_0x4ff2f4,'AI_ERROR_GET_PARAMETERS')));}}}class O extends P{['_apiUrl'];['_requestHeaders'];['_requestParameters'];static get['pluginName'](){return'OpenAITextAdapter';}constructor(_0x354c4a){super(_0x354c4a),_0x354c4a['config']['define']('ai.openAI.apiUrl','https://api.openai.com/v1/chat/completions'),_0x354c4a['config']['get']('ai.openAI.requestParameters')||_0x354c4a['config']['define']('ai.openAI.requestParameters',{'model':'gpt-3.5-turbo','max_tokens':0x7d0,'temperature':0x1,'top_p':0x1,'stream':!0x0}),this['_apiUrl']=_0x354c4a['config']['get']('ai.openAI.apiUrl'),this['_requestHeaders']=_0x354c4a['config']['get']('ai.openAI.requestHeaders')||{},this['_requestParameters']=_0x354c4a['config']['get']('ai.openAI.requestParameters');}async['sendRequest']({query:_0x12c208,context:_0x10dbb2,onData:_0x5ae167,actionId:_0x3430f9}){const _0x571006=this['editor']['locale'],_0x5cdfd9=await this['prepareMessages'](_0x12c208,_0x10dbb2,_0x3430f9),_0xb2d544=await this['_prepareRequestHeaders'](this['_requestHeaders'],_0x3430f9),_0x363e60=await this['_prepareRequestParameters'](this['_requestParameters'],_0x3430f9),_0x584334={'messages':_0x5cdfd9,..._0x363e60},_0x47c092={'method':'POST','headers':_0xb2d544,'body':JSON['stringify'](_0x584334),'signal':this['abortController']['signal']},_0x45b28d=await fetch(this['_apiUrl'],_0x47c092);if(_0x45b28d['ok'])return _0x363e60['stream']?await this['_readStreamableResponse'](_0x45b28d,_0x5ae167):await this['_readStaticResponse'](_0x45b28d,_0x5ae167),Promise['resolve']();{const _0x13b169=await _0x45b28d['text']();return _0x13b169['includes']('context_length_exceeded')?Promise['reject'](new R(i(_0x571006,'AI_ERROR_CONTEXT_LENGTH'))):_0x13b169['includes']('Moderation')?Promise['reject'](new R(i(_0x571006,'AI_ERROR_MODERATION'))):Promise['reject'](new Error(_0x13b169));}}async['prepareMessages'](_0x2a0c18,_0x35a863,_0x266d18){let _0x359a5a,_0x15d45c;return _0x35a863?(_0x359a5a='Your\x20task\x20is\x20to\x20execute\x20the\x20instruction\x20using\x20the\x20provided\x20HTML\x20content.\x20Follow\x20the\x20instruction\x20closely.\x20Your\x20answer\x20must\x20be\x20a\x20properly\x20formatted\x20HTML\x20code.\x20Do\x20not\x20add\x20any\x20additional\x20remarks\x20or\x20notes.\x20Do\x20not\x20act\x20like\x20a\x20chatbot\x20or\x20a\x20real\x20person.',_0x15d45c='Instruction:\x0a'+_0x2a0c18+'\x0aYou\x20must\x20keep\x20the\x20text\x20formatting.\x0a\x0aContent:\x0a'+_0x35a863):(_0x359a5a='Your\x20task\x20is\x20to\x20generate\x20HTML\x20content\x20accordingly\x20to\x20the\x20given\x20instruction.\x20Never\x20include\x20<img>\x20tag\x20in\x20your\x20response\x20even\x20if\x20asked\x20for.\x20Your\x20answer\x20must\x20be\x20a\x20well-structured\x20and\x20properly\x20formatted\x20HTML\x20code.\x20Answer\x20only\x20with\x20the\x20generated\x20HTML\x20content.\x20Do\x20not\x20add\x20any\x20additional\x20remarks\x20or\x20notes.\x20Do\x20not\x20act\x20like\x20a\x20chatbot\x20or\x20a\x20real\x20person.',_0x15d45c=_0x2a0c18),[{'role':'system','content':_0x359a5a},{'role':'user','content':_0x15d45c}];}async['_readStreamableResponse'](_0x51a9c2,_0x86b1c4){const _0xc84193=_0x51a9c2['body']['getReader'](),_0x54af33=new TextDecoder();let _0x9e1fb3='',_0x23b19c='',_0x1bd351='',_0x228d49=!0x1;for(;!_0x228d49;){const {done:_0x27e3cb,value:_0x40eee6}=await _0xc84193['read'](),_0xa1cfec=_0x9e1fb3+_0x54af33['decode'](_0x40eee6);let _0x4ea86f='';_0x228d49=_0x27e3cb;try{_0x4ea86f=this['_cleanUpData'](_0xa1cfec),_0x9e1fb3='';}catch(_0x976b0b){_0x9e1fb3=_0xa1cfec;continue;}_0x23b19c+=_0x4ea86f,!_0x228d49&&this['_isBufferIncomplete'](_0x23b19c)||_0x23b19c&&(_0x1bd351+=_0x23b19c,_0x23b19c='',_0x86b1c4(_0x1bd351));}return Promise['resolve']();}async['_readStaticResponse'](_0x5d3640,_0x57c308){return _0x57c308((await _0x5d3640['json']())['choices'][0x0]['message']['content']),Promise['resolve']();}['_isBufferIncomplete'](_0x52f1ee){const _0x292671=_0x52f1ee['split']('<')['length']!==_0x52f1ee['split']('>')['length'],_0x1e5f0d=_0x52f1ee['length']<0x1e;return _0x292671&&_0x1e5f0d;}['_cleanUpData'](_0x28c838){return _0x28c838['split'](/\n(?![^{]*\})/g)['map'](_0x27f6a6=>_0x27f6a6['replace']('data:\x20',''))['filter'](_0xe198c3=>_0xe198c3&&_0xe198c3['length']>0x0&&'[DONE]'!==_0xe198c3)['map'](_0xf98981=>{const {choices:_0x34d1a1}=JSON['parse'](_0xf98981);if(_0x34d1a1[0x0]?.['delta']?.['content'])return _0x34d1a1[0x0]['delta']['content'];})['filter'](_0x3de535=>_0x3de535)['join']('');}}class D extends P{['_apiUrl'];['_requestHeaders'];['_bedrockClientConfig'];['_requestParameters'];static get['pluginName'](){return'AWSTextAdapter';}constructor(_0x295cc6){super(_0x295cc6),_0x295cc6['config']['get']('ai.aws.requestParameters')||_0x295cc6['config']['define']('ai.aws.requestParameters',{'model':'anthropic.claude-v2','max_tokens_to_sample':0x7d0,'temperature':0x1,'top_p':0x1,'top_k':0xfa,'anthropic_version':'bedrock-2023-05-31','stream':!0x0}),this['_apiUrl']=_0x295cc6['config']['get']('ai.aws.apiUrl'),this['_bedrockClientConfig']=_0x295cc6['config']['get']('ai.aws.bedrockClientConfig'),this['_requestHeaders']=_0x295cc6['config']['get']('ai.aws.requestHeaders'),this['_requestParameters']=_0x295cc6['config']['get']('ai.aws.requestParameters');}async['sendRequest']({query:_0x4639f5,context:_0x1f6f57,onData:_0x32db5c,actionId:_0x184c85}){const {model:_0x3eaa3c,stream:_0x5a83d9,..._0x52295e}=await this['_prepareRequestParameters'](this['_requestParameters'],_0x184c85),_0x2a44c9={'prompt':await this['preparePrompt'](_0x4639f5,_0x1f6f57,_0x3eaa3c,_0x184c85),..._0x52295e};this['_apiUrl']?await this['_processProxyRequest'](_0x2a44c9,_0x3eaa3c,_0x5a83d9,_0x32db5c,_0x184c85):await this['_processAWSRequest'](_0x2a44c9,_0x3eaa3c,_0x5a83d9,_0x32db5c);}async['preparePrompt'](_0x1831f9,_0x5c3d32,_0x46c5b9,_0x1a4813){let _0xb732bd,_0x2d1d8a;return _0x5c3d32?(_0xb732bd='Your\x20task\x20is\x20to\x20execute\x20the\x20instruction\x20using\x20the\x20provided\x20HTML\x20content.\x20Follow\x20the\x20instruction\x20closely.\x20Your\x20answer\x20must\x20be\x20a\x20properly\x20formatted\x20HTML\x20code.\x20Do\x20not\x20add\x20any\x20additional\x20remarks\x20or\x20notes.\x20Do\x20not\x20act\x20like\x20a\x20chatbot\x20or\x20a\x20real\x20person.',_0x2d1d8a='Instruction:\x0a'+_0x1831f9+'\x0aYou\x20must\x20keep\x20the\x20text\x20formatting.\x0a\x0aContent:\x0a'+_0x5c3d32):(_0xb732bd='Your\x20task\x20is\x20to\x20generate\x20HTML\x20content\x20accordingly\x20to\x20the\x20given\x20instruction.\x20Never\x20include\x20<img>\x20tag\x20in\x20your\x20response\x20even\x20if\x20asked\x20for.\x20Your\x20answer\x20must\x20be\x20a\x20well-structured\x20and\x20properly\x20formatted\x20HTML\x20code.\x20Answer\x20only\x20with\x20the\x20generated\x20HTML\x20content.\x20Do\x20not\x20add\x20any\x20additional\x20remarks\x20or\x20notes.\x20Do\x20not\x20act\x20like\x20a\x20chatbot\x20or\x20a\x20real\x20person.',_0x2d1d8a=_0x1831f9),'meta.llama'==this['getModelFamily'](_0x46c5b9)?'<<SYS>>\x0a'+_0xb732bd+'\x0a<</SYS>>\x0a[INST]\x0a'+_0x2d1d8a+'\x0a[/INST]':'Human:\x0a'+_0xb732bd+'\x0a'+_0x2d1d8a+'\x0a\x0aAssistant:';}['getModelFamily'](_0x36a89f){if(/^anthropic\.claude/['test'](_0x36a89f))return'anthropic.claude';if(/^ai21\.j2/['test'](_0x36a89f))return'ai21.j2';if(/^cohere\.command/['test'](_0x36a89f))return'cohere.command';if(/^meta\.llama/['test'](_0x36a89f))return'meta.llama';throw new R(i(this['editor']['locale'],'AI_ERROR_UNSUPPORTED_MODEL',_0x36a89f));}async['_processProxyRequest'](_0x4bed61,_0x1438f7,_0x1ca6d0,_0x370a2f,_0x1da19c){const _0x1a04fb={'method':'POST','headers':await this['_prepareRequestHeaders'](this['_requestHeaders'],_0x1da19c),'body':JSON['stringify']({..._0x4bed61,'model':_0x1438f7,'stream':_0x1ca6d0}),'signal':this['abortController']['signal']},_0x1c9e3c=await fetch(this['_apiUrl'],_0x1a04fb);_0x1ca6d0?await this['_readStreamableResponse'](_0x1c9e3c,_0x1438f7,_0x370a2f):await this['_readStaticResponse'](_0x1c9e3c,_0x1438f7,_0x370a2f);}async['_processAWSRequest'](_0x3d3f1a,_0x482f1,_0x519d7b,_0x554bb6){const _0x2c6395=new _0x5083d8(this['_bedrockClientConfig']),_0xceecd7={'body':JSON['stringify'](_0x3d3f1a),'contentType':'application/json','accept':'application/json','modelId':_0x482f1};let _0x4dc141;if(_0x519d7b){const _0x19794a=new _0x5a3a84(_0xceecd7);_0x4dc141=await _0x2c6395['send'](_0x19794a,{'abortSignal':this['abortController']['signal']}),await this['_readAsyncIterableResponse'](_0x4dc141,_0x482f1,_0x554bb6);}else{const _0x36d4bd=new _0x17bd69(_0xceecd7);_0x4dc141=await _0x2c6395['send'](_0x36d4bd,{'abortSignal':this['abortController']['signal']}),await this['_readStaticResponse'](_0x4dc141,_0x482f1,_0x554bb6);}}async['_readAsyncIterableResponse'](_0x397e01,_0x3322a3,_0x19762d){const _0xccafb3=_0x397e01['body'],_0x29f7fd=new TextDecoder('utf-8');let _0x5c8f81='';for await(const _0x1e4db6 of _0xccafb3)if(_0x1e4db6['chunk']){const _0x5deeb3=_0x29f7fd['decode'](_0x1e4db6['chunk']['bytes']),_0x3d47b5=JSON['parse'](_0x5deeb3);_0x5c8f81+=this['_getGeneratedText'](_0x3d47b5,_0x3322a3),_0x19762d(_0x5c8f81);}return Promise['resolve']();}async['_readStreamableResponse'](_0x5f4085,_0x45c5c6,_0x532d67){const _0x436142=_0x5f4085['body'],_0x5c86f7=new TextDecoder('utf-8'),_0x374867=_0x436142['getReader']();let _0x52e584='',_0x739021='',_0x5bbde0=!0x1;for(;!_0x5bbde0;){const {done:_0x4a82a9,value:_0x1c02fb}=await _0x374867['read']();if(_0x5bbde0=_0x4a82a9,_0x5bbde0)break;const _0x1109e5=(_0x52e584+_0x5c86f7['decode'](_0x1c02fb))['split']('\x0a')['map'](_0x5a513e=>{try{return _0x52e584='',JSON['parse'](_0x5a513e);}catch(_0x32d15f){return _0x52e584=_0x5a513e,null;}})['filter'](_0x44118e=>null!==_0x44118e);_0x1109e5['length']&&(_0x739021+=_0x1109e5['map'](_0x150ba5=>this['_getGeneratedText'](_0x150ba5,_0x45c5c6))['join'](''),_0x532d67(_0x739021));}return Promise['resolve']();}async['_readStaticResponse'](_0x5cfc22,_0x4060c0,_0x5887aa){let _0x4f1da8;return _0x4f1da8=_0x5cfc22 instanceof Response?await _0x5cfc22['json']():JSON['parse'](Buffer['from'](_0x5cfc22['body'])['toString']('utf8')),(_0x5887aa(this['_getGeneratedText'](_0x4f1da8,_0x4060c0)),Promise['resolve']());}['_getGeneratedText'](_0x43e820,_0x45b300){switch(this['getModelFamily'](_0x45b300)){case'anthropic.claude':return _0x43e820['completion'];case'ai21.j2':return _0x43e820['completions'][0x0]['data']['text'];case'cohere.command':return _0x43e820['generations'][0x0]['text'];case'meta.llama':return _0x43e820['generation'];}}}export{E as AIAdapter,r as AIAssistant,n as AIAssistantUI,R as AIRequestError,P as AITextAdapter,D as AWSTextAdapter,O as OpenAITextAdapter};
|
package/dist/translations/af.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
export default{'af':{'dictionary':{'Edit\x20or\x20review':'','Improve\x20writing':'','Make\x20shorter':'','Make\x20longer':'','Simplify\x20language':'','Generate\x20from\x20selection':'','Summarize':'','Continue':'','Change\x20tone':'','Professional':'','Casual':'','Direct':'','Confident':'','Friendly':'','Change\x20style':'','Business':'','Legal':'','Journalism':'','Poetic':'','Translate':'','English':'','Spanish':'','German':'','Portuguese':'','French':'','Simplified\x20Chinese':'','Hindi':'','Arabic':'','AI\x20Assistant':'','AI\x20Commands':'','Ask\x20AI\x20to\x20edit\x20or\x20generate':'','Ask\x20AI\x20to\x20improve\x20generated\x20text':'','Copy':'','Submit':'Indien','Insert\x20below':'','Try\x20again':'','Stop':'','AI\x20is\x20writing...':'','AI\x20is\x20writing':'','Generated\x20content:\x20%0':'','Error\x20during\x20AI\x20content\x20generation:\x20%0':'','History':'','Empty\x20history':'','Ask\x20AI\x20and\x20your\x20prompts\x20will\x20be\x20listed\x20here\x20for\x20you\x20to\x20use\x20later.':'','Prompt\x20history':'','AI_REPLACE_CONTENT':'Vervang','AI_INSERT_CONTENT':'','AI_ERROR_GET_HEADERS':'','AI_ERROR_GET_PARAMETERS':'','AI_ERROR_UNSUPPORTED_MODEL':'','AI_ERROR_CONTEXT_LENGTH':'','AI_ERROR_MODERATION':'','AI_ERROR_FAILED':'','Other':''},'getPluralForm':
|
|
23
|
+
export default{'af':{'dictionary':{'Edit\x20or\x20review':'','Improve\x20writing':'','Make\x20shorter':'','Make\x20longer':'','Simplify\x20language':'','Generate\x20from\x20selection':'','Summarize':'','Continue':'','Change\x20tone':'','Professional':'','Casual':'','Direct':'','Confident':'','Friendly':'','Change\x20style':'','Business':'','Legal':'','Journalism':'','Poetic':'','Translate':'','English':'','Spanish':'','German':'','Portuguese':'','French':'','Simplified\x20Chinese':'','Hindi':'','Arabic':'','AI\x20Assistant':'','AI\x20Commands':'','Ask\x20AI\x20to\x20edit\x20or\x20generate':'','Ask\x20AI\x20to\x20improve\x20generated\x20text':'','Copy':'','Submit':'Indien','Insert\x20below':'','Try\x20again':'','Stop':'','AI\x20is\x20writing...':'','AI\x20is\x20writing':'','Generated\x20content:\x20%0':'','Error\x20during\x20AI\x20content\x20generation:\x20%0':'','History':'','Empty\x20history':'','Ask\x20AI\x20and\x20your\x20prompts\x20will\x20be\x20listed\x20here\x20for\x20you\x20to\x20use\x20later.':'','Prompt\x20history':'','AI_REPLACE_CONTENT':'Vervang','AI_INSERT_CONTENT':'','AI_ERROR_GET_HEADERS':'','AI_ERROR_GET_PARAMETERS':'','AI_ERROR_UNSUPPORTED_MODEL':'','AI_ERROR_CONTEXT_LENGTH':'','AI_ERROR_MODERATION':'','AI_ERROR_FAILED':'','Other':''},'getPluralForm':_0x4df23c=>0x1!=_0x4df23c}};
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
(
|
|
23
|
+
(_0x16deae=>{const {af:{dictionary:_0x4bceef,getPluralForm:_0x4b87a4}}={'af':{'dictionary':{'Edit\x20or\x20review':'','Improve\x20writing':'','Make\x20shorter':'','Make\x20longer':'','Simplify\x20language':'','Generate\x20from\x20selection':'','Summarize':'','Continue':'','Change\x20tone':'','Professional':'','Casual':'','Direct':'','Confident':'','Friendly':'','Change\x20style':'','Business':'','Legal':'','Journalism':'','Poetic':'','Translate':'','English':'','Spanish':'','German':'','Portuguese':'','French':'','Simplified\x20Chinese':'','Hindi':'','Arabic':'','AI\x20Assistant':'','AI\x20Commands':'','Ask\x20AI\x20to\x20edit\x20or\x20generate':'','Ask\x20AI\x20to\x20improve\x20generated\x20text':'','Copy':'','Submit':'Indien','Insert\x20below':'','Try\x20again':'','Stop':'','AI\x20is\x20writing...':'','AI\x20is\x20writing':'','Generated\x20content:\x20%0':'','Error\x20during\x20AI\x20content\x20generation:\x20%0':'','History':'','Empty\x20history':'','Ask\x20AI\x20and\x20your\x20prompts\x20will\x20be\x20listed\x20here\x20for\x20you\x20to\x20use\x20later.':'','Prompt\x20history':'','AI_REPLACE_CONTENT':'Vervang','AI_INSERT_CONTENT':'','AI_ERROR_GET_HEADERS':'','AI_ERROR_GET_PARAMETERS':'','AI_ERROR_UNSUPPORTED_MODEL':'','AI_ERROR_CONTEXT_LENGTH':'','AI_ERROR_MODERATION':'','AI_ERROR_FAILED':'','Other':''},'getPluralForm':_0x54a551=>0x1!=_0x54a551}};_0x16deae['af']||={'dictionary':{},'getPluralForm':null},_0x16deae['af']['dictionary']=Object['assign'](_0x16deae['af']['dictionary'],_0x4bceef),_0x16deae['af']['getPluralForm']=_0x4b87a4;})(window['CKEDITOR_TRANSLATIONS']||={});
|
package/dist/translations/ar.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
export default{'ar':{'dictionary':{'Edit\x20or\x20review':'التحرير\x20أو\x20المراجعة','Improve\x20writing':'قم\x20بتحسين\x20الكتابة','Make\x20shorter':'اجعله\x20أقصر','Make\x20longer':'اجعله\x20أطول','Simplify\x20language':'قم\x20بتبسيط\x20اللغة','Generate\x20from\x20selection':'قم\x20بالإنشاء\x20من\x20التحديد','Summarize':'تلخيص','Continue':'متابعة','Change\x20tone':'تغيير\x20الأسلوب','Professional':'احترافي','Casual':'غير\x20رسمي','Direct':'مباشر','Confident':'لهجة\x20واثقة','Friendly':'ودي','Change\x20style':'تغيير\x20الأسلوب','Business':'تجاري','Legal':'قانوني','Journalism':'الكتابة\x20الصحفية','Poetic':'شِعري','Translate':'ترجِمْ','English':'الإنكليزية','Spanish':'الإسبانية','German':'الألمانية','Portuguese':'البرتغالية','French':'الفرنسية','Simplified\x20Chinese':'الصينية\x20المبسطة','Hindi':'الهندية','Arabic':'العربية','AI\x20Assistant':'مساعد\x20الذكاء\x20الاصطناعي','AI\x20Commands':'أوامر\x20الذكاء\x20الاصطناعي','Ask\x20AI\x20to\x20edit\x20or\x20generate':'اطلب\x20من\x20الذكاء\x20الاصطناعي\x20أن\x20يقوم\x20بالتحرير\x20أو\x20الإنشاء','Ask\x20AI\x20to\x20improve\x20generated\x20text':'اطلب\x20من\x20الذكاء\x20الاصطناعي\x20أن\x20يقوم\x20بتحسين\x20النص\x20الذي\x20تم\x20إنشاؤه','Copy':'نسخ','Submit':'إرسال','Insert\x20below':'أدخل\x20أدناه','Try\x20again':'حاول\x20مجددًا','Stop':'إيقاف','AI\x20is\x20writing...':'يقوم\x20الذكاء\x20الاصطناعي\x20بالكتابة...','AI\x20is\x20writing':'يكتب\x20الذكاء\x20الاصطناعي','Generated\x20content:\x20%0':'المحتوى\x20الذي\x20تم\x20إنشاؤه:\x20%0','Error\x20during\x20AI\x20content\x20generation:\x20%0':'حدث\x20خطأ\x20أثناء\x20إنشاء\x20محتوى\x20الذكاء\x20الاصطناعي:\x20%0','History':'سجل\x20المحفوظات','Empty\x20history':'السجل\x20فارغ','Ask\x20AI\x20and\x20your\x20prompts\x20will\x20be\x20listed\x20here\x20for\x20you\x20to\x20use\x20later.':'سيتم\x20إدراج\x20الطلبات\x20التي\x20طلبتها\x20من\x20الذكاء\x20الاصطناعي\x20والتوجيهات\x20الخاصة\x20بك\x20هنا\x20لكي\x20يتم\x20استخدامها\x20لاحقًا.','Prompt\x20history':'سجل\x20التوجيهات','AI_REPLACE_CONTENT':'استبدال','AI_INSERT_CONTENT':'إدراج','AI_ERROR_GET_HEADERS':'فشلت\x20عملية\x20تحضير\x20عناوين\x20الطلبات','AI_ERROR_GET_PARAMETERS':'لقد\x20فشلت\x20عملية\x20إعداد\x20معلمات\x20الطلب','AI_ERROR_UNSUPPORTED_MODEL':'إن\x20نموذج\x20AI\x20المطلوب\x20(\x22%0\x22)\x20غير\x20مدعوم','AI_ERROR_CONTEXT_LENGTH':'المحتوى\x20المحدد\x20طويل\x20جداً','AI_ERROR_MODERATION':'الاستعلام\x20المطلوب\x20لا\x20يجتاز\x20قواعد\x20الإشراف','AI_ERROR_FAILED':'لقد\x20فشل\x20التواصل\x20مع\x20خدمة\x20الذكاء\x20الاصطناعي','Other':'آخر'},'getPluralForm':
|
|
23
|
+
export default{'ar':{'dictionary':{'Edit\x20or\x20review':'التحرير\x20أو\x20المراجعة','Improve\x20writing':'قم\x20بتحسين\x20الكتابة','Make\x20shorter':'اجعله\x20أقصر','Make\x20longer':'اجعله\x20أطول','Simplify\x20language':'قم\x20بتبسيط\x20اللغة','Generate\x20from\x20selection':'قم\x20بالإنشاء\x20من\x20التحديد','Summarize':'تلخيص','Continue':'متابعة','Change\x20tone':'تغيير\x20الأسلوب','Professional':'احترافي','Casual':'غير\x20رسمي','Direct':'مباشر','Confident':'لهجة\x20واثقة','Friendly':'ودي','Change\x20style':'تغيير\x20الأسلوب','Business':'تجاري','Legal':'قانوني','Journalism':'الكتابة\x20الصحفية','Poetic':'شِعري','Translate':'ترجِمْ','English':'الإنكليزية','Spanish':'الإسبانية','German':'الألمانية','Portuguese':'البرتغالية','French':'الفرنسية','Simplified\x20Chinese':'الصينية\x20المبسطة','Hindi':'الهندية','Arabic':'العربية','AI\x20Assistant':'مساعد\x20الذكاء\x20الاصطناعي','AI\x20Commands':'أوامر\x20الذكاء\x20الاصطناعي','Ask\x20AI\x20to\x20edit\x20or\x20generate':'اطلب\x20من\x20الذكاء\x20الاصطناعي\x20أن\x20يقوم\x20بالتحرير\x20أو\x20الإنشاء','Ask\x20AI\x20to\x20improve\x20generated\x20text':'اطلب\x20من\x20الذكاء\x20الاصطناعي\x20أن\x20يقوم\x20بتحسين\x20النص\x20الذي\x20تم\x20إنشاؤه','Copy':'نسخ','Submit':'إرسال','Insert\x20below':'أدخل\x20أدناه','Try\x20again':'حاول\x20مجددًا','Stop':'إيقاف','AI\x20is\x20writing...':'يقوم\x20الذكاء\x20الاصطناعي\x20بالكتابة...','AI\x20is\x20writing':'يكتب\x20الذكاء\x20الاصطناعي','Generated\x20content:\x20%0':'المحتوى\x20الذي\x20تم\x20إنشاؤه:\x20%0','Error\x20during\x20AI\x20content\x20generation:\x20%0':'حدث\x20خطأ\x20أثناء\x20إنشاء\x20محتوى\x20الذكاء\x20الاصطناعي:\x20%0','History':'سجل\x20المحفوظات','Empty\x20history':'السجل\x20فارغ','Ask\x20AI\x20and\x20your\x20prompts\x20will\x20be\x20listed\x20here\x20for\x20you\x20to\x20use\x20later.':'سيتم\x20إدراج\x20الطلبات\x20التي\x20طلبتها\x20من\x20الذكاء\x20الاصطناعي\x20والتوجيهات\x20الخاصة\x20بك\x20هنا\x20لكي\x20يتم\x20استخدامها\x20لاحقًا.','Prompt\x20history':'سجل\x20التوجيهات','AI_REPLACE_CONTENT':'استبدال','AI_INSERT_CONTENT':'إدراج','AI_ERROR_GET_HEADERS':'فشلت\x20عملية\x20تحضير\x20عناوين\x20الطلبات','AI_ERROR_GET_PARAMETERS':'لقد\x20فشلت\x20عملية\x20إعداد\x20معلمات\x20الطلب','AI_ERROR_UNSUPPORTED_MODEL':'إن\x20نموذج\x20AI\x20المطلوب\x20(\x22%0\x22)\x20غير\x20مدعوم','AI_ERROR_CONTEXT_LENGTH':'المحتوى\x20المحدد\x20طويل\x20جداً','AI_ERROR_MODERATION':'الاستعلام\x20المطلوب\x20لا\x20يجتاز\x20قواعد\x20الإشراف','AI_ERROR_FAILED':'لقد\x20فشل\x20التواصل\x20مع\x20خدمة\x20الذكاء\x20الاصطناعي','Other':'آخر'},'getPluralForm':_0x5b068e=>0x0==_0x5b068e?0x0:0x1==_0x5b068e?0x1:0x2==_0x5b068e?0x2:_0x5b068e%0x64>=0x3&&_0x5b068e%0x64<=0xa?0x3:_0x5b068e%0x64>=0xb?0x4:0x5}};
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
(
|
|
23
|
+
(_0x117f20=>{const {ar:{dictionary:_0x23fe9a,getPluralForm:_0x414f4e}}={'ar':{'dictionary':{'Edit\x20or\x20review':'التحرير\x20أو\x20المراجعة','Improve\x20writing':'قم\x20بتحسين\x20الكتابة','Make\x20shorter':'اجعله\x20أقصر','Make\x20longer':'اجعله\x20أطول','Simplify\x20language':'قم\x20بتبسيط\x20اللغة','Generate\x20from\x20selection':'قم\x20بالإنشاء\x20من\x20التحديد','Summarize':'تلخيص','Continue':'متابعة','Change\x20tone':'تغيير\x20الأسلوب','Professional':'احترافي','Casual':'غير\x20رسمي','Direct':'مباشر','Confident':'لهجة\x20واثقة','Friendly':'ودي','Change\x20style':'تغيير\x20الأسلوب','Business':'تجاري','Legal':'قانوني','Journalism':'الكتابة\x20الصحفية','Poetic':'شِعري','Translate':'ترجِمْ','English':'الإنكليزية','Spanish':'الإسبانية','German':'الألمانية','Portuguese':'البرتغالية','French':'الفرنسية','Simplified\x20Chinese':'الصينية\x20المبسطة','Hindi':'الهندية','Arabic':'العربية','AI\x20Assistant':'مساعد\x20الذكاء\x20الاصطناعي','AI\x20Commands':'أوامر\x20الذكاء\x20الاصطناعي','Ask\x20AI\x20to\x20edit\x20or\x20generate':'اطلب\x20من\x20الذكاء\x20الاصطناعي\x20أن\x20يقوم\x20بالتحرير\x20أو\x20الإنشاء','Ask\x20AI\x20to\x20improve\x20generated\x20text':'اطلب\x20من\x20الذكاء\x20الاصطناعي\x20أن\x20يقوم\x20بتحسين\x20النص\x20الذي\x20تم\x20إنشاؤه','Copy':'نسخ','Submit':'إرسال','Insert\x20below':'أدخل\x20أدناه','Try\x20again':'حاول\x20مجددًا','Stop':'إيقاف','AI\x20is\x20writing...':'يقوم\x20الذكاء\x20الاصطناعي\x20بالكتابة...','AI\x20is\x20writing':'يكتب\x20الذكاء\x20الاصطناعي','Generated\x20content:\x20%0':'المحتوى\x20الذي\x20تم\x20إنشاؤه:\x20%0','Error\x20during\x20AI\x20content\x20generation:\x20%0':'حدث\x20خطأ\x20أثناء\x20إنشاء\x20محتوى\x20الذكاء\x20الاصطناعي:\x20%0','History':'سجل\x20المحفوظات','Empty\x20history':'السجل\x20فارغ','Ask\x20AI\x20and\x20your\x20prompts\x20will\x20be\x20listed\x20here\x20for\x20you\x20to\x20use\x20later.':'سيتم\x20إدراج\x20الطلبات\x20التي\x20طلبتها\x20من\x20الذكاء\x20الاصطناعي\x20والتوجيهات\x20الخاصة\x20بك\x20هنا\x20لكي\x20يتم\x20استخدامها\x20لاحقًا.','Prompt\x20history':'سجل\x20التوجيهات','AI_REPLACE_CONTENT':'استبدال','AI_INSERT_CONTENT':'إدراج','AI_ERROR_GET_HEADERS':'فشلت\x20عملية\x20تحضير\x20عناوين\x20الطلبات','AI_ERROR_GET_PARAMETERS':'لقد\x20فشلت\x20عملية\x20إعداد\x20معلمات\x20الطلب','AI_ERROR_UNSUPPORTED_MODEL':'إن\x20نموذج\x20AI\x20المطلوب\x20(\x22%0\x22)\x20غير\x20مدعوم','AI_ERROR_CONTEXT_LENGTH':'المحتوى\x20المحدد\x20طويل\x20جداً','AI_ERROR_MODERATION':'الاستعلام\x20المطلوب\x20لا\x20يجتاز\x20قواعد\x20الإشراف','AI_ERROR_FAILED':'لقد\x20فشل\x20التواصل\x20مع\x20خدمة\x20الذكاء\x20الاصطناعي','Other':'آخر'},'getPluralForm':_0x32d6af=>0x0==_0x32d6af?0x0:0x1==_0x32d6af?0x1:0x2==_0x32d6af?0x2:_0x32d6af%0x64>=0x3&&_0x32d6af%0x64<=0xa?0x3:_0x32d6af%0x64>=0xb?0x4:0x5}};_0x117f20['ar']||={'dictionary':{},'getPluralForm':null},_0x117f20['ar']['dictionary']=Object['assign'](_0x117f20['ar']['dictionary'],_0x23fe9a),_0x117f20['ar']['getPluralForm']=_0x414f4e;})(window['CKEDITOR_TRANSLATIONS']||={});
|