@ckeditor/ckeditor5-revision-history 46.0.1-alpha.6 → 46.0.1-alpha.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/revision-history.js +1 -1
- package/dist/index.js +7 -7
- package/package.json +11 -11
- package/src/revisionsrepository.js +1 -1
- package/src/ui/revisionhistory/revisionhistorysaverevisionformview.js +2 -2
- package/src/ui/revisionhistory/revisionhistoryui.js +1 -1
- package/src/ui/revisionssidebar/revisionssidebarheaderview.js +1 -1
- package/src/ui/revisionssidebar/revisionssidebartimeperiodview.js +1 -1
- package/src/ui/revisionssidebar/revisionssidebarview.js +1 -1
- package/src/ui/revisionssidebar/utils.js +1 -1
- package/src/ui/revisionviewer/changesnavigationview.js +1 -1
- package/src/ui/revisionviewer/revisionviewerloadingoverlay.js +1 -1
- package/src/ui/revisionviewer/revisionviewerui.js +1 -1
package/dist/index.js
CHANGED
|
@@ -20,11 +20,11 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{ObservableMixin as
|
|
24
|
-
_0x1ab161(){['id'];['creator'];['authors'];['diffData'];['toVersion'];['fromVersion'];['model'];constructor(_0x1b0873){super(),this['id']=_0x1b0873['id']||_0x4c4d5d(),this['creator']=_0x1b0873['creator']||null,this['authors']=_0x1b0873['authors']||[],this['diffData']=_0x1b0873['diffData']||null,this['toVersion']=_0x1b0873['toVersion']||0x0,this['fromVersion']=_0x1b0873['fromVersion']||0x0,this['set']('name',_0x1b0873['name']||''),this['set']('createdAt',_0x1b0873['createdAt']||new Date()),this['set']('attributes',_0x1b0873['attributes']||{});}['setName'](_0x4d834c){this['_update']({'name':_0x4d834c});}['setAttribute'](_0x3f2702,_0x49dbe4){const _0x35ec1c=_0x137baa(this['attributes']);_0x44c170(_0x35ec1c,_0x3f2702,_0x49dbe4),this['_update']({'attributes':_0x35ec1c});}['removeAttribute'](_0x4e9375){const _0x31c52d=_0x137baa(this['attributes']);_0x6e5799(_0x31c52d,_0x4e9375),this['_update']({'attributes':_0x31c52d});}['_update'](_0x443d04,_0x2ff180=!0x1){let _0x34ab05=!0x1;const _0x2b41be={'id':this['id']},_0xf92caf=['name','createdAt','diffData','authors','attributes','toVersion','fromVersion','creatorId'];for(const _0x57b75e of _0xf92caf){const _0x58049e=_0x443d04[_0x57b75e];void 0x0!==_0x58049e&&_0x58049e!==this[_0x57b75e]&&(this[_0x57b75e]=_0x58049e,_0x2b41be[_0x57b75e]=_0x58049e,_0x34ab05=!0x0);}_0x34ab05&&(_0x2b41be['authors']&&(_0x2b41be['authorsIds']=_0x2b41be['authors']['map'](_0x33293e=>_0x33293e['id']),delete _0x2b41be['authors']),this['fire']('_update',_0x2b41be,_0x2ff180));}['toJSON'](){return{'id':this['id'],'name':this['name'],'creatorId':this['creator']?this['creator']['id']:null,'authorsIds':this['authors']['map'](_0x544822=>_0x544822['id']),'diffData':this['diffData'],'createdAt':this['createdAt'],'attributes':this['attributes'],'fromVersion':this['fromVersion'],'toVersion':this['toVersion']};}}class S extends _0x47aa5e{['_revisions'];static get['requires'](){return[_0x3337df];}static get['pluginName'](){return'RevisionsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get['length'](){return this['_revisions']['length'];}constructor(_0x1c8d3a){super(_0x1c8d3a),this['_revisions']=new _0x49a21d();}['afterInit'](){!async function(_0xa34ccf){const _0xca324e=_0x5fe81f([0x79,0x32,0x70,0x4f,0x4a,0x73,0x7a,0x5a,0x77,0x51,0x6b,0x57,0x61,0x78,0x67,0x74,0x48,0x72,0x59,0x33,0x44,0x4b,0x38,0x71,0x55,0x54,0x50,0x6f,0x30,0x63,0x75,0x53,0x56,0x6c,0x37,0x4c,0x65,0x34,0x62,0x49,0x31,0x4d,0x39,0x52,0x35,0x6a,0x47,0x6d,0x43,0x42,0x68,0x45,0x41,0x66,0x69,0x64,0x58,0x4e,0x6e,0x76,0x46,0x36]),_0x24df88=0xeb829,_0x44d67b=0x4485a43,_0x4d49dc=0x44f35db^_0x44d67b,_0x32e717=window[_0x5fe81f([0x44,0x61,0x74,0x65])][_0x5fe81f([0x6e,0x6f,0x77])](),_0x247f29=_0xa34ccf[_0x5fe81f([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x4ec317=new window[(_0x5fe81f([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4dc139=>{_0x247f29[_0x5fe81f([0x6f,0x6e,0x63,0x65])](_0x5fe81f([0x72,0x65,0x61,0x64,0x79]),_0x4dc139);}),_0x1ffa80={[_0x5fe81f([0x6b,0x74,0x79])]:_0x5fe81f([0x45,0x43]),[_0x5fe81f([0x75,0x73,0x65])]:_0x5fe81f([0x73,0x69,0x67]),[_0x5fe81f([0x63,0x72,0x76])]:_0x5fe81f([0x50,0x2d,0x32,0x35,0x36]),[_0x5fe81f([0x78])]:_0x5fe81f([0x69,0x43,0x6a,0x4f,0x43,0x76,0x44,0x46,0x49,0x36,0x6c,0x51,0x48,0x48,0x54,0x31,0x38,0x6a,0x56,0x77,0x52,0x66,0x6b,0x66,0x48,0x51,0x32,0x61,0x5f,0x4d,0x79,0x6d,0x54,0x33,0x35,0x4c,0x51,0x56,0x6f,0x46,0x53,0x41,0x49]),[_0x5fe81f([0x79])]:_0x5fe81f([0x6b,0x58,0x49,0x79,0x4a,0x34,0x65,0x76,0x74,0x43,0x45,0x46,0x52,0x6d,0x78,0x4b,0x53,0x55,0x70,0x4b,0x39,0x66,0x44,0x57,0x34,0x35,0x39,0x76,0x58,0x4f,0x76,0x56,0x72,0x68,0x66,0x36,0x75,0x51,0x41,0x65,0x4f,0x69,0x6f]),[_0x5fe81f([0x61,0x6c,0x67])]:_0x5fe81f([0x45,0x53,0x32,0x35,0x36])},_0x17b40c=_0x247f29[_0x5fe81f([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x5fe81f([0x67,0x65,0x74])](_0x5fe81f([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x3a3927(){let _0x25b0e5,_0x2fd2c3=null,_0x26eb15=null;try{if(_0x17b40c==_0x5fe81f([0x47,0x50,0x4c]))return _0x5fe81f([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x25b0e5=_0x5d44f9(),!_0x25b0e5)return _0x5fe81f([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x25b0e5[_0x5fe81f([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x26eb15=_0x37d59d(_0x25b0e5[_0x5fe81f([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x25b0e5[_0x5fe81f([0x6a,0x74,0x69])])),await _0x4c5131()?_0x1971cd()?_0x49ec45()?_0x5fe81f([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x108899()?(_0x25b0e5[_0x5fe81f([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x5fe81f([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x2fd2c3=_0x296633(_0x5fe81f([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x25b0e5[_0x5fe81f([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x5fe81f([0x74,0x72,0x69,0x61,0x6c])&&(_0x2fd2c3=_0x296633(_0x5fe81f([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x4b0cf1()):_0x5fe81f([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x5fe81f([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x5fe81f([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x5fe81f([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x49ec45(){const _0x4e0e29=[_0x5fe81f([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x5fe81f([0x74,0x72,0x69,0x61,0x6c])][_0x5fe81f([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x25b0e5[_0x5fe81f([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x32e717/0x3e8:0xe10*_0x4d49dc;return _0x25b0e5[_0x5fe81f([0x65,0x78,0x70])]<_0x4e0e29;}function _0x1971cd(){const _0x21dfc0=_0x25b0e5[_0x5fe81f([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x21dfc0)return!0x1;if(_0x21dfc0[_0x5fe81f([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5fe81f([0x2a])))return!0x0;if(_0x21dfc0[_0x5fe81f([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5fe81f([0x52,0x48])))return!0x0;if(_0x21dfc0[_0x5fe81f([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5fe81f([0x52,0x52,0x48]))){if(_0x33edcf())return!0x0;if(_0x330a74()||_0x12ae78())return!0x0;}return!0x1;}function _0x108899(){const _0x1abe02=_0x25b0e5[_0x5fe81f([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x1abe02||0x0==_0x1abe02[_0x5fe81f([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x3d854e}=new URL(window[_0x5fe81f([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x1abe02[_0x5fe81f([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3d854e))return!0x0;const _0x5ca4b9=_0x3d854e[_0x5fe81f([0x73,0x70,0x6c,0x69,0x74])](_0x5fe81f([0x2e]));return _0x1abe02[_0x5fe81f([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x2c1845=>_0x2c1845[_0x5fe81f([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5fe81f([0x2a])))[_0x5fe81f([0x6d,0x61,0x70])](_0x1dc548=>_0x1dc548[_0x5fe81f([0x73,0x70,0x6c,0x69,0x74])](_0x5fe81f([0x2e])))[_0x5fe81f([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x75eea5=>_0x75eea5[_0x5fe81f([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x5ca4b9[_0x5fe81f([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x5fe81f([0x6d,0x61,0x70])](_0x272419=>Array(_0x5ca4b9[_0x5fe81f([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x272419[_0x5fe81f([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x5fe81f([0x66,0x69,0x6c,0x6c])](_0x272419[0x0]===_0x5fe81f([0x2a])?_0x5fe81f([0x2a]):'')[_0x5fe81f([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x272419))[_0x5fe81f([0x73,0x6f,0x6d,0x65])](_0x1ece36=>_0x5ca4b9[_0x5fe81f([0x65,0x76,0x65,0x72,0x79])]((_0x38d892,_0x58b112)=>_0x1ece36[_0x58b112]===_0x38d892||_0x1ece36[_0x58b112]===_0x5fe81f([0x2a])));}function _0x4b0cf1(){return _0x2fd2c3&&_0x26eb15?new window[(_0x5fe81f([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x7339ad,_0x38e55d)=>{_0x2fd2c3[_0x5fe81f([0x74,0x68,0x65,0x6e])](_0x7339ad,_0x38e55d),_0x26eb15[_0x5fe81f([0x74,0x68,0x65,0x6e])](_0x1456cf=>{_0x1456cf!=_0x5fe81f([0x56,0x61,0x6c,0x69,0x64])&&_0x7339ad(_0x1456cf);},_0x38e55d);}):_0x2fd2c3||_0x26eb15||_0x5fe81f([0x56,0x61,0x6c,0x69,0x64]);}}function _0x37d59d(_0x3100d9,_0xe0a71d){return new window[(_0x5fe81f([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x434dbb=>{if(_0x181240())return _0x434dbb(_0x5fe81f([0x56,0x61,0x6c,0x69,0x64]));_0x584c8d(),_0x247f29[_0x5fe81f([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x5fe81f([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x453725=!0x1;const _0x58315e=_0x4c4d5d();function _0x54f739(_0x582a86){return!!_0x582a86&&(typeof _0x582a86===_0x5fe81f([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x582a86===_0x5fe81f([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x582a86[_0x5fe81f([0x74,0x68,0x65,0x6e])]===_0x5fe81f([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x582a86[_0x5fe81f([0x63,0x61,0x74,0x63,0x68])]===_0x5fe81f([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x2f99a6(_0x28953f){_0x588acf(_0x28953f)[_0x5fe81f([0x74,0x68,0x65,0x6e])](_0x2bcd95=>{if(!_0x2bcd95||_0x2bcd95[_0x5fe81f([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x5fe81f([0x6f,0x6b]))return _0x5fe81f([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x574ec2(_0x72c2e0(_0x58315e+_0xe0a71d))!=_0x2bcd95[_0x5fe81f([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x5fe81f([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x5fe81f([0x56,0x61,0x6c,0x69,0x64]);})[_0x5fe81f([0x74,0x68,0x65,0x6e])](_0x297c97=>(_0x352f51(),_0x297c97),()=>{const _0x26ed38=_0x3d2957();return null==_0x26ed38?(_0x352f51(),_0x5fe81f([0x56,0x61,0x6c,0x69,0x64])):_0x5fe81f(_0x32e717-_0x26ed38>(0x2044de43^_0x44d67b)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x5fe81f([0x74,0x68,0x65,0x6e])](_0x434dbb)[_0x5fe81f([0x63,0x61,0x74,0x63,0x68])](()=>{_0x434dbb(_0x5fe81f([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x484e23=0x47eb4c3^_0x44d67b;function _0x352f51(){const _0x15ff4f=_0x5fe81f([0x6c,0x6c,0x63,0x74,0x2d])+_0x574ec2(_0x72c2e0(_0x3100d9)),_0x4b73bd=_0x2c304e(_0x574ec2(window[_0x5fe81f([0x4d,0x61,0x74,0x68])][_0x5fe81f([0x63,0x65,0x69,0x6c])](_0x32e717/_0x484e23)));window[_0x5fe81f([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x5fe81f([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x15ff4f,_0x4b73bd);}function _0x3d2957(){const _0x3fe21c=_0x5fe81f([0x6c,0x6c,0x63,0x74,0x2d])+_0x574ec2(_0x72c2e0(_0x3100d9)),_0x11aaa6=window[_0x5fe81f([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x5fe81f([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x3fe21c);return _0x11aaa6?window[_0x5fe81f([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x2c304e(_0x11aaa6),0x10)*_0x484e23:null;}function _0x588acf(_0x1b108a){return new window[(_0x5fe81f([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x393015,_0x2898f3)=>{_0x1b108a[_0x5fe81f([0x74,0x68,0x65,0x6e])](_0x393015,_0x2898f3),window[_0x5fe81f([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x2898f3,0x4498e83^_0x44d67b);});}}_0x247f29[_0x5fe81f([0x6f,0x6e])](_0x5fe81f([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x558343,_0x255387)=>{if(_0x255387[0x0]!=_0x3100d9)return _0x434dbb(_0x5fe81f([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x255387[0x1]={..._0x255387[0x1],[_0x5fe81f([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x58315e};},{[_0x5fe81f([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x5fe81f([0x68,0x69,0x67,0x68])}),_0x247f29[_0x5fe81f([0x6f,0x6e])](_0x5fe81f([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x146c80=>{_0x54f739(_0x146c80[_0x5fe81f([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x453725=!0x0,_0x2f99a6(_0x146c80[_0x5fe81f([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x5fe81f([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x5fe81f([0x6c,0x6f,0x77])}),_0x4ec317[_0x5fe81f([0x74,0x68,0x65,0x6e])](()=>{_0x453725||_0x434dbb(_0x5fe81f([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x181240(){return _0x247f29[_0x5fe81f([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x5fe81f([0x76,0x69,0x65,0x77])][_0x5fe81f([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x5fe81f([0x61,0x75,0x74,0x6f]);}function _0x584c8d(){_0x247f29[_0x5fe81f([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x5fe81f([0x76,0x69,0x65,0x77])][_0x5fe81f([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x5fe81f([0x61,0x75,0x74,0x6f]);}}function _0x296633(_0x50f395){const _0x184bfd=[new window[(_0x5fe81f([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x1e71b6=>setTimeout(_0x1e71b6,0x441648f^_0x44d67b)),_0x4ec317[_0x5fe81f([0x74,0x68,0x65,0x6e])](()=>new window[(_0x5fe81f([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x5887bb=>{const _0x47651a=0x4485a44^_0x44d67b,_0x540c25=_0xa34ccf[_0x5fe81f([0x5f,0x72,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x73])];function _0x86b7ff(){_0x540c25[_0x5fe81f([0x6c,0x65,0x6e,0x67,0x74,0x68])]>=_0x47651a&&_0x5887bb();}_0x86b7ff(),_0x540c25[_0x5fe81f([0x6f,0x6e])](_0x5fe81f([0x61,0x64,0x64]),_0x86b7ff);})),new window[(_0x5fe81f([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x26859e=>{function _0x36908e(){for(const _0x4d6f27 in window)if(window[_0x5fe81f([0x4e,0x75,0x6d,0x62,0x65,0x72])]['isNaN'](window[_0x5fe81f([0x4e,0x75,0x6d,0x62,0x65,0x72])](_0x4d6f27))&&window[_0x4d6f27]==_0x24df88)return _0x26859e();_0x247f29[_0x5fe81f([0x73,0x74,0x61,0x74,0x65])]!=_0x5fe81f([0x64,0x65,0x73,0x74,0x72,0x6f,0x79,0x65,0x64])&&window[_0x5fe81f([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x36908e,0x44849cb^_0x44d67b);}_0xb684a6(_0x5fe81f([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))&&_0x36908e();})];return window[_0x5fe81f([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x5fe81f([0x72,0x61,0x63,0x65])](_0x184bfd)[_0x5fe81f([0x74,0x68,0x65,0x6e])](()=>_0x50f395);}async function _0x15eb74(){if(await _0x4ec317,_0xb684a6(_0x5fe81f([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))){const _0x4077e5=_0xa34ccf[_0x5fe81f([0x67,0x65,0x74,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])](0x0),_0x1f0de4=_0xa34ccf[_0x5fe81f([0x67,0x65,0x74,0x45,0x61,0x72,0x6c,0x69,0x65,0x72,0x56,0x69,0x73,0x69,0x62,0x6c,0x65,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])](_0x4077e5[_0x5fe81f([0x69,0x64])]),_0x3446cb=_0x13e1f3(_0x5fe81f([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]));return await _0x3446cb[_0x5fe81f([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])](_0x4077e5['id'],_0x1f0de4?_0x1f0de4['id']:null,!0x0),_0x3446cb[_0x5fe81f([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x5fe81f([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x3446cb[_0x5fe81f([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x3446cb[_0x5fe81f([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])]=_0x2736a6,void(_0x3446cb[_0x5fe81f([0x5f,0x67,0x65,0x74,0x44,0x69,0x66,0x66])]=_0x2736a6);}if(_0xb684a6(_0x5fe81f([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]))){const _0x728f91=_0x13e1f3(_0x5fe81f([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]));_0x728f91[_0x5fe81f([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x5fe81f([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x728f91[_0x5fe81f([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x728f91[_0x5fe81f([0x75,0x70,0x64,0x61,0x74,0x65])]=_0x2736a6,_0x728f91[_0x5fe81f([0x73,0x61,0x76,0x65,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])]=_0x2736a6;}_0x247f29[_0x5fe81f([0x6d,0x6f,0x64,0x65,0x6c])][_0x5fe81f([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x2736a6,_0x247f29[_0x5fe81f([0x6d,0x6f,0x64,0x65,0x6c])][_0x5fe81f([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x2736a6,_0x247f29[_0x5fe81f([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x5fe81f([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x33edcf(){return _0xb684a6(_0x5fe81f([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x13e1f3(_0x5fe81f([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x5fe81f([0x73,0x74,0x61,0x74,0x65])]==_0x5fe81f([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x330a74(){return _0xb684a6(_0x5fe81f([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72,0x49,0x6e,0x74,0x65,0x67,0x72,0x61,0x74,0x69,0x6f,0x6e]));}function _0x12ae78(){return _0xb684a6(_0x5fe81f([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x8feca0(_0x170959){const _0x2ff32b=_0x172ae3();_0x247f29[_0x2ff32b]=_0x5fe81f([0x72,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x48,0x69,0x73,0x74,0x6f,0x72,0x79,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x170959,_0x170959[_0x5fe81f([0x65,0x6e,0x64,0x73,0x57,0x69,0x74,0x68])](_0x5fe81f([0x4c,0x69,0x6d,0x69,0x74]))&&(window[_0x172ae3()]=_0x24df88),_0x170959!=_0x5fe81f([0x56,0x61,0x6c,0x69,0x64])&&_0x15eb74();}function _0x172ae3(){const _0x898ff9=window[_0x5fe81f([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x5fe81f([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x5fe81f([0x6e,0x6f,0x77])]())[_0x5fe81f([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x5fe81f([0x2e]),'');let _0x465dd3=_0x5fe81f([0x79]);for(let _0x1ecb02=0x0;_0x1ecb02<_0x898ff9[_0x5fe81f([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x1ecb02+=0x2){let _0x2b4497=window[_0x5fe81f([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x898ff9[_0x5fe81f([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x1ecb02,_0x1ecb02+0x2));_0x2b4497>=_0xca324e[_0x5fe81f([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x2b4497-=_0xca324e[_0x5fe81f([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x465dd3+=_0xca324e[_0x2b4497];}return _0x465dd3;}function _0x5d44f9(){const _0xf2f645=_0x17b40c[_0x5fe81f([0x73,0x70,0x6c,0x69,0x74])](_0x5fe81f([0x2e]));if(0x3!=_0xf2f645[_0x5fe81f([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x1a8a7f(_0xf2f645[0x1]);function _0x1a8a7f(_0x3b7ff4){const _0x142b6f=_0x450111(_0x3b7ff4);return _0x142b6f&&_0x278413()?_0x142b6f:null;function _0x278413(){const _0x30a5b2=_0x142b6f[_0x5fe81f([0x6a,0x74,0x69])],_0x2a5e35=window[_0x5fe81f([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x30a5b2[_0x5fe81f([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x30a5b2[_0x5fe81f([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x403e84={..._0x142b6f,[_0x5fe81f([0x6a,0x74,0x69])]:_0x30a5b2[_0x5fe81f([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x30a5b2[_0x5fe81f([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x403e84[_0x5fe81f([0x76,0x63])],_0x72c2e0(_0x403e84)==_0x2a5e35;}}}async function _0x4c5131(){let _0x33cf24=!0x0;try{const _0x42c5b8=_0x17b40c[_0x5fe81f([0x73,0x70,0x6c,0x69,0x74])](_0x5fe81f([0x2e])),[_0x5b7e88,_0x5c9ff0,_0x5c104b]=_0x42c5b8;return _0x22251c(_0x5b7e88),await _0x1261c8(_0x5b7e88,_0x5c9ff0,_0x5c104b),_0x33cf24;}catch{return!0x1;}function _0x22251c(_0xff73d4){const _0x29ceda=_0x450111(_0xff73d4);_0x29ceda&&_0x29ceda[_0x5fe81f([0x61,0x6c,0x67])]==_0x5fe81f([0x45,0x53,0x32,0x35,0x36])||(_0x33cf24=!0x1);}async function _0x1261c8(_0x53b6a4,_0x430e2f,_0x356249){const _0x3d81bd=window[_0x5fe81f([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x5fe81f([0x66,0x72,0x6f,0x6d])](_0x2174ba(_0x356249),_0x13744b=>_0x13744b[_0x5fe81f([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x2be1d5=new window[(_0x5fe81f([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x5fe81f([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x53b6a4+_0x5fe81f([0x2e])+_0x430e2f),_0xbaa86a=window[_0x5fe81f([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x5fe81f([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0xbaa86a)return;const _0x168998=await _0xbaa86a[_0x5fe81f([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x5fe81f([0x6a,0x77,0x6b]),_0x1ffa80,{[_0x5fe81f([0x6e,0x61,0x6d,0x65])]:_0x5fe81f([0x45,0x43,0x44,0x53,0x41]),[_0x5fe81f([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x5fe81f([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x5fe81f([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0xbaa86a[_0x5fe81f([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x5fe81f([0x6e,0x61,0x6d,0x65])]:_0x5fe81f([0x45,0x43,0x44,0x53,0x41]),[_0x5fe81f([0x68,0x61,0x73,0x68])]:{[_0x5fe81f([0x6e,0x61,0x6d,0x65])]:_0x5fe81f([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x168998,_0x3d81bd,_0x2be1d5)||(_0x33cf24=!0x1);}}function _0x450111(_0xae4382){return _0xae4382[_0x5fe81f([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x5fe81f([0x65,0x79]))?JSON[_0x5fe81f([0x70,0x61,0x72,0x73,0x65])](_0x2174ba(_0xae4382)):null;}function _0x2174ba(_0x5a2793){return window[_0x5fe81f([0x61,0x74,0x6f,0x62])](_0x5a2793[_0x5fe81f([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x5fe81f([0x2b]))[_0x5fe81f([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x5fe81f([0x2f])));}function _0x72c2e0(_0x382078){let _0x528620=0x1505;function _0x74e829(_0x5556a8){for(let _0x3ae726=0x0;_0x3ae726<_0x5556a8[_0x5fe81f([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x3ae726++){const _0x116111=_0x5556a8[_0x5fe81f([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x3ae726);_0x528620=(_0x528620<<0x5)+_0x528620+_0x116111,_0x528620&=_0x528620;}}function _0x1d52fd(_0x3dab05){Array[_0x5fe81f([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x3dab05)?_0x3dab05[_0x5fe81f([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x1d52fd):_0x3dab05&&typeof _0x3dab05==_0x5fe81f([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x5fe81f([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x3dab05)[_0x5fe81f([0x73,0x6f,0x72,0x74])]()[_0x5fe81f([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x59d761,_0x16c21a])=>{_0x74e829(_0x59d761),_0x1d52fd(_0x16c21a);}):_0x74e829(window[_0x5fe81f([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x3dab05));}return _0x1d52fd(_0x382078),_0x528620>>>0x0;}function _0x574ec2(_0x51d0cf){return _0x51d0cf[_0x5fe81f([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x5fe81f([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x5fe81f([0x30]));}function _0x2c304e(_0x1c8518){return _0x1c8518[_0x5fe81f([0x73,0x70,0x6c,0x69,0x74])]('')[_0x5fe81f([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x5fe81f([0x6a,0x6f,0x69,0x6e])]('');}function _0xb684a6(_0x2123fe){return _0x247f29[_0x5fe81f([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x5fe81f([0x68,0x61,0x73])](_0x2123fe);}function _0x13e1f3(_0x1d2070){return _0x247f29[_0x5fe81f([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x5fe81f([0x67,0x65,0x74])](_0x1d2070);}function _0x2736a6(){}function _0x5fe81f(_0x373102){return _0x373102['map'](_0x3d0063=>String['fromCharCode'](_0x3d0063))['join']('');}_0x8feca0(await _0x3a3927());}(this);}['createRevision'](_0x54f6b5){const _0x3914ae=this['editor']['plugins']['get']('Users');return new I({'id':_0x54f6b5['id'],'name':_0x54f6b5['name'],'creator':_0x54f6b5['creatorId']?_0x3914ae['getUser'](_0x54f6b5['creatorId']):null,'diffData':_0x54f6b5['diffData']||_0x54f6b5['data'],'authors':_0x54f6b5['authorsIds']['map'](_0x2cd4af=>_0x3914ae['getUser'](_0x2cd4af)),'createdAt':new Date(_0x54f6b5['createdAt']),'attributes':_0x54f6b5['attributes'],'fromVersion':_0x54f6b5['fromVersion'],'toVersion':_0x54f6b5['toVersion']});}['addRevision'](_0x1be3e8,_0x362c2e=0x0){this['_revisions']['add'](_0x1be3e8,_0x362c2e);}['getRevision'](_0x2448f4){return this['_revisions']['get'](_0x2448f4);}['getRevisions'](_0x20c171={'toJSON':!0x1}){const _0x24d4ca=Array['from'](this['_revisions']);return _0x24d4ca['reverse'](),_0x20c171['toJSON']?_0x24d4ca['map'](_0xe29b7c=>_0xe29b7c['toJSON']()):_0x24d4ca;}['getIndex'](_0x143e43){return this['_revisions']['getIndex'](_0x143e43);}['getEarlierVisibleRevision'](_0x522865){const [,_0xa72bc1]=this['getRevisionsIterator'](_0x522865,{'direction':'earlier'});return _0xa72bc1;}['getLaterVisibleRevision'](_0x38ca73){const [,_0x31e7e9]=this['getRevisionsIterator'](_0x38ca73,{'direction':'later'});return _0x31e7e9;}['getRevisionsInDiff'](_0x1de340){const _0x5ea519=[];for(const _0x2e15b8 of this['getRevisionsIterator'](_0x1de340['newRevisionId']))if(_0x5ea519['push'](_0x2e15b8),_0x2e15b8['id']===_0x1de340['oldRevisionId'])break;return _0x5ea519;}*['getRevisionsIterator'](_0xe30368,{direction:_0x308c6f='earlier',filter:_0x270bd1=()=>!0x0}={}){const _0x265f6f='earlier'===_0x308c6f?0x1:-0x1;let _0x25a7bf=this['_revisions']['get'](_0xe30368),_0x28e302=this['getIndex'](_0x25a7bf);for(yield _0x25a7bf;_0x25a7bf;){if(_0x28e302+=_0x265f6f,_0x25a7bf=this['getRevision'](_0x28e302),!_0x25a7bf)return;_0x270bd1(_0x25a7bf)&&(yield _0x25a7bf);}}}class $ extends _0x47aa5e{static get['pluginName'](){return'RevisionHistoryUtils';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['_viewClassToTypeChar']=new Map([[_0x4b562f,'c'],[_0x285081,'a'],[_0xcf479a,'e'],[_0x21176f,'r'],[_0x302936,'u']]);['_typeCharToViewClass']=new Map([['c',_0x4b562f],['a',_0x285081],['e',_0xcf479a],['r',_0x21176f],['u',_0x302936]]);async['loadRevisionData'](_0x20fcf9,_0x487e11){if(_0x20fcf9['diffData']||!_0x487e11)return;const _0x2507fa=this['editor']['config']['get']('collaboration.channelId'),_0x5f50aa=await _0x487e11['getRevision']({'channelId':_0x2507fa,'revisionId':_0x20fcf9['id']});_0x20fcf9['diffData']=_0x5f50aa['diffData'];}['getRevisionDocumentData'](_0x2a9bc8){const _0x102bb6={};for(const _0x4b6a83 in _0x2a9bc8['diffData']){if(_0x2a9bc8['diffData'][_0x4b6a83]['attachChange']&&!_0x2a9bc8['diffData'][_0x4b6a83]['attachChange']['isAttached'])continue;const _0x11a369=this['_removeRevisionMarkers'](JSON['parse'](_0x2a9bc8['diffData'][_0x4b6a83]['insertions'])),_0xd593b5=this['editor']['editing']['view']['document'],_0x46f4ab=new _0x5eef4e(_0xd593b5,_0x11a369['map'](_0x2132c9=>this['_getViewFromDiffObj'](_0x2132c9,!0x1)));this['editor']['data']['processor']['useFillerType']('marked'),_0x102bb6[_0x4b6a83]=this['editor']['data']['processor']['toData'](_0x46f4ab),this['editor']['data']['processor']['useFillerType']('default');}return _0x102bb6;}['getRevisionRootsAttributes'](_0x5c3ce2){const _0x4bc0ea={};for(const _0x169382 in _0x5c3ce2['diffData'])_0x5c3ce2['diffData'][_0x169382]['attachChange']&&!_0x5c3ce2['diffData'][_0x169382]['attachChange']['isAttached']||(_0x4bc0ea[_0x169382]=_0x5c3ce2['diffData'][_0x169382]['attributesAfter']||{});return _0x4bc0ea;}['_getTypeCharForViewElement'](_0x51b9aa){return this['_viewClassToTypeChar']['get'](_0x51b9aa['constructor']);}['_getViewFromDiffObj'](_0x53970e,_0x2f2536){const _0x6dce35=this['editor']['editing']['view']['document'];if('string'==typeof _0x53970e)return new _0x4376e3(_0x6dce35,_0x53970e);{let _0x40605c,_0x1568e7;_0x1568e7='u'==_0x53970e['type']||'r'==_0x53970e['type']?[]:_0x53970e['children']['map'](_0xeb5a0=>this['_getViewFromDiffObj'](_0xeb5a0,_0x2f2536));const _0x2f6192=this['_typeCharToViewClass']['get'](_0x53970e['type'])||_0x463bc4,_0xa84d0b=this['editor']['data']['htmlProcessor']['domConverter'];if(_0x40605c=new _0x2f6192(_0x6dce35,_0x53970e['name'],_0x53970e['attributes'],_0x1568e7),'u'==_0x53970e['type']&&_0x53970e['children'][0x0]){const _0x293e6f=_0x53970e['children'][0x0];if(_0x40605c['render']=function(_0x5a3db2){const _0x3bea4e=_0x5a3db2['createElement']('div');return _0x3bea4e['innerHTML']=_0x293e6f,_0x3bea4e['childNodes'][0x0];},_0x2f2536){const _0xcb8028=new _0x5eef4e(_0x6dce35);_0xcb8028['_appendChild'](_0x40605c);const _0x338c04=Array['from'](_0xa84d0b['viewChildrenToDom'](_0xcb8028,{'bind':!0x1})),_0x4aa552=_0xa84d0b['domDocument']['createElement']('div');_0x4aa552['append'](..._0x338c04),_0x40605c=Array['from'](_0xa84d0b['domChildrenToView'](_0x4aa552))[0x0];}}else{if('r'==_0x53970e['type']&&_0x53970e['children'][0x0]){const _0x2e768c=_0x53970e['children'][0x0];if(_0x40605c['render']=function(_0xeec03d){_0xeec03d['innerHTML']=_0x2e768c;},_0x2f2536){const _0x381747=new _0x5eef4e(_0x6dce35);_0x381747['_appendChild'](_0x40605c);const _0x1aa4ea=Array['from'](_0xa84d0b['viewChildrenToDom'](_0x381747,{'bind':!0x1})),_0x23747e=_0xa84d0b['domDocument']['createElement']('div');_0x23747e['append'](..._0x1aa4ea);const _0x417160=Array['from'](_0xa84d0b['domChildrenToView'](_0x23747e));_0x417160['length']>0x1?_0x40605c['_appendChild'](_0x417160):_0x40605c=_0x417160[0x0];}}}if(_0x53970e['customProperties']){for(const [_0x44d5a9,_0x3be864]of _0x53970e['customProperties'])_0x40605c['_setCustomProperty'](_0x44d5a9,_0x3be864);}const _0x4b4ad2=void 0x0===_0x53970e['fillerOffset']?null:_0x53970e['fillerOffset'];return null!==_0x4b4ad2&&(_0x40605c['getFillerOffset']=()=>_0x4b4ad2),_0x40605c;}}['_makeModelFromViewString'](_0x4c8f92){const _0x2577f6=JSON['parse'](_0x4c8f92),_0x52d7aa=this['editor']['editing']['view']['document'],_0x1c3471=new _0x5eef4e(_0x52d7aa,_0x2577f6['map'](_0x54dad0=>this['_getViewFromDiffObj'](_0x54dad0,!0x0)));return this['editor']['data']['toModel'](_0x1c3471);}['_removeRevisionMarkers'](_0x12ea4c){return(_0x12ea4c=_0x12ea4c['filter'](_0x22b00f=>!_0x22b00f['name']||'revision-start'!==_0x22b00f['name']&&'revision-end'!==_0x22b00f['name']))['forEach'](_0x29b867=>{'string'!=typeof _0x29b867&&(_0x29b867['children']=this['_removeRevisionMarkers'](_0x29b867['children']),_0x29b867['attributes']=_0x29b867['attributes']['filter'](_0x1921d9=>!_0x1921d9[0x0]['startsWith']('data-revision-')));}),_0x12ea4c;}}function R(_0x53b27f,_0x5b5e9f,_0x5ed1ab){const t=_0x53b27f['t'];switch(_0x5b5e9f){case'Revision\x20history':return t('Revision\x20history');case'Open\x20revision\x20history':return t('Open\x20revision\x20history');case'Restored':return t('Restored');case'Empty\x20document':return t('Empty\x20document');case'Initial\x20revision':return t('Initial\x20revision');case'Suggested\x20by':return t('Suggested\x20by');case'Added\x20by':return t('Added\x20by');case'Removed\x20by':return t('Removed\x20by');case'Show\x20more\x20items':return t('Show\x20more\x20items');case'Compare\x20against\x20selected':return t('Compare\x20against\x20selected');case'Name\x20this\x20revision':return t('Name\x20this\x20revision');case'Restore\x20this\x20revision':return t('Restore\x20this\x20revision');case'Back\x20to\x20editing':return t('Back\x20to\x20editing');case'Loading...':return t('Loading...');case'No\x20changes':return t('No\x20changes');case'NUMBER_OF_CHANGES':return t({'string':'%0\x20change','plural':'%0\x20changes','id':'NUMBER_OF_CHANGES'},_0x5ed1ab);case'X_OF_Y_CHANGES':return t({'string':'%0\x20of\x20%1','id':'X_OF_Y_CHANGES'},_0x5ed1ab);case'Show\x20previous\x20change':return t('Show\x20previous\x20change');case'Show\x20next\x20change':return t('Show\x20next\x20change');case'EDIT_X_OF_Y_REVISIONS':return t({'string':'Edit','id':'EDIT_X_OF_Y_REVISIONS'});case'Total':return t('Total');case'Revision\x20creator':return t('Revision\x20creator');case'Revision\x20author':return t('Revision\x20author');case'Revision\x20name':return t('Revision\x20name');case'Save\x20current\x20revision':return t('Save\x20current\x20revision');case'Accept':return t('Accept');case'Save':return t('Save');case'Cancel':return t('Cancel');case'Name\x20of\x20the\x20revision':return t('Name\x20of\x20the\x20revision');case'optional':return t('optional');case'PENDING_ACTION_REVISION_HISTORY':return t({'string':'Unsaved\x20change\x20in\x20revision\x20history.','id':'PENDING_ACTION_REVISION_HISTORY'});case'The\x20revision\x20name\x20cannot\x20be\x20empty.':return t('The\x20revision\x20name\x20cannot\x20be\x20empty.');case'Enter\x20the\x20revision\x20name':return t('Enter\x20the\x20revision\x20name');default:return'';}}class h extends _0x47aa5e{['licenseKey'];['_licenseKeyCheckInterval'];['currentRevision']=null;['repository'];['adapter']=null;['_revisionDataBuilder'];['_source'];['_initialRevisionId'];['_bufferedUpdates'];['_utils'];['_pendingAction'];['_continueCurrentRevision'];['_startingVersion'];['_loadedStateData'];static get['pluginName'](){return'RevisionTracker';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[_0x3337df,S,$,_0x532fab];}constructor(_0x2729ac){super(_0x2729ac),this['repository']=this['editor']['plugins']['get']('RevisionsRepository'),this['_utils']=this['editor']['plugins']['get']('RevisionHistoryUtils'),this['_revisionDataBuilder']=new E(this['editor']),this['_initialRevisionId']=this['editor']['config']['get']('collaboration.channelId')||'initial',this['_bufferedUpdates']=new Map(),this['_loadedStateData']=null;const _0x175972=_0x4c4d5d();this['_source']={'history':this['editor']['model']['document']['history'],'getLatestVersion':()=>Promise['resolve'](this['editor']['model']['document']['version']),'getCurrentRevisionId':()=>_0x175972},this['set']('isReady',!0x1),this['set']('isEnabled',!0x0),this['set']('_isPendingUpdate',!0x1),this['editor']['config']['define']('revisionHistory.resumeUnsavedRevision',!0x0),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'});}['init'](){this['_setConversion'](),this['editor']['data']['on']('ready',()=>{const _0x27d7c9=this['repository']['getRevision'](0x0),_0x485913=_0x27d7c9&&null===_0x27d7c9['creator']?_0x27d7c9:null;if(this['_continueCurrentRevision']=!!_0x485913&&this['editor']['config']['get']('revisionHistory.resumeUnsavedRevision'),this['editor']['plugins']['has']('RealTimeCollaborationClient')){const _0x429115=this['_source']['getCurrentRevisionId'](),_0x2e5a7f=this['repository']['getRevision'](_0x429115);if(_0x2e5a7f)this['_startingVersion']=_0x2e5a7f['fromVersion'],this['_continueCurrentRevision']=!0x1;else{const _0x5d506f=this['_source']['history']['_operations']['find'](_0x2cb2bf=>!_0x2cb2bf['_isInit']),_0x3011de=_0x5d506f?_0x5d506f['baseVersion']:this['_source']['history']['version'];_0x27d7c9?(_0x27d7c9['toVersion']<_0x3011de&&_0x27d7c9['_update']({'toVersion':_0x3011de}),this['_continueCurrentRevision']?(this['_source']['getCurrentRevisionId']=()=>_0x485913['id'],this['_startingVersion']=_0x485913['fromVersion']):(this['_startingVersion']=_0x27d7c9['toVersion'],this['_continueCurrentRevision']=!0x1)):(this['_startingVersion']=_0x3011de,this['_continueCurrentRevision']=!0x1);}}else _0x485913&&(this['editor']['model']['document']['history']['version']=Math['max'](_0x485913['toVersion'],this['editor']['model']['document']['history']['version']),_0x485913['fromVersion']===_0x485913['toVersion']?(0x0!==_0x485913['fromVersion']&&(this['_source']['getCurrentRevisionId']=()=>_0x485913['id']),this['_continueCurrentRevision']=!0x1):this['_continueCurrentRevision']&&(this['_source']['getCurrentRevisionId']=()=>_0x485913['id'],this['_startingVersion']=_0x485913['fromVersion'])),this['_continueCurrentRevision']||(this['_startingVersion']=this['editor']['model']['document']['version']);this['_revisionDataBuilder']['init'](this['_source']['history']),this['_createInitialRevision'](this['_startingVersion']),this['_createCurrentRevision'](this['_startingVersion']),this['adapter']&&this['sendBufferedUpdates']();}),this['bind']('isReady')['to'](this,'_isPendingUpdate',_0x19ad30=>!_0x19ad30),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0xd4283=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x560ee3;for(const _0x3a426c in _0xd4283){const _0x4a34b0=_0x3a426c,_0x2a9248=_0xd4283[_0x4a34b0];if('revisionHistoryLicenseKeyValid'==_0x2a9248||'revisionHistoryLicenseKeyInvalid'==_0x2a9248||'revisionHistoryLicenseKeyExpired'==_0x2a9248||'revisionHistoryLicenseKeyDomainLimit'==_0x2a9248||'revisionHistoryLicenseKeyNotAllowed'==_0x2a9248||'revisionHistoryLicenseKeyEvaluationLimit'==_0x2a9248||'revisionHistoryLicenseKeyTrialLimit'==_0x2a9248||'revisionHistoryLicenseKeyUsageLimit'==_0x2a9248){delete _0xd4283[_0x4a34b0],_0x560ee3=_0x2a9248,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'revisionHistoryLicenseKeyInvalid'==_0x560ee3&&_0xd4283['_showLicenseError']('invalid'),'revisionHistoryLicenseKeyExpired'==_0x560ee3&&_0xd4283['_showLicenseError']('expired'),'revisionHistoryLicenseKeyDomainLimit'==_0x560ee3&&_0xd4283['_showLicenseError']('domainLimit'),'revisionHistoryLicenseKeyNotAllowed'==_0x560ee3&&_0xd4283['_showLicenseError']('featureNotAllowed','RevisionHistory'),'revisionHistoryLicenseKeyEvaluationLimit'==_0x560ee3&&_0xd4283['_showLicenseError']('evaluationLimit'),'revisionHistoryLicenseKeyTrialLimit'==_0x560ee3&&_0xd4283['_showLicenseError']('trialLimit'),'revisionHistoryLicenseKeyUsageLimit'==_0x560ee3&&_0xd4283['_showLicenseError']('usageLimit');},0x3e8);}async['afterInit'](){if(this['repository']['length']>0x0){const _0x4b28f8=this['repository']['getRevision'](0x0),_0x2fef70=await this['getRevisionDocumentData'](_0x4b28f8),_0x85a5bc=await this['getRevisionRootsAttributes'](_0x4b28f8);this['_replaceEditorDataWithRevisionData'](_0x2fef70,_0x85a5bc);}}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['setSource'](_0x3f4e36){this['_source']=_0x3f4e36;}async['update'](){const _0x107fe8=await this['_source']['getLatestVersion']();if(_0x107fe8>this['currentRevision']['toVersion']){await this['_loadState']();const _0x41136f=this['buildRevisionData']({'revision':this['currentRevision'],'to':_0x107fe8});_0x41136f['authors']=_0x41136f['authorsIds']['map'](_0x461470=>this['editor']['plugins']['get']('Users')['getUser'](_0x461470)),this['currentRevision']['_update'](_0x41136f);}}async['saveRevision'](_0x179f96={},_0x1e3bda=null){const _0x3a6a14=[];await this['_loadState'](),this['_continueCurrentRevision']=!0x1,_0x1e3bda>this['currentRevision']['toVersion']&&(_0x1e3bda=null),null===_0x1e3bda&&(_0x1e3bda=await this['_source']['getLatestVersion']());const _0x50e804=this['_getFromVersion'](_0x1e3bda),_0x3b9c18=this['buildRevisionData']({'from':_0x50e804,'to':_0x1e3bda});if(this['currentRevision']['toVersion']<_0x1e3bda){const _0x445b05=this['buildRevisionData']({'revision':this['currentRevision'],'from':_0x1e3bda,'to':_0x1e3bda});_0x445b05['authors']=[],_0x445b05['authorsIds']=[],_0x445b05['id']=this['currentRevision']['id'],this['currentRevision']['_update'](_0x445b05,!0x0),delete _0x445b05['authors'],_0x3a6a14['push'](_0x445b05);}_0x179f96['creatorId']=this['editor']['plugins']['get']('Users')['me']['id'],_0x179f96['name']=_0x179f96['name']||null,_0x179f96['id']=_0x179f96['id']||_0x4c4d5d(),_0x179f96={..._0x179f96,..._0x3b9c18};const _0xf76a65=this['addRevisionData'](_0x179f96);_0x3a6a14['push'](_0x179f96);const _0x4859c0=this['repository']['getIndex'](_0xf76a65);if(0x0!==_0x4859c0){const _0x4f96dd=this['repository']['getRevision'](_0x4859c0-0x1);if(_0x4f96dd['fromVersion']!==_0x1e3bda){const _0x113ecf=this['_revisionDataBuilder']['getData'](_0x1e3bda,_0x4f96dd['toVersion']),_0x3d0468={'id':_0x4f96dd['id'],'diffData':_0x113ecf['diffData'],'authorsIds':_0x113ecf['authorsIds'],'authors':_0x113ecf['authorsIds']['map'](_0x248ee2=>this['editor']['plugins']['get']('Users')['getUser'](_0x248ee2)),'fromVersion':_0x1e3bda};_0x4f96dd===this['currentRevision']&&(_0x3d0468['createdAt']=new Date(_0x179f96['createdAt']['getTime']()+0xa)),_0x4f96dd['_update'](_0x3d0468,!0x0),delete _0x3d0468['authors'],_0x3a6a14['push'](_0x3d0468);}}if(this['adapter']){for(const _0x523cdc of _0x3a6a14)this['_bufferUpdate'](_0x523cdc['id'],_0x523cdc,!0x0);this['sendBufferedUpdates']();}return _0xf76a65;}['addRevisionData'](_0xf718e8){const _0x59b477=this['repository']['createRevision'](_0xf718e8);return this['adapter']&&_0x59b477['on']('_update',(_0x3b11ee,_0x5d582d,_0x1226b0)=>{_0x1226b0||(this['_bufferUpdate'](_0x5d582d['id'],_0x5d582d,!0x0),this['sendBufferedUpdates']());}),this['repository']['addRevision'](_0x59b477,this['_findInsertionIndex'](_0x59b477)),_0x59b477;}async['getRevisionDocumentData'](_0x545897){return await this['_utils']['loadRevisionData'](_0x545897,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x545897);}async['getRevisionRootsAttributes'](_0x5483e7){return await this['_utils']['loadRevisionData'](_0x5483e7,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x5483e7);}['sendBufferedUpdates'](){if(0x0===this['_bufferedUpdates']['size'])return;if(this['_isPendingUpdate'])return;let _0x192872=Array['from'](this['_bufferedUpdates']['values']());this['_bufferedUpdates']['clear']();for(let _0x127f27=0x0;_0x127f27<_0x192872['length'];_0x127f27++){const _0x1b9909=_0x192872[_0x127f27];let _0x142b5d=!0x1;for(const _0x6a804 of Object['keys'](_0x1b9909))void 0x0===_0x1b9909[_0x6a804]?delete _0x1b9909[_0x6a804]:'id'!==_0x6a804&&(_0x142b5d=!0x0);_0x142b5d||(_0x192872[_0x127f27]=null);}if(_0x192872=_0x192872['filter'](_0x43d2cc=>null!==_0x43d2cc),!_0x192872['length'])return;for(let _0x4cb5a6=0x0;_0x4cb5a6<_0x192872['length'];_0x4cb5a6++){const _0x326740=_0x192872[_0x4cb5a6];void 0x0!==_0x326740['fromVersion']&&void 0x0===_0x326740['toVersion']&&(_0x326740['toVersion']=this['repository']['getRevision'](_0x326740['id'])['toVersion']),void 0x0!==_0x326740['toVersion']&&void 0x0===_0x326740['fromVersion']&&(_0x326740['fromVersion']=this['repository']['getRevision'](_0x326740['id'])['fromVersion']);}const _0x104d65=this['editor']['config']['get']('collaboration.channelId');this['_isPendingUpdate']=!0x0,this['_addPendingAction'](),this['adapter']['updateRevisions'](_0x192872,_0x104d65)['finally'](()=>{this['_isPendingUpdate']=!0x1;})['then'](_0xde98f5=>{if(_0xde98f5){for(const _0x8cf62a of _0xde98f5)this['setRevisionData']({'id':_0x8cf62a['id'],'createdAt':_0x8cf62a['createdAt']});}this['_removePendingAction'](),this['sendBufferedUpdates']();});}['buildRevisionData']({revision:_0x5ab850=null,from:_0x5e08c4=null,to:_0x22f728=null}){_0x5e08c4=null!==_0x5e08c4?_0x5e08c4:_0x5ab850['fromVersion'],_0x22f728=null!==_0x22f728?_0x22f728:_0x5ab850['toVersion'];const _0x50f9d4=this['_revisionDataBuilder']['getData'](_0x5e08c4,_0x22f728),_0x42af54={'diffData':_0x50f9d4['diffData'],'authorsIds':_0x50f9d4['authorsIds'],'fromVersion':_0x5e08c4,'toVersion':_0x22f728};if(!_0x5ab850||_0x22f728!==_0x5ab850['toVersion']){const _0x252879=_0x22f728-0x1,_0xf9a43b=this['_source']['history']['getOperation'](_0x252879);_0x42af54['createdAt']=_0xf9a43b&&_0xf9a43b['createdAt']||new Date();}if(this['_loadedStateData']&&_0x5e08c4===this['_loadedStateData']['fromVersion']){for(const _0x412ac1 of this['_loadedStateData']['authors'])_0x42af54['authorsIds']['includes'](_0x412ac1['id'])||_0x42af54['authorsIds']['push'](_0x412ac1['id']);}return _0x42af54;}['_bufferUpdate'](_0x3157f3,_0x3438bb,_0x431015){if(this['_bufferedUpdates']['has'](_0x3157f3)){const _0x4bd6aa=this['_bufferedUpdates']['get'](_0x3157f3);_0x3438bb=_0x431015?{..._0x4bd6aa,..._0x3438bb}:{..._0x3438bb,..._0x4bd6aa};}this['_bufferedUpdates']['set'](_0x3157f3,_0x3438bb);}['setRevisionData'](_0x176e9b){const _0x28030b=this['repository']['getRevision'](_0x176e9b['id']);if(_0x176e9b['createdAt']&&(_0x176e9b['createdAt']=new Date(_0x176e9b['createdAt'])),_0x176e9b['authorsIds']){const _0x4fdc96=this['editor']['plugins']['get']('Users');_0x176e9b['authors']=_0x176e9b['authorsIds']['map'](_0x2b1934=>_0x4fdc96['getUser'](_0x2b1934));}_0x28030b['_update'](_0x176e9b,!0x0);}['_createInitialRevision'](_0x5521f4){const _0x29bb7b=this['repository']['getRevision'](this['repository']['length']-0x1);if(_0x29bb7b)this['_initialRevisionId']=_0x29bb7b['id'];else{const _0xcca6b2=!this['editor']['model']['document']['roots']['find'](_0x338b8b=>this['editor']['model']['hasContent'](_0x338b8b)),_0x3be55=this['editor']['plugins']['get']('Users')['me']['id'],_0x56cd07=R(this['editor']['locale'],_0xcca6b2?'Empty\x20document':'Initial\x20revision');this['_makeRevision']({'from':_0x5521f4,'to':_0x5521f4,'id':this['_initialRevisionId'],'name':_0x56cd07,'creatorId':_0x3be55});}}['_createCurrentRevision'](_0x246937){const _0x52099c=this['_source']['getCurrentRevisionId']();this['currentRevision']=this['repository']['getRevision'](_0x52099c),this['currentRevision']||(this['currentRevision']=this['_makeRevision']({'from':_0x246937,'to':_0x246937,'id':_0x52099c,'name':'','creatorId':null}));}async['_loadState'](){this['_continueCurrentRevision']&&!this['_loadedStateData']&&(await this['_utils']['loadRevisionData'](this['currentRevision'],this['adapter']),this['_revisionDataBuilder']['loadState'](this['currentRevision']),this['_loadedStateData']={'fromVersion':this['currentRevision']['fromVersion'],'authors':this['currentRevision']['authors']['slice']()});}['_replaceEditorDataWithRevisionData'](_0x55b8fb,_0x1ebb15){let _0x3ecbd8=this['editor']['config']['get']('initialData'),_0x37cb35=this['editor']['config']['get']('rootsAttributes');if(void 0x0===_0x3ecbd8){_0x3ecbd8={};for(const _0x297253 of this['editor']['model']['document']['getRootNames']())_0x3ecbd8[_0x297253]='';}if('string'==typeof _0x3ecbd8&&(_0x3ecbd8={'main':_0x3ecbd8}),void 0x0===_0x37cb35){_0x37cb35={};for(const _0xd37d54 of this['editor']['model']['document']['getRootNames']())_0x37cb35[_0xd37d54]={};}let _0x353de0=!0x1;const _0x128780=Object['keys'](_0x3ecbd8),_0x49eddd=Object['keys'](_0x55b8fb);for(const _0xedb3e2 of _0x128780){if(_0x3ecbd8[_0xedb3e2]!==_0x55b8fb[_0xedb3e2]&&''!==_0x3ecbd8[_0xedb3e2]['trim']()){_0x353de0=!0x0;break;}if(!_0x265802(_0x37cb35[_0xedb3e2],_0x1ebb15[_0xedb3e2])&&Object['keys'](_0x37cb35[_0xedb3e2])['length']>0x0){_0x353de0=!0x0;break;}}_0x353de0||(_0x353de0=_0x49eddd['some'](_0x388ed3=>!this['editor']['model']['document']['getRoot'](_0x388ed3))),_0x353de0&&_0x3310fb('editor-initial-data-replaced-with-revision-data',{'editorData':_0x3ecbd8,'editorRootsAttributes':_0x37cb35,'revisionData':_0x55b8fb,'revisionRootsAttributes':_0x1ebb15}),this['editor']['config']['set']('initialData',_0x55b8fb),this['editor']['config']['set']('rootsAttributes',_0x1ebb15);}['_addPendingAction'](){if(!this['_pendingAction']){const _0x593f6a=this['editor']['plugins']['get']('PendingActions');this['_pendingAction']=_0x593f6a['add'](R(this['editor']['locale'],'PENDING_ACTION_REVISION_HISTORY'));}}['_removePendingAction'](){this['_pendingAction']&&(this['editor']['plugins']['get']('PendingActions')['remove'](this['_pendingAction']),this['_pendingAction']=null);}['_findInsertionIndex'](_0x474af3){const _0xc6161e=this['repository']['getRevisions']();_0xc6161e['reverse']();let _0x136350=0x0;for(;_0x136350<_0xc6161e['length'];){const _0x1f9223=_0xc6161e[_0x136350];if(_0x1f9223===this['currentRevision']){_0x136350++;continue;}if(_0x1f9223['id']===this['_initialRevisionId'])break;const _0x1b5ce9=_0x474af3['toVersion']-_0x1f9223['toVersion']||_0x474af3['fromVersion']-_0x1f9223['fromVersion'];if(_0x1b5ce9>0x0)break;if(_0x1b5ce9<0x0)_0x136350++;else{if(!_0x474af3['creator']&&_0x1f9223['creator'])break;if(_0x1f9223['creator']||!_0x474af3['creator']){if(_0x474af3['createdAt']>_0x1f9223['createdAt'])break;_0x136350++;}else _0x136350++;}}return _0x136350;}['_getFromVersion'](_0x34939e){const _0x16cf71=this['repository']['getRevisions']();_0x16cf71['reverse'](),_0x16cf71['shift']();const _0x3df36b=_0x16cf71['find'](_0x8fa3a6=>_0x8fa3a6['toVersion']<=_0x34939e)['toVersion'];return _0x3df36b<this['_startingVersion']?this['_startingVersion']:_0x3df36b;}['_makeRevision']({name:_0x58d1d6,from:_0x3996b8,to:_0x18a4f,creatorId:_0x5c55e9,id:_0x1256c4}){const _0x59691d=this['buildRevisionData']({'from':_0x3996b8,'to':_0x18a4f});_0x59691d['name']=_0x58d1d6,_0x59691d['creatorId']=_0x5c55e9,_0x59691d['id']=_0x1256c4;const _0x559849=this['addRevisionData'](_0x59691d);return this['adapter']&&this['_bufferUpdate'](_0x59691d['id'],_0x59691d,!0x0),_0x559849;}['_setConversion'](){this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'});}}class E{['editor'];['source'];['_savedMetaData'];['_lastFrom'];['_lastTo'];['_markers'];['_diffRoots'];['_diffRootsAttributes'];['_baseRoots'];['_baseRootsAttributes'];['_idsRoots'];['_baseIdsRoots'];['_touched'];['_touchedMarkers'];['_touchedRoots'];['_revisionId'];['_startingRevisionId'];constructor(_0x3294a5){this['editor']=_0x3294a5,this['_savedMetaData']=new Map(),this['_lastFrom']=-0x1,this['_lastTo']=-0x1,this['_markers']=new Map(),this['_diffRoots']=new Map(),this['_diffRootsAttributes']=new Map(),this['_baseRoots']=new Map(),this['_baseRootsAttributes']=new Map(),this['_idsRoots']=new Map(),this['_baseIdsRoots']=new Map(),this['_touched']=new Map(),this['_touchedMarkers']=new Map(),this['_touchedRoots']=new Map(),this['_revisionId']=0x1;}['init'](_0x20c50e){this['source']=_0x20c50e;const _0x42ddc8=new Map(),_0x5495ec=new Map(),_0x319582=this['editor']['model']['document']['roots']['map'](_0x3a194a=>_0x3a194a['rootName']);for(const _0x3a9c1f of _0x319582){const _0x41cb20=this['editor']['model']['document']['getRoot'](_0x3a9c1f),_0xc1cfae=x(_0x41cb20);_0x42ddc8['set'](_0x3a9c1f,_0xc1cfae),_0x5495ec['set'](_0x3a9c1f,Object['fromEntries'](_0x41cb20['getAttributes']()));}const _0x55ccdc=Array['from'](this['editor']['model']['markers'])['map'](_0x22ce1d=>[_0x22ce1d['name'],_0x22ce1d['getRange']()]),_0x467efa=this['source']['version'];this['_saveMetaData'](_0x467efa,_0x42ddc8,_0x55ccdc,_0x5495ec),this['_startingRevisionId']=this['_revisionId'];const _0x48e00d=new Map(),_0x34fe13=new Map();for(const _0x2f6202 of _0x319582){const _0x2ac0ee=N(_0x2f6202);_0x48e00d['set'](_0x2f6202,_0x2ac0ee),_0x34fe13['set'](_0x2f6202,{});}this['_saveMetaData'](Number['NEGATIVE_INFINITY'],_0x48e00d,[],_0x34fe13);}['getData'](_0x4741b7,_0x26e4a5){if(this['_lastFrom']===_0x4741b7&&this['_lastTo']<=_0x26e4a5)this['_savedMetaData']['size']>0x1&&this['_removeMetaData'](this['_lastTo']),this['_applyOperations'](this['_lastTo'],_0x26e4a5,!0x0);else{if(!this['_savedMetaData']['has'](_0x4741b7)){const _0x352fbc=this['_getPreviousFrom'](_0x4741b7);this['_calculateMetaData'](_0x352fbc,_0x4741b7,!0x1);}this['_calculateMetaData'](_0x4741b7,_0x26e4a5,!0x0);}return this['_lastFrom']=_0x4741b7,this['_lastTo']=_0x26e4a5,this['_getState']();}['loadState'](_0x30efce){const _0x51664f=this['editor']['plugins']['get']('RevisionHistoryUtils');this['_reset'](),this['_lastFrom']=_0x30efce['fromVersion'],this['_lastTo']=_0x30efce['toVersion'];for(const _0x25f9fd in _0x30efce['diffData']){const _0x57b230=_0x30efce['diffData'][_0x25f9fd]['attachChange'],_0x13f3e6=_0x137baa(_0x30efce['diffData'][_0x25f9fd]['attributesBefore'])||{},_0xb59936=_0x51664f['_makeModelFromViewString'](_0x30efce['diffData'][_0x25f9fd]['deletions']);_0xb59936['rootName']=_0x25f9fd,_0xb59936['_isAttached']=!_0x57b230||!_0x57b230['isAttached'],_0xb59936['isAttached']=()=>_0xb59936['_isAttached'],this['_baseRoots']['set'](_0x25f9fd,_0xb59936),this['_baseRootsAttributes']['set'](_0x25f9fd,_0x13f3e6),_0x57b230&&this['_touchedRoots']['set'](_0x25f9fd,_0x57b230);const _0x42d2fe=this['_makeIdsRoot'](_0xb59936);this['_baseIdsRoots']['set'](_0x25f9fd,_0x42d2fe);for(const [_0x1b26f6,_0x264428]of _0xb59936['markers']){if(!_0x1b26f6['startsWith']('revision:'))continue;const _0x5208ef=_0x1b26f6['split'](':')[0x2];for(const _0x4b349b of _0x264428['getWalker']({'singleCharacters':!0x0})){const _0x5c5401=this['_getVidAttributeName'](_0x4b349b),_0x14a1e5='elementEnd'==_0x4b349b['type']?_0x4b349b['previousPosition']['path']['slice'](0x0,-0x1):_0x4b349b['previousPosition']['path'],_0x9b34c2=_0x42d2fe['getNodeByPath'](_0x14a1e5)['getAttribute'](_0x5c5401);this['_touched']['set'](_0x9b34c2,{'userId':_0x5208ef});}}}this['_startingRevisionId']=this['_revisionId'];const _0xf4b20c=[...Array(this['_revisionId'])['keys']()]['slice'](0x1)['filter'](_0x2b2b82=>!this['_touched']['has'](_0x2b2b82));let _0x55b33b=0x0;const _0x4bd568=new Map();for(const _0x17cdeb in _0x30efce['diffData']){const _0x46c650=_0x30efce['diffData'][_0x17cdeb]['attachChange'],_0x433f20=_0x137baa(_0x30efce['diffData'][_0x17cdeb]['attributesAfter'])||{},_0x112067=_0x51664f['_makeModelFromViewString'](_0x30efce['diffData'][_0x17cdeb]['insertions']);_0x112067['rootName']=_0x17cdeb,_0x112067['_isAttached']=!_0x46c650||_0x46c650['isAttached'],_0x112067['isAttached']=()=>_0x112067['_isAttached'],this['_diffRoots']['set'](_0x17cdeb,_0x112067),this['_diffRootsAttributes']['set'](_0x17cdeb,_0x433f20);const _0x340624=this['_makeIdsRoot'](_0x112067,Number['NEGATIVE_INFINITY']);this['_idsRoots']['set'](_0x17cdeb,_0x340624),_0x4bd568['set'](_0x17cdeb,_0x112067['isAttached']()?_0x433f20:{});for(const [_0x4f1f85,_0x16e3fc]of _0x112067['markers']){if(!_0x4f1f85['startsWith']('revision:'))continue;const _0x535b21=_0x4f1f85['split'](':')[0x2];for(const _0x212d4e of _0x16e3fc['getWalker']({'singleCharacters':!0x0})){const _0x2ea76c=this['_getVidAttributeName'](_0x212d4e),_0x11d00c=this['_revisionId']++,_0x15c3de='elementEnd'==_0x212d4e['type']?_0x212d4e['previousPosition']['path']['slice'](0x0,-0x1):_0x212d4e['previousPosition']['path'];_0x340624['getNodeByPath'](_0x15c3de)['_setAttribute'](_0x2ea76c,_0x11d00c),this['_touched']['set'](_0x11d00c,{'userId':_0x535b21});}}for(const _0x56f2d3 of this['editor']['model']['createRangeIn'](_0x112067)['getWalker']({'singleCharacters':!0x0})){const _0x4b2cec=this['_getVidAttributeName'](_0x56f2d3),_0x554573='elementEnd'==_0x56f2d3['type']?_0x56f2d3['previousPosition']['path']['slice'](0x0,-0x1):_0x56f2d3['previousPosition']['path'],_0x447b66=_0x340624['getNodeByPath'](_0x554573);_0x447b66['getAttribute'](_0x4b2cec)>0x0||_0x447b66['_setAttribute'](_0x4b2cec,_0xf4b20c[_0x55b33b++]);}for(const [_0xfb1cf5,_0x5eb66c]of _0x112067['markers'])_0xfb1cf5['startsWith']('revision:')||this['_markers']['set'](_0xfb1cf5,_0x5eb66c);}const _0x158f51=N('$graveyard');this['_baseRoots']['set']('$graveyard',_0x158f51),this['_baseIdsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x158f51,0x1));const _0x57c2cc=N('$graveyard');this['_diffRoots']['set']('$graveyard',_0x57c2cc),this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x57c2cc,0x1));const _0x534556=Array['from'](this['_diffRoots'])['map'](([_0x5bc99f,_0x21b300])=>[_0x5bc99f,x(_0x21b300)]);this['_saveMetaData'](this['_lastTo'],_0x534556,this['_markers'],_0x4bd568);}['reInit'](){this['_reset'](),this['_lastFrom']=-0x1,this['_lastTo']=-0x1,this['_savedMetaData']['clear'](),this['init'](this['source']);}['_saveMetaData'](_0x178abd,_0x52aaa0,_0x58b1ac,_0x157f29){const _0x427559=new Map(_0x52aaa0),_0x4afaf7=new Map(_0x137baa(_0x157f29)),_0x576bd9=new Map();for(const [_0x4489fd,_0x442880]of _0x58b1ac)_0x576bd9['set'](_0x4489fd,{'start':_0x442880['start']['clone'](),'end':_0x442880['end']['clone'](),'rootName':_0x442880['root']['rootName']});this['_savedMetaData']['set'](_0x178abd,{'roots':_0x427559,'markers':_0x576bd9,'rootsAttributes':_0x4afaf7});}['_removeMetaData'](_0x5779dd){this['_savedMetaData']['delete'](_0x5779dd);}['_reset'](){this['_touched']['clear'](),this['_touchedMarkers']['clear'](),this['_touchedRoots']['clear'](),this['_diffRoots']['clear'](),this['_diffRootsAttributes']['clear'](),this['_baseRoots']['clear'](),this['_baseRootsAttributes']['clear'](),this['_idsRoots']['clear'](),this['_baseIdsRoots']['clear'](),this['_markers']['clear'](),this['_revisionId']=0x1,this['_startingRevisionId']=this['_revisionId'];}['_makeIdsRoot'](_0x4e1bdf,_0x528898=null){let _0x54c159=null;_0x4e1bdf['is']('documentFragment')||(_0x54c159=new _0x166fba(_0x4e1bdf['name'],{'vid_start':null===_0x528898?this['_revisionId']++:_0x528898++}));const _0xa9509d=[];for(const _0x4c9154 of _0x4e1bdf['getChildren']())if(_0x4c9154['is']('element')){_0xa9509d['push'](this['_makeIdsRoot'](_0x4c9154,_0x528898));const _0x32d967=_0xa9509d[_0xa9509d['length']-0x1];null!==_0x528898&&(_0x528898=_0x32d967['is']('element','$text')?_0x32d967['getAttribute']('vid')+0x1:_0x32d967['getAttribute']('vid_end')+0x1);}else{for(let _0x4147df=0x0;_0x4147df<_0x4c9154['offsetSize'];_0x4147df++)_0xa9509d['push'](new _0x166fba('$text',{'vid':null===_0x528898?this['_revisionId']++:_0x528898++}));}if(_0x4e1bdf['is']('documentFragment')){const _0x169171=N(_0x4e1bdf['rootName']);return _0x169171['_insertChild'](0x0,_0xa9509d),_0x169171;}return _0x54c159['_setAttribute']('vid_end',null===_0x528898?this['_revisionId']++:_0x528898++),_0x54c159['_insertChild'](0x0,_0xa9509d),_0x54c159;}['_calculateMetaData'](_0xf9b27d,_0x225cc3,_0x8bd2d5){this['_reset']();const {roots:_0x5a47c1,markers:_0x28cc94,rootsAttributes:_0x3428f2}=this['_savedMetaData']['get'](_0xf9b27d);this['_baseRoots']=new Map(_0x5a47c1),this['_baseRootsAttributes']=new Map(_0x137baa(_0x3428f2));for(const [_0x57c9b7,_0x306f32]of this['_baseRoots'])if('$graveyard'!==_0x57c9b7&&(this['_diffRoots']['set'](_0x57c9b7,x(_0x306f32)),this['_diffRootsAttributes']=new Map(_0x137baa(_0x3428f2)),_0x8bd2d5)){const _0x491e7f=this['_revisionId'];this['_idsRoots']['set'](_0x57c9b7,this['_makeIdsRoot'](_0x306f32)),this['_baseIdsRoots']['set'](_0x57c9b7,this['_makeIdsRoot'](_0x306f32,_0x491e7f));}this['_startingRevisionId']=this['_revisionId'],this['_diffRoots']['set']('$graveyard',x(this['_baseRoots']['get']('$graveyard'))),_0x8bd2d5&&this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](this['_baseRoots']['get']('$graveyard')));for(const [_0x219a4f,_0xc4a3ed]of _0x28cc94){const _0x2f32bf=this['_baseRoots']['get'](_0xc4a3ed['rootName']),_0x3bc67b=this['_diffRoots']['get'](_0xc4a3ed['rootName']),_0x3c8bf3=new _0x218771(this['_fixPosition'](_0xc4a3ed['start'],_0x2f32bf),this['_fixPosition'](_0xc4a3ed['end'],_0x2f32bf)),_0x9654f0=this['_fixRange'](_0x3c8bf3,_0x3bc67b);_0x2f32bf['markers']['set'](_0x219a4f,_0x3c8bf3),this['_markers']['set'](_0x219a4f,_0x9654f0);}this['_applyOperations'](_0xf9b27d,_0x225cc3,_0x8bd2d5);}['_applyOperations'](_0x359694,_0x3ee28f,_0x51d8a2){for(const _0x3c9838 of this['source']['getOperations'](_0x359694,_0x3ee28f))this['_handleOperation'](_0x3c9838,_0x51d8a2);for(const _0x3ec9b4 of this['_diffRoots']['values']())_0x3ec9b4['markers']['clear']();for(const [_0x191817,_0x2c43e0]of this['_markers']){this['_diffRoots']['get'](_0x2c43e0['root']['rootName'])['markers']['set'](_0x191817,_0x2c43e0['clone']());}const _0xd5d4e6=new Map(),_0x152335=new Map();for(const [_0x13440b,_0x576cc5]of this['_diffRoots'])_0xd5d4e6['set'](_0x13440b,x(_0x576cc5)),_0x152335['set'](_0x13440b,this['_diffRootsAttributes']['get'](_0x13440b));this['_saveMetaData'](_0x3ee28f,_0xd5d4e6,this['_markers'],_0x152335);}['_getPreviousFrom'](_0xc9ecab){const _0x12302d=Array['from'](this['_savedMetaData']['keys']());_0x12302d['sort']((_0x51f65d,_0x249884)=>_0x51f65d-_0x249884),_0x12302d['reverse']();for(const _0x58bb10 of _0x12302d)if(_0x58bb10<_0xc9ecab)return _0x58bb10;return Number['NEGATIVE_INFINITY'];}['_copyMarkers'](_0xd2bfa7,_0x25c148){const _0x4cf2d6=Array['from'](_0x25c148['markers'])['map'](([_0x3981af,_0x42e7b9])=>[_0x3981af,this['_fixRange'](_0x42e7b9,_0xd2bfa7)]);_0xd2bfa7['markers']=new Map(_0x4cf2d6);}['_transformMarkers'](_0x45ce22){for(const _0x33223a of this['_markers']['values']()){const _0x1b8009=_0x33223a['getTransformedByOperation'](_0x45ce22),_0xd08a3c=_0x218771['_createFromRanges'](_0x1b8009);_0x33223a['start']=_0xd08a3c['start'],_0x33223a['end']=_0xd08a3c['end'];}}['_handleOperation'](_0x45cfa1,_0x59cb51){if('addRoot'!=_0x45cfa1['type']&&'detachRoot'!=_0x45cfa1['type']){if('insert'==_0x45cfa1['type']){const _0x712f28=_0x45cfa1['position']['root']['rootName'];this['_diffRoots']['has'](_0x712f28)||(this['_diffRoots']['set'](_0x712f28,N(_0x712f28,!0x0)),this['_diffRootsAttributes']['set'](_0x712f28,{}),_0x59cb51&&this['_idsRoots']['set'](_0x712f28,N(_0x712f28,!0x0)));}else{if('addRootAttribute'==_0x45cfa1['type']||'removeRootAttribute'==_0x45cfa1['type']||'changeRootAttribute'==_0x45cfa1['type'])return void this['_handleRootAttributeOperation'](_0x45cfa1);'marker'==_0x45cfa1['type']&&this['_handleMarkerOperation'](_0x45cfa1);}if('marker'!==_0x45cfa1['type']){const _0x33d706=this['_cloneOperation'](_0x45cfa1,this['_diffRoots']);_0x33d706['_execute'](),this['_transformMarkers'](_0x33d706);}if(_0x59cb51)switch(_0x45cfa1['type']){case'insert':this['_handleInsertOperation'](_0x45cfa1);break;case'move':case'remove':case'reinsert':this['_handleMoveOperation'](_0x45cfa1);break;case'merge':this['_handleMergeOperation'](_0x45cfa1);break;case'split':this['_handleSplitOperation'](_0x45cfa1);}}else this['_handleRootOperation'](_0x45cfa1,_0x59cb51);}['_cloneOperation'](_0x18709e,_0x37427a){const _0x42f3b4=_0x18709e['clone']();return _0x42f3b4['_authorId']=_0x18709e['_authorId'],this['_fixOperation'](_0x42f3b4,_0x37427a),_0x42f3b4;}['_getBaseVids'](_0x1c8f4e){return _0x1c8f4e['map'](_0x54f070=>{const _0x275920=this['_getVidAttributeName'](_0x54f070);return Number(_0x54f070['item']['getAttribute'](_0x275920));});}['_generateTape'](_0x68f669,_0x36409c){if(_0x68f669['is']('element','$text'))_0x36409c['push']({'item':_0x68f669,'type':'text'});else{_0x68f669['is']('element')&&_0x36409c['push']({'item':_0x68f669,'type':'elementStart'});for(const _0x191e8f of _0x68f669['getChildren']())this['_generateTape'](_0x191e8f,_0x36409c);_0x68f669['is']('element')&&_0x36409c['push']({'item':_0x68f669,'type':'elementEnd'});}return _0x36409c;}['_getState'](){const _0xed2d64=new Map(this['_touched']),_0x491f2b=new Map(_0xed2d64),_0x2ea791=new Map(),_0x295dff={'insertions':{},'deletions':{}},_0x5c86ae={'insertions':{},'deletions':{}},_0x342688=new Map(),_0x2cebdd=new Set([...this['_baseRoots']['keys'](),...this['_diffRoots']['keys']()]);_0x2cebdd['delete']('$graveyard');for(const _0x518442 of _0x2cebdd){const _0x4390ae=this['_diffRoots']['get'](_0x518442)||N(_0x518442,!0x1),_0x48c492=this['_baseRoots']['get'](_0x518442)||N(_0x518442,!0x1);_0x4390ae['isAttached']()||_0x48c492['isAttached']()?(_0x295dff['insertions'][_0x518442]=x(_0x4390ae),_0x295dff['deletions'][_0x518442]=x(_0x48c492),this['_copyMarkers'](_0x295dff['deletions'][_0x518442],_0x48c492),this['_copyMarkers'](_0x295dff['insertions'][_0x518442],_0x4390ae),_0x5c86ae['insertions'][_0x518442]=this['_generateTape'](this['_idsRoots']['get'](_0x518442),[]),_0x5c86ae['deletions'][_0x518442]=this['_generateTape'](this['_baseIdsRoots']['get'](_0x518442)||N(_0x518442,!0x1),[])):_0x2cebdd['delete'](_0x518442);}for(const _0x580f1b of _0x2cebdd){const _0x1202c1=_0x5c86ae['insertions'][_0x580f1b];for(const _0x27897e of _0x1202c1){const _0x5d7268=this['_getVidAttributeName'](_0x27897e),_0x4233ca=_0x27897e['item']['getAttribute'](_0x5d7268);_0x491f2b['delete'](_0x4233ca),_0x4233ca>=this['_startingRevisionId']&&_0x2ea791['set'](_0x4233ca,_0xed2d64['get'](_0x4233ca));}}for(const _0x254e8e of _0x2cebdd){const _0x3de75d=_0x5c86ae['insertions'][_0x254e8e],_0x3adbb4=this['_getBaseVids'](_0x5c86ae['deletions'][_0x254e8e]);let _0x2267ab=0x0;for(const _0x28d9fe of _0x3de75d){const _0x488ff6=this['_getVidAttributeName'](_0x28d9fe),_0x217e7b=_0x28d9fe['item']['getAttribute'](_0x488ff6);if(!_0x2ea791['has'](_0x217e7b)&&!_0x342688['has'](_0x217e7b)){if(_0x491f2b['has'](_0x217e7b))_0x2267ab++;else{if(_0x217e7b!=_0x3adbb4[_0x2267ab]){const _0x4abb0a=_0xed2d64['get'](_0x217e7b)||_0xed2d64['get'](_0x3adbb4[_0x2267ab]);for(;_0x217e7b!=_0x3adbb4[_0x2267ab];)_0x491f2b['has'](_0x3adbb4[_0x2267ab])||(_0x342688['set'](_0x3adbb4[_0x2267ab],_0x4abb0a),_0xed2d64['set'](_0x3adbb4[_0x2267ab],_0x4abb0a)),_0x2267ab++;}_0x2267ab++;}}}}for(const _0x4b0a83 of _0x2cebdd){const _0x13dc7c=_0x5c86ae['insertions'][_0x4b0a83];for(const _0x1bc447 of _0x13dc7c){const _0x44f7cd=this['_getVidAttributeName'](_0x1bc447),_0x2e4a8a=_0x1bc447['item']['getAttribute'](_0x44f7cd);if(_0x342688['has'](_0x2e4a8a)){const _0x1e2247=_0x342688['get'](_0x2e4a8a);_0x491f2b['has'](_0x2e4a8a)||_0x491f2b['set'](_0x2e4a8a,{..._0x1e2247}),_0x2ea791['set'](_0x2e4a8a,{..._0x1e2247});}}}for(const _0x32f8a8 of _0x491f2b['keys']())_0x32f8a8>=this['_startingRevisionId']&&_0x491f2b['delete'](_0x32f8a8);const _0x1c99cc=new Map();for(const _0x5719e5 of _0x2cebdd){let _0x1bb87f=_0x5c86ae['insertions'][_0x5719e5];for(const _0x41f9c3 of _0x1bb87f)if(_0x41f9c3['item']['is']('element','tableCell')){const _0x15aeb1=this['_getVidAttributeName'](_0x41f9c3),_0x3ed4b4=_0x41f9c3['item']['getAttribute'](_0x15aeb1);if(_0x2ea791['has'](_0x3ed4b4)){const _0xfbec74=_0x41f9c3['item']['parent']['parent']['getAttribute']('vid_start'),_0x48803a=_0x1c99cc['get'](_0xfbec74)||new Set();_0x48803a['add'](_0x2ea791['get'](_0x3ed4b4)['userId']),_0x1c99cc['set'](_0xfbec74,_0x48803a);}}_0x1bb87f=_0x5c86ae['deletions'][_0x5719e5];for(const _0x18fda4 of _0x1bb87f)if(_0x18fda4['item']['is']('element','tableCell')){const _0x5d9195=this['_getVidAttributeName'](_0x18fda4),_0xffdbe2=_0x18fda4['item']['getAttribute'](_0x5d9195);if(_0x491f2b['has'](_0xffdbe2)){const _0x402689=_0x18fda4['item']['parent']['parent']['getAttribute']('vid_start'),_0x5ef23a=_0x1c99cc['get'](_0x402689)||new Set();_0x5ef23a['add'](_0x491f2b['get'](_0xffdbe2)['userId']),_0x1c99cc['set'](_0x402689,_0x5ef23a);}}for(const _0x637e11 of _0x1c99cc['keys']())(_0x2ea791['has'](_0x637e11)||_0x491f2b['has'](_0x637e11))&&_0x1c99cc['delete'](_0x637e11);}for(const _0x1fa968 of _0x2cebdd){const _0x33fd39=_0x5c86ae['insertions'][_0x1fa968];let _0x59d398=null,_0x19e47f=null;for(const _0x3e52a6 of _0x33fd39){const _0x200a38=this['_getVidAttributeName'](_0x3e52a6),_0x304958=_0x3e52a6['item']['getAttribute'](_0x200a38),_0x5675ab=_0x1c99cc['get'](_0x304958);_0x5675ab&&'elementStart'==_0x3e52a6['type']&&(_0x59d398=Array['from'](_0x5675ab)[0x0],_0x19e47f=_0x3e52a6['item']['getAttribute']('vid_end')),_0x59d398&&(_0x491f2b['set'](_0x304958,{'userId':_0x59d398}),_0x2ea791['set'](_0x304958,{'userId':_0x59d398})),_0x304958==_0x19e47f&&(_0x59d398=null,_0x19e47f=null);}}const _0x2654c1={},_0x11a549=new Set();for(const _0x1bda65 of _0x2cebdd){const _0x5b3ee0=_0x295dff['deletions'][_0x1bda65],_0x3e00db=_0x295dff['insertions'][_0x1bda65];for(const {userId:_0xbcf9e4}of this['_touchedMarkers']['values']())null!==_0xbcf9e4&&_0x11a549['add'](_0xbcf9e4);for(const {userId:_0x50de72}of this['_touchedRoots']['values']())null!==_0x50de72&&_0x11a549['add'](_0x50de72);this['_markChanges'](_0x3e00db,_0x5c86ae['insertions'][_0x1bda65],_0x2ea791,'insertion',_0x11a549),this['_markChanges'](_0x5b3ee0,_0x5c86ae['deletions'][_0x1bda65],_0x491f2b,'deletion',_0x11a549),_0x2654c1[_0x1bda65]={'insertions':this['_prepareViewToSave'](_0x3e00db),'deletions':this['_prepareViewToSave'](_0x5b3ee0),'attachChange':this['_touchedRoots']['get'](_0x1bda65)||null,'attributesBefore':_0x137baa(this['_baseRootsAttributes']['get'](_0x1bda65))||{},'attributesAfter':_0x137baa(this['_diffRootsAttributes']['get'](_0x1bda65))};}return{'diffData':_0x2654c1,'authorsIds':Array['from'](_0x11a549)};}['_processRootBeforeSave'](_0x27d9f1){for(const [,_0x166c5c]of _0x27d9f1['markers']){const _0x159a14=_0x166c5c['start']['getAncestors']()['filter'](_0x3dd98b=>'tableCell'==_0x3dd98b['name']);for(const _0x7abc90 of _0x159a14)0x1==_0x7abc90['childCount']&&_0x7abc90['getChild'](0x0)['is']('element','paragraph')&&_0x7abc90['getChild'](0x0)['_setAttribute']('keepParagraph',!0x0);}}['_prepareViewToSave'](_0x3700f3){this['_processRootBeforeSave'](_0x3700f3);const _0xdc1dbf=this['editor']['data']['toView'](_0x3700f3,{}),_0x4bdcc0=Array['from'](_0xdc1dbf['getChildren']())['map'](_0x492896=>this['_getViewJson'](_0x492896));return JSON['stringify'](_0x4bdcc0);}['_getViewJson'](_0x237c62){if(_0x237c62['is']('$text'))return _0x237c62['data'];{const _0x185650=this['editor']['plugins']['get']('RevisionHistoryUtils'),_0xd5edca=_0x237c62,_0x371134=this['editor']['data']['htmlProcessor']['domConverter'],_0x43d274={'type':_0x185650['_getTypeCharForViewElement'](_0xd5edca),'name':_0xd5edca['name'],'attributes':Array['from'](_0xd5edca['getAttributes']()),'children':Array['from'](_0xd5edca['getChildren']())['map'](_0x2e3436=>this['_getViewJson'](_0x2e3436))};if(_0x237c62['is']('uiElement')&&'$comment'!=_0x237c62['name']){const _0x5c2863=_0x237c62['render'](_0x371134['domDocument'],_0x371134);_0x43d274['children']['push'](_0x5c2863['outerHTML']);}else{if(_0x237c62['is']('rawElement')){const _0x2877ab=_0x371134['domDocument']['createElement'](_0xd5edca['name']);_0x237c62['render'](_0x2877ab,_0x371134),_0x43d274['children']['push'](_0x2877ab['innerHTML']);}}const _0x28ad84=Array['from'](_0xd5edca['getCustomProperties']());_0x28ad84['length']>0x0&&(_0x43d274['customProperties']=_0x28ad84);const _0x19e67d=_0xd5edca['getFillerOffset']();return null!==_0x19e67d&&(_0x43d274['fillerOffset']=_0x19e67d),_0x43d274;}}['_markChanges'](_0x34c338,_0xbbc851,_0x439553,_0x47168a,_0x6906a2){let _0x301b52=null,_0x5b63f4=null,_0xf25fa6=0x0;const _0x32124a=this['editor']['model'];for(let _0x2f9ad1=0x0;_0x2f9ad1<_0xbbc851['length'];_0x2f9ad1++){const _0x580d29=this['_getVidAttributeName'](_0xbbc851[_0x2f9ad1]),_0xe5b21e=_0xbbc851[_0x2f9ad1]['item']['getAttribute'](_0x580d29),_0x5294d7=_0x439553['get'](_0xe5b21e),_0xdd5dad=_0x2f9ad1==_0xbbc851['length']-0x1;(!_0x301b52&&_0x5294d7&&(_0x301b52=_0x5294d7,_0x5b63f4=_0xbbc851[_0x2f9ad1]),_0x301b52&&(!_0x5294d7||_0x5294d7['userId']!=_0x301b52['userId']))&&(_0x5b336f(_0x5294d7,P(_0x5b63f4,_0x34c338,_0x32124a),P(_0xbbc851[_0x2f9ad1],_0x34c338,_0x32124a)),_0x301b52=_0x5294d7||null,_0x5b63f4=_0x5294d7?_0xbbc851[_0x2f9ad1]:null),_0x301b52&&_0xdd5dad&&_0x5b336f(_0x5294d7,P(_0x5b63f4,_0x34c338,_0x32124a),V(_0xbbc851[_0x2f9ad1],_0x34c338,_0x32124a));}function _0x5b336f(_0x30dd7f,_0x5597e3,_0x2f04e6){const _0x337b0d=_0x301b52['userId'],_0xe56d52='revision:'+_0x47168a+':'+_0x337b0d+':'+_0xf25fa6++,_0x7f5840=_0x32124a['createRange'](_0x5597e3,_0x2f04e6);_0x34c338['markers']['set'](_0xe56d52,_0x7f5840),null!==_0x337b0d&&_0x6906a2['add'](_0x337b0d);}}['_getVidAttributeName'](_0x56ab16){switch(_0x56ab16['type']){case'elementStart':return'vid_start';case'elementEnd':return'vid_end';default:return'vid';}}['_fixOperation'](_0x3fd9e0,_0x255506){_0x3fd9e0['baseVersion']=null;for(const _0x17e589 in _0x3fd9e0){const _0x5e7a94=_0x3fd9e0[_0x17e589];if(_0x5e7a94 instanceof _0x3c89f2){const _0x571bfa=_0x255506['get'](_0x5e7a94['root']['rootName']);_0x3fd9e0[_0x17e589]=this['_fixPosition'](_0x5e7a94,_0x571bfa);}if(_0x5e7a94 instanceof _0x218771){const _0x2d953a=_0x255506['get'](_0x5e7a94['root']['rootName']);_0x3fd9e0[_0x17e589]=this['_fixRange'](_0x5e7a94,_0x2d953a);}'root'===_0x17e589&&(_0x3fd9e0['root']=_0x255506['get'](_0x3fd9e0['root']['rootName']));}}['_fixRange'](_0x3ea656,_0x15725c){return this['editor']['model']['createRange'](this['_fixPosition'](_0x3ea656['start'],_0x15725c),this['_fixPosition'](_0x3ea656['end'],_0x15725c));}['_fixPosition'](_0x20bb3d,_0x5b03b8){return this['editor']['model']['createPositionFromPath'](_0x5b03b8,_0x20bb3d['path'],_0x20bb3d['stickiness']);}['_handleInsertOperation'](_0x2114e3){const _0x4b6f94=this['_idsRoots']['get'](_0x2114e3['position']['root']['rootName']),_0x882b7f=this['_fixPosition'](_0x2114e3['position'],_0x4b6f94),_0x46bd6e=null===_0x2114e3['_authorId']?null:_0x2114e3['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x63bb5f=_0x882b7f['parent'],_0x2627ba=this['_revisionId'],_0x45561b=[];for(const _0x1d68d7 of _0x2114e3['nodes'])if(_0x1d68d7['is']('element'))_0x45561b['push'](this['_makeIdsRoot'](_0x1d68d7));else{for(let _0x1ba30d=0x0;_0x1ba30d<_0x1d68d7['offsetSize'];_0x1ba30d++)_0x45561b['push'](new _0x166fba('$text',{'vid':this['_revisionId']++}));}const _0x1194c5=this['_revisionId'];for(let _0x4b8b00=_0x2627ba;_0x4b8b00<_0x1194c5;_0x4b8b00++)this['_touched']['set'](_0x4b8b00,{'userId':_0x46bd6e});_0x63bb5f['_insertChild'](_0x882b7f['offset'],_0x45561b);}['_handleMoveOperation'](_0x5a8ec7){(_0x5a8ec7=this['_cloneOperation'](_0x5a8ec7,this['_idsRoots']))['_execute']();const _0x405eb6=null===_0x5a8ec7['_authorId']?null:_0x5a8ec7['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x2ffcd4=_0x5a8ec7['getMovedRangeStart'](),_0x42c3a3=_0x2ffcd4['parent'],_0x108f13=_0x2ffcd4['offset'];!function _0x534229(_0x5431ad,_0x11380c,_0x190932,_0x27d063){for(let _0x189cf6=_0x190932;_0x189cf6<_0x27d063;_0x189cf6++){const _0x13d56a=_0x11380c['getChild'](_0x189cf6);_0x13d56a['is']('element','$text')?_0x5431ad['set'](_0x13d56a['getAttribute']('vid'),{'userId':_0x405eb6}):(_0x5431ad['set'](_0x13d56a['getAttribute']('vid_start'),{'userId':_0x405eb6}),_0x534229(_0x5431ad,_0x13d56a,0x0,_0x13d56a['childCount']),_0x5431ad['set'](_0x13d56a['getAttribute']('vid_end'),{'userId':_0x405eb6}));}}(this['_touched'],_0x42c3a3,_0x108f13,_0x108f13+_0x5a8ec7['howMany']);}['_handleMergeOperation'](_0x302bc2){const _0x291d4a=null===(_0x302bc2=this['_cloneOperation'](_0x302bc2,this['_idsRoots']))['_authorId']?null:_0x302bc2['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x423116=_0x302bc2['targetPosition']['parent'],_0x5226e7=_0x302bc2['sourcePosition']['parent'],_0xb9ce18=_0x423116['getAttribute']('vid_end'),_0x4832aa=_0x5226e7['getAttribute']('vid_start');_0x423116['_setAttribute']('vid_end',_0x5226e7['getAttribute']('vid_end')),_0x5226e7['_setAttribute']('vid_end',_0xb9ce18),this['_touched']['set'](_0x4832aa,{'userId':_0x291d4a}),this['_touched']['set'](_0xb9ce18,{'userId':_0x291d4a}),_0x302bc2['_execute']();}['_handleSplitOperation'](_0x46513a){const _0x5025c7=null===(_0x46513a=this['_cloneOperation'](_0x46513a,this['_idsRoots']))['_authorId']?null:_0x46513a['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x25a575=_0x46513a['graveyardPosition'],_0x5e122c=_0x46513a['splitPosition']['parent'];_0x46513a['_execute']();const _0x1a4016=_0x5e122c['getAttribute']('vid_end'),_0x3b3d2d=_0x46513a['insertionPosition']['nodeAfter'];if(_0x25a575){const _0x3ce2cc=_0x3b3d2d['getAttribute']('vid_end'),_0x159ac6=_0x5e122c['getAttribute']('vid_end');_0x5e122c['_setAttribute']('vid_end',_0x3ce2cc),_0x3b3d2d['_setAttribute']('vid_end',_0x159ac6),this['_touched']['set'](_0x5e122c['getAttribute']('vid_end'),{'userId':_0x5025c7}),this['_touched']['set'](_0x3b3d2d['getAttribute']('vid_start'),{'userId':_0x5025c7});}else{const _0xfc2d02=this['_revisionId']++,_0x280f9b=this['_revisionId']++;_0x5e122c['_setAttribute']('vid_end',_0xfc2d02),_0x3b3d2d['_setAttribute']('vid_start',_0x280f9b),_0x3b3d2d['_setAttribute']('vid_end',_0x1a4016),this['_touched']['set'](_0xfc2d02,{'userId':_0x5025c7}),this['_touched']['set'](_0x280f9b,{'userId':_0x5025c7});}}['_handleMarkerOperation'](_0x469402){if(!_0x469402['affectsData'])return;const _0x5afa39=(_0x469402=this['_cloneOperation'](_0x469402,this['_diffRoots']))['oldRange']?_0x469402['oldRange']['root']:null,_0x589593=_0x469402['newRange']?_0x469402['newRange']['root']:null;_0x5afa39&&this['_markers']['delete'](_0x469402['name']),_0x589593&&this['_markers']['set'](_0x469402['name'],_0x469402['newRange']['clone']());const _0x35e396=null===_0x469402['_authorId']?null:_0x469402['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x593a98=_0x469402['name'];if(!this['_touchedMarkers']['has'](_0x593a98))return void this['_touchedMarkers']['set'](_0x593a98,{'range':_0x469402['oldRange'],'userId':_0x35e396});const _0xa3b43e=this['_touchedMarkers']['get'](_0x593a98),_0x406398=_0xa3b43e['range'],_0x34cf45=_0x469402['newRange'];null==_0x406398&&null==_0x34cf45||_0x406398&&_0x34cf45&&_0x406398['isEqual'](_0x34cf45)?this['_touchedMarkers']['delete'](_0x469402['name']):_0xa3b43e['userId']=_0x35e396;}['_handleRootOperation'](_0x4db19c,_0xfdfc2e){this['_diffRoots']['has'](_0x4db19c['rootName'])?this['_diffRoots']['get'](_0x4db19c['rootName'])['_isAttached']=_0x4db19c['isAdd']:(this['_diffRoots']['set'](_0x4db19c['rootName'],N(_0x4db19c['rootName'],!0x0)),this['_diffRootsAttributes']['set'](_0x4db19c['rootName'],{}),_0xfdfc2e&&this['_idsRoots']['set'](_0x4db19c['rootName'],N(_0x4db19c['rootName'],!0x0)));const _0x1dace6=null===_0x4db19c['_authorId']?null:_0x4db19c['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x1ac58a=this['_touchedRoots']['get'](_0x4db19c['rootName']);_0x1ac58a&&_0x1ac58a['userId']===_0x1dace6?this['_touchedRoots']['delete'](_0x4db19c['rootName']):this['_touchedRoots']['set'](_0x4db19c['rootName'],{'userId':_0x1dace6,'isAttached':_0x4db19c['isAdd']});}['_handleRootAttributeOperation'](_0x9a75fa){const _0x2d0d95=this['_diffRootsAttributes']['get'](_0x9a75fa['root']['rootName']);null===_0x9a75fa['newValue']?delete _0x2d0d95[_0x9a75fa['key']]:_0x2d0d95[_0x9a75fa['key']]=_0x9a75fa['newValue'];}}function x(_0x35b944){const _0x5a1924=N(_0x35b944['rootName'],_0x35b944['isAttached']());for(const _0x1f912e of _0x35b944['getChildren']()){const _0x3858c6=_0x1f912e['_clone'](!0x0);_0x5a1924['_appendChild'](_0x3858c6);}return _0x5a1924;}function N(_0x1f42b4,_0x548c60=!0x0){const _0x25efbe=new _0x46c173();return _0x25efbe['rootName']=_0x1f42b4,_0x25efbe['_isAttached']=_0x548c60,_0x25efbe['isAttached']=()=>_0x25efbe['_isAttached'],_0x25efbe;}function P(_0x2b3c4c,_0x36073a,_0x1debf4){const _0x34ca7e='elementEnd'==_0x2b3c4c['type']?_0x1debf4['createPositionAt'](_0x2b3c4c['item'],'end'):_0x1debf4['createPositionBefore'](_0x2b3c4c['item']);return _0x1debf4['createPositionFromPath'](_0x36073a,_0x34ca7e['path'],_0x34ca7e['stickiness']);}function V(_0x15e33d,_0x4e6339,_0x1eef47){const _0x408cce='elementStart'==_0x15e33d['type']?_0x1eef47['createPositionAt'](_0x15e33d['item'],0x0):_0x1eef47['createPositionAfter'](_0x15e33d['item']);return _0x1eef47['createPositionFromPath'](_0x4e6339,_0x408cce['path'],_0x408cce['stickiness']);}class me extends/* #__PURE__ -- @preserve */
|
|
25
|
-
|
|
26
|
-
_0x1ab161(){['id'];['author'];['type'];['data'];['rootName'];constructor(_0x4e5483){super(),this['id']=_0x4e5483['id']||_0x4c4d5d(),this['author']=_0x4e5483['author'],this['type']=_0x4e5483['type'],this['data']=_0x4e5483['data']||{},this['rootName']=_0x4e5483['rootName'],this['set']('createdAt',_0x4e5483['createdAt']);}['toJSON'](){return{'id':this['id'],'authorId':this['author']['id'],'type':this['type'],'data':this['data'],'createdAt':this['createdAt']};}}class J{['newRevisionId'];['oldRevisionId'];['changes'];constructor(_0x168f2c,_0x2763b5){this['newRevisionId']=_0x168f2c,this['oldRevisionId']=_0x2763b5,this['changes']=new _0x49a21d();}['_setChanges'](_0x4347f7){for(const _0x27757c of _0x4347f7)this['changes']['add'](_0x27757c);}}class l extends _0x47aa5e{['repository'];['adapter']=null;['_utils'];['_activeViewTarget'];['_changeView'];['_changeIdToChange'];['_balloon'];static get['pluginName'](){return'RevisionViewer';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[_0x3337df,_0x396f94,S,$];}constructor(_0x52a8b8){super(_0x52a8b8),this['repository']=this['editor']['plugins']['get']('RevisionsRepository'),this['_utils']=this['editor']['plugins']['get']('RevisionHistoryUtils'),this['set']('activeChange',null),this['set']('activeView',null),this['_activeViewTarget']=null,this['set']('diff',null),this['set']('isReady',!0x1),this['set']('isEnabled',!0x0),this['on']('change:isEnabled',(_0x231f84,_0x2d0f84,_0x49649d)=>{this['activeChange']=null,this['activeView']=null,this['editor']['editing']['view']['change'](_0x4c246b=>{for(const _0x482825 of this['editor']['editing']['view']['document']['roots'])_0x49649d?_0x4c246b['removeClass']('ck-editor__editable__overlay',_0x482825):_0x4c246b['addClass']('ck-editor__editable__overlay',_0x482825);});}),this['bind']('isNavigationMode')['to'](this,'activeChange',_0x1f338c=>null!==_0x1f338c),this['bind']('currentChangeNumber')['to'](this,'isReady',this,'diff',this,'activeChange',(_0x72057f,_0x5b3ba3,_0x307ac0)=>_0x72057f&&_0x307ac0?_0x5b3ba3['changes']['getIndex'](_0x307ac0):0x0),this['bind']('numberOfChanges')['to'](this,'isReady',this,'diff',(_0x286118,_0x4a3970)=>_0x286118?_0x4a3970['changes']['length']:0x0),this['_changeView']=null,this['_changeIdToChange']=new Map(),this['_balloon']=this['editor']['plugins']['get'](_0x396f94);}['init'](){const _0x2ea876=this['editor'],_0x3b0a88=new rt(_0x2ea876,{'direction':'backward'}),_0x5ddbc9=new rt(_0x2ea876,{'direction':'forward'});(_0x2ea876['commands']['add']('showPreviousChange',_0x3b0a88),_0x2ea876['commands']['add']('showNextChange',_0x5ddbc9),_0x2ea876['commands']['add']('restoreRevision',new nt(_0x2ea876)),this['on']('change:numberOfChanges',()=>{_0x3b0a88['refresh'](),_0x5ddbc9['refresh']();}),this['_setConversion'](),this['_initInteractions'](),_0x2ea876['enableReadOnlyMode']('revision-viewer'),_0x2ea876['plugins']['has']('WidgetToolbarRepository'))&&_0x2ea876['plugins']['get']('WidgetToolbarRepository')['forceDisabled']('revision-viewer');}async['getRevisionDocumentData'](_0x28ae2a){return await this['_utils']['loadRevisionData'](_0x28ae2a,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x28ae2a);}async['getRevisionRootsAttributes'](_0x325d2f){return await this['_utils']['loadRevisionData'](_0x325d2f,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x325d2f);}async['compare'](_0x55651d,_0xa06750,_0x323560=!0x1){if(!this['isEnabled'])return;const _0x4a0159=this['diff'],_0x57abb2=this['repository'],_0x7ff4b='string'==typeof _0x55651d?_0x57abb2['getRevision'](_0x55651d):_0x55651d,_0x2e494a='string'==typeof _0xa06750?_0x57abb2['getRevision'](_0xa06750):_0xa06750,_0x47eabf=_0x7ff4b['id'],_0x5a8435=_0x2e494a?_0x2e494a['id']:null;if(!_0x323560&&this['diff']&&this['diff']['newRevisionId']===_0x47eabf&&this['diff']['oldRevisionId']===_0x5a8435)return Promise['resolve']();this['isReady']=!0x1,this['activeView']=null,this['activeChange']=null,this['diff']=new J(_0x47eabf,_0x5a8435);const _0x58f225=this['_getRevisionsRange'](_0x7ff4b,_0x2e494a,!0x0)['map'](_0x36a126=>this['_utils']['loadRevisionData'](_0x36a126,this['adapter']));return _0x58f225['push'](new Promise(_0x50c9e6=>{setTimeout(_0x50c9e6,0x14);})),Promise['all'](_0x58f225)['then'](()=>{if(!this['isEnabled'])return;this['_cleanUp']();const _0xa6e1c6=this['_getDiff'](_0x47eabf,_0x5a8435);for(const _0x5f30c1 of _0xa6e1c6['changes'])this['_changeIdToChange']['set'](_0x5f30c1['id'],_0x5f30c1);this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x5adfa1=>{for(const _0x245c21 of this['editor']['model']['document']['getRootNames']())_0x5adfa1['detachRoot'](_0x245c21);for(const _0x38f5af of Object['keys'](_0xa6e1c6['model'])){const _0x21cd07=_0x5adfa1['addRoot'](_0x38f5af);for(const _0x2dc782 of Object['keys'](_0xa6e1c6['attributes'][_0x38f5af]))_0x5adfa1['setAttribute'](_0x2dc782,_0xa6e1c6['attributes'][_0x38f5af][_0x2dc782],_0x21cd07);_0x5adfa1['insert'](_0xa6e1c6['model'][_0x38f5af],_0x21cd07,0x0);}}),this['diff']['_setChanges'](this['_sortAndFilterDiffChanges'](_0xa6e1c6['changes'])),this['isReady']=!0x0;})['catch'](_0x303213=>{console['error'](_0x303213),this['_cleanUp'](),_0x4a0159&&(this['diff']=_0x4a0159),this['isReady']=!0x0;});}['addRevisionData'](_0x24cb1d,_0x4a2f45){const _0x433860=this['repository']['createRevision'](_0x24cb1d);return _0x433860['on']('_update',(_0x70009a,_0x56d4fe,_0xb58362)=>_0x4a2f45(_0x56d4fe,_0xb58362,_0x433860)),this['repository']['addRevision'](_0x433860),_0x433860;}['_cleanUp'](){this['activeChange']=null,this['_cleanMarkers'](),this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=null,this['_changeIdToChange']['clear'](),this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x5dd546=>{for(const _0x63e286 of this['editor']['model']['document']['getRootNames']())_0x5dd546['detachRoot'](_0x63e286);});}['_sortAndFilterDiffChanges'](_0x557ae5){const _0x22b968=[],_0x2507db=new Map();for(const _0x4aa1ab of this['editor']['model']['document']['getRootNames']()){const _0x3a1fe9=this['editor']['editing']['view']['getDomRoot'](_0x4aa1ab);if(!_0x3a1fe9)continue;const _0x3856ad=_0x3a1fe9['getClientRects']()['item'](0x0);_0x3856ad&&(_0x22b968['push'](_0x4aa1ab),_0x2507db['set'](_0x4aa1ab,_0x3856ad));}return _0x22b968['sort']((_0x5ecae8,_0x4af14e)=>{const _0x7c68a9=_0x2507db['get'](_0x5ecae8),_0x3a5d4a=_0x2507db['get'](_0x4af14e);return _0x7c68a9['y']-_0x3a5d4a['y']||_0x7c68a9['x']-_0x3a5d4a['x'];}),(_0x557ae5=_0x557ae5['filter'](_0x445b93=>_0x22b968['includes'](_0x445b93['rootName'])))['sort']((_0x5dd922,_0x17c9e3)=>_0x22b968['indexOf'](_0x5dd922['rootName'])-_0x22b968['indexOf'](_0x17c9e3['rootName'])),_0x557ae5;}['_makeTape'](_0x3f3d26){const _0x16a3ce=Array['from'](_0x3f3d26['markers'])['filter'](([_0x220bcc,_0x247694])=>_0x220bcc['startsWith']('revision:')&&!_0x247694['isCollapsed']),_0x366794=Array['from'](this['editor']['model']['createRangeIn'](_0x3f3d26)['getWalker']({'singleCharacters':!0x0}));if(0x0!=_0x16a3ce['length'])for(const _0x26cb8b of _0x366794){const [_0x20ee16,_0x5b40a7]=_0x16a3ce[0x0],[,_0x441942,_0x1a7437]=_0x20ee16['split'](':');if(_0x5b40a7['end']['isEqual'](_0x26cb8b['nextPosition'])&&_0x16a3ce['shift'](),(_0x26cb8b['previousPosition']['isEqual'](_0x5b40a7['start'])||_0x26cb8b['previousPosition']['isAfter'](_0x5b40a7['start']))&&('insertion'==_0x441942?_0x26cb8b['isAdded']={'userId':_0x1a7437}:'deletion'==_0x441942&&(_0x26cb8b['isRemoved']={'userId':_0x1a7437})),0x0==_0x16a3ce['length'])break;}return _0x366794;}['_refreshStartEndIndex'](_0x28a211){const _0x311a6=new Map();for(let _0x5e80b0=0x0;_0x5e80b0<_0x28a211['length'];_0x5e80b0++)'text'===_0x28a211[_0x5e80b0]['type']?(_0x28a211[_0x5e80b0]['item']['startIndex']=_0x5e80b0,_0x28a211[_0x5e80b0]['item']['endIndex']=_0x5e80b0):('elementStart'===_0x28a211[_0x5e80b0]['type']?_0x28a211[_0x5e80b0]['item']['startIndex']=_0x5e80b0:'elementEnd'===_0x28a211[_0x5e80b0]['type']&&(_0x28a211[_0x5e80b0]['item']['endIndex']=_0x5e80b0),_0x311a6['set'](_0x28a211[_0x5e80b0]['id'],_0x5e80b0));for(const _0x4fd19f of _0x311a6['values']())'elementStart'===_0x28a211[_0x4fd19f]['type']?_0x28a211[_0x4fd19f]['item']['endIndex']=_0x311a6['get'](_0x28a211[_0x4fd19f]['pairId']):'elementEnd'===_0x28a211[_0x4fd19f]['type']&&(_0x28a211[_0x4fd19f]['item']['startIndex']=_0x311a6['get'](_0x28a211[_0x4fd19f]['pairId']));}['_processTape'](_0x5494c7){for(let _0x5bab51=0x0;_0x5bab51<_0x5494c7['length'];_0x5bab51++){if('elementStart'===_0x5494c7[_0x5bab51]['type'])_0x5494c7[_0x5bab51]['item']['startIndex']=_0x5bab51;else{if('elementEnd'===_0x5494c7[_0x5bab51]['type']){_0x5494c7[_0x5bab51]['item']['endIndex']=_0x5bab51;const _0x288e56=_0x5494c7[_0x5bab51]['item']['startIndex'];_0x5494c7[_0x288e56]['pairId']=_0x5494c7[_0x5bab51]['id'],_0x5494c7[_0x5bab51]['pairId']=_0x5494c7[_0x288e56]['id'];}else _0x5494c7[_0x5bab51]['item']['startIndex']=_0x5bab51,_0x5494c7[_0x5bab51]['item']['endIndex']=_0x5bab51,_0x5494c7[_0x5bab51]['pairId']=null;}_0x5494c7[_0x5bab51]['markersStart']||(_0x5494c7[_0x5bab51]['markersStart']=[],_0x5494c7[_0x5bab51]['markersEnd']=[]);}}['_markInsertions'](_0xc230c,_0x5609b4){const _0x5a2f14=_0xc230c['filter'](_0x5390f8=>!_0x5390f8['isAdded']);for(let _0x4bd9f6=0x0;_0x4bd9f6<_0x5609b4['length'];_0x4bd9f6++)_0x5609b4[_0x4bd9f6]['isAdded']&&(_0x5a2f14[_0x4bd9f6]['isAdded']=_0x5609b4[_0x4bd9f6]['isAdded']);}['_getDiff'](_0x2d841c,_0x3d5443=null){const _0x14c7c6=this['repository']['getRevision'](_0x2d841c),_0x9b43a0=_0x3d5443?this['repository']['getRevision'](_0x3d5443):null,_0x1a9db4=this['_getRevisionsRange'](_0x14c7c6,_0x9b43a0),_0xfe6846=_0x1a9db4[_0x1a9db4['length']-0x1],_0x4ab58=new Map(),_0x1f4425={'model':{},'attributes':{},'changes':[]},_0x4be0a8=new Set(),_0x21b7d3=new Map();for(let _0x5aac3a=_0x1a9db4['length']-0x1;_0x5aac3a>=0x0;_0x5aac3a--){const _0x2776f8=_0x1a9db4[_0x5aac3a];for(const _0x45b303 of Object['keys'](_0x2776f8['diffData']))if(_0x2776f8['diffData'][_0x45b303]['attachChange']){const _0x58a7d5=_0x2776f8['diffData'][_0x45b303]['attachChange'];_0x58a7d5['isAttached']?(_0x4be0a8['add'](_0x45b303),_0x21b7d3['has'](_0x45b303)&&_0x21b7d3['get'](_0x45b303)['userId']==_0x58a7d5['userId']?_0x21b7d3['delete'](_0x45b303):_0x21b7d3['set'](_0x45b303,_0x58a7d5)):_0x21b7d3['has'](_0x45b303)?(_0x4be0a8['delete'](_0x45b303),_0x21b7d3['delete'](_0x45b303)):(_0x4be0a8['add'](_0x45b303),_0x21b7d3['set'](_0x45b303,_0x58a7d5));}else _0x4be0a8['add'](_0x45b303);}for(const _0x523eb0 of _0x4be0a8){const _0x40b0f8=_0x21b7d3['has'](_0x523eb0)&&!_0x21b7d3['get'](_0x523eb0)['isAttached'];let _0xcd647=_0x40b0f8?_0x1a9db4['length']-0x1:0x0;const _0x50adc5=_0x40b0f8?-0x1:0x1;for(;_0x1a9db4[_0xcd647];){const _0x17c0a7=_0x1a9db4[_0xcd647];if(_0x17c0a7['diffData'][_0x523eb0]){const _0x3ae245=_0x40b0f8?_0x17c0a7['diffData'][_0x523eb0]['attributesBefore']:_0x17c0a7['diffData'][_0x523eb0]['attributesAfter'];_0x1f4425['attributes'][_0x523eb0]=_0x3ae245?_0x137baa(_0x3ae245):{};break;}_0xcd647+=_0x50adc5;}}for(const _0x2dce6e of _0x1a9db4){_0x2dce6e['model']={};for(const _0x26bab2 of _0x2dce6e['authors'])_0x4ab58['set'](_0x26bab2['id'],_0x26bab2);for(const _0x4215b7 of _0x4be0a8){const _0x4637a1=_0x2dce6e['diffData'][_0x4215b7]?_0x2dce6e['diffData'][_0x4215b7]['insertions']:'[]',_0x2041e5=_0x2dce6e['diffData'][_0x4215b7]?_0x2dce6e['diffData'][_0x4215b7]['deletions']:'[]';_0x2dce6e['model'][_0x4215b7]={'insertions':this['_utils']['_makeModelFromViewString'](_0x4637a1),'deletions':this['_utils']['_makeModelFromViewString'](_0x2041e5)};}}for(const _0x264bb0 of _0x4be0a8){let _0x4243d6=null,_0x5c3aff=0x0;const _0x341c5a=new Map(Array['from'](_0x14c7c6['model'][_0x264bb0]['insertions']['markers'])['filter'](([_0x5d6b98])=>!_0x5d6b98['startsWith']('revision:')));let _0x63d8b8=0x0;for(const _0xb0ff38 of _0x1a9db4){const _0x1875fe=this['_makeTape'](_0xb0ff38['model'][_0x264bb0]['insertions']);_0xb0ff38==_0x14c7c6?(_0x4243d6=_0x1875fe,_0x5c3aff=_0x4243d6['length'],_0x4243d6['forEach'](_0x4c47f7=>{_0x4c47f7['id']=_0x63d8b8++;}),this['_processTape'](_0x4243d6)):this['_markInsertions'](_0x4243d6,_0x1875fe);const _0x147ad9=_0x4243d6['filter'](_0x281337=>!_0x281337['isAdded'])['map'](_0x27e562=>_0x27e562['id']);let _0x44c0d1=0x0;const _0x541826=this['_makeTape'](_0xb0ff38['model'][_0x264bb0]['deletions']);_0x541826['forEach'](_0xbee548=>{_0xbee548['isRemoved']?_0xbee548['id']=_0x5c3aff++:_0xbee548['id']=_0x147ad9[_0x44c0d1++];}),this['_processTape'](_0x541826),this['_setDistance'](_0x4243d6,'isAdded'),this['_setDistance'](_0x541826,'isRemoved'),_0xb0ff38==_0x14c7c6&&this['_markMarkers'](_0x4243d6,_0x341c5a),_0x4243d6=this['_joinTapes'](_0x4243d6,_0x541826),this['_refreshStartEndIndex'](_0x4243d6),this['_setDistance'](_0x4243d6,'isRemoved');}_0x4243d6=_0x4243d6['filter'](_0x4bcc74=>!(_0x4bcc74['isAdded']&&_0x4bcc74['isRemoved']));const _0xd25ff1=new Map(_0xfe6846['model'][_0x264bb0]['deletions']['markers']),_0x2d9dc1=new Set(_0x341c5a['keys']());for(const _0x19b3c1 of _0xd25ff1['keys']())_0x2d9dc1['delete'](_0x19b3c1);this['_markSuggestions'](_0x4243d6,_0x2d9dc1),this['_fixObsoleteTags'](_0x4243d6),_0x4243d6=this['_removeMissingPairs'](_0x4243d6),_0x4243d6=this['_markMismatchedRemovedTags'](_0x4243d6),_0x4243d6=this['_removeUnsupportedChanges'](_0x4243d6);const {root:_0x2fbfb9,changes:_0x4417ca}=this['_makeModelFromTape'](_0x4243d6,_0x4ab58,_0x264bb0);_0x1f4425['model'][_0x264bb0]=_0x2fbfb9;const _0x314678=_0x21b7d3['get'](_0x264bb0);if(_0x314678){const _0x2be4a5=_0x4ab58['get'](_0x314678['userId']),_0x57a645=new G({'author':_0x2be4a5,'type':_0x314678['isAttached']?'add':'remove','data':{'isOnRoot':!0x0},'createdAt':new Date(),'rootName':_0x264bb0});_0x4417ca['unshift'](_0x57a645),_0x1f4425['attributes'][_0x264bb0]['revisionHistoryAttachChange']=_0x57a645['id'];}_0x1f4425['changes']=_0x1f4425['changes']['concat'](_0x4417ca);}return _0x1f4425;}['_markMarkers'](_0x45651b,_0x46ef8c){for(let _0x2b1281=0x0;_0x2b1281<_0x45651b['length'];_0x2b1281++)for(const [_0x25da75,_0x2d465a]of _0x46ef8c)!_0x2d465a['isCollapsed']&&_0x2d465a['start']['isEqual'](_0x45651b[_0x2b1281]['previousPosition'])&&_0x45651b[_0x2b1281]['markersStart']['push'](_0x25da75),_0x2d465a['end']['isEqual'](_0x45651b[_0x2b1281]['nextPosition'])&&_0x45651b[_0x2b1281]['markersEnd']['push'](_0x25da75);}['_joinTapes'](_0x3409e1,_0x8f8fa4){let _0x30bf99=[],_0x5ae6a3=0x0,_0x3bef4a=0x0;for(;_0x5ae6a3<_0x3409e1['length']||_0x3bef4a<_0x8f8fa4['length'];){const _0x2c746e=_0x3409e1[_0x5ae6a3]||{},_0x6d0970=_0x8f8fa4[_0x3bef4a]||{};if(_0x2c746e['id']==_0x6d0970['id'])_0x5ae6a3++,_0x3bef4a++,_0x30bf99['push'](_0x2c746e);else{if(_0x6d0970['isRemoved']&&_0x2c746e['isAdded']){const {commonTape:_0x17264c,iEnd:_0x39ccaf,jEnd:_0x33f037}=this['_threeWayMerge'](_0x3409e1,_0x5ae6a3,_0x8f8fa4,_0x3bef4a);_0x30bf99=_0x30bf99['concat'](_0x17264c),_0x5ae6a3=_0x39ccaf,_0x3bef4a=_0x33f037;}else _0x6d0970['isRemoved']?(_0x3bef4a++,_0x30bf99['push'](_0x6d0970)):(_0x5ae6a3++,_0x30bf99['push'](_0x2c746e));}}return _0x30bf99;}['_markSuggestions'](_0x33c203,_0x3fce5e){const _0x108be6=[];for(let _0x4accf1=0x0;_0x4accf1<_0x33c203['length'];_0x4accf1++){for(let _0x1ff6ef=0x0;_0x1ff6ef<_0x33c203[_0x4accf1]['markersStart']['length'];_0x1ff6ef++){const _0xd4c342=_0x33c203[_0x4accf1]['markersStart'][_0x1ff6ef];if(!_0x3fce5e['has'](_0xd4c342))continue;const {group:_0x4be386,type:_0x36c4b8,authorId:_0x28fa4b}=_0x502c76(_0xd4c342);'revision-suggestion'!=_0x4be386||'insertion'!=_0x36c4b8&&'deletion'!=_0x36c4b8||(_0x108be6['unshift']({'type':_0x36c4b8,'name':_0xd4c342,'userId':_0x28fa4b}),_0x33c203[_0x4accf1]['markersStart']['splice'](_0x1ff6ef,0x1),_0x1ff6ef--);}_0x461fba(_0x33c203[_0x4accf1]);for(let _0x212c86=0x0;_0x212c86<_0x33c203[_0x4accf1]['markersEnd']['length'];_0x212c86++){const _0x1d8e10=_0x33c203[_0x4accf1]['markersEnd'][_0x212c86];if(!_0x3fce5e['has'](_0x1d8e10))continue;const {group:_0xf82496,type:_0xe74e50}=_0x502c76(_0x1d8e10);if('revision-suggestion'!=_0xf82496||'insertion'!=_0xe74e50&&'deletion'!=_0xe74e50)continue;_0x33c203[_0x4accf1]['markersEnd']['splice'](_0x212c86,0x1),_0x212c86--;const _0x53468e=_0x108be6['findIndex'](_0x3b9d30=>_0x3b9d30['name']==_0x1d8e10);_0x53468e>-0x1&&_0x108be6['splice'](_0x53468e,0x1);}}function _0x502c76(_0x55993f){const _0x3f10f3=_0x55993f['split'](':');return{'group':_0x3f10f3[0x0],'type':_0x3f10f3[0x1],'subType':_0x3f10f3['length']>=0x5?_0x3f10f3[0x2]:null,'id':_0x3f10f3['length']<0x5?_0x3f10f3[0x2]:_0x3f10f3[0x3],'authorId':_0x3f10f3['length']<0x5?_0x3f10f3[0x3]:_0x3f10f3[0x4],'markerCount':0x6==_0x3f10f3['length']?_0x3f10f3[0x5]:null};}function _0x461fba(_0x34ab14){for(let _0x679707=0x0;_0x679707<_0x108be6['length'];_0x679707++){if(_0x34ab14['isAdded']&&'insertion'==_0x108be6[_0x679707]['type']&&_0x34ab14['isAdded']['userId']==_0x108be6[_0x679707]['userId'])return _0x34ab14['isAddSuggestion']=_0x108be6[_0x679707],void delete _0x34ab14['isAdded'];if(!_0x34ab14['isAdded']&&!_0x34ab14['isRemoved']&&'deletion'==_0x108be6[_0x679707]['type'])return void(_0x34ab14['isRemoveSuggestion']=_0x108be6[_0x679707]);}}}['_setDistance'](_0x475f05,_0x3b9277){let _0x1a04cc=0x0,_0x21fbe9=!0x1;const _0x4e6a37=new Map();for(const _0x1e4e40 of _0x475f05)_0x1e4e40[_0x3b9277]?_0x21fbe9&&(_0x1a04cc++,_0x21fbe9=!0x1):(_0x1a04cc++,_0x21fbe9=!0x0),_0x4e6a37['set'](_0x1e4e40['id'],_0x1a04cc);for(let _0x4e111c=0x0;_0x4e111c<_0x475f05['length'];_0x4e111c++){if('isRemoved'==_0x3b9277&&_0x475f05[_0x4e111c]['isAdded']||'isAdded'==_0x3b9277&&_0x475f05[_0x4e111c]['isRemoved'])continue;if('text'==_0x475f05[_0x4e111c]['type']){_0x475f05[_0x4e111c]['distance']=0x0;continue;}const _0x2ad999=_0x4e6a37['get'](_0x475f05[_0x4e111c]['pairId']),_0x297b0d=_0x4e6a37['get'](_0x475f05[_0x4e111c]['id']);_0x475f05[_0x4e111c]['distance']=_0x2ad999-_0x297b0d;}}['_getRevisionsRange'](_0x541e8c,_0xafb096,_0x52b137=!0x1){const _0x4f3135=[];let _0x55b9a4=this['repository']['getIndex'](_0x541e8c),_0x29a91f=this['repository']['getIndex'](_0xafb096);for(-0x1==_0x29a91f&&(_0x29a91f=this['repository']['_revisions']['length'],_0x52b137=!0x1);_0x55b9a4<_0x29a91f;)_0x4f3135['push'](this['repository']['getRevision'](_0x55b9a4)),_0x55b9a4++;return _0x52b137&&_0x4f3135['push'](this['repository']['getRevision'](_0x55b9a4)),_0x4f3135;}['_threeWayMerge'](_0x5e14f7,_0x379b0c,_0x22f2fd,_0x423c5b){const _0x3807cf=this['editor']['model']['schema'];let _0x122c67=_0x379b0c;for(;_0x5e14f7[_0x122c67]&&_0x5e14f7[_0x122c67]['isAdded'];)_0x122c67++;let _0x7e16e3=_0x423c5b;for(;_0x22f2fd[_0x7e16e3]&&_0x22f2fd[_0x7e16e3]['isRemoved'];)_0x7e16e3++;_0x4aae70(_0x5e14f7,_0x379b0c,_0x122c67),_0x4aae70(_0x22f2fd,_0x423c5b,_0x7e16e3);const _0x3f56ab=_0x22f2fd['slice'](_0x423c5b,_0x7e16e3)['concat'](_0x5e14f7['slice'](_0x379b0c,_0x122c67));return _0x3f56ab['sort']((_0x121c30,_0x14d55a)=>_0x121c30['side']!=_0x14d55a['side']?_0x121c30['side']-_0x14d55a['side']:_0x121c30['level']!=_0x14d55a['level']?_0x121c30['level']-_0x14d55a['level']:_0x121c30['distance']!=_0x14d55a['distance']?_0x14d55a['distance']-_0x121c30['distance']:!!_0x121c30['isAdded']!=!!_0x14d55a['isAdded']?-0x1==_0x121c30['side']||0x0==_0x121c30['side']?_0x121c30['isAdded']?-0x1:0x1:_0x121c30['isAdded']?0x1:-0x1:_0x121c30['index']-_0x14d55a['index']),{'commonTape':_0x3f56ab,'iEnd':_0x122c67,'jEnd':_0x7e16e3};function _0x4aae70(_0x89e2af,_0x4fbc41,_0x31951b){let _0x1484f1=-0x1,_0x10c349=Number['POSITIVE_INFINITY'],_0x31cfac=!0x0;for(let _0x53b765=_0x4fbc41;_0x53b765<_0x31951b;_0x53b765++)if(_0x3807cf['isInline'](_0x89e2af[_0x53b765]['item'])||(_0x31cfac=!0x1),_0x89e2af[_0x53b765]['item']['startIndex']<_0x4fbc41&&(_0x1484f1=_0x53b765),_0x89e2af[_0x53b765]['item']['endIndex']>=_0x31951b){_0x10c349=_0x53b765;break;}_0x31cfac&&(_0x1484f1=_0x31951b-0x1);for(let _0x1442fd=_0x4fbc41;_0x1442fd<_0x31951b;_0x1442fd++)_0x89e2af[_0x1442fd]['side']=_0x1442fd<=_0x1484f1?-0x1:_0x1442fd<_0x10c349?0x0:0x1,_0x89e2af[_0x1442fd]['index']=_0x1442fd;let _0x144e91=0x0;for(let _0x1fc907=_0x4fbc41;_0x1fc907<=_0x1484f1;_0x1fc907++)0x0==_0x89e2af[_0x1fc907]['distance']?_0x89e2af[_0x1fc907]['level']=_0x144e91:(_0x144e91++,_0x89e2af[_0x1fc907]['level']=_0x144e91,_0x144e91++);for(let _0x1fa00c=_0x4fbc41;_0x1fa00c<_0x31951b;_0x1fa00c++)0x0==_0x89e2af[_0x1fa00c]['side']&&(_0x89e2af[_0x1fa00c]['level']=_0x144e91);_0x144e91=0x0;for(let _0x8d3ddd=_0x31951b-0x1;_0x8d3ddd>=_0x10c349;_0x8d3ddd--)0x0==_0x89e2af[_0x8d3ddd]['distance']?_0x89e2af[_0x8d3ddd]['level']=_0x144e91:(_0x144e91--,_0x89e2af[_0x8d3ddd]['level']=_0x144e91,_0x144e91--);}}['_fixObsoleteTags'](_0x15751f){const _0x24f8e4=new Map(),_0x41fce2=this['editor']['model']['schema'];for(let _0x57149a=0x1;_0x57149a<_0x15751f['length'];_0x57149a++){let _0x3fcc52,_0x2c0d22,_0x5b1eb3;const _0x1f02bc=_0x15751f[_0x57149a],_0x5ae162=_0x15751f[_0x57149a-0x1];if('text'==_0x1f02bc['type'])continue;if(_0x1f02bc['type']!=_0x5ae162['type'])continue;if(!_0x41fce2['isBlock'](_0x5ae162['item'])||_0x41fce2['isLimit'](_0x5ae162['item']))continue;if(!_0x41fce2['isBlock'](_0x1f02bc['item'])||_0x41fce2['isLimit'](_0x1f02bc['item']))continue;if((_0x15751f[_0x57149a]['isAdded']||_0x15751f[_0x57149a]['isAddSuggestion'])&&_0x15751f[_0x57149a-0x1]['isRemoved'])_0x3fcc52=_0x15751f[_0x57149a],_0x2c0d22=_0x15751f[_0x57149a-0x1],_0x5b1eb3=_0x57149a-0x1;else{if(!_0x15751f[_0x57149a]['isRemoved']||!_0x15751f[_0x57149a-0x1]['isAdded']&&!_0x15751f[_0x57149a-0x1]['isAddSuggestion'])continue;_0x3fcc52=_0x15751f[_0x57149a-0x1],_0x2c0d22=_0x15751f[_0x57149a],_0x5b1eb3=_0x57149a;}const _0x41ca79=_0x3fcc52['level']==_0x2c0d22['level'],_0x4a22ff=Math['abs'](_0x3fcc52['level'])<Math['abs'](_0x2c0d22['level'])&&0x0==_0x2c0d22['distance'];(_0x41ca79||_0x4a22ff)&&(_0x24f8e4['set'](_0x2c0d22['id'],_0x3fcc52['id']),_0x15751f['splice'](_0x5b1eb3,0x1),_0x57149a--,_0x3fcc52['isAdded']=!0x1);}for(let _0x2e39f0=0x0;_0x2e39f0<_0x15751f['length'];_0x2e39f0++)_0x24f8e4['has'](_0x15751f[_0x2e39f0]['pairId'])&&(_0x15751f[_0x2e39f0]['pairId']=_0x24f8e4['get'](_0x15751f[_0x2e39f0]['pairId']));}['_removeMissingPairs'](_0x55c4f5){const _0xf9f99a=new Set(_0x55c4f5['map'](_0x140b9a=>_0x140b9a['id']));for(let _0x1b8808=0x0;_0x1b8808<_0x55c4f5['length'];_0x1b8808++)_0xf9f99a['has'](_0x55c4f5[_0x1b8808]['pairId'])||0x0==_0x55c4f5[_0x1b8808]['distance']||(_0x55c4f5[_0x1b8808]['isIncorrect']=!0x0);return _0x55c4f5['filter'](_0x128aec=>!_0x128aec['isIncorrect']);}['_markMismatchedRemovedTags'](_0x3472aa){const _0x2ac0b4=new Set();for(let _0x76887b=0x0;_0x76887b<_0x3472aa['length'];_0x76887b++){if(_0x2ac0b4['has'](_0x3472aa[_0x76887b]['id'])&&_0x3472aa[_0x76887b]['isRemoved']&&(_0x3472aa[_0x76887b]['isIncorrect']=!0x0),_0x3472aa[_0x76887b]['isIncorrect'])continue;if(0x0==_0x3472aa[_0x76887b]['distance'])continue;if('elementStart'!=_0x3472aa[_0x76887b]['type'])continue;if(null==_0x3472aa[_0x76887b]['pairId'])continue;let _0x9fae8b=_0x76887b+0x1,_0x1f2ddd=0x0;for(;_0x3472aa[_0x9fae8b]['id']!=_0x3472aa[_0x76887b]['pairId'];)'elementStart'==_0x3472aa[_0x9fae8b]['type']?_0x1f2ddd++:'elementEnd'==_0x3472aa[_0x9fae8b]['type']&&_0x1f2ddd--,_0x9fae8b++;if(0x0!=_0x1f2ddd){if(_0x3472aa[_0x76887b]['isRemoved'])_0x3472aa[_0x76887b]['isIncorrect']=!0x0;else{for(;_0x9fae8b!=_0x76887b;)_0x3472aa[_0x9fae8b]['isRemoved']&&0x0!=_0x3472aa[_0x9fae8b]['distance']&&(_0x3472aa[_0x9fae8b]['isIncorrect']=!0x0,_0x2ac0b4['add'](_0x3472aa[_0x9fae8b]['pairId'])),_0x9fae8b--;}}}return _0x3472aa['filter'](_0x2ffc70=>!_0x2ffc70['isIncorrect']);}['_removeUnsupportedChanges'](_0x44074c){const _0x35d4fc=this['editor']['model']['schema'];for(let _0x56e88b=0x0;_0x56e88b<_0x44074c['length'];_0x56e88b++){if(!(_0x44074c[_0x56e88b]['isAdded']||_0x44074c[_0x56e88b]['isAddSuggestion']||_0x44074c[_0x56e88b]['isRemoved']||_0x44074c[_0x56e88b]['isRemoveSuggestion']))continue;if(0x0==_0x44074c[_0x56e88b]['distance'])continue;const _0x12344e=_0x44074c[_0x56e88b]['item'];_0x35d4fc['isBlock'](_0x12344e)||_0x35d4fc['isLimit'](_0x12344e)||(_0x44074c[_0x56e88b]['isAdded']&&delete _0x44074c[_0x56e88b]['isAdded'],_0x44074c[_0x56e88b]['isAddSuggestion']&&delete _0x44074c[_0x56e88b]['isAddSuggestion'],_0x44074c[_0x56e88b]['isRemoveSuggestion']&&delete _0x44074c[_0x56e88b]['isRemoveSuggestion'],_0x44074c[_0x56e88b]['isRemoved']&&(_0x44074c[_0x56e88b]['isIncorrect']=!0x0));}return _0x44074c['filter'](_0x1c7dbc=>!_0x1c7dbc['isIncorrect']);}['_makeModelFromTape'](_0x17b8de,_0x2cf662,_0x5f134d){const _0x5487c7=new _0x46c173(),_0x24bdbc=[],_0x54044b=new Map(),_0x47d339=this['editor']['model'],_0x5274bc=_0x47d339['schema'],_0x323501=[_0x5487c7],_0x5aa9b7={},_0x5beb40={'isAdded':[],'isRemoved':[],'isAddSuggestion':[],'isRemoveSuggestion':[]};let _0x4dce38=null;const _0x29c205=[0x0];for(let _0x1a9908=0x0;_0x1a9908<_0x17b8de['length'];_0x1a9908++)if('elementStart'===_0x17b8de[_0x1a9908]['type']){_0x17b8de[_0x1a9908]['previousPosition']=_0x47d339['createPositionFromPath'](_0x5487c7,_0x29c205);const _0xca6ca8=new _0x166fba(_0x17b8de[_0x1a9908]['item']['name'],_0x17b8de[_0x1a9908]['item']['getAttributes']());_0x323501[0x0]['_appendChild'](_0xca6ca8),_0x29c205['push'](0x0),_0x323501['unshift'](_0xca6ca8),_0x17b8de[_0x1a9908]['nextPosition']=_0x47d339['createPositionFromPath'](_0x5487c7,_0x29c205);}else'elementEnd'===_0x17b8de[_0x1a9908]['type']?(_0x323501['shift'](),_0x17b8de[_0x1a9908]['previousPosition']=_0x47d339['createPositionFromPath'](_0x5487c7,_0x29c205),_0x29c205['pop'](),_0x29c205[_0x29c205['length']-0x1]++,_0x17b8de[_0x1a9908]['nextPosition']=_0x47d339['createPositionFromPath'](_0x5487c7,_0x29c205)):(_0x17b8de[_0x1a9908]['previousPosition']=_0x47d339['createPositionFromPath'](_0x5487c7,_0x29c205),_0x4dce38?_0x4dce38['_data']+=_0x17b8de[_0x1a9908]['item']['data']:_0x4dce38=new _0x3d9bed(_0x17b8de[_0x1a9908]['item']['data'],_0x17b8de[_0x1a9908]['item']['getAttributes']()),_0x17b8de[_0x1a9908+0x1]&&'text'===_0x17b8de[_0x1a9908+0x1]['type']&&_0x4ac410(_0x4dce38,_0x17b8de[_0x1a9908+0x1]['item'])||(_0x323501[0x0]['_appendChild'](_0x4dce38),_0x4dce38=null),_0x29c205[_0x29c205['length']-0x1]+=_0x17b8de[_0x1a9908]['item']['offsetSize'],_0x17b8de[_0x1a9908]['nextPosition']=_0x47d339['createPositionFromPath'](_0x5487c7,_0x29c205));for(let _0xeea267=0x0;_0xeea267<_0x17b8de['length'];_0xeea267++){const _0x54e8ea=_0x17b8de[_0xeea267]['previousPosition'],_0x4a0477=_0x17b8de[_0xeea267]['nextPosition'];for(const _0x50826b of _0x17b8de[_0xeea267]['markersStart'])_0x54044b['set'](_0x50826b,{'start':_0x54e8ea,'end':null});_0x47a58e('isRemoveSuggestion',_0xeea267,_0x54e8ea,_0x4a0477),_0x47a58e('isAddSuggestion',_0xeea267,_0x54e8ea,_0x4a0477),_0x47a58e('isRemoved',_0xeea267,_0x54e8ea,_0x4a0477),_0x47a58e('isAdded',_0xeea267,_0x54e8ea,_0x4a0477);for(const _0x4403bf of _0x17b8de[_0xeea267]['markersEnd']){const _0x556123=_0x54044b['get'](_0x4403bf);_0x556123?_0x556123['end']=_0x4a0477:_0x54044b['set'](_0x4403bf,{'start':_0x4a0477,'end':_0x4a0477});}}for(const [_0xadd258,_0x53f8a2]of _0x54044b){const _0x3953ef=this['editor']['model']['createRange'](_0x53f8a2['start'],_0x53f8a2['end']);_0x5487c7['markers']['set'](_0xadd258,_0x3953ef);}return _0x24bdbc['sort']((_0x59ac59,_0x507743)=>{const _0xfb0ee2=_0x5487c7['markers']['get']('revision:'+_0x59ac59['id']),_0x220c53=_0x5487c7['markers']['get']('revision:'+_0x507743['id']);return _0xfb0ee2['start']['isBefore'](_0x220c53['start'])?-0x1:_0xfb0ee2['start']['isAfter'](_0x220c53['start'])?0x1:_0xfb0ee2['end']['isBefore'](_0x220c53['end'])?-0x1:_0xfb0ee2['end']['isAfter'](_0x220c53['end'])?0x1:'add'===_0x59ac59['type']?-0x1:0x1;}),{'root':_0x5487c7,'changes':_0x24bdbc};function _0x47a58e(_0x1f51cd,_0x30c226,_0x2f5eed,_0x4dd33c){const _0x3b3772=!!_0x17b8de[_0x30c226][_0x1f51cd],_0x5e4be7=_0x3b3772?_0x17b8de[_0x30c226][_0x1f51cd]['userId']:null,_0x5a5128=_0x30c226===_0x17b8de['length']-0x1,_0x2a2261=_0x5beb40[_0x1f51cd][0x0],_0x5a9b4a=_0x5274bc['isObject'](_0x17b8de[_0x30c226]['item']);!_0x5aa9b7[_0x1f51cd]&&_0x3b3772?_0x5aa9b7[_0x1f51cd]={'start':_0x2f5eed,'tapeItem':_0x17b8de[_0x30c226],'userId':_0x5e4be7,'type':_0x1f51cd}:_0x5aa9b7[_0x1f51cd]&&!_0x3b3772?(_0x5aa9b7[_0x1f51cd]['end']=_0x2f5eed,_0x30438f(_0x5aa9b7[_0x1f51cd]),_0x5aa9b7[_0x1f51cd]=null):_0x5aa9b7[_0x1f51cd]&&_0x3b3772&&_0x5aa9b7[_0x1f51cd]['userId']!==_0x5e4be7&&(_0x5aa9b7[_0x1f51cd]['end']=_0x2f5eed,_0x2a2261&&_0x2a2261['userId']===_0x5aa9b7[_0x1f51cd]['userId']||_0x30438f(_0x5aa9b7[_0x1f51cd]),_0x5aa9b7[_0x1f51cd]={'start':_0x2f5eed,'tapeItem':_0x17b8de[_0x30c226],'userId':_0x5e4be7,'type':_0x1f51cd}),_0x5aa9b7[_0x1f51cd]&&_0x5a9b4a&&('elementStart'!==_0x17b8de[_0x30c226]['type']||_0x2a2261&&_0x2a2261['userId']===_0x5e4be7||_0x5beb40[_0x1f51cd]['unshift']({'userId':_0x5e4be7,'object':_0x17b8de[_0x30c226]['item'],'change':_0x5aa9b7[_0x1f51cd]}),'elementEnd'===_0x17b8de[_0x30c226]['type']&&_0x2a2261&&_0x2a2261['object']===_0x17b8de[_0x30c226]['item']&&(_0x5beb40[_0x1f51cd]['shift'](),_0x5aa9b7[_0x1f51cd]=_0x2a2261['change'])),_0x5aa9b7[_0x1f51cd]&&_0x5a5128&&(_0x5aa9b7[_0x1f51cd]['end']=_0x4dd33c,_0x30438f(_0x5aa9b7[_0x1f51cd]),_0x5aa9b7[_0x1f51cd]=null);}function _0x30438f({start:_0xbe59ce,end:_0x49959f,tapeItem:_0x2e5403,userId:_0x47616b,type:_0x556a00}){const _0x2f825e=_0x2e5403['item'],_0x3aba6a=_0x47d339['schema']['isBlock'](_0x2f825e)&&!_0x47d339['schema']['isLimit'](_0x2f825e),_0x2aae77=_0xbe59ce['nodeAfter']==_0x49959f['parent']&&_0x49959f['isAtStart'];if(_0x3aba6a&&_0x2aae77)return;const _0x127234=_0x47d339['createRange'](_0xbe59ce,_0x49959f),_0x19b29f=_0x2cf662['get'](_0x47616b),_0xd7fc53=new G({'author':_0x19b29f,'type':'isAdded'==_0x556a00||'isAddSuggestion'==_0x556a00?'add':'remove','data':{'isSuggestion':'isAddSuggestion'==_0x556a00||'isRemoveSuggestion'==_0x556a00},'createdAt':new Date(),'rootName':_0x5f134d});_0x24bdbc['push'](_0xd7fc53),_0x5487c7['markers']['set']('revision:'+_0xd7fc53['id'],_0x127234);}function _0x4ac410(_0x32d5c7,_0x1f9da5){const _0x1eaf61=_0x32d5c7['getAttributes'](),_0x42865a=_0x1f9da5['getAttributes']();for(const _0x5a874f of _0x1eaf61){if(_0x5a874f[0x1]!==_0x1f9da5['getAttribute'](_0x5a874f[0x0]))return!0x1;_0x42865a['next']();}return _0x42865a['next']()['done'];}}['_setConversion'](){this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision','view':_0xd2041a=>{const _0x27c2a4=_0xd2041a['markerName']['split'](':')[0x1],_0x15304f=this['_getChangeFromId'](_0x27c2a4);if(!_0x15304f)return null;const _0x3b8466='add'==_0x15304f['type']?'insertion':'deletion',_0x1b802e=['ck-suggestion-marker','ck-suggestion-marker-'+_0x3b8466];return _0x15304f['data']['isSuggestion']&&_0x1b802e['push']('ck-suggestion-marker-'+_0x3b8466+'-new'),this['activeChange']==_0x15304f&&_0x1b802e['push']('ck-suggestion-marker--active'),{'classes':_0x1b802e,'attributes':{'data-change-id':_0x27c2a4}};}}),this['editor']['conversion']['for']('upcast')['add'](_0x272a6d=>{_0x272a6d['on']('element:pre',(_0x3e0036,_0x4f7290,_0x2d07e7)=>{const _0x343f6a=_0x4f7290['viewItem']['getChild'](0x0);if(!_0x343f6a||!_0x343f6a['is']('element','code'))return;if(!_0x2d07e7['consumable']['consume'](_0x343f6a,{'attributes':['vid_start','vid_end']}))return;const _0x60f4bf=_0x4f7290['modelRange']['start']['nodeAfter'];_0x2d07e7['writer']['setAttribute']('vid_start',_0x343f6a['getAttribute']('vid_start'),_0x60f4bf),_0x2d07e7['writer']['setAttribute']('vid_end',_0x343f6a['getAttribute']('vid_end'),_0x60f4bf);},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['add'](_0x26731a=>{_0x26731a['on']('element',(_0x270230,_0xde6dee,_0x450f86)=>{if(!_0x450f86['consumable']['consume'](_0xde6dee['viewItem'],{'attributes':['vid_start','vid_end']}))return;if(_0xde6dee['modelRange']['isCollapsed'])return;const _0x120686=_0xde6dee['modelRange']['start']['nodeAfter'];_0x120686['hasAttribute']('vid_start')||_0x120686['hasAttribute']('vid')||(_0x450f86['writer']['setAttribute']('vid_start',_0xde6dee['viewItem']['getAttribute']('vid_start'),_0x120686),_0x450f86['writer']['setAttribute']('vid_end',_0xde6dee['viewItem']['getAttribute']('vid_end'),_0x120686));},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['elementToAttribute']({'view':{'name':'span','attributes':{'vid':!0x0}},'model':{'key':'vid','value':_0x1c6370=>_0x1c6370['getAttribute']('vid')}}),this['editor']['model']['schema']['on']('checkAttribute',(_0x5e1970,[,_0x59fa06])=>{['vid_start','vid_end','vid']['includes'](_0x59fa06)&&(_0x5e1970['return']=!0x0,_0x5e1970['stop']());},{'priority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x4d2a62=>{_0x4d2a62['on']('attribute:vid',(_0x47a3a3,_0x19c393,_0x38c352)=>{if('\x20'!=_0x19c393['item']['data']||_0x19c393['item']['parent']['maxOffset']>0x1)return;if(!_0x38c352['consumable']['consume'](_0x19c393['item'],_0x47a3a3['name']))return;const _0x36445f=_0x38c352['writer'],_0x226675=_0x38c352['mapper']['toViewRange'](_0x19c393['range']);_0x36445f['wrap'](_0x226675,_0x36445f['createAttributeElement']('span'));});}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',function(_0xaf8401){const _0xc21bba=_0xaf8401['plugins']['get']('RevisionViewer');return(_0x2966ad,_0x31db0c,_0xfd5058)=>{const _0xae04b9=_0x31db0c['markerName']['split'](':')[0x1],_0x3acbbd=_0xc21bba['_getChangeFromId'](_0xae04b9);if(!_0x3acbbd)return null;const _0x4b6e27='add'==_0x3acbbd['type']?'split':'merge';if(!_0xfd5058['consumable']['test'](_0x31db0c['markerRange'],_0x2966ad['name']))return;const _0x3134ea=_0x31db0c['markerRange']['getWalker'](),_0x4a6689=_0x31db0c['markerRange']['start'],_0x4c0692=_0xaf8401['model']['schema'];let _0x4f3aae=null,_0x401e4f=null,_0x37c7a8=!0x1,_0x5e3f3e=!0x1;for(const _0x1187e1 of _0x3134ea){const _0x3ab63b=_0x1187e1['item'];_0x37c7a8=_0x37c7a8||_0x4c0692['isContent'](_0x3ab63b);const _0x25f1bd=_0xfd5058['mapper']['toViewElement'](_0x3ab63b);if(_0x25f1bd&&_0x25f1bd['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x1187e1['type']&&(_0x4c0692['isBlock'](_0x3ab63b)&&!_0x4c0692['isLimit'](_0x3ab63b)&&(_0x3ab63b['nextSibling']||_0x4a6689['isAtEnd']?_0x4f3aae&&_0x4f3aae['parent']==_0x3ab63b||(_0x4f3aae=_0x3ab63b,_0x530e76(_0x1187e1['previousPosition']),_0x5e3f3e=!0x0):_0x401e4f=_0x401e4f||_0x1187e1['previousPosition']));}function _0x530e76(_0x3805d5){const _0x3eb5ea=_0xfd5058['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x4b6e27}),_0x18dd4e=_0xfd5058['mapper']['toViewPosition'](_0x3805d5);_0x3acbbd['data']['isSuggestion']&&_0xfd5058['writer']['addClass']('ck-suggestion-marker-'+_0x4b6e27+'-new',_0x3eb5ea),_0xc21bba['activeChange']==_0x3acbbd&&_0xfd5058['writer']['addClass']('ck-suggestion-marker--active',_0x3eb5ea),_0xfd5058['writer']['insert'](_0x18dd4e,_0x3eb5ea),_0xfd5058['mapper']['bindElementToMarker'](_0x3eb5ea,_0x31db0c['markerName']);}_0x37c7a8||_0x5e3f3e||!_0x401e4f||_0x530e76(_0x401e4f);};}(this['editor']),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision',(_0x3e0d41,_0x181fce,_0x3909d6)=>{const _0x3841f0=_0x3909d6['mapper']['markerNameToElements'](_0x181fce['markerName']);if(_0x3841f0){for(const _0x5c89db of _0x3841f0)(_0x5c89db['hasClass']('ck-suggestion-marker-split')||_0x5c89db['hasClass']('ck-suggestion-marker-merge'))&&(_0x3909d6['mapper']['unbindElementFromMarkerName'](_0x5c89db,_0x181fce['markerName']),_0x3909d6['writer']['remove'](_0x5c89db));}},{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',(_0x2269fc,_0x5dfb56,_0x2bb695)=>{const _0x3456ac=_0x5dfb56['markerName']['split'](':')[0x1],_0x1efa30=this['_getChangeFromId'](_0x3456ac);if(!_0x1efa30)return null;const _0x372c48='add'==_0x1efa30['type']?'split':'merge';if(_0x2bb695['consumable']['test'](_0x5dfb56['markerRange'],_0x2269fc['name']))for(const _0xf1da46 of _0x5dfb56['markerRange']['getItems']()){if(!_0xf1da46['is']('element','softBreak'))continue;const _0x211db8=_0x2bb695['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x372c48}),_0x49a20f=_0x2bb695['mapper']['toViewPosition'](this['editor']['model']['createPositionBefore'](_0xf1da46));_0x1efa30['data']['isSuggestion']&&_0x2bb695['writer']['addClass']('ck-suggestion-marker-'+_0x372c48+'-new',_0x211db8),this['activeChange']==_0x1efa30&&_0x2bb695['writer']['addClass']('ck-suggestion-marker--active',_0x211db8),_0x2bb695['writer']['insert'](_0x49a20f,_0x211db8),_0x2bb695['mapper']['bindElementToMarker'](_0x211db8,_0x5dfb56['markerName']);}},{'priority':'high'}),this['editor']['model']['document']['on']('change',()=>{this['editor']['editing']['view']['change'](_0x52ea31=>{for(const _0x234954 of this['editor']['model']['document']['getRootNames']()){const _0x12e6a8=this['editor']['model']['document']['getRoot'](_0x234954),_0x1b0f3c=this['editor']['editing']['view']['document']['getRoot'](_0x234954);if(_0x1b0f3c){const _0x3d90e4=_0x12e6a8['getAttribute']('revisionHistoryAttachChange');if(_0x52ea31['removeAttribute']('data-change-id',_0x1b0f3c),_0x52ea31['removeClass']('ck-revision-history-root-add',_0x1b0f3c),_0x52ea31['removeClass']('ck-revision-history-root-remove',_0x1b0f3c),_0x52ea31['removeClass']('ck-revision-history-root--active',_0x1b0f3c),_0x3d90e4){const _0x106265=this['_getChangeFromId'](_0x3d90e4);if(!_0x106265)return null;_0x52ea31['setAttribute']('data-change-id',_0x3d90e4,_0x1b0f3c),_0x52ea31['addClass']('ck-revision-history-root-'+_0x106265['type'],_0x1b0f3c),this['activeChange']==_0x106265&&_0x52ea31['addClass']('ck-revision-history-root--active',_0x1b0f3c);}}}});}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'comment','model':_0x29df21=>'revision-comment:'+_0x29df21,'converterPriority':'highest'}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'suggestion','model':_0xdfbcb9=>'revision-suggestion:'+_0xdfbcb9,'converterPriority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision-suggestion','view':_0x46cc68=>({'name':'suggestion:'+_0x46cc68,'group':'revision-suggestion'}),'converterPriority':'highest'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-suggestion','view':_0x1f249f=>{const _0x42b25e=_0x1f249f['markerName']['split'](':')[0x1];return'insertion'!=_0x42b25e&&'deletion'!=_0x42b25e?null:{'classes':['ck-suggestion-preview-marker','ck-suggestion-preview-marker-'+_0x42b25e]};}}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:deletion',Q(this['editor'],'merge'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:insertion',Q(this['editor'],'split'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision-suggestion',(_0x267fad,_0x34ca10,_0x4cec88)=>{const _0x4d7da4=_0x4cec88['mapper']['markerNameToElements'](_0x34ca10['markerName']);if(_0x4d7da4){for(const _0x3f754f of _0x4d7da4)_0x3f754f['is']('uiElement')&&(_0x4cec88['mapper']['unbindElementFromMarkerName'](_0x3f754f,_0x34ca10['markerName']),_0x4cec88['writer']['remove'](_0x3f754f));}},{'priority':'high'});}['_getChangeFromId'](_0x5952f2){return this['_changeIdToChange']['get'](_0x5952f2);}['_getViewForChange'](_0x20df2c){return this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=new z(this['editor']['locale'],_0x20df2c),this['_changeView'];}['_initInteractions'](){this['editor']['model']['document']['selection']['observeMarkers']('revision'),this['on']('change:activeView',(_0x4d2dcf,_0x44cddc,_0x45dc5f,_0x9e94c0)=>{_0x9e94c0&&this['_balloon']['remove'](_0x9e94c0),_0x45dc5f&&(this['_balloon']['add']({'view':_0x45dc5f,'stackId':'revisionHistoryLabel','position':{'target':()=>{const _0x365128=this['editor']['editing'],_0x38cd68=this['_getChangeFromId'](_0x45dc5f['changeId']);let _0x451b74;if(_0x38cd68['data']['isOnRoot']){const _0x315829=_0x365128['view']['getDomRoot'](_0x38cd68['rootName']);_0x451b74=Array['from'](_0x315829['getClientRects']());}else{const _0xafff70=this['editor']['model']['markers']['get']('revision:'+_0x45dc5f['changeId']);_0x451b74=Array['from'](_0x365128['mapper']['markerNameToElements'](_0xafff70['name']))['map'](_0x52ea12=>_0x365128['view']['domConverter']['mapViewToDom'](_0x52ea12))['map'](_0x195759=>Array['from'](_0x195759['getClientRects']()))['flat']();}if(!this['_activeViewTarget'])return _0x451b74[0x0];return _0x451b74['find'](_0x289081=>_0x289081['top']-0x3<=this['_activeViewTarget']['y']&&_0x289081['bottom']+0x3>=this['_activeViewTarget']['y']&&_0x289081['left']-0x3<=this['_activeViewTarget']['x']&&_0x289081['right']+0x3>=this['_activeViewTarget']['x'])||_0x451b74[0x0];}}}),this['_balloon']['showStack']('revisionHistoryLabel'));}),this['on']('change:activeChange',(_0x2b407f,_0x2e4137,_0x43d838,_0x322638)=>{this['activeView']=_0x43d838?this['_getViewForChange'](_0x43d838):null,this['editor']['model']['change'](()=>{const _0x4b7d49=this['editor']['editing'];_0x322638&&(_0x322638['data']['isOnRoot']?_0x4b7d49['view']['change'](_0x3cee0c=>{_0x3cee0c['removeClass']('ck-revision-history-root--active',_0x4b7d49['view']['document']['getRoot'](_0x322638['rootName']));}):_0x4b7d49['reconvertMarker']('revision:'+_0x322638['id'])),_0x43d838&&(_0x43d838['data']['isOnRoot']?_0x4b7d49['view']['change'](_0x289f25=>{_0x289f25['addClass']('ck-revision-history-root--active',_0x4b7d49['view']['document']['getRoot'](_0x43d838['rootName']));}):_0x4b7d49['reconvertMarker']('revision:'+_0x43d838['id']));});}),this['listenTo'](this['editor']['editing']['view']['document'],'mouseover',(_0x45ea01,_0x2fc9c7)=>{if(this['activeChange'])return;const _0x49d10c=this['_findChangeIdFromDomTarget'](_0x2fc9c7['target']),_0x32dc56=this['_changeIdToChange']['get'](_0x49d10c);_0x32dc56?(this['_activeViewTarget']={'x':_0x2fc9c7['domEvent']['x'],'y':_0x2fc9c7['domEvent']['y']},this['activeView']=this['_getViewForChange'](_0x32dc56)):(this['_activeViewTarget']=null,this['activeView']=null);}),this['listenTo'](this['editor']['editing']['view']['document'],'mousedown',(_0x5e7aa6,_0x3ac324)=>{const _0x95a110=this['_findChangeIdFromDomTarget'](_0x3ac324['target']),_0x157a44=this['_changeIdToChange']['get'](_0x95a110);_0x157a44?(this['_activeViewTarget']={'x':_0x3ac324['domEvent']['x'],'y':_0x3ac324['domEvent']['y']},_0x157a44===this['activeChange']?this['_balloon']['updatePosition']():this['activeChange']=_0x157a44):(this['_activeViewTarget']=null,this['activeChange']=null);});}['_findChangeIdFromDomTarget'](_0x28bd1a){do{const _0x3776ce=_0x28bd1a['getAttribute']('data-change-id');if(_0x3776ce)return _0x3776ce;_0x28bd1a=_0x28bd1a['parent'];}while(_0x28bd1a);return null;}['_cleanMarkers'](){this['editor']['model']['change'](_0x5b3d57=>{for(const _0x52ca01 of this['editor']['model']['markers'])_0x5b3d57['removeMarker'](_0x52ca01);});}}function Q(_0x1855ff,_0x30efa1){return(_0x55477e,_0x1c8c62,_0x23c644)=>{if(!_0x23c644['consumable']['test'](_0x1c8c62['markerRange'],_0x55477e['name']))return;const _0x40c0e0=_0x1c8c62['markerRange']['getWalker'](),_0xfcd901=_0x1c8c62['markerRange']['start'],_0x434eb9=_0x1855ff['model']['schema'];let _0x34f5a8=null,_0x4f86ed=null,_0x2522b3=!0x1,_0x27b409=!0x1;for(const _0x4dede1 of _0x40c0e0){const _0x1c8391=_0x4dede1['item'];_0x2522b3=_0x2522b3||_0x434eb9['isContent'](_0x1c8391);const _0x31c9fb=_0x23c644['mapper']['toViewElement'](_0x1c8391);if(_0x31c9fb&&_0x31c9fb['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x4dede1['type']&&(_0x434eb9['isBlock'](_0x1c8391)&&!_0x434eb9['isLimit'](_0x1c8391)&&(_0x1c8391['nextSibling']||_0xfcd901['isAtEnd']?_0x34f5a8&&_0x34f5a8['parent']==_0x1c8391||(_0x34f5a8=_0x1c8391,_0x3bca78(_0x4dede1['previousPosition']),_0x27b409=!0x0):_0x4f86ed=_0x4f86ed||_0x4dede1['previousPosition']));}function _0x3bca78(_0x43b6a6){const _0xb916a3=_0x23c644['mapper']['toViewPosition'](_0x43b6a6),_0x1e6b4a=_0x23c644['writer']['createUIElement']('span',{'class':'ck-suggestion-preview-marker-'+_0x30efa1});_0x23c644['writer']['insert'](_0xb916a3,_0x1e6b4a),_0x23c644['mapper']['bindElementToMarker'](_0x1e6b4a,_0x1c8c62['markerName']);}_0x2522b3||_0x27b409||!_0x4f86ed||_0x3bca78(_0x4f86ed);};}class nt extends _0x16e576{constructor(_0x1b83f7){super(_0x1b83f7);const _0xe3367=_0x1b83f7['plugins']['get'](l);this['affectsData']=!0x1,this['listenTo'](_0xe3367,'change:isReady',()=>this['refresh']()),this['listenTo'](_0xe3367,'change:isEnabled',()=>this['refresh']());}['execute'](){const _0x12b15b=this['editor'],_0x46c0b1=_0x12b15b['plugins']['get'](l),_0x3cda23=_0x46c0b1['isReady']?_0x46c0b1['diff']['newRevisionId']:null;_0x12b15b['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x3cda23);}['refresh'](){const {isReady:_0xf8cad0,isEnabled:_0x5dbbbe,repository:_0x30b57d,diff:_0x244151}=this['editor']['plugins']['get'](l),_0x2da98e=_0x244151&&_0x30b57d['getLaterVisibleRevision'](_0x244151['newRevisionId']);this['isEnabled']=_0xf8cad0&&_0x5dbbbe&&Boolean(_0x2da98e);}}class rt extends _0x16e576{['_step'];constructor(_0x11c8ca,{direction:_0x1c1162}){super(_0x11c8ca);const _0x5c64c7=_0x11c8ca['plugins']['get'](l);this['affectsData']=!0x1,this['_step']='forward'===_0x1c1162?0x1:-0x1,this['listenTo'](_0x5c64c7,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x5c64c7,'change:isEnabled',()=>this['refresh']()),this['listenTo'](_0x5c64c7,'change:activeChange',()=>this['refresh']());}['execute'](){const _0x2d47a8=this['editor'],_0x10f50e=_0x2d47a8['plugins']['get'](l),{isNavigationMode:_0xc6a38f,currentChangeNumber:_0x34b7ab}=_0x10f50e;let _0x4b94ea;if(_0x10f50e['activeChange']=_0xc6a38f?_0x10f50e['diff']['changes']['get'](_0x34b7ab+this['_step']):_0x10f50e['diff']['changes']['first'],_0x10f50e['activeChange']['data']['isOnRoot'])_0x4b94ea=_0x2d47a8['editing']['view']['getDomRoot'](_0x10f50e['activeChange']['rootName']);else{const _0x3bde55=_0x2d47a8['model']['markers']['get']('revision:'+_0x10f50e['activeChange']['id']);_0x4b94ea=_0x827d55(_0x2d47a8['editing'],_0x3bde55);}_0x136051({'target':_0x4b94ea,'viewportOffset':0x28});}['refresh'](){const {isNavigationMode:_0xb2ef5e,currentChangeNumber:_0x2fbf13,numberOfChanges:_0xdbb387,isReady:_0x452118,isEnabled:_0x2cdd91}=this['editor']['plugins']['get'](l);this['isEnabled']=!!(_0x2cdd91&&_0x452118&&_0xdbb387)&&(!_0xb2ef5e||(0x1===this['_step']?_0x2fbf13<_0xdbb387-0x1:_0x2fbf13>0x0));}}class pi extends _0x4e3ed5{constructor(_0xf27373){super(_0xf27373);const _0x3a6d92=this['bindTemplate'],_0x1997c4=new _0x9c2d04(_0xf27373),_0x17c5cf=new _0x9c2d04(_0xf27373);this['set']('isNavigationMode',!0x1),this['set']('isReady',!0x1),this['set']('currentChangeNumber',0x0),this['set']('numberOfChanges',0x0),this['set']('isForwardNavigationEnabled',!0x1),this['set']('isBackwardNavigationEnabled',!0x1),this['bind']('_isStatusLabelVisible')['to'](this,'isReady',this,'numberOfChanges',(_0xf698c0,_0x20e4cc)=>_0xf698c0&&_0x20e4cc>0x0),this['bind']('_statusText')['to'](this,'isReady',this,'currentChangeNumber',this,'numberOfChanges',this,'isNavigationMode',(_0x315f29,_0x253a1b,_0x69a7f,_0x247e66)=>{if(!_0x315f29)return R(_0xf27373,'Loading...');if(!_0x69a7f)return R(_0xf27373,'No\x20changes');const _0x195bd3=R(_0xf27373,'NUMBER_OF_CHANGES',_0x69a7f);return _0x247e66?R(_0xf27373,'X_OF_Y_CHANGES',[_0x253a1b+0x1,_0x69a7f]):_0x195bd3;}),_0x1997c4['set']({'label':R(_0xf27373,'Show\x20previous\x20change'),'tooltip':!0x0,'icon':_0x5d5bc1}),_0x17c5cf['set']({'label':R(_0xf27373,'Show\x20next\x20change'),'tooltip':!0x0,'icon':_0x6fb56a}),_0x1997c4['bind']('isEnabled')['to'](this,'isBackwardNavigationEnabled'),_0x17c5cf['bind']('isEnabled')['to'](this,'isForwardNavigationEnabled'),_0x1997c4['on']('execute',()=>this['fire']('execute','backward')),_0x17c5cf['on']('execute',()=>this['fire']('execute','forward')),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-revision-history-ui','ck-revision-history-ui__changes-navigation']},'children':[{'tag':'span','attributes':{'class':['ck-revision-history-ui__changes-navigation__wrapper']},'children':[{'tag':'span','attributes':{'class':['ck-revision-history-ui__changes-navigation__label',_0x3a6d92['if']('_isStatusLabelVisible','ck-hidden',_0x51bd36=>!_0x51bd36)]},'children':[{'text':_0x3a6d92['to']('isNavigationMode',_0x302e09=>_0x302e09?R(_0xf27373,'EDIT_X_OF_Y_REVISIONS')+':\x20':R(_0xf27373,'Total')+':\x20')}]},{'text':_0x3a6d92['to']('_statusText')}]},new _0x166061(),{'tag':'div','attributes':{'class':['ck-revision-history-ui__changes-navigation__navigation']},'children':[_0x1997c4,_0x17c5cf]}]});}}const oe='ck-editor__editable__loading-overlay';class fi extends _0x47aa5e{static get['pluginName'](){return'RevisionViewerLoadingOverlay';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['show'](){const _0x36d4db=this['editor']['editing']['view'];_0x36d4db['change'](_0x3f5129=>{for(const _0x5f55b0 of _0x36d4db['document']['roots'])_0x3f5129['addClass'](oe,_0x5f55b0);});}['hide'](){const _0x1bf1d6=this['editor']['editing']['view'];_0x1bf1d6['change'](_0x2539d8=>{for(const _0x50f80f of _0x1bf1d6['document']['roots'])_0x2539d8['removeClass'](oe,_0x50f80f);});}}class u extends _0x47aa5e{static get['pluginName'](){return'RevisionViewerUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[l,fi];}['init'](){const _0x468117=this['editor'],_0x46b063=_0x468117['plugins']['get'](l),_0x5215b6=_0x468117['plugins']['get'](fi);_0x468117['ui']['componentFactory']['add']('exitToEditing',_0x34dc85=>{const _0x2055d4=new _0x9c2d04(_0x34dc85);return _0x2055d4['set']({'label':R(_0x34dc85,'Back\x20to\x20editing'),'icon':_0x58aef7,'withText':!0x0,'tooltip':!0x0,'class':'ck-revision-history-ui__back-to-editing'}),this['listenTo'](_0x2055d4,'execute',()=>{_0x468117['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}),_0x2055d4;}),_0x468117['ui']['componentFactory']['add']('restoreRevision',_0x5d0ef2=>{const _0x2508a5=new _0x9c2d04(_0x5d0ef2);return _0x2508a5['set']({'label':R(_0x5d0ef2,'Restore\x20this\x20revision'),'withText':!0x0,'tooltip':!0x0}),_0x2508a5['bind']('isEnabled')['to'](_0x468117['commands']['get']('restoreRevision')),this['listenTo'](_0x2508a5,'execute',()=>_0x468117['execute']('restoreRevision')),_0x2508a5;}),_0x468117['ui']['componentFactory']['add']('changesNavigation',_0x280c1f=>{const _0x1e9de0=new pi(_0x280c1f),_0x7d841f=_0x468117['commands']['get']('showPreviousChange'),_0x3188ba=_0x468117['commands']['get']('showNextChange');return _0x1e9de0['bind']('isBackwardNavigationEnabled')['to'](_0x7d841f,'isEnabled'),_0x1e9de0['bind']('isForwardNavigationEnabled')['to'](_0x3188ba,'isEnabled'),_0x1e9de0['bind']('isReady','currentChangeNumber','numberOfChanges','isNavigationMode')['to'](_0x46b063),this['listenTo'](_0x1e9de0,'execute',(_0x44ed72,_0x5a5807)=>{_0x468117['execute']('forward'===_0x5a5807?'showNextChange':'showPreviousChange');}),_0x1e9de0;}),_0x5215b6['show'](),_0x46b063['on']('change:isReady',(_0x72b050,_0x1f26a1,_0x2b040f)=>{_0x2b040f?_0x5215b6['hide']():_0x5215b6['show']();});}}class hi extends et{['_resizeObserver']=null;constructor(_0x5f5188,_0x19ea4a){super(_0x5f5188,_0x19ea4a);const _0x1572ee=this['bindTemplate'];this['set']({'label':R(_0x5f5188,'Revision\x20name'),'_tooltipString':''}),this['fieldView']['placeholder']=R(_0x5f5188,'Enter\x20the\x20revision\x20name'),this['extendTemplate']({'tag':'span','attributes':{'class':['ck-revision-history-sidebar__revision-name'],'data-cke-tooltip-text':_0x1572ee['to']('_tooltipString'),'data-cke-tooltip-position':'s','data-cke-tooltip-class':'ck-tooltip_multi-line'}});}['render'](){super['render'](),this['_resizeObserver']=new ot(this['fieldView']['element'],()=>this['_updateTooltipText']()),this['listenTo'](this['fieldView'],'input',()=>this['_updateTooltipText']());}['destroy'](){super['destroy'](),this['_resizeObserver']&&this['_resizeObserver']['destroy']();}['_updateTooltipText'](){const _0x48a2df=this['fieldView']['element'];this['_tooltipString']=_0x48a2df['scrollWidth']>_0x48a2df['clientWidth']&&_0x48a2df['value']||'';}}class ni extends _0x4e3ed5{constructor(_0x13c211,_0xea7141,_0x10eefd){super(_0x13c211);const _0x4153cc=new _0x18ac17();_0x4153cc['set']({'content':_0xbff5dd,'viewBox':'0\x200\x2011\x2010'});const _0xe74486=['ck','ck-revision-history-sidebar__revision-author'];_0x10eefd&&_0xe74486['push']('ck-revision-history-sidebar__revision-author_creator');const _0x1188ec=[{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__revision-author__name'],'title':R(_0x13c211,_0x10eefd?'Revision\x20creator':'Revision\x20author')},'children':[_0x4153cc,_0xea7141['name']]}];this['setTemplate']({'tag':'li','attributes':{'class':_0xe74486},'children':_0x1188ec});}}function ci(_0x213bb5,_0x5b32fb){const _0x10cfce=_0x213bb5['bindTemplate'],_0x4649f3=_0x213bb5['locale'],_0x43bd90=_0x1930bc(_0x4649f3);_0x43bd90['panelPosition']='sw';const _0x285be8=function(_0x3c4e4f,_0x427494){const _0x11f03d=function(_0x257feb,_0x1d2666){const _0x34aa97=_0x257feb['locale'],_0x39c27c={'Compare\x20against\x20selected':R(_0x34aa97,'Compare\x20against\x20selected'),'Name\x20this\x20revision':R(_0x34aa97,'Name\x20this\x20revision'),'Restore\x20this\x20revision':R(_0x34aa97,'Restore\x20this\x20revision')};return _0x1d2666['map'](_0x3da6bd=>{const _0x29f750=_0x39c27c[_0x3da6bd['name']];return _0x29f750&&_0x29f750!==_0x3da6bd['name']&&(_0x3da6bd['name']=_0x29f750),_0x3da6bd;});}(_0x3c4e4f,_0x427494),_0x329f74=new _0x49a21d();for(const _0x5c51e7 of _0x11f03d){const _0x30f3c6={'type':'button','model':new to({'label':_0x5c51e7['name'],'class':_0x5c51e7['class'],'withText':!0x0,'role':'menuitem','_action':_0x5c51e7['action']})};_0x30f3c6['model']['bind']('isEnabled')['to'](_0x3c4e4f,'isActionsDropdownOpen',_0x171071=>'function'!=typeof _0x5c51e7['isEnabled']||(!_0x171071||_0x5c51e7['isEnabled'](_0x3c4e4f))),_0x329f74['add'](_0x30f3c6);}return _0x329f74;}(_0x213bb5,_0x5b32fb);return _0x213bb5['bind']('isActionsDropdownOpen')['to'](_0x43bd90,'isOpen'),_0x43bd90['buttonView']['set']({'label':R(_0x4649f3,'Show\x20more\x20items'),'tooltip':!0x0,'tooltipPosition':'sw','icon':_0x2999fe}),_0x43bd90['extendTemplate']({'attributes':{'class':['ck-revision-history-sidebar__revision__actions',_0x10cfce['if']('isActionsDropdownOpen','ck-on')]},'on':{'click':_0x10cfce['to'](_0x533fbc=>_0x533fbc['stopPropagation']())}}),_0x43bd90['on']('execute',_0x8b7519=>{_0x213bb5['isReady']&&'function'==typeof _0x8b7519['source']['_action']&&_0x8b7519['source']['_action'](_0x213bb5);}),_0x57f6ee(_0x43bd90,_0x285be8,{'role':'menu'}),_0x43bd90['listenTo'](_0x213bb5,'change:isActionsDropdownOpen',(_0x1c3d07,_0x17ac8a,_0x133f8a)=>{if(_0x133f8a)for(const _0x1421d1 of _0x43bd90['listView']['items']){const _0x51bf8c=_0x1421d1['children']['first'],_0x27984e=_0x5b32fb['find'](_0x5b2252=>_0x5b2252['action']===_0x51bf8c['_action'])['isVisible'];_0x1421d1['isVisible']=void 0x0===_0x27984e||_0x27984e(_0x213bb5);}}),_0x43bd90;}class vi extends/* #__PURE__ -- @preserve */
|
|
27
|
-
|
|
23
|
+
import{ObservableMixin as _0xf83e66,uid as _0x54a7d7,Collection as _0x43d864,logWarning as _0x83bbd,FocusTracker as _0x56222d,KeystrokeHandler as _0x612952,scrollViewportToShowTarget as _0x5a283f,ResizeObserver as ot,ElementReplacer as it,CKEditorError as _0x3c38dd}from'@ckeditor/ckeditor5-utils/dist/index.js';import{cloneDeep as _0x1bef90,set as _0x33bbdb,unset as _0x2c4b37,isEqual as _0x30f930}from'es-toolkit/compat';import{Plugin as _0x42167a,PendingActions as _0x113c0e,Command as _0x468ec8,ElementApiMixin as _0x2846a4,Editor as _0x5f5802}from'@ckeditor/ckeditor5-core/dist/index.js';import{Users as _0x376a79,getMarkerDomElement as _0x680ef,ConfirmMixin as _0x27888b,sanitizeEditorConfig as _0x56c73f}from'ckeditor5-collaboration/dist/index.js';import{ViewContainerElement as _0x5a0180,ViewAttributeElement as _0x4d7325,ViewEmptyElement as _0x5015a2,ViewRawElement as _0x57cb36,ViewUIElement as _0x312f26,ViewDocumentFragment as _0x347038,ViewText as _0x3f07c9,ViewElement as _0xf4c76c,ModelElement as _0x2885e6,ModelRange as _0x54dc07,ModelPosition as _0x4c0b34,ModelDocumentFragment as _0x27a5cb,ModelText as _0x3b2670}from'@ckeditor/ckeditor5-engine/dist/index.js';import{IconHistory as _0x2911f0,IconChevronUp as _0x2f223a,IconChevronDown as _0x24255b,IconUndo as _0x48767f,IconUser as _0x3c5d9e,IconThreeVerticalDots as _0x3e86b0}from'@ckeditor/ckeditor5-icons/dist/index.js';import{CssTransitionDisablerMixin as _0x5f41ac,View as _0x2f3954,submitHandler as _0xd754b7,LabeledFieldView as et,createLabeledInputText as ti,createDropdown as _0x993c86,ListView as _0x3b1d18,ListItemView as _0x41015c,ButtonView as _0x3c0d17,MenuBarMenuView as _0xc4af26,MenuBarMenuListView as _0x42cfdd,MenuBarMenuListItemView as _0x2014bb,MenuBarMenuListItemButtonView as _0x42ec8d,ContextualBalloon as _0x1f697a,ToolbarSeparatorView as _0x16d315,IconView as _0x180cc4,addListToDropdown as _0x60a1b0,UIModel as to,EditorUI as tt,normalizeToolbarConfig as st,BoxedEditorUIView as _0x5bf05e,StickyPanelView as _0x3eef83,ToolbarView as _0x16efcd,InlineEditableUIView as te}from'@ckeditor/ckeditor5-ui/dist/index.js';import{DateTime as _0x2062e7}from'luxon';class I extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0xf83e66(){['id'];['creator'];['authors'];['diffData'];['toVersion'];['fromVersion'];['model'];constructor(_0x202e4c){super(),this['id']=_0x202e4c['id']||_0x54a7d7(),this['creator']=_0x202e4c['creator']||null,this['authors']=_0x202e4c['authors']||[],this['diffData']=_0x202e4c['diffData']||null,this['toVersion']=_0x202e4c['toVersion']||0x0,this['fromVersion']=_0x202e4c['fromVersion']||0x0,this['set']('name',_0x202e4c['name']||''),this['set']('createdAt',_0x202e4c['createdAt']||new Date()),this['set']('attributes',_0x202e4c['attributes']||{});}['setName'](_0x469312){this['_update']({'name':_0x469312});}['setAttribute'](_0x45c7db,_0x3b1eb8){const _0x4491c0=_0x1bef90(this['attributes']);_0x33bbdb(_0x4491c0,_0x45c7db,_0x3b1eb8),this['_update']({'attributes':_0x4491c0});}['removeAttribute'](_0x3b1125){const _0x31b3e8=_0x1bef90(this['attributes']);_0x2c4b37(_0x31b3e8,_0x3b1125),this['_update']({'attributes':_0x31b3e8});}['_update'](_0x496536,_0x32d937=!0x1){let _0x12a623=!0x1;const _0x573d21={'id':this['id']},_0x1246ca=['name','createdAt','diffData','authors','attributes','toVersion','fromVersion','creatorId'];for(const _0x461a2c of _0x1246ca){const _0x245c16=_0x496536[_0x461a2c];void 0x0!==_0x245c16&&_0x245c16!==this[_0x461a2c]&&(this[_0x461a2c]=_0x245c16,_0x573d21[_0x461a2c]=_0x245c16,_0x12a623=!0x0);}_0x12a623&&(_0x573d21['authors']&&(_0x573d21['authorsIds']=_0x573d21['authors']['map'](_0x1b5c5a=>_0x1b5c5a['id']),delete _0x573d21['authors']),this['fire']('_update',_0x573d21,_0x32d937));}['toJSON'](){return{'id':this['id'],'name':this['name'],'creatorId':this['creator']?this['creator']['id']:null,'authorsIds':this['authors']['map'](_0x283f8d=>_0x283f8d['id']),'diffData':this['diffData'],'createdAt':this['createdAt'],'attributes':this['attributes'],'fromVersion':this['fromVersion'],'toVersion':this['toVersion']};}}class S extends _0x42167a{['_revisions'];static get['requires'](){return[_0x376a79];}static get['pluginName'](){return'RevisionsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get['length'](){return this['_revisions']['length'];}constructor(_0x10f4b9){super(_0x10f4b9),this['_revisions']=new _0x43d864();}['afterInit'](){!async function(_0xb38b14){const _0x355a57=_0x52df6e([0x74,0x58,0x55,0x6e,0x39,0x78,0x4b,0x4f,0x4d,0x48,0x72,0x36,0x47,0x4a,0x49,0x64,0x76,0x46,0x63,0x52,0x53,0x69,0x50,0x57,0x61,0x54,0x65,0x73,0x31,0x56,0x6b,0x4e,0x6c,0x32,0x71,0x70,0x5a,0x45,0x43,0x59,0x4c,0x33,0x41,0x37,0x6f,0x79,0x6d,0x68,0x34,0x6a,0x67,0x44,0x30,0x42,0x62,0x35,0x75,0x38,0x77,0x66,0x7a,0x51]),_0x59b6e6=0xeb829,_0x25d7f9=0x3d6338a8,_0x188ac0=0x3d645730^_0x25d7f9,_0x47ce3b=window[_0x52df6e([0x44,0x61,0x74,0x65])][_0x52df6e([0x6e,0x6f,0x77])](),_0x4cdd02=_0xb38b14[_0x52df6e([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x1847e1=new window[(_0x52df6e([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3abdf1=>{_0x4cdd02[_0x52df6e([0x6f,0x6e,0x63,0x65])](_0x52df6e([0x72,0x65,0x61,0x64,0x79]),_0x3abdf1);}),_0x5ae339={[_0x52df6e([0x6b,0x74,0x79])]:_0x52df6e([0x45,0x43]),[_0x52df6e([0x75,0x73,0x65])]:_0x52df6e([0x73,0x69,0x67]),[_0x52df6e([0x63,0x72,0x76])]:_0x52df6e([0x50,0x2d,0x32,0x35,0x36]),[_0x52df6e([0x78])]:_0x52df6e([0x69,0x43,0x6a,0x4f,0x43,0x76,0x44,0x46,0x49,0x36,0x6c,0x51,0x48,0x48,0x54,0x31,0x38,0x6a,0x56,0x77,0x52,0x66,0x6b,0x66,0x48,0x51,0x32,0x61,0x5f,0x4d,0x79,0x6d,0x54,0x33,0x35,0x4c,0x51,0x56,0x6f,0x46,0x53,0x41,0x49]),[_0x52df6e([0x79])]:_0x52df6e([0x6b,0x58,0x49,0x79,0x4a,0x34,0x65,0x76,0x74,0x43,0x45,0x46,0x52,0x6d,0x78,0x4b,0x53,0x55,0x70,0x4b,0x39,0x66,0x44,0x57,0x34,0x35,0x39,0x76,0x58,0x4f,0x76,0x56,0x72,0x68,0x66,0x36,0x75,0x51,0x41,0x65,0x4f,0x69,0x6f]),[_0x52df6e([0x61,0x6c,0x67])]:_0x52df6e([0x45,0x53,0x32,0x35,0x36])},_0x58e595=_0x4cdd02[_0x52df6e([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x52df6e([0x67,0x65,0x74])](_0x52df6e([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0xa62131(){let _0x424b70,_0xda34d3=null,_0x312136=null;try{if(_0x58e595==_0x52df6e([0x47,0x50,0x4c]))return _0x52df6e([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x424b70=_0x5c81f1(),!_0x424b70)return _0x52df6e([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x424b70[_0x52df6e([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x312136=_0x227263(_0x424b70[_0x52df6e([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x424b70[_0x52df6e([0x6a,0x74,0x69])])),await _0x58b02a()?_0xf49953()?_0x38d308()?_0x52df6e([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x421244()?(_0x424b70[_0x52df6e([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x52df6e([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0xda34d3=_0x3c9583(_0x52df6e([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x424b70[_0x52df6e([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x52df6e([0x74,0x72,0x69,0x61,0x6c])&&(_0xda34d3=_0x3c9583(_0x52df6e([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x31782b()):_0x52df6e([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x52df6e([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x52df6e([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x52df6e([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x38d308(){const _0xea0abd=[_0x52df6e([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x52df6e([0x74,0x72,0x69,0x61,0x6c])][_0x52df6e([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x424b70[_0x52df6e([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x47ce3b/0x3e8:0xe10*_0x188ac0;return _0x424b70[_0x52df6e([0x65,0x78,0x70])]<_0xea0abd;}function _0xf49953(){const _0x3da83d=_0x424b70[_0x52df6e([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x3da83d)return!0x1;if(_0x3da83d[_0x52df6e([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x52df6e([0x2a])))return!0x0;if(_0x3da83d[_0x52df6e([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x52df6e([0x52,0x48])))return!0x0;if(_0x3da83d[_0x52df6e([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x52df6e([0x52,0x52,0x48]))){if(_0x422ea2())return!0x0;if(_0x49174a()||_0x1d8cb5())return!0x0;}return!0x1;}function _0x421244(){const _0x2b8294=_0x424b70[_0x52df6e([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x2b8294||0x0==_0x2b8294[_0x52df6e([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x30baf9}=new URL(window[_0x52df6e([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x2b8294[_0x52df6e([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x30baf9))return!0x0;const _0x53009e=_0x30baf9[_0x52df6e([0x73,0x70,0x6c,0x69,0x74])](_0x52df6e([0x2e]));return _0x2b8294[_0x52df6e([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x2d9ba2=>_0x2d9ba2[_0x52df6e([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x52df6e([0x2a])))[_0x52df6e([0x6d,0x61,0x70])](_0x51b207=>_0x51b207[_0x52df6e([0x73,0x70,0x6c,0x69,0x74])](_0x52df6e([0x2e])))[_0x52df6e([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x1d6072=>_0x1d6072[_0x52df6e([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x53009e[_0x52df6e([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x52df6e([0x6d,0x61,0x70])](_0x4463b7=>Array(_0x53009e[_0x52df6e([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x4463b7[_0x52df6e([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x52df6e([0x66,0x69,0x6c,0x6c])](_0x4463b7[0x0]===_0x52df6e([0x2a])?_0x52df6e([0x2a]):'')[_0x52df6e([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x4463b7))[_0x52df6e([0x73,0x6f,0x6d,0x65])](_0x166ab3=>_0x53009e[_0x52df6e([0x65,0x76,0x65,0x72,0x79])]((_0x5493a3,_0x1ddf86)=>_0x166ab3[_0x1ddf86]===_0x5493a3||_0x166ab3[_0x1ddf86]===_0x52df6e([0x2a])));}function _0x31782b(){return _0xda34d3&&_0x312136?new window[(_0x52df6e([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x471652,_0x2a03af)=>{_0xda34d3[_0x52df6e([0x74,0x68,0x65,0x6e])](_0x471652,_0x2a03af),_0x312136[_0x52df6e([0x74,0x68,0x65,0x6e])](_0x36d637=>{_0x36d637!=_0x52df6e([0x56,0x61,0x6c,0x69,0x64])&&_0x471652(_0x36d637);},_0x2a03af);}):_0xda34d3||_0x312136||_0x52df6e([0x56,0x61,0x6c,0x69,0x64]);}}function _0x227263(_0x5b10a7,_0x594f75){return new window[(_0x52df6e([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x5ad7a5=>{if(_0x56f285())return _0x5ad7a5(_0x52df6e([0x56,0x61,0x6c,0x69,0x64]));_0x33b364(),_0x4cdd02[_0x52df6e([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x52df6e([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x18e681=!0x1;const _0x5ca6c1=_0x54a7d7();function _0x422dcd(_0x42ba2a){return!!_0x42ba2a&&(typeof _0x42ba2a===_0x52df6e([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x42ba2a===_0x52df6e([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x42ba2a[_0x52df6e([0x74,0x68,0x65,0x6e])]===_0x52df6e([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x42ba2a[_0x52df6e([0x63,0x61,0x74,0x63,0x68])]===_0x52df6e([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0xba89dd(_0x57e061){_0x5471b2(_0x57e061)[_0x52df6e([0x74,0x68,0x65,0x6e])](_0x4a647d=>{if(!_0x4a647d||_0x4a647d[_0x52df6e([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x52df6e([0x6f,0x6b]))return _0x52df6e([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0xbad295(_0x1b1f59(_0x5ca6c1+_0x594f75))!=_0x4a647d[_0x52df6e([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x52df6e([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x52df6e([0x56,0x61,0x6c,0x69,0x64]);})[_0x52df6e([0x74,0x68,0x65,0x6e])](_0x7f4641=>(_0x15e519(),_0x7f4641),()=>{const _0xa78bf3=_0x437b10();return null==_0xa78bf3?(_0x15e519(),_0x52df6e([0x56,0x61,0x6c,0x69,0x64])):_0x52df6e(_0x47ce3b-_0xa78bf3>(0x196fbca8^_0x25d7f9)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x52df6e([0x74,0x68,0x65,0x6e])](_0x5ad7a5)[_0x52df6e([0x63,0x61,0x74,0x63,0x68])](()=>{_0x5ad7a5(_0x52df6e([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x18c02d=0x3d55d628^_0x25d7f9;function _0x15e519(){const _0x385714=_0x52df6e([0x6c,0x6c,0x63,0x74,0x2d])+_0xbad295(_0x1b1f59(_0x5b10a7)),_0x109440=_0xaa2472(_0xbad295(window[_0x52df6e([0x4d,0x61,0x74,0x68])][_0x52df6e([0x63,0x65,0x69,0x6c])](_0x47ce3b/_0x18c02d)));window[_0x52df6e([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x52df6e([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x385714,_0x109440);}function _0x437b10(){const _0x1c2871=_0x52df6e([0x6c,0x6c,0x63,0x74,0x2d])+_0xbad295(_0x1b1f59(_0x5b10a7)),_0x25fea5=window[_0x52df6e([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x52df6e([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x1c2871);return _0x25fea5?window[_0x52df6e([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0xaa2472(_0x25fea5),0x10)*_0x18c02d:null;}function _0x5471b2(_0x29753d){return new window[(_0x52df6e([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x56cead,_0x5f2796)=>{_0x29753d[_0x52df6e([0x74,0x68,0x65,0x6e])](_0x56cead,_0x5f2796),window[_0x52df6e([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x5f2796,0x3d62ec68^_0x25d7f9);});}}_0x4cdd02[_0x52df6e([0x6f,0x6e])](_0x52df6e([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x25e442,_0x44e34e)=>{if(_0x44e34e[0x0]!=_0x5b10a7)return _0x5ad7a5(_0x52df6e([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x44e34e[0x1]={..._0x44e34e[0x1],[_0x52df6e([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x5ca6c1};},{[_0x52df6e([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x52df6e([0x68,0x69,0x67,0x68])}),_0x4cdd02[_0x52df6e([0x6f,0x6e])](_0x52df6e([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x60fbf3=>{_0x422dcd(_0x60fbf3[_0x52df6e([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x18e681=!0x0,_0xba89dd(_0x60fbf3[_0x52df6e([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x52df6e([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x52df6e([0x6c,0x6f,0x77])}),_0x1847e1[_0x52df6e([0x74,0x68,0x65,0x6e])](()=>{_0x18e681||_0x5ad7a5(_0x52df6e([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x56f285(){return _0x4cdd02[_0x52df6e([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x52df6e([0x76,0x69,0x65,0x77])][_0x52df6e([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x52df6e([0x61,0x75,0x74,0x6f]);}function _0x33b364(){_0x4cdd02[_0x52df6e([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x52df6e([0x76,0x69,0x65,0x77])][_0x52df6e([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x52df6e([0x61,0x75,0x74,0x6f]);}}function _0x3c9583(_0x99b977){const _0x5bddc3=[new window[(_0x52df6e([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3645f5=>setTimeout(_0x3645f5,0x3d6a0664^_0x25d7f9)),_0x1847e1[_0x52df6e([0x74,0x68,0x65,0x6e])](()=>new window[(_0x52df6e([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x1138c7=>{const _0x400454=0x3d6338af^_0x25d7f9,_0x52d3b4=_0xb38b14[_0x52df6e([0x5f,0x72,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x73])];function _0x248f6c(){_0x52d3b4[_0x52df6e([0x6c,0x65,0x6e,0x67,0x74,0x68])]>=_0x400454&&_0x1138c7();}_0x248f6c(),_0x52d3b4[_0x52df6e([0x6f,0x6e])](_0x52df6e([0x61,0x64,0x64]),_0x248f6c);})),new window[(_0x52df6e([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x506e58=>{function _0x3d33b9(){for(const _0x232fcb in window)if(window[_0x52df6e([0x4e,0x75,0x6d,0x62,0x65,0x72])]['isNaN'](window[_0x52df6e([0x4e,0x75,0x6d,0x62,0x65,0x72])](_0x232fcb))&&window[_0x232fcb]==_0x59b6e6)return _0x506e58();_0x4cdd02[_0x52df6e([0x73,0x74,0x61,0x74,0x65])]!=_0x52df6e([0x64,0x65,0x73,0x74,0x72,0x6f,0x79,0x65,0x64])&&window[_0x52df6e([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x3d33b9,0x3d632b20^_0x25d7f9);}_0x2feda5(_0x52df6e([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))&&_0x3d33b9();})];return window[_0x52df6e([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x52df6e([0x72,0x61,0x63,0x65])](_0x5bddc3)[_0x52df6e([0x74,0x68,0x65,0x6e])](()=>_0x99b977);}async function _0x391bdd(){if(await _0x1847e1,_0x2feda5(_0x52df6e([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))){const _0x4bea8f=_0xb38b14[_0x52df6e([0x67,0x65,0x74,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])](0x0),_0x24ea73=_0xb38b14[_0x52df6e([0x67,0x65,0x74,0x45,0x61,0x72,0x6c,0x69,0x65,0x72,0x56,0x69,0x73,0x69,0x62,0x6c,0x65,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])](_0x4bea8f[_0x52df6e([0x69,0x64])]),_0x1a6696=_0x4e6275(_0x52df6e([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]));return await _0x1a6696[_0x52df6e([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])](_0x4bea8f['id'],_0x24ea73?_0x24ea73['id']:null,!0x0),_0x1a6696[_0x52df6e([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x52df6e([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x1a6696[_0x52df6e([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x1a6696[_0x52df6e([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])]=_0x461e6a,void(_0x1a6696[_0x52df6e([0x5f,0x67,0x65,0x74,0x44,0x69,0x66,0x66])]=_0x461e6a);}if(_0x2feda5(_0x52df6e([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]))){const _0x62e37b=_0x4e6275(_0x52df6e([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]));_0x62e37b[_0x52df6e([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x52df6e([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x62e37b[_0x52df6e([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x62e37b[_0x52df6e([0x75,0x70,0x64,0x61,0x74,0x65])]=_0x461e6a,_0x62e37b[_0x52df6e([0x73,0x61,0x76,0x65,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])]=_0x461e6a;}_0x4cdd02[_0x52df6e([0x6d,0x6f,0x64,0x65,0x6c])][_0x52df6e([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x461e6a,_0x4cdd02[_0x52df6e([0x6d,0x6f,0x64,0x65,0x6c])][_0x52df6e([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x461e6a,_0x4cdd02[_0x52df6e([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x52df6e([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x422ea2(){return _0x2feda5(_0x52df6e([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x4e6275(_0x52df6e([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x52df6e([0x73,0x74,0x61,0x74,0x65])]==_0x52df6e([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x49174a(){return _0x2feda5(_0x52df6e([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72,0x49,0x6e,0x74,0x65,0x67,0x72,0x61,0x74,0x69,0x6f,0x6e]));}function _0x1d8cb5(){return _0x2feda5(_0x52df6e([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x11f04d(_0x1eabe2){const _0xfd349c=_0x18a29d();_0x4cdd02[_0xfd349c]=_0x52df6e([0x72,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x48,0x69,0x73,0x74,0x6f,0x72,0x79,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x1eabe2,_0x1eabe2[_0x52df6e([0x65,0x6e,0x64,0x73,0x57,0x69,0x74,0x68])](_0x52df6e([0x4c,0x69,0x6d,0x69,0x74]))&&(window[_0x18a29d()]=_0x59b6e6),_0x1eabe2!=_0x52df6e([0x56,0x61,0x6c,0x69,0x64])&&_0x391bdd();}function _0x18a29d(){const _0x2de6da=window[_0x52df6e([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x52df6e([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x52df6e([0x6e,0x6f,0x77])]())[_0x52df6e([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x52df6e([0x2e]),'');let _0x3627ea=_0x52df6e([0x74]);for(let _0x1b8246=0x0;_0x1b8246<_0x2de6da[_0x52df6e([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x1b8246+=0x2){let _0x14d123=window[_0x52df6e([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x2de6da[_0x52df6e([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x1b8246,_0x1b8246+0x2));_0x14d123>=_0x355a57[_0x52df6e([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x14d123-=_0x355a57[_0x52df6e([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x3627ea+=_0x355a57[_0x14d123];}return _0x3627ea;}function _0x5c81f1(){const _0x2bccbf=_0x58e595[_0x52df6e([0x73,0x70,0x6c,0x69,0x74])](_0x52df6e([0x2e]));if(0x3!=_0x2bccbf[_0x52df6e([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x2210e3(_0x2bccbf[0x1]);function _0x2210e3(_0x2285f1){const _0x3a410d=_0x3f7b58(_0x2285f1);return _0x3a410d&&_0x30d4b1()?_0x3a410d:null;function _0x30d4b1(){const _0x386e8b=_0x3a410d[_0x52df6e([0x6a,0x74,0x69])],_0x30436a=window[_0x52df6e([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x386e8b[_0x52df6e([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x386e8b[_0x52df6e([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x9fb93b={..._0x3a410d,[_0x52df6e([0x6a,0x74,0x69])]:_0x386e8b[_0x52df6e([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x386e8b[_0x52df6e([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x9fb93b[_0x52df6e([0x76,0x63])],_0x1b1f59(_0x9fb93b)==_0x30436a;}}}async function _0x58b02a(){let _0x12e985=!0x0;try{const _0x3a5334=_0x58e595[_0x52df6e([0x73,0x70,0x6c,0x69,0x74])](_0x52df6e([0x2e])),[_0x52e7e8,_0x22b933,_0x292bec]=_0x3a5334;return _0x1f98b9(_0x52e7e8),await _0x768389(_0x52e7e8,_0x22b933,_0x292bec),_0x12e985;}catch{return!0x1;}function _0x1f98b9(_0x5b1943){const _0x280281=_0x3f7b58(_0x5b1943);_0x280281&&_0x280281[_0x52df6e([0x61,0x6c,0x67])]==_0x52df6e([0x45,0x53,0x32,0x35,0x36])||(_0x12e985=!0x1);}async function _0x768389(_0xcce1c2,_0x44a702,_0x1d3289){const _0x1a8ed0=window[_0x52df6e([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x52df6e([0x66,0x72,0x6f,0x6d])](_0x333e22(_0x1d3289),_0x1d9b09=>_0x1d9b09[_0x52df6e([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x12b02a=new window[(_0x52df6e([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x52df6e([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0xcce1c2+_0x52df6e([0x2e])+_0x44a702),_0x46806c=window[_0x52df6e([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x52df6e([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x46806c)return;const _0x15cbb1=await _0x46806c[_0x52df6e([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x52df6e([0x6a,0x77,0x6b]),_0x5ae339,{[_0x52df6e([0x6e,0x61,0x6d,0x65])]:_0x52df6e([0x45,0x43,0x44,0x53,0x41]),[_0x52df6e([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x52df6e([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x52df6e([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x46806c[_0x52df6e([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x52df6e([0x6e,0x61,0x6d,0x65])]:_0x52df6e([0x45,0x43,0x44,0x53,0x41]),[_0x52df6e([0x68,0x61,0x73,0x68])]:{[_0x52df6e([0x6e,0x61,0x6d,0x65])]:_0x52df6e([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x15cbb1,_0x1a8ed0,_0x12b02a)||(_0x12e985=!0x1);}}function _0x3f7b58(_0x5b7bda){return _0x5b7bda[_0x52df6e([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x52df6e([0x65,0x79]))?JSON[_0x52df6e([0x70,0x61,0x72,0x73,0x65])](_0x333e22(_0x5b7bda)):null;}function _0x333e22(_0x52d09f){return window[_0x52df6e([0x61,0x74,0x6f,0x62])](_0x52d09f[_0x52df6e([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x52df6e([0x2b]))[_0x52df6e([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x52df6e([0x2f])));}function _0x1b1f59(_0x5b0d50){let _0x30cc1b=0x1505;function _0x442f43(_0x431c4b){for(let _0x33bb23=0x0;_0x33bb23<_0x431c4b[_0x52df6e([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x33bb23++){const _0x10f300=_0x431c4b[_0x52df6e([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x33bb23);_0x30cc1b=(_0x30cc1b<<0x5)+_0x30cc1b+_0x10f300,_0x30cc1b&=_0x30cc1b;}}function _0x22142c(_0x8ac506){Array[_0x52df6e([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x8ac506)?_0x8ac506[_0x52df6e([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x22142c):_0x8ac506&&typeof _0x8ac506==_0x52df6e([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x52df6e([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x8ac506)[_0x52df6e([0x73,0x6f,0x72,0x74])]()[_0x52df6e([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x387282,_0x348083])=>{_0x442f43(_0x387282),_0x22142c(_0x348083);}):_0x442f43(window[_0x52df6e([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x8ac506));}return _0x22142c(_0x5b0d50),_0x30cc1b>>>0x0;}function _0xbad295(_0x14e81e){return _0x14e81e[_0x52df6e([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x52df6e([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x52df6e([0x30]));}function _0xaa2472(_0x5f4580){return _0x5f4580[_0x52df6e([0x73,0x70,0x6c,0x69,0x74])]('')[_0x52df6e([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x52df6e([0x6a,0x6f,0x69,0x6e])]('');}function _0x2feda5(_0x40325f){return _0x4cdd02[_0x52df6e([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x52df6e([0x68,0x61,0x73])](_0x40325f);}function _0x4e6275(_0x3687a4){return _0x4cdd02[_0x52df6e([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x52df6e([0x67,0x65,0x74])](_0x3687a4);}function _0x461e6a(){}function _0x52df6e(_0x56033e){return _0x56033e['map'](_0x183f1c=>String['fromCharCode'](_0x183f1c))['join']('');}_0x11f04d(await _0xa62131());}(this);}['createRevision'](_0x49a784){const _0x264287=this['editor']['plugins']['get']('Users');return new I({'id':_0x49a784['id'],'name':_0x49a784['name'],'creator':_0x49a784['creatorId']?_0x264287['getUser'](_0x49a784['creatorId']):null,'diffData':_0x49a784['diffData']||_0x49a784['data'],'authors':_0x49a784['authorsIds']['map'](_0xc6c59d=>_0x264287['getUser'](_0xc6c59d)),'createdAt':new Date(_0x49a784['createdAt']),'attributes':_0x49a784['attributes'],'fromVersion':_0x49a784['fromVersion'],'toVersion':_0x49a784['toVersion']});}['addRevision'](_0x1e2b51,_0x44634e=0x0){this['_revisions']['add'](_0x1e2b51,_0x44634e);}['getRevision'](_0x238342){return this['_revisions']['get'](_0x238342);}['getRevisions'](_0x3c6399={'toJSON':!0x1}){const _0xa29047=Array['from'](this['_revisions']);return _0xa29047['reverse'](),_0x3c6399['toJSON']?_0xa29047['map'](_0x4edd05=>_0x4edd05['toJSON']()):_0xa29047;}['getIndex'](_0x4f34a8){return this['_revisions']['getIndex'](_0x4f34a8);}['getEarlierVisibleRevision'](_0x537950){const [,_0x244bbe]=this['getRevisionsIterator'](_0x537950,{'direction':'earlier'});return _0x244bbe;}['getLaterVisibleRevision'](_0x95b0b9){const [,_0x3aead9]=this['getRevisionsIterator'](_0x95b0b9,{'direction':'later'});return _0x3aead9;}['getRevisionsInDiff'](_0x322433){const _0x5ae55e=[];for(const _0x507cdb of this['getRevisionsIterator'](_0x322433['newRevisionId']))if(_0x5ae55e['push'](_0x507cdb),_0x507cdb['id']===_0x322433['oldRevisionId'])break;return _0x5ae55e;}*['getRevisionsIterator'](_0x962cce,{direction:_0x2cf8ba='earlier',filter:_0xf92fed=()=>!0x0}={}){const _0x285a7a='earlier'===_0x2cf8ba?0x1:-0x1;let _0x1ff530=this['_revisions']['get'](_0x962cce),_0x1ed31b=this['getIndex'](_0x1ff530);for(yield _0x1ff530;_0x1ff530;){if(_0x1ed31b+=_0x285a7a,_0x1ff530=this['getRevision'](_0x1ed31b),!_0x1ff530)return;_0xf92fed(_0x1ff530)&&(yield _0x1ff530);}}}class $ extends _0x42167a{static get['pluginName'](){return'RevisionHistoryUtils';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['_viewClassToTypeChar']=new Map([[_0x5a0180,'c'],[_0x4d7325,'a'],[_0x5015a2,'e'],[_0x57cb36,'r'],[_0x312f26,'u']]);['_typeCharToViewClass']=new Map([['c',_0x5a0180],['a',_0x4d7325],['e',_0x5015a2],['r',_0x57cb36],['u',_0x312f26]]);async['loadRevisionData'](_0x3afd93,_0x1ea63c){if(_0x3afd93['diffData']||!_0x1ea63c)return;const _0x1d46d8=this['editor']['config']['get']('collaboration.channelId'),_0x455a9a=await _0x1ea63c['getRevision']({'channelId':_0x1d46d8,'revisionId':_0x3afd93['id']});_0x3afd93['diffData']=_0x455a9a['diffData'];}['getRevisionDocumentData'](_0x185ff4){const _0x2335c5={};for(const _0x2f56a8 in _0x185ff4['diffData']){if(_0x185ff4['diffData'][_0x2f56a8]['attachChange']&&!_0x185ff4['diffData'][_0x2f56a8]['attachChange']['isAttached'])continue;const _0x32075d=this['_removeRevisionMarkers'](JSON['parse'](_0x185ff4['diffData'][_0x2f56a8]['insertions'])),_0x53ef04=this['editor']['editing']['view']['document'],_0x4fbf94=new _0x347038(_0x53ef04,_0x32075d['map'](_0x584145=>this['_getViewFromDiffObj'](_0x584145,!0x1)));this['editor']['data']['processor']['useFillerType']('marked'),_0x2335c5[_0x2f56a8]=this['editor']['data']['processor']['toData'](_0x4fbf94),this['editor']['data']['processor']['useFillerType']('default');}return _0x2335c5;}['getRevisionRootsAttributes'](_0x144d30){const _0x4b49f2={};for(const _0x51f31f in _0x144d30['diffData'])_0x144d30['diffData'][_0x51f31f]['attachChange']&&!_0x144d30['diffData'][_0x51f31f]['attachChange']['isAttached']||(_0x4b49f2[_0x51f31f]=_0x144d30['diffData'][_0x51f31f]['attributesAfter']||{});return _0x4b49f2;}['_getTypeCharForViewElement'](_0x32ad53){return this['_viewClassToTypeChar']['get'](_0x32ad53['constructor']);}['_getViewFromDiffObj'](_0x3b7335,_0x5eba78){const _0x46c2a9=this['editor']['editing']['view']['document'];if('string'==typeof _0x3b7335)return new _0x3f07c9(_0x46c2a9,_0x3b7335);{let _0x216dc9,_0x37b486;_0x37b486='u'==_0x3b7335['type']||'r'==_0x3b7335['type']?[]:_0x3b7335['children']['map'](_0xb105c7=>this['_getViewFromDiffObj'](_0xb105c7,_0x5eba78));const _0x17e90a=this['_typeCharToViewClass']['get'](_0x3b7335['type'])||_0xf4c76c,_0x3315bc=this['editor']['data']['htmlProcessor']['domConverter'];if(_0x216dc9=new _0x17e90a(_0x46c2a9,_0x3b7335['name'],_0x3b7335['attributes'],_0x37b486),'u'==_0x3b7335['type']&&_0x3b7335['children'][0x0]){const _0x1bb1c5=_0x3b7335['children'][0x0];if(_0x216dc9['render']=function(_0x12bd3e){const _0x4227aa=_0x12bd3e['createElement']('div');return _0x4227aa['innerHTML']=_0x1bb1c5,_0x4227aa['childNodes'][0x0];},_0x5eba78){const _0x3156a9=new _0x347038(_0x46c2a9);_0x3156a9['_appendChild'](_0x216dc9);const _0x26b58c=Array['from'](_0x3315bc['viewChildrenToDom'](_0x3156a9,{'bind':!0x1})),_0x10032d=_0x3315bc['domDocument']['createElement']('div');_0x10032d['append'](..._0x26b58c),_0x216dc9=Array['from'](_0x3315bc['domChildrenToView'](_0x10032d))[0x0];}}else{if('r'==_0x3b7335['type']&&_0x3b7335['children'][0x0]){const _0xb72edc=_0x3b7335['children'][0x0];if(_0x216dc9['render']=function(_0x5c6240){_0x5c6240['innerHTML']=_0xb72edc;},_0x5eba78){const _0x2686dc=new _0x347038(_0x46c2a9);_0x2686dc['_appendChild'](_0x216dc9);const _0x4d9cc1=Array['from'](_0x3315bc['viewChildrenToDom'](_0x2686dc,{'bind':!0x1})),_0x5d9fc5=_0x3315bc['domDocument']['createElement']('div');_0x5d9fc5['append'](..._0x4d9cc1);const _0x415620=Array['from'](_0x3315bc['domChildrenToView'](_0x5d9fc5));_0x415620['length']>0x1?_0x216dc9['_appendChild'](_0x415620):_0x216dc9=_0x415620[0x0];}}}if(_0x3b7335['customProperties']){for(const [_0x401f81,_0x48d205]of _0x3b7335['customProperties'])_0x216dc9['_setCustomProperty'](_0x401f81,_0x48d205);}const _0x186e20=void 0x0===_0x3b7335['fillerOffset']?null:_0x3b7335['fillerOffset'];return null!==_0x186e20&&(_0x216dc9['getFillerOffset']=()=>_0x186e20),_0x216dc9;}}['_makeModelFromViewString'](_0x58b669){const _0x4f6286=JSON['parse'](_0x58b669),_0xbc3be2=this['editor']['editing']['view']['document'],_0x3be627=new _0x347038(_0xbc3be2,_0x4f6286['map'](_0x1ddd0d=>this['_getViewFromDiffObj'](_0x1ddd0d,!0x0)));return this['editor']['data']['toModel'](_0x3be627);}['_removeRevisionMarkers'](_0x4f4c9e){return(_0x4f4c9e=_0x4f4c9e['filter'](_0x264cbe=>!_0x264cbe['name']||'revision-start'!==_0x264cbe['name']&&'revision-end'!==_0x264cbe['name']))['forEach'](_0x5cc8ac=>{'string'!=typeof _0x5cc8ac&&(_0x5cc8ac['children']=this['_removeRevisionMarkers'](_0x5cc8ac['children']),_0x5cc8ac['attributes']=_0x5cc8ac['attributes']['filter'](_0x24d246=>!_0x24d246[0x0]['startsWith']('data-revision-')));}),_0x4f4c9e;}}function R(_0x3b7d5d,_0x1bc8c1,_0x40eae6){const t=_0x3b7d5d['t'];switch(_0x1bc8c1){case'Revision\x20history':return t('Revision\x20history');case'Open\x20revision\x20history':return t('Open\x20revision\x20history');case'Restored':return t('Restored');case'Empty\x20document':return t('Empty\x20document');case'Initial\x20revision':return t('Initial\x20revision');case'Suggested\x20by':return t('Suggested\x20by');case'Added\x20by':return t('Added\x20by');case'Removed\x20by':return t('Removed\x20by');case'Show\x20more\x20items':return t('Show\x20more\x20items');case'Compare\x20against\x20selected':return t('Compare\x20against\x20selected');case'Name\x20this\x20revision':return t('Name\x20this\x20revision');case'Restore\x20this\x20revision':return t('Restore\x20this\x20revision');case'Back\x20to\x20editing':return t('Back\x20to\x20editing');case'Loading...':return t('Loading...');case'No\x20changes':return t('No\x20changes');case'NUMBER_OF_CHANGES':return t({'string':'%0\x20change','plural':'%0\x20changes','id':'NUMBER_OF_CHANGES'},_0x40eae6);case'X_OF_Y_CHANGES':return t({'string':'%0\x20of\x20%1','id':'X_OF_Y_CHANGES'},_0x40eae6);case'Show\x20previous\x20change':return t('Show\x20previous\x20change');case'Show\x20next\x20change':return t('Show\x20next\x20change');case'EDIT_X_OF_Y_REVISIONS':return t({'string':'Edit','id':'EDIT_X_OF_Y_REVISIONS'});case'Total':return t('Total');case'Revision\x20creator':return t('Revision\x20creator');case'Revision\x20author':return t('Revision\x20author');case'Revision\x20name':return t('Revision\x20name');case'Save\x20current\x20revision':return t('Save\x20current\x20revision');case'Accept':return t('Accept');case'Save':return t('Save');case'Cancel':return t('Cancel');case'Name\x20of\x20the\x20revision':return t('Name\x20of\x20the\x20revision');case'optional':return t('optional');case'PENDING_ACTION_REVISION_HISTORY':return t({'string':'Unsaved\x20change\x20in\x20revision\x20history.','id':'PENDING_ACTION_REVISION_HISTORY'});case'The\x20revision\x20name\x20cannot\x20be\x20empty.':return t('The\x20revision\x20name\x20cannot\x20be\x20empty.');case'Enter\x20the\x20revision\x20name':return t('Enter\x20the\x20revision\x20name');default:return'';}}class h extends _0x42167a{['licenseKey'];['_licenseKeyCheckInterval'];['currentRevision']=null;['repository'];['adapter']=null;['_revisionDataBuilder'];['_source'];['_initialRevisionId'];['_bufferedUpdates'];['_utils'];['_pendingAction'];['_continueCurrentRevision'];['_startingVersion'];['_loadedStateData'];static get['pluginName'](){return'RevisionTracker';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[_0x376a79,S,$,_0x113c0e];}constructor(_0x399da0){super(_0x399da0),this['repository']=this['editor']['plugins']['get']('RevisionsRepository'),this['_utils']=this['editor']['plugins']['get']('RevisionHistoryUtils'),this['_revisionDataBuilder']=new E(this['editor']),this['_initialRevisionId']=this['editor']['config']['get']('collaboration.channelId')||'initial',this['_bufferedUpdates']=new Map(),this['_loadedStateData']=null;const _0x21c684=_0x54a7d7();this['_source']={'history':this['editor']['model']['document']['history'],'getLatestVersion':()=>Promise['resolve'](this['editor']['model']['document']['version']),'getCurrentRevisionId':()=>_0x21c684},this['set']('isReady',!0x1),this['set']('isEnabled',!0x0),this['set']('_isPendingUpdate',!0x1),this['editor']['config']['define']('revisionHistory.resumeUnsavedRevision',!0x0),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'});}['init'](){this['_setConversion'](),this['editor']['data']['on']('ready',()=>{const _0x471778=this['repository']['getRevision'](0x0),_0x45c3a4=_0x471778&&null===_0x471778['creator']?_0x471778:null;if(this['_continueCurrentRevision']=!!_0x45c3a4&&this['editor']['config']['get']('revisionHistory.resumeUnsavedRevision'),this['editor']['plugins']['has']('RealTimeCollaborationClient')){const _0x3bb969=this['_source']['getCurrentRevisionId'](),_0x52821e=this['repository']['getRevision'](_0x3bb969);if(_0x52821e)this['_startingVersion']=_0x52821e['fromVersion'],this['_continueCurrentRevision']=!0x1;else{const _0x1d2fae=this['_source']['history']['_operations']['find'](_0x3c1e43=>!_0x3c1e43['_isInit']),_0x432e38=_0x1d2fae?_0x1d2fae['baseVersion']:this['_source']['history']['version'];_0x471778?(_0x471778['toVersion']<_0x432e38&&_0x471778['_update']({'toVersion':_0x432e38}),this['_continueCurrentRevision']?(this['_source']['getCurrentRevisionId']=()=>_0x45c3a4['id'],this['_startingVersion']=_0x45c3a4['fromVersion']):(this['_startingVersion']=_0x471778['toVersion'],this['_continueCurrentRevision']=!0x1)):(this['_startingVersion']=_0x432e38,this['_continueCurrentRevision']=!0x1);}}else _0x45c3a4&&(this['editor']['model']['document']['history']['version']=Math['max'](_0x45c3a4['toVersion'],this['editor']['model']['document']['history']['version']),_0x45c3a4['fromVersion']===_0x45c3a4['toVersion']?(0x0!==_0x45c3a4['fromVersion']&&(this['_source']['getCurrentRevisionId']=()=>_0x45c3a4['id']),this['_continueCurrentRevision']=!0x1):this['_continueCurrentRevision']&&(this['_source']['getCurrentRevisionId']=()=>_0x45c3a4['id'],this['_startingVersion']=_0x45c3a4['fromVersion'])),this['_continueCurrentRevision']||(this['_startingVersion']=this['editor']['model']['document']['version']);this['_revisionDataBuilder']['init'](this['_source']['history']),this['_createInitialRevision'](this['_startingVersion']),this['_createCurrentRevision'](this['_startingVersion']),this['adapter']&&this['sendBufferedUpdates']();}),this['bind']('isReady')['to'](this,'_isPendingUpdate',_0x10af2b=>!_0x10af2b),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x49ac83=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x433d85;for(const _0x3c2690 in _0x49ac83){const _0x2585d5=_0x3c2690,_0x4a3471=_0x49ac83[_0x2585d5];if('revisionHistoryLicenseKeyValid'==_0x4a3471||'revisionHistoryLicenseKeyInvalid'==_0x4a3471||'revisionHistoryLicenseKeyExpired'==_0x4a3471||'revisionHistoryLicenseKeyDomainLimit'==_0x4a3471||'revisionHistoryLicenseKeyNotAllowed'==_0x4a3471||'revisionHistoryLicenseKeyEvaluationLimit'==_0x4a3471||'revisionHistoryLicenseKeyTrialLimit'==_0x4a3471||'revisionHistoryLicenseKeyUsageLimit'==_0x4a3471){delete _0x49ac83[_0x2585d5],_0x433d85=_0x4a3471,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'revisionHistoryLicenseKeyInvalid'==_0x433d85&&_0x49ac83['_showLicenseError']('invalid'),'revisionHistoryLicenseKeyExpired'==_0x433d85&&_0x49ac83['_showLicenseError']('expired'),'revisionHistoryLicenseKeyDomainLimit'==_0x433d85&&_0x49ac83['_showLicenseError']('domainLimit'),'revisionHistoryLicenseKeyNotAllowed'==_0x433d85&&_0x49ac83['_showLicenseError']('featureNotAllowed','RevisionHistory'),'revisionHistoryLicenseKeyEvaluationLimit'==_0x433d85&&_0x49ac83['_showLicenseError']('evaluationLimit'),'revisionHistoryLicenseKeyTrialLimit'==_0x433d85&&_0x49ac83['_showLicenseError']('trialLimit'),'revisionHistoryLicenseKeyUsageLimit'==_0x433d85&&_0x49ac83['_showLicenseError']('usageLimit');},0x3e8);}async['afterInit'](){if(this['repository']['length']>0x0){const _0x3d3fdf=this['repository']['getRevision'](0x0),_0x56d042=await this['getRevisionDocumentData'](_0x3d3fdf),_0x1766b9=await this['getRevisionRootsAttributes'](_0x3d3fdf);this['_replaceEditorDataWithRevisionData'](_0x56d042,_0x1766b9);}}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['setSource'](_0x1a46e3){this['_source']=_0x1a46e3;}async['update'](){const _0x59e2e2=await this['_source']['getLatestVersion']();if(_0x59e2e2>this['currentRevision']['toVersion']){await this['_loadState']();const _0x2263ac=this['buildRevisionData']({'revision':this['currentRevision'],'to':_0x59e2e2});_0x2263ac['authors']=_0x2263ac['authorsIds']['map'](_0x41bf4e=>this['editor']['plugins']['get']('Users')['getUser'](_0x41bf4e)),this['currentRevision']['_update'](_0x2263ac);}}async['saveRevision'](_0x47a742={},_0x4c13a9=null){const _0x558466=[];await this['_loadState'](),this['_continueCurrentRevision']=!0x1,_0x4c13a9>this['currentRevision']['toVersion']&&(_0x4c13a9=null),null===_0x4c13a9&&(_0x4c13a9=await this['_source']['getLatestVersion']());const _0x288395=this['_getFromVersion'](_0x4c13a9),_0x2523e2=this['buildRevisionData']({'from':_0x288395,'to':_0x4c13a9});if(this['currentRevision']['toVersion']<_0x4c13a9){const _0x36867d=this['buildRevisionData']({'revision':this['currentRevision'],'from':_0x4c13a9,'to':_0x4c13a9});_0x36867d['authors']=[],_0x36867d['authorsIds']=[],_0x36867d['id']=this['currentRevision']['id'],this['currentRevision']['_update'](_0x36867d,!0x0),delete _0x36867d['authors'],_0x558466['push'](_0x36867d);}_0x47a742['creatorId']=this['editor']['plugins']['get']('Users')['me']['id'],_0x47a742['name']=_0x47a742['name']||null,_0x47a742['id']=_0x47a742['id']||_0x54a7d7(),_0x47a742={..._0x47a742,..._0x2523e2};const _0x4f39f2=this['addRevisionData'](_0x47a742);_0x558466['push'](_0x47a742);const _0x248031=this['repository']['getIndex'](_0x4f39f2);if(0x0!==_0x248031){const _0x5e3b00=this['repository']['getRevision'](_0x248031-0x1);if(_0x5e3b00['fromVersion']!==_0x4c13a9){const _0x4b37bd=this['_revisionDataBuilder']['getData'](_0x4c13a9,_0x5e3b00['toVersion']),_0x30cd20={'id':_0x5e3b00['id'],'diffData':_0x4b37bd['diffData'],'authorsIds':_0x4b37bd['authorsIds'],'authors':_0x4b37bd['authorsIds']['map'](_0x2d749e=>this['editor']['plugins']['get']('Users')['getUser'](_0x2d749e)),'fromVersion':_0x4c13a9};_0x5e3b00===this['currentRevision']&&(_0x30cd20['createdAt']=new Date(_0x47a742['createdAt']['getTime']()+0xa)),_0x5e3b00['_update'](_0x30cd20,!0x0),delete _0x30cd20['authors'],_0x558466['push'](_0x30cd20);}}if(this['adapter']){for(const _0x3d2897 of _0x558466)this['_bufferUpdate'](_0x3d2897['id'],_0x3d2897,!0x0);this['sendBufferedUpdates']();}return _0x4f39f2;}['addRevisionData'](_0x54ae60){const _0x3e8bea=this['repository']['createRevision'](_0x54ae60);return this['adapter']&&_0x3e8bea['on']('_update',(_0x4ec56e,_0x1b2598,_0x3a1be3)=>{_0x3a1be3||(this['_bufferUpdate'](_0x1b2598['id'],_0x1b2598,!0x0),this['sendBufferedUpdates']());}),this['repository']['addRevision'](_0x3e8bea,this['_findInsertionIndex'](_0x3e8bea)),_0x3e8bea;}async['getRevisionDocumentData'](_0x1543c2){return await this['_utils']['loadRevisionData'](_0x1543c2,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x1543c2);}async['getRevisionRootsAttributes'](_0x355555){return await this['_utils']['loadRevisionData'](_0x355555,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x355555);}['sendBufferedUpdates'](){if(0x0===this['_bufferedUpdates']['size'])return;if(this['_isPendingUpdate'])return;let _0x593aba=Array['from'](this['_bufferedUpdates']['values']());this['_bufferedUpdates']['clear']();for(let _0x29fe82=0x0;_0x29fe82<_0x593aba['length'];_0x29fe82++){const _0x141353=_0x593aba[_0x29fe82];let _0x3cf18b=!0x1;for(const _0xc33b88 of Object['keys'](_0x141353))void 0x0===_0x141353[_0xc33b88]?delete _0x141353[_0xc33b88]:'id'!==_0xc33b88&&(_0x3cf18b=!0x0);_0x3cf18b||(_0x593aba[_0x29fe82]=null);}if(_0x593aba=_0x593aba['filter'](_0x15c952=>null!==_0x15c952),!_0x593aba['length'])return;for(let _0x3eee49=0x0;_0x3eee49<_0x593aba['length'];_0x3eee49++){const _0x44fd07=_0x593aba[_0x3eee49];void 0x0!==_0x44fd07['fromVersion']&&void 0x0===_0x44fd07['toVersion']&&(_0x44fd07['toVersion']=this['repository']['getRevision'](_0x44fd07['id'])['toVersion']),void 0x0!==_0x44fd07['toVersion']&&void 0x0===_0x44fd07['fromVersion']&&(_0x44fd07['fromVersion']=this['repository']['getRevision'](_0x44fd07['id'])['fromVersion']);}const _0x173767=this['editor']['config']['get']('collaboration.channelId');this['_isPendingUpdate']=!0x0,this['_addPendingAction'](),this['adapter']['updateRevisions'](_0x593aba,_0x173767)['finally'](()=>{this['_isPendingUpdate']=!0x1;})['then'](_0x9be46=>{if(_0x9be46){for(const _0x18db34 of _0x9be46)this['setRevisionData']({'id':_0x18db34['id'],'createdAt':_0x18db34['createdAt']});}this['_removePendingAction'](),this['sendBufferedUpdates']();});}['buildRevisionData']({revision:_0x55047e=null,from:_0x44a165=null,to:_0x38e191=null}){_0x44a165=null!==_0x44a165?_0x44a165:_0x55047e['fromVersion'],_0x38e191=null!==_0x38e191?_0x38e191:_0x55047e['toVersion'];const _0x3ab764=this['_revisionDataBuilder']['getData'](_0x44a165,_0x38e191),_0x182317={'diffData':_0x3ab764['diffData'],'authorsIds':_0x3ab764['authorsIds'],'fromVersion':_0x44a165,'toVersion':_0x38e191};if(!_0x55047e||_0x38e191!==_0x55047e['toVersion']){const _0x563c3b=_0x38e191-0x1,_0x41ed2f=this['_source']['history']['getOperation'](_0x563c3b);_0x182317['createdAt']=_0x41ed2f&&_0x41ed2f['createdAt']||new Date();}if(this['_loadedStateData']&&_0x44a165===this['_loadedStateData']['fromVersion']){for(const _0x321ef2 of this['_loadedStateData']['authors'])_0x182317['authorsIds']['includes'](_0x321ef2['id'])||_0x182317['authorsIds']['push'](_0x321ef2['id']);}return _0x182317;}['_bufferUpdate'](_0x9c5a9a,_0x1b75e4,_0x2bc7a8){if(this['_bufferedUpdates']['has'](_0x9c5a9a)){const _0xe9bfa8=this['_bufferedUpdates']['get'](_0x9c5a9a);_0x1b75e4=_0x2bc7a8?{..._0xe9bfa8,..._0x1b75e4}:{..._0x1b75e4,..._0xe9bfa8};}this['_bufferedUpdates']['set'](_0x9c5a9a,_0x1b75e4);}['setRevisionData'](_0x10afce){const _0x8e42e8=this['repository']['getRevision'](_0x10afce['id']);if(_0x10afce['createdAt']&&(_0x10afce['createdAt']=new Date(_0x10afce['createdAt'])),_0x10afce['authorsIds']){const _0x6f8bde=this['editor']['plugins']['get']('Users');_0x10afce['authors']=_0x10afce['authorsIds']['map'](_0xa6df26=>_0x6f8bde['getUser'](_0xa6df26));}_0x8e42e8['_update'](_0x10afce,!0x0);}['_createInitialRevision'](_0x3e0bbf){const _0x1835ff=this['repository']['getRevision'](this['repository']['length']-0x1);if(_0x1835ff)this['_initialRevisionId']=_0x1835ff['id'];else{const _0x1e6049=!this['editor']['model']['document']['roots']['find'](_0x1729f9=>this['editor']['model']['hasContent'](_0x1729f9)),_0x98d699=this['editor']['plugins']['get']('Users')['me']['id'],_0x353c09=R(this['editor']['locale'],_0x1e6049?'Empty\x20document':'Initial\x20revision');this['_makeRevision']({'from':_0x3e0bbf,'to':_0x3e0bbf,'id':this['_initialRevisionId'],'name':_0x353c09,'creatorId':_0x98d699});}}['_createCurrentRevision'](_0x531ca0){const _0x46b00b=this['_source']['getCurrentRevisionId']();this['currentRevision']=this['repository']['getRevision'](_0x46b00b),this['currentRevision']||(this['currentRevision']=this['_makeRevision']({'from':_0x531ca0,'to':_0x531ca0,'id':_0x46b00b,'name':'','creatorId':null}));}async['_loadState'](){this['_continueCurrentRevision']&&!this['_loadedStateData']&&(await this['_utils']['loadRevisionData'](this['currentRevision'],this['adapter']),this['_revisionDataBuilder']['loadState'](this['currentRevision']),this['_loadedStateData']={'fromVersion':this['currentRevision']['fromVersion'],'authors':this['currentRevision']['authors']['slice']()});}['_replaceEditorDataWithRevisionData'](_0x3ca2be,_0x3adc2e){let _0x12e051=this['editor']['config']['get']('initialData'),_0x2f211c=this['editor']['config']['get']('rootsAttributes');if(void 0x0===_0x12e051){_0x12e051={};for(const _0x58e51b of this['editor']['model']['document']['getRootNames']())_0x12e051[_0x58e51b]='';}if('string'==typeof _0x12e051&&(_0x12e051={'main':_0x12e051}),void 0x0===_0x2f211c){_0x2f211c={};for(const _0x1df622 of this['editor']['model']['document']['getRootNames']())_0x2f211c[_0x1df622]={};}let _0x2ca800=!0x1;const _0x153a82=Object['keys'](_0x12e051),_0x148b7e=Object['keys'](_0x3ca2be);for(const _0x5dac2a of _0x153a82){if(_0x12e051[_0x5dac2a]!==_0x3ca2be[_0x5dac2a]&&''!==_0x12e051[_0x5dac2a]['trim']()){_0x2ca800=!0x0;break;}if(!_0x30f930(_0x2f211c[_0x5dac2a],_0x3adc2e[_0x5dac2a])&&Object['keys'](_0x2f211c[_0x5dac2a])['length']>0x0){_0x2ca800=!0x0;break;}}_0x2ca800||(_0x2ca800=_0x148b7e['some'](_0x1013f8=>!this['editor']['model']['document']['getRoot'](_0x1013f8))),_0x2ca800&&_0x83bbd('editor-initial-data-replaced-with-revision-data',{'editorData':_0x12e051,'editorRootsAttributes':_0x2f211c,'revisionData':_0x3ca2be,'revisionRootsAttributes':_0x3adc2e}),this['editor']['config']['set']('initialData',_0x3ca2be),this['editor']['config']['set']('rootsAttributes',_0x3adc2e);}['_addPendingAction'](){if(!this['_pendingAction']){const _0x18187b=this['editor']['plugins']['get']('PendingActions');this['_pendingAction']=_0x18187b['add'](R(this['editor']['locale'],'PENDING_ACTION_REVISION_HISTORY'));}}['_removePendingAction'](){this['_pendingAction']&&(this['editor']['plugins']['get']('PendingActions')['remove'](this['_pendingAction']),this['_pendingAction']=null);}['_findInsertionIndex'](_0x89a7f6){const _0x203d4d=this['repository']['getRevisions']();_0x203d4d['reverse']();let _0x3982a5=0x0;for(;_0x3982a5<_0x203d4d['length'];){const _0x2a5657=_0x203d4d[_0x3982a5];if(_0x2a5657===this['currentRevision']){_0x3982a5++;continue;}if(_0x2a5657['id']===this['_initialRevisionId'])break;const _0x3b4ca9=_0x89a7f6['toVersion']-_0x2a5657['toVersion']||_0x89a7f6['fromVersion']-_0x2a5657['fromVersion'];if(_0x3b4ca9>0x0)break;if(_0x3b4ca9<0x0)_0x3982a5++;else{if(!_0x89a7f6['creator']&&_0x2a5657['creator'])break;if(_0x2a5657['creator']||!_0x89a7f6['creator']){if(_0x89a7f6['createdAt']>_0x2a5657['createdAt'])break;_0x3982a5++;}else _0x3982a5++;}}return _0x3982a5;}['_getFromVersion'](_0x4f3f31){const _0xc0826b=this['repository']['getRevisions']();_0xc0826b['reverse'](),_0xc0826b['shift']();const _0x3c27af=_0xc0826b['find'](_0x364fc3=>_0x364fc3['toVersion']<=_0x4f3f31)['toVersion'];return _0x3c27af<this['_startingVersion']?this['_startingVersion']:_0x3c27af;}['_makeRevision']({name:_0x5e2f64,from:_0x51f480,to:_0x3b857b,creatorId:_0x12e329,id:_0x10dbb7}){const _0x28d4dd=this['buildRevisionData']({'from':_0x51f480,'to':_0x3b857b});_0x28d4dd['name']=_0x5e2f64,_0x28d4dd['creatorId']=_0x12e329,_0x28d4dd['id']=_0x10dbb7;const _0x538c9b=this['addRevisionData'](_0x28d4dd);return this['adapter']&&this['_bufferUpdate'](_0x28d4dd['id'],_0x28d4dd,!0x0),_0x538c9b;}['_setConversion'](){this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'});}}class E{['editor'];['source'];['_savedMetaData'];['_lastFrom'];['_lastTo'];['_markers'];['_diffRoots'];['_diffRootsAttributes'];['_baseRoots'];['_baseRootsAttributes'];['_idsRoots'];['_baseIdsRoots'];['_touched'];['_touchedMarkers'];['_touchedRoots'];['_revisionId'];['_startingRevisionId'];constructor(_0x225604){this['editor']=_0x225604,this['_savedMetaData']=new Map(),this['_lastFrom']=-0x1,this['_lastTo']=-0x1,this['_markers']=new Map(),this['_diffRoots']=new Map(),this['_diffRootsAttributes']=new Map(),this['_baseRoots']=new Map(),this['_baseRootsAttributes']=new Map(),this['_idsRoots']=new Map(),this['_baseIdsRoots']=new Map(),this['_touched']=new Map(),this['_touchedMarkers']=new Map(),this['_touchedRoots']=new Map(),this['_revisionId']=0x1;}['init'](_0x5676cf){this['source']=_0x5676cf;const _0x4e9ede=new Map(),_0x446be6=new Map(),_0x5ed31d=this['editor']['model']['document']['roots']['map'](_0x5dc390=>_0x5dc390['rootName']);for(const _0x4e9b92 of _0x5ed31d){const _0x1e455e=this['editor']['model']['document']['getRoot'](_0x4e9b92),_0x3654fe=x(_0x1e455e);_0x4e9ede['set'](_0x4e9b92,_0x3654fe),_0x446be6['set'](_0x4e9b92,Object['fromEntries'](_0x1e455e['getAttributes']()));}const _0x42ac79=Array['from'](this['editor']['model']['markers'])['map'](_0x5c4bbf=>[_0x5c4bbf['name'],_0x5c4bbf['getRange']()]),_0x10a506=this['source']['version'];this['_saveMetaData'](_0x10a506,_0x4e9ede,_0x42ac79,_0x446be6),this['_startingRevisionId']=this['_revisionId'];const _0x54d31b=new Map(),_0x5cc2fd=new Map();for(const _0x34b0a2 of _0x5ed31d){const _0x1c4f22=N(_0x34b0a2);_0x54d31b['set'](_0x34b0a2,_0x1c4f22),_0x5cc2fd['set'](_0x34b0a2,{});}this['_saveMetaData'](Number['NEGATIVE_INFINITY'],_0x54d31b,[],_0x5cc2fd);}['getData'](_0x4b7442,_0x3b433f){if(this['_lastFrom']===_0x4b7442&&this['_lastTo']<=_0x3b433f)this['_savedMetaData']['size']>0x1&&this['_removeMetaData'](this['_lastTo']),this['_applyOperations'](this['_lastTo'],_0x3b433f,!0x0);else{if(!this['_savedMetaData']['has'](_0x4b7442)){const _0xf2f326=this['_getPreviousFrom'](_0x4b7442);this['_calculateMetaData'](_0xf2f326,_0x4b7442,!0x1);}this['_calculateMetaData'](_0x4b7442,_0x3b433f,!0x0);}return this['_lastFrom']=_0x4b7442,this['_lastTo']=_0x3b433f,this['_getState']();}['loadState'](_0x5a792d){const _0x185419=this['editor']['plugins']['get']('RevisionHistoryUtils');this['_reset'](),this['_lastFrom']=_0x5a792d['fromVersion'],this['_lastTo']=_0x5a792d['toVersion'];for(const _0xa50f52 in _0x5a792d['diffData']){const _0x237af4=_0x5a792d['diffData'][_0xa50f52]['attachChange'],_0x19438c=_0x1bef90(_0x5a792d['diffData'][_0xa50f52]['attributesBefore'])||{},_0x3f4006=_0x185419['_makeModelFromViewString'](_0x5a792d['diffData'][_0xa50f52]['deletions']);_0x3f4006['rootName']=_0xa50f52,_0x3f4006['_isAttached']=!_0x237af4||!_0x237af4['isAttached'],_0x3f4006['isAttached']=()=>_0x3f4006['_isAttached'],this['_baseRoots']['set'](_0xa50f52,_0x3f4006),this['_baseRootsAttributes']['set'](_0xa50f52,_0x19438c),_0x237af4&&this['_touchedRoots']['set'](_0xa50f52,_0x237af4);const _0x5b1357=this['_makeIdsRoot'](_0x3f4006);this['_baseIdsRoots']['set'](_0xa50f52,_0x5b1357);for(const [_0x1ea022,_0x3f9641]of _0x3f4006['markers']){if(!_0x1ea022['startsWith']('revision:'))continue;const _0x298dea=_0x1ea022['split'](':')[0x2];for(const _0x43b98a of _0x3f9641['getWalker']({'singleCharacters':!0x0})){const _0x29d299=this['_getVidAttributeName'](_0x43b98a),_0x185003='elementEnd'==_0x43b98a['type']?_0x43b98a['previousPosition']['path']['slice'](0x0,-0x1):_0x43b98a['previousPosition']['path'],_0x3df7ee=_0x5b1357['getNodeByPath'](_0x185003)['getAttribute'](_0x29d299);this['_touched']['set'](_0x3df7ee,{'userId':_0x298dea});}}}this['_startingRevisionId']=this['_revisionId'];const _0x2aa1af=[...Array(this['_revisionId'])['keys']()]['slice'](0x1)['filter'](_0x4bca47=>!this['_touched']['has'](_0x4bca47));let _0x5d719a=0x0;const _0x250704=new Map();for(const _0x23c106 in _0x5a792d['diffData']){const _0x1e3ce4=_0x5a792d['diffData'][_0x23c106]['attachChange'],_0x2fb89c=_0x1bef90(_0x5a792d['diffData'][_0x23c106]['attributesAfter'])||{},_0x48eb62=_0x185419['_makeModelFromViewString'](_0x5a792d['diffData'][_0x23c106]['insertions']);_0x48eb62['rootName']=_0x23c106,_0x48eb62['_isAttached']=!_0x1e3ce4||_0x1e3ce4['isAttached'],_0x48eb62['isAttached']=()=>_0x48eb62['_isAttached'],this['_diffRoots']['set'](_0x23c106,_0x48eb62),this['_diffRootsAttributes']['set'](_0x23c106,_0x2fb89c);const _0x557dd1=this['_makeIdsRoot'](_0x48eb62,Number['NEGATIVE_INFINITY']);this['_idsRoots']['set'](_0x23c106,_0x557dd1),_0x250704['set'](_0x23c106,_0x48eb62['isAttached']()?_0x2fb89c:{});for(const [_0x46a083,_0x1ab52d]of _0x48eb62['markers']){if(!_0x46a083['startsWith']('revision:'))continue;const _0x4bfe34=_0x46a083['split'](':')[0x2];for(const _0x49bef4 of _0x1ab52d['getWalker']({'singleCharacters':!0x0})){const _0x4fda14=this['_getVidAttributeName'](_0x49bef4),_0x3bd6da=this['_revisionId']++,_0x4f4bc3='elementEnd'==_0x49bef4['type']?_0x49bef4['previousPosition']['path']['slice'](0x0,-0x1):_0x49bef4['previousPosition']['path'];_0x557dd1['getNodeByPath'](_0x4f4bc3)['_setAttribute'](_0x4fda14,_0x3bd6da),this['_touched']['set'](_0x3bd6da,{'userId':_0x4bfe34});}}for(const _0x490b50 of this['editor']['model']['createRangeIn'](_0x48eb62)['getWalker']({'singleCharacters':!0x0})){const _0xa2635b=this['_getVidAttributeName'](_0x490b50),_0x33cedc='elementEnd'==_0x490b50['type']?_0x490b50['previousPosition']['path']['slice'](0x0,-0x1):_0x490b50['previousPosition']['path'],_0x1af46b=_0x557dd1['getNodeByPath'](_0x33cedc);_0x1af46b['getAttribute'](_0xa2635b)>0x0||_0x1af46b['_setAttribute'](_0xa2635b,_0x2aa1af[_0x5d719a++]);}for(const [_0x2aac83,_0xb03ca3]of _0x48eb62['markers'])_0x2aac83['startsWith']('revision:')||this['_markers']['set'](_0x2aac83,_0xb03ca3);}const _0x3f566b=N('$graveyard');this['_baseRoots']['set']('$graveyard',_0x3f566b),this['_baseIdsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x3f566b,0x1));const _0x5cea63=N('$graveyard');this['_diffRoots']['set']('$graveyard',_0x5cea63),this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x5cea63,0x1));const _0x16c852=Array['from'](this['_diffRoots'])['map'](([_0x1920c8,_0x59d54f])=>[_0x1920c8,x(_0x59d54f)]);this['_saveMetaData'](this['_lastTo'],_0x16c852,this['_markers'],_0x250704);}['reInit'](){this['_reset'](),this['_lastFrom']=-0x1,this['_lastTo']=-0x1,this['_savedMetaData']['clear'](),this['init'](this['source']);}['_saveMetaData'](_0x230a96,_0x4dd4d2,_0x4cb724,_0x4f1eca){const _0x511ca9=new Map(_0x4dd4d2),_0x28c46e=new Map(_0x1bef90(_0x4f1eca)),_0x7052ed=new Map();for(const [_0x4911a5,_0x67f921]of _0x4cb724)_0x7052ed['set'](_0x4911a5,{'start':_0x67f921['start']['clone'](),'end':_0x67f921['end']['clone'](),'rootName':_0x67f921['root']['rootName']});this['_savedMetaData']['set'](_0x230a96,{'roots':_0x511ca9,'markers':_0x7052ed,'rootsAttributes':_0x28c46e});}['_removeMetaData'](_0x38e368){this['_savedMetaData']['delete'](_0x38e368);}['_reset'](){this['_touched']['clear'](),this['_touchedMarkers']['clear'](),this['_touchedRoots']['clear'](),this['_diffRoots']['clear'](),this['_diffRootsAttributes']['clear'](),this['_baseRoots']['clear'](),this['_baseRootsAttributes']['clear'](),this['_idsRoots']['clear'](),this['_baseIdsRoots']['clear'](),this['_markers']['clear'](),this['_revisionId']=0x1,this['_startingRevisionId']=this['_revisionId'];}['_makeIdsRoot'](_0x2ab0c0,_0x1aa590=null){let _0xd71f91=null;_0x2ab0c0['is']('documentFragment')||(_0xd71f91=new _0x2885e6(_0x2ab0c0['name'],{'vid_start':null===_0x1aa590?this['_revisionId']++:_0x1aa590++}));const _0x3e4b4b=[];for(const _0x4431d8 of _0x2ab0c0['getChildren']())if(_0x4431d8['is']('element')){_0x3e4b4b['push'](this['_makeIdsRoot'](_0x4431d8,_0x1aa590));const _0x587b11=_0x3e4b4b[_0x3e4b4b['length']-0x1];null!==_0x1aa590&&(_0x1aa590=_0x587b11['is']('element','$text')?_0x587b11['getAttribute']('vid')+0x1:_0x587b11['getAttribute']('vid_end')+0x1);}else{for(let _0x5a0736=0x0;_0x5a0736<_0x4431d8['offsetSize'];_0x5a0736++)_0x3e4b4b['push'](new _0x2885e6('$text',{'vid':null===_0x1aa590?this['_revisionId']++:_0x1aa590++}));}if(_0x2ab0c0['is']('documentFragment')){const _0x4b87b6=N(_0x2ab0c0['rootName']);return _0x4b87b6['_insertChild'](0x0,_0x3e4b4b),_0x4b87b6;}return _0xd71f91['_setAttribute']('vid_end',null===_0x1aa590?this['_revisionId']++:_0x1aa590++),_0xd71f91['_insertChild'](0x0,_0x3e4b4b),_0xd71f91;}['_calculateMetaData'](_0x3b5f12,_0x1da78c,_0x1b5bab){this['_reset']();const {roots:_0x55ea30,markers:_0x263235,rootsAttributes:_0x52815c}=this['_savedMetaData']['get'](_0x3b5f12);this['_baseRoots']=new Map(_0x55ea30),this['_baseRootsAttributes']=new Map(_0x1bef90(_0x52815c));for(const [_0x300a34,_0x5d3bb6]of this['_baseRoots'])if('$graveyard'!==_0x300a34&&(this['_diffRoots']['set'](_0x300a34,x(_0x5d3bb6)),this['_diffRootsAttributes']=new Map(_0x1bef90(_0x52815c)),_0x1b5bab)){const _0x5610d9=this['_revisionId'];this['_idsRoots']['set'](_0x300a34,this['_makeIdsRoot'](_0x5d3bb6)),this['_baseIdsRoots']['set'](_0x300a34,this['_makeIdsRoot'](_0x5d3bb6,_0x5610d9));}this['_startingRevisionId']=this['_revisionId'],this['_diffRoots']['set']('$graveyard',x(this['_baseRoots']['get']('$graveyard'))),_0x1b5bab&&this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](this['_baseRoots']['get']('$graveyard')));for(const [_0x1b1329,_0x379eb4]of _0x263235){const _0x4611b1=this['_baseRoots']['get'](_0x379eb4['rootName']),_0x346a33=this['_diffRoots']['get'](_0x379eb4['rootName']),_0x21e61d=new _0x54dc07(this['_fixPosition'](_0x379eb4['start'],_0x4611b1),this['_fixPosition'](_0x379eb4['end'],_0x4611b1)),_0x10b2d3=this['_fixRange'](_0x21e61d,_0x346a33);_0x4611b1['markers']['set'](_0x1b1329,_0x21e61d),this['_markers']['set'](_0x1b1329,_0x10b2d3);}this['_applyOperations'](_0x3b5f12,_0x1da78c,_0x1b5bab);}['_applyOperations'](_0x3fcb00,_0xa20876,_0x47813f){for(const _0xbef618 of this['source']['getOperations'](_0x3fcb00,_0xa20876))this['_handleOperation'](_0xbef618,_0x47813f);for(const _0x51ccb3 of this['_diffRoots']['values']())_0x51ccb3['markers']['clear']();for(const [_0x33860a,_0x55ccb0]of this['_markers']){this['_diffRoots']['get'](_0x55ccb0['root']['rootName'])['markers']['set'](_0x33860a,_0x55ccb0['clone']());}const _0x182393=new Map(),_0x2ffd3a=new Map();for(const [_0x306950,_0x5d6b2c]of this['_diffRoots'])_0x182393['set'](_0x306950,x(_0x5d6b2c)),_0x2ffd3a['set'](_0x306950,this['_diffRootsAttributes']['get'](_0x306950));this['_saveMetaData'](_0xa20876,_0x182393,this['_markers'],_0x2ffd3a);}['_getPreviousFrom'](_0x1cf752){const _0x5e12ff=Array['from'](this['_savedMetaData']['keys']());_0x5e12ff['sort']((_0x2e878e,_0xe10db6)=>_0x2e878e-_0xe10db6),_0x5e12ff['reverse']();for(const _0x6b19af of _0x5e12ff)if(_0x6b19af<_0x1cf752)return _0x6b19af;return Number['NEGATIVE_INFINITY'];}['_copyMarkers'](_0xcf9be1,_0x13adb0){const _0x128c93=Array['from'](_0x13adb0['markers'])['map'](([_0x5a4f23,_0x19e806])=>[_0x5a4f23,this['_fixRange'](_0x19e806,_0xcf9be1)]);_0xcf9be1['markers']=new Map(_0x128c93);}['_transformMarkers'](_0x3ead6d){for(const _0x209838 of this['_markers']['values']()){const _0x1c3474=_0x209838['getTransformedByOperation'](_0x3ead6d),_0x465fef=_0x54dc07['_createFromRanges'](_0x1c3474);_0x209838['start']=_0x465fef['start'],_0x209838['end']=_0x465fef['end'];}}['_handleOperation'](_0x380d9f,_0x1debde){if('addRoot'!=_0x380d9f['type']&&'detachRoot'!=_0x380d9f['type']){if('insert'==_0x380d9f['type']){const _0x559bd9=_0x380d9f['position']['root']['rootName'];this['_diffRoots']['has'](_0x559bd9)||(this['_diffRoots']['set'](_0x559bd9,N(_0x559bd9,!0x0)),this['_diffRootsAttributes']['set'](_0x559bd9,{}),_0x1debde&&this['_idsRoots']['set'](_0x559bd9,N(_0x559bd9,!0x0)));}else{if('addRootAttribute'==_0x380d9f['type']||'removeRootAttribute'==_0x380d9f['type']||'changeRootAttribute'==_0x380d9f['type'])return void this['_handleRootAttributeOperation'](_0x380d9f);'marker'==_0x380d9f['type']&&this['_handleMarkerOperation'](_0x380d9f);}if('marker'!==_0x380d9f['type']){const _0x292c06=this['_cloneOperation'](_0x380d9f,this['_diffRoots']);_0x292c06['_execute'](),this['_transformMarkers'](_0x292c06);}if(_0x1debde)switch(_0x380d9f['type']){case'insert':this['_handleInsertOperation'](_0x380d9f);break;case'move':case'remove':case'reinsert':this['_handleMoveOperation'](_0x380d9f);break;case'merge':this['_handleMergeOperation'](_0x380d9f);break;case'split':this['_handleSplitOperation'](_0x380d9f);}}else this['_handleRootOperation'](_0x380d9f,_0x1debde);}['_cloneOperation'](_0xf6ee49,_0x29551){const _0x566835=_0xf6ee49['clone']();return _0x566835['_authorId']=_0xf6ee49['_authorId'],this['_fixOperation'](_0x566835,_0x29551),_0x566835;}['_getBaseVids'](_0x367f56){return _0x367f56['map'](_0x56a270=>{const _0xfaef9=this['_getVidAttributeName'](_0x56a270);return Number(_0x56a270['item']['getAttribute'](_0xfaef9));});}['_generateTape'](_0x149db5,_0x4a46a1){if(_0x149db5['is']('element','$text'))_0x4a46a1['push']({'item':_0x149db5,'type':'text'});else{_0x149db5['is']('element')&&_0x4a46a1['push']({'item':_0x149db5,'type':'elementStart'});for(const _0x525d40 of _0x149db5['getChildren']())this['_generateTape'](_0x525d40,_0x4a46a1);_0x149db5['is']('element')&&_0x4a46a1['push']({'item':_0x149db5,'type':'elementEnd'});}return _0x4a46a1;}['_getState'](){const _0x2aea68=new Map(this['_touched']),_0x163267=new Map(_0x2aea68),_0x4c770d=new Map(),_0x87b719={'insertions':{},'deletions':{}},_0x3b83da={'insertions':{},'deletions':{}},_0x170f09=new Map(),_0x245832=new Set([...this['_baseRoots']['keys'](),...this['_diffRoots']['keys']()]);_0x245832['delete']('$graveyard');for(const _0x195b3c of _0x245832){const _0x425a05=this['_diffRoots']['get'](_0x195b3c)||N(_0x195b3c,!0x1),_0x3ba6d0=this['_baseRoots']['get'](_0x195b3c)||N(_0x195b3c,!0x1);_0x425a05['isAttached']()||_0x3ba6d0['isAttached']()?(_0x87b719['insertions'][_0x195b3c]=x(_0x425a05),_0x87b719['deletions'][_0x195b3c]=x(_0x3ba6d0),this['_copyMarkers'](_0x87b719['deletions'][_0x195b3c],_0x3ba6d0),this['_copyMarkers'](_0x87b719['insertions'][_0x195b3c],_0x425a05),_0x3b83da['insertions'][_0x195b3c]=this['_generateTape'](this['_idsRoots']['get'](_0x195b3c),[]),_0x3b83da['deletions'][_0x195b3c]=this['_generateTape'](this['_baseIdsRoots']['get'](_0x195b3c)||N(_0x195b3c,!0x1),[])):_0x245832['delete'](_0x195b3c);}for(const _0x328b25 of _0x245832){const _0x207b69=_0x3b83da['insertions'][_0x328b25];for(const _0x5c762c of _0x207b69){const _0x5eedb5=this['_getVidAttributeName'](_0x5c762c),_0x5366da=_0x5c762c['item']['getAttribute'](_0x5eedb5);_0x163267['delete'](_0x5366da),_0x5366da>=this['_startingRevisionId']&&_0x4c770d['set'](_0x5366da,_0x2aea68['get'](_0x5366da));}}for(const _0x2112c3 of _0x245832){const _0x3213d6=_0x3b83da['insertions'][_0x2112c3],_0xceddaf=this['_getBaseVids'](_0x3b83da['deletions'][_0x2112c3]);let _0x55053c=0x0;for(const _0x3799ac of _0x3213d6){const _0x1770ec=this['_getVidAttributeName'](_0x3799ac),_0x43a8ad=_0x3799ac['item']['getAttribute'](_0x1770ec);if(!_0x4c770d['has'](_0x43a8ad)&&!_0x170f09['has'](_0x43a8ad)){if(_0x163267['has'](_0x43a8ad))_0x55053c++;else{if(_0x43a8ad!=_0xceddaf[_0x55053c]){const _0x62e64=_0x2aea68['get'](_0x43a8ad)||_0x2aea68['get'](_0xceddaf[_0x55053c]);for(;_0x43a8ad!=_0xceddaf[_0x55053c];)_0x163267['has'](_0xceddaf[_0x55053c])||(_0x170f09['set'](_0xceddaf[_0x55053c],_0x62e64),_0x2aea68['set'](_0xceddaf[_0x55053c],_0x62e64)),_0x55053c++;}_0x55053c++;}}}}for(const _0x3a6ea7 of _0x245832){const _0x5756bb=_0x3b83da['insertions'][_0x3a6ea7];for(const _0xa6552d of _0x5756bb){const _0x436186=this['_getVidAttributeName'](_0xa6552d),_0x1f1b60=_0xa6552d['item']['getAttribute'](_0x436186);if(_0x170f09['has'](_0x1f1b60)){const _0x12220b=_0x170f09['get'](_0x1f1b60);_0x163267['has'](_0x1f1b60)||_0x163267['set'](_0x1f1b60,{..._0x12220b}),_0x4c770d['set'](_0x1f1b60,{..._0x12220b});}}}for(const _0x340497 of _0x163267['keys']())_0x340497>=this['_startingRevisionId']&&_0x163267['delete'](_0x340497);const _0x529577=new Map();for(const _0x4648af of _0x245832){let _0x24d798=_0x3b83da['insertions'][_0x4648af];for(const _0x584a98 of _0x24d798)if(_0x584a98['item']['is']('element','tableCell')){const _0x266f6c=this['_getVidAttributeName'](_0x584a98),_0x2ca826=_0x584a98['item']['getAttribute'](_0x266f6c);if(_0x4c770d['has'](_0x2ca826)){const _0x361a18=_0x584a98['item']['parent']['parent']['getAttribute']('vid_start'),_0x130fee=_0x529577['get'](_0x361a18)||new Set();_0x130fee['add'](_0x4c770d['get'](_0x2ca826)['userId']),_0x529577['set'](_0x361a18,_0x130fee);}}_0x24d798=_0x3b83da['deletions'][_0x4648af];for(const _0x5010d2 of _0x24d798)if(_0x5010d2['item']['is']('element','tableCell')){const _0x3781be=this['_getVidAttributeName'](_0x5010d2),_0x2647bd=_0x5010d2['item']['getAttribute'](_0x3781be);if(_0x163267['has'](_0x2647bd)){const _0x4a8541=_0x5010d2['item']['parent']['parent']['getAttribute']('vid_start'),_0x413c8d=_0x529577['get'](_0x4a8541)||new Set();_0x413c8d['add'](_0x163267['get'](_0x2647bd)['userId']),_0x529577['set'](_0x4a8541,_0x413c8d);}}for(const _0x1fb1cf of _0x529577['keys']())(_0x4c770d['has'](_0x1fb1cf)||_0x163267['has'](_0x1fb1cf))&&_0x529577['delete'](_0x1fb1cf);}for(const _0x4fa6fc of _0x245832){const _0x258bd9=_0x3b83da['insertions'][_0x4fa6fc];let _0x3ededd=null,_0x289460=null;for(const _0x24778e of _0x258bd9){const _0x2730cf=this['_getVidAttributeName'](_0x24778e),_0xaeeef9=_0x24778e['item']['getAttribute'](_0x2730cf),_0x42fa1a=_0x529577['get'](_0xaeeef9);_0x42fa1a&&'elementStart'==_0x24778e['type']&&(_0x3ededd=Array['from'](_0x42fa1a)[0x0],_0x289460=_0x24778e['item']['getAttribute']('vid_end')),_0x3ededd&&(_0x163267['set'](_0xaeeef9,{'userId':_0x3ededd}),_0x4c770d['set'](_0xaeeef9,{'userId':_0x3ededd})),_0xaeeef9==_0x289460&&(_0x3ededd=null,_0x289460=null);}}const _0x25e46b={},_0x124720=new Set();for(const _0x297d23 of _0x245832){const _0x2282fd=_0x87b719['deletions'][_0x297d23],_0x2fe50b=_0x87b719['insertions'][_0x297d23];for(const {userId:_0x41b082}of this['_touchedMarkers']['values']())null!==_0x41b082&&_0x124720['add'](_0x41b082);for(const {userId:_0x5803f2}of this['_touchedRoots']['values']())null!==_0x5803f2&&_0x124720['add'](_0x5803f2);this['_markChanges'](_0x2fe50b,_0x3b83da['insertions'][_0x297d23],_0x4c770d,'insertion',_0x124720),this['_markChanges'](_0x2282fd,_0x3b83da['deletions'][_0x297d23],_0x163267,'deletion',_0x124720),_0x25e46b[_0x297d23]={'insertions':this['_prepareViewToSave'](_0x2fe50b),'deletions':this['_prepareViewToSave'](_0x2282fd),'attachChange':this['_touchedRoots']['get'](_0x297d23)||null,'attributesBefore':_0x1bef90(this['_baseRootsAttributes']['get'](_0x297d23))||{},'attributesAfter':_0x1bef90(this['_diffRootsAttributes']['get'](_0x297d23))};}return{'diffData':_0x25e46b,'authorsIds':Array['from'](_0x124720)};}['_processRootBeforeSave'](_0x27d9ef){for(const [,_0x2aebc2]of _0x27d9ef['markers']){const _0x33db6b=_0x2aebc2['start']['getAncestors']()['filter'](_0x1361dd=>'tableCell'==_0x1361dd['name']);for(const _0x2465cf of _0x33db6b)0x1==_0x2465cf['childCount']&&_0x2465cf['getChild'](0x0)['is']('element','paragraph')&&_0x2465cf['getChild'](0x0)['_setAttribute']('keepParagraph',!0x0);}}['_prepareViewToSave'](_0x2176cb){this['_processRootBeforeSave'](_0x2176cb);const _0xb864b1=this['editor']['data']['toView'](_0x2176cb,{}),_0x4e311b=Array['from'](_0xb864b1['getChildren']())['map'](_0x3cf970=>this['_getViewJson'](_0x3cf970));return JSON['stringify'](_0x4e311b);}['_getViewJson'](_0xb403d9){if(_0xb403d9['is']('$text'))return _0xb403d9['data'];{const _0x42be2e=this['editor']['plugins']['get']('RevisionHistoryUtils'),_0xc8d86e=_0xb403d9,_0x40c72d=this['editor']['data']['htmlProcessor']['domConverter'],_0x10a449={'type':_0x42be2e['_getTypeCharForViewElement'](_0xc8d86e),'name':_0xc8d86e['name'],'attributes':Array['from'](_0xc8d86e['getAttributes']()),'children':Array['from'](_0xc8d86e['getChildren']())['map'](_0x516fe7=>this['_getViewJson'](_0x516fe7))};if(_0xb403d9['is']('uiElement')&&'$comment'!=_0xb403d9['name']){const _0x598542=_0xb403d9['render'](_0x40c72d['domDocument'],_0x40c72d);_0x10a449['children']['push'](_0x598542['outerHTML']);}else{if(_0xb403d9['is']('rawElement')){const _0x22fef8=_0x40c72d['domDocument']['createElement'](_0xc8d86e['name']);_0xb403d9['render'](_0x22fef8,_0x40c72d),_0x10a449['children']['push'](_0x22fef8['innerHTML']);}}const _0x11c7c1=Array['from'](_0xc8d86e['getCustomProperties']());_0x11c7c1['length']>0x0&&(_0x10a449['customProperties']=_0x11c7c1);const _0x3dbd66=_0xc8d86e['getFillerOffset']();return null!==_0x3dbd66&&(_0x10a449['fillerOffset']=_0x3dbd66),_0x10a449;}}['_markChanges'](_0x22f313,_0x1a16e3,_0xafd2b5,_0x2ba162,_0x32d37a){let _0x53580e=null,_0x5a01dd=null,_0xe66e5d=0x0;const _0x237e05=this['editor']['model'];for(let _0x34d120=0x0;_0x34d120<_0x1a16e3['length'];_0x34d120++){const _0x4c7ad8=this['_getVidAttributeName'](_0x1a16e3[_0x34d120]),_0x287da7=_0x1a16e3[_0x34d120]['item']['getAttribute'](_0x4c7ad8),_0x2573e2=_0xafd2b5['get'](_0x287da7),_0x125ada=_0x34d120==_0x1a16e3['length']-0x1;(!_0x53580e&&_0x2573e2&&(_0x53580e=_0x2573e2,_0x5a01dd=_0x1a16e3[_0x34d120]),_0x53580e&&(!_0x2573e2||_0x2573e2['userId']!=_0x53580e['userId']))&&(_0x4d4fa7(_0x2573e2,P(_0x5a01dd,_0x22f313,_0x237e05),P(_0x1a16e3[_0x34d120],_0x22f313,_0x237e05)),_0x53580e=_0x2573e2||null,_0x5a01dd=_0x2573e2?_0x1a16e3[_0x34d120]:null),_0x53580e&&_0x125ada&&_0x4d4fa7(_0x2573e2,P(_0x5a01dd,_0x22f313,_0x237e05),V(_0x1a16e3[_0x34d120],_0x22f313,_0x237e05));}function _0x4d4fa7(_0x70bae,_0x5f8219,_0x409e04){const _0xa7784a=_0x53580e['userId'],_0x591e0d='revision:'+_0x2ba162+':'+_0xa7784a+':'+_0xe66e5d++,_0xbac33d=_0x237e05['createRange'](_0x5f8219,_0x409e04);_0x22f313['markers']['set'](_0x591e0d,_0xbac33d),null!==_0xa7784a&&_0x32d37a['add'](_0xa7784a);}}['_getVidAttributeName'](_0x5ab340){switch(_0x5ab340['type']){case'elementStart':return'vid_start';case'elementEnd':return'vid_end';default:return'vid';}}['_fixOperation'](_0x2d67a3,_0x3285d1){_0x2d67a3['baseVersion']=null;for(const _0x4491ed in _0x2d67a3){const _0x2ba4b7=_0x2d67a3[_0x4491ed];if(_0x2ba4b7 instanceof _0x4c0b34){const _0x36260e=_0x3285d1['get'](_0x2ba4b7['root']['rootName']);_0x2d67a3[_0x4491ed]=this['_fixPosition'](_0x2ba4b7,_0x36260e);}if(_0x2ba4b7 instanceof _0x54dc07){const _0x4d5333=_0x3285d1['get'](_0x2ba4b7['root']['rootName']);_0x2d67a3[_0x4491ed]=this['_fixRange'](_0x2ba4b7,_0x4d5333);}'root'===_0x4491ed&&(_0x2d67a3['root']=_0x3285d1['get'](_0x2d67a3['root']['rootName']));}}['_fixRange'](_0x165f34,_0x258781){return this['editor']['model']['createRange'](this['_fixPosition'](_0x165f34['start'],_0x258781),this['_fixPosition'](_0x165f34['end'],_0x258781));}['_fixPosition'](_0x11c24e,_0xdaddb3){return this['editor']['model']['createPositionFromPath'](_0xdaddb3,_0x11c24e['path'],_0x11c24e['stickiness']);}['_handleInsertOperation'](_0x53b4ae){const _0x953e69=this['_idsRoots']['get'](_0x53b4ae['position']['root']['rootName']),_0x55c88d=this['_fixPosition'](_0x53b4ae['position'],_0x953e69),_0x160bb4=null===_0x53b4ae['_authorId']?null:_0x53b4ae['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x16bb71=_0x55c88d['parent'],_0x3e5ceb=this['_revisionId'],_0xbfcbc2=[];for(const _0x1d003a of _0x53b4ae['nodes'])if(_0x1d003a['is']('element'))_0xbfcbc2['push'](this['_makeIdsRoot'](_0x1d003a));else{for(let _0x43a8a1=0x0;_0x43a8a1<_0x1d003a['offsetSize'];_0x43a8a1++)_0xbfcbc2['push'](new _0x2885e6('$text',{'vid':this['_revisionId']++}));}const _0x4638e1=this['_revisionId'];for(let _0x1285ee=_0x3e5ceb;_0x1285ee<_0x4638e1;_0x1285ee++)this['_touched']['set'](_0x1285ee,{'userId':_0x160bb4});_0x16bb71['_insertChild'](_0x55c88d['offset'],_0xbfcbc2);}['_handleMoveOperation'](_0xbd54aa){(_0xbd54aa=this['_cloneOperation'](_0xbd54aa,this['_idsRoots']))['_execute']();const _0x42d936=null===_0xbd54aa['_authorId']?null:_0xbd54aa['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0xc7549=_0xbd54aa['getMovedRangeStart'](),_0x2521f5=_0xc7549['parent'],_0x2ac322=_0xc7549['offset'];!function _0x50604a(_0x115983,_0x21495d,_0x6d63e1,_0x310d7e){for(let _0x5caac4=_0x6d63e1;_0x5caac4<_0x310d7e;_0x5caac4++){const _0x54a57f=_0x21495d['getChild'](_0x5caac4);_0x54a57f['is']('element','$text')?_0x115983['set'](_0x54a57f['getAttribute']('vid'),{'userId':_0x42d936}):(_0x115983['set'](_0x54a57f['getAttribute']('vid_start'),{'userId':_0x42d936}),_0x50604a(_0x115983,_0x54a57f,0x0,_0x54a57f['childCount']),_0x115983['set'](_0x54a57f['getAttribute']('vid_end'),{'userId':_0x42d936}));}}(this['_touched'],_0x2521f5,_0x2ac322,_0x2ac322+_0xbd54aa['howMany']);}['_handleMergeOperation'](_0x4e8c83){const _0x4e38c3=null===(_0x4e8c83=this['_cloneOperation'](_0x4e8c83,this['_idsRoots']))['_authorId']?null:_0x4e8c83['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x4c265b=_0x4e8c83['targetPosition']['parent'],_0x4d9ea4=_0x4e8c83['sourcePosition']['parent'],_0x5a7b36=_0x4c265b['getAttribute']('vid_end'),_0xb2a4=_0x4d9ea4['getAttribute']('vid_start');_0x4c265b['_setAttribute']('vid_end',_0x4d9ea4['getAttribute']('vid_end')),_0x4d9ea4['_setAttribute']('vid_end',_0x5a7b36),this['_touched']['set'](_0xb2a4,{'userId':_0x4e38c3}),this['_touched']['set'](_0x5a7b36,{'userId':_0x4e38c3}),_0x4e8c83['_execute']();}['_handleSplitOperation'](_0x55ff1a){const _0xc2a7b6=null===(_0x55ff1a=this['_cloneOperation'](_0x55ff1a,this['_idsRoots']))['_authorId']?null:_0x55ff1a['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x56da1f=_0x55ff1a['graveyardPosition'],_0x11eedc=_0x55ff1a['splitPosition']['parent'];_0x55ff1a['_execute']();const _0x42cc2e=_0x11eedc['getAttribute']('vid_end'),_0x31d763=_0x55ff1a['insertionPosition']['nodeAfter'];if(_0x56da1f){const _0x13c79c=_0x31d763['getAttribute']('vid_end'),_0xbbb00=_0x11eedc['getAttribute']('vid_end');_0x11eedc['_setAttribute']('vid_end',_0x13c79c),_0x31d763['_setAttribute']('vid_end',_0xbbb00),this['_touched']['set'](_0x11eedc['getAttribute']('vid_end'),{'userId':_0xc2a7b6}),this['_touched']['set'](_0x31d763['getAttribute']('vid_start'),{'userId':_0xc2a7b6});}else{const _0x43c574=this['_revisionId']++,_0x47efe8=this['_revisionId']++;_0x11eedc['_setAttribute']('vid_end',_0x43c574),_0x31d763['_setAttribute']('vid_start',_0x47efe8),_0x31d763['_setAttribute']('vid_end',_0x42cc2e),this['_touched']['set'](_0x43c574,{'userId':_0xc2a7b6}),this['_touched']['set'](_0x47efe8,{'userId':_0xc2a7b6});}}['_handleMarkerOperation'](_0x311ac0){if(!_0x311ac0['affectsData'])return;const _0x36d8d5=(_0x311ac0=this['_cloneOperation'](_0x311ac0,this['_diffRoots']))['oldRange']?_0x311ac0['oldRange']['root']:null,_0x3ee204=_0x311ac0['newRange']?_0x311ac0['newRange']['root']:null;_0x36d8d5&&this['_markers']['delete'](_0x311ac0['name']),_0x3ee204&&this['_markers']['set'](_0x311ac0['name'],_0x311ac0['newRange']['clone']());const _0xd86d4c=null===_0x311ac0['_authorId']?null:_0x311ac0['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x35fc81=_0x311ac0['name'];if(!this['_touchedMarkers']['has'](_0x35fc81))return void this['_touchedMarkers']['set'](_0x35fc81,{'range':_0x311ac0['oldRange'],'userId':_0xd86d4c});const _0x3cfafc=this['_touchedMarkers']['get'](_0x35fc81),_0x2206c2=_0x3cfafc['range'],_0x330efb=_0x311ac0['newRange'];null==_0x2206c2&&null==_0x330efb||_0x2206c2&&_0x330efb&&_0x2206c2['isEqual'](_0x330efb)?this['_touchedMarkers']['delete'](_0x311ac0['name']):_0x3cfafc['userId']=_0xd86d4c;}['_handleRootOperation'](_0x1c5c90,_0x54d025){this['_diffRoots']['has'](_0x1c5c90['rootName'])?this['_diffRoots']['get'](_0x1c5c90['rootName'])['_isAttached']=_0x1c5c90['isAdd']:(this['_diffRoots']['set'](_0x1c5c90['rootName'],N(_0x1c5c90['rootName'],!0x0)),this['_diffRootsAttributes']['set'](_0x1c5c90['rootName'],{}),_0x54d025&&this['_idsRoots']['set'](_0x1c5c90['rootName'],N(_0x1c5c90['rootName'],!0x0)));const _0x110aa9=null===_0x1c5c90['_authorId']?null:_0x1c5c90['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x4a6276=this['_touchedRoots']['get'](_0x1c5c90['rootName']);_0x4a6276&&_0x4a6276['userId']===_0x110aa9?this['_touchedRoots']['delete'](_0x1c5c90['rootName']):this['_touchedRoots']['set'](_0x1c5c90['rootName'],{'userId':_0x110aa9,'isAttached':_0x1c5c90['isAdd']});}['_handleRootAttributeOperation'](_0x1b3086){const _0x1a56f4=this['_diffRootsAttributes']['get'](_0x1b3086['root']['rootName']);null===_0x1b3086['newValue']?delete _0x1a56f4[_0x1b3086['key']]:_0x1a56f4[_0x1b3086['key']]=_0x1b3086['newValue'];}}function x(_0x5249df){const _0x114cab=N(_0x5249df['rootName'],_0x5249df['isAttached']());for(const _0x397115 of _0x5249df['getChildren']()){const _0x125bdf=_0x397115['_clone'](!0x0);_0x114cab['_appendChild'](_0x125bdf);}return _0x114cab;}function N(_0xcfc53,_0x3338ac=!0x0){const _0x577d16=new _0x27a5cb();return _0x577d16['rootName']=_0xcfc53,_0x577d16['_isAttached']=_0x3338ac,_0x577d16['isAttached']=()=>_0x577d16['_isAttached'],_0x577d16;}function P(_0x6853d1,_0x3d0fbe,_0x208896){const _0xe7a7e8='elementEnd'==_0x6853d1['type']?_0x208896['createPositionAt'](_0x6853d1['item'],'end'):_0x208896['createPositionBefore'](_0x6853d1['item']);return _0x208896['createPositionFromPath'](_0x3d0fbe,_0xe7a7e8['path'],_0xe7a7e8['stickiness']);}function V(_0x3c0ea1,_0x23b0cd,_0x4feef0){const _0x8f2d7='elementStart'==_0x3c0ea1['type']?_0x4feef0['createPositionAt'](_0x3c0ea1['item'],0x0):_0x4feef0['createPositionAfter'](_0x3c0ea1['item']);return _0x4feef0['createPositionFromPath'](_0x23b0cd,_0x8f2d7['path'],_0x8f2d7['stickiness']);}class me extends/* #__PURE__ -- @preserve */
|
|
25
|
+
_0x5f41ac(_0x2f3954){['focusTracker'];['keystrokes'];['revisionNameInputView'];constructor(_0x5dc0aa,_0x16a2f0){super(_0x5dc0aa),this['focusTracker']=new _0x56222d(),this['keystrokes']=new _0x612952(),this['set']('revisionNameInputValue',''),this['revisionNameInputView']=this['_createRevisionNameInput'](_0x16a2f0),this['setTemplate']({'tag':'form','attributes':{'class':['ck','ck-revision-history-save-revision-form','ck-responsive-form'],'tabindex':'-1'},'children':[this['revisionNameInputView']]}),this['initializeCssTransitionDisablerMixin']();}['render'](){super['render'](),_0xd754b7({'view':this}),this['focusTracker']['add'](this['revisionNameInputView']['element']),this['keystrokes']['listenTo'](this['element']);const _0x37b145=_0x4fb010=>_0x4fb010['stopPropagation']();this['keystrokes']['set']('arrowright',_0x37b145),this['keystrokes']['set']('arrowleft',_0x37b145),this['keystrokes']['set']('arrowup',_0x37b145),this['keystrokes']['set']('arrowdown',_0x37b145);}['focus'](){this['revisionNameInputView']['focus']();}get['revisionName'](){return this['revisionNameInputView']['fieldView']['element']['value']['trim']();}set['revisionName'](_0x984a4){this['revisionNameInputView']['fieldView']['element']['value']=_0x984a4['trim']();}['reset'](){this['revisionNameInputView']['fieldView']['element']['value']='',this['revisionNameInputView']['errorText']=null;}['_createRevisionNameInput'](_0x344da2){const _0x1fdf06=new et(this['locale'],ti),_0x2c8a8e=_0x1fdf06['fieldView'];_0x2c8a8e['extendTemplate']({'attributes':{'maxlength':'220'}});let _0x234821=R(this['locale'],'Name\x20of\x20the\x20revision');return!_0x344da2&&(_0x234821+='\x20('+R(this['locale'],'optional')+')'),(_0x1fdf06['label']=_0x234821,_0x2c8a8e['on']('input',()=>{this['revisionNameInputValue']=_0x2c8a8e['element']['value']['trim']();}),_0x1fdf06);}}class v extends _0x42167a{static get['pluginName'](){return'RevisionHistoryUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[h];}['_saveRevisionFormView'];['init'](){const _0x3b59b1=this['editor'],_0x1caf57=_0x3b59b1['plugins']['get']('RevisionTracker');_0x3b59b1['ui']['componentFactory']['add']('revisionHistory',_0x1630bb=>{const _0x1a1c7b=_0x993c86(_0x1630bb),_0x5a8d1e=_0x1a1c7b['panelView']['children'],_0x5dee5c=new _0x3b1d18(_0x1630bb),_0x35f208=new _0x41015c(_0x1630bb),_0x183749=new _0x3c0d17(_0x1630bb),_0x2c95a8=new _0x41015c(_0x1630bb),_0x5839d=new _0x3c0d17(_0x1630bb);return _0x1a1c7b['bind']('isEnabled')['to'](_0x1caf57,'isReady',_0x1caf57,'isEnabled',_0x3b59b1,'isReadOnly',(_0x3fdcdf,_0x52acad,_0x40da2c)=>_0x3fdcdf&&_0x52acad&&!_0x40da2c),_0x1a1c7b['buttonView']['set']({'icon':_0x2911f0,'label':R(_0x1630bb,'Revision\x20history'),'tooltip':!0x0}),_0x183749['set']({'label':R(_0x1630bb,'Save\x20current\x20revision'),'withText':!0x0,'role':'menuitem'}),_0x183749['bind']('isEnabled')['to'](_0x1caf57,'isReady',_0x1caf57,'isEnabled',_0x3b59b1,'isReadOnly',(_0x433d5f,_0x4e14db,_0x368e15)=>_0x433d5f&&_0x4e14db&&!_0x368e15),_0x183749['on']('execute',()=>this['_showDialog']()),_0x5839d['set']({'label':R(_0x1630bb,'Open\x20revision\x20history'),'withText':!0x0,'role':'menuitem'}),_0x5839d['bind']('isEnabled')['to'](_0x1caf57,'isReady',_0x3b59b1,'isReadOnly',(_0x56407d,_0x1c3af1)=>_0x56407d&&!_0x1c3af1),_0x5839d['on']('execute',()=>{_0x3b59b1['config']['get']('revisionHistory')['showRevisionViewerCallback'](),_0x1a1c7b['isOpen']=!0x1,_0x3b59b1['editing']['view']['focus']();}),_0x35f208['children']['add'](_0x183749),_0x2c95a8['children']['add'](_0x5839d),_0x5dee5c['role']='menu',_0x5dee5c['items']['addMany']([_0x35f208,_0x2c95a8]),_0x5a8d1e['add'](_0x5dee5c),_0x1a1c7b;}),_0x3b59b1['ui']['componentFactory']['add']('menuBar:revisionHistory',()=>this['_registerMenuComponent']());}['_registerMenuComponent'](){const _0x326759=this['editor'],_0x500a12=_0x326759['locale'],_0x5c1fee=new _0xc4af26(_0x500a12),_0x16cac4=new _0x42cfdd(_0x500a12);_0x5c1fee['buttonView']['set']({'icon':_0x2911f0,'label':R(_0x500a12,'Revision\x20history')});const _0x571588=new _0x2014bb(_0x500a12,_0x5c1fee),_0x2cb7a6=new _0x42ec8d(_0x500a12);_0x2cb7a6['set']({'label':R(_0x500a12,'Save\x20current\x20revision')}),_0x2cb7a6['delegate']('execute')['to'](_0x5c1fee),_0x2cb7a6['on']('execute',()=>{this['_showDialog']();}),_0x571588['children']['add'](_0x2cb7a6),_0x16cac4['items']['add'](_0x571588);const _0xa5ea4a=new _0x2014bb(_0x500a12,_0x5c1fee),_0x208fb3=new _0x42ec8d(_0x500a12);return _0x208fb3['set']({'label':R(_0x500a12,'Open\x20revision\x20history')}),_0x208fb3['delegate']('execute')['to'](_0x5c1fee),_0x208fb3['on']('execute',()=>{_0x326759['config']['get']('revisionHistory')['showRevisionViewerCallback']();}),_0xa5ea4a['children']['add'](_0x208fb3),_0x16cac4['items']['add'](_0xa5ea4a),_0x5c1fee['panelView']['children']['add'](_0x16cac4),_0x5c1fee;}['_showDialog'](){const _0x53a28b=this['editor'],_0x261400=_0x53a28b['locale'],_0x28007f=_0x53a28b['plugins']['get']('Dialog'),_0x570553=_0x53a28b['plugins']['get']('RevisionTracker');function _0x87e3a0(_0x1efe37){_0x53a28b['config']['get']('revisionHistory.requireRevisionName')&&''===_0x1efe37['revisionName']?_0x1efe37['revisionNameInputView']['errorText']=R(_0x261400,'The\x20revision\x20name\x20cannot\x20be\x20empty.'):(_0x53a28b['plugins']['get'](h)['saveRevision']({'name':_0x1efe37['revisionName']}),_0x28007f['hide']());}this['_saveRevisionFormView']||(this['_createSaveRevisionFormView'](),this['_saveRevisionFormView']['on']('submit',()=>_0x87e3a0(this['_saveRevisionFormView']))),this['_saveRevisionFormView']['reset'](),_0x28007f['show']({'id':'revisionSave','title':R(_0x261400,'Save\x20current\x20revision'),'isModal':!0x0,'content':this['_saveRevisionFormView'],'actionButtons':[{'label':R(_0x53a28b['locale'],'Cancel'),'withText':!0x0,'onExecute':()=>_0x28007f['hide']()},{'label':R(_0x53a28b['locale'],'Accept'),'class':'ck-button-action','withText':!0x0,'onCreate'(_0x43c9ce){_0x43c9ce['bind']('isEnabled')['to'](_0x570553,'isReady',_0x570553,'isEnabled',_0x53a28b,'isReadOnly',(_0x27b4ed,_0x464621,_0x1c55cb)=>_0x27b4ed&&_0x464621&&!_0x1c55cb);},'onExecute':()=>_0x87e3a0(this['_saveRevisionFormView'])}]});}['_createSaveRevisionFormView'](){const _0xa66f47=this['editor'],_0x1e727a=_0xa66f47['locale'];this['_saveRevisionFormView']=new me(_0x1e727a,_0xa66f47['config']['get']('revisionHistory.requireRevisionName')),this['_saveRevisionFormView']['render']();}}class z extends _0x2f3954{['changeId'];['_model'];constructor(_0x542275,_0x85927b){super(_0x542275),this['_model']=_0x85927b,this['changeId']=_0x85927b['id'];const _0x4cd292=this['bindTemplate'],_0x15106e=R(_0x542275,_0x85927b['data']['isSuggestion']?'Suggested\x20by':'add'==_0x85927b['type']?'Added\x20by':'Removed\x20by');this['set']('type',_0x85927b['type']),this['setTemplate']({'tag':'div','attributes':{'class':['ck-annotation','ck-revision-change',_0x4cd292['to']('type',_0x10229d=>'ck-revision-change__'+_0x10229d)],'tabindex':-0x1},'children':[{'tag':'span','children':[{'tag':'span','attributes':{'class':['ck-revision-change__label']},'children':[{'text':_0x15106e}]},{'text':'\x20'+_0x85927b['author']['name']}]}]});}['focus'](){this['element']['focus']();}}class G extends/* #__PURE__ -- @preserve */
|
|
26
|
+
_0xf83e66(){['id'];['author'];['type'];['data'];['rootName'];constructor(_0x26e242){super(),this['id']=_0x26e242['id']||_0x54a7d7(),this['author']=_0x26e242['author'],this['type']=_0x26e242['type'],this['data']=_0x26e242['data']||{},this['rootName']=_0x26e242['rootName'],this['set']('createdAt',_0x26e242['createdAt']);}['toJSON'](){return{'id':this['id'],'authorId':this['author']['id'],'type':this['type'],'data':this['data'],'createdAt':this['createdAt']};}}class J{['newRevisionId'];['oldRevisionId'];['changes'];constructor(_0x4a4a4a,_0x2ce881){this['newRevisionId']=_0x4a4a4a,this['oldRevisionId']=_0x2ce881,this['changes']=new _0x43d864();}['_setChanges'](_0x1793f4){for(const _0x267d97 of _0x1793f4)this['changes']['add'](_0x267d97);}}class l extends _0x42167a{['repository'];['adapter']=null;['_utils'];['_activeViewTarget'];['_changeView'];['_changeIdToChange'];['_balloon'];static get['pluginName'](){return'RevisionViewer';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[_0x376a79,_0x1f697a,S,$];}constructor(_0x349f74){super(_0x349f74),this['repository']=this['editor']['plugins']['get']('RevisionsRepository'),this['_utils']=this['editor']['plugins']['get']('RevisionHistoryUtils'),this['set']('activeChange',null),this['set']('activeView',null),this['_activeViewTarget']=null,this['set']('diff',null),this['set']('isReady',!0x1),this['set']('isEnabled',!0x0),this['on']('change:isEnabled',(_0x5b9c1d,_0x5099f1,_0x3f60fc)=>{this['activeChange']=null,this['activeView']=null,this['editor']['editing']['view']['change'](_0x20f40c=>{for(const _0xe8d66e of this['editor']['editing']['view']['document']['roots'])_0x3f60fc?_0x20f40c['removeClass']('ck-editor__editable__overlay',_0xe8d66e):_0x20f40c['addClass']('ck-editor__editable__overlay',_0xe8d66e);});}),this['bind']('isNavigationMode')['to'](this,'activeChange',_0x4eba66=>null!==_0x4eba66),this['bind']('currentChangeNumber')['to'](this,'isReady',this,'diff',this,'activeChange',(_0x3eccf6,_0x56802e,_0x59bf2f)=>_0x3eccf6&&_0x59bf2f?_0x56802e['changes']['getIndex'](_0x59bf2f):0x0),this['bind']('numberOfChanges')['to'](this,'isReady',this,'diff',(_0x349fd5,_0x487dec)=>_0x349fd5?_0x487dec['changes']['length']:0x0),this['_changeView']=null,this['_changeIdToChange']=new Map(),this['_balloon']=this['editor']['plugins']['get'](_0x1f697a);}['init'](){const _0x3c7625=this['editor'],_0x54df8f=new rt(_0x3c7625,{'direction':'backward'}),_0x4c1ef2=new rt(_0x3c7625,{'direction':'forward'});(_0x3c7625['commands']['add']('showPreviousChange',_0x54df8f),_0x3c7625['commands']['add']('showNextChange',_0x4c1ef2),_0x3c7625['commands']['add']('restoreRevision',new nt(_0x3c7625)),this['on']('change:numberOfChanges',()=>{_0x54df8f['refresh'](),_0x4c1ef2['refresh']();}),this['_setConversion'](),this['_initInteractions'](),_0x3c7625['enableReadOnlyMode']('revision-viewer'),_0x3c7625['plugins']['has']('WidgetToolbarRepository'))&&_0x3c7625['plugins']['get']('WidgetToolbarRepository')['forceDisabled']('revision-viewer');}async['getRevisionDocumentData'](_0x4a51b9){return await this['_utils']['loadRevisionData'](_0x4a51b9,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x4a51b9);}async['getRevisionRootsAttributes'](_0x5885f0){return await this['_utils']['loadRevisionData'](_0x5885f0,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x5885f0);}async['compare'](_0x390bd8,_0x20530f,_0x26160f=!0x1){if(!this['isEnabled'])return;const _0x5cbc3c=this['diff'],_0x4af80b=this['repository'],_0x31cf38='string'==typeof _0x390bd8?_0x4af80b['getRevision'](_0x390bd8):_0x390bd8,_0x4b2f34='string'==typeof _0x20530f?_0x4af80b['getRevision'](_0x20530f):_0x20530f,_0x1105a5=_0x31cf38['id'],_0x57a87a=_0x4b2f34?_0x4b2f34['id']:null;if(!_0x26160f&&this['diff']&&this['diff']['newRevisionId']===_0x1105a5&&this['diff']['oldRevisionId']===_0x57a87a)return Promise['resolve']();this['isReady']=!0x1,this['activeView']=null,this['activeChange']=null,this['diff']=new J(_0x1105a5,_0x57a87a);const _0x2e0d94=this['_getRevisionsRange'](_0x31cf38,_0x4b2f34,!0x0)['map'](_0x1c4255=>this['_utils']['loadRevisionData'](_0x1c4255,this['adapter']));return _0x2e0d94['push'](new Promise(_0x21b580=>{setTimeout(_0x21b580,0x14);})),Promise['all'](_0x2e0d94)['then'](()=>{if(!this['isEnabled'])return;this['_cleanUp']();const _0x5d1be3=this['_getDiff'](_0x1105a5,_0x57a87a);for(const _0x54ad50 of _0x5d1be3['changes'])this['_changeIdToChange']['set'](_0x54ad50['id'],_0x54ad50);this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x1a73bc=>{for(const _0x416b76 of this['editor']['model']['document']['getRootNames']())_0x1a73bc['detachRoot'](_0x416b76);for(const _0x54f8b6 of Object['keys'](_0x5d1be3['model'])){const _0x39ff2d=_0x1a73bc['addRoot'](_0x54f8b6);for(const _0x39f705 of Object['keys'](_0x5d1be3['attributes'][_0x54f8b6]))_0x1a73bc['setAttribute'](_0x39f705,_0x5d1be3['attributes'][_0x54f8b6][_0x39f705],_0x39ff2d);_0x1a73bc['insert'](_0x5d1be3['model'][_0x54f8b6],_0x39ff2d,0x0);}}),this['diff']['_setChanges'](this['_sortAndFilterDiffChanges'](_0x5d1be3['changes'])),this['isReady']=!0x0;})['catch'](_0x116a5c=>{console['error'](_0x116a5c),this['_cleanUp'](),_0x5cbc3c&&(this['diff']=_0x5cbc3c),this['isReady']=!0x0;});}['addRevisionData'](_0x5acd91,_0x57de33){const _0x1f27c4=this['repository']['createRevision'](_0x5acd91);return _0x1f27c4['on']('_update',(_0x3ff34e,_0x30daba,_0x4fb553)=>_0x57de33(_0x30daba,_0x4fb553,_0x1f27c4)),this['repository']['addRevision'](_0x1f27c4),_0x1f27c4;}['_cleanUp'](){this['activeChange']=null,this['_cleanMarkers'](),this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=null,this['_changeIdToChange']['clear'](),this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x1bb2fc=>{for(const _0x10ae33 of this['editor']['model']['document']['getRootNames']())_0x1bb2fc['detachRoot'](_0x10ae33);});}['_sortAndFilterDiffChanges'](_0x11bc3a){const _0x529523=[],_0x2823b1=new Map();for(const _0x2631bb of this['editor']['model']['document']['getRootNames']()){const _0x53aa0d=this['editor']['editing']['view']['getDomRoot'](_0x2631bb);if(!_0x53aa0d)continue;const _0x202758=_0x53aa0d['getClientRects']()['item'](0x0);_0x202758&&(_0x529523['push'](_0x2631bb),_0x2823b1['set'](_0x2631bb,_0x202758));}return _0x529523['sort']((_0x30d4a5,_0xb56577)=>{const _0x20a615=_0x2823b1['get'](_0x30d4a5),_0x166aeb=_0x2823b1['get'](_0xb56577);return _0x20a615['y']-_0x166aeb['y']||_0x20a615['x']-_0x166aeb['x'];}),(_0x11bc3a=_0x11bc3a['filter'](_0x17bfc9=>_0x529523['includes'](_0x17bfc9['rootName'])))['sort']((_0x3404df,_0xf4ae8a)=>_0x529523['indexOf'](_0x3404df['rootName'])-_0x529523['indexOf'](_0xf4ae8a['rootName'])),_0x11bc3a;}['_makeTape'](_0xef00e){const _0x2b43f7=Array['from'](_0xef00e['markers'])['filter'](([_0x236f93,_0x543af9])=>_0x236f93['startsWith']('revision:')&&!_0x543af9['isCollapsed']),_0x1d8bb0=Array['from'](this['editor']['model']['createRangeIn'](_0xef00e)['getWalker']({'singleCharacters':!0x0}));if(0x0!=_0x2b43f7['length'])for(const _0x376f37 of _0x1d8bb0){const [_0x4837e2,_0x14c07b]=_0x2b43f7[0x0],[,_0x59a7a7,_0x56366d]=_0x4837e2['split'](':');if(_0x14c07b['end']['isEqual'](_0x376f37['nextPosition'])&&_0x2b43f7['shift'](),(_0x376f37['previousPosition']['isEqual'](_0x14c07b['start'])||_0x376f37['previousPosition']['isAfter'](_0x14c07b['start']))&&('insertion'==_0x59a7a7?_0x376f37['isAdded']={'userId':_0x56366d}:'deletion'==_0x59a7a7&&(_0x376f37['isRemoved']={'userId':_0x56366d})),0x0==_0x2b43f7['length'])break;}return _0x1d8bb0;}['_refreshStartEndIndex'](_0x2b7837){const _0x2a49c6=new Map();for(let _0x682865=0x0;_0x682865<_0x2b7837['length'];_0x682865++)'text'===_0x2b7837[_0x682865]['type']?(_0x2b7837[_0x682865]['item']['startIndex']=_0x682865,_0x2b7837[_0x682865]['item']['endIndex']=_0x682865):('elementStart'===_0x2b7837[_0x682865]['type']?_0x2b7837[_0x682865]['item']['startIndex']=_0x682865:'elementEnd'===_0x2b7837[_0x682865]['type']&&(_0x2b7837[_0x682865]['item']['endIndex']=_0x682865),_0x2a49c6['set'](_0x2b7837[_0x682865]['id'],_0x682865));for(const _0x5192c9 of _0x2a49c6['values']())'elementStart'===_0x2b7837[_0x5192c9]['type']?_0x2b7837[_0x5192c9]['item']['endIndex']=_0x2a49c6['get'](_0x2b7837[_0x5192c9]['pairId']):'elementEnd'===_0x2b7837[_0x5192c9]['type']&&(_0x2b7837[_0x5192c9]['item']['startIndex']=_0x2a49c6['get'](_0x2b7837[_0x5192c9]['pairId']));}['_processTape'](_0x3c3e95){for(let _0x511eae=0x0;_0x511eae<_0x3c3e95['length'];_0x511eae++){if('elementStart'===_0x3c3e95[_0x511eae]['type'])_0x3c3e95[_0x511eae]['item']['startIndex']=_0x511eae;else{if('elementEnd'===_0x3c3e95[_0x511eae]['type']){_0x3c3e95[_0x511eae]['item']['endIndex']=_0x511eae;const _0x8451f9=_0x3c3e95[_0x511eae]['item']['startIndex'];_0x3c3e95[_0x8451f9]['pairId']=_0x3c3e95[_0x511eae]['id'],_0x3c3e95[_0x511eae]['pairId']=_0x3c3e95[_0x8451f9]['id'];}else _0x3c3e95[_0x511eae]['item']['startIndex']=_0x511eae,_0x3c3e95[_0x511eae]['item']['endIndex']=_0x511eae,_0x3c3e95[_0x511eae]['pairId']=null;}_0x3c3e95[_0x511eae]['markersStart']||(_0x3c3e95[_0x511eae]['markersStart']=[],_0x3c3e95[_0x511eae]['markersEnd']=[]);}}['_markInsertions'](_0x10964d,_0x173186){const _0x5790a7=_0x10964d['filter'](_0x1d0663=>!_0x1d0663['isAdded']);for(let _0x1d9398=0x0;_0x1d9398<_0x173186['length'];_0x1d9398++)_0x173186[_0x1d9398]['isAdded']&&(_0x5790a7[_0x1d9398]['isAdded']=_0x173186[_0x1d9398]['isAdded']);}['_getDiff'](_0x1857bf,_0x30ac34=null){const _0x4e8393=this['repository']['getRevision'](_0x1857bf),_0x56f36f=_0x30ac34?this['repository']['getRevision'](_0x30ac34):null,_0x598de6=this['_getRevisionsRange'](_0x4e8393,_0x56f36f),_0x58a956=_0x598de6[_0x598de6['length']-0x1],_0x384d2b=new Map(),_0x1d9943={'model':{},'attributes':{},'changes':[]},_0x59b997=new Set(),_0x11f409=new Map();for(let _0xce0179=_0x598de6['length']-0x1;_0xce0179>=0x0;_0xce0179--){const _0x104827=_0x598de6[_0xce0179];for(const _0x2a03e9 of Object['keys'](_0x104827['diffData']))if(_0x104827['diffData'][_0x2a03e9]['attachChange']){const _0xc0195f=_0x104827['diffData'][_0x2a03e9]['attachChange'];_0xc0195f['isAttached']?(_0x59b997['add'](_0x2a03e9),_0x11f409['has'](_0x2a03e9)&&_0x11f409['get'](_0x2a03e9)['userId']==_0xc0195f['userId']?_0x11f409['delete'](_0x2a03e9):_0x11f409['set'](_0x2a03e9,_0xc0195f)):_0x11f409['has'](_0x2a03e9)?(_0x59b997['delete'](_0x2a03e9),_0x11f409['delete'](_0x2a03e9)):(_0x59b997['add'](_0x2a03e9),_0x11f409['set'](_0x2a03e9,_0xc0195f));}else _0x59b997['add'](_0x2a03e9);}for(const _0x15186a of _0x59b997){const _0x7f5085=_0x11f409['has'](_0x15186a)&&!_0x11f409['get'](_0x15186a)['isAttached'];let _0x4360ac=_0x7f5085?_0x598de6['length']-0x1:0x0;const _0x40ce0c=_0x7f5085?-0x1:0x1;for(;_0x598de6[_0x4360ac];){const _0x246e6b=_0x598de6[_0x4360ac];if(_0x246e6b['diffData'][_0x15186a]){const _0x17a285=_0x7f5085?_0x246e6b['diffData'][_0x15186a]['attributesBefore']:_0x246e6b['diffData'][_0x15186a]['attributesAfter'];_0x1d9943['attributes'][_0x15186a]=_0x17a285?_0x1bef90(_0x17a285):{};break;}_0x4360ac+=_0x40ce0c;}}for(const _0x37453e of _0x598de6){_0x37453e['model']={};for(const _0x1f543b of _0x37453e['authors'])_0x384d2b['set'](_0x1f543b['id'],_0x1f543b);for(const _0x332701 of _0x59b997){const _0x26df47=_0x37453e['diffData'][_0x332701]?_0x37453e['diffData'][_0x332701]['insertions']:'[]',_0x2b04ce=_0x37453e['diffData'][_0x332701]?_0x37453e['diffData'][_0x332701]['deletions']:'[]';_0x37453e['model'][_0x332701]={'insertions':this['_utils']['_makeModelFromViewString'](_0x26df47),'deletions':this['_utils']['_makeModelFromViewString'](_0x2b04ce)};}}for(const _0x17bb87 of _0x59b997){let _0x105427=null,_0x5837f0=0x0;const _0x1be1cf=new Map(Array['from'](_0x4e8393['model'][_0x17bb87]['insertions']['markers'])['filter'](([_0x49fdf7])=>!_0x49fdf7['startsWith']('revision:')));let _0x2184a6=0x0;for(const _0x22ce5e of _0x598de6){const _0x4ddef0=this['_makeTape'](_0x22ce5e['model'][_0x17bb87]['insertions']);_0x22ce5e==_0x4e8393?(_0x105427=_0x4ddef0,_0x5837f0=_0x105427['length'],_0x105427['forEach'](_0x5b6657=>{_0x5b6657['id']=_0x2184a6++;}),this['_processTape'](_0x105427)):this['_markInsertions'](_0x105427,_0x4ddef0);const _0x4160f5=_0x105427['filter'](_0x28e70a=>!_0x28e70a['isAdded'])['map'](_0x2c8117=>_0x2c8117['id']);let _0xcd7721=0x0;const _0xc9961c=this['_makeTape'](_0x22ce5e['model'][_0x17bb87]['deletions']);_0xc9961c['forEach'](_0x2837c8=>{_0x2837c8['isRemoved']?_0x2837c8['id']=_0x5837f0++:_0x2837c8['id']=_0x4160f5[_0xcd7721++];}),this['_processTape'](_0xc9961c),this['_setDistance'](_0x105427,'isAdded'),this['_setDistance'](_0xc9961c,'isRemoved'),_0x22ce5e==_0x4e8393&&this['_markMarkers'](_0x105427,_0x1be1cf),_0x105427=this['_joinTapes'](_0x105427,_0xc9961c),this['_refreshStartEndIndex'](_0x105427),this['_setDistance'](_0x105427,'isRemoved');}_0x105427=_0x105427['filter'](_0x2b4c69=>!(_0x2b4c69['isAdded']&&_0x2b4c69['isRemoved']));const _0x1226fb=new Map(_0x58a956['model'][_0x17bb87]['deletions']['markers']),_0x2854db=new Set(_0x1be1cf['keys']());for(const _0xaa8ae7 of _0x1226fb['keys']())_0x2854db['delete'](_0xaa8ae7);this['_markSuggestions'](_0x105427,_0x2854db),this['_fixObsoleteTags'](_0x105427),_0x105427=this['_removeMissingPairs'](_0x105427),_0x105427=this['_markMismatchedRemovedTags'](_0x105427),_0x105427=this['_removeUnsupportedChanges'](_0x105427);const {root:_0x511430,changes:_0x107156}=this['_makeModelFromTape'](_0x105427,_0x384d2b,_0x17bb87);_0x1d9943['model'][_0x17bb87]=_0x511430;const _0x124b2b=_0x11f409['get'](_0x17bb87);if(_0x124b2b){const _0x24ea68=_0x384d2b['get'](_0x124b2b['userId']),_0x5e876a=new G({'author':_0x24ea68,'type':_0x124b2b['isAttached']?'add':'remove','data':{'isOnRoot':!0x0},'createdAt':new Date(),'rootName':_0x17bb87});_0x107156['unshift'](_0x5e876a),_0x1d9943['attributes'][_0x17bb87]['revisionHistoryAttachChange']=_0x5e876a['id'];}_0x1d9943['changes']=_0x1d9943['changes']['concat'](_0x107156);}return _0x1d9943;}['_markMarkers'](_0x1bf34d,_0x495b84){for(let _0x365d57=0x0;_0x365d57<_0x1bf34d['length'];_0x365d57++)for(const [_0x51732b,_0x5d0af0]of _0x495b84)!_0x5d0af0['isCollapsed']&&_0x5d0af0['start']['isEqual'](_0x1bf34d[_0x365d57]['previousPosition'])&&_0x1bf34d[_0x365d57]['markersStart']['push'](_0x51732b),_0x5d0af0['end']['isEqual'](_0x1bf34d[_0x365d57]['nextPosition'])&&_0x1bf34d[_0x365d57]['markersEnd']['push'](_0x51732b);}['_joinTapes'](_0x491310,_0x2a6315){let _0x4d2bb2=[],_0x446e35=0x0,_0x36da7b=0x0;for(;_0x446e35<_0x491310['length']||_0x36da7b<_0x2a6315['length'];){const _0x51e73b=_0x491310[_0x446e35]||{},_0x4856f1=_0x2a6315[_0x36da7b]||{};if(_0x51e73b['id']==_0x4856f1['id'])_0x446e35++,_0x36da7b++,_0x4d2bb2['push'](_0x51e73b);else{if(_0x4856f1['isRemoved']&&_0x51e73b['isAdded']){const {commonTape:_0x12c1c1,iEnd:_0x364da0,jEnd:_0x5f539c}=this['_threeWayMerge'](_0x491310,_0x446e35,_0x2a6315,_0x36da7b);_0x4d2bb2=_0x4d2bb2['concat'](_0x12c1c1),_0x446e35=_0x364da0,_0x36da7b=_0x5f539c;}else _0x4856f1['isRemoved']?(_0x36da7b++,_0x4d2bb2['push'](_0x4856f1)):(_0x446e35++,_0x4d2bb2['push'](_0x51e73b));}}return _0x4d2bb2;}['_markSuggestions'](_0x4ede3c,_0x278dde){const _0x11aa9c=[];for(let _0x357f21=0x0;_0x357f21<_0x4ede3c['length'];_0x357f21++){for(let _0x448cf7=0x0;_0x448cf7<_0x4ede3c[_0x357f21]['markersStart']['length'];_0x448cf7++){const _0x2987a9=_0x4ede3c[_0x357f21]['markersStart'][_0x448cf7];if(!_0x278dde['has'](_0x2987a9))continue;const {group:_0x40d92a,type:_0x1f678e,authorId:_0x4fdfdc}=_0x38e9c3(_0x2987a9);'revision-suggestion'!=_0x40d92a||'insertion'!=_0x1f678e&&'deletion'!=_0x1f678e||(_0x11aa9c['unshift']({'type':_0x1f678e,'name':_0x2987a9,'userId':_0x4fdfdc}),_0x4ede3c[_0x357f21]['markersStart']['splice'](_0x448cf7,0x1),_0x448cf7--);}_0x2593aa(_0x4ede3c[_0x357f21]);for(let _0x211783=0x0;_0x211783<_0x4ede3c[_0x357f21]['markersEnd']['length'];_0x211783++){const _0x262921=_0x4ede3c[_0x357f21]['markersEnd'][_0x211783];if(!_0x278dde['has'](_0x262921))continue;const {group:_0x5cefa8,type:_0x1caa67}=_0x38e9c3(_0x262921);if('revision-suggestion'!=_0x5cefa8||'insertion'!=_0x1caa67&&'deletion'!=_0x1caa67)continue;_0x4ede3c[_0x357f21]['markersEnd']['splice'](_0x211783,0x1),_0x211783--;const _0x3e07f=_0x11aa9c['findIndex'](_0x45da5b=>_0x45da5b['name']==_0x262921);_0x3e07f>-0x1&&_0x11aa9c['splice'](_0x3e07f,0x1);}}function _0x38e9c3(_0x487566){const _0x248e85=_0x487566['split'](':');return{'group':_0x248e85[0x0],'type':_0x248e85[0x1],'subType':_0x248e85['length']>=0x5?_0x248e85[0x2]:null,'id':_0x248e85['length']<0x5?_0x248e85[0x2]:_0x248e85[0x3],'authorId':_0x248e85['length']<0x5?_0x248e85[0x3]:_0x248e85[0x4],'markerCount':0x6==_0x248e85['length']?_0x248e85[0x5]:null};}function _0x2593aa(_0xa369bc){for(let _0x8d28a6=0x0;_0x8d28a6<_0x11aa9c['length'];_0x8d28a6++){if(_0xa369bc['isAdded']&&'insertion'==_0x11aa9c[_0x8d28a6]['type']&&_0xa369bc['isAdded']['userId']==_0x11aa9c[_0x8d28a6]['userId'])return _0xa369bc['isAddSuggestion']=_0x11aa9c[_0x8d28a6],void delete _0xa369bc['isAdded'];if(!_0xa369bc['isAdded']&&!_0xa369bc['isRemoved']&&'deletion'==_0x11aa9c[_0x8d28a6]['type'])return void(_0xa369bc['isRemoveSuggestion']=_0x11aa9c[_0x8d28a6]);}}}['_setDistance'](_0x1c88e5,_0x5c1a48){let _0xcf0ecc=0x0,_0x7f9f96=!0x1;const _0x3261b1=new Map();for(const _0x9690fb of _0x1c88e5)_0x9690fb[_0x5c1a48]?_0x7f9f96&&(_0xcf0ecc++,_0x7f9f96=!0x1):(_0xcf0ecc++,_0x7f9f96=!0x0),_0x3261b1['set'](_0x9690fb['id'],_0xcf0ecc);for(let _0x2ed6b8=0x0;_0x2ed6b8<_0x1c88e5['length'];_0x2ed6b8++){if('isRemoved'==_0x5c1a48&&_0x1c88e5[_0x2ed6b8]['isAdded']||'isAdded'==_0x5c1a48&&_0x1c88e5[_0x2ed6b8]['isRemoved'])continue;if('text'==_0x1c88e5[_0x2ed6b8]['type']){_0x1c88e5[_0x2ed6b8]['distance']=0x0;continue;}const _0x30df03=_0x3261b1['get'](_0x1c88e5[_0x2ed6b8]['pairId']),_0x2dd4a2=_0x3261b1['get'](_0x1c88e5[_0x2ed6b8]['id']);_0x1c88e5[_0x2ed6b8]['distance']=_0x30df03-_0x2dd4a2;}}['_getRevisionsRange'](_0x2d6d99,_0x14220c,_0x5392b2=!0x1){const _0x2f127b=[];let _0x5295e3=this['repository']['getIndex'](_0x2d6d99),_0x3614b9=this['repository']['getIndex'](_0x14220c);for(-0x1==_0x3614b9&&(_0x3614b9=this['repository']['_revisions']['length'],_0x5392b2=!0x1);_0x5295e3<_0x3614b9;)_0x2f127b['push'](this['repository']['getRevision'](_0x5295e3)),_0x5295e3++;return _0x5392b2&&_0x2f127b['push'](this['repository']['getRevision'](_0x5295e3)),_0x2f127b;}['_threeWayMerge'](_0x561f17,_0x20f177,_0x2b9438,_0x5297b7){const _0x78a6fc=this['editor']['model']['schema'];let _0x1f146b=_0x20f177;for(;_0x561f17[_0x1f146b]&&_0x561f17[_0x1f146b]['isAdded'];)_0x1f146b++;let _0x47eec1=_0x5297b7;for(;_0x2b9438[_0x47eec1]&&_0x2b9438[_0x47eec1]['isRemoved'];)_0x47eec1++;_0x4fede0(_0x561f17,_0x20f177,_0x1f146b),_0x4fede0(_0x2b9438,_0x5297b7,_0x47eec1);const _0x43d49e=_0x2b9438['slice'](_0x5297b7,_0x47eec1)['concat'](_0x561f17['slice'](_0x20f177,_0x1f146b));return _0x43d49e['sort']((_0x24928c,_0x48f7bb)=>_0x24928c['side']!=_0x48f7bb['side']?_0x24928c['side']-_0x48f7bb['side']:_0x24928c['level']!=_0x48f7bb['level']?_0x24928c['level']-_0x48f7bb['level']:_0x24928c['distance']!=_0x48f7bb['distance']?_0x48f7bb['distance']-_0x24928c['distance']:!!_0x24928c['isAdded']!=!!_0x48f7bb['isAdded']?-0x1==_0x24928c['side']||0x0==_0x24928c['side']?_0x24928c['isAdded']?-0x1:0x1:_0x24928c['isAdded']?0x1:-0x1:_0x24928c['index']-_0x48f7bb['index']),{'commonTape':_0x43d49e,'iEnd':_0x1f146b,'jEnd':_0x47eec1};function _0x4fede0(_0x57a506,_0x572024,_0x20cd42){let _0x4798b9=-0x1,_0x2f9c3d=Number['POSITIVE_INFINITY'],_0x3a47a1=!0x0;for(let _0x3b3e62=_0x572024;_0x3b3e62<_0x20cd42;_0x3b3e62++)if(_0x78a6fc['isInline'](_0x57a506[_0x3b3e62]['item'])||(_0x3a47a1=!0x1),_0x57a506[_0x3b3e62]['item']['startIndex']<_0x572024&&(_0x4798b9=_0x3b3e62),_0x57a506[_0x3b3e62]['item']['endIndex']>=_0x20cd42){_0x2f9c3d=_0x3b3e62;break;}_0x3a47a1&&(_0x4798b9=_0x20cd42-0x1);for(let _0x765cf4=_0x572024;_0x765cf4<_0x20cd42;_0x765cf4++)_0x57a506[_0x765cf4]['side']=_0x765cf4<=_0x4798b9?-0x1:_0x765cf4<_0x2f9c3d?0x0:0x1,_0x57a506[_0x765cf4]['index']=_0x765cf4;let _0x25630d=0x0;for(let _0x454bcf=_0x572024;_0x454bcf<=_0x4798b9;_0x454bcf++)0x0==_0x57a506[_0x454bcf]['distance']?_0x57a506[_0x454bcf]['level']=_0x25630d:(_0x25630d++,_0x57a506[_0x454bcf]['level']=_0x25630d,_0x25630d++);for(let _0x6e4ffd=_0x572024;_0x6e4ffd<_0x20cd42;_0x6e4ffd++)0x0==_0x57a506[_0x6e4ffd]['side']&&(_0x57a506[_0x6e4ffd]['level']=_0x25630d);_0x25630d=0x0;for(let _0x229b00=_0x20cd42-0x1;_0x229b00>=_0x2f9c3d;_0x229b00--)0x0==_0x57a506[_0x229b00]['distance']?_0x57a506[_0x229b00]['level']=_0x25630d:(_0x25630d--,_0x57a506[_0x229b00]['level']=_0x25630d,_0x25630d--);}}['_fixObsoleteTags'](_0x105c57){const _0x38a18a=new Map(),_0x4eb3d2=this['editor']['model']['schema'];for(let _0x3f80ab=0x1;_0x3f80ab<_0x105c57['length'];_0x3f80ab++){let _0x56cb68,_0x126468,_0x3b0a2f;const _0x21889b=_0x105c57[_0x3f80ab],_0x32251b=_0x105c57[_0x3f80ab-0x1];if('text'==_0x21889b['type'])continue;if(_0x21889b['type']!=_0x32251b['type'])continue;if(!_0x4eb3d2['isBlock'](_0x32251b['item'])||_0x4eb3d2['isLimit'](_0x32251b['item']))continue;if(!_0x4eb3d2['isBlock'](_0x21889b['item'])||_0x4eb3d2['isLimit'](_0x21889b['item']))continue;if((_0x105c57[_0x3f80ab]['isAdded']||_0x105c57[_0x3f80ab]['isAddSuggestion'])&&_0x105c57[_0x3f80ab-0x1]['isRemoved'])_0x56cb68=_0x105c57[_0x3f80ab],_0x126468=_0x105c57[_0x3f80ab-0x1],_0x3b0a2f=_0x3f80ab-0x1;else{if(!_0x105c57[_0x3f80ab]['isRemoved']||!_0x105c57[_0x3f80ab-0x1]['isAdded']&&!_0x105c57[_0x3f80ab-0x1]['isAddSuggestion'])continue;_0x56cb68=_0x105c57[_0x3f80ab-0x1],_0x126468=_0x105c57[_0x3f80ab],_0x3b0a2f=_0x3f80ab;}const _0x48f51a=_0x56cb68['level']==_0x126468['level'],_0x42bf92=Math['abs'](_0x56cb68['level'])<Math['abs'](_0x126468['level'])&&0x0==_0x126468['distance'];(_0x48f51a||_0x42bf92)&&(_0x38a18a['set'](_0x126468['id'],_0x56cb68['id']),_0x105c57['splice'](_0x3b0a2f,0x1),_0x3f80ab--,_0x56cb68['isAdded']=!0x1);}for(let _0x554666=0x0;_0x554666<_0x105c57['length'];_0x554666++)_0x38a18a['has'](_0x105c57[_0x554666]['pairId'])&&(_0x105c57[_0x554666]['pairId']=_0x38a18a['get'](_0x105c57[_0x554666]['pairId']));}['_removeMissingPairs'](_0x5ea651){const _0x44a423=new Set(_0x5ea651['map'](_0x436b89=>_0x436b89['id']));for(let _0xa78131=0x0;_0xa78131<_0x5ea651['length'];_0xa78131++)_0x44a423['has'](_0x5ea651[_0xa78131]['pairId'])||0x0==_0x5ea651[_0xa78131]['distance']||(_0x5ea651[_0xa78131]['isIncorrect']=!0x0);return _0x5ea651['filter'](_0x155605=>!_0x155605['isIncorrect']);}['_markMismatchedRemovedTags'](_0x3ee943){const _0x4df524=new Set();for(let _0x3de52d=0x0;_0x3de52d<_0x3ee943['length'];_0x3de52d++){if(_0x4df524['has'](_0x3ee943[_0x3de52d]['id'])&&_0x3ee943[_0x3de52d]['isRemoved']&&(_0x3ee943[_0x3de52d]['isIncorrect']=!0x0),_0x3ee943[_0x3de52d]['isIncorrect'])continue;if(0x0==_0x3ee943[_0x3de52d]['distance'])continue;if('elementStart'!=_0x3ee943[_0x3de52d]['type'])continue;if(null==_0x3ee943[_0x3de52d]['pairId'])continue;let _0x328f19=_0x3de52d+0x1,_0x46c7c5=0x0;for(;_0x3ee943[_0x328f19]['id']!=_0x3ee943[_0x3de52d]['pairId'];)'elementStart'==_0x3ee943[_0x328f19]['type']?_0x46c7c5++:'elementEnd'==_0x3ee943[_0x328f19]['type']&&_0x46c7c5--,_0x328f19++;if(0x0!=_0x46c7c5){if(_0x3ee943[_0x3de52d]['isRemoved'])_0x3ee943[_0x3de52d]['isIncorrect']=!0x0;else{for(;_0x328f19!=_0x3de52d;)_0x3ee943[_0x328f19]['isRemoved']&&0x0!=_0x3ee943[_0x328f19]['distance']&&(_0x3ee943[_0x328f19]['isIncorrect']=!0x0,_0x4df524['add'](_0x3ee943[_0x328f19]['pairId'])),_0x328f19--;}}}return _0x3ee943['filter'](_0x40bf82=>!_0x40bf82['isIncorrect']);}['_removeUnsupportedChanges'](_0x11b0fc){const _0x21986a=this['editor']['model']['schema'];for(let _0x454be2=0x0;_0x454be2<_0x11b0fc['length'];_0x454be2++){if(!(_0x11b0fc[_0x454be2]['isAdded']||_0x11b0fc[_0x454be2]['isAddSuggestion']||_0x11b0fc[_0x454be2]['isRemoved']||_0x11b0fc[_0x454be2]['isRemoveSuggestion']))continue;if(0x0==_0x11b0fc[_0x454be2]['distance'])continue;const _0x44e23d=_0x11b0fc[_0x454be2]['item'];_0x21986a['isBlock'](_0x44e23d)||_0x21986a['isLimit'](_0x44e23d)||(_0x11b0fc[_0x454be2]['isAdded']&&delete _0x11b0fc[_0x454be2]['isAdded'],_0x11b0fc[_0x454be2]['isAddSuggestion']&&delete _0x11b0fc[_0x454be2]['isAddSuggestion'],_0x11b0fc[_0x454be2]['isRemoveSuggestion']&&delete _0x11b0fc[_0x454be2]['isRemoveSuggestion'],_0x11b0fc[_0x454be2]['isRemoved']&&(_0x11b0fc[_0x454be2]['isIncorrect']=!0x0));}return _0x11b0fc['filter'](_0x1c2539=>!_0x1c2539['isIncorrect']);}['_makeModelFromTape'](_0x50b549,_0x29bfff,_0x23d57f){const _0xb99a42=new _0x27a5cb(),_0x1be0bd=[],_0x5a5d7e=new Map(),_0x5c3853=this['editor']['model'],_0x1ab3d7=_0x5c3853['schema'],_0xc0f53b=[_0xb99a42],_0x2f3980={},_0x38f50b={'isAdded':[],'isRemoved':[],'isAddSuggestion':[],'isRemoveSuggestion':[]};let _0x4bc94c=null;const _0x40adbe=[0x0];for(let _0x588b4f=0x0;_0x588b4f<_0x50b549['length'];_0x588b4f++)if('elementStart'===_0x50b549[_0x588b4f]['type']){_0x50b549[_0x588b4f]['previousPosition']=_0x5c3853['createPositionFromPath'](_0xb99a42,_0x40adbe);const _0x5ab6ca=new _0x2885e6(_0x50b549[_0x588b4f]['item']['name'],_0x50b549[_0x588b4f]['item']['getAttributes']());_0xc0f53b[0x0]['_appendChild'](_0x5ab6ca),_0x40adbe['push'](0x0),_0xc0f53b['unshift'](_0x5ab6ca),_0x50b549[_0x588b4f]['nextPosition']=_0x5c3853['createPositionFromPath'](_0xb99a42,_0x40adbe);}else'elementEnd'===_0x50b549[_0x588b4f]['type']?(_0xc0f53b['shift'](),_0x50b549[_0x588b4f]['previousPosition']=_0x5c3853['createPositionFromPath'](_0xb99a42,_0x40adbe),_0x40adbe['pop'](),_0x40adbe[_0x40adbe['length']-0x1]++,_0x50b549[_0x588b4f]['nextPosition']=_0x5c3853['createPositionFromPath'](_0xb99a42,_0x40adbe)):(_0x50b549[_0x588b4f]['previousPosition']=_0x5c3853['createPositionFromPath'](_0xb99a42,_0x40adbe),_0x4bc94c?_0x4bc94c['_data']+=_0x50b549[_0x588b4f]['item']['data']:_0x4bc94c=new _0x3b2670(_0x50b549[_0x588b4f]['item']['data'],_0x50b549[_0x588b4f]['item']['getAttributes']()),_0x50b549[_0x588b4f+0x1]&&'text'===_0x50b549[_0x588b4f+0x1]['type']&&_0x52588b(_0x4bc94c,_0x50b549[_0x588b4f+0x1]['item'])||(_0xc0f53b[0x0]['_appendChild'](_0x4bc94c),_0x4bc94c=null),_0x40adbe[_0x40adbe['length']-0x1]+=_0x50b549[_0x588b4f]['item']['offsetSize'],_0x50b549[_0x588b4f]['nextPosition']=_0x5c3853['createPositionFromPath'](_0xb99a42,_0x40adbe));for(let _0x2d2743=0x0;_0x2d2743<_0x50b549['length'];_0x2d2743++){const _0x41b7eb=_0x50b549[_0x2d2743]['previousPosition'],_0x5a19df=_0x50b549[_0x2d2743]['nextPosition'];for(const _0x33be57 of _0x50b549[_0x2d2743]['markersStart'])_0x5a5d7e['set'](_0x33be57,{'start':_0x41b7eb,'end':null});_0x450db6('isRemoveSuggestion',_0x2d2743,_0x41b7eb,_0x5a19df),_0x450db6('isAddSuggestion',_0x2d2743,_0x41b7eb,_0x5a19df),_0x450db6('isRemoved',_0x2d2743,_0x41b7eb,_0x5a19df),_0x450db6('isAdded',_0x2d2743,_0x41b7eb,_0x5a19df);for(const _0x21d381 of _0x50b549[_0x2d2743]['markersEnd']){const _0x18e5f4=_0x5a5d7e['get'](_0x21d381);_0x18e5f4?_0x18e5f4['end']=_0x5a19df:_0x5a5d7e['set'](_0x21d381,{'start':_0x5a19df,'end':_0x5a19df});}}for(const [_0x46359e,_0x14ed4a]of _0x5a5d7e){const _0x40ef38=this['editor']['model']['createRange'](_0x14ed4a['start'],_0x14ed4a['end']);_0xb99a42['markers']['set'](_0x46359e,_0x40ef38);}return _0x1be0bd['sort']((_0x4717ee,_0x5794c0)=>{const _0x54399f=_0xb99a42['markers']['get']('revision:'+_0x4717ee['id']),_0x2d3630=_0xb99a42['markers']['get']('revision:'+_0x5794c0['id']);return _0x54399f['start']['isBefore'](_0x2d3630['start'])?-0x1:_0x54399f['start']['isAfter'](_0x2d3630['start'])?0x1:_0x54399f['end']['isBefore'](_0x2d3630['end'])?-0x1:_0x54399f['end']['isAfter'](_0x2d3630['end'])?0x1:'add'===_0x4717ee['type']?-0x1:0x1;}),{'root':_0xb99a42,'changes':_0x1be0bd};function _0x450db6(_0x564b15,_0x5b7fb1,_0x26f2e0,_0x42db9f){const _0x5c71ff=!!_0x50b549[_0x5b7fb1][_0x564b15],_0x3c72e9=_0x5c71ff?_0x50b549[_0x5b7fb1][_0x564b15]['userId']:null,_0x50bed8=_0x5b7fb1===_0x50b549['length']-0x1,_0x6c3d9a=_0x38f50b[_0x564b15][0x0],_0xd4890e=_0x1ab3d7['isObject'](_0x50b549[_0x5b7fb1]['item']);!_0x2f3980[_0x564b15]&&_0x5c71ff?_0x2f3980[_0x564b15]={'start':_0x26f2e0,'tapeItem':_0x50b549[_0x5b7fb1],'userId':_0x3c72e9,'type':_0x564b15}:_0x2f3980[_0x564b15]&&!_0x5c71ff?(_0x2f3980[_0x564b15]['end']=_0x26f2e0,_0x2b4d85(_0x2f3980[_0x564b15]),_0x2f3980[_0x564b15]=null):_0x2f3980[_0x564b15]&&_0x5c71ff&&_0x2f3980[_0x564b15]['userId']!==_0x3c72e9&&(_0x2f3980[_0x564b15]['end']=_0x26f2e0,_0x6c3d9a&&_0x6c3d9a['userId']===_0x2f3980[_0x564b15]['userId']||_0x2b4d85(_0x2f3980[_0x564b15]),_0x2f3980[_0x564b15]={'start':_0x26f2e0,'tapeItem':_0x50b549[_0x5b7fb1],'userId':_0x3c72e9,'type':_0x564b15}),_0x2f3980[_0x564b15]&&_0xd4890e&&('elementStart'!==_0x50b549[_0x5b7fb1]['type']||_0x6c3d9a&&_0x6c3d9a['userId']===_0x3c72e9||_0x38f50b[_0x564b15]['unshift']({'userId':_0x3c72e9,'object':_0x50b549[_0x5b7fb1]['item'],'change':_0x2f3980[_0x564b15]}),'elementEnd'===_0x50b549[_0x5b7fb1]['type']&&_0x6c3d9a&&_0x6c3d9a['object']===_0x50b549[_0x5b7fb1]['item']&&(_0x38f50b[_0x564b15]['shift'](),_0x2f3980[_0x564b15]=_0x6c3d9a['change'])),_0x2f3980[_0x564b15]&&_0x50bed8&&(_0x2f3980[_0x564b15]['end']=_0x42db9f,_0x2b4d85(_0x2f3980[_0x564b15]),_0x2f3980[_0x564b15]=null);}function _0x2b4d85({start:_0x5eefd3,end:_0x27ec1c,tapeItem:_0x3d2d2b,userId:_0x589c1d,type:_0x51630a}){const _0x11d793=_0x3d2d2b['item'],_0x39dc8c=_0x5c3853['schema']['isBlock'](_0x11d793)&&!_0x5c3853['schema']['isLimit'](_0x11d793),_0x1973c3=_0x5eefd3['nodeAfter']==_0x27ec1c['parent']&&_0x27ec1c['isAtStart'];if(_0x39dc8c&&_0x1973c3)return;const _0x5f1e52=_0x5c3853['createRange'](_0x5eefd3,_0x27ec1c),_0x5c3a14=_0x29bfff['get'](_0x589c1d),_0x452082=new G({'author':_0x5c3a14,'type':'isAdded'==_0x51630a||'isAddSuggestion'==_0x51630a?'add':'remove','data':{'isSuggestion':'isAddSuggestion'==_0x51630a||'isRemoveSuggestion'==_0x51630a},'createdAt':new Date(),'rootName':_0x23d57f});_0x1be0bd['push'](_0x452082),_0xb99a42['markers']['set']('revision:'+_0x452082['id'],_0x5f1e52);}function _0x52588b(_0x35efbf,_0x218c07){const _0x3d52b4=_0x35efbf['getAttributes'](),_0x303070=_0x218c07['getAttributes']();for(const _0x4fc538 of _0x3d52b4){if(_0x4fc538[0x1]!==_0x218c07['getAttribute'](_0x4fc538[0x0]))return!0x1;_0x303070['next']();}return _0x303070['next']()['done'];}}['_setConversion'](){this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision','view':_0x591558=>{const _0xb9325d=_0x591558['markerName']['split'](':')[0x1],_0x395e0c=this['_getChangeFromId'](_0xb9325d);if(!_0x395e0c)return null;const _0x36c923='add'==_0x395e0c['type']?'insertion':'deletion',_0x996137=['ck-suggestion-marker','ck-suggestion-marker-'+_0x36c923];return _0x395e0c['data']['isSuggestion']&&_0x996137['push']('ck-suggestion-marker-'+_0x36c923+'-new'),this['activeChange']==_0x395e0c&&_0x996137['push']('ck-suggestion-marker--active'),{'classes':_0x996137,'attributes':{'data-change-id':_0xb9325d}};}}),this['editor']['conversion']['for']('upcast')['add'](_0x55ee80=>{_0x55ee80['on']('element:pre',(_0x24a94a,_0xb1a65c,_0x32715f)=>{const _0x381a35=_0xb1a65c['viewItem']['getChild'](0x0);if(!_0x381a35||!_0x381a35['is']('element','code'))return;if(!_0x32715f['consumable']['consume'](_0x381a35,{'attributes':['vid_start','vid_end']}))return;const _0x24f64e=_0xb1a65c['modelRange']['start']['nodeAfter'];_0x32715f['writer']['setAttribute']('vid_start',_0x381a35['getAttribute']('vid_start'),_0x24f64e),_0x32715f['writer']['setAttribute']('vid_end',_0x381a35['getAttribute']('vid_end'),_0x24f64e);},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['add'](_0x46284c=>{_0x46284c['on']('element',(_0x30e759,_0x234fc0,_0x2aa16b)=>{if(!_0x2aa16b['consumable']['consume'](_0x234fc0['viewItem'],{'attributes':['vid_start','vid_end']}))return;if(_0x234fc0['modelRange']['isCollapsed'])return;const _0x2bf04a=_0x234fc0['modelRange']['start']['nodeAfter'];_0x2bf04a['hasAttribute']('vid_start')||_0x2bf04a['hasAttribute']('vid')||(_0x2aa16b['writer']['setAttribute']('vid_start',_0x234fc0['viewItem']['getAttribute']('vid_start'),_0x2bf04a),_0x2aa16b['writer']['setAttribute']('vid_end',_0x234fc0['viewItem']['getAttribute']('vid_end'),_0x2bf04a));},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['elementToAttribute']({'view':{'name':'span','attributes':{'vid':!0x0}},'model':{'key':'vid','value':_0x205c17=>_0x205c17['getAttribute']('vid')}}),this['editor']['model']['schema']['on']('checkAttribute',(_0x3f016a,[,_0x4e2a11])=>{['vid_start','vid_end','vid']['includes'](_0x4e2a11)&&(_0x3f016a['return']=!0x0,_0x3f016a['stop']());},{'priority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x23f727=>{_0x23f727['on']('attribute:vid',(_0x1812e5,_0x1acd1a,_0x3ca9a0)=>{if('\x20'!=_0x1acd1a['item']['data']||_0x1acd1a['item']['parent']['maxOffset']>0x1)return;if(!_0x3ca9a0['consumable']['consume'](_0x1acd1a['item'],_0x1812e5['name']))return;const _0x3845aa=_0x3ca9a0['writer'],_0x110b2f=_0x3ca9a0['mapper']['toViewRange'](_0x1acd1a['range']);_0x3845aa['wrap'](_0x110b2f,_0x3845aa['createAttributeElement']('span'));});}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',function(_0x5cde33){const _0x425afc=_0x5cde33['plugins']['get']('RevisionViewer');return(_0x1a54ca,_0x23e022,_0x17b833)=>{const _0x17ee7b=_0x23e022['markerName']['split'](':')[0x1],_0x3dcdd2=_0x425afc['_getChangeFromId'](_0x17ee7b);if(!_0x3dcdd2)return null;const _0x2bd362='add'==_0x3dcdd2['type']?'split':'merge';if(!_0x17b833['consumable']['test'](_0x23e022['markerRange'],_0x1a54ca['name']))return;const _0x280859=_0x23e022['markerRange']['getWalker'](),_0x2613fb=_0x23e022['markerRange']['start'],_0x4488a5=_0x5cde33['model']['schema'];let _0x481acf=null,_0x23263e=null,_0x5c740d=!0x1,_0x554a0c=!0x1;for(const _0x25c8a3 of _0x280859){const _0x487f8b=_0x25c8a3['item'];_0x5c740d=_0x5c740d||_0x4488a5['isContent'](_0x487f8b);const _0x2f677c=_0x17b833['mapper']['toViewElement'](_0x487f8b);if(_0x2f677c&&_0x2f677c['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x25c8a3['type']&&(_0x4488a5['isBlock'](_0x487f8b)&&!_0x4488a5['isLimit'](_0x487f8b)&&(_0x487f8b['nextSibling']||_0x2613fb['isAtEnd']?_0x481acf&&_0x481acf['parent']==_0x487f8b||(_0x481acf=_0x487f8b,_0x2b24f4(_0x25c8a3['previousPosition']),_0x554a0c=!0x0):_0x23263e=_0x23263e||_0x25c8a3['previousPosition']));}function _0x2b24f4(_0x6f184e){const _0x550f30=_0x17b833['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x2bd362}),_0x2503b4=_0x17b833['mapper']['toViewPosition'](_0x6f184e);_0x3dcdd2['data']['isSuggestion']&&_0x17b833['writer']['addClass']('ck-suggestion-marker-'+_0x2bd362+'-new',_0x550f30),_0x425afc['activeChange']==_0x3dcdd2&&_0x17b833['writer']['addClass']('ck-suggestion-marker--active',_0x550f30),_0x17b833['writer']['insert'](_0x2503b4,_0x550f30),_0x17b833['mapper']['bindElementToMarker'](_0x550f30,_0x23e022['markerName']);}_0x5c740d||_0x554a0c||!_0x23263e||_0x2b24f4(_0x23263e);};}(this['editor']),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision',(_0xf1bd3e,_0x1b75da,_0x42f713)=>{const _0x4801e8=_0x42f713['mapper']['markerNameToElements'](_0x1b75da['markerName']);if(_0x4801e8){for(const _0x5e32ba of _0x4801e8)(_0x5e32ba['hasClass']('ck-suggestion-marker-split')||_0x5e32ba['hasClass']('ck-suggestion-marker-merge'))&&(_0x42f713['mapper']['unbindElementFromMarkerName'](_0x5e32ba,_0x1b75da['markerName']),_0x42f713['writer']['remove'](_0x5e32ba));}},{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',(_0x2ef394,_0x524176,_0x34d046)=>{const _0x44828d=_0x524176['markerName']['split'](':')[0x1],_0x2e6712=this['_getChangeFromId'](_0x44828d);if(!_0x2e6712)return null;const _0x262d21='add'==_0x2e6712['type']?'split':'merge';if(_0x34d046['consumable']['test'](_0x524176['markerRange'],_0x2ef394['name']))for(const _0x278cc0 of _0x524176['markerRange']['getItems']()){if(!_0x278cc0['is']('element','softBreak'))continue;const _0x509ac7=_0x34d046['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x262d21}),_0x30c5cf=_0x34d046['mapper']['toViewPosition'](this['editor']['model']['createPositionBefore'](_0x278cc0));_0x2e6712['data']['isSuggestion']&&_0x34d046['writer']['addClass']('ck-suggestion-marker-'+_0x262d21+'-new',_0x509ac7),this['activeChange']==_0x2e6712&&_0x34d046['writer']['addClass']('ck-suggestion-marker--active',_0x509ac7),_0x34d046['writer']['insert'](_0x30c5cf,_0x509ac7),_0x34d046['mapper']['bindElementToMarker'](_0x509ac7,_0x524176['markerName']);}},{'priority':'high'}),this['editor']['model']['document']['on']('change',()=>{this['editor']['editing']['view']['change'](_0x4fa9e4=>{for(const _0x2a7d6e of this['editor']['model']['document']['getRootNames']()){const _0x26ddd7=this['editor']['model']['document']['getRoot'](_0x2a7d6e),_0x334ae4=this['editor']['editing']['view']['document']['getRoot'](_0x2a7d6e);if(_0x334ae4){const _0x3ab261=_0x26ddd7['getAttribute']('revisionHistoryAttachChange');if(_0x4fa9e4['removeAttribute']('data-change-id',_0x334ae4),_0x4fa9e4['removeClass']('ck-revision-history-root-add',_0x334ae4),_0x4fa9e4['removeClass']('ck-revision-history-root-remove',_0x334ae4),_0x4fa9e4['removeClass']('ck-revision-history-root--active',_0x334ae4),_0x3ab261){const _0x3e581d=this['_getChangeFromId'](_0x3ab261);if(!_0x3e581d)return null;_0x4fa9e4['setAttribute']('data-change-id',_0x3ab261,_0x334ae4),_0x4fa9e4['addClass']('ck-revision-history-root-'+_0x3e581d['type'],_0x334ae4),this['activeChange']==_0x3e581d&&_0x4fa9e4['addClass']('ck-revision-history-root--active',_0x334ae4);}}}});}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'comment','model':_0x5cf8ac=>'revision-comment:'+_0x5cf8ac,'converterPriority':'highest'}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'suggestion','model':_0x2caa1b=>'revision-suggestion:'+_0x2caa1b,'converterPriority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision-suggestion','view':_0x34fa11=>({'name':'suggestion:'+_0x34fa11,'group':'revision-suggestion'}),'converterPriority':'highest'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-suggestion','view':_0x52fe70=>{const _0x5330e9=_0x52fe70['markerName']['split'](':')[0x1];return'insertion'!=_0x5330e9&&'deletion'!=_0x5330e9?null:{'classes':['ck-suggestion-preview-marker','ck-suggestion-preview-marker-'+_0x5330e9]};}}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:deletion',Q(this['editor'],'merge'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:insertion',Q(this['editor'],'split'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision-suggestion',(_0x5077a9,_0x239204,_0x227192)=>{const _0x5948f1=_0x227192['mapper']['markerNameToElements'](_0x239204['markerName']);if(_0x5948f1){for(const _0x2b89c9 of _0x5948f1)_0x2b89c9['is']('uiElement')&&(_0x227192['mapper']['unbindElementFromMarkerName'](_0x2b89c9,_0x239204['markerName']),_0x227192['writer']['remove'](_0x2b89c9));}},{'priority':'high'});}['_getChangeFromId'](_0x54afa9){return this['_changeIdToChange']['get'](_0x54afa9);}['_getViewForChange'](_0x51e998){return this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=new z(this['editor']['locale'],_0x51e998),this['_changeView'];}['_initInteractions'](){this['editor']['model']['document']['selection']['observeMarkers']('revision'),this['on']('change:activeView',(_0x8369f,_0x1fa628,_0x3ddeef,_0x471c61)=>{_0x471c61&&this['_balloon']['remove'](_0x471c61),_0x3ddeef&&(this['_balloon']['add']({'view':_0x3ddeef,'stackId':'revisionHistoryLabel','position':{'target':()=>{const _0x35f7d2=this['editor']['editing'],_0x73447b=this['_getChangeFromId'](_0x3ddeef['changeId']);let _0x4cd0a8;if(_0x73447b['data']['isOnRoot']){const _0x12459a=_0x35f7d2['view']['getDomRoot'](_0x73447b['rootName']);_0x4cd0a8=Array['from'](_0x12459a['getClientRects']());}else{const _0x42efee=this['editor']['model']['markers']['get']('revision:'+_0x3ddeef['changeId']);_0x4cd0a8=Array['from'](_0x35f7d2['mapper']['markerNameToElements'](_0x42efee['name']))['map'](_0x4774eb=>_0x35f7d2['view']['domConverter']['mapViewToDom'](_0x4774eb))['map'](_0x3d195c=>Array['from'](_0x3d195c['getClientRects']()))['flat']();}if(!this['_activeViewTarget'])return _0x4cd0a8[0x0];return _0x4cd0a8['find'](_0x3d6c47=>_0x3d6c47['top']-0x3<=this['_activeViewTarget']['y']&&_0x3d6c47['bottom']+0x3>=this['_activeViewTarget']['y']&&_0x3d6c47['left']-0x3<=this['_activeViewTarget']['x']&&_0x3d6c47['right']+0x3>=this['_activeViewTarget']['x'])||_0x4cd0a8[0x0];}}}),this['_balloon']['showStack']('revisionHistoryLabel'));}),this['on']('change:activeChange',(_0x31d9b5,_0x576b4b,_0x34ccb6,_0xd7145b)=>{this['activeView']=_0x34ccb6?this['_getViewForChange'](_0x34ccb6):null,this['editor']['model']['change'](()=>{const _0x38a9e1=this['editor']['editing'];_0xd7145b&&(_0xd7145b['data']['isOnRoot']?_0x38a9e1['view']['change'](_0x29d6e7=>{_0x29d6e7['removeClass']('ck-revision-history-root--active',_0x38a9e1['view']['document']['getRoot'](_0xd7145b['rootName']));}):_0x38a9e1['reconvertMarker']('revision:'+_0xd7145b['id'])),_0x34ccb6&&(_0x34ccb6['data']['isOnRoot']?_0x38a9e1['view']['change'](_0x2ba1f1=>{_0x2ba1f1['addClass']('ck-revision-history-root--active',_0x38a9e1['view']['document']['getRoot'](_0x34ccb6['rootName']));}):_0x38a9e1['reconvertMarker']('revision:'+_0x34ccb6['id']));});}),this['listenTo'](this['editor']['editing']['view']['document'],'mouseover',(_0xdf8584,_0x4de280)=>{if(this['activeChange'])return;const _0x189671=this['_findChangeIdFromDomTarget'](_0x4de280['target']),_0x71b15b=this['_changeIdToChange']['get'](_0x189671);_0x71b15b?(this['_activeViewTarget']={'x':_0x4de280['domEvent']['x'],'y':_0x4de280['domEvent']['y']},this['activeView']=this['_getViewForChange'](_0x71b15b)):(this['_activeViewTarget']=null,this['activeView']=null);}),this['listenTo'](this['editor']['editing']['view']['document'],'mousedown',(_0x4c155d,_0x3f97c0)=>{const _0x5a4981=this['_findChangeIdFromDomTarget'](_0x3f97c0['target']),_0x283622=this['_changeIdToChange']['get'](_0x5a4981);_0x283622?(this['_activeViewTarget']={'x':_0x3f97c0['domEvent']['x'],'y':_0x3f97c0['domEvent']['y']},_0x283622===this['activeChange']?this['_balloon']['updatePosition']():this['activeChange']=_0x283622):(this['_activeViewTarget']=null,this['activeChange']=null);});}['_findChangeIdFromDomTarget'](_0x4e83c0){do{const _0x3a7967=_0x4e83c0['getAttribute']('data-change-id');if(_0x3a7967)return _0x3a7967;_0x4e83c0=_0x4e83c0['parent'];}while(_0x4e83c0);return null;}['_cleanMarkers'](){this['editor']['model']['change'](_0x5d8813=>{for(const _0x2a560e of this['editor']['model']['markers'])_0x5d8813['removeMarker'](_0x2a560e);});}}function Q(_0x48504c,_0x1d73da){return(_0x3169b3,_0x346831,_0x363e8a)=>{if(!_0x363e8a['consumable']['test'](_0x346831['markerRange'],_0x3169b3['name']))return;const _0x2cdacf=_0x346831['markerRange']['getWalker'](),_0xc4936a=_0x346831['markerRange']['start'],_0x43cb44=_0x48504c['model']['schema'];let _0x1a1033=null,_0x256b54=null,_0x3425cf=!0x1,_0x93c63a=!0x1;for(const _0x20c75f of _0x2cdacf){const _0x2d0890=_0x20c75f['item'];_0x3425cf=_0x3425cf||_0x43cb44['isContent'](_0x2d0890);const _0x57254f=_0x363e8a['mapper']['toViewElement'](_0x2d0890);if(_0x57254f&&_0x57254f['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x20c75f['type']&&(_0x43cb44['isBlock'](_0x2d0890)&&!_0x43cb44['isLimit'](_0x2d0890)&&(_0x2d0890['nextSibling']||_0xc4936a['isAtEnd']?_0x1a1033&&_0x1a1033['parent']==_0x2d0890||(_0x1a1033=_0x2d0890,_0x3ea5ad(_0x20c75f['previousPosition']),_0x93c63a=!0x0):_0x256b54=_0x256b54||_0x20c75f['previousPosition']));}function _0x3ea5ad(_0x128fcd){const _0x1bb4af=_0x363e8a['mapper']['toViewPosition'](_0x128fcd),_0x14269c=_0x363e8a['writer']['createUIElement']('span',{'class':'ck-suggestion-preview-marker-'+_0x1d73da});_0x363e8a['writer']['insert'](_0x1bb4af,_0x14269c),_0x363e8a['mapper']['bindElementToMarker'](_0x14269c,_0x346831['markerName']);}_0x3425cf||_0x93c63a||!_0x256b54||_0x3ea5ad(_0x256b54);};}class nt extends _0x468ec8{constructor(_0x47783b){super(_0x47783b);const _0x31421c=_0x47783b['plugins']['get'](l);this['affectsData']=!0x1,this['listenTo'](_0x31421c,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x31421c,'change:isEnabled',()=>this['refresh']());}['execute'](){const _0x4eadf7=this['editor'],_0x342a29=_0x4eadf7['plugins']['get'](l),_0x119f72=_0x342a29['isReady']?_0x342a29['diff']['newRevisionId']:null;_0x4eadf7['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x119f72);}['refresh'](){const {isReady:_0x3bb6ad,isEnabled:_0x215160,repository:_0x288fd8,diff:_0x5b5396}=this['editor']['plugins']['get'](l),_0x4e8042=_0x5b5396&&_0x288fd8['getLaterVisibleRevision'](_0x5b5396['newRevisionId']);this['isEnabled']=_0x3bb6ad&&_0x215160&&Boolean(_0x4e8042);}}class rt extends _0x468ec8{['_step'];constructor(_0x31aafc,{direction:_0x2c7dc4}){super(_0x31aafc);const _0x5a7869=_0x31aafc['plugins']['get'](l);this['affectsData']=!0x1,this['_step']='forward'===_0x2c7dc4?0x1:-0x1,this['listenTo'](_0x5a7869,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x5a7869,'change:isEnabled',()=>this['refresh']()),this['listenTo'](_0x5a7869,'change:activeChange',()=>this['refresh']());}['execute'](){const _0x5d14a4=this['editor'],_0x203bcd=_0x5d14a4['plugins']['get'](l),{isNavigationMode:_0x52b262,currentChangeNumber:_0x156f9a}=_0x203bcd;let _0x22a173;if(_0x203bcd['activeChange']=_0x52b262?_0x203bcd['diff']['changes']['get'](_0x156f9a+this['_step']):_0x203bcd['diff']['changes']['first'],_0x203bcd['activeChange']['data']['isOnRoot'])_0x22a173=_0x5d14a4['editing']['view']['getDomRoot'](_0x203bcd['activeChange']['rootName']);else{const _0x41976b=_0x5d14a4['model']['markers']['get']('revision:'+_0x203bcd['activeChange']['id']);_0x22a173=_0x680ef(_0x5d14a4['editing'],_0x41976b);}_0x5a283f({'target':_0x22a173,'viewportOffset':0x28});}['refresh'](){const {isNavigationMode:_0x55f58e,currentChangeNumber:_0x1397f8,numberOfChanges:_0x3934ed,isReady:_0x7d2a7,isEnabled:_0x4f71c4}=this['editor']['plugins']['get'](l);this['isEnabled']=!!(_0x4f71c4&&_0x7d2a7&&_0x3934ed)&&(!_0x55f58e||(0x1===this['_step']?_0x1397f8<_0x3934ed-0x1:_0x1397f8>0x0));}}class Ri extends _0x2f3954{constructor(_0x485c8f){super(_0x485c8f);const _0x5b70db=this['bindTemplate'],_0x3e6fcd=new _0x3c0d17(_0x485c8f),_0x1d3c6d=new _0x3c0d17(_0x485c8f);this['set']('isNavigationMode',!0x1),this['set']('isReady',!0x1),this['set']('currentChangeNumber',0x0),this['set']('numberOfChanges',0x0),this['set']('isForwardNavigationEnabled',!0x1),this['set']('isBackwardNavigationEnabled',!0x1),this['bind']('_isStatusLabelVisible')['to'](this,'isReady',this,'numberOfChanges',(_0x50061e,_0x20ee3c)=>_0x50061e&&_0x20ee3c>0x0),this['bind']('_statusText')['to'](this,'isReady',this,'currentChangeNumber',this,'numberOfChanges',this,'isNavigationMode',(_0x3301d1,_0x2e881e,_0x40509e,_0x3ff87f)=>{if(!_0x3301d1)return R(_0x485c8f,'Loading...');if(!_0x40509e)return R(_0x485c8f,'No\x20changes');const _0x72702f=R(_0x485c8f,'NUMBER_OF_CHANGES',_0x40509e);return _0x3ff87f?R(_0x485c8f,'X_OF_Y_CHANGES',[_0x2e881e+0x1,_0x40509e]):_0x72702f;}),_0x3e6fcd['set']({'label':R(_0x485c8f,'Show\x20previous\x20change'),'tooltip':!0x0,'icon':_0x2f223a}),_0x1d3c6d['set']({'label':R(_0x485c8f,'Show\x20next\x20change'),'tooltip':!0x0,'icon':_0x24255b}),_0x3e6fcd['bind']('isEnabled')['to'](this,'isBackwardNavigationEnabled'),_0x1d3c6d['bind']('isEnabled')['to'](this,'isForwardNavigationEnabled'),_0x3e6fcd['on']('execute',()=>this['fire']('execute','backward')),_0x1d3c6d['on']('execute',()=>this['fire']('execute','forward')),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-revision-history-ui','ck-revision-history-ui__changes-navigation']},'children':[{'tag':'span','attributes':{'class':['ck-revision-history-ui__changes-navigation__wrapper']},'children':[{'tag':'span','attributes':{'class':['ck-revision-history-ui__changes-navigation__label',_0x5b70db['if']('_isStatusLabelVisible','ck-hidden',_0x560ee9=>!_0x560ee9)]},'children':[{'text':_0x5b70db['to']('isNavigationMode',_0x1b846f=>_0x1b846f?R(_0x485c8f,'EDIT_X_OF_Y_REVISIONS')+':\x20':R(_0x485c8f,'Total')+':\x20')}]},{'text':_0x5b70db['to']('_statusText')}]},new _0x16d315(),{'tag':'div','attributes':{'class':['ck-revision-history-ui__changes-navigation__navigation']},'children':[_0x3e6fcd,_0x1d3c6d]}]});}}const ge='ck-editor__editable__loading-overlay';class ji extends _0x42167a{static get['pluginName'](){return'RevisionViewerLoadingOverlay';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['show'](){const _0x29e82d=this['editor']['editing']['view'];_0x29e82d['change'](_0x53b52d=>{for(const _0xd7f0d9 of _0x29e82d['document']['roots'])_0x53b52d['addClass'](ge,_0xd7f0d9);});}['hide'](){const _0x53e001=this['editor']['editing']['view'];_0x53e001['change'](_0x49bf1f=>{for(const _0xa912df of _0x53e001['document']['roots'])_0x49bf1f['removeClass'](ge,_0xa912df);});}}class u extends _0x42167a{static get['pluginName'](){return'RevisionViewerUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[l,ji];}['init'](){const _0xffe88d=this['editor'],_0x26517f=_0xffe88d['plugins']['get'](l),_0x1dd5a0=_0xffe88d['plugins']['get'](ji);_0xffe88d['ui']['componentFactory']['add']('exitToEditing',_0x4ad012=>{const _0x1331db=new _0x3c0d17(_0x4ad012);return _0x1331db['set']({'label':R(_0x4ad012,'Back\x20to\x20editing'),'icon':_0x48767f,'withText':!0x0,'tooltip':!0x0,'class':'ck-revision-history-ui__back-to-editing'}),this['listenTo'](_0x1331db,'execute',()=>{_0xffe88d['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}),_0x1331db;}),_0xffe88d['ui']['componentFactory']['add']('restoreRevision',_0x5a1c94=>{const _0x460b00=new _0x3c0d17(_0x5a1c94);return _0x460b00['set']({'label':R(_0x5a1c94,'Restore\x20this\x20revision'),'withText':!0x0,'tooltip':!0x0}),_0x460b00['bind']('isEnabled')['to'](_0xffe88d['commands']['get']('restoreRevision')),this['listenTo'](_0x460b00,'execute',()=>_0xffe88d['execute']('restoreRevision')),_0x460b00;}),_0xffe88d['ui']['componentFactory']['add']('changesNavigation',_0x3fb328=>{const _0x120384=new Ri(_0x3fb328),_0x422411=_0xffe88d['commands']['get']('showPreviousChange'),_0x36b570=_0xffe88d['commands']['get']('showNextChange');return _0x120384['bind']('isBackwardNavigationEnabled')['to'](_0x422411,'isEnabled'),_0x120384['bind']('isForwardNavigationEnabled')['to'](_0x36b570,'isEnabled'),_0x120384['bind']('isReady','currentChangeNumber','numberOfChanges','isNavigationMode')['to'](_0x26517f),this['listenTo'](_0x120384,'execute',(_0x165ca1,_0x20f53e)=>{_0xffe88d['execute']('forward'===_0x20f53e?'showNextChange':'showPreviousChange');}),_0x120384;}),_0x1dd5a0['show'](),_0x26517f['on']('change:isReady',(_0x29b4a1,_0x458df0,_0x3044c3)=>{_0x3044c3?_0x1dd5a0['hide']():_0x1dd5a0['show']();});}}class hi extends et{['_resizeObserver']=null;constructor(_0x168e7b,_0x3822c0){super(_0x168e7b,_0x3822c0);const _0x428315=this['bindTemplate'];this['set']({'label':R(_0x168e7b,'Revision\x20name'),'_tooltipString':''}),this['fieldView']['placeholder']=R(_0x168e7b,'Enter\x20the\x20revision\x20name'),this['extendTemplate']({'tag':'span','attributes':{'class':['ck-revision-history-sidebar__revision-name'],'data-cke-tooltip-text':_0x428315['to']('_tooltipString'),'data-cke-tooltip-position':'s','data-cke-tooltip-class':'ck-tooltip_multi-line'}});}['render'](){super['render'](),this['_resizeObserver']=new ot(this['fieldView']['element'],()=>this['_updateTooltipText']()),this['listenTo'](this['fieldView'],'input',()=>this['_updateTooltipText']());}['destroy'](){super['destroy'](),this['_resizeObserver']&&this['_resizeObserver']['destroy']();}['_updateTooltipText'](){const _0x1cd2bc=this['fieldView']['element'];this['_tooltipString']=_0x1cd2bc['scrollWidth']>_0x1cd2bc['clientWidth']&&_0x1cd2bc['value']||'';}}class ni extends _0x2f3954{constructor(_0x40d081,_0x2543d8,_0x116235){super(_0x40d081);const _0x5f51cd=new _0x180cc4();_0x5f51cd['set']({'content':_0x3c5d9e,'viewBox':'0\x200\x2011\x2010'});const _0x2fc7bd=['ck','ck-revision-history-sidebar__revision-author'];_0x116235&&_0x2fc7bd['push']('ck-revision-history-sidebar__revision-author_creator');const _0x43caf5=[{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__revision-author__name'],'title':R(_0x40d081,_0x116235?'Revision\x20creator':'Revision\x20author')},'children':[_0x5f51cd,_0x2543d8['name']]}];this['setTemplate']({'tag':'li','attributes':{'class':_0x2fc7bd},'children':_0x43caf5});}}function ci(_0x274efb,_0x323d0a){const _0x31fe21=_0x274efb['bindTemplate'],_0x32fefa=_0x274efb['locale'],_0x1749c1=_0x993c86(_0x32fefa);_0x1749c1['panelPosition']='sw';const _0x315fa7=function(_0x4e38a9,_0x89f40a){const _0x1a81bf=function(_0x6defa1,_0x1e981d){const _0x5bf00a=_0x6defa1['locale'],_0x1cb095={'Compare\x20against\x20selected':R(_0x5bf00a,'Compare\x20against\x20selected'),'Name\x20this\x20revision':R(_0x5bf00a,'Name\x20this\x20revision'),'Restore\x20this\x20revision':R(_0x5bf00a,'Restore\x20this\x20revision')};return _0x1e981d['map'](_0x1b07c6=>{const _0x4b4514=_0x1cb095[_0x1b07c6['name']];return _0x4b4514&&_0x4b4514!==_0x1b07c6['name']&&(_0x1b07c6['name']=_0x4b4514),_0x1b07c6;});}(_0x4e38a9,_0x89f40a),_0x313571=new _0x43d864();for(const _0x268c6a of _0x1a81bf){const _0x1702ab={'type':'button','model':new to({'label':_0x268c6a['name'],'class':_0x268c6a['class'],'withText':!0x0,'role':'menuitem','_action':_0x268c6a['action']})};_0x1702ab['model']['bind']('isEnabled')['to'](_0x4e38a9,'isActionsDropdownOpen',_0x27b832=>'function'!=typeof _0x268c6a['isEnabled']||(!_0x27b832||_0x268c6a['isEnabled'](_0x4e38a9))),_0x313571['add'](_0x1702ab);}return _0x313571;}(_0x274efb,_0x323d0a);return _0x274efb['bind']('isActionsDropdownOpen')['to'](_0x1749c1,'isOpen'),_0x1749c1['buttonView']['set']({'label':R(_0x32fefa,'Show\x20more\x20items'),'tooltip':!0x0,'tooltipPosition':'sw','icon':_0x3e86b0}),_0x1749c1['extendTemplate']({'attributes':{'class':['ck-revision-history-sidebar__revision__actions',_0x31fe21['if']('isActionsDropdownOpen','ck-on')]},'on':{'click':_0x31fe21['to'](_0x1e8863=>_0x1e8863['stopPropagation']())}}),_0x1749c1['on']('execute',_0x5034c5=>{_0x274efb['isReady']&&'function'==typeof _0x5034c5['source']['_action']&&_0x5034c5['source']['_action'](_0x274efb);}),_0x60a1b0(_0x1749c1,_0x315fa7,{'role':'menu'}),_0x1749c1['listenTo'](_0x274efb,'change:isActionsDropdownOpen',(_0xee704f,_0x8cc660,_0x331b31)=>{if(_0x331b31)for(const _0x3e529b of _0x1749c1['listView']['items']){const _0x23314d=_0x3e529b['children']['first'],_0xb9a357=_0x323d0a['find'](_0x38a930=>_0x38a930['action']===_0x23314d['_action'])['isVisible'];_0x3e529b['isVisible']=void 0x0===_0xb9a357||_0xb9a357(_0x274efb);}}),_0x1749c1;}class _i extends/* #__PURE__ -- @preserve */
|
|
27
|
+
_0x27888b(_0x2f3954){['id'];['revisionNameView'];['revisionActionsView'];['_revision'];['_requireRevisionName'];constructor(_0x4b261e,_0x4d0fc9,_0x1118e6,_0x57afa8){super(_0x4b261e);const _0x43c5a0=this['bindTemplate'],_0x46e154=function(_0x1ebabe,_0x20edd1){const _0xed2d6=Array['from'](_0x20edd1['authors'])['filter'](_0x349453=>_0x349453!=_0x20edd1['creator']);return _0x20edd1['creator']&&_0xed2d6['unshift'](_0x20edd1['creator']),_0xed2d6['map'](_0x7b32ab=>new ni(_0x1ebabe,_0x7b32ab,_0x7b32ab==_0x20edd1['creator']));}(_0x4b261e,_0x4d0fc9);this['id']=_0x4d0fc9['id'],this['_revision']=_0x4d0fc9,this['_requireRevisionName']=_0x57afa8,this['bind']('name','createdAt')['to'](_0x4d0fc9),this['bind']('_createdAtFormatted')['to'](this,'createdAt',_0x376fef=>{return _0x4af997=_0x4b261e['uiLanguage'],(_0x501be9=_0x376fef)['toLocaleDateString'](_0x4af997,{'month':'long','day':'numeric'})+',\x20'+_0x501be9['toLocaleTimeString'](_0x4af997,{'hour':'numeric','minute':'numeric'});var _0x4af997,_0x501be9;}),this['set']('isSelected',!0x1),this['set']('isHighlighted',!0x1),this['set']('isActionsDropdownOpen',!0x1),this['set']('isReady',!0x1),this['set']('isEnabled',!0x1),this['revisionNameView']=new hi(_0x4b261e,ti),this['revisionNameView']['fieldView']['extendTemplate']({'attributes':{'maxlength':'220'}}),this['revisionNameView']['fieldView']['bind']('value')['to'](this,'name',_0x3aa309=>_0x3aa309||this['_createdAtFormatted']),this['revisionNameView']['bind']('isEnabled')['to'](this,'isSelected',this,'isEnabled',(_0xf3a75a,_0x550ebd)=>_0xf3a75a&&_0x550ebd),this['revisionActionsView']=_0x1118e6&&_0x1118e6['length']?ci(this,_0x1118e6):'',this['revisionActionsView']&&this['revisionActionsView']['bind']('isEnabled')['to'](this),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision-wrapper',_0x43c5a0['if']('isConfirm','ck-revision-history-sidebar__revision-wrapper_confirmation_visible')]},'children':[{'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision',_0x43c5a0['if']('isEnabled','ck-disabled',_0x3077b7=>!_0x3077b7),_0x43c5a0['if']('isSelected','ck-revision-history-sidebar__revision_selected'),_0x43c5a0['if']('isHighlighted','ck-revision-history-sidebar__revision_highlighted'),_0x43c5a0['if']('isActionsDropdownOpen','ck-revision-history-sidebar__actions_dropdown_open')]},'children':[this['revisionNameView'],{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__revision__date']},'children':[{'text':_0x43c5a0['to']('_createdAtFormatted')}]},{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__revision__controls-wrapper']},'children':[{'tag':'ul','attributes':{'class':['ck','ck-revision-history-sidebar__revision-authors']},'children':_0x46e154}]},this['revisionActionsView']],'on':{'click':_0x43c5a0['to'](_0x25c71f=>{_0x25c71f['srcElement']['closest']('.ck-thread__remove-confirm')||this['isReady']&&this['isEnabled']&&this['fire']('select',{'id':this['id']});})}}]});}['render'](){super['render']();const _0x22d8ce=this['revisionNameView']['fieldView']['element'];this['listenTo'](_0x22d8ce,'change',()=>{this['_requireRevisionName']&&!_0x22d8ce['value']||this['fire']('setName',{'id':this['id'],'name':_0x22d8ce['value']}),_0x22d8ce['value']||(_0x22d8ce['value']=this['name']?this['name']:this['_createdAtFormatted']);});}['select'](){this['isSelected']=!0x0;}['deselect'](){this['isSelected']=!0x1;}['highlight'](){this['isHighlighted']=!0x0;}['unhighlight'](){this['isHighlighted']=!0x1;}}function li(_0x3eb925,_0x45b067){const _0x5b174c=_0x2062e7['fromJSDate'](_0x3eb925)['setLocale'](_0x45b067),_0xd6cfad=_0x2062e7['local'](),_0x592472=_0xd6cfad['minus']({'days':0x1})['startOf']('day');let _0x1f1890,_0x4d5927;return _0x5b174c['hasSame'](_0xd6cfad,'day')?(_0x1f1890=_0x5b174c['startOf']('day')['toJSDate'](),_0x4d5927=_0x5b174c['toRelativeCalendar']()):_0x5b174c['hasSame'](_0x592472,'day')?(_0x1f1890=_0x592472['toJSDate'](),_0x4d5927=_0x5b174c['toRelativeCalendar']()):_0x5b174c['hasSame'](_0xd6cfad,'week')?(_0x1f1890=_0x5b174c['startOf']('week')['toJSDate'](),_0x4d5927=_0x5b174c['weekdayLong']||''):_0x5b174c['hasSame'](_0xd6cfad,'year')?(_0x1f1890=_0x5b174c['startOf']('month')['toJSDate'](),_0x4d5927=_0x5b174c['monthLong']||''):(_0x1f1890=_0x5b174c['startOf']('year')['toJSDate'](),_0x4d5927=String(_0x5b174c['year'])),{'startDate':_0x1f1890,'localizedPeriodName':_0x4d5927};}class bi extends _0x2f3954{['startDate'];['revisionViews'];['_revisionActions'];['_requireRevisionName'];constructor(_0x1c265b,_0x2972fd,_0x4714df,_0x443b30){super(_0x1c265b);const _0x339688=li(_0x2972fd,this['locale']['uiLanguage'])['localizedPeriodName'];this['startDate']=_0x2972fd,this['revisionViews']=this['createCollection'](),this['_revisionActions']=_0x4714df,this['_requireRevisionName']=_0x443b30,this['revisionViews']['delegate']('select')['to'](this),this['revisionViews']['delegate']('setName')['to'](this),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__time-period']},'children':[{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__time-period__label']},'children':[{'text':_0x339688}]},{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__time-period__revisions']},'children':this['revisionViews']}]});}['addRevision'](_0x4c9738){const _0x4b5d34=new _i(this['locale'],_0x4c9738,this['_revisionActions'],this['_requireRevisionName']);this['revisionViews']['add'](_0x4b5d34);}['removeRevision'](_0xe8ca91){const _0x4538c7=this['revisionViews']['find'](_0x198c26=>_0x198c26['id']===_0xe8ca91['id']);this['revisionViews']['remove'](_0x4538c7);}}class fi extends _0x2f3954{constructor(_0x1ee852){super(_0x1ee852);const _0x521daf=new _0x180cc4();_0x521daf['content']=_0x2911f0,this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset_all','ck-revision-history-sidebar__header']},'children':[_0x521daf,{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__header__label']},'children':[R(_0x1ee852,'Revision\x20history')]}]});}}class di extends _0x2f3954{['timePeriodViews'];['_revisions'];['_revisionActions'];['_requireRevisionName'];constructor(_0x3b1fa6,_0xbadf84,_0x233631,_0x407e6f){super(_0x3b1fa6);const _0x5f00b5=this['bindTemplate'];this['timePeriodViews']=this['createCollection'](),this['timePeriodViews']['delegate']('select')['to'](this),this['timePeriodViews']['delegate']('setName')['to'](this),this['_revisions']=_0xbadf84,this['_revisionActions']=_0x233631,this['_requireRevisionName']=_0x407e6f,this['on']('select',(_0x1076e1,_0x23a3a7)=>{this['fire']('revisionSelected',_0x23a3a7);}),this['on']('setName',(_0x50d3fb,_0x128393)=>{this['fire']('revisionSetName',_0x128393);}),this['set']('isEnabled',!0x1),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-rounded-corners','ck-revision-history-sidebar']},'children':[new fi(_0x3b1fa6),{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__timeline',_0x5f00b5['if']('isEnabled','ck-disabled',_0x4245e3=>!_0x4245e3)]},'children':this['timePeriodViews']}]});}['render'](){super['render']();for(const _0x3ac1cc of this['_revisions'])this['_addRevision'](_0x3ac1cc);this['_revisions']['on']('add',(_0xb3cf3,_0x889072)=>{this['_addRevision'](_0x889072);}),this['_revisions']['on']('remove',(_0x23b86a,_0x4353f1)=>{this['_removeRevision'](_0x4353f1);});}get['revisionViews'](){return this['timePeriodViews']['map'](_0x2d6110=>_0x2d6110['revisionViews']['map'](_0x163cc1=>_0x163cc1))['flat']();}['selectRevision'](_0x1e6f47){for(const _0x3ec102 of this['revisionViews'])_0x1e6f47&&_0x1e6f47['id']===_0x3ec102['id']?_0x3ec102['select']():_0x3ec102['deselect']();}['highlightRevisions'](_0x22c2e6){for(const _0x39d6da of this['revisionViews'])_0x22c2e6['some'](({id:_0x438a3e})=>_0x438a3e===_0x39d6da['id'])?_0x39d6da['highlight']():_0x39d6da['unhighlight']();}['_addRevision'](_0x27a098){const _0x18e73b=li(_0x27a098['createdAt'],this['locale']['uiLanguage'])['startDate'];let _0x364cfb=this['timePeriodViews']['get'](0x0);_0x364cfb&&_0x364cfb['startDate']['getTime']()===_0x18e73b['getTime']()||(_0x364cfb=new bi(this['locale'],_0x18e73b,this['_revisionActions'],this['_requireRevisionName']),this['timePeriodViews']['add'](_0x364cfb)),_0x364cfb['addRevision'](_0x27a098);}['_removeRevision'](_0x44104e){const _0x3124ed=li(_0x44104e['createdAt'],this['locale']['uiLanguage'])['startDate'];this['_getTimePeriodViewByStartDate'](_0x3124ed)['removeRevision'](_0x44104e);}['_getTimePeriodViewByStartDate'](_0x2f5814){return this['timePeriodViews']['find'](_0x5bbaca=>_0x5bbaca['startDate']['getTime']()===_0x2f5814['getTime']());}}class f extends _0x42167a{['_revisionViewer'];['_revisionsRepository'];['_sidebarView'];static ['defaultRevisionActions']=/* #__PURE__ -- @preserve */
|
|
28
28
|
((()=>['compareAgainstSelected','restoreRevision','nameRevision'])());static ['availableRevisionActions']=/* #__PURE__ -- @preserve */
|
|
29
|
-
at();static get['pluginName'](){return'RevisionsSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[l];}constructor(
|
|
30
|
-
_0x5a997d(_0x339c46){['_ui'];get['ui'](){return this['_ui'];}constructor(_0x26655a,_0x2f525f){super(_0x2f525f),this['sourceElement']=_0x26655a,this['model']['document']['createRoot']();const _0x1abbb0=new ii(this['locale'],this['editing']['view'],{'shouldToolbarGroupWhenFull':!0x0});this['_ui']=new Z(this,_0x1abbb0);}['destroy'](){return this['updateSourceElement'](),this['ui']['destroy'](),super['destroy']();}static async['create'](_0x2bee8b,_0x4df2a3){const _0x450470=new this(_0x2bee8b,_0x4df2a3);return await _0x450470['initPlugins'](),await _0x450470['ui']['init'](_0x2bee8b),await _0x450470['data']['init'](_0x450470['config']['get']('initialData')||''),_0x450470['fire']('ready'),_0x450470;}}const d=['RevisionHistoryUI','RestrictedEditingMode'];class ht extends _0x47aa5e{['result'];static get['pluginName'](){return'RevisionViewerIntegration';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x15750e){function _0x832ca8(_0x57888a){return _0x57888a['map'](_0x4820a0=>String['fromCharCode'](_0x4820a0))['join']('');}super(_0x15750e),this['result']='end',_0x15750e[_0x832ca8([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x832ca8([0x76,0x69,0x65,0x77])][_0x832ca8([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x832ca8([0x61,0x75,0x74,0x6f]),_0x15750e[_0x832ca8([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x832ca8([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x832ca8([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x832ca8([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x832ca8([0x6f,0x6b])});}}class ct extends _0x47aa5e{['_viewerEditor'];static get['pluginName'](){return'RevisionHistory';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[h,v];}constructor(_0x4afa0e){if(super(_0x4afa0e),!this['editor']['config']['get']('revisionHistory'))throw new _0xd78202('revision-history-missing-configuration',this);this['_viewerEditor']=null,this['set']('isRevisionViewerOpen',!0x1),this['editor']['config']['define']('revisionHistory.showRevisionViewerCallback',_0x2e273e=>this['_showRevisionViewer']({..._0x2e273e,'translations':this['editor']['locale']['translations']})),this['editor']['config']['define']('revisionHistory.closeRevisionViewerCallback',_0x2b137e=>this['_closeRevisionViewer'](_0x2b137e)),this['editor']['config']['define']('revisionHistory.restoreRevisionCallback',_0x25a6de=>this['_restoreRevision'](_0x25a6de)),this['editor']['config']['define']('revisionHistory.requireRevisionName',!0x1),this['_enhanceShowRevisionViewerCallback'](),this['_enhanceCloseRevisionViewerCallback']();}set['adapter'](_0x148d88){this['editor']['plugins']['get']('RevisionTracker')['adapter']=_0x148d88;}get['adapter'](){return this['editor']['plugins']['get']('RevisionTracker')['adapter'];}['addRevisionData'](_0x7d9746){return this['editor']['plugins']['get']('RevisionTracker')['addRevisionData'](_0x7d9746);}['getRevision'](_0x29c3a0){return this['editor']['plugins']['get']('RevisionsRepository')['getRevision'](_0x29c3a0);}['getRevisions'](_0x3258b4){return this['editor']['plugins']['get']('RevisionsRepository')['getRevisions'](_0x3258b4||{'toJSON':!0x1});}['_getRevisionViewerEditorConfig'](){const _0x7e181f=this['editor'],_0x29c2cd=_0x364126(_0x7e181f,d),_0x3a51e0=_0x7e181f['plugins']['get']('RevisionTracker'),_0x17fd2b=_0x7e181f['plugins']['get']('Users')['users'];return _0x29c2cd['toolbar']=['exitToEditing','restoreRevision','changesNavigation'],delete _0x29c2cd['lazyRoots'],(_0x29c2cd['plugins']['push'](ht,l,u,class extends _0x47aa5e{static get['requires'](){return[l,'Users'];}['init'](){const _0x3b52ad=this['editor']['plugins']['get']('Users');for(const _0x44ce07 of _0x17fd2b)_0x44ce07['isAnonymous']||_0x3b52ad['getUser'](_0x44ce07['id'])||_0x3b52ad['addUser'](_0x44ce07);const _0x1f5aa0=_0x3a51e0['repository']['getRevisions']();let _0x4a4a02=null;const _0x3e67fb=this['editor']['plugins']['get']('RevisionViewer');_0x3e67fb['adapter']=_0x3a51e0['adapter'],_0x3e67fb['bind']('isEnabled')['to'](_0x3a51e0),this['editor']['commands']['get']('restoreRevision')['bind']('isEnabled')['to'](_0x7e181f,'isReadOnly',_0x41e9a4=>!_0x41e9a4);for(const _0x1eaadb of _0x1f5aa0){const _0x1874ae=null===_0x1eaadb['creator'];if(_0x1874ae&&_0x1eaadb['toVersion']===_0x1eaadb['fromVersion'])continue;const _0x4bab20=_0x1eaadb['toJSON']();_0x3e67fb['addRevisionData'](_0x4bab20,(_0x12d4c0,_0x51e6e7,_0x15ea1e)=>{if(_0x1874ae){if(_0x4a4a02)_0x4a4a02['_update'](_0x12d4c0,_0x51e6e7);else{if(!_0x51e6e7){const _0x435023=_0x15ea1e['toJSON']();_0x435023['id']=_0x4c4d5d(),_0x3a51e0['saveRevision'](_0x435023,_0x15ea1e['toVersion'])['then'](_0x39d24e=>{_0x4a4a02=_0x39d24e;});}}}else _0x1eaadb['_update'](_0x12d4c0,_0x51e6e7);});}}},f),_0x29c2cd);}['_enhanceShowRevisionViewerCallback'](){const _0x3c83ed=this['editor']['config']['get']('revisionHistory')['showRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.showRevisionViewerCallback',async()=>{this['editor']['enableReadOnlyMode']('revision-history-viewer-opened');const _0x17b176=this['editor']['plugins']['get']('RevisionTracker');if(this['editor']['plugins']['has']('Autosave')){const _0x4a9278=this['editor']['plugins']['get']('Autosave');await _0x4a9278['save']();}else await _0x17b176['update']();if(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('Dialog')){const _0x2ca001=this['editor']['plugins']['get']('Dialog');_0x2ca001['isOpen']&&_0x2ca001['hide']();}const _0x450311=this['_getRevisionViewerEditorConfig']();return _0x3c83ed(_0x450311)['then'](_0x32785c=>{return(this['_viewerEditor']=_0x32785c,this['editor']['plugins']['has']('Annotations'))&&this['editor']['plugins']['get']('Annotations')['refreshVisibility'](),(this['editor']['plugins']['has']('DocumentOutline')&&(this['editor']['plugins']['get']('DocumentOutlineUI')['view']['element']['style']['display']='none'),_0x32785c);})['catch'](_0xc2b5ae=>(console['error'](_0xc2b5ae),this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),null));});}['_enhanceCloseRevisionViewerCallback'](){const _0x498993=this['editor']['config']['get']('revisionHistory')['closeRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.closeRevisionViewerCallback',()=>(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('DocumentOutline')&&(this['editor']['plugins']['get']('DocumentOutlineUI')['view']['element']['style']['display']=''),this['_viewerEditor']['plugins']['get']('RevisionViewer')['_cleanUp'](),_0x498993(this['_viewerEditor'])['then'](()=>{if(this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),this['_viewerEditor']=null,this['editor']['plugins']['has']('Annotations')){const _0x3c7ea4=this['editor']['plugins']['get']('Annotations');_0x3c7ea4['refreshVisibility'](),_0x3c7ea4['refreshPositioning']();}})));}['_showRevisionViewer'](_0x4ec2dd){const _0x212a19=this['editor']['config']['get']('revisionHistory.editorContainer'),_0x185d62=this['editor']['config']['get']('revisionHistory.viewerContainer'),_0xc89509=this['editor']['config']['get']('revisionHistory.viewerEditorElement');return m['create'](_0xc89509,_0x4ec2dd)['then'](_0x4f6f7c=>(_0x185d62['style']['display']='block',_0x212a19['style']['display']='none',this['isRevisionViewerOpen']=!0x0,_0x4f6f7c));}['_closeRevisionViewer'](_0x1f333){const _0x453204=this['editor']['config']['get']('revisionHistory.editorContainer');return this['editor']['config']['get']('revisionHistory.viewerContainer')['style']['display']='none',_0x453204['style']['display']='',this['isRevisionViewerOpen']=!0x1,_0x1f333['destroy']();}async['_restoreRevision'](_0x168b2c){const _0x12a6ea=this['editor'],_0xf172ec=this['_viewerEditor']['plugins']['get']('RevisionViewer'),_0x11242c=_0x12a6ea['plugins']['get']('RevisionTracker'),_0x421281=_0x12a6ea['plugins']['get']('RevisionHistoryUtils'),_0x3c7185=_0xf172ec['repository']['getRevision'](_0x168b2c);let _0x4440ea,_0x351e1b,_0x336732;try{await _0x421281['loadRevisionData'](_0x3c7185,this['adapter']),_0x4440ea=_0x421281['getRevisionDocumentData'](_0x3c7185),_0x351e1b=_0x421281['getRevisionRootsAttributes'](_0x3c7185);}catch(_0x2cc098){return void console['error'](_0x2cc098);}_0x12a6ea['model']['change'](_0x12f0e5=>{for(const _0x272e99 of Array['from'](_0x12a6ea['model']['markers']['getMarkersGroup']('restrictedEditingException')))_0x12f0e5['removeMarker'](_0x272e99);}),_0xf172ec['isReady']=!0x1,_0x12a6ea['model']['enqueueChange'](_0x1ef116=>{_0x1ef116['setSelection'](null),_0x1ef116['removeSelectionAttribute'](_0x12a6ea['model']['document']['selection']['getAttributeKeys']());const _0x11d1c6=Object['keys'](_0x4440ea);for(const _0x176c4b of _0x12a6ea['model']['document']['roots'])'$graveyard'!=_0x176c4b['rootName']&&_0x176c4b['isAttached']()&&!_0x11d1c6['includes'](_0x176c4b['rootName'])&&_0x1ef116['detachRoot'](_0x176c4b);for(const _0x51aa31 of _0x11d1c6){let _0x3c8b1c=_0x12a6ea['model']['document']['getRoot'](_0x51aa31);_0x3c8b1c&&_0x3c8b1c['isAttached']()||(_0x3c8b1c=_0x1ef116['addRoot'](_0x51aa31));const _0x25d821=_0x351e1b[_0x51aa31],_0x49094b=Object['keys'](_0x25d821),_0x72cf57=_0x4440ea[_0x51aa31];for(const _0x323e69 of _0x3c8b1c['getAttributeKeys']())_0x49094b['includes'](_0x323e69)||_0x1ef116['removeAttribute'](_0x323e69,_0x3c8b1c);for(const _0x2f7ff6 of _0x49094b)_0x1ef116['setAttribute'](_0x2f7ff6,_0x351e1b[_0x51aa31][_0x2f7ff6],_0x3c8b1c);_0x1ef116['remove'](_0x1ef116['createRangeIn'](_0x3c8b1c)),_0x1ef116['insert'](_0x12a6ea['data']['parse'](_0x72cf57,_0x3c8b1c),_0x3c8b1c,0x0);}});const _0x2b0fed=R(_0x12a6ea['locale'],'Restored');if(_0x3c7185['name'])_0x336732=-0x1==_0x3c7185['name']['indexOf'](_0x2b0fed)?_0x2b0fed+':\x20'+_0x3c7185['name']:_0x3c7185['name'];else _0x336732=_0x2b0fed+':\x20'+(_0x3c7185['createdAt']['toLocaleDateString'](_0x12a6ea['locale']['uiLanguage'],{'month':'long','day':'numeric'})+',\x20'+_0x3c7185['createdAt']['toLocaleTimeString'](_0x12a6ea['locale']['uiLanguage'],{'hour':'numeric','minute':'numeric'}));return await _0x11242c['saveRevision']({'name':_0x336732}),_0xf172ec['isReady']=!0x0,_0x12a6ea['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}}export{nt as RestoreRevisionCommand,I as Revision,ct as RevisionHistory,v as RevisionHistoryUI,$ as RevisionHistoryUtils,h as RevisionTracker,l as RevisionViewer,m as RevisionViewerEditor,ht as RevisionViewerIntegration,fi as RevisionViewerLoadingOverlay,u as RevisionViewerUI,S as RevisionsRepository,f as RevisionsSidebar,rt as ShowChangeCommand};
|
|
29
|
+
at();static get['pluginName'](){return'RevisionsSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[l];}constructor(_0x7d9ddb){super(_0x7d9ddb),this['_revisionViewer']=_0x7d9ddb['plugins']['get'](l),this['_revisionsRepository']=this['_revisionViewer']['repository'],this['_sidebarView']=null;}['init'](){const _0x521d94=this['_revisionsRepository']['_revisions'],_0x1273b0=this['_createRevisionActions'](),_0x5e625a=this['editor']['config']['get']('revisionHistory.viewerSidebarContainer');this['_sidebarView']=new di(this['editor']['locale'],_0x521d94,_0x1273b0,this['editor']['config']['get']('revisionHistory.requireRevisionName')),this['_sidebarView']['on']('revisionSelected',this['_handleRevisionSelected']['bind'](this)),this['_sidebarView']['on']('revisionSetName',this['_handleRevisionSetName']['bind'](this)),this['_sidebarView']['bind']('isEnabled')['to'](this['_revisionViewer']),this['_sidebarView']['timePeriodViews']['on']('add',(_0x10ff5a,_0x1d36eb)=>{_0x1d36eb['revisionViews']['on']('add',(_0x5398be,_0x1f15be)=>{_0x1f15be['bind']('isEnabled','isReady')['to'](this['_revisionViewer']);});}),this['_sidebarView']['render'](),this['listenTo'](this['editor']['data'],'ready',this['_handleEditorDataReady']['bind'](this)),this['listenTo'](this['_revisionViewer'],'change:diff',this['_handleDiffChange']['bind'](this)),_0x5e625a['appendChild'](this['_sidebarView']['element']);}['destroy'](){this['_sidebarView']['element']['remove'](),this['_sidebarView']['destroy']();}['_handleEditorDataReady'](){const _0x25afd2=this['_revisionsRepository']['getRevision'](0x0);if(_0x25afd2){const _0x352103=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x25afd2['id']);this['_revisionViewer']['compare'](_0x25afd2,_0x352103);}}['_handleRevisionSelected'](_0x5d848b,_0x56863b){const _0x4d120b=this['_revisionsRepository']['getRevision'](_0x56863b['id']),_0x3bbf6a=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x4d120b['id']);this['_revisionViewer']['compare'](_0x4d120b,_0x3bbf6a);}['_handleRevisionSetName'](_0x242db6,_0x561a4a){this['_revisionsRepository']['getRevision'](_0x561a4a['id'])['setName'](_0x561a4a['name']);}['_handleDiffChange'](_0x54b9a9,_0x1aafa1,_0x3fd23a){const _0x1f8877=this['_revisionsRepository']['getRevisionsInDiff'](_0x3fd23a);_0x1f8877['length']>0x2?(this['_sidebarView']['highlightRevisions'](_0x1f8877),this['_sidebarView']['selectRevision'](null)):(this['_sidebarView']['highlightRevisions']([]),this['_sidebarView']['selectRevision'](_0x1f8877[0x0]));}['_createRevisionActions'](){const _0x1d36e5=this['editor'],_0x3ae3f2=f['availableRevisionActions'],_0xec2ab=_0x1d36e5['config']['get']('revisionHistory.revisionActions')||f['defaultRevisionActions'];if(_0xec2ab['length'])return _0xec2ab['map'](_0x46a7ec=>{const _0x2bddd0='string'==typeof _0x46a7ec?Object['assign']({},_0x3ae3f2[_0x46a7ec]):_0x46a7ec;return _0x2bddd0['action']=_0x2bddd0['action']['bind'](this,_0x1d36e5),_0x2bddd0['isVisible']&&(_0x2bddd0['isVisible']=_0x2bddd0['isVisible']['bind'](this,_0x1d36e5)),_0x2bddd0;});}}function at(){return{'compareAgainstSelected':{'name':'Compare\x20against\x20selected','action':({plugins:_0x145d5f},_0xe9f365)=>{const _0x207c7c=_0x145d5f['get'](l),_0x27422a=_0x207c7c['repository'];let _0x416f03=_0x207c7c['diff']['newRevisionId'],_0x3f3ba9=_0xe9f365['id'];_0x27422a['getIndex'](_0x416f03)>_0x27422a['getIndex'](_0x3f3ba9)&&([_0x416f03,_0x3f3ba9]=[_0x3f3ba9,_0x416f03]),_0x207c7c['compare'](_0x416f03,_0x3f3ba9);},'isVisible':({plugins:_0x4c29f5},_0x4710a5)=>{const _0x3ae495=_0x4c29f5['get'](l);return!(_0x3ae495['repository']['getRevisionsInDiff'](_0x3ae495['diff'])['length']>0x2)&&!_0x4710a5['isSelected'];}},'restoreRevision':{'name':'Restore\x20this\x20revision','action':(_0x2d7067,{id:_0x2731a5})=>{_0x2d7067['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x2731a5);},'isVisible':({plugins:_0x541f8f},_0xbf13fa)=>!!_0x541f8f['get'](l)['repository']['getLaterVisibleRevision'](_0xbf13fa['id'])},'nameRevision':{'name':'Name\x20this\x20revision','action':({plugins:_0xe36c40},{id:_0x2baf8a,revisionNameView:_0x4274ea})=>{const _0x449654=_0xe36c40['get'](l),_0x56c6c0=_0x449654['repository']['getEarlierVisibleRevision'](_0x2baf8a);_0x449654['compare'](_0x2baf8a,_0x56c6c0),_0x4274ea['focus'](),_0x4274ea['fieldView']['select']();}}};}class Z extends tt{['_view'];['_toolbarConfig'];['_elementReplacer'];get['view'](){return this['_view'];}constructor(_0x4648b1,_0xf9886b){super(_0x4648b1),this['_view']=_0xf9886b,this['_toolbarConfig']=st(_0x4648b1['config']['get']('toolbar')),this['_elementReplacer']=new it();}get['element'](){return this['view']['element'];}['init'](_0x13eead){const _0x1c0bfe=this['editor'],_0x136d2d=this['view'],_0x4389f8=_0x1c0bfe['editing']['view'],_0xede40a=_0x136d2d['editable'],_0x178d38=_0x4389f8['document']['getRoot']();_0xede40a['name']=_0x178d38['rootName'],_0x136d2d['render']();const _0x3083cf=_0xede40a['element'];this['setEditableElement'](_0xede40a['name'],_0x3083cf),_0x136d2d['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x4389f8['attachDomRoot'](_0x3083cf),this['_elementReplacer']['replace'](_0x13eead,this['element']),this['_initToolbar'](),this['fire']('ready');}['destroy'](){super['destroy']();const _0x45c5bd=this['view'],_0x323da1=this['editor']['editing']['view'];this['_elementReplacer']['restore'](),_0x323da1['detachDomRoot'](_0x45c5bd['editable']['name']),_0x45c5bd['destroy']();}['_initToolbar'](){const _0x1e369c=this['view'];_0x1e369c['stickyPanel']['bind']('isActive')['to'](this['focusTracker'],'isFocused'),_0x1e369c['stickyPanel']['limiterElement']=_0x1e369c['element'],_0x1e369c['stickyPanel']['bind']('viewportTopOffset')['to'](this,'viewportOffset',({top:_0x4cf0b6})=>_0x4cf0b6),_0x1e369c['toolbar']['fillFromConfig'](this['_toolbarConfig'],this['componentFactory']),this['addToolbar'](_0x1e369c['toolbar']);}}class ii extends _0x5bf05e{['_editable'];['stickyPanel'];['toolbar'];get['editable'](){return this['_editable'];}constructor(_0xaf8c7f,_0x458682,_0x48b941={}){super(_0xaf8c7f),this['stickyPanel']=new _0x3eef83(_0xaf8c7f),this['toolbar']=new _0x16efcd(_0xaf8c7f,{'shouldGroupWhenFull':_0x48b941['shouldToolbarGroupWhenFull']}),this['_editable']=new te(_0xaf8c7f,_0x458682);}['render'](){super['render'](),this['stickyPanel']['content']['add'](this['toolbar']),this['top']['add'](this['stickyPanel']),this['main']['add'](this['editable']);}}class m extends/* #__PURE__ -- @preserve */
|
|
30
|
+
_0x2846a4(_0x5f5802){['_ui'];get['ui'](){return this['_ui'];}constructor(_0x2ab3c2,_0xa2104d){super(_0xa2104d),this['sourceElement']=_0x2ab3c2,this['model']['document']['createRoot']();const _0x22a9dc=new ii(this['locale'],this['editing']['view'],{'shouldToolbarGroupWhenFull':!0x0});this['_ui']=new Z(this,_0x22a9dc);}['destroy'](){return this['updateSourceElement'](),this['ui']['destroy'](),super['destroy']();}static async['create'](_0x1ba14b,_0x2d1f2a){const _0x4a48db=new this(_0x1ba14b,_0x2d1f2a);return await _0x4a48db['initPlugins'](),await _0x4a48db['ui']['init'](_0x1ba14b),await _0x4a48db['data']['init'](_0x4a48db['config']['get']('initialData')||''),_0x4a48db['fire']('ready'),_0x4a48db;}}const d=['RevisionHistoryUI','RestrictedEditingMode'];class ht extends _0x42167a{['result'];static get['pluginName'](){return'RevisionViewerIntegration';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x267da2){function _0x2735b7(_0x48a2bb){return _0x48a2bb['map'](_0x5cd8d8=>String['fromCharCode'](_0x5cd8d8))['join']('');}super(_0x267da2),this['result']='end',_0x267da2[_0x2735b7([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x2735b7([0x76,0x69,0x65,0x77])][_0x2735b7([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x2735b7([0x61,0x75,0x74,0x6f]),_0x267da2[_0x2735b7([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x2735b7([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x2735b7([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x2735b7([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x2735b7([0x6f,0x6b])});}}class ct extends _0x42167a{['_viewerEditor'];static get['pluginName'](){return'RevisionHistory';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[h,v];}constructor(_0x5d6ec3){if(super(_0x5d6ec3),!this['editor']['config']['get']('revisionHistory'))throw new _0x3c38dd('revision-history-missing-configuration',this);this['_viewerEditor']=null,this['set']('isRevisionViewerOpen',!0x1),this['editor']['config']['define']('revisionHistory.showRevisionViewerCallback',_0x369548=>this['_showRevisionViewer']({..._0x369548,'translations':this['editor']['locale']['translations']})),this['editor']['config']['define']('revisionHistory.closeRevisionViewerCallback',_0x360f21=>this['_closeRevisionViewer'](_0x360f21)),this['editor']['config']['define']('revisionHistory.restoreRevisionCallback',_0x4ce1c1=>this['_restoreRevision'](_0x4ce1c1)),this['editor']['config']['define']('revisionHistory.requireRevisionName',!0x1),this['_enhanceShowRevisionViewerCallback'](),this['_enhanceCloseRevisionViewerCallback']();}set['adapter'](_0x286a64){this['editor']['plugins']['get']('RevisionTracker')['adapter']=_0x286a64;}get['adapter'](){return this['editor']['plugins']['get']('RevisionTracker')['adapter'];}['addRevisionData'](_0x45ad89){return this['editor']['plugins']['get']('RevisionTracker')['addRevisionData'](_0x45ad89);}['getRevision'](_0x457479){return this['editor']['plugins']['get']('RevisionsRepository')['getRevision'](_0x457479);}['getRevisions'](_0x5e9bc5){return this['editor']['plugins']['get']('RevisionsRepository')['getRevisions'](_0x5e9bc5||{'toJSON':!0x1});}['_getRevisionViewerEditorConfig'](){const _0x3466d9=this['editor'],_0x747c0c=_0x56c73f(_0x3466d9,d),_0x25088f=_0x3466d9['plugins']['get']('RevisionTracker'),_0x25ef6c=_0x3466d9['plugins']['get']('Users')['users'];return _0x747c0c['toolbar']=['exitToEditing','restoreRevision','changesNavigation'],delete _0x747c0c['lazyRoots'],(_0x747c0c['plugins']['push'](ht,l,u,class extends _0x42167a{static get['requires'](){return[l,'Users'];}['init'](){const _0x3ba0f0=this['editor']['plugins']['get']('Users');for(const _0x32254b of _0x25ef6c)_0x32254b['isAnonymous']||_0x3ba0f0['getUser'](_0x32254b['id'])||_0x3ba0f0['addUser'](_0x32254b);const _0x4ee824=_0x25088f['repository']['getRevisions']();let _0x379a60=null;const _0x1aacbe=this['editor']['plugins']['get']('RevisionViewer');_0x1aacbe['adapter']=_0x25088f['adapter'],_0x1aacbe['bind']('isEnabled')['to'](_0x25088f),this['editor']['commands']['get']('restoreRevision')['bind']('isEnabled')['to'](_0x3466d9,'isReadOnly',_0x2ef527=>!_0x2ef527);for(const _0x59b1f9 of _0x4ee824){const _0x375bad=null===_0x59b1f9['creator'];if(_0x375bad&&_0x59b1f9['toVersion']===_0x59b1f9['fromVersion'])continue;const _0x5414e6=_0x59b1f9['toJSON']();_0x1aacbe['addRevisionData'](_0x5414e6,(_0x1b2149,_0x143837,_0x37095f)=>{if(_0x375bad){if(_0x379a60)_0x379a60['_update'](_0x1b2149,_0x143837);else{if(!_0x143837){const _0x3f2923=_0x37095f['toJSON']();_0x3f2923['id']=_0x54a7d7(),_0x25088f['saveRevision'](_0x3f2923,_0x37095f['toVersion'])['then'](_0x143f46=>{_0x379a60=_0x143f46;});}}}else _0x59b1f9['_update'](_0x1b2149,_0x143837);});}}},f),_0x747c0c);}['_enhanceShowRevisionViewerCallback'](){const _0x585551=this['editor']['config']['get']('revisionHistory')['showRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.showRevisionViewerCallback',async()=>{this['editor']['enableReadOnlyMode']('revision-history-viewer-opened');const _0x299d47=this['editor']['plugins']['get']('RevisionTracker');if(this['editor']['plugins']['has']('Autosave')){const _0x27a7c0=this['editor']['plugins']['get']('Autosave');await _0x27a7c0['save']();}else await _0x299d47['update']();if(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('Dialog')){const _0x15fbe2=this['editor']['plugins']['get']('Dialog');_0x15fbe2['isOpen']&&_0x15fbe2['hide']();}const _0x286e55=this['_getRevisionViewerEditorConfig']();return _0x585551(_0x286e55)['then'](_0x10b099=>{return(this['_viewerEditor']=_0x10b099,this['editor']['plugins']['has']('Annotations'))&&this['editor']['plugins']['get']('Annotations')['refreshVisibility'](),(this['editor']['plugins']['has']('DocumentOutline')&&(this['editor']['plugins']['get']('DocumentOutlineUI')['view']['element']['style']['display']='none'),_0x10b099);})['catch'](_0xc27190=>(console['error'](_0xc27190),this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),null));});}['_enhanceCloseRevisionViewerCallback'](){const _0x424544=this['editor']['config']['get']('revisionHistory')['closeRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.closeRevisionViewerCallback',()=>(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('DocumentOutline')&&(this['editor']['plugins']['get']('DocumentOutlineUI')['view']['element']['style']['display']=''),this['_viewerEditor']['plugins']['get']('RevisionViewer')['_cleanUp'](),_0x424544(this['_viewerEditor'])['then'](()=>{if(this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),this['_viewerEditor']=null,this['editor']['plugins']['has']('Annotations')){const _0x3e62af=this['editor']['plugins']['get']('Annotations');_0x3e62af['refreshVisibility'](),_0x3e62af['refreshPositioning']();}})));}['_showRevisionViewer'](_0x293141){const _0x54ffdb=this['editor']['config']['get']('revisionHistory.editorContainer'),_0x4abdde=this['editor']['config']['get']('revisionHistory.viewerContainer'),_0x4d571a=this['editor']['config']['get']('revisionHistory.viewerEditorElement');return m['create'](_0x4d571a,_0x293141)['then'](_0x48aa3d=>(_0x4abdde['style']['display']='block',_0x54ffdb['style']['display']='none',this['isRevisionViewerOpen']=!0x0,_0x48aa3d));}['_closeRevisionViewer'](_0x61ce25){const _0x205b59=this['editor']['config']['get']('revisionHistory.editorContainer');return this['editor']['config']['get']('revisionHistory.viewerContainer')['style']['display']='none',_0x205b59['style']['display']='',this['isRevisionViewerOpen']=!0x1,_0x61ce25['destroy']();}async['_restoreRevision'](_0x5cb073){const _0x4f03a0=this['editor'],_0x1dc527=this['_viewerEditor']['plugins']['get']('RevisionViewer'),_0x517ab4=_0x4f03a0['plugins']['get']('RevisionTracker'),_0x363ffe=_0x4f03a0['plugins']['get']('RevisionHistoryUtils'),_0x3bf6b9=_0x1dc527['repository']['getRevision'](_0x5cb073);let _0x273bea,_0x3cb3c9,_0x2cda65;try{await _0x363ffe['loadRevisionData'](_0x3bf6b9,this['adapter']),_0x273bea=_0x363ffe['getRevisionDocumentData'](_0x3bf6b9),_0x3cb3c9=_0x363ffe['getRevisionRootsAttributes'](_0x3bf6b9);}catch(_0x28c376){return void console['error'](_0x28c376);}_0x4f03a0['model']['change'](_0x2edd7e=>{for(const _0x1450ab of Array['from'](_0x4f03a0['model']['markers']['getMarkersGroup']('restrictedEditingException')))_0x2edd7e['removeMarker'](_0x1450ab);}),_0x1dc527['isReady']=!0x1,_0x4f03a0['model']['enqueueChange'](_0x246314=>{_0x246314['setSelection'](null),_0x246314['removeSelectionAttribute'](_0x4f03a0['model']['document']['selection']['getAttributeKeys']());const _0x151d1e=Object['keys'](_0x273bea);for(const _0x1cbc82 of _0x4f03a0['model']['document']['roots'])'$graveyard'!=_0x1cbc82['rootName']&&_0x1cbc82['isAttached']()&&!_0x151d1e['includes'](_0x1cbc82['rootName'])&&_0x246314['detachRoot'](_0x1cbc82);for(const _0x2de968 of _0x151d1e){let _0x4baf8c=_0x4f03a0['model']['document']['getRoot'](_0x2de968);_0x4baf8c&&_0x4baf8c['isAttached']()||(_0x4baf8c=_0x246314['addRoot'](_0x2de968));const _0x492fc1=_0x3cb3c9[_0x2de968],_0x389284=Object['keys'](_0x492fc1),_0xd41b6f=_0x273bea[_0x2de968];for(const _0x3a0184 of _0x4baf8c['getAttributeKeys']())_0x389284['includes'](_0x3a0184)||_0x246314['removeAttribute'](_0x3a0184,_0x4baf8c);for(const _0x316c99 of _0x389284)_0x246314['setAttribute'](_0x316c99,_0x3cb3c9[_0x2de968][_0x316c99],_0x4baf8c);_0x246314['remove'](_0x246314['createRangeIn'](_0x4baf8c)),_0x246314['insert'](_0x4f03a0['data']['parse'](_0xd41b6f,_0x4baf8c),_0x4baf8c,0x0);}});const _0x1b6331=R(_0x4f03a0['locale'],'Restored');if(_0x3bf6b9['name'])_0x2cda65=-0x1==_0x3bf6b9['name']['indexOf'](_0x1b6331)?_0x1b6331+':\x20'+_0x3bf6b9['name']:_0x3bf6b9['name'];else _0x2cda65=_0x1b6331+':\x20'+(_0x3bf6b9['createdAt']['toLocaleDateString'](_0x4f03a0['locale']['uiLanguage'],{'month':'long','day':'numeric'})+',\x20'+_0x3bf6b9['createdAt']['toLocaleTimeString'](_0x4f03a0['locale']['uiLanguage'],{'hour':'numeric','minute':'numeric'}));return await _0x517ab4['saveRevision']({'name':_0x2cda65}),_0x1dc527['isReady']=!0x0,_0x4f03a0['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}}export{nt as RestoreRevisionCommand,I as Revision,ct as RevisionHistory,v as RevisionHistoryUI,$ as RevisionHistoryUtils,h as RevisionTracker,l as RevisionViewer,m as RevisionViewerEditor,ht as RevisionViewerIntegration,ji as RevisionViewerLoadingOverlay,u as RevisionViewerUI,S as RevisionsRepository,f as RevisionsSidebar,rt as ShowChangeCommand};
|