UNPKG

@ckeditor/ckeditor5-comments

Version:

Collaborative comments feature for CKEditor 5.

23 lines 8.61 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. | * | | * | | * +---------------------------------------------------------------------------------+ * * * * */ const _0x504a7c=_0x1fc1;(function(_0x2e5b87,_0x3357a9){const _0x213c35=_0x1fc1,_0x5ac2d0=_0x2e5b87();while(!![]){try{const _0x384517=-parseInt(_0x213c35(0xe2))/0x1*(parseInt(_0x213c35(0x108))/0x2)+parseInt(_0x213c35(0xf6))/0x3+parseInt(_0x213c35(0x11f))/0x4+-parseInt(_0x213c35(0xe5))/0x5+-parseInt(_0x213c35(0x100))/0x6*(-parseInt(_0x213c35(0xfe))/0x7)+-parseInt(_0x213c35(0xf1))/0x8*(parseInt(_0x213c35(0x102))/0x9)+parseInt(_0x213c35(0xd0))/0xa;if(_0x384517===_0x3357a9)break;else _0x5ac2d0['push'](_0x5ac2d0['shift']());}catch(_0x171a8d){_0x5ac2d0['push'](_0x5ac2d0['shift']());}}}(_0xd3bf,0xf2a77));import{Plugin as _0x4ff5ec}from'ckeditor5/src/core.js';import _0x2ae3ea from'./commentsrepository.js';import _0x54cb25 from'./commentsediting.js';function _0xd3bf(){const _0x55d5c2=['2103777qbQrsO','listenTo','CommentThreadInputView','hasMarkerForId','comment:','componentFactory','11586CBOymy','getCommentThread','tooltip','Comments','push','getAllMarkersForId','_threadToController','licenseKey','menuBar:comment','Comment','requires','from','addComment','locale','_createUIButton','highest','isOfficialPlugin','usageLimit','commentsLicenseKeyInvalid','view','removeCommentThread','plugins','expired','262752aaZbTH','addSourceCollector','change:activeAnnotations','domainLimit','commentsLicenseKeyUsageLimit','config','CommentsUI','15700240puVtdU','focusTracker','set','bind','CommentsListView','trialLimit','editor','commentsLicenseKeyValid','_viewToController','commentsLicenseKeyDomainLimit','_licenseKeyCheckInterval','add','isFocused','focus','pluginName','evaluationLimit','isEnabled','commentsLicenseKeyTrialLimit','158HdQymk','execute','low','6172050IRRYUq','addCommentThread','stop','commentsLicenseKeyExpired','comment','featureNotAllowed','commentsLicenseKeyNotAllowed','init','_showLicenseError','get','activeMarker','map','40qrwSmO','hasCommentThread','getRange','length','editing','2974719erzfRH','find','has','invalid','isPremiumPlugin','commentsLicenseKeyEvaluationLimit','model','innerView','102571siRenx','destroy','690wYbtHw','commands'];_0xd3bf=function(){return _0x55d5c2;};return _0xd3bf();}import _0x34899f from'../annotations/editorannotations.js';import{ButtonView as _0x51b0fd,MenuBarMenuListItemButtonView as _0x30ea72}from'ckeditor5/src/ui.js';import _0x4c322d from'../../theme/icons/add-comment.svg';import _0x248595 from'../annotations/annotations.js';import _0x227bba from'./ui/view/commentslistview.js';import _0x5613ba from'./ui/view/commentthreadinputview.js';import{getTranslation as _0x58e839}from'../utils/common-translations.js';function _0x1fc1(_0x1ed72e,_0x1850e8){const _0xd3bf8f=_0xd3bf();return _0x1fc1=function(_0x1fc1df,_0x47a87a){_0x1fc1df=_0x1fc1df-0xcb;let _0x3634a9=_0xd3bf8f[_0x1fc1df];return _0x3634a9;},_0x1fc1(_0x1ed72e,_0x1850e8);}export default class i extends _0x4ff5ec{static get[_0x504a7c(0xde)](){const _0x492d7a=_0x504a7c;return _0x492d7a(0xcf);}static get[_0x504a7c(0x118)](){return!0x0;}static get[_0x504a7c(0xfa)](){return!0x0;}static get[_0x504a7c(0x112)](){return[_0x2ae3ea,_0x54cb25,_0x34899f,_0x248595];}get[_0x504a7c(0xd4)](){return _0x227bba;}get[_0x504a7c(0x104)](){return _0x5613ba;}[_0x504a7c(0xec)](){const _0x244365=_0x504a7c,_0x54c2e8=this[_0x244365(0xd6)],_0x3e1cdc=_0x54c2e8[_0x244365(0x11d)][_0x244365(0xee)](_0x2ae3ea),_0x2f5c99=_0x54c2e8[_0x244365(0x11d)][_0x244365(0xee)](_0x54cb25),_0x8140b7=_0x54c2e8[_0x244365(0x11d)][_0x244365(0xee)](_0x248595),_0x39ee63=_0x54c2e8[_0x244365(0x11d)][_0x244365(0xee)](_0x34899f);_0x54c2e8['ui'][_0x244365(0x107)][_0x244365(0xdb)](_0x244365(0xe9),()=>{const _0x8ec7ff=_0x244365,_0x2df284=this[_0x8ec7ff(0x116)](_0x51b0fd);return _0x2df284[_0x8ec7ff(0x10a)]=!0x0,_0x2df284;}),_0x54c2e8['ui'][_0x244365(0x107)][_0x244365(0xdb)](_0x244365(0x110),()=>this[_0x244365(0x116)](_0x30ea72)),_0x39ee63[_0x244365(0x120)](()=>{const _0x405bfd=_0x244365,_0x4e6ba8=[];for(const [_0x25657a,_0xe9409]of _0x3e1cdc[_0x405bfd(0x10e)]){const _0x3aa80a=_0x2f5c99[_0x405bfd(0x10d)](_0x25657a['id']),_0x403ed1=_0x3aa80a[_0x405bfd(0xf0)](_0x3820f9=>_0x3820f9[_0x405bfd(0xf3)]());_0x3aa80a[_0x405bfd(0xf4)]>0x0&&_0x4e6ba8[_0x405bfd(0x10c)]([_0xe9409[_0x405bfd(0x11b)],_0x403ed1]);}return _0x4e6ba8;}),this[_0x244365(0x103)](_0x8140b7,_0x244365(0xcb),(_0x335d1c,_0x4109bb,_0x1c949a)=>{const _0x1cdaad=_0x244365,_0x575927=Array[_0x1cdaad(0x113)](_0x1c949a)[_0x1cdaad(0xf0)](_0x550478=>_0x550478[_0x1cdaad(0xfd)])[_0x1cdaad(0xf7)](_0x4f84f0=>_0x3e1cdc[_0x1cdaad(0xd8)][_0x1cdaad(0xf8)](_0x4f84f0));if(!_0x575927)return void(_0x2f5c99[_0x1cdaad(0xef)]=null);const _0x27686d=_0x3e1cdc[_0x1cdaad(0xd8)][_0x1cdaad(0xee)](_0x575927)[_0x1cdaad(0xfc)]['id'],_0x366f99=_0x1cdaad(0x106)+_0x27686d;_0x27686d&&_0x2f5c99[_0x1cdaad(0x105)](_0x27686d)?_0x2f5c99[_0x1cdaad(0xef)]=_0x366f99:_0x2f5c99[_0x1cdaad(0xef)]&&(_0x2f5c99[_0x1cdaad(0xef)]=null);}),this[_0x244365(0x103)](_0x3e1cdc,_0x244365(0x11c),(_0x2522bc,{threadId:_0x590da2,isFromAdapter:_0x593c19})=>{const _0x181bc3=_0x244365;!_0x593c19&&_0x54c2e8['ui'][_0x181bc3(0xd1)][_0x181bc3(0xdc)]&&_0x2f5c99[_0x181bc3(0x105)](_0x590da2)&&_0x54c2e8[_0x181bc3(0xf5)][_0x181bc3(0x11b)][_0x181bc3(0xdd)]();},{'priority':_0x244365(0x117)}),this[_0x244365(0x103)](_0x3e1cdc,_0x244365(0x114),(_0x26b55f,{threadId:_0x31def4,isFromAdapter:_0x496865})=>{const _0x69af85=_0x244365;if(_0x496865||!_0x2f5c99[_0x69af85(0x105)](_0x31def4)||!_0x3e1cdc[_0x69af85(0xf2)](_0x31def4))return;0x1===_0x3e1cdc[_0x69af85(0x109)](_0x31def4)[_0x69af85(0xf4)]&&(_0x54c2e8[_0x69af85(0xf5)][_0x69af85(0x11b)][_0x69af85(0xdd)](),_0x26b55f[_0x69af85(0xe7)]());},{'priority':_0x244365(0xe4)}),this[_0x244365(0x10f)]=this[_0x244365(0xd6)][_0x244365(0xce)][_0x244365(0xee)](_0x244365(0x10f));const _0x3f8e4d=this[_0x244365(0xd6)];this[_0x244365(0xda)]=setInterval(()=>{const _0x5931f5=_0x244365;let _0x1c4b06;for(const _0x1ff7a2 in _0x3f8e4d){const _0x371294=_0x1ff7a2,_0x480fa8=_0x3f8e4d[_0x371294];if(_0x5931f5(0xd7)==_0x480fa8||_0x5931f5(0x11a)==_0x480fa8||_0x5931f5(0xe8)==_0x480fa8||_0x5931f5(0xd9)==_0x480fa8||_0x5931f5(0xeb)==_0x480fa8||_0x5931f5(0xfb)==_0x480fa8||_0x5931f5(0xe1)==_0x480fa8||_0x5931f5(0xcd)==_0x480fa8){delete _0x3f8e4d[_0x371294],_0x1c4b06=_0x480fa8,clearInterval(this[_0x5931f5(0xda)]),this[_0x5931f5(0xda)]=void 0x0;break;}}_0x5931f5(0x11a)==_0x1c4b06&&_0x3f8e4d[_0x5931f5(0xed)](_0x5931f5(0xf9)),_0x5931f5(0xe8)==_0x1c4b06&&_0x3f8e4d[_0x5931f5(0xed)](_0x5931f5(0x11e)),_0x5931f5(0xd9)==_0x1c4b06&&_0x3f8e4d[_0x5931f5(0xed)](_0x5931f5(0xcc)),_0x5931f5(0xeb)==_0x1c4b06&&_0x3f8e4d[_0x5931f5(0xed)](_0x5931f5(0xea),_0x5931f5(0x10b)),_0x5931f5(0xfb)==_0x1c4b06&&_0x3f8e4d[_0x5931f5(0xed)](_0x5931f5(0xdf)),_0x5931f5(0xe1)==_0x1c4b06&&_0x3f8e4d[_0x5931f5(0xed)](_0x5931f5(0xd5)),_0x5931f5(0xcd)==_0x1c4b06&&_0x3f8e4d[_0x5931f5(0xed)](_0x5931f5(0x119));},0x3e8);}[_0x504a7c(0xff)](){const _0xdb5729=_0x504a7c;super[_0xdb5729(0xff)](),this[_0xdb5729(0xda)]&&clearInterval(this[_0xdb5729(0xda)]);}[_0x504a7c(0x116)](_0x2d246f){const _0xe83146=_0x504a7c,_0x1e7823=this[_0xe83146(0xd6)],_0x429f5f=new _0x2d246f(_0x1e7823[_0xe83146(0x115)]),_0x4b2e6b=_0x1e7823[_0xe83146(0x101)][_0xe83146(0xee)](_0xe83146(0xe6));return _0x429f5f[_0xe83146(0xd2)]({'label':_0x58e839(_0x1e7823[_0xe83146(0x115)],_0xe83146(0x111)),'icon':_0x4c322d}),_0x429f5f[_0xe83146(0xd3)](_0xe83146(0xe0))['to'](_0x4b2e6b),this[_0xe83146(0x103)](_0x429f5f,_0xe83146(0xe3),()=>{const _0x461d4d=_0xe83146;_0x4b2e6b[_0x461d4d(0xe3)]();}),_0x429f5f;}}