@ckeditor/ckeditor5-real-time-collaboration 43.1.0-alpha.4 → 43.1.0-alpha.6

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 (115) hide show
  1. package/build/real-time-collaboration.js +1 -1
  2. package/dist/index.js +6 -6
  3. package/dist/translations/ar.js +1 -1
  4. package/dist/translations/ar.umd.js +1 -1
  5. package/dist/translations/bg.js +1 -1
  6. package/dist/translations/bg.umd.js +1 -1
  7. package/dist/translations/bn.js +1 -1
  8. package/dist/translations/bn.umd.js +1 -1
  9. package/dist/translations/ca.js +1 -1
  10. package/dist/translations/ca.umd.js +1 -1
  11. package/dist/translations/cs.js +1 -1
  12. package/dist/translations/cs.umd.js +1 -1
  13. package/dist/translations/da.js +1 -1
  14. package/dist/translations/da.umd.js +1 -1
  15. package/dist/translations/de-ch.js +1 -1
  16. package/dist/translations/de-ch.umd.js +1 -1
  17. package/dist/translations/de.js +1 -1
  18. package/dist/translations/de.umd.js +1 -1
  19. package/dist/translations/el.js +1 -1
  20. package/dist/translations/el.umd.js +1 -1
  21. package/dist/translations/en-au.js +1 -1
  22. package/dist/translations/en-au.umd.js +1 -1
  23. package/dist/translations/en.umd.js +1 -1
  24. package/dist/translations/es.js +1 -1
  25. package/dist/translations/es.umd.js +1 -1
  26. package/dist/translations/et.js +1 -1
  27. package/dist/translations/et.umd.js +1 -1
  28. package/dist/translations/fa.js +1 -1
  29. package/dist/translations/fa.umd.js +1 -1
  30. package/dist/translations/fi.js +1 -1
  31. package/dist/translations/fi.umd.js +1 -1
  32. package/dist/translations/fr.js +1 -1
  33. package/dist/translations/fr.umd.js +1 -1
  34. package/dist/translations/gl.js +1 -1
  35. package/dist/translations/gl.umd.js +1 -1
  36. package/dist/translations/he.js +1 -1
  37. package/dist/translations/he.umd.js +1 -1
  38. package/dist/translations/hi.js +1 -1
  39. package/dist/translations/hi.umd.js +1 -1
  40. package/dist/translations/hr.js +1 -1
  41. package/dist/translations/hr.umd.js +1 -1
  42. package/dist/translations/hu.js +1 -1
  43. package/dist/translations/hu.umd.js +1 -1
  44. package/dist/translations/id.js +1 -1
  45. package/dist/translations/id.umd.js +1 -1
  46. package/dist/translations/it.js +1 -1
  47. package/dist/translations/it.umd.js +1 -1
  48. package/dist/translations/ja.js +1 -1
  49. package/dist/translations/ja.umd.js +1 -1
  50. package/dist/translations/ko.js +1 -1
  51. package/dist/translations/ko.umd.js +1 -1
  52. package/dist/translations/lt.js +1 -1
  53. package/dist/translations/lt.umd.js +1 -1
  54. package/dist/translations/lv.js +1 -1
  55. package/dist/translations/lv.umd.js +1 -1
  56. package/dist/translations/ms.js +1 -1
  57. package/dist/translations/ms.umd.js +1 -1
  58. package/dist/translations/nl.js +1 -1
  59. package/dist/translations/nl.umd.js +1 -1
  60. package/dist/translations/no.js +1 -1
  61. package/dist/translations/no.umd.js +1 -1
  62. package/dist/translations/pl.js +1 -1
  63. package/dist/translations/pl.umd.js +1 -1
  64. package/dist/translations/pt-br.js +1 -1
  65. package/dist/translations/pt-br.umd.js +1 -1
  66. package/dist/translations/pt.js +1 -1
  67. package/dist/translations/pt.umd.js +1 -1
  68. package/dist/translations/ro.js +1 -1
  69. package/dist/translations/ro.umd.js +1 -1
  70. package/dist/translations/ru.js +1 -1
  71. package/dist/translations/ru.umd.js +1 -1
  72. package/dist/translations/sk.js +1 -1
  73. package/dist/translations/sk.umd.js +1 -1
  74. package/dist/translations/sr-latn.js +1 -1
  75. package/dist/translations/sr-latn.umd.js +1 -1
  76. package/dist/translations/sr.js +1 -1
  77. package/dist/translations/sr.umd.js +1 -1
  78. package/dist/translations/sv.js +1 -1
  79. package/dist/translations/sv.umd.js +1 -1
  80. package/dist/translations/th.js +1 -1
  81. package/dist/translations/th.umd.js +1 -1
  82. package/dist/translations/tk.js +1 -1
  83. package/dist/translations/tk.umd.js +1 -1
  84. package/dist/translations/tr.js +1 -1
  85. package/dist/translations/tr.umd.js +1 -1
  86. package/dist/translations/uk.js +1 -1
  87. package/dist/translations/uk.umd.js +1 -1
  88. package/dist/translations/vi.js +1 -1
  89. package/dist/translations/vi.umd.js +1 -1
  90. package/dist/translations/zh-cn.js +1 -1
  91. package/dist/translations/zh-cn.umd.js +1 -1
  92. package/dist/translations/zh.js +1 -1
  93. package/dist/translations/zh.umd.js +1 -1
  94. package/package.json +9 -9
  95. package/src/common-translations.js +1 -1
  96. package/src/index.js +1 -1
  97. package/src/presencelist/presencelistui.js +1 -1
  98. package/src/presencelist/view/presencecounterview.js +1 -1
  99. package/src/presencelist/view/presencedropdownlistitemview.js +1 -1
  100. package/src/presencelist/view/presencedropdownlistview.js +1 -1
  101. package/src/presencelist/view/presenceinlinelistitemview.js +1 -1
  102. package/src/presencelist/view/presenceinlinelistview.js +1 -1
  103. package/src/presencelist/view/presencelistview.js +1 -1
  104. package/src/presencelist.js +1 -1
  105. package/src/realtimecollaborativecomments/cloudservicescommentsadapter.js +1 -1
  106. package/src/realtimecollaborativecomments.js +1 -1
  107. package/src/realtimecollaborativeediting/realtimecollaborationclient.js +1 -1
  108. package/src/realtimecollaborativeediting/sessions.js +1 -1
  109. package/src/realtimecollaborativeediting/usermarkers.js +1 -1
  110. package/src/realtimecollaborativeediting/websocketgateway.js +1 -1
  111. package/src/realtimecollaborativeediting.js +1 -1
  112. package/src/realtimecollaborativerevisionhistory/cloudservicesrevisionhistoryadapter.js +1 -1
  113. package/src/realtimecollaborativerevisionhistory.js +1 -1
  114. package/src/realtimecollaborativetrackchanges/cloudservicestrackchangesadapter.js +1 -1
  115. package/src/realtimecollaborativetrackchanges.js +1 -1
package/dist/index.js CHANGED
@@ -20,9 +20,9 @@
20
20
  *
21
21
  *
22
22
  */
23
- import{ContextPlugin as _0x4da67b,Plugin as _0x447feb,PendingActions as _0x3a8740,Context as _0x58c730}from'@ckeditor/ckeditor5-core/dist/index.js';import{DomEmitterMixin as _0x469dda,CKEditorError as _0x32a172,Collection as _0x3d8231,global as _0x5c2f10,version as nt,uid as _0x2efd84,KeystrokeHandler as _0x289003}from'@ckeditor/ckeditor5-utils/dist/index.js';import{Notification as _0x5c50b4,View as _0x492637,ListView as _0x29505a,ListItemView as et,LabelView as ot,BalloonPanelView as _0x34ab26,clickOutsideHandler as _0xe2b371,BodyCollection as _0x56bcda}from'@ckeditor/ckeditor5-ui/dist/index.js';import{LiveRange as at,History as _0x227ed0,NoOperation as _0x11f525,InsertOperation as _0x1017dd,MarkerOperation as _0x5cb22a,RootAttributeOperation as _0x49bfd9,transformSets as _0xa91ba8,OperationFactory as _0x319f1b}from'@ckeditor/ckeditor5-engine/dist/index.js';import{WebSocketGateway as ht,WEB_SOCKET_GATEWAY_STATES as _0x21eb19,CollaborativeEditingService as _0x39a984,User as dt,CommentsService as _0x4b45f5,TrackChangesService as st,RevisionHistoryService as _0x42f4d4,EditorService as _0x57fffd}from'@ckeditor/ckeditor-cloud-services-collaboration/dist/index.js';import{Users as _0x333c9d,UserView as rt}from'ckeditor5-collaboration/dist/index.js';import{Compressor as _0x14d01b}from'@ckeditor/ckeditor5-operations-compressor/dist/index.js';import{isElement as _0x43594e}from'lodash-es';class c extends _0x4da67b{static ['WebSocketGateway']=/* #__PURE__ -- @preserve */
24
- ((()=>ht)());static ['initialReconnectionInterval']=0x3e8;['connection'];['_reconnectionStack'];['_shouldPluginsReconnect'];['_domEmitter'];static get['requires'](){return['CloudServices',_0x5c50b4];}static get['pluginName'](){return'WebSocketGateway';}constructor(_0x474f8c){super(_0x474f8c),this['set']('state',_0x21eb19['CONNECTED']),this['set']('_isBrowserOffline',!0x1),this['_reconnectionStack']=new Set(),this['_shouldPluginsReconnect']=!0x1,this['_domEmitter']=Object['create'](_0x469dda);}['init'](){const _0x5e86a9=this['context'],_0x358710=_0x5e86a9['plugins']['get']('CloudServices'),_0x442bf0=_0x5e86a9['plugins']['get'](_0x5c50b4);if(!_0x358710['token'])throw new _0x32a172('websocketgateway-missing-token',this);if(!_0x358710['webSocketUrl'])throw new _0x32a172('websocketgateway-missing-websocket-url',this);return this['_domEmitter']['listenTo'](window,'offline',()=>this['_isBrowserOffline']=!0x0),this['_domEmitter']['listenTo'](window,'online',()=>this['_isBrowserOffline']=!0x1),this['context']['config']['define']('cloudServices.connectionTimeout',0xa),this['context']['config']['define']('cloudServices.requestTimeout',0x14),c['WebSocketGateway']['connect'](_0x358710['token'],_0x358710['webSocketUrl'],{'timeout':0x3e8*this['context']['config']['get']('cloudServices.connectionTimeout'),'requestTimeout':0x3e8*this['context']['config']['get']('cloudServices.requestTimeout')})['then'](_0x18d49b=>{if(this['connection']=_0x18d49b,this['bind']('state')['to'](_0x18d49b,'state',this,'_isBrowserOffline',(_0x3d4f0f,_0x4638b7)=>('connected'!==_0x3d4f0f&&(this['_shouldPluginsReconnect']=!0x0),_0x4638b7||_0x3d4f0f!==_0x21eb19['CONNECTED']?_0x21eb19['DISCONNECTED']:this['state']==_0x21eb19['DISCONNECTED']&&this['_shouldPluginsReconnect']?(this['_shouldPluginsReconnect']=!0x1,this['_reconnect'](),_0x21eb19['CONNECTING']):_0x21eb19['CONNECTED'])),this['connection']['on']('error',(_0x246bc3,_0x1b2670)=>{if('limitExceeded'!==_0x1b2670['code'])throw console['error'](_0x1b2670),new _0x32a172('cloudservices-init',null,{'originalError':_0x1b2670});_0x442bf0['showWarning']('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':'Connected\x20users\x20limit\x20exceeded','namespace':'real-time-collaboration'});}),!_0x18d49b['me'])return new Promise(_0x53ad44=>_0x18d49b['on']('change:me',_0x53ad44));})['catch'](_0x2d3663=>{throw console['error'](_0x2d3663),new _0x32a172('cloudservices-init',null,{'originalError':_0x2d3663});});}['addToReconnectionStack'](_0x1bf656){if('function'!=typeof _0x1bf656['reconnect'])throw new _0x32a172('websocketgateway-invalid-plugin-interface',this);if(this['isInReconnectionStack'](_0x1bf656))throw new _0x32a172('websocketgateway-plugin-already-registered',this,{'name':_0x1bf656['constructor']['pluginName']});this['_reconnectionStack']['add'](_0x1bf656);}['removeFromReconnectionStack'](_0x27ba5c){this['_reconnectionStack']['delete'](_0x27ba5c);}['isInReconnectionStack'](_0x236807){return this['_reconnectionStack']['has'](_0x236807);}['_reconnect'](){return this['connection']['reconnect']()['then'](()=>Promise['all'](Array['from'](this['_reconnectionStack'],_0x42693e=>_0x42693e['reconnect']())))['then'](()=>this['state']=_0x21eb19['CONNECTED'])['catch'](_0x4539a8=>{throw console['error'](_0x4539a8),new _0x32a172('cloudservices-reconnection-error',this['context']);});}['destroy'](){this['connection']&&this['connection']['disconnect'](),this['state']=_0x21eb19['DISCONNECTED'],this['_domEmitter']['stopListening'](),super['destroy']();}}class r extends _0x4da67b{['channelSessions'];['channelConnectedUsers'];['allConnectedUsers'];['_registeredSessions'];['_uniqueUsersCount'];['_users'];static get['pluginName'](){return'Sessions';}static get['requires'](){return[c,_0x333c9d];}constructor(_0x1f4ef6){super(_0x1f4ef6),this['channelSessions']=new Map(),this['channelConnectedUsers']=new Map(),this['allConnectedUsers']=new _0x3d8231(),this['_registeredSessions']=new Map(),this['_uniqueUsersCount']=0x0,this['_users']=this['context']['plugins']['get'](_0x333c9d);}['init'](){const _0x137cb5=this['context']['plugins']['get'](c);this['listenTo'](_0x137cb5,'change:state',(_0x9128bd,_0xb5442a,_0x3859ce)=>{if('connected'!==_0x3859ce)this['channelSessions']['forEach'](_0x1ca435=>_0x1ca435['clear']()),this['channelConnectedUsers']['forEach'](_0x45edf2=>_0x45edf2['clear']()),this['allConnectedUsers']['clear']();else{for(const [_0x2415cc,_0x397cb6]of this['_registeredSessions'])for(const _0x5d017a of _0x397cb6)this['_handleSessionAdd'](_0x2415cc,_0x5d017a);}}),this['_createUser'](_0x137cb5['connection']['me'],!0x0);}['register'](_0x549c10,_0x1c3c4b){if(this['_registeredSessions']['has'](_0x549c10))throw new _0x32a172('sessions-register-already-registered',null,{'channelId':_0x549c10});this['_registeredSessions']['set'](_0x549c10,_0x1c3c4b),this['channelSessions']['set'](_0x549c10,new _0x3d8231()),this['channelConnectedUsers']['set'](_0x549c10,new _0x3d8231()),this['listenTo'](_0x1c3c4b,'add',(_0x4aee5b,_0x4d333e)=>this['_handleSessionAdd'](_0x549c10,_0x4d333e)),this['listenTo'](_0x1c3c4b,'remove',(_0x10ddaa,_0x5b50a7)=>this['_handleSessionRemove'](_0x549c10,_0x5b50a7));for(const _0x186efc of _0x1c3c4b)this['_handleSessionAdd'](_0x549c10,_0x186efc);}['unregister'](_0x5c66fd){if(!this['_registeredSessions']['has'](_0x5c66fd))throw new _0x32a172('sessions-unregister-not-exist',null,{'channelId':_0x5c66fd});const _0xbed3c6=this['_registeredSessions']['get'](_0x5c66fd);this['stopListening'](_0xbed3c6);for(const _0x4429b9 of _0xbed3c6)'connected'===this['context']['plugins']['get'](c)['state']&&this['_handleSessionRemove'](_0x5c66fd,_0x4429b9);this['_registeredSessions']['delete'](_0x5c66fd),this['channelSessions']['delete'](_0x5c66fd),this['channelConnectedUsers']['delete'](_0x5c66fd);}get['mySessionId'](){return this['context']['plugins']['get'](c)['connection']['sessionId'];}['getUserBySessionId'](_0x17ea34){for(const _0x13aa20 of this['channelSessions']['values']())for(const _0x1a3585 of _0x13aa20)if(_0x1a3585['id']===_0x17ea34)return _0x1a3585['user'];}['getUserSessions'](_0x2b57c7,_0x29feda){const _0x304de3=_0x29feda?[this['channelSessions']['get'](_0x29feda)]:this['channelSessions']['values'](),_0x1b8cde=new Set();for(const _0x4b1ce1 of _0x304de3)for(const _0x3aea20 of _0x4b1ce1)_0x3aea20['user']['id']===_0x2b57c7['id']&&_0x1b8cde['add'](_0x3aea20['id']);return _0x1b8cde;}['getUserRole'](_0x119318){for(const _0x4880d7 of this['channelSessions']['values']())for(const _0x302fb7 of _0x4880d7)if(_0x302fb7['user']===_0x119318)return _0x302fb7['role'];}['_handleSessionAdd'](_0x3eb90a,_0x59b424){if('connected'!==this['context']['plugins']['get'](c)['state'])return;const _0x16137e=_0x59b424['user'],_0x1a4d2a=this['_users']['getUser'](_0x16137e['id'])||this['_createUser'](_0x16137e),_0x4ea138=Object['assign']({},_0x59b424,{'user':_0x1a4d2a});this['channelSessions']['get'](_0x3eb90a)['add'](_0x4ea138);const _0x242dc5=this['channelConnectedUsers']['get'](_0x3eb90a);_0x242dc5['has'](_0x1a4d2a['id'])||_0x242dc5['add'](_0x1a4d2a),this['allConnectedUsers']['has'](_0x1a4d2a['id'])||this['allConnectedUsers']['add'](_0x1a4d2a,_0x1a4d2a['isMe']?0x0:void 0x0),this['fire']('sessionAdd:'+_0x3eb90a,{'channelId':_0x3eb90a,'session':_0x4ea138});}['_handleSessionRemove'](_0x141d88,_0x4c013f){if('connected'!==this['context']['plugins']['get'](c)['state'])return;const _0xf66d96=this['channelConnectedUsers']['get'](_0x141d88),_0x3e00b0=_0x4c013f['user'];_0x3e00b0['id']&&(this['channelSessions']['get'](_0x141d88)['remove'](_0x4c013f['id']),_0xf66d96['has'](_0x3e00b0['id'])&&!this['getUserSessions'](_0x3e00b0,_0x141d88)['size']&&_0xf66d96['remove'](_0x3e00b0['id']),this['allConnectedUsers']['get'](_0x3e00b0['id'])&&!this['getUserSessions'](_0x3e00b0)['size']&&this['allConnectedUsers']['remove'](_0x3e00b0['id']));}['_createUser'](_0x3fa143,_0x2adfe2){const _0x23e0fd=this['_users']['addUser'](_0x3fa143);return _0x2adfe2&&this['_users']['defineMe'](_0x3fa143['id']),_0x23e0fd['orderNumber']=this['_uniqueUsersCount']++,_0x23e0fd;}}class K extends _0x447feb{['_domEmitter']=new(_0x469dda())();static get['requires'](){return[r];}static get['pluginName'](){return'UserMarkers';}['init'](){const _0x4d7263=this['editor'],_0x557c7a=_0x4d7263['plugins']['get'](r);_0x4d7263['conversion']['for']('editingDowncast')['markerToElement']({'model':'user:position','view':(_0x22fb2c,{writer:_0x27abe3})=>function(_0x447a7b,_0x4f7603,_0xe3d299,_0x59e33b){const _0x523e30=_0x447a7b['markerName']['split'](':')[0x2],_0x246069=_0xe3d299['getUserBySessionId'](_0x523e30);if(!_0x246069||_0x523e30===_0xe3d299['mySessionId'])return;if(!_0x59e33b['model']['schema']['checkChild'](_0x447a7b['markerRange']['start'],'$text'))return;const _0x2ea1f9={'class':'ck-user__marker\x20'+_0x246069['color']['getMarkerClass'](),'data-name':_0x246069['name'],'data-session-id':_0x523e30},_0x3efb5f=_0x59e33b['model']['markers']['get'](_0x447a7b['markerName']),_0x219cf8=_0x3efb5f['getStart'](),_0x441f8=_0x219cf8['nodeAfter'],_0xec13d2=_0x59e33b['model']['schema'];if(_0x441f8&&_0xec13d2['isObject'](_0x441f8)&&_0xec13d2['isInline'](_0x441f8)&&!_0x59e33b['model']['markers']['get']('user:range:'+_0x523e30)['getRange']()['isCollapsed'])return;const _0xea1802=_0x219cf8['parent'];return _0x59e33b['model']['schema']['isLimit'](_0xea1802)&&!_0x59e33b['model']['hasContent'](_0xea1802)&&(_0x2ea1f9['contenteditable']=!0x1),function(_0x3efdb8,_0x2c114e,_0x190ab5){const _0x45acec=_0x3efdb8['createUIElement']('span',_0x2c114e);return _0x3efdb8['setCustomProperty']('userPositionMarker',!0x0,_0x45acec),_0x45acec['render']=function(_0x29e1d3){const _0x5e49dc=this['toDomElement'](_0x29e1d3);return _0x5e49dc['innerHTML']='⁠<span\x20class=\x22ck-user__marker-line\x22\x20contenteditable=\x22false\x22><span\x20class=\x22ck-user__marker-dot\x22></span></span><span\x20class=\x22ck-user__marker-tooltip\x22\x20contenteditable=\x22false\x22\x20spellcheck=\x22false\x22>'+_0x190ab5['name']+'</span>⁠',_0x5e49dc['addEventListener']('mouseenter',()=>{_0x5e49dc['classList']['add']('ck-user__marker_hovered');}),_0x5e49dc['addEventListener']('mouseleave',()=>{_0x5e49dc['classList']['remove']('ck-user__marker_hovered');}),_0x5e49dc;},_0x45acec['isSimilar']=function(_0x58b9f8){return!(!this['getCustomProperty']('userPositionMarker')||!_0x58b9f8['getCustomProperty']('userPositionMarker')||this['getAttribute']('data-session-id')!=_0x58b9f8['getAttribute']('data-session-id'));},_0x45acec;}(_0x4f7603,_0x2ea1f9,_0x246069);}(_0x22fb2c,_0x27abe3,_0x557c7a,_0x4d7263)}),_0x4d7263['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'user:range','view':_0x14a6a6=>function(_0x2caf75,_0x34f662){const _0x45495c=_0x2caf75['markerName']['split'](':')[0x2];if(_0x45495c===_0x34f662['mySessionId'])return null;const _0x32a13b=_0x34f662['getUserBySessionId'](_0x45495c);if(!_0x32a13b)return{'id':_0x45495c,'classes':[]};return{'id':_0x45495c,'classes':['ck-user__selection',_0x32a13b['color']['getSelectionClass']()],'attributes':{'data-session-id':_0x45495c},'priority':0x7d0+_0x32a13b['orderNumber']};}(_0x14a6a6,_0x557c7a)}),function(_0x3a7f0f){const _0x3a2465=_0x3a7f0f['model'],_0x4176dc=new Map(),_0x3c5728=_0x3a7f0f['plugins']['get'](r);_0x3a2465['markers']['on']('update:user:range',(_0x265842,_0x1fc704,_0x1835f8,_0x25c48d)=>{if(!_0x25c48d&&_0x4176dc['get'](_0x1fc704['name']))return _0x4176dc['get'](_0x1fc704['name'])['detach'](),void _0x4176dc['delete'](_0x1fc704['name']);const _0x244289=_0x1fc704['name']['split'](':')[0x2];if(_0x244289===_0x3c5728['mySessionId'])return;const _0x33106f='user:position:'+_0x244289;_0x3a2465['markers']['has'](_0x33106f)&&_0x3a7f0f['editing']['reconvertMarker'](_0x33106f),_0x1fc704['on']('change:range',(_0x294715,_0xa5b21b,_0x5aa965)=>{if('$graveyard'!=_0xa5b21b['root']['rootName']&&'$graveyard'==_0x1fc704['getRange']()['root']['rootName']&&!_0x4176dc['has'](_0x1fc704['name'])){const _0x33e2de=_0x3a2465['schema']['getNearestSelectionRange'](_0x5aa965['deletionPosition']);if(_0x33e2de){const _0x1c867b=at['fromRange'](_0x33e2de);_0x4176dc['set'](_0x1fc704['name'],_0x1c867b),_0x1c867b['on']('change:range',(_0x6b3ebb,_0x1c457b,_0x4ca70f)=>{if('$graveyard'==_0x1c867b['root']['rootName']){const _0x443a9a=_0x3a2465['schema']['getNearestSelectionRange'](_0x4ca70f['deletionPosition']);_0x443a9a?(_0x1c867b['start']=_0x443a9a['start'],_0x1c867b['end']=_0x443a9a['end']):(_0x4176dc['delete'](_0x1fc704['name']),_0x1c867b['detach']());}});}}});}),_0x3a2465['document']['on']('change',()=>{_0x4176dc['size']>0x0&&_0x3a2465['enqueueChange']({'isUndoable':!0x1},_0x3eeaad=>{for(const [_0x2179d7,_0x148649]of _0x4176dc)'$graveyard'==_0x3a2465['markers']['get'](_0x2179d7)['getRange']()['root']['rootName']&&(te(_0x2179d7['split'](':')[0x2],_0x148649['toRange'](),_0x3a2465,_0x3eeaad),_0x148649['detach']());_0x4176dc['clear']();});});}(_0x4d7263),this['_domEmitter']['listenTo'](_0x5c2f10['document'],'keydown',(_0x1d54c4,{key:_0x7c6920})=>{'Escape'===_0x7c6920&&function(_0x546672){_0x546672['editing']['view']['change'](_0x2d948a=>{for(const _0x27eb42 of _0x546672['model']['markers']){if(!_0x27eb42['name']['startsWith']('user:position'))continue;const _0x22f8ce=_0x546672['editing']['mapper']['markerNameToElements'](_0x27eb42['name']);if(_0x22f8ce){for(const _0x287cad of _0x22f8ce)_0x2d948a['removeClass']('ck-user__marker_hovered',_0x287cad);}}});}(_0x4d7263);},{'useCapture':!0x0});}['afterInit'](){const _0x5c0841=this['editor'],_0x9611d1=_0x5c0841['commands']['get']('undo');_0x9611d1&&_0x5c0841['model']['on']('applyOperation',(_0x416732,_0x54a376)=>{const _0x2c7eea=_0x54a376[0x0];if('marker'!=_0x2c7eea['type']||!_0x2c7eea['name']['startsWith']('user:'))return;const _0x31dcff=_0x2c7eea['batch'];_0x9611d1['_createdBatches']['has'](_0x31dcff)&&(_0x2c7eea['newRange']=_0x2c7eea['oldRange']?_0x5c0841['model']['createRange'](_0x2c7eea['oldRange']['start'],_0x2c7eea['oldRange']['end']):null);},{'priority':'highest'});}['destroy'](){return this['_domEmitter']['stopListening'](),super['destroy']();}['createUserMarkerOperations'](){const _0x41862f=this['editor'],_0x2eee70=_0x41862f['model']['document'],_0x3b38fc=_0x41862f['plugins']['get'](r);_0x41862f['model']['enqueueChange']({'isUndoable':!0x1},_0x10324e=>{const _0x129a3a='user:range:'+_0x3b38fc['mySessionId'],_0x27e7e2='user:position:'+_0x3b38fc['mySessionId'],_0x42cb85=_0x41862f['model']['markers']['has'](_0x129a3a);_0x41862f['editing']['view']['hasDomSelection']?te(_0x3b38fc['mySessionId'],_0x2eee70['selection']['getFirstRange'](),_0x41862f['model'],_0x10324e):_0x42cb85&&(_0x10324e['removeMarker'](_0x129a3a),_0x10324e['removeMarker'](_0x27e7e2));});}}function te(_0x53b8fa,_0x3a0d02,_0x2f4145,_0x3ae79f){const _0x412e5c='user:range:'+_0x53b8fa,_0x2667e6='user:position:'+_0x53b8fa,_0x490108=_0x3a0d02['getContainedElement']();let _0x3394eb=_0x3a0d02['start'];_0x490108&&_0x490108['is']('element','tableCell')&&(_0x3394eb=function(_0x5ed382,_0x436a62){for(const _0x2fa2b8 of _0x5ed382['getPositions']())if(_0x436a62['schema']['checkChild'](_0x2fa2b8,'$text'))return _0x2fa2b8;}(_0x3a0d02,_0x2f4145),_0x3a0d02=_0x3ae79f['createRange'](_0x3394eb));const _0x2c4deb=_0x3ae79f['createRange'](_0x3394eb);_0x2f4145['markers']['has'](_0x412e5c)?(_0x3ae79f['updateMarker'](_0x412e5c,{'range':_0x3a0d02}),_0x3ae79f['updateMarker'](_0x2667e6,{'range':_0x2c4deb})):(_0x3ae79f['addMarker'](_0x412e5c,{'range':_0x3a0d02,'usingOperation':!0x0}),_0x3ae79f['addMarker'](_0x2667e6,{'range':_0x2c4deb,'usingOperation':!0x0}));}function J(_0x5ed9a0,_0x4d29bb,_0x3a91ba){const t=_0x5ed9a0['t'];switch(_0x4d29bb){case'PENDING_ACTION_SENDING_DATA':return t({'string':'Sending\x20data\x20to\x20the\x20server.','id':'PENDING_ACTION_SENDING_DATA'});case'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.':return 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.');case'The\x20document\x20cannot\x20be\x20connected\x20back\x20to\x20the\x20server.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.':return t('The\x20document\x20cannot\x20be\x20connected\x20back\x20to\x20the\x20server.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.');case'The\x20document\x20details\x20could\x20not\x20be\x20taken\x20during\x20the\x20reconnection.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.':return t('The\x20document\x20details\x20could\x20not\x20be\x20taken\x20during\x20the\x20reconnection.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.');case'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.':return 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.');case'Synchronization\x20issue':return t('Synchronization\x20issue');case'Connected\x20users\x20list\x20dropdown\x20menu':return t('Connected\x20users\x20list\x20dropdown\x20menu');case'Collapsed\x20connected\x20users\x20list\x20(press\x20ENTER\x20to\x20open\x20it)':return t('Collapsed\x20connected\x20users\x20list\x20(press\x20ENTER\x20to\x20open\x20it)');case'Connected\x20users\x20list':return t('Connected\x20users\x20list');case'PENDING_ACTION_REVISION_HISTORY':return t({'string':'Unsaved\x20change\x20in\x20revision\x20history.','id':'PENDING_ACTION_REVISION_HISTORY'});case'CONNECTED_USERS':return t({'string':'1\x20connected\x20user\x20(me)','plural':'%0\x20connected\x20users','id':'CONNECTED_USERS'},_0x3a91ba);default:return'';}}let Y=0x1;class l extends _0x447feb{static ['CollaborativeEditingService']=/* #__PURE__ -- @preserve */
25
- ((()=>_0x39a984)());['_offset'];['sessionId'];['serverHistory'];['_channelId'];['_service'];['_document'];['_compressor'];['_bufferedOperations'];['_knownOperations'];['_knownRootNames'];['_pendingAction'];['_hasSelectionChanged'];['_sendBufferedOperationsDelayId'];['_baseBufferDelay'];['_currentBufferDelay'];['_lastSyncedOperationId'];['_disconnectionOperations'];['_operationIdentifier'];static get['requires'](){return[c,r,K,_0x3a8740,_0x333c9d,_0x5c50b4];}static get['pluginName'](){return'RealTimeCollaborationClient';}get['cloudDocumentVersion'](){return this['_lastServerVersion']+this['_offset'];}get['_lastServerVersion'](){return this['serverHistory']['version']-this['_offset'];}get['lastSyncVersion'](){const _0x22ed67=this['serverHistory']['getOperations']();for(let _0x5661b7=_0x22ed67['length']-0x1;_0x5661b7>=0x0;_0x5661b7--){const _0xe11040=_0x22ed67[_0x5661b7];if(!this['_disconnectionOperations']['has'](_0xe11040))return _0xe11040['baseVersion']+0x1-this['_offset'];}return 0x0;}constructor(_0xf8f190){if(super(_0xf8f190),this['_offset']=0x0,this['sessionId']=null,this['serverHistory']=new _0x227ed0(),this['editor']['config']['define']('collaboration',{}),this['_channelId']=this['editor']['config']['get']('collaboration.channelId'),!this['_channelId'])throw new _0x32a172('collaboration-missing-channelid',this);const _0x1752a8=_0xf8f190['config']['get']('cloudServices.bundleVersion')||nt;this['_service']=new l['CollaborativeEditingService'](_0x1752a8,this['_channelId']),this['_document']=this['editor']['model']['document'],this['_compressor']=new _0x14d01b(),this['_bufferedOperations']=[],this['_knownOperations']=new WeakSet(),this['_knownRootNames']=new Set(),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 it(this['_disconnectionOperations']);}['init'](){const _0x2c388d=this['editor'],_0x47a944=_0x2c388d['plugins']['get'](_0x333c9d),_0x134749=_0x2c388d['plugins']['get'](c);this['listenTo'](_0x47a944,'getOperationAuthor',(_0x3b6bc9,_0x4279a8)=>{const _0x3b8aae=_0x4279a8[0x0];_0x3b8aae['_authorId']&&(_0x3b6bc9['return']=_0x47a944['getUser'](_0x3b8aae['_authorId']),_0x3b6bc9['stop']()),null===_0x3b8aae['_authorId']&&(_0x3b6bc9['return']=null,_0x3b6bc9['stop']());},{'priority':'high'}),this['listenTo'](_0x2c388d['model']['document']['selection'],'change:range',(_0x164485,_0x2a0846)=>{_0x2a0846['directChange']&&this['_refreshUserSelectionMarkers']();}),this['listenTo'](_0x2c388d['editing']['view'],'change:hasDomSelection',()=>{this['_refreshUserSelectionMarkers']();}),this['_initThrowingOnDataSet'](),_0x2c388d['model']['on']('applyOperation',(_0x37ab1a,_0x4e5778)=>{const _0x34ca35=_0x4e5778[0x0];_0x34ca35['isDocumentOperation']&&(this['_saveOperationInBuffer'](_0x34ca35),this['_shouldSendUpdate']()&&this['_sendBufferedOperationsDelayed']());}),this['_setUpDataInit'](),this['bind']('_isEditingAllowed')['to'](_0x134749,'state',this,'_hasSynchronizationProblem',(_0x1cdb0a,_0xb4e16c)=>'connected'===_0x1cdb0a&&!_0xb4e16c),this['on']('change:_isEditingAllowed',()=>{this['_isEditingAllowed']?_0x2c388d['disableReadOnlyMode']('rtc-offline'):_0x2c388d['enableReadOnlyMode']('rtc-offline');}),this['_isEditingAllowed']?_0x2c388d['disableReadOnlyMode']('rtc-offline'):_0x2c388d['enableReadOnlyMode']('rtc-offline'),this['set']('_isConnected',!0x1);}async['reconnect'](){const _0x8897d=this['editor']['plugins']['get'](r),_0x192d48=this['editor']['plugins']['get'](c);try{this['_isPendingUpdate']=!0x0,_0x8897d['unregister'](this['_channelId']);const _0x527247=await this['_service']['reconnect'](_0x192d48['connection'],this['lastSyncVersion']);await this['_handleReconnectionResponse'](_0x527247)&&(this['_isPendingUpdate']=!0x1,this['_clearPendingAction']());const _0x47da86=await this['_service']['getConnectedSessions']();_0x8897d['register'](this['_channelId'],_0x47da86),this['_handleSendingSelectionMarkers'](),this['_isConnected']=!0x0;}catch(_0x37b21f){if(function(_0x37a4c4){return'404'===_0x37a4c4['code'];}(_0x37b21f)&&this['sessionId'])await this['_connectAfterSessionHasBeenFlushed']();else{if(function(_0xbc3c78){return'409'===_0xbc3c78['code'];}(_0x37b21f)){const _0x42a3df=J(this['editor']['locale'],'The\x20document\x20cannot\x20be\x20connected\x20back\x20to\x20the\x20server.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.');this['_handleReconnectionError'](_0x42a3df);}else{if(!(_0x37b21f instanceof Z))throw _0x37b21f;this['_handleReconnectionError']();}}}}['destroy'](){const _0x1c79d4=this['editor']['plugins']['get'](c),_0x3e6119=this['editor']['plugins']['get'](r);this['editor']['enableReadOnlyMode']('rtc-destroyed'),_0x3e6119['channelSessions']['has'](this['_channelId'])&&_0x3e6119['unregister'](this['_channelId']),_0x1c79d4['removeFromReconnectionStack'](this),this['_disconnectService'](),super['destroy']();}async['_handleReconnectionResponse'](_0x4b553f){if(this['sessionId']!==_0x4b553f['sessionId']&&this['_lastSyncedOperationId']!==_0x4b553f['lastOperationId'])throw new Z();return this['sessionId']=_0x4b553f['sessionId'],this['_handleServerResponse']([],{..._0x4b553f,'wereChangesApplied':!0x1,'data':_0x4b553f['data']},'reconnect');}async['_connectService'](_0x195e7e,_0x171e10=!0x1){const {connection:_0x44bcdf}=this['editor']['plugins']['get'](c);l['CollaborativeEditingService']['getConnectedSessions'](_0x44bcdf,this['_channelId'])['then'](_0xaba3b9=>this['_initSessionsHandling'](_0xaba3b9))['catch'](_0x2341e3=>{this['_crash']('realtimecollaborationclient-init-session-connection-error',_0x2341e3);}),this['listenTo'](this['_service'],'operationsReceived',this['_handleReceivedOperations']['bind'](this)),this['listenTo'](this['_service'],'error',(_0x4cff02,_0x2e650b)=>{this['_crash']('realtimecollaborationclient-initservice-internal-error',_0x2e650b);}),this['listenTo'](this['_service'],'disconnected',()=>{this['_isConnected']=!0x1;});const _0x533da4=this['_operationIdentifier']['getIdOfTheLastOperation'](_0x195e7e);this['_isPendingUpdate']=!0x0;const _0x2bee83=await this['_service']['connect'](_0x44bcdf,this['_compressOperations'](_0x195e7e),_0x533da4);if(this['sessionId']=_0x2bee83['sessionId'],_0x171e10){if(!_0x2bee83['wereChangesApplied'])return void this['_handleReconnectionError']();this['_isPendingUpdate']=!0x1,this['_clearPendingAction'](),this['serverHistory']['reset'](),this['_offset']=_0x2bee83['offset'],this['serverHistory']['version']=this['_offset'],await this['_handleServerResponse'](_0x195e7e,_0x2bee83,'reconnection:\x20flushed\x20session');}else await this['_handleInitialConnectionData'](_0x2bee83,_0x195e7e);this['_handleSendingSelectionMarkers'](),this['_isConnected']=!0x0;}['_handleSendingSelectionMarkers'](){const _0x51bcee=this['editor']['plugins']['get'](r),_0x43e5e1=this['editor']['plugins']['get'](K),_0x1de6a5=_0x51bcee['channelSessions']['get'](this['_channelId']);_0x1de6a5&&_0x1de6a5['length']>0x1?_0x43e5e1['createUserMarkerOperations']():this['listenTo'](_0x51bcee,'sessionAdd:'+this['_channelId'],()=>{0x2===_0x51bcee['channelSessions']['get'](this['_channelId'])['length']&&_0x43e5e1['createUserMarkerOperations']();});}async['_handleReceivedOperations'](_0x496a41,_0x23c90e,_0xdd40b9,_0x4bbb84){if(!this['_isPendingUpdate']&&this['_document']['version']==_0x23c90e){const _0x2f67cc=this['_decompressOperations'](_0xdd40b9,_0x4bbb84);await this['_fetchMissingUsers'](_0x2f67cc),this['_handleExternalOperations'](_0x2f67cc,_0x23c90e,_0xdd40b9['lastOperationId'])||this['_crash']('realtimecollaborationclient-initservice-incorrect-server-operation');}}async['_connectAfterSessionHasBeenFlushed'](){this['_disconnectService']();const {locale:_0x2cd8c7}=this['editor'];let _0x769296;try{_0x769296=await this['_service']['getDocumentDetails']();}catch(_0x10e52e){const _0x32b8cb=J(_0x2cd8c7,'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'](_0x32b8cb);}const _0x53eeaa=_0x769296['currentDocumentSession']||_0x769296['lastDocumentSession'];if(this['_lastSyncedOperationId']===_0x53eeaa['lastOperationId'])await this['_connectService'](this['editor']['model']['document']['history']['getOperations'](),!0x0);else{const _0x13fc51=J(_0x2cd8c7,'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'](_0x13fc51);}}['_disconnectService'](){this['_service']['disconnect'](),this['_bufferedOperations']=[],clearTimeout(this['_sendBufferedOperationsDelayId']),this['stopListening'](this['_service']);}['_initSessionsHandling'](_0xabfb7a){const _0x40bbdd=this['editor']['plugins']['get'](r);this['listenTo'](_0x40bbdd,'sessionAdd:'+this['_channelId'],(_0x2baee1,{session:_0xfecbf5})=>{if(_0xfecbf5['id']===_0x40bbdd['mySessionId']){_0x2baee1['off']();const _0x50f55a=this['editor']['plugins']['has']('CommentsOnly')&&this['editor']['plugins']['get']('CommentsOnly');let _0x6a7ba7=_0xfecbf5['permissions'];_0x50f55a&&_0x50f55a['isEnabled']&&(_0x6a7ba7=_0x6a7ba7['filter'](_0x2f2d18=>'document:write'!==_0x2f2d18)),this['editor']['plugins']['get']('Permissions')['setPermissions'](_0x6a7ba7,this['_channelId']);}}),_0x40bbdd['register'](this['_channelId'],_0xabfb7a);}['_initThrowingOnDataSet'](){const _0x2902ff=this['editor']['data']['set'];this['editor']['data']['set']=(..._0x27b167)=>{if(!_0x27b167[_0x27b167['length']-0x1]['suppressErrorInCollaboration'])throw new _0x32a172('realtimecollaborationclient-editor-setdata-and-editor-data-set-are-forbidden-in-real-time-collaboration',this);_0x2902ff['apply'](this['editor']['data'],_0x27b167);};}['_setUpDataInit'](){this['editor']['data']['on']('init',(_0x32ba41,[_0x6e4ec4])=>{if(this['_document']['version'])throw new _0x32a172('realtimecollaborationclient-init-document-already-initialized',this);_0x32ba41['stop'](),this['_setPendingAction']();const _0x25a797=this['editor']['config']['get']('rootsAttributes'),_0x3f6413=this['_getOperationsFromInitData'](_0x6e4ec4,_0x25a797);0x0==_0x3f6413['length']&&_0x3f6413['push'](new _0x11f525(0x0)),_0x32ba41['return']=this['_connectService'](_0x3f6413)['then'](()=>{this['editor']['plugins']['get'](c)['addToReconnectionStack'](this),this['editor']['data']['fire']('ready');})['catch'](_0x1fbba5=>this['_crash']('realtimecollaborationclient-init-connection-failed',_0x1fbba5))['finally'](()=>this['_clearPendingAction']());},{'priority':'high'}),this['editor']['on']('loadRoot',async(_0x1fa917,[_0x37c9e6,_0x33070c])=>{_0x1fa917['stop']();const _0x53537e=this['editor']['model']['document']['getRoot'](_0x37c9e6);if(!this['_knownRootNames']['has'](_0x37c9e6)){const _0x4c367a=_0x33070c&&_0x33070c['data']?_0x33070c['data']:'',_0x57152e=_0x33070c&&_0x33070c['attributes']?_0x33070c['attributes']:{};await this['_loadRoot'](_0x37c9e6,_0x4c367a,_0x57152e);}this['editor']['model']['enqueueChange']({'isUndoable':!0x1},()=>{_0x53537e['_isLoaded']=!0x0,this['editor']['model']['document']['differ']['_bufferRootLoad'](_0x53537e);});},{'priority':'high'});}async['_fetchMissingUsers'](_0x5bcdb9){const _0x3dd8d5=this['editor']['plugins']['get'](_0x333c9d),{connection:_0x4b6e7a}=this['editor']['plugins']['get'](c),_0x1e959c=new Set();for(const _0x3a4063 of _0x5bcdb9){const _0x30df35=_0x3a4063['_authorId'];_0x30df35&&!_0x3dd8d5['getUser'](_0x30df35)&&_0x1e959c['add'](_0x30df35);}if(0x0===_0x1e959c['size'])return;const _0x2e90a1=await dt['getMany'](_0x4b6e7a,Array['from'](_0x1e959c));for(const _0x1e62b7 of _0x2e90a1)_0x3dd8d5['getUser'](_0x1e62b7['id'])||_0x3dd8d5['addUser'](_0x1e62b7);}['_getOperationsFromInitData'](_0x42c47f,_0x430806={}){const _0x433be5=this['editor']['model'],_0x491a47=[];let _0x352a0a=0x0;const _0x203a19='string'==typeof _0x42c47f?{'main':_0x42c47f}:_0x42c47f;for(const _0x2d5314 of Object['keys'](_0x203a19)){if(!this['_document']['roots']['has'](_0x2d5314))throw new _0x32a172('realtimecollaborationclient-init-non-existent-root',this);const _0x18b263=this['editor']['data']['parse'](_0x203a19[_0x2d5314]),_0x37c9cc=this['_document']['getRoot'](_0x2d5314),_0x3bcb2a=new _0x1017dd(_0x433be5['createPositionAt'](_0x37c9cc,0x0),_0x18b263,_0x352a0a++);_0x491a47['push'](_0x3bcb2a);for(const [_0x50aa44,_0x3ebc69]of _0x18b263['markers']){const _0xda431e=_0x433be5['createRange'](_0x433be5['createPositionFromPath'](_0x37c9cc,_0x3ebc69['start']['path']['slice']()),_0x433be5['createPositionFromPath'](_0x37c9cc,_0x3ebc69['end']['path']['slice']())),_0xe5070e=new _0x5cb22a(_0x50aa44,null,_0xda431e,_0x433be5['markers'],!0x0,_0x352a0a++);_0x491a47['push'](_0xe5070e);}}if(_0x430806)for(const [_0x52bf2c,_0x87439e]of Object['entries'](_0x430806)){const _0x22ab56=_0x433be5['document']['getRoot'](_0x52bf2c);if(!_0x22ab56)throw new _0x32a172('multi-root-editor-root-attributes-no-root',null);for(const [_0xabf36e,_0xfde1af]of Object['entries'](_0x87439e))if(null!==_0xfde1af){const _0x40a7a3=new _0x49bfd9(_0x22ab56,_0xabf36e,null,_0xfde1af,_0x352a0a++);_0x491a47['push'](_0x40a7a3);}}return _0x491a47;}async['_loadRoot'](_0x5e6e85,_0x38f3cc,_0x1670bf){this['_getOperationsFromInitData']({[_0x5e6e85]:_0x38f3cc},{[_0x5e6e85]:_0x1670bf})['forEach']((_0x179dc2,_0x49f890)=>{_0x179dc2['baseVersion']=this['_document']['version']+_0x49f890,_0x179dc2['_isInit']=!0x0,this['_saveOperationInBuffer'](_0x179dc2);}),this['_sendBufferedOperationsDelayed'](),await this['_waitUntilSynced']();}async['_handleInitialConnectionData'](_0x433aa2,_0x29196e){let _0x44516b;this['_offset']=_0x433aa2['offset'];const _0x264c30=_0x433aa2['wereChangesApplied']&&!_0x433aa2['initData'],_0x336c9a=_0x264c30?0x0:_0x433aa2['data']['baseVersion'];if(_0x29196e['forEach'](_0x23c06f=>{_0x23c06f['_isInit']=!0x0,_0x23c06f['createdAt']=_0x433aa2['sessionCreatedAt'],_0x23c06f['_authorId']=null;}),_0x264c30)_0x44516b=_0x29196e,this['_applyOperationsSet'](_0x44516b,_0x264c30);else{if(_0x433aa2['initData']){const _0x523e08=this['_getOperationsFromInitData'](_0x433aa2['initData']);this['_document']['history']['version']=-_0x523e08['length'],_0x523e08['forEach'](_0x26ebca=>{_0x26ebca['baseVersion']-=_0x523e08['length'],_0x26ebca['createdAt']=_0x433aa2['sessionCreatedAt'],_0x26ebca['_isInit']=!0x0,_0x26ebca['_authorId']=null;}),this['_applyOperationsSet'](_0x523e08,!0x0),this['serverHistory']['version']=-_0x523e08['length']+this['_offset'],this['_updateServerHistory'](_0x523e08);}this['_document']['history']['version']=_0x336c9a,_0x44516b=this['_decompressOperations'](_0x433aa2['data'],_0x433aa2['metadata']),await this['_fetchMissingUsers'](_0x44516b),this['_applyOperationsSet'](_0x44516b,_0x264c30);}_0x433aa2['lastOperationId']&&(this['_operationIdentifier']['setIdForTheLastOperation'](_0x44516b,_0x433aa2['lastOperationId']),this['_lastSyncedOperationId']=_0x433aa2['lastOperationId']),this['serverHistory']['version']=_0x336c9a+this['_offset'],this['_updateServerHistory'](_0x44516b),_0x29196e['filter'](_0x5da0a1=>{const _0x43728c=this['_getAffectedRoot'](_0x5da0a1);return _0x43728c&&!this['_knownRootNames']['has'](_0x43728c);})['forEach']((_0x39a96e,_0x3e1b44)=>{_0x39a96e['baseVersion']=this['_document']['version']+_0x3e1b44,this['_saveOperationInBuffer'](_0x39a96e);}),this['_shouldSendUpdate']()?(this['_currentBufferDelay']=0x0,this['_sendBufferedOperationsDelayed'](!0x0),await this['_waitUntilSynced']()):(this['_isPendingUpdate']=!0x1,this['_clearPendingAction']());}['_crash'](_0x350d1c,_0x21b7c5){throw this['_isPendingUpdate']=!0x0,_0x21b7c5&&console['error'](_0x21b7c5),new _0x32a172(_0x350d1c,this['editor']);}['_saveOperationInBuffer'](_0xf4b69){this['_knownOperations']['has'](_0xf4b69)||(this['_knownOperations']['add'](_0xf4b69),this['_bufferedOperations']['push'](_0xf4b69),this['_pendingAction']||'marker'==_0xf4b69['type']&&!_0xf4b69['affectsData']||this['_setPendingAction']());}['_sendBufferedOperationsDelayed'](_0x4f17f0=!0x1){!_0x4f17f0&&this['_isPendingUpdate']||(this['_isPendingUpdate']=!0x0,clearTimeout(this['_sendBufferedOperationsDelayId']),this['_sendBufferedOperationsDelayId']=setTimeout(()=>{this['_sendBufferedOperations']()['then'](_0x62f3d=>{_0x62f3d&&(this['_clearPendingAction'](),this['_isPendingUpdate']=!0x1);})['catch'](_0x557b94=>{if(this['_clearPendingAction'](),this['_isPendingUpdate']=!0x1,!function(_0x370daa){return _0x370daa['message']['startsWith']('cloud-services-internal-error:\x20Not\x20connected.')||_0x370daa['message']['startsWith']('cloud-services-internal-error:\x20Collaborative\x20Editing\x20Service\x20is\x20not\x20connected.')||_0x370daa['message']['startsWith']('cloud-services-internal-error:\x20Request\x20timeout.');}(_0x557b94))throw _0x557b94;});},this['_currentBufferDelay']));}['_waitUntilSynced'](){return new Promise(_0x14d9d1=>{this['on']('change:_isPendingUpdate',()=>{_0x14d9d1();});});}async['_sendBufferedOperations'](){const _0x36ddba=this['editor']['plugins']['get'](K);if(this['_shouldSendSelectionUpdate']()&&(_0x36ddba['createUserMarkerOperations'](),this['_hasSelectionChanged']=!0x1),!this['_shouldSendUpdate']())return!0x0;const _0x3a6ec0=[...this['_bufferedOperations']];for(const _0x3d21c5 of _0x3a6ec0)_0x3d21c5['wasUndone']=this['_document']['history']['isUndoneOperation'](_0x3d21c5);const _0x212354=this['_operationIdentifier']['getIdOfTheLastOperation'](_0x3a6ec0),_0x4dc967=Y++,_0x79a400=this['_compressOperations'](_0x3a6ec0),_0x1e0523=await this['_service']['sendOperations'](_0x79a400,_0x79a400['baseVersion'],_0x212354);try{return await this['_handleServerResponse'](_0x3a6ec0,_0x1e0523,_0x4dc967);}catch(_0x36e29b){return this['_crash']('realtimecollaborationclient-sendbufferedoperations',_0x36e29b);}}async['_handleServerResponse'](_0x35ce27,_0x29bfb3,_0x34a9c6){if('error'in _0x29bfb3)throw _0x29bfb3['error'];let _0x2a34b5=!0x1;if(_0x29bfb3['wereChangesApplied']){_0x29bfb3['lastOperationId']&&(this['_lastSyncedOperationId']=_0x29bfb3['lastOperationId']),this['_bufferedOperations']=this['_bufferedOperations']['filter'](_0x219455=>!_0x35ce27['includes'](_0x219455));for(const _0x5a845c of _0x35ce27)_0x5a845c['createdAt']='lastOperationAcceptedAt'in _0x29bfb3&&_0x29bfb3['lastOperationAcceptedAt']||void 0x0;tt(_0x35ce27,_0x29bfb3['version']-_0x35ce27['length']),this['_updateServerHistory'](_0x35ce27);const _0x318f33=_0x35ce27['filter'](_0x122842=>{if(!_0x122842['_isInit'])return!0x1;const _0x5314ab=this['_getAffectedRoot'](_0x122842);return _0x5314ab&&!this['_knownRootNames']['has'](_0x5314ab);});tt(_0x318f33,this['_document']['version']),this['_applyOperationsSet'](_0x318f33),_0x2a34b5=!0x0,this['_currentBufferDelay']=this['_baseBufferDelay'];}else{const _0x4a2e53=this['_decompressOperations'](_0x29bfb3['data'],_0x29bfb3['metadata'])['filter'](_0x4e5abf=>_0x4e5abf['baseVersion']>=this['_lastServerVersion']);_0x4a2e53['forEach'](_0x1b20af=>this['_addKnownRoot'](_0x1b20af)),this['_bufferedOperations']=this['_bufferedOperations']['filter'](_0x19dfb6=>!_0x19dfb6['_isInit']||!this['_knownRootNames']['has'](this['_getAffectedRoot'](_0x19dfb6))),this['_bufferedOperations']['length']&&tt(this['_bufferedOperations'],this['_bufferedOperations'][0x0]['baseVersion']),await this['_fetchMissingUsers'](_0x4a2e53),_0x2a34b5=this['_handleExternalOperations'](_0x4a2e53,_0x29bfb3['version'],_0x29bfb3['lastOperationId']),this['_currentBufferDelay']=Math['round'](this['_currentBufferDelay']/0x2);}return _0x2a34b5?!this['_shouldSendUpdate']()||(this['_sendBufferedOperationsDelayed'](!0x0),!0x1):this['_crash']('realtimecollaborationclient-handleserverresponse');}['_handleExternalOperations'](_0x52f6b7,_0x23dc17,_0x4f9c89){try{const _0x569c72={'document':this['_document'],'useRelations':!0x1,'padWithNoOps':!0x0},{operationsA:_0x5d5348,operationsB:_0x428ad9,originalOperations:_0x2f99dc}=_0xa91ba8(_0x52f6b7,this['_bufferedOperations'],_0x569c72);tt(_0x5d5348,this['_document']['version']),tt(_0x428ad9,_0x23dc17);for(const _0x5a0a2b of _0x5d5348){const _0x4a6e03=_0x2f99dc['get'](_0x5a0a2b);_0x5a0a2b['_authorId']=_0x4a6e03?_0x4a6e03['_authorId']:null;}_0x4f9c89&&(this['_operationIdentifier']['setIdForTheLastOperation'](_0x52f6b7,_0x4f9c89),this['_lastSyncedOperationId']=_0x4f9c89),this['_bufferedOperations']=[..._0x428ad9],this['_applyOperationsSet'](_0x5d5348),this['_updateServerHistory'](_0x52f6b7);}catch(_0x587d86){return console['error'](_0x587d86),!0x1;}return!0x0;}['_applyOperationsSet'](_0x6f2a8a,_0x4747cd=!0x1){this['editor']['model']['enqueueChange']({'isUndoable':!0x1,'isLocal':!0x1},_0x1d6774=>{for(const _0xe017ad of _0x6f2a8a)this['_knownOperations']['add'](_0xe017ad),this['_addKnownRoot'](_0xe017ad),_0x1d6774['batch']['addOperation'](_0xe017ad),this['editor']['model']['applyOperation'](_0xe017ad);});}['_addKnownRoot'](_0x5d2c8e){const _0x574ff1=this['_getAffectedRoot'](_0x5d2c8e);_0x574ff1&&this['_knownRootNames']['add'](_0x574ff1);}['_getAffectedRoot'](_0x4670a3){let _0x3936f7,_0x49d45f;switch(_0x4670a3['type']){case'insert':_0x3936f7=_0x4670a3['position']['root'];break;case'marker':if(_0x49d45f=_0x4670a3['newRange'],!_0x49d45f)return null;_0x3936f7=_0x49d45f['root'];break;case'addRootAttribute':_0x3936f7=_0x4670a3['root'];break;case'addRoot':_0x3936f7=_0x4670a3['affectedSelectable'];break;case'move':_0x3936f7=_0x4670a3['targetPosition']['root'];break;default:return null;}return _0x3936f7['rootName'];}['_updateServerHistory'](_0x2bb963){_0x2bb963['forEach'](_0xa710f8=>{const _0x181218=_0xa710f8['clone']();_0x181218['_authorId']=_0xa710f8['_authorId'],_0x181218['_isInit']=!!_0xa710f8['_isInit'],_0x181218['createdAt']=_0xa710f8['createdAt'],_0x181218['baseVersion']+=this['_offset'],_0xa710f8['_isDisconnection']&&this['_disconnectionOperations']['add'](_0x181218),this['serverHistory']['addOperation'](_0x181218);});}['_handleReconnectionError'](_0x907b1a){const _0x303607=this['editor']['plugins']['get']('Notification'),_0x18e291=this['editor']['locale'];_0x907b1a||(_0x907b1a=J(_0x18e291,'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.')),_0x303607['showWarning'](_0x907b1a,{'title':J(_0x18e291,'Synchronization\x20issue'),'namespace':'real-time-collaboration'}),this['_hasSynchronizationProblem']=!0x0,clearTimeout(this['_sendBufferedOperationsDelayId']),this['_bufferedOperations']=[],this['editor']['plugins']['get'](c)['destroy']();}['_setPendingAction'](){this['_pendingAction']||(this['_pendingAction']=this['editor']['plugins']['get'](_0x3a8740)['add'](J(this['editor']['locale'],'PENDING_ACTION_SENDING_DATA')));}['_clearPendingAction'](){this['_pendingAction']&&(this['editor']['plugins']['get'](_0x3a8740)['remove'](this['_pendingAction']),this['_pendingAction']=null);}['_compressOperations'](_0x4273e9){const _0x49bdcd=_0x4273e9['map'](_0x42a391=>_0x42a391['toJSON']());return this['_compressor']['compress'](_0x49bdcd);}['_decompressOperations'](_0x149df2,_0x2a805d){return this['_compressor']['decompress'](_0x149df2)['map']((_0x1c497b,_0xb41b88)=>{const _0x1805d6='init'==_0x2a805d[_0xb41b88]['type'];if('InsertOperation'==_0x1c497b['__className']){const _0x32ae4c=_0x1c497b['position']['root'];!this['_document']['getRoot'](_0x32ae4c)&&(this['_document']['createRoot']('$root',_0x32ae4c)['_isAttached']=!0x1);}const _0x1109dc=_0x319f1b['fromJSON'](_0x1c497b,this['_document']);return _0x1109dc['wasUndone']=_0x1c497b['wasUndone'],_0x1109dc['_isInit']=_0x1805d6,_0x1109dc['_authorId']=_0x1805d6?null:_0x2a805d[_0xb41b88]['userId'],_0x1109dc['_isDisconnection']='cs:removeUser'===_0x2a805d[_0xb41b88]['type'],_0x1109dc['createdAt']=_0x2a805d[_0xb41b88]['createdAt'],_0x1109dc;});}['_refreshUserSelectionMarkers'](){this['_hasSelectionChanged']=!0x0,this['_shouldSendSelectionUpdate']()?this['_sendBufferedOperationsDelayed']():this['_hasSelectionChanged']=!0x1;}['_shouldSendSelectionUpdate'](){const _0x4ede09=this['editor']['plugins']['get'](r)['channelSessions']['get'](this['_channelId']);return!this['editor']['isReadOnly']&&!!_0x4ede09&&_0x4ede09['length']>0x1&&this['_hasSelectionChanged'];}['_shouldSendUpdate'](){return this['_bufferedOperations']['length']>0x0||this['_shouldSendSelectionUpdate']();}}class Z extends Error{}function tt(_0x15a6b5,_0x2d3fba){for(const _0x12b553 of _0x15a6b5)_0x12b553['baseVersion']=_0x2d3fba++;}class it{['_ignoredOperations'];['_operationToId'];constructor(_0x1ccc74){this['_ignoredOperations']=_0x1ccc74,this['_operationToId']=new WeakMap();}['getIdOfTheLastOperation'](_0x1dec2c){let _0x53b3fc=_0x1dec2c['length'];for(;_0x53b3fc--;){const _0x546a8e=_0x1dec2c[_0x53b3fc];if(!this['_ignoredOperations']['has'](_0x546a8e)){if(!this['_operationToId']['has'](_0x546a8e)){const _0x5e7359=_0x2efd84()['slice'](0x1,0x12);this['_operationToId']['set'](_0x546a8e,_0x5e7359);}return this['_operationToId']['get'](_0x546a8e);}}}['setIdForTheLastOperation'](_0x4ed143,_0x319da7){if(!_0x319da7)return;let _0x157be8=_0x4ed143['length'];for(;_0x157be8--;){const _0x179c35=_0x4ed143[_0x157be8];this['_ignoredOperations']['has'](_0x179c35)||this['_operationToId']['set'](_0x179c35,_0x319da7);}}}class n extends _0x447feb{static get['requires'](){return[l];}static get['pluginName'](){return'RealTimeCollaborativeEditing';}}class a extends _0x4da67b{static ['CommentsService']=/* #__PURE__ -- @preserve */
26
- ((()=>_0x4b45f5)());['_services'];static get['requires'](){return[c,'CommentsRepository',r,_0x333c9d];}static get['pluginName'](){return'CloudServicesCommentsAdapter';}constructor(_0xbbe7c4){super(_0xbbe7c4),this['_services']=new Map();}async['init'](){const _0x156eec=this['context'],_0x4fc654=_0x156eec['plugins']['get']('CommentsRepository');if(_0x156eec['plugins']['get'](c)['addToReconnectionStack'](this),_0x4fc654['adapter']={'addCommentThread':async({channelId:_0x5d12a0,threadId:_0x24e62b,comments:_0x349e86,resolvedAt:_0x17c46b,resolvedBy:_0xc8356b,context:_0x49de3b,attributes:_0x4000ad})=>{const _0x296a79=await this['_getService'](_0x5d12a0)['addCommentThread']({'commentThreadId':_0x24e62b,'comments':_0x349e86['map'](_0x1faa46=>function(_0x261006,_0x5ad066,_0xcc5772){return{'commentThreadId':_0xcc5772,'commentId':_0x261006['commentId'],'userId':_0x261006['authorId'],'content':_0x261006['content'],'documentId':_0x5ad066,'createdAt':_0x261006['createdAt'],'attributes':_0x261006['attributes']||{}};}(_0x1faa46,_0x5d12a0,_0x24e62b)),'resolvedAt':_0x17c46b,'resolvedBy':_0xc8356b,'context':_0x49de3b,'attributes':_0x4000ad})['catch'](lt);return{'threadId':_0x296a79['commentThreadId'],'comments':_0x296a79['comments']};},'getCommentThread':async({channelId:_0x325bdd,threadId:_0x1cc753})=>{const _0x5151d7=await this['_getService'](_0x325bdd)['getCommentThread'](_0x1cc753)['catch'](lt);return _0x5151d7['deletedAt']?null:(await this['_fetchMissingUsersForThreads']([_0x5151d7]),{'threadId':_0x5151d7['commentThreadId'],'comments':_0x5151d7['comments']['map'](S),'context':_0x5151d7['context'],'resolvedAt':_0x5151d7['resolvedAt'],'resolvedBy':_0x5151d7['resolvedBy'],'attributes':_0x5151d7['attributes']||{}});},'updateCommentThread':async({channelId:_0x29d3c1,threadId:_0xf8b55f,context:_0x2e8df9,unlinkedAt:_0x4d8be0,attributes:_0x4f193d})=>this['_getService'](_0x29d3c1)['updateCommentThread']({'commentThreadId':_0xf8b55f,'context':_0x2e8df9,'attributes':_0x4f193d,'unlinkedAt':_0x4d8be0})['catch'](B)['catch'](lt),'resolveCommentThread':async({channelId:_0x1be52a,threadId:_0x2fc89a})=>{const _0xbb2b4b=await this['_getService'](_0x1be52a)['resolveCommentThread'](_0x2fc89a)['catch'](B)['catch'](lt);return{'threadId':_0xbb2b4b['commentThreadId'],'resolvedAt':_0xbb2b4b['resolvedAt'],'resolvedBy':_0xbb2b4b['resolvedBy']};},'reopenCommentThread':async({channelId:_0x111ef2,threadId:_0x49d6b6})=>this['_getService'](_0x111ef2)['reopenCommentThread'](_0x49d6b6)['catch'](B)['catch'](lt),'removeCommentThread':({channelId:_0x41887c,threadId:_0x297237})=>this['_getService'](_0x41887c)['removeCommentThread'](_0x297237)['catch'](B)['catch'](lt),'addComment':({channelId:_0x9fc81e,threadId:_0x8de6e2,commentId:_0x239a4f,content:_0x2af570,attributes:_0x42a184})=>this['_getService'](_0x9fc81e)['addComment'](_0x8de6e2,_0x239a4f,_0x2af570,_0x42a184)['catch'](lt),'updateComment':({channelId:_0x50a0a6,threadId:_0x3302c4,commentId:_0x4d1474,content:_0x301fd0,attributes:_0x57b870})=>this['_getService'](_0x50a0a6)['updateComment'](_0x3302c4,_0x4d1474,_0x301fd0,_0x57b870)['catch'](B)['catch'](lt),'removeComment':({channelId:_0x62e2d5,threadId:_0x5bb7ff,commentId:_0x53cff1})=>this['_getService'](_0x62e2d5)['removeComment'](_0x5bb7ff,_0x53cff1)['catch'](B)['catch'](lt)},_0x156eec instanceof _0x58c730){const _0x4f11c5=_0x156eec['config']['get']('collaboration.channelId'),_0x520405=_0x156eec['plugins']['get'](r);await this['_setUpService'](_0x4f11c5);const _0x4c0a9f=await this['_services']['get'](_0x4f11c5)['getConnectedSessions']();this['listenTo'](_0x520405,'sessionAdd:'+_0x4f11c5,(_0x28283e,{session:_0x531e77})=>{_0x531e77['id']===_0x520405['mySessionId']&&(_0x28283e['off'](),this['context']['plugins']['get']('Permissions')['setPermissions'](_0x531e77['permissions'],_0x4f11c5));}),_0x520405['register'](_0x4f11c5,_0x4c0a9f);}}async['_setUpService'](_0x30b3f5){if(this['_services']['has'](_0x30b3f5))throw new _0x32a172('cloudservicescommentsadapter-connect-already-connected',null,{'channelId':_0x30b3f5});const _0x5a672a=this['context']['plugins']['get']('CommentsRepository'),_0x1452d2=new a['CommentsService'](_0x30b3f5);this['_services']['set'](_0x30b3f5,_0x1452d2),this['listenTo'](_0x1452d2,'commentThreadAdded',(_0x32a6ea,_0x39bd9c)=>{const {commentThreadId:_0x3e6b22,documentId:_0x4377ba,context:_0x499098,attributes:_0x2156cf,resolvedAt:_0x13756c,resolvedBy:_0xdb6b18,comments:_0x2211ef}=_0x39bd9c;_0x5a672a['getCommentThread'](_0x3e6b22)||_0x5a672a['addCommentThread']({'threadId':_0x3e6b22,'channelId':_0x4377ba,'comments':_0x2211ef?_0x2211ef['map'](S):[],'context':_0x499098,'attributes':_0x2156cf,'resolvedAt':_0x13756c,'resolvedBy':_0xdb6b18,'isFromAdapter':!0x0});}),this['listenTo'](_0x1452d2,'commentThreadUpdated',(_0x4c4075,{commentThreadId:_0x2436fd,documentId:_0x45f8b1,context:_0x1739af,unlinkedAt:_0x2fe826,attributes:_0x3bc455})=>{_0x5a672a['getCommentThread'](_0x2436fd)&&_0x5a672a['updateCommentThread']({'threadId':_0x2436fd,'channelId':_0x45f8b1,'context':_0x1739af,'unlinkedAt':_0x2fe826,'attributes':_0x3bc455,'isFromAdapter':!0x0});}),this['listenTo'](_0x1452d2,'commentThreadResolved',(_0x980725,{commentThreadId:_0x196259,resolvedBy:_0x46decd,resolvedAt:_0x30117e})=>{const _0x472b26=_0x5a672a['getCommentThread'](_0x196259);_0x472b26&&_0x472b26['resolve']({'resolvedBy':_0x46decd,'resolvedAt':_0x30117e,'isFromAdapter':!0x0});}),this['listenTo'](_0x1452d2,'commentThreadReopened',(_0xabd67f,{commentThreadId:_0x8712e6})=>{const _0x428333=_0x5a672a['getCommentThread'](_0x8712e6);_0x428333&&_0x428333['reopen']({'isFromAdapter':!0x0});}),this['listenTo'](_0x1452d2,'commentThreadRemoved',(_0x1a2c4b,{commentThreadId:_0x5261bb})=>{const _0x1b93b7=_0x5a672a['getCommentThread'](_0x5261bb);_0x1b93b7&&_0x1b93b7['remove']({'isFromAdapter':!0x0});}),this['listenTo'](_0x1452d2,'commentAdded',(_0x4ec9dc,_0x3d5596)=>{const _0x25b099=_0x3d5596['commentThreadId'],_0x16a7af=_0x5a672a['getCommentThread'](_0x25b099);_0x16a7af&&_0x16a7af['addComment']({...S(_0x3d5596),'isFromAdapter':!0x0});}),this['listenTo'](_0x1452d2,'commentUpdated',(_0x45b09f,{commentThreadId:_0x5b05c3,commentId:_0x2de5dc,content:_0x3bafc2,attributes:_0x56941c})=>{const _0x3371d3=_0x5a672a['getCommentThread'](_0x5b05c3);if(_0x3371d3){const _0x5e4d3e=_0x3371d3['getComment'](_0x2de5dc);_0x5e4d3e&&_0x5e4d3e['update']({'content':_0x3bafc2,'attributes':_0x56941c,'isFromAdapter':!0x0});}}),this['listenTo'](_0x1452d2,'commentRemoved',(_0x572c10,{commentThreadId:_0x2917b7,commentId:_0xf78fc0})=>{const _0x4fe5d7=_0x5a672a['getCommentThread'](_0x2917b7);if(_0x4fe5d7){const _0x329536=_0x4fe5d7['getComment'](_0xf78fc0);_0x329536&&_0x329536['remove']({'isFromAdapter':!0x0});}}),await this['_connectService'](_0x30b3f5);}['destroy'](){if(this['context']instanceof _0x58c730){const _0xb6ae77=this['context']['config']['get']('collaboration.channelId');this['_terminateService'](_0xb6ae77);}}['_terminateService'](_0x5dfb99){if(!this['_services']['has'](_0x5dfb99))throw new _0x32a172('cloudservicescommentsadapter-disconnect-not-exist',null,{'channelId':_0x5dfb99});this['_getService'](_0x5dfb99)['disconnect'](),this['_services']['delete'](_0x5dfb99);}async['reconnect'](){for(const _0x260a17 of this['_services']['keys']())await this['_connectService'](_0x260a17);if(this['context']instanceof _0x58c730){const _0x5b2b03=this['context']['config']['get']('collaboration.channelId'),_0x39faf3=this['context']['plugins']['get'](r);_0x39faf3['unregister'](_0x5b2b03);const _0x12910a=await this['_services']['get'](_0x5b2b03)['getConnectedSessions']();_0x39faf3['register'](_0x5b2b03,_0x12910a);}}async['_connectService'](_0x2fd3ec){const {connection:_0x383548}=this['context']['plugins']['get'](c),_0x309b84=this['context']['plugins']['get']('CommentsRepository'),_0x24a42a=this['_services']['get'](_0x2fd3ec),_0x1ce71c=await _0x24a42a['connect'](_0x383548);await this['_fetchMissingUsersForThreads'](_0x1ce71c);const _0x10cb12=new Set(Array['from'](_0x309b84['getCommentThreads']({'channelId':_0x2fd3ec}),_0x323056=>_0x323056['id']));for(const _0x34c21c of _0x1ce71c)_0x34c21c['deletedAt']||_0x10cb12['delete'](_0x34c21c['commentThreadId']);for(const _0x56e5bc of _0x10cb12)_0x309b84['getCommentThread'](_0x56e5bc)['remove']({'isFromAdapter':!0x0});for(const _0x1bd9dc of _0x1ce71c){let _0x20a364=_0x309b84['getCommentThread'](_0x1bd9dc['commentThreadId']);const {commentThreadId:_0x6e0104,context:_0x500f38,attributes:_0x8f7b91,resolvedBy:_0x557be2,resolvedAt:_0x9f6d8c,unlinkedAt:_0xe7b567,deletedAt:_0x174d55}=_0x1bd9dc;if(_0x174d55)continue;_0x20a364||(_0x20a364=_0x309b84['addCommentThread']({'channelId':_0x2fd3ec,'threadId':_0x6e0104,'context':_0x500f38,'attributes':_0x8f7b91||{},'resolvedBy':_0x557be2,'resolvedAt':_0x9f6d8c,'unlinkedAt':_0xe7b567,'isFromAdapter':!0x0}));const _0x34e691=new Set(Array['from'](_0x20a364['comments'],_0x522ec8=>_0x522ec8['id']));for(const _0x5a55df of _0x1bd9dc['comments'])_0x34e691['delete'](_0x5a55df['commentId']);for(const _0x19a75c of _0x34e691)_0x20a364['getComment'](_0x19a75c)['remove']({'isFromAdapter':!0x0});for(const _0x18d13a of _0x1bd9dc['comments']){const _0x12972b=_0x20a364['getComment'](_0x18d13a['commentId']);_0x12972b?_0x12972b['content']!==_0x18d13a['content']&&_0x12972b['update']({'content':_0x18d13a['content'],'isFromAdapter':!0x0}):_0x20a364['addComment'](Object['assign'](S(_0x18d13a),{'isFromAdapter':!0x0}));}}}['_getService'](_0x119dca){if(!this['_services']['has'](_0x119dca))throw new _0x32a172('cloudservicescommentsadapter-service-not-exist',null,{'channelId':_0x119dca});return this['_services']['get'](_0x119dca);}async['_fetchMissingUsersForThreads'](_0x2acf1e){const _0x4d6b12=this['context']['plugins']['get'](_0x333c9d),{connection:_0x11a4b0}=this['context']['plugins']['get'](c),_0x562a81=new Set();for(const {resolvedBy:_0x3ab54b,comments:_0x2771be}of _0x2acf1e){_0x3ab54b&&!_0x4d6b12['getUser'](_0x3ab54b)&&_0x562a81['add'](_0x3ab54b);for(const {userId:_0x633474}of _0x2771be)_0x4d6b12['getUser'](_0x633474)||_0x562a81['add'](_0x633474);}if(0x0===_0x562a81['size'])return;const _0x5ba9ee=await dt['getMany'](_0x11a4b0,Array['from'](_0x562a81));for(const _0x2d2c9e of _0x5ba9ee)_0x4d6b12['getUser'](_0x2d2c9e['id'])||_0x4d6b12['addUser'](_0x2d2c9e);}}async function B(_0x2cda46){if('404'!==_0x2cda46['code'])throw _0x2cda46;}function lt(_0x18e5e0){if((_0x9a802c=_0x18e5e0)['message']['startsWith']('cloud-services-internal-error:\x20Comments\x20Service\x20is\x20not\x20connected.')||_0x9a802c['message']['startsWith']('cloud-services-internal-error:\x20Not\x20connected.')||_0x9a802c['message']['startsWith']('cloud-services-internal-error:\x20Request\x20timeout.'))return new Promise(()=>{});var _0x9a802c;throw _0x18e5e0;}function S(_0x1bc4e2){return{'threadId':_0x1bc4e2['commentThreadId'],'commentId':_0x1bc4e2['commentId'],'content':_0x1bc4e2['content'],'createdAt':_0x1bc4e2['createdAt'],'authorId':_0x1bc4e2['userId'],'attributes':_0x1bc4e2['attributes']||{}};}class g extends _0x447feb{static ['TrackChangesService']=/* #__PURE__ -- @preserve */
27
- ((()=>st)());['_bufferedRequests'];['_trackChangesService'];static get['requires'](){return[a,'TrackChangesEditing',c];}constructor(_0x2f800d){super(_0x2f800d);const _0x4dc9cd=this['editor']['config']['get']('collaboration.channelId');this['_bufferedRequests']=new Map(),this['_trackChangesService']=new g['TrackChangesService'](_0x4dc9cd);}['init'](){const _0x5e9055=this['editor']['plugins']['get'](c),_0x5c8893=this['editor']['plugins']['get']('TrackChangesEditing');return _0x5c8893['adapter']={'getSuggestion':async _0x576c7a=>{await this['_waitForServiceReady']();const _0x509d48=await this['_trackChangesService']['get'](_0x576c7a)['catch'](R);return await this['_fetchMissingUsersForThreads']([_0x509d48]),_0x509d48;},'addSuggestion':async({id:_0x12db6a,type:_0x542192,data:_0x2a6bda,originalSuggestionId:_0x55eafe,attributes:_0x81947a})=>{await this['_waitForServiceReady']();const _0x3d13a0={'id':_0x12db6a,'type':_0x542192,'data':_0x2a6bda,'originalSuggestionId':_0x55eafe,'attributes':_0x81947a},_0x1c7023=await this['_trackChangesService']['add'](_0x12db6a,_0x542192,_0x2a6bda,_0x55eafe,_0x81947a)['catch'](_0x97ed2=>{if(ut(_0x97ed2))return new Promise(_0x578396=>{this['_bufferedRequests']['set'](_0x12db6a,{'resolve':_0x578396,'suggestionData':_0x3d13a0});});throw _0x97ed2;});return this['_bufferedRequests']['delete'](_0x12db6a),_0x1c7023;},'updateSuggestion':async(_0x1b85c4,_0x5542dc)=>{if(await this['_waitForServiceReady'](),'open'!==_0x5542dc['state'])return this['_trackChangesService']['update'](_0x1b85c4,_0x5542dc)['catch'](R);}},this['listenTo'](this['_trackChangesService'],'suggestionUpdated',(_0x5dffb4,_0x3fd467)=>{_0x5c8893['hasSuggestion'](_0x3fd467['id'])&&(_0x5c8893['getSuggestion'](_0x3fd467['id'])['attributes']=_0x3fd467['attributes']);}),this['_trackChangesService']['connect'](_0x5e9055['connection'])['then'](_0x474620=>(_0x5e9055['addToReconnectionStack'](this),this['_fetchMissingUsersForThreads'](_0x474620)['then'](()=>{for(const _0x1e6477 of _0x474620){_0x5c8893['addSuggestionData'](_0x1e6477)['_saved']=!0x0;}})));}async['reconnect'](){const _0x202acf=this['editor']['plugins']['get']('TrackChangesEditing'),{connection:_0x494cf4}=this['editor']['plugins']['get'](c),_0x226516=await this['_trackChangesService']['connect'](_0x494cf4);await this['_fetchMissingUsersForThreads'](_0x226516);for(const {suggestionData:_0x195f63,resolve:_0x2dbdc6}of this['_bufferedRequests']['values']()){let _0x9d8219=_0x226516['find'](_0x112712=>_0x112712['id']===_0x195f63['id']);_0x9d8219||(_0x9d8219=await this['_trackChangesService']['add'](_0x195f63['id'],_0x195f63['type'],_0x195f63['data'],_0x195f63['originalSuggestionId'])),_0x2dbdc6(_0x9d8219);}for(const _0x2866ac of _0x226516)_0x202acf['hasSuggestion'](_0x2866ac['id'])||_0x202acf['addSuggestionData'](_0x2866ac);}async['_waitForServiceReady'](){this['_trackChangesService']['isConnected']||await new Promise(_0x2cbe6f=>{this['listenTo'](this['_trackChangesService'],'connected',_0x126d3d=>{_0x126d3d['off'](),_0x2cbe6f();});});}async['_fetchMissingUsersForThreads'](_0x135180){const _0x15e64d=this['editor']['plugins']['get'](_0x333c9d),{connection:_0xf354e0}=this['editor']['plugins']['get'](c),_0x4a01f4=new Set();for(const {authorId:_0x3f7ee4}of _0x135180)_0x15e64d['getUser'](_0x3f7ee4)||_0x4a01f4['add'](_0x3f7ee4);if(0x0===_0x4a01f4['size'])return;const _0x2226f1=await dt['getMany'](_0xf354e0,Array['from'](_0x4a01f4));for(const _0x4c954e of _0x2226f1)_0x15e64d['getUser'](_0x4c954e['id'])||_0x15e64d['addUser'](_0x4c954e);}}function R(_0x126b77){if(ut(_0x126b77))return new Promise(()=>{});throw _0x126b77;}function ut(_0x45f695){return _0x45f695['message']['startsWith']('cloud-services-internal-error:\x20Not\x20connected.')||_0x45f695['message']['startsWith']('cloud-services-internal-error:\x20Request\x20timeout.');}class m extends _0x447feb{static get['requires'](){return['Comments',a,n,c];}static get['pluginName'](){return'RealTimeCollaborativeComments';}['init'](){const _0x5f2d6b=this['editor']['plugins']['get'](c),_0x125adb=this['editor']['plugins']['get']('CommentsEditing'),_0x10395c=this['editor']['plugins']['get'](a);return this['editor']['data']['once']('ready',()=>{this['listenTo'](_0x5f2d6b,'change:state',(_0x3879e1,_0x251fdf,_0x482024)=>{_0x125adb['isThreadsLoadingPaused']='connected'!==_0x482024;});}),this['listenTo'](_0x5f2d6b,'change:state',(_0x2cb229,_0xd27b64,_0x52c502)=>{this['editor']['plugins']['get']('CommentsRepository')['switchReadOnly']('connected'!==_0x52c502);}),_0x10395c['_setUpService'](this['editor']['config']['get']('collaboration.channelId'));}['destroy'](){this['editor']['plugins']['get'](a)['_terminateService'](this['editor']['config']['get']('collaboration.channelId')),super['destroy']();}}class p extends _0x447feb{static get['requires'](){return[m,g,'TrackChanges'];}static get['pluginName'](){return'RealTimeCollaborativeTrackChanges';}}class v extends _0x447feb{static ['RevisionHistoryService']=/* #__PURE__ -- @preserve */
28
- ((()=>_0x42f4d4)());['_lastRequestId'];['_revisionTracker'];['_revisionHistoryService'];['_oldOffset'];static get['requires'](){return[c,l,'RevisionTracker',r,_0x333c9d];}constructor(_0x2b46ca){super(_0x2b46ca);const _0x3e3a56=this['editor']['config']['get']('collaboration.channelId');this['_lastRequestId']=null,this['_revisionTracker']=this['editor']['plugins']['get']('RevisionTracker'),this['_revisionHistoryService']=new v['RevisionHistoryService'](_0x3e3a56);}async['init'](){const _0x1464c4=this['editor']['plugins']['get'](l),_0x3dc5ae=_0x1464c4['serverHistory'],_0x176025=this['editor']['plugins']['get'](c);this['_revisionTracker']['setSource']({'history':_0x3dc5ae,'getLatestVersion':()=>this['_getLatestVersion'](),'getCurrentRevisionId':()=>_0x1464c4['sessionId']});const _0x496296=this['editor']['config']['get']('cloudServices.bundleVersion')||nt,_0x65b7bb=await _0x57fffd['isBundleUploaded'](_0x176025['connection'],_0x496296);this['_revisionTracker']['adapter']={'getRevision':async({revisionId:_0x32b8f4})=>(await this['_waitForServiceReady'](),await this['_revisionHistoryService']['getRevision'](_0x32b8f4)),'updateRevisions':async _0x529708=>{await this['_waitForServiceReady']();const _0xb4ef30=this['_revisionTracker']['currentRevision'];if(_0x65b7bb&&0x1===_0x529708['length']&&_0x529708[0x0]['id']===_0xb4ef30['id'])return _0x529708;for(const _0xe795eb of _0x529708)_0xe795eb['id']===_0xb4ef30['id']&&(_0xe795eb['isEmptyCurrent']=_0xe795eb['fromVersion']===_0xe795eb['toVersion']);return this['_revisionHistoryService']['updateRevisions'](_0x529708,this['_lastRequestId'])['then'](_0x252b6d=>(this['_lastRequestId']=_0x252b6d,_0x529708))['catch'](_0x150865=>{if(P(_0x150865)||'400'===_0x150865['code']&&void 0x0!==_0x150865['data']['wrongRequestId']){for(const _0x25515f of _0x529708){!this['_revisionTracker']['repository']['getRevision'](_0x25515f['id'])||this['_revisionTracker']['_bufferUpdate'](_0x25515f['id'],_0x25515f,!0x1);}if(P(_0x150865))throw _0x150865;return _0x529708;}throw _0x150865;});}},this['listenTo'](this['_revisionHistoryService'],'revisionsUpdated',(_0x56020b,{revisionsData:_0x4993fc,requestId:_0x3a9cef})=>{Math['max'](..._0x4993fc['map'](_0x42f651=>_0x42f651['toVersion']))>this['_getLatestVersionFromServerOperations']()-0x1?this['_getLatestVersion']()['then'](()=>{this['_handleRevisionsUpdate'](_0x4993fc,_0x3a9cef);}):this['_handleRevisionsUpdate'](_0x4993fc,_0x3a9cef);});const {revisions:_0x49bab9,requestId:_0x467229}=await this['_revisionHistoryService']['connect'](_0x176025['connection']);_0x176025['addToReconnectionStack'](this),this['_lastRequestId']=_0x467229,await this['_fetchMissingUsers'](_0x49bab9);for(const _0xb2e1c0 of _0x49bab9)this['_revisionTracker']['addRevisionData'](_0xb2e1c0);this['listenTo'](_0x1464c4,'change:_isConnected',(_0x3d40ce,_0x44a7cd,_0x1feefd)=>{_0x1feefd&&(this['_oldOffset']=_0x1464c4['_offset'],_0x3d40ce['off']());}),this['_revisionTracker']['bind']('isEnabled')['to'](_0x176025,'state',_0x3175c4=>_0x3175c4===_0x21eb19['CONNECTED']);}async['reconnect'](){const _0x4d7722=this['editor']['plugins']['get'](c),_0x3afc7f=this['editor']['plugins']['get'](l),_0x51ebfd=async()=>{const _0x403bb0=this['_revisionTracker']['currentRevision'],_0x12c7bf=_0x403bb0['id'],_0x3a4f34=_0x12c7bf!==_0x3afc7f['sessionId'];if(_0x3a4f34){const _0x23f15e=_0x3afc7f['_offset']-this['_oldOffset'],_0x99f3fb=this['_getLatestVersionFromServerOperations']();this['_revisionTracker']['_revisionDataBuilder']['reInit']();if(_0x403bb0['toVersion']+_0x23f15e!==_0x99f3fb){const _0x441721=_0x403bb0['fromVersion']+_0x23f15e,_0x4f0e05=this['editor']['plugins']['get'](_0x333c9d),_0x4b46b7=this['_revisionTracker']['buildRevisionData']({'revision':_0x403bb0,'from':_0x441721,'to':_0x99f3fb});_0x4b46b7['id']=_0x403bb0['id'];const _0x1c16ae=_0x4b46b7['authorsIds']['map'](_0x211593=>_0x4f0e05['getUser'](_0x211593));_0x403bb0['_update']({..._0x4b46b7,'authors':_0x1c16ae},!0x0),this['_revisionTracker']['_bufferUpdate'](_0x403bb0['id'],_0x4b46b7,!0x0);}this['_revisionTracker']['_startingVersion']=_0x99f3fb,(_0x403bb0['toVersion']===_0x403bb0['fromVersion']&&!this['_revisionTracker']['_bufferedUpdates']['has'](_0x12c7bf)&&this['_revisionTracker']['repository']['_revisions']['remove'](_0x12c7bf),this['_revisionTracker']['_createCurrentRevision'](_0x99f3fb));}const {revisions:_0x138e5b,requestId:_0x38497e}=await this['_revisionHistoryService']['reconnect'](_0x4d7722['connection'],this['_lastRequestId']);_0x3a4f34&&_0x138e5b['length']>0x0?_0x3afc7f['_handleReconnectionError']():(await this['_fetchMissingUsers'](_0x138e5b),this['_handleRevisionsUpdate'](_0x138e5b,_0x38497e),this['_revisionTracker']['sendBufferedUpdates']());};return _0x3afc7f['_isConnected']?_0x51ebfd():new Promise((_0x23ddc6,_0x174ae1)=>{_0x3afc7f['once']('change:_isConnected',()=>{_0x51ebfd()['then'](_0x23ddc6)['catch'](_0x174ae1);});});}['destroy'](){super['destroy']();}async['_waitForServiceReady'](){this['_revisionHistoryService']['isConnected']||await new Promise(_0x4c857a=>{this['listenTo'](this['_revisionHistoryService'],'connected',_0x48d08=>{_0x48d08['off'](),_0x4c857a();});});}['_getLatestVersionFromServerOperations'](){const _0x17e286=this['editor']['plugins']['get'](l)['serverHistory']['getOperations']()['reverse']();for(const _0x4ad68a of _0x17e286)if('marker'!==_0x4ad68a['type']||_0x4ad68a['affectsData'])return _0x4ad68a['baseVersion']+0x1;}['_getLatestVersion'](){const _0xdae53a=this['editor']['plugins']['get'](l);return new Promise(_0x3344ce=>{_0xdae53a['_isPendingUpdate']?_0xdae53a['once']('change:_isPendingUpdate',()=>{_0x3344ce(this['_getLatestVersionFromServerOperations']());}):_0x3344ce(this['_getLatestVersionFromServerOperations']());});}['_handleRevisionsUpdate'](_0x539291,_0x406c22){const _0x30e088=this['_revisionTracker']['repository'];this['_lastRequestId']=_0x406c22;for(const _0x2090b8 of _0x539291){const _0x58ab0c=_0x30e088['getRevision'](_0x2090b8['id']);if(_0x58ab0c){if((_0x2090b8['fromVersion']||_0x2090b8['toVersion'])&&(_0x2090b8['diffData']=null),_0x58ab0c===this['_revisionTracker']['currentRevision']){const _0xe7aa60=Math['max'](_0x58ab0c['toVersion'],_0x2090b8['toVersion']),_0x497b26=Math['max'](_0x58ab0c['fromVersion'],_0x2090b8['fromVersion']);let _0x44b419;_0x58ab0c['toVersion']===_0x2090b8['toVersion']&&_0x58ab0c['fromVersion']===_0x2090b8['fromVersion']?(_0x44b419=!0x0,this['_preventResendingRevisionData'](_0x2090b8)):_0x2090b8['toVersion']===_0xe7aa60&&_0x2090b8['fromVersion']===_0x497b26?_0x44b419=!0x1:(_0x58ab0c['toVersion']===_0xe7aa60&&_0x58ab0c['fromVersion']===_0x497b26||this['_fixRevision']({'revision':_0x58ab0c,'from':_0x497b26,'to':_0xe7aa60}),_0x44b419=!0x0),_0x44b419&&(delete _0x2090b8['fromVersion'],delete _0x2090b8['toVersion'],delete _0x2090b8['diffData'],delete _0x2090b8['createdAt'],delete _0x2090b8['authorsIds']);}this['_revisionTracker']['setRevisionData'](_0x2090b8),this['_preventResendingRevisionData'](_0x2090b8);}else this['_revisionTracker']['addRevisionData'](_0x2090b8);}const _0x3383d8=_0x30e088['getRevisions']();_0x3383d8['reverse']();for(let _0x6b8700=0x0;_0x6b8700<_0x3383d8['length']-0x1;_0x6b8700++){const _0xe0b620=_0x3383d8[_0x6b8700],_0x355a3a=_0x3383d8[_0x6b8700+0x1];if(_0xe0b620['fromVersion']<_0x355a3a['toVersion']){const _0x48c340=_0x355a3a['toVersion'],_0x5b4665=Math['max'](_0x48c340,_0xe0b620['toVersion']);this['_fixRevision']({'revision':_0xe0b620,'from':_0x48c340,'to':_0x5b4665});}}}['_fixRevision']({revision:_0x4b462f,from:_0x5e80f5,to:_0x4483e5}={}){const _0x12186e=this['editor']['plugins']['get'](_0x333c9d),_0x8c30e8=this['_revisionTracker']['buildRevisionData']({'revision':_0x4b462f,'from':_0x5e80f5,'to':_0x4483e5});_0x8c30e8['authors']=_0x8c30e8['authorsIds']['map'](_0x5580b0=>_0x12186e['getUser'](_0x5580b0)),_0x4b462f['_update'](_0x8c30e8);}['_preventResendingRevisionData'](_0x3a42e0){const _0x5e999f={};_0x5e999f['id']=_0x3a42e0['id'];for(const _0x3b64f2 of Object['keys'](_0x3a42e0))'id'!==_0x3b64f2&&(_0x5e999f[_0x3b64f2]=void 0x0);this['_revisionTracker']['_bufferUpdate'](_0x5e999f['id'],_0x5e999f,!0x0);}async['_fetchMissingUsers'](_0x1b920d){const _0xd55591=this['editor']['plugins']['get'](_0x333c9d),{connection:_0x1185b2}=this['editor']['plugins']['get'](c),_0xd69ab8=new Set();for(const _0x4014d9 of _0x1b920d){for(const _0x4f8f04 of _0x4014d9['authorsIds'])_0x1c325b(_0x4f8f04);_0x4014d9['creatorId']&&_0x1c325b(_0x4014d9['creatorId']);}if(0x0===_0xd69ab8['size'])return;const _0x206c80=await dt['getMany'](_0x1185b2,Array['from'](_0xd69ab8));for(const _0x29579e of _0x206c80)_0xd55591['getUser'](_0x29579e['id'])||_0xd55591['addUser'](_0x29579e);function _0x1c325b(_0x52abdc){_0xd55591['getUser'](_0x52abdc)||_0xd69ab8['add'](_0x52abdc);}}}function P(_0x298d34){return _0x298d34['message']['startsWith']('cloud-services-internal-error:\x20Revision\x20History\x20Service\x20is\x20not\x20connected.')||_0x298d34['message']['startsWith']('cloud-services-internal-error:\x20Not\x20connected.')||_0x298d34['message']['startsWith']('cloud-services-internal-error:\x20Request\x20timeout.');}class d extends _0x447feb{static get['requires'](){return['RevisionHistory',v,n];}static get['pluginName'](){return'RealTimeCollaborativeRevisionHistory';}}class ts extends _0x492637{constructor(_0x582e11){super(_0x582e11);const _0x5d2ddf=this['bindTemplate'];this['set']('usersCount',0x0),this['set']('isHidden',!0x0),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-presence-list__counter',_0x5d2ddf['if']('isHidden','ck-presence-list__counter--hidden')]},'children':[{'text':_0x5d2ddf['to']('usersCount',_0x34bb04=>J(_0x582e11,'CONNECTED_USERS',_0x34bb04))}]});}}class es extends _0x492637{['items'];['keystrokes'];constructor(_0x233b1e){super(_0x233b1e);const _0x2b17fc=this['bindTemplate'];this['items']=this['createCollection'](),this['keystrokes']=new _0x289003(),this['set']({'hasPopup':!0x1,'isExpanded':!0x1}),this['setTemplate']({'tag':'div','attributes':{'aria-haspopup':_0x2b17fc['if']('hasPopup'),'aria-expanded':_0x2b17fc['to']('isExpanded',_0x709f1e=>this['hasPopup']&&String(_0x709f1e)),'aria-label':_0x2b17fc['to']('hasPopup',_0x364451=>J(_0x233b1e,_0x364451?'Collapsed\x20connected\x20users\x20list\x20(press\x20ENTER\x20to\x20open\x20it)':'Connected\x20users\x20list')),'role':'list','tabindex':_0x2b17fc['to']('hasPopup',_0x2a33eb=>!!_0x2a33eb&&0x0),'class':['ck','ck-presence-list__list']},'children':this['items'],'on':{'click':_0x2b17fc['to'](()=>this['fire']('execute'))}}),this['on']('change:hasPopup',(_0x2db240,_0x2b5402,_0x480cea)=>{this['element']&&(_0x480cea?this['element']['setAttribute']('aria-expanded',String(this['isExpanded'])):this['element']['removeAttribute']('aria-expanded'));});}['focus'](){this['element']['focus']();}['render'](){super['render'](),this['keystrokes']['listenTo'](this['element']);}}class L extends _0x492637{['counterView'];['inlineListView'];constructor(_0x5c210c){super(_0x5c210c);const _0x946469=this['bindTemplate'];this['set']('isCollapsed',!0x0),this['counterView']=new ts(this['locale']),this['inlineListView']=new es(_0x5c210c),this['inlineListView']['bind']('hasPopup')['to'](this,'isCollapsed'),this['listenTo'](this['inlineListView']['items'],'change',()=>{for(const _0x36b2ac of this['inlineListView']['items'])_0x36b2ac['tooltipPosition']='s';this['inlineListView']['items']['first']&&(this['inlineListView']['items']['first']['tooltipPosition']='se');}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-presence-list','ck-reset','ck-rounded-corners',_0x946469['if']('isCollapsed','ck-presence-list--collapsed')]},'children':[this['counterView'],this['inlineListView']]});}}class j extends _0x492637{['listWrapperView'];constructor(_0x2c79b3,_0x4c6066){super(_0x2c79b3),this['listWrapperView']=new ft(_0x2c79b3,_0x4c6066),this['setTemplate']({'tag':'div','attributes':{'tabindex':-0x1,'role':'application','class':['ck','ck-presence-list__dropdown-list'],'aria-label':J(_0x2c79b3,'Connected\x20users\x20list\x20dropdown\x20menu')},'children':[this['listWrapperView']]});}}class ft extends _0x29505a{constructor(_0x50d831,_0x2ff711){super(_0x50d831);const _0x164e0e=this['bindTemplate'];this['set']('_isScrollable',!0x1),this['setTemplate']({'tag':_0x2ff711?'div':'ul','attributes':{'class':['ck','ck-reset','ck-list','ck-presence-list__dropdown-list-wrapper',_0x164e0e['if']('_isScrollable','ck-presence-list__dropdown-list-wrapper_scrollable')],'role':_0x164e0e['to']('role'),'aria-label':_0x164e0e['to']('ariaLabel'),'aria-labelledby':_0x164e0e['to']('ariaLabelledBy')},'children':this['items']}),this['listenTo'](_0x5c2f10['window'],'resize',()=>this['checkIfScrollable']()),this['items']['on']('change',()=>this['checkIfScrollable']());}['render'](){super['render'](),this['checkIfScrollable']();}['checkIfScrollable'](){const _0x318243=this['element'];_0x318243&&(this['_isScrollable']=Math['max'](_0x318243['scrollHeight'],_0x318243['clientHeight'])>0.8*window['innerHeight']);}}class k extends et{['userView'];constructor(_0xcb7b53,_0x40d396,_0x20493a){super(_0xcb7b53);const _0x50980a=this['bindTemplate'];this['userView']=new rt(_0xcb7b53,_0x40d396);const _0x3dee2f={'tag':'li','attributes':{'class':['ck','ck-presence-list__dropdown-list-item'],'tabindex':-0x1,'role':'presentation','aria-label':_0x40d396['name']},'children':[this['userView'],{'tag':'span','attributes':{'class':['ck','ck-user__full-name']},'children':[{'text':_0x40d396['name']}]},{'tag':'span','attributes':{'class':['ck','ck-presence-list__marker',_0x40d396['color']['getBackgroundColorClass']()],'aria-hidden':'true'}}]};_0x20493a&&(_0x3dee2f['tag']='button',_0x3dee2f['on']={'click':_0x50980a['to'](()=>this['fire']('execute'))}),this['setTemplate'](_0x3dee2f);}['focus'](){this['element']['focus']();}}class y extends _0x492637{['userView'];['markerView'];constructor(_0x1c481a,_0x2f1633,_0x112fec){super(_0x1c481a);const _0x43c315=this['bindTemplate'];this['set']('isFocusable',!0x1),this['set']('hasTooltip',!0x0),this['set']('tooltipPosition',''),this['userView']=new rt(_0x1c481a,_0x2f1633),this['markerView']=new ct(_0x1c481a,_0x2f1633);const _0x48e6bc=new ot(_0x1c481a);_0x48e6bc['template']['tag']='span',_0x48e6bc['text']=_0x2f1633['name'];const _0x5ba6dc={'tag':'div','attributes':{'class':['ck','ck-presence-list__list-item'],'role':'listitem','tabindex':_0x43c315['to']('isFocusable',_0x390a66=>!!_0x390a66&&0x0),'aria-labelledby':_0x48e6bc['id'],'data-cke-tooltip-text':this['userView']['name'],'data-cke-tooltip-position':_0x43c315['to']('tooltipPosition'),'data-cke-tooltip-disabled':_0x43c315['to']('hasTooltip',_0x17514b=>!_0x17514b),'data-cke-tooltip-class':'ck-presence-list__list-item__tooltip'},'children':[this['userView'],this['markerView'],_0x48e6bc]};_0x112fec&&(_0x5ba6dc['tag']='button',_0x5ba6dc['on']={'click':_0x43c315['to'](()=>this['fire']('execute'))}),this['setTemplate'](_0x5ba6dc);}}class ct extends _0x492637{constructor(_0x445a08,_0x57abb5){super(_0x445a08),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-presence-list__marker',_0x57abb5['color']['getBackgroundColorClass']()],'aria-hidden':'true'}});}}const A={'collapseAt':0x6,'displayMe':!0x0};class s extends _0x4da67b{['currentDisplayedUsers'];['balloonPanelView'];['view'];['presenceDropdownView'];['_bodyCollection']=null;constructor(_0x4aa517){super(_0x4aa517),this['context']['config']['define']('presenceList',A);const _0x525000=_0x4aa517['config']['get']('presenceList.collapseAt');if('number'!=typeof _0x525000)throw new _0x32a172('presencelist-collapseat-invalid-format',this);if(_0x525000<0x1)throw new _0x32a172('presencelist-collapseat-invalid-format',this);this['_allConnectedUsers']=this['context']['plugins']['get'](r)['allConnectedUsers'],this['set']('usersCount',0x0),this['currentDisplayedUsers']=new _0x3d8231(),this['balloonPanelView']=new _0x34ab26(),this['balloonPanelView']['class']='ck\x20ck-presence-list__balloon',this['view']=this['_createView'](),this['presenceDropdownView']=void 0x0;}static get['requires'](){return[r];}['init'](){for(const _0x33f7f7 of this['_allConnectedUsers'])this['_handleUserAdd'](_0x33f7f7);this['listenTo'](this['_allConnectedUsers'],'add',(_0x173e44,_0x403b1a)=>{this['_handleUserAdd'](_0x403b1a);}),this['listenTo'](this['_allConnectedUsers'],'remove',(_0x5d2a93,_0x44347b)=>{this['_handleUserRemove'](_0x44347b);});}['_createView'](){const _0x6bd645=this['context'],_0x360026=new L(this['context']['locale']),_0x74cb5f=this['balloonPanelView'];if(!_0x43594e(_0x6bd645['config']['get']('presenceList.container')))throw new _0x32a172('presencelist-missing-container',this);return _0x360026['counterView']['bind']('usersCount')['to'](this),_0x360026['bind']('isCollapsed')['to'](this,'usersCount',_0x5de1b7=>{const {collapseAt:_0x50589e,displayMe:_0x5d8f0f}=_0x6bd645['config']['get']('presenceList'),_0x227828=_0x5de1b7>=_0x50589e;return _0x360026['counterView']['isHidden']=!(0x1==_0x5de1b7&&_0x5d8f0f||_0x227828),_0x227828||this['hideDropdown'](),_0x227828;}),_0x360026['inlineListView']['items']['bindTo'](this['currentDisplayedUsers'])['using'](_0x337d88=>{const _0x276e8f=_0x6bd645['config']['get']('presenceList'),_0x17dc6c=new y(_0x6bd645['locale'],_0x337d88,!!_0x276e8f['onClick']);return _0x17dc6c['bind']('hasTooltip')['to'](_0x360026,'isCollapsed',_0x1f5eab=>!_0x1f5eab),_0x17dc6c['bind']('isFocusable')['to'](_0x360026,'isCollapsed',_0x11bf3e=>!_0x11bf3e),_0x276e8f['onClick']&&this['listenTo'](_0x17dc6c,'execute',()=>{this['view']['isCollapsed']||_0x276e8f['onClick'](_0x337d88,_0x17dc6c['element']);}),_0x17dc6c;}),this['listenTo'](_0x360026['inlineListView'],'execute',()=>{this['presenceDropdownView']?this['hideDropdown']():this['view']['isCollapsed']&&this['showDropdown']();}),_0x360026['inlineListView']['keystrokes']['set']('Enter',(_0x31d0a9,_0x48a180)=>{this['view']['isCollapsed']&&(this['showDropdown'](),_0x48a180());}),_0x360026['render'](),_0x74cb5f['render'](),_0xe2b371({'emitter':_0x360026,'activator':()=>_0x74cb5f['isVisible'],'contextElements':[_0x74cb5f['element'],_0x360026['inlineListView']['element']],'callback':()=>this['hideDropdown']()}),_0x6bd645['config']['get']('presenceList.container')['appendChild'](_0x360026['element']),this['_bodyCollection']=new _0x56bcda(this['context']['locale']),this['_bodyCollection']['attachToDom'](),this['_bodyCollection']['add'](this['balloonPanelView']),_0x360026;}['_handleUserAdd'](_0x300396){if(!this['context']['config']['get']('presenceList.displayMe')&&_0x300396['isMe'])return;const _0x171e99=this['context']['config']['get']('presenceList.collapseAt')-0x1;this['usersCount']++,this['currentDisplayedUsers']['length']==_0x171e99&&this['currentDisplayedUsers']['length']>0x1&&this['currentDisplayedUsers']['remove'](0x1);const _0xaacccb=_0x300396['isMe']?0x0:this['currentDisplayedUsers']['length'];this['currentDisplayedUsers']['add'](_0x300396,_0xaacccb);}['_handleUserRemove'](_0x4b47a5){if(this['usersCount']--,this['currentDisplayedUsers']['get'](_0x4b47a5['id'])&&(this['currentDisplayedUsers']['remove'](_0x4b47a5['id']),this['currentDisplayedUsers']['length']<this['usersCount'])){for(const _0x412664 of Array['from'](this['_allConnectedUsers'])['reverse']())if(!this['currentDisplayedUsers']['get'](_0x412664['id']))return void this['currentDisplayedUsers']['add'](_0x412664,Math['min'](this['currentDisplayedUsers']['length'],0x1));}}['showDropdown'](){if(this['presenceDropdownView'])return;const _0x421745=this['context']['config']['get']('presenceList');this['presenceDropdownView']=new j(this['context']['locale'],!!_0x421745['onClick']),this['view']['inlineListView']['isExpanded']=!0x0;const {listWrapperView:_0x3ae1d1}=this['presenceDropdownView'];_0x3ae1d1['items']['bindTo'](this['_allConnectedUsers'])['using'](_0x2e41c5=>{if(!_0x421745['displayMe']&&_0x2e41c5['isMe'])return null;const _0x38456d=new k(this['context']['locale'],_0x2e41c5,!!_0x421745['onClick']);return _0x421745['onClick']&&this['listenTo'](_0x38456d,'execute',()=>{_0x421745['onClick'](_0x2e41c5,_0x38456d['element']);}),_0x38456d;}),this['balloonPanelView']['content']['add'](this['presenceDropdownView']),this['balloonPanelView']['pin']({'target':this['view']['inlineListView']['element']}),_0x3ae1d1['focus'](),_0x3ae1d1['checkIfScrollable']();const _0x5b6fa1=(_0x216c56,_0x40c64c)=>{this['hideDropdown'](),this['view']['inlineListView']['focus'](),_0x40c64c();};_0x3ae1d1['keystrokes']['set']('Esc',_0x5b6fa1),_0x3ae1d1['keystrokes']['set']('Shift+Tab',_0x5b6fa1),_0x3ae1d1['keystrokes']['set']('Tab',(_0x4b1dff,_0x3ba242)=>{!function(_0x32e5b2){const _0x52b9d0=['a','button','input','select','textarea','[tabindex]','[contenteditable]']['map'](_0x24000f=>_0x24000f+':not([disabled]):not([tabindex=\x22-1\x22])')['join'](','),_0x2a7236=[...document['body']['querySelectorAll'](_0x52b9d0)]['filter'](_0x564b2a=>_0x564b2a===document['activeElement']||_0x564b2a['offsetWidth']+_0x564b2a['offsetHeight']>0x0)['sort']((_0x3d3460,_0x4859e7)=>(_0x3d3460['tabIndex']||0x0)-(_0x4859e7['tabIndex']||0x0)),_0x4f41bd=_0x2a7236['indexOf'](_0x32e5b2),_0x37c555=_0x2a7236[(_0x4f41bd+0x1)%_0x2a7236['length']];_0x37c555&&_0x37c555['focus']();}(this['view']['element']),this['hideDropdown'](),_0x3ba242();}),_0x3ae1d1['focusTracker']['add'](this['view']['element']),_0x3ae1d1['focusTracker']['on']('change:isFocused',(_0x35ea63,_0x1a6bdf,_0x49beb4)=>{_0x49beb4||this['hideDropdown']();});}['hideDropdown'](){this['presenceDropdownView']&&(this['view']['inlineListView']['isExpanded']=!0x1,this['balloonPanelView']['unpin'](),this['balloonPanelView']['content']['remove'](this['presenceDropdownView']),this['presenceDropdownView']['destroy'](),this['presenceDropdownView']=void 0x0);}['destroy'](){super['destroy'](),this['view']&&this['view']['isRendered']&&this['view']['destroy'](),this['_bodyCollection']&&(this['_bodyCollection']['detachFromDom'](),this['_bodyCollection']['destroy'](),this['_bodyCollection']=null);}}class i extends _0x4da67b{static get['requires'](){return[r,s];}static get['pluginName'](){return'PresenceList';}}export{a as CloudServicesCommentsAdapter,v as CloudServicesRevisionHistoryAdapter,g as CloudServicesTrackChangesAdapter,i as PresenceList,l as RealTimeCollaborationClient,m as RealTimeCollaborativeComments,n as RealTimeCollaborativeEditing,d as RealTimeCollaborativeRevisionHistory,p as RealTimeCollaborativeTrackChanges};
23
+ import{ContextPlugin as _0x2027c4,Plugin as _0x5595b0,PendingActions as _0x435f2b,Context as _0x37cba0}from'@ckeditor/ckeditor5-core/dist/index.js';import{DomEmitterMixin as _0x329691,CKEditorError as _0x45b2bc,Collection as _0x214a2f,global as _0x1d8bcf,version as nt,uid as _0xa13132,KeystrokeHandler as _0x2ce6aa}from'@ckeditor/ckeditor5-utils/dist/index.js';import{Notification as _0x4c01e9,View as _0x54e89c,ListView as _0x2f86d0,ListItemView as rt,LabelView as ot,BalloonPanelView as _0x28df94,clickOutsideHandler as _0x3507e6,BodyCollection as _0x4eaf74}from'@ckeditor/ckeditor5-ui/dist/index.js';import{LiveRange as ht,History as _0x1df7ab,NoOperation as _0x35337d,InsertOperation as _0x276440,MarkerOperation as _0x2d59f0,RootAttributeOperation as _0x586ee8,transformSets as _0x2ccf9c,OperationFactory as _0x437c9e}from'@ckeditor/ckeditor5-engine/dist/index.js';import{WebSocketGateway as dt,WEB_SOCKET_GATEWAY_STATES as _0x3ae417,CollaborativeEditingService as _0x1addfd,User as lt,CommentsService as _0x4fe77a,TrackChangesService as et,RevisionHistoryService as it,EditorService as tt}from'@ckeditor/ckeditor-cloud-services-collaboration/dist/index.js';import{Users as _0x4b7d5a,UserView as ct}from'ckeditor5-collaboration/dist/index.js';import{Compressor as _0xf09287}from'@ckeditor/ckeditor5-operations-compressor/dist/index.js';import{isElement as _0x427350}from'lodash-es';class c extends _0x2027c4{static ['WebSocketGateway']=/* #__PURE__ -- @preserve */
24
+ ((()=>dt)());static ['initialReconnectionInterval']=0x3e8;['connection'];['_reconnectionStack'];['_shouldPluginsReconnect'];['_domEmitter'];static get['requires'](){return['CloudServices',_0x4c01e9];}static get['pluginName'](){return'WebSocketGateway';}constructor(_0x391a95){super(_0x391a95),this['set']('state',_0x3ae417['CONNECTED']),this['set']('_isBrowserOffline',!0x1),this['_reconnectionStack']=new Set(),this['_shouldPluginsReconnect']=!0x1,this['_domEmitter']=Object['create'](_0x329691);}['init'](){const _0x47cc6c=this['context'],_0x566962=_0x47cc6c['plugins']['get']('CloudServices'),_0x37dd40=_0x47cc6c['plugins']['get'](_0x4c01e9);if(!_0x566962['token'])throw new _0x45b2bc('websocketgateway-missing-token',this);if(!_0x566962['webSocketUrl'])throw new _0x45b2bc('websocketgateway-missing-websocket-url',this);return this['_domEmitter']['listenTo'](window,'offline',()=>this['_isBrowserOffline']=!0x0),this['_domEmitter']['listenTo'](window,'online',()=>this['_isBrowserOffline']=!0x1),this['context']['config']['define']('cloudServices.connectionTimeout',0xa),this['context']['config']['define']('cloudServices.requestTimeout',0x14),c['WebSocketGateway']['connect'](_0x566962['token'],_0x566962['webSocketUrl'],{'timeout':0x3e8*this['context']['config']['get']('cloudServices.connectionTimeout'),'requestTimeout':0x3e8*this['context']['config']['get']('cloudServices.requestTimeout')})['then'](_0x43f5de=>{if(this['connection']=_0x43f5de,this['bind']('state')['to'](_0x43f5de,'state',this,'_isBrowserOffline',(_0xef8dfa,_0x4372c3)=>('connected'!==_0xef8dfa&&(this['_shouldPluginsReconnect']=!0x0),_0x4372c3||_0xef8dfa!==_0x3ae417['CONNECTED']?_0x3ae417['DISCONNECTED']:this['state']==_0x3ae417['DISCONNECTED']&&this['_shouldPluginsReconnect']?(this['_shouldPluginsReconnect']=!0x1,this['_reconnect'](),_0x3ae417['CONNECTING']):_0x3ae417['CONNECTED'])),this['connection']['on']('error',(_0xb69326,_0x454298)=>{if('limitExceeded'!==_0x454298['code'])throw console['error'](_0x454298),new _0x45b2bc('cloudservices-init',null,{'originalError':_0x454298});_0x37dd40['showWarning']('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':'Connected\x20users\x20limit\x20exceeded','namespace':'real-time-collaboration'});}),!_0x43f5de['me'])return new Promise(_0x489248=>_0x43f5de['on']('change:me',_0x489248));})['catch'](_0x4a816b=>{throw console['error'](_0x4a816b),new _0x45b2bc('cloudservices-init',null,{'originalError':_0x4a816b});});}['addToReconnectionStack'](_0x16a2f6){if('function'!=typeof _0x16a2f6['reconnect'])throw new _0x45b2bc('websocketgateway-invalid-plugin-interface',this);if(this['isInReconnectionStack'](_0x16a2f6))throw new _0x45b2bc('websocketgateway-plugin-already-registered',this,{'name':_0x16a2f6['constructor']['pluginName']});this['_reconnectionStack']['add'](_0x16a2f6);}['removeFromReconnectionStack'](_0x5d800b){this['_reconnectionStack']['delete'](_0x5d800b);}['isInReconnectionStack'](_0xf76019){return this['_reconnectionStack']['has'](_0xf76019);}['_reconnect'](){return this['connection']['reconnect']()['then'](()=>Promise['all'](Array['from'](this['_reconnectionStack'],_0x78aee1=>_0x78aee1['reconnect']())))['then'](()=>this['state']=_0x3ae417['CONNECTED'])['catch'](_0x271e74=>{throw console['error'](_0x271e74),new _0x45b2bc('cloudservices-reconnection-error',this['context']);});}['destroy'](){this['connection']&&this['connection']['disconnect'](),this['state']=_0x3ae417['DISCONNECTED'],this['_domEmitter']['stopListening'](),super['destroy']();}}class r extends _0x2027c4{['channelSessions'];['channelConnectedUsers'];['allConnectedUsers'];['_registeredSessions'];['_uniqueUsersCount'];['_users'];static get['pluginName'](){return'Sessions';}static get['requires'](){return[c,_0x4b7d5a];}constructor(_0x18cefe){super(_0x18cefe),this['channelSessions']=new Map(),this['channelConnectedUsers']=new Map(),this['allConnectedUsers']=new _0x214a2f(),this['_registeredSessions']=new Map(),this['_uniqueUsersCount']=0x0,this['_users']=this['context']['plugins']['get'](_0x4b7d5a);}['init'](){const _0x3cb0ed=this['context']['plugins']['get'](c);this['listenTo'](_0x3cb0ed,'change:state',(_0x2bee60,_0x13c972,_0x5f588f)=>{if('connected'!==_0x5f588f)this['channelSessions']['forEach'](_0x40cd70=>_0x40cd70['clear']()),this['channelConnectedUsers']['forEach'](_0x5d4bed=>_0x5d4bed['clear']()),this['allConnectedUsers']['clear']();else{for(const [_0xff594c,_0x38591]of this['_registeredSessions'])for(const _0x1117d1 of _0x38591)this['_handleSessionAdd'](_0xff594c,_0x1117d1);}}),this['_createUser'](_0x3cb0ed['connection']['me'],!0x0);}['register'](_0x3414f5,_0x41b130){if(this['_registeredSessions']['has'](_0x3414f5))throw new _0x45b2bc('sessions-register-already-registered',null,{'channelId':_0x3414f5});this['_registeredSessions']['set'](_0x3414f5,_0x41b130),this['channelSessions']['set'](_0x3414f5,new _0x214a2f()),this['channelConnectedUsers']['set'](_0x3414f5,new _0x214a2f()),this['listenTo'](_0x41b130,'add',(_0x3a2320,_0x75c007)=>this['_handleSessionAdd'](_0x3414f5,_0x75c007)),this['listenTo'](_0x41b130,'remove',(_0x3d46eb,_0x24743b)=>this['_handleSessionRemove'](_0x3414f5,_0x24743b));for(const _0x24d872 of _0x41b130)this['_handleSessionAdd'](_0x3414f5,_0x24d872);}['unregister'](_0x6011bb){if(!this['_registeredSessions']['has'](_0x6011bb))throw new _0x45b2bc('sessions-unregister-not-exist',null,{'channelId':_0x6011bb});const _0x27b4e6=this['_registeredSessions']['get'](_0x6011bb);this['stopListening'](_0x27b4e6);for(const _0x212d9e of _0x27b4e6)'connected'===this['context']['plugins']['get'](c)['state']&&this['_handleSessionRemove'](_0x6011bb,_0x212d9e);this['_registeredSessions']['delete'](_0x6011bb),this['channelSessions']['delete'](_0x6011bb),this['channelConnectedUsers']['delete'](_0x6011bb);}get['mySessionId'](){return this['context']['plugins']['get'](c)['connection']['sessionId'];}['getUserBySessionId'](_0x5f4bc5){for(const _0x1f1101 of this['channelSessions']['values']())for(const _0x98356a of _0x1f1101)if(_0x98356a['id']===_0x5f4bc5)return _0x98356a['user'];}['getUserSessions'](_0x5cd27b,_0x8fd5ba){const _0x17841f=_0x8fd5ba?[this['channelSessions']['get'](_0x8fd5ba)]:this['channelSessions']['values'](),_0x4253da=new Set();for(const _0x13850b of _0x17841f)for(const _0x12d1a1 of _0x13850b)_0x12d1a1['user']['id']===_0x5cd27b['id']&&_0x4253da['add'](_0x12d1a1['id']);return _0x4253da;}['getUserRole'](_0x58c684){for(const _0x2dfc50 of this['channelSessions']['values']())for(const _0x28e120 of _0x2dfc50)if(_0x28e120['user']===_0x58c684)return _0x28e120['role'];}['_handleSessionAdd'](_0x19fc79,_0x1bd1ac){if('connected'!==this['context']['plugins']['get'](c)['state'])return;const _0xc5c4b3=_0x1bd1ac['user'],_0x441dfe=this['_users']['getUser'](_0xc5c4b3['id'])||this['_createUser'](_0xc5c4b3),_0x5a8814=Object['assign']({},_0x1bd1ac,{'user':_0x441dfe});this['channelSessions']['get'](_0x19fc79)['add'](_0x5a8814);const _0x25d299=this['channelConnectedUsers']['get'](_0x19fc79);_0x25d299['has'](_0x441dfe['id'])||_0x25d299['add'](_0x441dfe),this['allConnectedUsers']['has'](_0x441dfe['id'])||this['allConnectedUsers']['add'](_0x441dfe,_0x441dfe['isMe']?0x0:void 0x0),this['fire']('sessionAdd:'+_0x19fc79,{'channelId':_0x19fc79,'session':_0x5a8814});}['_handleSessionRemove'](_0x49bca0,_0x46fb60){if('connected'!==this['context']['plugins']['get'](c)['state'])return;const _0x15b38b=this['channelConnectedUsers']['get'](_0x49bca0),_0xf730ab=_0x46fb60['user'];_0xf730ab['id']&&(this['channelSessions']['get'](_0x49bca0)['remove'](_0x46fb60['id']),_0x15b38b['has'](_0xf730ab['id'])&&!this['getUserSessions'](_0xf730ab,_0x49bca0)['size']&&_0x15b38b['remove'](_0xf730ab['id']),this['allConnectedUsers']['get'](_0xf730ab['id'])&&!this['getUserSessions'](_0xf730ab)['size']&&this['allConnectedUsers']['remove'](_0xf730ab['id']));}['_createUser'](_0xf30b9f,_0x5625ca){const _0x475b63=this['_users']['addUser'](_0xf30b9f);return _0x5625ca&&this['_users']['defineMe'](_0xf30b9f['id']),_0x475b63['orderNumber']=this['_uniqueUsersCount']++,_0x475b63;}}class H extends _0x5595b0{['_domEmitter']=new(_0x329691())();static get['requires'](){return[r];}static get['pluginName'](){return'UserMarkers';}['init'](){const _0x43d7ce=this['editor'],_0x4f7e6c=_0x43d7ce['plugins']['get'](r);_0x43d7ce['conversion']['for']('editingDowncast')['markerToElement']({'model':'user:position','view':(_0x56f699,{writer:_0x4e5b65})=>function(_0x24acc2,_0x30b918,_0x1a8888,_0x291f58){const _0x48c3a8=_0x24acc2['markerName']['split'](':')[0x2],_0x17c052=_0x1a8888['getUserBySessionId'](_0x48c3a8);if(!_0x17c052||_0x48c3a8===_0x1a8888['mySessionId'])return;if(!_0x291f58['model']['schema']['checkChild'](_0x24acc2['markerRange']['start'],'$text'))return;const _0xa1a235={'class':'ck-user__marker\x20'+_0x17c052['color']['getMarkerClass'](),'data-name':_0x17c052['name'],'data-session-id':_0x48c3a8},_0x242daf=_0x291f58['model']['markers']['get'](_0x24acc2['markerName']),_0x6e1810=_0x242daf['getStart'](),_0xafb42b=_0x6e1810['nodeAfter'],_0x388b12=_0x291f58['model']['schema'];if(_0xafb42b&&_0x388b12['isObject'](_0xafb42b)&&_0x388b12['isInline'](_0xafb42b)&&!_0x291f58['model']['markers']['get']('user:range:'+_0x48c3a8)['getRange']()['isCollapsed'])return;const _0x566aaf=_0x6e1810['parent'];return _0x291f58['model']['schema']['isLimit'](_0x566aaf)&&!_0x291f58['model']['hasContent'](_0x566aaf)&&(_0xa1a235['contenteditable']=!0x1),function(_0x210a4b,_0x47b4e3,_0x3cc17e){const _0x31a9cf=_0x210a4b['createUIElement']('span',_0x47b4e3);return _0x210a4b['setCustomProperty']('userPositionMarker',!0x0,_0x31a9cf),_0x31a9cf['render']=function(_0x54ae99){const _0x430312=this['toDomElement'](_0x54ae99);return _0x430312['innerHTML']='⁠<span\x20class=\x22ck-user__marker-line\x22\x20contenteditable=\x22false\x22><span\x20class=\x22ck-user__marker-dot\x22></span></span><span\x20class=\x22ck-user__marker-tooltip\x22\x20contenteditable=\x22false\x22\x20spellcheck=\x22false\x22>'+_0x3cc17e['name']+'</span>⁠',_0x430312['addEventListener']('mouseenter',()=>{_0x430312['classList']['add']('ck-user__marker_hovered');}),_0x430312['addEventListener']('mouseleave',()=>{_0x430312['classList']['remove']('ck-user__marker_hovered');}),_0x430312;},_0x31a9cf['isSimilar']=function(_0xd57ed){return!(!this['getCustomProperty']('userPositionMarker')||!_0xd57ed['getCustomProperty']('userPositionMarker')||this['getAttribute']('data-session-id')!=_0xd57ed['getAttribute']('data-session-id'));},_0x31a9cf;}(_0x30b918,_0xa1a235,_0x17c052);}(_0x56f699,_0x4e5b65,_0x4f7e6c,_0x43d7ce)}),_0x43d7ce['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'user:range','view':_0x33e731=>function(_0x12ca80,_0x366b81){const _0x5c3af8=_0x12ca80['markerName']['split'](':')[0x2];if(_0x5c3af8===_0x366b81['mySessionId'])return null;const _0x459d85=_0x366b81['getUserBySessionId'](_0x5c3af8);if(!_0x459d85)return{'id':_0x5c3af8,'classes':[]};return{'id':_0x5c3af8,'classes':['ck-user__selection',_0x459d85['color']['getSelectionClass']()],'attributes':{'data-session-id':_0x5c3af8},'priority':0x7d0+_0x459d85['orderNumber']};}(_0x33e731,_0x4f7e6c)}),function(_0x388a32){const _0x113879=_0x388a32['model'],_0x1ee231=new Map(),_0x42678b=_0x388a32['plugins']['get'](r);_0x113879['markers']['on']('update:user:range',(_0x208a23,_0x454b70,_0x97daff,_0x1d8033)=>{if(!_0x1d8033&&_0x1ee231['get'](_0x454b70['name']))return _0x1ee231['get'](_0x454b70['name'])['detach'](),void _0x1ee231['delete'](_0x454b70['name']);const _0x1be407=_0x454b70['name']['split'](':')[0x2];if(_0x1be407===_0x42678b['mySessionId'])return;const _0x499c52='user:position:'+_0x1be407;_0x113879['markers']['has'](_0x499c52)&&_0x388a32['editing']['reconvertMarker'](_0x499c52),_0x454b70['on']('change:range',(_0x502ff9,_0x3ecbd0,_0x2e6a77)=>{if('$graveyard'!=_0x3ecbd0['root']['rootName']&&'$graveyard'==_0x454b70['getRange']()['root']['rootName']&&!_0x1ee231['has'](_0x454b70['name'])){const _0x36d74a=_0x113879['schema']['getNearestSelectionRange'](_0x2e6a77['deletionPosition']);if(_0x36d74a){const _0x3090f7=ht['fromRange'](_0x36d74a);_0x1ee231['set'](_0x454b70['name'],_0x3090f7),_0x3090f7['on']('change:range',(_0x54661f,_0x27c41f,_0x11d643)=>{if('$graveyard'==_0x3090f7['root']['rootName']){const _0x2c71dd=_0x113879['schema']['getNearestSelectionRange'](_0x11d643['deletionPosition']);_0x2c71dd?(_0x3090f7['start']=_0x2c71dd['start'],_0x3090f7['end']=_0x2c71dd['end']):(_0x1ee231['delete'](_0x454b70['name']),_0x3090f7['detach']());}});}}});}),_0x113879['document']['on']('change',()=>{_0x1ee231['size']>0x0&&_0x113879['enqueueChange']({'isUndoable':!0x1},_0x52cce9=>{for(const [_0x472c2a,_0x2ee650]of _0x1ee231)'$graveyard'==_0x113879['markers']['get'](_0x472c2a)['getRange']()['root']['rootName']&&(re(_0x472c2a['split'](':')[0x2],_0x2ee650['toRange'](),_0x113879,_0x52cce9),_0x2ee650['detach']());_0x1ee231['clear']();});});}(_0x43d7ce),this['_domEmitter']['listenTo'](_0x1d8bcf['document'],'keydown',(_0x3f125a,{key:_0xbc894f})=>{'Escape'===_0xbc894f&&function(_0x3db2e1){_0x3db2e1['editing']['view']['change'](_0x429581=>{for(const _0x3367fe of _0x3db2e1['model']['markers']){if(!_0x3367fe['name']['startsWith']('user:position'))continue;const _0x1edd64=_0x3db2e1['editing']['mapper']['markerNameToElements'](_0x3367fe['name']);if(_0x1edd64){for(const _0x59c649 of _0x1edd64)_0x429581['removeClass']('ck-user__marker_hovered',_0x59c649);}}});}(_0x43d7ce);},{'useCapture':!0x0});}['afterInit'](){const _0x2469e1=this['editor'],_0x293fe2=_0x2469e1['commands']['get']('undo');_0x293fe2&&_0x2469e1['model']['on']('applyOperation',(_0x283d47,_0x1cbbd9)=>{const _0xd04f04=_0x1cbbd9[0x0];if('marker'!=_0xd04f04['type']||!_0xd04f04['name']['startsWith']('user:'))return;const _0x1ef20a=_0xd04f04['batch'];_0x293fe2['_createdBatches']['has'](_0x1ef20a)&&(_0xd04f04['newRange']=_0xd04f04['oldRange']?_0x2469e1['model']['createRange'](_0xd04f04['oldRange']['start'],_0xd04f04['oldRange']['end']):null);},{'priority':'highest'});}['destroy'](){return this['_domEmitter']['stopListening'](),super['destroy']();}['createUserMarkerOperations'](){const _0x2b547c=this['editor'],_0x576b15=_0x2b547c['model']['document'],_0x3e5ee4=_0x2b547c['plugins']['get'](r);_0x2b547c['model']['enqueueChange']({'isUndoable':!0x1},_0x42fb67=>{const _0x575109='user:range:'+_0x3e5ee4['mySessionId'],_0x313d95='user:position:'+_0x3e5ee4['mySessionId'],_0x4024e3=_0x2b547c['model']['markers']['has'](_0x575109);_0x2b547c['editing']['view']['hasDomSelection']?re(_0x3e5ee4['mySessionId'],_0x576b15['selection']['getFirstRange'](),_0x2b547c['model'],_0x42fb67):_0x4024e3&&(_0x42fb67['removeMarker'](_0x575109),_0x42fb67['removeMarker'](_0x313d95));});}}function re(_0x2bd67b,_0x1be4ca,_0x389ddc,_0xf99aa9){const _0x3cca45='user:range:'+_0x2bd67b,_0x2c7b1a='user:position:'+_0x2bd67b,_0x2628dc=_0x1be4ca['getContainedElement']();let _0x497456=_0x1be4ca['start'];_0x2628dc&&_0x2628dc['is']('element','tableCell')&&(_0x497456=function(_0x5d60f8,_0x41fafc){for(const _0x3bcb11 of _0x5d60f8['getPositions']())if(_0x41fafc['schema']['checkChild'](_0x3bcb11,'$text'))return _0x3bcb11;}(_0x1be4ca,_0x389ddc),_0x1be4ca=_0xf99aa9['createRange'](_0x497456));const _0x49e657=_0xf99aa9['createRange'](_0x497456);_0x389ddc['markers']['has'](_0x3cca45)?(_0xf99aa9['updateMarker'](_0x3cca45,{'range':_0x1be4ca}),_0xf99aa9['updateMarker'](_0x2c7b1a,{'range':_0x49e657})):(_0xf99aa9['addMarker'](_0x3cca45,{'range':_0x1be4ca,'usingOperation':!0x0}),_0xf99aa9['addMarker'](_0x2c7b1a,{'range':_0x49e657,'usingOperation':!0x0}));}function q(_0x165436,_0x373e7e,_0x5727f4){const t=_0x165436['t'];switch(_0x373e7e){case'PENDING_ACTION_SENDING_DATA':return t({'string':'Sending\x20data\x20to\x20the\x20server.','id':'PENDING_ACTION_SENDING_DATA'});case'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.':return 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.');case'The\x20document\x20cannot\x20be\x20connected\x20back\x20to\x20the\x20server.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.':return t('The\x20document\x20cannot\x20be\x20connected\x20back\x20to\x20the\x20server.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.');case'The\x20document\x20details\x20could\x20not\x20be\x20taken\x20during\x20the\x20reconnection.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.':return t('The\x20document\x20details\x20could\x20not\x20be\x20taken\x20during\x20the\x20reconnection.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.');case'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.':return 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.');case'Synchronization\x20issue':return t('Synchronization\x20issue');case'Connected\x20users\x20list\x20dropdown\x20menu':return t('Connected\x20users\x20list\x20dropdown\x20menu');case'Collapsed\x20connected\x20users\x20list\x20(press\x20ENTER\x20to\x20open\x20it)':return t('Collapsed\x20connected\x20users\x20list\x20(press\x20ENTER\x20to\x20open\x20it)');case'Connected\x20users\x20list':return t('Connected\x20users\x20list');case'PENDING_ACTION_REVISION_HISTORY':return t({'string':'Unsaved\x20change\x20in\x20revision\x20history.','id':'PENDING_ACTION_REVISION_HISTORY'});case'CONNECTED_USERS':return t({'string':'1\x20connected\x20user\x20(me)','plural':'%0\x20connected\x20users','id':'CONNECTED_USERS'},_0x5727f4);default:return'';}}let K=0x1;class l extends _0x5595b0{static ['CollaborativeEditingService']=/* #__PURE__ -- @preserve */
25
+ ((()=>_0x1addfd)());['_offset'];['sessionId'];['serverHistory'];['_channelId'];['_service'];['_document'];['_compressor'];['_bufferedOperations'];['_knownOperations'];['_knownRootNames'];['_pendingAction'];['_hasSelectionChanged'];['_sendBufferedOperationsDelayId'];['_baseBufferDelay'];['_currentBufferDelay'];['_lastSyncedOperationId'];['_disconnectionOperations'];['_operationIdentifier'];static get['requires'](){return[c,r,H,_0x435f2b,_0x4b7d5a,_0x4c01e9];}static get['pluginName'](){return'RealTimeCollaborationClient';}get['cloudDocumentVersion'](){return this['_lastServerVersion']+this['_offset'];}get['_lastServerVersion'](){return this['serverHistory']['version']-this['_offset'];}get['lastSyncVersion'](){const _0x177531=this['serverHistory']['getOperations']();for(let _0xca8a7d=_0x177531['length']-0x1;_0xca8a7d>=0x0;_0xca8a7d--){const _0x38ede5=_0x177531[_0xca8a7d];if(!this['_disconnectionOperations']['has'](_0x38ede5))return _0x38ede5['baseVersion']+0x1-this['_offset'];}return 0x0;}constructor(_0x89a439){if(super(_0x89a439),this['_offset']=0x0,this['sessionId']=null,this['serverHistory']=new _0x1df7ab(),this['editor']['config']['define']('collaboration',{}),this['_channelId']=this['editor']['config']['get']('collaboration.channelId'),!this['_channelId'])throw new _0x45b2bc('collaboration-missing-channelid',this);const _0x5a1aea=_0x89a439['config']['get']('cloudServices.bundleVersion')||nt;this['_service']=new l['CollaborativeEditingService'](_0x5a1aea,this['_channelId']),this['_document']=this['editor']['model']['document'],this['_compressor']=new _0xf09287(),this['_bufferedOperations']=[],this['_knownOperations']=new WeakSet(),this['_knownRootNames']=new Set(),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 X(this['_disconnectionOperations']);}['init'](){const _0x2543e3=this['editor'],_0x259eed=_0x2543e3['plugins']['get'](_0x4b7d5a),_0x26671b=_0x2543e3['plugins']['get'](c);this['listenTo'](_0x259eed,'getOperationAuthor',(_0xf0196d,_0x144f28)=>{const _0x4920e4=_0x144f28[0x0];_0x4920e4['_authorId']&&(_0xf0196d['return']=_0x259eed['getUser'](_0x4920e4['_authorId']),_0xf0196d['stop']()),null===_0x4920e4['_authorId']&&(_0xf0196d['return']=null,_0xf0196d['stop']());},{'priority':'high'}),this['listenTo'](_0x2543e3['model']['document']['selection'],'change:range',(_0x464108,_0x35c0b9)=>{_0x35c0b9['directChange']&&this['_refreshUserSelectionMarkers']();}),this['listenTo'](_0x2543e3['editing']['view'],'change:hasDomSelection',()=>{this['_refreshUserSelectionMarkers']();}),this['_initThrowingOnDataSet'](),_0x2543e3['model']['on']('applyOperation',(_0x6cd5e,_0x243ff3)=>{const _0x547f9a=_0x243ff3[0x0];_0x547f9a['isDocumentOperation']&&(this['_saveOperationInBuffer'](_0x547f9a),this['_shouldSendUpdate']()&&this['_sendBufferedOperationsDelayed']());}),this['_setUpDataInit'](),this['bind']('_isEditingAllowed')['to'](_0x26671b,'state',this,'_hasSynchronizationProblem',(_0x5e7f3a,_0x546022)=>'connected'===_0x5e7f3a&&!_0x546022),this['on']('change:_isEditingAllowed',()=>{this['_isEditingAllowed']?_0x2543e3['disableReadOnlyMode']('rtc-offline'):_0x2543e3['enableReadOnlyMode']('rtc-offline');}),this['_isEditingAllowed']?_0x2543e3['disableReadOnlyMode']('rtc-offline'):_0x2543e3['enableReadOnlyMode']('rtc-offline'),this['set']('_isConnected',!0x1);}async['reconnect'](){const _0x147ded=this['editor']['plugins']['get'](r),_0x452782=this['editor']['plugins']['get'](c);try{this['_isPendingUpdate']=!0x0,_0x147ded['unregister'](this['_channelId']);const _0x330880=await this['_service']['reconnect'](_0x452782['connection'],this['lastSyncVersion']);await this['_handleReconnectionResponse'](_0x330880)&&(this['_isPendingUpdate']=!0x1,this['_clearPendingAction']());const _0x40f113=await this['_service']['getConnectedSessions']();_0x147ded['register'](this['_channelId'],_0x40f113),this['_handleSendingSelectionMarkers'](),this['_isConnected']=!0x0;}catch(_0x40573c){if(function(_0x222316){return'404'===_0x222316['code'];}(_0x40573c)&&this['sessionId'])await this['_connectAfterSessionHasBeenFlushed']();else{if(function(_0x4525b3){return'409'===_0x4525b3['code'];}(_0x40573c)){const _0x953f97=q(this['editor']['locale'],'The\x20document\x20cannot\x20be\x20connected\x20back\x20to\x20the\x20server.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.');this['_handleReconnectionError'](_0x953f97);}else{if(!(_0x40573c instanceof J))throw _0x40573c;this['_handleReconnectionError']();}}}}['destroy'](){const _0x17ccaf=this['editor']['plugins']['get'](c),_0x59d273=this['editor']['plugins']['get'](r);this['editor']['enableReadOnlyMode']('rtc-destroyed'),_0x59d273['channelSessions']['has'](this['_channelId'])&&_0x59d273['unregister'](this['_channelId']),_0x17ccaf['removeFromReconnectionStack'](this),this['_disconnectService'](),super['destroy']();}async['_handleReconnectionResponse'](_0x56dd5f){if(this['sessionId']!==_0x56dd5f['sessionId']&&this['_lastSyncedOperationId']!==_0x56dd5f['lastOperationId'])throw new J();return this['sessionId']=_0x56dd5f['sessionId'],this['_handleServerResponse']([],{..._0x56dd5f,'wereChangesApplied':!0x1,'data':_0x56dd5f['data']},'reconnect');}async['_connectService'](_0x58d8db,_0x2f92f2=!0x1){const {connection:_0x4e996c}=this['editor']['plugins']['get'](c);l['CollaborativeEditingService']['getConnectedSessions'](_0x4e996c,this['_channelId'])['then'](_0x28f7ff=>this['_initSessionsHandling'](_0x28f7ff))['catch'](_0x3c9cef=>{this['_crash']('realtimecollaborationclient-init-session-connection-error',_0x3c9cef);}),this['listenTo'](this['_service'],'operationsReceived',this['_handleReceivedOperations']['bind'](this)),this['listenTo'](this['_service'],'error',(_0x2b69ff,_0x3b412d)=>{this['_crash']('realtimecollaborationclient-initservice-internal-error',_0x3b412d);}),this['listenTo'](this['_service'],'disconnected',()=>{this['_isConnected']=!0x1;});const _0x5237b8=this['_operationIdentifier']['getIdOfTheLastOperation'](_0x58d8db);this['_isPendingUpdate']=!0x0;const _0xe71a15=await this['_service']['connect'](_0x4e996c,this['_compressOperations'](_0x58d8db),_0x5237b8);if(this['sessionId']=_0xe71a15['sessionId'],_0x2f92f2){if(!_0xe71a15['wereChangesApplied'])return void this['_handleReconnectionError']();this['_isPendingUpdate']=!0x1,this['_clearPendingAction'](),this['serverHistory']['reset'](),this['_offset']=_0xe71a15['offset'],this['serverHistory']['version']=this['_offset'],await this['_handleServerResponse'](_0x58d8db,_0xe71a15,'reconnection:\x20flushed\x20session');}else await this['_handleInitialConnectionData'](_0xe71a15,_0x58d8db);this['_handleSendingSelectionMarkers'](),this['_isConnected']=!0x0;}['_handleSendingSelectionMarkers'](){const _0x2e6236=this['editor']['plugins']['get'](r),_0xf8ae24=this['editor']['plugins']['get'](H),_0x27a0a3=_0x2e6236['channelSessions']['get'](this['_channelId']);_0x27a0a3&&_0x27a0a3['length']>0x1?_0xf8ae24['createUserMarkerOperations']():this['listenTo'](_0x2e6236,'sessionAdd:'+this['_channelId'],()=>{0x2===_0x2e6236['channelSessions']['get'](this['_channelId'])['length']&&_0xf8ae24['createUserMarkerOperations']();});}async['_handleReceivedOperations'](_0x10f200,_0x526b22,_0x3ee431,_0x1bea67){if(!this['_isPendingUpdate']&&this['_document']['version']==_0x526b22){const _0x11001f=this['_decompressOperations'](_0x3ee431,_0x1bea67);await this['_fetchMissingUsers'](_0x11001f),this['_handleExternalOperations'](_0x11001f,_0x526b22,_0x3ee431['lastOperationId'])||this['_crash']('realtimecollaborationclient-initservice-incorrect-server-operation');}}async['_connectAfterSessionHasBeenFlushed'](){this['_disconnectService']();const {locale:_0x1487a4}=this['editor'];let _0x59ba9c;try{_0x59ba9c=await this['_service']['getDocumentDetails']();}catch(_0x596717){const _0x2443e4=q(_0x1487a4,'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'](_0x2443e4);}const _0x52c19d=_0x59ba9c['currentDocumentSession']||_0x59ba9c['lastDocumentSession'];if(this['_lastSyncedOperationId']===_0x52c19d['lastOperationId'])await this['_connectService'](this['editor']['model']['document']['history']['getOperations'](),!0x0);else{const _0x445811=q(_0x1487a4,'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'](_0x445811);}}['_disconnectService'](){this['_service']['disconnect'](),this['_bufferedOperations']=[],clearTimeout(this['_sendBufferedOperationsDelayId']),this['stopListening'](this['_service']);}['_initSessionsHandling'](_0x423b6f){const _0x5b09ef=this['editor']['plugins']['get'](r);this['listenTo'](_0x5b09ef,'sessionAdd:'+this['_channelId'],(_0x5d8b60,{session:_0xbc2ae1})=>{if(_0xbc2ae1['id']===_0x5b09ef['mySessionId']){_0x5d8b60['off']();const _0xd15f4b=this['editor']['plugins']['has']('CommentsOnly')&&this['editor']['plugins']['get']('CommentsOnly');let _0xd8231=_0xbc2ae1['permissions'];_0xd15f4b&&_0xd15f4b['isEnabled']&&(_0xd8231=_0xd8231['filter'](_0x4beaef=>'document:write'!==_0x4beaef)),this['editor']['plugins']['get']('Permissions')['setPermissions'](_0xd8231,this['_channelId']);}}),_0x5b09ef['register'](this['_channelId'],_0x423b6f);}['_initThrowingOnDataSet'](){const _0x34ed77=this['editor']['data']['set'];this['editor']['data']['set']=(..._0x8a3029)=>{if(!_0x8a3029[_0x8a3029['length']-0x1]['suppressErrorInCollaboration'])throw new _0x45b2bc('realtimecollaborationclient-editor-setdata-and-editor-data-set-are-forbidden-in-real-time-collaboration',this);_0x34ed77['apply'](this['editor']['data'],_0x8a3029);};}['_setUpDataInit'](){this['editor']['data']['on']('init',(_0x661e4f,[_0x5473f7])=>{if(this['_document']['version'])throw new _0x45b2bc('realtimecollaborationclient-init-document-already-initialized',this);_0x661e4f['stop'](),this['_setPendingAction']();const _0x5715b8=this['editor']['config']['get']('rootsAttributes'),_0x30a9a1=this['_getOperationsFromInitData'](_0x5473f7,_0x5715b8);0x0==_0x30a9a1['length']&&_0x30a9a1['push'](new _0x35337d(0x0)),_0x661e4f['return']=this['_connectService'](_0x30a9a1)['then'](()=>{this['editor']['plugins']['get'](c)['addToReconnectionStack'](this),this['editor']['data']['fire']('ready');})['catch'](_0x35b1c5=>this['_crash']('realtimecollaborationclient-init-connection-failed',_0x35b1c5))['finally'](()=>this['_clearPendingAction']());},{'priority':'high'}),this['editor']['on']('loadRoot',async(_0xe9f200,[_0x561845,_0x37cef5])=>{_0xe9f200['stop']();const _0x248ed7=this['editor']['model']['document']['getRoot'](_0x561845);if(!this['_knownRootNames']['has'](_0x561845)){const _0x27d3dd=_0x37cef5&&_0x37cef5['data']?_0x37cef5['data']:'',_0x5d71f8=_0x37cef5&&_0x37cef5['attributes']?_0x37cef5['attributes']:{};await this['_loadRoot'](_0x561845,_0x27d3dd,_0x5d71f8);}this['editor']['model']['enqueueChange']({'isUndoable':!0x1},()=>{_0x248ed7['_isLoaded']=!0x0,this['editor']['model']['document']['differ']['_bufferRootLoad'](_0x248ed7);});},{'priority':'high'});}async['_fetchMissingUsers'](_0x2a761a){const _0x24a873=this['editor']['plugins']['get'](_0x4b7d5a),{connection:_0x48efd3}=this['editor']['plugins']['get'](c),_0x4fdac4=new Set();for(const _0x8509cd of _0x2a761a){const _0x67f18f=_0x8509cd['_authorId'];_0x67f18f&&!_0x24a873['getUser'](_0x67f18f)&&_0x4fdac4['add'](_0x67f18f);}if(0x0===_0x4fdac4['size'])return;const _0x11439c=await lt['getMany'](_0x48efd3,Array['from'](_0x4fdac4));for(const _0x238311 of _0x11439c)_0x24a873['getUser'](_0x238311['id'])||_0x24a873['addUser'](_0x238311);}['_getOperationsFromInitData'](_0x982e36,_0x2ed78c={}){const _0xcbbea2=this['editor']['model'],_0x4a2d86=[];let _0x51eaa0=0x0;const _0x2e9560='string'==typeof _0x982e36?{'main':_0x982e36}:_0x982e36;for(const _0x3435b8 of Object['keys'](_0x2e9560)){if(!this['_document']['roots']['has'](_0x3435b8))throw new _0x45b2bc('realtimecollaborationclient-init-non-existent-root',this);const _0x3051b8=this['editor']['data']['parse'](_0x2e9560[_0x3435b8]),_0x58724e=this['_document']['getRoot'](_0x3435b8),_0x3f2605=new _0x276440(_0xcbbea2['createPositionAt'](_0x58724e,0x0),_0x3051b8,_0x51eaa0++);_0x4a2d86['push'](_0x3f2605);for(const [_0x1b5f8d,_0x23e35d]of _0x3051b8['markers']){const _0x57407e=_0xcbbea2['createRange'](_0xcbbea2['createPositionFromPath'](_0x58724e,_0x23e35d['start']['path']['slice']()),_0xcbbea2['createPositionFromPath'](_0x58724e,_0x23e35d['end']['path']['slice']())),_0x82d5d8=new _0x2d59f0(_0x1b5f8d,null,_0x57407e,_0xcbbea2['markers'],!0x0,_0x51eaa0++);_0x4a2d86['push'](_0x82d5d8);}}if(_0x2ed78c)for(const [_0x3ca80a,_0x50d03a]of Object['entries'](_0x2ed78c)){const _0x2f1b00=_0xcbbea2['document']['getRoot'](_0x3ca80a);if(!_0x2f1b00)throw new _0x45b2bc('multi-root-editor-root-attributes-no-root',null);for(const [_0x307330,_0x5a198a]of Object['entries'](_0x50d03a))if(null!==_0x5a198a){const _0x54348d=new _0x586ee8(_0x2f1b00,_0x307330,null,_0x5a198a,_0x51eaa0++);_0x4a2d86['push'](_0x54348d);}}return _0x4a2d86;}async['_loadRoot'](_0x51f460,_0x9b5df9,_0x176c24){this['_getOperationsFromInitData']({[_0x51f460]:_0x9b5df9},{[_0x51f460]:_0x176c24})['forEach']((_0x965a2d,_0x172e7c)=>{_0x965a2d['baseVersion']=this['_document']['version']+_0x172e7c,_0x965a2d['_isInit']=!0x0,this['_saveOperationInBuffer'](_0x965a2d);}),this['_sendBufferedOperationsDelayed'](),await this['_waitUntilSynced']();}async['_handleInitialConnectionData'](_0x6f6aa3,_0x2ccaff){let _0x5aded8;this['_offset']=_0x6f6aa3['offset'];const _0x152276=_0x6f6aa3['wereChangesApplied']&&!_0x6f6aa3['initData'],_0x11c04d=_0x152276?0x0:_0x6f6aa3['data']['baseVersion'];if(_0x2ccaff['forEach'](_0x261d7b=>{_0x261d7b['_isInit']=!0x0,_0x261d7b['createdAt']=_0x6f6aa3['sessionCreatedAt'],_0x261d7b['_authorId']=null;}),_0x152276)_0x5aded8=_0x2ccaff,this['_applyOperationsSet'](_0x5aded8,_0x152276);else{if(_0x6f6aa3['initData']){const _0x1aeb84=this['_getOperationsFromInitData'](_0x6f6aa3['initData']);this['_document']['history']['version']=-_0x1aeb84['length'],_0x1aeb84['forEach'](_0x6b3f83=>{_0x6b3f83['baseVersion']-=_0x1aeb84['length'],_0x6b3f83['createdAt']=_0x6f6aa3['sessionCreatedAt'],_0x6b3f83['_isInit']=!0x0,_0x6b3f83['_authorId']=null;}),this['_applyOperationsSet'](_0x1aeb84,!0x0),this['serverHistory']['version']=-_0x1aeb84['length']+this['_offset'],this['_updateServerHistory'](_0x1aeb84);}this['_document']['history']['version']=_0x11c04d,_0x5aded8=this['_decompressOperations'](_0x6f6aa3['data'],_0x6f6aa3['metadata']),await this['_fetchMissingUsers'](_0x5aded8),this['_applyOperationsSet'](_0x5aded8,_0x152276);}_0x6f6aa3['lastOperationId']&&(this['_operationIdentifier']['setIdForTheLastOperation'](_0x5aded8,_0x6f6aa3['lastOperationId']),this['_lastSyncedOperationId']=_0x6f6aa3['lastOperationId']),this['serverHistory']['version']=_0x11c04d+this['_offset'],this['_updateServerHistory'](_0x5aded8),_0x2ccaff['filter'](_0x29f9ba=>{const _0x494758=this['_getAffectedRoot'](_0x29f9ba);return _0x494758&&!this['_knownRootNames']['has'](_0x494758);})['forEach']((_0x6857df,_0x5eea3c)=>{_0x6857df['baseVersion']=this['_document']['version']+_0x5eea3c,this['_saveOperationInBuffer'](_0x6857df);}),this['_shouldSendUpdate']()?(this['_currentBufferDelay']=0x0,this['_sendBufferedOperationsDelayed'](!0x0),await this['_waitUntilSynced']()):(this['_isPendingUpdate']=!0x1,this['_clearPendingAction']());}['_crash'](_0x4cf5a9,_0x1d0015){throw this['_isPendingUpdate']=!0x0,_0x1d0015&&console['error'](_0x1d0015),new _0x45b2bc(_0x4cf5a9,this['editor']);}['_saveOperationInBuffer'](_0x5360b2){this['_knownOperations']['has'](_0x5360b2)||(this['_knownOperations']['add'](_0x5360b2),this['_bufferedOperations']['push'](_0x5360b2),this['_pendingAction']||'marker'==_0x5360b2['type']&&!_0x5360b2['affectsData']||this['_setPendingAction']());}['_sendBufferedOperationsDelayed'](_0x3f8520=!0x1){!_0x3f8520&&this['_isPendingUpdate']||(this['_isPendingUpdate']=!0x0,clearTimeout(this['_sendBufferedOperationsDelayId']),this['_sendBufferedOperationsDelayId']=setTimeout(()=>{this['_sendBufferedOperations']()['then'](_0x194309=>{_0x194309&&(this['_clearPendingAction'](),this['_isPendingUpdate']=!0x1);})['catch'](_0x2c4a22=>{if(this['_clearPendingAction'](),this['_isPendingUpdate']=!0x1,!function(_0x2421c0){return _0x2421c0['message']['startsWith']('cloud-services-internal-error:\x20Not\x20connected.')||_0x2421c0['message']['startsWith']('cloud-services-internal-error:\x20Collaborative\x20Editing\x20Service\x20is\x20not\x20connected.')||_0x2421c0['message']['startsWith']('cloud-services-internal-error:\x20Request\x20timeout.');}(_0x2c4a22))throw _0x2c4a22;});},this['_currentBufferDelay']));}['_waitUntilSynced'](){return new Promise(_0x1d4f07=>{this['on']('change:_isPendingUpdate',()=>{_0x1d4f07();});});}async['_sendBufferedOperations'](){const _0x25455f=this['editor']['plugins']['get'](H);if(this['_shouldSendSelectionUpdate']()&&(_0x25455f['createUserMarkerOperations'](),this['_hasSelectionChanged']=!0x1),!this['_shouldSendUpdate']())return!0x0;const _0x34d7bb=[...this['_bufferedOperations']];for(const _0x41b149 of _0x34d7bb)_0x41b149['wasUndone']=this['_document']['history']['isUndoneOperation'](_0x41b149);const _0x5d5601=this['_operationIdentifier']['getIdOfTheLastOperation'](_0x34d7bb),_0x42d51a=K++,_0x1d027a=this['_compressOperations'](_0x34d7bb),_0x1be134=await this['_service']['sendOperations'](_0x1d027a,_0x1d027a['baseVersion'],_0x5d5601);try{return await this['_handleServerResponse'](_0x34d7bb,_0x1be134,_0x42d51a);}catch(_0x43efee){return this['_crash']('realtimecollaborationclient-sendbufferedoperations',_0x43efee);}}async['_handleServerResponse'](_0x37b586,_0x25412c,_0x17e0e3){if('error'in _0x25412c)throw _0x25412c['error'];let _0xf93b89=!0x1;if(_0x25412c['wereChangesApplied']){_0x25412c['lastOperationId']&&(this['_lastSyncedOperationId']=_0x25412c['lastOperationId']),this['_bufferedOperations']=this['_bufferedOperations']['filter'](_0x52645b=>!_0x37b586['includes'](_0x52645b));for(const _0x1a3819 of _0x37b586)_0x1a3819['createdAt']='lastOperationAcceptedAt'in _0x25412c&&_0x25412c['lastOperationAcceptedAt']||void 0x0;Q(_0x37b586,_0x25412c['version']-_0x37b586['length']),this['_updateServerHistory'](_0x37b586);const _0x53a09c=_0x37b586['filter'](_0x1f2b9f=>{if(!_0x1f2b9f['_isInit'])return!0x1;const _0x5cbee2=this['_getAffectedRoot'](_0x1f2b9f);return _0x5cbee2&&!this['_knownRootNames']['has'](_0x5cbee2);});Q(_0x53a09c,this['_document']['version']),this['_applyOperationsSet'](_0x53a09c),_0xf93b89=!0x0,this['_currentBufferDelay']=this['_baseBufferDelay'];}else{const _0x3e1549=this['_decompressOperations'](_0x25412c['data'],_0x25412c['metadata'])['filter'](_0x360c4e=>_0x360c4e['baseVersion']>=this['_lastServerVersion']);_0x3e1549['forEach'](_0x137daa=>this['_addKnownRoot'](_0x137daa)),this['_bufferedOperations']=this['_bufferedOperations']['filter'](_0x35e4a4=>!_0x35e4a4['_isInit']||!this['_knownRootNames']['has'](this['_getAffectedRoot'](_0x35e4a4))),this['_bufferedOperations']['length']&&Q(this['_bufferedOperations'],this['_bufferedOperations'][0x0]['baseVersion']),await this['_fetchMissingUsers'](_0x3e1549),_0xf93b89=this['_handleExternalOperations'](_0x3e1549,_0x25412c['version'],_0x25412c['lastOperationId']),this['_currentBufferDelay']=Math['round'](this['_currentBufferDelay']/0x2);}return _0xf93b89?!this['_shouldSendUpdate']()||(this['_sendBufferedOperationsDelayed'](!0x0),!0x1):this['_crash']('realtimecollaborationclient-handleserverresponse');}['_handleExternalOperations'](_0x292071,_0xb4cbc6,_0x1253ff){try{const _0x54e7f8={'document':this['_document'],'useRelations':!0x1,'padWithNoOps':!0x0},{operationsA:_0x3ace90,operationsB:_0x1586a4,originalOperations:_0x1e748d}=_0x2ccf9c(_0x292071,this['_bufferedOperations'],_0x54e7f8);Q(_0x3ace90,this['_document']['version']),Q(_0x1586a4,_0xb4cbc6);for(const _0x5f2ed1 of _0x3ace90){const _0x58b2b2=_0x1e748d['get'](_0x5f2ed1);_0x5f2ed1['_authorId']=_0x58b2b2?_0x58b2b2['_authorId']:null;}_0x1253ff&&(this['_operationIdentifier']['setIdForTheLastOperation'](_0x292071,_0x1253ff),this['_lastSyncedOperationId']=_0x1253ff),this['_bufferedOperations']=[..._0x1586a4],this['_applyOperationsSet'](_0x3ace90),this['_updateServerHistory'](_0x292071);}catch(_0x1aaf9a){return console['error'](_0x1aaf9a),!0x1;}return!0x0;}['_applyOperationsSet'](_0x161235,_0x4cc434=!0x1){this['editor']['model']['enqueueChange']({'isUndoable':!0x1,'isLocal':!0x1},_0x37569e=>{for(const _0x31ef29 of _0x161235)this['_knownOperations']['add'](_0x31ef29),this['_addKnownRoot'](_0x31ef29),_0x37569e['batch']['addOperation'](_0x31ef29),this['editor']['model']['applyOperation'](_0x31ef29);});}['_addKnownRoot'](_0x256a4d){const _0x4993b1=this['_getAffectedRoot'](_0x256a4d);_0x4993b1&&this['_knownRootNames']['add'](_0x4993b1);}['_getAffectedRoot'](_0x2f2a0f){let _0x147273,_0x698ddb;switch(_0x2f2a0f['type']){case'insert':_0x147273=_0x2f2a0f['position']['root'];break;case'marker':if(_0x698ddb=_0x2f2a0f['newRange'],!_0x698ddb)return null;_0x147273=_0x698ddb['root'];break;case'addRootAttribute':_0x147273=_0x2f2a0f['root'];break;case'addRoot':_0x147273=_0x2f2a0f['affectedSelectable'];break;case'move':_0x147273=_0x2f2a0f['targetPosition']['root'];break;default:return null;}return _0x147273['rootName'];}['_updateServerHistory'](_0x33cadf){_0x33cadf['forEach'](_0x55df02=>{const _0x32550e=_0x55df02['clone']();_0x32550e['_authorId']=_0x55df02['_authorId'],_0x32550e['_isInit']=!!_0x55df02['_isInit'],_0x32550e['createdAt']=_0x55df02['createdAt'],_0x32550e['baseVersion']+=this['_offset'],_0x55df02['_isDisconnection']&&this['_disconnectionOperations']['add'](_0x32550e),this['serverHistory']['addOperation'](_0x32550e);});}['_handleReconnectionError'](_0x922056){const _0x462a8c=this['editor']['plugins']['get']('Notification'),_0x4c5d87=this['editor']['locale'];_0x922056||(_0x922056=q(_0x4c5d87,'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.')),_0x462a8c['showWarning'](_0x922056,{'title':q(_0x4c5d87,'Synchronization\x20issue'),'namespace':'real-time-collaboration'}),this['_hasSynchronizationProblem']=!0x0,clearTimeout(this['_sendBufferedOperationsDelayId']),this['_bufferedOperations']=[],this['editor']['plugins']['get'](c)['destroy']();}['_setPendingAction'](){this['_pendingAction']||(this['_pendingAction']=this['editor']['plugins']['get'](_0x435f2b)['add'](q(this['editor']['locale'],'PENDING_ACTION_SENDING_DATA')));}['_clearPendingAction'](){this['_pendingAction']&&(this['editor']['plugins']['get'](_0x435f2b)['remove'](this['_pendingAction']),this['_pendingAction']=null);}['_compressOperations'](_0xf06fce){const _0x5bd0f2=_0xf06fce['map'](_0x576e1b=>_0x576e1b['toJSON']());return this['_compressor']['compress'](_0x5bd0f2);}['_decompressOperations'](_0x1d40d6,_0x3f6f9d){return this['_compressor']['decompress'](_0x1d40d6)['map']((_0xdf633,_0x56e4a8)=>{const _0x53537a='init'==_0x3f6f9d[_0x56e4a8]['type'];if('InsertOperation'==_0xdf633['__className']){const _0x110919=_0xdf633['position']['root'];!this['_document']['getRoot'](_0x110919)&&(this['_document']['createRoot']('$root',_0x110919)['_isAttached']=!0x1);}const _0x3cd97c=_0x437c9e['fromJSON'](_0xdf633,this['_document']);return _0x3cd97c['wasUndone']=_0xdf633['wasUndone'],_0x3cd97c['_isInit']=_0x53537a,_0x3cd97c['_authorId']=_0x53537a?null:_0x3f6f9d[_0x56e4a8]['userId'],_0x3cd97c['_isDisconnection']='cs:removeUser'===_0x3f6f9d[_0x56e4a8]['type'],_0x3cd97c['createdAt']=_0x3f6f9d[_0x56e4a8]['createdAt'],_0x3cd97c;});}['_refreshUserSelectionMarkers'](){this['_hasSelectionChanged']=!0x0,this['_shouldSendSelectionUpdate']()?this['_sendBufferedOperationsDelayed']():this['_hasSelectionChanged']=!0x1;}['_shouldSendSelectionUpdate'](){const _0x1b5320=this['editor']['plugins']['get'](r)['channelSessions']['get'](this['_channelId']);return!this['editor']['isReadOnly']&&!!_0x1b5320&&_0x1b5320['length']>0x1&&this['_hasSelectionChanged'];}['_shouldSendUpdate'](){return this['_bufferedOperations']['length']>0x0||this['_shouldSendSelectionUpdate']();}}class J extends Error{}function Q(_0x1eb3d0,_0x5584f7){for(const _0x2e1c0e of _0x1eb3d0)_0x2e1c0e['baseVersion']=_0x5584f7++;}class X{['_ignoredOperations'];['_operationToId'];constructor(_0x42b0d8){this['_ignoredOperations']=_0x42b0d8,this['_operationToId']=new WeakMap();}['getIdOfTheLastOperation'](_0x3ccb74){let _0x50e5a3=_0x3ccb74['length'];for(;_0x50e5a3--;){const _0x19a456=_0x3ccb74[_0x50e5a3];if(!this['_ignoredOperations']['has'](_0x19a456)){if(!this['_operationToId']['has'](_0x19a456)){const _0x47565f=_0xa13132()['slice'](0x1,0x12);this['_operationToId']['set'](_0x19a456,_0x47565f);}return this['_operationToId']['get'](_0x19a456);}}}['setIdForTheLastOperation'](_0x2acd29,_0x205693){if(!_0x205693)return;let _0x21e065=_0x2acd29['length'];for(;_0x21e065--;){const _0x292538=_0x2acd29[_0x21e065];this['_ignoredOperations']['has'](_0x292538)||this['_operationToId']['set'](_0x292538,_0x205693);}}}class n extends _0x5595b0{static get['requires'](){return[l];}static get['pluginName'](){return'RealTimeCollaborativeEditing';}}class a extends _0x2027c4{static ['CommentsService']=/* #__PURE__ -- @preserve */
26
+ ((()=>_0x4fe77a)());['_services'];static get['requires'](){return[c,'CommentsRepository',r,_0x4b7d5a];}static get['pluginName'](){return'CloudServicesCommentsAdapter';}constructor(_0x2d7afc){super(_0x2d7afc),this['_services']=new Map();}async['init'](){const _0x13e64a=this['context'],_0x477124=_0x13e64a['plugins']['get']('CommentsRepository');if(_0x13e64a['plugins']['get'](c)['addToReconnectionStack'](this),_0x477124['adapter']={'addCommentThread':async({channelId:_0x20d9b6,threadId:_0x399bd6,comments:_0x40f61a,resolvedAt:_0x351a04,resolvedBy:_0x464cca,context:_0x93be6b,attributes:_0x5f4ab5})=>{const _0x2ea694=await this['_getService'](_0x20d9b6)['addCommentThread']({'commentThreadId':_0x399bd6,'comments':_0x40f61a['map'](_0x4ee600=>function(_0x5d5326,_0x1e8246,_0x2453e9){return{'commentThreadId':_0x2453e9,'commentId':_0x5d5326['commentId'],'userId':_0x5d5326['authorId'],'content':_0x5d5326['content'],'documentId':_0x1e8246,'createdAt':_0x5d5326['createdAt'],'attributes':_0x5d5326['attributes']||{}};}(_0x4ee600,_0x20d9b6,_0x399bd6)),'resolvedAt':_0x351a04,'resolvedBy':_0x464cca,'context':_0x93be6b,'attributes':_0x5f4ab5})['catch'](ut);return{'threadId':_0x2ea694['commentThreadId'],'comments':_0x2ea694['comments']};},'getCommentThread':async({channelId:_0x5d4e19,threadId:_0x53e838})=>{const _0x37fd03=await this['_getService'](_0x5d4e19)['getCommentThread'](_0x53e838)['catch'](ut);return _0x37fd03['deletedAt']?null:(await this['_fetchMissingUsersForThreads']([_0x37fd03]),{'threadId':_0x37fd03['commentThreadId'],'comments':_0x37fd03['comments']['map'](S),'context':_0x37fd03['context'],'resolvedAt':_0x37fd03['resolvedAt'],'resolvedBy':_0x37fd03['resolvedBy'],'attributes':_0x37fd03['attributes']||{}});},'updateCommentThread':async({channelId:_0x5ce4da,threadId:_0x297007,context:_0x2f07e2,unlinkedAt:_0x26f66f,attributes:_0x525579})=>this['_getService'](_0x5ce4da)['updateCommentThread']({'commentThreadId':_0x297007,'context':_0x2f07e2,'attributes':_0x525579,'unlinkedAt':_0x26f66f})['catch'](B)['catch'](ut),'resolveCommentThread':async({channelId:_0x1499ad,threadId:_0x4b32a8})=>{const _0x9b8ab7=await this['_getService'](_0x1499ad)['resolveCommentThread'](_0x4b32a8)['catch'](B)['catch'](ut);return{'threadId':_0x9b8ab7['commentThreadId'],'resolvedAt':_0x9b8ab7['resolvedAt'],'resolvedBy':_0x9b8ab7['resolvedBy']};},'reopenCommentThread':async({channelId:_0x5e7085,threadId:_0x56c760})=>this['_getService'](_0x5e7085)['reopenCommentThread'](_0x56c760)['catch'](B)['catch'](ut),'removeCommentThread':({channelId:_0x542f0c,threadId:_0x32ece7})=>this['_getService'](_0x542f0c)['removeCommentThread'](_0x32ece7)['catch'](B)['catch'](ut),'addComment':({channelId:_0x5c4009,threadId:_0x114222,commentId:_0x4e937c,content:_0x2781bc,attributes:_0x125b7f})=>this['_getService'](_0x5c4009)['addComment'](_0x114222,_0x4e937c,_0x2781bc,_0x125b7f)['catch'](ut),'updateComment':({channelId:_0x55a5fa,threadId:_0x3bb8f6,commentId:_0x2945eb,content:_0x380564,attributes:_0x4b103b})=>this['_getService'](_0x55a5fa)['updateComment'](_0x3bb8f6,_0x2945eb,_0x380564,_0x4b103b)['catch'](B)['catch'](ut),'removeComment':({channelId:_0x597063,threadId:_0x424c01,commentId:_0x20e93c})=>this['_getService'](_0x597063)['removeComment'](_0x424c01,_0x20e93c)['catch'](B)['catch'](ut)},_0x13e64a instanceof _0x37cba0){const _0xca1547=_0x13e64a['config']['get']('collaboration.channelId'),_0x28555f=_0x13e64a['plugins']['get'](r);await this['_setUpService'](_0xca1547);const _0x14df66=await this['_services']['get'](_0xca1547)['getConnectedSessions']();this['listenTo'](_0x28555f,'sessionAdd:'+_0xca1547,(_0x35d8ae,{session:_0x373209})=>{_0x373209['id']===_0x28555f['mySessionId']&&(_0x35d8ae['off'](),this['context']['plugins']['get']('Permissions')['setPermissions'](_0x373209['permissions'],_0xca1547));}),_0x28555f['register'](_0xca1547,_0x14df66);}}async['_setUpService'](_0x45ee38){if(this['_services']['has'](_0x45ee38))throw new _0x45b2bc('cloudservicescommentsadapter-connect-already-connected',null,{'channelId':_0x45ee38});const _0x5eafd1=this['context']['plugins']['get']('CommentsRepository'),_0x28d031=new a['CommentsService'](_0x45ee38);this['_services']['set'](_0x45ee38,_0x28d031),this['listenTo'](_0x28d031,'commentThreadAdded',(_0x310b8c,_0x44979e)=>{const {commentThreadId:_0x2b228e,documentId:_0x50fd7a,context:_0x5f2412,attributes:_0x5ed914,resolvedAt:_0xfef13e,resolvedBy:_0x2e2ab2,comments:_0x1ec0ff}=_0x44979e;_0x5eafd1['getCommentThread'](_0x2b228e)||_0x5eafd1['addCommentThread']({'threadId':_0x2b228e,'channelId':_0x50fd7a,'comments':_0x1ec0ff?_0x1ec0ff['map'](S):[],'context':_0x5f2412,'attributes':_0x5ed914,'resolvedAt':_0xfef13e,'resolvedBy':_0x2e2ab2,'isFromAdapter':!0x0});}),this['listenTo'](_0x28d031,'commentThreadUpdated',(_0x278b19,{commentThreadId:_0x266f36,documentId:_0x129f30,context:_0x3e26cf,unlinkedAt:_0x44399d,attributes:_0xb9a64e})=>{_0x5eafd1['getCommentThread'](_0x266f36)&&_0x5eafd1['updateCommentThread']({'threadId':_0x266f36,'channelId':_0x129f30,'context':_0x3e26cf,'unlinkedAt':_0x44399d,'attributes':_0xb9a64e,'isFromAdapter':!0x0});}),this['listenTo'](_0x28d031,'commentThreadResolved',(_0x12e8ca,{commentThreadId:_0x36316b,resolvedBy:_0x27e82a,resolvedAt:_0x116b44})=>{const _0x16834d=_0x5eafd1['getCommentThread'](_0x36316b);_0x16834d&&_0x16834d['resolve']({'resolvedBy':_0x27e82a,'resolvedAt':_0x116b44,'isFromAdapter':!0x0});}),this['listenTo'](_0x28d031,'commentThreadReopened',(_0x131895,{commentThreadId:_0x42dc47})=>{const _0x2fec90=_0x5eafd1['getCommentThread'](_0x42dc47);_0x2fec90&&_0x2fec90['reopen']({'isFromAdapter':!0x0});}),this['listenTo'](_0x28d031,'commentThreadRemoved',(_0x4aeb52,{commentThreadId:_0x5283ef})=>{const _0x39aa3f=_0x5eafd1['getCommentThread'](_0x5283ef);_0x39aa3f&&_0x39aa3f['remove']({'isFromAdapter':!0x0});}),this['listenTo'](_0x28d031,'commentAdded',(_0x1600fd,_0x63b94b)=>{const _0x17286c=_0x63b94b['commentThreadId'],_0x267a17=_0x5eafd1['getCommentThread'](_0x17286c);_0x267a17&&_0x267a17['addComment']({...S(_0x63b94b),'isFromAdapter':!0x0});}),this['listenTo'](_0x28d031,'commentUpdated',(_0x11942d,{commentThreadId:_0x59aee2,commentId:_0x2999be,content:_0x6b6546,attributes:_0x31bd81})=>{const _0x2ad6ae=_0x5eafd1['getCommentThread'](_0x59aee2);if(_0x2ad6ae){const _0x3697b5=_0x2ad6ae['getComment'](_0x2999be);_0x3697b5&&_0x3697b5['update']({'content':_0x6b6546,'attributes':_0x31bd81,'isFromAdapter':!0x0});}}),this['listenTo'](_0x28d031,'commentRemoved',(_0x5e0f3b,{commentThreadId:_0x40ed2c,commentId:_0x3a8121})=>{const _0x26faac=_0x5eafd1['getCommentThread'](_0x40ed2c);if(_0x26faac){const _0x1e07f6=_0x26faac['getComment'](_0x3a8121);_0x1e07f6&&_0x1e07f6['remove']({'isFromAdapter':!0x0});}}),await this['_connectService'](_0x45ee38);}['destroy'](){if(this['context']instanceof _0x37cba0){const _0x156bea=this['context']['config']['get']('collaboration.channelId');this['_terminateService'](_0x156bea);}}['_terminateService'](_0x249a16){if(!this['_services']['has'](_0x249a16))throw new _0x45b2bc('cloudservicescommentsadapter-disconnect-not-exist',null,{'channelId':_0x249a16});this['_getService'](_0x249a16)['disconnect'](),this['_services']['delete'](_0x249a16);}async['reconnect'](){for(const _0x8ab9ae of this['_services']['keys']())await this['_connectService'](_0x8ab9ae);if(this['context']instanceof _0x37cba0){const _0x23172a=this['context']['config']['get']('collaboration.channelId'),_0xc20860=this['context']['plugins']['get'](r);_0xc20860['unregister'](_0x23172a);const _0x1b6874=await this['_services']['get'](_0x23172a)['getConnectedSessions']();_0xc20860['register'](_0x23172a,_0x1b6874);}}async['_connectService'](_0x132b3c){const {connection:_0x28b7a7}=this['context']['plugins']['get'](c),_0x2803bc=this['context']['plugins']['get']('CommentsRepository'),_0x3dc048=this['_services']['get'](_0x132b3c),_0xf8f58f=await _0x3dc048['connect'](_0x28b7a7);await this['_fetchMissingUsersForThreads'](_0xf8f58f);const _0x4936e5=new Set(Array['from'](_0x2803bc['getCommentThreads']({'channelId':_0x132b3c}),_0x2a9cf2=>_0x2a9cf2['id']));for(const _0x12cd69 of _0xf8f58f)_0x12cd69['deletedAt']||_0x4936e5['delete'](_0x12cd69['commentThreadId']);for(const _0x3a6194 of _0x4936e5)_0x2803bc['getCommentThread'](_0x3a6194)['remove']({'isFromAdapter':!0x0});for(const _0x6c3001 of _0xf8f58f){let _0x4267f4=_0x2803bc['getCommentThread'](_0x6c3001['commentThreadId']);const {commentThreadId:_0x4760a5,context:_0x564e6b,attributes:_0x3745bb,resolvedBy:_0xe5d94a,resolvedAt:_0x44e293,unlinkedAt:_0x4f40a4,deletedAt:_0x275e12}=_0x6c3001;if(_0x275e12)continue;_0x4267f4||(_0x4267f4=_0x2803bc['addCommentThread']({'channelId':_0x132b3c,'threadId':_0x4760a5,'context':_0x564e6b,'attributes':_0x3745bb||{},'resolvedBy':_0xe5d94a,'resolvedAt':_0x44e293,'unlinkedAt':_0x4f40a4,'isFromAdapter':!0x0}));const _0x4f46b6=new Set(Array['from'](_0x4267f4['comments'],_0x443394=>_0x443394['id']));for(const _0x32c7a3 of _0x6c3001['comments'])_0x4f46b6['delete'](_0x32c7a3['commentId']);for(const _0x1ea69a of _0x4f46b6)_0x4267f4['getComment'](_0x1ea69a)['remove']({'isFromAdapter':!0x0});for(const _0x1122df of _0x6c3001['comments']){const _0x1ee899=_0x4267f4['getComment'](_0x1122df['commentId']);_0x1ee899?_0x1ee899['content']!==_0x1122df['content']&&_0x1ee899['update']({'content':_0x1122df['content'],'isFromAdapter':!0x0}):_0x4267f4['addComment'](Object['assign'](S(_0x1122df),{'isFromAdapter':!0x0}));}}}['_getService'](_0x2917e4){if(!this['_services']['has'](_0x2917e4))throw new _0x45b2bc('cloudservicescommentsadapter-service-not-exist',null,{'channelId':_0x2917e4});return this['_services']['get'](_0x2917e4);}async['_fetchMissingUsersForThreads'](_0x130cf8){const _0x55a74e=this['context']['plugins']['get'](_0x4b7d5a),{connection:_0x524878}=this['context']['plugins']['get'](c),_0x1fc18c=new Set();for(const {resolvedBy:_0x1ec533,comments:_0x2b0a77}of _0x130cf8){_0x1ec533&&!_0x55a74e['getUser'](_0x1ec533)&&_0x1fc18c['add'](_0x1ec533);for(const {userId:_0x4f1676}of _0x2b0a77)_0x55a74e['getUser'](_0x4f1676)||_0x1fc18c['add'](_0x4f1676);}if(0x0===_0x1fc18c['size'])return;const _0x58ff0e=await lt['getMany'](_0x524878,Array['from'](_0x1fc18c));for(const _0x53cac3 of _0x58ff0e)_0x55a74e['getUser'](_0x53cac3['id'])||_0x55a74e['addUser'](_0x53cac3);}}async function B(_0xc5bdec){if('404'!==_0xc5bdec['code'])throw _0xc5bdec;}function ut(_0x1a1f62){if((_0x4b973f=_0x1a1f62)['message']['startsWith']('cloud-services-internal-error:\x20Comments\x20Service\x20is\x20not\x20connected.')||_0x4b973f['message']['startsWith']('cloud-services-internal-error:\x20Not\x20connected.')||_0x4b973f['message']['startsWith']('cloud-services-internal-error:\x20Request\x20timeout.'))return new Promise(()=>{});var _0x4b973f;throw _0x1a1f62;}function S(_0x37f33c){return{'threadId':_0x37f33c['commentThreadId'],'commentId':_0x37f33c['commentId'],'content':_0x37f33c['content'],'createdAt':_0x37f33c['createdAt'],'authorId':_0x37f33c['userId'],'attributes':_0x37f33c['attributes']||{}};}class g extends _0x5595b0{static ['TrackChangesService']=/* #__PURE__ -- @preserve */
27
+ ((()=>et)());['_bufferedRequests'];['_trackChangesService'];static get['requires'](){return[a,'TrackChangesEditing',c];}constructor(_0x54c8dd){super(_0x54c8dd);const _0x3e50fc=this['editor']['config']['get']('collaboration.channelId');this['_bufferedRequests']=new Map(),this['_trackChangesService']=new g['TrackChangesService'](_0x3e50fc);}['init'](){const _0x4e0fcb=this['editor']['plugins']['get'](c),_0x3b4816=this['editor']['plugins']['get']('TrackChangesEditing');return _0x3b4816['adapter']={'getSuggestion':async _0x5b89dc=>{await this['_waitForServiceReady']();const _0x2f9770=await this['_trackChangesService']['get'](_0x5b89dc)['catch'](R);return await this['_fetchMissingUsersForThreads']([_0x2f9770]),_0x2f9770;},'addSuggestion':async({id:_0x59d671,type:_0x309af2,data:_0x454bac,originalSuggestionId:_0xa74401,attributes:_0xf42d1a})=>{await this['_waitForServiceReady']();const _0x578ba2={'id':_0x59d671,'type':_0x309af2,'data':_0x454bac,'originalSuggestionId':_0xa74401,'attributes':_0xf42d1a},_0x231e2d=await this['_trackChangesService']['add'](_0x59d671,_0x309af2,_0x454bac,_0xa74401,_0xf42d1a)['catch'](_0x1663a5=>{if(ft(_0x1663a5))return new Promise(_0x14d8c3=>{this['_bufferedRequests']['set'](_0x59d671,{'resolve':_0x14d8c3,'suggestionData':_0x578ba2});});throw _0x1663a5;});return this['_bufferedRequests']['delete'](_0x59d671),_0x231e2d;},'updateSuggestion':async(_0x22f105,_0x420aae)=>{if(await this['_waitForServiceReady'](),'open'!==_0x420aae['state'])return this['_trackChangesService']['update'](_0x22f105,_0x420aae)['catch'](R);}},this['listenTo'](this['_trackChangesService'],'suggestionUpdated',(_0x355e27,_0x53f76a)=>{_0x3b4816['hasSuggestion'](_0x53f76a['id'])&&(_0x3b4816['getSuggestion'](_0x53f76a['id'])['attributes']=_0x53f76a['attributes']);}),this['_trackChangesService']['connect'](_0x4e0fcb['connection'])['then'](_0x14385c=>(_0x4e0fcb['addToReconnectionStack'](this),this['_fetchMissingUsersForThreads'](_0x14385c)['then'](()=>{for(const _0x37f756 of _0x14385c){_0x3b4816['addSuggestionData'](_0x37f756)['_saved']=!0x0;}})));}async['reconnect'](){const _0x4022d9=this['editor']['plugins']['get']('TrackChangesEditing'),{connection:_0x42c95f}=this['editor']['plugins']['get'](c),_0x17d90f=await this['_trackChangesService']['connect'](_0x42c95f);await this['_fetchMissingUsersForThreads'](_0x17d90f);for(const {suggestionData:_0x2b66f2,resolve:_0x3fe5bd}of this['_bufferedRequests']['values']()){let _0x4eebf5=_0x17d90f['find'](_0x53a7b7=>_0x53a7b7['id']===_0x2b66f2['id']);_0x4eebf5||(_0x4eebf5=await this['_trackChangesService']['add'](_0x2b66f2['id'],_0x2b66f2['type'],_0x2b66f2['data'],_0x2b66f2['originalSuggestionId'])),_0x3fe5bd(_0x4eebf5);}for(const _0x28d2aa of _0x17d90f)_0x4022d9['hasSuggestion'](_0x28d2aa['id'])||_0x4022d9['addSuggestionData'](_0x28d2aa);}async['_waitForServiceReady'](){this['_trackChangesService']['isConnected']||await new Promise(_0x3f24fa=>{this['listenTo'](this['_trackChangesService'],'connected',_0x519f35=>{_0x519f35['off'](),_0x3f24fa();});});}async['_fetchMissingUsersForThreads'](_0x54d0b6){const _0x59b168=this['editor']['plugins']['get'](_0x4b7d5a),{connection:_0x554618}=this['editor']['plugins']['get'](c),_0x57e1f1=new Set();for(const {authorId:_0x240723}of _0x54d0b6)_0x59b168['getUser'](_0x240723)||_0x57e1f1['add'](_0x240723);if(0x0===_0x57e1f1['size'])return;const _0x2bc418=await lt['getMany'](_0x554618,Array['from'](_0x57e1f1));for(const _0x3cf130 of _0x2bc418)_0x59b168['getUser'](_0x3cf130['id'])||_0x59b168['addUser'](_0x3cf130);}}function R(_0x38f802){if(ft(_0x38f802))return new Promise(()=>{});throw _0x38f802;}function ft(_0x253637){return _0x253637['message']['startsWith']('cloud-services-internal-error:\x20Not\x20connected.')||_0x253637['message']['startsWith']('cloud-services-internal-error:\x20Request\x20timeout.');}class m extends _0x5595b0{static get['requires'](){return['Comments',a,n,c];}static get['pluginName'](){return'RealTimeCollaborativeComments';}['init'](){const _0x839c61=this['editor']['plugins']['get'](c),_0x13cb26=this['editor']['plugins']['get']('CommentsEditing'),_0x39d517=this['editor']['plugins']['get'](a);return this['editor']['data']['once']('ready',()=>{this['listenTo'](_0x839c61,'change:state',(_0x4f8f4d,_0x18ba7d,_0x1d8fb1)=>{_0x13cb26['isThreadsLoadingPaused']='connected'!==_0x1d8fb1;});}),this['listenTo'](_0x839c61,'change:state',(_0x4452d1,_0x470f26,_0x578e75)=>{this['editor']['plugins']['get']('CommentsRepository')['switchReadOnly']('connected'!==_0x578e75);}),_0x39d517['_setUpService'](this['editor']['config']['get']('collaboration.channelId'));}['destroy'](){this['editor']['plugins']['get'](a)['_terminateService'](this['editor']['config']['get']('collaboration.channelId')),super['destroy']();}}class p extends _0x5595b0{static get['requires'](){return[m,g,'TrackChanges'];}static get['pluginName'](){return'RealTimeCollaborativeTrackChanges';}}class v extends _0x5595b0{static ['RevisionHistoryService']=/* #__PURE__ -- @preserve */
28
+ ((()=>it)());['_lastRequestId'];['_revisionTracker'];['_revisionHistoryService'];['_oldOffset'];static get['requires'](){return[c,l,'RevisionTracker',r,_0x4b7d5a];}constructor(_0x201f43){super(_0x201f43);const _0xc685ee=this['editor']['config']['get']('collaboration.channelId');this['_lastRequestId']=null,this['_revisionTracker']=this['editor']['plugins']['get']('RevisionTracker'),this['_revisionHistoryService']=new v['RevisionHistoryService'](_0xc685ee);}async['init'](){const _0x513cd6=this['editor']['plugins']['get'](l),_0x39e91a=_0x513cd6['serverHistory'],_0x40711a=this['editor']['plugins']['get'](c);this['_revisionTracker']['setSource']({'history':_0x39e91a,'getLatestVersion':()=>this['_getLatestVersion'](),'getCurrentRevisionId':()=>_0x513cd6['sessionId']});const _0x1b12d0=this['editor']['config']['get']('cloudServices.bundleVersion')||nt,_0x5bc905=await tt['isBundleUploaded'](_0x40711a['connection'],_0x1b12d0);this['_revisionTracker']['adapter']={'getRevision':async({revisionId:_0x525aa3})=>(await this['_waitForServiceReady'](),await this['_revisionHistoryService']['getRevision'](_0x525aa3)),'updateRevisions':async _0x43e979=>{await this['_waitForServiceReady']();const _0x583b79=this['_revisionTracker']['currentRevision'];if(_0x5bc905&&0x1===_0x43e979['length']&&_0x43e979[0x0]['id']===_0x583b79['id'])return _0x43e979;for(const _0x1492a0 of _0x43e979)_0x1492a0['id']===_0x583b79['id']&&(_0x1492a0['isEmptyCurrent']=_0x1492a0['fromVersion']===_0x1492a0['toVersion']);return this['_revisionHistoryService']['updateRevisions'](_0x43e979,this['_lastRequestId'])['then'](_0x43cee4=>(this['_lastRequestId']=_0x43cee4,_0x43e979))['catch'](_0x4f3c3a=>{if(st(_0x4f3c3a)||'400'===_0x4f3c3a['code']&&void 0x0!==_0x4f3c3a['data']['wrongRequestId']){for(const _0x327481 of _0x43e979){!this['_revisionTracker']['repository']['getRevision'](_0x327481['id'])||this['_revisionTracker']['_bufferUpdate'](_0x327481['id'],_0x327481,!0x1);}if(st(_0x4f3c3a))throw _0x4f3c3a;return _0x43e979;}throw _0x4f3c3a;});}},this['listenTo'](this['_revisionHistoryService'],'revisionsUpdated',(_0x241c8a,{revisionsData:_0x326d82,requestId:_0x5d5f7d})=>{Math['max'](..._0x326d82['map'](_0x80e60b=>_0x80e60b['toVersion']))>this['_getLatestVersionFromServerOperations']()-0x1?this['_getLatestVersion']()['then'](()=>{this['_handleRevisionsUpdate'](_0x326d82,_0x5d5f7d);}):this['_handleRevisionsUpdate'](_0x326d82,_0x5d5f7d);});const {revisions:_0x5a11a6,requestId:_0x188705}=await this['_revisionHistoryService']['connect'](_0x40711a['connection']);_0x40711a['addToReconnectionStack'](this),this['_lastRequestId']=_0x188705,await this['_fetchMissingUsers'](_0x5a11a6);for(const _0x2b6949 of _0x5a11a6)this['_revisionTracker']['addRevisionData'](_0x2b6949);this['listenTo'](_0x513cd6,'change:_isConnected',(_0x4702d2,_0x4293a0,_0x547dbb)=>{_0x547dbb&&(this['_oldOffset']=_0x513cd6['_offset'],_0x4702d2['off']());}),this['_revisionTracker']['bind']('isEnabled')['to'](_0x40711a,'state',_0x225f27=>_0x225f27===_0x3ae417['CONNECTED']);}async['reconnect'](){const _0x562295=this['editor']['plugins']['get'](c),_0x329f3d=this['editor']['plugins']['get'](l),_0xcaad4d=async()=>{const _0x11b9e1=this['_revisionTracker']['currentRevision'],_0x3bef06=_0x11b9e1['id'],_0x310d22=_0x3bef06!==_0x329f3d['sessionId'];if(_0x310d22){const _0xdb7161=_0x329f3d['_offset']-this['_oldOffset'],_0x539284=this['_getLatestVersionFromServerOperations']();this['_revisionTracker']['_revisionDataBuilder']['reInit']();if(_0x11b9e1['toVersion']+_0xdb7161!==_0x539284){const _0xdc65a0=_0x11b9e1['fromVersion']+_0xdb7161,_0x2af80f=this['editor']['plugins']['get'](_0x4b7d5a),_0x1b9e1b=this['_revisionTracker']['buildRevisionData']({'revision':_0x11b9e1,'from':_0xdc65a0,'to':_0x539284});_0x1b9e1b['id']=_0x11b9e1['id'];const _0x5b9e43=_0x1b9e1b['authorsIds']['map'](_0x5c76cc=>_0x2af80f['getUser'](_0x5c76cc));_0x11b9e1['_update']({..._0x1b9e1b,'authors':_0x5b9e43},!0x0),this['_revisionTracker']['_bufferUpdate'](_0x11b9e1['id'],_0x1b9e1b,!0x0);}this['_revisionTracker']['_startingVersion']=_0x539284,(_0x11b9e1['toVersion']===_0x11b9e1['fromVersion']&&!this['_revisionTracker']['_bufferedUpdates']['has'](_0x3bef06)&&this['_revisionTracker']['repository']['_revisions']['remove'](_0x3bef06),this['_revisionTracker']['_createCurrentRevision'](_0x539284));}const {revisions:_0x12fc0b,requestId:_0x1422ce}=await this['_revisionHistoryService']['reconnect'](_0x562295['connection'],this['_lastRequestId']);_0x310d22&&_0x12fc0b['length']>0x0?_0x329f3d['_handleReconnectionError']():(await this['_fetchMissingUsers'](_0x12fc0b),this['_handleRevisionsUpdate'](_0x12fc0b,_0x1422ce),this['_revisionTracker']['sendBufferedUpdates']());};return _0x329f3d['_isConnected']?_0xcaad4d():new Promise((_0x1d5d00,_0x1058c1)=>{_0x329f3d['once']('change:_isConnected',()=>{_0xcaad4d()['then'](_0x1d5d00)['catch'](_0x1058c1);});});}['destroy'](){super['destroy']();}async['_waitForServiceReady'](){this['_revisionHistoryService']['isConnected']||await new Promise(_0x2e128a=>{this['listenTo'](this['_revisionHistoryService'],'connected',_0x515465=>{_0x515465['off'](),_0x2e128a();});});}['_getLatestVersionFromServerOperations'](){const _0x144cad=this['editor']['plugins']['get'](l)['serverHistory']['getOperations']()['reverse']();for(const _0x39985b of _0x144cad)if('marker'!==_0x39985b['type']||_0x39985b['affectsData'])return _0x39985b['baseVersion']+0x1;}['_getLatestVersion'](){const _0x2ad1c0=this['editor']['plugins']['get'](l);return new Promise(_0x33398e=>{_0x2ad1c0['_isPendingUpdate']?_0x2ad1c0['once']('change:_isPendingUpdate',()=>{_0x33398e(this['_getLatestVersionFromServerOperations']());}):_0x33398e(this['_getLatestVersionFromServerOperations']());});}['_handleRevisionsUpdate'](_0x406cd6,_0x916ff3){const _0x1a8988=this['_revisionTracker']['repository'];this['_lastRequestId']=_0x916ff3;for(const _0x3d55ab of _0x406cd6){const _0x2fd91c=_0x1a8988['getRevision'](_0x3d55ab['id']);if(_0x2fd91c){if((_0x3d55ab['fromVersion']||_0x3d55ab['toVersion'])&&(_0x3d55ab['diffData']=null),_0x2fd91c===this['_revisionTracker']['currentRevision']){const _0x2804ea=Math['max'](_0x2fd91c['toVersion'],_0x3d55ab['toVersion']),_0x536446=Math['max'](_0x2fd91c['fromVersion'],_0x3d55ab['fromVersion']);let _0x53cf8f;_0x2fd91c['toVersion']===_0x3d55ab['toVersion']&&_0x2fd91c['fromVersion']===_0x3d55ab['fromVersion']?(_0x53cf8f=!0x0,this['_preventResendingRevisionData'](_0x3d55ab)):_0x3d55ab['toVersion']===_0x2804ea&&_0x3d55ab['fromVersion']===_0x536446?_0x53cf8f=!0x1:(_0x2fd91c['toVersion']===_0x2804ea&&_0x2fd91c['fromVersion']===_0x536446||this['_fixRevision']({'revision':_0x2fd91c,'from':_0x536446,'to':_0x2804ea}),_0x53cf8f=!0x0),_0x53cf8f&&(delete _0x3d55ab['fromVersion'],delete _0x3d55ab['toVersion'],delete _0x3d55ab['diffData'],delete _0x3d55ab['createdAt'],delete _0x3d55ab['authorsIds']);}this['_revisionTracker']['setRevisionData'](_0x3d55ab),this['_preventResendingRevisionData'](_0x3d55ab);}else this['_revisionTracker']['addRevisionData'](_0x3d55ab);}const _0x6a9e36=_0x1a8988['getRevisions']();_0x6a9e36['reverse']();for(let _0x4949e7=0x0;_0x4949e7<_0x6a9e36['length']-0x1;_0x4949e7++){const _0x1d4781=_0x6a9e36[_0x4949e7],_0x17667e=_0x6a9e36[_0x4949e7+0x1];if(_0x1d4781['fromVersion']<_0x17667e['toVersion']){const _0x4c384f=_0x17667e['toVersion'],_0x4e05e7=Math['max'](_0x4c384f,_0x1d4781['toVersion']);this['_fixRevision']({'revision':_0x1d4781,'from':_0x4c384f,'to':_0x4e05e7});}}}['_fixRevision']({revision:_0x1d3905,from:_0x1d5c8e,to:_0x3431dc}={}){const _0x52a149=this['editor']['plugins']['get'](_0x4b7d5a),_0x325d77=this['_revisionTracker']['buildRevisionData']({'revision':_0x1d3905,'from':_0x1d5c8e,'to':_0x3431dc});_0x325d77['authors']=_0x325d77['authorsIds']['map'](_0x318ce1=>_0x52a149['getUser'](_0x318ce1)),_0x1d3905['_update'](_0x325d77);}['_preventResendingRevisionData'](_0x2390d2){const _0x14c3ae={};_0x14c3ae['id']=_0x2390d2['id'];for(const _0xbb152b of Object['keys'](_0x2390d2))'id'!==_0xbb152b&&(_0x14c3ae[_0xbb152b]=void 0x0);this['_revisionTracker']['_bufferUpdate'](_0x14c3ae['id'],_0x14c3ae,!0x0);}async['_fetchMissingUsers'](_0x47474c){const _0x52cc70=this['editor']['plugins']['get'](_0x4b7d5a),{connection:_0xd097a}=this['editor']['plugins']['get'](c),_0x1354ef=new Set();for(const _0x3ad0b4 of _0x47474c){for(const _0xa525e of _0x3ad0b4['authorsIds'])_0x529e4d(_0xa525e);_0x3ad0b4['creatorId']&&_0x529e4d(_0x3ad0b4['creatorId']);}if(0x0===_0x1354ef['size'])return;const _0xe6ecc6=await lt['getMany'](_0xd097a,Array['from'](_0x1354ef));for(const _0x12dbb0 of _0xe6ecc6)_0x52cc70['getUser'](_0x12dbb0['id'])||_0x52cc70['addUser'](_0x12dbb0);function _0x529e4d(_0x37df13){_0x52cc70['getUser'](_0x37df13)||_0x1354ef['add'](_0x37df13);}}}function st(_0x57b79d){return _0x57b79d['message']['startsWith']('cloud-services-internal-error:\x20Revision\x20History\x20Service\x20is\x20not\x20connected.')||_0x57b79d['message']['startsWith']('cloud-services-internal-error:\x20Not\x20connected.')||_0x57b79d['message']['startsWith']('cloud-services-internal-error:\x20Request\x20timeout.');}class d extends _0x5595b0{static get['requires'](){return['RevisionHistory',v,n];}static get['pluginName'](){return'RealTimeCollaborativeRevisionHistory';}}class ts extends _0x54e89c{constructor(_0x40884b){super(_0x40884b);const _0xa8cb21=this['bindTemplate'];this['set']('usersCount',0x0),this['set']('isHidden',!0x0),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-presence-list__counter',_0xa8cb21['if']('isHidden','ck-presence-list__counter--hidden')]},'children':[{'text':_0xa8cb21['to']('usersCount',_0x1be705=>q(_0x40884b,'CONNECTED_USERS',_0x1be705))}]});}}class es extends _0x54e89c{['items'];['keystrokes'];constructor(_0x141d7e){super(_0x141d7e);const _0x5cf55e=this['bindTemplate'];this['items']=this['createCollection'](),this['keystrokes']=new _0x2ce6aa(),this['set']({'hasPopup':!0x1,'isExpanded':!0x1}),this['setTemplate']({'tag':'div','attributes':{'aria-haspopup':_0x5cf55e['if']('hasPopup'),'aria-expanded':_0x5cf55e['to']('isExpanded',_0x4e504f=>this['hasPopup']&&String(_0x4e504f)),'aria-label':_0x5cf55e['to']('hasPopup',_0x43dcff=>q(_0x141d7e,_0x43dcff?'Collapsed\x20connected\x20users\x20list\x20(press\x20ENTER\x20to\x20open\x20it)':'Connected\x20users\x20list')),'role':'list','tabindex':_0x5cf55e['to']('hasPopup',_0x5577b0=>!!_0x5577b0&&0x0),'class':['ck','ck-presence-list__list']},'children':this['items'],'on':{'click':_0x5cf55e['to'](()=>this['fire']('execute'))}}),this['on']('change:hasPopup',(_0x26d826,_0x227a3c,_0xa9f08a)=>{this['element']&&(_0xa9f08a?this['element']['setAttribute']('aria-expanded',String(this['isExpanded'])):this['element']['removeAttribute']('aria-expanded'));});}['focus'](){this['element']['focus']();}['render'](){super['render'](),this['keystrokes']['listenTo'](this['element']);}}class L extends _0x54e89c{['counterView'];['inlineListView'];constructor(_0x1e6860){super(_0x1e6860);const _0x42bba4=this['bindTemplate'];this['set']('isCollapsed',!0x0),this['counterView']=new ts(this['locale']),this['inlineListView']=new es(_0x1e6860),this['inlineListView']['bind']('hasPopup')['to'](this,'isCollapsed'),this['listenTo'](this['inlineListView']['items'],'change',()=>{for(const _0x818434 of this['inlineListView']['items'])_0x818434['tooltipPosition']='s';this['inlineListView']['items']['first']&&(this['inlineListView']['items']['first']['tooltipPosition']='se');}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-presence-list','ck-reset','ck-rounded-corners',_0x42bba4['if']('isCollapsed','ck-presence-list--collapsed')]},'children':[this['counterView'],this['inlineListView']]});}}class j extends _0x54e89c{['listWrapperView'];constructor(_0x4d9d52,_0x542343){super(_0x4d9d52),this['listWrapperView']=new mt(_0x4d9d52,_0x542343),this['setTemplate']({'tag':'div','attributes':{'tabindex':-0x1,'role':'application','class':['ck','ck-presence-list__dropdown-list'],'aria-label':q(_0x4d9d52,'Connected\x20users\x20list\x20dropdown\x20menu')},'children':[this['listWrapperView']]});}}class mt extends _0x2f86d0{constructor(_0x4e706d,_0x4cf73b){super(_0x4e706d);const _0x2be12c=this['bindTemplate'];this['set']('_isScrollable',!0x1),this['setTemplate']({'tag':_0x4cf73b?'div':'ul','attributes':{'class':['ck','ck-reset','ck-list','ck-presence-list__dropdown-list-wrapper',_0x2be12c['if']('_isScrollable','ck-presence-list__dropdown-list-wrapper_scrollable')],'role':_0x2be12c['to']('role'),'aria-label':_0x2be12c['to']('ariaLabel'),'aria-labelledby':_0x2be12c['to']('ariaLabelledBy')},'children':this['items']}),this['listenTo'](_0x1d8bcf['window'],'resize',()=>this['checkIfScrollable']()),this['items']['on']('change',()=>this['checkIfScrollable']());}['render'](){super['render'](),this['checkIfScrollable']();}['checkIfScrollable'](){const _0x115429=this['element'];_0x115429&&(this['_isScrollable']=Math['max'](_0x115429['scrollHeight'],_0x115429['clientHeight'])>0.8*window['innerHeight']);}}class k extends rt{['userView'];constructor(_0x596363,_0x2e7170,_0x35f12d){super(_0x596363);const _0xa8fd94=this['bindTemplate'];this['userView']=new ct(_0x596363,_0x2e7170);const _0x53e15f={'tag':'li','attributes':{'class':['ck','ck-presence-list__dropdown-list-item'],'tabindex':-0x1,'role':'presentation','aria-label':_0x2e7170['name']},'children':[this['userView'],{'tag':'span','attributes':{'class':['ck','ck-user__full-name']},'children':[{'text':_0x2e7170['name']}]},{'tag':'span','attributes':{'class':['ck','ck-presence-list__marker',_0x2e7170['color']['getBackgroundColorClass']()],'aria-hidden':'true'}}]};_0x35f12d&&(_0x53e15f['tag']='button',_0x53e15f['on']={'click':_0xa8fd94['to'](()=>this['fire']('execute'))}),this['setTemplate'](_0x53e15f);}['focus'](){this['element']['focus']();}}class y extends _0x54e89c{['userView'];['markerView'];constructor(_0x32ec58,_0x1192b9,_0x221bc4){super(_0x32ec58);const _0x49f41a=this['bindTemplate'];this['set']('isFocusable',!0x1),this['set']('hasTooltip',!0x0),this['set']('tooltipPosition',''),this['userView']=new ct(_0x32ec58,_0x1192b9),this['markerView']=new at(_0x32ec58,_0x1192b9);const _0x17327b=new ot(_0x32ec58);_0x17327b['template']['tag']='span',_0x17327b['text']=_0x1192b9['name'];const _0x4ab768={'tag':'div','attributes':{'class':['ck','ck-presence-list__list-item'],'role':'listitem','tabindex':_0x49f41a['to']('isFocusable',_0x4bbd39=>!!_0x4bbd39&&0x0),'aria-labelledby':_0x17327b['id'],'data-cke-tooltip-text':this['userView']['name'],'data-cke-tooltip-position':_0x49f41a['to']('tooltipPosition'),'data-cke-tooltip-disabled':_0x49f41a['to']('hasTooltip',_0x5e7c26=>!_0x5e7c26),'data-cke-tooltip-class':'ck-presence-list__list-item__tooltip'},'children':[this['userView'],this['markerView'],_0x17327b]};_0x221bc4&&(_0x4ab768['tag']='button',_0x4ab768['on']={'click':_0x49f41a['to'](()=>this['fire']('execute'))}),this['setTemplate'](_0x4ab768);}}class at extends _0x54e89c{constructor(_0x263a7f,_0x2697ed){super(_0x263a7f),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-presence-list__marker',_0x2697ed['color']['getBackgroundColorClass']()],'aria-hidden':'true'}});}}const A={'collapseAt':0x6,'displayMe':!0x0};class s extends _0x2027c4{['currentDisplayedUsers'];['balloonPanelView'];['view'];['presenceDropdownView'];['_bodyCollection']=null;constructor(_0x5507f9){super(_0x5507f9),this['context']['config']['define']('presenceList',A);const _0x1b665c=_0x5507f9['config']['get']('presenceList.collapseAt');if('number'!=typeof _0x1b665c)throw new _0x45b2bc('presencelist-collapseat-invalid-format',this);if(_0x1b665c<0x1)throw new _0x45b2bc('presencelist-collapseat-invalid-format',this);this['_allConnectedUsers']=this['context']['plugins']['get'](r)['allConnectedUsers'],this['set']('usersCount',0x0),this['currentDisplayedUsers']=new _0x214a2f(),this['balloonPanelView']=new _0x28df94(),this['balloonPanelView']['class']='ck\x20ck-presence-list__balloon',this['view']=this['_createView'](),this['presenceDropdownView']=void 0x0;}static get['requires'](){return[r];}['init'](){for(const _0x4a3bcb of this['_allConnectedUsers'])this['_handleUserAdd'](_0x4a3bcb);this['listenTo'](this['_allConnectedUsers'],'add',(_0xb551c,_0x774b86)=>{this['_handleUserAdd'](_0x774b86);}),this['listenTo'](this['_allConnectedUsers'],'remove',(_0x464aad,_0x3089e0)=>{this['_handleUserRemove'](_0x3089e0);});}['_createView'](){const _0x14f531=this['context'],_0x2b74d4=new L(this['context']['locale']),_0x30ceb4=this['balloonPanelView'];if(!_0x427350(_0x14f531['config']['get']('presenceList.container')))throw new _0x45b2bc('presencelist-missing-container',this);return _0x2b74d4['counterView']['bind']('usersCount')['to'](this),_0x2b74d4['bind']('isCollapsed')['to'](this,'usersCount',_0x3f658e=>{const {collapseAt:_0x656631,displayMe:_0x19649b}=_0x14f531['config']['get']('presenceList'),_0x8ded3e=_0x3f658e>=_0x656631;return _0x2b74d4['counterView']['isHidden']=!(0x1==_0x3f658e&&_0x19649b||_0x8ded3e),_0x8ded3e||this['hideDropdown'](),_0x8ded3e;}),_0x2b74d4['inlineListView']['items']['bindTo'](this['currentDisplayedUsers'])['using'](_0x59675b=>{const _0x45f6b0=_0x14f531['config']['get']('presenceList'),_0x28eeab=new y(_0x14f531['locale'],_0x59675b,!!_0x45f6b0['onClick']);return _0x28eeab['bind']('hasTooltip')['to'](_0x2b74d4,'isCollapsed',_0x2c728f=>!_0x2c728f),_0x28eeab['bind']('isFocusable')['to'](_0x2b74d4,'isCollapsed',_0x270654=>!_0x270654),_0x45f6b0['onClick']&&this['listenTo'](_0x28eeab,'execute',()=>{this['view']['isCollapsed']||_0x45f6b0['onClick'](_0x59675b,_0x28eeab['element']);}),_0x28eeab;}),this['listenTo'](_0x2b74d4['inlineListView'],'execute',()=>{this['presenceDropdownView']?this['hideDropdown']():this['view']['isCollapsed']&&this['showDropdown']();}),_0x2b74d4['inlineListView']['keystrokes']['set']('Enter',(_0x20f653,_0x12da5b)=>{this['view']['isCollapsed']&&(this['showDropdown'](),_0x12da5b());}),_0x2b74d4['render'](),_0x30ceb4['render'](),_0x3507e6({'emitter':_0x2b74d4,'activator':()=>_0x30ceb4['isVisible'],'contextElements':[_0x30ceb4['element'],_0x2b74d4['inlineListView']['element']],'callback':()=>this['hideDropdown']()}),_0x14f531['config']['get']('presenceList.container')['appendChild'](_0x2b74d4['element']),this['_bodyCollection']=new _0x4eaf74(this['context']['locale']),this['_bodyCollection']['attachToDom'](),this['_bodyCollection']['add'](this['balloonPanelView']),_0x2b74d4;}['_handleUserAdd'](_0x4c6a35){if(!this['context']['config']['get']('presenceList.displayMe')&&_0x4c6a35['isMe'])return;const _0x2486cd=this['context']['config']['get']('presenceList.collapseAt')-0x1;this['usersCount']++,this['currentDisplayedUsers']['length']==_0x2486cd&&this['currentDisplayedUsers']['length']>0x1&&this['currentDisplayedUsers']['remove'](0x1);const _0x102965=_0x4c6a35['isMe']?0x0:this['currentDisplayedUsers']['length'];this['currentDisplayedUsers']['add'](_0x4c6a35,_0x102965);}['_handleUserRemove'](_0x239445){if(this['usersCount']--,this['currentDisplayedUsers']['get'](_0x239445['id'])&&(this['currentDisplayedUsers']['remove'](_0x239445['id']),this['currentDisplayedUsers']['length']<this['usersCount'])){for(const _0x1deb52 of Array['from'](this['_allConnectedUsers'])['reverse']())if(!this['currentDisplayedUsers']['get'](_0x1deb52['id']))return void this['currentDisplayedUsers']['add'](_0x1deb52,Math['min'](this['currentDisplayedUsers']['length'],0x1));}}['showDropdown'](){if(this['presenceDropdownView'])return;const _0x5d56b0=this['context']['config']['get']('presenceList');this['presenceDropdownView']=new j(this['context']['locale'],!!_0x5d56b0['onClick']),this['view']['inlineListView']['isExpanded']=!0x0;const {listWrapperView:_0x28b3a5}=this['presenceDropdownView'];_0x28b3a5['items']['bindTo'](this['_allConnectedUsers'])['using'](_0x5f2add=>{if(!_0x5d56b0['displayMe']&&_0x5f2add['isMe'])return null;const _0x4cc5d8=new k(this['context']['locale'],_0x5f2add,!!_0x5d56b0['onClick']);return _0x5d56b0['onClick']&&this['listenTo'](_0x4cc5d8,'execute',()=>{_0x5d56b0['onClick'](_0x5f2add,_0x4cc5d8['element']);}),_0x4cc5d8;}),this['balloonPanelView']['content']['add'](this['presenceDropdownView']),this['balloonPanelView']['pin']({'target':this['view']['inlineListView']['element']}),_0x28b3a5['focus'](),_0x28b3a5['checkIfScrollable']();const _0x5a361a=(_0x38a56c,_0xc0448f)=>{this['hideDropdown'](),this['view']['inlineListView']['focus'](),_0xc0448f();};_0x28b3a5['keystrokes']['set']('Esc',_0x5a361a),_0x28b3a5['keystrokes']['set']('Shift+Tab',_0x5a361a),_0x28b3a5['keystrokes']['set']('Tab',(_0x28b7cb,_0x3b8c53)=>{!function(_0x599a3c){const _0x1867bc=['a','button','input','select','textarea','[tabindex]','[contenteditable]']['map'](_0x19de9e=>_0x19de9e+':not([disabled]):not([tabindex=\x22-1\x22])')['join'](','),_0x3e15fd=[...document['body']['querySelectorAll'](_0x1867bc)]['filter'](_0xc5aa41=>_0xc5aa41===document['activeElement']||_0xc5aa41['offsetWidth']+_0xc5aa41['offsetHeight']>0x0)['sort']((_0x4b98b4,_0x41bb33)=>(_0x4b98b4['tabIndex']||0x0)-(_0x41bb33['tabIndex']||0x0)),_0x1bd203=_0x3e15fd['indexOf'](_0x599a3c),_0x3c3018=_0x3e15fd[(_0x1bd203+0x1)%_0x3e15fd['length']];_0x3c3018&&_0x3c3018['focus']();}(this['view']['element']),this['hideDropdown'](),_0x3b8c53();}),_0x28b3a5['focusTracker']['add'](this['view']['element']),_0x28b3a5['focusTracker']['on']('change:isFocused',(_0x423e89,_0x103f18,_0x5a9435)=>{_0x5a9435||this['hideDropdown']();});}['hideDropdown'](){this['presenceDropdownView']&&(this['view']['inlineListView']['isExpanded']=!0x1,this['balloonPanelView']['unpin'](),this['balloonPanelView']['content']['remove'](this['presenceDropdownView']),this['presenceDropdownView']['destroy'](),this['presenceDropdownView']=void 0x0);}['destroy'](){super['destroy'](),this['view']&&this['view']['isRendered']&&this['view']['destroy'](),this['_bodyCollection']&&(this['_bodyCollection']['detachFromDom'](),this['_bodyCollection']['destroy'](),this['_bodyCollection']=null);}}class i extends _0x2027c4{static get['requires'](){return[r,s];}static get['pluginName'](){return'PresenceList';}}export{a as CloudServicesCommentsAdapter,v as CloudServicesRevisionHistoryAdapter,g as CloudServicesTrackChangesAdapter,i as PresenceList,l as RealTimeCollaborationClient,m as RealTimeCollaborativeComments,n as RealTimeCollaborativeEditing,d as RealTimeCollaborativeRevisionHistory,p as RealTimeCollaborativeTrackChanges};
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- export default{'ar':{'dictionary':{'CONNECTED_USERS':['1\x20مستخدم\x20متصل\x20(أنا)','%0\x20مستخدم\x20متصل','%0\x20مستخدم\x20متصل','%0\x20مستخدمين\x20متصلين','%0\x20مستخدماً\x20متصلاً','%0\x20مستخدمٍ\x20متصلٍ'],'PENDING_ACTION_SENDING_DATA':'إرسال\x20البيانات\x20إلى\x20الخادم','Synchronization\x20issue':'مشكلة\x20في\x20المزامنة','Connected\x20users\x20list\x20dropdown\x20menu':'القائمة\x20المنسدلة\x20لقائمة\x20المستخدمين\x20المتصلين','Connected\x20users\x20list':'قائمة\x20المستخدمين\x20المتصلين','Collapsed\x20connected\x20users\x20list\x20(press\x20ENTER\x20to\x20open\x20it)':'قائمة\x20مطوية\x20للمستخدمين\x20المتصلين\x20(اضغط\x20على\x20ENTER\x20لفتحها)','The\x20document\x20cannot\x20be\x20connected\x20back\x20to\x20the\x20server.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.':'لا\x20يمكن\x20إعادة\x20ربط\x20المستند\x20بالخادم\x20مرة\x20أخرى.\x20كي\x20لا\x20تفقد\x20المحتوى،\x20احفظ\x20المستند\x20محلياً\x20وأجر\x20عملية\x20إنعاش\x20للمحرر\x20لديك.','The\x20document\x20details\x20could\x20not\x20be\x20taken\x20during\x20the\x20reconnection.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.':'تعذرت\x20عملية\x20قراءة\x20بيانات\x20المستند\x20أثناء\x20عملية\x20إعادة\x20الاتصال.\x20كي\x20لا\x20تفقد\x20المحتوى،\x20احفظ\x20المستند\x20محلياً\x20وأجر\x20عملية\x20إنعاش\x20للمحرر\x20لديك.','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.':'الإصدار\x20الأخير\x20المحفوظ\x20من\x20هذا\x20المستند\x20لا\x20يطابق\x20الإصدار\x20المحلي.\x20كي\x20لا\x20تفقد\x20المحتوى،\x20احفظ\x20المستند\x20محلياً\x20وأجر\x20عملية\x20إنعاش\x20للمحرر\x20لديك.','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.':'يوجد\x20اختلاف\x20بين\x20المستند\x20المحلي\x20والمستند\x20الموجود\x20على\x20الخادم،\x20ودمجهما\x20قد\x20يتسبب\x20في\x20نتائج\x20غير\x20متوقعة.\x20كي\x20لا\x20تفقد\x20المحتوى،\x20احفظ\x20المستند\x20محلياً\x20وأجر\x20عملية\x20إنعاش\x20للمحرر\x20لديك.'},'getPluralForm':_0xf4df1a=>0x0==_0xf4df1a?0x0:0x1==_0xf4df1a?0x1:0x2==_0xf4df1a?0x2:_0xf4df1a%0x64>=0x3&&_0xf4df1a%0x64<=0xa?0x3:_0xf4df1a%0x64>=0xb&&_0xf4df1a%0x64<=0x63?0x4:0x5}};
23
+ export default{'ar':{'dictionary':{'CONNECTED_USERS':['1\x20مستخدم\x20متصل\x20(أنا)','%0\x20مستخدم\x20متصل','%0\x20مستخدم\x20متصل','%0\x20مستخدمين\x20متصلين','%0\x20مستخدماً\x20متصلاً','%0\x20مستخدمٍ\x20متصلٍ'],'PENDING_ACTION_SENDING_DATA':'إرسال\x20البيانات\x20إلى\x20الخادم','Synchronization\x20issue':'مشكلة\x20في\x20المزامنة','Connected\x20users\x20list\x20dropdown\x20menu':'القائمة\x20المنسدلة\x20لقائمة\x20المستخدمين\x20المتصلين','Connected\x20users\x20list':'قائمة\x20المستخدمين\x20المتصلين','Collapsed\x20connected\x20users\x20list\x20(press\x20ENTER\x20to\x20open\x20it)':'قائمة\x20مطوية\x20للمستخدمين\x20المتصلين\x20(اضغط\x20على\x20ENTER\x20لفتحها)','The\x20document\x20cannot\x20be\x20connected\x20back\x20to\x20the\x20server.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.':'لا\x20يمكن\x20إعادة\x20ربط\x20المستند\x20بالخادم\x20مرة\x20أخرى.\x20كي\x20لا\x20تفقد\x20المحتوى،\x20احفظ\x20المستند\x20محلياً\x20وأجر\x20عملية\x20إنعاش\x20للمحرر\x20لديك.','The\x20document\x20details\x20could\x20not\x20be\x20taken\x20during\x20the\x20reconnection.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.':'تعذرت\x20عملية\x20قراءة\x20بيانات\x20المستند\x20أثناء\x20عملية\x20إعادة\x20الاتصال.\x20كي\x20لا\x20تفقد\x20المحتوى،\x20احفظ\x20المستند\x20محلياً\x20وأجر\x20عملية\x20إنعاش\x20للمحرر\x20لديك.','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.':'الإصدار\x20الأخير\x20المحفوظ\x20من\x20هذا\x20المستند\x20لا\x20يطابق\x20الإصدار\x20المحلي.\x20كي\x20لا\x20تفقد\x20المحتوى،\x20احفظ\x20المستند\x20محلياً\x20وأجر\x20عملية\x20إنعاش\x20للمحرر\x20لديك.','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.':'يوجد\x20اختلاف\x20بين\x20المستند\x20المحلي\x20والمستند\x20الموجود\x20على\x20الخادم،\x20ودمجهما\x20قد\x20يتسبب\x20في\x20نتائج\x20غير\x20متوقعة.\x20كي\x20لا\x20تفقد\x20المحتوى،\x20احفظ\x20المستند\x20محلياً\x20وأجر\x20عملية\x20إنعاش\x20للمحرر\x20لديك.'},'getPluralForm':_0x7e4a7=>0x0==_0x7e4a7?0x0:0x1==_0x7e4a7?0x1:0x2==_0x7e4a7?0x2:_0x7e4a7%0x64>=0x3&&_0x7e4a7%0x64<=0xa?0x3:_0x7e4a7%0x64>=0xb&&_0x7e4a7%0x64<=0x63?0x4:0x5}};
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- (_0x294230=>{const {ar:{dictionary:_0x209128,getPluralForm:_0xd6671d}}={'ar':{'dictionary':{'CONNECTED_USERS':['1\x20مستخدم\x20متصل\x20(أنا)','%0\x20مستخدم\x20متصل','%0\x20مستخدم\x20متصل','%0\x20مستخدمين\x20متصلين','%0\x20مستخدماً\x20متصلاً','%0\x20مستخدمٍ\x20متصلٍ'],'PENDING_ACTION_SENDING_DATA':'إرسال\x20البيانات\x20إلى\x20الخادم','Synchronization\x20issue':'مشكلة\x20في\x20المزامنة','Connected\x20users\x20list\x20dropdown\x20menu':'القائمة\x20المنسدلة\x20لقائمة\x20المستخدمين\x20المتصلين','Connected\x20users\x20list':'قائمة\x20المستخدمين\x20المتصلين','Collapsed\x20connected\x20users\x20list\x20(press\x20ENTER\x20to\x20open\x20it)':'قائمة\x20مطوية\x20للمستخدمين\x20المتصلين\x20(اضغط\x20على\x20ENTER\x20لفتحها)','The\x20document\x20cannot\x20be\x20connected\x20back\x20to\x20the\x20server.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.':'لا\x20يمكن\x20إعادة\x20ربط\x20المستند\x20بالخادم\x20مرة\x20أخرى.\x20كي\x20لا\x20تفقد\x20المحتوى،\x20احفظ\x20المستند\x20محلياً\x20وأجر\x20عملية\x20إنعاش\x20للمحرر\x20لديك.','The\x20document\x20details\x20could\x20not\x20be\x20taken\x20during\x20the\x20reconnection.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.':'تعذرت\x20عملية\x20قراءة\x20بيانات\x20المستند\x20أثناء\x20عملية\x20إعادة\x20الاتصال.\x20كي\x20لا\x20تفقد\x20المحتوى،\x20احفظ\x20المستند\x20محلياً\x20وأجر\x20عملية\x20إنعاش\x20للمحرر\x20لديك.','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.':'الإصدار\x20الأخير\x20المحفوظ\x20من\x20هذا\x20المستند\x20لا\x20يطابق\x20الإصدار\x20المحلي.\x20كي\x20لا\x20تفقد\x20المحتوى،\x20احفظ\x20المستند\x20محلياً\x20وأجر\x20عملية\x20إنعاش\x20للمحرر\x20لديك.','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.':'يوجد\x20اختلاف\x20بين\x20المستند\x20المحلي\x20والمستند\x20الموجود\x20على\x20الخادم،\x20ودمجهما\x20قد\x20يتسبب\x20في\x20نتائج\x20غير\x20متوقعة.\x20كي\x20لا\x20تفقد\x20المحتوى،\x20احفظ\x20المستند\x20محلياً\x20وأجر\x20عملية\x20إنعاش\x20للمحرر\x20لديك.'},'getPluralForm':_0x1d76e7=>0x0==_0x1d76e7?0x0:0x1==_0x1d76e7?0x1:0x2==_0x1d76e7?0x2:_0x1d76e7%0x64>=0x3&&_0x1d76e7%0x64<=0xa?0x3:_0x1d76e7%0x64>=0xb&&_0x1d76e7%0x64<=0x63?0x4:0x5}};_0x294230['ar']||={'dictionary':{},'getPluralForm':null},_0x294230['ar']['dictionary']=Object['assign'](_0x294230['ar']['dictionary'],_0x209128),_0x294230['ar']['getPluralForm']=_0xd6671d;})(window['CKEDITOR_TRANSLATIONS']||={});
23
+ (_0x348ffd=>{const {ar:{dictionary:_0x5975fd,getPluralForm:_0x20e83e}}={'ar':{'dictionary':{'CONNECTED_USERS':['1\x20مستخدم\x20متصل\x20(أنا)','%0\x20مستخدم\x20متصل','%0\x20مستخدم\x20متصل','%0\x20مستخدمين\x20متصلين','%0\x20مستخدماً\x20متصلاً','%0\x20مستخدمٍ\x20متصلٍ'],'PENDING_ACTION_SENDING_DATA':'إرسال\x20البيانات\x20إلى\x20الخادم','Synchronization\x20issue':'مشكلة\x20في\x20المزامنة','Connected\x20users\x20list\x20dropdown\x20menu':'القائمة\x20المنسدلة\x20لقائمة\x20المستخدمين\x20المتصلين','Connected\x20users\x20list':'قائمة\x20المستخدمين\x20المتصلين','Collapsed\x20connected\x20users\x20list\x20(press\x20ENTER\x20to\x20open\x20it)':'قائمة\x20مطوية\x20للمستخدمين\x20المتصلين\x20(اضغط\x20على\x20ENTER\x20لفتحها)','The\x20document\x20cannot\x20be\x20connected\x20back\x20to\x20the\x20server.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.':'لا\x20يمكن\x20إعادة\x20ربط\x20المستند\x20بالخادم\x20مرة\x20أخرى.\x20كي\x20لا\x20تفقد\x20المحتوى،\x20احفظ\x20المستند\x20محلياً\x20وأجر\x20عملية\x20إنعاش\x20للمحرر\x20لديك.','The\x20document\x20details\x20could\x20not\x20be\x20taken\x20during\x20the\x20reconnection.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.':'تعذرت\x20عملية\x20قراءة\x20بيانات\x20المستند\x20أثناء\x20عملية\x20إعادة\x20الاتصال.\x20كي\x20لا\x20تفقد\x20المحتوى،\x20احفظ\x20المستند\x20محلياً\x20وأجر\x20عملية\x20إنعاش\x20للمحرر\x20لديك.','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.':'الإصدار\x20الأخير\x20المحفوظ\x20من\x20هذا\x20المستند\x20لا\x20يطابق\x20الإصدار\x20المحلي.\x20كي\x20لا\x20تفقد\x20المحتوى،\x20احفظ\x20المستند\x20محلياً\x20وأجر\x20عملية\x20إنعاش\x20للمحرر\x20لديك.','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.':'يوجد\x20اختلاف\x20بين\x20المستند\x20المحلي\x20والمستند\x20الموجود\x20على\x20الخادم،\x20ودمجهما\x20قد\x20يتسبب\x20في\x20نتائج\x20غير\x20متوقعة.\x20كي\x20لا\x20تفقد\x20المحتوى،\x20احفظ\x20المستند\x20محلياً\x20وأجر\x20عملية\x20إنعاش\x20للمحرر\x20لديك.'},'getPluralForm':_0x415bfe=>0x0==_0x415bfe?0x0:0x1==_0x415bfe?0x1:0x2==_0x415bfe?0x2:_0x415bfe%0x64>=0x3&&_0x415bfe%0x64<=0xa?0x3:_0x415bfe%0x64>=0xb&&_0x415bfe%0x64<=0x63?0x4:0x5}};_0x348ffd['ar']||={'dictionary':{},'getPluralForm':null},_0x348ffd['ar']['dictionary']=Object['assign'](_0x348ffd['ar']['dictionary'],_0x5975fd),_0x348ffd['ar']['getPluralForm']=_0x20e83e;})(window['CKEDITOR_TRANSLATIONS']||={});