@ckeditor/ckeditor5-comments
Version:
Collaborative comments feature for CKEditor 5.
23 lines • 8.79 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. |
* | |
* | |
* +---------------------------------------------------------------------------------+
*
*
*
*
*/
const _0x989ea4=_0x1880;(function(_0x33f397,_0x4a5f28){const _0xf3693=_0x1880,_0x4bb9a9=_0x33f397();while(!![]){try{const _0x5bce3f=-parseInt(_0xf3693(0x217))/0x1*(-parseInt(_0xf3693(0x1d5))/0x2)+-parseInt(_0xf3693(0x1f9))/0x3*(-parseInt(_0xf3693(0x20d))/0x4)+-parseInt(_0xf3693(0x1e2))/0x5*(parseInt(_0xf3693(0x1fb))/0x6)+-parseInt(_0xf3693(0x21a))/0x7+parseInt(_0xf3693(0x204))/0x8+-parseInt(_0xf3693(0x202))/0x9*(-parseInt(_0xf3693(0x1de))/0xa)+parseInt(_0xf3693(0x1d4))/0xb*(parseInt(_0xf3693(0x1fe))/0xc);if(_0x5bce3f===_0x4a5f28)break;else _0x4bb9a9['push'](_0x4bb9a9['shift']());}catch(_0xef2afb){_0x4bb9a9['push'](_0x4bb9a9['shift']());}}}(_0x31ed,0xafc19));import{View as _0x356700,FocusCycler as _0x43fb5c,ButtonView as _0x1bc155}from'ckeditor5/src/ui.js';import{FocusTracker as _0x62f87b,KeystrokeHandler as _0x37d38b}from'ckeditor5/src/utils.js';import _0x16f6e9 from'../commenteditor/commenteditor.js';import{getTranslation as _0x4de5c0}from'../../../utils/common-translations.js';function _0x1880(_0x59078c,_0x52c212){const _0x31edf2=_0x31ed();return _0x1880=function(_0x1880d5,_0x414b94){_0x1880d5=_0x1880d5-0x1d2;let _0x3f50ac=_0x31edf2[_0x1880d5];return _0x3f50ac;},_0x1880(_0x59078c,_0x52c212);}function _0x31ed(){const _0x290e6e=['cancel','Reply','firstChild','stop','_isDestroyed','focusLast','2902009NZFDWu','1054NbpOwg','getData','destroy','value','create','extendTemplate','added','editorReady','editorDestroyed','795780CWbAYh','keystrokes','change','_createCancelButton','5bZNyZu','submit','focus','initialData','ck-comment__input-wrapper','ck-comment__input-actions','from','Cancel','div','high','set','listenTo','model','document','createEditor','Esc','forEach','Ctrl+Enter','TOO_LONG_COMMENT_ALERT','bindTemplate','_createSubmitButton','bind','ck-comment__input-actions--active','583653QdithB','shift+tab','4460568uteuOx','label','_setupKeyboardNavigation','24KWxRtl','setTemplate','trim','disabledSubmit','108SDiNxP','fire','1045496KkpJfl','Reply...','withText','cancelButtonView','focusables','insertBefore','setData','render','focusCycler','20AUlIRw','then','tab','ck-comment__input-actions--cancel','_editorCreationPromise','execute','length','focusFirst','view','reverse','439FrJIcv','submitButtonView','createCollection','9478308tLURLc','submitLabel','ck-comment__input-actions--submit','_editorConfig','add','isEnabled','placeholder','editor','showButtons','element','focusTracker'];_0x31ed=function(){return _0x290e6e;};return _0x31ed();}export default class os extends _0x356700{[_0x989ea4(0x1df)];[_0x989ea4(0x224)];[_0x989ea4(0x208)];[_0x989ea4(0x20c)];[_0x989ea4(0x218)];[_0x989ea4(0x207)];[_0x989ea4(0x21d)];constructor(_0x280c3b,_0x113730={}){const _0x115348=_0x989ea4;super(_0x280c3b),this[_0x115348(0x221)]=null,this[_0x115348(0x21d)]=_0x113730,this[_0x115348(0x1ec)](_0x115348(0x1d8),_0x113730[_0x115348(0x1e5)]||''),this[_0x115348(0x1ec)](_0x115348(0x201),!0x1),this[_0x115348(0x1ec)](_0x115348(0x222),!0x0),this[_0x115348(0x1ec)](_0x115348(0x220),_0x4de5c0(_0x280c3b,_0x115348(0x205))),this[_0x115348(0x1ec)](_0x115348(0x21b),_0x4de5c0(_0x280c3b,_0x115348(0x226))),this[_0x115348(0x218)]=this[_0x115348(0x1f6)](),this[_0x115348(0x207)]=this[_0x115348(0x1e1)](),this[_0x115348(0x208)]=this[_0x115348(0x219)]([this[_0x115348(0x218)],this[_0x115348(0x207)]]),this[_0x115348(0x1df)]=new _0x37d38b(),this[_0x115348(0x224)]=new _0x62f87b(),this[_0x115348(0x20c)]=new _0x43fb5c({'focusables':this[_0x115348(0x208)],'focusTracker':this[_0x115348(0x224)],'keystrokeHandler':this[_0x115348(0x1df)],'actions':{'focusPrevious':_0x115348(0x1fa),'focusNext':_0x115348(0x20f)}}),this[_0x115348(0x1ff)]({'tag':_0x115348(0x1ea),'attributes':{'class':[_0x115348(0x1e6)]},'children':[{'tag':_0x115348(0x1ea),'attributes':{'class':[_0x115348(0x1e7),this[_0x115348(0x1f5)]['if'](_0x115348(0x222),_0x115348(0x1f8))]},'children':[this[_0x115348(0x218)],this[_0x115348(0x207)]]}]}),this[_0x115348(0x1df)][_0x115348(0x1ec)](_0x115348(0x1f1),(_0x2496f1,_0x4e90a3)=>{const _0x4081af=_0x115348;this[_0x4081af(0x207)][_0x4081af(0x203)](_0x4081af(0x212)),_0x4e90a3();}),this[_0x115348(0x1df)][_0x115348(0x1ec)](_0x115348(0x1f3),(_0x1df20a,_0x3aeb09)=>{const _0x90cccc=_0x115348;this[_0x90cccc(0x218)][_0x90cccc(0x21f)]&&(this[_0x90cccc(0x218)][_0x90cccc(0x203)](_0x90cccc(0x212)),_0x3aeb09());}),this['on'](_0x115348(0x1e3),(_0x3dcc1e,_0x4c3313)=>{const _0x1aa4ec=_0x115348;_0x4c3313[_0x1aa4ec(0x213)]>0xfde8?(alert(_0x4de5c0(_0x280c3b,_0x1aa4ec(0x1f4),[_0x4c3313[_0x1aa4ec(0x213)],0xfde8])),_0x3dcc1e[_0x1aa4ec(0x228)]()):this[_0x1aa4ec(0x221)][_0x1aa4ec(0x20a)]('');},{'priority':_0x115348(0x1eb)});}[_0x989ea4(0x20b)](){const _0x1d1ab8=_0x989ea4;super[_0x1d1ab8(0x20b)](),this[_0x1d1ab8(0x1fd)]();}[_0x989ea4(0x1f0)](){const _0x599863=_0x989ea4;return this[_0x599863(0x221)]||(this[_0x599863(0x221)]=new _0x16f6e9(this[_0x599863(0x21d)]),this[_0x599863(0x211)]=this[_0x599863(0x221)][_0x599863(0x1d9)]()[_0x599863(0x20e)](()=>{const _0x43094a=_0x599863;if(this[_0x43094a(0x1d2)])return;const _0x315354=this[_0x43094a(0x221)];this[_0x43094a(0x223)][_0x43094a(0x209)](_0x315354['ui'][_0x43094a(0x223)],this[_0x43094a(0x223)][_0x43094a(0x227)]),_0x315354[_0x43094a(0x1ee)][_0x43094a(0x1ef)]['on'](_0x43094a(0x1e0),()=>this[_0x43094a(0x1d8)]=_0x315354[_0x43094a(0x1d6)]()),_0x315354[_0x43094a(0x1f7)](_0x43094a(0x220))['to'](this),this[_0x43094a(0x208)][_0x43094a(0x21e)](_0x315354['ui'][_0x43094a(0x215)],0x0),this[_0x43094a(0x203)](_0x43094a(0x1dc),this[_0x43094a(0x221)]);})),this[_0x599863(0x211)];}[_0x989ea4(0x1e4)](_0x2ec558){const _0xb8e651=_0x989ea4;-0x1===_0x2ec558?(this[_0xb8e651(0x20c)][_0xb8e651(0x214)](),this[_0xb8e651(0x20c)][_0xb8e651(0x1d3)]()):this[_0xb8e651(0x20c)][_0xb8e651(0x214)]();}async[_0x989ea4(0x1d7)](){const _0x57624c=_0x989ea4;this[_0x57624c(0x1d2)]||(this[_0x57624c(0x1d2)]=!0x0,this[_0x57624c(0x221)]&&(await this[_0x57624c(0x211)],await this[_0x57624c(0x221)][_0x57624c(0x1d7)](),this[_0x57624c(0x203)](_0x57624c(0x1dd),this[_0x57624c(0x221)])),await super[_0x57624c(0x1d7)]());}[_0x989ea4(0x1f6)](){const _0x4cbfb7=_0x989ea4,{locale:_0x489bae}=this,_0x3b0c1c=new _0x1bc155(_0x489bae);return _0x3b0c1c[_0x4cbfb7(0x1da)]({'attributes':{'class':[_0x4cbfb7(0x21c)]}}),_0x3b0c1c[_0x4cbfb7(0x206)]=!0x0,_0x3b0c1c[_0x4cbfb7(0x1f7)](_0x4cbfb7(0x1fc))['to'](this,_0x4cbfb7(0x21b)),_0x3b0c1c['on'](_0x4cbfb7(0x212),()=>{const _0x563d33=_0x4cbfb7;this[_0x563d33(0x203)](_0x563d33(0x1e3),this[_0x563d33(0x1d8)]);}),_0x3b0c1c[_0x4cbfb7(0x1f7)](_0x4cbfb7(0x21f))['to'](this,_0x4cbfb7(0x1d8),this,_0x4cbfb7(0x201),(_0x24406f,_0x40ce93)=>!_0x40ce93&&!!_0x24406f[_0x4cbfb7(0x200)]()),_0x3b0c1c;}[_0x989ea4(0x1e1)](){const _0x4f79a0=_0x989ea4,{locale:_0x250044}=this,_0x209e2e=new _0x1bc155(_0x250044);return _0x209e2e[_0x4f79a0(0x1da)]({'attributes':{'class':[_0x4f79a0(0x210)]}}),_0x209e2e[_0x4f79a0(0x1fc)]=_0x4de5c0(_0x250044,_0x4f79a0(0x1e9)),_0x209e2e[_0x4f79a0(0x206)]=!0x0,_0x209e2e['on'](_0x4f79a0(0x212),()=>{const _0x593725=_0x4f79a0;this[_0x593725(0x221)][_0x593725(0x20a)](''),this[_0x593725(0x203)](_0x593725(0x225));}),_0x209e2e;}[_0x989ea4(0x1fd)](){const _0x303527=_0x989ea4;this[_0x303527(0x1df)][_0x303527(0x1ed)](this[_0x303527(0x223)]),this[_0x303527(0x208)][_0x303527(0x1f2)](_0x46939c=>{const _0x14e3b9=_0x303527;this[_0x14e3b9(0x224)][_0x14e3b9(0x21e)](_0x46939c[_0x14e3b9(0x223)]);}),this[_0x303527(0x208)]['on'](_0x303527(0x1e0),(_0x4c51b8,_0x65c0d9)=>{const _0x3c7165=_0x303527;for(const _0x58aefc of Array[_0x3c7165(0x1e8)](_0x65c0d9[_0x3c7165(0x1db)])[_0x3c7165(0x216)]())this[_0x3c7165(0x224)][_0x3c7165(0x21e)](_0x58aefc[_0x3c7165(0x223)]);});}}