UNPKG

@ckeditor/ckeditor5-comments

Version:

Collaborative comments feature for CKEditor 5.

23 lines 9.32 kB
/* * 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 _0x6afd(_0x2290cc,_0xae356f){const _0x2e520f=_0x2e52();return _0x6afd=function(_0x6afdea,_0x3bb8ff){_0x6afdea=_0x6afdea-0x1c8;let _0x3a7317=_0x2e520f[_0x6afdea];return _0x3a7317;},_0x6afd(_0x2290cc,_0xae356f);}const _0x486d41=_0x6afd;(function(_0x2300af,_0x54b5b9){const _0x2a23f7=_0x6afd,_0x3964af=_0x2300af();while(!![]){try{const _0x18a072=-parseInt(_0x2a23f7(0x1d0))/0x1*(-parseInt(_0x2a23f7(0x208))/0x2)+-parseInt(_0x2a23f7(0x1ee))/0x3*(-parseInt(_0x2a23f7(0x1ef))/0x4)+parseInt(_0x2a23f7(0x1cc))/0x5+parseInt(_0x2a23f7(0x1fc))/0x6+parseInt(_0x2a23f7(0x1e0))/0x7*(parseInt(_0x2a23f7(0x1e3))/0x8)+-parseInt(_0x2a23f7(0x1f0))/0x9+-parseInt(_0x2a23f7(0x1d2))/0xa;if(_0x18a072===_0x54b5b9)break;else _0x3964af['push'](_0x3964af['shift']());}catch(_0x5b1d02){_0x3964af['push'](_0x3964af['shift']());}}}(_0x2e52,0xe7146));import{ContextPlugin as _0x61596e,Context as _0x35af23}from'ckeditor5/src/core.js';import{AnnotationsUIs as _0x249377}from'./annotationsuis.js';import{Sidebar as _0x11e054}from'./sidebar.js';import{CKEditorError as _0x50cafe,Collection as _0x4b5224}from'ckeditor5/src/utils.js';import{debounce as _0x1103e7}from'es-toolkit/compat';function _0x2e52(){const _0xd14893=['6158375jVTuHv','remove','init','focus','2891clhQQn','_refreshPositioningDebounced','29823170IVBHsU','getOrderedSelectedAnnotations','WideSidebar','stopListening','attach','blur','isPremiumPlugin','updateTargetRect','ready','refreshPositioning','_annotations','change:container','_attachToContainer','addEventListener','11578msBssS','widesidebar-attach-already-attached','EditorAnnotations','4016kjqRiJ','rearrange','destroy','switchTo','listenTo','cancel','add','from','register','editors','removeEventListener','309SkzvZB','22868zgaQbQ','13151358zEZqaa','uiUpdate','_destroyEditorAnnotationsIntegration','activeAnnotation','setActiveAnnotation','_detachFromContainer','set','_editorAnnotations','ck-sidebar--wide','requires','detach','set:container','7970634wkfzhs','get','_integrateWithEditorAnnotations','_activeAnnotation','resize','isAttached','stop','addAnnotation','high','wideSidebar','hasDomSelection','refresh','976jqSdSA','widesidebar-detach-not-attached','pluginName','annotations','has','container','off','context','isOfficialPlugin','plugins'];_0x2e52=function(){return _0xd14893;};return _0x2e52();}export class WideSidebar extends _0x61596e{[_0x486d41(0x201)];[_0x486d41(0x20b)];[_0x486d41(0x1f7)];[_0x486d41(0x1d1)];static get[_0x486d41(0x1f9)](){return[_0x11e054,_0x249377];}static get[_0x486d41(0x20a)](){const _0x54df1b=_0x486d41;return _0x54df1b(0x1d4);}static get[_0x486d41(0x1ca)](){return!0x0;}static get[_0x486d41(0x1d8)](){return!0x0;}constructor(_0x5a980f){const _0x37179f=_0x486d41;super(_0x5a980f),this[_0x37179f(0x201)]=!0x1,this[_0x37179f(0x1f6)](_0x37179f(0x1f3),null),this[_0x37179f(0x20b)]=null,this[_0x37179f(0x1f7)]=new _0x4b5224(),this[_0x37179f(0x1d1)]=_0x1103e7(()=>{const _0x45e572=_0x37179f;this[_0x45e572(0x20b)][_0x45e572(0x1db)]();},0xfa,{'leading':!0x1});}[_0x486d41(0x1ce)](){const _0x21da8d=_0x486d41,_0x5c22e7=this[_0x21da8d(0x1c9)][_0x21da8d(0x1cb)][_0x21da8d(0x1fd)](_0x249377),_0x267006=this[_0x21da8d(0x1c9)][_0x21da8d(0x1cb)][_0x21da8d(0x1fd)](_0x11e054);_0x5c22e7[_0x21da8d(0x1eb)](_0x21da8d(0x205),this),_0x267006[_0x21da8d(0x20d)]&&_0x5c22e7[_0x21da8d(0x1e6)](_0x21da8d(0x205));}[_0x486d41(0x1f4)](_0x433d61){const _0x9eaf15=_0x486d41;if(_0x433d61===this[_0x9eaf15(0x1f3)])return;const _0x3bb697=this[_0x9eaf15(0x1c9)][_0x9eaf15(0x1cb)][_0x9eaf15(0x1fd)](_0x11e054);_0x3bb697[_0x9eaf15(0x1ff)]=_0x433d61;const _0x5da317=this[_0x9eaf15(0x1f3)];_0x3bb697[_0x9eaf15(0x207)]({'blurredAnnotation':_0x5da317,'activatedAnnotation':_0x433d61}),this[_0x9eaf15(0x1f3)]=_0x433d61;}[_0x486d41(0x1d6)](_0x230eed){const _0x40dbbf=_0x486d41;this[_0x40dbbf(0x20b)]=_0x230eed;const _0x21e7df=this[_0x40dbbf(0x1c9)][_0x40dbbf(0x1cb)][_0x40dbbf(0x1fd)](_0x11e054);if(_0x21e7df[_0x40dbbf(0x1dc)]=_0x230eed,this[_0x40dbbf(0x201)])throw new _0x50cafe(_0x40dbbf(0x1e1),this);this[_0x40dbbf(0x201)]=!0x0,this[_0x40dbbf(0x1e7)](_0x21e7df,_0x40dbbf(0x1fb),()=>{const _0x41204d=_0x40dbbf;this[_0x41204d(0x1fa)](),this[_0x41204d(0x1e7)](_0x21e7df,_0x41204d(0x1dd),_0x4eb0d4=>{const _0x9ac13d=_0x41204d;_0x4eb0d4[_0x9ac13d(0x1c8)](),this[_0x9ac13d(0x1d6)](_0x230eed);});}),_0x21e7df[_0x40dbbf(0x1de)]({'viewClass':_0x40dbbf(0x1f8)});const _0x1c02d3=_0x3bb56e=>{const _0x429cb1=_0x40dbbf;_0x3bb56e[_0x429cb1(0x1d9)](),_0x21e7df[_0x429cb1(0x203)](_0x3bb56e);};for(const _0x27d8b4 of _0x230eed)_0x1c02d3(_0x27d8b4);this[_0x40dbbf(0x1e7)](_0x230eed,_0x40dbbf(0x1e9),(_0x1315c6,_0x5cd711)=>{_0x1c02d3(_0x5cd711);}),this[_0x40dbbf(0x1e7)](_0x230eed,_0x40dbbf(0x1cd),(_0x56979,_0x11ebc2,_0xed74b1)=>{const _0x4b2221=_0x40dbbf;_0x21e7df[_0x4b2221(0x1e4)]({'removedAnnotation':_0x11ebc2,'previousAnnotation':_0x230eed[_0x4b2221(0x1fd)](_0xed74b1-0x1),'nextAnnotation':_0x230eed[_0x4b2221(0x1fd)](_0xed74b1+0x1)}),_0x11ebc2===this[_0x4b2221(0x1f3)]&&this[_0x4b2221(0x1f4)](null);},{'priority':_0x40dbbf(0x204)}),this[_0x40dbbf(0x1e7)](_0x230eed,_0x40dbbf(0x1cf),(_0x20e3aa,_0x122cc9)=>{const _0x388a72=_0x40dbbf;this[_0x388a72(0x1f4)](_0x122cc9);}),this[_0x40dbbf(0x1e7)](_0x230eed,_0x40dbbf(0x1d7),()=>{const _0x58daba=_0x40dbbf;this[_0x58daba(0x1f4)](null);});const _0x5c2b4d=this[_0x40dbbf(0x1c9)]instanceof _0x35af23?this[_0x40dbbf(0x1c9)][_0x40dbbf(0x1ec)]:new _0x4b5224([this[_0x40dbbf(0x1c9)]]);for(const _0x22f0b6 of _0x5c2b4d)this[_0x40dbbf(0x1fe)](_0x22f0b6);this[_0x40dbbf(0x1e7)](_0x5c2b4d,_0x40dbbf(0x1e9),(_0xf0b1bc,_0x1fb3f3)=>{const _0x1414b9=_0x40dbbf;this[_0x1414b9(0x1e7)](_0x1fb3f3,_0x1414b9(0x1da),()=>{const _0x5478c7=_0x1414b9;this[_0x5478c7(0x1fe)](_0x1fb3f3);});}),this[_0x40dbbf(0x1e7)](_0x5c2b4d,_0x40dbbf(0x1cd),(_0x52eb21,_0x3c4bb7)=>{const _0x2e65a6=_0x40dbbf;_0x3c4bb7[_0x2e65a6(0x1cb)][_0x2e65a6(0x20c)](_0x2e65a6(0x1e2))&&this[_0x2e65a6(0x1f2)](_0x3c4bb7[_0x2e65a6(0x1cb)][_0x2e65a6(0x1fd)](_0x2e65a6(0x1e2)));}),window[_0x40dbbf(0x1df)](_0x40dbbf(0x200),this[_0x40dbbf(0x1d1)]),this[_0x40dbbf(0x20b)][_0x40dbbf(0x1db)]();}[_0x486d41(0x1fa)](){const _0x36e0e8=_0x486d41;if(!this[_0x36e0e8(0x201)])throw new _0x50cafe(_0x36e0e8(0x209),this);this[_0x36e0e8(0x1f4)](null);const _0x321aeb=this[_0x36e0e8(0x1c9)][_0x36e0e8(0x1cb)][_0x36e0e8(0x1fd)](_0x11e054);_0x321aeb[_0x36e0e8(0x1f5)](this[_0x36e0e8(0x20b)]),this[_0x36e0e8(0x1d5)](_0x321aeb),this[_0x36e0e8(0x1d5)](this[_0x36e0e8(0x20b)]),this[_0x36e0e8(0x1c9)]instanceof _0x35af23&&this[_0x36e0e8(0x1d5)](this[_0x36e0e8(0x1c9)][_0x36e0e8(0x1ec)]);for(const _0x3459ee of Array[_0x36e0e8(0x1ea)](this[_0x36e0e8(0x1f7)]))this[_0x36e0e8(0x1f2)](_0x3459ee);window[_0x36e0e8(0x1ed)](_0x36e0e8(0x200),this[_0x36e0e8(0x1d1)]),this[_0x36e0e8(0x1d1)][_0x36e0e8(0x1e8)](),this[_0x36e0e8(0x1f3)]=null,this[_0x36e0e8(0x201)]=!0x1,this[_0x36e0e8(0x20b)]=null;}[_0x486d41(0x1e5)](){const _0x6a3cdf=_0x486d41;this[_0x6a3cdf(0x201)]&&this[_0x6a3cdf(0x1fa)]();}[_0x486d41(0x1fe)](_0x2d0652){const _0x11e49b=_0x486d41;if(!_0x2d0652[_0x11e49b(0x1cb)][_0x11e49b(0x20c)](_0x11e49b(0x1e2)))return;const _0x438792=_0x2d0652[_0x11e49b(0x1cb)][_0x11e49b(0x1fd)](_0x11e49b(0x1e2)),_0xc8d2c4=()=>{const _0xcd3813=_0x11e49b,_0x48f8c5=_0x438792[_0xcd3813(0x1d3)]({'annotations':this[_0xcd3813(0x20b)],'activeAnnotation':this[_0xcd3813(0x1f3)]});this[_0xcd3813(0x1f4)](_0x48f8c5[0x0]||null);};this[_0x11e49b(0x1e7)](_0x438792,_0x11e49b(0x207),_0xc8d2c4),this[_0x11e49b(0x1e7)](_0x438792,_0x11e49b(0x1d7),(_0xd62860,{isAnnotationTracked:_0xf887f7})=>{const _0x3fe147=_0x11e49b;this[_0x3fe147(0x1f3)]&&_0xf887f7(this[_0x3fe147(0x1f3)])&&this[_0x3fe147(0x1f4)](null);}),this[_0x11e49b(0x1e7)](_0x438792,_0x11e49b(0x1f1),()=>{const _0x1b61be=_0x11e49b;this[_0x1b61be(0x1d1)]();}),this[_0x11e49b(0x1e7)](this[_0x11e49b(0x20b)],_0x11e49b(0x1d7),_0x50d89c=>{const _0x10348a=_0x11e49b;_0x438792[_0x10348a(0x206)]()&&(_0xc8d2c4(),_0x50d89c[_0x10348a(0x202)]());},{'priority':_0x11e49b(0x204)}),this[_0x11e49b(0x1f7)][_0x11e49b(0x1e9)](_0x438792);}[_0x486d41(0x1f2)](_0x4f1106){const _0x49c3c4=_0x486d41;this[_0x49c3c4(0x1d5)](_0x4f1106),this[_0x49c3c4(0x1f7)][_0x49c3c4(0x1cd)](_0x4f1106);}}