@ckeditor/ckeditor5-real-time-collaboration 43.2.0-alpha.6 → 43.2.0-alpha.7
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.
- package/build/real-time-collaboration.js +1 -1
- package/dist/index.js +6 -6
- package/dist/translations/ar.js +1 -1
- package/dist/translations/ar.umd.js +1 -1
- package/dist/translations/bg.js +1 -1
- package/dist/translations/bg.umd.js +1 -1
- package/dist/translations/bn.js +1 -1
- package/dist/translations/bn.umd.js +1 -1
- package/dist/translations/ca.js +1 -1
- package/dist/translations/ca.umd.js +1 -1
- package/dist/translations/cs.js +1 -1
- package/dist/translations/cs.umd.js +1 -1
- package/dist/translations/da.js +1 -1
- package/dist/translations/da.umd.js +1 -1
- package/dist/translations/de-ch.js +1 -1
- package/dist/translations/de-ch.umd.js +1 -1
- package/dist/translations/de.js +1 -1
- package/dist/translations/de.umd.js +1 -1
- package/dist/translations/el.js +1 -1
- package/dist/translations/el.umd.js +1 -1
- package/dist/translations/en-au.js +1 -1
- package/dist/translations/en-au.umd.js +1 -1
- package/dist/translations/en.umd.js +1 -1
- package/dist/translations/es.js +1 -1
- package/dist/translations/es.umd.js +1 -1
- package/dist/translations/et.js +1 -1
- package/dist/translations/et.umd.js +1 -1
- package/dist/translations/fa.js +1 -1
- package/dist/translations/fa.umd.js +1 -1
- package/dist/translations/fi.js +1 -1
- package/dist/translations/fi.umd.js +1 -1
- package/dist/translations/fr.js +1 -1
- package/dist/translations/fr.umd.js +1 -1
- package/dist/translations/gl.js +1 -1
- package/dist/translations/gl.umd.js +1 -1
- package/dist/translations/he.js +1 -1
- package/dist/translations/he.umd.js +1 -1
- package/dist/translations/hi.js +1 -1
- package/dist/translations/hi.umd.js +1 -1
- package/dist/translations/hr.js +1 -1
- package/dist/translations/hr.umd.js +1 -1
- package/dist/translations/hu.js +1 -1
- package/dist/translations/hu.umd.js +1 -1
- package/dist/translations/id.js +1 -1
- package/dist/translations/id.umd.js +1 -1
- package/dist/translations/it.js +1 -1
- package/dist/translations/it.umd.js +1 -1
- package/dist/translations/ja.js +1 -1
- package/dist/translations/ja.umd.js +1 -1
- package/dist/translations/ko.js +1 -1
- package/dist/translations/ko.umd.js +1 -1
- package/dist/translations/lt.js +1 -1
- package/dist/translations/lt.umd.js +1 -1
- package/dist/translations/lv.js +1 -1
- package/dist/translations/lv.umd.js +1 -1
- package/dist/translations/ms.js +1 -1
- package/dist/translations/ms.umd.js +1 -1
- package/dist/translations/nl.js +1 -1
- package/dist/translations/nl.umd.js +1 -1
- package/dist/translations/no.js +1 -1
- package/dist/translations/no.umd.js +1 -1
- package/dist/translations/pl.js +1 -1
- package/dist/translations/pl.umd.js +1 -1
- package/dist/translations/pt-br.js +1 -1
- package/dist/translations/pt-br.umd.js +1 -1
- package/dist/translations/pt.js +1 -1
- package/dist/translations/pt.umd.js +1 -1
- package/dist/translations/ro.js +1 -1
- package/dist/translations/ro.umd.js +1 -1
- package/dist/translations/ru.js +1 -1
- package/dist/translations/ru.umd.js +1 -1
- package/dist/translations/sk.js +1 -1
- package/dist/translations/sk.umd.js +1 -1
- package/dist/translations/sr-latn.js +1 -1
- package/dist/translations/sr-latn.umd.js +1 -1
- package/dist/translations/sr.js +1 -1
- package/dist/translations/sr.umd.js +1 -1
- package/dist/translations/sv.js +1 -1
- package/dist/translations/sv.umd.js +1 -1
- package/dist/translations/th.js +1 -1
- package/dist/translations/th.umd.js +1 -1
- package/dist/translations/tk.js +1 -1
- package/dist/translations/tk.umd.js +1 -1
- package/dist/translations/tr.js +1 -1
- package/dist/translations/tr.umd.js +1 -1
- package/dist/translations/uk.js +1 -1
- package/dist/translations/uk.umd.js +1 -1
- package/dist/translations/vi.js +1 -1
- package/dist/translations/vi.umd.js +1 -1
- package/dist/translations/zh-cn.js +1 -1
- package/dist/translations/zh-cn.umd.js +1 -1
- package/dist/translations/zh.js +1 -1
- package/dist/translations/zh.umd.js +1 -1
- package/package.json +9 -9
- package/src/common-translations.js +1 -1
- package/src/index.js +1 -1
- package/src/presencelist/presencelistui.js +1 -1
- package/src/presencelist/view/presencecounterview.js +1 -1
- package/src/presencelist/view/presencedropdownlistitemview.js +1 -1
- package/src/presencelist/view/presencedropdownlistview.js +1 -1
- package/src/presencelist/view/presenceinlinelistitemview.js +1 -1
- package/src/presencelist/view/presenceinlinelistview.js +1 -1
- package/src/presencelist/view/presencelistview.js +1 -1
- package/src/presencelist.js +1 -1
- package/src/realtimecollaborativecomments/cloudservicescommentsadapter.js +1 -1
- package/src/realtimecollaborativecomments.js +1 -1
- package/src/realtimecollaborativeediting/realtimecollaborationclient.js +1 -1
- package/src/realtimecollaborativeediting/sessions.js +1 -1
- package/src/realtimecollaborativeediting/usermarkers.js +1 -1
- package/src/realtimecollaborativeediting/websocketgateway.js +1 -1
- package/src/realtimecollaborativeediting.js +1 -1
- package/src/realtimecollaborativerevisionhistory/cloudservicesrevisionhistoryadapter.js +1 -1
- package/src/realtimecollaborativerevisionhistory.js +1 -1
- package/src/realtimecollaborativetrackchanges/cloudservicestrackchangesadapter.js +1 -1
- 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
|
|
24
|
-
((()=>dt)());static ['initialReconnectionInterval']=0x3e8;['connection'];['_reconnectionStack'];['_shouldPluginsReconnect'];['_domEmitter'];static get['requires'](){return['CloudServices',_0x7ffdbc];}static get['pluginName'](){return'WebSocketGateway';}constructor(_0x1942fd){super(_0x1942fd),this['set']('state',_0x403fca['CONNECTED']),this['set']('_isBrowserOffline',!0x1),this['_reconnectionStack']=new Set(),this['_shouldPluginsReconnect']=!0x1,this['_domEmitter']=Object['create'](_0x381303);}['init'](){const _0x1ca46a=this['context'],_0x3808e0=_0x1ca46a['plugins']['get']('CloudServices'),_0x421b2f=_0x1ca46a['plugins']['get'](_0x7ffdbc);if(!_0x3808e0['token'])throw new _0x206d07('websocketgateway-missing-token',this);if(!_0x3808e0['webSocketUrl'])throw new _0x206d07('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'](_0x3808e0['token'],_0x3808e0['webSocketUrl'],{'timeout':0x3e8*this['context']['config']['get']('cloudServices.connectionTimeout'),'requestTimeout':0x3e8*this['context']['config']['get']('cloudServices.requestTimeout')})['then'](_0x37155a=>{if(this['connection']=_0x37155a,this['bind']('state')['to'](_0x37155a,'state',this,'_isBrowserOffline',(_0xfec97d,_0x51a898)=>('connected'!==_0xfec97d&&(this['_shouldPluginsReconnect']=!0x0),_0x51a898||_0xfec97d!==_0x403fca['CONNECTED']?_0x403fca['DISCONNECTED']:this['state']==_0x403fca['DISCONNECTED']&&this['_shouldPluginsReconnect']?(this['_shouldPluginsReconnect']=!0x1,this['_reconnect'](),_0x403fca['CONNECTING']):_0x403fca['CONNECTED'])),this['connection']['on']('error',(_0x5e631a,_0x50d65e)=>{if('limitExceeded'!==_0x50d65e['code'])throw console['error'](_0x50d65e),new _0x206d07('cloudservices-init',null,{'originalError':_0x50d65e});_0x421b2f['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'});}),!_0x37155a['me'])return new Promise(_0x52fb91=>_0x37155a['on']('change:me',_0x52fb91));})['catch'](_0xe2476b=>{throw console['error'](_0xe2476b),new _0x206d07('cloudservices-init',null,{'originalError':_0xe2476b});});}['addToReconnectionStack'](_0x530610){if('function'!=typeof _0x530610['reconnect'])throw new _0x206d07('websocketgateway-invalid-plugin-interface',this);if(this['isInReconnectionStack'](_0x530610))throw new _0x206d07('websocketgateway-plugin-already-registered',this,{'name':_0x530610['constructor']['pluginName']});this['_reconnectionStack']['add'](_0x530610);}['removeFromReconnectionStack'](_0xfe30e5){this['_reconnectionStack']['delete'](_0xfe30e5);}['isInReconnectionStack'](_0x3f1010){return this['_reconnectionStack']['has'](_0x3f1010);}['_reconnect'](){return this['connection']['reconnect']()['then'](()=>Promise['all'](Array['from'](this['_reconnectionStack'],_0x492c60=>_0x492c60['reconnect']())))['then'](()=>this['state']=_0x403fca['CONNECTED'])['catch'](_0x404b82=>{throw console['error'](_0x404b82),new _0x206d07('cloudservices-reconnection-error',this['context']);});}['destroy'](){this['connection']&&this['connection']['disconnect'](),this['state']=_0x403fca['DISCONNECTED'],this['_domEmitter']['stopListening'](),super['destroy']();}}class r extends _0x14461c{['channelSessions'];['channelConnectedUsers'];['allConnectedUsers'];['_registeredSessions'];['_uniqueUsersCount'];['_users'];static get['pluginName'](){return'Sessions';}static get['requires'](){return[c,_0x4a45f7];}constructor(_0x9813d7){super(_0x9813d7),this['channelSessions']=new Map(),this['channelConnectedUsers']=new Map(),this['allConnectedUsers']=new _0x33b2c0(),this['_registeredSessions']=new Map(),this['_uniqueUsersCount']=0x0,this['_users']=this['context']['plugins']['get'](_0x4a45f7);}['init'](){const _0x124863=this['context']['plugins']['get'](c);this['listenTo'](_0x124863,'change:state',(_0x47ef70,_0x44780a,_0x106dbe)=>{if('connected'!==_0x106dbe)this['channelSessions']['forEach'](_0xa0c44d=>_0xa0c44d['clear']()),this['channelConnectedUsers']['forEach'](_0x38723f=>_0x38723f['clear']()),this['allConnectedUsers']['clear']();else{for(const [_0x30d74a,_0x2db6fd]of this['_registeredSessions'])for(const _0x40eb51 of _0x2db6fd)this['_handleSessionAdd'](_0x30d74a,_0x40eb51);}}),this['_createUser'](_0x124863['connection']['me'],!0x0);}['register'](_0x17e2fc,_0x56a96a){if(this['_registeredSessions']['has'](_0x17e2fc))throw new _0x206d07('sessions-register-already-registered',null,{'channelId':_0x17e2fc});this['_registeredSessions']['set'](_0x17e2fc,_0x56a96a),this['channelSessions']['set'](_0x17e2fc,new _0x33b2c0()),this['channelConnectedUsers']['set'](_0x17e2fc,new _0x33b2c0()),this['listenTo'](_0x56a96a,'add',(_0x4e18f3,_0x2e524f)=>this['_handleSessionAdd'](_0x17e2fc,_0x2e524f)),this['listenTo'](_0x56a96a,'remove',(_0x47d8a4,_0x18e30a)=>this['_handleSessionRemove'](_0x17e2fc,_0x18e30a));for(const _0x422958 of _0x56a96a)this['_handleSessionAdd'](_0x17e2fc,_0x422958);}['unregister'](_0x29cdaa){if(!this['_registeredSessions']['has'](_0x29cdaa))throw new _0x206d07('sessions-unregister-not-exist',null,{'channelId':_0x29cdaa});const _0x55ea11=this['_registeredSessions']['get'](_0x29cdaa);this['stopListening'](_0x55ea11);for(const _0x47f46e of _0x55ea11)'connected'===this['context']['plugins']['get'](c)['state']&&this['_handleSessionRemove'](_0x29cdaa,_0x47f46e);this['_registeredSessions']['delete'](_0x29cdaa),this['channelSessions']['delete'](_0x29cdaa),this['channelConnectedUsers']['delete'](_0x29cdaa);}get['mySessionId'](){return this['context']['plugins']['get'](c)['connection']['sessionId'];}['getUserBySessionId'](_0x14be32){for(const _0x369e41 of this['channelSessions']['values']())for(const _0x3f2885 of _0x369e41)if(_0x3f2885['id']===_0x14be32)return _0x3f2885['user'];}['getUserSessions'](_0x14c8f9,_0x369114){const _0x3021f5=_0x369114?[this['channelSessions']['get'](_0x369114)]:this['channelSessions']['values'](),_0x5e081e=new Set();for(const _0x45a143 of _0x3021f5)for(const _0x42e577 of _0x45a143)_0x42e577['user']['id']===_0x14c8f9['id']&&_0x5e081e['add'](_0x42e577['id']);return _0x5e081e;}['getUserRole'](_0x549f05){for(const _0x387964 of this['channelSessions']['values']())for(const _0x1a9cbe of _0x387964)if(_0x1a9cbe['user']===_0x549f05)return _0x1a9cbe['role'];}['_handleSessionAdd'](_0x258d3f,_0x4e916f){if('connected'!==this['context']['plugins']['get'](c)['state'])return;const _0x1a03b6=_0x4e916f['user'],_0x7129d7=this['_users']['getUser'](_0x1a03b6['id'])||this['_createUser'](_0x1a03b6),_0x1d09dc=Object['assign']({},_0x4e916f,{'user':_0x7129d7});this['channelSessions']['get'](_0x258d3f)['add'](_0x1d09dc);const _0x27f83d=this['channelConnectedUsers']['get'](_0x258d3f);_0x27f83d['has'](_0x7129d7['id'])||_0x27f83d['add'](_0x7129d7),this['allConnectedUsers']['has'](_0x7129d7['id'])||this['allConnectedUsers']['add'](_0x7129d7,_0x7129d7['isMe']?0x0:void 0x0),this['fire']('sessionAdd:'+_0x258d3f,{'channelId':_0x258d3f,'session':_0x1d09dc});}['_handleSessionRemove'](_0x50591a,_0x55fe10){if('connected'!==this['context']['plugins']['get'](c)['state'])return;const _0x2189e9=this['channelConnectedUsers']['get'](_0x50591a),_0x3fd59c=_0x55fe10['user'];_0x3fd59c['id']&&(this['channelSessions']['get'](_0x50591a)['remove'](_0x55fe10['id']),_0x2189e9['has'](_0x3fd59c['id'])&&!this['getUserSessions'](_0x3fd59c,_0x50591a)['size']&&_0x2189e9['remove'](_0x3fd59c['id']),this['allConnectedUsers']['get'](_0x3fd59c['id'])&&!this['getUserSessions'](_0x3fd59c)['size']&&this['allConnectedUsers']['remove'](_0x3fd59c['id']));}['_createUser'](_0x227692,_0x37a51d){const _0x54fa8f=this['_users']['addUser'](_0x227692);return _0x37a51d&&this['_users']['defineMe'](_0x227692['id']),_0x54fa8f['orderNumber']=this['_uniqueUsersCount']++,_0x54fa8f;}}class H extends _0x4dbc33{['_domEmitter']=new(_0x381303())();static get['requires'](){return[r];}static get['pluginName'](){return'UserMarkers';}['init'](){const _0x75a762=this['editor'],_0x304610=_0x75a762['plugins']['get'](r);_0x75a762['conversion']['for']('editingDowncast')['markerToElement']({'model':'user:position','view':(_0x2172e0,{writer:_0x1e5a81})=>function(_0x53e9db,_0x33ffdd,_0x42f957,_0xf9dc18){const _0x11eb95=_0x53e9db['markerName']['split'](':')[0x2],_0x237deb=_0x42f957['getUserBySessionId'](_0x11eb95);if(!_0x237deb||_0x11eb95===_0x42f957['mySessionId'])return;if(!_0xf9dc18['model']['schema']['checkChild'](_0x53e9db['markerRange']['start'],'$text'))return;const _0x52bce6={'class':'ck-user__marker\x20'+_0x237deb['color']['getMarkerClass'](),'data-name':_0x237deb['name'],'data-session-id':_0x11eb95},_0x5351b7=_0xf9dc18['model']['markers']['get'](_0x53e9db['markerName']),_0x320262=_0x5351b7['getStart'](),_0x201b98=_0x320262['nodeAfter'],_0x2002c7=_0xf9dc18['model']['schema'];if(_0x201b98&&_0x2002c7['isObject'](_0x201b98)&&_0x2002c7['isInline'](_0x201b98)&&!_0xf9dc18['model']['markers']['get']('user:range:'+_0x11eb95)['getRange']()['isCollapsed'])return;const _0x134187=_0x320262['parent'];return _0xf9dc18['model']['schema']['isLimit'](_0x134187)&&!_0xf9dc18['model']['hasContent'](_0x134187)&&(_0x52bce6['contenteditable']=!0x1),function(_0x43a4fc,_0x38ee5b,_0x1ddb76){const _0x2e72ab=_0x43a4fc['createUIElement']('span',_0x38ee5b);return _0x43a4fc['setCustomProperty']('userPositionMarker',!0x0,_0x2e72ab),_0x2e72ab['render']=function(_0x36ff66){const _0x49adad=this['toDomElement'](_0x36ff66);return _0x49adad['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>'+_0x1ddb76['name']+'</span>',_0x49adad['addEventListener']('mouseenter',()=>{_0x49adad['classList']['add']('ck-user__marker_hovered');}),_0x49adad['addEventListener']('mouseleave',()=>{_0x49adad['classList']['remove']('ck-user__marker_hovered');}),_0x49adad;},_0x2e72ab['isSimilar']=function(_0x2c2b84){return!(!this['getCustomProperty']('userPositionMarker')||!_0x2c2b84['getCustomProperty']('userPositionMarker')||this['getAttribute']('data-session-id')!=_0x2c2b84['getAttribute']('data-session-id'));},_0x2e72ab;}(_0x33ffdd,_0x52bce6,_0x237deb);}(_0x2172e0,_0x1e5a81,_0x304610,_0x75a762)}),_0x75a762['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'user:range','view':_0x4b0209=>function(_0x3b0b98,_0x16e8a0){const _0x18bca=_0x3b0b98['markerName']['split'](':')[0x2];if(_0x18bca===_0x16e8a0['mySessionId'])return null;const _0x10b365=_0x16e8a0['getUserBySessionId'](_0x18bca);if(!_0x10b365)return{'id':_0x18bca,'classes':[]};return{'id':_0x18bca,'classes':['ck-user__selection',_0x10b365['color']['getSelectionClass']()],'attributes':{'data-session-id':_0x18bca},'priority':0x7d0+_0x10b365['orderNumber']};}(_0x4b0209,_0x304610)}),function(_0x7bcd14){const _0x4aa5da=_0x7bcd14['model'],_0x34067e=new Map(),_0x3a7a17=_0x7bcd14['plugins']['get'](r);_0x4aa5da['markers']['on']('update:user:range',(_0xe887a2,_0xb078fd,_0x19507e,_0x16361d)=>{if(!_0x16361d&&_0x34067e['get'](_0xb078fd['name']))return _0x34067e['get'](_0xb078fd['name'])['detach'](),void _0x34067e['delete'](_0xb078fd['name']);const _0x1f7e73=_0xb078fd['name']['split'](':')[0x2];if(_0x1f7e73===_0x3a7a17['mySessionId'])return;const _0x1e98d8='user:position:'+_0x1f7e73;_0x4aa5da['markers']['has'](_0x1e98d8)&&_0x7bcd14['editing']['reconvertMarker'](_0x1e98d8),_0xb078fd['on']('change:range',(_0x17e91e,_0x3254d9,_0x347a8e)=>{if('$graveyard'!=_0x3254d9['root']['rootName']&&'$graveyard'==_0xb078fd['getRange']()['root']['rootName']&&!_0x34067e['has'](_0xb078fd['name'])){const _0x11dbf0=_0x4aa5da['schema']['getNearestSelectionRange'](_0x347a8e['deletionPosition']);if(_0x11dbf0){const _0x2566cb=ht['fromRange'](_0x11dbf0);_0x34067e['set'](_0xb078fd['name'],_0x2566cb),_0x2566cb['on']('change:range',(_0x5f0dbd,_0x3b4f67,_0x213cb7)=>{if('$graveyard'==_0x2566cb['root']['rootName']){const _0xde58d8=_0x4aa5da['schema']['getNearestSelectionRange'](_0x213cb7['deletionPosition']);_0xde58d8?(_0x2566cb['start']=_0xde58d8['start'],_0x2566cb['end']=_0xde58d8['end']):(_0x34067e['delete'](_0xb078fd['name']),_0x2566cb['detach']());}});}}});}),_0x4aa5da['document']['on']('change',()=>{_0x34067e['size']>0x0&&_0x4aa5da['enqueueChange']({'isUndoable':!0x1},_0x14426b=>{for(const [_0x28078b,_0x50e1e3]of _0x34067e)'$graveyard'==_0x4aa5da['markers']['get'](_0x28078b)['getRange']()['root']['rootName']&&(re(_0x28078b['split'](':')[0x2],_0x50e1e3['toRange'](),_0x4aa5da,_0x14426b),_0x50e1e3['detach']());_0x34067e['clear']();});});}(_0x75a762),this['_domEmitter']['listenTo'](_0x1e5003['document'],'keydown',(_0x3fa9f3,{key:_0x1148cd})=>{'Escape'===_0x1148cd&&function(_0x4b54b8){_0x4b54b8['editing']['view']['change'](_0x1e47e6=>{for(const _0x16e218 of _0x4b54b8['model']['markers']){if(!_0x16e218['name']['startsWith']('user:position'))continue;const _0x16a42=_0x4b54b8['editing']['mapper']['markerNameToElements'](_0x16e218['name']);if(_0x16a42){for(const _0x2e3ae6 of _0x16a42)_0x1e47e6['removeClass']('ck-user__marker_hovered',_0x2e3ae6);}}});}(_0x75a762);},{'useCapture':!0x0});}['afterInit'](){const _0x3e9d11=this['editor'],_0x2fdb59=_0x3e9d11['commands']['get']('undo');_0x2fdb59&&_0x3e9d11['model']['on']('applyOperation',(_0x5d93a0,_0x18ff8d)=>{const _0x3e567c=_0x18ff8d[0x0];if('marker'!=_0x3e567c['type']||!_0x3e567c['name']['startsWith']('user:'))return;const _0x35bbb=_0x3e567c['batch'];_0x2fdb59['_createdBatches']['has'](_0x35bbb)&&(_0x3e567c['newRange']=_0x3e567c['oldRange']?_0x3e9d11['model']['createRange'](_0x3e567c['oldRange']['start'],_0x3e567c['oldRange']['end']):null);},{'priority':'highest'});}['destroy'](){return this['_domEmitter']['stopListening'](),super['destroy']();}['createUserMarkerOperations'](){const _0x2afb5e=this['editor'],_0x487594=_0x2afb5e['model']['document'],_0x555f71=_0x2afb5e['plugins']['get'](r);_0x2afb5e['model']['enqueueChange']({'isUndoable':!0x1},_0x3c9f07=>{const _0x1ba633='user:range:'+_0x555f71['mySessionId'],_0x55bc66='user:position:'+_0x555f71['mySessionId'],_0xfbf314=_0x2afb5e['model']['markers']['has'](_0x1ba633);_0x2afb5e['editing']['view']['hasDomSelection']?re(_0x555f71['mySessionId'],_0x487594['selection']['getFirstRange'](),_0x2afb5e['model'],_0x3c9f07):_0xfbf314&&(_0x3c9f07['removeMarker'](_0x1ba633),_0x3c9f07['removeMarker'](_0x55bc66));});}}function re(_0x1eb81f,_0x1661e1,_0xe64b56,_0x27054e){const _0x36f484='user:range:'+_0x1eb81f,_0x41509a='user:position:'+_0x1eb81f,_0x5431a5=_0x1661e1['getContainedElement']();let _0x2fa41d=_0x1661e1['start'];_0x5431a5&&_0x5431a5['is']('element','tableCell')&&(_0x2fa41d=function(_0x4d07ef,_0x1220d4){for(const _0x4ddc15 of _0x4d07ef['getPositions']())if(_0x1220d4['schema']['checkChild'](_0x4ddc15,'$text'))return _0x4ddc15;}(_0x1661e1,_0xe64b56),_0x1661e1=_0x27054e['createRange'](_0x2fa41d));const _0x169b18=_0x27054e['createRange'](_0x2fa41d);_0xe64b56['markers']['has'](_0x36f484)?(_0x27054e['updateMarker'](_0x36f484,{'range':_0x1661e1}),_0x27054e['updateMarker'](_0x41509a,{'range':_0x169b18})):(_0x27054e['addMarker'](_0x36f484,{'range':_0x1661e1,'usingOperation':!0x0}),_0x27054e['addMarker'](_0x41509a,{'range':_0x169b18,'usingOperation':!0x0}));}function q(_0x3e8ea5,_0x13fe6e,_0x1fe62d){const t=_0x3e8ea5['t'];switch(_0x13fe6e){case'PENDING_ACTION_SENDING_DATA':return t({'string':'Sending\x20data\x20to\x20the\x20server.','id':'PENDING_ACTION_SENDING_DATA'});case'The\x20local\x20document\x20and\x20server\x20document\x20differ\x20and\x20merging\x20them\x20can\x20cause\x20unexpected\x20behavior.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.':return t('The\x20local\x20document\x20and\x20server\x20document\x20differ\x20and\x20merging\x20them\x20can\x20cause\x20unexpected\x20behavior.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.');case'The\x20document\x20cannot\x20be\x20connected\x20back\x20to\x20the\x20server.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.':return t('The\x20document\x20cannot\x20be\x20connected\x20back\x20to\x20the\x20server.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.');case'The\x20document\x20details\x20could\x20not\x20be\x20taken\x20during\x20the\x20reconnection.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.':return t('The\x20document\x20details\x20could\x20not\x20be\x20taken\x20during\x20the\x20reconnection.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.');case'The\x20last\x20saved\x20version\x20of\x20the\x20document\x20does\x20not\x20match\x20the\x20local\x20version.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.':return t('The\x20last\x20saved\x20version\x20of\x20the\x20document\x20does\x20not\x20match\x20the\x20local\x20version.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.');case'Synchronization\x20issue':return t('Synchronization\x20issue');case'Connected\x20users\x20list\x20dropdown\x20menu':return t('Connected\x20users\x20list\x20dropdown\x20menu');case'Collapsed\x20connected\x20users\x20list\x20(press\x20ENTER\x20to\x20open\x20it)':return t('Collapsed\x20connected\x20users\x20list\x20(press\x20ENTER\x20to\x20open\x20it)');case'Connected\x20users\x20list':return t('Connected\x20users\x20list');case'PENDING_ACTION_REVISION_HISTORY':return t({'string':'Unsaved\x20change\x20in\x20revision\x20history.','id':'PENDING_ACTION_REVISION_HISTORY'});case'CONNECTED_USERS':return t({'string':'1\x20connected\x20user\x20(me)','plural':'%0\x20connected\x20users','id':'CONNECTED_USERS'},_0x1fe62d);default:return'';}}let K=0x1;class l extends _0x4dbc33{static ['CollaborativeEditingService']=/* #__PURE__ -- @preserve */
|
|
25
|
-
((()=>_0x47e557)());['_offset'];['sessionId'];['serverHistory'];['_channelId'];['_service'];['_document'];['_compressor'];['_bufferedOperations'];['_knownOperations'];['_knownRootNames'];['_pendingAction'];['_hasSelectionChanged'];['_sendBufferedOperationsDelayId'];['_baseBufferDelay'];['_currentBufferDelay'];['_lastSyncedOperationId'];['_disconnectionOperations'];['_operationIdentifier'];static get['requires'](){return[c,r,H,_0x5b4c88,_0x4a45f7,_0x7ffdbc];}static get['pluginName'](){return'RealTimeCollaborationClient';}get['cloudDocumentVersion'](){return this['_lastServerVersion']+this['_offset'];}get['_lastServerVersion'](){return this['serverHistory']['version']-this['_offset'];}get['lastSyncVersion'](){const _0x2fe415=this['serverHistory']['getOperations']();for(let _0x4717c0=_0x2fe415['length']-0x1;_0x4717c0>=0x0;_0x4717c0--){const _0x4b2e26=_0x2fe415[_0x4717c0];if(!this['_disconnectionOperations']['has'](_0x4b2e26))return _0x4b2e26['baseVersion']+0x1-this['_offset'];}return 0x0;}constructor(_0x2d9052){if(super(_0x2d9052),this['_offset']=0x0,this['sessionId']=null,this['serverHistory']=new _0x39a3f2(),this['editor']['config']['define']('collaboration',{}),this['_channelId']=this['editor']['config']['get']('collaboration.channelId'),!this['_channelId'])throw new _0x206d07('collaboration-missing-channelid',this);const _0x481553=_0x2d9052['config']['get']('cloudServices.bundleVersion')||nt;this['_service']=new l['CollaborativeEditingService'](_0x481553,this['_channelId']),this['_document']=this['editor']['model']['document'],this['_compressor']=new _0x4c9238(),this['_bufferedOperations']=[],this['_knownOperations']=new WeakSet(),this['_knownRootNames']=new Set(),this['set']('_isPendingUpdate',!0x1),this['set']('_hasSynchronizationProblem',!0x1),this['_pendingAction']=null,this['_hasSelectionChanged']=!0x1,this['_sendBufferedOperationsDelayId']=null,this['_baseBufferDelay']=0x12c,this['_currentBufferDelay']=this['_baseBufferDelay'],this['_lastSyncedOperationId']=null,this['_disconnectionOperations']=new WeakSet(),this['_operationIdentifier']=new X(this['_disconnectionOperations']);}['init'](){const _0x15cd04=this['editor'],_0x4303ea=_0x15cd04['plugins']['get'](_0x4a45f7),_0x15acd4=_0x15cd04['plugins']['get'](c);this['listenTo'](_0x4303ea,'getOperationAuthor',(_0x304971,_0x4dcde5)=>{const _0x55f02b=_0x4dcde5[0x0];_0x55f02b['_authorId']&&(_0x304971['return']=_0x4303ea['getUser'](_0x55f02b['_authorId']),_0x304971['stop']()),null===_0x55f02b['_authorId']&&(_0x304971['return']=null,_0x304971['stop']());},{'priority':'high'}),this['listenTo'](_0x15cd04['model']['document']['selection'],'change:range',(_0x447a1b,_0xe6aa96)=>{_0xe6aa96['directChange']&&this['_refreshUserSelectionMarkers']();}),this['listenTo'](_0x15cd04['editing']['view'],'change:hasDomSelection',()=>{this['_refreshUserSelectionMarkers']();}),this['_initThrowingOnDataSet'](),_0x15cd04['model']['on']('applyOperation',(_0x22d495,_0x1ba337)=>{const _0x18bdac=_0x1ba337[0x0];_0x18bdac['isDocumentOperation']&&(this['_saveOperationInBuffer'](_0x18bdac),this['_shouldSendUpdate']()&&this['_sendBufferedOperationsDelayed']());}),this['_setUpDataInit'](),this['bind']('_isEditingAllowed')['to'](_0x15acd4,'state',this,'_hasSynchronizationProblem',(_0x1edc03,_0x2e5e7a)=>'connected'===_0x1edc03&&!_0x2e5e7a),this['on']('change:_isEditingAllowed',()=>{this['_isEditingAllowed']?_0x15cd04['disableReadOnlyMode']('rtc-offline'):_0x15cd04['enableReadOnlyMode']('rtc-offline');}),this['_isEditingAllowed']?_0x15cd04['disableReadOnlyMode']('rtc-offline'):_0x15cd04['enableReadOnlyMode']('rtc-offline'),this['set']('_isConnected',!0x1);}async['reconnect'](){const _0x3d9904=this['editor']['plugins']['get'](r),_0x1681cb=this['editor']['plugins']['get'](c);try{this['_isPendingUpdate']=!0x0,_0x3d9904['unregister'](this['_channelId']);const _0x33a9fb=await this['_service']['reconnect'](_0x1681cb['connection'],this['lastSyncVersion']);await this['_handleReconnectionResponse'](_0x33a9fb)&&(this['_isPendingUpdate']=!0x1,this['_clearPendingAction']());const _0x345c7b=await this['_service']['getConnectedSessions']();_0x3d9904['register'](this['_channelId'],_0x345c7b),this['_handleSendingSelectionMarkers'](),this['_isConnected']=!0x0;}catch(_0x2a9494){if(function(_0x40afe7){return'404'===_0x40afe7['code'];}(_0x2a9494)&&this['sessionId'])await this['_connectAfterSessionHasBeenFlushed']();else{if(function(_0x1489fb){return'409'===_0x1489fb['code'];}(_0x2a9494)){const _0x2d718b=q(this['editor']['locale'],'The\x20document\x20cannot\x20be\x20connected\x20back\x20to\x20the\x20server.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.');this['_handleReconnectionError'](_0x2d718b);}else{if(!(_0x2a9494 instanceof J))throw _0x2a9494;this['_handleReconnectionError']();}}}}['destroy'](){const _0x18265e=this['editor']['plugins']['get'](c),_0x29a489=this['editor']['plugins']['get'](r);this['editor']['enableReadOnlyMode']('rtc-destroyed'),_0x29a489['channelSessions']['has'](this['_channelId'])&&_0x29a489['unregister'](this['_channelId']),_0x18265e['removeFromReconnectionStack'](this),this['_disconnectService'](),super['destroy']();}async['_handleReconnectionResponse'](_0x4ce9aa){if(this['sessionId']!==_0x4ce9aa['sessionId']&&this['_lastSyncedOperationId']!==_0x4ce9aa['lastOperationId'])throw new J();return this['sessionId']=_0x4ce9aa['sessionId'],this['_handleServerResponse']([],{..._0x4ce9aa,'wereChangesApplied':!0x1,'data':_0x4ce9aa['data']},'reconnect');}async['_connectService'](_0x40f911,_0x2609cf=!0x1){const {connection:_0x5e0fa6}=this['editor']['plugins']['get'](c);l['CollaborativeEditingService']['getConnectedSessions'](_0x5e0fa6,this['_channelId'])['then'](_0x1d0caf=>this['_initSessionsHandling'](_0x1d0caf))['catch'](_0x1d0c51=>{this['_crash']('realtimecollaborationclient-init-session-connection-error',_0x1d0c51);}),this['listenTo'](this['_service'],'operationsReceived',this['_handleReceivedOperations']['bind'](this)),this['listenTo'](this['_service'],'error',(_0x401b0a,_0x43acee)=>{this['_crash']('realtimecollaborationclient-initservice-internal-error',_0x43acee);}),this['listenTo'](this['_service'],'disconnected',()=>{this['_isConnected']=!0x1;});const _0x947ea3=this['_operationIdentifier']['getIdOfTheLastOperation'](_0x40f911);this['_isPendingUpdate']=!0x0;const _0x22abb9=await this['_service']['connect'](_0x5e0fa6,this['_compressOperations'](_0x40f911),_0x947ea3);if(this['sessionId']=_0x22abb9['sessionId'],_0x2609cf){if(!_0x22abb9['wereChangesApplied'])return void this['_handleReconnectionError']();this['_isPendingUpdate']=!0x1,this['_clearPendingAction'](),this['serverHistory']['reset'](),this['_offset']=_0x22abb9['offset'],this['serverHistory']['version']=this['_offset'],await this['_handleServerResponse'](_0x40f911,_0x22abb9,'reconnection:\x20flushed\x20session');}else await this['_handleInitialConnectionData'](_0x22abb9,_0x40f911);this['_handleSendingSelectionMarkers'](),this['_isConnected']=!0x0;}['_handleSendingSelectionMarkers'](){const _0x5401fb=this['editor']['plugins']['get'](r),_0x4d5705=this['editor']['plugins']['get'](H),_0x429047=_0x5401fb['channelSessions']['get'](this['_channelId']);_0x429047&&_0x429047['length']>0x1?_0x4d5705['createUserMarkerOperations']():this['listenTo'](_0x5401fb,'sessionAdd:'+this['_channelId'],()=>{0x2===_0x5401fb['channelSessions']['get'](this['_channelId'])['length']&&_0x4d5705['createUserMarkerOperations']();});}async['_handleReceivedOperations'](_0x5f0495,_0x170bc8,_0x20dfbe,_0x14e0e2){if(!this['_isPendingUpdate']&&this['_document']['version']==_0x170bc8){const _0x4c5b5f=this['_decompressOperations'](_0x20dfbe,_0x14e0e2);await this['_fetchMissingUsers'](_0x4c5b5f),this['_handleExternalOperations'](_0x4c5b5f,_0x170bc8,_0x20dfbe['lastOperationId'])||this['_crash']('realtimecollaborationclient-initservice-incorrect-server-operation');}}async['_connectAfterSessionHasBeenFlushed'](){this['_disconnectService']();const {locale:_0x472daa}=this['editor'];let _0x10a6ba;try{_0x10a6ba=await this['_service']['getDocumentDetails']();}catch(_0x20feca){const _0x1a1412=q(_0x472daa,'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'](_0x1a1412);}const _0x1f7ad4=_0x10a6ba['currentDocumentSession']||_0x10a6ba['lastDocumentSession'];if(this['_lastSyncedOperationId']===_0x1f7ad4['lastOperationId'])await this['_connectService'](this['editor']['model']['document']['history']['getOperations'](),!0x0);else{const _0xa2a3bb=q(_0x472daa,'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'](_0xa2a3bb);}}['_disconnectService'](){this['_service']['disconnect'](),this['_bufferedOperations']=[],clearTimeout(this['_sendBufferedOperationsDelayId']),this['stopListening'](this['_service']);}['_initSessionsHandling'](_0x3aace9){const _0x26964c=this['editor']['plugins']['get'](r);this['listenTo'](_0x26964c,'sessionAdd:'+this['_channelId'],(_0x141c17,{session:_0x57bbf6})=>{if(_0x57bbf6['id']===_0x26964c['mySessionId']){_0x141c17['off']();const _0x1510aa=this['editor']['plugins']['has']('CommentsOnly')&&this['editor']['plugins']['get']('CommentsOnly');let _0x46c846=_0x57bbf6['permissions'];_0x1510aa&&_0x1510aa['isEnabled']&&(_0x46c846=_0x46c846['filter'](_0xf65335=>'document:write'!==_0xf65335)),this['editor']['plugins']['get']('Permissions')['setPermissions'](_0x46c846,this['_channelId']);}}),_0x26964c['register'](this['_channelId'],_0x3aace9);}['_initThrowingOnDataSet'](){const _0x278505=this['editor']['data']['set'];this['editor']['data']['set']=(..._0x1f279f)=>{if(!_0x1f279f[_0x1f279f['length']-0x1]['suppressErrorInCollaboration'])throw new _0x206d07('realtimecollaborationclient-editor-setdata-and-editor-data-set-are-forbidden-in-real-time-collaboration',this);_0x278505['apply'](this['editor']['data'],_0x1f279f);};}['_setUpDataInit'](){this['editor']['data']['on']('init',(_0x508daa,[_0x270273])=>{if(this['_document']['version'])throw new _0x206d07('realtimecollaborationclient-init-document-already-initialized',this);_0x508daa['stop'](),this['_setPendingAction']();const _0x344f90=this['editor']['config']['get']('rootsAttributes'),_0x243207=this['_getOperationsFromInitData'](_0x270273,_0x344f90);0x0==_0x243207['length']&&_0x243207['push'](new _0x5f0b59(0x0)),_0x508daa['return']=this['_connectService'](_0x243207)['then'](()=>{this['editor']['plugins']['get'](c)['addToReconnectionStack'](this),this['editor']['data']['fire']('ready');})['catch'](_0x276144=>this['_crash']('realtimecollaborationclient-init-connection-failed',_0x276144))['finally'](()=>this['_clearPendingAction']());},{'priority':'high'}),this['editor']['on']('loadRoot',async(_0x3b634b,[_0x1c183e,_0x94c1b2])=>{_0x3b634b['stop']();const _0x98f4f=this['editor']['model']['document']['getRoot'](_0x1c183e);if(!this['_knownRootNames']['has'](_0x1c183e)){const _0x9cc894=_0x94c1b2&&_0x94c1b2['data']?_0x94c1b2['data']:'',_0x2fa69b=_0x94c1b2&&_0x94c1b2['attributes']?_0x94c1b2['attributes']:{};await this['_loadRoot'](_0x1c183e,_0x9cc894,_0x2fa69b);}this['editor']['model']['enqueueChange']({'isUndoable':!0x1},()=>{_0x98f4f['_isLoaded']=!0x0,this['editor']['model']['document']['differ']['_bufferRootLoad'](_0x98f4f);});},{'priority':'high'});}async['_fetchMissingUsers'](_0x4bd195){const _0x399eb8=this['editor']['plugins']['get'](_0x4a45f7),{connection:_0x869f7e}=this['editor']['plugins']['get'](c),_0x179a41=new Set();for(const _0x3e78b6 of _0x4bd195){const _0x3f6905=_0x3e78b6['_authorId'];_0x3f6905&&!_0x399eb8['getUser'](_0x3f6905)&&_0x179a41['add'](_0x3f6905);}if(0x0===_0x179a41['size'])return;const _0x56040c=await lt['getMany'](_0x869f7e,Array['from'](_0x179a41));for(const _0x3c791f of _0x56040c)_0x399eb8['getUser'](_0x3c791f['id'])||_0x399eb8['addUser'](_0x3c791f);}['_getOperationsFromInitData'](_0x2da0be,_0x341ca4={}){const _0x1066d0=this['editor']['model'],_0x22d0a9=[];let _0x2479be=0x0;const _0x1653ff='string'==typeof _0x2da0be?{'main':_0x2da0be}:_0x2da0be;for(const _0xee02e1 of Object['keys'](_0x1653ff)){if(!this['_document']['roots']['has'](_0xee02e1))throw new _0x206d07('realtimecollaborationclient-init-non-existent-root',this);const _0x24075e=this['editor']['data']['parse'](_0x1653ff[_0xee02e1]),_0x35e58e=this['_document']['getRoot'](_0xee02e1),_0x1cac52=new _0x5ce49d(_0x1066d0['createPositionAt'](_0x35e58e,0x0),_0x24075e,_0x2479be++);_0x22d0a9['push'](_0x1cac52);for(const [_0x2db69e,_0x5b86cc]of _0x24075e['markers']){const _0x4ce9f4=_0x1066d0['createRange'](_0x1066d0['createPositionFromPath'](_0x35e58e,_0x5b86cc['start']['path']['slice']()),_0x1066d0['createPositionFromPath'](_0x35e58e,_0x5b86cc['end']['path']['slice']())),_0x55c4ea=new _0x9174b3(_0x2db69e,null,_0x4ce9f4,_0x1066d0['markers'],!0x0,_0x2479be++);_0x22d0a9['push'](_0x55c4ea);}}if(_0x341ca4)for(const [_0x5446a1,_0x303044]of Object['entries'](_0x341ca4)){const _0x492049=_0x1066d0['document']['getRoot'](_0x5446a1);if(!_0x492049)throw new _0x206d07('multi-root-editor-root-attributes-no-root',null);for(const [_0x18c402,_0x5e5352]of Object['entries'](_0x303044))if(null!==_0x5e5352){const _0x49dfdb=new _0x178eb8(_0x492049,_0x18c402,null,_0x5e5352,_0x2479be++);_0x22d0a9['push'](_0x49dfdb);}}return _0x22d0a9;}async['_loadRoot'](_0x5d43b3,_0x36f54a,_0x27b867){this['_getOperationsFromInitData']({[_0x5d43b3]:_0x36f54a},{[_0x5d43b3]:_0x27b867})['forEach']((_0x5b4bda,_0x31de9d)=>{_0x5b4bda['baseVersion']=this['_document']['version']+_0x31de9d,_0x5b4bda['_isInit']=!0x0,this['_saveOperationInBuffer'](_0x5b4bda);}),this['_sendBufferedOperationsDelayed'](),await this['_waitUntilSynced']();}async['_handleInitialConnectionData'](_0x47f6b8,_0x4aac5a){let _0x29fdf9;this['_offset']=_0x47f6b8['offset'];const _0x517db5=_0x47f6b8['wereChangesApplied']&&!_0x47f6b8['initData'],_0x26f454=_0x517db5?0x0:_0x47f6b8['data']['baseVersion'];if(_0x4aac5a['forEach'](_0x4f1849=>{_0x4f1849['_isInit']=!0x0,_0x4f1849['createdAt']=_0x47f6b8['sessionCreatedAt'],_0x4f1849['_authorId']=null;}),_0x517db5)_0x29fdf9=_0x4aac5a,this['_applyOperationsSet'](_0x29fdf9,_0x517db5);else{if(_0x47f6b8['initData']){const _0x3dbf7d=this['_getOperationsFromInitData'](_0x47f6b8['initData']);this['_document']['history']['version']=-_0x3dbf7d['length'],_0x3dbf7d['forEach'](_0x33b549=>{_0x33b549['baseVersion']-=_0x3dbf7d['length'],_0x33b549['createdAt']=_0x47f6b8['sessionCreatedAt'],_0x33b549['_isInit']=!0x0,_0x33b549['_authorId']=null;}),this['_applyOperationsSet'](_0x3dbf7d,!0x0),this['serverHistory']['version']=-_0x3dbf7d['length']+this['_offset'],this['_updateServerHistory'](_0x3dbf7d);}this['_document']['history']['version']=_0x26f454,_0x29fdf9=this['_decompressOperations'](_0x47f6b8['data'],_0x47f6b8['metadata']),await this['_fetchMissingUsers'](_0x29fdf9),this['_applyOperationsSet'](_0x29fdf9,_0x517db5);}_0x47f6b8['lastOperationId']&&(this['_operationIdentifier']['setIdForTheLastOperation'](_0x29fdf9,_0x47f6b8['lastOperationId']),this['_lastSyncedOperationId']=_0x47f6b8['lastOperationId']),this['serverHistory']['version']=_0x26f454+this['_offset'],this['_updateServerHistory'](_0x29fdf9),_0x4aac5a['filter'](_0x3b878a=>{const _0x24bcf3=this['_getAffectedRoot'](_0x3b878a);return _0x24bcf3&&!this['_knownRootNames']['has'](_0x24bcf3);})['forEach']((_0xa5f94e,_0x1b3035)=>{_0xa5f94e['baseVersion']=this['_document']['version']+_0x1b3035,this['_saveOperationInBuffer'](_0xa5f94e);}),this['_shouldSendUpdate']()?(this['_currentBufferDelay']=0x0,this['_sendBufferedOperationsDelayed'](!0x0),await this['_waitUntilSynced']()):(this['_isPendingUpdate']=!0x1,this['_clearPendingAction']());}['_crash'](_0x3e8bed,_0x1e412b){throw this['_isPendingUpdate']=!0x0,_0x1e412b&&console['error'](_0x1e412b),new _0x206d07(_0x3e8bed,this['editor']);}['_saveOperationInBuffer'](_0x355b44){this['_knownOperations']['has'](_0x355b44)||(this['_knownOperations']['add'](_0x355b44),this['_bufferedOperations']['push'](_0x355b44),this['_pendingAction']||'marker'==_0x355b44['type']&&!_0x355b44['affectsData']||this['_setPendingAction']());}['_sendBufferedOperationsDelayed'](_0x3e7edd=!0x1){!_0x3e7edd&&this['_isPendingUpdate']||(this['_isPendingUpdate']=!0x0,clearTimeout(this['_sendBufferedOperationsDelayId']),this['_sendBufferedOperationsDelayId']=setTimeout(()=>{this['_sendBufferedOperations']()['then'](_0x41d858=>{_0x41d858&&(this['_clearPendingAction'](),this['_isPendingUpdate']=!0x1);})['catch'](_0x35b8f4=>{if(this['_clearPendingAction'](),this['_isPendingUpdate']=!0x1,!function(_0x367109){return _0x367109['message']['startsWith']('cloud-services-internal-error:\x20Not\x20connected.')||_0x367109['message']['startsWith']('cloud-services-internal-error:\x20Collaborative\x20Editing\x20Service\x20is\x20not\x20connected.')||_0x367109['message']['startsWith']('cloud-services-internal-error:\x20Request\x20timeout.');}(_0x35b8f4))throw _0x35b8f4;});},this['_currentBufferDelay']));}['_waitUntilSynced'](){return new Promise(_0x4c162c=>{this['on']('change:_isPendingUpdate',()=>{_0x4c162c();});});}async['_sendBufferedOperations'](){const _0x192bc6=this['editor']['plugins']['get'](H);if(this['_shouldSendSelectionUpdate']()&&(_0x192bc6['createUserMarkerOperations'](),this['_hasSelectionChanged']=!0x1),!this['_shouldSendUpdate']())return!0x0;const _0x4b5bc6=[...this['_bufferedOperations']];for(const _0x2790de of _0x4b5bc6)_0x2790de['wasUndone']=this['_document']['history']['isUndoneOperation'](_0x2790de);const _0x44e384=this['_operationIdentifier']['getIdOfTheLastOperation'](_0x4b5bc6),_0xa54fe0=K++,_0x28fd08=this['_compressOperations'](_0x4b5bc6),_0x28a8d0=await this['_service']['sendOperations'](_0x28fd08,_0x28fd08['baseVersion'],_0x44e384);try{return await this['_handleServerResponse'](_0x4b5bc6,_0x28a8d0,_0xa54fe0);}catch(_0x48f284){return this['_crash']('realtimecollaborationclient-sendbufferedoperations',_0x48f284);}}async['_handleServerResponse'](_0x4642e0,_0xfc3a9b,_0x564ceb){if('error'in _0xfc3a9b)throw _0xfc3a9b['error'];let _0x4df8ec=!0x1;if(_0xfc3a9b['wereChangesApplied']){_0xfc3a9b['lastOperationId']&&(this['_lastSyncedOperationId']=_0xfc3a9b['lastOperationId']),this['_bufferedOperations']=this['_bufferedOperations']['filter'](_0x18cd95=>!_0x4642e0['includes'](_0x18cd95));for(const _0x2974b2 of _0x4642e0)_0x2974b2['createdAt']='lastOperationAcceptedAt'in _0xfc3a9b&&_0xfc3a9b['lastOperationAcceptedAt']||void 0x0;Q(_0x4642e0,_0xfc3a9b['version']-_0x4642e0['length']),this['_updateServerHistory'](_0x4642e0);const _0xe79c3f=_0x4642e0['filter'](_0x3eb0a0=>{if(!_0x3eb0a0['_isInit'])return!0x1;const _0x1b1b65=this['_getAffectedRoot'](_0x3eb0a0);return _0x1b1b65&&!this['_knownRootNames']['has'](_0x1b1b65);});Q(_0xe79c3f,this['_document']['version']),this['_applyOperationsSet'](_0xe79c3f),_0x4df8ec=!0x0,this['_currentBufferDelay']=this['_baseBufferDelay'];}else{const _0x21336c=this['_decompressOperations'](_0xfc3a9b['data'],_0xfc3a9b['metadata'])['filter'](_0x378063=>_0x378063['baseVersion']>=this['_lastServerVersion']);_0x21336c['forEach'](_0x199cdc=>this['_addKnownRoot'](_0x199cdc)),this['_bufferedOperations']=this['_bufferedOperations']['filter'](_0x28b3ee=>!_0x28b3ee['_isInit']||!this['_knownRootNames']['has'](this['_getAffectedRoot'](_0x28b3ee))),this['_bufferedOperations']['length']&&Q(this['_bufferedOperations'],this['_bufferedOperations'][0x0]['baseVersion']),await this['_fetchMissingUsers'](_0x21336c),_0x4df8ec=this['_handleExternalOperations'](_0x21336c,_0xfc3a9b['version'],_0xfc3a9b['lastOperationId']),this['_currentBufferDelay']=Math['round'](this['_currentBufferDelay']/0x2);}return _0x4df8ec?!this['_shouldSendUpdate']()||(this['_sendBufferedOperationsDelayed'](!0x0),!0x1):this['_crash']('realtimecollaborationclient-handleserverresponse');}['_handleExternalOperations'](_0x101b8e,_0x5e3bec,_0x47d13c){try{const _0x2bf27d={'document':this['_document'],'useRelations':!0x1,'padWithNoOps':!0x0},{operationsA:_0x3949cf,operationsB:_0x34f46d,originalOperations:_0x1fb08f}=_0x28de76(_0x101b8e,this['_bufferedOperations'],_0x2bf27d);Q(_0x3949cf,this['_document']['version']),Q(_0x34f46d,_0x5e3bec);for(const _0x109e34 of _0x3949cf){const _0x4ac739=_0x1fb08f['get'](_0x109e34);_0x109e34['_authorId']=_0x4ac739?_0x4ac739['_authorId']:null;}_0x47d13c&&(this['_operationIdentifier']['setIdForTheLastOperation'](_0x101b8e,_0x47d13c),this['_lastSyncedOperationId']=_0x47d13c),this['_bufferedOperations']=[..._0x34f46d],this['_applyOperationsSet'](_0x3949cf),this['_updateServerHistory'](_0x101b8e);}catch(_0xd820ec){return console['error'](_0xd820ec),!0x1;}return!0x0;}['_applyOperationsSet'](_0x68b89f,_0x3a3dc5=!0x1){this['editor']['model']['enqueueChange']({'isUndoable':!0x1,'isLocal':!0x1},_0xa22ad2=>{for(const _0x4bf683 of _0x68b89f)this['_knownOperations']['add'](_0x4bf683),this['_addKnownRoot'](_0x4bf683),_0xa22ad2['batch']['addOperation'](_0x4bf683),this['editor']['model']['applyOperation'](_0x4bf683);});}['_addKnownRoot'](_0x383b9b){const _0x5cf4d2=this['_getAffectedRoot'](_0x383b9b);_0x5cf4d2&&this['_knownRootNames']['add'](_0x5cf4d2);}['_getAffectedRoot'](_0x31f4d1){let _0x2a020d,_0x22d008;switch(_0x31f4d1['type']){case'insert':_0x2a020d=_0x31f4d1['position']['root'];break;case'marker':if(_0x22d008=_0x31f4d1['newRange'],!_0x22d008)return null;_0x2a020d=_0x22d008['root'];break;case'addRootAttribute':_0x2a020d=_0x31f4d1['root'];break;case'addRoot':_0x2a020d=_0x31f4d1['affectedSelectable'];break;case'move':_0x2a020d=_0x31f4d1['targetPosition']['root'];break;default:return null;}return _0x2a020d['rootName'];}['_updateServerHistory'](_0x36aefa){_0x36aefa['forEach'](_0x4ba40b=>{const _0xa6c153=_0x4ba40b['clone']();_0xa6c153['_authorId']=_0x4ba40b['_authorId'],_0xa6c153['_isInit']=!!_0x4ba40b['_isInit'],_0xa6c153['createdAt']=_0x4ba40b['createdAt'],_0xa6c153['baseVersion']+=this['_offset'],_0x4ba40b['_isDisconnection']&&this['_disconnectionOperations']['add'](_0xa6c153),this['serverHistory']['addOperation'](_0xa6c153);});}['_handleReconnectionError'](_0x386117){const _0x2325eb=this['editor']['plugins']['get']('Notification'),_0x44f589=this['editor']['locale'];_0x386117||(_0x386117=q(_0x44f589,'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.')),_0x2325eb['showWarning'](_0x386117,{'title':q(_0x44f589,'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'](_0x5b4c88)['add'](q(this['editor']['locale'],'PENDING_ACTION_SENDING_DATA')));}['_clearPendingAction'](){this['_pendingAction']&&(this['editor']['plugins']['get'](_0x5b4c88)['remove'](this['_pendingAction']),this['_pendingAction']=null);}['_compressOperations'](_0x2c4627){const _0x4aaaac=_0x2c4627['map'](_0x378d79=>_0x378d79['toJSON']());return this['_compressor']['compress'](_0x4aaaac);}['_decompressOperations'](_0x527636,_0x307ec0){return this['_compressor']['decompress'](_0x527636)['map']((_0x3e4b02,_0x5ddad0)=>{const _0x34eaa0='init'==_0x307ec0[_0x5ddad0]['type'];if('InsertOperation'==_0x3e4b02['__className']){const _0x6df189=_0x3e4b02['position']['root'];!this['_document']['getRoot'](_0x6df189)&&(this['_document']['createRoot']('$root',_0x6df189)['_isAttached']=!0x1);}const _0x3ed955=_0x5678b3['fromJSON'](_0x3e4b02,this['_document']);return _0x3ed955['wasUndone']=_0x3e4b02['wasUndone'],_0x3ed955['_isInit']=_0x34eaa0,_0x3ed955['_authorId']=_0x34eaa0?null:_0x307ec0[_0x5ddad0]['userId'],_0x3ed955['_isDisconnection']='cs:removeUser'===_0x307ec0[_0x5ddad0]['type'],_0x3ed955['createdAt']=_0x307ec0[_0x5ddad0]['createdAt'],_0x3ed955;});}['_refreshUserSelectionMarkers'](){this['_hasSelectionChanged']=!0x0,this['_shouldSendSelectionUpdate']()?this['_sendBufferedOperationsDelayed']():this['_hasSelectionChanged']=!0x1;}['_shouldSendSelectionUpdate'](){const _0x46282e=this['editor']['plugins']['get'](r)['channelSessions']['get'](this['_channelId']);return!this['editor']['isReadOnly']&&!!_0x46282e&&_0x46282e['length']>0x1&&this['_hasSelectionChanged'];}['_shouldSendUpdate'](){return this['_bufferedOperations']['length']>0x0||this['_shouldSendSelectionUpdate']();}}class J extends Error{}function Q(_0xa05e72,_0x31eeab){for(const _0x5f4667 of _0xa05e72)_0x5f4667['baseVersion']=_0x31eeab++;}class X{['_ignoredOperations'];['_operationToId'];constructor(_0x359f44){this['_ignoredOperations']=_0x359f44,this['_operationToId']=new WeakMap();}['getIdOfTheLastOperation'](_0x2f041b){let _0x175d48=_0x2f041b['length'];for(;_0x175d48--;){const _0x5cc40a=_0x2f041b[_0x175d48];if(!this['_ignoredOperations']['has'](_0x5cc40a)){if(!this['_operationToId']['has'](_0x5cc40a)){const _0x339ed7=_0x21753f()['slice'](0x1,0x12);this['_operationToId']['set'](_0x5cc40a,_0x339ed7);}return this['_operationToId']['get'](_0x5cc40a);}}}['setIdForTheLastOperation'](_0x3e9b74,_0x16e64f){if(!_0x16e64f)return;let _0x10e91b=_0x3e9b74['length'];for(;_0x10e91b--;){const _0xc3e74=_0x3e9b74[_0x10e91b];this['_ignoredOperations']['has'](_0xc3e74)||this['_operationToId']['set'](_0xc3e74,_0x16e64f);}}}class n extends _0x4dbc33{static get['requires'](){return[l];}static get['pluginName'](){return'RealTimeCollaborativeEditing';}}class a extends _0x14461c{static ['CommentsService']=/* #__PURE__ -- @preserve */
|
|
26
|
-
((()=>_0x3ca7eb)());['_services'];static get['requires'](){return[c,'CommentsRepository',r,_0x4a45f7];}static get['pluginName'](){return'CloudServicesCommentsAdapter';}constructor(_0x4e0608){super(_0x4e0608),this['_services']=new Map();}async['init'](){const _0x3de3e7=this['context'],_0x4a4428=_0x3de3e7['plugins']['get']('CommentsRepository');if(_0x3de3e7['plugins']['get'](c)['addToReconnectionStack'](this),_0x4a4428['adapter']={'addCommentThread':async({channelId:_0x2a4666,threadId:_0x52b739,comments:_0x1f3db1,resolvedAt:_0x8b3726,resolvedBy:_0x52b144,context:_0x39ed9b,attributes:_0x16ae4a})=>{const _0x1e244a=await this['_getService'](_0x2a4666)['addCommentThread']({'commentThreadId':_0x52b739,'comments':_0x1f3db1['map'](_0x437fb1=>function(_0x377407,_0x2a34a3,_0x257d75){return{'commentThreadId':_0x257d75,'commentId':_0x377407['commentId'],'userId':_0x377407['authorId'],'content':_0x377407['content'],'documentId':_0x2a34a3,'createdAt':_0x377407['createdAt'],'attributes':_0x377407['attributes']||{}};}(_0x437fb1,_0x2a4666,_0x52b739)),'resolvedAt':_0x8b3726,'resolvedBy':_0x52b144,'context':_0x39ed9b,'attributes':_0x16ae4a})['catch'](ut);return{'threadId':_0x1e244a['commentThreadId'],'comments':_0x1e244a['comments']};},'getCommentThread':async({channelId:_0x101c5e,threadId:_0x5c3cb3})=>{const _0x319ad4=await this['_getService'](_0x101c5e)['getCommentThread'](_0x5c3cb3)['catch'](ut);return _0x319ad4['deletedAt']?null:(await this['_fetchMissingUsersForThreads']([_0x319ad4]),{'threadId':_0x319ad4['commentThreadId'],'comments':_0x319ad4['comments']['map'](S),'context':_0x319ad4['context'],'resolvedAt':_0x319ad4['resolvedAt'],'resolvedBy':_0x319ad4['resolvedBy'],'attributes':_0x319ad4['attributes']||{}});},'updateCommentThread':async({channelId:_0x2921e5,threadId:_0x2f7b5b,context:_0x4f91af,unlinkedAt:_0x2eb1e0,attributes:_0x1f1fb8})=>this['_getService'](_0x2921e5)['updateCommentThread']({'commentThreadId':_0x2f7b5b,'context':_0x4f91af,'attributes':_0x1f1fb8,'unlinkedAt':_0x2eb1e0})['catch'](B)['catch'](ut),'resolveCommentThread':async({channelId:_0x277500,threadId:_0x28040f})=>{const _0x2332ed=await this['_getService'](_0x277500)['resolveCommentThread'](_0x28040f)['catch'](B)['catch'](ut);return{'threadId':_0x2332ed['commentThreadId'],'resolvedAt':_0x2332ed['resolvedAt'],'resolvedBy':_0x2332ed['resolvedBy']};},'reopenCommentThread':async({channelId:_0x4c3e08,threadId:_0x457d9c})=>this['_getService'](_0x4c3e08)['reopenCommentThread'](_0x457d9c)['catch'](B)['catch'](ut),'removeCommentThread':({channelId:_0x11eeb8,threadId:_0x4e2eb5})=>this['_getService'](_0x11eeb8)['removeCommentThread'](_0x4e2eb5)['catch'](B)['catch'](ut),'addComment':({channelId:_0x45b5a2,threadId:_0xe3d97d,commentId:_0x26baf,content:_0x2db536,attributes:_0x30f661})=>this['_getService'](_0x45b5a2)['addComment'](_0xe3d97d,_0x26baf,_0x2db536,_0x30f661)['catch'](ut),'updateComment':({channelId:_0x90fb45,threadId:_0x130db2,commentId:_0x2f8138,content:_0x34c912,attributes:_0x274aac})=>this['_getService'](_0x90fb45)['updateComment'](_0x130db2,_0x2f8138,_0x34c912,_0x274aac)['catch'](B)['catch'](ut),'removeComment':({channelId:_0x2330e4,threadId:_0x5a88a7,commentId:_0x149636})=>this['_getService'](_0x2330e4)['removeComment'](_0x5a88a7,_0x149636)['catch'](B)['catch'](ut)},_0x3de3e7 instanceof _0x2df86d){const _0x1c656d=_0x3de3e7['config']['get']('collaboration.channelId'),_0x589515=_0x3de3e7['plugins']['get'](r);await this['_setUpService'](_0x1c656d);const _0xfcec11=await this['_services']['get'](_0x1c656d)['getConnectedSessions']();this['listenTo'](_0x589515,'sessionAdd:'+_0x1c656d,(_0x15c5da,{session:_0x97ea8e})=>{_0x97ea8e['id']===_0x589515['mySessionId']&&(_0x15c5da['off'](),this['context']['plugins']['get']('Permissions')['setPermissions'](_0x97ea8e['permissions'],_0x1c656d));}),_0x589515['register'](_0x1c656d,_0xfcec11);}}async['_setUpService'](_0x310293){if(this['_services']['has'](_0x310293))throw new _0x206d07('cloudservicescommentsadapter-connect-already-connected',null,{'channelId':_0x310293});const _0xb4de16=this['context']['plugins']['get']('CommentsRepository'),_0x59621b=new a['CommentsService'](_0x310293);this['_services']['set'](_0x310293,_0x59621b),this['listenTo'](_0x59621b,'commentThreadAdded',(_0x2bf36b,_0x200853)=>{const {commentThreadId:_0x527f47,documentId:_0x45519e,context:_0x43a4d5,attributes:_0x3dfb1b,resolvedAt:_0x1e6b6e,resolvedBy:_0x7e8744,comments:_0x56ca9f}=_0x200853;_0xb4de16['getCommentThread'](_0x527f47)||_0xb4de16['addCommentThread']({'threadId':_0x527f47,'channelId':_0x45519e,'comments':_0x56ca9f?_0x56ca9f['map'](S):[],'context':_0x43a4d5,'attributes':_0x3dfb1b,'resolvedAt':_0x1e6b6e,'resolvedBy':_0x7e8744,'isFromAdapter':!0x0});}),this['listenTo'](_0x59621b,'commentThreadUpdated',(_0x575bf1,{commentThreadId:_0x26b89c,documentId:_0x2bf01f,context:_0x1dbd10,unlinkedAt:_0x4d76a7,attributes:_0x36ca35})=>{_0xb4de16['getCommentThread'](_0x26b89c)&&_0xb4de16['updateCommentThread']({'threadId':_0x26b89c,'channelId':_0x2bf01f,'context':_0x1dbd10,'unlinkedAt':_0x4d76a7,'attributes':_0x36ca35,'isFromAdapter':!0x0});}),this['listenTo'](_0x59621b,'commentThreadResolved',(_0x2784b9,{commentThreadId:_0x1c4081,resolvedBy:_0x4d6116,resolvedAt:_0x9219cd})=>{const _0x43b171=_0xb4de16['getCommentThread'](_0x1c4081);_0x43b171&&_0x43b171['resolve']({'resolvedBy':_0x4d6116,'resolvedAt':_0x9219cd,'isFromAdapter':!0x0});}),this['listenTo'](_0x59621b,'commentThreadReopened',(_0x23b6c7,{commentThreadId:_0x55b05f})=>{const _0x1f3f05=_0xb4de16['getCommentThread'](_0x55b05f);_0x1f3f05&&_0x1f3f05['reopen']({'isFromAdapter':!0x0});}),this['listenTo'](_0x59621b,'commentThreadRemoved',(_0x4626ab,{commentThreadId:_0x5980c4})=>{const _0x525cee=_0xb4de16['getCommentThread'](_0x5980c4);_0x525cee&&_0x525cee['remove']({'isFromAdapter':!0x0});}),this['listenTo'](_0x59621b,'commentAdded',(_0x38d38a,_0x1e5655)=>{const _0x4da5ce=_0x1e5655['commentThreadId'],_0xc0f54f=_0xb4de16['getCommentThread'](_0x4da5ce);_0xc0f54f&&_0xc0f54f['addComment']({...S(_0x1e5655),'isFromAdapter':!0x0});}),this['listenTo'](_0x59621b,'commentUpdated',(_0x22263f,{commentThreadId:_0xc2f583,commentId:_0x5c71e7,content:_0xe735d5,attributes:_0x1d73d4})=>{const _0x3cd9c3=_0xb4de16['getCommentThread'](_0xc2f583);if(_0x3cd9c3){const _0x3975d5=_0x3cd9c3['getComment'](_0x5c71e7);_0x3975d5&&_0x3975d5['update']({'content':_0xe735d5,'attributes':_0x1d73d4,'isFromAdapter':!0x0});}}),this['listenTo'](_0x59621b,'commentRemoved',(_0xe2fe3a,{commentThreadId:_0x538681,commentId:_0x1ca259})=>{const _0x337aef=_0xb4de16['getCommentThread'](_0x538681);if(_0x337aef){const _0x3694c2=_0x337aef['getComment'](_0x1ca259);_0x3694c2&&_0x3694c2['remove']({'isFromAdapter':!0x0});}}),await this['_connectService'](_0x310293);}['destroy'](){if(this['context']instanceof _0x2df86d){const _0x4cda14=this['context']['config']['get']('collaboration.channelId');this['_terminateService'](_0x4cda14);}}['_terminateService'](_0xa692a8){if(!this['_services']['has'](_0xa692a8))throw new _0x206d07('cloudservicescommentsadapter-disconnect-not-exist',null,{'channelId':_0xa692a8});this['_getService'](_0xa692a8)['disconnect'](),this['_services']['delete'](_0xa692a8);}async['reconnect'](){for(const _0x122dbb of this['_services']['keys']())await this['_connectService'](_0x122dbb);if(this['context']instanceof _0x2df86d){const _0xfa27b7=this['context']['config']['get']('collaboration.channelId'),_0x14fe62=this['context']['plugins']['get'](r);_0x14fe62['unregister'](_0xfa27b7);const _0x2c7e84=await this['_services']['get'](_0xfa27b7)['getConnectedSessions']();_0x14fe62['register'](_0xfa27b7,_0x2c7e84);}}async['_connectService'](_0x487e87){const {connection:_0x13f680}=this['context']['plugins']['get'](c),_0x3a58f2=this['context']['plugins']['get']('CommentsRepository'),_0x27be84=this['_services']['get'](_0x487e87),_0x3d40f3=await _0x27be84['connect'](_0x13f680);await this['_fetchMissingUsersForThreads'](_0x3d40f3);const _0x146336=new Set(Array['from'](_0x3a58f2['getCommentThreads']({'channelId':_0x487e87}),_0xe860e6=>_0xe860e6['id']));for(const _0x209d4c of _0x3d40f3)_0x209d4c['deletedAt']||_0x146336['delete'](_0x209d4c['commentThreadId']);for(const _0x2a4a38 of _0x146336)_0x3a58f2['getCommentThread'](_0x2a4a38)['remove']({'isFromAdapter':!0x0});for(const _0xd8698 of _0x3d40f3){let _0x24ece3=_0x3a58f2['getCommentThread'](_0xd8698['commentThreadId']);const {commentThreadId:_0x3ee825,context:_0xbb4736,attributes:_0x1f394b,resolvedBy:_0x2aa270,resolvedAt:_0x2ae6c5,unlinkedAt:_0x35cf67,deletedAt:_0x290266}=_0xd8698;if(_0x290266)continue;_0x24ece3||(_0x24ece3=_0x3a58f2['addCommentThread']({'channelId':_0x487e87,'threadId':_0x3ee825,'context':_0xbb4736,'attributes':_0x1f394b||{},'resolvedBy':_0x2aa270,'resolvedAt':_0x2ae6c5,'unlinkedAt':_0x35cf67,'isFromAdapter':!0x0}));const _0x5df089=new Set(Array['from'](_0x24ece3['comments'],_0x12b501=>_0x12b501['id']));for(const _0x5497a2 of _0xd8698['comments'])_0x5df089['delete'](_0x5497a2['commentId']);for(const _0x5a22e3 of _0x5df089)_0x24ece3['getComment'](_0x5a22e3)['remove']({'isFromAdapter':!0x0});for(const _0x287e56 of _0xd8698['comments']){const _0x15859c=_0x24ece3['getComment'](_0x287e56['commentId']);_0x15859c?_0x15859c['content']!==_0x287e56['content']&&_0x15859c['update']({'content':_0x287e56['content'],'isFromAdapter':!0x0}):_0x24ece3['addComment'](Object['assign'](S(_0x287e56),{'isFromAdapter':!0x0}));}}}['_getService'](_0x30e61c){if(!this['_services']['has'](_0x30e61c))throw new _0x206d07('cloudservicescommentsadapter-service-not-exist',null,{'channelId':_0x30e61c});return this['_services']['get'](_0x30e61c);}async['_fetchMissingUsersForThreads'](_0x15a310){const _0x5231a3=this['context']['plugins']['get'](_0x4a45f7),{connection:_0x16e34d}=this['context']['plugins']['get'](c),_0x4e169f=new Set();for(const {resolvedBy:_0xe52721,comments:_0x34cd5d}of _0x15a310){_0xe52721&&!_0x5231a3['getUser'](_0xe52721)&&_0x4e169f['add'](_0xe52721);for(const {userId:_0x2bf5be}of _0x34cd5d)_0x5231a3['getUser'](_0x2bf5be)||_0x4e169f['add'](_0x2bf5be);}if(0x0===_0x4e169f['size'])return;const _0x468095=await lt['getMany'](_0x16e34d,Array['from'](_0x4e169f));for(const _0x357186 of _0x468095)_0x5231a3['getUser'](_0x357186['id'])||_0x5231a3['addUser'](_0x357186);}}async function B(_0x326633){if('404'!==_0x326633['code'])throw _0x326633;}function ut(_0x427cf4){if((_0x4b95e5=_0x427cf4)['message']['startsWith']('cloud-services-internal-error:\x20Comments\x20Service\x20is\x20not\x20connected.')||_0x4b95e5['message']['startsWith']('cloud-services-internal-error:\x20Not\x20connected.')||_0x4b95e5['message']['startsWith']('cloud-services-internal-error:\x20Request\x20timeout.'))return new Promise(()=>{});var _0x4b95e5;throw _0x427cf4;}function S(_0x1b3b55){return{'threadId':_0x1b3b55['commentThreadId'],'commentId':_0x1b3b55['commentId'],'content':_0x1b3b55['content'],'createdAt':_0x1b3b55['createdAt'],'authorId':_0x1b3b55['userId'],'attributes':_0x1b3b55['attributes']||{}};}class g extends _0x4dbc33{static ['TrackChangesService']=/* #__PURE__ -- @preserve */
|
|
27
|
-
((()=>et)());['_bufferedRequests'];['_trackChangesService'];static get['requires'](){return[a,'TrackChangesEditing',c];}constructor(
|
|
28
|
-
((()=>it)());['_lastRequestId'];['_revisionTracker'];['_revisionHistoryService'];['_oldOffset'];static get['requires'](){return[c,l,'RevisionTracker',r,_0x4a45f7];}constructor(_0x548a46){super(_0x548a46);const _0x3f4753=this['editor']['config']['get']('collaboration.channelId');this['_lastRequestId']=null,this['_revisionTracker']=this['editor']['plugins']['get']('RevisionTracker'),this['_revisionHistoryService']=new v['RevisionHistoryService'](_0x3f4753);}async['init'](){const _0x4ab093=this['editor']['plugins']['get'](l),_0x43c2f6=_0x4ab093['serverHistory'],_0x33f7e1=this['editor']['plugins']['get'](c);this['_revisionTracker']['setSource']({'history':_0x43c2f6,'getLatestVersion':()=>this['_getLatestVersion'](),'getCurrentRevisionId':()=>_0x4ab093['sessionId']});const _0x36fe09=this['editor']['config']['get']('cloudServices.bundleVersion')||nt,_0x2a11ad=await tt['isBundleUploaded'](_0x33f7e1['connection'],_0x36fe09);this['_revisionTracker']['adapter']={'getRevision':async({revisionId:_0x9d244})=>(await this['_waitForServiceReady'](),await this['_revisionHistoryService']['getRevision'](_0x9d244)),'updateRevisions':async _0x4b2892=>{await this['_waitForServiceReady']();const _0x4d9c2e=this['_revisionTracker']['currentRevision'];if(_0x2a11ad&&0x1===_0x4b2892['length']&&_0x4b2892[0x0]['id']===_0x4d9c2e['id'])return _0x4b2892;for(const _0x3592f5 of _0x4b2892)_0x3592f5['id']===_0x4d9c2e['id']&&(_0x3592f5['isEmptyCurrent']=_0x3592f5['fromVersion']===_0x3592f5['toVersion']);return this['_revisionHistoryService']['updateRevisions'](_0x4b2892,this['_lastRequestId'])['then'](_0x170473=>(this['_lastRequestId']=_0x170473,_0x4b2892))['catch'](_0x955039=>{if(st(_0x955039)||'400'===_0x955039['code']&&void 0x0!==_0x955039['data']['wrongRequestId']){for(const _0x4cbda1 of _0x4b2892){!this['_revisionTracker']['repository']['getRevision'](_0x4cbda1['id'])||this['_revisionTracker']['_bufferUpdate'](_0x4cbda1['id'],_0x4cbda1,!0x1);}if(st(_0x955039))throw _0x955039;return _0x4b2892;}throw _0x955039;});}},this['listenTo'](this['_revisionHistoryService'],'revisionsUpdated',(_0x4aa5e8,{revisionsData:_0x259033,requestId:_0x35a69a})=>{Math['max'](..._0x259033['map'](_0x4e2fa5=>_0x4e2fa5['toVersion']))>this['_getLatestVersionFromServerOperations']()-0x1?this['_getLatestVersion']()['then'](()=>{this['_handleRevisionsUpdate'](_0x259033,_0x35a69a);}):this['_handleRevisionsUpdate'](_0x259033,_0x35a69a);});const {revisions:_0x2bd432,requestId:_0x164cdc}=await this['_revisionHistoryService']['connect'](_0x33f7e1['connection']);_0x33f7e1['addToReconnectionStack'](this),this['_lastRequestId']=_0x164cdc,await this['_fetchMissingUsers'](_0x2bd432);for(const _0xbe9e8d of _0x2bd432)this['_revisionTracker']['addRevisionData'](_0xbe9e8d);this['listenTo'](_0x4ab093,'change:_isConnected',(_0xd82261,_0x73158b,_0x3e8a3e)=>{_0x3e8a3e&&(this['_oldOffset']=_0x4ab093['_offset'],_0xd82261['off']());}),this['_revisionTracker']['bind']('isEnabled')['to'](_0x33f7e1,'state',_0x31beb2=>_0x31beb2===_0x403fca['CONNECTED']);}async['reconnect'](){const _0x4b062e=this['editor']['plugins']['get'](c),_0x41c0fa=this['editor']['plugins']['get'](l),_0x5c2a61=async()=>{const _0x19dce2=this['_revisionTracker']['currentRevision'],_0x31056e=_0x19dce2['id'],_0x1911cf=_0x31056e!==_0x41c0fa['sessionId'];if(_0x1911cf){const _0x9f22cc=_0x41c0fa['_offset']-this['_oldOffset'],_0x2575df=this['_getLatestVersionFromServerOperations']();this['_revisionTracker']['_revisionDataBuilder']['reInit']();if(_0x19dce2['toVersion']+_0x9f22cc!==_0x2575df){const _0x3dcf71=_0x19dce2['fromVersion']+_0x9f22cc,_0x312620=this['editor']['plugins']['get'](_0x4a45f7),_0x563365=this['_revisionTracker']['buildRevisionData']({'revision':_0x19dce2,'from':_0x3dcf71,'to':_0x2575df});_0x563365['id']=_0x19dce2['id'];const _0x110797=_0x563365['authorsIds']['map'](_0x2da988=>_0x312620['getUser'](_0x2da988));_0x19dce2['_update']({..._0x563365,'authors':_0x110797},!0x0),this['_revisionTracker']['_bufferUpdate'](_0x19dce2['id'],_0x563365,!0x0);}this['_revisionTracker']['_startingVersion']=_0x2575df,(_0x19dce2['toVersion']===_0x19dce2['fromVersion']&&!this['_revisionTracker']['_bufferedUpdates']['has'](_0x31056e)&&this['_revisionTracker']['repository']['_revisions']['remove'](_0x31056e),this['_revisionTracker']['_createCurrentRevision'](_0x2575df));}const {revisions:_0x2933bb,requestId:_0x1f7f5d}=await this['_revisionHistoryService']['reconnect'](_0x4b062e['connection'],this['_lastRequestId']);_0x1911cf&&_0x2933bb['length']>0x0?_0x41c0fa['_handleReconnectionError']():(await this['_fetchMissingUsers'](_0x2933bb),this['_handleRevisionsUpdate'](_0x2933bb,_0x1f7f5d),this['_revisionTracker']['sendBufferedUpdates']());};return _0x41c0fa['_isConnected']?_0x5c2a61():new Promise((_0xe30526,_0x44e1b9)=>{_0x41c0fa['once']('change:_isConnected',()=>{_0x5c2a61()['then'](_0xe30526)['catch'](_0x44e1b9);});});}['destroy'](){super['destroy']();}async['_waitForServiceReady'](){this['_revisionHistoryService']['isConnected']||await new Promise(_0xd1bf6e=>{this['listenTo'](this['_revisionHistoryService'],'connected',_0x47f33d=>{_0x47f33d['off'](),_0xd1bf6e();});});}['_getLatestVersionFromServerOperations'](){const _0x13a8b1=this['editor']['plugins']['get'](l)['serverHistory']['getOperations']()['reverse']();for(const _0x1378a0 of _0x13a8b1)if('marker'!==_0x1378a0['type']||_0x1378a0['affectsData'])return _0x1378a0['baseVersion']+0x1;}['_getLatestVersion'](){const _0x2087f1=this['editor']['plugins']['get'](l);return new Promise(_0x42a0c9=>{_0x2087f1['_isPendingUpdate']?_0x2087f1['once']('change:_isPendingUpdate',()=>{_0x42a0c9(this['_getLatestVersionFromServerOperations']());}):_0x42a0c9(this['_getLatestVersionFromServerOperations']());});}['_handleRevisionsUpdate'](_0x28e14f,_0xc4f3ef){const _0x3edf57=this['_revisionTracker']['repository'];this['_lastRequestId']=_0xc4f3ef;for(const _0x185494 of _0x28e14f){const _0x5afbbc=_0x3edf57['getRevision'](_0x185494['id']);if(_0x5afbbc){if((_0x185494['fromVersion']||_0x185494['toVersion'])&&(_0x185494['diffData']=null),_0x5afbbc===this['_revisionTracker']['currentRevision']){const _0x3dab7d=Math['max'](_0x5afbbc['toVersion'],_0x185494['toVersion']),_0x184596=Math['max'](_0x5afbbc['fromVersion'],_0x185494['fromVersion']);let _0x1da6bd;_0x5afbbc['toVersion']===_0x185494['toVersion']&&_0x5afbbc['fromVersion']===_0x185494['fromVersion']?(_0x1da6bd=!0x0,this['_preventResendingRevisionData'](_0x185494)):_0x185494['toVersion']===_0x3dab7d&&_0x185494['fromVersion']===_0x184596?_0x1da6bd=!0x1:(_0x5afbbc['toVersion']===_0x3dab7d&&_0x5afbbc['fromVersion']===_0x184596||this['_fixRevision']({'revision':_0x5afbbc,'from':_0x184596,'to':_0x3dab7d}),_0x1da6bd=!0x0),_0x1da6bd&&(delete _0x185494['fromVersion'],delete _0x185494['toVersion'],delete _0x185494['diffData'],delete _0x185494['createdAt'],delete _0x185494['authorsIds']);}this['_revisionTracker']['setRevisionData'](_0x185494),this['_preventResendingRevisionData'](_0x185494);}else this['_revisionTracker']['addRevisionData'](_0x185494);}const _0x4474de=_0x3edf57['getRevisions']();_0x4474de['reverse']();for(let _0x35f7d1=0x0;_0x35f7d1<_0x4474de['length']-0x1;_0x35f7d1++){const _0x434b91=_0x4474de[_0x35f7d1],_0x2c16ad=_0x4474de[_0x35f7d1+0x1];if(_0x434b91['fromVersion']<_0x2c16ad['toVersion']){const _0x45e3c0=_0x2c16ad['toVersion'],_0xae52e4=Math['max'](_0x45e3c0,_0x434b91['toVersion']);this['_fixRevision']({'revision':_0x434b91,'from':_0x45e3c0,'to':_0xae52e4});}}}['_fixRevision']({revision:_0x4a5a07,from:_0x3bbb00,to:_0x399399}={}){const _0x2b5f59=this['editor']['plugins']['get'](_0x4a45f7),_0x2a5b33=this['_revisionTracker']['buildRevisionData']({'revision':_0x4a5a07,'from':_0x3bbb00,'to':_0x399399});_0x2a5b33['authors']=_0x2a5b33['authorsIds']['map'](_0x2bfe4f=>_0x2b5f59['getUser'](_0x2bfe4f)),_0x4a5a07['_update'](_0x2a5b33);}['_preventResendingRevisionData'](_0xbb4d4f){const _0x1eb6fd={};_0x1eb6fd['id']=_0xbb4d4f['id'];for(const _0x2472ac of Object['keys'](_0xbb4d4f))'id'!==_0x2472ac&&(_0x1eb6fd[_0x2472ac]=void 0x0);this['_revisionTracker']['_bufferUpdate'](_0x1eb6fd['id'],_0x1eb6fd,!0x0);}async['_fetchMissingUsers'](_0x197a1b){const _0x47a37d=this['editor']['plugins']['get'](_0x4a45f7),{connection:_0x523e8d}=this['editor']['plugins']['get'](c),_0x4c3eae=new Set();for(const _0x157354 of _0x197a1b){for(const _0x2aa686 of _0x157354['authorsIds'])_0x4b519e(_0x2aa686);_0x157354['creatorId']&&_0x4b519e(_0x157354['creatorId']);}if(0x0===_0x4c3eae['size'])return;const _0x50798d=await lt['getMany'](_0x523e8d,Array['from'](_0x4c3eae));for(const _0xabc2e7 of _0x50798d)_0x47a37d['getUser'](_0xabc2e7['id'])||_0x47a37d['addUser'](_0xabc2e7);function _0x4b519e(_0x48a6b0){_0x47a37d['getUser'](_0x48a6b0)||_0x4c3eae['add'](_0x48a6b0);}}}function st(_0x3e8229){return _0x3e8229['message']['startsWith']('cloud-services-internal-error:\x20Revision\x20History\x20Service\x20is\x20not\x20connected.')||_0x3e8229['message']['startsWith']('cloud-services-internal-error:\x20Not\x20connected.')||_0x3e8229['message']['startsWith']('cloud-services-internal-error:\x20Request\x20timeout.');}class d extends _0x4dbc33{static get['requires'](){return['RevisionHistory',v,n];}static get['pluginName'](){return'RealTimeCollaborativeRevisionHistory';}}class ts extends _0x1fb7fc{constructor(_0x402cca){super(_0x402cca);const _0x2929b7=this['bindTemplate'];this['set']('usersCount',0x0),this['set']('isHidden',!0x0),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-presence-list__counter',_0x2929b7['if']('isHidden','ck-presence-list__counter--hidden')]},'children':[{'text':_0x2929b7['to']('usersCount',_0x85651a=>q(_0x402cca,'CONNECTED_USERS',_0x85651a))}]});}}class es extends _0x1fb7fc{['items'];['keystrokes'];constructor(_0x12c464){super(_0x12c464);const _0x7beb45=this['bindTemplate'];this['items']=this['createCollection'](),this['keystrokes']=new _0x36b3af(),this['set']({'hasPopup':!0x1,'isExpanded':!0x1}),this['setTemplate']({'tag':'div','attributes':{'aria-haspopup':_0x7beb45['if']('hasPopup'),'aria-expanded':_0x7beb45['to']('isExpanded',_0x4b7262=>this['hasPopup']&&String(_0x4b7262)),'aria-label':_0x7beb45['to']('hasPopup',_0x1efd8d=>q(_0x12c464,_0x1efd8d?'Collapsed\x20connected\x20users\x20list\x20(press\x20ENTER\x20to\x20open\x20it)':'Connected\x20users\x20list')),'role':'list','tabindex':_0x7beb45['to']('hasPopup',_0x28d649=>!!_0x28d649&&0x0),'class':['ck','ck-presence-list__list']},'children':this['items'],'on':{'click':_0x7beb45['to'](()=>this['fire']('execute'))}}),this['on']('change:hasPopup',(_0xdf0a99,_0x221347,_0xfd1da4)=>{this['element']&&(_0xfd1da4?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 _0x1fb7fc{['counterView'];['inlineListView'];constructor(_0x203f69){super(_0x203f69);const _0x3ed8f1=this['bindTemplate'];this['set']('isCollapsed',!0x0),this['counterView']=new ts(this['locale']),this['inlineListView']=new es(_0x203f69),this['inlineListView']['bind']('hasPopup')['to'](this,'isCollapsed'),this['listenTo'](this['inlineListView']['items'],'change',()=>{for(const _0x558764 of this['inlineListView']['items'])_0x558764['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',_0x3ed8f1['if']('isCollapsed','ck-presence-list--collapsed')]},'children':[this['counterView'],this['inlineListView']]});}}class j extends _0x1fb7fc{['listWrapperView'];constructor(_0x375b70,_0x359df3){super(_0x375b70),this['listWrapperView']=new mt(_0x375b70,_0x359df3),this['setTemplate']({'tag':'div','attributes':{'tabindex':-0x1,'role':'application','class':['ck','ck-presence-list__dropdown-list'],'aria-label':q(_0x375b70,'Connected\x20users\x20list\x20dropdown\x20menu')},'children':[this['listWrapperView']]});}}class mt extends _0x1b86da{constructor(_0x52fcf1,_0x1f14c2){super(_0x52fcf1);const _0x340be4=this['bindTemplate'];this['set']('_isScrollable',!0x1),this['setTemplate']({'tag':_0x1f14c2?'div':'ul','attributes':{'class':['ck','ck-reset','ck-list','ck-presence-list__dropdown-list-wrapper',_0x340be4['if']('_isScrollable','ck-presence-list__dropdown-list-wrapper_scrollable')],'role':_0x340be4['to']('role'),'aria-label':_0x340be4['to']('ariaLabel'),'aria-labelledby':_0x340be4['to']('ariaLabelledBy')},'children':this['items']}),this['listenTo'](_0x1e5003['window'],'resize',()=>this['checkIfScrollable']()),this['items']['on']('change',()=>this['checkIfScrollable']());}['render'](){super['render'](),this['checkIfScrollable']();}['checkIfScrollable'](){const _0x4d7419=this['element'];_0x4d7419&&(this['_isScrollable']=Math['max'](_0x4d7419['scrollHeight'],_0x4d7419['clientHeight'])>0.8*window['innerHeight']);}}class k extends rt{['userView'];constructor(_0xe939ce,_0x2581f3,_0x81c685){super(_0xe939ce);const _0xe64a=this['bindTemplate'];this['userView']=new ct(_0xe939ce,_0x2581f3);const _0x1d0975={'tag':'li','attributes':{'class':['ck','ck-presence-list__dropdown-list-item'],'tabindex':-0x1,'role':'presentation','aria-label':_0x2581f3['name']},'children':[this['userView'],{'tag':'span','attributes':{'class':['ck','ck-user__full-name']},'children':[{'text':_0x2581f3['name']}]},{'tag':'span','attributes':{'class':['ck','ck-presence-list__marker',_0x2581f3['color']['getBackgroundColorClass']()],'aria-hidden':'true'}}]};_0x81c685&&(_0x1d0975['tag']='button',_0x1d0975['on']={'click':_0xe64a['to'](()=>this['fire']('execute'))}),this['setTemplate'](_0x1d0975);}['focus'](){this['element']['focus']();}}class y extends _0x1fb7fc{['userView'];['markerView'];constructor(_0x1fdc97,_0xe34d6a,_0x2ff2ef){super(_0x1fdc97);const _0x13a052=this['bindTemplate'];this['set']('isFocusable',!0x1),this['set']('hasTooltip',!0x0),this['set']('tooltipPosition',''),this['userView']=new ct(_0x1fdc97,_0xe34d6a),this['markerView']=new at(_0x1fdc97,_0xe34d6a);const _0x294e96=new ot(_0x1fdc97);_0x294e96['template']['tag']='span',_0x294e96['text']=_0xe34d6a['name'];const _0x145e3c={'tag':'div','attributes':{'class':['ck','ck-presence-list__list-item'],'role':'listitem','tabindex':_0x13a052['to']('isFocusable',_0x1c45b5=>!!_0x1c45b5&&0x0),'aria-labelledby':_0x294e96['id'],'data-cke-tooltip-text':this['userView']['name'],'data-cke-tooltip-position':_0x13a052['to']('tooltipPosition'),'data-cke-tooltip-disabled':_0x13a052['to']('hasTooltip',_0x21db08=>!_0x21db08),'data-cke-tooltip-class':'ck-presence-list__list-item__tooltip'},'children':[this['userView'],this['markerView'],_0x294e96]};_0x2ff2ef&&(_0x145e3c['tag']='button',_0x145e3c['on']={'click':_0x13a052['to'](()=>this['fire']('execute'))}),this['setTemplate'](_0x145e3c);}}class at extends _0x1fb7fc{constructor(_0x2c1a25,_0x4b7d7e){super(_0x2c1a25),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-presence-list__marker',_0x4b7d7e['color']['getBackgroundColorClass']()],'aria-hidden':'true'}});}}const A={'collapseAt':0x6,'displayMe':!0x0};class s extends _0x14461c{['currentDisplayedUsers'];['balloonPanelView'];['view'];['presenceDropdownView'];['_bodyCollection']=null;constructor(_0x2d135e){super(_0x2d135e),this['context']['config']['define']('presenceList',A);const _0x30f2b7=_0x2d135e['config']['get']('presenceList.collapseAt');if('number'!=typeof _0x30f2b7)throw new _0x206d07('presencelist-collapseat-invalid-format',this);if(_0x30f2b7<0x1)throw new _0x206d07('presencelist-collapseat-invalid-format',this);this['_allConnectedUsers']=this['context']['plugins']['get'](r)['allConnectedUsers'],this['set']('usersCount',0x0),this['currentDisplayedUsers']=new _0x33b2c0(),this['balloonPanelView']=new _0x20d5c5(),this['balloonPanelView']['class']='ck\x20ck-presence-list__balloon',this['view']=this['_createView'](),this['presenceDropdownView']=void 0x0;}static get['requires'](){return[r];}['init'](){for(const _0x15ac79 of this['_allConnectedUsers'])this['_handleUserAdd'](_0x15ac79);this['listenTo'](this['_allConnectedUsers'],'add',(_0x36fff2,_0x10d706)=>{this['_handleUserAdd'](_0x10d706);}),this['listenTo'](this['_allConnectedUsers'],'remove',(_0x5b8885,_0x24de09)=>{this['_handleUserRemove'](_0x24de09);});}['_createView'](){const _0x4832be=this['context'],_0x3538bc=new L(this['context']['locale']),_0x7e6eb3=this['balloonPanelView'];if(!_0x2a8347(_0x4832be['config']['get']('presenceList.container')))throw new _0x206d07('presencelist-missing-container',this);return _0x3538bc['counterView']['bind']('usersCount')['to'](this),_0x3538bc['bind']('isCollapsed')['to'](this,'usersCount',_0x65e418=>{const {collapseAt:_0x2b767d,displayMe:_0x55be0b}=_0x4832be['config']['get']('presenceList'),_0x53cf85=_0x65e418>=_0x2b767d;return _0x3538bc['counterView']['isHidden']=!(0x1==_0x65e418&&_0x55be0b||_0x53cf85),_0x53cf85||this['hideDropdown'](),_0x53cf85;}),_0x3538bc['inlineListView']['items']['bindTo'](this['currentDisplayedUsers'])['using'](_0xaf0677=>{const _0x481c96=_0x4832be['config']['get']('presenceList'),_0x4fc1ce=new y(_0x4832be['locale'],_0xaf0677,!!_0x481c96['onClick']);return _0x4fc1ce['bind']('hasTooltip')['to'](_0x3538bc,'isCollapsed',_0x4b77f7=>!_0x4b77f7),_0x4fc1ce['bind']('isFocusable')['to'](_0x3538bc,'isCollapsed',_0x27e371=>!_0x27e371),_0x481c96['onClick']&&this['listenTo'](_0x4fc1ce,'execute',()=>{this['view']['isCollapsed']||_0x481c96['onClick'](_0xaf0677,_0x4fc1ce['element']);}),_0x4fc1ce;}),this['listenTo'](_0x3538bc['inlineListView'],'execute',()=>{this['presenceDropdownView']?this['hideDropdown']():this['view']['isCollapsed']&&this['showDropdown']();}),_0x3538bc['inlineListView']['keystrokes']['set']('Enter',(_0x52e0f9,_0x58f81a)=>{this['view']['isCollapsed']&&(this['showDropdown'](),_0x58f81a());}),_0x3538bc['render'](),_0x7e6eb3['render'](),_0x5b1e4b({'emitter':_0x3538bc,'activator':()=>_0x7e6eb3['isVisible'],'contextElements':[_0x7e6eb3['element'],_0x3538bc['inlineListView']['element']],'callback':()=>this['hideDropdown']()}),_0x4832be['config']['get']('presenceList.container')['appendChild'](_0x3538bc['element']),this['_bodyCollection']=new _0x3e84a3(this['context']['locale']),this['_bodyCollection']['attachToDom'](),this['_bodyCollection']['add'](this['balloonPanelView']),_0x3538bc;}['_handleUserAdd'](_0x22a694){if(!this['context']['config']['get']('presenceList.displayMe')&&_0x22a694['isMe'])return;const _0x1b1ba1=this['context']['config']['get']('presenceList.collapseAt')-0x1;this['usersCount']++,this['currentDisplayedUsers']['length']==_0x1b1ba1&&this['currentDisplayedUsers']['length']>0x1&&this['currentDisplayedUsers']['remove'](0x1);const _0xc9060e=_0x22a694['isMe']?0x0:this['currentDisplayedUsers']['length'];this['currentDisplayedUsers']['add'](_0x22a694,_0xc9060e);}['_handleUserRemove'](_0x9798cb){if(this['usersCount']--,this['currentDisplayedUsers']['get'](_0x9798cb['id'])&&(this['currentDisplayedUsers']['remove'](_0x9798cb['id']),this['currentDisplayedUsers']['length']<this['usersCount'])){for(const _0x25630f of Array['from'](this['_allConnectedUsers'])['reverse']())if(!this['currentDisplayedUsers']['get'](_0x25630f['id']))return void this['currentDisplayedUsers']['add'](_0x25630f,Math['min'](this['currentDisplayedUsers']['length'],0x1));}}['showDropdown'](){if(this['presenceDropdownView'])return;const _0x52eb93=this['context']['config']['get']('presenceList');this['presenceDropdownView']=new j(this['context']['locale'],!!_0x52eb93['onClick']),this['view']['inlineListView']['isExpanded']=!0x0;const {listWrapperView:_0x5e3cd3}=this['presenceDropdownView'];_0x5e3cd3['items']['bindTo'](this['_allConnectedUsers'])['using'](_0x24c20d=>{if(!_0x52eb93['displayMe']&&_0x24c20d['isMe'])return null;const _0x40abbf=new k(this['context']['locale'],_0x24c20d,!!_0x52eb93['onClick']);return _0x52eb93['onClick']&&this['listenTo'](_0x40abbf,'execute',()=>{_0x52eb93['onClick'](_0x24c20d,_0x40abbf['element']);}),_0x40abbf;}),this['balloonPanelView']['content']['add'](this['presenceDropdownView']),this['balloonPanelView']['pin']({'target':this['view']['inlineListView']['element']}),_0x5e3cd3['focus'](),_0x5e3cd3['checkIfScrollable']();const _0x1cfc80=(_0x35d22b,_0x318f63)=>{this['hideDropdown'](),this['view']['inlineListView']['focus'](),_0x318f63();};_0x5e3cd3['keystrokes']['set']('Esc',_0x1cfc80),_0x5e3cd3['keystrokes']['set']('Shift+Tab',_0x1cfc80),_0x5e3cd3['keystrokes']['set']('Tab',(_0x2451aa,_0x4cd3df)=>{!function(_0x391df7){const _0x30327c=['a','button','input','select','textarea','[tabindex]','[contenteditable]']['map'](_0x1ce6ae=>_0x1ce6ae+':not([disabled]):not([tabindex=\x22-1\x22])')['join'](','),_0x4d80a3=[...document['body']['querySelectorAll'](_0x30327c)]['filter'](_0x43c464=>_0x43c464===document['activeElement']||_0x43c464['offsetWidth']+_0x43c464['offsetHeight']>0x0)['sort']((_0xe4b9a6,_0x127adf)=>(_0xe4b9a6['tabIndex']||0x0)-(_0x127adf['tabIndex']||0x0)),_0x291bb7=_0x4d80a3['indexOf'](_0x391df7),_0x481e0e=_0x4d80a3[(_0x291bb7+0x1)%_0x4d80a3['length']];_0x481e0e&&_0x481e0e['focus']();}(this['view']['element']),this['hideDropdown'](),_0x4cd3df();}),_0x5e3cd3['focusTracker']['add'](this['view']['element']),_0x5e3cd3['focusTracker']['on']('change:isFocused',(_0x3df2be,_0x232a47,_0x22dc44)=>{_0x22dc44||this['hideDropdown']();});}['hideDropdown'](){this['presenceDropdownView']&&(this['view']['inlineListView']['isExpanded']=!0x1,this['balloonPanelView']['unpin'](),this['balloonPanelView']['content']['remove'](this['presenceDropdownView']),this['presenceDropdownView']['destroy'](),this['presenceDropdownView']=void 0x0);}['destroy'](){super['destroy'](),this['view']&&this['view']['isRendered']&&this['view']['destroy'](),this['_bodyCollection']&&(this['_bodyCollection']['detachFromDom'](),this['_bodyCollection']['destroy'](),this['_bodyCollection']=null);}}class i extends _0x14461c{static get['requires'](){return[r,s];}static get['pluginName'](){return'PresenceList';}}export{a as CloudServicesCommentsAdapter,v as CloudServicesRevisionHistoryAdapter,g as CloudServicesTrackChangesAdapter,i as PresenceList,l as RealTimeCollaborationClient,m as RealTimeCollaborativeComments,n as RealTimeCollaborativeEditing,d as RealTimeCollaborativeRevisionHistory,p as RealTimeCollaborativeTrackChanges};
|
|
23
|
+
import{ContextPlugin as _0xb4909c,Plugin as _0x33017c,PendingActions as _0x133a20,Context as _0x12c542}from'@ckeditor/ckeditor5-core/dist/index.js';import{DomEmitterMixin as _0x183a7f,CKEditorError as _0x3f3cf1,Collection as _0x3d03ac,global as _0x3a845f,version as nt,uid as _0x57d351,KeystrokeHandler as _0x394e6f}from'@ckeditor/ckeditor5-utils/dist/index.js';import{Notification as _0x249e5d,View as _0x325e89,ListView as _0x376162,ListItemView as rt,LabelView as ot,BalloonPanelView as _0x4fafdb,clickOutsideHandler as _0x1663e4,BodyCollection as _0xb3c7c9}from'@ckeditor/ckeditor5-ui/dist/index.js';import{LiveRange as ht,History as _0x589fbd,NoOperation as _0x28c0d7,InsertOperation as _0x517d3e,MarkerOperation as _0x3f078c,RootAttributeOperation as _0x58949f,transformSets as _0x39c78b,OperationFactory as _0x3cbf6a}from'@ckeditor/ckeditor5-engine/dist/index.js';import{WebSocketGateway as dt,WEB_SOCKET_GATEWAY_STATES as _0x131e8c,CollaborativeEditingService as _0x2c40a7,User as lt,CommentsService as _0x2b8343,TrackChangesService as et,RevisionHistoryService as it,EditorService as tt}from'@ckeditor/ckeditor-cloud-services-collaboration/dist/index.js';import{Users as _0x5b2741,UserView as ct}from'ckeditor5-collaboration/dist/index.js';import{Compressor as _0x2db38a}from'@ckeditor/ckeditor5-operations-compressor/dist/index.js';import{isElement as _0x165d0f}from'lodash-es';class c extends _0xb4909c{static ['WebSocketGateway']=/* #__PURE__ -- @preserve */
|
|
24
|
+
((()=>dt)());static ['initialReconnectionInterval']=0x3e8;['connection'];['_reconnectionStack'];['_shouldPluginsReconnect'];['_domEmitter'];static get['requires'](){return['CloudServices',_0x249e5d];}static get['pluginName'](){return'WebSocketGateway';}constructor(_0x4fdd8e){super(_0x4fdd8e),this['set']('state',_0x131e8c['CONNECTED']),this['set']('_isBrowserOffline',!0x1),this['_reconnectionStack']=new Set(),this['_shouldPluginsReconnect']=!0x1,this['_domEmitter']=Object['create'](_0x183a7f);}['init'](){const _0x8d8d3=this['context'],_0x3a23ed=_0x8d8d3['plugins']['get']('CloudServices'),_0x378cfb=_0x8d8d3['plugins']['get'](_0x249e5d);if(!_0x3a23ed['token'])throw new _0x3f3cf1('websocketgateway-missing-token',this);if(!_0x3a23ed['webSocketUrl'])throw new _0x3f3cf1('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'](_0x3a23ed['token'],_0x3a23ed['webSocketUrl'],{'timeout':0x3e8*this['context']['config']['get']('cloudServices.connectionTimeout'),'requestTimeout':0x3e8*this['context']['config']['get']('cloudServices.requestTimeout')})['then'](_0x2a7305=>{if(this['connection']=_0x2a7305,this['bind']('state')['to'](_0x2a7305,'state',this,'_isBrowserOffline',(_0x1b183b,_0x3f3259)=>('connected'!==_0x1b183b&&(this['_shouldPluginsReconnect']=!0x0),_0x3f3259||_0x1b183b!==_0x131e8c['CONNECTED']?_0x131e8c['DISCONNECTED']:this['state']==_0x131e8c['DISCONNECTED']&&this['_shouldPluginsReconnect']?(this['_shouldPluginsReconnect']=!0x1,this['_reconnect'](),_0x131e8c['CONNECTING']):_0x131e8c['CONNECTED'])),this['connection']['on']('error',(_0x4c8334,_0x315d45)=>{if('limitExceeded'!==_0x315d45['code'])throw console['error'](_0x315d45),new _0x3f3cf1('cloudservices-init',null,{'originalError':_0x315d45});_0x378cfb['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'});}),!_0x2a7305['me'])return new Promise(_0x2631bf=>_0x2a7305['on']('change:me',_0x2631bf));})['catch'](_0x36cbde=>{throw console['error'](_0x36cbde),new _0x3f3cf1('cloudservices-init',null,{'originalError':_0x36cbde});});}['addToReconnectionStack'](_0x3aa6ef){if('function'!=typeof _0x3aa6ef['reconnect'])throw new _0x3f3cf1('websocketgateway-invalid-plugin-interface',this);if(this['isInReconnectionStack'](_0x3aa6ef))throw new _0x3f3cf1('websocketgateway-plugin-already-registered',this,{'name':_0x3aa6ef['constructor']['pluginName']});this['_reconnectionStack']['add'](_0x3aa6ef);}['removeFromReconnectionStack'](_0x3f44c7){this['_reconnectionStack']['delete'](_0x3f44c7);}['isInReconnectionStack'](_0xd68b37){return this['_reconnectionStack']['has'](_0xd68b37);}['_reconnect'](){return this['connection']['reconnect']()['then'](()=>Promise['all'](Array['from'](this['_reconnectionStack'],_0x505322=>_0x505322['reconnect']())))['then'](()=>this['state']=_0x131e8c['CONNECTED'])['catch'](_0x38589b=>{throw console['error'](_0x38589b),new _0x3f3cf1('cloudservices-reconnection-error',this['context']);});}['destroy'](){this['connection']&&this['connection']['disconnect'](),this['state']=_0x131e8c['DISCONNECTED'],this['_domEmitter']['stopListening'](),super['destroy']();}}class r extends _0xb4909c{['channelSessions'];['channelConnectedUsers'];['allConnectedUsers'];['_registeredSessions'];['_uniqueUsersCount'];['_users'];static get['pluginName'](){return'Sessions';}static get['requires'](){return[c,_0x5b2741];}constructor(_0x234db6){super(_0x234db6),this['channelSessions']=new Map(),this['channelConnectedUsers']=new Map(),this['allConnectedUsers']=new _0x3d03ac(),this['_registeredSessions']=new Map(),this['_uniqueUsersCount']=0x0,this['_users']=this['context']['plugins']['get'](_0x5b2741);}['init'](){const _0x387433=this['context']['plugins']['get'](c);this['listenTo'](_0x387433,'change:state',(_0x3b128b,_0x4ccb2d,_0x10010f)=>{if('connected'!==_0x10010f)this['channelSessions']['forEach'](_0x1f282d=>_0x1f282d['clear']()),this['channelConnectedUsers']['forEach'](_0x2924cf=>_0x2924cf['clear']()),this['allConnectedUsers']['clear']();else{for(const [_0x473337,_0x405a4d]of this['_registeredSessions'])for(const _0x4e2fff of _0x405a4d)this['_handleSessionAdd'](_0x473337,_0x4e2fff);}}),this['_createUser'](_0x387433['connection']['me'],!0x0);}['register'](_0x158583,_0x37b1c8){if(this['_registeredSessions']['has'](_0x158583))throw new _0x3f3cf1('sessions-register-already-registered',null,{'channelId':_0x158583});this['_registeredSessions']['set'](_0x158583,_0x37b1c8),this['channelSessions']['set'](_0x158583,new _0x3d03ac()),this['channelConnectedUsers']['set'](_0x158583,new _0x3d03ac()),this['listenTo'](_0x37b1c8,'add',(_0x23515a,_0x5d3e17)=>this['_handleSessionAdd'](_0x158583,_0x5d3e17)),this['listenTo'](_0x37b1c8,'remove',(_0x535268,_0x4c378e)=>this['_handleSessionRemove'](_0x158583,_0x4c378e));for(const _0x293509 of _0x37b1c8)this['_handleSessionAdd'](_0x158583,_0x293509);}['unregister'](_0x1d5260){if(!this['_registeredSessions']['has'](_0x1d5260))throw new _0x3f3cf1('sessions-unregister-not-exist',null,{'channelId':_0x1d5260});const _0x4c7c2b=this['_registeredSessions']['get'](_0x1d5260);this['stopListening'](_0x4c7c2b);for(const _0x39472f of _0x4c7c2b)'connected'===this['context']['plugins']['get'](c)['state']&&this['_handleSessionRemove'](_0x1d5260,_0x39472f);this['_registeredSessions']['delete'](_0x1d5260),this['channelSessions']['delete'](_0x1d5260),this['channelConnectedUsers']['delete'](_0x1d5260);}get['mySessionId'](){return this['context']['plugins']['get'](c)['connection']['sessionId'];}['getUserBySessionId'](_0x3830e1){for(const _0x5a2a05 of this['channelSessions']['values']())for(const _0x1b7f5f of _0x5a2a05)if(_0x1b7f5f['id']===_0x3830e1)return _0x1b7f5f['user'];}['getUserSessions'](_0xeceb6,_0x22220f){const _0x52b2a3=_0x22220f?[this['channelSessions']['get'](_0x22220f)]:this['channelSessions']['values'](),_0xad4361=new Set();for(const _0x6f00ac of _0x52b2a3)for(const _0x41e36c of _0x6f00ac)_0x41e36c['user']['id']===_0xeceb6['id']&&_0xad4361['add'](_0x41e36c['id']);return _0xad4361;}['getUserRole'](_0x21ec11){for(const _0x2f5445 of this['channelSessions']['values']())for(const _0x3b789 of _0x2f5445)if(_0x3b789['user']===_0x21ec11)return _0x3b789['role'];}['_handleSessionAdd'](_0x3c4aac,_0x5c7cff){if('connected'!==this['context']['plugins']['get'](c)['state'])return;const _0x1319f1=_0x5c7cff['user'],_0x381da2=this['_users']['getUser'](_0x1319f1['id'])||this['_createUser'](_0x1319f1),_0x1a7ac3=Object['assign']({},_0x5c7cff,{'user':_0x381da2});this['channelSessions']['get'](_0x3c4aac)['add'](_0x1a7ac3);const _0x4fbe8a=this['channelConnectedUsers']['get'](_0x3c4aac);_0x4fbe8a['has'](_0x381da2['id'])||_0x4fbe8a['add'](_0x381da2),this['allConnectedUsers']['has'](_0x381da2['id'])||this['allConnectedUsers']['add'](_0x381da2,_0x381da2['isMe']?0x0:void 0x0),this['fire']('sessionAdd:'+_0x3c4aac,{'channelId':_0x3c4aac,'session':_0x1a7ac3});}['_handleSessionRemove'](_0x45ec57,_0x4ae291){if('connected'!==this['context']['plugins']['get'](c)['state'])return;const _0x260430=this['channelConnectedUsers']['get'](_0x45ec57),_0x386b62=_0x4ae291['user'];_0x386b62['id']&&(this['channelSessions']['get'](_0x45ec57)['remove'](_0x4ae291['id']),_0x260430['has'](_0x386b62['id'])&&!this['getUserSessions'](_0x386b62,_0x45ec57)['size']&&_0x260430['remove'](_0x386b62['id']),this['allConnectedUsers']['get'](_0x386b62['id'])&&!this['getUserSessions'](_0x386b62)['size']&&this['allConnectedUsers']['remove'](_0x386b62['id']));}['_createUser'](_0x228cef,_0x542f36){const _0x4ac499=this['_users']['addUser'](_0x228cef);return _0x542f36&&this['_users']['defineMe'](_0x228cef['id']),_0x4ac499['orderNumber']=this['_uniqueUsersCount']++,_0x4ac499;}}class H extends _0x33017c{['_domEmitter']=new(_0x183a7f())();static get['requires'](){return[r];}static get['pluginName'](){return'UserMarkers';}['init'](){const _0x126c20=this['editor'],_0x2a1e69=_0x126c20['plugins']['get'](r);_0x126c20['conversion']['for']('editingDowncast')['markerToElement']({'model':'user:position','view':(_0x210670,{writer:_0x426675})=>function(_0x2f2a28,_0x3b90d6,_0x241d6e,_0x30a2db){const _0x31850c=_0x2f2a28['markerName']['split'](':')[0x2],_0x39ae7c=_0x241d6e['getUserBySessionId'](_0x31850c);if(!_0x39ae7c||_0x31850c===_0x241d6e['mySessionId'])return;if(!_0x30a2db['model']['schema']['checkChild'](_0x2f2a28['markerRange']['start'],'$text'))return;const _0x5b5185={'class':'ck-user__marker\x20'+_0x39ae7c['color']['getMarkerClass'](),'data-name':_0x39ae7c['name'],'data-session-id':_0x31850c},_0x2b41d2=_0x30a2db['model']['markers']['get'](_0x2f2a28['markerName']),_0x1323fb=_0x2b41d2['getStart'](),_0x473ddd=_0x1323fb['nodeAfter'],_0x2b573a=_0x30a2db['model']['schema'];if(_0x473ddd&&_0x2b573a['isObject'](_0x473ddd)&&_0x2b573a['isInline'](_0x473ddd)&&!_0x30a2db['model']['markers']['get']('user:range:'+_0x31850c)['getRange']()['isCollapsed'])return;const _0x30728c=_0x1323fb['parent'];return _0x30a2db['model']['schema']['isLimit'](_0x30728c)&&!_0x30a2db['model']['hasContent'](_0x30728c)&&(_0x5b5185['contenteditable']=!0x1),function(_0x3a655e,_0x2e639d,_0x4c18a2){const _0x14907c=_0x3a655e['createUIElement']('span',_0x2e639d);return _0x3a655e['setCustomProperty']('userPositionMarker',!0x0,_0x14907c),_0x14907c['render']=function(_0x1fc103){const _0x3f4b58=this['toDomElement'](_0x1fc103);return _0x3f4b58['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>'+_0x4c18a2['name']+'</span>',_0x3f4b58['addEventListener']('mouseenter',()=>{_0x3f4b58['classList']['add']('ck-user__marker_hovered');}),_0x3f4b58['addEventListener']('mouseleave',()=>{_0x3f4b58['classList']['remove']('ck-user__marker_hovered');}),_0x3f4b58;},_0x14907c['isSimilar']=function(_0x809010){return!(!this['getCustomProperty']('userPositionMarker')||!_0x809010['getCustomProperty']('userPositionMarker')||this['getAttribute']('data-session-id')!=_0x809010['getAttribute']('data-session-id'));},_0x14907c;}(_0x3b90d6,_0x5b5185,_0x39ae7c);}(_0x210670,_0x426675,_0x2a1e69,_0x126c20)}),_0x126c20['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'user:range','view':_0x566b5f=>function(_0x2fd8e8,_0x35190c){const _0x1ab979=_0x2fd8e8['markerName']['split'](':')[0x2];if(_0x1ab979===_0x35190c['mySessionId'])return null;const _0x189541=_0x35190c['getUserBySessionId'](_0x1ab979);if(!_0x189541)return{'id':_0x1ab979,'classes':[]};return{'id':_0x1ab979,'classes':['ck-user__selection',_0x189541['color']['getSelectionClass']()],'attributes':{'data-session-id':_0x1ab979},'priority':0x7d0+_0x189541['orderNumber']};}(_0x566b5f,_0x2a1e69)}),function(_0x4b742c){const _0x3c578e=_0x4b742c['model'],_0x1bc107=new Map(),_0x9aa923=_0x4b742c['plugins']['get'](r);_0x3c578e['markers']['on']('update:user:range',(_0x2da7bd,_0x5cc694,_0x179462,_0x50d7d6)=>{if(!_0x50d7d6&&_0x1bc107['get'](_0x5cc694['name']))return _0x1bc107['get'](_0x5cc694['name'])['detach'](),void _0x1bc107['delete'](_0x5cc694['name']);const _0x986a43=_0x5cc694['name']['split'](':')[0x2];if(_0x986a43===_0x9aa923['mySessionId'])return;const _0x407604='user:position:'+_0x986a43;_0x3c578e['markers']['has'](_0x407604)&&_0x4b742c['editing']['reconvertMarker'](_0x407604),_0x5cc694['on']('change:range',(_0x419318,_0x587f43,_0x2b33b6)=>{if('$graveyard'!=_0x587f43['root']['rootName']&&'$graveyard'==_0x5cc694['getRange']()['root']['rootName']&&!_0x1bc107['has'](_0x5cc694['name'])){const _0x677360=_0x3c578e['schema']['getNearestSelectionRange'](_0x2b33b6['deletionPosition']);if(_0x677360){const _0x3aa02a=ht['fromRange'](_0x677360);_0x1bc107['set'](_0x5cc694['name'],_0x3aa02a),_0x3aa02a['on']('change:range',(_0x3f0e40,_0x5a1bac,_0x5b36f6)=>{if('$graveyard'==_0x3aa02a['root']['rootName']){const _0x5a5b3e=_0x3c578e['schema']['getNearestSelectionRange'](_0x5b36f6['deletionPosition']);_0x5a5b3e?(_0x3aa02a['start']=_0x5a5b3e['start'],_0x3aa02a['end']=_0x5a5b3e['end']):(_0x1bc107['delete'](_0x5cc694['name']),_0x3aa02a['detach']());}});}}});}),_0x3c578e['document']['on']('change',()=>{_0x1bc107['size']>0x0&&_0x3c578e['enqueueChange']({'isUndoable':!0x1},_0x48f639=>{for(const [_0x9ed638,_0x5cf6d5]of _0x1bc107)'$graveyard'==_0x3c578e['markers']['get'](_0x9ed638)['getRange']()['root']['rootName']&&(re(_0x9ed638['split'](':')[0x2],_0x5cf6d5['toRange'](),_0x3c578e,_0x48f639),_0x5cf6d5['detach']());_0x1bc107['clear']();});});}(_0x126c20),this['_domEmitter']['listenTo'](_0x3a845f['document'],'keydown',(_0x5cc4cd,{key:_0x747681})=>{'Escape'===_0x747681&&function(_0x85f55b){_0x85f55b['editing']['view']['change'](_0x48a306=>{for(const _0x554c38 of _0x85f55b['model']['markers']){if(!_0x554c38['name']['startsWith']('user:position'))continue;const _0x1018ea=_0x85f55b['editing']['mapper']['markerNameToElements'](_0x554c38['name']);if(_0x1018ea){for(const _0x12c8b4 of _0x1018ea)_0x48a306['removeClass']('ck-user__marker_hovered',_0x12c8b4);}}});}(_0x126c20);},{'useCapture':!0x0});}['afterInit'](){const _0x5d7547=this['editor'],_0x40d090=_0x5d7547['commands']['get']('undo');_0x40d090&&_0x5d7547['model']['on']('applyOperation',(_0x3f1a05,_0x436027)=>{const _0x1ce22c=_0x436027[0x0];if('marker'!=_0x1ce22c['type']||!_0x1ce22c['name']['startsWith']('user:'))return;const _0x1c4459=_0x1ce22c['batch'];_0x40d090['_createdBatches']['has'](_0x1c4459)&&(_0x1ce22c['newRange']=_0x1ce22c['oldRange']?_0x5d7547['model']['createRange'](_0x1ce22c['oldRange']['start'],_0x1ce22c['oldRange']['end']):null);},{'priority':'highest'});}['destroy'](){return this['_domEmitter']['stopListening'](),super['destroy']();}['createUserMarkerOperations'](){const _0x55a2be=this['editor'],_0x8a472f=_0x55a2be['model']['document'],_0x30dc1e=_0x55a2be['plugins']['get'](r);_0x55a2be['model']['enqueueChange']({'isUndoable':!0x1},_0x33db17=>{const _0x99905e='user:range:'+_0x30dc1e['mySessionId'],_0x4d8db4='user:position:'+_0x30dc1e['mySessionId'],_0x28ef3e=_0x55a2be['model']['markers']['has'](_0x99905e);_0x55a2be['editing']['view']['hasDomSelection']?re(_0x30dc1e['mySessionId'],_0x8a472f['selection']['getFirstRange'](),_0x55a2be['model'],_0x33db17):_0x28ef3e&&(_0x33db17['removeMarker'](_0x99905e),_0x33db17['removeMarker'](_0x4d8db4));});}}function re(_0x9aef8a,_0x238f78,_0x40b46,_0x4f8e36){const _0x212a22='user:range:'+_0x9aef8a,_0x8e6522='user:position:'+_0x9aef8a,_0x383ab0=_0x238f78['getContainedElement']();let _0x25515f=_0x238f78['start'];_0x383ab0&&_0x383ab0['is']('element','tableCell')&&(_0x25515f=function(_0x260656,_0x1dd646){for(const _0xa6ea4c of _0x260656['getPositions']())if(_0x1dd646['schema']['checkChild'](_0xa6ea4c,'$text'))return _0xa6ea4c;}(_0x238f78,_0x40b46),_0x238f78=_0x4f8e36['createRange'](_0x25515f));const _0x3c6f88=_0x4f8e36['createRange'](_0x25515f);_0x40b46['markers']['has'](_0x212a22)?(_0x4f8e36['updateMarker'](_0x212a22,{'range':_0x238f78}),_0x4f8e36['updateMarker'](_0x8e6522,{'range':_0x3c6f88})):(_0x4f8e36['addMarker'](_0x212a22,{'range':_0x238f78,'usingOperation':!0x0}),_0x4f8e36['addMarker'](_0x8e6522,{'range':_0x3c6f88,'usingOperation':!0x0}));}function q(_0x52ea93,_0x18ef64,_0x12d6de){const t=_0x52ea93['t'];switch(_0x18ef64){case'PENDING_ACTION_SENDING_DATA':return t({'string':'Sending\x20data\x20to\x20the\x20server.','id':'PENDING_ACTION_SENDING_DATA'});case'The\x20local\x20document\x20and\x20server\x20document\x20differ\x20and\x20merging\x20them\x20can\x20cause\x20unexpected\x20behavior.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.':return t('The\x20local\x20document\x20and\x20server\x20document\x20differ\x20and\x20merging\x20them\x20can\x20cause\x20unexpected\x20behavior.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.');case'The\x20document\x20cannot\x20be\x20connected\x20back\x20to\x20the\x20server.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.':return t('The\x20document\x20cannot\x20be\x20connected\x20back\x20to\x20the\x20server.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.');case'The\x20document\x20details\x20could\x20not\x20be\x20taken\x20during\x20the\x20reconnection.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.':return t('The\x20document\x20details\x20could\x20not\x20be\x20taken\x20during\x20the\x20reconnection.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.');case'The\x20last\x20saved\x20version\x20of\x20the\x20document\x20does\x20not\x20match\x20the\x20local\x20version.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.':return t('The\x20last\x20saved\x20version\x20of\x20the\x20document\x20does\x20not\x20match\x20the\x20local\x20version.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.');case'Synchronization\x20issue':return t('Synchronization\x20issue');case'Connected\x20users\x20list\x20dropdown\x20menu':return t('Connected\x20users\x20list\x20dropdown\x20menu');case'Collapsed\x20connected\x20users\x20list\x20(press\x20ENTER\x20to\x20open\x20it)':return t('Collapsed\x20connected\x20users\x20list\x20(press\x20ENTER\x20to\x20open\x20it)');case'Connected\x20users\x20list':return t('Connected\x20users\x20list');case'PENDING_ACTION_REVISION_HISTORY':return t({'string':'Unsaved\x20change\x20in\x20revision\x20history.','id':'PENDING_ACTION_REVISION_HISTORY'});case'CONNECTED_USERS':return t({'string':'1\x20connected\x20user\x20(me)','plural':'%0\x20connected\x20users','id':'CONNECTED_USERS'},_0x12d6de);default:return'';}}let K=0x1;class l extends _0x33017c{static ['CollaborativeEditingService']=/* #__PURE__ -- @preserve */
|
|
25
|
+
((()=>_0x2c40a7)());['_offset'];['sessionId'];['serverHistory'];['_channelId'];['_service'];['_document'];['_compressor'];['_bufferedOperations'];['_knownOperations'];['_knownRootNames'];['_pendingAction'];['_hasSelectionChanged'];['_sendBufferedOperationsDelayId'];['_baseBufferDelay'];['_currentBufferDelay'];['_lastSyncedOperationId'];['_disconnectionOperations'];['_operationIdentifier'];static get['requires'](){return[c,r,H,_0x133a20,_0x5b2741,_0x249e5d];}static get['pluginName'](){return'RealTimeCollaborationClient';}get['cloudDocumentVersion'](){return this['_lastServerVersion']+this['_offset'];}get['_lastServerVersion'](){return this['serverHistory']['version']-this['_offset'];}get['lastSyncVersion'](){const _0x11aea7=this['serverHistory']['getOperations']();for(let _0x2e486f=_0x11aea7['length']-0x1;_0x2e486f>=0x0;_0x2e486f--){const _0x56ec5f=_0x11aea7[_0x2e486f];if(!this['_disconnectionOperations']['has'](_0x56ec5f))return _0x56ec5f['baseVersion']+0x1-this['_offset'];}return 0x0;}constructor(_0x3b3b98){if(super(_0x3b3b98),this['_offset']=0x0,this['sessionId']=null,this['serverHistory']=new _0x589fbd(),this['editor']['config']['define']('collaboration',{}),this['_channelId']=this['editor']['config']['get']('collaboration.channelId'),!this['_channelId'])throw new _0x3f3cf1('collaboration-missing-channelid',this);const _0x46c2af=_0x3b3b98['config']['get']('cloudServices.bundleVersion')||nt;this['_service']=new l['CollaborativeEditingService'](_0x46c2af,this['_channelId']),this['_document']=this['editor']['model']['document'],this['_compressor']=new _0x2db38a(),this['_bufferedOperations']=[],this['_knownOperations']=new WeakSet(),this['_knownRootNames']=new Set(),this['set']('_isPendingUpdate',!0x1),this['set']('_hasSynchronizationProblem',!0x1),this['_pendingAction']=null,this['_hasSelectionChanged']=!0x1,this['_sendBufferedOperationsDelayId']=null,this['_baseBufferDelay']=0x12c,this['_currentBufferDelay']=this['_baseBufferDelay'],this['_lastSyncedOperationId']=null,this['_disconnectionOperations']=new WeakSet(),this['_operationIdentifier']=new X(this['_disconnectionOperations']);}['init'](){const _0x27fee7=this['editor'],_0x29068e=_0x27fee7['plugins']['get'](_0x5b2741),_0x5ce12f=_0x27fee7['plugins']['get'](c);this['listenTo'](_0x29068e,'getOperationAuthor',(_0x54408f,_0x471a13)=>{const _0x427ff6=_0x471a13[0x0];_0x427ff6['_authorId']&&(_0x54408f['return']=_0x29068e['getUser'](_0x427ff6['_authorId']),_0x54408f['stop']()),null===_0x427ff6['_authorId']&&(_0x54408f['return']=null,_0x54408f['stop']());},{'priority':'high'}),this['listenTo'](_0x27fee7['model']['document']['selection'],'change:range',(_0x19db8a,_0x2518a1)=>{_0x2518a1['directChange']&&this['_refreshUserSelectionMarkers']();}),this['listenTo'](_0x27fee7['editing']['view'],'change:hasDomSelection',()=>{this['_refreshUserSelectionMarkers']();}),this['_initThrowingOnDataSet'](),_0x27fee7['model']['on']('applyOperation',(_0x10c3dd,_0x40d71d)=>{const _0x6fb5d=_0x40d71d[0x0];_0x6fb5d['isDocumentOperation']&&(this['_saveOperationInBuffer'](_0x6fb5d),this['_shouldSendUpdate']()&&this['_sendBufferedOperationsDelayed']());}),this['_setUpDataInit'](),this['bind']('_isEditingAllowed')['to'](_0x5ce12f,'state',this,'_hasSynchronizationProblem',(_0x24fa54,_0x1fef4d)=>'connected'===_0x24fa54&&!_0x1fef4d),this['on']('change:_isEditingAllowed',()=>{this['_isEditingAllowed']?_0x27fee7['disableReadOnlyMode']('rtc-offline'):_0x27fee7['enableReadOnlyMode']('rtc-offline');}),this['_isEditingAllowed']?_0x27fee7['disableReadOnlyMode']('rtc-offline'):_0x27fee7['enableReadOnlyMode']('rtc-offline'),this['set']('_isConnected',!0x1);}async['reconnect'](){const _0x16edc4=this['editor']['plugins']['get'](r),_0x341eea=this['editor']['plugins']['get'](c);try{this['_isPendingUpdate']=!0x0,_0x16edc4['unregister'](this['_channelId']);const _0x5e926f=await this['_service']['reconnect'](_0x341eea['connection'],this['lastSyncVersion']);await this['_handleReconnectionResponse'](_0x5e926f)&&(this['_isPendingUpdate']=!0x1,this['_clearPendingAction']());const _0x154285=await this['_service']['getConnectedSessions']();_0x16edc4['register'](this['_channelId'],_0x154285),this['_handleSendingSelectionMarkers'](),this['_isConnected']=!0x0;}catch(_0x54bd3c){if(function(_0x1ae868){return'404'===_0x1ae868['code'];}(_0x54bd3c)&&this['sessionId'])await this['_connectAfterSessionHasBeenFlushed']();else{if(function(_0x20a097){return'409'===_0x20a097['code'];}(_0x54bd3c)){const _0x5aebb9=q(this['editor']['locale'],'The\x20document\x20cannot\x20be\x20connected\x20back\x20to\x20the\x20server.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.');this['_handleReconnectionError'](_0x5aebb9);}else{if(!(_0x54bd3c instanceof J))throw _0x54bd3c;this['_handleReconnectionError']();}}}}['destroy'](){const _0x160511=this['editor']['plugins']['get'](c),_0x57ab78=this['editor']['plugins']['get'](r);this['editor']['enableReadOnlyMode']('rtc-destroyed'),_0x57ab78['channelSessions']['has'](this['_channelId'])&&_0x57ab78['unregister'](this['_channelId']),_0x160511['removeFromReconnectionStack'](this),this['_disconnectService'](),super['destroy']();}async['_handleReconnectionResponse'](_0x145bd6){if(this['sessionId']!==_0x145bd6['sessionId']&&this['_lastSyncedOperationId']!==_0x145bd6['lastOperationId'])throw new J();return this['sessionId']=_0x145bd6['sessionId'],this['_handleServerResponse']([],{..._0x145bd6,'wereChangesApplied':!0x1,'data':_0x145bd6['data']},'reconnect');}async['_connectService'](_0x40b892,_0x129e85=!0x1){const {connection:_0x44ec53}=this['editor']['plugins']['get'](c);l['CollaborativeEditingService']['getConnectedSessions'](_0x44ec53,this['_channelId'])['then'](_0x108526=>this['_initSessionsHandling'](_0x108526))['catch'](_0x31fee2=>{this['_crash']('realtimecollaborationclient-init-session-connection-error',_0x31fee2);}),this['listenTo'](this['_service'],'operationsReceived',this['_handleReceivedOperations']['bind'](this)),this['listenTo'](this['_service'],'error',(_0x6bbb79,_0x2ff8b1)=>{this['_crash']('realtimecollaborationclient-initservice-internal-error',_0x2ff8b1);}),this['listenTo'](this['_service'],'disconnected',()=>{this['_isConnected']=!0x1;});const _0x48ed3f=this['_operationIdentifier']['getIdOfTheLastOperation'](_0x40b892);this['_isPendingUpdate']=!0x0;const _0x1ed66d=await this['_service']['connect'](_0x44ec53,this['_compressOperations'](_0x40b892),_0x48ed3f);if(this['sessionId']=_0x1ed66d['sessionId'],_0x129e85){if(!_0x1ed66d['wereChangesApplied'])return void this['_handleReconnectionError']();this['_isPendingUpdate']=!0x1,this['_clearPendingAction'](),this['serverHistory']['reset'](),this['_offset']=_0x1ed66d['offset'],this['serverHistory']['version']=this['_offset'],await this['_handleServerResponse'](_0x40b892,_0x1ed66d,'reconnection:\x20flushed\x20session');}else await this['_handleInitialConnectionData'](_0x1ed66d,_0x40b892);this['_handleSendingSelectionMarkers'](),this['_isConnected']=!0x0;}['_handleSendingSelectionMarkers'](){const _0x3206b7=this['editor']['plugins']['get'](r),_0x1e6cbf=this['editor']['plugins']['get'](H),_0x32e754=_0x3206b7['channelSessions']['get'](this['_channelId']);_0x32e754&&_0x32e754['length']>0x1?_0x1e6cbf['createUserMarkerOperations']():this['listenTo'](_0x3206b7,'sessionAdd:'+this['_channelId'],()=>{0x2===_0x3206b7['channelSessions']['get'](this['_channelId'])['length']&&_0x1e6cbf['createUserMarkerOperations']();});}async['_handleReceivedOperations'](_0x136671,_0x42ec2e,_0x49752a,_0x380304){if(!this['_isPendingUpdate']&&this['_document']['version']==_0x42ec2e){const _0x221bdd=this['_decompressOperations'](_0x49752a,_0x380304);await this['_fetchMissingUsers'](_0x221bdd),this['_handleExternalOperations'](_0x221bdd,_0x42ec2e,_0x49752a['lastOperationId'])||this['_crash']('realtimecollaborationclient-initservice-incorrect-server-operation');}}async['_connectAfterSessionHasBeenFlushed'](){this['_disconnectService']();const {locale:_0x2fbfcb}=this['editor'];let _0x4f4364;try{_0x4f4364=await this['_service']['getDocumentDetails']();}catch(_0x745ff6){const _0x1adb3d=q(_0x2fbfcb,'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'](_0x1adb3d);}const _0x212ccb=_0x4f4364['currentDocumentSession']||_0x4f4364['lastDocumentSession'];if(this['_lastSyncedOperationId']===_0x212ccb['lastOperationId'])await this['_connectService'](this['editor']['model']['document']['history']['getOperations'](),!0x0);else{const _0x4aadf1=q(_0x2fbfcb,'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'](_0x4aadf1);}}['_disconnectService'](){this['_service']['disconnect'](),this['_bufferedOperations']=[],clearTimeout(this['_sendBufferedOperationsDelayId']),this['stopListening'](this['_service']);}['_initSessionsHandling'](_0x522954){const _0x23abcb=this['editor']['plugins']['get'](r);this['listenTo'](_0x23abcb,'sessionAdd:'+this['_channelId'],(_0x10afdf,{session:_0x429f51})=>{if(_0x429f51['id']===_0x23abcb['mySessionId']){_0x10afdf['off']();const _0x2527b1=this['editor']['plugins']['has']('CommentsOnly')&&this['editor']['plugins']['get']('CommentsOnly');let _0x54918f=_0x429f51['permissions'];_0x2527b1&&_0x2527b1['isEnabled']&&(_0x54918f=_0x54918f['filter'](_0x54fab4=>'document:write'!==_0x54fab4)),this['editor']['plugins']['get']('Permissions')['setPermissions'](_0x54918f,this['_channelId']);}}),_0x23abcb['register'](this['_channelId'],_0x522954);}['_initThrowingOnDataSet'](){const _0xe7ec5a=this['editor']['data']['set'];this['editor']['data']['set']=(..._0x15bcaf)=>{if(!_0x15bcaf[_0x15bcaf['length']-0x1]['suppressErrorInCollaboration'])throw new _0x3f3cf1('realtimecollaborationclient-editor-setdata-and-editor-data-set-are-forbidden-in-real-time-collaboration',this);_0xe7ec5a['apply'](this['editor']['data'],_0x15bcaf);};}['_setUpDataInit'](){this['editor']['data']['on']('init',(_0x326403,[_0x56111b])=>{if(this['_document']['version'])throw new _0x3f3cf1('realtimecollaborationclient-init-document-already-initialized',this);_0x326403['stop'](),this['_setPendingAction']();const _0x5f2812=this['editor']['config']['get']('rootsAttributes'),_0x438355=this['_getOperationsFromInitData'](_0x56111b,_0x5f2812);0x0==_0x438355['length']&&_0x438355['push'](new _0x28c0d7(0x0)),_0x326403['return']=this['_connectService'](_0x438355)['then'](()=>{this['editor']['plugins']['get'](c)['addToReconnectionStack'](this),this['editor']['data']['fire']('ready');})['catch'](_0x1472e4=>this['_crash']('realtimecollaborationclient-init-connection-failed',_0x1472e4))['finally'](()=>this['_clearPendingAction']());},{'priority':'high'}),this['editor']['on']('loadRoot',async(_0x3be337,[_0x401a4d,_0x14c7b2])=>{_0x3be337['stop']();const _0x33ff9a=this['editor']['model']['document']['getRoot'](_0x401a4d);if(!this['_knownRootNames']['has'](_0x401a4d)){const _0x425e0f=_0x14c7b2&&_0x14c7b2['data']?_0x14c7b2['data']:'',_0x1c218a=_0x14c7b2&&_0x14c7b2['attributes']?_0x14c7b2['attributes']:{};await this['_loadRoot'](_0x401a4d,_0x425e0f,_0x1c218a);}this['editor']['model']['enqueueChange']({'isUndoable':!0x1},()=>{_0x33ff9a['_isLoaded']=!0x0,this['editor']['model']['document']['differ']['_bufferRootLoad'](_0x33ff9a);});},{'priority':'high'});}async['_fetchMissingUsers'](_0x2d5a92){const _0x17db37=this['editor']['plugins']['get'](_0x5b2741),{connection:_0x5c4e63}=this['editor']['plugins']['get'](c),_0xc1bf3=new Set();for(const _0x202a47 of _0x2d5a92){const _0x2aefa2=_0x202a47['_authorId'];_0x2aefa2&&!_0x17db37['getUser'](_0x2aefa2)&&_0xc1bf3['add'](_0x2aefa2);}if(0x0===_0xc1bf3['size'])return;const _0x2e036e=await lt['getMany'](_0x5c4e63,Array['from'](_0xc1bf3));for(const _0x15ef90 of _0x2e036e)_0x17db37['getUser'](_0x15ef90['id'])||_0x17db37['addUser'](_0x15ef90);}['_getOperationsFromInitData'](_0x694843,_0x541509={}){const _0x61bc6c=this['editor']['model'],_0x243811=[];let _0x58f23f=0x0;const _0x450b06='string'==typeof _0x694843?{'main':_0x694843}:_0x694843;for(const _0x2096fb of Object['keys'](_0x450b06)){if(!this['_document']['roots']['has'](_0x2096fb))throw new _0x3f3cf1('realtimecollaborationclient-init-non-existent-root',this);const _0x71b9d=this['editor']['data']['parse'](_0x450b06[_0x2096fb]),_0x3d1127=this['_document']['getRoot'](_0x2096fb),_0x4c6ca6=new _0x517d3e(_0x61bc6c['createPositionAt'](_0x3d1127,0x0),_0x71b9d,_0x58f23f++);_0x243811['push'](_0x4c6ca6);for(const [_0x1489cf,_0x5612d1]of _0x71b9d['markers']){const _0x197d47=_0x61bc6c['createRange'](_0x61bc6c['createPositionFromPath'](_0x3d1127,_0x5612d1['start']['path']['slice']()),_0x61bc6c['createPositionFromPath'](_0x3d1127,_0x5612d1['end']['path']['slice']())),_0x2f76bf=new _0x3f078c(_0x1489cf,null,_0x197d47,_0x61bc6c['markers'],!0x0,_0x58f23f++);_0x243811['push'](_0x2f76bf);}}if(_0x541509)for(const [_0x333353,_0x115989]of Object['entries'](_0x541509)){const _0x3022f6=_0x61bc6c['document']['getRoot'](_0x333353);if(!_0x3022f6)throw new _0x3f3cf1('multi-root-editor-root-attributes-no-root',null);for(const [_0x1c9fa5,_0x2e12ff]of Object['entries'](_0x115989))if(null!==_0x2e12ff){const _0x572c8a=new _0x58949f(_0x3022f6,_0x1c9fa5,null,_0x2e12ff,_0x58f23f++);_0x243811['push'](_0x572c8a);}}return _0x243811;}async['_loadRoot'](_0x135e8a,_0x25bec1,_0x150f3c){this['_getOperationsFromInitData']({[_0x135e8a]:_0x25bec1},{[_0x135e8a]:_0x150f3c})['forEach']((_0x24f621,_0x12bcfc)=>{_0x24f621['baseVersion']=this['_document']['version']+_0x12bcfc,_0x24f621['_isInit']=!0x0,this['_saveOperationInBuffer'](_0x24f621);}),this['_sendBufferedOperationsDelayed'](),await this['_waitUntilSynced']();}async['_handleInitialConnectionData'](_0x372c12,_0x2308e7){let _0x107be6;this['_offset']=_0x372c12['offset'];const _0x22ae13=_0x372c12['wereChangesApplied']&&!_0x372c12['initData'],_0x2b4642=_0x22ae13?0x0:_0x372c12['data']['baseVersion'];if(_0x2308e7['forEach'](_0x301074=>{_0x301074['_isInit']=!0x0,_0x301074['createdAt']=_0x372c12['sessionCreatedAt'],_0x301074['_authorId']=null;}),_0x22ae13)_0x107be6=_0x2308e7,this['_applyOperationsSet'](_0x107be6,_0x22ae13);else{if(_0x372c12['initData']){const _0x3da3c4=this['_getOperationsFromInitData'](_0x372c12['initData']);this['_document']['history']['version']=-_0x3da3c4['length'],_0x3da3c4['forEach'](_0x103c1e=>{_0x103c1e['baseVersion']-=_0x3da3c4['length'],_0x103c1e['createdAt']=_0x372c12['sessionCreatedAt'],_0x103c1e['_isInit']=!0x0,_0x103c1e['_authorId']=null;}),this['_applyOperationsSet'](_0x3da3c4,!0x0),this['serverHistory']['version']=-_0x3da3c4['length']+this['_offset'],this['_updateServerHistory'](_0x3da3c4);}this['_document']['history']['version']=_0x2b4642,_0x107be6=this['_decompressOperations'](_0x372c12['data'],_0x372c12['metadata']),await this['_fetchMissingUsers'](_0x107be6),this['_applyOperationsSet'](_0x107be6,_0x22ae13);}_0x372c12['lastOperationId']&&(this['_operationIdentifier']['setIdForTheLastOperation'](_0x107be6,_0x372c12['lastOperationId']),this['_lastSyncedOperationId']=_0x372c12['lastOperationId']),this['serverHistory']['version']=_0x2b4642+this['_offset'],this['_updateServerHistory'](_0x107be6),_0x2308e7['filter'](_0x1cee92=>{const _0xb0b7a3=this['_getAffectedRoot'](_0x1cee92);return _0xb0b7a3&&!this['_knownRootNames']['has'](_0xb0b7a3);})['forEach']((_0x52c4a,_0x4e4892)=>{_0x52c4a['baseVersion']=this['_document']['version']+_0x4e4892,this['_saveOperationInBuffer'](_0x52c4a);}),this['_shouldSendUpdate']()?(this['_currentBufferDelay']=0x0,this['_sendBufferedOperationsDelayed'](!0x0),await this['_waitUntilSynced']()):(this['_isPendingUpdate']=!0x1,this['_clearPendingAction']());}['_crash'](_0x33a834,_0x19f3e1){throw this['_isPendingUpdate']=!0x0,_0x19f3e1&&console['error'](_0x19f3e1),new _0x3f3cf1(_0x33a834,this['editor']);}['_saveOperationInBuffer'](_0x3984c2){this['_knownOperations']['has'](_0x3984c2)||(this['_knownOperations']['add'](_0x3984c2),this['_bufferedOperations']['push'](_0x3984c2),this['_pendingAction']||'marker'==_0x3984c2['type']&&!_0x3984c2['affectsData']||this['_setPendingAction']());}['_sendBufferedOperationsDelayed'](_0xf82ead=!0x1){!_0xf82ead&&this['_isPendingUpdate']||(this['_isPendingUpdate']=!0x0,clearTimeout(this['_sendBufferedOperationsDelayId']),this['_sendBufferedOperationsDelayId']=setTimeout(()=>{this['_sendBufferedOperations']()['then'](_0x26498a=>{_0x26498a&&(this['_clearPendingAction'](),this['_isPendingUpdate']=!0x1);})['catch'](_0x51c018=>{if(this['_clearPendingAction'](),this['_isPendingUpdate']=!0x1,!function(_0x53a3d3){return _0x53a3d3['message']['startsWith']('cloud-services-internal-error:\x20Not\x20connected.')||_0x53a3d3['message']['startsWith']('cloud-services-internal-error:\x20Collaborative\x20Editing\x20Service\x20is\x20not\x20connected.')||_0x53a3d3['message']['startsWith']('cloud-services-internal-error:\x20Request\x20timeout.');}(_0x51c018))throw _0x51c018;});},this['_currentBufferDelay']));}['_waitUntilSynced'](){return new Promise(_0x58723c=>{this['on']('change:_isPendingUpdate',()=>{_0x58723c();});});}async['_sendBufferedOperations'](){const _0x2f90f2=this['editor']['plugins']['get'](H);if(this['_shouldSendSelectionUpdate']()&&(_0x2f90f2['createUserMarkerOperations'](),this['_hasSelectionChanged']=!0x1),!this['_shouldSendUpdate']())return!0x0;const _0x29a11f=[...this['_bufferedOperations']];for(const _0x31d306 of _0x29a11f)_0x31d306['wasUndone']=this['_document']['history']['isUndoneOperation'](_0x31d306);const _0x50ba69=this['_operationIdentifier']['getIdOfTheLastOperation'](_0x29a11f),_0x5accc5=K++,_0x2b4321=this['_compressOperations'](_0x29a11f),_0x47696e=await this['_service']['sendOperations'](_0x2b4321,_0x2b4321['baseVersion'],_0x50ba69);try{return await this['_handleServerResponse'](_0x29a11f,_0x47696e,_0x5accc5);}catch(_0x5aec53){return this['_crash']('realtimecollaborationclient-sendbufferedoperations',_0x5aec53);}}async['_handleServerResponse'](_0x533cd9,_0x3a2eaa,_0x5a905b){if('error'in _0x3a2eaa)throw _0x3a2eaa['error'];let _0x248a0b=!0x1;if(_0x3a2eaa['wereChangesApplied']){_0x3a2eaa['lastOperationId']&&(this['_lastSyncedOperationId']=_0x3a2eaa['lastOperationId']),this['_bufferedOperations']=this['_bufferedOperations']['filter'](_0x500637=>!_0x533cd9['includes'](_0x500637));for(const _0x5e4290 of _0x533cd9)_0x5e4290['createdAt']='lastOperationAcceptedAt'in _0x3a2eaa&&_0x3a2eaa['lastOperationAcceptedAt']||void 0x0;Q(_0x533cd9,_0x3a2eaa['version']-_0x533cd9['length']),this['_updateServerHistory'](_0x533cd9);const _0x47b3c9=_0x533cd9['filter'](_0x3e45f6=>{if(!_0x3e45f6['_isInit'])return!0x1;const _0x3ba30b=this['_getAffectedRoot'](_0x3e45f6);return _0x3ba30b&&!this['_knownRootNames']['has'](_0x3ba30b);});Q(_0x47b3c9,this['_document']['version']),this['_applyOperationsSet'](_0x47b3c9),_0x248a0b=!0x0,this['_currentBufferDelay']=this['_baseBufferDelay'];}else{const _0x2c11eb=this['_decompressOperations'](_0x3a2eaa['data'],_0x3a2eaa['metadata'])['filter'](_0x3880cb=>_0x3880cb['baseVersion']>=this['_lastServerVersion']);_0x2c11eb['forEach'](_0x204cb9=>this['_addKnownRoot'](_0x204cb9)),this['_bufferedOperations']=this['_bufferedOperations']['filter'](_0x59e59a=>!_0x59e59a['_isInit']||!this['_knownRootNames']['has'](this['_getAffectedRoot'](_0x59e59a))),this['_bufferedOperations']['length']&&Q(this['_bufferedOperations'],this['_bufferedOperations'][0x0]['baseVersion']),await this['_fetchMissingUsers'](_0x2c11eb),_0x248a0b=this['_handleExternalOperations'](_0x2c11eb,_0x3a2eaa['version'],_0x3a2eaa['lastOperationId']),this['_currentBufferDelay']=Math['round'](this['_currentBufferDelay']/0x2);}return _0x248a0b?!this['_shouldSendUpdate']()||(this['_sendBufferedOperationsDelayed'](!0x0),!0x1):this['_crash']('realtimecollaborationclient-handleserverresponse');}['_handleExternalOperations'](_0x3eab33,_0x3b202c,_0x12490a){try{const _0x2be967={'document':this['_document'],'useRelations':!0x1,'padWithNoOps':!0x0},{operationsA:_0x5d28e9,operationsB:_0x184972,originalOperations:_0x302cc5}=_0x39c78b(_0x3eab33,this['_bufferedOperations'],_0x2be967);Q(_0x5d28e9,this['_document']['version']),Q(_0x184972,_0x3b202c);for(const _0x26609e of _0x5d28e9){const _0x56f935=_0x302cc5['get'](_0x26609e);_0x26609e['_authorId']=_0x56f935?_0x56f935['_authorId']:null;}_0x12490a&&(this['_operationIdentifier']['setIdForTheLastOperation'](_0x3eab33,_0x12490a),this['_lastSyncedOperationId']=_0x12490a),this['_bufferedOperations']=[..._0x184972],this['_applyOperationsSet'](_0x5d28e9),this['_updateServerHistory'](_0x3eab33);}catch(_0x3bd476){return console['error'](_0x3bd476),!0x1;}return!0x0;}['_applyOperationsSet'](_0x848602,_0x27bc93=!0x1){this['editor']['model']['enqueueChange']({'isUndoable':!0x1,'isLocal':!0x1},_0x1084b3=>{for(const _0x435f27 of _0x848602)this['_knownOperations']['add'](_0x435f27),this['_addKnownRoot'](_0x435f27),_0x1084b3['batch']['addOperation'](_0x435f27),this['editor']['model']['applyOperation'](_0x435f27);});}['_addKnownRoot'](_0x12a4fa){const _0x81e4de=this['_getAffectedRoot'](_0x12a4fa);_0x81e4de&&this['_knownRootNames']['add'](_0x81e4de);}['_getAffectedRoot'](_0x445e82){let _0x13ce28,_0x10adb7;switch(_0x445e82['type']){case'insert':_0x13ce28=_0x445e82['position']['root'];break;case'marker':if(_0x10adb7=_0x445e82['newRange'],!_0x10adb7)return null;_0x13ce28=_0x10adb7['root'];break;case'addRootAttribute':_0x13ce28=_0x445e82['root'];break;case'addRoot':_0x13ce28=_0x445e82['affectedSelectable'];break;case'move':_0x13ce28=_0x445e82['targetPosition']['root'];break;default:return null;}return _0x13ce28['rootName'];}['_updateServerHistory'](_0x156fee){_0x156fee['forEach'](_0x6612f9=>{const _0x1d025b=_0x6612f9['clone']();_0x1d025b['_authorId']=_0x6612f9['_authorId'],_0x1d025b['_isInit']=!!_0x6612f9['_isInit'],_0x1d025b['createdAt']=_0x6612f9['createdAt'],_0x1d025b['baseVersion']+=this['_offset'],_0x6612f9['_isDisconnection']&&this['_disconnectionOperations']['add'](_0x1d025b),this['serverHistory']['addOperation'](_0x1d025b);});}['_handleReconnectionError'](_0x12a104){const _0x5eb722=this['editor']['plugins']['get']('Notification'),_0x3b68d3=this['editor']['locale'];_0x12a104||(_0x12a104=q(_0x3b68d3,'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.')),_0x5eb722['showWarning'](_0x12a104,{'title':q(_0x3b68d3,'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'](_0x133a20)['add'](q(this['editor']['locale'],'PENDING_ACTION_SENDING_DATA')));}['_clearPendingAction'](){this['_pendingAction']&&(this['editor']['plugins']['get'](_0x133a20)['remove'](this['_pendingAction']),this['_pendingAction']=null);}['_compressOperations'](_0x15b620){const _0x403f80=_0x15b620['map'](_0x563e26=>_0x563e26['toJSON']());return this['_compressor']['compress'](_0x403f80);}['_decompressOperations'](_0x56d8cc,_0x3c8476){return this['_compressor']['decompress'](_0x56d8cc)['map']((_0x13b82b,_0x7f879c)=>{const _0x3ad25c='init'==_0x3c8476[_0x7f879c]['type'];if('InsertOperation'==_0x13b82b['__className']){const _0x233274=_0x13b82b['position']['root'];!this['_document']['getRoot'](_0x233274)&&(this['_document']['createRoot']('$root',_0x233274)['_isAttached']=!0x1);}const _0x445187=_0x3cbf6a['fromJSON'](_0x13b82b,this['_document']);return _0x445187['wasUndone']=_0x13b82b['wasUndone'],_0x445187['_isInit']=_0x3ad25c,_0x445187['_authorId']=_0x3ad25c?null:_0x3c8476[_0x7f879c]['userId'],_0x445187['_isDisconnection']='cs:removeUser'===_0x3c8476[_0x7f879c]['type'],_0x445187['createdAt']=_0x3c8476[_0x7f879c]['createdAt'],_0x445187;});}['_refreshUserSelectionMarkers'](){this['_hasSelectionChanged']=!0x0,this['_shouldSendSelectionUpdate']()?this['_sendBufferedOperationsDelayed']():this['_hasSelectionChanged']=!0x1;}['_shouldSendSelectionUpdate'](){const _0x5c0acf=this['editor']['plugins']['get'](r)['channelSessions']['get'](this['_channelId']);return!this['editor']['isReadOnly']&&!!_0x5c0acf&&_0x5c0acf['length']>0x1&&this['_hasSelectionChanged'];}['_shouldSendUpdate'](){return this['_bufferedOperations']['length']>0x0||this['_shouldSendSelectionUpdate']();}}class J extends Error{}function Q(_0x4552bb,_0x50692e){for(const _0x575404 of _0x4552bb)_0x575404['baseVersion']=_0x50692e++;}class X{['_ignoredOperations'];['_operationToId'];constructor(_0x3c0bd5){this['_ignoredOperations']=_0x3c0bd5,this['_operationToId']=new WeakMap();}['getIdOfTheLastOperation'](_0x217844){let _0x547159=_0x217844['length'];for(;_0x547159--;){const _0x3bd153=_0x217844[_0x547159];if(!this['_ignoredOperations']['has'](_0x3bd153)){if(!this['_operationToId']['has'](_0x3bd153)){const _0x40eb5d=_0x57d351()['slice'](0x1,0x12);this['_operationToId']['set'](_0x3bd153,_0x40eb5d);}return this['_operationToId']['get'](_0x3bd153);}}}['setIdForTheLastOperation'](_0x1563cd,_0x4cc2d5){if(!_0x4cc2d5)return;let _0x41d621=_0x1563cd['length'];for(;_0x41d621--;){const _0x2e5c6d=_0x1563cd[_0x41d621];this['_ignoredOperations']['has'](_0x2e5c6d)||this['_operationToId']['set'](_0x2e5c6d,_0x4cc2d5);}}}class n extends _0x33017c{static get['requires'](){return[l];}static get['pluginName'](){return'RealTimeCollaborativeEditing';}}class a extends _0xb4909c{static ['CommentsService']=/* #__PURE__ -- @preserve */
|
|
26
|
+
((()=>_0x2b8343)());['_services'];static get['requires'](){return[c,'CommentsRepository',r,_0x5b2741];}static get['pluginName'](){return'CloudServicesCommentsAdapter';}constructor(_0x208695){super(_0x208695),this['_services']=new Map();}async['init'](){const _0xc21ec=this['context'],_0x442ec0=_0xc21ec['plugins']['get']('CommentsRepository');if(_0xc21ec['plugins']['get'](c)['addToReconnectionStack'](this),_0x442ec0['adapter']={'addCommentThread':async({channelId:_0x3aeadf,threadId:_0x4ff435,comments:_0x118069,resolvedAt:_0x246aa7,resolvedBy:_0x5b22d1,context:_0x37bf89,attributes:_0x183abc})=>{const _0x3c5346=await this['_getService'](_0x3aeadf)['addCommentThread']({'commentThreadId':_0x4ff435,'comments':_0x118069['map'](_0x1e838c=>function(_0x6390fe,_0x2a3bf6,_0x10e1da){return{'commentThreadId':_0x10e1da,'commentId':_0x6390fe['commentId'],'userId':_0x6390fe['authorId'],'content':_0x6390fe['content'],'documentId':_0x2a3bf6,'createdAt':_0x6390fe['createdAt'],'attributes':_0x6390fe['attributes']||{}};}(_0x1e838c,_0x3aeadf,_0x4ff435)),'resolvedAt':_0x246aa7,'resolvedBy':_0x5b22d1,'context':_0x37bf89,'attributes':_0x183abc})['catch'](ut);return{'threadId':_0x3c5346['commentThreadId'],'comments':_0x3c5346['comments']};},'getCommentThread':async({channelId:_0x48a1fa,threadId:_0x183c07})=>{const _0x10690d=await this['_getService'](_0x48a1fa)['getCommentThread'](_0x183c07)['catch'](ut);return _0x10690d['deletedAt']?null:(await this['_fetchMissingUsersForThreads']([_0x10690d]),{'threadId':_0x10690d['commentThreadId'],'comments':_0x10690d['comments']['map'](S),'context':_0x10690d['context'],'resolvedAt':_0x10690d['resolvedAt'],'resolvedBy':_0x10690d['resolvedBy'],'attributes':_0x10690d['attributes']||{}});},'updateCommentThread':async({channelId:_0xac4977,threadId:_0x118567,context:_0x25efac,unlinkedAt:_0x6a3312,attributes:_0x429ffe})=>this['_getService'](_0xac4977)['updateCommentThread']({'commentThreadId':_0x118567,'context':_0x25efac,'attributes':_0x429ffe,'unlinkedAt':_0x6a3312})['catch'](B)['catch'](ut),'resolveCommentThread':async({channelId:_0x52ed90,threadId:_0x236043})=>{const _0x335929=await this['_getService'](_0x52ed90)['resolveCommentThread'](_0x236043)['catch'](B)['catch'](ut);return{'threadId':_0x335929['commentThreadId'],'resolvedAt':_0x335929['resolvedAt'],'resolvedBy':_0x335929['resolvedBy']};},'reopenCommentThread':async({channelId:_0xc83189,threadId:_0x5e3fb7})=>this['_getService'](_0xc83189)['reopenCommentThread'](_0x5e3fb7)['catch'](B)['catch'](ut),'removeCommentThread':({channelId:_0x23f44f,threadId:_0x3c4e1a})=>this['_getService'](_0x23f44f)['removeCommentThread'](_0x3c4e1a)['catch'](B)['catch'](ut),'addComment':({channelId:_0xa11b10,threadId:_0x211ad2,commentId:_0x28223c,content:_0x389401,attributes:_0x2b20b8})=>this['_getService'](_0xa11b10)['addComment'](_0x211ad2,_0x28223c,_0x389401,_0x2b20b8)['catch'](ut),'updateComment':({channelId:_0x3a13c8,threadId:_0x43567b,commentId:_0xd47e42,content:_0x2cad04,attributes:_0x5f025e})=>this['_getService'](_0x3a13c8)['updateComment'](_0x43567b,_0xd47e42,_0x2cad04,_0x5f025e)['catch'](B)['catch'](ut),'removeComment':({channelId:_0x1f0ec2,threadId:_0x4d4be6,commentId:_0x5a5601})=>this['_getService'](_0x1f0ec2)['removeComment'](_0x4d4be6,_0x5a5601)['catch'](B)['catch'](ut)},_0xc21ec instanceof _0x12c542){const _0x444fb6=_0xc21ec['config']['get']('collaboration.channelId'),_0x3cd020=_0xc21ec['plugins']['get'](r);await this['_setUpService'](_0x444fb6);const _0x2e564d=await this['_services']['get'](_0x444fb6)['getConnectedSessions']();this['listenTo'](_0x3cd020,'sessionAdd:'+_0x444fb6,(_0x393667,{session:_0x54f0f0})=>{_0x54f0f0['id']===_0x3cd020['mySessionId']&&(_0x393667['off'](),this['context']['plugins']['get']('Permissions')['setPermissions'](_0x54f0f0['permissions'],_0x444fb6));}),_0x3cd020['register'](_0x444fb6,_0x2e564d);}}async['_setUpService'](_0x37376b){if(this['_services']['has'](_0x37376b))throw new _0x3f3cf1('cloudservicescommentsadapter-connect-already-connected',null,{'channelId':_0x37376b});const _0x131e7b=this['context']['plugins']['get']('CommentsRepository'),_0x324cf6=new a['CommentsService'](_0x37376b);this['_services']['set'](_0x37376b,_0x324cf6),this['listenTo'](_0x324cf6,'commentThreadAdded',(_0x31a8e5,_0x3ca64e)=>{const {commentThreadId:_0x3d99c0,documentId:_0x288cfe,context:_0x44f77b,attributes:_0x1cd932,resolvedAt:_0x2bec66,resolvedBy:_0x54151c,comments:_0x977100}=_0x3ca64e;_0x131e7b['getCommentThread'](_0x3d99c0)||_0x131e7b['addCommentThread']({'threadId':_0x3d99c0,'channelId':_0x288cfe,'comments':_0x977100?_0x977100['map'](S):[],'context':_0x44f77b,'attributes':_0x1cd932,'resolvedAt':_0x2bec66,'resolvedBy':_0x54151c,'isFromAdapter':!0x0});}),this['listenTo'](_0x324cf6,'commentThreadUpdated',(_0x855bf7,{commentThreadId:_0x1d48f0,documentId:_0x412013,context:_0x52af6a,unlinkedAt:_0x2ab68f,attributes:_0x55b018})=>{_0x131e7b['getCommentThread'](_0x1d48f0)&&_0x131e7b['updateCommentThread']({'threadId':_0x1d48f0,'channelId':_0x412013,'context':_0x52af6a,'unlinkedAt':_0x2ab68f,'attributes':_0x55b018,'isFromAdapter':!0x0});}),this['listenTo'](_0x324cf6,'commentThreadResolved',(_0x22dccf,{commentThreadId:_0xc97a22,resolvedBy:_0x1d419f,resolvedAt:_0x3a1b63})=>{const _0xa578dc=_0x131e7b['getCommentThread'](_0xc97a22);_0xa578dc&&_0xa578dc['resolve']({'resolvedBy':_0x1d419f,'resolvedAt':_0x3a1b63,'isFromAdapter':!0x0});}),this['listenTo'](_0x324cf6,'commentThreadReopened',(_0xc35d5f,{commentThreadId:_0x57e7a1})=>{const _0x50a673=_0x131e7b['getCommentThread'](_0x57e7a1);_0x50a673&&_0x50a673['reopen']({'isFromAdapter':!0x0});}),this['listenTo'](_0x324cf6,'commentThreadRemoved',(_0x2cac94,{commentThreadId:_0x525bd2})=>{const _0x2025f0=_0x131e7b['getCommentThread'](_0x525bd2);_0x2025f0&&_0x2025f0['remove']({'isFromAdapter':!0x0});}),this['listenTo'](_0x324cf6,'commentAdded',(_0x275407,_0x7baf71)=>{const _0x5d2169=_0x7baf71['commentThreadId'],_0x4ee3d9=_0x131e7b['getCommentThread'](_0x5d2169);_0x4ee3d9&&_0x4ee3d9['addComment']({...S(_0x7baf71),'isFromAdapter':!0x0});}),this['listenTo'](_0x324cf6,'commentUpdated',(_0x355742,{commentThreadId:_0x2038a4,commentId:_0x11d42e,content:_0x3d7977,attributes:_0x15ca10})=>{const _0x323610=_0x131e7b['getCommentThread'](_0x2038a4);if(_0x323610){const _0x2f8cea=_0x323610['getComment'](_0x11d42e);_0x2f8cea&&_0x2f8cea['update']({'content':_0x3d7977,'attributes':_0x15ca10,'isFromAdapter':!0x0});}}),this['listenTo'](_0x324cf6,'commentRemoved',(_0x294319,{commentThreadId:_0xac9e64,commentId:_0x54a196})=>{const _0x512637=_0x131e7b['getCommentThread'](_0xac9e64);if(_0x512637){const _0xd52268=_0x512637['getComment'](_0x54a196);_0xd52268&&_0xd52268['remove']({'isFromAdapter':!0x0});}}),await this['_connectService'](_0x37376b);}['destroy'](){if(this['context']instanceof _0x12c542){const _0x3019b1=this['context']['config']['get']('collaboration.channelId');this['_terminateService'](_0x3019b1);}}['_terminateService'](_0x4dd26d){if(!this['_services']['has'](_0x4dd26d))throw new _0x3f3cf1('cloudservicescommentsadapter-disconnect-not-exist',null,{'channelId':_0x4dd26d});this['_getService'](_0x4dd26d)['disconnect'](),this['_services']['delete'](_0x4dd26d);}async['reconnect'](){for(const _0x5b5c43 of this['_services']['keys']())await this['_connectService'](_0x5b5c43);if(this['context']instanceof _0x12c542){const _0x4b34e5=this['context']['config']['get']('collaboration.channelId'),_0x1a6611=this['context']['plugins']['get'](r);_0x1a6611['unregister'](_0x4b34e5);const _0x632865=await this['_services']['get'](_0x4b34e5)['getConnectedSessions']();_0x1a6611['register'](_0x4b34e5,_0x632865);}}async['_connectService'](_0x4a8375){const {connection:_0x36c079}=this['context']['plugins']['get'](c),_0x50497b=this['context']['plugins']['get']('CommentsRepository'),_0x42691a=this['_services']['get'](_0x4a8375),_0x48274b=await _0x42691a['connect'](_0x36c079);await this['_fetchMissingUsersForThreads'](_0x48274b);const _0x24290=new Set(Array['from'](_0x50497b['getCommentThreads']({'channelId':_0x4a8375}),_0x5064a3=>_0x5064a3['id']));for(const _0x1aaad5 of _0x48274b)_0x1aaad5['deletedAt']||_0x24290['delete'](_0x1aaad5['commentThreadId']);for(const _0x58f08c of _0x24290)_0x50497b['getCommentThread'](_0x58f08c)['remove']({'isFromAdapter':!0x0});for(const _0x38b6ea of _0x48274b){let _0x304a1f=_0x50497b['getCommentThread'](_0x38b6ea['commentThreadId']);const {commentThreadId:_0x1681bf,context:_0x3ed54e,attributes:_0x41cc16,resolvedBy:_0x8d4916,resolvedAt:_0x428711,unlinkedAt:_0x14590e,deletedAt:_0x44acb8}=_0x38b6ea;if(_0x44acb8)continue;_0x304a1f||(_0x304a1f=_0x50497b['addCommentThread']({'channelId':_0x4a8375,'threadId':_0x1681bf,'context':_0x3ed54e,'attributes':_0x41cc16||{},'resolvedBy':_0x8d4916,'resolvedAt':_0x428711,'unlinkedAt':_0x14590e,'isFromAdapter':!0x0}));const _0x5755df=new Set(Array['from'](_0x304a1f['comments'],_0x3e74e2=>_0x3e74e2['id']));for(const _0x1c2811 of _0x38b6ea['comments'])_0x5755df['delete'](_0x1c2811['commentId']);for(const _0xfcbff9 of _0x5755df)_0x304a1f['getComment'](_0xfcbff9)['remove']({'isFromAdapter':!0x0});for(const _0x519edf of _0x38b6ea['comments']){const _0x23a763=_0x304a1f['getComment'](_0x519edf['commentId']);_0x23a763?_0x23a763['content']!==_0x519edf['content']&&_0x23a763['update']({'content':_0x519edf['content'],'isFromAdapter':!0x0}):_0x304a1f['addComment'](Object['assign'](S(_0x519edf),{'isFromAdapter':!0x0}));}}}['_getService'](_0x3eeb1f){if(!this['_services']['has'](_0x3eeb1f))throw new _0x3f3cf1('cloudservicescommentsadapter-service-not-exist',null,{'channelId':_0x3eeb1f});return this['_services']['get'](_0x3eeb1f);}async['_fetchMissingUsersForThreads'](_0x349082){const _0x16bc8c=this['context']['plugins']['get'](_0x5b2741),{connection:_0x4988e2}=this['context']['plugins']['get'](c),_0x5ca2cd=new Set();for(const {resolvedBy:_0x523dfb,comments:_0x2e37bb}of _0x349082){_0x523dfb&&!_0x16bc8c['getUser'](_0x523dfb)&&_0x5ca2cd['add'](_0x523dfb);for(const {userId:_0x223b80}of _0x2e37bb)_0x16bc8c['getUser'](_0x223b80)||_0x5ca2cd['add'](_0x223b80);}if(0x0===_0x5ca2cd['size'])return;const _0xc97a4c=await lt['getMany'](_0x4988e2,Array['from'](_0x5ca2cd));for(const _0x55086f of _0xc97a4c)_0x16bc8c['getUser'](_0x55086f['id'])||_0x16bc8c['addUser'](_0x55086f);}}async function B(_0x4d6f44){if('404'!==_0x4d6f44['code'])throw _0x4d6f44;}function ut(_0x7cb3ad){if((_0x2ae34c=_0x7cb3ad)['message']['startsWith']('cloud-services-internal-error:\x20Comments\x20Service\x20is\x20not\x20connected.')||_0x2ae34c['message']['startsWith']('cloud-services-internal-error:\x20Not\x20connected.')||_0x2ae34c['message']['startsWith']('cloud-services-internal-error:\x20Request\x20timeout.'))return new Promise(()=>{});var _0x2ae34c;throw _0x7cb3ad;}function S(_0x226248){return{'threadId':_0x226248['commentThreadId'],'commentId':_0x226248['commentId'],'content':_0x226248['content'],'createdAt':_0x226248['createdAt'],'authorId':_0x226248['userId'],'attributes':_0x226248['attributes']||{}};}class g extends _0x33017c{static ['TrackChangesService']=/* #__PURE__ -- @preserve */
|
|
27
|
+
((()=>et)());['_bufferedRequests'];['_trackChangesService'];static get['requires'](){return[a,'TrackChangesEditing',c];}constructor(_0xc10f66){super(_0xc10f66);const _0x2af586=this['editor']['config']['get']('collaboration.channelId');this['_bufferedRequests']=new Map(),this['_trackChangesService']=new g['TrackChangesService'](_0x2af586);}['init'](){const _0x2d7c15=this['editor']['plugins']['get'](c),_0x4c7f46=this['editor']['plugins']['get']('TrackChangesEditing');return _0x4c7f46['adapter']={'getSuggestion':async _0x576b7f=>{await this['_waitForServiceReady']();const _0x462a88=await this['_trackChangesService']['get'](_0x576b7f)['catch'](R);return await this['_fetchMissingUsersForThreads']([_0x462a88]),_0x462a88;},'addSuggestion':async({id:_0x3ffd0d,type:_0x5ad145,data:_0x2bf675,originalSuggestionId:_0x1c687a,attributes:_0x223da7})=>{await this['_waitForServiceReady']();const _0x512fea={'id':_0x3ffd0d,'type':_0x5ad145,'data':_0x2bf675,'originalSuggestionId':_0x1c687a,'attributes':_0x223da7},_0x1709b7=await this['_trackChangesService']['add'](_0x3ffd0d,_0x5ad145,_0x2bf675,_0x1c687a,_0x223da7)['catch'](_0x5edbb4=>{if(ft(_0x5edbb4))return new Promise(_0x3a3ad9=>{this['_bufferedRequests']['set'](_0x3ffd0d,{'resolve':_0x3a3ad9,'suggestionData':_0x512fea});});throw _0x5edbb4;});return this['_bufferedRequests']['delete'](_0x3ffd0d),_0x1709b7;},'updateSuggestion':async(_0x566ca6,_0x11ba6b)=>{if(await this['_waitForServiceReady'](),'open'!==_0x11ba6b['state'])return this['_trackChangesService']['update'](_0x566ca6,_0x11ba6b)['catch'](R);}},this['listenTo'](this['_trackChangesService'],'suggestionUpdated',(_0x4c716f,_0x55193d)=>{_0x4c7f46['hasSuggestion'](_0x55193d['id'])&&(_0x4c7f46['getSuggestion'](_0x55193d['id'])['attributes']=_0x55193d['attributes']);}),this['_trackChangesService']['connect'](_0x2d7c15['connection'])['then'](_0x37067e=>(_0x2d7c15['addToReconnectionStack'](this),this['_fetchMissingUsersForThreads'](_0x37067e)['then'](()=>{for(const _0x3e864e of _0x37067e){_0x4c7f46['addSuggestionData'](_0x3e864e)['_saved']=!0x0;}})));}async['reconnect'](){const _0x86303a=this['editor']['plugins']['get']('TrackChangesEditing'),{connection:_0x4dcbca}=this['editor']['plugins']['get'](c),_0x38d23f=await this['_trackChangesService']['connect'](_0x4dcbca);await this['_fetchMissingUsersForThreads'](_0x38d23f);for(const {suggestionData:_0x12bbbe,resolve:_0x3bae38}of this['_bufferedRequests']['values']()){let _0x488532=_0x38d23f['find'](_0x5df469=>_0x5df469['id']===_0x12bbbe['id']);_0x488532||(_0x488532=await this['_trackChangesService']['add'](_0x12bbbe['id'],_0x12bbbe['type'],_0x12bbbe['data'],_0x12bbbe['originalSuggestionId'])),_0x3bae38(_0x488532);}for(const _0x4646d8 of _0x38d23f)_0x86303a['hasSuggestion'](_0x4646d8['id'])||_0x86303a['addSuggestionData'](_0x4646d8);}async['_waitForServiceReady'](){this['_trackChangesService']['isConnected']||await new Promise(_0x2dbf70=>{this['listenTo'](this['_trackChangesService'],'connected',_0x1940c5=>{_0x1940c5['off'](),_0x2dbf70();});});}async['_fetchMissingUsersForThreads'](_0x5b2932){const _0x8e16d2=this['editor']['plugins']['get'](_0x5b2741),{connection:_0x410496}=this['editor']['plugins']['get'](c),_0x2b318b=new Set();for(const {authorId:_0x27f22c}of _0x5b2932)_0x8e16d2['getUser'](_0x27f22c)||_0x2b318b['add'](_0x27f22c);if(0x0===_0x2b318b['size'])return;const _0x4ca4d2=await lt['getMany'](_0x410496,Array['from'](_0x2b318b));for(const _0x156325 of _0x4ca4d2)_0x8e16d2['getUser'](_0x156325['id'])||_0x8e16d2['addUser'](_0x156325);}}function R(_0x55e6e3){if(ft(_0x55e6e3))return new Promise(()=>{});throw _0x55e6e3;}function ft(_0x1593a3){return _0x1593a3['message']['startsWith']('cloud-services-internal-error:\x20Not\x20connected.')||_0x1593a3['message']['startsWith']('cloud-services-internal-error:\x20Request\x20timeout.');}class m extends _0x33017c{static get['requires'](){return['Comments',a,n,c];}static get['pluginName'](){return'RealTimeCollaborativeComments';}['init'](){const _0x2c64c5=this['editor']['plugins']['get'](c),_0x5af12c=this['editor']['plugins']['get']('CommentsEditing'),_0x5b44e5=this['editor']['plugins']['get'](a);return this['editor']['data']['once']('ready',()=>{this['listenTo'](_0x2c64c5,'change:state',(_0x2ee03f,_0x247966,_0x350986)=>{_0x5af12c['isThreadsLoadingPaused']='connected'!==_0x350986;});}),this['listenTo'](_0x2c64c5,'change:state',(_0x5988c4,_0xecd10,_0x29fab8)=>{this['editor']['plugins']['get']('CommentsRepository')['switchReadOnly']('connected'!==_0x29fab8);}),_0x5b44e5['_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 _0x33017c{static get['requires'](){return[m,g,'TrackChanges'];}static get['pluginName'](){return'RealTimeCollaborativeTrackChanges';}}class v extends _0x33017c{static ['RevisionHistoryService']=/* #__PURE__ -- @preserve */
|
|
28
|
+
((()=>it)());['_lastRequestId'];['_revisionTracker'];['_revisionHistoryService'];['_oldOffset'];static get['requires'](){return[c,l,'RevisionTracker',r,_0x5b2741];}constructor(_0x468a2b){super(_0x468a2b);const _0x26f7b5=this['editor']['config']['get']('collaboration.channelId');this['_lastRequestId']=null,this['_revisionTracker']=this['editor']['plugins']['get']('RevisionTracker'),this['_revisionHistoryService']=new v['RevisionHistoryService'](_0x26f7b5);}async['init'](){const _0x259471=this['editor']['plugins']['get'](l),_0x1fccad=_0x259471['serverHistory'],_0x47297c=this['editor']['plugins']['get'](c);this['_revisionTracker']['setSource']({'history':_0x1fccad,'getLatestVersion':()=>this['_getLatestVersion'](),'getCurrentRevisionId':()=>_0x259471['sessionId']});const _0x3a7a42=this['editor']['config']['get']('cloudServices.bundleVersion')||nt,_0x1a708b=await tt['isBundleUploaded'](_0x47297c['connection'],_0x3a7a42);this['_revisionTracker']['adapter']={'getRevision':async({revisionId:_0x4555df})=>(await this['_waitForServiceReady'](),await this['_revisionHistoryService']['getRevision'](_0x4555df)),'updateRevisions':async _0x41e464=>{await this['_waitForServiceReady']();const _0x9e8980=this['_revisionTracker']['currentRevision'];if(_0x1a708b&&0x1===_0x41e464['length']&&_0x41e464[0x0]['id']===_0x9e8980['id'])return _0x41e464;for(const _0x586e5b of _0x41e464)_0x586e5b['id']===_0x9e8980['id']&&(_0x586e5b['isEmptyCurrent']=_0x586e5b['fromVersion']===_0x586e5b['toVersion']);return this['_revisionHistoryService']['updateRevisions'](_0x41e464,this['_lastRequestId'])['then'](_0xd46868=>(this['_lastRequestId']=_0xd46868,_0x41e464))['catch'](_0x3ad02f=>{if(st(_0x3ad02f)||'400'===_0x3ad02f['code']&&void 0x0!==_0x3ad02f['data']['wrongRequestId']){for(const _0x17bd39 of _0x41e464){!this['_revisionTracker']['repository']['getRevision'](_0x17bd39['id'])||this['_revisionTracker']['_bufferUpdate'](_0x17bd39['id'],_0x17bd39,!0x1);}if(st(_0x3ad02f))throw _0x3ad02f;return _0x41e464;}throw _0x3ad02f;});}},this['listenTo'](this['_revisionHistoryService'],'revisionsUpdated',(_0x4a61e3,{revisionsData:_0x2a6777,requestId:_0x2140b2})=>{Math['max'](..._0x2a6777['map'](_0x40b781=>_0x40b781['toVersion']))>this['_getLatestVersionFromServerOperations']()-0x1?this['_getLatestVersion']()['then'](()=>{this['_handleRevisionsUpdate'](_0x2a6777,_0x2140b2);}):this['_handleRevisionsUpdate'](_0x2a6777,_0x2140b2);});const {revisions:_0x56adc8,requestId:_0x4dc1e5}=await this['_revisionHistoryService']['connect'](_0x47297c['connection']);_0x47297c['addToReconnectionStack'](this),this['_lastRequestId']=_0x4dc1e5,await this['_fetchMissingUsers'](_0x56adc8);for(const _0x1ddcc5 of _0x56adc8)this['_revisionTracker']['addRevisionData'](_0x1ddcc5);this['listenTo'](_0x259471,'change:_isConnected',(_0x326cfa,_0x5a3ca3,_0x20b4a6)=>{_0x20b4a6&&(this['_oldOffset']=_0x259471['_offset'],_0x326cfa['off']());}),this['_revisionTracker']['bind']('isEnabled')['to'](_0x47297c,'state',_0x17803b=>_0x17803b===_0x131e8c['CONNECTED']);}async['reconnect'](){const _0x3700e8=this['editor']['plugins']['get'](c),_0x50c4cd=this['editor']['plugins']['get'](l),_0x22e8c2=async()=>{const _0x2ba284=this['_revisionTracker']['currentRevision'],_0x4a105b=_0x2ba284['id'],_0x1ca1b2=_0x4a105b!==_0x50c4cd['sessionId'];if(_0x1ca1b2){const _0x20ccaa=_0x50c4cd['_offset']-this['_oldOffset'],_0x1d7682=this['_getLatestVersionFromServerOperations']();this['_revisionTracker']['_revisionDataBuilder']['reInit']();if(_0x2ba284['toVersion']+_0x20ccaa!==_0x1d7682){const _0x29043d=_0x2ba284['fromVersion']+_0x20ccaa,_0x25534f=this['editor']['plugins']['get'](_0x5b2741),_0x368cfd=this['_revisionTracker']['buildRevisionData']({'revision':_0x2ba284,'from':_0x29043d,'to':_0x1d7682});_0x368cfd['id']=_0x2ba284['id'];const _0x12a5b5=_0x368cfd['authorsIds']['map'](_0x60b4f=>_0x25534f['getUser'](_0x60b4f));_0x2ba284['_update']({..._0x368cfd,'authors':_0x12a5b5},!0x0),this['_revisionTracker']['_bufferUpdate'](_0x2ba284['id'],_0x368cfd,!0x0);}this['_revisionTracker']['_startingVersion']=_0x1d7682,(_0x2ba284['toVersion']===_0x2ba284['fromVersion']&&!this['_revisionTracker']['_bufferedUpdates']['has'](_0x4a105b)&&this['_revisionTracker']['repository']['_revisions']['remove'](_0x4a105b),this['_revisionTracker']['_createCurrentRevision'](_0x1d7682));}const {revisions:_0x449e55,requestId:_0x551d0e}=await this['_revisionHistoryService']['reconnect'](_0x3700e8['connection'],this['_lastRequestId']);_0x1ca1b2&&_0x449e55['length']>0x0?_0x50c4cd['_handleReconnectionError']():(await this['_fetchMissingUsers'](_0x449e55),this['_handleRevisionsUpdate'](_0x449e55,_0x551d0e),this['_revisionTracker']['sendBufferedUpdates']());};return _0x50c4cd['_isConnected']?_0x22e8c2():new Promise((_0x485035,_0x3a9f2c)=>{_0x50c4cd['once']('change:_isConnected',()=>{_0x22e8c2()['then'](_0x485035)['catch'](_0x3a9f2c);});});}['destroy'](){super['destroy']();}async['_waitForServiceReady'](){this['_revisionHistoryService']['isConnected']||await new Promise(_0x4de0f7=>{this['listenTo'](this['_revisionHistoryService'],'connected',_0x44015f=>{_0x44015f['off'](),_0x4de0f7();});});}['_getLatestVersionFromServerOperations'](){const _0x83f038=this['editor']['plugins']['get'](l)['serverHistory']['getOperations']()['reverse']();for(const _0x322d14 of _0x83f038)if('marker'!==_0x322d14['type']||_0x322d14['affectsData'])return _0x322d14['baseVersion']+0x1;}['_getLatestVersion'](){const _0x49115e=this['editor']['plugins']['get'](l);return new Promise(_0x14ed2d=>{_0x49115e['_isPendingUpdate']?_0x49115e['once']('change:_isPendingUpdate',()=>{_0x14ed2d(this['_getLatestVersionFromServerOperations']());}):_0x14ed2d(this['_getLatestVersionFromServerOperations']());});}['_handleRevisionsUpdate'](_0x4c0a03,_0x2dcd0d){const _0x3dadee=this['_revisionTracker']['repository'];this['_lastRequestId']=_0x2dcd0d;for(const _0x2edd84 of _0x4c0a03){const _0x1f8a92=_0x3dadee['getRevision'](_0x2edd84['id']);if(_0x1f8a92){if((_0x2edd84['fromVersion']||_0x2edd84['toVersion'])&&(_0x2edd84['diffData']=null),_0x1f8a92===this['_revisionTracker']['currentRevision']){const _0x33ad26=Math['max'](_0x1f8a92['toVersion'],_0x2edd84['toVersion']),_0x2095c9=Math['max'](_0x1f8a92['fromVersion'],_0x2edd84['fromVersion']);let _0x57a47f;_0x1f8a92['toVersion']===_0x2edd84['toVersion']&&_0x1f8a92['fromVersion']===_0x2edd84['fromVersion']?(_0x57a47f=!0x0,this['_preventResendingRevisionData'](_0x2edd84)):_0x2edd84['toVersion']===_0x33ad26&&_0x2edd84['fromVersion']===_0x2095c9?_0x57a47f=!0x1:(_0x1f8a92['toVersion']===_0x33ad26&&_0x1f8a92['fromVersion']===_0x2095c9||this['_fixRevision']({'revision':_0x1f8a92,'from':_0x2095c9,'to':_0x33ad26}),_0x57a47f=!0x0),_0x57a47f&&(delete _0x2edd84['fromVersion'],delete _0x2edd84['toVersion'],delete _0x2edd84['diffData'],delete _0x2edd84['createdAt'],delete _0x2edd84['authorsIds']);}this['_revisionTracker']['setRevisionData'](_0x2edd84),this['_preventResendingRevisionData'](_0x2edd84);}else this['_revisionTracker']['addRevisionData'](_0x2edd84);}const _0x539e43=_0x3dadee['getRevisions']();_0x539e43['reverse']();for(let _0x46cdae=0x0;_0x46cdae<_0x539e43['length']-0x1;_0x46cdae++){const _0x492ed8=_0x539e43[_0x46cdae],_0x2b6a50=_0x539e43[_0x46cdae+0x1];if(_0x492ed8['fromVersion']<_0x2b6a50['toVersion']){const _0x4e4310=_0x2b6a50['toVersion'],_0x292ea4=Math['max'](_0x4e4310,_0x492ed8['toVersion']);this['_fixRevision']({'revision':_0x492ed8,'from':_0x4e4310,'to':_0x292ea4});}}}['_fixRevision']({revision:_0x46141a,from:_0x466add,to:_0x292b84}={}){const _0x50ec05=this['editor']['plugins']['get'](_0x5b2741),_0x2a9651=this['_revisionTracker']['buildRevisionData']({'revision':_0x46141a,'from':_0x466add,'to':_0x292b84});_0x2a9651['authors']=_0x2a9651['authorsIds']['map'](_0x37bbe0=>_0x50ec05['getUser'](_0x37bbe0)),_0x46141a['_update'](_0x2a9651);}['_preventResendingRevisionData'](_0x9fc14f){const _0x1c594d={};_0x1c594d['id']=_0x9fc14f['id'];for(const _0x47445a of Object['keys'](_0x9fc14f))'id'!==_0x47445a&&(_0x1c594d[_0x47445a]=void 0x0);this['_revisionTracker']['_bufferUpdate'](_0x1c594d['id'],_0x1c594d,!0x0);}async['_fetchMissingUsers'](_0x54902c){const _0x59ae5b=this['editor']['plugins']['get'](_0x5b2741),{connection:_0x64b24a}=this['editor']['plugins']['get'](c),_0x462e59=new Set();for(const _0x377b0f of _0x54902c){for(const _0x2dee5e of _0x377b0f['authorsIds'])_0x36dc45(_0x2dee5e);_0x377b0f['creatorId']&&_0x36dc45(_0x377b0f['creatorId']);}if(0x0===_0x462e59['size'])return;const _0x29f128=await lt['getMany'](_0x64b24a,Array['from'](_0x462e59));for(const _0x538fd9 of _0x29f128)_0x59ae5b['getUser'](_0x538fd9['id'])||_0x59ae5b['addUser'](_0x538fd9);function _0x36dc45(_0x1941c7){_0x59ae5b['getUser'](_0x1941c7)||_0x462e59['add'](_0x1941c7);}}}function st(_0x1efb45){return _0x1efb45['message']['startsWith']('cloud-services-internal-error:\x20Revision\x20History\x20Service\x20is\x20not\x20connected.')||_0x1efb45['message']['startsWith']('cloud-services-internal-error:\x20Not\x20connected.')||_0x1efb45['message']['startsWith']('cloud-services-internal-error:\x20Request\x20timeout.');}class d extends _0x33017c{static get['requires'](){return['RevisionHistory',v,n];}static get['pluginName'](){return'RealTimeCollaborativeRevisionHistory';}}class ts extends _0x325e89{constructor(_0x557f89){super(_0x557f89);const _0x427db4=this['bindTemplate'];this['set']('usersCount',0x0),this['set']('isHidden',!0x0),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-presence-list__counter',_0x427db4['if']('isHidden','ck-presence-list__counter--hidden')]},'children':[{'text':_0x427db4['to']('usersCount',_0x2b0abf=>q(_0x557f89,'CONNECTED_USERS',_0x2b0abf))}]});}}class es extends _0x325e89{['items'];['keystrokes'];constructor(_0x579015){super(_0x579015);const _0x42f679=this['bindTemplate'];this['items']=this['createCollection'](),this['keystrokes']=new _0x394e6f(),this['set']({'hasPopup':!0x1,'isExpanded':!0x1}),this['setTemplate']({'tag':'div','attributes':{'aria-haspopup':_0x42f679['if']('hasPopup'),'aria-expanded':_0x42f679['to']('isExpanded',_0x3347f4=>this['hasPopup']&&String(_0x3347f4)),'aria-label':_0x42f679['to']('hasPopup',_0x251f00=>q(_0x579015,_0x251f00?'Collapsed\x20connected\x20users\x20list\x20(press\x20ENTER\x20to\x20open\x20it)':'Connected\x20users\x20list')),'role':'list','tabindex':_0x42f679['to']('hasPopup',_0x2a3dd0=>!!_0x2a3dd0&&0x0),'class':['ck','ck-presence-list__list']},'children':this['items'],'on':{'click':_0x42f679['to'](()=>this['fire']('execute'))}}),this['on']('change:hasPopup',(_0x2ecba8,_0x2614d3,_0x5c273c)=>{this['element']&&(_0x5c273c?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 _0x325e89{['counterView'];['inlineListView'];constructor(_0xf5e75c){super(_0xf5e75c);const _0x5147ae=this['bindTemplate'];this['set']('isCollapsed',!0x0),this['counterView']=new ts(this['locale']),this['inlineListView']=new es(_0xf5e75c),this['inlineListView']['bind']('hasPopup')['to'](this,'isCollapsed'),this['listenTo'](this['inlineListView']['items'],'change',()=>{for(const _0x1c3115 of this['inlineListView']['items'])_0x1c3115['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',_0x5147ae['if']('isCollapsed','ck-presence-list--collapsed')]},'children':[this['counterView'],this['inlineListView']]});}}class j extends _0x325e89{['listWrapperView'];constructor(_0x58155b,_0x21fda6){super(_0x58155b),this['listWrapperView']=new mt(_0x58155b,_0x21fda6),this['setTemplate']({'tag':'div','attributes':{'tabindex':-0x1,'role':'application','class':['ck','ck-presence-list__dropdown-list'],'aria-label':q(_0x58155b,'Connected\x20users\x20list\x20dropdown\x20menu')},'children':[this['listWrapperView']]});}}class mt extends _0x376162{constructor(_0xadb9bb,_0x2433bd){super(_0xadb9bb);const _0x1b4039=this['bindTemplate'];this['set']('_isScrollable',!0x1),this['setTemplate']({'tag':_0x2433bd?'div':'ul','attributes':{'class':['ck','ck-reset','ck-list','ck-presence-list__dropdown-list-wrapper',_0x1b4039['if']('_isScrollable','ck-presence-list__dropdown-list-wrapper_scrollable')],'role':_0x1b4039['to']('role'),'aria-label':_0x1b4039['to']('ariaLabel'),'aria-labelledby':_0x1b4039['to']('ariaLabelledBy')},'children':this['items']}),this['listenTo'](_0x3a845f['window'],'resize',()=>this['checkIfScrollable']()),this['items']['on']('change',()=>this['checkIfScrollable']());}['render'](){super['render'](),this['checkIfScrollable']();}['checkIfScrollable'](){const _0x1e0e46=this['element'];_0x1e0e46&&(this['_isScrollable']=Math['max'](_0x1e0e46['scrollHeight'],_0x1e0e46['clientHeight'])>0.8*window['innerHeight']);}}class k extends rt{['userView'];constructor(_0x5130f8,_0x370d5a,_0x42acc8){super(_0x5130f8);const _0x49bf6d=this['bindTemplate'];this['userView']=new ct(_0x5130f8,_0x370d5a);const _0x51a903={'tag':'li','attributes':{'class':['ck','ck-presence-list__dropdown-list-item'],'tabindex':-0x1,'role':'presentation','aria-label':_0x370d5a['name']},'children':[this['userView'],{'tag':'span','attributes':{'class':['ck','ck-user__full-name']},'children':[{'text':_0x370d5a['name']}]},{'tag':'span','attributes':{'class':['ck','ck-presence-list__marker',_0x370d5a['color']['getBackgroundColorClass']()],'aria-hidden':'true'}}]};_0x42acc8&&(_0x51a903['tag']='button',_0x51a903['on']={'click':_0x49bf6d['to'](()=>this['fire']('execute'))}),this['setTemplate'](_0x51a903);}['focus'](){this['element']['focus']();}}class y extends _0x325e89{['userView'];['markerView'];constructor(_0x2c5def,_0x2cf8cc,_0x578cb3){super(_0x2c5def);const _0x3a8465=this['bindTemplate'];this['set']('isFocusable',!0x1),this['set']('hasTooltip',!0x0),this['set']('tooltipPosition',''),this['userView']=new ct(_0x2c5def,_0x2cf8cc),this['markerView']=new at(_0x2c5def,_0x2cf8cc);const _0x1be1e7=new ot(_0x2c5def);_0x1be1e7['template']['tag']='span',_0x1be1e7['text']=_0x2cf8cc['name'];const _0x493e6d={'tag':'div','attributes':{'class':['ck','ck-presence-list__list-item'],'role':'listitem','tabindex':_0x3a8465['to']('isFocusable',_0xd7a233=>!!_0xd7a233&&0x0),'aria-labelledby':_0x1be1e7['id'],'data-cke-tooltip-text':this['userView']['name'],'data-cke-tooltip-position':_0x3a8465['to']('tooltipPosition'),'data-cke-tooltip-disabled':_0x3a8465['to']('hasTooltip',_0x4dc190=>!_0x4dc190),'data-cke-tooltip-class':'ck-presence-list__list-item__tooltip'},'children':[this['userView'],this['markerView'],_0x1be1e7]};_0x578cb3&&(_0x493e6d['tag']='button',_0x493e6d['on']={'click':_0x3a8465['to'](()=>this['fire']('execute'))}),this['setTemplate'](_0x493e6d);}}class at extends _0x325e89{constructor(_0x31958f,_0x40791c){super(_0x31958f),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-presence-list__marker',_0x40791c['color']['getBackgroundColorClass']()],'aria-hidden':'true'}});}}const A={'collapseAt':0x6,'displayMe':!0x0};class s extends _0xb4909c{['currentDisplayedUsers'];['balloonPanelView'];['view'];['presenceDropdownView'];['_bodyCollection']=null;constructor(_0xddcce6){super(_0xddcce6),this['context']['config']['define']('presenceList',A);const _0x221a0d=_0xddcce6['config']['get']('presenceList.collapseAt');if('number'!=typeof _0x221a0d)throw new _0x3f3cf1('presencelist-collapseat-invalid-format',this);if(_0x221a0d<0x1)throw new _0x3f3cf1('presencelist-collapseat-invalid-format',this);this['_allConnectedUsers']=this['context']['plugins']['get'](r)['allConnectedUsers'],this['set']('usersCount',0x0),this['currentDisplayedUsers']=new _0x3d03ac(),this['balloonPanelView']=new _0x4fafdb(),this['balloonPanelView']['class']='ck\x20ck-presence-list__balloon',this['view']=this['_createView'](),this['presenceDropdownView']=void 0x0;}static get['requires'](){return[r];}['init'](){for(const _0x5affd9 of this['_allConnectedUsers'])this['_handleUserAdd'](_0x5affd9);this['listenTo'](this['_allConnectedUsers'],'add',(_0x5ef733,_0x47a5d2)=>{this['_handleUserAdd'](_0x47a5d2);}),this['listenTo'](this['_allConnectedUsers'],'remove',(_0x382dee,_0x33ff84)=>{this['_handleUserRemove'](_0x33ff84);});}['_createView'](){const _0x56445b=this['context'],_0x2af86d=new L(this['context']['locale']),_0x33f7cc=this['balloonPanelView'];if(!_0x165d0f(_0x56445b['config']['get']('presenceList.container')))throw new _0x3f3cf1('presencelist-missing-container',this);return _0x2af86d['counterView']['bind']('usersCount')['to'](this),_0x2af86d['bind']('isCollapsed')['to'](this,'usersCount',_0x4b0789=>{const {collapseAt:_0x508521,displayMe:_0x2ba4b7}=_0x56445b['config']['get']('presenceList'),_0x998071=_0x4b0789>=_0x508521;return _0x2af86d['counterView']['isHidden']=!(0x1==_0x4b0789&&_0x2ba4b7||_0x998071),_0x998071||this['hideDropdown'](),_0x998071;}),_0x2af86d['inlineListView']['items']['bindTo'](this['currentDisplayedUsers'])['using'](_0x871aa5=>{const _0x2c361a=_0x56445b['config']['get']('presenceList'),_0x7fa10c=new y(_0x56445b['locale'],_0x871aa5,!!_0x2c361a['onClick']);return _0x7fa10c['bind']('hasTooltip')['to'](_0x2af86d,'isCollapsed',_0x15e980=>!_0x15e980),_0x7fa10c['bind']('isFocusable')['to'](_0x2af86d,'isCollapsed',_0x426679=>!_0x426679),_0x2c361a['onClick']&&this['listenTo'](_0x7fa10c,'execute',()=>{this['view']['isCollapsed']||_0x2c361a['onClick'](_0x871aa5,_0x7fa10c['element']);}),_0x7fa10c;}),this['listenTo'](_0x2af86d['inlineListView'],'execute',()=>{this['presenceDropdownView']?this['hideDropdown']():this['view']['isCollapsed']&&this['showDropdown']();}),_0x2af86d['inlineListView']['keystrokes']['set']('Enter',(_0x40403a,_0x2580be)=>{this['view']['isCollapsed']&&(this['showDropdown'](),_0x2580be());}),_0x2af86d['render'](),_0x33f7cc['render'](),_0x1663e4({'emitter':_0x2af86d,'activator':()=>_0x33f7cc['isVisible'],'contextElements':[_0x33f7cc['element'],_0x2af86d['inlineListView']['element']],'callback':()=>this['hideDropdown']()}),_0x56445b['config']['get']('presenceList.container')['appendChild'](_0x2af86d['element']),this['_bodyCollection']=new _0xb3c7c9(this['context']['locale']),this['_bodyCollection']['attachToDom'](),this['_bodyCollection']['add'](this['balloonPanelView']),_0x2af86d;}['_handleUserAdd'](_0x6b6177){if(!this['context']['config']['get']('presenceList.displayMe')&&_0x6b6177['isMe'])return;const _0x568d0a=this['context']['config']['get']('presenceList.collapseAt')-0x1;this['usersCount']++,this['currentDisplayedUsers']['length']==_0x568d0a&&this['currentDisplayedUsers']['length']>0x1&&this['currentDisplayedUsers']['remove'](0x1);const _0x288c50=_0x6b6177['isMe']?0x0:this['currentDisplayedUsers']['length'];this['currentDisplayedUsers']['add'](_0x6b6177,_0x288c50);}['_handleUserRemove'](_0x543548){if(this['usersCount']--,this['currentDisplayedUsers']['get'](_0x543548['id'])&&(this['currentDisplayedUsers']['remove'](_0x543548['id']),this['currentDisplayedUsers']['length']<this['usersCount'])){for(const _0x54b002 of Array['from'](this['_allConnectedUsers'])['reverse']())if(!this['currentDisplayedUsers']['get'](_0x54b002['id']))return void this['currentDisplayedUsers']['add'](_0x54b002,Math['min'](this['currentDisplayedUsers']['length'],0x1));}}['showDropdown'](){if(this['presenceDropdownView'])return;const _0x251e13=this['context']['config']['get']('presenceList');this['presenceDropdownView']=new j(this['context']['locale'],!!_0x251e13['onClick']),this['view']['inlineListView']['isExpanded']=!0x0;const {listWrapperView:_0x3484a7}=this['presenceDropdownView'];_0x3484a7['items']['bindTo'](this['_allConnectedUsers'])['using'](_0x490d7e=>{if(!_0x251e13['displayMe']&&_0x490d7e['isMe'])return null;const _0x3adf04=new k(this['context']['locale'],_0x490d7e,!!_0x251e13['onClick']);return _0x251e13['onClick']&&this['listenTo'](_0x3adf04,'execute',()=>{_0x251e13['onClick'](_0x490d7e,_0x3adf04['element']);}),_0x3adf04;}),this['balloonPanelView']['content']['add'](this['presenceDropdownView']),this['balloonPanelView']['pin']({'target':this['view']['inlineListView']['element']}),_0x3484a7['focus'](),_0x3484a7['checkIfScrollable']();const _0x273bb=(_0x5c0400,_0x490d70)=>{this['hideDropdown'](),this['view']['inlineListView']['focus'](),_0x490d70();};_0x3484a7['keystrokes']['set']('Esc',_0x273bb),_0x3484a7['keystrokes']['set']('Shift+Tab',_0x273bb),_0x3484a7['keystrokes']['set']('Tab',(_0x2c816a,_0x477a2e)=>{!function(_0x4e6d19){const _0x49a3a5=['a','button','input','select','textarea','[tabindex]','[contenteditable]']['map'](_0x2a3d85=>_0x2a3d85+':not([disabled]):not([tabindex=\x22-1\x22])')['join'](','),_0x2e1203=[...document['body']['querySelectorAll'](_0x49a3a5)]['filter'](_0x268da7=>_0x268da7===document['activeElement']||_0x268da7['offsetWidth']+_0x268da7['offsetHeight']>0x0)['sort']((_0xbc02c,_0x2e4e8d)=>(_0xbc02c['tabIndex']||0x0)-(_0x2e4e8d['tabIndex']||0x0)),_0x59c691=_0x2e1203['indexOf'](_0x4e6d19),_0x211e64=_0x2e1203[(_0x59c691+0x1)%_0x2e1203['length']];_0x211e64&&_0x211e64['focus']();}(this['view']['element']),this['hideDropdown'](),_0x477a2e();}),_0x3484a7['focusTracker']['add'](this['view']['element']),_0x3484a7['focusTracker']['on']('change:isFocused',(_0x26b2ed,_0x3b3b2c,_0x3e83a4)=>{_0x3e83a4||this['hideDropdown']();});}['hideDropdown'](){this['presenceDropdownView']&&(this['view']['inlineListView']['isExpanded']=!0x1,this['balloonPanelView']['unpin'](),this['balloonPanelView']['content']['remove'](this['presenceDropdownView']),this['presenceDropdownView']['destroy'](),this['presenceDropdownView']=void 0x0);}['destroy'](){super['destroy'](),this['view']&&this['view']['isRendered']&&this['view']['destroy'](),this['_bodyCollection']&&(this['_bodyCollection']['detachFromDom'](),this['_bodyCollection']['destroy'](),this['_bodyCollection']=null);}}class i extends _0xb4909c{static get['requires'](){return[r,s];}static get['pluginName'](){return'PresenceList';}}export{a as CloudServicesCommentsAdapter,v as CloudServicesRevisionHistoryAdapter,g as CloudServicesTrackChangesAdapter,i as PresenceList,l as RealTimeCollaborationClient,m as RealTimeCollaborativeComments,n as RealTimeCollaborativeEditing,d as RealTimeCollaborativeRevisionHistory,p as RealTimeCollaborativeTrackChanges};
|
package/dist/translations/ar.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
export default{'ar':{'dictionary':{'CONNECTED_USERS':['1\x20مستخدم\x20متصل\x20(أنا)','%0\x20مستخدم\x20متصل','%0\x20مستخدم\x20متصل','%0\x20مستخدمين\x20متصلين','%0\x20مستخدماً\x20متصلاً','%0\x20مستخدمٍ\x20متصلٍ'],'PENDING_ACTION_SENDING_DATA':'إرسال\x20البيانات\x20إلى\x20الخادم','Synchronization\x20issue':'مشكلة\x20في\x20المزامنة','Connected\x20users\x20list\x20dropdown\x20menu':'القائمة\x20المنسدلة\x20لقائمة\x20المستخدمين\x20المتصلين','Connected\x20users\x20list':'قائمة\x20المستخدمين\x20المتصلين','Collapsed\x20connected\x20users\x20list\x20(press\x20ENTER\x20to\x20open\x20it)':'قائمة\x20مطوية\x20للمستخدمين\x20المتصلين\x20(اضغط\x20على\x20ENTER\x20لفتحها)','The\x20document\x20cannot\x20be\x20connected\x20back\x20to\x20the\x20server.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.':'لا\x20يمكن\x20إعادة\x20ربط\x20المستند\x20بالخادم\x20مرة\x20أخرى.\x20كي\x20لا\x20تفقد\x20المحتوى،\x20احفظ\x20المستند\x20محلياً\x20وأجر\x20عملية\x20إنعاش\x20للمحرر\x20لديك.','The\x20document\x20details\x20could\x20not\x20be\x20taken\x20during\x20the\x20reconnection.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.':'تعذرت\x20عملية\x20قراءة\x20بيانات\x20المستند\x20أثناء\x20عملية\x20إعادة\x20الاتصال.\x20كي\x20لا\x20تفقد\x20المحتوى،\x20احفظ\x20المستند\x20محلياً\x20وأجر\x20عملية\x20إنعاش\x20للمحرر\x20لديك.','The\x20last\x20saved\x20version\x20of\x20the\x20document\x20does\x20not\x20match\x20the\x20local\x20version.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.':'الإصدار\x20الأخير\x20المحفوظ\x20من\x20هذا\x20المستند\x20لا\x20يطابق\x20الإصدار\x20المحلي.\x20كي\x20لا\x20تفقد\x20المحتوى،\x20احفظ\x20المستند\x20محلياً\x20وأجر\x20عملية\x20إنعاش\x20للمحرر\x20لديك.','The\x20local\x20document\x20and\x20server\x20document\x20differ\x20and\x20merging\x20them\x20can\x20cause\x20unexpected\x20behavior.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.':'يوجد\x20اختلاف\x20بين\x20المستند\x20المحلي\x20والمستند\x20الموجود\x20على\x20الخادم،\x20ودمجهما\x20قد\x20يتسبب\x20في\x20نتائج\x20غير\x20متوقعة.\x20كي\x20لا\x20تفقد\x20المحتوى،\x20احفظ\x20المستند\x20محلياً\x20وأجر\x20عملية\x20إنعاش\x20للمحرر\x20لديك.'},'getPluralForm':
|
|
23
|
+
export default{'ar':{'dictionary':{'CONNECTED_USERS':['1\x20مستخدم\x20متصل\x20(أنا)','%0\x20مستخدم\x20متصل','%0\x20مستخدم\x20متصل','%0\x20مستخدمين\x20متصلين','%0\x20مستخدماً\x20متصلاً','%0\x20مستخدمٍ\x20متصلٍ'],'PENDING_ACTION_SENDING_DATA':'إرسال\x20البيانات\x20إلى\x20الخادم','Synchronization\x20issue':'مشكلة\x20في\x20المزامنة','Connected\x20users\x20list\x20dropdown\x20menu':'القائمة\x20المنسدلة\x20لقائمة\x20المستخدمين\x20المتصلين','Connected\x20users\x20list':'قائمة\x20المستخدمين\x20المتصلين','Collapsed\x20connected\x20users\x20list\x20(press\x20ENTER\x20to\x20open\x20it)':'قائمة\x20مطوية\x20للمستخدمين\x20المتصلين\x20(اضغط\x20على\x20ENTER\x20لفتحها)','The\x20document\x20cannot\x20be\x20connected\x20back\x20to\x20the\x20server.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.':'لا\x20يمكن\x20إعادة\x20ربط\x20المستند\x20بالخادم\x20مرة\x20أخرى.\x20كي\x20لا\x20تفقد\x20المحتوى،\x20احفظ\x20المستند\x20محلياً\x20وأجر\x20عملية\x20إنعاش\x20للمحرر\x20لديك.','The\x20document\x20details\x20could\x20not\x20be\x20taken\x20during\x20the\x20reconnection.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.':'تعذرت\x20عملية\x20قراءة\x20بيانات\x20المستند\x20أثناء\x20عملية\x20إعادة\x20الاتصال.\x20كي\x20لا\x20تفقد\x20المحتوى،\x20احفظ\x20المستند\x20محلياً\x20وأجر\x20عملية\x20إنعاش\x20للمحرر\x20لديك.','The\x20last\x20saved\x20version\x20of\x20the\x20document\x20does\x20not\x20match\x20the\x20local\x20version.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.':'الإصدار\x20الأخير\x20المحفوظ\x20من\x20هذا\x20المستند\x20لا\x20يطابق\x20الإصدار\x20المحلي.\x20كي\x20لا\x20تفقد\x20المحتوى،\x20احفظ\x20المستند\x20محلياً\x20وأجر\x20عملية\x20إنعاش\x20للمحرر\x20لديك.','The\x20local\x20document\x20and\x20server\x20document\x20differ\x20and\x20merging\x20them\x20can\x20cause\x20unexpected\x20behavior.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.':'يوجد\x20اختلاف\x20بين\x20المستند\x20المحلي\x20والمستند\x20الموجود\x20على\x20الخادم،\x20ودمجهما\x20قد\x20يتسبب\x20في\x20نتائج\x20غير\x20متوقعة.\x20كي\x20لا\x20تفقد\x20المحتوى،\x20احفظ\x20المستند\x20محلياً\x20وأجر\x20عملية\x20إنعاش\x20للمحرر\x20لديك.'},'getPluralForm':_0x39fdb2=>0x0==_0x39fdb2?0x0:0x1==_0x39fdb2?0x1:0x2==_0x39fdb2?0x2:_0x39fdb2%0x64>=0x3&&_0x39fdb2%0x64<=0xa?0x3:_0x39fdb2%0x64>=0xb&&_0x39fdb2%0x64<=0x63?0x4:0x5}};
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
(
|
|
23
|
+
(_0x57f392=>{const {ar:{dictionary:_0x2c8456,getPluralForm:_0x14125b}}={'ar':{'dictionary':{'CONNECTED_USERS':['1\x20مستخدم\x20متصل\x20(أنا)','%0\x20مستخدم\x20متصل','%0\x20مستخدم\x20متصل','%0\x20مستخدمين\x20متصلين','%0\x20مستخدماً\x20متصلاً','%0\x20مستخدمٍ\x20متصلٍ'],'PENDING_ACTION_SENDING_DATA':'إرسال\x20البيانات\x20إلى\x20الخادم','Synchronization\x20issue':'مشكلة\x20في\x20المزامنة','Connected\x20users\x20list\x20dropdown\x20menu':'القائمة\x20المنسدلة\x20لقائمة\x20المستخدمين\x20المتصلين','Connected\x20users\x20list':'قائمة\x20المستخدمين\x20المتصلين','Collapsed\x20connected\x20users\x20list\x20(press\x20ENTER\x20to\x20open\x20it)':'قائمة\x20مطوية\x20للمستخدمين\x20المتصلين\x20(اضغط\x20على\x20ENTER\x20لفتحها)','The\x20document\x20cannot\x20be\x20connected\x20back\x20to\x20the\x20server.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.':'لا\x20يمكن\x20إعادة\x20ربط\x20المستند\x20بالخادم\x20مرة\x20أخرى.\x20كي\x20لا\x20تفقد\x20المحتوى،\x20احفظ\x20المستند\x20محلياً\x20وأجر\x20عملية\x20إنعاش\x20للمحرر\x20لديك.','The\x20document\x20details\x20could\x20not\x20be\x20taken\x20during\x20the\x20reconnection.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.':'تعذرت\x20عملية\x20قراءة\x20بيانات\x20المستند\x20أثناء\x20عملية\x20إعادة\x20الاتصال.\x20كي\x20لا\x20تفقد\x20المحتوى،\x20احفظ\x20المستند\x20محلياً\x20وأجر\x20عملية\x20إنعاش\x20للمحرر\x20لديك.','The\x20last\x20saved\x20version\x20of\x20the\x20document\x20does\x20not\x20match\x20the\x20local\x20version.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.':'الإصدار\x20الأخير\x20المحفوظ\x20من\x20هذا\x20المستند\x20لا\x20يطابق\x20الإصدار\x20المحلي.\x20كي\x20لا\x20تفقد\x20المحتوى،\x20احفظ\x20المستند\x20محلياً\x20وأجر\x20عملية\x20إنعاش\x20للمحرر\x20لديك.','The\x20local\x20document\x20and\x20server\x20document\x20differ\x20and\x20merging\x20them\x20can\x20cause\x20unexpected\x20behavior.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.':'يوجد\x20اختلاف\x20بين\x20المستند\x20المحلي\x20والمستند\x20الموجود\x20على\x20الخادم،\x20ودمجهما\x20قد\x20يتسبب\x20في\x20نتائج\x20غير\x20متوقعة.\x20كي\x20لا\x20تفقد\x20المحتوى،\x20احفظ\x20المستند\x20محلياً\x20وأجر\x20عملية\x20إنعاش\x20للمحرر\x20لديك.'},'getPluralForm':_0x4ba054=>0x0==_0x4ba054?0x0:0x1==_0x4ba054?0x1:0x2==_0x4ba054?0x2:_0x4ba054%0x64>=0x3&&_0x4ba054%0x64<=0xa?0x3:_0x4ba054%0x64>=0xb&&_0x4ba054%0x64<=0x63?0x4:0x5}};_0x57f392['ar']||={'dictionary':{},'getPluralForm':null},_0x57f392['ar']['dictionary']=Object['assign'](_0x57f392['ar']['dictionary'],_0x2c8456),_0x57f392['ar']['getPluralForm']=_0x14125b;})(window['CKEDITOR_TRANSLATIONS']||={});
|