@ckeditor/ckeditor5-real-time-collaboration 43.0.0-alpha.0 → 43.0.0-alpha.2
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/build/translations/ar.js +1 -1
- package/build/translations/bg.js +1 -1
- package/build/translations/bn.js +1 -1
- package/build/translations/ca.js +1 -1
- package/build/translations/cs.js +1 -1
- package/build/translations/da.js +1 -1
- package/build/translations/de.js +1 -1
- package/build/translations/el.js +1 -1
- package/build/translations/es.js +1 -1
- package/build/translations/et.js +1 -1
- package/build/translations/fi.js +1 -1
- package/build/translations/fr.js +1 -1
- package/build/translations/gl.js +1 -1
- package/build/translations/he.js +1 -1
- package/build/translations/hi.js +1 -1
- package/build/translations/hu.js +1 -1
- package/build/translations/id.js +1 -1
- package/build/translations/it.js +1 -1
- package/build/translations/ja.js +1 -1
- package/build/translations/ko.js +1 -1
- package/build/translations/lt.js +1 -1
- package/build/translations/lv.js +1 -1
- package/build/translations/ms.js +1 -1
- package/build/translations/nl.js +1 -1
- package/build/translations/no.js +1 -1
- package/build/translations/pl.js +1 -1
- package/build/translations/pt-br.js +1 -1
- package/build/translations/pt.js +1 -1
- package/build/translations/ro.js +1 -1
- package/build/translations/ru.js +1 -1
- package/build/translations/sk.js +1 -1
- package/build/translations/sr.js +1 -1
- package/build/translations/sv.js +1 -1
- package/build/translations/th.js +1 -1
- package/build/translations/tr.js +1 -1
- package/build/translations/uk.js +1 -1
- package/build/translations/vi.js +1 -1
- package/build/translations/zh-cn.js +1 -1
- package/build/translations/zh.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/lang/translations/ar.po +3 -3
- package/lang/translations/bg.po +3 -3
- package/lang/translations/bn.po +3 -3
- package/lang/translations/ca.po +3 -3
- package/lang/translations/cs.po +3 -3
- package/lang/translations/da.po +3 -3
- package/lang/translations/de.po +3 -3
- package/lang/translations/el.po +3 -3
- package/lang/translations/es.po +3 -3
- package/lang/translations/et.po +3 -3
- package/lang/translations/fi.po +3 -3
- package/lang/translations/fr.po +3 -3
- package/lang/translations/gl.po +3 -3
- package/lang/translations/he.po +3 -3
- package/lang/translations/hi.po +3 -3
- package/lang/translations/hu.po +3 -3
- package/lang/translations/id.po +3 -3
- package/lang/translations/it.po +3 -3
- package/lang/translations/ja.po +3 -3
- package/lang/translations/ko.po +3 -3
- package/lang/translations/lt.po +3 -3
- package/lang/translations/lv.po +3 -3
- package/lang/translations/ms.po +3 -3
- package/lang/translations/nl.po +3 -3
- package/lang/translations/no.po +3 -3
- package/lang/translations/pl.po +3 -3
- package/lang/translations/pt-br.po +3 -3
- package/lang/translations/pt.po +3 -3
- package/lang/translations/ro.po +3 -3
- package/lang/translations/ru.po +3 -3
- package/lang/translations/sk.po +3 -3
- package/lang/translations/sr.po +3 -3
- package/lang/translations/sv.po +3 -3
- package/lang/translations/th.po +3 -3
- package/lang/translations/tr.po +3 -3
- package/lang/translations/uk.po +3 -3
- package/lang/translations/vi.po +3 -3
- package/lang/translations/zh-cn.po +3 -3
- package/lang/translations/zh.po +3 -3
- 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',_0x15eb6a];}static get['pluginName'](){return'WebSocketGateway';}constructor(_0x2103dd){super(_0x2103dd),this['set']('state',_0x23693a['CONNECTED']),this['set']('_isBrowserOffline',!0x1),this['_reconnectionStack']=new Set(),this['_shouldPluginsReconnect']=!0x1,this['_domEmitter']=Object['create'](_0x30e4ce);}['init'](){const _0x56202f=this['context'],_0x5785c4=_0x56202f['plugins']['get']('CloudServices'),_0x4803cc=_0x56202f['plugins']['get'](_0x15eb6a);if(!_0x5785c4['token'])throw new _0x2f1152('websocketgateway-missing-token',this);if(!_0x5785c4['webSocketUrl'])throw new _0x2f1152('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'](_0x5785c4['token'],_0x5785c4['webSocketUrl'],{'timeout':0x3e8*this['context']['config']['get']('cloudServices.connectionTimeout'),'requestTimeout':0x3e8*this['context']['config']['get']('cloudServices.requestTimeout')})['then'](_0x530337=>{if(this['connection']=_0x530337,this['bind']('state')['to'](_0x530337,'state',this,'_isBrowserOffline',(_0x2468cd,_0x5a42d9)=>('connected'!==_0x2468cd&&(this['_shouldPluginsReconnect']=!0x0),_0x5a42d9||_0x2468cd!==_0x23693a['CONNECTED']?_0x23693a['DISCONNECTED']:this['state']==_0x23693a['DISCONNECTED']&&this['_shouldPluginsReconnect']?(this['_shouldPluginsReconnect']=!0x1,this['_reconnect'](),_0x23693a['CONNECTING']):_0x23693a['CONNECTED'])),this['connection']['on']('error',(_0x2ee9e0,_0x2fb33a)=>{if('limitExceeded'!==_0x2fb33a['code'])throw console['error'](_0x2fb33a),new _0x2f1152('cloudservices-init',null,{'originalError':_0x2fb33a});_0x4803cc['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'});}),!_0x530337['me'])return new Promise(_0x2a2b1a=>_0x530337['on']('change:me',_0x2a2b1a));})['catch'](_0x5e78d8=>{throw console['error'](_0x5e78d8),new _0x2f1152('cloudservices-init',null,{'originalError':_0x5e78d8});});}['addToReconnectionStack'](_0x53df45){if('function'!=typeof _0x53df45['reconnect'])throw new _0x2f1152('websocketgateway-invalid-plugin-interface',this);if(this['isInReconnectionStack'](_0x53df45))throw new _0x2f1152('websocketgateway-plugin-already-registered',this,{'name':_0x53df45['constructor']['pluginName']});this['_reconnectionStack']['add'](_0x53df45);}['removeFromReconnectionStack'](_0x2db1ab){this['_reconnectionStack']['delete'](_0x2db1ab);}['isInReconnectionStack'](_0x3c0ab6){return this['_reconnectionStack']['has'](_0x3c0ab6);}['_reconnect'](){return this['connection']['reconnect']()['then'](()=>Promise['all'](Array['from'](this['_reconnectionStack'],_0x361afe=>_0x361afe['reconnect']())))['then'](()=>this['state']=_0x23693a['CONNECTED'])['catch'](_0x8a166c=>{throw console['error'](_0x8a166c),new _0x2f1152('cloudservices-reconnection-error',this['context']);});}['destroy'](){this['connection']&&this['connection']['disconnect'](),this['state']=_0x23693a['DISCONNECTED'],this['_domEmitter']['stopListening'](),super['destroy']();}}class r extends _0x4fe8b7{['channelSessions'];['channelConnectedUsers'];['allConnectedUsers'];['_registeredSessions'];['_uniqueUsersCount'];['_users'];static get['pluginName'](){return'Sessions';}static get['requires'](){return[c,_0x58799e];}constructor(_0x3196f3){super(_0x3196f3),this['channelSessions']=new Map(),this['channelConnectedUsers']=new Map(),this['allConnectedUsers']=new _0x17fa03(),this['_registeredSessions']=new Map(),this['_uniqueUsersCount']=0x0,this['_users']=this['context']['plugins']['get'](_0x58799e);}['init'](){const _0x1eebb3=this['context']['plugins']['get'](c);this['listenTo'](_0x1eebb3,'change:state',(_0x101eaa,_0x1cca56,_0x53e811)=>{if('connected'!==_0x53e811)this['channelSessions']['forEach'](_0x412f81=>_0x412f81['clear']()),this['channelConnectedUsers']['forEach'](_0x28fcc6=>_0x28fcc6['clear']()),this['allConnectedUsers']['clear']();else{for(const [_0x2932ff,_0x12b3b3]of this['_registeredSessions'])for(const _0x1e9191 of _0x12b3b3)this['_handleSessionAdd'](_0x2932ff,_0x1e9191);}}),this['_createUser'](_0x1eebb3['connection']['me'],!0x0);}['register'](_0x3c2587,_0x59f501){if(this['_registeredSessions']['has'](_0x3c2587))throw new _0x2f1152('sessions-register-already-registered',null,{'channelId':_0x3c2587});this['_registeredSessions']['set'](_0x3c2587,_0x59f501),this['channelSessions']['set'](_0x3c2587,new _0x17fa03()),this['channelConnectedUsers']['set'](_0x3c2587,new _0x17fa03()),this['listenTo'](_0x59f501,'add',(_0x54ef5a,_0x177615)=>this['_handleSessionAdd'](_0x3c2587,_0x177615)),this['listenTo'](_0x59f501,'remove',(_0x5ab518,_0xe09493)=>this['_handleSessionRemove'](_0x3c2587,_0xe09493));for(const _0x14ceea of _0x59f501)this['_handleSessionAdd'](_0x3c2587,_0x14ceea);}['unregister'](_0x99aa5e){if(!this['_registeredSessions']['has'](_0x99aa5e))throw new _0x2f1152('sessions-unregister-not-exist',null,{'channelId':_0x99aa5e});const _0x165dab=this['_registeredSessions']['get'](_0x99aa5e);this['stopListening'](_0x165dab);for(const _0x4cf199 of _0x165dab)'connected'===this['context']['plugins']['get'](c)['state']&&this['_handleSessionRemove'](_0x99aa5e,_0x4cf199);this['_registeredSessions']['delete'](_0x99aa5e),this['channelSessions']['delete'](_0x99aa5e),this['channelConnectedUsers']['delete'](_0x99aa5e);}get['mySessionId'](){return this['context']['plugins']['get'](c)['connection']['sessionId'];}['getUserBySessionId'](_0x3f110b){for(const _0x558902 of this['channelSessions']['values']())for(const _0x5bb7c5 of _0x558902)if(_0x5bb7c5['id']===_0x3f110b)return _0x5bb7c5['user'];}['getUserSessions'](_0x5be637,_0x18be20){const _0x24cedc=_0x18be20?[this['channelSessions']['get'](_0x18be20)]:this['channelSessions']['values'](),_0x5d3dca=new Set();for(const _0xf6492e of _0x24cedc)for(const _0x4e4eab of _0xf6492e)_0x4e4eab['user']['id']===_0x5be637['id']&&_0x5d3dca['add'](_0x4e4eab['id']);return _0x5d3dca;}['getUserRole'](_0x417991){for(const _0x37247a of this['channelSessions']['values']())for(const _0x4c81d3 of _0x37247a)if(_0x4c81d3['user']===_0x417991)return _0x4c81d3['role'];}['_handleSessionAdd'](_0x48fbb1,_0x421cdf){if('connected'!==this['context']['plugins']['get'](c)['state'])return;const _0x3c6b63=_0x421cdf['user'],_0x31aa55=this['_users']['getUser'](_0x3c6b63['id'])||this['_createUser'](_0x3c6b63),_0x48a4ee=Object['assign']({},_0x421cdf,{'user':_0x31aa55});this['channelSessions']['get'](_0x48fbb1)['add'](_0x48a4ee);const _0x11cbec=this['channelConnectedUsers']['get'](_0x48fbb1);_0x11cbec['has'](_0x31aa55['id'])||_0x11cbec['add'](_0x31aa55),this['allConnectedUsers']['has'](_0x31aa55['id'])||this['allConnectedUsers']['add'](_0x31aa55,_0x31aa55['isMe']?0x0:void 0x0),this['fire']('sessionAdd:'+_0x48fbb1,{'channelId':_0x48fbb1,'session':_0x48a4ee});}['_handleSessionRemove'](_0x2a0d86,_0x554199){if('connected'!==this['context']['plugins']['get'](c)['state'])return;const _0x4c675d=this['channelConnectedUsers']['get'](_0x2a0d86),_0x545d48=_0x554199['user'];_0x545d48['id']&&(this['channelSessions']['get'](_0x2a0d86)['remove'](_0x554199['id']),_0x4c675d['has'](_0x545d48['id'])&&!this['getUserSessions'](_0x545d48,_0x2a0d86)['size']&&_0x4c675d['remove'](_0x545d48['id']),this['allConnectedUsers']['get'](_0x545d48['id'])&&!this['getUserSessions'](_0x545d48)['size']&&this['allConnectedUsers']['remove'](_0x545d48['id']));}['_createUser'](_0x4d1c72,_0x441eaa){const _0x1b86b9=this['_users']['addUser'](_0x4d1c72);return _0x441eaa&&this['_users']['defineMe'](_0x4d1c72['id']),_0x1b86b9['orderNumber']=this['_uniqueUsersCount']++,_0x1b86b9;}}class H extends _0x49cfea{['_domEmitter']=new(_0x30e4ce())();static get['requires'](){return[r];}static get['pluginName'](){return'UserMarkers';}['init'](){const _0x5865a6=this['editor'],_0x163737=_0x5865a6['plugins']['get'](r);_0x5865a6['conversion']['for']('editingDowncast')['markerToElement']({'model':'user:position','view':(_0x257098,{writer:_0x40355c})=>function(_0x50ba28,_0x4ce366,_0x582c0c,_0x392d3a){const _0x206f77=_0x50ba28['markerName']['split'](':')[0x2],_0x36b6c0=_0x582c0c['getUserBySessionId'](_0x206f77);if(!_0x36b6c0||_0x206f77===_0x582c0c['mySessionId'])return;if(!_0x392d3a['model']['schema']['checkChild'](_0x50ba28['markerRange']['start'],'$text'))return;const _0x55cae1={'class':'ck-user__marker\x20'+_0x36b6c0['color']['getMarkerClass'](),'data-name':_0x36b6c0['name'],'data-session-id':_0x206f77},_0x28db2f=_0x392d3a['model']['markers']['get'](_0x50ba28['markerName']),_0x4c96e3=_0x28db2f['getStart'](),_0x30b84a=_0x4c96e3['nodeAfter'],_0x2aeff1=_0x392d3a['model']['schema'];if(_0x30b84a&&_0x2aeff1['isObject'](_0x30b84a)&&_0x2aeff1['isInline'](_0x30b84a)&&!_0x392d3a['model']['markers']['get']('user:range:'+_0x206f77)['getRange']()['isCollapsed'])return;const _0x463317=_0x4c96e3['parent'];return _0x392d3a['model']['schema']['isLimit'](_0x463317)&&!_0x392d3a['model']['hasContent'](_0x463317)&&(_0x55cae1['contenteditable']=!0x1),function(_0x446bb7,_0x3c01a4,_0x1b0235){const _0x17716a=_0x446bb7['createUIElement']('span',_0x3c01a4);return _0x446bb7['setCustomProperty']('userPositionMarker',!0x0,_0x17716a),_0x17716a['render']=function(_0x564681){const _0xf9f18b=this['toDomElement'](_0x564681);return _0xf9f18b['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>'+_0x1b0235['name']+'</span>',_0xf9f18b['addEventListener']('mouseenter',()=>{_0xf9f18b['classList']['add']('ck-user__marker_hovered');}),_0xf9f18b['addEventListener']('mouseleave',()=>{_0xf9f18b['classList']['remove']('ck-user__marker_hovered');}),_0xf9f18b;},_0x17716a['isSimilar']=function(_0x4c3e91){return!(!this['getCustomProperty']('userPositionMarker')||!_0x4c3e91['getCustomProperty']('userPositionMarker')||this['getAttribute']('data-session-id')!=_0x4c3e91['getAttribute']('data-session-id'));},_0x17716a;}(_0x4ce366,_0x55cae1,_0x36b6c0);}(_0x257098,_0x40355c,_0x163737,_0x5865a6)}),_0x5865a6['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'user:range','view':_0x2f6013=>function(_0x38730a,_0x283bfe){const _0x4793a9=_0x38730a['markerName']['split'](':')[0x2];if(_0x4793a9===_0x283bfe['mySessionId'])return null;const _0x458398=_0x283bfe['getUserBySessionId'](_0x4793a9);if(!_0x458398)return{'id':_0x4793a9,'classes':[]};return{'id':_0x4793a9,'classes':['ck-user__selection',_0x458398['color']['getSelectionClass']()],'attributes':{'data-session-id':_0x4793a9},'priority':0x7d0+_0x458398['orderNumber']};}(_0x2f6013,_0x163737)}),function(_0x1c7840){const _0x5e2f29=_0x1c7840['model'],_0x49e564=new Map(),_0x377dec=_0x1c7840['plugins']['get'](r);_0x5e2f29['markers']['on']('update:user:range',(_0x495960,_0x3d2658,_0x16325f,_0x1b0b17)=>{if(!_0x1b0b17&&_0x49e564['get'](_0x3d2658['name']))return _0x49e564['get'](_0x3d2658['name'])['detach'](),void _0x49e564['delete'](_0x3d2658['name']);const _0xcc0785=_0x3d2658['name']['split'](':')[0x2];if(_0xcc0785===_0x377dec['mySessionId'])return;const _0x20f20e='user:position:'+_0xcc0785;_0x5e2f29['markers']['has'](_0x20f20e)&&_0x1c7840['editing']['reconvertMarker'](_0x20f20e),_0x3d2658['on']('change:range',(_0x19d179,_0x1f8ca0,_0x205416)=>{if('$graveyard'!=_0x1f8ca0['root']['rootName']&&'$graveyard'==_0x3d2658['getRange']()['root']['rootName']&&!_0x49e564['has'](_0x3d2658['name'])){const _0x3993c2=_0x5e2f29['schema']['getNearestSelectionRange'](_0x205416['deletionPosition']);if(_0x3993c2){const _0x49bca3=ht['fromRange'](_0x3993c2);_0x49e564['set'](_0x3d2658['name'],_0x49bca3),_0x49bca3['on']('change:range',(_0x4193bf,_0x5897e1,_0xc6078c)=>{if('$graveyard'==_0x49bca3['root']['rootName']){const _0x22ccda=_0x5e2f29['schema']['getNearestSelectionRange'](_0xc6078c['deletionPosition']);_0x22ccda?(_0x49bca3['start']=_0x22ccda['start'],_0x49bca3['end']=_0x22ccda['end']):(_0x49e564['delete'](_0x3d2658['name']),_0x49bca3['detach']());}});}}});}),_0x5e2f29['document']['on']('change',()=>{_0x49e564['size']>0x0&&_0x5e2f29['enqueueChange']({'isUndoable':!0x1},_0x5a2446=>{for(const [_0x107162,_0x21560d]of _0x49e564)'$graveyard'==_0x5e2f29['markers']['get'](_0x107162)['getRange']()['root']['rootName']&&(re(_0x107162['split'](':')[0x2],_0x21560d['toRange'](),_0x5e2f29,_0x5a2446),_0x21560d['detach']());_0x49e564['clear']();});});}(_0x5865a6),this['_domEmitter']['listenTo'](_0x449926['document'],'keydown',(_0x5355ed,{key:_0xab09aa})=>{'Escape'===_0xab09aa&&function(_0x381fbd){_0x381fbd['editing']['view']['change'](_0x2c2b98=>{for(const _0x5d5a78 of _0x381fbd['model']['markers']){if(!_0x5d5a78['name']['startsWith']('user:position'))continue;const _0xd1feb5=_0x381fbd['editing']['mapper']['markerNameToElements'](_0x5d5a78['name']);if(_0xd1feb5){for(const _0x2bc283 of _0xd1feb5)_0x2c2b98['removeClass']('ck-user__marker_hovered',_0x2bc283);}}});}(_0x5865a6);},{'useCapture':!0x0});}['afterInit'](){const _0x440626=this['editor'],_0x5c4ab4=_0x440626['commands']['get']('undo');_0x5c4ab4&&_0x440626['model']['on']('applyOperation',(_0x1994d1,_0x334d76)=>{const _0x4860ac=_0x334d76[0x0];if('marker'!=_0x4860ac['type']||!_0x4860ac['name']['startsWith']('user:'))return;const _0x58b226=_0x4860ac['batch'];_0x5c4ab4['_createdBatches']['has'](_0x58b226)&&(_0x4860ac['newRange']=_0x4860ac['oldRange']?_0x440626['model']['createRange'](_0x4860ac['oldRange']['start'],_0x4860ac['oldRange']['end']):null);},{'priority':'highest'});}['destroy'](){return this['_domEmitter']['stopListening'](),super['destroy']();}['createUserMarkerOperations'](){const _0x53e228=this['editor'],_0x330fa2=_0x53e228['model']['document'],_0x45b064=_0x53e228['plugins']['get'](r);_0x53e228['model']['enqueueChange']({'isUndoable':!0x1},_0x546d68=>{const _0x2c70a4='user:range:'+_0x45b064['mySessionId'],_0x583959='user:position:'+_0x45b064['mySessionId'],_0x5c452a=_0x53e228['model']['markers']['has'](_0x2c70a4);_0x53e228['editing']['view']['hasDomSelection']?re(_0x45b064['mySessionId'],_0x330fa2['selection']['getFirstRange'](),_0x53e228['model'],_0x546d68):_0x5c452a&&(_0x546d68['removeMarker'](_0x2c70a4),_0x546d68['removeMarker'](_0x583959));});}}function re(_0x2fcc1f,_0x54fd3b,_0xee2f04,_0x3cd8d7){const _0x13f9ea='user:range:'+_0x2fcc1f,_0x42ab9a='user:position:'+_0x2fcc1f,_0x290f6a=_0x54fd3b['getContainedElement']();let _0x15d9f9=_0x54fd3b['start'];_0x290f6a&&_0x290f6a['is']('element','tableCell')&&(_0x15d9f9=function(_0x3d5dc0,_0x1c4870){for(const _0x3a0985 of _0x3d5dc0['getPositions']())if(_0x1c4870['schema']['checkChild'](_0x3a0985,'$text'))return _0x3a0985;}(_0x54fd3b,_0xee2f04),_0x54fd3b=_0x3cd8d7['createRange'](_0x15d9f9));const _0x420ee1=_0x3cd8d7['createRange'](_0x15d9f9);_0xee2f04['markers']['has'](_0x13f9ea)?(_0x3cd8d7['updateMarker'](_0x13f9ea,{'range':_0x54fd3b}),_0x3cd8d7['updateMarker'](_0x42ab9a,{'range':_0x420ee1})):(_0x3cd8d7['addMarker'](_0x13f9ea,{'range':_0x54fd3b,'usingOperation':!0x0}),_0x3cd8d7['addMarker'](_0x42ab9a,{'range':_0x420ee1,'usingOperation':!0x0}));}function q(_0x17d0eb,_0x2ee709,_0x583b4e){const t=_0x17d0eb['t'];switch(_0x2ee709){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'},_0x583b4e);default:return'';}}let K=0x1;class l extends _0x49cfea{static ['CollaborativeEditingService']=/* #__PURE__ -- @preserve */
|
|
25
|
-
((()=>_0x3a9cc0)());['_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,_0x31d204,_0x58799e,_0x15eb6a];}static get['pluginName'](){return'RealTimeCollaborationClient';}get['cloudDocumentVersion'](){return this['_lastServerVersion']+this['_offset'];}get['_lastServerVersion'](){return this['serverHistory']['version']-this['_offset'];}get['lastSyncVersion'](){const _0x4f7b8f=this['serverHistory']['getOperations']();for(let _0x5f3b89=_0x4f7b8f['length']-0x1;_0x5f3b89>=0x0;_0x5f3b89--){const _0x5317ff=_0x4f7b8f[_0x5f3b89];if(!this['_disconnectionOperations']['has'](_0x5317ff))return _0x5317ff['baseVersion']+0x1-this['_offset'];}return 0x0;}constructor(_0x1e0f44){if(super(_0x1e0f44),this['_offset']=0x0,this['sessionId']=null,this['serverHistory']=new _0x56feee(),this['editor']['config']['define']('collaboration',{}),this['_channelId']=this['editor']['config']['get']('collaboration.channelId'),!this['_channelId'])throw new _0x2f1152('collaboration-missing-channelid',this);const _0x473f76=_0x1e0f44['config']['get']('cloudServices.bundleVersion')||nt;this['_service']=new l['CollaborativeEditingService'](_0x473f76,this['_channelId']),this['_document']=this['editor']['model']['document'],this['_compressor']=new _0x258602(),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 _0x9e07de=this['editor'],_0x53d09b=_0x9e07de['plugins']['get'](_0x58799e),_0x190451=_0x9e07de['plugins']['get'](c);this['listenTo'](_0x53d09b,'getOperationAuthor',(_0x54fc85,_0x36628f)=>{const _0x482f28=_0x36628f[0x0];_0x482f28['_authorId']&&(_0x54fc85['return']=_0x53d09b['getUser'](_0x482f28['_authorId']),_0x54fc85['stop']()),null===_0x482f28['_authorId']&&(_0x54fc85['return']=null,_0x54fc85['stop']());},{'priority':'high'}),this['listenTo'](_0x9e07de['model']['document']['selection'],'change:range',(_0x5ce9bc,_0x424262)=>{_0x424262['directChange']&&this['_refreshUserSelectionMarkers']();}),this['listenTo'](_0x9e07de['editing']['view'],'change:hasDomSelection',()=>{this['_refreshUserSelectionMarkers']();}),this['_initThrowingOnDataSet'](),_0x9e07de['model']['on']('applyOperation',(_0x42b216,_0x2054a4)=>{const _0x41adca=_0x2054a4[0x0];_0x41adca['isDocumentOperation']&&(this['_saveOperationInBuffer'](_0x41adca),this['_shouldSendUpdate']()&&this['_sendBufferedOperationsDelayed']());}),this['_setUpDataInit'](),this['bind']('_isEditingAllowed')['to'](_0x190451,'state',this,'_hasSynchronizationProblem',(_0x129fda,_0x3347d4)=>'connected'===_0x129fda&&!_0x3347d4),this['on']('change:_isEditingAllowed',()=>{this['_isEditingAllowed']?_0x9e07de['disableReadOnlyMode']('rtc-offline'):_0x9e07de['enableReadOnlyMode']('rtc-offline');}),this['_isEditingAllowed']?_0x9e07de['disableReadOnlyMode']('rtc-offline'):_0x9e07de['enableReadOnlyMode']('rtc-offline'),this['set']('_isConnected',!0x1);}async['reconnect'](){const _0x2523d4=this['editor']['plugins']['get'](r),_0x2127b1=this['editor']['plugins']['get'](c);try{this['_isPendingUpdate']=!0x0,_0x2523d4['unregister'](this['_channelId']);const _0x9fdbc8=await this['_service']['reconnect'](_0x2127b1['connection'],this['lastSyncVersion']);await this['_handleReconnectionResponse'](_0x9fdbc8)&&(this['_isPendingUpdate']=!0x1,this['_clearPendingAction']());const _0x55c6b3=await this['_service']['getConnectedSessions']();_0x2523d4['register'](this['_channelId'],_0x55c6b3),this['_handleSendingSelectionMarkers'](),this['_isConnected']=!0x0;}catch(_0x197e56){if(function(_0x9c7a49){return'404'===_0x9c7a49['code'];}(_0x197e56)&&this['sessionId'])await this['_connectAfterSessionHasBeenFlushed']();else{if(function(_0x1ecbd6){return'409'===_0x1ecbd6['code'];}(_0x197e56)){const _0x2a333c=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'](_0x2a333c);}else{if(!(_0x197e56 instanceof J))throw _0x197e56;this['_handleReconnectionError']();}}}}['destroy'](){const _0xcbcf25=this['editor']['plugins']['get'](c),_0x502a62=this['editor']['plugins']['get'](r);this['editor']['enableReadOnlyMode']('rtc-destroyed'),_0x502a62['channelSessions']['has'](this['_channelId'])&&_0x502a62['unregister'](this['_channelId']),_0xcbcf25['removeFromReconnectionStack'](this),this['_disconnectService'](),super['destroy']();}async['_handleReconnectionResponse'](_0x2186b1){if(this['sessionId']!==_0x2186b1['sessionId']&&this['_lastSyncedOperationId']!==_0x2186b1['lastOperationId'])throw new J();return this['sessionId']=_0x2186b1['sessionId'],this['_handleServerResponse']([],{..._0x2186b1,'wereChangesApplied':!0x1,'data':_0x2186b1['data']},'reconnect');}async['_connectService'](_0x115d3f,_0x126af1=!0x1){const {connection:_0x182f24}=this['editor']['plugins']['get'](c);l['CollaborativeEditingService']['getConnectedSessions'](_0x182f24,this['_channelId'])['then'](_0x1622d7=>this['_initSessionsHandling'](_0x1622d7))['catch'](_0x5f55ec=>{this['_crash']('realtimecollaborationclient-init-session-connection-error',_0x5f55ec);}),this['listenTo'](this['_service'],'operationsReceived',this['_handleReceivedOperations']['bind'](this)),this['listenTo'](this['_service'],'error',(_0x3b6c2a,_0x2d038d)=>{this['_crash']('realtimecollaborationclient-initservice-internal-error',_0x2d038d);}),this['listenTo'](this['_service'],'disconnected',()=>{this['_isConnected']=!0x1;});const _0x2140f5=this['_operationIdentifier']['getIdOfTheLastOperation'](_0x115d3f);this['_isPendingUpdate']=!0x0;const _0x4f1b1c=await this['_service']['connect'](_0x182f24,this['_compressOperations'](_0x115d3f),_0x2140f5);if(this['sessionId']=_0x4f1b1c['sessionId'],_0x126af1){if(!_0x4f1b1c['wereChangesApplied'])return void this['_handleReconnectionError']();this['_isPendingUpdate']=!0x1,this['_clearPendingAction'](),this['serverHistory']['reset'](),this['_offset']=_0x4f1b1c['offset'],this['serverHistory']['version']=this['_offset'],await this['_handleServerResponse'](_0x115d3f,_0x4f1b1c,'reconnection:\x20flushed\x20session');}else await this['_handleInitialConnectionData'](_0x4f1b1c,_0x115d3f);this['_handleSendingSelectionMarkers'](),this['_isConnected']=!0x0;}['_handleSendingSelectionMarkers'](){const _0xcc5b6e=this['editor']['plugins']['get'](r),_0x551336=this['editor']['plugins']['get'](H),_0x209dcb=_0xcc5b6e['channelSessions']['get'](this['_channelId']);_0x209dcb&&_0x209dcb['length']>0x1?_0x551336['createUserMarkerOperations']():this['listenTo'](_0xcc5b6e,'sessionAdd:'+this['_channelId'],()=>{0x2===_0xcc5b6e['channelSessions']['get'](this['_channelId'])['length']&&_0x551336['createUserMarkerOperations']();});}async['_handleReceivedOperations'](_0x445582,_0x488ee3,_0x1f6298,_0x419c57){if(!this['_isPendingUpdate']&&this['_document']['version']==_0x488ee3){const _0x4dfccb=this['_decompressOperations'](_0x1f6298,_0x419c57);await this['_fetchMissingUsers'](_0x4dfccb),this['_handleExternalOperations'](_0x4dfccb,_0x488ee3,_0x1f6298['lastOperationId'])||this['_crash']('realtimecollaborationclient-initservice-incorrect-server-operation');}}async['_connectAfterSessionHasBeenFlushed'](){this['_disconnectService']();const {locale:_0x14ca3b}=this['editor'];let _0x9264ad;try{_0x9264ad=await this['_service']['getDocumentDetails']();}catch(_0x110438){const _0x4fe8a6=q(_0x14ca3b,'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'](_0x4fe8a6);}const _0x299a0d=_0x9264ad['currentDocumentSession']||_0x9264ad['lastDocumentSession'];if(this['_lastSyncedOperationId']===_0x299a0d['lastOperationId'])await this['_connectService'](this['editor']['model']['document']['history']['getOperations'](),!0x0);else{const _0x5aa06c=q(_0x14ca3b,'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'](_0x5aa06c);}}['_disconnectService'](){this['_service']['disconnect'](),this['_bufferedOperations']=[],clearTimeout(this['_sendBufferedOperationsDelayId']),this['stopListening'](this['_service']);}['_initSessionsHandling'](_0x401f38){const _0x3d389c=this['editor']['plugins']['get'](r);this['listenTo'](_0x3d389c,'sessionAdd:'+this['_channelId'],(_0x4d5915,{session:_0x2dc906})=>{if(_0x2dc906['id']===_0x3d389c['mySessionId']){_0x4d5915['off']();const _0x4ea091=this['editor']['plugins']['has']('CommentsOnly')&&this['editor']['plugins']['get']('CommentsOnly');let _0x161bec=_0x2dc906['permissions'];_0x4ea091&&_0x4ea091['isEnabled']&&(_0x161bec=_0x161bec['filter'](_0x362c07=>'document:write'!==_0x362c07)),this['editor']['plugins']['get']('Permissions')['setPermissions'](_0x161bec,this['_channelId']);}}),_0x3d389c['register'](this['_channelId'],_0x401f38);}['_initThrowingOnDataSet'](){const _0x4077dd=this['editor']['data']['set'];this['editor']['data']['set']=(..._0xd74b0a)=>{if(!_0xd74b0a[_0xd74b0a['length']-0x1]['suppressErrorInCollaboration'])throw new _0x2f1152('realtimecollaborationclient-editor-setdata-and-editor-data-set-are-forbidden-in-real-time-collaboration',this);_0x4077dd['apply'](this['editor']['data'],_0xd74b0a);};}['_setUpDataInit'](){this['editor']['data']['on']('init',(_0xf0f03,[_0x403ddc])=>{if(this['_document']['version'])throw new _0x2f1152('realtimecollaborationclient-init-document-already-initialized',this);_0xf0f03['stop'](),this['_setPendingAction']();const _0x61a415=this['editor']['config']['get']('rootsAttributes'),_0x4b0cc3=this['_getOperationsFromInitData'](_0x403ddc,_0x61a415);0x0==_0x4b0cc3['length']&&_0x4b0cc3['push'](new _0x3f58ba(0x0)),_0xf0f03['return']=this['_connectService'](_0x4b0cc3)['then'](()=>{this['editor']['plugins']['get'](c)['addToReconnectionStack'](this),this['editor']['data']['fire']('ready');})['catch'](_0x4c60a0=>this['_crash']('realtimecollaborationclient-init-connection-failed',_0x4c60a0))['finally'](()=>this['_clearPendingAction']());},{'priority':'high'}),this['editor']['on']('loadRoot',async(_0x1d8811,[_0x1ea8a6,_0x2389b1])=>{_0x1d8811['stop']();const _0x1abd54=this['editor']['model']['document']['getRoot'](_0x1ea8a6);if(!this['_knownRootNames']['has'](_0x1ea8a6)){const _0x446b04=_0x2389b1&&_0x2389b1['data']?_0x2389b1['data']:'',_0x20845b=_0x2389b1&&_0x2389b1['attributes']?_0x2389b1['attributes']:{};await this['_loadRoot'](_0x1ea8a6,_0x446b04,_0x20845b);}this['editor']['model']['enqueueChange']({'isUndoable':!0x1},()=>{_0x1abd54['_isLoaded']=!0x0,this['editor']['model']['document']['differ']['_bufferRootLoad'](_0x1abd54);});},{'priority':'high'});}async['_fetchMissingUsers'](_0x26238a){const _0x257be2=this['editor']['plugins']['get'](_0x58799e),{connection:_0x503f69}=this['editor']['plugins']['get'](c),_0x24c625=new Set();for(const _0x2a0c45 of _0x26238a){const _0x5124e0=_0x2a0c45['_authorId'];_0x5124e0&&!_0x257be2['getUser'](_0x5124e0)&&_0x24c625['add'](_0x5124e0);}if(0x0===_0x24c625['size'])return;const _0x15bfe5=await lt['getMany'](_0x503f69,Array['from'](_0x24c625));for(const _0x384ccc of _0x15bfe5)_0x257be2['getUser'](_0x384ccc['id'])||_0x257be2['addUser'](_0x384ccc);}['_getOperationsFromInitData'](_0x12bae7,_0x164c1e={}){const _0x21e22c=this['editor']['model'],_0x3cf188=[];let _0x274a66=0x0;const _0x3a6c1c='string'==typeof _0x12bae7?{'main':_0x12bae7}:_0x12bae7;for(const _0x4770d0 of Object['keys'](_0x3a6c1c)){if(!this['_document']['roots']['has'](_0x4770d0))throw new _0x2f1152('realtimecollaborationclient-init-non-existent-root',this);const _0x117d44=this['editor']['data']['parse'](_0x3a6c1c[_0x4770d0]),_0x222afd=this['_document']['getRoot'](_0x4770d0),_0x283777=new _0x416b8d(_0x21e22c['createPositionAt'](_0x222afd,0x0),_0x117d44,_0x274a66++);_0x3cf188['push'](_0x283777);for(const [_0x287687,_0x599e67]of _0x117d44['markers']){const _0x4150e5=_0x21e22c['createRange'](_0x21e22c['createPositionFromPath'](_0x222afd,_0x599e67['start']['path']['slice']()),_0x21e22c['createPositionFromPath'](_0x222afd,_0x599e67['end']['path']['slice']())),_0x23570=new _0x25332d(_0x287687,null,_0x4150e5,_0x21e22c['markers'],!0x0,_0x274a66++);_0x3cf188['push'](_0x23570);}}if(_0x164c1e)for(const [_0x4599f4,_0xa3f2b0]of Object['entries'](_0x164c1e)){const _0x573581=_0x21e22c['document']['getRoot'](_0x4599f4);if(!_0x573581)throw new _0x2f1152('multi-root-editor-root-attributes-no-root',null);for(const [_0x2ae715,_0x375c32]of Object['entries'](_0xa3f2b0))if(null!==_0x375c32){const _0x2c496d=new _0xb986a3(_0x573581,_0x2ae715,null,_0x375c32,_0x274a66++);_0x3cf188['push'](_0x2c496d);}}return _0x3cf188;}async['_loadRoot'](_0x445183,_0x3be1c9,_0x4ec779){this['_getOperationsFromInitData']({[_0x445183]:_0x3be1c9},{[_0x445183]:_0x4ec779})['forEach']((_0x159ddb,_0x5e87cf)=>{_0x159ddb['baseVersion']=this['_document']['version']+_0x5e87cf,_0x159ddb['_isInit']=!0x0,this['_saveOperationInBuffer'](_0x159ddb);}),this['_sendBufferedOperationsDelayed'](),await this['_waitUntilSynced']();}async['_handleInitialConnectionData'](_0x28338a,_0x162248){let _0x3051dd;this['_offset']=_0x28338a['offset'];const _0x5f2a7c=_0x28338a['wereChangesApplied']&&!_0x28338a['initData'],_0x3f046b=_0x5f2a7c?0x0:_0x28338a['data']['baseVersion'];if(_0x162248['forEach'](_0x54d741=>{_0x54d741['_isInit']=!0x0,_0x54d741['createdAt']=_0x28338a['sessionCreatedAt'],_0x54d741['_authorId']=null;}),_0x5f2a7c)_0x3051dd=_0x162248,this['_applyOperationsSet'](_0x3051dd,_0x5f2a7c);else{if(_0x28338a['initData']){const _0x32dd89=this['_getOperationsFromInitData'](_0x28338a['initData']);this['_document']['history']['version']=-_0x32dd89['length'],_0x32dd89['forEach'](_0x13c0b5=>{_0x13c0b5['baseVersion']-=_0x32dd89['length'],_0x13c0b5['createdAt']=_0x28338a['sessionCreatedAt'],_0x13c0b5['_isInit']=!0x0,_0x13c0b5['_authorId']=null;}),this['_applyOperationsSet'](_0x32dd89,!0x0),this['serverHistory']['version']=-_0x32dd89['length']+this['_offset'],this['_updateServerHistory'](_0x32dd89);}this['_document']['history']['version']=_0x3f046b,_0x3051dd=this['_decompressOperations'](_0x28338a['data'],_0x28338a['metadata']),await this['_fetchMissingUsers'](_0x3051dd),this['_applyOperationsSet'](_0x3051dd,_0x5f2a7c);}_0x28338a['lastOperationId']&&(this['_operationIdentifier']['setIdForTheLastOperation'](_0x3051dd,_0x28338a['lastOperationId']),this['_lastSyncedOperationId']=_0x28338a['lastOperationId']),this['serverHistory']['version']=_0x3f046b+this['_offset'],this['_updateServerHistory'](_0x3051dd),_0x162248['filter'](_0x3e58f4=>{const _0x5b6485=this['_getAffectedRoot'](_0x3e58f4);return _0x5b6485&&!this['_knownRootNames']['has'](_0x5b6485);})['forEach']((_0x2956b2,_0x5a51cd)=>{_0x2956b2['baseVersion']=this['_document']['version']+_0x5a51cd,this['_saveOperationInBuffer'](_0x2956b2);}),this['_shouldSendUpdate']()?(this['_currentBufferDelay']=0x0,this['_sendBufferedOperationsDelayed'](!0x0),await this['_waitUntilSynced']()):(this['_isPendingUpdate']=!0x1,this['_clearPendingAction']());}['_crash'](_0x1cec29,_0x2cd5bf){throw this['_isPendingUpdate']=!0x0,_0x2cd5bf&&console['error'](_0x2cd5bf),new _0x2f1152(_0x1cec29,this['editor']);}['_saveOperationInBuffer'](_0x1ff966){this['_knownOperations']['has'](_0x1ff966)||(this['_knownOperations']['add'](_0x1ff966),this['_bufferedOperations']['push'](_0x1ff966),this['_pendingAction']||'marker'==_0x1ff966['type']&&!_0x1ff966['affectsData']||this['_setPendingAction']());}['_sendBufferedOperationsDelayed'](_0x407312=!0x1){!_0x407312&&this['_isPendingUpdate']||(this['_isPendingUpdate']=!0x0,clearTimeout(this['_sendBufferedOperationsDelayId']),this['_sendBufferedOperationsDelayId']=setTimeout(()=>{this['_sendBufferedOperations']()['then'](_0x2adb13=>{_0x2adb13&&(this['_clearPendingAction'](),this['_isPendingUpdate']=!0x1);})['catch'](_0x3be477=>{if(this['_clearPendingAction'](),this['_isPendingUpdate']=!0x1,!function(_0x146145){return _0x146145['message']['startsWith']('cloud-services-internal-error:\x20Not\x20connected.')||_0x146145['message']['startsWith']('cloud-services-internal-error:\x20Collaborative\x20Editing\x20Service\x20is\x20not\x20connected.')||_0x146145['message']['startsWith']('cloud-services-internal-error:\x20Request\x20timeout.');}(_0x3be477))throw _0x3be477;});},this['_currentBufferDelay']));}['_waitUntilSynced'](){return new Promise(_0x7e5ee7=>{this['on']('change:_isPendingUpdate',()=>{_0x7e5ee7();});});}async['_sendBufferedOperations'](){const _0x4cfa2f=this['editor']['plugins']['get'](H);if(this['_shouldSendSelectionUpdate']()&&(_0x4cfa2f['createUserMarkerOperations'](),this['_hasSelectionChanged']=!0x1),!this['_shouldSendUpdate']())return!0x0;const _0x44414b=[...this['_bufferedOperations']];for(const _0x307d22 of _0x44414b)_0x307d22['wasUndone']=this['_document']['history']['isUndoneOperation'](_0x307d22);const _0x570f05=this['_operationIdentifier']['getIdOfTheLastOperation'](_0x44414b),_0x36d483=K++,_0x176143=this['_compressOperations'](_0x44414b),_0xfcc73b=await this['_service']['sendOperations'](_0x176143,_0x176143['baseVersion'],_0x570f05);try{return await this['_handleServerResponse'](_0x44414b,_0xfcc73b,_0x36d483);}catch(_0x40603e){return this['_crash']('realtimecollaborationclient-sendbufferedoperations',_0x40603e);}}async['_handleServerResponse'](_0x13efca,_0x369590,_0x58c33b){if('error'in _0x369590)throw _0x369590['error'];let _0x50d6ce=!0x1;if(_0x369590['wereChangesApplied']){_0x369590['lastOperationId']&&(this['_lastSyncedOperationId']=_0x369590['lastOperationId']),this['_bufferedOperations']=this['_bufferedOperations']['filter'](_0x3b0071=>!_0x13efca['includes'](_0x3b0071));for(const _0x19009b of _0x13efca)_0x19009b['createdAt']='lastOperationAcceptedAt'in _0x369590&&_0x369590['lastOperationAcceptedAt']||void 0x0;Q(_0x13efca,_0x369590['version']-_0x13efca['length']),this['_updateServerHistory'](_0x13efca);const _0x26cea2=_0x13efca['filter'](_0x25f771=>{if(!_0x25f771['_isInit'])return!0x1;const _0x16df28=this['_getAffectedRoot'](_0x25f771);return _0x16df28&&!this['_knownRootNames']['has'](_0x16df28);});Q(_0x26cea2,this['_document']['version']),this['_applyOperationsSet'](_0x26cea2),_0x50d6ce=!0x0,this['_currentBufferDelay']=this['_baseBufferDelay'];}else{const _0xc3a68d=this['_decompressOperations'](_0x369590['data'],_0x369590['metadata'])['filter'](_0x5b308f=>_0x5b308f['baseVersion']>=this['_lastServerVersion']);_0xc3a68d['forEach'](_0x4e374f=>this['_addKnownRoot'](_0x4e374f)),this['_bufferedOperations']=this['_bufferedOperations']['filter'](_0x1e63b5=>!_0x1e63b5['_isInit']||!this['_knownRootNames']['has'](this['_getAffectedRoot'](_0x1e63b5))),this['_bufferedOperations']['length']&&Q(this['_bufferedOperations'],this['_bufferedOperations'][0x0]['baseVersion']),await this['_fetchMissingUsers'](_0xc3a68d),_0x50d6ce=this['_handleExternalOperations'](_0xc3a68d,_0x369590['version'],_0x369590['lastOperationId']),this['_currentBufferDelay']=Math['round'](this['_currentBufferDelay']/0x2);}return _0x50d6ce?!this['_shouldSendUpdate']()||(this['_sendBufferedOperationsDelayed'](!0x0),!0x1):this['_crash']('realtimecollaborationclient-handleserverresponse');}['_handleExternalOperations'](_0x38926a,_0xe15514,_0x36dc53){try{const _0x2554ab={'document':this['_document'],'useRelations':!0x1,'padWithNoOps':!0x0},{operationsA:_0x2cc705,operationsB:_0x267cba,originalOperations:_0x379260}=_0x223272(_0x38926a,this['_bufferedOperations'],_0x2554ab);Q(_0x2cc705,this['_document']['version']),Q(_0x267cba,_0xe15514);for(const _0x7127fc of _0x2cc705){const _0x5b6d90=_0x379260['get'](_0x7127fc);_0x7127fc['_authorId']=_0x5b6d90?_0x5b6d90['_authorId']:null;}_0x36dc53&&(this['_operationIdentifier']['setIdForTheLastOperation'](_0x38926a,_0x36dc53),this['_lastSyncedOperationId']=_0x36dc53),this['_bufferedOperations']=[..._0x267cba],this['_applyOperationsSet'](_0x2cc705),this['_updateServerHistory'](_0x38926a);}catch(_0x259cae){return console['error'](_0x259cae),!0x1;}return!0x0;}['_applyOperationsSet'](_0x348bef,_0x5d12a1=!0x1){this['editor']['model']['enqueueChange']({'isUndoable':!0x1,'isLocal':!0x1},_0x3f1850=>{for(const _0x45acfe of _0x348bef)this['_knownOperations']['add'](_0x45acfe),this['_addKnownRoot'](_0x45acfe),_0x3f1850['batch']['addOperation'](_0x45acfe),this['editor']['model']['applyOperation'](_0x45acfe);});}['_addKnownRoot'](_0x57e6da){const _0xfff9f8=this['_getAffectedRoot'](_0x57e6da);_0xfff9f8&&this['_knownRootNames']['add'](_0xfff9f8);}['_getAffectedRoot'](_0x2a75af){let _0x116a6a,_0x274fa3;switch(_0x2a75af['type']){case'insert':_0x116a6a=_0x2a75af['position']['root'];break;case'marker':if(_0x274fa3=_0x2a75af['newRange'],!_0x274fa3)return null;_0x116a6a=_0x274fa3['root'];break;case'addRootAttribute':_0x116a6a=_0x2a75af['root'];break;case'addRoot':_0x116a6a=_0x2a75af['affectedSelectable'];break;case'move':_0x116a6a=_0x2a75af['targetPosition']['root'];break;default:return null;}return _0x116a6a['rootName'];}['_updateServerHistory'](_0x406e9a){_0x406e9a['forEach'](_0x17b719=>{const _0xa9be2c=_0x17b719['clone']();_0xa9be2c['_authorId']=_0x17b719['_authorId'],_0xa9be2c['_isInit']=!!_0x17b719['_isInit'],_0xa9be2c['createdAt']=_0x17b719['createdAt'],_0xa9be2c['baseVersion']+=this['_offset'],_0x17b719['_isDisconnection']&&this['_disconnectionOperations']['add'](_0xa9be2c),this['serverHistory']['addOperation'](_0xa9be2c);});}['_handleReconnectionError'](_0x12d13f){const _0x311c7c=this['editor']['plugins']['get']('Notification'),_0x4ef1fc=this['editor']['locale'];_0x12d13f||(_0x12d13f=q(_0x4ef1fc,'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.')),_0x311c7c['showWarning'](_0x12d13f,{'title':q(_0x4ef1fc,'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'](_0x31d204)['add'](q(this['editor']['locale'],'PENDING_ACTION_SENDING_DATA')));}['_clearPendingAction'](){this['_pendingAction']&&(this['editor']['plugins']['get'](_0x31d204)['remove'](this['_pendingAction']),this['_pendingAction']=null);}['_compressOperations'](_0x109704){const _0x5d283b=_0x109704['map'](_0x25074b=>_0x25074b['toJSON']());return this['_compressor']['compress'](_0x5d283b);}['_decompressOperations'](_0x1902ab,_0x53759f){return this['_compressor']['decompress'](_0x1902ab)['map']((_0x9bbf84,_0x315713)=>{const _0x33f3a0='init'==_0x53759f[_0x315713]['type'];if('InsertOperation'==_0x9bbf84['__className']){const _0x16e064=_0x9bbf84['position']['root'];!this['_document']['getRoot'](_0x16e064)&&(this['_document']['createRoot']('$root',_0x16e064)['_isAttached']=!0x1);}const _0x2663e3=_0x117e20['fromJSON'](_0x9bbf84,this['_document']);return _0x2663e3['wasUndone']=_0x9bbf84['wasUndone'],_0x2663e3['_isInit']=_0x33f3a0,_0x2663e3['_authorId']=_0x33f3a0?null:_0x53759f[_0x315713]['userId'],_0x2663e3['_isDisconnection']='cs:removeUser'===_0x53759f[_0x315713]['type'],_0x2663e3['createdAt']=_0x53759f[_0x315713]['createdAt'],_0x2663e3;});}['_refreshUserSelectionMarkers'](){this['_hasSelectionChanged']=!0x0,this['_shouldSendSelectionUpdate']()?this['_sendBufferedOperationsDelayed']():this['_hasSelectionChanged']=!0x1;}['_shouldSendSelectionUpdate'](){const _0x384088=this['editor']['plugins']['get'](r)['channelSessions']['get'](this['_channelId']);return!this['editor']['isReadOnly']&&!!_0x384088&&_0x384088['length']>0x1&&this['_hasSelectionChanged'];}['_shouldSendUpdate'](){return this['_bufferedOperations']['length']>0x0||this['_shouldSendSelectionUpdate']();}}class J extends Error{}function Q(_0x31543f,_0x23b700){for(const _0x2449df of _0x31543f)_0x2449df['baseVersion']=_0x23b700++;}class X{['_ignoredOperations'];['_operationToId'];constructor(_0x51e2c1){this['_ignoredOperations']=_0x51e2c1,this['_operationToId']=new WeakMap();}['getIdOfTheLastOperation'](_0x2022dd){let _0x5b3cc6=_0x2022dd['length'];for(;_0x5b3cc6--;){const _0x289999=_0x2022dd[_0x5b3cc6];if(!this['_ignoredOperations']['has'](_0x289999)){if(!this['_operationToId']['has'](_0x289999)){const _0x3462f1=_0xf9d96c()['slice'](0x1,0x12);this['_operationToId']['set'](_0x289999,_0x3462f1);}return this['_operationToId']['get'](_0x289999);}}}['setIdForTheLastOperation'](_0x2c33c4,_0x2c8f9){if(!_0x2c8f9)return;let _0x22832c=_0x2c33c4['length'];for(;_0x22832c--;){const _0x4b7d0e=_0x2c33c4[_0x22832c];this['_ignoredOperations']['has'](_0x4b7d0e)||this['_operationToId']['set'](_0x4b7d0e,_0x2c8f9);}}}class n extends _0x49cfea{static get['requires'](){return[l];}static get['pluginName'](){return'RealTimeCollaborativeEditing';}}class a extends _0x4fe8b7{static ['CommentsService']=/* #__PURE__ -- @preserve */
|
|
26
|
-
((()=>_0x500c45)());['_services'];static get['requires'](){return[c,'CommentsRepository',r,_0x58799e];}static get['pluginName'](){return'CloudServicesCommentsAdapter';}constructor(_0x41c955){super(_0x41c955),this['_services']=new Map();}async['init'](){const _0x52835d=this['context'],_0x27a807=_0x52835d['plugins']['get']('CommentsRepository');if(_0x52835d['plugins']['get'](c)['addToReconnectionStack'](this),_0x27a807['adapter']={'addCommentThread':async({channelId:_0x24f388,threadId:_0x5360e8,comments:_0x2fc4e6,resolvedAt:_0x28e64f,resolvedBy:_0x3ec414,context:_0x1adc6c,attributes:_0x2cd122})=>{const _0x5df5aa=await this['_getService'](_0x24f388)['addCommentThread']({'commentThreadId':_0x5360e8,'comments':_0x2fc4e6['map'](_0x5bd89b=>function(_0x4bca76,_0xedc5d3,_0x4f593d){return{'commentThreadId':_0x4f593d,'commentId':_0x4bca76['commentId'],'userId':_0x4bca76['authorId'],'content':_0x4bca76['content'],'documentId':_0xedc5d3,'createdAt':_0x4bca76['createdAt'],'attributes':_0x4bca76['attributes']||{}};}(_0x5bd89b,_0x24f388,_0x5360e8)),'resolvedAt':_0x28e64f,'resolvedBy':_0x3ec414,'context':_0x1adc6c,'attributes':_0x2cd122})['catch'](ut);return{'threadId':_0x5df5aa['commentThreadId'],'comments':_0x5df5aa['comments']};},'getCommentThread':async({channelId:_0x130a7f,threadId:_0x1db859})=>{const _0x5874f4=await this['_getService'](_0x130a7f)['getCommentThread'](_0x1db859)['catch'](ut);return _0x5874f4['deletedAt']?null:(await this['_fetchMissingUsersForThreads']([_0x5874f4]),{'threadId':_0x5874f4['commentThreadId'],'comments':_0x5874f4['comments']['map'](S),'context':_0x5874f4['context'],'resolvedAt':_0x5874f4['resolvedAt'],'resolvedBy':_0x5874f4['resolvedBy'],'attributes':_0x5874f4['attributes']||{}});},'updateCommentThread':async({channelId:_0x3b85aa,threadId:_0x3918aa,context:_0x30f887,unlinkedAt:_0x471ac8,attributes:_0x576f09})=>this['_getService'](_0x3b85aa)['updateCommentThread']({'commentThreadId':_0x3918aa,'context':_0x30f887,'attributes':_0x576f09,'unlinkedAt':_0x471ac8})['catch'](B)['catch'](ut),'resolveCommentThread':async({channelId:_0x20588d,threadId:_0x48ee2f})=>{const _0x17bf00=await this['_getService'](_0x20588d)['resolveCommentThread'](_0x48ee2f)['catch'](B)['catch'](ut);return{'threadId':_0x17bf00['commentThreadId'],'resolvedAt':_0x17bf00['resolvedAt'],'resolvedBy':_0x17bf00['resolvedBy']};},'reopenCommentThread':async({channelId:_0x12e2ac,threadId:_0x1a0ef1})=>this['_getService'](_0x12e2ac)['reopenCommentThread'](_0x1a0ef1)['catch'](B)['catch'](ut),'removeCommentThread':({channelId:_0x1afc10,threadId:_0x3afabe})=>this['_getService'](_0x1afc10)['removeCommentThread'](_0x3afabe)['catch'](B)['catch'](ut),'addComment':({channelId:_0x3b5ee3,threadId:_0x2e0d4d,commentId:_0x153147,content:_0x4e8df6,attributes:_0x47666b})=>this['_getService'](_0x3b5ee3)['addComment'](_0x2e0d4d,_0x153147,_0x4e8df6,_0x47666b)['catch'](ut),'updateComment':({channelId:_0x253ce6,threadId:_0x1e9e5c,commentId:_0x56a3aa,content:_0x38cb31,attributes:_0x45fabe})=>this['_getService'](_0x253ce6)['updateComment'](_0x1e9e5c,_0x56a3aa,_0x38cb31,_0x45fabe)['catch'](B)['catch'](ut),'removeComment':({channelId:_0x2c3e7d,threadId:_0x3e2b72,commentId:_0x1bc321})=>this['_getService'](_0x2c3e7d)['removeComment'](_0x3e2b72,_0x1bc321)['catch'](B)['catch'](ut)},_0x52835d instanceof _0x17e805){const _0x3780ab=_0x52835d['config']['get']('collaboration.channelId'),_0x1e4ddc=_0x52835d['plugins']['get'](r);await this['_setUpService'](_0x3780ab);const _0x6bde53=await this['_services']['get'](_0x3780ab)['getConnectedSessions']();this['listenTo'](_0x1e4ddc,'sessionAdd:'+_0x3780ab,(_0x576b1a,{session:_0x37e353})=>{_0x37e353['id']===_0x1e4ddc['mySessionId']&&(_0x576b1a['off'](),this['context']['plugins']['get']('Permissions')['setPermissions'](_0x37e353['permissions'],_0x3780ab));}),_0x1e4ddc['register'](_0x3780ab,_0x6bde53);}}async['_setUpService'](_0xc65889){if(this['_services']['has'](_0xc65889))throw new _0x2f1152('cloudservicescommentsadapter-connect-already-connected',null,{'channelId':_0xc65889});const _0x3da11b=this['context']['plugins']['get']('CommentsRepository'),_0xf5f03=new a['CommentsService'](_0xc65889);this['_services']['set'](_0xc65889,_0xf5f03),this['listenTo'](_0xf5f03,'commentThreadAdded',(_0x45d20c,_0xe48d30)=>{const {commentThreadId:_0x48b6c8,documentId:_0x972dd5,context:_0x485d09,attributes:_0x34a210,resolvedAt:_0x38467b,resolvedBy:_0x47f582,comments:_0x581aa8}=_0xe48d30;_0x3da11b['getCommentThread'](_0x48b6c8)||_0x3da11b['addCommentThread']({'threadId':_0x48b6c8,'channelId':_0x972dd5,'comments':_0x581aa8?_0x581aa8['map'](S):[],'context':_0x485d09,'attributes':_0x34a210,'resolvedAt':_0x38467b,'resolvedBy':_0x47f582,'isFromAdapter':!0x0});}),this['listenTo'](_0xf5f03,'commentThreadUpdated',(_0x3ff3dd,{commentThreadId:_0x1bcea3,documentId:_0x4461b5,context:_0x1ed214,unlinkedAt:_0x2ac41d,attributes:_0x4e2f79})=>{_0x3da11b['getCommentThread'](_0x1bcea3)&&_0x3da11b['updateCommentThread']({'threadId':_0x1bcea3,'channelId':_0x4461b5,'context':_0x1ed214,'unlinkedAt':_0x2ac41d,'attributes':_0x4e2f79,'isFromAdapter':!0x0});}),this['listenTo'](_0xf5f03,'commentThreadResolved',(_0x29ac5e,{commentThreadId:_0x47dda8,resolvedBy:_0xeae7f6,resolvedAt:_0x1bdb63})=>{const _0x5508e4=_0x3da11b['getCommentThread'](_0x47dda8);_0x5508e4&&_0x5508e4['resolve']({'resolvedBy':_0xeae7f6,'resolvedAt':_0x1bdb63,'isFromAdapter':!0x0});}),this['listenTo'](_0xf5f03,'commentThreadReopened',(_0x2fab9e,{commentThreadId:_0x267bfa})=>{const _0x375b75=_0x3da11b['getCommentThread'](_0x267bfa);_0x375b75&&_0x375b75['reopen']({'isFromAdapter':!0x0});}),this['listenTo'](_0xf5f03,'commentThreadRemoved',(_0x21e3ee,{commentThreadId:_0x195737})=>{const _0x711a63=_0x3da11b['getCommentThread'](_0x195737);_0x711a63&&_0x711a63['remove']({'isFromAdapter':!0x0});}),this['listenTo'](_0xf5f03,'commentAdded',(_0x31628,_0x4ce002)=>{const _0x445586=_0x4ce002['commentThreadId'],_0x598ddd=_0x3da11b['getCommentThread'](_0x445586);_0x598ddd&&_0x598ddd['addComment']({...S(_0x4ce002),'isFromAdapter':!0x0});}),this['listenTo'](_0xf5f03,'commentUpdated',(_0x3f7236,{commentThreadId:_0x23f1ef,commentId:_0x32a61e,content:_0xfccd01,attributes:_0x4ca58c})=>{const _0x5c6579=_0x3da11b['getCommentThread'](_0x23f1ef);if(_0x5c6579){const _0x449a87=_0x5c6579['getComment'](_0x32a61e);_0x449a87&&_0x449a87['update']({'content':_0xfccd01,'attributes':_0x4ca58c,'isFromAdapter':!0x0});}}),this['listenTo'](_0xf5f03,'commentRemoved',(_0x25e42b,{commentThreadId:_0x425de7,commentId:_0x2ed92a})=>{const _0x422489=_0x3da11b['getCommentThread'](_0x425de7);if(_0x422489){const _0x17bb7d=_0x422489['getComment'](_0x2ed92a);_0x17bb7d&&_0x17bb7d['remove']({'isFromAdapter':!0x0});}}),await this['_connectService'](_0xc65889);}['destroy'](){if(this['context']instanceof _0x17e805){const _0x28f120=this['context']['config']['get']('collaboration.channelId');this['_terminateService'](_0x28f120);}}['_terminateService'](_0x130952){if(!this['_services']['has'](_0x130952))throw new _0x2f1152('cloudservicescommentsadapter-disconnect-not-exist',null,{'channelId':_0x130952});this['_getService'](_0x130952)['disconnect'](),this['_services']['delete'](_0x130952);}async['reconnect'](){for(const _0x557430 of this['_services']['keys']())await this['_connectService'](_0x557430);if(this['context']instanceof _0x17e805){const _0x46aeee=this['context']['config']['get']('collaboration.channelId'),_0x31686e=this['context']['plugins']['get'](r);_0x31686e['unregister'](_0x46aeee);const _0x2ef7a9=await this['_services']['get'](_0x46aeee)['getConnectedSessions']();_0x31686e['register'](_0x46aeee,_0x2ef7a9);}}async['_connectService'](_0x1c5b52){const {connection:_0x237806}=this['context']['plugins']['get'](c),_0x3aa25b=this['context']['plugins']['get']('CommentsRepository'),_0x11e290=this['_services']['get'](_0x1c5b52),_0x15e15c=await _0x11e290['connect'](_0x237806);await this['_fetchMissingUsersForThreads'](_0x15e15c);const _0x4d73a8=new Set(Array['from'](_0x3aa25b['getCommentThreads']({'channelId':_0x1c5b52}),_0x56002b=>_0x56002b['id']));for(const _0x428495 of _0x15e15c)_0x428495['deletedAt']||_0x4d73a8['delete'](_0x428495['commentThreadId']);for(const _0x43cb5e of _0x4d73a8)_0x3aa25b['getCommentThread'](_0x43cb5e)['remove']({'isFromAdapter':!0x0});for(const _0x142ab8 of _0x15e15c){let _0x3c8693=_0x3aa25b['getCommentThread'](_0x142ab8['commentThreadId']);const {commentThreadId:_0x11f126,context:_0x16c709,attributes:_0x47cde4,resolvedBy:_0x224dee,resolvedAt:_0x1be18d,unlinkedAt:_0x2ad23b,deletedAt:_0x1cf776}=_0x142ab8;if(_0x1cf776)continue;_0x3c8693||(_0x3c8693=_0x3aa25b['addCommentThread']({'channelId':_0x1c5b52,'threadId':_0x11f126,'context':_0x16c709,'attributes':_0x47cde4||{},'resolvedBy':_0x224dee,'resolvedAt':_0x1be18d,'unlinkedAt':_0x2ad23b,'isFromAdapter':!0x0}));const _0x13c04d=new Set(Array['from'](_0x3c8693['comments'],_0x110703=>_0x110703['id']));for(const _0x250ef9 of _0x142ab8['comments'])_0x13c04d['delete'](_0x250ef9['commentId']);for(const _0x48ab73 of _0x13c04d)_0x3c8693['getComment'](_0x48ab73)['remove']({'isFromAdapter':!0x0});for(const _0x359c4f of _0x142ab8['comments']){const _0x2b6b7d=_0x3c8693['getComment'](_0x359c4f['commentId']);_0x2b6b7d?_0x2b6b7d['content']!==_0x359c4f['content']&&_0x2b6b7d['update']({'content':_0x359c4f['content'],'isFromAdapter':!0x0}):_0x3c8693['addComment'](Object['assign'](S(_0x359c4f),{'isFromAdapter':!0x0}));}}}['_getService'](_0x1cddd7){if(!this['_services']['has'](_0x1cddd7))throw new _0x2f1152('cloudservicescommentsadapter-service-not-exist',null,{'channelId':_0x1cddd7});return this['_services']['get'](_0x1cddd7);}async['_fetchMissingUsersForThreads'](_0x2216a7){const _0x3d9233=this['context']['plugins']['get'](_0x58799e),{connection:_0xcfac1b}=this['context']['plugins']['get'](c),_0x2b9d77=new Set();for(const {resolvedBy:_0x3a55dc,comments:_0x2a320a}of _0x2216a7){_0x3a55dc&&!_0x3d9233['getUser'](_0x3a55dc)&&_0x2b9d77['add'](_0x3a55dc);for(const {userId:_0x9f262f}of _0x2a320a)_0x3d9233['getUser'](_0x9f262f)||_0x2b9d77['add'](_0x9f262f);}if(0x0===_0x2b9d77['size'])return;const _0x9b4e51=await lt['getMany'](_0xcfac1b,Array['from'](_0x2b9d77));for(const _0x333c00 of _0x9b4e51)_0x3d9233['getUser'](_0x333c00['id'])||_0x3d9233['addUser'](_0x333c00);}}async function B(_0x1c2803){if('404'!==_0x1c2803['code'])throw _0x1c2803;}function ut(_0x340680){if((_0x12bbba=_0x340680)['message']['startsWith']('cloud-services-internal-error:\x20Comments\x20Service\x20is\x20not\x20connected.')||_0x12bbba['message']['startsWith']('cloud-services-internal-error:\x20Not\x20connected.')||_0x12bbba['message']['startsWith']('cloud-services-internal-error:\x20Request\x20timeout.'))return new Promise(()=>{});var _0x12bbba;throw _0x340680;}function S(_0xbaa98a){return{'threadId':_0xbaa98a['commentThreadId'],'commentId':_0xbaa98a['commentId'],'content':_0xbaa98a['content'],'createdAt':_0xbaa98a['createdAt'],'authorId':_0xbaa98a['userId'],'attributes':_0xbaa98a['attributes']||{}};}class g extends _0x49cfea{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,_0x58799e];}constructor(_0x35ff41){super(_0x35ff41);const _0x4b78f3=this['editor']['config']['get']('collaboration.channelId');this['_lastRequestId']=null,this['_revisionTracker']=this['editor']['plugins']['get']('RevisionTracker'),this['_revisionHistoryService']=new v['RevisionHistoryService'](_0x4b78f3);}async['init'](){const _0x5f26e8=this['editor']['plugins']['get'](l),_0x5d96d5=_0x5f26e8['serverHistory'],_0x55daaa=this['editor']['plugins']['get'](c);this['_revisionTracker']['setSource']({'history':_0x5d96d5,'getLatestVersion':()=>this['_getLatestVersion'](),'getCurrentRevisionId':()=>_0x5f26e8['sessionId']});const _0x4d79e9=this['editor']['config']['get']('cloudServices.bundleVersion')||nt,_0xeafd51=await tt['isBundleUploaded'](_0x55daaa['connection'],_0x4d79e9);this['_revisionTracker']['adapter']={'getRevision':async({revisionId:_0x154b16})=>(await this['_waitForServiceReady'](),await this['_revisionHistoryService']['getRevision'](_0x154b16)),'updateRevisions':async _0x3c05c6=>{await this['_waitForServiceReady']();const _0x3baab9=this['_revisionTracker']['currentRevision'];if(_0xeafd51&&0x1===_0x3c05c6['length']&&_0x3c05c6[0x0]['id']===_0x3baab9['id'])return _0x3c05c6;for(const _0x30c1f1 of _0x3c05c6)_0x30c1f1['id']===_0x3baab9['id']&&(_0x30c1f1['isEmptyCurrent']=_0x30c1f1['fromVersion']===_0x30c1f1['toVersion']);return this['_revisionHistoryService']['updateRevisions'](_0x3c05c6,this['_lastRequestId'])['then'](_0x3416f4=>(this['_lastRequestId']=_0x3416f4,_0x3c05c6))['catch'](_0x3bef50=>{if(st(_0x3bef50)||'400'===_0x3bef50['code']&&void 0x0!==_0x3bef50['data']['wrongRequestId']){for(const _0x2e32ab of _0x3c05c6){!this['_revisionTracker']['repository']['getRevision'](_0x2e32ab['id'])||this['_revisionTracker']['_bufferUpdate'](_0x2e32ab['id'],_0x2e32ab,!0x1);}if(st(_0x3bef50))throw _0x3bef50;return _0x3c05c6;}throw _0x3bef50;});}},this['listenTo'](this['_revisionHistoryService'],'revisionsUpdated',(_0x9472d,{revisionsData:_0x4d69d2,requestId:_0x805af7})=>{Math['max'](..._0x4d69d2['map'](_0x5c44bc=>_0x5c44bc['toVersion']))>this['_getLatestVersionFromServerOperations']()-0x1?this['_getLatestVersion']()['then'](()=>{this['_handleRevisionsUpdate'](_0x4d69d2,_0x805af7);}):this['_handleRevisionsUpdate'](_0x4d69d2,_0x805af7);});const {revisions:_0x2ce3ff,requestId:_0x3dcdbf}=await this['_revisionHistoryService']['connect'](_0x55daaa['connection']);_0x55daaa['addToReconnectionStack'](this),this['_lastRequestId']=_0x3dcdbf,await this['_fetchMissingUsers'](_0x2ce3ff);for(const _0x218139 of _0x2ce3ff)this['_revisionTracker']['addRevisionData'](_0x218139);this['listenTo'](_0x5f26e8,'change:_isConnected',(_0x557b3f,_0x1e619b,_0xbfa942)=>{_0xbfa942&&(this['_oldOffset']=_0x5f26e8['_offset'],_0x557b3f['off']());}),this['_revisionTracker']['bind']('isEnabled')['to'](_0x55daaa,'state',_0xe79df5=>_0xe79df5===_0x23693a['CONNECTED']);}async['reconnect'](){const _0x183ee7=this['editor']['plugins']['get'](c),_0x5772ec=this['editor']['plugins']['get'](l),_0x264354=async()=>{const _0x3da61f=this['_revisionTracker']['currentRevision'],_0x5e5193=_0x3da61f['id'],_0x52e9d6=_0x5e5193!==_0x5772ec['sessionId'];if(_0x52e9d6){const _0x43e88f=_0x5772ec['_offset']-this['_oldOffset'],_0x1073b0=this['_getLatestVersionFromServerOperations']();this['_revisionTracker']['_revisionDataBuilder']['reInit']();if(_0x3da61f['toVersion']+_0x43e88f!==_0x1073b0){const _0x1cc21a=_0x3da61f['fromVersion']+_0x43e88f,_0x553302=this['editor']['plugins']['get'](_0x58799e),_0x128eb2=this['_revisionTracker']['buildRevisionData']({'revision':_0x3da61f,'from':_0x1cc21a,'to':_0x1073b0});_0x128eb2['id']=_0x3da61f['id'];const _0x5958c7=_0x128eb2['authorsIds']['map'](_0x464b85=>_0x553302['getUser'](_0x464b85));_0x3da61f['_update']({..._0x128eb2,'authors':_0x5958c7},!0x0),this['_revisionTracker']['_bufferUpdate'](_0x3da61f['id'],_0x128eb2,!0x0);}this['_revisionTracker']['_startingVersion']=_0x1073b0,(_0x3da61f['toVersion']===_0x3da61f['fromVersion']&&!this['_revisionTracker']['_bufferedUpdates']['has'](_0x5e5193)&&this['_revisionTracker']['repository']['_revisions']['remove'](_0x5e5193),this['_revisionTracker']['_createCurrentRevision'](_0x1073b0));}const {revisions:_0xf7eaed,requestId:_0x43dbe8}=await this['_revisionHistoryService']['reconnect'](_0x183ee7['connection'],this['_lastRequestId']);_0x52e9d6&&_0xf7eaed['length']>0x0?_0x5772ec['_handleReconnectionError']():(await this['_fetchMissingUsers'](_0xf7eaed),this['_handleRevisionsUpdate'](_0xf7eaed,_0x43dbe8),this['_revisionTracker']['sendBufferedUpdates']());};return _0x5772ec['_isConnected']?_0x264354():new Promise((_0x235358,_0x4b7edf)=>{_0x5772ec['once']('change:_isConnected',()=>{_0x264354()['then'](_0x235358)['catch'](_0x4b7edf);});});}['destroy'](){super['destroy']();}async['_waitForServiceReady'](){this['_revisionHistoryService']['isConnected']||await new Promise(_0x31ca9b=>{this['listenTo'](this['_revisionHistoryService'],'connected',_0xf83d3d=>{_0xf83d3d['off'](),_0x31ca9b();});});}['_getLatestVersionFromServerOperations'](){const _0x247e97=this['editor']['plugins']['get'](l)['serverHistory']['getOperations']()['reverse']();for(const _0x2b9635 of _0x247e97)if('marker'!==_0x2b9635['type']||_0x2b9635['affectsData'])return _0x2b9635['baseVersion']+0x1;}['_getLatestVersion'](){const _0x6747ed=this['editor']['plugins']['get'](l);return new Promise(_0x49dc4c=>{_0x6747ed['_isPendingUpdate']?_0x6747ed['once']('change:_isPendingUpdate',()=>{_0x49dc4c(this['_getLatestVersionFromServerOperations']());}):_0x49dc4c(this['_getLatestVersionFromServerOperations']());});}['_handleRevisionsUpdate'](_0x23f1c8,_0x4fe08b){const _0x4d1b22=this['_revisionTracker']['repository'];this['_lastRequestId']=_0x4fe08b;for(const _0x3984d9 of _0x23f1c8){const _0x2e0ff5=_0x4d1b22['getRevision'](_0x3984d9['id']);if(_0x2e0ff5){if((_0x3984d9['fromVersion']||_0x3984d9['toVersion'])&&(_0x3984d9['diffData']=null),_0x2e0ff5===this['_revisionTracker']['currentRevision']){const _0x9603b7=Math['max'](_0x2e0ff5['toVersion'],_0x3984d9['toVersion']),_0x3ddcaf=Math['max'](_0x2e0ff5['fromVersion'],_0x3984d9['fromVersion']);let _0x550afe;_0x2e0ff5['toVersion']===_0x3984d9['toVersion']&&_0x2e0ff5['fromVersion']===_0x3984d9['fromVersion']?(_0x550afe=!0x0,this['_preventResendingRevisionData'](_0x3984d9)):_0x3984d9['toVersion']===_0x9603b7&&_0x3984d9['fromVersion']===_0x3ddcaf?_0x550afe=!0x1:(_0x2e0ff5['toVersion']===_0x9603b7&&_0x2e0ff5['fromVersion']===_0x3ddcaf||this['_fixRevision']({'revision':_0x2e0ff5,'from':_0x3ddcaf,'to':_0x9603b7}),_0x550afe=!0x0),_0x550afe&&(delete _0x3984d9['fromVersion'],delete _0x3984d9['toVersion'],delete _0x3984d9['diffData'],delete _0x3984d9['createdAt'],delete _0x3984d9['authorsIds']);}this['_revisionTracker']['setRevisionData'](_0x3984d9),this['_preventResendingRevisionData'](_0x3984d9);}else this['_revisionTracker']['addRevisionData'](_0x3984d9);}const _0x210d8d=_0x4d1b22['getRevisions']();_0x210d8d['reverse']();for(let _0x5eccc0=0x0;_0x5eccc0<_0x210d8d['length']-0x1;_0x5eccc0++){const _0x25759f=_0x210d8d[_0x5eccc0],_0x2829af=_0x210d8d[_0x5eccc0+0x1];if(_0x25759f['fromVersion']<_0x2829af['toVersion']){const _0xac269=_0x2829af['toVersion'],_0x25061a=Math['max'](_0xac269,_0x25759f['toVersion']);this['_fixRevision']({'revision':_0x25759f,'from':_0xac269,'to':_0x25061a});}}}['_fixRevision']({revision:_0x1d34cc,from:_0x21a2b4,to:_0x5f2590}={}){const _0x41e039=this['editor']['plugins']['get'](_0x58799e),_0x2866ce=this['_revisionTracker']['buildRevisionData']({'revision':_0x1d34cc,'from':_0x21a2b4,'to':_0x5f2590});_0x2866ce['authors']=_0x2866ce['authorsIds']['map'](_0x340406=>_0x41e039['getUser'](_0x340406)),_0x1d34cc['_update'](_0x2866ce);}['_preventResendingRevisionData'](_0x18f802){const _0x30c088={};_0x30c088['id']=_0x18f802['id'];for(const _0x7e250c of Object['keys'](_0x18f802))'id'!==_0x7e250c&&(_0x30c088[_0x7e250c]=void 0x0);this['_revisionTracker']['_bufferUpdate'](_0x30c088['id'],_0x30c088,!0x0);}async['_fetchMissingUsers'](_0x95ba5c){const _0x2c9de8=this['editor']['plugins']['get'](_0x58799e),{connection:_0x1502a5}=this['editor']['plugins']['get'](c),_0x10673f=new Set();for(const _0x4a2bf3 of _0x95ba5c){for(const _0x55cf35 of _0x4a2bf3['authorsIds'])_0x412482(_0x55cf35);_0x4a2bf3['creatorId']&&_0x412482(_0x4a2bf3['creatorId']);}if(0x0===_0x10673f['size'])return;const _0x463b91=await lt['getMany'](_0x1502a5,Array['from'](_0x10673f));for(const _0x3d231a of _0x463b91)_0x2c9de8['getUser'](_0x3d231a['id'])||_0x2c9de8['addUser'](_0x3d231a);function _0x412482(_0xbf3c0e){_0x2c9de8['getUser'](_0xbf3c0e)||_0x10673f['add'](_0xbf3c0e);}}}function st(_0x2dcf3f){return _0x2dcf3f['message']['startsWith']('cloud-services-internal-error:\x20Revision\x20History\x20Service\x20is\x20not\x20connected.')||_0x2dcf3f['message']['startsWith']('cloud-services-internal-error:\x20Not\x20connected.')||_0x2dcf3f['message']['startsWith']('cloud-services-internal-error:\x20Request\x20timeout.');}class d extends _0x49cfea{static get['requires'](){return['RevisionHistory',v,n];}static get['pluginName'](){return'RealTimeCollaborativeRevisionHistory';}}class ts extends _0x37acee{constructor(_0x82f08b){super(_0x82f08b);const _0x180338=this['bindTemplate'];this['set']('usersCount',0x0),this['set']('isHidden',!0x0),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-presence-list__counter',_0x180338['if']('isHidden','ck-presence-list__counter--hidden')]},'children':[{'text':_0x180338['to']('usersCount',_0x525656=>q(_0x82f08b,'CONNECTED_USERS',_0x525656))}]});}}class es extends _0x37acee{['items'];['keystrokes'];constructor(_0x1db69d){super(_0x1db69d);const _0x286a64=this['bindTemplate'];this['items']=this['createCollection'](),this['keystrokes']=new _0x440b73(),this['set']({'hasPopup':!0x1,'isExpanded':!0x1}),this['setTemplate']({'tag':'div','attributes':{'aria-haspopup':_0x286a64['if']('hasPopup'),'aria-expanded':_0x286a64['to']('isExpanded',_0x208fbb=>this['hasPopup']&&String(_0x208fbb)),'aria-label':_0x286a64['to']('hasPopup',_0x3087b1=>q(_0x1db69d,_0x3087b1?'Collapsed\x20connected\x20users\x20list\x20(press\x20ENTER\x20to\x20open\x20it)':'Connected\x20users\x20list')),'role':'list','tabindex':_0x286a64['to']('hasPopup',_0xbb4dce=>!!_0xbb4dce&&0x0),'class':['ck','ck-presence-list__list']},'children':this['items'],'on':{'click':_0x286a64['to'](()=>this['fire']('execute'))}}),this['on']('change:hasPopup',(_0x300d32,_0x259585,_0x4482f1)=>{this['element']&&(_0x4482f1?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 _0x37acee{['counterView'];['inlineListView'];constructor(_0x1baf80){super(_0x1baf80);const _0x318a94=this['bindTemplate'];this['set']('isCollapsed',!0x0),this['counterView']=new ts(this['locale']),this['inlineListView']=new es(_0x1baf80),this['inlineListView']['bind']('hasPopup')['to'](this,'isCollapsed'),this['listenTo'](this['inlineListView']['items'],'change',()=>{for(const _0x1baebf of this['inlineListView']['items'])_0x1baebf['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',_0x318a94['if']('isCollapsed','ck-presence-list--collapsed')]},'children':[this['counterView'],this['inlineListView']]});}}class j extends _0x37acee{['listWrapperView'];constructor(_0x5ee9b9,_0x29522e){super(_0x5ee9b9),this['listWrapperView']=new mt(_0x5ee9b9,_0x29522e),this['setTemplate']({'tag':'div','attributes':{'tabindex':-0x1,'role':'application','class':['ck','ck-presence-list__dropdown-list'],'aria-label':q(_0x5ee9b9,'Connected\x20users\x20list\x20dropdown\x20menu')},'children':[this['listWrapperView']]});}}class mt extends _0x571e8e{constructor(_0x1996a3,_0x17c891){super(_0x1996a3);const _0x91c2fb=this['bindTemplate'];this['set']('_isScrollable',!0x1),this['setTemplate']({'tag':_0x17c891?'div':'ul','attributes':{'class':['ck','ck-reset','ck-list','ck-presence-list__dropdown-list-wrapper',_0x91c2fb['if']('_isScrollable','ck-presence-list__dropdown-list-wrapper_scrollable')],'role':_0x91c2fb['to']('role'),'aria-label':_0x91c2fb['to']('ariaLabel'),'aria-labelledby':_0x91c2fb['to']('ariaLabelledBy')},'children':this['items']}),this['listenTo'](_0x449926['window'],'resize',()=>this['checkIfScrollable']()),this['items']['on']('change',()=>this['checkIfScrollable']());}['render'](){super['render'](),this['checkIfScrollable']();}['checkIfScrollable'](){const _0x46d939=this['element'];_0x46d939&&(this['_isScrollable']=Math['max'](_0x46d939['scrollHeight'],_0x46d939['clientHeight'])>0.8*window['innerHeight']);}}class k extends rt{['userView'];constructor(_0x54b4ee,_0xcf7308,_0x18d35d){super(_0x54b4ee);const _0x16b1ba=this['bindTemplate'];this['userView']=new ct(_0x54b4ee,_0xcf7308);const _0x462417={'tag':'li','attributes':{'class':['ck','ck-presence-list__dropdown-list-item'],'tabindex':-0x1,'role':'presentation','aria-label':_0xcf7308['name']},'children':[this['userView'],{'tag':'span','attributes':{'class':['ck','ck-user__full-name']},'children':[{'text':_0xcf7308['name']}]},{'tag':'span','attributes':{'class':['ck','ck-presence-list__marker',_0xcf7308['color']['getBackgroundColorClass']()],'aria-hidden':'true'}}]};_0x18d35d&&(_0x462417['tag']='button',_0x462417['on']={'click':_0x16b1ba['to'](()=>this['fire']('execute'))}),this['setTemplate'](_0x462417);}['focus'](){this['element']['focus']();}}class y extends _0x37acee{['userView'];['markerView'];constructor(_0x447968,_0x1852ad,_0x4765fb){super(_0x447968);const _0x372f56=this['bindTemplate'];this['set']('isFocusable',!0x1),this['set']('hasTooltip',!0x0),this['set']('tooltipPosition',''),this['userView']=new ct(_0x447968,_0x1852ad),this['markerView']=new at(_0x447968,_0x1852ad);const _0x52a699=new ot(_0x447968);_0x52a699['template']['tag']='span',_0x52a699['text']=_0x1852ad['name'];const _0x4734d5={'tag':'div','attributes':{'class':['ck','ck-presence-list__list-item'],'role':'listitem','tabindex':_0x372f56['to']('isFocusable',_0x1ed1dd=>!!_0x1ed1dd&&0x0),'aria-labelledby':_0x52a699['id'],'data-cke-tooltip-text':this['userView']['name'],'data-cke-tooltip-position':_0x372f56['to']('tooltipPosition'),'data-cke-tooltip-disabled':_0x372f56['to']('hasTooltip',_0x2f51f2=>!_0x2f51f2),'data-cke-tooltip-class':'ck-presence-list__list-item__tooltip'},'children':[this['userView'],this['markerView'],_0x52a699]};_0x4765fb&&(_0x4734d5['tag']='button',_0x4734d5['on']={'click':_0x372f56['to'](()=>this['fire']('execute'))}),this['setTemplate'](_0x4734d5);}}class at extends _0x37acee{constructor(_0x549b30,_0x1b95cf){super(_0x549b30),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-presence-list__marker',_0x1b95cf['color']['getBackgroundColorClass']()],'aria-hidden':'true'}});}}const A={'collapseAt':0x6,'displayMe':!0x0};class s extends _0x4fe8b7{['currentDisplayedUsers'];['balloonPanelView'];['view'];['presenceDropdownView'];['_bodyCollection']=null;constructor(_0x229af3){super(_0x229af3),this['context']['config']['define']('presenceList',A);const _0x248a93=_0x229af3['config']['get']('presenceList.collapseAt');if('number'!=typeof _0x248a93)throw new _0x2f1152('presencelist-collapseat-invalid-format',this);if(_0x248a93<0x1)throw new _0x2f1152('presencelist-collapseat-invalid-format',this);this['_allConnectedUsers']=this['context']['plugins']['get'](r)['allConnectedUsers'],this['set']('usersCount',0x0),this['currentDisplayedUsers']=new _0x17fa03(),this['balloonPanelView']=new _0x43c240(),this['balloonPanelView']['class']='ck\x20ck-presence-list__balloon',this['view']=this['_createView'](),this['presenceDropdownView']=void 0x0;}static get['requires'](){return[r];}['init'](){for(const _0x2e9219 of this['_allConnectedUsers'])this['_handleUserAdd'](_0x2e9219);this['listenTo'](this['_allConnectedUsers'],'add',(_0x3a5d51,_0x42ae03)=>{this['_handleUserAdd'](_0x42ae03);}),this['listenTo'](this['_allConnectedUsers'],'remove',(_0x5138b3,_0x162e4c)=>{this['_handleUserRemove'](_0x162e4c);});}['_createView'](){const _0x3fda02=this['context'],_0x3b6566=new L(this['context']['locale']),_0xab9d8a=this['balloonPanelView'];if(!_0x536197(_0x3fda02['config']['get']('presenceList.container')))throw new _0x2f1152('presencelist-missing-container',this);return _0x3b6566['counterView']['bind']('usersCount')['to'](this),_0x3b6566['bind']('isCollapsed')['to'](this,'usersCount',_0xa4639e=>{const {collapseAt:_0x12680b,displayMe:_0x3cf0c1}=_0x3fda02['config']['get']('presenceList'),_0x9375a6=_0xa4639e>=_0x12680b;return _0x3b6566['counterView']['isHidden']=!(0x1==_0xa4639e&&_0x3cf0c1||_0x9375a6),_0x9375a6||this['hideDropdown'](),_0x9375a6;}),_0x3b6566['inlineListView']['items']['bindTo'](this['currentDisplayedUsers'])['using'](_0x165f04=>{const _0x28c304=_0x3fda02['config']['get']('presenceList'),_0x12d947=new y(_0x3fda02['locale'],_0x165f04,!!_0x28c304['onClick']);return _0x12d947['bind']('hasTooltip')['to'](_0x3b6566,'isCollapsed',_0x2e66b9=>!_0x2e66b9),_0x12d947['bind']('isFocusable')['to'](_0x3b6566,'isCollapsed',_0x5dc687=>!_0x5dc687),_0x28c304['onClick']&&this['listenTo'](_0x12d947,'execute',()=>{this['view']['isCollapsed']||_0x28c304['onClick'](_0x165f04,_0x12d947['element']);}),_0x12d947;}),this['listenTo'](_0x3b6566['inlineListView'],'execute',()=>{this['presenceDropdownView']?this['hideDropdown']():this['view']['isCollapsed']&&this['showDropdown']();}),_0x3b6566['inlineListView']['keystrokes']['set']('Enter',(_0x598ced,_0x2706fd)=>{this['view']['isCollapsed']&&(this['showDropdown'](),_0x2706fd());}),_0x3b6566['render'](),_0xab9d8a['render'](),_0x43d17e({'emitter':_0x3b6566,'activator':()=>_0xab9d8a['isVisible'],'contextElements':[_0xab9d8a['element'],_0x3b6566['inlineListView']['element']],'callback':()=>this['hideDropdown']()}),_0x3fda02['config']['get']('presenceList.container')['appendChild'](_0x3b6566['element']),this['_bodyCollection']=new _0x20ac66(this['context']['locale']),this['_bodyCollection']['attachToDom'](),this['_bodyCollection']['add'](this['balloonPanelView']),_0x3b6566;}['_handleUserAdd'](_0x4e63be){if(!this['context']['config']['get']('presenceList.displayMe')&&_0x4e63be['isMe'])return;const _0x47644e=this['context']['config']['get']('presenceList.collapseAt')-0x1;this['usersCount']++,this['currentDisplayedUsers']['length']==_0x47644e&&this['currentDisplayedUsers']['length']>0x1&&this['currentDisplayedUsers']['remove'](0x1);const _0x438734=_0x4e63be['isMe']?0x0:this['currentDisplayedUsers']['length'];this['currentDisplayedUsers']['add'](_0x4e63be,_0x438734);}['_handleUserRemove'](_0x3a7d88){if(this['usersCount']--,this['currentDisplayedUsers']['get'](_0x3a7d88['id'])&&(this['currentDisplayedUsers']['remove'](_0x3a7d88['id']),this['currentDisplayedUsers']['length']<this['usersCount'])){for(const _0x3eea3e of Array['from'](this['_allConnectedUsers'])['reverse']())if(!this['currentDisplayedUsers']['get'](_0x3eea3e['id']))return void this['currentDisplayedUsers']['add'](_0x3eea3e,Math['min'](this['currentDisplayedUsers']['length'],0x1));}}['showDropdown'](){if(this['presenceDropdownView'])return;const _0x2d7347=this['context']['config']['get']('presenceList');this['presenceDropdownView']=new j(this['context']['locale'],!!_0x2d7347['onClick']),this['view']['inlineListView']['isExpanded']=!0x0;const {listWrapperView:_0xe74f6}=this['presenceDropdownView'];_0xe74f6['items']['bindTo'](this['_allConnectedUsers'])['using'](_0x41ad6a=>{if(!_0x2d7347['displayMe']&&_0x41ad6a['isMe'])return null;const _0x5e795d=new k(this['context']['locale'],_0x41ad6a,!!_0x2d7347['onClick']);return _0x2d7347['onClick']&&this['listenTo'](_0x5e795d,'execute',()=>{_0x2d7347['onClick'](_0x41ad6a,_0x5e795d['element']);}),_0x5e795d;}),this['balloonPanelView']['content']['add'](this['presenceDropdownView']),this['balloonPanelView']['pin']({'target':this['view']['inlineListView']['element']}),_0xe74f6['focus'](),_0xe74f6['checkIfScrollable']();const _0x4ed8f1=(_0x3f5541,_0x4b041e)=>{this['hideDropdown'](),this['view']['inlineListView']['focus'](),_0x4b041e();};_0xe74f6['keystrokes']['set']('Esc',_0x4ed8f1),_0xe74f6['keystrokes']['set']('Shift+Tab',_0x4ed8f1),_0xe74f6['keystrokes']['set']('Tab',(_0x17ace0,_0x3817c9)=>{!function(_0x391dcc){const _0x3fd510=['a','button','input','select','textarea','[tabindex]','[contenteditable]']['map'](_0x3e364c=>_0x3e364c+':not([disabled]):not([tabindex=\x22-1\x22])')['join'](','),_0xf104ca=[...document['body']['querySelectorAll'](_0x3fd510)]['filter'](_0x459cd5=>_0x459cd5===document['activeElement']||_0x459cd5['offsetWidth']+_0x459cd5['offsetHeight']>0x0)['sort']((_0x150789,_0x115a00)=>(_0x150789['tabIndex']||0x0)-(_0x115a00['tabIndex']||0x0)),_0x180bed=_0xf104ca['indexOf'](_0x391dcc),_0x1b67dc=_0xf104ca[(_0x180bed+0x1)%_0xf104ca['length']];_0x1b67dc&&_0x1b67dc['focus']();}(this['view']['element']),this['hideDropdown'](),_0x3817c9();}),_0xe74f6['focusTracker']['add'](this['view']['element']),_0xe74f6['focusTracker']['on']('change:isFocused',(_0x2a4937,_0x5b9aa9,_0x21f1e1)=>{_0x21f1e1||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 _0x4fe8b7{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 _0x5197b2,Plugin as _0x570694,PendingActions as _0x31eda5,Context as _0xb6dce1}from'@ckeditor/ckeditor5-core/dist/index.js';import{DomEmitterMixin as _0x32d8d9,CKEditorError as _0x54e36b,Collection as _0x5c76ae,global as _0x12da05,version as nt,uid as _0x54b932,KeystrokeHandler as _0xaabba3}from'@ckeditor/ckeditor5-utils/dist/index.js';import{Notification as _0x5353a0,View as _0x32be6e,ListView as _0xeb2606,ListItemView as rt,LabelView as ot,BalloonPanelView as _0x1b84b2,clickOutsideHandler as _0x500c9c,BodyCollection as _0x4a9306}from'@ckeditor/ckeditor5-ui/dist/index.js';import{LiveRange as ht,History as _0x526c6f,NoOperation as _0x429d34,InsertOperation as _0x57e509,MarkerOperation as _0x336663,RootAttributeOperation as _0x418c6e,transformSets as _0x47cdb6,OperationFactory as _0x5cf361}from'@ckeditor/ckeditor5-engine/dist/index.js';import{WebSocketGateway as dt,WEB_SOCKET_GATEWAY_STATES as _0x55fc1b,CollaborativeEditingService as _0x2ddad7,User as lt,CommentsService as _0x355787,TrackChangesService as et,RevisionHistoryService as it,EditorService as tt}from'@ckeditor/ckeditor-cloud-services-collaboration/dist/index.js';import{Users as _0x3d63ec,UserView as ct}from'ckeditor5-collaboration/dist/index.js';import{Compressor as _0x41819d}from'@ckeditor/ckeditor5-operations-compressor/dist/index.js';import{isElement as _0x4796d2}from'lodash-es';class c extends _0x5197b2{static ['WebSocketGateway']=/* #__PURE__ -- @preserve */
|
|
24
|
+
((()=>dt)());static ['initialReconnectionInterval']=0x3e8;['connection'];['_reconnectionStack'];['_shouldPluginsReconnect'];['_domEmitter'];static get['requires'](){return['CloudServices',_0x5353a0];}static get['pluginName'](){return'WebSocketGateway';}constructor(_0x30b4f5){super(_0x30b4f5),this['set']('state',_0x55fc1b['CONNECTED']),this['set']('_isBrowserOffline',!0x1),this['_reconnectionStack']=new Set(),this['_shouldPluginsReconnect']=!0x1,this['_domEmitter']=Object['create'](_0x32d8d9);}['init'](){const _0x1fd3c6=this['context'],_0x4d88bc=_0x1fd3c6['plugins']['get']('CloudServices'),_0x4f5f42=_0x1fd3c6['plugins']['get'](_0x5353a0);if(!_0x4d88bc['token'])throw new _0x54e36b('websocketgateway-missing-token',this);if(!_0x4d88bc['webSocketUrl'])throw new _0x54e36b('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'](_0x4d88bc['token'],_0x4d88bc['webSocketUrl'],{'timeout':0x3e8*this['context']['config']['get']('cloudServices.connectionTimeout'),'requestTimeout':0x3e8*this['context']['config']['get']('cloudServices.requestTimeout')})['then'](_0x2afb12=>{if(this['connection']=_0x2afb12,this['bind']('state')['to'](_0x2afb12,'state',this,'_isBrowserOffline',(_0x2f3fd4,_0x44cfeb)=>('connected'!==_0x2f3fd4&&(this['_shouldPluginsReconnect']=!0x0),_0x44cfeb||_0x2f3fd4!==_0x55fc1b['CONNECTED']?_0x55fc1b['DISCONNECTED']:this['state']==_0x55fc1b['DISCONNECTED']&&this['_shouldPluginsReconnect']?(this['_shouldPluginsReconnect']=!0x1,this['_reconnect'](),_0x55fc1b['CONNECTING']):_0x55fc1b['CONNECTED'])),this['connection']['on']('error',(_0x4149ee,_0x21c07b)=>{if('limitExceeded'!==_0x21c07b['code'])throw console['error'](_0x21c07b),new _0x54e36b('cloudservices-init',null,{'originalError':_0x21c07b});_0x4f5f42['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'});}),!_0x2afb12['me'])return new Promise(_0x5332ac=>_0x2afb12['on']('change:me',_0x5332ac));})['catch'](_0x1436e3=>{throw console['error'](_0x1436e3),new _0x54e36b('cloudservices-init',null,{'originalError':_0x1436e3});});}['addToReconnectionStack'](_0x3d4a95){if('function'!=typeof _0x3d4a95['reconnect'])throw new _0x54e36b('websocketgateway-invalid-plugin-interface',this);if(this['isInReconnectionStack'](_0x3d4a95))throw new _0x54e36b('websocketgateway-plugin-already-registered',this,{'name':_0x3d4a95['constructor']['pluginName']});this['_reconnectionStack']['add'](_0x3d4a95);}['removeFromReconnectionStack'](_0x5a0054){this['_reconnectionStack']['delete'](_0x5a0054);}['isInReconnectionStack'](_0x4cda36){return this['_reconnectionStack']['has'](_0x4cda36);}['_reconnect'](){return this['connection']['reconnect']()['then'](()=>Promise['all'](Array['from'](this['_reconnectionStack'],_0x12c01f=>_0x12c01f['reconnect']())))['then'](()=>this['state']=_0x55fc1b['CONNECTED'])['catch'](_0x29d228=>{throw console['error'](_0x29d228),new _0x54e36b('cloudservices-reconnection-error',this['context']);});}['destroy'](){this['connection']&&this['connection']['disconnect'](),this['state']=_0x55fc1b['DISCONNECTED'],this['_domEmitter']['stopListening'](),super['destroy']();}}class r extends _0x5197b2{['channelSessions'];['channelConnectedUsers'];['allConnectedUsers'];['_registeredSessions'];['_uniqueUsersCount'];['_users'];static get['pluginName'](){return'Sessions';}static get['requires'](){return[c,_0x3d63ec];}constructor(_0x1285bb){super(_0x1285bb),this['channelSessions']=new Map(),this['channelConnectedUsers']=new Map(),this['allConnectedUsers']=new _0x5c76ae(),this['_registeredSessions']=new Map(),this['_uniqueUsersCount']=0x0,this['_users']=this['context']['plugins']['get'](_0x3d63ec);}['init'](){const _0x21a340=this['context']['plugins']['get'](c);this['listenTo'](_0x21a340,'change:state',(_0x59dfa9,_0x4bc974,_0x246fd4)=>{if('connected'!==_0x246fd4)this['channelSessions']['forEach'](_0x1cb11b=>_0x1cb11b['clear']()),this['channelConnectedUsers']['forEach'](_0x1bf2e2=>_0x1bf2e2['clear']()),this['allConnectedUsers']['clear']();else{for(const [_0x19b0b9,_0xe22025]of this['_registeredSessions'])for(const _0x106c6f of _0xe22025)this['_handleSessionAdd'](_0x19b0b9,_0x106c6f);}}),this['_createUser'](_0x21a340['connection']['me'],!0x0);}['register'](_0x90c472,_0x4b4f23){if(this['_registeredSessions']['has'](_0x90c472))throw new _0x54e36b('sessions-register-already-registered',null,{'channelId':_0x90c472});this['_registeredSessions']['set'](_0x90c472,_0x4b4f23),this['channelSessions']['set'](_0x90c472,new _0x5c76ae()),this['channelConnectedUsers']['set'](_0x90c472,new _0x5c76ae()),this['listenTo'](_0x4b4f23,'add',(_0x68f66b,_0x56b717)=>this['_handleSessionAdd'](_0x90c472,_0x56b717)),this['listenTo'](_0x4b4f23,'remove',(_0x27087c,_0xa8d419)=>this['_handleSessionRemove'](_0x90c472,_0xa8d419));for(const _0x4b0187 of _0x4b4f23)this['_handleSessionAdd'](_0x90c472,_0x4b0187);}['unregister'](_0x4c11ac){if(!this['_registeredSessions']['has'](_0x4c11ac))throw new _0x54e36b('sessions-unregister-not-exist',null,{'channelId':_0x4c11ac});const _0x12efe0=this['_registeredSessions']['get'](_0x4c11ac);this['stopListening'](_0x12efe0);for(const _0x9e9b4d of _0x12efe0)'connected'===this['context']['plugins']['get'](c)['state']&&this['_handleSessionRemove'](_0x4c11ac,_0x9e9b4d);this['_registeredSessions']['delete'](_0x4c11ac),this['channelSessions']['delete'](_0x4c11ac),this['channelConnectedUsers']['delete'](_0x4c11ac);}get['mySessionId'](){return this['context']['plugins']['get'](c)['connection']['sessionId'];}['getUserBySessionId'](_0x3797fe){for(const _0x4c425f of this['channelSessions']['values']())for(const _0x4170bb of _0x4c425f)if(_0x4170bb['id']===_0x3797fe)return _0x4170bb['user'];}['getUserSessions'](_0x5b33f3,_0x1bfb4b){const _0x19734b=_0x1bfb4b?[this['channelSessions']['get'](_0x1bfb4b)]:this['channelSessions']['values'](),_0xc7fc57=new Set();for(const _0x1f43a4 of _0x19734b)for(const _0x4d7f12 of _0x1f43a4)_0x4d7f12['user']['id']===_0x5b33f3['id']&&_0xc7fc57['add'](_0x4d7f12['id']);return _0xc7fc57;}['getUserRole'](_0xfb0187){for(const _0xbeff93 of this['channelSessions']['values']())for(const _0x379270 of _0xbeff93)if(_0x379270['user']===_0xfb0187)return _0x379270['role'];}['_handleSessionAdd'](_0x69b7e7,_0x3315c0){if('connected'!==this['context']['plugins']['get'](c)['state'])return;const _0x13365e=_0x3315c0['user'],_0x34180d=this['_users']['getUser'](_0x13365e['id'])||this['_createUser'](_0x13365e),_0x3ae0f7=Object['assign']({},_0x3315c0,{'user':_0x34180d});this['channelSessions']['get'](_0x69b7e7)['add'](_0x3ae0f7);const _0x1c7cce=this['channelConnectedUsers']['get'](_0x69b7e7);_0x1c7cce['has'](_0x34180d['id'])||_0x1c7cce['add'](_0x34180d),this['allConnectedUsers']['has'](_0x34180d['id'])||this['allConnectedUsers']['add'](_0x34180d,_0x34180d['isMe']?0x0:void 0x0),this['fire']('sessionAdd:'+_0x69b7e7,{'channelId':_0x69b7e7,'session':_0x3ae0f7});}['_handleSessionRemove'](_0xdab4e0,_0x3f6110){if('connected'!==this['context']['plugins']['get'](c)['state'])return;const _0x210b93=this['channelConnectedUsers']['get'](_0xdab4e0),_0x2ac721=_0x3f6110['user'];_0x2ac721['id']&&(this['channelSessions']['get'](_0xdab4e0)['remove'](_0x3f6110['id']),_0x210b93['has'](_0x2ac721['id'])&&!this['getUserSessions'](_0x2ac721,_0xdab4e0)['size']&&_0x210b93['remove'](_0x2ac721['id']),this['allConnectedUsers']['get'](_0x2ac721['id'])&&!this['getUserSessions'](_0x2ac721)['size']&&this['allConnectedUsers']['remove'](_0x2ac721['id']));}['_createUser'](_0x3f4395,_0x56a28c){const _0x422146=this['_users']['addUser'](_0x3f4395);return _0x56a28c&&this['_users']['defineMe'](_0x3f4395['id']),_0x422146['orderNumber']=this['_uniqueUsersCount']++,_0x422146;}}class H extends _0x570694{['_domEmitter']=new(_0x32d8d9())();static get['requires'](){return[r];}static get['pluginName'](){return'UserMarkers';}['init'](){const _0x102db5=this['editor'],_0x56877a=_0x102db5['plugins']['get'](r);_0x102db5['conversion']['for']('editingDowncast')['markerToElement']({'model':'user:position','view':(_0x1ca400,{writer:_0x4f5c33})=>function(_0x50e113,_0x404aab,_0x35d3c3,_0x6fb4a9){const _0x4c2907=_0x50e113['markerName']['split'](':')[0x2],_0x441ab8=_0x35d3c3['getUserBySessionId'](_0x4c2907);if(!_0x441ab8||_0x4c2907===_0x35d3c3['mySessionId'])return;if(!_0x6fb4a9['model']['schema']['checkChild'](_0x50e113['markerRange']['start'],'$text'))return;const _0x403da3={'class':'ck-user__marker\x20'+_0x441ab8['color']['getMarkerClass'](),'data-name':_0x441ab8['name'],'data-session-id':_0x4c2907},_0x531eaf=_0x6fb4a9['model']['markers']['get'](_0x50e113['markerName']),_0x353aca=_0x531eaf['getStart'](),_0x3b689e=_0x353aca['nodeAfter'],_0x5a1ac5=_0x6fb4a9['model']['schema'];if(_0x3b689e&&_0x5a1ac5['isObject'](_0x3b689e)&&_0x5a1ac5['isInline'](_0x3b689e)&&!_0x6fb4a9['model']['markers']['get']('user:range:'+_0x4c2907)['getRange']()['isCollapsed'])return;const _0xb8583b=_0x353aca['parent'];return _0x6fb4a9['model']['schema']['isLimit'](_0xb8583b)&&!_0x6fb4a9['model']['hasContent'](_0xb8583b)&&(_0x403da3['contenteditable']=!0x1),function(_0x1c02f8,_0x11585b,_0x4f8098){const _0x42f648=_0x1c02f8['createUIElement']('span',_0x11585b);return _0x1c02f8['setCustomProperty']('userPositionMarker',!0x0,_0x42f648),_0x42f648['render']=function(_0xcb9e99){const _0x1e08fe=this['toDomElement'](_0xcb9e99);return _0x1e08fe['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>'+_0x4f8098['name']+'</span>',_0x1e08fe['addEventListener']('mouseenter',()=>{_0x1e08fe['classList']['add']('ck-user__marker_hovered');}),_0x1e08fe['addEventListener']('mouseleave',()=>{_0x1e08fe['classList']['remove']('ck-user__marker_hovered');}),_0x1e08fe;},_0x42f648['isSimilar']=function(_0x479a5a){return!(!this['getCustomProperty']('userPositionMarker')||!_0x479a5a['getCustomProperty']('userPositionMarker')||this['getAttribute']('data-session-id')!=_0x479a5a['getAttribute']('data-session-id'));},_0x42f648;}(_0x404aab,_0x403da3,_0x441ab8);}(_0x1ca400,_0x4f5c33,_0x56877a,_0x102db5)}),_0x102db5['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'user:range','view':_0x2b2c10=>function(_0x520ff0,_0x161b6d){const _0x2a06bd=_0x520ff0['markerName']['split'](':')[0x2];if(_0x2a06bd===_0x161b6d['mySessionId'])return null;const _0x193ae3=_0x161b6d['getUserBySessionId'](_0x2a06bd);if(!_0x193ae3)return{'id':_0x2a06bd,'classes':[]};return{'id':_0x2a06bd,'classes':['ck-user__selection',_0x193ae3['color']['getSelectionClass']()],'attributes':{'data-session-id':_0x2a06bd},'priority':0x7d0+_0x193ae3['orderNumber']};}(_0x2b2c10,_0x56877a)}),function(_0x5a29bf){const _0x5ee2e6=_0x5a29bf['model'],_0x66daf2=new Map(),_0x2c3501=_0x5a29bf['plugins']['get'](r);_0x5ee2e6['markers']['on']('update:user:range',(_0x578465,_0x432d59,_0x1bf3d7,_0x1b424d)=>{if(!_0x1b424d&&_0x66daf2['get'](_0x432d59['name']))return _0x66daf2['get'](_0x432d59['name'])['detach'](),void _0x66daf2['delete'](_0x432d59['name']);const _0x208847=_0x432d59['name']['split'](':')[0x2];if(_0x208847===_0x2c3501['mySessionId'])return;const _0x393363='user:position:'+_0x208847;_0x5ee2e6['markers']['has'](_0x393363)&&_0x5a29bf['editing']['reconvertMarker'](_0x393363),_0x432d59['on']('change:range',(_0x568c0d,_0x4cc814,_0x27aee8)=>{if('$graveyard'!=_0x4cc814['root']['rootName']&&'$graveyard'==_0x432d59['getRange']()['root']['rootName']&&!_0x66daf2['has'](_0x432d59['name'])){const _0x395f1c=_0x5ee2e6['schema']['getNearestSelectionRange'](_0x27aee8['deletionPosition']);if(_0x395f1c){const _0xab99=ht['fromRange'](_0x395f1c);_0x66daf2['set'](_0x432d59['name'],_0xab99),_0xab99['on']('change:range',(_0x15bb3c,_0x2f6f28,_0x21e44a)=>{if('$graveyard'==_0xab99['root']['rootName']){const _0xbc1ca1=_0x5ee2e6['schema']['getNearestSelectionRange'](_0x21e44a['deletionPosition']);_0xbc1ca1?(_0xab99['start']=_0xbc1ca1['start'],_0xab99['end']=_0xbc1ca1['end']):(_0x66daf2['delete'](_0x432d59['name']),_0xab99['detach']());}});}}});}),_0x5ee2e6['document']['on']('change',()=>{_0x66daf2['size']>0x0&&_0x5ee2e6['enqueueChange']({'isUndoable':!0x1},_0x1c73cb=>{for(const [_0x4c5a6d,_0x420b65]of _0x66daf2)'$graveyard'==_0x5ee2e6['markers']['get'](_0x4c5a6d)['getRange']()['root']['rootName']&&(re(_0x4c5a6d['split'](':')[0x2],_0x420b65['toRange'](),_0x5ee2e6,_0x1c73cb),_0x420b65['detach']());_0x66daf2['clear']();});});}(_0x102db5),this['_domEmitter']['listenTo'](_0x12da05['document'],'keydown',(_0x216954,{key:_0x4b91ca})=>{'Escape'===_0x4b91ca&&function(_0x4d2f10){_0x4d2f10['editing']['view']['change'](_0x3f4a52=>{for(const _0x194fe4 of _0x4d2f10['model']['markers']){if(!_0x194fe4['name']['startsWith']('user:position'))continue;const _0x11b22d=_0x4d2f10['editing']['mapper']['markerNameToElements'](_0x194fe4['name']);if(_0x11b22d){for(const _0x5e548b of _0x11b22d)_0x3f4a52['removeClass']('ck-user__marker_hovered',_0x5e548b);}}});}(_0x102db5);},{'useCapture':!0x0});}['afterInit'](){const _0x15dfe9=this['editor'],_0x1ce0c8=_0x15dfe9['commands']['get']('undo');_0x1ce0c8&&_0x15dfe9['model']['on']('applyOperation',(_0x474464,_0x5598eb)=>{const _0x5f39f5=_0x5598eb[0x0];if('marker'!=_0x5f39f5['type']||!_0x5f39f5['name']['startsWith']('user:'))return;const _0xd34fb0=_0x5f39f5['batch'];_0x1ce0c8['_createdBatches']['has'](_0xd34fb0)&&(_0x5f39f5['newRange']=_0x5f39f5['oldRange']?_0x15dfe9['model']['createRange'](_0x5f39f5['oldRange']['start'],_0x5f39f5['oldRange']['end']):null);},{'priority':'highest'});}['destroy'](){return this['_domEmitter']['stopListening'](),super['destroy']();}['createUserMarkerOperations'](){const _0x1df6ea=this['editor'],_0x3cb1f1=_0x1df6ea['model']['document'],_0x1273f9=_0x1df6ea['plugins']['get'](r);_0x1df6ea['model']['enqueueChange']({'isUndoable':!0x1},_0x1f4983=>{const _0x42c19a='user:range:'+_0x1273f9['mySessionId'],_0x32642f='user:position:'+_0x1273f9['mySessionId'],_0x491422=_0x1df6ea['model']['markers']['has'](_0x42c19a);_0x1df6ea['editing']['view']['hasDomSelection']?re(_0x1273f9['mySessionId'],_0x3cb1f1['selection']['getFirstRange'](),_0x1df6ea['model'],_0x1f4983):_0x491422&&(_0x1f4983['removeMarker'](_0x42c19a),_0x1f4983['removeMarker'](_0x32642f));});}}function re(_0xf12c0,_0x32eead,_0xddbe0b,_0x1908bf){const _0xaafec8='user:range:'+_0xf12c0,_0x41c0f4='user:position:'+_0xf12c0,_0x43da20=_0x32eead['getContainedElement']();let _0x43e272=_0x32eead['start'];_0x43da20&&_0x43da20['is']('element','tableCell')&&(_0x43e272=function(_0x55d675,_0x4455b5){for(const _0x380fb5 of _0x55d675['getPositions']())if(_0x4455b5['schema']['checkChild'](_0x380fb5,'$text'))return _0x380fb5;}(_0x32eead,_0xddbe0b),_0x32eead=_0x1908bf['createRange'](_0x43e272));const _0x59b0f7=_0x1908bf['createRange'](_0x43e272);_0xddbe0b['markers']['has'](_0xaafec8)?(_0x1908bf['updateMarker'](_0xaafec8,{'range':_0x32eead}),_0x1908bf['updateMarker'](_0x41c0f4,{'range':_0x59b0f7})):(_0x1908bf['addMarker'](_0xaafec8,{'range':_0x32eead,'usingOperation':!0x0}),_0x1908bf['addMarker'](_0x41c0f4,{'range':_0x59b0f7,'usingOperation':!0x0}));}function q(_0x478520,_0x595972,_0x18e730){const t=_0x478520['t'];switch(_0x595972){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'},_0x18e730);default:return'';}}let K=0x1;class l extends _0x570694{static ['CollaborativeEditingService']=/* #__PURE__ -- @preserve */
|
|
25
|
+
((()=>_0x2ddad7)());['_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,_0x31eda5,_0x3d63ec,_0x5353a0];}static get['pluginName'](){return'RealTimeCollaborationClient';}get['cloudDocumentVersion'](){return this['_lastServerVersion']+this['_offset'];}get['_lastServerVersion'](){return this['serverHistory']['version']-this['_offset'];}get['lastSyncVersion'](){const _0x156086=this['serverHistory']['getOperations']();for(let _0x16f703=_0x156086['length']-0x1;_0x16f703>=0x0;_0x16f703--){const _0x338d9f=_0x156086[_0x16f703];if(!this['_disconnectionOperations']['has'](_0x338d9f))return _0x338d9f['baseVersion']+0x1-this['_offset'];}return 0x0;}constructor(_0x371ccb){if(super(_0x371ccb),this['_offset']=0x0,this['sessionId']=null,this['serverHistory']=new _0x526c6f(),this['editor']['config']['define']('collaboration',{}),this['_channelId']=this['editor']['config']['get']('collaboration.channelId'),!this['_channelId'])throw new _0x54e36b('collaboration-missing-channelid',this);const _0x150f3e=_0x371ccb['config']['get']('cloudServices.bundleVersion')||nt;this['_service']=new l['CollaborativeEditingService'](_0x150f3e,this['_channelId']),this['_document']=this['editor']['model']['document'],this['_compressor']=new _0x41819d(),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 _0x15bafd=this['editor'],_0x352e2d=_0x15bafd['plugins']['get'](_0x3d63ec),_0x27d346=_0x15bafd['plugins']['get'](c);this['listenTo'](_0x352e2d,'getOperationAuthor',(_0x4b0327,_0x27539c)=>{const _0x5d1bab=_0x27539c[0x0];_0x5d1bab['_authorId']&&(_0x4b0327['return']=_0x352e2d['getUser'](_0x5d1bab['_authorId']),_0x4b0327['stop']()),null===_0x5d1bab['_authorId']&&(_0x4b0327['return']=null,_0x4b0327['stop']());},{'priority':'high'}),this['listenTo'](_0x15bafd['model']['document']['selection'],'change:range',(_0x5b862a,_0x3878b4)=>{_0x3878b4['directChange']&&this['_refreshUserSelectionMarkers']();}),this['listenTo'](_0x15bafd['editing']['view'],'change:hasDomSelection',()=>{this['_refreshUserSelectionMarkers']();}),this['_initThrowingOnDataSet'](),_0x15bafd['model']['on']('applyOperation',(_0x5019db,_0x4fff8c)=>{const _0x3bb174=_0x4fff8c[0x0];_0x3bb174['isDocumentOperation']&&(this['_saveOperationInBuffer'](_0x3bb174),this['_shouldSendUpdate']()&&this['_sendBufferedOperationsDelayed']());}),this['_setUpDataInit'](),this['bind']('_isEditingAllowed')['to'](_0x27d346,'state',this,'_hasSynchronizationProblem',(_0x5aa8db,_0x1f65bf)=>'connected'===_0x5aa8db&&!_0x1f65bf),this['on']('change:_isEditingAllowed',()=>{this['_isEditingAllowed']?_0x15bafd['disableReadOnlyMode']('rtc-offline'):_0x15bafd['enableReadOnlyMode']('rtc-offline');}),this['_isEditingAllowed']?_0x15bafd['disableReadOnlyMode']('rtc-offline'):_0x15bafd['enableReadOnlyMode']('rtc-offline'),this['set']('_isConnected',!0x1);}async['reconnect'](){const _0xedc053=this['editor']['plugins']['get'](r),_0x4dc512=this['editor']['plugins']['get'](c);try{this['_isPendingUpdate']=!0x0,_0xedc053['unregister'](this['_channelId']);const _0x8fd158=await this['_service']['reconnect'](_0x4dc512['connection'],this['lastSyncVersion']);await this['_handleReconnectionResponse'](_0x8fd158)&&(this['_isPendingUpdate']=!0x1,this['_clearPendingAction']());const _0x221073=await this['_service']['getConnectedSessions']();_0xedc053['register'](this['_channelId'],_0x221073),this['_handleSendingSelectionMarkers'](),this['_isConnected']=!0x0;}catch(_0x47c56c){if(function(_0x491bec){return'404'===_0x491bec['code'];}(_0x47c56c)&&this['sessionId'])await this['_connectAfterSessionHasBeenFlushed']();else{if(function(_0x2e83cd){return'409'===_0x2e83cd['code'];}(_0x47c56c)){const _0x3a2bf9=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'](_0x3a2bf9);}else{if(!(_0x47c56c instanceof J))throw _0x47c56c;this['_handleReconnectionError']();}}}}['destroy'](){const _0x210af9=this['editor']['plugins']['get'](c),_0x4bc033=this['editor']['plugins']['get'](r);this['editor']['enableReadOnlyMode']('rtc-destroyed'),_0x4bc033['channelSessions']['has'](this['_channelId'])&&_0x4bc033['unregister'](this['_channelId']),_0x210af9['removeFromReconnectionStack'](this),this['_disconnectService'](),super['destroy']();}async['_handleReconnectionResponse'](_0x1d0b3b){if(this['sessionId']!==_0x1d0b3b['sessionId']&&this['_lastSyncedOperationId']!==_0x1d0b3b['lastOperationId'])throw new J();return this['sessionId']=_0x1d0b3b['sessionId'],this['_handleServerResponse']([],{..._0x1d0b3b,'wereChangesApplied':!0x1,'data':_0x1d0b3b['data']},'reconnect');}async['_connectService'](_0x53fd24,_0x5911d9=!0x1){const {connection:_0x498d9b}=this['editor']['plugins']['get'](c);l['CollaborativeEditingService']['getConnectedSessions'](_0x498d9b,this['_channelId'])['then'](_0x561228=>this['_initSessionsHandling'](_0x561228))['catch'](_0x26d617=>{this['_crash']('realtimecollaborationclient-init-session-connection-error',_0x26d617);}),this['listenTo'](this['_service'],'operationsReceived',this['_handleReceivedOperations']['bind'](this)),this['listenTo'](this['_service'],'error',(_0x3b2496,_0x5c026a)=>{this['_crash']('realtimecollaborationclient-initservice-internal-error',_0x5c026a);}),this['listenTo'](this['_service'],'disconnected',()=>{this['_isConnected']=!0x1;});const _0xf5ab60=this['_operationIdentifier']['getIdOfTheLastOperation'](_0x53fd24);this['_isPendingUpdate']=!0x0;const _0x4daa76=await this['_service']['connect'](_0x498d9b,this['_compressOperations'](_0x53fd24),_0xf5ab60);if(this['sessionId']=_0x4daa76['sessionId'],_0x5911d9){if(!_0x4daa76['wereChangesApplied'])return void this['_handleReconnectionError']();this['_isPendingUpdate']=!0x1,this['_clearPendingAction'](),this['serverHistory']['reset'](),this['_offset']=_0x4daa76['offset'],this['serverHistory']['version']=this['_offset'],await this['_handleServerResponse'](_0x53fd24,_0x4daa76,'reconnection:\x20flushed\x20session');}else await this['_handleInitialConnectionData'](_0x4daa76,_0x53fd24);this['_handleSendingSelectionMarkers'](),this['_isConnected']=!0x0;}['_handleSendingSelectionMarkers'](){const _0x57a30c=this['editor']['plugins']['get'](r),_0x2d00dc=this['editor']['plugins']['get'](H),_0x4e354f=_0x57a30c['channelSessions']['get'](this['_channelId']);_0x4e354f&&_0x4e354f['length']>0x1?_0x2d00dc['createUserMarkerOperations']():this['listenTo'](_0x57a30c,'sessionAdd:'+this['_channelId'],()=>{0x2===_0x57a30c['channelSessions']['get'](this['_channelId'])['length']&&_0x2d00dc['createUserMarkerOperations']();});}async['_handleReceivedOperations'](_0x2d4fc0,_0x9ada80,_0x27e3e9,_0x1ee6d5){if(!this['_isPendingUpdate']&&this['_document']['version']==_0x9ada80){const _0x396ad9=this['_decompressOperations'](_0x27e3e9,_0x1ee6d5);await this['_fetchMissingUsers'](_0x396ad9),this['_handleExternalOperations'](_0x396ad9,_0x9ada80,_0x27e3e9['lastOperationId'])||this['_crash']('realtimecollaborationclient-initservice-incorrect-server-operation');}}async['_connectAfterSessionHasBeenFlushed'](){this['_disconnectService']();const {locale:_0x40ad2f}=this['editor'];let _0x59f265;try{_0x59f265=await this['_service']['getDocumentDetails']();}catch(_0x188d24){const _0x1e1e5a=q(_0x40ad2f,'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'](_0x1e1e5a);}const _0x2dba9a=_0x59f265['currentDocumentSession']||_0x59f265['lastDocumentSession'];if(this['_lastSyncedOperationId']===_0x2dba9a['lastOperationId'])await this['_connectService'](this['editor']['model']['document']['history']['getOperations'](),!0x0);else{const _0x4bb40a=q(_0x40ad2f,'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'](_0x4bb40a);}}['_disconnectService'](){this['_service']['disconnect'](),this['_bufferedOperations']=[],clearTimeout(this['_sendBufferedOperationsDelayId']),this['stopListening'](this['_service']);}['_initSessionsHandling'](_0x2b6340){const _0x36f648=this['editor']['plugins']['get'](r);this['listenTo'](_0x36f648,'sessionAdd:'+this['_channelId'],(_0x55476e,{session:_0x13e0f7})=>{if(_0x13e0f7['id']===_0x36f648['mySessionId']){_0x55476e['off']();const _0x25418e=this['editor']['plugins']['has']('CommentsOnly')&&this['editor']['plugins']['get']('CommentsOnly');let _0x5acf89=_0x13e0f7['permissions'];_0x25418e&&_0x25418e['isEnabled']&&(_0x5acf89=_0x5acf89['filter'](_0x3a6932=>'document:write'!==_0x3a6932)),this['editor']['plugins']['get']('Permissions')['setPermissions'](_0x5acf89,this['_channelId']);}}),_0x36f648['register'](this['_channelId'],_0x2b6340);}['_initThrowingOnDataSet'](){const _0x19575e=this['editor']['data']['set'];this['editor']['data']['set']=(..._0x398ed0)=>{if(!_0x398ed0[_0x398ed0['length']-0x1]['suppressErrorInCollaboration'])throw new _0x54e36b('realtimecollaborationclient-editor-setdata-and-editor-data-set-are-forbidden-in-real-time-collaboration',this);_0x19575e['apply'](this['editor']['data'],_0x398ed0);};}['_setUpDataInit'](){this['editor']['data']['on']('init',(_0x2b9304,[_0x3feb34])=>{if(this['_document']['version'])throw new _0x54e36b('realtimecollaborationclient-init-document-already-initialized',this);_0x2b9304['stop'](),this['_setPendingAction']();const _0x5a1722=this['editor']['config']['get']('rootsAttributes'),_0x11caaa=this['_getOperationsFromInitData'](_0x3feb34,_0x5a1722);0x0==_0x11caaa['length']&&_0x11caaa['push'](new _0x429d34(0x0)),_0x2b9304['return']=this['_connectService'](_0x11caaa)['then'](()=>{this['editor']['plugins']['get'](c)['addToReconnectionStack'](this),this['editor']['data']['fire']('ready');})['catch'](_0x4b7249=>this['_crash']('realtimecollaborationclient-init-connection-failed',_0x4b7249))['finally'](()=>this['_clearPendingAction']());},{'priority':'high'}),this['editor']['on']('loadRoot',async(_0x1fc1ac,[_0x17abce,_0x3dfd8f])=>{_0x1fc1ac['stop']();const _0x24836c=this['editor']['model']['document']['getRoot'](_0x17abce);if(!this['_knownRootNames']['has'](_0x17abce)){const _0x341ca=_0x3dfd8f&&_0x3dfd8f['data']?_0x3dfd8f['data']:'',_0x53c1c8=_0x3dfd8f&&_0x3dfd8f['attributes']?_0x3dfd8f['attributes']:{};await this['_loadRoot'](_0x17abce,_0x341ca,_0x53c1c8);}this['editor']['model']['enqueueChange']({'isUndoable':!0x1},()=>{_0x24836c['_isLoaded']=!0x0,this['editor']['model']['document']['differ']['_bufferRootLoad'](_0x24836c);});},{'priority':'high'});}async['_fetchMissingUsers'](_0x36b008){const _0x445e26=this['editor']['plugins']['get'](_0x3d63ec),{connection:_0x2866e7}=this['editor']['plugins']['get'](c),_0x57ced2=new Set();for(const _0x191b1e of _0x36b008){const _0x474624=_0x191b1e['_authorId'];_0x474624&&!_0x445e26['getUser'](_0x474624)&&_0x57ced2['add'](_0x474624);}if(0x0===_0x57ced2['size'])return;const _0x576a9c=await lt['getMany'](_0x2866e7,Array['from'](_0x57ced2));for(const _0x6896e4 of _0x576a9c)_0x445e26['getUser'](_0x6896e4['id'])||_0x445e26['addUser'](_0x6896e4);}['_getOperationsFromInitData'](_0x2968ea,_0x3b8dab={}){const _0x2160d8=this['editor']['model'],_0x26c457=[];let _0x1fd4d8=0x0;const _0x2547b4='string'==typeof _0x2968ea?{'main':_0x2968ea}:_0x2968ea;for(const _0x2a7592 of Object['keys'](_0x2547b4)){if(!this['_document']['roots']['has'](_0x2a7592))throw new _0x54e36b('realtimecollaborationclient-init-non-existent-root',this);const _0x4ec799=this['editor']['data']['parse'](_0x2547b4[_0x2a7592]),_0x13541c=this['_document']['getRoot'](_0x2a7592),_0xe4eba8=new _0x57e509(_0x2160d8['createPositionAt'](_0x13541c,0x0),_0x4ec799,_0x1fd4d8++);_0x26c457['push'](_0xe4eba8);for(const [_0x52717d,_0x2f09b9]of _0x4ec799['markers']){const _0x295a9d=_0x2160d8['createRange'](_0x2160d8['createPositionFromPath'](_0x13541c,_0x2f09b9['start']['path']['slice']()),_0x2160d8['createPositionFromPath'](_0x13541c,_0x2f09b9['end']['path']['slice']())),_0x5a61a3=new _0x336663(_0x52717d,null,_0x295a9d,_0x2160d8['markers'],!0x0,_0x1fd4d8++);_0x26c457['push'](_0x5a61a3);}}if(_0x3b8dab)for(const [_0x2aef19,_0x5bdbad]of Object['entries'](_0x3b8dab)){const _0xda2479=_0x2160d8['document']['getRoot'](_0x2aef19);if(!_0xda2479)throw new _0x54e36b('multi-root-editor-root-attributes-no-root',null);for(const [_0x205787,_0x5f59fa]of Object['entries'](_0x5bdbad))if(null!==_0x5f59fa){const _0x3d5525=new _0x418c6e(_0xda2479,_0x205787,null,_0x5f59fa,_0x1fd4d8++);_0x26c457['push'](_0x3d5525);}}return _0x26c457;}async['_loadRoot'](_0x3c14d3,_0x52adf2,_0x265d98){this['_getOperationsFromInitData']({[_0x3c14d3]:_0x52adf2},{[_0x3c14d3]:_0x265d98})['forEach']((_0x55419c,_0x330799)=>{_0x55419c['baseVersion']=this['_document']['version']+_0x330799,_0x55419c['_isInit']=!0x0,this['_saveOperationInBuffer'](_0x55419c);}),this['_sendBufferedOperationsDelayed'](),await this['_waitUntilSynced']();}async['_handleInitialConnectionData'](_0x5cbbf7,_0x1a41de){let _0x39a2f1;this['_offset']=_0x5cbbf7['offset'];const _0x42b1bd=_0x5cbbf7['wereChangesApplied']&&!_0x5cbbf7['initData'],_0x4bce30=_0x42b1bd?0x0:_0x5cbbf7['data']['baseVersion'];if(_0x1a41de['forEach'](_0x4056b4=>{_0x4056b4['_isInit']=!0x0,_0x4056b4['createdAt']=_0x5cbbf7['sessionCreatedAt'],_0x4056b4['_authorId']=null;}),_0x42b1bd)_0x39a2f1=_0x1a41de,this['_applyOperationsSet'](_0x39a2f1,_0x42b1bd);else{if(_0x5cbbf7['initData']){const _0x186628=this['_getOperationsFromInitData'](_0x5cbbf7['initData']);this['_document']['history']['version']=-_0x186628['length'],_0x186628['forEach'](_0x32a463=>{_0x32a463['baseVersion']-=_0x186628['length'],_0x32a463['createdAt']=_0x5cbbf7['sessionCreatedAt'],_0x32a463['_isInit']=!0x0,_0x32a463['_authorId']=null;}),this['_applyOperationsSet'](_0x186628,!0x0),this['serverHistory']['version']=-_0x186628['length']+this['_offset'],this['_updateServerHistory'](_0x186628);}this['_document']['history']['version']=_0x4bce30,_0x39a2f1=this['_decompressOperations'](_0x5cbbf7['data'],_0x5cbbf7['metadata']),await this['_fetchMissingUsers'](_0x39a2f1),this['_applyOperationsSet'](_0x39a2f1,_0x42b1bd);}_0x5cbbf7['lastOperationId']&&(this['_operationIdentifier']['setIdForTheLastOperation'](_0x39a2f1,_0x5cbbf7['lastOperationId']),this['_lastSyncedOperationId']=_0x5cbbf7['lastOperationId']),this['serverHistory']['version']=_0x4bce30+this['_offset'],this['_updateServerHistory'](_0x39a2f1),_0x1a41de['filter'](_0x2d5cf2=>{const _0xfdcaad=this['_getAffectedRoot'](_0x2d5cf2);return _0xfdcaad&&!this['_knownRootNames']['has'](_0xfdcaad);})['forEach']((_0x1a7f99,_0x59fdbd)=>{_0x1a7f99['baseVersion']=this['_document']['version']+_0x59fdbd,this['_saveOperationInBuffer'](_0x1a7f99);}),this['_shouldSendUpdate']()?(this['_currentBufferDelay']=0x0,this['_sendBufferedOperationsDelayed'](!0x0),await this['_waitUntilSynced']()):(this['_isPendingUpdate']=!0x1,this['_clearPendingAction']());}['_crash'](_0x2dadf5,_0xb89f39){throw this['_isPendingUpdate']=!0x0,_0xb89f39&&console['error'](_0xb89f39),new _0x54e36b(_0x2dadf5,this['editor']);}['_saveOperationInBuffer'](_0x23f6c8){this['_knownOperations']['has'](_0x23f6c8)||(this['_knownOperations']['add'](_0x23f6c8),this['_bufferedOperations']['push'](_0x23f6c8),this['_pendingAction']||'marker'==_0x23f6c8['type']&&!_0x23f6c8['affectsData']||this['_setPendingAction']());}['_sendBufferedOperationsDelayed'](_0x1d260f=!0x1){!_0x1d260f&&this['_isPendingUpdate']||(this['_isPendingUpdate']=!0x0,clearTimeout(this['_sendBufferedOperationsDelayId']),this['_sendBufferedOperationsDelayId']=setTimeout(()=>{this['_sendBufferedOperations']()['then'](_0x4fa273=>{_0x4fa273&&(this['_clearPendingAction'](),this['_isPendingUpdate']=!0x1);})['catch'](_0xaa05ec=>{if(this['_clearPendingAction'](),this['_isPendingUpdate']=!0x1,!function(_0x43094e){return _0x43094e['message']['startsWith']('cloud-services-internal-error:\x20Not\x20connected.')||_0x43094e['message']['startsWith']('cloud-services-internal-error:\x20Collaborative\x20Editing\x20Service\x20is\x20not\x20connected.')||_0x43094e['message']['startsWith']('cloud-services-internal-error:\x20Request\x20timeout.');}(_0xaa05ec))throw _0xaa05ec;});},this['_currentBufferDelay']));}['_waitUntilSynced'](){return new Promise(_0x30e365=>{this['on']('change:_isPendingUpdate',()=>{_0x30e365();});});}async['_sendBufferedOperations'](){const _0x49737e=this['editor']['plugins']['get'](H);if(this['_shouldSendSelectionUpdate']()&&(_0x49737e['createUserMarkerOperations'](),this['_hasSelectionChanged']=!0x1),!this['_shouldSendUpdate']())return!0x0;const _0x286a8e=[...this['_bufferedOperations']];for(const _0x4e0aec of _0x286a8e)_0x4e0aec['wasUndone']=this['_document']['history']['isUndoneOperation'](_0x4e0aec);const _0x4e5f53=this['_operationIdentifier']['getIdOfTheLastOperation'](_0x286a8e),_0x139c3f=K++,_0x27c8a1=this['_compressOperations'](_0x286a8e),_0x1049e3=await this['_service']['sendOperations'](_0x27c8a1,_0x27c8a1['baseVersion'],_0x4e5f53);try{return await this['_handleServerResponse'](_0x286a8e,_0x1049e3,_0x139c3f);}catch(_0x3bd8da){return this['_crash']('realtimecollaborationclient-sendbufferedoperations',_0x3bd8da);}}async['_handleServerResponse'](_0x28dc00,_0x227c94,_0x1718d3){if('error'in _0x227c94)throw _0x227c94['error'];let _0x1f49ba=!0x1;if(_0x227c94['wereChangesApplied']){_0x227c94['lastOperationId']&&(this['_lastSyncedOperationId']=_0x227c94['lastOperationId']),this['_bufferedOperations']=this['_bufferedOperations']['filter'](_0x256d63=>!_0x28dc00['includes'](_0x256d63));for(const _0x2299c3 of _0x28dc00)_0x2299c3['createdAt']='lastOperationAcceptedAt'in _0x227c94&&_0x227c94['lastOperationAcceptedAt']||void 0x0;Q(_0x28dc00,_0x227c94['version']-_0x28dc00['length']),this['_updateServerHistory'](_0x28dc00);const _0x11f998=_0x28dc00['filter'](_0xf6c5c6=>{if(!_0xf6c5c6['_isInit'])return!0x1;const _0x169511=this['_getAffectedRoot'](_0xf6c5c6);return _0x169511&&!this['_knownRootNames']['has'](_0x169511);});Q(_0x11f998,this['_document']['version']),this['_applyOperationsSet'](_0x11f998),_0x1f49ba=!0x0,this['_currentBufferDelay']=this['_baseBufferDelay'];}else{const _0x5a8d5a=this['_decompressOperations'](_0x227c94['data'],_0x227c94['metadata'])['filter'](_0x2e67d8=>_0x2e67d8['baseVersion']>=this['_lastServerVersion']);_0x5a8d5a['forEach'](_0x588879=>this['_addKnownRoot'](_0x588879)),this['_bufferedOperations']=this['_bufferedOperations']['filter'](_0x9f0b30=>!_0x9f0b30['_isInit']||!this['_knownRootNames']['has'](this['_getAffectedRoot'](_0x9f0b30))),this['_bufferedOperations']['length']&&Q(this['_bufferedOperations'],this['_bufferedOperations'][0x0]['baseVersion']),await this['_fetchMissingUsers'](_0x5a8d5a),_0x1f49ba=this['_handleExternalOperations'](_0x5a8d5a,_0x227c94['version'],_0x227c94['lastOperationId']),this['_currentBufferDelay']=Math['round'](this['_currentBufferDelay']/0x2);}return _0x1f49ba?!this['_shouldSendUpdate']()||(this['_sendBufferedOperationsDelayed'](!0x0),!0x1):this['_crash']('realtimecollaborationclient-handleserverresponse');}['_handleExternalOperations'](_0x450cd7,_0x5edf9a,_0x58768a){try{const _0x37a69b={'document':this['_document'],'useRelations':!0x1,'padWithNoOps':!0x0},{operationsA:_0x44ee1a,operationsB:_0x348b5d,originalOperations:_0x16994b}=_0x47cdb6(_0x450cd7,this['_bufferedOperations'],_0x37a69b);Q(_0x44ee1a,this['_document']['version']),Q(_0x348b5d,_0x5edf9a);for(const _0x5ebb69 of _0x44ee1a){const _0x5c2f57=_0x16994b['get'](_0x5ebb69);_0x5ebb69['_authorId']=_0x5c2f57?_0x5c2f57['_authorId']:null;}_0x58768a&&(this['_operationIdentifier']['setIdForTheLastOperation'](_0x450cd7,_0x58768a),this['_lastSyncedOperationId']=_0x58768a),this['_bufferedOperations']=[..._0x348b5d],this['_applyOperationsSet'](_0x44ee1a),this['_updateServerHistory'](_0x450cd7);}catch(_0x147daa){return console['error'](_0x147daa),!0x1;}return!0x0;}['_applyOperationsSet'](_0xf73b3c,_0x2d9d96=!0x1){this['editor']['model']['enqueueChange']({'isUndoable':!0x1,'isLocal':!0x1},_0x38573a=>{for(const _0xccf6ce of _0xf73b3c)this['_knownOperations']['add'](_0xccf6ce),this['_addKnownRoot'](_0xccf6ce),_0x38573a['batch']['addOperation'](_0xccf6ce),this['editor']['model']['applyOperation'](_0xccf6ce);});}['_addKnownRoot'](_0x362b02){const _0x1190bc=this['_getAffectedRoot'](_0x362b02);_0x1190bc&&this['_knownRootNames']['add'](_0x1190bc);}['_getAffectedRoot'](_0x41bfa2){let _0x3b1a01,_0x5b63e7;switch(_0x41bfa2['type']){case'insert':_0x3b1a01=_0x41bfa2['position']['root'];break;case'marker':if(_0x5b63e7=_0x41bfa2['newRange'],!_0x5b63e7)return null;_0x3b1a01=_0x5b63e7['root'];break;case'addRootAttribute':_0x3b1a01=_0x41bfa2['root'];break;case'addRoot':_0x3b1a01=_0x41bfa2['affectedSelectable'];break;case'move':_0x3b1a01=_0x41bfa2['targetPosition']['root'];break;default:return null;}return _0x3b1a01['rootName'];}['_updateServerHistory'](_0x1f9dcd){_0x1f9dcd['forEach'](_0x1f0670=>{const _0x2e7341=_0x1f0670['clone']();_0x2e7341['_authorId']=_0x1f0670['_authorId'],_0x2e7341['_isInit']=!!_0x1f0670['_isInit'],_0x2e7341['createdAt']=_0x1f0670['createdAt'],_0x2e7341['baseVersion']+=this['_offset'],_0x1f0670['_isDisconnection']&&this['_disconnectionOperations']['add'](_0x2e7341),this['serverHistory']['addOperation'](_0x2e7341);});}['_handleReconnectionError'](_0x44a20c){const _0x24f675=this['editor']['plugins']['get']('Notification'),_0x12e8e6=this['editor']['locale'];_0x44a20c||(_0x44a20c=q(_0x12e8e6,'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.')),_0x24f675['showWarning'](_0x44a20c,{'title':q(_0x12e8e6,'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'](_0x31eda5)['add'](q(this['editor']['locale'],'PENDING_ACTION_SENDING_DATA')));}['_clearPendingAction'](){this['_pendingAction']&&(this['editor']['plugins']['get'](_0x31eda5)['remove'](this['_pendingAction']),this['_pendingAction']=null);}['_compressOperations'](_0x59dffd){const _0x1d93c2=_0x59dffd['map'](_0x450054=>_0x450054['toJSON']());return this['_compressor']['compress'](_0x1d93c2);}['_decompressOperations'](_0x4e7cc8,_0x74a620){return this['_compressor']['decompress'](_0x4e7cc8)['map']((_0x5f4743,_0x3aebfb)=>{const _0x1366fe='init'==_0x74a620[_0x3aebfb]['type'];if('InsertOperation'==_0x5f4743['__className']){const _0x169246=_0x5f4743['position']['root'];!this['_document']['getRoot'](_0x169246)&&(this['_document']['createRoot']('$root',_0x169246)['_isAttached']=!0x1);}const _0x523be0=_0x5cf361['fromJSON'](_0x5f4743,this['_document']);return _0x523be0['wasUndone']=_0x5f4743['wasUndone'],_0x523be0['_isInit']=_0x1366fe,_0x523be0['_authorId']=_0x1366fe?null:_0x74a620[_0x3aebfb]['userId'],_0x523be0['_isDisconnection']='cs:removeUser'===_0x74a620[_0x3aebfb]['type'],_0x523be0['createdAt']=_0x74a620[_0x3aebfb]['createdAt'],_0x523be0;});}['_refreshUserSelectionMarkers'](){this['_hasSelectionChanged']=!0x0,this['_shouldSendSelectionUpdate']()?this['_sendBufferedOperationsDelayed']():this['_hasSelectionChanged']=!0x1;}['_shouldSendSelectionUpdate'](){const _0x1641be=this['editor']['plugins']['get'](r)['channelSessions']['get'](this['_channelId']);return!this['editor']['isReadOnly']&&!!_0x1641be&&_0x1641be['length']>0x1&&this['_hasSelectionChanged'];}['_shouldSendUpdate'](){return this['_bufferedOperations']['length']>0x0||this['_shouldSendSelectionUpdate']();}}class J extends Error{}function Q(_0xd46a92,_0xc9bf89){for(const _0x8d21b4 of _0xd46a92)_0x8d21b4['baseVersion']=_0xc9bf89++;}class X{['_ignoredOperations'];['_operationToId'];constructor(_0xb1404d){this['_ignoredOperations']=_0xb1404d,this['_operationToId']=new WeakMap();}['getIdOfTheLastOperation'](_0x56a5bf){let _0x20af14=_0x56a5bf['length'];for(;_0x20af14--;){const _0x121016=_0x56a5bf[_0x20af14];if(!this['_ignoredOperations']['has'](_0x121016)){if(!this['_operationToId']['has'](_0x121016)){const _0x235967=_0x54b932()['slice'](0x1,0x12);this['_operationToId']['set'](_0x121016,_0x235967);}return this['_operationToId']['get'](_0x121016);}}}['setIdForTheLastOperation'](_0x29359d,_0x492ca5){if(!_0x492ca5)return;let _0x401768=_0x29359d['length'];for(;_0x401768--;){const _0x5ded35=_0x29359d[_0x401768];this['_ignoredOperations']['has'](_0x5ded35)||this['_operationToId']['set'](_0x5ded35,_0x492ca5);}}}class n extends _0x570694{static get['requires'](){return[l];}static get['pluginName'](){return'RealTimeCollaborativeEditing';}}class a extends _0x5197b2{static ['CommentsService']=/* #__PURE__ -- @preserve */
|
|
26
|
+
((()=>_0x355787)());['_services'];static get['requires'](){return[c,'CommentsRepository',r,_0x3d63ec];}static get['pluginName'](){return'CloudServicesCommentsAdapter';}constructor(_0x64473e){super(_0x64473e),this['_services']=new Map();}async['init'](){const _0x44d963=this['context'],_0x565012=_0x44d963['plugins']['get']('CommentsRepository');if(_0x44d963['plugins']['get'](c)['addToReconnectionStack'](this),_0x565012['adapter']={'addCommentThread':async({channelId:_0x2cfa16,threadId:_0x4a383f,comments:_0x14cfbc,resolvedAt:_0x14f835,resolvedBy:_0x3c3cdc,context:_0x177f62,attributes:_0x5114ae})=>{const _0x33869c=await this['_getService'](_0x2cfa16)['addCommentThread']({'commentThreadId':_0x4a383f,'comments':_0x14cfbc['map'](_0xa53313=>function(_0x3afe08,_0x3b3c3a,_0x1b9705){return{'commentThreadId':_0x1b9705,'commentId':_0x3afe08['commentId'],'userId':_0x3afe08['authorId'],'content':_0x3afe08['content'],'documentId':_0x3b3c3a,'createdAt':_0x3afe08['createdAt'],'attributes':_0x3afe08['attributes']||{}};}(_0xa53313,_0x2cfa16,_0x4a383f)),'resolvedAt':_0x14f835,'resolvedBy':_0x3c3cdc,'context':_0x177f62,'attributes':_0x5114ae})['catch'](ut);return{'threadId':_0x33869c['commentThreadId'],'comments':_0x33869c['comments']};},'getCommentThread':async({channelId:_0x1ec641,threadId:_0x41ddc9})=>{const _0x8872b4=await this['_getService'](_0x1ec641)['getCommentThread'](_0x41ddc9)['catch'](ut);return _0x8872b4['deletedAt']?null:(await this['_fetchMissingUsersForThreads']([_0x8872b4]),{'threadId':_0x8872b4['commentThreadId'],'comments':_0x8872b4['comments']['map'](S),'context':_0x8872b4['context'],'resolvedAt':_0x8872b4['resolvedAt'],'resolvedBy':_0x8872b4['resolvedBy'],'attributes':_0x8872b4['attributes']||{}});},'updateCommentThread':async({channelId:_0x2c6cad,threadId:_0x39b51b,context:_0x14e3a0,unlinkedAt:_0x150161,attributes:_0x54c37a})=>this['_getService'](_0x2c6cad)['updateCommentThread']({'commentThreadId':_0x39b51b,'context':_0x14e3a0,'attributes':_0x54c37a,'unlinkedAt':_0x150161})['catch'](B)['catch'](ut),'resolveCommentThread':async({channelId:_0x188e0d,threadId:_0x10e11d})=>{const _0x4ab212=await this['_getService'](_0x188e0d)['resolveCommentThread'](_0x10e11d)['catch'](B)['catch'](ut);return{'threadId':_0x4ab212['commentThreadId'],'resolvedAt':_0x4ab212['resolvedAt'],'resolvedBy':_0x4ab212['resolvedBy']};},'reopenCommentThread':async({channelId:_0x1f46ee,threadId:_0x5de85c})=>this['_getService'](_0x1f46ee)['reopenCommentThread'](_0x5de85c)['catch'](B)['catch'](ut),'removeCommentThread':({channelId:_0x1dd647,threadId:_0x18ddda})=>this['_getService'](_0x1dd647)['removeCommentThread'](_0x18ddda)['catch'](B)['catch'](ut),'addComment':({channelId:_0x4a2ed1,threadId:_0x3317d6,commentId:_0x78fe30,content:_0x4f184,attributes:_0x7ffa0e})=>this['_getService'](_0x4a2ed1)['addComment'](_0x3317d6,_0x78fe30,_0x4f184,_0x7ffa0e)['catch'](ut),'updateComment':({channelId:_0x21b0b8,threadId:_0x27a722,commentId:_0x96f0ae,content:_0xf38dee,attributes:_0x4d2fbf})=>this['_getService'](_0x21b0b8)['updateComment'](_0x27a722,_0x96f0ae,_0xf38dee,_0x4d2fbf)['catch'](B)['catch'](ut),'removeComment':({channelId:_0x4dd5a7,threadId:_0xfb816c,commentId:_0x49739b})=>this['_getService'](_0x4dd5a7)['removeComment'](_0xfb816c,_0x49739b)['catch'](B)['catch'](ut)},_0x44d963 instanceof _0xb6dce1){const _0x2344c7=_0x44d963['config']['get']('collaboration.channelId'),_0x20c74a=_0x44d963['plugins']['get'](r);await this['_setUpService'](_0x2344c7);const _0x5aa8a5=await this['_services']['get'](_0x2344c7)['getConnectedSessions']();this['listenTo'](_0x20c74a,'sessionAdd:'+_0x2344c7,(_0x28c9af,{session:_0x1a707e})=>{_0x1a707e['id']===_0x20c74a['mySessionId']&&(_0x28c9af['off'](),this['context']['plugins']['get']('Permissions')['setPermissions'](_0x1a707e['permissions'],_0x2344c7));}),_0x20c74a['register'](_0x2344c7,_0x5aa8a5);}}async['_setUpService'](_0x18950a){if(this['_services']['has'](_0x18950a))throw new _0x54e36b('cloudservicescommentsadapter-connect-already-connected',null,{'channelId':_0x18950a});const _0x4b55f9=this['context']['plugins']['get']('CommentsRepository'),_0x46e2c9=new a['CommentsService'](_0x18950a);this['_services']['set'](_0x18950a,_0x46e2c9),this['listenTo'](_0x46e2c9,'commentThreadAdded',(_0xfb9a3e,_0x249966)=>{const {commentThreadId:_0x152fd9,documentId:_0x413f3c,context:_0xada702,attributes:_0x1ce99d,resolvedAt:_0x3dd7c9,resolvedBy:_0x5efead,comments:_0x4bbbaf}=_0x249966;_0x4b55f9['getCommentThread'](_0x152fd9)||_0x4b55f9['addCommentThread']({'threadId':_0x152fd9,'channelId':_0x413f3c,'comments':_0x4bbbaf?_0x4bbbaf['map'](S):[],'context':_0xada702,'attributes':_0x1ce99d,'resolvedAt':_0x3dd7c9,'resolvedBy':_0x5efead,'isFromAdapter':!0x0});}),this['listenTo'](_0x46e2c9,'commentThreadUpdated',(_0x46bdff,{commentThreadId:_0x3536de,documentId:_0x23bf8f,context:_0x9ed14a,unlinkedAt:_0x20f7ca,attributes:_0x4a4dc8})=>{_0x4b55f9['getCommentThread'](_0x3536de)&&_0x4b55f9['updateCommentThread']({'threadId':_0x3536de,'channelId':_0x23bf8f,'context':_0x9ed14a,'unlinkedAt':_0x20f7ca,'attributes':_0x4a4dc8,'isFromAdapter':!0x0});}),this['listenTo'](_0x46e2c9,'commentThreadResolved',(_0x1a3311,{commentThreadId:_0x5ef90a,resolvedBy:_0x2ce1a4,resolvedAt:_0x5658e6})=>{const _0x203bc7=_0x4b55f9['getCommentThread'](_0x5ef90a);_0x203bc7&&_0x203bc7['resolve']({'resolvedBy':_0x2ce1a4,'resolvedAt':_0x5658e6,'isFromAdapter':!0x0});}),this['listenTo'](_0x46e2c9,'commentThreadReopened',(_0x232567,{commentThreadId:_0x41811b})=>{const _0xa9722a=_0x4b55f9['getCommentThread'](_0x41811b);_0xa9722a&&_0xa9722a['reopen']({'isFromAdapter':!0x0});}),this['listenTo'](_0x46e2c9,'commentThreadRemoved',(_0x28fcdb,{commentThreadId:_0x5900be})=>{const _0xf0a10=_0x4b55f9['getCommentThread'](_0x5900be);_0xf0a10&&_0xf0a10['remove']({'isFromAdapter':!0x0});}),this['listenTo'](_0x46e2c9,'commentAdded',(_0x53e1a2,_0x329736)=>{const _0x534c54=_0x329736['commentThreadId'],_0x211c34=_0x4b55f9['getCommentThread'](_0x534c54);_0x211c34&&_0x211c34['addComment']({...S(_0x329736),'isFromAdapter':!0x0});}),this['listenTo'](_0x46e2c9,'commentUpdated',(_0x36fbb8,{commentThreadId:_0x18f08d,commentId:_0xd60baa,content:_0x1ae0d2,attributes:_0x57e2c9})=>{const _0x3f73fc=_0x4b55f9['getCommentThread'](_0x18f08d);if(_0x3f73fc){const _0x2c178c=_0x3f73fc['getComment'](_0xd60baa);_0x2c178c&&_0x2c178c['update']({'content':_0x1ae0d2,'attributes':_0x57e2c9,'isFromAdapter':!0x0});}}),this['listenTo'](_0x46e2c9,'commentRemoved',(_0x2e7fb4,{commentThreadId:_0x5ef146,commentId:_0x354ef1})=>{const _0x5e4c4f=_0x4b55f9['getCommentThread'](_0x5ef146);if(_0x5e4c4f){const _0x2d9fa2=_0x5e4c4f['getComment'](_0x354ef1);_0x2d9fa2&&_0x2d9fa2['remove']({'isFromAdapter':!0x0});}}),await this['_connectService'](_0x18950a);}['destroy'](){if(this['context']instanceof _0xb6dce1){const _0xd68914=this['context']['config']['get']('collaboration.channelId');this['_terminateService'](_0xd68914);}}['_terminateService'](_0x419179){if(!this['_services']['has'](_0x419179))throw new _0x54e36b('cloudservicescommentsadapter-disconnect-not-exist',null,{'channelId':_0x419179});this['_getService'](_0x419179)['disconnect'](),this['_services']['delete'](_0x419179);}async['reconnect'](){for(const _0x591c86 of this['_services']['keys']())await this['_connectService'](_0x591c86);if(this['context']instanceof _0xb6dce1){const _0x38c68d=this['context']['config']['get']('collaboration.channelId'),_0x18dcef=this['context']['plugins']['get'](r);_0x18dcef['unregister'](_0x38c68d);const _0x183e39=await this['_services']['get'](_0x38c68d)['getConnectedSessions']();_0x18dcef['register'](_0x38c68d,_0x183e39);}}async['_connectService'](_0x2aeadc){const {connection:_0x494759}=this['context']['plugins']['get'](c),_0x29ca4f=this['context']['plugins']['get']('CommentsRepository'),_0x52913d=this['_services']['get'](_0x2aeadc),_0x468981=await _0x52913d['connect'](_0x494759);await this['_fetchMissingUsersForThreads'](_0x468981);const _0x8ba8c9=new Set(Array['from'](_0x29ca4f['getCommentThreads']({'channelId':_0x2aeadc}),_0x112155=>_0x112155['id']));for(const _0x7b5beb of _0x468981)_0x7b5beb['deletedAt']||_0x8ba8c9['delete'](_0x7b5beb['commentThreadId']);for(const _0x4ee6f3 of _0x8ba8c9)_0x29ca4f['getCommentThread'](_0x4ee6f3)['remove']({'isFromAdapter':!0x0});for(const _0x103858 of _0x468981){let _0xbd7c1=_0x29ca4f['getCommentThread'](_0x103858['commentThreadId']);const {commentThreadId:_0xa4706,context:_0x41e0dc,attributes:_0x4f49b5,resolvedBy:_0xf446fd,resolvedAt:_0x5b88c5,unlinkedAt:_0x23c912,deletedAt:_0x1df0a5}=_0x103858;if(_0x1df0a5)continue;_0xbd7c1||(_0xbd7c1=_0x29ca4f['addCommentThread']({'channelId':_0x2aeadc,'threadId':_0xa4706,'context':_0x41e0dc,'attributes':_0x4f49b5||{},'resolvedBy':_0xf446fd,'resolvedAt':_0x5b88c5,'unlinkedAt':_0x23c912,'isFromAdapter':!0x0}));const _0x7b3dd=new Set(Array['from'](_0xbd7c1['comments'],_0x40549a=>_0x40549a['id']));for(const _0x5ee8d2 of _0x103858['comments'])_0x7b3dd['delete'](_0x5ee8d2['commentId']);for(const _0x555263 of _0x7b3dd)_0xbd7c1['getComment'](_0x555263)['remove']({'isFromAdapter':!0x0});for(const _0x3bc4c6 of _0x103858['comments']){const _0x4ca01e=_0xbd7c1['getComment'](_0x3bc4c6['commentId']);_0x4ca01e?_0x4ca01e['content']!==_0x3bc4c6['content']&&_0x4ca01e['update']({'content':_0x3bc4c6['content'],'isFromAdapter':!0x0}):_0xbd7c1['addComment'](Object['assign'](S(_0x3bc4c6),{'isFromAdapter':!0x0}));}}}['_getService'](_0x8e6f04){if(!this['_services']['has'](_0x8e6f04))throw new _0x54e36b('cloudservicescommentsadapter-service-not-exist',null,{'channelId':_0x8e6f04});return this['_services']['get'](_0x8e6f04);}async['_fetchMissingUsersForThreads'](_0x4b8cd7){const _0x341594=this['context']['plugins']['get'](_0x3d63ec),{connection:_0x29fb6d}=this['context']['plugins']['get'](c),_0x29486f=new Set();for(const {resolvedBy:_0x4620b1,comments:_0xdd7b21}of _0x4b8cd7){_0x4620b1&&!_0x341594['getUser'](_0x4620b1)&&_0x29486f['add'](_0x4620b1);for(const {userId:_0x2b836f}of _0xdd7b21)_0x341594['getUser'](_0x2b836f)||_0x29486f['add'](_0x2b836f);}if(0x0===_0x29486f['size'])return;const _0x35faea=await lt['getMany'](_0x29fb6d,Array['from'](_0x29486f));for(const _0x32cee7 of _0x35faea)_0x341594['getUser'](_0x32cee7['id'])||_0x341594['addUser'](_0x32cee7);}}async function B(_0x5565a0){if('404'!==_0x5565a0['code'])throw _0x5565a0;}function ut(_0x26fbbf){if((_0x5a888a=_0x26fbbf)['message']['startsWith']('cloud-services-internal-error:\x20Comments\x20Service\x20is\x20not\x20connected.')||_0x5a888a['message']['startsWith']('cloud-services-internal-error:\x20Not\x20connected.')||_0x5a888a['message']['startsWith']('cloud-services-internal-error:\x20Request\x20timeout.'))return new Promise(()=>{});var _0x5a888a;throw _0x26fbbf;}function S(_0x2154d0){return{'threadId':_0x2154d0['commentThreadId'],'commentId':_0x2154d0['commentId'],'content':_0x2154d0['content'],'createdAt':_0x2154d0['createdAt'],'authorId':_0x2154d0['userId'],'attributes':_0x2154d0['attributes']||{}};}class g extends _0x570694{static ['TrackChangesService']=/* #__PURE__ -- @preserve */
|
|
27
|
+
((()=>et)());['_bufferedRequests'];['_trackChangesService'];static get['requires'](){return[a,'TrackChangesEditing',c];}constructor(_0x530efe){super(_0x530efe);const _0x43031b=this['editor']['config']['get']('collaboration.channelId');this['_bufferedRequests']=new Map(),this['_trackChangesService']=new g['TrackChangesService'](_0x43031b);}['init'](){const _0x3c1401=this['editor']['plugins']['get'](c),_0x1711b6=this['editor']['plugins']['get']('TrackChangesEditing');return _0x1711b6['adapter']={'getSuggestion':async _0x1d9f3e=>{await this['_waitForServiceReady']();const _0x2ef226=await this['_trackChangesService']['get'](_0x1d9f3e)['catch'](R);return await this['_fetchMissingUsersForThreads']([_0x2ef226]),_0x2ef226;},'addSuggestion':async({id:_0x1d1f2b,type:_0x1a211c,data:_0x584698,originalSuggestionId:_0x3a2ea8,attributes:_0x41813a})=>{await this['_waitForServiceReady']();const _0x2568ea={'id':_0x1d1f2b,'type':_0x1a211c,'data':_0x584698,'originalSuggestionId':_0x3a2ea8,'attributes':_0x41813a},_0x5cb393=await this['_trackChangesService']['add'](_0x1d1f2b,_0x1a211c,_0x584698,_0x3a2ea8,_0x41813a)['catch'](_0x3842d6=>{if(ft(_0x3842d6))return new Promise(_0x2b05e1=>{this['_bufferedRequests']['set'](_0x1d1f2b,{'resolve':_0x2b05e1,'suggestionData':_0x2568ea});});throw _0x3842d6;});return this['_bufferedRequests']['delete'](_0x1d1f2b),_0x5cb393;},'updateSuggestion':async(_0x2f54a4,_0x13f3e4)=>{if(await this['_waitForServiceReady'](),'open'!==_0x13f3e4['state'])return this['_trackChangesService']['update'](_0x2f54a4,_0x13f3e4)['catch'](R);}},this['listenTo'](this['_trackChangesService'],'suggestionUpdated',(_0x2693c8,_0x47dd23)=>{_0x1711b6['hasSuggestion'](_0x47dd23['id'])&&(_0x1711b6['getSuggestion'](_0x47dd23['id'])['attributes']=_0x47dd23['attributes']);}),this['_trackChangesService']['connect'](_0x3c1401['connection'])['then'](_0x15c69c=>(_0x3c1401['addToReconnectionStack'](this),this['_fetchMissingUsersForThreads'](_0x15c69c)['then'](()=>{for(const _0x4feb50 of _0x15c69c){_0x1711b6['addSuggestionData'](_0x4feb50)['_saved']=!0x0;}})));}async['reconnect'](){const _0x1b7eeb=this['editor']['plugins']['get']('TrackChangesEditing'),{connection:_0x37f452}=this['editor']['plugins']['get'](c),_0x5c0a4a=await this['_trackChangesService']['connect'](_0x37f452);await this['_fetchMissingUsersForThreads'](_0x5c0a4a);for(const {suggestionData:_0xa5212b,resolve:_0x2961d}of this['_bufferedRequests']['values']()){let _0x34c25b=_0x5c0a4a['find'](_0x11169e=>_0x11169e['id']===_0xa5212b['id']);_0x34c25b||(_0x34c25b=await this['_trackChangesService']['add'](_0xa5212b['id'],_0xa5212b['type'],_0xa5212b['data'],_0xa5212b['originalSuggestionId'])),_0x2961d(_0x34c25b);}for(const _0x4e198c of _0x5c0a4a)_0x1b7eeb['hasSuggestion'](_0x4e198c['id'])||_0x1b7eeb['addSuggestionData'](_0x4e198c);}async['_waitForServiceReady'](){this['_trackChangesService']['isConnected']||await new Promise(_0x1e503e=>{this['listenTo'](this['_trackChangesService'],'connected',_0x1cd9cc=>{_0x1cd9cc['off'](),_0x1e503e();});});}async['_fetchMissingUsersForThreads'](_0x35ff80){const _0x34f2f4=this['editor']['plugins']['get'](_0x3d63ec),{connection:_0x3b6461}=this['editor']['plugins']['get'](c),_0x101a12=new Set();for(const {authorId:_0xa82b51}of _0x35ff80)_0x34f2f4['getUser'](_0xa82b51)||_0x101a12['add'](_0xa82b51);if(0x0===_0x101a12['size'])return;const _0x442fe8=await lt['getMany'](_0x3b6461,Array['from'](_0x101a12));for(const _0x4a6f23 of _0x442fe8)_0x34f2f4['getUser'](_0x4a6f23['id'])||_0x34f2f4['addUser'](_0x4a6f23);}}function R(_0x756a64){if(ft(_0x756a64))return new Promise(()=>{});throw _0x756a64;}function ft(_0x5bdc7d){return _0x5bdc7d['message']['startsWith']('cloud-services-internal-error:\x20Not\x20connected.')||_0x5bdc7d['message']['startsWith']('cloud-services-internal-error:\x20Request\x20timeout.');}class m extends _0x570694{static get['requires'](){return['Comments',a,n,c];}static get['pluginName'](){return'RealTimeCollaborativeComments';}['init'](){const _0xcc645b=this['editor']['plugins']['get'](c),_0x47b50e=this['editor']['plugins']['get']('CommentsEditing'),_0x85e8d6=this['editor']['plugins']['get'](a);return this['editor']['data']['once']('ready',()=>{this['listenTo'](_0xcc645b,'change:state',(_0x5509b9,_0x17b07a,_0x12c919)=>{_0x47b50e['isThreadsLoadingPaused']='connected'!==_0x12c919;});}),this['listenTo'](_0xcc645b,'change:state',(_0x3bbf66,_0x4ac80e,_0x45e400)=>{this['editor']['plugins']['get']('CommentsRepository')['switchReadOnly']('connected'!==_0x45e400);}),_0x85e8d6['_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 _0x570694{static get['requires'](){return[m,g,'TrackChanges'];}static get['pluginName'](){return'RealTimeCollaborativeTrackChanges';}}class v extends _0x570694{static ['RevisionHistoryService']=/* #__PURE__ -- @preserve */
|
|
28
|
+
((()=>it)());['_lastRequestId'];['_revisionTracker'];['_revisionHistoryService'];['_oldOffset'];static get['requires'](){return[c,l,'RevisionTracker',r,_0x3d63ec];}constructor(_0x3e0a88){super(_0x3e0a88);const _0x47f115=this['editor']['config']['get']('collaboration.channelId');this['_lastRequestId']=null,this['_revisionTracker']=this['editor']['plugins']['get']('RevisionTracker'),this['_revisionHistoryService']=new v['RevisionHistoryService'](_0x47f115);}async['init'](){const _0x4c44d2=this['editor']['plugins']['get'](l),_0x3108f8=_0x4c44d2['serverHistory'],_0x1c4d9b=this['editor']['plugins']['get'](c);this['_revisionTracker']['setSource']({'history':_0x3108f8,'getLatestVersion':()=>this['_getLatestVersion'](),'getCurrentRevisionId':()=>_0x4c44d2['sessionId']});const _0x39b9c7=this['editor']['config']['get']('cloudServices.bundleVersion')||nt,_0x27a0c2=await tt['isBundleUploaded'](_0x1c4d9b['connection'],_0x39b9c7);this['_revisionTracker']['adapter']={'getRevision':async({revisionId:_0x57ab7e})=>(await this['_waitForServiceReady'](),await this['_revisionHistoryService']['getRevision'](_0x57ab7e)),'updateRevisions':async _0x2ecf50=>{await this['_waitForServiceReady']();const _0x5cf4fb=this['_revisionTracker']['currentRevision'];if(_0x27a0c2&&0x1===_0x2ecf50['length']&&_0x2ecf50[0x0]['id']===_0x5cf4fb['id'])return _0x2ecf50;for(const _0x441415 of _0x2ecf50)_0x441415['id']===_0x5cf4fb['id']&&(_0x441415['isEmptyCurrent']=_0x441415['fromVersion']===_0x441415['toVersion']);return this['_revisionHistoryService']['updateRevisions'](_0x2ecf50,this['_lastRequestId'])['then'](_0x488ee3=>(this['_lastRequestId']=_0x488ee3,_0x2ecf50))['catch'](_0x52dbae=>{if(st(_0x52dbae)||'400'===_0x52dbae['code']&&void 0x0!==_0x52dbae['data']['wrongRequestId']){for(const _0x25e94e of _0x2ecf50){!this['_revisionTracker']['repository']['getRevision'](_0x25e94e['id'])||this['_revisionTracker']['_bufferUpdate'](_0x25e94e['id'],_0x25e94e,!0x1);}if(st(_0x52dbae))throw _0x52dbae;return _0x2ecf50;}throw _0x52dbae;});}},this['listenTo'](this['_revisionHistoryService'],'revisionsUpdated',(_0xa37403,{revisionsData:_0x56fe71,requestId:_0x1fec59})=>{Math['max'](..._0x56fe71['map'](_0xd9b3a0=>_0xd9b3a0['toVersion']))>this['_getLatestVersionFromServerOperations']()-0x1?this['_getLatestVersion']()['then'](()=>{this['_handleRevisionsUpdate'](_0x56fe71,_0x1fec59);}):this['_handleRevisionsUpdate'](_0x56fe71,_0x1fec59);});const {revisions:_0x4bb3d3,requestId:_0x40d853}=await this['_revisionHistoryService']['connect'](_0x1c4d9b['connection']);_0x1c4d9b['addToReconnectionStack'](this),this['_lastRequestId']=_0x40d853,await this['_fetchMissingUsers'](_0x4bb3d3);for(const _0x74856a of _0x4bb3d3)this['_revisionTracker']['addRevisionData'](_0x74856a);this['listenTo'](_0x4c44d2,'change:_isConnected',(_0x342882,_0xd88626,_0x4e5ebf)=>{_0x4e5ebf&&(this['_oldOffset']=_0x4c44d2['_offset'],_0x342882['off']());}),this['_revisionTracker']['bind']('isEnabled')['to'](_0x1c4d9b,'state',_0x1bb95d=>_0x1bb95d===_0x55fc1b['CONNECTED']);}async['reconnect'](){const _0x51622e=this['editor']['plugins']['get'](c),_0x51a2f4=this['editor']['plugins']['get'](l),_0x361743=async()=>{const _0x2e05a4=this['_revisionTracker']['currentRevision'],_0x2016cf=_0x2e05a4['id'],_0x37befa=_0x2016cf!==_0x51a2f4['sessionId'];if(_0x37befa){const _0x4224dc=_0x51a2f4['_offset']-this['_oldOffset'],_0x1160db=this['_getLatestVersionFromServerOperations']();this['_revisionTracker']['_revisionDataBuilder']['reInit']();if(_0x2e05a4['toVersion']+_0x4224dc!==_0x1160db){const _0x4db67e=_0x2e05a4['fromVersion']+_0x4224dc,_0x5e05f0=this['editor']['plugins']['get'](_0x3d63ec),_0x4a1345=this['_revisionTracker']['buildRevisionData']({'revision':_0x2e05a4,'from':_0x4db67e,'to':_0x1160db});_0x4a1345['id']=_0x2e05a4['id'];const _0x500268=_0x4a1345['authorsIds']['map'](_0xccc800=>_0x5e05f0['getUser'](_0xccc800));_0x2e05a4['_update']({..._0x4a1345,'authors':_0x500268},!0x0),this['_revisionTracker']['_bufferUpdate'](_0x2e05a4['id'],_0x4a1345,!0x0);}this['_revisionTracker']['_startingVersion']=_0x1160db,(_0x2e05a4['toVersion']===_0x2e05a4['fromVersion']&&!this['_revisionTracker']['_bufferedUpdates']['has'](_0x2016cf)&&this['_revisionTracker']['repository']['_revisions']['remove'](_0x2016cf),this['_revisionTracker']['_createCurrentRevision'](_0x1160db));}const {revisions:_0x5eb994,requestId:_0x3da318}=await this['_revisionHistoryService']['reconnect'](_0x51622e['connection'],this['_lastRequestId']);_0x37befa&&_0x5eb994['length']>0x0?_0x51a2f4['_handleReconnectionError']():(await this['_fetchMissingUsers'](_0x5eb994),this['_handleRevisionsUpdate'](_0x5eb994,_0x3da318),this['_revisionTracker']['sendBufferedUpdates']());};return _0x51a2f4['_isConnected']?_0x361743():new Promise((_0x54da79,_0x910afe)=>{_0x51a2f4['once']('change:_isConnected',()=>{_0x361743()['then'](_0x54da79)['catch'](_0x910afe);});});}['destroy'](){super['destroy']();}async['_waitForServiceReady'](){this['_revisionHistoryService']['isConnected']||await new Promise(_0x357814=>{this['listenTo'](this['_revisionHistoryService'],'connected',_0x47820a=>{_0x47820a['off'](),_0x357814();});});}['_getLatestVersionFromServerOperations'](){const _0x81d1de=this['editor']['plugins']['get'](l)['serverHistory']['getOperations']()['reverse']();for(const _0x8e647a of _0x81d1de)if('marker'!==_0x8e647a['type']||_0x8e647a['affectsData'])return _0x8e647a['baseVersion']+0x1;}['_getLatestVersion'](){const _0x17dc68=this['editor']['plugins']['get'](l);return new Promise(_0x46d523=>{_0x17dc68['_isPendingUpdate']?_0x17dc68['once']('change:_isPendingUpdate',()=>{_0x46d523(this['_getLatestVersionFromServerOperations']());}):_0x46d523(this['_getLatestVersionFromServerOperations']());});}['_handleRevisionsUpdate'](_0x53c730,_0x36fc83){const _0x56f24b=this['_revisionTracker']['repository'];this['_lastRequestId']=_0x36fc83;for(const _0x28a567 of _0x53c730){const _0x2fb6a9=_0x56f24b['getRevision'](_0x28a567['id']);if(_0x2fb6a9){if((_0x28a567['fromVersion']||_0x28a567['toVersion'])&&(_0x28a567['diffData']=null),_0x2fb6a9===this['_revisionTracker']['currentRevision']){const _0x394500=Math['max'](_0x2fb6a9['toVersion'],_0x28a567['toVersion']),_0x123a5f=Math['max'](_0x2fb6a9['fromVersion'],_0x28a567['fromVersion']);let _0xdfef3b;_0x2fb6a9['toVersion']===_0x28a567['toVersion']&&_0x2fb6a9['fromVersion']===_0x28a567['fromVersion']?(_0xdfef3b=!0x0,this['_preventResendingRevisionData'](_0x28a567)):_0x28a567['toVersion']===_0x394500&&_0x28a567['fromVersion']===_0x123a5f?_0xdfef3b=!0x1:(_0x2fb6a9['toVersion']===_0x394500&&_0x2fb6a9['fromVersion']===_0x123a5f||this['_fixRevision']({'revision':_0x2fb6a9,'from':_0x123a5f,'to':_0x394500}),_0xdfef3b=!0x0),_0xdfef3b&&(delete _0x28a567['fromVersion'],delete _0x28a567['toVersion'],delete _0x28a567['diffData'],delete _0x28a567['createdAt'],delete _0x28a567['authorsIds']);}this['_revisionTracker']['setRevisionData'](_0x28a567),this['_preventResendingRevisionData'](_0x28a567);}else this['_revisionTracker']['addRevisionData'](_0x28a567);}const _0x14638b=_0x56f24b['getRevisions']();_0x14638b['reverse']();for(let _0x9bf355=0x0;_0x9bf355<_0x14638b['length']-0x1;_0x9bf355++){const _0x4ae31e=_0x14638b[_0x9bf355],_0x2fc69f=_0x14638b[_0x9bf355+0x1];if(_0x4ae31e['fromVersion']<_0x2fc69f['toVersion']){const _0x30dd5e=_0x2fc69f['toVersion'],_0x3fc470=Math['max'](_0x30dd5e,_0x4ae31e['toVersion']);this['_fixRevision']({'revision':_0x4ae31e,'from':_0x30dd5e,'to':_0x3fc470});}}}['_fixRevision']({revision:_0x3b04ff,from:_0x729142,to:_0x14ea04}={}){const _0x43ec98=this['editor']['plugins']['get'](_0x3d63ec),_0x4b001a=this['_revisionTracker']['buildRevisionData']({'revision':_0x3b04ff,'from':_0x729142,'to':_0x14ea04});_0x4b001a['authors']=_0x4b001a['authorsIds']['map'](_0x1cdb06=>_0x43ec98['getUser'](_0x1cdb06)),_0x3b04ff['_update'](_0x4b001a);}['_preventResendingRevisionData'](_0x182ec1){const _0x45c058={};_0x45c058['id']=_0x182ec1['id'];for(const _0x1045d2 of Object['keys'](_0x182ec1))'id'!==_0x1045d2&&(_0x45c058[_0x1045d2]=void 0x0);this['_revisionTracker']['_bufferUpdate'](_0x45c058['id'],_0x45c058,!0x0);}async['_fetchMissingUsers'](_0x404d80){const _0x34c427=this['editor']['plugins']['get'](_0x3d63ec),{connection:_0x4ca61f}=this['editor']['plugins']['get'](c),_0x301e96=new Set();for(const _0x2846f3 of _0x404d80){for(const _0x1549d6 of _0x2846f3['authorsIds'])_0x4cc198(_0x1549d6);_0x2846f3['creatorId']&&_0x4cc198(_0x2846f3['creatorId']);}if(0x0===_0x301e96['size'])return;const _0x11f016=await lt['getMany'](_0x4ca61f,Array['from'](_0x301e96));for(const _0x5470c4 of _0x11f016)_0x34c427['getUser'](_0x5470c4['id'])||_0x34c427['addUser'](_0x5470c4);function _0x4cc198(_0x3fb82d){_0x34c427['getUser'](_0x3fb82d)||_0x301e96['add'](_0x3fb82d);}}}function st(_0x824d9f){return _0x824d9f['message']['startsWith']('cloud-services-internal-error:\x20Revision\x20History\x20Service\x20is\x20not\x20connected.')||_0x824d9f['message']['startsWith']('cloud-services-internal-error:\x20Not\x20connected.')||_0x824d9f['message']['startsWith']('cloud-services-internal-error:\x20Request\x20timeout.');}class d extends _0x570694{static get['requires'](){return['RevisionHistory',v,n];}static get['pluginName'](){return'RealTimeCollaborativeRevisionHistory';}}class ts extends _0x32be6e{constructor(_0x13f877){super(_0x13f877);const _0x392a7d=this['bindTemplate'];this['set']('usersCount',0x0),this['set']('isHidden',!0x0),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-presence-list__counter',_0x392a7d['if']('isHidden','ck-presence-list__counter--hidden')]},'children':[{'text':_0x392a7d['to']('usersCount',_0x2fe730=>q(_0x13f877,'CONNECTED_USERS',_0x2fe730))}]});}}class es extends _0x32be6e{['items'];['keystrokes'];constructor(_0x231f9c){super(_0x231f9c);const _0x4b0d20=this['bindTemplate'];this['items']=this['createCollection'](),this['keystrokes']=new _0xaabba3(),this['set']({'hasPopup':!0x1,'isExpanded':!0x1}),this['setTemplate']({'tag':'div','attributes':{'aria-haspopup':_0x4b0d20['if']('hasPopup'),'aria-expanded':_0x4b0d20['to']('isExpanded',_0x220ef3=>this['hasPopup']&&String(_0x220ef3)),'aria-label':_0x4b0d20['to']('hasPopup',_0x89bfd2=>q(_0x231f9c,_0x89bfd2?'Collapsed\x20connected\x20users\x20list\x20(press\x20ENTER\x20to\x20open\x20it)':'Connected\x20users\x20list')),'role':'list','tabindex':_0x4b0d20['to']('hasPopup',_0x26ac14=>!!_0x26ac14&&0x0),'class':['ck','ck-presence-list__list']},'children':this['items'],'on':{'click':_0x4b0d20['to'](()=>this['fire']('execute'))}}),this['on']('change:hasPopup',(_0x3dd071,_0x3bb3bb,_0x5bccda)=>{this['element']&&(_0x5bccda?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 _0x32be6e{['counterView'];['inlineListView'];constructor(_0x4e5f3d){super(_0x4e5f3d);const _0x328df9=this['bindTemplate'];this['set']('isCollapsed',!0x0),this['counterView']=new ts(this['locale']),this['inlineListView']=new es(_0x4e5f3d),this['inlineListView']['bind']('hasPopup')['to'](this,'isCollapsed'),this['listenTo'](this['inlineListView']['items'],'change',()=>{for(const _0x5eb378 of this['inlineListView']['items'])_0x5eb378['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',_0x328df9['if']('isCollapsed','ck-presence-list--collapsed')]},'children':[this['counterView'],this['inlineListView']]});}}class j extends _0x32be6e{['listWrapperView'];constructor(_0x413818,_0x248f2b){super(_0x413818),this['listWrapperView']=new mt(_0x413818,_0x248f2b),this['setTemplate']({'tag':'div','attributes':{'tabindex':-0x1,'role':'application','class':['ck','ck-presence-list__dropdown-list'],'aria-label':q(_0x413818,'Connected\x20users\x20list\x20dropdown\x20menu')},'children':[this['listWrapperView']]});}}class mt extends _0xeb2606{constructor(_0x4e09a3,_0x8a00e6){super(_0x4e09a3);const _0x416edd=this['bindTemplate'];this['set']('_isScrollable',!0x1),this['setTemplate']({'tag':_0x8a00e6?'div':'ul','attributes':{'class':['ck','ck-reset','ck-list','ck-presence-list__dropdown-list-wrapper',_0x416edd['if']('_isScrollable','ck-presence-list__dropdown-list-wrapper_scrollable')],'role':_0x416edd['to']('role'),'aria-label':_0x416edd['to']('ariaLabel'),'aria-labelledby':_0x416edd['to']('ariaLabelledBy')},'children':this['items']}),this['listenTo'](_0x12da05['window'],'resize',()=>this['checkIfScrollable']()),this['items']['on']('change',()=>this['checkIfScrollable']());}['render'](){super['render'](),this['checkIfScrollable']();}['checkIfScrollable'](){const _0x2669f6=this['element'];_0x2669f6&&(this['_isScrollable']=Math['max'](_0x2669f6['scrollHeight'],_0x2669f6['clientHeight'])>0.8*window['innerHeight']);}}class k extends rt{['userView'];constructor(_0x49d822,_0x2b8c4e,_0xee0673){super(_0x49d822);const _0x5d0f72=this['bindTemplate'];this['userView']=new ct(_0x49d822,_0x2b8c4e);const _0x5113ae={'tag':'li','attributes':{'class':['ck','ck-presence-list__dropdown-list-item'],'tabindex':-0x1,'role':'presentation','aria-label':_0x2b8c4e['name']},'children':[this['userView'],{'tag':'span','attributes':{'class':['ck','ck-user__full-name']},'children':[{'text':_0x2b8c4e['name']}]},{'tag':'span','attributes':{'class':['ck','ck-presence-list__marker',_0x2b8c4e['color']['getBackgroundColorClass']()],'aria-hidden':'true'}}]};_0xee0673&&(_0x5113ae['tag']='button',_0x5113ae['on']={'click':_0x5d0f72['to'](()=>this['fire']('execute'))}),this['setTemplate'](_0x5113ae);}['focus'](){this['element']['focus']();}}class y extends _0x32be6e{['userView'];['markerView'];constructor(_0x17a2d9,_0x594869,_0x1adc34){super(_0x17a2d9);const _0x1ef86f=this['bindTemplate'];this['set']('isFocusable',!0x1),this['set']('hasTooltip',!0x0),this['set']('tooltipPosition',''),this['userView']=new ct(_0x17a2d9,_0x594869),this['markerView']=new at(_0x17a2d9,_0x594869);const _0x30d1f4=new ot(_0x17a2d9);_0x30d1f4['template']['tag']='span',_0x30d1f4['text']=_0x594869['name'];const _0x7a5ee5={'tag':'div','attributes':{'class':['ck','ck-presence-list__list-item'],'role':'listitem','tabindex':_0x1ef86f['to']('isFocusable',_0x1ec7e3=>!!_0x1ec7e3&&0x0),'aria-labelledby':_0x30d1f4['id'],'data-cke-tooltip-text':this['userView']['name'],'data-cke-tooltip-position':_0x1ef86f['to']('tooltipPosition'),'data-cke-tooltip-disabled':_0x1ef86f['to']('hasTooltip',_0x1233e4=>!_0x1233e4),'data-cke-tooltip-class':'ck-presence-list__list-item__tooltip'},'children':[this['userView'],this['markerView'],_0x30d1f4]};_0x1adc34&&(_0x7a5ee5['tag']='button',_0x7a5ee5['on']={'click':_0x1ef86f['to'](()=>this['fire']('execute'))}),this['setTemplate'](_0x7a5ee5);}}class at extends _0x32be6e{constructor(_0x52ad87,_0x5809a6){super(_0x52ad87),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-presence-list__marker',_0x5809a6['color']['getBackgroundColorClass']()],'aria-hidden':'true'}});}}const A={'collapseAt':0x6,'displayMe':!0x0};class s extends _0x5197b2{['currentDisplayedUsers'];['balloonPanelView'];['view'];['presenceDropdownView'];['_bodyCollection']=null;constructor(_0x880bf6){super(_0x880bf6),this['context']['config']['define']('presenceList',A);const _0x2c58f5=_0x880bf6['config']['get']('presenceList.collapseAt');if('number'!=typeof _0x2c58f5)throw new _0x54e36b('presencelist-collapseat-invalid-format',this);if(_0x2c58f5<0x1)throw new _0x54e36b('presencelist-collapseat-invalid-format',this);this['_allConnectedUsers']=this['context']['plugins']['get'](r)['allConnectedUsers'],this['set']('usersCount',0x0),this['currentDisplayedUsers']=new _0x5c76ae(),this['balloonPanelView']=new _0x1b84b2(),this['balloonPanelView']['class']='ck\x20ck-presence-list__balloon',this['view']=this['_createView'](),this['presenceDropdownView']=void 0x0;}static get['requires'](){return[r];}['init'](){for(const _0x3bd560 of this['_allConnectedUsers'])this['_handleUserAdd'](_0x3bd560);this['listenTo'](this['_allConnectedUsers'],'add',(_0x4f649d,_0x3cbf06)=>{this['_handleUserAdd'](_0x3cbf06);}),this['listenTo'](this['_allConnectedUsers'],'remove',(_0xfbb8ac,_0x5249a8)=>{this['_handleUserRemove'](_0x5249a8);});}['_createView'](){const _0xbdaa86=this['context'],_0x27a78b=new L(this['context']['locale']),_0x578bf1=this['balloonPanelView'];if(!_0x4796d2(_0xbdaa86['config']['get']('presenceList.container')))throw new _0x54e36b('presencelist-missing-container',this);return _0x27a78b['counterView']['bind']('usersCount')['to'](this),_0x27a78b['bind']('isCollapsed')['to'](this,'usersCount',_0x54a4e7=>{const {collapseAt:_0x16a747,displayMe:_0x48cef2}=_0xbdaa86['config']['get']('presenceList'),_0x584e7b=_0x54a4e7>=_0x16a747;return _0x27a78b['counterView']['isHidden']=!(0x1==_0x54a4e7&&_0x48cef2||_0x584e7b),_0x584e7b||this['hideDropdown'](),_0x584e7b;}),_0x27a78b['inlineListView']['items']['bindTo'](this['currentDisplayedUsers'])['using'](_0x3fc5d7=>{const _0x5a47ac=_0xbdaa86['config']['get']('presenceList'),_0x3cef48=new y(_0xbdaa86['locale'],_0x3fc5d7,!!_0x5a47ac['onClick']);return _0x3cef48['bind']('hasTooltip')['to'](_0x27a78b,'isCollapsed',_0x54e50e=>!_0x54e50e),_0x3cef48['bind']('isFocusable')['to'](_0x27a78b,'isCollapsed',_0x167759=>!_0x167759),_0x5a47ac['onClick']&&this['listenTo'](_0x3cef48,'execute',()=>{this['view']['isCollapsed']||_0x5a47ac['onClick'](_0x3fc5d7,_0x3cef48['element']);}),_0x3cef48;}),this['listenTo'](_0x27a78b['inlineListView'],'execute',()=>{this['presenceDropdownView']?this['hideDropdown']():this['view']['isCollapsed']&&this['showDropdown']();}),_0x27a78b['inlineListView']['keystrokes']['set']('Enter',(_0x1dc682,_0x151a7f)=>{this['view']['isCollapsed']&&(this['showDropdown'](),_0x151a7f());}),_0x27a78b['render'](),_0x578bf1['render'](),_0x500c9c({'emitter':_0x27a78b,'activator':()=>_0x578bf1['isVisible'],'contextElements':[_0x578bf1['element'],_0x27a78b['inlineListView']['element']],'callback':()=>this['hideDropdown']()}),_0xbdaa86['config']['get']('presenceList.container')['appendChild'](_0x27a78b['element']),this['_bodyCollection']=new _0x4a9306(this['context']['locale']),this['_bodyCollection']['attachToDom'](),this['_bodyCollection']['add'](this['balloonPanelView']),_0x27a78b;}['_handleUserAdd'](_0x142860){if(!this['context']['config']['get']('presenceList.displayMe')&&_0x142860['isMe'])return;const _0x1f63ab=this['context']['config']['get']('presenceList.collapseAt')-0x1;this['usersCount']++,this['currentDisplayedUsers']['length']==_0x1f63ab&&this['currentDisplayedUsers']['length']>0x1&&this['currentDisplayedUsers']['remove'](0x1);const _0x4391f1=_0x142860['isMe']?0x0:this['currentDisplayedUsers']['length'];this['currentDisplayedUsers']['add'](_0x142860,_0x4391f1);}['_handleUserRemove'](_0x5508c4){if(this['usersCount']--,this['currentDisplayedUsers']['get'](_0x5508c4['id'])&&(this['currentDisplayedUsers']['remove'](_0x5508c4['id']),this['currentDisplayedUsers']['length']<this['usersCount'])){for(const _0x11e7e6 of Array['from'](this['_allConnectedUsers'])['reverse']())if(!this['currentDisplayedUsers']['get'](_0x11e7e6['id']))return void this['currentDisplayedUsers']['add'](_0x11e7e6,Math['min'](this['currentDisplayedUsers']['length'],0x1));}}['showDropdown'](){if(this['presenceDropdownView'])return;const _0x1eabca=this['context']['config']['get']('presenceList');this['presenceDropdownView']=new j(this['context']['locale'],!!_0x1eabca['onClick']),this['view']['inlineListView']['isExpanded']=!0x0;const {listWrapperView:_0x15a2df}=this['presenceDropdownView'];_0x15a2df['items']['bindTo'](this['_allConnectedUsers'])['using'](_0x22b9f4=>{if(!_0x1eabca['displayMe']&&_0x22b9f4['isMe'])return null;const _0x2d4c07=new k(this['context']['locale'],_0x22b9f4,!!_0x1eabca['onClick']);return _0x1eabca['onClick']&&this['listenTo'](_0x2d4c07,'execute',()=>{_0x1eabca['onClick'](_0x22b9f4,_0x2d4c07['element']);}),_0x2d4c07;}),this['balloonPanelView']['content']['add'](this['presenceDropdownView']),this['balloonPanelView']['pin']({'target':this['view']['inlineListView']['element']}),_0x15a2df['focus'](),_0x15a2df['checkIfScrollable']();const _0x5afa6d=(_0x5c40bf,_0x43fb0b)=>{this['hideDropdown'](),this['view']['inlineListView']['focus'](),_0x43fb0b();};_0x15a2df['keystrokes']['set']('Esc',_0x5afa6d),_0x15a2df['keystrokes']['set']('Shift+Tab',_0x5afa6d),_0x15a2df['keystrokes']['set']('Tab',(_0x3d874e,_0x43f34d)=>{!function(_0x1f88df){const _0x58e721=['a','button','input','select','textarea','[tabindex]','[contenteditable]']['map'](_0x1455af=>_0x1455af+':not([disabled]):not([tabindex=\x22-1\x22])')['join'](','),_0xd8f3e3=[...document['body']['querySelectorAll'](_0x58e721)]['filter'](_0x454e41=>_0x454e41===document['activeElement']||_0x454e41['offsetWidth']+_0x454e41['offsetHeight']>0x0)['sort']((_0x1eed9a,_0x3fb5d4)=>(_0x1eed9a['tabIndex']||0x0)-(_0x3fb5d4['tabIndex']||0x0)),_0x20a175=_0xd8f3e3['indexOf'](_0x1f88df),_0x14a0e3=_0xd8f3e3[(_0x20a175+0x1)%_0xd8f3e3['length']];_0x14a0e3&&_0x14a0e3['focus']();}(this['view']['element']),this['hideDropdown'](),_0x43f34d();}),_0x15a2df['focusTracker']['add'](this['view']['element']),_0x15a2df['focusTracker']['on']('change:isFocused',(_0x111cee,_0x250ef0,_0x38e957)=>{_0x38e957||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 _0x5197b2{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':'','Connected\x20users\x20list':'','Collapsed\x20connected\x20users\x20list\x20(press\x20ENTER\x20to\x20open\x20it)':'','The\x20document\x20cannot\x20be\x20connected\x20back\x20to\x20the\x20server.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.':'لا\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':_0x1351cb=>0x0==_0x1351cb?0x0:0x1==_0x1351cb?0x1:0x2==_0x1351cb?0x2:_0x1351cb%0x64>=0x3&&_0x1351cb%0x64<=0xa?0x3:_0x1351cb%0x64>=0xb&&_0x1351cb%0x64<=0x63?0x4:0x5}};
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
(
|
|
23
|
+
(_0x4eaa8a=>{const {ar:{dictionary:_0x19a373,getPluralForm:_0x3eac14}}={'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':_0x4288d2=>0x0==_0x4288d2?0x0:0x1==_0x4288d2?0x1:0x2==_0x4288d2?0x2:_0x4288d2%0x64>=0x3&&_0x4288d2%0x64<=0xa?0x3:_0x4288d2%0x64>=0xb&&_0x4288d2%0x64<=0x63?0x4:0x5}};_0x4eaa8a['ar']||={'dictionary':{},'getPluralForm':null},_0x4eaa8a['ar']['dictionary']=Object['assign'](_0x4eaa8a['ar']['dictionary'],_0x19a373),_0x4eaa8a['ar']['getPluralForm']=_0x3eac14;})(window['CKEDITOR_TRANSLATIONS']||={});
|