@ckeditor/ckeditor5-real-time-collaboration 43.3.0 → 43.3.1

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 _0x2b8ee9,Plugin as _0x3cb587,PendingActions as _0x1b40c8,Context as _0x200362}from'@ckeditor/ckeditor5-core/dist/index.js';import{DomEmitterMixin as _0x5850b9,CKEditorError as _0x5cf78e,Collection as _0x15fdb5,global as _0x2b65ef,version as nt,uid as _0xed2698,KeystrokeHandler as _0x3cfef2}from'@ckeditor/ckeditor5-utils/dist/index.js';import{Notification as _0x7ec224,View as _0x1ec4e8,ListView as _0x252df,ListItemView as et,LabelView as ot,BalloonPanelView as _0x4797f4,clickOutsideHandler as _0x54d39b,BodyCollection as _0x5b1fbd}from'@ckeditor/ckeditor5-ui/dist/index.js';import{LiveRange as at,History as _0x4f8b44,NoOperation as _0x30d268,InsertOperation as _0x129f73,MarkerOperation as _0x3817e5,RootAttributeOperation as _0x706758,transformSets as _0x331848,OperationFactory as _0x4b7ac0}from'@ckeditor/ckeditor5-engine/dist/index.js';import{WebSocketGateway as ht,WEB_SOCKET_GATEWAY_STATES as _0x57405a,CollaborativeEditingService as _0x6f83bd,User as lt,CommentsService as _0x137f3f,TrackChangesService as st,RevisionHistoryService as _0x4d6709,EditorService as _0x48174f}from'@ckeditor/ckeditor-cloud-services-collaboration/dist/index.js';import{Users as _0x6b6ce4,UserView as rt}from'ckeditor5-collaboration/dist/index.js';import{Compressor as _0x1d9279}from'@ckeditor/ckeditor5-operations-compressor/dist/index.js';import{isElement as _0x455fe4}from'lodash-es';class c extends _0x2b8ee9{static ['WebSocketGateway']=/* #__PURE__ -- @preserve */
24
- ((()=>ht)());static ['initialReconnectionInterval']=0x3e8;['connection'];['_reconnectionStack'];['_shouldPluginsReconnect'];['_domEmitter'];static get['requires'](){return['CloudServices',_0x7ec224];}static get['pluginName'](){return'WebSocketGateway';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3de2e5){super(_0x3de2e5),this['set']('state',_0x57405a['CONNECTED']),this['set']('_isBrowserOffline',!0x1),this['_reconnectionStack']=new Set(),this['_shouldPluginsReconnect']=!0x1,this['_domEmitter']=Object['create'](_0x5850b9);}['init'](){const _0x383fbe=this['context'],_0x39fb79=_0x383fbe['plugins']['get']('CloudServices'),_0x185c44=_0x383fbe['plugins']['get'](_0x7ec224);if(!_0x39fb79['token'])throw new _0x5cf78e('websocketgateway-missing-token',this);if(!_0x39fb79['webSocketUrl'])throw new _0x5cf78e('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'](_0x39fb79['token'],_0x39fb79['webSocketUrl'],{'timeout':0x3e8*this['context']['config']['get']('cloudServices.connectionTimeout'),'requestTimeout':0x3e8*this['context']['config']['get']('cloudServices.requestTimeout')})['then'](_0x39b18d=>{if(this['connection']=_0x39b18d,this['bind']('state')['to'](_0x39b18d,'state',this,'_isBrowserOffline',(_0x5ef6a3,_0x4c3f58)=>('connected'!==_0x5ef6a3&&(this['_shouldPluginsReconnect']=!0x0),_0x4c3f58||_0x5ef6a3!==_0x57405a['CONNECTED']?_0x57405a['DISCONNECTED']:this['state']==_0x57405a['DISCONNECTED']&&this['_shouldPluginsReconnect']?(this['_shouldPluginsReconnect']=!0x1,this['_reconnect'](),_0x57405a['CONNECTING']):_0x57405a['CONNECTED'])),this['connection']['on']('error',(_0x43a909,_0x35e5c6)=>{if('limitExceeded'!==_0x35e5c6['code'])throw console['error'](_0x35e5c6),new _0x5cf78e('cloudservices-init',null,{'originalError':_0x35e5c6});_0x185c44['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'});}),!_0x39b18d['me'])return new Promise(_0x13c46d=>_0x39b18d['on']('change:me',_0x13c46d));})['catch'](_0x34440e=>{throw console['error'](_0x34440e),new _0x5cf78e('cloudservices-init',null,{'originalError':_0x34440e});});}['addToReconnectionStack'](_0x4a92f7){if('function'!=typeof _0x4a92f7['reconnect'])throw new _0x5cf78e('websocketgateway-invalid-plugin-interface',this);if(this['isInReconnectionStack'](_0x4a92f7))throw new _0x5cf78e('websocketgateway-plugin-already-registered',this,{'name':_0x4a92f7['constructor']['pluginName']});this['_reconnectionStack']['add'](_0x4a92f7);}['removeFromReconnectionStack'](_0x307769){this['_reconnectionStack']['delete'](_0x307769);}['isInReconnectionStack'](_0x25a4c9){return this['_reconnectionStack']['has'](_0x25a4c9);}['_reconnect'](){return this['connection']['reconnect']()['then'](()=>Promise['all'](Array['from'](this['_reconnectionStack'],_0x31d1f7=>_0x31d1f7['reconnect']())))['then'](()=>this['state']=_0x57405a['CONNECTED'])['catch'](_0x19ff86=>{throw console['error'](_0x19ff86),new _0x5cf78e('cloudservices-reconnection-error',this['context']);});}['destroy'](){this['connection']&&this['connection']['disconnect'](),this['state']=_0x57405a['DISCONNECTED'],this['_domEmitter']['stopListening'](),super['destroy']();}}class i extends _0x2b8ee9{['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,_0x6b6ce4];}constructor(_0x498ed7){super(_0x498ed7),this['channelSessions']=new Map(),this['channelConnectedUsers']=new Map(),this['allConnectedUsers']=new _0x15fdb5(),this['_registeredSessions']=new Map(),this['_uniqueUsersCount']=0x0,this['_users']=this['context']['plugins']['get'](_0x6b6ce4);}['init'](){const _0x4505db=this['context']['plugins']['get'](c);this['listenTo'](_0x4505db,'change:state',(_0x2e9eb0,_0x3a7457,_0x552db3)=>{if('connected'!==_0x552db3)this['channelSessions']['forEach'](_0x11d426=>_0x11d426['clear']()),this['channelConnectedUsers']['forEach'](_0xd3528d=>_0xd3528d['clear']()),this['allConnectedUsers']['clear']();else{for(const [_0x1b2007,_0x57af04]of this['_registeredSessions'])for(const _0x2bbdbb of _0x57af04)this['_handleSessionAdd'](_0x1b2007,_0x2bbdbb);}}),this['_createUser'](_0x4505db['connection']['me'],!0x0);}['register'](_0x46d180,_0x3da4f0){if(this['_registeredSessions']['has'](_0x46d180))throw new _0x5cf78e('sessions-register-already-registered',null,{'channelId':_0x46d180});this['_registeredSessions']['set'](_0x46d180,_0x3da4f0),this['channelSessions']['set'](_0x46d180,new _0x15fdb5()),this['channelConnectedUsers']['set'](_0x46d180,new _0x15fdb5()),this['listenTo'](_0x3da4f0,'add',(_0x2916b3,_0x3c1fed)=>this['_handleSessionAdd'](_0x46d180,_0x3c1fed)),this['listenTo'](_0x3da4f0,'remove',(_0x19741c,_0x2d5d15)=>this['_handleSessionRemove'](_0x46d180,_0x2d5d15));for(const _0xdc7569 of _0x3da4f0)this['_handleSessionAdd'](_0x46d180,_0xdc7569);}['unregister'](_0x47d3a3){if(!this['_registeredSessions']['has'](_0x47d3a3))throw new _0x5cf78e('sessions-unregister-not-exist',null,{'channelId':_0x47d3a3});const _0x2ad897=this['_registeredSessions']['get'](_0x47d3a3);this['stopListening'](_0x2ad897);for(const _0x26b954 of _0x2ad897)'connected'===this['context']['plugins']['get'](c)['state']&&this['_handleSessionRemove'](_0x47d3a3,_0x26b954);this['_registeredSessions']['delete'](_0x47d3a3),this['channelSessions']['delete'](_0x47d3a3),this['channelConnectedUsers']['delete'](_0x47d3a3);}get['mySessionId'](){return this['context']['plugins']['get'](c)['connection']['sessionId'];}['getUserBySessionId'](_0xb72b0){for(const _0x48e21e of this['channelSessions']['values']())for(const _0x47243d of _0x48e21e)if(_0x47243d['id']===_0xb72b0)return _0x47243d['user'];}['getUserSessions'](_0x163486,_0x44438){const _0x425349=_0x44438?[this['channelSessions']['get'](_0x44438)]:this['channelSessions']['values'](),_0xbccb67=new Set();for(const _0x7826c2 of _0x425349)for(const _0x5008d2 of _0x7826c2)_0x5008d2['user']['id']===_0x163486['id']&&_0xbccb67['add'](_0x5008d2['id']);return _0xbccb67;}['getUserRole'](_0x52c4fb){for(const _0xd9624d of this['channelSessions']['values']())for(const _0x3e4fc2 of _0xd9624d)if(_0x3e4fc2['user']===_0x52c4fb)return _0x3e4fc2['role'];}['_handleSessionAdd'](_0x215a72,_0x14c56f){if('connected'!==this['context']['plugins']['get'](c)['state'])return;const _0x476385=_0x14c56f['user'],_0x58c191=this['_users']['getUser'](_0x476385['id'])||this['_createUser'](_0x476385),_0x675dca=Object['assign']({},_0x14c56f,{'user':_0x58c191});this['channelSessions']['get'](_0x215a72)['add'](_0x675dca);const _0x264ff4=this['channelConnectedUsers']['get'](_0x215a72);_0x264ff4['has'](_0x58c191['id'])||_0x264ff4['add'](_0x58c191),this['allConnectedUsers']['has'](_0x58c191['id'])||this['allConnectedUsers']['add'](_0x58c191,_0x58c191['isMe']?0x0:void 0x0),this['fire']('sessionAdd:'+_0x215a72,{'channelId':_0x215a72,'session':_0x675dca});}['_handleSessionRemove'](_0x10819a,_0x495f7e){if('connected'!==this['context']['plugins']['get'](c)['state'])return;const _0x387d75=this['channelConnectedUsers']['get'](_0x10819a),_0x5934c3=_0x495f7e['user'];_0x5934c3['id']&&(this['channelSessions']['get'](_0x10819a)['remove'](_0x495f7e['id']),_0x387d75['has'](_0x5934c3['id'])&&!this['getUserSessions'](_0x5934c3,_0x10819a)['size']&&_0x387d75['remove'](_0x5934c3['id']),this['allConnectedUsers']['get'](_0x5934c3['id'])&&!this['getUserSessions'](_0x5934c3)['size']&&this['allConnectedUsers']['remove'](_0x5934c3['id']));}['_createUser'](_0x59b414,_0x2f526){const _0x1326fc=this['_users']['addUser'](_0x59b414);return _0x2f526&&this['_users']['defineMe'](_0x59b414['id']),_0x1326fc['orderNumber']=this['_uniqueUsersCount']++,_0x1326fc;}}class K extends _0x3cb587{['_domEmitter']=new(_0x5850b9())();static get['requires'](){return[i];}static get['pluginName'](){return'UserMarkers';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const _0x18039a=this['editor'],_0x16e33f=_0x18039a['plugins']['get'](i);_0x18039a['conversion']['for']('editingDowncast')['markerToElement']({'model':'user:position','view':(_0x2ff075,{writer:_0x1b3fed})=>function(_0xe66010,_0x28c096,_0x995ff0,_0x569635){const _0x428752=_0xe66010['markerName']['split'](':')[0x2],_0x37d97c=_0x995ff0['getUserBySessionId'](_0x428752);if(!_0x37d97c||_0x428752===_0x995ff0['mySessionId'])return;if(!_0x569635['model']['schema']['checkChild'](_0xe66010['markerRange']['start'],'$text'))return;const _0x52f886={'class':'ck-user__marker\x20'+_0x37d97c['color']['getMarkerClass'](),'data-name':_0x37d97c['name'],'data-session-id':_0x428752},_0x1a5001=_0x569635['model']['markers']['get'](_0xe66010['markerName']),_0x55d0ce=_0x1a5001['getStart'](),_0x571b0f=_0x55d0ce['nodeAfter'],_0x480e4c=_0x569635['model']['schema'];if(_0x571b0f&&_0x480e4c['isObject'](_0x571b0f)&&_0x480e4c['isInline'](_0x571b0f)&&!_0x569635['model']['markers']['get']('user:range:'+_0x428752)['getRange']()['isCollapsed'])return;const _0x502132=_0x55d0ce['parent'];return _0x569635['model']['schema']['isLimit'](_0x502132)&&!_0x569635['model']['hasContent'](_0x502132)&&(_0x52f886['contenteditable']=!0x1),function(_0x1d66ac,_0x533e97,_0x30c9c7){const _0x2c5e53=_0x1d66ac['createUIElement']('span',_0x533e97);return _0x1d66ac['setCustomProperty']('userPositionMarker',!0x0,_0x2c5e53),_0x2c5e53['render']=function(_0x22607c){const _0x2168d7=this['toDomElement'](_0x22607c);return _0x2168d7['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>'+_0x30c9c7['name']+'</span>⁠',_0x2168d7['addEventListener']('mouseenter',()=>{_0x2168d7['classList']['add']('ck-user__marker_hovered');}),_0x2168d7['addEventListener']('mouseleave',()=>{_0x2168d7['classList']['remove']('ck-user__marker_hovered');}),_0x2168d7;},_0x2c5e53['isSimilar']=function(_0x53f042){return!(!this['getCustomProperty']('userPositionMarker')||!_0x53f042['getCustomProperty']('userPositionMarker')||this['getAttribute']('data-session-id')!=_0x53f042['getAttribute']('data-session-id'));},_0x2c5e53;}(_0x28c096,_0x52f886,_0x37d97c);}(_0x2ff075,_0x1b3fed,_0x16e33f,_0x18039a)}),_0x18039a['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'user:range','view':_0x1a9d45=>function(_0x248d1c,_0x27aca3){const _0x468a29=_0x248d1c['markerName']['split'](':')[0x2];if(_0x468a29===_0x27aca3['mySessionId'])return null;const _0x2f5c79=_0x27aca3['getUserBySessionId'](_0x468a29);if(!_0x2f5c79)return{'id':_0x468a29,'classes':[]};return{'id':_0x468a29,'classes':['ck-user__selection',_0x2f5c79['color']['getSelectionClass']()],'attributes':{'data-session-id':_0x468a29},'priority':0x7d0+_0x2f5c79['orderNumber']};}(_0x1a9d45,_0x16e33f)}),function(_0x43f538){const _0x3c0637=_0x43f538['model'],_0x3711ed=new Map(),_0x3b98f0=_0x43f538['plugins']['get'](i);_0x3c0637['markers']['on']('update:user:range',(_0x785ffe,_0x6db1fb,_0x5aa173,_0x594b02)=>{if(!_0x594b02&&_0x3711ed['get'](_0x6db1fb['name']))return _0x3711ed['get'](_0x6db1fb['name'])['detach'](),void _0x3711ed['delete'](_0x6db1fb['name']);const _0x1325eb=_0x6db1fb['name']['split'](':')[0x2];if(_0x1325eb===_0x3b98f0['mySessionId'])return;const _0x49bbec='user:position:'+_0x1325eb;_0x3c0637['markers']['has'](_0x49bbec)&&_0x43f538['editing']['reconvertMarker'](_0x49bbec),_0x6db1fb['on']('change:range',(_0x44b8d2,_0x11616a,_0x510d04)=>{if('$graveyard'!=_0x11616a['root']['rootName']&&'$graveyard'==_0x6db1fb['getRange']()['root']['rootName']&&!_0x3711ed['has'](_0x6db1fb['name'])){const _0x14d3fb=_0x3c0637['schema']['getNearestSelectionRange'](_0x510d04['deletionPosition']);if(_0x14d3fb){const _0x10a46e=at['fromRange'](_0x14d3fb);_0x3711ed['set'](_0x6db1fb['name'],_0x10a46e),_0x10a46e['on']('change:range',(_0x23d6ee,_0x367471,_0x58c914)=>{if('$graveyard'==_0x10a46e['root']['rootName']){const _0xefff57=_0x3c0637['schema']['getNearestSelectionRange'](_0x58c914['deletionPosition']);_0xefff57?(_0x10a46e['start']=_0xefff57['start'],_0x10a46e['end']=_0xefff57['end']):(_0x3711ed['delete'](_0x6db1fb['name']),_0x10a46e['detach']());}});}}});}),_0x3c0637['document']['on']('change',()=>{_0x3711ed['size']>0x0&&_0x3c0637['enqueueChange']({'isUndoable':!0x1},_0x243f7b=>{for(const [_0x37bdad,_0x56f0c0]of _0x3711ed)'$graveyard'==_0x3c0637['markers']['get'](_0x37bdad)['getRange']()['root']['rootName']&&(te(_0x37bdad['split'](':')[0x2],_0x56f0c0['toRange'](),_0x3c0637,_0x243f7b),_0x56f0c0['detach']());_0x3711ed['clear']();});});}(_0x18039a),this['_domEmitter']['listenTo'](_0x2b65ef['document'],'keydown',(_0xeba6cf,{key:_0x39b520})=>{'Escape'===_0x39b520&&function(_0x5f317a){_0x5f317a['editing']['view']['change'](_0xbd4532=>{for(const _0x4801c0 of _0x5f317a['model']['markers']){if(!_0x4801c0['name']['startsWith']('user:position'))continue;const _0x14e949=_0x5f317a['editing']['mapper']['markerNameToElements'](_0x4801c0['name']);if(_0x14e949){for(const _0x1127bc of _0x14e949)_0xbd4532['removeClass']('ck-user__marker_hovered',_0x1127bc);}}});}(_0x18039a);},{'useCapture':!0x0});}['afterInit'](){const _0x2ff53a=this['editor'],_0x379db3=_0x2ff53a['commands']['get']('undo');_0x379db3&&_0x2ff53a['model']['on']('applyOperation',(_0xdec23a,_0x221e88)=>{const _0x1c237b=_0x221e88[0x0];if('marker'!=_0x1c237b['type']||!_0x1c237b['name']['startsWith']('user:'))return;const _0x42cf1e=_0x1c237b['batch'];_0x379db3['_createdBatches']['has'](_0x42cf1e)&&(_0x1c237b['newRange']=_0x1c237b['oldRange']?_0x2ff53a['model']['createRange'](_0x1c237b['oldRange']['start'],_0x1c237b['oldRange']['end']):null);},{'priority':'highest'});}['destroy'](){return this['_domEmitter']['stopListening'](),super['destroy']();}['createUserMarkerOperations'](){const _0x487199=this['editor'],_0x5f4630=_0x487199['model']['document'],_0x7b78d=_0x487199['plugins']['get'](i);_0x487199['model']['enqueueChange']({'isUndoable':!0x1},_0x1978e0=>{const _0x1a81ac='user:range:'+_0x7b78d['mySessionId'],_0x3db953='user:position:'+_0x7b78d['mySessionId'],_0x1014b8=_0x487199['model']['markers']['has'](_0x1a81ac);_0x487199['editing']['view']['hasDomSelection']?te(_0x7b78d['mySessionId'],_0x5f4630['selection']['getFirstRange'](),_0x487199['model'],_0x1978e0):_0x1014b8&&(_0x1978e0['removeMarker'](_0x1a81ac),_0x1978e0['removeMarker'](_0x3db953));});}}function te(_0x1154a1,_0x3ace7f,_0x5e485f,_0x2f8eed){const _0x290ee0='user:range:'+_0x1154a1,_0x4addca='user:position:'+_0x1154a1,_0x1e91fd=_0x3ace7f['getContainedElement']();let _0x53d525=_0x3ace7f['start'];_0x1e91fd&&_0x1e91fd['is']('element','tableCell')&&(_0x53d525=function(_0x453e27,_0xc20127){for(const _0x1a51b9 of _0x453e27['getPositions']())if(_0xc20127['schema']['checkChild'](_0x1a51b9,'$text'))return _0x1a51b9;}(_0x3ace7f,_0x5e485f),_0x3ace7f=_0x2f8eed['createRange'](_0x53d525));const _0x5a132a=_0x2f8eed['createRange'](_0x53d525);_0x5e485f['markers']['has'](_0x290ee0)?(_0x2f8eed['updateMarker'](_0x290ee0,{'range':_0x3ace7f}),_0x2f8eed['updateMarker'](_0x4addca,{'range':_0x5a132a})):(_0x2f8eed['addMarker'](_0x290ee0,{'range':_0x3ace7f,'usingOperation':!0x0}),_0x2f8eed['addMarker'](_0x4addca,{'range':_0x5a132a,'usingOperation':!0x0}));}function J(_0x49ec3d,_0x2d7be3,_0x4dc351){const _0x40ca98=_0x49ec3d['t'],t=_0x49ec3d['t'];switch(_0x2d7be3){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 _0x40ca98({'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'},_0x4dc351);default:return'';}}let Y=0x1;class l extends _0x3cb587{static ['CollaborativeEditingService']=/* #__PURE__ -- @preserve */
25
- ((()=>_0x6f83bd)());['_offset'];['sessionId'];['serverHistory'];['_channelId'];['_service'];['_document'];['_compressor'];['_bufferedOperations'];['_knownOperations'];['_knownRootNames'];['_pendingAction'];['_hasSelectionChanged'];['_sendBufferedOperationsDelayId'];['_baseBufferDelay'];['_currentBufferDelay'];['_lastSyncedOperationId'];['_disconnectionOperations'];['_operationIdentifier'];static get['requires'](){return[c,i,K,_0x1b40c8,_0x6b6ce4,_0x7ec224];}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 _0x904864=this['serverHistory']['getOperations']();for(let _0x3ae7d7=_0x904864['length']-0x1;_0x3ae7d7>=0x0;_0x3ae7d7--){const _0xb78ba1=_0x904864[_0x3ae7d7];if(!this['_disconnectionOperations']['has'](_0xb78ba1))return _0xb78ba1['baseVersion']+0x1-this['_offset'];}return 0x0;}constructor(_0x32a702){if(super(_0x32a702),this['_offset']=0x0,this['sessionId']=null,this['serverHistory']=new _0x4f8b44(),this['editor']['config']['define']('collaboration',{}),this['_channelId']=this['editor']['config']['get']('collaboration.channelId'),!this['_channelId'])throw new _0x5cf78e('collaboration-missing-channelid',this);const _0x28c365=_0x32a702['config']['get']('cloudServices.bundleVersion')||nt;this['_service']=new l['CollaborativeEditingService'](_0x28c365,this['_channelId']),this['_document']=this['editor']['model']['document'],this['_compressor']=new _0x1d9279(),this['_bufferedOperations']=[],this['_knownOperations']=new WeakSet(),this['_knownRootNames']=new Set(),this['set']('_isPendingUpdate',!0x1),this['set']('_hasSynchronizationProblem',!0x1),this['_pendingAction']=null,this['_hasSelectionChanged']=!0x1,this['_sendBufferedOperationsDelayId']=null,this['_baseBufferDelay']=0x12c,this['_currentBufferDelay']=this['_baseBufferDelay'],this['_lastSyncedOperationId']=null,this['_disconnectionOperations']=new WeakSet(),this['_operationIdentifier']=new it(this['_disconnectionOperations']);}['init'](){const _0x2b5670=this['editor'],_0x3dc734=_0x2b5670['plugins']['get'](_0x6b6ce4),_0x598bc7=_0x2b5670['plugins']['get'](c);this['listenTo'](_0x3dc734,'getOperationAuthor',(_0x2f1603,_0x20c4fa)=>{const _0x3dde56=_0x20c4fa[0x0];_0x3dde56['_authorId']&&(_0x2f1603['return']=_0x3dc734['getUser'](_0x3dde56['_authorId']),_0x2f1603['stop']()),null===_0x3dde56['_authorId']&&(_0x2f1603['return']=null,_0x2f1603['stop']());},{'priority':'high'}),this['listenTo'](_0x2b5670['model']['document']['selection'],'change:range',(_0x37d680,_0x138059)=>{_0x138059['directChange']&&this['_refreshUserSelectionMarkers']();}),this['listenTo'](_0x2b5670['editing']['view'],'change:hasDomSelection',()=>{this['_refreshUserSelectionMarkers']();}),this['_initThrowingOnDataSet'](),_0x2b5670['model']['on']('applyOperation',(_0x2d7f6b,_0x155244)=>{const _0x154e71=_0x155244[0x0];_0x154e71['isDocumentOperation']&&(this['_saveOperationInBuffer'](_0x154e71),this['_shouldSendUpdate']()&&this['_sendBufferedOperationsDelayed']());}),this['_setUpDataInit'](),this['bind']('_isEditingAllowed')['to'](_0x598bc7,'state',this,'_hasSynchronizationProblem',(_0x1e8990,_0x538b02)=>'connected'===_0x1e8990&&!_0x538b02),this['on']('change:_isEditingAllowed',()=>{this['_isEditingAllowed']?_0x2b5670['disableReadOnlyMode']('rtc-offline'):_0x2b5670['enableReadOnlyMode']('rtc-offline');}),this['_isEditingAllowed']?_0x2b5670['disableReadOnlyMode']('rtc-offline'):_0x2b5670['enableReadOnlyMode']('rtc-offline'),this['set']('_isConnected',!0x1);}async['reconnect'](){const _0x495d5e=this['editor']['plugins']['get'](i),_0x167bda=this['editor']['plugins']['get'](c);try{this['_isPendingUpdate']=!0x0,_0x495d5e['unregister'](this['_channelId']);const _0x3cdb00=await this['_service']['reconnect'](_0x167bda['connection'],this['lastSyncVersion']);await this['_handleReconnectionResponse'](_0x3cdb00)&&(this['_isPendingUpdate']=!0x1,this['_clearPendingAction']());const _0x4cc4dc=await this['_service']['getConnectedSessions']();_0x495d5e['register'](this['_channelId'],_0x4cc4dc),this['_handleSendingSelectionMarkers'](),this['_isConnected']=!0x0;}catch(_0x3ede67){if(function(_0x281084){return'404'===_0x281084['code'];}(_0x3ede67)&&this['sessionId'])await this['_connectAfterSessionHasBeenFlushed']();else{if(function(_0xa5d7be){return'409'===_0xa5d7be['code'];}(_0x3ede67)){const _0xcc1132=J(this['editor']['locale'],'The\x20document\x20cannot\x20be\x20connected\x20back\x20to\x20the\x20server.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.');this['_handleReconnectionError'](_0xcc1132);}else{if(!(_0x3ede67 instanceof Z))throw _0x3ede67;this['_handleReconnectionError']();}}}}['destroy'](){const _0x479cc2=this['editor']['plugins']['get'](c),_0x1df614=this['editor']['plugins']['get'](i);this['editor']['enableReadOnlyMode']('rtc-destroyed'),_0x1df614['channelSessions']['has'](this['_channelId'])&&_0x1df614['unregister'](this['_channelId']),_0x479cc2['removeFromReconnectionStack'](this),this['_disconnectService'](),super['destroy']();}async['_handleReconnectionResponse'](_0x1b489f){if(this['sessionId']!==_0x1b489f['sessionId']&&this['_lastSyncedOperationId']!==_0x1b489f['lastOperationId'])throw new Z();return this['sessionId']=_0x1b489f['sessionId'],this['_handleServerResponse']([],{..._0x1b489f,'wereChangesApplied':!0x1,'data':_0x1b489f['data']},'reconnect');}async['_connectService'](_0x34abd9,_0x46c19b=!0x1){const {connection:_0x1e1d47}=this['editor']['plugins']['get'](c);l['CollaborativeEditingService']['getConnectedSessions'](_0x1e1d47,this['_channelId'])['then'](_0x4c95cd=>this['_initSessionsHandling'](_0x4c95cd))['catch'](_0x197a4f=>{this['_crash']('realtimecollaborationclient-init-session-connection-error',_0x197a4f);}),this['listenTo'](this['_service'],'operationsReceived',this['_handleReceivedOperations']['bind'](this)),this['listenTo'](this['_service'],'error',(_0x453ed2,_0x599a65)=>{this['_crash']('realtimecollaborationclient-initservice-internal-error',_0x599a65);}),this['listenTo'](this['_service'],'disconnected',()=>{this['_isConnected']=!0x1;});const _0x443f86=this['_operationIdentifier']['getIdOfTheLastOperation'](_0x34abd9);this['_isPendingUpdate']=!0x0;const _0x2717e1=await this['_service']['connect'](_0x1e1d47,this['_compressOperations'](_0x34abd9),_0x443f86);if(this['sessionId']=_0x2717e1['sessionId'],_0x46c19b){if(!_0x2717e1['wereChangesApplied'])return void this['_handleReconnectionError']();this['_isPendingUpdate']=!0x1,this['_clearPendingAction'](),this['serverHistory']['reset'](),this['_offset']=_0x2717e1['offset'],this['serverHistory']['version']=this['_offset'],await this['_handleServerResponse'](_0x34abd9,_0x2717e1,'reconnection:\x20flushed\x20session');}else await this['_handleInitialConnectionData'](_0x2717e1,_0x34abd9);this['_handleSendingSelectionMarkers'](),this['_isConnected']=!0x0;}['_handleSendingSelectionMarkers'](){const _0x47211f=this['editor']['plugins']['get'](i),_0x21bd48=this['editor']['plugins']['get'](K),_0x4124c1=_0x47211f['channelSessions']['get'](this['_channelId']);_0x4124c1&&_0x4124c1['length']>0x1?_0x21bd48['createUserMarkerOperations']():this['listenTo'](_0x47211f,'sessionAdd:'+this['_channelId'],()=>{0x2===_0x47211f['channelSessions']['get'](this['_channelId'])['length']&&_0x21bd48['createUserMarkerOperations']();});}async['_handleReceivedOperations'](_0x5428f3,_0x317929,_0x44ebbe,_0x339f73){if(!this['_isPendingUpdate']&&this['_document']['version']==_0x317929){const _0x4425f1=this['_decompressOperations'](_0x44ebbe,_0x339f73);await this['_fetchMissingUsers'](_0x4425f1),this['_handleExternalOperations'](_0x4425f1,_0x317929,_0x44ebbe['lastOperationId'])||this['_crash']('realtimecollaborationclient-initservice-incorrect-server-operation');}}async['_connectAfterSessionHasBeenFlushed'](){this['_disconnectService']();const {locale:_0x3c4d38}=this['editor'];let _0x19f012;try{_0x19f012=await this['_service']['getDocumentDetails']();}catch(_0xbf3869){const _0x3bc255=J(_0x3c4d38,'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'](_0x3bc255);}const _0x14f808=_0x19f012['currentDocumentSession']||_0x19f012['lastDocumentSession'];if(this['_lastSyncedOperationId']===_0x14f808['lastOperationId'])await this['_connectService'](this['editor']['model']['document']['history']['getOperations'](),!0x0);else{const _0x3bfae8=J(_0x3c4d38,'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'](_0x3bfae8);}}['_disconnectService'](){this['_service']['disconnect'](),this['_bufferedOperations']=[],clearTimeout(this['_sendBufferedOperationsDelayId']),this['stopListening'](this['_service']);}['_initSessionsHandling'](_0x18a21a){const _0x2ff531=this['editor']['plugins']['get'](i);this['listenTo'](_0x2ff531,'sessionAdd:'+this['_channelId'],(_0x36e5e4,{session:_0x5b7b81})=>{if(_0x5b7b81['id']===_0x2ff531['mySessionId']){_0x36e5e4['off']();const _0x16bea6=this['editor']['plugins']['has']('CommentsOnly')&&this['editor']['plugins']['get']('CommentsOnly');let _0x16e5b3=_0x5b7b81['permissions'];_0x16bea6&&_0x16bea6['isEnabled']&&(_0x16e5b3=_0x16e5b3['filter'](_0x18ae40=>'document:write'!==_0x18ae40)),this['editor']['plugins']['get']('Permissions')['setPermissions'](_0x16e5b3,this['_channelId']);}}),_0x2ff531['register'](this['_channelId'],_0x18a21a);}['_initThrowingOnDataSet'](){const _0x524291=this['editor']['data']['set'];this['editor']['data']['set']=(..._0x3e2cf0)=>{if(!_0x3e2cf0[_0x3e2cf0['length']-0x1]['suppressErrorInCollaboration'])throw new _0x5cf78e('realtimecollaborationclient-editor-setdata-and-editor-data-set-are-forbidden-in-real-time-collaboration',this);_0x524291['apply'](this['editor']['data'],_0x3e2cf0);};}['_setUpDataInit'](){this['editor']['data']['on']('init',(_0x2008d4,[_0x4b716b])=>{if(this['_document']['version'])throw new _0x5cf78e('realtimecollaborationclient-init-document-already-initialized',this);_0x2008d4['stop'](),this['_setPendingAction']();const _0x590f42=this['editor']['config']['get']('rootsAttributes'),_0x4ecc93=this['_getOperationsFromInitData'](_0x4b716b,_0x590f42);0x0==_0x4ecc93['length']&&_0x4ecc93['push'](new _0x30d268(0x0)),_0x2008d4['return']=this['_connectService'](_0x4ecc93)['then'](()=>{this['editor']['plugins']['get'](c)['addToReconnectionStack'](this),this['editor']['data']['fire']('ready');})['catch'](_0x34fb41=>this['_crash']('realtimecollaborationclient-init-connection-failed',_0x34fb41))['finally'](()=>this['_clearPendingAction']());},{'priority':'high'}),this['editor']['on']('loadRoot',async(_0x3231b0,[_0x1b13db,_0x11f846])=>{_0x3231b0['stop']();const _0x2e969e=this['editor']['model']['document']['getRoot'](_0x1b13db);if(!this['_knownRootNames']['has'](_0x1b13db)){const _0x2046aa=_0x11f846&&_0x11f846['data']?_0x11f846['data']:'',_0x480908=_0x11f846&&_0x11f846['attributes']?_0x11f846['attributes']:{};await this['_loadRoot'](_0x1b13db,_0x2046aa,_0x480908);}this['editor']['model']['enqueueChange']({'isUndoable':!0x1},()=>{_0x2e969e['_isLoaded']=!0x0,this['editor']['model']['document']['differ']['_bufferRootLoad'](_0x2e969e);});},{'priority':'high'});}async['_fetchMissingUsers'](_0x5bd8dc){const _0x5389f7=this['editor']['plugins']['get'](_0x6b6ce4),{connection:_0x16124b}=this['editor']['plugins']['get'](c),_0x32cb93=new Set();for(const _0x4ab0bc of _0x5bd8dc){const _0x1dca73=_0x4ab0bc['_authorId'];_0x1dca73&&!_0x5389f7['getUser'](_0x1dca73)&&_0x32cb93['add'](_0x1dca73);}if(0x0===_0x32cb93['size'])return;const _0xf07290=await lt['getMany'](_0x16124b,Array['from'](_0x32cb93));for(const _0x4ae79e of _0xf07290)_0x5389f7['getUser'](_0x4ae79e['id'])||_0x5389f7['addUser'](_0x4ae79e);}['_getOperationsFromInitData'](_0x181933,_0x1140a3={}){const _0x32cea4=this['editor']['model'],_0x477325=[];let _0x22428f=0x0;const _0x10063f='string'==typeof _0x181933?{'main':_0x181933}:_0x181933;for(const _0xae477d of Object['keys'](_0x10063f)){if(!this['_document']['roots']['has'](_0xae477d))throw new _0x5cf78e('realtimecollaborationclient-init-non-existent-root',this);const _0x23ef7a=this['editor']['data']['parse'](_0x10063f[_0xae477d]),_0x333719=this['_document']['getRoot'](_0xae477d),_0x11edb9=new _0x129f73(_0x32cea4['createPositionAt'](_0x333719,0x0),_0x23ef7a,_0x22428f++);_0x477325['push'](_0x11edb9);for(const [_0x67ccbb,_0x1c2018]of _0x23ef7a['markers']){const _0x36ec19=_0x32cea4['createRange'](_0x32cea4['createPositionFromPath'](_0x333719,_0x1c2018['start']['path']['slice']()),_0x32cea4['createPositionFromPath'](_0x333719,_0x1c2018['end']['path']['slice']())),_0x1e4df8=new _0x3817e5(_0x67ccbb,null,_0x36ec19,_0x32cea4['markers'],!0x0,_0x22428f++);_0x477325['push'](_0x1e4df8);}}if(_0x1140a3)for(const [_0x1ffc56,_0x5da6f3]of Object['entries'](_0x1140a3)){const _0x2f4151=_0x32cea4['document']['getRoot'](_0x1ffc56);if(!_0x2f4151)throw new _0x5cf78e('multi-root-editor-root-attributes-no-root',null);for(const [_0x4e5d58,_0x201d8e]of Object['entries'](_0x5da6f3))if(null!==_0x201d8e){const _0x5b62fb=new _0x706758(_0x2f4151,_0x4e5d58,null,_0x201d8e,_0x22428f++);_0x477325['push'](_0x5b62fb);}}return _0x477325;}async['_loadRoot'](_0x58b5fc,_0x2ca0e5,_0x1b8401){this['_getOperationsFromInitData']({[_0x58b5fc]:_0x2ca0e5},{[_0x58b5fc]:_0x1b8401})['forEach']((_0x21d5e8,_0x328b07)=>{_0x21d5e8['baseVersion']=this['_document']['version']+_0x328b07,_0x21d5e8['_isInit']=!0x0,this['_saveOperationInBuffer'](_0x21d5e8);}),this['_sendBufferedOperationsDelayed'](),await this['_waitUntilSynced']();}async['_handleInitialConnectionData'](_0x5324a5,_0x42a115){let _0xb63bdd;this['_offset']=_0x5324a5['offset'];const _0x4c74ef=_0x5324a5['wereChangesApplied']&&!_0x5324a5['initData'],_0x3b0ef3=_0x4c74ef?0x0:_0x5324a5['data']['baseVersion'];if(_0x42a115['forEach'](_0x3ba279=>{_0x3ba279['_isInit']=!0x0,_0x3ba279['createdAt']=_0x5324a5['sessionCreatedAt'],_0x3ba279['_authorId']=null;}),_0x4c74ef)_0xb63bdd=_0x42a115,this['_applyOperationsSet'](_0xb63bdd,_0x4c74ef);else{if(_0x5324a5['initData']){const _0x11a473=this['_getOperationsFromInitData'](_0x5324a5['initData']);this['_document']['history']['version']=-_0x11a473['length'],_0x11a473['forEach'](_0x20b5bc=>{_0x20b5bc['baseVersion']-=_0x11a473['length'],_0x20b5bc['createdAt']=_0x5324a5['sessionCreatedAt'],_0x20b5bc['_isInit']=!0x0,_0x20b5bc['_authorId']=null;}),this['_applyOperationsSet'](_0x11a473,!0x0),this['serverHistory']['version']=-_0x11a473['length']+this['_offset'],this['_updateServerHistory'](_0x11a473);}this['_document']['history']['version']=_0x3b0ef3,_0xb63bdd=this['_decompressOperations'](_0x5324a5['data'],_0x5324a5['metadata']),await this['_fetchMissingUsers'](_0xb63bdd),this['_applyOperationsSet'](_0xb63bdd,_0x4c74ef);}_0x5324a5['lastOperationId']&&(this['_operationIdentifier']['setIdForTheLastOperation'](_0xb63bdd,_0x5324a5['lastOperationId']),this['_lastSyncedOperationId']=_0x5324a5['lastOperationId']),this['serverHistory']['version']=_0x3b0ef3+this['_offset'],this['_updateServerHistory'](_0xb63bdd),_0x42a115['filter'](_0x4ad072=>{const _0x2de7e8=this['_getAffectedRoot'](_0x4ad072);return _0x2de7e8&&!this['_knownRootNames']['has'](_0x2de7e8);})['forEach']((_0x40d009,_0x35f8fc)=>{_0x40d009['baseVersion']=this['_document']['version']+_0x35f8fc,this['_saveOperationInBuffer'](_0x40d009);}),this['_shouldSendUpdate']()?(this['_currentBufferDelay']=0x0,this['_sendBufferedOperationsDelayed'](!0x0),await this['_waitUntilSynced']()):(this['_isPendingUpdate']=!0x1,this['_clearPendingAction']());}['_crash'](_0x5f3b67,_0x4be97e){throw this['_isPendingUpdate']=!0x0,_0x4be97e&&console['error'](_0x4be97e),new _0x5cf78e(_0x5f3b67,this['editor']);}['_saveOperationInBuffer'](_0x17e20f){this['_knownOperations']['has'](_0x17e20f)||(this['_knownOperations']['add'](_0x17e20f),this['_bufferedOperations']['push'](_0x17e20f),this['_pendingAction']||'marker'==_0x17e20f['type']&&!_0x17e20f['affectsData']||this['_setPendingAction']());}['_sendBufferedOperationsDelayed'](_0x1faf60=!0x1){!_0x1faf60&&this['_isPendingUpdate']||(this['_isPendingUpdate']=!0x0,clearTimeout(this['_sendBufferedOperationsDelayId']),this['_sendBufferedOperationsDelayId']=setTimeout(()=>{this['_sendBufferedOperations']()['then'](_0x440083=>{_0x440083&&(this['_clearPendingAction'](),this['_isPendingUpdate']=!0x1);})['catch'](_0x5ff357=>{if(this['_clearPendingAction'](),this['_isPendingUpdate']=!0x1,!function(_0x17c315){return _0x17c315['message']['startsWith']('cloud-services-internal-error:\x20Not\x20connected.')||_0x17c315['message']['startsWith']('cloud-services-internal-error:\x20Collaborative\x20Editing\x20Service\x20is\x20not\x20connected.')||_0x17c315['message']['startsWith']('cloud-services-internal-error:\x20Request\x20timeout.');}(_0x5ff357))throw _0x5ff357;});},this['_currentBufferDelay']));}['_waitUntilSynced'](){return new Promise(_0x592db6=>{this['on']('change:_isPendingUpdate',()=>{_0x592db6();});});}async['_sendBufferedOperations'](){const _0x33a926=this['editor']['plugins']['get'](K);if(this['_shouldSendSelectionUpdate']()&&(_0x33a926['createUserMarkerOperations'](),this['_hasSelectionChanged']=!0x1),!this['_shouldSendUpdate']())return!0x0;const _0x103098=[...this['_bufferedOperations']];for(const _0x4a1358 of _0x103098)_0x4a1358['wasUndone']=this['_document']['history']['isUndoneOperation'](_0x4a1358);const _0x182bba=this['_operationIdentifier']['getIdOfTheLastOperation'](_0x103098),_0x1263ae=Y++,_0x522d9e=this['_compressOperations'](_0x103098),_0x4699fa=await this['_service']['sendOperations'](_0x522d9e,_0x522d9e['baseVersion'],_0x182bba);try{return await this['_handleServerResponse'](_0x103098,_0x4699fa,_0x1263ae);}catch(_0x34659b){return this['_crash']('realtimecollaborationclient-sendbufferedoperations',_0x34659b);}}async['_handleServerResponse'](_0x37978f,_0xf2e4dc,_0x4fc21e){if('error'in _0xf2e4dc)throw _0xf2e4dc['error'];let _0xf2a631=!0x1;if(_0xf2e4dc['wereChangesApplied']){_0xf2e4dc['lastOperationId']&&(this['_lastSyncedOperationId']=_0xf2e4dc['lastOperationId']),this['_bufferedOperations']=this['_bufferedOperations']['filter'](_0x4e01c1=>!_0x37978f['includes'](_0x4e01c1));for(const _0x40cd00 of _0x37978f)_0x40cd00['createdAt']='lastOperationAcceptedAt'in _0xf2e4dc&&_0xf2e4dc['lastOperationAcceptedAt']||void 0x0;tt(_0x37978f,_0xf2e4dc['version']-_0x37978f['length']),this['_updateServerHistory'](_0x37978f);const _0x4ccf5d=_0x37978f['filter'](_0x6c66e3=>{if(!_0x6c66e3['_isInit'])return!0x1;const _0x586290=this['_getAffectedRoot'](_0x6c66e3);return _0x586290&&!this['_knownRootNames']['has'](_0x586290);});tt(_0x4ccf5d,this['_document']['version']),this['_applyOperationsSet'](_0x4ccf5d),_0xf2a631=!0x0,this['_currentBufferDelay']=this['_baseBufferDelay'];}else{const _0x29a5a2=this['_decompressOperations'](_0xf2e4dc['data'],_0xf2e4dc['metadata'])['filter'](_0x59c42a=>_0x59c42a['baseVersion']>=this['_lastServerVersion']);_0x29a5a2['forEach'](_0x33b33f=>this['_addKnownRoot'](_0x33b33f)),this['_bufferedOperations']=this['_bufferedOperations']['filter'](_0x312acd=>!_0x312acd['_isInit']||!this['_knownRootNames']['has'](this['_getAffectedRoot'](_0x312acd))),this['_bufferedOperations']['length']&&tt(this['_bufferedOperations'],this['_bufferedOperations'][0x0]['baseVersion']),await this['_fetchMissingUsers'](_0x29a5a2),_0xf2a631=this['_handleExternalOperations'](_0x29a5a2,_0xf2e4dc['version'],_0xf2e4dc['lastOperationId']),this['_currentBufferDelay']=Math['round'](this['_currentBufferDelay']/0x2);}return _0xf2a631?!this['_shouldSendUpdate']()||(this['_sendBufferedOperationsDelayed'](!0x0),!0x1):this['_crash']('realtimecollaborationclient-handleserverresponse');}['_handleExternalOperations'](_0x58b8e2,_0x2079cd,_0xd83b99){try{const _0x177e42={'document':this['_document'],'useRelations':!0x1,'padWithNoOps':!0x0},{operationsA:_0x15cba7,operationsB:_0x342e14,originalOperations:_0x5ea339}=_0x331848(_0x58b8e2,this['_bufferedOperations'],_0x177e42);tt(_0x15cba7,this['_document']['version']),tt(_0x342e14,_0x2079cd);for(const _0x25af09 of _0x15cba7){const _0x18a3da=_0x5ea339['get'](_0x25af09);_0x25af09['_authorId']=_0x18a3da?_0x18a3da['_authorId']:null;}_0xd83b99&&(this['_operationIdentifier']['setIdForTheLastOperation'](_0x58b8e2,_0xd83b99),this['_lastSyncedOperationId']=_0xd83b99),this['_bufferedOperations']=[..._0x342e14],this['_applyOperationsSet'](_0x15cba7),this['_updateServerHistory'](_0x58b8e2);}catch(_0x362e03){return console['error'](_0x362e03),!0x1;}return!0x0;}['_applyOperationsSet'](_0xd412e7,_0x1c8c3=!0x1){this['editor']['model']['enqueueChange']({'isUndoable':!0x1,'isLocal':!0x1},_0x145824=>{for(const _0x559eb0 of _0xd412e7)this['_knownOperations']['add'](_0x559eb0),this['_addKnownRoot'](_0x559eb0),_0x145824['batch']['addOperation'](_0x559eb0),this['editor']['model']['applyOperation'](_0x559eb0);});}['_addKnownRoot'](_0x5b24e8){const _0x190a3c=this['_getAffectedRoot'](_0x5b24e8);_0x190a3c&&this['_knownRootNames']['add'](_0x190a3c);}['_getAffectedRoot'](_0x1b15f7){let _0x21e844,_0x10b8d0;switch(_0x1b15f7['type']){case'insert':_0x21e844=_0x1b15f7['position']['root'];break;case'marker':if(_0x10b8d0=_0x1b15f7['newRange'],!_0x10b8d0)return null;_0x21e844=_0x10b8d0['root'];break;case'addRootAttribute':_0x21e844=_0x1b15f7['root'];break;case'addRoot':_0x21e844=_0x1b15f7['affectedSelectable'];break;case'move':_0x21e844=_0x1b15f7['targetPosition']['root'];break;default:return null;}return _0x21e844['rootName'];}['_updateServerHistory'](_0x9e941d){_0x9e941d['forEach'](_0x3372cb=>{const _0x1ef7a2=_0x3372cb['clone']();_0x1ef7a2['_authorId']=_0x3372cb['_authorId'],_0x1ef7a2['_isInit']=!!_0x3372cb['_isInit'],_0x1ef7a2['createdAt']=_0x3372cb['createdAt'],_0x1ef7a2['baseVersion']+=this['_offset'],_0x3372cb['_isDisconnection']&&this['_disconnectionOperations']['add'](_0x1ef7a2),this['serverHistory']['addOperation'](_0x1ef7a2);});}['_handleReconnectionError'](_0x272556){const _0x3865e1=this['editor']['plugins']['get']('Notification'),_0x55972c=this['editor']['locale'];_0x272556||(_0x272556=J(_0x55972c,'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.')),_0x3865e1['showWarning'](_0x272556,{'title':J(_0x55972c,'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'](_0x1b40c8)['add'](J(this['editor']['locale'],'PENDING_ACTION_SENDING_DATA')));}['_clearPendingAction'](){this['_pendingAction']&&(this['editor']['plugins']['get'](_0x1b40c8)['remove'](this['_pendingAction']),this['_pendingAction']=null);}['_compressOperations'](_0x43aa0e){const _0x1284bb=_0x43aa0e['map'](_0x1eabea=>_0x1eabea['toJSON']());return this['_compressor']['compress'](_0x1284bb);}['_decompressOperations'](_0xb1f0a0,_0x53a5c8){return this['_compressor']['decompress'](_0xb1f0a0)['map']((_0x122ff4,_0x4d6308)=>{const _0x34afc9='init'==_0x53a5c8[_0x4d6308]['type'];if('InsertOperation'==_0x122ff4['__className']){const _0x246112=_0x122ff4['position']['root'];!this['_document']['getRoot'](_0x246112)&&(this['_document']['createRoot']('$root',_0x246112)['_isAttached']=!0x1);}const _0x504642=_0x4b7ac0['fromJSON'](_0x122ff4,this['_document']);return _0x504642['wasUndone']=_0x122ff4['wasUndone'],_0x504642['_isInit']=_0x34afc9,_0x504642['_authorId']=_0x34afc9?null:_0x53a5c8[_0x4d6308]['userId'],_0x504642['_isDisconnection']='cs:removeUser'===_0x53a5c8[_0x4d6308]['type'],_0x504642['createdAt']=_0x53a5c8[_0x4d6308]['createdAt'],_0x504642;});}['_refreshUserSelectionMarkers'](){this['_hasSelectionChanged']=!0x0,this['_shouldSendSelectionUpdate']()?this['_sendBufferedOperationsDelayed']():this['_hasSelectionChanged']=!0x1;}['_shouldSendSelectionUpdate'](){const _0x30c9d8=this['editor']['plugins']['get'](i)['channelSessions']['get'](this['_channelId']);return!this['editor']['isReadOnly']&&!!_0x30c9d8&&_0x30c9d8['length']>0x1&&this['_hasSelectionChanged'];}['_shouldSendUpdate'](){return this['_bufferedOperations']['length']>0x0||this['_shouldSendSelectionUpdate']();}}class Z extends Error{}function tt(_0x3e2399,_0x38ae7c){for(const _0x4bff68 of _0x3e2399)_0x4bff68['baseVersion']=_0x38ae7c++;}class it{['_ignoredOperations'];['_operationToId'];constructor(_0x206f7b){this['_ignoredOperations']=_0x206f7b,this['_operationToId']=new WeakMap();}['getIdOfTheLastOperation'](_0x3945ce){let _0x4afb29=_0x3945ce['length'];for(;_0x4afb29--;){const _0x3b47e0=_0x3945ce[_0x4afb29];if(!this['_ignoredOperations']['has'](_0x3b47e0)){if(!this['_operationToId']['has'](_0x3b47e0)){const _0x5b5c20=_0xed2698()['slice'](0x1,0x12);this['_operationToId']['set'](_0x3b47e0,_0x5b5c20);}return this['_operationToId']['get'](_0x3b47e0);}}}['setIdForTheLastOperation'](_0x74b52a,_0x2bf160){if(!_0x2bf160)return;let _0x586392=_0x74b52a['length'];for(;_0x586392--;){const _0x50e40d=_0x74b52a[_0x586392];this['_ignoredOperations']['has'](_0x50e40d)||this['_operationToId']['set'](_0x50e40d,_0x2bf160);}}}class n extends _0x3cb587{static get['requires'](){return[l];}static get['pluginName'](){return'RealTimeCollaborativeEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}class a extends _0x2b8ee9{static ['CommentsService']=/* #__PURE__ -- @preserve */
26
- ((()=>_0x137f3f)());['_services'];static get['requires'](){return[c,'CommentsRepository',i,_0x6b6ce4];}static get['pluginName'](){return'CloudServicesCommentsAdapter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x5bdb88){super(_0x5bdb88),this['_services']=new Map();}async['init'](){const _0x484903=this['context'],_0x4cd917=_0x484903['plugins']['get']('CommentsRepository');if(_0x484903['plugins']['get'](c)['addToReconnectionStack'](this),_0x4cd917['adapter']={'addCommentThread':async({channelId:_0x14beb4,threadId:_0x4a7858,comments:_0xbd4abb,resolvedAt:_0xf29a6b,resolvedBy:_0x1108d2,context:_0xeefe42,attributes:_0x3281a9})=>{const _0xaf6bfc=await this['_getService'](_0x14beb4)['addCommentThread']({'commentThreadId':_0x4a7858,'comments':_0xbd4abb['map'](_0x16b2a7=>function(_0x1df5ef,_0x734c7e,_0x7ef17){return{'commentThreadId':_0x7ef17,'commentId':_0x1df5ef['commentId'],'userId':_0x1df5ef['authorId'],'content':_0x1df5ef['content'],'documentId':_0x734c7e,'createdAt':_0x1df5ef['createdAt'],'attributes':_0x1df5ef['attributes']||{}};}(_0x16b2a7,_0x14beb4,_0x4a7858)),'resolvedAt':_0xf29a6b,'resolvedBy':_0x1108d2,'context':_0xeefe42,'attributes':_0x3281a9})['catch'](dt);return{'threadId':_0xaf6bfc['commentThreadId'],'comments':_0xaf6bfc['comments']};},'getCommentThread':async({channelId:_0x434773,threadId:_0xb1ae72})=>{const _0xbc5377=await this['_getService'](_0x434773)['getCommentThread'](_0xb1ae72)['catch'](dt);return _0xbc5377['deletedAt']?null:(await this['_fetchMissingUsersForThreads']([_0xbc5377]),{'threadId':_0xbc5377['commentThreadId'],'comments':_0xbc5377['comments']['map'](S),'context':_0xbc5377['context'],'resolvedAt':_0xbc5377['resolvedAt'],'resolvedBy':_0xbc5377['resolvedBy'],'attributes':_0xbc5377['attributes']||{}});},'updateCommentThread':async({channelId:_0x37f696,threadId:_0x44e3d8,context:_0x43b144,unlinkedAt:_0x54f79a,attributes:_0x1a0fd0})=>this['_getService'](_0x37f696)['updateCommentThread']({'commentThreadId':_0x44e3d8,'context':_0x43b144,'attributes':_0x1a0fd0,'unlinkedAt':_0x54f79a})['catch'](B)['catch'](dt),'resolveCommentThread':async({channelId:_0x224475,threadId:_0xedeb09})=>{const _0x25c962=await this['_getService'](_0x224475)['resolveCommentThread'](_0xedeb09)['catch'](B)['catch'](dt);return{'threadId':_0x25c962['commentThreadId'],'resolvedAt':_0x25c962['resolvedAt'],'resolvedBy':_0x25c962['resolvedBy']};},'reopenCommentThread':async({channelId:_0x5aad81,threadId:_0xc12dcc})=>this['_getService'](_0x5aad81)['reopenCommentThread'](_0xc12dcc)['catch'](B)['catch'](dt),'removeCommentThread':({channelId:_0x24b1c4,threadId:_0xf219ca})=>this['_getService'](_0x24b1c4)['removeCommentThread'](_0xf219ca)['catch'](B)['catch'](dt),'addComment':({channelId:_0x3ad2cc,threadId:_0x3e8a35,commentId:_0x564cce,content:_0x22d822,attributes:_0x16c68f})=>this['_getService'](_0x3ad2cc)['addComment'](_0x3e8a35,_0x564cce,_0x22d822,_0x16c68f)['catch'](dt),'updateComment':({channelId:_0x49bf69,threadId:_0x3dc68f,commentId:_0x5bb144,content:_0x4e0c72,attributes:_0x20aa8e})=>this['_getService'](_0x49bf69)['updateComment'](_0x3dc68f,_0x5bb144,_0x4e0c72,_0x20aa8e)['catch'](B)['catch'](dt),'removeComment':({channelId:_0x1fdea1,threadId:_0x4da426,commentId:_0x2d07ce})=>this['_getService'](_0x1fdea1)['removeComment'](_0x4da426,_0x2d07ce)['catch'](B)['catch'](dt)},_0x484903 instanceof _0x200362){const _0xfe0d9f=_0x484903['config']['get']('collaboration.channelId'),_0x4b7c25=_0x484903['plugins']['get'](i);await this['_setUpService'](_0xfe0d9f);const _0x2a0669=await this['_services']['get'](_0xfe0d9f)['getConnectedSessions']();this['listenTo'](_0x4b7c25,'sessionAdd:'+_0xfe0d9f,(_0x401216,{session:_0xf8f5d4})=>{_0xf8f5d4['id']===_0x4b7c25['mySessionId']&&(_0x401216['off'](),this['context']['plugins']['get']('Permissions')['setPermissions'](_0xf8f5d4['permissions'],_0xfe0d9f));}),_0x4b7c25['register'](_0xfe0d9f,_0x2a0669);}}async['_setUpService'](_0x39c75c){if(this['_services']['has'](_0x39c75c))throw new _0x5cf78e('cloudservicescommentsadapter-connect-already-connected',null,{'channelId':_0x39c75c});const _0x331582=this['context']['plugins']['get']('CommentsRepository'),_0x3cb996=new a['CommentsService'](_0x39c75c);this['_services']['set'](_0x39c75c,_0x3cb996),this['listenTo'](_0x3cb996,'commentThreadAdded',(_0x3202e3,_0x3a252a)=>{const {commentThreadId:_0x29420c,documentId:_0x2eeb33,context:_0x5dd754,attributes:_0x4ec832,resolvedAt:_0x5c24f0,resolvedBy:_0x31419b,comments:_0x5d3736}=_0x3a252a;_0x331582['getCommentThread'](_0x29420c)||_0x331582['addCommentThread']({'threadId':_0x29420c,'channelId':_0x2eeb33,'comments':_0x5d3736?_0x5d3736['map'](S):[],'context':_0x5dd754,'attributes':_0x4ec832,'resolvedAt':_0x5c24f0,'resolvedBy':_0x31419b,'isFromAdapter':!0x0});}),this['listenTo'](_0x3cb996,'commentThreadUpdated',(_0x3ad48a,{commentThreadId:_0x49d7f5,documentId:_0x5239c6,context:_0xe13c7,unlinkedAt:_0x5445dc,attributes:_0x23175b})=>{_0x331582['getCommentThread'](_0x49d7f5)&&_0x331582['updateCommentThread']({'threadId':_0x49d7f5,'channelId':_0x5239c6,'context':_0xe13c7,'unlinkedAt':_0x5445dc,'attributes':_0x23175b,'isFromAdapter':!0x0});}),this['listenTo'](_0x3cb996,'commentThreadResolved',(_0x543ccf,{commentThreadId:_0x1cb156,resolvedBy:_0x4f9017,resolvedAt:_0x1c9de1})=>{const _0x548e27=_0x331582['getCommentThread'](_0x1cb156);_0x548e27&&_0x548e27['resolve']({'resolvedBy':_0x4f9017,'resolvedAt':_0x1c9de1,'isFromAdapter':!0x0});}),this['listenTo'](_0x3cb996,'commentThreadReopened',(_0x46c3c3,{commentThreadId:_0x34c98f})=>{const _0x4d04f0=_0x331582['getCommentThread'](_0x34c98f);_0x4d04f0&&_0x4d04f0['reopen']({'isFromAdapter':!0x0});}),this['listenTo'](_0x3cb996,'commentThreadRemoved',(_0x4dd792,{commentThreadId:_0x19c7db})=>{const _0x58154d=_0x331582['getCommentThread'](_0x19c7db);_0x58154d&&_0x58154d['remove']({'isFromAdapter':!0x0});}),this['listenTo'](_0x3cb996,'commentAdded',(_0x211711,_0x24f350)=>{const _0x99f80a=_0x24f350['commentThreadId'],_0x527e0c=_0x331582['getCommentThread'](_0x99f80a);_0x527e0c&&_0x527e0c['addComment']({...S(_0x24f350),'isFromAdapter':!0x0});}),this['listenTo'](_0x3cb996,'commentUpdated',(_0x223b2f,{commentThreadId:_0x3448ae,commentId:_0x268932,content:_0x50777f,attributes:_0x4d907f})=>{const _0x445b87=_0x331582['getCommentThread'](_0x3448ae);if(_0x445b87){const _0x5a0ace=_0x445b87['getComment'](_0x268932);_0x5a0ace&&_0x5a0ace['update']({'content':_0x50777f,'attributes':_0x4d907f,'isFromAdapter':!0x0});}}),this['listenTo'](_0x3cb996,'commentRemoved',(_0x145a0f,{commentThreadId:_0x162929,commentId:_0x2ea5be})=>{const _0x343729=_0x331582['getCommentThread'](_0x162929);if(_0x343729){const _0x2fe019=_0x343729['getComment'](_0x2ea5be);_0x2fe019&&_0x2fe019['remove']({'isFromAdapter':!0x0});}}),await this['_connectService'](_0x39c75c);}['destroy'](){if(this['context']instanceof _0x200362){const _0x4a71d5=this['context']['config']['get']('collaboration.channelId');this['_terminateService'](_0x4a71d5);}}['_terminateService'](_0x184def){if(!this['_services']['has'](_0x184def))throw new _0x5cf78e('cloudservicescommentsadapter-disconnect-not-exist',null,{'channelId':_0x184def});this['_getService'](_0x184def)['disconnect'](),this['_services']['delete'](_0x184def);}async['reconnect'](){for(const _0x4018e1 of this['_services']['keys']())await this['_connectService'](_0x4018e1);if(this['context']instanceof _0x200362){const _0x1e5c1e=this['context']['config']['get']('collaboration.channelId'),_0x4510db=this['context']['plugins']['get'](i);_0x4510db['unregister'](_0x1e5c1e);const _0x115cb9=await this['_services']['get'](_0x1e5c1e)['getConnectedSessions']();_0x4510db['register'](_0x1e5c1e,_0x115cb9);}}async['_connectService'](_0x2224f9){const {connection:_0x5a3ede}=this['context']['plugins']['get'](c),_0x28398e=this['context']['plugins']['get']('CommentsRepository'),_0x59b4b1=this['_services']['get'](_0x2224f9),_0x162590=await _0x59b4b1['connect'](_0x5a3ede);await this['_fetchMissingUsersForThreads'](_0x162590);const _0x5d4e84=new Set(Array['from'](_0x28398e['getCommentThreads']({'channelId':_0x2224f9}),_0x1002ad=>_0x1002ad['id']));for(const _0x14a4d2 of _0x162590)_0x14a4d2['deletedAt']||_0x5d4e84['delete'](_0x14a4d2['commentThreadId']);for(const _0x17fb25 of _0x5d4e84)_0x28398e['getCommentThread'](_0x17fb25)['remove']({'isFromAdapter':!0x0});for(const _0x2d7a0e of _0x162590){let _0x464aa6=_0x28398e['getCommentThread'](_0x2d7a0e['commentThreadId']);const {commentThreadId:_0x25872d,context:_0x4dadbe,attributes:_0x732026,resolvedBy:_0xb9e967,resolvedAt:_0x56bef9,unlinkedAt:_0x7e5e3e,deletedAt:_0x5ce576}=_0x2d7a0e;if(_0x5ce576)continue;_0x464aa6||(_0x464aa6=_0x28398e['addCommentThread']({'channelId':_0x2224f9,'threadId':_0x25872d,'context':_0x4dadbe,'attributes':_0x732026||{},'resolvedBy':_0xb9e967,'resolvedAt':_0x56bef9,'unlinkedAt':_0x7e5e3e,'isFromAdapter':!0x0}));const _0x13e61d=new Set(Array['from'](_0x464aa6['comments'],_0x328175=>_0x328175['id']));for(const _0x4f96b1 of _0x2d7a0e['comments'])_0x13e61d['delete'](_0x4f96b1['commentId']);for(const _0x352463 of _0x13e61d)_0x464aa6['getComment'](_0x352463)['remove']({'isFromAdapter':!0x0});for(const _0x33e136 of _0x2d7a0e['comments']){const _0x257e33=_0x464aa6['getComment'](_0x33e136['commentId']);_0x257e33?_0x257e33['content']!==_0x33e136['content']&&_0x257e33['update']({'content':_0x33e136['content'],'isFromAdapter':!0x0}):_0x464aa6['addComment'](Object['assign'](S(_0x33e136),{'isFromAdapter':!0x0}));}}}['_getService'](_0x35acaf){if(!this['_services']['has'](_0x35acaf))throw new _0x5cf78e('cloudservicescommentsadapter-service-not-exist',null,{'channelId':_0x35acaf});return this['_services']['get'](_0x35acaf);}async['_fetchMissingUsersForThreads'](_0x137845){const _0x1b7345=this['context']['plugins']['get'](_0x6b6ce4),{connection:_0x242082}=this['context']['plugins']['get'](c),_0x5a8415=new Set();for(const {resolvedBy:_0x3df208,comments:_0x15c2a0}of _0x137845){_0x3df208&&!_0x1b7345['getUser'](_0x3df208)&&_0x5a8415['add'](_0x3df208);for(const {userId:_0x41f220}of _0x15c2a0)_0x1b7345['getUser'](_0x41f220)||_0x5a8415['add'](_0x41f220);}if(0x0===_0x5a8415['size'])return;const _0x3f1832=await lt['getMany'](_0x242082,Array['from'](_0x5a8415));for(const _0x4300bd of _0x3f1832)_0x1b7345['getUser'](_0x4300bd['id'])||_0x1b7345['addUser'](_0x4300bd);}}async function B(_0x332a19){if('404'!==_0x332a19['code'])throw _0x332a19;}function dt(_0x5407db){if((_0x1b1860=_0x5407db)['message']['startsWith']('cloud-services-internal-error:\x20Comments\x20Service\x20is\x20not\x20connected.')||_0x1b1860['message']['startsWith']('cloud-services-internal-error:\x20Not\x20connected.')||_0x1b1860['message']['startsWith']('cloud-services-internal-error:\x20Request\x20timeout.'))return new Promise(()=>{});var _0x1b1860;throw _0x5407db;}function S(_0x3aeeb7){return{'threadId':_0x3aeeb7['commentThreadId'],'commentId':_0x3aeeb7['commentId'],'content':_0x3aeeb7['content'],'createdAt':_0x3aeeb7['createdAt'],'authorId':_0x3aeeb7['userId'],'attributes':_0x3aeeb7['attributes']||{}};}class f extends _0x3cb587{static ['TrackChangesService']=/* #__PURE__ -- @preserve */
27
- ((()=>st)());['_bufferedRequests'];['_trackChangesService'];static get['requires'](){return[a,'TrackChangesEditing',c];}constructor(_0x1ae424){super(_0x1ae424);const _0x42f19a=this['editor']['config']['get']('collaboration.channelId');this['_bufferedRequests']=new Map(),this['_trackChangesService']=new f['TrackChangesService'](_0x42f19a);}['init'](){const _0x1f7bd5=this['editor']['plugins']['get'](c),_0x1cebc9=this['editor']['plugins']['get']('TrackChangesEditing');return _0x1cebc9['adapter']={'getSuggestion':async _0x5c3054=>{await this['_waitForServiceReady']();const _0x4950c1=await this['_trackChangesService']['get'](_0x5c3054)['catch'](R);return await this['_fetchMissingUsersForThreads']([_0x4950c1]),_0x4950c1;},'addSuggestion':async({id:_0x23ca64,type:_0x4a33aa,data:_0x549d88,originalSuggestionId:_0x551cdd,attributes:_0x49c752})=>{await this['_waitForServiceReady']();const _0x17b660={'id':_0x23ca64,'type':_0x4a33aa,'data':_0x549d88,'originalSuggestionId':_0x551cdd,'attributes':_0x49c752},_0xb3979f=await this['_trackChangesService']['add'](_0x23ca64,_0x4a33aa,_0x549d88,_0x551cdd,_0x49c752)['catch'](_0x506022=>{if(ut(_0x506022))return new Promise(_0x5a421c=>{this['_bufferedRequests']['set'](_0x23ca64,{'resolve':_0x5a421c,'suggestionData':_0x17b660});});throw _0x506022;});return this['_bufferedRequests']['delete'](_0x23ca64),_0xb3979f;},'updateSuggestion':async(_0x370372,_0x404bc1)=>{if(await this['_waitForServiceReady'](),'open'!==_0x404bc1['state'])return this['_trackChangesService']['update'](_0x370372,_0x404bc1)['catch'](R);}},this['listenTo'](this['_trackChangesService'],'suggestionUpdated',(_0x2da477,_0x21accd)=>{_0x1cebc9['hasSuggestion'](_0x21accd['id'])&&(_0x1cebc9['getSuggestion'](_0x21accd['id'])['attributes']=_0x21accd['attributes']);}),this['_trackChangesService']['connect'](_0x1f7bd5['connection'])['then'](_0x54868d=>(_0x1f7bd5['addToReconnectionStack'](this),this['_fetchMissingUsersForThreads'](_0x54868d)['then'](()=>{for(const _0x353aa8 of _0x54868d){_0x1cebc9['addSuggestionData'](_0x353aa8)['_saved']=!0x0;}})));}async['reconnect'](){const _0x26dfd7=this['editor']['plugins']['get']('TrackChangesEditing'),{connection:_0x5f38eb}=this['editor']['plugins']['get'](c),_0x16e2e4=await this['_trackChangesService']['connect'](_0x5f38eb);await this['_fetchMissingUsersForThreads'](_0x16e2e4);for(const {suggestionData:_0x56dcdb,resolve:_0x384eb2}of this['_bufferedRequests']['values']()){let _0x39a207=_0x16e2e4['find'](_0x59dba3=>_0x59dba3['id']===_0x56dcdb['id']);_0x39a207||(_0x39a207=await this['_trackChangesService']['add'](_0x56dcdb['id'],_0x56dcdb['type'],_0x56dcdb['data'],_0x56dcdb['originalSuggestionId'])),_0x384eb2(_0x39a207);}for(const _0x3bf079 of _0x16e2e4)_0x26dfd7['hasSuggestion'](_0x3bf079['id'])||_0x26dfd7['addSuggestionData'](_0x3bf079);}async['_waitForServiceReady'](){this['_trackChangesService']['isConnected']||await new Promise(_0x4aa8b5=>{this['listenTo'](this['_trackChangesService'],'connected',_0xe4d8b9=>{_0xe4d8b9['off'](),_0x4aa8b5();});});}async['_fetchMissingUsersForThreads'](_0x59796d){const _0x2d1db0=this['editor']['plugins']['get'](_0x6b6ce4),{connection:_0x26b032}=this['editor']['plugins']['get'](c),_0x1e2369=new Set();for(const {authorId:_0xac526}of _0x59796d)_0x2d1db0['getUser'](_0xac526)||_0x1e2369['add'](_0xac526);if(0x0===_0x1e2369['size'])return;const _0x5d705c=await lt['getMany'](_0x26b032,Array['from'](_0x1e2369));for(const _0x1944e of _0x5d705c)_0x2d1db0['getUser'](_0x1944e['id'])||_0x2d1db0['addUser'](_0x1944e);}}function R(_0x2ca253){if(ut(_0x2ca253))return new Promise(()=>{});throw _0x2ca253;}function ut(_0x325584){return _0x325584['message']['startsWith']('cloud-services-internal-error:\x20Not\x20connected.')||_0x325584['message']['startsWith']('cloud-services-internal-error:\x20Request\x20timeout.');}class m extends _0x3cb587{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 _0x2b81fb=this['editor']['plugins']['get'](c),_0x2b513f=this['editor']['plugins']['get']('CommentsEditing'),_0x193a6e=this['editor']['plugins']['get'](a);return this['editor']['data']['once']('ready',()=>{this['listenTo'](_0x2b81fb,'change:state',(_0x3a7c22,_0x37fcd3,_0x48828f)=>{_0x2b513f['isThreadsLoadingPaused']='connected'!==_0x48828f;});}),this['listenTo'](_0x2b81fb,'change:state',(_0x5b6fdf,_0x3d9cf4,_0x232640)=>{this['editor']['plugins']['get']('CommentsRepository')['switchReadOnly']('connected'!==_0x232640);}),_0x193a6e['_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 _0x3cb587{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 _0x3cb587{static ['RevisionHistoryService']=/* #__PURE__ -- @preserve */
28
- ((()=>_0x4d6709)());['_lastRequestId'];['_revisionTracker'];['_revisionHistoryService'];['_oldOffset'];static get['requires'](){return[c,l,'RevisionTracker',i,_0x6b6ce4];}constructor(_0x533aea){super(_0x533aea);const _0x468267=this['editor']['config']['get']('collaboration.channelId');this['_lastRequestId']=null,this['_revisionTracker']=this['editor']['plugins']['get']('RevisionTracker'),this['_revisionHistoryService']=new u['RevisionHistoryService'](_0x468267);}async['init'](){const _0x3327be=this['editor']['plugins']['get'](l),_0x499b31=_0x3327be['serverHistory'],_0x4a59c2=this['editor']['plugins']['get'](c);this['_revisionTracker']['setSource']({'history':_0x499b31,'getLatestVersion':()=>this['_getLatestVersion'](),'getCurrentRevisionId':()=>_0x3327be['sessionId']});const _0x1d1eac=this['editor']['config']['get']('cloudServices.bundleVersion')||nt,_0x2a773c=await _0x48174f['isBundleUploaded'](_0x4a59c2['connection'],_0x1d1eac);this['_revisionTracker']['adapter']={'getRevision':async({revisionId:_0x4867f2})=>(await this['_waitForServiceReady'](),await this['_revisionHistoryService']['getRevision'](_0x4867f2)),'updateRevisions':async _0x1ce958=>{await this['_waitForServiceReady']();const _0x1e6c15=this['_revisionTracker']['currentRevision'];if(_0x2a773c&&0x1===_0x1ce958['length']&&_0x1ce958[0x0]['id']===_0x1e6c15['id'])return _0x1ce958;for(const _0x3d824e of _0x1ce958)_0x3d824e['id']===_0x1e6c15['id']&&(_0x3d824e['isEmptyCurrent']=_0x3d824e['fromVersion']===_0x3d824e['toVersion']);return this['_revisionHistoryService']['updateRevisions'](_0x1ce958,this['_lastRequestId'])['then'](_0x1fc3a2=>(this['_lastRequestId']=_0x1fc3a2,_0x1ce958))['catch'](_0x5c9d3c=>{if(P(_0x5c9d3c)||'400'===_0x5c9d3c['code']&&void 0x0!==_0x5c9d3c['data']['wrongRequestId']){for(const _0x3d517d of _0x1ce958){!this['_revisionTracker']['repository']['getRevision'](_0x3d517d['id'])||this['_revisionTracker']['_bufferUpdate'](_0x3d517d['id'],_0x3d517d,!0x1);}if(P(_0x5c9d3c))throw _0x5c9d3c;return _0x1ce958;}throw _0x5c9d3c;});}},this['listenTo'](this['_revisionHistoryService'],'revisionsUpdated',(_0x2d1b0d,{revisionsData:_0x1529c5,requestId:_0x52ecc8})=>{Math['max'](..._0x1529c5['map'](_0x33032e=>_0x33032e['toVersion']))>this['_getLatestVersionFromServerOperations']()-0x1?this['_getLatestVersion']()['then'](()=>{this['_handleRevisionsUpdate'](_0x1529c5,_0x52ecc8);}):this['_handleRevisionsUpdate'](_0x1529c5,_0x52ecc8);});const {revisions:_0x4f0dac,requestId:_0x1eec74}=await this['_revisionHistoryService']['connect'](_0x4a59c2['connection']);_0x4a59c2['addToReconnectionStack'](this),this['_lastRequestId']=_0x1eec74,await this['_fetchMissingUsers'](_0x4f0dac);for(const _0x3dc54b of _0x4f0dac)this['_revisionTracker']['addRevisionData'](_0x3dc54b);this['listenTo'](_0x3327be,'change:_isConnected',(_0x44c65d,_0x296ad8,_0x4d1486)=>{_0x4d1486&&(this['_oldOffset']=_0x3327be['_offset'],_0x44c65d['off']());}),this['_revisionTracker']['bind']('isEnabled')['to'](_0x4a59c2,'state',_0x16d52d=>_0x16d52d===_0x57405a['CONNECTED']);}async['reconnect'](){const _0x139150=this['editor']['plugins']['get'](c),_0x3979e8=this['editor']['plugins']['get'](l),_0x1158de=async()=>{const _0x44043e=this['_revisionTracker']['currentRevision'],_0xdee82f=_0x44043e['id'],_0x3b19f9=_0xdee82f!==_0x3979e8['sessionId'];if(_0x3b19f9){const _0x5e8370=_0x3979e8['_offset']-this['_oldOffset'],_0x161f70=this['_getLatestVersionFromServerOperations']();this['_revisionTracker']['_revisionDataBuilder']['reInit']();if(_0x44043e['toVersion']+_0x5e8370!==_0x161f70){const _0x501299=_0x44043e['fromVersion']+_0x5e8370,_0x1314ae=this['editor']['plugins']['get'](_0x6b6ce4),_0x25d1c6=this['_revisionTracker']['buildRevisionData']({'revision':_0x44043e,'from':_0x501299,'to':_0x161f70});_0x25d1c6['id']=_0x44043e['id'];const _0x39a086=_0x25d1c6['authorsIds']['map'](_0x227d58=>_0x1314ae['getUser'](_0x227d58));_0x44043e['_update']({..._0x25d1c6,'authors':_0x39a086},!0x0),this['_revisionTracker']['_bufferUpdate'](_0x44043e['id'],_0x25d1c6,!0x0);}this['_revisionTracker']['_startingVersion']=_0x161f70,(_0x44043e['toVersion']===_0x44043e['fromVersion']&&!this['_revisionTracker']['_bufferedUpdates']['has'](_0xdee82f)&&this['_revisionTracker']['repository']['_revisions']['remove'](_0xdee82f),this['_revisionTracker']['_createCurrentRevision'](_0x161f70));}const {revisions:_0xa19ee0,requestId:_0x40f098}=await this['_revisionHistoryService']['reconnect'](_0x139150['connection'],this['_lastRequestId']);_0x3b19f9&&_0xa19ee0['length']>0x0?_0x3979e8['_handleReconnectionError']():(await this['_fetchMissingUsers'](_0xa19ee0),this['_handleRevisionsUpdate'](_0xa19ee0,_0x40f098),this['_revisionTracker']['sendBufferedUpdates']());};return _0x3979e8['_isConnected']?_0x1158de():new Promise((_0x3f2795,_0x5a4d63)=>{_0x3979e8['once']('change:_isConnected',()=>{_0x1158de()['then'](_0x3f2795)['catch'](_0x5a4d63);});});}['destroy'](){super['destroy']();}async['_waitForServiceReady'](){this['_revisionHistoryService']['isConnected']||await new Promise(_0x1d4850=>{this['listenTo'](this['_revisionHistoryService'],'connected',_0x205c12=>{_0x205c12['off'](),_0x1d4850();});});}['_getLatestVersionFromServerOperations'](){const _0x4528b9=this['editor']['plugins']['get'](l)['serverHistory']['getOperations']()['reverse']();for(const _0x324bc7 of _0x4528b9)if('marker'!==_0x324bc7['type']||_0x324bc7['affectsData'])return _0x324bc7['baseVersion']+0x1;}['_getLatestVersion'](){const _0x134021=this['editor']['plugins']['get'](l);return new Promise(_0x9c1e62=>{_0x134021['_isPendingUpdate']?_0x134021['once']('change:_isPendingUpdate',()=>{_0x9c1e62(this['_getLatestVersionFromServerOperations']());}):_0x9c1e62(this['_getLatestVersionFromServerOperations']());});}['_handleRevisionsUpdate'](_0x222223,_0x4ea2e5){const _0x50e666=this['_revisionTracker']['repository'];this['_lastRequestId']=_0x4ea2e5;for(const _0x16d501 of _0x222223){const _0x4ae9e1=_0x50e666['getRevision'](_0x16d501['id']);if(_0x4ae9e1){if((_0x16d501['fromVersion']||_0x16d501['toVersion'])&&(_0x16d501['diffData']=null),_0x4ae9e1===this['_revisionTracker']['currentRevision']){const _0x419af5=Math['max'](_0x4ae9e1['toVersion'],_0x16d501['toVersion']),_0x248209=Math['max'](_0x4ae9e1['fromVersion'],_0x16d501['fromVersion']);let _0x3790d2;_0x4ae9e1['toVersion']===_0x16d501['toVersion']&&_0x4ae9e1['fromVersion']===_0x16d501['fromVersion']?(_0x3790d2=!0x0,this['_preventResendingRevisionData'](_0x16d501)):_0x16d501['toVersion']===_0x419af5&&_0x16d501['fromVersion']===_0x248209?_0x3790d2=!0x1:(_0x4ae9e1['toVersion']===_0x419af5&&_0x4ae9e1['fromVersion']===_0x248209||this['_fixRevision']({'revision':_0x4ae9e1,'from':_0x248209,'to':_0x419af5}),_0x3790d2=!0x0),_0x3790d2&&(delete _0x16d501['fromVersion'],delete _0x16d501['toVersion'],delete _0x16d501['diffData'],delete _0x16d501['createdAt'],delete _0x16d501['authorsIds']);}this['_revisionTracker']['setRevisionData'](_0x16d501),this['_preventResendingRevisionData'](_0x16d501);}else this['_revisionTracker']['addRevisionData'](_0x16d501);}const _0x32d42b=_0x50e666['getRevisions']();_0x32d42b['reverse']();for(let _0xfa6b4=0x0;_0xfa6b4<_0x32d42b['length']-0x1;_0xfa6b4++){const _0xa6ec10=_0x32d42b[_0xfa6b4],_0x28c38a=_0x32d42b[_0xfa6b4+0x1];if(_0xa6ec10['fromVersion']<_0x28c38a['toVersion']){const _0xec8f08=_0x28c38a['toVersion'],_0x5e9159=Math['max'](_0xec8f08,_0xa6ec10['toVersion']);this['_fixRevision']({'revision':_0xa6ec10,'from':_0xec8f08,'to':_0x5e9159});}}}['_fixRevision']({revision:_0x59b3d8,from:_0x2509e8,to:_0x450938}={}){const _0x1fbb7f=this['editor']['plugins']['get'](_0x6b6ce4),_0x384bdf=this['_revisionTracker']['buildRevisionData']({'revision':_0x59b3d8,'from':_0x2509e8,'to':_0x450938});_0x384bdf['authors']=_0x384bdf['authorsIds']['map'](_0x292b21=>_0x1fbb7f['getUser'](_0x292b21)),_0x59b3d8['_update'](_0x384bdf);}['_preventResendingRevisionData'](_0x22a16f){const _0xc52a50={};_0xc52a50['id']=_0x22a16f['id'];for(const _0x2c8b39 of Object['keys'](_0x22a16f))'id'!==_0x2c8b39&&(_0xc52a50[_0x2c8b39]=void 0x0);this['_revisionTracker']['_bufferUpdate'](_0xc52a50['id'],_0xc52a50,!0x0);}async['_fetchMissingUsers'](_0xe70f69){const _0x31699d=this['editor']['plugins']['get'](_0x6b6ce4),{connection:_0x49418a}=this['editor']['plugins']['get'](c),_0x28127e=new Set();for(const _0x201ee1 of _0xe70f69){for(const _0x2893f3 of _0x201ee1['authorsIds'])_0x32c29e(_0x2893f3);_0x201ee1['creatorId']&&_0x32c29e(_0x201ee1['creatorId']);}if(0x0===_0x28127e['size'])return;const _0x2cbd40=await lt['getMany'](_0x49418a,Array['from'](_0x28127e));for(const _0x2bc234 of _0x2cbd40)_0x31699d['getUser'](_0x2bc234['id'])||_0x31699d['addUser'](_0x2bc234);function _0x32c29e(_0xa75e3){_0x31699d['getUser'](_0xa75e3)||_0x28127e['add'](_0xa75e3);}}}function P(_0x148ea8){return _0x148ea8['message']['startsWith']('cloud-services-internal-error:\x20Revision\x20History\x20Service\x20is\x20not\x20connected.')||_0x148ea8['message']['startsWith']('cloud-services-internal-error:\x20Not\x20connected.')||_0x148ea8['message']['startsWith']('cloud-services-internal-error:\x20Request\x20timeout.');}class g extends _0x3cb587{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 _0x1ec4e8{constructor(_0x41e35d){super(_0x41e35d);const _0x1fca76=this['bindTemplate'];this['set']('usersCount',0x0),this['set']('isHidden',!0x0),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-presence-list__counter',_0x1fca76['if']('isHidden','ck-presence-list__counter--hidden')]},'children':[{'text':_0x1fca76['to']('usersCount',_0x58b3df=>J(_0x41e35d,'CONNECTED_USERS',_0x58b3df))}]});}}class es extends _0x1ec4e8{['items'];['keystrokes'];constructor(_0x24be28){super(_0x24be28);const _0x2d93d5=this['bindTemplate'];this['items']=this['createCollection'](),this['keystrokes']=new _0x3cfef2(),this['set']({'hasPopup':!0x1,'isExpanded':!0x1}),this['setTemplate']({'tag':'div','attributes':{'aria-haspopup':_0x2d93d5['if']('hasPopup'),'aria-expanded':_0x2d93d5['to']('isExpanded',_0x21d602=>this['hasPopup']&&String(_0x21d602)),'aria-label':_0x2d93d5['to']('hasPopup',_0x541ca9=>J(_0x24be28,_0x541ca9?'Collapsed\x20connected\x20users\x20list\x20(press\x20ENTER\x20to\x20open\x20it)':'Connected\x20users\x20list')),'role':'list','tabindex':_0x2d93d5['to']('hasPopup',_0x14e75f=>!!_0x14e75f&&0x0),'class':['ck','ck-presence-list__list']},'children':this['items'],'on':{'click':_0x2d93d5['to'](()=>this['fire']('execute'))}}),this['on']('change:hasPopup',(_0x4f5572,_0x56c3f8,_0x3e4ebe)=>{this['element']&&(_0x3e4ebe?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 _0x1ec4e8{['counterView'];['inlineListView'];constructor(_0x1d3aef){super(_0x1d3aef);const _0x4407f8=this['bindTemplate'];this['set']('isCollapsed',!0x0),this['counterView']=new ts(this['locale']),this['inlineListView']=new es(_0x1d3aef),this['inlineListView']['bind']('hasPopup')['to'](this,'isCollapsed'),this['listenTo'](this['inlineListView']['items'],'change',()=>{for(const _0x3ba4c9 of this['inlineListView']['items'])_0x3ba4c9['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',_0x4407f8['if']('isCollapsed','ck-presence-list--collapsed')]},'children':[this['counterView'],this['inlineListView']]});}}class j extends _0x1ec4e8{['listWrapperView'];constructor(_0x5badeb,_0x4921c0){super(_0x5badeb),this['listWrapperView']=new ft(_0x5badeb,_0x4921c0),this['setTemplate']({'tag':'div','attributes':{'tabindex':-0x1,'role':'application','class':['ck','ck-presence-list__dropdown-list'],'aria-label':J(_0x5badeb,'Connected\x20users\x20list\x20dropdown\x20menu')},'children':[this['listWrapperView']]});}}class ft extends _0x252df{constructor(_0x4a3b2a,_0x590e25){super(_0x4a3b2a);const _0x24c3c5=this['bindTemplate'];this['set']('_isScrollable',!0x1),this['setTemplate']({'tag':_0x590e25?'div':'ul','attributes':{'class':['ck','ck-reset','ck-list','ck-presence-list__dropdown-list-wrapper',_0x24c3c5['if']('_isScrollable','ck-presence-list__dropdown-list-wrapper_scrollable')],'role':_0x24c3c5['to']('role'),'aria-label':_0x24c3c5['to']('ariaLabel'),'aria-labelledby':_0x24c3c5['to']('ariaLabelledBy')},'children':this['items']}),this['listenTo'](_0x2b65ef['window'],'resize',()=>this['checkIfScrollable']()),this['items']['on']('change',()=>this['checkIfScrollable']());}['render'](){super['render'](),this['checkIfScrollable']();}['checkIfScrollable'](){const _0x5908f6=this['element'];_0x5908f6&&(this['_isScrollable']=Math['max'](_0x5908f6['scrollHeight'],_0x5908f6['clientHeight'])>0.8*window['innerHeight']);}}class k extends et{['userView'];constructor(_0x54a643,_0x1dd5b4,_0x405b76){super(_0x54a643);const _0x368938=this['bindTemplate'];this['userView']=new rt(_0x54a643,_0x1dd5b4);const _0x5163c6={'tag':'li','attributes':{'class':['ck','ck-presence-list__dropdown-list-item'],'tabindex':-0x1,'role':'presentation','aria-label':_0x1dd5b4['name']},'children':[this['userView'],{'tag':'span','attributes':{'class':['ck','ck-user__full-name']},'children':[{'text':_0x1dd5b4['name']}]},{'tag':'span','attributes':{'class':['ck','ck-presence-list__marker',_0x1dd5b4['color']['getBackgroundColorClass']()],'aria-hidden':'true'}}]};_0x405b76&&(_0x5163c6['tag']='button',_0x5163c6['on']={'click':_0x368938['to'](()=>this['fire']('execute'))}),this['setTemplate'](_0x5163c6);}['focus'](){this['element']['focus']();}}class y extends _0x1ec4e8{['userView'];['markerView'];constructor(_0x4491eb,_0x49c0f5,_0x34bd64){super(_0x4491eb);const _0x2973db=this['bindTemplate'];this['set']('isFocusable',!0x1),this['set']('hasTooltip',!0x0),this['set']('tooltipPosition',''),this['userView']=new rt(_0x4491eb,_0x49c0f5),this['markerView']=new ct(_0x4491eb,_0x49c0f5);const _0x5b4b88=new ot(_0x4491eb);_0x5b4b88['template']['tag']='span',_0x5b4b88['text']=_0x49c0f5['name'];const _0x410782={'tag':'div','attributes':{'class':['ck','ck-presence-list__list-item'],'role':'listitem','tabindex':_0x2973db['to']('isFocusable',_0x9c3f2d=>!!_0x9c3f2d&&0x0),'aria-labelledby':_0x5b4b88['id'],'data-cke-tooltip-text':this['userView']['name'],'data-cke-tooltip-position':_0x2973db['to']('tooltipPosition'),'data-cke-tooltip-disabled':_0x2973db['to']('hasTooltip',_0x23c09e=>!_0x23c09e),'data-cke-tooltip-class':'ck-presence-list__list-item__tooltip'},'children':[this['userView'],this['markerView'],_0x5b4b88]};_0x34bd64&&(_0x410782['tag']='button',_0x410782['on']={'click':_0x2973db['to'](()=>this['fire']('execute'))}),this['setTemplate'](_0x410782);}}class ct extends _0x1ec4e8{constructor(_0x1cce5b,_0x3fefcf){super(_0x1cce5b),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-presence-list__marker',_0x3fefcf['color']['getBackgroundColorClass']()],'aria-hidden':'true'}});}}const A={'collapseAt':0x6,'displayMe':!0x0};class r extends _0x2b8ee9{['currentDisplayedUsers'];['balloonPanelView'];['view'];['presenceDropdownView'];['_bodyCollection']=null;constructor(_0x53a1d4){super(_0x53a1d4),this['context']['config']['define']('presenceList',A);const _0x129495=_0x53a1d4['config']['get']('presenceList.collapseAt');if('number'!=typeof _0x129495)throw new _0x5cf78e('presencelist-collapseat-invalid-format',this);if(_0x129495<0x1)throw new _0x5cf78e('presencelist-collapseat-invalid-format',this);this['_allConnectedUsers']=this['context']['plugins']['get'](i)['allConnectedUsers'],this['set']('usersCount',0x0),this['currentDisplayedUsers']=new _0x15fdb5(),this['balloonPanelView']=new _0x4797f4(),this['balloonPanelView']['class']='ck\x20ck-presence-list__balloon',this['view']=this['_createView'](),this['presenceDropdownView']=void 0x0;}static get['requires'](){return[i];}['init'](){for(const _0x4f762c of this['_allConnectedUsers'])this['_handleUserAdd'](_0x4f762c);this['listenTo'](this['_allConnectedUsers'],'add',(_0xd44dc2,_0x11af68)=>{this['_handleUserAdd'](_0x11af68);}),this['listenTo'](this['_allConnectedUsers'],'remove',(_0x3631fd,_0x1d0f6b)=>{this['_handleUserRemove'](_0x1d0f6b);});}['_createView'](){const _0x4ae5d8=this['context'],_0xc32ea6=new L(this['context']['locale']),_0x485b41=this['balloonPanelView'];if(!_0x455fe4(_0x4ae5d8['config']['get']('presenceList.container')))throw new _0x5cf78e('presencelist-missing-container',this);return _0xc32ea6['counterView']['bind']('usersCount')['to'](this),_0xc32ea6['bind']('isCollapsed')['to'](this,'usersCount',_0x4bb5b2=>{const {collapseAt:_0x5be581,displayMe:_0x33585d}=_0x4ae5d8['config']['get']('presenceList'),_0x405144=_0x4bb5b2>=_0x5be581;return _0xc32ea6['counterView']['isHidden']=!(0x1==_0x4bb5b2&&_0x33585d||_0x405144),_0x405144||this['hideDropdown'](),_0x405144;}),_0xc32ea6['inlineListView']['items']['bindTo'](this['currentDisplayedUsers'])['using'](_0x575316=>{const _0x150d37=_0x4ae5d8['config']['get']('presenceList'),_0x58284e=new y(_0x4ae5d8['locale'],_0x575316,!!_0x150d37['onClick']);return _0x58284e['bind']('hasTooltip')['to'](_0xc32ea6,'isCollapsed',_0x490f4b=>!_0x490f4b),_0x58284e['bind']('isFocusable')['to'](_0xc32ea6,'isCollapsed',_0x115fc5=>!_0x115fc5),_0x150d37['onClick']&&this['listenTo'](_0x58284e,'execute',()=>{this['view']['isCollapsed']||_0x150d37['onClick'](_0x575316,_0x58284e['element']);}),_0x58284e;}),this['listenTo'](_0xc32ea6['inlineListView'],'execute',()=>{this['presenceDropdownView']?this['hideDropdown']():this['view']['isCollapsed']&&this['showDropdown']();}),_0xc32ea6['inlineListView']['keystrokes']['set']('Enter',(_0x4309fd,_0xbc3229)=>{this['view']['isCollapsed']&&(this['showDropdown'](),_0xbc3229());}),_0xc32ea6['render'](),_0x485b41['render'](),_0x54d39b({'emitter':_0xc32ea6,'activator':()=>_0x485b41['isVisible'],'contextElements':[_0x485b41['element'],_0xc32ea6['inlineListView']['element']],'callback':()=>this['hideDropdown']()}),_0x4ae5d8['config']['get']('presenceList.container')['appendChild'](_0xc32ea6['element']),this['_bodyCollection']=new _0x5b1fbd(this['context']['locale']),this['_bodyCollection']['attachToDom'](),this['_bodyCollection']['add'](this['balloonPanelView']),_0xc32ea6;}['_handleUserAdd'](_0x401b58){if(!this['context']['config']['get']('presenceList.displayMe')&&_0x401b58['isMe'])return;const _0x485742=this['context']['config']['get']('presenceList.collapseAt')-0x1;this['usersCount']++,this['currentDisplayedUsers']['length']==_0x485742&&this['currentDisplayedUsers']['length']>0x1&&this['currentDisplayedUsers']['remove'](0x1);const _0x380e12=_0x401b58['isMe']?0x0:this['currentDisplayedUsers']['length'];this['currentDisplayedUsers']['add'](_0x401b58,_0x380e12);}['_handleUserRemove'](_0x42e6e7){if(this['usersCount']--,this['currentDisplayedUsers']['get'](_0x42e6e7['id'])&&(this['currentDisplayedUsers']['remove'](_0x42e6e7['id']),this['currentDisplayedUsers']['length']<this['usersCount'])){for(const _0x450271 of Array['from'](this['_allConnectedUsers'])['reverse']())if(!this['currentDisplayedUsers']['get'](_0x450271['id']))return void this['currentDisplayedUsers']['add'](_0x450271,Math['min'](this['currentDisplayedUsers']['length'],0x1));}}['showDropdown'](){if(this['presenceDropdownView'])return;const _0x48e3be=this['context']['config']['get']('presenceList');this['presenceDropdownView']=new j(this['context']['locale'],!!_0x48e3be['onClick']),this['view']['inlineListView']['isExpanded']=!0x0;const {listWrapperView:_0x421ed1}=this['presenceDropdownView'];_0x421ed1['items']['bindTo'](this['_allConnectedUsers'])['using'](_0x10d5d8=>{if(!_0x48e3be['displayMe']&&_0x10d5d8['isMe'])return null;const _0x2478a3=new k(this['context']['locale'],_0x10d5d8,!!_0x48e3be['onClick']);return _0x48e3be['onClick']&&this['listenTo'](_0x2478a3,'execute',()=>{_0x48e3be['onClick'](_0x10d5d8,_0x2478a3['element']);}),_0x2478a3;}),this['balloonPanelView']['content']['add'](this['presenceDropdownView']),this['balloonPanelView']['pin']({'target':this['view']['inlineListView']['element']}),_0x421ed1['focus'](),_0x421ed1['checkIfScrollable']();const _0x3aa643=(_0x6e12fa,_0x945de4)=>{this['hideDropdown'](),this['view']['inlineListView']['focus'](),_0x945de4();};_0x421ed1['keystrokes']['set']('Esc',_0x3aa643),_0x421ed1['keystrokes']['set']('Shift+Tab',_0x3aa643),_0x421ed1['keystrokes']['set']('Tab',(_0x2c5dea,_0x24da71)=>{!function(_0x55427d){const _0x314980=['a','button','input','select','textarea','[tabindex]','[contenteditable]']['map'](_0x184659=>_0x184659+':not([disabled]):not([tabindex=\x22-1\x22])')['join'](','),_0x5ba036=[...document['body']['querySelectorAll'](_0x314980)]['filter'](_0x49282b=>_0x49282b===document['activeElement']||_0x49282b['offsetWidth']+_0x49282b['offsetHeight']>0x0)['sort']((_0x346619,_0x550b01)=>(_0x346619['tabIndex']||0x0)-(_0x550b01['tabIndex']||0x0)),_0x2b70e4=_0x5ba036['indexOf'](_0x55427d),_0x310e2b=_0x5ba036[(_0x2b70e4+0x1)%_0x5ba036['length']];_0x310e2b&&_0x310e2b['focus']();}(this['view']['element']),this['hideDropdown'](),_0x24da71();}),_0x421ed1['focusTracker']['add'](this['view']['element']),_0x421ed1['focusTracker']['on']('change:isFocused',(_0x345235,_0x4a897a,_0x25c092)=>{_0x25c092||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 _0x2b8ee9{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 _0x2d3a19,Plugin as _0x1bed39,PendingActions as _0x5aec10,Context as _0x1c8cef}from'@ckeditor/ckeditor5-core/dist/index.js';import{DomEmitterMixin as _0x2b71bb,CKEditorError as _0x42ffa0,Collection as _0x3e24e7,global as _0x1a4fbb,version as ht,uid as _0x163e32,KeystrokeHandler as _0x3e50ca}from'@ckeditor/ckeditor5-utils/dist/index.js';import{Notification as _0x3fde1c,View as _0x28ba21,ListView as _0x25ec3b,ListItemView as ct,LabelView as pt,BalloonPanelView as _0x5689c7,clickOutsideHandler as _0x26b942,BodyCollection as _0x15dce7}from'@ckeditor/ckeditor5-ui/dist/index.js';import{LiveRange as ut,History as _0x41ca1c,NoOperation as _0xb988fd,InsertOperation as _0x59c9e3,MarkerOperation as _0xaa88bb,RootAttributeOperation as _0x2c0d2c,transformSets as _0x408fa6,OperationFactory as _0x26c3a0}from'@ckeditor/ckeditor5-engine/dist/index.js';import{WebSocketGateway as ft,WEB_SOCKET_GATEWAY_STATES as _0x4b7c68,CollaborativeEditingService as _0x4a52fa,User as mt,CommentsService as tt,TrackChangesService as at,RevisionHistoryService as st,EditorService as it}from'@ckeditor/ckeditor-cloud-services-collaboration/dist/index.js';import{Users as _0x41e35a,UserView as lt}from'ckeditor5-collaboration/dist/index.js';import{Compressor as _0xab970e}from'@ckeditor/ckeditor5-operations-compressor/dist/index.js';import{isElement as _0x26db0b}from'lodash-es';class c extends _0x2d3a19{static ['WebSocketGateway']=/* #__PURE__ -- @preserve */
24
+ ((()=>ft)());static ['initialReconnectionInterval']=0x3e8;['connection'];['_reconnectionStack'];['_shouldPluginsReconnect'];['_domEmitter'];static get['requires'](){return['CloudServices',_0x3fde1c];}static get['pluginName'](){return'WebSocketGateway';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1af6c0){super(_0x1af6c0),this['set']('state',_0x4b7c68['CONNECTED']),this['set']('_isBrowserOffline',!0x1),this['_reconnectionStack']=new Set(),this['_shouldPluginsReconnect']=!0x1,this['_domEmitter']=Object['create'](_0x2b71bb);}['init'](){const _0x44ff3d=this['context'],_0x5c6474=_0x44ff3d['plugins']['get']('CloudServices'),_0x931ff2=_0x44ff3d['plugins']['get'](_0x3fde1c);if(!_0x5c6474['token'])throw new _0x42ffa0('websocketgateway-missing-token',this);if(!_0x5c6474['webSocketUrl'])throw new _0x42ffa0('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'](_0x5c6474['token'],_0x5c6474['webSocketUrl'],{'timeout':0x3e8*this['context']['config']['get']('cloudServices.connectionTimeout'),'requestTimeout':0x3e8*this['context']['config']['get']('cloudServices.requestTimeout')})['then'](_0x281e87=>{if(this['connection']=_0x281e87,this['bind']('state')['to'](_0x281e87,'state',this,'_isBrowserOffline',(_0x2f6a3e,_0x267b3f)=>('connected'!==_0x2f6a3e&&(this['_shouldPluginsReconnect']=!0x0),_0x267b3f||_0x2f6a3e!==_0x4b7c68['CONNECTED']?_0x4b7c68['DISCONNECTED']:this['state']==_0x4b7c68['DISCONNECTED']&&this['_shouldPluginsReconnect']?(this['_shouldPluginsReconnect']=!0x1,this['_reconnect'](),_0x4b7c68['CONNECTING']):_0x4b7c68['CONNECTED'])),this['connection']['on']('error',(_0x5eba96,_0x2df828)=>{if('limitExceeded'!==_0x2df828['code'])throw console['error'](_0x2df828),new _0x42ffa0('cloudservices-init',null,{'originalError':_0x2df828});_0x931ff2['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'});}),!_0x281e87['me'])return new Promise(_0x373a90=>_0x281e87['on']('change:me',_0x373a90));})['catch'](_0x55a49b=>{throw console['error'](_0x55a49b),new _0x42ffa0('cloudservices-init',null,{'originalError':_0x55a49b});});}['addToReconnectionStack'](_0x1e8c5b){if('function'!=typeof _0x1e8c5b['reconnect'])throw new _0x42ffa0('websocketgateway-invalid-plugin-interface',this);if(this['isInReconnectionStack'](_0x1e8c5b))throw new _0x42ffa0('websocketgateway-plugin-already-registered',this,{'name':_0x1e8c5b['constructor']['pluginName']});this['_reconnectionStack']['add'](_0x1e8c5b);}['removeFromReconnectionStack'](_0x5b1fe4){this['_reconnectionStack']['delete'](_0x5b1fe4);}['isInReconnectionStack'](_0x527a4c){return this['_reconnectionStack']['has'](_0x527a4c);}['_reconnect'](){return this['connection']['reconnect']()['then'](()=>Promise['all'](Array['from'](this['_reconnectionStack'],_0x15d40f=>_0x15d40f['reconnect']())))['then'](()=>this['state']=_0x4b7c68['CONNECTED'])['catch'](_0x349563=>{throw console['error'](_0x349563),new _0x42ffa0('cloudservices-reconnection-error',this['context']);});}['destroy'](){this['connection']&&this['connection']['disconnect'](),this['state']=_0x4b7c68['DISCONNECTED'],this['_domEmitter']['stopListening'](),super['destroy']();}}class i extends _0x2d3a19{['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,_0x41e35a];}constructor(_0x3d424f){super(_0x3d424f),this['channelSessions']=new Map(),this['channelConnectedUsers']=new Map(),this['allConnectedUsers']=new _0x3e24e7(),this['_registeredSessions']=new Map(),this['_uniqueUsersCount']=0x0,this['_users']=this['context']['plugins']['get'](_0x41e35a);}['init'](){const _0x1da43e=this['context']['plugins']['get'](c);this['listenTo'](_0x1da43e,'change:state',(_0x73dab9,_0x20b065,_0x572631)=>{if('connected'!==_0x572631)this['channelSessions']['forEach'](_0x450d45=>_0x450d45['clear']()),this['channelConnectedUsers']['forEach'](_0x26147d=>_0x26147d['clear']()),this['allConnectedUsers']['clear']();else{for(const [_0x203da9,_0x1eea89]of this['_registeredSessions'])for(const _0x504434 of _0x1eea89)this['_handleSessionAdd'](_0x203da9,_0x504434);}}),this['_createUser'](_0x1da43e['connection']['me'],!0x0);}['register'](_0x36db49,_0x512423){if(this['_registeredSessions']['has'](_0x36db49))throw new _0x42ffa0('sessions-register-already-registered',null,{'channelId':_0x36db49});this['_registeredSessions']['set'](_0x36db49,_0x512423),this['channelSessions']['set'](_0x36db49,new _0x3e24e7()),this['channelConnectedUsers']['set'](_0x36db49,new _0x3e24e7()),this['listenTo'](_0x512423,'add',(_0x2b33f6,_0x290f58)=>this['_handleSessionAdd'](_0x36db49,_0x290f58)),this['listenTo'](_0x512423,'remove',(_0x26d258,_0x59c1c4)=>this['_handleSessionRemove'](_0x36db49,_0x59c1c4));for(const _0x71333b of _0x512423)this['_handleSessionAdd'](_0x36db49,_0x71333b);}['unregister'](_0x3b13c3){if(!this['_registeredSessions']['has'](_0x3b13c3))throw new _0x42ffa0('sessions-unregister-not-exist',null,{'channelId':_0x3b13c3});const _0x52da9c=this['_registeredSessions']['get'](_0x3b13c3);this['stopListening'](_0x52da9c);for(const _0x267636 of _0x52da9c)'connected'===this['context']['plugins']['get'](c)['state']&&this['_handleSessionRemove'](_0x3b13c3,_0x267636);this['_registeredSessions']['delete'](_0x3b13c3),this['channelSessions']['delete'](_0x3b13c3),this['channelConnectedUsers']['delete'](_0x3b13c3);}get['mySessionId'](){return this['context']['plugins']['get'](c)['connection']['sessionId'];}['getUserBySessionId'](_0x3b41e9){for(const _0x2271f7 of this['channelSessions']['values']())for(const _0x49628e of _0x2271f7)if(_0x49628e['id']===_0x3b41e9)return _0x49628e['user'];}['getUserSessions'](_0x566e6a,_0xfe67a1){const _0x234591=_0xfe67a1?[this['channelSessions']['get'](_0xfe67a1)]:this['channelSessions']['values'](),_0x4450ca=new Set();for(const _0x2e17ec of _0x234591)for(const _0x26f435 of _0x2e17ec)_0x26f435['user']['id']===_0x566e6a['id']&&_0x4450ca['add'](_0x26f435['id']);return _0x4450ca;}['getUserRole'](_0x108f2a){for(const _0x597e25 of this['channelSessions']['values']())for(const _0x3a645a of _0x597e25)if(_0x3a645a['user']===_0x108f2a)return _0x3a645a['role'];}['_handleSessionAdd'](_0x4d17f2,_0x22ea3d){if('connected'!==this['context']['plugins']['get'](c)['state'])return;const _0x49d5ec=_0x22ea3d['user'],_0x1852c5=this['_users']['getUser'](_0x49d5ec['id'])||this['_createUser'](_0x49d5ec),_0x179ada=Object['assign']({},_0x22ea3d,{'user':_0x1852c5});this['channelSessions']['get'](_0x4d17f2)['add'](_0x179ada);const _0xb42c75=this['channelConnectedUsers']['get'](_0x4d17f2);_0xb42c75['has'](_0x1852c5['id'])||_0xb42c75['add'](_0x1852c5),this['allConnectedUsers']['has'](_0x1852c5['id'])||this['allConnectedUsers']['add'](_0x1852c5,_0x1852c5['isMe']?0x0:void 0x0),this['fire']('sessionAdd:'+_0x4d17f2,{'channelId':_0x4d17f2,'session':_0x179ada});}['_handleSessionRemove'](_0x449733,_0x2d496b){if('connected'!==this['context']['plugins']['get'](c)['state'])return;const _0x49243d=this['channelConnectedUsers']['get'](_0x449733),_0x30b812=_0x2d496b['user'];_0x30b812['id']&&(this['channelSessions']['get'](_0x449733)['remove'](_0x2d496b['id']),_0x49243d['has'](_0x30b812['id'])&&!this['getUserSessions'](_0x30b812,_0x449733)['size']&&_0x49243d['remove'](_0x30b812['id']),this['allConnectedUsers']['get'](_0x30b812['id'])&&!this['getUserSessions'](_0x30b812)['size']&&this['allConnectedUsers']['remove'](_0x30b812['id']));}['_createUser'](_0x480bc0,_0x3122b9){const _0x5ea2f3=this['_users']['addUser'](_0x480bc0);return _0x3122b9&&this['_users']['defineMe'](_0x480bc0['id']),_0x5ea2f3['orderNumber']=this['_uniqueUsersCount']++,_0x5ea2f3;}}class E extends _0x1bed39{['_domEmitter']=new(_0x2b71bb())();static get['requires'](){return[i];}static get['pluginName'](){return'UserMarkers';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const _0x3172a0=this['editor'],_0x2da34c=_0x3172a0['plugins']['get'](i);_0x3172a0['conversion']['for']('editingDowncast')['markerToElement']({'model':'user:position','view':(_0x423d62,{writer:_0x3d1039})=>function(_0x54b039,_0x5abcc0,_0x58700d,_0x33f814){const _0x271aeb=_0x54b039['markerName']['split'](':')[0x2],_0x3007ad=_0x58700d['getUserBySessionId'](_0x271aeb);if(!_0x3007ad||_0x271aeb===_0x58700d['mySessionId'])return;if(!_0x33f814['model']['schema']['checkChild'](_0x54b039['markerRange']['start'],'$text'))return;const _0x46a8d2={'class':'ck-user__marker\x20'+_0x3007ad['color']['getMarkerClass'](),'data-name':_0x3007ad['name'],'data-session-id':_0x271aeb},_0x2ce975=_0x33f814['model']['markers']['get'](_0x54b039['markerName']),_0x578990=_0x2ce975['getStart'](),_0x312573=_0x578990['nodeAfter'],_0x396ec4=_0x33f814['model']['schema'];if(_0x312573&&_0x396ec4['isObject'](_0x312573)&&_0x396ec4['isInline'](_0x312573)&&!_0x33f814['model']['markers']['get']('user:range:'+_0x271aeb)['getRange']()['isCollapsed'])return;const _0x408d40=_0x578990['parent'];return _0x33f814['model']['schema']['isLimit'](_0x408d40)&&!_0x33f814['model']['hasContent'](_0x408d40)&&(_0x46a8d2['contenteditable']=!0x1),function(_0x4cb4e9,_0x273df0,_0x3c3920){const _0x2782b3=_0x4cb4e9['createUIElement']('span',_0x273df0);return _0x4cb4e9['setCustomProperty']('userPositionMarker',!0x0,_0x2782b3),_0x2782b3['render']=function(_0x3d716b){const _0x22debe=this['toDomElement'](_0x3d716b);return _0x22debe['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>'+_0x3c3920['name']+'</span>⁠',_0x22debe['addEventListener']('mouseenter',()=>{_0x22debe['classList']['add']('ck-user__marker_hovered');}),_0x22debe['addEventListener']('mouseleave',()=>{_0x22debe['classList']['remove']('ck-user__marker_hovered');}),_0x22debe;},_0x2782b3['isSimilar']=function(_0x370a07){return!(!this['getCustomProperty']('userPositionMarker')||!_0x370a07['getCustomProperty']('userPositionMarker')||this['getAttribute']('data-session-id')!=_0x370a07['getAttribute']('data-session-id'));},_0x2782b3;}(_0x5abcc0,_0x46a8d2,_0x3007ad);}(_0x423d62,_0x3d1039,_0x2da34c,_0x3172a0)}),_0x3172a0['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'user:range','view':_0x315fd1=>function(_0x41aeda,_0x1004a5){const _0x141472=_0x41aeda['markerName']['split'](':')[0x2];if(_0x141472===_0x1004a5['mySessionId'])return null;const _0xc4efaf=_0x1004a5['getUserBySessionId'](_0x141472);if(!_0xc4efaf)return{'id':_0x141472,'classes':[]};return{'id':_0x141472,'classes':['ck-user__selection',_0xc4efaf['color']['getSelectionClass']()],'attributes':{'data-session-id':_0x141472},'priority':0x7d0+_0xc4efaf['orderNumber']};}(_0x315fd1,_0x2da34c)}),function(_0x1a647b){const _0x2623b6=_0x1a647b['model'],_0x267fac=new Map(),_0x43f853=_0x1a647b['plugins']['get'](i);_0x2623b6['markers']['on']('update:user:range',(_0x53810b,_0xc2e742,_0x331de4,_0x31af6d)=>{if(!_0x31af6d&&_0x267fac['get'](_0xc2e742['name']))return _0x267fac['get'](_0xc2e742['name'])['detach'](),void _0x267fac['delete'](_0xc2e742['name']);const _0x45d6ef=_0xc2e742['name']['split'](':')[0x2];if(_0x45d6ef===_0x43f853['mySessionId'])return;const _0x2430b1='user:position:'+_0x45d6ef;_0x2623b6['markers']['has'](_0x2430b1)&&_0x1a647b['editing']['reconvertMarker'](_0x2430b1),_0xc2e742['on']('change:range',(_0x31c694,_0x351163,_0x53beae)=>{if('$graveyard'!=_0x351163['root']['rootName']&&'$graveyard'==_0xc2e742['getRange']()['root']['rootName']&&!_0x267fac['has'](_0xc2e742['name'])){const _0x296023=_0x2623b6['schema']['getNearestSelectionRange'](_0x53beae['deletionPosition']);if(_0x296023){const _0x23ddcf=ut['fromRange'](_0x296023);_0x267fac['set'](_0xc2e742['name'],_0x23ddcf),_0x23ddcf['on']('change:range',(_0x6b7af2,_0x273e61,_0xe59134)=>{if('$graveyard'==_0x23ddcf['root']['rootName']){const _0x5026b3=_0x2623b6['schema']['getNearestSelectionRange'](_0xe59134['deletionPosition']);_0x5026b3?(_0x23ddcf['start']=_0x5026b3['start'],_0x23ddcf['end']=_0x5026b3['end']):(_0x267fac['delete'](_0xc2e742['name']),_0x23ddcf['detach']());}});}}});}),_0x2623b6['document']['on']('change',()=>{_0x267fac['size']>0x0&&_0x2623b6['enqueueChange']({'isUndoable':!0x1},_0x18a230=>{for(const [_0x35218d,_0xefd8b3]of _0x267fac)'$graveyard'==_0x2623b6['markers']['get'](_0x35218d)['getRange']()['root']['rootName']&&(Q(_0x35218d['split'](':')[0x2],_0xefd8b3['toRange'](),_0x2623b6,_0x18a230),_0xefd8b3['detach']());_0x267fac['clear']();});});}(_0x3172a0),this['_domEmitter']['listenTo'](_0x1a4fbb['document'],'keydown',(_0x33ce15,{key:_0x2ae922})=>{'Escape'===_0x2ae922&&function(_0x565ae7){_0x565ae7['editing']['view']['change'](_0x4442cb=>{for(const _0x3d4bc8 of _0x565ae7['model']['markers']){if(!_0x3d4bc8['name']['startsWith']('user:position'))continue;const _0x25757d=_0x565ae7['editing']['mapper']['markerNameToElements'](_0x3d4bc8['name']);if(_0x25757d){for(const _0x20199f of _0x25757d)_0x4442cb['removeClass']('ck-user__marker_hovered',_0x20199f);}}});}(_0x3172a0);},{'useCapture':!0x0});}['afterInit'](){const _0x21826e=this['editor'],_0x4a30aa=_0x21826e['commands']['get']('undo');_0x4a30aa&&_0x21826e['model']['on']('applyOperation',(_0x2c33d4,_0x202b6d)=>{const _0x8026ee=_0x202b6d[0x0];if('marker'!=_0x8026ee['type']||!_0x8026ee['name']['startsWith']('user:'))return;const _0x5f1901=_0x8026ee['batch'];_0x4a30aa['_createdBatches']['has'](_0x5f1901)&&(_0x8026ee['newRange']=_0x8026ee['oldRange']?_0x21826e['model']['createRange'](_0x8026ee['oldRange']['start'],_0x8026ee['oldRange']['end']):null);},{'priority':'highest'});}['destroy'](){return this['_domEmitter']['stopListening'](),super['destroy']();}['createUserMarkerOperations'](){const _0x5dc1e5=this['editor'],_0x232148=_0x5dc1e5['model']['document'],_0x24d335=_0x5dc1e5['plugins']['get'](i);_0x5dc1e5['model']['enqueueChange']({'isUndoable':!0x1},_0x572a0a=>{const _0xb71e1d='user:range:'+_0x24d335['mySessionId'],_0x227bf3='user:position:'+_0x24d335['mySessionId'],_0x3ae1a3=_0x5dc1e5['model']['markers']['has'](_0xb71e1d);_0x5dc1e5['editing']['view']['hasDomSelection']?Q(_0x24d335['mySessionId'],_0x232148['selection']['getFirstRange'](),_0x5dc1e5['model'],_0x572a0a):_0x3ae1a3&&(_0x572a0a['removeMarker'](_0xb71e1d),_0x572a0a['removeMarker'](_0x227bf3));});}}function Q(_0x34c20e,_0x10b871,_0x527c31,_0x492e57){const _0x382fae='user:range:'+_0x34c20e,_0x98ad61='user:position:'+_0x34c20e,_0xce0b99=_0x10b871['getContainedElement']();let _0xbbdb91=_0x10b871['start'];_0xce0b99&&_0xce0b99['is']('element','tableCell')&&(_0xbbdb91=function(_0xd03d8a,_0x5c8a43){for(const _0x417eeb of _0xd03d8a['getPositions']())if(_0x5c8a43['schema']['checkChild'](_0x417eeb,'$text'))return _0x417eeb;}(_0x10b871,_0x527c31),_0x10b871=_0x492e57['createRange'](_0xbbdb91));const _0x56e8d6=_0x492e57['createRange'](_0xbbdb91);_0x527c31['markers']['has'](_0x382fae)?(_0x492e57['updateMarker'](_0x382fae,{'range':_0x10b871}),_0x492e57['updateMarker'](_0x98ad61,{'range':_0x56e8d6})):(_0x492e57['addMarker'](_0x382fae,{'range':_0x10b871,'usingOperation':!0x0}),_0x492e57['addMarker'](_0x98ad61,{'range':_0x56e8d6,'usingOperation':!0x0}));}function B(_0x4c9214,_0x1d280f,_0x597c7e){const _0x28bbd6=_0x4c9214['t'],t=_0x4c9214['t'];switch(_0x1d280f){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 _0x28bbd6({'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'},_0x597c7e);default:return'';}}let F=0x1;class l extends _0x1bed39{static ['CollaborativeEditingService']=/* #__PURE__ -- @preserve */
25
+ ((()=>_0x4a52fa)());['_offset'];['sessionId'];['serverHistory'];['_channelId'];['_service'];['_document'];['_compressor'];['_bufferedOperations'];['_knownOperations'];['_knownRootNames'];['_pendingAction'];['_hasSelectionChanged'];['_sendBufferedOperationsDelayId'];['_baseBufferDelay'];['_currentBufferDelay'];['_lastSyncedOperationId'];['_disconnectionOperations'];['_operationIdentifier'];static get['requires'](){return[c,i,E,_0x5aec10,_0x41e35a,_0x3fde1c];}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 _0x4e35fb=this['serverHistory']['getOperations']();for(let _0x500850=_0x4e35fb['length']-0x1;_0x500850>=0x0;_0x500850--){const _0x3b433f=_0x4e35fb[_0x500850];if(!this['_disconnectionOperations']['has'](_0x3b433f))return _0x3b433f['baseVersion']+0x1-this['_offset'];}return 0x0;}constructor(_0x2053fa){if(super(_0x2053fa),this['_offset']=0x0,this['sessionId']=null,this['serverHistory']=new _0x41ca1c(),this['editor']['config']['define']('collaboration',{}),this['_channelId']=this['editor']['config']['get']('collaboration.channelId'),!this['_channelId'])throw new _0x42ffa0('collaboration-missing-channelid',this);const _0x2fa2b2=_0x2053fa['config']['get']('cloudServices.bundleVersion')||ht;this['_service']=new l['CollaborativeEditingService'](_0x2fa2b2,this['_channelId']),this['_document']=this['editor']['model']['document'],this['_compressor']=new _0xab970e(),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 G(this['_disconnectionOperations']);}['init'](){const _0x4f7cbc=this['editor'],_0x2a6d6d=_0x4f7cbc['plugins']['get'](_0x41e35a),_0xe52e4b=_0x4f7cbc['plugins']['get'](c);this['listenTo'](_0x2a6d6d,'getOperationAuthor',(_0x47c472,_0x1c8d96)=>{const _0x499ee2=_0x1c8d96[0x0];_0x499ee2['_authorId']&&(_0x47c472['return']=_0x2a6d6d['getUser'](_0x499ee2['_authorId']),_0x47c472['stop']()),null===_0x499ee2['_authorId']&&(_0x47c472['return']=null,_0x47c472['stop']());},{'priority':'high'}),this['listenTo'](_0x4f7cbc['model']['document']['selection'],'change:range',(_0x34cea2,_0x1845f9)=>{_0x1845f9['directChange']&&this['_refreshUserSelectionMarkers']();}),this['listenTo'](_0x4f7cbc['editing']['view'],'change:hasDomSelection',()=>{this['_refreshUserSelectionMarkers']();}),this['_initThrowingOnDataSet'](),_0x4f7cbc['model']['on']('applyOperation',(_0x83d0e3,_0x1d1969)=>{const _0x6e37eb=_0x1d1969[0x0];_0x6e37eb['isDocumentOperation']&&(this['_saveOperationInBuffer'](_0x6e37eb),this['_shouldSendUpdate']()&&this['_sendBufferedOperationsDelayed']());}),this['_setUpDataInit'](),this['bind']('_isEditingAllowed')['to'](_0xe52e4b,'state',this,'_hasSynchronizationProblem',(_0x4a9ae9,_0x3bdc24)=>'connected'===_0x4a9ae9&&!_0x3bdc24),this['on']('change:_isEditingAllowed',()=>{this['_isEditingAllowed']?_0x4f7cbc['disableReadOnlyMode']('rtc-offline'):_0x4f7cbc['enableReadOnlyMode']('rtc-offline');}),this['_isEditingAllowed']?_0x4f7cbc['disableReadOnlyMode']('rtc-offline'):_0x4f7cbc['enableReadOnlyMode']('rtc-offline'),this['set']('_isConnected',!0x1);}async['reconnect'](){const _0x11220b=this['editor']['plugins']['get'](i),_0xdd58c5=this['editor']['plugins']['get'](c);try{this['_isPendingUpdate']=!0x0,_0x11220b['unregister'](this['_channelId']);const _0x1d4e98=await this['_service']['reconnect'](_0xdd58c5['connection'],this['lastSyncVersion']);await this['_handleReconnectionResponse'](_0x1d4e98)&&(this['_isPendingUpdate']=!0x1,this['_clearPendingAction']());const _0x1d5a0f=await this['_service']['getConnectedSessions']();_0x11220b['register'](this['_channelId'],_0x1d5a0f),this['_handleSendingSelectionMarkers'](),this['_isConnected']=!0x0;}catch(_0x1882a9){if(function(_0xdc8272){return'404'===_0xdc8272['code'];}(_0x1882a9)&&this['sessionId'])await this['_connectAfterSessionHasBeenFlushed']();else{if(function(_0x20a869){return'409'===_0x20a869['code'];}(_0x1882a9)){const _0x5afc3f=B(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'](_0x5afc3f);}else{if(!(_0x1882a9 instanceof H))throw _0x1882a9;this['_handleReconnectionError']();}}}}['destroy'](){const _0x22bdca=this['editor']['plugins']['get'](c),_0x3b6426=this['editor']['plugins']['get'](i);this['editor']['enableReadOnlyMode']('rtc-destroyed'),_0x3b6426['channelSessions']['has'](this['_channelId'])&&_0x3b6426['unregister'](this['_channelId']),_0x22bdca['removeFromReconnectionStack'](this),this['_disconnectService'](),super['destroy']();}async['_handleReconnectionResponse'](_0x1e96d8){if(this['sessionId']!==_0x1e96d8['sessionId']&&this['_lastSyncedOperationId']!==_0x1e96d8['lastOperationId'])throw new H();return this['sessionId']=_0x1e96d8['sessionId'],this['_handleServerResponse']([],{..._0x1e96d8,'wereChangesApplied':!0x1,'data':_0x1e96d8['data']},'reconnect');}async['_connectService'](_0x2493e7,_0x5a08eb=!0x1){const {connection:_0x31cded}=this['editor']['plugins']['get'](c);l['CollaborativeEditingService']['getConnectedSessions'](_0x31cded,this['_channelId'])['then'](_0x3d62e5=>this['_initSessionsHandling'](_0x3d62e5))['catch'](_0x169dd9=>{this['_crash']('realtimecollaborationclient-init-session-connection-error',_0x169dd9);}),this['listenTo'](this['_service'],'operationsReceived',this['_handleReceivedOperations']['bind'](this)),this['listenTo'](this['_service'],'error',(_0x390fb8,_0x1fa49e)=>{this['_crash']('realtimecollaborationclient-initservice-internal-error',_0x1fa49e);}),this['listenTo'](this['_service'],'disconnected',()=>{this['_isConnected']=!0x1;});const _0x4530e9=this['_operationIdentifier']['getIdOfTheLastOperation'](_0x2493e7);this['_isPendingUpdate']=!0x0;const _0xb7d4b3=await this['_service']['connect'](_0x31cded,this['_compressOperations'](_0x2493e7),_0x4530e9);if(this['sessionId']=_0xb7d4b3['sessionId'],_0x5a08eb){if(!_0xb7d4b3['wereChangesApplied'])return void this['_handleReconnectionError']();this['_isPendingUpdate']=!0x1,this['_clearPendingAction'](),this['serverHistory']['reset'](),this['_offset']=_0xb7d4b3['offset'],this['serverHistory']['version']=this['_offset'],await this['_handleServerResponse'](_0x2493e7,_0xb7d4b3,'reconnection:\x20flushed\x20session');}else await this['_handleInitialConnectionData'](_0xb7d4b3,_0x2493e7);this['_handleSendingSelectionMarkers'](),this['_isConnected']=!0x0;}['_handleSendingSelectionMarkers'](){const _0xd3b93a=this['editor']['plugins']['get'](i),_0x5d1b20=this['editor']['plugins']['get'](E),_0x38c144=_0xd3b93a['channelSessions']['get'](this['_channelId']);_0x38c144&&_0x38c144['length']>0x1?_0x5d1b20['createUserMarkerOperations']():this['listenTo'](_0xd3b93a,'sessionAdd:'+this['_channelId'],()=>{0x2===_0xd3b93a['channelSessions']['get'](this['_channelId'])['length']&&_0x5d1b20['createUserMarkerOperations']();});}async['_handleReceivedOperations'](_0x327c7d,_0x1021e8,_0x3363d3,_0x13555d){if(!this['_isPendingUpdate']&&this['_document']['version']==_0x1021e8){const _0x5b717e=this['_decompressOperations'](_0x3363d3,_0x13555d);await this['_fetchMissingUsers'](_0x5b717e),this['_handleExternalOperations'](_0x5b717e,_0x1021e8,_0x3363d3['lastOperationId'])||this['_crash']('realtimecollaborationclient-initservice-incorrect-server-operation');}}async['_connectAfterSessionHasBeenFlushed'](){this['_disconnectService']();const {locale:_0x1f1be3}=this['editor'];let _0x3b2115;try{_0x3b2115=await this['_service']['getDocumentDetails']();}catch(_0x4e109f){const _0xfb7bd3=B(_0x1f1be3,'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'](_0xfb7bd3);}const _0x1f27a6=_0x3b2115['currentDocumentSession']||_0x3b2115['lastDocumentSession'];if(this['_lastSyncedOperationId']===_0x1f27a6['lastOperationId'])await this['_connectService'](this['editor']['model']['document']['history']['getOperations'](),!0x0);else{const _0x83cb96=B(_0x1f1be3,'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'](_0x83cb96);}}['_disconnectService'](){this['_service']['disconnect'](),this['_bufferedOperations']=[],clearTimeout(this['_sendBufferedOperationsDelayId']),this['stopListening'](this['_service']);}['_initSessionsHandling'](_0x3894dd){const _0xde1783=this['editor']['plugins']['get'](i);this['listenTo'](_0xde1783,'sessionAdd:'+this['_channelId'],(_0x4d50dd,{session:_0x36dcba})=>{if(_0x36dcba['id']===_0xde1783['mySessionId']){_0x4d50dd['off']();const _0x1c338a=this['editor']['plugins']['has']('CommentsOnly')&&this['editor']['plugins']['get']('CommentsOnly');let _0xf4d1cd=_0x36dcba['permissions'];_0x1c338a&&_0x1c338a['isEnabled']&&(_0xf4d1cd=_0xf4d1cd['filter'](_0x9471d=>'document:write'!==_0x9471d)),this['editor']['plugins']['get']('Permissions')['setPermissions'](_0xf4d1cd,this['_channelId']);}}),_0xde1783['register'](this['_channelId'],_0x3894dd);}['_initThrowingOnDataSet'](){const _0x3a5df9=this['editor']['data']['set'];this['editor']['data']['set']=(..._0x2c3e7d)=>{if(!_0x2c3e7d[_0x2c3e7d['length']-0x1]['suppressErrorInCollaboration'])throw new _0x42ffa0('realtimecollaborationclient-editor-setdata-and-editor-data-set-are-forbidden-in-real-time-collaboration',this);_0x3a5df9['apply'](this['editor']['data'],_0x2c3e7d);};}['_setUpDataInit'](){this['editor']['data']['on']('init',(_0x1b9be8,[_0x1bf265])=>{if(this['_document']['version'])throw new _0x42ffa0('realtimecollaborationclient-init-document-already-initialized',this);_0x1b9be8['stop'](),this['_setPendingAction']();const _0x169fce=this['editor']['config']['get']('rootsAttributes'),_0x407a49=this['_getOperationsFromInitData'](_0x1bf265,_0x169fce);0x0==_0x407a49['length']&&_0x407a49['push'](new _0xb988fd(0x0)),_0x1b9be8['return']=this['_connectService'](_0x407a49)['then'](()=>{this['editor']['plugins']['get'](c)['addToReconnectionStack'](this),this['editor']['data']['fire']('ready');})['catch'](_0x3a5176=>this['_crash']('realtimecollaborationclient-init-connection-failed',_0x3a5176))['finally'](()=>this['_clearPendingAction']());},{'priority':'high'}),this['editor']['on']('loadRoot',async(_0x369836,[_0x3a89d3,_0x3a272b])=>{_0x369836['stop']();const _0x193272=this['editor']['model']['document']['getRoot'](_0x3a89d3);if(!this['_knownRootNames']['has'](_0x3a89d3)){const _0x29f0d6=_0x3a272b&&_0x3a272b['data']?_0x3a272b['data']:'',_0x2b9507=_0x3a272b&&_0x3a272b['attributes']?_0x3a272b['attributes']:{};await this['_loadRoot'](_0x3a89d3,_0x29f0d6,_0x2b9507);}this['editor']['model']['enqueueChange']({'isUndoable':!0x1},()=>{_0x193272['_isLoaded']=!0x0,this['editor']['model']['document']['differ']['_bufferRootLoad'](_0x193272);});},{'priority':'high'});}async['_fetchMissingUsers'](_0x5aeb9a){const _0x4801f0=this['editor']['plugins']['get'](_0x41e35a),{connection:_0x35f764}=this['editor']['plugins']['get'](c),_0x3658eb=new Set();for(const _0x28611f of _0x5aeb9a){const _0x5efccc=_0x28611f['_authorId'];_0x5efccc&&!_0x4801f0['getUser'](_0x5efccc)&&_0x3658eb['add'](_0x5efccc);}if(0x0===_0x3658eb['size'])return;const _0x5aeac6=await mt['getMany'](_0x35f764,Array['from'](_0x3658eb));for(const _0x1ebc1d of _0x5aeac6)_0x4801f0['getUser'](_0x1ebc1d['id'])||_0x4801f0['addUser'](_0x1ebc1d);}['_getOperationsFromInitData'](_0xdbb0ed,_0x4df2b2={}){const _0x4fe4c9=this['editor']['model'],_0x2a8085=[];let _0x4479a4=0x0;const _0x2851e2='string'==typeof _0xdbb0ed?{'main':_0xdbb0ed}:_0xdbb0ed;for(const _0x41249c of Object['keys'](_0x2851e2)){if(!this['_document']['roots']['has'](_0x41249c))throw new _0x42ffa0('realtimecollaborationclient-init-non-existent-root',this);const _0x2813f5=this['editor']['data']['parse'](_0x2851e2[_0x41249c]),_0x2cd706=this['_document']['getRoot'](_0x41249c),_0x30bddb=new _0x59c9e3(_0x4fe4c9['createPositionAt'](_0x2cd706,0x0),_0x2813f5,_0x4479a4++);_0x2a8085['push'](_0x30bddb);for(const [_0xa316ac,_0xbbebb]of _0x2813f5['markers']){const _0xcc65e1=_0x4fe4c9['createRange'](_0x4fe4c9['createPositionFromPath'](_0x2cd706,_0xbbebb['start']['path']['slice']()),_0x4fe4c9['createPositionFromPath'](_0x2cd706,_0xbbebb['end']['path']['slice']())),_0x1fd968=new _0xaa88bb(_0xa316ac,null,_0xcc65e1,_0x4fe4c9['markers'],!0x0,_0x4479a4++);_0x2a8085['push'](_0x1fd968);}}if(_0x4df2b2)for(const [_0xb16713,_0x462d56]of Object['entries'](_0x4df2b2)){const _0xa8fa3a=_0x4fe4c9['document']['getRoot'](_0xb16713);if(!_0xa8fa3a)throw new _0x42ffa0('multi-root-editor-root-attributes-no-root',null);for(const [_0x220375,_0x427c79]of Object['entries'](_0x462d56))if(null!==_0x427c79){const _0x3a114b=new _0x2c0d2c(_0xa8fa3a,_0x220375,null,_0x427c79,_0x4479a4++);_0x2a8085['push'](_0x3a114b);}}return _0x2a8085;}async['_loadRoot'](_0x23f950,_0x106171,_0x92ba9b){this['_getOperationsFromInitData']({[_0x23f950]:_0x106171},{[_0x23f950]:_0x92ba9b})['forEach']((_0x25706a,_0x5edd34)=>{_0x25706a['baseVersion']=this['_document']['version']+_0x5edd34,_0x25706a['_isInit']=!0x0,this['_saveOperationInBuffer'](_0x25706a);}),this['_sendBufferedOperationsDelayed'](),await this['_waitUntilSynced']();}async['_handleInitialConnectionData'](_0xae5cda,_0x2e3711){let _0x332f86;this['_offset']=_0xae5cda['offset'];const _0x3355c0=_0xae5cda['wereChangesApplied']&&!_0xae5cda['initData'],_0x24e6ca=_0x3355c0?0x0:_0xae5cda['data']['baseVersion'];if(_0x2e3711['forEach'](_0xb87059=>{_0xb87059['_isInit']=!0x0,_0xb87059['createdAt']=_0xae5cda['sessionCreatedAt'],_0xb87059['_authorId']=null;}),_0x3355c0)_0x332f86=_0x2e3711,this['_applyOperationsSet'](_0x332f86,_0x3355c0);else{if(_0xae5cda['initData']){const _0x3f83b6=this['_getOperationsFromInitData'](_0xae5cda['initData']);this['_document']['history']['version']=-_0x3f83b6['length'],_0x3f83b6['forEach'](_0x1d4deb=>{_0x1d4deb['baseVersion']-=_0x3f83b6['length'],_0x1d4deb['createdAt']=_0xae5cda['sessionCreatedAt'],_0x1d4deb['_isInit']=!0x0,_0x1d4deb['_authorId']=null;}),this['_applyOperationsSet'](_0x3f83b6,!0x0),this['serverHistory']['version']=-_0x3f83b6['length']+this['_offset'],this['_updateServerHistory'](_0x3f83b6);}this['_document']['history']['version']=_0x24e6ca,_0x332f86=this['_decompressOperations'](_0xae5cda['data'],_0xae5cda['metadata']),await this['_fetchMissingUsers'](_0x332f86),this['_applyOperationsSet'](_0x332f86,_0x3355c0);}_0xae5cda['lastOperationId']&&(this['_operationIdentifier']['setIdForTheLastOperation'](_0x332f86,_0xae5cda['lastOperationId']),this['_lastSyncedOperationId']=_0xae5cda['lastOperationId']),this['serverHistory']['version']=_0x24e6ca+this['_offset'],this['_updateServerHistory'](_0x332f86),_0x2e3711['filter'](_0x4c1d43=>{const _0x9aa8d0=this['_getAffectedRoot'](_0x4c1d43);return _0x9aa8d0&&!this['_knownRootNames']['has'](_0x9aa8d0);})['forEach']((_0x2d32d8,_0xb3528)=>{_0x2d32d8['baseVersion']=this['_document']['version']+_0xb3528,this['_saveOperationInBuffer'](_0x2d32d8);}),this['_shouldSendUpdate']()?(this['_currentBufferDelay']=0x0,this['_sendBufferedOperationsDelayed'](!0x0),await this['_waitUntilSynced']()):(this['_isPendingUpdate']=!0x1,this['_clearPendingAction']());}['_crash'](_0x63c8b4,_0x493c4b){throw this['_isPendingUpdate']=!0x0,_0x493c4b&&console['error'](_0x493c4b),new _0x42ffa0(_0x63c8b4,this['editor']);}['_saveOperationInBuffer'](_0x29327f){this['_knownOperations']['has'](_0x29327f)||(this['_knownOperations']['add'](_0x29327f),this['_bufferedOperations']['push'](_0x29327f),this['_pendingAction']||'marker'==_0x29327f['type']&&!_0x29327f['affectsData']||this['_setPendingAction']());}['_sendBufferedOperationsDelayed'](_0x5a9be2=!0x1){!_0x5a9be2&&this['_isPendingUpdate']||(this['_isPendingUpdate']=!0x0,clearTimeout(this['_sendBufferedOperationsDelayId']),this['_sendBufferedOperationsDelayId']=setTimeout(()=>{this['_sendBufferedOperations']()['then'](_0x16981e=>{_0x16981e&&(this['_clearPendingAction'](),this['_isPendingUpdate']=!0x1);})['catch'](_0x4045d7=>{if(this['_clearPendingAction'](),this['_isPendingUpdate']=!0x1,!function(_0x2fa4da){return _0x2fa4da['message']['startsWith']('cloud-services-internal-error:\x20Not\x20connected.')||_0x2fa4da['message']['startsWith']('cloud-services-internal-error:\x20Collaborative\x20Editing\x20Service\x20is\x20not\x20connected.')||_0x2fa4da['message']['startsWith']('cloud-services-internal-error:\x20Request\x20timeout.');}(_0x4045d7))throw _0x4045d7;});},this['_currentBufferDelay']));}['_waitUntilSynced'](){return new Promise(_0x56f235=>{this['on']('change:_isPendingUpdate',()=>{_0x56f235();});});}async['_sendBufferedOperations'](){const _0x301fc1=this['editor']['plugins']['get'](E);if(this['_shouldSendSelectionUpdate']()&&(_0x301fc1['createUserMarkerOperations'](),this['_hasSelectionChanged']=!0x1),!this['_shouldSendUpdate']())return!0x0;const _0x16578f=[...this['_bufferedOperations']];for(const _0x3d4383 of _0x16578f)_0x3d4383['wasUndone']=this['_document']['history']['isUndoneOperation'](_0x3d4383);const _0x3cf61d=this['_operationIdentifier']['getIdOfTheLastOperation'](_0x16578f),_0x4ccfb1=F++,_0x1bc821=this['_compressOperations'](_0x16578f),_0x43fce3=await this['_service']['sendOperations'](_0x1bc821,_0x1bc821['baseVersion'],_0x3cf61d);try{return await this['_handleServerResponse'](_0x16578f,_0x43fce3,_0x4ccfb1);}catch(_0x5c6b20){return this['_crash']('realtimecollaborationclient-sendbufferedoperations',_0x5c6b20);}}async['_handleServerResponse'](_0x20942f,_0xfbff1c,_0x486d1e){if('error'in _0xfbff1c)throw _0xfbff1c['error'];let _0x5349a3=!0x1;if(_0xfbff1c['wereChangesApplied']){_0xfbff1c['lastOperationId']&&(this['_lastSyncedOperationId']=_0xfbff1c['lastOperationId']),this['_bufferedOperations']=this['_bufferedOperations']['filter'](_0x522677=>!_0x20942f['includes'](_0x522677));for(const _0x4f0006 of _0x20942f)_0x4f0006['createdAt']='lastOperationAcceptedAt'in _0xfbff1c&&_0xfbff1c['lastOperationAcceptedAt']||void 0x0;q(_0x20942f,_0xfbff1c['version']-_0x20942f['length']),this['_updateServerHistory'](_0x20942f);const _0x36bf23=_0x20942f['filter'](_0x2aee8f=>{if(!_0x2aee8f['_isInit'])return!0x1;const _0x4b8dba=this['_getAffectedRoot'](_0x2aee8f);return _0x4b8dba&&!this['_knownRootNames']['has'](_0x4b8dba);});q(_0x36bf23,this['_document']['version']),this['_applyOperationsSet'](_0x36bf23),_0x5349a3=!0x0,this['_currentBufferDelay']=this['_baseBufferDelay'];}else{const _0x22c0eb=this['_decompressOperations'](_0xfbff1c['data'],_0xfbff1c['metadata'])['filter'](_0x364027=>_0x364027['baseVersion']>=this['_lastServerVersion']);_0x22c0eb['forEach'](_0x483935=>this['_addKnownRoot'](_0x483935)),this['_bufferedOperations']=this['_bufferedOperations']['filter'](_0x111985=>!_0x111985['_isInit']||!this['_knownRootNames']['has'](this['_getAffectedRoot'](_0x111985))),this['_bufferedOperations']['length']&&q(this['_bufferedOperations'],this['_bufferedOperations'][0x0]['baseVersion']),await this['_fetchMissingUsers'](_0x22c0eb),_0x5349a3=this['_handleExternalOperations'](_0x22c0eb,_0xfbff1c['version'],_0xfbff1c['lastOperationId']),this['_currentBufferDelay']=Math['round'](this['_currentBufferDelay']/0x2);}return _0x5349a3?!this['_shouldSendUpdate']()||(this['_sendBufferedOperationsDelayed'](!0x0),!0x1):this['_crash']('realtimecollaborationclient-handleserverresponse');}['_handleExternalOperations'](_0x25acf5,_0x211baf,_0x3b38d1){try{const _0x27627b={'document':this['_document'],'useRelations':!0x1,'padWithNoOps':!0x0},{operationsA:_0x2b3946,operationsB:_0x47da91,originalOperations:_0x3ecc0a}=_0x408fa6(_0x25acf5,this['_bufferedOperations'],_0x27627b);q(_0x2b3946,this['_document']['version']),q(_0x47da91,_0x211baf);for(const _0x31aa5f of _0x2b3946){const _0x5ac535=_0x3ecc0a['get'](_0x31aa5f);_0x31aa5f['_authorId']=_0x5ac535?_0x5ac535['_authorId']:null;}_0x3b38d1&&(this['_operationIdentifier']['setIdForTheLastOperation'](_0x25acf5,_0x3b38d1),this['_lastSyncedOperationId']=_0x3b38d1),this['_bufferedOperations']=[..._0x47da91],this['_applyOperationsSet'](_0x2b3946),this['_updateServerHistory'](_0x25acf5);}catch(_0x5bc0b3){return console['error'](_0x5bc0b3),!0x1;}return!0x0;}['_applyOperationsSet'](_0x168702,_0x2a01c6=!0x1){this['editor']['model']['enqueueChange']({'isUndoable':!0x1,'isLocal':!0x1},_0x206d00=>{for(const _0x3ac127 of _0x168702)this['_knownOperations']['add'](_0x3ac127),this['_addKnownRoot'](_0x3ac127),_0x206d00['batch']['addOperation'](_0x3ac127),this['editor']['model']['applyOperation'](_0x3ac127);});}['_addKnownRoot'](_0x117214){const _0x28fd30=this['_getAffectedRoot'](_0x117214);_0x28fd30&&this['_knownRootNames']['add'](_0x28fd30);}['_getAffectedRoot'](_0x6ce68a){let _0x52b643,_0x118939;switch(_0x6ce68a['type']){case'insert':_0x52b643=_0x6ce68a['position']['root'];break;case'marker':if(_0x118939=_0x6ce68a['newRange'],!_0x118939)return null;_0x52b643=_0x118939['root'];break;case'addRootAttribute':_0x52b643=_0x6ce68a['root'];break;case'addRoot':_0x52b643=_0x6ce68a['affectedSelectable'];break;case'move':_0x52b643=_0x6ce68a['targetPosition']['root'];break;default:return null;}return _0x52b643['rootName'];}['_updateServerHistory'](_0x5a3d68){_0x5a3d68['forEach'](_0xe84d89=>{const _0x330262=_0xe84d89['clone']();_0x330262['_authorId']=_0xe84d89['_authorId'],_0x330262['_isInit']=!!_0xe84d89['_isInit'],_0x330262['createdAt']=_0xe84d89['createdAt'],_0x330262['baseVersion']+=this['_offset'],_0xe84d89['_isDisconnection']&&this['_disconnectionOperations']['add'](_0x330262),this['serverHistory']['addOperation'](_0x330262);});}['_handleReconnectionError'](_0x54e64e){const _0x3bfb1f=this['editor']['plugins']['get']('Notification'),_0x4f39fd=this['editor']['locale'];_0x54e64e||(_0x54e64e=B(_0x4f39fd,'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.')),_0x3bfb1f['showWarning'](_0x54e64e,{'title':B(_0x4f39fd,'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'](_0x5aec10)['add'](B(this['editor']['locale'],'PENDING_ACTION_SENDING_DATA')));}['_clearPendingAction'](){this['_pendingAction']&&(this['editor']['plugins']['get'](_0x5aec10)['remove'](this['_pendingAction']),this['_pendingAction']=null);}['_compressOperations'](_0x2d6541){const _0x5cef07=_0x2d6541['map'](_0x1a1fdc=>_0x1a1fdc['toJSON']());return this['_compressor']['compress'](_0x5cef07);}['_decompressOperations'](_0x36884a,_0x323b68){return this['_compressor']['decompress'](_0x36884a)['map']((_0x1865f4,_0x4237d9)=>{const _0x2d038a='init'==_0x323b68[_0x4237d9]['type'];if('InsertOperation'==_0x1865f4['__className']){const _0x2b0003=_0x1865f4['position']['root'];!this['_document']['getRoot'](_0x2b0003)&&(this['_document']['createRoot']('$root',_0x2b0003)['_isAttached']=!0x1);}const _0xfd4823=_0x26c3a0['fromJSON'](_0x1865f4,this['_document']);return _0xfd4823['wasUndone']=_0x1865f4['wasUndone'],_0xfd4823['_isInit']=_0x2d038a,_0xfd4823['_authorId']=_0x2d038a?null:_0x323b68[_0x4237d9]['userId'],_0xfd4823['_isDisconnection']='cs:removeUser'===_0x323b68[_0x4237d9]['type'],_0xfd4823['createdAt']=_0x323b68[_0x4237d9]['createdAt'],_0xfd4823;});}['_refreshUserSelectionMarkers'](){this['_hasSelectionChanged']=!0x0,this['_shouldSendSelectionUpdate']()?this['_sendBufferedOperationsDelayed']():this['_hasSelectionChanged']=!0x1;}['_shouldSendSelectionUpdate'](){const _0x33415c=this['editor']['plugins']['get'](i)['channelSessions']['get'](this['_channelId']);return!this['editor']['isReadOnly']&&!!_0x33415c&&_0x33415c['length']>0x1&&this['_hasSelectionChanged'];}['_shouldSendUpdate'](){return this['_bufferedOperations']['length']>0x0||this['_shouldSendSelectionUpdate']();}}class H extends Error{}function q(_0x393832,_0x10d341){for(const _0x2f5043 of _0x393832)_0x2f5043['baseVersion']=_0x10d341++;}class G{['_ignoredOperations'];['_operationToId'];constructor(_0x44b14d){this['_ignoredOperations']=_0x44b14d,this['_operationToId']=new WeakMap();}['getIdOfTheLastOperation'](_0x453417){let _0x2bf301=_0x453417['length'];for(;_0x2bf301--;){const _0x1c3fc2=_0x453417[_0x2bf301];if(!this['_ignoredOperations']['has'](_0x1c3fc2)){if(!this['_operationToId']['has'](_0x1c3fc2)){const _0xb3820c=_0x163e32()['slice'](0x1,0x12);this['_operationToId']['set'](_0x1c3fc2,_0xb3820c);}return this['_operationToId']['get'](_0x1c3fc2);}}}['setIdForTheLastOperation'](_0x183523,_0x284321){if(!_0x284321)return;let _0x38a996=_0x183523['length'];for(;_0x38a996--;){const _0x282007=_0x183523[_0x38a996];this['_ignoredOperations']['has'](_0x282007)||this['_operationToId']['set'](_0x282007,_0x284321);}}}class n extends _0x1bed39{static get['requires'](){return[l];}static get['pluginName'](){return'RealTimeCollaborativeEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}class a extends _0x2d3a19{static ['CommentsService']=/* #__PURE__ -- @preserve */
26
+ ((()=>tt)());['_services'];static get['requires'](){return[c,'CommentsRepository',i,_0x41e35a];}static get['pluginName'](){return'CloudServicesCommentsAdapter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x35a06d){super(_0x35a06d),this['_services']=new Map();}async['init'](){const _0x486e2e=this['context'],_0x2b8cd6=_0x486e2e['plugins']['get']('CommentsRepository');if(_0x486e2e['plugins']['get'](c)['addToReconnectionStack'](this),_0x2b8cd6['adapter']={'addCommentThread':async({channelId:_0x1ac95e,threadId:_0xabcf76,comments:_0x3aa004,resolvedAt:_0x406689,resolvedBy:_0x245999,context:_0x28e56b,attributes:_0x17e164})=>{const _0x1ff9c2=await this['_getService'](_0x1ac95e)['addCommentThread']({'commentThreadId':_0xabcf76,'comments':_0x3aa004['map'](_0x1b3ecf=>function(_0x228d83,_0xc38987,_0x2b27f2){return{'commentThreadId':_0x2b27f2,'commentId':_0x228d83['commentId'],'userId':_0x228d83['authorId'],'content':_0x228d83['content'],'documentId':_0xc38987,'createdAt':_0x228d83['createdAt'],'attributes':_0x228d83['attributes']||{}};}(_0x1b3ecf,_0x1ac95e,_0xabcf76)),'resolvedAt':_0x406689,'resolvedBy':_0x245999,'context':_0x28e56b,'attributes':_0x17e164})['catch'](gt);return{'threadId':_0x1ff9c2['commentThreadId'],'comments':_0x1ff9c2['comments']};},'getCommentThread':async({channelId:_0x4c5863,threadId:_0x3c2f7a})=>{const _0x2da32=await this['_getService'](_0x4c5863)['getCommentThread'](_0x3c2f7a)['catch'](gt);return _0x2da32['deletedAt']?null:(await this['_fetchMissingUsersForThreads']([_0x2da32]),{'threadId':_0x2da32['commentThreadId'],'comments':_0x2da32['comments']['map'](nt),'context':_0x2da32['context'],'resolvedAt':_0x2da32['resolvedAt'],'resolvedBy':_0x2da32['resolvedBy'],'attributes':_0x2da32['attributes']||{}});},'updateCommentThread':async({channelId:_0x4339ef,threadId:_0x24efe1,context:_0x19f94d,unlinkedAt:_0x360a9b,attributes:_0x200347})=>this['_getService'](_0x4339ef)['updateCommentThread']({'commentThreadId':_0x24efe1,'context':_0x19f94d,'attributes':_0x200347,'unlinkedAt':_0x360a9b})['catch'](et)['catch'](gt),'resolveCommentThread':async({channelId:_0x18d8a4,threadId:_0x21d07b})=>{const _0x361dcd=await this['_getService'](_0x18d8a4)['resolveCommentThread'](_0x21d07b)['catch'](et)['catch'](gt);return{'threadId':_0x361dcd['commentThreadId'],'resolvedAt':_0x361dcd['resolvedAt'],'resolvedBy':_0x361dcd['resolvedBy']};},'reopenCommentThread':async({channelId:_0x18e722,threadId:_0x2c5795})=>this['_getService'](_0x18e722)['reopenCommentThread'](_0x2c5795)['catch'](et)['catch'](gt),'removeCommentThread':({channelId:_0xd516b8,threadId:_0x547f86})=>this['_getService'](_0xd516b8)['removeCommentThread'](_0x547f86)['catch'](et)['catch'](gt),'addComment':({channelId:_0x335781,threadId:_0x313fbc,commentId:_0x293c44,content:_0x5f451f,attributes:_0x2052c8})=>this['_getService'](_0x335781)['addComment'](_0x313fbc,_0x293c44,_0x5f451f,_0x2052c8)['catch'](gt),'updateComment':({channelId:_0xb2ad31,threadId:_0x590637,commentId:_0x5e6393,content:_0x1311cf,attributes:_0x1fa6e0})=>this['_getService'](_0xb2ad31)['updateComment'](_0x590637,_0x5e6393,_0x1311cf,_0x1fa6e0)['catch'](et)['catch'](gt),'removeComment':({channelId:_0xc9c17d,threadId:_0x11bd89,commentId:_0x5395d7})=>this['_getService'](_0xc9c17d)['removeComment'](_0x11bd89,_0x5395d7)['catch'](et)['catch'](gt)},_0x486e2e instanceof _0x1c8cef){const _0x4610df=_0x486e2e['config']['get']('collaboration.channelId'),_0x41734c=_0x486e2e['plugins']['get'](i);await this['_setUpService'](_0x4610df);const _0x3759ac=await this['_services']['get'](_0x4610df)['getConnectedSessions']();this['listenTo'](_0x41734c,'sessionAdd:'+_0x4610df,(_0x3cc029,{session:_0x2e1078})=>{_0x2e1078['id']===_0x41734c['mySessionId']&&(_0x3cc029['off'](),this['context']['plugins']['get']('Permissions')['setPermissions'](_0x2e1078['permissions'],_0x4610df));}),_0x41734c['register'](_0x4610df,_0x3759ac);}}async['_setUpService'](_0x3eb302){if(this['_services']['has'](_0x3eb302))throw new _0x42ffa0('cloudservicescommentsadapter-connect-already-connected',null,{'channelId':_0x3eb302});const _0x123bfa=this['context']['plugins']['get']('CommentsRepository'),_0x436899=new a['CommentsService'](_0x3eb302);this['_services']['set'](_0x3eb302,_0x436899),this['listenTo'](_0x436899,'commentThreadAdded',(_0x1c01ac,_0xa0ef86)=>{const {commentThreadId:_0xc89e9,documentId:_0x23a56a,context:_0x50d102,attributes:_0xffb3e0,resolvedAt:_0x21f502,resolvedBy:_0x5513dd,comments:_0x28317a}=_0xa0ef86;_0x123bfa['getCommentThread'](_0xc89e9)||_0x123bfa['addCommentThread']({'threadId':_0xc89e9,'channelId':_0x23a56a,'comments':_0x28317a?_0x28317a['map'](nt):[],'context':_0x50d102,'attributes':_0xffb3e0,'resolvedAt':_0x21f502,'resolvedBy':_0x5513dd,'isFromAdapter':!0x0});}),this['listenTo'](_0x436899,'commentThreadUpdated',(_0x56c1e8,{commentThreadId:_0xe2c125,documentId:_0x3597c7,context:_0x4d2289,unlinkedAt:_0x7c2c6c,attributes:_0x5c233c})=>{_0x123bfa['getCommentThread'](_0xe2c125)&&_0x123bfa['updateCommentThread']({'threadId':_0xe2c125,'channelId':_0x3597c7,'context':_0x4d2289,'unlinkedAt':_0x7c2c6c,'attributes':_0x5c233c,'isFromAdapter':!0x0});}),this['listenTo'](_0x436899,'commentThreadResolved',(_0x2b6c7b,{commentThreadId:_0x506967,resolvedBy:_0x3546a0,resolvedAt:_0x3fbb04})=>{const _0x54ac63=_0x123bfa['getCommentThread'](_0x506967);_0x54ac63&&_0x54ac63['resolve']({'resolvedBy':_0x3546a0,'resolvedAt':_0x3fbb04,'isFromAdapter':!0x0});}),this['listenTo'](_0x436899,'commentThreadReopened',(_0x159e12,{commentThreadId:_0x5578df})=>{const _0x340868=_0x123bfa['getCommentThread'](_0x5578df);_0x340868&&_0x340868['reopen']({'isFromAdapter':!0x0});}),this['listenTo'](_0x436899,'commentThreadRemoved',(_0xd6368,{commentThreadId:_0x597120})=>{const _0x5682b8=_0x123bfa['getCommentThread'](_0x597120);_0x5682b8&&_0x5682b8['remove']({'isFromAdapter':!0x0});}),this['listenTo'](_0x436899,'commentAdded',(_0x4a091e,_0x23a7c0)=>{const _0x16a2be=_0x23a7c0['commentThreadId'],_0x487730=_0x123bfa['getCommentThread'](_0x16a2be);_0x487730&&_0x487730['addComment']({...nt(_0x23a7c0),'isFromAdapter':!0x0});}),this['listenTo'](_0x436899,'commentUpdated',(_0x304c05,{commentThreadId:_0x269942,commentId:_0x25901a,content:_0x2303d8,attributes:_0x5ccf35})=>{const _0x3e6d0c=_0x123bfa['getCommentThread'](_0x269942);if(_0x3e6d0c){const _0x516e60=_0x3e6d0c['getComment'](_0x25901a);_0x516e60&&_0x516e60['update']({'content':_0x2303d8,'attributes':_0x5ccf35,'isFromAdapter':!0x0});}}),this['listenTo'](_0x436899,'commentRemoved',(_0x340407,{commentThreadId:_0x532f78,commentId:_0x34643d})=>{const _0x984cb7=_0x123bfa['getCommentThread'](_0x532f78);if(_0x984cb7){const _0x27c3f4=_0x984cb7['getComment'](_0x34643d);_0x27c3f4&&_0x27c3f4['remove']({'isFromAdapter':!0x0});}}),await this['_connectService'](_0x3eb302);}['destroy'](){if(this['context']instanceof _0x1c8cef){const _0x153b8f=this['context']['config']['get']('collaboration.channelId');this['_terminateService'](_0x153b8f);}}['_terminateService'](_0x460a01){if(!this['_services']['has'](_0x460a01))throw new _0x42ffa0('cloudservicescommentsadapter-disconnect-not-exist',null,{'channelId':_0x460a01});this['_getService'](_0x460a01)['disconnect'](),this['_services']['delete'](_0x460a01);}async['reconnect'](){for(const _0x49a36d of this['_services']['keys']())await this['_connectService'](_0x49a36d);if(this['context']instanceof _0x1c8cef){const _0x5cccf0=this['context']['config']['get']('collaboration.channelId'),_0xb6062a=this['context']['plugins']['get'](i);_0xb6062a['unregister'](_0x5cccf0);const _0x2d5fc8=await this['_services']['get'](_0x5cccf0)['getConnectedSessions']();_0xb6062a['register'](_0x5cccf0,_0x2d5fc8);}}async['_connectService'](_0x459057){const {connection:_0x2f5bda}=this['context']['plugins']['get'](c),_0x419daf=this['context']['plugins']['get']('CommentsRepository'),_0x292226=this['_services']['get'](_0x459057),_0x3a0b23=await _0x292226['connect'](_0x2f5bda);await this['_fetchMissingUsersForThreads'](_0x3a0b23);const _0x542074=new Set(Array['from'](_0x419daf['getCommentThreads']({'channelId':_0x459057}),_0x1190a8=>_0x1190a8['id']));for(const _0x5e39fe of _0x3a0b23)_0x5e39fe['deletedAt']||_0x542074['delete'](_0x5e39fe['commentThreadId']);for(const _0x2d9121 of _0x542074)_0x419daf['getCommentThread'](_0x2d9121)['remove']({'isFromAdapter':!0x0});for(const _0x30bcc2 of _0x3a0b23){let _0x8a6e75=_0x419daf['getCommentThread'](_0x30bcc2['commentThreadId']);const {commentThreadId:_0x226622,context:_0x2b2fcb,attributes:_0x222e27,resolvedBy:_0x1a7c9c,resolvedAt:_0x478de3,unlinkedAt:_0x30ed72,deletedAt:_0x3e24a4}=_0x30bcc2;if(_0x3e24a4)continue;_0x8a6e75||(_0x8a6e75=_0x419daf['addCommentThread']({'channelId':_0x459057,'threadId':_0x226622,'context':_0x2b2fcb,'attributes':_0x222e27||{},'resolvedBy':_0x1a7c9c,'resolvedAt':_0x478de3,'unlinkedAt':_0x30ed72,'isFromAdapter':!0x0}));const _0xfd015e=new Set(Array['from'](_0x8a6e75['comments'],_0x42d832=>_0x42d832['id']));for(const _0x28f005 of _0x30bcc2['comments'])_0xfd015e['delete'](_0x28f005['commentId']);for(const _0x524629 of _0xfd015e)_0x8a6e75['getComment'](_0x524629)['remove']({'isFromAdapter':!0x0});for(const _0x29b7f2 of _0x30bcc2['comments']){const _0x54cd4c=_0x8a6e75['getComment'](_0x29b7f2['commentId']);_0x54cd4c?_0x54cd4c['content']!==_0x29b7f2['content']&&_0x54cd4c['update']({'content':_0x29b7f2['content'],'isFromAdapter':!0x0}):_0x8a6e75['addComment'](Object['assign'](nt(_0x29b7f2),{'isFromAdapter':!0x0}));}}}['_getService'](_0x394deb){if(!this['_services']['has'](_0x394deb))throw new _0x42ffa0('cloudservicescommentsadapter-service-not-exist',null,{'channelId':_0x394deb});return this['_services']['get'](_0x394deb);}async['_fetchMissingUsersForThreads'](_0x4d654c){const _0x396ca4=this['context']['plugins']['get'](_0x41e35a),{connection:_0x35f8d3}=this['context']['plugins']['get'](c),_0x5841fb=new Set();for(const {resolvedBy:_0x352da0,comments:_0x14b075}of _0x4d654c){_0x352da0&&!_0x396ca4['getUser'](_0x352da0)&&_0x5841fb['add'](_0x352da0);for(const {userId:_0x4557c8}of _0x14b075)_0x396ca4['getUser'](_0x4557c8)||_0x5841fb['add'](_0x4557c8);}if(0x0===_0x5841fb['size'])return;const _0x4fee84=await mt['getMany'](_0x35f8d3,Array['from'](_0x5841fb));for(const _0x5e55f6 of _0x4fee84)_0x396ca4['getUser'](_0x5e55f6['id'])||_0x396ca4['addUser'](_0x5e55f6);}}async function et(_0x560670){if('404'!==_0x560670['code'])throw _0x560670;}function gt(_0x122e03){if((_0x30f63b=_0x122e03)['message']['startsWith']('cloud-services-internal-error:\x20Comments\x20Service\x20is\x20not\x20connected.')||_0x30f63b['message']['startsWith']('cloud-services-internal-error:\x20Not\x20connected.')||_0x30f63b['message']['startsWith']('cloud-services-internal-error:\x20Request\x20timeout.'))return new Promise(()=>{});var _0x30f63b;throw _0x122e03;}function nt(_0x297101){return{'threadId':_0x297101['commentThreadId'],'commentId':_0x297101['commentId'],'content':_0x297101['content'],'createdAt':_0x297101['createdAt'],'authorId':_0x297101['userId'],'attributes':_0x297101['attributes']||{}};}class f extends _0x1bed39{static ['TrackChangesService']=/* #__PURE__ -- @preserve */
27
+ ((()=>at)());['_bufferedRequests'];['_trackChangesService'];static get['requires'](){return[a,'TrackChangesEditing',c];}constructor(_0x5e74da){super(_0x5e74da);const _0x49ca3d=this['editor']['config']['get']('collaboration.channelId');this['_bufferedRequests']=new Map(),this['_trackChangesService']=new f['TrackChangesService'](_0x49ca3d);}['init'](){const _0xf160a0=this['editor']['plugins']['get'](c),_0x5db2bc=this['editor']['plugins']['get']('TrackChangesEditing');return _0x5db2bc['adapter']={'getSuggestion':async _0x255ff8=>{await this['_waitForServiceReady']();const _0x32013a=await this['_trackChangesService']['get'](_0x255ff8)['catch'](ot);return await this['_fetchMissingUsersForThreads']([_0x32013a]),_0x32013a;},'addSuggestion':async({id:_0x4563d4,type:_0x1fb236,data:_0x124218,originalSuggestionId:_0xf1a11f,attributes:_0x57b4c3})=>{await this['_waitForServiceReady']();const _0xfdebb9={'id':_0x4563d4,'type':_0x1fb236,'data':_0x124218,'originalSuggestionId':_0xf1a11f,'attributes':_0x57b4c3},_0x5227f0=await this['_trackChangesService']['add'](_0x4563d4,_0x1fb236,_0x124218,_0xf1a11f,_0x57b4c3)['catch'](_0x21380a=>{if(wt(_0x21380a))return new Promise(_0x41d81c=>{this['_bufferedRequests']['set'](_0x4563d4,{'resolve':_0x41d81c,'suggestionData':_0xfdebb9});});throw _0x21380a;});return this['_bufferedRequests']['delete'](_0x4563d4),_0x5227f0;},'updateSuggestion':async(_0x513f09,_0x5ee5e6)=>{if(await this['_waitForServiceReady'](),'open'!==_0x5ee5e6['state'])return this['_trackChangesService']['update'](_0x513f09,_0x5ee5e6)['catch'](ot);}},this['listenTo'](this['_trackChangesService'],'suggestionUpdated',(_0x1cadc5,_0x2e0fc5)=>{_0x5db2bc['hasSuggestion'](_0x2e0fc5['id'])&&(_0x5db2bc['getSuggestion'](_0x2e0fc5['id'])['attributes']=_0x2e0fc5['attributes']);}),this['_trackChangesService']['connect'](_0xf160a0['connection'])['then'](_0x26574d=>(_0xf160a0['addToReconnectionStack'](this),this['_fetchMissingUsersForThreads'](_0x26574d)['then'](()=>{for(const _0x5bb1ab of _0x26574d){_0x5db2bc['addSuggestionData'](_0x5bb1ab)['_saved']=!0x0;}})));}async['reconnect'](){const _0x55150d=this['editor']['plugins']['get']('TrackChangesEditing'),{connection:_0x2cf341}=this['editor']['plugins']['get'](c),_0x338a73=await this['_trackChangesService']['connect'](_0x2cf341);await this['_fetchMissingUsersForThreads'](_0x338a73);for(const {suggestionData:_0x3a476b,resolve:_0x12eac8}of this['_bufferedRequests']['values']()){let _0x164ac0=_0x338a73['find'](_0x34a3ca=>_0x34a3ca['id']===_0x3a476b['id']);_0x164ac0||(_0x164ac0=await this['_trackChangesService']['add'](_0x3a476b['id'],_0x3a476b['type'],_0x3a476b['data'],_0x3a476b['originalSuggestionId'])),_0x12eac8(_0x164ac0);}for(const _0x5ec7d7 of _0x338a73)_0x55150d['hasSuggestion'](_0x5ec7d7['id'])||_0x55150d['addSuggestionData'](_0x5ec7d7);}async['_waitForServiceReady'](){this['_trackChangesService']['isConnected']||await new Promise(_0x25416c=>{this['listenTo'](this['_trackChangesService'],'connected',_0x3367b2=>{_0x3367b2['off'](),_0x25416c();});});}async['_fetchMissingUsersForThreads'](_0x216435){const _0x3c15d4=this['editor']['plugins']['get'](_0x41e35a),{connection:_0x3fc23d}=this['editor']['plugins']['get'](c),_0x2e49eb=new Set();for(const {authorId:_0x9b48f4}of _0x216435)_0x3c15d4['getUser'](_0x9b48f4)||_0x2e49eb['add'](_0x9b48f4);if(0x0===_0x2e49eb['size'])return;const _0x5eefac=await mt['getMany'](_0x3fc23d,Array['from'](_0x2e49eb));for(const _0x16ba03 of _0x5eefac)_0x3c15d4['getUser'](_0x16ba03['id'])||_0x3c15d4['addUser'](_0x16ba03);}}function ot(_0x8b36e1){if(wt(_0x8b36e1))return new Promise(()=>{});throw _0x8b36e1;}function wt(_0x30034d){return _0x30034d['message']['startsWith']('cloud-services-internal-error:\x20Not\x20connected.')||_0x30034d['message']['startsWith']('cloud-services-internal-error:\x20Request\x20timeout.');}class m extends _0x1bed39{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 _0x261bd8=this['editor']['plugins']['get'](c),_0x581fe5=this['editor']['plugins']['get']('CommentsEditing'),_0x49c9b2=this['editor']['plugins']['get'](a);return this['editor']['data']['once']('ready',()=>{this['listenTo'](_0x261bd8,'change:state',(_0x2f1f81,_0x35054f,_0x39aea5)=>{_0x581fe5['isThreadsLoadingPaused']='connected'!==_0x39aea5;});}),this['listenTo'](_0x261bd8,'change:state',(_0x3a87f9,_0x1267d1,_0x418c5f)=>{this['editor']['plugins']['get']('CommentsRepository')['switchReadOnly']('connected'!==_0x418c5f);}),_0x49c9b2['_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 _0x1bed39{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 _0x1bed39{static ['RevisionHistoryService']=/* #__PURE__ -- @preserve */
28
+ ((()=>st)());['_lastRequestId'];['_revisionTracker'];['_revisionHistoryService'];['_oldOffset'];static get['requires'](){return[c,l,'RevisionTracker',i,_0x41e35a];}constructor(_0x2c4bde){super(_0x2c4bde);const _0x13fc65=this['editor']['config']['get']('collaboration.channelId');this['_lastRequestId']=null,this['_revisionTracker']=this['editor']['plugins']['get']('RevisionTracker'),this['_revisionHistoryService']=new u['RevisionHistoryService'](_0x13fc65);}async['init'](){const _0x72e54=this['editor']['plugins']['get'](l),_0x605098=_0x72e54['serverHistory'],_0x5e462e=this['editor']['plugins']['get'](c);this['_revisionTracker']['setSource']({'history':_0x605098,'getLatestVersion':()=>this['_getLatestVersion'](),'getCurrentRevisionId':()=>_0x72e54['sessionId']});const _0x198e65=this['editor']['config']['get']('cloudServices.bundleVersion')||ht,_0x333d6c=await it['isBundleUploaded'](_0x5e462e['connection'],_0x198e65);this['_revisionTracker']['adapter']={'getRevision':async({revisionId:_0x5bab6c})=>(await this['_waitForServiceReady'](),await this['_revisionHistoryService']['getRevision'](_0x5bab6c)),'updateRevisions':async _0x4c615d=>{await this['_waitForServiceReady']();const _0x4ed40e=this['_revisionTracker']['currentRevision'];if(_0x333d6c&&0x1===_0x4c615d['length']&&_0x4c615d[0x0]['id']===_0x4ed40e['id'])return _0x4c615d;for(const _0x29076f of _0x4c615d)_0x29076f['id']===_0x4ed40e['id']&&(_0x29076f['isEmptyCurrent']=_0x29076f['fromVersion']===_0x29076f['toVersion']);return this['_revisionHistoryService']['updateRevisions'](_0x4c615d,this['_lastRequestId'])['then'](_0x22bf16=>(this['_lastRequestId']=_0x22bf16,_0x4c615d))['catch'](_0x150c21=>{if(rt(_0x150c21)||'400'===_0x150c21['code']&&void 0x0!==_0x150c21['data']['wrongRequestId']){for(const _0xb20cac of _0x4c615d){!this['_revisionTracker']['repository']['getRevision'](_0xb20cac['id'])||this['_revisionTracker']['_bufferUpdate'](_0xb20cac['id'],_0xb20cac,!0x1);}if(rt(_0x150c21))throw _0x150c21;return _0x4c615d;}throw _0x150c21;});}},this['listenTo'](this['_revisionHistoryService'],'revisionsUpdated',(_0x3d12a3,{revisionsData:_0x255cc1,requestId:_0x169151})=>{Math['max'](..._0x255cc1['map'](_0x483e5b=>_0x483e5b['toVersion']))>this['_getLatestVersionFromServerOperations']()-0x1?this['_getLatestVersion']()['then'](()=>{this['_handleRevisionsUpdate'](_0x255cc1,_0x169151);}):this['_handleRevisionsUpdate'](_0x255cc1,_0x169151);});const {revisions:_0x10da44,requestId:_0x387194}=await this['_revisionHistoryService']['connect'](_0x5e462e['connection']);_0x5e462e['addToReconnectionStack'](this),this['_lastRequestId']=_0x387194,await this['_fetchMissingUsers'](_0x10da44);for(const _0x6d0e47 of _0x10da44)this['_revisionTracker']['addRevisionData'](_0x6d0e47);this['listenTo'](_0x72e54,'change:_isConnected',(_0x3ad312,_0x72fcaa,_0x91c35)=>{_0x91c35&&(this['_oldOffset']=_0x72e54['_offset'],_0x3ad312['off']());}),this['_revisionTracker']['bind']('isEnabled')['to'](_0x5e462e,'state',_0x1472f2=>_0x1472f2===_0x4b7c68['CONNECTED']);}async['reconnect'](){const _0xc7fa48=this['editor']['plugins']['get'](c),_0x2f2046=this['editor']['plugins']['get'](l),_0x6411d2=async()=>{const _0x3a21ea=this['_revisionTracker']['currentRevision'],_0x35ffd5=_0x3a21ea['id'],_0x3ffc8e=_0x35ffd5!==_0x2f2046['sessionId'];if(_0x3ffc8e){const _0x180fa8=_0x2f2046['_offset']-this['_oldOffset'],_0x10f4b4=this['_getLatestVersionFromServerOperations']();this['_revisionTracker']['_revisionDataBuilder']['reInit']();if(_0x3a21ea['toVersion']+_0x180fa8!==_0x10f4b4){const _0x20664e=_0x3a21ea['fromVersion']+_0x180fa8,_0x3f7687=this['editor']['plugins']['get'](_0x41e35a),_0x4e5e4b=this['_revisionTracker']['buildRevisionData']({'revision':_0x3a21ea,'from':_0x20664e,'to':_0x10f4b4});_0x4e5e4b['id']=_0x3a21ea['id'];const _0x245074=_0x4e5e4b['authorsIds']['map'](_0x1b1616=>_0x3f7687['getUser'](_0x1b1616));_0x3a21ea['_update']({..._0x4e5e4b,'authors':_0x245074},!0x0),this['_revisionTracker']['_bufferUpdate'](_0x3a21ea['id'],_0x4e5e4b,!0x0);}this['_revisionTracker']['_startingVersion']=_0x10f4b4,(_0x3a21ea['toVersion']===_0x3a21ea['fromVersion']&&!this['_revisionTracker']['_bufferedUpdates']['has'](_0x35ffd5)&&this['_revisionTracker']['repository']['_revisions']['remove'](_0x35ffd5),this['_revisionTracker']['_createCurrentRevision'](_0x10f4b4));}const {revisions:_0x319c19,requestId:_0x5db952}=await this['_revisionHistoryService']['reconnect'](_0xc7fa48['connection'],this['_lastRequestId']);_0x3ffc8e&&_0x319c19['length']>0x0?_0x2f2046['_handleReconnectionError']():(await this['_fetchMissingUsers'](_0x319c19),this['_handleRevisionsUpdate'](_0x319c19,_0x5db952),this['_revisionTracker']['sendBufferedUpdates']());};return _0x2f2046['_isConnected']?_0x6411d2():new Promise((_0x54e9d7,_0x234698)=>{_0x2f2046['once']('change:_isConnected',()=>{_0x6411d2()['then'](_0x54e9d7)['catch'](_0x234698);});});}['destroy'](){super['destroy']();}async['_waitForServiceReady'](){this['_revisionHistoryService']['isConnected']||await new Promise(_0x3cc46c=>{this['listenTo'](this['_revisionHistoryService'],'connected',_0x4d2bfc=>{_0x4d2bfc['off'](),_0x3cc46c();});});}['_getLatestVersionFromServerOperations'](){const _0x232fb1=this['editor']['plugins']['get'](l)['serverHistory']['getOperations']()['reverse']();for(const _0x3ea7f6 of _0x232fb1)if('marker'!==_0x3ea7f6['type']||_0x3ea7f6['affectsData'])return _0x3ea7f6['baseVersion']+0x1;}['_getLatestVersion'](){const _0x3ac395=this['editor']['plugins']['get'](l);return new Promise(_0x11ce1f=>{_0x3ac395['_isPendingUpdate']?_0x3ac395['once']('change:_isPendingUpdate',()=>{_0x11ce1f(this['_getLatestVersionFromServerOperations']());}):_0x11ce1f(this['_getLatestVersionFromServerOperations']());});}['_handleRevisionsUpdate'](_0x564741,_0x37eeb5){const _0x5d8e04=this['_revisionTracker']['repository'];this['_lastRequestId']=_0x37eeb5;for(const _0x37a827 of _0x564741){const _0x2029b3=_0x5d8e04['getRevision'](_0x37a827['id']);if(_0x2029b3){if((_0x37a827['fromVersion']||_0x37a827['toVersion'])&&(_0x37a827['diffData']=null),_0x2029b3===this['_revisionTracker']['currentRevision']){const _0x5795e0=Math['max'](_0x2029b3['toVersion'],_0x37a827['toVersion']),_0x39e7de=Math['max'](_0x2029b3['fromVersion'],_0x37a827['fromVersion']);let _0x4931e5;_0x2029b3['toVersion']===_0x37a827['toVersion']&&_0x2029b3['fromVersion']===_0x37a827['fromVersion']?(_0x4931e5=!0x0,this['_preventResendingRevisionData'](_0x37a827)):_0x37a827['toVersion']===_0x5795e0&&_0x37a827['fromVersion']===_0x39e7de?_0x4931e5=!0x1:(_0x2029b3['toVersion']===_0x5795e0&&_0x2029b3['fromVersion']===_0x39e7de||this['_fixRevision']({'revision':_0x2029b3,'from':_0x39e7de,'to':_0x5795e0}),_0x4931e5=!0x0),_0x4931e5&&(delete _0x37a827['fromVersion'],delete _0x37a827['toVersion'],delete _0x37a827['diffData'],delete _0x37a827['createdAt'],delete _0x37a827['authorsIds']);}this['_revisionTracker']['setRevisionData'](_0x37a827),this['_preventResendingRevisionData'](_0x37a827);}else this['_revisionTracker']['addRevisionData'](_0x37a827);}const _0xd3a17b=_0x5d8e04['getRevisions']();_0xd3a17b['reverse']();for(let _0x5876a9=0x0;_0x5876a9<_0xd3a17b['length']-0x1;_0x5876a9++){const _0x15170f=_0xd3a17b[_0x5876a9],_0x1b5eae=_0xd3a17b[_0x5876a9+0x1];if(_0x15170f['fromVersion']<_0x1b5eae['toVersion']){const _0x4edbea=_0x1b5eae['toVersion'],_0x106284=Math['max'](_0x4edbea,_0x15170f['toVersion']);this['_fixRevision']({'revision':_0x15170f,'from':_0x4edbea,'to':_0x106284});}}}['_fixRevision']({revision:_0x1d946a,from:_0x5d3ec5,to:_0x9c941}={}){const _0x474cf4=this['editor']['plugins']['get'](_0x41e35a),_0x5a152f=this['_revisionTracker']['buildRevisionData']({'revision':_0x1d946a,'from':_0x5d3ec5,'to':_0x9c941});_0x5a152f['authors']=_0x5a152f['authorsIds']['map'](_0x5c9b2b=>_0x474cf4['getUser'](_0x5c9b2b)),_0x1d946a['_update'](_0x5a152f);}['_preventResendingRevisionData'](_0x431f2d){const _0xdae457={};_0xdae457['id']=_0x431f2d['id'];for(const _0x1a57fd of Object['keys'](_0x431f2d))'id'!==_0x1a57fd&&(_0xdae457[_0x1a57fd]=void 0x0);this['_revisionTracker']['_bufferUpdate'](_0xdae457['id'],_0xdae457,!0x0);}async['_fetchMissingUsers'](_0x5a1a4e){const _0x2557ff=this['editor']['plugins']['get'](_0x41e35a),{connection:_0x2dbb86}=this['editor']['plugins']['get'](c),_0x5c6b4f=new Set();for(const _0x31753e of _0x5a1a4e){for(const _0x1117c5 of _0x31753e['authorsIds'])_0x1d3fd0(_0x1117c5);_0x31753e['creatorId']&&_0x1d3fd0(_0x31753e['creatorId']);}if(0x0===_0x5c6b4f['size'])return;const _0x102bf9=await mt['getMany'](_0x2dbb86,Array['from'](_0x5c6b4f));for(const _0x5ec9ba of _0x102bf9)_0x2557ff['getUser'](_0x5ec9ba['id'])||_0x2557ff['addUser'](_0x5ec9ba);function _0x1d3fd0(_0x2e59cf){_0x2557ff['getUser'](_0x2e59cf)||_0x5c6b4f['add'](_0x2e59cf);}}}function rt(_0x464d69){return _0x464d69['message']['startsWith']('cloud-services-internal-error:\x20Revision\x20History\x20Service\x20is\x20not\x20connected.')||_0x464d69['message']['startsWith']('cloud-services-internal-error:\x20Not\x20connected.')||_0x464d69['message']['startsWith']('cloud-services-internal-error:\x20Request\x20timeout.');}class g extends _0x1bed39{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 _0x28ba21{constructor(_0x30ab94){super(_0x30ab94);const _0x1c97ce=this['bindTemplate'];this['set']('usersCount',0x0),this['set']('isHidden',!0x0),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-presence-list__counter',_0x1c97ce['if']('isHidden','ck-presence-list__counter--hidden')]},'children':[{'text':_0x1c97ce['to']('usersCount',_0xd069f5=>B(_0x30ab94,'CONNECTED_USERS',_0xd069f5))}]});}}class es extends _0x28ba21{['items'];['keystrokes'];constructor(_0x33d6b7){super(_0x33d6b7);const _0xb22c16=this['bindTemplate'];this['items']=this['createCollection'](),this['keystrokes']=new _0x3e50ca(),this['set']({'hasPopup':!0x1,'isExpanded':!0x1}),this['setTemplate']({'tag':'div','attributes':{'aria-haspopup':_0xb22c16['if']('hasPopup'),'aria-expanded':_0xb22c16['to']('isExpanded',_0x12ce44=>this['hasPopup']&&String(_0x12ce44)),'aria-label':_0xb22c16['to']('hasPopup',_0x8f8b9f=>B(_0x33d6b7,_0x8f8b9f?'Collapsed\x20connected\x20users\x20list\x20(press\x20ENTER\x20to\x20open\x20it)':'Connected\x20users\x20list')),'role':'list','tabindex':_0xb22c16['to']('hasPopup',_0x50b9c6=>!!_0x50b9c6&&0x0),'class':['ck','ck-presence-list__list']},'children':this['items'],'on':{'click':_0xb22c16['to'](()=>this['fire']('execute'))}}),this['on']('change:hasPopup',(_0x344c16,_0x2b15ea,_0x1c3a7e)=>{this['element']&&(_0x1c3a7e?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 _0x28ba21{['counterView'];['inlineListView'];constructor(_0x317d07){super(_0x317d07);const _0x1e6e76=this['bindTemplate'];this['set']('isCollapsed',!0x0),this['counterView']=new ts(this['locale']),this['inlineListView']=new es(_0x317d07),this['inlineListView']['bind']('hasPopup')['to'](this,'isCollapsed'),this['listenTo'](this['inlineListView']['items'],'change',()=>{for(const _0x4164d2 of this['inlineListView']['items'])_0x4164d2['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',_0x1e6e76['if']('isCollapsed','ck-presence-list--collapsed')]},'children':[this['counterView'],this['inlineListView']]});}}class j extends _0x28ba21{['listWrapperView'];constructor(_0x1d663a,_0x411b62){super(_0x1d663a),this['listWrapperView']=new vt(_0x1d663a,_0x411b62),this['setTemplate']({'tag':'div','attributes':{'tabindex':-0x1,'role':'application','class':['ck','ck-presence-list__dropdown-list'],'aria-label':B(_0x1d663a,'Connected\x20users\x20list\x20dropdown\x20menu')},'children':[this['listWrapperView']]});}}class vt extends _0x25ec3b{constructor(_0x1489e8,_0x567f2d){super(_0x1489e8);const _0x4754a4=this['bindTemplate'];this['set']('_isScrollable',!0x1),this['setTemplate']({'tag':_0x567f2d?'div':'ul','attributes':{'class':['ck','ck-reset','ck-list','ck-presence-list__dropdown-list-wrapper',_0x4754a4['if']('_isScrollable','ck-presence-list__dropdown-list-wrapper_scrollable')],'role':_0x4754a4['to']('role'),'aria-label':_0x4754a4['to']('ariaLabel'),'aria-labelledby':_0x4754a4['to']('ariaLabelledBy')},'children':this['items']}),this['listenTo'](_0x1a4fbb['window'],'resize',()=>this['checkIfScrollable']()),this['items']['on']('change',()=>this['checkIfScrollable']());}['render'](){super['render'](),this['checkIfScrollable']();}['checkIfScrollable'](){const _0x2ec0bb=this['element'];_0x2ec0bb&&(this['_isScrollable']=Math['max'](_0x2ec0bb['scrollHeight'],_0x2ec0bb['clientHeight'])>0.8*window['innerHeight']);}}class k extends ct{['userView'];constructor(_0x58e48f,_0x42c684,_0x8cb226){super(_0x58e48f);const _0x110ee9=this['bindTemplate'];this['userView']=new lt(_0x58e48f,_0x42c684);const _0x580251={'tag':'li','attributes':{'class':['ck','ck-presence-list__dropdown-list-item'],'tabindex':-0x1,'role':'presentation','aria-label':_0x42c684['name']},'children':[this['userView'],{'tag':'span','attributes':{'class':['ck','ck-user__full-name']},'children':[{'text':_0x42c684['name']}]},{'tag':'span','attributes':{'class':['ck','ck-presence-list__marker',_0x42c684['color']['getBackgroundColorClass']()],'aria-hidden':'true'}}]};_0x8cb226&&(_0x580251['tag']='button',_0x580251['on']={'click':_0x110ee9['to'](()=>this['fire']('execute'))}),this['setTemplate'](_0x580251);}['focus'](){this['element']['focus']();}}class y extends _0x28ba21{['userView'];['markerView'];constructor(_0xcd7ee0,_0x47bf74,_0x1af21c){super(_0xcd7ee0);const _0x4fbebb=this['bindTemplate'];this['set']('isFocusable',!0x1),this['set']('hasTooltip',!0x0),this['set']('tooltipPosition',''),this['userView']=new lt(_0xcd7ee0,_0x47bf74),this['markerView']=new dt(_0xcd7ee0,_0x47bf74);const _0x57421c=new pt(_0xcd7ee0);_0x57421c['template']['tag']='span',_0x57421c['text']=_0x47bf74['name'];const _0x36ec41={'tag':'div','attributes':{'class':['ck','ck-presence-list__list-item'],'role':'listitem','tabindex':_0x4fbebb['to']('isFocusable',_0x35035f=>!!_0x35035f&&0x0),'aria-labelledby':_0x57421c['id'],'data-cke-tooltip-text':this['userView']['name'],'data-cke-tooltip-position':_0x4fbebb['to']('tooltipPosition'),'data-cke-tooltip-disabled':_0x4fbebb['to']('hasTooltip',_0x38a50a=>!_0x38a50a),'data-cke-tooltip-class':'ck-presence-list__list-item__tooltip'},'children':[this['userView'],this['markerView'],_0x57421c]};_0x1af21c&&(_0x36ec41['tag']='button',_0x36ec41['on']={'click':_0x4fbebb['to'](()=>this['fire']('execute'))}),this['setTemplate'](_0x36ec41);}}class dt extends _0x28ba21{constructor(_0x277616,_0xe70aea){super(_0x277616),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-presence-list__marker',_0xe70aea['color']['getBackgroundColorClass']()],'aria-hidden':'true'}});}}const A={'collapseAt':0x6,'displayMe':!0x0};class r extends _0x2d3a19{['currentDisplayedUsers'];['balloonPanelView'];['view'];['presenceDropdownView'];['_bodyCollection']=null;constructor(_0x393f11){super(_0x393f11),this['context']['config']['define']('presenceList',A);const _0xbb407c=_0x393f11['config']['get']('presenceList.collapseAt');if('number'!=typeof _0xbb407c)throw new _0x42ffa0('presencelist-collapseat-invalid-format',this);if(_0xbb407c<0x1)throw new _0x42ffa0('presencelist-collapseat-invalid-format',this);this['_allConnectedUsers']=this['context']['plugins']['get'](i)['allConnectedUsers'],this['set']('usersCount',0x0),this['currentDisplayedUsers']=new _0x3e24e7(),this['balloonPanelView']=new _0x5689c7(),this['balloonPanelView']['class']='ck\x20ck-presence-list__balloon',this['view']=this['_createView'](),this['presenceDropdownView']=void 0x0;}static get['requires'](){return[i];}['init'](){for(const _0x5ea9a9 of this['_allConnectedUsers'])this['_handleUserAdd'](_0x5ea9a9);this['listenTo'](this['_allConnectedUsers'],'add',(_0x402852,_0x20be83)=>{this['_handleUserAdd'](_0x20be83);}),this['listenTo'](this['_allConnectedUsers'],'remove',(_0x148091,_0x3de67a)=>{this['_handleUserRemove'](_0x3de67a);});}['_createView'](){const _0x27c248=this['context'],_0x128368=new L(this['context']['locale']),_0x383055=this['balloonPanelView'];if(!_0x26db0b(_0x27c248['config']['get']('presenceList.container')))throw new _0x42ffa0('presencelist-missing-container',this);return _0x128368['counterView']['bind']('usersCount')['to'](this),_0x128368['bind']('isCollapsed')['to'](this,'usersCount',_0x29b017=>{const {collapseAt:_0xac93d6,displayMe:_0x47c319}=_0x27c248['config']['get']('presenceList'),_0x11697f=_0x29b017>=_0xac93d6;return _0x128368['counterView']['isHidden']=!(0x1==_0x29b017&&_0x47c319||_0x11697f),_0x11697f||this['hideDropdown'](),_0x11697f;}),_0x128368['inlineListView']['items']['bindTo'](this['currentDisplayedUsers'])['using'](_0x218e9c=>{const _0x231ac9=_0x27c248['config']['get']('presenceList'),_0x30b4cf=new y(_0x27c248['locale'],_0x218e9c,!!_0x231ac9['onClick']);return _0x30b4cf['bind']('hasTooltip')['to'](_0x128368,'isCollapsed',_0x43f1c9=>!_0x43f1c9),_0x30b4cf['bind']('isFocusable')['to'](_0x128368,'isCollapsed',_0x17b0ac=>!_0x17b0ac),_0x231ac9['onClick']&&this['listenTo'](_0x30b4cf,'execute',()=>{this['view']['isCollapsed']||_0x231ac9['onClick'](_0x218e9c,_0x30b4cf['element']);}),_0x30b4cf;}),this['listenTo'](_0x128368['inlineListView'],'execute',()=>{this['presenceDropdownView']?this['hideDropdown']():this['view']['isCollapsed']&&this['showDropdown']();}),_0x128368['inlineListView']['keystrokes']['set']('Enter',(_0x34b5be,_0x387edd)=>{this['view']['isCollapsed']&&(this['showDropdown'](),_0x387edd());}),_0x128368['render'](),_0x383055['render'](),_0x26b942({'emitter':_0x128368,'activator':()=>_0x383055['isVisible'],'contextElements':[_0x383055['element'],_0x128368['inlineListView']['element']],'callback':()=>this['hideDropdown']()}),_0x27c248['config']['get']('presenceList.container')['appendChild'](_0x128368['element']),this['_bodyCollection']=new _0x15dce7(this['context']['locale']),this['_bodyCollection']['attachToDom'](),this['_bodyCollection']['add'](this['balloonPanelView']),_0x128368;}['_handleUserAdd'](_0x267019){if(!this['context']['config']['get']('presenceList.displayMe')&&_0x267019['isMe'])return;const _0x5a653d=this['context']['config']['get']('presenceList.collapseAt')-0x1;this['usersCount']++,this['currentDisplayedUsers']['length']==_0x5a653d&&this['currentDisplayedUsers']['length']>0x1&&this['currentDisplayedUsers']['remove'](0x1);const _0x5c73c2=_0x267019['isMe']?0x0:this['currentDisplayedUsers']['length'];this['currentDisplayedUsers']['add'](_0x267019,_0x5c73c2);}['_handleUserRemove'](_0x2ff1e1){if(this['usersCount']--,this['currentDisplayedUsers']['get'](_0x2ff1e1['id'])&&(this['currentDisplayedUsers']['remove'](_0x2ff1e1['id']),this['currentDisplayedUsers']['length']<this['usersCount'])){for(const _0x7cf985 of Array['from'](this['_allConnectedUsers'])['reverse']())if(!this['currentDisplayedUsers']['get'](_0x7cf985['id']))return void this['currentDisplayedUsers']['add'](_0x7cf985,Math['min'](this['currentDisplayedUsers']['length'],0x1));}}['showDropdown'](){if(this['presenceDropdownView'])return;const _0x33a4be=this['context']['config']['get']('presenceList');this['presenceDropdownView']=new j(this['context']['locale'],!!_0x33a4be['onClick']),this['view']['inlineListView']['isExpanded']=!0x0;const {listWrapperView:_0x555ac8}=this['presenceDropdownView'];_0x555ac8['items']['bindTo'](this['_allConnectedUsers'])['using'](_0xa19df4=>{if(!_0x33a4be['displayMe']&&_0xa19df4['isMe'])return null;const _0x23b499=new k(this['context']['locale'],_0xa19df4,!!_0x33a4be['onClick']);return _0x33a4be['onClick']&&this['listenTo'](_0x23b499,'execute',()=>{_0x33a4be['onClick'](_0xa19df4,_0x23b499['element']);}),_0x23b499;}),this['balloonPanelView']['content']['add'](this['presenceDropdownView']),this['balloonPanelView']['pin']({'target':this['view']['inlineListView']['element']}),_0x555ac8['focus'](),_0x555ac8['checkIfScrollable']();const _0x4ff0d9=(_0x34fb65,_0x7a3194)=>{this['hideDropdown'](),this['view']['inlineListView']['focus'](),_0x7a3194();};_0x555ac8['keystrokes']['set']('Esc',_0x4ff0d9),_0x555ac8['keystrokes']['set']('Shift+Tab',_0x4ff0d9),_0x555ac8['keystrokes']['set']('Tab',(_0x183352,_0x160e47)=>{!function(_0x16b7a2){const _0x2da2e9=['a','button','input','select','textarea','[tabindex]','[contenteditable]']['map'](_0x6c1757=>_0x6c1757+':not([disabled]):not([tabindex=\x22-1\x22])')['join'](','),_0x2976fc=[...document['body']['querySelectorAll'](_0x2da2e9)]['filter'](_0x2aa45a=>_0x2aa45a===document['activeElement']||_0x2aa45a['offsetWidth']+_0x2aa45a['offsetHeight']>0x0)['sort']((_0x756e09,_0x3d9bae)=>(_0x756e09['tabIndex']||0x0)-(_0x3d9bae['tabIndex']||0x0)),_0x54be33=_0x2976fc['indexOf'](_0x16b7a2),_0x422849=_0x2976fc[(_0x54be33+0x1)%_0x2976fc['length']];_0x422849&&_0x422849['focus']();}(this['view']['element']),this['hideDropdown'](),_0x160e47();}),_0x555ac8['focusTracker']['add'](this['view']['element']),_0x555ac8['focusTracker']['on']('change:isFocused',(_0x54797e,_0x19c201,_0x38bccd)=>{_0x38bccd||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 _0x2d3a19{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':_0x31307f=>0x1!=_0x31307f}};
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':_0x56e5a5=>0x1!=_0x56e5a5}};
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- (_0x2eaf75=>{const {af:{dictionary:_0x10a6ba,getPluralForm:_0x793706}}={'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':_0x4df4d2=>0x1!=_0x4df4d2}};_0x2eaf75['af']||={'dictionary':{},'getPluralForm':null},_0x2eaf75['af']['dictionary']=Object['assign'](_0x2eaf75['af']['dictionary'],_0x10a6ba),_0x2eaf75['af']['getPluralForm']=_0x793706;})(window['CKEDITOR_TRANSLATIONS']||={});
23
+ (_0x2ff8d8=>{const {af:{dictionary:_0x35d5e2,getPluralForm:_0x2db605}}={'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':_0x5024fe=>0x1!=_0x5024fe}};_0x2ff8d8['af']||={'dictionary':{},'getPluralForm':null},_0x2ff8d8['af']['dictionary']=Object['assign'](_0x2ff8d8['af']['dictionary'],_0x35d5e2),_0x2ff8d8['af']['getPluralForm']=_0x2db605;})(window['CKEDITOR_TRANSLATIONS']||={});