@ckeditor/ckeditor5-real-time-collaboration 43.3.0-alpha.6 → 43.3.0-alpha.8

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 (168) hide show
  1. package/build/real-time-collaboration.js +1 -1
  2. package/dist/index.js +6 -6
  3. package/dist/translations/af.js +1 -1
  4. package/dist/translations/af.umd.js +1 -1
  5. package/dist/translations/ar.js +1 -1
  6. package/dist/translations/ar.umd.js +1 -1
  7. package/dist/translations/ast.js +1 -1
  8. package/dist/translations/ast.umd.js +1 -1
  9. package/dist/translations/az.js +1 -1
  10. package/dist/translations/az.umd.js +1 -1
  11. package/dist/translations/bg.js +1 -1
  12. package/dist/translations/bg.umd.js +1 -1
  13. package/dist/translations/bn.js +1 -1
  14. package/dist/translations/bn.umd.js +1 -1
  15. package/dist/translations/bs.js +1 -1
  16. package/dist/translations/bs.umd.js +1 -1
  17. package/dist/translations/ca.js +1 -1
  18. package/dist/translations/ca.umd.js +1 -1
  19. package/dist/translations/cs.js +1 -1
  20. package/dist/translations/cs.umd.js +1 -1
  21. package/dist/translations/da.js +1 -1
  22. package/dist/translations/da.umd.js +1 -1
  23. package/dist/translations/de-ch.js +1 -1
  24. package/dist/translations/de-ch.umd.js +1 -1
  25. package/dist/translations/de.js +1 -1
  26. package/dist/translations/de.umd.js +1 -1
  27. package/dist/translations/el.js +1 -1
  28. package/dist/translations/el.umd.js +1 -1
  29. package/dist/translations/en-au.js +1 -1
  30. package/dist/translations/en-au.umd.js +1 -1
  31. package/dist/translations/en-gb.js +1 -1
  32. package/dist/translations/en-gb.umd.js +1 -1
  33. package/dist/translations/en.js +1 -1
  34. package/dist/translations/en.umd.js +1 -1
  35. package/dist/translations/eo.js +1 -1
  36. package/dist/translations/eo.umd.js +1 -1
  37. package/dist/translations/es-co.js +1 -1
  38. package/dist/translations/es-co.umd.js +1 -1
  39. package/dist/translations/es.js +1 -1
  40. package/dist/translations/es.umd.js +1 -1
  41. package/dist/translations/et.js +1 -1
  42. package/dist/translations/et.umd.js +1 -1
  43. package/dist/translations/eu.js +1 -1
  44. package/dist/translations/eu.umd.js +1 -1
  45. package/dist/translations/fa.js +1 -1
  46. package/dist/translations/fa.umd.js +1 -1
  47. package/dist/translations/fi.js +1 -1
  48. package/dist/translations/fi.umd.js +1 -1
  49. package/dist/translations/fr.js +1 -1
  50. package/dist/translations/fr.umd.js +1 -1
  51. package/dist/translations/gl.js +1 -1
  52. package/dist/translations/gl.umd.js +1 -1
  53. package/dist/translations/gu.js +1 -1
  54. package/dist/translations/gu.umd.js +1 -1
  55. package/dist/translations/he.js +1 -1
  56. package/dist/translations/he.umd.js +1 -1
  57. package/dist/translations/hi.js +1 -1
  58. package/dist/translations/hi.umd.js +1 -1
  59. package/dist/translations/hr.js +1 -1
  60. package/dist/translations/hr.umd.js +1 -1
  61. package/dist/translations/hu.js +1 -1
  62. package/dist/translations/hu.umd.js +1 -1
  63. package/dist/translations/hy.js +1 -1
  64. package/dist/translations/hy.umd.js +1 -1
  65. package/dist/translations/id.js +1 -1
  66. package/dist/translations/id.umd.js +1 -1
  67. package/dist/translations/it.js +1 -1
  68. package/dist/translations/it.umd.js +1 -1
  69. package/dist/translations/ja.js +1 -1
  70. package/dist/translations/ja.umd.js +1 -1
  71. package/dist/translations/jv.js +1 -1
  72. package/dist/translations/jv.umd.js +1 -1
  73. package/dist/translations/kk.js +1 -1
  74. package/dist/translations/kk.umd.js +1 -1
  75. package/dist/translations/km.js +1 -1
  76. package/dist/translations/km.umd.js +1 -1
  77. package/dist/translations/kn.js +1 -1
  78. package/dist/translations/kn.umd.js +1 -1
  79. package/dist/translations/ko.js +1 -1
  80. package/dist/translations/ko.umd.js +1 -1
  81. package/dist/translations/ku.js +1 -1
  82. package/dist/translations/ku.umd.js +1 -1
  83. package/dist/translations/lt.js +1 -1
  84. package/dist/translations/lt.umd.js +1 -1
  85. package/dist/translations/lv.js +1 -1
  86. package/dist/translations/lv.umd.js +1 -1
  87. package/dist/translations/ms.js +1 -1
  88. package/dist/translations/ms.umd.js +1 -1
  89. package/dist/translations/nb.js +1 -1
  90. package/dist/translations/nb.umd.js +1 -1
  91. package/dist/translations/ne.js +1 -1
  92. package/dist/translations/ne.umd.js +1 -1
  93. package/dist/translations/nl.js +1 -1
  94. package/dist/translations/nl.umd.js +1 -1
  95. package/dist/translations/no.js +1 -1
  96. package/dist/translations/no.umd.js +1 -1
  97. package/dist/translations/oc.js +1 -1
  98. package/dist/translations/oc.umd.js +1 -1
  99. package/dist/translations/pl.js +1 -1
  100. package/dist/translations/pl.umd.js +1 -1
  101. package/dist/translations/pt-br.js +1 -1
  102. package/dist/translations/pt-br.umd.js +1 -1
  103. package/dist/translations/pt.js +1 -1
  104. package/dist/translations/pt.umd.js +1 -1
  105. package/dist/translations/ro.js +1 -1
  106. package/dist/translations/ro.umd.js +1 -1
  107. package/dist/translations/ru.js +1 -1
  108. package/dist/translations/ru.umd.js +1 -1
  109. package/dist/translations/si.js +1 -1
  110. package/dist/translations/si.umd.js +1 -1
  111. package/dist/translations/sk.js +1 -1
  112. package/dist/translations/sk.umd.js +1 -1
  113. package/dist/translations/sl.js +1 -1
  114. package/dist/translations/sl.umd.js +1 -1
  115. package/dist/translations/sq.js +1 -1
  116. package/dist/translations/sq.umd.js +1 -1
  117. package/dist/translations/sr-latn.js +1 -1
  118. package/dist/translations/sr-latn.umd.js +1 -1
  119. package/dist/translations/sr.js +1 -1
  120. package/dist/translations/sr.umd.js +1 -1
  121. package/dist/translations/sv.js +1 -1
  122. package/dist/translations/sv.umd.js +1 -1
  123. package/dist/translations/th.js +1 -1
  124. package/dist/translations/th.umd.js +1 -1
  125. package/dist/translations/ti.js +1 -1
  126. package/dist/translations/ti.umd.js +1 -1
  127. package/dist/translations/tk.js +1 -1
  128. package/dist/translations/tk.umd.js +1 -1
  129. package/dist/translations/tr.js +1 -1
  130. package/dist/translations/tr.umd.js +1 -1
  131. package/dist/translations/tt.js +1 -1
  132. package/dist/translations/tt.umd.js +1 -1
  133. package/dist/translations/ug.js +1 -1
  134. package/dist/translations/ug.umd.js +1 -1
  135. package/dist/translations/uk.js +1 -1
  136. package/dist/translations/uk.umd.js +1 -1
  137. package/dist/translations/ur.js +1 -1
  138. package/dist/translations/ur.umd.js +1 -1
  139. package/dist/translations/uz.js +1 -1
  140. package/dist/translations/uz.umd.js +1 -1
  141. package/dist/translations/vi.js +1 -1
  142. package/dist/translations/vi.umd.js +1 -1
  143. package/dist/translations/zh-cn.js +1 -1
  144. package/dist/translations/zh-cn.umd.js +1 -1
  145. package/dist/translations/zh.js +1 -1
  146. package/dist/translations/zh.umd.js +1 -1
  147. package/package.json +9 -9
  148. package/src/common-translations.js +1 -1
  149. package/src/index.js +1 -1
  150. package/src/presencelist/presencelistui.js +1 -1
  151. package/src/presencelist/view/presencecounterview.js +1 -1
  152. package/src/presencelist/view/presencedropdownlistitemview.js +1 -1
  153. package/src/presencelist/view/presencedropdownlistview.js +1 -1
  154. package/src/presencelist/view/presenceinlinelistitemview.js +1 -1
  155. package/src/presencelist/view/presenceinlinelistview.js +1 -1
  156. package/src/presencelist/view/presencelistview.js +1 -1
  157. package/src/presencelist.js +1 -1
  158. package/src/realtimecollaborativecomments/cloudservicescommentsadapter.js +1 -1
  159. package/src/realtimecollaborativecomments.js +1 -1
  160. package/src/realtimecollaborativeediting/realtimecollaborationclient.js +1 -1
  161. package/src/realtimecollaborativeediting/sessions.js +1 -1
  162. package/src/realtimecollaborativeediting/usermarkers.js +1 -1
  163. package/src/realtimecollaborativeediting/websocketgateway.js +1 -1
  164. package/src/realtimecollaborativeediting.js +1 -1
  165. package/src/realtimecollaborativerevisionhistory/cloudservicesrevisionhistoryadapter.js +1 -1
  166. package/src/realtimecollaborativerevisionhistory.js +1 -1
  167. package/src/realtimecollaborativetrackchanges/cloudservicestrackchangesadapter.js +1 -1
  168. 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 _0x1f6ad9,Plugin as _0x3c7597,PendingActions as _0x116dc2,Context as _0x3bacf4}from'@ckeditor/ckeditor5-core/dist/index.js';import{DomEmitterMixin as _0x11c8ea,CKEditorError as _0x2067cc,Collection as _0x3caab5,global as _0x2c0094,version as nt,uid as _0x23cfbe,KeystrokeHandler as _0x30daff}from'@ckeditor/ckeditor5-utils/dist/index.js';import{Notification as _0x132feb,View as _0x4c3ca9,ListView as _0xbf831b,ListItemView as st,LabelView as ot,BalloonPanelView as _0x4ca446,clickOutsideHandler as _0x512ea3,BodyCollection as _0x320c61}from'@ckeditor/ckeditor5-ui/dist/index.js';import{LiveRange as rt,History as _0xade2db,NoOperation as _0x4e4135,InsertOperation as _0x5e0cf2,MarkerOperation as _0x54f3a2,RootAttributeOperation as _0x34ffa8,transformSets as _0x50e32b,OperationFactory as _0x75592d}from'@ckeditor/ckeditor5-engine/dist/index.js';import{WebSocketGateway as at,WEB_SOCKET_GATEWAY_STATES as _0x1ba25d,CollaborativeEditingService as _0x311e8f,User as ht,CommentsService as _0x40bb4f,TrackChangesService as _0x1bbb40,RevisionHistoryService as it,EditorService as tt}from'@ckeditor/ckeditor-cloud-services-collaboration/dist/index.js';import{Users as _0x13305b,UserView as et}from'ckeditor5-collaboration/dist/index.js';import{Compressor as _0x36c71e}from'@ckeditor/ckeditor5-operations-compressor/dist/index.js';import{isElement as _0x52addc}from'lodash-es';class c extends _0x1f6ad9{static ['WebSocketGateway']=/* #__PURE__ -- @preserve */
24
- ((()=>at)());static ['initialReconnectionInterval']=0x3e8;['connection'];['_reconnectionStack'];['_shouldPluginsReconnect'];['_domEmitter'];static get['requires'](){return['CloudServices',_0x132feb];}static get['pluginName'](){return'WebSocketGateway';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x23dc63){super(_0x23dc63),this['set']('state',_0x1ba25d['CONNECTED']),this['set']('_isBrowserOffline',!0x1),this['_reconnectionStack']=new Set(),this['_shouldPluginsReconnect']=!0x1,this['_domEmitter']=Object['create'](_0x11c8ea);}['init'](){const _0x50c19a=this['context'],_0x5160c1=_0x50c19a['plugins']['get']('CloudServices'),_0x38fb72=_0x50c19a['plugins']['get'](_0x132feb);if(!_0x5160c1['token'])throw new _0x2067cc('websocketgateway-missing-token',this);if(!_0x5160c1['webSocketUrl'])throw new _0x2067cc('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'](_0x5160c1['token'],_0x5160c1['webSocketUrl'],{'timeout':0x3e8*this['context']['config']['get']('cloudServices.connectionTimeout'),'requestTimeout':0x3e8*this['context']['config']['get']('cloudServices.requestTimeout')})['then'](_0x211daf=>{if(this['connection']=_0x211daf,this['bind']('state')['to'](_0x211daf,'state',this,'_isBrowserOffline',(_0x191090,_0x417dae)=>('connected'!==_0x191090&&(this['_shouldPluginsReconnect']=!0x0),_0x417dae||_0x191090!==_0x1ba25d['CONNECTED']?_0x1ba25d['DISCONNECTED']:this['state']==_0x1ba25d['DISCONNECTED']&&this['_shouldPluginsReconnect']?(this['_shouldPluginsReconnect']=!0x1,this['_reconnect'](),_0x1ba25d['CONNECTING']):_0x1ba25d['CONNECTED'])),this['connection']['on']('error',(_0x406432,_0x3d391b)=>{if('limitExceeded'!==_0x3d391b['code'])throw console['error'](_0x3d391b),new _0x2067cc('cloudservices-init',null,{'originalError':_0x3d391b});_0x38fb72['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'});}),!_0x211daf['me'])return new Promise(_0x152c2a=>_0x211daf['on']('change:me',_0x152c2a));})['catch'](_0x193211=>{throw console['error'](_0x193211),new _0x2067cc('cloudservices-init',null,{'originalError':_0x193211});});}['addToReconnectionStack'](_0x4794b4){if('function'!=typeof _0x4794b4['reconnect'])throw new _0x2067cc('websocketgateway-invalid-plugin-interface',this);if(this['isInReconnectionStack'](_0x4794b4))throw new _0x2067cc('websocketgateway-plugin-already-registered',this,{'name':_0x4794b4['constructor']['pluginName']});this['_reconnectionStack']['add'](_0x4794b4);}['removeFromReconnectionStack'](_0x5cb242){this['_reconnectionStack']['delete'](_0x5cb242);}['isInReconnectionStack'](_0x587ed1){return this['_reconnectionStack']['has'](_0x587ed1);}['_reconnect'](){return this['connection']['reconnect']()['then'](()=>Promise['all'](Array['from'](this['_reconnectionStack'],_0x442317=>_0x442317['reconnect']())))['then'](()=>this['state']=_0x1ba25d['CONNECTED'])['catch'](_0xa73e1a=>{throw console['error'](_0xa73e1a),new _0x2067cc('cloudservices-reconnection-error',this['context']);});}['destroy'](){this['connection']&&this['connection']['disconnect'](),this['state']=_0x1ba25d['DISCONNECTED'],this['_domEmitter']['stopListening'](),super['destroy']();}}class i extends _0x1f6ad9{['channelSessions'];['channelConnectedUsers'];['allConnectedUsers'];['_registeredSessions'];['_uniqueUsersCount'];['_users'];static get['pluginName'](){return'Sessions';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[c,_0x13305b];}constructor(_0x2a2e4a){super(_0x2a2e4a),this['channelSessions']=new Map(),this['channelConnectedUsers']=new Map(),this['allConnectedUsers']=new _0x3caab5(),this['_registeredSessions']=new Map(),this['_uniqueUsersCount']=0x0,this['_users']=this['context']['plugins']['get'](_0x13305b);}['init'](){const _0x17902e=this['context']['plugins']['get'](c);this['listenTo'](_0x17902e,'change:state',(_0x4ba0f4,_0x38b758,_0x566198)=>{if('connected'!==_0x566198)this['channelSessions']['forEach'](_0x4721f2=>_0x4721f2['clear']()),this['channelConnectedUsers']['forEach'](_0x30ef1d=>_0x30ef1d['clear']()),this['allConnectedUsers']['clear']();else{for(const [_0x2276cd,_0x2cff59]of this['_registeredSessions'])for(const _0x5d9219 of _0x2cff59)this['_handleSessionAdd'](_0x2276cd,_0x5d9219);}}),this['_createUser'](_0x17902e['connection']['me'],!0x0);}['register'](_0x3976ee,_0x123c6c){if(this['_registeredSessions']['has'](_0x3976ee))throw new _0x2067cc('sessions-register-already-registered',null,{'channelId':_0x3976ee});this['_registeredSessions']['set'](_0x3976ee,_0x123c6c),this['channelSessions']['set'](_0x3976ee,new _0x3caab5()),this['channelConnectedUsers']['set'](_0x3976ee,new _0x3caab5()),this['listenTo'](_0x123c6c,'add',(_0x5cc3e5,_0x59934d)=>this['_handleSessionAdd'](_0x3976ee,_0x59934d)),this['listenTo'](_0x123c6c,'remove',(_0x1149b5,_0x6cfedc)=>this['_handleSessionRemove'](_0x3976ee,_0x6cfedc));for(const _0x54baea of _0x123c6c)this['_handleSessionAdd'](_0x3976ee,_0x54baea);}['unregister'](_0x2bf07f){if(!this['_registeredSessions']['has'](_0x2bf07f))throw new _0x2067cc('sessions-unregister-not-exist',null,{'channelId':_0x2bf07f});const _0x3b7fe3=this['_registeredSessions']['get'](_0x2bf07f);this['stopListening'](_0x3b7fe3);for(const _0x274045 of _0x3b7fe3)'connected'===this['context']['plugins']['get'](c)['state']&&this['_handleSessionRemove'](_0x2bf07f,_0x274045);this['_registeredSessions']['delete'](_0x2bf07f),this['channelSessions']['delete'](_0x2bf07f),this['channelConnectedUsers']['delete'](_0x2bf07f);}get['mySessionId'](){return this['context']['plugins']['get'](c)['connection']['sessionId'];}['getUserBySessionId'](_0x2008fb){for(const _0xe90c83 of this['channelSessions']['values']())for(const _0x19677c of _0xe90c83)if(_0x19677c['id']===_0x2008fb)return _0x19677c['user'];}['getUserSessions'](_0x3c2ea3,_0x1fd6da){const _0x5dd9b5=_0x1fd6da?[this['channelSessions']['get'](_0x1fd6da)]:this['channelSessions']['values'](),_0x441b39=new Set();for(const _0x41f7b7 of _0x5dd9b5)for(const _0x50fe41 of _0x41f7b7)_0x50fe41['user']['id']===_0x3c2ea3['id']&&_0x441b39['add'](_0x50fe41['id']);return _0x441b39;}['getUserRole'](_0x8b90bb){for(const _0x142a6f of this['channelSessions']['values']())for(const _0x2af5db of _0x142a6f)if(_0x2af5db['user']===_0x8b90bb)return _0x2af5db['role'];}['_handleSessionAdd'](_0x3d37b7,_0x26b2d){if('connected'!==this['context']['plugins']['get'](c)['state'])return;const _0xc311bb=_0x26b2d['user'],_0x4ebc06=this['_users']['getUser'](_0xc311bb['id'])||this['_createUser'](_0xc311bb),_0x5ef7d1=Object['assign']({},_0x26b2d,{'user':_0x4ebc06});this['channelSessions']['get'](_0x3d37b7)['add'](_0x5ef7d1);const _0x263dda=this['channelConnectedUsers']['get'](_0x3d37b7);_0x263dda['has'](_0x4ebc06['id'])||_0x263dda['add'](_0x4ebc06),this['allConnectedUsers']['has'](_0x4ebc06['id'])||this['allConnectedUsers']['add'](_0x4ebc06,_0x4ebc06['isMe']?0x0:void 0x0),this['fire']('sessionAdd:'+_0x3d37b7,{'channelId':_0x3d37b7,'session':_0x5ef7d1});}['_handleSessionRemove'](_0x179b67,_0x9fc072){if('connected'!==this['context']['plugins']['get'](c)['state'])return;const _0x493dad=this['channelConnectedUsers']['get'](_0x179b67),_0x161d60=_0x9fc072['user'];_0x161d60['id']&&(this['channelSessions']['get'](_0x179b67)['remove'](_0x9fc072['id']),_0x493dad['has'](_0x161d60['id'])&&!this['getUserSessions'](_0x161d60,_0x179b67)['size']&&_0x493dad['remove'](_0x161d60['id']),this['allConnectedUsers']['get'](_0x161d60['id'])&&!this['getUserSessions'](_0x161d60)['size']&&this['allConnectedUsers']['remove'](_0x161d60['id']));}['_createUser'](_0x44b214,_0x52b577){const _0x5e4908=this['_users']['addUser'](_0x44b214);return _0x52b577&&this['_users']['defineMe'](_0x44b214['id']),_0x5e4908['orderNumber']=this['_uniqueUsersCount']++,_0x5e4908;}}class G extends _0x3c7597{['_domEmitter']=new(_0x11c8ea())();static get['requires'](){return[i];}static get['pluginName'](){return'UserMarkers';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const _0x224db0=this['editor'],_0x2187fb=_0x224db0['plugins']['get'](i);_0x224db0['conversion']['for']('editingDowncast')['markerToElement']({'model':'user:position','view':(_0x46bf3a,{writer:_0x22a404})=>function(_0x2522b5,_0x51442d,_0x1f2da1,_0x318457){const _0x4f2119=_0x2522b5['markerName']['split'](':')[0x2],_0x130689=_0x1f2da1['getUserBySessionId'](_0x4f2119);if(!_0x130689||_0x4f2119===_0x1f2da1['mySessionId'])return;if(!_0x318457['model']['schema']['checkChild'](_0x2522b5['markerRange']['start'],'$text'))return;const _0x4aeefb={'class':'ck-user__marker\x20'+_0x130689['color']['getMarkerClass'](),'data-name':_0x130689['name'],'data-session-id':_0x4f2119},_0xd2c8f3=_0x318457['model']['markers']['get'](_0x2522b5['markerName']),_0x987ec2=_0xd2c8f3['getStart'](),_0x216396=_0x987ec2['nodeAfter'],_0x1db0ff=_0x318457['model']['schema'];if(_0x216396&&_0x1db0ff['isObject'](_0x216396)&&_0x1db0ff['isInline'](_0x216396)&&!_0x318457['model']['markers']['get']('user:range:'+_0x4f2119)['getRange']()['isCollapsed'])return;const _0x154986=_0x987ec2['parent'];return _0x318457['model']['schema']['isLimit'](_0x154986)&&!_0x318457['model']['hasContent'](_0x154986)&&(_0x4aeefb['contenteditable']=!0x1),function(_0xd9c21e,_0x391ed3,_0x5116a0){const _0x41c261=_0xd9c21e['createUIElement']('span',_0x391ed3);return _0xd9c21e['setCustomProperty']('userPositionMarker',!0x0,_0x41c261),_0x41c261['render']=function(_0x2867e8){const _0x2df24a=this['toDomElement'](_0x2867e8);return _0x2df24a['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>'+_0x5116a0['name']+'</span>⁠',_0x2df24a['addEventListener']('mouseenter',()=>{_0x2df24a['classList']['add']('ck-user__marker_hovered');}),_0x2df24a['addEventListener']('mouseleave',()=>{_0x2df24a['classList']['remove']('ck-user__marker_hovered');}),_0x2df24a;},_0x41c261['isSimilar']=function(_0x31926d){return!(!this['getCustomProperty']('userPositionMarker')||!_0x31926d['getCustomProperty']('userPositionMarker')||this['getAttribute']('data-session-id')!=_0x31926d['getAttribute']('data-session-id'));},_0x41c261;}(_0x51442d,_0x4aeefb,_0x130689);}(_0x46bf3a,_0x22a404,_0x2187fb,_0x224db0)}),_0x224db0['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'user:range','view':_0x595beb=>function(_0x49209c,_0x602606){const _0x34b864=_0x49209c['markerName']['split'](':')[0x2];if(_0x34b864===_0x602606['mySessionId'])return null;const _0xd7ba75=_0x602606['getUserBySessionId'](_0x34b864);if(!_0xd7ba75)return{'id':_0x34b864,'classes':[]};return{'id':_0x34b864,'classes':['ck-user__selection',_0xd7ba75['color']['getSelectionClass']()],'attributes':{'data-session-id':_0x34b864},'priority':0x7d0+_0xd7ba75['orderNumber']};}(_0x595beb,_0x2187fb)}),function(_0x2b40c2){const _0x13ee02=_0x2b40c2['model'],_0x4e459e=new Map(),_0x556b97=_0x2b40c2['plugins']['get'](i);_0x13ee02['markers']['on']('update:user:range',(_0x55bbcd,_0x2945f9,_0x4ff8f5,_0x172a24)=>{if(!_0x172a24&&_0x4e459e['get'](_0x2945f9['name']))return _0x4e459e['get'](_0x2945f9['name'])['detach'](),void _0x4e459e['delete'](_0x2945f9['name']);const _0x5437e4=_0x2945f9['name']['split'](':')[0x2];if(_0x5437e4===_0x556b97['mySessionId'])return;const _0x30465f='user:position:'+_0x5437e4;_0x13ee02['markers']['has'](_0x30465f)&&_0x2b40c2['editing']['reconvertMarker'](_0x30465f),_0x2945f9['on']('change:range',(_0x570656,_0x331128,_0x383d5b)=>{if('$graveyard'!=_0x331128['root']['rootName']&&'$graveyard'==_0x2945f9['getRange']()['root']['rootName']&&!_0x4e459e['has'](_0x2945f9['name'])){const _0x4de790=_0x13ee02['schema']['getNearestSelectionRange'](_0x383d5b['deletionPosition']);if(_0x4de790){const _0x3b56ee=rt['fromRange'](_0x4de790);_0x4e459e['set'](_0x2945f9['name'],_0x3b56ee),_0x3b56ee['on']('change:range',(_0x515641,_0x3d319f,_0x47169a)=>{if('$graveyard'==_0x3b56ee['root']['rootName']){const _0x31b3ca=_0x13ee02['schema']['getNearestSelectionRange'](_0x47169a['deletionPosition']);_0x31b3ca?(_0x3b56ee['start']=_0x31b3ca['start'],_0x3b56ee['end']=_0x31b3ca['end']):(_0x4e459e['delete'](_0x2945f9['name']),_0x3b56ee['detach']());}});}}});}),_0x13ee02['document']['on']('change',()=>{_0x4e459e['size']>0x0&&_0x13ee02['enqueueChange']({'isUndoable':!0x1},_0x1ee1f7=>{for(const [_0x37b3fa,_0xf65ffc]of _0x4e459e)'$graveyard'==_0x13ee02['markers']['get'](_0x37b3fa)['getRange']()['root']['rootName']&&(te(_0x37b3fa['split'](':')[0x2],_0xf65ffc['toRange'](),_0x13ee02,_0x1ee1f7),_0xf65ffc['detach']());_0x4e459e['clear']();});});}(_0x224db0),this['_domEmitter']['listenTo'](_0x2c0094['document'],'keydown',(_0x539762,{key:_0x4c6358})=>{'Escape'===_0x4c6358&&function(_0x8f0c35){_0x8f0c35['editing']['view']['change'](_0x3ddf4c=>{for(const _0x198233 of _0x8f0c35['model']['markers']){if(!_0x198233['name']['startsWith']('user:position'))continue;const _0x501ec0=_0x8f0c35['editing']['mapper']['markerNameToElements'](_0x198233['name']);if(_0x501ec0){for(const _0x16c8c5 of _0x501ec0)_0x3ddf4c['removeClass']('ck-user__marker_hovered',_0x16c8c5);}}});}(_0x224db0);},{'useCapture':!0x0});}['afterInit'](){const _0x46cd86=this['editor'],_0x5bd30c=_0x46cd86['commands']['get']('undo');_0x5bd30c&&_0x46cd86['model']['on']('applyOperation',(_0x31425b,_0x3736c0)=>{const _0x1b7a99=_0x3736c0[0x0];if('marker'!=_0x1b7a99['type']||!_0x1b7a99['name']['startsWith']('user:'))return;const _0x556bae=_0x1b7a99['batch'];_0x5bd30c['_createdBatches']['has'](_0x556bae)&&(_0x1b7a99['newRange']=_0x1b7a99['oldRange']?_0x46cd86['model']['createRange'](_0x1b7a99['oldRange']['start'],_0x1b7a99['oldRange']['end']):null);},{'priority':'highest'});}['destroy'](){return this['_domEmitter']['stopListening'](),super['destroy']();}['createUserMarkerOperations'](){const _0x2eedde=this['editor'],_0x84d411=_0x2eedde['model']['document'],_0x4db9b3=_0x2eedde['plugins']['get'](i);_0x2eedde['model']['enqueueChange']({'isUndoable':!0x1},_0x3ca99d=>{const _0x105d41='user:range:'+_0x4db9b3['mySessionId'],_0x497aad='user:position:'+_0x4db9b3['mySessionId'],_0x1c5d7f=_0x2eedde['model']['markers']['has'](_0x105d41);_0x2eedde['editing']['view']['hasDomSelection']?te(_0x4db9b3['mySessionId'],_0x84d411['selection']['getFirstRange'](),_0x2eedde['model'],_0x3ca99d):_0x1c5d7f&&(_0x3ca99d['removeMarker'](_0x105d41),_0x3ca99d['removeMarker'](_0x497aad));});}}function te(_0x652453,_0x1f016d,_0x4cd057,_0x1d752d){const _0x154af1='user:range:'+_0x652453,_0x407c7e='user:position:'+_0x652453,_0x1dc0f9=_0x1f016d['getContainedElement']();let _0x11dc1c=_0x1f016d['start'];_0x1dc0f9&&_0x1dc0f9['is']('element','tableCell')&&(_0x11dc1c=function(_0x3049c5,_0x532f2b){for(const _0x5d9db0 of _0x3049c5['getPositions']())if(_0x532f2b['schema']['checkChild'](_0x5d9db0,'$text'))return _0x5d9db0;}(_0x1f016d,_0x4cd057),_0x1f016d=_0x1d752d['createRange'](_0x11dc1c));const _0x18e452=_0x1d752d['createRange'](_0x11dc1c);_0x4cd057['markers']['has'](_0x154af1)?(_0x1d752d['updateMarker'](_0x154af1,{'range':_0x1f016d}),_0x1d752d['updateMarker'](_0x407c7e,{'range':_0x18e452})):(_0x1d752d['addMarker'](_0x154af1,{'range':_0x1f016d,'usingOperation':!0x0}),_0x1d752d['addMarker'](_0x407c7e,{'range':_0x18e452,'usingOperation':!0x0}));}function $(_0x2fc671,_0x542da3,_0x28adae){const _0x45c996=_0x2fc671['t'],t=_0x2fc671['t'];switch(_0x542da3){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 _0x45c996({'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'},_0x28adae);default:return'';}}let Q=0x1;class l extends _0x3c7597{static ['CollaborativeEditingService']=/* #__PURE__ -- @preserve */
25
- ((()=>_0x311e8f)());['_offset'];['sessionId'];['serverHistory'];['_channelId'];['_service'];['_document'];['_compressor'];['_bufferedOperations'];['_knownOperations'];['_knownRootNames'];['_pendingAction'];['_hasSelectionChanged'];['_sendBufferedOperationsDelayId'];['_baseBufferDelay'];['_currentBufferDelay'];['_lastSyncedOperationId'];['_disconnectionOperations'];['_operationIdentifier'];static get['requires'](){return[c,i,G,_0x116dc2,_0x13305b,_0x132feb];}static get['pluginName'](){return'RealTimeCollaborationClient';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get['cloudDocumentVersion'](){return this['_lastServerVersion']+this['_offset'];}get['_lastServerVersion'](){return this['serverHistory']['version']-this['_offset'];}get['lastSyncVersion'](){const _0x54e3a8=this['serverHistory']['getOperations']();for(let _0x18045b=_0x54e3a8['length']-0x1;_0x18045b>=0x0;_0x18045b--){const _0x998a80=_0x54e3a8[_0x18045b];if(!this['_disconnectionOperations']['has'](_0x998a80))return _0x998a80['baseVersion']+0x1-this['_offset'];}return 0x0;}constructor(_0x2bcead){if(super(_0x2bcead),this['_offset']=0x0,this['sessionId']=null,this['serverHistory']=new _0xade2db(),this['editor']['config']['define']('collaboration',{}),this['_channelId']=this['editor']['config']['get']('collaboration.channelId'),!this['_channelId'])throw new _0x2067cc('collaboration-missing-channelid',this);const _0x827b15=_0x2bcead['config']['get']('cloudServices.bundleVersion')||nt;this['_service']=new l['CollaborativeEditingService'](_0x827b15,this['_channelId']),this['_document']=this['editor']['model']['document'],this['_compressor']=new _0x36c71e(),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 Z(this['_disconnectionOperations']);}['init'](){const _0x5a69ba=this['editor'],_0x16bede=_0x5a69ba['plugins']['get'](_0x13305b),_0x1ef68c=_0x5a69ba['plugins']['get'](c);this['listenTo'](_0x16bede,'getOperationAuthor',(_0x465650,_0x5146fc)=>{const _0x3752cf=_0x5146fc[0x0];_0x3752cf['_authorId']&&(_0x465650['return']=_0x16bede['getUser'](_0x3752cf['_authorId']),_0x465650['stop']()),null===_0x3752cf['_authorId']&&(_0x465650['return']=null,_0x465650['stop']());},{'priority':'high'}),this['listenTo'](_0x5a69ba['model']['document']['selection'],'change:range',(_0x337e23,_0x1199e6)=>{_0x1199e6['directChange']&&this['_refreshUserSelectionMarkers']();}),this['listenTo'](_0x5a69ba['editing']['view'],'change:hasDomSelection',()=>{this['_refreshUserSelectionMarkers']();}),this['_initThrowingOnDataSet'](),_0x5a69ba['model']['on']('applyOperation',(_0x1f8ede,_0x4534db)=>{const _0x10353e=_0x4534db[0x0];_0x10353e['isDocumentOperation']&&(this['_saveOperationInBuffer'](_0x10353e),this['_shouldSendUpdate']()&&this['_sendBufferedOperationsDelayed']());}),this['_setUpDataInit'](),this['bind']('_isEditingAllowed')['to'](_0x1ef68c,'state',this,'_hasSynchronizationProblem',(_0x5c162a,_0x2e927e)=>'connected'===_0x5c162a&&!_0x2e927e),this['on']('change:_isEditingAllowed',()=>{this['_isEditingAllowed']?_0x5a69ba['disableReadOnlyMode']('rtc-offline'):_0x5a69ba['enableReadOnlyMode']('rtc-offline');}),this['_isEditingAllowed']?_0x5a69ba['disableReadOnlyMode']('rtc-offline'):_0x5a69ba['enableReadOnlyMode']('rtc-offline'),this['set']('_isConnected',!0x1);}async['reconnect'](){const _0x249f89=this['editor']['plugins']['get'](i),_0x219b02=this['editor']['plugins']['get'](c);try{this['_isPendingUpdate']=!0x0,_0x249f89['unregister'](this['_channelId']);const _0xdb1f89=await this['_service']['reconnect'](_0x219b02['connection'],this['lastSyncVersion']);await this['_handleReconnectionResponse'](_0xdb1f89)&&(this['_isPendingUpdate']=!0x1,this['_clearPendingAction']());const _0x129355=await this['_service']['getConnectedSessions']();_0x249f89['register'](this['_channelId'],_0x129355),this['_handleSendingSelectionMarkers'](),this['_isConnected']=!0x0;}catch(_0x4da491){if(function(_0x396666){return'404'===_0x396666['code'];}(_0x4da491)&&this['sessionId'])await this['_connectAfterSessionHasBeenFlushed']();else{if(function(_0x5eefa0){return'409'===_0x5eefa0['code'];}(_0x4da491)){const _0x4c69e6=$(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'](_0x4c69e6);}else{if(!(_0x4da491 instanceof X))throw _0x4da491;this['_handleReconnectionError']();}}}}['destroy'](){const _0x1e0037=this['editor']['plugins']['get'](c),_0x5d148c=this['editor']['plugins']['get'](i);this['editor']['enableReadOnlyMode']('rtc-destroyed'),_0x5d148c['channelSessions']['has'](this['_channelId'])&&_0x5d148c['unregister'](this['_channelId']),_0x1e0037['removeFromReconnectionStack'](this),this['_disconnectService'](),super['destroy']();}async['_handleReconnectionResponse'](_0x2ba92e){if(this['sessionId']!==_0x2ba92e['sessionId']&&this['_lastSyncedOperationId']!==_0x2ba92e['lastOperationId'])throw new X();return this['sessionId']=_0x2ba92e['sessionId'],this['_handleServerResponse']([],{..._0x2ba92e,'wereChangesApplied':!0x1,'data':_0x2ba92e['data']},'reconnect');}async['_connectService'](_0x5efe22,_0x4f59a4=!0x1){const {connection:_0x1014c5}=this['editor']['plugins']['get'](c);l['CollaborativeEditingService']['getConnectedSessions'](_0x1014c5,this['_channelId'])['then'](_0x10aa9b=>this['_initSessionsHandling'](_0x10aa9b))['catch'](_0xccf610=>{this['_crash']('realtimecollaborationclient-init-session-connection-error',_0xccf610);}),this['listenTo'](this['_service'],'operationsReceived',this['_handleReceivedOperations']['bind'](this)),this['listenTo'](this['_service'],'error',(_0x1a4a76,_0x3f1205)=>{this['_crash']('realtimecollaborationclient-initservice-internal-error',_0x3f1205);}),this['listenTo'](this['_service'],'disconnected',()=>{this['_isConnected']=!0x1;});const _0x42fa65=this['_operationIdentifier']['getIdOfTheLastOperation'](_0x5efe22);this['_isPendingUpdate']=!0x0;const _0x5424d1=await this['_service']['connect'](_0x1014c5,this['_compressOperations'](_0x5efe22),_0x42fa65);if(this['sessionId']=_0x5424d1['sessionId'],_0x4f59a4){if(!_0x5424d1['wereChangesApplied'])return void this['_handleReconnectionError']();this['_isPendingUpdate']=!0x1,this['_clearPendingAction'](),this['serverHistory']['reset'](),this['_offset']=_0x5424d1['offset'],this['serverHistory']['version']=this['_offset'],await this['_handleServerResponse'](_0x5efe22,_0x5424d1,'reconnection:\x20flushed\x20session');}else await this['_handleInitialConnectionData'](_0x5424d1,_0x5efe22);this['_handleSendingSelectionMarkers'](),this['_isConnected']=!0x0;}['_handleSendingSelectionMarkers'](){const _0x45367d=this['editor']['plugins']['get'](i),_0x1a6754=this['editor']['plugins']['get'](G),_0x4a2ff2=_0x45367d['channelSessions']['get'](this['_channelId']);_0x4a2ff2&&_0x4a2ff2['length']>0x1?_0x1a6754['createUserMarkerOperations']():this['listenTo'](_0x45367d,'sessionAdd:'+this['_channelId'],()=>{0x2===_0x45367d['channelSessions']['get'](this['_channelId'])['length']&&_0x1a6754['createUserMarkerOperations']();});}async['_handleReceivedOperations'](_0x2416c9,_0x521b7f,_0x30b0f6,_0x219c92){if(!this['_isPendingUpdate']&&this['_document']['version']==_0x521b7f){const _0x83563f=this['_decompressOperations'](_0x30b0f6,_0x219c92);await this['_fetchMissingUsers'](_0x83563f),this['_handleExternalOperations'](_0x83563f,_0x521b7f,_0x30b0f6['lastOperationId'])||this['_crash']('realtimecollaborationclient-initservice-incorrect-server-operation');}}async['_connectAfterSessionHasBeenFlushed'](){this['_disconnectService']();const {locale:_0x1a486a}=this['editor'];let _0x488e5c;try{_0x488e5c=await this['_service']['getDocumentDetails']();}catch(_0x30dca3){const _0x5cf289=$(_0x1a486a,'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'](_0x5cf289);}const _0x7715f=_0x488e5c['currentDocumentSession']||_0x488e5c['lastDocumentSession'];if(this['_lastSyncedOperationId']===_0x7715f['lastOperationId'])await this['_connectService'](this['editor']['model']['document']['history']['getOperations'](),!0x0);else{const _0x2363fc=$(_0x1a486a,'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'](_0x2363fc);}}['_disconnectService'](){this['_service']['disconnect'](),this['_bufferedOperations']=[],clearTimeout(this['_sendBufferedOperationsDelayId']),this['stopListening'](this['_service']);}['_initSessionsHandling'](_0x12cacf){const _0x4a00a6=this['editor']['plugins']['get'](i);this['listenTo'](_0x4a00a6,'sessionAdd:'+this['_channelId'],(_0x555229,{session:_0x5c61ba})=>{if(_0x5c61ba['id']===_0x4a00a6['mySessionId']){_0x555229['off']();const _0x3b6b18=this['editor']['plugins']['has']('CommentsOnly')&&this['editor']['plugins']['get']('CommentsOnly');let _0xeaf523=_0x5c61ba['permissions'];_0x3b6b18&&_0x3b6b18['isEnabled']&&(_0xeaf523=_0xeaf523['filter'](_0x391268=>'document:write'!==_0x391268)),this['editor']['plugins']['get']('Permissions')['setPermissions'](_0xeaf523,this['_channelId']);}}),_0x4a00a6['register'](this['_channelId'],_0x12cacf);}['_initThrowingOnDataSet'](){const _0xc953c1=this['editor']['data']['set'];this['editor']['data']['set']=(..._0x3a45ca)=>{if(!_0x3a45ca[_0x3a45ca['length']-0x1]['suppressErrorInCollaboration'])throw new _0x2067cc('realtimecollaborationclient-editor-setdata-and-editor-data-set-are-forbidden-in-real-time-collaboration',this);_0xc953c1['apply'](this['editor']['data'],_0x3a45ca);};}['_setUpDataInit'](){this['editor']['data']['on']('init',(_0x3c41f1,[_0x1bf66d])=>{if(this['_document']['version'])throw new _0x2067cc('realtimecollaborationclient-init-document-already-initialized',this);_0x3c41f1['stop'](),this['_setPendingAction']();const _0x5623b2=this['editor']['config']['get']('rootsAttributes'),_0x33ed58=this['_getOperationsFromInitData'](_0x1bf66d,_0x5623b2);0x0==_0x33ed58['length']&&_0x33ed58['push'](new _0x4e4135(0x0)),_0x3c41f1['return']=this['_connectService'](_0x33ed58)['then'](()=>{this['editor']['plugins']['get'](c)['addToReconnectionStack'](this),this['editor']['data']['fire']('ready');})['catch'](_0x12535f=>this['_crash']('realtimecollaborationclient-init-connection-failed',_0x12535f))['finally'](()=>this['_clearPendingAction']());},{'priority':'high'}),this['editor']['on']('loadRoot',async(_0x443a50,[_0xd5aa88,_0x1c14bc])=>{_0x443a50['stop']();const _0x82bc41=this['editor']['model']['document']['getRoot'](_0xd5aa88);if(!this['_knownRootNames']['has'](_0xd5aa88)){const _0x50cb97=_0x1c14bc&&_0x1c14bc['data']?_0x1c14bc['data']:'',_0x123dce=_0x1c14bc&&_0x1c14bc['attributes']?_0x1c14bc['attributes']:{};await this['_loadRoot'](_0xd5aa88,_0x50cb97,_0x123dce);}this['editor']['model']['enqueueChange']({'isUndoable':!0x1},()=>{_0x82bc41['_isLoaded']=!0x0,this['editor']['model']['document']['differ']['_bufferRootLoad'](_0x82bc41);});},{'priority':'high'});}async['_fetchMissingUsers'](_0x174d41){const _0x4a97c4=this['editor']['plugins']['get'](_0x13305b),{connection:_0x134421}=this['editor']['plugins']['get'](c),_0x2cf62c=new Set();for(const _0x44460e of _0x174d41){const _0x4f5eed=_0x44460e['_authorId'];_0x4f5eed&&!_0x4a97c4['getUser'](_0x4f5eed)&&_0x2cf62c['add'](_0x4f5eed);}if(0x0===_0x2cf62c['size'])return;const _0x1c20c2=await ht['getMany'](_0x134421,Array['from'](_0x2cf62c));for(const _0x3a34a6 of _0x1c20c2)_0x4a97c4['getUser'](_0x3a34a6['id'])||_0x4a97c4['addUser'](_0x3a34a6);}['_getOperationsFromInitData'](_0x124ccb,_0x3ba638={}){const _0x3802eb=this['editor']['model'],_0x58b39b=[];let _0x3223ab=0x0;const _0x1927a5='string'==typeof _0x124ccb?{'main':_0x124ccb}:_0x124ccb;for(const _0x534569 of Object['keys'](_0x1927a5)){if(!this['_document']['roots']['has'](_0x534569))throw new _0x2067cc('realtimecollaborationclient-init-non-existent-root',this);const _0x17467f=this['editor']['data']['parse'](_0x1927a5[_0x534569]),_0x5ad7f0=this['_document']['getRoot'](_0x534569),_0xd9e97b=new _0x5e0cf2(_0x3802eb['createPositionAt'](_0x5ad7f0,0x0),_0x17467f,_0x3223ab++);_0x58b39b['push'](_0xd9e97b);for(const [_0x52ad46,_0x42b6ff]of _0x17467f['markers']){const _0x1ea1e7=_0x3802eb['createRange'](_0x3802eb['createPositionFromPath'](_0x5ad7f0,_0x42b6ff['start']['path']['slice']()),_0x3802eb['createPositionFromPath'](_0x5ad7f0,_0x42b6ff['end']['path']['slice']())),_0x2ab936=new _0x54f3a2(_0x52ad46,null,_0x1ea1e7,_0x3802eb['markers'],!0x0,_0x3223ab++);_0x58b39b['push'](_0x2ab936);}}if(_0x3ba638)for(const [_0x972fe6,_0x31c42b]of Object['entries'](_0x3ba638)){const _0xa8a42c=_0x3802eb['document']['getRoot'](_0x972fe6);if(!_0xa8a42c)throw new _0x2067cc('multi-root-editor-root-attributes-no-root',null);for(const [_0x16ca87,_0x1bb7d8]of Object['entries'](_0x31c42b))if(null!==_0x1bb7d8){const _0x17b847=new _0x34ffa8(_0xa8a42c,_0x16ca87,null,_0x1bb7d8,_0x3223ab++);_0x58b39b['push'](_0x17b847);}}return _0x58b39b;}async['_loadRoot'](_0x18ead5,_0x3c9dc6,_0x19fae9){this['_getOperationsFromInitData']({[_0x18ead5]:_0x3c9dc6},{[_0x18ead5]:_0x19fae9})['forEach']((_0x2d3138,_0x408d7f)=>{_0x2d3138['baseVersion']=this['_document']['version']+_0x408d7f,_0x2d3138['_isInit']=!0x0,this['_saveOperationInBuffer'](_0x2d3138);}),this['_sendBufferedOperationsDelayed'](),await this['_waitUntilSynced']();}async['_handleInitialConnectionData'](_0x3ecd03,_0x762794){let _0x144d80;this['_offset']=_0x3ecd03['offset'];const _0x20a0ec=_0x3ecd03['wereChangesApplied']&&!_0x3ecd03['initData'],_0x53cfa8=_0x20a0ec?0x0:_0x3ecd03['data']['baseVersion'];if(_0x762794['forEach'](_0x28a64e=>{_0x28a64e['_isInit']=!0x0,_0x28a64e['createdAt']=_0x3ecd03['sessionCreatedAt'],_0x28a64e['_authorId']=null;}),_0x20a0ec)_0x144d80=_0x762794,this['_applyOperationsSet'](_0x144d80,_0x20a0ec);else{if(_0x3ecd03['initData']){const _0x495fe7=this['_getOperationsFromInitData'](_0x3ecd03['initData']);this['_document']['history']['version']=-_0x495fe7['length'],_0x495fe7['forEach'](_0x4554d6=>{_0x4554d6['baseVersion']-=_0x495fe7['length'],_0x4554d6['createdAt']=_0x3ecd03['sessionCreatedAt'],_0x4554d6['_isInit']=!0x0,_0x4554d6['_authorId']=null;}),this['_applyOperationsSet'](_0x495fe7,!0x0),this['serverHistory']['version']=-_0x495fe7['length']+this['_offset'],this['_updateServerHistory'](_0x495fe7);}this['_document']['history']['version']=_0x53cfa8,_0x144d80=this['_decompressOperations'](_0x3ecd03['data'],_0x3ecd03['metadata']),await this['_fetchMissingUsers'](_0x144d80),this['_applyOperationsSet'](_0x144d80,_0x20a0ec);}_0x3ecd03['lastOperationId']&&(this['_operationIdentifier']['setIdForTheLastOperation'](_0x144d80,_0x3ecd03['lastOperationId']),this['_lastSyncedOperationId']=_0x3ecd03['lastOperationId']),this['serverHistory']['version']=_0x53cfa8+this['_offset'],this['_updateServerHistory'](_0x144d80),_0x762794['filter'](_0x519d42=>{const _0x50207c=this['_getAffectedRoot'](_0x519d42);return _0x50207c&&!this['_knownRootNames']['has'](_0x50207c);})['forEach']((_0x1db812,_0x4f0d9c)=>{_0x1db812['baseVersion']=this['_document']['version']+_0x4f0d9c,this['_saveOperationInBuffer'](_0x1db812);}),this['_shouldSendUpdate']()?(this['_currentBufferDelay']=0x0,this['_sendBufferedOperationsDelayed'](!0x0),await this['_waitUntilSynced']()):(this['_isPendingUpdate']=!0x1,this['_clearPendingAction']());}['_crash'](_0x7ae909,_0x9642c2){throw this['_isPendingUpdate']=!0x0,_0x9642c2&&console['error'](_0x9642c2),new _0x2067cc(_0x7ae909,this['editor']);}['_saveOperationInBuffer'](_0x1550eb){this['_knownOperations']['has'](_0x1550eb)||(this['_knownOperations']['add'](_0x1550eb),this['_bufferedOperations']['push'](_0x1550eb),this['_pendingAction']||'marker'==_0x1550eb['type']&&!_0x1550eb['affectsData']||this['_setPendingAction']());}['_sendBufferedOperationsDelayed'](_0x1e61dd=!0x1){!_0x1e61dd&&this['_isPendingUpdate']||(this['_isPendingUpdate']=!0x0,clearTimeout(this['_sendBufferedOperationsDelayId']),this['_sendBufferedOperationsDelayId']=setTimeout(()=>{this['_sendBufferedOperations']()['then'](_0x198392=>{_0x198392&&(this['_clearPendingAction'](),this['_isPendingUpdate']=!0x1);})['catch'](_0x27bbf7=>{if(this['_clearPendingAction'](),this['_isPendingUpdate']=!0x1,!function(_0x97a315){return _0x97a315['message']['startsWith']('cloud-services-internal-error:\x20Not\x20connected.')||_0x97a315['message']['startsWith']('cloud-services-internal-error:\x20Collaborative\x20Editing\x20Service\x20is\x20not\x20connected.')||_0x97a315['message']['startsWith']('cloud-services-internal-error:\x20Request\x20timeout.');}(_0x27bbf7))throw _0x27bbf7;});},this['_currentBufferDelay']));}['_waitUntilSynced'](){return new Promise(_0x399c1d=>{this['on']('change:_isPendingUpdate',()=>{_0x399c1d();});});}async['_sendBufferedOperations'](){const _0xae97ec=this['editor']['plugins']['get'](G);if(this['_shouldSendSelectionUpdate']()&&(_0xae97ec['createUserMarkerOperations'](),this['_hasSelectionChanged']=!0x1),!this['_shouldSendUpdate']())return!0x0;const _0x3ccec7=[...this['_bufferedOperations']];for(const _0x4eecbf of _0x3ccec7)_0x4eecbf['wasUndone']=this['_document']['history']['isUndoneOperation'](_0x4eecbf);const _0x13a315=this['_operationIdentifier']['getIdOfTheLastOperation'](_0x3ccec7),_0x3de3d6=Q++,_0x591ce5=this['_compressOperations'](_0x3ccec7),_0x3bb8b9=await this['_service']['sendOperations'](_0x591ce5,_0x591ce5['baseVersion'],_0x13a315);try{return await this['_handleServerResponse'](_0x3ccec7,_0x3bb8b9,_0x3de3d6);}catch(_0x516d2e){return this['_crash']('realtimecollaborationclient-sendbufferedoperations',_0x516d2e);}}async['_handleServerResponse'](_0x35ab7b,_0x3fc756,_0x635214){if('error'in _0x3fc756)throw _0x3fc756['error'];let _0x5a7966=!0x1;if(_0x3fc756['wereChangesApplied']){_0x3fc756['lastOperationId']&&(this['_lastSyncedOperationId']=_0x3fc756['lastOperationId']),this['_bufferedOperations']=this['_bufferedOperations']['filter'](_0x5eb90b=>!_0x35ab7b['includes'](_0x5eb90b));for(const _0x582134 of _0x35ab7b)_0x582134['createdAt']='lastOperationAcceptedAt'in _0x3fc756&&_0x3fc756['lastOperationAcceptedAt']||void 0x0;Y(_0x35ab7b,_0x3fc756['version']-_0x35ab7b['length']),this['_updateServerHistory'](_0x35ab7b);const _0x321ed0=_0x35ab7b['filter'](_0x102773=>{if(!_0x102773['_isInit'])return!0x1;const _0x21db31=this['_getAffectedRoot'](_0x102773);return _0x21db31&&!this['_knownRootNames']['has'](_0x21db31);});Y(_0x321ed0,this['_document']['version']),this['_applyOperationsSet'](_0x321ed0),_0x5a7966=!0x0,this['_currentBufferDelay']=this['_baseBufferDelay'];}else{const _0x1cceee=this['_decompressOperations'](_0x3fc756['data'],_0x3fc756['metadata'])['filter'](_0x427edb=>_0x427edb['baseVersion']>=this['_lastServerVersion']);_0x1cceee['forEach'](_0x367a10=>this['_addKnownRoot'](_0x367a10)),this['_bufferedOperations']=this['_bufferedOperations']['filter'](_0x45d551=>!_0x45d551['_isInit']||!this['_knownRootNames']['has'](this['_getAffectedRoot'](_0x45d551))),this['_bufferedOperations']['length']&&Y(this['_bufferedOperations'],this['_bufferedOperations'][0x0]['baseVersion']),await this['_fetchMissingUsers'](_0x1cceee),_0x5a7966=this['_handleExternalOperations'](_0x1cceee,_0x3fc756['version'],_0x3fc756['lastOperationId']),this['_currentBufferDelay']=Math['round'](this['_currentBufferDelay']/0x2);}return _0x5a7966?!this['_shouldSendUpdate']()||(this['_sendBufferedOperationsDelayed'](!0x0),!0x1):this['_crash']('realtimecollaborationclient-handleserverresponse');}['_handleExternalOperations'](_0x5bf8a7,_0x4fd6c7,_0x3963ec){try{const _0x1fc911={'document':this['_document'],'useRelations':!0x1,'padWithNoOps':!0x0},{operationsA:_0x3c2afd,operationsB:_0x1f5d2,originalOperations:_0x23ed4f}=_0x50e32b(_0x5bf8a7,this['_bufferedOperations'],_0x1fc911);Y(_0x3c2afd,this['_document']['version']),Y(_0x1f5d2,_0x4fd6c7);for(const _0xec92e3 of _0x3c2afd){const _0x32fd34=_0x23ed4f['get'](_0xec92e3);_0xec92e3['_authorId']=_0x32fd34?_0x32fd34['_authorId']:null;}_0x3963ec&&(this['_operationIdentifier']['setIdForTheLastOperation'](_0x5bf8a7,_0x3963ec),this['_lastSyncedOperationId']=_0x3963ec),this['_bufferedOperations']=[..._0x1f5d2],this['_applyOperationsSet'](_0x3c2afd),this['_updateServerHistory'](_0x5bf8a7);}catch(_0x295a44){return console['error'](_0x295a44),!0x1;}return!0x0;}['_applyOperationsSet'](_0x1d3fa4,_0x9a027a=!0x1){this['editor']['model']['enqueueChange']({'isUndoable':!0x1,'isLocal':!0x1},_0x13fac3=>{for(const _0x366995 of _0x1d3fa4)this['_knownOperations']['add'](_0x366995),this['_addKnownRoot'](_0x366995),_0x13fac3['batch']['addOperation'](_0x366995),this['editor']['model']['applyOperation'](_0x366995);});}['_addKnownRoot'](_0x509ec6){const _0xf99895=this['_getAffectedRoot'](_0x509ec6);_0xf99895&&this['_knownRootNames']['add'](_0xf99895);}['_getAffectedRoot'](_0x28c029){let _0x12604b,_0x4f0233;switch(_0x28c029['type']){case'insert':_0x12604b=_0x28c029['position']['root'];break;case'marker':if(_0x4f0233=_0x28c029['newRange'],!_0x4f0233)return null;_0x12604b=_0x4f0233['root'];break;case'addRootAttribute':_0x12604b=_0x28c029['root'];break;case'addRoot':_0x12604b=_0x28c029['affectedSelectable'];break;case'move':_0x12604b=_0x28c029['targetPosition']['root'];break;default:return null;}return _0x12604b['rootName'];}['_updateServerHistory'](_0x2271be){_0x2271be['forEach'](_0x36336b=>{const _0x1a145a=_0x36336b['clone']();_0x1a145a['_authorId']=_0x36336b['_authorId'],_0x1a145a['_isInit']=!!_0x36336b['_isInit'],_0x1a145a['createdAt']=_0x36336b['createdAt'],_0x1a145a['baseVersion']+=this['_offset'],_0x36336b['_isDisconnection']&&this['_disconnectionOperations']['add'](_0x1a145a),this['serverHistory']['addOperation'](_0x1a145a);});}['_handleReconnectionError'](_0x5a8fea){const _0x21f50a=this['editor']['plugins']['get']('Notification'),_0x17b16b=this['editor']['locale'];_0x5a8fea||(_0x5a8fea=$(_0x17b16b,'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.')),_0x21f50a['showWarning'](_0x5a8fea,{'title':$(_0x17b16b,'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'](_0x116dc2)['add']($(this['editor']['locale'],'PENDING_ACTION_SENDING_DATA')));}['_clearPendingAction'](){this['_pendingAction']&&(this['editor']['plugins']['get'](_0x116dc2)['remove'](this['_pendingAction']),this['_pendingAction']=null);}['_compressOperations'](_0x519fc2){const _0x486296=_0x519fc2['map'](_0x314a55=>_0x314a55['toJSON']());return this['_compressor']['compress'](_0x486296);}['_decompressOperations'](_0xca9bc3,_0x31b099){return this['_compressor']['decompress'](_0xca9bc3)['map']((_0x1f7a71,_0x4bd772)=>{const _0x43f95f='init'==_0x31b099[_0x4bd772]['type'];if('InsertOperation'==_0x1f7a71['__className']){const _0x57ea24=_0x1f7a71['position']['root'];!this['_document']['getRoot'](_0x57ea24)&&(this['_document']['createRoot']('$root',_0x57ea24)['_isAttached']=!0x1);}const _0xe384b=_0x75592d['fromJSON'](_0x1f7a71,this['_document']);return _0xe384b['wasUndone']=_0x1f7a71['wasUndone'],_0xe384b['_isInit']=_0x43f95f,_0xe384b['_authorId']=_0x43f95f?null:_0x31b099[_0x4bd772]['userId'],_0xe384b['_isDisconnection']='cs:removeUser'===_0x31b099[_0x4bd772]['type'],_0xe384b['createdAt']=_0x31b099[_0x4bd772]['createdAt'],_0xe384b;});}['_refreshUserSelectionMarkers'](){this['_hasSelectionChanged']=!0x0,this['_shouldSendSelectionUpdate']()?this['_sendBufferedOperationsDelayed']():this['_hasSelectionChanged']=!0x1;}['_shouldSendSelectionUpdate'](){const _0x4548b9=this['editor']['plugins']['get'](i)['channelSessions']['get'](this['_channelId']);return!this['editor']['isReadOnly']&&!!_0x4548b9&&_0x4548b9['length']>0x1&&this['_hasSelectionChanged'];}['_shouldSendUpdate'](){return this['_bufferedOperations']['length']>0x0||this['_shouldSendSelectionUpdate']();}}class X extends Error{}function Y(_0x59b76e,_0x4f0994){for(const _0x1c5abb of _0x59b76e)_0x1c5abb['baseVersion']=_0x4f0994++;}class Z{['_ignoredOperations'];['_operationToId'];constructor(_0x493b86){this['_ignoredOperations']=_0x493b86,this['_operationToId']=new WeakMap();}['getIdOfTheLastOperation'](_0x3061f4){let _0x93f980=_0x3061f4['length'];for(;_0x93f980--;){const _0x17d216=_0x3061f4[_0x93f980];if(!this['_ignoredOperations']['has'](_0x17d216)){if(!this['_operationToId']['has'](_0x17d216)){const _0x455eb8=_0x23cfbe()['slice'](0x1,0x12);this['_operationToId']['set'](_0x17d216,_0x455eb8);}return this['_operationToId']['get'](_0x17d216);}}}['setIdForTheLastOperation'](_0x7245b6,_0x49c92e){if(!_0x49c92e)return;let _0x1930f9=_0x7245b6['length'];for(;_0x1930f9--;){const _0x264e8a=_0x7245b6[_0x1930f9];this['_ignoredOperations']['has'](_0x264e8a)||this['_operationToId']['set'](_0x264e8a,_0x49c92e);}}}class n extends _0x3c7597{static get['requires'](){return[l];}static get['pluginName'](){return'RealTimeCollaborativeEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}class a extends _0x1f6ad9{static ['CommentsService']=/* #__PURE__ -- @preserve */
26
- ((()=>_0x40bb4f)());['_services'];static get['requires'](){return[c,'CommentsRepository',i,_0x13305b];}static get['pluginName'](){return'CloudServicesCommentsAdapter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x527bc1){super(_0x527bc1),this['_services']=new Map();}async['init'](){const _0x57f711=this['context'],_0x1d8efd=_0x57f711['plugins']['get']('CommentsRepository');if(_0x57f711['plugins']['get'](c)['addToReconnectionStack'](this),_0x1d8efd['adapter']={'addCommentThread':async({channelId:_0x3d77c1,threadId:_0x5eb021,comments:_0x3b0ab5,resolvedAt:_0x1e7bc2,resolvedBy:_0x2f6bd5,context:_0x5f335e,attributes:_0x829837})=>{const _0x5af6fb=await this['_getService'](_0x3d77c1)['addCommentThread']({'commentThreadId':_0x5eb021,'comments':_0x3b0ab5['map'](_0x267ba0=>function(_0x3a4d5e,_0x2e1da0,_0x582a9d){return{'commentThreadId':_0x582a9d,'commentId':_0x3a4d5e['commentId'],'userId':_0x3a4d5e['authorId'],'content':_0x3a4d5e['content'],'documentId':_0x2e1da0,'createdAt':_0x3a4d5e['createdAt'],'attributes':_0x3a4d5e['attributes']||{}};}(_0x267ba0,_0x3d77c1,_0x5eb021)),'resolvedAt':_0x1e7bc2,'resolvedBy':_0x2f6bd5,'context':_0x5f335e,'attributes':_0x829837})['catch'](lt);return{'threadId':_0x5af6fb['commentThreadId'],'comments':_0x5af6fb['comments']};},'getCommentThread':async({channelId:_0x4e4f36,threadId:_0x26f40a})=>{const _0x4516a6=await this['_getService'](_0x4e4f36)['getCommentThread'](_0x26f40a)['catch'](lt);return _0x4516a6['deletedAt']?null:(await this['_fetchMissingUsersForThreads']([_0x4516a6]),{'threadId':_0x4516a6['commentThreadId'],'comments':_0x4516a6['comments']['map'](b),'context':_0x4516a6['context'],'resolvedAt':_0x4516a6['resolvedAt'],'resolvedBy':_0x4516a6['resolvedBy'],'attributes':_0x4516a6['attributes']||{}});},'updateCommentThread':async({channelId:_0x17b2c9,threadId:_0x8b8da,context:_0x1b8a56,unlinkedAt:_0x24cc2e,attributes:_0x15a717})=>this['_getService'](_0x17b2c9)['updateCommentThread']({'commentThreadId':_0x8b8da,'context':_0x1b8a56,'attributes':_0x15a717,'unlinkedAt':_0x24cc2e})['catch'](y)['catch'](lt),'resolveCommentThread':async({channelId:_0x4a7377,threadId:_0x8fbabf})=>{const _0x3ad467=await this['_getService'](_0x4a7377)['resolveCommentThread'](_0x8fbabf)['catch'](y)['catch'](lt);return{'threadId':_0x3ad467['commentThreadId'],'resolvedAt':_0x3ad467['resolvedAt'],'resolvedBy':_0x3ad467['resolvedBy']};},'reopenCommentThread':async({channelId:_0x823579,threadId:_0x2304bd})=>this['_getService'](_0x823579)['reopenCommentThread'](_0x2304bd)['catch'](y)['catch'](lt),'removeCommentThread':({channelId:_0x335020,threadId:_0x202de4})=>this['_getService'](_0x335020)['removeCommentThread'](_0x202de4)['catch'](y)['catch'](lt),'addComment':({channelId:_0x590935,threadId:_0x42a513,commentId:_0x187a65,content:_0x1354ee,attributes:_0x39fa2f})=>this['_getService'](_0x590935)['addComment'](_0x42a513,_0x187a65,_0x1354ee,_0x39fa2f)['catch'](lt),'updateComment':({channelId:_0x491c60,threadId:_0x3f30ef,commentId:_0x55f6aa,content:_0x3b8ca1,attributes:_0x3f5975})=>this['_getService'](_0x491c60)['updateComment'](_0x3f30ef,_0x55f6aa,_0x3b8ca1,_0x3f5975)['catch'](y)['catch'](lt),'removeComment':({channelId:_0x11459c,threadId:_0x1a651f,commentId:_0x51ea2d})=>this['_getService'](_0x11459c)['removeComment'](_0x1a651f,_0x51ea2d)['catch'](y)['catch'](lt)},_0x57f711 instanceof _0x3bacf4){const _0x6ef459=_0x57f711['config']['get']('collaboration.channelId'),_0x45ea05=_0x57f711['plugins']['get'](i);await this['_setUpService'](_0x6ef459);const _0x37b85e=await this['_services']['get'](_0x6ef459)['getConnectedSessions']();this['listenTo'](_0x45ea05,'sessionAdd:'+_0x6ef459,(_0x453c8a,{session:_0x5506d5})=>{_0x5506d5['id']===_0x45ea05['mySessionId']&&(_0x453c8a['off'](),this['context']['plugins']['get']('Permissions')['setPermissions'](_0x5506d5['permissions'],_0x6ef459));}),_0x45ea05['register'](_0x6ef459,_0x37b85e);}}async['_setUpService'](_0x5a0c33){if(this['_services']['has'](_0x5a0c33))throw new _0x2067cc('cloudservicescommentsadapter-connect-already-connected',null,{'channelId':_0x5a0c33});const _0x5911b7=this['context']['plugins']['get']('CommentsRepository'),_0x30a892=new a['CommentsService'](_0x5a0c33);this['_services']['set'](_0x5a0c33,_0x30a892),this['listenTo'](_0x30a892,'commentThreadAdded',(_0x10ffc4,_0x1c33dc)=>{const {commentThreadId:_0x5c6a2f,documentId:_0x1b01f9,context:_0x1e436d,attributes:_0x75436c,resolvedAt:_0x202ce2,resolvedBy:_0x366bb3,comments:_0xb27150}=_0x1c33dc;_0x5911b7['getCommentThread'](_0x5c6a2f)||_0x5911b7['addCommentThread']({'threadId':_0x5c6a2f,'channelId':_0x1b01f9,'comments':_0xb27150?_0xb27150['map'](b):[],'context':_0x1e436d,'attributes':_0x75436c,'resolvedAt':_0x202ce2,'resolvedBy':_0x366bb3,'isFromAdapter':!0x0});}),this['listenTo'](_0x30a892,'commentThreadUpdated',(_0x4fd3bc,{commentThreadId:_0x5ba152,documentId:_0x5a6465,context:_0x1542fb,unlinkedAt:_0x3740b9,attributes:_0x49d8d8})=>{_0x5911b7['getCommentThread'](_0x5ba152)&&_0x5911b7['updateCommentThread']({'threadId':_0x5ba152,'channelId':_0x5a6465,'context':_0x1542fb,'unlinkedAt':_0x3740b9,'attributes':_0x49d8d8,'isFromAdapter':!0x0});}),this['listenTo'](_0x30a892,'commentThreadResolved',(_0x4bfc4c,{commentThreadId:_0x2cfe86,resolvedBy:_0x23b83c,resolvedAt:_0x2011d2})=>{const _0x276215=_0x5911b7['getCommentThread'](_0x2cfe86);_0x276215&&_0x276215['resolve']({'resolvedBy':_0x23b83c,'resolvedAt':_0x2011d2,'isFromAdapter':!0x0});}),this['listenTo'](_0x30a892,'commentThreadReopened',(_0x499eed,{commentThreadId:_0x4f33c9})=>{const _0xa50593=_0x5911b7['getCommentThread'](_0x4f33c9);_0xa50593&&_0xa50593['reopen']({'isFromAdapter':!0x0});}),this['listenTo'](_0x30a892,'commentThreadRemoved',(_0x2e0d70,{commentThreadId:_0x7d118b})=>{const _0x21a972=_0x5911b7['getCommentThread'](_0x7d118b);_0x21a972&&_0x21a972['remove']({'isFromAdapter':!0x0});}),this['listenTo'](_0x30a892,'commentAdded',(_0x2842b6,_0x30ad82)=>{const _0x13d67e=_0x30ad82['commentThreadId'],_0x4c5865=_0x5911b7['getCommentThread'](_0x13d67e);_0x4c5865&&_0x4c5865['addComment']({...b(_0x30ad82),'isFromAdapter':!0x0});}),this['listenTo'](_0x30a892,'commentUpdated',(_0x246043,{commentThreadId:_0x4209ea,commentId:_0x263643,content:_0x450d13,attributes:_0x421af1})=>{const _0x418580=_0x5911b7['getCommentThread'](_0x4209ea);if(_0x418580){const _0x452f34=_0x418580['getComment'](_0x263643);_0x452f34&&_0x452f34['update']({'content':_0x450d13,'attributes':_0x421af1,'isFromAdapter':!0x0});}}),this['listenTo'](_0x30a892,'commentRemoved',(_0x49f649,{commentThreadId:_0x120141,commentId:_0xe4ee3d})=>{const _0x55d97=_0x5911b7['getCommentThread'](_0x120141);if(_0x55d97){const _0x1ee83a=_0x55d97['getComment'](_0xe4ee3d);_0x1ee83a&&_0x1ee83a['remove']({'isFromAdapter':!0x0});}}),await this['_connectService'](_0x5a0c33);}['destroy'](){if(this['context']instanceof _0x3bacf4){const _0x104c77=this['context']['config']['get']('collaboration.channelId');this['_terminateService'](_0x104c77);}}['_terminateService'](_0x45951e){if(!this['_services']['has'](_0x45951e))throw new _0x2067cc('cloudservicescommentsadapter-disconnect-not-exist',null,{'channelId':_0x45951e});this['_getService'](_0x45951e)['disconnect'](),this['_services']['delete'](_0x45951e);}async['reconnect'](){for(const _0xc850db of this['_services']['keys']())await this['_connectService'](_0xc850db);if(this['context']instanceof _0x3bacf4){const _0x18f5d9=this['context']['config']['get']('collaboration.channelId'),_0x19f06f=this['context']['plugins']['get'](i);_0x19f06f['unregister'](_0x18f5d9);const _0x3e14ca=await this['_services']['get'](_0x18f5d9)['getConnectedSessions']();_0x19f06f['register'](_0x18f5d9,_0x3e14ca);}}async['_connectService'](_0xb8768){const {connection:_0x263a9a}=this['context']['plugins']['get'](c),_0x351705=this['context']['plugins']['get']('CommentsRepository'),_0x559c1d=this['_services']['get'](_0xb8768),_0x54a9c8=await _0x559c1d['connect'](_0x263a9a);await this['_fetchMissingUsersForThreads'](_0x54a9c8);const _0x50f720=new Set(Array['from'](_0x351705['getCommentThreads']({'channelId':_0xb8768}),_0x204b38=>_0x204b38['id']));for(const _0x1aba19 of _0x54a9c8)_0x1aba19['deletedAt']||_0x50f720['delete'](_0x1aba19['commentThreadId']);for(const _0x4d8d0b of _0x50f720)_0x351705['getCommentThread'](_0x4d8d0b)['remove']({'isFromAdapter':!0x0});for(const _0x48e6e7 of _0x54a9c8){let _0x238e1c=_0x351705['getCommentThread'](_0x48e6e7['commentThreadId']);const {commentThreadId:_0x296096,context:_0x5b4fc9,attributes:_0x15fc8e,resolvedBy:_0x3c26ab,resolvedAt:_0x528f03,unlinkedAt:_0x5132a4,deletedAt:_0x301c45}=_0x48e6e7;if(_0x301c45)continue;_0x238e1c||(_0x238e1c=_0x351705['addCommentThread']({'channelId':_0xb8768,'threadId':_0x296096,'context':_0x5b4fc9,'attributes':_0x15fc8e||{},'resolvedBy':_0x3c26ab,'resolvedAt':_0x528f03,'unlinkedAt':_0x5132a4,'isFromAdapter':!0x0}));const _0x376958=new Set(Array['from'](_0x238e1c['comments'],_0x135f59=>_0x135f59['id']));for(const _0x2b19df of _0x48e6e7['comments'])_0x376958['delete'](_0x2b19df['commentId']);for(const _0x11a4fa of _0x376958)_0x238e1c['getComment'](_0x11a4fa)['remove']({'isFromAdapter':!0x0});for(const _0x199f4c of _0x48e6e7['comments']){const _0x1096fc=_0x238e1c['getComment'](_0x199f4c['commentId']);_0x1096fc?_0x1096fc['content']!==_0x199f4c['content']&&_0x1096fc['update']({'content':_0x199f4c['content'],'isFromAdapter':!0x0}):_0x238e1c['addComment'](Object['assign'](b(_0x199f4c),{'isFromAdapter':!0x0}));}}}['_getService'](_0x5cf503){if(!this['_services']['has'](_0x5cf503))throw new _0x2067cc('cloudservicescommentsadapter-service-not-exist',null,{'channelId':_0x5cf503});return this['_services']['get'](_0x5cf503);}async['_fetchMissingUsersForThreads'](_0x581735){const _0x3a1c45=this['context']['plugins']['get'](_0x13305b),{connection:_0x1dad8f}=this['context']['plugins']['get'](c),_0x416eff=new Set();for(const {resolvedBy:_0x2d59ef,comments:_0x51b251}of _0x581735){_0x2d59ef&&!_0x3a1c45['getUser'](_0x2d59ef)&&_0x416eff['add'](_0x2d59ef);for(const {userId:_0xbf2c87}of _0x51b251)_0x3a1c45['getUser'](_0xbf2c87)||_0x416eff['add'](_0xbf2c87);}if(0x0===_0x416eff['size'])return;const _0x354c3f=await ht['getMany'](_0x1dad8f,Array['from'](_0x416eff));for(const _0x370346 of _0x354c3f)_0x3a1c45['getUser'](_0x370346['id'])||_0x3a1c45['addUser'](_0x370346);}}async function y(_0x58b658){if('404'!==_0x58b658['code'])throw _0x58b658;}function lt(_0x2250c0){if((_0x12b9e9=_0x2250c0)['message']['startsWith']('cloud-services-internal-error:\x20Comments\x20Service\x20is\x20not\x20connected.')||_0x12b9e9['message']['startsWith']('cloud-services-internal-error:\x20Not\x20connected.')||_0x12b9e9['message']['startsWith']('cloud-services-internal-error:\x20Request\x20timeout.'))return new Promise(()=>{});var _0x12b9e9;throw _0x2250c0;}function b(_0xba42ff){return{'threadId':_0xba42ff['commentThreadId'],'commentId':_0xba42ff['commentId'],'content':_0xba42ff['content'],'createdAt':_0xba42ff['createdAt'],'authorId':_0xba42ff['userId'],'attributes':_0xba42ff['attributes']||{}};}class f extends _0x3c7597{static ['TrackChangesService']=/* #__PURE__ -- @preserve */
27
- ((()=>_0x1bbb40)());['_bufferedRequests'];['_trackChangesService'];static get['requires'](){return[a,'TrackChangesEditing',c];}constructor(_0x3c7ed6){super(_0x3c7ed6);const _0x1fe15b=this['editor']['config']['get']('collaboration.channelId');this['_bufferedRequests']=new Map(),this['_trackChangesService']=new f['TrackChangesService'](_0x1fe15b);}['init'](){const _0x2479f1=this['editor']['plugins']['get'](c),_0x540668=this['editor']['plugins']['get']('TrackChangesEditing');return _0x540668['adapter']={'getSuggestion':async _0x302124=>{await this['_waitForServiceReady']();const _0x260b05=await this['_trackChangesService']['get'](_0x302124)['catch'](w);return await this['_fetchMissingUsersForThreads']([_0x260b05]),_0x260b05;},'addSuggestion':async({id:_0x38ced2,type:_0x293148,data:_0x2a51f1,originalSuggestionId:_0x5f9636,attributes:_0x1a93c0})=>{await this['_waitForServiceReady']();const _0x4d7ad7={'id':_0x38ced2,'type':_0x293148,'data':_0x2a51f1,'originalSuggestionId':_0x5f9636,'attributes':_0x1a93c0},_0x2470bb=await this['_trackChangesService']['add'](_0x38ced2,_0x293148,_0x2a51f1,_0x5f9636,_0x1a93c0)['catch'](_0x1a8b71=>{if(dt(_0x1a8b71))return new Promise(_0x197cab=>{this['_bufferedRequests']['set'](_0x38ced2,{'resolve':_0x197cab,'suggestionData':_0x4d7ad7});});throw _0x1a8b71;});return this['_bufferedRequests']['delete'](_0x38ced2),_0x2470bb;},'updateSuggestion':async(_0x222552,_0x45df2e)=>{if(await this['_waitForServiceReady'](),'open'!==_0x45df2e['state'])return this['_trackChangesService']['update'](_0x222552,_0x45df2e)['catch'](w);}},this['listenTo'](this['_trackChangesService'],'suggestionUpdated',(_0xe4d175,_0x4d7f79)=>{_0x540668['hasSuggestion'](_0x4d7f79['id'])&&(_0x540668['getSuggestion'](_0x4d7f79['id'])['attributes']=_0x4d7f79['attributes']);}),this['_trackChangesService']['connect'](_0x2479f1['connection'])['then'](_0x4065ee=>(_0x2479f1['addToReconnectionStack'](this),this['_fetchMissingUsersForThreads'](_0x4065ee)['then'](()=>{for(const _0x3ba930 of _0x4065ee){_0x540668['addSuggestionData'](_0x3ba930)['_saved']=!0x0;}})));}async['reconnect'](){const _0x35cd3f=this['editor']['plugins']['get']('TrackChangesEditing'),{connection:_0x3265c7}=this['editor']['plugins']['get'](c),_0x122eef=await this['_trackChangesService']['connect'](_0x3265c7);await this['_fetchMissingUsersForThreads'](_0x122eef);for(const {suggestionData:_0x4445d7,resolve:_0x15febb}of this['_bufferedRequests']['values']()){let _0x35175e=_0x122eef['find'](_0x24b1f0=>_0x24b1f0['id']===_0x4445d7['id']);_0x35175e||(_0x35175e=await this['_trackChangesService']['add'](_0x4445d7['id'],_0x4445d7['type'],_0x4445d7['data'],_0x4445d7['originalSuggestionId'])),_0x15febb(_0x35175e);}for(const _0x578b34 of _0x122eef)_0x35cd3f['hasSuggestion'](_0x578b34['id'])||_0x35cd3f['addSuggestionData'](_0x578b34);}async['_waitForServiceReady'](){this['_trackChangesService']['isConnected']||await new Promise(_0x218881=>{this['listenTo'](this['_trackChangesService'],'connected',_0x167dda=>{_0x167dda['off'](),_0x218881();});});}async['_fetchMissingUsersForThreads'](_0x4d1b32){const _0x2d7141=this['editor']['plugins']['get'](_0x13305b),{connection:_0x55bdd0}=this['editor']['plugins']['get'](c),_0x114edb=new Set();for(const {authorId:_0x2461dc}of _0x4d1b32)_0x2d7141['getUser'](_0x2461dc)||_0x114edb['add'](_0x2461dc);if(0x0===_0x114edb['size'])return;const _0x2a55a4=await ht['getMany'](_0x55bdd0,Array['from'](_0x114edb));for(const _0x5c6534 of _0x2a55a4)_0x2d7141['getUser'](_0x5c6534['id'])||_0x2d7141['addUser'](_0x5c6534);}}function w(_0x53e34e){if(dt(_0x53e34e))return new Promise(()=>{});throw _0x53e34e;}function dt(_0x316495){return _0x316495['message']['startsWith']('cloud-services-internal-error:\x20Not\x20connected.')||_0x316495['message']['startsWith']('cloud-services-internal-error:\x20Request\x20timeout.');}class m extends _0x3c7597{static get['requires'](){return['Comments',a,n,c];}static get['pluginName'](){return'RealTimeCollaborativeComments';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const _0x2a2d1e=this['editor']['plugins']['get'](c),_0x5d0382=this['editor']['plugins']['get']('CommentsEditing'),_0x5da430=this['editor']['plugins']['get'](a);return this['editor']['data']['once']('ready',()=>{this['listenTo'](_0x2a2d1e,'change:state',(_0x2180c0,_0x33e54c,_0x2e76b4)=>{_0x5d0382['isThreadsLoadingPaused']='connected'!==_0x2e76b4;});}),this['listenTo'](_0x2a2d1e,'change:state',(_0x3ceeac,_0xd0e7bd,_0xe07798)=>{this['editor']['plugins']['get']('CommentsRepository')['switchReadOnly']('connected'!==_0xe07798);}),_0x5da430['_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 _0x3c7597{static get['requires'](){return[m,f,'TrackChanges'];}static get['pluginName'](){return'RealTimeCollaborativeTrackChanges';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}class u extends _0x3c7597{static ['RevisionHistoryService']=/* #__PURE__ -- @preserve */
28
- ((()=>it)());['_lastRequestId'];['_revisionTracker'];['_revisionHistoryService'];['_oldOffset'];static get['requires'](){return[c,l,'RevisionTracker',i,_0x13305b];}constructor(_0xd6e23f){super(_0xd6e23f);const _0x3fd0f1=this['editor']['config']['get']('collaboration.channelId');this['_lastRequestId']=null,this['_revisionTracker']=this['editor']['plugins']['get']('RevisionTracker'),this['_revisionHistoryService']=new u['RevisionHistoryService'](_0x3fd0f1);}async['init'](){const _0x57a341=this['editor']['plugins']['get'](l),_0x55915a=_0x57a341['serverHistory'],_0x368c3a=this['editor']['plugins']['get'](c);this['_revisionTracker']['setSource']({'history':_0x55915a,'getLatestVersion':()=>this['_getLatestVersion'](),'getCurrentRevisionId':()=>_0x57a341['sessionId']});const _0x232375=this['editor']['config']['get']('cloudServices.bundleVersion')||nt,_0x11896e=await tt['isBundleUploaded'](_0x368c3a['connection'],_0x232375);this['_revisionTracker']['adapter']={'getRevision':async({revisionId:_0xffe06e})=>(await this['_waitForServiceReady'](),await this['_revisionHistoryService']['getRevision'](_0xffe06e)),'updateRevisions':async _0x4d5572=>{await this['_waitForServiceReady']();const _0x1da042=this['_revisionTracker']['currentRevision'];if(_0x11896e&&0x1===_0x4d5572['length']&&_0x4d5572[0x0]['id']===_0x1da042['id'])return _0x4d5572;for(const _0x378858 of _0x4d5572)_0x378858['id']===_0x1da042['id']&&(_0x378858['isEmptyCurrent']=_0x378858['fromVersion']===_0x378858['toVersion']);return this['_revisionHistoryService']['updateRevisions'](_0x4d5572,this['_lastRequestId'])['then'](_0x25a8b7=>(this['_lastRequestId']=_0x25a8b7,_0x4d5572))['catch'](_0x24ea31=>{if(P(_0x24ea31)||'400'===_0x24ea31['code']&&void 0x0!==_0x24ea31['data']['wrongRequestId']){for(const _0x19dfd7 of _0x4d5572){!this['_revisionTracker']['repository']['getRevision'](_0x19dfd7['id'])||this['_revisionTracker']['_bufferUpdate'](_0x19dfd7['id'],_0x19dfd7,!0x1);}if(P(_0x24ea31))throw _0x24ea31;return _0x4d5572;}throw _0x24ea31;});}},this['listenTo'](this['_revisionHistoryService'],'revisionsUpdated',(_0x4fa14c,{revisionsData:_0x4bd5cf,requestId:_0x40a1b7})=>{Math['max'](..._0x4bd5cf['map'](_0x19c1f1=>_0x19c1f1['toVersion']))>this['_getLatestVersionFromServerOperations']()-0x1?this['_getLatestVersion']()['then'](()=>{this['_handleRevisionsUpdate'](_0x4bd5cf,_0x40a1b7);}):this['_handleRevisionsUpdate'](_0x4bd5cf,_0x40a1b7);});const {revisions:_0x533fcc,requestId:_0x3d3893}=await this['_revisionHistoryService']['connect'](_0x368c3a['connection']);_0x368c3a['addToReconnectionStack'](this),this['_lastRequestId']=_0x3d3893,await this['_fetchMissingUsers'](_0x533fcc);for(const _0x3836fc of _0x533fcc)this['_revisionTracker']['addRevisionData'](_0x3836fc);this['listenTo'](_0x57a341,'change:_isConnected',(_0x5659b5,_0x52a5b9,_0x4d7b6f)=>{_0x4d7b6f&&(this['_oldOffset']=_0x57a341['_offset'],_0x5659b5['off']());}),this['_revisionTracker']['bind']('isEnabled')['to'](_0x368c3a,'state',_0x3e6502=>_0x3e6502===_0x1ba25d['CONNECTED']);}async['reconnect'](){const _0x2fe8e0=this['editor']['plugins']['get'](c),_0x45a5a8=this['editor']['plugins']['get'](l),_0x2c7cb8=async()=>{const _0x1bd82a=this['_revisionTracker']['currentRevision'],_0x1fe5c2=_0x1bd82a['id'],_0xf833f0=_0x1fe5c2!==_0x45a5a8['sessionId'];if(_0xf833f0){const _0x1e80b7=_0x45a5a8['_offset']-this['_oldOffset'],_0x43696b=this['_getLatestVersionFromServerOperations']();this['_revisionTracker']['_revisionDataBuilder']['reInit']();if(_0x1bd82a['toVersion']+_0x1e80b7!==_0x43696b){const _0x3e30c6=_0x1bd82a['fromVersion']+_0x1e80b7,_0x45385a=this['editor']['plugins']['get'](_0x13305b),_0x50eb10=this['_revisionTracker']['buildRevisionData']({'revision':_0x1bd82a,'from':_0x3e30c6,'to':_0x43696b});_0x50eb10['id']=_0x1bd82a['id'];const _0x232e59=_0x50eb10['authorsIds']['map'](_0x44dc99=>_0x45385a['getUser'](_0x44dc99));_0x1bd82a['_update']({..._0x50eb10,'authors':_0x232e59},!0x0),this['_revisionTracker']['_bufferUpdate'](_0x1bd82a['id'],_0x50eb10,!0x0);}this['_revisionTracker']['_startingVersion']=_0x43696b,(_0x1bd82a['toVersion']===_0x1bd82a['fromVersion']&&!this['_revisionTracker']['_bufferedUpdates']['has'](_0x1fe5c2)&&this['_revisionTracker']['repository']['_revisions']['remove'](_0x1fe5c2),this['_revisionTracker']['_createCurrentRevision'](_0x43696b));}const {revisions:_0x4060ca,requestId:_0x569ec1}=await this['_revisionHistoryService']['reconnect'](_0x2fe8e0['connection'],this['_lastRequestId']);_0xf833f0&&_0x4060ca['length']>0x0?_0x45a5a8['_handleReconnectionError']():(await this['_fetchMissingUsers'](_0x4060ca),this['_handleRevisionsUpdate'](_0x4060ca,_0x569ec1),this['_revisionTracker']['sendBufferedUpdates']());};return _0x45a5a8['_isConnected']?_0x2c7cb8():new Promise((_0xb3350b,_0xc4df08)=>{_0x45a5a8['once']('change:_isConnected',()=>{_0x2c7cb8()['then'](_0xb3350b)['catch'](_0xc4df08);});});}['destroy'](){super['destroy']();}async['_waitForServiceReady'](){this['_revisionHistoryService']['isConnected']||await new Promise(_0x291d1c=>{this['listenTo'](this['_revisionHistoryService'],'connected',_0x56cdb6=>{_0x56cdb6['off'](),_0x291d1c();});});}['_getLatestVersionFromServerOperations'](){const _0x544c8e=this['editor']['plugins']['get'](l)['serverHistory']['getOperations']()['reverse']();for(const _0x3a5d7d of _0x544c8e)if('marker'!==_0x3a5d7d['type']||_0x3a5d7d['affectsData'])return _0x3a5d7d['baseVersion']+0x1;}['_getLatestVersion'](){const _0x2fab74=this['editor']['plugins']['get'](l);return new Promise(_0x10a48b=>{_0x2fab74['_isPendingUpdate']?_0x2fab74['once']('change:_isPendingUpdate',()=>{_0x10a48b(this['_getLatestVersionFromServerOperations']());}):_0x10a48b(this['_getLatestVersionFromServerOperations']());});}['_handleRevisionsUpdate'](_0x5d20be,_0x2994ed){const _0x269981=this['_revisionTracker']['repository'];this['_lastRequestId']=_0x2994ed;for(const _0x4efaba of _0x5d20be){const _0xe71cf=_0x269981['getRevision'](_0x4efaba['id']);if(_0xe71cf){if((_0x4efaba['fromVersion']||_0x4efaba['toVersion'])&&(_0x4efaba['diffData']=null),_0xe71cf===this['_revisionTracker']['currentRevision']){const _0x2f5c3f=Math['max'](_0xe71cf['toVersion'],_0x4efaba['toVersion']),_0x990493=Math['max'](_0xe71cf['fromVersion'],_0x4efaba['fromVersion']);let _0x362e5c;_0xe71cf['toVersion']===_0x4efaba['toVersion']&&_0xe71cf['fromVersion']===_0x4efaba['fromVersion']?(_0x362e5c=!0x0,this['_preventResendingRevisionData'](_0x4efaba)):_0x4efaba['toVersion']===_0x2f5c3f&&_0x4efaba['fromVersion']===_0x990493?_0x362e5c=!0x1:(_0xe71cf['toVersion']===_0x2f5c3f&&_0xe71cf['fromVersion']===_0x990493||this['_fixRevision']({'revision':_0xe71cf,'from':_0x990493,'to':_0x2f5c3f}),_0x362e5c=!0x0),_0x362e5c&&(delete _0x4efaba['fromVersion'],delete _0x4efaba['toVersion'],delete _0x4efaba['diffData'],delete _0x4efaba['createdAt'],delete _0x4efaba['authorsIds']);}this['_revisionTracker']['setRevisionData'](_0x4efaba),this['_preventResendingRevisionData'](_0x4efaba);}else this['_revisionTracker']['addRevisionData'](_0x4efaba);}const _0x5af2c0=_0x269981['getRevisions']();_0x5af2c0['reverse']();for(let _0x3a3299=0x0;_0x3a3299<_0x5af2c0['length']-0x1;_0x3a3299++){const _0x4ed8d0=_0x5af2c0[_0x3a3299],_0x49e98d=_0x5af2c0[_0x3a3299+0x1];if(_0x4ed8d0['fromVersion']<_0x49e98d['toVersion']){const _0x55594b=_0x49e98d['toVersion'],_0x29ba6e=Math['max'](_0x55594b,_0x4ed8d0['toVersion']);this['_fixRevision']({'revision':_0x4ed8d0,'from':_0x55594b,'to':_0x29ba6e});}}}['_fixRevision']({revision:_0x2be10b,from:_0x4b19fe,to:_0x1d93fa}={}){const _0x58759e=this['editor']['plugins']['get'](_0x13305b),_0x20222=this['_revisionTracker']['buildRevisionData']({'revision':_0x2be10b,'from':_0x4b19fe,'to':_0x1d93fa});_0x20222['authors']=_0x20222['authorsIds']['map'](_0x33fa72=>_0x58759e['getUser'](_0x33fa72)),_0x2be10b['_update'](_0x20222);}['_preventResendingRevisionData'](_0x37b777){const _0x46602b={};_0x46602b['id']=_0x37b777['id'];for(const _0x132e4d of Object['keys'](_0x37b777))'id'!==_0x132e4d&&(_0x46602b[_0x132e4d]=void 0x0);this['_revisionTracker']['_bufferUpdate'](_0x46602b['id'],_0x46602b,!0x0);}async['_fetchMissingUsers'](_0x3887a8){const _0x573517=this['editor']['plugins']['get'](_0x13305b),{connection:_0x353923}=this['editor']['plugins']['get'](c),_0x168602=new Set();for(const _0x536258 of _0x3887a8){for(const _0x24a5b6 of _0x536258['authorsIds'])_0x4181ab(_0x24a5b6);_0x536258['creatorId']&&_0x4181ab(_0x536258['creatorId']);}if(0x0===_0x168602['size'])return;const _0x2294c9=await ht['getMany'](_0x353923,Array['from'](_0x168602));for(const _0x286679 of _0x2294c9)_0x573517['getUser'](_0x286679['id'])||_0x573517['addUser'](_0x286679);function _0x4181ab(_0x14a5ef){_0x573517['getUser'](_0x14a5ef)||_0x168602['add'](_0x14a5ef);}}}function P(_0x4238f0){return _0x4238f0['message']['startsWith']('cloud-services-internal-error:\x20Revision\x20History\x20Service\x20is\x20not\x20connected.')||_0x4238f0['message']['startsWith']('cloud-services-internal-error:\x20Not\x20connected.')||_0x4238f0['message']['startsWith']('cloud-services-internal-error:\x20Request\x20timeout.');}class g extends _0x3c7597{static get['requires'](){return['RevisionHistory',u,n];}static get['pluginName'](){return'RealTimeCollaborativeRevisionHistory';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}class ts extends _0x4c3ca9{constructor(_0x51104c){super(_0x51104c);const _0x51a903=this['bindTemplate'];this['set']('usersCount',0x0),this['set']('isHidden',!0x0),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-presence-list__counter',_0x51a903['if']('isHidden','ck-presence-list__counter--hidden')]},'children':[{'text':_0x51a903['to']('usersCount',_0x1879ce=>$(_0x51104c,'CONNECTED_USERS',_0x1879ce))}]});}}class es extends _0x4c3ca9{['items'];['keystrokes'];constructor(_0x37a1f5){super(_0x37a1f5);const _0x54db14=this['bindTemplate'];this['items']=this['createCollection'](),this['keystrokes']=new _0x30daff(),this['set']({'hasPopup':!0x1,'isExpanded':!0x1}),this['setTemplate']({'tag':'div','attributes':{'aria-haspopup':_0x54db14['if']('hasPopup'),'aria-expanded':_0x54db14['to']('isExpanded',_0xc34f73=>this['hasPopup']&&String(_0xc34f73)),'aria-label':_0x54db14['to']('hasPopup',_0x2bd5c1=>$(_0x37a1f5,_0x2bd5c1?'Collapsed\x20connected\x20users\x20list\x20(press\x20ENTER\x20to\x20open\x20it)':'Connected\x20users\x20list')),'role':'list','tabindex':_0x54db14['to']('hasPopup',_0x417760=>!!_0x417760&&0x0),'class':['ck','ck-presence-list__list']},'children':this['items'],'on':{'click':_0x54db14['to'](()=>this['fire']('execute'))}}),this['on']('change:hasPopup',(_0x2f357e,_0x35be91,_0x515c09)=>{this['element']&&(_0x515c09?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 _ extends _0x4c3ca9{['counterView'];['inlineListView'];constructor(_0xe01933){super(_0xe01933);const _0x4b209a=this['bindTemplate'];this['set']('isCollapsed',!0x0),this['counterView']=new ts(this['locale']),this['inlineListView']=new es(_0xe01933),this['inlineListView']['bind']('hasPopup')['to'](this,'isCollapsed'),this['listenTo'](this['inlineListView']['items'],'change',()=>{for(const _0x11068e of this['inlineListView']['items'])_0x11068e['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',_0x4b209a['if']('isCollapsed','ck-presence-list--collapsed')]},'children':[this['counterView'],this['inlineListView']]});}}class M extends _0x4c3ca9{['listWrapperView'];constructor(_0x17943a,_0x2fe5b5){super(_0x17943a),this['listWrapperView']=new ut(_0x17943a,_0x2fe5b5),this['setTemplate']({'tag':'div','attributes':{'tabindex':-0x1,'role':'application','class':['ck','ck-presence-list__dropdown-list'],'aria-label':$(_0x17943a,'Connected\x20users\x20list\x20dropdown\x20menu')},'children':[this['listWrapperView']]});}}class ut extends _0xbf831b{constructor(_0x207846,_0x46eeb0){super(_0x207846);const _0x38c3ce=this['bindTemplate'];this['set']('_isScrollable',!0x1),this['setTemplate']({'tag':_0x46eeb0?'div':'ul','attributes':{'class':['ck','ck-reset','ck-list','ck-presence-list__dropdown-list-wrapper',_0x38c3ce['if']('_isScrollable','ck-presence-list__dropdown-list-wrapper_scrollable')],'role':_0x38c3ce['to']('role'),'aria-label':_0x38c3ce['to']('ariaLabel'),'aria-labelledby':_0x38c3ce['to']('ariaLabelledBy')},'children':this['items']}),this['listenTo'](_0x2c0094['window'],'resize',()=>this['checkIfScrollable']()),this['items']['on']('change',()=>this['checkIfScrollable']());}['render'](){super['render'](),this['checkIfScrollable']();}['checkIfScrollable'](){const _0x4a413e=this['element'];_0x4a413e&&(this['_isScrollable']=Math['max'](_0x4a413e['scrollHeight'],_0x4a413e['clientHeight'])>0.8*window['innerHeight']);}}class E extends st{['userView'];constructor(_0x3d5bc0,_0x5cd428,_0x2e5e19){super(_0x3d5bc0);const _0x2b43c7=this['bindTemplate'];this['userView']=new et(_0x3d5bc0,_0x5cd428);const _0x525637={'tag':'li','attributes':{'class':['ck','ck-presence-list__dropdown-list-item'],'tabindex':-0x1,'role':'presentation','aria-label':_0x5cd428['name']},'children':[this['userView'],{'tag':'span','attributes':{'class':['ck','ck-user__full-name']},'children':[{'text':_0x5cd428['name']}]},{'tag':'span','attributes':{'class':['ck','ck-presence-list__marker',_0x5cd428['color']['getBackgroundColorClass']()],'aria-hidden':'true'}}]};_0x2e5e19&&(_0x525637['tag']='button',_0x525637['on']={'click':_0x2b43c7['to'](()=>this['fire']('execute'))}),this['setTemplate'](_0x525637);}['focus'](){this['element']['focus']();}}class T extends _0x4c3ca9{['userView'];['markerView'];constructor(_0xf59995,_0x3b5ae2,_0x22591e){super(_0xf59995);const _0x1c3e34=this['bindTemplate'];this['set']('isFocusable',!0x1),this['set']('hasTooltip',!0x0),this['set']('tooltipPosition',''),this['userView']=new et(_0xf59995,_0x3b5ae2),this['markerView']=new ct(_0xf59995,_0x3b5ae2);const _0x18f788=new ot(_0xf59995);_0x18f788['template']['tag']='span',_0x18f788['text']=_0x3b5ae2['name'];const _0x474df5={'tag':'div','attributes':{'class':['ck','ck-presence-list__list-item'],'role':'listitem','tabindex':_0x1c3e34['to']('isFocusable',_0x51872b=>!!_0x51872b&&0x0),'aria-labelledby':_0x18f788['id'],'data-cke-tooltip-text':this['userView']['name'],'data-cke-tooltip-position':_0x1c3e34['to']('tooltipPosition'),'data-cke-tooltip-disabled':_0x1c3e34['to']('hasTooltip',_0xb65107=>!_0xb65107),'data-cke-tooltip-class':'ck-presence-list__list-item__tooltip'},'children':[this['userView'],this['markerView'],_0x18f788]};_0x22591e&&(_0x474df5['tag']='button',_0x474df5['on']={'click':_0x1c3e34['to'](()=>this['fire']('execute'))}),this['setTemplate'](_0x474df5);}}class ct extends _0x4c3ca9{constructor(_0xfb3654,_0x315ab5){super(_0xfb3654),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-presence-list__marker',_0x315ab5['color']['getBackgroundColorClass']()],'aria-hidden':'true'}});}}const D={'collapseAt':0x6,'displayMe':!0x0};class r extends _0x1f6ad9{['currentDisplayedUsers'];['balloonPanelView'];['view'];['presenceDropdownView'];['_bodyCollection']=null;constructor(_0x191e2b){super(_0x191e2b),this['context']['config']['define']('presenceList',D);const _0x7322c5=_0x191e2b['config']['get']('presenceList.collapseAt');if('number'!=typeof _0x7322c5)throw new _0x2067cc('presencelist-collapseat-invalid-format',this);if(_0x7322c5<0x1)throw new _0x2067cc('presencelist-collapseat-invalid-format',this);this['_allConnectedUsers']=this['context']['plugins']['get'](i)['allConnectedUsers'],this['set']('usersCount',0x0),this['currentDisplayedUsers']=new _0x3caab5(),this['balloonPanelView']=new _0x4ca446(),this['balloonPanelView']['class']='ck\x20ck-presence-list__balloon',this['view']=this['_createView'](),this['presenceDropdownView']=void 0x0;}static get['requires'](){return[i];}['init'](){for(const _0xaac55e of this['_allConnectedUsers'])this['_handleUserAdd'](_0xaac55e);this['listenTo'](this['_allConnectedUsers'],'add',(_0xdfde68,_0x3b0837)=>{this['_handleUserAdd'](_0x3b0837);}),this['listenTo'](this['_allConnectedUsers'],'remove',(_0x5e2b05,_0x20f505)=>{this['_handleUserRemove'](_0x20f505);});}['_createView'](){const _0x28d428=this['context'],_0x5af5b5=new _(this['context']['locale']),_0x13f6fe=this['balloonPanelView'];if(!_0x52addc(_0x28d428['config']['get']('presenceList.container')))throw new _0x2067cc('presencelist-missing-container',this);return _0x5af5b5['counterView']['bind']('usersCount')['to'](this),_0x5af5b5['bind']('isCollapsed')['to'](this,'usersCount',_0x494714=>{const {collapseAt:_0x31f4ee,displayMe:_0x3a79e8}=_0x28d428['config']['get']('presenceList'),_0x1016ab=_0x494714>=_0x31f4ee;return _0x5af5b5['counterView']['isHidden']=!(0x1==_0x494714&&_0x3a79e8||_0x1016ab),_0x1016ab||this['hideDropdown'](),_0x1016ab;}),_0x5af5b5['inlineListView']['items']['bindTo'](this['currentDisplayedUsers'])['using'](_0x42dd26=>{const _0x44c2dd=_0x28d428['config']['get']('presenceList'),_0x3ea088=new T(_0x28d428['locale'],_0x42dd26,!!_0x44c2dd['onClick']);return _0x3ea088['bind']('hasTooltip')['to'](_0x5af5b5,'isCollapsed',_0x5d6ada=>!_0x5d6ada),_0x3ea088['bind']('isFocusable')['to'](_0x5af5b5,'isCollapsed',_0x30074b=>!_0x30074b),_0x44c2dd['onClick']&&this['listenTo'](_0x3ea088,'execute',()=>{this['view']['isCollapsed']||_0x44c2dd['onClick'](_0x42dd26,_0x3ea088['element']);}),_0x3ea088;}),this['listenTo'](_0x5af5b5['inlineListView'],'execute',()=>{this['presenceDropdownView']?this['hideDropdown']():this['view']['isCollapsed']&&this['showDropdown']();}),_0x5af5b5['inlineListView']['keystrokes']['set']('Enter',(_0x5cecec,_0x30e78d)=>{this['view']['isCollapsed']&&(this['showDropdown'](),_0x30e78d());}),_0x5af5b5['render'](),_0x13f6fe['render'](),_0x512ea3({'emitter':_0x5af5b5,'activator':()=>_0x13f6fe['isVisible'],'contextElements':[_0x13f6fe['element'],_0x5af5b5['inlineListView']['element']],'callback':()=>this['hideDropdown']()}),_0x28d428['config']['get']('presenceList.container')['appendChild'](_0x5af5b5['element']),this['_bodyCollection']=new _0x320c61(this['context']['locale']),this['_bodyCollection']['attachToDom'](),this['_bodyCollection']['add'](this['balloonPanelView']),_0x5af5b5;}['_handleUserAdd'](_0x2fa5c8){if(!this['context']['config']['get']('presenceList.displayMe')&&_0x2fa5c8['isMe'])return;const _0x12eb52=this['context']['config']['get']('presenceList.collapseAt')-0x1;this['usersCount']++,this['currentDisplayedUsers']['length']==_0x12eb52&&this['currentDisplayedUsers']['length']>0x1&&this['currentDisplayedUsers']['remove'](0x1);const _0x5743b1=_0x2fa5c8['isMe']?0x0:this['currentDisplayedUsers']['length'];this['currentDisplayedUsers']['add'](_0x2fa5c8,_0x5743b1);}['_handleUserRemove'](_0x2c3809){if(this['usersCount']--,this['currentDisplayedUsers']['get'](_0x2c3809['id'])&&(this['currentDisplayedUsers']['remove'](_0x2c3809['id']),this['currentDisplayedUsers']['length']<this['usersCount'])){for(const _0xa78f5b of Array['from'](this['_allConnectedUsers'])['reverse']())if(!this['currentDisplayedUsers']['get'](_0xa78f5b['id']))return void this['currentDisplayedUsers']['add'](_0xa78f5b,Math['min'](this['currentDisplayedUsers']['length'],0x1));}}['showDropdown'](){if(this['presenceDropdownView'])return;const _0x46ad88=this['context']['config']['get']('presenceList');this['presenceDropdownView']=new M(this['context']['locale'],!!_0x46ad88['onClick']),this['view']['inlineListView']['isExpanded']=!0x0;const {listWrapperView:_0x494bbe}=this['presenceDropdownView'];_0x494bbe['items']['bindTo'](this['_allConnectedUsers'])['using'](_0xe1af9c=>{if(!_0x46ad88['displayMe']&&_0xe1af9c['isMe'])return null;const _0x1f6da7=new E(this['context']['locale'],_0xe1af9c,!!_0x46ad88['onClick']);return _0x46ad88['onClick']&&this['listenTo'](_0x1f6da7,'execute',()=>{_0x46ad88['onClick'](_0xe1af9c,_0x1f6da7['element']);}),_0x1f6da7;}),this['balloonPanelView']['content']['add'](this['presenceDropdownView']),this['balloonPanelView']['pin']({'target':this['view']['inlineListView']['element']}),_0x494bbe['focus'](),_0x494bbe['checkIfScrollable']();const _0xca38fe=(_0x2be65e,_0x275938)=>{this['hideDropdown'](),this['view']['inlineListView']['focus'](),_0x275938();};_0x494bbe['keystrokes']['set']('Esc',_0xca38fe),_0x494bbe['keystrokes']['set']('Shift+Tab',_0xca38fe),_0x494bbe['keystrokes']['set']('Tab',(_0xb47248,_0x3d752b)=>{!function(_0x2b0b40){const _0x3c53d0=['a','button','input','select','textarea','[tabindex]','[contenteditable]']['map'](_0x2e3a82=>_0x2e3a82+':not([disabled]):not([tabindex=\x22-1\x22])')['join'](','),_0x52b047=[...document['body']['querySelectorAll'](_0x3c53d0)]['filter'](_0x5940da=>_0x5940da===document['activeElement']||_0x5940da['offsetWidth']+_0x5940da['offsetHeight']>0x0)['sort']((_0x3b42b1,_0x4dcdd3)=>(_0x3b42b1['tabIndex']||0x0)-(_0x4dcdd3['tabIndex']||0x0)),_0x1be04f=_0x52b047['indexOf'](_0x2b0b40),_0x3d71db=_0x52b047[(_0x1be04f+0x1)%_0x52b047['length']];_0x3d71db&&_0x3d71db['focus']();}(this['view']['element']),this['hideDropdown'](),_0x3d752b();}),_0x494bbe['focusTracker']['add'](this['view']['element']),_0x494bbe['focusTracker']['on']('change:isFocused',(_0x49dea9,_0x2ed28d,_0x2cc55e)=>{_0x2cc55e||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 s extends _0x1f6ad9{static get['requires'](){return[i,r];}static get['pluginName'](){return'PresenceList';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{a as CloudServicesCommentsAdapter,u as CloudServicesRevisionHistoryAdapter,f as CloudServicesTrackChangesAdapter,s as PresenceList,l as RealTimeCollaborationClient,m as RealTimeCollaborativeComments,n as RealTimeCollaborativeEditing,g as RealTimeCollaborativeRevisionHistory,p as RealTimeCollaborativeTrackChanges};
23
+ import{ContextPlugin as _0x1f4b11,Plugin as _0x19a2cf,PendingActions as _0x348cb2,Context as _0x40f0f4}from'@ckeditor/ckeditor5-core/dist/index.js';import{DomEmitterMixin as _0x232e3e,CKEditorError as _0x111ec8,Collection as _0x31aad8,global as _0x378d67,version as nt,uid as _0x2d4457,KeystrokeHandler as _0x193340}from'@ckeditor/ckeditor5-utils/dist/index.js';import{Notification as _0x489625,View as _0x348816,ListView as _0x1b93e4,ListItemView as rt,LabelView as ot,BalloonPanelView as _0x589f52,clickOutsideHandler as _0x15bf43,BodyCollection as _0x1080b2}from'@ckeditor/ckeditor5-ui/dist/index.js';import{LiveRange as ht,History as _0x46144f,NoOperation as _0x3310ee,InsertOperation as _0x433745,MarkerOperation as _0x253e69,RootAttributeOperation as _0x560b41,transformSets as _0x5453a3,OperationFactory as _0x4b5901}from'@ckeditor/ckeditor5-engine/dist/index.js';import{WebSocketGateway as lt,WEB_SOCKET_GATEWAY_STATES as _0x3e94aa,CollaborativeEditingService as _0x43a9a2,User as dt,CommentsService as _0xfbf3c9,TrackChangesService as tt,RevisionHistoryService as et,EditorService as st}from'@ckeditor/ckeditor-cloud-services-collaboration/dist/index.js';import{Users as _0x2bb1a6,UserView as ct}from'ckeditor5-collaboration/dist/index.js';import{Compressor as _0xf624f5}from'@ckeditor/ckeditor5-operations-compressor/dist/index.js';import{isElement as _0x2bce76}from'lodash-es';class c extends _0x1f4b11{static ['WebSocketGateway']=/* #__PURE__ -- @preserve */
24
+ ((()=>lt)());static ['initialReconnectionInterval']=0x3e8;['connection'];['_reconnectionStack'];['_shouldPluginsReconnect'];['_domEmitter'];static get['requires'](){return['CloudServices',_0x489625];}static get['pluginName'](){return'WebSocketGateway';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1ed242){super(_0x1ed242),this['set']('state',_0x3e94aa['CONNECTED']),this['set']('_isBrowserOffline',!0x1),this['_reconnectionStack']=new Set(),this['_shouldPluginsReconnect']=!0x1,this['_domEmitter']=Object['create'](_0x232e3e);}['init'](){const _0x13fac6=this['context'],_0x770ae7=_0x13fac6['plugins']['get']('CloudServices'),_0x546995=_0x13fac6['plugins']['get'](_0x489625);if(!_0x770ae7['token'])throw new _0x111ec8('websocketgateway-missing-token',this);if(!_0x770ae7['webSocketUrl'])throw new _0x111ec8('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'](_0x770ae7['token'],_0x770ae7['webSocketUrl'],{'timeout':0x3e8*this['context']['config']['get']('cloudServices.connectionTimeout'),'requestTimeout':0x3e8*this['context']['config']['get']('cloudServices.requestTimeout')})['then'](_0x55af22=>{if(this['connection']=_0x55af22,this['bind']('state')['to'](_0x55af22,'state',this,'_isBrowserOffline',(_0x566803,_0x19cd33)=>('connected'!==_0x566803&&(this['_shouldPluginsReconnect']=!0x0),_0x19cd33||_0x566803!==_0x3e94aa['CONNECTED']?_0x3e94aa['DISCONNECTED']:this['state']==_0x3e94aa['DISCONNECTED']&&this['_shouldPluginsReconnect']?(this['_shouldPluginsReconnect']=!0x1,this['_reconnect'](),_0x3e94aa['CONNECTING']):_0x3e94aa['CONNECTED'])),this['connection']['on']('error',(_0x3b431e,_0x4287e1)=>{if('limitExceeded'!==_0x4287e1['code'])throw console['error'](_0x4287e1),new _0x111ec8('cloudservices-init',null,{'originalError':_0x4287e1});_0x546995['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'});}),!_0x55af22['me'])return new Promise(_0x272aff=>_0x55af22['on']('change:me',_0x272aff));})['catch'](_0x385273=>{throw console['error'](_0x385273),new _0x111ec8('cloudservices-init',null,{'originalError':_0x385273});});}['addToReconnectionStack'](_0xfc9c47){if('function'!=typeof _0xfc9c47['reconnect'])throw new _0x111ec8('websocketgateway-invalid-plugin-interface',this);if(this['isInReconnectionStack'](_0xfc9c47))throw new _0x111ec8('websocketgateway-plugin-already-registered',this,{'name':_0xfc9c47['constructor']['pluginName']});this['_reconnectionStack']['add'](_0xfc9c47);}['removeFromReconnectionStack'](_0xa8e371){this['_reconnectionStack']['delete'](_0xa8e371);}['isInReconnectionStack'](_0x5d953c){return this['_reconnectionStack']['has'](_0x5d953c);}['_reconnect'](){return this['connection']['reconnect']()['then'](()=>Promise['all'](Array['from'](this['_reconnectionStack'],_0x42b55b=>_0x42b55b['reconnect']())))['then'](()=>this['state']=_0x3e94aa['CONNECTED'])['catch'](_0x1e6e48=>{throw console['error'](_0x1e6e48),new _0x111ec8('cloudservices-reconnection-error',this['context']);});}['destroy'](){this['connection']&&this['connection']['disconnect'](),this['state']=_0x3e94aa['DISCONNECTED'],this['_domEmitter']['stopListening'](),super['destroy']();}}class i extends _0x1f4b11{['channelSessions'];['channelConnectedUsers'];['allConnectedUsers'];['_registeredSessions'];['_uniqueUsersCount'];['_users'];static get['pluginName'](){return'Sessions';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[c,_0x2bb1a6];}constructor(_0x3721d5){super(_0x3721d5),this['channelSessions']=new Map(),this['channelConnectedUsers']=new Map(),this['allConnectedUsers']=new _0x31aad8(),this['_registeredSessions']=new Map(),this['_uniqueUsersCount']=0x0,this['_users']=this['context']['plugins']['get'](_0x2bb1a6);}['init'](){const _0x4df366=this['context']['plugins']['get'](c);this['listenTo'](_0x4df366,'change:state',(_0x45b03e,_0x28f9df,_0x3a4877)=>{if('connected'!==_0x3a4877)this['channelSessions']['forEach'](_0x53268d=>_0x53268d['clear']()),this['channelConnectedUsers']['forEach'](_0x5efc55=>_0x5efc55['clear']()),this['allConnectedUsers']['clear']();else{for(const [_0x4e009a,_0x1fb6c4]of this['_registeredSessions'])for(const _0x17f29b of _0x1fb6c4)this['_handleSessionAdd'](_0x4e009a,_0x17f29b);}}),this['_createUser'](_0x4df366['connection']['me'],!0x0);}['register'](_0x15de8e,_0xaacc7f){if(this['_registeredSessions']['has'](_0x15de8e))throw new _0x111ec8('sessions-register-already-registered',null,{'channelId':_0x15de8e});this['_registeredSessions']['set'](_0x15de8e,_0xaacc7f),this['channelSessions']['set'](_0x15de8e,new _0x31aad8()),this['channelConnectedUsers']['set'](_0x15de8e,new _0x31aad8()),this['listenTo'](_0xaacc7f,'add',(_0x2cca23,_0x2d838b)=>this['_handleSessionAdd'](_0x15de8e,_0x2d838b)),this['listenTo'](_0xaacc7f,'remove',(_0x150efb,_0x145415)=>this['_handleSessionRemove'](_0x15de8e,_0x145415));for(const _0x845526 of _0xaacc7f)this['_handleSessionAdd'](_0x15de8e,_0x845526);}['unregister'](_0x5d1cd1){if(!this['_registeredSessions']['has'](_0x5d1cd1))throw new _0x111ec8('sessions-unregister-not-exist',null,{'channelId':_0x5d1cd1});const _0x3cd55e=this['_registeredSessions']['get'](_0x5d1cd1);this['stopListening'](_0x3cd55e);for(const _0x7aa028 of _0x3cd55e)'connected'===this['context']['plugins']['get'](c)['state']&&this['_handleSessionRemove'](_0x5d1cd1,_0x7aa028);this['_registeredSessions']['delete'](_0x5d1cd1),this['channelSessions']['delete'](_0x5d1cd1),this['channelConnectedUsers']['delete'](_0x5d1cd1);}get['mySessionId'](){return this['context']['plugins']['get'](c)['connection']['sessionId'];}['getUserBySessionId'](_0x2b625f){for(const _0x342476 of this['channelSessions']['values']())for(const _0x3d0829 of _0x342476)if(_0x3d0829['id']===_0x2b625f)return _0x3d0829['user'];}['getUserSessions'](_0x5ab4e8,_0xbc9c2d){const _0x22e6db=_0xbc9c2d?[this['channelSessions']['get'](_0xbc9c2d)]:this['channelSessions']['values'](),_0x54c021=new Set();for(const _0x9e645d of _0x22e6db)for(const _0x588df2 of _0x9e645d)_0x588df2['user']['id']===_0x5ab4e8['id']&&_0x54c021['add'](_0x588df2['id']);return _0x54c021;}['getUserRole'](_0x2f2f84){for(const _0x26b613 of this['channelSessions']['values']())for(const _0x462b2b of _0x26b613)if(_0x462b2b['user']===_0x2f2f84)return _0x462b2b['role'];}['_handleSessionAdd'](_0x510d13,_0x442dff){if('connected'!==this['context']['plugins']['get'](c)['state'])return;const _0x2e7069=_0x442dff['user'],_0x48445f=this['_users']['getUser'](_0x2e7069['id'])||this['_createUser'](_0x2e7069),_0x24dc70=Object['assign']({},_0x442dff,{'user':_0x48445f});this['channelSessions']['get'](_0x510d13)['add'](_0x24dc70);const _0x42725a=this['channelConnectedUsers']['get'](_0x510d13);_0x42725a['has'](_0x48445f['id'])||_0x42725a['add'](_0x48445f),this['allConnectedUsers']['has'](_0x48445f['id'])||this['allConnectedUsers']['add'](_0x48445f,_0x48445f['isMe']?0x0:void 0x0),this['fire']('sessionAdd:'+_0x510d13,{'channelId':_0x510d13,'session':_0x24dc70});}['_handleSessionRemove'](_0x34deba,_0x31379f){if('connected'!==this['context']['plugins']['get'](c)['state'])return;const _0x31a132=this['channelConnectedUsers']['get'](_0x34deba),_0xc1ab76=_0x31379f['user'];_0xc1ab76['id']&&(this['channelSessions']['get'](_0x34deba)['remove'](_0x31379f['id']),_0x31a132['has'](_0xc1ab76['id'])&&!this['getUserSessions'](_0xc1ab76,_0x34deba)['size']&&_0x31a132['remove'](_0xc1ab76['id']),this['allConnectedUsers']['get'](_0xc1ab76['id'])&&!this['getUserSessions'](_0xc1ab76)['size']&&this['allConnectedUsers']['remove'](_0xc1ab76['id']));}['_createUser'](_0x1b3218,_0x351e8f){const _0x27933e=this['_users']['addUser'](_0x1b3218);return _0x351e8f&&this['_users']['defineMe'](_0x1b3218['id']),_0x27933e['orderNumber']=this['_uniqueUsersCount']++,_0x27933e;}}class H extends _0x19a2cf{['_domEmitter']=new(_0x232e3e())();static get['requires'](){return[i];}static get['pluginName'](){return'UserMarkers';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const _0x5438da=this['editor'],_0x35f813=_0x5438da['plugins']['get'](i);_0x5438da['conversion']['for']('editingDowncast')['markerToElement']({'model':'user:position','view':(_0x12085d,{writer:_0x419ea4})=>function(_0x2ec92f,_0x471e29,_0x59c7b9,_0xc6b23f){const _0x4a6cf5=_0x2ec92f['markerName']['split'](':')[0x2],_0x122069=_0x59c7b9['getUserBySessionId'](_0x4a6cf5);if(!_0x122069||_0x4a6cf5===_0x59c7b9['mySessionId'])return;if(!_0xc6b23f['model']['schema']['checkChild'](_0x2ec92f['markerRange']['start'],'$text'))return;const _0x195382={'class':'ck-user__marker\x20'+_0x122069['color']['getMarkerClass'](),'data-name':_0x122069['name'],'data-session-id':_0x4a6cf5},_0x515f79=_0xc6b23f['model']['markers']['get'](_0x2ec92f['markerName']),_0xbc9f23=_0x515f79['getStart'](),_0x158f9a=_0xbc9f23['nodeAfter'],_0x200c48=_0xc6b23f['model']['schema'];if(_0x158f9a&&_0x200c48['isObject'](_0x158f9a)&&_0x200c48['isInline'](_0x158f9a)&&!_0xc6b23f['model']['markers']['get']('user:range:'+_0x4a6cf5)['getRange']()['isCollapsed'])return;const _0x4c98c7=_0xbc9f23['parent'];return _0xc6b23f['model']['schema']['isLimit'](_0x4c98c7)&&!_0xc6b23f['model']['hasContent'](_0x4c98c7)&&(_0x195382['contenteditable']=!0x1),function(_0x2c7d1e,_0x172c66,_0x5ab736){const _0x5b6fe5=_0x2c7d1e['createUIElement']('span',_0x172c66);return _0x2c7d1e['setCustomProperty']('userPositionMarker',!0x0,_0x5b6fe5),_0x5b6fe5['render']=function(_0xea4de0){const _0x33a704=this['toDomElement'](_0xea4de0);return _0x33a704['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>'+_0x5ab736['name']+'</span>⁠',_0x33a704['addEventListener']('mouseenter',()=>{_0x33a704['classList']['add']('ck-user__marker_hovered');}),_0x33a704['addEventListener']('mouseleave',()=>{_0x33a704['classList']['remove']('ck-user__marker_hovered');}),_0x33a704;},_0x5b6fe5['isSimilar']=function(_0x4376c4){return!(!this['getCustomProperty']('userPositionMarker')||!_0x4376c4['getCustomProperty']('userPositionMarker')||this['getAttribute']('data-session-id')!=_0x4376c4['getAttribute']('data-session-id'));},_0x5b6fe5;}(_0x471e29,_0x195382,_0x122069);}(_0x12085d,_0x419ea4,_0x35f813,_0x5438da)}),_0x5438da['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'user:range','view':_0x14c31e=>function(_0x1c2572,_0x2a9fb3){const _0x14409c=_0x1c2572['markerName']['split'](':')[0x2];if(_0x14409c===_0x2a9fb3['mySessionId'])return null;const _0x20a76e=_0x2a9fb3['getUserBySessionId'](_0x14409c);if(!_0x20a76e)return{'id':_0x14409c,'classes':[]};return{'id':_0x14409c,'classes':['ck-user__selection',_0x20a76e['color']['getSelectionClass']()],'attributes':{'data-session-id':_0x14409c},'priority':0x7d0+_0x20a76e['orderNumber']};}(_0x14c31e,_0x35f813)}),function(_0x5f0481){const _0x5a7b57=_0x5f0481['model'],_0xa7135c=new Map(),_0x5832a6=_0x5f0481['plugins']['get'](i);_0x5a7b57['markers']['on']('update:user:range',(_0x41a4c5,_0x1f7119,_0x59f6e2,_0x328955)=>{if(!_0x328955&&_0xa7135c['get'](_0x1f7119['name']))return _0xa7135c['get'](_0x1f7119['name'])['detach'](),void _0xa7135c['delete'](_0x1f7119['name']);const _0x2faea8=_0x1f7119['name']['split'](':')[0x2];if(_0x2faea8===_0x5832a6['mySessionId'])return;const _0x17a708='user:position:'+_0x2faea8;_0x5a7b57['markers']['has'](_0x17a708)&&_0x5f0481['editing']['reconvertMarker'](_0x17a708),_0x1f7119['on']('change:range',(_0x262be7,_0x2abd15,_0x127f43)=>{if('$graveyard'!=_0x2abd15['root']['rootName']&&'$graveyard'==_0x1f7119['getRange']()['root']['rootName']&&!_0xa7135c['has'](_0x1f7119['name'])){const _0x14bb36=_0x5a7b57['schema']['getNearestSelectionRange'](_0x127f43['deletionPosition']);if(_0x14bb36){const _0x86a924=ht['fromRange'](_0x14bb36);_0xa7135c['set'](_0x1f7119['name'],_0x86a924),_0x86a924['on']('change:range',(_0x4f08d8,_0x325552,_0x28a4cb)=>{if('$graveyard'==_0x86a924['root']['rootName']){const _0x5dc8f0=_0x5a7b57['schema']['getNearestSelectionRange'](_0x28a4cb['deletionPosition']);_0x5dc8f0?(_0x86a924['start']=_0x5dc8f0['start'],_0x86a924['end']=_0x5dc8f0['end']):(_0xa7135c['delete'](_0x1f7119['name']),_0x86a924['detach']());}});}}});}),_0x5a7b57['document']['on']('change',()=>{_0xa7135c['size']>0x0&&_0x5a7b57['enqueueChange']({'isUndoable':!0x1},_0x380344=>{for(const [_0x901e82,_0x51c14b]of _0xa7135c)'$graveyard'==_0x5a7b57['markers']['get'](_0x901e82)['getRange']()['root']['rootName']&&(re(_0x901e82['split'](':')[0x2],_0x51c14b['toRange'](),_0x5a7b57,_0x380344),_0x51c14b['detach']());_0xa7135c['clear']();});});}(_0x5438da),this['_domEmitter']['listenTo'](_0x378d67['document'],'keydown',(_0x3de894,{key:_0x5e7405})=>{'Escape'===_0x5e7405&&function(_0x1a0699){_0x1a0699['editing']['view']['change'](_0x421c67=>{for(const _0x4d6f1d of _0x1a0699['model']['markers']){if(!_0x4d6f1d['name']['startsWith']('user:position'))continue;const _0x44ccbf=_0x1a0699['editing']['mapper']['markerNameToElements'](_0x4d6f1d['name']);if(_0x44ccbf){for(const _0x69f8c7 of _0x44ccbf)_0x421c67['removeClass']('ck-user__marker_hovered',_0x69f8c7);}}});}(_0x5438da);},{'useCapture':!0x0});}['afterInit'](){const _0x5db181=this['editor'],_0x5b4ec9=_0x5db181['commands']['get']('undo');_0x5b4ec9&&_0x5db181['model']['on']('applyOperation',(_0x205a08,_0x36d07b)=>{const _0x2661e8=_0x36d07b[0x0];if('marker'!=_0x2661e8['type']||!_0x2661e8['name']['startsWith']('user:'))return;const _0x234369=_0x2661e8['batch'];_0x5b4ec9['_createdBatches']['has'](_0x234369)&&(_0x2661e8['newRange']=_0x2661e8['oldRange']?_0x5db181['model']['createRange'](_0x2661e8['oldRange']['start'],_0x2661e8['oldRange']['end']):null);},{'priority':'highest'});}['destroy'](){return this['_domEmitter']['stopListening'](),super['destroy']();}['createUserMarkerOperations'](){const _0x34b333=this['editor'],_0x388900=_0x34b333['model']['document'],_0xceb612=_0x34b333['plugins']['get'](i);_0x34b333['model']['enqueueChange']({'isUndoable':!0x1},_0x143e4d=>{const _0x2d9417='user:range:'+_0xceb612['mySessionId'],_0x4ce13c='user:position:'+_0xceb612['mySessionId'],_0x22607a=_0x34b333['model']['markers']['has'](_0x2d9417);_0x34b333['editing']['view']['hasDomSelection']?re(_0xceb612['mySessionId'],_0x388900['selection']['getFirstRange'](),_0x34b333['model'],_0x143e4d):_0x22607a&&(_0x143e4d['removeMarker'](_0x2d9417),_0x143e4d['removeMarker'](_0x4ce13c));});}}function re(_0x2ca2b6,_0x17cd5a,_0x5f6d20,_0x1d689b){const _0x2b0e7f='user:range:'+_0x2ca2b6,_0x144b06='user:position:'+_0x2ca2b6,_0x33f811=_0x17cd5a['getContainedElement']();let _0x2e728b=_0x17cd5a['start'];_0x33f811&&_0x33f811['is']('element','tableCell')&&(_0x2e728b=function(_0x944c9e,_0xb2dfaf){for(const _0x55b23d of _0x944c9e['getPositions']())if(_0xb2dfaf['schema']['checkChild'](_0x55b23d,'$text'))return _0x55b23d;}(_0x17cd5a,_0x5f6d20),_0x17cd5a=_0x1d689b['createRange'](_0x2e728b));const _0x5dbec6=_0x1d689b['createRange'](_0x2e728b);_0x5f6d20['markers']['has'](_0x2b0e7f)?(_0x1d689b['updateMarker'](_0x2b0e7f,{'range':_0x17cd5a}),_0x1d689b['updateMarker'](_0x144b06,{'range':_0x5dbec6})):(_0x1d689b['addMarker'](_0x2b0e7f,{'range':_0x17cd5a,'usingOperation':!0x0}),_0x1d689b['addMarker'](_0x144b06,{'range':_0x5dbec6,'usingOperation':!0x0}));}function q(_0x599932,_0x52f1b4,_0x38b476){const _0x22b5c=_0x599932['t'],t=_0x599932['t'];switch(_0x52f1b4){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 _0x22b5c({'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'},_0x38b476);default:return'';}}let K=0x1;class l extends _0x19a2cf{static ['CollaborativeEditingService']=/* #__PURE__ -- @preserve */
25
+ ((()=>_0x43a9a2)());['_offset'];['sessionId'];['serverHistory'];['_channelId'];['_service'];['_document'];['_compressor'];['_bufferedOperations'];['_knownOperations'];['_knownRootNames'];['_pendingAction'];['_hasSelectionChanged'];['_sendBufferedOperationsDelayId'];['_baseBufferDelay'];['_currentBufferDelay'];['_lastSyncedOperationId'];['_disconnectionOperations'];['_operationIdentifier'];static get['requires'](){return[c,i,H,_0x348cb2,_0x2bb1a6,_0x489625];}static get['pluginName'](){return'RealTimeCollaborationClient';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get['cloudDocumentVersion'](){return this['_lastServerVersion']+this['_offset'];}get['_lastServerVersion'](){return this['serverHistory']['version']-this['_offset'];}get['lastSyncVersion'](){const _0x354e6c=this['serverHistory']['getOperations']();for(let _0x30a269=_0x354e6c['length']-0x1;_0x30a269>=0x0;_0x30a269--){const _0x579ee0=_0x354e6c[_0x30a269];if(!this['_disconnectionOperations']['has'](_0x579ee0))return _0x579ee0['baseVersion']+0x1-this['_offset'];}return 0x0;}constructor(_0x21af2d){if(super(_0x21af2d),this['_offset']=0x0,this['sessionId']=null,this['serverHistory']=new _0x46144f(),this['editor']['config']['define']('collaboration',{}),this['_channelId']=this['editor']['config']['get']('collaboration.channelId'),!this['_channelId'])throw new _0x111ec8('collaboration-missing-channelid',this);const _0x3720d7=_0x21af2d['config']['get']('cloudServices.bundleVersion')||nt;this['_service']=new l['CollaborativeEditingService'](_0x3720d7,this['_channelId']),this['_document']=this['editor']['model']['document'],this['_compressor']=new _0xf624f5(),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 _0x82b979=this['editor'],_0x5994d1=_0x82b979['plugins']['get'](_0x2bb1a6),_0x17873a=_0x82b979['plugins']['get'](c);this['listenTo'](_0x5994d1,'getOperationAuthor',(_0xf07d2d,_0x2f1295)=>{const _0x3c5306=_0x2f1295[0x0];_0x3c5306['_authorId']&&(_0xf07d2d['return']=_0x5994d1['getUser'](_0x3c5306['_authorId']),_0xf07d2d['stop']()),null===_0x3c5306['_authorId']&&(_0xf07d2d['return']=null,_0xf07d2d['stop']());},{'priority':'high'}),this['listenTo'](_0x82b979['model']['document']['selection'],'change:range',(_0x57e32f,_0x403750)=>{_0x403750['directChange']&&this['_refreshUserSelectionMarkers']();}),this['listenTo'](_0x82b979['editing']['view'],'change:hasDomSelection',()=>{this['_refreshUserSelectionMarkers']();}),this['_initThrowingOnDataSet'](),_0x82b979['model']['on']('applyOperation',(_0x2fb736,_0x399e56)=>{const _0xbe57d6=_0x399e56[0x0];_0xbe57d6['isDocumentOperation']&&(this['_saveOperationInBuffer'](_0xbe57d6),this['_shouldSendUpdate']()&&this['_sendBufferedOperationsDelayed']());}),this['_setUpDataInit'](),this['bind']('_isEditingAllowed')['to'](_0x17873a,'state',this,'_hasSynchronizationProblem',(_0x36e618,_0x4cd3ee)=>'connected'===_0x36e618&&!_0x4cd3ee),this['on']('change:_isEditingAllowed',()=>{this['_isEditingAllowed']?_0x82b979['disableReadOnlyMode']('rtc-offline'):_0x82b979['enableReadOnlyMode']('rtc-offline');}),this['_isEditingAllowed']?_0x82b979['disableReadOnlyMode']('rtc-offline'):_0x82b979['enableReadOnlyMode']('rtc-offline'),this['set']('_isConnected',!0x1);}async['reconnect'](){const _0x53d817=this['editor']['plugins']['get'](i),_0x28fe03=this['editor']['plugins']['get'](c);try{this['_isPendingUpdate']=!0x0,_0x53d817['unregister'](this['_channelId']);const _0xb9c039=await this['_service']['reconnect'](_0x28fe03['connection'],this['lastSyncVersion']);await this['_handleReconnectionResponse'](_0xb9c039)&&(this['_isPendingUpdate']=!0x1,this['_clearPendingAction']());const _0x479178=await this['_service']['getConnectedSessions']();_0x53d817['register'](this['_channelId'],_0x479178),this['_handleSendingSelectionMarkers'](),this['_isConnected']=!0x0;}catch(_0x2cfa2f){if(function(_0x1494a4){return'404'===_0x1494a4['code'];}(_0x2cfa2f)&&this['sessionId'])await this['_connectAfterSessionHasBeenFlushed']();else{if(function(_0x50348b){return'409'===_0x50348b['code'];}(_0x2cfa2f)){const _0x4f5d16=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'](_0x4f5d16);}else{if(!(_0x2cfa2f instanceof J))throw _0x2cfa2f;this['_handleReconnectionError']();}}}}['destroy'](){const _0x4155d9=this['editor']['plugins']['get'](c),_0x5b21f0=this['editor']['plugins']['get'](i);this['editor']['enableReadOnlyMode']('rtc-destroyed'),_0x5b21f0['channelSessions']['has'](this['_channelId'])&&_0x5b21f0['unregister'](this['_channelId']),_0x4155d9['removeFromReconnectionStack'](this),this['_disconnectService'](),super['destroy']();}async['_handleReconnectionResponse'](_0x2ec2d0){if(this['sessionId']!==_0x2ec2d0['sessionId']&&this['_lastSyncedOperationId']!==_0x2ec2d0['lastOperationId'])throw new J();return this['sessionId']=_0x2ec2d0['sessionId'],this['_handleServerResponse']([],{..._0x2ec2d0,'wereChangesApplied':!0x1,'data':_0x2ec2d0['data']},'reconnect');}async['_connectService'](_0x196fc4,_0x2499c4=!0x1){const {connection:_0x1ae446}=this['editor']['plugins']['get'](c);l['CollaborativeEditingService']['getConnectedSessions'](_0x1ae446,this['_channelId'])['then'](_0x4435e2=>this['_initSessionsHandling'](_0x4435e2))['catch'](_0x2f9d3b=>{this['_crash']('realtimecollaborationclient-init-session-connection-error',_0x2f9d3b);}),this['listenTo'](this['_service'],'operationsReceived',this['_handleReceivedOperations']['bind'](this)),this['listenTo'](this['_service'],'error',(_0x21bec4,_0x20a772)=>{this['_crash']('realtimecollaborationclient-initservice-internal-error',_0x20a772);}),this['listenTo'](this['_service'],'disconnected',()=>{this['_isConnected']=!0x1;});const _0x2b2c77=this['_operationIdentifier']['getIdOfTheLastOperation'](_0x196fc4);this['_isPendingUpdate']=!0x0;const _0x56c6bc=await this['_service']['connect'](_0x1ae446,this['_compressOperations'](_0x196fc4),_0x2b2c77);if(this['sessionId']=_0x56c6bc['sessionId'],_0x2499c4){if(!_0x56c6bc['wereChangesApplied'])return void this['_handleReconnectionError']();this['_isPendingUpdate']=!0x1,this['_clearPendingAction'](),this['serverHistory']['reset'](),this['_offset']=_0x56c6bc['offset'],this['serverHistory']['version']=this['_offset'],await this['_handleServerResponse'](_0x196fc4,_0x56c6bc,'reconnection:\x20flushed\x20session');}else await this['_handleInitialConnectionData'](_0x56c6bc,_0x196fc4);this['_handleSendingSelectionMarkers'](),this['_isConnected']=!0x0;}['_handleSendingSelectionMarkers'](){const _0x2fdf5e=this['editor']['plugins']['get'](i),_0x2e6086=this['editor']['plugins']['get'](H),_0x5494d0=_0x2fdf5e['channelSessions']['get'](this['_channelId']);_0x5494d0&&_0x5494d0['length']>0x1?_0x2e6086['createUserMarkerOperations']():this['listenTo'](_0x2fdf5e,'sessionAdd:'+this['_channelId'],()=>{0x2===_0x2fdf5e['channelSessions']['get'](this['_channelId'])['length']&&_0x2e6086['createUserMarkerOperations']();});}async['_handleReceivedOperations'](_0xb0a486,_0x4c6a1f,_0x3e8897,_0x579f54){if(!this['_isPendingUpdate']&&this['_document']['version']==_0x4c6a1f){const _0x58b387=this['_decompressOperations'](_0x3e8897,_0x579f54);await this['_fetchMissingUsers'](_0x58b387),this['_handleExternalOperations'](_0x58b387,_0x4c6a1f,_0x3e8897['lastOperationId'])||this['_crash']('realtimecollaborationclient-initservice-incorrect-server-operation');}}async['_connectAfterSessionHasBeenFlushed'](){this['_disconnectService']();const {locale:_0x15a82e}=this['editor'];let _0x30ae65;try{_0x30ae65=await this['_service']['getDocumentDetails']();}catch(_0x1a2cbd){const _0x562e78=q(_0x15a82e,'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'](_0x562e78);}const _0x3808ce=_0x30ae65['currentDocumentSession']||_0x30ae65['lastDocumentSession'];if(this['_lastSyncedOperationId']===_0x3808ce['lastOperationId'])await this['_connectService'](this['editor']['model']['document']['history']['getOperations'](),!0x0);else{const _0x550c5c=q(_0x15a82e,'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'](_0x550c5c);}}['_disconnectService'](){this['_service']['disconnect'](),this['_bufferedOperations']=[],clearTimeout(this['_sendBufferedOperationsDelayId']),this['stopListening'](this['_service']);}['_initSessionsHandling'](_0x32400e){const _0x205d02=this['editor']['plugins']['get'](i);this['listenTo'](_0x205d02,'sessionAdd:'+this['_channelId'],(_0x19967b,{session:_0x295679})=>{if(_0x295679['id']===_0x205d02['mySessionId']){_0x19967b['off']();const _0x125c6d=this['editor']['plugins']['has']('CommentsOnly')&&this['editor']['plugins']['get']('CommentsOnly');let _0xa3a98d=_0x295679['permissions'];_0x125c6d&&_0x125c6d['isEnabled']&&(_0xa3a98d=_0xa3a98d['filter'](_0x30bcc3=>'document:write'!==_0x30bcc3)),this['editor']['plugins']['get']('Permissions')['setPermissions'](_0xa3a98d,this['_channelId']);}}),_0x205d02['register'](this['_channelId'],_0x32400e);}['_initThrowingOnDataSet'](){const _0x9fda76=this['editor']['data']['set'];this['editor']['data']['set']=(..._0x40ce80)=>{if(!_0x40ce80[_0x40ce80['length']-0x1]['suppressErrorInCollaboration'])throw new _0x111ec8('realtimecollaborationclient-editor-setdata-and-editor-data-set-are-forbidden-in-real-time-collaboration',this);_0x9fda76['apply'](this['editor']['data'],_0x40ce80);};}['_setUpDataInit'](){this['editor']['data']['on']('init',(_0x4c4585,[_0xb02197])=>{if(this['_document']['version'])throw new _0x111ec8('realtimecollaborationclient-init-document-already-initialized',this);_0x4c4585['stop'](),this['_setPendingAction']();const _0x488523=this['editor']['config']['get']('rootsAttributes'),_0x397df0=this['_getOperationsFromInitData'](_0xb02197,_0x488523);0x0==_0x397df0['length']&&_0x397df0['push'](new _0x3310ee(0x0)),_0x4c4585['return']=this['_connectService'](_0x397df0)['then'](()=>{this['editor']['plugins']['get'](c)['addToReconnectionStack'](this),this['editor']['data']['fire']('ready');})['catch'](_0x368659=>this['_crash']('realtimecollaborationclient-init-connection-failed',_0x368659))['finally'](()=>this['_clearPendingAction']());},{'priority':'high'}),this['editor']['on']('loadRoot',async(_0x3d50d6,[_0x440c52,_0x5db9f3])=>{_0x3d50d6['stop']();const _0x4fe653=this['editor']['model']['document']['getRoot'](_0x440c52);if(!this['_knownRootNames']['has'](_0x440c52)){const _0x1332c1=_0x5db9f3&&_0x5db9f3['data']?_0x5db9f3['data']:'',_0x45581a=_0x5db9f3&&_0x5db9f3['attributes']?_0x5db9f3['attributes']:{};await this['_loadRoot'](_0x440c52,_0x1332c1,_0x45581a);}this['editor']['model']['enqueueChange']({'isUndoable':!0x1},()=>{_0x4fe653['_isLoaded']=!0x0,this['editor']['model']['document']['differ']['_bufferRootLoad'](_0x4fe653);});},{'priority':'high'});}async['_fetchMissingUsers'](_0x579505){const _0xf4b1b3=this['editor']['plugins']['get'](_0x2bb1a6),{connection:_0x233ff6}=this['editor']['plugins']['get'](c),_0x4acc96=new Set();for(const _0x9862df of _0x579505){const _0x45adf4=_0x9862df['_authorId'];_0x45adf4&&!_0xf4b1b3['getUser'](_0x45adf4)&&_0x4acc96['add'](_0x45adf4);}if(0x0===_0x4acc96['size'])return;const _0x4c56fb=await dt['getMany'](_0x233ff6,Array['from'](_0x4acc96));for(const _0x28cf9b of _0x4c56fb)_0xf4b1b3['getUser'](_0x28cf9b['id'])||_0xf4b1b3['addUser'](_0x28cf9b);}['_getOperationsFromInitData'](_0x2422d9,_0x3d42cf={}){const _0x396fad=this['editor']['model'],_0x19c912=[];let _0xcc8ae8=0x0;const _0x59867b='string'==typeof _0x2422d9?{'main':_0x2422d9}:_0x2422d9;for(const _0x215743 of Object['keys'](_0x59867b)){if(!this['_document']['roots']['has'](_0x215743))throw new _0x111ec8('realtimecollaborationclient-init-non-existent-root',this);const _0x2536cd=this['editor']['data']['parse'](_0x59867b[_0x215743]),_0x2fb49e=this['_document']['getRoot'](_0x215743),_0x38aa24=new _0x433745(_0x396fad['createPositionAt'](_0x2fb49e,0x0),_0x2536cd,_0xcc8ae8++);_0x19c912['push'](_0x38aa24);for(const [_0x5318d5,_0x4dd1fe]of _0x2536cd['markers']){const _0xe37bf0=_0x396fad['createRange'](_0x396fad['createPositionFromPath'](_0x2fb49e,_0x4dd1fe['start']['path']['slice']()),_0x396fad['createPositionFromPath'](_0x2fb49e,_0x4dd1fe['end']['path']['slice']())),_0x565d2c=new _0x253e69(_0x5318d5,null,_0xe37bf0,_0x396fad['markers'],!0x0,_0xcc8ae8++);_0x19c912['push'](_0x565d2c);}}if(_0x3d42cf)for(const [_0x47cbb5,_0x3f3c4d]of Object['entries'](_0x3d42cf)){const _0x252287=_0x396fad['document']['getRoot'](_0x47cbb5);if(!_0x252287)throw new _0x111ec8('multi-root-editor-root-attributes-no-root',null);for(const [_0x302d6a,_0x4cdb8c]of Object['entries'](_0x3f3c4d))if(null!==_0x4cdb8c){const _0x1f1fb4=new _0x560b41(_0x252287,_0x302d6a,null,_0x4cdb8c,_0xcc8ae8++);_0x19c912['push'](_0x1f1fb4);}}return _0x19c912;}async['_loadRoot'](_0x1368bc,_0x3d6742,_0x3ae3e3){this['_getOperationsFromInitData']({[_0x1368bc]:_0x3d6742},{[_0x1368bc]:_0x3ae3e3})['forEach']((_0x24306c,_0x1adf55)=>{_0x24306c['baseVersion']=this['_document']['version']+_0x1adf55,_0x24306c['_isInit']=!0x0,this['_saveOperationInBuffer'](_0x24306c);}),this['_sendBufferedOperationsDelayed'](),await this['_waitUntilSynced']();}async['_handleInitialConnectionData'](_0x176589,_0xdb52d5){let _0x1bc985;this['_offset']=_0x176589['offset'];const _0x503c9f=_0x176589['wereChangesApplied']&&!_0x176589['initData'],_0x6ce25a=_0x503c9f?0x0:_0x176589['data']['baseVersion'];if(_0xdb52d5['forEach'](_0x4739dc=>{_0x4739dc['_isInit']=!0x0,_0x4739dc['createdAt']=_0x176589['sessionCreatedAt'],_0x4739dc['_authorId']=null;}),_0x503c9f)_0x1bc985=_0xdb52d5,this['_applyOperationsSet'](_0x1bc985,_0x503c9f);else{if(_0x176589['initData']){const _0x13f35d=this['_getOperationsFromInitData'](_0x176589['initData']);this['_document']['history']['version']=-_0x13f35d['length'],_0x13f35d['forEach'](_0x37cc29=>{_0x37cc29['baseVersion']-=_0x13f35d['length'],_0x37cc29['createdAt']=_0x176589['sessionCreatedAt'],_0x37cc29['_isInit']=!0x0,_0x37cc29['_authorId']=null;}),this['_applyOperationsSet'](_0x13f35d,!0x0),this['serverHistory']['version']=-_0x13f35d['length']+this['_offset'],this['_updateServerHistory'](_0x13f35d);}this['_document']['history']['version']=_0x6ce25a,_0x1bc985=this['_decompressOperations'](_0x176589['data'],_0x176589['metadata']),await this['_fetchMissingUsers'](_0x1bc985),this['_applyOperationsSet'](_0x1bc985,_0x503c9f);}_0x176589['lastOperationId']&&(this['_operationIdentifier']['setIdForTheLastOperation'](_0x1bc985,_0x176589['lastOperationId']),this['_lastSyncedOperationId']=_0x176589['lastOperationId']),this['serverHistory']['version']=_0x6ce25a+this['_offset'],this['_updateServerHistory'](_0x1bc985),_0xdb52d5['filter'](_0x2c9062=>{const _0x37e7f0=this['_getAffectedRoot'](_0x2c9062);return _0x37e7f0&&!this['_knownRootNames']['has'](_0x37e7f0);})['forEach']((_0x5a0853,_0x43c778)=>{_0x5a0853['baseVersion']=this['_document']['version']+_0x43c778,this['_saveOperationInBuffer'](_0x5a0853);}),this['_shouldSendUpdate']()?(this['_currentBufferDelay']=0x0,this['_sendBufferedOperationsDelayed'](!0x0),await this['_waitUntilSynced']()):(this['_isPendingUpdate']=!0x1,this['_clearPendingAction']());}['_crash'](_0x44d286,_0x3d1657){throw this['_isPendingUpdate']=!0x0,_0x3d1657&&console['error'](_0x3d1657),new _0x111ec8(_0x44d286,this['editor']);}['_saveOperationInBuffer'](_0x460cb7){this['_knownOperations']['has'](_0x460cb7)||(this['_knownOperations']['add'](_0x460cb7),this['_bufferedOperations']['push'](_0x460cb7),this['_pendingAction']||'marker'==_0x460cb7['type']&&!_0x460cb7['affectsData']||this['_setPendingAction']());}['_sendBufferedOperationsDelayed'](_0x32dbc5=!0x1){!_0x32dbc5&&this['_isPendingUpdate']||(this['_isPendingUpdate']=!0x0,clearTimeout(this['_sendBufferedOperationsDelayId']),this['_sendBufferedOperationsDelayId']=setTimeout(()=>{this['_sendBufferedOperations']()['then'](_0x367423=>{_0x367423&&(this['_clearPendingAction'](),this['_isPendingUpdate']=!0x1);})['catch'](_0x509465=>{if(this['_clearPendingAction'](),this['_isPendingUpdate']=!0x1,!function(_0x902bc5){return _0x902bc5['message']['startsWith']('cloud-services-internal-error:\x20Not\x20connected.')||_0x902bc5['message']['startsWith']('cloud-services-internal-error:\x20Collaborative\x20Editing\x20Service\x20is\x20not\x20connected.')||_0x902bc5['message']['startsWith']('cloud-services-internal-error:\x20Request\x20timeout.');}(_0x509465))throw _0x509465;});},this['_currentBufferDelay']));}['_waitUntilSynced'](){return new Promise(_0x3b3f22=>{this['on']('change:_isPendingUpdate',()=>{_0x3b3f22();});});}async['_sendBufferedOperations'](){const _0x46d498=this['editor']['plugins']['get'](H);if(this['_shouldSendSelectionUpdate']()&&(_0x46d498['createUserMarkerOperations'](),this['_hasSelectionChanged']=!0x1),!this['_shouldSendUpdate']())return!0x0;const _0xfc67a=[...this['_bufferedOperations']];for(const _0x30e5cc of _0xfc67a)_0x30e5cc['wasUndone']=this['_document']['history']['isUndoneOperation'](_0x30e5cc);const _0x343e20=this['_operationIdentifier']['getIdOfTheLastOperation'](_0xfc67a),_0x44eb38=K++,_0x4a5f24=this['_compressOperations'](_0xfc67a),_0x12ad02=await this['_service']['sendOperations'](_0x4a5f24,_0x4a5f24['baseVersion'],_0x343e20);try{return await this['_handleServerResponse'](_0xfc67a,_0x12ad02,_0x44eb38);}catch(_0x32ee86){return this['_crash']('realtimecollaborationclient-sendbufferedoperations',_0x32ee86);}}async['_handleServerResponse'](_0x38979f,_0x146d3b,_0x1bec24){if('error'in _0x146d3b)throw _0x146d3b['error'];let _0x456f6c=!0x1;if(_0x146d3b['wereChangesApplied']){_0x146d3b['lastOperationId']&&(this['_lastSyncedOperationId']=_0x146d3b['lastOperationId']),this['_bufferedOperations']=this['_bufferedOperations']['filter'](_0x4d00f9=>!_0x38979f['includes'](_0x4d00f9));for(const _0x259c2a of _0x38979f)_0x259c2a['createdAt']='lastOperationAcceptedAt'in _0x146d3b&&_0x146d3b['lastOperationAcceptedAt']||void 0x0;Q(_0x38979f,_0x146d3b['version']-_0x38979f['length']),this['_updateServerHistory'](_0x38979f);const _0x1047dd=_0x38979f['filter'](_0x36bc1c=>{if(!_0x36bc1c['_isInit'])return!0x1;const _0x53510e=this['_getAffectedRoot'](_0x36bc1c);return _0x53510e&&!this['_knownRootNames']['has'](_0x53510e);});Q(_0x1047dd,this['_document']['version']),this['_applyOperationsSet'](_0x1047dd),_0x456f6c=!0x0,this['_currentBufferDelay']=this['_baseBufferDelay'];}else{const _0x1e5291=this['_decompressOperations'](_0x146d3b['data'],_0x146d3b['metadata'])['filter'](_0x5c7d65=>_0x5c7d65['baseVersion']>=this['_lastServerVersion']);_0x1e5291['forEach'](_0x1fb42f=>this['_addKnownRoot'](_0x1fb42f)),this['_bufferedOperations']=this['_bufferedOperations']['filter'](_0x4ca186=>!_0x4ca186['_isInit']||!this['_knownRootNames']['has'](this['_getAffectedRoot'](_0x4ca186))),this['_bufferedOperations']['length']&&Q(this['_bufferedOperations'],this['_bufferedOperations'][0x0]['baseVersion']),await this['_fetchMissingUsers'](_0x1e5291),_0x456f6c=this['_handleExternalOperations'](_0x1e5291,_0x146d3b['version'],_0x146d3b['lastOperationId']),this['_currentBufferDelay']=Math['round'](this['_currentBufferDelay']/0x2);}return _0x456f6c?!this['_shouldSendUpdate']()||(this['_sendBufferedOperationsDelayed'](!0x0),!0x1):this['_crash']('realtimecollaborationclient-handleserverresponse');}['_handleExternalOperations'](_0x1b4e04,_0x2d01b2,_0x393b8c){try{const _0x59cc6c={'document':this['_document'],'useRelations':!0x1,'padWithNoOps':!0x0},{operationsA:_0x1c75a4,operationsB:_0x2fba61,originalOperations:_0x9c0f7f}=_0x5453a3(_0x1b4e04,this['_bufferedOperations'],_0x59cc6c);Q(_0x1c75a4,this['_document']['version']),Q(_0x2fba61,_0x2d01b2);for(const _0x2e53be of _0x1c75a4){const _0x1bf898=_0x9c0f7f['get'](_0x2e53be);_0x2e53be['_authorId']=_0x1bf898?_0x1bf898['_authorId']:null;}_0x393b8c&&(this['_operationIdentifier']['setIdForTheLastOperation'](_0x1b4e04,_0x393b8c),this['_lastSyncedOperationId']=_0x393b8c),this['_bufferedOperations']=[..._0x2fba61],this['_applyOperationsSet'](_0x1c75a4),this['_updateServerHistory'](_0x1b4e04);}catch(_0x22208a){return console['error'](_0x22208a),!0x1;}return!0x0;}['_applyOperationsSet'](_0x4e83d9,_0x607a08=!0x1){this['editor']['model']['enqueueChange']({'isUndoable':!0x1,'isLocal':!0x1},_0x5b31ec=>{for(const _0x53e243 of _0x4e83d9)this['_knownOperations']['add'](_0x53e243),this['_addKnownRoot'](_0x53e243),_0x5b31ec['batch']['addOperation'](_0x53e243),this['editor']['model']['applyOperation'](_0x53e243);});}['_addKnownRoot'](_0x36e953){const _0x31290e=this['_getAffectedRoot'](_0x36e953);_0x31290e&&this['_knownRootNames']['add'](_0x31290e);}['_getAffectedRoot'](_0x1fb206){let _0x8327c2,_0x123f1f;switch(_0x1fb206['type']){case'insert':_0x8327c2=_0x1fb206['position']['root'];break;case'marker':if(_0x123f1f=_0x1fb206['newRange'],!_0x123f1f)return null;_0x8327c2=_0x123f1f['root'];break;case'addRootAttribute':_0x8327c2=_0x1fb206['root'];break;case'addRoot':_0x8327c2=_0x1fb206['affectedSelectable'];break;case'move':_0x8327c2=_0x1fb206['targetPosition']['root'];break;default:return null;}return _0x8327c2['rootName'];}['_updateServerHistory'](_0x5d402f){_0x5d402f['forEach'](_0x289d8c=>{const _0x3bca47=_0x289d8c['clone']();_0x3bca47['_authorId']=_0x289d8c['_authorId'],_0x3bca47['_isInit']=!!_0x289d8c['_isInit'],_0x3bca47['createdAt']=_0x289d8c['createdAt'],_0x3bca47['baseVersion']+=this['_offset'],_0x289d8c['_isDisconnection']&&this['_disconnectionOperations']['add'](_0x3bca47),this['serverHistory']['addOperation'](_0x3bca47);});}['_handleReconnectionError'](_0x333f3b){const _0x376bf3=this['editor']['plugins']['get']('Notification'),_0x5949eb=this['editor']['locale'];_0x333f3b||(_0x333f3b=q(_0x5949eb,'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.')),_0x376bf3['showWarning'](_0x333f3b,{'title':q(_0x5949eb,'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'](_0x348cb2)['add'](q(this['editor']['locale'],'PENDING_ACTION_SENDING_DATA')));}['_clearPendingAction'](){this['_pendingAction']&&(this['editor']['plugins']['get'](_0x348cb2)['remove'](this['_pendingAction']),this['_pendingAction']=null);}['_compressOperations'](_0x398d61){const _0x2f9da5=_0x398d61['map'](_0x19780a=>_0x19780a['toJSON']());return this['_compressor']['compress'](_0x2f9da5);}['_decompressOperations'](_0x21d191,_0xfade3b){return this['_compressor']['decompress'](_0x21d191)['map']((_0x553b53,_0x397cbe)=>{const _0x26d8df='init'==_0xfade3b[_0x397cbe]['type'];if('InsertOperation'==_0x553b53['__className']){const _0x1acb10=_0x553b53['position']['root'];!this['_document']['getRoot'](_0x1acb10)&&(this['_document']['createRoot']('$root',_0x1acb10)['_isAttached']=!0x1);}const _0x2b1a9c=_0x4b5901['fromJSON'](_0x553b53,this['_document']);return _0x2b1a9c['wasUndone']=_0x553b53['wasUndone'],_0x2b1a9c['_isInit']=_0x26d8df,_0x2b1a9c['_authorId']=_0x26d8df?null:_0xfade3b[_0x397cbe]['userId'],_0x2b1a9c['_isDisconnection']='cs:removeUser'===_0xfade3b[_0x397cbe]['type'],_0x2b1a9c['createdAt']=_0xfade3b[_0x397cbe]['createdAt'],_0x2b1a9c;});}['_refreshUserSelectionMarkers'](){this['_hasSelectionChanged']=!0x0,this['_shouldSendSelectionUpdate']()?this['_sendBufferedOperationsDelayed']():this['_hasSelectionChanged']=!0x1;}['_shouldSendSelectionUpdate'](){const _0x1473be=this['editor']['plugins']['get'](i)['channelSessions']['get'](this['_channelId']);return!this['editor']['isReadOnly']&&!!_0x1473be&&_0x1473be['length']>0x1&&this['_hasSelectionChanged'];}['_shouldSendUpdate'](){return this['_bufferedOperations']['length']>0x0||this['_shouldSendSelectionUpdate']();}}class J extends Error{}function Q(_0xe946c1,_0x165b05){for(const _0x35cd1a of _0xe946c1)_0x35cd1a['baseVersion']=_0x165b05++;}class X{['_ignoredOperations'];['_operationToId'];constructor(_0x19d156){this['_ignoredOperations']=_0x19d156,this['_operationToId']=new WeakMap();}['getIdOfTheLastOperation'](_0x718f5a){let _0x3f5faf=_0x718f5a['length'];for(;_0x3f5faf--;){const _0x56c28e=_0x718f5a[_0x3f5faf];if(!this['_ignoredOperations']['has'](_0x56c28e)){if(!this['_operationToId']['has'](_0x56c28e)){const _0x24d970=_0x2d4457()['slice'](0x1,0x12);this['_operationToId']['set'](_0x56c28e,_0x24d970);}return this['_operationToId']['get'](_0x56c28e);}}}['setIdForTheLastOperation'](_0x595254,_0x10491a){if(!_0x10491a)return;let _0x87d350=_0x595254['length'];for(;_0x87d350--;){const _0x1d4e2e=_0x595254[_0x87d350];this['_ignoredOperations']['has'](_0x1d4e2e)||this['_operationToId']['set'](_0x1d4e2e,_0x10491a);}}}class n extends _0x19a2cf{static get['requires'](){return[l];}static get['pluginName'](){return'RealTimeCollaborativeEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}class a extends _0x1f4b11{static ['CommentsService']=/* #__PURE__ -- @preserve */
26
+ ((()=>_0xfbf3c9)());['_services'];static get['requires'](){return[c,'CommentsRepository',i,_0x2bb1a6];}static get['pluginName'](){return'CloudServicesCommentsAdapter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4bb295){super(_0x4bb295),this['_services']=new Map();}async['init'](){const _0x1b6c4e=this['context'],_0x30bfaa=_0x1b6c4e['plugins']['get']('CommentsRepository');if(_0x1b6c4e['plugins']['get'](c)['addToReconnectionStack'](this),_0x30bfaa['adapter']={'addCommentThread':async({channelId:_0x5f3e4a,threadId:_0x387123,comments:_0x2061cc,resolvedAt:_0x94397e,resolvedBy:_0x374c70,context:_0x1fb46c,attributes:_0x1c8bbe})=>{const _0x122a3e=await this['_getService'](_0x5f3e4a)['addCommentThread']({'commentThreadId':_0x387123,'comments':_0x2061cc['map'](_0x3c3bf2=>function(_0x2eb376,_0x5940c5,_0xe42bad){return{'commentThreadId':_0xe42bad,'commentId':_0x2eb376['commentId'],'userId':_0x2eb376['authorId'],'content':_0x2eb376['content'],'documentId':_0x5940c5,'createdAt':_0x2eb376['createdAt'],'attributes':_0x2eb376['attributes']||{}};}(_0x3c3bf2,_0x5f3e4a,_0x387123)),'resolvedAt':_0x94397e,'resolvedBy':_0x374c70,'context':_0x1fb46c,'attributes':_0x1c8bbe})['catch'](ut);return{'threadId':_0x122a3e['commentThreadId'],'comments':_0x122a3e['comments']};},'getCommentThread':async({channelId:_0x27aeb8,threadId:_0x3fcacb})=>{const _0x171bcd=await this['_getService'](_0x27aeb8)['getCommentThread'](_0x3fcacb)['catch'](ut);return _0x171bcd['deletedAt']?null:(await this['_fetchMissingUsersForThreads']([_0x171bcd]),{'threadId':_0x171bcd['commentThreadId'],'comments':_0x171bcd['comments']['map'](S),'context':_0x171bcd['context'],'resolvedAt':_0x171bcd['resolvedAt'],'resolvedBy':_0x171bcd['resolvedBy'],'attributes':_0x171bcd['attributes']||{}});},'updateCommentThread':async({channelId:_0x27bd5e,threadId:_0x45bb92,context:_0x5a16d0,unlinkedAt:_0x357ac6,attributes:_0x8b33a3})=>this['_getService'](_0x27bd5e)['updateCommentThread']({'commentThreadId':_0x45bb92,'context':_0x5a16d0,'attributes':_0x8b33a3,'unlinkedAt':_0x357ac6})['catch'](B)['catch'](ut),'resolveCommentThread':async({channelId:_0x2dec64,threadId:_0x3bbb75})=>{const _0x22eea0=await this['_getService'](_0x2dec64)['resolveCommentThread'](_0x3bbb75)['catch'](B)['catch'](ut);return{'threadId':_0x22eea0['commentThreadId'],'resolvedAt':_0x22eea0['resolvedAt'],'resolvedBy':_0x22eea0['resolvedBy']};},'reopenCommentThread':async({channelId:_0x3835c4,threadId:_0x59b560})=>this['_getService'](_0x3835c4)['reopenCommentThread'](_0x59b560)['catch'](B)['catch'](ut),'removeCommentThread':({channelId:_0x4d2fff,threadId:_0x4e215e})=>this['_getService'](_0x4d2fff)['removeCommentThread'](_0x4e215e)['catch'](B)['catch'](ut),'addComment':({channelId:_0x3d8620,threadId:_0x56ce2a,commentId:_0x5bb57d,content:_0x395394,attributes:_0x1cfb2f})=>this['_getService'](_0x3d8620)['addComment'](_0x56ce2a,_0x5bb57d,_0x395394,_0x1cfb2f)['catch'](ut),'updateComment':({channelId:_0x434698,threadId:_0x227e92,commentId:_0x60f76f,content:_0x262572,attributes:_0x5ef2cc})=>this['_getService'](_0x434698)['updateComment'](_0x227e92,_0x60f76f,_0x262572,_0x5ef2cc)['catch'](B)['catch'](ut),'removeComment':({channelId:_0x4c4d06,threadId:_0x3f63b9,commentId:_0x56262a})=>this['_getService'](_0x4c4d06)['removeComment'](_0x3f63b9,_0x56262a)['catch'](B)['catch'](ut)},_0x1b6c4e instanceof _0x40f0f4){const _0x59fc59=_0x1b6c4e['config']['get']('collaboration.channelId'),_0x660f7f=_0x1b6c4e['plugins']['get'](i);await this['_setUpService'](_0x59fc59);const _0xf57b91=await this['_services']['get'](_0x59fc59)['getConnectedSessions']();this['listenTo'](_0x660f7f,'sessionAdd:'+_0x59fc59,(_0x1fc0f1,{session:_0x4d0af9})=>{_0x4d0af9['id']===_0x660f7f['mySessionId']&&(_0x1fc0f1['off'](),this['context']['plugins']['get']('Permissions')['setPermissions'](_0x4d0af9['permissions'],_0x59fc59));}),_0x660f7f['register'](_0x59fc59,_0xf57b91);}}async['_setUpService'](_0x3ec3c6){if(this['_services']['has'](_0x3ec3c6))throw new _0x111ec8('cloudservicescommentsadapter-connect-already-connected',null,{'channelId':_0x3ec3c6});const _0x542945=this['context']['plugins']['get']('CommentsRepository'),_0x1b8f44=new a['CommentsService'](_0x3ec3c6);this['_services']['set'](_0x3ec3c6,_0x1b8f44),this['listenTo'](_0x1b8f44,'commentThreadAdded',(_0x16e453,_0x1c9b8b)=>{const {commentThreadId:_0x45494d,documentId:_0x3e8761,context:_0x36a285,attributes:_0x98e5f8,resolvedAt:_0x297acc,resolvedBy:_0x59fe67,comments:_0x39fbda}=_0x1c9b8b;_0x542945['getCommentThread'](_0x45494d)||_0x542945['addCommentThread']({'threadId':_0x45494d,'channelId':_0x3e8761,'comments':_0x39fbda?_0x39fbda['map'](S):[],'context':_0x36a285,'attributes':_0x98e5f8,'resolvedAt':_0x297acc,'resolvedBy':_0x59fe67,'isFromAdapter':!0x0});}),this['listenTo'](_0x1b8f44,'commentThreadUpdated',(_0x299e49,{commentThreadId:_0x53565f,documentId:_0x5c0c38,context:_0x2ac6aa,unlinkedAt:_0x3dfd4b,attributes:_0x2343b3})=>{_0x542945['getCommentThread'](_0x53565f)&&_0x542945['updateCommentThread']({'threadId':_0x53565f,'channelId':_0x5c0c38,'context':_0x2ac6aa,'unlinkedAt':_0x3dfd4b,'attributes':_0x2343b3,'isFromAdapter':!0x0});}),this['listenTo'](_0x1b8f44,'commentThreadResolved',(_0x148b21,{commentThreadId:_0x599451,resolvedBy:_0x53c058,resolvedAt:_0x10bcf8})=>{const _0x103247=_0x542945['getCommentThread'](_0x599451);_0x103247&&_0x103247['resolve']({'resolvedBy':_0x53c058,'resolvedAt':_0x10bcf8,'isFromAdapter':!0x0});}),this['listenTo'](_0x1b8f44,'commentThreadReopened',(_0x293083,{commentThreadId:_0xdcf9c0})=>{const _0x4a8c01=_0x542945['getCommentThread'](_0xdcf9c0);_0x4a8c01&&_0x4a8c01['reopen']({'isFromAdapter':!0x0});}),this['listenTo'](_0x1b8f44,'commentThreadRemoved',(_0x38d3d0,{commentThreadId:_0x5e64a6})=>{const _0x5d548f=_0x542945['getCommentThread'](_0x5e64a6);_0x5d548f&&_0x5d548f['remove']({'isFromAdapter':!0x0});}),this['listenTo'](_0x1b8f44,'commentAdded',(_0xf68e9c,_0x1b9050)=>{const _0x13315a=_0x1b9050['commentThreadId'],_0x262f96=_0x542945['getCommentThread'](_0x13315a);_0x262f96&&_0x262f96['addComment']({...S(_0x1b9050),'isFromAdapter':!0x0});}),this['listenTo'](_0x1b8f44,'commentUpdated',(_0x4dc6c1,{commentThreadId:_0xbe621e,commentId:_0x13ca4d,content:_0x2e2c8b,attributes:_0x495654})=>{const _0x4820dd=_0x542945['getCommentThread'](_0xbe621e);if(_0x4820dd){const _0x243de6=_0x4820dd['getComment'](_0x13ca4d);_0x243de6&&_0x243de6['update']({'content':_0x2e2c8b,'attributes':_0x495654,'isFromAdapter':!0x0});}}),this['listenTo'](_0x1b8f44,'commentRemoved',(_0x453bb6,{commentThreadId:_0x4a2aa2,commentId:_0x1f72f5})=>{const _0x3fd653=_0x542945['getCommentThread'](_0x4a2aa2);if(_0x3fd653){const _0x1d594c=_0x3fd653['getComment'](_0x1f72f5);_0x1d594c&&_0x1d594c['remove']({'isFromAdapter':!0x0});}}),await this['_connectService'](_0x3ec3c6);}['destroy'](){if(this['context']instanceof _0x40f0f4){const _0x3d980f=this['context']['config']['get']('collaboration.channelId');this['_terminateService'](_0x3d980f);}}['_terminateService'](_0x202949){if(!this['_services']['has'](_0x202949))throw new _0x111ec8('cloudservicescommentsadapter-disconnect-not-exist',null,{'channelId':_0x202949});this['_getService'](_0x202949)['disconnect'](),this['_services']['delete'](_0x202949);}async['reconnect'](){for(const _0x22a1b3 of this['_services']['keys']())await this['_connectService'](_0x22a1b3);if(this['context']instanceof _0x40f0f4){const _0x1e4a0d=this['context']['config']['get']('collaboration.channelId'),_0x1fd826=this['context']['plugins']['get'](i);_0x1fd826['unregister'](_0x1e4a0d);const _0x56edb6=await this['_services']['get'](_0x1e4a0d)['getConnectedSessions']();_0x1fd826['register'](_0x1e4a0d,_0x56edb6);}}async['_connectService'](_0x1bbaea){const {connection:_0x284fbd}=this['context']['plugins']['get'](c),_0x4960e2=this['context']['plugins']['get']('CommentsRepository'),_0x1a94fd=this['_services']['get'](_0x1bbaea),_0x3db64a=await _0x1a94fd['connect'](_0x284fbd);await this['_fetchMissingUsersForThreads'](_0x3db64a);const _0x62658=new Set(Array['from'](_0x4960e2['getCommentThreads']({'channelId':_0x1bbaea}),_0x56e8b0=>_0x56e8b0['id']));for(const _0x453bdb of _0x3db64a)_0x453bdb['deletedAt']||_0x62658['delete'](_0x453bdb['commentThreadId']);for(const _0x56d8c0 of _0x62658)_0x4960e2['getCommentThread'](_0x56d8c0)['remove']({'isFromAdapter':!0x0});for(const _0x4f7e8e of _0x3db64a){let _0x15a298=_0x4960e2['getCommentThread'](_0x4f7e8e['commentThreadId']);const {commentThreadId:_0x2e258a,context:_0x4ae73f,attributes:_0x902446,resolvedBy:_0x209511,resolvedAt:_0x1d6283,unlinkedAt:_0x4c5f55,deletedAt:_0x255dec}=_0x4f7e8e;if(_0x255dec)continue;_0x15a298||(_0x15a298=_0x4960e2['addCommentThread']({'channelId':_0x1bbaea,'threadId':_0x2e258a,'context':_0x4ae73f,'attributes':_0x902446||{},'resolvedBy':_0x209511,'resolvedAt':_0x1d6283,'unlinkedAt':_0x4c5f55,'isFromAdapter':!0x0}));const _0x247ac3=new Set(Array['from'](_0x15a298['comments'],_0x3f7e44=>_0x3f7e44['id']));for(const _0x427939 of _0x4f7e8e['comments'])_0x247ac3['delete'](_0x427939['commentId']);for(const _0x7f177d of _0x247ac3)_0x15a298['getComment'](_0x7f177d)['remove']({'isFromAdapter':!0x0});for(const _0x15871f of _0x4f7e8e['comments']){const _0x589bed=_0x15a298['getComment'](_0x15871f['commentId']);_0x589bed?_0x589bed['content']!==_0x15871f['content']&&_0x589bed['update']({'content':_0x15871f['content'],'isFromAdapter':!0x0}):_0x15a298['addComment'](Object['assign'](S(_0x15871f),{'isFromAdapter':!0x0}));}}}['_getService'](_0x109cc8){if(!this['_services']['has'](_0x109cc8))throw new _0x111ec8('cloudservicescommentsadapter-service-not-exist',null,{'channelId':_0x109cc8});return this['_services']['get'](_0x109cc8);}async['_fetchMissingUsersForThreads'](_0x337b94){const _0x30aa72=this['context']['plugins']['get'](_0x2bb1a6),{connection:_0x174d21}=this['context']['plugins']['get'](c),_0x27d5aa=new Set();for(const {resolvedBy:_0x39be96,comments:_0x3f7256}of _0x337b94){_0x39be96&&!_0x30aa72['getUser'](_0x39be96)&&_0x27d5aa['add'](_0x39be96);for(const {userId:_0x4a673b}of _0x3f7256)_0x30aa72['getUser'](_0x4a673b)||_0x27d5aa['add'](_0x4a673b);}if(0x0===_0x27d5aa['size'])return;const _0x4ed0f3=await dt['getMany'](_0x174d21,Array['from'](_0x27d5aa));for(const _0x4c81a9 of _0x4ed0f3)_0x30aa72['getUser'](_0x4c81a9['id'])||_0x30aa72['addUser'](_0x4c81a9);}}async function B(_0x46ee0f){if('404'!==_0x46ee0f['code'])throw _0x46ee0f;}function ut(_0x1ac589){if((_0x449e66=_0x1ac589)['message']['startsWith']('cloud-services-internal-error:\x20Comments\x20Service\x20is\x20not\x20connected.')||_0x449e66['message']['startsWith']('cloud-services-internal-error:\x20Not\x20connected.')||_0x449e66['message']['startsWith']('cloud-services-internal-error:\x20Request\x20timeout.'))return new Promise(()=>{});var _0x449e66;throw _0x1ac589;}function S(_0x11b193){return{'threadId':_0x11b193['commentThreadId'],'commentId':_0x11b193['commentId'],'content':_0x11b193['content'],'createdAt':_0x11b193['createdAt'],'authorId':_0x11b193['userId'],'attributes':_0x11b193['attributes']||{}};}class f extends _0x19a2cf{static ['TrackChangesService']=/* #__PURE__ -- @preserve */
27
+ ((()=>tt)());['_bufferedRequests'];['_trackChangesService'];static get['requires'](){return[a,'TrackChangesEditing',c];}constructor(_0x261d65){super(_0x261d65);const _0x1ab000=this['editor']['config']['get']('collaboration.channelId');this['_bufferedRequests']=new Map(),this['_trackChangesService']=new f['TrackChangesService'](_0x1ab000);}['init'](){const _0x5019fd=this['editor']['plugins']['get'](c),_0x3aabd4=this['editor']['plugins']['get']('TrackChangesEditing');return _0x3aabd4['adapter']={'getSuggestion':async _0x4fcb64=>{await this['_waitForServiceReady']();const _0x157240=await this['_trackChangesService']['get'](_0x4fcb64)['catch'](R);return await this['_fetchMissingUsersForThreads']([_0x157240]),_0x157240;},'addSuggestion':async({id:_0x2d5d30,type:_0x16c7da,data:_0x47e464,originalSuggestionId:_0x28492f,attributes:_0x39b796})=>{await this['_waitForServiceReady']();const _0x2b2d4f={'id':_0x2d5d30,'type':_0x16c7da,'data':_0x47e464,'originalSuggestionId':_0x28492f,'attributes':_0x39b796},_0x3fc4db=await this['_trackChangesService']['add'](_0x2d5d30,_0x16c7da,_0x47e464,_0x28492f,_0x39b796)['catch'](_0x42e1b4=>{if(ft(_0x42e1b4))return new Promise(_0x285377=>{this['_bufferedRequests']['set'](_0x2d5d30,{'resolve':_0x285377,'suggestionData':_0x2b2d4f});});throw _0x42e1b4;});return this['_bufferedRequests']['delete'](_0x2d5d30),_0x3fc4db;},'updateSuggestion':async(_0x17dac1,_0x2e1f72)=>{if(await this['_waitForServiceReady'](),'open'!==_0x2e1f72['state'])return this['_trackChangesService']['update'](_0x17dac1,_0x2e1f72)['catch'](R);}},this['listenTo'](this['_trackChangesService'],'suggestionUpdated',(_0x39d67b,_0x3581d4)=>{_0x3aabd4['hasSuggestion'](_0x3581d4['id'])&&(_0x3aabd4['getSuggestion'](_0x3581d4['id'])['attributes']=_0x3581d4['attributes']);}),this['_trackChangesService']['connect'](_0x5019fd['connection'])['then'](_0x2a593c=>(_0x5019fd['addToReconnectionStack'](this),this['_fetchMissingUsersForThreads'](_0x2a593c)['then'](()=>{for(const _0x445969 of _0x2a593c){_0x3aabd4['addSuggestionData'](_0x445969)['_saved']=!0x0;}})));}async['reconnect'](){const _0x3055a7=this['editor']['plugins']['get']('TrackChangesEditing'),{connection:_0x378174}=this['editor']['plugins']['get'](c),_0x48c826=await this['_trackChangesService']['connect'](_0x378174);await this['_fetchMissingUsersForThreads'](_0x48c826);for(const {suggestionData:_0x56693a,resolve:_0x1f9fc0}of this['_bufferedRequests']['values']()){let _0x256f95=_0x48c826['find'](_0x6e08da=>_0x6e08da['id']===_0x56693a['id']);_0x256f95||(_0x256f95=await this['_trackChangesService']['add'](_0x56693a['id'],_0x56693a['type'],_0x56693a['data'],_0x56693a['originalSuggestionId'])),_0x1f9fc0(_0x256f95);}for(const _0xfa5957 of _0x48c826)_0x3055a7['hasSuggestion'](_0xfa5957['id'])||_0x3055a7['addSuggestionData'](_0xfa5957);}async['_waitForServiceReady'](){this['_trackChangesService']['isConnected']||await new Promise(_0x2af28b=>{this['listenTo'](this['_trackChangesService'],'connected',_0x970b96=>{_0x970b96['off'](),_0x2af28b();});});}async['_fetchMissingUsersForThreads'](_0x52a690){const _0x5c2a80=this['editor']['plugins']['get'](_0x2bb1a6),{connection:_0x466ce0}=this['editor']['plugins']['get'](c),_0x512417=new Set();for(const {authorId:_0x4c427b}of _0x52a690)_0x5c2a80['getUser'](_0x4c427b)||_0x512417['add'](_0x4c427b);if(0x0===_0x512417['size'])return;const _0x3dbdce=await dt['getMany'](_0x466ce0,Array['from'](_0x512417));for(const _0x2b77fd of _0x3dbdce)_0x5c2a80['getUser'](_0x2b77fd['id'])||_0x5c2a80['addUser'](_0x2b77fd);}}function R(_0x594a52){if(ft(_0x594a52))return new Promise(()=>{});throw _0x594a52;}function ft(_0x52f729){return _0x52f729['message']['startsWith']('cloud-services-internal-error:\x20Not\x20connected.')||_0x52f729['message']['startsWith']('cloud-services-internal-error:\x20Request\x20timeout.');}class m extends _0x19a2cf{static get['requires'](){return['Comments',a,n,c];}static get['pluginName'](){return'RealTimeCollaborativeComments';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const _0x123e0e=this['editor']['plugins']['get'](c),_0x55309e=this['editor']['plugins']['get']('CommentsEditing'),_0x40a130=this['editor']['plugins']['get'](a);return this['editor']['data']['once']('ready',()=>{this['listenTo'](_0x123e0e,'change:state',(_0x7f5468,_0x38ae91,_0x495361)=>{_0x55309e['isThreadsLoadingPaused']='connected'!==_0x495361;});}),this['listenTo'](_0x123e0e,'change:state',(_0x3a2f1b,_0x16cabc,_0x2f7851)=>{this['editor']['plugins']['get']('CommentsRepository')['switchReadOnly']('connected'!==_0x2f7851);}),_0x40a130['_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 _0x19a2cf{static get['requires'](){return[m,f,'TrackChanges'];}static get['pluginName'](){return'RealTimeCollaborativeTrackChanges';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}class u extends _0x19a2cf{static ['RevisionHistoryService']=/* #__PURE__ -- @preserve */
28
+ ((()=>et)());['_lastRequestId'];['_revisionTracker'];['_revisionHistoryService'];['_oldOffset'];static get['requires'](){return[c,l,'RevisionTracker',i,_0x2bb1a6];}constructor(_0xf14ff4){super(_0xf14ff4);const _0x2e644b=this['editor']['config']['get']('collaboration.channelId');this['_lastRequestId']=null,this['_revisionTracker']=this['editor']['plugins']['get']('RevisionTracker'),this['_revisionHistoryService']=new u['RevisionHistoryService'](_0x2e644b);}async['init'](){const _0x13ebd6=this['editor']['plugins']['get'](l),_0x1b7320=_0x13ebd6['serverHistory'],_0x377fcd=this['editor']['plugins']['get'](c);this['_revisionTracker']['setSource']({'history':_0x1b7320,'getLatestVersion':()=>this['_getLatestVersion'](),'getCurrentRevisionId':()=>_0x13ebd6['sessionId']});const _0x5e9610=this['editor']['config']['get']('cloudServices.bundleVersion')||nt,_0x209117=await st['isBundleUploaded'](_0x377fcd['connection'],_0x5e9610);this['_revisionTracker']['adapter']={'getRevision':async({revisionId:_0x1a9d11})=>(await this['_waitForServiceReady'](),await this['_revisionHistoryService']['getRevision'](_0x1a9d11)),'updateRevisions':async _0x17b911=>{await this['_waitForServiceReady']();const _0x3c0925=this['_revisionTracker']['currentRevision'];if(_0x209117&&0x1===_0x17b911['length']&&_0x17b911[0x0]['id']===_0x3c0925['id'])return _0x17b911;for(const _0x464b0d of _0x17b911)_0x464b0d['id']===_0x3c0925['id']&&(_0x464b0d['isEmptyCurrent']=_0x464b0d['fromVersion']===_0x464b0d['toVersion']);return this['_revisionHistoryService']['updateRevisions'](_0x17b911,this['_lastRequestId'])['then'](_0x14f079=>(this['_lastRequestId']=_0x14f079,_0x17b911))['catch'](_0x10b313=>{if(it(_0x10b313)||'400'===_0x10b313['code']&&void 0x0!==_0x10b313['data']['wrongRequestId']){for(const _0x3c6243 of _0x17b911){!this['_revisionTracker']['repository']['getRevision'](_0x3c6243['id'])||this['_revisionTracker']['_bufferUpdate'](_0x3c6243['id'],_0x3c6243,!0x1);}if(it(_0x10b313))throw _0x10b313;return _0x17b911;}throw _0x10b313;});}},this['listenTo'](this['_revisionHistoryService'],'revisionsUpdated',(_0x164116,{revisionsData:_0x3c2a61,requestId:_0x28efbf})=>{Math['max'](..._0x3c2a61['map'](_0x2436b8=>_0x2436b8['toVersion']))>this['_getLatestVersionFromServerOperations']()-0x1?this['_getLatestVersion']()['then'](()=>{this['_handleRevisionsUpdate'](_0x3c2a61,_0x28efbf);}):this['_handleRevisionsUpdate'](_0x3c2a61,_0x28efbf);});const {revisions:_0x1d1e35,requestId:_0x2f5b2c}=await this['_revisionHistoryService']['connect'](_0x377fcd['connection']);_0x377fcd['addToReconnectionStack'](this),this['_lastRequestId']=_0x2f5b2c,await this['_fetchMissingUsers'](_0x1d1e35);for(const _0x5de723 of _0x1d1e35)this['_revisionTracker']['addRevisionData'](_0x5de723);this['listenTo'](_0x13ebd6,'change:_isConnected',(_0xba5a5c,_0x4257b7,_0x3b52be)=>{_0x3b52be&&(this['_oldOffset']=_0x13ebd6['_offset'],_0xba5a5c['off']());}),this['_revisionTracker']['bind']('isEnabled')['to'](_0x377fcd,'state',_0x4edec7=>_0x4edec7===_0x3e94aa['CONNECTED']);}async['reconnect'](){const _0x48ae2c=this['editor']['plugins']['get'](c),_0x3d8896=this['editor']['plugins']['get'](l),_0x185ad1=async()=>{const _0x2ecdd0=this['_revisionTracker']['currentRevision'],_0x55cf56=_0x2ecdd0['id'],_0x5aa25d=_0x55cf56!==_0x3d8896['sessionId'];if(_0x5aa25d){const _0x41efa4=_0x3d8896['_offset']-this['_oldOffset'],_0x3f9448=this['_getLatestVersionFromServerOperations']();this['_revisionTracker']['_revisionDataBuilder']['reInit']();if(_0x2ecdd0['toVersion']+_0x41efa4!==_0x3f9448){const _0x26831d=_0x2ecdd0['fromVersion']+_0x41efa4,_0x11a76a=this['editor']['plugins']['get'](_0x2bb1a6),_0x5934b3=this['_revisionTracker']['buildRevisionData']({'revision':_0x2ecdd0,'from':_0x26831d,'to':_0x3f9448});_0x5934b3['id']=_0x2ecdd0['id'];const _0xfc76c6=_0x5934b3['authorsIds']['map'](_0x7badb8=>_0x11a76a['getUser'](_0x7badb8));_0x2ecdd0['_update']({..._0x5934b3,'authors':_0xfc76c6},!0x0),this['_revisionTracker']['_bufferUpdate'](_0x2ecdd0['id'],_0x5934b3,!0x0);}this['_revisionTracker']['_startingVersion']=_0x3f9448,(_0x2ecdd0['toVersion']===_0x2ecdd0['fromVersion']&&!this['_revisionTracker']['_bufferedUpdates']['has'](_0x55cf56)&&this['_revisionTracker']['repository']['_revisions']['remove'](_0x55cf56),this['_revisionTracker']['_createCurrentRevision'](_0x3f9448));}const {revisions:_0x44fab7,requestId:_0x25897b}=await this['_revisionHistoryService']['reconnect'](_0x48ae2c['connection'],this['_lastRequestId']);_0x5aa25d&&_0x44fab7['length']>0x0?_0x3d8896['_handleReconnectionError']():(await this['_fetchMissingUsers'](_0x44fab7),this['_handleRevisionsUpdate'](_0x44fab7,_0x25897b),this['_revisionTracker']['sendBufferedUpdates']());};return _0x3d8896['_isConnected']?_0x185ad1():new Promise((_0x20fbaf,_0xcf9206)=>{_0x3d8896['once']('change:_isConnected',()=>{_0x185ad1()['then'](_0x20fbaf)['catch'](_0xcf9206);});});}['destroy'](){super['destroy']();}async['_waitForServiceReady'](){this['_revisionHistoryService']['isConnected']||await new Promise(_0x1b3d94=>{this['listenTo'](this['_revisionHistoryService'],'connected',_0x5efea9=>{_0x5efea9['off'](),_0x1b3d94();});});}['_getLatestVersionFromServerOperations'](){const _0x995496=this['editor']['plugins']['get'](l)['serverHistory']['getOperations']()['reverse']();for(const _0x106d95 of _0x995496)if('marker'!==_0x106d95['type']||_0x106d95['affectsData'])return _0x106d95['baseVersion']+0x1;}['_getLatestVersion'](){const _0x2d2a64=this['editor']['plugins']['get'](l);return new Promise(_0x4d1cdf=>{_0x2d2a64['_isPendingUpdate']?_0x2d2a64['once']('change:_isPendingUpdate',()=>{_0x4d1cdf(this['_getLatestVersionFromServerOperations']());}):_0x4d1cdf(this['_getLatestVersionFromServerOperations']());});}['_handleRevisionsUpdate'](_0xf0fabb,_0xe61f6e){const _0x5bc010=this['_revisionTracker']['repository'];this['_lastRequestId']=_0xe61f6e;for(const _0x5aeab2 of _0xf0fabb){const _0x3d66c9=_0x5bc010['getRevision'](_0x5aeab2['id']);if(_0x3d66c9){if((_0x5aeab2['fromVersion']||_0x5aeab2['toVersion'])&&(_0x5aeab2['diffData']=null),_0x3d66c9===this['_revisionTracker']['currentRevision']){const _0x1f1c12=Math['max'](_0x3d66c9['toVersion'],_0x5aeab2['toVersion']),_0x4d487f=Math['max'](_0x3d66c9['fromVersion'],_0x5aeab2['fromVersion']);let _0x180600;_0x3d66c9['toVersion']===_0x5aeab2['toVersion']&&_0x3d66c9['fromVersion']===_0x5aeab2['fromVersion']?(_0x180600=!0x0,this['_preventResendingRevisionData'](_0x5aeab2)):_0x5aeab2['toVersion']===_0x1f1c12&&_0x5aeab2['fromVersion']===_0x4d487f?_0x180600=!0x1:(_0x3d66c9['toVersion']===_0x1f1c12&&_0x3d66c9['fromVersion']===_0x4d487f||this['_fixRevision']({'revision':_0x3d66c9,'from':_0x4d487f,'to':_0x1f1c12}),_0x180600=!0x0),_0x180600&&(delete _0x5aeab2['fromVersion'],delete _0x5aeab2['toVersion'],delete _0x5aeab2['diffData'],delete _0x5aeab2['createdAt'],delete _0x5aeab2['authorsIds']);}this['_revisionTracker']['setRevisionData'](_0x5aeab2),this['_preventResendingRevisionData'](_0x5aeab2);}else this['_revisionTracker']['addRevisionData'](_0x5aeab2);}const _0x47fbd6=_0x5bc010['getRevisions']();_0x47fbd6['reverse']();for(let _0x4e19ea=0x0;_0x4e19ea<_0x47fbd6['length']-0x1;_0x4e19ea++){const _0x269086=_0x47fbd6[_0x4e19ea],_0x3776c7=_0x47fbd6[_0x4e19ea+0x1];if(_0x269086['fromVersion']<_0x3776c7['toVersion']){const _0x16d898=_0x3776c7['toVersion'],_0x1abbdf=Math['max'](_0x16d898,_0x269086['toVersion']);this['_fixRevision']({'revision':_0x269086,'from':_0x16d898,'to':_0x1abbdf});}}}['_fixRevision']({revision:_0x5923f5,from:_0x4c9f9f,to:_0x4ffdac}={}){const _0x21ea7a=this['editor']['plugins']['get'](_0x2bb1a6),_0x3e1c0d=this['_revisionTracker']['buildRevisionData']({'revision':_0x5923f5,'from':_0x4c9f9f,'to':_0x4ffdac});_0x3e1c0d['authors']=_0x3e1c0d['authorsIds']['map'](_0x55caee=>_0x21ea7a['getUser'](_0x55caee)),_0x5923f5['_update'](_0x3e1c0d);}['_preventResendingRevisionData'](_0xf5ffb4){const _0x2680ba={};_0x2680ba['id']=_0xf5ffb4['id'];for(const _0x550dca of Object['keys'](_0xf5ffb4))'id'!==_0x550dca&&(_0x2680ba[_0x550dca]=void 0x0);this['_revisionTracker']['_bufferUpdate'](_0x2680ba['id'],_0x2680ba,!0x0);}async['_fetchMissingUsers'](_0x9ca647){const _0x411974=this['editor']['plugins']['get'](_0x2bb1a6),{connection:_0x337ff7}=this['editor']['plugins']['get'](c),_0x10838a=new Set();for(const _0x209125 of _0x9ca647){for(const _0x3750dd of _0x209125['authorsIds'])_0x37b7d5(_0x3750dd);_0x209125['creatorId']&&_0x37b7d5(_0x209125['creatorId']);}if(0x0===_0x10838a['size'])return;const _0x22cc6f=await dt['getMany'](_0x337ff7,Array['from'](_0x10838a));for(const _0x4043fc of _0x22cc6f)_0x411974['getUser'](_0x4043fc['id'])||_0x411974['addUser'](_0x4043fc);function _0x37b7d5(_0x426ff5){_0x411974['getUser'](_0x426ff5)||_0x10838a['add'](_0x426ff5);}}}function it(_0x20bc0c){return _0x20bc0c['message']['startsWith']('cloud-services-internal-error:\x20Revision\x20History\x20Service\x20is\x20not\x20connected.')||_0x20bc0c['message']['startsWith']('cloud-services-internal-error:\x20Not\x20connected.')||_0x20bc0c['message']['startsWith']('cloud-services-internal-error:\x20Request\x20timeout.');}class g extends _0x19a2cf{static get['requires'](){return['RevisionHistory',u,n];}static get['pluginName'](){return'RealTimeCollaborativeRevisionHistory';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}class ts extends _0x348816{constructor(_0xda177d){super(_0xda177d);const _0x526c5b=this['bindTemplate'];this['set']('usersCount',0x0),this['set']('isHidden',!0x0),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-presence-list__counter',_0x526c5b['if']('isHidden','ck-presence-list__counter--hidden')]},'children':[{'text':_0x526c5b['to']('usersCount',_0x2a6a27=>q(_0xda177d,'CONNECTED_USERS',_0x2a6a27))}]});}}class es extends _0x348816{['items'];['keystrokes'];constructor(_0x2687d0){super(_0x2687d0);const _0x39c60c=this['bindTemplate'];this['items']=this['createCollection'](),this['keystrokes']=new _0x193340(),this['set']({'hasPopup':!0x1,'isExpanded':!0x1}),this['setTemplate']({'tag':'div','attributes':{'aria-haspopup':_0x39c60c['if']('hasPopup'),'aria-expanded':_0x39c60c['to']('isExpanded',_0x467bec=>this['hasPopup']&&String(_0x467bec)),'aria-label':_0x39c60c['to']('hasPopup',_0x27c1e3=>q(_0x2687d0,_0x27c1e3?'Collapsed\x20connected\x20users\x20list\x20(press\x20ENTER\x20to\x20open\x20it)':'Connected\x20users\x20list')),'role':'list','tabindex':_0x39c60c['to']('hasPopup',_0x36dc9a=>!!_0x36dc9a&&0x0),'class':['ck','ck-presence-list__list']},'children':this['items'],'on':{'click':_0x39c60c['to'](()=>this['fire']('execute'))}}),this['on']('change:hasPopup',(_0x500d07,_0x4ae47c,_0x273822)=>{this['element']&&(_0x273822?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 _0x348816{['counterView'];['inlineListView'];constructor(_0x129c15){super(_0x129c15);const _0x2d6a96=this['bindTemplate'];this['set']('isCollapsed',!0x0),this['counterView']=new ts(this['locale']),this['inlineListView']=new es(_0x129c15),this['inlineListView']['bind']('hasPopup')['to'](this,'isCollapsed'),this['listenTo'](this['inlineListView']['items'],'change',()=>{for(const _0x1033aa of this['inlineListView']['items'])_0x1033aa['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',_0x2d6a96['if']('isCollapsed','ck-presence-list--collapsed')]},'children':[this['counterView'],this['inlineListView']]});}}class j extends _0x348816{['listWrapperView'];constructor(_0x29e216,_0x392ee6){super(_0x29e216),this['listWrapperView']=new mt(_0x29e216,_0x392ee6),this['setTemplate']({'tag':'div','attributes':{'tabindex':-0x1,'role':'application','class':['ck','ck-presence-list__dropdown-list'],'aria-label':q(_0x29e216,'Connected\x20users\x20list\x20dropdown\x20menu')},'children':[this['listWrapperView']]});}}class mt extends _0x1b93e4{constructor(_0x181e66,_0x3b71bb){super(_0x181e66);const _0x64a3ac=this['bindTemplate'];this['set']('_isScrollable',!0x1),this['setTemplate']({'tag':_0x3b71bb?'div':'ul','attributes':{'class':['ck','ck-reset','ck-list','ck-presence-list__dropdown-list-wrapper',_0x64a3ac['if']('_isScrollable','ck-presence-list__dropdown-list-wrapper_scrollable')],'role':_0x64a3ac['to']('role'),'aria-label':_0x64a3ac['to']('ariaLabel'),'aria-labelledby':_0x64a3ac['to']('ariaLabelledBy')},'children':this['items']}),this['listenTo'](_0x378d67['window'],'resize',()=>this['checkIfScrollable']()),this['items']['on']('change',()=>this['checkIfScrollable']());}['render'](){super['render'](),this['checkIfScrollable']();}['checkIfScrollable'](){const _0x22691c=this['element'];_0x22691c&&(this['_isScrollable']=Math['max'](_0x22691c['scrollHeight'],_0x22691c['clientHeight'])>0.8*window['innerHeight']);}}class k extends rt{['userView'];constructor(_0x299c86,_0x3f1ea3,_0x49bae1){super(_0x299c86);const _0x2e726c=this['bindTemplate'];this['userView']=new ct(_0x299c86,_0x3f1ea3);const _0x4e40ad={'tag':'li','attributes':{'class':['ck','ck-presence-list__dropdown-list-item'],'tabindex':-0x1,'role':'presentation','aria-label':_0x3f1ea3['name']},'children':[this['userView'],{'tag':'span','attributes':{'class':['ck','ck-user__full-name']},'children':[{'text':_0x3f1ea3['name']}]},{'tag':'span','attributes':{'class':['ck','ck-presence-list__marker',_0x3f1ea3['color']['getBackgroundColorClass']()],'aria-hidden':'true'}}]};_0x49bae1&&(_0x4e40ad['tag']='button',_0x4e40ad['on']={'click':_0x2e726c['to'](()=>this['fire']('execute'))}),this['setTemplate'](_0x4e40ad);}['focus'](){this['element']['focus']();}}class y extends _0x348816{['userView'];['markerView'];constructor(_0x434cf8,_0x3d64bc,_0x16ee8b){super(_0x434cf8);const _0x253ca6=this['bindTemplate'];this['set']('isFocusable',!0x1),this['set']('hasTooltip',!0x0),this['set']('tooltipPosition',''),this['userView']=new ct(_0x434cf8,_0x3d64bc),this['markerView']=new at(_0x434cf8,_0x3d64bc);const _0x577ff7=new ot(_0x434cf8);_0x577ff7['template']['tag']='span',_0x577ff7['text']=_0x3d64bc['name'];const _0x1d83ec={'tag':'div','attributes':{'class':['ck','ck-presence-list__list-item'],'role':'listitem','tabindex':_0x253ca6['to']('isFocusable',_0x1d5c84=>!!_0x1d5c84&&0x0),'aria-labelledby':_0x577ff7['id'],'data-cke-tooltip-text':this['userView']['name'],'data-cke-tooltip-position':_0x253ca6['to']('tooltipPosition'),'data-cke-tooltip-disabled':_0x253ca6['to']('hasTooltip',_0x8d9ee3=>!_0x8d9ee3),'data-cke-tooltip-class':'ck-presence-list__list-item__tooltip'},'children':[this['userView'],this['markerView'],_0x577ff7]};_0x16ee8b&&(_0x1d83ec['tag']='button',_0x1d83ec['on']={'click':_0x253ca6['to'](()=>this['fire']('execute'))}),this['setTemplate'](_0x1d83ec);}}class at extends _0x348816{constructor(_0x292abe,_0x40ce5d){super(_0x292abe),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-presence-list__marker',_0x40ce5d['color']['getBackgroundColorClass']()],'aria-hidden':'true'}});}}const A={'collapseAt':0x6,'displayMe':!0x0};class r extends _0x1f4b11{['currentDisplayedUsers'];['balloonPanelView'];['view'];['presenceDropdownView'];['_bodyCollection']=null;constructor(_0x3dcea2){super(_0x3dcea2),this['context']['config']['define']('presenceList',A);const _0x412fad=_0x3dcea2['config']['get']('presenceList.collapseAt');if('number'!=typeof _0x412fad)throw new _0x111ec8('presencelist-collapseat-invalid-format',this);if(_0x412fad<0x1)throw new _0x111ec8('presencelist-collapseat-invalid-format',this);this['_allConnectedUsers']=this['context']['plugins']['get'](i)['allConnectedUsers'],this['set']('usersCount',0x0),this['currentDisplayedUsers']=new _0x31aad8(),this['balloonPanelView']=new _0x589f52(),this['balloonPanelView']['class']='ck\x20ck-presence-list__balloon',this['view']=this['_createView'](),this['presenceDropdownView']=void 0x0;}static get['requires'](){return[i];}['init'](){for(const _0x1e9c1f of this['_allConnectedUsers'])this['_handleUserAdd'](_0x1e9c1f);this['listenTo'](this['_allConnectedUsers'],'add',(_0x18b5d7,_0x4806b9)=>{this['_handleUserAdd'](_0x4806b9);}),this['listenTo'](this['_allConnectedUsers'],'remove',(_0x4b6d62,_0x33f84e)=>{this['_handleUserRemove'](_0x33f84e);});}['_createView'](){const _0x5e0c79=this['context'],_0x1e3583=new L(this['context']['locale']),_0x1fac00=this['balloonPanelView'];if(!_0x2bce76(_0x5e0c79['config']['get']('presenceList.container')))throw new _0x111ec8('presencelist-missing-container',this);return _0x1e3583['counterView']['bind']('usersCount')['to'](this),_0x1e3583['bind']('isCollapsed')['to'](this,'usersCount',_0x115464=>{const {collapseAt:_0x3f42cd,displayMe:_0x1f83fc}=_0x5e0c79['config']['get']('presenceList'),_0x13df5f=_0x115464>=_0x3f42cd;return _0x1e3583['counterView']['isHidden']=!(0x1==_0x115464&&_0x1f83fc||_0x13df5f),_0x13df5f||this['hideDropdown'](),_0x13df5f;}),_0x1e3583['inlineListView']['items']['bindTo'](this['currentDisplayedUsers'])['using'](_0x4d4347=>{const _0x1677af=_0x5e0c79['config']['get']('presenceList'),_0x5d151b=new y(_0x5e0c79['locale'],_0x4d4347,!!_0x1677af['onClick']);return _0x5d151b['bind']('hasTooltip')['to'](_0x1e3583,'isCollapsed',_0x7af852=>!_0x7af852),_0x5d151b['bind']('isFocusable')['to'](_0x1e3583,'isCollapsed',_0x384db=>!_0x384db),_0x1677af['onClick']&&this['listenTo'](_0x5d151b,'execute',()=>{this['view']['isCollapsed']||_0x1677af['onClick'](_0x4d4347,_0x5d151b['element']);}),_0x5d151b;}),this['listenTo'](_0x1e3583['inlineListView'],'execute',()=>{this['presenceDropdownView']?this['hideDropdown']():this['view']['isCollapsed']&&this['showDropdown']();}),_0x1e3583['inlineListView']['keystrokes']['set']('Enter',(_0x75c334,_0x11f442)=>{this['view']['isCollapsed']&&(this['showDropdown'](),_0x11f442());}),_0x1e3583['render'](),_0x1fac00['render'](),_0x15bf43({'emitter':_0x1e3583,'activator':()=>_0x1fac00['isVisible'],'contextElements':[_0x1fac00['element'],_0x1e3583['inlineListView']['element']],'callback':()=>this['hideDropdown']()}),_0x5e0c79['config']['get']('presenceList.container')['appendChild'](_0x1e3583['element']),this['_bodyCollection']=new _0x1080b2(this['context']['locale']),this['_bodyCollection']['attachToDom'](),this['_bodyCollection']['add'](this['balloonPanelView']),_0x1e3583;}['_handleUserAdd'](_0x47febe){if(!this['context']['config']['get']('presenceList.displayMe')&&_0x47febe['isMe'])return;const _0x1dfa2a=this['context']['config']['get']('presenceList.collapseAt')-0x1;this['usersCount']++,this['currentDisplayedUsers']['length']==_0x1dfa2a&&this['currentDisplayedUsers']['length']>0x1&&this['currentDisplayedUsers']['remove'](0x1);const _0x1b4b8a=_0x47febe['isMe']?0x0:this['currentDisplayedUsers']['length'];this['currentDisplayedUsers']['add'](_0x47febe,_0x1b4b8a);}['_handleUserRemove'](_0x2c2a8f){if(this['usersCount']--,this['currentDisplayedUsers']['get'](_0x2c2a8f['id'])&&(this['currentDisplayedUsers']['remove'](_0x2c2a8f['id']),this['currentDisplayedUsers']['length']<this['usersCount'])){for(const _0x4845be of Array['from'](this['_allConnectedUsers'])['reverse']())if(!this['currentDisplayedUsers']['get'](_0x4845be['id']))return void this['currentDisplayedUsers']['add'](_0x4845be,Math['min'](this['currentDisplayedUsers']['length'],0x1));}}['showDropdown'](){if(this['presenceDropdownView'])return;const _0x3a62d7=this['context']['config']['get']('presenceList');this['presenceDropdownView']=new j(this['context']['locale'],!!_0x3a62d7['onClick']),this['view']['inlineListView']['isExpanded']=!0x0;const {listWrapperView:_0x5193ad}=this['presenceDropdownView'];_0x5193ad['items']['bindTo'](this['_allConnectedUsers'])['using'](_0x302afa=>{if(!_0x3a62d7['displayMe']&&_0x302afa['isMe'])return null;const _0x391636=new k(this['context']['locale'],_0x302afa,!!_0x3a62d7['onClick']);return _0x3a62d7['onClick']&&this['listenTo'](_0x391636,'execute',()=>{_0x3a62d7['onClick'](_0x302afa,_0x391636['element']);}),_0x391636;}),this['balloonPanelView']['content']['add'](this['presenceDropdownView']),this['balloonPanelView']['pin']({'target':this['view']['inlineListView']['element']}),_0x5193ad['focus'](),_0x5193ad['checkIfScrollable']();const _0x1f4ac7=(_0x5c9705,_0x1dc916)=>{this['hideDropdown'](),this['view']['inlineListView']['focus'](),_0x1dc916();};_0x5193ad['keystrokes']['set']('Esc',_0x1f4ac7),_0x5193ad['keystrokes']['set']('Shift+Tab',_0x1f4ac7),_0x5193ad['keystrokes']['set']('Tab',(_0x3b0f2c,_0x4abdfa)=>{!function(_0x8ad7c1){const _0x3671bb=['a','button','input','select','textarea','[tabindex]','[contenteditable]']['map'](_0x10b55d=>_0x10b55d+':not([disabled]):not([tabindex=\x22-1\x22])')['join'](','),_0x5ded57=[...document['body']['querySelectorAll'](_0x3671bb)]['filter'](_0x3c08dc=>_0x3c08dc===document['activeElement']||_0x3c08dc['offsetWidth']+_0x3c08dc['offsetHeight']>0x0)['sort']((_0x30c9de,_0x525047)=>(_0x30c9de['tabIndex']||0x0)-(_0x525047['tabIndex']||0x0)),_0x1d11e3=_0x5ded57['indexOf'](_0x8ad7c1),_0x6ee68=_0x5ded57[(_0x1d11e3+0x1)%_0x5ded57['length']];_0x6ee68&&_0x6ee68['focus']();}(this['view']['element']),this['hideDropdown'](),_0x4abdfa();}),_0x5193ad['focusTracker']['add'](this['view']['element']),_0x5193ad['focusTracker']['on']('change:isFocused',(_0x2c6383,_0x5f13b6,_0x3a7e08)=>{_0x3a7e08||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 s extends _0x1f4b11{static get['requires'](){return[i,r];}static get['pluginName'](){return'PresenceList';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{a as CloudServicesCommentsAdapter,u as CloudServicesRevisionHistoryAdapter,f as CloudServicesTrackChangesAdapter,s as PresenceList,l as RealTimeCollaborationClient,m as RealTimeCollaborativeComments,n as RealTimeCollaborativeEditing,g as RealTimeCollaborativeRevisionHistory,p as RealTimeCollaborativeTrackChanges};
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- export default{'af':{'dictionary':{'CONNECTED_USERS':['',''],'PENDING_ACTION_SENDING_DATA':'','Synchronization\x20issue':'','Connected\x20users\x20list\x20dropdown\x20menu':'','Connected\x20users\x20list':'','Collapsed\x20connected\x20users\x20list\x20(press\x20ENTER\x20to\x20open\x20it)':'','The\x20document\x20cannot\x20be\x20connected\x20back\x20to\x20the\x20server.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.':'','The\x20document\x20details\x20could\x20not\x20be\x20taken\x20during\x20the\x20reconnection.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.':'','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.':'','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.':''},'getPluralForm':_0x189113=>0x1!=_0x189113}};
23
+ export default{'af':{'dictionary':{'CONNECTED_USERS':['',''],'PENDING_ACTION_SENDING_DATA':'','Synchronization\x20issue':'','Connected\x20users\x20list\x20dropdown\x20menu':'','Connected\x20users\x20list':'','Collapsed\x20connected\x20users\x20list\x20(press\x20ENTER\x20to\x20open\x20it)':'','The\x20document\x20cannot\x20be\x20connected\x20back\x20to\x20the\x20server.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.':'','The\x20document\x20details\x20could\x20not\x20be\x20taken\x20during\x20the\x20reconnection.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.':'','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.':'','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.':''},'getPluralForm':_0x3a7a18=>0x1!=_0x3a7a18}};
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- (_0x37ed30=>{const {af:{dictionary:_0x2dd1d7,getPluralForm:_0x54be8a}}={'af':{'dictionary':{'CONNECTED_USERS':['',''],'PENDING_ACTION_SENDING_DATA':'','Synchronization\x20issue':'','Connected\x20users\x20list\x20dropdown\x20menu':'','Connected\x20users\x20list':'','Collapsed\x20connected\x20users\x20list\x20(press\x20ENTER\x20to\x20open\x20it)':'','The\x20document\x20cannot\x20be\x20connected\x20back\x20to\x20the\x20server.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.':'','The\x20document\x20details\x20could\x20not\x20be\x20taken\x20during\x20the\x20reconnection.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.':'','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.':'','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.':''},'getPluralForm':_0x22e449=>0x1!=_0x22e449}};_0x37ed30['af']||={'dictionary':{},'getPluralForm':null},_0x37ed30['af']['dictionary']=Object['assign'](_0x37ed30['af']['dictionary'],_0x2dd1d7),_0x37ed30['af']['getPluralForm']=_0x54be8a;})(window['CKEDITOR_TRANSLATIONS']||={});
23
+ (_0x3914c2=>{const {af:{dictionary:_0x1db8aa,getPluralForm:_0x2f2274}}={'af':{'dictionary':{'CONNECTED_USERS':['',''],'PENDING_ACTION_SENDING_DATA':'','Synchronization\x20issue':'','Connected\x20users\x20list\x20dropdown\x20menu':'','Connected\x20users\x20list':'','Collapsed\x20connected\x20users\x20list\x20(press\x20ENTER\x20to\x20open\x20it)':'','The\x20document\x20cannot\x20be\x20connected\x20back\x20to\x20the\x20server.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.':'','The\x20document\x20details\x20could\x20not\x20be\x20taken\x20during\x20the\x20reconnection.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.':'','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.':'','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.':''},'getPluralForm':_0x373ead=>0x1!=_0x373ead}};_0x3914c2['af']||={'dictionary':{},'getPluralForm':null},_0x3914c2['af']['dictionary']=Object['assign'](_0x3914c2['af']['dictionary'],_0x1db8aa),_0x3914c2['af']['getPluralForm']=_0x2f2274;})(window['CKEDITOR_TRANSLATIONS']||={});