@ckeditor/ckeditor5-comments
Version:
Collaborative comments feature for CKEditor 5.
23 lines • 9.39 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. |
* | |
* | |
* +---------------------------------------------------------------------------------+
*
*
*
*
*/
function _0x2c37(_0x493a4a,_0x113efe){const _0x229754=_0x2297();return _0x2c37=function(_0x2c3764,_0x9d3ed0){_0x2c3764=_0x2c3764-0x6c;let _0x59ee8f=_0x229754[_0x2c3764];return _0x59ee8f;},_0x2c37(_0x493a4a,_0x113efe);}const _0x3089c4=_0x2c37;(function(_0x518e4b,_0x43bfb5){const _0x1cf9d4=_0x2c37,_0x1c99c6=_0x518e4b();while(!![]){try{const _0x4d234f=parseInt(_0x1cf9d4(0x6c))/0x1+-parseInt(_0x1cf9d4(0xa2))/0x2*(parseInt(_0x1cf9d4(0x9e))/0x3)+parseInt(_0x1cf9d4(0x7f))/0x4*(parseInt(_0x1cf9d4(0x7b))/0x5)+-parseInt(_0x1cf9d4(0x74))/0x6*(parseInt(_0x1cf9d4(0x73))/0x7)+parseInt(_0x1cf9d4(0x96))/0x8*(-parseInt(_0x1cf9d4(0xb5))/0x9)+-parseInt(_0x1cf9d4(0xac))/0xa*(-parseInt(_0x1cf9d4(0x71))/0xb)+parseInt(_0x1cf9d4(0x86))/0xc;if(_0x4d234f===_0x43bfb5)break;else _0x1c99c6['push'](_0x1c99c6['shift']());}catch(_0x2944fc){_0x1c99c6['push'](_0x1c99c6['shift']());}}}(_0x2297,0x5bde2));import{ContextPlugin as _0x25c342,Context as _0x336768}from'ckeditor5/src/core.js';function _0x2297(){const _0xc5e85b=['11xvVDCh','has','609EUOKyp','10356qpVDgh','removeEventListener','isAttached','get','hasDomSelection','_integrateWithEditorAnnotations','setActiveAnnotation','10mbqUrI','updateTargetRect','set:container','switchTo','866356HHIUkE','requires','attach','addAnnotation','rearrange','_annotations','init','5681484mHvPZy','plugins','ready','off','stop','from','cancel','remove','register','addEventListener','stopListening','destroy','wideSidebar','focus','widesidebar-detach-not-attached','getOrderedSelectedAnnotations','8sNVnKo','set','resize','_editorAnnotations','change:container','add','context','high','5601FxFbWK','listenTo','annotations','refreshPositioning','642mfMffO','_refreshPositioningDebounced','Annotations','ck-sidebar--wide','EditorAnnotations','_destroyEditorAnnotationsIntegration','_detachFromContainer','WideSidebar','widesidebar-attach-already-attached','_attachToContainer','1183430MzFnsJ','isOfficialPlugin','uiUpdate','activeAnnotation','_activeAnnotation','blur','refreshVisibility','container','detach','4743405eWSVby','627826oDvqlK','isPremiumPlugin','editors','refresh','pluginName'];_0x2297=function(){return _0xc5e85b;};return _0x2297();}import{AnnotationsUIs as _0x137a44}from'./annotationsuis.js';import{Sidebar as _0x1ed42d}from'./sidebar.js';import{CKEditorError as _0x49b751,Collection as _0x4dc639}from'ckeditor5/src/utils.js';import{debounce as _0x38a35f}from'es-toolkit/compat';export class WideSidebar extends _0x25c342{[_0x3089c4(0x76)];[_0x3089c4(0xa0)];[_0x3089c4(0x99)];[_0x3089c4(0xa3)];static get[_0x3089c4(0x80)](){return[_0x1ed42d,_0x137a44];}static get[_0x3089c4(0x70)](){const _0x385a06=_0x3089c4;return _0x385a06(0xa9);}static get[_0x3089c4(0xad)](){return!0x0;}static get[_0x3089c4(0x6d)](){return!0x0;}constructor(_0x23fbd0){const _0x3e705f=_0x3089c4;super(_0x23fbd0),this[_0x3e705f(0x76)]=!0x1,this[_0x3e705f(0x97)](_0x3e705f(0xaf),null),this[_0x3e705f(0xa0)]=null,this[_0x3e705f(0x99)]=new _0x4dc639(),this[_0x3e705f(0xa3)]=_0x38a35f(()=>{const _0x5e9709=_0x3e705f;_0x23fbd0[_0x5e9709(0x87)][_0x5e9709(0x77)](_0x5e9709(0xa4))[_0x5e9709(0xb2)](),this[_0x5e9709(0xa0)][_0x5e9709(0xa1)]();},0xfa,{'leading':!0x1});}[_0x3089c4(0x85)](){const _0x4b04cb=_0x3089c4,_0x55dc92=this[_0x4b04cb(0x9c)][_0x4b04cb(0x87)][_0x4b04cb(0x77)](_0x137a44),_0x44fe8e=this[_0x4b04cb(0x9c)][_0x4b04cb(0x87)][_0x4b04cb(0x77)](_0x1ed42d);_0x55dc92[_0x4b04cb(0x8e)](_0x4b04cb(0x92),this),_0x44fe8e[_0x4b04cb(0xb3)]&&_0x55dc92[_0x4b04cb(0x7e)](_0x4b04cb(0x92));}[_0x3089c4(0x7a)](_0x59afaf){const _0xb6d698=_0x3089c4;if(_0x59afaf===this[_0xb6d698(0xaf)])return;const _0x3452b6=this[_0xb6d698(0x9c)][_0xb6d698(0x87)][_0xb6d698(0x77)](_0x1ed42d);_0x3452b6[_0xb6d698(0xb0)]=_0x59afaf;const _0x2f7d30=this[_0xb6d698(0xaf)];_0x3452b6[_0xb6d698(0x6f)]({'blurredAnnotation':_0x2f7d30,'activatedAnnotation':_0x59afaf}),this[_0xb6d698(0xaf)]=_0x59afaf;}[_0x3089c4(0x81)](_0x39f200){const _0xc97e6=_0x3089c4;this[_0xc97e6(0xa0)]=_0x39f200;const _0x76a82b=this[_0xc97e6(0x9c)][_0xc97e6(0x87)][_0xc97e6(0x77)](_0x1ed42d);if(_0x76a82b[_0xc97e6(0x84)]=_0x39f200,this[_0xc97e6(0x76)])throw new _0x49b751(_0xc97e6(0xaa),this);this[_0xc97e6(0x76)]=!0x0,this[_0xc97e6(0x9f)](_0x76a82b,_0xc97e6(0x7d),()=>{const _0x1b0da3=_0xc97e6;this[_0x1b0da3(0xb4)](),this[_0x1b0da3(0x9f)](_0x76a82b,_0x1b0da3(0x9a),_0x34c8d9=>{const _0x1e8df2=_0x1b0da3;_0x34c8d9[_0x1e8df2(0x89)](),this[_0x1e8df2(0x81)](_0x39f200);});}),_0x76a82b[_0xc97e6(0xab)]({'viewClass':_0xc97e6(0xa5)});const _0x533c1d=_0x1e5427=>{const _0x3f85c4=_0xc97e6;_0x1e5427[_0x3f85c4(0x7c)](),_0x76a82b[_0x3f85c4(0x82)](_0x1e5427);};for(const _0x24a492 of _0x39f200)_0x533c1d(_0x24a492);this[_0xc97e6(0x9f)](_0x39f200,_0xc97e6(0x9b),(_0x1c8d7f,_0x208733)=>{_0x533c1d(_0x208733);}),this[_0xc97e6(0x9f)](_0x39f200,_0xc97e6(0x8d),(_0x212377,_0x4022c7,_0x59c7b2)=>{const _0x3cf3ca=_0xc97e6;_0x76a82b[_0x3cf3ca(0x83)]({'removedAnnotation':_0x4022c7,'previousAnnotation':_0x39f200[_0x3cf3ca(0x77)](_0x59c7b2-0x1),'nextAnnotation':_0x39f200[_0x3cf3ca(0x77)](_0x59c7b2+0x1)}),_0x4022c7===this[_0x3cf3ca(0xaf)]&&this[_0x3cf3ca(0x7a)](null);},{'priority':_0xc97e6(0x9d)}),this[_0xc97e6(0x9f)](_0x39f200,_0xc97e6(0x93),(_0x145d31,_0x1665f8)=>{const _0x4b7646=_0xc97e6;this[_0x4b7646(0x7a)](_0x1665f8);}),this[_0xc97e6(0x9f)](_0x39f200,_0xc97e6(0xb1),()=>{const _0x4ee4c8=_0xc97e6;this[_0x4ee4c8(0x7a)](null);});const _0x2eac3c=this[_0xc97e6(0x9c)]instanceof _0x336768?this[_0xc97e6(0x9c)][_0xc97e6(0x6e)]:new _0x4dc639([this[_0xc97e6(0x9c)]]);for(const _0x24f82f of _0x2eac3c)this[_0xc97e6(0x79)](_0x24f82f);this[_0xc97e6(0x9f)](_0x2eac3c,_0xc97e6(0x9b),(_0x5c676b,_0x522692)=>{const _0x44986b=_0xc97e6;this[_0x44986b(0x9f)](_0x522692,_0x44986b(0x88),()=>{const _0x242b7f=_0x44986b;this[_0x242b7f(0x79)](_0x522692);});}),this[_0xc97e6(0x9f)](_0x2eac3c,_0xc97e6(0x8d),(_0x28dc40,_0x82ff6e)=>{const _0x461a33=_0xc97e6;_0x82ff6e[_0x461a33(0x87)][_0x461a33(0x72)](_0x461a33(0xa6))&&this[_0x461a33(0xa7)](_0x82ff6e[_0x461a33(0x87)][_0x461a33(0x77)](_0x461a33(0xa6)));}),window[_0xc97e6(0x8f)](_0xc97e6(0x98),this[_0xc97e6(0xa3)]),this[_0xc97e6(0x9c)][_0xc97e6(0x87)][_0xc97e6(0x77)](_0xc97e6(0xa4))[_0xc97e6(0xb2)](),this[_0xc97e6(0xa0)][_0xc97e6(0xa1)]();}[_0x3089c4(0xb4)](){const _0x54317c=_0x3089c4;if(!this[_0x54317c(0x76)])throw new _0x49b751(_0x54317c(0x94),this);this[_0x54317c(0x7a)](null);const _0x5bcc19=this[_0x54317c(0x9c)][_0x54317c(0x87)][_0x54317c(0x77)](_0x1ed42d);_0x5bcc19[_0x54317c(0xa8)](this[_0x54317c(0xa0)]),this[_0x54317c(0x90)](_0x5bcc19),this[_0x54317c(0x90)](this[_0x54317c(0xa0)]),this[_0x54317c(0x9c)]instanceof _0x336768&&this[_0x54317c(0x90)](this[_0x54317c(0x9c)][_0x54317c(0x6e)]);for(const _0x57c018 of Array[_0x54317c(0x8b)](this[_0x54317c(0x99)]))this[_0x54317c(0xa7)](_0x57c018);window[_0x54317c(0x75)](_0x54317c(0x98),this[_0x54317c(0xa3)]),this[_0x54317c(0xa3)][_0x54317c(0x8c)](),this[_0x54317c(0xaf)]=null,this[_0x54317c(0x76)]=!0x1,this[_0x54317c(0xa0)]=null;}[_0x3089c4(0x91)](){const _0x2ac347=_0x3089c4;this[_0x2ac347(0x76)]&&this[_0x2ac347(0xb4)]();}[_0x3089c4(0x79)](_0x22cd2b){const _0x3f7845=_0x3089c4;if(!_0x22cd2b[_0x3f7845(0x87)][_0x3f7845(0x72)](_0x3f7845(0xa6)))return;const _0x1d2e60=_0x22cd2b[_0x3f7845(0x87)][_0x3f7845(0x77)](_0x3f7845(0xa6)),_0x37ee5d=()=>{const _0x235628=_0x3f7845,_0x453844=_0x1d2e60[_0x235628(0x95)]({'annotations':this[_0x235628(0xa0)],'activeAnnotation':this[_0x235628(0xaf)]});this[_0x235628(0x7a)](_0x453844[0x0]||null);};this[_0x3f7845(0x9f)](_0x1d2e60,_0x3f7845(0x6f),_0x37ee5d),this[_0x3f7845(0x9f)](_0x1d2e60,_0x3f7845(0xb1),(_0x35fd93,{isAnnotationTracked:_0x3f1139})=>{const _0x52fbd3=_0x3f7845;this[_0x52fbd3(0xaf)]&&_0x3f1139(this[_0x52fbd3(0xaf)])&&this[_0x52fbd3(0x7a)](null);}),this[_0x3f7845(0x9f)](_0x1d2e60,_0x3f7845(0xae),()=>{const _0x430074=_0x3f7845;this[_0x430074(0xa3)]();}),this[_0x3f7845(0x9f)](this[_0x3f7845(0xa0)],_0x3f7845(0xb1),_0x20b29c=>{const _0x3f9a59=_0x3f7845;_0x1d2e60[_0x3f9a59(0x78)]()&&(_0x37ee5d(),_0x20b29c[_0x3f9a59(0x8a)]());},{'priority':_0x3f7845(0x9d)}),this[_0x3f7845(0x99)][_0x3f7845(0x9b)](_0x1d2e60);}[_0x3089c4(0xa7)](_0xb2fc27){const _0x4e8e4d=_0x3089c4;this[_0x4e8e4d(0x90)](_0xb2fc27),this[_0x4e8e4d(0x99)][_0x4e8e4d(0x8d)](_0xb2fc27);}}