@ckeditor/ckeditor5-real-time-collaboration 38.2.0-alpha.1 → 39.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 (49) hide show
  1. package/README.md +0 -1
  2. package/build/real-time-collaboration.js +1 -1
  3. package/package.json +7 -8
  4. package/src/augmentation.d.ts +7 -3
  5. package/src/augmentation.js +1 -1
  6. package/src/common-translations.d.ts +5 -1
  7. package/src/common-translations.js +2 -2
  8. package/src/config.d.ts +5 -1
  9. package/src/config.js +1 -1
  10. package/src/index.d.ts +14 -10
  11. package/src/index.js +2 -2
  12. package/src/presencelist/presencelistui.d.ts +11 -7
  13. package/src/presencelist/presencelistui.js +2 -2
  14. package/src/presencelist/view/presencecounterview.d.ts +6 -2
  15. package/src/presencelist/view/presencecounterview.js +2 -2
  16. package/src/presencelist/view/presencedropdownlistitemview.d.ts +7 -3
  17. package/src/presencelist/view/presencedropdownlistitemview.js +2 -2
  18. package/src/presencelist/view/presencedropdownlistview.d.ts +6 -2
  19. package/src/presencelist/view/presencedropdownlistview.js +2 -2
  20. package/src/presencelist/view/presenceinlinelistitemview.d.ts +7 -3
  21. package/src/presencelist/view/presenceinlinelistitemview.js +2 -2
  22. package/src/presencelist/view/presenceinlinelistview.d.ts +7 -3
  23. package/src/presencelist/view/presenceinlinelistview.js +2 -2
  24. package/src/presencelist/view/presencelistview.d.ts +8 -4
  25. package/src/presencelist/view/presencelistview.js +2 -2
  26. package/src/presencelist.d.ts +7 -3
  27. package/src/presencelist.js +2 -2
  28. package/src/realtimecollaborativecomments/cloudservicescommentsadapter.d.ts +9 -5
  29. package/src/realtimecollaborativecomments/cloudservicescommentsadapter.js +2 -2
  30. package/src/realtimecollaborativecomments.d.ts +8 -4
  31. package/src/realtimecollaborativecomments.js +2 -2
  32. package/src/realtimecollaborativeediting/realtimecollaborationclient.d.ts +21 -7
  33. package/src/realtimecollaborativeediting/realtimecollaborationclient.js +2 -2
  34. package/src/realtimecollaborativeediting/sessions.d.ts +9 -5
  35. package/src/realtimecollaborativeediting/sessions.js +2 -2
  36. package/src/realtimecollaborativeediting/usermarkers.d.ts +6 -2
  37. package/src/realtimecollaborativeediting/usermarkers.js +2 -2
  38. package/src/realtimecollaborativeediting/websocketgateway.d.ts +7 -3
  39. package/src/realtimecollaborativeediting/websocketgateway.js +2 -2
  40. package/src/realtimecollaborativeediting.d.ts +6 -2
  41. package/src/realtimecollaborativeediting.js +2 -2
  42. package/src/realtimecollaborativerevisionhistory/cloudservicesrevisionhistoryadapter.d.ts +10 -6
  43. package/src/realtimecollaborativerevisionhistory/cloudservicesrevisionhistoryadapter.js +2 -2
  44. package/src/realtimecollaborativerevisionhistory.d.ts +7 -3
  45. package/src/realtimecollaborativerevisionhistory.js +2 -2
  46. package/src/realtimecollaborativetrackchanges/cloudservicestrackchangesadapter.d.ts +8 -4
  47. package/src/realtimecollaborativetrackchanges/cloudservicestrackchangesadapter.js +2 -2
  48. package/src/realtimecollaborativetrackchanges.d.ts +7 -3
  49. package/src/realtimecollaborativetrackchanges.js +2 -2
@@ -1,10 +1,14 @@
1
+ /**
2
+ * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
+ */
1
5
  /**
2
6
  * @module real-time-collaboration/realtimecollaborativeediting/websocketgateway
3
7
  * @publicApi
4
8
  */
5
- import { ContextPlugin, type Plugin, type Editor, type Context } from 'ckeditor5/src/core.js';
6
- import { WebSocketGateway as WebSocketGatewayProvider, WEB_SOCKET_GATEWAY_STATES } from '@ckeditor/ckeditor-cloud-services-collaboration/src/services.js';
7
- import { Notification } from 'ckeditor5/src/ui.js';
9
+ import { ContextPlugin, type Plugin, type Editor, type Context } from 'ckeditor5/src/core';
10
+ import { WebSocketGateway as WebSocketGatewayProvider, WEB_SOCKET_GATEWAY_STATES } from '@ckeditor/ckeditor-cloud-services-collaboration/src/services';
11
+ import { Notification } from 'ckeditor5/src/ui';
8
12
  export default class WebSocketGateway extends ContextPlugin {
9
13
  static WebSocketGateway: typeof WebSocketGatewayProvider;
10
14
  static initialReconnectionInterval: number;
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright (c) 2016 - 2023, CKSource Holding sp. z o.o. All rights reserved.
2
+ * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
3
3
  *
4
4
  *
5
5
  *
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0xc8c0=['online','CONNECTED','get','offline','disconnect','constructor','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.','CloudServices','Connected\x20users\x20limit\x20exceeded','websocketgateway-invalid-plugin-interface','then','has','cloudServices.requestTimeout','error','DISCONNECTED','CONNECTING','_reconnectionStack','isInReconnectionStack','limitExceeded','initialReconnectionInterval','change:me','_shouldPluginsReconnect','connect','_reconnect','listenTo','catch','delete','websocketgateway-missing-token','code','_isBrowserOffline','_domEmitter','websocketgateway-plugin-already-registered','connection','state','websocketgateway-missing-websocket-url','webSocketUrl','real-time-collaboration','config','pluginName','plugins','function','init','WebSocketGateway','define','stopListening','context','cloudservices-init','destroy','cloudservices-reconnection-error','reconnect','token','removeFromReconnectionStack','addToReconnectionStack','set','requires','cloudServices.connectionTimeout'];(function(_0x4a7e95,_0xc8c04d){const _0x47ed06=function(_0x521edc){while(--_0x521edc){_0x4a7e95['push'](_0x4a7e95['shift']());}};_0x47ed06(++_0xc8c04d);}(_0xc8c0,0x19d));const _0x47ed=function(_0x4a7e95,_0xc8c04d){_0x4a7e95=_0x4a7e95-0x0;let _0x47ed06=_0xc8c0[_0x4a7e95];return _0x47ed06;};import{ContextPlugin as _0x45ac57}from'ckeditor5/src/core.js';import{DomEmitterMixin as _0x478102,CKEditorError as _0x3bcdd9}from'ckeditor5/src/utils.js';import{WebSocketGateway as _0x11ff59,WEB_SOCKET_GATEWAY_STATES as _0x2cd635}from'@ckeditor/ckeditor-cloud-services-collaboration/src/services.js';import{Notification as _0x58420e}from'ckeditor5/src/ui.js';export default class c extends _0x45ac57{static get[_0x47ed('0x21')](){return[_0x47ed('0x2a'),_0x58420e];}static get[_0x47ed('0x11')](){return _0x47ed('0x15');}constructor(_0x22ef7f){super(_0x22ef7f),this[_0x47ed('0x20')](_0x47ed('0xc'),_0x2cd635[_0x47ed('0x24')]),this['set'](_0x47ed('0x8'),!0x1),this[_0x47ed('0x33')]=new Set(),this[_0x47ed('0x0')]=!0x1,this[_0x47ed('0x9')]=Object['create'](_0x478102);}[_0x47ed('0x14')](){const _0x442143=this[_0x47ed('0x18')],_0x1ad0ce=_0x442143[_0x47ed('0x12')]['get'](_0x47ed('0x2a')),_0x587b42=_0x442143['plugins'][_0x47ed('0x25')](_0x58420e);if(!_0x1ad0ce[_0x47ed('0x1d')])throw new _0x3bcdd9(_0x47ed('0x6'),this);if(!_0x1ad0ce[_0x47ed('0xe')])throw new _0x3bcdd9(_0x47ed('0xd'),this);return this[_0x47ed('0x9')][_0x47ed('0x3')](window,_0x47ed('0x26'),()=>this[_0x47ed('0x8')]=!0x0),this[_0x47ed('0x9')][_0x47ed('0x3')](window,_0x47ed('0x23'),()=>this[_0x47ed('0x8')]=!0x1),this[_0x47ed('0x18')][_0x47ed('0x10')][_0x47ed('0x16')]('cloudServices.connectionTimeout',0xa),this[_0x47ed('0x18')][_0x47ed('0x10')][_0x47ed('0x16')](_0x47ed('0x2f'),0x14),c[_0x47ed('0x15')][_0x47ed('0x1')](_0x1ad0ce['token'],_0x1ad0ce[_0x47ed('0xe')],{'timeout':0x3e8*this[_0x47ed('0x18')][_0x47ed('0x10')][_0x47ed('0x25')](_0x47ed('0x22')),'requestTimeout':0x3e8*this['context']['config'][_0x47ed('0x25')](_0x47ed('0x2f'))})[_0x47ed('0x2d')](_0x580c19=>{if(this[_0x47ed('0xb')]=_0x580c19,this['bind'](_0x47ed('0xc'))['to'](_0x580c19,_0x47ed('0xc'),this,_0x47ed('0x8'),(_0x517b81,_0x24ac07)=>('connected'!==_0x517b81&&(this[_0x47ed('0x0')]=!0x0),_0x24ac07||_0x517b81!==_0x2cd635[_0x47ed('0x24')]?_0x2cd635['DISCONNECTED']:this[_0x47ed('0xc')]==_0x2cd635[_0x47ed('0x31')]&&this[_0x47ed('0x0')]?(this['_shouldPluginsReconnect']=!0x1,this['_reconnect'](),_0x2cd635[_0x47ed('0x32')]):_0x2cd635['CONNECTED'])),this[_0x47ed('0xb')]['on']('error',(_0xaae425,_0x348a8a)=>{if(_0x47ed('0x35')!==_0x348a8a[_0x47ed('0x7')])throw console[_0x47ed('0x30')](_0x348a8a),new _0x3bcdd9(_0x47ed('0x19'),null,{'originalError':_0x348a8a});_0x587b42['showWarning'](_0x47ed('0x29'),{'title':_0x47ed('0x2b'),'namespace':_0x47ed('0xf')});}),!_0x580c19['me'])return new Promise(_0x54ac05=>_0x580c19['on'](_0x47ed('0x37'),_0x54ac05));})[_0x47ed('0x4')](_0x4501fe=>{throw console[_0x47ed('0x30')](_0x4501fe),new _0x3bcdd9(_0x47ed('0x19'),null,{'originalError':_0x4501fe});});}[_0x47ed('0x1f')](_0x3d9a2c){if(_0x47ed('0x13')!=typeof _0x3d9a2c['reconnect'])throw new _0x3bcdd9(_0x47ed('0x2c'),this);if(this['isInReconnectionStack'](_0x3d9a2c))throw new _0x3bcdd9(_0x47ed('0xa'),this,{'name':_0x3d9a2c[_0x47ed('0x28')][_0x47ed('0x11')]});this[_0x47ed('0x33')]['add'](_0x3d9a2c);}[_0x47ed('0x1e')](_0x996bf6){this[_0x47ed('0x33')][_0x47ed('0x5')](_0x996bf6);}[_0x47ed('0x34')](_0x54ac2f){return this['_reconnectionStack'][_0x47ed('0x2e')](_0x54ac2f);}[_0x47ed('0x2')](){return this[_0x47ed('0xb')][_0x47ed('0x1c')]()[_0x47ed('0x2d')](()=>Promise['all'](Array['from'](this[_0x47ed('0x33')],_0x52ab34=>_0x52ab34[_0x47ed('0x1c')]())))[_0x47ed('0x2d')](()=>this['state']=_0x2cd635[_0x47ed('0x24')])['catch'](_0x42ac3d=>{throw console[_0x47ed('0x30')](_0x42ac3d),new _0x3bcdd9(_0x47ed('0x1b'),this['context']);});}[_0x47ed('0x1a')](){this['connection']&&this[_0x47ed('0xb')][_0x47ed('0x27')](),this[_0x47ed('0xc')]=_0x2cd635['DISCONNECTED'],this['_domEmitter'][_0x47ed('0x17')](),super['destroy']();}}c['WebSocketGateway']=_0x11ff59,c[_0x47ed('0x36')]=0x3e8;
23
+ const _0x10f1=['_reconnectionStack','WebSocketGateway','then','all','context','change:me','get','addToReconnectionStack','init','stopListening','connect','CloudServices','listenTo','websocketgateway-plugin-already-registered','_shouldPluginsReconnect','disconnect','plugins','online','isInReconnectionStack','cloudServices.connectionTimeout','state','CONNECTED','_reconnect','limitExceeded','CONNECTING','token','config','requires','webSocketUrl','has','delete','reconnect','_isBrowserOffline','cloudservices-init','connection','function','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.','constructor','cloudServices.requestTimeout','from','showWarning','websocketgateway-missing-websocket-url','error','cloudservices-reconnection-error','destroy','add','websocketgateway-missing-token','pluginName','create','define','Connected\x20users\x20limit\x20exceeded','_domEmitter','catch','code','DISCONNECTED','set','initialReconnectionInterval'];(function(_0x2643a6,_0x10f177){const _0x359688=function(_0x23ee6c){while(--_0x23ee6c){_0x2643a6['push'](_0x2643a6['shift']());}};_0x359688(++_0x10f177);}(_0x10f1,0x104));const _0x3596=function(_0x2643a6,_0x10f177){_0x2643a6=_0x2643a6-0x0;let _0x359688=_0x10f1[_0x2643a6];return _0x359688;};import{ContextPlugin as _0x2bcefd}from'ckeditor5/src/core';import{DomEmitterMixin as _0x2324cc,CKEditorError as _0x835ef0}from'ckeditor5/src/utils';import{WebSocketGateway as _0x38d183,WEB_SOCKET_GATEWAY_STATES as _0x193dbf}from'@ckeditor/ckeditor-cloud-services-collaboration/src/services';import{Notification as _0x3fd095}from'ckeditor5/src/ui';export default class c extends _0x2bcefd{static get[_0x3596('0x34')](){return[_0x3596('0x24'),_0x3fd095];}static get[_0x3596('0xf')](){return'WebSocketGateway';}constructor(_0x5a9f2e){super(_0x5a9f2e),this[_0x3596('0x17')](_0x3596('0x2d'),_0x193dbf[_0x3596('0x2e')]),this['set'](_0x3596('0x0'),!0x1),this[_0x3596('0x19')]=new Set(),this[_0x3596('0x27')]=!0x1,this['_domEmitter']=Object[_0x3596('0x10')](_0x2324cc);}[_0x3596('0x21')](){const _0x20caf1=this[_0x3596('0x1d')],_0x2952a5=_0x20caf1[_0x3596('0x29')][_0x3596('0x1f')](_0x3596('0x24')),_0x2e37a7=_0x20caf1['plugins'][_0x3596('0x1f')](_0x3fd095);if(!_0x2952a5['token'])throw new _0x835ef0(_0x3596('0xe'),this);if(!_0x2952a5[_0x3596('0x35')])throw new _0x835ef0(_0x3596('0x9'),this);return this[_0x3596('0x13')][_0x3596('0x25')](window,'offline',()=>this[_0x3596('0x0')]=!0x0),this[_0x3596('0x13')]['listenTo'](window,_0x3596('0x2a'),()=>this[_0x3596('0x0')]=!0x1),this['context']['config'][_0x3596('0x11')]('cloudServices.connectionTimeout',0xa),this[_0x3596('0x1d')]['config'][_0x3596('0x11')](_0x3596('0x6'),0x14),c[_0x3596('0x1a')][_0x3596('0x23')](_0x2952a5[_0x3596('0x32')],_0x2952a5['webSocketUrl'],{'timeout':0x3e8*this[_0x3596('0x1d')][_0x3596('0x33')][_0x3596('0x1f')](_0x3596('0x2c')),'requestTimeout':0x3e8*this[_0x3596('0x1d')][_0x3596('0x33')][_0x3596('0x1f')](_0x3596('0x6'))})['then'](_0x131371=>{if(this[_0x3596('0x2')]=_0x131371,this['bind'](_0x3596('0x2d'))['to'](_0x131371,_0x3596('0x2d'),this,_0x3596('0x0'),(_0x18719f,_0x27fa03)=>('connected'!==_0x18719f&&(this[_0x3596('0x27')]=!0x0),_0x27fa03||_0x18719f!==_0x193dbf[_0x3596('0x2e')]?_0x193dbf[_0x3596('0x16')]:this[_0x3596('0x2d')]==_0x193dbf[_0x3596('0x16')]&&this[_0x3596('0x27')]?(this[_0x3596('0x27')]=!0x1,this[_0x3596('0x2f')](),_0x193dbf[_0x3596('0x31')]):_0x193dbf[_0x3596('0x2e')])),this['connection']['on'](_0x3596('0xa'),(_0x491495,_0xe6634e)=>{if(_0x3596('0x30')!==_0xe6634e[_0x3596('0x15')])throw console['error'](_0xe6634e),new _0x835ef0(_0x3596('0x1'),null,{'originalError':_0xe6634e});_0x2e37a7[_0x3596('0x8')](_0x3596('0x4'),{'title':_0x3596('0x12'),'namespace':'real-time-collaboration'});}),!_0x131371['me'])return new Promise(_0x5992a1=>_0x131371['on'](_0x3596('0x1e'),_0x5992a1));})['catch'](_0x483be5=>{throw console['error'](_0x483be5),new _0x835ef0(_0x3596('0x1'),null,{'originalError':_0x483be5});});}[_0x3596('0x20')](_0x3338e9){if(_0x3596('0x3')!=typeof _0x3338e9[_0x3596('0x38')])throw new _0x835ef0('websocketgateway-invalid-plugin-interface',this);if(this[_0x3596('0x2b')](_0x3338e9))throw new _0x835ef0(_0x3596('0x26'),this,{'name':_0x3338e9[_0x3596('0x5')][_0x3596('0xf')]});this[_0x3596('0x19')][_0x3596('0xd')](_0x3338e9);}['removeFromReconnectionStack'](_0x5ba920){this['_reconnectionStack'][_0x3596('0x37')](_0x5ba920);}[_0x3596('0x2b')](_0x2ca033){return this[_0x3596('0x19')][_0x3596('0x36')](_0x2ca033);}['_reconnect'](){return this[_0x3596('0x2')][_0x3596('0x38')]()[_0x3596('0x1b')](()=>Promise[_0x3596('0x1c')](Array[_0x3596('0x7')](this[_0x3596('0x19')],_0x4cabe0=>_0x4cabe0[_0x3596('0x38')]())))[_0x3596('0x1b')](()=>this[_0x3596('0x2d')]=_0x193dbf[_0x3596('0x2e')])[_0x3596('0x14')](_0x210aab=>{throw console[_0x3596('0xa')](_0x210aab),new _0x835ef0(_0x3596('0xb'),this[_0x3596('0x1d')]);});}[_0x3596('0xc')](){this[_0x3596('0x2')]&&this[_0x3596('0x2')][_0x3596('0x28')](),this[_0x3596('0x2d')]=_0x193dbf[_0x3596('0x16')],this[_0x3596('0x13')][_0x3596('0x22')](),super[_0x3596('0xc')]();}}c[_0x3596('0x1a')]=_0x38d183,c[_0x3596('0x18')]=0x3e8;
@@ -1,9 +1,13 @@
1
+ /**
2
+ * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
+ */
1
5
  /**
2
6
  * @module real-time-collaboration/realtimecollaborativeediting
3
7
  * @publicApi
4
8
  */
5
- import { Plugin } from 'ckeditor5/src/core.js';
6
- import RealTimeCollaborationClient from './realtimecollaborativeediting/realtimecollaborationclient.js';
9
+ import { Plugin } from 'ckeditor5/src/core';
10
+ import RealTimeCollaborationClient from './realtimecollaborativeediting/realtimecollaborationclient';
7
11
  /**
8
12
  * Enables the real-time collaborative editing feature.
9
13
  *
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright (c) 2016 - 2023, CKSource Holding sp. z o.o. All rights reserved.
2
+ * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
3
3
  *
4
4
  *
5
5
  *
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- var _0x3360=['RealTimeCollaborativeEditing'];(function(_0x268ec6,_0x3360ac){var _0x46e277=function(_0x3597d9){while(--_0x3597d9){_0x268ec6['push'](_0x268ec6['shift']());}};_0x46e277(++_0x3360ac);}(_0x3360,0x106));var _0x46e2=function(_0x268ec6,_0x3360ac){_0x268ec6=_0x268ec6-0x0;var _0x46e277=_0x3360[_0x268ec6];return _0x46e277;};import{Plugin as _0xb8a3e1}from'ckeditor5/src/core.js';import _0x446fc1 from'./realtimecollaborativeediting/realtimecollaborationclient.js';export default class n extends _0xb8a3e1{static get['requires'](){return[_0x446fc1];}static get['pluginName'](){return _0x46e2('0x0');}}
23
+ var _0x2864=['requires','pluginName','RealTimeCollaborativeEditing'];(function(_0x1f179e,_0x286492){var _0x23cc9e=function(_0x4c84be){while(--_0x4c84be){_0x1f179e['push'](_0x1f179e['shift']());}};_0x23cc9e(++_0x286492);}(_0x2864,0xe6));var _0x23cc=function(_0x1f179e,_0x286492){_0x1f179e=_0x1f179e-0x0;var _0x23cc9e=_0x2864[_0x1f179e];return _0x23cc9e;};import{Plugin as _0x5e0bfb}from'ckeditor5/src/core';import _0x61ac05 from'./realtimecollaborativeediting/realtimecollaborationclient';export default class n extends _0x5e0bfb{static get[_0x23cc('0x1')](){return[_0x61ac05];}static get[_0x23cc('0x2')](){return _0x23cc('0x0');}}
@@ -1,13 +1,17 @@
1
+ /**
2
+ * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
+ */
1
5
  /**
2
6
  * @module real-time-collaboration/realtimecollaborativerevisionhistory/cloudservicesrevisionhistoryadapter
3
7
  * @publicApi
4
8
  */
5
- import { Plugin, type Editor } from 'ckeditor5/src/core.js';
6
- import { Users } from 'ckeditor5-collaboration';
7
- import RealTimeCollaborationClient from '../realtimecollaborativeediting/realtimecollaborationclient.js';
8
- import WebSocketGateway, { type ReconnectPlugin } from '../realtimecollaborativeediting/websocketgateway.js';
9
- import Sessions from '../realtimecollaborativeediting/sessions.js';
10
- import { RevisionHistoryService } from '@ckeditor/ckeditor-cloud-services-collaboration/src/services.js';
9
+ import { Plugin, type Editor } from 'ckeditor5/src/core';
10
+ import { Users } from 'ckeditor5-collaboration/src/collaboration-core';
11
+ import RealTimeCollaborationClient from '../realtimecollaborativeediting/realtimecollaborationclient';
12
+ import WebSocketGateway, { type ReconnectPlugin } from '../realtimecollaborativeediting/websocketgateway';
13
+ import Sessions from '../realtimecollaborativeediting/sessions';
14
+ import { RevisionHistoryService } from '@ckeditor/ckeditor-cloud-services-collaboration/src/services';
11
15
  /**
12
16
  * The Cloud Services revision history adapter plugin.
13
17
  */
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright (c) 2016 - 2023, CKSource Holding sp. z o.o. All rights reserved.
2
+ * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
3
3
  *
4
4
  *
5
5
  *
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x88a0=['length','_preventResendingRevisionData','_bufferUpdate','isEmptyCurrent','repository','createdAt','_fetchMissingUsers','400','authors','_lastRequestId','isBundleUploaded','getMany','toVersion','cloud-services-internal-error:\x20Request\x20timeout.','_handleRevisionsUpdate','_getLatestVersion','reconnect','_startingVersion','cloud-services-internal-error:\x20Not\x20connected.','wrongRequestId','serverHistory','RevisionHistoryService','keys','_getLatestVersionFromServerOperations','_waitForServiceReady','_revisionHistoryService','change:_isConnected','_bufferedUpdates','then','destroy','cloud-services-internal-error:\x20Revision\x20History\x20Service\x20is\x20not\x20connected.','_revisions','reverse','size','authorsIds','plugins','setRevisionData','baseVersion','from','getUser','_isConnected','listenTo','connect','_isPendingUpdate','buildRevisionData','_revisionTracker','bind','addRevisionData','_createCurrentRevision','startsWith','editor','getRevision','getRevisions','code','_update','off','max','requires','RevisionTracker','collaboration.channelId','data','_revisionDataBuilder','message','getOperations','isConnected','_fixRevision','creatorId','marker','get','sessionId','has','addUser','_oldOffset','catch','config','currentRevision','connection','isEnabled','updateRevisions','revisionsUpdated','CONNECTED','change:_isPendingUpdate','reInit','map','once','fromVersion'];(function(_0x2a9db2,_0x88a0d8){const _0x4b5834=function(_0x1ab58b){while(--_0x1ab58b){_0x2a9db2['push'](_0x2a9db2['shift']());}};_0x4b5834(++_0x88a0d8);}(_0x88a0,0x6f));const _0x4b58=function(_0x2a9db2,_0x88a0d8){_0x2a9db2=_0x2a9db2-0x0;let _0x4b5834=_0x88a0[_0x2a9db2];return _0x4b5834;};import{Plugin as _0x1cbc4b}from'ckeditor5/src/core.js';import{version as _0x203adb}from'ckeditor5/src/utils.js';import{Users as _0x2fb6a4}from'ckeditor5-collaboration';import _0x32d2da from'../realtimecollaborativeediting/realtimecollaborationclient.js';import _0x259adf from'../realtimecollaborativeediting/websocketgateway.js';import _0x2491a0 from'../realtimecollaborativeediting/sessions.js';import{User as _0x4a7cd7}from'@ckeditor/ckeditor-cloud-services-collaboration';import{RevisionHistoryService as _0x41a631,EditorService as _0xa480f8,WEB_SOCKET_GATEWAY_STATES as _0x59c8fb}from'@ckeditor/ckeditor-cloud-services-collaboration/src/services.js';export default class v extends _0x1cbc4b{static get[_0x4b58('0x20')](){return[_0x259adf,_0x32d2da,_0x4b58('0x21'),_0x2491a0,_0x2fb6a4];}constructor(_0x3e29d4){super(_0x3e29d4);const _0x6dcda8=this[_0x4b58('0x19')]['config'][_0x4b58('0x2b')](_0x4b58('0x22'));this['_lastRequestId']=null,this[_0x4b58('0x14')]=this[_0x4b58('0x19')][_0x4b58('0xa')]['get'](_0x4b58('0x21')),this[_0x4b58('0x0')]=new v['RevisionHistoryService'](_0x6dcda8);}async['init'](){const _0x14ed9e=this[_0x4b58('0x19')][_0x4b58('0xa')][_0x4b58('0x2b')](_0x32d2da),_0x3a8da6=_0x14ed9e[_0x4b58('0x51')],_0x758636=this[_0x4b58('0x19')]['plugins']['get'](_0x259adf);this[_0x4b58('0x14')]['setSource']({'history':_0x3a8da6,'getLatestVersion':()=>this[_0x4b58('0x4c')](),'getCurrentRevisionId':()=>_0x14ed9e[_0x4b58('0x2c')]});const _0x160cd7=this[_0x4b58('0x19')][_0x4b58('0x31')][_0x4b58('0x2b')]('cloudServices.bundleVersion')||_0x203adb,_0x5309f5=await _0xa480f8[_0x4b58('0x47')](_0x758636[_0x4b58('0x33')],_0x160cd7);this[_0x4b58('0x14')]['adapter']={'getRevision':async({revisionId:_0x99ee4})=>(await this[_0x4b58('0x55')](),await this[_0x4b58('0x0')][_0x4b58('0x1a')](_0x99ee4)),'updateRevisions':async _0x4771ad=>{await this[_0x4b58('0x55')]();const _0x70cd3f=this[_0x4b58('0x14')][_0x4b58('0x32')];if(_0x5309f5&&0x1===_0x4771ad[_0x4b58('0x3d')]&&_0x4771ad[0x0]['id']===_0x70cd3f['id'])return _0x4771ad;for(const _0x3caf6a of _0x4771ad)_0x3caf6a['id']===_0x70cd3f['id']&&(_0x3caf6a[_0x4b58('0x40')]=_0x3caf6a[_0x4b58('0x3c')]===_0x3caf6a['toVersion']);return this[_0x4b58('0x0')][_0x4b58('0x35')](_0x4771ad,this[_0x4b58('0x46')])['then'](_0x2a82f1=>(this[_0x4b58('0x46')]=_0x2a82f1,_0x4771ad))[_0x4b58('0x30')](_0x33e08c=>{if(st(_0x33e08c)||_0x4b58('0x44')===_0x33e08c[_0x4b58('0x1c')]&&void 0x0!==_0x33e08c[_0x4b58('0x23')][_0x4b58('0x50')]){for(const _0x1ec309 of _0x4771ad){!this[_0x4b58('0x14')][_0x4b58('0x41')][_0x4b58('0x1a')](_0x1ec309['id'])||this[_0x4b58('0x14')][_0x4b58('0x3f')](_0x1ec309['id'],_0x1ec309,!0x1);}if(st(_0x33e08c))throw _0x33e08c;return _0x4771ad;}throw _0x33e08c;});}},this[_0x4b58('0x10')](this[_0x4b58('0x0')],_0x4b58('0x36'),(_0x3d0cb2,{revisionsData:_0x846d22,requestId:_0x2e9a50})=>{Math[_0x4b58('0x1f')](..._0x846d22[_0x4b58('0x3a')](_0x2c5cb8=>_0x2c5cb8[_0x4b58('0x49')]))>this[_0x4b58('0x54')]()-0x1?this['_getLatestVersion']()[_0x4b58('0x3')](()=>{this[_0x4b58('0x4b')](_0x846d22,_0x2e9a50);}):this[_0x4b58('0x4b')](_0x846d22,_0x2e9a50);});const {revisions:_0x2f1c76,requestId:_0x5c58ca}=await this['_revisionHistoryService'][_0x4b58('0x11')](_0x758636[_0x4b58('0x33')]);_0x758636['addToReconnectionStack'](this),this[_0x4b58('0x46')]=_0x5c58ca,await this[_0x4b58('0x43')](_0x2f1c76);for(const _0x1c4467 of _0x2f1c76)this[_0x4b58('0x14')][_0x4b58('0x16')](_0x1c4467);this['listenTo'](_0x14ed9e,_0x4b58('0x1'),(_0x1ddd43,_0x232984,_0x208e27)=>{_0x208e27&&(this['_oldOffset']=_0x14ed9e['_offset'],_0x1ddd43[_0x4b58('0x1e')]());}),this[_0x4b58('0x14')][_0x4b58('0x15')](_0x4b58('0x34'))['to'](_0x758636,'state',_0x1850d9=>_0x1850d9===_0x59c8fb[_0x4b58('0x37')]);}async['reconnect'](){const _0x47acb0=this[_0x4b58('0x19')][_0x4b58('0xa')][_0x4b58('0x2b')](_0x259adf),_0x3a5cfc=this[_0x4b58('0x19')][_0x4b58('0xa')][_0x4b58('0x2b')](_0x32d2da),_0x38703f=async()=>{const _0x154d31=this['_revisionTracker']['currentRevision'],_0x25fc65=_0x154d31['id'],_0x488f75=_0x25fc65!==_0x3a5cfc[_0x4b58('0x2c')];if(_0x488f75){const _0x43a05b=_0x3a5cfc['_offset']-this[_0x4b58('0x2f')],_0x3ad3a6=this['_getLatestVersionFromServerOperations']();this[_0x4b58('0x14')][_0x4b58('0x24')][_0x4b58('0x39')]();if(_0x154d31['toVersion']+_0x43a05b!==_0x3ad3a6){const _0x255f8d=_0x154d31[_0x4b58('0x3c')]+_0x43a05b,_0x3843c0=this[_0x4b58('0x19')][_0x4b58('0xa')]['get'](_0x2fb6a4),_0xae8914=this[_0x4b58('0x14')][_0x4b58('0x13')]({'revision':_0x154d31,'from':_0x255f8d,'to':_0x3ad3a6});_0xae8914['id']=_0x154d31['id'];const _0x1e66b2=_0xae8914['authorsIds'][_0x4b58('0x3a')](_0x5b701a=>_0x3843c0['getUser'](_0x5b701a));_0x154d31['_update']({..._0xae8914,'authors':_0x1e66b2},!0x0),this[_0x4b58('0x14')][_0x4b58('0x3f')](_0x154d31['id'],_0xae8914,!0x0);}this[_0x4b58('0x14')][_0x4b58('0x4e')]=_0x3ad3a6,(_0x154d31[_0x4b58('0x49')]===_0x154d31[_0x4b58('0x3c')]&&!this['_revisionTracker'][_0x4b58('0x2')][_0x4b58('0x2d')](_0x25fc65)&&this[_0x4b58('0x14')][_0x4b58('0x41')][_0x4b58('0x6')]['remove'](_0x25fc65),this[_0x4b58('0x14')][_0x4b58('0x17')](_0x3ad3a6));}const {revisions:_0x32d625,requestId:_0x189de8}=await this[_0x4b58('0x0')][_0x4b58('0x4d')](_0x47acb0[_0x4b58('0x33')],this[_0x4b58('0x46')]);_0x488f75&&_0x32d625[_0x4b58('0x3d')]>0x0?_0x3a5cfc['_handleReconnectionError']():(await this[_0x4b58('0x43')](_0x32d625),this[_0x4b58('0x4b')](_0x32d625,_0x189de8),this['_revisionTracker']['sendBufferedUpdates']());};return _0x3a5cfc[_0x4b58('0xf')]?_0x38703f():new Promise((_0x36bcdd,_0x558240)=>{_0x3a5cfc['once'](_0x4b58('0x1'),()=>{_0x38703f()['then'](_0x36bcdd)[_0x4b58('0x30')](_0x558240);});});}[_0x4b58('0x4')](){super[_0x4b58('0x4')]();}async[_0x4b58('0x55')](){this[_0x4b58('0x0')][_0x4b58('0x27')]||await new Promise(_0x5a1877=>{this[_0x4b58('0x10')](this[_0x4b58('0x0')],'connected',_0xb40a3b=>{_0xb40a3b['off'](),_0x5a1877();});});}[_0x4b58('0x54')](){const _0x375475=this[_0x4b58('0x19')][_0x4b58('0xa')]['get'](_0x32d2da)['serverHistory'][_0x4b58('0x26')]()[_0x4b58('0x7')]();for(const _0x16ca7a of _0x375475)if(_0x4b58('0x2a')!==_0x16ca7a['type']||_0x16ca7a['affectsData'])return _0x16ca7a[_0x4b58('0xc')]+0x1;}[_0x4b58('0x4c')](){const _0x468f14=this[_0x4b58('0x19')][_0x4b58('0xa')][_0x4b58('0x2b')](_0x32d2da);return new Promise(_0x4f76e1=>{_0x468f14[_0x4b58('0x12')]?_0x468f14[_0x4b58('0x3b')](_0x4b58('0x38'),()=>{_0x4f76e1(this[_0x4b58('0x54')]());}):_0x4f76e1(this[_0x4b58('0x54')]());});}['_handleRevisionsUpdate'](_0x40a08a,_0x215337){const _0x178f52=this[_0x4b58('0x14')][_0x4b58('0x41')];this['_lastRequestId']=_0x215337;for(const _0x35fc44 of _0x40a08a){const _0x14b7cb=_0x178f52[_0x4b58('0x1a')](_0x35fc44['id']);if(_0x14b7cb){if((_0x35fc44[_0x4b58('0x3c')]||_0x35fc44['toVersion'])&&(_0x35fc44['diffData']=null),_0x14b7cb===this[_0x4b58('0x14')][_0x4b58('0x32')]){const _0x111b50=Math[_0x4b58('0x1f')](_0x14b7cb[_0x4b58('0x49')],_0x35fc44['toVersion']),_0x4e010f=Math['max'](_0x14b7cb[_0x4b58('0x3c')],_0x35fc44[_0x4b58('0x3c')]);let _0x9ba4f3;_0x14b7cb[_0x4b58('0x49')]===_0x35fc44[_0x4b58('0x49')]&&_0x14b7cb[_0x4b58('0x3c')]===_0x35fc44[_0x4b58('0x3c')]?(_0x9ba4f3=!0x0,this['_preventResendingRevisionData'](_0x35fc44)):_0x35fc44[_0x4b58('0x49')]===_0x111b50&&_0x35fc44['fromVersion']===_0x4e010f?_0x9ba4f3=!0x1:(_0x14b7cb[_0x4b58('0x49')]===_0x111b50&&_0x14b7cb[_0x4b58('0x3c')]===_0x4e010f||this[_0x4b58('0x28')]({'revision':_0x14b7cb,'from':_0x4e010f,'to':_0x111b50}),_0x9ba4f3=!0x0),_0x9ba4f3&&(delete _0x35fc44[_0x4b58('0x3c')],delete _0x35fc44[_0x4b58('0x49')],delete _0x35fc44['diffData'],delete _0x35fc44[_0x4b58('0x42')],delete _0x35fc44[_0x4b58('0x9')]);}this[_0x4b58('0x14')][_0x4b58('0xb')](_0x35fc44),this[_0x4b58('0x3e')](_0x35fc44);}else this['_revisionTracker']['addRevisionData'](_0x35fc44);}const _0x58ef9b=_0x178f52[_0x4b58('0x1b')]();_0x58ef9b[_0x4b58('0x7')]();for(let _0x160657=0x0;_0x160657<_0x58ef9b['length']-0x1;_0x160657++){const _0x697e4=_0x58ef9b[_0x160657],_0x497f93=_0x58ef9b[_0x160657+0x1];if(_0x697e4[_0x4b58('0x3c')]<_0x497f93[_0x4b58('0x49')]){const _0x27fbe1=_0x497f93[_0x4b58('0x49')],_0x383e2a=Math['max'](_0x27fbe1,_0x697e4['toVersion']);this['_fixRevision']({'revision':_0x697e4,'from':_0x27fbe1,'to':_0x383e2a});}}}['_fixRevision']({revision:_0x125590,from:_0x9e4930,to:_0x5c33d5}={}){const _0x466cd5=this[_0x4b58('0x19')][_0x4b58('0xa')]['get'](_0x2fb6a4),_0x37b08e=this['_revisionTracker'][_0x4b58('0x13')]({'revision':_0x125590,'from':_0x9e4930,'to':_0x5c33d5});_0x37b08e[_0x4b58('0x45')]=_0x37b08e[_0x4b58('0x9')][_0x4b58('0x3a')](_0x558e6b=>_0x466cd5['getUser'](_0x558e6b)),_0x125590[_0x4b58('0x1d')](_0x37b08e);}[_0x4b58('0x3e')](_0x37e288){const _0x583da7={};_0x583da7['id']=_0x37e288['id'];for(const _0x174bbd of Object[_0x4b58('0x53')](_0x37e288))'id'!==_0x174bbd&&(_0x583da7[_0x174bbd]=void 0x0);this['_revisionTracker']['_bufferUpdate'](_0x583da7['id'],_0x583da7,!0x0);}async[_0x4b58('0x43')](_0x4752c9){const _0x12e7fd=this[_0x4b58('0x19')][_0x4b58('0xa')][_0x4b58('0x2b')](_0x2fb6a4),{connection:_0x53c196}=this[_0x4b58('0x19')][_0x4b58('0xa')][_0x4b58('0x2b')](_0x259adf),_0x54f43e=new Set();for(const _0x1cbbcd of _0x4752c9){for(const _0x236d21 of _0x1cbbcd[_0x4b58('0x9')])_0x286bbf(_0x236d21);_0x1cbbcd[_0x4b58('0x29')]&&_0x286bbf(_0x1cbbcd[_0x4b58('0x29')]);}if(0x0===_0x54f43e[_0x4b58('0x8')])return;const _0x2ba87f=await _0x4a7cd7[_0x4b58('0x48')](_0x53c196,Array[_0x4b58('0xd')](_0x54f43e));for(const _0x567b3a of _0x2ba87f)_0x12e7fd[_0x4b58('0xe')](_0x567b3a['id'])||_0x12e7fd[_0x4b58('0x2e')](_0x567b3a);function _0x286bbf(_0x2a9792){_0x12e7fd[_0x4b58('0xe')](_0x2a9792)||_0x54f43e['add'](_0x2a9792);}}}function st(_0x54cf30){return _0x54cf30['message'][_0x4b58('0x18')](_0x4b58('0x5'))||_0x54cf30[_0x4b58('0x25')][_0x4b58('0x18')](_0x4b58('0x4f'))||_0x54cf30['message'][_0x4b58('0x18')](_0x4b58('0x4a'));}v[_0x4b58('0x52')]=_0x41a631;
23
+ const _0x41cc=['_createCurrentRevision','_handleReconnectionError','_bufferUpdate','cloud-services-internal-error:\x20Not\x20connected.','_startingVersion','listenTo','_revisions','_preventResendingRevisionData','_bufferedUpdates','max','reverse','config','setRevisionData','length','code','getUser','requires','connection','addRevisionData','type','_fixRevision','off','data','getOperations','size','repository','_handleRevisionsUpdate','reInit','map','state','isEnabled','wrongRequestId','_lastRequestId','connected','cloud-services-internal-error:\x20Revision\x20History\x20Service\x20is\x20not\x20connected.','sendBufferedUpdates','addUser','_fetchMissingUsers','_oldOffset','cloud-services-internal-error:\x20Request\x20timeout.','creatorId','_isPendingUpdate','_getLatestVersion','revisionsUpdated','authorsIds','_getLatestVersionFromServerOperations','connect','_waitForServiceReady','message','authors','_revisionHistoryService','then','createdAt','serverHistory','catch','add','diffData','setSource','RevisionTracker','sessionId','startsWith','getRevisions','keys','editor','fromVersion','change:_isConnected','destroy','isConnected','isEmptyCurrent','addToReconnectionStack','400','marker','_update','collaboration.channelId','_revisionDataBuilder','cloudServices.bundleVersion','currentRevision','getRevision','buildRevisionData','adapter','_revisionTracker','init','bind','baseVersion','get','toVersion','plugins','updateRevisions'];(function(_0x4a2d3d,_0x41cc67){const _0x1ee876=function(_0x49788e){while(--_0x49788e){_0x4a2d3d['push'](_0x4a2d3d['shift']());}};_0x1ee876(++_0x41cc67);}(_0x41cc,0x19b));const _0x1ee8=function(_0x4a2d3d,_0x41cc67){_0x4a2d3d=_0x4a2d3d-0x0;let _0x1ee876=_0x41cc[_0x4a2d3d];return _0x1ee876;};import{Plugin as _0x4421aa}from'ckeditor5/src/core';import{version as _0x37b887}from'ckeditor5/src/utils';import{Users as _0x3c0905}from'ckeditor5-collaboration/src/collaboration-core';import _0x184c45 from'../realtimecollaborativeediting/realtimecollaborationclient';import _0x16c509 from'../realtimecollaborativeediting/websocketgateway';import _0x160d73 from'../realtimecollaborativeediting/sessions';import{User as _0x42528e}from'@ckeditor/ckeditor-cloud-services-collaboration';import{RevisionHistoryService as _0x431396,EditorService as _0x516e37,WEB_SOCKET_GATEWAY_STATES as _0xc9b7c5}from'@ckeditor/ckeditor-cloud-services-collaboration/src/services';export default class v extends _0x4421aa{static get[_0x1ee8('0x2d')](){return[_0x16c509,_0x184c45,'RevisionTracker',_0x160d73,_0x3c0905];}constructor(_0x326212){super(_0x326212);const _0x430242=this[_0x1ee8('0x4')][_0x1ee8('0x28')][_0x1ee8('0x19')](_0x1ee8('0xe'));this[_0x1ee8('0x3d')]=null,this['_revisionTracker']=this[_0x1ee8('0x4')]['plugins']['get'](_0x1ee8('0x57')),this[_0x1ee8('0x4f')]=new v['RevisionHistoryService'](_0x430242);}async[_0x1ee8('0x16')](){const _0x1f16da=this['editor'][_0x1ee8('0x1b')][_0x1ee8('0x19')](_0x184c45),_0x2e730f=_0x1f16da[_0x1ee8('0x52')],_0x3367f0=this[_0x1ee8('0x4')][_0x1ee8('0x1b')][_0x1ee8('0x19')](_0x16c509);this['_revisionTracker'][_0x1ee8('0x56')]({'history':_0x2e730f,'getLatestVersion':()=>this[_0x1ee8('0x47')](),'getCurrentRevisionId':()=>_0x1f16da[_0x1ee8('0x0')]});const _0xc2ba0=this['editor'][_0x1ee8('0x28')]['get'](_0x1ee8('0x10'))||_0x37b887,_0xd90488=await _0x516e37['isBundleUploaded'](_0x3367f0['connection'],_0xc2ba0);this[_0x1ee8('0x15')][_0x1ee8('0x14')]={'getRevision':async({revisionId:_0x462ede})=>(await this['_waitForServiceReady'](),await this[_0x1ee8('0x4f')][_0x1ee8('0x12')](_0x462ede)),'updateRevisions':async _0x454fe2=>{await this['_waitForServiceReady']();const _0x46a189=this[_0x1ee8('0x15')][_0x1ee8('0x11')];if(_0xd90488&&0x1===_0x454fe2['length']&&_0x454fe2[0x0]['id']===_0x46a189['id'])return _0x454fe2;for(const _0x7b5771 of _0x454fe2)_0x7b5771['id']===_0x46a189['id']&&(_0x7b5771[_0x1ee8('0x9')]=_0x7b5771[_0x1ee8('0x5')]===_0x7b5771[_0x1ee8('0x1a')]);return this['_revisionHistoryService'][_0x1ee8('0x1c')](_0x454fe2,this[_0x1ee8('0x3d')])[_0x1ee8('0x50')](_0x1e5168=>(this[_0x1ee8('0x3d')]=_0x1e5168,_0x454fe2))[_0x1ee8('0x53')](_0x33fc64=>{if(st(_0x33fc64)||_0x1ee8('0xb')===_0x33fc64[_0x1ee8('0x2b')]&&void 0x0!==_0x33fc64[_0x1ee8('0x33')][_0x1ee8('0x3c')]){for(const _0x4deef5 of _0x454fe2){!this[_0x1ee8('0x15')][_0x1ee8('0x36')][_0x1ee8('0x12')](_0x4deef5['id'])||this[_0x1ee8('0x15')][_0x1ee8('0x1f')](_0x4deef5['id'],_0x4deef5,!0x1);}if(st(_0x33fc64))throw _0x33fc64;return _0x454fe2;}throw _0x33fc64;});}},this[_0x1ee8('0x22')](this[_0x1ee8('0x4f')],_0x1ee8('0x48'),(_0xa98391,{revisionsData:_0x1265f3,requestId:_0x8199fe})=>{Math[_0x1ee8('0x26')](..._0x1265f3[_0x1ee8('0x39')](_0x4ffd2a=>_0x4ffd2a['toVersion']))>this[_0x1ee8('0x4a')]()-0x1?this[_0x1ee8('0x47')]()['then'](()=>{this[_0x1ee8('0x37')](_0x1265f3,_0x8199fe);}):this['_handleRevisionsUpdate'](_0x1265f3,_0x8199fe);});const {revisions:_0x8ea85b,requestId:_0x583b48}=await this[_0x1ee8('0x4f')][_0x1ee8('0x4b')](_0x3367f0[_0x1ee8('0x2e')]);_0x3367f0[_0x1ee8('0xa')](this),this[_0x1ee8('0x3d')]=_0x583b48,await this[_0x1ee8('0x42')](_0x8ea85b);for(const _0x10c408 of _0x8ea85b)this['_revisionTracker'][_0x1ee8('0x2f')](_0x10c408);this[_0x1ee8('0x22')](_0x1f16da,_0x1ee8('0x6'),(_0x3a2dc5,_0x2bcd0c,_0x385493)=>{_0x385493&&(this[_0x1ee8('0x43')]=_0x1f16da['_offset'],_0x3a2dc5[_0x1ee8('0x32')]());}),this[_0x1ee8('0x15')][_0x1ee8('0x17')](_0x1ee8('0x3b'))['to'](_0x3367f0,_0x1ee8('0x3a'),_0x2efb60=>_0x2efb60===_0xc9b7c5['CONNECTED']);}async['reconnect'](){const _0x4bc06f=this[_0x1ee8('0x4')][_0x1ee8('0x1b')]['get'](_0x16c509),_0x55d1b5=this['editor'][_0x1ee8('0x1b')][_0x1ee8('0x19')](_0x184c45),_0x59f4dc=async()=>{const _0x420e13=this[_0x1ee8('0x15')]['currentRevision'],_0x2e2349=_0x420e13['id'],_0xf4e51a=_0x2e2349!==_0x55d1b5['sessionId'];if(_0xf4e51a){const _0x469516=_0x55d1b5['_offset']-this[_0x1ee8('0x43')],_0x1d385d=this['_getLatestVersionFromServerOperations']();this[_0x1ee8('0x15')][_0x1ee8('0xf')][_0x1ee8('0x38')]();if(_0x420e13[_0x1ee8('0x1a')]+_0x469516!==_0x1d385d){const _0x1bd679=_0x420e13[_0x1ee8('0x5')]+_0x469516,_0x5e8b88=this['editor']['plugins'][_0x1ee8('0x19')](_0x3c0905),_0x199b80=this[_0x1ee8('0x15')][_0x1ee8('0x13')]({'revision':_0x420e13,'from':_0x1bd679,'to':_0x1d385d});_0x199b80['id']=_0x420e13['id'];const _0x4e0453=_0x199b80['authorsIds'][_0x1ee8('0x39')](_0x3aa742=>_0x5e8b88[_0x1ee8('0x2c')](_0x3aa742));_0x420e13[_0x1ee8('0xd')]({..._0x199b80,'authors':_0x4e0453},!0x0),this[_0x1ee8('0x15')][_0x1ee8('0x1f')](_0x420e13['id'],_0x199b80,!0x0);}this['_revisionTracker'][_0x1ee8('0x21')]=_0x1d385d,(_0x420e13[_0x1ee8('0x1a')]===_0x420e13['fromVersion']&&!this[_0x1ee8('0x15')][_0x1ee8('0x25')]['has'](_0x2e2349)&&this[_0x1ee8('0x15')][_0x1ee8('0x36')][_0x1ee8('0x23')]['remove'](_0x2e2349),this[_0x1ee8('0x15')][_0x1ee8('0x1d')](_0x1d385d));}const {revisions:_0x3af28f,requestId:_0x4bcfb7}=await this[_0x1ee8('0x4f')]['reconnect'](_0x4bc06f['connection'],this['_lastRequestId']);_0xf4e51a&&_0x3af28f[_0x1ee8('0x2a')]>0x0?_0x55d1b5[_0x1ee8('0x1e')]():(await this['_fetchMissingUsers'](_0x3af28f),this['_handleRevisionsUpdate'](_0x3af28f,_0x4bcfb7),this[_0x1ee8('0x15')][_0x1ee8('0x40')]());};return _0x55d1b5['_isConnected']?_0x59f4dc():new Promise((_0x22b7f5,_0x439e90)=>{_0x55d1b5['once'](_0x1ee8('0x6'),()=>{_0x59f4dc()[_0x1ee8('0x50')](_0x22b7f5)[_0x1ee8('0x53')](_0x439e90);});});}[_0x1ee8('0x7')](){super[_0x1ee8('0x7')]();}async[_0x1ee8('0x4c')](){this[_0x1ee8('0x4f')][_0x1ee8('0x8')]||await new Promise(_0x1210ae=>{this[_0x1ee8('0x22')](this[_0x1ee8('0x4f')],_0x1ee8('0x3e'),_0x253224=>{_0x253224[_0x1ee8('0x32')](),_0x1210ae();});});}['_getLatestVersionFromServerOperations'](){const _0x5731da=this[_0x1ee8('0x4')][_0x1ee8('0x1b')][_0x1ee8('0x19')](_0x184c45)[_0x1ee8('0x52')][_0x1ee8('0x34')]()[_0x1ee8('0x27')]();for(const _0x40b661 of _0x5731da)if(_0x1ee8('0xc')!==_0x40b661[_0x1ee8('0x30')]||_0x40b661['affectsData'])return _0x40b661[_0x1ee8('0x18')]+0x1;}['_getLatestVersion'](){const _0x1a8995=this['editor'][_0x1ee8('0x1b')][_0x1ee8('0x19')](_0x184c45);return new Promise(_0xc643eb=>{_0x1a8995[_0x1ee8('0x46')]?_0x1a8995['once']('change:_isPendingUpdate',()=>{_0xc643eb(this[_0x1ee8('0x4a')]());}):_0xc643eb(this[_0x1ee8('0x4a')]());});}[_0x1ee8('0x37')](_0x4b682f,_0x3941b9){const _0x1b7414=this[_0x1ee8('0x15')][_0x1ee8('0x36')];this[_0x1ee8('0x3d')]=_0x3941b9;for(const _0x5e7987 of _0x4b682f){const _0x504398=_0x1b7414[_0x1ee8('0x12')](_0x5e7987['id']);if(_0x504398){if((_0x5e7987[_0x1ee8('0x5')]||_0x5e7987[_0x1ee8('0x1a')])&&(_0x5e7987[_0x1ee8('0x55')]=null),_0x504398===this[_0x1ee8('0x15')][_0x1ee8('0x11')]){const _0x162712=Math[_0x1ee8('0x26')](_0x504398[_0x1ee8('0x1a')],_0x5e7987[_0x1ee8('0x1a')]),_0x469d47=Math['max'](_0x504398[_0x1ee8('0x5')],_0x5e7987[_0x1ee8('0x5')]);let _0x5bf2d7;_0x504398[_0x1ee8('0x1a')]===_0x5e7987[_0x1ee8('0x1a')]&&_0x504398['fromVersion']===_0x5e7987['fromVersion']?(_0x5bf2d7=!0x0,this[_0x1ee8('0x24')](_0x5e7987)):_0x5e7987[_0x1ee8('0x1a')]===_0x162712&&_0x5e7987['fromVersion']===_0x469d47?_0x5bf2d7=!0x1:(_0x504398[_0x1ee8('0x1a')]===_0x162712&&_0x504398[_0x1ee8('0x5')]===_0x469d47||this[_0x1ee8('0x31')]({'revision':_0x504398,'from':_0x469d47,'to':_0x162712}),_0x5bf2d7=!0x0),_0x5bf2d7&&(delete _0x5e7987[_0x1ee8('0x5')],delete _0x5e7987[_0x1ee8('0x1a')],delete _0x5e7987[_0x1ee8('0x55')],delete _0x5e7987[_0x1ee8('0x51')],delete _0x5e7987['authorsIds']);}this[_0x1ee8('0x15')][_0x1ee8('0x29')](_0x5e7987),this[_0x1ee8('0x24')](_0x5e7987);}else this[_0x1ee8('0x15')]['addRevisionData'](_0x5e7987);}const _0x1a446a=_0x1b7414[_0x1ee8('0x2')]();_0x1a446a[_0x1ee8('0x27')]();for(let _0x5cd3bd=0x0;_0x5cd3bd<_0x1a446a[_0x1ee8('0x2a')]-0x1;_0x5cd3bd++){const _0x329d84=_0x1a446a[_0x5cd3bd],_0x2f6a62=_0x1a446a[_0x5cd3bd+0x1];if(_0x329d84[_0x1ee8('0x5')]<_0x2f6a62[_0x1ee8('0x1a')]){const _0x5cb7d0=_0x2f6a62[_0x1ee8('0x1a')],_0x21c52a=Math[_0x1ee8('0x26')](_0x5cb7d0,_0x329d84[_0x1ee8('0x1a')]);this[_0x1ee8('0x31')]({'revision':_0x329d84,'from':_0x5cb7d0,'to':_0x21c52a});}}}[_0x1ee8('0x31')]({revision:_0x1b083a,from:_0xaaec96,to:_0x1b9d25}={}){const _0x31569c=this[_0x1ee8('0x4')][_0x1ee8('0x1b')][_0x1ee8('0x19')](_0x3c0905),_0x83fac1=this[_0x1ee8('0x15')][_0x1ee8('0x13')]({'revision':_0x1b083a,'from':_0xaaec96,'to':_0x1b9d25});_0x83fac1[_0x1ee8('0x4e')]=_0x83fac1[_0x1ee8('0x49')][_0x1ee8('0x39')](_0x897b18=>_0x31569c[_0x1ee8('0x2c')](_0x897b18)),_0x1b083a[_0x1ee8('0xd')](_0x83fac1);}['_preventResendingRevisionData'](_0x41a840){const _0x33f97d={};_0x33f97d['id']=_0x41a840['id'];for(const _0x1155a8 of Object[_0x1ee8('0x3')](_0x41a840))'id'!==_0x1155a8&&(_0x33f97d[_0x1155a8]=void 0x0);this[_0x1ee8('0x15')]['_bufferUpdate'](_0x33f97d['id'],_0x33f97d,!0x0);}async['_fetchMissingUsers'](_0x3e9324){const _0xbcb81d=this[_0x1ee8('0x4')][_0x1ee8('0x1b')]['get'](_0x3c0905),{connection:_0x176fa8}=this[_0x1ee8('0x4')][_0x1ee8('0x1b')][_0x1ee8('0x19')](_0x16c509),_0x2ea7af=new Set();for(const _0x150c7b of _0x3e9324){for(const _0x45d784 of _0x150c7b['authorsIds'])_0xbddc16(_0x45d784);_0x150c7b[_0x1ee8('0x45')]&&_0xbddc16(_0x150c7b['creatorId']);}if(0x0===_0x2ea7af[_0x1ee8('0x35')])return;const _0x321519=await _0x42528e['getMany'](_0x176fa8,Array['from'](_0x2ea7af));for(const _0xb2929c of _0x321519)_0xbcb81d[_0x1ee8('0x2c')](_0xb2929c['id'])||_0xbcb81d[_0x1ee8('0x41')](_0xb2929c);function _0xbddc16(_0x3ba77d){_0xbcb81d[_0x1ee8('0x2c')](_0x3ba77d)||_0x2ea7af[_0x1ee8('0x54')](_0x3ba77d);}}}function st(_0x5f3db2){return _0x5f3db2[_0x1ee8('0x4d')]['startsWith'](_0x1ee8('0x3f'))||_0x5f3db2[_0x1ee8('0x4d')][_0x1ee8('0x1')](_0x1ee8('0x20'))||_0x5f3db2['message']['startsWith'](_0x1ee8('0x44'));}v['RevisionHistoryService']=_0x431396;
@@ -1,10 +1,14 @@
1
+ /**
2
+ * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
+ */
1
5
  /**
2
6
  * @module real-time-collaboration/realtimecollaborativerevisionhistory
3
7
  * @publicApi
4
8
  */
5
- import { Plugin } from 'ckeditor5/src/core.js';
6
- import CloudServicesRevisionHistoryAdapter from './realtimecollaborativerevisionhistory/cloudservicesrevisionhistoryadapter.js';
7
- import RealTimeCollaborativeEditing from './realtimecollaborativeediting.js';
9
+ import { Plugin } from 'ckeditor5/src/core';
10
+ import CloudServicesRevisionHistoryAdapter from './realtimecollaborativerevisionhistory/cloudservicesrevisionhistoryadapter';
11
+ import RealTimeCollaborativeEditing from './realtimecollaborativeediting';
8
12
  /**
9
13
  * Enables the real-time collaborative revision history feature.
10
14
  *
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright (c) 2016 - 2023, CKSource Holding sp. z o.o. All rights reserved.
2
+ * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
3
3
  *
4
4
  *
5
5
  *
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- var _0x485a=['requires','pluginName','RealTimeCollaborativeRevisionHistory'];(function(_0x5ba4de,_0x485a09){var _0x368a7d=function(_0x44aa32){while(--_0x44aa32){_0x5ba4de['push'](_0x5ba4de['shift']());}};_0x368a7d(++_0x485a09);}(_0x485a,0x1e5));var _0x368a=function(_0x5ba4de,_0x485a09){_0x5ba4de=_0x5ba4de-0x0;var _0x368a7d=_0x485a[_0x5ba4de];return _0x368a7d;};import{Plugin as _0x430867}from'ckeditor5/src/core.js';import _0x2bb69a from'./realtimecollaborativerevisionhistory/cloudservicesrevisionhistoryadapter.js';import _0x41cba1 from'./realtimecollaborativeediting.js';export default class d extends _0x430867{static get[_0x368a('0x1')](){return['RevisionHistory',_0x2bb69a,_0x41cba1];}static get[_0x368a('0x2')](){return _0x368a('0x0');}}
23
+ var _0x4d47=['requires','RevisionHistory'];(function(_0x2f48cd,_0x4d478f){var _0x9fca8b=function(_0x17c815){while(--_0x17c815){_0x2f48cd['push'](_0x2f48cd['shift']());}};_0x9fca8b(++_0x4d478f);}(_0x4d47,0x12a));var _0x9fca=function(_0x2f48cd,_0x4d478f){_0x2f48cd=_0x2f48cd-0x0;var _0x9fca8b=_0x4d47[_0x2f48cd];return _0x9fca8b;};import{Plugin as _0x409ae5}from'ckeditor5/src/core';import _0x5d39cb from'./realtimecollaborativerevisionhistory/cloudservicesrevisionhistoryadapter';import _0x1371cf from'./realtimecollaborativeediting';export default class d extends _0x409ae5{static get[_0x9fca('0x0')](){return[_0x9fca('0x1'),_0x5d39cb,_0x1371cf];}static get['pluginName'](){return'RealTimeCollaborativeRevisionHistory';}}
@@ -1,11 +1,15 @@
1
+ /**
2
+ * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
+ */
1
5
  /**
2
6
  * @module real-time-collaboration/realtimecollaborativetrackchanges/cloudservicestrackchangesadapter
3
7
  * @publicApi
4
8
  */
5
- import { Plugin, type Editor } from 'ckeditor5/src/core.js';
6
- import { TrackChangesService } from '@ckeditor/ckeditor-cloud-services-collaboration/src/services.js';
7
- import WebSocketGateway, { type ReconnectPlugin } from '../realtimecollaborativeediting/websocketgateway.js';
8
- import CloudServicesCommentsAdapter from '../realtimecollaborativecomments/cloudservicescommentsadapter.js';
9
+ import { Plugin, type Editor } from 'ckeditor5/src/core';
10
+ import { TrackChangesService } from '@ckeditor/ckeditor-cloud-services-collaboration/src/services';
11
+ import WebSocketGateway, { type ReconnectPlugin } from '../realtimecollaborativeediting/websocketgateway';
12
+ import CloudServicesCommentsAdapter from '../realtimecollaborativecomments/cloudservicescommentsadapter';
9
13
  /**
10
14
  * The Cloud Services Track Changes Adapter plugin.
11
15
  */
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright (c) 2016 - 2023, CKSource Holding sp. z o.o. All rights reserved.
2
+ * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
3
3
  *
4
4
  *
5
5
  *
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x23be=['connect','cloud-services-internal-error:\x20Not\x20connected.','open','get','data','size','add','startsWith','then','_trackChangesService','getSuggestion','editor','values','find','plugins','listenTo','TrackChangesService','message','originalSuggestionId','TrackChangesEditing','reconnect','collaboration.channelId','catch','state','_bufferedRequests','isConnected','suggestionUpdated','cloud-services-internal-error:\x20Request\x20timeout.','attributes','_waitForServiceReady','connected','hasSuggestion','config','getUser','adapter','connection','from','update','_fetchMissingUsersForThreads','getMany','delete','type'];(function(_0x55a56e,_0x23be4d){const _0x175672=function(_0x4b6c69){while(--_0x4b6c69){_0x55a56e['push'](_0x55a56e['shift']());}};_0x175672(++_0x23be4d);}(_0x23be,0x1cc));const _0x1756=function(_0x55a56e,_0x23be4d){_0x55a56e=_0x55a56e-0x0;let _0x175672=_0x23be[_0x55a56e];return _0x175672;};import{Plugin as _0x2b192b}from'ckeditor5/src/core.js';import{TrackChangesService as _0x109bb2}from'@ckeditor/ckeditor-cloud-services-collaboration/src/services.js';import{User as _0x5cdb6f}from'@ckeditor/ckeditor-cloud-services-collaboration';import _0x176235 from'../realtimecollaborativeediting/websocketgateway.js';import _0x56043a from'../realtimecollaborativecomments/cloudservicescommentsadapter.js';import{Users as _0x3d3b69}from'ckeditor5-collaboration';export default class g extends _0x2b192b{static get['requires'](){return[_0x56043a,_0x1756('0x15'),_0x176235];}constructor(_0x5e0b1c){super(_0x5e0b1c);const _0x17d392=this['editor'][_0x1756('0x22')]['get'](_0x1756('0x17'));this[_0x1756('0x1a')]=new Map(),this[_0x1756('0xb')]=new g[(_0x1756('0x12'))](_0x17d392);}['init'](){const _0x4ed474=this[_0x1756('0xd')][_0x1756('0x10')][_0x1756('0x5')](_0x176235),_0x44e247=this[_0x1756('0xd')][_0x1756('0x10')]['get'](_0x1756('0x15'));return _0x44e247[_0x1756('0x24')]={'getSuggestion':async _0x236a9c=>{await this[_0x1756('0x1f')]();const _0x128de6=await this[_0x1756('0xb')][_0x1756('0x5')](_0x236a9c)['catch'](B);return await this['_fetchMissingUsersForThreads']([_0x128de6]),_0x128de6;},'addSuggestion':async({id:_0x487551,type:_0x20232e,data:_0x9a8ccf,originalSuggestionId:_0x5f4892,attributes:_0x2e3bb1})=>{await this[_0x1756('0x1f')]();const _0x2bb59d={'id':_0x487551,'type':_0x20232e,'data':_0x9a8ccf,'originalSuggestionId':_0x5f4892,'attributes':_0x2e3bb1},_0x51d863=await this[_0x1756('0xb')][_0x1756('0x8')](_0x487551,_0x20232e,_0x9a8ccf,_0x5f4892,_0x2e3bb1)['catch'](_0xff7627=>{if(st(_0xff7627))return new Promise(_0x5d31db=>{this[_0x1756('0x1a')]['set'](_0x487551,{'resolve':_0x5d31db,'suggestionData':_0x2bb59d});});throw _0xff7627;});return this['_bufferedRequests'][_0x1756('0x0')](_0x487551),_0x51d863;},'updateSuggestion':async(_0x4eaef9,_0x193dcf)=>{if(await this[_0x1756('0x1f')](),_0x1756('0x4')!==_0x193dcf[_0x1756('0x19')])return this[_0x1756('0xb')][_0x1756('0x27')](_0x4eaef9,_0x193dcf)[_0x1756('0x18')](B);}},this[_0x1756('0x11')](this['_trackChangesService'],_0x1756('0x1c'),(_0x464ea0,_0x6b1ef5)=>{_0x44e247[_0x1756('0x21')](_0x6b1ef5['id'])&&(_0x44e247[_0x1756('0xc')](_0x6b1ef5['id'])[_0x1756('0x1e')]=_0x6b1ef5[_0x1756('0x1e')]);}),this[_0x1756('0xb')][_0x1756('0x2')](_0x4ed474[_0x1756('0x25')])[_0x1756('0xa')](_0x50f6c9=>(_0x4ed474['addToReconnectionStack'](this),this['_fetchMissingUsersForThreads'](_0x50f6c9)[_0x1756('0xa')](()=>{for(const _0x35fe2e of _0x50f6c9){_0x44e247['addSuggestionData'](_0x35fe2e)['_saved']=!0x0;}})));}async[_0x1756('0x16')](){const _0x5f4f97=this['editor'][_0x1756('0x10')][_0x1756('0x5')](_0x1756('0x15')),{connection:_0x3986f7}=this[_0x1756('0xd')]['plugins']['get'](_0x176235),_0x3d236a=await this[_0x1756('0xb')][_0x1756('0x2')](_0x3986f7);await this[_0x1756('0x28')](_0x3d236a);for(const {suggestionData:_0x99e3b1,resolve:_0x246769}of this[_0x1756('0x1a')][_0x1756('0xe')]()){let _0x35a44d=_0x3d236a[_0x1756('0xf')](_0x423a08=>_0x423a08['id']===_0x99e3b1['id']);_0x35a44d||(_0x35a44d=await this[_0x1756('0xb')][_0x1756('0x8')](_0x99e3b1['id'],_0x99e3b1[_0x1756('0x1')],_0x99e3b1[_0x1756('0x6')],_0x99e3b1[_0x1756('0x14')])),_0x246769(_0x35a44d);}for(const _0x1c41f8 of _0x3d236a)_0x5f4f97[_0x1756('0x21')](_0x1c41f8['id'])||_0x5f4f97['addSuggestionData'](_0x1c41f8);}async[_0x1756('0x1f')](){this[_0x1756('0xb')][_0x1756('0x1b')]||await new Promise(_0x5c278d=>{this['listenTo'](this['_trackChangesService'],_0x1756('0x20'),_0x3f2b41=>{_0x3f2b41['off'](),_0x5c278d();});});}async[_0x1756('0x28')](_0x102d0d){const _0x267669=this['editor']['plugins'][_0x1756('0x5')](_0x3d3b69),{connection:_0x35fffc}=this[_0x1756('0xd')][_0x1756('0x10')][_0x1756('0x5')](_0x176235),_0x3865b6=new Set();for(const {authorId:_0x1fb5d1}of _0x102d0d)_0x267669[_0x1756('0x23')](_0x1fb5d1)||_0x3865b6[_0x1756('0x8')](_0x1fb5d1);if(0x0===_0x3865b6[_0x1756('0x7')])return;const _0x125cc3=await _0x5cdb6f[_0x1756('0x29')](_0x35fffc,Array[_0x1756('0x26')](_0x3865b6));for(const _0x4e2963 of _0x125cc3)_0x267669['getUser'](_0x4e2963['id'])||_0x267669['addUser'](_0x4e2963);}}function B(_0x5430ef){if(st(_0x5430ef))return new Promise(()=>{});throw _0x5430ef;}function st(_0x2e33aa){return _0x2e33aa['message'][_0x1756('0x9')](_0x1756('0x3'))||_0x2e33aa[_0x1756('0x13')][_0x1756('0x9')](_0x1756('0x1d'));}g[_0x1756('0x12')]=_0x109bb2;
23
+ const _0x8820=['connected','getMany','size','_waitForServiceReady','suggestionUpdated','listenTo','_fetchMissingUsersForThreads','find','get','catch','_bufferedRequests','_trackChangesService','then','add','editor','collaboration.channelId','TrackChangesEditing','off','requires','cloud-services-internal-error:\x20Not\x20connected.','open','config','getUser','update','state','hasSuggestion','data','message','from','plugins','init','set','startsWith','adapter','originalSuggestionId','addSuggestionData','connect','TrackChangesService','values','attributes','cloud-services-internal-error:\x20Request\x20timeout.'];(function(_0x305c4b,_0x8820a7){const _0xbe9ca5=function(_0x3478ad){while(--_0x3478ad){_0x305c4b['push'](_0x305c4b['shift']());}};_0xbe9ca5(++_0x8820a7);}(_0x8820,0x12f));const _0xbe9c=function(_0x305c4b,_0x8820a7){_0x305c4b=_0x305c4b-0x0;let _0xbe9ca5=_0x8820[_0x305c4b];return _0xbe9ca5;};import{Plugin as _0xa3fc6b}from'ckeditor5/src/core';import{TrackChangesService as _0x2817b3}from'@ckeditor/ckeditor-cloud-services-collaboration/src/services';import{User as _0x2bd617}from'@ckeditor/ckeditor-cloud-services-collaboration';import _0x460646 from'../realtimecollaborativeediting/websocketgateway';import _0x3067e3 from'../realtimecollaborativecomments/cloudservicescommentsadapter';import{Users as _0x26842f}from'ckeditor5-collaboration/src/collaboration-core';export default class g extends _0xa3fc6b{static get[_0xbe9c('0x2')](){return[_0x3067e3,_0xbe9c('0x0'),_0x460646];}constructor(_0x5ac270){super(_0x5ac270);const _0x577c03=this[_0xbe9c('0x27')][_0xbe9c('0x5')][_0xbe9c('0x21')](_0xbe9c('0x28'));this['_bufferedRequests']=new Map(),this['_trackChangesService']=new g[(_0xbe9c('0x15'))](_0x577c03);}[_0xbe9c('0xe')](){const _0x2b13d2=this[_0xbe9c('0x27')][_0xbe9c('0xd')][_0xbe9c('0x21')](_0x460646),_0x110975=this['editor']['plugins'][_0xbe9c('0x21')]('TrackChangesEditing');return _0x110975[_0xbe9c('0x11')]={'getSuggestion':async _0x254c4d=>{await this[_0xbe9c('0x1c')]();const _0x5b80ff=await this[_0xbe9c('0x24')][_0xbe9c('0x21')](_0x254c4d)[_0xbe9c('0x22')](B);return await this[_0xbe9c('0x1f')]([_0x5b80ff]),_0x5b80ff;},'addSuggestion':async({id:_0x444756,type:_0x147f93,data:_0x34f78d,originalSuggestionId:_0x353dcb,attributes:_0x4e0856})=>{await this[_0xbe9c('0x1c')]();const _0x3ffd05={'id':_0x444756,'type':_0x147f93,'data':_0x34f78d,'originalSuggestionId':_0x353dcb,'attributes':_0x4e0856},_0xa062e7=await this['_trackChangesService'][_0xbe9c('0x26')](_0x444756,_0x147f93,_0x34f78d,_0x353dcb,_0x4e0856)['catch'](_0x16c57d=>{if(st(_0x16c57d))return new Promise(_0x179dd8=>{this[_0xbe9c('0x23')][_0xbe9c('0xf')](_0x444756,{'resolve':_0x179dd8,'suggestionData':_0x3ffd05});});throw _0x16c57d;});return this[_0xbe9c('0x23')]['delete'](_0x444756),_0xa062e7;},'updateSuggestion':async(_0x3fd223,_0x3f6a25)=>{if(await this['_waitForServiceReady'](),_0xbe9c('0x4')!==_0x3f6a25[_0xbe9c('0x8')])return this['_trackChangesService'][_0xbe9c('0x7')](_0x3fd223,_0x3f6a25)[_0xbe9c('0x22')](B);}},this['listenTo'](this[_0xbe9c('0x24')],_0xbe9c('0x1d'),(_0x565c37,_0x559541)=>{_0x110975[_0xbe9c('0x9')](_0x559541['id'])&&(_0x110975['getSuggestion'](_0x559541['id'])[_0xbe9c('0x17')]=_0x559541[_0xbe9c('0x17')]);}),this['_trackChangesService'][_0xbe9c('0x14')](_0x2b13d2['connection'])[_0xbe9c('0x25')](_0x4ee7c5=>(_0x2b13d2['addToReconnectionStack'](this),this[_0xbe9c('0x1f')](_0x4ee7c5)['then'](()=>{for(const _0x12a857 of _0x4ee7c5){_0x110975['addSuggestionData'](_0x12a857)['_saved']=!0x0;}})));}async['reconnect'](){const _0x19cd27=this[_0xbe9c('0x27')][_0xbe9c('0xd')][_0xbe9c('0x21')](_0xbe9c('0x0')),{connection:_0x417d1c}=this['editor'][_0xbe9c('0xd')][_0xbe9c('0x21')](_0x460646),_0xee7d99=await this[_0xbe9c('0x24')][_0xbe9c('0x14')](_0x417d1c);await this[_0xbe9c('0x1f')](_0xee7d99);for(const {suggestionData:_0x59083e,resolve:_0x3badf6}of this['_bufferedRequests'][_0xbe9c('0x16')]()){let _0x24d4a6=_0xee7d99[_0xbe9c('0x20')](_0x3d42f5=>_0x3d42f5['id']===_0x59083e['id']);_0x24d4a6||(_0x24d4a6=await this[_0xbe9c('0x24')][_0xbe9c('0x26')](_0x59083e['id'],_0x59083e['type'],_0x59083e[_0xbe9c('0xa')],_0x59083e[_0xbe9c('0x12')])),_0x3badf6(_0x24d4a6);}for(const _0x5bc7b9 of _0xee7d99)_0x19cd27[_0xbe9c('0x9')](_0x5bc7b9['id'])||_0x19cd27[_0xbe9c('0x13')](_0x5bc7b9);}async[_0xbe9c('0x1c')](){this[_0xbe9c('0x24')]['isConnected']||await new Promise(_0xb7a413=>{this[_0xbe9c('0x1e')](this[_0xbe9c('0x24')],_0xbe9c('0x19'),_0x3df7fe=>{_0x3df7fe[_0xbe9c('0x1')](),_0xb7a413();});});}async['_fetchMissingUsersForThreads'](_0x4ac0bd){const _0xae6bf5=this[_0xbe9c('0x27')][_0xbe9c('0xd')][_0xbe9c('0x21')](_0x26842f),{connection:_0x563735}=this[_0xbe9c('0x27')][_0xbe9c('0xd')]['get'](_0x460646),_0x10a67f=new Set();for(const {authorId:_0x3d5274}of _0x4ac0bd)_0xae6bf5['getUser'](_0x3d5274)||_0x10a67f[_0xbe9c('0x26')](_0x3d5274);if(0x0===_0x10a67f[_0xbe9c('0x1b')])return;const _0x473bef=await _0x2bd617[_0xbe9c('0x1a')](_0x563735,Array[_0xbe9c('0xc')](_0x10a67f));for(const _0x1cff00 of _0x473bef)_0xae6bf5[_0xbe9c('0x6')](_0x1cff00['id'])||_0xae6bf5['addUser'](_0x1cff00);}}function B(_0x21a352){if(st(_0x21a352))return new Promise(()=>{});throw _0x21a352;}function st(_0x40851c){return _0x40851c['message'][_0xbe9c('0x10')](_0xbe9c('0x3'))||_0x40851c[_0xbe9c('0xb')][_0xbe9c('0x10')](_0xbe9c('0x18'));}g[_0xbe9c('0x15')]=_0x2817b3;
@@ -1,10 +1,14 @@
1
+ /**
2
+ * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
+ */
1
5
  /**
2
6
  * @module real-time-collaboration/realtimecollaborativetrackchanges
3
7
  * @publicApi
4
8
  */
5
- import { Plugin } from 'ckeditor5/src/core.js';
6
- import CloudServicesTrackChangesAdapter from './realtimecollaborativetrackchanges/cloudservicestrackchangesadapter.js';
7
- import RealTimeCollaborativeComments from './realtimecollaborativecomments.js';
9
+ import { Plugin } from 'ckeditor5/src/core';
10
+ import CloudServicesTrackChangesAdapter from './realtimecollaborativetrackchanges/cloudservicestrackchangesadapter';
11
+ import RealTimeCollaborativeComments from './realtimecollaborativecomments';
8
12
  /**
9
13
  * Enables the real-time collaborative track changes feature.
10
14
  *
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright (c) 2016 - 2023, CKSource Holding sp. z o.o. All rights reserved.
2
+ * Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
3
3
  *
4
4
  *
5
5
  *
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- var _0x4afa=['TrackChanges','pluginName','RealTimeCollaborativeTrackChanges'];(function(_0x430be3,_0x4afaac){var _0xe49083=function(_0x4e7b47){while(--_0x4e7b47){_0x430be3['push'](_0x430be3['shift']());}};_0xe49083(++_0x4afaac);}(_0x4afa,0x75));var _0xe490=function(_0x430be3,_0x4afaac){_0x430be3=_0x430be3-0x0;var _0xe49083=_0x4afa[_0x430be3];return _0xe49083;};import{Plugin as _0x24017c}from'ckeditor5/src/core.js';import _0x3ac20b from'./realtimecollaborativetrackchanges/cloudservicestrackchangesadapter.js';import _0x304cac from'./realtimecollaborativecomments.js';export default class p extends _0x24017c{static get['requires'](){return[_0x304cac,_0x3ac20b,_0xe490('0x0')];}static get[_0xe490('0x1')](){return _0xe490('0x2');}}
23
+ var _0x1e64=['TrackChanges','RealTimeCollaborativeTrackChanges','pluginName','requires'];(function(_0x5aa36f,_0x1e64b6){var _0x2e1277=function(_0xbe7cc8){while(--_0xbe7cc8){_0x5aa36f['push'](_0x5aa36f['shift']());}};_0x2e1277(++_0x1e64b6);}(_0x1e64,0x1e1));var _0x2e12=function(_0x5aa36f,_0x1e64b6){_0x5aa36f=_0x5aa36f-0x0;var _0x2e1277=_0x1e64[_0x5aa36f];return _0x2e1277;};import{Plugin as _0x321947}from'ckeditor5/src/core';import _0x189094 from'./realtimecollaborativetrackchanges/cloudservicestrackchangesadapter';import _0x1b0470 from'./realtimecollaborativecomments';export default class p extends _0x321947{static get[_0x2e12('0x2')](){return[_0x1b0470,_0x189094,_0x2e12('0x3')];}static get[_0x2e12('0x1')](){return _0x2e12('0x0');}}