ckeditor5-premium-features
Version:
Premium features for CKEditor 5.
25 lines • 4.55 MB
JavaScript
/*
* 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(_0x1318eb,_0xe448d6){'object'==typeof exports&&'undefined'!=typeof module?_0xe448d6(exports,require('ckeditor5')):'function'==typeof define&&define['amd']?define(['exports','ckeditor5'],_0xe448d6):_0xe448d6((_0x1318eb='undefined'!=typeof globalThis?globalThis:_0x1318eb||self)['CKEDITOR_PREMIUM_FEATURES']={},_0x1318eb['CKEDITOR']);}(this,function(_0x139b32,_0x315659){Object['defineProperty'](_0x139b32,Symbol['toStringTag'],{'value':'Module'});var _0x5d5780=Object['create'],_0x44cbfe=Object['defineProperty'],_0x57c75b=Object['getOwnPropertyDescriptor'],_0x524663=Object['getOwnPropertyNames'],_0x49a396=Object['getPrototypeOf'],_0x183c54=Object['prototype']['hasOwnProperty'],_0x534832=(_0x5b72b6,_0x5a2150)=>()=>(_0x5a2150||(_0x5b72b6((_0x5a2150={'exports':{}})['exports'],_0x5a2150),_0x5b72b6=null),_0x5a2150['exports']),_0xad6a5a=(_0x24e3af,_0x3a982f)=>{let _0x4b7638={};for(var _0x35c2be in _0x24e3af)_0x44cbfe(_0x4b7638,_0x35c2be,{'get':_0x24e3af[_0x35c2be],'enumerable':!0x0});return _0x3a982f||_0x44cbfe(_0x4b7638,Symbol['toStringTag'],{'value':'Module'}),_0x4b7638;},_0x1a7385=(_0x388e87,_0x51b347,_0x58c4cc)=>(_0x58c4cc=null!=_0x388e87?_0x5d5780(_0x49a396(_0x388e87)):{},((_0x31bd0d,_0x46868d,_0x2eb717,_0x28630f)=>{if(_0x46868d&&'object'==typeof _0x46868d||'function'==typeof _0x46868d){for(var _0x4f3e60,_0x8a58ee=_0x524663(_0x46868d),_0x1de1ac=0x0,_0x17eac9=_0x8a58ee['length'];_0x1de1ac<_0x17eac9;_0x1de1ac++)_0x4f3e60=_0x8a58ee[_0x1de1ac],_0x183c54['call'](_0x31bd0d,_0x4f3e60)||_0x4f3e60===_0x2eb717||_0x44cbfe(_0x31bd0d,_0x4f3e60,{'get':(_0x573ff9=>_0x46868d[_0x573ff9])['bind'](null,_0x4f3e60),'enumerable':!(_0x28630f=_0x57c75b(_0x46868d,_0x4f3e60))||_0x28630f['enumerable']});}return _0x31bd0d;})(!_0x51b347&&_0x388e87&&_0x388e87['__esModule']?_0x58c4cc:_0x44cbfe(_0x58c4cc,'default',{'value':_0x388e87,'enumerable':!0x0}),_0x388e87)),_0x431562=(_0x3baeef=>'undefined'!=typeof require?require:'undefined'!=typeof Proxy?new Proxy(_0x3baeef,{'get':(_0x5991fa,_0x416116)=>('undefined'!=typeof require?require:_0x5991fa)[_0x416116]}):_0x3baeef)(function(_0xfcfc05){if('undefined'!=typeof require)return require['apply'](this,arguments);throw Error('Calling\x20`require`\x20for\x20\x22'+_0xfcfc05+'\x22\x20in\x20an\x20environment\x20that\x20doesn\x27t\x20expose\x20the\x20`require`\x20function.\x20See\x20https://rolldown.rs/in-depth/bundling-cjs#require-external-modules\x20for\x20more\x20details.');});const _0x2f735b='_ungrouppedCommands';function _0x4caacd(_0x998817,_0x3897bb){const _0x57e6e1=(0x0,_0x3897bb['t'])('Other');return _0x998817['length']?'groupId'in _0x998817[0x0]?_0x998817:[{'groupId':_0x2f735b,'groupLabel':_0x57e6e1,'order':0x1/0x0,'commands':_0x998817}]:[{'groupId':_0x2f735b,'groupLabel':_0x57e6e1,'order':0x1/0x0,'commands':[]}];}const _0x1f14e3=globalThis['DataTransfer'],_0x10ac95='ai-ui';var _0x164d8d=class extends _0x315659['Plugin']{static get['pluginName'](){return'AIAssistantEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x30a023}=this,_0x16a3a9=['ck-fake-ai-selection'];_0x30a023['config']['get']('ai.assistant.useTheme')&&_0x16a3a9['push']('ck-ai-assistant-ui_theme'),_0x30a023['conversion']['for']('editingDowncast')['markerToHighlight']({'model':_0x10ac95,'view':{'classes':_0x16a3a9,'priority':0xc}}),_0x30a023['conversion']['for']('editingDowncast')['markerToElement']({'model':_0x10ac95,'view':(_0x4c02da,{writer:_0x9bb207})=>{if(!_0x4c02da['markerRange']['isCollapsed'])return null;const _0x39b112=_0x9bb207['createUIElement']('span');return _0x9bb207['addClass'](['ck-fake-ai-selection','ck-fake-ai-selection_collapsed'],_0x39b112),_0x39b112;}});}['afterInit'](){!async function(_0x17121b){const _0x4dd071='nA7yurgOHbZvDplRkJscdICm86oPWx92f1qF0LaSX3NGwTMK4jVtYUBQi5zheE',_0x220b64=0x78e88,_0x3de2c6=window['Date']['now'](),_0x2b1bc0=_0x17121b['editor'],_0x1cc3e8=new window['Promise'](_0x23cb3e=>{_0x2b1bc0['once']('ready',_0x23cb3e);}),_0x3840c9={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'},_0x1d095c=_0x2b1bc0['config']['get']('licenseKey');async function _0x2d7691(){let _0x14b41b,_0x45aa56=null,_0x5cbd91=null;try{return'GPL'==_0x1d095c?'NotAllowed':(_0x14b41b=_0x3159da(),_0x14b41b?(_0x14b41b['usageEndpoint']&&(_0x5cbd91=_0x3a6305(_0x14b41b['usageEndpoint'],_0x14b41b['jti'])),await _0x826f8c()?_0x44094a()?_0x25c642()?'Expired':_0x8eb389()?('evaluation'==_0x14b41b['licenseType']&&(_0x45aa56=_0x1026b8('EvaluationLimit')),await _0x5ecf58()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x25c642(){const _0x1c4c97=['evaluation','trial']['includes'](_0x14b41b['licenseType'])?_0x3de2c6/0x3e8:0xe10*_0x220b64;return _0x14b41b['exp']<_0x1c4c97;}function _0x44094a(){const _0x14ffff=_0x14b41b['features'];return!!_0x14ffff&&(!!_0x14ffff['includes']('*')||!!_0x14ffff['includes']('AI'));}function _0x8eb389(){const _0x521514=_0x14b41b['licensedHosts'];if(!_0x521514||0x0==_0x521514['length'])return!0x0;const {hostname:_0x1b2639}=new URL(window['location']['href']);if(_0x521514['includes'](_0x1b2639))return!0x0;const _0xdb50a4=_0x1b2639['split']('.');return _0x521514['filter'](_0x41fb76=>_0x41fb76['includes']('*'))['map'](_0x5ea52f=>_0x5ea52f['split']('.'))['filter'](_0x1135b0=>_0x1135b0['length']<=_0xdb50a4['length'])['map'](_0x445423=>Array(_0xdb50a4['length']-_0x445423['length'])['fill']('*'===_0x445423[0x0]?'*':'')['concat'](_0x445423))['some'](_0x2c0d3a=>_0xdb50a4['every']((_0x1a904b,_0x2e6491)=>_0x2c0d3a[_0x2e6491]===_0x1a904b||'*'===_0x2c0d3a[_0x2e6491]));}function _0x5ecf58(){return _0x45aa56&&_0x5cbd91?new window['Promise']((_0x14631f,_0x27a004)=>{_0x45aa56['then'](_0x14631f,_0x27a004),_0x5cbd91['then'](_0x4603b3=>{'Valid'!=_0x4603b3&&_0x14631f(_0x4603b3);},_0x27a004);}):_0x45aa56||_0x5cbd91||'Valid';}}function _0x3a6305(_0x5ad185,_0x1436ca){return new window['Promise'](_0x4fba70=>{if(_0x2db9e2())return _0x4fba70('Valid');_0x1d9de0(),_0x2b1bc0['decorate']('_sendUsageRequest');let _0x133b88=!0x1;const _0x1a1df0=(0x0,_0x315659['uid'])();function _0x1f26bd(_0x4a38dd){return!!_0x4a38dd&&('object'==typeof _0x4a38dd||'function'==typeof _0x4a38dd)&&'function'==typeof _0x4a38dd['then']&&'function'==typeof _0x4a38dd['catch'];}function _0x509f52(_0x1f3b4f){_0x54df66(_0x1f3b4f)['then'](_0x3c718d=>_0x3c718d&&'ok'==_0x3c718d['status']?_0x124890(_0x176219(_0x1a1df0+_0x1436ca))!=_0x3c718d['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x3f6387=>(_0xde2cdf(),_0x3f6387),()=>{const _0x52ce28=_0x30a0c7();return null==_0x52ce28?(_0xde2cdf(),'Valid'):_0x3de2c6-_0x52ce28>0x240c8400?'UsageLimit':'Valid';})['then'](_0x4fba70)['catch'](()=>{_0x4fba70('UsageLimit');});const _0x531aaa=0x36ee80;function _0xde2cdf(){const _0x4fb74e='llct-'+_0x124890(_0x176219(_0x5ad185)),_0x359d8a=_0x4a7df7(_0x124890(window['Math']['ceil'](_0x3de2c6/_0x531aaa)));window['localStorage']['setItem'](_0x4fb74e,_0x359d8a);}function _0x30a0c7(){const _0xffd3ce='llct-'+_0x124890(_0x176219(_0x5ad185)),_0x3b39c0=window['localStorage']['getItem'](_0xffd3ce);return _0x3b39c0?window['parseInt'](_0x4a7df7(_0x3b39c0),0x10)*_0x531aaa:null;}function _0x54df66(_0xbf734b){return new window['Promise']((_0xbe211,_0x1a60b4)=>{_0xbf734b['then'](_0xbe211,_0x1a60b4),window['setTimeout'](_0x1a60b4,0x1d4c0);});}}_0x2b1bc0['on']('_sendUsageRequest',(_0x45a693,_0x266140)=>{if(_0x266140[0x0]!=_0x5ad185)return _0x4fba70('UsageLimit');_0x266140[0x1]={..._0x266140[0x1],'requestId':_0x1a1df0};},{'priority':'high'}),_0x2b1bc0['on']('_sendUsageRequest',_0x14ca1f=>{_0x1f26bd(_0x14ca1f['return'])&&(_0x133b88=!0x0,_0x509f52(_0x14ca1f['return']));},{'priority':'low'}),_0x1cc3e8['then'](()=>{_0x133b88||_0x4fba70('UsageLimit');});});function _0x2db9e2(){return'auto'==_0x2b1bc0['editing']['view']['_overlayModeHint'];}function _0x1d9de0(){_0x2b1bc0['editing']['view']['_overlayModeHint']='auto';}}function _0x1026b8(_0x4267d1){const _0x2f2218=[new window['Promise'](_0x537202=>setTimeout(_0x537202,0x93ecc)),_0x1cc3e8['then'](()=>new window['Promise'](_0x4ca659=>{let _0x129328=0x0;_0x2b1bc0['model']['on']('applyOperation',(_0x975d03,_0x2d8b7b)=>{_0x2d8b7b[0x0]['isDocumentOperation']&&_0x129328++,0x5e8==_0x129328&&(_0x4ca659(),_0x975d03['off']());});}))];return window['Promise']['race'](_0x2f2218)['then'](()=>_0x4267d1);}async function _0x14c534(){await _0x1cc3e8,_0x2b1bc0['model']['change']=_0x3dbb07,_0x2b1bc0['model']['enqueueChange']=_0x3dbb07,_0x2b1bc0['enableReadOnlyMode']('model');}function _0x2441a9(_0x5ad5c1){const _0x185b24=_0x2a39b1();_0x2b1bc0[_0x185b24]='aiLicenseKey'+_0x5ad5c1,'Valid'!=_0x5ad5c1&&_0x14c534();}function _0x2a39b1(){const _0x457bdc=window['String'](window['performance']['now']())['replace']('.','');let _0x4f85bb='n';for(let _0x2554f9=0x0;_0x2554f9<_0x457bdc['length'];_0x2554f9+=0x2){let _0x1056a3=window['parseInt'](_0x457bdc['substring'](_0x2554f9,_0x2554f9+0x2));_0x1056a3>=0x3e&&(_0x1056a3-=0x3e),_0x4f85bb+=_0x4dd071[_0x1056a3];}return _0x4f85bb;}function _0x3159da(){const _0x5958fe=_0x1d095c['split']('.');if(0x3!=_0x5958fe['length'])return null;return _0x1d1991(_0x5958fe[0x1]);function _0x1d1991(_0x48d8b6){const _0x3fb697=_0xecf47d(_0x48d8b6);return _0x3fb697&&_0x35e99e()?_0x3fb697:null;function _0x35e99e(){const _0x34eb25=_0x3fb697['jti'],_0x5df47e=window['parseInt'](_0x34eb25['substring'](_0x34eb25['length']-0x8),0x10),_0x206a27={..._0x3fb697,'jti':_0x34eb25['substring'](0x0,_0x34eb25['length']-0x8)};return delete _0x206a27['vc'],_0x176219(_0x206a27)==_0x5df47e;}}}async function _0x826f8c(){let _0x345e78=!0x0;try{const [_0x724b8c,_0x42b571,_0x147a79]=_0x1d095c['split']('.');return _0x50c010(_0x724b8c),await _0x267b51(_0x724b8c,_0x42b571,_0x147a79),_0x345e78;}catch{return!0x1;}function _0x50c010(_0x3fc12a){const _0x28cce3=_0xecf47d(_0x3fc12a);_0x28cce3&&'ES256'==_0x28cce3['alg']||(_0x345e78=!0x1);}async function _0x267b51(_0x34c959,_0x13a6de,_0x5f2c02){const _0x6bcfca=window['Uint8Array']['from'](_0x22066e(_0x5f2c02),_0x2a74ab=>_0x2a74ab['charCodeAt'](0x0)),_0x26ab4b=new window['TextEncoder']()['encode'](_0x34c959+'.'+_0x13a6de),_0x497d01=window['crypto']['subtle'];if(!_0x497d01)return;const _0x424a82=await _0x497d01['importKey']('jwk',_0x3840c9,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x497d01['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x424a82,_0x6bcfca,_0x26ab4b)||(_0x345e78=!0x1);}}function _0xecf47d(_0xf5f4f9){return _0xf5f4f9['startsWith']('ey')?JSON['parse'](_0x22066e(_0xf5f4f9)):null;}function _0x22066e(_0x1a4d46){return window['atob'](_0x1a4d46['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x176219(_0x47d8e5){let _0x3975e2=0x1505;function _0x2f857f(_0x18f925){for(let _0x122eb5=0x0;_0x122eb5<_0x18f925['length'];_0x122eb5++){const _0x1e1d42=_0x18f925['charCodeAt'](_0x122eb5);_0x3975e2=(_0x3975e2<<0x5)+_0x3975e2+_0x1e1d42,_0x3975e2&=_0x3975e2;}}function _0x4a2981(_0x1b03fa){Array['isArray'](_0x1b03fa)?_0x1b03fa['forEach'](_0x4a2981):_0x1b03fa&&'object'==typeof _0x1b03fa?Object['entries'](_0x1b03fa)['sort']()['forEach'](([_0x1efc61,_0x5ef652])=>{_0x2f857f(_0x1efc61),_0x4a2981(_0x5ef652);}):_0x2f857f(window['String'](_0x1b03fa));}return _0x4a2981(_0x47d8e5),_0x3975e2>>>0x0;}function _0x124890(_0xd3c514){return _0xd3c514['toString'](0x10)['padStart'](0x8,'0');}function _0x4a7df7(_0x575d7c){return _0x575d7c['split']('')['reverse']()['join']('');}function _0x3dbb07(){}_0x2441a9(await _0x2d7691());}(this);}['showFakeVisualSelection'](){const _0x56181a=this['editor']['model'];_0x56181a['change'](_0xff2d35=>{const _0x39cec5=_0x56181a['document']['selection']['getRanges']();let _0x268e27=0x0;for(const _0x201a4f of _0x39cec5){const _0x53789b=_0x10ac95+':'+_0x268e27;if(_0x56181a['markers']['has'](_0x53789b))_0xff2d35['updateMarker'](_0x53789b,{'range':_0x201a4f});else{if(_0x201a4f['start']['isAtEnd']){const _0x1cffff=_0x201a4f['start']['getLastMatchingPosition'](({item:_0x4a2538})=>!_0x56181a['schema']['isContent'](_0x4a2538),{'boundaries':_0x201a4f});_0xff2d35['addMarker'](_0x53789b,{'usingOperation':!0x1,'affectsData':!0x1,'range':_0xff2d35['createRange'](_0x1cffff,_0x201a4f['end'])});}else _0xff2d35['addMarker'](_0x53789b,{'usingOperation':!0x1,'affectsData':!0x1,'range':_0x201a4f});}_0x268e27++;}});}['hideFakeVisualSelection'](){const _0x249b92=this['editor']['model'],_0x2f06da=Array['from'](this['editor']['model']['markers']['getMarkersGroup'](_0x10ac95));_0x2f06da['length']&&_0x249b92['change'](_0x93eb88=>{_0x2f06da['forEach'](_0x3085db=>{_0x93eb88['removeMarker'](_0x3085db);});});}['insertContent'](_0x2042ba,_0x2a8904){const _0x289134=this['_getAISelection'](),_0x1f26a8=_0x2a8904||_0x289134['getFirstRange']();this['editor']['model']['canEditAt'](_0x1f26a8)&&this['editor']['model']['change'](_0x2d4a73=>{this['hideFakeVisualSelection'](),_0x2a8904||this['_resetContentOfSelectedTableCells'](_0x2d4a73,_0x289134),this['_pasteHTMLUsingClipboard']({'insertAt':_0x1f26a8,'writer':_0x2d4a73,'html':_0x2042ba});});}['insertContentBelow'](_0x5559e7){const {model:_0x487c38}=this['editor'],_0x5a8f23=this['_getAISelection']();_0x487c38['change'](()=>{const _0x2fef9f=this['_prepareTableInsertBelowPosition'](_0x5559e7,_0x5a8f23)||this['_getDefaultInsertBelowPosition'](_0x5a8f23);this['insertContent'](_0x5559e7,_0x2fef9f);});}['_getAISelection'](){const _0x527b54=this['editor']['model'],_0x3716b3=Array['from'](_0x527b54['markers']['getMarkersGroup'](_0x10ac95))['map'](_0x3c0d19=>_0x3c0d19['getRange']());return _0x527b54['createSelection'](_0x3716b3);}['_pasteHTMLUsingClipboard']({writer:_0x51b8e9,html:_0x4738f7,insertAt:_0x23931c}){const {view:_0x3397f2}=this['editor']['editing'],_0x8fe423=this['editor']['plugins']['get'](_0x315659['ClipboardPipeline']),_0x355e19=new _0x1f14e3();_0x355e19['setData']('text/html',_0x4738f7);const _0x40b5b2=new _0x315659['ViewDocumentDomEventData'](_0x3397f2,new ClipboardEvent('paste',{'clipboardData':_0x355e19}),{'dataTransfer':new _0x315659['ViewDataTransfer'](_0x355e19)});_0x51b8e9['setSelection'](_0x23931c);const _0x16831e=(_0x43987a,_0x21bbb1)=>{_0x21bbb1['resultRange']&&_0x51b8e9['setSelection'](_0x21bbb1['resultRange']);};_0x8fe423['once']('contentInsertion',_0x16831e,{'priority':'lowest'}),_0x3397f2['document']['fire']('paste',_0x40b5b2),_0x8fe423['off']('contentInsertion',_0x16831e);}['_getDefaultInsertBelowPosition'](_0x280a14){const {model:_0x4613cb}=this['editor'],_0x1c0075=Array['from'](_0x280a14['getSelectedBlocks']());return _0x1c0075['length']?_0x4613cb['createPositionAfter'](_0x1c0075['pop']()):_0x280a14['getLastPosition']();}['_prepareTableInsertBelowPosition'](_0xc7035a,_0x55b14e){const {model:_0x52d83f,plugins:_0x4d5028}=this['editor'];if(_0x4d5028['has']('TableUtils')){const _0x108cd0=_0x4d5028['get']('TableUtils')['getSelectedTableCells'](_0x55b14e);if(_0x108cd0['length']){const _0x3ed55e=this['_getTableRowCountFromContent'](_0xc7035a),_0x3cab4c=this['_createEmptyTableRows'](_0x108cd0,_0x3ed55e);return _0x52d83f['createPositionAt'](_0x3cab4c,0x0);}}return null;}['_getTableRowCountFromContent'](_0x1d4887){const _0x27bd6d=this['editor']['plugins']['get']('TableUtils'),_0x416aa9=this['editor']['data']['parse'](_0x1d4887,'$documentFragment'),_0x66d623=Array['from'](_0x416aa9['getChildren']())['filter'](_0x36559f=>_0x36559f['is']('element','table'));let _0x5402bd=0x0;return _0x66d623['forEach'](_0x3789d5=>{_0x5402bd+=_0x27bd6d['getRows'](_0x3789d5);}),_0x5402bd;}['_createEmptyTableRows'](_0x4f3d35,_0x25a930){const _0x3d4caf=this['editor']['plugins']['get']('TableUtils'),_0x593522=_0x3d4caf['getRowIndexes'](_0x4f3d35),_0x51c489=_0x3d4caf['getColumnIndexes'](_0x4f3d35),_0x33f1da=_0x593522['last']+0x1,_0x573cb8=_0x51c489['first'],_0x346e8e=_0x4f3d35[0x0]['findAncestor']('table');for(let _0x100681=0x0;_0x100681<_0x25a930;_0x100681++)_0x3d4caf['insertRows'](_0x346e8e,{'at':_0x33f1da});return _0x346e8e['getChild'](_0x33f1da)['getChild'](_0x573cb8);}['_resetContentOfSelectedTableCells'](_0x4f07ca,_0x5b52a3){const {plugins:_0x570e31}=this['editor'],{model:_0x457c4a}=_0x4f07ca;_0x570e31['has']('TableUtils')&&_0x570e31['get']('TableUtils')['getSelectedTableCells'](_0x5b52a3)['length']&&_0x457c4a['deleteContent'](_0x5b52a3);}},_0x48b35f=class extends _0x315659['Plugin']{static get['pluginName'](){return'AIAdapter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['afterInit'](){if(!this['textAdapter'])throw new _0x315659['CKEditorError']('aiadapter-text-adapter-not-set',null);}},_0x1f7837=class extends Error{constructor(_0x57a5df){super(_0x57a5df),this['name']='AIRequestError';}};function _0x5ebc1e(_0x54c906,_0x2a5f2c,_0x3e07cd){const t=_0x54c906['t'];switch(_0x2a5f2c){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',_0x3e07cd);case'Error\x20during\x20AI\x20content\x20generation:\x20%0':return t('Error\x20during\x20AI\x20content\x20generation:\x20%0',_0x3e07cd);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'},_0x3e07cd);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 _0x2a5f2c;}}var _0x533e68=class extends _0x315659['Command']{['_commandDefinitions'];constructor(_0x179cb5,_0x54dbfc){super(_0x179cb5),this['_commandDefinitions']=_0x54dbfc,this['set']('enabledCommandsIds',[]),this['on']('change:_hasContext',(_0x2bcca4,_0x26aa79,_0x35ff19)=>{this['isEnabled']&&(this['enabledCommandsIds']=_0x341f3c(this['_commandDefinitions'],_0x35ff19));}),this['set']('_hasContext',!0x1),this['on']('change:isEnabled',(_0x4f9d5c,_0x4f7fb4,_0x2a0b0f)=>{this['enabledCommandsIds']=_0x2a0b0f?_0x341f3c(this['_commandDefinitions'],this['_hasContext']):[];});}['refresh'](){const _0x2ad317=this['editor']['model'];this['_hasContext']=function(_0x507ad6){const _0x1f0b59=_0x507ad6['document']['selection'];return _0x1f0b59['isCollapsed']?0x0!==[..._0x1f0b59['getSelectedBlocks']()]['length']&&![..._0x1f0b59['getSelectedBlocks']()][0x0]['isEmpty']:!!_0x507ad6['hasContent'](_0x1f0b59['getFirstRange']());}(_0x2ad317);const _0x1c5b32=_0x2ad317['document']['selection'],_0x6d4748=this['editor']['config']['get']('ai.assistant.disabledElements');for(const _0x267b99 of _0x1c5b32['getRanges']())for(const _0x3a05cf of _0x267b99['getItems']())if(_0x3a05cf['is']('element')&&_0x6d4748['includes'](_0x3a05cf['name']))return void(this['isEnabled']=!0x1);this['isEnabled']=!0x0;}['execute'](_0x5d3dda='',_0x2a9572='',_0x3e2312='custom'){this['editor']['plugins']['get'](_0x3b925b)['showUI'](_0x5d3dda,_0x2a9572,_0x3e2312);}};function _0x341f3c(_0x597cbd,_0x3831cb){const _0x4f2f2e=new Set();for(const _0x5c0abb of _0x597cbd['values']())(_0x3831cb||!0x1===_0x5c0abb['requiresContent'])&&_0x4f2f2e['add'](_0x5c0abb['id']);return Array['from'](_0x4f2f2e);}const _0x4afc50=new RegExp(/^(.*?)<[a-zA-Z][a-zA-Z0-9_\-.]*[ >]/,'is'),_0x198b63=/* #__PURE__ -- @preserve */
/* #__PURE__ -- @preserve */
(0x0,_0x315659['ObservableMixin'])();var _0x1f8000=class extends _0x198b63{['editor'];['textAdapter'];['view'];['_sanitizationContainer'];['_domParser'];['_xmlSerializer'];constructor(_0x3cd428,_0x9f2604,_0x369347){super(),this['editor']=_0x3cd428,this['textAdapter']=_0x9f2604,this['_sanitizationContainer']=document['createElement']('div'),this['_domParser']=new DOMParser(),this['_xmlSerializer']=new XMLSerializer(),this['view']=_0x369347,this['set']({'initialContext':'','currentContext':'','currentResponse':'','previousContext':void 0x0,'previousQuery':void 0x0,'previousLabel':void 0x0,'isProcessing':!0x1}),this['on']('set:currentContext',(_0x461c41,_0x4764ad,_0x531912)=>{this['view']['value']=this['_sanitizeHTML'](_0x531912);}),this['listenTo'](this['view'],'submitPrompt',(_0x2938bc,_0xdaa221)=>{const _0x42dd07=this['currentContext']||this['initialContext'];this['_handleQuery'](_0xdaa221,_0x42dd07,'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:_0x18e3bf,query:_0x332b6e,htmlContent:_0x7bb974,label:_0x3bb02a,mainActionLabel:_0x40f39e}){this['view']['prompt']=_0x3bb02a,this['view']['mainAction']=_0x40f39e,this['initialContext']=_0x7bb974,_0x332b6e&&(this['view']['isRendered']?this['_handleQuery'](_0x332b6e,_0x7bb974,_0x18e3bf,_0x3bb02a):this['view']['once']('render',()=>{this['_handleQuery'](_0x332b6e,_0x7bb974,_0x18e3bf,_0x3bb02a);}));}['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'](_0x475e2b,_0x545f3c,_0x2cc27e,_0x3c4451){return this['isProcessing']=!0x0,this['view']['startProcessing'](),this['previousContext']=_0x545f3c,this['previousQuery']=_0x475e2b,this['previousLabel']=_0x3c4451||_0x475e2b,this['previousActionId']=_0x2cc27e,new Promise(_0x174e6c=>{this['textAdapter']['makeRequest']({'query':_0x475e2b,'context':_0x545f3c,'onData':_0x1c796c=>{this['currentResponse']=_0x1c796c,this['currentContext']=this['_parseAndNormalizeContent'](this['currentResponse']);},'actionId':_0x2cc27e})['then'](()=>{!this['currentContext']&&this['currentResponse']&&(this['currentContext']=this['_parseAndNormalizeContent'](this['currentResponse'],!0x0));})['catch'](_0x20d490=>{_0x20d490 instanceof _0x1f7837?this['view']['handleError'](_0x20d490['message']):this['view']['handleError'](),_0x174e6c();})['finally'](()=>{this['stopProcessing'](),_0x174e6c();});});}['_parseAndNormalizeContent'](_0x205702,_0x5a3462=!0x1){const _0x2dddf7=_0x4afc50['exec'](_0x205702);_0x205702=_0x2dddf7?_0x205702['substring'](_0x2dddf7[0x1]['length']):_0x205702['length']<0x64&&!_0x5a3462?'':this['_stripMarkdownSyntax'](_0x205702);const _0x207601=this['_domParser']['parseFromString'](_0x205702,'text/html');if(_0x2dddf7){const _0x27a5f7=Array['from'](_0x207601['body']['childNodes']);_0x27a5f7['reverse']();for(const _0x22e343 of _0x27a5f7){if(_0x22e343['nodeType']==Node['ELEMENT_NODE'])break;_0x22e343['remove']();}}const _0x22e828=this['editor']['data']['processor']['toView'](this['_xmlSerializer']['serializeToString'](_0x207601['body']));this['_isH1TagSupportEnabled']()||this['_normalizeResponseHeadings'](_0x22e828);const _0x154593=this['editor']['config']['get']('ai.assistant.preserveComments'),_0x4708cf=this['editor']['data']['toModel'](_0x22e828);return _0x154593||_0x4708cf['markers']['clear'](),this['editor']['data']['stringify'](_0x4708cf);}['_normalizeResponseHeadings'](_0x2e0fa8){const _0x4c40b6=new _0x315659['ViewUpcastWriter'](this['editor']['editing']['view']['document']),_0x217fda=new _0x315659['Matcher']({'name':/^h[1-5]$/}),_0x1384db=[];let _0x9a09b=!0x1;for(const _0x1f98a1 of _0x2e0fa8)_0x1f98a1['is']('element')&&_0x217fda['match'](_0x1f98a1)&&(_0x1384db['push'](_0x1f98a1),'h1'==_0x1f98a1['name']&&(_0x9a09b=!0x0));if(_0x9a09b){for(const _0x2c8579 of _0x1384db)_0x4c40b6['rename']('h'+(parseInt(_0x2c8579['name'][0x1])+0x1),_0x2c8579);}}['_isH1TagSupportEnabled'](){const {data:_0x341d98,editing:_0xc06d55}=this['editor'],_0x14f018=_0x341d98['htmlProcessor']['toView']('<h1></h1>'),_0x158555=_0x341d98['toView'](_0x341d98['toModel'](_0x14f018));return!!_0xc06d55['view']['domConverter']['viewToDom'](_0x158555)['querySelector']('h1');}['_sanitizeHTML'](_0x2eccb1){return this['editor']['editing']['view']['domConverter']['setContentOf'](this['_sanitizationContainer'],_0x2eccb1),this['_sanitizationContainer']['innerHTML'];}['_stripMarkdownSyntax'](_0x2d39dc){const _0x477f43=_0x2d39dc['trim']();return _0x477f43['startsWith']('```html')?_0x477f43['endsWith']('```')?_0x477f43['substring'](0x7,_0x477f43['length']-0x3):_0x477f43['substring'](0x7):_0x2d39dc;}};const _0x434813={'REPLACE':'replace','INSERT':'insert'};var _0x3b1aeb=class extends _0x315659['ToolbarView']{constructor(_0x2ab22d){super(_0x2ab22d),this['set']('isVisible',!0x1),this['set']('mainAction',_0x434813['REPLACE']),this['replaceButton']=this['_createButton']('','ck-button-action'),this['replaceButton']['bind']('label')['to'](this,'mainAction',_0x2a12ea=>_0x5ebc1e(_0x2ab22d,'AI_'+_0x2a12ea['toUpperCase']()+'_CONTENT')),this['insertButton']=this['_createButton'](_0x5ebc1e(_0x2ab22d,'Insert\x20below')),this['tryAgainButton']=this['_createButton'](_0x5ebc1e(_0x2ab22d,'Try\x20again')),this['stopButton']=this['_createButton'](_0x5ebc1e(_0x2ab22d,'Stop'));const _0x1eb9a0=this['bindTemplate'];this['extendTemplate']({'attributes':{'class':['ck-ai-form__toolbar',_0x1eb9a0['if']('isVisible','ck-hidden',_0x26be14=>!_0x26be14)]}}),this['items']['addMany']([this['replaceButton'],this['insertButton'],this['tryAgainButton'],this['stopButton']]);}['_createButton'](_0x5bbf0d,_0x251619){const _0x1117fe=new _0x315659['ButtonView'](this['locale']);return _0x1117fe['set']({'label':_0x5bbf0d,'class':_0x251619||'','isVisible':!0x0,'withText':!0x0}),_0x1117fe;}},_0x4ad62d=class extends _0x315659['View']{['contentFieldView'];['copyButtonView'];constructor(_0x257764,_0x243a6e=''){super(_0x257764),this['set']({'value':null,'isVisible':!0x1,'isProcessing':!0x1});const _0x35d3cb=this['bindTemplate'];this['contentFieldView']=new _0x5d05ae(_0x257764,_0x243a6e),this['copyButtonView']=this['_createCopyButton'](),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form__content-area-wrapper',_0x35d3cb['if']('isVisible','ck-hidden',_0x1342be=>!_0x1342be)],'tabindex':'-1'},'children':[{'tag':'div','attributes':{'class':['ck','ck-ai-form__content-area',_0x35d3cb['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 _0x343421=!0x1;this['on']('change:value',(_0x4eff36,_0x4e612c,_0x1604de)=>{const _0x38eb33=!this['contentFieldView']['element']['querySelector']('.ck-ai-form__loader');this['contentFieldView']['setContent'](_0x1604de),this['isProcessing']&&_0x38eb33&&!_0x343421&&this['element']['scrollTo']({'top':this['element']['scrollHeight'],'behavior':'smooth'});}),this['on']('change:isProcessing',(_0x49156f,_0x512009,_0x4fd64b)=>{_0x343421=!0x1,_0x4fd64b?(this['value']=null,this['contentFieldView']['appendLoader']()):this['value']||this['contentFieldView']['setContent']('');}),this['listenTo'](this['element'],'wheel',()=>{_0x343421=!0x0;}),this['listenTo'](this['element'],'mousedown',()=>{_0x343421=!0x0;});}['focus'](){this['element']['focus']();}['_createCopyButton'](){const _0x534bb3=this['locale'],_0xb1f151=new _0x315659['ButtonView'](this['locale']),_0x455686='ck-ai-form__copy-button';return _0xb1f151['set']({'label':_0x5ebc1e(_0x534bb3,'Copy'),'icon':_0x315659['IconCopy'],'class':_0x455686,'tooltip':!0x0}),_0xb1f151['bind']('isVisible')['to'](this,'value',_0x3ecbe4=>!!_0x3ecbe4),_0xb1f151['bind']('isEnabled')['to'](this,'isProcessing',_0xd7910f=>!_0xd7910f),_0xb1f151['on']('execute',()=>{this['_copyHTMLToClipboard'](this['contentFieldView']['element']),_0xb1f151['icon']=_0x315659['IconCheck'],_0xb1f151['class']=_0x455686+'\x20ck-ai-form__copy-button--copied',this['focus'](),setTimeout(()=>{_0xb1f151['icon']=_0x315659['IconCopy'],_0xb1f151['class']=_0x455686;},0x3e8);}),_0xb1f151;}['_copyHTMLToClipboard'](_0x3da9a0){const {window:_0x1487b1,document:_0x599808}=_0x315659['global'];if(_0x1487b1['ClipboardItem']){const {Blob:_0xb8661a,ClipboardItem:_0x505e6e}=_0x1487b1,_0x5e08c2=[new _0x505e6e({'text/html':new _0xb8661a([_0x3da9a0['innerHTML']],{'type':'text/html'}),'text/plain':new _0xb8661a([_0x3da9a0['textContent']||''],{'type':'text/plain'})})];navigator['clipboard']['write'](_0x5e08c2);}else{const _0x27de05=_0x599808['createElement']('div');_0x27de05['style']['position']='absolute',_0x27de05['style']['left']='-9999px',_0x27de05['innerHTML']='<span>[</span>'+_0x3da9a0['innerHTML']+'<span>]</span>',_0x599808['body']['appendChild'](_0x27de05);const _0x5e3b9d=_0x599808['createRange']();_0x5e3b9d['setStartAfter'](_0x27de05['firstElementChild']),_0x5e3b9d['setEndBefore'](_0x27de05['lastElementChild']);const _0x5dd144=_0x1487b1['getSelection']();_0x5dd144['removeAllRanges'](),_0x5dd144['addRange'](_0x5e3b9d),_0x599808['execCommand']('copy'),_0x27de05['remove']();}}},_0x5d05ae=class extends _0x315659['View']{constructor(_0x1a8ed5,_0xb1b382=''){super(_0x1a8ed5),this['loaderView']=this['_createLoader'](),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-content',_0xb1b382,'ck-reset_all-excluded','ck-ai-form__content-field']}});}['setContent'](_0x507778){this['element']['innerHTML']=_0x507778;}['appendLoader'](){this['element']['appendChild'](this['loaderView']['element']);}['_createLoader'](){const _0x495a5e=new _0x315659['View'](),_0x22e3f0=this['locale'],_0x7b98e3=new _0x315659['SpinnerView']();return _0x7b98e3['isVisible']=!0x0,_0x495a5e['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form__loader']},'children':[_0x7b98e3,{'text':_0x5ebc1e(_0x22e3f0,'AI\x20is\x20writing...')}]}),_0x495a5e['render'](),_0x495a5e;}},_0x264265=class extends _0x315659['View']{constructor(_0x35dcde,_0xcd2c9a=''){super(_0x35dcde);const _0x4cc78d=new _0x315659['IconView'](),_0x293fe5=this['bindTemplate'];this['set']('text',_0xcd2c9a),_0x4cc78d['content']=_0x315659['IconError'],this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form__error']},'children':[_0x4cc78d,{'text':_0x293fe5['to']('text')}]});}},_0x222b38=class extends _0x315659['AutocompleteView']{['submitButtonView'];['showHistoryButtonView'];constructor(_0x398652,_0x455e65){super(_0x398652,_0x455e65),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',(_0x3a83d2,_0x2d6fcd)=>{_0x3a83d2['target']==this['queryView']['fieldView']['element']&&(this['submit'](),_0x2d6fcd());});}['_createSubmitButton'](){const _0x524a61=new _0x315659['ButtonView'](this['locale']),_0x3ad47b=this['locale'];return _0x524a61['set']({'icon':_0x315659['IconSubmit'],'label':_0x5ebc1e(_0x3ad47b,'Submit'),'isVisible':!0x0,'tooltip':!0x0,'class':'ck-ai-form__submit'}),_0x524a61['on']('execute',()=>{this['submit']();}),_0x524a61['bind']('isEnabled')['to'](this['queryView']['fieldView'],'isEmpty',this,'isEnabled',(_0x11df5e,_0xc7940e)=>!_0x11df5e&&_0xc7940e),_0x524a61;}['_createShowHistoryButton'](){const _0x2d2522=new _0x315659['ButtonView'](this['locale']),_0x278ad9=this['resultsView'],_0x4d9727=this['locale'];_0x2d2522['set']({'label':_0x5ebc1e(_0x4d9727,'History'),'withText':!0x1,'icon':_0x315659['IconAIHistory'],'tooltip':!0x0,'tooltipPosition':'sw','class':'ck-ai-form__toggle-history'}),_0x2d2522['bind']('isOn')['to'](_0x278ad9,'isVisible'),_0x2d2522['bind']('isEnabled')['to'](this,'isEnabled'),_0x2d2522['on']('execute',()=>{_0x278ad9['isVisible']=!_0x278ad9['isVisible'],_0x278ad9['isVisible']?this['filteredView']['focus']():this['focus']();});const _0x1f43da=()=>{_0x315659['global']['window']['requestAnimationFrame'](()=>{if((0x0,_0x315659['isVisible'])(this['element'])){const _0x22f4e6=new _0x315659['Rect'](this['queryView']['fieldView']['element']),_0x2dc952=_0x22f4e6['width'],_0x3d8d77='rtl'===_0x4d9727['uiLanguageDirection']?'left':'right';_0x22f4e6['excludeScrollbarsAndBorders'](),_0x2d2522['element']['style'][_0x3d8d77]=_0x2dc952-_0x22f4e6['width']+0x1+'px';}});};return this['queryView']['fieldView']['on']('update',_0x1f43da),this['on']('render',_0x1f43da),_0x2d2522;}['submit'](){const _0x2f0a23=this['queryView']['fieldView']['element']['value'];this['fire']('submit',_0x2f0a23);}['focus'](_0x3f8082){-0x1===_0x3f8082?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}},_0x14be1b=class extends _0x315659['ListView']{['historyGroupView'];['clearHistoryButton'];constructor(_0x321978){super(_0x321978),this['clearHistoryButton']=this['_createClearHistoryButton'](),this['historyGroupView']=new _0x315659['ListItemGroupView'](),this['historyGroupView']['children']['add'](this['clearHistoryButton'],0x1),this['historyGroupView']['label']=_0x5ebc1e(_0x321978,'Prompt\x20history'),this['historyGroupView']['items']['delegate']('execute')['to'](this),this['items']['add'](this['historyGroupView']);}['filter'](){let _0x26c08b=0x0;for(const _0x536a25 of this['items'])_0x26c08b+=_0x536a25['items']['length'];return{'resultsCount':_0x26c08b,'totalItemsCount':_0x26c08b};}['_createClearHistoryButton'](){const _0x2f123d=this['locale'],_0x27f453=new _0x315659['ButtonView'](this['locale']);return _0x27f453['set']({'label':'('+_0x5ebc1e(_0x2f123d,'Clear')+')','withText':!0x0}),_0x27f453['on']('execute',()=>this['fire']('clearHistory')),_0x27f453;}};function _0x115404(_0x4287d9,_0x523141,{signal:_0x52cf89,edges:_0xd5258a}={}){let _0x40f8e3,_0x14dd4d=null;const _0x245b54=null!=_0xd5258a&&_0xd5258a['includes']('leading'),_0x1af62c=null==_0xd5258a||_0xd5258a['includes']('trailing'),_0xe8085f=()=>{null!==_0x14dd4d&&(_0x4287d9['apply'](_0x40f8e3,_0x14dd4d),_0x40f8e3=void 0x0,_0x14dd4d=null);};let _0x1ae4f4=null;const _0x46090c=()=>{null!=_0x1ae4f4&&clearTimeout(_0x1ae4f4),_0x1ae4f4=setTimeout(()=>{_0x1ae4f4=null,_0x1af62c&&_0xe8085f(),_0x2d2704();},_0x523141);},_0x2d2704=()=>{null!==_0x1ae4f4&&(clearTimeout(_0x1ae4f4),_0x1ae4f4=null),_0x40f8e3=void 0x0,_0x14dd4d=null;},_0x200392=function(..._0x29a912){if(_0x52cf89?.['aborted'])return;_0x40f8e3=this,_0x14dd4d=_0x29a912;const _0x209b1f=null==_0x1ae4f4;_0x46090c(),_0x245b54&&_0x209b1f&&_0xe8085f();};return _0x200392['schedule']=_0x46090c,_0x200392['cancel']=_0x2d2704,_0x200392['flush']=()=>{_0xe8085f();},_0x52cf89?.['addEventListener']('abort',_0x2d2704,{'once':!0x0}),_0x200392;}function _0x3b48e2(_0x1df7b3,_0x40ef42=0x0,_0x20070a={}){'object'!=typeof _0x20070a&&(_0x20070a={});const {leading:_0x36e3e7=!0x1,trailing:_0x576629=!0x0,maxWait:_0x3bbd93}=_0x20070a,_0x1322bb=Array(0x2);let _0x34b9d9;_0x36e3e7&&(_0x1322bb[0x0]='leading'),_0x576629&&(_0x1322bb[0x1]='trailing');let _0x3678fd=null;const _0x54090a=_0x115404(function(..._0x309862){_0x34b9d9=_0x1df7b3['apply'](this,_0x309862),_0x3678fd=null;},_0x40ef42,{'edges':_0x1322bb}),_0x9f062f=function(..._0xc4481a){return null!=_0x3bbd93&&(null===_0x3678fd&&(_0x3678fd=Date['now']()),Date['now']()-_0x3678fd>=_0x3bbd93)?(_0x34b9d9=_0x1df7b3['apply'](this,_0xc4481a),_0x3678fd=Date['now'](),_0x54090a['cancel'](),_0x54090a['schedule'](),_0x34b9d9):(_0x54090a['apply'](this,_0xc4481a),_0x34b9d9);};return _0x9f062f['cancel']=_0x54090a['cancel'],_0x9f062f['flush']=()=>(_0x54090a['flush'](),_0x34b9d9),_0x9f062f;}function _0x50c13b(_0x2ed5b8,_0xba8bc4=0x0,_0x489268={}){const {leading:_0x36aefd=!0x0,trailing:_0x40429f=!0x0}=_0x489268;return _0x3b48e2(_0x2ed5b8,_0xba8bc4,{'leading':_0x36aefd,'maxWait':_0xba8bc4,'trailing':_0x40429f});}function _0x4ab736(_0x7c70af){if(!_0x7c70af||'object'!=typeof _0x7c70af)return!0x1;const _0x54ed24=Object['getPrototypeOf'](_0x7c70af);return(null===_0x54ed24||_0x54ed24===Object['prototype']||null===Object['getPrototypeOf'](_0x54ed24))&&'[object\x20Object]'===Object['prototype']['toString']['call'](_0x7c70af);}function _0x4df6fe(_0x3aaf7c){return Object['getOwnPropertySymbols'](_0x3aaf7c)['filter'](_0x4efd0d=>Object['prototype']['propertyIsEnumerable']['call'](_0x3aaf7c,_0x4efd0d));}function _0x5827d0(_0x1cd811){return null==_0x1cd811?void 0x0===_0x1cd811?'[object\x20Undefined]':'[object\x20Null]':Object['prototype']['toString']['call'](_0x1cd811);}const _0x9fb0ff='[object\x20RegExp]',_0x1abfe3='[object\x20String]',_0x50dfa7='[object\x20Number]',_0x1701c8='[object\x20Boolean]',_0x3ccbbb='[object\x20Arguments]',_0x1b1706='[object\x20Symbol]',_0x5cdf1c='[object\x20Date]',_0x45dc67='[object\x20Map]',_0x2a267b='[object\x20Set]',_0x350d45='[object\x20Array]',_0x53edb3='[object\x20ArrayBuffer]',_0xf61b43='[object\x20Object]',tt='[object\x20DataView]',et='[object\x20Uint8Array]',it='[object\x20Uint8ClampedArray]',st='[object\x20Uint16Array]',nt='[object\x20Uint32Array]',rt='[object\x20Int8Array]',ot='[object\x20Int16Array]',at='[object\x20Int32Array]',ct='[object\x20Float32Array]',lt='[object\x20Float64Array]';function ht(_0xc84ec4,_0x4fffaf){return _0xc84ec4===_0x4fffaf||Number['isNaN'](_0xc84ec4)&&Number['isNaN'](_0x4fffaf);}function ut(_0x54bff5,_0x30b03d,_0x10ea1a,_0x50bd84,_0x4783da,_0x31d524,_0x3c17){const _0x5eac3c=_0x3c17(_0x54bff5,_0x30b03d,_0x10ea1a,_0x50bd84,_0x4783da,_0x31d524);if(void 0x0!==_0x5eac3c)return _0x5eac3c;if(typeof _0x54bff5==typeof _0x30b03d)switch(typeof _0x54bff5){case'bigint':case'string':case'boolean':case'symbol':case'undefined':case'function':return _0x54bff5===_0x30b03d;case'number':return _0x54bff5===_0x30b03d||Object['is'](_0x54bff5,_0x30b03d);case'object':return dt(_0x54bff5,_0x30b03d,_0x31d524,_0x3c17);}return dt(_0x54bff5,_0x30b03d,_0x31d524,_0x3c17);}function dt(_0x4571c8,_0x4ffd2,_0x2cf44d,_0x256833){if(Object['is'](_0x4571c8,_0x4ffd2))return!0x0;let _0x272cdd=_0x5827d0(_0x4571c8),_0x5b2440=_0x5827d0(_0x4ffd2);if('[object\x20Arguments]'===_0x272cdd&&(_0x272cdd=_0xf61b43),'[object\x20Arguments]'===_0x5b2440&&(_0x5b2440=_0xf61b43),_0x272cdd!==_0x5b2440)return!0x1;switch(_0x272cdd){case _0x1abfe3:return _0x4571c8['toString']()===_0x4ffd2['toString']();case _0x50dfa7:return ht(_0x4571c8['valueOf'](),_0x4ffd2['valueOf']());case _0x1701c8:case _0x5cdf1c:case _0x1b1706:return Object['is'](_0x4571c8['valueOf'](),_0x4ffd2['valueOf']());case _0x9fb0ff:return _0x4571c8['source']===_0x4ffd2['source']&&_0x4571c8['flags']===_0x4ffd2['flags'];case'[object\x20Function]':return _0x4571c8===_0x4ffd2;}const _0x315277=(_0x2cf44d=_0x2cf44d??new Map())['get'](_0x4571c8),_0x4513fb=_0x2cf44d['get'](_0x4ffd2);if(null!=_0x315277&&null!=_0x4513fb)return _0x315277===_0x4ffd2;_0x2cf44d['set'](_0x4571c8,_0x4ffd2),_0x2cf44d['set'](_0x4ffd2,_0x4571c8);try{switch(_0x272cdd){case _0x45dc67:if(_0x4571c8['size']!==_0x4ffd2['size'])return!0x1;for(const [_0x5e7461,_0x3756c6]of _0x4571c8['entries']())if(!_0x4ffd2['has'](_0x5e7461)||!ut(_0x3756c6,_0x4ffd2['get'](_0x5e7461),_0x5e7461,_0x4571c8,_0x4ffd2,_0x2cf44d,_0x256833))return!0x1;return!0x0;case _0x2a267b:{if(_0x4571c8['size']!==_0x4ffd2['size'])return!0x1;const _0x39fb26=Array['from'](_0x4571c8['values']()),_0x464704=Array['from'](_0x4ffd2['values']());for(let _0xe13d18=0x0;_0xe13d18<_0x39fb26['length'];_0xe13d18++){const _0x2274a9=_0x39fb26[_0xe13d18],_0x15034c=_0x464704['findIndex'](_0x572199=>ut(_0x2274a9,_0x572199,void 0x0,_0x4571c8,_0x4ffd2,_0x2cf44d,_0x256833));if(-0x1===_0x15034c)return!0x1;_0x464704['splice'](_0x15034c,0x1);}return!0x0;}case _0x350d45:case et:case it:case st:case nt:case'[object\x20BigUint64Array]':case rt:case ot:case at:case'[object\x20BigInt64Array]':case ct:case lt:if('undefined'!=typeof Buffer&&Buffer['isBuffer'](_0x4571c8)!==Buffer['isBuffer'](_0x4ffd2))return!0x1;if(_0x4571c8['length']!==_0x4ffd2['length'])return!0x1;for(let _0x1692d3=0x0;_0x1692d3<_0x4571c8['length'];_0x1692d3++)if(!ut(_0x4571c8[_0x1692d3],_0x4ffd2[_0x1692d3],_0x1692d3,_0x4571c8,_0x4ffd2,_0x2cf44d,_0x256833))return!0x1;return!0x0;case _0x53edb3:return _0x4571c8['byteLength']===_0x4ffd2['byteLength']&&dt(new Uint8Array(_0x4571c8),new Uint8Array(_0x4ffd2),_0x2cf44d,_0x256833);case tt:return _0x4571c8['byteLength']===_0x4ffd2['byteLength']&&_0x4571c8['byteOffset']===_0x4ffd2['byteOffset']&&dt(new Uint8Array(_0x4571c8),new Uint8Array(_0x4ffd2),_0x2cf44d,_0x256833);case'[object\x20Error]':return _0x4571c8['name']===_0x4ffd2['name']&&_0x4571c8['message']===_0x4ffd2['message'];case _0xf61b43:{if(!(dt(_0x4571c8['constructor'],_0x4ffd2['constructor'],_0x2cf44d,_0x256833)||_0x4ab736(_0x4571c8)&&_0x4ab736(_0x4ffd2)))return!0x1;const _0x3576f3=[...Object['keys'](_0x4571c8),..._0x4df6fe(_0x4571c8)],_0x2bc409=[...Object['keys'](_0x4ffd2),..._0x4df6fe(_0x4ffd2)];if(_0x3576f3['length']!==_0x2bc409['length'])return!0x1;for(let _0x11f8fa=0x0;_0x11f8fa<_0x3576f3['length'];_0x11f8fa++){const _0x24864f=_0x3576f3[_0x11f8fa],_0x3a1a87=_0x4571c8[_0x24864f];if(!Object['hasOwn'](_0x4ffd2,_0x24864f))return!0x1;if(!ut(_0x3a1a87,_0x4ffd2[_0x24864f],_0x24864f,_0x4571c8,_0x4ffd2,_0x2cf44d,_0x256833))return!0x1;}return!0x0;}default:return!0x1;}}finally{_0x2cf44d['delete'](_0x4571c8),_0x2cf44d['delete'](_0x4ffd2);}}function ft(){}function mt(_0x4f156e,_0x38a84a){return function(_0x1d7922,_0x1d163f,_0x497330){return ut(_0x1d7922,_0x1d163f,void 0x0,void 0x0,void 0x0,void 0x0,_0x497330);}(_0x4f156e,_0x38a84a,ft);}function pt(_0x376875){return ArrayBuffer['isView'](_0x376875)&&!(_0x376875 instanceof DataView);}function gt(_0x394e94,_0x5e2de3,_0x5a215c,_0x50f083=new Map(),_0x5b01ad=void 0x0){const _0x3f20e2=_0x5b01ad?.(_0x394e94,_0x5e2de3,_0x5a215c,_0x50f083);if(void 0x0!==_0x3f20e2)return _0x3f20e2;if(function(_0x1afc80){return null==_0x1afc80||'object'!=typeof _0x1afc80&&'function'!=typeof _0x1afc80;}(_0x394e94))return _0x394e94;if(_0x50f083['has'](_0x394e94))return _0x50f083['get'](_0x394e94);if(Array['isArray'](_0x394e94)){const _0x2c800a=new Array(_0x394e94['length']);_0x50f083['set'](_0x394e94,_0x2c800a);for(let _0x4f586e=0x0;_0x4f586e<_0x394e94['length'];_0x4f586e++)_0x2c800a[_0x4f586e]=gt(_0x394e94[_0x4f586e],_0x4f586e,_0x5a215c,_0x50f083,_0x5b01ad);return Object['hasOwn'](_0x394e94,'index')&&(_0x2c800a['index']=_0x394e94['index']),Object['hasOwn'](_0x394e94,'input')&&(_0x2c800a['input']=_0x394e94['input']),_0x2c800a;}if(_0x394e94 instanceof Date)return new Date(_0x394e94['getTime']());if(_0x394e94 instanceof RegExp){const _0x1ef802=new RegExp(_0x394e94['source'],_0x394e94['flags']);return _0x1ef802['lastIndex']=_0x394e94['lastIndex'],_0x1ef802;}if(_0x394e94 instanceof Map){const _0x502aa0=new Map();_0x50f083['set'](_0x394e94,_0x502aa0);for(const [_0x4bed06,_0xa0acde]of _0x394e94)_0x502aa0['set'](_0x4bed06,gt(_0xa0acde,_0x4bed06,_0x5a215c,_0x50f083,_0x5b01ad));return _0x502aa0;}if(_0x394e94 instanceof Set){const _0x4c9008=new Set();_0x50f083['set'](_0x394e94,_0x4c9008);for(const _0x4f44da of _0x394e94)_0x4c9008['add'](gt(_0x4f44da,void 0x0,_0x5a215c,_0x50f083,_0x5b01ad));return _0x4c9008;}if('undefined'!=typeof Buffer&&Buffer['isBuffer'](_0x394e94))return _0x394e94['subarray']();if(pt(_0x394e94)){const _0x970ee7=new(Object['getPrototypeOf'](_0x394e94))['constructor'](_0x394e94['length']);_0x50f083['set'](_0x394e94,_0x970ee7);for(let _0x239f26=0x0;_0x239f26<_0x394e94['length'];_0x239f26++)_0x970ee7[_0x239f26]=gt(_0x394e94[_0x239f26],_0x239f26,_0x5a215c,_0x50f083,_0x5b01ad);return _0x970ee7;}if(_0x394e94 instanceof ArrayBuffer||'undefined'!=typeof SharedArrayBuffer&&_0x394e94 instanceof SharedArrayBuffer)return _0x394e94['slice'](0x0);if(_0x394e94 instanceof DataView){const _0x2e91fa=new DataView(_0x394e94['buffer']['slice'](0x0),_0x394e94['byteOffset'],_0x394e94['byteLength']);return _0x50f083['set'](_0x394e94,_0x2e91fa),Ot(_0x2e91fa,_0x394e94,_0x5a215c,_0x50f083,_0x5b01ad),_0x2e91fa;}if('undefined'!=typeof File&&_0x394e94 instanceof File){const _0x3be088=new File([_0x394e94],_0x394e94['name'],{'type':_0x394e94['type']});return _0x50f083['set'](_0x394e94,_0x3be088),Ot(_0x3be088,_0x394e94,_0x5a215c,_0x50f083,_0x5b01ad),_0x3be088;}if('undefined'!=typeof Blob&&_0x394e94 instanceof Blob){const _0x174eb8=new Blob([_0x394e94],{'type':_0x394e94['type']});return _0x50f083['set'](_0x394e94,_0x174eb8),Ot(_0x174eb8,_0x394e94,_0x5a215c,_0x50f083,_0x5b01ad),_0x174eb8;}if(_0x394e94 instanceof Error){const _0x5b667a=structuredClone(_0x394e94);return _0x50f083['set'](_0x394e94,_0x5b667a),_0x5b667a['message']=_0x394e94['message'],_0x5b667a['name']=_0x394e94['name'],_0x5b667a['stack']=_0x394e94['stack'],_0x5b667a['cause']=_0x394e94['cause'],_0x5b667a['constructor']=_0x394e94['constructor'],Ot(_0x5b667a,_0x394e94,_0x5a215c,_0x50f083,_0x5b01ad),_0x5b667a;}if(_0x394e94 instanceof Boolean){const _0x1bb043=new Boolean(_0x394e94['valueOf']());return _0x50f083['set'](_0x394e94,_0x1bb043),Ot(_0x1bb043,_0x394e94,_0x5a215c,_0x50f083,_0x5b01ad),_0x1bb043;}if(_0x394e94 instanceof Number){const _0x28b2ac=new Number(_0x394e94['valueOf']());return _0x50f083['set'](_0x394e94,_0x28b2ac),Ot(_0x28b2ac,_0x394e94,_0x5a215c,_0x50f083,_0x5b01ad),_0x28b2ac;}if(_0x394e94 instanceof String){const _0x2ea9f7=new String(_0x394e94['valueOf']());return _0x50f083['set'](_0x394e94,_0x2ea9f7),Ot(_0x2ea9f7,_0x394e94,_0x5a215c,_0x50f083,_0x5b01ad),_0x2ea9f7;}if('object'==typeof _0x394e94&&function(_0x546c7b){switch(_0x5827d0(_0x546c7b)){case _0x3ccbbb:case _0x350d45:case _0x53edb3:case tt:case _0x1701c8:case _0x5cdf1c:case ct:case lt:case rt:case ot:case at:case _0x45dc67:case _0x50dfa7:case _0xf61b43:case _0x9fb0ff:case _0x2a267b:case _0x1abfe3:case _0x1b1706:case et:case it:case st:case nt:return!0x0;default:return!0x1;}}(_0x394e94)){const _0x4ab672=Object['create'](Object['getPrototypeOf'](_0x394e94));return _0x50f083['set'](_0x3