UNPKG

@ckeditor/ckeditor5-ai

Version:

AI features for CKEditor 5.

23 lines • 12.1 kB
/* * 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. | * | | * | | * +---------------------------------------------------------------------------------+ * * * * */ const _0x1d2e78=_0x1541;(function(_0x5dc554,_0x750033){const _0x3ba9e1=_0x1541,_0x3c6711=_0x5dc554();while(!![]){try{const _0x466958=parseInt(_0x3ba9e1(0xca))/0x1+-parseInt(_0x3ba9e1(0xc8))/0x2*(parseInt(_0x3ba9e1(0xbd))/0x3)+parseInt(_0x3ba9e1(0xb3))/0x4+parseInt(_0x3ba9e1(0x98))/0x5*(-parseInt(_0x3ba9e1(0xc3))/0x6)+-parseInt(_0x3ba9e1(0xcd))/0x7+-parseInt(_0x3ba9e1(0xb9))/0x8+-parseInt(_0x3ba9e1(0xc6))/0x9*(-parseInt(_0x3ba9e1(0xe7))/0xa);if(_0x466958===_0x750033)break;else _0x3c6711['push'](_0x3c6711['shift']());}catch(_0x556f85){_0x3c6711['push'](_0x3c6711['shift']());}}}(_0x4854,0x5fa98));function _0x1541(_0x3c589b,_0x16b0f6){const _0x485499=_0x4854();return _0x1541=function(_0x1541ae,_0x29621f){_0x1541ae=_0x1541ae-0x8c;let _0x1b4d3e=_0x485499[_0x1541ae];return _0x1b4d3e;},_0x1541(_0x3c589b,_0x16b0f6);}import{ObservableMixin as _0x42412e,uid as _0x595b89}from'ckeditor5/src/utils.js';function _0x4854(){const _0x28c40c=['_createApiRequest','some','every','dataId','title','parent','event','isActivated','_currentError','message','markChangeAsPending','_documentData','unmodified','hasModifications','restart','100xRtNGp','_reviewArgs','data','getActiveChanges','review-metadata','markAllChangesAsAccepted','documentData','abortController','isChangeActive','filter','error','operation','reviewCheckResultChangeStatusUpdated','reviewCheckResultDeactivated','isRated','includes','_activeRequest','currentError','length','change:isActivated','get','30TUsIXB','ready','accepted','getStream','activateChange','reviewCheckResultReady','subTitle','status','_sendRatingRequest','size','fire','forEach','reviewCheckRunUpdated','change:status','processedResultsCount','markChangeAsOutdated','reviewCheckResultActivated','outdated','updateDocumentData','textDelta','markChangeAsAccepted','reviewCheckResultAdded','ai-request-aborted','markChangeAsRejected','getContent','getChangeById','deactivateChange','762972zoQKZt','abort','_aiConnector','version','reviewName','_reviewParams','4580008AjqjVu','_sourceCheck','pending','_changes','6rWLJxl','addResultChanges','_checkIfFinished','loading','clear','elements','67842zSydhn','error-general','start','1255140qsJKaC','aborted','133116yngWFb','initialized','169207WmUYtS','forceReadyState','set','4124813JDJQBz','error-chunk','finished','find','_addReviewCheckResult','rejected','callId','sendRating','_results','isAnyChangeActivated','push'];_0x4854=function(){return _0x28c40c;};return _0x4854();}import{AIReviewCheckResult as _0x569f64}from'./aireviewcheckresult.js';import{AIReviewCheckResultChange as _0x7a4a15}from'./aireviewcheckresultchange.js';export class AIReviewCheckRun extends _0x42412e(){['id']=_0x595b89();[_0x1d2e78(0xd3)];[_0x1d2e78(0xd5)]=new Map();[_0x1d2e78(0xbc)]=[];[_0x1d2e78(0xba)];[_0x1d2e78(0xe3)];[_0x1d2e78(0xb5)];[_0x1d2e78(0xb8)];[_0x1d2e78(0xe8)];[_0x1d2e78(0x93)]=null;[_0x1d2e78(0xe0)];constructor(_0x377b23,_0x276032,_0x1eb463,_0x5a7665,_0x5f2935){const _0x5eb1e4=_0x1d2e78;super(),this[_0x5eb1e4(0xba)]=_0x276032,this[_0x5eb1e4(0xe3)]=_0x377b23,this[_0x5eb1e4(0xb5)]=_0x1eb463,this[_0x5eb1e4(0xb8)]=_0x5a7665,this[_0x5eb1e4(0xe8)]=_0x5f2935,this['on'](_0x5eb1e4(0xa5),(_0xda6d07,_0x254e51,_0xa7258f)=>{const _0x4091ce=_0x5eb1e4;this[_0x4091ce(0xa2)](_0x4091ce(0xa4),{'status':_0xa7258f,'run':this,'error':this[_0x4091ce(0xe0)]});}),this[_0x5eb1e4(0xcc)](_0x5eb1e4(0x9f),_0x5eb1e4(0xc9));}get[_0x1d2e78(0xed)](){const _0x57ba8e=_0x1d2e78;return this[_0x57ba8e(0xe3)];}get[_0x1d2e78(0xa6)](){const _0x209893=_0x1d2e78;return this[_0x209893(0xd5)][_0x209893(0xa1)];}get[_0x1d2e78(0xdc)](){const _0x2625e3=_0x1d2e78;return this[_0x2625e3(0xba)][_0x2625e3(0xdc)];}get[_0x1d2e78(0x9e)](){return'';}get[_0x1d2e78(0xb7)](){const _0x2d3d0a=_0x1d2e78;return this[_0x2d3d0a(0xba)]['id'];}get[_0x1d2e78(0xe5)](){const _0x5cc5d4=_0x1d2e78;return!this[_0x5cc5d4(0xbc)][_0x5cc5d4(0xda)](_0x2702b0=>_0x5cc5d4(0xbb)===_0x2702b0[_0x5cc5d4(0x9f)]);}get[_0x1d2e78(0x94)](){const _0x44d9e5=_0x1d2e78;return this[_0x44d9e5(0xe0)];}[_0x1d2e78(0xaa)](_0x1f3945){const _0x46a13a=_0x1d2e78;this[_0x46a13a(0xe3)]=_0x1f3945;}async[_0x1d2e78(0xc5)](){const _0x517d39=_0x1d2e78;this[_0x517d39(0x9f)]=_0x517d39(0xc0),this[_0x517d39(0xe0)]=void 0x0;try{this[_0x517d39(0x93)]=this[_0x517d39(0xd8)]();const _0x35e717=await this[_0x517d39(0x93)][_0x517d39(0x9b)]();this[_0x517d39(0x9f)]=_0x517d39(0xe9);for await(const _0x5a4e15 of _0x35e717)_0x517d39(0xe4)!==_0x5a4e15[_0x517d39(0xe9)][_0x517d39(0x8e)]&&(_0x517d39(0x8d)!==_0x5a4e15[_0x517d39(0xe9)][_0x517d39(0x8e)]?_0x517d39(0xeb)!==_0x5a4e15[_0x517d39(0xde)]?this[_0x517d39(0xd1)](_0x5a4e15[_0x517d39(0xe9)][_0x517d39(0xdb)],_0x5a4e15[_0x517d39(0xe9)][_0x517d39(0xab)]):this[_0x517d39(0xd3)]=_0x5a4e15[_0x517d39(0xe9)][_0x517d39(0xd3)]:this[_0x517d39(0x9f)]=_0x517d39(0xce));_0x517d39(0xce)!==this[_0x517d39(0x9f)]&&(0x0===this[_0x517d39(0xd5)][_0x517d39(0xa1)]?this[_0x517d39(0x9f)]=_0x517d39(0xe4):this[_0x517d39(0x9f)]=_0x517d39(0x99));}catch(_0x1423f3){this[_0x517d39(0xe0)]=_0x1423f3,_0x1423f3 instanceof Error&&_0x1423f3[_0x517d39(0xe1)][_0x517d39(0x92)](_0x517d39(0xae))?this[_0x517d39(0x9f)]=_0x517d39(0xc7):this[_0x517d39(0x9f)]=_0x517d39(0xc4);}finally{this[_0x517d39(0x93)]=null;}}async[_0x1d2e78(0xe6)](){const _0xb5be04=_0x1d2e78;this[_0xb5be04(0xd5)][_0xb5be04(0xc1)](),this[_0xb5be04(0xbc)][_0xb5be04(0x95)]=0x0,this[_0xb5be04(0xe0)]=void 0x0,await this[_0xb5be04(0xc5)]();}[_0x1d2e78(0xbe)](_0x13902d,_0x5e160c){const _0x26d2e3=_0x1d2e78,_0x4cd534=this[_0x26d2e3(0xd5)][_0x26d2e3(0x97)](_0x13902d);if(!_0x4cd534)return;const _0x1ecb3b=[];_0x5e160c[_0x26d2e3(0xa3)]((_0x1bcc9b,_0x3114cd)=>{const _0x3da539=_0x26d2e3,_0x287e33=new _0x7a4a15(_0x4cd534['id']+'-'+_0x3114cd,_0x1bcc9b,_0x4cd534);_0x287e33['on'](_0x3da539(0xa5),()=>{const _0x50e1c2=_0x3da539;this[_0x50e1c2(0xa2)](_0x50e1c2(0x8f),{'change':_0x287e33,'status':_0x287e33[_0x50e1c2(0x9f)]});}),_0x287e33['on'](_0x3da539(0x96),()=>{const _0x5da649=_0x3da539;_0x287e33[_0x5da649(0xdf)]?this[_0x5da649(0xa2)](_0x5da649(0xa8),{'change':_0x287e33}):this[_0x5da649(0xa2)](_0x5da649(0x90),{'change':_0x287e33});}),this[_0x3da539(0xbc)][_0x3da539(0xd7)](_0x287e33),_0x1ecb3b[_0x3da539(0xd7)](_0x287e33);}),this[_0x26d2e3(0xa2)](_0x26d2e3(0x9d),{'changes':_0x1ecb3b,'result':_0x4cd534,'source':this});}[_0x1d2e78(0xb4)](){const _0x147f39=_0x1d2e78;this[_0x147f39(0x93)]&&(this[_0x147f39(0x93)][_0x147f39(0xee)][_0x147f39(0xb4)](),this[_0x147f39(0x93)]=null,this[_0x147f39(0x9f)]=_0x147f39(0xc7));}[_0x1d2e78(0xef)](_0x8c7cd7){const _0xdf4324=_0x1d2e78,_0x13fb1e=this[_0xdf4324(0xbc)][_0xdf4324(0xd0)](_0x54811d=>_0x54811d['id']===_0x8c7cd7);return!(!_0x13fb1e||_0xdf4324(0xbb)!==_0x13fb1e[_0xdf4324(0x9f)]);}[_0x1d2e78(0xd6)](){const _0x2f2f2b=_0x1d2e78;return this[_0x2f2f2b(0xbc)][_0x2f2f2b(0xd9)](_0x4a6c8b=>!0x0===_0x4a6c8b[_0x2f2f2b(0xdf)]);}[_0x1d2e78(0xea)](){const _0x4ce787=_0x1d2e78;return this[_0x4ce787(0xbc)][_0x4ce787(0x8c)](_0x1798ff=>_0x4ce787(0xbb)===_0x1798ff[_0x4ce787(0x9f)]);}[_0x1d2e78(0xb1)](_0x24900b){const _0x2faa57=_0x1d2e78;return this[_0x2faa57(0xbc)][_0x2faa57(0xd0)](_0x5567f3=>_0x5567f3['id']===_0x24900b);}[_0x1d2e78(0xec)](){const _0x2f0ca3=_0x1d2e78;for(const _0x5b640f of this[_0x2f0ca3(0xbc)])_0x2f0ca3(0xbb)===_0x5b640f[_0x2f0ca3(0x9f)]&&(_0x5b640f[_0x2f0ca3(0x9f)]=_0x2f0ca3(0x9a));this[_0x2f0ca3(0xbf)]();}[_0x1d2e78(0xac)](_0x4a5941){const _0x1469e8=_0x1d2e78,_0x51b8e0=this[_0x1469e8(0xbc)][_0x1469e8(0xd0)](_0x1d1f24=>_0x1d1f24['id']===_0x4a5941);_0x51b8e0&&_0x1469e8(0xbb)===_0x51b8e0[_0x1469e8(0x9f)]&&(_0x51b8e0[_0x1469e8(0x9f)]=_0x1469e8(0x9a)),this[_0x1469e8(0xbf)]();}[_0x1d2e78(0xaf)](_0x209299){const _0x1781f9=_0x1d2e78,_0x562427=this[_0x1781f9(0xbc)][_0x1781f9(0xd0)](_0x46a83f=>_0x46a83f['id']===_0x209299);_0x562427&&_0x1781f9(0xbb)===_0x562427[_0x1781f9(0x9f)]&&(_0x562427[_0x1781f9(0x9f)]=_0x1781f9(0xd2)),this[_0x1781f9(0xbf)]();}[_0x1d2e78(0xa7)](_0x5c25e8){const _0x139712=_0x1d2e78,_0x1e68a6=this[_0x139712(0xbc)][_0x139712(0xd0)](_0x35915d=>_0x35915d['id']===_0x5c25e8);_0x1e68a6&&_0x139712(0xbb)===_0x1e68a6[_0x139712(0x9f)]&&(_0x1e68a6[_0x139712(0x9f)]=_0x139712(0xa9)),this[_0x139712(0xbf)]();}[_0x1d2e78(0xe2)](_0x181be3){const _0x9a0b67=_0x1d2e78,_0x225ffe=this[_0x9a0b67(0xbc)][_0x9a0b67(0xd0)](_0xeeaa8=>_0xeeaa8['id']===_0x181be3);_0x225ffe&&_0x9a0b67(0xa9)===_0x225ffe[_0x9a0b67(0x9f)]&&(_0x225ffe[_0x9a0b67(0x9f)]=_0x9a0b67(0xbb)),this[_0x9a0b67(0xbf)]();}[_0x1d2e78(0x9c)](_0x42ee6b){const _0x38400b=_0x1d2e78;this[_0x38400b(0xbc)][_0x38400b(0x8c)](_0x3247fe=>_0x3247fe[_0x38400b(0xdf)]&&_0x3247fe['id']!==_0x42ee6b)[_0x38400b(0xa3)](_0xdf44c6=>{const _0x10873d=_0x38400b;_0xdf44c6[_0x10873d(0xdf)]=!0x1;});const _0x3ae584=this[_0x38400b(0xbc)][_0x38400b(0xd0)](_0x3d21ae=>_0x3d21ae['id']===_0x42ee6b);_0x3ae584&&_0x38400b(0xbb)===_0x3ae584[_0x38400b(0x9f)]&&(_0x3ae584[_0x38400b(0xdf)]=!0x0);}[_0x1d2e78(0xb2)](){const _0x5d11e9=_0x1d2e78;this[_0x5d11e9(0xbc)][_0x5d11e9(0x8c)](_0x3d4ac3=>_0x3d4ac3[_0x5d11e9(0xdf)])[_0x5d11e9(0xa3)](_0x32a496=>{const _0x4685f8=_0x5d11e9;_0x32a496[_0x4685f8(0xdf)]=!0x1;});}[_0x1d2e78(0xcb)](){const _0x116db5=_0x1d2e78;this[_0x116db5(0x9f)]=_0x116db5(0x99);}async[_0x1d2e78(0xd4)](_0x1e8b26){const _0x5b4af1=_0x1d2e78;if(_0x5b4af1(0xc9)===this[_0x5b4af1(0x9f)]||_0x5b4af1(0xc0)===this[_0x5b4af1(0x9f)]||_0x5b4af1(0xe9)===this[_0x5b4af1(0x9f)])return;if(!this[_0x5b4af1(0xd3)]||0x0===this[_0x5b4af1(0xbc)][_0x5b4af1(0x95)])return;let _0x35fa6b;if(_0x1e8b26){const _0x1fd442=this[_0x5b4af1(0xbc)][_0x5b4af1(0xd0)](_0x13bae4=>_0x13bae4['id']===_0x1e8b26);if(_0x1fd442&&_0x1fd442[_0x5b4af1(0x91)])return;_0x1fd442&&(_0x35fa6b=_0x1fd442[_0x5b4af1(0xdd)]['id'],_0x1fd442[_0x5b4af1(0x91)]=!0x0);}const _0x38d954={'positiveCount':this[_0x5b4af1(0xbc)][_0x5b4af1(0x8c)](_0x27b5ad=>_0x5b4af1(0x9a)===_0x27b5ad[_0x5b4af1(0x9f)])[_0x5b4af1(0x95)],'totalCount':this[_0x5b4af1(0xbc)][_0x5b4af1(0x95)]};this[_0x5b4af1(0xa0)](_0x38d954,this[_0x5b4af1(0xd3)],_0x35fa6b);}[_0x1d2e78(0xd1)](_0x5b9f78,_0x2510c){const _0x3f29a7=_0x1d2e78,_0x49ba17=this[_0x3f29a7(0xe3)][_0x3f29a7(0xc2)][_0x3f29a7(0x97)](_0x5b9f78);if(!_0x49ba17)return;const _0x117f6b=_0x49ba17[_0x3f29a7(0xb0)]();if(_0x117f6b===_0x2510c)return;const _0x129dea=new _0x569f64({'id':_0x5b9f78,'contentInitial':_0x117f6b,'contentNew':_0x2510c,'documentVersion':this[_0x3f29a7(0xe3)][_0x3f29a7(0xb6)]});this[_0x3f29a7(0xd5)][_0x3f29a7(0xcc)](_0x129dea['id'],_0x129dea),this[_0x3f29a7(0xa2)](_0x3f29a7(0xad),{'result':_0x129dea,'source':this});}[_0x1d2e78(0xbf)](){const _0xd4af54=_0x1d2e78;_0xd4af54(0xcf)===this[_0xd4af54(0x9f)]&&(this[_0xd4af54(0xbc)][_0xd4af54(0x8c)](_0x1c99cc=>_0xd4af54(0xbb)===_0x1c99cc[_0xd4af54(0x9f)])[_0xd4af54(0x95)]>0x0&&(this[_0xd4af54(0x9f)]=_0xd4af54(0x99))),_0xd4af54(0x99)===this[_0xd4af54(0x9f)]&&(0x0===this[_0xd4af54(0xbc)][_0xd4af54(0x8c)](_0x317308=>_0xd4af54(0xbb)===_0x317308[_0xd4af54(0x9f)])[_0xd4af54(0x95)]&&(this[_0xd4af54(0x9f)]=_0xd4af54(0xcf)));}}