@ckeditor/ckeditor5-revision-history 0.0.0-nightly-20251012.0 → 0.0.0-nightly-20251013.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/revision-history.js +1 -1
- package/dist/index.js +7 -7
- package/package.json +12 -12
- package/src/revisionsrepository.js +1 -1
- package/src/ui/revision/createrevisionactionsdropdown.js +1 -1
- package/src/ui/revision/revisionauthorview.js +1 -1
- package/src/ui/revision/revisionnameview.js +1 -1
- package/src/ui/revision/revisionview.js +2 -2
- package/src/ui/revision/subrevisioncollapserview.js +1 -1
- package/src/ui/revision/subrevisionview.js +1 -1
- package/src/ui/revisionhistory/revisionhistorysaverevisionformview.js +2 -2
- package/src/ui/revisionhistory/revisionhistoryui.js +1 -1
- package/src/ui/revisionssidebar/revisionssidebar.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/revisionviewer/changedetailsview.js +1 -1
- package/src/ui/revisionviewer/changesnavigationview.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
|
-
_0xe47491(){['id'];['creator'];['authors'];['diffData'];['toVersion'];['fromVersion'];['model'];constructor(_0x1eb0f1){super(),this['id']=_0x1eb0f1['id']||_0x1f92e5(),this['creator']=_0x1eb0f1['creator']||null,this['authors']=_0x1eb0f1['authors']||[],this['diffData']=_0x1eb0f1['diffData']||null,this['toVersion']=_0x1eb0f1['toVersion']||0x0,this['fromVersion']=_0x1eb0f1['fromVersion']||0x0,this['set']('name',_0x1eb0f1['name']||''),this['set']('createdAt',_0x1eb0f1['createdAt']||new Date()),this['set']('attributes',_0x1eb0f1['attributes']||{});}['setName'](_0x3e8357){this['_update']({'name':_0x3e8357});}['setAttribute'](_0x3008ee,_0x21e315){const _0x9f7ed6=_0x24e9a2(this['attributes']);_0x8e1f17(_0x9f7ed6,_0x3008ee,_0x21e315),this['_update']({'attributes':_0x9f7ed6});}['removeAttribute'](_0xf052ec){const _0x3bed01=_0x24e9a2(this['attributes']);_0x1d16e2(_0x3bed01,_0xf052ec),this['_update']({'attributes':_0x3bed01});}['_update'](_0x4102d8,_0x20776f=!0x1){let _0x202e7a=!0x1;const _0x174662={'id':this['id']},_0x4702c7=['name','createdAt','diffData','authors','attributes','toVersion','fromVersion','creatorId'];for(const _0x4b4726 of _0x4702c7){const _0x48fe=_0x4102d8[_0x4b4726];void 0x0!==_0x48fe&&_0x48fe!==this[_0x4b4726]&&(this[_0x4b4726]=_0x48fe,_0x174662[_0x4b4726]=_0x48fe,_0x202e7a=!0x0);}_0x202e7a&&(_0x174662['authors']&&(_0x174662['authorsIds']=_0x174662['authors']['map'](_0x11b6fb=>_0x11b6fb['id']),delete _0x174662['authors']),this['fire']('_update',_0x174662,_0x20776f));}['toJSON'](){return{'id':this['id'],'name':this['name'],'creatorId':this['creator']?this['creator']['id']:null,'authorsIds':this['authors']['map'](_0x2f3698=>_0x2f3698['id']),'diffData':this['diffData'],'createdAt':this['createdAt'],'attributes':this['attributes'],'fromVersion':this['fromVersion'],'toVersion':this['toVersion']};}}class S extends _0x1f60bb{['_revisions'];static get['requires'](){return[_0x24b744];}static get['pluginName'](){return'RevisionsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get['length'](){return this['_revisions']['length'];}constructor(_0x1b8d5f){super(_0x1b8d5f),this['_revisions']=new _0x5879da();}['afterInit'](){!async function(_0x1356b3){const _0x5c0fec=_0x4821a8([0x73,0x47,0x36,0x35,0x43,0x72,0x6b,0x31,0x63,0x64,0x32,0x69,0x67,0x4c,0x4e,0x37,0x7a,0x49,0x45,0x41,0x59,0x6a,0x75,0x39,0x4a,0x33,0x68,0x62,0x50,0x42,0x74,0x6e,0x46,0x4d,0x78,0x51,0x66,0x34,0x48,0x77,0x5a,0x61,0x6c,0x30,0x71,0x54,0x53,0x56,0x4b,0x79,0x44,0x6d,0x6f,0x52,0x76,0x55,0x58,0x65,0x70,0x57,0x4f,0x38]),_0x560b87=0xeb829,_0x5ec65b=0x7374585f,_0x1ba80b=0x73732da7^_0x5ec65b,_0x33d044=window[_0x4821a8([0x44,0x61,0x74,0x65])][_0x4821a8([0x6e,0x6f,0x77])](),_0x1936e6=_0x1356b3[_0x4821a8([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x5e78b7=new window[(_0x4821a8([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4b2efa=>{_0x1936e6[_0x4821a8([0x6f,0x6e,0x63,0x65])](_0x4821a8([0x72,0x65,0x61,0x64,0x79]),_0x4b2efa);}),_0x116602={[_0x4821a8([0x6b,0x74,0x79])]:_0x4821a8([0x45,0x43]),[_0x4821a8([0x75,0x73,0x65])]:_0x4821a8([0x73,0x69,0x67]),[_0x4821a8([0x63,0x72,0x76])]:_0x4821a8([0x50,0x2d,0x32,0x35,0x36]),[_0x4821a8([0x78])]:_0x4821a8([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]),[_0x4821a8([0x79])]:_0x4821a8([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]),[_0x4821a8([0x61,0x6c,0x67])]:_0x4821a8([0x45,0x53,0x32,0x35,0x36])},_0x23655b=_0x1936e6[_0x4821a8([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x4821a8([0x67,0x65,0x74])](_0x4821a8([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x4c1aee(){let _0x121196,_0x76c53e=null,_0x1b835c=null;try{if(_0x23655b==_0x4821a8([0x47,0x50,0x4c]))return _0x4821a8([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x121196=_0x3b2c06(),!_0x121196)return _0x4821a8([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x121196[_0x4821a8([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x1b835c=_0x119fdc(_0x121196[_0x4821a8([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x121196[_0x4821a8([0x6a,0x74,0x69])])),await _0x282933()?_0x242120()?_0x404d49()?_0x4821a8([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x349143()?(_0x121196[_0x4821a8([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x4821a8([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x76c53e=_0x34e662(_0x4821a8([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x121196[_0x4821a8([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x4821a8([0x74,0x72,0x69,0x61,0x6c])&&(_0x76c53e=_0x34e662(_0x4821a8([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x251581()):_0x4821a8([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x4821a8([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x4821a8([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x4821a8([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x404d49(){const _0x313281=[_0x4821a8([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x4821a8([0x74,0x72,0x69,0x61,0x6c])][_0x4821a8([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x121196[_0x4821a8([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x33d044/0x3e8:0xe10*_0x1ba80b;return _0x121196[_0x4821a8([0x65,0x78,0x70])]<_0x313281;}function _0x242120(){const _0x163f96=_0x121196[_0x4821a8([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x163f96)return!0x1;if(_0x163f96[_0x4821a8([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4821a8([0x2a])))return!0x0;if(_0x163f96[_0x4821a8([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4821a8([0x52,0x48])))return!0x0;if(_0x163f96[_0x4821a8([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4821a8([0x52,0x52,0x48]))){if(_0x5e8f90())return!0x0;if(_0x353b67()||_0x14dbb5())return!0x0;}return!0x1;}function _0x349143(){const _0x44a543=_0x121196[_0x4821a8([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x44a543||0x0==_0x44a543[_0x4821a8([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x136f7f}=new URL(window[_0x4821a8([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x44a543[_0x4821a8([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x136f7f))return!0x0;const _0x5e4234=_0x136f7f[_0x4821a8([0x73,0x70,0x6c,0x69,0x74])](_0x4821a8([0x2e]));return _0x44a543[_0x4821a8([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x9394f9=>_0x9394f9[_0x4821a8([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4821a8([0x2a])))[_0x4821a8([0x6d,0x61,0x70])](_0x1d23a3=>_0x1d23a3[_0x4821a8([0x73,0x70,0x6c,0x69,0x74])](_0x4821a8([0x2e])))[_0x4821a8([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x5b76f1=>_0x5b76f1[_0x4821a8([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x5e4234[_0x4821a8([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x4821a8([0x6d,0x61,0x70])](_0x188160=>Array(_0x5e4234[_0x4821a8([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x188160[_0x4821a8([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x4821a8([0x66,0x69,0x6c,0x6c])](_0x188160[0x0]===_0x4821a8([0x2a])?_0x4821a8([0x2a]):'')[_0x4821a8([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x188160))[_0x4821a8([0x73,0x6f,0x6d,0x65])](_0x102b78=>_0x5e4234[_0x4821a8([0x65,0x76,0x65,0x72,0x79])]((_0x4a55e8,_0x30a1af)=>_0x102b78[_0x30a1af]===_0x4a55e8||_0x102b78[_0x30a1af]===_0x4821a8([0x2a])));}function _0x251581(){return _0x76c53e&&_0x1b835c?new window[(_0x4821a8([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x488b6c,_0x52a5a6)=>{_0x76c53e[_0x4821a8([0x74,0x68,0x65,0x6e])](_0x488b6c,_0x52a5a6),_0x1b835c[_0x4821a8([0x74,0x68,0x65,0x6e])](_0x5652e3=>{_0x5652e3!=_0x4821a8([0x56,0x61,0x6c,0x69,0x64])&&_0x488b6c(_0x5652e3);},_0x52a5a6);}):_0x76c53e||_0x1b835c||_0x4821a8([0x56,0x61,0x6c,0x69,0x64]);}}function _0x119fdc(_0x1ce3a6,_0x4856ea){return new window[(_0x4821a8([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x287e08=>{if(_0x461422())return _0x287e08(_0x4821a8([0x56,0x61,0x6c,0x69,0x64]));_0x40de21(),_0x1936e6[_0x4821a8([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x4821a8([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0xfa1e7=!0x1;const _0x45b5b5=_0x1f92e5();function _0x154bae(_0x5ba088){return!!_0x5ba088&&(typeof _0x5ba088===_0x4821a8([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x5ba088===_0x4821a8([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x5ba088[_0x4821a8([0x74,0x68,0x65,0x6e])]===_0x4821a8([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x5ba088[_0x4821a8([0x63,0x61,0x74,0x63,0x68])]===_0x4821a8([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x21eb58(_0x2e5aec){_0x1262ea(_0x2e5aec)[_0x4821a8([0x74,0x68,0x65,0x6e])](_0x457b79=>{if(!_0x457b79||_0x457b79[_0x4821a8([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x4821a8([0x6f,0x6b]))return _0x4821a8([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x19880e(_0x438791(_0x45b5b5+_0x4856ea))!=_0x457b79[_0x4821a8([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x4821a8([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x4821a8([0x56,0x61,0x6c,0x69,0x64]);})[_0x4821a8([0x74,0x68,0x65,0x6e])](_0x557154=>(_0x548f34(),_0x557154),()=>{const _0x38e0e0=_0x15ce20();return null==_0x38e0e0?(_0x548f34(),_0x4821a8([0x56,0x61,0x6c,0x69,0x64])):_0x4821a8(_0x33d044-_0x38e0e0>(0x5778dc5f^_0x5ec65b)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x4821a8([0x74,0x68,0x65,0x6e])](_0x287e08)[_0x4821a8([0x63,0x61,0x74,0x63,0x68])](()=>{_0x287e08(_0x4821a8([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x1dc54a=0x7342b6df^_0x5ec65b;function _0x548f34(){const _0x2b82da=_0x4821a8([0x6c,0x6c,0x63,0x74,0x2d])+_0x19880e(_0x438791(_0x1ce3a6)),_0x395127=_0x1b63cd(_0x19880e(window[_0x4821a8([0x4d,0x61,0x74,0x68])][_0x4821a8([0x63,0x65,0x69,0x6c])](_0x33d044/_0x1dc54a)));window[_0x4821a8([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x4821a8([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x2b82da,_0x395127);}function _0x15ce20(){const _0x1d4cc2=_0x4821a8([0x6c,0x6c,0x63,0x74,0x2d])+_0x19880e(_0x438791(_0x1ce3a6)),_0xcf8cc0=window[_0x4821a8([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x4821a8([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x1d4cc2);return _0xcf8cc0?window[_0x4821a8([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x1b63cd(_0xcf8cc0),0x10)*_0x1dc54a:null;}function _0x1262ea(_0x87e6f9){return new window[(_0x4821a8([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x349b94,_0x5bd459)=>{_0x87e6f9[_0x4821a8([0x74,0x68,0x65,0x6e])](_0x349b94,_0x5bd459),window[_0x4821a8([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x5bd459,0x73758c9f^_0x5ec65b);});}}_0x1936e6[_0x4821a8([0x6f,0x6e])](_0x4821a8([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x19d97b,_0x4b34c8)=>{if(_0x4b34c8[0x0]!=_0x1ce3a6)return _0x287e08(_0x4821a8([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x4b34c8[0x1]={..._0x4b34c8[0x1],[_0x4821a8([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x45b5b5};},{[_0x4821a8([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x4821a8([0x68,0x69,0x67,0x68])}),_0x1936e6[_0x4821a8([0x6f,0x6e])](_0x4821a8([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x3e4fa8=>{_0x154bae(_0x3e4fa8[_0x4821a8([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0xfa1e7=!0x0,_0x21eb58(_0x3e4fa8[_0x4821a8([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x4821a8([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x4821a8([0x6c,0x6f,0x77])}),_0x5e78b7[_0x4821a8([0x74,0x68,0x65,0x6e])](()=>{_0xfa1e7||_0x287e08(_0x4821a8([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x461422(){return _0x1936e6[_0x4821a8([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x4821a8([0x76,0x69,0x65,0x77])][_0x4821a8([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x4821a8([0x61,0x75,0x74,0x6f]);}function _0x40de21(){_0x1936e6[_0x4821a8([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x4821a8([0x76,0x69,0x65,0x77])][_0x4821a8([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x4821a8([0x61,0x75,0x74,0x6f]);}}function _0x34e662(_0xea2994){const _0x1de37a=[new window[(_0x4821a8([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2d4927=>setTimeout(_0x2d4927,0x737d6693^_0x5ec65b)),_0x5e78b7[_0x4821a8([0x74,0x68,0x65,0x6e])](()=>new window[(_0x4821a8([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x408995=>{const _0x8b0f41=0x73745858^_0x5ec65b,_0x4aef50=_0x1356b3[_0x4821a8([0x5f,0x72,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x73])];function _0x69e6b4(){_0x4aef50[_0x4821a8([0x6c,0x65,0x6e,0x67,0x74,0x68])]>=_0x8b0f41&&_0x408995();}_0x69e6b4(),_0x4aef50[_0x4821a8([0x6f,0x6e])](_0x4821a8([0x61,0x64,0x64]),_0x69e6b4);})),new window[(_0x4821a8([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x52ec6e=>{function _0x1bc4c4(){for(const _0x4fc10f in window)if(window[_0x4821a8([0x4e,0x75,0x6d,0x62,0x65,0x72])]['isNaN'](window[_0x4821a8([0x4e,0x75,0x6d,0x62,0x65,0x72])](_0x4fc10f))&&window[_0x4fc10f]==_0x560b87)return _0x52ec6e();_0x1936e6[_0x4821a8([0x73,0x74,0x61,0x74,0x65])]!=_0x4821a8([0x64,0x65,0x73,0x74,0x72,0x6f,0x79,0x65,0x64])&&window[_0x4821a8([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x1bc4c4,0x73744bd7^_0x5ec65b);}_0x3fdc5a(_0x4821a8([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))&&_0x1bc4c4();})];return window[_0x4821a8([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x4821a8([0x72,0x61,0x63,0x65])](_0x1de37a)[_0x4821a8([0x74,0x68,0x65,0x6e])](()=>_0xea2994);}async function _0x2e1af9(){if(await _0x5e78b7,_0x3fdc5a(_0x4821a8([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))){const _0x541e9c=_0x1356b3[_0x4821a8([0x67,0x65,0x74,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])](0x0),_0x30509c=_0x1356b3[_0x4821a8([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])](_0x541e9c[_0x4821a8([0x69,0x64])]),_0x4275a4=_0x68d1d(_0x4821a8([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]));return await _0x4275a4[_0x4821a8([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])](_0x541e9c['id'],_0x30509c?_0x30509c['id']:null,!0x0),_0x4275a4[_0x4821a8([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x4821a8([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x4275a4[_0x4821a8([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x4275a4[_0x4821a8([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])]=_0x3831f7,void(_0x4275a4[_0x4821a8([0x5f,0x67,0x65,0x74,0x44,0x69,0x66,0x66])]=_0x3831f7);}if(_0x3fdc5a(_0x4821a8([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]))){const _0x5ef3ae=_0x68d1d(_0x4821a8([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]));_0x5ef3ae[_0x4821a8([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x4821a8([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x5ef3ae[_0x4821a8([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x5ef3ae[_0x4821a8([0x75,0x70,0x64,0x61,0x74,0x65])]=_0x3831f7,_0x5ef3ae[_0x4821a8([0x73,0x61,0x76,0x65,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])]=_0x3831f7;}_0x1936e6[_0x4821a8([0x6d,0x6f,0x64,0x65,0x6c])][_0x4821a8([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x3831f7,_0x1936e6[_0x4821a8([0x6d,0x6f,0x64,0x65,0x6c])][_0x4821a8([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x3831f7,_0x1936e6[_0x4821a8([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x4821a8([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x5e8f90(){return _0x3fdc5a(_0x4821a8([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x68d1d(_0x4821a8([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x4821a8([0x73,0x74,0x61,0x74,0x65])]==_0x4821a8([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x353b67(){return _0x3fdc5a(_0x4821a8([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 _0x14dbb5(){return _0x3fdc5a(_0x4821a8([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x1be273(_0x127d3f){const _0x3b621e=_0x5090a3();_0x1936e6[_0x3b621e]=_0x4821a8([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])+_0x127d3f,_0x127d3f[_0x4821a8([0x65,0x6e,0x64,0x73,0x57,0x69,0x74,0x68])](_0x4821a8([0x4c,0x69,0x6d,0x69,0x74]))&&(window[_0x5090a3()]=_0x560b87),_0x127d3f!=_0x4821a8([0x56,0x61,0x6c,0x69,0x64])&&_0x2e1af9();}function _0x5090a3(){const _0x596c9a=window[_0x4821a8([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x4821a8([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x4821a8([0x6e,0x6f,0x77])]())[_0x4821a8([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x4821a8([0x2e]),'');let _0xead79c=_0x4821a8([0x73]);for(let _0x1049f4=0x0;_0x1049f4<_0x596c9a[_0x4821a8([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x1049f4+=0x2){let _0x16b77b=window[_0x4821a8([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x596c9a[_0x4821a8([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x1049f4,_0x1049f4+0x2));_0x16b77b>=_0x5c0fec[_0x4821a8([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x16b77b-=_0x5c0fec[_0x4821a8([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0xead79c+=_0x5c0fec[_0x16b77b];}return _0xead79c;}function _0x3b2c06(){const _0x5ce6e3=_0x23655b[_0x4821a8([0x73,0x70,0x6c,0x69,0x74])](_0x4821a8([0x2e]));if(0x3!=_0x5ce6e3[_0x4821a8([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x308947(_0x5ce6e3[0x1]);function _0x308947(_0x5d5801){const _0x583e3b=_0x3b51be(_0x5d5801);return _0x583e3b&&_0x100857()?_0x583e3b:null;function _0x100857(){const _0x2d5f11=_0x583e3b[_0x4821a8([0x6a,0x74,0x69])],_0x110877=window[_0x4821a8([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x2d5f11[_0x4821a8([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x2d5f11[_0x4821a8([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0xfb65cb={..._0x583e3b,[_0x4821a8([0x6a,0x74,0x69])]:_0x2d5f11[_0x4821a8([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x2d5f11[_0x4821a8([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0xfb65cb[_0x4821a8([0x76,0x63])],_0x438791(_0xfb65cb)==_0x110877;}}}async function _0x282933(){let _0x175f63=!0x0;try{const _0x504ef1=_0x23655b[_0x4821a8([0x73,0x70,0x6c,0x69,0x74])](_0x4821a8([0x2e])),[_0x31ec74,_0x28f412,_0x3744b8]=_0x504ef1;return _0x184c94(_0x31ec74),await _0x1e80f8(_0x31ec74,_0x28f412,_0x3744b8),_0x175f63;}catch{return!0x1;}function _0x184c94(_0x3232bd){const _0x33e345=_0x3b51be(_0x3232bd);_0x33e345&&_0x33e345[_0x4821a8([0x61,0x6c,0x67])]==_0x4821a8([0x45,0x53,0x32,0x35,0x36])||(_0x175f63=!0x1);}async function _0x1e80f8(_0x6498cf,_0x9ffcc8,_0x13bca6){const _0x220475=window[_0x4821a8([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x4821a8([0x66,0x72,0x6f,0x6d])](_0x5b6df5(_0x13bca6),_0x4a38bc=>_0x4a38bc[_0x4821a8([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x570feb=new window[(_0x4821a8([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x4821a8([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x6498cf+_0x4821a8([0x2e])+_0x9ffcc8),_0xf43e91=window[_0x4821a8([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x4821a8([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0xf43e91)return;const _0x72843f=await _0xf43e91[_0x4821a8([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x4821a8([0x6a,0x77,0x6b]),_0x116602,{[_0x4821a8([0x6e,0x61,0x6d,0x65])]:_0x4821a8([0x45,0x43,0x44,0x53,0x41]),[_0x4821a8([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x4821a8([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x4821a8([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0xf43e91[_0x4821a8([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x4821a8([0x6e,0x61,0x6d,0x65])]:_0x4821a8([0x45,0x43,0x44,0x53,0x41]),[_0x4821a8([0x68,0x61,0x73,0x68])]:{[_0x4821a8([0x6e,0x61,0x6d,0x65])]:_0x4821a8([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x72843f,_0x220475,_0x570feb)||(_0x175f63=!0x1);}}function _0x3b51be(_0x2de5ea){return _0x2de5ea[_0x4821a8([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x4821a8([0x65,0x79]))?JSON[_0x4821a8([0x70,0x61,0x72,0x73,0x65])](_0x5b6df5(_0x2de5ea)):null;}function _0x5b6df5(_0x43fa0){return window[_0x4821a8([0x61,0x74,0x6f,0x62])](_0x43fa0[_0x4821a8([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x4821a8([0x2b]))[_0x4821a8([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x4821a8([0x2f])));}function _0x438791(_0x486893){let _0x4802eb=0x1505;function _0x2acdd1(_0x7f56eb){for(let _0x31893e=0x0;_0x31893e<_0x7f56eb[_0x4821a8([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x31893e++){const _0x511665=_0x7f56eb[_0x4821a8([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x31893e);_0x4802eb=(_0x4802eb<<0x5)+_0x4802eb+_0x511665,_0x4802eb&=_0x4802eb;}}function _0x9e63a2(_0x258fd6){Array[_0x4821a8([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x258fd6)?_0x258fd6[_0x4821a8([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x9e63a2):_0x258fd6&&typeof _0x258fd6==_0x4821a8([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x4821a8([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x258fd6)[_0x4821a8([0x73,0x6f,0x72,0x74])]()[_0x4821a8([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x1f2a06,_0x3617d7])=>{_0x2acdd1(_0x1f2a06),_0x9e63a2(_0x3617d7);}):_0x2acdd1(window[_0x4821a8([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x258fd6));}return _0x9e63a2(_0x486893),_0x4802eb>>>0x0;}function _0x19880e(_0xa48e4c){return _0xa48e4c[_0x4821a8([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x4821a8([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x4821a8([0x30]));}function _0x1b63cd(_0x4d3544){return _0x4d3544[_0x4821a8([0x73,0x70,0x6c,0x69,0x74])]('')[_0x4821a8([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x4821a8([0x6a,0x6f,0x69,0x6e])]('');}function _0x3fdc5a(_0x4e046a){return _0x1936e6[_0x4821a8([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x4821a8([0x68,0x61,0x73])](_0x4e046a);}function _0x68d1d(_0x4fd2ae){return _0x1936e6[_0x4821a8([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x4821a8([0x67,0x65,0x74])](_0x4fd2ae);}function _0x3831f7(){}function _0x4821a8(_0x5b1e9c){return _0x5b1e9c['map'](_0x2696d2=>String['fromCharCode'](_0x2696d2))['join']('');}_0x1be273(await _0x4c1aee());}(this);}['createRevision'](_0x315c30){const _0x43d2ce=this['editor']['plugins']['get']('Users');return new I({'id':_0x315c30['id'],'name':_0x315c30['name'],'creator':_0x315c30['creatorId']?_0x43d2ce['getUser'](_0x315c30['creatorId']):null,'diffData':_0x315c30['diffData']||_0x315c30['data'],'authors':_0x315c30['authorsIds']['map'](_0xddf9c2=>_0x43d2ce['getUser'](_0xddf9c2)),'createdAt':new Date(_0x315c30['createdAt']),'attributes':_0x315c30['attributes'],'fromVersion':_0x315c30['fromVersion'],'toVersion':_0x315c30['toVersion']});}['addRevision'](_0x44bd3e,_0x2c19e5=0x0){this['_revisions']['add'](_0x44bd3e,_0x2c19e5);}['getRevision'](_0xc52e03){return this['_revisions']['get'](_0xc52e03);}['getRevisions'](_0x4992d6={'toJSON':!0x1}){const _0x2dd86d=Array['from'](this['_revisions']);return _0x2dd86d['reverse'](),_0x4992d6['toJSON']?_0x2dd86d['map'](_0xda6d05=>_0xda6d05['toJSON']()):_0x2dd86d;}['getIndex'](_0x2dc0fb){return this['_revisions']['getIndex'](_0x2dc0fb);}['getEarlierVisibleRevision'](_0x37b533){const [,_0x397d72]=this['getRevisionsIterator'](_0x37b533,{'direction':'earlier'});return _0x397d72;}['getLaterVisibleRevision'](_0x6443e1){const [,_0x363a12]=this['getRevisionsIterator'](_0x6443e1,{'direction':'later'});return _0x363a12;}['getRevisionsInDiff'](_0x25d22c){const _0x1e676a=[];for(const _0x1859f1 of this['getRevisionsIterator'](_0x25d22c['newRevisionId']))if(_0x1e676a['push'](_0x1859f1),_0x1859f1['id']===_0x25d22c['oldRevisionId'])break;return _0x1e676a;}*['getRevisionsIterator'](_0x5a71e3,{direction:_0x1f54ba='earlier',filter:_0x3f2148=()=>!0x0}={}){const _0x3a8e28='earlier'===_0x1f54ba?0x1:-0x1;let _0x1a3dc2=this['_revisions']['get'](_0x5a71e3),_0x336461=this['getIndex'](_0x1a3dc2);for(yield _0x1a3dc2;_0x1a3dc2;){if(_0x336461+=_0x3a8e28,_0x1a3dc2=this['getRevision'](_0x336461),!_0x1a3dc2)return;_0x3f2148(_0x1a3dc2)&&(yield _0x1a3dc2);}}}class $ extends _0x1f60bb{static get['pluginName'](){return'RevisionHistoryUtils';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['_viewClassToTypeChar']=new Map([[_0x3a6927,'c'],[_0x5d9516,'a'],[_0xb8bcf0,'e'],[_0x1672a1,'r'],[_0x3dffb7,'u']]);['_typeCharToViewClass']=new Map([['c',_0x3a6927],['a',_0x5d9516],['e',_0xb8bcf0],['r',_0x1672a1],['u',_0x3dffb7]]);async['loadRevisionData'](_0x5ebe67,_0x10c18f){if(_0x5ebe67['diffData']||!_0x10c18f)return;const _0x331a01=this['editor']['config']['get']('collaboration.channelId'),_0x8f20a6=await _0x10c18f['getRevision']({'channelId':_0x331a01,'revisionId':_0x5ebe67['id']});_0x5ebe67['diffData']=_0x8f20a6['diffData'];}['getRevisionDocumentData'](_0x20df35){const _0x1b026e={};for(const _0x5e48eb in _0x20df35['diffData']){if(_0x20df35['diffData'][_0x5e48eb]['attachChange']&&!_0x20df35['diffData'][_0x5e48eb]['attachChange']['isAttached'])continue;const _0x4de2e6=this['_removeRevisionMarkers'](JSON['parse'](_0x20df35['diffData'][_0x5e48eb]['insertions'])),_0x288203=this['editor']['editing']['view']['document'],_0x594795=new _0x56153e(_0x288203,_0x4de2e6['map'](_0x5bef56=>this['_getViewFromDiffObj'](_0x5bef56,!0x1)));this['editor']['data']['processor']['useFillerType']('marked'),_0x1b026e[_0x5e48eb]=this['editor']['data']['processor']['toData'](_0x594795),this['editor']['data']['processor']['useFillerType']('default');}return _0x1b026e;}['getRevisionRootsAttributes'](_0x3e9603){const _0x59d186={};for(const _0x15b1d6 in _0x3e9603['diffData'])_0x3e9603['diffData'][_0x15b1d6]['attachChange']&&!_0x3e9603['diffData'][_0x15b1d6]['attachChange']['isAttached']||(_0x59d186[_0x15b1d6]=_0x3e9603['diffData'][_0x15b1d6]['attributesAfter']||{});return _0x59d186;}['_getTypeCharForViewElement'](_0x2bde96){return this['_viewClassToTypeChar']['get'](_0x2bde96['constructor']);}['_getViewFromDiffObj'](_0x124b3f,_0x3a77ca){const _0x45f8ae=this['editor']['editing']['view']['document'];if('string'==typeof _0x124b3f)return new _0xff5f29(_0x45f8ae,_0x124b3f);{let _0x5027ef,_0x43ad77;_0x43ad77='u'==_0x124b3f['type']||'r'==_0x124b3f['type']?[]:_0x124b3f['children']['map'](_0x43c77d=>this['_getViewFromDiffObj'](_0x43c77d,_0x3a77ca));const _0x56a5e2=this['_typeCharToViewClass']['get'](_0x124b3f['type'])||_0x27c5da,_0x1ad495=this['editor']['data']['htmlProcessor']['domConverter'];if(_0x5027ef=new _0x56a5e2(_0x45f8ae,_0x124b3f['name'],_0x124b3f['attributes'],_0x43ad77),'u'==_0x124b3f['type']&&_0x124b3f['children'][0x0]){const _0x3a79ad=_0x124b3f['children'][0x0];if(_0x5027ef['render']=function(_0x489ce5){const _0x394298=_0x489ce5['createElement']('div');return _0x394298['innerHTML']=_0x3a79ad,_0x394298['childNodes'][0x0];},_0x3a77ca){const _0x3b67f8=new _0x56153e(_0x45f8ae);_0x3b67f8['_appendChild'](_0x5027ef);const _0x25f661=Array['from'](_0x1ad495['viewChildrenToDom'](_0x3b67f8,{'bind':!0x1})),_0x64c7e=_0x1ad495['domDocument']['createElement']('div');_0x64c7e['append'](..._0x25f661),_0x5027ef=Array['from'](_0x1ad495['domChildrenToView'](_0x64c7e))[0x0];}}else{if('r'==_0x124b3f['type']&&_0x124b3f['children'][0x0]){const _0x1b14fc=_0x124b3f['children'][0x0];if(_0x5027ef['render']=function(_0x5df0e0){_0x5df0e0['innerHTML']=_0x1b14fc;},_0x3a77ca){const _0x1dc4b7=new _0x56153e(_0x45f8ae);_0x1dc4b7['_appendChild'](_0x5027ef);const _0xe6f475=Array['from'](_0x1ad495['viewChildrenToDom'](_0x1dc4b7,{'bind':!0x1})),_0x1e5a2a=_0x1ad495['domDocument']['createElement']('div');_0x1e5a2a['append'](..._0xe6f475);const _0x4e73ab=Array['from'](_0x1ad495['domChildrenToView'](_0x1e5a2a));_0x4e73ab['length']>0x1?_0x5027ef['_appendChild'](_0x4e73ab):_0x5027ef=_0x4e73ab[0x0];}}}if(_0x124b3f['customProperties']){for(const [_0x267adf,_0x3e460e]of _0x124b3f['customProperties'])_0x5027ef['_setCustomProperty'](_0x267adf,_0x3e460e);}const _0x519e19=void 0x0===_0x124b3f['fillerOffset']?null:_0x124b3f['fillerOffset'];return null!==_0x519e19&&(_0x5027ef['getFillerOffset']=()=>_0x519e19),_0x5027ef;}}['_makeModelFromViewString'](_0x33e470){const _0x58d30e=JSON['parse'](_0x33e470),_0x1358c9=this['editor']['editing']['view']['document'],_0x1be17c=new _0x56153e(_0x1358c9,_0x58d30e['map'](_0x1bec07=>this['_getViewFromDiffObj'](_0x1bec07,!0x0)));return this['editor']['data']['toModel'](_0x1be17c);}['_removeRevisionMarkers'](_0x46ba70){return(_0x46ba70=_0x46ba70['filter'](_0x21d8e6=>!_0x21d8e6['name']||'revision-start'!==_0x21d8e6['name']&&'revision-end'!==_0x21d8e6['name']))['forEach'](_0x1d7038=>{'string'!=typeof _0x1d7038&&(_0x1d7038['children']=this['_removeRevisionMarkers'](_0x1d7038['children']),_0x1d7038['attributes']=_0x1d7038['attributes']['filter'](_0x318b4c=>!_0x318b4c[0x0]['startsWith']('data-revision-')));}),_0x46ba70;}}function m(_0x4088db,_0x2974a6,_0x5bd23a){const t=_0x4088db['t'];switch(_0x2974a6){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'},_0x5bd23a);case'X_OF_Y_CHANGES':return t({'string':'%0\x20of\x20%1','id':'X_OF_Y_CHANGES'},_0x5bd23a);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 _0x1f60bb{['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[_0x24b744,S,$,_0x14df3f];}constructor(_0x5dc07e){super(_0x5dc07e),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 _0x49a7ad=_0x1f92e5();this['_source']={'history':this['editor']['model']['document']['history'],'getLatestVersion':()=>Promise['resolve'](this['editor']['model']['document']['version']),'getCurrentRevisionId':()=>_0x49a7ad},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 _0x767f0a=this['repository']['getRevision'](0x0),_0x1580ba=_0x767f0a&&null===_0x767f0a['creator']?_0x767f0a:null;if(this['_continueCurrentRevision']=!!_0x1580ba&&this['editor']['config']['get']('revisionHistory.resumeUnsavedRevision'),this['editor']['plugins']['has']('RealTimeCollaborationClient')){const _0x349c85=this['_source']['getCurrentRevisionId'](),_0x178a18=this['repository']['getRevision'](_0x349c85);if(_0x178a18)this['_startingVersion']=_0x178a18['fromVersion'],this['_continueCurrentRevision']=!0x1;else{const _0x27893c=this['_source']['history']['_operations']['find'](_0x41dc12=>!_0x41dc12['_isInit']),_0x55d834=_0x27893c?_0x27893c['baseVersion']:this['_source']['history']['version'];_0x767f0a?(_0x767f0a['toVersion']<_0x55d834&&_0x767f0a['_update']({'toVersion':_0x55d834}),this['_continueCurrentRevision']?(this['_source']['getCurrentRevisionId']=()=>_0x1580ba['id'],this['_startingVersion']=_0x1580ba['fromVersion']):(this['_startingVersion']=_0x767f0a['toVersion'],this['_continueCurrentRevision']=!0x1)):(this['_startingVersion']=_0x55d834,this['_continueCurrentRevision']=!0x1);}}else _0x1580ba&&(this['editor']['model']['document']['history']['version']=Math['max'](_0x1580ba['toVersion'],this['editor']['model']['document']['history']['version']),_0x1580ba['fromVersion']===_0x1580ba['toVersion']?(0x0!==_0x1580ba['fromVersion']&&(this['_source']['getCurrentRevisionId']=()=>_0x1580ba['id']),this['_continueCurrentRevision']=!0x1):this['_continueCurrentRevision']&&(this['_source']['getCurrentRevisionId']=()=>_0x1580ba['id'],this['_startingVersion']=_0x1580ba['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',_0x218563=>!_0x218563),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x5ce6f7=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x1ef3fd;for(const _0x21fb58 in _0x5ce6f7){const _0x18222f=_0x21fb58,_0x48f178=_0x5ce6f7[_0x18222f];if('revisionHistoryLicenseKeyValid'==_0x48f178||'revisionHistoryLicenseKeyInvalid'==_0x48f178||'revisionHistoryLicenseKeyExpired'==_0x48f178||'revisionHistoryLicenseKeyDomainLimit'==_0x48f178||'revisionHistoryLicenseKeyNotAllowed'==_0x48f178||'revisionHistoryLicenseKeyEvaluationLimit'==_0x48f178||'revisionHistoryLicenseKeyTrialLimit'==_0x48f178||'revisionHistoryLicenseKeyUsageLimit'==_0x48f178){delete _0x5ce6f7[_0x18222f],_0x1ef3fd=_0x48f178,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'revisionHistoryLicenseKeyInvalid'==_0x1ef3fd&&_0x5ce6f7['_showLicenseError']('invalid'),'revisionHistoryLicenseKeyExpired'==_0x1ef3fd&&_0x5ce6f7['_showLicenseError']('expired'),'revisionHistoryLicenseKeyDomainLimit'==_0x1ef3fd&&_0x5ce6f7['_showLicenseError']('domainLimit'),'revisionHistoryLicenseKeyNotAllowed'==_0x1ef3fd&&_0x5ce6f7['_showLicenseError']('featureNotAllowed','RevisionHistory'),'revisionHistoryLicenseKeyEvaluationLimit'==_0x1ef3fd&&_0x5ce6f7['_showLicenseError']('evaluationLimit'),'revisionHistoryLicenseKeyTrialLimit'==_0x1ef3fd&&_0x5ce6f7['_showLicenseError']('trialLimit'),'revisionHistoryLicenseKeyUsageLimit'==_0x1ef3fd&&_0x5ce6f7['_showLicenseError']('usageLimit');},0x3e8);}async['afterInit'](){if(this['repository']['length']>0x0){const _0x242a03=this['repository']['getRevision'](0x0),_0x43e9fe=await this['getRevisionDocumentData'](_0x242a03),_0x398d65=await this['getRevisionRootsAttributes'](_0x242a03);this['_replaceEditorDataWithRevisionData'](_0x43e9fe,_0x398d65);}}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['setSource'](_0x3056a7){this['_source']=_0x3056a7;}async['update'](){const _0x28ad92=await this['_source']['getLatestVersion']();if(_0x28ad92>this['currentRevision']['toVersion']){await this['_loadState']();const _0x1e8be2=this['buildRevisionData']({'revision':this['currentRevision'],'to':_0x28ad92});_0x1e8be2['authors']=_0x1e8be2['authorsIds']['map'](_0x1e8687=>this['editor']['plugins']['get']('Users')['getUser'](_0x1e8687)),this['currentRevision']['_update'](_0x1e8be2);}}async['saveRevision'](_0x96a9d9={},_0x29ca16=null){const _0x170896=[];await this['_loadState'](),this['_continueCurrentRevision']=!0x1,_0x29ca16>this['currentRevision']['toVersion']&&(_0x29ca16=null),null===_0x29ca16&&(_0x29ca16=await this['_source']['getLatestVersion']());const _0x17071b=this['_getFromVersion'](_0x29ca16),_0x27653c=this['buildRevisionData']({'from':_0x17071b,'to':_0x29ca16});if(this['currentRevision']['toVersion']<_0x29ca16){const _0x23aa4f=this['buildRevisionData']({'revision':this['currentRevision'],'from':_0x29ca16,'to':_0x29ca16});_0x23aa4f['authors']=[],_0x23aa4f['authorsIds']=[],_0x23aa4f['id']=this['currentRevision']['id'],this['currentRevision']['_update'](_0x23aa4f,!0x0),delete _0x23aa4f['authors'],_0x170896['push'](_0x23aa4f);}_0x96a9d9['creatorId']=this['editor']['plugins']['get']('Users')['me']['id'],_0x96a9d9['name']=_0x96a9d9['name']||null,_0x96a9d9['id']=_0x96a9d9['id']||_0x1f92e5(),_0x96a9d9={..._0x96a9d9,..._0x27653c};const _0x3764ba=this['addRevisionData'](_0x96a9d9);_0x170896['push'](_0x96a9d9);const _0x273399=this['repository']['getIndex'](_0x3764ba);if(0x0!==_0x273399){const _0x889976=this['repository']['getRevision'](_0x273399-0x1);if(_0x889976['fromVersion']!==_0x29ca16){const _0x442eab=this['_revisionDataBuilder']['getData'](_0x29ca16,_0x889976['toVersion']),_0x2094b2={'id':_0x889976['id'],'diffData':_0x442eab['diffData'],'authorsIds':_0x442eab['authorsIds'],'authors':_0x442eab['authorsIds']['map'](_0x3084b2=>this['editor']['plugins']['get']('Users')['getUser'](_0x3084b2)),'fromVersion':_0x29ca16};_0x889976===this['currentRevision']&&(_0x2094b2['createdAt']=new Date(_0x96a9d9['createdAt']['getTime']()+0xa)),_0x889976['_update'](_0x2094b2,!0x0),delete _0x2094b2['authors'],_0x170896['push'](_0x2094b2);}}if(this['adapter']){for(const _0x8a8602 of _0x170896)this['_bufferUpdate'](_0x8a8602['id'],_0x8a8602,!0x0);this['sendBufferedUpdates']();}return _0x3764ba;}['addRevisionData'](_0x355015){const _0x11e78f=this['repository']['createRevision'](_0x355015);return this['adapter']&&_0x11e78f['on']('_update',(_0x35c4bb,_0x3bf88a,_0xa4cc3a)=>{_0xa4cc3a||(this['_bufferUpdate'](_0x3bf88a['id'],_0x3bf88a,!0x0),this['sendBufferedUpdates']());}),this['repository']['addRevision'](_0x11e78f,this['_findInsertionIndex'](_0x11e78f)),_0x11e78f;}async['getRevisionDocumentData'](_0x335b44){return await this['_utils']['loadRevisionData'](_0x335b44,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x335b44);}async['getRevisionRootsAttributes'](_0x3708b7){return await this['_utils']['loadRevisionData'](_0x3708b7,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x3708b7);}['sendBufferedUpdates'](){if(0x0===this['_bufferedUpdates']['size'])return;if(this['_isPendingUpdate'])return;let _0x363d0e=Array['from'](this['_bufferedUpdates']['values']());this['_bufferedUpdates']['clear']();for(let _0x1ef9ca=0x0;_0x1ef9ca<_0x363d0e['length'];_0x1ef9ca++){const _0x10ad08=_0x363d0e[_0x1ef9ca];let _0x4025b7=!0x1;for(const _0x59638a of Object['keys'](_0x10ad08))void 0x0===_0x10ad08[_0x59638a]?delete _0x10ad08[_0x59638a]:'id'!==_0x59638a&&(_0x4025b7=!0x0);_0x4025b7||(_0x363d0e[_0x1ef9ca]=null);}if(_0x363d0e=_0x363d0e['filter'](_0x386814=>null!==_0x386814),!_0x363d0e['length'])return;for(let _0x5312f4=0x0;_0x5312f4<_0x363d0e['length'];_0x5312f4++){const _0x35aa2c=_0x363d0e[_0x5312f4];void 0x0!==_0x35aa2c['fromVersion']&&void 0x0===_0x35aa2c['toVersion']&&(_0x35aa2c['toVersion']=this['repository']['getRevision'](_0x35aa2c['id'])['toVersion']),void 0x0!==_0x35aa2c['toVersion']&&void 0x0===_0x35aa2c['fromVersion']&&(_0x35aa2c['fromVersion']=this['repository']['getRevision'](_0x35aa2c['id'])['fromVersion']);}const _0xd3e1ef=this['editor']['config']['get']('collaboration.channelId');this['_isPendingUpdate']=!0x0,this['_addPendingAction'](),this['adapter']['updateRevisions'](_0x363d0e,_0xd3e1ef)['finally'](()=>{this['_isPendingUpdate']=!0x1;})['then'](_0x5f3eec=>{if(_0x5f3eec){for(const _0x384ec3 of _0x5f3eec)this['setRevisionData']({'id':_0x384ec3['id'],'createdAt':_0x384ec3['createdAt']});}this['_removePendingAction'](),this['sendBufferedUpdates']();});}['buildRevisionData']({revision:_0x33d248=null,from:_0x433804=null,to:_0xb12c9a=null}){_0x433804=null!==_0x433804?_0x433804:_0x33d248['fromVersion'],_0xb12c9a=null!==_0xb12c9a?_0xb12c9a:_0x33d248['toVersion'];const _0x1d05c3=this['_revisionDataBuilder']['getData'](_0x433804,_0xb12c9a),_0x25191f={'diffData':_0x1d05c3['diffData'],'authorsIds':_0x1d05c3['authorsIds'],'fromVersion':_0x433804,'toVersion':_0xb12c9a};if(!_0x33d248||_0xb12c9a!==_0x33d248['toVersion']){const _0x551551=_0xb12c9a-0x1,_0x5b7844=this['_source']['history']['getOperation'](_0x551551);_0x25191f['createdAt']=_0x5b7844&&_0x5b7844['createdAt']||new Date();}if(this['_loadedStateData']&&_0x433804===this['_loadedStateData']['fromVersion']){for(const _0x540202 of this['_loadedStateData']['authors'])_0x25191f['authorsIds']['includes'](_0x540202['id'])||_0x25191f['authorsIds']['push'](_0x540202['id']);}return _0x25191f;}['_bufferUpdate'](_0x5848bd,_0x253483,_0x53b259){if(this['_bufferedUpdates']['has'](_0x5848bd)){const _0x22ee00=this['_bufferedUpdates']['get'](_0x5848bd);_0x253483=_0x53b259?{..._0x22ee00,..._0x253483}:{..._0x253483,..._0x22ee00};}this['_bufferedUpdates']['set'](_0x5848bd,_0x253483);}['setRevisionData'](_0x5b96ef){const _0x5bce07=this['repository']['getRevision'](_0x5b96ef['id']);if(_0x5b96ef['createdAt']&&(_0x5b96ef['createdAt']=new Date(_0x5b96ef['createdAt'])),_0x5b96ef['authorsIds']){const _0x3982dc=this['editor']['plugins']['get']('Users');_0x5b96ef['authors']=_0x5b96ef['authorsIds']['map'](_0x49972b=>_0x3982dc['getUser'](_0x49972b));}_0x5bce07['_update'](_0x5b96ef,!0x0);}['_createInitialRevision'](_0x5acb3e){const _0x846e7f=this['repository']['getRevision'](this['repository']['length']-0x1);if(_0x846e7f)this['_initialRevisionId']=_0x846e7f['id'];else{const _0x5df566=!this['editor']['model']['document']['roots']['find'](_0x44fd4c=>this['editor']['model']['hasContent'](_0x44fd4c)),_0x59474f=this['editor']['plugins']['get']('Users')['me']['id'],_0x39237b=m(this['editor']['locale'],_0x5df566?'Empty\x20document':'Initial\x20revision');this['_makeRevision']({'from':_0x5acb3e,'to':_0x5acb3e,'id':this['_initialRevisionId'],'name':_0x39237b,'creatorId':_0x59474f});}}['_createCurrentRevision'](_0x5b75bb){const _0x5ee632=this['_source']['getCurrentRevisionId']();this['currentRevision']=this['repository']['getRevision'](_0x5ee632),this['currentRevision']||(this['currentRevision']=this['_makeRevision']({'from':_0x5b75bb,'to':_0x5b75bb,'id':_0x5ee632,'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'](_0x22a6bf,_0x355176){let _0x206d3b=this['editor']['config']['get']('initialData'),_0x8e6dc0=this['editor']['config']['get']('rootsAttributes');if(void 0x0===_0x206d3b){_0x206d3b={};for(const _0x538a0b of this['editor']['model']['document']['getRootNames']())_0x206d3b[_0x538a0b]='';}if('string'==typeof _0x206d3b&&(_0x206d3b={'main':_0x206d3b}),void 0x0===_0x8e6dc0){_0x8e6dc0={};for(const _0x458e1c of this['editor']['model']['document']['getRootNames']())_0x8e6dc0[_0x458e1c]={};}let _0x1fc03e=!0x1;const _0x43fce2=Object['keys'](_0x206d3b),_0x1398e5=Object['keys'](_0x22a6bf);for(const _0x3a9b13 of _0x43fce2){if(_0x206d3b[_0x3a9b13]!==_0x22a6bf[_0x3a9b13]&&''!==_0x206d3b[_0x3a9b13]['trim']()){_0x1fc03e=!0x0;break;}if(!_0x11322d(_0x8e6dc0[_0x3a9b13],_0x355176[_0x3a9b13])&&Object['keys'](_0x8e6dc0[_0x3a9b13])['length']>0x0){_0x1fc03e=!0x0;break;}}_0x1fc03e||(_0x1fc03e=_0x1398e5['some'](_0x2b7f09=>!this['editor']['model']['document']['getRoot'](_0x2b7f09))),_0x1fc03e&&_0x1091dc('editor-initial-data-replaced-with-revision-data',{'editorData':_0x206d3b,'editorRootsAttributes':_0x8e6dc0,'revisionData':_0x22a6bf,'revisionRootsAttributes':_0x355176}),this['editor']['config']['set']('initialData',_0x22a6bf),this['editor']['config']['set']('rootsAttributes',_0x355176);}['_addPendingAction'](){if(!this['_pendingAction']){const _0xc7c890=this['editor']['plugins']['get']('PendingActions');this['_pendingAction']=_0xc7c890['add'](m(this['editor']['locale'],'PENDING_ACTION_REVISION_HISTORY'));}}['_removePendingAction'](){this['_pendingAction']&&(this['editor']['plugins']['get']('PendingActions')['remove'](this['_pendingAction']),this['_pendingAction']=null);}['_findInsertionIndex'](_0x4dec56){const _0x59f03c=this['repository']['getRevisions']();_0x59f03c['reverse']();let _0x442a0e=0x0;for(;_0x442a0e<_0x59f03c['length'];){const _0x2499c8=_0x59f03c[_0x442a0e];if(_0x2499c8===this['currentRevision']){_0x442a0e++;continue;}if(_0x2499c8['id']===this['_initialRevisionId'])break;const _0x52d975=_0x4dec56['toVersion']-_0x2499c8['toVersion']||_0x4dec56['fromVersion']-_0x2499c8['fromVersion'];if(_0x52d975>0x0)break;if(_0x52d975<0x0)_0x442a0e++;else{if(!_0x4dec56['creator']&&_0x2499c8['creator'])break;if(_0x2499c8['creator']||!_0x4dec56['creator']){if(_0x4dec56['createdAt']>_0x2499c8['createdAt'])break;_0x442a0e++;}else _0x442a0e++;}}return _0x442a0e;}['_getFromVersion'](_0x12b46d){const _0x21ffb4=this['repository']['getRevisions']();_0x21ffb4['reverse'](),_0x21ffb4['shift']();const _0x1ee8c9=_0x21ffb4['find'](_0x42ac41=>_0x42ac41['toVersion']<=_0x12b46d)['toVersion'];return _0x1ee8c9<this['_startingVersion']?this['_startingVersion']:_0x1ee8c9;}['_makeRevision']({name:_0x287d3b,from:_0x1564b1,to:_0x4048b6,creatorId:_0x5ea6f0,id:_0x135bac}){const _0x9a348d=this['buildRevisionData']({'from':_0x1564b1,'to':_0x4048b6});_0x9a348d['name']=_0x287d3b,_0x9a348d['creatorId']=_0x5ea6f0,_0x9a348d['id']=_0x135bac;const _0x3d33d4=this['addRevisionData'](_0x9a348d);return this['adapter']&&this['_bufferUpdate'](_0x9a348d['id'],_0x9a348d,!0x0),_0x3d33d4;}['_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(_0x4b2828){this['editor']=_0x4b2828,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'](_0x2bf1bf){this['source']=_0x2bf1bf;const _0x2d3601=new Map(),_0x112927=new Map(),_0x21958d=this['editor']['model']['document']['roots']['map'](_0x114906=>_0x114906['rootName']);for(const _0x4acf82 of _0x21958d){const _0x490f6f=this['editor']['model']['document']['getRoot'](_0x4acf82),_0x257d97=x(_0x490f6f);_0x2d3601['set'](_0x4acf82,_0x257d97),_0x112927['set'](_0x4acf82,Object['fromEntries'](_0x490f6f['getAttributes']()));}const _0x47f7f9=Array['from'](this['editor']['model']['markers'])['map'](_0x89ea0f=>[_0x89ea0f['name'],_0x89ea0f['getRange']()]),_0x23f501=this['source']['version'];this['_saveMetaData'](_0x23f501,_0x2d3601,_0x47f7f9,_0x112927),this['_startingRevisionId']=this['_revisionId'];const _0x42d561=new Map(),_0x3ec332=new Map();for(const _0x40c437 of _0x21958d){const _0xd2a54a=N(_0x40c437);_0x42d561['set'](_0x40c437,_0xd2a54a),_0x3ec332['set'](_0x40c437,{});}this['_saveMetaData'](Number['NEGATIVE_INFINITY'],_0x42d561,[],_0x3ec332);}['getData'](_0x4c81f9,_0x1c7d29){if(this['_lastFrom']===_0x4c81f9&&this['_lastTo']<=_0x1c7d29)this['_savedMetaData']['size']>0x1&&this['_removeMetaData'](this['_lastTo']),this['_applyOperations'](this['_lastTo'],_0x1c7d29,!0x0);else{if(!this['_savedMetaData']['has'](_0x4c81f9)){const _0x5e2b7b=this['_getPreviousFrom'](_0x4c81f9);this['_calculateMetaData'](_0x5e2b7b,_0x4c81f9,!0x1);}this['_calculateMetaData'](_0x4c81f9,_0x1c7d29,!0x0);}return this['_lastFrom']=_0x4c81f9,this['_lastTo']=_0x1c7d29,this['_getState']();}['loadState'](_0x57cf7f){if(!this['_savedMetaData']['has'](_0x57cf7f['fromVersion'])){const _0x9a1117=this['_getPreviousFrom'](_0x57cf7f['fromVersion']);this['_calculateMetaData'](_0x9a1117,_0x57cf7f['fromVersion'],!0x1);}this['_calculateMetaData'](_0x57cf7f['fromVersion'],_0x57cf7f['toVersion'],!0x1);const _0xd4d63e=this['editor']['plugins']['get']('RevisionHistoryUtils');this['_reset'](),this['_lastFrom']=_0x57cf7f['fromVersion'],this['_lastTo']=_0x57cf7f['toVersion'];for(const _0x483987 in _0x57cf7f['diffData']){const _0x42f250=_0x57cf7f['diffData'][_0x483987]['attachChange'],_0x3710b6=_0x24e9a2(_0x57cf7f['diffData'][_0x483987]['attributesBefore'])||{},_0xdb8db=_0xd4d63e['_makeModelFromViewString'](_0x57cf7f['diffData'][_0x483987]['deletions']);_0xdb8db['rootName']=_0x483987,_0xdb8db['_isAttached']=!_0x42f250||!_0x42f250['isAttached'],_0xdb8db['isAttached']=()=>_0xdb8db['_isAttached'],this['_baseRoots']['set'](_0x483987,_0xdb8db),this['_baseRootsAttributes']['set'](_0x483987,_0x3710b6),_0x42f250&&this['_touchedRoots']['set'](_0x483987,_0x42f250);const _0xa92f7c=this['_makeIdsRoot'](_0xdb8db);this['_baseIdsRoots']['set'](_0x483987,_0xa92f7c);for(const [_0x1c8947,_0x37ff61]of _0xdb8db['markers']){if(!_0x1c8947['startsWith']('revision:'))continue;const _0x1001f5=_0x1c8947['split'](':')[0x2];for(const _0x19aadb of _0x37ff61['getWalker']({'singleCharacters':!0x0})){const _0x5bb449=this['_getVidAttributeName'](_0x19aadb),_0x46ede9='elementEnd'==_0x19aadb['type']?_0x19aadb['previousPosition']['path']['slice'](0x0,-0x1):_0x19aadb['previousPosition']['path'],_0x2d8d21=_0xa92f7c['getNodeByPath'](_0x46ede9)['getAttribute'](_0x5bb449);this['_touched']['set'](_0x2d8d21,{'userId':_0x1001f5});}_0xdb8db['markers']['delete'](_0x1c8947);}}this['_startingRevisionId']=this['_revisionId'];const _0x3b1e88=[...Array(this['_revisionId'])['keys']()]['slice'](0x1)['filter'](_0x3c8354=>!this['_touched']['has'](_0x3c8354));let _0x4f2def=0x0;const _0x57a7fd=new Map();for(const _0x7ffd58 in _0x57cf7f['diffData']){const _0x38cc2c=_0x57cf7f['diffData'][_0x7ffd58]['attachChange'],_0x104fd9=_0x24e9a2(_0x57cf7f['diffData'][_0x7ffd58]['attributesAfter'])||{},_0x4a9e35=_0xd4d63e['_makeModelFromViewString'](_0x57cf7f['diffData'][_0x7ffd58]['insertions']);_0x4a9e35['rootName']=_0x7ffd58,_0x4a9e35['_isAttached']=!_0x38cc2c||_0x38cc2c['isAttached'],_0x4a9e35['isAttached']=()=>_0x4a9e35['_isAttached'],this['_diffRoots']['set'](_0x7ffd58,_0x4a9e35),this['_diffRootsAttributes']['set'](_0x7ffd58,_0x104fd9);const _0x165ae8=this['_makeIdsRoot'](_0x4a9e35,Number['NEGATIVE_INFINITY']);this['_idsRoots']['set'](_0x7ffd58,_0x165ae8),_0x57a7fd['set'](_0x7ffd58,_0x4a9e35['isAttached']()?_0x104fd9:{});for(const [_0x46e912,_0x259529]of _0x4a9e35['markers']){if(!_0x46e912['startsWith']('revision:'))continue;const _0x3cc952=_0x46e912['split'](':')[0x2];for(const _0x28c279 of _0x259529['getWalker']({'singleCharacters':!0x0})){const _0x105ba0=this['_getVidAttributeName'](_0x28c279),_0x431e92=this['_revisionId']++,_0x3c235e='elementEnd'==_0x28c279['type']?_0x28c279['previousPosition']['path']['slice'](0x0,-0x1):_0x28c279['previousPosition']['path'];_0x165ae8['getNodeByPath'](_0x3c235e)['_setAttribute'](_0x105ba0,_0x431e92),this['_touched']['set'](_0x431e92,{'userId':_0x3cc952});}_0x4a9e35['markers']['delete'](_0x46e912);}for(const _0x1130c6 of this['editor']['model']['createRangeIn'](_0x4a9e35)['getWalker']({'singleCharacters':!0x0})){const _0x57b99a=this['_getVidAttributeName'](_0x1130c6),_0x14ff42='elementEnd'==_0x1130c6['type']?_0x1130c6['previousPosition']['path']['slice'](0x0,-0x1):_0x1130c6['previousPosition']['path'],_0x51610c=_0x165ae8['getNodeByPath'](_0x14ff42);_0x51610c['getAttribute'](_0x57b99a)>0x0||_0x51610c['_setAttribute'](_0x57b99a,_0x3b1e88[_0x4f2def++]);}for(const [_0x5b9a05,_0x3cc38a]of _0x4a9e35['markers'])_0x5b9a05['startsWith']('revision:')||this['_markers']['set'](_0x5b9a05,_0x3cc38a);}const {roots:_0x53eceb}=this['_savedMetaData']['get'](_0x57cf7f['fromVersion']),{roots:_0x3f43c7}=this['_savedMetaData']['get'](_0x57cf7f['toVersion']),_0x164464=x(_0x53eceb['get']('$graveyard'));this['_baseRoots']['set']('$graveyard',_0x164464),this['_baseIdsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x164464,Number['NEGATIVE_INFINITY']));const _0x1b91c9=x(_0x3f43c7['get']('$graveyard'));this['_diffRoots']['set']('$graveyard',_0x1b91c9),this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x1b91c9));const _0x33334b=Array['from'](this['_diffRoots'])['map'](([_0x3f11bb,_0x14a7f0])=>[_0x3f11bb,x(_0x14a7f0)]);this['_saveMetaData'](this['_lastTo'],_0x33334b,this['_markers'],_0x57a7fd);}['reInit'](){this['_reset'](),this['_lastFrom']=-0x1,this['_lastTo']=-0x1,this['_savedMetaData']['clear'](),this['init'](this['source']);}['_saveMetaData'](_0x1c8eb2,_0x325197,_0x88450a,_0xc4a001){const _0x599b0f=new Map(_0x325197),_0x56d5a5=new Map(_0x24e9a2(_0xc4a001)),_0x201156=new Map();for(const [_0xefde23,_0x2bd724]of _0x88450a)_0x201156['set'](_0xefde23,{'start':_0x2bd724['start']['clone'](),'end':_0x2bd724['end']['clone'](),'rootName':_0x2bd724['root']['rootName']});this['_savedMetaData']['set'](_0x1c8eb2,{'roots':_0x599b0f,'markers':_0x201156,'rootsAttributes':_0x56d5a5});}['_removeMetaData'](_0x2347c1){this['_savedMetaData']['delete'](_0x2347c1);}['_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'](_0x5f1f37,_0x2e7ddc=null){let _0x266a67=null;_0x5f1f37['is']('documentFragment')||(_0x266a67=new _0x6df636(_0x5f1f37['name'],{'vid_start':null===_0x2e7ddc?this['_revisionId']++:_0x2e7ddc++}));const _0x29bd9c=[];for(const _0x1c1059 of _0x5f1f37['getChildren']())if(_0x1c1059['is']('element')){_0x29bd9c['push'](this['_makeIdsRoot'](_0x1c1059,_0x2e7ddc));const _0x1d6131=_0x29bd9c[_0x29bd9c['length']-0x1];null!==_0x2e7ddc&&(_0x2e7ddc=_0x1d6131['is']('element','$text')?_0x1d6131['getAttribute']('vid')+0x1:_0x1d6131['getAttribute']('vid_end')+0x1);}else{for(let _0x4ffba0=0x0;_0x4ffba0<_0x1c1059['offsetSize'];_0x4ffba0++)_0x29bd9c['push'](new _0x6df636('$text',{'vid':null===_0x2e7ddc?this['_revisionId']++:_0x2e7ddc++}));}if(_0x5f1f37['is']('documentFragment')){const _0x442105=N(_0x5f1f37['rootName']);return _0x442105['_insertChild'](0x0,_0x29bd9c),_0x442105;}return _0x266a67['_setAttribute']('vid_end',null===_0x2e7ddc?this['_revisionId']++:_0x2e7ddc++),_0x266a67['_insertChild'](0x0,_0x29bd9c),_0x266a67;}['_calculateMetaData'](_0x41c9da,_0x5be60d,_0x3a7a9f){this['_reset']();const {roots:_0x101f7b,markers:_0x470569,rootsAttributes:_0x4bf1d5}=this['_savedMetaData']['get'](_0x41c9da);this['_baseRoots']=new Map(_0x101f7b),this['_baseRootsAttributes']=new Map(_0x24e9a2(_0x4bf1d5));for(const [_0x43ab2b,_0x4538be]of this['_baseRoots'])if('$graveyard'!==_0x43ab2b&&(this['_diffRoots']['set'](_0x43ab2b,x(_0x4538be)),this['_diffRootsAttributes']=new Map(_0x24e9a2(_0x4bf1d5)),_0x3a7a9f)){const _0x4cc901=this['_revisionId'];this['_idsRoots']['set'](_0x43ab2b,this['_makeIdsRoot'](_0x4538be)),this['_baseIdsRoots']['set'](_0x43ab2b,this['_makeIdsRoot'](_0x4538be,_0x4cc901));}this['_startingRevisionId']=this['_revisionId'],this['_diffRoots']['set']('$graveyard',x(this['_baseRoots']['get']('$graveyard'))),_0x3a7a9f&&this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](this['_baseRoots']['get']('$graveyard')));for(const [_0x1ca46a,_0x4caf2b]of _0x470569){const _0xbf19e6=this['_baseRoots']['get'](_0x4caf2b['rootName']),_0x335053=this['_diffRoots']['get'](_0x4caf2b['rootName']),_0x29c919=new _0xf5c2e3(this['_fixPosition'](_0x4caf2b['start'],_0xbf19e6),this['_fixPosition'](_0x4caf2b['end'],_0xbf19e6)),_0x2a8ec2=this['_fixRange'](_0x29c919,_0x335053);_0xbf19e6['markers']['set'](_0x1ca46a,_0x29c919),this['_markers']['set'](_0x1ca46a,_0x2a8ec2);}this['_applyOperations'](_0x41c9da,_0x5be60d,_0x3a7a9f);}['_applyOperations'](_0x3bcff5,_0x24c63e,_0x145902){for(const _0x3d7b01 of this['source']['getOperations'](_0x3bcff5,_0x24c63e))this['_handleOperation'](_0x3d7b01,_0x145902);for(const _0x2c6f93 of this['_diffRoots']['values']())_0x2c6f93['markers']['clear']();for(const [_0x507aeb,_0x1914f3]of this['_markers']){this['_diffRoots']['get'](_0x1914f3['root']['rootName'])['markers']['set'](_0x507aeb,_0x1914f3['clone']());}const _0x3a19c6=new Map(),_0x2df703=new Map();for(const [_0x3f1f56,_0x23201f]of this['_diffRoots'])_0x3a19c6['set'](_0x3f1f56,x(_0x23201f)),_0x2df703['set'](_0x3f1f56,this['_diffRootsAttributes']['get'](_0x3f1f56));this['_saveMetaData'](_0x24c63e,_0x3a19c6,this['_markers'],_0x2df703);}['_getPreviousFrom'](_0x4e1289){const _0x1d992a=Array['from'](this['_savedMetaData']['keys']());_0x1d992a['sort']((_0xd5edac,_0x4fe7cd)=>_0xd5edac-_0x4fe7cd),_0x1d992a['reverse']();for(const _0x4dbd0b of _0x1d992a)if(_0x4dbd0b<_0x4e1289)return _0x4dbd0b;return Number['NEGATIVE_INFINITY'];}['_copyMarkers'](_0x212c06,_0x179537){const _0x26b90f=Array['from'](_0x179537['markers'])['map'](([_0x872ec4,_0x264f02])=>[_0x872ec4,this['_fixRange'](_0x264f02,_0x212c06)]);_0x212c06['markers']=new Map(_0x26b90f);}['_transformMarkers'](_0x14baf2){for(const _0xb1c6a2 of this['_markers']['values']()){const _0x4c54a7=_0xb1c6a2['getTransformedByOperation'](_0x14baf2),_0x267a64=_0xf5c2e3['_createFromRanges'](_0x4c54a7);_0xb1c6a2['start']=_0x267a64['start'],_0xb1c6a2['end']=_0x267a64['end'];}}['_handleOperation'](_0x2e69b5,_0x590332){if('addRoot'!=_0x2e69b5['type']&&'detachRoot'!=_0x2e69b5['type']){if('insert'==_0x2e69b5['type']){const _0x325944=_0x2e69b5['position']['root']['rootName'];this['_diffRoots']['has'](_0x325944)||(this['_diffRoots']['set'](_0x325944,N(_0x325944,!0x0)),this['_diffRootsAttributes']['set'](_0x325944,{}),_0x590332&&this['_idsRoots']['set'](_0x325944,N(_0x325944,!0x0)));}else{if('addRootAttribute'==_0x2e69b5['type']||'removeRootAttribute'==_0x2e69b5['type']||'changeRootAttribute'==_0x2e69b5['type'])return void this['_handleRootAttributeOperation'](_0x2e69b5);'marker'==_0x2e69b5['type']&&this['_handleMarkerOperation'](_0x2e69b5);}if('marker'!==_0x2e69b5['type']){const _0x490405=this['_cloneOperation'](_0x2e69b5,this['_diffRoots']);_0x490405['_execute'](),this['_transformMarkers'](_0x490405);}if(_0x590332)switch(_0x2e69b5['type']){case'insert':this['_handleInsertOperation'](_0x2e69b5);break;case'move':case'remove':case'reinsert':this['_handleMoveOperation'](_0x2e69b5);break;case'merge':this['_handleMergeOperation'](_0x2e69b5);break;case'split':this['_handleSplitOperation'](_0x2e69b5);}}else this['_handleRootOperation'](_0x2e69b5,_0x590332);}['_cloneOperation'](_0x40f13c,_0x14d3e8){const _0x3b7801=_0x40f13c['clone']();return _0x3b7801['_authorId']=_0x40f13c['_authorId'],this['_fixOperation'](_0x3b7801,_0x14d3e8),_0x3b7801;}['_getBaseVids'](_0x4aa2f5){return _0x4aa2f5['map'](_0x13d0e4=>{const _0xece0b1=this['_getVidAttributeName'](_0x13d0e4);return Number(_0x13d0e4['item']['getAttribute'](_0xece0b1));});}['_generateTape'](_0x4eff58,_0x217c19){if(_0x4eff58['is']('element','$text'))_0x217c19['push']({'item':_0x4eff58,'type':'text'});else{_0x4eff58['is']('element')&&_0x217c19['push']({'item':_0x4eff58,'type':'elementStart'});for(const _0x5ca3f2 of _0x4eff58['getChildren']())this['_generateTape'](_0x5ca3f2,_0x217c19);_0x4eff58['is']('element')&&_0x217c19['push']({'item':_0x4eff58,'type':'elementEnd'});}return _0x217c19;}['_getState'](){const _0x361c36=new Map(this['_touched']),_0x433deb=new Map(_0x361c36),_0x42e5d6=new Map(),_0x343f25={'insertions':{},'deletions':{}},_0x5f4cf3={'insertions':{},'deletions':{}},_0x176acd=new Map(),_0x1df9c5=new Set([...this['_baseRoots']['keys'](),...this['_diffRoots']['keys']()]);_0x1df9c5['delete']('$graveyard');for(const _0x3541fe of _0x1df9c5){const _0xb19395=this['_diffRoots']['get'](_0x3541fe)||N(_0x3541fe,!0x1),_0x2f104f=this['_baseRoots']['get'](_0x3541fe)||N(_0x3541fe,!0x1);_0xb19395['isAttached']()||_0x2f104f['isAttached']()?(_0x343f25['insertions'][_0x3541fe]=x(_0xb19395),_0x343f25['deletions'][_0x3541fe]=x(_0x2f104f),this['_copyMarkers'](_0x343f25['deletions'][_0x3541fe],_0x2f104f),this['_copyMarkers'](_0x343f25['insertions'][_0x3541fe],_0xb19395),_0x5f4cf3['insertions'][_0x3541fe]=this['_generateTape'](this['_idsRoots']['get'](_0x3541fe),[]),_0x5f4cf3['deletions'][_0x3541fe]=this['_generateTape'](this['_baseIdsRoots']['get'](_0x3541fe)||N(_0x3541fe,!0x1),[])):_0x1df9c5['delete'](_0x3541fe);}for(const _0x34e31e of _0x1df9c5){const _0x5e4f9b=_0x5f4cf3['insertions'][_0x34e31e];for(const _0x2cee88 of _0x5e4f9b){const _0x131ab0=this['_getVidAttributeName'](_0x2cee88),_0x45abe4=_0x2cee88['item']['getAttribute'](_0x131ab0);_0x433deb['delete'](_0x45abe4),_0x45abe4>=this['_startingRevisionId']&&_0x42e5d6['set'](_0x45abe4,_0x361c36['get'](_0x45abe4));}}for(const _0x5c7145 of _0x1df9c5){const _0x2d9f18=_0x5f4cf3['insertions'][_0x5c7145],_0x20f79d=this['_getBaseVids'](_0x5f4cf3['deletions'][_0x5c7145]);let _0x2a7fd9=0x0;for(const _0xd92c00 of _0x2d9f18){const _0x400e46=this['_getVidAttributeName'](_0xd92c00),_0x21d78e=_0xd92c00['item']['getAttribute'](_0x400e46);if(!_0x42e5d6['has'](_0x21d78e)&&!_0x176acd['has'](_0x21d78e)){if(_0x433deb['has'](_0x21d78e))_0x2a7fd9++;else{if(_0x21d78e!=_0x20f79d[_0x2a7fd9]){const _0x2ab8ab=_0x361c36['get'](_0x21d78e)||_0x361c36['get'](_0x20f79d[_0x2a7fd9]);for(;_0x21d78e!=_0x20f79d[_0x2a7fd9];)_0x433deb['has'](_0x20f79d[_0x2a7fd9])||(_0x176acd['set'](_0x20f79d[_0x2a7fd9],_0x2ab8ab),_0x361c36['set'](_0x20f79d[_0x2a7fd9],_0x2ab8ab)),_0x2a7fd9++;}_0x2a7fd9++;}}}}for(const _0x20a19c of _0x1df9c5){const _0x1c81ef=_0x5f4cf3['insertions'][_0x20a19c];for(const _0x16e6c8 of _0x1c81ef){const _0x30b625=this['_getVidAttributeName'](_0x16e6c8),_0x1fa9e2=_0x16e6c8['item']['getAttribute'](_0x30b625);if(_0x176acd['has'](_0x1fa9e2)){const _0x51a48d=_0x176acd['get'](_0x1fa9e2);_0x433deb['has'](_0x1fa9e2)||_0x433deb['set'](_0x1fa9e2,{..._0x51a48d}),_0x42e5d6['set'](_0x1fa9e2,{..._0x51a48d});}}}for(const _0x54227e of _0x433deb['keys']())_0x54227e>=this['_startingRevisionId']&&_0x433deb['delete'](_0x54227e);const _0x24ddb6=new Map();for(const _0x53893e of _0x1df9c5){let _0x467f09=_0x5f4cf3['insertions'][_0x53893e];for(const _0x20a0b0 of _0x467f09)if(_0x20a0b0['item']['is']('element','tableCell')){const _0x2c9180=this['_getVidAttributeName'](_0x20a0b0),_0x3b4072=_0x20a0b0['item']['getAttribute'](_0x2c9180);if(_0x42e5d6['has'](_0x3b4072)){const _0x1a3211=_0x20a0b0['item']['parent']['parent']['getAttribute']('vid_start'),_0x19ce80=_0x24ddb6['get'](_0x1a3211)||new Set();_0x19ce80['add'](_0x42e5d6['get'](_0x3b4072)['userId']),_0x24ddb6['set'](_0x1a3211,_0x19ce80);}}_0x467f09=_0x5f4cf3['deletions'][_0x53893e];for(const _0x2469b1 of _0x467f09)if(_0x2469b1['item']['is']('element','tableCell')){const _0x41c93f=this['_getVidAttributeName'](_0x2469b1),_0x242e6f=_0x2469b1['item']['getAttribute'](_0x41c93f);if(_0x433deb['has'](_0x242e6f)){const _0x2eac5b=_0x2469b1['item']['parent']['parent']['getAttribute']('vid_start'),_0x105cc8=_0x24ddb6['get'](_0x2eac5b)||new Set();_0x105cc8['add'](_0x433deb['get'](_0x242e6f)['userId']),_0x24ddb6['set'](_0x2eac5b,_0x105cc8);}}for(const _0x2d2fa5 of _0x24ddb6['keys']())(_0x42e5d6['has'](_0x2d2fa5)||_0x433deb['has'](_0x2d2fa5))&&_0x24ddb6['delete'](_0x2d2fa5);}for(const _0x3de2a7 of _0x1df9c5){const _0x321d58=_0x5f4cf3['insertions'][_0x3de2a7];let _0xb974fa=null,_0x4822bc=null;for(const _0x38819b of _0x321d58){const _0x392280=this['_getVidAttributeName'](_0x38819b),_0x1f6c73=_0x38819b['item']['getAttribute'](_0x392280),_0x17eac4=_0x24ddb6['get'](_0x1f6c73);_0x17eac4&&'elementStart'==_0x38819b['type']&&(_0xb974fa=Array['from'](_0x17eac4)[0x0],_0x4822bc=_0x38819b['item']['getAttribute']('vid_end')),_0xb974fa&&(_0x433deb['set'](_0x1f6c73,{'userId':_0xb974fa}),_0x42e5d6['set'](_0x1f6c73,{'userId':_0xb974fa})),_0x1f6c73==_0x4822bc&&(_0xb974fa=null,_0x4822bc=null);}}const _0x4e75ff={},_0x2aa9b4=new Set();for(const _0x5cf6b0 of _0x1df9c5){const _0x2f5538=_0x343f25['deletions'][_0x5cf6b0],_0x193e66=_0x343f25['insertions'][_0x5cf6b0];for(const {userId:_0x28aed5}of this['_touchedMarkers']['values']())null!==_0x28aed5&&_0x2aa9b4['add'](_0x28aed5);for(const {userId:_0x26c8e4}of this['_touchedRoots']['values']())null!==_0x26c8e4&&_0x2aa9b4['add'](_0x26c8e4);this['_markChanges'](_0x193e66,_0x5f4cf3['insertions'][_0x5cf6b0],_0x42e5d6,'insertion',_0x2aa9b4),this['_markChanges'](_0x2f5538,_0x5f4cf3['deletions'][_0x5cf6b0],_0x433deb,'deletion',_0x2aa9b4),_0x4e75ff[_0x5cf6b0]={'insertions':this['_prepareViewToSave'](_0x193e66),'deletions':this['_prepareViewToSave'](_0x2f5538),'attachChange':this['_touchedRoots']['get'](_0x5cf6b0)||null,'attributesBefore':_0x24e9a2(this['_baseRootsAttributes']['get'](_0x5cf6b0))||{},'attributesAfter':_0x24e9a2(this['_diffRootsAttributes']['get'](_0x5cf6b0))};}return{'diffData':_0x4e75ff,'authorsIds':Array['from'](_0x2aa9b4)};}['_processRootBeforeSave'](_0x397ae3){for(const [,_0x47ba4a]of _0x397ae3['markers']){const _0x1ab6a5=_0x47ba4a['start']['getAncestors']()['filter'](_0x472425=>'tableCell'==_0x472425['name']);for(const _0x577dad of _0x1ab6a5)0x1==_0x577dad['childCount']&&_0x577dad['getChild'](0x0)['is']('element','paragraph')&&_0x577dad['getChild'](0x0)['_setAttribute']('keepParagraph',!0x0);}}['_prepareViewToSave'](_0x24eb8e){this['_processRootBeforeSave'](_0x24eb8e);const _0x54ab2c=this['editor']['data']['toView'](_0x24eb8e,{}),_0x2ff763=Array['from'](_0x54ab2c['getChildren']())['map'](_0x1ea1b7=>this['_getViewJson'](_0x1ea1b7));return JSON['stringify'](_0x2ff763);}['_getViewJson'](_0x3c1a52){if(_0x3c1a52['is']('$text'))return _0x3c1a52['data'];{const _0x1f5cb3=this['editor']['plugins']['get']('RevisionHistoryUtils'),_0x532bc7=_0x3c1a52,_0x26773e=this['editor']['data']['htmlProcessor']['domConverter'],_0x279769={'type':_0x1f5cb3['_getTypeCharForViewElement'](_0x532bc7),'name':_0x532bc7['name'],'attributes':Array['from'](_0x532bc7['getAttributes']()),'children':Array['from'](_0x532bc7['getChildren']())['map'](_0x506aab=>this['_getViewJson'](_0x506aab))};if(_0x3c1a52['is']('uiElement')&&'$comment'!=_0x3c1a52['name']){const _0xeb83ec=_0x3c1a52['render'](_0x26773e['domDocument'],_0x26773e);_0x279769['children']['push'](_0xeb83ec['outerHTML']);}else{if(_0x3c1a52['is']('rawElement')){const _0x81ff86=_0x26773e['domDocument']['createElement'](_0x532bc7['name']);_0x3c1a52['render'](_0x81ff86,_0x26773e),_0x279769['children']['push'](_0x81ff86['innerHTML']);}}const _0x5e9f27=Array['from'](_0x532bc7['getCustomProperties']());_0x5e9f27['length']>0x0&&(_0x279769['customProperties']=_0x5e9f27);const _0x222426=_0x532bc7['getFillerOffset']();return null!==_0x222426&&(_0x279769['fillerOffset']=_0x222426),_0x279769;}}['_markChanges'](_0x3d2c37,_0x16eb47,_0x2a4dcf,_0x79fab5,_0x276b34){let _0x21803a=null,_0x103d3c=null,_0x20d01b=0x0;const _0x55be51=this['editor']['model'];for(let _0x464755=0x0;_0x464755<_0x16eb47['length'];_0x464755++){const _0x12272a=this['_getVidAttributeName'](_0x16eb47[_0x464755]),_0x332d59=_0x16eb47[_0x464755]['item']['getAttribute'](_0x12272a),_0x223293=_0x2a4dcf['get'](_0x332d59),_0xae62b6=_0x464755==_0x16eb47['length']-0x1;(!_0x21803a&&_0x223293&&(_0x21803a=_0x223293,_0x103d3c=_0x16eb47[_0x464755]),_0x21803a&&(!_0x223293||_0x223293['userId']!=_0x21803a['userId']))&&(_0xb937ac(_0x223293,P(_0x103d3c,_0x3d2c37,_0x55be51),P(_0x16eb47[_0x464755],_0x3d2c37,_0x55be51)),_0x21803a=_0x223293||null,_0x103d3c=_0x223293?_0x16eb47[_0x464755]:null),_0x21803a&&_0xae62b6&&_0xb937ac(_0x223293,P(_0x103d3c,_0x3d2c37,_0x55be51),V(_0x16eb47[_0x464755],_0x3d2c37,_0x55be51));}function _0xb937ac(_0x120252,_0x1e5738,_0x3beee8){const _0xe80ff7=_0x21803a['userId'],_0x21e32d='revision:'+_0x79fab5+':'+_0xe80ff7+':'+_0x20d01b++,_0x31f415=_0x55be51['createRange'](_0x1e5738,_0x3beee8);_0x3d2c37['markers']['set'](_0x21e32d,_0x31f415),null!==_0xe80ff7&&_0x276b34['add'](_0xe80ff7);}}['_getVidAttributeName'](_0x495226){switch(_0x495226['type']){case'elementStart':return'vid_start';case'elementEnd':return'vid_end';default:return'vid';}}['_fixOperation'](_0xdb0b87,_0x582e07){_0xdb0b87['baseVersion']=null;for(const _0x23a8d8 in _0xdb0b87){const _0x1598a4=_0xdb0b87[_0x23a8d8];if(_0x1598a4 instanceof _0x28e393){const _0x9e5753=_0x582e07['get'](_0x1598a4['root']['rootName']);_0xdb0b87[_0x23a8d8]=this['_fixPosition'](_0x1598a4,_0x9e5753);}if(_0x1598a4 instanceof _0xf5c2e3){const _0x3ee41a=_0x582e07['get'](_0x1598a4['root']['rootName']);_0xdb0b87[_0x23a8d8]=this['_fixRange'](_0x1598a4,_0x3ee41a);}'root'===_0x23a8d8&&(_0xdb0b87['root']=_0x582e07['get'](_0xdb0b87['root']['rootName']));}}['_fixRange'](_0x3173fa,_0x4230ad){return this['editor']['model']['createRange'](this['_fixPosition'](_0x3173fa['start'],_0x4230ad),this['_fixPosition'](_0x3173fa['end'],_0x4230ad));}['_fixPosition'](_0x22db59,_0x18660d){return this['editor']['model']['createPositionFromPath'](_0x18660d,_0x22db59['path'],_0x22db59['stickiness']);}['_handleInsertOperation'](_0x51cfbc){const _0x2e68fe=this['_idsRoots']['get'](_0x51cfbc['position']['root']['rootName']),_0x4c0970=this['_fixPosition'](_0x51cfbc['position'],_0x2e68fe),_0x568638=null===_0x51cfbc['_authorId']?null:_0x51cfbc['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x26aa00=_0x4c0970['parent'],_0x4202c5=this['_revisionId'],_0x3397fa=[];for(const _0x589393 of _0x51cfbc['nodes'])if(_0x589393['is']('element'))_0x3397fa['push'](this['_makeIdsRoot'](_0x589393));else{for(let _0x3781a3=0x0;_0x3781a3<_0x589393['offsetSize'];_0x3781a3++)_0x3397fa['push'](new _0x6df636('$text',{'vid':this['_revisionId']++}));}const _0x5038ba=this['_revisionId'];for(let _0x3075bf=_0x4202c5;_0x3075bf<_0x5038ba;_0x3075bf++)this['_touched']['set'](_0x3075bf,{'userId':_0x568638});_0x26aa00['_insertChild'](_0x4c0970['offset'],_0x3397fa);}['_handleMoveOperation'](_0x29a08f){(_0x29a08f=this['_cloneOperation'](_0x29a08f,this['_idsRoots']))['_execute']();const _0x30f4aa=null===_0x29a08f['_authorId']?null:_0x29a08f['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0xd7c5b3=_0x29a08f['getMovedRangeStart'](),_0x2c46bf=_0xd7c5b3['parent'],_0x255f44=_0xd7c5b3['offset'];!function _0x1c8e55(_0xed7f93,_0x15836a,_0x34c67d,_0x5561d7){for(let _0x19f106=_0x34c67d;_0x19f106<_0x5561d7;_0x19f106++){const _0x1229a0=_0x15836a['getChild'](_0x19f106);_0x1229a0['is']('element','$text')?_0xed7f93['set'](_0x1229a0['getAttribute']('vid'),{'userId':_0x30f4aa}):(_0xed7f93['set'](_0x1229a0['getAttribute']('vid_start'),{'userId':_0x30f4aa}),_0x1c8e55(_0xed7f93,_0x1229a0,0x0,_0x1229a0['childCount']),_0xed7f93['set'](_0x1229a0['getAttribute']('vid_end'),{'userId':_0x30f4aa}));}}(this['_touched'],_0x2c46bf,_0x255f44,_0x255f44+_0x29a08f['howMany']);}['_handleMergeOperation'](_0x164c85){const _0x41eb69=null===(_0x164c85=this['_cloneOperation'](_0x164c85,this['_idsRoots']))['_authorId']?null:_0x164c85['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x4da243=_0x164c85['targetPosition']['parent'],_0x4a773e=_0x164c85['sourcePosition']['parent'],_0x1b045a=_0x4da243['getAttribute']('vid_end'),_0x94a4a1=_0x4a773e['getAttribute']('vid_start');_0x4da243['_setAttribute']('vid_end',_0x4a773e['getAttribute']('vid_end')),_0x4a773e['_setAttribute']('vid_end',_0x1b045a),this['_touched']['set'](_0x94a4a1,{'userId':_0x41eb69}),this['_touched']['set'](_0x1b045a,{'userId':_0x41eb69}),_0x164c85['_execute']();}['_handleSplitOperation'](_0x148b98){const _0x514d53=null===(_0x148b98=this['_cloneOperation'](_0x148b98,this['_idsRoots']))['_authorId']?null:_0x148b98['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x1ea437=_0x148b98['graveyardPosition'],_0x161a5a=_0x148b98['splitPosition']['parent'];_0x148b98['_execute']();const _0x2ee0d8=_0x161a5a['getAttribute']('vid_end'),_0x15e56c=_0x148b98['insertionPosition']['nodeAfter'];if(_0x1ea437){const _0x50b926=_0x15e56c['getAttribute']('vid_end'),_0x57840d=_0x161a5a['getAttribute']('vid_end');_0x161a5a['_setAttribute']('vid_end',_0x50b926),_0x15e56c['_setAttribute']('vid_end',_0x57840d),this['_touched']['set'](_0x161a5a['getAttribute']('vid_end'),{'userId':_0x514d53}),this['_touched']['set'](_0x15e56c['getAttribute']('vid_start'),{'userId':_0x514d53});}else{const _0x3e7cff=this['_revisionId']++,_0x29deb0=this['_revisionId']++;_0x161a5a['_setAttribute']('vid_end',_0x3e7cff),_0x15e56c['_setAttribute']('vid_start',_0x29deb0),_0x15e56c['_setAttribute']('vid_end',_0x2ee0d8),this['_touched']['set'](_0x3e7cff,{'userId':_0x514d53}),this['_touched']['set'](_0x29deb0,{'userId':_0x514d53});}}['_handleMarkerOperation'](_0x430d3e){if(!_0x430d3e['affectsData'])return;const _0x493c00=(_0x430d3e=this['_cloneOperation'](_0x430d3e,this['_diffRoots']))['oldRange']?_0x430d3e['oldRange']['root']:null,_0x42a7c0=_0x430d3e['newRange']?_0x430d3e['newRange']['root']:null;_0x493c00&&this['_markers']['delete'](_0x430d3e['name']),_0x42a7c0&&this['_markers']['set'](_0x430d3e['name'],_0x430d3e['newRange']['clone']());const _0x1d121d=null===_0x430d3e['_authorId']?null:_0x430d3e['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x3addad=_0x430d3e['name'];if(!this['_touchedMarkers']['has'](_0x3addad))return void this['_touchedMarkers']['set'](_0x3addad,{'range':_0x430d3e['oldRange'],'userId':_0x1d121d});const _0x5f0a1e=this['_touchedMarkers']['get'](_0x3addad),_0xca0c56=_0x5f0a1e['range'],_0x5785f1=_0x430d3e['newRange'];null==_0xca0c56&&null==_0x5785f1||_0xca0c56&&_0x5785f1&&_0xca0c56['isEqual'](_0x5785f1)?this['_touchedMarkers']['delete'](_0x430d3e['name']):_0x5f0a1e['userId']=_0x1d121d;}['_handleRootOperation'](_0x7bb13a,_0x34bd20){this['_diffRoots']['has'](_0x7bb13a['rootName'])?this['_diffRoots']['get'](_0x7bb13a['rootName'])['_isAttached']=_0x7bb13a['isAdd']:(this['_diffRoots']['set'](_0x7bb13a['rootName'],N(_0x7bb13a['rootName'],!0x0)),this['_diffRootsAttributes']['set'](_0x7bb13a['rootName'],{}),_0x34bd20&&this['_idsRoots']['set'](_0x7bb13a['rootName'],N(_0x7bb13a['rootName'],!0x0)));const _0x134bc1=null===_0x7bb13a['_authorId']?null:_0x7bb13a['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0xa1de3d=this['_touchedRoots']['get'](_0x7bb13a['rootName']);_0xa1de3d&&_0xa1de3d['userId']===_0x134bc1?this['_touchedRoots']['delete'](_0x7bb13a['rootName']):this['_touchedRoots']['set'](_0x7bb13a['rootName'],{'userId':_0x134bc1,'isAttached':_0x7bb13a['isAdd']});}['_handleRootAttributeOperation'](_0x4d937a){const _0x481548=this['_diffRootsAttributes']['get'](_0x4d937a['root']['rootName']);null===_0x4d937a['newValue']?delete _0x481548[_0x4d937a['key']]:_0x481548[_0x4d937a['key']]=_0x4d937a['newValue'];}}function x(_0x599eb2){const _0x5dba43=N(_0x599eb2['rootName'],_0x599eb2['isAttached']());for(const _0x403ad6 of _0x599eb2['getChildren']()){const _0x4b03c2=_0x403ad6['_clone'](!0x0);_0x5dba43['_appendChild'](_0x4b03c2);}return _0x5dba43;}function N(_0x279f51,_0x4f1a3a=!0x0){const _0x9c279e=new _0x6fdf77();return _0x9c279e['rootName']=_0x279f51,_0x9c279e['_isAttached']=_0x4f1a3a,_0x9c279e['isAttached']=()=>_0x9c279e['_isAttached'],_0x9c279e;}function P(_0x4d90e5,_0x50e23e,_0x1b6b9f){const _0x58a7de='elementEnd'==_0x4d90e5['type']?_0x1b6b9f['createPositionAt'](_0x4d90e5['item'],'end'):_0x1b6b9f['createPositionBefore'](_0x4d90e5['item']);return _0x1b6b9f['createPositionFromPath'](_0x50e23e,_0x58a7de['path'],_0x58a7de['stickiness']);}function V(_0x1d2202,_0xb119ff,_0x45f2dc){const _0x25ae32='elementStart'==_0x1d2202['type']?_0x45f2dc['createPositionAt'](_0x1d2202['item'],0x0):_0x45f2dc['createPositionAfter'](_0x1d2202['item']);return _0x45f2dc['createPositionFromPath'](_0xb119ff,_0x25ae32['path'],_0x25ae32['stickiness']);}class he extends/* #__PURE__ -- @preserve */
|
|
25
|
-
|
|
26
|
-
_0xe47491(){['id'];['author'];['type'];['data'];['rootName'];constructor(_0x11f686){super(),this['id']=_0x11f686['id']||_0x1f92e5(),this['author']=_0x11f686['author'],this['type']=_0x11f686['type'],this['data']=_0x11f686['data']||{},this['rootName']=_0x11f686['rootName'],this['set']('createdAt',_0x11f686['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(_0x1b2827,_0x4f9d2e){this['newRevisionId']=_0x1b2827,this['oldRevisionId']=_0x4f9d2e,this['changes']=new _0x5879da();}['_setChanges'](_0x489194){for(const _0x203a40 of _0x489194)this['changes']['add'](_0x203a40);}}class u extends _0x1f60bb{['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[_0x24b744,_0x5ad226,S,$];}constructor(_0x4a459f){super(_0x4a459f),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',(_0x3b443d,_0x14f840,_0x3746af)=>{this['activeChange']=null,this['activeView']=null,this['editor']['editing']['view']['change'](_0x56a449=>{for(const _0x22b0ac of this['editor']['editing']['view']['document']['roots'])_0x3746af?_0x56a449['removeClass']('ck-editor__editable__overlay',_0x22b0ac):_0x56a449['addClass']('ck-editor__editable__overlay',_0x22b0ac);});}),this['bind']('isNavigationMode')['to'](this,'activeChange',_0x473f20=>null!==_0x473f20),this['bind']('currentChangeNumber')['to'](this,'isReady',this,'diff',this,'activeChange',(_0x26551,_0x306ffd,_0xe789f2)=>_0x26551&&_0xe789f2?_0x306ffd['changes']['getIndex'](_0xe789f2):0x0),this['bind']('numberOfChanges')['to'](this,'isReady',this,'diff',(_0x42c0ec,_0x240270)=>_0x42c0ec?_0x240270['changes']['length']:0x0),this['_changeView']=null,this['_changeIdToChange']=new Map(),this['_balloon']=this['editor']['plugins']['get'](_0x5ad226);}['init'](){const _0x257b4b=this['editor'],_0x400575=new ot(_0x257b4b,{'direction':'backward'}),_0x5b3151=new ot(_0x257b4b,{'direction':'forward'});(_0x257b4b['commands']['add']('showPreviousChange',_0x400575),_0x257b4b['commands']['add']('showNextChange',_0x5b3151),_0x257b4b['commands']['add']('restoreRevision',new nt(_0x257b4b)),this['on']('change:numberOfChanges',()=>{_0x400575['refresh'](),_0x5b3151['refresh']();}),this['_setConversion'](),this['_initInteractions'](),_0x257b4b['enableReadOnlyMode']('revision-viewer'),_0x257b4b['plugins']['has']('WidgetToolbarRepository'))&&_0x257b4b['plugins']['get']('WidgetToolbarRepository')['forceDisabled']('revision-viewer');}async['getRevisionDocumentData'](_0x4b16ce){return await this['_utils']['loadRevisionData'](_0x4b16ce,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x4b16ce);}async['getRevisionRootsAttributes'](_0x5627be){return await this['_utils']['loadRevisionData'](_0x5627be,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x5627be);}async['compare'](_0x44d97c,_0x346bce,_0xeed5fe=!0x1){if(!this['isEnabled'])return;const _0x59abec=this['diff'],_0x28854a=this['repository'],_0x580789='string'==typeof _0x44d97c?_0x28854a['getRevision'](_0x44d97c):_0x44d97c,_0x106733='string'==typeof _0x346bce?_0x28854a['getRevision'](_0x346bce):_0x346bce,_0x5a101f=_0x580789['id'],_0x56f78c=_0x106733?_0x106733['id']:null;if(!_0xeed5fe&&this['diff']&&this['diff']['newRevisionId']===_0x5a101f&&this['diff']['oldRevisionId']===_0x56f78c)return Promise['resolve']();this['isReady']=!0x1,this['activeView']=null,this['activeChange']=null,this['diff']=new J(_0x5a101f,_0x56f78c);const _0xe6f0e=this['_getRevisionsRange'](_0x580789,_0x106733,!0x0)['map'](_0xab1377=>this['_utils']['loadRevisionData'](_0xab1377,this['adapter']));return _0xe6f0e['push'](new Promise(_0x9fecc5=>{setTimeout(_0x9fecc5,0x14);})),Promise['all'](_0xe6f0e)['then'](()=>{if(!this['isEnabled'])return;this['_cleanUp']();const _0x1445e3=this['_getDiff'](_0x5a101f,_0x56f78c);for(const _0x4f4997 of _0x1445e3['changes'])this['_changeIdToChange']['set'](_0x4f4997['id'],_0x4f4997);this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x26c10b=>{for(const _0x3b5ed7 of this['editor']['model']['document']['getRootNames']())_0x26c10b['detachRoot'](_0x3b5ed7);for(const _0x3538ad of Object['keys'](_0x1445e3['model'])){const _0x4825ad=_0x26c10b['addRoot'](_0x3538ad);for(const _0x2236be of Object['keys'](_0x1445e3['attributes'][_0x3538ad]))_0x26c10b['setAttribute'](_0x2236be,_0x1445e3['attributes'][_0x3538ad][_0x2236be],_0x4825ad);_0x26c10b['insert'](_0x1445e3['model'][_0x3538ad],_0x4825ad,0x0);}}),this['diff']['_setChanges'](this['_sortAndFilterDiffChanges'](_0x1445e3['changes'])),this['isReady']=!0x0;})['catch'](_0x3c8b44=>{console['error'](_0x3c8b44),this['_cleanUp'](),_0x59abec&&(this['diff']=_0x59abec),this['isReady']=!0x0;});}['addRevisionData'](_0x391a3a,_0x5dd469){const _0xe1c2fb=this['repository']['createRevision'](_0x391a3a);return _0xe1c2fb['on']('_update',(_0x1e7024,_0x598da8,_0x464d8a)=>_0x5dd469(_0x598da8,_0x464d8a,_0xe1c2fb)),this['repository']['addRevision'](_0xe1c2fb),_0xe1c2fb;}['_cleanUp'](){this['activeChange']=null,this['_cleanMarkers'](),this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=null,this['_changeIdToChange']['clear'](),this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x27519c=>{for(const _0x5f0fc2 of this['editor']['model']['document']['getRootNames']())_0x27519c['detachRoot'](_0x5f0fc2);});}['_sortAndFilterDiffChanges'](_0xd9c930){const _0x5843e9=[],_0x3c64df=new Map();for(const _0x28a62e of this['editor']['model']['document']['getRootNames']()){const _0x22850d=this['editor']['editing']['view']['getDomRoot'](_0x28a62e);if(!_0x22850d)continue;const _0xe2c060=_0x22850d['getClientRects']()['item'](0x0);_0xe2c060&&(_0x5843e9['push'](_0x28a62e),_0x3c64df['set'](_0x28a62e,_0xe2c060));}return _0x5843e9['sort']((_0x9d979b,_0x1167f3)=>{const _0x10ca9e=_0x3c64df['get'](_0x9d979b),_0x16d696=_0x3c64df['get'](_0x1167f3);return _0x10ca9e['y']-_0x16d696['y']||_0x10ca9e['x']-_0x16d696['x'];}),(_0xd9c930=_0xd9c930['filter'](_0x416792=>_0x5843e9['includes'](_0x416792['rootName'])))['sort']((_0x2ea4bb,_0x434f0b)=>_0x5843e9['indexOf'](_0x2ea4bb['rootName'])-_0x5843e9['indexOf'](_0x434f0b['rootName'])),_0xd9c930;}['_makeTape'](_0x16f900){const _0x34622e=Array['from'](_0x16f900['markers'])['filter'](([_0x3dcd87,_0xfb65d0])=>_0x3dcd87['startsWith']('revision:')&&!_0xfb65d0['isCollapsed']),_0x45e039=Array['from'](this['editor']['model']['createRangeIn'](_0x16f900)['getWalker']({'singleCharacters':!0x0}));if(0x0!=_0x34622e['length'])for(const _0x217e41 of _0x45e039){const [_0x2b5e98,_0x251cd7]=_0x34622e[0x0],[,_0x163538,_0x57cef2]=_0x2b5e98['split'](':');if(_0x251cd7['end']['isEqual'](_0x217e41['nextPosition'])&&_0x34622e['shift'](),(_0x217e41['previousPosition']['isEqual'](_0x251cd7['start'])||_0x217e41['previousPosition']['isAfter'](_0x251cd7['start']))&&('insertion'==_0x163538?_0x217e41['isAdded']={'userId':_0x57cef2}:'deletion'==_0x163538&&(_0x217e41['isRemoved']={'userId':_0x57cef2})),0x0==_0x34622e['length'])break;}return _0x45e039;}['_refreshStartEndIndex'](_0x1d8f8d){const _0x2d2516=new Map();for(let _0xb7a533=0x0;_0xb7a533<_0x1d8f8d['length'];_0xb7a533++)'text'===_0x1d8f8d[_0xb7a533]['type']?(_0x1d8f8d[_0xb7a533]['item']['startIndex']=_0xb7a533,_0x1d8f8d[_0xb7a533]['item']['endIndex']=_0xb7a533):('elementStart'===_0x1d8f8d[_0xb7a533]['type']?_0x1d8f8d[_0xb7a533]['item']['startIndex']=_0xb7a533:'elementEnd'===_0x1d8f8d[_0xb7a533]['type']&&(_0x1d8f8d[_0xb7a533]['item']['endIndex']=_0xb7a533),_0x2d2516['set'](_0x1d8f8d[_0xb7a533]['id'],_0xb7a533));for(const _0x383a1d of _0x2d2516['values']())'elementStart'===_0x1d8f8d[_0x383a1d]['type']?_0x1d8f8d[_0x383a1d]['item']['endIndex']=_0x2d2516['get'](_0x1d8f8d[_0x383a1d]['pairId']):'elementEnd'===_0x1d8f8d[_0x383a1d]['type']&&(_0x1d8f8d[_0x383a1d]['item']['startIndex']=_0x2d2516['get'](_0x1d8f8d[_0x383a1d]['pairId']));}['_processTape'](_0xe45c23){for(let _0x114052=0x0;_0x114052<_0xe45c23['length'];_0x114052++){if('elementStart'===_0xe45c23[_0x114052]['type'])_0xe45c23[_0x114052]['item']['startIndex']=_0x114052;else{if('elementEnd'===_0xe45c23[_0x114052]['type']){_0xe45c23[_0x114052]['item']['endIndex']=_0x114052;const _0x3f7b48=_0xe45c23[_0x114052]['item']['startIndex'];_0xe45c23[_0x3f7b48]['pairId']=_0xe45c23[_0x114052]['id'],_0xe45c23[_0x114052]['pairId']=_0xe45c23[_0x3f7b48]['id'];}else _0xe45c23[_0x114052]['item']['startIndex']=_0x114052,_0xe45c23[_0x114052]['item']['endIndex']=_0x114052,_0xe45c23[_0x114052]['pairId']=null;}_0xe45c23[_0x114052]['markersStart']||(_0xe45c23[_0x114052]['markersStart']=[],_0xe45c23[_0x114052]['markersEnd']=[]);}}['_markInsertions'](_0x4489d6,_0xce32a2){const _0x2cfc74=_0x4489d6['filter'](_0x362572=>!_0x362572['isAdded']);for(let _0x2c8085=0x0;_0x2c8085<_0xce32a2['length'];_0x2c8085++)_0xce32a2[_0x2c8085]['isAdded']&&(_0x2cfc74[_0x2c8085]['isAdded']=_0xce32a2[_0x2c8085]['isAdded']);}['_getDiff'](_0x5e7777,_0x33c5b4=null){const _0x4662e5=this['repository']['getRevision'](_0x5e7777),_0x307b93=_0x33c5b4?this['repository']['getRevision'](_0x33c5b4):null,_0xeb9ebc=this['_getRevisionsRange'](_0x4662e5,_0x307b93),_0x347d3e=_0xeb9ebc[_0xeb9ebc['length']-0x1],_0x3ed109=new Map(),_0xe59a20={'model':{},'attributes':{},'changes':[]},_0xb606bb=new Set(),_0xc78af1=new Map();for(let _0x1d87e3=_0xeb9ebc['length']-0x1;_0x1d87e3>=0x0;_0x1d87e3--){const _0x1e5a63=_0xeb9ebc[_0x1d87e3];for(const _0x3b987a of Object['keys'](_0x1e5a63['diffData']))if(_0x1e5a63['diffData'][_0x3b987a]['attachChange']){const _0x1f4e50=_0x1e5a63['diffData'][_0x3b987a]['attachChange'];_0x1f4e50['isAttached']?(_0xb606bb['add'](_0x3b987a),_0xc78af1['has'](_0x3b987a)&&_0xc78af1['get'](_0x3b987a)['userId']==_0x1f4e50['userId']?_0xc78af1['delete'](_0x3b987a):_0xc78af1['set'](_0x3b987a,_0x1f4e50)):_0xc78af1['has'](_0x3b987a)?(_0xb606bb['delete'](_0x3b987a),_0xc78af1['delete'](_0x3b987a)):(_0xb606bb['add'](_0x3b987a),_0xc78af1['set'](_0x3b987a,_0x1f4e50));}else _0xb606bb['add'](_0x3b987a);}for(const _0x2b7aa2 of _0xb606bb){const _0x4a2e68=_0xc78af1['has'](_0x2b7aa2)&&!_0xc78af1['get'](_0x2b7aa2)['isAttached'];let _0xe0c54a=_0x4a2e68?_0xeb9ebc['length']-0x1:0x0;const _0x2f303c=_0x4a2e68?-0x1:0x1;for(;_0xeb9ebc[_0xe0c54a];){const _0x3cfd91=_0xeb9ebc[_0xe0c54a];if(_0x3cfd91['diffData'][_0x2b7aa2]){const _0x5e91e1=_0x4a2e68?_0x3cfd91['diffData'][_0x2b7aa2]['attributesBefore']:_0x3cfd91['diffData'][_0x2b7aa2]['attributesAfter'];_0xe59a20['attributes'][_0x2b7aa2]=_0x5e91e1?_0x24e9a2(_0x5e91e1):{};break;}_0xe0c54a+=_0x2f303c;}}for(const _0x104c54 of _0xeb9ebc){_0x104c54['model']={};for(const _0x186be9 of _0x104c54['authors'])_0x3ed109['set'](_0x186be9['id'],_0x186be9);for(const _0x2253f3 of _0xb606bb){const _0x413809=_0x104c54['diffData'][_0x2253f3]?_0x104c54['diffData'][_0x2253f3]['insertions']:'[]',_0x135014=_0x104c54['diffData'][_0x2253f3]?_0x104c54['diffData'][_0x2253f3]['deletions']:'[]';_0x104c54['model'][_0x2253f3]={'insertions':this['_utils']['_makeModelFromViewString'](_0x413809),'deletions':this['_utils']['_makeModelFromViewString'](_0x135014)};}}for(const _0x3fab1f of _0xb606bb){let _0x1e6332=null,_0x31ac8=0x0;const _0x2c3bea=new Map(Array['from'](_0x4662e5['model'][_0x3fab1f]['insertions']['markers'])['filter'](([_0xf0b48a])=>!_0xf0b48a['startsWith']('revision:')));let _0x5804e2=0x0;for(const _0x548c95 of _0xeb9ebc){const _0xbad96=this['_makeTape'](_0x548c95['model'][_0x3fab1f]['insertions']);_0x548c95==_0x4662e5?(_0x1e6332=_0xbad96,_0x31ac8=_0x1e6332['length'],_0x1e6332['forEach'](_0x4bab8c=>{_0x4bab8c['id']=_0x5804e2++;}),this['_processTape'](_0x1e6332)):this['_markInsertions'](_0x1e6332,_0xbad96);const _0xbf0a0a=_0x1e6332['filter'](_0x53837f=>!_0x53837f['isAdded'])['map'](_0x3ed2e0=>_0x3ed2e0['id']);let _0x5b7b62=0x0;const _0x2cfab4=this['_makeTape'](_0x548c95['model'][_0x3fab1f]['deletions']);_0x2cfab4['forEach'](_0x5d73a2=>{_0x5d73a2['isRemoved']?_0x5d73a2['id']=_0x31ac8++:_0x5d73a2['id']=_0xbf0a0a[_0x5b7b62++];}),this['_processTape'](_0x2cfab4),this['_setDistance'](_0x1e6332,'isAdded'),this['_setDistance'](_0x2cfab4,'isRemoved'),_0x548c95==_0x4662e5&&this['_markMarkers'](_0x1e6332,_0x2c3bea),_0x1e6332=this['_joinTapes'](_0x1e6332,_0x2cfab4),this['_refreshStartEndIndex'](_0x1e6332),this['_setDistance'](_0x1e6332,'isRemoved');}_0x1e6332=_0x1e6332['filter'](_0x5511fa=>!(_0x5511fa['isAdded']&&_0x5511fa['isRemoved']));const _0x3628e4=new Map(_0x347d3e['model'][_0x3fab1f]['deletions']['markers']),_0x4cb21c=new Set(_0x2c3bea['keys']());for(const _0x32126 of _0x3628e4['keys']())_0x4cb21c['delete'](_0x32126);this['_markSuggestions'](_0x1e6332,_0x4cb21c),this['_fixObsoleteTags'](_0x1e6332),_0x1e6332=this['_removeMissingPairs'](_0x1e6332),_0x1e6332=this['_markMismatchedRemovedTags'](_0x1e6332),_0x1e6332=this['_removeUnsupportedChanges'](_0x1e6332);const {root:_0x137909,changes:_0xa16f9}=this['_makeModelFromTape'](_0x1e6332,_0x3ed109,_0x3fab1f);_0xe59a20['model'][_0x3fab1f]=_0x137909;const _0x140c36=_0xc78af1['get'](_0x3fab1f);if(_0x140c36){const _0x560b3a=_0x3ed109['get'](_0x140c36['userId']),_0x6ae253=new G({'author':_0x560b3a,'type':_0x140c36['isAttached']?'add':'remove','data':{'isOnRoot':!0x0},'createdAt':new Date(),'rootName':_0x3fab1f});_0xa16f9['unshift'](_0x6ae253),_0xe59a20['attributes'][_0x3fab1f]['revisionHistoryAttachChange']=_0x6ae253['id'];}_0xe59a20['changes']=_0xe59a20['changes']['concat'](_0xa16f9);}return _0xe59a20;}['_markMarkers'](_0x3a37f9,_0x340fb9){for(let _0x1c9e80=0x0;_0x1c9e80<_0x3a37f9['length'];_0x1c9e80++)for(const [_0x871d70,_0x2b887f]of _0x340fb9)!_0x2b887f['isCollapsed']&&_0x2b887f['start']['isEqual'](_0x3a37f9[_0x1c9e80]['previousPosition'])&&_0x3a37f9[_0x1c9e80]['markersStart']['push'](_0x871d70),_0x2b887f['end']['isEqual'](_0x3a37f9[_0x1c9e80]['nextPosition'])&&_0x3a37f9[_0x1c9e80]['markersEnd']['push'](_0x871d70);}['_joinTapes'](_0x501b0d,_0x2cea95){let _0x3fd8fb=[],_0x5a9e04=0x0,_0x496770=0x0;for(;_0x5a9e04<_0x501b0d['length']||_0x496770<_0x2cea95['length'];){const _0x259792=_0x501b0d[_0x5a9e04]||{},_0x4ddbfe=_0x2cea95[_0x496770]||{};if(_0x259792['id']==_0x4ddbfe['id'])_0x5a9e04++,_0x496770++,_0x3fd8fb['push'](_0x259792);else{if(_0x4ddbfe['isRemoved']&&_0x259792['isAdded']){const {commonTape:_0x9c6b16,iEnd:_0x2a7688,jEnd:_0x142df4}=this['_threeWayMerge'](_0x501b0d,_0x5a9e04,_0x2cea95,_0x496770);_0x3fd8fb=_0x3fd8fb['concat'](_0x9c6b16),_0x5a9e04=_0x2a7688,_0x496770=_0x142df4;}else _0x4ddbfe['isRemoved']?(_0x496770++,_0x3fd8fb['push'](_0x4ddbfe)):(_0x5a9e04++,_0x3fd8fb['push'](_0x259792));}}return _0x3fd8fb;}['_markSuggestions'](_0x33e2dc,_0x5622de){const _0x2773ae=[];for(let _0x3b9e7b=0x0;_0x3b9e7b<_0x33e2dc['length'];_0x3b9e7b++){for(let _0x1e5255=0x0;_0x1e5255<_0x33e2dc[_0x3b9e7b]['markersStart']['length'];_0x1e5255++){const _0x563e88=_0x33e2dc[_0x3b9e7b]['markersStart'][_0x1e5255];if(!_0x5622de['has'](_0x563e88))continue;const {group:_0x7221b,type:_0x44c70a,authorId:_0x24dafa}=_0x2028b3(_0x563e88);'revision-suggestion'!=_0x7221b||'insertion'!=_0x44c70a&&'deletion'!=_0x44c70a||(_0x2773ae['unshift']({'type':_0x44c70a,'name':_0x563e88,'userId':_0x24dafa}),_0x33e2dc[_0x3b9e7b]['markersStart']['splice'](_0x1e5255,0x1),_0x1e5255--);}_0x3b9de9(_0x33e2dc[_0x3b9e7b]);for(let _0x3cec9a=0x0;_0x3cec9a<_0x33e2dc[_0x3b9e7b]['markersEnd']['length'];_0x3cec9a++){const _0x26ce6a=_0x33e2dc[_0x3b9e7b]['markersEnd'][_0x3cec9a];if(!_0x5622de['has'](_0x26ce6a))continue;const {group:_0x503d01,type:_0x4dc80b}=_0x2028b3(_0x26ce6a);if('revision-suggestion'!=_0x503d01||'insertion'!=_0x4dc80b&&'deletion'!=_0x4dc80b)continue;_0x33e2dc[_0x3b9e7b]['markersEnd']['splice'](_0x3cec9a,0x1),_0x3cec9a--;const _0x2cdc64=_0x2773ae['findIndex'](_0x407ecc=>_0x407ecc['name']==_0x26ce6a);_0x2cdc64>-0x1&&_0x2773ae['splice'](_0x2cdc64,0x1);}}function _0x2028b3(_0x1613bb){const _0x35d164=_0x1613bb['split'](':');return{'group':_0x35d164[0x0],'type':_0x35d164[0x1],'subType':_0x35d164['length']>=0x5?_0x35d164[0x2]:null,'id':_0x35d164['length']<0x5?_0x35d164[0x2]:_0x35d164[0x3],'authorId':_0x35d164['length']<0x5?_0x35d164[0x3]:_0x35d164[0x4],'markerCount':0x6==_0x35d164['length']?_0x35d164[0x5]:null};}function _0x3b9de9(_0x20e8a1){for(let _0x9b0993=0x0;_0x9b0993<_0x2773ae['length'];_0x9b0993++){if(_0x20e8a1['isAdded']&&'insertion'==_0x2773ae[_0x9b0993]['type']&&_0x20e8a1['isAdded']['userId']==_0x2773ae[_0x9b0993]['userId'])return _0x20e8a1['isAddSuggestion']=_0x2773ae[_0x9b0993],void delete _0x20e8a1['isAdded'];if(!_0x20e8a1['isAdded']&&!_0x20e8a1['isRemoved']&&'deletion'==_0x2773ae[_0x9b0993]['type'])return void(_0x20e8a1['isRemoveSuggestion']=_0x2773ae[_0x9b0993]);}}}['_setDistance'](_0x3e9f7b,_0x336378){let _0x478e59=0x0,_0x21be97=!0x1;const _0x58ed19=new Map();for(const _0x4127b9 of _0x3e9f7b)_0x4127b9[_0x336378]?_0x21be97&&(_0x478e59++,_0x21be97=!0x1):(_0x478e59++,_0x21be97=!0x0),_0x58ed19['set'](_0x4127b9['id'],_0x478e59);for(let _0x5cee77=0x0;_0x5cee77<_0x3e9f7b['length'];_0x5cee77++){if('isRemoved'==_0x336378&&_0x3e9f7b[_0x5cee77]['isAdded']||'isAdded'==_0x336378&&_0x3e9f7b[_0x5cee77]['isRemoved'])continue;if('text'==_0x3e9f7b[_0x5cee77]['type']){_0x3e9f7b[_0x5cee77]['distance']=0x0;continue;}const _0x30827e=_0x58ed19['get'](_0x3e9f7b[_0x5cee77]['pairId']),_0x2a3c6b=_0x58ed19['get'](_0x3e9f7b[_0x5cee77]['id']);_0x3e9f7b[_0x5cee77]['distance']=_0x30827e-_0x2a3c6b;}}['_getRevisionsRange'](_0x394c73,_0x2f74ba,_0x172d86=!0x1){const _0x29a8b2=[];let _0x1c09f6=this['repository']['getIndex'](_0x394c73),_0x2d9a76=this['repository']['getIndex'](_0x2f74ba);for(-0x1==_0x2d9a76&&(_0x2d9a76=this['repository']['_revisions']['length'],_0x172d86=!0x1);_0x1c09f6<_0x2d9a76;)_0x29a8b2['push'](this['repository']['getRevision'](_0x1c09f6)),_0x1c09f6++;return _0x172d86&&_0x29a8b2['push'](this['repository']['getRevision'](_0x1c09f6)),_0x29a8b2;}['_threeWayMerge'](_0x1b5918,_0x3f4853,_0x7bec19,_0x56380e){const _0x565a64=this['editor']['model']['schema'];let _0x3d7c8d=_0x3f4853;for(;_0x1b5918[_0x3d7c8d]&&_0x1b5918[_0x3d7c8d]['isAdded'];)_0x3d7c8d++;let _0x49a3a2=_0x56380e;for(;_0x7bec19[_0x49a3a2]&&_0x7bec19[_0x49a3a2]['isRemoved'];)_0x49a3a2++;_0x52e04c(_0x1b5918,_0x3f4853,_0x3d7c8d),_0x52e04c(_0x7bec19,_0x56380e,_0x49a3a2);const _0x436dd4=_0x7bec19['slice'](_0x56380e,_0x49a3a2)['concat'](_0x1b5918['slice'](_0x3f4853,_0x3d7c8d));return _0x436dd4['sort']((_0x4e8fb2,_0x392747)=>_0x4e8fb2['side']!=_0x392747['side']?_0x4e8fb2['side']-_0x392747['side']:_0x4e8fb2['level']!=_0x392747['level']?_0x4e8fb2['level']-_0x392747['level']:_0x4e8fb2['distance']!=_0x392747['distance']?_0x392747['distance']-_0x4e8fb2['distance']:!!_0x4e8fb2['isAdded']!=!!_0x392747['isAdded']?-0x1==_0x4e8fb2['side']||0x0==_0x4e8fb2['side']?_0x4e8fb2['isAdded']?-0x1:0x1:_0x4e8fb2['isAdded']?0x1:-0x1:_0x4e8fb2['index']-_0x392747['index']),{'commonTape':_0x436dd4,'iEnd':_0x3d7c8d,'jEnd':_0x49a3a2};function _0x52e04c(_0x501532,_0x2e6167,_0x353708){let _0x311a6a=-0x1,_0x4526e9=Number['POSITIVE_INFINITY'],_0x41f9eb=!0x0;for(let _0x352c7d=_0x2e6167;_0x352c7d<_0x353708;_0x352c7d++)if(_0x565a64['isInline'](_0x501532[_0x352c7d]['item'])||(_0x41f9eb=!0x1),_0x501532[_0x352c7d]['item']['startIndex']<_0x2e6167&&(_0x311a6a=_0x352c7d),_0x501532[_0x352c7d]['item']['endIndex']>=_0x353708){_0x4526e9=_0x352c7d;break;}_0x41f9eb&&(_0x311a6a=_0x353708-0x1);for(let _0x142c0d=_0x2e6167;_0x142c0d<_0x353708;_0x142c0d++)_0x501532[_0x142c0d]['side']=_0x142c0d<=_0x311a6a?-0x1:_0x142c0d<_0x4526e9?0x0:0x1,_0x501532[_0x142c0d]['index']=_0x142c0d;let _0x1aed43=0x0;for(let _0x10e69b=_0x2e6167;_0x10e69b<=_0x311a6a;_0x10e69b++)0x0==_0x501532[_0x10e69b]['distance']?_0x501532[_0x10e69b]['level']=_0x1aed43:(_0x1aed43++,_0x501532[_0x10e69b]['level']=_0x1aed43,_0x1aed43++);for(let _0x53453c=_0x2e6167;_0x53453c<_0x353708;_0x53453c++)0x0==_0x501532[_0x53453c]['side']&&(_0x501532[_0x53453c]['level']=_0x1aed43);_0x1aed43=0x0;for(let _0x100cc5=_0x353708-0x1;_0x100cc5>=_0x4526e9;_0x100cc5--)0x0==_0x501532[_0x100cc5]['distance']?_0x501532[_0x100cc5]['level']=_0x1aed43:(_0x1aed43--,_0x501532[_0x100cc5]['level']=_0x1aed43,_0x1aed43--);}}['_fixObsoleteTags'](_0x516d44){const _0x51fd5c=new Map(),_0x1faafc=this['editor']['model']['schema'];for(let _0x91171f=0x1;_0x91171f<_0x516d44['length'];_0x91171f++){let _0x5774dc,_0x148d08,_0x27895f;const _0x3d29e1=_0x516d44[_0x91171f],_0x14dc9a=_0x516d44[_0x91171f-0x1];if('text'==_0x3d29e1['type'])continue;if(_0x3d29e1['type']!=_0x14dc9a['type'])continue;if(!_0x1faafc['isBlock'](_0x14dc9a['item'])||_0x1faafc['isLimit'](_0x14dc9a['item']))continue;if(!_0x1faafc['isBlock'](_0x3d29e1['item'])||_0x1faafc['isLimit'](_0x3d29e1['item']))continue;if((_0x516d44[_0x91171f]['isAdded']||_0x516d44[_0x91171f]['isAddSuggestion'])&&_0x516d44[_0x91171f-0x1]['isRemoved'])_0x5774dc=_0x516d44[_0x91171f],_0x148d08=_0x516d44[_0x91171f-0x1],_0x27895f=_0x91171f-0x1;else{if(!_0x516d44[_0x91171f]['isRemoved']||!_0x516d44[_0x91171f-0x1]['isAdded']&&!_0x516d44[_0x91171f-0x1]['isAddSuggestion'])continue;_0x5774dc=_0x516d44[_0x91171f-0x1],_0x148d08=_0x516d44[_0x91171f],_0x27895f=_0x91171f;}const _0xd4a8d=_0x5774dc['level']==_0x148d08['level'],_0x5eb80f=Math['abs'](_0x5774dc['level'])<Math['abs'](_0x148d08['level'])&&0x0==_0x148d08['distance'];(_0xd4a8d||_0x5eb80f)&&(_0x51fd5c['set'](_0x148d08['id'],_0x5774dc['id']),_0x516d44['splice'](_0x27895f,0x1),_0x91171f--,_0x5774dc['isAdded']=!0x1);}for(let _0x1b1459=0x0;_0x1b1459<_0x516d44['length'];_0x1b1459++)_0x51fd5c['has'](_0x516d44[_0x1b1459]['pairId'])&&(_0x516d44[_0x1b1459]['pairId']=_0x51fd5c['get'](_0x516d44[_0x1b1459]['pairId']));}['_removeMissingPairs'](_0x3586a6){const _0x3fe2c4=new Set(_0x3586a6['map'](_0x5362d4=>_0x5362d4['id']));for(let _0x576196=0x0;_0x576196<_0x3586a6['length'];_0x576196++)_0x3fe2c4['has'](_0x3586a6[_0x576196]['pairId'])||0x0==_0x3586a6[_0x576196]['distance']||(_0x3586a6[_0x576196]['isIncorrect']=!0x0);return _0x3586a6['filter'](_0x3cfff3=>!_0x3cfff3['isIncorrect']);}['_markMismatchedRemovedTags'](_0x65ed42){const _0x1c163b=new Set();for(let _0x164187=0x0;_0x164187<_0x65ed42['length'];_0x164187++){if(_0x1c163b['has'](_0x65ed42[_0x164187]['id'])&&_0x65ed42[_0x164187]['isRemoved']&&(_0x65ed42[_0x164187]['isIncorrect']=!0x0),_0x65ed42[_0x164187]['isIncorrect'])continue;if(0x0==_0x65ed42[_0x164187]['distance'])continue;if('elementStart'!=_0x65ed42[_0x164187]['type'])continue;if(null==_0x65ed42[_0x164187]['pairId'])continue;let _0x4f4cfd=_0x164187+0x1,_0x9b448c=0x0;for(;_0x65ed42[_0x4f4cfd]['id']!=_0x65ed42[_0x164187]['pairId'];)'elementStart'==_0x65ed42[_0x4f4cfd]['type']?_0x9b448c++:'elementEnd'==_0x65ed42[_0x4f4cfd]['type']&&_0x9b448c--,_0x4f4cfd++;if(0x0!=_0x9b448c){if(_0x65ed42[_0x164187]['isRemoved'])_0x65ed42[_0x164187]['isIncorrect']=!0x0;else{for(;_0x4f4cfd!=_0x164187;)_0x65ed42[_0x4f4cfd]['isRemoved']&&0x0!=_0x65ed42[_0x4f4cfd]['distance']&&(_0x65ed42[_0x4f4cfd]['isIncorrect']=!0x0,_0x1c163b['add'](_0x65ed42[_0x4f4cfd]['pairId'])),_0x4f4cfd--;}}}return _0x65ed42['filter'](_0x585b6f=>!_0x585b6f['isIncorrect']);}['_removeUnsupportedChanges'](_0x48779e){const _0x5c04cd=this['editor']['model']['schema'];for(let _0x222954=0x0;_0x222954<_0x48779e['length'];_0x222954++){if(!(_0x48779e[_0x222954]['isAdded']||_0x48779e[_0x222954]['isAddSuggestion']||_0x48779e[_0x222954]['isRemoved']||_0x48779e[_0x222954]['isRemoveSuggestion']))continue;if(0x0==_0x48779e[_0x222954]['distance'])continue;const _0x62b4d4=_0x48779e[_0x222954]['item'];_0x5c04cd['isBlock'](_0x62b4d4)||_0x5c04cd['isLimit'](_0x62b4d4)||(_0x48779e[_0x222954]['isAdded']&&delete _0x48779e[_0x222954]['isAdded'],_0x48779e[_0x222954]['isAddSuggestion']&&delete _0x48779e[_0x222954]['isAddSuggestion'],_0x48779e[_0x222954]['isRemoveSuggestion']&&delete _0x48779e[_0x222954]['isRemoveSuggestion'],_0x48779e[_0x222954]['isRemoved']&&(_0x48779e[_0x222954]['isIncorrect']=!0x0));}return _0x48779e['filter'](_0x2b25e2=>!_0x2b25e2['isIncorrect']);}['_makeModelFromTape'](_0x2c4a29,_0x2176bb,_0xb091f8){const _0x87e5e0=new _0x6fdf77(),_0x189ab5=[],_0x557732=new Map(),_0x53fb38=this['editor']['model'],_0x5d133b=_0x53fb38['schema'],_0x2cbebb=[_0x87e5e0],_0x4a746e={},_0x3e1bf9={'isAdded':[],'isRemoved':[],'isAddSuggestion':[],'isRemoveSuggestion':[]};let _0x51afe3=null;const _0x4959a6=[0x0];for(let _0x1ff917=0x0;_0x1ff917<_0x2c4a29['length'];_0x1ff917++)if('elementStart'===_0x2c4a29[_0x1ff917]['type']){_0x2c4a29[_0x1ff917]['previousPosition']=_0x53fb38['createPositionFromPath'](_0x87e5e0,_0x4959a6);const _0x358bf0=new _0x6df636(_0x2c4a29[_0x1ff917]['item']['name'],_0x2c4a29[_0x1ff917]['item']['getAttributes']());_0x2cbebb[0x0]['_appendChild'](_0x358bf0),_0x4959a6['push'](0x0),_0x2cbebb['unshift'](_0x358bf0),_0x2c4a29[_0x1ff917]['nextPosition']=_0x53fb38['createPositionFromPath'](_0x87e5e0,_0x4959a6);}else'elementEnd'===_0x2c4a29[_0x1ff917]['type']?(_0x2cbebb['shift'](),_0x2c4a29[_0x1ff917]['previousPosition']=_0x53fb38['createPositionFromPath'](_0x87e5e0,_0x4959a6),_0x4959a6['pop'](),_0x4959a6[_0x4959a6['length']-0x1]++,_0x2c4a29[_0x1ff917]['nextPosition']=_0x53fb38['createPositionFromPath'](_0x87e5e0,_0x4959a6)):(_0x2c4a29[_0x1ff917]['previousPosition']=_0x53fb38['createPositionFromPath'](_0x87e5e0,_0x4959a6),_0x51afe3?_0x51afe3['_data']+=_0x2c4a29[_0x1ff917]['item']['data']:_0x51afe3=new _0x4f4154(_0x2c4a29[_0x1ff917]['item']['data'],_0x2c4a29[_0x1ff917]['item']['getAttributes']()),_0x2c4a29[_0x1ff917+0x1]&&'text'===_0x2c4a29[_0x1ff917+0x1]['type']&&_0x4b4d6b(_0x51afe3,_0x2c4a29[_0x1ff917+0x1]['item'])||(_0x2cbebb[0x0]['_appendChild'](_0x51afe3),_0x51afe3=null),_0x4959a6[_0x4959a6['length']-0x1]+=_0x2c4a29[_0x1ff917]['item']['offsetSize'],_0x2c4a29[_0x1ff917]['nextPosition']=_0x53fb38['createPositionFromPath'](_0x87e5e0,_0x4959a6));for(let _0x4037fe=0x0;_0x4037fe<_0x2c4a29['length'];_0x4037fe++){const _0x5afcad=_0x2c4a29[_0x4037fe]['previousPosition'],_0x3343f1=_0x2c4a29[_0x4037fe]['nextPosition'];for(const _0x559105 of _0x2c4a29[_0x4037fe]['markersStart'])_0x557732['set'](_0x559105,{'start':_0x5afcad,'end':null});_0x13021b('isRemoveSuggestion',_0x4037fe,_0x5afcad,_0x3343f1),_0x13021b('isAddSuggestion',_0x4037fe,_0x5afcad,_0x3343f1),_0x13021b('isRemoved',_0x4037fe,_0x5afcad,_0x3343f1),_0x13021b('isAdded',_0x4037fe,_0x5afcad,_0x3343f1);for(const _0x42986a of _0x2c4a29[_0x4037fe]['markersEnd']){const _0x2bfcd1=_0x557732['get'](_0x42986a);_0x2bfcd1?_0x2bfcd1['end']=_0x3343f1:_0x557732['set'](_0x42986a,{'start':_0x3343f1,'end':_0x3343f1});}}for(const [_0xad6b05,_0x463b3d]of _0x557732){const _0x3a8476=this['editor']['model']['createRange'](_0x463b3d['start'],_0x463b3d['end']);_0x87e5e0['markers']['set'](_0xad6b05,_0x3a8476);}return _0x189ab5['sort']((_0x2e008d,_0x37c106)=>{const _0x2611f9=_0x87e5e0['markers']['get']('revision:'+_0x2e008d['id']),_0x37201c=_0x87e5e0['markers']['get']('revision:'+_0x37c106['id']);return _0x2611f9['start']['isBefore'](_0x37201c['start'])?-0x1:_0x2611f9['start']['isAfter'](_0x37201c['start'])?0x1:_0x2611f9['end']['isBefore'](_0x37201c['end'])?-0x1:_0x2611f9['end']['isAfter'](_0x37201c['end'])?0x1:'add'===_0x2e008d['type']?-0x1:0x1;}),{'root':_0x87e5e0,'changes':_0x189ab5};function _0x13021b(_0x5a4e80,_0x2a089d,_0x56dd34,_0x515a4f){const _0x85cb2f=!!_0x2c4a29[_0x2a089d][_0x5a4e80],_0x294e84=_0x85cb2f?_0x2c4a29[_0x2a089d][_0x5a4e80]['userId']:null,_0x51e049=_0x2a089d===_0x2c4a29['length']-0x1,_0x4856fa=_0x3e1bf9[_0x5a4e80][0x0],_0x5c8c96=_0x5d133b['isObject'](_0x2c4a29[_0x2a089d]['item']);!_0x4a746e[_0x5a4e80]&&_0x85cb2f?_0x4a746e[_0x5a4e80]={'start':_0x56dd34,'tapeItem':_0x2c4a29[_0x2a089d],'userId':_0x294e84,'type':_0x5a4e80}:_0x4a746e[_0x5a4e80]&&!_0x85cb2f?(_0x4a746e[_0x5a4e80]['end']=_0x56dd34,_0x23f130(_0x4a746e[_0x5a4e80]),_0x4a746e[_0x5a4e80]=null):_0x4a746e[_0x5a4e80]&&_0x85cb2f&&_0x4a746e[_0x5a4e80]['userId']!==_0x294e84&&(_0x4a746e[_0x5a4e80]['end']=_0x56dd34,_0x4856fa&&_0x4856fa['userId']===_0x4a746e[_0x5a4e80]['userId']||_0x23f130(_0x4a746e[_0x5a4e80]),_0x4a746e[_0x5a4e80]={'start':_0x56dd34,'tapeItem':_0x2c4a29[_0x2a089d],'userId':_0x294e84,'type':_0x5a4e80}),_0x4a746e[_0x5a4e80]&&_0x5c8c96&&('elementStart'!==_0x2c4a29[_0x2a089d]['type']||_0x4856fa&&_0x4856fa['userId']===_0x294e84||_0x3e1bf9[_0x5a4e80]['unshift']({'userId':_0x294e84,'object':_0x2c4a29[_0x2a089d]['item'],'change':_0x4a746e[_0x5a4e80]}),'elementEnd'===_0x2c4a29[_0x2a089d]['type']&&_0x4856fa&&_0x4856fa['object']===_0x2c4a29[_0x2a089d]['item']&&(_0x3e1bf9[_0x5a4e80]['shift'](),_0x4a746e[_0x5a4e80]=_0x4856fa['change'])),_0x4a746e[_0x5a4e80]&&_0x51e049&&(_0x4a746e[_0x5a4e80]['end']=_0x515a4f,_0x23f130(_0x4a746e[_0x5a4e80]),_0x4a746e[_0x5a4e80]=null);}function _0x23f130({start:_0x30f18b,end:_0x2aa80f,tapeItem:_0x419315,userId:_0x1d55b3,type:_0x38e59b}){const _0x286302=_0x419315['item'],_0xb47b9f=_0x53fb38['schema']['isBlock'](_0x286302)&&!_0x53fb38['schema']['isLimit'](_0x286302),_0x42470c=_0x30f18b['nodeAfter']==_0x2aa80f['parent']&&_0x2aa80f['isAtStart'];if(_0xb47b9f&&_0x42470c)return;const _0x290546=_0x53fb38['createRange'](_0x30f18b,_0x2aa80f),_0x5e1525=_0x2176bb['get'](_0x1d55b3),_0x4b26ba=new G({'author':_0x5e1525,'type':'isAdded'==_0x38e59b||'isAddSuggestion'==_0x38e59b?'add':'remove','data':{'isSuggestion':'isAddSuggestion'==_0x38e59b||'isRemoveSuggestion'==_0x38e59b},'createdAt':new Date(),'rootName':_0xb091f8});_0x189ab5['push'](_0x4b26ba),_0x87e5e0['markers']['set']('revision:'+_0x4b26ba['id'],_0x290546);}function _0x4b4d6b(_0x462d3b,_0x36940f){const _0x299265=_0x462d3b['getAttributes'](),_0x29a436=_0x36940f['getAttributes']();for(const _0x55c936 of _0x299265){if(_0x55c936[0x1]!==_0x36940f['getAttribute'](_0x55c936[0x0]))return!0x1;_0x29a436['next']();}return _0x29a436['next']()['done'];}}['_setConversion'](){this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision','view':_0x42ae1e=>{const _0xe9d0c4=_0x42ae1e['markerName']['split'](':')[0x1],_0x58a14a=this['_getChangeFromId'](_0xe9d0c4);if(!_0x58a14a)return null;const _0x4b2a4d='add'==_0x58a14a['type']?'insertion':'deletion',_0xa3cb99=['ck-suggestion-marker','ck-suggestion-marker-'+_0x4b2a4d];return _0x58a14a['data']['isSuggestion']&&_0xa3cb99['push']('ck-suggestion-marker-'+_0x4b2a4d+'-new'),this['activeChange']==_0x58a14a&&_0xa3cb99['push']('ck-suggestion-marker--active'),{'classes':_0xa3cb99,'attributes':{'data-change-id':_0xe9d0c4}};}}),this['editor']['conversion']['for']('upcast')['add'](_0xb1ad91=>{_0xb1ad91['on']('element:pre',(_0x50e194,_0x5d502b,_0x427521)=>{const _0x186d86=_0x5d502b['viewItem']['getChild'](0x0);if(!_0x186d86||!_0x186d86['is']('element','code'))return;if(!_0x427521['consumable']['consume'](_0x186d86,{'attributes':['vid_start','vid_end']}))return;const _0x53db9c=_0x5d502b['modelRange']['start']['nodeAfter'];_0x427521['writer']['setAttribute']('vid_start',_0x186d86['getAttribute']('vid_start'),_0x53db9c),_0x427521['writer']['setAttribute']('vid_end',_0x186d86['getAttribute']('vid_end'),_0x53db9c);},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['add'](_0x36fd7a=>{_0x36fd7a['on']('element',(_0x5e0517,_0x10ba65,_0x12bcd9)=>{if(!_0x12bcd9['consumable']['consume'](_0x10ba65['viewItem'],{'attributes':['vid_start','vid_end']}))return;if(_0x10ba65['modelRange']['isCollapsed'])return;const _0x2198a8=_0x10ba65['modelRange']['start']['nodeAfter'];_0x2198a8['hasAttribute']('vid_start')||_0x2198a8['hasAttribute']('vid')||(_0x12bcd9['writer']['setAttribute']('vid_start',_0x10ba65['viewItem']['getAttribute']('vid_start'),_0x2198a8),_0x12bcd9['writer']['setAttribute']('vid_end',_0x10ba65['viewItem']['getAttribute']('vid_end'),_0x2198a8));},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['elementToAttribute']({'view':{'name':'span','attributes':{'vid':!0x0}},'model':{'key':'vid','value':_0x461cd2=>_0x461cd2['getAttribute']('vid')}}),this['editor']['model']['schema']['on']('checkAttribute',(_0x51df20,[,_0x1854be])=>{['vid_start','vid_end','vid']['includes'](_0x1854be)&&(_0x51df20['return']=!0x0,_0x51df20['stop']());},{'priority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['add'](_0xa95ef6=>{_0xa95ef6['on']('attribute:vid',(_0xb3ea86,_0x2cfd16,_0x3ee537)=>{if('\x20'!=_0x2cfd16['item']['data']||_0x2cfd16['item']['parent']['maxOffset']>0x1)return;if(!_0x3ee537['consumable']['consume'](_0x2cfd16['item'],_0xb3ea86['name']))return;const _0x510438=_0x3ee537['writer'],_0x1eeeeb=_0x3ee537['mapper']['toViewRange'](_0x2cfd16['range']);_0x510438['wrap'](_0x1eeeeb,_0x510438['createAttributeElement']('span'));});}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',function(_0x3b53e3){const _0x122fbd=_0x3b53e3['plugins']['get']('RevisionViewer');return(_0x5c8bba,_0x3d6ed1,_0x56c46b)=>{const _0x4dd6cd=_0x3d6ed1['markerName']['split'](':')[0x1],_0x149cd2=_0x122fbd['_getChangeFromId'](_0x4dd6cd);if(!_0x149cd2)return null;const _0x1a7cbb='add'==_0x149cd2['type']?'split':'merge';if(!_0x56c46b['consumable']['test'](_0x3d6ed1['markerRange'],_0x5c8bba['name']))return;const _0x4f0a51=_0x3d6ed1['markerRange']['getWalker'](),_0x4b23be=_0x3d6ed1['markerRange']['start'],_0x69524=_0x3b53e3['model']['schema'];let _0x485afd=null,_0x2bb136=null,_0x3988d2=!0x1,_0x48d832=!0x1;for(const _0x24b23c of _0x4f0a51){const _0x1a82aa=_0x24b23c['item'];_0x3988d2=_0x3988d2||_0x69524['isContent'](_0x1a82aa);const _0x4512f0=_0x56c46b['mapper']['toViewElement'](_0x1a82aa);if(_0x4512f0&&_0x4512f0['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x24b23c['type']&&(_0x69524['isBlock'](_0x1a82aa)&&!_0x69524['isLimit'](_0x1a82aa)&&(_0x1a82aa['nextSibling']||_0x4b23be['isAtEnd']?_0x485afd&&_0x485afd['parent']==_0x1a82aa||(_0x485afd=_0x1a82aa,_0x49252e(_0x24b23c['previousPosition']),_0x48d832=!0x0):_0x2bb136=_0x2bb136||_0x24b23c['previousPosition']));}function _0x49252e(_0x484a0a){const _0x26026a=_0x56c46b['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x1a7cbb}),_0x13cacc=_0x56c46b['mapper']['toViewPosition'](_0x484a0a);_0x149cd2['data']['isSuggestion']&&_0x56c46b['writer']['addClass']('ck-suggestion-marker-'+_0x1a7cbb+'-new',_0x26026a),_0x122fbd['activeChange']==_0x149cd2&&_0x56c46b['writer']['addClass']('ck-suggestion-marker--active',_0x26026a),_0x56c46b['writer']['insert'](_0x13cacc,_0x26026a),_0x56c46b['mapper']['bindElementToMarker'](_0x26026a,_0x3d6ed1['markerName']);}_0x3988d2||_0x48d832||!_0x2bb136||_0x49252e(_0x2bb136);};}(this['editor']),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision',(_0x13f0e8,_0x32ebc7,_0x17e6a5)=>{const _0x5bd715=_0x17e6a5['mapper']['markerNameToElements'](_0x32ebc7['markerName']);if(_0x5bd715){for(const _0x258468 of _0x5bd715)(_0x258468['hasClass']('ck-suggestion-marker-split')||_0x258468['hasClass']('ck-suggestion-marker-merge'))&&(_0x17e6a5['mapper']['unbindElementFromMarkerName'](_0x258468,_0x32ebc7['markerName']),_0x17e6a5['writer']['remove'](_0x258468));}},{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',(_0x1ce64e,_0x11c182,_0x4c34c1)=>{const _0x2ba1f1=_0x11c182['markerName']['split'](':')[0x1],_0xe53d60=this['_getChangeFromId'](_0x2ba1f1);if(!_0xe53d60)return null;const _0x1a46b8='add'==_0xe53d60['type']?'split':'merge';if(_0x4c34c1['consumable']['test'](_0x11c182['markerRange'],_0x1ce64e['name']))for(const _0xacbee of _0x11c182['markerRange']['getItems']()){if(!_0xacbee['is']('element','softBreak'))continue;const _0x3a506d=_0x4c34c1['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x1a46b8}),_0x3d3079=_0x4c34c1['mapper']['toViewPosition'](this['editor']['model']['createPositionBefore'](_0xacbee));_0xe53d60['data']['isSuggestion']&&_0x4c34c1['writer']['addClass']('ck-suggestion-marker-'+_0x1a46b8+'-new',_0x3a506d),this['activeChange']==_0xe53d60&&_0x4c34c1['writer']['addClass']('ck-suggestion-marker--active',_0x3a506d),_0x4c34c1['writer']['insert'](_0x3d3079,_0x3a506d),_0x4c34c1['mapper']['bindElementToMarker'](_0x3a506d,_0x11c182['markerName']);}},{'priority':'high'}),this['editor']['model']['document']['on']('change',()=>{this['editor']['editing']['view']['change'](_0xf8349e=>{for(const _0x5b0d59 of this['editor']['model']['document']['getRootNames']()){const _0x409161=this['editor']['model']['document']['getRoot'](_0x5b0d59),_0x1cbf80=this['editor']['editing']['view']['document']['getRoot'](_0x5b0d59);if(_0x1cbf80){const _0x216ec3=_0x409161['getAttribute']('revisionHistoryAttachChange');if(_0xf8349e['removeAttribute']('data-change-id',_0x1cbf80),_0xf8349e['removeClass']('ck-revision-history-root-add',_0x1cbf80),_0xf8349e['removeClass']('ck-revision-history-root-remove',_0x1cbf80),_0xf8349e['removeClass']('ck-revision-history-root--active',_0x1cbf80),_0x216ec3){const _0x471041=this['_getChangeFromId'](_0x216ec3);if(!_0x471041)return null;_0xf8349e['setAttribute']('data-change-id',_0x216ec3,_0x1cbf80),_0xf8349e['addClass']('ck-revision-history-root-'+_0x471041['type'],_0x1cbf80),this['activeChange']==_0x471041&&_0xf8349e['addClass']('ck-revision-history-root--active',_0x1cbf80);}}}});}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'comment','model':_0x58f51b=>'revision-comment:'+_0x58f51b,'converterPriority':'highest'}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'suggestion','model':_0x38663c=>'revision-suggestion:'+_0x38663c,'converterPriority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision-suggestion','view':_0x501702=>({'name':'suggestion:'+_0x501702,'group':'revision-suggestion'}),'converterPriority':'highest'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-suggestion','view':_0x4ba624=>{const _0x24fae4=_0x4ba624['markerName']['split'](':')[0x1];return'insertion'!=_0x24fae4&&'deletion'!=_0x24fae4?null:{'classes':['ck-suggestion-preview-marker','ck-suggestion-preview-marker-'+_0x24fae4]};}}),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',(_0x1dc7f2,_0x34268a,_0xb93ab7)=>{const _0x1eeee4=_0xb93ab7['mapper']['markerNameToElements'](_0x34268a['markerName']);if(_0x1eeee4){for(const _0x524fbe of _0x1eeee4)_0x524fbe['is']('uiElement')&&(_0xb93ab7['mapper']['unbindElementFromMarkerName'](_0x524fbe,_0x34268a['markerName']),_0xb93ab7['writer']['remove'](_0x524fbe));}},{'priority':'high'});}['_getChangeFromId'](_0x2b68b6){return this['_changeIdToChange']['get'](_0x2b68b6);}['_getViewForChange'](_0x3ec448){return this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=new z(this['editor']['locale'],_0x3ec448),this['_changeView'];}['_initInteractions'](){this['editor']['model']['document']['selection']['observeMarkers']('revision'),this['on']('change:activeView',(_0x375a52,_0x17b39f,_0x34cfb7,_0x5ba5e)=>{_0x5ba5e&&this['_balloon']['remove'](_0x5ba5e),_0x34cfb7&&(this['_balloon']['add']({'view':_0x34cfb7,'stackId':'revisionHistoryLabel','position':{'target':()=>{const _0x226655=this['editor']['editing'],_0x3ed9cd=this['_getChangeFromId'](_0x34cfb7['changeId']);let _0x274c6c;if(_0x3ed9cd['data']['isOnRoot']){const _0xbdc96=_0x226655['view']['getDomRoot'](_0x3ed9cd['rootName']);_0x274c6c=Array['from'](_0xbdc96['getClientRects']());}else{const _0x53a04c=this['editor']['model']['markers']['get']('revision:'+_0x34cfb7['changeId']);_0x274c6c=Array['from'](_0x226655['mapper']['markerNameToElements'](_0x53a04c['name']))['map'](_0x21fca1=>_0x226655['view']['domConverter']['mapViewToDom'](_0x21fca1))['map'](_0x2f3e4d=>Array['from'](_0x2f3e4d['getClientRects']()))['flat']();}if(!this['_activeViewTarget'])return _0x274c6c[0x0];return _0x274c6c['find'](_0x32b07f=>_0x32b07f['top']-0x3<=this['_activeViewTarget']['y']&&_0x32b07f['bottom']+0x3>=this['_activeViewTarget']['y']&&_0x32b07f['left']-0x3<=this['_activeViewTarget']['x']&&_0x32b07f['right']+0x3>=this['_activeViewTarget']['x'])||_0x274c6c[0x0];}}}),this['_balloon']['showStack']('revisionHistoryLabel'));}),this['on']('change:activeChange',(_0x322f59,_0x2f43a8,_0x3e82f7,_0x2da105)=>{this['activeView']=_0x3e82f7?this['_getViewForChange'](_0x3e82f7):null,this['editor']['model']['change'](()=>{const _0x105665=this['editor']['editing'];_0x2da105&&(_0x2da105['data']['isOnRoot']?_0x105665['view']['change'](_0x2f2dea=>{_0x2f2dea['removeClass']('ck-revision-history-root--active',_0x105665['view']['document']['getRoot'](_0x2da105['rootName']));}):_0x105665['reconvertMarker']('revision:'+_0x2da105['id'])),_0x3e82f7&&(_0x3e82f7['data']['isOnRoot']?_0x105665['view']['change'](_0x3baad7=>{_0x3baad7['addClass']('ck-revision-history-root--active',_0x105665['view']['document']['getRoot'](_0x3e82f7['rootName']));}):_0x105665['reconvertMarker']('revision:'+_0x3e82f7['id']));});}),this['listenTo'](this['editor']['editing']['view']['document'],'mouseover',(_0x34d689,_0x75530e)=>{if(this['activeChange'])return;const _0x10a4a3=this['_findChangeIdFromDomTarget'](_0x75530e['target']),_0x46d3b8=this['_changeIdToChange']['get'](_0x10a4a3);_0x46d3b8?(this['_activeViewTarget']={'x':_0x75530e['domEvent']['x'],'y':_0x75530e['domEvent']['y']},this['activeView']=this['_getViewForChange'](_0x46d3b8)):(this['_activeViewTarget']=null,this['activeView']=null);}),this['listenTo'](this['editor']['editing']['view']['document'],'mousedown',(_0x129953,_0x164f28)=>{const _0x2feb96=this['_findChangeIdFromDomTarget'](_0x164f28['target']),_0x5d4ba7=this['_changeIdToChange']['get'](_0x2feb96);_0x5d4ba7?(this['_activeViewTarget']={'x':_0x164f28['domEvent']['x'],'y':_0x164f28['domEvent']['y']},_0x5d4ba7===this['activeChange']?this['_balloon']['updatePosition']():this['activeChange']=_0x5d4ba7):(this['_activeViewTarget']=null,this['activeChange']=null);});}['_findChangeIdFromDomTarget'](_0x5c79c2){do{const _0x114a9d=_0x5c79c2['getAttribute']('data-change-id');if(_0x114a9d)return _0x114a9d;_0x5c79c2=_0x5c79c2['parent'];}while(_0x5c79c2);return null;}['_cleanMarkers'](){this['editor']['model']['change'](_0x42057e=>{for(const _0x2a4f7b of this['editor']['model']['markers'])_0x42057e['removeMarker'](_0x2a4f7b);});}}function Q(_0x343474,_0x18dd45){return(_0x189c4e,_0x16da69,_0x3c509d)=>{if(!_0x3c509d['consumable']['test'](_0x16da69['markerRange'],_0x189c4e['name']))return;const _0x3d5987=_0x16da69['markerRange']['getWalker'](),_0xa98179=_0x16da69['markerRange']['start'],_0x39dbab=_0x343474['model']['schema'];let _0x1aa0e0=null,_0x272a63=null,_0x5b0510=!0x1,_0x374c8e=!0x1;for(const _0x34aa19 of _0x3d5987){const _0x25d3fb=_0x34aa19['item'];_0x5b0510=_0x5b0510||_0x39dbab['isContent'](_0x25d3fb);const _0x124269=_0x3c509d['mapper']['toViewElement'](_0x25d3fb);if(_0x124269&&_0x124269['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x34aa19['type']&&(_0x39dbab['isBlock'](_0x25d3fb)&&!_0x39dbab['isLimit'](_0x25d3fb)&&(_0x25d3fb['nextSibling']||_0xa98179['isAtEnd']?_0x1aa0e0&&_0x1aa0e0['parent']==_0x25d3fb||(_0x1aa0e0=_0x25d3fb,_0x45d355(_0x34aa19['previousPosition']),_0x374c8e=!0x0):_0x272a63=_0x272a63||_0x34aa19['previousPosition']));}function _0x45d355(_0x33344c){const _0x5699c9=_0x3c509d['mapper']['toViewPosition'](_0x33344c),_0x4b556a=_0x3c509d['writer']['createUIElement']('span',{'class':'ck-suggestion-preview-marker-'+_0x18dd45});_0x3c509d['writer']['insert'](_0x5699c9,_0x4b556a),_0x3c509d['mapper']['bindElementToMarker'](_0x4b556a,_0x16da69['markerName']);}_0x5b0510||_0x374c8e||!_0x272a63||_0x45d355(_0x272a63);};}class nt extends _0x595b62{constructor(_0xe78ad7){super(_0xe78ad7);const _0x478471=_0xe78ad7['plugins']['get'](u);this['affectsData']=!0x1,this['listenTo'](_0x478471,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x478471,'change:isEnabled',()=>this['refresh']());}['execute'](){const _0x9afa11=this['editor'],_0x3e0621=_0x9afa11['plugins']['get'](u),_0x1a7f3a=_0x3e0621['isReady']?_0x3e0621['diff']['newRevisionId']:null;_0x9afa11['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x1a7f3a);}['refresh'](){const {isReady:_0x4cecf5,isEnabled:_0x3e7f45,repository:_0x162d69,diff:_0x2c4b36}=this['editor']['plugins']['get'](u),_0x44f787=_0x2c4b36&&_0x162d69['getLaterVisibleRevision'](_0x2c4b36['newRevisionId']);this['isEnabled']=_0x4cecf5&&_0x3e7f45&&Boolean(_0x44f787);}}class ot extends _0x595b62{['_step'];constructor(_0x319e7f,{direction:_0x1590a3}){super(_0x319e7f);const _0x58d841=_0x319e7f['plugins']['get'](u);this['affectsData']=!0x1,this['_step']='forward'===_0x1590a3?0x1:-0x1,this['listenTo'](_0x58d841,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x58d841,'change:isEnabled',()=>this['refresh']()),this['listenTo'](_0x58d841,'change:activeChange',()=>this['refresh']());}['execute'](){const _0x4d255e=this['editor'],_0x4e7b5e=_0x4d255e['plugins']['get'](u),{isNavigationMode:_0x40f320,currentChangeNumber:_0x1dc31e}=_0x4e7b5e;let _0x266023;if(_0x4e7b5e['activeChange']=_0x40f320?_0x4e7b5e['diff']['changes']['get'](_0x1dc31e+this['_step']):_0x4e7b5e['diff']['changes']['first'],_0x4e7b5e['activeChange']['data']['isOnRoot'])_0x266023=_0x4d255e['editing']['view']['getDomRoot'](_0x4e7b5e['activeChange']['rootName']);else{const _0x2dc54a=_0x4d255e['model']['markers']['get']('revision:'+_0x4e7b5e['activeChange']['id']);_0x266023=_0x117af5(_0x4d255e['editing'],_0x2dc54a);}_0x4bda77({'target':_0x266023,'viewportOffset':0x28});}['refresh'](){const {isNavigationMode:_0x177213,currentChangeNumber:_0x575fb7,numberOfChanges:_0x535e8b,isReady:_0x3b8e7b,isEnabled:_0x539a07}=this['editor']['plugins']['get'](u);this['isEnabled']=!!(_0x539a07&&_0x3b8e7b&&_0x535e8b)&&(!_0x177213||(0x1===this['_step']?_0x575fb7<_0x535e8b-0x1:_0x575fb7>0x0));}}class pi extends _0x591820{constructor(_0x21de39){super(_0x21de39);const _0x4890ea=this['bindTemplate'],_0x5aef8e=new _0x2a9075(_0x21de39),_0x353a0c=new _0x2a9075(_0x21de39);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',(_0x1f98a3,_0x21288e)=>_0x1f98a3&&_0x21288e>0x0),this['bind']('_statusText')['to'](this,'isReady',this,'currentChangeNumber',this,'numberOfChanges',this,'isNavigationMode',(_0x32e81b,_0x1fbe4a,_0x19eb52,_0x11036e)=>{if(!_0x32e81b)return m(_0x21de39,'Loading...');if(!_0x19eb52)return m(_0x21de39,'No\x20changes');const _0x37807a=m(_0x21de39,'NUMBER_OF_CHANGES',_0x19eb52);return _0x11036e?m(_0x21de39,'X_OF_Y_CHANGES',[_0x1fbe4a+0x1,_0x19eb52]):_0x37807a;}),_0x5aef8e['set']({'label':m(_0x21de39,'Show\x20previous\x20change'),'tooltip':!0x0,'icon':_0x47bac8}),_0x353a0c['set']({'label':m(_0x21de39,'Show\x20next\x20change'),'tooltip':!0x0,'icon':_0x2ccb4b}),_0x5aef8e['bind']('isEnabled')['to'](this,'isBackwardNavigationEnabled'),_0x353a0c['bind']('isEnabled')['to'](this,'isForwardNavigationEnabled'),_0x5aef8e['on']('execute',()=>this['fire']('execute','backward')),_0x353a0c['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',_0x4890ea['if']('_isStatusLabelVisible','ck-hidden',_0x2010ae=>!_0x2010ae)]},'children':[{'text':_0x4890ea['to']('isNavigationMode',_0x464502=>_0x464502?m(_0x21de39,'EDIT_X_OF_Y_REVISIONS')+':\x20':m(_0x21de39,'Total')+':\x20')}]},{'text':_0x4890ea['to']('_statusText')}]},new _0x3fe94a(),{'tag':'div','attributes':{'class':['ck-revision-history-ui__changes-navigation__navigation']},'children':[_0x5aef8e,_0x353a0c]}]});}}const ge='ck-editor__editable__loading-overlay';class fi extends _0x1f60bb{static get['pluginName'](){return'RevisionViewerLoadingOverlay';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['show'](){const _0xa3fb1e=this['editor']['editing']['view'];_0xa3fb1e['change'](_0x1dfd55=>{for(const _0x2caa27 of _0xa3fb1e['document']['roots'])_0x1dfd55['addClass'](ge,_0x2caa27);});}['hide'](){const _0x1bef10=this['editor']['editing']['view'];_0x1bef10['change'](_0x4e2eae=>{for(const _0x12bccc of _0x1bef10['document']['roots'])_0x4e2eae['removeClass'](ge,_0x12bccc);});}}class v extends _0x1f60bb{static get['pluginName'](){return'RevisionViewerUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[u,fi];}['init'](){const _0xb68704=this['editor'],_0x363fe6=_0xb68704['plugins']['get'](u),_0x5360ae=_0xb68704['plugins']['get'](fi);_0xb68704['ui']['componentFactory']['add']('exitToEditing',_0x5d9175=>{const _0x19c245=new _0x2a9075(_0x5d9175);return _0x19c245['set']({'label':m(_0x5d9175,'Back\x20to\x20editing'),'icon':_0x49774b,'withText':!0x0,'tooltip':!0x0,'class':'ck-revision-history-ui__back-to-editing'}),this['listenTo'](_0x19c245,'execute',()=>{_0xb68704['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}),_0x19c245;}),_0xb68704['ui']['componentFactory']['add']('restoreRevision',_0x21c24f=>{const _0xeb1549=new _0x2a9075(_0x21c24f);return _0xeb1549['set']({'label':m(_0x21c24f,'Restore\x20this\x20revision'),'withText':!0x0,'tooltip':!0x0}),_0xeb1549['bind']('isEnabled')['to'](_0xb68704['commands']['get']('restoreRevision')),this['listenTo'](_0xeb1549,'execute',()=>_0xb68704['execute']('restoreRevision')),_0xeb1549;}),_0xb68704['ui']['componentFactory']['add']('changesNavigation',_0x2bb73c=>{const _0x22e155=new pi(_0x2bb73c),_0x531dec=_0xb68704['commands']['get']('showPreviousChange'),_0x397962=_0xb68704['commands']['get']('showNextChange');return _0x22e155['bind']('isBackwardNavigationEnabled')['to'](_0x531dec,'isEnabled'),_0x22e155['bind']('isForwardNavigationEnabled')['to'](_0x397962,'isEnabled'),_0x22e155['bind']('isReady','currentChangeNumber','numberOfChanges','isNavigationMode')['to'](_0x363fe6),this['listenTo'](_0x22e155,'execute',(_0x23d917,_0x34246b)=>{_0xb68704['execute']('forward'===_0x34246b?'showNextChange':'showPreviousChange');}),_0x22e155;}),_0x5360ae['show'](),_0x363fe6['on']('change:isReady',(_0x1f9730,_0x2b1db9,_0x183a66)=>{_0x183a66?_0x5360ae['hide']():_0x5360ae['show']();});}}class ki extends ti{['_resizeObserver']=null;constructor(_0x248537,_0x2ca2fe){super(_0x248537,_0x2ca2fe);const _0x2d0a1b=this['bindTemplate'];this['set']({'label':m(_0x248537,'Revision\x20name'),'_tooltipString':''}),this['fieldView']['placeholder']=m(_0x248537,'Enter\x20the\x20revision\x20name'),this['extendTemplate']({'tag':'span','attributes':{'class':['ck-revision-history-sidebar__revision-name'],'data-cke-tooltip-text':_0x2d0a1b['to']('_tooltipString'),'data-cke-tooltip-position':'s','data-cke-tooltip-class':'ck-tooltip_multi-line'}});}['render'](){super['render'](),this['_resizeObserver']=new et(this['fieldView']['element'],()=>this['_updateTooltipText']()),this['listenTo'](this['fieldView'],'input',()=>this['_updateTooltipText']());}['destroy'](){super['destroy'](),this['_resizeObserver']&&this['_resizeObserver']['destroy']();}['_updateTooltipText'](){const _0x529b25=this['fieldView']['element'];this['_tooltipString']=_0x529b25['scrollWidth']>_0x529b25['clientWidth']&&_0x529b25['value']||'';}}class yi extends _0x591820{constructor(_0x5c620d,_0x44a11e,_0x1aaf9f){super(_0x5c620d);const _0x46e48a=new _0xd1188e();_0x46e48a['set']({'content':_0x10ee10,'viewBox':'0\x200\x2011\x2010'});const _0x5b4d37=['ck','ck-revision-history-sidebar__revision-author'];_0x1aaf9f&&_0x5b4d37['push']('ck-revision-history-sidebar__revision-author_creator');const _0x7deadf=[{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__revision-author__name'],'title':m(_0x5c620d,_0x1aaf9f?'Revision\x20creator':'Revision\x20author')},'children':[_0x46e48a,_0x44a11e['name']]}];this['setTemplate']({'tag':'li','attributes':{'class':_0x5b4d37},'children':_0x7deadf});}}function ji(_0x5e4cdb,_0x42cb5a){const _0x50b09d=_0x5e4cdb['bindTemplate'],_0x1ae1f8=_0x5e4cdb['locale'],_0x249956=_0x26c648(_0x1ae1f8);_0x249956['panelPosition']='sw';const _0x9e6ff=function(_0x49ee23,_0x236b30){const _0x1895eb=function(_0x47b134,_0x39d1af){const _0x3767ec=_0x47b134['locale'],_0x5002f8={'Compare\x20against\x20selected':m(_0x3767ec,'Compare\x20against\x20selected'),'Name\x20this\x20revision':m(_0x3767ec,'Name\x20this\x20revision'),'Restore\x20this\x20revision':m(_0x3767ec,'Restore\x20this\x20revision')};return _0x39d1af['map'](_0x39d348=>{const _0x3742c1=_0x5002f8[_0x39d348['name']];return _0x3742c1&&_0x3742c1!==_0x39d348['name']&&(_0x39d348['name']=_0x3742c1),_0x39d348;});}(_0x49ee23,_0x236b30),_0x28f00e=new _0x5879da();for(const _0x410228 of _0x1895eb){const _0x4bf18f={'type':'button','model':new to({'label':_0x410228['name'],'class':_0x410228['class'],'withText':!0x0,'role':'menuitem','_action':_0x410228['action']})};_0x4bf18f['model']['bind']('isEnabled')['to'](_0x49ee23,'isActionsDropdownOpen',_0x2b4b3d=>'function'!=typeof _0x410228['isEnabled']||(!_0x2b4b3d||_0x410228['isEnabled'](_0x49ee23))),_0x28f00e['add'](_0x4bf18f);}return _0x28f00e;}(_0x5e4cdb,_0x42cb5a);return _0x5e4cdb['bind']('isActionsDropdownOpen')['to'](_0x249956,'isOpen'),_0x249956['buttonView']['set']({'label':m(_0x1ae1f8,'Show\x20more\x20items'),'tooltip':!0x0,'tooltipPosition':'sw','icon':_0x3b657f}),_0x249956['extendTemplate']({'attributes':{'class':['ck-revision-history-sidebar__revision__actions',_0x50b09d['if']('isActionsDropdownOpen','ck-on')]},'on':{'click':_0x50b09d['to'](_0x53f9e5=>_0x53f9e5['stopPropagation']())}}),_0x249956['on']('execute',_0x3caf80=>{_0x5e4cdb['isReady']&&'function'==typeof _0x3caf80['source']['_action']&&_0x3caf80['source']['_action'](_0x5e4cdb);}),_0x40f0d4(_0x249956,_0x9e6ff,{'role':'menu'}),_0x249956['listenTo'](_0x5e4cdb,'change:isActionsDropdownOpen',(_0x4eacf7,_0x2db7dc,_0x279105)=>{if(_0x279105)for(const _0x4af4e of _0x249956['listView']['items']){const _0x48905b=_0x4af4e['children']['first'],_0x2e3513=_0x42cb5a['find'](_0x216f7f=>_0x216f7f['action']===_0x48905b['_action'])['isVisible'];_0x4af4e['isVisible']=void 0x0===_0x2e3513||_0x2e3513(_0x5e4cdb);}}),_0x249956;}class ci extends/* #__PURE__ -- @preserve */
|
|
27
|
-
|
|
23
|
+
import{ObservableMixin as _0xd36abb,uid as _0x422234,Collection as _0xb670b4,logWarning as _0x4d0460,FocusTracker as _0x5e9135,KeystrokeHandler as _0x2dfea2,scrollViewportToShowTarget as _0x2ef4fe,ResizeObserver as ot,ElementReplacer as it,CKEditorError as _0x2c2824}from'@ckeditor/ckeditor5-utils/dist/index.js';import{cloneDeep as _0x4dcfba,set as _0xb5caca,unset as _0x490285,isEqual as _0x284f8e}from'es-toolkit/compat';import{Plugin as _0x2a9b7d,PendingActions as _0x153c11,Command as _0x30167c,ElementApiMixin as _0x25ed20,Editor as _0x3f7344}from'@ckeditor/ckeditor5-core/dist/index.js';import{Users as _0x58b4bf,getMarkerDomElement as _0x17a5a7,ConfirmMixin as _0x2a2f44,sanitizeEditorConfig as _0x23fc3b}from'ckeditor5-collaboration/dist/index.js';import{ViewContainerElement as _0x4e0505,ViewAttributeElement as _0x2743c8,ViewEmptyElement as _0x23abf1,ViewRawElement as _0x4ccddb,ViewUIElement as _0x3ec531,ViewDocumentFragment as _0x50d104,ViewText as _0x5a4e35,ViewElement as _0x2c11d4,ModelElement as _0x514734,ModelRange as _0xd9fa25,ModelPosition as _0x5dfb54,ModelDocumentFragment as _0x4acc47,ModelText as _0x299020}from'@ckeditor/ckeditor5-engine/dist/index.js';import{IconHistory as _0x1c8430,IconChevronUp as _0x158305,IconChevronDown as _0x921695,IconUndo as _0x1bee30,IconUser as _0x81b85e,IconThreeVerticalDots as _0x187a75}from'@ckeditor/ckeditor5-icons/dist/index.js';import{CssTransitionDisablerMixin as _0x3e4178,View as _0x2fbdbb,submitHandler as _0x509542,LabeledFieldView as et,createLabeledInputText as ti,createDropdown as _0x255985,ListView as _0x22e049,ListItemView as _0x57cc36,ButtonView as _0x4eab8d,MenuBarMenuView as _0x1f9121,MenuBarMenuListView as _0x27fd85,MenuBarMenuListItemView as _0x3b1214,MenuBarMenuListItemButtonView as _0x1c5f84,ContextualBalloon as _0x5348c1,ToolbarSeparatorView as _0x5b896a,IconView as _0x11835d,addListToDropdown as _0x3e03fc,UIModel as to,EditorUI as tt,normalizeToolbarConfig as st,BoxedEditorUIView as _0x365cb2,StickyPanelView as _0x4ad34d,ToolbarView as _0x532d93,InlineEditableUIView as te}from'@ckeditor/ckeditor5-ui/dist/index.js';import{DateTime as _0x5c8801}from'luxon';class I extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0xd36abb(){['id'];['creator'];['authors'];['diffData'];['toVersion'];['fromVersion'];['model'];constructor(_0x47d55c){super(),this['id']=_0x47d55c['id']||_0x422234(),this['creator']=_0x47d55c['creator']||null,this['authors']=_0x47d55c['authors']||[],this['diffData']=_0x47d55c['diffData']||null,this['toVersion']=_0x47d55c['toVersion']||0x0,this['fromVersion']=_0x47d55c['fromVersion']||0x0,this['set']('name',_0x47d55c['name']||''),this['set']('createdAt',_0x47d55c['createdAt']||new Date()),this['set']('attributes',_0x47d55c['attributes']||{});}['setName'](_0x1bd233){this['_update']({'name':_0x1bd233});}['setAttribute'](_0x315803,_0x24d50e){const _0x59209f=_0x4dcfba(this['attributes']);_0xb5caca(_0x59209f,_0x315803,_0x24d50e),this['_update']({'attributes':_0x59209f});}['removeAttribute'](_0x4ba287){const _0x23c359=_0x4dcfba(this['attributes']);_0x490285(_0x23c359,_0x4ba287),this['_update']({'attributes':_0x23c359});}['_update'](_0x58682c,_0x37d366=!0x1){let _0x48526=!0x1;const _0x9a0011={'id':this['id']},_0x5e979b=['name','createdAt','diffData','authors','attributes','toVersion','fromVersion','creatorId'];for(const _0x136ba8 of _0x5e979b){const _0x45b53f=_0x58682c[_0x136ba8];void 0x0!==_0x45b53f&&_0x45b53f!==this[_0x136ba8]&&(this[_0x136ba8]=_0x45b53f,_0x9a0011[_0x136ba8]=_0x45b53f,_0x48526=!0x0);}_0x48526&&(_0x9a0011['authors']&&(_0x9a0011['authorsIds']=_0x9a0011['authors']['map'](_0xf8c8bd=>_0xf8c8bd['id']),delete _0x9a0011['authors']),this['fire']('_update',_0x9a0011,_0x37d366));}['toJSON'](){return{'id':this['id'],'name':this['name'],'creatorId':this['creator']?this['creator']['id']:null,'authorsIds':this['authors']['map'](_0x395d54=>_0x395d54['id']),'diffData':this['diffData'],'createdAt':this['createdAt'],'attributes':this['attributes'],'fromVersion':this['fromVersion'],'toVersion':this['toVersion']};}}class S extends _0x2a9b7d{['_revisions'];static get['requires'](){return[_0x58b4bf];}static get['pluginName'](){return'RevisionsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get['length'](){return this['_revisions']['length'];}constructor(_0x49bbe4){super(_0x49bbe4),this['_revisions']=new _0xb670b4();}['afterInit'](){!async function(_0x17dcde){const _0x1b4a47=_0x558d81([0x73,0x47,0x36,0x35,0x43,0x72,0x6b,0x31,0x63,0x64,0x32,0x69,0x67,0x4c,0x4e,0x37,0x7a,0x49,0x45,0x41,0x59,0x6a,0x75,0x39,0x4a,0x33,0x68,0x62,0x50,0x42,0x74,0x6e,0x46,0x4d,0x78,0x51,0x66,0x34,0x48,0x77,0x5a,0x61,0x6c,0x30,0x71,0x54,0x53,0x56,0x4b,0x79,0x44,0x6d,0x6f,0x52,0x76,0x55,0x58,0x65,0x70,0x57,0x4f,0x38]),_0x46b3a6=0xeb829,_0x47b947=0x7374585f,_0x4fd353=0x73732e4f^_0x47b947,_0x4fe0c1=window[_0x558d81([0x44,0x61,0x74,0x65])][_0x558d81([0x6e,0x6f,0x77])](),_0x2984d9=_0x17dcde[_0x558d81([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x306aa3=new window[(_0x558d81([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2a8f28=>{_0x2984d9[_0x558d81([0x6f,0x6e,0x63,0x65])](_0x558d81([0x72,0x65,0x61,0x64,0x79]),_0x2a8f28);}),_0x18b374={[_0x558d81([0x6b,0x74,0x79])]:_0x558d81([0x45,0x43]),[_0x558d81([0x75,0x73,0x65])]:_0x558d81([0x73,0x69,0x67]),[_0x558d81([0x63,0x72,0x76])]:_0x558d81([0x50,0x2d,0x32,0x35,0x36]),[_0x558d81([0x78])]:_0x558d81([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]),[_0x558d81([0x79])]:_0x558d81([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]),[_0x558d81([0x61,0x6c,0x67])]:_0x558d81([0x45,0x53,0x32,0x35,0x36])},_0xda363=_0x2984d9[_0x558d81([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x558d81([0x67,0x65,0x74])](_0x558d81([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x577e78(){let _0x190b7f,_0x154cab=null,_0x36cb4c=null;try{if(_0xda363==_0x558d81([0x47,0x50,0x4c]))return _0x558d81([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x190b7f=_0x3f9035(),!_0x190b7f)return _0x558d81([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x190b7f[_0x558d81([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x36cb4c=_0xc3d6d5(_0x190b7f[_0x558d81([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x190b7f[_0x558d81([0x6a,0x74,0x69])])),await _0x4a3944()?_0x18c4c0()?_0x428b0f()?_0x558d81([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x5221b7()?(_0x190b7f[_0x558d81([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x558d81([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x154cab=_0x580564(_0x558d81([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x190b7f[_0x558d81([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x558d81([0x74,0x72,0x69,0x61,0x6c])&&(_0x154cab=_0x580564(_0x558d81([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x35219b()):_0x558d81([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x558d81([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x558d81([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x558d81([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x428b0f(){const _0x4c6944=[_0x558d81([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x558d81([0x74,0x72,0x69,0x61,0x6c])][_0x558d81([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x190b7f[_0x558d81([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x4fe0c1/0x3e8:0xe10*_0x4fd353;return _0x190b7f[_0x558d81([0x65,0x78,0x70])]<_0x4c6944;}function _0x18c4c0(){const _0x4e1e1f=_0x190b7f[_0x558d81([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x4e1e1f)return!0x1;if(_0x4e1e1f[_0x558d81([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x558d81([0x2a])))return!0x0;if(_0x4e1e1f[_0x558d81([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x558d81([0x52,0x48])))return!0x0;if(_0x4e1e1f[_0x558d81([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x558d81([0x52,0x52,0x48]))){if(_0x3d63b6())return!0x0;if(_0x57d9b0()||_0x41a01e())return!0x0;}return!0x1;}function _0x5221b7(){const _0x575031=_0x190b7f[_0x558d81([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x575031||0x0==_0x575031[_0x558d81([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x359655}=new URL(window[_0x558d81([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x575031[_0x558d81([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x359655))return!0x0;const _0x30718f=_0x359655[_0x558d81([0x73,0x70,0x6c,0x69,0x74])](_0x558d81([0x2e]));return _0x575031[_0x558d81([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x330ebe=>_0x330ebe[_0x558d81([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x558d81([0x2a])))[_0x558d81([0x6d,0x61,0x70])](_0x27cf97=>_0x27cf97[_0x558d81([0x73,0x70,0x6c,0x69,0x74])](_0x558d81([0x2e])))[_0x558d81([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x48bcfb=>_0x48bcfb[_0x558d81([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x30718f[_0x558d81([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x558d81([0x6d,0x61,0x70])](_0x37646f=>Array(_0x30718f[_0x558d81([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x37646f[_0x558d81([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x558d81([0x66,0x69,0x6c,0x6c])](_0x37646f[0x0]===_0x558d81([0x2a])?_0x558d81([0x2a]):'')[_0x558d81([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x37646f))[_0x558d81([0x73,0x6f,0x6d,0x65])](_0x50d97d=>_0x30718f[_0x558d81([0x65,0x76,0x65,0x72,0x79])]((_0x41a177,_0x3b3889)=>_0x50d97d[_0x3b3889]===_0x41a177||_0x50d97d[_0x3b3889]===_0x558d81([0x2a])));}function _0x35219b(){return _0x154cab&&_0x36cb4c?new window[(_0x558d81([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x4b1516,_0x35e8fe)=>{_0x154cab[_0x558d81([0x74,0x68,0x65,0x6e])](_0x4b1516,_0x35e8fe),_0x36cb4c[_0x558d81([0x74,0x68,0x65,0x6e])](_0x253209=>{_0x253209!=_0x558d81([0x56,0x61,0x6c,0x69,0x64])&&_0x4b1516(_0x253209);},_0x35e8fe);}):_0x154cab||_0x36cb4c||_0x558d81([0x56,0x61,0x6c,0x69,0x64]);}}function _0xc3d6d5(_0x3ecac8,_0x4e2767){return new window[(_0x558d81([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x1c84e2=>{if(_0x49f4c4())return _0x1c84e2(_0x558d81([0x56,0x61,0x6c,0x69,0x64]));_0x2bed61(),_0x2984d9[_0x558d81([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x558d81([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x446f42=!0x1;const _0x53518c=_0x422234();function _0x3f2e23(_0x5ced54){return!!_0x5ced54&&(typeof _0x5ced54===_0x558d81([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x5ced54===_0x558d81([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x5ced54[_0x558d81([0x74,0x68,0x65,0x6e])]===_0x558d81([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x5ced54[_0x558d81([0x63,0x61,0x74,0x63,0x68])]===_0x558d81([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0xcc0f91(_0x570b74){_0x3b6383(_0x570b74)[_0x558d81([0x74,0x68,0x65,0x6e])](_0x5e7da2=>{if(!_0x5e7da2||_0x5e7da2[_0x558d81([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x558d81([0x6f,0x6b]))return _0x558d81([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x19d290(_0x29110e(_0x53518c+_0x4e2767))!=_0x5e7da2[_0x558d81([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x558d81([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x558d81([0x56,0x61,0x6c,0x69,0x64]);})[_0x558d81([0x74,0x68,0x65,0x6e])](_0x3e8a51=>(_0x493096(),_0x3e8a51),()=>{const _0x448b68=_0x2f6ed8();return null==_0x448b68?(_0x493096(),_0x558d81([0x56,0x61,0x6c,0x69,0x64])):_0x558d81(_0x4fe0c1-_0x448b68>(0x5778dc5f^_0x47b947)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x558d81([0x74,0x68,0x65,0x6e])](_0x1c84e2)[_0x558d81([0x63,0x61,0x74,0x63,0x68])](()=>{_0x1c84e2(_0x558d81([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x5b4ead=0x7342b6df^_0x47b947;function _0x493096(){const _0x4fc0d4=_0x558d81([0x6c,0x6c,0x63,0x74,0x2d])+_0x19d290(_0x29110e(_0x3ecac8)),_0x39091c=_0x34fea2(_0x19d290(window[_0x558d81([0x4d,0x61,0x74,0x68])][_0x558d81([0x63,0x65,0x69,0x6c])](_0x4fe0c1/_0x5b4ead)));window[_0x558d81([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x558d81([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x4fc0d4,_0x39091c);}function _0x2f6ed8(){const _0x20432c=_0x558d81([0x6c,0x6c,0x63,0x74,0x2d])+_0x19d290(_0x29110e(_0x3ecac8)),_0x14a1ab=window[_0x558d81([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x558d81([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x20432c);return _0x14a1ab?window[_0x558d81([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x34fea2(_0x14a1ab),0x10)*_0x5b4ead:null;}function _0x3b6383(_0x49d309){return new window[(_0x558d81([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x47c63d,_0x540d6d)=>{_0x49d309[_0x558d81([0x74,0x68,0x65,0x6e])](_0x47c63d,_0x540d6d),window[_0x558d81([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x540d6d,0x73758c9f^_0x47b947);});}}_0x2984d9[_0x558d81([0x6f,0x6e])](_0x558d81([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x586af2,_0x112c8c)=>{if(_0x112c8c[0x0]!=_0x3ecac8)return _0x1c84e2(_0x558d81([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x112c8c[0x1]={..._0x112c8c[0x1],[_0x558d81([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x53518c};},{[_0x558d81([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x558d81([0x68,0x69,0x67,0x68])}),_0x2984d9[_0x558d81([0x6f,0x6e])](_0x558d81([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0xd41aa1=>{_0x3f2e23(_0xd41aa1[_0x558d81([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x446f42=!0x0,_0xcc0f91(_0xd41aa1[_0x558d81([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x558d81([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x558d81([0x6c,0x6f,0x77])}),_0x306aa3[_0x558d81([0x74,0x68,0x65,0x6e])](()=>{_0x446f42||_0x1c84e2(_0x558d81([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x49f4c4(){return _0x2984d9[_0x558d81([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x558d81([0x76,0x69,0x65,0x77])][_0x558d81([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x558d81([0x61,0x75,0x74,0x6f]);}function _0x2bed61(){_0x2984d9[_0x558d81([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x558d81([0x76,0x69,0x65,0x77])][_0x558d81([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x558d81([0x61,0x75,0x74,0x6f]);}}function _0x580564(_0x150349){const _0x5537d6=[new window[(_0x558d81([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x1f07ee=>setTimeout(_0x1f07ee,0x737d6693^_0x47b947)),_0x306aa3[_0x558d81([0x74,0x68,0x65,0x6e])](()=>new window[(_0x558d81([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x5e1692=>{const _0xe7ef98=0x73745858^_0x47b947,_0x576144=_0x17dcde[_0x558d81([0x5f,0x72,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x73])];function _0x21042a(){_0x576144[_0x558d81([0x6c,0x65,0x6e,0x67,0x74,0x68])]>=_0xe7ef98&&_0x5e1692();}_0x21042a(),_0x576144[_0x558d81([0x6f,0x6e])](_0x558d81([0x61,0x64,0x64]),_0x21042a);})),new window[(_0x558d81([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x5633dd=>{function _0x14b6a5(){for(const _0x3ae26b in window)if(window[_0x558d81([0x4e,0x75,0x6d,0x62,0x65,0x72])]['isNaN'](window[_0x558d81([0x4e,0x75,0x6d,0x62,0x65,0x72])](_0x3ae26b))&&window[_0x3ae26b]==_0x46b3a6)return _0x5633dd();_0x2984d9[_0x558d81([0x73,0x74,0x61,0x74,0x65])]!=_0x558d81([0x64,0x65,0x73,0x74,0x72,0x6f,0x79,0x65,0x64])&&window[_0x558d81([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x14b6a5,0x73744bd7^_0x47b947);}_0x64e30d(_0x558d81([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))&&_0x14b6a5();})];return window[_0x558d81([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x558d81([0x72,0x61,0x63,0x65])](_0x5537d6)[_0x558d81([0x74,0x68,0x65,0x6e])](()=>_0x150349);}async function _0x123b1d(){if(await _0x306aa3,_0x64e30d(_0x558d81([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))){const _0x263f26=_0x17dcde[_0x558d81([0x67,0x65,0x74,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])](0x0),_0xe591bd=_0x17dcde[_0x558d81([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])](_0x263f26[_0x558d81([0x69,0x64])]),_0x53bc7f=_0x31578b(_0x558d81([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]));return await _0x53bc7f[_0x558d81([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])](_0x263f26['id'],_0xe591bd?_0xe591bd['id']:null,!0x0),_0x53bc7f[_0x558d81([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x558d81([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x53bc7f[_0x558d81([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x53bc7f[_0x558d81([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])]=_0x59c530,void(_0x53bc7f[_0x558d81([0x5f,0x67,0x65,0x74,0x44,0x69,0x66,0x66])]=_0x59c530);}if(_0x64e30d(_0x558d81([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]))){const _0x50aab0=_0x31578b(_0x558d81([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]));_0x50aab0[_0x558d81([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x558d81([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x50aab0[_0x558d81([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x50aab0[_0x558d81([0x75,0x70,0x64,0x61,0x74,0x65])]=_0x59c530,_0x50aab0[_0x558d81([0x73,0x61,0x76,0x65,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])]=_0x59c530;}_0x2984d9[_0x558d81([0x6d,0x6f,0x64,0x65,0x6c])][_0x558d81([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x59c530,_0x2984d9[_0x558d81([0x6d,0x6f,0x64,0x65,0x6c])][_0x558d81([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x59c530,_0x2984d9[_0x558d81([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x558d81([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x3d63b6(){return _0x64e30d(_0x558d81([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x31578b(_0x558d81([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x558d81([0x73,0x74,0x61,0x74,0x65])]==_0x558d81([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x57d9b0(){return _0x64e30d(_0x558d81([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 _0x41a01e(){return _0x64e30d(_0x558d81([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x36cdf3(_0x1ed86c){const _0x3487ac=_0x7d8c4();_0x2984d9[_0x3487ac]=_0x558d81([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])+_0x1ed86c,_0x1ed86c[_0x558d81([0x65,0x6e,0x64,0x73,0x57,0x69,0x74,0x68])](_0x558d81([0x4c,0x69,0x6d,0x69,0x74]))&&(window[_0x7d8c4()]=_0x46b3a6),_0x1ed86c!=_0x558d81([0x56,0x61,0x6c,0x69,0x64])&&_0x123b1d();}function _0x7d8c4(){const _0x459bae=window[_0x558d81([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x558d81([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x558d81([0x6e,0x6f,0x77])]())[_0x558d81([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x558d81([0x2e]),'');let _0x47cd55=_0x558d81([0x73]);for(let _0x3ade41=0x0;_0x3ade41<_0x459bae[_0x558d81([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x3ade41+=0x2){let _0xdd4bc5=window[_0x558d81([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x459bae[_0x558d81([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x3ade41,_0x3ade41+0x2));_0xdd4bc5>=_0x1b4a47[_0x558d81([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0xdd4bc5-=_0x1b4a47[_0x558d81([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x47cd55+=_0x1b4a47[_0xdd4bc5];}return _0x47cd55;}function _0x3f9035(){const _0x5d0759=_0xda363[_0x558d81([0x73,0x70,0x6c,0x69,0x74])](_0x558d81([0x2e]));if(0x3!=_0x5d0759[_0x558d81([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x193cc7(_0x5d0759[0x1]);function _0x193cc7(_0x3e02c8){const _0x193400=_0x1a1e3c(_0x3e02c8);return _0x193400&&_0x637223()?_0x193400:null;function _0x637223(){const _0x212bcb=_0x193400[_0x558d81([0x6a,0x74,0x69])],_0x3bc87f=window[_0x558d81([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x212bcb[_0x558d81([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x212bcb[_0x558d81([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x2dc90c={..._0x193400,[_0x558d81([0x6a,0x74,0x69])]:_0x212bcb[_0x558d81([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x212bcb[_0x558d81([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x2dc90c[_0x558d81([0x76,0x63])],_0x29110e(_0x2dc90c)==_0x3bc87f;}}}async function _0x4a3944(){let _0x22ba06=!0x0;try{const _0x1cefa4=_0xda363[_0x558d81([0x73,0x70,0x6c,0x69,0x74])](_0x558d81([0x2e])),[_0x31ec9f,_0x1e697a,_0x36a76c]=_0x1cefa4;return _0x1ae0b9(_0x31ec9f),await _0x46447c(_0x31ec9f,_0x1e697a,_0x36a76c),_0x22ba06;}catch{return!0x1;}function _0x1ae0b9(_0x5503de){const _0x399c77=_0x1a1e3c(_0x5503de);_0x399c77&&_0x399c77[_0x558d81([0x61,0x6c,0x67])]==_0x558d81([0x45,0x53,0x32,0x35,0x36])||(_0x22ba06=!0x1);}async function _0x46447c(_0x55810e,_0x3d4e3e,_0x5ae172){const _0x2704d7=window[_0x558d81([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x558d81([0x66,0x72,0x6f,0x6d])](_0x2faac4(_0x5ae172),_0x17ad7a=>_0x17ad7a[_0x558d81([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x45f8e2=new window[(_0x558d81([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x558d81([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x55810e+_0x558d81([0x2e])+_0x3d4e3e),_0xf6db1=window[_0x558d81([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x558d81([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0xf6db1)return;const _0x463576=await _0xf6db1[_0x558d81([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x558d81([0x6a,0x77,0x6b]),_0x18b374,{[_0x558d81([0x6e,0x61,0x6d,0x65])]:_0x558d81([0x45,0x43,0x44,0x53,0x41]),[_0x558d81([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x558d81([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x558d81([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0xf6db1[_0x558d81([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x558d81([0x6e,0x61,0x6d,0x65])]:_0x558d81([0x45,0x43,0x44,0x53,0x41]),[_0x558d81([0x68,0x61,0x73,0x68])]:{[_0x558d81([0x6e,0x61,0x6d,0x65])]:_0x558d81([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x463576,_0x2704d7,_0x45f8e2)||(_0x22ba06=!0x1);}}function _0x1a1e3c(_0x4dbfc8){return _0x4dbfc8[_0x558d81([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x558d81([0x65,0x79]))?JSON[_0x558d81([0x70,0x61,0x72,0x73,0x65])](_0x2faac4(_0x4dbfc8)):null;}function _0x2faac4(_0x3a2492){return window[_0x558d81([0x61,0x74,0x6f,0x62])](_0x3a2492[_0x558d81([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x558d81([0x2b]))[_0x558d81([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x558d81([0x2f])));}function _0x29110e(_0x1c8028){let _0x4bed65=0x1505;function _0x565375(_0x3ee54f){for(let _0x492f77=0x0;_0x492f77<_0x3ee54f[_0x558d81([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x492f77++){const _0x507989=_0x3ee54f[_0x558d81([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x492f77);_0x4bed65=(_0x4bed65<<0x5)+_0x4bed65+_0x507989,_0x4bed65&=_0x4bed65;}}function _0x4446bc(_0x3dc42f){Array[_0x558d81([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x3dc42f)?_0x3dc42f[_0x558d81([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x4446bc):_0x3dc42f&&typeof _0x3dc42f==_0x558d81([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x558d81([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x3dc42f)[_0x558d81([0x73,0x6f,0x72,0x74])]()[_0x558d81([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x8e243a,_0x4a4c98])=>{_0x565375(_0x8e243a),_0x4446bc(_0x4a4c98);}):_0x565375(window[_0x558d81([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x3dc42f));}return _0x4446bc(_0x1c8028),_0x4bed65>>>0x0;}function _0x19d290(_0x3c6843){return _0x3c6843[_0x558d81([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x558d81([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x558d81([0x30]));}function _0x34fea2(_0x41603c){return _0x41603c[_0x558d81([0x73,0x70,0x6c,0x69,0x74])]('')[_0x558d81([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x558d81([0x6a,0x6f,0x69,0x6e])]('');}function _0x64e30d(_0x199b42){return _0x2984d9[_0x558d81([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x558d81([0x68,0x61,0x73])](_0x199b42);}function _0x31578b(_0x2bfddf){return _0x2984d9[_0x558d81([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x558d81([0x67,0x65,0x74])](_0x2bfddf);}function _0x59c530(){}function _0x558d81(_0x23ca0c){return _0x23ca0c['map'](_0x13c795=>String['fromCharCode'](_0x13c795))['join']('');}_0x36cdf3(await _0x577e78());}(this);}['createRevision'](_0x110e71){const _0x210b86=this['editor']['plugins']['get']('Users');return new I({'id':_0x110e71['id'],'name':_0x110e71['name'],'creator':_0x110e71['creatorId']?_0x210b86['getUser'](_0x110e71['creatorId']):null,'diffData':_0x110e71['diffData']||_0x110e71['data'],'authors':_0x110e71['authorsIds']['map'](_0x2b127a=>_0x210b86['getUser'](_0x2b127a)),'createdAt':new Date(_0x110e71['createdAt']),'attributes':_0x110e71['attributes'],'fromVersion':_0x110e71['fromVersion'],'toVersion':_0x110e71['toVersion']});}['addRevision'](_0x595f14,_0x2a427b=0x0){this['_revisions']['add'](_0x595f14,_0x2a427b);}['getRevision'](_0x843554){return this['_revisions']['get'](_0x843554);}['getRevisions'](_0x4de1d5={'toJSON':!0x1}){const _0x14f7f0=Array['from'](this['_revisions']);return _0x14f7f0['reverse'](),_0x4de1d5['toJSON']?_0x14f7f0['map'](_0x16de95=>_0x16de95['toJSON']()):_0x14f7f0;}['getIndex'](_0x5f3ff0){return this['_revisions']['getIndex'](_0x5f3ff0);}['getEarlierVisibleRevision'](_0x505af4){const [,_0x5af812]=this['getRevisionsIterator'](_0x505af4,{'direction':'earlier'});return _0x5af812;}['getLaterVisibleRevision'](_0xc3e169){const [,_0x3d3708]=this['getRevisionsIterator'](_0xc3e169,{'direction':'later'});return _0x3d3708;}['getRevisionsInDiff'](_0x4f5e86){const _0x1371ad=[];for(const _0x40e53e of this['getRevisionsIterator'](_0x4f5e86['newRevisionId']))if(_0x1371ad['push'](_0x40e53e),_0x40e53e['id']===_0x4f5e86['oldRevisionId'])break;return _0x1371ad;}*['getRevisionsIterator'](_0x1f3153,{direction:_0x5f53d1='earlier',filter:_0x1732b9=()=>!0x0}={}){const _0x540160='earlier'===_0x5f53d1?0x1:-0x1;let _0x4f9d21=this['_revisions']['get'](_0x1f3153),_0x1d2701=this['getIndex'](_0x4f9d21);for(yield _0x4f9d21;_0x4f9d21;){if(_0x1d2701+=_0x540160,_0x4f9d21=this['getRevision'](_0x1d2701),!_0x4f9d21)return;_0x1732b9(_0x4f9d21)&&(yield _0x4f9d21);}}}class $ extends _0x2a9b7d{static get['pluginName'](){return'RevisionHistoryUtils';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['_viewClassToTypeChar']=new Map([[_0x4e0505,'c'],[_0x2743c8,'a'],[_0x23abf1,'e'],[_0x4ccddb,'r'],[_0x3ec531,'u']]);['_typeCharToViewClass']=new Map([['c',_0x4e0505],['a',_0x2743c8],['e',_0x23abf1],['r',_0x4ccddb],['u',_0x3ec531]]);async['loadRevisionData'](_0x2bda0d,_0x3ccb47){if(_0x2bda0d['diffData']||!_0x3ccb47)return;const _0x13bf7d=this['editor']['config']['get']('collaboration.channelId'),_0x2fccf6=await _0x3ccb47['getRevision']({'channelId':_0x13bf7d,'revisionId':_0x2bda0d['id']});_0x2bda0d['diffData']=_0x2fccf6['diffData'];}['getRevisionDocumentData'](_0x16e5fc){const _0x627ff={};for(const _0x2227d7 in _0x16e5fc['diffData']){if(_0x16e5fc['diffData'][_0x2227d7]['attachChange']&&!_0x16e5fc['diffData'][_0x2227d7]['attachChange']['isAttached'])continue;const _0x211c43=this['_removeRevisionMarkers'](JSON['parse'](_0x16e5fc['diffData'][_0x2227d7]['insertions'])),_0x3acc2e=this['editor']['editing']['view']['document'],_0x3abbf5=new _0x50d104(_0x3acc2e,_0x211c43['map'](_0x32fe95=>this['_getViewFromDiffObj'](_0x32fe95,!0x1)));this['editor']['data']['processor']['useFillerType']('marked'),_0x627ff[_0x2227d7]=this['editor']['data']['processor']['toData'](_0x3abbf5),this['editor']['data']['processor']['useFillerType']('default');}return _0x627ff;}['getRevisionRootsAttributes'](_0xc1e739){const _0xcd4d7c={};for(const _0x3a322b in _0xc1e739['diffData'])_0xc1e739['diffData'][_0x3a322b]['attachChange']&&!_0xc1e739['diffData'][_0x3a322b]['attachChange']['isAttached']||(_0xcd4d7c[_0x3a322b]=_0xc1e739['diffData'][_0x3a322b]['attributesAfter']||{});return _0xcd4d7c;}['_getTypeCharForViewElement'](_0x3ff9a4){return this['_viewClassToTypeChar']['get'](_0x3ff9a4['constructor']);}['_getViewFromDiffObj'](_0x4ebc85,_0x218db2){const _0x48cd62=this['editor']['editing']['view']['document'];if('string'==typeof _0x4ebc85)return new _0x5a4e35(_0x48cd62,_0x4ebc85);{let _0x113d34,_0x4f8b2b;_0x4f8b2b='u'==_0x4ebc85['type']||'r'==_0x4ebc85['type']?[]:_0x4ebc85['children']['map'](_0x3e42e2=>this['_getViewFromDiffObj'](_0x3e42e2,_0x218db2));const _0x3b7cab=this['_typeCharToViewClass']['get'](_0x4ebc85['type'])||_0x2c11d4,_0x576714=this['editor']['data']['htmlProcessor']['domConverter'];if(_0x113d34=new _0x3b7cab(_0x48cd62,_0x4ebc85['name'],_0x4ebc85['attributes'],_0x4f8b2b),'u'==_0x4ebc85['type']&&_0x4ebc85['children'][0x0]){const _0x2f7c54=_0x4ebc85['children'][0x0];if(_0x113d34['render']=function(_0x3b722d){const _0x34f1d3=_0x3b722d['createElement']('div');return _0x34f1d3['innerHTML']=_0x2f7c54,_0x34f1d3['childNodes'][0x0];},_0x218db2){const _0x3d1086=new _0x50d104(_0x48cd62);_0x3d1086['_appendChild'](_0x113d34);const _0x4364a3=Array['from'](_0x576714['viewChildrenToDom'](_0x3d1086,{'bind':!0x1})),_0x18a907=_0x576714['domDocument']['createElement']('div');_0x18a907['append'](..._0x4364a3),_0x113d34=Array['from'](_0x576714['domChildrenToView'](_0x18a907))[0x0];}}else{if('r'==_0x4ebc85['type']&&_0x4ebc85['children'][0x0]){const _0x50d8d7=_0x4ebc85['children'][0x0];if(_0x113d34['render']=function(_0x58b5de){_0x58b5de['innerHTML']=_0x50d8d7;},_0x218db2){const _0x337599=new _0x50d104(_0x48cd62);_0x337599['_appendChild'](_0x113d34);const _0x56d423=Array['from'](_0x576714['viewChildrenToDom'](_0x337599,{'bind':!0x1})),_0x3f0f9d=_0x576714['domDocument']['createElement']('div');_0x3f0f9d['append'](..._0x56d423);const _0x2c92de=Array['from'](_0x576714['domChildrenToView'](_0x3f0f9d));_0x2c92de['length']>0x1?_0x113d34['_appendChild'](_0x2c92de):_0x113d34=_0x2c92de[0x0];}}}if(_0x4ebc85['customProperties']){for(const [_0x15164d,_0xe76b43]of _0x4ebc85['customProperties'])_0x113d34['_setCustomProperty'](_0x15164d,_0xe76b43);}const _0x17d842=void 0x0===_0x4ebc85['fillerOffset']?null:_0x4ebc85['fillerOffset'];return null!==_0x17d842&&(_0x113d34['getFillerOffset']=()=>_0x17d842),_0x113d34;}}['_makeModelFromViewString'](_0x4fd2e6){const _0x45e6c7=JSON['parse'](_0x4fd2e6),_0x3683b3=this['editor']['editing']['view']['document'],_0x150539=new _0x50d104(_0x3683b3,_0x45e6c7['map'](_0x28eda4=>this['_getViewFromDiffObj'](_0x28eda4,!0x0)));return this['editor']['data']['toModel'](_0x150539);}['_removeRevisionMarkers'](_0x32d19b){return(_0x32d19b=_0x32d19b['filter'](_0x5e8bfb=>!_0x5e8bfb['name']||'revision-start'!==_0x5e8bfb['name']&&'revision-end'!==_0x5e8bfb['name']))['forEach'](_0x3bfad6=>{'string'!=typeof _0x3bfad6&&(_0x3bfad6['children']=this['_removeRevisionMarkers'](_0x3bfad6['children']),_0x3bfad6['attributes']=_0x3bfad6['attributes']['filter'](_0x3e24e3=>!_0x3e24e3[0x0]['startsWith']('data-revision-')));}),_0x32d19b;}}function m(_0x2d03a8,_0x36e04e,_0x55b5bc){const t=_0x2d03a8['t'];switch(_0x36e04e){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'},_0x55b5bc);case'X_OF_Y_CHANGES':return t({'string':'%0\x20of\x20%1','id':'X_OF_Y_CHANGES'},_0x55b5bc);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 _0x2a9b7d{['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[_0x58b4bf,S,$,_0x153c11];}constructor(_0x306670){super(_0x306670),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 _0x4f3b1a=_0x422234();this['_source']={'history':this['editor']['model']['document']['history'],'getLatestVersion':()=>Promise['resolve'](this['editor']['model']['document']['version']),'getCurrentRevisionId':()=>_0x4f3b1a},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 _0x331153=this['repository']['getRevision'](0x0),_0x5ddfef=_0x331153&&null===_0x331153['creator']?_0x331153:null;if(this['_continueCurrentRevision']=!!_0x5ddfef&&this['editor']['config']['get']('revisionHistory.resumeUnsavedRevision'),this['editor']['plugins']['has']('RealTimeCollaborationClient')){const _0x173c41=this['_source']['getCurrentRevisionId'](),_0x1997ae=this['repository']['getRevision'](_0x173c41);if(_0x1997ae)this['_startingVersion']=_0x1997ae['fromVersion'],this['_continueCurrentRevision']=!0x1;else{const _0x5f1764=this['_source']['history']['_operations']['find'](_0x3a8f0d=>!_0x3a8f0d['_isInit']),_0x3b8560=_0x5f1764?_0x5f1764['baseVersion']:this['_source']['history']['version'];_0x331153?(_0x331153['toVersion']<_0x3b8560&&_0x331153['_update']({'toVersion':_0x3b8560}),this['_continueCurrentRevision']?(this['_source']['getCurrentRevisionId']=()=>_0x5ddfef['id'],this['_startingVersion']=_0x5ddfef['fromVersion']):(this['_startingVersion']=_0x331153['toVersion'],this['_continueCurrentRevision']=!0x1)):(this['_startingVersion']=_0x3b8560,this['_continueCurrentRevision']=!0x1);}}else _0x5ddfef&&(this['editor']['model']['document']['history']['version']=Math['max'](_0x5ddfef['toVersion'],this['editor']['model']['document']['history']['version']),_0x5ddfef['fromVersion']===_0x5ddfef['toVersion']?(0x0!==_0x5ddfef['fromVersion']&&(this['_source']['getCurrentRevisionId']=()=>_0x5ddfef['id']),this['_continueCurrentRevision']=!0x1):this['_continueCurrentRevision']&&(this['_source']['getCurrentRevisionId']=()=>_0x5ddfef['id'],this['_startingVersion']=_0x5ddfef['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',_0x3193ab=>!_0x3193ab),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x4b3db2=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x1b7cc8;for(const _0x21d3d8 in _0x4b3db2){const _0x12fbce=_0x21d3d8,_0x2fc527=_0x4b3db2[_0x12fbce];if('revisionHistoryLicenseKeyValid'==_0x2fc527||'revisionHistoryLicenseKeyInvalid'==_0x2fc527||'revisionHistoryLicenseKeyExpired'==_0x2fc527||'revisionHistoryLicenseKeyDomainLimit'==_0x2fc527||'revisionHistoryLicenseKeyNotAllowed'==_0x2fc527||'revisionHistoryLicenseKeyEvaluationLimit'==_0x2fc527||'revisionHistoryLicenseKeyTrialLimit'==_0x2fc527||'revisionHistoryLicenseKeyUsageLimit'==_0x2fc527){delete _0x4b3db2[_0x12fbce],_0x1b7cc8=_0x2fc527,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'revisionHistoryLicenseKeyInvalid'==_0x1b7cc8&&_0x4b3db2['_showLicenseError']('invalid'),'revisionHistoryLicenseKeyExpired'==_0x1b7cc8&&_0x4b3db2['_showLicenseError']('expired'),'revisionHistoryLicenseKeyDomainLimit'==_0x1b7cc8&&_0x4b3db2['_showLicenseError']('domainLimit'),'revisionHistoryLicenseKeyNotAllowed'==_0x1b7cc8&&_0x4b3db2['_showLicenseError']('featureNotAllowed','RevisionHistory'),'revisionHistoryLicenseKeyEvaluationLimit'==_0x1b7cc8&&_0x4b3db2['_showLicenseError']('evaluationLimit'),'revisionHistoryLicenseKeyTrialLimit'==_0x1b7cc8&&_0x4b3db2['_showLicenseError']('trialLimit'),'revisionHistoryLicenseKeyUsageLimit'==_0x1b7cc8&&_0x4b3db2['_showLicenseError']('usageLimit');},0x3e8);}async['afterInit'](){if(this['repository']['length']>0x0){const _0x4d75ec=this['repository']['getRevision'](0x0),_0x4d6d0d=await this['getRevisionDocumentData'](_0x4d75ec),_0x1ed145=await this['getRevisionRootsAttributes'](_0x4d75ec);this['_replaceEditorDataWithRevisionData'](_0x4d6d0d,_0x1ed145);}}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['setSource'](_0x52211c){this['_source']=_0x52211c;}async['update'](){const _0x5138b7=await this['_source']['getLatestVersion']();if(_0x5138b7>this['currentRevision']['toVersion']){await this['_loadState']();const _0x410e89=this['buildRevisionData']({'revision':this['currentRevision'],'to':_0x5138b7});_0x410e89['authors']=_0x410e89['authorsIds']['map'](_0x298eb3=>this['editor']['plugins']['get']('Users')['getUser'](_0x298eb3)),this['currentRevision']['_update'](_0x410e89);}}async['saveRevision'](_0x359571={},_0x2a218c=null){const _0x24c430=[];await this['_loadState'](),this['_continueCurrentRevision']=!0x1,_0x2a218c>this['currentRevision']['toVersion']&&(_0x2a218c=null),null===_0x2a218c&&(_0x2a218c=await this['_source']['getLatestVersion']());const _0x29edff=this['_getFromVersion'](_0x2a218c),_0x2da3bb=this['buildRevisionData']({'from':_0x29edff,'to':_0x2a218c});if(this['currentRevision']['toVersion']<_0x2a218c){const _0x1c3065=this['buildRevisionData']({'revision':this['currentRevision'],'from':_0x2a218c,'to':_0x2a218c});_0x1c3065['authors']=[],_0x1c3065['authorsIds']=[],_0x1c3065['id']=this['currentRevision']['id'],this['currentRevision']['_update'](_0x1c3065,!0x0),delete _0x1c3065['authors'],_0x24c430['push'](_0x1c3065);}_0x359571['creatorId']=this['editor']['plugins']['get']('Users')['me']['id'],_0x359571['name']=_0x359571['name']||null,_0x359571['id']=_0x359571['id']||_0x422234(),_0x359571={..._0x359571,..._0x2da3bb};const _0x40c6ca=this['addRevisionData'](_0x359571);_0x24c430['push'](_0x359571);const _0x53692a=this['repository']['getIndex'](_0x40c6ca);if(0x0!==_0x53692a){const _0xd594db=this['repository']['getRevision'](_0x53692a-0x1);if(_0xd594db['fromVersion']!==_0x2a218c){const _0x53341e=this['_revisionDataBuilder']['getData'](_0x2a218c,_0xd594db['toVersion']),_0x594d22={'id':_0xd594db['id'],'diffData':_0x53341e['diffData'],'authorsIds':_0x53341e['authorsIds'],'authors':_0x53341e['authorsIds']['map'](_0x2d220e=>this['editor']['plugins']['get']('Users')['getUser'](_0x2d220e)),'fromVersion':_0x2a218c};_0xd594db===this['currentRevision']&&(_0x594d22['createdAt']=new Date(_0x359571['createdAt']['getTime']()+0xa)),_0xd594db['_update'](_0x594d22,!0x0),delete _0x594d22['authors'],_0x24c430['push'](_0x594d22);}}if(this['adapter']){for(const _0x21fec0 of _0x24c430)this['_bufferUpdate'](_0x21fec0['id'],_0x21fec0,!0x0);this['sendBufferedUpdates']();}return _0x40c6ca;}['addRevisionData'](_0x507aee){const _0x5dc9c1=this['repository']['createRevision'](_0x507aee);return this['adapter']&&_0x5dc9c1['on']('_update',(_0x3bf465,_0x41580c,_0x19075e)=>{_0x19075e||(this['_bufferUpdate'](_0x41580c['id'],_0x41580c,!0x0),this['sendBufferedUpdates']());}),this['repository']['addRevision'](_0x5dc9c1,this['_findInsertionIndex'](_0x5dc9c1)),_0x5dc9c1;}async['getRevisionDocumentData'](_0x5662cf){return await this['_utils']['loadRevisionData'](_0x5662cf,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x5662cf);}async['getRevisionRootsAttributes'](_0x3631ce){return await this['_utils']['loadRevisionData'](_0x3631ce,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x3631ce);}['sendBufferedUpdates'](){if(0x0===this['_bufferedUpdates']['size'])return;if(this['_isPendingUpdate'])return;let _0x454701=Array['from'](this['_bufferedUpdates']['values']());this['_bufferedUpdates']['clear']();for(let _0x769cdf=0x0;_0x769cdf<_0x454701['length'];_0x769cdf++){const _0xf3831d=_0x454701[_0x769cdf];let _0x223e25=!0x1;for(const _0x4bfaa6 of Object['keys'](_0xf3831d))void 0x0===_0xf3831d[_0x4bfaa6]?delete _0xf3831d[_0x4bfaa6]:'id'!==_0x4bfaa6&&(_0x223e25=!0x0);_0x223e25||(_0x454701[_0x769cdf]=null);}if(_0x454701=_0x454701['filter'](_0x30266d=>null!==_0x30266d),!_0x454701['length'])return;for(let _0x1dd7cf=0x0;_0x1dd7cf<_0x454701['length'];_0x1dd7cf++){const _0x4507ea=_0x454701[_0x1dd7cf];void 0x0!==_0x4507ea['fromVersion']&&void 0x0===_0x4507ea['toVersion']&&(_0x4507ea['toVersion']=this['repository']['getRevision'](_0x4507ea['id'])['toVersion']),void 0x0!==_0x4507ea['toVersion']&&void 0x0===_0x4507ea['fromVersion']&&(_0x4507ea['fromVersion']=this['repository']['getRevision'](_0x4507ea['id'])['fromVersion']);}const _0x4b83b7=this['editor']['config']['get']('collaboration.channelId');this['_isPendingUpdate']=!0x0,this['_addPendingAction'](),this['adapter']['updateRevisions'](_0x454701,_0x4b83b7)['finally'](()=>{this['_isPendingUpdate']=!0x1;})['then'](_0x33e225=>{if(_0x33e225){for(const _0x33c0b5 of _0x33e225)this['setRevisionData']({'id':_0x33c0b5['id'],'createdAt':_0x33c0b5['createdAt']});}this['_removePendingAction'](),this['sendBufferedUpdates']();});}['buildRevisionData']({revision:_0x19837b=null,from:_0x41770c=null,to:_0x59bb2f=null}){_0x41770c=null!==_0x41770c?_0x41770c:_0x19837b['fromVersion'],_0x59bb2f=null!==_0x59bb2f?_0x59bb2f:_0x19837b['toVersion'];const _0x356a22=this['_revisionDataBuilder']['getData'](_0x41770c,_0x59bb2f),_0xb95c01={'diffData':_0x356a22['diffData'],'authorsIds':_0x356a22['authorsIds'],'fromVersion':_0x41770c,'toVersion':_0x59bb2f};if(!_0x19837b||_0x59bb2f!==_0x19837b['toVersion']){const _0x513ddd=_0x59bb2f-0x1,_0x5266c3=this['_source']['history']['getOperation'](_0x513ddd);_0xb95c01['createdAt']=_0x5266c3&&_0x5266c3['createdAt']||new Date();}if(this['_loadedStateData']&&_0x41770c===this['_loadedStateData']['fromVersion']){for(const _0x5d2371 of this['_loadedStateData']['authors'])_0xb95c01['authorsIds']['includes'](_0x5d2371['id'])||_0xb95c01['authorsIds']['push'](_0x5d2371['id']);}return _0xb95c01;}['_bufferUpdate'](_0xe89b9,_0x1b1caa,_0x8be32d){if(this['_bufferedUpdates']['has'](_0xe89b9)){const _0x41e1e3=this['_bufferedUpdates']['get'](_0xe89b9);_0x1b1caa=_0x8be32d?{..._0x41e1e3,..._0x1b1caa}:{..._0x1b1caa,..._0x41e1e3};}this['_bufferedUpdates']['set'](_0xe89b9,_0x1b1caa);}['setRevisionData'](_0x4677ad){const _0x698595=this['repository']['getRevision'](_0x4677ad['id']);if(_0x4677ad['createdAt']&&(_0x4677ad['createdAt']=new Date(_0x4677ad['createdAt'])),_0x4677ad['authorsIds']){const _0x1b43ae=this['editor']['plugins']['get']('Users');_0x4677ad['authors']=_0x4677ad['authorsIds']['map'](_0x1ad43d=>_0x1b43ae['getUser'](_0x1ad43d));}_0x698595['_update'](_0x4677ad,!0x0);}['_createInitialRevision'](_0x11d8f1){const _0x5adb8e=this['repository']['getRevision'](this['repository']['length']-0x1);if(_0x5adb8e)this['_initialRevisionId']=_0x5adb8e['id'];else{const _0x4e7207=!this['editor']['model']['document']['roots']['find'](_0x594bdc=>this['editor']['model']['hasContent'](_0x594bdc)),_0x5a9d94=this['editor']['plugins']['get']('Users')['me']['id'],_0x395e2e=m(this['editor']['locale'],_0x4e7207?'Empty\x20document':'Initial\x20revision');this['_makeRevision']({'from':_0x11d8f1,'to':_0x11d8f1,'id':this['_initialRevisionId'],'name':_0x395e2e,'creatorId':_0x5a9d94});}}['_createCurrentRevision'](_0x2d110a){const _0x5ade85=this['_source']['getCurrentRevisionId']();this['currentRevision']=this['repository']['getRevision'](_0x5ade85),this['currentRevision']||(this['currentRevision']=this['_makeRevision']({'from':_0x2d110a,'to':_0x2d110a,'id':_0x5ade85,'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'](_0x30b5a9,_0x4daf67){let _0x4ab2e5=this['editor']['config']['get']('initialData'),_0x2c3d4e=this['editor']['config']['get']('rootsAttributes');if(void 0x0===_0x4ab2e5){_0x4ab2e5={};for(const _0x3f16ff of this['editor']['model']['document']['getRootNames']())_0x4ab2e5[_0x3f16ff]='';}if('string'==typeof _0x4ab2e5&&(_0x4ab2e5={'main':_0x4ab2e5}),void 0x0===_0x2c3d4e){_0x2c3d4e={};for(const _0x578a48 of this['editor']['model']['document']['getRootNames']())_0x2c3d4e[_0x578a48]={};}let _0x45f945=!0x1;const _0x36df40=Object['keys'](_0x4ab2e5),_0x2864fb=Object['keys'](_0x30b5a9);for(const _0x41f5ad of _0x36df40){if(_0x4ab2e5[_0x41f5ad]!==_0x30b5a9[_0x41f5ad]&&''!==_0x4ab2e5[_0x41f5ad]['trim']()){_0x45f945=!0x0;break;}if(!_0x284f8e(_0x2c3d4e[_0x41f5ad],_0x4daf67[_0x41f5ad])&&Object['keys'](_0x2c3d4e[_0x41f5ad])['length']>0x0){_0x45f945=!0x0;break;}}_0x45f945||(_0x45f945=_0x2864fb['some'](_0x1d9519=>!this['editor']['model']['document']['getRoot'](_0x1d9519))),_0x45f945&&_0x4d0460('editor-initial-data-replaced-with-revision-data',{'editorData':_0x4ab2e5,'editorRootsAttributes':_0x2c3d4e,'revisionData':_0x30b5a9,'revisionRootsAttributes':_0x4daf67}),this['editor']['config']['set']('initialData',_0x30b5a9),this['editor']['config']['set']('rootsAttributes',_0x4daf67);}['_addPendingAction'](){if(!this['_pendingAction']){const _0x3ddbd0=this['editor']['plugins']['get']('PendingActions');this['_pendingAction']=_0x3ddbd0['add'](m(this['editor']['locale'],'PENDING_ACTION_REVISION_HISTORY'));}}['_removePendingAction'](){this['_pendingAction']&&(this['editor']['plugins']['get']('PendingActions')['remove'](this['_pendingAction']),this['_pendingAction']=null);}['_findInsertionIndex'](_0x473495){const _0xbf3f4e=this['repository']['getRevisions']();_0xbf3f4e['reverse']();let _0x4cb078=0x0;for(;_0x4cb078<_0xbf3f4e['length'];){const _0x3eb05b=_0xbf3f4e[_0x4cb078];if(_0x3eb05b===this['currentRevision']){_0x4cb078++;continue;}if(_0x3eb05b['id']===this['_initialRevisionId'])break;const _0x168c2e=_0x473495['toVersion']-_0x3eb05b['toVersion']||_0x473495['fromVersion']-_0x3eb05b['fromVersion'];if(_0x168c2e>0x0)break;if(_0x168c2e<0x0)_0x4cb078++;else{if(!_0x473495['creator']&&_0x3eb05b['creator'])break;if(_0x3eb05b['creator']||!_0x473495['creator']){if(_0x473495['createdAt']>_0x3eb05b['createdAt'])break;_0x4cb078++;}else _0x4cb078++;}}return _0x4cb078;}['_getFromVersion'](_0x549c5c){const _0x1a5e87=this['repository']['getRevisions']();_0x1a5e87['reverse'](),_0x1a5e87['shift']();const _0x2761c0=_0x1a5e87['find'](_0xd16c1f=>_0xd16c1f['toVersion']<=_0x549c5c)['toVersion'];return _0x2761c0<this['_startingVersion']?this['_startingVersion']:_0x2761c0;}['_makeRevision']({name:_0x2d1f6d,from:_0x5a075d,to:_0x428c3c,creatorId:_0x52919e,id:_0x2f97e9}){const _0x41a16a=this['buildRevisionData']({'from':_0x5a075d,'to':_0x428c3c});_0x41a16a['name']=_0x2d1f6d,_0x41a16a['creatorId']=_0x52919e,_0x41a16a['id']=_0x2f97e9;const _0x14e02e=this['addRevisionData'](_0x41a16a);return this['adapter']&&this['_bufferUpdate'](_0x41a16a['id'],_0x41a16a,!0x0),_0x14e02e;}['_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(_0x553a0c){this['editor']=_0x553a0c,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'](_0x4ff888){this['source']=_0x4ff888;const _0x52cb12=new Map(),_0x593003=new Map(),_0x4d1a60=this['editor']['model']['document']['roots']['map'](_0x87c5e6=>_0x87c5e6['rootName']);for(const _0x44a074 of _0x4d1a60){const _0xa4788b=this['editor']['model']['document']['getRoot'](_0x44a074),_0x23335f=x(_0xa4788b);_0x52cb12['set'](_0x44a074,_0x23335f),_0x593003['set'](_0x44a074,Object['fromEntries'](_0xa4788b['getAttributes']()));}const _0x2c4587=Array['from'](this['editor']['model']['markers'])['map'](_0x6ec15a=>[_0x6ec15a['name'],_0x6ec15a['getRange']()]),_0x383ee1=this['source']['version'];this['_saveMetaData'](_0x383ee1,_0x52cb12,_0x2c4587,_0x593003),this['_startingRevisionId']=this['_revisionId'];const _0x83807e=new Map(),_0x2d296e=new Map();for(const _0x248dd1 of _0x4d1a60){const _0x29fd78=N(_0x248dd1);_0x83807e['set'](_0x248dd1,_0x29fd78),_0x2d296e['set'](_0x248dd1,{});}this['_saveMetaData'](Number['NEGATIVE_INFINITY'],_0x83807e,[],_0x2d296e);}['getData'](_0xed0b58,_0x1a4ecc){if(this['_lastFrom']===_0xed0b58&&this['_lastTo']<=_0x1a4ecc)this['_savedMetaData']['size']>0x1&&this['_removeMetaData'](this['_lastTo']),this['_applyOperations'](this['_lastTo'],_0x1a4ecc,!0x0);else{if(!this['_savedMetaData']['has'](_0xed0b58)){const _0x2fd784=this['_getPreviousFrom'](_0xed0b58);this['_calculateMetaData'](_0x2fd784,_0xed0b58,!0x1);}this['_calculateMetaData'](_0xed0b58,_0x1a4ecc,!0x0);}return this['_lastFrom']=_0xed0b58,this['_lastTo']=_0x1a4ecc,this['_getState']();}['loadState'](_0x1321f3){if(!this['_savedMetaData']['has'](_0x1321f3['fromVersion'])){const _0x3e0d36=this['_getPreviousFrom'](_0x1321f3['fromVersion']);this['_calculateMetaData'](_0x3e0d36,_0x1321f3['fromVersion'],!0x1);}this['_calculateMetaData'](_0x1321f3['fromVersion'],_0x1321f3['toVersion'],!0x1);const _0x41182b=this['editor']['plugins']['get']('RevisionHistoryUtils');this['_reset'](),this['_lastFrom']=_0x1321f3['fromVersion'],this['_lastTo']=_0x1321f3['toVersion'];for(const _0x14fd2d in _0x1321f3['diffData']){const _0x366a5a=_0x1321f3['diffData'][_0x14fd2d]['attachChange'],_0x3ab8e9=_0x4dcfba(_0x1321f3['diffData'][_0x14fd2d]['attributesBefore'])||{},_0x7bf023=_0x41182b['_makeModelFromViewString'](_0x1321f3['diffData'][_0x14fd2d]['deletions']);_0x7bf023['rootName']=_0x14fd2d,_0x7bf023['_isAttached']=!_0x366a5a||!_0x366a5a['isAttached'],_0x7bf023['isAttached']=()=>_0x7bf023['_isAttached'],this['_baseRoots']['set'](_0x14fd2d,_0x7bf023),this['_baseRootsAttributes']['set'](_0x14fd2d,_0x3ab8e9),_0x366a5a&&this['_touchedRoots']['set'](_0x14fd2d,_0x366a5a);const _0x54f3d1=this['_makeIdsRoot'](_0x7bf023);this['_baseIdsRoots']['set'](_0x14fd2d,_0x54f3d1);for(const [_0x442831,_0x43b3eb]of _0x7bf023['markers']){if(!_0x442831['startsWith']('revision:'))continue;const _0xdde982=_0x442831['split'](':')[0x2];for(const _0x3b298a of _0x43b3eb['getWalker']({'singleCharacters':!0x0})){const _0x27eb0f=this['_getVidAttributeName'](_0x3b298a),_0x2b3440='elementEnd'==_0x3b298a['type']?_0x3b298a['previousPosition']['path']['slice'](0x0,-0x1):_0x3b298a['previousPosition']['path'],_0x5a7955=_0x54f3d1['getNodeByPath'](_0x2b3440)['getAttribute'](_0x27eb0f);this['_touched']['set'](_0x5a7955,{'userId':_0xdde982});}_0x7bf023['markers']['delete'](_0x442831);}}this['_startingRevisionId']=this['_revisionId'];const _0x11e845=[...Array(this['_revisionId'])['keys']()]['slice'](0x1)['filter'](_0x424041=>!this['_touched']['has'](_0x424041));let _0x490ada=0x0;const _0x4fd5af=new Map();for(const _0x491043 in _0x1321f3['diffData']){const _0x2ed4a0=_0x1321f3['diffData'][_0x491043]['attachChange'],_0xf2fd45=_0x4dcfba(_0x1321f3['diffData'][_0x491043]['attributesAfter'])||{},_0x1595dc=_0x41182b['_makeModelFromViewString'](_0x1321f3['diffData'][_0x491043]['insertions']);_0x1595dc['rootName']=_0x491043,_0x1595dc['_isAttached']=!_0x2ed4a0||_0x2ed4a0['isAttached'],_0x1595dc['isAttached']=()=>_0x1595dc['_isAttached'],this['_diffRoots']['set'](_0x491043,_0x1595dc),this['_diffRootsAttributes']['set'](_0x491043,_0xf2fd45);const _0x21fb7a=this['_makeIdsRoot'](_0x1595dc,Number['NEGATIVE_INFINITY']);this['_idsRoots']['set'](_0x491043,_0x21fb7a),_0x4fd5af['set'](_0x491043,_0x1595dc['isAttached']()?_0xf2fd45:{});for(const [_0x2964ac,_0x5261d2]of _0x1595dc['markers']){if(!_0x2964ac['startsWith']('revision:'))continue;const _0x577e5c=_0x2964ac['split'](':')[0x2];for(const _0x471f6b of _0x5261d2['getWalker']({'singleCharacters':!0x0})){const _0x461567=this['_getVidAttributeName'](_0x471f6b),_0x529ee3=this['_revisionId']++,_0x3c6260='elementEnd'==_0x471f6b['type']?_0x471f6b['previousPosition']['path']['slice'](0x0,-0x1):_0x471f6b['previousPosition']['path'];_0x21fb7a['getNodeByPath'](_0x3c6260)['_setAttribute'](_0x461567,_0x529ee3),this['_touched']['set'](_0x529ee3,{'userId':_0x577e5c});}_0x1595dc['markers']['delete'](_0x2964ac);}for(const _0x2133e1 of this['editor']['model']['createRangeIn'](_0x1595dc)['getWalker']({'singleCharacters':!0x0})){const _0x228f42=this['_getVidAttributeName'](_0x2133e1),_0x141772='elementEnd'==_0x2133e1['type']?_0x2133e1['previousPosition']['path']['slice'](0x0,-0x1):_0x2133e1['previousPosition']['path'],_0x1c60b6=_0x21fb7a['getNodeByPath'](_0x141772);_0x1c60b6['getAttribute'](_0x228f42)>0x0||_0x1c60b6['_setAttribute'](_0x228f42,_0x11e845[_0x490ada++]);}for(const [_0x53c8ab,_0x42c188]of _0x1595dc['markers'])_0x53c8ab['startsWith']('revision:')||this['_markers']['set'](_0x53c8ab,_0x42c188);}const {roots:_0x19b713}=this['_savedMetaData']['get'](_0x1321f3['fromVersion']),{roots:_0x3f6f16}=this['_savedMetaData']['get'](_0x1321f3['toVersion']),_0x2ed700=x(_0x19b713['get']('$graveyard'));this['_baseRoots']['set']('$graveyard',_0x2ed700),this['_baseIdsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x2ed700,Number['NEGATIVE_INFINITY']));const _0x4caac0=x(_0x3f6f16['get']('$graveyard'));this['_diffRoots']['set']('$graveyard',_0x4caac0),this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x4caac0));const _0x3569f7=Array['from'](this['_diffRoots'])['map'](([_0xac2a2d,_0x5edadb])=>[_0xac2a2d,x(_0x5edadb)]);this['_saveMetaData'](this['_lastTo'],_0x3569f7,this['_markers'],_0x4fd5af);}['reInit'](){this['_reset'](),this['_lastFrom']=-0x1,this['_lastTo']=-0x1,this['_savedMetaData']['clear'](),this['init'](this['source']);}['_saveMetaData'](_0x3074ff,_0x4174ae,_0x47f82,_0x1c944b){const _0x50132b=new Map(_0x4174ae),_0x107566=new Map(_0x4dcfba(_0x1c944b)),_0x367c55=new Map();for(const [_0x155d2f,_0x438e1a]of _0x47f82)_0x367c55['set'](_0x155d2f,{'start':_0x438e1a['start']['clone'](),'end':_0x438e1a['end']['clone'](),'rootName':_0x438e1a['root']['rootName']});this['_savedMetaData']['set'](_0x3074ff,{'roots':_0x50132b,'markers':_0x367c55,'rootsAttributes':_0x107566});}['_removeMetaData'](_0xe923a1){this['_savedMetaData']['delete'](_0xe923a1);}['_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'](_0x201130,_0x19cf70=null){let _0x4ac278=null;_0x201130['is']('documentFragment')||(_0x4ac278=new _0x514734(_0x201130['name'],{'vid_start':null===_0x19cf70?this['_revisionId']++:_0x19cf70++}));const _0x9a6963=[];for(const _0x349c20 of _0x201130['getChildren']())if(_0x349c20['is']('element')){_0x9a6963['push'](this['_makeIdsRoot'](_0x349c20,_0x19cf70));const _0x1effcb=_0x9a6963[_0x9a6963['length']-0x1];null!==_0x19cf70&&(_0x19cf70=_0x1effcb['is']('element','$text')?_0x1effcb['getAttribute']('vid')+0x1:_0x1effcb['getAttribute']('vid_end')+0x1);}else{for(let _0x7ff872=0x0;_0x7ff872<_0x349c20['offsetSize'];_0x7ff872++)_0x9a6963['push'](new _0x514734('$text',{'vid':null===_0x19cf70?this['_revisionId']++:_0x19cf70++}));}if(_0x201130['is']('documentFragment')){const _0x173075=N(_0x201130['rootName']);return _0x173075['_insertChild'](0x0,_0x9a6963),_0x173075;}return _0x4ac278['_setAttribute']('vid_end',null===_0x19cf70?this['_revisionId']++:_0x19cf70++),_0x4ac278['_insertChild'](0x0,_0x9a6963),_0x4ac278;}['_calculateMetaData'](_0x570abd,_0x21a1a0,_0x42e6b0){this['_reset']();const {roots:_0x7e373b,markers:_0x2178c1,rootsAttributes:_0x556c08}=this['_savedMetaData']['get'](_0x570abd);this['_baseRoots']=new Map(_0x7e373b),this['_baseRootsAttributes']=new Map(_0x4dcfba(_0x556c08));for(const [_0x237a8a,_0x30cdd8]of this['_baseRoots'])if('$graveyard'!==_0x237a8a&&(this['_diffRoots']['set'](_0x237a8a,x(_0x30cdd8)),this['_diffRootsAttributes']=new Map(_0x4dcfba(_0x556c08)),_0x42e6b0)){const _0x8b10bf=this['_revisionId'];this['_idsRoots']['set'](_0x237a8a,this['_makeIdsRoot'](_0x30cdd8)),this['_baseIdsRoots']['set'](_0x237a8a,this['_makeIdsRoot'](_0x30cdd8,_0x8b10bf));}this['_startingRevisionId']=this['_revisionId'],this['_diffRoots']['set']('$graveyard',x(this['_baseRoots']['get']('$graveyard'))),_0x42e6b0&&this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](this['_baseRoots']['get']('$graveyard')));for(const [_0x4af307,_0x3d4357]of _0x2178c1){const _0x40efbf=this['_baseRoots']['get'](_0x3d4357['rootName']),_0x32dc66=this['_diffRoots']['get'](_0x3d4357['rootName']),_0x1f5172=new _0xd9fa25(this['_fixPosition'](_0x3d4357['start'],_0x40efbf),this['_fixPosition'](_0x3d4357['end'],_0x40efbf)),_0x540dbd=this['_fixRange'](_0x1f5172,_0x32dc66);_0x40efbf['markers']['set'](_0x4af307,_0x1f5172),this['_markers']['set'](_0x4af307,_0x540dbd);}this['_applyOperations'](_0x570abd,_0x21a1a0,_0x42e6b0);}['_applyOperations'](_0x3c4507,_0x3fdcb4,_0x2cbb5f){for(const _0x11c3fc of this['source']['getOperations'](_0x3c4507,_0x3fdcb4))this['_handleOperation'](_0x11c3fc,_0x2cbb5f);for(const _0x4d27d9 of this['_diffRoots']['values']())_0x4d27d9['markers']['clear']();for(const [_0x7020a0,_0x3e88ea]of this['_markers']){this['_diffRoots']['get'](_0x3e88ea['root']['rootName'])['markers']['set'](_0x7020a0,_0x3e88ea['clone']());}const _0x5a50fa=new Map(),_0x2c2adc=new Map();for(const [_0x27b749,_0x23320d]of this['_diffRoots'])_0x5a50fa['set'](_0x27b749,x(_0x23320d)),_0x2c2adc['set'](_0x27b749,this['_diffRootsAttributes']['get'](_0x27b749));this['_saveMetaData'](_0x3fdcb4,_0x5a50fa,this['_markers'],_0x2c2adc);}['_getPreviousFrom'](_0x488f4e){const _0x28a9da=Array['from'](this['_savedMetaData']['keys']());_0x28a9da['sort']((_0x288667,_0x321420)=>_0x288667-_0x321420),_0x28a9da['reverse']();for(const _0x3c6e8e of _0x28a9da)if(_0x3c6e8e<_0x488f4e)return _0x3c6e8e;return Number['NEGATIVE_INFINITY'];}['_copyMarkers'](_0x5e1687,_0x30a758){const _0x411dcd=Array['from'](_0x30a758['markers'])['map'](([_0x2cffc9,_0x4c3dea])=>[_0x2cffc9,this['_fixRange'](_0x4c3dea,_0x5e1687)]);_0x5e1687['markers']=new Map(_0x411dcd);}['_transformMarkers'](_0x47ab4e){for(const _0x425a67 of this['_markers']['values']()){const _0x49a93d=_0x425a67['getTransformedByOperation'](_0x47ab4e),_0x5d9714=_0xd9fa25['_createFromRanges'](_0x49a93d);_0x425a67['start']=_0x5d9714['start'],_0x425a67['end']=_0x5d9714['end'];}}['_handleOperation'](_0x4522ed,_0x29190b){if('addRoot'!=_0x4522ed['type']&&'detachRoot'!=_0x4522ed['type']){if('insert'==_0x4522ed['type']){const _0x408df4=_0x4522ed['position']['root']['rootName'];this['_diffRoots']['has'](_0x408df4)||(this['_diffRoots']['set'](_0x408df4,N(_0x408df4,!0x0)),this['_diffRootsAttributes']['set'](_0x408df4,{}),_0x29190b&&this['_idsRoots']['set'](_0x408df4,N(_0x408df4,!0x0)));}else{if('addRootAttribute'==_0x4522ed['type']||'removeRootAttribute'==_0x4522ed['type']||'changeRootAttribute'==_0x4522ed['type'])return void this['_handleRootAttributeOperation'](_0x4522ed);'marker'==_0x4522ed['type']&&this['_handleMarkerOperation'](_0x4522ed);}if('marker'!==_0x4522ed['type']){const _0x43fc9a=this['_cloneOperation'](_0x4522ed,this['_diffRoots']);_0x43fc9a['_execute'](),this['_transformMarkers'](_0x43fc9a);}if(_0x29190b)switch(_0x4522ed['type']){case'insert':this['_handleInsertOperation'](_0x4522ed);break;case'move':case'remove':case'reinsert':this['_handleMoveOperation'](_0x4522ed);break;case'merge':this['_handleMergeOperation'](_0x4522ed);break;case'split':this['_handleSplitOperation'](_0x4522ed);}}else this['_handleRootOperation'](_0x4522ed,_0x29190b);}['_cloneOperation'](_0x2199b5,_0x26188a){const _0x1843f1=_0x2199b5['clone']();return _0x1843f1['_authorId']=_0x2199b5['_authorId'],this['_fixOperation'](_0x1843f1,_0x26188a),_0x1843f1;}['_getBaseVids'](_0x4e26a1){return _0x4e26a1['map'](_0x336769=>{const _0x409673=this['_getVidAttributeName'](_0x336769);return Number(_0x336769['item']['getAttribute'](_0x409673));});}['_generateTape'](_0x485792,_0x42b552){if(_0x485792['is']('element','$text'))_0x42b552['push']({'item':_0x485792,'type':'text'});else{_0x485792['is']('element')&&_0x42b552['push']({'item':_0x485792,'type':'elementStart'});for(const _0x4921e4 of _0x485792['getChildren']())this['_generateTape'](_0x4921e4,_0x42b552);_0x485792['is']('element')&&_0x42b552['push']({'item':_0x485792,'type':'elementEnd'});}return _0x42b552;}['_getState'](){const _0x58f9de=new Map(this['_touched']),_0x2c8aa4=new Map(_0x58f9de),_0x5bf790=new Map(),_0x583ef7={'insertions':{},'deletions':{}},_0x4987b1={'insertions':{},'deletions':{}},_0x43ec34=new Map(),_0x32f39d=new Set([...this['_baseRoots']['keys'](),...this['_diffRoots']['keys']()]);_0x32f39d['delete']('$graveyard');for(const _0x4b3b72 of _0x32f39d){const _0x1f3ffa=this['_diffRoots']['get'](_0x4b3b72)||N(_0x4b3b72,!0x1),_0x4b4cb0=this['_baseRoots']['get'](_0x4b3b72)||N(_0x4b3b72,!0x1);_0x1f3ffa['isAttached']()||_0x4b4cb0['isAttached']()?(_0x583ef7['insertions'][_0x4b3b72]=x(_0x1f3ffa),_0x583ef7['deletions'][_0x4b3b72]=x(_0x4b4cb0),this['_copyMarkers'](_0x583ef7['deletions'][_0x4b3b72],_0x4b4cb0),this['_copyMarkers'](_0x583ef7['insertions'][_0x4b3b72],_0x1f3ffa),_0x4987b1['insertions'][_0x4b3b72]=this['_generateTape'](this['_idsRoots']['get'](_0x4b3b72),[]),_0x4987b1['deletions'][_0x4b3b72]=this['_generateTape'](this['_baseIdsRoots']['get'](_0x4b3b72)||N(_0x4b3b72,!0x1),[])):_0x32f39d['delete'](_0x4b3b72);}for(const _0x5b84ae of _0x32f39d){const _0x8340cc=_0x4987b1['insertions'][_0x5b84ae];for(const _0x36c58c of _0x8340cc){const _0xc5b3bc=this['_getVidAttributeName'](_0x36c58c),_0x324b26=_0x36c58c['item']['getAttribute'](_0xc5b3bc);_0x2c8aa4['delete'](_0x324b26),_0x324b26>=this['_startingRevisionId']&&_0x5bf790['set'](_0x324b26,_0x58f9de['get'](_0x324b26));}}for(const _0x196d02 of _0x32f39d){const _0xbd7c64=_0x4987b1['insertions'][_0x196d02],_0x1fa86f=this['_getBaseVids'](_0x4987b1['deletions'][_0x196d02]);let _0x4f6ee5=0x0;for(const _0x116e88 of _0xbd7c64){const _0x17bd4a=this['_getVidAttributeName'](_0x116e88),_0x395196=_0x116e88['item']['getAttribute'](_0x17bd4a);if(!_0x5bf790['has'](_0x395196)&&!_0x43ec34['has'](_0x395196)){if(_0x2c8aa4['has'](_0x395196))_0x4f6ee5++;else{if(_0x395196!=_0x1fa86f[_0x4f6ee5]){const _0x32577a=_0x58f9de['get'](_0x395196)||_0x58f9de['get'](_0x1fa86f[_0x4f6ee5]);for(;_0x395196!=_0x1fa86f[_0x4f6ee5];)_0x2c8aa4['has'](_0x1fa86f[_0x4f6ee5])||(_0x43ec34['set'](_0x1fa86f[_0x4f6ee5],_0x32577a),_0x58f9de['set'](_0x1fa86f[_0x4f6ee5],_0x32577a)),_0x4f6ee5++;}_0x4f6ee5++;}}}}for(const _0xed1c61 of _0x32f39d){const _0x39d804=_0x4987b1['insertions'][_0xed1c61];for(const _0x57830a of _0x39d804){const _0x1362d4=this['_getVidAttributeName'](_0x57830a),_0x181754=_0x57830a['item']['getAttribute'](_0x1362d4);if(_0x43ec34['has'](_0x181754)){const _0x1c0cd3=_0x43ec34['get'](_0x181754);_0x2c8aa4['has'](_0x181754)||_0x2c8aa4['set'](_0x181754,{..._0x1c0cd3}),_0x5bf790['set'](_0x181754,{..._0x1c0cd3});}}}for(const _0x3f0e14 of _0x2c8aa4['keys']())_0x3f0e14>=this['_startingRevisionId']&&_0x2c8aa4['delete'](_0x3f0e14);const _0x2887a4=new Map();for(const _0x50078c of _0x32f39d){let _0x2ca3b1=_0x4987b1['insertions'][_0x50078c];for(const _0x5b15e0 of _0x2ca3b1)if(_0x5b15e0['item']['is']('element','tableCell')){const _0x2ea520=this['_getVidAttributeName'](_0x5b15e0),_0x159d91=_0x5b15e0['item']['getAttribute'](_0x2ea520);if(_0x5bf790['has'](_0x159d91)){const _0x575f92=_0x5b15e0['item']['parent']['parent']['getAttribute']('vid_start'),_0x22f4a3=_0x2887a4['get'](_0x575f92)||new Set();_0x22f4a3['add'](_0x5bf790['get'](_0x159d91)['userId']),_0x2887a4['set'](_0x575f92,_0x22f4a3);}}_0x2ca3b1=_0x4987b1['deletions'][_0x50078c];for(const _0x1c0446 of _0x2ca3b1)if(_0x1c0446['item']['is']('element','tableCell')){const _0x5b9c27=this['_getVidAttributeName'](_0x1c0446),_0x2438d8=_0x1c0446['item']['getAttribute'](_0x5b9c27);if(_0x2c8aa4['has'](_0x2438d8)){const _0x2865b3=_0x1c0446['item']['parent']['parent']['getAttribute']('vid_start'),_0x396c99=_0x2887a4['get'](_0x2865b3)||new Set();_0x396c99['add'](_0x2c8aa4['get'](_0x2438d8)['userId']),_0x2887a4['set'](_0x2865b3,_0x396c99);}}for(const _0x390e02 of _0x2887a4['keys']())(_0x5bf790['has'](_0x390e02)||_0x2c8aa4['has'](_0x390e02))&&_0x2887a4['delete'](_0x390e02);}for(const _0x34cd5d of _0x32f39d){const _0x49a096=_0x4987b1['insertions'][_0x34cd5d];let _0x12ef90=null,_0x151ca4=null;for(const _0x50c1a6 of _0x49a096){const _0x5ae715=this['_getVidAttributeName'](_0x50c1a6),_0x566426=_0x50c1a6['item']['getAttribute'](_0x5ae715),_0x37503d=_0x2887a4['get'](_0x566426);_0x37503d&&'elementStart'==_0x50c1a6['type']&&(_0x12ef90=Array['from'](_0x37503d)[0x0],_0x151ca4=_0x50c1a6['item']['getAttribute']('vid_end')),_0x12ef90&&(_0x2c8aa4['set'](_0x566426,{'userId':_0x12ef90}),_0x5bf790['set'](_0x566426,{'userId':_0x12ef90})),_0x566426==_0x151ca4&&(_0x12ef90=null,_0x151ca4=null);}}const _0x2e032c={},_0x490d22=new Set();for(const _0x6be0dd of _0x32f39d){const _0xd948c0=_0x583ef7['deletions'][_0x6be0dd],_0x357100=_0x583ef7['insertions'][_0x6be0dd];for(const {userId:_0x5ba358}of this['_touchedMarkers']['values']())null!==_0x5ba358&&_0x490d22['add'](_0x5ba358);for(const {userId:_0x5c516a}of this['_touchedRoots']['values']())null!==_0x5c516a&&_0x490d22['add'](_0x5c516a);this['_markChanges'](_0x357100,_0x4987b1['insertions'][_0x6be0dd],_0x5bf790,'insertion',_0x490d22),this['_markChanges'](_0xd948c0,_0x4987b1['deletions'][_0x6be0dd],_0x2c8aa4,'deletion',_0x490d22),_0x2e032c[_0x6be0dd]={'insertions':this['_prepareViewToSave'](_0x357100),'deletions':this['_prepareViewToSave'](_0xd948c0),'attachChange':this['_touchedRoots']['get'](_0x6be0dd)||null,'attributesBefore':_0x4dcfba(this['_baseRootsAttributes']['get'](_0x6be0dd))||{},'attributesAfter':_0x4dcfba(this['_diffRootsAttributes']['get'](_0x6be0dd))};}return{'diffData':_0x2e032c,'authorsIds':Array['from'](_0x490d22)};}['_processRootBeforeSave'](_0x42c17a){for(const [,_0x44f2ff]of _0x42c17a['markers']){const _0x8e8243=_0x44f2ff['start']['getAncestors']()['filter'](_0x399b02=>'tableCell'==_0x399b02['name']);for(const _0x236bcb of _0x8e8243)0x1==_0x236bcb['childCount']&&_0x236bcb['getChild'](0x0)['is']('element','paragraph')&&_0x236bcb['getChild'](0x0)['_setAttribute']('keepParagraph',!0x0);}}['_prepareViewToSave'](_0xa8d721){this['_processRootBeforeSave'](_0xa8d721);const _0x35e11f=this['editor']['data']['toView'](_0xa8d721,{}),_0x4848c1=Array['from'](_0x35e11f['getChildren']())['map'](_0xbc6e65=>this['_getViewJson'](_0xbc6e65));return JSON['stringify'](_0x4848c1);}['_getViewJson'](_0x39db67){if(_0x39db67['is']('$text'))return _0x39db67['data'];{const _0x277d65=this['editor']['plugins']['get']('RevisionHistoryUtils'),_0x5ca170=_0x39db67,_0x1c10f6=this['editor']['data']['htmlProcessor']['domConverter'],_0x2af49b={'type':_0x277d65['_getTypeCharForViewElement'](_0x5ca170),'name':_0x5ca170['name'],'attributes':Array['from'](_0x5ca170['getAttributes']()),'children':Array['from'](_0x5ca170['getChildren']())['map'](_0x42f7e8=>this['_getViewJson'](_0x42f7e8))};if(_0x39db67['is']('uiElement')&&'$comment'!=_0x39db67['name']){const _0x285682=_0x39db67['render'](_0x1c10f6['domDocument'],_0x1c10f6);_0x2af49b['children']['push'](_0x285682['outerHTML']);}else{if(_0x39db67['is']('rawElement')){const _0x50ad46=_0x1c10f6['domDocument']['createElement'](_0x5ca170['name']);_0x39db67['render'](_0x50ad46,_0x1c10f6),_0x2af49b['children']['push'](_0x50ad46['innerHTML']);}}const _0x1bbdb6=Array['from'](_0x5ca170['getCustomProperties']());_0x1bbdb6['length']>0x0&&(_0x2af49b['customProperties']=_0x1bbdb6);const _0x2747f5=_0x5ca170['getFillerOffset']();return null!==_0x2747f5&&(_0x2af49b['fillerOffset']=_0x2747f5),_0x2af49b;}}['_markChanges'](_0x3f5033,_0x4af40f,_0x9ffc,_0x274959,_0x4f8114){let _0x3296f2=null,_0x538333=null,_0x37b1f1=0x0;const _0x46a96e=this['editor']['model'];for(let _0xffafe8=0x0;_0xffafe8<_0x4af40f['length'];_0xffafe8++){const _0x2dab21=this['_getVidAttributeName'](_0x4af40f[_0xffafe8]),_0x1186a1=_0x4af40f[_0xffafe8]['item']['getAttribute'](_0x2dab21),_0xe92e63=_0x9ffc['get'](_0x1186a1),_0x5bccd6=_0xffafe8==_0x4af40f['length']-0x1;(!_0x3296f2&&_0xe92e63&&(_0x3296f2=_0xe92e63,_0x538333=_0x4af40f[_0xffafe8]),_0x3296f2&&(!_0xe92e63||_0xe92e63['userId']!=_0x3296f2['userId']))&&(_0x25d38d(_0xe92e63,P(_0x538333,_0x3f5033,_0x46a96e),P(_0x4af40f[_0xffafe8],_0x3f5033,_0x46a96e)),_0x3296f2=_0xe92e63||null,_0x538333=_0xe92e63?_0x4af40f[_0xffafe8]:null),_0x3296f2&&_0x5bccd6&&_0x25d38d(_0xe92e63,P(_0x538333,_0x3f5033,_0x46a96e),V(_0x4af40f[_0xffafe8],_0x3f5033,_0x46a96e));}function _0x25d38d(_0x500ec8,_0xaa8bdc,_0xfa8a8d){const _0x47db2c=_0x3296f2['userId'],_0x5dccf6='revision:'+_0x274959+':'+_0x47db2c+':'+_0x37b1f1++,_0x28cdd9=_0x46a96e['createRange'](_0xaa8bdc,_0xfa8a8d);_0x3f5033['markers']['set'](_0x5dccf6,_0x28cdd9),null!==_0x47db2c&&_0x4f8114['add'](_0x47db2c);}}['_getVidAttributeName'](_0x244d13){switch(_0x244d13['type']){case'elementStart':return'vid_start';case'elementEnd':return'vid_end';default:return'vid';}}['_fixOperation'](_0x42bda9,_0xd9b278){_0x42bda9['baseVersion']=null;for(const _0x25bcdc in _0x42bda9){const _0x38747f=_0x42bda9[_0x25bcdc];if(_0x38747f instanceof _0x5dfb54){const _0x3ef07f=_0xd9b278['get'](_0x38747f['root']['rootName']);_0x42bda9[_0x25bcdc]=this['_fixPosition'](_0x38747f,_0x3ef07f);}if(_0x38747f instanceof _0xd9fa25){const _0x5ba6a0=_0xd9b278['get'](_0x38747f['root']['rootName']);_0x42bda9[_0x25bcdc]=this['_fixRange'](_0x38747f,_0x5ba6a0);}'root'===_0x25bcdc&&(_0x42bda9['root']=_0xd9b278['get'](_0x42bda9['root']['rootName']));}}['_fixRange'](_0x440d8b,_0x453da9){return this['editor']['model']['createRange'](this['_fixPosition'](_0x440d8b['start'],_0x453da9),this['_fixPosition'](_0x440d8b['end'],_0x453da9));}['_fixPosition'](_0x45d38d,_0x4f10f1){return this['editor']['model']['createPositionFromPath'](_0x4f10f1,_0x45d38d['path'],_0x45d38d['stickiness']);}['_handleInsertOperation'](_0x2bd275){const _0x19acdc=this['_idsRoots']['get'](_0x2bd275['position']['root']['rootName']),_0x44eb06=this['_fixPosition'](_0x2bd275['position'],_0x19acdc),_0x4131ad=null===_0x2bd275['_authorId']?null:_0x2bd275['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x21defb=_0x44eb06['parent'],_0x5aca46=this['_revisionId'],_0x2cda58=[];for(const _0x3b7315 of _0x2bd275['nodes'])if(_0x3b7315['is']('element'))_0x2cda58['push'](this['_makeIdsRoot'](_0x3b7315));else{for(let _0x5e078d=0x0;_0x5e078d<_0x3b7315['offsetSize'];_0x5e078d++)_0x2cda58['push'](new _0x514734('$text',{'vid':this['_revisionId']++}));}const _0xea7e80=this['_revisionId'];for(let _0x4eef0f=_0x5aca46;_0x4eef0f<_0xea7e80;_0x4eef0f++)this['_touched']['set'](_0x4eef0f,{'userId':_0x4131ad});_0x21defb['_insertChild'](_0x44eb06['offset'],_0x2cda58);}['_handleMoveOperation'](_0x50e3b8){(_0x50e3b8=this['_cloneOperation'](_0x50e3b8,this['_idsRoots']))['_execute']();const _0x2647df=null===_0x50e3b8['_authorId']?null:_0x50e3b8['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x28c4c4=_0x50e3b8['getMovedRangeStart'](),_0x4b45c1=_0x28c4c4['parent'],_0x2aa4c0=_0x28c4c4['offset'];!function _0x17bf5b(_0x34f396,_0x2267ed,_0x94f34d,_0x23bd6e){for(let _0x1a32d8=_0x94f34d;_0x1a32d8<_0x23bd6e;_0x1a32d8++){const _0x530f88=_0x2267ed['getChild'](_0x1a32d8);_0x530f88['is']('element','$text')?_0x34f396['set'](_0x530f88['getAttribute']('vid'),{'userId':_0x2647df}):(_0x34f396['set'](_0x530f88['getAttribute']('vid_start'),{'userId':_0x2647df}),_0x17bf5b(_0x34f396,_0x530f88,0x0,_0x530f88['childCount']),_0x34f396['set'](_0x530f88['getAttribute']('vid_end'),{'userId':_0x2647df}));}}(this['_touched'],_0x4b45c1,_0x2aa4c0,_0x2aa4c0+_0x50e3b8['howMany']);}['_handleMergeOperation'](_0x25a8fc){const _0x3869ef=null===(_0x25a8fc=this['_cloneOperation'](_0x25a8fc,this['_idsRoots']))['_authorId']?null:_0x25a8fc['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x6d24f9=_0x25a8fc['targetPosition']['parent'],_0xa1551c=_0x25a8fc['sourcePosition']['parent'],_0x37ddde=_0x6d24f9['getAttribute']('vid_end'),_0x3c19aa=_0xa1551c['getAttribute']('vid_start');_0x6d24f9['_setAttribute']('vid_end',_0xa1551c['getAttribute']('vid_end')),_0xa1551c['_setAttribute']('vid_end',_0x37ddde),this['_touched']['set'](_0x3c19aa,{'userId':_0x3869ef}),this['_touched']['set'](_0x37ddde,{'userId':_0x3869ef}),_0x25a8fc['_execute']();}['_handleSplitOperation'](_0x23e752){const _0x484d88=null===(_0x23e752=this['_cloneOperation'](_0x23e752,this['_idsRoots']))['_authorId']?null:_0x23e752['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x5b9413=_0x23e752['graveyardPosition'],_0x125af3=_0x23e752['splitPosition']['parent'];_0x23e752['_execute']();const _0x76d171=_0x125af3['getAttribute']('vid_end'),_0x13ca65=_0x23e752['insertionPosition']['nodeAfter'];if(_0x5b9413){const _0x1a0ca0=_0x13ca65['getAttribute']('vid_end'),_0x9d245a=_0x125af3['getAttribute']('vid_end');_0x125af3['_setAttribute']('vid_end',_0x1a0ca0),_0x13ca65['_setAttribute']('vid_end',_0x9d245a),this['_touched']['set'](_0x125af3['getAttribute']('vid_end'),{'userId':_0x484d88}),this['_touched']['set'](_0x13ca65['getAttribute']('vid_start'),{'userId':_0x484d88});}else{const _0x20c2f4=this['_revisionId']++,_0x3af1f2=this['_revisionId']++;_0x125af3['_setAttribute']('vid_end',_0x20c2f4),_0x13ca65['_setAttribute']('vid_start',_0x3af1f2),_0x13ca65['_setAttribute']('vid_end',_0x76d171),this['_touched']['set'](_0x20c2f4,{'userId':_0x484d88}),this['_touched']['set'](_0x3af1f2,{'userId':_0x484d88});}}['_handleMarkerOperation'](_0x49ba80){if(!_0x49ba80['affectsData'])return;const _0x53f6be=(_0x49ba80=this['_cloneOperation'](_0x49ba80,this['_diffRoots']))['oldRange']?_0x49ba80['oldRange']['root']:null,_0x304a45=_0x49ba80['newRange']?_0x49ba80['newRange']['root']:null;_0x53f6be&&this['_markers']['delete'](_0x49ba80['name']),_0x304a45&&this['_markers']['set'](_0x49ba80['name'],_0x49ba80['newRange']['clone']());const _0x12bdb2=null===_0x49ba80['_authorId']?null:_0x49ba80['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x4da961=_0x49ba80['name'];if(!this['_touchedMarkers']['has'](_0x4da961))return void this['_touchedMarkers']['set'](_0x4da961,{'range':_0x49ba80['oldRange'],'userId':_0x12bdb2});const _0x44c147=this['_touchedMarkers']['get'](_0x4da961),_0x44b77e=_0x44c147['range'],_0x260fc0=_0x49ba80['newRange'];null==_0x44b77e&&null==_0x260fc0||_0x44b77e&&_0x260fc0&&_0x44b77e['isEqual'](_0x260fc0)?this['_touchedMarkers']['delete'](_0x49ba80['name']):_0x44c147['userId']=_0x12bdb2;}['_handleRootOperation'](_0x1c7cd1,_0x3753de){this['_diffRoots']['has'](_0x1c7cd1['rootName'])?this['_diffRoots']['get'](_0x1c7cd1['rootName'])['_isAttached']=_0x1c7cd1['isAdd']:(this['_diffRoots']['set'](_0x1c7cd1['rootName'],N(_0x1c7cd1['rootName'],!0x0)),this['_diffRootsAttributes']['set'](_0x1c7cd1['rootName'],{}),_0x3753de&&this['_idsRoots']['set'](_0x1c7cd1['rootName'],N(_0x1c7cd1['rootName'],!0x0)));const _0x44db32=null===_0x1c7cd1['_authorId']?null:_0x1c7cd1['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0xe71983=this['_touchedRoots']['get'](_0x1c7cd1['rootName']);_0xe71983&&_0xe71983['userId']===_0x44db32?this['_touchedRoots']['delete'](_0x1c7cd1['rootName']):this['_touchedRoots']['set'](_0x1c7cd1['rootName'],{'userId':_0x44db32,'isAttached':_0x1c7cd1['isAdd']});}['_handleRootAttributeOperation'](_0x13110b){const _0x4d8beb=this['_diffRootsAttributes']['get'](_0x13110b['root']['rootName']);null===_0x13110b['newValue']?delete _0x4d8beb[_0x13110b['key']]:_0x4d8beb[_0x13110b['key']]=_0x13110b['newValue'];}}function x(_0x4d9718){const _0x5683fe=N(_0x4d9718['rootName'],_0x4d9718['isAttached']());for(const _0x35f50b of _0x4d9718['getChildren']()){const _0x422562=_0x35f50b['_clone'](!0x0);_0x5683fe['_appendChild'](_0x422562);}return _0x5683fe;}function N(_0x9d21ec,_0x44f517=!0x0){const _0x2075d3=new _0x4acc47();return _0x2075d3['rootName']=_0x9d21ec,_0x2075d3['_isAttached']=_0x44f517,_0x2075d3['isAttached']=()=>_0x2075d3['_isAttached'],_0x2075d3;}function P(_0x50834a,_0x32e337,_0x398c9a){const _0x56e2d4='elementEnd'==_0x50834a['type']?_0x398c9a['createPositionAt'](_0x50834a['item'],'end'):_0x398c9a['createPositionBefore'](_0x50834a['item']);return _0x398c9a['createPositionFromPath'](_0x32e337,_0x56e2d4['path'],_0x56e2d4['stickiness']);}function V(_0x150d0b,_0x25a4e3,_0x496da0){const _0x24387d='elementStart'==_0x150d0b['type']?_0x496da0['createPositionAt'](_0x150d0b['item'],0x0):_0x496da0['createPositionAfter'](_0x150d0b['item']);return _0x496da0['createPositionFromPath'](_0x25a4e3,_0x24387d['path'],_0x24387d['stickiness']);}class me extends/* #__PURE__ -- @preserve */
|
|
25
|
+
_0x3e4178(_0x2fbdbb){['focusTracker'];['keystrokes'];['revisionNameInputView'];constructor(_0x9a4878,_0x7c7478){super(_0x9a4878),this['focusTracker']=new _0x5e9135(),this['keystrokes']=new _0x2dfea2(),this['set']('revisionNameInputValue',''),this['revisionNameInputView']=this['_createRevisionNameInput'](_0x7c7478),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'](),_0x509542({'view':this}),this['focusTracker']['add'](this['revisionNameInputView']['element']),this['keystrokes']['listenTo'](this['element']);const _0x8e70dc=_0x19ca4d=>_0x19ca4d['stopPropagation']();this['keystrokes']['set']('arrowright',_0x8e70dc),this['keystrokes']['set']('arrowleft',_0x8e70dc),this['keystrokes']['set']('arrowup',_0x8e70dc),this['keystrokes']['set']('arrowdown',_0x8e70dc);}['focus'](){this['revisionNameInputView']['focus']();}get['revisionName'](){return this['revisionNameInputView']['fieldView']['element']['value']['trim']();}set['revisionName'](_0x1b9f91){this['revisionNameInputView']['fieldView']['element']['value']=_0x1b9f91['trim']();}['reset'](){this['revisionNameInputView']['fieldView']['element']['value']='',this['revisionNameInputView']['errorText']=null;}['_createRevisionNameInput'](_0x376d1a){const _0x3fcfac=new et(this['locale'],ti),_0x481db6=_0x3fcfac['fieldView'];_0x481db6['extendTemplate']({'attributes':{'maxlength':'220'}});let _0x2d5a4e=m(this['locale'],'Name\x20of\x20the\x20revision');return!_0x376d1a&&(_0x2d5a4e+='\x20('+m(this['locale'],'optional')+')'),(_0x3fcfac['label']=_0x2d5a4e,_0x481db6['on']('input',()=>{this['revisionNameInputValue']=_0x481db6['element']['value']['trim']();}),_0x3fcfac);}}class l extends _0x2a9b7d{static get['pluginName'](){return'RevisionHistoryUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[h];}['_saveRevisionFormView'];['init'](){const _0x148559=this['editor'],_0x84aa07=_0x148559['plugins']['get']('RevisionTracker');_0x148559['ui']['componentFactory']['add']('revisionHistory',_0x9792bc=>{const _0x43f82a=_0x255985(_0x9792bc),_0x5d0b8b=_0x43f82a['panelView']['children'],_0x3b393b=new _0x22e049(_0x9792bc),_0x1a4ebd=new _0x57cc36(_0x9792bc),_0x2c1994=new _0x4eab8d(_0x9792bc),_0x4925e0=new _0x57cc36(_0x9792bc),_0x964ce4=new _0x4eab8d(_0x9792bc);return _0x43f82a['bind']('isEnabled')['to'](_0x84aa07,'isReady',_0x84aa07,'isEnabled',_0x148559,'isReadOnly',(_0x108d78,_0x329265,_0x22b009)=>_0x108d78&&_0x329265&&!_0x22b009),_0x43f82a['buttonView']['set']({'icon':_0x1c8430,'label':m(_0x9792bc,'Revision\x20history'),'tooltip':!0x0}),_0x2c1994['set']({'label':m(_0x9792bc,'Save\x20current\x20revision'),'withText':!0x0,'role':'menuitem'}),_0x2c1994['bind']('isEnabled')['to'](_0x84aa07,'isReady',_0x84aa07,'isEnabled',_0x148559,'isReadOnly',(_0x3b8e81,_0x36c952,_0x5e15df)=>_0x3b8e81&&_0x36c952&&!_0x5e15df),_0x2c1994['on']('execute',()=>this['_showDialog']()),_0x964ce4['set']({'label':m(_0x9792bc,'Open\x20revision\x20history'),'withText':!0x0,'role':'menuitem'}),_0x964ce4['bind']('isEnabled')['to'](_0x84aa07,'isReady',_0x148559,'isReadOnly',(_0x3c2b96,_0x1339db)=>_0x3c2b96&&!_0x1339db),_0x964ce4['on']('execute',()=>{_0x148559['config']['get']('revisionHistory')['showRevisionViewerCallback'](),_0x43f82a['isOpen']=!0x1,_0x148559['editing']['view']['focus']();}),_0x1a4ebd['children']['add'](_0x2c1994),_0x4925e0['children']['add'](_0x964ce4),_0x3b393b['role']='menu',_0x3b393b['items']['addMany']([_0x1a4ebd,_0x4925e0]),_0x5d0b8b['add'](_0x3b393b),_0x43f82a;}),_0x148559['ui']['componentFactory']['add']('menuBar:revisionHistory',()=>this['_registerMenuComponent']());}['_registerMenuComponent'](){const _0x57b65d=this['editor'],_0x1a6cf6=_0x57b65d['locale'],_0x373d99=new _0x1f9121(_0x1a6cf6),_0xd964af=new _0x27fd85(_0x1a6cf6);_0x373d99['buttonView']['set']({'icon':_0x1c8430,'label':m(_0x1a6cf6,'Revision\x20history')});const _0x5a0a6b=new _0x3b1214(_0x1a6cf6,_0x373d99),_0x3ad6cc=new _0x1c5f84(_0x1a6cf6);_0x3ad6cc['set']({'label':m(_0x1a6cf6,'Save\x20current\x20revision')}),_0x3ad6cc['delegate']('execute')['to'](_0x373d99),_0x3ad6cc['on']('execute',()=>{this['_showDialog']();}),_0x5a0a6b['children']['add'](_0x3ad6cc),_0xd964af['items']['add'](_0x5a0a6b);const _0x58fabf=new _0x3b1214(_0x1a6cf6,_0x373d99),_0x44c41f=new _0x1c5f84(_0x1a6cf6);return _0x44c41f['set']({'label':m(_0x1a6cf6,'Open\x20revision\x20history')}),_0x44c41f['delegate']('execute')['to'](_0x373d99),_0x44c41f['on']('execute',()=>{_0x57b65d['config']['get']('revisionHistory')['showRevisionViewerCallback']();}),_0x58fabf['children']['add'](_0x44c41f),_0xd964af['items']['add'](_0x58fabf),_0x373d99['panelView']['children']['add'](_0xd964af),_0x373d99;}['_showDialog'](){const _0x381561=this['editor'],_0x59199d=_0x381561['locale'],_0x24e27d=_0x381561['plugins']['get']('Dialog'),_0x486700=_0x381561['plugins']['get']('RevisionTracker');function _0x4e0d69(_0x12641c){_0x381561['config']['get']('revisionHistory.requireRevisionName')&&''===_0x12641c['revisionName']?_0x12641c['revisionNameInputView']['errorText']=m(_0x59199d,'The\x20revision\x20name\x20cannot\x20be\x20empty.'):(_0x381561['plugins']['get'](h)['saveRevision']({'name':_0x12641c['revisionName']}),_0x24e27d['hide']());}this['_saveRevisionFormView']||(this['_createSaveRevisionFormView'](),this['_saveRevisionFormView']['on']('submit',()=>_0x4e0d69(this['_saveRevisionFormView']))),this['_saveRevisionFormView']['reset'](),_0x24e27d['show']({'id':'revisionSave','title':m(_0x59199d,'Save\x20current\x20revision'),'isModal':!0x0,'content':this['_saveRevisionFormView'],'actionButtons':[{'label':m(_0x381561['locale'],'Cancel'),'withText':!0x0,'onExecute':()=>_0x24e27d['hide']()},{'label':m(_0x381561['locale'],'Accept'),'class':'ck-button-action','withText':!0x0,'onCreate'(_0x50b2a9){_0x50b2a9['bind']('isEnabled')['to'](_0x486700,'isReady',_0x486700,'isEnabled',_0x381561,'isReadOnly',(_0x5312c4,_0x21938a,_0x143f11)=>_0x5312c4&&_0x21938a&&!_0x143f11);},'onExecute':()=>_0x4e0d69(this['_saveRevisionFormView'])}]});}['_createSaveRevisionFormView'](){const _0x2a220b=this['editor'],_0x12d551=_0x2a220b['locale'];this['_saveRevisionFormView']=new me(_0x12d551,_0x2a220b['config']['get']('revisionHistory.requireRevisionName')),this['_saveRevisionFormView']['render']();}}class z extends _0x2fbdbb{['changeId'];['_model'];constructor(_0x4ae861,_0x148d54){super(_0x4ae861),this['_model']=_0x148d54,this['changeId']=_0x148d54['id'];const _0x453686=this['bindTemplate'],_0xdf6c73=m(_0x4ae861,_0x148d54['data']['isSuggestion']?'Suggested\x20by':'add'==_0x148d54['type']?'Added\x20by':'Removed\x20by');this['set']('type',_0x148d54['type']),this['setTemplate']({'tag':'div','attributes':{'class':['ck-annotation','ck-revision-change',_0x453686['to']('type',_0x18d24a=>'ck-revision-change__'+_0x18d24a)],'tabindex':-0x1},'children':[{'tag':'span','children':[{'tag':'span','attributes':{'class':['ck-revision-change__label']},'children':[{'text':_0xdf6c73}]},{'text':'\x20'+_0x148d54['author']['name']}]}]});}['focus'](){this['element']['focus']();}}class G extends/* #__PURE__ -- @preserve */
|
|
26
|
+
_0xd36abb(){['id'];['author'];['type'];['data'];['rootName'];constructor(_0x169454){super(),this['id']=_0x169454['id']||_0x422234(),this['author']=_0x169454['author'],this['type']=_0x169454['type'],this['data']=_0x169454['data']||{},this['rootName']=_0x169454['rootName'],this['set']('createdAt',_0x169454['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(_0x534f5b,_0x2aae3e){this['newRevisionId']=_0x534f5b,this['oldRevisionId']=_0x2aae3e,this['changes']=new _0xb670b4();}['_setChanges'](_0x292958){for(const _0x4282da of _0x292958)this['changes']['add'](_0x4282da);}}class u extends _0x2a9b7d{['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[_0x58b4bf,_0x5348c1,S,$];}constructor(_0x2ff834){super(_0x2ff834),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',(_0x5c1bb7,_0x22c8a7,_0x38f206)=>{this['activeChange']=null,this['activeView']=null,this['editor']['editing']['view']['change'](_0x43d0c3=>{for(const _0x18b023 of this['editor']['editing']['view']['document']['roots'])_0x38f206?_0x43d0c3['removeClass']('ck-editor__editable__overlay',_0x18b023):_0x43d0c3['addClass']('ck-editor__editable__overlay',_0x18b023);});}),this['bind']('isNavigationMode')['to'](this,'activeChange',_0x5086ae=>null!==_0x5086ae),this['bind']('currentChangeNumber')['to'](this,'isReady',this,'diff',this,'activeChange',(_0xd0ce6e,_0x112427,_0x4ac330)=>_0xd0ce6e&&_0x4ac330?_0x112427['changes']['getIndex'](_0x4ac330):0x0),this['bind']('numberOfChanges')['to'](this,'isReady',this,'diff',(_0x410846,_0xe7052c)=>_0x410846?_0xe7052c['changes']['length']:0x0),this['_changeView']=null,this['_changeIdToChange']=new Map(),this['_balloon']=this['editor']['plugins']['get'](_0x5348c1);}['init'](){const _0x6f7d10=this['editor'],_0x471348=new rt(_0x6f7d10,{'direction':'backward'}),_0x10952e=new rt(_0x6f7d10,{'direction':'forward'});(_0x6f7d10['commands']['add']('showPreviousChange',_0x471348),_0x6f7d10['commands']['add']('showNextChange',_0x10952e),_0x6f7d10['commands']['add']('restoreRevision',new nt(_0x6f7d10)),this['on']('change:numberOfChanges',()=>{_0x471348['refresh'](),_0x10952e['refresh']();}),this['_setConversion'](),this['_initInteractions'](),_0x6f7d10['enableReadOnlyMode']('revision-viewer'),_0x6f7d10['plugins']['has']('WidgetToolbarRepository'))&&_0x6f7d10['plugins']['get']('WidgetToolbarRepository')['forceDisabled']('revision-viewer');}async['getRevisionDocumentData'](_0x1c3e5f){return await this['_utils']['loadRevisionData'](_0x1c3e5f,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x1c3e5f);}async['getRevisionRootsAttributes'](_0x305f21){return await this['_utils']['loadRevisionData'](_0x305f21,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x305f21);}async['compare'](_0x49e974,_0x162ad1,_0x1fd60b=!0x1){if(!this['isEnabled'])return;const _0x577973=this['diff'],_0xbcfbe0=this['repository'],_0x52e907='string'==typeof _0x49e974?_0xbcfbe0['getRevision'](_0x49e974):_0x49e974,_0x51a74c='string'==typeof _0x162ad1?_0xbcfbe0['getRevision'](_0x162ad1):_0x162ad1,_0x2ef11e=_0x52e907['id'],_0x7f7808=_0x51a74c?_0x51a74c['id']:null;if(!_0x1fd60b&&this['diff']&&this['diff']['newRevisionId']===_0x2ef11e&&this['diff']['oldRevisionId']===_0x7f7808)return Promise['resolve']();this['isReady']=!0x1,this['activeView']=null,this['activeChange']=null,this['diff']=new J(_0x2ef11e,_0x7f7808);const _0x2f1b3d=this['_getRevisionsRange'](_0x52e907,_0x51a74c,!0x0)['map'](_0x2afa0d=>this['_utils']['loadRevisionData'](_0x2afa0d,this['adapter']));return _0x2f1b3d['push'](new Promise(_0x347de6=>{setTimeout(_0x347de6,0x14);})),Promise['all'](_0x2f1b3d)['then'](()=>{if(!this['isEnabled'])return;this['_cleanUp']();const _0x465f85=this['_getDiff'](_0x2ef11e,_0x7f7808);for(const _0x1f7f22 of _0x465f85['changes'])this['_changeIdToChange']['set'](_0x1f7f22['id'],_0x1f7f22);this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x4c3f2d=>{for(const _0x44f931 of this['editor']['model']['document']['getRootNames']())_0x4c3f2d['detachRoot'](_0x44f931);for(const _0x548d5d of Object['keys'](_0x465f85['model'])){const _0x702b8=_0x4c3f2d['addRoot'](_0x548d5d);for(const _0x51690b of Object['keys'](_0x465f85['attributes'][_0x548d5d]))_0x4c3f2d['setAttribute'](_0x51690b,_0x465f85['attributes'][_0x548d5d][_0x51690b],_0x702b8);_0x4c3f2d['insert'](_0x465f85['model'][_0x548d5d],_0x702b8,0x0);}}),this['diff']['_setChanges'](this['_sortAndFilterDiffChanges'](_0x465f85['changes'])),this['isReady']=!0x0;})['catch'](_0x21f4f1=>{console['error'](_0x21f4f1),this['_cleanUp'](),_0x577973&&(this['diff']=_0x577973),this['isReady']=!0x0;});}['addRevisionData'](_0x405133,_0xb71365){const _0x25c331=this['repository']['createRevision'](_0x405133);return _0x25c331['on']('_update',(_0x27ae7e,_0x252ea3,_0x25c67d)=>_0xb71365(_0x252ea3,_0x25c67d,_0x25c331)),this['repository']['addRevision'](_0x25c331),_0x25c331;}['_cleanUp'](){this['activeChange']=null,this['_cleanMarkers'](),this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=null,this['_changeIdToChange']['clear'](),this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x24c14c=>{for(const _0x41ea26 of this['editor']['model']['document']['getRootNames']())_0x24c14c['detachRoot'](_0x41ea26);});}['_sortAndFilterDiffChanges'](_0x18c979){const _0x4f85fc=[],_0x4922bb=new Map();for(const _0x51e272 of this['editor']['model']['document']['getRootNames']()){const _0x411b2b=this['editor']['editing']['view']['getDomRoot'](_0x51e272);if(!_0x411b2b)continue;const _0x55dd24=_0x411b2b['getClientRects']()['item'](0x0);_0x55dd24&&(_0x4f85fc['push'](_0x51e272),_0x4922bb['set'](_0x51e272,_0x55dd24));}return _0x4f85fc['sort']((_0x1c2565,_0x56092f)=>{const _0x3fc30f=_0x4922bb['get'](_0x1c2565),_0x1f5294=_0x4922bb['get'](_0x56092f);return _0x3fc30f['y']-_0x1f5294['y']||_0x3fc30f['x']-_0x1f5294['x'];}),(_0x18c979=_0x18c979['filter'](_0x3e014d=>_0x4f85fc['includes'](_0x3e014d['rootName'])))['sort']((_0x3beb3f,_0x3a0480)=>_0x4f85fc['indexOf'](_0x3beb3f['rootName'])-_0x4f85fc['indexOf'](_0x3a0480['rootName'])),_0x18c979;}['_makeTape'](_0x3f72aa){const _0x3e3641=Array['from'](_0x3f72aa['markers'])['filter'](([_0x2e5308,_0x4e2a78])=>_0x2e5308['startsWith']('revision:')&&!_0x4e2a78['isCollapsed']),_0x58fa44=Array['from'](this['editor']['model']['createRangeIn'](_0x3f72aa)['getWalker']({'singleCharacters':!0x0}));if(0x0!=_0x3e3641['length'])for(const _0x57d8d7 of _0x58fa44){const [_0x19b374,_0x38713e]=_0x3e3641[0x0],[,_0x43c58f,_0x4290ec]=_0x19b374['split'](':');if(_0x38713e['end']['isEqual'](_0x57d8d7['nextPosition'])&&_0x3e3641['shift'](),(_0x57d8d7['previousPosition']['isEqual'](_0x38713e['start'])||_0x57d8d7['previousPosition']['isAfter'](_0x38713e['start']))&&('insertion'==_0x43c58f?_0x57d8d7['isAdded']={'userId':_0x4290ec}:'deletion'==_0x43c58f&&(_0x57d8d7['isRemoved']={'userId':_0x4290ec})),0x0==_0x3e3641['length'])break;}return _0x58fa44;}['_refreshStartEndIndex'](_0xe6a8b6){const _0x5436d5=new Map();for(let _0x4aca1a=0x0;_0x4aca1a<_0xe6a8b6['length'];_0x4aca1a++)'text'===_0xe6a8b6[_0x4aca1a]['type']?(_0xe6a8b6[_0x4aca1a]['item']['startIndex']=_0x4aca1a,_0xe6a8b6[_0x4aca1a]['item']['endIndex']=_0x4aca1a):('elementStart'===_0xe6a8b6[_0x4aca1a]['type']?_0xe6a8b6[_0x4aca1a]['item']['startIndex']=_0x4aca1a:'elementEnd'===_0xe6a8b6[_0x4aca1a]['type']&&(_0xe6a8b6[_0x4aca1a]['item']['endIndex']=_0x4aca1a),_0x5436d5['set'](_0xe6a8b6[_0x4aca1a]['id'],_0x4aca1a));for(const _0x25ad33 of _0x5436d5['values']())'elementStart'===_0xe6a8b6[_0x25ad33]['type']?_0xe6a8b6[_0x25ad33]['item']['endIndex']=_0x5436d5['get'](_0xe6a8b6[_0x25ad33]['pairId']):'elementEnd'===_0xe6a8b6[_0x25ad33]['type']&&(_0xe6a8b6[_0x25ad33]['item']['startIndex']=_0x5436d5['get'](_0xe6a8b6[_0x25ad33]['pairId']));}['_processTape'](_0x9d3052){for(let _0x3936f6=0x0;_0x3936f6<_0x9d3052['length'];_0x3936f6++){if('elementStart'===_0x9d3052[_0x3936f6]['type'])_0x9d3052[_0x3936f6]['item']['startIndex']=_0x3936f6;else{if('elementEnd'===_0x9d3052[_0x3936f6]['type']){_0x9d3052[_0x3936f6]['item']['endIndex']=_0x3936f6;const _0x168fa6=_0x9d3052[_0x3936f6]['item']['startIndex'];_0x9d3052[_0x168fa6]['pairId']=_0x9d3052[_0x3936f6]['id'],_0x9d3052[_0x3936f6]['pairId']=_0x9d3052[_0x168fa6]['id'];}else _0x9d3052[_0x3936f6]['item']['startIndex']=_0x3936f6,_0x9d3052[_0x3936f6]['item']['endIndex']=_0x3936f6,_0x9d3052[_0x3936f6]['pairId']=null;}_0x9d3052[_0x3936f6]['markersStart']||(_0x9d3052[_0x3936f6]['markersStart']=[],_0x9d3052[_0x3936f6]['markersEnd']=[]);}}['_markInsertions'](_0x636849,_0x756e53){const _0x15c6be=_0x636849['filter'](_0x1bb75a=>!_0x1bb75a['isAdded']);for(let _0xc33882=0x0;_0xc33882<_0x756e53['length'];_0xc33882++)_0x756e53[_0xc33882]['isAdded']&&(_0x15c6be[_0xc33882]['isAdded']=_0x756e53[_0xc33882]['isAdded']);}['_getDiff'](_0x15ef57,_0x4978ec=null){const _0x18f7b6=this['repository']['getRevision'](_0x15ef57),_0x145513=_0x4978ec?this['repository']['getRevision'](_0x4978ec):null,_0x1a00ea=this['_getRevisionsRange'](_0x18f7b6,_0x145513),_0x5e5078=_0x1a00ea[_0x1a00ea['length']-0x1],_0x96c57c=new Map(),_0x28c3db={'model':{},'attributes':{},'changes':[]},_0x31b669=new Set(),_0x28de15=new Map();for(let _0x3befd0=_0x1a00ea['length']-0x1;_0x3befd0>=0x0;_0x3befd0--){const _0x3a5f9e=_0x1a00ea[_0x3befd0];for(const _0x3d231c of Object['keys'](_0x3a5f9e['diffData']))if(_0x3a5f9e['diffData'][_0x3d231c]['attachChange']){const _0x5812ca=_0x3a5f9e['diffData'][_0x3d231c]['attachChange'];_0x5812ca['isAttached']?(_0x31b669['add'](_0x3d231c),_0x28de15['has'](_0x3d231c)&&_0x28de15['get'](_0x3d231c)['userId']==_0x5812ca['userId']?_0x28de15['delete'](_0x3d231c):_0x28de15['set'](_0x3d231c,_0x5812ca)):_0x28de15['has'](_0x3d231c)?(_0x31b669['delete'](_0x3d231c),_0x28de15['delete'](_0x3d231c)):(_0x31b669['add'](_0x3d231c),_0x28de15['set'](_0x3d231c,_0x5812ca));}else _0x31b669['add'](_0x3d231c);}for(const _0x5039c9 of _0x31b669){const _0x3fbbe3=_0x28de15['has'](_0x5039c9)&&!_0x28de15['get'](_0x5039c9)['isAttached'];let _0xd66015=_0x3fbbe3?_0x1a00ea['length']-0x1:0x0;const _0x31f06d=_0x3fbbe3?-0x1:0x1;for(;_0x1a00ea[_0xd66015];){const _0x10fc23=_0x1a00ea[_0xd66015];if(_0x10fc23['diffData'][_0x5039c9]){const _0xbeab10=_0x3fbbe3?_0x10fc23['diffData'][_0x5039c9]['attributesBefore']:_0x10fc23['diffData'][_0x5039c9]['attributesAfter'];_0x28c3db['attributes'][_0x5039c9]=_0xbeab10?_0x4dcfba(_0xbeab10):{};break;}_0xd66015+=_0x31f06d;}}for(const _0x1aa856 of _0x1a00ea){_0x1aa856['model']={};for(const _0x2e6561 of _0x1aa856['authors'])_0x96c57c['set'](_0x2e6561['id'],_0x2e6561);for(const _0xa0741 of _0x31b669){const _0x31e17d=_0x1aa856['diffData'][_0xa0741]?_0x1aa856['diffData'][_0xa0741]['insertions']:'[]',_0x227101=_0x1aa856['diffData'][_0xa0741]?_0x1aa856['diffData'][_0xa0741]['deletions']:'[]';_0x1aa856['model'][_0xa0741]={'insertions':this['_utils']['_makeModelFromViewString'](_0x31e17d),'deletions':this['_utils']['_makeModelFromViewString'](_0x227101)};}}for(const _0x507da1 of _0x31b669){let _0x402871=null,_0x89e456=0x0;const _0x8b043f=new Map(Array['from'](_0x18f7b6['model'][_0x507da1]['insertions']['markers'])['filter'](([_0x5c5279])=>!_0x5c5279['startsWith']('revision:')));let _0x1c37a2=0x0;for(const _0xb38810 of _0x1a00ea){const _0x1a5f72=this['_makeTape'](_0xb38810['model'][_0x507da1]['insertions']);_0xb38810==_0x18f7b6?(_0x402871=_0x1a5f72,_0x89e456=_0x402871['length'],_0x402871['forEach'](_0x56f4ea=>{_0x56f4ea['id']=_0x1c37a2++;}),this['_processTape'](_0x402871)):this['_markInsertions'](_0x402871,_0x1a5f72);const _0xda9ca7=_0x402871['filter'](_0x1afa3a=>!_0x1afa3a['isAdded'])['map'](_0x582d11=>_0x582d11['id']);let _0x4bad14=0x0;const _0x33ddef=this['_makeTape'](_0xb38810['model'][_0x507da1]['deletions']);_0x33ddef['forEach'](_0x18141b=>{_0x18141b['isRemoved']?_0x18141b['id']=_0x89e456++:_0x18141b['id']=_0xda9ca7[_0x4bad14++];}),this['_processTape'](_0x33ddef),this['_setDistance'](_0x402871,'isAdded'),this['_setDistance'](_0x33ddef,'isRemoved'),_0xb38810==_0x18f7b6&&this['_markMarkers'](_0x402871,_0x8b043f),_0x402871=this['_joinTapes'](_0x402871,_0x33ddef),this['_refreshStartEndIndex'](_0x402871),this['_setDistance'](_0x402871,'isRemoved');}_0x402871=_0x402871['filter'](_0xf3d65c=>!(_0xf3d65c['isAdded']&&_0xf3d65c['isRemoved']));const _0x212252=new Map(_0x5e5078['model'][_0x507da1]['deletions']['markers']),_0x136a20=new Set(_0x8b043f['keys']());for(const _0x4c8d21 of _0x212252['keys']())_0x136a20['delete'](_0x4c8d21);this['_markSuggestions'](_0x402871,_0x136a20),this['_fixObsoleteTags'](_0x402871),_0x402871=this['_removeMissingPairs'](_0x402871),_0x402871=this['_markMismatchedRemovedTags'](_0x402871),_0x402871=this['_removeUnsupportedChanges'](_0x402871);const {root:_0x495f9a,changes:_0x407241}=this['_makeModelFromTape'](_0x402871,_0x96c57c,_0x507da1);_0x28c3db['model'][_0x507da1]=_0x495f9a;const _0x4f4ae4=_0x28de15['get'](_0x507da1);if(_0x4f4ae4){const _0x187959=_0x96c57c['get'](_0x4f4ae4['userId']),_0x4724b4=new G({'author':_0x187959,'type':_0x4f4ae4['isAttached']?'add':'remove','data':{'isOnRoot':!0x0},'createdAt':new Date(),'rootName':_0x507da1});_0x407241['unshift'](_0x4724b4),_0x28c3db['attributes'][_0x507da1]['revisionHistoryAttachChange']=_0x4724b4['id'];}_0x28c3db['changes']=_0x28c3db['changes']['concat'](_0x407241);}return _0x28c3db;}['_markMarkers'](_0x356b04,_0x1b04fb){for(let _0x285b34=0x0;_0x285b34<_0x356b04['length'];_0x285b34++)for(const [_0x362423,_0x1a696e]of _0x1b04fb)!_0x1a696e['isCollapsed']&&_0x1a696e['start']['isEqual'](_0x356b04[_0x285b34]['previousPosition'])&&_0x356b04[_0x285b34]['markersStart']['push'](_0x362423),_0x1a696e['end']['isEqual'](_0x356b04[_0x285b34]['nextPosition'])&&_0x356b04[_0x285b34]['markersEnd']['push'](_0x362423);}['_joinTapes'](_0x2416d5,_0x23561d){let _0x31144d=[],_0x3cef42=0x0,_0x48e47a=0x0;for(;_0x3cef42<_0x2416d5['length']||_0x48e47a<_0x23561d['length'];){const _0x4d2d2e=_0x2416d5[_0x3cef42]||{},_0x360691=_0x23561d[_0x48e47a]||{};if(_0x4d2d2e['id']==_0x360691['id'])_0x3cef42++,_0x48e47a++,_0x31144d['push'](_0x4d2d2e);else{if(_0x360691['isRemoved']&&_0x4d2d2e['isAdded']){const {commonTape:_0x1e415b,iEnd:_0x5cf1b0,jEnd:_0x573fb3}=this['_threeWayMerge'](_0x2416d5,_0x3cef42,_0x23561d,_0x48e47a);_0x31144d=_0x31144d['concat'](_0x1e415b),_0x3cef42=_0x5cf1b0,_0x48e47a=_0x573fb3;}else _0x360691['isRemoved']?(_0x48e47a++,_0x31144d['push'](_0x360691)):(_0x3cef42++,_0x31144d['push'](_0x4d2d2e));}}return _0x31144d;}['_markSuggestions'](_0x2de346,_0x3603ba){const _0x318668=[];for(let _0x1fbab2=0x0;_0x1fbab2<_0x2de346['length'];_0x1fbab2++){for(let _0x55d132=0x0;_0x55d132<_0x2de346[_0x1fbab2]['markersStart']['length'];_0x55d132++){const _0x407770=_0x2de346[_0x1fbab2]['markersStart'][_0x55d132];if(!_0x3603ba['has'](_0x407770))continue;const {group:_0x1acec7,type:_0x2065f7,authorId:_0x303cfc}=_0x34425a(_0x407770);'revision-suggestion'!=_0x1acec7||'insertion'!=_0x2065f7&&'deletion'!=_0x2065f7||(_0x318668['unshift']({'type':_0x2065f7,'name':_0x407770,'userId':_0x303cfc}),_0x2de346[_0x1fbab2]['markersStart']['splice'](_0x55d132,0x1),_0x55d132--);}_0x4dc872(_0x2de346[_0x1fbab2]);for(let _0x347d31=0x0;_0x347d31<_0x2de346[_0x1fbab2]['markersEnd']['length'];_0x347d31++){const _0x159479=_0x2de346[_0x1fbab2]['markersEnd'][_0x347d31];if(!_0x3603ba['has'](_0x159479))continue;const {group:_0x3e2835,type:_0x8964f7}=_0x34425a(_0x159479);if('revision-suggestion'!=_0x3e2835||'insertion'!=_0x8964f7&&'deletion'!=_0x8964f7)continue;_0x2de346[_0x1fbab2]['markersEnd']['splice'](_0x347d31,0x1),_0x347d31--;const _0x4f27fe=_0x318668['findIndex'](_0x406199=>_0x406199['name']==_0x159479);_0x4f27fe>-0x1&&_0x318668['splice'](_0x4f27fe,0x1);}}function _0x34425a(_0x428f98){const _0x4dac58=_0x428f98['split'](':');return{'group':_0x4dac58[0x0],'type':_0x4dac58[0x1],'subType':_0x4dac58['length']>=0x5?_0x4dac58[0x2]:null,'id':_0x4dac58['length']<0x5?_0x4dac58[0x2]:_0x4dac58[0x3],'authorId':_0x4dac58['length']<0x5?_0x4dac58[0x3]:_0x4dac58[0x4],'markerCount':0x6==_0x4dac58['length']?_0x4dac58[0x5]:null};}function _0x4dc872(_0x43529c){for(let _0x39c1c4=0x0;_0x39c1c4<_0x318668['length'];_0x39c1c4++){if(_0x43529c['isAdded']&&'insertion'==_0x318668[_0x39c1c4]['type']&&_0x43529c['isAdded']['userId']==_0x318668[_0x39c1c4]['userId'])return _0x43529c['isAddSuggestion']=_0x318668[_0x39c1c4],void delete _0x43529c['isAdded'];if(!_0x43529c['isAdded']&&!_0x43529c['isRemoved']&&'deletion'==_0x318668[_0x39c1c4]['type'])return void(_0x43529c['isRemoveSuggestion']=_0x318668[_0x39c1c4]);}}}['_setDistance'](_0x28116e,_0x317305){let _0x5f4c7f=0x0,_0x559bb0=!0x1;const _0x8389bc=new Map();for(const _0x4ac269 of _0x28116e)_0x4ac269[_0x317305]?_0x559bb0&&(_0x5f4c7f++,_0x559bb0=!0x1):(_0x5f4c7f++,_0x559bb0=!0x0),_0x8389bc['set'](_0x4ac269['id'],_0x5f4c7f);for(let _0x3adbc3=0x0;_0x3adbc3<_0x28116e['length'];_0x3adbc3++){if('isRemoved'==_0x317305&&_0x28116e[_0x3adbc3]['isAdded']||'isAdded'==_0x317305&&_0x28116e[_0x3adbc3]['isRemoved'])continue;if('text'==_0x28116e[_0x3adbc3]['type']){_0x28116e[_0x3adbc3]['distance']=0x0;continue;}const _0x10b0b7=_0x8389bc['get'](_0x28116e[_0x3adbc3]['pairId']),_0x48edec=_0x8389bc['get'](_0x28116e[_0x3adbc3]['id']);_0x28116e[_0x3adbc3]['distance']=_0x10b0b7-_0x48edec;}}['_getRevisionsRange'](_0x5cc287,_0x3edb5e,_0x18a64d=!0x1){const _0x10844a=[];let _0x5d075f=this['repository']['getIndex'](_0x5cc287),_0x58577b=this['repository']['getIndex'](_0x3edb5e);for(-0x1==_0x58577b&&(_0x58577b=this['repository']['_revisions']['length'],_0x18a64d=!0x1);_0x5d075f<_0x58577b;)_0x10844a['push'](this['repository']['getRevision'](_0x5d075f)),_0x5d075f++;return _0x18a64d&&_0x10844a['push'](this['repository']['getRevision'](_0x5d075f)),_0x10844a;}['_threeWayMerge'](_0x2a3b86,_0x3ee16d,_0xa560ff,_0x3ba2a0){const _0x41c63d=this['editor']['model']['schema'];let _0x2afd76=_0x3ee16d;for(;_0x2a3b86[_0x2afd76]&&_0x2a3b86[_0x2afd76]['isAdded'];)_0x2afd76++;let _0x2f1cf5=_0x3ba2a0;for(;_0xa560ff[_0x2f1cf5]&&_0xa560ff[_0x2f1cf5]['isRemoved'];)_0x2f1cf5++;_0x3a0d31(_0x2a3b86,_0x3ee16d,_0x2afd76),_0x3a0d31(_0xa560ff,_0x3ba2a0,_0x2f1cf5);const _0x6ed19d=_0xa560ff['slice'](_0x3ba2a0,_0x2f1cf5)['concat'](_0x2a3b86['slice'](_0x3ee16d,_0x2afd76));return _0x6ed19d['sort']((_0x4be819,_0x47d2d4)=>_0x4be819['side']!=_0x47d2d4['side']?_0x4be819['side']-_0x47d2d4['side']:_0x4be819['level']!=_0x47d2d4['level']?_0x4be819['level']-_0x47d2d4['level']:_0x4be819['distance']!=_0x47d2d4['distance']?_0x47d2d4['distance']-_0x4be819['distance']:!!_0x4be819['isAdded']!=!!_0x47d2d4['isAdded']?-0x1==_0x4be819['side']||0x0==_0x4be819['side']?_0x4be819['isAdded']?-0x1:0x1:_0x4be819['isAdded']?0x1:-0x1:_0x4be819['index']-_0x47d2d4['index']),{'commonTape':_0x6ed19d,'iEnd':_0x2afd76,'jEnd':_0x2f1cf5};function _0x3a0d31(_0x3735ed,_0x2d90a0,_0x4590cf){let _0x484d99=-0x1,_0x396609=Number['POSITIVE_INFINITY'],_0x35d7a9=!0x0;for(let _0x4a4258=_0x2d90a0;_0x4a4258<_0x4590cf;_0x4a4258++)if(_0x41c63d['isInline'](_0x3735ed[_0x4a4258]['item'])||(_0x35d7a9=!0x1),_0x3735ed[_0x4a4258]['item']['startIndex']<_0x2d90a0&&(_0x484d99=_0x4a4258),_0x3735ed[_0x4a4258]['item']['endIndex']>=_0x4590cf){_0x396609=_0x4a4258;break;}_0x35d7a9&&(_0x484d99=_0x4590cf-0x1);for(let _0x5da616=_0x2d90a0;_0x5da616<_0x4590cf;_0x5da616++)_0x3735ed[_0x5da616]['side']=_0x5da616<=_0x484d99?-0x1:_0x5da616<_0x396609?0x0:0x1,_0x3735ed[_0x5da616]['index']=_0x5da616;let _0x4a1246=0x0;for(let _0x229c55=_0x2d90a0;_0x229c55<=_0x484d99;_0x229c55++)0x0==_0x3735ed[_0x229c55]['distance']?_0x3735ed[_0x229c55]['level']=_0x4a1246:(_0x4a1246++,_0x3735ed[_0x229c55]['level']=_0x4a1246,_0x4a1246++);for(let _0x40a642=_0x2d90a0;_0x40a642<_0x4590cf;_0x40a642++)0x0==_0x3735ed[_0x40a642]['side']&&(_0x3735ed[_0x40a642]['level']=_0x4a1246);_0x4a1246=0x0;for(let _0x171ccb=_0x4590cf-0x1;_0x171ccb>=_0x396609;_0x171ccb--)0x0==_0x3735ed[_0x171ccb]['distance']?_0x3735ed[_0x171ccb]['level']=_0x4a1246:(_0x4a1246--,_0x3735ed[_0x171ccb]['level']=_0x4a1246,_0x4a1246--);}}['_fixObsoleteTags'](_0x1dcf26){const _0xd48c4b=new Map(),_0x48b80c=this['editor']['model']['schema'];for(let _0x342ccc=0x1;_0x342ccc<_0x1dcf26['length'];_0x342ccc++){let _0x51b522,_0x55f377,_0x366802;const _0x597394=_0x1dcf26[_0x342ccc],_0x30d092=_0x1dcf26[_0x342ccc-0x1];if('text'==_0x597394['type'])continue;if(_0x597394['type']!=_0x30d092['type'])continue;if(!_0x48b80c['isBlock'](_0x30d092['item'])||_0x48b80c['isLimit'](_0x30d092['item']))continue;if(!_0x48b80c['isBlock'](_0x597394['item'])||_0x48b80c['isLimit'](_0x597394['item']))continue;if((_0x1dcf26[_0x342ccc]['isAdded']||_0x1dcf26[_0x342ccc]['isAddSuggestion'])&&_0x1dcf26[_0x342ccc-0x1]['isRemoved'])_0x51b522=_0x1dcf26[_0x342ccc],_0x55f377=_0x1dcf26[_0x342ccc-0x1],_0x366802=_0x342ccc-0x1;else{if(!_0x1dcf26[_0x342ccc]['isRemoved']||!_0x1dcf26[_0x342ccc-0x1]['isAdded']&&!_0x1dcf26[_0x342ccc-0x1]['isAddSuggestion'])continue;_0x51b522=_0x1dcf26[_0x342ccc-0x1],_0x55f377=_0x1dcf26[_0x342ccc],_0x366802=_0x342ccc;}const _0x5d194f=_0x51b522['level']==_0x55f377['level'],_0x53890c=Math['abs'](_0x51b522['level'])<Math['abs'](_0x55f377['level'])&&0x0==_0x55f377['distance'];(_0x5d194f||_0x53890c)&&(_0xd48c4b['set'](_0x55f377['id'],_0x51b522['id']),_0x1dcf26['splice'](_0x366802,0x1),_0x342ccc--,_0x51b522['isAdded']=!0x1);}for(let _0x19a0fd=0x0;_0x19a0fd<_0x1dcf26['length'];_0x19a0fd++)_0xd48c4b['has'](_0x1dcf26[_0x19a0fd]['pairId'])&&(_0x1dcf26[_0x19a0fd]['pairId']=_0xd48c4b['get'](_0x1dcf26[_0x19a0fd]['pairId']));}['_removeMissingPairs'](_0x55017d){const _0x4708e4=new Set(_0x55017d['map'](_0x5f34de=>_0x5f34de['id']));for(let _0x13ba1d=0x0;_0x13ba1d<_0x55017d['length'];_0x13ba1d++)_0x4708e4['has'](_0x55017d[_0x13ba1d]['pairId'])||0x0==_0x55017d[_0x13ba1d]['distance']||(_0x55017d[_0x13ba1d]['isIncorrect']=!0x0);return _0x55017d['filter'](_0x3d8be2=>!_0x3d8be2['isIncorrect']);}['_markMismatchedRemovedTags'](_0x4be8af){const _0x129101=new Set();for(let _0x2aab3d=0x0;_0x2aab3d<_0x4be8af['length'];_0x2aab3d++){if(_0x129101['has'](_0x4be8af[_0x2aab3d]['id'])&&_0x4be8af[_0x2aab3d]['isRemoved']&&(_0x4be8af[_0x2aab3d]['isIncorrect']=!0x0),_0x4be8af[_0x2aab3d]['isIncorrect'])continue;if(0x0==_0x4be8af[_0x2aab3d]['distance'])continue;if('elementStart'!=_0x4be8af[_0x2aab3d]['type'])continue;if(null==_0x4be8af[_0x2aab3d]['pairId'])continue;let _0x3a059c=_0x2aab3d+0x1,_0x1e0e22=0x0;for(;_0x4be8af[_0x3a059c]['id']!=_0x4be8af[_0x2aab3d]['pairId'];)'elementStart'==_0x4be8af[_0x3a059c]['type']?_0x1e0e22++:'elementEnd'==_0x4be8af[_0x3a059c]['type']&&_0x1e0e22--,_0x3a059c++;if(0x0!=_0x1e0e22){if(_0x4be8af[_0x2aab3d]['isRemoved'])_0x4be8af[_0x2aab3d]['isIncorrect']=!0x0;else{for(;_0x3a059c!=_0x2aab3d;)_0x4be8af[_0x3a059c]['isRemoved']&&0x0!=_0x4be8af[_0x3a059c]['distance']&&(_0x4be8af[_0x3a059c]['isIncorrect']=!0x0,_0x129101['add'](_0x4be8af[_0x3a059c]['pairId'])),_0x3a059c--;}}}return _0x4be8af['filter'](_0x22bcac=>!_0x22bcac['isIncorrect']);}['_removeUnsupportedChanges'](_0x3f001e){const _0x4df80f=this['editor']['model']['schema'];for(let _0x215c32=0x0;_0x215c32<_0x3f001e['length'];_0x215c32++){if(!(_0x3f001e[_0x215c32]['isAdded']||_0x3f001e[_0x215c32]['isAddSuggestion']||_0x3f001e[_0x215c32]['isRemoved']||_0x3f001e[_0x215c32]['isRemoveSuggestion']))continue;if(0x0==_0x3f001e[_0x215c32]['distance'])continue;const _0x372d4c=_0x3f001e[_0x215c32]['item'];_0x4df80f['isBlock'](_0x372d4c)||_0x4df80f['isLimit'](_0x372d4c)||(_0x3f001e[_0x215c32]['isAdded']&&delete _0x3f001e[_0x215c32]['isAdded'],_0x3f001e[_0x215c32]['isAddSuggestion']&&delete _0x3f001e[_0x215c32]['isAddSuggestion'],_0x3f001e[_0x215c32]['isRemoveSuggestion']&&delete _0x3f001e[_0x215c32]['isRemoveSuggestion'],_0x3f001e[_0x215c32]['isRemoved']&&(_0x3f001e[_0x215c32]['isIncorrect']=!0x0));}return _0x3f001e['filter'](_0x50b5fd=>!_0x50b5fd['isIncorrect']);}['_makeModelFromTape'](_0x458291,_0xe946e1,_0x1c2fed){const _0x3872bf=new _0x4acc47(),_0x1b540e=[],_0x56d2b8=new Map(),_0x2bf693=this['editor']['model'],_0x1a8fc5=_0x2bf693['schema'],_0x47ced2=[_0x3872bf],_0x428226={},_0x2eddde={'isAdded':[],'isRemoved':[],'isAddSuggestion':[],'isRemoveSuggestion':[]};let _0x5541e7=null;const _0x351add=[0x0];for(let _0x39e31d=0x0;_0x39e31d<_0x458291['length'];_0x39e31d++)if('elementStart'===_0x458291[_0x39e31d]['type']){_0x458291[_0x39e31d]['previousPosition']=_0x2bf693['createPositionFromPath'](_0x3872bf,_0x351add);const _0x54332d=new _0x514734(_0x458291[_0x39e31d]['item']['name'],_0x458291[_0x39e31d]['item']['getAttributes']());_0x47ced2[0x0]['_appendChild'](_0x54332d),_0x351add['push'](0x0),_0x47ced2['unshift'](_0x54332d),_0x458291[_0x39e31d]['nextPosition']=_0x2bf693['createPositionFromPath'](_0x3872bf,_0x351add);}else'elementEnd'===_0x458291[_0x39e31d]['type']?(_0x47ced2['shift'](),_0x458291[_0x39e31d]['previousPosition']=_0x2bf693['createPositionFromPath'](_0x3872bf,_0x351add),_0x351add['pop'](),_0x351add[_0x351add['length']-0x1]++,_0x458291[_0x39e31d]['nextPosition']=_0x2bf693['createPositionFromPath'](_0x3872bf,_0x351add)):(_0x458291[_0x39e31d]['previousPosition']=_0x2bf693['createPositionFromPath'](_0x3872bf,_0x351add),_0x5541e7?_0x5541e7['_data']+=_0x458291[_0x39e31d]['item']['data']:_0x5541e7=new _0x299020(_0x458291[_0x39e31d]['item']['data'],_0x458291[_0x39e31d]['item']['getAttributes']()),_0x458291[_0x39e31d+0x1]&&'text'===_0x458291[_0x39e31d+0x1]['type']&&_0x5abf12(_0x5541e7,_0x458291[_0x39e31d+0x1]['item'])||(_0x47ced2[0x0]['_appendChild'](_0x5541e7),_0x5541e7=null),_0x351add[_0x351add['length']-0x1]+=_0x458291[_0x39e31d]['item']['offsetSize'],_0x458291[_0x39e31d]['nextPosition']=_0x2bf693['createPositionFromPath'](_0x3872bf,_0x351add));for(let _0x6e672f=0x0;_0x6e672f<_0x458291['length'];_0x6e672f++){const _0x15690d=_0x458291[_0x6e672f]['previousPosition'],_0x64be0e=_0x458291[_0x6e672f]['nextPosition'];for(const _0x30c140 of _0x458291[_0x6e672f]['markersStart'])_0x56d2b8['set'](_0x30c140,{'start':_0x15690d,'end':null});_0x3b3aba('isRemoveSuggestion',_0x6e672f,_0x15690d,_0x64be0e),_0x3b3aba('isAddSuggestion',_0x6e672f,_0x15690d,_0x64be0e),_0x3b3aba('isRemoved',_0x6e672f,_0x15690d,_0x64be0e),_0x3b3aba('isAdded',_0x6e672f,_0x15690d,_0x64be0e);for(const _0x4f7dbf of _0x458291[_0x6e672f]['markersEnd']){const _0x2f008a=_0x56d2b8['get'](_0x4f7dbf);_0x2f008a?_0x2f008a['end']=_0x64be0e:_0x56d2b8['set'](_0x4f7dbf,{'start':_0x64be0e,'end':_0x64be0e});}}for(const [_0x40101f,_0x1d413d]of _0x56d2b8){const _0x3831a4=this['editor']['model']['createRange'](_0x1d413d['start'],_0x1d413d['end']);_0x3872bf['markers']['set'](_0x40101f,_0x3831a4);}return _0x1b540e['sort']((_0xac0f19,_0x236875)=>{const _0x30789c=_0x3872bf['markers']['get']('revision:'+_0xac0f19['id']),_0x103bff=_0x3872bf['markers']['get']('revision:'+_0x236875['id']);return _0x30789c['start']['isBefore'](_0x103bff['start'])?-0x1:_0x30789c['start']['isAfter'](_0x103bff['start'])?0x1:_0x30789c['end']['isBefore'](_0x103bff['end'])?-0x1:_0x30789c['end']['isAfter'](_0x103bff['end'])?0x1:'add'===_0xac0f19['type']?-0x1:0x1;}),{'root':_0x3872bf,'changes':_0x1b540e};function _0x3b3aba(_0x221622,_0x27726e,_0x205c45,_0x38b96b){const _0x40be45=!!_0x458291[_0x27726e][_0x221622],_0x2bce37=_0x40be45?_0x458291[_0x27726e][_0x221622]['userId']:null,_0x41c1ab=_0x27726e===_0x458291['length']-0x1,_0x1ea2cc=_0x2eddde[_0x221622][0x0],_0x4a21a2=_0x1a8fc5['isObject'](_0x458291[_0x27726e]['item']);!_0x428226[_0x221622]&&_0x40be45?_0x428226[_0x221622]={'start':_0x205c45,'tapeItem':_0x458291[_0x27726e],'userId':_0x2bce37,'type':_0x221622}:_0x428226[_0x221622]&&!_0x40be45?(_0x428226[_0x221622]['end']=_0x205c45,_0x40ff05(_0x428226[_0x221622]),_0x428226[_0x221622]=null):_0x428226[_0x221622]&&_0x40be45&&_0x428226[_0x221622]['userId']!==_0x2bce37&&(_0x428226[_0x221622]['end']=_0x205c45,_0x1ea2cc&&_0x1ea2cc['userId']===_0x428226[_0x221622]['userId']||_0x40ff05(_0x428226[_0x221622]),_0x428226[_0x221622]={'start':_0x205c45,'tapeItem':_0x458291[_0x27726e],'userId':_0x2bce37,'type':_0x221622}),_0x428226[_0x221622]&&_0x4a21a2&&('elementStart'!==_0x458291[_0x27726e]['type']||_0x1ea2cc&&_0x1ea2cc['userId']===_0x2bce37||_0x2eddde[_0x221622]['unshift']({'userId':_0x2bce37,'object':_0x458291[_0x27726e]['item'],'change':_0x428226[_0x221622]}),'elementEnd'===_0x458291[_0x27726e]['type']&&_0x1ea2cc&&_0x1ea2cc['object']===_0x458291[_0x27726e]['item']&&(_0x2eddde[_0x221622]['shift'](),_0x428226[_0x221622]=_0x1ea2cc['change'])),_0x428226[_0x221622]&&_0x41c1ab&&(_0x428226[_0x221622]['end']=_0x38b96b,_0x40ff05(_0x428226[_0x221622]),_0x428226[_0x221622]=null);}function _0x40ff05({start:_0x264b95,end:_0x3b71a9,tapeItem:_0x3639b8,userId:_0x1bbef7,type:_0x40d2a7}){const _0x226732=_0x3639b8['item'],_0xe75561=_0x2bf693['schema']['isBlock'](_0x226732)&&!_0x2bf693['schema']['isLimit'](_0x226732),_0x56a990=_0x264b95['nodeAfter']==_0x3b71a9['parent']&&_0x3b71a9['isAtStart'];if(_0xe75561&&_0x56a990)return;const _0x3728e5=_0x2bf693['createRange'](_0x264b95,_0x3b71a9),_0x52d40b=_0xe946e1['get'](_0x1bbef7),_0x653fbe=new G({'author':_0x52d40b,'type':'isAdded'==_0x40d2a7||'isAddSuggestion'==_0x40d2a7?'add':'remove','data':{'isSuggestion':'isAddSuggestion'==_0x40d2a7||'isRemoveSuggestion'==_0x40d2a7},'createdAt':new Date(),'rootName':_0x1c2fed});_0x1b540e['push'](_0x653fbe),_0x3872bf['markers']['set']('revision:'+_0x653fbe['id'],_0x3728e5);}function _0x5abf12(_0x39b714,_0x312bcb){const _0x1d51af=_0x39b714['getAttributes'](),_0x560189=_0x312bcb['getAttributes']();for(const _0x4013ff of _0x1d51af){if(_0x4013ff[0x1]!==_0x312bcb['getAttribute'](_0x4013ff[0x0]))return!0x1;_0x560189['next']();}return _0x560189['next']()['done'];}}['_setConversion'](){this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision','view':_0xd40e44=>{const _0x177df4=_0xd40e44['markerName']['split'](':')[0x1],_0x53e614=this['_getChangeFromId'](_0x177df4);if(!_0x53e614)return null;const _0xa859bb='add'==_0x53e614['type']?'insertion':'deletion',_0xcdd4ab=['ck-suggestion-marker','ck-suggestion-marker-'+_0xa859bb];return _0x53e614['data']['isSuggestion']&&_0xcdd4ab['push']('ck-suggestion-marker-'+_0xa859bb+'-new'),this['activeChange']==_0x53e614&&_0xcdd4ab['push']('ck-suggestion-marker--active'),{'classes':_0xcdd4ab,'attributes':{'data-change-id':_0x177df4}};}}),this['editor']['conversion']['for']('upcast')['add'](_0x25315d=>{_0x25315d['on']('element:pre',(_0x48646e,_0x8c654e,_0x32e5c0)=>{const _0x402aa8=_0x8c654e['viewItem']['getChild'](0x0);if(!_0x402aa8||!_0x402aa8['is']('element','code'))return;if(!_0x32e5c0['consumable']['consume'](_0x402aa8,{'attributes':['vid_start','vid_end']}))return;const _0x3a0248=_0x8c654e['modelRange']['start']['nodeAfter'];_0x32e5c0['writer']['setAttribute']('vid_start',_0x402aa8['getAttribute']('vid_start'),_0x3a0248),_0x32e5c0['writer']['setAttribute']('vid_end',_0x402aa8['getAttribute']('vid_end'),_0x3a0248);},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['add'](_0x21539d=>{_0x21539d['on']('element',(_0x147a12,_0x26a8e1,_0x5a7254)=>{if(!_0x5a7254['consumable']['consume'](_0x26a8e1['viewItem'],{'attributes':['vid_start','vid_end']}))return;if(_0x26a8e1['modelRange']['isCollapsed'])return;const _0x2ac968=_0x26a8e1['modelRange']['start']['nodeAfter'];_0x2ac968['hasAttribute']('vid_start')||_0x2ac968['hasAttribute']('vid')||(_0x5a7254['writer']['setAttribute']('vid_start',_0x26a8e1['viewItem']['getAttribute']('vid_start'),_0x2ac968),_0x5a7254['writer']['setAttribute']('vid_end',_0x26a8e1['viewItem']['getAttribute']('vid_end'),_0x2ac968));},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['elementToAttribute']({'view':{'name':'span','attributes':{'vid':!0x0}},'model':{'key':'vid','value':_0x5783d6=>_0x5783d6['getAttribute']('vid')}}),this['editor']['model']['schema']['on']('checkAttribute',(_0x3f00ef,[,_0x366e75])=>{['vid_start','vid_end','vid']['includes'](_0x366e75)&&(_0x3f00ef['return']=!0x0,_0x3f00ef['stop']());},{'priority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x123b7e=>{_0x123b7e['on']('attribute:vid',(_0x204d49,_0xc7370c,_0x1aecd8)=>{if('\x20'!=_0xc7370c['item']['data']||_0xc7370c['item']['parent']['maxOffset']>0x1)return;if(!_0x1aecd8['consumable']['consume'](_0xc7370c['item'],_0x204d49['name']))return;const _0x132e35=_0x1aecd8['writer'],_0x51a4b8=_0x1aecd8['mapper']['toViewRange'](_0xc7370c['range']);_0x132e35['wrap'](_0x51a4b8,_0x132e35['createAttributeElement']('span'));});}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',function(_0x1af80a){const _0xd91353=_0x1af80a['plugins']['get']('RevisionViewer');return(_0x16f66a,_0x534345,_0x1374a8)=>{const _0x150ee6=_0x534345['markerName']['split'](':')[0x1],_0x2c909b=_0xd91353['_getChangeFromId'](_0x150ee6);if(!_0x2c909b)return null;const _0x270642='add'==_0x2c909b['type']?'split':'merge';if(!_0x1374a8['consumable']['test'](_0x534345['markerRange'],_0x16f66a['name']))return;const _0x28be93=_0x534345['markerRange']['getWalker'](),_0x47b4a4=_0x534345['markerRange']['start'],_0x276ae1=_0x1af80a['model']['schema'];let _0x195429=null,_0x37679b=null,_0x5e1017=!0x1,_0x532ff9=!0x1;for(const _0x5559a7 of _0x28be93){const _0x3c64ee=_0x5559a7['item'];_0x5e1017=_0x5e1017||_0x276ae1['isContent'](_0x3c64ee);const _0x50b279=_0x1374a8['mapper']['toViewElement'](_0x3c64ee);if(_0x50b279&&_0x50b279['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x5559a7['type']&&(_0x276ae1['isBlock'](_0x3c64ee)&&!_0x276ae1['isLimit'](_0x3c64ee)&&(_0x3c64ee['nextSibling']||_0x47b4a4['isAtEnd']?_0x195429&&_0x195429['parent']==_0x3c64ee||(_0x195429=_0x3c64ee,_0x2fd5dd(_0x5559a7['previousPosition']),_0x532ff9=!0x0):_0x37679b=_0x37679b||_0x5559a7['previousPosition']));}function _0x2fd5dd(_0x2f5b26){const _0x5b68cc=_0x1374a8['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x270642}),_0x248cd1=_0x1374a8['mapper']['toViewPosition'](_0x2f5b26);_0x2c909b['data']['isSuggestion']&&_0x1374a8['writer']['addClass']('ck-suggestion-marker-'+_0x270642+'-new',_0x5b68cc),_0xd91353['activeChange']==_0x2c909b&&_0x1374a8['writer']['addClass']('ck-suggestion-marker--active',_0x5b68cc),_0x1374a8['writer']['insert'](_0x248cd1,_0x5b68cc),_0x1374a8['mapper']['bindElementToMarker'](_0x5b68cc,_0x534345['markerName']);}_0x5e1017||_0x532ff9||!_0x37679b||_0x2fd5dd(_0x37679b);};}(this['editor']),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision',(_0x26fb69,_0x370ddc,_0x3455e6)=>{const _0x1f6a76=_0x3455e6['mapper']['markerNameToElements'](_0x370ddc['markerName']);if(_0x1f6a76){for(const _0x472c59 of _0x1f6a76)(_0x472c59['hasClass']('ck-suggestion-marker-split')||_0x472c59['hasClass']('ck-suggestion-marker-merge'))&&(_0x3455e6['mapper']['unbindElementFromMarkerName'](_0x472c59,_0x370ddc['markerName']),_0x3455e6['writer']['remove'](_0x472c59));}},{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',(_0x4e0bbc,_0x1b9a2e,_0x1ab5f6)=>{const _0x13d55e=_0x1b9a2e['markerName']['split'](':')[0x1],_0x1a3b4a=this['_getChangeFromId'](_0x13d55e);if(!_0x1a3b4a)return null;const _0x4a2897='add'==_0x1a3b4a['type']?'split':'merge';if(_0x1ab5f6['consumable']['test'](_0x1b9a2e['markerRange'],_0x4e0bbc['name']))for(const _0x1df915 of _0x1b9a2e['markerRange']['getItems']()){if(!_0x1df915['is']('element','softBreak'))continue;const _0x358a3e=_0x1ab5f6['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x4a2897}),_0xb66c07=_0x1ab5f6['mapper']['toViewPosition'](this['editor']['model']['createPositionBefore'](_0x1df915));_0x1a3b4a['data']['isSuggestion']&&_0x1ab5f6['writer']['addClass']('ck-suggestion-marker-'+_0x4a2897+'-new',_0x358a3e),this['activeChange']==_0x1a3b4a&&_0x1ab5f6['writer']['addClass']('ck-suggestion-marker--active',_0x358a3e),_0x1ab5f6['writer']['insert'](_0xb66c07,_0x358a3e),_0x1ab5f6['mapper']['bindElementToMarker'](_0x358a3e,_0x1b9a2e['markerName']);}},{'priority':'high'}),this['editor']['model']['document']['on']('change',()=>{this['editor']['editing']['view']['change'](_0x32b303=>{for(const _0x4771ee of this['editor']['model']['document']['getRootNames']()){const _0x41f686=this['editor']['model']['document']['getRoot'](_0x4771ee),_0x1f8ffa=this['editor']['editing']['view']['document']['getRoot'](_0x4771ee);if(_0x1f8ffa){const _0x39d87b=_0x41f686['getAttribute']('revisionHistoryAttachChange');if(_0x32b303['removeAttribute']('data-change-id',_0x1f8ffa),_0x32b303['removeClass']('ck-revision-history-root-add',_0x1f8ffa),_0x32b303['removeClass']('ck-revision-history-root-remove',_0x1f8ffa),_0x32b303['removeClass']('ck-revision-history-root--active',_0x1f8ffa),_0x39d87b){const _0x591b49=this['_getChangeFromId'](_0x39d87b);if(!_0x591b49)return null;_0x32b303['setAttribute']('data-change-id',_0x39d87b,_0x1f8ffa),_0x32b303['addClass']('ck-revision-history-root-'+_0x591b49['type'],_0x1f8ffa),this['activeChange']==_0x591b49&&_0x32b303['addClass']('ck-revision-history-root--active',_0x1f8ffa);}}}});}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'comment','model':_0x305a10=>'revision-comment:'+_0x305a10,'converterPriority':'highest'}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'suggestion','model':_0x3b3c85=>'revision-suggestion:'+_0x3b3c85,'converterPriority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision-suggestion','view':_0x4dc5bc=>({'name':'suggestion:'+_0x4dc5bc,'group':'revision-suggestion'}),'converterPriority':'highest'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-suggestion','view':_0x3d64df=>{const _0x57c5fb=_0x3d64df['markerName']['split'](':')[0x1];return'insertion'!=_0x57c5fb&&'deletion'!=_0x57c5fb?null:{'classes':['ck-suggestion-preview-marker','ck-suggestion-preview-marker-'+_0x57c5fb]};}}),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',(_0x262263,_0x2b03c4,_0x11b7fd)=>{const _0x115b57=_0x11b7fd['mapper']['markerNameToElements'](_0x2b03c4['markerName']);if(_0x115b57){for(const _0x450a40 of _0x115b57)_0x450a40['is']('uiElement')&&(_0x11b7fd['mapper']['unbindElementFromMarkerName'](_0x450a40,_0x2b03c4['markerName']),_0x11b7fd['writer']['remove'](_0x450a40));}},{'priority':'high'});}['_getChangeFromId'](_0x54316f){return this['_changeIdToChange']['get'](_0x54316f);}['_getViewForChange'](_0x4962fd){return this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=new z(this['editor']['locale'],_0x4962fd),this['_changeView'];}['_initInteractions'](){this['editor']['model']['document']['selection']['observeMarkers']('revision'),this['on']('change:activeView',(_0x2acad7,_0x298f32,_0x35a455,_0x4ff93e)=>{_0x4ff93e&&this['_balloon']['remove'](_0x4ff93e),_0x35a455&&(this['_balloon']['add']({'view':_0x35a455,'stackId':'revisionHistoryLabel','position':{'target':()=>{const _0x4f7189=this['editor']['editing'],_0x5649b8=this['_getChangeFromId'](_0x35a455['changeId']);let _0x8d140a;if(_0x5649b8['data']['isOnRoot']){const _0x3833d7=_0x4f7189['view']['getDomRoot'](_0x5649b8['rootName']);_0x8d140a=Array['from'](_0x3833d7['getClientRects']());}else{const _0x50521f=this['editor']['model']['markers']['get']('revision:'+_0x35a455['changeId']);_0x8d140a=Array['from'](_0x4f7189['mapper']['markerNameToElements'](_0x50521f['name']))['map'](_0x4020dc=>_0x4f7189['view']['domConverter']['mapViewToDom'](_0x4020dc))['map'](_0x94a090=>Array['from'](_0x94a090['getClientRects']()))['flat']();}if(!this['_activeViewTarget'])return _0x8d140a[0x0];return _0x8d140a['find'](_0x44017e=>_0x44017e['top']-0x3<=this['_activeViewTarget']['y']&&_0x44017e['bottom']+0x3>=this['_activeViewTarget']['y']&&_0x44017e['left']-0x3<=this['_activeViewTarget']['x']&&_0x44017e['right']+0x3>=this['_activeViewTarget']['x'])||_0x8d140a[0x0];}}}),this['_balloon']['showStack']('revisionHistoryLabel'));}),this['on']('change:activeChange',(_0x2e1b56,_0x12b3dd,_0x5440fc,_0x3f7c59)=>{this['activeView']=_0x5440fc?this['_getViewForChange'](_0x5440fc):null,this['editor']['model']['change'](()=>{const _0x1785a3=this['editor']['editing'];_0x3f7c59&&(_0x3f7c59['data']['isOnRoot']?_0x1785a3['view']['change'](_0x28d1a5=>{_0x28d1a5['removeClass']('ck-revision-history-root--active',_0x1785a3['view']['document']['getRoot'](_0x3f7c59['rootName']));}):_0x1785a3['reconvertMarker']('revision:'+_0x3f7c59['id'])),_0x5440fc&&(_0x5440fc['data']['isOnRoot']?_0x1785a3['view']['change'](_0x3679b8=>{_0x3679b8['addClass']('ck-revision-history-root--active',_0x1785a3['view']['document']['getRoot'](_0x5440fc['rootName']));}):_0x1785a3['reconvertMarker']('revision:'+_0x5440fc['id']));});}),this['listenTo'](this['editor']['editing']['view']['document'],'mouseover',(_0x2d7df6,_0x50a1fc)=>{if(this['activeChange'])return;const _0x4c15d0=this['_findChangeIdFromDomTarget'](_0x50a1fc['target']),_0x574b61=this['_changeIdToChange']['get'](_0x4c15d0);_0x574b61?(this['_activeViewTarget']={'x':_0x50a1fc['domEvent']['x'],'y':_0x50a1fc['domEvent']['y']},this['activeView']=this['_getViewForChange'](_0x574b61)):(this['_activeViewTarget']=null,this['activeView']=null);}),this['listenTo'](this['editor']['editing']['view']['document'],'mousedown',(_0x2a63c0,_0x51166b)=>{const _0x56db1c=this['_findChangeIdFromDomTarget'](_0x51166b['target']),_0x1afad3=this['_changeIdToChange']['get'](_0x56db1c);_0x1afad3?(this['_activeViewTarget']={'x':_0x51166b['domEvent']['x'],'y':_0x51166b['domEvent']['y']},_0x1afad3===this['activeChange']?this['_balloon']['updatePosition']():this['activeChange']=_0x1afad3):(this['_activeViewTarget']=null,this['activeChange']=null);});}['_findChangeIdFromDomTarget'](_0x34a4f5){do{const _0x5470ab=_0x34a4f5['getAttribute']('data-change-id');if(_0x5470ab)return _0x5470ab;_0x34a4f5=_0x34a4f5['parent'];}while(_0x34a4f5);return null;}['_cleanMarkers'](){this['editor']['model']['change'](_0x34606f=>{for(const _0xb38f53 of this['editor']['model']['markers'])_0x34606f['removeMarker'](_0xb38f53);});}}function Q(_0x2c51fb,_0x9dc499){return(_0x3b1422,_0xb3577f,_0x56e896)=>{if(!_0x56e896['consumable']['test'](_0xb3577f['markerRange'],_0x3b1422['name']))return;const _0x2c39c8=_0xb3577f['markerRange']['getWalker'](),_0x555d5c=_0xb3577f['markerRange']['start'],_0x108d2e=_0x2c51fb['model']['schema'];let _0x303b21=null,_0x56f5fb=null,_0x364c42=!0x1,_0x822189=!0x1;for(const _0x32e806 of _0x2c39c8){const _0x3537de=_0x32e806['item'];_0x364c42=_0x364c42||_0x108d2e['isContent'](_0x3537de);const _0x4eac78=_0x56e896['mapper']['toViewElement'](_0x3537de);if(_0x4eac78&&_0x4eac78['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x32e806['type']&&(_0x108d2e['isBlock'](_0x3537de)&&!_0x108d2e['isLimit'](_0x3537de)&&(_0x3537de['nextSibling']||_0x555d5c['isAtEnd']?_0x303b21&&_0x303b21['parent']==_0x3537de||(_0x303b21=_0x3537de,_0x46ed70(_0x32e806['previousPosition']),_0x822189=!0x0):_0x56f5fb=_0x56f5fb||_0x32e806['previousPosition']));}function _0x46ed70(_0x470e14){const _0x32b357=_0x56e896['mapper']['toViewPosition'](_0x470e14),_0x214a62=_0x56e896['writer']['createUIElement']('span',{'class':'ck-suggestion-preview-marker-'+_0x9dc499});_0x56e896['writer']['insert'](_0x32b357,_0x214a62),_0x56e896['mapper']['bindElementToMarker'](_0x214a62,_0xb3577f['markerName']);}_0x364c42||_0x822189||!_0x56f5fb||_0x46ed70(_0x56f5fb);};}class nt extends _0x30167c{constructor(_0x2f5e15){super(_0x2f5e15);const _0x9d5dd0=_0x2f5e15['plugins']['get'](u);this['affectsData']=!0x1,this['listenTo'](_0x9d5dd0,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x9d5dd0,'change:isEnabled',()=>this['refresh']());}['execute'](){const _0x41b0d4=this['editor'],_0x1a9591=_0x41b0d4['plugins']['get'](u),_0x58da4c=_0x1a9591['isReady']?_0x1a9591['diff']['newRevisionId']:null;_0x41b0d4['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x58da4c);}['refresh'](){const {isReady:_0x14399b,isEnabled:_0x4bbed6,repository:_0x1e83ee,diff:_0x35bbc8}=this['editor']['plugins']['get'](u),_0x1dd409=_0x35bbc8&&_0x1e83ee['getLaterVisibleRevision'](_0x35bbc8['newRevisionId']);this['isEnabled']=_0x14399b&&_0x4bbed6&&Boolean(_0x1dd409);}}class rt extends _0x30167c{['_step'];constructor(_0x4ff8fb,{direction:_0x598e9b}){super(_0x4ff8fb);const _0x38fa42=_0x4ff8fb['plugins']['get'](u);this['affectsData']=!0x1,this['_step']='forward'===_0x598e9b?0x1:-0x1,this['listenTo'](_0x38fa42,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x38fa42,'change:isEnabled',()=>this['refresh']()),this['listenTo'](_0x38fa42,'change:activeChange',()=>this['refresh']());}['execute'](){const _0x39b2b6=this['editor'],_0x6c0d1a=_0x39b2b6['plugins']['get'](u),{isNavigationMode:_0x5e24ba,currentChangeNumber:_0x564c46}=_0x6c0d1a;let _0xb29ea8;if(_0x6c0d1a['activeChange']=_0x5e24ba?_0x6c0d1a['diff']['changes']['get'](_0x564c46+this['_step']):_0x6c0d1a['diff']['changes']['first'],_0x6c0d1a['activeChange']['data']['isOnRoot'])_0xb29ea8=_0x39b2b6['editing']['view']['getDomRoot'](_0x6c0d1a['activeChange']['rootName']);else{const _0x44b0e5=_0x39b2b6['model']['markers']['get']('revision:'+_0x6c0d1a['activeChange']['id']);_0xb29ea8=_0x17a5a7(_0x39b2b6['editing'],_0x44b0e5);}_0x2ef4fe({'target':_0xb29ea8,'viewportOffset':0x28});}['refresh'](){const {isNavigationMode:_0x20afc6,currentChangeNumber:_0x3ddf33,numberOfChanges:_0x2615bd,isReady:_0x2ff075,isEnabled:_0x10a86c}=this['editor']['plugins']['get'](u);this['isEnabled']=!!(_0x10a86c&&_0x2ff075&&_0x2615bd)&&(!_0x20afc6||(0x1===this['_step']?_0x3ddf33<_0x2615bd-0x1:_0x3ddf33>0x0));}}class fi extends _0x2fbdbb{constructor(_0x665c97){super(_0x665c97);const _0x595cf9=this['bindTemplate'],_0x4e41bf=new _0x4eab8d(_0x665c97),_0x3fb768=new _0x4eab8d(_0x665c97);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',(_0x3f64d1,_0x20fed0)=>_0x3f64d1&&_0x20fed0>0x0),this['bind']('_statusText')['to'](this,'isReady',this,'currentChangeNumber',this,'numberOfChanges',this,'isNavigationMode',(_0x5ec4eb,_0x5da4eb,_0x4ff256,_0x19f8df)=>{if(!_0x5ec4eb)return m(_0x665c97,'Loading...');if(!_0x4ff256)return m(_0x665c97,'No\x20changes');const _0x317801=m(_0x665c97,'NUMBER_OF_CHANGES',_0x4ff256);return _0x19f8df?m(_0x665c97,'X_OF_Y_CHANGES',[_0x5da4eb+0x1,_0x4ff256]):_0x317801;}),_0x4e41bf['set']({'label':m(_0x665c97,'Show\x20previous\x20change'),'tooltip':!0x0,'icon':_0x158305}),_0x3fb768['set']({'label':m(_0x665c97,'Show\x20next\x20change'),'tooltip':!0x0,'icon':_0x921695}),_0x4e41bf['bind']('isEnabled')['to'](this,'isBackwardNavigationEnabled'),_0x3fb768['bind']('isEnabled')['to'](this,'isForwardNavigationEnabled'),_0x4e41bf['on']('execute',()=>this['fire']('execute','backward')),_0x3fb768['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',_0x595cf9['if']('_isStatusLabelVisible','ck-hidden',_0x38840c=>!_0x38840c)]},'children':[{'text':_0x595cf9['to']('isNavigationMode',_0x79ba1a=>_0x79ba1a?m(_0x665c97,'EDIT_X_OF_Y_REVISIONS')+':\x20':m(_0x665c97,'Total')+':\x20')}]},{'text':_0x595cf9['to']('_statusText')}]},new _0x5b896a(),{'tag':'div','attributes':{'class':['ck-revision-history-ui__changes-navigation__navigation']},'children':[_0x4e41bf,_0x3fb768]}]});}}const ge='ck-editor__editable__loading-overlay';class bi extends _0x2a9b7d{static get['pluginName'](){return'RevisionViewerLoadingOverlay';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['show'](){const _0x37ffdb=this['editor']['editing']['view'];_0x37ffdb['change'](_0x366de4=>{for(const _0x37e8ad of _0x37ffdb['document']['roots'])_0x366de4['addClass'](ge,_0x37e8ad);});}['hide'](){const _0x155753=this['editor']['editing']['view'];_0x155753['change'](_0x28e226=>{for(const _0x3d6cad of _0x155753['document']['roots'])_0x28e226['removeClass'](ge,_0x3d6cad);});}}class v extends _0x2a9b7d{static get['pluginName'](){return'RevisionViewerUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[u,bi];}['init'](){const _0x751e08=this['editor'],_0x1dbd63=_0x751e08['plugins']['get'](u),_0xbe0914=_0x751e08['plugins']['get'](bi);_0x751e08['ui']['componentFactory']['add']('exitToEditing',_0x4d6901=>{const _0xf6ab28=new _0x4eab8d(_0x4d6901);return _0xf6ab28['set']({'label':m(_0x4d6901,'Back\x20to\x20editing'),'icon':_0x1bee30,'withText':!0x0,'tooltip':!0x0,'class':'ck-revision-history-ui__back-to-editing'}),this['listenTo'](_0xf6ab28,'execute',()=>{_0x751e08['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}),_0xf6ab28;}),_0x751e08['ui']['componentFactory']['add']('restoreRevision',_0x546a23=>{const _0x4c7721=new _0x4eab8d(_0x546a23);return _0x4c7721['set']({'label':m(_0x546a23,'Restore\x20this\x20revision'),'withText':!0x0,'tooltip':!0x0}),_0x4c7721['bind']('isEnabled')['to'](_0x751e08['commands']['get']('restoreRevision')),this['listenTo'](_0x4c7721,'execute',()=>_0x751e08['execute']('restoreRevision')),_0x4c7721;}),_0x751e08['ui']['componentFactory']['add']('changesNavigation',_0x1df14c=>{const _0x5eb0d8=new fi(_0x1df14c),_0x281315=_0x751e08['commands']['get']('showPreviousChange'),_0x502450=_0x751e08['commands']['get']('showNextChange');return _0x5eb0d8['bind']('isBackwardNavigationEnabled')['to'](_0x281315,'isEnabled'),_0x5eb0d8['bind']('isForwardNavigationEnabled')['to'](_0x502450,'isEnabled'),_0x5eb0d8['bind']('isReady','currentChangeNumber','numberOfChanges','isNavigationMode')['to'](_0x1dbd63),this['listenTo'](_0x5eb0d8,'execute',(_0x1ccab5,_0x36adae)=>{_0x751e08['execute']('forward'===_0x36adae?'showNextChange':'showPreviousChange');}),_0x5eb0d8;}),_0xbe0914['show'](),_0x1dbd63['on']('change:isReady',(_0x57d566,_0x3e12e1,_0x139891)=>{_0x139891?_0xbe0914['hide']():_0xbe0914['show']();});}}class hi extends et{['_resizeObserver']=null;constructor(_0x8b3abb,_0x101b3e){super(_0x8b3abb,_0x101b3e);const _0x349b04=this['bindTemplate'];this['set']({'label':m(_0x8b3abb,'Revision\x20name'),'_tooltipString':''}),this['fieldView']['placeholder']=m(_0x8b3abb,'Enter\x20the\x20revision\x20name'),this['extendTemplate']({'tag':'span','attributes':{'class':['ck-revision-history-sidebar__revision-name'],'data-cke-tooltip-text':_0x349b04['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 _0x46b030=this['fieldView']['element'];this['_tooltipString']=_0x46b030['scrollWidth']>_0x46b030['clientWidth']&&_0x46b030['value']||'';}}class ni extends _0x2fbdbb{constructor(_0x5a146b,_0x189cb8,_0x211ea8){super(_0x5a146b);const _0x2bdd8d=new _0x11835d();_0x2bdd8d['set']({'content':_0x81b85e,'viewBox':'0\x200\x2011\x2010'});const _0x36a4d6=['ck','ck-revision-history-sidebar__revision-author'];_0x211ea8&&_0x36a4d6['push']('ck-revision-history-sidebar__revision-author_creator');const _0xb6daf1=[{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__revision-author__name'],'title':m(_0x5a146b,_0x211ea8?'Revision\x20creator':'Revision\x20author')},'children':[_0x2bdd8d,_0x189cb8['name']]}];this['setTemplate']({'tag':'li','attributes':{'class':_0x36a4d6},'children':_0xb6daf1});}}function ai(_0x472e2c,_0x1751a5){const _0x3f6db9=_0x472e2c['bindTemplate'],_0x2ac332=_0x472e2c['locale'],_0x1f8307=_0x255985(_0x2ac332);_0x1f8307['panelPosition']='sw';const _0x571a38=function(_0x5464c8,_0x3627c1){const _0x2db66f=function(_0x1960e9,_0x39705b){const _0xc61ace=_0x1960e9['locale'],_0x21d07a={'Compare\x20against\x20selected':m(_0xc61ace,'Compare\x20against\x20selected'),'Name\x20this\x20revision':m(_0xc61ace,'Name\x20this\x20revision'),'Restore\x20this\x20revision':m(_0xc61ace,'Restore\x20this\x20revision')};return _0x39705b['map'](_0x6d8ff2=>{const _0xc216ac=_0x21d07a[_0x6d8ff2['name']];return _0xc216ac&&_0xc216ac!==_0x6d8ff2['name']&&(_0x6d8ff2['name']=_0xc216ac),_0x6d8ff2;});}(_0x5464c8,_0x3627c1),_0x13401b=new _0xb670b4();for(const _0x10d517 of _0x2db66f){const _0x4b2a45={'type':'button','model':new to({'label':_0x10d517['name'],'class':_0x10d517['class'],'withText':!0x0,'role':'menuitem','_action':_0x10d517['action']})};_0x4b2a45['model']['bind']('isEnabled')['to'](_0x5464c8,'isActionsDropdownOpen',_0x1e460f=>'function'!=typeof _0x10d517['isEnabled']||(!_0x1e460f||_0x10d517['isEnabled'](_0x5464c8))),_0x13401b['add'](_0x4b2a45);}return _0x13401b;}(_0x472e2c,_0x1751a5);return _0x472e2c['bind']('isActionsDropdownOpen')['to'](_0x1f8307,'isOpen'),_0x1f8307['buttonView']['set']({'label':m(_0x2ac332,'Show\x20more\x20items'),'tooltip':!0x0,'tooltipPosition':'sw','icon':_0x187a75}),_0x1f8307['extendTemplate']({'attributes':{'class':['ck-revision-history-sidebar__revision__actions',_0x3f6db9['if']('isActionsDropdownOpen','ck-on')]},'on':{'click':_0x3f6db9['to'](_0x402b00=>_0x402b00['stopPropagation']())}}),_0x1f8307['on']('execute',_0x19eba8=>{_0x472e2c['isReady']&&'function'==typeof _0x19eba8['source']['_action']&&_0x19eba8['source']['_action'](_0x472e2c);}),_0x3e03fc(_0x1f8307,_0x571a38,{'role':'menu'}),_0x1f8307['listenTo'](_0x472e2c,'change:isActionsDropdownOpen',(_0x339499,_0x5b45fd,_0x328e8a)=>{if(_0x328e8a)for(const _0x2b1411 of _0x1f8307['listView']['items']){const _0x299324=_0x2b1411['children']['first'],_0x4dad89=_0x1751a5['find'](_0x4daec6=>_0x4daec6['action']===_0x299324['_action'])['isVisible'];_0x2b1411['isVisible']=void 0x0===_0x4dad89||_0x4dad89(_0x472e2c);}}),_0x1f8307;}class _i extends/* #__PURE__ -- @preserve */
|
|
27
|
+
_0x2a2f44(_0x2fbdbb){['id'];['revisionNameView'];['revisionActionsView'];['_revision'];['_requireRevisionName'];constructor(_0x1195ee,_0xe8431c,_0x2ed573,_0x56b97c){super(_0x1195ee);const _0x461ab2=this['bindTemplate'],_0x5d6ec0=function(_0x3582b7,_0x58e427){const _0x44e85b=Array['from'](_0x58e427['authors'])['filter'](_0x2b1d0f=>_0x2b1d0f!=_0x58e427['creator']);return _0x58e427['creator']&&_0x44e85b['unshift'](_0x58e427['creator']),_0x44e85b['map'](_0x680430=>new ni(_0x3582b7,_0x680430,_0x680430==_0x58e427['creator']));}(_0x1195ee,_0xe8431c);this['id']=_0xe8431c['id'],this['_revision']=_0xe8431c,this['_requireRevisionName']=_0x56b97c,this['bind']('name','createdAt')['to'](_0xe8431c),this['bind']('_createdAtFormatted')['to'](this,'createdAt',_0x199456=>{return _0x5d5bd8=_0x1195ee['uiLanguage'],(_0x5b9269=_0x199456)['toLocaleDateString'](_0x5d5bd8,{'month':'long','day':'numeric'})+',\x20'+_0x5b9269['toLocaleTimeString'](_0x5d5bd8,{'hour':'numeric','minute':'numeric'});var _0x5d5bd8,_0x5b9269;}),this['set']('isSelected',!0x1),this['set']('isHighlighted',!0x1),this['set']('isActionsDropdownOpen',!0x1),this['set']('isReady',!0x1),this['set']('isEnabled',!0x1),this['revisionNameView']=new hi(_0x1195ee,ti),this['revisionNameView']['fieldView']['extendTemplate']({'attributes':{'maxlength':'220'}}),this['revisionNameView']['fieldView']['bind']('value')['to'](this,'name',_0x3d0c06=>_0x3d0c06||this['_createdAtFormatted']),this['revisionNameView']['bind']('isEnabled')['to'](this,'isSelected',this,'isEnabled',(_0x59adb3,_0x48b1fe)=>_0x59adb3&&_0x48b1fe),this['revisionActionsView']=_0x2ed573&&_0x2ed573['length']?ai(this,_0x2ed573):'',this['revisionActionsView']&&this['revisionActionsView']['bind']('isEnabled')['to'](this),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision-wrapper',_0x461ab2['if']('isConfirm','ck-revision-history-sidebar__revision-wrapper_confirmation_visible')]},'children':[{'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision',_0x461ab2['if']('isEnabled','ck-disabled',_0xc5b958=>!_0xc5b958),_0x461ab2['if']('isSelected','ck-revision-history-sidebar__revision_selected'),_0x461ab2['if']('isHighlighted','ck-revision-history-sidebar__revision_highlighted'),_0x461ab2['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':_0x461ab2['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':_0x5d6ec0}]},this['revisionActionsView']],'on':{'click':_0x461ab2['to'](_0x50d2c8=>{_0x50d2c8['srcElement']['closest']('.ck-confirm-view')||this['isReady']&&this['isEnabled']&&this['fire']('select',{'id':this['id']});})}}]});}['render'](){super['render']();const _0x4c4564=this['revisionNameView']['fieldView']['element'];this['listenTo'](_0x4c4564,'change',()=>{this['_requireRevisionName']&&!_0x4c4564['value']||this['fire']('setName',{'id':this['id'],'name':_0x4c4564['value']}),_0x4c4564['value']||(_0x4c4564['value']=this['name']?this['name']:this['_createdAtFormatted']);});}['select'](){this['isSelected']=!0x0;}['deselect'](){this['isSelected']=!0x1;}['highlight'](){this['isHighlighted']=!0x0;}['unhighlight'](){this['isHighlighted']=!0x1;}}function ki(_0x382e38,_0x22ea52){const _0x2bfdb7=_0x5c8801['fromJSDate'](_0x382e38)['setLocale'](_0x22ea52),_0x5b98d8=_0x5c8801['local'](),_0x18db60=_0x5b98d8['minus']({'days':0x1})['startOf']('day');let _0x21bd33,_0x57d6b8;return _0x2bfdb7['hasSame'](_0x5b98d8,'day')?(_0x21bd33=_0x2bfdb7['startOf']('day')['toJSDate'](),_0x57d6b8=_0x2bfdb7['toRelativeCalendar']()):_0x2bfdb7['hasSame'](_0x18db60,'day')?(_0x21bd33=_0x18db60['toJSDate'](),_0x57d6b8=_0x2bfdb7['toRelativeCalendar']()):_0x2bfdb7['hasSame'](_0x5b98d8,'week')?(_0x21bd33=_0x2bfdb7['startOf']('week')['toJSDate'](),_0x57d6b8=_0x2bfdb7['weekdayLong']||''):_0x2bfdb7['hasSame'](_0x5b98d8,'year')?(_0x21bd33=_0x2bfdb7['startOf']('month')['toJSDate'](),_0x57d6b8=_0x2bfdb7['monthLong']||''):(_0x21bd33=_0x2bfdb7['startOf']('year')['toJSDate'](),_0x57d6b8=String(_0x2bfdb7['year'])),{'startDate':_0x21bd33,'localizedPeriodName':_0x57d6b8};}class ji extends _0x2fbdbb{['startDate'];['revisionViews'];['_revisionActions'];['_requireRevisionName'];constructor(_0x8cbcc,_0x4171fd,_0xde6d89,_0x5bd73e){super(_0x8cbcc);const _0x2eb437=ki(_0x4171fd,this['locale']['uiLanguage'])['localizedPeriodName'];this['startDate']=_0x4171fd,this['revisionViews']=this['createCollection'](),this['_revisionActions']=_0xde6d89,this['_requireRevisionName']=_0x5bd73e,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':_0x2eb437}]},{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__time-period__revisions']},'children':this['revisionViews']}]});}['addRevision'](_0x2e1704){const _0x4f578d=new _i(this['locale'],_0x2e1704,this['_revisionActions'],this['_requireRevisionName']);this['revisionViews']['add'](_0x4f578d);}['removeRevision'](_0x27e340){const _0x1291dd=this['revisionViews']['find'](_0x5916d5=>_0x5916d5['id']===_0x27e340['id']);this['revisionViews']['remove'](_0x1291dd);}}class Ni extends _0x2fbdbb{constructor(_0x87268f){super(_0x87268f);const _0x4faa28=new _0x11835d();_0x4faa28['content']=_0x1c8430,this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset_all','ck-revision-history-sidebar__header']},'children':[_0x4faa28,{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__header__label']},'children':[m(_0x87268f,'Revision\x20history')]}]});}}class Ri extends _0x2fbdbb{['timePeriodViews'];['_revisions'];['_revisionActions'];['_requireRevisionName'];constructor(_0x5db2a0,_0x35cef4,_0x152497,_0x3f64ad){super(_0x5db2a0);const _0x51f04e=this['bindTemplate'];this['timePeriodViews']=this['createCollection'](),this['timePeriodViews']['delegate']('select')['to'](this),this['timePeriodViews']['delegate']('setName')['to'](this),this['_revisions']=_0x35cef4,this['_revisionActions']=_0x152497,this['_requireRevisionName']=_0x3f64ad,this['on']('select',(_0x12d8f2,_0x43fbcd)=>{this['fire']('revisionSelected',_0x43fbcd);}),this['on']('setName',(_0x51af46,_0x4580aa)=>{this['fire']('revisionSetName',_0x4580aa);}),this['set']('isEnabled',!0x1),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-rounded-corners','ck-revision-history-sidebar']},'children':[new Ni(_0x5db2a0),{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__timeline',_0x51f04e['if']('isEnabled','ck-disabled',_0x21f3a9=>!_0x21f3a9)]},'children':this['timePeriodViews']}]});}['render'](){super['render']();for(const _0x16587d of this['_revisions'])this['_addRevision'](_0x16587d);this['_revisions']['on']('add',(_0x3ca6aa,_0x2c6cc4)=>{this['_addRevision'](_0x2c6cc4);}),this['_revisions']['on']('remove',(_0x3d8947,_0x27a794)=>{this['_removeRevision'](_0x27a794);});}get['revisionViews'](){return this['timePeriodViews']['map'](_0x4e76c6=>_0x4e76c6['revisionViews']['map'](_0xa840e5=>_0xa840e5))['flat']();}['selectRevision'](_0x3064d6){for(const _0x5113ee of this['revisionViews'])_0x3064d6&&_0x3064d6['id']===_0x5113ee['id']?_0x5113ee['select']():_0x5113ee['deselect']();}['highlightRevisions'](_0x20ef33){for(const _0xf8223f of this['revisionViews'])_0x20ef33['some'](({id:_0x596f99})=>_0x596f99===_0xf8223f['id'])?_0xf8223f['highlight']():_0xf8223f['unhighlight']();}['_addRevision'](_0x53232a){const _0x326328=ki(_0x53232a['createdAt'],this['locale']['uiLanguage'])['startDate'];let _0x5199cb=this['timePeriodViews']['get'](0x0);_0x5199cb&&_0x5199cb['startDate']['getTime']()===_0x326328['getTime']()||(_0x5199cb=new ji(this['locale'],_0x326328,this['_revisionActions'],this['_requireRevisionName']),this['timePeriodViews']['add'](_0x5199cb)),_0x5199cb['addRevision'](_0x53232a);}['_removeRevision'](_0x3f611f){const _0x32ca1c=ki(_0x3f611f['createdAt'],this['locale']['uiLanguage'])['startDate'];this['_getTimePeriodViewByStartDate'](_0x32ca1c)['removeRevision'](_0x3f611f);}['_getTimePeriodViewByStartDate'](_0x5620aa){return this['timePeriodViews']['find'](_0x5ea57b=>_0x5ea57b['startDate']['getTime']()===_0x5620aa['getTime']());}}class d extends _0x2a9b7d{['_revisionViewer'];['_revisionsRepository'];['_sidebarView'];static ['defaultRevisionActions']=/* #__PURE__ -- @preserve */
|
|
28
28
|
((()=>['compareAgainstSelected','restoreRevision','nameRevision'])());static ['availableRevisionActions']=/* #__PURE__ -- @preserve */
|
|
29
|
-
|
|
30
|
-
_0x3962da(_0x226f3b){['_ui'];get['ui'](){return this['_ui'];}constructor(_0x33ab47,_0x32af51){super(_0x32af51),this['sourceElement']=_0x33ab47,this['model']['document']['createRoot']();const _0x3c2f77=new ii(this['locale'],this['editing']['view'],{'shouldToolbarGroupWhenFull':!0x0});this['_ui']=new Z(this,_0x3c2f77);}['destroy'](){return this['updateSourceElement'](),this['ui']['destroy'](),super['destroy']();}static async['create'](_0x51ba80,_0x3bbcde){const _0x2e7a98=new this(_0x51ba80,_0x3bbcde);return await _0x2e7a98['initPlugins'](),await _0x2e7a98['ui']['init'](_0x51ba80),await _0x2e7a98['data']['init'](_0x2e7a98['config']['get']('initialData')||''),_0x2e7a98['fire']('ready'),_0x2e7a98;}}const p=['RevisionHistoryUI','RestrictedEditingMode','AIChat','AIReviewMode','AIBalloon','AIQuickActions','AIActions'];class at extends _0x1f60bb{['result'];static get['pluginName'](){return'RevisionViewerIntegration';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0xd1bc32){function _0x88360e(_0x1acf3c){return _0x1acf3c['map'](_0x2cabf7=>String['fromCharCode'](_0x2cabf7))['join']('');}super(_0xd1bc32),this['result']='end',_0xd1bc32[_0x88360e([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x88360e([0x76,0x69,0x65,0x77])][_0x88360e([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x88360e([0x61,0x75,0x74,0x6f]),_0xd1bc32[_0x88360e([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x88360e([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x88360e([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x88360e([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x88360e([0x6f,0x6b])});}}class ht extends _0x1f60bb{['_viewerEditor'];static get['pluginName'](){return'RevisionHistory';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[h,l];}constructor(_0x13df6c){if(super(_0x13df6c),!this['editor']['config']['get']('revisionHistory'))throw new _0x4b285e('revision-history-missing-configuration',this);this['_viewerEditor']=null,this['set']('isRevisionViewerOpen',!0x1),this['editor']['config']['define']('revisionHistory.showRevisionViewerCallback',_0x2673a7=>this['_showRevisionViewer']({..._0x2673a7,'translations':this['editor']['locale']['translations']})),this['editor']['config']['define']('revisionHistory.closeRevisionViewerCallback',_0xeb6c46=>this['_closeRevisionViewer'](_0xeb6c46)),this['editor']['config']['define']('revisionHistory.restoreRevisionCallback',_0x65faa0=>this['_restoreRevision'](_0x65faa0)),this['editor']['config']['define']('revisionHistory.requireRevisionName',!0x1),this['_enhanceShowRevisionViewerCallback'](),this['_enhanceCloseRevisionViewerCallback']();}set['adapter'](_0x1b7578){this['editor']['plugins']['get']('RevisionTracker')['adapter']=_0x1b7578;}get['adapter'](){return this['editor']['plugins']['get']('RevisionTracker')['adapter'];}['addRevisionData'](_0x18a847){return this['editor']['plugins']['get']('RevisionTracker')['addRevisionData'](_0x18a847);}['getRevision'](_0x53b35e){return this['editor']['plugins']['get']('RevisionsRepository')['getRevision'](_0x53b35e);}['getRevisions'](_0x82554){return this['editor']['plugins']['get']('RevisionsRepository')['getRevisions'](_0x82554||{'toJSON':!0x1});}['_getRevisionViewerEditorConfig'](){const _0x536d30=this['editor'],_0x4ec512=_0x4c6875(_0x536d30,p),_0x1525bf=_0x536d30['plugins']['get']('RevisionTracker'),_0x27494d=_0x536d30['plugins']['get']('Users')['users'];return _0x4ec512['toolbar']=['exitToEditing','restoreRevision','changesNavigation'],delete _0x4ec512['lazyRoots'],(_0x4ec512['plugins']['push'](at,u,v,class extends _0x1f60bb{static get['requires'](){return[u,'Users'];}['init'](){const _0x43c862=this['editor']['plugins']['get']('Users');for(const _0x413ea7 of _0x27494d)_0x413ea7['isAnonymous']||_0x43c862['getUser'](_0x413ea7['id'])||_0x43c862['addUser'](_0x413ea7);const _0x484126=_0x1525bf['repository']['getRevisions']();let _0x4137c5=null;const _0x1a8c80=this['editor']['plugins']['get']('RevisionViewer');_0x1a8c80['adapter']=_0x1525bf['adapter'],_0x1a8c80['bind']('isEnabled')['to'](_0x1525bf),this['editor']['commands']['get']('restoreRevision')['bind']('isEnabled')['to'](_0x536d30,'isReadOnly',_0x1843f0=>!_0x1843f0);for(const _0x129da5 of _0x484126){const _0x57f3f8=null===_0x129da5['creator'];if(_0x57f3f8&&_0x129da5['toVersion']===_0x129da5['fromVersion'])continue;const _0x3fb45a=_0x129da5['toJSON']();_0x1a8c80['addRevisionData'](_0x3fb45a,(_0x3f1a77,_0xe1b0e9,_0x129440)=>{if(_0x57f3f8){if(_0x4137c5)_0x4137c5['_update'](_0x3f1a77,_0xe1b0e9);else{if(!_0xe1b0e9){const _0x55b703=_0x129440['toJSON']();_0x55b703['id']=_0x1f92e5(),_0x1525bf['saveRevision'](_0x55b703,_0x129440['toVersion'])['then'](_0x559082=>{_0x4137c5=_0x559082;});}}}else _0x129da5['_update'](_0x3f1a77,_0xe1b0e9);});}}},d),_0x4ec512);}['_enhanceShowRevisionViewerCallback'](){const _0x533343=this['editor']['config']['get']('revisionHistory')['showRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.showRevisionViewerCallback',async()=>{this['editor']['enableReadOnlyMode']('revision-history-viewer-opened');const _0x537243=this['editor']['plugins']['get']('RevisionTracker');if(this['editor']['plugins']['has']('Autosave')){const _0x210138=this['editor']['plugins']['get']('Autosave');await _0x210138['save']();}else await _0x537243['update']();if(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('Dialog')){const _0x1a87f2=this['editor']['plugins']['get']('Dialog');_0x1a87f2['isOpen']&&_0x1a87f2['hide']();}if(this['editor']['plugins']['has']('AITabs')){const _0x5daa13=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0x170d3a of _0x5daa13)_0x170d3a['class']=_0x170d3a['class']?_0x170d3a['class']+'\x20ck-tab-panel_disabled':'ck-tab-panel_disabled';if(this['editor']['plugins']['has']('AIChat')){const _0x54d923=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0x54d923&&_0x54d923['setAttribute']('tabindex','-1');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0x19543e=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0x19543e&&_0x19543e['setAttribute']('tabindex','-1');}}const _0x5013f3=this['_getRevisionViewerEditorConfig']();return _0x533343(_0x5013f3)['then'](_0x3e97a6=>{return(this['_viewerEditor']=_0x3e97a6,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'),_0x3e97a6);})['catch'](_0x10f01d=>(console['error'](_0x10f01d),this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),null));});}['_enhanceCloseRevisionViewerCallback'](){const _0x41dcff=this['editor']['config']['get']('revisionHistory')['closeRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.closeRevisionViewerCallback',()=>{if(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['editor']['plugins']['has']('AITabs')){const _0x3d7dea=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0x3c7887 of _0x3d7dea)_0x3c7887['class']='ck-tab-panel_disabled'===_0x3c7887['class']?'':_0x3c7887['class']['replace']('\x20ck-tab-panel_disabled','');if(this['editor']['plugins']['has']('AIChat')){const _0x273236=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0x273236&&_0x273236['removeAttribute']('tabindex');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0x236bba=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0x236bba&&_0x236bba['removeAttribute']('tabindex');}}return this['_viewerEditor']['plugins']['get']('RevisionViewer')['_cleanUp'](),_0x41dcff(this['_viewerEditor'])['then'](()=>{if(this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),this['_viewerEditor']=null,this['editor']['plugins']['has']('Annotations')){const _0x427908=this['editor']['plugins']['get']('Annotations');_0x427908['refreshVisibility'](),_0x427908['refreshPositioning']();}});});}['_showRevisionViewer'](_0x55c202){const _0x364ccc=this['editor']['config']['get']('revisionHistory.editorContainer'),_0x2ef495=this['editor']['config']['get']('revisionHistory.viewerContainer'),_0xc1a6a1=this['editor']['config']['get']('revisionHistory.viewerEditorElement');return f['create'](_0xc1a6a1,_0x55c202)['then'](_0x226e23=>(_0x2ef495['style']['display']='block',_0x364ccc['style']['display']='none',this['isRevisionViewerOpen']=!0x0,_0x226e23));}['_closeRevisionViewer'](_0xc1bed1){const _0x3d7988=this['editor']['config']['get']('revisionHistory.editorContainer');return this['editor']['config']['get']('revisionHistory.viewerContainer')['style']['display']='none',_0x3d7988['style']['display']='',this['isRevisionViewerOpen']=!0x1,_0xc1bed1['destroy']();}async['_restoreRevision'](_0x2860e6){const _0x18e735=this['editor'],_0x21dc3=this['_viewerEditor']['plugins']['get']('RevisionViewer'),_0x89fd76=_0x18e735['plugins']['get']('RevisionTracker'),_0x1fd215=_0x18e735['plugins']['get']('RevisionHistoryUtils'),_0x3c6814=_0x21dc3['repository']['getRevision'](_0x2860e6);let _0x105559,_0x439425,_0x3af001;try{await _0x1fd215['loadRevisionData'](_0x3c6814,this['adapter']),_0x105559=_0x1fd215['getRevisionDocumentData'](_0x3c6814),_0x439425=_0x1fd215['getRevisionRootsAttributes'](_0x3c6814);}catch(_0x5959d5){return void console['error'](_0x5959d5);}_0x18e735['model']['change'](_0x5e90d8=>{for(const _0x3f19c2 of Array['from'](_0x18e735['model']['markers']['getMarkersGroup']('restrictedEditingException')))_0x5e90d8['removeMarker'](_0x3f19c2);}),_0x21dc3['isReady']=!0x1,_0x18e735['model']['enqueueChange'](_0x197dcd=>{_0x197dcd['setSelection'](null),_0x197dcd['removeSelectionAttribute'](_0x18e735['model']['document']['selection']['getAttributeKeys']());const _0x1050b1=Object['keys'](_0x105559);for(const _0x39d8eb of _0x18e735['model']['document']['roots'])'$graveyard'!=_0x39d8eb['rootName']&&_0x39d8eb['isAttached']()&&!_0x1050b1['includes'](_0x39d8eb['rootName'])&&_0x197dcd['detachRoot'](_0x39d8eb);for(const _0x54de44 of _0x1050b1){let _0x2cd53c=_0x18e735['model']['document']['getRoot'](_0x54de44);_0x2cd53c&&_0x2cd53c['isAttached']()||(_0x2cd53c=_0x197dcd['addRoot'](_0x54de44));const _0x41083c=_0x439425[_0x54de44],_0x2d956b=Object['keys'](_0x41083c),_0x9dbc60=_0x105559[_0x54de44];for(const _0x4f15f4 of _0x2cd53c['getAttributeKeys']())_0x2d956b['includes'](_0x4f15f4)||_0x197dcd['removeAttribute'](_0x4f15f4,_0x2cd53c);for(const _0xf3f518 of _0x2d956b)_0x197dcd['setAttribute'](_0xf3f518,_0x439425[_0x54de44][_0xf3f518],_0x2cd53c);_0x197dcd['remove'](_0x197dcd['createRangeIn'](_0x2cd53c)),_0x197dcd['insert'](_0x18e735['data']['parse'](_0x9dbc60,_0x2cd53c),_0x2cd53c,0x0);}});const _0x9b536d=m(_0x18e735['locale'],'Restored');if(_0x3c6814['name'])_0x3af001=-0x1==_0x3c6814['name']['indexOf'](_0x9b536d)?_0x9b536d+':\x20'+_0x3c6814['name']:_0x3c6814['name'];else _0x3af001=_0x9b536d+':\x20'+(_0x3c6814['createdAt']['toLocaleDateString'](_0x18e735['locale']['uiLanguage'],{'month':'long','day':'numeric'})+',\x20'+_0x3c6814['createdAt']['toLocaleTimeString'](_0x18e735['locale']['uiLanguage'],{'hour':'numeric','minute':'numeric'}));return await _0x89fd76['saveRevision']({'name':_0x3af001}),_0x21dc3['isReady']=!0x0,_0x18e735['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}}export{nt as RestoreRevisionCommand,I as Revision,ht as RevisionHistory,l as RevisionHistoryUI,$ as RevisionHistoryUtils,h as RevisionTracker,u as RevisionViewer,f as RevisionViewerEditor,at as RevisionViewerIntegration,fi as RevisionViewerLoadingOverlay,v as RevisionViewerUI,S as RevisionsRepository,d as RevisionsSidebar,ot as ShowChangeCommand};
|
|
29
|
+
at();static get['pluginName'](){return'RevisionsSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[u];}constructor(_0x3585e8){super(_0x3585e8),this['_revisionViewer']=_0x3585e8['plugins']['get'](u),this['_revisionsRepository']=this['_revisionViewer']['repository'],this['_sidebarView']=null;}['init'](){const _0x102f3f=this['_revisionsRepository']['_revisions'],_0x588ee6=this['_createRevisionActions'](),_0x4df98d=this['editor']['config']['get']('revisionHistory.viewerSidebarContainer');this['_sidebarView']=new Ri(this['editor']['locale'],_0x102f3f,_0x588ee6,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',(_0x445932,_0x91b964)=>{_0x91b964['revisionViews']['on']('add',(_0x18fe02,_0x26d237)=>{_0x26d237['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)),_0x4df98d['appendChild'](this['_sidebarView']['element']);}['destroy'](){this['_sidebarView']['element']['remove'](),this['_sidebarView']['destroy']();}['_handleEditorDataReady'](){const _0x2bff78=this['_revisionsRepository']['getRevision'](0x0);if(_0x2bff78){const _0x1b455e=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x2bff78['id']);this['_revisionViewer']['compare'](_0x2bff78,_0x1b455e);}}['_handleRevisionSelected'](_0x263fd3,_0x10fead){const _0x493c30=this['_revisionsRepository']['getRevision'](_0x10fead['id']),_0x3a58ee=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x493c30['id']);this['_revisionViewer']['compare'](_0x493c30,_0x3a58ee);}['_handleRevisionSetName'](_0x1a68fe,_0xae25e1){this['_revisionsRepository']['getRevision'](_0xae25e1['id'])['setName'](_0xae25e1['name']);}['_handleDiffChange'](_0x5ab7f7,_0x5481a1,_0x35da7c){const _0x167bba=this['_revisionsRepository']['getRevisionsInDiff'](_0x35da7c);_0x167bba['length']>0x2?(this['_sidebarView']['highlightRevisions'](_0x167bba),this['_sidebarView']['selectRevision'](null)):(this['_sidebarView']['highlightRevisions']([]),this['_sidebarView']['selectRevision'](_0x167bba[0x0]));}['_createRevisionActions'](){const _0x5de635=this['editor'],_0x4d04e1=d['availableRevisionActions'],_0x419a53=_0x5de635['config']['get']('revisionHistory.revisionActions')||d['defaultRevisionActions'];if(_0x419a53['length'])return _0x419a53['map'](_0x46d62b=>{const _0xa766a2='string'==typeof _0x46d62b?Object['assign']({},_0x4d04e1[_0x46d62b]):_0x46d62b;return _0xa766a2['action']=_0xa766a2['action']['bind'](this,_0x5de635),_0xa766a2['isVisible']&&(_0xa766a2['isVisible']=_0xa766a2['isVisible']['bind'](this,_0x5de635)),_0xa766a2;});}}function at(){return{'compareAgainstSelected':{'name':'Compare\x20against\x20selected','action':({plugins:_0x3ba620},_0x143d8d)=>{const _0x3ca7cf=_0x3ba620['get'](u),_0x177e5b=_0x3ca7cf['repository'];let _0x409a67=_0x3ca7cf['diff']['newRevisionId'],_0x247a0e=_0x143d8d['id'];_0x177e5b['getIndex'](_0x409a67)>_0x177e5b['getIndex'](_0x247a0e)&&([_0x409a67,_0x247a0e]=[_0x247a0e,_0x409a67]),_0x3ca7cf['compare'](_0x409a67,_0x247a0e);},'isVisible':({plugins:_0x4f43a5},_0x21b692)=>{const _0x22e0bd=_0x4f43a5['get'](u);return!(_0x22e0bd['repository']['getRevisionsInDiff'](_0x22e0bd['diff'])['length']>0x2)&&!_0x21b692['isSelected'];}},'restoreRevision':{'name':'Restore\x20this\x20revision','action':(_0x768ad5,{id:_0x1f3875})=>{_0x768ad5['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x1f3875);},'isVisible':({plugins:_0x3f9adc},_0x48c1ff)=>!!_0x3f9adc['get'](u)['repository']['getLaterVisibleRevision'](_0x48c1ff['id'])},'nameRevision':{'name':'Name\x20this\x20revision','action':({plugins:_0x4d0c23},{id:_0x3c919a,revisionNameView:_0x1e35a8})=>{const _0x31f054=_0x4d0c23['get'](u),_0x2ae337=_0x31f054['repository']['getEarlierVisibleRevision'](_0x3c919a);_0x31f054['compare'](_0x3c919a,_0x2ae337),_0x1e35a8['focus'](),_0x1e35a8['fieldView']['select']();}}};}class Z extends tt{['_view'];['_toolbarConfig'];['_elementReplacer'];get['view'](){return this['_view'];}constructor(_0x527374,_0x1b70d4){super(_0x527374),this['_view']=_0x1b70d4,this['_toolbarConfig']=st(_0x527374['config']['get']('toolbar')),this['_elementReplacer']=new it();}get['element'](){return this['view']['element'];}['init'](_0x8c137d){const _0x390660=this['editor'],_0x34aa3c=this['view'],_0xde0413=_0x390660['editing']['view'],_0x5741ce=_0x34aa3c['editable'],_0x4c8aa7=_0xde0413['document']['getRoot']();_0x5741ce['name']=_0x4c8aa7['rootName'],_0x34aa3c['render']();const _0x47a6e9=_0x5741ce['element'];this['setEditableElement'](_0x5741ce['name'],_0x47a6e9),_0x34aa3c['editable']['bind']('isFocused')['to'](this['focusTracker']),_0xde0413['attachDomRoot'](_0x47a6e9),this['_elementReplacer']['replace'](_0x8c137d,this['element']),this['_initToolbar'](),this['fire']('ready');}['destroy'](){super['destroy']();const _0x341755=this['view'],_0x18beb1=this['editor']['editing']['view'];this['_elementReplacer']['restore'](),_0x18beb1['detachDomRoot'](_0x341755['editable']['name']),_0x341755['destroy']();}['_initToolbar'](){const _0x3e1783=this['view'];_0x3e1783['stickyPanel']['bind']('isActive')['to'](this['focusTracker'],'isFocused'),_0x3e1783['stickyPanel']['limiterElement']=_0x3e1783['element'],_0x3e1783['stickyPanel']['bind']('viewportTopOffset')['to'](this,'viewportOffset',({top:_0x3579fa})=>_0x3579fa),_0x3e1783['toolbar']['fillFromConfig'](this['_toolbarConfig'],this['componentFactory']),this['addToolbar'](_0x3e1783['toolbar']);}}class ii extends _0x365cb2{['_editable'];['stickyPanel'];['toolbar'];get['editable'](){return this['_editable'];}constructor(_0x2b5fef,_0x3e6dcb,_0x4515d9={}){super(_0x2b5fef),this['stickyPanel']=new _0x4ad34d(_0x2b5fef),this['toolbar']=new _0x532d93(_0x2b5fef,{'shouldGroupWhenFull':_0x4515d9['shouldToolbarGroupWhenFull']}),this['_editable']=new te(_0x2b5fef,_0x3e6dcb);}['render'](){super['render'](),this['stickyPanel']['content']['add'](this['toolbar']),this['top']['add'](this['stickyPanel']),this['main']['add'](this['editable']);}}class f extends/* #__PURE__ -- @preserve */
|
|
30
|
+
_0x25ed20(_0x3f7344){['_ui'];get['ui'](){return this['_ui'];}constructor(_0x5baec4,_0x3b9c0d){super(_0x3b9c0d),this['sourceElement']=_0x5baec4,this['model']['document']['createRoot']();const _0x136d4c=new ii(this['locale'],this['editing']['view'],{'shouldToolbarGroupWhenFull':!0x0});this['_ui']=new Z(this,_0x136d4c);}['destroy'](){return this['updateSourceElement'](),this['ui']['destroy'](),super['destroy']();}static async['create'](_0x96496,_0x3aa189){const _0x431ea4=new this(_0x96496,_0x3aa189);return await _0x431ea4['initPlugins'](),await _0x431ea4['ui']['init'](_0x96496),await _0x431ea4['data']['init'](_0x431ea4['config']['get']('initialData')||''),_0x431ea4['fire']('ready'),_0x431ea4;}}const p=['RevisionHistoryUI','RestrictedEditingMode','AIChat','AIReviewMode','AIBalloon','AIQuickActions','AIActions'];class ht extends _0x2a9b7d{['result'];static get['pluginName'](){return'RevisionViewerIntegration';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x47a36c){function _0x22b5bd(_0x3c2c4b){return _0x3c2c4b['map'](_0x568d75=>String['fromCharCode'](_0x568d75))['join']('');}super(_0x47a36c),this['result']='end',_0x47a36c[_0x22b5bd([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x22b5bd([0x76,0x69,0x65,0x77])][_0x22b5bd([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x22b5bd([0x61,0x75,0x74,0x6f]),_0x47a36c[_0x22b5bd([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x22b5bd([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x22b5bd([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x22b5bd([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x22b5bd([0x6f,0x6b])});}}class ct extends _0x2a9b7d{['_viewerEditor'];static get['pluginName'](){return'RevisionHistory';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[h,l];}constructor(_0x5d206f){if(super(_0x5d206f),!this['editor']['config']['get']('revisionHistory'))throw new _0x2c2824('revision-history-missing-configuration',this);this['_viewerEditor']=null,this['set']('isRevisionViewerOpen',!0x1),this['editor']['config']['define']('revisionHistory.showRevisionViewerCallback',_0x252766=>this['_showRevisionViewer']({..._0x252766,'translations':this['editor']['locale']['translations']})),this['editor']['config']['define']('revisionHistory.closeRevisionViewerCallback',_0x1a5ea2=>this['_closeRevisionViewer'](_0x1a5ea2)),this['editor']['config']['define']('revisionHistory.restoreRevisionCallback',_0xb179bd=>this['_restoreRevision'](_0xb179bd)),this['editor']['config']['define']('revisionHistory.requireRevisionName',!0x1),this['_enhanceShowRevisionViewerCallback'](),this['_enhanceCloseRevisionViewerCallback']();}set['adapter'](_0x54e0f3){this['editor']['plugins']['get']('RevisionTracker')['adapter']=_0x54e0f3;}get['adapter'](){return this['editor']['plugins']['get']('RevisionTracker')['adapter'];}['addRevisionData'](_0x29558c){return this['editor']['plugins']['get']('RevisionTracker')['addRevisionData'](_0x29558c);}['getRevision'](_0x1f972f){return this['editor']['plugins']['get']('RevisionsRepository')['getRevision'](_0x1f972f);}['getRevisions'](_0x1ef9ce){return this['editor']['plugins']['get']('RevisionsRepository')['getRevisions'](_0x1ef9ce||{'toJSON':!0x1});}['_getRevisionViewerEditorConfig'](){const _0x373a86=this['editor'],_0xf123d0=_0x23fc3b(_0x373a86,p),_0x25111b=_0x373a86['plugins']['get']('RevisionTracker'),_0x498d92=_0x373a86['plugins']['get']('Users')['users'];return _0xf123d0['toolbar']=['exitToEditing','restoreRevision','changesNavigation'],delete _0xf123d0['lazyRoots'],(_0xf123d0['plugins']['push'](ht,u,v,class extends _0x2a9b7d{static get['requires'](){return[u,'Users'];}['init'](){const _0x3de849=this['editor']['plugins']['get']('Users');for(const _0x5d7c2d of _0x498d92)_0x5d7c2d['isAnonymous']||_0x3de849['getUser'](_0x5d7c2d['id'])||_0x3de849['addUser'](_0x5d7c2d);const _0x89d63c=_0x25111b['repository']['getRevisions']();let _0x51368f=null;const _0x11538f=this['editor']['plugins']['get']('RevisionViewer');_0x11538f['adapter']=_0x25111b['adapter'],_0x11538f['bind']('isEnabled')['to'](_0x25111b),this['editor']['commands']['get']('restoreRevision')['bind']('isEnabled')['to'](_0x373a86,'isReadOnly',_0x5e08c2=>!_0x5e08c2);for(const _0x3d64ec of _0x89d63c){const _0x5a1c09=null===_0x3d64ec['creator'];if(_0x5a1c09&&_0x3d64ec['toVersion']===_0x3d64ec['fromVersion'])continue;const _0xc55406=_0x3d64ec['toJSON']();_0x11538f['addRevisionData'](_0xc55406,(_0x2c5c8e,_0x4f17f1,_0x33eba8)=>{if(_0x5a1c09){if(_0x51368f)_0x51368f['_update'](_0x2c5c8e,_0x4f17f1);else{if(!_0x4f17f1){const _0x3872b0=_0x33eba8['toJSON']();_0x3872b0['id']=_0x422234(),_0x25111b['saveRevision'](_0x3872b0,_0x33eba8['toVersion'])['then'](_0x453da3=>{_0x51368f=_0x453da3;});}}}else _0x3d64ec['_update'](_0x2c5c8e,_0x4f17f1);});}}},d),_0xf123d0);}['_enhanceShowRevisionViewerCallback'](){const _0x2c306c=this['editor']['config']['get']('revisionHistory')['showRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.showRevisionViewerCallback',async()=>{this['editor']['enableReadOnlyMode']('revision-history-viewer-opened');const _0x34e889=this['editor']['plugins']['get']('RevisionTracker');if(this['editor']['plugins']['has']('Autosave')){const _0x597acc=this['editor']['plugins']['get']('Autosave');await _0x597acc['save']();}else await _0x34e889['update']();if(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('Dialog')){const _0x3bc733=this['editor']['plugins']['get']('Dialog');_0x3bc733['isOpen']&&_0x3bc733['hide']();}if(this['editor']['plugins']['has']('AITabs')){const _0x19e629=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0x49d6ba of _0x19e629)_0x49d6ba['class']=_0x49d6ba['class']?_0x49d6ba['class']+'\x20ck-tab-panel_disabled':'ck-tab-panel_disabled';if(this['editor']['plugins']['has']('AIChat')){const _0x333be5=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0x333be5&&_0x333be5['setAttribute']('tabindex','-1');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0x378c23=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0x378c23&&_0x378c23['setAttribute']('tabindex','-1');}}const _0x35d9f9=this['_getRevisionViewerEditorConfig']();return _0x2c306c(_0x35d9f9)['then'](_0x193a93=>{return(this['_viewerEditor']=_0x193a93,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'),_0x193a93);})['catch'](_0x968b0=>(console['error'](_0x968b0),this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),null));});}['_enhanceCloseRevisionViewerCallback'](){const _0x40032d=this['editor']['config']['get']('revisionHistory')['closeRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.closeRevisionViewerCallback',()=>{if(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['editor']['plugins']['has']('AITabs')){const _0x5cc0b0=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0x30ad09 of _0x5cc0b0)_0x30ad09['class']='ck-tab-panel_disabled'===_0x30ad09['class']?'':_0x30ad09['class']['replace']('\x20ck-tab-panel_disabled','');if(this['editor']['plugins']['has']('AIChat')){const _0xf2512=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0xf2512&&_0xf2512['removeAttribute']('tabindex');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0x2292cb=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0x2292cb&&_0x2292cb['removeAttribute']('tabindex');}}return this['_viewerEditor']['plugins']['get']('RevisionViewer')['_cleanUp'](),_0x40032d(this['_viewerEditor'])['then'](()=>{if(this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),this['_viewerEditor']=null,this['editor']['plugins']['has']('Annotations')){const _0x31bd93=this['editor']['plugins']['get']('Annotations');_0x31bd93['refreshVisibility'](),_0x31bd93['refreshPositioning']();}});});}['_showRevisionViewer'](_0x1d1610){const _0x13a789=this['editor']['config']['get']('revisionHistory.editorContainer'),_0x2d228c=this['editor']['config']['get']('revisionHistory.viewerContainer'),_0x445277=this['editor']['config']['get']('revisionHistory.viewerEditorElement');return f['create'](_0x445277,_0x1d1610)['then'](_0x7e7a5=>(_0x2d228c['style']['display']='block',_0x13a789['style']['display']='none',this['isRevisionViewerOpen']=!0x0,_0x7e7a5));}['_closeRevisionViewer'](_0x38d49b){const _0x149f0e=this['editor']['config']['get']('revisionHistory.editorContainer');return this['editor']['config']['get']('revisionHistory.viewerContainer')['style']['display']='none',_0x149f0e['style']['display']='',this['isRevisionViewerOpen']=!0x1,_0x38d49b['destroy']();}async['_restoreRevision'](_0x111c0e){const _0x3b681c=this['editor'],_0x1bb713=this['_viewerEditor']['plugins']['get']('RevisionViewer'),_0x455379=_0x3b681c['plugins']['get']('RevisionTracker'),_0x2991aa=_0x3b681c['plugins']['get']('RevisionHistoryUtils'),_0x458657=_0x1bb713['repository']['getRevision'](_0x111c0e);let _0x24fee9,_0x109aa3,_0x519552;try{await _0x2991aa['loadRevisionData'](_0x458657,this['adapter']),_0x24fee9=_0x2991aa['getRevisionDocumentData'](_0x458657),_0x109aa3=_0x2991aa['getRevisionRootsAttributes'](_0x458657);}catch(_0x40a9d7){return void console['error'](_0x40a9d7);}_0x3b681c['model']['change'](_0x1f0667=>{for(const _0x3db264 of Array['from'](_0x3b681c['model']['markers']['getMarkersGroup']('restrictedEditingException')))_0x1f0667['removeMarker'](_0x3db264);}),_0x1bb713['isReady']=!0x1,_0x3b681c['model']['enqueueChange'](_0xe651af=>{_0xe651af['setSelection'](null),_0xe651af['removeSelectionAttribute'](_0x3b681c['model']['document']['selection']['getAttributeKeys']());const _0x341fd9=Object['keys'](_0x24fee9);for(const _0x3f3c7c of _0x3b681c['model']['document']['roots'])'$graveyard'!=_0x3f3c7c['rootName']&&_0x3f3c7c['isAttached']()&&!_0x341fd9['includes'](_0x3f3c7c['rootName'])&&_0xe651af['detachRoot'](_0x3f3c7c);for(const _0x37cb7c of _0x341fd9){let _0x429781=_0x3b681c['model']['document']['getRoot'](_0x37cb7c);_0x429781&&_0x429781['isAttached']()||(_0x429781=_0xe651af['addRoot'](_0x37cb7c));const _0x1845e3=_0x109aa3[_0x37cb7c],_0x5ab733=Object['keys'](_0x1845e3),_0x237fc5=_0x24fee9[_0x37cb7c];for(const _0x28aa04 of _0x429781['getAttributeKeys']())_0x5ab733['includes'](_0x28aa04)||_0xe651af['removeAttribute'](_0x28aa04,_0x429781);for(const _0xdfb3b5 of _0x5ab733)_0xe651af['setAttribute'](_0xdfb3b5,_0x109aa3[_0x37cb7c][_0xdfb3b5],_0x429781);_0xe651af['remove'](_0xe651af['createRangeIn'](_0x429781)),_0xe651af['insert'](_0x3b681c['data']['parse'](_0x237fc5,_0x429781),_0x429781,0x0);}});const _0x34fb17=m(_0x3b681c['locale'],'Restored');if(_0x458657['name'])_0x519552=-0x1==_0x458657['name']['indexOf'](_0x34fb17)?_0x34fb17+':\x20'+_0x458657['name']:_0x458657['name'];else _0x519552=_0x34fb17+':\x20'+(_0x458657['createdAt']['toLocaleDateString'](_0x3b681c['locale']['uiLanguage'],{'month':'long','day':'numeric'})+',\x20'+_0x458657['createdAt']['toLocaleTimeString'](_0x3b681c['locale']['uiLanguage'],{'hour':'numeric','minute':'numeric'}));return await _0x455379['saveRevision']({'name':_0x519552}),_0x1bb713['isReady']=!0x0,_0x3b681c['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}}export{nt as RestoreRevisionCommand,I as Revision,ct as RevisionHistory,l as RevisionHistoryUI,$ as RevisionHistoryUtils,h as RevisionTracker,u as RevisionViewer,f as RevisionViewerEditor,ht as RevisionViewerIntegration,bi as RevisionViewerLoadingOverlay,v as RevisionViewerUI,S as RevisionsRepository,d as RevisionsSidebar,rt as ShowChangeCommand};
|