@ckeditor/ckeditor5-comments
Version:
Collaborative comments feature for CKEditor 5.
23 lines • 7.11 kB
JavaScript
/*
* 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 _0x12a005=_0x2784;function _0x2784(_0x5e8f45,_0x4b98ef){const _0x49e444=_0x49e4();return _0x2784=function(_0x278491,_0xb827e3){_0x278491=_0x278491-0x11a;let _0x4682c5=_0x49e444[_0x278491];return _0x4682c5;},_0x2784(_0x5e8f45,_0x4b98ef);}(function(_0x2f571e,_0x5d8488){const _0x33511d=_0x2784,_0x3bf016=_0x2f571e();while(!![]){try{const _0x3c4768=parseInt(_0x33511d(0x153))/0x1+-parseInt(_0x33511d(0x124))/0x2+parseInt(_0x33511d(0x137))/0x3*(parseInt(_0x33511d(0x121))/0x4)+-parseInt(_0x33511d(0x132))/0x5*(-parseInt(_0x33511d(0x138))/0x6)+parseInt(_0x33511d(0x155))/0x7+-parseInt(_0x33511d(0x145))/0x8+-parseInt(_0x33511d(0x159))/0x9*(parseInt(_0x33511d(0x14a))/0xa);if(_0x3c4768===_0x5d8488)break;else _0x3bf016['push'](_0x3bf016['shift']());}catch(_0x176fdc){_0x3bf016['push'](_0x3bf016['shift']());}}}(_0x49e4,0x932c9));import{Plugin as _0x57e121}from'ckeditor5/src/core.js';import{CKEditorError as _0x2f9e51}from'ckeditor5/src/utils.js';import{debounce as _0x5d8937}from'lodash-es';import _0x190f33 from'./annotations.js';export default class P extends _0x57e121{static get[_0x12a005(0x14d)](){return[_0x190f33];}static get[_0x12a005(0x13b)](){const _0x3f6129=_0x12a005;return _0x3f6129(0x141);}static get[_0x12a005(0x146)](){return!0x0;}static get[_0x12a005(0x148)](){return!0x0;}constructor(_0x393541){const _0x22e574=_0x12a005;super(_0x393541),this[_0x22e574(0x123)]=new Set(),this[_0x22e574(0x12c)]=new Set();}[_0x12a005(0x127)](){const _0x35f582=_0x12a005,_0x2dacca=this[_0x35f582(0x156)],_0x3e3021=_0x2dacca[_0x35f582(0x139)][_0x35f582(0x157)][_0x35f582(0x122)],_0x2c8057=_0x5d8937(()=>this[_0x35f582(0x140)](),0xa);_0x3e3021['on'](_0x35f582(0x12e),(_0xa643b9,_0x26e98a)=>{const _0x532db9=_0x35f582;_0x26e98a[_0x532db9(0x12f)]&&(_0x2c8057[_0x532db9(0x13a)](),this[_0x532db9(0x140)]());}),this[_0x35f582(0x14b)](_0x2dacca[_0x35f582(0x152)][_0x35f582(0x128)][_0x35f582(0x157)],_0x35f582(0x133),(_0xcf1dd8,_0x43998c,_0x25b4ba)=>{_0x25b4ba&&_0x2c8057();}),this[_0x35f582(0x14b)](_0x2dacca['ui'][_0x35f582(0x154)],_0x35f582(0x133),(_0x324377,_0x3fa22f,_0x36678f)=>{const _0x33d549=_0x35f582;_0x36678f||_0x2dacca[_0x33d549(0x142)]||this[_0x33d549(0x14c)](_0x33d549(0x13f),{'isAnnotationTracked':_0x34485a=>this[_0x33d549(0x13d)][_0x33d549(0x12d)](_0x34485a[_0x33d549(0x129)])});}),this[_0x35f582(0x14b)](this[_0x35f582(0x156)]['ui'],_0x35f582(0x143),()=>this[_0x35f582(0x14c)](_0x35f582(0x150)));}[_0x12a005(0x149)](_0x2622ac){const _0x2220a2=_0x12a005;if(this[_0x2220a2(0x12c)][_0x2220a2(0x12d)](_0x2622ac[_0x2220a2(0x128)]))return;this[_0x2220a2(0x12c)][_0x2220a2(0x13e)](_0x2622ac[_0x2220a2(0x128)]),this[_0x2220a2(0x156)]['ui'][_0x2220a2(0x154)][_0x2220a2(0x13e)](_0x2622ac[_0x2220a2(0x128)][_0x2220a2(0x11d)]);const _0x46157a=this[_0x2220a2(0x156)][_0x2220a2(0x11f)][_0x2220a2(0x11a)](_0x190f33);this[_0x2220a2(0x14b)](_0x46157a[_0x2220a2(0x14e)],_0x2220a2(0x135),(_0x5ae9b5,_0x363e8f)=>{const _0xfc91ff=_0x2220a2;this[_0xfc91ff(0x156)]['ui'][_0xfc91ff(0x154)][_0xfc91ff(0x135)](_0x363e8f[_0xfc91ff(0x128)][_0xfc91ff(0x11d)]),this[_0xfc91ff(0x12c)][_0xfc91ff(0x125)](_0x363e8f[_0xfc91ff(0x128)]);});}[_0x12a005(0x14f)](){const _0x39fa78=_0x12a005;return this[_0x39fa78(0x156)][_0x39fa78(0x152)][_0x39fa78(0x128)][_0x39fa78(0x14f)];}[_0x12a005(0x144)](_0xd28880){const _0x28a37c=_0x12a005;if(_0x28a37c(0x11c)!=typeof _0xd28880)throw new _0x2f9e51(_0x28a37c(0x15a));this[_0x28a37c(0x123)][_0x28a37c(0x13e)](_0xd28880);}[_0x12a005(0x140)](){const _0x4985eb=_0x12a005;this[_0x4985eb(0x14c)](_0x4985eb(0x126));}[_0x12a005(0x120)]({activeAnnotation:_0x4379f1,annotations:_0x3fc737}){const _0x5b670d=_0x12a005,_0x1f5001=[],_0x16b40f=this[_0x5b670d(0x156)][_0x5b670d(0x139)][_0x5b670d(0x157)][_0x5b670d(0x122)],_0xbcff5=Array[_0x5b670d(0x131)](_0x16b40f[_0x5b670d(0x147)]());for(const [_0x29b455,_0x54fb91]of this[_0x5b670d(0x13d)]){const _0x2723d1=_0x549cf3(_0x54fb91),_0x16839c=_0x3fc737[_0x5b670d(0x12b)](_0x29b455);_0x2723d1&&_0x16839c&&_0x1f5001[_0x5b670d(0x11b)]({'annotation':_0x16839c,'range':_0x2723d1});}function _0x549cf3(_0xbf4c5e){const _0xa68bac=_0x5b670d;for(const _0x101842 of _0xbf4c5e)for(const _0x54f9fd of _0xbcff5)if(_0x101842[_0xa68bac(0x130)](_0x54f9fd,!_0x16b40f[_0xa68bac(0x13c)]))return _0x101842;return null;}return _0x1f5001[_0x5b670d(0x11e)]((_0x4ec81a,_0x3544aa)=>{const _0x4d7428=_0x5b670d,_0x15b359=_0x4ec81a[_0x4d7428(0x12a)],_0x1b0e79=_0x3544aa[_0x4d7428(0x12a)];if(!_0x15b359[_0x4d7428(0x134)](_0x1b0e79)){if(_0x15b359[_0x4d7428(0x130)](_0x1b0e79,!0x0))return 0x1;if(_0x1b0e79[_0x4d7428(0x130)](_0x15b359,!0x0))return-0x1;}return _0x4ec81a[_0x4d7428(0x151)]==_0x4379f1?-0x1:_0x3544aa[_0x4d7428(0x151)]==_0x4379f1?0x1:0x0;})[_0x5b670d(0x136)](_0x41045f=>_0x41045f[_0x5b670d(0x151)]);}get[_0x12a005(0x13d)](){const _0x2ce54e=_0x12a005,_0x4348da=new Map();for(const _0x1267d4 of Array[_0x2ce54e(0x131)](this[_0x2ce54e(0x123)]))for(const [_0x73dd7c,_0x47b321]of _0x1267d4())_0x4348da[_0x2ce54e(0x158)](_0x73dd7c,_0x47b321);return _0x4348da;}}function _0x49e4(){const _0x3a0e4b=['listenTo','fire','requires','collection','hasDomSelection','uiUpdate','annotation','editing','653508edyytG','focusTracker','54159jEOZPu','editor','document','set','952164FHrFRS','editorannotations-invalid-source-callback','get','push','function','element','sort','plugins','getOrderedSelectedAnnotations','4qVWtZs','selection','_dataCollectors','431040rWmpIE','delete','refresh','init','view','innerView','range','getByInnerView','_editorAnnotations','has','change:range','directChange','containsRange','from','269995SmWHgU','change:isFocused','isEqual','remove','map','3607734rjJScR','6hSEvsY','model','cancel','pluginName','isCollapsed','_editorAnnotationsData','add','blur','refreshSelectedViews','EditorAnnotations','isReadOnly','update','addSourceCollector','7949448siyKTI','isOfficialPlugin','getRanges','isPremiumPlugin','registerAnnotation','10XIgMrS'];_0x49e4=function(){return _0x3a0e4b;};return _0x49e4();}