UNPKG

ckeditor5-premium-features

Version:

Premium features for CKEditor 5.

24 lines • 4.66 MB
/* * Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved. * * * * * +---------------------------------------------------------------------------------+ * | | * | Hello stranger! | * | | * | | * | What you're currently looking at is the source code of a legally protected, | * | proprietary software. Any attempts to deobfuscate / disassemble this code | * | are forbidden and will result in legal consequences. | * | | * | | * +---------------------------------------------------------------------------------+ * * * * */ !function(_0x1fb376,_0x4a18e4){'object'==typeof exports&&'undefined'!=typeof module?_0x4a18e4(exports,require('ckeditor5')):'function'==typeof define&&define['amd']?define(['exports','ckeditor5'],_0x4a18e4):_0x4a18e4((_0x1fb376='undefined'!=typeof globalThis?globalThis:_0x1fb376||self)['CKEDITOR_PREMIUM_FEATURES']={},_0x1fb376['CKEDITOR']);}(this,function(_0x295269,_0x31c75c){'use strict';const _0x5d1a57='_ungrouppedCommands';function _0x3da649(_0x50e94f,_0x57c5bf){const _0x538a15=(0x0,_0x57c5bf['t'])('Other');return _0x50e94f['length']?'groupId'in _0x50e94f[0x0]?_0x50e94f:[{'groupId':_0x5d1a57,'groupLabel':_0x538a15,'order':0x1/0x0,'commands':_0x50e94f}]:[{'groupId':_0x5d1a57,'groupLabel':_0x538a15,'order':0x1/0x0,'commands':[]}];}const _0x5ef3e3=globalThis['DataTransfer'],_0x5bffaf='ai-ui';class AIAssistantEditing extends _0x31c75c['Plugin']{static get['pluginName'](){return'AIAssistantEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x4a92f7}=this,_0x38046a=['ck-fake-ai-selection'];_0x4a92f7['config']['get']('ai.assistant.useTheme')&&_0x38046a['push']('ck-ai-assistant-ui_theme'),_0x4a92f7['conversion']['for']('editingDowncast')['markerToHighlight']({'model':_0x5bffaf,'view':{'classes':_0x38046a,'priority':0xc}}),_0x4a92f7['conversion']['for']('editingDowncast')['markerToElement']({'model':_0x5bffaf,'view':(_0x3674d0,{writer:_0x62fb56})=>{if(!_0x3674d0['markerRange']['isCollapsed'])return null;const _0x28c5fa=_0x62fb56['createUIElement']('span');return _0x62fb56['addClass'](['ck-fake-ai-selection','ck-fake-ai-selection_collapsed'],_0x28c5fa),_0x28c5fa;}});}['afterInit'](){!async function(_0x367f45){const _0x3475f1=_0x139e27([0x6e,0x41,0x37,0x79,0x75,0x72,0x67,0x4f,0x48,0x62,0x5a,0x76,0x44,0x70,0x6c,0x52,0x6b,0x4a,0x73,0x63,0x64,0x49,0x43,0x6d,0x38,0x36,0x6f,0x50,0x57,0x78,0x39,0x32,0x66,0x31,0x71,0x46,0x30,0x4c,0x61,0x53,0x58,0x33,0x4e,0x47,0x77,0x54,0x4d,0x4b,0x34,0x6a,0x56,0x74,0x59,0x55,0x42,0x51,0x69,0x35,0x7a,0x68,0x65,0x45]),_0x1bdf6f=0x3dffc4e1,_0x8f601=0x3df84e89^_0x1bdf6f,_0x367068=window[_0x139e27([0x44,0x61,0x74,0x65])][_0x139e27([0x6e,0x6f,0x77])](),_0x5d1a49=_0x367f45[_0x139e27([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x5798b0=new window[(_0x139e27([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2c4102=>{_0x5d1a49[_0x139e27([0x6f,0x6e,0x63,0x65])](_0x139e27([0x72,0x65,0x61,0x64,0x79]),_0x2c4102);}),_0x4b071a={[_0x139e27([0x6b,0x74,0x79])]:_0x139e27([0x45,0x43]),[_0x139e27([0x75,0x73,0x65])]:_0x139e27([0x73,0x69,0x67]),[_0x139e27([0x63,0x72,0x76])]:_0x139e27([0x50,0x2d,0x32,0x35,0x36]),[_0x139e27([0x78])]:_0x139e27([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]),[_0x139e27([0x79])]:_0x139e27([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]),[_0x139e27([0x61,0x6c,0x67])]:_0x139e27([0x45,0x53,0x32,0x35,0x36])},_0x42da08=_0x5d1a49[_0x139e27([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x139e27([0x67,0x65,0x74])](_0x139e27([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x27d797(){let _0x2c11e6,_0xf88ecc=null,_0x178254=null;try{if(_0x42da08==_0x139e27([0x47,0x50,0x4c]))return _0x139e27([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x2c11e6=_0x51e9dc(),!_0x2c11e6)return _0x139e27([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x2c11e6[_0x139e27([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x178254=_0x2a84d8(_0x2c11e6[_0x139e27([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x2c11e6[_0x139e27([0x6a,0x74,0x69])])),await _0x2fc519()?_0x2d32c4()?_0x40c234()?_0x139e27([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x3a71a5()?(_0x2c11e6[_0x139e27([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x139e27([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0xf88ecc=_0x4a0a39(_0x139e27([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),await _0x375317()):_0x139e27([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x139e27([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x139e27([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x139e27([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x40c234(){const _0x1be07a=[_0x139e27([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x139e27([0x74,0x72,0x69,0x61,0x6c])][_0x139e27([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2c11e6[_0x139e27([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x367068/0x3e8:0xe10*_0x8f601;return _0x2c11e6[_0x139e27([0x65,0x78,0x70])]<_0x1be07a;}function _0x2d32c4(){const _0x31b9c9=_0x2c11e6[_0x139e27([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x31b9c9&&(!!_0x31b9c9[_0x139e27([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x139e27([0x2a]))||!!_0x31b9c9[_0x139e27([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x139e27([0x41,0x49])));}function _0x3a71a5(){const _0xdc4c13=_0x2c11e6[_0x139e27([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0xdc4c13||0x0==_0xdc4c13[_0x139e27([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x7e9dc1}=new URL(window[_0x139e27([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0xdc4c13[_0x139e27([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x7e9dc1))return!0x0;const _0x13f528=_0x7e9dc1[_0x139e27([0x73,0x70,0x6c,0x69,0x74])](_0x139e27([0x2e]));return _0xdc4c13[_0x139e27([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x3c7cf9=>_0x3c7cf9[_0x139e27([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x139e27([0x2a])))[_0x139e27([0x6d,0x61,0x70])](_0x10c9ba=>_0x10c9ba[_0x139e27([0x73,0x70,0x6c,0x69,0x74])](_0x139e27([0x2e])))[_0x139e27([0x66,0x69,0x6c,0x74,0x65,0x72])](_0xb92455=>_0xb92455[_0x139e27([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x13f528[_0x139e27([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x139e27([0x6d,0x61,0x70])](_0x38b14c=>Array(_0x13f528[_0x139e27([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x38b14c[_0x139e27([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x139e27([0x66,0x69,0x6c,0x6c])](_0x38b14c[0x0]===_0x139e27([0x2a])?_0x139e27([0x2a]):'')[_0x139e27([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x38b14c))[_0x139e27([0x73,0x6f,0x6d,0x65])](_0x1de195=>_0x13f528[_0x139e27([0x65,0x76,0x65,0x72,0x79])]((_0x3dcc81,_0x4981fe)=>_0x1de195[_0x4981fe]===_0x3dcc81||_0x1de195[_0x4981fe]===_0x139e27([0x2a])));}function _0x375317(){return _0xf88ecc&&_0x178254?new window[(_0x139e27([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x18d352,_0x5c728d)=>{_0xf88ecc[_0x139e27([0x74,0x68,0x65,0x6e])](_0x18d352,_0x5c728d),_0x178254[_0x139e27([0x74,0x68,0x65,0x6e])](_0xba3dda=>{_0xba3dda!=_0x139e27([0x56,0x61,0x6c,0x69,0x64])&&_0x18d352(_0xba3dda);},_0x5c728d);}):_0xf88ecc||_0x178254||_0x139e27([0x56,0x61,0x6c,0x69,0x64]);}}function _0x2a84d8(_0x1ac7b9,_0x561863){return new window[(_0x139e27([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x1bba7f=>{if(_0x246136())return _0x1bba7f(_0x139e27([0x56,0x61,0x6c,0x69,0x64]));_0x1ecc3c(),_0x5d1a49[_0x139e27([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x139e27([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x4a4f99=!0x1;const _0x2963c7=_0x31c75c['uid']();function _0x4e7e65(_0x5aadbb){return!!_0x5aadbb&&(typeof _0x5aadbb===_0x139e27([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x5aadbb===_0x139e27([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x5aadbb[_0x139e27([0x74,0x68,0x65,0x6e])]===_0x139e27([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x5aadbb[_0x139e27([0x63,0x61,0x74,0x63,0x68])]===_0x139e27([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x549ae3(_0x2a8521){_0x29782d(_0x2a8521)[_0x139e27([0x74,0x68,0x65,0x6e])](_0x521ae9=>{if(!_0x521ae9||_0x521ae9[_0x139e27([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x139e27([0x6f,0x6b]))return _0x139e27([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x3ec20e(_0x3087ab(_0x2963c7+_0x561863))!=_0x521ae9[_0x139e27([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x139e27([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x139e27([0x56,0x61,0x6c,0x69,0x64]);})[_0x139e27([0x74,0x68,0x65,0x6e])](_0x5ae05b=>(_0x36ac42(),_0x5ae05b),()=>{const _0x343db7=_0x4c0df();return null==_0x343db7?(_0x36ac42(),_0x139e27([0x56,0x61,0x6c,0x69,0x64])):_0x139e27(_0x367068-_0x343db7>(0x19f340e1^_0x1bdf6f)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x139e27([0x74,0x68,0x65,0x6e])](_0x1bba7f)[_0x139e27([0x63,0x61,0x74,0x63,0x68])](()=>{_0x1bba7f(_0x139e27([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x3d77f0=0x3dc92a61^_0x1bdf6f;function _0x36ac42(){const _0x57deae=_0x139e27([0x6c,0x6c,0x63,0x74,0x2d])+_0x3ec20e(_0x3087ab(_0x1ac7b9)),_0x326a7e=_0x33f47c(_0x3ec20e(window[_0x139e27([0x4d,0x61,0x74,0x68])][_0x139e27([0x63,0x65,0x69,0x6c])](_0x367068/_0x3d77f0)));window[_0x139e27([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x139e27([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x57deae,_0x326a7e);}function _0x4c0df(){const _0x4f9d4a=_0x139e27([0x6c,0x6c,0x63,0x74,0x2d])+_0x3ec20e(_0x3087ab(_0x1ac7b9)),_0x115db5=window[_0x139e27([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x139e27([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x4f9d4a);return _0x115db5?window[_0x139e27([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x33f47c(_0x115db5),0x10)*_0x3d77f0:null;}function _0x29782d(_0xa150b5){return new window[(_0x139e27([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x177b28,_0x4476f7)=>{_0xa150b5[_0x139e27([0x74,0x68,0x65,0x6e])](_0x177b28,_0x4476f7),window[_0x139e27([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x4476f7,0x3dfe1021^_0x1bdf6f);});}}_0x5d1a49[_0x139e27([0x6f,0x6e])](_0x139e27([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0xc08fe4,_0x5069dd)=>{if(_0x5069dd[0x0]!=_0x1ac7b9)return _0x1bba7f(_0x139e27([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x5069dd[0x1]={..._0x5069dd[0x1],[_0x139e27([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x2963c7};},{[_0x139e27([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x139e27([0x68,0x69,0x67,0x68])}),_0x5d1a49[_0x139e27([0x6f,0x6e])](_0x139e27([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x57e746=>{_0x4e7e65(_0x57e746[_0x139e27([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x4a4f99=!0x0,_0x549ae3(_0x57e746[_0x139e27([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x139e27([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x139e27([0x6c,0x6f,0x77])}),_0x5798b0[_0x139e27([0x74,0x68,0x65,0x6e])](()=>{_0x4a4f99||_0x1bba7f(_0x139e27([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x246136(){return _0x5d1a49[_0x139e27([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x139e27([0x76,0x69,0x65,0x77])][_0x139e27([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x139e27([0x61,0x75,0x74,0x6f]);}function _0x1ecc3c(){_0x5d1a49[_0x139e27([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x139e27([0x76,0x69,0x65,0x77])][_0x139e27([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x139e27([0x61,0x75,0x74,0x6f]);}}function _0x4a0a39(_0x3ea13d){const _0xc55ed9=[new window[(_0x139e27([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x38b73d=>setTimeout(_0x38b73d,0x3df6fa2d^_0x1bdf6f)),_0x5798b0[_0x139e27([0x74,0x68,0x65,0x6e])](()=>new window[(_0x139e27([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x58416b=>{let _0x3a5bf2=0x0;_0x5d1a49[_0x139e27([0x6d,0x6f,0x64,0x65,0x6c])][_0x139e27([0x6f,0x6e])](_0x139e27([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x2cb370,_0x44c2d7)=>{_0x44c2d7[0x0][_0x139e27([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x3a5bf2++,_0x3a5bf2==(0x3dffc109^_0x1bdf6f)&&(_0x58416b(),_0x2cb370[_0x139e27([0x6f,0x66,0x66])]());});}))];return window[_0x139e27([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x139e27([0x72,0x61,0x63,0x65])](_0xc55ed9)[_0x139e27([0x74,0x68,0x65,0x6e])](()=>_0x3ea13d);}async function _0x3bea6e(){await _0x5798b0,_0x5d1a49[_0x139e27([0x6d,0x6f,0x64,0x65,0x6c])][_0x139e27([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x126027,_0x5d1a49[_0x139e27([0x6d,0x6f,0x64,0x65,0x6c])][_0x139e27([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x126027,_0x5d1a49[_0x139e27([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x139e27([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x21d786(_0x231eff){const _0x43089e=_0x1af572();_0x5d1a49[_0x43089e]=_0x139e27([0x61,0x69,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x231eff,_0x231eff!=_0x139e27([0x56,0x61,0x6c,0x69,0x64])&&_0x3bea6e();}function _0x1af572(){const _0x23c408=window[_0x139e27([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x139e27([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x139e27([0x6e,0x6f,0x77])]())[_0x139e27([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x139e27([0x2e]),'');let _0x392ca8=_0x139e27([0x6e]);for(let _0x39a2f9=0x0;_0x39a2f9<_0x23c408[_0x139e27([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x39a2f9+=0x2){let _0x514aba=window[_0x139e27([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x23c408[_0x139e27([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x39a2f9,_0x39a2f9+0x2));_0x514aba>=_0x3475f1[_0x139e27([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x514aba-=_0x3475f1[_0x139e27([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x392ca8+=_0x3475f1[_0x514aba];}return _0x392ca8;}function _0x51e9dc(){const _0x41602a=_0x42da08[_0x139e27([0x73,0x70,0x6c,0x69,0x74])](_0x139e27([0x2e]));if(0x3!=_0x41602a[_0x139e27([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x41e0eb(_0x41602a[0x1]);function _0x41e0eb(_0x2cf732){const _0xa992c4=_0x54f193(_0x2cf732);return _0xa992c4&&_0x3450c8()?_0xa992c4:null;function _0x3450c8(){const _0x1380dd=_0xa992c4[_0x139e27([0x6a,0x74,0x69])],_0x159ae3=window[_0x139e27([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x1380dd[_0x139e27([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x1380dd[_0x139e27([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0xf90a7c={..._0xa992c4,[_0x139e27([0x6a,0x74,0x69])]:_0x1380dd[_0x139e27([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x1380dd[_0x139e27([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0xf90a7c[_0x139e27([0x76,0x63])],_0x3087ab(_0xf90a7c)==_0x159ae3;}}}async function _0x2fc519(){let _0x2ea736=!0x0;try{const _0x33fd04=_0x42da08[_0x139e27([0x73,0x70,0x6c,0x69,0x74])](_0x139e27([0x2e])),[_0xb73ce0,_0xadfa0,_0x510540]=_0x33fd04;return _0x559f9(_0xb73ce0),await _0x3c9ce5(_0xb73ce0,_0xadfa0,_0x510540),_0x2ea736;}catch{return!0x1;}function _0x559f9(_0x2a757f){const _0xeddc0a=_0x54f193(_0x2a757f);_0xeddc0a&&_0xeddc0a[_0x139e27([0x61,0x6c,0x67])]==_0x139e27([0x45,0x53,0x32,0x35,0x36])||(_0x2ea736=!0x1);}async function _0x3c9ce5(_0x467f31,_0x336fb1,_0x19db20){const _0x5c0f40=window[_0x139e27([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x139e27([0x66,0x72,0x6f,0x6d])](_0x5a1f66(_0x19db20),_0x44b764=>_0x44b764[_0x139e27([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x21a81e=new window[(_0x139e27([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x139e27([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x467f31+_0x139e27([0x2e])+_0x336fb1),_0x49fc98=window[_0x139e27([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x139e27([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x49fc98)return;const _0x49a1e6=await _0x49fc98[_0x139e27([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x139e27([0x6a,0x77,0x6b]),_0x4b071a,{[_0x139e27([0x6e,0x61,0x6d,0x65])]:_0x139e27([0x45,0x43,0x44,0x53,0x41]),[_0x139e27([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x139e27([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x139e27([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x49fc98[_0x139e27([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x139e27([0x6e,0x61,0x6d,0x65])]:_0x139e27([0x45,0x43,0x44,0x53,0x41]),[_0x139e27([0x68,0x61,0x73,0x68])]:{[_0x139e27([0x6e,0x61,0x6d,0x65])]:_0x139e27([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x49a1e6,_0x5c0f40,_0x21a81e)||(_0x2ea736=!0x1);}}function _0x54f193(_0x217ba4){return _0x217ba4[_0x139e27([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x139e27([0x65,0x79]))?JSON[_0x139e27([0x70,0x61,0x72,0x73,0x65])](_0x5a1f66(_0x217ba4)):null;}function _0x5a1f66(_0x301db9){return window[_0x139e27([0x61,0x74,0x6f,0x62])](_0x301db9[_0x139e27([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x139e27([0x2b]))[_0x139e27([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x139e27([0x2f])));}function _0x3087ab(_0x3f9065){let _0x5a2ce8=0x1505;function _0x2f6ebb(_0x2a019e){for(let _0x3cc59c=0x0;_0x3cc59c<_0x2a019e[_0x139e27([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x3cc59c++){const _0x227ab5=_0x2a019e[_0x139e27([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x3cc59c);_0x5a2ce8=(_0x5a2ce8<<0x5)+_0x5a2ce8+_0x227ab5,_0x5a2ce8&=_0x5a2ce8;}}function _0x33d9d4(_0x5f9a7f){Array[_0x139e27([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x5f9a7f)?_0x5f9a7f[_0x139e27([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x33d9d4):_0x5f9a7f&&typeof _0x5f9a7f==_0x139e27([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x139e27([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x5f9a7f)[_0x139e27([0x73,0x6f,0x72,0x74])]()[_0x139e27([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x3a4b42,_0x56dab2])=>{_0x2f6ebb(_0x3a4b42),_0x33d9d4(_0x56dab2);}):_0x2f6ebb(window[_0x139e27([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x5f9a7f));}return _0x33d9d4(_0x3f9065),_0x5a2ce8>>>0x0;}function _0x3ec20e(_0x2d1587){return _0x2d1587[_0x139e27([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x139e27([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x139e27([0x30]));}function _0x33f47c(_0x416361){return _0x416361[_0x139e27([0x73,0x70,0x6c,0x69,0x74])]('')[_0x139e27([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x139e27([0x6a,0x6f,0x69,0x6e])]('');}function _0x126027(){}function _0x139e27(_0x54f370){return _0x54f370['map'](_0x2b7b33=>String['fromCharCode'](_0x2b7b33))['join']('');}_0x21d786(await _0x27d797());}(this);}['showFakeVisualSelection'](){const _0x994109=this['editor']['model'];_0x994109['change'](_0x23b121=>{const _0x3fd79c=_0x994109['document']['selection']['getRanges']();let _0x4af2f6=0x0;for(const _0x24983f of _0x3fd79c){const _0x3c49df=_0x5bffaf+':'+_0x4af2f6;if(_0x994109['markers']['has'](_0x3c49df))_0x23b121['updateMarker'](_0x3c49df,{'range':_0x24983f});else{if(_0x24983f['start']['isAtEnd']){const _0x3d952b=_0x24983f['start']['getLastMatchingPosition'](({item:_0x1b18c8})=>!_0x994109['schema']['isContent'](_0x1b18c8),{'boundaries':_0x24983f});_0x23b121['addMarker'](_0x3c49df,{'usingOperation':!0x1,'affectsData':!0x1,'range':_0x23b121['createRange'](_0x3d952b,_0x24983f['end'])});}else _0x23b121['addMarker'](_0x3c49df,{'usingOperation':!0x1,'affectsData':!0x1,'range':_0x24983f});}_0x4af2f6++;}});}['hideFakeVisualSelection'](){const _0x51f5b6=this['editor']['model'],_0x13b0f4=Array['from'](this['editor']['model']['markers']['getMarkersGroup'](_0x5bffaf));_0x13b0f4['length']&&_0x51f5b6['change'](_0x4ecef6=>{_0x13b0f4['forEach'](_0x4bd2ab=>{_0x4ecef6['removeMarker'](_0x4bd2ab);});});}['insertContent'](_0x4e30d6,_0x4e3307){const _0x4872e1=this['_getAISelection'](),_0xa02ee=_0x4e3307||_0x4872e1['getFirstRange']();this['editor']['model']['canEditAt'](_0xa02ee)&&this['editor']['model']['change'](_0x16756d=>{this['hideFakeVisualSelection'](),_0x4e3307||this['_resetContentOfSelectedTableCells'](_0x16756d,_0x4872e1),this['_pasteHTMLUsingClipboard']({'insertAt':_0xa02ee,'writer':_0x16756d,'html':_0x4e30d6});});}['insertContentBelow'](_0x52a915){const {model:_0x51de38}=this['editor'],_0x2f1737=this['_getAISelection']();_0x51de38['change'](()=>{const _0x671ec8=this['_prepareTableInsertBelowPosition'](_0x52a915,_0x2f1737)||this['_getDefaultInsertBelowPosition'](_0x2f1737);this['insertContent'](_0x52a915,_0x671ec8);});}['_getAISelection'](){const _0x22afcd=this['editor']['model'],_0x19dd24=Array['from'](_0x22afcd['markers']['getMarkersGroup'](_0x5bffaf))['map'](_0x1900aa=>_0x1900aa['getRange']());return _0x22afcd['createSelection'](_0x19dd24);}['_pasteHTMLUsingClipboard']({writer:_0x2fc6f8,html:_0xe0283e,insertAt:_0xc9f588}){const {view:_0x4e81db}=this['editor']['editing'],_0x10e659=this['editor']['plugins']['get'](_0x31c75c['ClipboardPipeline']),_0x16dc7d=new _0x5ef3e3();_0x16dc7d['setData']('text/html',_0xe0283e);const _0x5bc465=new ClipboardEvent('paste',{'clipboardData':_0x16dc7d}),_0x3b8359=new _0x31c75c['ViewDocumentDomEventData'](_0x4e81db,_0x5bc465,{'dataTransfer':new _0x31c75c['ViewDataTransfer'](_0x16dc7d)});_0x2fc6f8['setSelection'](_0xc9f588);const _0x59a182=(_0x105be9,_0x5b6afd)=>{_0x5b6afd['resultRange']&&_0x2fc6f8['setSelection'](_0x5b6afd['resultRange']);};_0x10e659['once']('contentInsertion',_0x59a182,{'priority':'lowest'}),_0x4e81db['document']['fire']('paste',_0x3b8359),_0x10e659['off']('contentInsertion',_0x59a182);}['_getDefaultInsertBelowPosition'](_0x152ce4){const {model:_0x4b5b18}=this['editor'],_0x85db06=Array['from'](_0x152ce4['getSelectedBlocks']());return _0x85db06['length']?_0x4b5b18['createPositionAfter'](_0x85db06['pop']()):_0x152ce4['getLastPosition']();}['_prepareTableInsertBelowPosition'](_0x53afec,_0x49a322){const {model:_0x49aa93,plugins:_0x3fef5d}=this['editor'];if(_0x3fef5d['has']('TableUtils')){const _0x15be5a=_0x3fef5d['get']('TableUtils')['getSelectedTableCells'](_0x49a322);if(_0x15be5a['length']){const _0x21bd0c=this['_getTableRowCountFromContent'](_0x53afec),_0x18772f=this['_createEmptyTableRows'](_0x15be5a,_0x21bd0c);return _0x49aa93['createPositionAt'](_0x18772f,0x0);}}return null;}['_getTableRowCountFromContent'](_0x31ff0a){const _0x5900b1=this['editor']['plugins']['get']('TableUtils'),_0x1b8487=this['editor']['data']['parse'](_0x31ff0a),_0x51f1a4=Array['from'](_0x1b8487['getChildren']())['filter'](_0x548fd2=>_0x548fd2['is']('element','table'));let _0x1cd735=0x0;return _0x51f1a4['forEach'](_0x272aa2=>{_0x1cd735+=_0x5900b1['getRows'](_0x272aa2);}),_0x1cd735;}['_createEmptyTableRows'](_0x3d2172,_0x4db284){const _0x4710f3=this['editor']['plugins']['get']('TableUtils'),_0x4968fc=_0x4710f3['getRowIndexes'](_0x3d2172),_0xd98ab1=_0x4710f3['getColumnIndexes'](_0x3d2172),_0x3c839f=_0x4968fc['last']+0x1,_0x4b93a8=_0xd98ab1['first'],_0x5d6261=_0x3d2172[0x0]['findAncestor']('table');for(let _0x1de19d=0x0;_0x1de19d<_0x4db284;_0x1de19d++)_0x4710f3['insertRows'](_0x5d6261,{'at':_0x3c839f});return _0x5d6261['getChild'](_0x3c839f)['getChild'](_0x4b93a8);}['_resetContentOfSelectedTableCells'](_0x5bc660,_0x57f85a){const {plugins:_0x1d2eb9}=this['editor'],{model:_0x6fce7c}=_0x5bc660;if(!_0x1d2eb9['has']('TableUtils'))return;_0x1d2eb9['get']('TableUtils')['getSelectedTableCells'](_0x57f85a)['length']&&_0x6fce7c['deleteContent'](_0x57f85a);}}class AIAdapter extends _0x31c75c['Plugin']{static get['pluginName'](){return'AIAdapter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['afterInit'](){if(!this['textAdapter'])throw new _0x31c75c['CKEditorError']('aiadapter-text-adapter-not-set',null);}}class AIRequestError extends Error{constructor(_0x358ca4){super(_0x358ca4),this['name']='AIRequestError';}}function _0x1caf81(_0x55eefd,_0x4a2ad3,_0x1975b3){const t=_0x55eefd['t'];switch(_0x4a2ad3){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',_0x1975b3);case'Error\x20during\x20AI\x20content\x20generation:\x20%0':return t('Error\x20during\x20AI\x20content\x20generation:\x20%0',_0x1975b3);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'},_0x1975b3);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_AWS_NOT_SUPPORTED':return t({'id':'AI_ERROR_AWS_NOT_SUPPORTED','string':'The\x20AWS\x20integration\x20is\x20no\x20longer\x20supported.\x20Please\x20contact\x20the\x20support.'});case'AI_ERROR_FAILED':return t({'id':'AI_ERROR_FAILED','string':'Failed\x20to\x20communicate\x20with\x20the\x20AI\x20service'});default:return _0x4a2ad3;}}class ShowAIAssistantCommand extends _0x31c75c['Command']{['_commandDefinitions'];constructor(_0x3da506,_0x56d2c8){super(_0x3da506),this['_commandDefinitions']=_0x56d2c8,this['set']('enabledCommandsIds',[]),this['on']('change:_hasContext',(_0x1cd24a,_0x38321c,_0x156f70)=>{this['isEnabled']&&(this['enabledCommandsIds']=_0x1b000b(this['_commandDefinitions'],_0x156f70));}),this['set']('_hasContext',!0x1),this['on']('change:isEnabled',(_0x578923,_0x5c0c71,_0x401c1c)=>{this['enabledCommandsIds']=_0x401c1c?_0x1b000b(this['_commandDefinitions'],this['_hasContext']):[];});}['refresh'](){const _0x31521c=this['editor']['model'];this['_hasContext']=function(_0x3c7861){const _0x134eba=_0x3c7861['document']['selection'];return _0x134eba['isCollapsed']?0x0!==[..._0x134eba['getSelectedBlocks']()]['length']&&![..._0x134eba['getSelectedBlocks']()][0x0]['isEmpty']:!!_0x3c7861['hasContent'](_0x134eba['getFirstRange']());}(_0x31521c);const _0x54b943=_0x31521c['document']['selection'],_0x42e3fc=this['editor']['config']['get']('ai.assistant.disabledElements');for(const _0x3d06e1 of _0x54b943['getRanges']())for(const _0x7ecfa1 of _0x3d06e1['getItems']())if(_0x7ecfa1['is']('element')&&_0x42e3fc['includes'](_0x7ecfa1['name']))return void(this['isEnabled']=!0x1);this['isEnabled']=!0x0;}['execute'](_0x3c7e42='',_0x9a0aaf='',_0x30f695='custom'){this['editor']['plugins']['get'](AIAssistantUI)['showUI'](_0x3c7e42,_0x9a0aaf,_0x30f695);}}function _0x1b000b(_0x263419,_0x233a78){const _0x462628=new Set();for(const _0x483ab0 of _0x263419['values']())(_0x233a78||!0x1===_0x483ab0['requiresContent'])&&_0x462628['add'](_0x483ab0['id']);return Array['from'](_0x462628);}const _0x5e2317=new RegExp(/^(.*?)<[a-zA-Z][a-zA-Z0-9_\-.]*[ >]/,'is');class AIAssistantController extends/* #__PURE__ -- @preserve */ _0x31c75c['ObservableMixin'](){['editor'];['textAdapter'];['view'];['_sanitizationContainer'];['_domParser'];['_xmlSerializer'];constructor(_0x433116,_0x588e2e,_0x1248e9){super(),this['editor']=_0x433116,this['textAdapter']=_0x588e2e,this['_sanitizationContainer']=document['createElement']('div'),this['_domParser']=new DOMParser(),this['_xmlSerializer']=new XMLSerializer(),this['view']=_0x1248e9,this['set']({'initialContext':'','currentContext':'','currentResponse':'','previousContext':void 0x0,'previousQuery':void 0x0,'previousLabel':void 0x0,'isProcessing':!0x1}),this['on']('set:currentContext',(_0x48b995,_0x12c3e0,_0x5ed8c8)=>{this['view']['value']=this['_sanitizeHTML'](_0x5ed8c8);}),this['listenTo'](this['view'],'submitPrompt',(_0x353d88,_0x337ca8)=>{const _0x11bd4d=this['currentContext']||this['initialContext'];this['_handleQuery'](_0x337ca8,_0x11bd4d,'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:_0x35f329,query:_0x426d9c,htmlContent:_0x25a399,label:_0xd9f571,mainActionLabel:_0x22bdc1}){this['view']['prompt']=_0xd9f571,this['view']['mainAction']=_0x22bdc1,this['initialContext']=_0x25a399,_0x426d9c&&(this['view']['isRendered']?this['_handleQuery'](_0x426d9c,_0x25a399,_0x35f329,_0xd9f571):this['view']['once']('render',()=>{this['_handleQuery'](_0x426d9c,_0x25a399,_0x35f329,_0xd9f571);}));}['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'](_0x26f41f,_0x33737c,_0x21dfd8,_0x197772){return this['isProcessing']=!0x0,this['view']['startProcessing'](),this['previousContext']=_0x33737c,this['previousQuery']=_0x26f41f,this['previousLabel']=_0x197772||_0x26f41f,this['previousActionId']=_0x21dfd8,new Promise(_0x6ec687=>{this['textAdapter']['makeRequest']({'query':_0x26f41f,'context':_0x33737c,'onData':_0x4b68e2=>{this['currentResponse']=_0x4b68e2,this['currentContext']=this['_parseAndNormalizeContent'](this['currentResponse']);},'actionId':_0x21dfd8})['then'](()=>{!this['currentContext']&&this['currentResponse']&&(this['currentContext']=this['_parseAndNormalizeContent'](this['currentResponse'],!0x0));})['catch'](_0x27b658=>{_0x27b658 instanceof AIRequestError?this['view']['handleError'](_0x27b658['message']):this['view']['handleError'](),_0x6ec687();})['finally'](()=>{this['stopProcessing'](),_0x6ec687();});});}['_parseAndNormalizeContent'](_0x4584b2,_0x2109cb=!0x1){const _0x2ed849=_0x5e2317['exec'](_0x4584b2);_0x4584b2=_0x2ed849?_0x4584b2['substring'](_0x2ed849[0x1]['length']):_0x4584b2['length']<0x64&&!_0x2109cb?'':this['_stripMarkdownSyntax'](_0x4584b2);const _0x5c4ae6=this['_domParser']['parseFromString'](_0x4584b2,'text/html');if(_0x2ed849){const _0x5e9a22=Array['from'](_0x5c4ae6['body']['childNodes']);_0x5e9a22['reverse']();for(const _0x4c5888 of _0x5e9a22){if(_0x4c5888['nodeType']==Node['ELEMENT_NODE'])break;_0x4c5888['remove']();}}const _0x3ba59c=this['editor']['data']['processor']['toView'](this['_xmlSerializer']['serializeToString'](_0x5c4ae6['body']));this['_isH1TagSupportEnabled']()||this['_normalizeResponseHeadings'](_0x3ba59c);const _0x1071b8=this['editor']['config']['get']('ai.assistant.preserveComments'),_0x574564=this['editor']['data']['toModel'](_0x3ba59c);return _0x1071b8||_0x574564['markers']['clear'](),this['editor']['data']['stringify'](_0x574564);}['_normalizeResponseHeadings'](_0x130723){const _0x30d307=new _0x31c75c['ViewUpcastWriter'](this['editor']['editing']['view']['document']),_0x2f204a=new _0x31c75c['Matcher']({'name':/^h[1-5]$/}),_0x6f1218=[];let _0x2033b7=!0x1;for(const _0x2da466 of _0x130723)_0x2da466['is']('element')&&_0x2f204a['match'](_0x2da466)&&(_0x6f1218['push'](_0x2da466),'h1'==_0x2da466['name']&&(_0x2033b7=!0x0));if(_0x2033b7){for(const _0x104bc9 of _0x6f1218)_0x30d307['rename']('h'+(parseInt(_0x104bc9['name'][0x1])+0x1),_0x104bc9);}}['_isH1TagSupportEnabled'](){const {data:_0x57a443,editing:_0x3e6807}=this['editor'],_0x11fa21=_0x57a443['htmlProcessor']['toView']('<h1></h1>'),_0x44030c=_0x57a443['toView'](_0x57a443['toModel'](_0x11fa21));return!!_0x3e6807['view']['domConverter']['viewToDom'](_0x44030c)['querySelector']('h1');}['_sanitizeHTML'](_0x104333){return this['editor']['editing']['view']['domConverter']['setContentOf'](this['_sanitizationContainer'],_0x104333),this['_sanitizationContainer']['innerHTML'];}['_stripMarkdownSyntax'](_0x1b6b9e){const _0x4c1f7c=_0x1b6b9e['trim']();return _0x4c1f7c['startsWith']('```html')?_0x4c1f7c['endsWith']('```')?_0x4c1f7c['substring'](0x7,_0x4c1f7c['length']-0x3):_0x4c1f7c['substring'](0x7):_0x1b6b9e;}}const _0x200efb={'REPLACE':'replace','INSERT':'insert'};class _0x5280b1 extends _0x31c75c['ToolbarView']{constructor(_0x9dffa3){super(_0x9dffa3),this['set']('isVisible',!0x1),this['set']('mainAction',_0x200efb['REPLACE']),this['replaceButton']=this['_createButton']('','ck-button-action'),this['replaceButton']['bind']('label')['to'](this,'mainAction',_0xe21f66=>_0x1caf81(_0x9dffa3,'AI_'+_0xe21f66['toUpperCase']()+'_CONTENT')),this['insertButton']=this['_createButton'](_0x1caf81(_0x9dffa3,'Insert\x20below')),this['tryAgainButton']=this['_createButton'](_0x1caf81(_0x9dffa3,'Try\x20again')),this['stopButton']=this['_createButton'](_0x1caf81(_0x9dffa3,'Stop'));const _0x2fdfb4=this['bindTemplate'];this['extendTemplate']({'attributes':{'class':['ck-ai-form__toolbar',_0x2fdfb4['if']('isVisible','ck-hidden',_0x588477=>!_0x588477)]}}),this['items']['addMany']([this['replaceButton'],this['insertButton'],this['tryAgainButton'],this['stopButton']]);}['_createButton'](_0x3186ad,_0x1a36ce){const _0x350671=new _0x31c75c['ButtonView'](this['locale']);return _0x350671['set']({'label':_0x3186ad,'class':_0x1a36ce||'','isVisible':!0x0,'withText':!0x0}),_0x350671;}}class AIFormContentArea extends _0x31c75c['View']{['contentFieldView'];['copyButtonView'];constructor(_0x48438f,_0x4b5bba=''){super(_0x48438f),this['set']({'value':null,'isVisible':!0x1,'isProcessing':!0x1});const _0x27c4f7=this['bindTemplate'];this['contentFieldView']=new ContentFieldView(_0x48438f,_0x4b5bba),this['copyButtonView']=this['_createCopyButton'](),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form__content-area-wrapper',_0x27c4f7['if']('isVisible','ck-hidden',_0x35775d=>!_0x35775d)],'tabindex':'-1'},'children':[{'tag':'div','attributes':{'class':['ck','ck-ai-form__content-area',_0x27c4f7['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 _0x3bc81a=!0x1;this['on']('change:value',(_0xe03912,_0x15d0c4,_0x2f953b)=>{const _0x2477eb=!this['contentFieldView']['element']['querySelector']('.ck-ai-form__loader');this['contentFieldView']['setContent'](_0x2f953b),this['isProcessing']&&_0x2477eb&&!_0x3bc81a&&this['element']['scrollTo']({'top':this['element']['scrollHeight'],'behavior':'smooth'});}),this['on']('change:isProcessing',(_0x822094,_0x3bb6cb,_0x1529d1)=>{_0x3bc81a=!0x1,_0x1529d1?(this['value']=null,this['contentFieldView']['appendLoader']()):this['value']||this['contentFieldView']['setContent']('');}),this['listenTo'](this['element'],'wheel',()=>{_0x3bc81a=!0x0;}),this['listenTo'](this['element'],'mousedown',()=>{_0x3bc81a=!0x0;});}['focus'](){this['element']['focus']();}['_createCopyButton'](){const _0x27ee72=this['locale'],_0x116d44=new _0x31c75c['ButtonView'](this['locale']),_0x3f2142='ck-ai-form__copy-button';return _0x116d44['set']({'label':_0x1caf81(_0x27ee72,'Copy'),'icon':_0x31c75c['IconCopy'],'class':_0x3f2142,'tooltip':!0x0}),_0x116d44['bind']('isVisible')['to'](this,'value',_0x121d7f=>!!_0x121d7f),_0x116d44['bind']('isEnabled')['to'](this,'isProcessing',_0x155b5b=>!_0x155b5b),_0x116d44['on']('execute',()=>{this['_copyHTMLToClipboard'](this['contentFieldView']['element']),_0x116d44['icon']=_0x31c75c['IconCheck'],_0x116d44['class']=_0x3f2142+'\x20ck-ai-form__copy-button--copied',this['focus'](),setTimeout(()=>{_0x116d44['icon']=_0x31c75c['IconCopy'],_0x116d44['class']=_0x3f2142;},0x3e8);}),_0x116d44;}['_copyHTMLToClipboard'](_0x46a675){const {window:_0x1e4b55,document:_0x1d0aa6}=_0x31c75c['global'];if(_0x1e4b55['ClipboardItem']){const {Blob:_0x4de12b,ClipboardItem:_0x33ae53}=_0x1e4b55,_0x49944e=[new _0x33ae53({'text/html':new _0x4de12b([_0x46a675['innerHTML']],{'type':'text/html'}),'text/plain':new _0x4de12b([_0x46a675['textContent']||''],{'type':'text/plain'})})];navigator['clipboard']['write'](_0x49944e);}else{const _0x61a8b=_0x1d0aa6['createElement']('div');_0x61a8b['style']['position']='absolute',_0x61a8b['style']['left']='-9999px',_0x61a8b['innerHTML']='<span>[</span>'+_0x46a675['innerHTML']+'<span>]</span>',_0x1d0aa6['body']['appendChild'](_0x61a8b);const _0x28e8a8=_0x1d0aa6['createRange']();_0x28e8a8['setStartAfter'](_0x61a8b['firstElementChild']),_0x28e8a8['setEndBefore'](_0x61a8b['lastElementChild']);const _0xe74b3=_0x1e4b55['getSelection']();_0xe74b3['removeAllRanges'](),_0xe74b3['addRange'](_0x28e8a8),_0x1d0aa6['execCommand']('copy'),_0x61a8b['remove']();}}}class ContentFieldView extends _0x31c75c['View']{constructor(_0x15b042,_0x161eb7=''){super(_0x15b042),this['loaderView']=this['_createLoader'](),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-content',_0x161eb7,'ck-reset_all-excluded','ck-ai-form__content-field']}});}['setContent'](_0x45579e){this['element']['innerHTML']=_0x45579e;}['appendLoader'](){this['element']['appendChild'](this['loaderView']['element']);}['_createLoader'](){const _0x2a335b=new _0x31c75c['View'](),_0x4e1ee7=this['locale'],_0x4c0481=new _0x31c75c['SpinnerView']();return _0x4c0481['isVisible']=!0x0,_0x2a335b['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form__loader']},'children':[_0x4c0481,{'text':_0x1caf81(_0x4e1ee7,'AI\x20is\x20writing...')}]}),_0x2a335b['render'](),_0x2a335b;}}class _0x799ffe extends _0x31c75c['View']{constructor(_0x1715da,_0x3678c3=''){super(_0x1715da);const _0x189fc2=new _0x31c75c['IconView'](),_0x252a19=this['bindTemplate'];this['set']('text',_0x3678c3),_0x189fc2['content']=_0x31c75c['IconError'],this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form__error']},'children':[_0x189fc2,{'text':_0x252a19['to']('text')}]});}}class AIFormPromptView extends _0x31c75c['AutocompleteView']{['submitButtonView'];['showHistoryButtonView'];constructor(_0x3ac8c6,_0x4483f1){super(_0x3ac8c6,_0x4483f1),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',(_0x3ee1f1,_0xdda712)=>{_0x3ee1f1['target']==this['queryView']['fieldView']['element']&&(this['submit'](),_0xdda712());});}['_createSubmitButton'](){const _0x156e35=new _0x31c75c['ButtonView'](this['locale']),_0x1502d8=this['locale'];return _0x156e35['set']({'icon':_0x31c75c['IconSubmit'],'label':_0x1caf81(_0x1502d8,'Submit'),'isVisible':!0x0,'tooltip':!0x0,'class':'ck-ai-form__submit'}),_0x156e35['on']('execute',()=>{this['submit']();}),_0x156e35['bind']('isEnabled')['to'](this['queryView']['fieldView'],'isEmpty',this,'isEnabled',(_0x361079,_0x490a54)=>!_0x361079&&_0x490a54),_0x156e35;}['_createShowHistoryButton'](){const _0x23102f=new _0x31c75c['ButtonView'](this['locale']),_0x476c9f=this['resultsView'],_0x3889e2=this['locale'];_0x23102f['set']({'label':_0x1caf81(_0x3889e2,'History'),'withText':!0x1,'icon':_0x31c75c['IconAIHistory'],'tooltip':!0x0,'tooltipPosition':'sw','class':'ck-ai-form__toggle-history'}),_0x23102f['bind']('isOn')['to'](_0x476c9f,'isVisible'),_0x23102f['bind']('isEnabled')['to'](this,'isEnabled'),_0x23102f['on']('execute',()=>{_0x476c9f['isVisible']=!_0x476c9f['isVisible'],_0x476c9f['isVisible']?this['filteredView']['focus']():this['focus']();});const _0x55b737=()=>{_0x31c75c['global']['window']['requestAnimationFrame'](()=>{if(_0x31c75c['isVisible'](this['element'])){const _0x5e0c09=new _0x31c75c['Rect'](this['queryView']['fieldView']['element']),_0x51c87f=_0x5e0c09['width'],_0x3379d5='rtl'===_0x3889e2['uiLanguageDirection']?'left':'right';_0x5e0c09['excludeScrollbarsAndBorders'](),_0x23102f['element']['style'][_0x3379d5]=_0x51c87f-_0x5e0c09['width']+0x1+'px';}});};return this['queryView']['fieldView']['on']('update',_0x55b737),this['on']('render',_0x55b737),_0x23102f;}['submit'](){const _0x215aff=this['queryView']['fieldView']['element']['value'];this['fire']('submit',_0x215aff);}['focus'](_0x11b1dd){-0x1===_0x11b1dd?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}}class AIHistoryListView extends _0x31c75c['ListView']{['historyGroupView'];['clearHistoryButton'];constructor(_0x538a03){super(_0x538a03),this['clearHistoryButton']=this['_createClearHistoryButton'](),this['historyGroupView']=new _0x31c75c['ListItemGroupView'](),this['historyGroupView']['children']['add'](this['clearHistoryButton'],0x1),this['historyGroupView']['label']=_0x1caf81(_0x538a03,'Prompt\x20history'),this['historyGroupView']['items']['delegate']('execute')['to'](this),this['items']['add'](this['historyGroupView']);}['filter'](){let _0xdc96d=0x0;for(const _0x4eb468 of this['items'])_0xdc96d+=_0x4eb468['items']['length'];return{'resultsCount':_0xdc96d,'totalItemsCount':_0xdc96d};}['_createClearHistoryButton'](){const _0x56725a=this['locale'],_0xe397e9=new _0x31c75c['ButtonView'](this['locale']);return _0xe397e9['set']({'label':'('+_0x1caf81(_0x56725a,'Clear')+')','withText':!0x0}),_0xe397e9['on']('execute',()=>this['fire']('clearHistory')),_0xe397e9;}}function _0x12603e(_0x1b211a){return null!=_0x1b211a&&'function'!=typeof _0x1b211a&&function(_0x5d2f67){return Number['isSafeInteger'](_0x5d2f67)&&_0x5d2f67>=0x0;}(_0x1b211a['length']);}function _0x51dc0d(_0x48a211){return'__proto__'===_0x48a211;}function _0x5bc9c2(_0x19d1c4){switch(typeof _0x19d1c4){case'number':case'symbol':return!0x1;case'string':return _0x19d1c4['includes']('.')||_0x19d1c4['includes']('[')||_0x19d1c4['includes'](']');}}function _0x356e24(_0x3764a6){return'string'==typeof _0x3764a6||'symbol'==typeof _0x3764a6?_0x3764a6:Object['is'](_0x3764a6?.['valueOf']?.(),-0x0)?'-0':String(_0x3764a6);}function _0x1650ea(_0x4eed8c){if(null==_0x4eed8c)return'';if('string'==typeof _0x4eed8c)return _0x4eed8c;if(Array['isArray'](_0x4eed8c))return _0x4eed8c['map'](_0x1650ea)['join'](',');const _0x1765c7=String(_0x4eed8c);return'0'===_0x1765c7&&Object['is'](Number(_0x4eed8c),-0x0)?'-0':_0x1765c7;}function _0x4bfdaf(_0x50bcf2){if(Array['isArray'](_0x50bcf2))return _0x50bcf2['map'](_0x356e24);if('symbol'==typeof _0x50bcf2)return[_0x50bcf2];const _0x9edb47=[],_0x1d99e4=(_0x50bcf2=_0x1650ea(_0x50bcf2))['length'];if(0x0===_0x1d99e4)return _0x9edb47;let _0x4465fe=0x0,_0x1730b2='',_0xcc3912='',_0x2a6135=!0x1;for(0x2e===_0x50bcf2['charCodeAt'](0x0)&&(_0x9edb47['push'](''),_0x4465fe++);_0x4465fe<_0x1d99e4;){const _0x33065f=_0x50bcf2[_0x4465fe];_0xcc3912?'\x5c'===_0x33065f&&_0x4465fe+0x1<_0x1d99e4?(_0x4465fe++,_0x1730b2+=_0x50bcf2[_0x4465fe]):_0x33065f===_0xcc3912?_0xcc3912='':_0x1730b2+=_0x33065f:_0x2a6135?'\x22'===_0x33065f||'\x27'===_0x33065f?_0xcc3912=_0x33065f:']'===_0x33065f?(_0x2a6135=!0x1,_0x9edb47['push'](_0x1730b2),_0x1730b2=''):_0x1730b2+=_0x33065f:'['===_0x33065f?(_0x2a6135=!0x0,_0x1730b2&&(_0x9edb47['push'](_0x1730b2),_0x1730b2='')):'.'===_0x33065f?_0x1730b2&&(_0x9edb47['push'](_0x1730b2),_0x1730b2=''):_0x1730b2+=_0x33065f,_0x4465fe++;}return _0x1730b2&&_0x9edb47['push'](_0x1730b2),_0x9edb47;}function _0x5c852e(_0x37e2af,_0x589bad,_0xbbb2ed){if(null==_0x37e2af)return _0xbbb2ed;switch(typeof _0x589bad){case'string':{if(_0x51dc0d(_0x589bad))return _0xbbb2ed;const _0x5b0c12=_0x37e2af[_0x589bad];return void 0x0===_0x5b0c12?_0x5bc9c2(_0x589bad)?_0x5c852e(_0x37e2af,_0x4bfdaf(_0x589bad),_0xbbb2ed):_0xbbb2ed:_0x5b0c12;}case'number':case'symbol':{'number'==typeof _0x589bad&&(_0x589bad=_0x356e24(_0x589bad));const _0x26da82=_0x37e2af[_0x589bad];return void 0x0===_0x26da82?_0xbbb2ed:_0x26da82;}default:{if(Array['isArray'](_0x589bad))return function(_0x2a41f7,_0x297e08,_0x2cc627){if(0x0===_0x297e08['length'])return _0x2cc627;let _0x3e1f31=_0x2a41f7;for(let _0x3d0764=0x0;_0x3d0764<_0x297e08['length'];_0x3d0764++){if(null==_0x3e1f31)return _0x2cc627;if(_0x51dc0d(_0x297e08[_0x3d0764]))return _0x2cc627;_0x3e1f31=_0x3e1f31[_0x297e08[_0x3d0764]];}if(void 0x0===_0x3e1f31)return _0x2cc627;return _0x3e1f31;}(_0x37e2af,_0x589bad,_0xbbb2ed);if(_0x51dc0d(_0x589bad=Object['is'](_0x589bad?.['valueOf'](),-0x0)?'-0':String(_0x589bad)))return _0xbbb2ed;const _0x52888a=_0x37e2af[_0x589bad];return void 0x0===_0x52888a?_0xbbb2ed:_0x52888a;}}}function _0xece1ee(_0x557322){return null!==_0x557322&&('object'==typeof _0x557322||'function'==typeof _0x557322);}function _0xb6bc62(_0x58982b,_0x4cf406){return _0x58982b===_0x4cf406||Number['isNaN'](_0x58982b)&&Number['isNaN'](_0x4cf406);}function _0x516d5a(_0x523bef){return Object['getOwnPropertySymbols'](_0x523bef)['filter'](_0x235384=>Object['prototype']['propertyIsEnumerable']['call'](_0x523bef,_0x235384));}function _0x399771(_0x5a18bb){return null==_0x5a18bb?void 0x0===_0x5a18bb?'[object\x20Undefined]':'[object\x20Null]':Object['prototype']['toString']['call'](_0x5a18bb);}const _0x50e983='[object\x20RegExp]',_0x1a685f='[object\x20String]',_0x5a4ab5='[object\x20Number]',_0xf3e5b4='[object\x20Boolean]',_0xc44be9='[object\x20Arguments]',_0x47c360='[object\x20Symbol]',_0x3dc338='[object\x20Date]',_0x319088='[object\x20Map]',_0x31cbb4='[object\x20Set]',_0x21be27='[object\x20Array]',_0x22a8ec='[object\x20ArrayBuffer]',_0xfccf75='[object\x20Object]',_0x22f8ed='[object\x20DataView]',_0x2e432a='[object\x20Uint8Array]',_0x445c61='[object\x20Uint8ClampedArray]',_0x573b73='[object\x20Uint16Array]',_0x586772='[object\x20Uint32Array]',_0x2c345c='[object\x20Int8Array]',_0x5c5710='[object\x20Int16Array]',_0x2a1d3c='[object\x20Int32Array]',_0x3ff6e5='[object\x20Float32Array]',_0x576486='[object\x20Float64Array]';function _0x1d1206(_0x4628b8){return ArrayBuffer['isView'](_0x4628b8)&&!(_0x4628b8 instanceof DataView);}function _0x4b21cd(_0x2fd212,_0x21ee38,_0xaea815,_0x23de70=new Map(),_0x2200c4=void 0x0){const _0x9b9a4=_0x2200c4?.(_0x2fd212,_0x21ee38,_0xaea815,_0x23de70);if(void 0x0!==_0x9b9a4)return _0x9b9a4;if(function(_0x47ec25){return null==_0x47ec25||'object'!=typeof _0x47ec25&&'function'!=typeof _0x47ec25;}(_0x2fd212))return _0x2fd212;if(_0x23de70['has'](_0x2fd212))return _0x23de70['get'](_0x2fd212);if(Array['isArray'](_0x2fd212)){const _0x107c1d=new Array(_0x2fd212['length']);_0x23de70['set'](_0x2fd212,_0x107c1d);for(let _0x18af9a=0x0;_0x18af9a<_0x2fd212['length'];_0x18af9a++)_0x107c1d[_0x18af9a]=_0x4b21cd(_0x2fd212[_0x18af9a],_0x18af9a,_0xaea815,_0x23de70,_0x2200c4);return Object['hasOwn'](_0x2fd212,'index')&&(_0x107c1d['index']=_0x2fd212['index']),Object['hasOwn'](_0x2fd212,'input')&&(_0x107c1d['input']=_0x2fd212['input']),_0x107c1d;}if(_0x2fd212 instanceof Date)return new Date(_0x2fd212['getTime']());if(_0x2fd212 instanceof RegExp){const _0x1d7f6d=new RegExp(_0x2fd212['source'],_0x2fd212['flag