@ckeditor/ckeditor5-real-time-collaboration 43.2.0-alpha.6 → 43.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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 _0x497d5d,Plugin as _0x20e9b2,PendingActions as _0x533628,Context as _0x3ff874}from'@ckeditor/ckeditor5-core/dist/index.js';import{DomEmitterMixin as _0x2c127b,CKEditorError as _0x2b9d7d,Collection as _0x20b753,global as _0x355670,version as nt,uid as _0x4002ff,KeystrokeHandler as _0xab26ed}from'@ckeditor/ckeditor5-utils/dist/index.js';import{Notification as _0xc8ddb,View as _0x73abea,ListView as _0x2e578f,ListItemView as rt,LabelView as ot,BalloonPanelView as _0x21bb65,clickOutsideHandler as _0x45be88,BodyCollection as _0x52cf7c}from'@ckeditor/ckeditor5-ui/dist/index.js';import{LiveRange as ht,History as _0x526c43,NoOperation as _0x17da4a,InsertOperation as _0x230d2c,MarkerOperation as _0x2ca1bf,RootAttributeOperation as _0x1a1d5c,transformSets as _0x111bed,OperationFactory as _0x595f16}from'@ckeditor/ckeditor5-engine/dist/index.js';import{WebSocketGateway as dt,WEB_SOCKET_GATEWAY_STATES as _0x2838f6,CollaborativeEditingService as _0x3a60fe,User as lt,CommentsService as _0x345a6d,TrackChangesService as et,RevisionHistoryService as it,EditorService as tt}from'@ckeditor/ckeditor-cloud-services-collaboration/dist/index.js';import{Users as _0x32b321,UserView as ct}from'ckeditor5-collaboration/dist/index.js';import{Compressor as _0x1e1c7e}from'@ckeditor/ckeditor5-operations-compressor/dist/index.js';import{isElement as _0x10bb8f}from'lodash-es';class c extends _0x497d5d{static ['WebSocketGateway']=/* #__PURE__ -- @preserve */
|
|
24
|
+
((()=>dt)());static ['initialReconnectionInterval']=0x3e8;['connection'];['_reconnectionStack'];['_shouldPluginsReconnect'];['_domEmitter'];static get['requires'](){return['CloudServices',_0xc8ddb];}static get['pluginName'](){return'WebSocketGateway';}constructor(_0x58e49e){super(_0x58e49e),this['set']('state',_0x2838f6['CONNECTED']),this['set']('_isBrowserOffline',!0x1),this['_reconnectionStack']=new Set(),this['_shouldPluginsReconnect']=!0x1,this['_domEmitter']=Object['create'](_0x2c127b);}['init'](){const _0x19077f=this['context'],_0x41b8bb=_0x19077f['plugins']['get']('CloudServices'),_0x344619=_0x19077f['plugins']['get'](_0xc8ddb);if(!_0x41b8bb['token'])throw new _0x2b9d7d('websocketgateway-missing-token',this);if(!_0x41b8bb['webSocketUrl'])throw new _0x2b9d7d('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'](_0x41b8bb['token'],_0x41b8bb['webSocketUrl'],{'timeout':0x3e8*this['context']['config']['get']('cloudServices.connectionTimeout'),'requestTimeout':0x3e8*this['context']['config']['get']('cloudServices.requestTimeout')})['then'](_0x548ee4=>{if(this['connection']=_0x548ee4,this['bind']('state')['to'](_0x548ee4,'state',this,'_isBrowserOffline',(_0x598f97,_0x334ef2)=>('connected'!==_0x598f97&&(this['_shouldPluginsReconnect']=!0x0),_0x334ef2||_0x598f97!==_0x2838f6['CONNECTED']?_0x2838f6['DISCONNECTED']:this['state']==_0x2838f6['DISCONNECTED']&&this['_shouldPluginsReconnect']?(this['_shouldPluginsReconnect']=!0x1,this['_reconnect'](),_0x2838f6['CONNECTING']):_0x2838f6['CONNECTED'])),this['connection']['on']('error',(_0x108f4e,_0x4e7677)=>{if('limitExceeded'!==_0x4e7677['code'])throw console['error'](_0x4e7677),new _0x2b9d7d('cloudservices-init',null,{'originalError':_0x4e7677});_0x344619['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'});}),!_0x548ee4['me'])return new Promise(_0x532898=>_0x548ee4['on']('change:me',_0x532898));})['catch'](_0x54afb5=>{throw console['error'](_0x54afb5),new _0x2b9d7d('cloudservices-init',null,{'originalError':_0x54afb5});});}['addToReconnectionStack'](_0x40bf03){if('function'!=typeof _0x40bf03['reconnect'])throw new _0x2b9d7d('websocketgateway-invalid-plugin-interface',this);if(this['isInReconnectionStack'](_0x40bf03))throw new _0x2b9d7d('websocketgateway-plugin-already-registered',this,{'name':_0x40bf03['constructor']['pluginName']});this['_reconnectionStack']['add'](_0x40bf03);}['removeFromReconnectionStack'](_0xb99e31){this['_reconnectionStack']['delete'](_0xb99e31);}['isInReconnectionStack'](_0x13762b){return this['_reconnectionStack']['has'](_0x13762b);}['_reconnect'](){return this['connection']['reconnect']()['then'](()=>Promise['all'](Array['from'](this['_reconnectionStack'],_0x3a0ee3=>_0x3a0ee3['reconnect']())))['then'](()=>this['state']=_0x2838f6['CONNECTED'])['catch'](_0x28eac3=>{throw console['error'](_0x28eac3),new _0x2b9d7d('cloudservices-reconnection-error',this['context']);});}['destroy'](){this['connection']&&this['connection']['disconnect'](),this['state']=_0x2838f6['DISCONNECTED'],this['_domEmitter']['stopListening'](),super['destroy']();}}class r extends _0x497d5d{['channelSessions'];['channelConnectedUsers'];['allConnectedUsers'];['_registeredSessions'];['_uniqueUsersCount'];['_users'];static get['pluginName'](){return'Sessions';}static get['requires'](){return[c,_0x32b321];}constructor(_0x30a04f){super(_0x30a04f),this['channelSessions']=new Map(),this['channelConnectedUsers']=new Map(),this['allConnectedUsers']=new _0x20b753(),this['_registeredSessions']=new Map(),this['_uniqueUsersCount']=0x0,this['_users']=this['context']['plugins']['get'](_0x32b321);}['init'](){const _0x3d57ef=this['context']['plugins']['get'](c);this['listenTo'](_0x3d57ef,'change:state',(_0x4eedcc,_0x4b137b,_0x5aac9d)=>{if('connected'!==_0x5aac9d)this['channelSessions']['forEach'](_0x1f3ce6=>_0x1f3ce6['clear']()),this['channelConnectedUsers']['forEach'](_0x26f6cf=>_0x26f6cf['clear']()),this['allConnectedUsers']['clear']();else{for(const [_0x873866,_0x452e82]of this['_registeredSessions'])for(const _0x322bd3 of _0x452e82)this['_handleSessionAdd'](_0x873866,_0x322bd3);}}),this['_createUser'](_0x3d57ef['connection']['me'],!0x0);}['register'](_0x1c07c8,_0x34a60f){if(this['_registeredSessions']['has'](_0x1c07c8))throw new _0x2b9d7d('sessions-register-already-registered',null,{'channelId':_0x1c07c8});this['_registeredSessions']['set'](_0x1c07c8,_0x34a60f),this['channelSessions']['set'](_0x1c07c8,new _0x20b753()),this['channelConnectedUsers']['set'](_0x1c07c8,new _0x20b753()),this['listenTo'](_0x34a60f,'add',(_0x475dd8,_0x422fba)=>this['_handleSessionAdd'](_0x1c07c8,_0x422fba)),this['listenTo'](_0x34a60f,'remove',(_0x5a5c49,_0x36f4dc)=>this['_handleSessionRemove'](_0x1c07c8,_0x36f4dc));for(const _0x44af12 of _0x34a60f)this['_handleSessionAdd'](_0x1c07c8,_0x44af12);}['unregister'](_0x2e1a42){if(!this['_registeredSessions']['has'](_0x2e1a42))throw new _0x2b9d7d('sessions-unregister-not-exist',null,{'channelId':_0x2e1a42});const _0x427dec=this['_registeredSessions']['get'](_0x2e1a42);this['stopListening'](_0x427dec);for(const _0x55b51e of _0x427dec)'connected'===this['context']['plugins']['get'](c)['state']&&this['_handleSessionRemove'](_0x2e1a42,_0x55b51e);this['_registeredSessions']['delete'](_0x2e1a42),this['channelSessions']['delete'](_0x2e1a42),this['channelConnectedUsers']['delete'](_0x2e1a42);}get['mySessionId'](){return this['context']['plugins']['get'](c)['connection']['sessionId'];}['getUserBySessionId'](_0x5d1236){for(const _0x398735 of this['channelSessions']['values']())for(const _0x5d6efc of _0x398735)if(_0x5d6efc['id']===_0x5d1236)return _0x5d6efc['user'];}['getUserSessions'](_0x22d6ed,_0x51a36f){const _0x12963f=_0x51a36f?[this['channelSessions']['get'](_0x51a36f)]:this['channelSessions']['values'](),_0x3e0a82=new Set();for(const _0x4b206b of _0x12963f)for(const _0x52663f of _0x4b206b)_0x52663f['user']['id']===_0x22d6ed['id']&&_0x3e0a82['add'](_0x52663f['id']);return _0x3e0a82;}['getUserRole'](_0x20646d){for(const _0x58a9b9 of this['channelSessions']['values']())for(const _0x197b40 of _0x58a9b9)if(_0x197b40['user']===_0x20646d)return _0x197b40['role'];}['_handleSessionAdd'](_0x422b97,_0x3499ee){if('connected'!==this['context']['plugins']['get'](c)['state'])return;const _0x36448f=_0x3499ee['user'],_0x404f28=this['_users']['getUser'](_0x36448f['id'])||this['_createUser'](_0x36448f),_0x51050c=Object['assign']({},_0x3499ee,{'user':_0x404f28});this['channelSessions']['get'](_0x422b97)['add'](_0x51050c);const _0x5f3e96=this['channelConnectedUsers']['get'](_0x422b97);_0x5f3e96['has'](_0x404f28['id'])||_0x5f3e96['add'](_0x404f28),this['allConnectedUsers']['has'](_0x404f28['id'])||this['allConnectedUsers']['add'](_0x404f28,_0x404f28['isMe']?0x0:void 0x0),this['fire']('sessionAdd:'+_0x422b97,{'channelId':_0x422b97,'session':_0x51050c});}['_handleSessionRemove'](_0x5f2954,_0x3a89b4){if('connected'!==this['context']['plugins']['get'](c)['state'])return;const _0x232eeb=this['channelConnectedUsers']['get'](_0x5f2954),_0x33302b=_0x3a89b4['user'];_0x33302b['id']&&(this['channelSessions']['get'](_0x5f2954)['remove'](_0x3a89b4['id']),_0x232eeb['has'](_0x33302b['id'])&&!this['getUserSessions'](_0x33302b,_0x5f2954)['size']&&_0x232eeb['remove'](_0x33302b['id']),this['allConnectedUsers']['get'](_0x33302b['id'])&&!this['getUserSessions'](_0x33302b)['size']&&this['allConnectedUsers']['remove'](_0x33302b['id']));}['_createUser'](_0x101d51,_0x2623b9){const _0x502545=this['_users']['addUser'](_0x101d51);return _0x2623b9&&this['_users']['defineMe'](_0x101d51['id']),_0x502545['orderNumber']=this['_uniqueUsersCount']++,_0x502545;}}class H extends _0x20e9b2{['_domEmitter']=new(_0x2c127b())();static get['requires'](){return[r];}static get['pluginName'](){return'UserMarkers';}['init'](){const _0x98052c=this['editor'],_0x5cbe41=_0x98052c['plugins']['get'](r);_0x98052c['conversion']['for']('editingDowncast')['markerToElement']({'model':'user:position','view':(_0x176d01,{writer:_0x1f46c3})=>function(_0x1eee96,_0x3451ae,_0x22df54,_0x524993){const _0x20220f=_0x1eee96['markerName']['split'](':')[0x2],_0x13d3e2=_0x22df54['getUserBySessionId'](_0x20220f);if(!_0x13d3e2||_0x20220f===_0x22df54['mySessionId'])return;if(!_0x524993['model']['schema']['checkChild'](_0x1eee96['markerRange']['start'],'$text'))return;const _0x4cdbd9={'class':'ck-user__marker\x20'+_0x13d3e2['color']['getMarkerClass'](),'data-name':_0x13d3e2['name'],'data-session-id':_0x20220f},_0x150d56=_0x524993['model']['markers']['get'](_0x1eee96['markerName']),_0x232a0e=_0x150d56['getStart'](),_0x396294=_0x232a0e['nodeAfter'],_0x34d581=_0x524993['model']['schema'];if(_0x396294&&_0x34d581['isObject'](_0x396294)&&_0x34d581['isInline'](_0x396294)&&!_0x524993['model']['markers']['get']('user:range:'+_0x20220f)['getRange']()['isCollapsed'])return;const _0x2a1752=_0x232a0e['parent'];return _0x524993['model']['schema']['isLimit'](_0x2a1752)&&!_0x524993['model']['hasContent'](_0x2a1752)&&(_0x4cdbd9['contenteditable']=!0x1),function(_0x170761,_0x144ed9,_0xddeb1d){const _0xbe0677=_0x170761['createUIElement']('span',_0x144ed9);return _0x170761['setCustomProperty']('userPositionMarker',!0x0,_0xbe0677),_0xbe0677['render']=function(_0x5baf4b){const _0x1fe098=this['toDomElement'](_0x5baf4b);return _0x1fe098['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>'+_0xddeb1d['name']+'</span>',_0x1fe098['addEventListener']('mouseenter',()=>{_0x1fe098['classList']['add']('ck-user__marker_hovered');}),_0x1fe098['addEventListener']('mouseleave',()=>{_0x1fe098['classList']['remove']('ck-user__marker_hovered');}),_0x1fe098;},_0xbe0677['isSimilar']=function(_0x12e624){return!(!this['getCustomProperty']('userPositionMarker')||!_0x12e624['getCustomProperty']('userPositionMarker')||this['getAttribute']('data-session-id')!=_0x12e624['getAttribute']('data-session-id'));},_0xbe0677;}(_0x3451ae,_0x4cdbd9,_0x13d3e2);}(_0x176d01,_0x1f46c3,_0x5cbe41,_0x98052c)}),_0x98052c['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'user:range','view':_0x423389=>function(_0x3d15d6,_0x472670){const _0x88a484=_0x3d15d6['markerName']['split'](':')[0x2];if(_0x88a484===_0x472670['mySessionId'])return null;const _0x24d358=_0x472670['getUserBySessionId'](_0x88a484);if(!_0x24d358)return{'id':_0x88a484,'classes':[]};return{'id':_0x88a484,'classes':['ck-user__selection',_0x24d358['color']['getSelectionClass']()],'attributes':{'data-session-id':_0x88a484},'priority':0x7d0+_0x24d358['orderNumber']};}(_0x423389,_0x5cbe41)}),function(_0x32b883){const _0x50bafa=_0x32b883['model'],_0x1f5298=new Map(),_0x30d253=_0x32b883['plugins']['get'](r);_0x50bafa['markers']['on']('update:user:range',(_0x50e12f,_0x1381ce,_0x10616b,_0x27e90f)=>{if(!_0x27e90f&&_0x1f5298['get'](_0x1381ce['name']))return _0x1f5298['get'](_0x1381ce['name'])['detach'](),void _0x1f5298['delete'](_0x1381ce['name']);const _0x18ed15=_0x1381ce['name']['split'](':')[0x2];if(_0x18ed15===_0x30d253['mySessionId'])return;const _0x3aba4a='user:position:'+_0x18ed15;_0x50bafa['markers']['has'](_0x3aba4a)&&_0x32b883['editing']['reconvertMarker'](_0x3aba4a),_0x1381ce['on']('change:range',(_0x2ba37f,_0x3b5098,_0x20a172)=>{if('$graveyard'!=_0x3b5098['root']['rootName']&&'$graveyard'==_0x1381ce['getRange']()['root']['rootName']&&!_0x1f5298['has'](_0x1381ce['name'])){const _0x3f1042=_0x50bafa['schema']['getNearestSelectionRange'](_0x20a172['deletionPosition']);if(_0x3f1042){const _0x25079a=ht['fromRange'](_0x3f1042);_0x1f5298['set'](_0x1381ce['name'],_0x25079a),_0x25079a['on']('change:range',(_0xdd4387,_0x291467,_0x5971dc)=>{if('$graveyard'==_0x25079a['root']['rootName']){const _0x2686a4=_0x50bafa['schema']['getNearestSelectionRange'](_0x5971dc['deletionPosition']);_0x2686a4?(_0x25079a['start']=_0x2686a4['start'],_0x25079a['end']=_0x2686a4['end']):(_0x1f5298['delete'](_0x1381ce['name']),_0x25079a['detach']());}});}}});}),_0x50bafa['document']['on']('change',()=>{_0x1f5298['size']>0x0&&_0x50bafa['enqueueChange']({'isUndoable':!0x1},_0x42ffc0=>{for(const [_0x3ac490,_0x120d93]of _0x1f5298)'$graveyard'==_0x50bafa['markers']['get'](_0x3ac490)['getRange']()['root']['rootName']&&(re(_0x3ac490['split'](':')[0x2],_0x120d93['toRange'](),_0x50bafa,_0x42ffc0),_0x120d93['detach']());_0x1f5298['clear']();});});}(_0x98052c),this['_domEmitter']['listenTo'](_0x355670['document'],'keydown',(_0x3f1d87,{key:_0x3c1c8d})=>{'Escape'===_0x3c1c8d&&function(_0x42243d){_0x42243d['editing']['view']['change'](_0x30f823=>{for(const _0x43b639 of _0x42243d['model']['markers']){if(!_0x43b639['name']['startsWith']('user:position'))continue;const _0x4807f0=_0x42243d['editing']['mapper']['markerNameToElements'](_0x43b639['name']);if(_0x4807f0){for(const _0x448124 of _0x4807f0)_0x30f823['removeClass']('ck-user__marker_hovered',_0x448124);}}});}(_0x98052c);},{'useCapture':!0x0});}['afterInit'](){const _0x376069=this['editor'],_0x331aab=_0x376069['commands']['get']('undo');_0x331aab&&_0x376069['model']['on']('applyOperation',(_0x2c6a77,_0x18558d)=>{const _0x3e0a9e=_0x18558d[0x0];if('marker'!=_0x3e0a9e['type']||!_0x3e0a9e['name']['startsWith']('user:'))return;const _0x3d7f94=_0x3e0a9e['batch'];_0x331aab['_createdBatches']['has'](_0x3d7f94)&&(_0x3e0a9e['newRange']=_0x3e0a9e['oldRange']?_0x376069['model']['createRange'](_0x3e0a9e['oldRange']['start'],_0x3e0a9e['oldRange']['end']):null);},{'priority':'highest'});}['destroy'](){return this['_domEmitter']['stopListening'](),super['destroy']();}['createUserMarkerOperations'](){const _0xa10560=this['editor'],_0xf71406=_0xa10560['model']['document'],_0x556f64=_0xa10560['plugins']['get'](r);_0xa10560['model']['enqueueChange']({'isUndoable':!0x1},_0x1240fe=>{const _0x1d52d7='user:range:'+_0x556f64['mySessionId'],_0x1a9448='user:position:'+_0x556f64['mySessionId'],_0x178914=_0xa10560['model']['markers']['has'](_0x1d52d7);_0xa10560['editing']['view']['hasDomSelection']?re(_0x556f64['mySessionId'],_0xf71406['selection']['getFirstRange'](),_0xa10560['model'],_0x1240fe):_0x178914&&(_0x1240fe['removeMarker'](_0x1d52d7),_0x1240fe['removeMarker'](_0x1a9448));});}}function re(_0x552867,_0x2cad2c,_0x20496,_0x1575db){const _0x3e1258='user:range:'+_0x552867,_0x1a234e='user:position:'+_0x552867,_0x58bc2b=_0x2cad2c['getContainedElement']();let _0x44a069=_0x2cad2c['start'];_0x58bc2b&&_0x58bc2b['is']('element','tableCell')&&(_0x44a069=function(_0x30d6ca,_0x852c5c){for(const _0x4cd793 of _0x30d6ca['getPositions']())if(_0x852c5c['schema']['checkChild'](_0x4cd793,'$text'))return _0x4cd793;}(_0x2cad2c,_0x20496),_0x2cad2c=_0x1575db['createRange'](_0x44a069));const _0xa1499d=_0x1575db['createRange'](_0x44a069);_0x20496['markers']['has'](_0x3e1258)?(_0x1575db['updateMarker'](_0x3e1258,{'range':_0x2cad2c}),_0x1575db['updateMarker'](_0x1a234e,{'range':_0xa1499d})):(_0x1575db['addMarker'](_0x3e1258,{'range':_0x2cad2c,'usingOperation':!0x0}),_0x1575db['addMarker'](_0x1a234e,{'range':_0xa1499d,'usingOperation':!0x0}));}function q(_0xfd9228,_0x193491,_0x1ad17d){const t=_0xfd9228['t'];switch(_0x193491){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'},_0x1ad17d);default:return'';}}let K=0x1;class l extends _0x20e9b2{static ['CollaborativeEditingService']=/* #__PURE__ -- @preserve */
|
|
25
|
+
((()=>_0x3a60fe)());['_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,_0x533628,_0x32b321,_0xc8ddb];}static get['pluginName'](){return'RealTimeCollaborationClient';}get['cloudDocumentVersion'](){return this['_lastServerVersion']+this['_offset'];}get['_lastServerVersion'](){return this['serverHistory']['version']-this['_offset'];}get['lastSyncVersion'](){const _0x43d4ce=this['serverHistory']['getOperations']();for(let _0x571ec2=_0x43d4ce['length']-0x1;_0x571ec2>=0x0;_0x571ec2--){const _0x10a092=_0x43d4ce[_0x571ec2];if(!this['_disconnectionOperations']['has'](_0x10a092))return _0x10a092['baseVersion']+0x1-this['_offset'];}return 0x0;}constructor(_0x12b8fb){if(super(_0x12b8fb),this['_offset']=0x0,this['sessionId']=null,this['serverHistory']=new _0x526c43(),this['editor']['config']['define']('collaboration',{}),this['_channelId']=this['editor']['config']['get']('collaboration.channelId'),!this['_channelId'])throw new _0x2b9d7d('collaboration-missing-channelid',this);const _0x3822c3=_0x12b8fb['config']['get']('cloudServices.bundleVersion')||nt;this['_service']=new l['CollaborativeEditingService'](_0x3822c3,this['_channelId']),this['_document']=this['editor']['model']['document'],this['_compressor']=new _0x1e1c7e(),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 _0x544361=this['editor'],_0x59560a=_0x544361['plugins']['get'](_0x32b321),_0x126f99=_0x544361['plugins']['get'](c);this['listenTo'](_0x59560a,'getOperationAuthor',(_0xd7ad76,_0x582b89)=>{const _0xd29005=_0x582b89[0x0];_0xd29005['_authorId']&&(_0xd7ad76['return']=_0x59560a['getUser'](_0xd29005['_authorId']),_0xd7ad76['stop']()),null===_0xd29005['_authorId']&&(_0xd7ad76['return']=null,_0xd7ad76['stop']());},{'priority':'high'}),this['listenTo'](_0x544361['model']['document']['selection'],'change:range',(_0x18f91e,_0x38dcf0)=>{_0x38dcf0['directChange']&&this['_refreshUserSelectionMarkers']();}),this['listenTo'](_0x544361['editing']['view'],'change:hasDomSelection',()=>{this['_refreshUserSelectionMarkers']();}),this['_initThrowingOnDataSet'](),_0x544361['model']['on']('applyOperation',(_0x364c54,_0x5c4fce)=>{const _0x2ac503=_0x5c4fce[0x0];_0x2ac503['isDocumentOperation']&&(this['_saveOperationInBuffer'](_0x2ac503),this['_shouldSendUpdate']()&&this['_sendBufferedOperationsDelayed']());}),this['_setUpDataInit'](),this['bind']('_isEditingAllowed')['to'](_0x126f99,'state',this,'_hasSynchronizationProblem',(_0x21035e,_0x5bd776)=>'connected'===_0x21035e&&!_0x5bd776),this['on']('change:_isEditingAllowed',()=>{this['_isEditingAllowed']?_0x544361['disableReadOnlyMode']('rtc-offline'):_0x544361['enableReadOnlyMode']('rtc-offline');}),this['_isEditingAllowed']?_0x544361['disableReadOnlyMode']('rtc-offline'):_0x544361['enableReadOnlyMode']('rtc-offline'),this['set']('_isConnected',!0x1);}async['reconnect'](){const _0x1a3719=this['editor']['plugins']['get'](r),_0x3b6d5f=this['editor']['plugins']['get'](c);try{this['_isPendingUpdate']=!0x0,_0x1a3719['unregister'](this['_channelId']);const _0x22bc35=await this['_service']['reconnect'](_0x3b6d5f['connection'],this['lastSyncVersion']);await this['_handleReconnectionResponse'](_0x22bc35)&&(this['_isPendingUpdate']=!0x1,this['_clearPendingAction']());const _0x415619=await this['_service']['getConnectedSessions']();_0x1a3719['register'](this['_channelId'],_0x415619),this['_handleSendingSelectionMarkers'](),this['_isConnected']=!0x0;}catch(_0x6942e7){if(function(_0x5aa547){return'404'===_0x5aa547['code'];}(_0x6942e7)&&this['sessionId'])await this['_connectAfterSessionHasBeenFlushed']();else{if(function(_0x45f0c4){return'409'===_0x45f0c4['code'];}(_0x6942e7)){const _0x59c7d0=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'](_0x59c7d0);}else{if(!(_0x6942e7 instanceof J))throw _0x6942e7;this['_handleReconnectionError']();}}}}['destroy'](){const _0x99287d=this['editor']['plugins']['get'](c),_0x5dece4=this['editor']['plugins']['get'](r);this['editor']['enableReadOnlyMode']('rtc-destroyed'),_0x5dece4['channelSessions']['has'](this['_channelId'])&&_0x5dece4['unregister'](this['_channelId']),_0x99287d['removeFromReconnectionStack'](this),this['_disconnectService'](),super['destroy']();}async['_handleReconnectionResponse'](_0x4414f1){if(this['sessionId']!==_0x4414f1['sessionId']&&this['_lastSyncedOperationId']!==_0x4414f1['lastOperationId'])throw new J();return this['sessionId']=_0x4414f1['sessionId'],this['_handleServerResponse']([],{..._0x4414f1,'wereChangesApplied':!0x1,'data':_0x4414f1['data']},'reconnect');}async['_connectService'](_0x487a37,_0x21312e=!0x1){const {connection:_0x1ff9f4}=this['editor']['plugins']['get'](c);l['CollaborativeEditingService']['getConnectedSessions'](_0x1ff9f4,this['_channelId'])['then'](_0x5d200f=>this['_initSessionsHandling'](_0x5d200f))['catch'](_0x5a97ad=>{this['_crash']('realtimecollaborationclient-init-session-connection-error',_0x5a97ad);}),this['listenTo'](this['_service'],'operationsReceived',this['_handleReceivedOperations']['bind'](this)),this['listenTo'](this['_service'],'error',(_0x3479b9,_0x5b0365)=>{this['_crash']('realtimecollaborationclient-initservice-internal-error',_0x5b0365);}),this['listenTo'](this['_service'],'disconnected',()=>{this['_isConnected']=!0x1;});const _0x4d0047=this['_operationIdentifier']['getIdOfTheLastOperation'](_0x487a37);this['_isPendingUpdate']=!0x0;const _0x5d1dea=await this['_service']['connect'](_0x1ff9f4,this['_compressOperations'](_0x487a37),_0x4d0047);if(this['sessionId']=_0x5d1dea['sessionId'],_0x21312e){if(!_0x5d1dea['wereChangesApplied'])return void this['_handleReconnectionError']();this['_isPendingUpdate']=!0x1,this['_clearPendingAction'](),this['serverHistory']['reset'](),this['_offset']=_0x5d1dea['offset'],this['serverHistory']['version']=this['_offset'],await this['_handleServerResponse'](_0x487a37,_0x5d1dea,'reconnection:\x20flushed\x20session');}else await this['_handleInitialConnectionData'](_0x5d1dea,_0x487a37);this['_handleSendingSelectionMarkers'](),this['_isConnected']=!0x0;}['_handleSendingSelectionMarkers'](){const _0x5d87d8=this['editor']['plugins']['get'](r),_0x5b9554=this['editor']['plugins']['get'](H),_0x117eaa=_0x5d87d8['channelSessions']['get'](this['_channelId']);_0x117eaa&&_0x117eaa['length']>0x1?_0x5b9554['createUserMarkerOperations']():this['listenTo'](_0x5d87d8,'sessionAdd:'+this['_channelId'],()=>{0x2===_0x5d87d8['channelSessions']['get'](this['_channelId'])['length']&&_0x5b9554['createUserMarkerOperations']();});}async['_handleReceivedOperations'](_0x3ba8f9,_0xc4d4e7,_0x11a24f,_0x539ddb){if(!this['_isPendingUpdate']&&this['_document']['version']==_0xc4d4e7){const _0x40e450=this['_decompressOperations'](_0x11a24f,_0x539ddb);await this['_fetchMissingUsers'](_0x40e450),this['_handleExternalOperations'](_0x40e450,_0xc4d4e7,_0x11a24f['lastOperationId'])||this['_crash']('realtimecollaborationclient-initservice-incorrect-server-operation');}}async['_connectAfterSessionHasBeenFlushed'](){this['_disconnectService']();const {locale:_0x4bd54d}=this['editor'];let _0x2f4d70;try{_0x2f4d70=await this['_service']['getDocumentDetails']();}catch(_0x37371a){const _0x3e9594=q(_0x4bd54d,'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'](_0x3e9594);}const _0x59e975=_0x2f4d70['currentDocumentSession']||_0x2f4d70['lastDocumentSession'];if(this['_lastSyncedOperationId']===_0x59e975['lastOperationId'])await this['_connectService'](this['editor']['model']['document']['history']['getOperations'](),!0x0);else{const _0x1b6dac=q(_0x4bd54d,'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'](_0x1b6dac);}}['_disconnectService'](){this['_service']['disconnect'](),this['_bufferedOperations']=[],clearTimeout(this['_sendBufferedOperationsDelayId']),this['stopListening'](this['_service']);}['_initSessionsHandling'](_0x184da9){const _0x4e4070=this['editor']['plugins']['get'](r);this['listenTo'](_0x4e4070,'sessionAdd:'+this['_channelId'],(_0x4d5ed5,{session:_0x443fc3})=>{if(_0x443fc3['id']===_0x4e4070['mySessionId']){_0x4d5ed5['off']();const _0x220f57=this['editor']['plugins']['has']('CommentsOnly')&&this['editor']['plugins']['get']('CommentsOnly');let _0x517a13=_0x443fc3['permissions'];_0x220f57&&_0x220f57['isEnabled']&&(_0x517a13=_0x517a13['filter'](_0x32042c=>'document:write'!==_0x32042c)),this['editor']['plugins']['get']('Permissions')['setPermissions'](_0x517a13,this['_channelId']);}}),_0x4e4070['register'](this['_channelId'],_0x184da9);}['_initThrowingOnDataSet'](){const _0xaa6917=this['editor']['data']['set'];this['editor']['data']['set']=(..._0x5cda0e)=>{if(!_0x5cda0e[_0x5cda0e['length']-0x1]['suppressErrorInCollaboration'])throw new _0x2b9d7d('realtimecollaborationclient-editor-setdata-and-editor-data-set-are-forbidden-in-real-time-collaboration',this);_0xaa6917['apply'](this['editor']['data'],_0x5cda0e);};}['_setUpDataInit'](){this['editor']['data']['on']('init',(_0x2944e1,[_0x174441])=>{if(this['_document']['version'])throw new _0x2b9d7d('realtimecollaborationclient-init-document-already-initialized',this);_0x2944e1['stop'](),this['_setPendingAction']();const _0x5b573a=this['editor']['config']['get']('rootsAttributes'),_0x5cca89=this['_getOperationsFromInitData'](_0x174441,_0x5b573a);0x0==_0x5cca89['length']&&_0x5cca89['push'](new _0x17da4a(0x0)),_0x2944e1['return']=this['_connectService'](_0x5cca89)['then'](()=>{this['editor']['plugins']['get'](c)['addToReconnectionStack'](this),this['editor']['data']['fire']('ready');})['catch'](_0x53a762=>this['_crash']('realtimecollaborationclient-init-connection-failed',_0x53a762))['finally'](()=>this['_clearPendingAction']());},{'priority':'high'}),this['editor']['on']('loadRoot',async(_0x3c5a82,[_0x51e788,_0x12aacf])=>{_0x3c5a82['stop']();const _0x3a0a02=this['editor']['model']['document']['getRoot'](_0x51e788);if(!this['_knownRootNames']['has'](_0x51e788)){const _0x141cec=_0x12aacf&&_0x12aacf['data']?_0x12aacf['data']:'',_0x877463=_0x12aacf&&_0x12aacf['attributes']?_0x12aacf['attributes']:{};await this['_loadRoot'](_0x51e788,_0x141cec,_0x877463);}this['editor']['model']['enqueueChange']({'isUndoable':!0x1},()=>{_0x3a0a02['_isLoaded']=!0x0,this['editor']['model']['document']['differ']['_bufferRootLoad'](_0x3a0a02);});},{'priority':'high'});}async['_fetchMissingUsers'](_0x404ebe){const _0x658301=this['editor']['plugins']['get'](_0x32b321),{connection:_0x1b8363}=this['editor']['plugins']['get'](c),_0x1d5424=new Set();for(const _0x53a4e1 of _0x404ebe){const _0x494491=_0x53a4e1['_authorId'];_0x494491&&!_0x658301['getUser'](_0x494491)&&_0x1d5424['add'](_0x494491);}if(0x0===_0x1d5424['size'])return;const _0x52370c=await lt['getMany'](_0x1b8363,Array['from'](_0x1d5424));for(const _0x5a244a of _0x52370c)_0x658301['getUser'](_0x5a244a['id'])||_0x658301['addUser'](_0x5a244a);}['_getOperationsFromInitData'](_0x299377,_0x2a3d0={}){const _0x5dbfe2=this['editor']['model'],_0x232e87=[];let _0x5124f6=0x0;const _0x1b3636='string'==typeof _0x299377?{'main':_0x299377}:_0x299377;for(const _0x1aec0a of Object['keys'](_0x1b3636)){if(!this['_document']['roots']['has'](_0x1aec0a))throw new _0x2b9d7d('realtimecollaborationclient-init-non-existent-root',this);const _0x548ab6=this['editor']['data']['parse'](_0x1b3636[_0x1aec0a]),_0x3173b6=this['_document']['getRoot'](_0x1aec0a),_0x1122ac=new _0x230d2c(_0x5dbfe2['createPositionAt'](_0x3173b6,0x0),_0x548ab6,_0x5124f6++);_0x232e87['push'](_0x1122ac);for(const [_0x8ae4c0,_0x49b50b]of _0x548ab6['markers']){const _0x352681=_0x5dbfe2['createRange'](_0x5dbfe2['createPositionFromPath'](_0x3173b6,_0x49b50b['start']['path']['slice']()),_0x5dbfe2['createPositionFromPath'](_0x3173b6,_0x49b50b['end']['path']['slice']())),_0xf474e=new _0x2ca1bf(_0x8ae4c0,null,_0x352681,_0x5dbfe2['markers'],!0x0,_0x5124f6++);_0x232e87['push'](_0xf474e);}}if(_0x2a3d0)for(const [_0xc1aa51,_0x22d27a]of Object['entries'](_0x2a3d0)){const _0x363bbf=_0x5dbfe2['document']['getRoot'](_0xc1aa51);if(!_0x363bbf)throw new _0x2b9d7d('multi-root-editor-root-attributes-no-root',null);for(const [_0x1ae01c,_0x249f88]of Object['entries'](_0x22d27a))if(null!==_0x249f88){const _0x2aba17=new _0x1a1d5c(_0x363bbf,_0x1ae01c,null,_0x249f88,_0x5124f6++);_0x232e87['push'](_0x2aba17);}}return _0x232e87;}async['_loadRoot'](_0x38f46f,_0x2efe81,_0xe78e15){this['_getOperationsFromInitData']({[_0x38f46f]:_0x2efe81},{[_0x38f46f]:_0xe78e15})['forEach']((_0x359ed6,_0x3692bb)=>{_0x359ed6['baseVersion']=this['_document']['version']+_0x3692bb,_0x359ed6['_isInit']=!0x0,this['_saveOperationInBuffer'](_0x359ed6);}),this['_sendBufferedOperationsDelayed'](),await this['_waitUntilSynced']();}async['_handleInitialConnectionData'](_0x4a2c58,_0x27af56){let _0x2d5c36;this['_offset']=_0x4a2c58['offset'];const _0x5717b9=_0x4a2c58['wereChangesApplied']&&!_0x4a2c58['initData'],_0x9625c=_0x5717b9?0x0:_0x4a2c58['data']['baseVersion'];if(_0x27af56['forEach'](_0x22ec6e=>{_0x22ec6e['_isInit']=!0x0,_0x22ec6e['createdAt']=_0x4a2c58['sessionCreatedAt'],_0x22ec6e['_authorId']=null;}),_0x5717b9)_0x2d5c36=_0x27af56,this['_applyOperationsSet'](_0x2d5c36,_0x5717b9);else{if(_0x4a2c58['initData']){const _0x24116f=this['_getOperationsFromInitData'](_0x4a2c58['initData']);this['_document']['history']['version']=-_0x24116f['length'],_0x24116f['forEach'](_0x5ba9a1=>{_0x5ba9a1['baseVersion']-=_0x24116f['length'],_0x5ba9a1['createdAt']=_0x4a2c58['sessionCreatedAt'],_0x5ba9a1['_isInit']=!0x0,_0x5ba9a1['_authorId']=null;}),this['_applyOperationsSet'](_0x24116f,!0x0),this['serverHistory']['version']=-_0x24116f['length']+this['_offset'],this['_updateServerHistory'](_0x24116f);}this['_document']['history']['version']=_0x9625c,_0x2d5c36=this['_decompressOperations'](_0x4a2c58['data'],_0x4a2c58['metadata']),await this['_fetchMissingUsers'](_0x2d5c36),this['_applyOperationsSet'](_0x2d5c36,_0x5717b9);}_0x4a2c58['lastOperationId']&&(this['_operationIdentifier']['setIdForTheLastOperation'](_0x2d5c36,_0x4a2c58['lastOperationId']),this['_lastSyncedOperationId']=_0x4a2c58['lastOperationId']),this['serverHistory']['version']=_0x9625c+this['_offset'],this['_updateServerHistory'](_0x2d5c36),_0x27af56['filter'](_0xeb6ded=>{const _0x2b65dd=this['_getAffectedRoot'](_0xeb6ded);return _0x2b65dd&&!this['_knownRootNames']['has'](_0x2b65dd);})['forEach']((_0x2fab7d,_0x2647fa)=>{_0x2fab7d['baseVersion']=this['_document']['version']+_0x2647fa,this['_saveOperationInBuffer'](_0x2fab7d);}),this['_shouldSendUpdate']()?(this['_currentBufferDelay']=0x0,this['_sendBufferedOperationsDelayed'](!0x0),await this['_waitUntilSynced']()):(this['_isPendingUpdate']=!0x1,this['_clearPendingAction']());}['_crash'](_0x4486cd,_0x447174){throw this['_isPendingUpdate']=!0x0,_0x447174&&console['error'](_0x447174),new _0x2b9d7d(_0x4486cd,this['editor']);}['_saveOperationInBuffer'](_0x121664){this['_knownOperations']['has'](_0x121664)||(this['_knownOperations']['add'](_0x121664),this['_bufferedOperations']['push'](_0x121664),this['_pendingAction']||'marker'==_0x121664['type']&&!_0x121664['affectsData']||this['_setPendingAction']());}['_sendBufferedOperationsDelayed'](_0x28f844=!0x1){!_0x28f844&&this['_isPendingUpdate']||(this['_isPendingUpdate']=!0x0,clearTimeout(this['_sendBufferedOperationsDelayId']),this['_sendBufferedOperationsDelayId']=setTimeout(()=>{this['_sendBufferedOperations']()['then'](_0x295e62=>{_0x295e62&&(this['_clearPendingAction'](),this['_isPendingUpdate']=!0x1);})['catch'](_0x23ae98=>{if(this['_clearPendingAction'](),this['_isPendingUpdate']=!0x1,!function(_0x31b2d7){return _0x31b2d7['message']['startsWith']('cloud-services-internal-error:\x20Not\x20connected.')||_0x31b2d7['message']['startsWith']('cloud-services-internal-error:\x20Collaborative\x20Editing\x20Service\x20is\x20not\x20connected.')||_0x31b2d7['message']['startsWith']('cloud-services-internal-error:\x20Request\x20timeout.');}(_0x23ae98))throw _0x23ae98;});},this['_currentBufferDelay']));}['_waitUntilSynced'](){return new Promise(_0xb1aa3a=>{this['on']('change:_isPendingUpdate',()=>{_0xb1aa3a();});});}async['_sendBufferedOperations'](){const _0x33955e=this['editor']['plugins']['get'](H);if(this['_shouldSendSelectionUpdate']()&&(_0x33955e['createUserMarkerOperations'](),this['_hasSelectionChanged']=!0x1),!this['_shouldSendUpdate']())return!0x0;const _0x4b0b45=[...this['_bufferedOperations']];for(const _0x2c917b of _0x4b0b45)_0x2c917b['wasUndone']=this['_document']['history']['isUndoneOperation'](_0x2c917b);const _0x3216e5=this['_operationIdentifier']['getIdOfTheLastOperation'](_0x4b0b45),_0x42f79b=K++,_0x344af1=this['_compressOperations'](_0x4b0b45),_0x191b1e=await this['_service']['sendOperations'](_0x344af1,_0x344af1['baseVersion'],_0x3216e5);try{return await this['_handleServerResponse'](_0x4b0b45,_0x191b1e,_0x42f79b);}catch(_0x4f7219){return this['_crash']('realtimecollaborationclient-sendbufferedoperations',_0x4f7219);}}async['_handleServerResponse'](_0x2935ea,_0x176a97,_0x5420b9){if('error'in _0x176a97)throw _0x176a97['error'];let _0x232e4f=!0x1;if(_0x176a97['wereChangesApplied']){_0x176a97['lastOperationId']&&(this['_lastSyncedOperationId']=_0x176a97['lastOperationId']),this['_bufferedOperations']=this['_bufferedOperations']['filter'](_0x1a2ff5=>!_0x2935ea['includes'](_0x1a2ff5));for(const _0x1ee38e of _0x2935ea)_0x1ee38e['createdAt']='lastOperationAcceptedAt'in _0x176a97&&_0x176a97['lastOperationAcceptedAt']||void 0x0;Q(_0x2935ea,_0x176a97['version']-_0x2935ea['length']),this['_updateServerHistory'](_0x2935ea);const _0x468a99=_0x2935ea['filter'](_0x5b5ffa=>{if(!_0x5b5ffa['_isInit'])return!0x1;const _0x1ca794=this['_getAffectedRoot'](_0x5b5ffa);return _0x1ca794&&!this['_knownRootNames']['has'](_0x1ca794);});Q(_0x468a99,this['_document']['version']),this['_applyOperationsSet'](_0x468a99),_0x232e4f=!0x0,this['_currentBufferDelay']=this['_baseBufferDelay'];}else{const _0x3bf93b=this['_decompressOperations'](_0x176a97['data'],_0x176a97['metadata'])['filter'](_0x389843=>_0x389843['baseVersion']>=this['_lastServerVersion']);_0x3bf93b['forEach'](_0x5a6710=>this['_addKnownRoot'](_0x5a6710)),this['_bufferedOperations']=this['_bufferedOperations']['filter'](_0x279e04=>!_0x279e04['_isInit']||!this['_knownRootNames']['has'](this['_getAffectedRoot'](_0x279e04))),this['_bufferedOperations']['length']&&Q(this['_bufferedOperations'],this['_bufferedOperations'][0x0]['baseVersion']),await this['_fetchMissingUsers'](_0x3bf93b),_0x232e4f=this['_handleExternalOperations'](_0x3bf93b,_0x176a97['version'],_0x176a97['lastOperationId']),this['_currentBufferDelay']=Math['round'](this['_currentBufferDelay']/0x2);}return _0x232e4f?!this['_shouldSendUpdate']()||(this['_sendBufferedOperationsDelayed'](!0x0),!0x1):this['_crash']('realtimecollaborationclient-handleserverresponse');}['_handleExternalOperations'](_0x4e270c,_0x55d799,_0x1d1831){try{const _0x3ba55b={'document':this['_document'],'useRelations':!0x1,'padWithNoOps':!0x0},{operationsA:_0x1f97e6,operationsB:_0x536263,originalOperations:_0x36cd2d}=_0x111bed(_0x4e270c,this['_bufferedOperations'],_0x3ba55b);Q(_0x1f97e6,this['_document']['version']),Q(_0x536263,_0x55d799);for(const _0x162f78 of _0x1f97e6){const _0x3fc90f=_0x36cd2d['get'](_0x162f78);_0x162f78['_authorId']=_0x3fc90f?_0x3fc90f['_authorId']:null;}_0x1d1831&&(this['_operationIdentifier']['setIdForTheLastOperation'](_0x4e270c,_0x1d1831),this['_lastSyncedOperationId']=_0x1d1831),this['_bufferedOperations']=[..._0x536263],this['_applyOperationsSet'](_0x1f97e6),this['_updateServerHistory'](_0x4e270c);}catch(_0x1530b0){return console['error'](_0x1530b0),!0x1;}return!0x0;}['_applyOperationsSet'](_0x9b9842,_0x8074bb=!0x1){this['editor']['model']['enqueueChange']({'isUndoable':!0x1,'isLocal':!0x1},_0x5db559=>{for(const _0x14dfe4 of _0x9b9842)this['_knownOperations']['add'](_0x14dfe4),this['_addKnownRoot'](_0x14dfe4),_0x5db559['batch']['addOperation'](_0x14dfe4),this['editor']['model']['applyOperation'](_0x14dfe4);});}['_addKnownRoot'](_0x37f6c3){const _0x4e64be=this['_getAffectedRoot'](_0x37f6c3);_0x4e64be&&this['_knownRootNames']['add'](_0x4e64be);}['_getAffectedRoot'](_0x5a53cf){let _0x2bbc84,_0xf952b6;switch(_0x5a53cf['type']){case'insert':_0x2bbc84=_0x5a53cf['position']['root'];break;case'marker':if(_0xf952b6=_0x5a53cf['newRange'],!_0xf952b6)return null;_0x2bbc84=_0xf952b6['root'];break;case'addRootAttribute':_0x2bbc84=_0x5a53cf['root'];break;case'addRoot':_0x2bbc84=_0x5a53cf['affectedSelectable'];break;case'move':_0x2bbc84=_0x5a53cf['targetPosition']['root'];break;default:return null;}return _0x2bbc84['rootName'];}['_updateServerHistory'](_0x4108d4){_0x4108d4['forEach'](_0x45a7d1=>{const _0x3db514=_0x45a7d1['clone']();_0x3db514['_authorId']=_0x45a7d1['_authorId'],_0x3db514['_isInit']=!!_0x45a7d1['_isInit'],_0x3db514['createdAt']=_0x45a7d1['createdAt'],_0x3db514['baseVersion']+=this['_offset'],_0x45a7d1['_isDisconnection']&&this['_disconnectionOperations']['add'](_0x3db514),this['serverHistory']['addOperation'](_0x3db514);});}['_handleReconnectionError'](_0x551964){const _0x1ae803=this['editor']['plugins']['get']('Notification'),_0x790ef4=this['editor']['locale'];_0x551964||(_0x551964=q(_0x790ef4,'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.')),_0x1ae803['showWarning'](_0x551964,{'title':q(_0x790ef4,'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'](_0x533628)['add'](q(this['editor']['locale'],'PENDING_ACTION_SENDING_DATA')));}['_clearPendingAction'](){this['_pendingAction']&&(this['editor']['plugins']['get'](_0x533628)['remove'](this['_pendingAction']),this['_pendingAction']=null);}['_compressOperations'](_0x103fb4){const _0x40776d=_0x103fb4['map'](_0x158dcb=>_0x158dcb['toJSON']());return this['_compressor']['compress'](_0x40776d);}['_decompressOperations'](_0x53d65a,_0x3252ae){return this['_compressor']['decompress'](_0x53d65a)['map']((_0x37af5a,_0x1594a5)=>{const _0x441279='init'==_0x3252ae[_0x1594a5]['type'];if('InsertOperation'==_0x37af5a['__className']){const _0x58715a=_0x37af5a['position']['root'];!this['_document']['getRoot'](_0x58715a)&&(this['_document']['createRoot']('$root',_0x58715a)['_isAttached']=!0x1);}const _0x14919d=_0x595f16['fromJSON'](_0x37af5a,this['_document']);return _0x14919d['wasUndone']=_0x37af5a['wasUndone'],_0x14919d['_isInit']=_0x441279,_0x14919d['_authorId']=_0x441279?null:_0x3252ae[_0x1594a5]['userId'],_0x14919d['_isDisconnection']='cs:removeUser'===_0x3252ae[_0x1594a5]['type'],_0x14919d['createdAt']=_0x3252ae[_0x1594a5]['createdAt'],_0x14919d;});}['_refreshUserSelectionMarkers'](){this['_hasSelectionChanged']=!0x0,this['_shouldSendSelectionUpdate']()?this['_sendBufferedOperationsDelayed']():this['_hasSelectionChanged']=!0x1;}['_shouldSendSelectionUpdate'](){const _0x20b727=this['editor']['plugins']['get'](r)['channelSessions']['get'](this['_channelId']);return!this['editor']['isReadOnly']&&!!_0x20b727&&_0x20b727['length']>0x1&&this['_hasSelectionChanged'];}['_shouldSendUpdate'](){return this['_bufferedOperations']['length']>0x0||this['_shouldSendSelectionUpdate']();}}class J extends Error{}function Q(_0x5af67a,_0x4885f8){for(const _0x4904f8 of _0x5af67a)_0x4904f8['baseVersion']=_0x4885f8++;}class X{['_ignoredOperations'];['_operationToId'];constructor(_0x1747f4){this['_ignoredOperations']=_0x1747f4,this['_operationToId']=new WeakMap();}['getIdOfTheLastOperation'](_0x429edf){let _0x55220a=_0x429edf['length'];for(;_0x55220a--;){const _0x1b45a7=_0x429edf[_0x55220a];if(!this['_ignoredOperations']['has'](_0x1b45a7)){if(!this['_operationToId']['has'](_0x1b45a7)){const _0x60e8f1=_0x4002ff()['slice'](0x1,0x12);this['_operationToId']['set'](_0x1b45a7,_0x60e8f1);}return this['_operationToId']['get'](_0x1b45a7);}}}['setIdForTheLastOperation'](_0x514936,_0x1ab522){if(!_0x1ab522)return;let _0x242b4d=_0x514936['length'];for(;_0x242b4d--;){const _0x5bb7fb=_0x514936[_0x242b4d];this['_ignoredOperations']['has'](_0x5bb7fb)||this['_operationToId']['set'](_0x5bb7fb,_0x1ab522);}}}class n extends _0x20e9b2{static get['requires'](){return[l];}static get['pluginName'](){return'RealTimeCollaborativeEditing';}}class a extends _0x497d5d{static ['CommentsService']=/* #__PURE__ -- @preserve */
|
|
26
|
+
((()=>_0x345a6d)());['_services'];static get['requires'](){return[c,'CommentsRepository',r,_0x32b321];}static get['pluginName'](){return'CloudServicesCommentsAdapter';}constructor(_0x15dc17){super(_0x15dc17),this['_services']=new Map();}async['init'](){const _0xb0b1db=this['context'],_0x10c67e=_0xb0b1db['plugins']['get']('CommentsRepository');if(_0xb0b1db['plugins']['get'](c)['addToReconnectionStack'](this),_0x10c67e['adapter']={'addCommentThread':async({channelId:_0x41537f,threadId:_0x44cd9e,comments:_0x585087,resolvedAt:_0x2661e5,resolvedBy:_0x57aa7c,context:_0x54ea21,attributes:_0x3ba52c})=>{const _0x4e244b=await this['_getService'](_0x41537f)['addCommentThread']({'commentThreadId':_0x44cd9e,'comments':_0x585087['map'](_0x5acbc8=>function(_0x2ce4f9,_0x51bbd1,_0x38fe73){return{'commentThreadId':_0x38fe73,'commentId':_0x2ce4f9['commentId'],'userId':_0x2ce4f9['authorId'],'content':_0x2ce4f9['content'],'documentId':_0x51bbd1,'createdAt':_0x2ce4f9['createdAt'],'attributes':_0x2ce4f9['attributes']||{}};}(_0x5acbc8,_0x41537f,_0x44cd9e)),'resolvedAt':_0x2661e5,'resolvedBy':_0x57aa7c,'context':_0x54ea21,'attributes':_0x3ba52c})['catch'](ut);return{'threadId':_0x4e244b['commentThreadId'],'comments':_0x4e244b['comments']};},'getCommentThread':async({channelId:_0x1d575e,threadId:_0xd5058f})=>{const _0x3b69d1=await this['_getService'](_0x1d575e)['getCommentThread'](_0xd5058f)['catch'](ut);return _0x3b69d1['deletedAt']?null:(await this['_fetchMissingUsersForThreads']([_0x3b69d1]),{'threadId':_0x3b69d1['commentThreadId'],'comments':_0x3b69d1['comments']['map'](b),'context':_0x3b69d1['context'],'resolvedAt':_0x3b69d1['resolvedAt'],'resolvedBy':_0x3b69d1['resolvedBy'],'attributes':_0x3b69d1['attributes']||{}});},'updateCommentThread':async({channelId:_0x4bbeaa,threadId:_0x5d42cb,context:_0x3cf974,unlinkedAt:_0x1383bd,attributes:_0x3742cb})=>this['_getService'](_0x4bbeaa)['updateCommentThread']({'commentThreadId':_0x5d42cb,'context':_0x3cf974,'attributes':_0x3742cb,'unlinkedAt':_0x1383bd})['catch'](y)['catch'](ut),'resolveCommentThread':async({channelId:_0x34cd78,threadId:_0x180b3a})=>{const _0x4f124f=await this['_getService'](_0x34cd78)['resolveCommentThread'](_0x180b3a)['catch'](y)['catch'](ut);return{'threadId':_0x4f124f['commentThreadId'],'resolvedAt':_0x4f124f['resolvedAt'],'resolvedBy':_0x4f124f['resolvedBy']};},'reopenCommentThread':async({channelId:_0x503dfb,threadId:_0x42c68f})=>this['_getService'](_0x503dfb)['reopenCommentThread'](_0x42c68f)['catch'](y)['catch'](ut),'removeCommentThread':({channelId:_0x4701fa,threadId:_0x2524e0})=>this['_getService'](_0x4701fa)['removeCommentThread'](_0x2524e0)['catch'](y)['catch'](ut),'addComment':({channelId:_0x4700b7,threadId:_0x256127,commentId:_0x413148,content:_0x250793,attributes:_0x57732c})=>this['_getService'](_0x4700b7)['addComment'](_0x256127,_0x413148,_0x250793,_0x57732c)['catch'](ut),'updateComment':({channelId:_0x6e6a8,threadId:_0xf1611,commentId:_0x56c62a,content:_0x287a02,attributes:_0x3bd205})=>this['_getService'](_0x6e6a8)['updateComment'](_0xf1611,_0x56c62a,_0x287a02,_0x3bd205)['catch'](y)['catch'](ut),'removeComment':({channelId:_0x35d02f,threadId:_0x196e62,commentId:_0x523040})=>this['_getService'](_0x35d02f)['removeComment'](_0x196e62,_0x523040)['catch'](y)['catch'](ut)},_0xb0b1db instanceof _0x3ff874){const _0x564536=_0xb0b1db['config']['get']('collaboration.channelId'),_0x89a570=_0xb0b1db['plugins']['get'](r);await this['_setUpService'](_0x564536);const _0x706589=await this['_services']['get'](_0x564536)['getConnectedSessions']();this['listenTo'](_0x89a570,'sessionAdd:'+_0x564536,(_0x130544,{session:_0x27b94b})=>{_0x27b94b['id']===_0x89a570['mySessionId']&&(_0x130544['off'](),this['context']['plugins']['get']('Permissions')['setPermissions'](_0x27b94b['permissions'],_0x564536));}),_0x89a570['register'](_0x564536,_0x706589);}}async['_setUpService'](_0x2a767a){if(this['_services']['has'](_0x2a767a))throw new _0x2b9d7d('cloudservicescommentsadapter-connect-already-connected',null,{'channelId':_0x2a767a});const _0x1c0805=this['context']['plugins']['get']('CommentsRepository'),_0x59afd1=new a['CommentsService'](_0x2a767a);this['_services']['set'](_0x2a767a,_0x59afd1),this['listenTo'](_0x59afd1,'commentThreadAdded',(_0x390c1c,_0x268f4d)=>{const {commentThreadId:_0x13129f,documentId:_0x74c46,context:_0x35cdb8,attributes:_0x2d71fe,resolvedAt:_0x5313a3,resolvedBy:_0xaa1e73,comments:_0x569b4b}=_0x268f4d;_0x1c0805['getCommentThread'](_0x13129f)||_0x1c0805['addCommentThread']({'threadId':_0x13129f,'channelId':_0x74c46,'comments':_0x569b4b?_0x569b4b['map'](b):[],'context':_0x35cdb8,'attributes':_0x2d71fe,'resolvedAt':_0x5313a3,'resolvedBy':_0xaa1e73,'isFromAdapter':!0x0});}),this['listenTo'](_0x59afd1,'commentThreadUpdated',(_0x360440,{commentThreadId:_0x168a5f,documentId:_0x4f9b2b,context:_0x3009e4,unlinkedAt:_0xbf80ae,attributes:_0x2396a6})=>{_0x1c0805['getCommentThread'](_0x168a5f)&&_0x1c0805['updateCommentThread']({'threadId':_0x168a5f,'channelId':_0x4f9b2b,'context':_0x3009e4,'unlinkedAt':_0xbf80ae,'attributes':_0x2396a6,'isFromAdapter':!0x0});}),this['listenTo'](_0x59afd1,'commentThreadResolved',(_0x427f9f,{commentThreadId:_0x2070b6,resolvedBy:_0x3963a9,resolvedAt:_0x326d46})=>{const _0x56f7df=_0x1c0805['getCommentThread'](_0x2070b6);_0x56f7df&&_0x56f7df['resolve']({'resolvedBy':_0x3963a9,'resolvedAt':_0x326d46,'isFromAdapter':!0x0});}),this['listenTo'](_0x59afd1,'commentThreadReopened',(_0x3d5e8a,{commentThreadId:_0x31e473})=>{const _0x7e3b99=_0x1c0805['getCommentThread'](_0x31e473);_0x7e3b99&&_0x7e3b99['reopen']({'isFromAdapter':!0x0});}),this['listenTo'](_0x59afd1,'commentThreadRemoved',(_0x509396,{commentThreadId:_0xe0cc5})=>{const _0x5aa6a2=_0x1c0805['getCommentThread'](_0xe0cc5);_0x5aa6a2&&_0x5aa6a2['remove']({'isFromAdapter':!0x0});}),this['listenTo'](_0x59afd1,'commentAdded',(_0x2a0f3a,_0x103a3d)=>{const _0x47a486=_0x103a3d['commentThreadId'],_0x3692eb=_0x1c0805['getCommentThread'](_0x47a486);_0x3692eb&&_0x3692eb['addComment']({...b(_0x103a3d),'isFromAdapter':!0x0});}),this['listenTo'](_0x59afd1,'commentUpdated',(_0x3e130a,{commentThreadId:_0x496223,commentId:_0x79ff47,content:_0x497d85,attributes:_0x3119c5})=>{const _0x2996fd=_0x1c0805['getCommentThread'](_0x496223);if(_0x2996fd){const _0x2d512f=_0x2996fd['getComment'](_0x79ff47);_0x2d512f&&_0x2d512f['update']({'content':_0x497d85,'attributes':_0x3119c5,'isFromAdapter':!0x0});}}),this['listenTo'](_0x59afd1,'commentRemoved',(_0x1a09b8,{commentThreadId:_0x3d0391,commentId:_0x42f26d})=>{const _0x4d5bec=_0x1c0805['getCommentThread'](_0x3d0391);if(_0x4d5bec){const _0x129cf7=_0x4d5bec['getComment'](_0x42f26d);_0x129cf7&&_0x129cf7['remove']({'isFromAdapter':!0x0});}}),await this['_connectService'](_0x2a767a);}['destroy'](){if(this['context']instanceof _0x3ff874){const _0x5429e1=this['context']['config']['get']('collaboration.channelId');this['_terminateService'](_0x5429e1);}}['_terminateService'](_0x12c036){if(!this['_services']['has'](_0x12c036))throw new _0x2b9d7d('cloudservicescommentsadapter-disconnect-not-exist',null,{'channelId':_0x12c036});this['_getService'](_0x12c036)['disconnect'](),this['_services']['delete'](_0x12c036);}async['reconnect'](){for(const _0x58d369 of this['_services']['keys']())await this['_connectService'](_0x58d369);if(this['context']instanceof _0x3ff874){const _0x242a38=this['context']['config']['get']('collaboration.channelId'),_0x4b810c=this['context']['plugins']['get'](r);_0x4b810c['unregister'](_0x242a38);const _0x1f2448=await this['_services']['get'](_0x242a38)['getConnectedSessions']();_0x4b810c['register'](_0x242a38,_0x1f2448);}}async['_connectService'](_0x18192f){const {connection:_0x13fd46}=this['context']['plugins']['get'](c),_0x5c6505=this['context']['plugins']['get']('CommentsRepository'),_0x817e5e=this['_services']['get'](_0x18192f),_0x49602c=await _0x817e5e['connect'](_0x13fd46);await this['_fetchMissingUsersForThreads'](_0x49602c);const _0x3038ee=new Set(Array['from'](_0x5c6505['getCommentThreads']({'channelId':_0x18192f}),_0x2850a5=>_0x2850a5['id']));for(const _0xc6d9c6 of _0x49602c)_0xc6d9c6['deletedAt']||_0x3038ee['delete'](_0xc6d9c6['commentThreadId']);for(const _0x1c6fa7 of _0x3038ee)_0x5c6505['getCommentThread'](_0x1c6fa7)['remove']({'isFromAdapter':!0x0});for(const _0x3e9b4b of _0x49602c){let _0x471776=_0x5c6505['getCommentThread'](_0x3e9b4b['commentThreadId']);const {commentThreadId:_0x5edbcf,context:_0x4968fb,attributes:_0x3a9d7f,resolvedBy:_0x522641,resolvedAt:_0x5ae24e,unlinkedAt:_0x2c5618,deletedAt:_0x3f0329}=_0x3e9b4b;if(_0x3f0329)continue;_0x471776||(_0x471776=_0x5c6505['addCommentThread']({'channelId':_0x18192f,'threadId':_0x5edbcf,'context':_0x4968fb,'attributes':_0x3a9d7f||{},'resolvedBy':_0x522641,'resolvedAt':_0x5ae24e,'unlinkedAt':_0x2c5618,'isFromAdapter':!0x0}));const _0x191346=new Set(Array['from'](_0x471776['comments'],_0x4096de=>_0x4096de['id']));for(const _0x5364fe of _0x3e9b4b['comments'])_0x191346['delete'](_0x5364fe['commentId']);for(const _0x5651f4 of _0x191346)_0x471776['getComment'](_0x5651f4)['remove']({'isFromAdapter':!0x0});for(const _0xa40987 of _0x3e9b4b['comments']){const _0x32b3b5=_0x471776['getComment'](_0xa40987['commentId']);_0x32b3b5?_0x32b3b5['content']!==_0xa40987['content']&&_0x32b3b5['update']({'content':_0xa40987['content'],'isFromAdapter':!0x0}):_0x471776['addComment'](Object['assign'](b(_0xa40987),{'isFromAdapter':!0x0}));}}}['_getService'](_0x4fb784){if(!this['_services']['has'](_0x4fb784))throw new _0x2b9d7d('cloudservicescommentsadapter-service-not-exist',null,{'channelId':_0x4fb784});return this['_services']['get'](_0x4fb784);}async['_fetchMissingUsersForThreads'](_0x23851d){const _0x12fa2d=this['context']['plugins']['get'](_0x32b321),{connection:_0xb39c2f}=this['context']['plugins']['get'](c),_0x5140af=new Set();for(const {resolvedBy:_0x9b69f6,comments:_0x4982bd}of _0x23851d){_0x9b69f6&&!_0x12fa2d['getUser'](_0x9b69f6)&&_0x5140af['add'](_0x9b69f6);for(const {userId:_0x44f462}of _0x4982bd)_0x12fa2d['getUser'](_0x44f462)||_0x5140af['add'](_0x44f462);}if(0x0===_0x5140af['size'])return;const _0x28c2b9=await lt['getMany'](_0xb39c2f,Array['from'](_0x5140af));for(const _0x3d31e7 of _0x28c2b9)_0x12fa2d['getUser'](_0x3d31e7['id'])||_0x12fa2d['addUser'](_0x3d31e7);}}async function y(_0xe8770c){if('404'!==_0xe8770c['code'])throw _0xe8770c;}function ut(_0x42d901){if((_0x57e3c0=_0x42d901)['message']['startsWith']('cloud-services-internal-error:\x20Comments\x20Service\x20is\x20not\x20connected.')||_0x57e3c0['message']['startsWith']('cloud-services-internal-error:\x20Not\x20connected.')||_0x57e3c0['message']['startsWith']('cloud-services-internal-error:\x20Request\x20timeout.'))return new Promise(()=>{});var _0x57e3c0;throw _0x42d901;}function b(_0xbf1630){return{'threadId':_0xbf1630['commentThreadId'],'commentId':_0xbf1630['commentId'],'content':_0xbf1630['content'],'createdAt':_0xbf1630['createdAt'],'authorId':_0xbf1630['userId'],'attributes':_0xbf1630['attributes']||{}};}class g extends _0x20e9b2{static ['TrackChangesService']=/* #__PURE__ -- @preserve */
|
|
27
|
+
((()=>et)());['_bufferedRequests'];['_trackChangesService'];static get['requires'](){return[a,'TrackChangesEditing',c];}constructor(_0x3b3c4d){super(_0x3b3c4d);const _0x48f06c=this['editor']['config']['get']('collaboration.channelId');this['_bufferedRequests']=new Map(),this['_trackChangesService']=new g['TrackChangesService'](_0x48f06c);}['init'](){const _0xefc757=this['editor']['plugins']['get'](c),_0x43d168=this['editor']['plugins']['get']('TrackChangesEditing');return _0x43d168['adapter']={'getSuggestion':async _0x1b60ae=>{await this['_waitForServiceReady']();const _0x31fe0a=await this['_trackChangesService']['get'](_0x1b60ae)['catch'](w);return await this['_fetchMissingUsersForThreads']([_0x31fe0a]),_0x31fe0a;},'addSuggestion':async({id:_0xd1c25d,type:_0x2ea148,data:_0x1cab93,originalSuggestionId:_0x349604,attributes:_0x408283})=>{await this['_waitForServiceReady']();const _0x362faa={'id':_0xd1c25d,'type':_0x2ea148,'data':_0x1cab93,'originalSuggestionId':_0x349604,'attributes':_0x408283},_0x1b59cc=await this['_trackChangesService']['add'](_0xd1c25d,_0x2ea148,_0x1cab93,_0x349604,_0x408283)['catch'](_0x598b5e=>{if(ft(_0x598b5e))return new Promise(_0x408a83=>{this['_bufferedRequests']['set'](_0xd1c25d,{'resolve':_0x408a83,'suggestionData':_0x362faa});});throw _0x598b5e;});return this['_bufferedRequests']['delete'](_0xd1c25d),_0x1b59cc;},'updateSuggestion':async(_0x48a063,_0x111eb9)=>{if(await this['_waitForServiceReady'](),'open'!==_0x111eb9['state'])return this['_trackChangesService']['update'](_0x48a063,_0x111eb9)['catch'](w);}},this['listenTo'](this['_trackChangesService'],'suggestionUpdated',(_0x4c23eb,_0x1def8a)=>{_0x43d168['hasSuggestion'](_0x1def8a['id'])&&(_0x43d168['getSuggestion'](_0x1def8a['id'])['attributes']=_0x1def8a['attributes']);}),this['_trackChangesService']['connect'](_0xefc757['connection'])['then'](_0x238cc6=>(_0xefc757['addToReconnectionStack'](this),this['_fetchMissingUsersForThreads'](_0x238cc6)['then'](()=>{for(const _0x48884e of _0x238cc6){_0x43d168['addSuggestionData'](_0x48884e)['_saved']=!0x0;}})));}async['reconnect'](){const _0x1cd6db=this['editor']['plugins']['get']('TrackChangesEditing'),{connection:_0x2f9d2b}=this['editor']['plugins']['get'](c),_0x48d401=await this['_trackChangesService']['connect'](_0x2f9d2b);await this['_fetchMissingUsersForThreads'](_0x48d401);for(const {suggestionData:_0x1b1778,resolve:_0xf64805}of this['_bufferedRequests']['values']()){let _0x38c7bf=_0x48d401['find'](_0x56a05c=>_0x56a05c['id']===_0x1b1778['id']);_0x38c7bf||(_0x38c7bf=await this['_trackChangesService']['add'](_0x1b1778['id'],_0x1b1778['type'],_0x1b1778['data'],_0x1b1778['originalSuggestionId'])),_0xf64805(_0x38c7bf);}for(const _0x70a0b8 of _0x48d401)_0x1cd6db['hasSuggestion'](_0x70a0b8['id'])||_0x1cd6db['addSuggestionData'](_0x70a0b8);}async['_waitForServiceReady'](){this['_trackChangesService']['isConnected']||await new Promise(_0x54a39d=>{this['listenTo'](this['_trackChangesService'],'connected',_0x5b0a94=>{_0x5b0a94['off'](),_0x54a39d();});});}async['_fetchMissingUsersForThreads'](_0x24a2c6){const _0x556693=this['editor']['plugins']['get'](_0x32b321),{connection:_0x4b2a7e}=this['editor']['plugins']['get'](c),_0xc0d974=new Set();for(const {authorId:_0x180b46}of _0x24a2c6)_0x556693['getUser'](_0x180b46)||_0xc0d974['add'](_0x180b46);if(0x0===_0xc0d974['size'])return;const _0x59275f=await lt['getMany'](_0x4b2a7e,Array['from'](_0xc0d974));for(const _0x41e613 of _0x59275f)_0x556693['getUser'](_0x41e613['id'])||_0x556693['addUser'](_0x41e613);}}function w(_0xe44f69){if(ft(_0xe44f69))return new Promise(()=>{});throw _0xe44f69;}function ft(_0xbd4975){return _0xbd4975['message']['startsWith']('cloud-services-internal-error:\x20Not\x20connected.')||_0xbd4975['message']['startsWith']('cloud-services-internal-error:\x20Request\x20timeout.');}class m extends _0x20e9b2{static get['requires'](){return['Comments',a,n,c];}static get['pluginName'](){return'RealTimeCollaborativeComments';}['init'](){const _0xf03af3=this['editor']['plugins']['get'](c),_0x1e3762=this['editor']['plugins']['get']('CommentsEditing'),_0x2cf923=this['editor']['plugins']['get'](a);return this['editor']['data']['once']('ready',()=>{this['listenTo'](_0xf03af3,'change:state',(_0x2ad15a,_0x4a5eaf,_0x1908c3)=>{_0x1e3762['isThreadsLoadingPaused']='connected'!==_0x1908c3;});}),this['listenTo'](_0xf03af3,'change:state',(_0xd4ca2f,_0x4d24af,_0x9d61ce)=>{this['editor']['plugins']['get']('CommentsRepository')['switchReadOnly']('connected'!==_0x9d61ce);}),_0x2cf923['_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 _0x20e9b2{static get['requires'](){return[m,g,'TrackChanges'];}static get['pluginName'](){return'RealTimeCollaborativeTrackChanges';}}class v extends _0x20e9b2{static ['RevisionHistoryService']=/* #__PURE__ -- @preserve */
|
|
28
|
+
((()=>it)());['_lastRequestId'];['_revisionTracker'];['_revisionHistoryService'];['_oldOffset'];static get['requires'](){return[c,l,'RevisionTracker',r,_0x32b321];}constructor(_0x610907){super(_0x610907);const _0x4c80d5=this['editor']['config']['get']('collaboration.channelId');this['_lastRequestId']=null,this['_revisionTracker']=this['editor']['plugins']['get']('RevisionTracker'),this['_revisionHistoryService']=new v['RevisionHistoryService'](_0x4c80d5);}async['init'](){const _0x1e9e7f=this['editor']['plugins']['get'](l),_0x4f1d34=_0x1e9e7f['serverHistory'],_0x284985=this['editor']['plugins']['get'](c);this['_revisionTracker']['setSource']({'history':_0x4f1d34,'getLatestVersion':()=>this['_getLatestVersion'](),'getCurrentRevisionId':()=>_0x1e9e7f['sessionId']});const _0x51a45d=this['editor']['config']['get']('cloudServices.bundleVersion')||nt,_0x26d93b=await tt['isBundleUploaded'](_0x284985['connection'],_0x51a45d);this['_revisionTracker']['adapter']={'getRevision':async({revisionId:_0x1f2b82})=>(await this['_waitForServiceReady'](),await this['_revisionHistoryService']['getRevision'](_0x1f2b82)),'updateRevisions':async _0x20ac32=>{await this['_waitForServiceReady']();const _0x4a05da=this['_revisionTracker']['currentRevision'];if(_0x26d93b&&0x1===_0x20ac32['length']&&_0x20ac32[0x0]['id']===_0x4a05da['id'])return _0x20ac32;for(const _0xf2182b of _0x20ac32)_0xf2182b['id']===_0x4a05da['id']&&(_0xf2182b['isEmptyCurrent']=_0xf2182b['fromVersion']===_0xf2182b['toVersion']);return this['_revisionHistoryService']['updateRevisions'](_0x20ac32,this['_lastRequestId'])['then'](_0x4ddc4f=>(this['_lastRequestId']=_0x4ddc4f,_0x20ac32))['catch'](_0x6e9f77=>{if(st(_0x6e9f77)||'400'===_0x6e9f77['code']&&void 0x0!==_0x6e9f77['data']['wrongRequestId']){for(const _0x12a3ac of _0x20ac32){!this['_revisionTracker']['repository']['getRevision'](_0x12a3ac['id'])||this['_revisionTracker']['_bufferUpdate'](_0x12a3ac['id'],_0x12a3ac,!0x1);}if(st(_0x6e9f77))throw _0x6e9f77;return _0x20ac32;}throw _0x6e9f77;});}},this['listenTo'](this['_revisionHistoryService'],'revisionsUpdated',(_0x287321,{revisionsData:_0x494b6e,requestId:_0x1c95fa})=>{Math['max'](..._0x494b6e['map'](_0x6a87c=>_0x6a87c['toVersion']))>this['_getLatestVersionFromServerOperations']()-0x1?this['_getLatestVersion']()['then'](()=>{this['_handleRevisionsUpdate'](_0x494b6e,_0x1c95fa);}):this['_handleRevisionsUpdate'](_0x494b6e,_0x1c95fa);});const {revisions:_0x464c86,requestId:_0x4b8223}=await this['_revisionHistoryService']['connect'](_0x284985['connection']);_0x284985['addToReconnectionStack'](this),this['_lastRequestId']=_0x4b8223,await this['_fetchMissingUsers'](_0x464c86);for(const _0x317875 of _0x464c86)this['_revisionTracker']['addRevisionData'](_0x317875);this['listenTo'](_0x1e9e7f,'change:_isConnected',(_0x34ef7c,_0x21f807,_0x14cca9)=>{_0x14cca9&&(this['_oldOffset']=_0x1e9e7f['_offset'],_0x34ef7c['off']());}),this['_revisionTracker']['bind']('isEnabled')['to'](_0x284985,'state',_0x581b2e=>_0x581b2e===_0x2838f6['CONNECTED']);}async['reconnect'](){const _0x4154fb=this['editor']['plugins']['get'](c),_0x33b095=this['editor']['plugins']['get'](l),_0x5c8d3d=async()=>{const _0x1e94c2=this['_revisionTracker']['currentRevision'],_0x4b73d3=_0x1e94c2['id'],_0x20cfd6=_0x4b73d3!==_0x33b095['sessionId'];if(_0x20cfd6){const _0x325fa2=_0x33b095['_offset']-this['_oldOffset'],_0x3d5b52=this['_getLatestVersionFromServerOperations']();this['_revisionTracker']['_revisionDataBuilder']['reInit']();if(_0x1e94c2['toVersion']+_0x325fa2!==_0x3d5b52){const _0x2f31aa=_0x1e94c2['fromVersion']+_0x325fa2,_0x36c75b=this['editor']['plugins']['get'](_0x32b321),_0x2c540a=this['_revisionTracker']['buildRevisionData']({'revision':_0x1e94c2,'from':_0x2f31aa,'to':_0x3d5b52});_0x2c540a['id']=_0x1e94c2['id'];const _0x5b5f7a=_0x2c540a['authorsIds']['map'](_0x2211b9=>_0x36c75b['getUser'](_0x2211b9));_0x1e94c2['_update']({..._0x2c540a,'authors':_0x5b5f7a},!0x0),this['_revisionTracker']['_bufferUpdate'](_0x1e94c2['id'],_0x2c540a,!0x0);}this['_revisionTracker']['_startingVersion']=_0x3d5b52,(_0x1e94c2['toVersion']===_0x1e94c2['fromVersion']&&!this['_revisionTracker']['_bufferedUpdates']['has'](_0x4b73d3)&&this['_revisionTracker']['repository']['_revisions']['remove'](_0x4b73d3),this['_revisionTracker']['_createCurrentRevision'](_0x3d5b52));}const {revisions:_0x53de5e,requestId:_0x293d94}=await this['_revisionHistoryService']['reconnect'](_0x4154fb['connection'],this['_lastRequestId']);_0x20cfd6&&_0x53de5e['length']>0x0?_0x33b095['_handleReconnectionError']():(await this['_fetchMissingUsers'](_0x53de5e),this['_handleRevisionsUpdate'](_0x53de5e,_0x293d94),this['_revisionTracker']['sendBufferedUpdates']());};return _0x33b095['_isConnected']?_0x5c8d3d():new Promise((_0x259bd8,_0x4cc05f)=>{_0x33b095['once']('change:_isConnected',()=>{_0x5c8d3d()['then'](_0x259bd8)['catch'](_0x4cc05f);});});}['destroy'](){super['destroy']();}async['_waitForServiceReady'](){this['_revisionHistoryService']['isConnected']||await new Promise(_0x14e58f=>{this['listenTo'](this['_revisionHistoryService'],'connected',_0x9921f6=>{_0x9921f6['off'](),_0x14e58f();});});}['_getLatestVersionFromServerOperations'](){const _0x313da7=this['editor']['plugins']['get'](l)['serverHistory']['getOperations']()['reverse']();for(const _0x20bf9a of _0x313da7)if('marker'!==_0x20bf9a['type']||_0x20bf9a['affectsData'])return _0x20bf9a['baseVersion']+0x1;}['_getLatestVersion'](){const _0x1d349c=this['editor']['plugins']['get'](l);return new Promise(_0x205e74=>{_0x1d349c['_isPendingUpdate']?_0x1d349c['once']('change:_isPendingUpdate',()=>{_0x205e74(this['_getLatestVersionFromServerOperations']());}):_0x205e74(this['_getLatestVersionFromServerOperations']());});}['_handleRevisionsUpdate'](_0x287310,_0x1bd1be){const _0x2a2d32=this['_revisionTracker']['repository'];this['_lastRequestId']=_0x1bd1be;for(const _0xd76407 of _0x287310){const _0x402598=_0x2a2d32['getRevision'](_0xd76407['id']);if(_0x402598){if((_0xd76407['fromVersion']||_0xd76407['toVersion'])&&(_0xd76407['diffData']=null),_0x402598===this['_revisionTracker']['currentRevision']){const _0x8bf24a=Math['max'](_0x402598['toVersion'],_0xd76407['toVersion']),_0x1c6957=Math['max'](_0x402598['fromVersion'],_0xd76407['fromVersion']);let _0x111d79;_0x402598['toVersion']===_0xd76407['toVersion']&&_0x402598['fromVersion']===_0xd76407['fromVersion']?(_0x111d79=!0x0,this['_preventResendingRevisionData'](_0xd76407)):_0xd76407['toVersion']===_0x8bf24a&&_0xd76407['fromVersion']===_0x1c6957?_0x111d79=!0x1:(_0x402598['toVersion']===_0x8bf24a&&_0x402598['fromVersion']===_0x1c6957||this['_fixRevision']({'revision':_0x402598,'from':_0x1c6957,'to':_0x8bf24a}),_0x111d79=!0x0),_0x111d79&&(delete _0xd76407['fromVersion'],delete _0xd76407['toVersion'],delete _0xd76407['diffData'],delete _0xd76407['createdAt'],delete _0xd76407['authorsIds']);}this['_revisionTracker']['setRevisionData'](_0xd76407),this['_preventResendingRevisionData'](_0xd76407);}else this['_revisionTracker']['addRevisionData'](_0xd76407);}const _0x4f120a=_0x2a2d32['getRevisions']();_0x4f120a['reverse']();for(let _0x263505=0x0;_0x263505<_0x4f120a['length']-0x1;_0x263505++){const _0xd49462=_0x4f120a[_0x263505],_0xaad9dc=_0x4f120a[_0x263505+0x1];if(_0xd49462['fromVersion']<_0xaad9dc['toVersion']){const _0x2bb865=_0xaad9dc['toVersion'],_0x1e3d35=Math['max'](_0x2bb865,_0xd49462['toVersion']);this['_fixRevision']({'revision':_0xd49462,'from':_0x2bb865,'to':_0x1e3d35});}}}['_fixRevision']({revision:_0x57dc10,from:_0x343c3d,to:_0x2f73c1}={}){const _0x1bf46f=this['editor']['plugins']['get'](_0x32b321),_0x296633=this['_revisionTracker']['buildRevisionData']({'revision':_0x57dc10,'from':_0x343c3d,'to':_0x2f73c1});_0x296633['authors']=_0x296633['authorsIds']['map'](_0x21ca80=>_0x1bf46f['getUser'](_0x21ca80)),_0x57dc10['_update'](_0x296633);}['_preventResendingRevisionData'](_0x158474){const _0x372f16={};_0x372f16['id']=_0x158474['id'];for(const _0x5d60da of Object['keys'](_0x158474))'id'!==_0x5d60da&&(_0x372f16[_0x5d60da]=void 0x0);this['_revisionTracker']['_bufferUpdate'](_0x372f16['id'],_0x372f16,!0x0);}async['_fetchMissingUsers'](_0x509287){const _0x142835=this['editor']['plugins']['get'](_0x32b321),{connection:_0x141455}=this['editor']['plugins']['get'](c),_0x18804c=new Set();for(const _0x1c86d5 of _0x509287){for(const _0x3317c4 of _0x1c86d5['authorsIds'])_0x3b54e3(_0x3317c4);_0x1c86d5['creatorId']&&_0x3b54e3(_0x1c86d5['creatorId']);}if(0x0===_0x18804c['size'])return;const _0x1ba55a=await lt['getMany'](_0x141455,Array['from'](_0x18804c));for(const _0x4b1d1e of _0x1ba55a)_0x142835['getUser'](_0x4b1d1e['id'])||_0x142835['addUser'](_0x4b1d1e);function _0x3b54e3(_0x5e8c20){_0x142835['getUser'](_0x5e8c20)||_0x18804c['add'](_0x5e8c20);}}}function st(_0x1b130f){return _0x1b130f['message']['startsWith']('cloud-services-internal-error:\x20Revision\x20History\x20Service\x20is\x20not\x20connected.')||_0x1b130f['message']['startsWith']('cloud-services-internal-error:\x20Not\x20connected.')||_0x1b130f['message']['startsWith']('cloud-services-internal-error:\x20Request\x20timeout.');}class d extends _0x20e9b2{static get['requires'](){return['RevisionHistory',v,n];}static get['pluginName'](){return'RealTimeCollaborativeRevisionHistory';}}class ts extends _0x73abea{constructor(_0x34e322){super(_0x34e322);const _0x393d6a=this['bindTemplate'];this['set']('usersCount',0x0),this['set']('isHidden',!0x0),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-presence-list__counter',_0x393d6a['if']('isHidden','ck-presence-list__counter--hidden')]},'children':[{'text':_0x393d6a['to']('usersCount',_0x5a161e=>q(_0x34e322,'CONNECTED_USERS',_0x5a161e))}]});}}class es extends _0x73abea{['items'];['keystrokes'];constructor(_0x29d74c){super(_0x29d74c);const _0x33d792=this['bindTemplate'];this['items']=this['createCollection'](),this['keystrokes']=new _0xab26ed(),this['set']({'hasPopup':!0x1,'isExpanded':!0x1}),this['setTemplate']({'tag':'div','attributes':{'aria-haspopup':_0x33d792['if']('hasPopup'),'aria-expanded':_0x33d792['to']('isExpanded',_0x2436f3=>this['hasPopup']&&String(_0x2436f3)),'aria-label':_0x33d792['to']('hasPopup',_0x1362b3=>q(_0x29d74c,_0x1362b3?'Collapsed\x20connected\x20users\x20list\x20(press\x20ENTER\x20to\x20open\x20it)':'Connected\x20users\x20list')),'role':'list','tabindex':_0x33d792['to']('hasPopup',_0x397274=>!!_0x397274&&0x0),'class':['ck','ck-presence-list__list']},'children':this['items'],'on':{'click':_0x33d792['to'](()=>this['fire']('execute'))}}),this['on']('change:hasPopup',(_0x5e905a,_0x303ecd,_0x238cf5)=>{this['element']&&(_0x238cf5?this['element']['setAttribute']('aria-expanded',String(this['isExpanded'])):this['element']['removeAttribute']('aria-expanded'));});}['focus'](){this['element']['focus']();}['render'](){super['render'](),this['keystrokes']['listenTo'](this['element']);}}class _ extends _0x73abea{['counterView'];['inlineListView'];constructor(_0x4b18f4){super(_0x4b18f4);const _0x84d422=this['bindTemplate'];this['set']('isCollapsed',!0x0),this['counterView']=new ts(this['locale']),this['inlineListView']=new es(_0x4b18f4),this['inlineListView']['bind']('hasPopup')['to'](this,'isCollapsed'),this['listenTo'](this['inlineListView']['items'],'change',()=>{for(const _0x396bc4 of this['inlineListView']['items'])_0x396bc4['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',_0x84d422['if']('isCollapsed','ck-presence-list--collapsed')]},'children':[this['counterView'],this['inlineListView']]});}}class M extends _0x73abea{['listWrapperView'];constructor(_0x2e5656,_0x4a21d5){super(_0x2e5656),this['listWrapperView']=new mt(_0x2e5656,_0x4a21d5),this['setTemplate']({'tag':'div','attributes':{'tabindex':-0x1,'role':'application','class':['ck','ck-presence-list__dropdown-list'],'aria-label':q(_0x2e5656,'Connected\x20users\x20list\x20dropdown\x20menu')},'children':[this['listWrapperView']]});}}class mt extends _0x2e578f{constructor(_0x1a5f0a,_0x58c7ad){super(_0x1a5f0a);const _0x45ec23=this['bindTemplate'];this['set']('_isScrollable',!0x1),this['setTemplate']({'tag':_0x58c7ad?'div':'ul','attributes':{'class':['ck','ck-reset','ck-list','ck-presence-list__dropdown-list-wrapper',_0x45ec23['if']('_isScrollable','ck-presence-list__dropdown-list-wrapper_scrollable')],'role':_0x45ec23['to']('role'),'aria-label':_0x45ec23['to']('ariaLabel'),'aria-labelledby':_0x45ec23['to']('ariaLabelledBy')},'children':this['items']}),this['listenTo'](_0x355670['window'],'resize',()=>this['checkIfScrollable']()),this['items']['on']('change',()=>this['checkIfScrollable']());}['render'](){super['render'](),this['checkIfScrollable']();}['checkIfScrollable'](){const _0x279025=this['element'];_0x279025&&(this['_isScrollable']=Math['max'](_0x279025['scrollHeight'],_0x279025['clientHeight'])>0.8*window['innerHeight']);}}class E extends rt{['userView'];constructor(_0x363bf0,_0x2e9e4b,_0x3c8dba){super(_0x363bf0);const _0x177db2=this['bindTemplate'];this['userView']=new ct(_0x363bf0,_0x2e9e4b);const _0x1a9415={'tag':'li','attributes':{'class':['ck','ck-presence-list__dropdown-list-item'],'tabindex':-0x1,'role':'presentation','aria-label':_0x2e9e4b['name']},'children':[this['userView'],{'tag':'span','attributes':{'class':['ck','ck-user__full-name']},'children':[{'text':_0x2e9e4b['name']}]},{'tag':'span','attributes':{'class':['ck','ck-presence-list__marker',_0x2e9e4b['color']['getBackgroundColorClass']()],'aria-hidden':'true'}}]};_0x3c8dba&&(_0x1a9415['tag']='button',_0x1a9415['on']={'click':_0x177db2['to'](()=>this['fire']('execute'))}),this['setTemplate'](_0x1a9415);}['focus'](){this['element']['focus']();}}class T extends _0x73abea{['userView'];['markerView'];constructor(_0x43b5ab,_0x48bf49,_0x595d1e){super(_0x43b5ab);const _0x118343=this['bindTemplate'];this['set']('isFocusable',!0x1),this['set']('hasTooltip',!0x0),this['set']('tooltipPosition',''),this['userView']=new ct(_0x43b5ab,_0x48bf49),this['markerView']=new at(_0x43b5ab,_0x48bf49);const _0x55a70c=new ot(_0x43b5ab);_0x55a70c['template']['tag']='span',_0x55a70c['text']=_0x48bf49['name'];const _0x59562a={'tag':'div','attributes':{'class':['ck','ck-presence-list__list-item'],'role':'listitem','tabindex':_0x118343['to']('isFocusable',_0x20afc0=>!!_0x20afc0&&0x0),'aria-labelledby':_0x55a70c['id'],'data-cke-tooltip-text':this['userView']['name'],'data-cke-tooltip-position':_0x118343['to']('tooltipPosition'),'data-cke-tooltip-disabled':_0x118343['to']('hasTooltip',_0x21a414=>!_0x21a414),'data-cke-tooltip-class':'ck-presence-list__list-item__tooltip'},'children':[this['userView'],this['markerView'],_0x55a70c]};_0x595d1e&&(_0x59562a['tag']='button',_0x59562a['on']={'click':_0x118343['to'](()=>this['fire']('execute'))}),this['setTemplate'](_0x59562a);}}class at extends _0x73abea{constructor(_0x36e883,_0x207499){super(_0x36e883),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-presence-list__marker',_0x207499['color']['getBackgroundColorClass']()],'aria-hidden':'true'}});}}const D={'collapseAt':0x6,'displayMe':!0x0};class s extends _0x497d5d{['currentDisplayedUsers'];['balloonPanelView'];['view'];['presenceDropdownView'];['_bodyCollection']=null;constructor(_0x581d9c){super(_0x581d9c),this['context']['config']['define']('presenceList',D);const _0x3a6f3f=_0x581d9c['config']['get']('presenceList.collapseAt');if('number'!=typeof _0x3a6f3f)throw new _0x2b9d7d('presencelist-collapseat-invalid-format',this);if(_0x3a6f3f<0x1)throw new _0x2b9d7d('presencelist-collapseat-invalid-format',this);this['_allConnectedUsers']=this['context']['plugins']['get'](r)['allConnectedUsers'],this['set']('usersCount',0x0),this['currentDisplayedUsers']=new _0x20b753(),this['balloonPanelView']=new _0x21bb65(),this['balloonPanelView']['class']='ck\x20ck-presence-list__balloon',this['view']=this['_createView'](),this['presenceDropdownView']=void 0x0;}static get['requires'](){return[r];}['init'](){for(const _0x2857e4 of this['_allConnectedUsers'])this['_handleUserAdd'](_0x2857e4);this['listenTo'](this['_allConnectedUsers'],'add',(_0x3e6ecc,_0x55b574)=>{this['_handleUserAdd'](_0x55b574);}),this['listenTo'](this['_allConnectedUsers'],'remove',(_0x1da44b,_0x56aff6)=>{this['_handleUserRemove'](_0x56aff6);});}['_createView'](){const _0x1665fb=this['context'],_0x3e55b7=new _(this['context']['locale']),_0x17e7cb=this['balloonPanelView'];if(!_0x10bb8f(_0x1665fb['config']['get']('presenceList.container')))throw new _0x2b9d7d('presencelist-missing-container',this);return _0x3e55b7['counterView']['bind']('usersCount')['to'](this),_0x3e55b7['bind']('isCollapsed')['to'](this,'usersCount',_0x352dd6=>{const {collapseAt:_0xcc0d8c,displayMe:_0xd64df9}=_0x1665fb['config']['get']('presenceList'),_0x21170f=_0x352dd6>=_0xcc0d8c;return _0x3e55b7['counterView']['isHidden']=!(0x1==_0x352dd6&&_0xd64df9||_0x21170f),_0x21170f||this['hideDropdown'](),_0x21170f;}),_0x3e55b7['inlineListView']['items']['bindTo'](this['currentDisplayedUsers'])['using'](_0x7116c3=>{const _0x527836=_0x1665fb['config']['get']('presenceList'),_0x388be2=new T(_0x1665fb['locale'],_0x7116c3,!!_0x527836['onClick']);return _0x388be2['bind']('hasTooltip')['to'](_0x3e55b7,'isCollapsed',_0x1a72f0=>!_0x1a72f0),_0x388be2['bind']('isFocusable')['to'](_0x3e55b7,'isCollapsed',_0x30210a=>!_0x30210a),_0x527836['onClick']&&this['listenTo'](_0x388be2,'execute',()=>{this['view']['isCollapsed']||_0x527836['onClick'](_0x7116c3,_0x388be2['element']);}),_0x388be2;}),this['listenTo'](_0x3e55b7['inlineListView'],'execute',()=>{this['presenceDropdownView']?this['hideDropdown']():this['view']['isCollapsed']&&this['showDropdown']();}),_0x3e55b7['inlineListView']['keystrokes']['set']('Enter',(_0x1a3948,_0x50aee0)=>{this['view']['isCollapsed']&&(this['showDropdown'](),_0x50aee0());}),_0x3e55b7['render'](),_0x17e7cb['render'](),_0x45be88({'emitter':_0x3e55b7,'activator':()=>_0x17e7cb['isVisible'],'contextElements':[_0x17e7cb['element'],_0x3e55b7['inlineListView']['element']],'callback':()=>this['hideDropdown']()}),_0x1665fb['config']['get']('presenceList.container')['appendChild'](_0x3e55b7['element']),this['_bodyCollection']=new _0x52cf7c(this['context']['locale']),this['_bodyCollection']['attachToDom'](),this['_bodyCollection']['add'](this['balloonPanelView']),_0x3e55b7;}['_handleUserAdd'](_0x48ea9c){if(!this['context']['config']['get']('presenceList.displayMe')&&_0x48ea9c['isMe'])return;const _0x18eb9a=this['context']['config']['get']('presenceList.collapseAt')-0x1;this['usersCount']++,this['currentDisplayedUsers']['length']==_0x18eb9a&&this['currentDisplayedUsers']['length']>0x1&&this['currentDisplayedUsers']['remove'](0x1);const _0x12fa3d=_0x48ea9c['isMe']?0x0:this['currentDisplayedUsers']['length'];this['currentDisplayedUsers']['add'](_0x48ea9c,_0x12fa3d);}['_handleUserRemove'](_0x3f585b){if(this['usersCount']--,this['currentDisplayedUsers']['get'](_0x3f585b['id'])&&(this['currentDisplayedUsers']['remove'](_0x3f585b['id']),this['currentDisplayedUsers']['length']<this['usersCount'])){for(const _0x1b5cd8 of Array['from'](this['_allConnectedUsers'])['reverse']())if(!this['currentDisplayedUsers']['get'](_0x1b5cd8['id']))return void this['currentDisplayedUsers']['add'](_0x1b5cd8,Math['min'](this['currentDisplayedUsers']['length'],0x1));}}['showDropdown'](){if(this['presenceDropdownView'])return;const _0x1df28f=this['context']['config']['get']('presenceList');this['presenceDropdownView']=new M(this['context']['locale'],!!_0x1df28f['onClick']),this['view']['inlineListView']['isExpanded']=!0x0;const {listWrapperView:_0x1da8e1}=this['presenceDropdownView'];_0x1da8e1['items']['bindTo'](this['_allConnectedUsers'])['using'](_0x59872e=>{if(!_0x1df28f['displayMe']&&_0x59872e['isMe'])return null;const _0x5b1cee=new E(this['context']['locale'],_0x59872e,!!_0x1df28f['onClick']);return _0x1df28f['onClick']&&this['listenTo'](_0x5b1cee,'execute',()=>{_0x1df28f['onClick'](_0x59872e,_0x5b1cee['element']);}),_0x5b1cee;}),this['balloonPanelView']['content']['add'](this['presenceDropdownView']),this['balloonPanelView']['pin']({'target':this['view']['inlineListView']['element']}),_0x1da8e1['focus'](),_0x1da8e1['checkIfScrollable']();const _0x334321=(_0x576fe0,_0x53813b)=>{this['hideDropdown'](),this['view']['inlineListView']['focus'](),_0x53813b();};_0x1da8e1['keystrokes']['set']('Esc',_0x334321),_0x1da8e1['keystrokes']['set']('Shift+Tab',_0x334321),_0x1da8e1['keystrokes']['set']('Tab',(_0x164fe4,_0x11a374)=>{!function(_0x3c79dc){const _0x4fa290=['a','button','input','select','textarea','[tabindex]','[contenteditable]']['map'](_0x25051c=>_0x25051c+':not([disabled]):not([tabindex=\x22-1\x22])')['join'](','),_0x3669af=[...document['body']['querySelectorAll'](_0x4fa290)]['filter'](_0x54a364=>_0x54a364===document['activeElement']||_0x54a364['offsetWidth']+_0x54a364['offsetHeight']>0x0)['sort']((_0x2155c1,_0x15be6c)=>(_0x2155c1['tabIndex']||0x0)-(_0x15be6c['tabIndex']||0x0)),_0x293e7f=_0x3669af['indexOf'](_0x3c79dc),_0x331c30=_0x3669af[(_0x293e7f+0x1)%_0x3669af['length']];_0x331c30&&_0x331c30['focus']();}(this['view']['element']),this['hideDropdown'](),_0x11a374();}),_0x1da8e1['focusTracker']['add'](this['view']['element']),_0x1da8e1['focusTracker']['on']('change:isFocused',(_0x3917cb,_0x22e03a,_0x3c7b7d)=>{_0x3c7b7d||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 _0x497d5d{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':_0x20958a=>0x0==_0x20958a?0x0:0x1==_0x20958a?0x1:0x2==_0x20958a?0x2:_0x20958a%0x64>=0x3&&_0x20958a%0x64<=0xa?0x3:_0x20958a%0x64>=0xb&&_0x20958a%0x64<=0x63?0x4:0x5}};
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
(
|
|
23
|
+
(_0x436f8d=>{const {ar:{dictionary:_0x15f32e,getPluralForm:_0x51900f}}={'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':_0xfc317b=>0x0==_0xfc317b?0x0:0x1==_0xfc317b?0x1:0x2==_0xfc317b?0x2:_0xfc317b%0x64>=0x3&&_0xfc317b%0x64<=0xa?0x3:_0xfc317b%0x64>=0xb&&_0xfc317b%0x64<=0x63?0x4:0x5}};_0x436f8d['ar']||={'dictionary':{},'getPluralForm':null},_0x436f8d['ar']['dictionary']=Object['assign'](_0x436f8d['ar']['dictionary'],_0x15f32e),_0x436f8d['ar']['getPluralForm']=_0x51900f;})(window['CKEDITOR_TRANSLATIONS']||={});
|