@ckeditor/ckeditor5-comments
Version:
Collaborative comments feature for CKEditor 5.
23 lines • 9.7 kB
JavaScript
/*
* Copyright (c) 2003-2026, 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. |
* | |
* | |
* +---------------------------------------------------------------------------------+
*
*
*
*
*/
function _0x4697(){const _0x49c76a=['editorReady','enter','COMMENT_ARIA_LABEL','cancel','submit','EXTERNAL_IMPORT_WORD_COMMENT','updateComment','destroy','focusFirst','2340330BFyEYR','editorConfig','added','parseFromString','focusTracker','disabledSubmit','isCollapsed','_createCommentInputView','body','target','createCollection','EXTERNAL_AVATAR','5148590rzOcLD','initialData','add','createEditor','isEditMode','292594viJCHT','submitLabel','content','remove','switchToEditMode','delegate','importWord','ariaLabel','bind','7OjhsmR','removed','collapse','_setupKeyboardNavigation','switchToDisplayMode','4510708dKiPHP','COMMENT_THREAD_DESCRIPTION','listenTo','isSystemComment','965794bvVZGb','focusables','esc','expand','creator','set','authoredAt','fire','text/html','isExternal','focus','7464008XKuCgx','tab','visibleView','getUserViewNotificationText','formatDateTime','3004044NgCzdV','source','ariaDescriptionView','locale','shift+tab','once','keystrokes','_config','focusCycler','EXTERNAL_IMPORT_WORD_AVATAR','EXTERNAL_COMMENT','_createCommentContentView','isReadOnly','author','value','getExternalCommentNote','render','textContent','name','stopListening','_model','element','get','attributes','Save','maxCommentCharsWhenCollapsed','change','editorDestroyed','@external'];_0x4697=function(){return _0x49c76a;};return _0x4697();}const _0x46a8b9=_0x5aa9;(function(_0x1d67a5,_0x11743e){const _0x57fcb5=_0x5aa9,_0x5d33c3=_0x1d67a5();while(!![]){try{const _0x2204a5=parseInt(_0x57fcb5(0xf3))/0x1+parseInt(_0x57fcb5(0x13a))/0x2+-parseInt(_0x57fcb5(0x103))/0x3+parseInt(_0x57fcb5(0xef))/0x4+parseInt(_0x57fcb5(0x135))/0x5+-parseInt(_0x57fcb5(0x129))/0x6+parseInt(_0x57fcb5(0x143))/0x7*(-parseInt(_0x57fcb5(0xfe))/0x8);if(_0x2204a5===_0x11743e)break;else _0x5d33c3['push'](_0x5d33c3['shift']());}catch(_0x4cec6f){_0x5d33c3['push'](_0x5d33c3['shift']());}}}(_0x4697,0xe6bba));import{View as _0x4a372e,ViewCollection as _0x578e2d,FocusCycler as _0x5be650}from'ckeditor5/src/ui.js';import{FocusTracker as _0x3cb3fc,KeystrokeHandler as _0x4d96fa}from'ckeditor5/src/utils.js';import{AriaDescriptionView as _0x5c8748,trimHtml as _0x26afef}from'ckeditor5-collaboration/src/collaboration-core.js';import{CommentContentView as _0x458b39}from'./commentcontentview.js';import{CommentInputView as _0x58dea3}from'./commentinputview.js';import{getTranslation as _0x3c438a}from'../../../utils/common-translations.js';function _0x5aa9(_0xbe2b2b,_0x112e63){const _0x46972c=_0x4697();return _0x5aa9=function(_0x5aa92e,_0x1e230a){_0x5aa92e=_0x5aa92e-0xed;let _0x93111d=_0x46972c[_0x5aa92e];return _0x93111d;},_0x5aa9(_0xbe2b2b,_0x112e63);}export class BaseCommentView extends _0x4a372e{[_0x46a8b9(0x100)];[_0x46a8b9(0x105)];[_0x46a8b9(0xf4)];[_0x46a8b9(0x12d)];[_0x46a8b9(0x109)];[_0x46a8b9(0x10b)];[_0x46a8b9(0x117)];[_0x46a8b9(0x10a)];constructor(_0x3a3bf1,_0x5d4115,_0x21e968){const _0x3b1abd=_0x46a8b9;super(_0x3a3bf1),this[_0x3b1abd(0x117)]=_0x5d4115,this[_0x3b1abd(0x10a)]=_0x21e968,this[_0x3b1abd(0xf2)]=!!this[_0x3b1abd(0x10a)][_0x3b1abd(0xf2)],this[_0x3b1abd(0xf8)](_0x3b1abd(0x139),!0x1),this[_0x3b1abd(0xf8)](_0x3b1abd(0x12f),!0x0),this[_0x3b1abd(0x142)](_0x3b1abd(0x141))['to'](_0x5d4115,_0x3b1abd(0x13c),_0x5d4115,_0x3b1abd(0xf9),(_0x27af25,_0x2cafa7)=>_0x3c438a(_0x3a3bf1,_0x3b1abd(0x122),[_0x5d4115[_0x3b1abd(0x110)][_0x3b1abd(0x115)],_0x21e968[_0x3b1abd(0x102)](_0x2cafa7),new DOMParser()[_0x3b1abd(0x12c)](_0x27af25,_0x3b1abd(0xfb))[_0x3b1abd(0x131)][_0x3b1abd(0x114)],_0x5d4115[_0x3b1abd(0xfc)]?this[_0x3b1abd(0x112)]():''])),this[_0x3b1abd(0x105)]=new _0x5c8748(_0x3a3bf1,_0x3c438a(_0x3a3bf1,_0x3b1abd(0xf0))),this[_0x3b1abd(0x100)]=this[_0x3b1abd(0x133)](),this[_0x3b1abd(0x100)][_0x3b1abd(0x137)](this[_0x3b1abd(0x10e)]()),this[_0x3b1abd(0xf4)]=new _0x578e2d(),this[_0x3b1abd(0x12d)]=new _0x3cb3fc(),this[_0x3b1abd(0x109)]=new _0x4d96fa(),this[_0x3b1abd(0x10b)]=new _0x5be650({'focusables':this[_0x3b1abd(0xf4)],'focusTracker':this[_0x3b1abd(0x12d)],'keystrokeHandler':this[_0x3b1abd(0x109)],'keystrokeHandlerOptions':{'filter':_0x329a44=>_0x329a44[_0x3b1abd(0x132)]!==this[_0x3b1abd(0x118)]},'actions':{'focusPrevious':_0x3b1abd(0x107),'focusNext':_0x3b1abd(0xff)}});}[_0x46a8b9(0xf6)](){const _0x4feae7=_0x46a8b9;this[_0x4feae7(0x12f)]=!0x1;}[_0x46a8b9(0x145)](){const _0x4dcfd3=_0x46a8b9;this[_0x4dcfd3(0x139)]||(this[_0x4dcfd3(0x12f)]=!0x0);}[_0x46a8b9(0xfd)](){const _0x213b86=_0x46a8b9;this[_0x213b86(0x118)][_0x213b86(0xfd)]();}[_0x46a8b9(0x113)](){const _0x5810d8=_0x46a8b9;super[_0x5810d8(0x113)](),this[_0x5810d8(0xed)]();}async[_0x46a8b9(0x127)](){const _0x1b896e=_0x46a8b9;await this[_0x1b896e(0x100)][_0x1b896e(0x119)](0x0)[_0x1b896e(0x127)](),super[_0x1b896e(0x127)]();}[_0x46a8b9(0x13e)](){const _0x2eef84=_0x46a8b9;this[_0x2eef84(0x139)]||(this[_0x2eef84(0x139)]=!0x0,this[_0x2eef84(0x100)][_0x2eef84(0x13d)](0x0)[_0x2eef84(0x127)](),this[_0x2eef84(0x100)][_0x2eef84(0x137)](this[_0x2eef84(0x130)]()));}[_0x46a8b9(0xee)](){const _0x52fef7=_0x46a8b9;this[_0x52fef7(0x139)]&&(this[_0x52fef7(0x139)]=!0x1,this[_0x52fef7(0x100)][_0x52fef7(0x13d)](0x0)[_0x52fef7(0x127)](),this[_0x52fef7(0x100)][_0x52fef7(0x137)](this[_0x52fef7(0x10e)]()));}[_0x46a8b9(0x112)](){const _0x15f484=_0x46a8b9;return _0x15f484(0x140)===this[_0x15f484(0x117)][_0x15f484(0x11a)][_0x15f484(0x11f)][_0x15f484(0x104)]?_0x3c438a(this[_0x15f484(0x106)],_0x15f484(0x125)):_0x3c438a(this[_0x15f484(0x106)],_0x15f484(0x10d));}[_0x46a8b9(0x101)](){const _0x5b3347=_0x46a8b9;return this[_0x5b3347(0x117)][_0x5b3347(0xfc)]?_0x5b3347(0x140)===this[_0x5b3347(0x117)][_0x5b3347(0x11a)][_0x5b3347(0x11f)][_0x5b3347(0x104)]?_0x3c438a(this[_0x5b3347(0x106)],_0x5b3347(0x10c),this[_0x5b3347(0x117)][_0x5b3347(0xf7)][_0x5b3347(0x115)]):_0x3c438a(this[_0x5b3347(0x106)],_0x5b3347(0x134),this[_0x5b3347(0x117)][_0x5b3347(0xf7)][_0x5b3347(0x115)]):null;}[_0x46a8b9(0x10e)](){const _0x26988b=_0x46a8b9,_0x14caef=new _0x458b39(this[_0x26988b(0x106)]);return _0x14caef[_0x26988b(0x142)](_0x26988b(0x13c))['to'](this[_0x26988b(0x117)],_0x26988b(0x13c),this,_0x26988b(0x12f),(_0x1554d4,_0x4cc276)=>_0x4cc276?_0x26afef(_0x1554d4,{'limit':this[_0x26988b(0x10a)][_0x26988b(0x11c)]}):_0x1554d4),_0x14caef;}[_0x46a8b9(0x130)](){const _0x7df8a6=_0x46a8b9;this[_0x7df8a6(0x10a)][_0x7df8a6(0x12a)]||(this[_0x7df8a6(0x10a)][_0x7df8a6(0x12a)]={}),this[_0x7df8a6(0x10a)][_0x7df8a6(0x12a)][_0x7df8a6(0x136)]=this[_0x7df8a6(0x117)][_0x7df8a6(0x13c)];const _0x36144b=new _0x58dea3(this[_0x7df8a6(0x106)],this[_0x7df8a6(0x10a)][_0x7df8a6(0x12a)]);return _0x36144b[_0x7df8a6(0x111)]=this[_0x7df8a6(0x117)][_0x7df8a6(0x13c)],_0x36144b[_0x7df8a6(0x142)](_0x7df8a6(0x12e))['to'](this[_0x7df8a6(0x117)],_0x7df8a6(0x10f)),_0x36144b[_0x7df8a6(0x13b)]=_0x3c438a(this[_0x7df8a6(0x106)],_0x7df8a6(0x11b)),_0x36144b['on'](_0x7df8a6(0x124),(_0x27fecf,_0xaa682a)=>{const _0x1af1e2=_0x7df8a6;this[_0x1af1e2(0xfa)](_0x1af1e2(0x126),this[_0x1af1e2(0x117)]['id'],_0xaa682a),this[_0x1af1e2(0xee)](),this[_0x1af1e2(0xfd)]();}),_0x36144b['on'](_0x7df8a6(0x123),()=>{const _0x14eb9f=_0x7df8a6;this[_0x14eb9f(0xee)](),this[_0x14eb9f(0xfd)]();}),_0x36144b[_0x7df8a6(0x108)](_0x7df8a6(0x120),()=>{const _0x28615e=_0x7df8a6;_0x36144b[_0x28615e(0xfd)]();}),_0x36144b[_0x7df8a6(0x138)](),_0x36144b[_0x7df8a6(0x13f)](_0x7df8a6(0x120))['to'](this),_0x36144b[_0x7df8a6(0x13f)](_0x7df8a6(0x11e))['to'](this),_0x36144b;}[_0x46a8b9(0xed)](){const _0x3d3d5e=_0x46a8b9,_0x3b5813=this[_0x3d3d5e(0x118)];this[_0x3d3d5e(0x109)][_0x3d3d5e(0xf1)](_0x3b5813);for(const _0x9003d5 of this[_0x3d3d5e(0xf4)])this[_0x3d3d5e(0x12d)][_0x3d3d5e(0x137)](_0x9003d5[_0x3d3d5e(0x118)]),this[_0x3d3d5e(0x109)][_0x3d3d5e(0xf1)](_0x9003d5[_0x3d3d5e(0x118)]);this[_0x3d3d5e(0xf4)]['on'](_0x3d3d5e(0x11d),(_0x19f4c5,_0x38e082)=>{const _0x1407d2=_0x3d3d5e;for(const _0x312018 of _0x38e082[_0x1407d2(0x144)])this[_0x1407d2(0x12d)][_0x1407d2(0x13d)](_0x312018[_0x1407d2(0x118)]),this[_0x1407d2(0x109)][_0x1407d2(0x116)](_0x312018[_0x1407d2(0x118)]);for(const _0x3d2972 of _0x38e082[_0x1407d2(0x12b)])this[_0x1407d2(0x12d)][_0x1407d2(0x137)](_0x3d2972[_0x1407d2(0x118)]),this[_0x1407d2(0x109)][_0x1407d2(0xf1)](_0x3d2972[_0x1407d2(0x118)]);}),this[_0x3d3d5e(0x109)][_0x3d3d5e(0xf8)](_0x3d3d5e(0x121),(_0x1c5e3a,_0x2bd0ce)=>{const _0x40be7e=_0x3d3d5e;_0x3b5813===_0x1c5e3a[_0x40be7e(0x132)]&&(this[_0x40be7e(0x10b)][_0x40be7e(0x128)](),_0x2bd0ce());}),this[_0x3d3d5e(0x109)][_0x3d3d5e(0xf8)](_0x3d3d5e(0xf5),(_0x1df076,_0x397103)=>{const _0x2bfedc=_0x3d3d5e;_0x3b5813!==_0x1df076[_0x2bfedc(0x132)]&&(this[_0x2bfedc(0xfd)](),_0x397103());});}}