@ckeditor/ckeditor5-comments
Version:
Collaborative comments feature for CKEditor 5.
23 lines • 8.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. |
* | |
* | |
* +---------------------------------------------------------------------------------+
*
*
*
*
*/
const _0x335d71=_0x47c6;function _0x47c6(_0x5b9ae8,_0x1261ad){const _0xece6f5=_0xece6();return _0x47c6=function(_0x47c64d,_0x4e36f4){_0x47c64d=_0x47c64d-0xdf;let _0x47bc21=_0xece6f5[_0x47c64d];return _0x47bc21;},_0x47c6(_0x5b9ae8,_0x1261ad);}(function(_0x185a63,_0x53a38b){const _0x3fcd0d=_0x47c6,_0x499e8d=_0x185a63();while(!![]){try{const _0x257427=-parseInt(_0x3fcd0d(0x105))/0x1+-parseInt(_0x3fcd0d(0x129))/0x2*(-parseInt(_0x3fcd0d(0x125))/0x3)+-parseInt(_0x3fcd0d(0xeb))/0x4+-parseInt(_0x3fcd0d(0xf7))/0x5*(-parseInt(_0x3fcd0d(0x101))/0x6)+parseInt(_0x3fcd0d(0x102))/0x7*(-parseInt(_0x3fcd0d(0x114))/0x8)+-parseInt(_0x3fcd0d(0x128))/0x9*(-parseInt(_0x3fcd0d(0xdf))/0xa)+parseInt(_0x3fcd0d(0x130))/0xb;if(_0x257427===_0x53a38b)break;else _0x499e8d['push'](_0x499e8d['shift']());}catch(_0x33cba9){_0x499e8d['push'](_0x499e8d['shift']());}}}(_0xece6,0xe271a));import{View as _0x5344fb,FocusCycler as _0x48c757,ButtonView as _0x24e31d}from'ckeditor5/src/ui.js';import{FocusTracker as _0x1859f4,KeystrokeHandler as _0x2499f6}from'ckeditor5/src/utils.js';function _0xece6(){const _0x5ba3c4=['listenTo','placeholder','bindTemplate','_createCancelButton','cancelButtonView','tab','ck-comment__input-actions','added','bind','div','_createSubmitButton','161976NHekEw','keystrokes','reverse','_isDestroyed','execute','cancel','TOO_LONG_COMMENT_ALERT','editorReady','high','destroy','firstChild','add','editorDestroyed','view','ck-comment__input-actions--submit','_editorConfig','create','3764469yFeMcH','ck-comment__input-actions--active','createEditor','9dhhcgn','2lbtiRb','ck-comment__input-wrapper','withText','Reply','disabledSubmit','insertBefore','focusLast','19453742dnkWSb','_editorCreationPromise','length','fire','isEnabled','5175890MYgXmM','_setupKeyboardNavigation','submit','from','render','createCollection','Esc','trim','change','element','setTemplate','submitLabel','7225892feTnfS','Cancel','document','getData','focus','showButtons','label','submitButtonView','editor','Reply...','extendTemplate','setData','15XcxdYF','Ctrl+Enter','focusFirst','stop','focusables','shift+tab','value','focusTracker','set','focusCycler','477624EMfZal','140WKYKtt','then','forEach','640819niVsvK','initialData','model','ck-comment__input-actions--cancel'];_0xece6=function(){return _0x5ba3c4;};return _0xece6();}import{CommentEditor as _0x5d6561}from'../commenteditor/commenteditor.js';import{getTranslation as _0x26db42}from'../../../utils/common-translations.js';export class CommentInputView extends _0x5344fb{[_0x335d71(0x115)];[_0x335d71(0xfe)];[_0x335d71(0xfb)];[_0x335d71(0x100)];[_0x335d71(0xf2)];[_0x335d71(0x10d)];[_0x335d71(0x123)];constructor(_0x2a08be,_0x3f2f3a={}){const _0x159e66=_0x335d71;super(_0x2a08be),this[_0x159e66(0xf3)]=null,this[_0x159e66(0x123)]=_0x3f2f3a,this[_0x159e66(0xff)](_0x159e66(0xfd),_0x3f2f3a[_0x159e66(0x106)]||''),this[_0x159e66(0xff)](_0x159e66(0x12d),!0x1),this[_0x159e66(0xff)](_0x159e66(0xf0),!0x0),this[_0x159e66(0xff)](_0x159e66(0x10a),_0x26db42(_0x2a08be,_0x159e66(0xf4))),this[_0x159e66(0xff)](_0x159e66(0xea),_0x26db42(_0x2a08be,_0x159e66(0x12c))),this[_0x159e66(0xf2)]=this[_0x159e66(0x113)](),this[_0x159e66(0x10d)]=this[_0x159e66(0x10c)](),this[_0x159e66(0xfb)]=this[_0x159e66(0xe4)]([this[_0x159e66(0xf2)],this[_0x159e66(0x10d)]]),this[_0x159e66(0x115)]=new _0x2499f6(),this[_0x159e66(0xfe)]=new _0x1859f4(),this[_0x159e66(0x100)]=new _0x48c757({'focusables':this[_0x159e66(0xfb)],'focusTracker':this[_0x159e66(0xfe)],'keystrokeHandler':this[_0x159e66(0x115)],'actions':{'focusPrevious':_0x159e66(0xfc),'focusNext':_0x159e66(0x10e)}}),this[_0x159e66(0xe9)]({'tag':_0x159e66(0x112),'attributes':{'class':[_0x159e66(0x12a)]},'children':[{'tag':_0x159e66(0x112),'attributes':{'class':[_0x159e66(0x10f),this[_0x159e66(0x10b)]['if'](_0x159e66(0xf0),_0x159e66(0x126))]},'children':[this[_0x159e66(0xf2)],this[_0x159e66(0x10d)]]}]}),this[_0x159e66(0x115)][_0x159e66(0xff)](_0x159e66(0xe5),(_0x3e1e5e,_0x57454e)=>{const _0x22dc78=_0x159e66;this[_0x22dc78(0x10d)][_0x22dc78(0x133)](_0x22dc78(0x118)),_0x57454e();}),this[_0x159e66(0x115)][_0x159e66(0xff)](_0x159e66(0xf8),(_0x42946d,_0x661bcd)=>{const _0x1ab059=_0x159e66;this[_0x1ab059(0xf2)][_0x1ab059(0x134)]&&(this[_0x1ab059(0xf2)][_0x1ab059(0x133)](_0x1ab059(0x118)),_0x661bcd());}),this['on'](_0x159e66(0xe1),(_0x4d1aa1,_0x284e1c)=>{const _0x12e194=_0x159e66;_0x284e1c[_0x12e194(0x132)]>0xfde8?(alert(_0x26db42(_0x2a08be,_0x12e194(0x11a),[_0x284e1c[_0x12e194(0x132)],0xfde8])),_0x4d1aa1[_0x12e194(0xfa)]()):this[_0x12e194(0xf3)][_0x12e194(0xf6)]('');},{'priority':_0x159e66(0x11c)});}[_0x335d71(0xe3)](){const _0x424248=_0x335d71;super[_0x424248(0xe3)](),this[_0x424248(0xe0)]();}[_0x335d71(0x127)](){const _0x1f5013=_0x335d71;return this[_0x1f5013(0xf3)]||(this[_0x1f5013(0xf3)]=new _0x5d6561(this[_0x1f5013(0x123)]),this[_0x1f5013(0x131)]=this[_0x1f5013(0xf3)][_0x1f5013(0x124)]()[_0x1f5013(0x103)](()=>{const _0x3d36ef=_0x1f5013;if(this[_0x3d36ef(0x117)])return;const _0x2d5273=this[_0x3d36ef(0xf3)];this[_0x3d36ef(0xe8)][_0x3d36ef(0x12e)](_0x2d5273['ui'][_0x3d36ef(0xe8)],this[_0x3d36ef(0xe8)][_0x3d36ef(0x11e)]),_0x2d5273[_0x3d36ef(0x107)][_0x3d36ef(0xed)]['on'](_0x3d36ef(0xe7),()=>this[_0x3d36ef(0xfd)]=_0x2d5273[_0x3d36ef(0xee)]()),_0x2d5273[_0x3d36ef(0x111)](_0x3d36ef(0x10a))['to'](this),this[_0x3d36ef(0xfb)][_0x3d36ef(0x11f)](_0x2d5273['ui'][_0x3d36ef(0x121)],0x0),this[_0x3d36ef(0x133)](_0x3d36ef(0x11b),this[_0x3d36ef(0xf3)]);})),this[_0x1f5013(0x131)];}[_0x335d71(0xef)](_0x378043){const _0x5eb0c3=_0x335d71;-0x1===_0x378043?(this[_0x5eb0c3(0x100)][_0x5eb0c3(0xf9)](),this[_0x5eb0c3(0x100)][_0x5eb0c3(0x12f)]()):this[_0x5eb0c3(0x100)][_0x5eb0c3(0xf9)]();}async[_0x335d71(0x11d)](){const _0x3b3dd0=_0x335d71;this[_0x3b3dd0(0x117)]||(this[_0x3b3dd0(0x117)]=!0x0,this[_0x3b3dd0(0xf3)]&&(await this[_0x3b3dd0(0x131)],await this[_0x3b3dd0(0xf3)][_0x3b3dd0(0x11d)](),this[_0x3b3dd0(0x133)](_0x3b3dd0(0x120),this[_0x3b3dd0(0xf3)])),await super[_0x3b3dd0(0x11d)]());}[_0x335d71(0x113)](){const _0x2317db=_0x335d71,{locale:_0x29d4a5}=this,_0x5158a9=new _0x24e31d(_0x29d4a5);return _0x5158a9[_0x2317db(0xf5)]({'attributes':{'class':[_0x2317db(0x122)]}}),_0x5158a9[_0x2317db(0x12b)]=!0x0,_0x5158a9[_0x2317db(0x111)](_0x2317db(0xf1))['to'](this,_0x2317db(0xea)),_0x5158a9['on'](_0x2317db(0x118),()=>{const _0x4d25db=_0x2317db;this[_0x4d25db(0x133)](_0x4d25db(0xe1),this[_0x4d25db(0xfd)]);}),_0x5158a9[_0x2317db(0x111)](_0x2317db(0x134))['to'](this,_0x2317db(0xfd),this,_0x2317db(0x12d),(_0x488cab,_0x30ea73)=>!_0x30ea73&&!!_0x488cab[_0x2317db(0xe6)]()),_0x5158a9;}[_0x335d71(0x10c)](){const _0x24e58f=_0x335d71,{locale:_0x1a7f37}=this,_0x2a4245=new _0x24e31d(_0x1a7f37);return _0x2a4245[_0x24e58f(0xf5)]({'attributes':{'class':[_0x24e58f(0x108)]}}),_0x2a4245[_0x24e58f(0xf1)]=_0x26db42(_0x1a7f37,_0x24e58f(0xec)),_0x2a4245[_0x24e58f(0x12b)]=!0x0,_0x2a4245['on'](_0x24e58f(0x118),()=>{const _0x5252d7=_0x24e58f;this[_0x5252d7(0xf3)][_0x5252d7(0xf6)](''),this[_0x5252d7(0x133)](_0x5252d7(0x119));}),_0x2a4245;}[_0x335d71(0xe0)](){const _0x1e89c8=_0x335d71;this[_0x1e89c8(0x115)][_0x1e89c8(0x109)](this[_0x1e89c8(0xe8)]),this[_0x1e89c8(0xfb)][_0x1e89c8(0x104)](_0x453219=>{const _0x47a778=_0x1e89c8;this[_0x47a778(0xfe)][_0x47a778(0x11f)](_0x453219[_0x47a778(0xe8)]);}),this[_0x1e89c8(0xfb)]['on'](_0x1e89c8(0xe7),(_0x22d318,_0x20b583)=>{const _0x49cf1b=_0x1e89c8;for(const _0xd6c3e4 of Array[_0x49cf1b(0xe2)](_0x20b583[_0x49cf1b(0x110)])[_0x49cf1b(0x116)]())this[_0x49cf1b(0xfe)][_0x49cf1b(0x11f)](_0xd6c3e4[_0x49cf1b(0xe8)]);});}}