UNPKG

@ckeditor/ckeditor5-comments

Version:

Collaborative comments feature for CKEditor 5.

23 lines • 9.76 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 _0x397db0=_0x227f;(function(_0x27587c,_0x1ab60f){const _0x3638d5=_0x227f,_0xa09b1e=_0x27587c();while(!![]){try{const _0x259045=parseInt(_0x3638d5(0x104))/0x1+parseInt(_0x3638d5(0x116))/0x2+-parseInt(_0x3638d5(0x144))/0x3*(parseInt(_0x3638d5(0x114))/0x4)+-parseInt(_0x3638d5(0x137))/0x5*(parseInt(_0x3638d5(0x132))/0x6)+parseInt(_0x3638d5(0x143))/0x7+-parseInt(_0x3638d5(0x140))/0x8*(parseInt(_0x3638d5(0x13b))/0x9)+parseInt(_0x3638d5(0x124))/0xa;if(_0x259045===_0x1ab60f)break;else _0xa09b1e['push'](_0xa09b1e['shift']());}catch(_0xffd202){_0xa09b1e['push'](_0xa09b1e['shift']());}}}(_0xaa55,0xe7b52));import{View as _0x1a583f,ViewCollection as _0x44d65d,FocusCycler as _0x297171}from'ckeditor5/src/ui.js';import{FocusTracker as _0x22b197,KeystrokeHandler as _0x237498}from'ckeditor5/src/utils.js';function _0xaa55(){const _0x58b171=['editorConfig','14449430CGkRdy','destroy','getUserViewNotificationText','focusTracker','_setupKeyboardNavigation','parseFromString','render','listenTo','_createCommentInputView','isSystemComment','locale','added','tab','once','6978HSSAGI','textContent','switchToEditMode','delegate','createEditor','5270UoielW','value','formatDateTime','editorReady','38511KExBaz','fire','author','maxCommentCharsWhenCollapsed','content','3048Gzorir','target','importWord','12656973lUQJDR','2480412yHhBGw','isExternal','focus','focusFirst','editorDestroyed','remove','_model','source','visibleView','change','creator','authoredAt','getExternalCommentNote','add','Save','removed','@external','attributes','get','initialData','body','shift+tab','submit','EXTERNAL_IMPORT_WORD_AVATAR','element','esc','EXTERNAL_COMMENT','1254214iPHWUI','isEditMode','bind','disabledSubmit','enter','collapse','isReadOnly','stopListening','ariaLabel','switchToDisplayMode','text/html','set','focusCycler','keystrokes','EXTERNAL_AVATAR','_createCommentContentView','4DsfTFF','ariaDescriptionView','249366KKCePq','submitLabel','focusables','isCollapsed','EXTERNAL_IMPORT_WORD_COMMENT','expand','COMMENT_ARIA_LABEL','cancel','COMMENT_THREAD_DESCRIPTION','createCollection','updateComment','_config','name'];_0xaa55=function(){return _0x58b171;};return _0xaa55();}function _0x227f(_0x5c9ca2,_0x53893f){const _0xaa55e7=_0xaa55();return _0x227f=function(_0x227fd0,_0x2521f2){_0x227fd0=_0x227fd0-0xeb;let _0x3157d9=_0xaa55e7[_0x227fd0];return _0x3157d9;},_0x227f(_0x5c9ca2,_0x53893f);}import{AriaDescriptionView as _0x5029ce,trimHtml as _0x5bfab7}from'ckeditor5-collaboration/src/collaboration-core.js';import{CommentContentView as _0x50bfdb}from'./commentcontentview.js';import{CommentInputView as _0x232b71}from'./commentinputview.js';import{getTranslation as _0x3a621d}from'../../../utils/common-translations.js';export class BaseCommentView extends _0x1a583f{[_0x397db0(0xf1)];[_0x397db0(0x115)];[_0x397db0(0x118)];[_0x397db0(0x127)];[_0x397db0(0x111)];[_0x397db0(0x110)];[_0x397db0(0xef)];[_0x397db0(0x121)];constructor(_0x3cb402,_0xbb24a2,_0x5c07d6){const _0x53aaea=_0x397db0;super(_0x3cb402),this[_0x53aaea(0xef)]=_0xbb24a2,this[_0x53aaea(0x121)]=_0x5c07d6,this[_0x53aaea(0x12d)]=!!this[_0x53aaea(0x121)][_0x53aaea(0x12d)],this[_0x53aaea(0x10f)](_0x53aaea(0x105),!0x1),this[_0x53aaea(0x10f)](_0x53aaea(0x119),!0x0),this[_0x53aaea(0x106)](_0x53aaea(0x10c))['to'](_0xbb24a2,_0x53aaea(0x13f),_0xbb24a2,_0x53aaea(0xf4),(_0xfc734b,_0x97be11)=>_0x3a621d(_0x3cb402,_0x53aaea(0x11c),[_0xbb24a2[_0x53aaea(0x13d)][_0x53aaea(0x122)],_0x5c07d6[_0x53aaea(0x139)](_0x97be11),new DOMParser()[_0x53aaea(0x129)](_0xfc734b,_0x53aaea(0x10e))[_0x53aaea(0xfd)][_0x53aaea(0x133)],_0xbb24a2[_0x53aaea(0x145)]?this[_0x53aaea(0xf5)]():''])),this[_0x53aaea(0x115)]=new _0x5029ce(_0x3cb402,_0x3a621d(_0x3cb402,_0x53aaea(0x11e))),this[_0x53aaea(0xf1)]=this[_0x53aaea(0x11f)](),this[_0x53aaea(0xf1)][_0x53aaea(0xf6)](this[_0x53aaea(0x113)]()),this[_0x53aaea(0x118)]=new _0x44d65d(),this[_0x53aaea(0x127)]=new _0x22b197(),this[_0x53aaea(0x111)]=new _0x237498(),this[_0x53aaea(0x110)]=new _0x297171({'focusables':this[_0x53aaea(0x118)],'focusTracker':this[_0x53aaea(0x127)],'keystrokeHandler':this[_0x53aaea(0x111)],'keystrokeHandlerOptions':{'filter':_0xff699a=>_0xff699a[_0x53aaea(0x141)]!==this[_0x53aaea(0x101)]},'actions':{'focusPrevious':_0x53aaea(0xfe),'focusNext':_0x53aaea(0x130)}});}[_0x397db0(0x11b)](){const _0xb9c3b8=_0x397db0;this[_0xb9c3b8(0x119)]=!0x1;}[_0x397db0(0x109)](){const _0x3a4990=_0x397db0;this[_0x3a4990(0x105)]||(this[_0x3a4990(0x119)]=!0x0);}[_0x397db0(0xeb)](){const _0x1e34a7=_0x397db0;this[_0x1e34a7(0x101)][_0x1e34a7(0xeb)]();}[_0x397db0(0x12a)](){const _0x8babc6=_0x397db0;super[_0x8babc6(0x12a)](),this[_0x8babc6(0x128)]();}async[_0x397db0(0x125)](){const _0x2658c6=_0x397db0;await this[_0x2658c6(0xf1)][_0x2658c6(0xfb)](0x0)[_0x2658c6(0x125)](),super[_0x2658c6(0x125)]();}[_0x397db0(0x134)](){const _0x3ede1c=_0x397db0;this[_0x3ede1c(0x105)]||(this[_0x3ede1c(0x105)]=!0x0,this[_0x3ede1c(0xf1)][_0x3ede1c(0xee)](0x0)[_0x3ede1c(0x125)](),this[_0x3ede1c(0xf1)][_0x3ede1c(0xf6)](this[_0x3ede1c(0x12c)]()));}[_0x397db0(0x10d)](){const _0x2e9d8f=_0x397db0;this[_0x2e9d8f(0x105)]&&(this[_0x2e9d8f(0x105)]=!0x1,this[_0x2e9d8f(0xf1)][_0x2e9d8f(0xee)](0x0)[_0x2e9d8f(0x125)](),this[_0x2e9d8f(0xf1)][_0x2e9d8f(0xf6)](this[_0x2e9d8f(0x113)]()));}[_0x397db0(0xf5)](){const _0x2c080b=_0x397db0;return _0x2c080b(0x142)===this[_0x2c080b(0xef)][_0x2c080b(0xfa)][_0x2c080b(0xf9)][_0x2c080b(0xf0)]?_0x3a621d(this[_0x2c080b(0x12e)],_0x2c080b(0x11a)):_0x3a621d(this[_0x2c080b(0x12e)],_0x2c080b(0x103));}[_0x397db0(0x126)](){const _0xcfa2d=_0x397db0;return this[_0xcfa2d(0xef)][_0xcfa2d(0x145)]?_0xcfa2d(0x142)===this[_0xcfa2d(0xef)][_0xcfa2d(0xfa)][_0xcfa2d(0xf9)][_0xcfa2d(0xf0)]?_0x3a621d(this[_0xcfa2d(0x12e)],_0xcfa2d(0x100),this[_0xcfa2d(0xef)][_0xcfa2d(0xf3)][_0xcfa2d(0x122)]):_0x3a621d(this[_0xcfa2d(0x12e)],_0xcfa2d(0x112),this[_0xcfa2d(0xef)][_0xcfa2d(0xf3)][_0xcfa2d(0x122)]):null;}[_0x397db0(0x113)](){const _0x12b24d=_0x397db0,_0x29fb45=new _0x50bfdb(this[_0x12b24d(0x12e)]);return _0x29fb45[_0x12b24d(0x106)](_0x12b24d(0x13f))['to'](this[_0x12b24d(0xef)],_0x12b24d(0x13f),this,_0x12b24d(0x119),(_0x449b51,_0x1cee84)=>_0x1cee84?_0x5bfab7(_0x449b51,{'limit':this[_0x12b24d(0x121)][_0x12b24d(0x13e)]}):_0x449b51),_0x29fb45;}[_0x397db0(0x12c)](){const _0x2aa57e=_0x397db0;this[_0x2aa57e(0x121)][_0x2aa57e(0x123)]||(this[_0x2aa57e(0x121)][_0x2aa57e(0x123)]={}),this[_0x2aa57e(0x121)][_0x2aa57e(0x123)][_0x2aa57e(0xfc)]=this[_0x2aa57e(0xef)][_0x2aa57e(0x13f)];const _0x45a5f4=new _0x232b71(this[_0x2aa57e(0x12e)],this[_0x2aa57e(0x121)][_0x2aa57e(0x123)]);return _0x45a5f4[_0x2aa57e(0x138)]=this[_0x2aa57e(0xef)][_0x2aa57e(0x13f)],_0x45a5f4[_0x2aa57e(0x106)](_0x2aa57e(0x107))['to'](this[_0x2aa57e(0xef)],_0x2aa57e(0x10a)),_0x45a5f4[_0x2aa57e(0x117)]=_0x3a621d(this[_0x2aa57e(0x12e)],_0x2aa57e(0xf7)),_0x45a5f4['on'](_0x2aa57e(0xff),(_0x1d5471,_0x214369)=>{const _0x2dcf5d=_0x2aa57e;this[_0x2dcf5d(0x13c)](_0x2dcf5d(0x120),this[_0x2dcf5d(0xef)]['id'],_0x214369),this[_0x2dcf5d(0x10d)](),this[_0x2dcf5d(0xeb)]();}),_0x45a5f4['on'](_0x2aa57e(0x11d),()=>{const _0x5a4290=_0x2aa57e;this[_0x5a4290(0x10d)](),this[_0x5a4290(0xeb)]();}),_0x45a5f4[_0x2aa57e(0x131)](_0x2aa57e(0x13a),()=>{const _0x2aaf95=_0x2aa57e;_0x45a5f4[_0x2aaf95(0xeb)]();}),_0x45a5f4[_0x2aa57e(0x136)](),_0x45a5f4[_0x2aa57e(0x135)](_0x2aa57e(0x13a))['to'](this),_0x45a5f4[_0x2aa57e(0x135)](_0x2aa57e(0xed))['to'](this),_0x45a5f4;}[_0x397db0(0x128)](){const _0x4a3aef=_0x397db0,_0x23f208=this[_0x4a3aef(0x101)];this[_0x4a3aef(0x111)][_0x4a3aef(0x12b)](_0x23f208);for(const _0x2ef6af of this[_0x4a3aef(0x118)])this[_0x4a3aef(0x127)][_0x4a3aef(0xf6)](_0x2ef6af[_0x4a3aef(0x101)]),this[_0x4a3aef(0x111)][_0x4a3aef(0x12b)](_0x2ef6af[_0x4a3aef(0x101)]);this[_0x4a3aef(0x118)]['on'](_0x4a3aef(0xf2),(_0x5787ce,_0x33f407)=>{const _0x31bae6=_0x4a3aef;for(const _0x394327 of _0x33f407[_0x31bae6(0xf8)])this[_0x31bae6(0x127)][_0x31bae6(0xee)](_0x394327[_0x31bae6(0x101)]),this[_0x31bae6(0x111)][_0x31bae6(0x10b)](_0x394327[_0x31bae6(0x101)]);for(const _0x85e36c of _0x33f407[_0x31bae6(0x12f)])this[_0x31bae6(0x127)][_0x31bae6(0xf6)](_0x85e36c[_0x31bae6(0x101)]),this[_0x31bae6(0x111)][_0x31bae6(0x12b)](_0x85e36c[_0x31bae6(0x101)]);}),this[_0x4a3aef(0x111)][_0x4a3aef(0x10f)](_0x4a3aef(0x108),(_0x50e662,_0x178b6e)=>{const _0x53d3a2=_0x4a3aef;_0x23f208===_0x50e662[_0x53d3a2(0x141)]&&(this[_0x53d3a2(0x110)][_0x53d3a2(0xec)](),_0x178b6e());}),this[_0x4a3aef(0x111)][_0x4a3aef(0x10f)](_0x4a3aef(0x102),(_0x4f0677,_0x30262e)=>{const _0x21a13b=_0x4a3aef;_0x23f208!==_0x4f0677[_0x21a13b(0x141)]&&(this[_0x21a13b(0xeb)](),_0x30262e());});}}