@ckeditor/ckeditor5-comments
Version:
Collaborative comments feature for CKEditor 5.
23 lines • 8.53 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. |
* | |
* | |
* +---------------------------------------------------------------------------------+
*
*
*
*
*/
function _0x3853(_0xc3ee69,_0x55528e){const _0x252beb=_0x252b();return _0x3853=function(_0x38531f,_0x569a05){_0x38531f=_0x38531f-0x10c;let _0xf47e27=_0x252beb[_0x38531f];return _0xf47e27;},_0x3853(_0xc3ee69,_0x55528e);}const _0x1f127d=_0x3853;(function(_0x443959,_0x173a43){const _0x2f859c=_0x3853,_0x32c1c7=_0x443959();while(!![]){try{const _0x26a02d=-parseInt(_0x2f859c(0x142))/0x1+-parseInt(_0x2f859c(0x156))/0x2*(parseInt(_0x2f859c(0x11b))/0x3)+parseInt(_0x2f859c(0x146))/0x4+-parseInt(_0x2f859c(0x12c))/0x5*(-parseInt(_0x2f859c(0x11c))/0x6)+parseInt(_0x2f859c(0x145))/0x7+-parseInt(_0x2f859c(0x15b))/0x8+parseInt(_0x2f859c(0x10c))/0x9;if(_0x26a02d===_0x173a43)break;else _0x32c1c7['push'](_0x32c1c7['shift']());}catch(_0x44aa27){_0x32c1c7['push'](_0x32c1c7['shift']());}}}(_0x252b,0x7d332));import{View as _0xe7405e,FocusCycler as _0x2771a5,ButtonView as _0xdb1ab8}from'ckeditor5/src/ui.js';import{FocusTracker as _0x3c995d,KeystrokeHandler as _0x228207}from'ckeditor5/src/utils.js';import _0x5d11e5 from'../commenteditor/commenteditor.js';import{getTranslation as _0x161e07}from'../../../utils/common-translations.js';function _0x252b(){const _0x48020d=['submitLabel','cancel','Esc','focusFirst','render','label','value','added','getData','div','forEach','element','from','831505BGkSLU','TOO_LONG_COMMENT_ALERT','setData','3358971JizQvR','3542252prIhVY','bind','focus','then','firstChild','ck-comment__input-actions--active','trim','focusCycler','editor','submit','document','create','_setupKeyboardNavigation','Reply','_editorCreationPromise','ck-comment__input-actions--cancel','404iMSqdP','execute','set','length','setTemplate','6351664YsuAOL','ck-comment__input-actions--submit','_createCancelButton','shift+tab','focusables','6887412oQUPuQ','view','stop','listenTo','_createSubmitButton','placeholder','_isDestroyed','keystrokes','Ctrl+Enter','createEditor','high','change','ck-comment__input-actions','fire','Cancel','51SSXYiN','22062knkpvf','cancelButtonView','showButtons','add','focusLast','bindTemplate','insertBefore','model','_editorConfig','initialData','destroy','disabledSubmit','reverse','withText','tab','editorDestroyed','15EoYGYz','submitButtonView','editorReady','Reply...','focusTracker','createCollection','extendTemplate','ck-comment__input-wrapper','isEnabled'];_0x252b=function(){return _0x48020d;};return _0x252b();}export default class os extends _0xe7405e{constructor(_0x2a907f,_0x59f228={}){const _0xfd3324=_0x3853;super(_0x2a907f),this[_0xfd3324(0x14e)]=null,this[_0xfd3324(0x124)]=_0x59f228,this[_0xfd3324(0x158)](_0xfd3324(0x13b),_0x59f228[_0xfd3324(0x125)]||''),this[_0xfd3324(0x158)](_0xfd3324(0x127),!0x1),this[_0xfd3324(0x158)](_0xfd3324(0x11e),!0x0),this[_0xfd3324(0x158)](_0xfd3324(0x111),_0x161e07(_0x2a907f,_0xfd3324(0x12f))),this[_0xfd3324(0x158)](_0xfd3324(0x135),_0x161e07(_0x2a907f,_0xfd3324(0x153))),this[_0xfd3324(0x12d)]=this[_0xfd3324(0x110)](),this[_0xfd3324(0x11d)]=this[_0xfd3324(0x15d)](),this[_0xfd3324(0x15f)]=this[_0xfd3324(0x131)]([this[_0xfd3324(0x12d)],this[_0xfd3324(0x11d)]]),this[_0xfd3324(0x113)]=new _0x228207(),this[_0xfd3324(0x130)]=new _0x3c995d(),this[_0xfd3324(0x14d)]=new _0x2771a5({'focusables':this[_0xfd3324(0x15f)],'focusTracker':this[_0xfd3324(0x130)],'keystrokeHandler':this[_0xfd3324(0x113)],'actions':{'focusPrevious':_0xfd3324(0x15e),'focusNext':_0xfd3324(0x12a)}}),this[_0xfd3324(0x15a)]({'tag':_0xfd3324(0x13e),'attributes':{'class':[_0xfd3324(0x133)]},'children':[{'tag':_0xfd3324(0x13e),'attributes':{'class':[_0xfd3324(0x118),this[_0xfd3324(0x121)]['if'](_0xfd3324(0x11e),_0xfd3324(0x14b))]},'children':[this[_0xfd3324(0x12d)],this[_0xfd3324(0x11d)]]}]}),this[_0xfd3324(0x113)][_0xfd3324(0x158)](_0xfd3324(0x137),(_0x4c078b,_0x2afd23)=>{const _0x21ed6b=_0xfd3324;this[_0x21ed6b(0x11d)][_0x21ed6b(0x119)](_0x21ed6b(0x157)),_0x2afd23();}),this[_0xfd3324(0x113)][_0xfd3324(0x158)](_0xfd3324(0x114),(_0x1abae3,_0x909d6f)=>{const _0x5d2576=_0xfd3324;this[_0x5d2576(0x12d)][_0x5d2576(0x134)]&&(this[_0x5d2576(0x12d)][_0x5d2576(0x119)](_0x5d2576(0x157)),_0x909d6f());}),this['on'](_0xfd3324(0x14f),(_0x409830,_0xcd9d91)=>{const _0x8165d8=_0xfd3324;_0xcd9d91[_0x8165d8(0x159)]>0xfde8?(alert(_0x161e07(_0x2a907f,_0x8165d8(0x143),[_0xcd9d91[_0x8165d8(0x159)],0xfde8])),_0x409830[_0x8165d8(0x10e)]()):this[_0x8165d8(0x14e)][_0x8165d8(0x144)]('');},{'priority':_0xfd3324(0x116)});}[_0x1f127d(0x139)](){const _0x13fac0=_0x1f127d;super[_0x13fac0(0x139)](),this[_0x13fac0(0x152)]();}[_0x1f127d(0x115)](){const _0x4b484b=_0x1f127d;return this[_0x4b484b(0x14e)]||(this[_0x4b484b(0x14e)]=new _0x5d11e5(this[_0x4b484b(0x124)]),this[_0x4b484b(0x154)]=this[_0x4b484b(0x14e)][_0x4b484b(0x151)]()[_0x4b484b(0x149)](()=>{const _0x7d0aa0=_0x4b484b;if(this[_0x7d0aa0(0x112)])return;const _0x3cdcf8=this[_0x7d0aa0(0x14e)];this[_0x7d0aa0(0x140)][_0x7d0aa0(0x122)](_0x3cdcf8['ui'][_0x7d0aa0(0x140)],this[_0x7d0aa0(0x140)][_0x7d0aa0(0x14a)]),_0x3cdcf8[_0x7d0aa0(0x123)][_0x7d0aa0(0x150)]['on'](_0x7d0aa0(0x117),()=>this[_0x7d0aa0(0x13b)]=_0x3cdcf8[_0x7d0aa0(0x13d)]()),_0x3cdcf8[_0x7d0aa0(0x147)](_0x7d0aa0(0x111))['to'](this),this[_0x7d0aa0(0x15f)][_0x7d0aa0(0x11f)](_0x3cdcf8['ui'][_0x7d0aa0(0x10d)],0x0),this[_0x7d0aa0(0x119)](_0x7d0aa0(0x12e),this[_0x7d0aa0(0x14e)]);})),this[_0x4b484b(0x154)];}[_0x1f127d(0x148)](_0x34159e){const _0x125e7d=_0x1f127d;-0x1===_0x34159e?(this[_0x125e7d(0x14d)][_0x125e7d(0x138)](),this[_0x125e7d(0x14d)][_0x125e7d(0x120)]()):this[_0x125e7d(0x14d)][_0x125e7d(0x138)]();}async[_0x1f127d(0x126)](){const _0x185789=_0x1f127d;this[_0x185789(0x112)]||(this[_0x185789(0x112)]=!0x0,this[_0x185789(0x14e)]&&(await this[_0x185789(0x154)],await this[_0x185789(0x14e)][_0x185789(0x126)](),this[_0x185789(0x119)](_0x185789(0x12b),this[_0x185789(0x14e)])),await super[_0x185789(0x126)]());}[_0x1f127d(0x110)](){const _0x36dc9e=_0x1f127d,{locale:_0x448885}=this,_0x445224=new _0xdb1ab8(_0x448885);return _0x445224[_0x36dc9e(0x132)]({'attributes':{'class':[_0x36dc9e(0x15c)]}}),_0x445224[_0x36dc9e(0x129)]=!0x0,_0x445224[_0x36dc9e(0x147)](_0x36dc9e(0x13a))['to'](this,_0x36dc9e(0x135)),_0x445224['on'](_0x36dc9e(0x157),()=>{const _0x5c1b9c=_0x36dc9e;this[_0x5c1b9c(0x119)](_0x5c1b9c(0x14f),this[_0x5c1b9c(0x13b)]);}),_0x445224[_0x36dc9e(0x147)](_0x36dc9e(0x134))['to'](this,_0x36dc9e(0x13b),this,_0x36dc9e(0x127),(_0x4607ee,_0x5028a9)=>!_0x5028a9&&!!_0x4607ee[_0x36dc9e(0x14c)]()),_0x445224;}[_0x1f127d(0x15d)](){const _0x5a1f96=_0x1f127d,{locale:_0x4b3396}=this,_0x22c439=new _0xdb1ab8(_0x4b3396);return _0x22c439[_0x5a1f96(0x132)]({'attributes':{'class':[_0x5a1f96(0x155)]}}),_0x22c439[_0x5a1f96(0x13a)]=_0x161e07(_0x4b3396,_0x5a1f96(0x11a)),_0x22c439[_0x5a1f96(0x129)]=!0x0,_0x22c439['on'](_0x5a1f96(0x157),()=>{const _0xf78de1=_0x5a1f96;this[_0xf78de1(0x14e)][_0xf78de1(0x144)](''),this[_0xf78de1(0x119)](_0xf78de1(0x136));}),_0x22c439;}[_0x1f127d(0x152)](){const _0x234151=_0x1f127d;this[_0x234151(0x113)][_0x234151(0x10f)](this[_0x234151(0x140)]),this[_0x234151(0x15f)][_0x234151(0x13f)](_0x433f9f=>{const _0x379f95=_0x234151;this[_0x379f95(0x130)][_0x379f95(0x11f)](_0x433f9f[_0x379f95(0x140)]);}),this[_0x234151(0x15f)]['on'](_0x234151(0x117),(_0xd37210,_0x3a0a4b)=>{const _0x5811c6=_0x234151;for(const _0x21810d of Array[_0x5811c6(0x141)](_0x3a0a4b[_0x5811c6(0x13c)])[_0x5811c6(0x128)]())this[_0x5811c6(0x130)][_0x5811c6(0x11f)](_0x21810d[_0x5811c6(0x140)]);});}}