@ckeditor/ckeditor5-real-time-collaboration
Version:
A set of CKEditor 5 features enabling real-time collaboration within the editor using CKEditor Cloud Services.
24 lines • 8.45 kB
JavaScript
/*
* Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
*
*
*
*
* +---------------------------------------------------------------------------------+
* | |
* | Hello stranger! |
* | |
* | |
* | What you're currently looking at is the source code of a legally protected, |
* | proprietary software. Any attempts to deobfuscate / disassemble this code |
* | are forbidden and will result in legal consequences. |
* | |
* | |
* +---------------------------------------------------------------------------------+
*
*
*
*
*/
const _0x5e082b=_0x4397;(function(_0x40fc9d,_0x22d4d2){const _0x3cd1e2=_0x4397,_0x233a07=_0x40fc9d();while(!![]){try{const _0x21bea2=-parseInt(_0x3cd1e2(0x132))/0x1*(-parseInt(_0x3cd1e2(0x129))/0x2)+-parseInt(_0x3cd1e2(0x119))/0x3*(-parseInt(_0x3cd1e2(0x118))/0x4)+parseInt(_0x3cd1e2(0x12f))/0x5*(-parseInt(_0x3cd1e2(0x14a))/0x6)+-parseInt(_0x3cd1e2(0x13b))/0x7*(parseInt(_0x3cd1e2(0x120))/0x8)+-parseInt(_0x3cd1e2(0x14c))/0x9*(parseInt(_0x3cd1e2(0x14e))/0xa)+-parseInt(_0x3cd1e2(0x124))/0xb*(-parseInt(_0x3cd1e2(0x151))/0xc)+-parseInt(_0x3cd1e2(0x143))/0xd*(-parseInt(_0x3cd1e2(0x161))/0xe);if(_0x21bea2===_0x22d4d2)break;else _0x233a07['push'](_0x233a07['shift']());}catch(_0x227a08){_0x233a07['push'](_0x233a07['shift']());}}}(_0x2f16,0x7807c));function _0x4397(_0x5bc1f8,_0x28e99d){const _0x2f1605=_0x2f16();return _0x4397=function(_0x43977e,_0x29606b){_0x43977e=_0x43977e-0x116;let _0x5725e2=_0x2f1605[_0x43977e];return _0x5725e2;},_0x4397(_0x5bc1f8,_0x28e99d);}import{ContextPlugin as _0x5f43f1}from'ckeditor5/src/core.js';import{DomEmitterMixin as _0x4e87a3,CKEditorError as _0x51652e}from'ckeditor5/src/utils.js';import{WebSocketGateway as _0x4a3d26,WEB_SOCKET_GATEWAY_STATES as _0x33a0a8}from'@ckeditor/ckeditor-cloud-services-collaboration/src/services.js';function _0x2f16(){const _0x3b66b4=['all','disconnect','define','996wAyIVL','_domEmitter','54jTbGGs','_shouldPluginsReconnect','1360100PcEkaz','pluginName','limitExceeded','219036rhjoyt','offline','has','config','requires','websocketgateway-invalid-plugin-interface','from','cloudservices-reconnection-error','webSocketUrl','CONNECTING','CloudServices','constructor','connection','function','cloudServices.requestTimeout','get','4144lZndWf','DISCONNECTED','websocketgateway-missing-token','add','CONNECTED','3142508esMJiY','3kFIGrp','_isBrowserOffline','init','websocketgateway-missing-websocket-url','stopListening','isOfficialPlugin','bind','544aLcrNx','isInReconnectionStack','token','websocketgateway-plugin-already-registered','77nzfUYQ','listenTo','change:me','Connected\x20users\x20limit\x20exceeded','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.','10524QxUVeO','removeFromReconnectionStack','addToReconnectionStack','reconnect','_reconnect','state','9970ABWiZK','error','showWarning','145uDjmJN','isPremiumPlugin','WebSocketGateway','initialReconnectionInterval','delete','code','plugins','_reconnectionStack','real-time-collaboration','90202dsuynx','online','set','context','then','cloudservices-init','destroy','connect','36829nNPpQM','connected','catch','cloudServices.connectionTimeout'];_0x2f16=function(){return _0x3b66b4;};return _0x2f16();}import{Notification as _0xf22aec}from'ckeditor5/src/ui.js';class n extends _0x5f43f1{static [_0x5e082b(0x134)]=/* #__PURE__ -- @preserve */
((()=>_0x4a3d26)());static [_0x5e082b(0x135)]=0x3e8;[_0x5e082b(0x15d)];[_0x5e082b(0x139)];[_0x5e082b(0x14d)];[_0x5e082b(0x14b)];static get[_0x5e082b(0x155)](){const _0x356607=_0x5e082b;return[_0x356607(0x15b),_0xf22aec];}static get[_0x5e082b(0x14f)](){const _0x4eea62=_0x5e082b;return _0x4eea62(0x134);}static get[_0x5e082b(0x11e)](){return!0x0;}static get[_0x5e082b(0x133)](){return!0x0;}constructor(_0x47a382){const _0x2c7419=_0x5e082b;super(_0x47a382),this[_0x2c7419(0x13d)](_0x2c7419(0x12e),_0x33a0a8[_0x2c7419(0x117)]),this[_0x2c7419(0x13d)](_0x2c7419(0x11a),!0x1),this[_0x2c7419(0x139)]=new Set(),this[_0x2c7419(0x14d)]=!0x1,this[_0x2c7419(0x14b)]=new(_0x4e87a3())();}[_0x5e082b(0x11b)](){const _0x258250=_0x5e082b,_0x5a18bd=this[_0x258250(0x13e)],_0x521a25=_0x5a18bd[_0x258250(0x138)][_0x258250(0x160)](_0x258250(0x15b)),_0x1a5c99=_0x5a18bd[_0x258250(0x138)][_0x258250(0x160)](_0xf22aec);if(!_0x521a25[_0x258250(0x122)])throw new _0x51652e(_0x258250(0x163),this);if(!_0x521a25[_0x258250(0x159)])throw new _0x51652e(_0x258250(0x11c),this);return this[_0x258250(0x14b)][_0x258250(0x125)](window,_0x258250(0x152),()=>this[_0x258250(0x11a)]=!0x0),this[_0x258250(0x14b)][_0x258250(0x125)](window,_0x258250(0x13c),()=>this[_0x258250(0x11a)]=!0x1),this[_0x258250(0x13e)][_0x258250(0x154)][_0x258250(0x149)](_0x258250(0x146),0xa),this[_0x258250(0x13e)][_0x258250(0x154)][_0x258250(0x149)](_0x258250(0x15f),0x14),n[_0x258250(0x134)][_0x258250(0x142)](_0x521a25[_0x258250(0x122)],_0x521a25[_0x258250(0x159)],{'timeout':0x3e8*this[_0x258250(0x13e)][_0x258250(0x154)][_0x258250(0x160)](_0x258250(0x146)),'requestTimeout':0x3e8*this[_0x258250(0x13e)][_0x258250(0x154)][_0x258250(0x160)](_0x258250(0x15f))})[_0x258250(0x13f)](_0x422e45=>{const _0x215f71=_0x258250;if(this[_0x215f71(0x15d)]=_0x422e45,this[_0x215f71(0x11f)](_0x215f71(0x12e))['to'](_0x422e45,_0x215f71(0x12e),this,_0x215f71(0x11a),(_0x438797,_0x4409a3)=>(_0x215f71(0x144)!==_0x438797&&(this[_0x215f71(0x14d)]=!0x0),_0x4409a3||_0x438797!==_0x33a0a8[_0x215f71(0x117)]?_0x33a0a8[_0x215f71(0x162)]:this[_0x215f71(0x12e)]==_0x33a0a8[_0x215f71(0x162)]&&this[_0x215f71(0x14d)]?(this[_0x215f71(0x14d)]=!0x1,this[_0x215f71(0x12d)](),_0x33a0a8[_0x215f71(0x15a)]):_0x33a0a8[_0x215f71(0x117)])),this[_0x215f71(0x15d)]['on'](_0x215f71(0x130),(_0x2c08f0,_0x55f949)=>{const _0x2974b0=_0x215f71;if(_0x2974b0(0x150)!==_0x55f949[_0x2974b0(0x137)])throw console[_0x2974b0(0x130)](_0x55f949),new _0x51652e(_0x2974b0(0x140),null,{'originalError':_0x55f949});_0x1a5c99[_0x2974b0(0x131)](_0x2974b0(0x128),{'title':_0x2974b0(0x127),'namespace':_0x2974b0(0x13a)});}),!_0x422e45['me'])return new Promise(_0x55aeb7=>_0x422e45['on'](_0x215f71(0x126),_0x55aeb7));})[_0x258250(0x145)](_0x7c0cef=>{const _0x3134ed=_0x258250;throw console[_0x3134ed(0x130)](_0x7c0cef),new _0x51652e(_0x3134ed(0x140),null,{'originalError':_0x7c0cef});});}[_0x5e082b(0x12b)](_0x44ea4b){const _0x2741ea=_0x5e082b;if(_0x2741ea(0x15e)!=typeof _0x44ea4b[_0x2741ea(0x12c)])throw new _0x51652e(_0x2741ea(0x156),this);if(this[_0x2741ea(0x121)](_0x44ea4b))throw new _0x51652e(_0x2741ea(0x123),this,{'name':_0x44ea4b[_0x2741ea(0x15c)][_0x2741ea(0x14f)]});this[_0x2741ea(0x139)][_0x2741ea(0x116)](_0x44ea4b);}[_0x5e082b(0x12a)](_0xe04293){const _0x5f4fc0=_0x5e082b;this[_0x5f4fc0(0x139)][_0x5f4fc0(0x136)](_0xe04293);}[_0x5e082b(0x121)](_0x115ed9){const _0x2c8b18=_0x5e082b;return this[_0x2c8b18(0x139)][_0x2c8b18(0x153)](_0x115ed9);}[_0x5e082b(0x12d)](){const _0x22835e=_0x5e082b;return this[_0x22835e(0x15d)][_0x22835e(0x12c)]()[_0x22835e(0x13f)](()=>Promise[_0x22835e(0x147)](Array[_0x22835e(0x157)](this[_0x22835e(0x139)],_0x25d55a=>_0x25d55a[_0x22835e(0x12c)]())))[_0x22835e(0x13f)](()=>this[_0x22835e(0x12e)]=_0x33a0a8[_0x22835e(0x117)])[_0x22835e(0x145)](_0x1767f4=>{const _0x4424bf=_0x22835e;throw console[_0x4424bf(0x130)](_0x1767f4),new _0x51652e(_0x4424bf(0x158),this[_0x4424bf(0x13e)]);});}[_0x5e082b(0x148)](){const _0x319a14=_0x5e082b;this[_0x319a14(0x15d)]&&this[_0x319a14(0x15d)][_0x319a14(0x148)](),this[_0x319a14(0x12e)]=_0x33a0a8[_0x319a14(0x162)],this[_0x319a14(0x14b)][_0x319a14(0x11d)]();}[_0x5e082b(0x141)](){const _0x4adc47=_0x5e082b;this[_0x4adc47(0x148)](),super[_0x4adc47(0x141)]();}}export{n as WebSocketGateway};