UNPKG

@ckeditor/ckeditor5-comments

Version:

Collaborative comments feature for CKEditor 5.

24 lines • 11.9 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 _0x34b8cd=_0x444a;function _0x3614(){const _0x4f6d7c=['placeholder','_model','some','1422404RkEksk','push','set','dropdown','getTemplate','focus','ariaDescriptionView','resolvedAt','icon','isEditable','ck-comment','142IqwWZw','Reply...','ck-comment--edit','div','locale','ck-comment__actions','isEditMode','remove','switchToEditMode','ck-comment__user','ck-annotation__content-wrapper','listitem','20tMobFG','render','1911726OFCfiq','8325438guXFJg','9216872qTQZnd','editButton','change:isRemovable','isReadOnly','isSystemComment','actionBar','find','isVisible','execute','setTemplate','removeComment','time','toMany','ck-comment__info-name','extendTemplate','showConfirm','formatDateTime','addMany','ck-annotation__actions--hidden','add','_createCommentInputView','label','ck-comment__main','ck-annotation__main','items','focusables','from','buttonView','visibleView','ck-comment__info-time','3OvafSg','_createEditButton','ck-annotation__user','removeButton','Remove','ck-comment__info','then','_createRemoveButton','Delete\x20comment?','bindTemplate','ariaLabel','ck-comment__external','ck-annotation__info-name','edit','Edit','cancelConfirm','userView','_createDropdown','ck-comment--remove-confirmation','author','getUserViewNotificationText','blur','7waWnQL','panelPosition','ck-comment__wrapper','createCollection','isEnabled','_config','ck-annotation','bind','span','Show\x20more\x20items','listenTo','mouseenter','unbind','isExternal','ck-hidden','getExternalCommentNote','element','actionIndicator','ck-comment--','ck-annotation__actions','2196650rlXdbV','fire','mouseleave','panelView','name','isRemovable','ck-annotation__info-time','length','ck-annotation__info','4861SaPRzl','ck-comment--remove','withText','authoredAt','children','ck-comment__actions--hidden','ck-comment--info','group','_attachActions','isConfirm','15053885CRhEgQ'];_0x3614=function(){return _0x4f6d7c;};return _0x3614();}(function(_0x1131d1,_0x49c9e9){const _0x16bd23=_0x444a,_0x5958c4=_0x1131d1();while(!![]){try{const _0x1746dd=-parseInt(_0x16bd23(0x15b))/0x1*(-parseInt(_0x16bd23(0xfa))/0x2)+-parseInt(_0x16bd23(0x128))/0x3*(parseInt(_0x16bd23(0x169))/0x4)+-parseInt(_0x16bd23(0x152))/0x5+-parseInt(_0x16bd23(0x109))/0x6*(-parseInt(_0x16bd23(0x13e))/0x7)+-parseInt(_0x16bd23(0x10a))/0x8+-parseInt(_0x16bd23(0x108))/0x9*(parseInt(_0x16bd23(0x106))/0xa)+parseInt(_0x16bd23(0x165))/0xb;if(_0x1746dd===_0x49c9e9)break;else _0x5958c4['push'](_0x5958c4['shift']());}catch(_0x1e347e){_0x5958c4['push'](_0x5958c4['shift']());}}}(_0x3614,0xb211b));import{IconRemoveComment as _0x5028b9,IconPencil as _0x1c9a7f,IconThreeVerticalDots as _0x33f61b}from'ckeditor5/src/icons.js';function _0x444a(_0x111a8c,_0x4a4966){const _0x361425=_0x3614();return _0x444a=function(_0x444a15,_0x3db05c){_0x444a15=_0x444a15-0xf1;let _0x50958a=_0x361425[_0x444a15];return _0x50958a;},_0x444a(_0x111a8c,_0x4a4966);}import{ButtonView as _0x6fa16b,createDropdown as _0x3cc061,ListView as _0x2320d1,ListItemView as _0xc45c0f,focusChildOnDropdownOpen as _0x1666b8}from'ckeditor5/src/ui.js';import{UserView as _0x33336d,ConfirmMixin as _0x1ef429,LateFocusDropdownButtonView as _0x32af96}from'ckeditor5-collaboration/src/collaboration-core.js';import _0x20cc85 from'./basecommentview.js';import{getTranslation as _0x1cc754}from'../../../utils/common-translations.js';export default class gt extends/* #__PURE__ -- @preserve */ _0x1ef429(_0x20cc85){[_0x34b8cd(0x10f)];[_0x34b8cd(0x138)];constructor(_0x5f39db,_0x2efd7d,_0x240f73){const _0x239c1d=_0x34b8cd;super(_0x5f39db,_0x2efd7d,_0x240f73),this[_0x239c1d(0xf1)](_0x239c1d(0x14f),null),this[_0x239c1d(0xf1)](_0x239c1d(0x166),_0x1cc754(_0x5f39db,_0x239c1d(0xfb))),this[_0x239c1d(0x145)](_0x239c1d(0x15e))['to'](_0x2efd7d),this[_0x239c1d(0x145)](_0x239c1d(0xf6))['to'](_0x2efd7d),this[_0x239c1d(0x10f)]=this[_0x239c1d(0x141)](),this[_0x239c1d(0x10e)]||(this[_0x239c1d(0x10b)]=this[_0x239c1d(0x129)](),this[_0x239c1d(0x12b)]=this[_0x239c1d(0x12f)](),this[_0x239c1d(0x122)]=this[_0x239c1d(0x141)](),this[_0x239c1d(0x122)][_0x239c1d(0x11b)]([this[_0x239c1d(0x10b)],this[_0x239c1d(0x12b)]]),this[_0x239c1d(0xf2)]=this[_0x239c1d(0x139)](),this[_0x239c1d(0x10f)][_0x239c1d(0x11d)](this[_0x239c1d(0xf2)]),this[_0x239c1d(0x123)][_0x239c1d(0x11d)](this[_0x239c1d(0xf2)])),this[_0x239c1d(0x138)]=new _0x33336d(_0x5f39db,_0x2efd7d[_0x239c1d(0x13b)],this[_0x239c1d(0x13c)]()),this[_0x239c1d(0x138)][_0x239c1d(0x118)]({'attributes':{'class':[_0x239c1d(0x103),_0x239c1d(0x12a)],'aria-hidden':!0x0}}),this[_0x239c1d(0x148)](_0x2efd7d,_0x239c1d(0x10c),()=>this[_0x239c1d(0x137)]()),this[_0x239c1d(0x113)](this[_0x239c1d(0xf3)]());}[_0x34b8cd(0xf3)](){const _0x534e0d=_0x34b8cd,_0x29c914=this[_0x534e0d(0x131)],_0x2d475=[{'tag':_0x534e0d(0xfd),'attributes':{'class':[_0x534e0d(0x12d),_0x534e0d(0x15a)]},'children':[{'tag':_0x534e0d(0x146),'children':[{'text':this[_0x534e0d(0x138)][_0x534e0d(0x156)]}],'attributes':{'class':[_0x534e0d(0x117),_0x534e0d(0x134)],'data-cke-tooltip-text':this[_0x534e0d(0x138)][_0x534e0d(0x156)]}},{'tag':_0x534e0d(0x115),'attributes':{'datetime':_0x29c914['to'](_0x534e0d(0x15e)),'class':[_0x534e0d(0x127),_0x534e0d(0x158)]},'children':[{'text':_0x29c914['to'](_0x534e0d(0x15e),_0x3a21ad=>this[_0x534e0d(0x143)][_0x534e0d(0x11a)](_0x3a21ad))}]}]},{'tag':_0x534e0d(0xfd),'attributes':{'class':[_0x534e0d(0xff),_0x534e0d(0x151),_0x29c914['if'](_0x534e0d(0x100),_0x534e0d(0x160)),_0x29c914['if'](_0x534e0d(0x100),_0x534e0d(0x11c))]},'children':this[_0x534e0d(0x10f)]},{'tag':_0x534e0d(0xfd),'attributes':{'class':[_0x534e0d(0x104)]},'children':this[_0x534e0d(0x126)]},this[_0x534e0d(0xf5)]];return this[_0x534e0d(0x167)][_0x534e0d(0x14b)]&&_0x2d475[_0x534e0d(0x16a)]({'tag':_0x534e0d(0xfd),'attributes':{'class':[_0x534e0d(0x133)]},'children':[{'text':this[_0x534e0d(0x14d)]()}]}),{'tag':'li','attributes':{'class':[_0x534e0d(0x140),_0x29c914['if'](_0x534e0d(0x164),_0x534e0d(0x13a))],'tabindex':-0x1,'aria-label':_0x29c914['to'](_0x534e0d(0x132)),'aria-describedby':this[_0x534e0d(0xf5)]['id'],'role':_0x534e0d(0x105)},'children':[{'tag':_0x534e0d(0xfd),'attributes':{'class':[_0x534e0d(0xf9),_0x534e0d(0x144),_0x29c914['if'](_0x534e0d(0x100),_0x534e0d(0xfc)),_0x29c914['if'](_0x534e0d(0x10e),_0x534e0d(0x161)),_0x29c914['to'](_0x534e0d(0x14f),_0x370c32=>_0x370c32?_0x534e0d(0x150)+_0x370c32:'')],'data-author-id':this[_0x534e0d(0x167)][_0x534e0d(0x13b)]['id'],'data-comment-id':this[_0x534e0d(0x167)]['id'],'role':_0x534e0d(0x162)},'children':[this[_0x534e0d(0x138)],{'tag':_0x534e0d(0xfd),'attributes':{'class':[_0x534e0d(0x120),_0x534e0d(0x121)]},'children':_0x2d475}]}]};}[_0x34b8cd(0x129)](){const _0x4dda81=_0x34b8cd,_0x58a680=new _0x6fa16b(this[_0x4dda81(0xfe)]);return _0x58a680[_0x4dda81(0x11f)]=_0x1cc754(this[_0x4dda81(0xfe)],_0x4dda81(0x136)),_0x58a680[_0x4dda81(0xf7)]=_0x1c9a7f,_0x58a680[_0x4dda81(0x15d)]=!0x0,_0x58a680[_0x4dda81(0x118)]({'attributes':{'class':_0x4dda81(0xfc)}}),_0x58a680[_0x4dda81(0x145)](_0x4dda81(0x142))['to'](this[_0x4dda81(0x167)],_0x4dda81(0x10d),_0x5cfb2b=>!_0x5cfb2b),_0x58a680[_0x4dda81(0x145)](_0x4dda81(0x111))['to'](this[_0x4dda81(0x167)],_0x4dda81(0xf8)),_0x58a680['on'](_0x4dda81(0x112),()=>this[_0x4dda81(0x102)]()),_0x58a680;}[_0x34b8cd(0x12f)](){const _0x51cbee=_0x34b8cd,_0x4a8b20=new _0x6fa16b(this[_0x51cbee(0xfe)]);return _0x4a8b20[_0x51cbee(0x11f)]=_0x1cc754(this[_0x51cbee(0xfe)],_0x51cbee(0x12c)),_0x4a8b20[_0x51cbee(0xf7)]=_0x5028b9,_0x4a8b20[_0x51cbee(0x15d)]=!0x0,_0x4a8b20[_0x51cbee(0x118)]({'attributes':{'class':_0x51cbee(0x15c)}}),_0x4a8b20[_0x51cbee(0x145)](_0x51cbee(0x142))['to'](this[_0x51cbee(0x167)],_0x51cbee(0x10d),_0x2eddb6=>!_0x2eddb6),_0x4a8b20[_0x51cbee(0x145)](_0x51cbee(0x111))['to'](this[_0x51cbee(0x167)],_0x51cbee(0x157)),_0x4a8b20['on'](_0x51cbee(0x112),()=>{const _0x173ccc=_0x51cbee;this[_0x173ccc(0x119)](_0x1cc754(this[_0x173ccc(0xfe)],_0x173ccc(0x130)),this[_0x173ccc(0x14e)])[_0x173ccc(0x12e)](()=>{const _0xb2c81e=_0x173ccc;this[_0xb2c81e(0x153)](_0xb2c81e(0x114),this[_0xb2c81e(0x167)]['id']);});}),_0x4a8b20;}[_0x34b8cd(0x139)](){const _0x1c3523=_0x34b8cd,_0x10cc8d=_0x3cc061(this[_0x1c3523(0xfe)],_0x32af96),_0x46cd67=_0x10cc8d[_0x1c3523(0x155)][_0x1c3523(0x15f)],_0x7c3274=new _0x2320d1(this[_0x1c3523(0xfe)]),_0x4195d7=_0x10cc8d[_0x1c3523(0x131)];_0x1666b8(_0x10cc8d,()=>this[_0x1c3523(0x122)][_0x1c3523(0x110)](_0xdb93=>_0xdb93[_0x1c3523(0x111)])),_0x10cc8d[_0x1c3523(0x118)]({'attributes':{'class':[_0x4195d7['if'](_0x1c3523(0x111),_0x1c3523(0x14c),_0x11f48a=>!_0x11f48a)]}});const _0x5ecfe7=(_0x5587c6,_0x2deb45=-0x1)=>{const _0xf8bc8e=_0x1c3523,_0xe657d3=new _0xc45c0f(this[_0xf8bc8e(0xfe)]);_0xe657d3[_0xf8bc8e(0x15f)][_0xf8bc8e(0x11d)](_0x5587c6);const _0xa3a372=_0x2deb45>-0x1?_0x2deb45:_0x7c3274[_0xf8bc8e(0x122)][_0xf8bc8e(0x159)];_0x7c3274[_0xf8bc8e(0x122)][_0xf8bc8e(0x11d)](_0xe657d3,_0xa3a372);const _0x5f215d=Array[_0xf8bc8e(0x124)](this[_0xf8bc8e(0x122)]);_0x10cc8d[_0xf8bc8e(0x14a)](_0xf8bc8e(0x142),_0xf8bc8e(0x111)),_0x10cc8d[_0xf8bc8e(0x145)](_0xf8bc8e(0x142))[_0xf8bc8e(0x116)](_0x5f215d,_0xf8bc8e(0x142),(..._0x3a19fb)=>_0x3a19fb[_0xf8bc8e(0x168)](_0x5dfe3d=>_0x5dfe3d)),_0x10cc8d[_0xf8bc8e(0x145)](_0xf8bc8e(0x111))[_0xf8bc8e(0x116)](_0x5f215d,_0xf8bc8e(0x111),(..._0x12ec14)=>_0x12ec14[_0xf8bc8e(0x168)](_0xc5d359=>_0xc5d359));};_0x10cc8d[_0x1c3523(0x13f)]='sw',_0x10cc8d[_0x1c3523(0x125)][_0x1c3523(0xf1)]({'label':_0x1cc754(this[_0x1c3523(0xfe)],_0x1c3523(0x147)),'icon':_0x33f61b});for(const _0x5cb0dd of this[_0x1c3523(0x122)])_0x5ecfe7(_0x5cb0dd);return _0x46cd67[_0x1c3523(0x11d)](_0x7c3274),_0x10cc8d[_0x1c3523(0x148)](this[_0x1c3523(0x122)],_0x1c3523(0x11d),(_0x7896b8,_0x38272a,_0xbd0c2e)=>{_0x5ecfe7(_0x38272a,_0xbd0c2e);}),_0x10cc8d[_0x1c3523(0x148)](this[_0x1c3523(0x122)],_0x1c3523(0x101),(_0x365c41,_0x3bb194,_0x51f599)=>{const _0x370a02=_0x1c3523;_0x7c3274[_0x370a02(0x122)][_0x370a02(0x101)](_0x51f599);}),_0x10cc8d;}[_0x34b8cd(0x163)](_0x4ba30e,_0x10ceec){const _0xe27308=_0x34b8cd,_0xe69f9f=_0x4ba30e&&_0x4ba30e[_0xe27308(0x14e)];_0xe69f9f&&(this[_0xe27308(0x148)](_0xe69f9f,_0xe27308(0x149),()=>this[_0xe27308(0x14f)]=_0x10ceec),this[_0xe27308(0x148)](_0xe69f9f,_0xe27308(0xf4),()=>this[_0xe27308(0x14f)]=_0x10ceec),this[_0xe27308(0x148)](_0xe69f9f,_0xe27308(0x154),()=>this[_0xe27308(0x14f)]=null),this[_0xe27308(0x148)](_0xe69f9f,_0xe27308(0x13d),()=>this[_0xe27308(0x14f)]=null));}[_0x34b8cd(0x11e)](){const _0xae18c7=_0x34b8cd,_0x358bd0=super[_0xae18c7(0x11e)]();return _0x358bd0[_0xae18c7(0x145)](_0xae18c7(0x166))['to'](this),_0x358bd0;}[_0x34b8cd(0x107)](){const _0x2f031c=_0x34b8cd;super[_0x2f031c(0x107)](),this[_0x2f031c(0x163)](this[_0x2f031c(0x10b)],_0x2f031c(0x135)),this[_0x2f031c(0x163)](this[_0x2f031c(0x12b)],_0x2f031c(0x101));}}