@ckeditor/ckeditor5-real-time-collaboration 32.0.0 → 33.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (62) hide show
  1. package/LICENSE.md +1 -1
  2. package/README.md +1 -1
  3. package/build/real-time-collaboration.js +7 -0
  4. package/build/translations/cs.js +1 -0
  5. package/build/translations/de-ch.js +1 -0
  6. package/build/translations/de.js +1 -0
  7. package/build/translations/el.js +1 -0
  8. package/build/translations/en-au.js +1 -0
  9. package/build/translations/es.js +1 -0
  10. package/build/translations/et.js +1 -0
  11. package/build/translations/fr.js +1 -0
  12. package/build/translations/gl.js +1 -0
  13. package/build/translations/hi.js +1 -0
  14. package/build/translations/hr.js +1 -0
  15. package/build/translations/hu.js +1 -0
  16. package/build/translations/id.js +1 -0
  17. package/build/translations/it.js +1 -0
  18. package/build/translations/ko.js +1 -0
  19. package/build/translations/nl.js +1 -0
  20. package/build/translations/no.js +1 -0
  21. package/build/translations/pl.js +1 -0
  22. package/build/translations/pt-br.js +1 -0
  23. package/build/translations/ro.js +1 -0
  24. package/build/translations/ru.js +1 -0
  25. package/build/translations/sk.js +1 -0
  26. package/build/translations/sr-latn.js +1 -0
  27. package/build/translations/sr.js +1 -0
  28. package/build/translations/tk.js +1 -0
  29. package/build/translations/tr.js +1 -0
  30. package/build/translations/uk.js +1 -0
  31. package/build/translations/zh-cn.js +1 -0
  32. package/build/translations/zh.js +1 -0
  33. package/ckeditor5-metadata.json +22 -1
  34. package/lang/translations/cs.po +5 -5
  35. package/lang/translations/el.po +47 -0
  36. package/lang/translations/es.po +5 -5
  37. package/lang/translations/sr-latn.po +5 -5
  38. package/lang/translations/sr.po +5 -5
  39. package/package.json +7 -10
  40. package/src/index.js +23 -0
  41. package/src/presencelist/presencelistui.js +1 -1
  42. package/src/presencelist/view/presencecounterview.js +1 -1
  43. package/src/presencelist/view/presencedropdownlistitemview.js +1 -1
  44. package/src/presencelist/view/presencedropdownlistview.js +1 -1
  45. package/src/presencelist/view/presenceinlinelistitemview.js +1 -1
  46. package/src/presencelist/view/presenceinlinelistview.js +1 -1
  47. package/src/presencelist/view/presencelistview.js +1 -1
  48. package/src/presencelist/view/tooltipview.js +1 -1
  49. package/src/presencelist.js +1 -1
  50. package/src/realtimecollaborativecomments/cloudservicescommentsadapter.js +1 -1
  51. package/src/realtimecollaborativecomments.js +1 -1
  52. package/src/realtimecollaborativeediting/realtimecollaborationclient.js +1 -1
  53. package/src/realtimecollaborativeediting/sessions.js +1 -1
  54. package/src/realtimecollaborativeediting/usermarkers.js +1 -1
  55. package/src/realtimecollaborativeediting/websocketgateway.js +1 -1
  56. package/src/realtimecollaborativeediting.js +1 -1
  57. package/src/realtimecollaborativerevisionhistory/cloudservicesrevisionhistoryadapter.js +1 -1
  58. package/src/realtimecollaborativerevisionhistory.js +1 -1
  59. package/src/realtimecollaborativetrackchanges/cloudservicestrackchangesadapter.js +1 -1
  60. package/src/realtimecollaborativetrackchanges.js +1 -1
  61. package/theme/presencelist.css +1 -1
  62. package/theme/usermarkers.css +1 -1
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- var _0x4316=['requires','PresenceList','pluginName'];(function(_0x4970c1,_0x43167d){var _0x39ae6a=function(_0x25caa7){while(--_0x25caa7){_0x4970c1['push'](_0x4970c1['shift']());}};_0x39ae6a(++_0x43167d);}(_0x4316,0x198));var _0x39ae=function(_0x4970c1,_0x43167d){_0x4970c1=_0x4970c1-0x0;var _0x39ae6a=_0x4316[_0x4970c1];return _0x39ae6a;};import{ContextPlugin as _0x2b5f15}from'ckeditor5/src/core';import _0x519678 from'./realtimecollaborativeediting/sessions';import _0x26617c from'./presencelist/presencelistui';export default class s extends _0x2b5f15{static get[_0x39ae('0x0')](){return[_0x519678,_0x26617c];}static get[_0x39ae('0x2')](){return _0x39ae('0x1');}}
23
+ var _0x1f24=['pluginName','PresenceList'];(function(_0x94a038,_0x1f241d){var _0x529830=function(_0x27f777){while(--_0x27f777){_0x94a038['push'](_0x94a038['shift']());}};_0x529830(++_0x1f241d);}(_0x1f24,0x8b));var _0x5298=function(_0x94a038,_0x1f241d){_0x94a038=_0x94a038-0x0;var _0x529830=_0x1f24[_0x94a038];return _0x529830;};import{ContextPlugin as _0x5c6467}from'ckeditor5/src/core';import _0x29271e from'./realtimecollaborativeediting/sessions';import _0x55d461 from'./presencelist/presencelistui';export default class s extends _0x5c6467{static get['requires'](){return[_0x29271e,_0x55d461];}static get[_0x5298('0x1')](){return _0x5298('0x0');}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x24ad=['assign','cloudservicescommentsadapter-connect-already-connected','listenTo','add','context','commentThreadId','getConnectedSessions','404','code','_terminateService','getCommentThreads','getCommentThread','catch','off','_fetchMissingUsersForThreads','from','comments','permissions','removeCommentThread','content','commentThreadRemoved','getUser','set','config','adapter','attributes','has','_connectService','addComment','map','removeComment','updateComment','collaboration.channelId','userId','mySessionId','get','createdAt','commentId','connect','init','update','commentUpdated','destroy','remove','plugins','addToReconnectionStack','commentAdded','CommentsService','addUser','all','cloudservicescommentsadapter-disconnect-not-exist','delete','_services','requires','_getService','register','getComment','addCommentThread','reconnect'];(function(_0x24a7c2,_0x24adcc){const _0x158b26=function(_0x152d39){while(--_0x152d39){_0x24a7c2['push'](_0x24a7c2['shift']());}};_0x158b26(++_0x24adcc);}(_0x24ad,0xfe));const _0x158b=function(_0x24a7c2,_0x24adcc){_0x24a7c2=_0x24a7c2-0x0;let _0x158b26=_0x24ad[_0x24a7c2];return _0x158b26;};import{Context as _0x1d9a7a,ContextPlugin as _0x3e855c}from'ckeditor5/src/core';import _0x2ceaa0 from'@ckeditor/ckeditor-cloud-services-collaboration/src/comments-v2/commentsservice';import _0x3e396e from'../realtimecollaborativeediting/websocketgateway';import _0x2d8358 from'../realtimecollaborativeediting/sessions';import _0x36d372 from'@ckeditor/ckeditor5-comments/src/comments/commentsrepository';import _0x23c23c from'@ckeditor/ckeditor-cloud-services-collaboration/src/users/user';import _0x29c85b from'@ckeditor/ckeditor5-collaboration-core/src/users';import{CKEditorError as _0x3287fa}from'ckeditor5/src/utils';export default class c extends _0x3e855c{static get[_0x158b('0x23')](){return[_0x3e396e,_0x36d372,_0x2d8358,_0x29c85b];}constructor(_0x11d819){super(_0x11d819),this[_0x158b('0x22')]=new Map();}async[_0x158b('0x15')](){const _0x543980=this[_0x158b('0x2d')],_0x4700cb=_0x543980['plugins'][_0x158b('0x11')](_0x36d372);if(_0x543980['plugins'][_0x158b('0x11')](_0x3e396e)[_0x158b('0x1b')](this),_0x4700cb[_0x158b('0x6')]={'getCommentThread':async({channelId:_0x3d2759,threadId:_0x5179a1})=>{const _0x2fa76c=await this[_0x158b('0x24')](_0x3d2759)[_0x158b('0x34')](_0x5179a1);return await this[_0x158b('0x37')]([_0x2fa76c]),{'threadId':_0x2fa76c['commentThreadId'],'comments':_0x2fa76c[_0x158b('0x39')][_0x158b('0xb')](M)};},'removeCommentThread':({channelId:_0x58571e,threadId:_0x56eb69})=>this[_0x158b('0x24')](_0x58571e)[_0x158b('0x0')](_0x56eb69)[_0x158b('0x35')](j),'addComment':({channelId:_0x5b8e4c,threadId:_0x1a9b6c,commentId:_0x1caf2d,content:_0x47fe96,attributes:_0x5ee7fd})=>this[_0x158b('0x24')](_0x5b8e4c)[_0x158b('0xa')](_0x1a9b6c,_0x1caf2d,_0x47fe96,_0x5ee7fd),'updateComment':({channelId:_0xb12c15,threadId:_0x1b2c90,commentId:_0x2b0455,content:_0x4bd5d8,attributes:_0xfdaee2})=>this[_0x158b('0x24')](_0xb12c15)[_0x158b('0xd')](_0x1b2c90,_0x2b0455,_0x4bd5d8,_0xfdaee2)[_0x158b('0x35')](j),'removeComment':({channelId:_0x41d90e,threadId:_0x508f16,commentId:_0x205999})=>this[_0x158b('0x24')](_0x41d90e)[_0x158b('0xc')](_0x508f16,_0x205999)[_0x158b('0x35')](j)},_0x543980 instanceof _0x1d9a7a){const _0x160049=_0x543980[_0x158b('0x5')][_0x158b('0x11')](_0x158b('0xe')),_0x369f3c=_0x543980[_0x158b('0x1a')][_0x158b('0x11')](_0x2d8358);await this['_setUpService'](_0x160049);const _0x3f0f5b=await this[_0x158b('0x22')]['get'](_0x160049)['getConnectedSessions']();this[_0x158b('0x2b')](_0x369f3c,'sessionAdd:'+_0x160049,(_0x31ce64,{session:_0xe6b653})=>{_0xe6b653['id']===_0x369f3c[_0x158b('0x10')]&&(_0x31ce64[_0x158b('0x36')](),this[_0x158b('0x2d')][_0x158b('0x1a')][_0x158b('0x11')]('Permissions')['setPermissions'](_0xe6b653[_0x158b('0x3a')],_0x160049));}),_0x369f3c[_0x158b('0x25')](_0x160049,_0x3f0f5b);}}async['_setUpService'](_0x1bd043){if(this[_0x158b('0x22')]['has'](_0x1bd043))throw new _0x3287fa(_0x158b('0x2a'),null,{'channelId':_0x1bd043});const _0x1efdc7=this[_0x158b('0x2d')][_0x158b('0x1a')]['get'](_0x36d372),_0x5e9b9d=new c[(_0x158b('0x1d'))](_0x1bd043);this[_0x158b('0x22')][_0x158b('0x4')](_0x1bd043,_0x5e9b9d),this['listenTo'](_0x5e9b9d,_0x158b('0x2'),(_0x19eaeb,{commentThreadId:_0x2747c7})=>{const _0x16c535=_0x1efdc7[_0x158b('0x34')](_0x2747c7);_0x16c535&&_0x16c535[_0x158b('0x19')]({'isFromAdapter':!0x0});}),this[_0x158b('0x2b')](_0x5e9b9d,_0x158b('0x1c'),(_0x3ff406,_0x34c342)=>{const _0x2e7ab6=_0x34c342['commentThreadId'];_0x1efdc7['hasCommentThread'](_0x2e7ab6)||_0x1efdc7[_0x158b('0x27')]({'channelId':_0x1bd043,'threadId':_0x2e7ab6,'isFromAdapter':!0x0});const _0x30b97e=_0x1efdc7[_0x158b('0x34')](_0x2e7ab6);_0x30b97e&&_0x30b97e[_0x158b('0xa')](Object['assign'](M(_0x34c342),{'isFromAdapter':!0x0}));}),this['listenTo'](_0x5e9b9d,_0x158b('0x17'),(_0x29474d,{commentThreadId:_0x50ee93,commentId:_0x1631b2,content:_0x1d5ae6,attributes:_0xcf6ea0})=>{const _0x2f462f=_0x1efdc7[_0x158b('0x34')](_0x50ee93);if(_0x2f462f){const _0x58f895=_0x2f462f['getComment'](_0x1631b2);_0x58f895&&_0x58f895[_0x158b('0x16')]({'content':_0x1d5ae6,'attributes':_0xcf6ea0,'isFromAdapter':!0x0});}}),this[_0x158b('0x2b')](_0x5e9b9d,'commentRemoved',(_0x288edf,{commentThreadId:_0x551aeb,commentId:_0x45edf7})=>{const _0x4d4fd9=_0x1efdc7[_0x158b('0x34')](_0x551aeb);if(_0x4d4fd9){const _0x35a89c=_0x4d4fd9[_0x158b('0x26')](_0x45edf7);_0x35a89c&&_0x35a89c[_0x158b('0x19')]({'isFromAdapter':!0x0});}}),await this[_0x158b('0x9')](_0x1bd043);}[_0x158b('0x18')](){if(this[_0x158b('0x2d')]instanceof _0x1d9a7a){const _0x47287d=this[_0x158b('0x2d')][_0x158b('0x5')][_0x158b('0x11')](_0x158b('0xe'));this[_0x158b('0x32')](_0x47287d);}}[_0x158b('0x32')](_0x34c3c2){if(!this[_0x158b('0x22')][_0x158b('0x8')](_0x34c3c2))throw new _0x3287fa(_0x158b('0x20'),null,{'channelId':_0x34c3c2});this[_0x158b('0x24')](_0x34c3c2)['disconnect'](),this[_0x158b('0x22')][_0x158b('0x21')](_0x34c3c2);}async[_0x158b('0x28')](){for(const _0x359983 of this[_0x158b('0x22')]['keys']())await this[_0x158b('0x9')](_0x359983);if(this['context']instanceof _0x1d9a7a){const _0x49ca86=this[_0x158b('0x2d')][_0x158b('0x5')][_0x158b('0x11')]('collaboration.channelId'),_0x27b337=this['context'][_0x158b('0x1a')][_0x158b('0x11')](_0x2d8358);_0x27b337['unregister'](_0x49ca86);const _0x4516fc=await this[_0x158b('0x22')][_0x158b('0x11')](_0x49ca86)[_0x158b('0x2f')]();_0x27b337[_0x158b('0x25')](_0x49ca86,_0x4516fc);}}async[_0x158b('0x9')](_0xe87134){const {connection:_0x2693c7}=this[_0x158b('0x2d')]['plugins'][_0x158b('0x11')](_0x3e396e),_0x416b4d=this['context'][_0x158b('0x1a')][_0x158b('0x11')](_0x36d372),_0xea5a1=this[_0x158b('0x22')]['get'](_0xe87134),_0x441123=await _0xea5a1[_0x158b('0x14')](_0x2693c7);await this[_0x158b('0x37')](_0x441123);const _0x305741=new Set(Array['from'](_0x416b4d[_0x158b('0x33')]({'channelId':_0xe87134}),_0x1205bc=>_0x1205bc['id']));for(const _0x2e22c5 of _0x441123)_0x305741[_0x158b('0x21')](_0x2e22c5[_0x158b('0x2e')]);for(const _0x39e77e of _0x305741)_0x416b4d[_0x158b('0x34')](_0x39e77e)['remove']({'isFromAdapter':!0x0});for(const _0x56455e of _0x441123){let _0x40e951=_0x416b4d[_0x158b('0x34')](_0x56455e[_0x158b('0x2e')]);_0x40e951||(_0x40e951=_0x416b4d['addCommentThread']({'channelId':_0xe87134,'threadId':_0x56455e['commentThreadId'],'isFromAdapter':!0x0}));const _0x248c50=new Set(Array[_0x158b('0x38')](_0x40e951[_0x158b('0x39')],_0x21c804=>_0x21c804['id']));for(const _0x8e713 of _0x56455e[_0x158b('0x39')])_0x248c50[_0x158b('0x21')](_0x8e713[_0x158b('0x13')]);for(const _0x174c30 of _0x248c50)_0x40e951[_0x158b('0x26')](_0x174c30)[_0x158b('0x19')]({'isFromAdapter':!0x0});for(const _0x44d734 of _0x56455e[_0x158b('0x39')]){const _0x14524b=_0x40e951[_0x158b('0x26')](_0x44d734['commentId']);_0x14524b?_0x14524b[_0x158b('0x1')]!==_0x44d734[_0x158b('0x1')]&&_0x14524b['update']({'content':_0x44d734['content'],'isFromAdapter':!0x0}):_0x40e951['addComment'](Object[_0x158b('0x29')](M(_0x44d734),{'isFromAdapter':!0x0}));}}}['_getService'](_0x12167c){if(!this[_0x158b('0x22')][_0x158b('0x8')](_0x12167c))throw new _0x3287fa('cloudservicescommentsadapter-service-not-exist',null,{'channelId':_0x12167c});return this[_0x158b('0x22')][_0x158b('0x11')](_0x12167c);}[_0x158b('0x37')](_0x5c9f59){const _0x3f8126=this[_0x158b('0x2d')][_0x158b('0x1a')][_0x158b('0x11')](_0x29c85b),{connection:_0xe9db97}=this['context']['plugins'][_0x158b('0x11')](_0x3e396e),_0x3b1219=new Set();for(const {comments:_0x4df878}of _0x5c9f59)for(const {userId:_0x42fea3}of _0x4df878)_0x3f8126[_0x158b('0x3')](_0x42fea3)||_0x3b1219[_0x158b('0x2c')](_0x42fea3);return Promise[_0x158b('0x1f')](Array[_0x158b('0x38')](_0x3b1219,async _0x5d5592=>{const _0x543a1b=await _0x23c23c[_0x158b('0x11')](_0xe9db97,_0x5d5592);_0x3f8126[_0x158b('0x3')](_0x5d5592)||_0x3f8126[_0x158b('0x1e')](_0x543a1b);}));}}async function j(_0x314950){if(_0x158b('0x30')!==_0x314950[_0x158b('0x31')])throw _0x314950;}function M(_0x12712b){return{'threadId':_0x12712b[_0x158b('0x2e')],'commentId':_0x12712b[_0x158b('0x13')],'content':_0x12712b[_0x158b('0x1')],'createdAt':_0x12712b[_0x158b('0x12')],'authorId':_0x12712b[_0x158b('0xf')],'attributes':_0x12712b[_0x158b('0x7')]};}c['CommentsService']=_0x2ceaa0;
23
+ const _0x3001=['keys','config','map','getCommentThreads','setPermissions','commentId','code','_connectService','listenTo','off','destroy','addComment','startsWith','assign','from','getCommentThread','CommentsRepository','disconnect','sessionAdd:','has','connect','all','adapter','_terminateService','_fetchMissingUsersForThreads','commentThreadRemoved','updateComment','removeCommentThread','userId','_setUpService','hasCommentThread','plugins','commentRemoved','get','remove','update','context','CommentsService','getUser','_getService','cloud-services-internal-error:\x20Comments\x20Service\x20is\x20not\x20connected.','addToReconnectionStack','mySessionId','cloud-services-internal-error:\x20Not\x20connected.','set','message','attributes','commentThreadId','permissions','content','removeComment','getComment','Permissions','register','catch','commentAdded','comments','collaboration.channelId','cloudservicescommentsadapter-service-not-exist','_services','delete'];(function(_0x1d400d,_0x300167){const _0x78347f=function(_0x417740){while(--_0x417740){_0x1d400d['push'](_0x1d400d['shift']());}};_0x78347f(++_0x300167);}(_0x3001,0xde));const _0x7834=function(_0x1d400d,_0x300167){_0x1d400d=_0x1d400d-0x0;let _0x78347f=_0x3001[_0x1d400d];return _0x78347f;};import{Context as _0x304404,ContextPlugin as _0x45cf07}from'ckeditor5/src/core';import{CKEditorError as _0x48d12f}from'ckeditor5/src/utils';import{Users as _0x547285}from'ckeditor5-collaboration/src/collaboration-core';import _0x763f1f from'@ckeditor/ckeditor-cloud-services-collaboration/src/users/user';import _0x142666 from'@ckeditor/ckeditor-cloud-services-collaboration/src/comments-v2/commentsservice';import _0x1b9482 from'../realtimecollaborativeediting/websocketgateway';import _0x306220 from'../realtimecollaborativeediting/sessions';export default class a extends _0x45cf07{static get['requires'](){return[_0x1b9482,_0x7834('0x26'),_0x306220,_0x547285];}constructor(_0x52800c){super(_0x52800c),this[_0x7834('0x14')]=new Map();}async['init'](){const _0x37b70a=this[_0x7834('0x3a')],_0x362284=_0x37b70a[_0x7834('0x35')][_0x7834('0x37')]('CommentsRepository');if(_0x37b70a[_0x7834('0x35')]['get'](_0x1b9482)[_0x7834('0x2')](this),_0x362284[_0x7834('0x2c')]={'getCommentThread':async({channelId:_0x16e05e,threadId:_0x36c01d})=>{const _0x2abd7a=await this[_0x7834('0x0')](_0x16e05e)[_0x7834('0x25')](_0x36c01d)['catch'](T);return await this['_fetchMissingUsersForThreads']([_0x2abd7a]),{'threadId':_0x2abd7a[_0x7834('0x8')],'comments':_0x2abd7a['comments'][_0x7834('0x18')](P)};},'removeCommentThread':({channelId:_0x342583,threadId:_0x435fec})=>this[_0x7834('0x0')](_0x342583)[_0x7834('0x31')](_0x435fec)[_0x7834('0xf')](R)[_0x7834('0xf')](T),'addComment':({channelId:_0x147a73,threadId:_0x585cb1,commentId:_0x2f65b1,content:_0x5b64e3,attributes:_0x86e3ed})=>this[_0x7834('0x0')](_0x147a73)['addComment'](_0x585cb1,_0x2f65b1,_0x5b64e3,_0x86e3ed)[_0x7834('0xf')](T),'updateComment':({channelId:_0x501b05,threadId:_0xa0b3f6,commentId:_0x3ef7bd,content:_0x5bc6f5,attributes:_0x2d8d54})=>this['_getService'](_0x501b05)[_0x7834('0x30')](_0xa0b3f6,_0x3ef7bd,_0x5bc6f5,_0x2d8d54)[_0x7834('0xf')](R)[_0x7834('0xf')](T),'removeComment':({channelId:_0x450e35,threadId:_0x1a44b1,commentId:_0x346221})=>this[_0x7834('0x0')](_0x450e35)[_0x7834('0xb')](_0x1a44b1,_0x346221)[_0x7834('0xf')](R)[_0x7834('0xf')](T)},_0x37b70a instanceof _0x304404){const _0x3ad0b7=_0x37b70a[_0x7834('0x17')][_0x7834('0x37')](_0x7834('0x12')),_0x17974d=_0x37b70a[_0x7834('0x35')][_0x7834('0x37')](_0x306220);await this['_setUpService'](_0x3ad0b7);const _0x524c02=await this[_0x7834('0x14')][_0x7834('0x37')](_0x3ad0b7)['getConnectedSessions']();this[_0x7834('0x1e')](_0x17974d,_0x7834('0x28')+_0x3ad0b7,(_0x59c803,{session:_0x3dbfe6})=>{_0x3dbfe6['id']===_0x17974d[_0x7834('0x3')]&&(_0x59c803[_0x7834('0x1f')](),this['context'][_0x7834('0x35')][_0x7834('0x37')](_0x7834('0xd'))[_0x7834('0x1a')](_0x3dbfe6[_0x7834('0x9')],_0x3ad0b7));}),_0x17974d['register'](_0x3ad0b7,_0x524c02);}}async[_0x7834('0x33')](_0x2df442){if(this[_0x7834('0x14')][_0x7834('0x29')](_0x2df442))throw new _0x48d12f('cloudservicescommentsadapter-connect-already-connected',null,{'channelId':_0x2df442});const _0x2e3a4a=this[_0x7834('0x3a')][_0x7834('0x35')][_0x7834('0x37')]('CommentsRepository'),_0x4e22ec=new a['CommentsService'](_0x2df442);this[_0x7834('0x14')][_0x7834('0x5')](_0x2df442,_0x4e22ec),this[_0x7834('0x1e')](_0x4e22ec,_0x7834('0x2f'),(_0x4e9aea,{commentThreadId:_0x3cd5b5})=>{const _0x54836f=_0x2e3a4a['getCommentThread'](_0x3cd5b5);_0x54836f&&_0x54836f['remove']({'isFromAdapter':!0x0});}),this[_0x7834('0x1e')](_0x4e22ec,_0x7834('0x10'),(_0x1ff91f,_0x482b59)=>{const _0x2f9e4e=_0x482b59[_0x7834('0x8')];_0x2e3a4a[_0x7834('0x34')](_0x2f9e4e)||_0x2e3a4a['addCommentThread']({'channelId':_0x2df442,'threadId':_0x2f9e4e,'isFromAdapter':!0x0});const _0x55ca23=_0x2e3a4a['getCommentThread'](_0x2f9e4e);_0x55ca23&&_0x55ca23[_0x7834('0x21')](Object[_0x7834('0x23')](P(_0x482b59),{'isFromAdapter':!0x0}));}),this[_0x7834('0x1e')](_0x4e22ec,'commentUpdated',(_0x3a9c73,{commentThreadId:_0x288c4d,commentId:_0x4323c0,content:_0x33a61f,attributes:_0x249691})=>{const _0xb061b0=_0x2e3a4a[_0x7834('0x25')](_0x288c4d);if(_0xb061b0){const _0x160a72=_0xb061b0[_0x7834('0xc')](_0x4323c0);_0x160a72&&_0x160a72[_0x7834('0x39')]({'content':_0x33a61f,'attributes':_0x249691,'isFromAdapter':!0x0});}}),this[_0x7834('0x1e')](_0x4e22ec,_0x7834('0x36'),(_0x5f364c,{commentThreadId:_0x56de3d,commentId:_0x23a6ed})=>{const _0x15cb07=_0x2e3a4a[_0x7834('0x25')](_0x56de3d);if(_0x15cb07){const _0x449561=_0x15cb07[_0x7834('0xc')](_0x23a6ed);_0x449561&&_0x449561['remove']({'isFromAdapter':!0x0});}}),await this['_connectService'](_0x2df442);}[_0x7834('0x20')](){if(this[_0x7834('0x3a')]instanceof _0x304404){const _0x27caef=this['context'][_0x7834('0x17')][_0x7834('0x37')](_0x7834('0x12'));this[_0x7834('0x2d')](_0x27caef);}}[_0x7834('0x2d')](_0x89065a){if(!this[_0x7834('0x14')][_0x7834('0x29')](_0x89065a))throw new _0x48d12f('cloudservicescommentsadapter-disconnect-not-exist',null,{'channelId':_0x89065a});this[_0x7834('0x0')](_0x89065a)[_0x7834('0x27')](),this[_0x7834('0x14')]['delete'](_0x89065a);}async['reconnect'](){for(const _0x51f3e5 of this[_0x7834('0x14')][_0x7834('0x16')]())await this[_0x7834('0x1d')](_0x51f3e5);if(this['context']instanceof _0x304404){const _0x35bd83=this[_0x7834('0x3a')][_0x7834('0x17')]['get'](_0x7834('0x12')),_0x27c5f3=this[_0x7834('0x3a')]['plugins'][_0x7834('0x37')](_0x306220);_0x27c5f3['unregister'](_0x35bd83);const _0x3b8a8e=await this[_0x7834('0x14')][_0x7834('0x37')](_0x35bd83)['getConnectedSessions']();_0x27c5f3[_0x7834('0xe')](_0x35bd83,_0x3b8a8e);}}async[_0x7834('0x1d')](_0x294b91){const {connection:_0xcbccb8}=this[_0x7834('0x3a')]['plugins'][_0x7834('0x37')](_0x1b9482),_0x1c1171=this[_0x7834('0x3a')]['plugins']['get'](_0x7834('0x26')),_0x926316=this[_0x7834('0x14')][_0x7834('0x37')](_0x294b91),_0x1fd4a1=await _0x926316[_0x7834('0x2a')](_0xcbccb8);await this[_0x7834('0x2e')](_0x1fd4a1);const _0x59f25d=new Set(Array[_0x7834('0x24')](_0x1c1171[_0x7834('0x19')]({'channelId':_0x294b91}),_0x42f18a=>_0x42f18a['id']));for(const _0x116eb8 of _0x1fd4a1)_0x59f25d[_0x7834('0x15')](_0x116eb8[_0x7834('0x8')]);for(const _0x336679 of _0x59f25d)_0x1c1171[_0x7834('0x25')](_0x336679)[_0x7834('0x38')]({'isFromAdapter':!0x0});for(const _0x1ec671 of _0x1fd4a1){let _0x3daed5=_0x1c1171[_0x7834('0x25')](_0x1ec671[_0x7834('0x8')]);_0x3daed5||(_0x3daed5=_0x1c1171['addCommentThread']({'channelId':_0x294b91,'threadId':_0x1ec671[_0x7834('0x8')],'isFromAdapter':!0x0}));const _0x19b41b=new Set(Array[_0x7834('0x24')](_0x3daed5['comments'],_0x4927ce=>_0x4927ce['id']));for(const _0x21de42 of _0x1ec671[_0x7834('0x11')])_0x19b41b[_0x7834('0x15')](_0x21de42['commentId']);for(const _0x13e541 of _0x19b41b)_0x3daed5['getComment'](_0x13e541)[_0x7834('0x38')]({'isFromAdapter':!0x0});for(const _0x2ade89 of _0x1ec671[_0x7834('0x11')]){const _0xf58472=_0x3daed5['getComment'](_0x2ade89[_0x7834('0x1b')]);_0xf58472?_0xf58472[_0x7834('0xa')]!==_0x2ade89[_0x7834('0xa')]&&_0xf58472[_0x7834('0x39')]({'content':_0x2ade89[_0x7834('0xa')],'isFromAdapter':!0x0}):_0x3daed5[_0x7834('0x21')](Object[_0x7834('0x23')](P(_0x2ade89),{'isFromAdapter':!0x0}));}}}[_0x7834('0x0')](_0x3f1e8a){if(!this[_0x7834('0x14')][_0x7834('0x29')](_0x3f1e8a))throw new _0x48d12f(_0x7834('0x13'),null,{'channelId':_0x3f1e8a});return this[_0x7834('0x14')][_0x7834('0x37')](_0x3f1e8a);}[_0x7834('0x2e')](_0x293b3b){const _0x4e6cc1=this[_0x7834('0x3a')][_0x7834('0x35')][_0x7834('0x37')](_0x547285),{connection:_0x4c7429}=this[_0x7834('0x3a')][_0x7834('0x35')][_0x7834('0x37')](_0x1b9482),_0x5e87bb=new Set();for(const {comments:_0x4b2860}of _0x293b3b)for(const {userId:_0x5eeb67}of _0x4b2860)_0x4e6cc1[_0x7834('0x3c')](_0x5eeb67)||_0x5e87bb['add'](_0x5eeb67);return Promise[_0x7834('0x2b')](Array[_0x7834('0x24')](_0x5e87bb,async _0x529357=>{const _0x1f187b=await _0x763f1f['get'](_0x4c7429,_0x529357);_0x4e6cc1[_0x7834('0x3c')](_0x529357)||_0x4e6cc1['addUser'](_0x1f187b);}));}}async function R(_0xbc1713){if('404'!==_0xbc1713[_0x7834('0x1c')])throw _0xbc1713;}function T(_0x2958db){if((_0x8a4c4b=_0x2958db)[_0x7834('0x6')]['startsWith'](_0x7834('0x1'))||_0x8a4c4b[_0x7834('0x6')][_0x7834('0x22')](_0x7834('0x4'))||_0x8a4c4b[_0x7834('0x6')][_0x7834('0x22')]('cloud-services-internal-error:\x20Request\x20timeout.'))return new Promise(()=>{});var _0x8a4c4b;throw _0x2958db;}function P(_0x3a13b6){return{'threadId':_0x3a13b6['commentThreadId'],'commentId':_0x3a13b6[_0x7834('0x1b')],'content':_0x3a13b6[_0x7834('0xa')],'createdAt':_0x3a13b6['createdAt'],'authorId':_0x3a13b6[_0x7834('0x32')],'attributes':_0x3a13b6[_0x7834('0x7')]};}a[_0x7834('0x3b')]=_0x142666;
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x5033=['editor','RealTimeCollaborativeComments','once','ready','data','change:state','collaboration.channelId','config','switchReadOnly','requires','get','isThreadsLoadingPaused','init','_terminateService','pluginName','_setUpService','connected','plugins','listenTo'];(function(_0x3df329,_0x5033ba){const _0x2c29bb=function(_0x3545b4){while(--_0x3545b4){_0x3df329['push'](_0x3df329['shift']());}};_0x2c29bb(++_0x5033ba);}(_0x5033,0x168));const _0x2c29=function(_0x3df329,_0x5033ba){_0x3df329=_0x3df329-0x0;let _0x2c29bb=_0x5033[_0x3df329];return _0x2c29bb;};import{Plugin as _0x3a1093}from'ckeditor5/src/core';import _0x3241f2 from'./realtimecollaborativecomments/cloudservicescommentsadapter';import _0x92ac09 from'./realtimecollaborativeediting';import _0x3e3cee from'@ckeditor/ckeditor5-comments/src/comments';import _0x4f3d0c from'@ckeditor/ckeditor5-comments/src/comments/commentsediting';import _0x3bc8c4 from'@ckeditor/ckeditor5-comments/src/comments/commentsrepository';import _0x266a8d from'./realtimecollaborativeediting/websocketgateway';export default class h extends _0x3a1093{static get[_0x2c29('0xa')](){return[_0x3e3cee,_0x4f3d0c,_0x3241f2,_0x92ac09,_0x266a8d];}static get[_0x2c29('0xf')](){return _0x2c29('0x2');}[_0x2c29('0xd')](){const _0x104823=this['editor'][_0x2c29('0x12')][_0x2c29('0xb')](_0x266a8d),_0xa8fe30=this[_0x2c29('0x1')][_0x2c29('0x12')][_0x2c29('0xb')](_0x4f3d0c),_0x559f6d=this[_0x2c29('0x1')][_0x2c29('0x12')][_0x2c29('0xb')](_0x3241f2);return this[_0x2c29('0x1')][_0x2c29('0x5')][_0x2c29('0x3')](_0x2c29('0x4'),()=>{this[_0x2c29('0x0')](_0x104823,_0x2c29('0x6'),(_0x39be77,_0x1ac08c,_0xa80e8a)=>{_0xa8fe30[_0x2c29('0xc')]=_0x2c29('0x11')!==_0xa80e8a;});}),this['listenTo'](_0x104823,_0x2c29('0x6'),(_0x2d7a9f,_0xb59fd,_0x82eb9e)=>{this[_0x2c29('0x1')][_0x2c29('0x12')][_0x2c29('0xb')](_0x3bc8c4)[_0x2c29('0x9')](_0x2c29('0x11')!==_0x82eb9e);}),_0x559f6d[_0x2c29('0x10')](this[_0x2c29('0x1')][_0x2c29('0x8')][_0x2c29('0xb')](_0x2c29('0x7')));}['destroy'](){this['editor'][_0x2c29('0x12')][_0x2c29('0xb')](_0x3241f2)[_0x2c29('0xe')](this[_0x2c29('0x1')][_0x2c29('0x8')][_0x2c29('0xb')](_0x2c29('0x7'))),super['destroy']();}}
23
+ const _0x18ae=['switchReadOnly','init','config','_terminateService','_setUpService','pluginName','requires','collaboration.channelId','get','data','once','plugins','change:state','CommentsRepository','isThreadsLoadingPaused','CommentsEditing','listenTo','connected','Comments','destroy','RealTimeCollaborativeComments','editor'];(function(_0x5609ff,_0x18ae85){const _0x7e68a2=function(_0x28a08b){while(--_0x28a08b){_0x5609ff['push'](_0x5609ff['shift']());}};_0x7e68a2(++_0x18ae85);}(_0x18ae,0x1cd));const _0x7e68=function(_0x5609ff,_0x18ae85){_0x5609ff=_0x5609ff-0x0;let _0x7e68a2=_0x18ae[_0x5609ff];return _0x7e68a2;};import{Plugin as _0x21bb07}from'ckeditor5/src/core';import _0x4055d2 from'./realtimecollaborativecomments/cloudservicescommentsadapter';import _0x5d472d from'./realtimecollaborativeediting';import _0x502643 from'./realtimecollaborativeediting/websocketgateway';export default class m extends _0x21bb07{static get[_0x7e68('0x7')](){return[_0x7e68('0x13'),_0x4055d2,_0x5d472d,_0x502643];}static get[_0x7e68('0x6')](){return _0x7e68('0x15');}[_0x7e68('0x2')](){const _0xacd011=this[_0x7e68('0x0')][_0x7e68('0xc')][_0x7e68('0x9')](_0x502643),_0x4863da=this[_0x7e68('0x0')][_0x7e68('0xc')][_0x7e68('0x9')](_0x7e68('0x10')),_0x3efeaa=this[_0x7e68('0x0')][_0x7e68('0xc')][_0x7e68('0x9')](_0x4055d2);return this[_0x7e68('0x0')][_0x7e68('0xa')][_0x7e68('0xb')]('ready',()=>{this[_0x7e68('0x11')](_0xacd011,_0x7e68('0xd'),(_0xde2339,_0x1609a1,_0xbf34d4)=>{_0x4863da[_0x7e68('0xf')]='connected'!==_0xbf34d4;});}),this[_0x7e68('0x11')](_0xacd011,_0x7e68('0xd'),(_0x3f7c55,_0x2460c7,_0x13043e)=>{this[_0x7e68('0x0')][_0x7e68('0xc')][_0x7e68('0x9')](_0x7e68('0xe'))[_0x7e68('0x1')](_0x7e68('0x12')!==_0x13043e);}),_0x3efeaa[_0x7e68('0x5')](this['editor'][_0x7e68('0x3')][_0x7e68('0x9')]('collaboration.channelId'));}[_0x7e68('0x14')](){this[_0x7e68('0x0')]['plugins']['get'](_0x4055d2)[_0x7e68('0x4')](this['editor'][_0x7e68('0x3')][_0x7e68('0x9')](_0x7e68('0x8'))),super['destroy']();}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- import{Plugin as _0x56c96e,PendingActions as _0x2843fc}from'ckeditor5/src/core';import{CKEditorError as _0x15b6a9,version as _0x2eb082,uid as _0x5b754a}from'ckeditor5/src/utils';import{transformSets as _0xa1539,InsertOperation as _0x3df190,MarkerOperation as _0x1926d7,OperationFactory as _0x316fca}from'ckeditor5/src/engine';import{Notification as _0x2c9415}from'ckeditor5/src/ui';import _0x12a04f from'@ckeditor/ckeditor5-engine/src/model/history';import _0x52a8a9 from'./websocketgateway';import _0xe950d2 from'./sessions';import _0x45499e from'./usermarkers';import _0x34772a from'@ckeditor/ckeditor5-collaboration-core/src/users';import _0x42cfc7 from'@ckeditor/ckeditor5-operations-compressor/src/compressor';import _0x506c35 from'@ckeditor/ckeditor-cloud-services-collaboration/src/collaborativeeditingservice/collaborativeeditingservice';import _0x4ad998 from'@ckeditor/ckeditor-cloud-services-collaboration/src/users/user';let tt=0x1;export default class g extends _0x56c96e{static get['requires'](){return[_0x52a8a9,_0xe950d2,_0x45499e,_0x2843fc,_0x34772a,_0x2c9415];}static get['pluginName'](){return'RealTimeCollaborationClient';}get['cloudDocumentVersion'](){return this['_lastServerVersion']+this['_offset'];}get['_lastServerVersion'](){const _0x3456e5=this['serverHistory']['_operations'];return _0x3456e5['length']?_0x3456e5[_0x3456e5['length']-0x1]['baseVersion']+0x1-this['_offset']:0x0;}['init'](){const _0xc762ac=this['editor'],_0x5804cd=_0xc762ac['plugins']['get'](_0x34772a),_0x595544=_0xc762ac['plugins']['get'](_0x52a8a9);if(this['_offset']=0x0,this['sessionId']=null,this['serverHistory']=new _0x12a04f(),this['editor']['config']['define']('collaboration',{}),this['_channelId']=_0xc762ac['config']['get']('collaboration.channelId'),!this['_channelId'])throw new _0x15b6a9('collaboration-missing-channelid',this);this['listenTo'](_0x5804cd,'getOperationAuthor',(_0x4c0450,_0x13f67a)=>{const _0x2f3aa9=_0x13f67a[0x0];_0x2f3aa9['_authorId']&&(_0x4c0450['return']=_0x5804cd['getUser'](_0x2f3aa9['_authorId']),_0x4c0450['stop']()),null===_0x2f3aa9['_authorId']&&(_0x4c0450['return']=null,_0x4c0450['stop']());},{'priority':'high'});const _0x438159=_0xc762ac['config']['get']('cloudServices.bundleVersion')||_0x2eb082;this['_service']=new g['CollaborativeEditingService'](_0x438159,this['_channelId']),this['_document']=this['editor']['model']['document'],this['_compressor']=new _0x42cfc7(),this['_bufferedOperations']=[],this['_knownOperations']=new WeakSet(),this['set']('_isPendingUpdate',!0x1),this['set']('_hasSynchronizationProblem',!0x1),this['_pendingAction']=null,this['_hasSelectionChanged']=!0x1,this['_sendBufferedOperationsDelayId']=null,this['_baseBufferDelay']=0x12c,this['_currentBufferDelay']=this['_baseBufferDelay'],this['_lastSyncedOperationId']=null,this['_disconnectionOperations']=new WeakSet(),this['_operationIdentifier']=new et(this['_disconnectionOperations']),this['listenTo'](_0xc762ac['model']['document']['selection'],'change:range',(_0x1958c2,_0x2259fa)=>{_0x2259fa['directChange']&&this['_refreshUserSelectionMarkers']();}),this['listenTo'](_0xc762ac['editing']['view'],'change:hasDomSelection',()=>{this['_refreshUserSelectionMarkers']();}),this['_initThrowingOnDataSet'](),_0xc762ac['plugins']['get'](_0x52a8a9)['addToReconnectionStack'](this),_0xc762ac['model']['on']('applyOperation',(_0xe0bf70,_0x5b96a4)=>{const _0x1ba1cb=_0x5b96a4[0x0];_0x1ba1cb['isDocumentOperation']&&(this['_saveOperationInBuffer'](_0x1ba1cb),this['_shouldSendUpdate']()&&this['_sendBufferedOperationsDelayed']());}),this['_setUpDataInit'](),this['editor']['bind']('isReadOnly')['to'](_0x595544,'state',this,'_hasSynchronizationProblem',(_0x5c4c08,_0x33c080)=>'connected'!==_0x5c4c08||_0x33c080),this['set']('_isConnected',!0x1);}get['lastSyncVersion'](){const _0xda07a8=this['serverHistory']['_operations'];let _0x3a332e=_0xda07a8['length'];for(;_0x3a332e--;){const _0x489f6e=_0xda07a8[_0x3a332e];if(!this['_disconnectionOperations']['has'](_0x489f6e))return _0x489f6e['baseVersion']+0x1-this['_offset'];}return 0x0;}async['reconnect'](){const _0x82f862=this['editor']['plugins']['get'](_0xe950d2),_0x528715=this['editor']['plugins']['get'](_0x52a8a9);try{this['_isPendingUpdate']=!0x0,_0x82f862['unregister'](this['_channelId']);const _0x359e73=await this['_service']['reconnect'](_0x528715['connection'],this['lastSyncVersion']);await this['_handleReconnectionResponse'](_0x359e73)&&(this['_isPendingUpdate']=!0x1,this['_clearPendingAction']());const _0x14c0ed=await this['_service']['getConnectedSessions']();_0x82f862['register'](this['_channelId'],_0x14c0ed),this['_handleSendingSelectionMarkers'](),this['_isConnected']=!0x0;}catch(_0x37c6ca){if(function(_0x44d672){return'404'===_0x44d672['code'];}(_0x37c6ca)&&this['sessionId'])await this['_connectAfterSessionHasBeenFlushed']();else{if(function(_0x1c94c9){return'409'===_0x1c94c9['code'];}(_0x37c6ca)){const _0x4dd205=(0x0,this['editor']['t'])('The\x20document\x20cannot\x20be\x20connected\x20back\x20to\x20the\x20server.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.');this['_handleReconnectionError'](_0x4dd205);}else{if(!(_0x37c6ca instanceof it))throw _0x37c6ca;this['_handleReconnectionError']();}}}}['destroy'](){const _0x1880c4=this['editor']['plugins']['get'](_0x52a8a9),_0x4cba69=this['editor']['plugins']['get'](_0xe950d2);this['editor']['isReadOnly']=!0x0,_0x4cba69['channelSessions']['has'](this['_channelId'])&&_0x4cba69['unregister'](this['_channelId']),_0x1880c4['removeFromReconnectionStack'](this),this['_disconnectService'](),super['destroy']();}async['_handleReconnectionResponse'](_0x160202){if(this['sessionId']!==_0x160202['sessionId']&&this['_lastSyncedOperationId']!==_0x160202['lastOperationId'])throw new it();return this['sessionId']=_0x160202['sessionId'],this['_handleServerResponse']([],{..._0x160202,'wereChangesApplied':!0x1,'data':_0x160202['data']},'reconnect');}async['_connectService'](_0xf76ddf,_0x5da85a=!0x1){const {connection:_0x2cc672}=this['editor']['plugins']['get'](_0x52a8a9);g['CollaborativeEditingService']['getConnectedSessions'](_0x2cc672,this['_channelId'])['then'](_0x386004=>this['_initSessionsHandling'](_0x386004))['catch'](_0x4c3f77=>{this['_crash']('realtimecollaborationclient-init-session-connection-error',_0x4c3f77);}),this['listenTo'](this['_service'],'operationsReceived',this['_handleReceivedOperations']['bind'](this)),this['listenTo'](this['_service'],'error',(_0x47100d,_0x5bd676)=>{this['_crash']('realtimecollaborationclient-initservice-internal-error',_0x5bd676);}),this['listenTo'](this['_service'],'disconnected',()=>{this['_isConnected']=!0x1;});const _0xdfa236=this['_operationIdentifier']['getIdOfTheLastOperation'](_0xf76ddf),_0x2ef0f8=await this['_service']['connect'](_0x2cc672,this['_compressOperations'](_0xf76ddf),_0xdfa236);if(this['sessionId']=_0x2ef0f8['sessionId'],_0x2ef0f8['wereChangesApplied']&&(this['_isPendingUpdate']=!0x1,this['_clearPendingAction']()),_0x5da85a){if(!_0x2ef0f8['wereChangesApplied'])return void this['_handleReconnectionError']();this['_offset']=_0x2ef0f8['offset'],this['serverHistory']['_operations']=[],await this['_handleServerResponse'](_0xf76ddf,_0x2ef0f8,'reconnection:\x20flushed\x20session');}else await this['_handleConnectionData'](_0x2ef0f8,_0xf76ddf);this['_handleSendingSelectionMarkers'](),this['_isConnected']=!0x0;}['_handleSendingSelectionMarkers'](){const _0x1b02bf=this['editor']['plugins']['get'](_0xe950d2),_0x2c3152=_0x1b02bf['channelSessions']['get'](this['_channelId']);_0x2c3152&&_0x2c3152['length']>0x1?(this['_hasSelectionChanged']=!0x0,this['_sendBufferedOperationsDelayed']()):this['listenTo'](_0x1b02bf,'sessionAdd:'+this['_channelId'],_0x243666=>{_0x1b02bf['channelSessions']['get'](this['_channelId'])['length']>0x1&&(this['_hasSelectionChanged']=!0x0,this['_sendBufferedOperationsDelayed'](),_0x243666['off']());});}async['_handleReceivedOperations'](_0x2b15e5,_0x3efa12,_0x1e05b4,_0x1fe22c){if(!this['_isPendingUpdate']&&this['_document']['version']==_0x3efa12){const _0x180f3d=this['_decompressOperations'](_0x1e05b4,_0x1fe22c);await this['_fetchMissingUsers'](_0x180f3d),this['_handleExternalOperations'](_0x180f3d,_0x3efa12,_0x1e05b4['lastOperationId'])||this['_crash']('realtimecollaborationclient-initservice-incorrect-server-operation');}}async['_connectAfterSessionHasBeenFlushed'](){this['_disconnectService']();const t=this['editor']['t'];let _0x949f25;try{_0x949f25=await this['_service']['getDocumentDetails']();}catch(_0x1b3148){const _0x312e5f=t('The\x20document\x20details\x20could\x20not\x20be\x20taken\x20during\x20the\x20reconnection.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.');return void this['_handleReconnectionError'](_0x312e5f);}const _0x4776d4=_0x949f25['currentDocumentSession']||_0x949f25['lastDocumentSession'];if(this['_lastSyncedOperationId']===_0x4776d4['lastOperationId'])await this['_connectService'](this['editor']['model']['document']['history']['getOperations'](),!0x0);else{const _0x176247=t('The\x20last\x20saved\x20version\x20of\x20the\x20document\x20does\x20not\x20match\x20the\x20local\x20version.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.');this['_handleReconnectionError'](_0x176247);}}['_disconnectService'](){this['_service']['disconnect'](),this['_bufferedOperations']=[],clearTimeout(this['_sendBufferedOperationsDelay']),this['stopListening'](this['_service']);}['_initSessionsHandling'](_0x38eeb5){const _0x414f16=this['editor']['plugins']['get'](_0xe950d2);this['listenTo'](_0x414f16,'sessionAdd:'+this['_channelId'],(_0x12db9a,{session:_0xcb0bb4})=>{if(_0xcb0bb4['id']===_0x414f16['mySessionId']){_0x12db9a['off']();const _0x241d91=this['editor']['plugins']['has']('CommentsOnly')&&this['editor']['plugins']['get']('CommentsOnly');let _0x31e60c=_0xcb0bb4['permissions'];_0x241d91&&_0x241d91['isEnabled']&&(_0x31e60c=_0x31e60c['filter'](_0x4b0134=>'document:write'!==_0x4b0134)),this['editor']['plugins']['get']('Permissions')['setPermissions'](_0x31e60c,this['_channelId']);}}),_0x414f16['register'](this['_channelId'],_0x38eeb5);}['_initThrowingOnDataSet'](){const _0x3ff369=this['editor']['data']['set'];this['editor']['data']['set']=(..._0x29d350)=>{if(!_0x29d350[_0x29d350['length']-0x1]['suppressErrorInCollaboration'])throw new _0x15b6a9('realtimecollaborationclient-editor-setdata-and-editor-data-set-are-forbidden-in-real-time-collaboration',this);_0x3ff369['apply'](this['editor']['data'],_0x29d350);};}['_setUpDataInit'](){this['editor']['data']['on']('init',(_0x1397c3,[_0x41f082])=>{if(this['_document']['version'])throw new _0x15b6a9('realtimecollaborationclient-init-document-already-initialized',this);_0x1397c3['stop'](),this['_setPendingAction']();const _0x892fe4=this['_getOperationsFromInitData'](_0x41f082);_0x1397c3['return']=this['_connectService'](_0x892fe4)['then'](()=>{this['editor']['data']['fire']('ready');})['catch'](_0x4d6133=>this['_crash']('realtimecollaborationclient-init-connection-failed',_0x4d6133))['finally'](()=>this['_clearPendingAction']());},{'priority':'high'});}['_fetchMissingUsers'](_0x335586){const _0x53e827=this['editor']['plugins']['get'](_0x34772a),{connection:_0x2f8533}=this['editor']['plugins']['get'](_0x52a8a9),_0x17e460=new Set();for(const _0x68cf07 of _0x335586)_0x39d047(_0x68cf07['_authorId']);return Promise['all'](Array['from'](_0x17e460,async _0x1969bf=>{const _0x3179d3=await _0x4ad998['get'](_0x2f8533,_0x1969bf);_0x53e827['getUser'](_0x1969bf)||_0x53e827['addUser'](_0x3179d3);}));function _0x39d047(_0x27dba7){_0x27dba7&&!_0x53e827['getUser'](_0x27dba7)&&_0x17e460['add'](_0x27dba7);}}['_getOperationsFromInitData'](_0x33a674){const _0x20fdb8=this['editor']['model'],_0x248c10=[];let _0x33dd5a=0x0;const _0x20a86f='string'==typeof _0x33a674?{'main':_0x33a674}:_0x33a674;for(const _0x5bf1f4 of Object['keys'](_0x20a86f)){if(!this['_document']['roots']['has'](_0x5bf1f4))throw new _0x15b6a9('realtimecollaborationclient-init-non-existent-root',this);const _0x409d9a=this['editor']['data']['parse'](_0x20a86f[_0x5bf1f4]),_0x35c69f=this['_document']['getRoot'](_0x5bf1f4),_0x3b4e30=new _0x3df190(_0x20fdb8['createPositionAt'](_0x35c69f,0x0),_0x409d9a,_0x33dd5a++);_0x248c10['push'](_0x3b4e30);for(const [_0x5eb217,_0x6a6e3a]of _0x409d9a['markers']){const _0x10cfdc=_0x20fdb8['createRange'](_0x20fdb8['createPositionFromPath'](_0x35c69f,_0x6a6e3a['start']['path']['slice']()),_0x20fdb8['createPositionFromPath'](_0x35c69f,_0x6a6e3a['end']['path']['slice']())),_0x5e5c85=new _0x1926d7(_0x5eb217,null,_0x10cfdc,_0x20fdb8['markers'],!0x0,_0x33dd5a++);_0x248c10['push'](_0x5e5c85);}}return _0x248c10;}async['_handleConnectionData'](_0x137a2b,_0x2ab233){let _0x466967;this['_offset']=_0x137a2b['offset'];const _0x3cb295=_0x137a2b['wereChangesApplied']&&!_0x137a2b['initData'];if(_0x3cb295)_0x466967=_0x2ab233;else{if(_0x137a2b['initData']){const _0x220656=this['_getOperationsFromInitData'](_0x137a2b['initData']);this['_document']['version']=-_0x220656['length'],_0x220656['forEach'](_0x307155=>{_0x307155['baseVersion']-=_0x220656['length'];}),this['_applyOperationsSet'](_0x220656,!0x0),this['_updateServerHistory'](_0x220656);}this['_document']['version']=_0x137a2b['data']['baseVersion'],_0x466967=this['_decompressOperations'](_0x137a2b['data'],_0x137a2b['metadata']),await this['_fetchMissingUsers'](_0x466967);}_0x137a2b['lastOperationId']&&(this['_operationIdentifier']['setIdForTheLastOperation'](_0x466967,_0x137a2b['lastOperationId']),this['_lastSyncedOperationId']=_0x137a2b['lastOperationId']),this['_applyOperationsSet'](_0x466967,_0x3cb295),this['_updateServerHistory'](_0x466967);}['_crash'](_0x1681eb,_0x3f09e6){throw this['_isPendingUpdate']=!0x0,_0x3f09e6&&console['error'](_0x3f09e6),new _0x15b6a9(_0x1681eb,this['editor']);}['_saveOperationInBuffer'](_0x20722a){this['_knownOperations']['has'](_0x20722a)||(this['_knownOperations']['add'](_0x20722a),this['_bufferedOperations']['push'](_0x20722a),this['_pendingAction']||'marker'==_0x20722a['type']&&!_0x20722a['affectsData']||this['_setPendingAction']());}['_sendBufferedOperationsDelayed'](_0x76e1a1=!0x1){!_0x76e1a1&&this['_isPendingUpdate']||(this['_isPendingUpdate']=!0x0,clearTimeout(this['_sendBufferedOperationsDelayId']),this['_sendBufferedOperationsDelayId']=setTimeout(()=>{this['_sendBufferedOperations']()['then'](_0x3d531c=>{_0x3d531c&&(this['_clearPendingAction'](),this['_isPendingUpdate']=!0x1);})['catch'](_0x13c298=>{throw this['_clearPendingAction'](),this['_isPendingUpdate']=!0x1,_0x13c298;});},this['_currentBufferDelay']));}async['_sendBufferedOperations'](){const _0x399e89=this['editor']['plugins']['get'](_0x45499e);if(this['_shouldSendSelectionUpdate']()&&(_0x399e89['createUserMarkerOperations'](),this['_hasSelectionChanged']=!0x1),!this['_shouldSendUpdate']())return!0x0;const _0x449929=[...this['_bufferedOperations']];for(const _0x22e5a1 of _0x449929)_0x22e5a1['wasUndone']=this['_document']['history']['isUndoneOperation'](_0x22e5a1);const _0x70bd96=this['_operationIdentifier']['getIdOfTheLastOperation'](_0x449929),_0x55a9b6=tt++,_0x1623ef=this['_compressOperations'](_0x449929),_0x5271b3=await this['_service']['sendOperations'](_0x1623ef,_0x1623ef['baseVersion'],_0x70bd96);try{return await this['_handleServerResponse'](_0x449929,_0x5271b3,_0x55a9b6);}catch(_0x4e6cf0){return this['_crash']('realtimecollaborationclient-sendbufferedoperations',_0x4e6cf0);}}async['_handleServerResponse'](_0x7577f6,_0xec86e2,_0x4edebd){if(_0xec86e2['error'])throw _0xec86e2['error'];let _0x3aafb3=!0x1;if(_0xec86e2['wereChangesApplied'])this['_bufferedOperations']=this['_bufferedOperations']['filter'](_0x2f01c3=>!_0x7577f6['includes'](_0x2f01c3)),this['_lastSyncedOperationId']=_0xec86e2['lastOperationId'],this['_updateServerHistory'](_0x7577f6),_0x3aafb3=!0x0,this['_currentBufferDelay']=this['_baseBufferDelay'];else{const _0x4a196a=this['_decompressOperations'](_0xec86e2['data'],_0xec86e2['metadata'])['filter'](_0x43422e=>_0x43422e['baseVersion']>=this['_lastServerVersion']);await this['_fetchMissingUsers'](_0x4a196a),_0x3aafb3=this['_handleExternalOperations'](_0x4a196a,_0xec86e2['version'],_0xec86e2['lastOperationId']),this['_currentBufferDelay']=Math['round'](this['_currentBufferDelay']/0x2);}return _0x3aafb3?!this['_shouldSendUpdate']()||(this['_sendBufferedOperationsDelayed'](!0x0),!0x1):this['_crash']('realtimecollaborationclient-handleserverresponse');}['_handleExternalOperations'](_0x1a7034,_0x3d1203,_0x3d9ca3){try{const _0x6d46d9={'document':this['_document'],'useRelations':!0x1,'padWithNoOps':!0x0},{operationsA:_0x2ee2ae,operationsB:_0x565358,originalOperations:_0xf2c6b6}=_0xa1539(_0x1a7034,this['_bufferedOperations'],_0x6d46d9);st(_0x2ee2ae,this['_document']['version']),st(_0x565358,_0x3d1203);for(const _0x46c2f8 of _0x2ee2ae){const _0x577258=_0xf2c6b6['get'](_0x46c2f8);_0x46c2f8['_authorId']=_0x577258?_0x577258['_authorId']:null;}this['_lastSyncedOperationId']=_0x3d9ca3,this['_operationIdentifier']['setIdForTheLastOperation'](_0x1a7034,_0x3d9ca3),this['_bufferedOperations']=[..._0x565358],this['_applyOperationsSet'](_0x2ee2ae),this['_updateServerHistory'](_0x1a7034);}catch(_0xe27bde){return console['error'](_0xe27bde),!0x1;}return!0x0;}['_applyOperationsSet'](_0x4693ad,_0x53f240=!0x1){this['editor']['model']['enqueueChange']({'isUndoable':!0x1,'isLocal':!0x1},_0x188d00=>{for(const _0x319640 of _0x4693ad)this['_knownOperations']['add'](_0x319640),_0x188d00['batch']['addOperation'](_0x319640),this['editor']['model']['applyOperation'](_0x319640);});}['_updateServerHistory'](_0x2bb222){_0x2bb222['forEach'](_0x389177=>{const _0x29a584=_0x389177['clone']();_0x29a584['_authorId']=_0x389177['_authorId'],_0x29a584['baseVersion']+=this['_offset'],_0x389177['isDisconnection']&&this['_disconnectionOperations']['add'](_0x29a584),this['serverHistory']['addOperation'](_0x29a584);});}['_handleReconnectionError'](_0x368f7e){const _0x175649=this['editor']['plugins']['get']('Notification'),t=this['editor']['t'];_0x368f7e||(_0x368f7e=t('The\x20local\x20document\x20and\x20server\x20document\x20differ\x20and\x20merging\x20them\x20can\x20cause\x20unexpected\x20behavior.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.')),_0x175649['showWarning'](_0x368f7e,{'title':t('Synchronization\x20issue'),'namespace':'real-time-collaboration'}),this['_hasSynchronizationProblem']=!0x0,clearTimeout(this['_sendBufferedOperationsDelayId']),this['_bufferedOperations']=[],this['editor']['plugins']['get'](_0x52a8a9)['destroy']();}['_setPendingAction'](){if(!this['_pendingAction']){const {t:t}=this['editor']['locale'];this['_pendingAction']=this['editor']['plugins']['get'](_0x2843fc)['add'](t({'string':'Sending\x20data\x20to\x20the\x20server.','id':'PENDING_ACTION_SENDING_DATA'}));}}['_clearPendingAction'](){this['_pendingAction']&&(this['editor']['plugins']['get'](_0x2843fc)['remove'](this['_pendingAction']),this['_pendingAction']=null);}['_compressOperations'](_0x481a64){const _0x579657=_0x481a64['map'](_0x3a41c2=>_0x3a41c2['toJSON']());return this['_compressor']['compress'](_0x579657);}['_decompressOperations'](_0x5cd4df,_0x39a96f){const _0x25a394=this['_compressor']['decompress'](_0x5cd4df)['map']((_0x4007ba,_0x119ef8)=>{const _0x3f79c6=_0x316fca['fromJSON'](_0x4007ba,this['_document']);return _0x3f79c6['wasUndone']=_0x4007ba['wasUndone'],'cs:removeUser'===_0x39a96f[_0x119ef8]['type']&&(_0x3f79c6['isDisconnection']=!0x0),_0x3f79c6;});return this['_assignOperationAuthors'](_0x25a394,_0x39a96f),_0x25a394;}['_assignOperationAuthors'](_0x26e0a1,_0x2559bf){for(let _0x822252=0x0;_0x822252<_0x26e0a1['length'];_0x822252++)'init'!=_0x2559bf[_0x822252]['type']?_0x26e0a1[_0x822252]['_authorId']=_0x2559bf[_0x822252]['userId']:_0x26e0a1[_0x822252]['_authorId']=null;}['_refreshUserSelectionMarkers'](){this['_hasSelectionChanged']=!0x0,this['_shouldSendSelectionUpdate']()&&this['_sendBufferedOperationsDelayed']();}['_shouldSendSelectionUpdate'](){const _0x47d47c=this['editor']['plugins']['get'](_0xe950d2)['channelSessions']['get'](this['_channelId']);return!this['editor']['isReadOnly']&&_0x47d47c&&_0x47d47c['length']>0x1&&this['_hasSelectionChanged'];}['_shouldSendUpdate'](){return this['_bufferedOperations']['length']>0x0||this['_shouldSendSelectionUpdate']();}}class it extends Error{}function st(_0x452574,_0x45b71a){for(const _0x53f9f1 of _0x452574)_0x53f9f1['baseVersion']=_0x45b71a++;}g['CollaborativeEditingService']=_0x506c35;class et{constructor(_0x3bf329){this['_ignoredOperations']=_0x3bf329,this['_operationToId']=new WeakMap();}['getIdOfTheLastOperation'](_0x422b31){let _0x12d8c0=_0x422b31['length'];for(;_0x12d8c0--;){const _0x405fed=_0x422b31[_0x12d8c0];if(!this['_ignoredOperations']['has'](_0x405fed)){if(!this['_operationToId']['has'](_0x405fed)){const _0x479a18=_0x5b754a()['slice'](0x1,0x12);this['_operationToId']['set'](_0x405fed,_0x479a18);}return this['_operationToId']['get'](_0x405fed);}}}['setIdForTheLastOperation'](_0x406a58,_0x3d442a){if(!_0x3d442a)return;let _0x5b65ea=_0x406a58['length'];for(;_0x5b65ea--;){const _0x39c123=_0x406a58[_0x5b65ea];this['_ignoredOperations']['has'](_0x39c123)||this['_operationToId']['set'](_0x39c123,_0x3d442a);}}}
23
+ import{Plugin as _0x33272d,PendingActions as _0x3f2dd5}from'ckeditor5/src/core';import{CKEditorError as _0x758fb9,version as _0x168b08,uid as _0x434afb}from'ckeditor5/src/utils';import{transformSets as _0x47f457,InsertOperation as _0x103ef0,MarkerOperation as _0x1c94e9,OperationFactory as _0x47c675,History as _0x234a1d}from'ckeditor5/src/engine';import{Notification as _0x5291f0}from'ckeditor5/src/ui';import{Users as _0x2791b8}from'ckeditor5-collaboration/src/collaboration-core';import _0xa21b8a from'./websocketgateway';import _0x1066f7 from'./sessions';import _0x31b919 from'./usermarkers';import _0x5b3151 from'@ckeditor/ckeditor5-operations-compressor/src/compressor';import _0x3ab398 from'@ckeditor/ckeditor-cloud-services-collaboration/src/collaborativeeditingservice/collaborativeeditingservice';import _0x1cc019 from'@ckeditor/ckeditor-cloud-services-collaboration/src/users/user';let G=0x1;export default class l extends _0x33272d{static get['requires'](){return[_0xa21b8a,_0x1066f7,_0x31b919,_0x3f2dd5,_0x2791b8,_0x5291f0];}static get['pluginName'](){return'RealTimeCollaborationClient';}get['cloudDocumentVersion'](){return this['_lastServerVersion']+this['_offset'];}get['_lastServerVersion'](){const _0x241b6c=this['serverHistory']['_operations'];return _0x241b6c['length']?_0x241b6c[_0x241b6c['length']-0x1]['baseVersion']+0x1-this['_offset']:0x0;}get['lastSyncVersion'](){const _0x445a71=this['serverHistory']['_operations'];let _0x2bed02=_0x445a71['length'];for(;_0x2bed02--;){const _0xcb2f93=_0x445a71[_0x2bed02];if(!this['_disconnectionOperations']['has'](_0xcb2f93))return _0xcb2f93['baseVersion']+0x1-this['_offset'];}return 0x0;}['init'](){const _0x21d1cc=this['editor'],_0x197a50=_0x21d1cc['plugins']['get'](_0x2791b8),_0x195b59=_0x21d1cc['plugins']['get'](_0xa21b8a);if(this['_offset']=0x0,this['sessionId']=null,this['serverHistory']=new _0x234a1d(),this['editor']['config']['define']('collaboration',{}),this['_channelId']=_0x21d1cc['config']['get']('collaboration.channelId'),!this['_channelId'])throw new _0x758fb9('collaboration-missing-channelid',this);this['listenTo'](_0x197a50,'getOperationAuthor',(_0x5ac9fa,_0x3e52ab)=>{const _0x10f341=_0x3e52ab[0x0];_0x10f341['_authorId']&&(_0x5ac9fa['return']=_0x197a50['getUser'](_0x10f341['_authorId']),_0x5ac9fa['stop']()),null===_0x10f341['_authorId']&&(_0x5ac9fa['return']=null,_0x5ac9fa['stop']());},{'priority':'high'});const _0x4e0a53=_0x21d1cc['config']['get']('cloudServices.bundleVersion')||_0x168b08;this['_service']=new l['CollaborativeEditingService'](_0x4e0a53,this['_channelId']),this['_document']=this['editor']['model']['document'],this['_compressor']=new _0x5b3151(),this['_bufferedOperations']=[],this['_knownOperations']=new WeakSet(),this['set']('_isPendingUpdate',!0x1),this['set']('_hasSynchronizationProblem',!0x1),this['_pendingAction']=null,this['_hasSelectionChanged']=!0x1,this['_sendBufferedOperationsDelayId']=null,this['_baseBufferDelay']=0x12c,this['_currentBufferDelay']=this['_baseBufferDelay'],this['_lastSyncedOperationId']=null,this['_disconnectionOperations']=new WeakSet(),this['_operationIdentifier']=new K(this['_disconnectionOperations']),this['listenTo'](_0x21d1cc['model']['document']['selection'],'change:range',(_0x1450ca,_0x59d5b7)=>{_0x59d5b7['directChange']&&this['_refreshUserSelectionMarkers']();}),this['listenTo'](_0x21d1cc['editing']['view'],'change:hasDomSelection',()=>{this['_refreshUserSelectionMarkers']();}),this['_initThrowingOnDataSet'](),_0x21d1cc['plugins']['get'](_0xa21b8a)['addToReconnectionStack'](this),_0x21d1cc['model']['on']('applyOperation',(_0x39bb23,_0x2db596)=>{const _0x28bd4a=_0x2db596[0x0];_0x28bd4a['isDocumentOperation']&&(this['_saveOperationInBuffer'](_0x28bd4a),this['_shouldSendUpdate']()&&this['_sendBufferedOperationsDelayed']());}),this['_setUpDataInit'](),this['editor']['bind']('isReadOnly')['to'](_0x195b59,'state',this,'_hasSynchronizationProblem',(_0xf680ce,_0x462176)=>'connected'!==_0xf680ce||_0x462176),this['set']('_isConnected',!0x1);}async['reconnect'](){const _0x4cb00c=this['editor']['plugins']['get'](_0x1066f7),_0x3ca10e=this['editor']['plugins']['get'](_0xa21b8a);try{this['_isPendingUpdate']=!0x0,_0x4cb00c['unregister'](this['_channelId']);const _0x2e9b0c=await this['_service']['reconnect'](_0x3ca10e['connection'],this['lastSyncVersion']);await this['_handleReconnectionResponse'](_0x2e9b0c)&&(this['_isPendingUpdate']=!0x1,this['_clearPendingAction']());const _0x4a18e8=await this['_service']['getConnectedSessions']();_0x4cb00c['register'](this['_channelId'],_0x4a18e8),this['_handleSendingSelectionMarkers'](),this['_isConnected']=!0x0;}catch(_0x3bedca){if(function(_0x8c77ad){return'404'===_0x8c77ad['code'];}(_0x3bedca)&&this['sessionId'])await this['_connectAfterSessionHasBeenFlushed']();else{if(function(_0x246c2c){return'409'===_0x246c2c['code'];}(_0x3bedca)){const _0x182fb2=(0x0,this['editor']['t'])('The\x20document\x20cannot\x20be\x20connected\x20back\x20to\x20the\x20server.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.');this['_handleReconnectionError'](_0x182fb2);}else{if(!(_0x3bedca instanceof j))throw _0x3bedca;this['_handleReconnectionError']();}}}}['destroy'](){const _0x372d51=this['editor']['plugins']['get'](_0xa21b8a),_0x34b2b2=this['editor']['plugins']['get'](_0x1066f7);this['editor']['isReadOnly']=!0x0,_0x34b2b2['channelSessions']['has'](this['_channelId'])&&_0x34b2b2['unregister'](this['_channelId']),_0x372d51['removeFromReconnectionStack'](this),this['_disconnectService'](),super['destroy']();}async['_handleReconnectionResponse'](_0x29c2b5){if(this['sessionId']!==_0x29c2b5['sessionId']&&this['_lastSyncedOperationId']!==_0x29c2b5['lastOperationId'])throw new j();return this['sessionId']=_0x29c2b5['sessionId'],this['_handleServerResponse']([],{..._0x29c2b5,'wereChangesApplied':!0x1,'data':_0x29c2b5['data']},'reconnect');}async['_connectService'](_0x460221,_0x29a5d6=!0x1){const {connection:_0x20bc74}=this['editor']['plugins']['get'](_0xa21b8a);l['CollaborativeEditingService']['getConnectedSessions'](_0x20bc74,this['_channelId'])['then'](_0x1b2976=>this['_initSessionsHandling'](_0x1b2976))['catch'](_0x55c92f=>{this['_crash']('realtimecollaborationclient-init-session-connection-error',_0x55c92f);}),this['listenTo'](this['_service'],'operationsReceived',this['_handleReceivedOperations']['bind'](this)),this['listenTo'](this['_service'],'error',(_0x3ab637,_0x1fb994)=>{this['_crash']('realtimecollaborationclient-initservice-internal-error',_0x1fb994);}),this['listenTo'](this['_service'],'disconnected',()=>{this['_isConnected']=!0x1;});const _0x2fde42=this['_operationIdentifier']['getIdOfTheLastOperation'](_0x460221),_0x4c23ff=await this['_service']['connect'](_0x20bc74,this['_compressOperations'](_0x460221),_0x2fde42);if(this['sessionId']=_0x4c23ff['sessionId'],_0x4c23ff['wereChangesApplied']&&(this['_isPendingUpdate']=!0x1,this['_clearPendingAction']()),_0x29a5d6){if(!_0x4c23ff['wereChangesApplied'])return void this['_handleReconnectionError']();this['_offset']=_0x4c23ff['offset'],this['serverHistory']['_operations']=[],await this['_handleServerResponse'](_0x460221,_0x4c23ff,'reconnection:\x20flushed\x20session');}else await this['_handleConnectionData'](_0x4c23ff,_0x460221);this['_handleSendingSelectionMarkers'](),this['_isConnected']=!0x0;}['_handleSendingSelectionMarkers'](){const _0x541322=this['editor']['plugins']['get'](_0x1066f7),_0x510081=_0x541322['channelSessions']['get'](this['_channelId']);_0x510081&&_0x510081['length']>0x1?(this['_hasSelectionChanged']=!0x0,this['_sendBufferedOperationsDelayed']()):this['listenTo'](_0x541322,'sessionAdd:'+this['_channelId'],_0x4bb196=>{_0x541322['channelSessions']['get'](this['_channelId'])['length']>0x1&&(this['_hasSelectionChanged']=!0x0,this['_sendBufferedOperationsDelayed'](),_0x4bb196['off']());});}async['_handleReceivedOperations'](_0x1f1870,_0x388bea,_0x25afa0,_0x52491f){if(!this['_isPendingUpdate']&&this['_document']['version']==_0x388bea){const _0x243256=this['_decompressOperations'](_0x25afa0,_0x52491f);await this['_fetchMissingUsers'](_0x243256),this['_handleExternalOperations'](_0x243256,_0x388bea,_0x25afa0['lastOperationId'])||this['_crash']('realtimecollaborationclient-initservice-incorrect-server-operation');}}async['_connectAfterSessionHasBeenFlushed'](){this['_disconnectService']();const t=this['editor']['t'];let _0x5cff4b;try{_0x5cff4b=await this['_service']['getDocumentDetails']();}catch(_0x1c8d57){const _0x5ce961=t('The\x20document\x20details\x20could\x20not\x20be\x20taken\x20during\x20the\x20reconnection.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.');return void this['_handleReconnectionError'](_0x5ce961);}const _0x21eadb=_0x5cff4b['currentDocumentSession']||_0x5cff4b['lastDocumentSession'];if(this['_lastSyncedOperationId']===_0x21eadb['lastOperationId'])await this['_connectService'](this['editor']['model']['document']['history']['getOperations'](),!0x0);else{const _0x463c10=t('The\x20last\x20saved\x20version\x20of\x20the\x20document\x20does\x20not\x20match\x20the\x20local\x20version.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.');this['_handleReconnectionError'](_0x463c10);}}['_disconnectService'](){this['_service']['disconnect'](),this['_bufferedOperations']=[],clearTimeout(this['_sendBufferedOperationsDelay']),this['stopListening'](this['_service']);}['_initSessionsHandling'](_0x44cae5){const _0x56ae95=this['editor']['plugins']['get'](_0x1066f7);this['listenTo'](_0x56ae95,'sessionAdd:'+this['_channelId'],(_0xf5cb11,{session:_0x332a47})=>{if(_0x332a47['id']===_0x56ae95['mySessionId']){_0xf5cb11['off']();const _0x428821=this['editor']['plugins']['has']('CommentsOnly')&&this['editor']['plugins']['get']('CommentsOnly');let _0x12e557=_0x332a47['permissions'];_0x428821&&_0x428821['isEnabled']&&(_0x12e557=_0x12e557['filter'](_0x42eee4=>'document:write'!==_0x42eee4)),this['editor']['plugins']['get']('Permissions')['setPermissions'](_0x12e557,this['_channelId']);}}),_0x56ae95['register'](this['_channelId'],_0x44cae5);}['_initThrowingOnDataSet'](){const _0x38ef71=this['editor']['data']['set'];this['editor']['data']['set']=(..._0x3f98b7)=>{if(!_0x3f98b7[_0x3f98b7['length']-0x1]['suppressErrorInCollaboration'])throw new _0x758fb9('realtimecollaborationclient-editor-setdata-and-editor-data-set-are-forbidden-in-real-time-collaboration',this);_0x38ef71['apply'](this['editor']['data'],_0x3f98b7);};}['_setUpDataInit'](){this['editor']['data']['on']('init',(_0x5cc9ba,[_0x195381])=>{if(this['_document']['version'])throw new _0x758fb9('realtimecollaborationclient-init-document-already-initialized',this);_0x5cc9ba['stop'](),this['_setPendingAction']();const _0x22386e=this['_getOperationsFromInitData'](_0x195381);_0x5cc9ba['return']=this['_connectService'](_0x22386e)['then'](()=>{this['editor']['data']['fire']('ready');})['catch'](_0x497dd5=>this['_crash']('realtimecollaborationclient-init-connection-failed',_0x497dd5))['finally'](()=>this['_clearPendingAction']());},{'priority':'high'});}['_fetchMissingUsers'](_0x590e39){const _0x35fecf=this['editor']['plugins']['get'](_0x2791b8),{connection:_0x3b92dd}=this['editor']['plugins']['get'](_0xa21b8a),_0x21467c=new Set();for(const _0x1902ee of _0x590e39)_0x4ab186(_0x1902ee['_authorId']);return Promise['all'](Array['from'](_0x21467c,async _0x4e6c42=>{const _0x361950=await _0x1cc019['get'](_0x3b92dd,_0x4e6c42);_0x35fecf['getUser'](_0x4e6c42)||_0x35fecf['addUser'](_0x361950);}));function _0x4ab186(_0x136c20){_0x136c20&&!_0x35fecf['getUser'](_0x136c20)&&_0x21467c['add'](_0x136c20);}}['_getOperationsFromInitData'](_0x52aadd){const _0x1c8e44=this['editor']['model'],_0x2ed246=[];let _0x13e721=0x0;const _0x2c3b0a='string'==typeof _0x52aadd?{'main':_0x52aadd}:_0x52aadd;for(const _0x5df278 of Object['keys'](_0x2c3b0a)){if(!this['_document']['roots']['has'](_0x5df278))throw new _0x758fb9('realtimecollaborationclient-init-non-existent-root',this);const _0x408f4f=this['editor']['data']['parse'](_0x2c3b0a[_0x5df278]),_0x56ba6f=this['_document']['getRoot'](_0x5df278),_0x327430=new _0x103ef0(_0x1c8e44['createPositionAt'](_0x56ba6f,0x0),_0x408f4f,_0x13e721++);_0x2ed246['push'](_0x327430);for(const [_0x429fcd,_0x584148]of _0x408f4f['markers']){const _0x468ecb=_0x1c8e44['createRange'](_0x1c8e44['createPositionFromPath'](_0x56ba6f,_0x584148['start']['path']['slice']()),_0x1c8e44['createPositionFromPath'](_0x56ba6f,_0x584148['end']['path']['slice']())),_0x52fa2d=new _0x1c94e9(_0x429fcd,null,_0x468ecb,_0x1c8e44['markers'],!0x0,_0x13e721++);_0x2ed246['push'](_0x52fa2d);}}return _0x2ed246;}async['_handleConnectionData'](_0x2b793e,_0x10c022){let _0x2ebe63;this['_offset']=_0x2b793e['offset'];const _0x7d628b=_0x2b793e['wereChangesApplied']&&!_0x2b793e['initData'];if(_0x7d628b)_0x2ebe63=_0x10c022;else{if(_0x2b793e['initData']){const _0x210add=this['_getOperationsFromInitData'](_0x2b793e['initData']);this['_document']['version']=-_0x210add['length'],_0x210add['forEach'](_0x124dd9=>{_0x124dd9['baseVersion']-=_0x210add['length'];}),this['_applyOperationsSet'](_0x210add,!0x0),this['_updateServerHistory'](_0x210add);}this['_document']['version']=_0x2b793e['data']['baseVersion'],_0x2ebe63=this['_decompressOperations'](_0x2b793e['data'],_0x2b793e['metadata']),await this['_fetchMissingUsers'](_0x2ebe63);}_0x2b793e['lastOperationId']&&(this['_operationIdentifier']['setIdForTheLastOperation'](_0x2ebe63,_0x2b793e['lastOperationId']),this['_lastSyncedOperationId']=_0x2b793e['lastOperationId']),this['_applyOperationsSet'](_0x2ebe63,_0x7d628b),this['_updateServerHistory'](_0x2ebe63);}['_crash'](_0x314e67,_0x293292){throw this['_isPendingUpdate']=!0x0,_0x293292&&console['error'](_0x293292),new _0x758fb9(_0x314e67,this['editor']);}['_saveOperationInBuffer'](_0x3cdbf9){this['_knownOperations']['has'](_0x3cdbf9)||(this['_knownOperations']['add'](_0x3cdbf9),this['_bufferedOperations']['push'](_0x3cdbf9),this['_pendingAction']||'marker'==_0x3cdbf9['type']&&!_0x3cdbf9['affectsData']||this['_setPendingAction']());}['_sendBufferedOperationsDelayed'](_0x2f8ceb=!0x1){!_0x2f8ceb&&this['_isPendingUpdate']||(this['_isPendingUpdate']=!0x0,clearTimeout(this['_sendBufferedOperationsDelayId']),this['_sendBufferedOperationsDelayId']=setTimeout(()=>{this['_sendBufferedOperations']()['then'](_0x4e7789=>{_0x4e7789&&(this['_clearPendingAction'](),this['_isPendingUpdate']=!0x1);})['catch'](_0xb06be1=>{if(this['_clearPendingAction'](),this['_isPendingUpdate']=!0x1,!function(_0x376319){return _0x376319['message']['startsWith']('cloud-services-internal-error:\x20Not\x20connected.')||_0x376319['message']['startsWith']('cloud-services-internal-error:\x20Collaborative\x20Editing\x20Service\x20is\x20not\x20connected.')||_0x376319['message']['startsWith']('cloud-services-internal-error:\x20Request\x20timeout.');}(_0xb06be1))throw _0xb06be1;});},this['_currentBufferDelay']));}async['_sendBufferedOperations'](){const _0x5ca659=this['editor']['plugins']['get'](_0x31b919);if(this['_shouldSendSelectionUpdate']()&&(_0x5ca659['createUserMarkerOperations'](),this['_hasSelectionChanged']=!0x1),!this['_shouldSendUpdate']())return!0x0;const _0x28abf9=[...this['_bufferedOperations']];for(const _0x3f9e1b of _0x28abf9)_0x3f9e1b['wasUndone']=this['_document']['history']['isUndoneOperation'](_0x3f9e1b);const _0x35c9d3=this['_operationIdentifier']['getIdOfTheLastOperation'](_0x28abf9),_0x314793=G++,_0x3c05ed=this['_compressOperations'](_0x28abf9),_0x5ad7f3=await this['_service']['sendOperations'](_0x3c05ed,_0x3c05ed['baseVersion'],_0x35c9d3);try{return await this['_handleServerResponse'](_0x28abf9,_0x5ad7f3,_0x314793);}catch(_0x137a1d){return this['_crash']('realtimecollaborationclient-sendbufferedoperations',_0x137a1d);}}async['_handleServerResponse'](_0x3606fc,_0x53033e,_0x3c9c20){if(_0x53033e['error'])throw _0x53033e['error'];let _0xa7faf5=!0x1;if(_0x53033e['wereChangesApplied'])this['_bufferedOperations']=this['_bufferedOperations']['filter'](_0x2d1e76=>!_0x3606fc['includes'](_0x2d1e76)),this['_lastSyncedOperationId']=_0x53033e['lastOperationId'],this['_updateServerHistory'](_0x3606fc),_0xa7faf5=!0x0,this['_currentBufferDelay']=this['_baseBufferDelay'];else{const _0x1af979=this['_decompressOperations'](_0x53033e['data'],_0x53033e['metadata'])['filter'](_0x3b8e9d=>_0x3b8e9d['baseVersion']>=this['_lastServerVersion']);await this['_fetchMissingUsers'](_0x1af979),_0xa7faf5=this['_handleExternalOperations'](_0x1af979,_0x53033e['version'],_0x53033e['lastOperationId']),this['_currentBufferDelay']=Math['round'](this['_currentBufferDelay']/0x2);}return _0xa7faf5?!this['_shouldSendUpdate']()||(this['_sendBufferedOperationsDelayed'](!0x0),!0x1):this['_crash']('realtimecollaborationclient-handleserverresponse');}['_handleExternalOperations'](_0x49ae3e,_0x39d524,_0x4f8091){try{const _0xdf0116={'document':this['_document'],'useRelations':!0x1,'padWithNoOps':!0x0},{operationsA:_0x130c25,operationsB:_0x4c15f3,originalOperations:_0x3e2c7a}=_0x47f457(_0x49ae3e,this['_bufferedOperations'],_0xdf0116);J(_0x130c25,this['_document']['version']),J(_0x4c15f3,_0x39d524);for(const _0x297ec4 of _0x130c25){const _0x3127c8=_0x3e2c7a['get'](_0x297ec4);_0x297ec4['_authorId']=_0x3127c8?_0x3127c8['_authorId']:null;}this['_lastSyncedOperationId']=_0x4f8091,this['_operationIdentifier']['setIdForTheLastOperation'](_0x49ae3e,_0x4f8091),this['_bufferedOperations']=[..._0x4c15f3],this['_applyOperationsSet'](_0x130c25),this['_updateServerHistory'](_0x49ae3e);}catch(_0x1f9a55){return console['error'](_0x1f9a55),!0x1;}return!0x0;}['_applyOperationsSet'](_0x39ae9b,_0x40b6bf=!0x1){this['editor']['model']['enqueueChange']({'isUndoable':!0x1,'isLocal':!0x1},_0x320376=>{for(const _0x5c7391 of _0x39ae9b)this['_knownOperations']['add'](_0x5c7391),_0x320376['batch']['addOperation'](_0x5c7391),this['editor']['model']['applyOperation'](_0x5c7391);});}['_updateServerHistory'](_0x32aba3){_0x32aba3['forEach'](_0x366029=>{const _0x66962d=_0x366029['clone']();_0x66962d['_authorId']=_0x366029['_authorId'],_0x66962d['baseVersion']+=this['_offset'],_0x366029['isDisconnection']&&this['_disconnectionOperations']['add'](_0x66962d),this['serverHistory']['addOperation'](_0x66962d);});}['_handleReconnectionError'](_0x170385){const _0x35ef11=this['editor']['plugins']['get']('Notification'),t=this['editor']['t'];_0x170385||(_0x170385=t('The\x20local\x20document\x20and\x20server\x20document\x20differ\x20and\x20merging\x20them\x20can\x20cause\x20unexpected\x20behavior.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.')),_0x35ef11['showWarning'](_0x170385,{'title':t('Synchronization\x20issue'),'namespace':'real-time-collaboration'}),this['_hasSynchronizationProblem']=!0x0,clearTimeout(this['_sendBufferedOperationsDelayId']),this['_bufferedOperations']=[],this['editor']['plugins']['get'](_0xa21b8a)['destroy']();}['_setPendingAction'](){if(!this['_pendingAction']){const {t:t}=this['editor']['locale'];this['_pendingAction']=this['editor']['plugins']['get'](_0x3f2dd5)['add'](t({'string':'Sending\x20data\x20to\x20the\x20server.','id':'PENDING_ACTION_SENDING_DATA'}));}}['_clearPendingAction'](){this['_pendingAction']&&(this['editor']['plugins']['get'](_0x3f2dd5)['remove'](this['_pendingAction']),this['_pendingAction']=null);}['_compressOperations'](_0x3c2dd0){const _0x2b4a95=_0x3c2dd0['map'](_0x9e7086=>_0x9e7086['toJSON']());return this['_compressor']['compress'](_0x2b4a95);}['_decompressOperations'](_0x15ea53,_0x9bd86a){const _0x4193f6=this['_compressor']['decompress'](_0x15ea53)['map']((_0x2646c4,_0x3be00d)=>{const _0x45d138=_0x47c675['fromJSON'](_0x2646c4,this['_document']);return _0x45d138['wasUndone']=_0x2646c4['wasUndone'],'cs:removeUser'===_0x9bd86a[_0x3be00d]['type']&&(_0x45d138['isDisconnection']=!0x0),_0x45d138;});return this['_assignOperationAuthors'](_0x4193f6,_0x9bd86a),_0x4193f6;}['_assignOperationAuthors'](_0x4bbf7a,_0x4dff9f){for(let _0x23abd5=0x0;_0x23abd5<_0x4bbf7a['length'];_0x23abd5++)'init'!=_0x4dff9f[_0x23abd5]['type']?_0x4bbf7a[_0x23abd5]['_authorId']=_0x4dff9f[_0x23abd5]['userId']:_0x4bbf7a[_0x23abd5]['_authorId']=null;}['_refreshUserSelectionMarkers'](){this['_hasSelectionChanged']=!0x0,this['_shouldSendSelectionUpdate']()&&this['_sendBufferedOperationsDelayed']();}['_shouldSendSelectionUpdate'](){const _0x2f9a5c=this['editor']['plugins']['get'](_0x1066f7)['channelSessions']['get'](this['_channelId']);return!this['editor']['isReadOnly']&&_0x2f9a5c&&_0x2f9a5c['length']>0x1&&this['_hasSelectionChanged'];}['_shouldSendUpdate'](){return this['_bufferedOperations']['length']>0x0||this['_shouldSendSelectionUpdate']();}}class j extends Error{}function J(_0x23acc7,_0x15e5a1){for(const _0xa589f of _0x23acc7)_0xa589f['baseVersion']=_0x15e5a1++;}l['CollaborativeEditingService']=_0x3ab398;class K{constructor(_0xd4bc43){this['_ignoredOperations']=_0xd4bc43,this['_operationToId']=new WeakMap();}['getIdOfTheLastOperation'](_0x44531f){let _0x28752a=_0x44531f['length'];for(;_0x28752a--;){const _0x4db8e7=_0x44531f[_0x28752a];if(!this['_ignoredOperations']['has'](_0x4db8e7)){if(!this['_operationToId']['has'](_0x4db8e7)){const _0x5d9a88=_0x434afb()['slice'](0x1,0x12);this['_operationToId']['set'](_0x4db8e7,_0x5d9a88);}return this['_operationToId']['get'](_0x4db8e7);}}}['setIdForTheLastOperation'](_0x7748f9,_0x3c5e42){if(!_0x3c5e42)return;let _0x32a415=_0x7748f9['length'];for(;_0x32a415--;){const _0xc67b00=_0x7748f9[_0x32a415];this['_ignoredOperations']['has'](_0xc67b00)||this['_operationToId']['set'](_0xc67b00,_0x3c5e42);}}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x3a89=['clear','plugins','_uniqueUsersCount','_registeredSessions','forEach','channelSessions','get','_createUser','remove','allConnectedUsers','size','connection','fire','_handleSessionRemove','register','sessions-register-already-registered','defineMe','stopListening','_users','mySessionId','orderNumber','add','delete','getUser','sessionId','context','sessions-unregister-not-exist','unregister','getUserBySessionId','pluginName','addUser','listenTo','values','connected','set','user','channelConnectedUsers','state','has','requires','getUserSessions','_handleSessionAdd'];(function(_0x5d0a60,_0x3a89c6){const _0x4f4b73=function(_0xa257e8){while(--_0xa257e8){_0x5d0a60['push'](_0x5d0a60['shift']());}};_0x4f4b73(++_0x3a89c6);}(_0x3a89,0x1eb));const _0x4f4b=function(_0x5d0a60,_0x3a89c6){_0x5d0a60=_0x5d0a60-0x0;let _0x4f4b73=_0x3a89[_0x5d0a60];return _0x4f4b73;};import{ContextPlugin as _0x15a1e2}from'ckeditor5/src/core';import{Collection as _0x1a03e5,CKEditorError as _0x2ce95d}from'ckeditor5/src/utils';import _0x20a267 from'./websocketgateway';import _0x4ee6a4 from'@ckeditor/ckeditor5-collaboration-core/src/users';export default class r extends _0x15a1e2{static get[_0x4f4b('0x0')](){return'Sessions';}static get[_0x4f4b('0xa')](){return[_0x20a267,_0x4ee6a4];}['init'](){const _0xb9c39b=this[_0x4f4b('0x26')],_0x5a3e08=_0xb9c39b[_0x4f4b('0xe')][_0x4f4b('0x13')](_0x20a267);this[_0x4f4b('0x12')]=new Map(),this[_0x4f4b('0x7')]=new Map(),this[_0x4f4b('0x16')]=new _0x1a03e5(),this[_0x4f4b('0x10')]=new Map(),this[_0x4f4b('0xf')]=0x0,this['_users']=_0xb9c39b[_0x4f4b('0xe')][_0x4f4b('0x13')](_0x4ee6a4),this[_0x4f4b('0x2')](_0x5a3e08,'change:state',(_0x372f5d,_0x27cae3,_0x2de02f)=>{if(_0x4f4b('0x4')!==_0x2de02f)this[_0x4f4b('0x12')][_0x4f4b('0x11')](_0x4d965e=>_0x4d965e[_0x4f4b('0xd')]()),this[_0x4f4b('0x7')][_0x4f4b('0x11')](_0x13f9c1=>_0x13f9c1[_0x4f4b('0xd')]()),this[_0x4f4b('0x16')][_0x4f4b('0xd')]();else for(const [_0x1c630c,_0x1deaba]of this['_registeredSessions'])for(const _0x6c52f7 of _0x1deaba)this[_0x4f4b('0xc')](_0x1c630c,_0x6c52f7);}),this[_0x4f4b('0x14')](_0x5a3e08[_0x4f4b('0x18')]['me'],!0x0);}[_0x4f4b('0x1b')](_0x519c05,_0xe4440){if(this['_registeredSessions'][_0x4f4b('0x9')](_0x519c05))throw new _0x2ce95d(_0x4f4b('0x1c'),null,{'channelId':_0x519c05});this[_0x4f4b('0x10')][_0x4f4b('0x5')](_0x519c05,_0xe4440),this['channelSessions'][_0x4f4b('0x5')](_0x519c05,new _0x1a03e5()),this[_0x4f4b('0x7')][_0x4f4b('0x5')](_0x519c05,new _0x1a03e5()),this[_0x4f4b('0x2')](_0xe4440,_0x4f4b('0x22'),(_0x2ad13e,_0x42906f)=>this[_0x4f4b('0xc')](_0x519c05,_0x42906f)),this[_0x4f4b('0x2')](_0xe4440,_0x4f4b('0x15'),(_0x4bd65e,_0x3bff19)=>this[_0x4f4b('0x1a')](_0x519c05,_0x3bff19));for(const _0x900013 of _0xe4440)this[_0x4f4b('0xc')](_0x519c05,_0x900013);}[_0x4f4b('0x28')](_0x2256d9){if(!this[_0x4f4b('0x10')]['has'](_0x2256d9))throw new _0x2ce95d(_0x4f4b('0x27'),null,{'channelId':_0x2256d9});const _0x1cda2a=this['_registeredSessions'][_0x4f4b('0x13')](_0x2256d9);this[_0x4f4b('0x1e')](_0x1cda2a);for(const _0x3c8eab of _0x1cda2a)_0x4f4b('0x4')===this[_0x4f4b('0x26')][_0x4f4b('0xe')][_0x4f4b('0x13')](_0x20a267)[_0x4f4b('0x8')]&&this[_0x4f4b('0x1a')](_0x2256d9,_0x3c8eab);this[_0x4f4b('0x10')][_0x4f4b('0x23')](_0x2256d9),this['channelSessions']['delete'](_0x2256d9),this[_0x4f4b('0x7')]['delete'](_0x2256d9);}get[_0x4f4b('0x20')](){return this[_0x4f4b('0x26')]['plugins'][_0x4f4b('0x13')](_0x20a267)['connection'][_0x4f4b('0x25')];}[_0x4f4b('0x29')](_0x64fc45){for(const _0x5491a5 of this[_0x4f4b('0x12')]['values']())for(const _0x5674c7 of _0x5491a5)if(_0x5674c7['id']===_0x64fc45)return _0x5674c7[_0x4f4b('0x6')];}[_0x4f4b('0xb')](_0x4583c1,_0x7155af){const _0x32e20a=_0x7155af?[this[_0x4f4b('0x12')][_0x4f4b('0x13')](_0x7155af)]:this[_0x4f4b('0x12')][_0x4f4b('0x3')](),_0x401943=new Set();for(const _0x34ee40 of _0x32e20a)for(const _0x9d0849 of _0x34ee40)_0x9d0849[_0x4f4b('0x6')]['id']===_0x4583c1['id']&&_0x401943['add'](_0x9d0849['id']);return _0x401943;}['getUserRole'](_0x5ebefe){for(const _0x54a762 of this['channelSessions'][_0x4f4b('0x3')]())for(const _0x2b6ff0 of _0x54a762)if(_0x2b6ff0[_0x4f4b('0x6')]===_0x5ebefe)return _0x2b6ff0['role'];}[_0x4f4b('0xc')](_0x5decd0,_0x11c490){if(_0x4f4b('0x4')!==this['context'][_0x4f4b('0xe')][_0x4f4b('0x13')](_0x20a267)[_0x4f4b('0x8')])return;const _0x21e888=_0x11c490[_0x4f4b('0x6')],_0x280f78=this['_users'][_0x4f4b('0x24')](_0x21e888['id'])||this['_createUser'](_0x21e888),_0x44e81f=Object['assign']({},_0x11c490,{'user':_0x280f78});this[_0x4f4b('0x12')][_0x4f4b('0x13')](_0x5decd0)['add'](_0x44e81f);const _0x427279=this[_0x4f4b('0x7')][_0x4f4b('0x13')](_0x5decd0);_0x427279[_0x4f4b('0x9')](_0x280f78['id'])||_0x427279[_0x4f4b('0x22')](_0x280f78),this[_0x4f4b('0x16')][_0x4f4b('0x9')](_0x280f78['id'])||this[_0x4f4b('0x16')][_0x4f4b('0x22')](_0x280f78),this[_0x4f4b('0x19')]('sessionAdd:'+_0x5decd0,{'channelId':_0x5decd0,'session':_0x44e81f});}[_0x4f4b('0x1a')](_0x22aca8,_0x4bf6){if(_0x4f4b('0x4')!==this[_0x4f4b('0x26')][_0x4f4b('0xe')][_0x4f4b('0x13')](_0x20a267)[_0x4f4b('0x8')])return;const _0x32b5f=this['channelConnectedUsers']['get'](_0x22aca8),_0x10a238=_0x4bf6[_0x4f4b('0x6')];this[_0x4f4b('0x12')][_0x4f4b('0x13')](_0x22aca8)['remove'](_0x4bf6['id']),_0x32b5f['has'](_0x10a238['id'])&&!this['getUserSessions'](_0x10a238,_0x22aca8)[_0x4f4b('0x17')]&&_0x32b5f[_0x4f4b('0x15')](_0x10a238['id']),this[_0x4f4b('0x16')][_0x4f4b('0x13')](_0x10a238['id'])&&!this['getUserSessions'](_0x10a238)[_0x4f4b('0x17')]&&this[_0x4f4b('0x16')]['remove'](_0x10a238['id']);}[_0x4f4b('0x14')](_0x1da6a3,_0x38a588){const _0x313482=this[_0x4f4b('0x1f')][_0x4f4b('0x1')](_0x1da6a3);return _0x38a588&&this[_0x4f4b('0x1f')][_0x4f4b('0x1d')](_0x1da6a3['id']),_0x313482[_0x4f4b('0x21')]=this[_0x4f4b('0xf')]++,_0x313482;}}
23
+ const _0x327b=['getUserBySessionId','add','delete','_registeredSessions','mySessionId','size','channelSessions','sessionId','set','unregister','pluginName','forEach','context','user','listenTo','connected','role','get','requires','fire','stopListening','defineMe','getUserSessions','_users','values','connection','sessions-unregister-not-exist','_uniqueUsersCount','has','clear','plugins','_createUser','addUser','assign','orderNumber','channelConnectedUsers','init','register','getUserRole','_handleSessionAdd','state','sessions-register-already-registered','remove','_handleSessionRemove','allConnectedUsers'];(function(_0x3d4c97,_0x327bd3){const _0x55b25f=function(_0x4e7d39){while(--_0x4e7d39){_0x3d4c97['push'](_0x3d4c97['shift']());}};_0x55b25f(++_0x327bd3);}(_0x327b,0x165));const _0x55b2=function(_0x3d4c97,_0x327bd3){_0x3d4c97=_0x3d4c97-0x0;let _0x55b25f=_0x327b[_0x3d4c97];return _0x55b25f;};import{ContextPlugin as _0x11e141}from'ckeditor5/src/core';import{Collection as _0x59a846,CKEditorError as _0x5c55b4}from'ckeditor5/src/utils';import _0x1b7db6 from'./websocketgateway';import{Users as _0x191bd5}from'ckeditor5-collaboration/src/collaboration-core';export default class r extends _0x11e141{static get[_0x55b2('0xd')](){return'Sessions';}static get[_0x55b2('0x15')](){return[_0x1b7db6,_0x191bd5];}[_0x55b2('0x27')](){const _0x8ea983=this['context'],_0x1c3ced=_0x8ea983[_0x55b2('0x21')]['get'](_0x1b7db6);this[_0x55b2('0x9')]=new Map(),this[_0x55b2('0x26')]=new Map(),this[_0x55b2('0x2')]=new _0x59a846(),this[_0x55b2('0x6')]=new Map(),this['_uniqueUsersCount']=0x0,this[_0x55b2('0x1a')]=_0x8ea983[_0x55b2('0x21')][_0x55b2('0x14')](_0x191bd5),this['listenTo'](_0x1c3ced,'change:state',(_0x180098,_0x33f1bf,_0x54f052)=>{if(_0x55b2('0x12')!==_0x54f052)this[_0x55b2('0x9')][_0x55b2('0xe')](_0x1e16a9=>_0x1e16a9[_0x55b2('0x20')]()),this[_0x55b2('0x26')][_0x55b2('0xe')](_0x3c7f7f=>_0x3c7f7f[_0x55b2('0x20')]()),this['allConnectedUsers'][_0x55b2('0x20')]();else for(const [_0x18da28,_0x3b02ac]of this['_registeredSessions'])for(const _0x48880b of _0x3b02ac)this[_0x55b2('0x2a')](_0x18da28,_0x48880b);}),this[_0x55b2('0x22')](_0x1c3ced[_0x55b2('0x1c')]['me'],!0x0);}[_0x55b2('0x28')](_0xd46ce3,_0x27ff1a){if(this['_registeredSessions'][_0x55b2('0x1f')](_0xd46ce3))throw new _0x5c55b4(_0x55b2('0x2c'),null,{'channelId':_0xd46ce3});this['_registeredSessions']['set'](_0xd46ce3,_0x27ff1a),this[_0x55b2('0x9')]['set'](_0xd46ce3,new _0x59a846()),this[_0x55b2('0x26')][_0x55b2('0xb')](_0xd46ce3,new _0x59a846()),this['listenTo'](_0x27ff1a,_0x55b2('0x4'),(_0x5db7bc,_0x4f43c6)=>this[_0x55b2('0x2a')](_0xd46ce3,_0x4f43c6)),this[_0x55b2('0x11')](_0x27ff1a,_0x55b2('0x0'),(_0xe3993c,_0x11364d)=>this[_0x55b2('0x1')](_0xd46ce3,_0x11364d));for(const _0x5b489a of _0x27ff1a)this[_0x55b2('0x2a')](_0xd46ce3,_0x5b489a);}[_0x55b2('0xc')](_0x3e02ba){if(!this['_registeredSessions']['has'](_0x3e02ba))throw new _0x5c55b4(_0x55b2('0x1d'),null,{'channelId':_0x3e02ba});const _0x59c86d=this[_0x55b2('0x6')]['get'](_0x3e02ba);this[_0x55b2('0x17')](_0x59c86d);for(const _0x2b910a of _0x59c86d)_0x55b2('0x12')===this[_0x55b2('0xf')][_0x55b2('0x21')][_0x55b2('0x14')](_0x1b7db6)[_0x55b2('0x2b')]&&this[_0x55b2('0x1')](_0x3e02ba,_0x2b910a);this[_0x55b2('0x6')][_0x55b2('0x5')](_0x3e02ba),this[_0x55b2('0x9')]['delete'](_0x3e02ba),this['channelConnectedUsers'][_0x55b2('0x5')](_0x3e02ba);}get[_0x55b2('0x7')](){return this[_0x55b2('0xf')][_0x55b2('0x21')][_0x55b2('0x14')](_0x1b7db6)['connection'][_0x55b2('0xa')];}[_0x55b2('0x3')](_0x5a9601){for(const _0x396cd1 of this[_0x55b2('0x9')][_0x55b2('0x1b')]())for(const _0x2d229c of _0x396cd1)if(_0x2d229c['id']===_0x5a9601)return _0x2d229c[_0x55b2('0x10')];}[_0x55b2('0x19')](_0x302485,_0x4fa2a0){const _0x1d4730=_0x4fa2a0?[this[_0x55b2('0x9')][_0x55b2('0x14')](_0x4fa2a0)]:this[_0x55b2('0x9')][_0x55b2('0x1b')](),_0x2341c7=new Set();for(const _0x5f0835 of _0x1d4730)for(const _0x34e508 of _0x5f0835)_0x34e508['user']['id']===_0x302485['id']&&_0x2341c7[_0x55b2('0x4')](_0x34e508['id']);return _0x2341c7;}[_0x55b2('0x29')](_0x193164){for(const _0x29c018 of this['channelSessions'][_0x55b2('0x1b')]())for(const _0x1e1fb1 of _0x29c018)if(_0x1e1fb1[_0x55b2('0x10')]===_0x193164)return _0x1e1fb1[_0x55b2('0x13')];}[_0x55b2('0x2a')](_0x254856,_0x543ba2){if(_0x55b2('0x12')!==this[_0x55b2('0xf')]['plugins'][_0x55b2('0x14')](_0x1b7db6)[_0x55b2('0x2b')])return;const _0x2ec75d=_0x543ba2[_0x55b2('0x10')],_0x4b0edd=this[_0x55b2('0x1a')]['getUser'](_0x2ec75d['id'])||this['_createUser'](_0x2ec75d),_0x34018f=Object[_0x55b2('0x24')]({},_0x543ba2,{'user':_0x4b0edd});this[_0x55b2('0x9')][_0x55b2('0x14')](_0x254856)[_0x55b2('0x4')](_0x34018f);const _0x463314=this[_0x55b2('0x26')][_0x55b2('0x14')](_0x254856);_0x463314['has'](_0x4b0edd['id'])||_0x463314[_0x55b2('0x4')](_0x4b0edd),this[_0x55b2('0x2')]['has'](_0x4b0edd['id'])||this['allConnectedUsers']['add'](_0x4b0edd),this[_0x55b2('0x16')]('sessionAdd:'+_0x254856,{'channelId':_0x254856,'session':_0x34018f});}[_0x55b2('0x1')](_0x166be0,_0x9aaa6b){if('connected'!==this['context'][_0x55b2('0x21')][_0x55b2('0x14')](_0x1b7db6)['state'])return;const _0x46372b=this[_0x55b2('0x26')][_0x55b2('0x14')](_0x166be0),_0x53bb25=_0x9aaa6b[_0x55b2('0x10')];this[_0x55b2('0x9')][_0x55b2('0x14')](_0x166be0)[_0x55b2('0x0')](_0x9aaa6b['id']),_0x46372b[_0x55b2('0x1f')](_0x53bb25['id'])&&!this[_0x55b2('0x19')](_0x53bb25,_0x166be0)['size']&&_0x46372b[_0x55b2('0x0')](_0x53bb25['id']),this['allConnectedUsers'][_0x55b2('0x14')](_0x53bb25['id'])&&!this[_0x55b2('0x19')](_0x53bb25)[_0x55b2('0x8')]&&this['allConnectedUsers'][_0x55b2('0x0')](_0x53bb25['id']);}['_createUser'](_0xe55de8,_0x216218){const _0x2c0568=this[_0x55b2('0x1a')][_0x55b2('0x23')](_0xe55de8);return _0x216218&&this[_0x55b2('0x1a')][_0x55b2('0x18')](_0xe55de8['id']),_0x2c0568[_0x55b2('0x25')]=this[_0x55b2('0x1e')]++,_0x2c0568;}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x1ef3=['clear','editor','has','undo','getAttribute','getCustomProperty','color','markerToElement','afterInit','hasDomSelection','for','change:range','editingDowncast','createRange','$graveyard','$text','getUserBySessionId','render','commands','checkChild','ck-user__selection','user:range','selection','createUserMarkerOperations','getFirstRange','update:user:range','view','getSelectionClass','change','_createdBatches','detach','setCustomProperty','deletionPosition','element','isCollapsed','addMarker','get','pluginName','isObject','start','orderNumber','schema','updateMarker','getNearestSelectionRange','isSimilar','name','user:range:','contenteditable','isInline','parent','isLimit','markers','markerRange','editing','mySessionId','model','oldRange','innerHTML','document','newRange','getStart','getMarkerClass','delete','size','enqueueChange','getRange','applyOperation','plugins','userPositionMarker','rootName','removeMarker','nodeAfter','markerName','tableCell','hasContent','init','conversion','highest','end','batch','createUIElement','root','split'];(function(_0x3ef211,_0x1ef3eb){const _0x2cf7f3=function(_0x591cbe){while(--_0x591cbe){_0x3ef211['push'](_0x3ef211['shift']());}};_0x2cf7f3(++_0x1ef3eb);}(_0x1ef3,0x74));const _0x2cf7=function(_0x3ef211,_0x1ef3eb){_0x3ef211=_0x3ef211-0x0;let _0x2cf7f3=_0x1ef3[_0x3ef211];return _0x2cf7f3;};import{Plugin as _0x53755a}from'ckeditor5/src/core';import _0x1e0f0e from'./sessions';import{LiveRange as _0x18ae74}from'ckeditor5/src/engine';import'../../theme/usermarkers.css';export default class Y extends _0x53755a{static get['requires'](){return[_0x1e0f0e];}static get[_0x2cf7('0x4')](){return'UserMarkers';}[_0x2cf7('0x2a')](){const _0x23afaf=this[_0x2cf7('0x33')],_0x25398d=_0x23afaf[_0x2cf7('0x22')][_0x2cf7('0x3')](_0x1e0f0e);_0x23afaf[_0x2cf7('0x2b')][_0x2cf7('0x3c')](_0x2cf7('0x3e'))[_0x2cf7('0x39')]({'model':'user:position','view':(_0xe96155,{writer:_0x626e94})=>function(_0x58e44f,_0x5499b1,_0x32a2e6,_0x2e01e4){const _0x5ddd9d=_0x58e44f[_0x2cf7('0x27')][_0x2cf7('0x31')](':')[0x2],_0x49549f=_0x32a2e6[_0x2cf7('0x42')](_0x5ddd9d);if(!_0x49549f||_0x5ddd9d===_0x32a2e6['mySessionId'])return;if(!_0x2e01e4['model']['schema'][_0x2cf7('0x45')](_0x58e44f[_0x2cf7('0x13')][_0x2cf7('0x6')],'$text'))return;const _0x29e8cc={'class':'ck-user__marker\x20'+_0x49549f[_0x2cf7('0x38')][_0x2cf7('0x1c')](),'data-name':_0x49549f[_0x2cf7('0xc')],'data-session-id':_0x5ddd9d},_0x2e7c24=_0x2e01e4[_0x2cf7('0x16')][_0x2cf7('0x12')][_0x2cf7('0x3')](_0x58e44f[_0x2cf7('0x27')])[_0x2cf7('0x1b')](),_0x3e88a7=_0x2e7c24[_0x2cf7('0x26')],_0x3d2cc1=_0x2e01e4[_0x2cf7('0x16')][_0x2cf7('0x8')];if(_0x3e88a7&&_0x3d2cc1[_0x2cf7('0x5')](_0x3e88a7)&&_0x3d2cc1[_0x2cf7('0xf')](_0x3e88a7)&&!_0x2e01e4[_0x2cf7('0x16')][_0x2cf7('0x12')][_0x2cf7('0x3')](_0x2cf7('0xd')+_0x5ddd9d)[_0x2cf7('0x20')]()[_0x2cf7('0x1')])return;const _0x5cdf33=_0x2e7c24[_0x2cf7('0x10')];_0x2e01e4[_0x2cf7('0x16')][_0x2cf7('0x8')][_0x2cf7('0x11')](_0x5cdf33)&&!_0x2e01e4['model'][_0x2cf7('0x29')](_0x5cdf33)&&(_0x29e8cc[_0x2cf7('0xe')]=!0x1);const _0x4f8859=function(_0x22bd5a,_0x21713f){const _0x1e5764=_0x22bd5a[_0x2cf7('0x2f')]('span',_0x21713f);return _0x22bd5a[_0x2cf7('0x51')]('userPositionMarker',!0x0,_0x1e5764),_0x1e5764[_0x2cf7('0x43')]=function(_0x28ca68){const _0x4fc498=this['toDomElement'](_0x28ca68);return _0x4fc498[_0x2cf7('0x18')]='&#8203;<span\x20class=\x22ck-user__marker-line\x22><span\x20class=\x22ck-user__marker-dot\x22></span></span>',_0x4fc498;},_0x1e5764[_0x2cf7('0xb')]=function(_0x5b2df0){return this['getCustomProperty'](_0x2cf7('0x23'))&&_0x5b2df0[_0x2cf7('0x37')](_0x2cf7('0x23'))&&this[_0x2cf7('0x36')]('data-session-id')==_0x5b2df0[_0x2cf7('0x36')]('data-session-id');},_0x1e5764;}(_0x5499b1,_0x29e8cc);return _0x4f8859['priority']=0x3e8+_0x49549f[_0x2cf7('0x7')],_0x4f8859;}(_0xe96155,_0x626e94,_0x25398d,_0x23afaf)}),_0x23afaf['conversion']['for'](_0x2cf7('0x3e'))['markerToHighlight']({'model':_0x2cf7('0x47'),'view':_0x20da33=>function(_0x2afad8,_0x128a3d){const _0x590c2c=_0x2afad8[_0x2cf7('0x27')][_0x2cf7('0x31')](':')[0x2];if(_0x590c2c===_0x128a3d[_0x2cf7('0x15')])return;const _0x5523dc=_0x128a3d[_0x2cf7('0x42')](_0x590c2c);if(!_0x5523dc)return{'id':_0x590c2c};return{'id':_0x590c2c,'classes':[_0x2cf7('0x46'),_0x5523dc[_0x2cf7('0x38')][_0x2cf7('0x4d')]()],'attributes':{'data-session-id':_0x590c2c},'priority':0x7d0+_0x5523dc[_0x2cf7('0x7')]};}(_0x20da33,_0x25398d)}),function(_0x3baf9b){const _0xa4e061=_0x3baf9b[_0x2cf7('0x16')],_0x1b1ebe=new Map(),_0x112964=_0x3baf9b[_0x2cf7('0x22')][_0x2cf7('0x3')](_0x1e0f0e);_0xa4e061[_0x2cf7('0x12')]['on'](_0x2cf7('0x4b'),(_0x138393,_0x346de9,_0x178890,_0x3ae86e)=>{if(!_0x3ae86e&&_0x1b1ebe['get'](_0x346de9[_0x2cf7('0xc')]))return _0x1b1ebe[_0x2cf7('0x3')](_0x346de9[_0x2cf7('0xc')])[_0x2cf7('0x50')](),void _0x1b1ebe[_0x2cf7('0x1d')](_0x346de9[_0x2cf7('0xc')]);const _0x59333b=_0x346de9[_0x2cf7('0xc')][_0x2cf7('0x31')](':')[0x2];if(_0x59333b===_0x112964[_0x2cf7('0x15')])return;const _0x3c7523='user:position:'+_0x59333b;_0xa4e061['markers'][_0x2cf7('0x34')](_0x3c7523)&&_0xa4e061[_0x2cf7('0x4e')](_0x52a7cf=>_0x52a7cf[_0x2cf7('0x9')](_0x3c7523)),_0x346de9['on'](_0x2cf7('0x3d'),(_0x39024a,_0x10ca35,_0x45b49e)=>{if(_0x2cf7('0x40')!=_0x10ca35[_0x2cf7('0x30')]['rootName']&&_0x2cf7('0x40')==_0x346de9[_0x2cf7('0x20')]()[_0x2cf7('0x30')][_0x2cf7('0x24')]&&!_0x1b1ebe[_0x2cf7('0x34')](_0x346de9['name'])){const _0x3b43fa=_0xa4e061[_0x2cf7('0x8')][_0x2cf7('0xa')](_0x45b49e[_0x2cf7('0x52')]);if(_0x3b43fa){const _0x2b0763=_0x18ae74['fromRange'](_0x3b43fa);_0x1b1ebe['set'](_0x346de9[_0x2cf7('0xc')],_0x2b0763),_0x2b0763['on'](_0x2cf7('0x3d'),(_0x3e14cb,_0x40b3c8,_0x194be5)=>{if(_0x2cf7('0x40')==_0x2b0763[_0x2cf7('0x30')][_0x2cf7('0x24')]){const _0x42e86c=_0xa4e061[_0x2cf7('0x8')]['getNearestSelectionRange'](_0x194be5[_0x2cf7('0x52')]);_0x42e86c?(_0x2b0763['start']=_0x42e86c[_0x2cf7('0x6')],_0x2b0763[_0x2cf7('0x2d')]=_0x42e86c['end']):(_0x1b1ebe[_0x2cf7('0x1d')](_0x346de9['name']),_0x2b0763[_0x2cf7('0x50')]());}});}}});}),_0xa4e061[_0x2cf7('0x19')]['on']('change',()=>{_0x1b1ebe[_0x2cf7('0x1e')]>0x0&&_0xa4e061[_0x2cf7('0x1f')]({'isUndoable':!0x1},_0x5a01a3=>{for(const [_0x4c6cf9,_0x46f88d]of _0x1b1ebe)_0x2cf7('0x40')==_0xa4e061[_0x2cf7('0x12')][_0x2cf7('0x3')](_0x4c6cf9)[_0x2cf7('0x20')]()[_0x2cf7('0x30')][_0x2cf7('0x24')]&&(re(_0x4c6cf9[_0x2cf7('0x31')](':')[0x2],_0x46f88d['toRange'](),_0xa4e061,_0x5a01a3),_0x46f88d['detach']());_0x1b1ebe[_0x2cf7('0x32')]();});});}(_0x23afaf);}[_0x2cf7('0x3a')](){const _0xa93903=this['editor'],_0x330055=_0xa93903[_0x2cf7('0x44')]['get'](_0x2cf7('0x35'));_0x330055&&_0xa93903[_0x2cf7('0x16')]['on'](_0x2cf7('0x21'),(_0x5534c5,_0x55a96d)=>{const _0x41c557=_0x55a96d[0x0];if('marker'!=_0x41c557['type']||!_0x41c557[_0x2cf7('0xc')]['startsWith']('user:'))return;const _0x3a28a3=_0x41c557[_0x2cf7('0x2e')];_0x330055[_0x2cf7('0x4f')][_0x2cf7('0x34')](_0x3a28a3)&&(_0x41c557[_0x2cf7('0x1a')]=_0x41c557['oldRange']?_0xa93903[_0x2cf7('0x16')][_0x2cf7('0x3f')](_0x41c557[_0x2cf7('0x17')][_0x2cf7('0x6')],_0x41c557[_0x2cf7('0x17')][_0x2cf7('0x2d')]):null);},{'priority':_0x2cf7('0x2c')});}[_0x2cf7('0x49')](){const _0x1ffd9a=this[_0x2cf7('0x33')],_0x2e3c7b=_0x1ffd9a[_0x2cf7('0x16')][_0x2cf7('0x19')],_0x1a6d5b=_0x1ffd9a[_0x2cf7('0x22')][_0x2cf7('0x3')](_0x1e0f0e);_0x1ffd9a[_0x2cf7('0x16')][_0x2cf7('0x1f')]({'isUndoable':!0x1},_0x370937=>{const _0x22dc9f=_0x2cf7('0xd')+_0x1a6d5b[_0x2cf7('0x15')],_0x18518d='user:position:'+_0x1a6d5b[_0x2cf7('0x15')],_0x470fec=_0x1ffd9a[_0x2cf7('0x16')]['markers'][_0x2cf7('0x34')](_0x22dc9f);_0x1ffd9a[_0x2cf7('0x14')][_0x2cf7('0x4c')][_0x2cf7('0x3b')]?re(_0x1a6d5b[_0x2cf7('0x15')],_0x2e3c7b[_0x2cf7('0x48')][_0x2cf7('0x4a')](),_0x1ffd9a['model'],_0x370937):_0x470fec&&(_0x370937[_0x2cf7('0x25')](_0x22dc9f),_0x370937[_0x2cf7('0x25')](_0x18518d));});}}function re(_0x540b23,_0x42ba54,_0x5b7830,_0x5ac110){const _0x5484e0=_0x2cf7('0xd')+_0x540b23,_0xf8268d='user:position:'+_0x540b23,_0x2b5bd6=_0x42ba54['getContainedElement']();let _0x33daae=_0x42ba54[_0x2cf7('0x6')];_0x2b5bd6&&_0x2b5bd6['is'](_0x2cf7('0x0'),_0x2cf7('0x28'))&&(_0x33daae=function(_0x170d2e,_0x829d5f){for(const _0x822f0b of _0x170d2e['getPositions']())if(_0x829d5f[_0x2cf7('0x8')][_0x2cf7('0x45')](_0x822f0b,_0x2cf7('0x41')))return _0x822f0b;}(_0x42ba54,_0x5b7830),_0x42ba54=_0x5ac110[_0x2cf7('0x3f')](_0x33daae)),_0x33daae=_0x5ac110['createRange'](_0x33daae),_0x5b7830[_0x2cf7('0x12')]['has'](_0x5484e0)?(_0x5ac110[_0x2cf7('0x9')](_0x5484e0,{'range':_0x42ba54}),_0x5ac110[_0x2cf7('0x9')](_0xf8268d,{'range':_0x33daae})):(_0x5ac110['addMarker'](_0x5484e0,{'range':_0x42ba54,'usingOperation':!0x0}),_0x5ac110[_0x2cf7('0x2')](_0xf8268d,{'range':_0x33daae,'usingOperation':!0x0}));}
23
+ const _0x5d25=['schema','reconvertMarker','marker','hasDomSelection','newRange','name','for','markerToElement','getMarkerClass','markerToHighlight','$graveyard','updateMarker','editingDowncast','getSelectionClass','ck-user__selection','getRange','getCustomProperty','change','delete','getAttribute','root','mySessionId','highest','editor','set','get','markerName','change:range','user:position','conversion','enqueueChange','rootName','render','markers','deletionPosition','data-session-id','isInline','hasContent','commands','getContainedElement','user:position:','size','user:','toDomElement','start','getNearestSelectionRange','createUserMarkerOperations','clear','_createdBatches','orderNumber','oldRange','user:range','end','getStart','UserMarkers','plugins','userPositionMarker','$text','document','isLimit','ck-user__marker\x20','model','innerHTML','isCollapsed','addMarker','getFirstRange','checkChild','priority','user:range:','fromRange','split','isSimilar','getUserBySessionId','createRange','span','parent','update:user:range','requires','color','startsWith','removeMarker','detach','applyOperation','pluginName','has'];(function(_0x24a3e7,_0x5d259a){const _0x2d7338=function(_0x307608){while(--_0x307608){_0x24a3e7['push'](_0x24a3e7['shift']());}};_0x2d7338(++_0x5d259a);}(_0x5d25,0xfe));const _0x2d73=function(_0x24a3e7,_0x5d259a){_0x24a3e7=_0x24a3e7-0x0;let _0x2d7338=_0x5d25[_0x24a3e7];return _0x2d7338;};import{Plugin as _0x24f508}from'ckeditor5/src/core';import _0x19b46a from'./sessions';import{LiveRange as _0x51db30}from'ckeditor5/src/engine';import'../../theme/usermarkers.css';export default class W extends _0x24f508{static get[_0x2d73('0x4e')](){return[_0x19b46a];}static get[_0x2d73('0x54')](){return _0x2d73('0x37');}['init'](){const _0x20a110=this[_0x2d73('0x18')],_0x1ddabf=_0x20a110['plugins']['get'](_0x19b46a);_0x20a110[_0x2d73('0x1e')][_0x2d73('0x7')](_0x2d73('0xd'))[_0x2d73('0x8')]({'model':_0x2d73('0x1d'),'view':(_0x4e7a17,{writer:_0x31cbf4})=>function(_0x1f9e8a,_0x941081,_0x8553b3,_0x1c5841){const _0x100244=_0x1f9e8a[_0x2d73('0x1b')]['split'](':')[0x2],_0x53000f=_0x8553b3[_0x2d73('0x49')](_0x100244);if(!_0x53000f||_0x100244===_0x8553b3[_0x2d73('0x16')])return;if(!_0x1c5841[_0x2d73('0x3e')][_0x2d73('0x1')]['checkChild'](_0x1f9e8a['markerRange']['start'],_0x2d73('0x3a')))return;const _0xbeef69={'class':_0x2d73('0x3d')+_0x53000f[_0x2d73('0x4f')][_0x2d73('0x9')](),'data-name':_0x53000f[_0x2d73('0x6')],'data-session-id':_0x100244},_0x161730=_0x1c5841[_0x2d73('0x3e')][_0x2d73('0x22')][_0x2d73('0x1a')](_0x1f9e8a['markerName'])[_0x2d73('0x36')](),_0x3146e8=_0x161730['nodeAfter'],_0x46c32f=_0x1c5841[_0x2d73('0x3e')][_0x2d73('0x1')];if(_0x3146e8&&_0x46c32f['isObject'](_0x3146e8)&&_0x46c32f[_0x2d73('0x25')](_0x3146e8)&&!_0x1c5841[_0x2d73('0x3e')][_0x2d73('0x22')][_0x2d73('0x1a')](_0x2d73('0x45')+_0x100244)[_0x2d73('0x10')]()[_0x2d73('0x40')])return;const _0x2c12a1=_0x161730[_0x2d73('0x4c')];_0x1c5841[_0x2d73('0x3e')][_0x2d73('0x1')][_0x2d73('0x3c')](_0x2c12a1)&&!_0x1c5841['model'][_0x2d73('0x26')](_0x2c12a1)&&(_0xbeef69['contenteditable']=!0x1);const _0x54f1ef=function(_0x39ada5,_0x657326){const _0x130c00=_0x39ada5['createUIElement'](_0x2d73('0x4b'),_0x657326);return _0x39ada5['setCustomProperty'](_0x2d73('0x39'),!0x0,_0x130c00),_0x130c00[_0x2d73('0x21')]=function(_0x4ca17e){const _0x249aec=this[_0x2d73('0x2c')](_0x4ca17e);return _0x249aec[_0x2d73('0x3f')]='&#8203;<span\x20class=\x22ck-user__marker-line\x22><span\x20class=\x22ck-user__marker-dot\x22></span></span>',_0x249aec;},_0x130c00[_0x2d73('0x48')]=function(_0x50ab06){return this['getCustomProperty']('userPositionMarker')&&_0x50ab06[_0x2d73('0x11')](_0x2d73('0x39'))&&this[_0x2d73('0x14')]('data-session-id')==_0x50ab06['getAttribute'](_0x2d73('0x24'));},_0x130c00;}(_0x941081,_0xbeef69);return _0x54f1ef[_0x2d73('0x44')]=0x3e8+_0x53000f[_0x2d73('0x32')],_0x54f1ef;}(_0x4e7a17,_0x31cbf4,_0x1ddabf,_0x20a110)}),_0x20a110[_0x2d73('0x1e')]['for'](_0x2d73('0xd'))[_0x2d73('0xa')]({'model':_0x2d73('0x34'),'view':_0x82f561=>function(_0x2b8ac5,_0xc92511){const _0x51ec74=_0x2b8ac5[_0x2d73('0x1b')]['split'](':')[0x2];if(_0x51ec74===_0xc92511[_0x2d73('0x16')])return;const _0x3eea11=_0xc92511['getUserBySessionId'](_0x51ec74);if(!_0x3eea11)return{'id':_0x51ec74};return{'id':_0x51ec74,'classes':[_0x2d73('0xf'),_0x3eea11[_0x2d73('0x4f')][_0x2d73('0xe')]()],'attributes':{'data-session-id':_0x51ec74},'priority':0x7d0+_0x3eea11[_0x2d73('0x32')]};}(_0x82f561,_0x1ddabf)}),function(_0xd699fa){const _0x339dc6=_0xd699fa['model'],_0x84aad7=new Map(),_0x4c7a27=_0xd699fa[_0x2d73('0x38')][_0x2d73('0x1a')](_0x19b46a);_0x339dc6[_0x2d73('0x22')]['on'](_0x2d73('0x4d'),(_0x4aad77,_0xd1fb8b,_0x2f57fa,_0x150b91)=>{if(!_0x150b91&&_0x84aad7[_0x2d73('0x1a')](_0xd1fb8b[_0x2d73('0x6')]))return _0x84aad7[_0x2d73('0x1a')](_0xd1fb8b['name'])[_0x2d73('0x52')](),void _0x84aad7['delete'](_0xd1fb8b[_0x2d73('0x6')]);const _0x3e0d56=_0xd1fb8b[_0x2d73('0x6')][_0x2d73('0x47')](':')[0x2];if(_0x3e0d56===_0x4c7a27[_0x2d73('0x16')])return;const _0x373f90='user:position:'+_0x3e0d56;_0x339dc6['markers'][_0x2d73('0x0')](_0x373f90)&&_0xd699fa['editing'][_0x2d73('0x2')](_0x373f90),_0xd1fb8b['on'](_0x2d73('0x1c'),(_0x18bd73,_0x211d80,_0x575bab)=>{if(_0x2d73('0xb')!=_0x211d80[_0x2d73('0x15')]['rootName']&&_0x2d73('0xb')==_0xd1fb8b['getRange']()['root'][_0x2d73('0x20')]&&!_0x84aad7[_0x2d73('0x0')](_0xd1fb8b[_0x2d73('0x6')])){const _0x205c7e=_0x339dc6[_0x2d73('0x1')][_0x2d73('0x2e')](_0x575bab[_0x2d73('0x23')]);if(_0x205c7e){const _0x4b9ea4=_0x51db30[_0x2d73('0x46')](_0x205c7e);_0x84aad7[_0x2d73('0x19')](_0xd1fb8b[_0x2d73('0x6')],_0x4b9ea4),_0x4b9ea4['on'](_0x2d73('0x1c'),(_0x2ef003,_0x3df95d,_0x58a00f)=>{if(_0x2d73('0xb')==_0x4b9ea4['root']['rootName']){const _0x29a708=_0x339dc6[_0x2d73('0x1')][_0x2d73('0x2e')](_0x58a00f['deletionPosition']);_0x29a708?(_0x4b9ea4['start']=_0x29a708['start'],_0x4b9ea4[_0x2d73('0x35')]=_0x29a708[_0x2d73('0x35')]):(_0x84aad7[_0x2d73('0x13')](_0xd1fb8b[_0x2d73('0x6')]),_0x4b9ea4[_0x2d73('0x52')]());}});}}});}),_0x339dc6[_0x2d73('0x3b')]['on'](_0x2d73('0x12'),()=>{_0x84aad7[_0x2d73('0x2a')]>0x0&&_0x339dc6['enqueueChange']({'isUndoable':!0x1},_0x328ae2=>{for(const [_0x76e983,_0x44191e]of _0x84aad7)'$graveyard'==_0x339dc6[_0x2d73('0x22')]['get'](_0x76e983)['getRange']()['root']['rootName']&&(Q(_0x76e983['split'](':')[0x2],_0x44191e['toRange'](),_0x339dc6,_0x328ae2),_0x44191e[_0x2d73('0x52')]());_0x84aad7[_0x2d73('0x30')]();});});}(_0x20a110);}['afterInit'](){const _0x367d4f=this['editor'],_0x1685fb=_0x367d4f[_0x2d73('0x27')][_0x2d73('0x1a')]('undo');_0x1685fb&&_0x367d4f[_0x2d73('0x3e')]['on'](_0x2d73('0x53'),(_0x3abb7d,_0x388444)=>{const _0x1a49f0=_0x388444[0x0];if(_0x2d73('0x3')!=_0x1a49f0['type']||!_0x1a49f0[_0x2d73('0x6')][_0x2d73('0x50')](_0x2d73('0x2b')))return;const _0x340fac=_0x1a49f0['batch'];_0x1685fb[_0x2d73('0x31')][_0x2d73('0x0')](_0x340fac)&&(_0x1a49f0[_0x2d73('0x5')]=_0x1a49f0[_0x2d73('0x33')]?_0x367d4f[_0x2d73('0x3e')][_0x2d73('0x4a')](_0x1a49f0[_0x2d73('0x33')]['start'],_0x1a49f0[_0x2d73('0x33')][_0x2d73('0x35')]):null);},{'priority':_0x2d73('0x17')});}[_0x2d73('0x2f')](){const _0x36d1a3=this['editor'],_0x31672c=_0x36d1a3[_0x2d73('0x3e')][_0x2d73('0x3b')],_0x5896d6=_0x36d1a3['plugins'][_0x2d73('0x1a')](_0x19b46a);_0x36d1a3[_0x2d73('0x3e')][_0x2d73('0x1f')]({'isUndoable':!0x1},_0x598c30=>{const _0x5abf58=_0x2d73('0x45')+_0x5896d6['mySessionId'],_0x5d7229='user:position:'+_0x5896d6[_0x2d73('0x16')],_0x54811b=_0x36d1a3[_0x2d73('0x3e')][_0x2d73('0x22')][_0x2d73('0x0')](_0x5abf58);_0x36d1a3['editing']['view'][_0x2d73('0x4')]?Q(_0x5896d6[_0x2d73('0x16')],_0x31672c['selection'][_0x2d73('0x42')](),_0x36d1a3[_0x2d73('0x3e')],_0x598c30):_0x54811b&&(_0x598c30[_0x2d73('0x51')](_0x5abf58),_0x598c30[_0x2d73('0x51')](_0x5d7229));});}}function Q(_0x15f1dd,_0x28fccc,_0x290fbc,_0x4ddb36){const _0x341da9=_0x2d73('0x45')+_0x15f1dd,_0x9bbdaa=_0x2d73('0x29')+_0x15f1dd,_0x39ce0c=_0x28fccc[_0x2d73('0x28')]();let _0xe741c6=_0x28fccc[_0x2d73('0x2d')];_0x39ce0c&&_0x39ce0c['is']('element','tableCell')&&(_0xe741c6=function(_0x3ac12e,_0xaddc4e){for(const _0x53f0f2 of _0x3ac12e['getPositions']())if(_0xaddc4e['schema'][_0x2d73('0x43')](_0x53f0f2,'$text'))return _0x53f0f2;}(_0x28fccc,_0x290fbc),_0x28fccc=_0x4ddb36['createRange'](_0xe741c6)),_0xe741c6=_0x4ddb36[_0x2d73('0x4a')](_0xe741c6),_0x290fbc['markers']['has'](_0x341da9)?(_0x4ddb36[_0x2d73('0xc')](_0x341da9,{'range':_0x28fccc}),_0x4ddb36[_0x2d73('0xc')](_0x9bbdaa,{'range':_0xe741c6})):(_0x4ddb36[_0x2d73('0x41')](_0x341da9,{'range':_0x28fccc,'usingOperation':!0x0}),_0x4ddb36['addMarker'](_0x9bbdaa,{'range':_0xe741c6,'usingOperation':!0x0}));}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0xbe37=['all','init','add','catch','connect','webSocketUrl','The\x20limit\x20of\x20maximum\x20concurrent\x20connections\x20that\x20the\x20collaboration\x20server\x20can\x20handle\x20has\x20been\x20reached.\x20Try\x20opening\x20the\x20document\x20again\x20in\x20a\x20few\x20minutes.\x20Please\x20contact\x20your\x20system\x20administrator\x20if\x20the\x20problem\x20persists.','get','has','_isBrowserOffline','online','connecting','pluginName','delete','connection','showWarning','websocketgateway-missing-websocket-url','destroy','removeFromReconnectionStack','constructor','_reconnectionStack','reconnect','cloudservices-reconnection-error','state','set','plugins','initialReconnectionInterval','then','bind','context','_domEmitter','error','_reconnect','connected','from','websocketgateway-invalid-plugin-interface','token','Connected\x20users\x20limit\x20exceeded','real-time-collaboration','listenTo','function','create','limitExceeded','disconnected','_shouldPluginsReconnect','isInReconnectionStack','code'];(function(_0x4de758,_0xbe372){const _0x16e49a=function(_0x119529){while(--_0x119529){_0x4de758['push'](_0x4de758['shift']());}};_0x16e49a(++_0xbe372);}(_0xbe37,0x1ab));const _0x16e4=function(_0x4de758,_0xbe372){_0x4de758=_0x4de758-0x0;let _0x16e49a=_0xbe37[_0x4de758];return _0x16e49a;};import{ContextPlugin as _0x1effc7}from'ckeditor5/src/core';import{DomEmitterMixin as _0x49419a,CKEditorError as _0x529c1b}from'ckeditor5/src/utils';import _0xc2cfed from'@ckeditor/ckeditor-cloud-services-collaboration/src/websocketgateway/websocketgateway';import _0x457ba6 from'@ckeditor/ckeditor5-cloud-services/src/cloudservices';import{Notification as _0x5c7e05}from'ckeditor5/src/ui';export default class d extends _0x1effc7{static get['requires'](){return[_0x457ba6,_0x5c7e05];}static get['pluginName'](){return'WebSocketGateway';}[_0x16e4('0x2c')](){const _0x10aec0=this[_0x16e4('0x19')],_0x496d0a=_0x10aec0[_0x16e4('0x15')][_0x16e4('0x3')](_0x457ba6),_0x23e0d8=_0x10aec0[_0x16e4('0x15')][_0x16e4('0x3')](_0x5c7e05);if(!_0x496d0a[_0x16e4('0x20')])throw new _0x529c1b('websocketgateway-missing-token',this);if(!_0x496d0a[_0x16e4('0x1')])throw new _0x529c1b(_0x16e4('0xc'),this);return this[_0x16e4('0x14')](_0x16e4('0x13'),'connecting'),this[_0x16e4('0x14')](_0x16e4('0x5'),!0x1),this[_0x16e4('0x10')]=new Set(),this[_0x16e4('0x28')]=!0x1,this[_0x16e4('0x1a')]=Object[_0x16e4('0x25')](_0x49419a),this[_0x16e4('0x1a')][_0x16e4('0x23')](window,'offline',()=>this[_0x16e4('0x5')]=!0x0),this[_0x16e4('0x1a')][_0x16e4('0x23')](window,_0x16e4('0x6'),()=>this[_0x16e4('0x5')]=!0x1),d['WebSocketGateway'][_0x16e4('0x0')](_0x496d0a[_0x16e4('0x20')],_0x496d0a[_0x16e4('0x1')],{'disconnectOnUnload':!0x1})[_0x16e4('0x17')](_0x4974de=>{if(this[_0x16e4('0xa')]=_0x4974de,this[_0x16e4('0x18')](_0x16e4('0x13'))['to'](_0x4974de,_0x16e4('0x13'),this,_0x16e4('0x5'),(_0xe41da7,_0x25343e)=>(_0x16e4('0x1d')!==_0xe41da7&&(this[_0x16e4('0x28')]=!0x0),_0x25343e||'connected'!==_0xe41da7?_0x16e4('0x27'):_0x16e4('0x27')==this['state']&&this[_0x16e4('0x28')]?(this[_0x16e4('0x28')]=!0x1,this[_0x16e4('0x1c')](),_0x16e4('0x7')):_0x16e4('0x1d'))),this[_0x16e4('0xa')]['on']('error',(_0x49c2f8,_0x3e65d8)=>{if(_0x16e4('0x26')!==_0x3e65d8[_0x16e4('0x2a')])throw console[_0x16e4('0x1b')](_0x3e65d8),new _0x529c1b('cloudservices-init',null,{'originalError':_0x3e65d8});_0x23e0d8[_0x16e4('0xb')](_0x16e4('0x2'),{'title':_0x16e4('0x21'),'namespace':_0x16e4('0x22')});}),!_0x4974de['me'])return new Promise(_0x20a0b9=>_0x4974de['on']('change:me',_0x20a0b9));})[_0x16e4('0x2e')](_0x43a1a5=>{throw console[_0x16e4('0x1b')](_0x43a1a5),new _0x529c1b('cloudservices-init',null,{'originalError':_0x43a1a5});});}['addToReconnectionStack'](_0x21e2bf){if(_0x16e4('0x24')!=typeof _0x21e2bf[_0x16e4('0x11')])throw new _0x529c1b(_0x16e4('0x1f'),this);if(this['isInReconnectionStack'](_0x21e2bf))throw new _0x529c1b('websocketgateway-plugin-already-registered',this,{'name':_0x21e2bf[_0x16e4('0xf')][_0x16e4('0x8')]});this[_0x16e4('0x10')][_0x16e4('0x2d')](_0x21e2bf);}[_0x16e4('0xe')](_0x441f21){this[_0x16e4('0x10')][_0x16e4('0x9')](_0x441f21);}[_0x16e4('0x29')](_0x206f12){return this['_reconnectionStack'][_0x16e4('0x4')](_0x206f12);}['_reconnect'](){return this[_0x16e4('0xa')]['reconnect']()[_0x16e4('0x17')](()=>Promise[_0x16e4('0x2b')](Array[_0x16e4('0x1e')](this[_0x16e4('0x10')],_0x1d27be=>_0x1d27be['reconnect']())))['then'](()=>this['state']='connected')[_0x16e4('0x2e')](_0x238f3d=>{throw console[_0x16e4('0x1b')](_0x238f3d),new _0x529c1b(_0x16e4('0x12'),this[_0x16e4('0x19')]);});}[_0x16e4('0xd')](){this[_0x16e4('0xa')]&&this[_0x16e4('0xa')]['disconnect'](),this[_0x16e4('0x13')]=_0x16e4('0x27'),this[_0x16e4('0x1a')]['stopListening'](),super[_0x16e4('0xd')]();}}d['WebSocketGateway']=_0xc2cfed,d[_0x16e4('0x16')]=0x3e8;
23
+ const _0x485b=['state','websocketgateway-plugin-already-registered','_domEmitter','all','create','delete','_reconnectionStack','catch','_isBrowserOffline','online','websocketgateway-invalid-plugin-interface','offline','constructor','has','webSocketUrl','_reconnect','code','WebSocketGateway','connect','showWarning','websocketgateway-missing-websocket-url','addToReconnectionStack','reconnect','connected','function','real-time-collaboration','websocketgateway-missing-token','cloudservices-reconnection-error','bind','_shouldPluginsReconnect','connection','get','destroy','initialReconnectionInterval','cloudservices-init','then','removeFromReconnectionStack','Connected\x20users\x20limit\x20exceeded','disconnected','set','from','context','listenTo','connecting','requires','limitExceeded','stopListening','CloudServices','plugins','isInReconnectionStack','error'];(function(_0x543fef,_0x485b1f){const _0x32ea12=function(_0x1a44df){while(--_0x1a44df){_0x543fef['push'](_0x543fef['shift']());}};_0x32ea12(++_0x485b1f);}(_0x485b,0x1c6));const _0x32ea=function(_0x543fef,_0x485b1f){_0x543fef=_0x543fef-0x0;let _0x32ea12=_0x485b[_0x543fef];return _0x32ea12;};import{ContextPlugin as _0x5b2b33}from'ckeditor5/src/core';import{DomEmitterMixin as _0x2de136,CKEditorError as _0x3a5d6a}from'ckeditor5/src/utils';import _0x4bea08 from'@ckeditor/ckeditor-cloud-services-collaboration/src/websocketgateway/websocketgateway';import{Notification as _0x3f5242}from'ckeditor5/src/ui';export default class c extends _0x5b2b33{static get[_0x32ea('0x31')](){return[_0x32ea('0x1'),_0x3f5242];}static get['pluginName'](){return _0x32ea('0x16');}['init'](){const _0x48fead=this[_0x32ea('0x2e')],_0x966acf=_0x48fead[_0x32ea('0x2')][_0x32ea('0x24')]('CloudServices'),_0x4b419a=_0x48fead[_0x32ea('0x2')]['get'](_0x3f5242);if(!_0x966acf['token'])throw new _0x3a5d6a(_0x32ea('0x1f'),this);if(!_0x966acf[_0x32ea('0x13')])throw new _0x3a5d6a(_0x32ea('0x19'),this);return this[_0x32ea('0x2c')](_0x32ea('0x5'),_0x32ea('0x30')),this['set']('_isBrowserOffline',!0x1),this[_0x32ea('0xb')]=new Set(),this[_0x32ea('0x22')]=!0x1,this['_domEmitter']=Object[_0x32ea('0x9')](_0x2de136),this[_0x32ea('0x7')][_0x32ea('0x2f')](window,_0x32ea('0x10'),()=>this[_0x32ea('0xd')]=!0x0),this[_0x32ea('0x7')][_0x32ea('0x2f')](window,_0x32ea('0xe'),()=>this[_0x32ea('0xd')]=!0x1),c[_0x32ea('0x16')][_0x32ea('0x17')](_0x966acf['token'],_0x966acf['webSocketUrl'],{'disconnectOnUnload':!0x1})[_0x32ea('0x28')](_0x3ea77c=>{if(this[_0x32ea('0x23')]=_0x3ea77c,this[_0x32ea('0x21')]('state')['to'](_0x3ea77c,_0x32ea('0x5'),this,'_isBrowserOffline',(_0x3faab5,_0x4accfe)=>('connected'!==_0x3faab5&&(this[_0x32ea('0x22')]=!0x0),_0x4accfe||_0x32ea('0x1c')!==_0x3faab5?'disconnected':_0x32ea('0x2b')==this['state']&&this[_0x32ea('0x22')]?(this[_0x32ea('0x22')]=!0x1,this[_0x32ea('0x14')](),_0x32ea('0x30')):_0x32ea('0x1c'))),this[_0x32ea('0x23')]['on'](_0x32ea('0x4'),(_0x2dbe5f,_0xc71ff9)=>{if(_0x32ea('0x32')!==_0xc71ff9[_0x32ea('0x15')])throw console[_0x32ea('0x4')](_0xc71ff9),new _0x3a5d6a(_0x32ea('0x27'),null,{'originalError':_0xc71ff9});_0x4b419a[_0x32ea('0x18')]('The\x20limit\x20of\x20maximum\x20concurrent\x20connections\x20that\x20the\x20collaboration\x20server\x20can\x20handle\x20has\x20been\x20reached.\x20Try\x20opening\x20the\x20document\x20again\x20in\x20a\x20few\x20minutes.\x20Please\x20contact\x20your\x20system\x20administrator\x20if\x20the\x20problem\x20persists.',{'title':_0x32ea('0x2a'),'namespace':_0x32ea('0x1e')});}),!_0x3ea77c['me'])return new Promise(_0x366fcd=>_0x3ea77c['on']('change:me',_0x366fcd));})['catch'](_0x2095d4=>{throw console[_0x32ea('0x4')](_0x2095d4),new _0x3a5d6a('cloudservices-init',null,{'originalError':_0x2095d4});});}[_0x32ea('0x1a')](_0x1180c7){if(_0x32ea('0x1d')!=typeof _0x1180c7[_0x32ea('0x1b')])throw new _0x3a5d6a(_0x32ea('0xf'),this);if(this[_0x32ea('0x3')](_0x1180c7))throw new _0x3a5d6a(_0x32ea('0x6'),this,{'name':_0x1180c7[_0x32ea('0x11')]['pluginName']});this[_0x32ea('0xb')]['add'](_0x1180c7);}[_0x32ea('0x29')](_0x5595c1){this['_reconnectionStack'][_0x32ea('0xa')](_0x5595c1);}[_0x32ea('0x3')](_0x11dbed){return this[_0x32ea('0xb')][_0x32ea('0x12')](_0x11dbed);}[_0x32ea('0x14')](){return this[_0x32ea('0x23')][_0x32ea('0x1b')]()[_0x32ea('0x28')](()=>Promise[_0x32ea('0x8')](Array[_0x32ea('0x2d')](this[_0x32ea('0xb')],_0x3ef04a=>_0x3ef04a[_0x32ea('0x1b')]())))[_0x32ea('0x28')](()=>this['state']=_0x32ea('0x1c'))[_0x32ea('0xc')](_0x5ef1c5=>{throw console[_0x32ea('0x4')](_0x5ef1c5),new _0x3a5d6a(_0x32ea('0x20'),this[_0x32ea('0x2e')]);});}[_0x32ea('0x25')](){this['connection']&&this[_0x32ea('0x23')]['disconnect'](),this['state']='disconnected',this[_0x32ea('0x7')][_0x32ea('0x0')](),super[_0x32ea('0x25')]();}}c['WebSocketGateway']=_0x4bea08,c[_0x32ea('0x26')]=0x3e8;
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- var _0x37f0=['RealTimeCollaborativeEditing','requires'];(function(_0x31842b,_0x37f0c7){var _0x1748f9=function(_0x249df0){while(--_0x249df0){_0x31842b['push'](_0x31842b['shift']());}};_0x1748f9(++_0x37f0c7);}(_0x37f0,0x134));var _0x1748=function(_0x31842b,_0x37f0c7){_0x31842b=_0x31842b-0x0;var _0x1748f9=_0x37f0[_0x31842b];return _0x1748f9;};import{Plugin as _0x27212f}from'ckeditor5/src/core';import _0xc7ea71 from'./realtimecollaborativeediting/realtimecollaborationclient';export default class m extends _0x27212f{static get[_0x1748('0x1')](){return[_0xc7ea71];}static get['pluginName'](){return _0x1748('0x0');}}
23
+ var _0x3544=['pluginName'];(function(_0x2e5e86,_0x3544e9){var _0x49dcff=function(_0x58d82d){while(--_0x58d82d){_0x2e5e86['push'](_0x2e5e86['shift']());}};_0x49dcff(++_0x3544e9);}(_0x3544,0x126));var _0x49dc=function(_0x2e5e86,_0x3544e9){_0x2e5e86=_0x2e5e86-0x0;var _0x49dcff=_0x3544[_0x2e5e86];return _0x49dcff;};import{Plugin as _0x43b8d2}from'ckeditor5/src/core';import _0x329b4d from'./realtimecollaborativeediting/realtimecollaborationclient';export default class n extends _0x43b8d2{static get['requires'](){return[_0x329b4d];}static get[_0x49dc('0x0')](){return'RealTimeCollaborativeEditing';}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- import{Plugin as _0x4f2a9e}from'ckeditor5/src/core';import _0x12795b from'@ckeditor/ckeditor5-revision-history/src/revisiontracker';import _0x18ec26 from'../realtimecollaborativeediting/realtimecollaborationclient';import _0x5e911d from'../realtimecollaborativeediting/websocketgateway';import _0x3fb41e from'../realtimecollaborativeediting/sessions';import _0x11d28d from'@ckeditor/ckeditor-cloud-services-collaboration/src/users/user';import _0x32b390 from'@ckeditor/ckeditor5-collaboration-core/src/users';import _0x48ebad from'@ckeditor/ckeditor-cloud-services-collaboration/src/revision-history/revisionhistoryservice';import{debounce as _0x40aaee}from'lodash-es';import{DomEmitterMixin as _0x2f2a69}from'ckeditor5/src/utils';export default class v extends _0x4f2a9e{static get['requires'](){return[_0x5e911d,_0x18ec26,_0x12795b,_0x3fb41e,_0x32b390];}['_getLatestVersionFromServerOperations'](){const _0x3e135c=this['editor']['plugins']['get'](_0x18ec26)['serverHistory']['_operations'];for(let _0x81e997=_0x3e135c['length']-0x1;_0x81e997>=0x0;_0x81e997--)if('marker'!==_0x3e135c[_0x81e997]['type']||_0x3e135c[_0x81e997]['affectsData'])return _0x3e135c[_0x81e997]['baseVersion']+0x1;}async['init'](){this['_lastRequestId']=null,this['_revisionTracker']=this['editor']['plugins']['get'](_0x12795b);const _0x5778d9=this['editor']['plugins']['get'](_0x18ec26),_0xa5752d=_0x5778d9['serverHistory'],_0x1be8f8=this['editor']['plugins']['get'](_0x5e911d);_0x1be8f8['addToReconnectionStack'](this);const _0x4e2867=this['editor']['config']['get']('collaboration.channelId');this['_revisionHistoryService']=new v['RevisionHistoryService'](_0x4e2867),this['_revisionTracker']['setSource']({'history':_0xa5752d,'getLatestVersion':()=>this['_getLatestVersion'](),'getCurrentRevisionId':()=>_0x5778d9['sessionId']});const _0x4ab6b4=new Set();this['editor']['plugins']['get'](_0x5e911d)['connection']['on']('change:state',(_0xc16a35,_0x121b7e,_0x4c621e)=>{if('disconnected'===_0x4c621e){for(const _0x4f6e97 of _0x4ab6b4)_0x4f6e97('Disconnected');_0x4ab6b4['clear']();}}),this['_revisionTracker']['adapter']={'getRevision':async({revisionId:_0x239508})=>(await this['_waitForServiceReady'](),await this['_revisionHistoryService']['getRevision'](_0x239508)),'updateRevisions':async _0x5c3c47=>{await this['_waitForServiceReady']();const _0x2d609f=this['_revisionTracker']['currentRevision'];for(const _0x47f0df of _0x5c3c47)_0x47f0df['id']===_0x2d609f['id']&&(_0x47f0df['isEmptyCurrent']=_0x47f0df['fromVersion']===_0x47f0df['toVersion']);return Promise['race']([this['_revisionHistoryService']['updateRevisions'](_0x5c3c47,this['_lastRequestId']),new Promise((_0x5a6ab8,_0xff1afb)=>_0x4ab6b4['add'](_0xff1afb))])['then'](_0x3ff1ff=>{this['_lastRequestId']=_0x3ff1ff;})['catch'](_0x33be69=>{if('Disconnected'!==_0x33be69&&('400'!==_0x33be69['code']||void 0x0===_0x33be69['data']['wrongRequestId']))throw _0x33be69;for(const _0x20b9e6 of _0x5c3c47){!this['_revisionTracker']['repository']['getRevision'](_0x20b9e6['id'])||this['_revisionTracker']['_bufferUpdate'](_0x20b9e6['id'],_0x20b9e6,!0x1);}if('Disconnected'===_0x33be69)throw _0x33be69;});}},this['listenTo'](this['_revisionHistoryService'],'revisionsUpdated',(_0x43f8a4,{revisionsData:_0x4475df,requestId:_0x315be6})=>{Math['max'](..._0x4475df['map'](_0x22ef9d=>_0x22ef9d['toVersion']))>this['_getLatestVersionFromServerOperations']()-0x1?this['_getLatestVersion']()['then'](()=>{this['_handleRevisionsUpdate'](_0x4475df,_0x315be6);}):this['_handleRevisionsUpdate'](_0x4475df,_0x315be6);});const {revisions:_0x1a8c63,requestId:_0x438cee}=await this['_revisionHistoryService']['connect'](_0x1be8f8['connection']);this['_lastRequestId']=_0x438cee,await this['_fetchMissingUsers'](_0x1a8c63);for(const _0x4a5f28 of _0x1a8c63)this['_revisionTracker']['addRevisionData'](_0x4a5f28);this['listenTo'](_0x5778d9,'change:_isConnected',(_0x22c05a,_0x2f7a05,_0x3aa24c)=>{_0x3aa24c&&(this['_oldOffset']=_0x5778d9['_offset'],_0x22c05a['off']());}),this['editor']['plugins']['has']('Autosave')||this['_initForDocumentStorage'](),this['_revisionTracker']['bind']('isEnabled')['to'](_0x1be8f8,'state',_0x3f96e5=>'connected'===_0x3f96e5);}async['_waitForServiceReady'](){this['_revisionHistoryService']['isConnected']||await new Promise(_0x1400ea=>{this['listenTo'](this['_revisionHistoryService'],'connect',_0x114e3b=>{_0x114e3b['off'](),_0x1400ea();});});}['_getLatestVersion'](){const _0x307c9e=this['editor']['plugins']['get'](_0x18ec26);return new Promise(_0x280073=>{_0x307c9e['_isPendingUpdate']?_0x307c9e['once']('change:_isPendingUpdate',()=>{_0x280073(this['_getLatestVersionFromServerOperations']());}):_0x280073(this['_getLatestVersionFromServerOperations']());});}['_initForDocumentStorage'](){this['_domEmitter']=Object['create'](_0x2f2a69);const t=this['editor']['t'],_0x1f75d2=this['editor']['plugins']['get']('PendingActions');let _0x139fb0=null;const _0x26e24f=_0x40aaee(()=>{this['_revisionTracker']['update']()['finally'](()=>{_0x1f75d2['remove'](_0x139fb0),_0x139fb0=null;});},0x1f4);this['listenTo'](this['editor'],'ready',()=>{this['listenTo'](this['editor']['model']['document'],'change:data',(_0x4a8cd2,_0x59d9b8)=>{_0x59d9b8['isLocal']&&(_0x139fb0||(_0x139fb0=_0x1f75d2['add'](t({'string':'Unsaved\x20change\x20in\x20revision\x20history.','id':'PENDING_ACTION_REVISION_HISTORY'}))),_0x26e24f());});}),this['_domEmitter']['listenTo'](window,'beforeunload',(_0x25e556,_0x57a717)=>{_0x1f75d2['hasAny']&&(_0x57a717['returnValue']=_0x1f75d2['first']['message']);});}['destroy'](){this['_domEmitter']&&this['_domEmitter']['stopListening'](),super['destroy']();}async['reconnect'](){const _0x43c171=this['editor']['plugins']['get'](_0x5e911d),_0x21c522=this['editor']['plugins']['get'](_0x18ec26),_0x3d8651=async()=>{const _0x57ba28=this['_revisionTracker']['currentRevision'],_0x141cea=_0x57ba28['id'],_0x50bee1=_0x141cea!==_0x21c522['sessionId'];if(_0x50bee1){const _0x29a2c2=_0x21c522['_offset']-this['_oldOffset'],_0x21e55d=this['_getLatestVersionFromServerOperations']();this['_revisionTracker']['_revisionDataBuilder']['reInit']();if(_0x57ba28['toVersion']+_0x29a2c2!==_0x21e55d){const _0x5291c0=_0x57ba28['fromVersion']+_0x29a2c2,_0x34ad1a=this['editor']['plugins']['get']('Users'),_0x1a5368=this['_revisionTracker']['buildRevisionData']({'currentRevision':_0x57ba28,'from':_0x5291c0,'to':_0x21e55d});_0x1a5368['id']=_0x57ba28['id'];const _0x227ec1=_0x1a5368['authorsIds']['map'](_0x54b08f=>_0x34ad1a['getUser'](_0x54b08f));_0x57ba28['_update']({..._0x1a5368,'authors':_0x227ec1},!0x0),this['_revisionTracker']['_bufferUpdate'](_0x57ba28['id'],_0x1a5368,!0x0);}this['_revisionTracker']['_startingVersion']=_0x21e55d,(_0x57ba28['toVersion']===_0x57ba28['fromVersion']&&!this['_revisionTracker']['_bufferedUpdates']['has'](_0x141cea)&&this['_revisionTracker']['repository']['_revisions']['remove'](_0x141cea),this['_revisionTracker']['_createCurrentRevision'](_0x21e55d));}const {revisions:_0x1db31b,requestId:_0x1348b7}=await this['_revisionHistoryService']['reconnect'](_0x43c171['connection'],this['_lastRequestId']);_0x50bee1&&_0x1db31b['length']>0x0?_0x21c522['_handleReconnectionError']():(await this['_fetchMissingUsers'](_0x1db31b),this['_handleRevisionsUpdate'](_0x1db31b,_0x1348b7),this['_revisionTracker']['sendBufferedUpdates']());};return _0x21c522['_isConnected']?_0x3d8651():new Promise((_0x157cc8,_0x4bae98)=>{_0x21c522['once']('change:_isConnected',()=>{_0x3d8651()['then'](_0x157cc8)['catch'](_0x4bae98);});});}['_handleRevisionsUpdate'](_0x198c86,_0xe0017){const _0x4f8092=this['_revisionTracker']['repository'];this['_lastRequestId']=_0xe0017;for(const _0x5574a8 of _0x198c86){const _0x4ef53b=_0x4f8092['getRevision'](_0x5574a8['id']);if(_0x4ef53b){if((_0x5574a8['fromVersion']||_0x5574a8['toVersion'])&&(_0x5574a8['diffData']=null),_0x4ef53b===this['_revisionTracker']['currentRevision']){const _0x3ef6ea=Math['max'](_0x4ef53b['toVersion'],_0x5574a8['toVersion']),_0x51e71b=Math['max'](_0x4ef53b['fromVersion'],_0x5574a8['fromVersion']);let _0x2dfd8c;_0x4ef53b['toVersion']===_0x5574a8['toVersion']&&_0x4ef53b['fromVersion']===_0x5574a8['fromVersion']?(_0x2dfd8c=!0x0,this['_preventResendingRevisionData'](_0x5574a8)):_0x5574a8['toVersion']===_0x3ef6ea&&_0x5574a8['fromVersion']===_0x51e71b?_0x2dfd8c=!0x1:(_0x4ef53b['toVersion']===_0x3ef6ea&&_0x4ef53b['fromVersion']===_0x51e71b||this['_fixRevision']({'revision':_0x4ef53b,'from':_0x51e71b,'to':_0x3ef6ea}),_0x2dfd8c=!0x0),_0x2dfd8c&&(delete _0x5574a8['fromVersion'],delete _0x5574a8['toVersion'],delete _0x5574a8['diffData'],delete _0x5574a8['createdAt'],delete _0x5574a8['authorsIds']);}this['_revisionTracker']['setRevisionData'](_0x5574a8),this['_preventResendingRevisionData'](_0x5574a8);}else this['_revisionTracker']['addRevisionData'](_0x5574a8);}const _0x2bca31=_0x4f8092['getRevisions']();_0x2bca31['reverse']();for(let _0x3098b8=0x0;_0x3098b8<_0x2bca31['length']-0x1;_0x3098b8++){const _0x37a9ae=_0x2bca31[_0x3098b8],_0x75ef78=_0x2bca31[_0x3098b8+0x1];if(_0x37a9ae['fromVersion']<_0x75ef78['toVersion']){const _0x4edc1d=_0x75ef78['toVersion'];this['_fixRevision']({'revision':_0x37a9ae,'from':_0x4edc1d});}}}['_fixRevision']({revision:_0x257069,from:_0x2d0ab6,to:_0x20678e}={}){const _0x53c673=this['editor']['plugins']['get']('Users'),_0x29fb45=this['_revisionTracker']['buildRevisionData']({'revision':_0x257069,'from':_0x2d0ab6,'to':_0x20678e});_0x29fb45['authors']=_0x29fb45['authorsIds']['map'](_0x19e7ef=>_0x53c673['getUser'](_0x19e7ef)),_0x257069['_update'](_0x29fb45);}['_preventResendingRevisionData'](_0x38cfff){const _0xe8030b={};_0xe8030b['id']=_0x38cfff['id'];for(const _0x300f93 of Object['keys'](_0x38cfff))'id'!==_0x300f93&&(_0xe8030b[_0x300f93]=void 0x0);this['_revisionTracker']['_bufferUpdate'](_0xe8030b['id'],_0xe8030b,!0x0);}['_fetchMissingUsers'](_0x5b8d20){const _0x404ab4=this['editor']['plugins']['get'](_0x32b390),{connection:_0x1bf60d}=this['editor']['plugins']['get'](_0x5e911d),_0xcdf5eb=new Set();for(const _0x3a4d8a of _0x5b8d20){for(const _0x44e3e2 of _0x3a4d8a['authorsIds'])_0x526462(_0x44e3e2);_0x3a4d8a['creatorId']&&_0x526462(_0x3a4d8a['creatorId']);}return Promise['all'](Array['from'](_0xcdf5eb,async _0x550891=>{const _0x1cfa52=await _0x11d28d['get'](_0x1bf60d,_0x550891);_0x404ab4['getUser'](_0x550891)||_0x404ab4['addUser'](_0x1cfa52);}));function _0x526462(_0x59a44d){_0x404ab4['getUser'](_0x59a44d)||_0xcdf5eb['add'](_0x59a44d);}}}v['RevisionHistoryService']=_0x48ebad;
23
+ import{debounce as _0xb91a5f}from'lodash-es';import{Plugin as _0x32c987}from'ckeditor5/src/core';import{DomEmitterMixin as _0x29cae5,logWarning as tt}from'ckeditor5/src/utils';import{Users as _0x265ffe}from'ckeditor5-collaboration/src/collaboration-core';import it from'@ckeditor/ckeditor5-revision-history/src/revisiontracker';import _0x16f00a from'../realtimecollaborativeediting/realtimecollaborationclient';import _0x27b127 from'../realtimecollaborativeediting/websocketgateway';import _0x52f8e8 from'../realtimecollaborativeediting/sessions';import _0x22c943 from'@ckeditor/ckeditor-cloud-services-collaboration/src/users/user';import st from'@ckeditor/ckeditor-cloud-services-collaboration/src/revision-history/revisionhistoryservice';export default class v extends _0x32c987{static get['requires'](){return[_0x27b127,_0x16f00a,it,_0x52f8e8,_0x265ffe];}async['init'](){this['_lastRequestId']=null,this['_revisionTracker']=this['editor']['plugins']['get'](it);const _0x2d731c=this['editor']['plugins']['get'](_0x16f00a),_0x45b582=_0x2d731c['serverHistory'],_0x7ce493=this['editor']['plugins']['get'](_0x27b127);_0x7ce493['addToReconnectionStack'](this);const _0xae4bc9=this['editor']['config']['get']('collaboration.channelId');this['_revisionHistoryService']=new v['RevisionHistoryService'](_0xae4bc9),this['_revisionTracker']['setSource']({'history':_0x45b582,'getLatestVersion':()=>this['_getLatestVersion'](),'getCurrentRevisionId':()=>_0x2d731c['sessionId']}),this['_revisionTracker']['adapter']={'getRevision':async({revisionId:_0x3f6132})=>(await this['_waitForServiceReady'](),await this['_revisionHistoryService']['getRevision'](_0x3f6132)),'updateRevisions':async _0x560c53=>{await this['_waitForServiceReady']();const _0x599494=this['_revisionTracker']['currentRevision'];for(const _0x5c7b1c of _0x560c53)_0x5c7b1c['id']===_0x599494['id']&&(_0x5c7b1c['isEmptyCurrent']=_0x5c7b1c['fromVersion']===_0x5c7b1c['toVersion']);this['_revisionHistoryService']['updateRevisions'](_0x560c53,this['_lastRequestId'])['then'](_0x380f35=>{this['_lastRequestId']=_0x380f35;})['catch'](_0x58354e=>{if(!(et(_0x58354e)||'400'===_0x58354e['code']&&void 0x0!==_0x58354e['data']['wrongRequestId']))throw _0x58354e;for(const _0x1fe121 of _0x560c53){!this['_revisionTracker']['repository']['getRevision'](_0x1fe121['id'])||this['_revisionTracker']['_bufferUpdate'](_0x1fe121['id'],_0x1fe121,!0x1);}if(et(_0x58354e))throw _0x58354e;});}},this['listenTo'](this['_revisionHistoryService'],'revisionsUpdated',(_0x27d064,{revisionsData:_0x265f5d,requestId:_0xfec97a})=>{Math['max'](..._0x265f5d['map'](_0x2f4edb=>_0x2f4edb['toVersion']))>this['_getLatestVersionFromServerOperations']()-0x1?this['_getLatestVersion']()['then'](()=>{this['_handleRevisionsUpdate'](_0x265f5d,_0xfec97a);}):this['_handleRevisionsUpdate'](_0x265f5d,_0xfec97a);});const {revisions:_0x4ade5d,requestId:_0x52a66b}=await this['_revisionHistoryService']['connect'](_0x7ce493['connection']);this['_lastRequestId']=_0x52a66b,await this['_fetchMissingUsers'](_0x4ade5d);for(const _0x2d26a1 of _0x4ade5d)this['_revisionTracker']['addRevisionData'](_0x2d26a1);if(_0x4ade5d['length']>0x0){const _0xc7e373=this['_revisionTracker']['repository']['getRevision'](0x0),_0x2ba074=await this['_revisionTracker']['getRevisionDocumentData'](_0xc7e373);this['_isEditorInitialDataDifferent'](this['editor'],_0x2ba074)&&(tt('editor-initial-data-replaced-with-revision-data'),this['editor']['config']['set']('initialData',_0x2ba074));}this['listenTo'](_0x2d731c,'change:_isConnected',(_0x435036,_0x417e34,_0x484e6e)=>{_0x484e6e&&(this['_oldOffset']=_0x2d731c['_offset'],_0x435036['off']());}),this['editor']['plugins']['has']('Autosave')||this['_initForDocumentStorage'](),this['_revisionTracker']['bind']('isEnabled')['to'](_0x7ce493,'state',_0x376017=>'connected'===_0x376017);}async['reconnect'](){const _0x3d22db=this['editor']['plugins']['get'](_0x27b127),_0x1f3ea1=this['editor']['plugins']['get'](_0x16f00a),_0x510f80=async()=>{const _0x305dbc=this['_revisionTracker']['currentRevision'],_0x4f390a=_0x305dbc['id'],_0x433ede=_0x4f390a!==_0x1f3ea1['sessionId'];if(_0x433ede){const _0x1e46c0=_0x1f3ea1['_offset']-this['_oldOffset'],_0xf21c54=this['_getLatestVersionFromServerOperations']();this['_revisionTracker']['_revisionDataBuilder']['reInit']();if(_0x305dbc['toVersion']+_0x1e46c0!==_0xf21c54){const _0x5bd473=_0x305dbc['fromVersion']+_0x1e46c0,_0x5db4f5=this['editor']['plugins']['get']('Users'),_0x545ae2=this['_revisionTracker']['buildRevisionData']({'currentRevision':_0x305dbc,'from':_0x5bd473,'to':_0xf21c54});_0x545ae2['id']=_0x305dbc['id'];const _0x506447=_0x545ae2['authorsIds']['map'](_0x117f8f=>_0x5db4f5['getUser'](_0x117f8f));_0x305dbc['_update']({..._0x545ae2,'authors':_0x506447},!0x0),this['_revisionTracker']['_bufferUpdate'](_0x305dbc['id'],_0x545ae2,!0x0);}this['_revisionTracker']['_startingVersion']=_0xf21c54,(_0x305dbc['toVersion']===_0x305dbc['fromVersion']&&!this['_revisionTracker']['_bufferedUpdates']['has'](_0x4f390a)&&this['_revisionTracker']['repository']['_revisions']['remove'](_0x4f390a),this['_revisionTracker']['_createCurrentRevision'](_0xf21c54));}const {revisions:_0x3bba48,requestId:_0x254c64}=await this['_revisionHistoryService']['reconnect'](_0x3d22db['connection'],this['_lastRequestId']);_0x433ede&&_0x3bba48['length']>0x0?_0x1f3ea1['_handleReconnectionError']():(await this['_fetchMissingUsers'](_0x3bba48),this['_handleRevisionsUpdate'](_0x3bba48,_0x254c64),this['_revisionTracker']['sendBufferedUpdates']());};return _0x1f3ea1['_isConnected']?_0x510f80():new Promise((_0x2c933e,_0x4324ca)=>{_0x1f3ea1['once']('change:_isConnected',()=>{_0x510f80()['then'](_0x2c933e)['catch'](_0x4324ca);});});}['destroy'](){this['_domEmitter']&&this['_domEmitter']['stopListening'](),super['destroy']();}async['_waitForServiceReady'](){this['_revisionHistoryService']['isConnected']||await new Promise(_0x1d76d1=>{this['listenTo'](this['_revisionHistoryService'],'connected',_0x3f0cc7=>{_0x3f0cc7['off'](),_0x1d76d1();});});}['_getLatestVersionFromServerOperations'](){const _0x219dfe=this['editor']['plugins']['get'](_0x16f00a)['serverHistory']['_operations'];for(let _0x40983c=_0x219dfe['length']-0x1;_0x40983c>=0x0;_0x40983c--)if('marker'!==_0x219dfe[_0x40983c]['type']||_0x219dfe[_0x40983c]['affectsData'])return _0x219dfe[_0x40983c]['baseVersion']+0x1;}['_isEditorInitialDataDifferent'](_0x5cb22e,_0x281248){let _0x28016c=_0x5cb22e['config']['get']('initialData');if(void 0x0===_0x28016c)return!0x1;'string'==typeof _0x28016c&&(_0x28016c={'main':_0x28016c});for(const _0x3fc87f of Object['keys'](_0x281248))if(_0x28016c[_0x3fc87f]!==_0x281248[_0x3fc87f])return!0x0;return!0x1;}['_getLatestVersion'](){const _0x25fe57=this['editor']['plugins']['get'](_0x16f00a);return new Promise(_0x20ace6=>{_0x25fe57['_isPendingUpdate']?_0x25fe57['once']('change:_isPendingUpdate',()=>{_0x20ace6(this['_getLatestVersionFromServerOperations']());}):_0x20ace6(this['_getLatestVersionFromServerOperations']());});}['_initForDocumentStorage'](){this['_domEmitter']=Object['create'](_0x29cae5);const t=this['editor']['t'],_0x1fa4e7=this['editor']['plugins']['get']('PendingActions');let _0x4dfa24=null;const _0x392143=_0xb91a5f(()=>{this['_revisionTracker']['update']()['finally'](()=>{_0x1fa4e7['remove'](_0x4dfa24),_0x4dfa24=null;});},0x1f4);this['listenTo'](this['editor'],'ready',()=>{this['listenTo'](this['editor']['model']['document'],'change:data',(_0x4e5520,_0x4d376e)=>{_0x4d376e['isLocal']&&(_0x4dfa24||(_0x4dfa24=_0x1fa4e7['add'](t({'string':'Unsaved\x20change\x20in\x20revision\x20history.','id':'PENDING_ACTION_REVISION_HISTORY'}))),_0x392143());});}),this['_domEmitter']['listenTo'](window,'beforeunload',(_0x74b872,_0x5b7d80)=>{_0x1fa4e7['hasAny']&&(_0x5b7d80['returnValue']=_0x1fa4e7['first']['message']);});}['_handleRevisionsUpdate'](_0x4c3753,_0x334506){const _0x245539=this['_revisionTracker']['repository'];this['_lastRequestId']=_0x334506;for(const _0x156c20 of _0x4c3753){const _0x592c0e=_0x245539['getRevision'](_0x156c20['id']);if(_0x592c0e){if((_0x156c20['fromVersion']||_0x156c20['toVersion'])&&(_0x156c20['diffData']=null),_0x592c0e===this['_revisionTracker']['currentRevision']){const _0x47a4ee=Math['max'](_0x592c0e['toVersion'],_0x156c20['toVersion']),_0x191493=Math['max'](_0x592c0e['fromVersion'],_0x156c20['fromVersion']);let _0x104493;_0x592c0e['toVersion']===_0x156c20['toVersion']&&_0x592c0e['fromVersion']===_0x156c20['fromVersion']?(_0x104493=!0x0,this['_preventResendingRevisionData'](_0x156c20)):_0x156c20['toVersion']===_0x47a4ee&&_0x156c20['fromVersion']===_0x191493?_0x104493=!0x1:(_0x592c0e['toVersion']===_0x47a4ee&&_0x592c0e['fromVersion']===_0x191493||this['_fixRevision']({'revision':_0x592c0e,'from':_0x191493,'to':_0x47a4ee}),_0x104493=!0x0),_0x104493&&(delete _0x156c20['fromVersion'],delete _0x156c20['toVersion'],delete _0x156c20['diffData'],delete _0x156c20['createdAt'],delete _0x156c20['authorsIds']);}this['_revisionTracker']['setRevisionData'](_0x156c20),this['_preventResendingRevisionData'](_0x156c20);}else this['_revisionTracker']['addRevisionData'](_0x156c20);}const _0x476a10=_0x245539['getRevisions']();_0x476a10['reverse']();for(let _0x32cea8=0x0;_0x32cea8<_0x476a10['length']-0x1;_0x32cea8++){const _0x283dd1=_0x476a10[_0x32cea8],_0x3b0964=_0x476a10[_0x32cea8+0x1];if(_0x283dd1['fromVersion']<_0x3b0964['toVersion']){const _0x59e276=_0x3b0964['toVersion'];this['_fixRevision']({'revision':_0x283dd1,'from':_0x59e276});}}}['_fixRevision']({revision:_0x414993,from:_0x1be756,to:_0x3a8573}={}){const _0x4f750d=this['editor']['plugins']['get']('Users'),_0x443353=this['_revisionTracker']['buildRevisionData']({'revision':_0x414993,'from':_0x1be756,'to':_0x3a8573});_0x443353['authors']=_0x443353['authorsIds']['map'](_0xe563c9=>_0x4f750d['getUser'](_0xe563c9)),_0x414993['_update'](_0x443353);}['_preventResendingRevisionData'](_0x1ef55c){const _0x529fdc={};_0x529fdc['id']=_0x1ef55c['id'];for(const _0x4da14f of Object['keys'](_0x1ef55c))'id'!==_0x4da14f&&(_0x529fdc[_0x4da14f]=void 0x0);this['_revisionTracker']['_bufferUpdate'](_0x529fdc['id'],_0x529fdc,!0x0);}['_fetchMissingUsers'](_0x5c8790){const _0x469225=this['editor']['plugins']['get'](_0x265ffe),{connection:_0x9cbb65}=this['editor']['plugins']['get'](_0x27b127),_0x29a810=new Set();for(const _0x14bb35 of _0x5c8790){for(const _0xf27f16 of _0x14bb35['authorsIds'])_0x42bd7c(_0xf27f16);_0x14bb35['creatorId']&&_0x42bd7c(_0x14bb35['creatorId']);}return Promise['all'](Array['from'](_0x29a810,async _0x1b29d2=>{const _0x265b6d=await _0x22c943['get'](_0x9cbb65,_0x1b29d2);_0x469225['getUser'](_0x1b29d2)||_0x469225['addUser'](_0x265b6d);}));function _0x42bd7c(_0x25f0ef){_0x469225['getUser'](_0x25f0ef)||_0x29a810['add'](_0x25f0ef);}}}function et(_0x293683){return _0x293683['message']['startsWith']('cloud-services-internal-error:\x20Revision\x20History\x20Service\x20is\x20not\x20connected.')||_0x293683['message']['startsWith']('cloud-services-internal-error:\x20Not\x20connected.')||_0x293683['message']['startsWith']('cloud-services-internal-error:\x20Request\x20timeout.');}v['RevisionHistoryService']=st;
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- var _0x4b65=['pluginName'];(function(_0x53cdd8,_0x4b6568){var _0x5b5e53=function(_0x4398a9){while(--_0x4398a9){_0x53cdd8['push'](_0x53cdd8['shift']());}};_0x5b5e53(++_0x4b6568);}(_0x4b65,0x1c4));var _0x5b5e=function(_0x53cdd8,_0x4b6568){_0x53cdd8=_0x53cdd8-0x0;var _0x5b5e53=_0x4b65[_0x53cdd8];return _0x5b5e53;};import{Plugin as _0xabc15c}from'ckeditor5/src/core';import _0x4e84a4 from'./realtimecollaborativerevisionhistory/cloudservicesrevisionhistoryadapter';import _0x3698c3 from'@ckeditor/ckeditor5-revision-history/src/revisionhistory';import _0x2ed63a from'./realtimecollaborativeediting';export default class u extends _0xabc15c{static get['requires'](){return[_0x3698c3,_0x4e84a4,_0x2ed63a];}static get[_0x5b5e('0x0')](){return'RealTimeCollaborativeRevisionHistory';}}
23
+ var _0x1649=['pluginName','requires','RealTimeCollaborativeRevisionHistory'];(function(_0x1ae4a0,_0x16494e){var _0x245024=function(_0x1acfb8){while(--_0x1acfb8){_0x1ae4a0['push'](_0x1ae4a0['shift']());}};_0x245024(++_0x16494e);}(_0x1649,0x6b));var _0x2450=function(_0x1ae4a0,_0x16494e){_0x1ae4a0=_0x1ae4a0-0x0;var _0x245024=_0x1649[_0x1ae4a0];return _0x245024;};import{Plugin as _0x40e40b}from'ckeditor5/src/core';import _0x574c9b from'./realtimecollaborativerevisionhistory/cloudservicesrevisionhistoryadapter';import _0x222d9e from'@ckeditor/ckeditor5-revision-history/src/revisionhistory';import _0x1be302 from'./realtimecollaborativeediting';export default class p extends _0x40e40b{static get[_0x2450('0x2')](){return[_0x222d9e,_0x574c9b,_0x1be302];}static get[_0x2450('0x1')](){return _0x2450('0x0');}}