@ckeditor/ckeditor5-comments
Version:
Collaborative comments feature for CKEditor 5.
23 lines • 9.47 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 _0x2ee0af=_0x2379;(function(_0x4866e2,_0x2be7f5){const _0x202b2c=_0x2379,_0x39571d=_0x4866e2();while(!![]){try{const _0x4d4e8a=parseInt(_0x202b2c(0x13b))/0x1*(-parseInt(_0x202b2c(0x126))/0x2)+parseInt(_0x202b2c(0xf6))/0x3+-parseInt(_0x202b2c(0x116))/0x4+-parseInt(_0x202b2c(0x130))/0x5+parseInt(_0x202b2c(0x121))/0x6+parseInt(_0x202b2c(0x12e))/0x7*(parseInt(_0x202b2c(0x10a))/0x8)+parseInt(_0x202b2c(0x107))/0x9*(-parseInt(_0x202b2c(0x115))/0xa);if(_0x4d4e8a===_0x2be7f5)break;else _0x39571d['push'](_0x39571d['shift']());}catch(_0x207bc8){_0x39571d['push'](_0x39571d['shift']());}}}(_0x1054,0xc4ad2));import'../../theme/commentsarchive.css';import{Plugin as _0x4a6301}from'ckeditor5/src/core.js';function _0x1054(){const _0x1cf97e=['splice','hide','forEach','findIndex','isPremiumPlugin','locale','COMMENTS_ARCHIVE','246230oVsMLg','5939488fGbtAd','componentFactory','config','menuBar:commentsArchive','Dialog','view','annotationViews','_calculatePosition','EDITOR_TOP_SIDE','CommentsRepository','isOfficialPlugin','8198058rJqQKl','_handleNewThread','requires','tooltip','plugins','990082pyCRMF','source','remove','editor','collection','commentsArchive','init','channelId','217rXSxsK','push','352595AxYDUX','isOpen','stopListening','_toggleDialog','_createCommentsArchiveButton','archivedThreads','archivedAt','Annotations','set','bind','stop','1QXOoDN','_threadToController','commentsArchiveView','focusableElements','_hideDialogOnAnnotationEscape','execute','2173305MCLeQD','filter','find','innerView','getByInnerView','isEnabled','_visibleAnnotations','isVisible','pluginName','indexOf','_pendingThreads','get','menuitemcheckbox','listenTo','show','CommentsArchiveUI','add','243tEhBoE','isOn','has','369048JcKVca','escape','collaboration.channelId','length'];_0x1054=function(){return _0x1cf97e;};return _0x1054();}function _0x2379(_0x1f9a10,_0x226b5b){const _0x10549a=_0x1054();return _0x2379=function(_0x2379e3,_0x134929){_0x2379e3=_0x2379e3-0xf5;let _0x4e83c0=_0x10549a[_0x2379e3];return _0x4e83c0;},_0x2379(_0x1f9a10,_0x226b5b);}import{ViewCollection as _0x49ddbc,MenuBarMenuListItemButtonView as _0x580be8,ButtonView as _0x1f13b5,Dialog as _0x53c51c,DialogViewPosition as _0x5507c6}from'ckeditor5/src/ui.js';import _0x1e8893 from'../../theme/icons/comments-archive.svg';import{getTranslation as _0x46e393}from'../utils/common-translations.js';import _0x3321d5 from'./ui/view/commentsarchiveview.js';import _0x2beaca from'./commentsarchive.js';export default class a extends _0x4a6301{static get[_0x2ee0af(0xfe)](){const _0x26106a=_0x2ee0af;return _0x26106a(0x105);}static get[_0x2ee0af(0x120)](){return!0x0;}static get[_0x2ee0af(0x112)](){return!0x0;}static get[_0x2ee0af(0x123)](){return[_0x2beaca,_0x53c51c];}constructor(_0x31a0e4){const _0xc9c741=_0x2ee0af;super(_0x31a0e4),this[_0xc9c741(0x13f)]=_0x2c914f=>{const _0x4782ad=_0xc9c741,_0x44ecf5=_0x2c914f[_0x4782ad(0x127)];if(!this[_0x4782ad(0x11c)][_0x4782ad(0x109)](_0x44ecf5[_0x4782ad(0x11b)]))return;const _0x253846=this[_0x4782ad(0x129)][_0x4782ad(0x125)][_0x4782ad(0x101)](_0x4782ad(0x11a));_0x253846[_0x4782ad(0x131)]&&_0x4782ad(0x12b)===_0x253846['id']&&(_0x253846[_0x4782ad(0x10f)](),_0x2c914f[_0x4782ad(0x13a)]());},this[_0xc9c741(0x11c)]=new _0x49ddbc(),this[_0xc9c741(0x100)]=[];}[_0x2ee0af(0x12c)](){const _0x178896=_0x2ee0af,_0x18a8fa=this[_0x178896(0x129)],_0x1bf727=this[_0x178896(0x13f)][_0x178896(0x139)](this);_0x18a8fa['ui'][_0x178896(0x117)][_0x178896(0x106)](_0x178896(0x12b),()=>this[_0x178896(0x134)](_0x1f13b5,!0x0)),_0x18a8fa['ui'][_0x178896(0x117)][_0x178896(0x106)](_0x178896(0x119),()=>{const _0x294589=_0x178896,_0x2ef9e5=this[_0x294589(0x134)](_0x580be8);return _0x2ef9e5[_0x294589(0x138)]({'role':_0x294589(0x102)}),_0x2ef9e5;});const _0x21c96=_0x18a8fa[_0x178896(0x125)][_0x178896(0x101)](_0x2beaca),_0x300391=_0x18a8fa[_0x178896(0x125)][_0x178896(0x101)](_0x178896(0x137)),_0x4cab54=_0x18a8fa[_0x178896(0x125)][_0x178896(0x101)](_0x178896(0x11f));_0x21c96[_0x178896(0x135)][_0x178896(0x110)](_0x31b52d=>{const _0x496316=_0x178896;this[_0x496316(0x122)](_0x31b52d);}),this[_0x178896(0x103)](_0x21c96[_0x178896(0x135)],_0x178896(0x106),(_0x4e5136,_0x556da3)=>{const _0x27bb63=_0x178896;this[_0x27bb63(0x122)](_0x556da3);}),this[_0x178896(0x103)](_0x300391[_0x178896(0x12a)],_0x178896(0x106),(_0xd541,_0x23abbd)=>{const _0xbc6593=_0x178896,_0x561883=this[_0xbc6593(0x100)][_0xbc6593(0xf8)](_0x9a8150=>{const _0x8938a7=_0xbc6593,_0x101878=_0x4cab54[_0x8938a7(0x13c)][_0x8938a7(0x101)](_0x9a8150);return _0x101878&&_0x23abbd[_0x8938a7(0xf9)]===_0x101878[_0x8938a7(0x11b)];});if(_0x561883){const _0x4d6ecc=this[_0xbc6593(0x11d)](_0x561883[_0xbc6593(0x136)]);this[_0xbc6593(0x11c)][_0xbc6593(0x106)](_0x23abbd[_0xbc6593(0x11b)],_0x4d6ecc),this[_0xbc6593(0x100)][_0xbc6593(0x10e)](this[_0xbc6593(0x100)][_0xbc6593(0xff)](_0x561883),0x1);}}),this[_0x178896(0x103)](_0x21c96[_0x178896(0x135)],_0x178896(0x128),(_0x474d03,_0x4c932a)=>{const _0x10fc59=_0x178896,_0x325d0b=_0x18a8fa[_0x10fc59(0x118)][_0x10fc59(0x101)](_0x10fc59(0x10c));if(!_0x325d0b||_0x4c932a[_0x10fc59(0x12d)]===_0x325d0b){const _0x2b9fd7=_0x4cab54[_0x10fc59(0x13c)][_0x10fc59(0x101)](_0x4c932a),_0x690cc5=_0x300391[_0x10fc59(0xfa)](_0x2b9fd7[_0x10fc59(0x11b)]);this[_0x10fc59(0x11c)][_0x10fc59(0x128)](_0x690cc5[_0x10fc59(0x11b)]),this[_0x10fc59(0x132)](_0x690cc5[_0x10fc59(0x13e)]);}}),this[_0x178896(0x103)](_0x300391[_0x178896(0x12a)],_0x178896(0x106),(_0x4c71d6,_0x1f558c)=>{const _0x5cb2d6=_0x178896;this[_0x5cb2d6(0x103)](_0x1f558c,_0x5cb2d6(0x10b),_0x1bf727);}),this[_0x178896(0x103)](_0x300391[_0x178896(0x12a)],_0x178896(0x128),(_0x96d23a,_0x29c605)=>{const _0x226d36=_0x178896;this[_0x226d36(0x132)](_0x29c605,_0x226d36(0x10b),_0x1bf727);});}[_0x2ee0af(0x122)](_0x3ccc4a){const _0x45a03b=_0x2ee0af,_0x4917d6=this[_0x45a03b(0x129)][_0x45a03b(0x125)][_0x45a03b(0x101)](_0x45a03b(0x11f)),_0x355975=this[_0x45a03b(0x129)][_0x45a03b(0x125)][_0x45a03b(0x101)](_0x45a03b(0x137)),_0x2416f0=this[_0x45a03b(0x129)][_0x45a03b(0x118)][_0x45a03b(0x101)](_0x45a03b(0x10c));if(!_0x2416f0||_0x3ccc4a[_0x45a03b(0x12d)]===_0x2416f0){const _0x56a609=_0x4917d6[_0x45a03b(0x13c)][_0x45a03b(0x101)](_0x3ccc4a);if(!_0x56a609)return void this[_0x45a03b(0x100)][_0x45a03b(0x12f)](_0x3ccc4a);const _0x1a60d4=this[_0x45a03b(0x11d)](_0x3ccc4a[_0x45a03b(0x136)]),_0x32150b=_0x355975[_0x45a03b(0xfa)](_0x56a609[_0x45a03b(0x11b)]);_0x32150b[_0x45a03b(0xfd)]&&_0x355975[_0x45a03b(0xfc)][_0x45a03b(0x128)](_0x32150b),this[_0x45a03b(0x11c)][_0x45a03b(0x106)](_0x32150b[_0x45a03b(0x11b)],_0x1a60d4);}}[_0x2ee0af(0x11d)](_0x237aa4){const _0x3274f4=_0x2ee0af,_0x385bcc=this[_0x3274f4(0x129)][_0x3274f4(0x118)][_0x3274f4(0x101)](_0x3274f4(0x10c)),_0x17cdd0=[...this[_0x3274f4(0x129)][_0x3274f4(0x125)][_0x3274f4(0x101)](_0x2beaca)[_0x3274f4(0x135)]][_0x3274f4(0xf7)](_0x1c5f31=>_0x1c5f31[_0x3274f4(0x12d)]===_0x385bcc)[_0x3274f4(0x111)](_0x1c24f6=>_0x1c24f6[_0x3274f4(0x136)]<_0x237aa4);return _0x17cdd0<0x0||_0x17cdd0>this[_0x3274f4(0x11c)][_0x3274f4(0x10d)]?this[_0x3274f4(0x11c)][_0x3274f4(0x10d)]:_0x17cdd0-0x1;}[_0x2ee0af(0x133)](){const _0x5ddc9c=_0x2ee0af,_0x57fae8=this[_0x5ddc9c(0x129)],_0x2ea80d=_0x57fae8[_0x5ddc9c(0x125)][_0x5ddc9c(0x101)](_0x5ddc9c(0x11a));this[_0x5ddc9c(0x13d)]||(this[_0x5ddc9c(0x13d)]=new _0x3321d5(_0x57fae8[_0x5ddc9c(0x113)],this[_0x5ddc9c(0x11c)])),_0x5ddc9c(0x12b)===_0x2ea80d['id']?_0x2ea80d[_0x5ddc9c(0x10f)]():_0x2ea80d[_0x5ddc9c(0x104)]({'id':_0x5ddc9c(0x12b),'title':_0x46e393(_0x57fae8[_0x5ddc9c(0x113)],_0x5ddc9c(0x114)),'icon':_0x1e8893,'hasCloseButton':!0x0,'content':this[_0x5ddc9c(0x13d)],'position':_0x5507c6[_0x5ddc9c(0x11e)]});}[_0x2ee0af(0x134)](_0xe2c3bd,_0x49fedd=!0x1){const _0x39ac98=_0x2ee0af,_0x4e7a08=this[_0x39ac98(0x129)][_0x39ac98(0x113)],_0x27d836=this[_0x39ac98(0x129)][_0x39ac98(0x125)][_0x39ac98(0x101)](_0x39ac98(0x11a)),_0x247c68=new _0xe2c3bd(_0x4e7a08);return _0x247c68[_0x39ac98(0x139)](_0x39ac98(0xfb))['to'](this,_0x39ac98(0xfb)),_0x247c68[_0x39ac98(0x139)](_0x39ac98(0x108))['to'](_0x27d836,'id',_0x152fe0=>_0x39ac98(0x12b)===_0x152fe0),_0x247c68[_0x39ac98(0x138)]({'label':_0x46e393(_0x4e7a08,_0x39ac98(0x114)),'icon':_0x1e8893,'isToggleable':!0x0}),_0x49fedd&&(_0x247c68[_0x39ac98(0x124)]=!0x0),this[_0x39ac98(0x103)](_0x247c68,_0x39ac98(0xf5),()=>this[_0x39ac98(0x133)]()),_0x247c68;}}