UNPKG

ckeditor5-premium-features

Version:

Premium features for CKEditor 5.

24 lines • 3.9 MB
/* * Copyright (c) 2003-2025, 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(_0x340cc4,_0x2383f2){'object'==typeof exports&&'undefined'!=typeof module?_0x2383f2(exports,require('ckeditor5')):'function'==typeof define&&define['amd']?define(['exports','ckeditor5'],_0x2383f2):_0x2383f2((_0x340cc4='undefined'!=typeof globalThis?globalThis:_0x340cc4||self)['CKEDITOR_PREMIUM_FEATURES']={},_0x340cc4['CKEDITOR']);}(this,function(exports,ckeditor5){'use strict';const _0x43026='_ungrouppedCommands';function _0x3de65c(_0x3909bb,_0x5e8851){const _0x506e61=(0x0,_0x5e8851['t'])('Other');return _0x3909bb['length']?'groupId'in _0x3909bb[0x0]?_0x3909bb:[{'groupId':_0x43026,'groupLabel':_0x506e61,'order':0x1/0x0,'commands':_0x3909bb}]:[{'groupId':_0x43026,'groupLabel':_0x506e61,'order':0x1/0x0,'commands':[]}];}const DomDataTransfer$1=globalThis['DataTransfer'],_0x151715='ai-ui';class AIAssistantEditing extends ckeditor5['Plugin']{static get['pluginName'](){return'AIAssistantEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x30cce0}=this,_0x1af886=['ck-fake-ai-selection'];_0x30cce0['config']['get']('ai.useTheme')&&_0x1af886['push']('ck-ai-assistant-ui_theme'),_0x30cce0['conversion']['for']('editingDowncast')['markerToHighlight']({'model':_0x151715,'view':{'classes':_0x1af886,'priority':0xc}}),_0x30cce0['conversion']['for']('editingDowncast')['markerToElement']({'model':_0x151715,'view':(_0x3897d3,{writer:_0x40f654})=>{if(!_0x3897d3['markerRange']['isCollapsed'])return null;const _0x26513e=_0x40f654['createUIElement']('span');return _0x40f654['addClass'](['ck-fake-ai-selection','ck-fake-ai-selection_collapsed'],_0x26513e),_0x26513e;}});}['afterInit'](){_0x1291d5(this);}['showFakeVisualSelection'](){const _0x2406b8=this['editor']['model'];_0x2406b8['change'](_0x5827be=>{const _0x5d486e=_0x2406b8['document']['selection']['getRanges']();let _0xc6f2a0=0x0;for(const _0xae60df of _0x5d486e){const _0x267624=_0x151715+':'+_0xc6f2a0;if(_0x2406b8['markers']['has'](_0x267624))_0x5827be['updateMarker'](_0x267624,{'range':_0xae60df});else{if(_0xae60df['start']['isAtEnd']){const _0x485297=_0xae60df['start']['getLastMatchingPosition'](({item:_0x5a6b03})=>!_0x2406b8['schema']['isContent'](_0x5a6b03),{'boundaries':_0xae60df});_0x5827be['addMarker'](_0x267624,{'usingOperation':!0x1,'affectsData':!0x1,'range':_0x5827be['createRange'](_0x485297,_0xae60df['end'])});}else _0x5827be['addMarker'](_0x267624,{'usingOperation':!0x1,'affectsData':!0x1,'range':_0xae60df});}_0xc6f2a0++;}});}['hideFakeVisualSelection'](){const _0x4fabde=this['editor']['model'],_0x6aedce=Array['from'](this['editor']['model']['markers']['getMarkersGroup'](_0x151715));_0x6aedce['length']&&_0x4fabde['change'](_0x572f60=>{_0x6aedce['forEach'](_0x2de489=>{_0x572f60['removeMarker'](_0x2de489);});});}['insertContent'](_0x3599be,_0x3ff0f2){const _0x1f6314=this['_getAISelection'](),_0x4361fe=_0x3ff0f2||_0x1f6314['getFirstRange']();this['editor']['model']['canEditAt'](_0x4361fe)&&this['editor']['model']['change'](_0x1001aa=>{this['hideFakeVisualSelection'](),_0x3ff0f2||this['_resetContentOfSelectedTableCells'](_0x1001aa,_0x1f6314),this['_pasteHTMLUsingClipboard']({'insertAt':_0x4361fe,'writer':_0x1001aa,'html':_0x3599be});});}['insertContentBelow'](_0x22579a){const {model:_0x14f39b}=this['editor'],_0x48a51d=this['_getAISelection']();_0x14f39b['change'](()=>{const _0x5316c7=this['_prepareTableInsertBelowPosition'](_0x22579a,_0x48a51d)||this['_getDefaultInsertBelowPosition'](_0x48a51d);this['insertContent'](_0x22579a,_0x5316c7);});}['_getAISelection'](){const _0x477378=this['editor']['model'],_0x2d4f32=Array['from'](_0x477378['markers']['getMarkersGroup'](_0x151715))['map'](_0x32bb6d=>_0x32bb6d['getRange']());return _0x477378['createSelection'](_0x2d4f32);}['_pasteHTMLUsingClipboard']({writer:_0x2922e4,html:_0x1e5c94,insertAt:_0x5a4b44}){const {view:_0x571ce9}=this['editor']['editing'],_0x2780e2=this['editor']['plugins']['get'](ckeditor5['ClipboardPipeline']),_0x222166=new DomDataTransfer$1();_0x222166['setData']('text/html',_0x1e5c94);const _0x2b73f4=new ClipboardEvent('paste',{'clipboardData':_0x222166}),_0x42fd8b=new ckeditor5['DomEventData'](_0x571ce9,_0x2b73f4,{'dataTransfer':new ckeditor5['DataTransfer'](_0x222166)});_0x2922e4['setSelection'](_0x5a4b44);const _0x65a36=(_0xddd6e9,_0x53fa60)=>{_0x53fa60['resultRange']&&_0x2922e4['setSelection'](_0x53fa60['resultRange']);};_0x2780e2['once']('contentInsertion',_0x65a36,{'priority':'lowest'}),_0x571ce9['document']['fire']('paste',_0x42fd8b),_0x2780e2['off']('contentInsertion',_0x65a36);}['_getDefaultInsertBelowPosition'](_0x239fcc){const {model:_0x23486e}=this['editor'],_0x35eeff=Array['from'](_0x239fcc['getSelectedBlocks']());return _0x35eeff['length']?_0x23486e['createPositionAfter'](_0x35eeff['pop']()):_0x239fcc['getLastPosition']();}['_prepareTableInsertBelowPosition'](_0x5ccb91,_0x17ea3d){const {model:_0x5752f2,plugins:_0x5819f1}=this['editor'];if(_0x5819f1['has']('TableUtils')){const _0xccf162=_0x5819f1['get']('TableUtils')['getSelectedTableCells'](_0x17ea3d);if(_0xccf162['length']){const _0x55c3bb=this['_getTableRowCountFromContent'](_0x5ccb91),_0x3c4793=this['_createEmptyTableRows'](_0xccf162,_0x55c3bb);return _0x5752f2['createPositionAt'](_0x3c4793,0x0);}}return null;}['_getTableRowCountFromContent'](_0x2a8cd5){const _0x51c40a=this['editor']['plugins']['get']('TableUtils'),_0x205523=this['editor']['data']['parse'](_0x2a8cd5),_0x61fe4f=Array['from'](_0x205523['getChildren']())['filter'](_0x17500d=>_0x17500d['is']('element','table'));let _0x12fd10=0x0;return _0x61fe4f['forEach'](_0x2e3cf6=>{_0x12fd10+=_0x51c40a['getRows'](_0x2e3cf6);}),_0x12fd10;}['_createEmptyTableRows'](_0x455458,_0x3f77a3){const _0x6abe80=this['editor']['plugins']['get']('TableUtils'),_0x24bbeb=_0x6abe80['getRowIndexes'](_0x455458),_0x74f44d=_0x6abe80['getColumnIndexes'](_0x455458),_0x170ace=_0x24bbeb['last']+0x1,_0x58a2a6=_0x74f44d['first'],_0x117d8=_0x455458[0x0]['findAncestor']('table');for(let _0x310c35=0x0;_0x310c35<_0x3f77a3;_0x310c35++)_0x6abe80['insertRows'](_0x117d8,{'at':_0x170ace});return _0x117d8['getChild'](_0x170ace)['getChild'](_0x58a2a6);}['_resetContentOfSelectedTableCells'](_0x1bd081,_0xca2b7d){const {plugins:_0x5ee1e5}=this['editor'],{model:_0x3d64ee}=_0x1bd081;if(!_0x5ee1e5['has']('TableUtils'))return;_0x5ee1e5['get']('TableUtils')['getSelectedTableCells'](_0xca2b7d)['length']&&_0x3d64ee['deleteContent'](_0xca2b7d);}}async function _0x1291d5(_0x5616e8){const _0x151fee=_0x47f258([0x39,0x72,0x58,0x32,0x41,0x30,0x66,0x45,0x56,0x36,0x49,0x4d,0x79,0x73,0x6e,0x31,0x35,0x6d,0x7a,0x71,0x68,0x67,0x34,0x59,0x76,0x6f,0x4b,0x33,0x52,0x63,0x50,0x54,0x65,0x4c,0x43,0x51,0x77,0x78,0x47,0x74,0x37,0x55,0x62,0x4f,0x57,0x69,0x48,0x4a,0x6b,0x42,0x38,0x61,0x75,0x4e,0x44,0x6a,0x70,0x6c,0x5a,0x46,0x64,0x53]),_0x197d22=window[_0x47f258([0x44,0x61,0x74,0x65])][_0x47f258([0x6e,0x6f,0x77])](),_0x3ab516=_0x5616e8[_0x47f258([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x331ae5=new window[(_0x47f258([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x79eb5f=>{_0x3ab516[_0x47f258([0x6f,0x6e,0x63,0x65])](_0x47f258([0x72,0x65,0x61,0x64,0x79]),_0x79eb5f);}),_0xc7e284={[_0x47f258([0x6b,0x74,0x79])]:_0x47f258([0x45,0x43]),[_0x47f258([0x75,0x73,0x65])]:_0x47f258([0x73,0x69,0x67]),[_0x47f258([0x63,0x72,0x76])]:_0x47f258([0x50,0x2d,0x32,0x35,0x36]),[_0x47f258([0x78])]:_0x47f258([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]),[_0x47f258([0x79])]:_0x47f258([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]),[_0x47f258([0x61,0x6c,0x67])]:_0x47f258([0x45,0x53,0x32,0x35,0x36])},_0xe9a526=_0x3ab516[_0x47f258([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x47f258([0x67,0x65,0x74])](_0x47f258([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])),_0x5d8ce8=await(async function(){let _0x5379a3,_0x38d50c=null,_0x1cd55e=null;try{if(_0xe9a526==_0x47f258([0x47,0x50,0x4c]))return _0x47f258([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x5379a3=(function(){const _0x333123=_0xe9a526[_0x47f258([0x73,0x70,0x6c,0x69,0x74])](_0x47f258([0x2e]));if(0x3!=_0x333123[_0x47f258([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;const _0x19d991=_0x333123[0x1];return _0x41d0ba(_0x19d991);function _0x41d0ba(_0x5c8743){const _0x3e574a=_0x163322(_0x5c8743);return _0x3e574a&&_0x1affd5()?_0x3e574a:null;function _0x1affd5(){const _0x1964fe=_0x3e574a[_0x47f258([0x6a,0x74,0x69])],_0x2c2af4=window[_0x47f258([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x1964fe[_0x47f258([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x1964fe[_0x47f258([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x239f42={..._0x3e574a,[_0x47f258([0x6a,0x74,0x69])]:_0x1964fe[_0x47f258([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x1964fe[_0x47f258([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x239f42[_0x47f258([0x76,0x63])],_0x30d4c7(_0x239f42)==_0x2c2af4;}}}()),!_0x5379a3)return _0x47f258([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);_0x5379a3[_0x47f258([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x1cd55e=function(_0x33cab8,_0x3f144e){return new window[(_0x47f258([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x1a22b3=>{if(_0x1c4497())return _0x1a22b3(_0x47f258([0x56,0x61,0x6c,0x69,0x64]));_0x5a644f(),_0x3ab516[_0x47f258([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x47f258([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x456f2b=!0x1;const _0x2634e6=ckeditor5['uid']();function _0x2b2717(_0x14b653){return!!_0x14b653&&(typeof _0x14b653===_0x47f258([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x14b653===_0x47f258([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x14b653[_0x47f258([0x74,0x68,0x65,0x6e])]===_0x47f258([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x14b653[_0x47f258([0x63,0x61,0x74,0x63,0x68])]===_0x47f258([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x59a8b3(_0x592731){_0x47ab7d(_0x592731)[_0x47f258([0x74,0x68,0x65,0x6e])](_0x5c2a01=>{if(!_0x5c2a01||_0x5c2a01[_0x47f258([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x47f258([0x6f,0x6b]))return _0x47f258([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x5c2504(_0x30d4c7(_0x2634e6+_0x3f144e))!=_0x5c2a01[_0x47f258([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x47f258([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x47f258([0x56,0x61,0x6c,0x69,0x64]);})[_0x47f258([0x74,0x68,0x65,0x6e])](_0x5120c0=>(_0x2a1009(),_0x5120c0),()=>{const _0x596df8=_0xb5e3d0();return null==_0x596df8?(_0x2a1009(),_0x47f258([0x56,0x61,0x6c,0x69,0x64])):_0x47f258(_0x197d22-_0x596df8>0x240c8400?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x47f258([0x74,0x68,0x65,0x6e])](_0x1a22b3)[_0x47f258([0x63,0x61,0x74,0x63,0x68])](()=>{_0x1a22b3(_0x47f258([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x3b0f84=0x36ee80;function _0x2a1009(){const _0x3d40b4=_0x47f258([0x6c,0x6c,0x63,0x74,0x2d])+_0x5c2504(_0x30d4c7(_0x33cab8)),_0x55cbc2=_0x4ca165(_0x5c2504(window[_0x47f258([0x4d,0x61,0x74,0x68])][_0x47f258([0x63,0x65,0x69,0x6c])](_0x197d22/_0x3b0f84)));window[_0x47f258([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x47f258([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x3d40b4,_0x55cbc2);}function _0xb5e3d0(){const _0x1d9df7=_0x47f258([0x6c,0x6c,0x63,0x74,0x2d])+_0x5c2504(_0x30d4c7(_0x33cab8)),_0x4fb048=window[_0x47f258([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x47f258([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x1d9df7);return _0x4fb048?window[_0x47f258([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x4ca165(_0x4fb048),0x10)*_0x3b0f84:null;}function _0x47ab7d(_0x2862b3){return new window[(_0x47f258([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x2477c6,_0x39cc5d)=>{_0x2862b3[_0x47f258([0x74,0x68,0x65,0x6e])](_0x2477c6,_0x39cc5d),window[_0x47f258([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x39cc5d,0x1d4c0);});}}_0x3ab516[_0x47f258([0x6f,0x6e])](_0x47f258([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x4f0d7c,_0x385df0)=>{if(_0x385df0[0x0]!=_0x33cab8)return _0x1a22b3(_0x47f258([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x385df0[0x1]={..._0x385df0[0x1],[_0x47f258([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x2634e6};},{[_0x47f258([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x47f258([0x68,0x69,0x67,0x68])}),_0x3ab516[_0x47f258([0x6f,0x6e])](_0x47f258([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x3cb65c=>{_0x2b2717(_0x3cb65c[_0x47f258([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x456f2b=!0x0,_0x59a8b3(_0x3cb65c[_0x47f258([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x47f258([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x47f258([0x6c,0x6f,0x77])}),_0x331ae5[_0x47f258([0x74,0x68,0x65,0x6e])](()=>{_0x456f2b||_0x1a22b3(_0x47f258([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x1c4497(){return _0x3ab516[_0x47f258([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x47f258([0x76,0x69,0x65,0x77])][_0x47f258([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x47f258([0x61,0x75,0x74,0x6f]);}function _0x5a644f(){_0x3ab516[_0x47f258([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x47f258([0x76,0x69,0x65,0x77])][_0x47f258([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x47f258([0x61,0x75,0x74,0x6f]);}}(_0x5379a3[_0x47f258([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x5379a3[_0x47f258([0x6a,0x74,0x69])]));const _0x21b947=await(async function(){let _0x5973fc=!0x0;try{const _0xfa71f9=_0xe9a526[_0x47f258([0x73,0x70,0x6c,0x69,0x74])](_0x47f258([0x2e])),[_0x3ce20a,_0x5dcdde,_0x4c2953]=_0xfa71f9;return _0x157450(_0x3ce20a),await _0x38de35(_0x3ce20a,_0x5dcdde,_0x4c2953),_0x5973fc;}catch{return!0x1;}function _0x157450(_0x3589e8){const _0x26a653=_0x163322(_0x3589e8);_0x26a653&&_0x26a653[_0x47f258([0x61,0x6c,0x67])]==_0x47f258([0x45,0x53,0x32,0x35,0x36])||(_0x5973fc=!0x1);}async function _0x38de35(_0x23dc7e,_0x523e8e,_0x11aee2){const _0x4e8eb8=window[_0x47f258([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x47f258([0x66,0x72,0x6f,0x6d])](_0x9f84fb(_0x11aee2),_0x2f6d34=>_0x2f6d34[_0x47f258([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x515b4a=new window[(_0x47f258([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x47f258([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x23dc7e+_0x47f258([0x2e])+_0x523e8e),_0x3f50b2=window[_0x47f258([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x47f258([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x3f50b2)return;const _0x50f4b5=await _0x3f50b2[_0x47f258([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x47f258([0x6a,0x77,0x6b]),_0xc7e284,{[_0x47f258([0x6e,0x61,0x6d,0x65])]:_0x47f258([0x45,0x43,0x44,0x53,0x41]),[_0x47f258([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x47f258([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x47f258([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x3f50b2[_0x47f258([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x47f258([0x6e,0x61,0x6d,0x65])]:_0x47f258([0x45,0x43,0x44,0x53,0x41]),[_0x47f258([0x68,0x61,0x73,0x68])]:{[_0x47f258([0x6e,0x61,0x6d,0x65])]:_0x47f258([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x50f4b5,_0x4e8eb8,_0x515b4a)||(_0x5973fc=!0x1);}}());return _0x21b947?(function(){const _0x175514=_0x5379a3[_0x47f258([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x175514)return!0x1;if(_0x175514[_0x47f258([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x47f258([0x2a])))return!0x0;if(_0x175514[_0x47f258([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x47f258([0x41,0x49])))return!0x0;return!0x1;}())?(function(){const _0x21bbb1=[_0x47f258([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x47f258([0x74,0x72,0x69,0x61,0x6c])][_0x47f258([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5379a3[_0x47f258([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x197d22/0x3e8:0x6859ea80;return _0x5379a3[_0x47f258([0x65,0x78,0x70])]<_0x21bbb1;}())?_0x47f258([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):(function(){const _0x910863=_0x5379a3[_0x47f258([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x910863||0x0==_0x910863[_0x47f258([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x51d760}=new URL(window[_0x47f258([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x910863[_0x47f258([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x51d760))return!0x0;const _0x650010=_0x51d760[_0x47f258([0x73,0x70,0x6c,0x69,0x74])](_0x47f258([0x2e]));return _0x910863[_0x47f258([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x485a9=>_0x485a9[_0x47f258([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x47f258([0x2a])))[_0x47f258([0x6d,0x61,0x70])](_0x5e2e63=>_0x5e2e63[_0x47f258([0x73,0x70,0x6c,0x69,0x74])](_0x47f258([0x2e])))[_0x47f258([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x46ca0b=>_0x46ca0b[_0x47f258([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x650010[_0x47f258([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x47f258([0x6d,0x61,0x70])](_0x32ba57=>Array(_0x650010[_0x47f258([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x32ba57[_0x47f258([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x47f258([0x66,0x69,0x6c,0x6c])](_0x32ba57[0x0]===_0x47f258([0x2a])?_0x47f258([0x2a]):'')[_0x47f258([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x32ba57))[_0x47f258([0x73,0x6f,0x6d,0x65])](_0x77d4f9=>_0x650010[_0x47f258([0x65,0x76,0x65,0x72,0x79])]((_0x24d11c,_0x47a6b2)=>_0x77d4f9[_0x47a6b2]===_0x24d11c||_0x77d4f9[_0x47a6b2]===_0x47f258([0x2a])));}())?(_0x5379a3[_0x47f258([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x47f258([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x38d50c=_0x2a35f5(_0x47f258([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x5379a3[_0x47f258([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x47f258([0x74,0x72,0x69,0x61,0x6c])&&(_0x38d50c=_0x2a35f5(_0x47f258([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await(function(){if(_0x38d50c&&_0x1cd55e)return new window[(_0x47f258([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x443239,_0x5cc464)=>{_0x38d50c[_0x47f258([0x74,0x68,0x65,0x6e])](_0x443239,_0x5cc464),_0x1cd55e[_0x47f258([0x74,0x68,0x65,0x6e])](_0xb6746c=>{_0xb6746c!=_0x47f258([0x56,0x61,0x6c,0x69,0x64])&&_0x443239(_0xb6746c);},_0x5cc464);});return _0x38d50c||_0x1cd55e||_0x47f258([0x56,0x61,0x6c,0x69,0x64]);}())):_0x47f258([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x47f258([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x47f258([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x47f258([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}}());function _0x2a35f5(_0x18fca0){const _0x385ef6=[new window[(_0x47f258([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x53ee28=>setTimeout(_0x53ee28,0x93ecc)),_0x331ae5[_0x47f258([0x74,0x68,0x65,0x6e])](()=>new window[(_0x47f258([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3f99d1=>{let _0x525e91=0x0;_0x3ab516[_0x47f258([0x6d,0x6f,0x64,0x65,0x6c])][_0x47f258([0x6f,0x6e])](_0x47f258([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x52f554,_0x125c93)=>{_0x125c93[0x0][_0x47f258([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x525e91++,0x1f8==_0x525e91&&(_0x3f99d1(),_0x52f554[_0x47f258([0x6f,0x66,0x66])]());});}))];return window[_0x47f258([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x47f258([0x72,0x61,0x63,0x65])](_0x385ef6)[_0x47f258([0x74,0x68,0x65,0x6e])](()=>_0x18fca0);}function _0x163322(_0x5ad3a0){return _0x5ad3a0[_0x47f258([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x47f258([0x65,0x79]))?JSON[_0x47f258([0x70,0x61,0x72,0x73,0x65])](_0x9f84fb(_0x5ad3a0)):null;}function _0x9f84fb(_0x268813){return window[_0x47f258([0x61,0x74,0x6f,0x62])](_0x268813[_0x47f258([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x47f258([0x2b]))[_0x47f258([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x47f258([0x2f])));}function _0x30d4c7(_0xb08e25){let _0x5d9d2d=0x1505;function _0x569180(_0x4826e9){for(let _0x58cf5e=0x0;_0x58cf5e<_0x4826e9[_0x47f258([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x58cf5e++){const _0x4e00a0=_0x4826e9[_0x47f258([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x58cf5e);_0x5d9d2d=(_0x5d9d2d<<0x5)+_0x5d9d2d+_0x4e00a0,_0x5d9d2d&=_0x5d9d2d;}}return function _0x5dd4d0(_0x2d07bc){Array[_0x47f258([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x2d07bc)?_0x2d07bc[_0x47f258([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x5dd4d0):_0x2d07bc&&typeof _0x2d07bc==_0x47f258([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x47f258([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x2d07bc)[_0x47f258([0x73,0x6f,0x72,0x74])]()[_0x47f258([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x5e664a,_0x54bb3a])=>{_0x569180(_0x5e664a),_0x5dd4d0(_0x54bb3a);}):_0x569180(window[_0x47f258([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x2d07bc));}(_0xb08e25),_0x5d9d2d>>>0x0;}function _0x5c2504(_0x36c60b){return _0x36c60b[_0x47f258([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x47f258([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x47f258([0x30]));}function _0x4ca165(_0x119233){return _0x119233[_0x47f258([0x73,0x70,0x6c,0x69,0x74])]('')[_0x47f258([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x47f258([0x6a,0x6f,0x69,0x6e])]('');}function _0x16389b(){}function _0x47f258(_0x30b2e9){return _0x30b2e9['map'](_0x3c1890=>String['fromCharCode'](_0x3c1890))['join']('');}!function(_0x5b9bca){const _0x54ef6d=(function(){const _0x394a15=window[_0x47f258([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x47f258([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x47f258([0x6e,0x6f,0x77])]())[_0x47f258([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x47f258([0x2e]),'');let _0x49fb7a=_0x47f258([0x72]);for(let _0x24b239=0x0;_0x24b239<_0x394a15[_0x47f258([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x24b239+=0x2){let _0x1a68f9=window[_0x47f258([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x394a15[_0x47f258([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x24b239,_0x24b239+0x2));_0x1a68f9>=_0x151fee[_0x47f258([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x1a68f9-=_0x151fee[_0x47f258([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x49fb7a+=_0x151fee[_0x1a68f9];}return _0x49fb7a;}());_0x3ab516[_0x54ef6d]=_0x47f258([0x61,0x69,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x5b9bca,_0x5b9bca!=_0x47f258([0x56,0x61,0x6c,0x69,0x64])&&(async function(){await _0x331ae5,_0x3ab516[_0x47f258([0x6d,0x6f,0x64,0x65,0x6c])][_0x47f258([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x16389b,_0x3ab516[_0x47f258([0x6d,0x6f,0x64,0x65,0x6c])][_0x47f258([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x16389b,_0x3ab516[_0x47f258([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x47f258([0x6d,0x6f,0x64,0x65,0x6c]));}());}(_0x5d8ce8);}class AIAdapter extends ckeditor5['Plugin']{static get['pluginName'](){return'AIAdapter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['afterInit'](){if(!this['textAdapter'])throw new ckeditor5['CKEditorError']('aiadapter-text-adapter-not-set',null);}}class AIRequestError extends Error{constructor(_0x165558){super(_0x165558),this['name']='AIRequestError';}}function getTranslation$i(_0x2aa3c0,_0x4091f9,_0x4accee){const t=_0x2aa3c0['t'];switch(_0x4091f9){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',_0x4accee);case'Error\x20during\x20AI\x20content\x20generation:\x20%0':return t('Error\x20during\x20AI\x20content\x20generation:\x20%0',_0x4accee);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'},_0x4accee);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 _0x4091f9;}}class ShowAIAssistantCommand extends ckeditor5['Command']{['_commandDefinitions'];constructor(_0x63fe9d,_0x385775){super(_0x63fe9d),this['_commandDefinitions']=_0x385775,this['set']('enabledCommandsIds',[]),this['on']('change:_hasContext',(_0x47652a,_0x536995,_0x4be957)=>{this['isEnabled']&&(this['enabledCommandsIds']=_getEnabledCommands(this['_commandDefinitions'],_0x4be957));}),this['set']('_hasContext',!0x1),this['on']('change:isEnabled',(_0x35ff5e,_0xc2c14,_0x26da14)=>{this['enabledCommandsIds']=_0x26da14?_getEnabledCommands(this['_commandDefinitions'],this['_hasContext']):[];});}['refresh'](){const _0x419cc4=this['editor']['model'];this['_hasContext']=_isContextAvailable(_0x419cc4);const _0x4acd3d=_0x419cc4['document']['selection'],_0x296f94=this['editor']['config']['get']('ai.aiAssistant.disabledElements');for(const _0x3a614e of _0x4acd3d['getRanges']())for(const _0x23562a of _0x3a614e['getItems']())if(_0x23562a['is']('element')&&_0x296f94['includes'](_0x23562a['name']))return void(this['isEnabled']=!0x1);this['isEnabled']=!0x0;}['execute'](_0x38aaa8='',_0x51ac65='',_0x432411='custom'){this['editor']['plugins']['get'](AIAssistantUI)['showUI'](_0x38aaa8,_0x51ac65,_0x432411);}}function _isContextAvailable(_0x59d1b8){const _0x30d727=_0x59d1b8['document']['selection'];return _0x30d727['isCollapsed']?0x0!==[..._0x30d727['getSelectedBlocks']()]['length']&&![..._0x30d727['getSelectedBlocks']()][0x0]['isEmpty']:!!_0x59d1b8['hasContent'](_0x30d727['getFirstRange']());}function _getEnabledCommands(_0x1a3eb1,_0xd053f5){const _0x54be55=new Set();for(const _0x1676db of _0x1a3eb1['values']())(_0xd053f5||!0x1===_0x1676db['requiresContent'])&&_0x54be55['add'](_0x1676db['id']);return Array['from'](_0x54be55);}const _0x332234=0x64,_0x226726=new RegExp(/^(.*?)<[a-zA-Z][a-zA-Z0-9_\-.]*[ >]/,'is');class AIAssistantController extends/* #__PURE__ -- @preserve */ ckeditor5['ObservableMixin'](){['editor'];['textAdapter'];['view'];['_sanitizationContainer'];['_domParser'];['_xmlSerializer'];constructor(_0x5c1d0a,_0x412af0,_0x4fc080){super(),this['editor']=_0x5c1d0a,this['textAdapter']=_0x412af0,this['_sanitizationContainer']=document['createElement']('div'),this['_domParser']=new DOMParser(),this['_xmlSerializer']=new XMLSerializer(),this['view']=_0x4fc080,this['set']({'initialContext':'','currentContext':'','currentResponse':'','previousContext':void 0x0,'previousQuery':void 0x0,'previousLabel':void 0x0,'isProcessing':!0x1}),this['on']('set:currentContext',(_0x391a9d,_0x4bb350,_0x54614b)=>{this['view']['value']=this['_sanitizeHTML'](_0x54614b);}),this['listenTo'](this['view'],'submitPrompt',(_0x16ec47,_0x2225e2)=>{const _0x47bfac=this['currentContext']||this['initialContext'];this['_handleQuery'](_0x2225e2,_0x47bfac,'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:_0x5ede28,query:_0x5ed476,htmlContent:_0x3b59b7,label:_0x23f01d,mainActionLabel:_0x2f19ec}){this['view']['prompt']=_0x23f01d,this['view']['mainAction']=_0x2f19ec,this['initialContext']=_0x3b59b7,_0x5ed476&&(this['view']['isRendered']?this['_handleQuery'](_0x5ed476,_0x3b59b7,_0x5ede28,_0x23f01d):this['view']['once']('render',()=>{this['_handleQuery'](_0x5ed476,_0x3b59b7,_0x5ede28,_0x23f01d);}));}['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'](_0x366dde,_0x21eef0,_0x29416d,_0x33df4a){return this['isProcessing']=!0x0,this['view']['startProcessing'](),this['previousContext']=_0x21eef0,this['previousQuery']=_0x366dde,this['previousLabel']=_0x33df4a||_0x366dde,this['previousActionId']=_0x29416d,new Promise(_0x2a95f4=>{this['textAdapter']['makeRequest']({'query':_0x366dde,'context':_0x21eef0,'onData':_0x6a6cb7=>{this['currentResponse']=_0x6a6cb7,this['currentContext']=this['_parseAndNormalizeContent'](this['currentResponse']);},'actionId':_0x29416d})['then'](()=>{!this['currentContext']&&this['currentResponse']&&(this['currentContext']=this['_parseAndNormalizeContent'](this['currentResponse'],!0x0));})['catch'](_0x3c7803=>{_0x3c7803 instanceof AIRequestError?this['view']['handleError'](_0x3c7803['message']):this['view']['handleError'](),_0x2a95f4();})['finally'](()=>{this['stopProcessing'](),_0x2a95f4();});});}['_parseAndNormalizeContent'](_0x165963,_0x9d5b1a=!0x1){const _0x4fddac=_0x226726['exec'](_0x165963);_0x165963=_0x4fddac?_0x165963['substring'](_0x4fddac[0x1]['length']):_0x165963['length']<_0x332234&&!_0x9d5b1a?'':this['_stripMarkdownSyntax'](_0x165963);const _0x510366=this['_domParser']['parseFromString'](_0x165963,'text/html');if(_0x4fddac){const _0x53924c=Array['from'](_0x510366['body']['childNodes']);_0x53924c['reverse']();for(const _0x5e7c48 of _0x53924c){if(_0x5e7c48['nodeType']==Node['ELEMENT_NODE'])break;_0x5e7c48['remove']();}}const _0x376ebf=this['editor']['data']['processor']['toView'](this['_xmlSerializer']['serializeToString'](_0x510366['body']));this['_isH1TagSupportEnabled']()||this['_normalizeResponseHeadings'](_0x376ebf);const _0x878dc2=this['editor']['config']['get']('ai.aiAssistant.preserveComments'),_0x3004e5=this['editor']['data']['toModel'](_0x376ebf);return _0x878dc2||_0x3004e5['markers']['clear'](),this['editor']['data']['stringify'](_0x3004e5);}['_normalizeResponseHeadings'](_0x52fa8e){const _0x15d588=new ckeditor5['UpcastWriter'](this['editor']['editing']['view']['document']),_0x324f82=new ckeditor5['Matcher']({'name':/^h[1-5]$/}),_0x491ba6=[];let _0x5331cd=!0x1;for(const _0x1a0bd4 of _0x52fa8e)_0x1a0bd4['is']('element')&&_0x324f82['match'](_0x1a0bd4)&&(_0x491ba6['push'](_0x1a0bd4),'h1'==_0x1a0bd4['name']&&(_0x5331cd=!0x0));if(_0x5331cd){for(const _0x3b5b53 of _0x491ba6)_0x15d588['rename']('h'+(parseInt(_0x3b5b53['name'][0x1])+0x1),_0x3b5b53);}}['_isH1TagSupportEnabled'](){const {data:_0x417f3a,editing:_0x534e3e}=this['editor'],_0x4ace9f=_0x417f3a['htmlProcessor']['toView']('<h1></h1>'),_0x12f762=_0x417f3a['toView'](_0x417f3a['toModel'](_0x4ace9f));return!!_0x534e3e['view']['domConverter']['viewToDom'](_0x12f762)['querySelector']('h1');}['_sanitizeHTML'](_0x5488ff){return this['editor']['editing']['view']['domConverter']['setContentOf'](this['_sanitizationContainer'],_0x5488ff),this['_sanitizationContainer']['innerHTML'];}['_stripMarkdownSyntax'](_0x345594){const _0x2666dd=_0x345594['trim']();return _0x2666dd['startsWith']('```html')?_0x2666dd['endsWith']('```')?_0x2666dd['substring'](0x7,_0x2666dd['length']-0x3):_0x2666dd['substring'](0x7):_0x345594;}}const AIFormToolbarViewMainActionLabel={'REPLACE':'replace','INSERT':'insert'};class _0x27cb3a extends ckeditor5['ToolbarView']{constructor(_0x4e91ed){super(_0x4e91ed),this['set']('isVisible',!0x1),this['set']('mainAction',AIFormToolbarViewMainActionLabel['REPLACE']),this['replaceButton']=this['_createButton']('','ck-button-action'),this['replaceButton']['bind']('label')['to'](this,'mainAction',_0x3ddf52=>getTranslation$i(_0x4e91ed,'AI_'+_0x3ddf52['toUpperCase']()+'_CONTENT')),this['insertButton']=this['_createButton'](getTranslation$i(_0x4e91ed,'Insert\x20below')),this['tryAgainButton']=this['_createButton'](getTranslation$i(_0x4e91ed,'Try\x20again')),this['stopButton']=this['_createButton'](getTranslation$i(_0x4e91ed,'Stop'));const _0x447a3e=this['bindTemplate'];this['extendTemplate']({'attributes':{'class':['ck-ai-form__toolbar',_0x447a3e['if']('isVisible','ck-hidden',_0x10a71e=>!_0x10a71e)]}}),this['items']['addMany']([this['replaceButton'],this['insertButton'],this['tryAgainButton'],this['stopButton']]);}['_createButton'](_0x5de7d9,_0x24fbc0){const _0x112dee=new ckeditor5['ButtonView'](this['locale']);return _0x112dee['set']({'label':_0x5de7d9,'class':_0x24fbc0||'','isVisible':!0x0,'withText':!0x0}),_0x112dee;}}class AIFormContentArea extends ckeditor5['View']{['contentFieldView'];['copyButtonView'];constructor(_0x1552b2,_0x45150a=''){super(_0x1552b2),this['set']({'value':null,'isVisible':!0x1,'isProcessing':!0x1});const _0x37f58c=this['bindTemplate'];this['contentFieldView']=new ContentFieldView(_0x1552b2,_0x45150a),this['copyButtonView']=this['_createCopyButton'](),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form__content-area-wrapper',_0x37f58c['if']('isVisible','ck-hidden',_0x11927b=>!_0x11927b)],'tabindex':'-1'},'children':[{'tag':'div','attributes':{'class':['ck','ck-ai-form__content-area',_0x37f58c['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 _0x2eaa43=!0x1;this['on']('change:value',(_0x3e6733,_0x44cb61,_0xf57016)=>{const _0x53fa59=!this['contentFieldView']['element']['querySelector']('.ck-ai-form__loader');this['contentFieldView']['setContent'](_0xf57016),this['isProcessing']&&_0x53fa59&&!_0x2eaa43&&this['element']['scrollTo']({'top':this['element']['scrollHeight'],'behavior':'smooth'});}),this['on']('change:isProcessing',(_0x52ec0a,_0x1bfc9d,_0x12a01e)=>{_0x2eaa43=!0x1,_0x12a01e?(this['value']=null,this['contentFieldView']['appendLoader']()):this['value']||this['contentFieldView']['setContent']('');}),this['listenTo'](this['element'],'wheel',()=>{_0x2eaa43=!0x0;}),this['listenTo'](this['element'],'mousedown',()=>{_0x2eaa43=!0x0;});}['focus'](){this['element']['focus']();}['_createCopyButton'](){const _0xb6dcc7=this['locale'],_0x327e44=new ckeditor5['ButtonView'](this['locale']),_0x586e72='ck-ai-form__copy-button';return _0x327e44['set']({'label':getTranslation$i(_0xb6dcc7,'Copy'),'icon':ckeditor5['IconCopy'],'class':_0x586e72,'tooltip':!0x0}),_0x327e44['bind']('isVisible')['to'](this,'value',_0x135d0d=>!!_0x135d0d),_0x327e44['bind']('isEnabled')['to'](this,'isProcessing',_0x24e671=>!_0x24e671),_0x327e44['on']('execute',()=>{this['_copyHTMLToClipboard'](this['contentFieldView']['element']),_0x327e44['icon']=ckeditor5['IconCheck'],_0x327e44['class']=_0x586e72+'\x20ck-ai-form__copy-button--copied',this['focus'](),setTimeout(()=>{_0x327e44['icon']=ckeditor5['IconCopy'],_0x327e44['class']=_0x586e72;},0x3e8);}),_0x327e44;}['_copyHTMLToClipboard'](_0x189982){const {window:_0x262dee,document:_0x1fba0a}=ckeditor5['global'];if(_0x262dee['ClipboardItem']){const {Blob:_0x22d5e4,ClipboardItem:_0x214b23}=_0x262dee,_0x4a27b1=[new _0x214b23({'text/html':new _0x22d5e4([_0x189982['innerHTML']],{'type':'text/html'}),'text/plain':new _0x22d5e4([_0x189982['textContent']||''],{'type':'text/plain'})})];navigator['clipboard']['write'](_0x4a27b1);}else{const _0x5b28c0=_0x1fba0a['createElement']('div');_0x5b28c0['style']['position']='absolute',_0x5b28c0['style']['left']='-9999px',_0x5b28c0['innerHTML']='<span>[</span>'+_0x189982['innerHTML']+'<span>]</span>',_0x1fba0a['body']['appendChild'](_0x5b28c0);const _0x38c560=_0x1fba0a['createRange']();_0x38c560['setStartAfter'](_0x5b28c0['firstElementChild']),_0x38c560['setEndBefore'](_0x5b28c0['lastElementChild']);const _0x606756=_0x262dee['getSelection']();_0x606756['removeAllRanges'](),_0x606756['addRange'](_0x38c560),_0x1fba0a['execCommand']('copy'),_0x5b28c0['remove']();}}}class ContentFieldView extends ckeditor5['View']{constructor(_0x57a150,_0x5cf221=''){super(_0x57a150),this['loaderView']=this['_createLoader'](),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-content',_0x5cf221,'ck-reset_all-excluded','ck-ai-form__content-field']}});}['setContent'](_0x4ff748){this['element']['innerHTML']=_0x4ff748;}['appendLoader'](){this['element']['appendChild'](this['loaderView']['element']);}['_createLoader'](){const _0x373b9c=new ckeditor5['View'](),_0x26e0f9=this['locale'],_0x4b6927=new ckeditor5['SpinnerView']();return _0x4b6927['isVisible']=!0x0,_0x373b9c['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form__loader']},'children':[_0x4b6927,{'text':getTranslation$i(_0x26e0f9,'AI\x20is\x20writing...')}]}),_0x373b9c['render'](),_0x373b9c;}}class _0x5b6d91 extends ckeditor5['View']{constructor(_0x26daca,_0x462eee=''){super(_0x26daca);const _0x3611ca=new ckeditor5['IconView'](),_0x56a213=this['bindTemplate'];this['set']('text',_0x462eee),_0x3611ca['content']=ckeditor5['IconError'],this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form__error']},'children':[_0x3611ca,{'text':_0x56a213['to']('text')}]});}}class AIFormPromptView extends ckeditor5['AutocompleteView']{['submitButtonView'];['showHistoryButtonView'];constructor(_0x58684b,_0x26247f){super(_0x58684b,_0x26247f),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',(_0x577e61,_0x58f782)=>{_0x577e61['target']==this['queryView']['fieldView']['element']&&(this['submit'](),_0x58f782());});}['_createSubmitButton'](){const _0x28fcc5=new ckeditor5['ButtonView'](this['locale']),_0x2f0bb2=this['locale'];return _0x28fcc5['set']({'icon':ckeditor5['IconSubmit'],'label':getTranslation$i(_0x2f0bb2,'Submit'),'isVisible':!0x0,'tooltip':!0x0,'class':'ck-ai-form__submit'}),_0x28fcc5['on']('execute',()=>{this['submit']();}),_0x28fcc5['bind']('isEnabled')['to'](this['queryView']['fieldView'],'isEmpty',this,'isEnabled',(_0x403e52,_0x2db68a)=>!_0x403e52&&_0x2db68a),_0x28fcc5;}['_createShowHistoryButton'](){const _0x2e690f=new ckeditor5['ButtonView'](this['locale']),_0x1a0757=this['resultsView'],_0xdb8884=this['locale'];_0x2e690f['set']({'label':getTranslation$i(_0xdb8884,'History'),'withText':!0x1,'icon':ckeditor5['IconHistory'],'tooltip':!0x0,'tooltipPosition':'sw','class':'ck-ai-form__toggle-history'}),_0x2e690f['bind']('isOn')['to'](_0x1a0757,'isVisible'),_0x2e690f['bind']('isEnabled')['to'](this,'isEnabled'),_0x2e690f['on']('execute',()=>{_0x1a0757['isVisible']=!_0x1a0757['isVisible'],_0x1a0757['isVisible']?this['filteredView']['focus']():this['focus']();});const _0x45cde0=()=>{ckeditor5['global']['window']['requestAnimationFrame'](()=>{if(ckeditor5['isVisible'](this['element'])){const _0x2b2788=new ckeditor5['Rect'](this['queryView']['fieldView']['element']),_0x64deb1=_0x2b2788['width'],_0x275868='rtl'===_0xdb8884['uiLanguageDirection']?'left':'right';_0x2b2788['excludeScrollbarsAndBorders'](),_0x2e690f['element']['style'][_0x275868]=_0x64deb1-_0x2b2788['width']+0x1+'px';}});};return this['queryView']['fieldView']['on']('update',_0x45cde0),this['on']('render',_0x45cde0),_0x2e690f;}['submit'](){const _0x522cb0=this['queryView']['fieldView']['element']['value'];this['fire']('submit',_0x522cb0);}['focus'](_0x29b65e){-0x1===_0x29b65e?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}}class AIHistoryListView extends ckeditor5['ListView']{['historyGroupView'];['clearHistoryButton'];constructor(_0x252885){super(_0x252885),this['clearHistoryButton']=this['_createClearHistoryButton'](),this['historyGroupView']=new ckeditor5['ListItemGroupView'](),this['historyGroupView']['children']['add'](this['clearHistoryButton'],0x1),this['historyGroupView']['label']=getTranslation$i(_0x252885,'Prompt\x20history'),this['historyGroupView']['items']['delegate']('execute')['to'](this),this['items']['add'](this['historyGroupView']);}['filter'](){let _0x25ae1d=0x0;for(const _0x46b7da of this['items'])_0x25ae1d+=_0x46b7da['items']['length'];return{'resultsCount':_0x25ae1d,'totalItemsCount':_0x25ae1d};}['_createClearHistoryButton'](){const _0x108707=this['locale'],_0x3d973e=new ckeditor5['ButtonView'](this['locale']);return _0x3d973e['set']({'label':'('+getTranslation$i(_0x108707,'Clear')+')','withText':!0x0}),_0x3d973e['on']('execute',()=>this['fire']('clearHistory')),_0x3d973e;}}function _0x39f1b1(){}function isPrimitive(_0x2c95fd){return null==_0x2c95fd||'object'!=typeof _0x2c95fd&&'function'!=typeof _0x2c95fd;}function _0x3cd2a2(_0x1aafa4){return ArrayBuffer['isView'](_0x1aafa4)&&!(_0x1aafa4 instanceof DataView);}function isPlainObject$1(_0x219a93){if(!_0x219a93||'object'!=typeof _0x219a93)return!0x1;const _0x5b5356=Object['getPrototypeOf'](_0x219a93);return!(null!==_0x5b5356&&_0x5b5356!==Object['prototype']&&null!==Object['getPrototypeOf'](_0x5b5356))&&'[object\x20Object]'===Object['prototype']['toString']['call'](_0x219a93);}function isObjectLike(_0x2acddc){return'object'==typeof _0x2acddc&&null!==_0x2acddc;}function getSymbols(_0x31ec92){return Object['getOwnPropertySymbols'](_0x31ec92)['filter'](_0x2f1fa1=>Object['prototype']['propertyIsEnumerable']['call'](_0x31ec92,_0x2f1fa1));}function getTag(_0x2d0cd8){return null==_0x2d0cd8?void 0x0===_0x2d0cd8?'[object\x20Undefined]':'[object\x20Null]':Object['prototype']['toString']['call'](_0x2d0cd8);}const _0x48ee6d='[object\x20RegExp]',stringTag='[object\x20String]',_0x301415='[object\x20Number]',_0x2309dc='[object\x20Boolean]',argumentsTag='[object\x20Arguments]',_0x1654da='[object\x20Symbol]',dateTag='[object\x20Date]',_0x47a0fc='[object\x20Map]',setTag='[object\x20Set]',_0x8b3501='[object\x20Array]',functionTag='[object\x20Function]',_0x8a4950='[object\x20ArrayBuffer]',objectTag='[object\x20Object]',_0x106336='[object\x20Error]',dataViewTag='[object\x20DataView]',uint8ArrayTag='[object\x20Uint8Array]',uint8ClampedArrayTag='[object\x20Uint8ClampedArray]',uint16ArrayTag='[object\x20Uint16Array]',uint32ArrayTag='[object\x20Uint32Array]',bigUint64ArrayTag='[object\x20BigUint64Array]',int8ArrayTag='[object\x20Int8Array]',int16ArrayTag='[object\x20Int16Array]',int32ArrayTag='[object\x20Int32Array]',bigInt64ArrayTag='[object\x20BigInt64Array]',float32ArrayTag='[object\x20Float32Array]',float64ArrayTag='[object\x20Float64Array]';function cloneDeepWith$1(_0x354b9b,_0x5e0f80){return cloneDeepWithImpl(_0x354b9b,void 0x0,_0x354b9b,new Map(),_0x5e0f80);}function cloneDeepWithImpl(_0x2c858b,_0x402fb3,_0x156d9a,_0x498b62=new Map(),_0x361c68=void 0x0){const _0x160fef=_0x361c68?.(_0x2c858b,_0x402fb3,_0x156d9a,_0x498b62);if(null!=_0x160fef)return _0x160fef;if(isPrimitive(_0x2c858b))return _0x2c858b;if(_0x498b62['has'](_0x2c858b))return _0x498b62['get'](_0x2c858b);if(Array['isArray'](_0x2c858b)){const _0x4ee7cd=new Array(_0x2c858b['length']);_0x498b62['set'](_0x2c858b,_0x4ee7cd);for(let _0x625df2=0x0;_0x625df2<_0x2c858b['length'];_0x625df2++)_0x4ee7cd[_0x625df2]=cloneDeepWithImpl(_0x2c858b[_0x625df2],_0x625df2,_0x156d9a,_0x498b62,_0x361c68);return Object['hasOwn'](_0x2c858b,'index')&&(_0x4ee7cd['index']=_0x2c858b['index']),Object['hasOwn'](_0x2c858b,'input')&&(_0x4ee7cd['input']=_0x2c858b['input']),_0x4ee7cd;}if(_0x2c858b instanceof Date)return new Date(_0x2c858b['getTime']());if(_0x2c858b instanceof RegExp){const _0x405d05=new RegExp(_0x2c858b['source'],_0x2c858b['flags']);return _0x405d05['lastIndex']=_0x2c858b['lastIndex'],_0x405d05;}if(_0x2c858b instanceof Map){const _0x45397d=new Map();_0x498b62['set'](_0x2c858b,_0x45397d);for(const [_0x21b1bf,_0xa43bb4]of _0x2c858b)_0x45397d['set'](_0x21b1bf,cloneDeepWithImpl(_0xa43bb4,_0x21b1bf,_0x156d9a,_0x498b62,_0x361c68));return _0x45397d;}if(_0x2c858b instanceof Set){const _0x3111d7=new Set();_0x498b62['set'](_0x2c858b,_0x3111d7);for(const _0x59edd4 of _0x2c858b)_0x3111d7['add'](cloneDeepWithImpl(_0x59edd4,void 0x0,_0x156d9a,_0x498b62,_0x361c68));return _0x3111d7;}if('undefined'!=typeof Buffer&&Buffer['isBuffer'](_0x2c858b))return _0x2c858b['subarray']();if(_0x3cd2a2(_0x2c858b)){const _0x3121a6=new(Object['getPrototypeOf'](_0x2c858b))['constructor'](_0x2c858b['length']);_0x498b62['set'](_0x2c858b,_0x3121a6);for(let _0x37eea0=0x0;_0x37eea0<_0x2c858b['length'];_0x37eea0++)_0x3121a6[_0x37eea0]=cloneDeepWithImpl(_0x2c858b[_0x37eea0],_0x37eea0,_0x156d9a,_0x498b62,_0x361c68);return _0x3121a6;}if(_0x2c858b instanceof ArrayBuffer||'undefined'!=typeof SharedArrayBuffer&&_0x2c858b instanceof SharedArrayBuffer)return _0x2c858b['slice'](0x0);if(_0x2c858b instanceof DataView){const _0x2fce35=new DataView(_0x2c858b['buffer']['slice'](0x0),_0x2c858b['byteOffset'],_0x2c858b['byteLength']);return _0x498b62['set'](_0x2c858b,_0x2fce35),copyProperties(_0x2fce35,_0x2c858b,_0x156d9a,_0x498b62,_0x361c68),_0x2fce35;}if('undefined'!=typeof File&&_0x2c858b instanceof File){const _0x3faa88=new File([_0x2c858b],_0x2c858b['name'],{'type':_0x2c858b['type']});return _0x498b62['set'](_0x2c858b,_0x3faa88),copyProperties(_0x3faa88,_0x2c858b,_0x156d9a,_0x498b62,_0x361c68),_0x3faa88;}if(_0x2c858b instanceof Blob){const _0x57f4a8=new Blob([_0x2c858b],{'type':_0x2c858b['type']});return _0x498b62['set'](_0x2c858b,_0x57f4a8),copyProperties(_0x57f4a8,_0x2c858b,_0x156d9a,_0x498b62,_0x361c68),_0x57f4a8;}if(_0x2c858b instanceof Error){const _0x5dff22=new _0x2c858b['constructor']();return _0x498b62['set'](_0x2c858b,_0x5dff22),_0x5dff22['message']=_0x2c858b['message'],_0x5dff22['name']=_0x2c858b['name'],_0x5dff22['stack']=_0x2c858b['stack'],_0x5dff22['cause']=_0x2c858b['cause'],copyProperties(_0x5dff22,_0x2c858b,_0x156d9a,_0x498b62,_0x361c68),_0x5dff22;}if('object'==typeof _0x2c858b&&isCloneableObject(_0x2c858b)){const _0x3e745b=Object['create'](Object['getPrototypeOf'](_0x2c858b));return _0x498b62['set'](_0x2c858b,_0x3e745b),copyProperties(_0x3e745b,_0x2c858b,_0x156d9a,_0x498b62,_0x361c68),_0x3e745b;}r