@ckeditor/ckeditor5-comments
Version:
Collaborative comments feature for CKEditor 5.
23 lines • 9.77 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 _0x359775=_0x1e52;(function(_0x4c2265,_0xed3d1a){const _0x4740eb=_0x1e52,_0x50c7c4=_0x4c2265();while(!![]){try{const _0x26b429=-parseInt(_0x4740eb(0x13d))/0x1+-parseInt(_0x4740eb(0x14f))/0x2*(-parseInt(_0x4740eb(0x130))/0x3)+-parseInt(_0x4740eb(0x13c))/0x4*(parseInt(_0x4740eb(0x11e))/0x5)+-parseInt(_0x4740eb(0x12a))/0x6+parseInt(_0x4740eb(0x128))/0x7+parseInt(_0x4740eb(0x143))/0x8*(parseInt(_0x4740eb(0x15e))/0x9)+-parseInt(_0x4740eb(0x142))/0xa;if(_0x26b429===_0xed3d1a)break;else _0x50c7c4['push'](_0x50c7c4['shift']());}catch(_0x12f5eb){_0x50c7c4['push'](_0x50c7c4['shift']());}}}(_0x583f,0xd75ad));function _0x1e52(_0x3550f1,_0x4cf2c9){const _0x583f71=_0x583f();return _0x1e52=function(_0x1e52c3,_0x562aa7){_0x1e52c3=_0x1e52c3-0x115;let _0x2ed4b3=_0x583f71[_0x1e52c3];return _0x2ed4b3;},_0x1e52(_0x3550f1,_0x4cf2c9);}import'../../theme/commentsarchive.css';import{Plugin as _0x529996}from'ckeditor5/src/core.js';import{IconCommentsArchive as _0x29de92}from'ckeditor5/src/icons.js';import{ViewCollection as _0x6bb33,MenuBarMenuListItemButtonView as _0x8cc732,ButtonView as _0x46e24c,Dialog as _0x3722a2,DialogViewPosition as _0xa9a3bf}from'ckeditor5/src/ui.js';function _0x583f(){const _0x15d2f0=['Dialog','_hideDialogOnAnnotationEscape','annotationViews','findIndex','collection','splice','4BPIeQX','188143KLjSDA','remove','source','pluginName','has','4905200vJTlmV','16ihscMv','componentFactory','add','EDITOR_TOP_SIDE','isOfficialPlugin','includes','getByInnerView','channelId','forEach','show','execute','tooltip','2081152RdLtPf','stopListening','CommentsArchiveUI','plugins','archivedAt','menuBar:commentsArchive','archivedThreads','escape','get','commentsArchive','locale','isOn','isVisible','_pendingThreads','find','3660651kTRyPj','_toggleDialog','COMMENTS_ARCHIVE','push','isEnabled','menuitemcheckbox','commentsArchiveView','requires','focusableElements','filter','set','_calculatePosition','543045kmpWuu','view','config','indexOf','listenTo','isOpen','_createCommentsArchiveButton','init','_threadToController','_visibleAnnotations','681730eJGjaV','collaboration.channelId','1692474AnrfZE','hide','_handleNewThread','CommentsRepository','Annotations','bind','3wNbcSX','innerView','editor','length','stop','isPremiumPlugin'];_0x583f=function(){return _0x15d2f0;};return _0x583f();}import{getTranslation as _0x1d6f2c}from'../utils/common-translations.js';import{CommentsArchiveView as _0x1f2d78}from'./ui/view/commentsarchiveview.js';import{CommentsArchive as _0x320117}from'./commentsarchive.js';export class CommentsArchiveUI extends _0x529996{[_0x359775(0x118)];[_0x359775(0x138)];[_0x359775(0x15c)];static get[_0x359775(0x140)](){const _0x2af474=_0x359775;return _0x2af474(0x151);}static get[_0x359775(0x147)](){return!0x0;}static get[_0x359775(0x135)](){return!0x0;}static get[_0x359775(0x119)](){return[_0x320117,_0x3722a2];}constructor(_0x1f5058){const _0xe011ac=_0x359775;super(_0x1f5058),this[_0xe011ac(0x138)]=new _0x6bb33(),this[_0xe011ac(0x15c)]=[];}[_0x359775(0x125)](){const _0x416836=_0x359775,_0x1d1914=this[_0x416836(0x132)],_0x2c9b6c=this[_0x416836(0x137)][_0x416836(0x12f)](this);_0x1d1914['ui'][_0x416836(0x144)][_0x416836(0x145)](_0x416836(0x158),()=>this[_0x416836(0x124)](_0x46e24c,!0x0)),_0x1d1914['ui'][_0x416836(0x144)][_0x416836(0x145)](_0x416836(0x154),()=>{const _0x1157fb=_0x416836,_0x52a446=this[_0x1157fb(0x124)](_0x8cc732);return _0x52a446[_0x1157fb(0x11c)]({'role':_0x1157fb(0x117)}),_0x52a446;});const _0x2b16cc=_0x1d1914[_0x416836(0x152)][_0x416836(0x157)](_0x320117),_0xed61c4=_0x1d1914[_0x416836(0x152)][_0x416836(0x157)](_0x416836(0x12e)),_0x27fd2d=_0x1d1914[_0x416836(0x152)][_0x416836(0x157)](_0x416836(0x12d));_0x2b16cc[_0x416836(0x155)][_0x416836(0x14b)](_0x2083d9=>{const _0x47cacb=_0x416836;this[_0x47cacb(0x12c)](_0x2083d9);}),this[_0x416836(0x122)](_0x2b16cc[_0x416836(0x155)],_0x416836(0x145),(_0x13232e,_0x201a76)=>{const _0x55c7f8=_0x416836;this[_0x55c7f8(0x12c)](_0x201a76);}),this[_0x416836(0x122)](_0xed61c4[_0x416836(0x13a)],_0x416836(0x145),(_0x58473d,_0x2ecc27)=>{const _0x1019b4=_0x416836,_0x1b455d=this[_0x1019b4(0x15c)][_0x1019b4(0x15d)](_0x13bcb6=>{const _0x1bc8bd=_0x1019b4,_0x55b695=_0x27fd2d[_0x1bc8bd(0x126)][_0x1bc8bd(0x157)](_0x13bcb6);return _0x55b695&&_0x2ecc27[_0x1bc8bd(0x131)]===_0x55b695[_0x1bc8bd(0x11f)];});if(_0x1b455d){const _0x258c88=this[_0x1019b4(0x11d)](_0x1b455d[_0x1019b4(0x153)]);this[_0x1019b4(0x138)][_0x1019b4(0x145)](_0x2ecc27[_0x1019b4(0x11f)],_0x258c88),this[_0x1019b4(0x15c)][_0x1019b4(0x13b)](this[_0x1019b4(0x15c)][_0x1019b4(0x121)](_0x1b455d),0x1);}}),this[_0x416836(0x122)](_0x2b16cc[_0x416836(0x155)],_0x416836(0x13e),(_0x41ef4b,_0x47a808)=>{const _0x5373f2=_0x416836,_0x15ee01=_0x1d1914[_0x5373f2(0x120)][_0x5373f2(0x157)](_0x5373f2(0x129));if(!_0x15ee01||_0x47a808[_0x5373f2(0x14a)]===_0x15ee01){if(this[_0x5373f2(0x15c)][_0x5373f2(0x148)](_0x47a808))this[_0x5373f2(0x15c)][_0x5373f2(0x13b)](this[_0x5373f2(0x15c)][_0x5373f2(0x121)](_0x47a808),0x1);else{const _0x16de90=_0x27fd2d[_0x5373f2(0x126)][_0x5373f2(0x157)](_0x47a808),_0x222256=_0xed61c4[_0x5373f2(0x149)](_0x16de90[_0x5373f2(0x11f)]);this[_0x5373f2(0x138)][_0x5373f2(0x13e)](_0x222256[_0x5373f2(0x11f)]),this[_0x5373f2(0x150)](_0x222256[_0x5373f2(0x11a)]);}}}),this[_0x416836(0x122)](_0xed61c4[_0x416836(0x13a)],_0x416836(0x145),(_0x97a4bc,_0x155563)=>{const _0x84417c=_0x416836;this[_0x84417c(0x122)](_0x155563,_0x84417c(0x156),_0x2c9b6c);}),this[_0x416836(0x122)](_0xed61c4[_0x416836(0x13a)],_0x416836(0x13e),(_0x31ac63,_0x3ca4ba)=>{const _0x48776e=_0x416836;this[_0x48776e(0x150)](_0x3ca4ba,_0x48776e(0x156),_0x2c9b6c);});}[_0x359775(0x12c)](_0x5b5e30){const _0x18fed2=_0x359775,_0x497d05=this[_0x18fed2(0x132)][_0x18fed2(0x152)][_0x18fed2(0x157)](_0x18fed2(0x12d)),_0x9291dc=this[_0x18fed2(0x132)][_0x18fed2(0x152)][_0x18fed2(0x157)](_0x18fed2(0x12e)),_0x4eb4b5=this[_0x18fed2(0x132)][_0x18fed2(0x120)][_0x18fed2(0x157)](_0x18fed2(0x129));if(!_0x4eb4b5||_0x5b5e30[_0x18fed2(0x14a)]===_0x4eb4b5){const _0x10141a=_0x497d05[_0x18fed2(0x126)][_0x18fed2(0x157)](_0x5b5e30);if(!_0x10141a)return void this[_0x18fed2(0x15c)][_0x18fed2(0x115)](_0x5b5e30);const _0x24a7a3=this[_0x18fed2(0x11d)](_0x5b5e30[_0x18fed2(0x153)]),_0x4436b0=_0x9291dc[_0x18fed2(0x149)](_0x10141a[_0x18fed2(0x11f)]);_0x4436b0[_0x18fed2(0x15b)]&&_0x9291dc[_0x18fed2(0x127)][_0x18fed2(0x13e)](_0x4436b0),this[_0x18fed2(0x138)][_0x18fed2(0x145)](_0x4436b0[_0x18fed2(0x11f)],_0x24a7a3);}}[_0x359775(0x11d)](_0x1a1969){const _0x39a456=_0x359775,_0x427907=this[_0x39a456(0x132)][_0x39a456(0x120)][_0x39a456(0x157)](_0x39a456(0x129)),_0x5e3ffe=[...this[_0x39a456(0x132)][_0x39a456(0x152)][_0x39a456(0x157)](_0x320117)[_0x39a456(0x155)]][_0x39a456(0x11b)](_0x1868da=>_0x1868da[_0x39a456(0x14a)]===_0x427907)[_0x39a456(0x139)](_0x1b4064=>_0x1b4064[_0x39a456(0x153)]<_0x1a1969);return _0x5e3ffe<0x0||_0x5e3ffe>this[_0x39a456(0x138)][_0x39a456(0x133)]?this[_0x39a456(0x138)][_0x39a456(0x133)]:_0x5e3ffe-0x1;}[_0x359775(0x15f)](){const _0x1a01a1=_0x359775,_0x179c58=this[_0x1a01a1(0x132)],_0x44dcfa=_0x179c58[_0x1a01a1(0x152)][_0x1a01a1(0x157)](_0x1a01a1(0x136));this[_0x1a01a1(0x118)]||(this[_0x1a01a1(0x118)]=new _0x1f2d78(_0x179c58[_0x1a01a1(0x159)],this[_0x1a01a1(0x138)])),_0x1a01a1(0x158)===_0x44dcfa['id']?_0x44dcfa[_0x1a01a1(0x12b)]():_0x44dcfa[_0x1a01a1(0x14c)]({'id':_0x1a01a1(0x158),'title':_0x1d6f2c(_0x179c58[_0x1a01a1(0x159)],_0x1a01a1(0x160)),'icon':_0x29de92,'hasCloseButton':!0x0,'content':this[_0x1a01a1(0x118)],'position':_0xa9a3bf[_0x1a01a1(0x146)]});}[_0x359775(0x124)](_0x163c5a,_0x5276fe=!0x1){const _0x345792=_0x359775,_0x31ea9c=this[_0x345792(0x132)][_0x345792(0x159)],_0x1304f2=this[_0x345792(0x132)][_0x345792(0x152)][_0x345792(0x157)](_0x345792(0x136)),_0x1e436f=new _0x163c5a(_0x31ea9c);return _0x1e436f[_0x345792(0x12f)](_0x345792(0x116))['to'](this,_0x345792(0x116)),_0x1e436f[_0x345792(0x12f)](_0x345792(0x15a))['to'](_0x1304f2,'id',_0x3998b3=>_0x345792(0x158)===_0x3998b3),_0x1e436f[_0x345792(0x11c)]({'label':_0x1d6f2c(_0x31ea9c,_0x345792(0x160)),'icon':_0x29de92,'isToggleable':!0x0}),_0x5276fe&&(_0x1e436f[_0x345792(0x14e)]=!0x0),this[_0x345792(0x122)](_0x1e436f,_0x345792(0x14d),()=>this[_0x345792(0x15f)]()),_0x1e436f;}[_0x359775(0x137)]=_0x232e87=>{const _0x1c7599=_0x359775,_0x17ea2b=_0x232e87[_0x1c7599(0x13f)];if(!this[_0x1c7599(0x138)][_0x1c7599(0x141)](_0x17ea2b[_0x1c7599(0x11f)]))return;const _0x25ca4b=this[_0x1c7599(0x132)][_0x1c7599(0x152)][_0x1c7599(0x157)](_0x1c7599(0x136));_0x25ca4b[_0x1c7599(0x123)]&&_0x1c7599(0x158)===_0x25ca4b['id']&&(_0x25ca4b[_0x1c7599(0x12b)](),_0x232e87[_0x1c7599(0x134)]());};}