@ckeditor/ckeditor5-comments
Version:
Collaborative comments feature for CKEditor 5.
23 lines • 9.51 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 _0x28c2d0=_0x1ccd;(function(_0x4c34f6,_0x376ad6){const _0x58e25b=_0x1ccd,_0xf73cf6=_0x4c34f6();while(!![]){try{const _0x410e5d=-parseInt(_0x58e25b(0x1d0))/0x1*(parseInt(_0x58e25b(0x1be))/0x2)+-parseInt(_0x58e25b(0x194))/0x3*(parseInt(_0x58e25b(0x1cd))/0x4)+-parseInt(_0x58e25b(0x1a8))/0x5+parseInt(_0x58e25b(0x1cf))/0x6+parseInt(_0x58e25b(0x1b9))/0x7+parseInt(_0x58e25b(0x19e))/0x8+-parseInt(_0x58e25b(0x1c9))/0x9*(parseInt(_0x58e25b(0x1ab))/0xa);if(_0x410e5d===_0x376ad6)break;else _0xf73cf6['push'](_0xf73cf6['shift']());}catch(_0xa78e59){_0xf73cf6['push'](_0xf73cf6['shift']());}}}(_0x2981,0xa769a));import{ContextPlugin as _0x365ccc,Context as _0x10d312}from'ckeditor5/src/core.js';import{AnnotationsUIs as _0x251723}from'./annotationsuis.js';import{Sidebar as _0x1bc356}from'./sidebar.js';function _0x1ccd(_0x71518d,_0xf36723){const _0x29816c=_0x2981();return _0x1ccd=function(_0x1ccd09,_0x14e329){_0x1ccd09=_0x1ccd09-0x18b;let _0x1ff626=_0x29816c[_0x1ccd09];return _0x1ff626;},_0x1ccd(_0x71518d,_0xf36723);}import{CKEditorError as _0x2e059a,Collection as _0x433d30}from'ckeditor5/src/utils.js';import{debounce as _0x228715}from'es-toolkit/compat';export class WideSidebar extends _0x365ccc{[_0x28c2d0(0x193)];[_0x28c2d0(0x195)];[_0x28c2d0(0x18e)];[_0x28c2d0(0x1ce)];static get[_0x28c2d0(0x19f)](){return[_0x1bc356,_0x251723];}static get[_0x28c2d0(0x1bf)](){const _0x415f57=_0x28c2d0;return _0x415f57(0x1a2);}static get[_0x28c2d0(0x1d2)](){return!0x0;}static get[_0x28c2d0(0x1ae)](){return!0x0;}constructor(_0x991fed){const _0x528304=_0x28c2d0;super(_0x991fed),this[_0x528304(0x193)]=!0x1,this[_0x528304(0x1ad)](_0x528304(0x1a7),null),this[_0x528304(0x195)]=null,this[_0x528304(0x18e)]=new _0x433d30(),this[_0x528304(0x1ce)]=_0x228715(()=>{const _0x331b96=_0x528304;_0x991fed[_0x331b96(0x1c6)][_0x331b96(0x1ba)](_0x331b96(0x1b7))[_0x331b96(0x198)](),this[_0x331b96(0x195)][_0x331b96(0x1bb)]();},0xfa,{'leading':!0x1});}[_0x28c2d0(0x18d)](){const _0x1725f1=_0x28c2d0,_0x43d231=this[_0x1725f1(0x1b5)][_0x1725f1(0x1c6)][_0x1725f1(0x1ba)](_0x251723),_0x141cdb=this[_0x1725f1(0x1b5)][_0x1725f1(0x1c6)][_0x1725f1(0x1ba)](_0x1bc356);_0x43d231[_0x1725f1(0x1b3)](_0x1725f1(0x1ac),this),_0x141cdb[_0x1725f1(0x1c7)]&&_0x43d231[_0x1725f1(0x19c)](_0x1725f1(0x1ac));}[_0x28c2d0(0x191)](_0x523a48){const _0x36d7ca=_0x28c2d0;if(_0x523a48===this[_0x36d7ca(0x1a7)])return;const _0x2118a6=this[_0x36d7ca(0x1b5)][_0x36d7ca(0x1c6)][_0x36d7ca(0x1ba)](_0x1bc356);_0x2118a6[_0x36d7ca(0x1a0)]=_0x523a48;const _0x27a548=this[_0x36d7ca(0x1a7)];_0x2118a6[_0x36d7ca(0x1a6)]({'blurredAnnotation':_0x27a548,'activatedAnnotation':_0x523a48}),this[_0x36d7ca(0x1a7)]=_0x523a48;}[_0x28c2d0(0x1b8)](_0x19555e){const _0x4fdb46=_0x28c2d0;this[_0x4fdb46(0x195)]=_0x19555e;const _0x405720=this[_0x4fdb46(0x1b5)][_0x4fdb46(0x1c6)][_0x4fdb46(0x1ba)](_0x1bc356);if(_0x405720[_0x4fdb46(0x1bc)]=_0x19555e,this[_0x4fdb46(0x193)])throw new _0x2e059a(_0x4fdb46(0x18f),this);this[_0x4fdb46(0x193)]=!0x0,this[_0x4fdb46(0x1c0)](_0x405720,_0x4fdb46(0x1cb),()=>{const _0x577c52=_0x4fdb46;this[_0x577c52(0x1c5)](),this[_0x577c52(0x1c0)](_0x405720,_0x577c52(0x199),_0x5e6caf=>{const _0x39b117=_0x577c52;_0x5e6caf[_0x39b117(0x1cc)](),this[_0x39b117(0x1b8)](_0x19555e);});}),_0x405720[_0x4fdb46(0x1b2)]({'viewClass':_0x4fdb46(0x192)});const _0x1d3188=_0x3876c0=>{const _0x12c540=_0x4fdb46;_0x3876c0[_0x12c540(0x1a4)](),_0x405720[_0x12c540(0x18c)](_0x3876c0);};for(const _0x5f39e0 of _0x19555e)_0x1d3188(_0x5f39e0);this[_0x4fdb46(0x1c0)](_0x19555e,_0x4fdb46(0x1a3),(_0x562ead,_0x4120e8)=>{_0x1d3188(_0x4120e8);}),this[_0x4fdb46(0x1c0)](_0x19555e,_0x4fdb46(0x1b6),(_0x26dfe9,_0x1e0e30,_0x4befff)=>{const _0x5e9058=_0x4fdb46;_0x405720[_0x5e9058(0x1af)]({'removedAnnotation':_0x1e0e30,'previousAnnotation':_0x19555e[_0x5e9058(0x1ba)](_0x4befff-0x1),'nextAnnotation':_0x19555e[_0x5e9058(0x1ba)](_0x4befff+0x1)}),_0x1e0e30===this[_0x5e9058(0x1a7)]&&this[_0x5e9058(0x191)](null);},{'priority':_0x4fdb46(0x1b1)}),this[_0x4fdb46(0x1c0)](_0x19555e,_0x4fdb46(0x1c4),(_0x52a06d,_0x22bc62)=>{const _0x51dbab=_0x4fdb46;this[_0x51dbab(0x191)](_0x22bc62);}),this[_0x4fdb46(0x1c0)](_0x19555e,_0x4fdb46(0x1bd),()=>{const _0x3eaac2=_0x4fdb46;this[_0x3eaac2(0x191)](null);});const _0x466fec=this[_0x4fdb46(0x1b5)]instanceof _0x10d312?this[_0x4fdb46(0x1b5)][_0x4fdb46(0x1b4)]:new _0x433d30([this[_0x4fdb46(0x1b5)]]);for(const _0x5b14e3 of _0x466fec)this[_0x4fdb46(0x19d)](_0x5b14e3);this[_0x4fdb46(0x1c0)](_0x466fec,_0x4fdb46(0x1a3),(_0x2e72e2,_0x37882b)=>{const _0x38412f=_0x4fdb46;this[_0x38412f(0x1c0)](_0x37882b,_0x38412f(0x1c3),()=>{const _0x3cfcfa=_0x38412f;this[_0x3cfcfa(0x19d)](_0x37882b);});}),this[_0x4fdb46(0x1c0)](_0x466fec,_0x4fdb46(0x1b6),(_0x44372e,_0x449e8a)=>{const _0x541520=_0x4fdb46;_0x449e8a[_0x541520(0x1c6)][_0x541520(0x1aa)](_0x541520(0x19a))&&this[_0x541520(0x196)](_0x449e8a[_0x541520(0x1c6)][_0x541520(0x1ba)](_0x541520(0x19a)));}),window[_0x4fdb46(0x18b)](_0x4fdb46(0x190),this[_0x4fdb46(0x1ce)]),this[_0x4fdb46(0x1b5)][_0x4fdb46(0x1c6)][_0x4fdb46(0x1ba)](_0x4fdb46(0x1b7))[_0x4fdb46(0x198)](),this[_0x4fdb46(0x195)][_0x4fdb46(0x1bb)]();}[_0x28c2d0(0x1c5)](){const _0x4e8f3c=_0x28c2d0;if(!this[_0x4e8f3c(0x193)])throw new _0x2e059a(_0x4e8f3c(0x1a9),this);this[_0x4e8f3c(0x191)](null);const _0x1af8fd=this[_0x4e8f3c(0x1b5)][_0x4e8f3c(0x1c6)][_0x4e8f3c(0x1ba)](_0x1bc356);_0x1af8fd[_0x4e8f3c(0x1c2)](this[_0x4e8f3c(0x195)]),this[_0x4e8f3c(0x1a1)](_0x1af8fd),this[_0x4e8f3c(0x1a1)](this[_0x4e8f3c(0x195)]),this[_0x4e8f3c(0x1b5)]instanceof _0x10d312&&this[_0x4e8f3c(0x1a1)](this[_0x4e8f3c(0x1b5)][_0x4e8f3c(0x1b4)]);for(const _0x41dfcf of Array[_0x4e8f3c(0x1c1)](this[_0x4e8f3c(0x18e)]))this[_0x4e8f3c(0x196)](_0x41dfcf);window[_0x4e8f3c(0x1c8)](_0x4e8f3c(0x190),this[_0x4e8f3c(0x1ce)]),this[_0x4e8f3c(0x1ce)][_0x4e8f3c(0x1d1)](),this[_0x4e8f3c(0x1a7)]=null,this[_0x4e8f3c(0x193)]=!0x1,this[_0x4e8f3c(0x195)]=null;}[_0x28c2d0(0x1b0)](){const _0xddf295=_0x28c2d0;this[_0xddf295(0x193)]&&this[_0xddf295(0x1c5)]();}[_0x28c2d0(0x19d)](_0x539ee1){const _0x30682=_0x28c2d0;if(!_0x539ee1[_0x30682(0x1c6)][_0x30682(0x1aa)](_0x30682(0x19a)))return;const _0x72c9ae=_0x539ee1[_0x30682(0x1c6)][_0x30682(0x1ba)](_0x30682(0x19a)),_0x3196af=()=>{const _0x15347b=_0x30682,_0x21e042=_0x72c9ae[_0x15347b(0x197)]({'annotations':this[_0x15347b(0x195)],'activeAnnotation':this[_0x15347b(0x1a7)]});this[_0x15347b(0x191)](_0x21e042[0x0]||null);};this[_0x30682(0x1c0)](_0x72c9ae,_0x30682(0x1a6),_0x3196af),this[_0x30682(0x1c0)](_0x72c9ae,_0x30682(0x1bd),(_0x1f5a07,{isAnnotationTracked:_0x3bf6e6})=>{const _0xf2a186=_0x30682;this[_0xf2a186(0x1a7)]&&_0x3bf6e6(this[_0xf2a186(0x1a7)])&&this[_0xf2a186(0x191)](null);}),this[_0x30682(0x1c0)](_0x72c9ae,_0x30682(0x1a5),()=>{const _0x564ee0=_0x30682;this[_0x564ee0(0x1ce)]();}),this[_0x30682(0x1c0)](this[_0x30682(0x195)],_0x30682(0x1bd),_0x2dc59f=>{const _0x59a64f=_0x30682;_0x72c9ae[_0x59a64f(0x19b)]()&&(_0x3196af(),_0x2dc59f[_0x59a64f(0x1ca)]());},{'priority':_0x30682(0x1b1)}),this[_0x30682(0x18e)][_0x30682(0x1a3)](_0x72c9ae);}[_0x28c2d0(0x196)](_0x9d62ef){const _0x540765=_0x28c2d0;this[_0x540765(0x1a1)](_0x9d62ef),this[_0x540765(0x18e)][_0x540765(0x1b6)](_0x9d62ef);}}function _0x2981(){const _0x2505f6=['stopListening','WideSidebar','add','updateTargetRect','uiUpdate','refresh','activeAnnotation','47505OMgsSZ','widesidebar-detach-not-attached','has','170AWurfN','wideSidebar','set','isPremiumPlugin','rearrange','destroy','high','_attachToContainer','register','editors','context','remove','Annotations','attach','1824165hoFoTz','get','refreshPositioning','_annotations','blur','50tNfWEK','pluginName','listenTo','from','_detachFromContainer','ready','focus','detach','plugins','container','removeEventListener','127377BQmeOB','stop','set:container','off','104cihFcx','_refreshPositioningDebounced','2497542Bdvyta','25101pAcxlg','cancel','isOfficialPlugin','addEventListener','addAnnotation','init','_editorAnnotations','widesidebar-attach-already-attached','resize','setActiveAnnotation','ck-sidebar--wide','isAttached','9366nowxzY','annotations','_destroyEditorAnnotationsIntegration','getOrderedSelectedAnnotations','refreshVisibility','change:container','EditorAnnotations','hasDomSelection','switchTo','_integrateWithEditorAnnotations','7741352YEPOAY','requires','_activeAnnotation'];_0x2981=function(){return _0x2505f6;};return _0x2981();}