UNPKG

@ckeditor/ckeditor5-comments

Version:

Collaborative comments feature for CKEditor 5.

24 lines 5.94 kB
/* * 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 _0x1d6218=_0x12f5;(function(_0x5671ea,_0x41e7dc){const _0x3802d1=_0x12f5,_0x390880=_0x5671ea();while(!![]){try{const _0x55cd6b=-parseInt(_0x3802d1(0x8c))/0x1+parseInt(_0x3802d1(0x7f))/0x2+parseInt(_0x3802d1(0x85))/0x3+parseInt(_0x3802d1(0x7d))/0x4+parseInt(_0x3802d1(0x8d))/0x5+-parseInt(_0x3802d1(0x70))/0x6+parseInt(_0x3802d1(0x81))/0x7;if(_0x55cd6b===_0x41e7dc)break;else _0x390880['push'](_0x390880['shift']());}catch(_0x2e4cfb){_0x390880['push'](_0x390880['shift']());}}}(_0x6374,0xdca2a));import{Editor as _0x5324d4}from'ckeditor5/src/core.js';import{CommentEditorUI as _0x143b03}from'./commenteditorui.js';import{ObservableMixin as _0x1dd6ad}from'ckeditor5/src/utils.js';import{enableViewPlaceholder as _0x3f9347,disableViewPlaceholder as _0x3b415a}from'ckeditor5/src/engine.js';import{Clipboard as _0x484675}from'ckeditor5/src/clipboard.js';import{Enter as _0x5ecbb5,ShiftEnter as _0x9f7c15}from'ckeditor5/src/enter.js';import{SelectAll as _0x38f220}from'ckeditor5/src/select-all.js';import{Typing as _0x107289}from'ckeditor5/src/typing.js';import{Undo as _0x340316}from'ckeditor5/src/undo.js';function _0x6374(){const _0x4577a5=['877478IZLRfg','init','38605biCTee','view','ready','join','5057031EElTHU','childCount','editing','initialData','model','map','create','1464218JvTtDI','2341220wzsepI','_updatePlaceholder','change:placeholder','get','assign','config','defaultPlugins','plugins','setSelection','name','getChild','focus','destroy','getRoot','3321408PzpveG','fire','placeholderElement','low','set','document','change','data','end','fromCharCode','placeholder','initPlugins','then','1293332ZkzAzG','createRoot'];_0x6374=function(){return _0x4577a5;};return _0x6374();}import{Paragraph as _0x16ce2d}from'ckeditor5/src/paragraph.js';const Qt=[_0x484675,_0x5ecbb5,_0x9f7c15,_0x38f220,_0x107289,_0x340316,_0x16ce2d];function _0x12f5(_0x49df5c,_0x432939){const _0x63747b=_0x6374();return _0x12f5=function(_0x12f56b,_0x2f4849){_0x12f56b=_0x12f56b-0x6e;let _0x5fad9a=_0x63747b[_0x12f56b];return _0x5fad9a;},_0x12f5(_0x49df5c,_0x432939);}export class CommentEditor extends/* #__PURE__ -- @preserve */ _0x1dd6ad(_0x5324d4){static [_0x1d6218(0x93)]=((()=>Qt)());constructor(_0x398ffa={}){const _0xa95521=_0x1d6218;function _0x5e8155(_0x1f6076){const _0x5736e7=_0x12f5;return _0x1f6076[_0x5736e7(0x8a)](_0x1b9ce7=>String[_0x5736e7(0x79)](_0x1b9ce7))[_0x5736e7(0x84)]('');}(_0x398ffa=Object[_0xa95521(0x91)]({},_0x398ffa))[_0xa95521(0x94)]||(_0x398ffa[_0xa95521(0x94)]=CommentEditor[_0xa95521(0x93)]),super(_0x398ffa),this['ui']=new _0x143b03(this),this[_0xa95521(0x74)](_0xa95521(0x7a),''),this[_0xa95521(0x89)][_0xa95521(0x75)]['on'](_0xa95521(0x76),()=>this[_0xa95521(0x8e)](),{'priority':_0xa95521(0x73)}),this['on'](_0xa95521(0x8f),()=>this[_0xa95521(0x8e)]()),this[_0xa95521(0x89)][_0xa95521(0x75)][_0xa95521(0x7e)](),this[_0x5e8155([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x5e8155([0x76,0x69,0x65,0x77])][_0x5e8155([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x5e8155([0x61,0x75,0x74,0x6f]),this[_0x5e8155([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x5e8155([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x5e8155([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x5e8155([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x5e8155([0x6f,0x6b])});}[_0x1d6218(0x8b)](){const _0xd08ffa=_0x1d6218,_0x3d63d5=this[_0xd08ffa(0x92)][_0xd08ffa(0x90)](_0xd08ffa(0x88))||'';return this[_0xd08ffa(0x7b)]()[_0xd08ffa(0x7c)](()=>this['ui'][_0xd08ffa(0x80)]())[_0xd08ffa(0x7c)](()=>this[_0xd08ffa(0x77)][_0xd08ffa(0x80)](_0x3d63d5))[_0xd08ffa(0x7c)](()=>this[_0xd08ffa(0x71)](_0xd08ffa(0x83)));}[_0x1d6218(0x6e)](){const _0x2153c4=_0x1d6218;return super[_0x2153c4(0x6e)]()[_0x2153c4(0x7c)](()=>this['ui'][_0x2153c4(0x6e)]());}[_0x1d6218(0x98)](){const _0x1c997b=_0x1d6218;this[_0x1c997b(0x89)][_0x1c997b(0x76)](_0x3b8d87=>{const _0x3b9e9e=_0x1c997b,_0x1dde04=this[_0x3b9e9e(0x89)][_0x3b9e9e(0x75)][_0x3b9e9e(0x6f)](),_0x3572ef=_0x1dde04&&_0x1dde04[_0x3b9e9e(0x97)](_0x1dde04[_0x3b9e9e(0x86)]-0x1);_0x3b8d87[_0x3b9e9e(0x95)](_0x3572ef,_0x3b9e9e(0x78)),this[_0x3b9e9e(0x87)][_0x3b9e9e(0x82)][_0x3b9e9e(0x98)]();});}[_0x1d6218(0x8e)](){const _0x1d0916=_0x1d6218,_0x1578f8=this[_0x1d0916(0x87)][_0x1d0916(0x82)],_0x25909=_0x1578f8[_0x1d0916(0x75)][_0x1d0916(0x6f)](),_0xbc862f=_0x25909[_0x1d0916(0x97)](0x0);_0x25909[_0x1d0916(0x86)]>0x1||!_0xbc862f||'p'!=_0xbc862f[_0x1d0916(0x96)]?this[_0x1d0916(0x72)]&&this[_0x1d0916(0x72)][_0x1d0916(0x7a)]&&(_0x3b415a(_0x1578f8,this[_0x1d0916(0x72)]),this[_0x1d0916(0x72)]=void 0x0):(this[_0x1d0916(0x7a)]&&(_0xbc862f[_0x1d0916(0x7a)]=this[_0x1d0916(0x7a)]),_0x3f9347({'view':_0x1578f8,'element':_0xbc862f,'keepOnFocus':!0x0}),this[_0x1d0916(0x72)]=_0xbc862f);}}