@ckeditor/ckeditor5-revision-history 48.2.0-alpha.1 → 48.2.0-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +7 -7
- package/dist/translations/af.js +1 -1
- package/dist/translations/af.umd.js +1 -1
- package/dist/translations/ar.js +1 -1
- package/dist/translations/ar.umd.js +1 -1
- package/dist/translations/ast.js +1 -1
- package/dist/translations/ast.umd.js +1 -1
- package/dist/translations/az.js +1 -1
- package/dist/translations/az.umd.js +1 -1
- package/dist/translations/be.js +1 -1
- package/dist/translations/be.umd.js +1 -1
- package/dist/translations/bg.js +1 -1
- package/dist/translations/bg.umd.js +1 -1
- package/dist/translations/bn.js +1 -1
- package/dist/translations/bn.umd.js +1 -1
- package/dist/translations/bs.js +1 -1
- package/dist/translations/bs.umd.js +1 -1
- package/dist/translations/ca.js +1 -1
- package/dist/translations/ca.umd.js +1 -1
- package/dist/translations/cs.js +1 -1
- package/dist/translations/cs.umd.js +1 -1
- package/dist/translations/da.js +1 -1
- package/dist/translations/da.umd.js +1 -1
- package/dist/translations/de-ch.js +1 -1
- package/dist/translations/de-ch.umd.js +1 -1
- package/dist/translations/de.js +1 -1
- package/dist/translations/de.umd.js +1 -1
- package/dist/translations/el.js +1 -1
- package/dist/translations/el.umd.js +1 -1
- package/dist/translations/en-au.js +1 -1
- package/dist/translations/en-au.umd.js +1 -1
- package/dist/translations/en-gb.js +1 -1
- package/dist/translations/en-gb.umd.js +1 -1
- package/dist/translations/en.js +1 -1
- package/dist/translations/en.umd.js +1 -1
- package/dist/translations/eo.js +1 -1
- package/dist/translations/eo.umd.js +1 -1
- package/dist/translations/es-co.js +1 -1
- package/dist/translations/es-co.umd.js +1 -1
- package/dist/translations/es.js +1 -1
- package/dist/translations/es.umd.js +1 -1
- package/dist/translations/et.js +1 -1
- package/dist/translations/et.umd.js +1 -1
- package/dist/translations/eu.js +1 -1
- package/dist/translations/eu.umd.js +1 -1
- package/dist/translations/fa.js +1 -1
- package/dist/translations/fa.umd.js +1 -1
- package/dist/translations/fi.js +1 -1
- package/dist/translations/fi.umd.js +1 -1
- package/dist/translations/fr.js +1 -1
- package/dist/translations/fr.umd.js +1 -1
- package/dist/translations/gl.js +1 -1
- package/dist/translations/gl.umd.js +1 -1
- package/dist/translations/gu.js +1 -1
- package/dist/translations/gu.umd.js +1 -1
- package/dist/translations/he.js +1 -1
- package/dist/translations/he.umd.js +1 -1
- package/dist/translations/hi.js +1 -1
- package/dist/translations/hi.umd.js +1 -1
- package/dist/translations/hr.js +1 -1
- package/dist/translations/hr.umd.js +1 -1
- package/dist/translations/hu.js +1 -1
- package/dist/translations/hu.umd.js +1 -1
- package/dist/translations/hy.js +1 -1
- package/dist/translations/hy.umd.js +1 -1
- package/dist/translations/id.js +1 -1
- package/dist/translations/id.umd.js +1 -1
- package/dist/translations/it.js +1 -1
- package/dist/translations/it.umd.js +1 -1
- package/dist/translations/ja.js +1 -1
- package/dist/translations/ja.umd.js +1 -1
- package/dist/translations/jv.js +1 -1
- package/dist/translations/jv.umd.js +1 -1
- package/dist/translations/kk.js +1 -1
- package/dist/translations/kk.umd.js +1 -1
- package/dist/translations/km.js +1 -1
- package/dist/translations/km.umd.js +1 -1
- package/dist/translations/kn.js +1 -1
- package/dist/translations/kn.umd.js +1 -1
- package/dist/translations/ko.js +1 -1
- package/dist/translations/ko.umd.js +1 -1
- package/dist/translations/ku.js +1 -1
- package/dist/translations/ku.umd.js +1 -1
- package/dist/translations/lt.js +1 -1
- package/dist/translations/lt.umd.js +1 -1
- package/dist/translations/lv.js +1 -1
- package/dist/translations/lv.umd.js +1 -1
- package/dist/translations/ms.js +1 -1
- package/dist/translations/ms.umd.js +1 -1
- package/dist/translations/nb.js +1 -1
- package/dist/translations/nb.umd.js +1 -1
- package/dist/translations/ne.js +1 -1
- package/dist/translations/ne.umd.js +1 -1
- package/dist/translations/nl.js +1 -1
- package/dist/translations/nl.umd.js +1 -1
- package/dist/translations/no.js +1 -1
- package/dist/translations/no.umd.js +1 -1
- package/dist/translations/oc.js +1 -1
- package/dist/translations/oc.umd.js +1 -1
- package/dist/translations/pl.js +1 -1
- package/dist/translations/pl.umd.js +1 -1
- package/dist/translations/pt-br.js +1 -1
- package/dist/translations/pt-br.umd.js +1 -1
- package/dist/translations/pt.js +1 -1
- package/dist/translations/pt.umd.js +1 -1
- package/dist/translations/ro.js +1 -1
- package/dist/translations/ro.umd.js +1 -1
- package/dist/translations/ru.js +1 -1
- package/dist/translations/ru.umd.js +1 -1
- package/dist/translations/si.js +1 -1
- package/dist/translations/si.umd.js +1 -1
- package/dist/translations/sk.js +1 -1
- package/dist/translations/sk.umd.js +1 -1
- package/dist/translations/sl.js +1 -1
- package/dist/translations/sl.umd.js +1 -1
- package/dist/translations/sq.js +1 -1
- package/dist/translations/sq.umd.js +1 -1
- package/dist/translations/sr-latn.js +1 -1
- package/dist/translations/sr-latn.umd.js +1 -1
- package/dist/translations/sr.js +1 -1
- package/dist/translations/sr.umd.js +1 -1
- package/dist/translations/sv.js +1 -1
- package/dist/translations/sv.umd.js +1 -1
- package/dist/translations/th.js +1 -1
- package/dist/translations/th.umd.js +1 -1
- package/dist/translations/ti.js +1 -1
- package/dist/translations/ti.umd.js +1 -1
- package/dist/translations/tk.js +1 -1
- package/dist/translations/tk.umd.js +1 -1
- package/dist/translations/tr.js +1 -1
- package/dist/translations/tr.umd.js +1 -1
- package/dist/translations/tt.js +1 -1
- package/dist/translations/tt.umd.js +1 -1
- package/dist/translations/ug.js +1 -1
- package/dist/translations/ug.umd.js +1 -1
- package/dist/translations/uk.js +1 -1
- package/dist/translations/uk.umd.js +1 -1
- package/dist/translations/ur.js +1 -1
- package/dist/translations/ur.umd.js +1 -1
- package/dist/translations/uz.js +1 -1
- package/dist/translations/uz.umd.js +1 -1
- package/dist/translations/vi.js +1 -1
- package/dist/translations/vi.umd.js +1 -1
- package/dist/translations/zh-cn.js +1 -1
- package/dist/translations/zh-cn.umd.js +1 -1
- package/dist/translations/zh.js +1 -1
- package/dist/translations/zh.umd.js +1 -1
- package/package.json +10 -10
package/dist/index.js
CHANGED
|
@@ -20,11 +20,11 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{ObservableMixin as
|
|
24
|
-
_0x29a21b(){['id'];['creator'];['authors'];['diffData'];['toVersion'];['fromVersion'];['model'];constructor(_0x2e889b){super(),this['id']=_0x2e889b['id']||_0x13fdf1(),this['creator']=_0x2e889b['creator']||null,this['authors']=_0x2e889b['authors']||[],this['diffData']=_0x2e889b['diffData']||null,this['toVersion']=_0x2e889b['toVersion']||0x0,this['fromVersion']=_0x2e889b['fromVersion']||0x0,this['set']('name',_0x2e889b['name']||''),this['set']('createdAt',_0x2e889b['createdAt']||new Date()),this['set']('attributes',_0x2e889b['attributes']||{});}['setName'](_0x804005){this['_update']({'name':_0x804005});}['setAttribute'](_0x4358db,_0x2ea2b7){const _0x48d84e=_0x5ba81d(this['attributes']);_0x804c91(_0x48d84e,_0x4358db,_0x2ea2b7),this['_update']({'attributes':_0x48d84e});}['removeAttribute'](_0x46365b){const _0x3ceae6=_0x5ba81d(this['attributes']);_0x46e363(_0x3ceae6,_0x46365b),this['_update']({'attributes':_0x3ceae6});}['_update'](_0x5538fa,_0x5ee1b5=!0x1){let _0x5a1f3a=!0x1;const _0x4862cc={'id':this['id']},_0x31a859=['name','createdAt','diffData','authors','attributes','toVersion','fromVersion','creatorId'];for(const _0x358c10 of _0x31a859){const _0x3cbd22=_0x5538fa[_0x358c10];void 0x0!==_0x3cbd22&&_0x3cbd22!==this[_0x358c10]&&(this[_0x358c10]=_0x3cbd22,_0x4862cc[_0x358c10]=_0x3cbd22,_0x5a1f3a=!0x0);}_0x5a1f3a&&(_0x4862cc['authors']&&(_0x4862cc['authorsIds']=_0x4862cc['authors']['map'](_0x1a6ca1=>_0x1a6ca1['id']),delete _0x4862cc['authors']),this['fire']('_update',_0x4862cc,_0x5ee1b5));}['toJSON'](){return{'id':this['id'],'name':this['name'],'creatorId':this['creator']?this['creator']['id']:null,'authorsIds':this['authors']['map'](_0x3659f0=>_0x3659f0['id']),'diffData':this['diffData'],'createdAt':this['createdAt'],'attributes':this['attributes'],'fromVersion':this['fromVersion'],'toVersion':this['toVersion']};}}class RevisionsRepository extends _0x1098b4{['_revisions'];static get['requires'](){return[_0x1b1234];}static get['pluginName'](){return'RevisionsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get['length'](){return this['_revisions']['length'];}constructor(_0x25f908){super(_0x25f908),this['_revisions']=new _0x166815();}['afterInit'](){!async function(_0x4b873f){const _0x2d1ecf=_0x5ea7c6([0x76,0x73,0x6d,0x4c,0x34,0x54,0x50,0x70,0x75,0x52,0x35,0x33,0x4d,0x6c,0x71,0x53,0x6a,0x32,0x56,0x58,0x77,0x48,0x39,0x6f,0x45,0x41,0x4e,0x38,0x46,0x78,0x4a,0x74,0x47,0x55,0x4f,0x64,0x62,0x44,0x43,0x5a,0x30,0x31,0x69,0x68,0x79,0x66,0x6b,0x42,0x51,0x59,0x36,0x61,0x63,0x67,0x7a,0x37,0x72,0x49,0x65,0x57,0x4b,0x6e]),_0x259d9b=0xeb829,_0x4c56ac=0x359e09b0,_0x3eb457=0x359982e8^_0x4c56ac,_0x1a13ab=window[_0x5ea7c6([0x44,0x61,0x74,0x65])][_0x5ea7c6([0x6e,0x6f,0x77])](),_0x2259e7=_0x4b873f[_0x5ea7c6([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x364171=new window[(_0x5ea7c6([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3aa537=>{_0x2259e7[_0x5ea7c6([0x6f,0x6e,0x63,0x65])](_0x5ea7c6([0x72,0x65,0x61,0x64,0x79]),_0x3aa537);}),_0x2143e2={[_0x5ea7c6([0x6b,0x74,0x79])]:_0x5ea7c6([0x45,0x43]),[_0x5ea7c6([0x75,0x73,0x65])]:_0x5ea7c6([0x73,0x69,0x67]),[_0x5ea7c6([0x63,0x72,0x76])]:_0x5ea7c6([0x50,0x2d,0x32,0x35,0x36]),[_0x5ea7c6([0x78])]:_0x5ea7c6([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]),[_0x5ea7c6([0x79])]:_0x5ea7c6([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]),[_0x5ea7c6([0x61,0x6c,0x67])]:_0x5ea7c6([0x45,0x53,0x32,0x35,0x36])},_0x222676=_0x2259e7[_0x5ea7c6([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x5ea7c6([0x67,0x65,0x74])](_0x5ea7c6([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x7aa152(){let _0x9e72f1,_0x47a63b=null,_0x5d135f=null;try{if(_0x222676==_0x5ea7c6([0x47,0x50,0x4c]))return _0x5ea7c6([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x9e72f1=_0x91ba7f(),!_0x9e72f1)return _0x5ea7c6([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x9e72f1[_0x5ea7c6([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x5d135f=_0x492404(_0x9e72f1[_0x5ea7c6([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x9e72f1[_0x5ea7c6([0x6a,0x74,0x69])])),await _0x5c055b()?_0x2edf03()?_0x408039()?_0x5ea7c6([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x196d8e()?(_0x9e72f1[_0x5ea7c6([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x5ea7c6([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x47a63b=_0x147f9f(_0x5ea7c6([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),await _0x5bc057()):_0x5ea7c6([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x5ea7c6([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x5ea7c6([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x5ea7c6([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x408039(){const _0x284399=[_0x5ea7c6([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x5ea7c6([0x74,0x72,0x69,0x61,0x6c])][_0x5ea7c6([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x9e72f1[_0x5ea7c6([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x1a13ab/0x3e8:0xe10*_0x3eb457;return _0x9e72f1[_0x5ea7c6([0x65,0x78,0x70])]<_0x284399;}function _0x2edf03(){const _0x2a9d9c=_0x9e72f1[_0x5ea7c6([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x2a9d9c)return!0x1;if(_0x2a9d9c[_0x5ea7c6([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5ea7c6([0x2a])))return!0x0;if(_0x2a9d9c[_0x5ea7c6([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5ea7c6([0x52,0x48])))return!0x0;if(_0x2a9d9c[_0x5ea7c6([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5ea7c6([0x52,0x52,0x48]))){if(_0x56f0a0())return!0x0;if(_0x2d882d()||_0x413a40())return!0x0;}return!0x1;}function _0x196d8e(){const _0x10a350=_0x9e72f1[_0x5ea7c6([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x10a350||0x0==_0x10a350[_0x5ea7c6([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x31bd25}=new URL(window[_0x5ea7c6([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x10a350[_0x5ea7c6([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x31bd25))return!0x0;const _0x354a70=_0x31bd25[_0x5ea7c6([0x73,0x70,0x6c,0x69,0x74])](_0x5ea7c6([0x2e]));return _0x10a350[_0x5ea7c6([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x56225d=>_0x56225d[_0x5ea7c6([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5ea7c6([0x2a])))[_0x5ea7c6([0x6d,0x61,0x70])](_0x4e50bc=>_0x4e50bc[_0x5ea7c6([0x73,0x70,0x6c,0x69,0x74])](_0x5ea7c6([0x2e])))[_0x5ea7c6([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x4396dd=>_0x4396dd[_0x5ea7c6([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x354a70[_0x5ea7c6([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x5ea7c6([0x6d,0x61,0x70])](_0x19d703=>Array(_0x354a70[_0x5ea7c6([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x19d703[_0x5ea7c6([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x5ea7c6([0x66,0x69,0x6c,0x6c])](_0x19d703[0x0]===_0x5ea7c6([0x2a])?_0x5ea7c6([0x2a]):'')[_0x5ea7c6([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x19d703))[_0x5ea7c6([0x73,0x6f,0x6d,0x65])](_0x1be971=>_0x354a70[_0x5ea7c6([0x65,0x76,0x65,0x72,0x79])]((_0x2b9f38,_0x273c9d)=>_0x1be971[_0x273c9d]===_0x2b9f38||_0x1be971[_0x273c9d]===_0x5ea7c6([0x2a])));}function _0x5bc057(){return _0x47a63b&&_0x5d135f?new window[(_0x5ea7c6([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x4fed87,_0x473a57)=>{_0x47a63b[_0x5ea7c6([0x74,0x68,0x65,0x6e])](_0x4fed87,_0x473a57),_0x5d135f[_0x5ea7c6([0x74,0x68,0x65,0x6e])](_0x158b54=>{_0x158b54!=_0x5ea7c6([0x56,0x61,0x6c,0x69,0x64])&&_0x4fed87(_0x158b54);},_0x473a57);}):_0x47a63b||_0x5d135f||_0x5ea7c6([0x56,0x61,0x6c,0x69,0x64]);}}function _0x492404(_0x4a9120,_0x3534f6){return new window[(_0x5ea7c6([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0xb7c06b=>{if(_0x586cfb())return _0xb7c06b(_0x5ea7c6([0x56,0x61,0x6c,0x69,0x64]));_0x29f2c7(),_0x2259e7[_0x5ea7c6([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x5ea7c6([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0xbbc6c8=!0x1;const _0x413a0e=_0x13fdf1();function _0x510939(_0x2ffa8f){return!!_0x2ffa8f&&(typeof _0x2ffa8f===_0x5ea7c6([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x2ffa8f===_0x5ea7c6([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x2ffa8f[_0x5ea7c6([0x74,0x68,0x65,0x6e])]===_0x5ea7c6([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x2ffa8f[_0x5ea7c6([0x63,0x61,0x74,0x63,0x68])]===_0x5ea7c6([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x404a22(_0x22af0b){_0x46e601(_0x22af0b)[_0x5ea7c6([0x74,0x68,0x65,0x6e])](_0x283686=>{if(!_0x283686||_0x283686[_0x5ea7c6([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x5ea7c6([0x6f,0x6b]))return _0x5ea7c6([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x3347b7(_0x506f9c(_0x413a0e+_0x3534f6))!=_0x283686[_0x5ea7c6([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x5ea7c6([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x5ea7c6([0x56,0x61,0x6c,0x69,0x64]);})[_0x5ea7c6([0x74,0x68,0x65,0x6e])](_0x135dc5=>(_0x1aad90(),_0x135dc5),()=>{const _0x5b317c=_0x102a34();return null==_0x5b317c?(_0x1aad90(),_0x5ea7c6([0x56,0x61,0x6c,0x69,0x64])):_0x5ea7c6(_0x1a13ab-_0x5b317c>(0x11928db0^_0x4c56ac)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x5ea7c6([0x74,0x68,0x65,0x6e])](_0xb7c06b)[_0x5ea7c6([0x63,0x61,0x74,0x63,0x68])](()=>{_0xb7c06b(_0x5ea7c6([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x2f91a8=0x35a8e730^_0x4c56ac;function _0x1aad90(){const _0x22ff98=_0x5ea7c6([0x6c,0x6c,0x63,0x74,0x2d])+_0x3347b7(_0x506f9c(_0x4a9120)),_0x323113=_0x33d1d9(_0x3347b7(window[_0x5ea7c6([0x4d,0x61,0x74,0x68])][_0x5ea7c6([0x63,0x65,0x69,0x6c])](_0x1a13ab/_0x2f91a8)));window[_0x5ea7c6([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x5ea7c6([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x22ff98,_0x323113);}function _0x102a34(){const _0x1c9db5=_0x5ea7c6([0x6c,0x6c,0x63,0x74,0x2d])+_0x3347b7(_0x506f9c(_0x4a9120)),_0x1df56a=window[_0x5ea7c6([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x5ea7c6([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x1c9db5);return _0x1df56a?window[_0x5ea7c6([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x33d1d9(_0x1df56a),0x10)*_0x2f91a8:null;}function _0x46e601(_0x241aa8){return new window[(_0x5ea7c6([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x53b59f,_0x4efc25)=>{_0x241aa8[_0x5ea7c6([0x74,0x68,0x65,0x6e])](_0x53b59f,_0x4efc25),window[_0x5ea7c6([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x4efc25,0x359fdd70^_0x4c56ac);});}}_0x2259e7[_0x5ea7c6([0x6f,0x6e])](_0x5ea7c6([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x503201,_0x59f038)=>{if(_0x59f038[0x0]!=_0x4a9120)return _0xb7c06b(_0x5ea7c6([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x59f038[0x1]={..._0x59f038[0x1],[_0x5ea7c6([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x413a0e};},{[_0x5ea7c6([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x5ea7c6([0x68,0x69,0x67,0x68])}),_0x2259e7[_0x5ea7c6([0x6f,0x6e])](_0x5ea7c6([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0xd6e185=>{_0x510939(_0xd6e185[_0x5ea7c6([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0xbbc6c8=!0x0,_0x404a22(_0xd6e185[_0x5ea7c6([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x5ea7c6([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x5ea7c6([0x6c,0x6f,0x77])}),_0x364171[_0x5ea7c6([0x74,0x68,0x65,0x6e])](()=>{_0xbbc6c8||_0xb7c06b(_0x5ea7c6([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x586cfb(){return _0x2259e7[_0x5ea7c6([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x5ea7c6([0x76,0x69,0x65,0x77])][_0x5ea7c6([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x5ea7c6([0x61,0x75,0x74,0x6f]);}function _0x29f2c7(){_0x2259e7[_0x5ea7c6([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x5ea7c6([0x76,0x69,0x65,0x77])][_0x5ea7c6([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x5ea7c6([0x61,0x75,0x74,0x6f]);}}function _0x147f9f(_0x785a28){const _0x497618=[new window[(_0x5ea7c6([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x1f1d80=>setTimeout(_0x1f1d80,0x3597377c^_0x4c56ac)),_0x364171[_0x5ea7c6([0x74,0x68,0x65,0x6e])](()=>new window[(_0x5ea7c6([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x1d83df=>{const _0x256ed5=0x359e09b7^_0x4c56ac,_0x5e120c=_0x4b873f[_0x5ea7c6([0x5f,0x72,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x73])];function _0x4dcfaa(){_0x5e120c[_0x5ea7c6([0x6c,0x65,0x6e,0x67,0x74,0x68])]>=_0x256ed5&&_0x1d83df();}_0x4dcfaa(),_0x5e120c[_0x5ea7c6([0x6f,0x6e])](_0x5ea7c6([0x61,0x64,0x64]),_0x4dcfaa);})),new window[(_0x5ea7c6([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x377a5e=>{function _0x26980d(){for(const _0x1744d5 in window)if(window[_0x5ea7c6([0x4e,0x75,0x6d,0x62,0x65,0x72])]['isNaN'](window[_0x5ea7c6([0x4e,0x75,0x6d,0x62,0x65,0x72])](_0x1744d5))&&window[_0x1744d5]==_0x259d9b)return _0x377a5e();_0x2259e7[_0x5ea7c6([0x73,0x74,0x61,0x74,0x65])]!=_0x5ea7c6([0x64,0x65,0x73,0x74,0x72,0x6f,0x79,0x65,0x64])&&window[_0x5ea7c6([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x26980d,0x359e1a38^_0x4c56ac);}_0x22238a(_0x5ea7c6([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))&&_0x26980d();})];return window[_0x5ea7c6([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x5ea7c6([0x72,0x61,0x63,0x65])](_0x497618)[_0x5ea7c6([0x74,0x68,0x65,0x6e])](()=>_0x785a28);}async function _0x177417(){if(await _0x364171,_0x22238a(_0x5ea7c6([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))){const _0x2caea6=_0x4b873f[_0x5ea7c6([0x67,0x65,0x74,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])](0x0),_0x39cfe2=_0x4b873f[_0x5ea7c6([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])](_0x2caea6[_0x5ea7c6([0x69,0x64])]),_0x1cb09a=_0x2d5f4a(_0x5ea7c6([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]));return await _0x1cb09a[_0x5ea7c6([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])](_0x2caea6['id'],_0x39cfe2?_0x39cfe2['id']:null,!0x0),_0x1cb09a[_0x5ea7c6([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x5ea7c6([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x1cb09a[_0x5ea7c6([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x1cb09a[_0x5ea7c6([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])]=_0x4d3df3,void(_0x1cb09a[_0x5ea7c6([0x5f,0x67,0x65,0x74,0x44,0x69,0x66,0x66])]=_0x4d3df3);}if(_0x22238a(_0x5ea7c6([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]))){const _0x534960=_0x2d5f4a(_0x5ea7c6([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]));_0x534960[_0x5ea7c6([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x5ea7c6([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x534960[_0x5ea7c6([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x534960[_0x5ea7c6([0x75,0x70,0x64,0x61,0x74,0x65])]=_0x4d3df3,_0x534960[_0x5ea7c6([0x73,0x61,0x76,0x65,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])]=_0x4d3df3;}_0x2259e7[_0x5ea7c6([0x6d,0x6f,0x64,0x65,0x6c])][_0x5ea7c6([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x4d3df3,_0x2259e7[_0x5ea7c6([0x6d,0x6f,0x64,0x65,0x6c])][_0x5ea7c6([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x4d3df3,_0x2259e7[_0x5ea7c6([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x5ea7c6([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x56f0a0(){return _0x22238a(_0x5ea7c6([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x2d5f4a(_0x5ea7c6([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x5ea7c6([0x73,0x74,0x61,0x74,0x65])]==_0x5ea7c6([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x2d882d(){return _0x22238a(_0x5ea7c6([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 _0x413a40(){return _0x22238a(_0x5ea7c6([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x5295d7(_0x488b48){const _0x3ede9e=_0x85a402();_0x2259e7[_0x3ede9e]=_0x5ea7c6([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])+_0x488b48,_0x488b48[_0x5ea7c6([0x65,0x6e,0x64,0x73,0x57,0x69,0x74,0x68])](_0x5ea7c6([0x4c,0x69,0x6d,0x69,0x74]))&&(window[_0x85a402()]=_0x259d9b),_0x488b48!=_0x5ea7c6([0x56,0x61,0x6c,0x69,0x64])&&_0x177417();}function _0x85a402(){const _0x5e000f=window[_0x5ea7c6([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x5ea7c6([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x5ea7c6([0x6e,0x6f,0x77])]())[_0x5ea7c6([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x5ea7c6([0x2e]),'');let _0x263d6e=_0x5ea7c6([0x76]);for(let _0x43e57f=0x0;_0x43e57f<_0x5e000f[_0x5ea7c6([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x43e57f+=0x2){let _0x4ea443=window[_0x5ea7c6([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x5e000f[_0x5ea7c6([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x43e57f,_0x43e57f+0x2));_0x4ea443>=_0x2d1ecf[_0x5ea7c6([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x4ea443-=_0x2d1ecf[_0x5ea7c6([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x263d6e+=_0x2d1ecf[_0x4ea443];}return _0x263d6e;}function _0x91ba7f(){const _0x3359f3=_0x222676[_0x5ea7c6([0x73,0x70,0x6c,0x69,0x74])](_0x5ea7c6([0x2e]));if(0x3!=_0x3359f3[_0x5ea7c6([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x5786d7(_0x3359f3[0x1]);function _0x5786d7(_0x5be033){const _0x4e7279=_0x71da9c(_0x5be033);return _0x4e7279&&_0x1c2e65()?_0x4e7279:null;function _0x1c2e65(){const _0x3229e9=_0x4e7279[_0x5ea7c6([0x6a,0x74,0x69])],_0x254f1c=window[_0x5ea7c6([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x3229e9[_0x5ea7c6([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x3229e9[_0x5ea7c6([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x4dbcff={..._0x4e7279,[_0x5ea7c6([0x6a,0x74,0x69])]:_0x3229e9[_0x5ea7c6([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x3229e9[_0x5ea7c6([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x4dbcff[_0x5ea7c6([0x76,0x63])],_0x506f9c(_0x4dbcff)==_0x254f1c;}}}async function _0x5c055b(){let _0x4cfc82=!0x0;try{const _0xdd370e=_0x222676[_0x5ea7c6([0x73,0x70,0x6c,0x69,0x74])](_0x5ea7c6([0x2e])),[_0x2e6a7b,_0x37c63d,_0x37c690]=_0xdd370e;return _0x527293(_0x2e6a7b),await _0x31655a(_0x2e6a7b,_0x37c63d,_0x37c690),_0x4cfc82;}catch{return!0x1;}function _0x527293(_0x54da87){const _0x1fb2fd=_0x71da9c(_0x54da87);_0x1fb2fd&&_0x1fb2fd[_0x5ea7c6([0x61,0x6c,0x67])]==_0x5ea7c6([0x45,0x53,0x32,0x35,0x36])||(_0x4cfc82=!0x1);}async function _0x31655a(_0x2b5a72,_0xd372a3,_0x547c16){const _0x197cf8=window[_0x5ea7c6([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x5ea7c6([0x66,0x72,0x6f,0x6d])](_0x5627d8(_0x547c16),_0x1e196f=>_0x1e196f[_0x5ea7c6([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x56409d=new window[(_0x5ea7c6([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x5ea7c6([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x2b5a72+_0x5ea7c6([0x2e])+_0xd372a3),_0x79650b=window[_0x5ea7c6([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x5ea7c6([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x79650b)return;const _0x505ad2=await _0x79650b[_0x5ea7c6([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x5ea7c6([0x6a,0x77,0x6b]),_0x2143e2,{[_0x5ea7c6([0x6e,0x61,0x6d,0x65])]:_0x5ea7c6([0x45,0x43,0x44,0x53,0x41]),[_0x5ea7c6([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x5ea7c6([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x5ea7c6([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x79650b[_0x5ea7c6([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x5ea7c6([0x6e,0x61,0x6d,0x65])]:_0x5ea7c6([0x45,0x43,0x44,0x53,0x41]),[_0x5ea7c6([0x68,0x61,0x73,0x68])]:{[_0x5ea7c6([0x6e,0x61,0x6d,0x65])]:_0x5ea7c6([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x505ad2,_0x197cf8,_0x56409d)||(_0x4cfc82=!0x1);}}function _0x71da9c(_0xaaae9c){return _0xaaae9c[_0x5ea7c6([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x5ea7c6([0x65,0x79]))?JSON[_0x5ea7c6([0x70,0x61,0x72,0x73,0x65])](_0x5627d8(_0xaaae9c)):null;}function _0x5627d8(_0x48b062){return window[_0x5ea7c6([0x61,0x74,0x6f,0x62])](_0x48b062[_0x5ea7c6([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x5ea7c6([0x2b]))[_0x5ea7c6([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x5ea7c6([0x2f])));}function _0x506f9c(_0x3b5b29){let _0x7f3042=0x1505;function _0x2d317e(_0x567609){for(let _0x7869b6=0x0;_0x7869b6<_0x567609[_0x5ea7c6([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x7869b6++){const _0x3677cb=_0x567609[_0x5ea7c6([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x7869b6);_0x7f3042=(_0x7f3042<<0x5)+_0x7f3042+_0x3677cb,_0x7f3042&=_0x7f3042;}}function _0x183854(_0x3069ba){Array[_0x5ea7c6([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x3069ba)?_0x3069ba[_0x5ea7c6([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x183854):_0x3069ba&&typeof _0x3069ba==_0x5ea7c6([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x5ea7c6([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x3069ba)[_0x5ea7c6([0x73,0x6f,0x72,0x74])]()[_0x5ea7c6([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x233cba,_0x3fa9ea])=>{_0x2d317e(_0x233cba),_0x183854(_0x3fa9ea);}):_0x2d317e(window[_0x5ea7c6([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x3069ba));}return _0x183854(_0x3b5b29),_0x7f3042>>>0x0;}function _0x3347b7(_0x57b943){return _0x57b943[_0x5ea7c6([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x5ea7c6([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x5ea7c6([0x30]));}function _0x33d1d9(_0x15e4cc){return _0x15e4cc[_0x5ea7c6([0x73,0x70,0x6c,0x69,0x74])]('')[_0x5ea7c6([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x5ea7c6([0x6a,0x6f,0x69,0x6e])]('');}function _0x22238a(_0xeb3df0){return _0x2259e7[_0x5ea7c6([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x5ea7c6([0x68,0x61,0x73])](_0xeb3df0);}function _0x2d5f4a(_0x2a5a17){return _0x2259e7[_0x5ea7c6([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x5ea7c6([0x67,0x65,0x74])](_0x2a5a17);}function _0x4d3df3(){}function _0x5ea7c6(_0x2f9654){return _0x2f9654['map'](_0x17bf29=>String['fromCharCode'](_0x17bf29))['join']('');}_0x5295d7(await _0x7aa152());}(this);}['createRevision'](_0x48154f){const _0xa6ab24=this['editor']['plugins']['get']('Users');return new Revision({'id':_0x48154f['id'],'name':_0x48154f['name'],'creator':_0x48154f['creatorId']?_0xa6ab24['getUser'](_0x48154f['creatorId']):null,'diffData':_0x48154f['diffData']||_0x48154f['data'],'authors':_0x48154f['authorsIds']['map'](_0x1d75f7=>_0xa6ab24['getUser'](_0x1d75f7)),'createdAt':new Date(_0x48154f['createdAt']),'attributes':_0x48154f['attributes'],'fromVersion':_0x48154f['fromVersion'],'toVersion':_0x48154f['toVersion']});}['addRevision'](_0x13fce8,_0x6195b5=0x0){this['_revisions']['add'](_0x13fce8,_0x6195b5);}['getRevision'](_0x2ea1c2){return this['_revisions']['get'](_0x2ea1c2);}['getRevisions'](_0x1003ef={'toJSON':!0x1}){const _0x2ca00d=Array['from'](this['_revisions']);return _0x2ca00d['reverse'](),_0x1003ef['toJSON']?_0x2ca00d['map'](_0x2ec47e=>_0x2ec47e['toJSON']()):_0x2ca00d;}['getIndex'](_0x2e21cd){return this['_revisions']['getIndex'](_0x2e21cd);}['getEarlierVisibleRevision'](_0x463ef7){const [,_0x5db0d4]=this['getRevisionsIterator'](_0x463ef7,{'direction':'earlier'});return _0x5db0d4;}['getLaterVisibleRevision'](_0x39146d){const [,_0x587193]=this['getRevisionsIterator'](_0x39146d,{'direction':'later'});return _0x587193;}['getRevisionsInDiff'](_0x10794d){const _0x25d960=[];for(const _0x58a20d of this['getRevisionsIterator'](_0x10794d['newRevisionId']))if(_0x25d960['push'](_0x58a20d),_0x58a20d['id']===_0x10794d['oldRevisionId'])break;return _0x25d960;}*['getRevisionsIterator'](_0x529a9a,{direction:_0x13ae1b='earlier',filter:_0x59b5d8=()=>!0x0}={}){const _0x229cb6='earlier'===_0x13ae1b?0x1:-0x1;let _0x44ed3d=this['_revisions']['get'](_0x529a9a),_0x555865=this['getIndex'](_0x44ed3d);for(yield _0x44ed3d;_0x44ed3d;){if(_0x555865+=_0x229cb6,_0x44ed3d=this['getRevision'](_0x555865),!_0x44ed3d)return;_0x59b5d8(_0x44ed3d)&&(yield _0x44ed3d);}}}class RevisionHistoryUtils extends _0x1098b4{static get['pluginName'](){return'RevisionHistoryUtils';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['_viewClassToTypeChar']=new Map([[_0x3759a2,'c'],[_0x527822,'a'],[_0x31214b,'e'],[_0x22e94d,'r'],[_0x17cd4f,'u']]);['_typeCharToViewClass']=new Map([['c',_0x3759a2],['a',_0x527822],['e',_0x31214b],['r',_0x22e94d],['u',_0x17cd4f]]);async['loadRevisionData'](_0x34ebc2,_0x11eb17){if(_0x34ebc2['diffData']||!_0x11eb17)return;const _0xa6ad1b=this['editor']['config']['get']('collaboration.channelId'),_0x31eddc=await _0x11eb17['getRevision']({'channelId':_0xa6ad1b,'revisionId':_0x34ebc2['id']});_0x34ebc2['diffData']=_0x31eddc['diffData'];}['getRevisionDocumentData'](_0x135bee){const _0x5292e8={};for(const _0x3488e9 in _0x135bee['diffData']){if(_0x135bee['diffData'][_0x3488e9]['attachChange']&&!_0x135bee['diffData'][_0x3488e9]['attachChange']['isAttached'])continue;const _0x13c361=this['_removeRevisionMarkers'](JSON['parse'](_0x135bee['diffData'][_0x3488e9]['insertions'])),_0x487f03=this['editor']['editing']['view']['document'],_0x1d2672=new _0x328fdf(_0x487f03,_0x13c361['map'](_0x35ad05=>this['_getViewFromDiffObj'](_0x35ad05,!0x1)));this['editor']['data']['processor']['useFillerType']('marked'),_0x5292e8[_0x3488e9]=this['editor']['data']['processor']['toData'](_0x1d2672),this['editor']['data']['processor']['useFillerType']('default');}return _0x5292e8;}['getRevisionRootsAttributes'](_0x216d16){const _0x2ed048={};for(const _0x7289d8 in _0x216d16['diffData'])_0x216d16['diffData'][_0x7289d8]['attachChange']&&!_0x216d16['diffData'][_0x7289d8]['attachChange']['isAttached']||(_0x2ed048[_0x7289d8]=_0x216d16['diffData'][_0x7289d8]['attributesAfter']||{});return _0x2ed048;}['getRevisionRootsModelElements'](_0x363934){const _0x126df6={};for(const _0x117632 in _0x363934['diffData']){if(_0x363934['diffData'][_0x117632]['attachChange']&&!_0x363934['diffData'][_0x117632]['attachChange']['isAttached'])continue;const _0x4b21f2=_0x363934['diffData'][_0x117632]['rootElementName'];_0x4b21f2&&(_0x126df6[_0x117632]=_0x4b21f2);}return _0x126df6;}['_getTypeCharForViewElement'](_0x1a7ea0){return this['_viewClassToTypeChar']['get'](_0x1a7ea0['constructor']);}['_getViewFromDiffObj'](_0x5d67f9,_0x5966d1){const _0x43c232=this['editor']['editing']['view']['document'];if('string'==typeof _0x5d67f9)return new _0x344231(_0x43c232,_0x5d67f9);{let _0x2fa37d,_0x2d3e33;_0x2d3e33='u'==_0x5d67f9['type']||'r'==_0x5d67f9['type']?[]:_0x5d67f9['children']['map'](_0xd25310=>this['_getViewFromDiffObj'](_0xd25310,_0x5966d1));const _0x1fc5cf=this['_typeCharToViewClass']['get'](_0x5d67f9['type'])||_0x33b065,_0x5d8815=this['editor']['data']['htmlProcessor']['domConverter'];if(_0x2fa37d=new _0x1fc5cf(_0x43c232,_0x5d67f9['name'],_0x5d67f9['attributes'],_0x2d3e33),'u'==_0x5d67f9['type']&&_0x5d67f9['children'][0x0]){const _0xea68ef=_0x5d67f9['children'][0x0];if(_0x2fa37d['render']=function(_0x4bc49c){const _0x1d4a39=_0x4bc49c['createElement']('div');return _0x1d4a39['innerHTML']=_0xea68ef,_0x1d4a39['childNodes'][0x0];},_0x5966d1){const _0x3949f2=new _0x328fdf(_0x43c232);_0x3949f2['_appendChild'](_0x2fa37d);const _0x3e5df7=Array['from'](_0x5d8815['viewChildrenToDom'](_0x3949f2,{'bind':!0x1})),_0x3be314=_0x5d8815['domDocument']['createElement']('div');_0x3be314['append'](..._0x3e5df7),_0x2fa37d=Array['from'](_0x5d8815['domChildrenToView'](_0x3be314))[0x0];}}else{if('r'==_0x5d67f9['type']&&_0x5d67f9['children'][0x0]){const _0x17ae99=_0x5d67f9['children'][0x0];if(_0x2fa37d['render']=function(_0x20b14d){_0x20b14d['innerHTML']=_0x17ae99;},_0x5966d1){const _0x1a9008=new _0x328fdf(_0x43c232);_0x1a9008['_appendChild'](_0x2fa37d);const _0x560cfa=Array['from'](_0x5d8815['viewChildrenToDom'](_0x1a9008,{'bind':!0x1})),_0x18b420=_0x5d8815['domDocument']['createElement']('div');_0x18b420['append'](..._0x560cfa);const _0x5834b9=Array['from'](_0x5d8815['domChildrenToView'](_0x18b420));_0x5834b9['length']>0x1?_0x2fa37d['_appendChild'](_0x5834b9):_0x2fa37d=_0x5834b9[0x0];}}}if(_0x5d67f9['customProperties']){for(const [_0x2dd08f,_0x394bc8]of _0x5d67f9['customProperties'])_0x2fa37d['_setCustomProperty'](_0x2dd08f,_0x394bc8);}const _0x91f2ec=void 0x0===_0x5d67f9['fillerOffset']?null:_0x5d67f9['fillerOffset'];return null!==_0x91f2ec&&(_0x2fa37d['getFillerOffset']=()=>_0x91f2ec),_0x2fa37d;}}['_makeModelFromViewString'](_0x2d4560,_0x49d52c){const _0xdd338f=JSON['parse'](_0x2d4560),_0x38bc8a=this['editor']['editing']['view']['document'],_0x238b31=new _0x328fdf(_0x38bc8a,_0xdd338f['map'](_0x1cb646=>this['_getViewFromDiffObj'](_0x1cb646,!0x0))),_0x24f9ec=this['editor']['data']['toModel'](_0x238b31,_0x49d52c);return _0x24f9ec['name']=_0x49d52c,_0x24f9ec;}['_removeRevisionMarkers'](_0x4438e1){return(_0x4438e1=_0x4438e1['filter'](_0x32e01e=>!_0x32e01e['name']||'revision-start'!==_0x32e01e['name']&&'revision-end'!==_0x32e01e['name']))['forEach'](_0x505326=>{'string'!=typeof _0x505326&&(_0x505326['children']=this['_removeRevisionMarkers'](_0x505326['children']),_0x505326['attributes']=_0x505326['attributes']['filter'](_0x1f2d7d=>!_0x1f2d7d[0x0]['startsWith']('data-revision-')));}),_0x4438e1;}}function ft(_0x3f2cd5,_0x2d69a6,_0x154b5c){const t=_0x3f2cd5['t'];switch(_0x2d69a6){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'},_0x154b5c);case'X_OF_Y_CHANGES':return t({'string':'%0\x20of\x20%1','id':'X_OF_Y_CHANGES'},_0x154b5c);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 RevisionTracker extends _0x1098b4{['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[_0x1b1234,RevisionsRepository,RevisionHistoryUtils,_0x475171];}constructor(_0x776425){super(_0x776425),this['repository']=this['editor']['plugins']['get']('RevisionsRepository'),this['_utils']=this['editor']['plugins']['get']('RevisionHistoryUtils'),this['_revisionDataBuilder']=new RevisionDataBuilder(this['editor']),this['_initialRevisionId']=this['editor']['config']['get']('collaboration.channelId')||'initial',this['_bufferedUpdates']=new Map(),this['_loadedStateData']=null;const _0xa447b4=_0x13fdf1();this['_source']={'history':this['editor']['model']['document']['history'],'getLatestVersion':()=>Promise['resolve'](this['editor']['model']['document']['version']),'getCurrentRevisionId':()=>_0xa447b4},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 _0x54166c=this['repository']['getRevision'](0x0),_0x33f480=_0x54166c&&null===_0x54166c['creator']?_0x54166c:null;if(this['_continueCurrentRevision']=!!_0x33f480&&this['editor']['config']['get']('revisionHistory.resumeUnsavedRevision'),this['editor']['plugins']['has']('RealTimeCollaborationClient')){const _0xd0344b=this['_source']['getCurrentRevisionId'](),_0x507538=this['repository']['getRevision'](_0xd0344b);if(_0x507538)this['_startingVersion']=_0x507538['fromVersion'],this['_continueCurrentRevision']=!0x1;else{const _0xe09c44=this['_source']['history']['_operations']['find'](_0x18fc02=>!_0x18fc02['_isInit']),_0x4bc832=_0xe09c44?_0xe09c44['baseVersion']:this['_source']['history']['version'];_0x54166c?(_0x54166c['toVersion']<_0x4bc832&&_0x54166c['_update']({'toVersion':_0x4bc832}),this['_continueCurrentRevision']?(this['_source']['getCurrentRevisionId']=()=>_0x33f480['id'],this['_startingVersion']=_0x33f480['fromVersion']):(this['_startingVersion']=_0x54166c['toVersion'],this['_continueCurrentRevision']=!0x1)):(this['_startingVersion']=_0x4bc832,this['_continueCurrentRevision']=!0x1);}}else _0x33f480&&(this['editor']['model']['document']['history']['version']=Math['max'](_0x33f480['toVersion'],this['editor']['model']['document']['history']['version']),_0x33f480['fromVersion']===_0x33f480['toVersion']?(0x0!==_0x33f480['fromVersion']&&(this['_source']['getCurrentRevisionId']=()=>_0x33f480['id']),this['_continueCurrentRevision']=!0x1):this['_continueCurrentRevision']&&(this['_source']['getCurrentRevisionId']=()=>_0x33f480['id'],this['_startingVersion']=_0x33f480['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',_0x52502f=>!_0x52502f),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x25bdc0=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x55e65e;for(const _0x4e1b6b in _0x25bdc0){const _0x19e55c=_0x4e1b6b,_0x5d7a10=_0x25bdc0[_0x19e55c];if('revisionHistoryLicenseKeyValid'==_0x5d7a10||'revisionHistoryLicenseKeyInvalid'==_0x5d7a10||'revisionHistoryLicenseKeyExpired'==_0x5d7a10||'revisionHistoryLicenseKeyDomainLimit'==_0x5d7a10||'revisionHistoryLicenseKeyNotAllowed'==_0x5d7a10||'revisionHistoryLicenseKeyEvaluationLimit'==_0x5d7a10||'revisionHistoryLicenseKeyUsageLimit'==_0x5d7a10){delete _0x25bdc0[_0x19e55c],_0x55e65e=_0x5d7a10,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'revisionHistoryLicenseKeyInvalid'==_0x55e65e&&_0x25bdc0['_showLicenseError']('invalid'),'revisionHistoryLicenseKeyExpired'==_0x55e65e&&_0x25bdc0['_showLicenseError']('expired'),'revisionHistoryLicenseKeyDomainLimit'==_0x55e65e&&_0x25bdc0['_showLicenseError']('domainLimit'),'revisionHistoryLicenseKeyNotAllowed'==_0x55e65e&&_0x25bdc0['_showLicenseError']('featureNotAllowed','RevisionHistory'),'revisionHistoryLicenseKeyEvaluationLimit'==_0x55e65e&&_0x25bdc0['_showLicenseError']('evaluationLimit'),'revisionHistoryLicenseKeyUsageLimit'==_0x55e65e&&_0x25bdc0['_showLicenseError']('usageLimit');},0x3e8);}async['afterInit'](){if(this['repository']['length']>0x0){const _0x249119=this['repository']['getRevision'](0x0),_0x3c90df=await this['getRevisionDocumentData'](_0x249119),_0x2447ab=await this['getRevisionRootsAttributes'](_0x249119),_0x2ed872=this['_utils']['getRevisionRootsModelElements'](_0x249119);this['_replaceEditorDataWithRevisionData'](_0x3c90df,_0x2447ab,_0x2ed872);}}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['setSource'](_0x26c388){this['_source']=_0x26c388;}async['update'](){const _0x57a3f1=await this['_source']['getLatestVersion']();if(_0x57a3f1>this['currentRevision']['toVersion']){await this['_loadState']();const _0x181037=this['buildRevisionData']({'revision':this['currentRevision'],'to':_0x57a3f1});_0x181037['authors']=_0x181037['authorsIds']['map'](_0x1bf6aa=>this['editor']['plugins']['get']('Users')['getUser'](_0x1bf6aa)),this['currentRevision']['_update'](_0x181037);}}async['saveRevision'](_0x196fbb={},_0x3e1a97=null){const _0x42381d=[];await this['_loadState'](),this['_continueCurrentRevision']=!0x1,_0x3e1a97>this['currentRevision']['toVersion']&&(_0x3e1a97=null),null===_0x3e1a97&&(_0x3e1a97=await this['_source']['getLatestVersion']());const _0x55fa4a=this['_getFromVersion'](_0x3e1a97),_0x560ce1=this['buildRevisionData']({'from':_0x55fa4a,'to':_0x3e1a97});if(this['currentRevision']['toVersion']<_0x3e1a97){const _0x186dc5=this['buildRevisionData']({'revision':this['currentRevision'],'from':_0x3e1a97,'to':_0x3e1a97});_0x186dc5['authors']=[],_0x186dc5['authorsIds']=[],_0x186dc5['id']=this['currentRevision']['id'],this['currentRevision']['_update'](_0x186dc5,!0x0),delete _0x186dc5['authors'],_0x42381d['push'](_0x186dc5);}_0x196fbb['creatorId']=this['editor']['plugins']['get']('Users')['me']['id'],_0x196fbb['name']=_0x196fbb['name']||null,_0x196fbb['id']=_0x196fbb['id']||_0x13fdf1(),_0x196fbb={..._0x196fbb,..._0x560ce1};const _0x3bfc1e=this['addRevisionData'](_0x196fbb);_0x42381d['push'](_0x196fbb);const _0x57e187=this['repository']['getIndex'](_0x3bfc1e);if(0x0!==_0x57e187){const _0x49f5e3=this['repository']['getRevision'](_0x57e187-0x1);if(_0x49f5e3['fromVersion']!==_0x3e1a97){const _0x11f270=this['_revisionDataBuilder']['getData'](_0x3e1a97,_0x49f5e3['toVersion']),_0x482c30={'id':_0x49f5e3['id'],'diffData':_0x11f270['diffData'],'authorsIds':_0x11f270['authorsIds'],'authors':_0x11f270['authorsIds']['map'](_0x1f1f29=>this['editor']['plugins']['get']('Users')['getUser'](_0x1f1f29)),'fromVersion':_0x3e1a97};_0x49f5e3===this['currentRevision']&&(_0x482c30['createdAt']=new Date(_0x196fbb['createdAt']['getTime']()+0xa)),_0x49f5e3['_update'](_0x482c30,!0x0),delete _0x482c30['authors'],_0x42381d['push'](_0x482c30);}}if(this['adapter']){for(const _0x14bec6 of _0x42381d)this['_bufferUpdate'](_0x14bec6['id'],_0x14bec6,!0x0);this['sendBufferedUpdates']();}return _0x3bfc1e;}['addRevisionData'](_0x8d3b5e){const _0x218d93=this['repository']['createRevision'](_0x8d3b5e);return this['adapter']&&_0x218d93['on']('_update',(_0x36a923,_0x394f95,_0x36655d)=>{_0x36655d||(this['_bufferUpdate'](_0x394f95['id'],_0x394f95,!0x0),this['sendBufferedUpdates']());}),this['repository']['addRevision'](_0x218d93,this['_findInsertionIndex'](_0x218d93)),_0x218d93;}async['getRevisionDocumentData'](_0x1d0a6f){return await this['_utils']['loadRevisionData'](_0x1d0a6f,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x1d0a6f);}async['getRevisionRootsAttributes'](_0x259ff3){return await this['_utils']['loadRevisionData'](_0x259ff3,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x259ff3);}['sendBufferedUpdates'](){if(0x0===this['_bufferedUpdates']['size'])return;if(this['_isPendingUpdate'])return;let _0x2c135c=Array['from'](this['_bufferedUpdates']['values']());this['_bufferedUpdates']['clear']();for(let _0x26a8ab=0x0;_0x26a8ab<_0x2c135c['length'];_0x26a8ab++){const _0x5a7bc2=_0x2c135c[_0x26a8ab];let _0x284b64=!0x1;for(const _0x442614 of Object['keys'](_0x5a7bc2))void 0x0===_0x5a7bc2[_0x442614]?delete _0x5a7bc2[_0x442614]:'id'!==_0x442614&&(_0x284b64=!0x0);_0x284b64||(_0x2c135c[_0x26a8ab]=null);}if(_0x2c135c=_0x2c135c['filter'](_0x4d753a=>null!==_0x4d753a),!_0x2c135c['length'])return;for(let _0x2ba421=0x0;_0x2ba421<_0x2c135c['length'];_0x2ba421++){const _0x4fe3c0=_0x2c135c[_0x2ba421];void 0x0!==_0x4fe3c0['fromVersion']&&void 0x0===_0x4fe3c0['toVersion']&&(_0x4fe3c0['toVersion']=this['repository']['getRevision'](_0x4fe3c0['id'])['toVersion']),void 0x0!==_0x4fe3c0['toVersion']&&void 0x0===_0x4fe3c0['fromVersion']&&(_0x4fe3c0['fromVersion']=this['repository']['getRevision'](_0x4fe3c0['id'])['fromVersion']);}const _0x455569=this['editor']['config']['get']('collaboration.channelId');this['_isPendingUpdate']=!0x0,this['_addPendingAction'](),this['adapter']['updateRevisions'](_0x2c135c,_0x455569)['finally'](()=>{this['_isPendingUpdate']=!0x1;})['then'](_0x344b49=>{if(_0x344b49){for(const _0x97cd32 of _0x344b49)this['setRevisionData']({'id':_0x97cd32['id'],'createdAt':_0x97cd32['createdAt']});}this['_removePendingAction'](),this['sendBufferedUpdates']();});}['buildRevisionData']({revision:_0x214805=null,from:_0x31eb70=null,to:_0x5cd806=null}){_0x31eb70=null!==_0x31eb70?_0x31eb70:_0x214805['fromVersion'],_0x5cd806=null!==_0x5cd806?_0x5cd806:_0x214805['toVersion'];const _0x277c9d=this['_revisionDataBuilder']['getData'](_0x31eb70,_0x5cd806),_0x5a73fd={'diffData':_0x277c9d['diffData'],'authorsIds':_0x277c9d['authorsIds'],'fromVersion':_0x31eb70,'toVersion':_0x5cd806};if(!_0x214805||_0x5cd806!==_0x214805['toVersion']){const _0x102160=_0x5cd806-0x1,_0x37f3fc=this['_source']['history']['getOperation'](_0x102160);_0x5a73fd['createdAt']=_0x37f3fc&&_0x37f3fc['createdAt']||new Date();}if(this['_loadedStateData']&&_0x31eb70===this['_loadedStateData']['fromVersion']){for(const _0x537389 of this['_loadedStateData']['authors'])_0x5a73fd['authorsIds']['includes'](_0x537389['id'])||_0x5a73fd['authorsIds']['push'](_0x537389['id']);}return _0x5a73fd;}['_bufferUpdate'](_0x4dcc49,_0x2b97d5,_0x260cbc){if(this['_bufferedUpdates']['has'](_0x4dcc49)){const _0x4c2fba=this['_bufferedUpdates']['get'](_0x4dcc49);_0x2b97d5=_0x260cbc?{..._0x4c2fba,..._0x2b97d5}:{..._0x2b97d5,..._0x4c2fba};}this['_bufferedUpdates']['set'](_0x4dcc49,_0x2b97d5);}['setRevisionData'](_0x483ca6){const _0x4cfeb5=this['repository']['getRevision'](_0x483ca6['id']);if(_0x483ca6['createdAt']&&(_0x483ca6['createdAt']=new Date(_0x483ca6['createdAt'])),_0x483ca6['authorsIds']){const _0x2aca71=this['editor']['plugins']['get']('Users');_0x483ca6['authors']=_0x483ca6['authorsIds']['map'](_0x1db3bc=>_0x2aca71['getUser'](_0x1db3bc));}_0x4cfeb5['_update'](_0x483ca6,!0x0);}['_createInitialRevision'](_0x26b8c6){const _0x29782a=this['repository']['getRevision'](this['repository']['length']-0x1);if(_0x29782a)this['_initialRevisionId']=_0x29782a['id'];else{const _0x53b736=!this['editor']['model']['document']['roots']['find'](_0x47ae89=>this['editor']['model']['hasContent'](_0x47ae89)),_0x56479d=this['editor']['plugins']['get']('Users')['me']['id'],_0x2e13a0=ft(this['editor']['locale'],_0x53b736?'Empty\x20document':'Initial\x20revision');this['_makeRevision']({'from':_0x26b8c6,'to':_0x26b8c6,'id':this['_initialRevisionId'],'name':_0x2e13a0,'creatorId':_0x56479d});}}['_createCurrentRevision'](_0x2cdf4e){const _0xfed8d0=this['_source']['getCurrentRevisionId']();this['currentRevision']=this['repository']['getRevision'](_0xfed8d0),this['currentRevision']||(this['currentRevision']=this['_makeRevision']({'from':_0x2cdf4e,'to':_0x2cdf4e,'id':_0xfed8d0,'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'](_0x364c00,_0x5caa34,_0x31e6e2){const _0xd00280={},_0x5050c5={},_0x7c24ae={},_0x43d069=this['editor']['config']['get']('roots')||{};for(const [_0x2ca21b,_0x1ced29]of Object['entries'](_0x43d069))_0x1ced29['lazyLoad']||(_0xd00280[_0x2ca21b]=_0x1ced29['initialData']??'',_0x5050c5[_0x2ca21b]=_0x1ced29['modelAttributes']||{},_0x1ced29['modelElement']&&(_0x7c24ae[_0x2ca21b]=_0x1ced29['modelElement']));for(const _0x314ff3 of this['editor']['model']['document']['getRootNames']())_0xd00280[_0x314ff3]??='',_0x5050c5[_0x314ff3]??={};let _0x3acc76=!0x1;const _0x441c16=Object['keys'](_0xd00280),_0x31dcf1=Object['keys'](_0x364c00);for(const _0x35bf05 of _0x441c16){if(_0xd00280[_0x35bf05]!==_0x364c00[_0x35bf05]&&''!==_0xd00280[_0x35bf05]['trim']()){_0x3acc76=!0x0;break;}if(!_0x882995(_0x5050c5[_0x35bf05],_0x5caa34[_0x35bf05])&&Object['keys'](_0x5050c5[_0x35bf05])['length']>0x0){_0x3acc76=!0x0;break;}const _0x382282=_0x7c24ae[_0x35bf05],_0x3c50bc=_0x31e6e2[_0x35bf05];if(_0x382282&&_0x3c50bc&&_0x382282!==_0x3c50bc){_0x3acc76=!0x0;break;}}_0x3acc76||(_0x3acc76=_0x31dcf1['some'](_0x21ef22=>!this['editor']['model']['document']['getRoot'](_0x21ef22))),_0x3acc76&&_0x477743('editor-initial-data-replaced-with-revision-data',{'editorData':_0xd00280,'editorRootsAttributes':_0x5050c5,'editorRootsModelElements':_0x7c24ae,'revisionData':_0x364c00,'revisionRootsAttributes':_0x5caa34,'revisionRootsModelElements':_0x31e6e2});for(const [_0x12bb42,_0x1b4c7c]of Object['entries'](_0x364c00))this['editor']['config']['set']('roots.'+_0x12bb42+'.initialData',_0x1b4c7c);for(const [_0x306163,_0x5164e0]of Object['entries'](_0x5caa34))this['editor']['config']['set']('roots.'+_0x306163+'.modelAttributes',_0x5164e0);const _0x11c998=this['editor']['model']['document'];for(const [_0x1cc225,_0x107de9]of Object['entries'](_0x31e6e2)){this['editor']['config']['set']('roots.'+_0x1cc225+'.modelElement',_0x107de9);const _0xe72d57=_0x11c998['getRoot'](_0x1cc225);_0xe72d57&&_0xe72d57['name']!==_0x107de9&&(_0x11c998['roots']['remove'](_0x1cc225),_0x11c998['createRoot'](_0x107de9,_0x1cc225));}}['_addPendingAction'](){if(!this['_pendingAction']){const _0x38e1b8=this['editor']['plugins']['get']('PendingActions');this['_pendingAction']=_0x38e1b8['add'](ft(this['editor']['locale'],'PENDING_ACTION_REVISION_HISTORY'));}}['_removePendingAction'](){this['_pendingAction']&&(this['editor']['plugins']['get']('PendingActions')['remove'](this['_pendingAction']),this['_pendingAction']=null);}['_findInsertionIndex'](_0x13f8a7){const _0x5a92e1=this['repository']['getRevisions']();_0x5a92e1['reverse']();let _0x2419e9=0x0;for(;_0x2419e9<_0x5a92e1['length'];){const _0x285734=_0x5a92e1[_0x2419e9];if(_0x285734===this['currentRevision']){_0x2419e9++;continue;}if(_0x285734['id']===this['_initialRevisionId'])break;const _0xd84d93=_0x13f8a7['toVersion']-_0x285734['toVersion']||_0x13f8a7['fromVersion']-_0x285734['fromVersion'];if(_0xd84d93>0x0)break;if(_0xd84d93<0x0)_0x2419e9++;else{if(!_0x13f8a7['creator']&&_0x285734['creator'])break;if(_0x285734['creator']||!_0x13f8a7['creator']){if(_0x13f8a7['createdAt']>_0x285734['createdAt'])break;_0x2419e9++;}else _0x2419e9++;}}return _0x2419e9;}['_getFromVersion'](_0x2a62e6){const _0x370ddd=this['repository']['getRevisions']();_0x370ddd['reverse'](),_0x370ddd['shift']();const _0x18eada=_0x370ddd['find'](_0x1be568=>_0x1be568['toVersion']<=_0x2a62e6)['toVersion'];return _0x18eada<this['_startingVersion']?this['_startingVersion']:_0x18eada;}['_makeRevision']({name:_0x382a5b,from:_0x123c99,to:_0x288312,creatorId:_0x135d63,id:_0x599273}){const _0xe4075d=this['buildRevisionData']({'from':_0x123c99,'to':_0x288312});_0xe4075d['name']=_0x382a5b,_0xe4075d['creatorId']=_0x135d63,_0xe4075d['id']=_0x599273;const _0x8cb06b=this['addRevisionData'](_0xe4075d);return this['adapter']&&this['_bufferUpdate'](_0xe4075d['id'],_0xe4075d,!0x0),_0x8cb06b;}['_setConversion'](){this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'});}}class RevisionDataBuilder{['editor'];['source'];['_savedMetaData'];['_lastFrom'];['_lastTo'];['_markers'];['_diffRoots'];['_diffRootsAttributes'];['_baseRoots'];['_baseRootsAttributes'];['_idsRoots'];['_baseIdsRoots'];['_touched'];['_touchedMarkers'];['_touchedRoots'];['_revisionId'];['_startingRevisionId'];constructor(_0x3ebbde){this['editor']=_0x3ebbde,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'](_0x1a9fc2){this['source']=_0x1a9fc2;const _0x408b98=new Map(),_0x33db96=new Map(),_0x4a2d8a=this['editor']['model']['document']['roots']['map'](_0x2a8b7c=>_0x2a8b7c['rootName']);for(const _0x3fe09f of _0x4a2d8a){const _0x1c3cc6=this['editor']['model']['document']['getRoot'](_0x3fe09f),_0x80c5d5=gt(_0x1c3cc6);_0x408b98['set'](_0x3fe09f,_0x80c5d5),_0x33db96['set'](_0x3fe09f,Object['fromEntries'](_0x1c3cc6['getAttributes']()));}const _0x1cd99f=Array['from'](this['editor']['model']['markers'])['map'](_0x56b69b=>[_0x56b69b['name'],_0x56b69b['getRange']()]),_0x259982=this['source']['version'];this['_saveMetaData'](_0x259982,_0x408b98,_0x1cd99f,_0x33db96),this['_startingRevisionId']=this['_revisionId'];const _0x2e93e4=new Map(),_0x3bd208=new Map();for(const _0xaa4f43 of _0x4a2d8a){const _0xa54e20=wt(_0xaa4f43,this['editor']['model']['document']['getRoot'](_0xaa4f43)['name']);_0x2e93e4['set'](_0xaa4f43,_0xa54e20),_0x3bd208['set'](_0xaa4f43,{});}this['_saveMetaData'](Number['NEGATIVE_INFINITY'],_0x2e93e4,[],_0x3bd208);}['getData'](_0x128248,_0x473115){if(this['_lastFrom']===_0x128248&&this['_lastTo']<=_0x473115)this['_savedMetaData']['size']>0x1&&this['_removeMetaData'](this['_lastTo']),this['_applyOperations'](this['_lastTo'],_0x473115,!0x0);else{if(!this['_savedMetaData']['has'](_0x128248)){const _0x209c96=this['_getPreviousFrom'](_0x128248);this['_calculateMetaData'](_0x209c96,_0x128248,!0x1);}this['_calculateMetaData'](_0x128248,_0x473115,!0x0);}return this['_lastFrom']=_0x128248,this['_lastTo']=_0x473115,this['_getState']();}['loadState'](_0x318fb2){if(!this['_savedMetaData']['has'](_0x318fb2['fromVersion'])){const _0x1bfd77=this['_getPreviousFrom'](_0x318fb2['fromVersion']);this['_calculateMetaData'](_0x1bfd77,_0x318fb2['fromVersion'],!0x1);}this['_calculateMetaData'](_0x318fb2['fromVersion'],_0x318fb2['toVersion'],!0x1);const _0x47af83=this['editor']['plugins']['get']('RevisionHistoryUtils');this['_reset'](),this['_lastFrom']=_0x318fb2['fromVersion'],this['_lastTo']=_0x318fb2['toVersion'];for(const _0x265613 in _0x318fb2['diffData']){const _0x476bd4=_0x318fb2['diffData'][_0x265613]['attachChange'],_0x3c2dd4=_0x5ba81d(_0x318fb2['diffData'][_0x265613]['attributesBefore'])||{},_0x11a2e2=_0x318fb2['diffData'][_0x265613],_0x4c525b=_0x47af83['_makeModelFromViewString'](_0x11a2e2['deletions'],_0x11a2e2['rootElementName']||'$root');_0x4c525b['rootName']=_0x265613,_0x4c525b['_isAttached']=!_0x476bd4||!_0x476bd4['isAttached'],_0x4c525b['isAttached']=()=>_0x4c525b['_isAttached'],this['_baseRoots']['set'](_0x265613,_0x4c525b),this['_baseRootsAttributes']['set'](_0x265613,_0x3c2dd4),_0x476bd4&&this['_touchedRoots']['set'](_0x265613,_0x476bd4);const _0x50a755=this['_makeIdsRoot'](_0x4c525b);this['_baseIdsRoots']['set'](_0x265613,_0x50a755);for(const [_0x144362,_0x1ce868]of _0x4c525b['markers']){if(!_0x144362['startsWith']('revision:'))continue;const _0x4920f4=_0x144362['split'](':')[0x2];for(const _0x2c3abc of _0x1ce868['getWalker']({'singleCharacters':!0x0})){const _0x2b00aa=this['_getVidAttributeName'](_0x2c3abc),_0x1e4014='elementEnd'==_0x2c3abc['type']?_0x2c3abc['previousPosition']['path']['slice'](0x0,-0x1):_0x2c3abc['previousPosition']['path'],_0x187e7c=_0x50a755['getNodeByPath'](_0x1e4014)['getAttribute'](_0x2b00aa);this['_touched']['set'](_0x187e7c,{'userId':_0x4920f4});}_0x4c525b['markers']['delete'](_0x144362);}}this['_startingRevisionId']=this['_revisionId'];const _0x11f06b=[...Array(this['_revisionId'])['keys']()]['slice'](0x1)['filter'](_0x4bab9a=>!this['_touched']['has'](_0x4bab9a));let _0x3f6c51=0x0;const _0x27b531=new Map();for(const _0x8df31 in _0x318fb2['diffData']){const _0x2eb715=_0x318fb2['diffData'][_0x8df31]['attachChange'],_0x4bc536=_0x5ba81d(_0x318fb2['diffData'][_0x8df31]['attributesAfter'])||{},_0x374ba7=_0x318fb2['diffData'][_0x8df31],_0x106412=_0x47af83['_makeModelFromViewString'](_0x374ba7['insertions'],_0x374ba7['rootElementName']||'$root');_0x106412['rootName']=_0x8df31,_0x106412['_isAttached']=!_0x2eb715||_0x2eb715['isAttached'],_0x106412['isAttached']=()=>_0x106412['_isAttached'],this['_diffRoots']['set'](_0x8df31,_0x106412),this['_diffRootsAttributes']['set'](_0x8df31,_0x4bc536);const _0x462efa=this['_makeIdsRoot'](_0x106412,Number['NEGATIVE_INFINITY']);this['_idsRoots']['set'](_0x8df31,_0x462efa),_0x27b531['set'](_0x8df31,_0x106412['isAttached']()?_0x4bc536:{});for(const [_0x66132a,_0x270f66]of _0x106412['markers']){if(!_0x66132a['startsWith']('revision:'))continue;const _0x221617=_0x66132a['split'](':')[0x2];for(const _0x22dbbd of _0x270f66['getWalker']({'singleCharacters':!0x0})){const _0x3bca9a=this['_getVidAttributeName'](_0x22dbbd),_0x2c4544=this['_revisionId']++,_0x5e0655='elementEnd'==_0x22dbbd['type']?_0x22dbbd['previousPosition']['path']['slice'](0x0,-0x1):_0x22dbbd['previousPosition']['path'];_0x462efa['getNodeByPath'](_0x5e0655)['_setAttribute'](_0x3bca9a,_0x2c4544),this['_touched']['set'](_0x2c4544,{'userId':_0x221617});}_0x106412['markers']['delete'](_0x66132a);}for(const _0x1e32f2 of this['editor']['model']['createRangeIn'](_0x106412)['getWalker']({'singleCharacters':!0x0})){const _0xe6cad1=this['_getVidAttributeName'](_0x1e32f2),_0x979ce4='elementEnd'==_0x1e32f2['type']?_0x1e32f2['previousPosition']['path']['slice'](0x0,-0x1):_0x1e32f2['previousPosition']['path'],_0x233eca=_0x462efa['getNodeByPath'](_0x979ce4);_0x233eca['getAttribute'](_0xe6cad1)>0x0||_0x233eca['_setAttribute'](_0xe6cad1,_0x11f06b[_0x3f6c51++]);}for(const [_0x58288d,_0x11dd69]of _0x106412['markers'])_0x58288d['startsWith']('revision:')||this['_markers']['set'](_0x58288d,_0x11dd69);}const {roots:_0x2ebd97}=this['_savedMetaData']['get'](_0x318fb2['fromVersion']),{roots:_0x227190}=this['_savedMetaData']['get'](_0x318fb2['toVersion']),_0x4e26af=gt(_0x2ebd97['get']('$graveyard'));this['_baseRoots']['set']('$graveyard',_0x4e26af),this['_baseIdsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x4e26af,Number['NEGATIVE_INFINITY']));const _0x27378f=gt(_0x227190['get']('$graveyard'));this['_diffRoots']['set']('$graveyard',_0x27378f),this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x27378f));const _0x2bfcc1=Array['from'](this['_diffRoots'])['map'](([_0x347497,_0x3cdeda])=>[_0x347497,gt(_0x3cdeda)]);this['_saveMetaData'](this['_lastTo'],_0x2bfcc1,this['_markers'],_0x27b531);}['reInit'](){this['_reset'](),this['_lastFrom']=-0x1,this['_lastTo']=-0x1,this['_savedMetaData']['clear'](),this['init'](this['source']);}['_saveMetaData'](_0x1f7249,_0x51a9c7,_0x51d59c,_0x112edd){const _0x11684b=new Map(_0x51a9c7),_0x301185=new Map(_0x5ba81d(_0x112edd)),_0x590527=new Map();for(const [_0x2aa901,_0x2c2406]of _0x51d59c)_0x590527['set'](_0x2aa901,{'start':_0x2c2406['start']['clone'](),'end':_0x2c2406['end']['clone'](),'rootName':_0x2c2406['root']['rootName']});this['_savedMetaData']['set'](_0x1f7249,{'roots':_0x11684b,'markers':_0x590527,'rootsAttributes':_0x301185});}['_removeMetaData'](_0x3c2ed3){this['_savedMetaData']['delete'](_0x3c2ed3);}['_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'](_0x535894,_0x20cbee=null){let _0x4ce034=null;_0x535894['is']('documentFragment')||(_0x4ce034=new _0x309f06(_0x535894['name'],{'vid_start':null===_0x20cbee?this['_revisionId']++:_0x20cbee++}));const _0x57194b=[];for(const _0x137395 of _0x535894['getChildren']())if(_0x137395['is']('element')){_0x57194b['push'](this['_makeIdsRoot'](_0x137395,_0x20cbee));const _0x5487f2=_0x57194b[_0x57194b['length']-0x1];null!==_0x20cbee&&(_0x20cbee=_0x5487f2['is']('element','$text')?_0x5487f2['getAttribute']('vid')+0x1:_0x5487f2['getAttribute']('vid_end')+0x1);}else{for(let _0x10f634=0x0;_0x10f634<_0x137395['offsetSize'];_0x10f634++)_0x57194b['push'](new _0x309f06('$text',{'vid':null===_0x20cbee?this['_revisionId']++:_0x20cbee++}));}if(_0x535894['is']('documentFragment')){const _0x445bf6=wt(_0x535894['rootName'],_0x535894['name']);return _0x445bf6['_insertChild'](0x0,_0x57194b),_0x445bf6;}return _0x4ce034['_setAttribute']('vid_end',null===_0x20cbee?this['_revisionId']++:_0x20cbee++),_0x4ce034['_insertChild'](0x0,_0x57194b),_0x4ce034;}['_calculateMetaData'](_0x37d5e2,_0xc7d0a3,_0x415a8d){this['_reset']();const {roots:_0x29911d,markers:_0x426366,rootsAttributes:_0x2045fc}=this['_savedMetaData']['get'](_0x37d5e2);this['_baseRoots']=new Map(_0x29911d),this['_baseRootsAttributes']=new Map(_0x5ba81d(_0x2045fc));for(const [_0x370ba5,_0x5bdb20]of this['_baseRoots'])if('$graveyard'!==_0x370ba5&&(this['_diffRoots']['set'](_0x370ba5,gt(_0x5bdb20)),this['_diffRootsAttributes']=new Map(_0x5ba81d(_0x2045fc)),_0x415a8d)){const _0x5a6bad=this['_revisionId'];this['_idsRoots']['set'](_0x370ba5,this['_makeIdsRoot'](_0x5bdb20)),this['_baseIdsRoots']['set'](_0x370ba5,this['_makeIdsRoot'](_0x5bdb20,_0x5a6bad));}this['_startingRevisionId']=this['_revisionId'],this['_diffRoots']['set']('$graveyard',gt(this['_baseRoots']['get']('$graveyard'))),_0x415a8d&&this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](this['_baseRoots']['get']('$graveyard')));for(const [_0x3ada23,_0x54e3e7]of _0x426366){const _0x25416a=this['_baseRoots']['get'](_0x54e3e7['rootName']),_0x584398=this['_diffRoots']['get'](_0x54e3e7['rootName']),_0x17ad95=new _0x210c0a(this['_fixPosition'](_0x54e3e7['start'],_0x25416a),this['_fixPosition'](_0x54e3e7['end'],_0x25416a)),_0x2f9331=this['_fixRange'](_0x17ad95,_0x584398);_0x25416a['markers']['set'](_0x3ada23,_0x17ad95),this['_markers']['set'](_0x3ada23,_0x2f9331);}this['_applyOperations'](_0x37d5e2,_0xc7d0a3,_0x415a8d);}['_applyOperations'](_0x4289d6,_0x11518b,_0x568513){for(const _0x62990e of this['source']['getOperations'](_0x4289d6,_0x11518b))this['_handleOperation'](_0x62990e,_0x568513);for(const _0x3c1489 of this['_diffRoots']['values']())_0x3c1489['markers']['clear']();for(const [_0x11570b,_0xe81185]of this['_markers']){this['_diffRoots']['get'](_0xe81185['root']['rootName'])['markers']['set'](_0x11570b,_0xe81185['clone']());}const _0x52cc1f=new Map(),_0x45e16a=new Map();for(const [_0x1f7202,_0x1e72b2]of this['_diffRoots'])_0x52cc1f['set'](_0x1f7202,gt(_0x1e72b2)),_0x45e16a['set'](_0x1f7202,this['_diffRootsAttributes']['get'](_0x1f7202));this['_saveMetaData'](_0x11518b,_0x52cc1f,this['_markers'],_0x45e16a);}['_getPreviousFrom'](_0x4c1c91){const _0x43bdfb=Array['from'](this['_savedMetaData']['keys']());_0x43bdfb['sort']((_0x4b58fe,_0x1afcba)=>_0x4b58fe-_0x1afcba),_0x43bdfb['reverse']();for(const _0x4f86bc of _0x43bdfb)if(_0x4f86bc<_0x4c1c91)return _0x4f86bc;return Number['NEGATIVE_INFINITY'];}['_copyMarkers'](_0x2a30ea,_0x41cd00){const _0x578f7f=Array['from'](_0x41cd00['markers'])['map'](([_0xd73f3f,_0x375e7b])=>[_0xd73f3f,this['_fixRange'](_0x375e7b,_0x2a30ea)]);_0x2a30ea['markers']=new Map(_0x578f7f);}['_transformMarkers'](_0x34bee8){for(const _0x3fb64a of this['_markers']['values']()){const _0x493a07=_0x3fb64a['getTransformedByOperation'](_0x34bee8),_0x2bfc1d=_0x210c0a['_createFromRanges'](_0x493a07);_0x3fb64a['start']=_0x2bfc1d['start'],_0x3fb64a['end']=_0x2bfc1d['end'];}}['_handleOperation'](_0x4c8687,_0x41322a){if('addRoot'!=_0x4c8687['type']&&'detachRoot'!=_0x4c8687['type']){if('insert'==_0x4c8687['type']){const _0x113ff0=_0x4c8687['position']['root'],_0x32a68b=_0x113ff0['rootName'],_0x16ca52=_0x113ff0['name'];this['_diffRoots']['has'](_0x32a68b)||(this['_diffRoots']['set'](_0x32a68b,wt(_0x32a68b,_0x16ca52,!0x0)),this['_diffRootsAttributes']['set'](_0x32a68b,{}),_0x41322a&&this['_idsRoots']['set'](_0x32a68b,wt(_0x32a68b,_0x16ca52,!0x0)));}else{if('addRootAttribute'==_0x4c8687['type']||'removeRootAttribute'==_0x4c8687['type']||'changeRootAttribute'==_0x4c8687['type'])return void this['_handleRootAttributeOperation'](_0x4c8687);'marker'==_0x4c8687['type']&&this['_handleMarkerOperation'](_0x4c8687);}if('marker'!==_0x4c8687['type']){const _0x1bb2dd=this['_cloneOperation'](_0x4c8687,this['_diffRoots']);_0x1bb2dd['_execute'](),this['_transformMarkers'](_0x1bb2dd);}if(_0x41322a)switch(_0x4c8687['type']){case'insert':this['_handleInsertOperation'](_0x4c8687);break;case'move':case'remove':case'reinsert':this['_handleMoveOperation'](_0x4c8687);break;case'merge':this['_handleMergeOperation'](_0x4c8687);break;case'split':this['_handleSplitOperation'](_0x4c8687);}}else this['_handleRootOperation'](_0x4c8687,_0x41322a);}['_cloneOperation'](_0x146de7,_0x399bef){const _0x58b94c=_0x146de7['clone']();return _0x58b94c['_authorId']=_0x146de7['_authorId'],this['_fixOperation'](_0x58b94c,_0x399bef),_0x58b94c;}['_getBaseVids'](_0x15820c){return _0x15820c['map'](_0x35348e=>{const _0x34fcd9=this['_getVidAttributeName'](_0x35348e);return Number(_0x35348e['item']['getAttribute'](_0x34fcd9));});}['_generateTape'](_0x6556fe,_0x1c7b15){if(_0x6556fe['is']('element','$text'))_0x1c7b15['push']({'item':_0x6556fe,'type':'text'});else{_0x6556fe['is']('element')&&_0x1c7b15['push']({'item':_0x6556fe,'type':'elementStart'});for(const _0x23e2d7 of _0x6556fe['getChildren']())this['_generateTape'](_0x23e2d7,_0x1c7b15);_0x6556fe['is']('element')&&_0x1c7b15['push']({'item':_0x6556fe,'type':'elementEnd'});}return _0x1c7b15;}['_getState'](){const _0x4b1b6c=new Map(this['_touched']),_0x127eb2=new Map(_0x4b1b6c),_0x22f62a=new Map(),_0x480c1e={'insertions':{},'deletions':{}},_0x527f53={'insertions':{},'deletions':{}},_0x40b1a5=new Map(),_0x461fac=new Set([...this['_baseRoots']['keys'](),...this['_diffRoots']['keys']()]),_0x490437=new Map();_0x461fac['delete']('$graveyard');for(const _0x3b9ce4 of _0x461fac){const _0x1922d1=(this['_diffRoots']['get'](_0x3b9ce4)??this['_baseRoots']['get'](_0x3b9ce4))['name'],_0x5740cb=this['_diffRoots']['get'](_0x3b9ce4)||wt(_0x3b9ce4,_0x1922d1,!0x1),_0x395706=this['_baseRoots']['get'](_0x3b9ce4)||wt(_0x3b9ce4,_0x1922d1,!0x1);_0x5740cb['isAttached']()||_0x395706['isAttached']()?(_0x490437['set'](_0x3b9ce4,_0x1922d1),_0x480c1e['insertions'][_0x3b9ce4]=gt(_0x5740cb),_0x480c1e['deletions'][_0x3b9ce4]=gt(_0x395706),this['_copyMarkers'](_0x480c1e['deletions'][_0x3b9ce4],_0x395706),this['_copyMarkers'](_0x480c1e['insertions'][_0x3b9ce4],_0x5740cb),_0x527f53['insertions'][_0x3b9ce4]=this['_generateTape'](this['_idsRoots']['get'](_0x3b9ce4),[]),_0x527f53['deletions'][_0x3b9ce4]=this['_generateTape'](this['_baseIdsRoots']['get'](_0x3b9ce4)||wt(_0x3b9ce4,_0x1922d1,!0x1),[])):_0x461fac['delete'](_0x3b9ce4);}for(const _0xce7b84 of _0x461fac){const _0x2be3d1=_0x527f53['insertions'][_0xce7b84];for(const _0x52a5a6 of _0x2be3d1){const _0x56936c=this['_getVidAttributeName'](_0x52a5a6),_0x2928f4=_0x52a5a6['item']['getAttribute'](_0x56936c);_0x127eb2['delete'](_0x2928f4),_0x2928f4>=this['_startingRevisionId']&&_0x22f62a['set'](_0x2928f4,_0x4b1b6c['get'](_0x2928f4));}}for(const _0x3efc3b of _0x461fac){const _0x5bb574=_0x527f53['insertions'][_0x3efc3b],_0x34203e=this['_getBaseVids'](_0x527f53['deletions'][_0x3efc3b]);let _0x50b090=0x0;for(const _0x5515dc of _0x5bb574){const _0x427d39=this['_getVidAttributeName'](_0x5515dc),_0x188d73=_0x5515dc['item']['getAttribute'](_0x427d39);if(!_0x22f62a['has'](_0x188d73)&&!_0x40b1a5['has'](_0x188d73)){if(_0x127eb2['has'](_0x188d73))_0x50b090++;else{if(_0x188d73!=_0x34203e[_0x50b090]){const _0x35da37=_0x4b1b6c['get'](_0x188d73)||_0x4b1b6c['get'](_0x34203e[_0x50b090]);for(;_0x188d73!=_0x34203e[_0x50b090];)_0x127eb2['has'](_0x34203e[_0x50b090])||(_0x40b1a5['set'](_0x34203e[_0x50b090],_0x35da37),_0x4b1b6c['set'](_0x34203e[_0x50b090],_0x35da37)),_0x50b090++;}_0x50b090++;}}}}for(const _0x4546c6 of _0x461fac){const _0x39259e=_0x527f53['insertions'][_0x4546c6];for(const _0x3addf8 of _0x39259e){const _0x2d74eb=this['_getVidAttributeName'](_0x3addf8),_0x467f56=_0x3addf8['item']['getAttribute'](_0x2d74eb);if(_0x40b1a5['has'](_0x467f56)){const _0x5c0345=_0x40b1a5['get'](_0x467f56);_0x127eb2['has'](_0x467f56)||_0x127eb2['set'](_0x467f56,{..._0x5c0345}),_0x22f62a['set'](_0x467f56,{..._0x5c0345});}}}for(const _0x38ed3b of _0x127eb2['keys']())_0x38ed3b>=this['_startingRevisionId']&&_0x127eb2['delete'](_0x38ed3b);const _0x3bbb19=new Map();for(const _0x1d426a of _0x461fac){let _0x392f92=_0x527f53['insertions'][_0x1d426a];for(const _0x2857c8 of _0x392f92)if(_0x2857c8['item']['is']('element','tableCell')){const _0x3e3b37=this['_getVidAttributeName'](_0x2857c8),_0x255004=_0x2857c8['item']['getAttribute'](_0x3e3b37);if(_0x22f62a['has'](_0x255004)){const _0x602a91=_0x2857c8['item']['parent']['parent']['getAttribute']('vid_start'),_0x1963b3=_0x3bbb19['get'](_0x602a91)||new Set();_0x1963b3['add'](_0x22f62a['get'](_0x255004)['userId']),_0x3bbb19['set'](_0x602a91,_0x1963b3);}}_0x392f92=_0x527f53['deletions'][_0x1d426a];for(const _0x289c1e of _0x392f92)if(_0x289c1e['item']['is']('element','tableCell')){const _0x4e6137=this['_getVidAttributeName'](_0x289c1e),_0x1f90c3=_0x289c1e['item']['getAttribute'](_0x4e6137);if(_0x127eb2['has'](_0x1f90c3)){const _0x46cab8=_0x289c1e['item']['parent']['parent']['getAttribute']('vid_start'),_0x58f0b8=_0x3bbb19['get'](_0x46cab8)||new Set();_0x58f0b8['add'](_0x127eb2['get'](_0x1f90c3)['userId']),_0x3bbb19['set'](_0x46cab8,_0x58f0b8);}}for(const _0x49b4dd of _0x3bbb19['keys']())(_0x22f62a['has'](_0x49b4dd)||_0x127eb2['has'](_0x49b4dd))&&_0x3bbb19['delete'](_0x49b4dd);}for(const _0x184268 of _0x461fac){const _0x4cb251=_0x527f53['insertions'][_0x184268];let _0x3f07e6=null,_0x4d702a=null;for(const _0x19a73d of _0x4cb251){const _0x1210a3=this['_getVidAttributeName'](_0x19a73d),_0x561b43=_0x19a73d['item']['getAttribute'](_0x1210a3),_0x3703a4=_0x3bbb19['get'](_0x561b43);_0x3703a4&&'elementStart'==_0x19a73d['type']&&(_0x3f07e6=Array['from'](_0x3703a4)[0x0],_0x4d702a=_0x19a73d['item']['getAttribute']('vid_end')),_0x3f07e6&&(_0x127eb2['set'](_0x561b43,{'userId':_0x3f07e6}),_0x22f62a['set'](_0x561b43,{'userId':_0x3f07e6})),_0x561b43==_0x4d702a&&(_0x3f07e6=null,_0x4d702a=null);}}const _0x2c8b8a={},_0x440165=new Set();for(const _0x379b0e of _0x461fac){const _0x4ae925=_0x480c1e['deletions'][_0x379b0e],_0x5a3665=_0x480c1e['insertions'][_0x379b0e];for(const {userId:_0x314cf3}of this['_touchedMarkers']['values']())null!==_0x314cf3&&_0x440165['add'](_0x314cf3);for(const {userId:_0x26e203}of this['_touchedRoots']['values']())null!==_0x26e203&&_0x440165['add'](_0x26e203);this['_markChanges'](_0x5a3665,_0x527f53['insertions'][_0x379b0e],_0x22f62a,'insertion',_0x440165),this['_markChanges'](_0x4ae925,_0x527f53['deletions'][_0x379b0e],_0x127eb2,'deletion',_0x440165),_0x2c8b8a[_0x379b0e]={'insertions':this['_prepareViewToSave'](_0x5a3665),'deletions':this['_prepareViewToSave'](_0x4ae925),'attachChange':this['_touchedRoots']['get'](_0x379b0e)||null,'attributesBefore':_0x5ba81d(this['_baseRootsAttributes']['get'](_0x379b0e))||{},'attributesAfter':_0x5ba81d(this['_diffRootsAttributes']['get'](_0x379b0e)),'rootElementName':_0x490437['get'](_0x379b0e)};}return{'diffData':_0x2c8b8a,'authorsIds':Array['from'](_0x440165)};}['_processRootBeforeSave'](_0x1d4586){for(const [,_0x361326]of _0x1d4586['markers']){const _0x3cba61=_0x361326['start']['getAncestors']()['filter'](_0x3c13a5=>'tableCell'==_0x3c13a5['name']);for(const _0x2180f1 of _0x3cba61)0x1==_0x2180f1['childCount']&&_0x2180f1['getChild'](0x0)['is']('element','paragraph')&&_0x2180f1['getChild'](0x0)['_setAttribute']('keepParagraph',!0x0);}}['_prepareViewToSave'](_0xb12085){this['_processRootBeforeSave'](_0xb12085);const _0x9636e6=this['editor']['data']['toView'](_0xb12085,{}),_0x28ce7b=Array['from'](_0x9636e6['getChildren']())['map'](_0x48481d=>this['_getViewJson'](_0x48481d));return JSON['stringify'](_0x28ce7b);}['_getViewJson'](_0x1a7d0c){if(_0x1a7d0c['is']('$text'))return _0x1a7d0c['data'];{const _0x593cb1=this['editor']['plugins']['get']('RevisionHistoryUtils'),_0x3f451f=_0x1a7d0c,_0x47a748=this['editor']['data']['htmlProcessor']['domConverter'],_0x46f954={'type':_0x593cb1['_getTypeCharForViewElement'](_0x3f451f),'name':_0x3f451f['name'],'attributes':Array['from'](_0x3f451f['getAttributes']()),'children':Array['from'](_0x3f451f['getChildren']())['map'](_0x2cd04d=>this['_getViewJson'](_0x2cd04d))};if(_0x1a7d0c['is']('uiElement')&&'$comment'!=_0x1a7d0c['name']){const _0x37161c=_0x1a7d0c['render'](_0x47a748['domDocument'],_0x47a748);_0x46f954['children']['push'](_0x37161c['outerHTML']);}else{if(_0x1a7d0c['is']('rawElement')){const _0x4dc72b=_0x47a748['domDocument']['createElement'](_0x3f451f['name']);_0x1a7d0c['render'](_0x4dc72b,_0x47a748),_0x46f954['children']['push'](_0x4dc72b['innerHTML']);}}const _0x57b89a=Array['from'](_0x3f451f['getCustomProperties']());_0x57b89a['length']>0x0&&(_0x46f954['customProperties']=_0x57b89a);const _0x39aa52=_0x3f451f['getFillerOffset']();return null!==_0x39aa52&&(_0x46f954['fillerOffset']=_0x39aa52),_0x46f954;}}['_markChanges'](_0x40c8f8,_0x1f789e,_0x258a80,_0x531a87,_0x146c17){let _0x3d23f9=null,_0x5b87bf=null,_0x55ea84=0x0;const _0x543364=this['editor']['model'];for(let _0x3b4575=0x0;_0x3b4575<_0x1f789e['length'];_0x3b4575++){const _0x398a47=this['_getVidAttributeName'](_0x1f789e[_0x3b4575]),_0x4ed625=_0x1f789e[_0x3b4575]['item']['getAttribute'](_0x398a47),_0x3fc05c=_0x258a80['get'](_0x4ed625),_0x514554=_0x3b4575==_0x1f789e['length']-0x1;(!_0x3d23f9&&_0x3fc05c&&(_0x3d23f9=_0x3fc05c,_0x5b87bf=_0x1f789e[_0x3b4575]),_0x3d23f9&&(!_0x3fc05c||_0x3fc05c['userId']!=_0x3d23f9['userId']))&&(_0x41ef3e(_0x3fc05c,mt(_0x5b87bf,_0x40c8f8,_0x543364),mt(_0x1f789e[_0x3b4575],_0x40c8f8,_0x543364)),_0x3d23f9=_0x3fc05c||null,_0x5b87bf=_0x3fc05c?_0x1f789e[_0x3b4575]:null),_0x3d23f9&&_0x514554&&_0x41ef3e(_0x3fc05c,mt(_0x5b87bf,_0x40c8f8,_0x543364),pt(_0x1f789e[_0x3b4575],_0x40c8f8,_0x543364));}function _0x41ef3e(_0x3d6323,_0x45e043,_0xc0df5f){const _0x55d74d=_0x3d23f9['userId'],_0x329952='revision:'+_0x531a87+':'+_0x55d74d+':'+_0x55ea84++,_0x26d9a2=_0x543364['createRange'](_0x45e043,_0xc0df5f);_0x40c8f8['markers']['set'](_0x329952,_0x26d9a2),null!==_0x55d74d&&_0x146c17['add'](_0x55d74d);}}['_getVidAttributeName'](_0x18d573){switch(_0x18d573['type']){case'elementStart':return'vid_start';case'elementEnd':return'vid_end';default:return'vid';}}['_fixOperation'](_0x586a77,_0x527e3e){_0x586a77['baseVersion']=null;for(const _0xdeb717 in _0x586a77){const _0x419fcc=_0x586a77[_0xdeb717];if(_0x419fcc instanceof _0x4a0b9b){const _0x3f181b=_0x527e3e['get'](_0x419fcc['root']['rootName']);_0x586a77[_0xdeb717]=this['_fixPosition'](_0x419fcc,_0x3f181b);}if(_0x419fcc instanceof _0x210c0a){const _0x2faacb=_0x527e3e['get'](_0x419fcc['root']['rootName']);_0x586a77[_0xdeb717]=this['_fixRange'](_0x419fcc,_0x2faacb);}'root'===_0xdeb717&&(_0x586a77['root']=_0x527e3e['get'](_0x586a77['root']['rootName']));}}['_fixRange'](_0x4b6fde,_0x194100){return this['editor']['model']['createRange'](this['_fixPosition'](_0x4b6fde['start'],_0x194100),this['_fixPosition'](_0x4b6fde['end'],_0x194100));}['_fixPosition'](_0x111bb0,_0x477be4){return this['editor']['model']['createPositionFromPath'](_0x477be4,_0x111bb0['path'],_0x111bb0['stickiness']);}['_handleInsertOperation'](_0x31ae4c){const _0x93827f=this['_idsRoots']['get'](_0x31ae4c['position']['root']['rootName']),_0x53ccd8=this['_fixPosition'](_0x31ae4c['position'],_0x93827f),_0x30b305=null===_0x31ae4c['_authorId']?null:_0x31ae4c['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x4b49a1=_0x53ccd8['parent'],_0x6197b1=this['_revisionId'],_0x50f5ea=[];for(const _0x542b3f of _0x31ae4c['nodes'])if(_0x542b3f['is']('element'))_0x50f5ea['push'](this['_makeIdsRoot'](_0x542b3f));else{for(let _0x37aa31=0x0;_0x37aa31<_0x542b3f['offsetSize'];_0x37aa31++)_0x50f5ea['push'](new _0x309f06('$text',{'vid':this['_revisionId']++}));}const _0x115593=this['_revisionId'];for(let _0x40ad0d=_0x6197b1;_0x40ad0d<_0x115593;_0x40ad0d++)this['_touched']['set'](_0x40ad0d,{'userId':_0x30b305});_0x4b49a1['_insertChild'](_0x53ccd8['offset'],_0x50f5ea);}['_handleMoveOperation'](_0x4f32df){(_0x4f32df=this['_cloneOperation'](_0x4f32df,this['_idsRoots']))['_execute']();const _0x3238ca=null===_0x4f32df['_authorId']?null:_0x4f32df['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x1d0504=_0x4f32df['getMovedRangeStart'](),_0x4091f8=_0x1d0504['parent'],_0xf94806=_0x1d0504['offset'];!function _0x3d91c0(_0x1ef5ee,_0x703d03,_0x58d909,_0x5045c5){for(let _0x4098fd=_0x58d909;_0x4098fd<_0x5045c5;_0x4098fd++){const _0x5d9fe0=_0x703d03['getChild'](_0x4098fd);_0x5d9fe0['is']('element','$text')?_0x1ef5ee['set'](_0x5d9fe0['getAttribute']('vid'),{'userId':_0x3238ca}):(_0x1ef5ee['set'](_0x5d9fe0['getAttribute']('vid_start'),{'userId':_0x3238ca}),_0x3d91c0(_0x1ef5ee,_0x5d9fe0,0x0,_0x5d9fe0['childCount']),_0x1ef5ee['set'](_0x5d9fe0['getAttribute']('vid_end'),{'userId':_0x3238ca}));}}(this['_touched'],_0x4091f8,_0xf94806,_0xf94806+_0x4f32df['howMany']);}['_handleMergeOperation'](_0x15c3b1){const _0x4694cc=null===(_0x15c3b1=this['_cloneOperation'](_0x15c3b1,this['_idsRoots']))['_authorId']?null:_0x15c3b1['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x42f016=_0x15c3b1['targetPosition']['parent'],_0x57ab40=_0x15c3b1['sourcePosition']['parent'],_0x4af8a5=_0x42f016['getAttribute']('vid_end'),_0x4040c9=_0x57ab40['getAttribute']('vid_start');_0x42f016['_setAttribute']('vid_end',_0x57ab40['getAttribute']('vid_end')),_0x57ab40['_setAttribute']('vid_end',_0x4af8a5),this['_touched']['set'](_0x4040c9,{'userId':_0x4694cc}),this['_touched']['set'](_0x4af8a5,{'userId':_0x4694cc}),_0x15c3b1['_execute']();}['_handleSplitOperation'](_0x715f14){const _0x5b6485=null===(_0x715f14=this['_cloneOperation'](_0x715f14,this['_idsRoots']))['_authorId']?null:_0x715f14['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x4735f6=_0x715f14['graveyardPosition'],_0xfc1b08=_0x715f14['splitPosition']['parent'];_0x715f14['_execute']();const _0x48d4ea=_0xfc1b08['getAttribute']('vid_end'),_0xaad7d7=_0x715f14['insertionPosition']['nodeAfter'];if(_0x4735f6){const _0x4f835f=_0xaad7d7['getAttribute']('vid_end'),_0x3b02b9=_0xfc1b08['getAttribute']('vid_end');_0xfc1b08['_setAttribute']('vid_end',_0x4f835f),_0xaad7d7['_setAttribute']('vid_end',_0x3b02b9),this['_touched']['set'](_0xfc1b08['getAttribute']('vid_end'),{'userId':_0x5b6485}),this['_touched']['set'](_0xaad7d7['getAttribute']('vid_start'),{'userId':_0x5b6485});}else{const _0x38123d=this['_revisionId']++,_0x34aee3=this['_revisionId']++;_0xfc1b08['_setAttribute']('vid_end',_0x38123d),_0xaad7d7['_setAttribute']('vid_start',_0x34aee3),_0xaad7d7['_setAttribute']('vid_end',_0x48d4ea),this['_touched']['set'](_0x38123d,{'userId':_0x5b6485}),this['_touched']['set'](_0x34aee3,{'userId':_0x5b6485});}}['_handleMarkerOperation'](_0x5f16b8){if(!_0x5f16b8['affectsData'])return;const _0x178506=(_0x5f16b8=this['_cloneOperation'](_0x5f16b8,this['_diffRoots']))['oldRange']?_0x5f16b8['oldRange']['root']:null,_0x570ff9=_0x5f16b8['newRange']?_0x5f16b8['newRange']['root']:null;_0x178506&&this['_markers']['delete'](_0x5f16b8['name']),_0x570ff9&&this['_markers']['set'](_0x5f16b8['name'],_0x5f16b8['newRange']['clone']());const _0x372673=null===_0x5f16b8['_authorId']?null:_0x5f16b8['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x46d39a=_0x5f16b8['name'];if(!this['_touchedMarkers']['has'](_0x46d39a))return void this['_touchedMarkers']['set'](_0x46d39a,{'range':_0x5f16b8['oldRange'],'userId':_0x372673});const _0x3d3a82=this['_touchedMarkers']['get'](_0x46d39a),_0xf7c78d=_0x3d3a82['range'],_0x476342=_0x5f16b8['newRange'];null==_0xf7c78d&&null==_0x476342||_0xf7c78d&&_0x476342&&_0xf7c78d['isEqual'](_0x476342)?this['_touchedMarkers']['delete'](_0x5f16b8['name']):_0x3d3a82['userId']=_0x372673;}['_handleRootOperation'](_0x5cc387,_0x546dd9){this['_diffRoots']['has'](_0x5cc387['rootName'])?this['_diffRoots']['get'](_0x5cc387['rootName'])['_isAttached']=_0x5cc387['isAdd']:(this['_diffRoots']['set'](_0x5cc387['rootName'],wt(_0x5cc387['rootName'],_0x5cc387['elementName'],!0x0)),this['_diffRootsAttributes']['set'](_0x5cc387['rootName'],{}),_0x546dd9&&this['_idsRoots']['set'](_0x5cc387['rootName'],wt(_0x5cc387['rootName'],_0x5cc387['elementName'],!0x0)));const _0x53ca02=null===_0x5cc387['_authorId']?null:_0x5cc387['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x5121e6=this['_touchedRoots']['get'](_0x5cc387['rootName']);_0x5121e6&&_0x5121e6['userId']===_0x53ca02?this['_touchedRoots']['delete'](_0x5cc387['rootName']):this['_touchedRoots']['set'](_0x5cc387['rootName'],{'userId':_0x53ca02,'isAttached':_0x5cc387['isAdd']});}['_handleRootAttributeOperation'](_0x49e87d){const _0x5586f5=this['_diffRootsAttributes']['get'](_0x49e87d['root']['rootName']);null===_0x49e87d['newValue']?delete _0x5586f5[_0x49e87d['key']]:_0x5586f5[_0x49e87d['key']]=_0x49e87d['newValue'];}}function gt(_0x1c1d21){const _0x247cdd=wt(_0x1c1d21['rootName'],_0x1c1d21['name'],_0x1c1d21['isAttached']());for(const _0x1f6054 of _0x1c1d21['getChildren']()){const _0x523ff3=_0x1f6054['_clone'](!0x0);_0x247cdd['_appendChild'](_0x523ff3);}return _0x247cdd;}function wt(_0x35614c,_0x13c132,_0x161b5e=!0x0){const _0x3be486=new _0x3bb092();return _0x3be486['rootName']=_0x35614c,_0x3be486['name']=_0x13c132,_0x3be486['_isAttached']=_0x161b5e,_0x3be486['isAttached']=()=>_0x3be486['_isAttached'],_0x3be486;}function mt(_0x4d335b,_0x41f8f6,_0x17e647){const _0x183e85='elementEnd'==_0x4d335b['type']?_0x17e647['createPositionAt'](_0x4d335b['item'],'end'):_0x17e647['createPositionBefore'](_0x4d335b['item']);return _0x17e647['createPositionFromPath'](_0x41f8f6,_0x183e85['path'],_0x183e85['stickiness']);}function pt(_0x562255,_0x500af3,_0x12592c){const _0x1546f5='elementStart'==_0x562255['type']?_0x12592c['createPositionAt'](_0x562255['item'],0x0):_0x12592c['createPositionAfter'](_0x562255['item']);return _0x12592c['createPositionFromPath'](_0x500af3,_0x1546f5['path'],_0x1546f5['stickiness']);}class RevisionHistorySaveRevisionFormView extends/* #__PURE__ -- @preserve */
|
|
25
|
-
|
|
26
|
-
_0x29a21b(){['id'];['author'];['type'];['data'];['rootName'];constructor(_0x2867c5){super(),this['id']=_0x2867c5['id']||_0x13fdf1(),this['author']=_0x2867c5['author'],this['type']=_0x2867c5['type'],this['data']=_0x2867c5['data']||{},this['rootName']=_0x2867c5['rootName'],this['set']('createdAt',_0x2867c5['createdAt']);}['toJSON'](){return{'id':this['id'],'authorId':this['author']['id'],'type':this['type'],'data':this['data'],'createdAt':this['createdAt']};}}class RevisionDiff{['newRevisionId'];['oldRevisionId'];['changes'];constructor(_0x53a5a2,_0x20f4b4){this['newRevisionId']=_0x53a5a2,this['oldRevisionId']=_0x20f4b4,this['changes']=new _0x166815();}['_setChanges'](_0x490075){for(const _0x5b0320 of _0x490075)this['changes']['add'](_0x5b0320);}}class RevisionViewer extends _0x1098b4{['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[_0x1b1234,et,RevisionsRepository,RevisionHistoryUtils];}constructor(_0x51032e){super(_0x51032e),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',(_0x594099,_0x57ec3c,_0x269b15)=>{this['activeChange']=null,this['activeView']=null,this['editor']['editing']['view']['change'](_0x2a81f1=>{for(const _0x5b49f5 of this['editor']['editing']['view']['document']['roots'])_0x269b15?_0x2a81f1['removeClass']('ck-editor__editable__overlay',_0x5b49f5):_0x2a81f1['addClass']('ck-editor__editable__overlay',_0x5b49f5);});}),this['bind']('isNavigationMode')['to'](this,'activeChange',_0xd7ec3e=>null!==_0xd7ec3e),this['bind']('currentChangeNumber')['to'](this,'isReady',this,'diff',this,'activeChange',(_0x503dd7,_0x338c8f,_0xb6868b)=>_0x503dd7&&_0xb6868b?_0x338c8f['changes']['getIndex'](_0xb6868b):0x0),this['bind']('numberOfChanges')['to'](this,'isReady',this,'diff',(_0x1a4c40,_0xa89f59)=>_0x1a4c40?_0xa89f59['changes']['length']:0x0),this['_changeView']=null,this['_changeIdToChange']=new Map(),this['_balloon']=this['editor']['plugins']['get'](et);}['init'](){const _0x5031b7=this['editor'],_0x410906=new ShowChangeCommand(_0x5031b7,{'direction':'backward'}),_0x4946d7=new ShowChangeCommand(_0x5031b7,{'direction':'forward'});(_0x5031b7['commands']['add']('showPreviousChange',_0x410906),_0x5031b7['commands']['add']('showNextChange',_0x4946d7),_0x5031b7['commands']['add']('restoreRevision',new RestoreRevisionCommand(_0x5031b7)),this['on']('change:numberOfChanges',()=>{_0x410906['refresh'](),_0x4946d7['refresh']();}),this['_setConversion'](),this['_initInteractions'](),_0x5031b7['enableReadOnlyMode']('revision-viewer'),_0x5031b7['plugins']['has']('WidgetToolbarRepository'))&&_0x5031b7['plugins']['get']('WidgetToolbarRepository')['forceDisabled']('revision-viewer');}async['getRevisionDocumentData'](_0x2f6b8e){return await this['_utils']['loadRevisionData'](_0x2f6b8e,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x2f6b8e);}async['getRevisionRootsAttributes'](_0x3fbb86){return await this['_utils']['loadRevisionData'](_0x3fbb86,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x3fbb86);}async['compare'](_0x39fcfc,_0x102bf3,_0x56d957=!0x1){if(!this['isEnabled'])return;const _0x38a1d4=this['diff'],_0x317a59=this['repository'],_0x2f72f6='string'==typeof _0x39fcfc?_0x317a59['getRevision'](_0x39fcfc):_0x39fcfc,_0x161cf3='string'==typeof _0x102bf3?_0x317a59['getRevision'](_0x102bf3):_0x102bf3,_0x47653e=_0x2f72f6['id'],_0x14ff27=_0x161cf3?_0x161cf3['id']:null;if(!_0x56d957&&this['diff']&&this['diff']['newRevisionId']===_0x47653e&&this['diff']['oldRevisionId']===_0x14ff27)return Promise['resolve']();this['isReady']=!0x1,this['activeView']=null,this['activeChange']=null,this['diff']=new RevisionDiff(_0x47653e,_0x14ff27);const _0x33e19f=this['_getRevisionsRange'](_0x2f72f6,_0x161cf3,!0x0)['map'](_0x3f8356=>this['_utils']['loadRevisionData'](_0x3f8356,this['adapter']));return _0x33e19f['push'](new Promise(_0x290dee=>{setTimeout(_0x290dee,0x14);})),Promise['all'](_0x33e19f)['then'](()=>{if(!this['isEnabled'])return;this['_cleanUp']();const _0x24aba8=this['_getDiff'](_0x47653e,_0x14ff27);for(const _0x369ca4 of _0x24aba8['changes'])this['_changeIdToChange']['set'](_0x369ca4['id'],_0x369ca4);this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x247d80=>{for(const _0x475557 of this['editor']['model']['document']['getRootNames']())_0x247d80['detachRoot'](_0x475557);for(const _0x56d1e8 of Object['keys'](_0x24aba8['model'])){const _0x59a057=_0x24aba8['model'][_0x56d1e8]['name'],_0x26f36d=_0x247d80['addRoot'](_0x56d1e8,_0x59a057);for(const _0x158414 of Object['keys'](_0x24aba8['attributes'][_0x56d1e8]))_0x247d80['setAttribute'](_0x158414,_0x24aba8['attributes'][_0x56d1e8][_0x158414],_0x26f36d);_0x247d80['insert'](_0x24aba8['model'][_0x56d1e8],_0x26f36d,0x0);}}),this['diff']['_setChanges'](this['_sortAndFilterDiffChanges'](_0x24aba8['changes'])),this['isReady']=!0x0;})['catch'](_0x5dac7a=>{console['error'](_0x5dac7a),this['_cleanUp'](),_0x38a1d4&&(this['diff']=_0x38a1d4),this['isReady']=!0x0;});}['addRevisionData'](_0x5b8d8c,_0x9fda26){const _0x2a4a25=this['repository']['createRevision'](_0x5b8d8c);return _0x2a4a25['on']('_update',(_0x1377bf,_0x41704e,_0x34bd1b)=>_0x9fda26(_0x41704e,_0x34bd1b,_0x2a4a25)),this['repository']['addRevision'](_0x2a4a25),_0x2a4a25;}['_cleanUp'](){this['activeChange']=null,this['_cleanMarkers'](),this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=null,this['_changeIdToChange']['clear'](),this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x1f546b=>{for(const _0xfbd0c5 of this['editor']['model']['document']['getRootNames']())_0x1f546b['detachRoot'](_0xfbd0c5);});}['_sortAndFilterDiffChanges'](_0x343d38){const _0x167002=[],_0x57c658=new Map();for(const _0x21fa5e of this['editor']['model']['document']['getRootNames']()){const _0x11038c=this['editor']['editing']['view']['getDomRoot'](_0x21fa5e);if(!_0x11038c)continue;const _0x49650d=_0x11038c['getClientRects']()['item'](0x0);_0x49650d&&(_0x167002['push'](_0x21fa5e),_0x57c658['set'](_0x21fa5e,_0x49650d));}return _0x167002['sort']((_0x4cb7a2,_0x4acdcc)=>{const _0x317f3a=_0x57c658['get'](_0x4cb7a2),_0x4b47af=_0x57c658['get'](_0x4acdcc);return _0x317f3a['y']-_0x4b47af['y']||_0x317f3a['x']-_0x4b47af['x'];}),(_0x343d38=_0x343d38['filter'](_0x28fb5d=>_0x167002['includes'](_0x28fb5d['rootName'])))['sort']((_0x5bde8d,_0x98a503)=>_0x167002['indexOf'](_0x5bde8d['rootName'])-_0x167002['indexOf'](_0x98a503['rootName'])),_0x343d38;}['_makeTape'](_0x90c52c){const _0x108455=Array['from'](_0x90c52c['markers'])['filter'](([_0x3e861d,_0x4a1107])=>_0x3e861d['startsWith']('revision:')&&!_0x4a1107['isCollapsed']),_0x36e1d7=Array['from'](this['editor']['model']['createRangeIn'](_0x90c52c)['getWalker']({'singleCharacters':!0x0}));if(0x0!=_0x108455['length'])for(const _0x57d5e0 of _0x36e1d7){const [_0x27546b,_0x5e1357]=_0x108455[0x0],[,_0x3c5ab8,_0x15e99a]=_0x27546b['split'](':');if(_0x5e1357['end']['isEqual'](_0x57d5e0['nextPosition'])&&_0x108455['shift'](),(_0x57d5e0['previousPosition']['isEqual'](_0x5e1357['start'])||_0x57d5e0['previousPosition']['isAfter'](_0x5e1357['start']))&&('insertion'==_0x3c5ab8?_0x57d5e0['isAdded']={'userId':_0x15e99a}:'deletion'==_0x3c5ab8&&(_0x57d5e0['isRemoved']={'userId':_0x15e99a})),0x0==_0x108455['length'])break;}return _0x36e1d7;}['_refreshStartEndIndex'](_0x432ab9){const _0x599479=new Map();for(let _0x3dd428=0x0;_0x3dd428<_0x432ab9['length'];_0x3dd428++)'text'===_0x432ab9[_0x3dd428]['type']?(_0x432ab9[_0x3dd428]['item']['startIndex']=_0x3dd428,_0x432ab9[_0x3dd428]['item']['endIndex']=_0x3dd428):('elementStart'===_0x432ab9[_0x3dd428]['type']?_0x432ab9[_0x3dd428]['item']['startIndex']=_0x3dd428:'elementEnd'===_0x432ab9[_0x3dd428]['type']&&(_0x432ab9[_0x3dd428]['item']['endIndex']=_0x3dd428),_0x599479['set'](_0x432ab9[_0x3dd428]['id'],_0x3dd428));for(const _0x55f800 of _0x599479['values']())'elementStart'===_0x432ab9[_0x55f800]['type']?_0x432ab9[_0x55f800]['item']['endIndex']=_0x599479['get'](_0x432ab9[_0x55f800]['pairId']):'elementEnd'===_0x432ab9[_0x55f800]['type']&&(_0x432ab9[_0x55f800]['item']['startIndex']=_0x599479['get'](_0x432ab9[_0x55f800]['pairId']));}['_processTape'](_0x1ca959){for(let _0x1f8484=0x0;_0x1f8484<_0x1ca959['length'];_0x1f8484++){if('elementStart'===_0x1ca959[_0x1f8484]['type'])_0x1ca959[_0x1f8484]['item']['startIndex']=_0x1f8484;else{if('elementEnd'===_0x1ca959[_0x1f8484]['type']){_0x1ca959[_0x1f8484]['item']['endIndex']=_0x1f8484;const _0x280bb4=_0x1ca959[_0x1f8484]['item']['startIndex'];_0x1ca959[_0x280bb4]['pairId']=_0x1ca959[_0x1f8484]['id'],_0x1ca959[_0x1f8484]['pairId']=_0x1ca959[_0x280bb4]['id'];}else _0x1ca959[_0x1f8484]['item']['startIndex']=_0x1f8484,_0x1ca959[_0x1f8484]['item']['endIndex']=_0x1f8484,_0x1ca959[_0x1f8484]['pairId']=null;}_0x1ca959[_0x1f8484]['markersStart']||(_0x1ca959[_0x1f8484]['markersStart']=[],_0x1ca959[_0x1f8484]['markersEnd']=[]);}}['_markInsertions'](_0x546bdf,_0x22e14c){const _0x414360=_0x546bdf['filter'](_0x5b0030=>!_0x5b0030['isAdded']);for(let _0x46a4b5=0x0;_0x46a4b5<_0x22e14c['length'];_0x46a4b5++)_0x22e14c[_0x46a4b5]['isAdded']&&(_0x414360[_0x46a4b5]['isAdded']=_0x22e14c[_0x46a4b5]['isAdded']);}['_getDiff'](_0x3e1fe6,_0x4e49c5=null){const _0x252737=this['repository']['getRevision'](_0x3e1fe6),_0x482e2b=_0x4e49c5?this['repository']['getRevision'](_0x4e49c5):null,_0x83b8f8=this['_getRevisionsRange'](_0x252737,_0x482e2b),_0x1a8473=_0x83b8f8[_0x83b8f8['length']-0x1],_0x304ea5=new Map(),_0x3010c8={'model':{},'attributes':{},'changes':[]},_0x20a496=new Set(),_0x5becfc=new Map();for(let _0x9a315a=_0x83b8f8['length']-0x1;_0x9a315a>=0x0;_0x9a315a--){const _0x4fab7f=_0x83b8f8[_0x9a315a];for(const _0x50c567 of Object['keys'](_0x4fab7f['diffData']))if(_0x4fab7f['diffData'][_0x50c567]['attachChange']){const _0x5b3251=_0x4fab7f['diffData'][_0x50c567]['attachChange'];_0x5b3251['isAttached']?(_0x20a496['add'](_0x50c567),_0x5becfc['has'](_0x50c567)&&_0x5becfc['get'](_0x50c567)['userId']==_0x5b3251['userId']?_0x5becfc['delete'](_0x50c567):_0x5becfc['set'](_0x50c567,_0x5b3251)):_0x5becfc['has'](_0x50c567)?(_0x20a496['delete'](_0x50c567),_0x5becfc['delete'](_0x50c567)):(_0x20a496['add'](_0x50c567),_0x5becfc['set'](_0x50c567,_0x5b3251));}else _0x20a496['add'](_0x50c567);}for(const _0xee8b4e of _0x20a496){const _0x4f2c91=_0x5becfc['has'](_0xee8b4e)&&!_0x5becfc['get'](_0xee8b4e)['isAttached'];let _0x2d0746=_0x4f2c91?_0x83b8f8['length']-0x1:0x0;const _0x1f18ca=_0x4f2c91?-0x1:0x1;for(;_0x83b8f8[_0x2d0746];){const _0x222fcf=_0x83b8f8[_0x2d0746];if(_0x222fcf['diffData'][_0xee8b4e]){const _0x37f34e=_0x4f2c91?_0x222fcf['diffData'][_0xee8b4e]['attributesBefore']:_0x222fcf['diffData'][_0xee8b4e]['attributesAfter'];_0x3010c8['attributes'][_0xee8b4e]=_0x37f34e?_0x5ba81d(_0x37f34e):{};break;}_0x2d0746+=_0x1f18ca;}}for(const _0x143a22 of _0x83b8f8){_0x143a22['model']={};for(const _0x3d8c60 of _0x143a22['authors'])_0x304ea5['set'](_0x3d8c60['id'],_0x3d8c60);for(const _0x24b43d of _0x20a496){const _0x58df85=_0x143a22['diffData'][_0x24b43d]?_0x143a22['diffData'][_0x24b43d]['insertions']:'[]',_0x25fa45=_0x143a22['diffData'][_0x24b43d]?_0x143a22['diffData'][_0x24b43d]['deletions']:'[]',_0x6df5e=_0x143a22['diffData'][_0x24b43d]?.['rootElementName']||'$root';_0x143a22['model'][_0x24b43d]={'insertions':this['_utils']['_makeModelFromViewString'](_0x58df85,_0x6df5e),'deletions':this['_utils']['_makeModelFromViewString'](_0x25fa45,_0x6df5e)};}}for(const _0x2b8671 of _0x20a496){let _0x3d53ca=null,_0x1edb9f=0x0;const _0x500c77=_0x83b8f8['map'](_0x5d14db=>_0x5d14db['diffData'][_0x2b8671]?.['rootElementName'])['find'](_0x3e5fcc=>void 0x0!==_0x3e5fcc)||'$root',_0x30a08e=new Map(Array['from'](_0x252737['model'][_0x2b8671]['insertions']['markers'])['filter'](([_0x13509b])=>!_0x13509b['startsWith']('revision:')));let _0xadd70a=0x0;for(const _0x436e3e of _0x83b8f8){const _0x2f6078=this['_makeTape'](_0x436e3e['model'][_0x2b8671]['insertions']);_0x436e3e==_0x252737?(_0x3d53ca=_0x2f6078,_0x1edb9f=_0x3d53ca['length'],_0x3d53ca['forEach'](_0x1bfd30=>{_0x1bfd30['id']=_0xadd70a++;}),this['_processTape'](_0x3d53ca)):this['_markInsertions'](_0x3d53ca,_0x2f6078);const _0x427e28=_0x3d53ca['filter'](_0x14fb1a=>!_0x14fb1a['isAdded'])['map'](_0x3727ec=>_0x3727ec['id']);let _0x266784=0x0;const _0x5ba1de=this['_makeTape'](_0x436e3e['model'][_0x2b8671]['deletions']);_0x5ba1de['forEach'](_0x359259=>{_0x359259['isRemoved']?_0x359259['id']=_0x1edb9f++:_0x359259['id']=_0x427e28[_0x266784++];}),this['_processTape'](_0x5ba1de),this['_setDistance'](_0x3d53ca,'isAdded'),this['_setDistance'](_0x5ba1de,'isRemoved'),_0x436e3e==_0x252737&&this['_markMarkers'](_0x3d53ca,_0x30a08e),_0x3d53ca=this['_joinTapes'](_0x3d53ca,_0x5ba1de),this['_refreshStartEndIndex'](_0x3d53ca),this['_setDistance'](_0x3d53ca,'isRemoved');}_0x3d53ca=_0x3d53ca['filter'](_0x1178c9=>!(_0x1178c9['isAdded']&&_0x1178c9['isRemoved']));const _0x4d44da=new Map(_0x1a8473['model'][_0x2b8671]['deletions']['markers']),_0x4e0da5=new Set(_0x30a08e['keys']());for(const _0x17e6a9 of _0x4d44da['keys']())_0x4e0da5['delete'](_0x17e6a9);this['_markSuggestions'](_0x3d53ca,_0x4e0da5),this['_fixObsoleteTags'](_0x3d53ca),_0x3d53ca=this['_removeMissingPairs'](_0x3d53ca),_0x3d53ca=this['_markMismatchedRemovedTags'](_0x3d53ca),_0x3d53ca=this['_removeUnsupportedChanges'](_0x3d53ca);const {root:_0x53ec09,changes:_0x29f079}=this['_makeModelFromTape'](_0x3d53ca,_0x304ea5,_0x2b8671,_0x500c77);_0x3010c8['model'][_0x2b8671]=_0x53ec09;const _0xe970d8=_0x5becfc['get'](_0x2b8671);if(_0xe970d8){const _0x35345b=_0x304ea5['get'](_0xe970d8['userId']),_0x565db7=new ChangeItem({'author':_0x35345b,'type':_0xe970d8['isAttached']?'add':'remove','data':{'isOnRoot':!0x0},'createdAt':new Date(),'rootName':_0x2b8671});_0x29f079['unshift'](_0x565db7),_0x3010c8['attributes'][_0x2b8671]['revisionHistoryAttachChange']=_0x565db7['id'];}_0x3010c8['changes']=_0x3010c8['changes']['concat'](_0x29f079);}return _0x3010c8;}['_markMarkers'](_0x3bff83,_0x4212da){for(let _0xf108a8=0x0;_0xf108a8<_0x3bff83['length'];_0xf108a8++)for(const [_0x681a38,_0x5ee218]of _0x4212da)!_0x5ee218['isCollapsed']&&_0x5ee218['start']['isEqual'](_0x3bff83[_0xf108a8]['previousPosition'])&&_0x3bff83[_0xf108a8]['markersStart']['push'](_0x681a38),_0x5ee218['end']['isEqual'](_0x3bff83[_0xf108a8]['nextPosition'])&&_0x3bff83[_0xf108a8]['markersEnd']['push'](_0x681a38);}['_joinTapes'](_0x4227cc,_0x498b37){let _0x1ac3c9=[],_0x32855e=0x0,_0x40fa88=0x0;for(;_0x32855e<_0x4227cc['length']||_0x40fa88<_0x498b37['length'];){const _0x3b5a3a=_0x4227cc[_0x32855e]||{},_0x113b41=_0x498b37[_0x40fa88]||{};if(_0x3b5a3a['id']==_0x113b41['id'])_0x32855e++,_0x40fa88++,_0x1ac3c9['push'](_0x3b5a3a);else{if(_0x113b41['isRemoved']&&_0x3b5a3a['isAdded']){const {commonTape:_0x18bc6c,iEnd:_0x1e24a4,jEnd:_0x4fc38c}=this['_threeWayMerge'](_0x4227cc,_0x32855e,_0x498b37,_0x40fa88);_0x1ac3c9=_0x1ac3c9['concat'](_0x18bc6c),_0x32855e=_0x1e24a4,_0x40fa88=_0x4fc38c;}else _0x113b41['isRemoved']?(_0x40fa88++,_0x1ac3c9['push'](_0x113b41)):(_0x32855e++,_0x1ac3c9['push'](_0x3b5a3a));}}return _0x1ac3c9;}['_markSuggestions'](_0x5068fa,_0x820ade){const _0x5adbeb=[];for(let _0xb7f89e=0x0;_0xb7f89e<_0x5068fa['length'];_0xb7f89e++){for(let _0x23e710=0x0;_0x23e710<_0x5068fa[_0xb7f89e]['markersStart']['length'];_0x23e710++){const _0x3af712=_0x5068fa[_0xb7f89e]['markersStart'][_0x23e710];if(!_0x820ade['has'](_0x3af712))continue;const {group:_0x39f530,type:_0x3d0f90,authorId:_0x235646}=_0xd219a3(_0x3af712);'revision-suggestion'!=_0x39f530||'insertion'!=_0x3d0f90&&'deletion'!=_0x3d0f90||(_0x5adbeb['unshift']({'type':_0x3d0f90,'name':_0x3af712,'userId':_0x235646}),_0x5068fa[_0xb7f89e]['markersStart']['splice'](_0x23e710,0x1),_0x23e710--);}_0x56dcbe(_0x5068fa[_0xb7f89e]);for(let _0x1b7e60=0x0;_0x1b7e60<_0x5068fa[_0xb7f89e]['markersEnd']['length'];_0x1b7e60++){const _0x22eb45=_0x5068fa[_0xb7f89e]['markersEnd'][_0x1b7e60];if(!_0x820ade['has'](_0x22eb45))continue;const {group:_0x2b7ebc,type:_0x1ac984}=_0xd219a3(_0x22eb45);if('revision-suggestion'!=_0x2b7ebc||'insertion'!=_0x1ac984&&'deletion'!=_0x1ac984)continue;_0x5068fa[_0xb7f89e]['markersEnd']['splice'](_0x1b7e60,0x1),_0x1b7e60--;const _0xd7bd2a=_0x5adbeb['findIndex'](_0x200ab7=>_0x200ab7['name']==_0x22eb45);_0xd7bd2a>-0x1&&_0x5adbeb['splice'](_0xd7bd2a,0x1);}}function _0xd219a3(_0x1628bb){const _0x118a0e=_0x1628bb['split'](':');return{'group':_0x118a0e[0x0],'type':_0x118a0e[0x1],'subType':_0x118a0e['length']>=0x5?_0x118a0e[0x2]:null,'id':_0x118a0e['length']<0x5?_0x118a0e[0x2]:_0x118a0e[0x3],'authorId':_0x118a0e['length']<0x5?_0x118a0e[0x3]:_0x118a0e[0x4],'markerCount':0x6==_0x118a0e['length']?_0x118a0e[0x5]:null};}function _0x56dcbe(_0x315e8a){for(let _0x14a691=0x0;_0x14a691<_0x5adbeb['length'];_0x14a691++){if(_0x315e8a['isAdded']&&'insertion'==_0x5adbeb[_0x14a691]['type']&&_0x315e8a['isAdded']['userId']==_0x5adbeb[_0x14a691]['userId'])return _0x315e8a['isAddSuggestion']=_0x5adbeb[_0x14a691],void delete _0x315e8a['isAdded'];if(!_0x315e8a['isAdded']&&!_0x315e8a['isRemoved']&&'deletion'==_0x5adbeb[_0x14a691]['type'])return void(_0x315e8a['isRemoveSuggestion']=_0x5adbeb[_0x14a691]);}}}['_setDistance'](_0x418aed,_0x31e44d){let _0x53bbb6=0x0,_0x56fdc1=!0x1;const _0x3cbfb1=new Map();for(const _0x37eb1c of _0x418aed)_0x37eb1c[_0x31e44d]?_0x56fdc1&&(_0x53bbb6++,_0x56fdc1=!0x1):(_0x53bbb6++,_0x56fdc1=!0x0),_0x3cbfb1['set'](_0x37eb1c['id'],_0x53bbb6);for(let _0x35222e=0x0;_0x35222e<_0x418aed['length'];_0x35222e++){if('isRemoved'==_0x31e44d&&_0x418aed[_0x35222e]['isAdded']||'isAdded'==_0x31e44d&&_0x418aed[_0x35222e]['isRemoved'])continue;if('text'==_0x418aed[_0x35222e]['type']){_0x418aed[_0x35222e]['distance']=0x0;continue;}const _0x173c50=_0x3cbfb1['get'](_0x418aed[_0x35222e]['pairId']),_0xff9a0b=_0x3cbfb1['get'](_0x418aed[_0x35222e]['id']);_0x418aed[_0x35222e]['distance']=_0x173c50-_0xff9a0b;}}['_getRevisionsRange'](_0x56b09a,_0x40f728,_0x4f8949=!0x1){const _0x164d9c=[];let _0x115180=this['repository']['getIndex'](_0x56b09a),_0x5cdd3c=this['repository']['getIndex'](_0x40f728);for(-0x1==_0x5cdd3c&&(_0x5cdd3c=this['repository']['_revisions']['length'],_0x4f8949=!0x1);_0x115180<_0x5cdd3c;)_0x164d9c['push'](this['repository']['getRevision'](_0x115180)),_0x115180++;return _0x4f8949&&_0x164d9c['push'](this['repository']['getRevision'](_0x115180)),_0x164d9c;}['_threeWayMerge'](_0x4549c1,_0x5d9c3d,_0x9fb421,_0x3fade5){const _0xb0fbf5=this['editor']['model']['schema'];let _0x3b31ee=_0x5d9c3d;for(;_0x4549c1[_0x3b31ee]&&_0x4549c1[_0x3b31ee]['isAdded'];)_0x3b31ee++;let _0x196c9b=_0x3fade5;for(;_0x9fb421[_0x196c9b]&&_0x9fb421[_0x196c9b]['isRemoved'];)_0x196c9b++;_0x262b9c(_0x4549c1,_0x5d9c3d,_0x3b31ee),_0x262b9c(_0x9fb421,_0x3fade5,_0x196c9b);const _0x331918=_0x9fb421['slice'](_0x3fade5,_0x196c9b)['concat'](_0x4549c1['slice'](_0x5d9c3d,_0x3b31ee));return _0x331918['sort']((_0x13e722,_0x1785b4)=>_0x13e722['side']!=_0x1785b4['side']?_0x13e722['side']-_0x1785b4['side']:_0x13e722['level']!=_0x1785b4['level']?_0x13e722['level']-_0x1785b4['level']:_0x13e722['distance']!=_0x1785b4['distance']?_0x1785b4['distance']-_0x13e722['distance']:!!_0x13e722['isAdded']!=!!_0x1785b4['isAdded']?-0x1==_0x13e722['side']||0x0==_0x13e722['side']?_0x13e722['isAdded']?-0x1:0x1:_0x13e722['isAdded']?0x1:-0x1:_0x13e722['index']-_0x1785b4['index']),{'commonTape':_0x331918,'iEnd':_0x3b31ee,'jEnd':_0x196c9b};function _0x262b9c(_0x4190e4,_0x39da8b,_0x2c5a70){let _0x59c43b=-0x1,_0xf1b5d4=Number['POSITIVE_INFINITY'],_0x15e05b=!0x0;for(let _0xe9e3e3=_0x39da8b;_0xe9e3e3<_0x2c5a70;_0xe9e3e3++)if(_0xb0fbf5['isInline'](_0x4190e4[_0xe9e3e3]['item'])||(_0x15e05b=!0x1),_0x4190e4[_0xe9e3e3]['item']['startIndex']<_0x39da8b&&(_0x59c43b=_0xe9e3e3),_0x4190e4[_0xe9e3e3]['item']['endIndex']>=_0x2c5a70){_0xf1b5d4=_0xe9e3e3;break;}_0x15e05b&&(_0x59c43b=_0x2c5a70-0x1);for(let _0x382a69=_0x39da8b;_0x382a69<_0x2c5a70;_0x382a69++)_0x4190e4[_0x382a69]['side']=_0x382a69<=_0x59c43b?-0x1:_0x382a69<_0xf1b5d4?0x0:0x1,_0x4190e4[_0x382a69]['index']=_0x382a69;let _0x2b9895=0x0;for(let _0x3595a0=_0x39da8b;_0x3595a0<=_0x59c43b;_0x3595a0++)0x0==_0x4190e4[_0x3595a0]['distance']?_0x4190e4[_0x3595a0]['level']=_0x2b9895:(_0x2b9895++,_0x4190e4[_0x3595a0]['level']=_0x2b9895,_0x2b9895++);for(let _0x5a4fb7=_0x39da8b;_0x5a4fb7<_0x2c5a70;_0x5a4fb7++)0x0==_0x4190e4[_0x5a4fb7]['side']&&(_0x4190e4[_0x5a4fb7]['level']=_0x2b9895);_0x2b9895=0x0;for(let _0x436c3c=_0x2c5a70-0x1;_0x436c3c>=_0xf1b5d4;_0x436c3c--)0x0==_0x4190e4[_0x436c3c]['distance']?_0x4190e4[_0x436c3c]['level']=_0x2b9895:(_0x2b9895--,_0x4190e4[_0x436c3c]['level']=_0x2b9895,_0x2b9895--);}}['_fixObsoleteTags'](_0x2bfeca){const _0x169bd0=new Map(),_0x3f9598=this['editor']['model']['schema'];for(let _0x24072c=0x1;_0x24072c<_0x2bfeca['length'];_0x24072c++){let _0x5d89c4,_0x2b00dd,_0x3a85e7;const _0x312d3d=_0x2bfeca[_0x24072c],_0x53d03d=_0x2bfeca[_0x24072c-0x1];if('text'==_0x312d3d['type'])continue;if(_0x312d3d['type']!=_0x53d03d['type'])continue;if(!_0x3f9598['isBlock'](_0x53d03d['item'])||_0x3f9598['isLimit'](_0x53d03d['item']))continue;if(!_0x3f9598['isBlock'](_0x312d3d['item'])||_0x3f9598['isLimit'](_0x312d3d['item']))continue;if((_0x2bfeca[_0x24072c]['isAdded']||_0x2bfeca[_0x24072c]['isAddSuggestion'])&&_0x2bfeca[_0x24072c-0x1]['isRemoved'])_0x5d89c4=_0x2bfeca[_0x24072c],_0x2b00dd=_0x2bfeca[_0x24072c-0x1],_0x3a85e7=_0x24072c-0x1;else{if(!_0x2bfeca[_0x24072c]['isRemoved']||!_0x2bfeca[_0x24072c-0x1]['isAdded']&&!_0x2bfeca[_0x24072c-0x1]['isAddSuggestion'])continue;_0x5d89c4=_0x2bfeca[_0x24072c-0x1],_0x2b00dd=_0x2bfeca[_0x24072c],_0x3a85e7=_0x24072c;}const _0x536c74=_0x5d89c4['level']==_0x2b00dd['level'],_0x1fc016=Math['abs'](_0x5d89c4['level'])<Math['abs'](_0x2b00dd['level'])&&0x0==_0x2b00dd['distance'];(_0x536c74||_0x1fc016)&&(_0x169bd0['set'](_0x2b00dd['id'],_0x5d89c4['id']),_0x2bfeca['splice'](_0x3a85e7,0x1),_0x24072c--,_0x5d89c4['isAdded']=!0x1);}for(let _0x315dc5=0x0;_0x315dc5<_0x2bfeca['length'];_0x315dc5++)_0x169bd0['has'](_0x2bfeca[_0x315dc5]['pairId'])&&(_0x2bfeca[_0x315dc5]['pairId']=_0x169bd0['get'](_0x2bfeca[_0x315dc5]['pairId']));}['_removeMissingPairs'](_0x497a47){const _0x3602af=new Set(_0x497a47['map'](_0x39015f=>_0x39015f['id']));for(let _0x22fd70=0x0;_0x22fd70<_0x497a47['length'];_0x22fd70++)_0x3602af['has'](_0x497a47[_0x22fd70]['pairId'])||0x0==_0x497a47[_0x22fd70]['distance']||(_0x497a47[_0x22fd70]['isIncorrect']=!0x0);return _0x497a47['filter'](_0xd746bb=>!_0xd746bb['isIncorrect']);}['_markMismatchedRemovedTags'](_0x104a78){const _0x170efa=new Set();for(let _0x585e53=0x0;_0x585e53<_0x104a78['length'];_0x585e53++){if(_0x170efa['has'](_0x104a78[_0x585e53]['id'])&&_0x104a78[_0x585e53]['isRemoved']&&(_0x104a78[_0x585e53]['isIncorrect']=!0x0),_0x104a78[_0x585e53]['isIncorrect'])continue;if(0x0==_0x104a78[_0x585e53]['distance'])continue;if('elementStart'!=_0x104a78[_0x585e53]['type'])continue;if(null==_0x104a78[_0x585e53]['pairId'])continue;let _0x2d55bf=_0x585e53+0x1,_0x368f94=0x0;for(;_0x104a78[_0x2d55bf]['id']!=_0x104a78[_0x585e53]['pairId'];)'elementStart'==_0x104a78[_0x2d55bf]['type']?_0x368f94++:'elementEnd'==_0x104a78[_0x2d55bf]['type']&&_0x368f94--,_0x2d55bf++;if(0x0!=_0x368f94){if(_0x104a78[_0x585e53]['isRemoved'])_0x104a78[_0x585e53]['isIncorrect']=!0x0;else{for(;_0x2d55bf!=_0x585e53;)_0x104a78[_0x2d55bf]['isRemoved']&&0x0!=_0x104a78[_0x2d55bf]['distance']&&(_0x104a78[_0x2d55bf]['isIncorrect']=!0x0,_0x170efa['add'](_0x104a78[_0x2d55bf]['pairId'])),_0x2d55bf--;}}}return _0x104a78['filter'](_0x4f4037=>!_0x4f4037['isIncorrect']);}['_removeUnsupportedChanges'](_0x359531){const _0x43e224=this['editor']['model']['schema'];for(let _0x329feb=0x0;_0x329feb<_0x359531['length'];_0x329feb++){if(!(_0x359531[_0x329feb]['isAdded']||_0x359531[_0x329feb]['isAddSuggestion']||_0x359531[_0x329feb]['isRemoved']||_0x359531[_0x329feb]['isRemoveSuggestion']))continue;if(0x0==_0x359531[_0x329feb]['distance'])continue;const _0xfec9a3=_0x359531[_0x329feb]['item'];_0x43e224['isBlock'](_0xfec9a3)||_0x43e224['isLimit'](_0xfec9a3)||(_0x359531[_0x329feb]['isAdded']&&delete _0x359531[_0x329feb]['isAdded'],_0x359531[_0x329feb]['isAddSuggestion']&&delete _0x359531[_0x329feb]['isAddSuggestion'],_0x359531[_0x329feb]['isRemoveSuggestion']&&delete _0x359531[_0x329feb]['isRemoveSuggestion'],_0x359531[_0x329feb]['isRemoved']&&(_0x359531[_0x329feb]['isIncorrect']=!0x0));}return _0x359531['filter'](_0x42ec23=>!_0x42ec23['isIncorrect']);}['_makeModelFromTape'](_0x26b9b4,_0x190b59,_0xeaf733,_0x2b69a2){const _0x387244=new _0x3bb092(),_0x52cd69=[],_0x5c967b=new Map(),_0x472d3a=this['editor']['model'],_0x310dda=_0x472d3a['schema'],_0x1d323c=[_0x387244],_0x5ca913={},_0x39bb83={'isAdded':[],'isRemoved':[],'isAddSuggestion':[],'isRemoveSuggestion':[]};_0x387244['name']=_0x2b69a2;let _0x4b6e34=null;const _0x3d8e79=[0x0];for(let _0x4d9f1f=0x0;_0x4d9f1f<_0x26b9b4['length'];_0x4d9f1f++)if('elementStart'===_0x26b9b4[_0x4d9f1f]['type']){_0x26b9b4[_0x4d9f1f]['previousPosition']=_0x472d3a['createPositionFromPath'](_0x387244,_0x3d8e79);const _0x3670d0=new _0x309f06(_0x26b9b4[_0x4d9f1f]['item']['name'],_0x26b9b4[_0x4d9f1f]['item']['getAttributes']());_0x1d323c[0x0]['_appendChild'](_0x3670d0),_0x3d8e79['push'](0x0),_0x1d323c['unshift'](_0x3670d0),_0x26b9b4[_0x4d9f1f]['nextPosition']=_0x472d3a['createPositionFromPath'](_0x387244,_0x3d8e79);}else'elementEnd'===_0x26b9b4[_0x4d9f1f]['type']?(_0x1d323c['shift'](),_0x26b9b4[_0x4d9f1f]['previousPosition']=_0x472d3a['createPositionFromPath'](_0x387244,_0x3d8e79),_0x3d8e79['pop'](),_0x3d8e79[_0x3d8e79['length']-0x1]++,_0x26b9b4[_0x4d9f1f]['nextPosition']=_0x472d3a['createPositionFromPath'](_0x387244,_0x3d8e79)):(_0x26b9b4[_0x4d9f1f]['previousPosition']=_0x472d3a['createPositionFromPath'](_0x387244,_0x3d8e79),_0x4b6e34?_0x4b6e34['_data']+=_0x26b9b4[_0x4d9f1f]['item']['data']:_0x4b6e34=new _0x4094b7(_0x26b9b4[_0x4d9f1f]['item']['data'],_0x26b9b4[_0x4d9f1f]['item']['getAttributes']()),_0x26b9b4[_0x4d9f1f+0x1]&&'text'===_0x26b9b4[_0x4d9f1f+0x1]['type']&&_0x18462b(_0x4b6e34,_0x26b9b4[_0x4d9f1f+0x1]['item'])||(_0x1d323c[0x0]['_appendChild'](_0x4b6e34),_0x4b6e34=null),_0x3d8e79[_0x3d8e79['length']-0x1]+=_0x26b9b4[_0x4d9f1f]['item']['offsetSize'],_0x26b9b4[_0x4d9f1f]['nextPosition']=_0x472d3a['createPositionFromPath'](_0x387244,_0x3d8e79));for(let _0x4986dc=0x0;_0x4986dc<_0x26b9b4['length'];_0x4986dc++){const _0x45b9cd=_0x26b9b4[_0x4986dc]['previousPosition'],_0x1c431c=_0x26b9b4[_0x4986dc]['nextPosition'];for(const _0x3e1703 of _0x26b9b4[_0x4986dc]['markersStart'])_0x5c967b['set'](_0x3e1703,{'start':_0x45b9cd,'end':null});_0x482caf('isRemoveSuggestion',_0x4986dc,_0x45b9cd,_0x1c431c),_0x482caf('isAddSuggestion',_0x4986dc,_0x45b9cd,_0x1c431c),_0x482caf('isRemoved',_0x4986dc,_0x45b9cd,_0x1c431c),_0x482caf('isAdded',_0x4986dc,_0x45b9cd,_0x1c431c);for(const _0x3edf8a of _0x26b9b4[_0x4986dc]['markersEnd']){const _0x1812f7=_0x5c967b['get'](_0x3edf8a);_0x1812f7?_0x1812f7['end']=_0x1c431c:_0x5c967b['set'](_0x3edf8a,{'start':_0x1c431c,'end':_0x1c431c});}}for(const [_0x2edc40,_0x8569f2]of _0x5c967b){const _0x31bbc4=this['editor']['model']['createRange'](_0x8569f2['start'],_0x8569f2['end']);_0x387244['markers']['set'](_0x2edc40,_0x31bbc4);}return _0x52cd69['sort']((_0x3136e9,_0x3ff52f)=>{const _0x49062e=_0x387244['markers']['get']('revision:'+_0x3136e9['id']),_0x14d9a9=_0x387244['markers']['get']('revision:'+_0x3ff52f['id']);return _0x49062e['start']['isBefore'](_0x14d9a9['start'])?-0x1:_0x49062e['start']['isAfter'](_0x14d9a9['start'])?0x1:_0x49062e['end']['isBefore'](_0x14d9a9['end'])?-0x1:_0x49062e['end']['isAfter'](_0x14d9a9['end'])?0x1:'add'===_0x3136e9['type']?-0x1:0x1;}),{'root':_0x387244,'changes':_0x52cd69};function _0x482caf(_0x50e2da,_0x37146a,_0x1cf51a,_0x2cc162){const _0x504910=!!_0x26b9b4[_0x37146a][_0x50e2da],_0x390fbb=_0x504910?_0x26b9b4[_0x37146a][_0x50e2da]['userId']:null,_0x444969=_0x37146a===_0x26b9b4['length']-0x1,_0x30e72e=_0x39bb83[_0x50e2da][0x0],_0xf5c90f=_0x310dda['isObject'](_0x26b9b4[_0x37146a]['item']);!_0x5ca913[_0x50e2da]&&_0x504910?_0x5ca913[_0x50e2da]={'start':_0x1cf51a,'tapeItem':_0x26b9b4[_0x37146a],'userId':_0x390fbb,'type':_0x50e2da}:_0x5ca913[_0x50e2da]&&!_0x504910?(_0x5ca913[_0x50e2da]['end']=_0x1cf51a,_0x3e6964(_0x5ca913[_0x50e2da]),_0x5ca913[_0x50e2da]=null):_0x5ca913[_0x50e2da]&&_0x504910&&_0x5ca913[_0x50e2da]['userId']!==_0x390fbb&&(_0x5ca913[_0x50e2da]['end']=_0x1cf51a,_0x30e72e&&_0x30e72e['userId']===_0x5ca913[_0x50e2da]['userId']||_0x3e6964(_0x5ca913[_0x50e2da]),_0x5ca913[_0x50e2da]={'start':_0x1cf51a,'tapeItem':_0x26b9b4[_0x37146a],'userId':_0x390fbb,'type':_0x50e2da}),_0x5ca913[_0x50e2da]&&_0xf5c90f&&('elementStart'!==_0x26b9b4[_0x37146a]['type']||_0x30e72e&&_0x30e72e['userId']===_0x390fbb||_0x39bb83[_0x50e2da]['unshift']({'userId':_0x390fbb,'object':_0x26b9b4[_0x37146a]['item'],'change':_0x5ca913[_0x50e2da]}),'elementEnd'===_0x26b9b4[_0x37146a]['type']&&_0x30e72e&&_0x30e72e['object']===_0x26b9b4[_0x37146a]['item']&&(_0x39bb83[_0x50e2da]['shift'](),_0x5ca913[_0x50e2da]=_0x30e72e['change'])),_0x5ca913[_0x50e2da]&&_0x444969&&(_0x5ca913[_0x50e2da]['end']=_0x2cc162,_0x3e6964(_0x5ca913[_0x50e2da]),_0x5ca913[_0x50e2da]=null);}function _0x3e6964({start:_0x2deeb4,end:_0x3916de,tapeItem:_0x59cc20,userId:_0x25a9f6,type:_0x354603}){const _0x3eb2d5=_0x59cc20['item'],_0x51dc7f=_0x472d3a['schema']['isBlock'](_0x3eb2d5)&&!_0x472d3a['schema']['isLimit'](_0x3eb2d5),_0x3e8446=_0x2deeb4['nodeAfter']==_0x3916de['parent']&&_0x3916de['isAtStart'];if(_0x51dc7f&&_0x3e8446)return;const _0x35e508=_0x472d3a['createRange'](_0x2deeb4,_0x3916de),_0x59bccf=_0x190b59['get'](_0x25a9f6),_0x2850ef=new ChangeItem({'author':_0x59bccf,'type':'isAdded'==_0x354603||'isAddSuggestion'==_0x354603?'add':'remove','data':{'isSuggestion':'isAddSuggestion'==_0x354603||'isRemoveSuggestion'==_0x354603},'createdAt':new Date(),'rootName':_0xeaf733});_0x52cd69['push'](_0x2850ef),_0x387244['markers']['set']('revision:'+_0x2850ef['id'],_0x35e508);}function _0x18462b(_0x4b8493,_0x14b1db){const _0x531d14=_0x4b8493['getAttributes'](),_0x308d65=_0x14b1db['getAttributes']();for(const _0x4e2b8f of _0x531d14){if(_0x4e2b8f[0x1]!==_0x14b1db['getAttribute'](_0x4e2b8f[0x0]))return!0x1;_0x308d65['next']();}return _0x308d65['next']()['done'];}}['_setConversion'](){this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision','view':_0x3a2f82=>{const _0x51efb7=_0x3a2f82['markerName']['split'](':')[0x1],_0x260735=this['_getChangeFromId'](_0x51efb7);if(!_0x260735)return null;const _0x155b65='add'==_0x260735['type']?'insertion':'deletion',_0x10a466=['ck-suggestion-marker','ck-suggestion-marker-'+_0x155b65];return _0x260735['data']['isSuggestion']&&_0x10a466['push']('ck-suggestion-marker-'+_0x155b65+'-new'),this['activeChange']==_0x260735&&_0x10a466['push']('ck-suggestion-marker--active'),{'classes':_0x10a466,'attributes':{'data-change-id':_0x51efb7}};}}),this['editor']['conversion']['for']('upcast')['add'](_0x289d75=>{_0x289d75['on']('element:pre',(_0x76b429,_0x5ddc61,_0x32883d)=>{const _0xdbe056=_0x5ddc61['viewItem']['getChild'](0x0);if(!_0xdbe056||!_0xdbe056['is']('element','code'))return;if(!_0x32883d['consumable']['consume'](_0xdbe056,{'attributes':['vid_start','vid_end']}))return;const _0xe6e2f3=_0x5ddc61['modelRange']['start']['nodeAfter'];_0x32883d['writer']['setAttribute']('vid_start',_0xdbe056['getAttribute']('vid_start'),_0xe6e2f3),_0x32883d['writer']['setAttribute']('vid_end',_0xdbe056['getAttribute']('vid_end'),_0xe6e2f3);},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['add'](_0x304805=>{_0x304805['on']('element',(_0x107f4f,_0x1cb555,_0x51231f)=>{if(!_0x51231f['consumable']['consume'](_0x1cb555['viewItem'],{'attributes':['vid_start','vid_end']}))return;if(_0x1cb555['modelRange']['isCollapsed'])return;const _0x57ecf0=_0x1cb555['modelRange']['start']['nodeAfter'];_0x57ecf0['hasAttribute']('vid_start')||_0x57ecf0['hasAttribute']('vid')||(_0x51231f['writer']['setAttribute']('vid_start',_0x1cb555['viewItem']['getAttribute']('vid_start'),_0x57ecf0),_0x51231f['writer']['setAttribute']('vid_end',_0x1cb555['viewItem']['getAttribute']('vid_end'),_0x57ecf0));},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['elementToAttribute']({'view':{'name':'span','attributes':{'vid':!0x0}},'model':{'key':'vid','value':_0x5ae48d=>_0x5ae48d['getAttribute']('vid')}}),this['editor']['model']['schema']['on']('checkAttribute',(_0x66c001,[,_0x4c1b19])=>{['vid_start','vid_end','vid']['includes'](_0x4c1b19)&&(_0x66c001['return']=!0x0,_0x66c001['stop']());},{'priority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x212bfe=>{_0x212bfe['on']('attribute:vid',(_0x2b8884,_0x2127b6,_0x41c2ed)=>{if('\x20'!=_0x2127b6['item']['data']||_0x2127b6['item']['parent']['maxOffset']>0x1)return;if(!_0x41c2ed['consumable']['consume'](_0x2127b6['item'],_0x2b8884['name']))return;const _0x4f8cb1=_0x41c2ed['writer'],_0x2430da=_0x41c2ed['mapper']['toViewRange'](_0x2127b6['range']);_0x4f8cb1['wrap'](_0x2430da,_0x4f8cb1['createAttributeElement']('span'));});}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',function(_0x510911){const _0x49742b=_0x510911['plugins']['get']('RevisionViewer');return(_0x17becf,_0x3be993,_0x1911e7)=>{const _0x3290c4=_0x3be993['markerName']['split'](':')[0x1],_0x190639=_0x49742b['_getChangeFromId'](_0x3290c4);if(!_0x190639)return null;const _0x1d9592='add'==_0x190639['type']?'split':'merge';if(!_0x1911e7['consumable']['test'](_0x3be993['markerRange'],_0x17becf['name']))return;const _0x28ed96=_0x3be993['markerRange']['getWalker'](),_0x35f0e5=_0x3be993['markerRange']['start'],_0xe77645=_0x510911['model']['schema'];let _0x2fa9d7=null,_0xab1622=null,_0x5d795f=!0x1,_0x226c9b=!0x1;for(const _0x1ec6af of _0x28ed96){const _0x3589d3=_0x1ec6af['item'];_0x5d795f=_0x5d795f||_0xe77645['isContent'](_0x3589d3);const _0x3aa976=_0x1911e7['mapper']['toViewElement'](_0x3589d3);if(_0x3aa976&&_0x3aa976['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x1ec6af['type']&&(_0xe77645['isBlock'](_0x3589d3)&&!_0xe77645['isLimit'](_0x3589d3)&&(_0x3589d3['nextSibling']||_0x35f0e5['isAtEnd']?_0x2fa9d7&&_0x2fa9d7['parent']==_0x3589d3||(_0x2fa9d7=_0x3589d3,_0x551737(_0x1ec6af['previousPosition']),_0x226c9b=!0x0):_0xab1622=_0xab1622||_0x1ec6af['previousPosition']));}function _0x551737(_0x3e0bc3){const _0x480a3e=_0x1911e7['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x1d9592}),_0x10dcc5=_0x1911e7['mapper']['toViewPosition'](_0x3e0bc3);_0x190639['data']['isSuggestion']&&_0x1911e7['writer']['addClass']('ck-suggestion-marker-'+_0x1d9592+'-new',_0x480a3e),_0x49742b['activeChange']==_0x190639&&_0x1911e7['writer']['addClass']('ck-suggestion-marker--active',_0x480a3e),_0x1911e7['writer']['insert'](_0x10dcc5,_0x480a3e),_0x1911e7['mapper']['bindElementToMarker'](_0x480a3e,_0x3be993['markerName']);}_0x5d795f||_0x226c9b||!_0xab1622||_0x551737(_0xab1622);};}(this['editor']),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision',(_0x3171f3,_0x5c5698,_0x277068)=>{const _0xb692f3=_0x277068['mapper']['markerNameToElements'](_0x5c5698['markerName']);if(_0xb692f3){for(const _0x3df3ee of _0xb692f3)(_0x3df3ee['hasClass']('ck-suggestion-marker-split')||_0x3df3ee['hasClass']('ck-suggestion-marker-merge'))&&(_0x277068['mapper']['unbindElementFromMarkerName'](_0x3df3ee,_0x5c5698['markerName']),_0x277068['writer']['remove'](_0x3df3ee));}},{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',(_0x46d2a1,_0x5d5ed9,_0x4cecd9)=>{const _0x17c3bf=_0x5d5ed9['markerName']['split'](':')[0x1],_0x33145f=this['_getChangeFromId'](_0x17c3bf);if(!_0x33145f)return null;const _0x166a67='add'==_0x33145f['type']?'split':'merge';if(_0x4cecd9['consumable']['test'](_0x5d5ed9['markerRange'],_0x46d2a1['name']))for(const _0x3b8be9 of _0x5d5ed9['markerRange']['getItems']()){if(!_0x3b8be9['is']('element','softBreak'))continue;const _0xa0ec12=_0x4cecd9['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x166a67}),_0x32f072=_0x4cecd9['mapper']['toViewPosition'](this['editor']['model']['createPositionBefore'](_0x3b8be9));_0x33145f['data']['isSuggestion']&&_0x4cecd9['writer']['addClass']('ck-suggestion-marker-'+_0x166a67+'-new',_0xa0ec12),this['activeChange']==_0x33145f&&_0x4cecd9['writer']['addClass']('ck-suggestion-marker--active',_0xa0ec12),_0x4cecd9['writer']['insert'](_0x32f072,_0xa0ec12),_0x4cecd9['mapper']['bindElementToMarker'](_0xa0ec12,_0x5d5ed9['markerName']);}},{'priority':'high'}),this['editor']['model']['document']['on']('change',()=>{this['editor']['editing']['view']['change'](_0x4db7b7=>{for(const _0xb65f27 of this['editor']['model']['document']['getRootNames']()){const _0x333470=this['editor']['model']['document']['getRoot'](_0xb65f27),_0xbaa9d3=this['editor']['editing']['view']['document']['getRoot'](_0xb65f27);if(_0xbaa9d3){const _0x23527d=_0x333470['getAttribute']('revisionHistoryAttachChange');if(_0x4db7b7['removeAttribute']('data-change-id',_0xbaa9d3),_0x4db7b7['removeClass']('ck-revision-history-root-add',_0xbaa9d3),_0x4db7b7['removeClass']('ck-revision-history-root-remove',_0xbaa9d3),_0x4db7b7['removeClass']('ck-revision-history-root--active',_0xbaa9d3),_0x23527d){const _0x1729bf=this['_getChangeFromId'](_0x23527d);if(!_0x1729bf)return null;_0x4db7b7['setAttribute']('data-change-id',_0x23527d,_0xbaa9d3),_0x4db7b7['addClass']('ck-revision-history-root-'+_0x1729bf['type'],_0xbaa9d3),this['activeChange']==_0x1729bf&&_0x4db7b7['addClass']('ck-revision-history-root--active',_0xbaa9d3);}}}});}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'comment','model':_0x1b85a8=>'revision-comment:'+_0x1b85a8,'converterPriority':'highest'}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'suggestion','model':_0x1360f4=>'revision-suggestion:'+_0x1360f4,'converterPriority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision-suggestion','view':_0x48e2c4=>({'name':'suggestion:'+_0x48e2c4,'group':'revision-suggestion'}),'converterPriority':'highest'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-suggestion','view':_0x258faa=>{const _0x5e42d0=_0x258faa['markerName']['split'](':')[0x1];return'insertion'!=_0x5e42d0&&'deletion'!=_0x5e42d0?null:{'classes':['ck-suggestion-preview-marker','ck-suggestion-preview-marker-'+_0x5e42d0]};}}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:deletion',_t(this['editor'],'merge'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:insertion',_t(this['editor'],'split'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision-suggestion',(_0x1a6544,_0x2e8420,_0x1b91f3)=>{const _0x28acf9=_0x1b91f3['mapper']['markerNameToElements'](_0x2e8420['markerName']);if(_0x28acf9){for(const _0x545eac of _0x28acf9)_0x545eac['is']('uiElement')&&(_0x1b91f3['mapper']['unbindElementFromMarkerName'](_0x545eac,_0x2e8420['markerName']),_0x1b91f3['writer']['remove'](_0x545eac));}},{'priority':'high'});}['_getChangeFromId'](_0x17be78){return this['_changeIdToChange']['get'](_0x17be78);}['_getViewForChange'](_0x21eb82){return this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=new ChangeDetailsView(this['editor']['locale'],_0x21eb82),this['_changeView'];}['_initInteractions'](){this['editor']['model']['document']['selection']['observeMarkers']('revision'),this['on']('change:activeView',(_0x32b3a3,_0x5e281a,_0x178cf0,_0x36e6d1)=>{_0x36e6d1&&this['_balloon']['remove'](_0x36e6d1),_0x178cf0&&(this['_balloon']['add']({'view':_0x178cf0,'stackId':'revisionHistoryLabel','position':{'target':()=>{const _0x5bbef9=this['editor']['editing'],_0x11f741=this['_getChangeFromId'](_0x178cf0['changeId']);let _0x445744;if(_0x11f741['data']['isOnRoot']){const _0x2a005a=_0x5bbef9['view']['getDomRoot'](_0x11f741['rootName']);_0x445744=Array['from'](_0x2a005a['getClientRects']());}else{const _0x596dbd=this['editor']['model']['markers']['get']('revision:'+_0x178cf0['changeId']);_0x445744=Array['from'](_0x5bbef9['mapper']['markerNameToElements'](_0x596dbd['name']))['map'](_0x3a4a4e=>_0x5bbef9['view']['domConverter']['mapViewToDom'](_0x3a4a4e))['map'](_0x1bf60a=>Array['from'](_0x1bf60a['getClientRects']()))['flat']();}if(!this['_activeViewTarget'])return _0x445744[0x0];return _0x445744['find'](_0x1f8c1b=>_0x1f8c1b['top']-0x3<=this['_activeViewTarget']['y']&&_0x1f8c1b['bottom']+0x3>=this['_activeViewTarget']['y']&&_0x1f8c1b['left']-0x3<=this['_activeViewTarget']['x']&&_0x1f8c1b['right']+0x3>=this['_activeViewTarget']['x'])||_0x445744[0x0];}}}),this['_balloon']['showStack']('revisionHistoryLabel'));}),this['on']('change:activeChange',(_0x4860b7,_0x4c5431,_0x309f07,_0x1181eb)=>{this['activeView']=_0x309f07?this['_getViewForChange'](_0x309f07):null,this['editor']['model']['change'](()=>{const _0x1df4df=this['editor']['editing'];_0x1181eb&&(_0x1181eb['data']['isOnRoot']?_0x1df4df['view']['change'](_0xf3fab5=>{_0xf3fab5['removeClass']('ck-revision-history-root--active',_0x1df4df['view']['document']['getRoot'](_0x1181eb['rootName']));}):_0x1df4df['reconvertMarker']('revision:'+_0x1181eb['id'])),_0x309f07&&(_0x309f07['data']['isOnRoot']?_0x1df4df['view']['change'](_0x293002=>{_0x293002['addClass']('ck-revision-history-root--active',_0x1df4df['view']['document']['getRoot'](_0x309f07['rootName']));}):_0x1df4df['reconvertMarker']('revision:'+_0x309f07['id']));});}),this['listenTo'](this['editor']['editing']['view']['document'],'mouseover',(_0x11879b,_0x5a730f)=>{if(this['activeChange'])return;const _0x45b676=this['_findChangeIdFromDomTarget'](_0x5a730f['target']),_0x191558=this['_changeIdToChange']['get'](_0x45b676);_0x191558?(this['_activeViewTarget']={'x':_0x5a730f['domEvent']['x'],'y':_0x5a730f['domEvent']['y']},this['activeView']=this['_getViewForChange'](_0x191558)):(this['_activeViewTarget']=null,this['activeView']=null);}),this['listenTo'](this['editor']['editing']['view']['document'],'mousedown',(_0x573de3,_0x57fe43)=>{const _0x1085ae=this['_findChangeIdFromDomTarget'](_0x57fe43['target']),_0x154609=this['_changeIdToChange']['get'](_0x1085ae);_0x154609?(this['_activeViewTarget']={'x':_0x57fe43['domEvent']['x'],'y':_0x57fe43['domEvent']['y']},_0x154609===this['activeChange']?this['_balloon']['updatePosition']():this['activeChange']=_0x154609):(this['_activeViewTarget']=null,this['activeChange']=null);});}['_findChangeIdFromDomTarget'](_0x534333){do{const _0x1d227b=_0x534333['getAttribute']('data-change-id');if(_0x1d227b)return _0x1d227b;_0x534333=_0x534333['parent'];}while(_0x534333);return null;}['_cleanMarkers'](){this['editor']['model']['change'](_0x14427a=>{for(const _0x3b7a3f of this['editor']['model']['markers'])_0x14427a['removeMarker'](_0x3b7a3f);});}}function _t(_0x1286a2,_0x1def0a){return(_0x19ea4f,_0x3c8389,_0x59c268)=>{if(!_0x59c268['consumable']['test'](_0x3c8389['markerRange'],_0x19ea4f['name']))return;const _0x172bf2=_0x3c8389['markerRange']['getWalker'](),_0x590cee=_0x3c8389['markerRange']['start'],_0x4207c2=_0x1286a2['model']['schema'];let _0x99b072=null,_0x17e219=null,_0x4d9f8a=!0x1,_0x5849b5=!0x1;for(const _0x404810 of _0x172bf2){const _0x3103c1=_0x404810['item'];_0x4d9f8a=_0x4d9f8a||_0x4207c2['isContent'](_0x3103c1);const _0x4f19fd=_0x59c268['mapper']['toViewElement'](_0x3103c1);if(_0x4f19fd&&_0x4f19fd['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x404810['type']&&(_0x4207c2['isBlock'](_0x3103c1)&&!_0x4207c2['isLimit'](_0x3103c1)&&(_0x3103c1['nextSibling']||_0x590cee['isAtEnd']?_0x99b072&&_0x99b072['parent']==_0x3103c1||(_0x99b072=_0x3103c1,_0x39eeef(_0x404810['previousPosition']),_0x5849b5=!0x0):_0x17e219=_0x17e219||_0x404810['previousPosition']));}function _0x39eeef(_0x7bced6){const _0x4d3f46=_0x59c268['mapper']['toViewPosition'](_0x7bced6),_0x1f3b85=_0x59c268['writer']['createUIElement']('span',{'class':'ck-suggestion-preview-marker-'+_0x1def0a});_0x59c268['writer']['insert'](_0x4d3f46,_0x1f3b85),_0x59c268['mapper']['bindElementToMarker'](_0x1f3b85,_0x3c8389['markerName']);}_0x4d9f8a||_0x5849b5||!_0x17e219||_0x39eeef(_0x17e219);};}class RestoreRevisionCommand extends _0x328611{constructor(_0x27c40a){super(_0x27c40a);const _0x1d6f9a=_0x27c40a['plugins']['get'](RevisionViewer);this['affectsData']=!0x1,this['listenTo'](_0x1d6f9a,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x1d6f9a,'change:isEnabled',()=>this['refresh']());}['execute'](){const _0x5223cf=this['editor'],_0x5c00f2=_0x5223cf['plugins']['get'](RevisionViewer),_0x1e0130=_0x5c00f2['isReady']?_0x5c00f2['diff']['newRevisionId']:null;_0x5223cf['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x1e0130);}['refresh'](){const {isReady:_0x28a891,isEnabled:_0x2cc721,repository:_0x17a442,diff:_0x35d143}=this['editor']['plugins']['get'](RevisionViewer),_0x3e1fa0=_0x35d143&&_0x17a442['getLaterVisibleRevision'](_0x35d143['newRevisionId']);this['isEnabled']=_0x28a891&&_0x2cc721&&Boolean(_0x3e1fa0);}}class ShowChangeCommand extends _0x328611{['_step'];constructor(_0x54000f,{direction:_0xb6d9ec}){super(_0x54000f);const _0x44e4a9=_0x54000f['plugins']['get'](RevisionViewer);this['affectsData']=!0x1,this['_step']='forward'===_0xb6d9ec?0x1:-0x1,this['listenTo'](_0x44e4a9,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x44e4a9,'change:isEnabled',()=>this['refresh']()),this['listenTo'](_0x44e4a9,'change:activeChange',()=>this['refresh']());}['execute'](){const _0x417016=this['editor'],_0x143167=_0x417016['plugins']['get'](RevisionViewer),{isNavigationMode:_0x4224e0,currentChangeNumber:_0x3663d5}=_0x143167;let _0x28fb19;if(_0x143167['activeChange']=_0x4224e0?_0x143167['diff']['changes']['get'](_0x3663d5+this['_step']):_0x143167['diff']['changes']['first'],_0x143167['activeChange']['data']['isOnRoot'])_0x28fb19=_0x417016['editing']['view']['getDomRoot'](_0x143167['activeChange']['rootName']);else{const _0x2c9313=_0x417016['model']['markers']['get']('revision:'+_0x143167['activeChange']['id']);_0x28fb19=_0x26734a(_0x417016['editing'],_0x2c9313);}_0x43cb0b({'target':_0x28fb19,'viewportOffset':0x28});}['refresh'](){const {isNavigationMode:_0x4f1d30,currentChangeNumber:_0xaee3a2,numberOfChanges:_0xccbb,isReady:_0x105ec1,isEnabled:_0x3af74d}=this['editor']['plugins']['get'](RevisionViewer);this['isEnabled']=!!(_0x3af74d&&_0x105ec1&&_0xccbb)&&(!_0x4f1d30||(0x1===this['_step']?_0xaee3a2<_0xccbb-0x1:_0xaee3a2>0x0));}}class ChangesNavigationView extends _0x7802f2{constructor(_0x59f9d7){super(_0x59f9d7);const _0x39de81=this['bindTemplate'],_0xa30625=new _0x506250(_0x59f9d7),_0x490372=new _0x506250(_0x59f9d7);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',(_0x19ccdc,_0x5e11f6)=>_0x19ccdc&&_0x5e11f6>0x0),this['bind']('_statusText')['to'](this,'isReady',this,'currentChangeNumber',this,'numberOfChanges',this,'isNavigationMode',(_0x29c877,_0x45a3e4,_0x25713d,_0x57b2a2)=>{if(!_0x29c877)return ft(_0x59f9d7,'Loading...');if(!_0x25713d)return ft(_0x59f9d7,'No\x20changes');const _0x5d2418=ft(_0x59f9d7,'NUMBER_OF_CHANGES',_0x25713d);return _0x57b2a2?ft(_0x59f9d7,'X_OF_Y_CHANGES',[_0x45a3e4+0x1,_0x25713d]):_0x5d2418;}),_0xa30625['set']({'label':ft(_0x59f9d7,'Show\x20previous\x20change'),'tooltip':!0x0,'icon':_0x178c94}),_0x490372['set']({'label':ft(_0x59f9d7,'Show\x20next\x20change'),'tooltip':!0x0,'icon':_0xf0bd91}),_0xa30625['bind']('isEnabled')['to'](this,'isBackwardNavigationEnabled'),_0x490372['bind']('isEnabled')['to'](this,'isForwardNavigationEnabled'),_0xa30625['on']('execute',()=>this['fire']('execute','backward')),_0x490372['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',_0x39de81['if']('_isStatusLabelVisible','ck-hidden',_0x3d357e=>!_0x3d357e)]},'children':[{'text':_0x39de81['to']('isNavigationMode',_0x3cb6da=>_0x3cb6da?ft(_0x59f9d7,'EDIT_X_OF_Y_REVISIONS')+':\x20':ft(_0x59f9d7,'Total')+':\x20')}]},{'text':_0x39de81['to']('_statusText')}]},new st(),{'tag':'div','attributes':{'class':['ck-revision-history-ui__changes-navigation__navigation']},'children':[_0xa30625,_0x490372]}]});}}const yt='ck-editor__editable__loading-overlay';class RevisionViewerLoadingOverlay extends _0x1098b4{static get['pluginName'](){return'RevisionViewerLoadingOverlay';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['show'](){const _0x857da0=this['editor']['editing']['view'];_0x857da0['change'](_0x2b98c0=>{for(const _0x4cbc14 of _0x857da0['document']['roots'])_0x2b98c0['addClass'](yt,_0x4cbc14);});}['hide'](){const _0x34fed7=this['editor']['editing']['view'];_0x34fed7['change'](_0x43575c=>{for(const _0x55ddc7 of _0x34fed7['document']['roots'])_0x43575c['removeClass'](yt,_0x55ddc7);});}}class RevisionViewerUI extends _0x1098b4{static get['pluginName'](){return'RevisionViewerUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[RevisionViewer,RevisionViewerLoadingOverlay];}['init'](){const _0x1affe8=this['editor'],_0x2f75ec=_0x1affe8['plugins']['get'](RevisionViewer),_0x1f8ecb=_0x1affe8['plugins']['get'](RevisionViewerLoadingOverlay);_0x1affe8['ui']['componentFactory']['add']('exitToEditing',_0x107191=>{const _0x20122b=new _0x506250(_0x107191);return _0x20122b['set']({'label':ft(_0x107191,'Back\x20to\x20editing'),'icon':_0x2432b7,'withText':!0x0,'tooltip':!0x0,'class':'ck-revision-history-ui__back-to-editing'}),this['listenTo'](_0x20122b,'execute',()=>{_0x1affe8['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}),_0x20122b;}),_0x1affe8['ui']['componentFactory']['add']('restoreRevision',_0x13fff8=>{const _0x14f774=new _0x506250(_0x13fff8);return _0x14f774['set']({'label':ft(_0x13fff8,'Restore\x20this\x20revision'),'withText':!0x0,'tooltip':!0x0}),_0x14f774['bind']('isEnabled')['to'](_0x1affe8['commands']['get']('restoreRevision')),this['listenTo'](_0x14f774,'execute',()=>_0x1affe8['execute']('restoreRevision')),_0x14f774;}),_0x1affe8['ui']['componentFactory']['add']('changesNavigation',_0x8fcd20=>{const _0x3496b8=new ChangesNavigationView(_0x8fcd20),_0x1c27e4=_0x1affe8['commands']['get']('showPreviousChange'),_0x2289a0=_0x1affe8['commands']['get']('showNextChange');return _0x3496b8['bind']('isBackwardNavigationEnabled')['to'](_0x1c27e4,'isEnabled'),_0x3496b8['bind']('isForwardNavigationEnabled')['to'](_0x2289a0,'isEnabled'),_0x3496b8['bind']('isReady','currentChangeNumber','numberOfChanges','isNavigationMode')['to'](_0x2f75ec),this['listenTo'](_0x3496b8,'execute',(_0x394537,_0x26a885)=>{_0x1affe8['execute']('forward'===_0x26a885?'showNextChange':'showPreviousChange');}),_0x3496b8;}),_0x1f8ecb['show'](),_0x2f75ec['on']('change:isReady',(_0x1e5d34,_0x50517b,_0x205387)=>{_0x205387?_0x1f8ecb['hide']():_0x1f8ecb['show']();});}}class RevisionNameView extends _0x195b0e{['_resizeObserver']=null;constructor(_0x905add,_0x5abdb8){super(_0x905add,_0x5abdb8);const _0x578cd0=this['bindTemplate'];this['set']({'label':ft(_0x905add,'Revision\x20name'),'_tooltipString':''}),this['fieldView']['placeholder']=ft(_0x905add,'Enter\x20the\x20revision\x20name'),this['extendTemplate']({'tag':'span','attributes':{'class':['ck-revision-history-sidebar__revision-name'],'data-cke-tooltip-text':_0x578cd0['to']('_tooltipString'),'data-cke-tooltip-position':'s','data-cke-tooltip-class':'ck-tooltip_multi-line'}});}['render'](){super['render'](),this['_resizeObserver']=new _0x176f79(this['fieldView']['element'],()=>this['_updateTooltipText']()),this['listenTo'](this['fieldView'],'input',()=>this['_updateTooltipText']());}['destroy'](){super['destroy'](),this['_resizeObserver']&&this['_resizeObserver']['destroy']();}['_updateTooltipText'](){const _0x492d6f=this['fieldView']['element'];this['_tooltipString']=_0x492d6f['scrollWidth']>_0x492d6f['clientWidth']&&_0x492d6f['value']||'';}}class RevisionAuthorView extends _0x7802f2{constructor(_0x3ab86f,_0x46f263,_0x179086){super(_0x3ab86f);const _0x575c01=new nt();_0x575c01['set']({'content':_0x4b0c7a,'viewBox':'0\x200\x2011\x2010'});const _0x128ef3=['ck','ck-revision-history-sidebar__revision-author'];_0x179086&&_0x128ef3['push']('ck-revision-history-sidebar__revision-author_creator');const _0x527e2b=[{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__revision-author__name'],'title':ft(_0x3ab86f,_0x179086?'Revision\x20creator':'Revision\x20author')},'children':[_0x575c01,_0x46f263['name']]}];this['setTemplate']({'tag':'li','attributes':{'class':_0x128ef3},'children':_0x527e2b});}}function Rt(_0x3e02e6,_0x1a5ad8){const _0x608211=_0x3e02e6['bindTemplate'],_0x2b0bc5=_0x3e02e6['locale'],_0x421daf=_0x4cec8d(_0x2b0bc5);_0x421daf['panelPosition']='sw';const _0x555bbd=function(_0x41dad7,_0x270417){const _0x528905=function(_0x6c368,_0x36b974){const _0x14f786=_0x6c368['locale'],_0x49a6cf={'Compare\x20against\x20selected':ft(_0x14f786,'Compare\x20against\x20selected'),'Name\x20this\x20revision':ft(_0x14f786,'Name\x20this\x20revision'),'Restore\x20this\x20revision':ft(_0x14f786,'Restore\x20this\x20revision')};return _0x36b974['map'](_0x5e9850=>{const _0x3f5c79=_0x49a6cf[_0x5e9850['name']];return _0x3f5c79&&_0x3f5c79!==_0x5e9850['name']&&(_0x5e9850['name']=_0x3f5c79),_0x5e9850;});}(_0x41dad7,_0x270417),_0x97727e=new _0x166815();for(const _0x541e87 of _0x528905){const _0x4e99f3={'type':'button','model':new rt({'label':_0x541e87['name'],'class':_0x541e87['class'],'withText':!0x0,'role':'menuitem','_action':_0x541e87['action']})};_0x4e99f3['model']['bind']('isEnabled')['to'](_0x41dad7,'isActionsDropdownOpen',_0x351cfb=>'function'!=typeof _0x541e87['isEnabled']||(!_0x351cfb||_0x541e87['isEnabled'](_0x41dad7))),_0x97727e['add'](_0x4e99f3);}return _0x97727e;}(_0x3e02e6,_0x1a5ad8);return _0x3e02e6['bind']('isActionsDropdownOpen')['to'](_0x421daf,'isOpen'),_0x421daf['buttonView']['set']({'label':ft(_0x2b0bc5,'Show\x20more\x20items'),'tooltip':!0x0,'tooltipPosition':'sw','icon':_0x34e82a}),_0x421daf['extendTemplate']({'attributes':{'class':['ck-revision-history-sidebar__revision__actions',_0x608211['if']('isActionsDropdownOpen','ck-on')]},'on':{'click':_0x608211['to'](_0x3237e7=>_0x3237e7['stopPropagation']())}}),_0x421daf['on']('execute',_0x2ed807=>{_0x3e02e6['isReady']&&'function'==typeof _0x2ed807['source']['_action']&&_0x2ed807['source']['_action'](_0x3e02e6);}),ot(_0x421daf,_0x555bbd,{'role':'menu'}),_0x421daf['listenTo'](_0x3e02e6,'change:isActionsDropdownOpen',(_0x4a1911,_0x579083,_0x2a451d)=>{if(_0x2a451d)for(const _0x167cb2 of _0x421daf['listView']['items']){const _0x1deb61=_0x167cb2['children']['first'],_0x1e9d00=_0x1a5ad8['find'](_0x55042c=>_0x55042c['action']===_0x1deb61['_action'])['isVisible'];_0x167cb2['isVisible']=void 0x0===_0x1e9d00||_0x1e9d00(_0x3e02e6);}}),_0x421daf;}class RevisionView extends/* #__PURE__ -- @preserve */
|
|
27
|
-
|
|
23
|
+
import{ObservableMixin as _0x2bb8d4,uid as _0x529617,Collection as _0x217353,logWarning as _0x27d5fa,FocusTracker as _0x4f5dcb,KeystrokeHandler as _0x4ffae5,scrollViewportToShowTarget as _0x235b0c,ResizeObserver as _0x1dcc33,ElementReplacer as _0x34ccd7,CKEditorError as _0x5130bc}from'@ckeditor/ckeditor5-utils/dist/index.js';import{cloneDeep as _0x21ca06,set as _0x301f11,unset as _0x5860aa,isEqual as _0x36df9a}from'es-toolkit/compat';import{Plugin as _0x2a792a,PendingActions as _0x315c45,Command as _0x5a1184,ElementApiMixin as _0x558ad5,Editor as _0x296569}from'@ckeditor/ckeditor5-core/dist/index.js';import{Users as _0x2ab97d,getMarkerDomElement as _0x3ba103,ConfirmMixin as _0x1a6ae6,sanitizeEditorConfig as _0x31f0a2}from'@ckeditor/ckeditor5-collaboration-core/dist/index.js';import{ViewContainerElement as _0x3ef0a0,ViewAttributeElement as _0x499c32,ViewEmptyElement as _0x570170,ViewRawElement as _0x3e3e33,ViewUIElement as _0x2866ce,ViewDocumentFragment as _0x2d055e,ViewText as _0x27d4c3,ViewElement as _0x35fa1e,ModelElement as _0x3bd734,ModelRange as _0xbab5ba,ModelPosition as _0x1dc247,ModelDocumentFragment as _0x5b5c54,ModelText as _0x4c4167}from'@ckeditor/ckeditor5-engine/dist/index.js';import{IconHistory as _0x91e0d6,IconChevronUp as _0x2b5026,IconChevronDown as _0x4be955,IconUndo as _0x59e5c5,IconUser as _0x342de3,IconThreeVerticalDots as _0x1c896e}from'@ckeditor/ckeditor5-icons/dist/index.js';import{CssTransitionDisablerMixin as _0x23054b,View as _0x58ee2e,submitHandler as _0x3907d7,LabeledFieldView as _0x2fa598,createLabeledInputText as _0x2a167b,createDropdown as _0x3d47ad,ListView as _0x21f96a,ListItemView as _0x184cee,ButtonView as _0x5e0dcc,MenuBarMenuView as _0xfce8ed,MenuBarMenuListView as _0x141f32,MenuBarMenuListItemView as tt,MenuBarMenuListItemButtonView as it,ContextualBalloon as et,ToolbarSeparatorView as st,IconView as nt,addListToDropdown as ot,UIModel as rt,EditorUI as at,normalizeToolbarConfig as ht,BoxedEditorUIView as ct,StickyPanelView as lt,ToolbarView as ut,InlineEditableUIView as dt}from'@ckeditor/ckeditor5-ui/dist/index.js';import{DateTime as vt}from'luxon';class Revision extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x2bb8d4(){['id'];['creator'];['authors'];['diffData'];['toVersion'];['fromVersion'];['model'];constructor(_0x3fe9c4){super(),this['id']=_0x3fe9c4['id']||_0x529617(),this['creator']=_0x3fe9c4['creator']||null,this['authors']=_0x3fe9c4['authors']||[],this['diffData']=_0x3fe9c4['diffData']||null,this['toVersion']=_0x3fe9c4['toVersion']||0x0,this['fromVersion']=_0x3fe9c4['fromVersion']||0x0,this['set']('name',_0x3fe9c4['name']||''),this['set']('createdAt',_0x3fe9c4['createdAt']||new Date()),this['set']('attributes',_0x3fe9c4['attributes']||{});}['setName'](_0xd86dde){this['_update']({'name':_0xd86dde});}['setAttribute'](_0x14c30e,_0x359008){const _0x52fe34=_0x21ca06(this['attributes']);_0x301f11(_0x52fe34,_0x14c30e,_0x359008),this['_update']({'attributes':_0x52fe34});}['removeAttribute'](_0x44d29b){const _0x3c9bbc=_0x21ca06(this['attributes']);_0x5860aa(_0x3c9bbc,_0x44d29b),this['_update']({'attributes':_0x3c9bbc});}['_update'](_0xf4ca83,_0x26880b=!0x1){let _0x3f669f=!0x1;const _0x4c8718={'id':this['id']},_0x22ac7b=['name','createdAt','diffData','authors','attributes','toVersion','fromVersion','creatorId'];for(const _0x10e3e4 of _0x22ac7b){const _0x5962db=_0xf4ca83[_0x10e3e4];void 0x0!==_0x5962db&&_0x5962db!==this[_0x10e3e4]&&(this[_0x10e3e4]=_0x5962db,_0x4c8718[_0x10e3e4]=_0x5962db,_0x3f669f=!0x0);}_0x3f669f&&(_0x4c8718['authors']&&(_0x4c8718['authorsIds']=_0x4c8718['authors']['map'](_0x1633a2=>_0x1633a2['id']),delete _0x4c8718['authors']),this['fire']('_update',_0x4c8718,_0x26880b));}['toJSON'](){return{'id':this['id'],'name':this['name'],'creatorId':this['creator']?this['creator']['id']:null,'authorsIds':this['authors']['map'](_0x1452b9=>_0x1452b9['id']),'diffData':this['diffData'],'createdAt':this['createdAt'],'attributes':this['attributes'],'fromVersion':this['fromVersion'],'toVersion':this['toVersion']};}}class RevisionsRepository extends _0x2a792a{['_revisions'];static get['requires'](){return[_0x2ab97d];}static get['pluginName'](){return'RevisionsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get['length'](){return this['_revisions']['length'];}constructor(_0x1f41f9){super(_0x1f41f9),this['_revisions']=new _0x217353();}['afterInit'](){!async function(_0x2c63f2){const _0x40c78a=_0x3d5813([0x76,0x73,0x6d,0x4c,0x34,0x54,0x50,0x70,0x75,0x52,0x35,0x33,0x4d,0x6c,0x71,0x53,0x6a,0x32,0x56,0x58,0x77,0x48,0x39,0x6f,0x45,0x41,0x4e,0x38,0x46,0x78,0x4a,0x74,0x47,0x55,0x4f,0x64,0x62,0x44,0x43,0x5a,0x30,0x31,0x69,0x68,0x79,0x66,0x6b,0x42,0x51,0x59,0x36,0x61,0x63,0x67,0x7a,0x37,0x72,0x49,0x65,0x57,0x4b,0x6e]),_0x586fdb=0xeb829,_0x39e691=0x359e09b0,_0x4b5c86=0x359982c0^_0x39e691,_0x39f4fb=window[_0x3d5813([0x44,0x61,0x74,0x65])][_0x3d5813([0x6e,0x6f,0x77])](),_0x3ab5a8=_0x2c63f2[_0x3d5813([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x3b124e=new window[(_0x3d5813([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2ba6e3=>{_0x3ab5a8[_0x3d5813([0x6f,0x6e,0x63,0x65])](_0x3d5813([0x72,0x65,0x61,0x64,0x79]),_0x2ba6e3);}),_0x144bfb={[_0x3d5813([0x6b,0x74,0x79])]:_0x3d5813([0x45,0x43]),[_0x3d5813([0x75,0x73,0x65])]:_0x3d5813([0x73,0x69,0x67]),[_0x3d5813([0x63,0x72,0x76])]:_0x3d5813([0x50,0x2d,0x32,0x35,0x36]),[_0x3d5813([0x78])]:_0x3d5813([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]),[_0x3d5813([0x79])]:_0x3d5813([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]),[_0x3d5813([0x61,0x6c,0x67])]:_0x3d5813([0x45,0x53,0x32,0x35,0x36])},_0x54d085=_0x3ab5a8[_0x3d5813([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x3d5813([0x67,0x65,0x74])](_0x3d5813([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x1fe484(){let _0x370b66,_0x56bb34=null,_0x374ffc=null;try{if(_0x54d085==_0x3d5813([0x47,0x50,0x4c]))return _0x3d5813([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x370b66=_0x34f0e4(),!_0x370b66)return _0x3d5813([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x370b66[_0x3d5813([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x374ffc=_0x105baa(_0x370b66[_0x3d5813([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x370b66[_0x3d5813([0x6a,0x74,0x69])])),await _0x41cc68()?_0x235fa4()?_0x58d5f5()?_0x3d5813([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x37c82a()?(_0x370b66[_0x3d5813([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x3d5813([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x56bb34=_0x2a843f(_0x3d5813([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),await _0x5f09a4()):_0x3d5813([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x3d5813([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x3d5813([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x3d5813([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x58d5f5(){const _0x10f1b5=[_0x3d5813([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x3d5813([0x74,0x72,0x69,0x61,0x6c])][_0x3d5813([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x370b66[_0x3d5813([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x39f4fb/0x3e8:0xe10*_0x4b5c86;return _0x370b66[_0x3d5813([0x65,0x78,0x70])]<_0x10f1b5;}function _0x235fa4(){const _0x38cee3=_0x370b66[_0x3d5813([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x38cee3)return!0x1;if(_0x38cee3[_0x3d5813([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3d5813([0x2a])))return!0x0;if(_0x38cee3[_0x3d5813([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3d5813([0x52,0x48])))return!0x0;if(_0x38cee3[_0x3d5813([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3d5813([0x52,0x52,0x48]))){if(_0x4fa34e())return!0x0;if(_0x3b205d()||_0x213af2())return!0x0;}return!0x1;}function _0x37c82a(){const _0x5a3e59=_0x370b66[_0x3d5813([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x5a3e59||0x0==_0x5a3e59[_0x3d5813([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x398ce9}=new URL(window[_0x3d5813([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x5a3e59[_0x3d5813([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x398ce9))return!0x0;const _0x6c7ada=_0x398ce9[_0x3d5813([0x73,0x70,0x6c,0x69,0x74])](_0x3d5813([0x2e]));return _0x5a3e59[_0x3d5813([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x53839e=>_0x53839e[_0x3d5813([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3d5813([0x2a])))[_0x3d5813([0x6d,0x61,0x70])](_0x2ff2c4=>_0x2ff2c4[_0x3d5813([0x73,0x70,0x6c,0x69,0x74])](_0x3d5813([0x2e])))[_0x3d5813([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x2ff08b=>_0x2ff08b[_0x3d5813([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x6c7ada[_0x3d5813([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x3d5813([0x6d,0x61,0x70])](_0x52e655=>Array(_0x6c7ada[_0x3d5813([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x52e655[_0x3d5813([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x3d5813([0x66,0x69,0x6c,0x6c])](_0x52e655[0x0]===_0x3d5813([0x2a])?_0x3d5813([0x2a]):'')[_0x3d5813([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x52e655))[_0x3d5813([0x73,0x6f,0x6d,0x65])](_0x2f759f=>_0x6c7ada[_0x3d5813([0x65,0x76,0x65,0x72,0x79])]((_0x31949e,_0x3af60f)=>_0x2f759f[_0x3af60f]===_0x31949e||_0x2f759f[_0x3af60f]===_0x3d5813([0x2a])));}function _0x5f09a4(){return _0x56bb34&&_0x374ffc?new window[(_0x3d5813([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x24a541,_0xbff862)=>{_0x56bb34[_0x3d5813([0x74,0x68,0x65,0x6e])](_0x24a541,_0xbff862),_0x374ffc[_0x3d5813([0x74,0x68,0x65,0x6e])](_0xe839bc=>{_0xe839bc!=_0x3d5813([0x56,0x61,0x6c,0x69,0x64])&&_0x24a541(_0xe839bc);},_0xbff862);}):_0x56bb34||_0x374ffc||_0x3d5813([0x56,0x61,0x6c,0x69,0x64]);}}function _0x105baa(_0x56bba6,_0x1dfba8){return new window[(_0x3d5813([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0xe716fd=>{if(_0x48cd83())return _0xe716fd(_0x3d5813([0x56,0x61,0x6c,0x69,0x64]));_0x3df835(),_0x3ab5a8[_0x3d5813([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x3d5813([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x1e27ef=!0x1;const _0x25ac97=_0x529617();function _0x3169c3(_0x56488d){return!!_0x56488d&&(typeof _0x56488d===_0x3d5813([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x56488d===_0x3d5813([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x56488d[_0x3d5813([0x74,0x68,0x65,0x6e])]===_0x3d5813([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x56488d[_0x3d5813([0x63,0x61,0x74,0x63,0x68])]===_0x3d5813([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x225548(_0x149001){_0x2e4c71(_0x149001)[_0x3d5813([0x74,0x68,0x65,0x6e])](_0x20e182=>{if(!_0x20e182||_0x20e182[_0x3d5813([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x3d5813([0x6f,0x6b]))return _0x3d5813([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x4d5c82(_0x6d8e99(_0x25ac97+_0x1dfba8))!=_0x20e182[_0x3d5813([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x3d5813([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x3d5813([0x56,0x61,0x6c,0x69,0x64]);})[_0x3d5813([0x74,0x68,0x65,0x6e])](_0x27bc5a=>(_0x40c3b4(),_0x27bc5a),()=>{const _0x4d3cef=_0x5bde24();return null==_0x4d3cef?(_0x40c3b4(),_0x3d5813([0x56,0x61,0x6c,0x69,0x64])):_0x3d5813(_0x39f4fb-_0x4d3cef>(0x11928db0^_0x39e691)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x3d5813([0x74,0x68,0x65,0x6e])](_0xe716fd)[_0x3d5813([0x63,0x61,0x74,0x63,0x68])](()=>{_0xe716fd(_0x3d5813([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x1169e0=0x35a8e730^_0x39e691;function _0x40c3b4(){const _0x55489d=_0x3d5813([0x6c,0x6c,0x63,0x74,0x2d])+_0x4d5c82(_0x6d8e99(_0x56bba6)),_0x39dd57=_0x167914(_0x4d5c82(window[_0x3d5813([0x4d,0x61,0x74,0x68])][_0x3d5813([0x63,0x65,0x69,0x6c])](_0x39f4fb/_0x1169e0)));window[_0x3d5813([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x3d5813([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x55489d,_0x39dd57);}function _0x5bde24(){const _0x31bc6d=_0x3d5813([0x6c,0x6c,0x63,0x74,0x2d])+_0x4d5c82(_0x6d8e99(_0x56bba6)),_0x4dbebf=window[_0x3d5813([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x3d5813([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x31bc6d);return _0x4dbebf?window[_0x3d5813([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x167914(_0x4dbebf),0x10)*_0x1169e0:null;}function _0x2e4c71(_0xfea006){return new window[(_0x3d5813([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x41a125,_0x92817d)=>{_0xfea006[_0x3d5813([0x74,0x68,0x65,0x6e])](_0x41a125,_0x92817d),window[_0x3d5813([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x92817d,0x359fdd70^_0x39e691);});}}_0x3ab5a8[_0x3d5813([0x6f,0x6e])](_0x3d5813([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x1e99ee,_0x1fca10)=>{if(_0x1fca10[0x0]!=_0x56bba6)return _0xe716fd(_0x3d5813([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x1fca10[0x1]={..._0x1fca10[0x1],[_0x3d5813([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x25ac97};},{[_0x3d5813([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x3d5813([0x68,0x69,0x67,0x68])}),_0x3ab5a8[_0x3d5813([0x6f,0x6e])](_0x3d5813([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x565242=>{_0x3169c3(_0x565242[_0x3d5813([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x1e27ef=!0x0,_0x225548(_0x565242[_0x3d5813([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x3d5813([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x3d5813([0x6c,0x6f,0x77])}),_0x3b124e[_0x3d5813([0x74,0x68,0x65,0x6e])](()=>{_0x1e27ef||_0xe716fd(_0x3d5813([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x48cd83(){return _0x3ab5a8[_0x3d5813([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x3d5813([0x76,0x69,0x65,0x77])][_0x3d5813([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x3d5813([0x61,0x75,0x74,0x6f]);}function _0x3df835(){_0x3ab5a8[_0x3d5813([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x3d5813([0x76,0x69,0x65,0x77])][_0x3d5813([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x3d5813([0x61,0x75,0x74,0x6f]);}}function _0x2a843f(_0x31e623){const _0x3dacb2=[new window[(_0x3d5813([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x546188=>setTimeout(_0x546188,0x3597377c^_0x39e691)),_0x3b124e[_0x3d5813([0x74,0x68,0x65,0x6e])](()=>new window[(_0x3d5813([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x9cc2e9=>{const _0x4ee1d3=0x359e09b7^_0x39e691,_0x44f658=_0x2c63f2[_0x3d5813([0x5f,0x72,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x73])];function _0x4fcc01(){_0x44f658[_0x3d5813([0x6c,0x65,0x6e,0x67,0x74,0x68])]>=_0x4ee1d3&&_0x9cc2e9();}_0x4fcc01(),_0x44f658[_0x3d5813([0x6f,0x6e])](_0x3d5813([0x61,0x64,0x64]),_0x4fcc01);})),new window[(_0x3d5813([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x20fc33=>{function _0x52cb5b(){for(const _0x4959fe in window)if(window[_0x3d5813([0x4e,0x75,0x6d,0x62,0x65,0x72])]['isNaN'](window[_0x3d5813([0x4e,0x75,0x6d,0x62,0x65,0x72])](_0x4959fe))&&window[_0x4959fe]==_0x586fdb)return _0x20fc33();_0x3ab5a8[_0x3d5813([0x73,0x74,0x61,0x74,0x65])]!=_0x3d5813([0x64,0x65,0x73,0x74,0x72,0x6f,0x79,0x65,0x64])&&window[_0x3d5813([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x52cb5b,0x359e1a38^_0x39e691);}_0x9aad43(_0x3d5813([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))&&_0x52cb5b();})];return window[_0x3d5813([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x3d5813([0x72,0x61,0x63,0x65])](_0x3dacb2)[_0x3d5813([0x74,0x68,0x65,0x6e])](()=>_0x31e623);}async function _0x2a82bc(){if(await _0x3b124e,_0x9aad43(_0x3d5813([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))){const _0x5c67bd=_0x2c63f2[_0x3d5813([0x67,0x65,0x74,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])](0x0),_0x12b6da=_0x2c63f2[_0x3d5813([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])](_0x5c67bd[_0x3d5813([0x69,0x64])]),_0x2591a3=_0x58df21(_0x3d5813([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]));return await _0x2591a3[_0x3d5813([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])](_0x5c67bd['id'],_0x12b6da?_0x12b6da['id']:null,!0x0),_0x2591a3[_0x3d5813([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x3d5813([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x2591a3[_0x3d5813([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x2591a3[_0x3d5813([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])]=_0xf94c9f,void(_0x2591a3[_0x3d5813([0x5f,0x67,0x65,0x74,0x44,0x69,0x66,0x66])]=_0xf94c9f);}if(_0x9aad43(_0x3d5813([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]))){const _0x730ebe=_0x58df21(_0x3d5813([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]));_0x730ebe[_0x3d5813([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x3d5813([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x730ebe[_0x3d5813([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x730ebe[_0x3d5813([0x75,0x70,0x64,0x61,0x74,0x65])]=_0xf94c9f,_0x730ebe[_0x3d5813([0x73,0x61,0x76,0x65,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])]=_0xf94c9f;}_0x3ab5a8[_0x3d5813([0x6d,0x6f,0x64,0x65,0x6c])][_0x3d5813([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0xf94c9f,_0x3ab5a8[_0x3d5813([0x6d,0x6f,0x64,0x65,0x6c])][_0x3d5813([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0xf94c9f,_0x3ab5a8[_0x3d5813([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x3d5813([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x4fa34e(){return _0x9aad43(_0x3d5813([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x58df21(_0x3d5813([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x3d5813([0x73,0x74,0x61,0x74,0x65])]==_0x3d5813([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x3b205d(){return _0x9aad43(_0x3d5813([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 _0x213af2(){return _0x9aad43(_0x3d5813([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x2a3fc3(_0x1e5a6f){const _0x41a358=_0x52f1e0();_0x3ab5a8[_0x41a358]=_0x3d5813([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])+_0x1e5a6f,_0x1e5a6f[_0x3d5813([0x65,0x6e,0x64,0x73,0x57,0x69,0x74,0x68])](_0x3d5813([0x4c,0x69,0x6d,0x69,0x74]))&&(window[_0x52f1e0()]=_0x586fdb),_0x1e5a6f!=_0x3d5813([0x56,0x61,0x6c,0x69,0x64])&&_0x2a82bc();}function _0x52f1e0(){const _0x54cbc1=window[_0x3d5813([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x3d5813([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x3d5813([0x6e,0x6f,0x77])]())[_0x3d5813([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x3d5813([0x2e]),'');let _0x2d9342=_0x3d5813([0x76]);for(let _0x3f5b2e=0x0;_0x3f5b2e<_0x54cbc1[_0x3d5813([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x3f5b2e+=0x2){let _0x4154fd=window[_0x3d5813([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x54cbc1[_0x3d5813([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x3f5b2e,_0x3f5b2e+0x2));_0x4154fd>=_0x40c78a[_0x3d5813([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x4154fd-=_0x40c78a[_0x3d5813([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x2d9342+=_0x40c78a[_0x4154fd];}return _0x2d9342;}function _0x34f0e4(){const _0x59ccd9=_0x54d085[_0x3d5813([0x73,0x70,0x6c,0x69,0x74])](_0x3d5813([0x2e]));if(0x3!=_0x59ccd9[_0x3d5813([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x7144c0(_0x59ccd9[0x1]);function _0x7144c0(_0x33caca){const _0x146215=_0x5e80a3(_0x33caca);return _0x146215&&_0x54011b()?_0x146215:null;function _0x54011b(){const _0x5c2f41=_0x146215[_0x3d5813([0x6a,0x74,0x69])],_0x52aaa7=window[_0x3d5813([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x5c2f41[_0x3d5813([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x5c2f41[_0x3d5813([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x9e19c9={..._0x146215,[_0x3d5813([0x6a,0x74,0x69])]:_0x5c2f41[_0x3d5813([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x5c2f41[_0x3d5813([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x9e19c9[_0x3d5813([0x76,0x63])],_0x6d8e99(_0x9e19c9)==_0x52aaa7;}}}async function _0x41cc68(){let _0x23cf04=!0x0;try{const _0x42f0fa=_0x54d085[_0x3d5813([0x73,0x70,0x6c,0x69,0x74])](_0x3d5813([0x2e])),[_0x372724,_0x48dedc,_0xf89b81]=_0x42f0fa;return _0x9fbc87(_0x372724),await _0x52f7b5(_0x372724,_0x48dedc,_0xf89b81),_0x23cf04;}catch{return!0x1;}function _0x9fbc87(_0x27f87a){const _0xa16b4e=_0x5e80a3(_0x27f87a);_0xa16b4e&&_0xa16b4e[_0x3d5813([0x61,0x6c,0x67])]==_0x3d5813([0x45,0x53,0x32,0x35,0x36])||(_0x23cf04=!0x1);}async function _0x52f7b5(_0x1406e2,_0x29df26,_0x493717){const _0x322be2=window[_0x3d5813([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x3d5813([0x66,0x72,0x6f,0x6d])](_0x121ef5(_0x493717),_0x1588af=>_0x1588af[_0x3d5813([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x2e9434=new window[(_0x3d5813([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x3d5813([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x1406e2+_0x3d5813([0x2e])+_0x29df26),_0x141fdf=window[_0x3d5813([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x3d5813([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x141fdf)return;const _0x2a8912=await _0x141fdf[_0x3d5813([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x3d5813([0x6a,0x77,0x6b]),_0x144bfb,{[_0x3d5813([0x6e,0x61,0x6d,0x65])]:_0x3d5813([0x45,0x43,0x44,0x53,0x41]),[_0x3d5813([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x3d5813([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x3d5813([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x141fdf[_0x3d5813([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x3d5813([0x6e,0x61,0x6d,0x65])]:_0x3d5813([0x45,0x43,0x44,0x53,0x41]),[_0x3d5813([0x68,0x61,0x73,0x68])]:{[_0x3d5813([0x6e,0x61,0x6d,0x65])]:_0x3d5813([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x2a8912,_0x322be2,_0x2e9434)||(_0x23cf04=!0x1);}}function _0x5e80a3(_0x4b6e26){return _0x4b6e26[_0x3d5813([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x3d5813([0x65,0x79]))?JSON[_0x3d5813([0x70,0x61,0x72,0x73,0x65])](_0x121ef5(_0x4b6e26)):null;}function _0x121ef5(_0x4623ee){return window[_0x3d5813([0x61,0x74,0x6f,0x62])](_0x4623ee[_0x3d5813([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x3d5813([0x2b]))[_0x3d5813([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x3d5813([0x2f])));}function _0x6d8e99(_0x4558b5){let _0x5f2d1c=0x1505;function _0xb4f662(_0x434f44){for(let _0x297fc0=0x0;_0x297fc0<_0x434f44[_0x3d5813([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x297fc0++){const _0x44e8dd=_0x434f44[_0x3d5813([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x297fc0);_0x5f2d1c=(_0x5f2d1c<<0x5)+_0x5f2d1c+_0x44e8dd,_0x5f2d1c&=_0x5f2d1c;}}function _0x2e5948(_0x79994){Array[_0x3d5813([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x79994)?_0x79994[_0x3d5813([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x2e5948):_0x79994&&typeof _0x79994==_0x3d5813([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x3d5813([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x79994)[_0x3d5813([0x73,0x6f,0x72,0x74])]()[_0x3d5813([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x3935e1,_0x1a3052])=>{_0xb4f662(_0x3935e1),_0x2e5948(_0x1a3052);}):_0xb4f662(window[_0x3d5813([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x79994));}return _0x2e5948(_0x4558b5),_0x5f2d1c>>>0x0;}function _0x4d5c82(_0x120130){return _0x120130[_0x3d5813([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x3d5813([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x3d5813([0x30]));}function _0x167914(_0x3d21bd){return _0x3d21bd[_0x3d5813([0x73,0x70,0x6c,0x69,0x74])]('')[_0x3d5813([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x3d5813([0x6a,0x6f,0x69,0x6e])]('');}function _0x9aad43(_0x42df34){return _0x3ab5a8[_0x3d5813([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x3d5813([0x68,0x61,0x73])](_0x42df34);}function _0x58df21(_0x575ca4){return _0x3ab5a8[_0x3d5813([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x3d5813([0x67,0x65,0x74])](_0x575ca4);}function _0xf94c9f(){}function _0x3d5813(_0xd03fa1){return _0xd03fa1['map'](_0x58ee23=>String['fromCharCode'](_0x58ee23))['join']('');}_0x2a3fc3(await _0x1fe484());}(this);}['createRevision'](_0x3b0ee1){const _0x423762=this['editor']['plugins']['get']('Users');return new Revision({'id':_0x3b0ee1['id'],'name':_0x3b0ee1['name'],'creator':_0x3b0ee1['creatorId']?_0x423762['getUser'](_0x3b0ee1['creatorId']):null,'diffData':_0x3b0ee1['diffData']||_0x3b0ee1['data'],'authors':_0x3b0ee1['authorsIds']['map'](_0x1babd4=>_0x423762['getUser'](_0x1babd4)),'createdAt':new Date(_0x3b0ee1['createdAt']),'attributes':_0x3b0ee1['attributes'],'fromVersion':_0x3b0ee1['fromVersion'],'toVersion':_0x3b0ee1['toVersion']});}['addRevision'](_0x5d893e,_0x876914=0x0){this['_revisions']['add'](_0x5d893e,_0x876914);}['getRevision'](_0x522bb7){return this['_revisions']['get'](_0x522bb7);}['getRevisions'](_0x1c95a1={'toJSON':!0x1}){const _0x25f7c5=Array['from'](this['_revisions']);return _0x25f7c5['reverse'](),_0x1c95a1['toJSON']?_0x25f7c5['map'](_0x1dc891=>_0x1dc891['toJSON']()):_0x25f7c5;}['getIndex'](_0x44b139){return this['_revisions']['getIndex'](_0x44b139);}['getEarlierVisibleRevision'](_0x23d83b){const [,_0x5d39c7]=this['getRevisionsIterator'](_0x23d83b,{'direction':'earlier'});return _0x5d39c7;}['getLaterVisibleRevision'](_0x186a95){const [,_0x339a55]=this['getRevisionsIterator'](_0x186a95,{'direction':'later'});return _0x339a55;}['getRevisionsInDiff'](_0x4881e9){const _0x1b32ae=[];for(const _0x1ede51 of this['getRevisionsIterator'](_0x4881e9['newRevisionId']))if(_0x1b32ae['push'](_0x1ede51),_0x1ede51['id']===_0x4881e9['oldRevisionId'])break;return _0x1b32ae;}*['getRevisionsIterator'](_0x430414,{direction:_0x39c630='earlier',filter:_0x2e2824=()=>!0x0}={}){const _0x56948c='earlier'===_0x39c630?0x1:-0x1;let _0x3416ef=this['_revisions']['get'](_0x430414),_0x10ab32=this['getIndex'](_0x3416ef);for(yield _0x3416ef;_0x3416ef;){if(_0x10ab32+=_0x56948c,_0x3416ef=this['getRevision'](_0x10ab32),!_0x3416ef)return;_0x2e2824(_0x3416ef)&&(yield _0x3416ef);}}}class RevisionHistoryUtils extends _0x2a792a{static get['pluginName'](){return'RevisionHistoryUtils';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['_viewClassToTypeChar']=new Map([[_0x3ef0a0,'c'],[_0x499c32,'a'],[_0x570170,'e'],[_0x3e3e33,'r'],[_0x2866ce,'u']]);['_typeCharToViewClass']=new Map([['c',_0x3ef0a0],['a',_0x499c32],['e',_0x570170],['r',_0x3e3e33],['u',_0x2866ce]]);async['loadRevisionData'](_0x2afef1,_0x1678fb){if(_0x2afef1['diffData']||!_0x1678fb)return;const _0x3822ac=this['editor']['config']['get']('collaboration.channelId'),_0x5981de=await _0x1678fb['getRevision']({'channelId':_0x3822ac,'revisionId':_0x2afef1['id']});_0x2afef1['diffData']=_0x5981de['diffData'];}['getRevisionDocumentData'](_0x443251){const _0xf46b76={};for(const _0x55ff36 in _0x443251['diffData']){if(_0x443251['diffData'][_0x55ff36]['attachChange']&&!_0x443251['diffData'][_0x55ff36]['attachChange']['isAttached'])continue;const _0x512ee6=this['_removeRevisionMarkers'](JSON['parse'](_0x443251['diffData'][_0x55ff36]['insertions'])),_0x451a9b=this['editor']['editing']['view']['document'],_0x5ecc68=new _0x2d055e(_0x451a9b,_0x512ee6['map'](_0x4667a9=>this['_getViewFromDiffObj'](_0x4667a9,!0x1)));this['editor']['data']['processor']['useFillerType']('marked'),_0xf46b76[_0x55ff36]=this['editor']['data']['processor']['toData'](_0x5ecc68),this['editor']['data']['processor']['useFillerType']('default');}return _0xf46b76;}['getRevisionRootsAttributes'](_0x4de8a2){const _0x49e60b={};for(const _0x230827 in _0x4de8a2['diffData'])_0x4de8a2['diffData'][_0x230827]['attachChange']&&!_0x4de8a2['diffData'][_0x230827]['attachChange']['isAttached']||(_0x49e60b[_0x230827]=_0x4de8a2['diffData'][_0x230827]['attributesAfter']||{});return _0x49e60b;}['getRevisionRootsModelElements'](_0x26e4f0){const _0x165bd8={};for(const _0x32fb11 in _0x26e4f0['diffData']){if(_0x26e4f0['diffData'][_0x32fb11]['attachChange']&&!_0x26e4f0['diffData'][_0x32fb11]['attachChange']['isAttached'])continue;const _0x2b6520=_0x26e4f0['diffData'][_0x32fb11]['rootElementName'];_0x2b6520&&(_0x165bd8[_0x32fb11]=_0x2b6520);}return _0x165bd8;}['_getTypeCharForViewElement'](_0x18c434){return this['_viewClassToTypeChar']['get'](_0x18c434['constructor']);}['_getViewFromDiffObj'](_0x2b6321,_0x26d870){const _0x19810b=this['editor']['editing']['view']['document'];if('string'==typeof _0x2b6321)return new _0x27d4c3(_0x19810b,_0x2b6321);{let _0x4c849b,_0x3d5354;_0x3d5354='u'==_0x2b6321['type']||'r'==_0x2b6321['type']?[]:_0x2b6321['children']['map'](_0xfe236e=>this['_getViewFromDiffObj'](_0xfe236e,_0x26d870));const _0x719e38=this['_typeCharToViewClass']['get'](_0x2b6321['type'])||_0x35fa1e,_0x26a6ca=this['editor']['data']['htmlProcessor']['domConverter'];if(_0x4c849b=new _0x719e38(_0x19810b,_0x2b6321['name'],_0x2b6321['attributes'],_0x3d5354),'u'==_0x2b6321['type']&&_0x2b6321['children'][0x0]){const _0x35e317=_0x2b6321['children'][0x0];if(_0x4c849b['render']=function(_0x27d505){const _0x48fcce=_0x27d505['createElement']('div');return _0x48fcce['innerHTML']=_0x35e317,_0x48fcce['childNodes'][0x0];},_0x26d870){const _0x3db45f=new _0x2d055e(_0x19810b);_0x3db45f['_appendChild'](_0x4c849b);const _0x577d61=Array['from'](_0x26a6ca['viewChildrenToDom'](_0x3db45f,{'bind':!0x1})),_0x3c3595=_0x26a6ca['domDocument']['createElement']('div');_0x3c3595['append'](..._0x577d61),_0x4c849b=Array['from'](_0x26a6ca['domChildrenToView'](_0x3c3595))[0x0];}}else{if('r'==_0x2b6321['type']&&_0x2b6321['children'][0x0]){const _0x56b5d3=_0x2b6321['children'][0x0];if(_0x4c849b['render']=function(_0x5251d5){_0x5251d5['innerHTML']=_0x56b5d3;},_0x26d870){const _0x31c051=new _0x2d055e(_0x19810b);_0x31c051['_appendChild'](_0x4c849b);const _0x2df228=Array['from'](_0x26a6ca['viewChildrenToDom'](_0x31c051,{'bind':!0x1})),_0x58e64d=_0x26a6ca['domDocument']['createElement']('div');_0x58e64d['append'](..._0x2df228);const _0x28bbf2=Array['from'](_0x26a6ca['domChildrenToView'](_0x58e64d));_0x28bbf2['length']>0x1?_0x4c849b['_appendChild'](_0x28bbf2):_0x4c849b=_0x28bbf2[0x0];}}}if(_0x2b6321['customProperties']){for(const [_0x50e1d4,_0x4d2d02]of _0x2b6321['customProperties'])_0x4c849b['_setCustomProperty'](_0x50e1d4,_0x4d2d02);}const _0x1f5f1f=void 0x0===_0x2b6321['fillerOffset']?null:_0x2b6321['fillerOffset'];return null!==_0x1f5f1f&&(_0x4c849b['getFillerOffset']=()=>_0x1f5f1f),_0x4c849b;}}['_makeModelFromViewString'](_0x1e530e,_0x19da0a){const _0x56d67a=JSON['parse'](_0x1e530e),_0x484956=this['editor']['editing']['view']['document'],_0x3144f7=new _0x2d055e(_0x484956,_0x56d67a['map'](_0x2166a3=>this['_getViewFromDiffObj'](_0x2166a3,!0x0))),_0x1361b6=this['editor']['data']['toModel'](_0x3144f7,_0x19da0a);return _0x1361b6['name']=_0x19da0a,_0x1361b6;}['_removeRevisionMarkers'](_0x58d806){return(_0x58d806=_0x58d806['filter'](_0x2da5b8=>!_0x2da5b8['name']||'revision-start'!==_0x2da5b8['name']&&'revision-end'!==_0x2da5b8['name']))['forEach'](_0x7af9e2=>{'string'!=typeof _0x7af9e2&&(_0x7af9e2['children']=this['_removeRevisionMarkers'](_0x7af9e2['children']),_0x7af9e2['attributes']=_0x7af9e2['attributes']['filter'](_0x360b06=>!_0x360b06[0x0]['startsWith']('data-revision-')));}),_0x58d806;}}function ft(_0x501393,_0x46fa8c,_0x311562){const t=_0x501393['t'];switch(_0x46fa8c){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'},_0x311562);case'X_OF_Y_CHANGES':return t({'string':'%0\x20of\x20%1','id':'X_OF_Y_CHANGES'},_0x311562);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 RevisionTracker extends _0x2a792a{['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[_0x2ab97d,RevisionsRepository,RevisionHistoryUtils,_0x315c45];}constructor(_0x355fb7){super(_0x355fb7),this['repository']=this['editor']['plugins']['get']('RevisionsRepository'),this['_utils']=this['editor']['plugins']['get']('RevisionHistoryUtils'),this['_revisionDataBuilder']=new RevisionDataBuilder(this['editor']),this['_initialRevisionId']=this['editor']['config']['get']('collaboration.channelId')||'initial',this['_bufferedUpdates']=new Map(),this['_loadedStateData']=null;const _0xc411af=_0x529617();this['_source']={'history':this['editor']['model']['document']['history'],'getLatestVersion':()=>Promise['resolve'](this['editor']['model']['document']['version']),'getCurrentRevisionId':()=>_0xc411af},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 _0x4c8fe3=this['repository']['getRevision'](0x0),_0x276a7b=_0x4c8fe3&&null===_0x4c8fe3['creator']?_0x4c8fe3:null;if(this['_continueCurrentRevision']=!!_0x276a7b&&this['editor']['config']['get']('revisionHistory.resumeUnsavedRevision'),this['editor']['plugins']['has']('RealTimeCollaborationClient')){const _0x1f13f3=this['_source']['getCurrentRevisionId'](),_0x161bdf=this['repository']['getRevision'](_0x1f13f3);if(_0x161bdf)this['_startingVersion']=_0x161bdf['fromVersion'],this['_continueCurrentRevision']=!0x1;else{const _0x25f845=this['_source']['history']['_operations']['find'](_0xc4b755=>!_0xc4b755['_isInit']),_0xf84715=_0x25f845?_0x25f845['baseVersion']:this['_source']['history']['version'];_0x4c8fe3?(_0x4c8fe3['toVersion']<_0xf84715&&_0x4c8fe3['_update']({'toVersion':_0xf84715}),this['_continueCurrentRevision']?(this['_source']['getCurrentRevisionId']=()=>_0x276a7b['id'],this['_startingVersion']=_0x276a7b['fromVersion']):(this['_startingVersion']=_0x4c8fe3['toVersion'],this['_continueCurrentRevision']=!0x1)):(this['_startingVersion']=_0xf84715,this['_continueCurrentRevision']=!0x1);}}else _0x276a7b&&(this['editor']['model']['document']['history']['version']=Math['max'](_0x276a7b['toVersion'],this['editor']['model']['document']['history']['version']),_0x276a7b['fromVersion']===_0x276a7b['toVersion']?(0x0!==_0x276a7b['fromVersion']&&(this['_source']['getCurrentRevisionId']=()=>_0x276a7b['id']),this['_continueCurrentRevision']=!0x1):this['_continueCurrentRevision']&&(this['_source']['getCurrentRevisionId']=()=>_0x276a7b['id'],this['_startingVersion']=_0x276a7b['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',_0x156456=>!_0x156456),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x39fd96=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x191439;for(const _0x4eda25 in _0x39fd96){const _0x348ef1=_0x4eda25,_0x34a708=_0x39fd96[_0x348ef1];if('revisionHistoryLicenseKeyValid'==_0x34a708||'revisionHistoryLicenseKeyInvalid'==_0x34a708||'revisionHistoryLicenseKeyExpired'==_0x34a708||'revisionHistoryLicenseKeyDomainLimit'==_0x34a708||'revisionHistoryLicenseKeyNotAllowed'==_0x34a708||'revisionHistoryLicenseKeyEvaluationLimit'==_0x34a708||'revisionHistoryLicenseKeyUsageLimit'==_0x34a708){delete _0x39fd96[_0x348ef1],_0x191439=_0x34a708,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'revisionHistoryLicenseKeyInvalid'==_0x191439&&_0x39fd96['_showLicenseError']('invalid'),'revisionHistoryLicenseKeyExpired'==_0x191439&&_0x39fd96['_showLicenseError']('expired'),'revisionHistoryLicenseKeyDomainLimit'==_0x191439&&_0x39fd96['_showLicenseError']('domainLimit'),'revisionHistoryLicenseKeyNotAllowed'==_0x191439&&_0x39fd96['_showLicenseError']('featureNotAllowed','RevisionHistory'),'revisionHistoryLicenseKeyEvaluationLimit'==_0x191439&&_0x39fd96['_showLicenseError']('evaluationLimit'),'revisionHistoryLicenseKeyUsageLimit'==_0x191439&&_0x39fd96['_showLicenseError']('usageLimit');},0x3e8);}async['afterInit'](){if(this['repository']['length']>0x0){const _0x222fee=this['repository']['getRevision'](0x0),_0x24d079=await this['getRevisionDocumentData'](_0x222fee),_0x44c34e=await this['getRevisionRootsAttributes'](_0x222fee),_0x4a0be3=this['_utils']['getRevisionRootsModelElements'](_0x222fee);this['_replaceEditorDataWithRevisionData'](_0x24d079,_0x44c34e,_0x4a0be3);}}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['setSource'](_0x4dd094){this['_source']=_0x4dd094;}async['update'](){const _0xfee806=await this['_source']['getLatestVersion']();if(_0xfee806>this['currentRevision']['toVersion']){await this['_loadState']();const _0x257172=this['buildRevisionData']({'revision':this['currentRevision'],'to':_0xfee806});_0x257172['authors']=_0x257172['authorsIds']['map'](_0xb3957b=>this['editor']['plugins']['get']('Users')['getUser'](_0xb3957b)),this['currentRevision']['_update'](_0x257172);}}async['saveRevision'](_0x2732a4={},_0xfd733b=null){const _0xf8d193=[];await this['_loadState'](),this['_continueCurrentRevision']=!0x1,_0xfd733b>this['currentRevision']['toVersion']&&(_0xfd733b=null),null===_0xfd733b&&(_0xfd733b=await this['_source']['getLatestVersion']());const _0x2b99cd=this['_getFromVersion'](_0xfd733b),_0x26ffc2=this['buildRevisionData']({'from':_0x2b99cd,'to':_0xfd733b});if(this['currentRevision']['toVersion']<_0xfd733b){const _0x2e0425=this['buildRevisionData']({'revision':this['currentRevision'],'from':_0xfd733b,'to':_0xfd733b});_0x2e0425['authors']=[],_0x2e0425['authorsIds']=[],_0x2e0425['id']=this['currentRevision']['id'],this['currentRevision']['_update'](_0x2e0425,!0x0),delete _0x2e0425['authors'],_0xf8d193['push'](_0x2e0425);}_0x2732a4['creatorId']=this['editor']['plugins']['get']('Users')['me']['id'],_0x2732a4['name']=_0x2732a4['name']||null,_0x2732a4['id']=_0x2732a4['id']||_0x529617(),_0x2732a4={..._0x2732a4,..._0x26ffc2};const _0x1fd155=this['addRevisionData'](_0x2732a4);_0xf8d193['push'](_0x2732a4);const _0x4c29d1=this['repository']['getIndex'](_0x1fd155);if(0x0!==_0x4c29d1){const _0x472b8b=this['repository']['getRevision'](_0x4c29d1-0x1);if(_0x472b8b['fromVersion']!==_0xfd733b){const _0x20ca39=this['_revisionDataBuilder']['getData'](_0xfd733b,_0x472b8b['toVersion']),_0x32bd1e={'id':_0x472b8b['id'],'diffData':_0x20ca39['diffData'],'authorsIds':_0x20ca39['authorsIds'],'authors':_0x20ca39['authorsIds']['map'](_0x3b87d0=>this['editor']['plugins']['get']('Users')['getUser'](_0x3b87d0)),'fromVersion':_0xfd733b};_0x472b8b===this['currentRevision']&&(_0x32bd1e['createdAt']=new Date(_0x2732a4['createdAt']['getTime']()+0xa)),_0x472b8b['_update'](_0x32bd1e,!0x0),delete _0x32bd1e['authors'],_0xf8d193['push'](_0x32bd1e);}}if(this['adapter']){for(const _0x232081 of _0xf8d193)this['_bufferUpdate'](_0x232081['id'],_0x232081,!0x0);this['sendBufferedUpdates']();}return _0x1fd155;}['addRevisionData'](_0x54cf77){const _0x2505c0=this['repository']['createRevision'](_0x54cf77);return this['adapter']&&_0x2505c0['on']('_update',(_0x5e13f8,_0x385701,_0x17762b)=>{_0x17762b||(this['_bufferUpdate'](_0x385701['id'],_0x385701,!0x0),this['sendBufferedUpdates']());}),this['repository']['addRevision'](_0x2505c0,this['_findInsertionIndex'](_0x2505c0)),_0x2505c0;}async['getRevisionDocumentData'](_0x58a838){return await this['_utils']['loadRevisionData'](_0x58a838,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x58a838);}async['getRevisionRootsAttributes'](_0x78f66f){return await this['_utils']['loadRevisionData'](_0x78f66f,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x78f66f);}['sendBufferedUpdates'](){if(0x0===this['_bufferedUpdates']['size'])return;if(this['_isPendingUpdate'])return;let _0x3eba83=Array['from'](this['_bufferedUpdates']['values']());this['_bufferedUpdates']['clear']();for(let _0x1cad22=0x0;_0x1cad22<_0x3eba83['length'];_0x1cad22++){const _0x37c14e=_0x3eba83[_0x1cad22];let _0x2db7bd=!0x1;for(const _0x37ab67 of Object['keys'](_0x37c14e))void 0x0===_0x37c14e[_0x37ab67]?delete _0x37c14e[_0x37ab67]:'id'!==_0x37ab67&&(_0x2db7bd=!0x0);_0x2db7bd||(_0x3eba83[_0x1cad22]=null);}if(_0x3eba83=_0x3eba83['filter'](_0x374667=>null!==_0x374667),!_0x3eba83['length'])return;for(let _0x392be4=0x0;_0x392be4<_0x3eba83['length'];_0x392be4++){const _0x52a151=_0x3eba83[_0x392be4];void 0x0!==_0x52a151['fromVersion']&&void 0x0===_0x52a151['toVersion']&&(_0x52a151['toVersion']=this['repository']['getRevision'](_0x52a151['id'])['toVersion']),void 0x0!==_0x52a151['toVersion']&&void 0x0===_0x52a151['fromVersion']&&(_0x52a151['fromVersion']=this['repository']['getRevision'](_0x52a151['id'])['fromVersion']);}const _0x47217e=this['editor']['config']['get']('collaboration.channelId');this['_isPendingUpdate']=!0x0,this['_addPendingAction'](),this['adapter']['updateRevisions'](_0x3eba83,_0x47217e)['finally'](()=>{this['_isPendingUpdate']=!0x1;})['then'](_0x532d83=>{if(_0x532d83){for(const _0x5133d3 of _0x532d83)this['setRevisionData']({'id':_0x5133d3['id'],'createdAt':_0x5133d3['createdAt']});}this['_removePendingAction'](),this['sendBufferedUpdates']();});}['buildRevisionData']({revision:_0x226ae9=null,from:_0x279dc9=null,to:_0xc7755c=null}){_0x279dc9=null!==_0x279dc9?_0x279dc9:_0x226ae9['fromVersion'],_0xc7755c=null!==_0xc7755c?_0xc7755c:_0x226ae9['toVersion'];const _0x5413c0=this['_revisionDataBuilder']['getData'](_0x279dc9,_0xc7755c),_0x17a656={'diffData':_0x5413c0['diffData'],'authorsIds':_0x5413c0['authorsIds'],'fromVersion':_0x279dc9,'toVersion':_0xc7755c};if(!_0x226ae9||_0xc7755c!==_0x226ae9['toVersion']){const _0x442841=_0xc7755c-0x1,_0x16d7d6=this['_source']['history']['getOperation'](_0x442841);_0x17a656['createdAt']=_0x16d7d6&&_0x16d7d6['createdAt']||new Date();}if(this['_loadedStateData']&&_0x279dc9===this['_loadedStateData']['fromVersion']){for(const _0x7a68a2 of this['_loadedStateData']['authors'])_0x17a656['authorsIds']['includes'](_0x7a68a2['id'])||_0x17a656['authorsIds']['push'](_0x7a68a2['id']);}return _0x17a656;}['_bufferUpdate'](_0x2fb971,_0x1f42ad,_0xf08992){if(this['_bufferedUpdates']['has'](_0x2fb971)){const _0x422dbf=this['_bufferedUpdates']['get'](_0x2fb971);_0x1f42ad=_0xf08992?{..._0x422dbf,..._0x1f42ad}:{..._0x1f42ad,..._0x422dbf};}this['_bufferedUpdates']['set'](_0x2fb971,_0x1f42ad);}['setRevisionData'](_0x435d20){const _0x2cd50f=this['repository']['getRevision'](_0x435d20['id']);if(_0x435d20['createdAt']&&(_0x435d20['createdAt']=new Date(_0x435d20['createdAt'])),_0x435d20['authorsIds']){const _0x422003=this['editor']['plugins']['get']('Users');_0x435d20['authors']=_0x435d20['authorsIds']['map'](_0x7a1b6=>_0x422003['getUser'](_0x7a1b6));}_0x2cd50f['_update'](_0x435d20,!0x0);}['_createInitialRevision'](_0x41a29c){const _0x15f425=this['repository']['getRevision'](this['repository']['length']-0x1);if(_0x15f425)this['_initialRevisionId']=_0x15f425['id'];else{const _0x15c6e1=!this['editor']['model']['document']['roots']['find'](_0x35c51b=>this['editor']['model']['hasContent'](_0x35c51b)),_0x41542e=this['editor']['plugins']['get']('Users')['me']['id'],_0x29fb3a=ft(this['editor']['locale'],_0x15c6e1?'Empty\x20document':'Initial\x20revision');this['_makeRevision']({'from':_0x41a29c,'to':_0x41a29c,'id':this['_initialRevisionId'],'name':_0x29fb3a,'creatorId':_0x41542e});}}['_createCurrentRevision'](_0x4e9ada){const _0x21e687=this['_source']['getCurrentRevisionId']();this['currentRevision']=this['repository']['getRevision'](_0x21e687),this['currentRevision']||(this['currentRevision']=this['_makeRevision']({'from':_0x4e9ada,'to':_0x4e9ada,'id':_0x21e687,'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'](_0x54cfa4,_0x12b3c4,_0x96f950){const _0x239af1={},_0x4ff940={},_0x411c2a={},_0x473c06=this['editor']['config']['get']('roots')||{};for(const [_0x315718,_0x19bc80]of Object['entries'](_0x473c06))_0x19bc80['lazyLoad']||(_0x239af1[_0x315718]=_0x19bc80['initialData']??'',_0x4ff940[_0x315718]=_0x19bc80['modelAttributes']||{},_0x19bc80['modelElement']&&(_0x411c2a[_0x315718]=_0x19bc80['modelElement']));for(const _0x3b182f of this['editor']['model']['document']['getRootNames']())_0x239af1[_0x3b182f]??='',_0x4ff940[_0x3b182f]??={};let _0x41020b=!0x1;const _0x121d62=Object['keys'](_0x239af1),_0x4dfc1f=Object['keys'](_0x54cfa4);for(const _0x40bd19 of _0x121d62){if(_0x239af1[_0x40bd19]!==_0x54cfa4[_0x40bd19]&&''!==_0x239af1[_0x40bd19]['trim']()){_0x41020b=!0x0;break;}if(!_0x36df9a(_0x4ff940[_0x40bd19],_0x12b3c4[_0x40bd19])&&Object['keys'](_0x4ff940[_0x40bd19])['length']>0x0){_0x41020b=!0x0;break;}const _0x1f9a50=_0x411c2a[_0x40bd19],_0x28c6b8=_0x96f950[_0x40bd19];if(_0x1f9a50&&_0x28c6b8&&_0x1f9a50!==_0x28c6b8){_0x41020b=!0x0;break;}}_0x41020b||(_0x41020b=_0x4dfc1f['some'](_0x553f18=>!this['editor']['model']['document']['getRoot'](_0x553f18))),_0x41020b&&_0x27d5fa('editor-initial-data-replaced-with-revision-data',{'editorData':_0x239af1,'editorRootsAttributes':_0x4ff940,'editorRootsModelElements':_0x411c2a,'revisionData':_0x54cfa4,'revisionRootsAttributes':_0x12b3c4,'revisionRootsModelElements':_0x96f950});for(const [_0x5346af,_0x4d4831]of Object['entries'](_0x54cfa4))this['editor']['config']['set']('roots.'+_0x5346af+'.initialData',_0x4d4831);for(const [_0x497e18,_0x27ff38]of Object['entries'](_0x12b3c4))this['editor']['config']['set']('roots.'+_0x497e18+'.modelAttributes',_0x27ff38);const _0x1696a1=this['editor']['model']['document'];for(const [_0x4f3136,_0x4a4a9c]of Object['entries'](_0x96f950)){this['editor']['config']['set']('roots.'+_0x4f3136+'.modelElement',_0x4a4a9c);const _0x3123b5=_0x1696a1['getRoot'](_0x4f3136);_0x3123b5&&_0x3123b5['name']!==_0x4a4a9c&&(_0x1696a1['roots']['remove'](_0x4f3136),_0x1696a1['createRoot'](_0x4a4a9c,_0x4f3136));}}['_addPendingAction'](){if(!this['_pendingAction']){const _0x48bea3=this['editor']['plugins']['get']('PendingActions');this['_pendingAction']=_0x48bea3['add'](ft(this['editor']['locale'],'PENDING_ACTION_REVISION_HISTORY'));}}['_removePendingAction'](){this['_pendingAction']&&(this['editor']['plugins']['get']('PendingActions')['remove'](this['_pendingAction']),this['_pendingAction']=null);}['_findInsertionIndex'](_0x4730f0){const _0x8164a8=this['repository']['getRevisions']();_0x8164a8['reverse']();let _0x51fd6a=0x0;for(;_0x51fd6a<_0x8164a8['length'];){const _0x2912f1=_0x8164a8[_0x51fd6a];if(_0x2912f1===this['currentRevision']){_0x51fd6a++;continue;}if(_0x2912f1['id']===this['_initialRevisionId'])break;const _0x5c568c=_0x4730f0['toVersion']-_0x2912f1['toVersion']||_0x4730f0['fromVersion']-_0x2912f1['fromVersion'];if(_0x5c568c>0x0)break;if(_0x5c568c<0x0)_0x51fd6a++;else{if(!_0x4730f0['creator']&&_0x2912f1['creator'])break;if(_0x2912f1['creator']||!_0x4730f0['creator']){if(_0x4730f0['createdAt']>_0x2912f1['createdAt'])break;_0x51fd6a++;}else _0x51fd6a++;}}return _0x51fd6a;}['_getFromVersion'](_0x4e1569){const _0x30eb4c=this['repository']['getRevisions']();_0x30eb4c['reverse'](),_0x30eb4c['shift']();const _0x1dcb86=_0x30eb4c['find'](_0x2c0a4f=>_0x2c0a4f['toVersion']<=_0x4e1569)['toVersion'];return _0x1dcb86<this['_startingVersion']?this['_startingVersion']:_0x1dcb86;}['_makeRevision']({name:_0x405fd9,from:_0x43d545,to:_0x40d482,creatorId:_0x105fe1,id:_0x3852b8}){const _0x51fe99=this['buildRevisionData']({'from':_0x43d545,'to':_0x40d482});_0x51fe99['name']=_0x405fd9,_0x51fe99['creatorId']=_0x105fe1,_0x51fe99['id']=_0x3852b8;const _0x4248c3=this['addRevisionData'](_0x51fe99);return this['adapter']&&this['_bufferUpdate'](_0x51fe99['id'],_0x51fe99,!0x0),_0x4248c3;}['_setConversion'](){this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'});}}class RevisionDataBuilder{['editor'];['source'];['_savedMetaData'];['_lastFrom'];['_lastTo'];['_markers'];['_diffRoots'];['_diffRootsAttributes'];['_baseRoots'];['_baseRootsAttributes'];['_idsRoots'];['_baseIdsRoots'];['_touched'];['_touchedMarkers'];['_touchedRoots'];['_revisionId'];['_startingRevisionId'];constructor(_0x554dd9){this['editor']=_0x554dd9,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'](_0x184bbe){this['source']=_0x184bbe;const _0x23f4f9=new Map(),_0x58b7fe=new Map(),_0xcef8c8=this['editor']['model']['document']['roots']['map'](_0x39ba8c=>_0x39ba8c['rootName']);for(const _0x1e2eb4 of _0xcef8c8){const _0x1405b0=this['editor']['model']['document']['getRoot'](_0x1e2eb4),_0x155c72=gt(_0x1405b0);_0x23f4f9['set'](_0x1e2eb4,_0x155c72),_0x58b7fe['set'](_0x1e2eb4,Object['fromEntries'](_0x1405b0['getAttributes']()));}const _0x34a68d=Array['from'](this['editor']['model']['markers'])['map'](_0x5ab669=>[_0x5ab669['name'],_0x5ab669['getRange']()]),_0x33a347=this['source']['version'];this['_saveMetaData'](_0x33a347,_0x23f4f9,_0x34a68d,_0x58b7fe),this['_startingRevisionId']=this['_revisionId'];const _0x3c5c15=new Map(),_0x512101=new Map();for(const _0x2618a9 of _0xcef8c8){const _0x4887fa=wt(_0x2618a9,this['editor']['model']['document']['getRoot'](_0x2618a9)['name']);_0x3c5c15['set'](_0x2618a9,_0x4887fa),_0x512101['set'](_0x2618a9,{});}this['_saveMetaData'](Number['NEGATIVE_INFINITY'],_0x3c5c15,[],_0x512101);}['getData'](_0x2146e4,_0x49fbf0){if(this['_lastFrom']===_0x2146e4&&this['_lastTo']<=_0x49fbf0)this['_savedMetaData']['size']>0x1&&this['_removeMetaData'](this['_lastTo']),this['_applyOperations'](this['_lastTo'],_0x49fbf0,!0x0);else{if(!this['_savedMetaData']['has'](_0x2146e4)){const _0x3a619b=this['_getPreviousFrom'](_0x2146e4);this['_calculateMetaData'](_0x3a619b,_0x2146e4,!0x1);}this['_calculateMetaData'](_0x2146e4,_0x49fbf0,!0x0);}return this['_lastFrom']=_0x2146e4,this['_lastTo']=_0x49fbf0,this['_getState']();}['loadState'](_0x1a1dc0){if(!this['_savedMetaData']['has'](_0x1a1dc0['fromVersion'])){const _0xa7a844=this['_getPreviousFrom'](_0x1a1dc0['fromVersion']);this['_calculateMetaData'](_0xa7a844,_0x1a1dc0['fromVersion'],!0x1);}this['_calculateMetaData'](_0x1a1dc0['fromVersion'],_0x1a1dc0['toVersion'],!0x1);const _0x37a494=this['editor']['plugins']['get']('RevisionHistoryUtils');this['_reset'](),this['_lastFrom']=_0x1a1dc0['fromVersion'],this['_lastTo']=_0x1a1dc0['toVersion'];for(const _0x44bae6 in _0x1a1dc0['diffData']){const _0x2bcaa2=_0x1a1dc0['diffData'][_0x44bae6]['attachChange'],_0x129a2a=_0x21ca06(_0x1a1dc0['diffData'][_0x44bae6]['attributesBefore'])||{},_0x112d1a=_0x1a1dc0['diffData'][_0x44bae6],_0x5a1d04=_0x37a494['_makeModelFromViewString'](_0x112d1a['deletions'],_0x112d1a['rootElementName']||'$root');_0x5a1d04['rootName']=_0x44bae6,_0x5a1d04['_isAttached']=!_0x2bcaa2||!_0x2bcaa2['isAttached'],_0x5a1d04['isAttached']=()=>_0x5a1d04['_isAttached'],this['_baseRoots']['set'](_0x44bae6,_0x5a1d04),this['_baseRootsAttributes']['set'](_0x44bae6,_0x129a2a),_0x2bcaa2&&this['_touchedRoots']['set'](_0x44bae6,_0x2bcaa2);const _0x3e4073=this['_makeIdsRoot'](_0x5a1d04);this['_baseIdsRoots']['set'](_0x44bae6,_0x3e4073);for(const [_0x1be73c,_0x49873d]of _0x5a1d04['markers']){if(!_0x1be73c['startsWith']('revision:'))continue;const _0x2c98e8=_0x1be73c['split'](':')[0x2];for(const _0x1e46e3 of _0x49873d['getWalker']({'singleCharacters':!0x0})){const _0x32ae71=this['_getVidAttributeName'](_0x1e46e3),_0x87be53='elementEnd'==_0x1e46e3['type']?_0x1e46e3['previousPosition']['path']['slice'](0x0,-0x1):_0x1e46e3['previousPosition']['path'],_0x1a92a6=_0x3e4073['getNodeByPath'](_0x87be53)['getAttribute'](_0x32ae71);this['_touched']['set'](_0x1a92a6,{'userId':_0x2c98e8});}_0x5a1d04['markers']['delete'](_0x1be73c);}}this['_startingRevisionId']=this['_revisionId'];const _0x641528=[...Array(this['_revisionId'])['keys']()]['slice'](0x1)['filter'](_0x425cf9=>!this['_touched']['has'](_0x425cf9));let _0x2b264e=0x0;const _0x31087a=new Map();for(const _0x2ae550 in _0x1a1dc0['diffData']){const _0x5de025=_0x1a1dc0['diffData'][_0x2ae550]['attachChange'],_0x263074=_0x21ca06(_0x1a1dc0['diffData'][_0x2ae550]['attributesAfter'])||{},_0x294dcf=_0x1a1dc0['diffData'][_0x2ae550],_0x4089ef=_0x37a494['_makeModelFromViewString'](_0x294dcf['insertions'],_0x294dcf['rootElementName']||'$root');_0x4089ef['rootName']=_0x2ae550,_0x4089ef['_isAttached']=!_0x5de025||_0x5de025['isAttached'],_0x4089ef['isAttached']=()=>_0x4089ef['_isAttached'],this['_diffRoots']['set'](_0x2ae550,_0x4089ef),this['_diffRootsAttributes']['set'](_0x2ae550,_0x263074);const _0x305a88=this['_makeIdsRoot'](_0x4089ef,Number['NEGATIVE_INFINITY']);this['_idsRoots']['set'](_0x2ae550,_0x305a88),_0x31087a['set'](_0x2ae550,_0x4089ef['isAttached']()?_0x263074:{});for(const [_0xa376e8,_0xf4e58b]of _0x4089ef['markers']){if(!_0xa376e8['startsWith']('revision:'))continue;const _0x42c199=_0xa376e8['split'](':')[0x2];for(const _0x339307 of _0xf4e58b['getWalker']({'singleCharacters':!0x0})){const _0x41c6d3=this['_getVidAttributeName'](_0x339307),_0x3a1cfe=this['_revisionId']++,_0x3df19e='elementEnd'==_0x339307['type']?_0x339307['previousPosition']['path']['slice'](0x0,-0x1):_0x339307['previousPosition']['path'];_0x305a88['getNodeByPath'](_0x3df19e)['_setAttribute'](_0x41c6d3,_0x3a1cfe),this['_touched']['set'](_0x3a1cfe,{'userId':_0x42c199});}_0x4089ef['markers']['delete'](_0xa376e8);}for(const _0x4f15e1 of this['editor']['model']['createRangeIn'](_0x4089ef)['getWalker']({'singleCharacters':!0x0})){const _0x1879b5=this['_getVidAttributeName'](_0x4f15e1),_0x1aa33f='elementEnd'==_0x4f15e1['type']?_0x4f15e1['previousPosition']['path']['slice'](0x0,-0x1):_0x4f15e1['previousPosition']['path'],_0x2840fc=_0x305a88['getNodeByPath'](_0x1aa33f);_0x2840fc['getAttribute'](_0x1879b5)>0x0||_0x2840fc['_setAttribute'](_0x1879b5,_0x641528[_0x2b264e++]);}for(const [_0x11c1ee,_0x54af61]of _0x4089ef['markers'])_0x11c1ee['startsWith']('revision:')||this['_markers']['set'](_0x11c1ee,_0x54af61);}const {roots:_0x55170d}=this['_savedMetaData']['get'](_0x1a1dc0['fromVersion']),{roots:_0x3d63fd}=this['_savedMetaData']['get'](_0x1a1dc0['toVersion']),_0x1e1a80=gt(_0x55170d['get']('$graveyard'));this['_baseRoots']['set']('$graveyard',_0x1e1a80),this['_baseIdsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x1e1a80,Number['NEGATIVE_INFINITY']));const _0x5d15a8=gt(_0x3d63fd['get']('$graveyard'));this['_diffRoots']['set']('$graveyard',_0x5d15a8),this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x5d15a8));const _0x147bf8=Array['from'](this['_diffRoots'])['map'](([_0xcc46e9,_0x28c7c2])=>[_0xcc46e9,gt(_0x28c7c2)]);this['_saveMetaData'](this['_lastTo'],_0x147bf8,this['_markers'],_0x31087a);}['reInit'](){this['_reset'](),this['_lastFrom']=-0x1,this['_lastTo']=-0x1,this['_savedMetaData']['clear'](),this['init'](this['source']);}['_saveMetaData'](_0x163cb5,_0x5bff01,_0x343a7e,_0x3dff00){const _0x594c0b=new Map(_0x5bff01),_0x121ac3=new Map(_0x21ca06(_0x3dff00)),_0x4df5cb=new Map();for(const [_0xb9d31f,_0x20b334]of _0x343a7e)_0x4df5cb['set'](_0xb9d31f,{'start':_0x20b334['start']['clone'](),'end':_0x20b334['end']['clone'](),'rootName':_0x20b334['root']['rootName']});this['_savedMetaData']['set'](_0x163cb5,{'roots':_0x594c0b,'markers':_0x4df5cb,'rootsAttributes':_0x121ac3});}['_removeMetaData'](_0x1a54dd){this['_savedMetaData']['delete'](_0x1a54dd);}['_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'](_0x14a52e,_0x8362fe=null){let _0x244885=null;_0x14a52e['is']('documentFragment')||(_0x244885=new _0x3bd734(_0x14a52e['name'],{'vid_start':null===_0x8362fe?this['_revisionId']++:_0x8362fe++}));const _0x167e42=[];for(const _0x1e8f76 of _0x14a52e['getChildren']())if(_0x1e8f76['is']('element')){_0x167e42['push'](this['_makeIdsRoot'](_0x1e8f76,_0x8362fe));const _0x28debe=_0x167e42[_0x167e42['length']-0x1];null!==_0x8362fe&&(_0x8362fe=_0x28debe['is']('element','$text')?_0x28debe['getAttribute']('vid')+0x1:_0x28debe['getAttribute']('vid_end')+0x1);}else{for(let _0x38f61d=0x0;_0x38f61d<_0x1e8f76['offsetSize'];_0x38f61d++)_0x167e42['push'](new _0x3bd734('$text',{'vid':null===_0x8362fe?this['_revisionId']++:_0x8362fe++}));}if(_0x14a52e['is']('documentFragment')){const _0x5e63e0=wt(_0x14a52e['rootName'],_0x14a52e['name']);return _0x5e63e0['_insertChild'](0x0,_0x167e42),_0x5e63e0;}return _0x244885['_setAttribute']('vid_end',null===_0x8362fe?this['_revisionId']++:_0x8362fe++),_0x244885['_insertChild'](0x0,_0x167e42),_0x244885;}['_calculateMetaData'](_0x436202,_0x11f88b,_0x3e1b87){this['_reset']();const {roots:_0x543cbe,markers:_0x521eed,rootsAttributes:_0x4c898c}=this['_savedMetaData']['get'](_0x436202);this['_baseRoots']=new Map(_0x543cbe),this['_baseRootsAttributes']=new Map(_0x21ca06(_0x4c898c));for(const [_0x341432,_0x53ea70]of this['_baseRoots'])if('$graveyard'!==_0x341432&&(this['_diffRoots']['set'](_0x341432,gt(_0x53ea70)),this['_diffRootsAttributes']=new Map(_0x21ca06(_0x4c898c)),_0x3e1b87)){const _0x4bf4da=this['_revisionId'];this['_idsRoots']['set'](_0x341432,this['_makeIdsRoot'](_0x53ea70)),this['_baseIdsRoots']['set'](_0x341432,this['_makeIdsRoot'](_0x53ea70,_0x4bf4da));}this['_startingRevisionId']=this['_revisionId'],this['_diffRoots']['set']('$graveyard',gt(this['_baseRoots']['get']('$graveyard'))),_0x3e1b87&&this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](this['_baseRoots']['get']('$graveyard')));for(const [_0x5e8fff,_0x13a224]of _0x521eed){const _0x4dd3ac=this['_baseRoots']['get'](_0x13a224['rootName']),_0x1dc305=this['_diffRoots']['get'](_0x13a224['rootName']),_0x29415f=new _0xbab5ba(this['_fixPosition'](_0x13a224['start'],_0x4dd3ac),this['_fixPosition'](_0x13a224['end'],_0x4dd3ac)),_0x71e37=this['_fixRange'](_0x29415f,_0x1dc305);_0x4dd3ac['markers']['set'](_0x5e8fff,_0x29415f),this['_markers']['set'](_0x5e8fff,_0x71e37);}this['_applyOperations'](_0x436202,_0x11f88b,_0x3e1b87);}['_applyOperations'](_0x2c5d22,_0x2314fc,_0x53201a){for(const _0x114709 of this['source']['getOperations'](_0x2c5d22,_0x2314fc))this['_handleOperation'](_0x114709,_0x53201a);for(const _0x380056 of this['_diffRoots']['values']())_0x380056['markers']['clear']();for(const [_0x1076f3,_0x38cb77]of this['_markers']){this['_diffRoots']['get'](_0x38cb77['root']['rootName'])['markers']['set'](_0x1076f3,_0x38cb77['clone']());}const _0x4f333c=new Map(),_0x587c5b=new Map();for(const [_0x202e09,_0x54412e]of this['_diffRoots'])_0x4f333c['set'](_0x202e09,gt(_0x54412e)),_0x587c5b['set'](_0x202e09,this['_diffRootsAttributes']['get'](_0x202e09));this['_saveMetaData'](_0x2314fc,_0x4f333c,this['_markers'],_0x587c5b);}['_getPreviousFrom'](_0x5b0a82){const _0x3cf32a=Array['from'](this['_savedMetaData']['keys']());_0x3cf32a['sort']((_0x4fe8f1,_0x130160)=>_0x4fe8f1-_0x130160),_0x3cf32a['reverse']();for(const _0x5aa055 of _0x3cf32a)if(_0x5aa055<_0x5b0a82)return _0x5aa055;return Number['NEGATIVE_INFINITY'];}['_copyMarkers'](_0x2135dd,_0x52647d){const _0x1472c8=Array['from'](_0x52647d['markers'])['map'](([_0x2a7baf,_0x577bda])=>[_0x2a7baf,this['_fixRange'](_0x577bda,_0x2135dd)]);_0x2135dd['markers']=new Map(_0x1472c8);}['_transformMarkers'](_0x111854){for(const _0x39afd4 of this['_markers']['values']()){const _0x4fabf6=_0x39afd4['getTransformedByOperation'](_0x111854),_0x4ded08=_0xbab5ba['_createFromRanges'](_0x4fabf6);_0x39afd4['start']=_0x4ded08['start'],_0x39afd4['end']=_0x4ded08['end'];}}['_handleOperation'](_0x14f30e,_0x20fb71){if('addRoot'!=_0x14f30e['type']&&'detachRoot'!=_0x14f30e['type']){if('insert'==_0x14f30e['type']){const _0x2c96f8=_0x14f30e['position']['root'],_0x45b41b=_0x2c96f8['rootName'],_0x1f85ac=_0x2c96f8['name'];this['_diffRoots']['has'](_0x45b41b)||(this['_diffRoots']['set'](_0x45b41b,wt(_0x45b41b,_0x1f85ac,!0x0)),this['_diffRootsAttributes']['set'](_0x45b41b,{}),_0x20fb71&&this['_idsRoots']['set'](_0x45b41b,wt(_0x45b41b,_0x1f85ac,!0x0)));}else{if('addRootAttribute'==_0x14f30e['type']||'removeRootAttribute'==_0x14f30e['type']||'changeRootAttribute'==_0x14f30e['type'])return void this['_handleRootAttributeOperation'](_0x14f30e);'marker'==_0x14f30e['type']&&this['_handleMarkerOperation'](_0x14f30e);}if('marker'!==_0x14f30e['type']){const _0x1b1de5=this['_cloneOperation'](_0x14f30e,this['_diffRoots']);_0x1b1de5['_execute'](),this['_transformMarkers'](_0x1b1de5);}if(_0x20fb71)switch(_0x14f30e['type']){case'insert':this['_handleInsertOperation'](_0x14f30e);break;case'move':case'remove':case'reinsert':this['_handleMoveOperation'](_0x14f30e);break;case'merge':this['_handleMergeOperation'](_0x14f30e);break;case'split':this['_handleSplitOperation'](_0x14f30e);}}else this['_handleRootOperation'](_0x14f30e,_0x20fb71);}['_cloneOperation'](_0x3195b1,_0x8f1aff){const _0x4112e4=_0x3195b1['clone']();return _0x4112e4['_authorId']=_0x3195b1['_authorId'],this['_fixOperation'](_0x4112e4,_0x8f1aff),_0x4112e4;}['_getBaseVids'](_0x39e046){return _0x39e046['map'](_0x453f16=>{const _0x512717=this['_getVidAttributeName'](_0x453f16);return Number(_0x453f16['item']['getAttribute'](_0x512717));});}['_generateTape'](_0x51e01b,_0xbcd3e9){if(_0x51e01b['is']('element','$text'))_0xbcd3e9['push']({'item':_0x51e01b,'type':'text'});else{_0x51e01b['is']('element')&&_0xbcd3e9['push']({'item':_0x51e01b,'type':'elementStart'});for(const _0x387e32 of _0x51e01b['getChildren']())this['_generateTape'](_0x387e32,_0xbcd3e9);_0x51e01b['is']('element')&&_0xbcd3e9['push']({'item':_0x51e01b,'type':'elementEnd'});}return _0xbcd3e9;}['_getState'](){const _0x50e5de=new Map(this['_touched']),_0x3c14e7=new Map(_0x50e5de),_0x54894d=new Map(),_0x2b182e={'insertions':{},'deletions':{}},_0x29eff1={'insertions':{},'deletions':{}},_0x1c8b3b=new Map(),_0x5df85f=new Set([...this['_baseRoots']['keys'](),...this['_diffRoots']['keys']()]),_0xe66b=new Map();_0x5df85f['delete']('$graveyard');for(const _0x1e928d of _0x5df85f){const _0x5ae1e1=(this['_diffRoots']['get'](_0x1e928d)??this['_baseRoots']['get'](_0x1e928d))['name'],_0x3cc3f3=this['_diffRoots']['get'](_0x1e928d)||wt(_0x1e928d,_0x5ae1e1,!0x1),_0x3321ed=this['_baseRoots']['get'](_0x1e928d)||wt(_0x1e928d,_0x5ae1e1,!0x1);_0x3cc3f3['isAttached']()||_0x3321ed['isAttached']()?(_0xe66b['set'](_0x1e928d,_0x5ae1e1),_0x2b182e['insertions'][_0x1e928d]=gt(_0x3cc3f3),_0x2b182e['deletions'][_0x1e928d]=gt(_0x3321ed),this['_copyMarkers'](_0x2b182e['deletions'][_0x1e928d],_0x3321ed),this['_copyMarkers'](_0x2b182e['insertions'][_0x1e928d],_0x3cc3f3),_0x29eff1['insertions'][_0x1e928d]=this['_generateTape'](this['_idsRoots']['get'](_0x1e928d),[]),_0x29eff1['deletions'][_0x1e928d]=this['_generateTape'](this['_baseIdsRoots']['get'](_0x1e928d)||wt(_0x1e928d,_0x5ae1e1,!0x1),[])):_0x5df85f['delete'](_0x1e928d);}for(const _0x4654a7 of _0x5df85f){const _0x64b492=_0x29eff1['insertions'][_0x4654a7];for(const _0x5a0332 of _0x64b492){const _0x340727=this['_getVidAttributeName'](_0x5a0332),_0x223447=_0x5a0332['item']['getAttribute'](_0x340727);_0x3c14e7['delete'](_0x223447),_0x223447>=this['_startingRevisionId']&&_0x54894d['set'](_0x223447,_0x50e5de['get'](_0x223447));}}for(const _0x128213 of _0x5df85f){const _0x47292d=_0x29eff1['insertions'][_0x128213],_0x30c3f2=this['_getBaseVids'](_0x29eff1['deletions'][_0x128213]);let _0x4bbd4f=0x0;for(const _0x38e70f of _0x47292d){const _0x256d5a=this['_getVidAttributeName'](_0x38e70f),_0x43dca7=_0x38e70f['item']['getAttribute'](_0x256d5a);if(!_0x54894d['has'](_0x43dca7)&&!_0x1c8b3b['has'](_0x43dca7)){if(_0x3c14e7['has'](_0x43dca7))_0x4bbd4f++;else{if(_0x43dca7!=_0x30c3f2[_0x4bbd4f]){const _0x376dd7=_0x50e5de['get'](_0x43dca7)||_0x50e5de['get'](_0x30c3f2[_0x4bbd4f]);for(;_0x43dca7!=_0x30c3f2[_0x4bbd4f];)_0x3c14e7['has'](_0x30c3f2[_0x4bbd4f])||(_0x1c8b3b['set'](_0x30c3f2[_0x4bbd4f],_0x376dd7),_0x50e5de['set'](_0x30c3f2[_0x4bbd4f],_0x376dd7)),_0x4bbd4f++;}_0x4bbd4f++;}}}}for(const _0x3df7b6 of _0x5df85f){const _0x3fe607=_0x29eff1['insertions'][_0x3df7b6];for(const _0x524e81 of _0x3fe607){const _0x11882b=this['_getVidAttributeName'](_0x524e81),_0xc5eb40=_0x524e81['item']['getAttribute'](_0x11882b);if(_0x1c8b3b['has'](_0xc5eb40)){const _0x211019=_0x1c8b3b['get'](_0xc5eb40);_0x3c14e7['has'](_0xc5eb40)||_0x3c14e7['set'](_0xc5eb40,{..._0x211019}),_0x54894d['set'](_0xc5eb40,{..._0x211019});}}}for(const _0x1ce9bc of _0x3c14e7['keys']())_0x1ce9bc>=this['_startingRevisionId']&&_0x3c14e7['delete'](_0x1ce9bc);const _0x25d3e4=new Map();for(const _0x9e6302 of _0x5df85f){let _0x998dc=_0x29eff1['insertions'][_0x9e6302];for(const _0x5ae54f of _0x998dc)if(_0x5ae54f['item']['is']('element','tableCell')){const _0x271738=this['_getVidAttributeName'](_0x5ae54f),_0x445a03=_0x5ae54f['item']['getAttribute'](_0x271738);if(_0x54894d['has'](_0x445a03)){const _0x1a2289=_0x5ae54f['item']['parent']['parent']['getAttribute']('vid_start'),_0x12c5ff=_0x25d3e4['get'](_0x1a2289)||new Set();_0x12c5ff['add'](_0x54894d['get'](_0x445a03)['userId']),_0x25d3e4['set'](_0x1a2289,_0x12c5ff);}}_0x998dc=_0x29eff1['deletions'][_0x9e6302];for(const _0x267d42 of _0x998dc)if(_0x267d42['item']['is']('element','tableCell')){const _0x39cecc=this['_getVidAttributeName'](_0x267d42),_0xa4751=_0x267d42['item']['getAttribute'](_0x39cecc);if(_0x3c14e7['has'](_0xa4751)){const _0x53d3ee=_0x267d42['item']['parent']['parent']['getAttribute']('vid_start'),_0x2a7348=_0x25d3e4['get'](_0x53d3ee)||new Set();_0x2a7348['add'](_0x3c14e7['get'](_0xa4751)['userId']),_0x25d3e4['set'](_0x53d3ee,_0x2a7348);}}for(const _0x470269 of _0x25d3e4['keys']())(_0x54894d['has'](_0x470269)||_0x3c14e7['has'](_0x470269))&&_0x25d3e4['delete'](_0x470269);}for(const _0x2adec4 of _0x5df85f){const _0x326727=_0x29eff1['insertions'][_0x2adec4];let _0xa88410=null,_0x5df90b=null;for(const _0x22b9a0 of _0x326727){const _0x497062=this['_getVidAttributeName'](_0x22b9a0),_0x50e478=_0x22b9a0['item']['getAttribute'](_0x497062),_0x23daeb=_0x25d3e4['get'](_0x50e478);_0x23daeb&&'elementStart'==_0x22b9a0['type']&&(_0xa88410=Array['from'](_0x23daeb)[0x0],_0x5df90b=_0x22b9a0['item']['getAttribute']('vid_end')),_0xa88410&&(_0x3c14e7['set'](_0x50e478,{'userId':_0xa88410}),_0x54894d['set'](_0x50e478,{'userId':_0xa88410})),_0x50e478==_0x5df90b&&(_0xa88410=null,_0x5df90b=null);}}const _0x15aba0={},_0x52e7c4=new Set();for(const _0x235231 of _0x5df85f){const _0xae2324=_0x2b182e['deletions'][_0x235231],_0x50686f=_0x2b182e['insertions'][_0x235231];for(const {userId:_0xc9e389}of this['_touchedMarkers']['values']())null!==_0xc9e389&&_0x52e7c4['add'](_0xc9e389);for(const {userId:_0x42b849}of this['_touchedRoots']['values']())null!==_0x42b849&&_0x52e7c4['add'](_0x42b849);this['_markChanges'](_0x50686f,_0x29eff1['insertions'][_0x235231],_0x54894d,'insertion',_0x52e7c4),this['_markChanges'](_0xae2324,_0x29eff1['deletions'][_0x235231],_0x3c14e7,'deletion',_0x52e7c4),_0x15aba0[_0x235231]={'insertions':this['_prepareViewToSave'](_0x50686f),'deletions':this['_prepareViewToSave'](_0xae2324),'attachChange':this['_touchedRoots']['get'](_0x235231)||null,'attributesBefore':_0x21ca06(this['_baseRootsAttributes']['get'](_0x235231))||{},'attributesAfter':_0x21ca06(this['_diffRootsAttributes']['get'](_0x235231)),'rootElementName':_0xe66b['get'](_0x235231)};}return{'diffData':_0x15aba0,'authorsIds':Array['from'](_0x52e7c4)};}['_processRootBeforeSave'](_0x4eebd8){for(const [,_0x4095e4]of _0x4eebd8['markers']){const _0x12f57d=_0x4095e4['start']['getAncestors']()['filter'](_0x137558=>'tableCell'==_0x137558['name']);for(const _0x54996e of _0x12f57d)0x1==_0x54996e['childCount']&&_0x54996e['getChild'](0x0)['is']('element','paragraph')&&_0x54996e['getChild'](0x0)['_setAttribute']('keepParagraph',!0x0);}}['_prepareViewToSave'](_0x11b4d1){this['_processRootBeforeSave'](_0x11b4d1);const _0x423794=this['editor']['data']['toView'](_0x11b4d1,{}),_0x2a8268=Array['from'](_0x423794['getChildren']())['map'](_0x16e739=>this['_getViewJson'](_0x16e739));return JSON['stringify'](_0x2a8268);}['_getViewJson'](_0x1d98f2){if(_0x1d98f2['is']('$text'))return _0x1d98f2['data'];{const _0x3bc481=this['editor']['plugins']['get']('RevisionHistoryUtils'),_0x4f89f8=_0x1d98f2,_0x1793c7=this['editor']['data']['htmlProcessor']['domConverter'],_0x5e4f27={'type':_0x3bc481['_getTypeCharForViewElement'](_0x4f89f8),'name':_0x4f89f8['name'],'attributes':Array['from'](_0x4f89f8['getAttributes']()),'children':Array['from'](_0x4f89f8['getChildren']())['map'](_0x3acc09=>this['_getViewJson'](_0x3acc09))};if(_0x1d98f2['is']('uiElement')&&'$comment'!=_0x1d98f2['name']){const _0x40303b=_0x1d98f2['render'](_0x1793c7['domDocument'],_0x1793c7);_0x5e4f27['children']['push'](_0x40303b['outerHTML']);}else{if(_0x1d98f2['is']('rawElement')){const _0x439efb=_0x1793c7['domDocument']['createElement'](_0x4f89f8['name']);_0x1d98f2['render'](_0x439efb,_0x1793c7),_0x5e4f27['children']['push'](_0x439efb['innerHTML']);}}const _0x1e7400=Array['from'](_0x4f89f8['getCustomProperties']());_0x1e7400['length']>0x0&&(_0x5e4f27['customProperties']=_0x1e7400);const _0x569843=_0x4f89f8['getFillerOffset']();return null!==_0x569843&&(_0x5e4f27['fillerOffset']=_0x569843),_0x5e4f27;}}['_markChanges'](_0x4ea116,_0x3d100c,_0x15a631,_0x4e4ba9,_0x29ddec){let _0x5c85ca=null,_0xbeaa29=null,_0x1382c8=0x0;const _0x4cc8dd=this['editor']['model'];for(let _0xd9268c=0x0;_0xd9268c<_0x3d100c['length'];_0xd9268c++){const _0x5010a9=this['_getVidAttributeName'](_0x3d100c[_0xd9268c]),_0x487931=_0x3d100c[_0xd9268c]['item']['getAttribute'](_0x5010a9),_0x2568e4=_0x15a631['get'](_0x487931),_0x34ccb9=_0xd9268c==_0x3d100c['length']-0x1;(!_0x5c85ca&&_0x2568e4&&(_0x5c85ca=_0x2568e4,_0xbeaa29=_0x3d100c[_0xd9268c]),_0x5c85ca&&(!_0x2568e4||_0x2568e4['userId']!=_0x5c85ca['userId']))&&(_0x34cc78(_0x2568e4,mt(_0xbeaa29,_0x4ea116,_0x4cc8dd),mt(_0x3d100c[_0xd9268c],_0x4ea116,_0x4cc8dd)),_0x5c85ca=_0x2568e4||null,_0xbeaa29=_0x2568e4?_0x3d100c[_0xd9268c]:null),_0x5c85ca&&_0x34ccb9&&_0x34cc78(_0x2568e4,mt(_0xbeaa29,_0x4ea116,_0x4cc8dd),pt(_0x3d100c[_0xd9268c],_0x4ea116,_0x4cc8dd));}function _0x34cc78(_0x674827,_0x4c19e5,_0x5e70e3){const _0x3d7369=_0x5c85ca['userId'],_0x329d59='revision:'+_0x4e4ba9+':'+_0x3d7369+':'+_0x1382c8++,_0x4b8616=_0x4cc8dd['createRange'](_0x4c19e5,_0x5e70e3);_0x4ea116['markers']['set'](_0x329d59,_0x4b8616),null!==_0x3d7369&&_0x29ddec['add'](_0x3d7369);}}['_getVidAttributeName'](_0x2c4c3a){switch(_0x2c4c3a['type']){case'elementStart':return'vid_start';case'elementEnd':return'vid_end';default:return'vid';}}['_fixOperation'](_0xc707ed,_0x2de6c4){_0xc707ed['baseVersion']=null;for(const _0x4b9f1b in _0xc707ed){const _0x4c2d03=_0xc707ed[_0x4b9f1b];if(_0x4c2d03 instanceof _0x1dc247){const _0x499f56=_0x2de6c4['get'](_0x4c2d03['root']['rootName']);_0xc707ed[_0x4b9f1b]=this['_fixPosition'](_0x4c2d03,_0x499f56);}if(_0x4c2d03 instanceof _0xbab5ba){const _0x5dc898=_0x2de6c4['get'](_0x4c2d03['root']['rootName']);_0xc707ed[_0x4b9f1b]=this['_fixRange'](_0x4c2d03,_0x5dc898);}'root'===_0x4b9f1b&&(_0xc707ed['root']=_0x2de6c4['get'](_0xc707ed['root']['rootName']));}}['_fixRange'](_0x25e375,_0x3b0f63){return this['editor']['model']['createRange'](this['_fixPosition'](_0x25e375['start'],_0x3b0f63),this['_fixPosition'](_0x25e375['end'],_0x3b0f63));}['_fixPosition'](_0x3b25fb,_0x434ba7){return this['editor']['model']['createPositionFromPath'](_0x434ba7,_0x3b25fb['path'],_0x3b25fb['stickiness']);}['_handleInsertOperation'](_0x58be99){const _0xa922bb=this['_idsRoots']['get'](_0x58be99['position']['root']['rootName']),_0x1f3de1=this['_fixPosition'](_0x58be99['position'],_0xa922bb),_0x591e8b=null===_0x58be99['_authorId']?null:_0x58be99['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0xdf01f=_0x1f3de1['parent'],_0x4c9479=this['_revisionId'],_0xe36be7=[];for(const _0x21ed9c of _0x58be99['nodes'])if(_0x21ed9c['is']('element'))_0xe36be7['push'](this['_makeIdsRoot'](_0x21ed9c));else{for(let _0x43a938=0x0;_0x43a938<_0x21ed9c['offsetSize'];_0x43a938++)_0xe36be7['push'](new _0x3bd734('$text',{'vid':this['_revisionId']++}));}const _0x292721=this['_revisionId'];for(let _0x4ee944=_0x4c9479;_0x4ee944<_0x292721;_0x4ee944++)this['_touched']['set'](_0x4ee944,{'userId':_0x591e8b});_0xdf01f['_insertChild'](_0x1f3de1['offset'],_0xe36be7);}['_handleMoveOperation'](_0x4d4365){(_0x4d4365=this['_cloneOperation'](_0x4d4365,this['_idsRoots']))['_execute']();const _0x305544=null===_0x4d4365['_authorId']?null:_0x4d4365['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x4038fa=_0x4d4365['getMovedRangeStart'](),_0x3520e0=_0x4038fa['parent'],_0x2e52dc=_0x4038fa['offset'];!function _0x36b47d(_0x1960ac,_0x8fa644,_0x33d689,_0x118c64){for(let _0x162c7d=_0x33d689;_0x162c7d<_0x118c64;_0x162c7d++){const _0x39880a=_0x8fa644['getChild'](_0x162c7d);_0x39880a['is']('element','$text')?_0x1960ac['set'](_0x39880a['getAttribute']('vid'),{'userId':_0x305544}):(_0x1960ac['set'](_0x39880a['getAttribute']('vid_start'),{'userId':_0x305544}),_0x36b47d(_0x1960ac,_0x39880a,0x0,_0x39880a['childCount']),_0x1960ac['set'](_0x39880a['getAttribute']('vid_end'),{'userId':_0x305544}));}}(this['_touched'],_0x3520e0,_0x2e52dc,_0x2e52dc+_0x4d4365['howMany']);}['_handleMergeOperation'](_0x4d1b21){const _0x68b856=null===(_0x4d1b21=this['_cloneOperation'](_0x4d1b21,this['_idsRoots']))['_authorId']?null:_0x4d1b21['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x1f5d42=_0x4d1b21['targetPosition']['parent'],_0x6ce1c=_0x4d1b21['sourcePosition']['parent'],_0x52b001=_0x1f5d42['getAttribute']('vid_end'),_0x4f51de=_0x6ce1c['getAttribute']('vid_start');_0x1f5d42['_setAttribute']('vid_end',_0x6ce1c['getAttribute']('vid_end')),_0x6ce1c['_setAttribute']('vid_end',_0x52b001),this['_touched']['set'](_0x4f51de,{'userId':_0x68b856}),this['_touched']['set'](_0x52b001,{'userId':_0x68b856}),_0x4d1b21['_execute']();}['_handleSplitOperation'](_0x905d29){const _0xc140a8=null===(_0x905d29=this['_cloneOperation'](_0x905d29,this['_idsRoots']))['_authorId']?null:_0x905d29['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x4ae00e=_0x905d29['graveyardPosition'],_0x5752d7=_0x905d29['splitPosition']['parent'];_0x905d29['_execute']();const _0x16c613=_0x5752d7['getAttribute']('vid_end'),_0x30a13a=_0x905d29['insertionPosition']['nodeAfter'];if(_0x4ae00e){const _0x4a2f68=_0x30a13a['getAttribute']('vid_end'),_0x1011f3=_0x5752d7['getAttribute']('vid_end');_0x5752d7['_setAttribute']('vid_end',_0x4a2f68),_0x30a13a['_setAttribute']('vid_end',_0x1011f3),this['_touched']['set'](_0x5752d7['getAttribute']('vid_end'),{'userId':_0xc140a8}),this['_touched']['set'](_0x30a13a['getAttribute']('vid_start'),{'userId':_0xc140a8});}else{const _0x2e4b82=this['_revisionId']++,_0x279e0d=this['_revisionId']++;_0x5752d7['_setAttribute']('vid_end',_0x2e4b82),_0x30a13a['_setAttribute']('vid_start',_0x279e0d),_0x30a13a['_setAttribute']('vid_end',_0x16c613),this['_touched']['set'](_0x2e4b82,{'userId':_0xc140a8}),this['_touched']['set'](_0x279e0d,{'userId':_0xc140a8});}}['_handleMarkerOperation'](_0x5d5735){if(!_0x5d5735['affectsData'])return;const _0x2999ee=(_0x5d5735=this['_cloneOperation'](_0x5d5735,this['_diffRoots']))['oldRange']?_0x5d5735['oldRange']['root']:null,_0x29a965=_0x5d5735['newRange']?_0x5d5735['newRange']['root']:null;_0x2999ee&&this['_markers']['delete'](_0x5d5735['name']),_0x29a965&&this['_markers']['set'](_0x5d5735['name'],_0x5d5735['newRange']['clone']());const _0x12e3cd=null===_0x5d5735['_authorId']?null:_0x5d5735['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0xb0e41d=_0x5d5735['name'];if(!this['_touchedMarkers']['has'](_0xb0e41d))return void this['_touchedMarkers']['set'](_0xb0e41d,{'range':_0x5d5735['oldRange'],'userId':_0x12e3cd});const _0x337dfa=this['_touchedMarkers']['get'](_0xb0e41d),_0x1c2236=_0x337dfa['range'],_0x40fdfa=_0x5d5735['newRange'];null==_0x1c2236&&null==_0x40fdfa||_0x1c2236&&_0x40fdfa&&_0x1c2236['isEqual'](_0x40fdfa)?this['_touchedMarkers']['delete'](_0x5d5735['name']):_0x337dfa['userId']=_0x12e3cd;}['_handleRootOperation'](_0xd334f0,_0x2989d5){this['_diffRoots']['has'](_0xd334f0['rootName'])?this['_diffRoots']['get'](_0xd334f0['rootName'])['_isAttached']=_0xd334f0['isAdd']:(this['_diffRoots']['set'](_0xd334f0['rootName'],wt(_0xd334f0['rootName'],_0xd334f0['elementName'],!0x0)),this['_diffRootsAttributes']['set'](_0xd334f0['rootName'],{}),_0x2989d5&&this['_idsRoots']['set'](_0xd334f0['rootName'],wt(_0xd334f0['rootName'],_0xd334f0['elementName'],!0x0)));const _0x115663=null===_0xd334f0['_authorId']?null:_0xd334f0['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x333f26=this['_touchedRoots']['get'](_0xd334f0['rootName']);_0x333f26&&_0x333f26['userId']===_0x115663?this['_touchedRoots']['delete'](_0xd334f0['rootName']):this['_touchedRoots']['set'](_0xd334f0['rootName'],{'userId':_0x115663,'isAttached':_0xd334f0['isAdd']});}['_handleRootAttributeOperation'](_0x48ccfc){const _0x1488e1=this['_diffRootsAttributes']['get'](_0x48ccfc['root']['rootName']);null===_0x48ccfc['newValue']?delete _0x1488e1[_0x48ccfc['key']]:_0x1488e1[_0x48ccfc['key']]=_0x48ccfc['newValue'];}}function gt(_0x3fc9a6){const _0x260863=wt(_0x3fc9a6['rootName'],_0x3fc9a6['name'],_0x3fc9a6['isAttached']());for(const _0xd2bd90 of _0x3fc9a6['getChildren']()){const _0x3c47b2=_0xd2bd90['_clone'](!0x0);_0x260863['_appendChild'](_0x3c47b2);}return _0x260863;}function wt(_0x2fa8cd,_0x3c26c3,_0x58deba=!0x0){const _0x2a2ae0=new _0x5b5c54();return _0x2a2ae0['rootName']=_0x2fa8cd,_0x2a2ae0['name']=_0x3c26c3,_0x2a2ae0['_isAttached']=_0x58deba,_0x2a2ae0['isAttached']=()=>_0x2a2ae0['_isAttached'],_0x2a2ae0;}function mt(_0x3b2425,_0x56cf1f,_0xb57ac2){const _0xca5cd1='elementEnd'==_0x3b2425['type']?_0xb57ac2['createPositionAt'](_0x3b2425['item'],'end'):_0xb57ac2['createPositionBefore'](_0x3b2425['item']);return _0xb57ac2['createPositionFromPath'](_0x56cf1f,_0xca5cd1['path'],_0xca5cd1['stickiness']);}function pt(_0x18351e,_0x473ec3,_0x2e311f){const _0x56cb2a='elementStart'==_0x18351e['type']?_0x2e311f['createPositionAt'](_0x18351e['item'],0x0):_0x2e311f['createPositionAfter'](_0x18351e['item']);return _0x2e311f['createPositionFromPath'](_0x473ec3,_0x56cb2a['path'],_0x56cb2a['stickiness']);}class RevisionHistorySaveRevisionFormView extends/* #__PURE__ -- @preserve */
|
|
25
|
+
_0x23054b(_0x58ee2e){['focusTracker'];['keystrokes'];['revisionNameInputView'];constructor(_0x1ed6b5,_0x3dd277){super(_0x1ed6b5),this['focusTracker']=new _0x4f5dcb(),this['keystrokes']=new _0x4ffae5(),this['set']('revisionNameInputValue',''),this['revisionNameInputView']=this['_createRevisionNameInput'](_0x3dd277),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'](),_0x3907d7({'view':this}),this['focusTracker']['add'](this['revisionNameInputView']['element']),this['keystrokes']['listenTo'](this['element']);const _0x329dc9=_0x5397d4=>_0x5397d4['stopPropagation']();this['keystrokes']['set']('arrowright',_0x329dc9),this['keystrokes']['set']('arrowleft',_0x329dc9),this['keystrokes']['set']('arrowup',_0x329dc9),this['keystrokes']['set']('arrowdown',_0x329dc9);}['focus'](){this['revisionNameInputView']['focus']();}get['revisionName'](){return this['revisionNameInputView']['fieldView']['element']['value']['trim']();}set['revisionName'](_0x10c6a9){this['revisionNameInputView']['fieldView']['element']['value']=_0x10c6a9['trim']();}['reset'](){this['revisionNameInputView']['fieldView']['element']['value']='',this['revisionNameInputView']['errorText']=null;}['_createRevisionNameInput'](_0x219214){const _0xfee303=new _0x2fa598(this['locale'],_0x2a167b),_0x1d739d=_0xfee303['fieldView'];_0x1d739d['extendTemplate']({'attributes':{'maxlength':'220'}});let _0x3c9644=ft(this['locale'],'Name\x20of\x20the\x20revision');return!_0x219214&&(_0x3c9644+='\x20('+ft(this['locale'],'optional')+')'),(_0xfee303['label']=_0x3c9644,_0x1d739d['on']('input',()=>{this['revisionNameInputValue']=_0x1d739d['element']['value']['trim']();}),_0xfee303);}}class RevisionHistoryUI extends _0x2a792a{static get['pluginName'](){return'RevisionHistoryUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[RevisionTracker];}['_saveRevisionFormView'];['init'](){const _0x46b0ff=this['editor'],_0x303526=_0x46b0ff['plugins']['get']('RevisionTracker');_0x46b0ff['ui']['componentFactory']['add']('revisionHistory',_0x1fcefc=>{const _0x2dd708=_0x3d47ad(_0x1fcefc),_0x1a23dc=_0x2dd708['panelView']['children'],_0x366469=new _0x21f96a(_0x1fcefc),_0x43cbfb=new _0x184cee(_0x1fcefc),_0x172c51=this['_createSaveRevisionButton'](_0x5e0dcc),_0x553070=new _0x184cee(_0x1fcefc),_0x154b99=this['_createOpenRevisionButton'](_0x5e0dcc);return _0x2dd708['bind']('isEnabled')['to'](_0x303526,'isReady',_0x303526,'isEnabled',_0x46b0ff,'isReadOnly',(_0x19bcb2,_0x4f86ae,_0x4a462d)=>_0x19bcb2&&_0x4f86ae&&!_0x4a462d),_0x2dd708['buttonView']['set']({'icon':_0x91e0d6,'label':ft(_0x1fcefc,'Revision\x20history'),'tooltip':!0x0}),_0x172c51['set']({'withText':!0x0,'role':'menuitem'}),_0x154b99['set']({'withText':!0x0,'role':'menuitem'}),this['listenTo'](_0x154b99,'execute',()=>{_0x2dd708['isOpen']=!0x1,_0x46b0ff['editing']['view']['focus']();},{'priority':'low'}),_0x43cbfb['children']['add'](_0x172c51),_0x553070['children']['add'](_0x154b99),_0x366469['role']='menu',_0x366469['items']['addMany']([_0x43cbfb,_0x553070]),_0x1a23dc['add'](_0x366469),_0x2dd708;}),_0x46b0ff['ui']['componentFactory']['add']('menuBar:revisionHistory',()=>this['_registerMenuComponent']());}['_registerMenuComponent'](){const _0x24526b=this['editor'],_0x203ef5=_0x24526b['locale'],_0x5bfb97=_0x24526b['plugins']['get']('RevisionTracker'),_0x508a8d=new _0xfce8ed(_0x203ef5),_0x3d8b61=new _0x141f32(_0x203ef5);_0x508a8d['bind']('isEnabled')['to'](_0x5bfb97,'isReady',_0x5bfb97,'isEnabled',_0x24526b,'isReadOnly',(_0x1010d2,_0x332c73,_0x3e5fb4)=>_0x1010d2&&_0x332c73&&!_0x3e5fb4),_0x508a8d['buttonView']['set']({'icon':_0x91e0d6,'label':ft(_0x203ef5,'Revision\x20history')});const _0x16c0de=new tt(_0x203ef5,_0x508a8d),_0x1e9664=this['_createSaveRevisionButton'](it);_0x1e9664['delegate']('execute')['to'](_0x508a8d),_0x16c0de['children']['add'](_0x1e9664),_0x3d8b61['items']['add'](_0x16c0de);const _0x5122ea=new tt(_0x203ef5,_0x508a8d),_0x4f02dc=this['_createOpenRevisionButton'](it);return _0x4f02dc['delegate']('execute')['to'](_0x508a8d),_0x5122ea['children']['add'](_0x4f02dc),_0x3d8b61['items']['add'](_0x5122ea),_0x508a8d['panelView']['children']['add'](_0x3d8b61),_0x508a8d;}['_createSaveRevisionButton'](_0x4bf05a){const _0x59f5b2=this['editor'],_0x39eabf=_0x59f5b2['plugins']['get']('RevisionTracker'),_0xe82cf5=new _0x4bf05a(_0x59f5b2['locale']);return _0xe82cf5['set']({'label':ft(_0x59f5b2['locale'],'Save\x20current\x20revision')}),_0xe82cf5['bind']('isEnabled')['to'](_0x39eabf,'isReady',_0x39eabf,'isEnabled',_0x59f5b2,'isReadOnly',(_0x352f13,_0x5b9af6,_0x27bcf9)=>_0x352f13&&_0x5b9af6&&!_0x27bcf9),this['listenTo'](_0xe82cf5,'execute',()=>{this['_showDialog']();}),_0xe82cf5;}['_createOpenRevisionButton'](_0x54639b){const _0x545bd7=this['editor'],_0x547621=_0x545bd7['plugins']['get']('RevisionTracker'),_0x4a5888=new _0x54639b(_0x545bd7['locale']);return _0x4a5888['set']({'label':ft(_0x545bd7['locale'],'Open\x20revision\x20history')}),_0x4a5888['bind']('isEnabled')['to'](_0x547621,'isReady',_0x545bd7,'isReadOnly',(_0x19d551,_0x1cd6de)=>_0x19d551&&!_0x1cd6de),this['listenTo'](_0x4a5888,'execute',()=>{_0x545bd7['config']['get']('revisionHistory')['showRevisionViewerCallback']();}),_0x4a5888;}['_showDialog'](){const _0x4e3a98=this['editor'],_0x5be58d=_0x4e3a98['locale'],_0x3d7352=_0x4e3a98['plugins']['get']('Dialog'),_0x8ed42c=_0x4e3a98['plugins']['get']('RevisionTracker');function _0x3f3490(_0x31b33a){_0x4e3a98['config']['get']('revisionHistory.requireRevisionName')&&''===_0x31b33a['revisionName']?_0x31b33a['revisionNameInputView']['errorText']=ft(_0x5be58d,'The\x20revision\x20name\x20cannot\x20be\x20empty.'):(_0x4e3a98['plugins']['get'](RevisionTracker)['saveRevision']({'name':_0x31b33a['revisionName']}),_0x3d7352['hide']());}this['_saveRevisionFormView']||(this['_createSaveRevisionFormView'](),this['_saveRevisionFormView']['on']('submit',()=>_0x3f3490(this['_saveRevisionFormView']))),this['_saveRevisionFormView']['reset'](),_0x3d7352['show']({'id':'revisionSave','title':ft(_0x5be58d,'Save\x20current\x20revision'),'isModal':!0x0,'content':this['_saveRevisionFormView'],'actionButtons':[{'label':ft(_0x4e3a98['locale'],'Cancel'),'withText':!0x0,'onExecute':()=>_0x3d7352['hide']()},{'label':ft(_0x4e3a98['locale'],'Accept'),'class':'ck-button-action','withText':!0x0,'onCreate'(_0x428726){_0x428726['bind']('isEnabled')['to'](_0x8ed42c,'isReady',_0x8ed42c,'isEnabled',_0x4e3a98,'isReadOnly',(_0x35093a,_0x33a3c4,_0x5106dd)=>_0x35093a&&_0x33a3c4&&!_0x5106dd);},'onExecute':()=>_0x3f3490(this['_saveRevisionFormView'])}]});}['_createSaveRevisionFormView'](){const _0xb5994f=this['editor'],_0x2b1768=_0xb5994f['locale'];this['_saveRevisionFormView']=new RevisionHistorySaveRevisionFormView(_0x2b1768,_0xb5994f['config']['get']('revisionHistory.requireRevisionName')),this['_saveRevisionFormView']['render']();}}class ChangeDetailsView extends _0x58ee2e{['changeId'];['_model'];constructor(_0x153837,_0xd80e38){super(_0x153837),this['_model']=_0xd80e38,this['changeId']=_0xd80e38['id'];const _0x507c71=this['bindTemplate'],_0xb20abe=ft(_0x153837,_0xd80e38['data']['isSuggestion']?'Suggested\x20by':'add'==_0xd80e38['type']?'Added\x20by':'Removed\x20by');this['set']('type',_0xd80e38['type']),this['setTemplate']({'tag':'div','attributes':{'class':['ck-annotation','ck-revision-change',_0x507c71['to']('type',_0x90daa8=>'ck-revision-change__'+_0x90daa8)],'tabindex':-0x1},'children':[{'tag':'span','children':[{'tag':'span','attributes':{'class':['ck-revision-change__label']},'children':[{'text':_0xb20abe}]},{'text':'\x20'+_0xd80e38['author']['name']}]}]});}['focus'](){this['element']['focus']();}}class ChangeItem extends/* #__PURE__ -- @preserve */
|
|
26
|
+
_0x2bb8d4(){['id'];['author'];['type'];['data'];['rootName'];constructor(_0x45bc5a){super(),this['id']=_0x45bc5a['id']||_0x529617(),this['author']=_0x45bc5a['author'],this['type']=_0x45bc5a['type'],this['data']=_0x45bc5a['data']||{},this['rootName']=_0x45bc5a['rootName'],this['set']('createdAt',_0x45bc5a['createdAt']);}['toJSON'](){return{'id':this['id'],'authorId':this['author']['id'],'type':this['type'],'data':this['data'],'createdAt':this['createdAt']};}}class RevisionDiff{['newRevisionId'];['oldRevisionId'];['changes'];constructor(_0x391445,_0xcbd547){this['newRevisionId']=_0x391445,this['oldRevisionId']=_0xcbd547,this['changes']=new _0x217353();}['_setChanges'](_0x4e240d){for(const _0x5cd1e7 of _0x4e240d)this['changes']['add'](_0x5cd1e7);}}class RevisionViewer extends _0x2a792a{['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[_0x2ab97d,et,RevisionsRepository,RevisionHistoryUtils];}constructor(_0x34121d){super(_0x34121d),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',(_0x4a3dff,_0x42719c,_0xe5f40)=>{this['activeChange']=null,this['activeView']=null,this['editor']['editing']['view']['change'](_0x490313=>{for(const _0x53a1fb of this['editor']['editing']['view']['document']['roots'])_0xe5f40?_0x490313['removeClass']('ck-editor__editable__overlay',_0x53a1fb):_0x490313['addClass']('ck-editor__editable__overlay',_0x53a1fb);});}),this['bind']('isNavigationMode')['to'](this,'activeChange',_0x24254f=>null!==_0x24254f),this['bind']('currentChangeNumber')['to'](this,'isReady',this,'diff',this,'activeChange',(_0x3fca76,_0x21ddf6,_0x4cf46a)=>_0x3fca76&&_0x4cf46a?_0x21ddf6['changes']['getIndex'](_0x4cf46a):0x0),this['bind']('numberOfChanges')['to'](this,'isReady',this,'diff',(_0x559db2,_0x5b1bc4)=>_0x559db2?_0x5b1bc4['changes']['length']:0x0),this['_changeView']=null,this['_changeIdToChange']=new Map(),this['_balloon']=this['editor']['plugins']['get'](et);}['init'](){const _0x11d84f=this['editor'],_0x43723b=new ShowChangeCommand(_0x11d84f,{'direction':'backward'}),_0x44dbe4=new ShowChangeCommand(_0x11d84f,{'direction':'forward'});(_0x11d84f['commands']['add']('showPreviousChange',_0x43723b),_0x11d84f['commands']['add']('showNextChange',_0x44dbe4),_0x11d84f['commands']['add']('restoreRevision',new RestoreRevisionCommand(_0x11d84f)),this['on']('change:numberOfChanges',()=>{_0x43723b['refresh'](),_0x44dbe4['refresh']();}),this['_setConversion'](),this['_initInteractions'](),_0x11d84f['enableReadOnlyMode']('revision-viewer'),_0x11d84f['plugins']['has']('WidgetToolbarRepository'))&&_0x11d84f['plugins']['get']('WidgetToolbarRepository')['forceDisabled']('revision-viewer');}async['getRevisionDocumentData'](_0x1fbd5e){return await this['_utils']['loadRevisionData'](_0x1fbd5e,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x1fbd5e);}async['getRevisionRootsAttributes'](_0x2364d0){return await this['_utils']['loadRevisionData'](_0x2364d0,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x2364d0);}async['compare'](_0x3c47dc,_0x2068b1,_0x3b57af=!0x1){if(!this['isEnabled'])return;const _0x3a97b6=this['diff'],_0x675483=this['repository'],_0x340f02='string'==typeof _0x3c47dc?_0x675483['getRevision'](_0x3c47dc):_0x3c47dc,_0x1d186b='string'==typeof _0x2068b1?_0x675483['getRevision'](_0x2068b1):_0x2068b1,_0x53680b=_0x340f02['id'],_0x702f31=_0x1d186b?_0x1d186b['id']:null;if(!_0x3b57af&&this['diff']&&this['diff']['newRevisionId']===_0x53680b&&this['diff']['oldRevisionId']===_0x702f31)return Promise['resolve']();this['isReady']=!0x1,this['activeView']=null,this['activeChange']=null,this['diff']=new RevisionDiff(_0x53680b,_0x702f31);const _0x3077d8=this['_getRevisionsRange'](_0x340f02,_0x1d186b,!0x0)['map'](_0x53d1f4=>this['_utils']['loadRevisionData'](_0x53d1f4,this['adapter']));return _0x3077d8['push'](new Promise(_0x13f706=>{setTimeout(_0x13f706,0x14);})),Promise['all'](_0x3077d8)['then'](()=>{if(!this['isEnabled'])return;this['_cleanUp']();const _0x467ad4=this['_getDiff'](_0x53680b,_0x702f31);for(const _0x2c3082 of _0x467ad4['changes'])this['_changeIdToChange']['set'](_0x2c3082['id'],_0x2c3082);this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x34e4d3=>{for(const _0x402b17 of this['editor']['model']['document']['getRootNames']())_0x34e4d3['detachRoot'](_0x402b17);for(const _0x307790 of Object['keys'](_0x467ad4['model'])){const _0x43783e=_0x467ad4['model'][_0x307790]['name'],_0x4cb2f0=_0x34e4d3['addRoot'](_0x307790,_0x43783e);for(const _0x3dc272 of Object['keys'](_0x467ad4['attributes'][_0x307790]))_0x34e4d3['setAttribute'](_0x3dc272,_0x467ad4['attributes'][_0x307790][_0x3dc272],_0x4cb2f0);_0x34e4d3['insert'](_0x467ad4['model'][_0x307790],_0x4cb2f0,0x0);}}),this['diff']['_setChanges'](this['_sortAndFilterDiffChanges'](_0x467ad4['changes'])),this['isReady']=!0x0;})['catch'](_0x37b185=>{console['error'](_0x37b185),this['_cleanUp'](),_0x3a97b6&&(this['diff']=_0x3a97b6),this['isReady']=!0x0;});}['addRevisionData'](_0x3d2ac5,_0x46a58d){const _0x5c8b34=this['repository']['createRevision'](_0x3d2ac5);return _0x5c8b34['on']('_update',(_0x51db2c,_0x4d37ce,_0x245be0)=>_0x46a58d(_0x4d37ce,_0x245be0,_0x5c8b34)),this['repository']['addRevision'](_0x5c8b34),_0x5c8b34;}['_cleanUp'](){this['activeChange']=null,this['_cleanMarkers'](),this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=null,this['_changeIdToChange']['clear'](),this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x1ad8fa=>{for(const _0x351b2e of this['editor']['model']['document']['getRootNames']())_0x1ad8fa['detachRoot'](_0x351b2e);});}['_sortAndFilterDiffChanges'](_0x3adf8c){const _0x24fc7a=[],_0x16214b=new Map();for(const _0x5a9ef5 of this['editor']['model']['document']['getRootNames']()){const _0x4efcd1=this['editor']['editing']['view']['getDomRoot'](_0x5a9ef5);if(!_0x4efcd1)continue;const _0x366cb2=_0x4efcd1['getClientRects']()['item'](0x0);_0x366cb2&&(_0x24fc7a['push'](_0x5a9ef5),_0x16214b['set'](_0x5a9ef5,_0x366cb2));}return _0x24fc7a['sort']((_0x3316d8,_0x4eadf6)=>{const _0x1f4a77=_0x16214b['get'](_0x3316d8),_0x4da979=_0x16214b['get'](_0x4eadf6);return _0x1f4a77['y']-_0x4da979['y']||_0x1f4a77['x']-_0x4da979['x'];}),(_0x3adf8c=_0x3adf8c['filter'](_0x55c071=>_0x24fc7a['includes'](_0x55c071['rootName'])))['sort']((_0x59c4ab,_0x1708cd)=>_0x24fc7a['indexOf'](_0x59c4ab['rootName'])-_0x24fc7a['indexOf'](_0x1708cd['rootName'])),_0x3adf8c;}['_makeTape'](_0x2fd011){const _0x3e5797=Array['from'](_0x2fd011['markers'])['filter'](([_0x10fa3e,_0x1d608e])=>_0x10fa3e['startsWith']('revision:')&&!_0x1d608e['isCollapsed']),_0x521cff=Array['from'](this['editor']['model']['createRangeIn'](_0x2fd011)['getWalker']({'singleCharacters':!0x0}));if(0x0!=_0x3e5797['length'])for(const _0xabf2cc of _0x521cff){const [_0x2f071f,_0x4b6e98]=_0x3e5797[0x0],[,_0x4f1f6e,_0x282312]=_0x2f071f['split'](':');if(_0x4b6e98['end']['isEqual'](_0xabf2cc['nextPosition'])&&_0x3e5797['shift'](),(_0xabf2cc['previousPosition']['isEqual'](_0x4b6e98['start'])||_0xabf2cc['previousPosition']['isAfter'](_0x4b6e98['start']))&&('insertion'==_0x4f1f6e?_0xabf2cc['isAdded']={'userId':_0x282312}:'deletion'==_0x4f1f6e&&(_0xabf2cc['isRemoved']={'userId':_0x282312})),0x0==_0x3e5797['length'])break;}return _0x521cff;}['_refreshStartEndIndex'](_0x4e09d9){const _0x25c5f0=new Map();for(let _0x4ebdd9=0x0;_0x4ebdd9<_0x4e09d9['length'];_0x4ebdd9++)'text'===_0x4e09d9[_0x4ebdd9]['type']?(_0x4e09d9[_0x4ebdd9]['item']['startIndex']=_0x4ebdd9,_0x4e09d9[_0x4ebdd9]['item']['endIndex']=_0x4ebdd9):('elementStart'===_0x4e09d9[_0x4ebdd9]['type']?_0x4e09d9[_0x4ebdd9]['item']['startIndex']=_0x4ebdd9:'elementEnd'===_0x4e09d9[_0x4ebdd9]['type']&&(_0x4e09d9[_0x4ebdd9]['item']['endIndex']=_0x4ebdd9),_0x25c5f0['set'](_0x4e09d9[_0x4ebdd9]['id'],_0x4ebdd9));for(const _0x397662 of _0x25c5f0['values']())'elementStart'===_0x4e09d9[_0x397662]['type']?_0x4e09d9[_0x397662]['item']['endIndex']=_0x25c5f0['get'](_0x4e09d9[_0x397662]['pairId']):'elementEnd'===_0x4e09d9[_0x397662]['type']&&(_0x4e09d9[_0x397662]['item']['startIndex']=_0x25c5f0['get'](_0x4e09d9[_0x397662]['pairId']));}['_processTape'](_0x1d01e8){for(let _0x5867c2=0x0;_0x5867c2<_0x1d01e8['length'];_0x5867c2++){if('elementStart'===_0x1d01e8[_0x5867c2]['type'])_0x1d01e8[_0x5867c2]['item']['startIndex']=_0x5867c2;else{if('elementEnd'===_0x1d01e8[_0x5867c2]['type']){_0x1d01e8[_0x5867c2]['item']['endIndex']=_0x5867c2;const _0x13257a=_0x1d01e8[_0x5867c2]['item']['startIndex'];_0x1d01e8[_0x13257a]['pairId']=_0x1d01e8[_0x5867c2]['id'],_0x1d01e8[_0x5867c2]['pairId']=_0x1d01e8[_0x13257a]['id'];}else _0x1d01e8[_0x5867c2]['item']['startIndex']=_0x5867c2,_0x1d01e8[_0x5867c2]['item']['endIndex']=_0x5867c2,_0x1d01e8[_0x5867c2]['pairId']=null;}_0x1d01e8[_0x5867c2]['markersStart']||(_0x1d01e8[_0x5867c2]['markersStart']=[],_0x1d01e8[_0x5867c2]['markersEnd']=[]);}}['_markInsertions'](_0x5141c5,_0x3a6d21){const _0x409c6b=_0x5141c5['filter'](_0x28ec03=>!_0x28ec03['isAdded']);for(let _0x58dce0=0x0;_0x58dce0<_0x3a6d21['length'];_0x58dce0++)_0x3a6d21[_0x58dce0]['isAdded']&&(_0x409c6b[_0x58dce0]['isAdded']=_0x3a6d21[_0x58dce0]['isAdded']);}['_getDiff'](_0x35a59d,_0x8a9129=null){const _0x37f625=this['repository']['getRevision'](_0x35a59d),_0x50d777=_0x8a9129?this['repository']['getRevision'](_0x8a9129):null,_0xd633f5=this['_getRevisionsRange'](_0x37f625,_0x50d777),_0x358c24=_0xd633f5[_0xd633f5['length']-0x1],_0x197a4f=new Map(),_0x16ad13={'model':{},'attributes':{},'changes':[]},_0x1aa79e=new Set(),_0x315746=new Map();for(let _0x1b49bc=_0xd633f5['length']-0x1;_0x1b49bc>=0x0;_0x1b49bc--){const _0x338066=_0xd633f5[_0x1b49bc];for(const _0x1188a2 of Object['keys'](_0x338066['diffData']))if(_0x338066['diffData'][_0x1188a2]['attachChange']){const _0x26fc85=_0x338066['diffData'][_0x1188a2]['attachChange'];_0x26fc85['isAttached']?(_0x1aa79e['add'](_0x1188a2),_0x315746['has'](_0x1188a2)&&_0x315746['get'](_0x1188a2)['userId']==_0x26fc85['userId']?_0x315746['delete'](_0x1188a2):_0x315746['set'](_0x1188a2,_0x26fc85)):_0x315746['has'](_0x1188a2)?(_0x1aa79e['delete'](_0x1188a2),_0x315746['delete'](_0x1188a2)):(_0x1aa79e['add'](_0x1188a2),_0x315746['set'](_0x1188a2,_0x26fc85));}else _0x1aa79e['add'](_0x1188a2);}for(const _0x115c61 of _0x1aa79e){const _0xe51f84=_0x315746['has'](_0x115c61)&&!_0x315746['get'](_0x115c61)['isAttached'];let _0x298bbc=_0xe51f84?_0xd633f5['length']-0x1:0x0;const _0x405ff1=_0xe51f84?-0x1:0x1;for(;_0xd633f5[_0x298bbc];){const _0x18866c=_0xd633f5[_0x298bbc];if(_0x18866c['diffData'][_0x115c61]){const _0x2fdf27=_0xe51f84?_0x18866c['diffData'][_0x115c61]['attributesBefore']:_0x18866c['diffData'][_0x115c61]['attributesAfter'];_0x16ad13['attributes'][_0x115c61]=_0x2fdf27?_0x21ca06(_0x2fdf27):{};break;}_0x298bbc+=_0x405ff1;}}for(const _0x14824c of _0xd633f5){_0x14824c['model']={};for(const _0x48dd93 of _0x14824c['authors'])_0x197a4f['set'](_0x48dd93['id'],_0x48dd93);for(const _0x50f9d4 of _0x1aa79e){const _0x592bf5=_0x14824c['diffData'][_0x50f9d4]?_0x14824c['diffData'][_0x50f9d4]['insertions']:'[]',_0x2d3a66=_0x14824c['diffData'][_0x50f9d4]?_0x14824c['diffData'][_0x50f9d4]['deletions']:'[]',_0x388476=_0x14824c['diffData'][_0x50f9d4]?.['rootElementName']||'$root';_0x14824c['model'][_0x50f9d4]={'insertions':this['_utils']['_makeModelFromViewString'](_0x592bf5,_0x388476),'deletions':this['_utils']['_makeModelFromViewString'](_0x2d3a66,_0x388476)};}}for(const _0x5de821 of _0x1aa79e){let _0x598a74=null,_0x16fac8=0x0;const _0x2cd6a5=_0xd633f5['map'](_0x3ba189=>_0x3ba189['diffData'][_0x5de821]?.['rootElementName'])['find'](_0x1c019c=>void 0x0!==_0x1c019c)||'$root',_0x2311b1=new Map(Array['from'](_0x37f625['model'][_0x5de821]['insertions']['markers'])['filter'](([_0x1238e4])=>!_0x1238e4['startsWith']('revision:')));let _0x1ef517=0x0;for(const _0x437044 of _0xd633f5){const _0x5cf66a=this['_makeTape'](_0x437044['model'][_0x5de821]['insertions']);_0x437044==_0x37f625?(_0x598a74=_0x5cf66a,_0x16fac8=_0x598a74['length'],_0x598a74['forEach'](_0x1cfd49=>{_0x1cfd49['id']=_0x1ef517++;}),this['_processTape'](_0x598a74)):this['_markInsertions'](_0x598a74,_0x5cf66a);const _0xd5d83b=_0x598a74['filter'](_0x22c469=>!_0x22c469['isAdded'])['map'](_0x35bb0e=>_0x35bb0e['id']);let _0x2263ae=0x0;const _0x4bf71d=this['_makeTape'](_0x437044['model'][_0x5de821]['deletions']);_0x4bf71d['forEach'](_0x566090=>{_0x566090['isRemoved']?_0x566090['id']=_0x16fac8++:_0x566090['id']=_0xd5d83b[_0x2263ae++];}),this['_processTape'](_0x4bf71d),this['_setDistance'](_0x598a74,'isAdded'),this['_setDistance'](_0x4bf71d,'isRemoved'),_0x437044==_0x37f625&&this['_markMarkers'](_0x598a74,_0x2311b1),_0x598a74=this['_joinTapes'](_0x598a74,_0x4bf71d),this['_refreshStartEndIndex'](_0x598a74),this['_setDistance'](_0x598a74,'isRemoved');}_0x598a74=_0x598a74['filter'](_0x5ce8db=>!(_0x5ce8db['isAdded']&&_0x5ce8db['isRemoved']));const _0x59acf1=new Map(_0x358c24['model'][_0x5de821]['deletions']['markers']),_0x48e2ba=new Set(_0x2311b1['keys']());for(const _0x5eccae of _0x59acf1['keys']())_0x48e2ba['delete'](_0x5eccae);this['_markSuggestions'](_0x598a74,_0x48e2ba),this['_fixObsoleteTags'](_0x598a74),_0x598a74=this['_removeMissingPairs'](_0x598a74),_0x598a74=this['_markMismatchedRemovedTags'](_0x598a74),_0x598a74=this['_removeUnsupportedChanges'](_0x598a74);const {root:_0x2808f6,changes:_0x15d2d5}=this['_makeModelFromTape'](_0x598a74,_0x197a4f,_0x5de821,_0x2cd6a5);_0x16ad13['model'][_0x5de821]=_0x2808f6;const _0x10b28c=_0x315746['get'](_0x5de821);if(_0x10b28c){const _0x18c0ec=_0x197a4f['get'](_0x10b28c['userId']),_0x59d7a5=new ChangeItem({'author':_0x18c0ec,'type':_0x10b28c['isAttached']?'add':'remove','data':{'isOnRoot':!0x0},'createdAt':new Date(),'rootName':_0x5de821});_0x15d2d5['unshift'](_0x59d7a5),_0x16ad13['attributes'][_0x5de821]['revisionHistoryAttachChange']=_0x59d7a5['id'];}_0x16ad13['changes']=_0x16ad13['changes']['concat'](_0x15d2d5);}return _0x16ad13;}['_markMarkers'](_0x57221d,_0x29c8a7){for(let _0x3a5ea4=0x0;_0x3a5ea4<_0x57221d['length'];_0x3a5ea4++)for(const [_0x3e7a7b,_0x36aa3b]of _0x29c8a7)!_0x36aa3b['isCollapsed']&&_0x36aa3b['start']['isEqual'](_0x57221d[_0x3a5ea4]['previousPosition'])&&_0x57221d[_0x3a5ea4]['markersStart']['push'](_0x3e7a7b),_0x36aa3b['end']['isEqual'](_0x57221d[_0x3a5ea4]['nextPosition'])&&_0x57221d[_0x3a5ea4]['markersEnd']['push'](_0x3e7a7b);}['_joinTapes'](_0x2aef85,_0x367d88){let _0x4f5531=[],_0x392d5d=0x0,_0x7e3e25=0x0;for(;_0x392d5d<_0x2aef85['length']||_0x7e3e25<_0x367d88['length'];){const _0x31fc39=_0x2aef85[_0x392d5d]||{},_0x58f86b=_0x367d88[_0x7e3e25]||{};if(_0x31fc39['id']==_0x58f86b['id'])_0x392d5d++,_0x7e3e25++,_0x4f5531['push'](_0x31fc39);else{if(_0x58f86b['isRemoved']&&_0x31fc39['isAdded']){const {commonTape:_0x99ae94,iEnd:_0x2d2e2e,jEnd:_0x584aa9}=this['_threeWayMerge'](_0x2aef85,_0x392d5d,_0x367d88,_0x7e3e25);_0x4f5531=_0x4f5531['concat'](_0x99ae94),_0x392d5d=_0x2d2e2e,_0x7e3e25=_0x584aa9;}else _0x58f86b['isRemoved']?(_0x7e3e25++,_0x4f5531['push'](_0x58f86b)):(_0x392d5d++,_0x4f5531['push'](_0x31fc39));}}return _0x4f5531;}['_markSuggestions'](_0x526840,_0x20f349){const _0x61b280=[];for(let _0x203f2c=0x0;_0x203f2c<_0x526840['length'];_0x203f2c++){for(let _0x5ab57a=0x0;_0x5ab57a<_0x526840[_0x203f2c]['markersStart']['length'];_0x5ab57a++){const _0x42ac5d=_0x526840[_0x203f2c]['markersStart'][_0x5ab57a];if(!_0x20f349['has'](_0x42ac5d))continue;const {group:_0x412093,type:_0x5deb9,authorId:_0x5dcc2c}=_0x1fa4df(_0x42ac5d);'revision-suggestion'!=_0x412093||'insertion'!=_0x5deb9&&'deletion'!=_0x5deb9||(_0x61b280['unshift']({'type':_0x5deb9,'name':_0x42ac5d,'userId':_0x5dcc2c}),_0x526840[_0x203f2c]['markersStart']['splice'](_0x5ab57a,0x1),_0x5ab57a--);}_0x49947e(_0x526840[_0x203f2c]);for(let _0x2d3ef8=0x0;_0x2d3ef8<_0x526840[_0x203f2c]['markersEnd']['length'];_0x2d3ef8++){const _0x5f5382=_0x526840[_0x203f2c]['markersEnd'][_0x2d3ef8];if(!_0x20f349['has'](_0x5f5382))continue;const {group:_0x50b9b1,type:_0x5ef20c}=_0x1fa4df(_0x5f5382);if('revision-suggestion'!=_0x50b9b1||'insertion'!=_0x5ef20c&&'deletion'!=_0x5ef20c)continue;_0x526840[_0x203f2c]['markersEnd']['splice'](_0x2d3ef8,0x1),_0x2d3ef8--;const _0x3a4d1e=_0x61b280['findIndex'](_0x2ac339=>_0x2ac339['name']==_0x5f5382);_0x3a4d1e>-0x1&&_0x61b280['splice'](_0x3a4d1e,0x1);}}function _0x1fa4df(_0x4986a6){const _0x2ac00a=_0x4986a6['split'](':');return{'group':_0x2ac00a[0x0],'type':_0x2ac00a[0x1],'subType':_0x2ac00a['length']>=0x5?_0x2ac00a[0x2]:null,'id':_0x2ac00a['length']<0x5?_0x2ac00a[0x2]:_0x2ac00a[0x3],'authorId':_0x2ac00a['length']<0x5?_0x2ac00a[0x3]:_0x2ac00a[0x4],'markerCount':0x6==_0x2ac00a['length']?_0x2ac00a[0x5]:null};}function _0x49947e(_0x271473){for(let _0x2eaa1e=0x0;_0x2eaa1e<_0x61b280['length'];_0x2eaa1e++){if(_0x271473['isAdded']&&'insertion'==_0x61b280[_0x2eaa1e]['type']&&_0x271473['isAdded']['userId']==_0x61b280[_0x2eaa1e]['userId'])return _0x271473['isAddSuggestion']=_0x61b280[_0x2eaa1e],void delete _0x271473['isAdded'];if(!_0x271473['isAdded']&&!_0x271473['isRemoved']&&'deletion'==_0x61b280[_0x2eaa1e]['type'])return void(_0x271473['isRemoveSuggestion']=_0x61b280[_0x2eaa1e]);}}}['_setDistance'](_0x315af9,_0x517c75){let _0x36acce=0x0,_0x28f648=!0x1;const _0x192f8a=new Map();for(const _0xc3ab0a of _0x315af9)_0xc3ab0a[_0x517c75]?_0x28f648&&(_0x36acce++,_0x28f648=!0x1):(_0x36acce++,_0x28f648=!0x0),_0x192f8a['set'](_0xc3ab0a['id'],_0x36acce);for(let _0x272671=0x0;_0x272671<_0x315af9['length'];_0x272671++){if('isRemoved'==_0x517c75&&_0x315af9[_0x272671]['isAdded']||'isAdded'==_0x517c75&&_0x315af9[_0x272671]['isRemoved'])continue;if('text'==_0x315af9[_0x272671]['type']){_0x315af9[_0x272671]['distance']=0x0;continue;}const _0x3e6a4e=_0x192f8a['get'](_0x315af9[_0x272671]['pairId']),_0x1d8b9a=_0x192f8a['get'](_0x315af9[_0x272671]['id']);_0x315af9[_0x272671]['distance']=_0x3e6a4e-_0x1d8b9a;}}['_getRevisionsRange'](_0x4515f5,_0x3e0f7d,_0x1d1936=!0x1){const _0x564a1a=[];let _0x54cb26=this['repository']['getIndex'](_0x4515f5),_0x416074=this['repository']['getIndex'](_0x3e0f7d);for(-0x1==_0x416074&&(_0x416074=this['repository']['_revisions']['length'],_0x1d1936=!0x1);_0x54cb26<_0x416074;)_0x564a1a['push'](this['repository']['getRevision'](_0x54cb26)),_0x54cb26++;return _0x1d1936&&_0x564a1a['push'](this['repository']['getRevision'](_0x54cb26)),_0x564a1a;}['_threeWayMerge'](_0x370036,_0x440ca8,_0x34de9b,_0x4e97d0){const _0x5af881=this['editor']['model']['schema'];let _0xd9819=_0x440ca8;for(;_0x370036[_0xd9819]&&_0x370036[_0xd9819]['isAdded'];)_0xd9819++;let _0x22c8f8=_0x4e97d0;for(;_0x34de9b[_0x22c8f8]&&_0x34de9b[_0x22c8f8]['isRemoved'];)_0x22c8f8++;_0xd2c5b3(_0x370036,_0x440ca8,_0xd9819),_0xd2c5b3(_0x34de9b,_0x4e97d0,_0x22c8f8);const _0x155d11=_0x34de9b['slice'](_0x4e97d0,_0x22c8f8)['concat'](_0x370036['slice'](_0x440ca8,_0xd9819));return _0x155d11['sort']((_0x5bdb78,_0x40a240)=>_0x5bdb78['side']!=_0x40a240['side']?_0x5bdb78['side']-_0x40a240['side']:_0x5bdb78['level']!=_0x40a240['level']?_0x5bdb78['level']-_0x40a240['level']:_0x5bdb78['distance']!=_0x40a240['distance']?_0x40a240['distance']-_0x5bdb78['distance']:!!_0x5bdb78['isAdded']!=!!_0x40a240['isAdded']?-0x1==_0x5bdb78['side']||0x0==_0x5bdb78['side']?_0x5bdb78['isAdded']?-0x1:0x1:_0x5bdb78['isAdded']?0x1:-0x1:_0x5bdb78['index']-_0x40a240['index']),{'commonTape':_0x155d11,'iEnd':_0xd9819,'jEnd':_0x22c8f8};function _0xd2c5b3(_0x1d89b6,_0x445391,_0x404c76){let _0x200ef4=-0x1,_0x755dea=Number['POSITIVE_INFINITY'],_0x57a5a8=!0x0;for(let _0x24a093=_0x445391;_0x24a093<_0x404c76;_0x24a093++)if(_0x5af881['isInline'](_0x1d89b6[_0x24a093]['item'])||(_0x57a5a8=!0x1),_0x1d89b6[_0x24a093]['item']['startIndex']<_0x445391&&(_0x200ef4=_0x24a093),_0x1d89b6[_0x24a093]['item']['endIndex']>=_0x404c76){_0x755dea=_0x24a093;break;}_0x57a5a8&&(_0x200ef4=_0x404c76-0x1);for(let _0x152f1b=_0x445391;_0x152f1b<_0x404c76;_0x152f1b++)_0x1d89b6[_0x152f1b]['side']=_0x152f1b<=_0x200ef4?-0x1:_0x152f1b<_0x755dea?0x0:0x1,_0x1d89b6[_0x152f1b]['index']=_0x152f1b;let _0x3896a1=0x0;for(let _0x6a923b=_0x445391;_0x6a923b<=_0x200ef4;_0x6a923b++)0x0==_0x1d89b6[_0x6a923b]['distance']?_0x1d89b6[_0x6a923b]['level']=_0x3896a1:(_0x3896a1++,_0x1d89b6[_0x6a923b]['level']=_0x3896a1,_0x3896a1++);for(let _0x54ae15=_0x445391;_0x54ae15<_0x404c76;_0x54ae15++)0x0==_0x1d89b6[_0x54ae15]['side']&&(_0x1d89b6[_0x54ae15]['level']=_0x3896a1);_0x3896a1=0x0;for(let _0x5ebfca=_0x404c76-0x1;_0x5ebfca>=_0x755dea;_0x5ebfca--)0x0==_0x1d89b6[_0x5ebfca]['distance']?_0x1d89b6[_0x5ebfca]['level']=_0x3896a1:(_0x3896a1--,_0x1d89b6[_0x5ebfca]['level']=_0x3896a1,_0x3896a1--);}}['_fixObsoleteTags'](_0x18d142){const _0x2190dd=new Map(),_0x5e2edd=this['editor']['model']['schema'];for(let _0x8ead51=0x1;_0x8ead51<_0x18d142['length'];_0x8ead51++){let _0x365b98,_0x513aaf,_0x48feae;const _0x2f22e1=_0x18d142[_0x8ead51],_0x369257=_0x18d142[_0x8ead51-0x1];if('text'==_0x2f22e1['type'])continue;if(_0x2f22e1['type']!=_0x369257['type'])continue;if(!_0x5e2edd['isBlock'](_0x369257['item'])||_0x5e2edd['isLimit'](_0x369257['item']))continue;if(!_0x5e2edd['isBlock'](_0x2f22e1['item'])||_0x5e2edd['isLimit'](_0x2f22e1['item']))continue;if((_0x18d142[_0x8ead51]['isAdded']||_0x18d142[_0x8ead51]['isAddSuggestion'])&&_0x18d142[_0x8ead51-0x1]['isRemoved'])_0x365b98=_0x18d142[_0x8ead51],_0x513aaf=_0x18d142[_0x8ead51-0x1],_0x48feae=_0x8ead51-0x1;else{if(!_0x18d142[_0x8ead51]['isRemoved']||!_0x18d142[_0x8ead51-0x1]['isAdded']&&!_0x18d142[_0x8ead51-0x1]['isAddSuggestion'])continue;_0x365b98=_0x18d142[_0x8ead51-0x1],_0x513aaf=_0x18d142[_0x8ead51],_0x48feae=_0x8ead51;}const _0x28b4d6=_0x365b98['level']==_0x513aaf['level'],_0x809086=Math['abs'](_0x365b98['level'])<Math['abs'](_0x513aaf['level'])&&0x0==_0x513aaf['distance'];(_0x28b4d6||_0x809086)&&(_0x2190dd['set'](_0x513aaf['id'],_0x365b98['id']),_0x18d142['splice'](_0x48feae,0x1),_0x8ead51--,_0x365b98['isAdded']=!0x1);}for(let _0x1cd35f=0x0;_0x1cd35f<_0x18d142['length'];_0x1cd35f++)_0x2190dd['has'](_0x18d142[_0x1cd35f]['pairId'])&&(_0x18d142[_0x1cd35f]['pairId']=_0x2190dd['get'](_0x18d142[_0x1cd35f]['pairId']));}['_removeMissingPairs'](_0x40fe19){const _0x346fa3=new Set(_0x40fe19['map'](_0x532a96=>_0x532a96['id']));for(let _0x673537=0x0;_0x673537<_0x40fe19['length'];_0x673537++)_0x346fa3['has'](_0x40fe19[_0x673537]['pairId'])||0x0==_0x40fe19[_0x673537]['distance']||(_0x40fe19[_0x673537]['isIncorrect']=!0x0);return _0x40fe19['filter'](_0x4efaa7=>!_0x4efaa7['isIncorrect']);}['_markMismatchedRemovedTags'](_0x454af0){const _0x4d6a86=new Set();for(let _0x38620a=0x0;_0x38620a<_0x454af0['length'];_0x38620a++){if(_0x4d6a86['has'](_0x454af0[_0x38620a]['id'])&&_0x454af0[_0x38620a]['isRemoved']&&(_0x454af0[_0x38620a]['isIncorrect']=!0x0),_0x454af0[_0x38620a]['isIncorrect'])continue;if(0x0==_0x454af0[_0x38620a]['distance'])continue;if('elementStart'!=_0x454af0[_0x38620a]['type'])continue;if(null==_0x454af0[_0x38620a]['pairId'])continue;let _0x1faaff=_0x38620a+0x1,_0xbc1bdd=0x0;for(;_0x454af0[_0x1faaff]['id']!=_0x454af0[_0x38620a]['pairId'];)'elementStart'==_0x454af0[_0x1faaff]['type']?_0xbc1bdd++:'elementEnd'==_0x454af0[_0x1faaff]['type']&&_0xbc1bdd--,_0x1faaff++;if(0x0!=_0xbc1bdd){if(_0x454af0[_0x38620a]['isRemoved'])_0x454af0[_0x38620a]['isIncorrect']=!0x0;else{for(;_0x1faaff!=_0x38620a;)_0x454af0[_0x1faaff]['isRemoved']&&0x0!=_0x454af0[_0x1faaff]['distance']&&(_0x454af0[_0x1faaff]['isIncorrect']=!0x0,_0x4d6a86['add'](_0x454af0[_0x1faaff]['pairId'])),_0x1faaff--;}}}return _0x454af0['filter'](_0x2b615f=>!_0x2b615f['isIncorrect']);}['_removeUnsupportedChanges'](_0x49a0e2){const _0x42a317=this['editor']['model']['schema'];for(let _0x4b51c2=0x0;_0x4b51c2<_0x49a0e2['length'];_0x4b51c2++){if(!(_0x49a0e2[_0x4b51c2]['isAdded']||_0x49a0e2[_0x4b51c2]['isAddSuggestion']||_0x49a0e2[_0x4b51c2]['isRemoved']||_0x49a0e2[_0x4b51c2]['isRemoveSuggestion']))continue;if(0x0==_0x49a0e2[_0x4b51c2]['distance'])continue;const _0x2adfbb=_0x49a0e2[_0x4b51c2]['item'];_0x42a317['isBlock'](_0x2adfbb)||_0x42a317['isLimit'](_0x2adfbb)||(_0x49a0e2[_0x4b51c2]['isAdded']&&delete _0x49a0e2[_0x4b51c2]['isAdded'],_0x49a0e2[_0x4b51c2]['isAddSuggestion']&&delete _0x49a0e2[_0x4b51c2]['isAddSuggestion'],_0x49a0e2[_0x4b51c2]['isRemoveSuggestion']&&delete _0x49a0e2[_0x4b51c2]['isRemoveSuggestion'],_0x49a0e2[_0x4b51c2]['isRemoved']&&(_0x49a0e2[_0x4b51c2]['isIncorrect']=!0x0));}return _0x49a0e2['filter'](_0x3d04ca=>!_0x3d04ca['isIncorrect']);}['_makeModelFromTape'](_0x207138,_0x2cf91b,_0xc0079e,_0x5d822e){const _0x12a081=new _0x5b5c54(),_0x124459=[],_0x30735b=new Map(),_0x563051=this['editor']['model'],_0x5a1175=_0x563051['schema'],_0xcf4ede=[_0x12a081],_0x40820c={},_0xabfb18={'isAdded':[],'isRemoved':[],'isAddSuggestion':[],'isRemoveSuggestion':[]};_0x12a081['name']=_0x5d822e;let _0x5a81d2=null;const _0x20c24a=[0x0];for(let _0x43e02d=0x0;_0x43e02d<_0x207138['length'];_0x43e02d++)if('elementStart'===_0x207138[_0x43e02d]['type']){_0x207138[_0x43e02d]['previousPosition']=_0x563051['createPositionFromPath'](_0x12a081,_0x20c24a);const _0x56f661=new _0x3bd734(_0x207138[_0x43e02d]['item']['name'],_0x207138[_0x43e02d]['item']['getAttributes']());_0xcf4ede[0x0]['_appendChild'](_0x56f661),_0x20c24a['push'](0x0),_0xcf4ede['unshift'](_0x56f661),_0x207138[_0x43e02d]['nextPosition']=_0x563051['createPositionFromPath'](_0x12a081,_0x20c24a);}else'elementEnd'===_0x207138[_0x43e02d]['type']?(_0xcf4ede['shift'](),_0x207138[_0x43e02d]['previousPosition']=_0x563051['createPositionFromPath'](_0x12a081,_0x20c24a),_0x20c24a['pop'](),_0x20c24a[_0x20c24a['length']-0x1]++,_0x207138[_0x43e02d]['nextPosition']=_0x563051['createPositionFromPath'](_0x12a081,_0x20c24a)):(_0x207138[_0x43e02d]['previousPosition']=_0x563051['createPositionFromPath'](_0x12a081,_0x20c24a),_0x5a81d2?_0x5a81d2['_data']+=_0x207138[_0x43e02d]['item']['data']:_0x5a81d2=new _0x4c4167(_0x207138[_0x43e02d]['item']['data'],_0x207138[_0x43e02d]['item']['getAttributes']()),_0x207138[_0x43e02d+0x1]&&'text'===_0x207138[_0x43e02d+0x1]['type']&&_0x40ba31(_0x5a81d2,_0x207138[_0x43e02d+0x1]['item'])||(_0xcf4ede[0x0]['_appendChild'](_0x5a81d2),_0x5a81d2=null),_0x20c24a[_0x20c24a['length']-0x1]+=_0x207138[_0x43e02d]['item']['offsetSize'],_0x207138[_0x43e02d]['nextPosition']=_0x563051['createPositionFromPath'](_0x12a081,_0x20c24a));for(let _0x15152b=0x0;_0x15152b<_0x207138['length'];_0x15152b++){const _0x4edc45=_0x207138[_0x15152b]['previousPosition'],_0x16d705=_0x207138[_0x15152b]['nextPosition'];for(const _0x286f31 of _0x207138[_0x15152b]['markersStart'])_0x30735b['set'](_0x286f31,{'start':_0x4edc45,'end':null});_0x5e429a('isRemoveSuggestion',_0x15152b,_0x4edc45,_0x16d705),_0x5e429a('isAddSuggestion',_0x15152b,_0x4edc45,_0x16d705),_0x5e429a('isRemoved',_0x15152b,_0x4edc45,_0x16d705),_0x5e429a('isAdded',_0x15152b,_0x4edc45,_0x16d705);for(const _0x2b4142 of _0x207138[_0x15152b]['markersEnd']){const _0x1e8fc3=_0x30735b['get'](_0x2b4142);_0x1e8fc3?_0x1e8fc3['end']=_0x16d705:_0x30735b['set'](_0x2b4142,{'start':_0x16d705,'end':_0x16d705});}}for(const [_0x5edcaa,_0x143fc4]of _0x30735b){const _0x590540=this['editor']['model']['createRange'](_0x143fc4['start'],_0x143fc4['end']);_0x12a081['markers']['set'](_0x5edcaa,_0x590540);}return _0x124459['sort']((_0x2251ef,_0x86943f)=>{const _0x3cacd6=_0x12a081['markers']['get']('revision:'+_0x2251ef['id']),_0x5dd86d=_0x12a081['markers']['get']('revision:'+_0x86943f['id']);return _0x3cacd6['start']['isBefore'](_0x5dd86d['start'])?-0x1:_0x3cacd6['start']['isAfter'](_0x5dd86d['start'])?0x1:_0x3cacd6['end']['isBefore'](_0x5dd86d['end'])?-0x1:_0x3cacd6['end']['isAfter'](_0x5dd86d['end'])?0x1:'add'===_0x2251ef['type']?-0x1:0x1;}),{'root':_0x12a081,'changes':_0x124459};function _0x5e429a(_0x1dde1a,_0x97de2e,_0x36a116,_0xc0c97b){const _0x14472e=!!_0x207138[_0x97de2e][_0x1dde1a],_0x378c93=_0x14472e?_0x207138[_0x97de2e][_0x1dde1a]['userId']:null,_0x55aab6=_0x97de2e===_0x207138['length']-0x1,_0x1ab49f=_0xabfb18[_0x1dde1a][0x0],_0x28a51=_0x5a1175['isObject'](_0x207138[_0x97de2e]['item']);!_0x40820c[_0x1dde1a]&&_0x14472e?_0x40820c[_0x1dde1a]={'start':_0x36a116,'tapeItem':_0x207138[_0x97de2e],'userId':_0x378c93,'type':_0x1dde1a}:_0x40820c[_0x1dde1a]&&!_0x14472e?(_0x40820c[_0x1dde1a]['end']=_0x36a116,_0x4595f3(_0x40820c[_0x1dde1a]),_0x40820c[_0x1dde1a]=null):_0x40820c[_0x1dde1a]&&_0x14472e&&_0x40820c[_0x1dde1a]['userId']!==_0x378c93&&(_0x40820c[_0x1dde1a]['end']=_0x36a116,_0x1ab49f&&_0x1ab49f['userId']===_0x40820c[_0x1dde1a]['userId']||_0x4595f3(_0x40820c[_0x1dde1a]),_0x40820c[_0x1dde1a]={'start':_0x36a116,'tapeItem':_0x207138[_0x97de2e],'userId':_0x378c93,'type':_0x1dde1a}),_0x40820c[_0x1dde1a]&&_0x28a51&&('elementStart'!==_0x207138[_0x97de2e]['type']||_0x1ab49f&&_0x1ab49f['userId']===_0x378c93||_0xabfb18[_0x1dde1a]['unshift']({'userId':_0x378c93,'object':_0x207138[_0x97de2e]['item'],'change':_0x40820c[_0x1dde1a]}),'elementEnd'===_0x207138[_0x97de2e]['type']&&_0x1ab49f&&_0x1ab49f['object']===_0x207138[_0x97de2e]['item']&&(_0xabfb18[_0x1dde1a]['shift'](),_0x40820c[_0x1dde1a]=_0x1ab49f['change'])),_0x40820c[_0x1dde1a]&&_0x55aab6&&(_0x40820c[_0x1dde1a]['end']=_0xc0c97b,_0x4595f3(_0x40820c[_0x1dde1a]),_0x40820c[_0x1dde1a]=null);}function _0x4595f3({start:_0x31ff07,end:_0x2a6c4a,tapeItem:_0x10c7d5,userId:_0x546f24,type:_0x42c5fe}){const _0x5931b9=_0x10c7d5['item'],_0x401c6d=_0x563051['schema']['isBlock'](_0x5931b9)&&!_0x563051['schema']['isLimit'](_0x5931b9),_0x55ca6b=_0x31ff07['nodeAfter']==_0x2a6c4a['parent']&&_0x2a6c4a['isAtStart'];if(_0x401c6d&&_0x55ca6b)return;const _0x18b378=_0x563051['createRange'](_0x31ff07,_0x2a6c4a),_0x31c794=_0x2cf91b['get'](_0x546f24),_0x390b8f=new ChangeItem({'author':_0x31c794,'type':'isAdded'==_0x42c5fe||'isAddSuggestion'==_0x42c5fe?'add':'remove','data':{'isSuggestion':'isAddSuggestion'==_0x42c5fe||'isRemoveSuggestion'==_0x42c5fe},'createdAt':new Date(),'rootName':_0xc0079e});_0x124459['push'](_0x390b8f),_0x12a081['markers']['set']('revision:'+_0x390b8f['id'],_0x18b378);}function _0x40ba31(_0x24c0bd,_0x4de9d7){const _0x4607d4=_0x24c0bd['getAttributes'](),_0x27ea6b=_0x4de9d7['getAttributes']();for(const _0x469d8e of _0x4607d4){if(_0x469d8e[0x1]!==_0x4de9d7['getAttribute'](_0x469d8e[0x0]))return!0x1;_0x27ea6b['next']();}return _0x27ea6b['next']()['done'];}}['_setConversion'](){this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision','view':_0x21126a=>{const _0x44b7fb=_0x21126a['markerName']['split'](':')[0x1],_0x9d419c=this['_getChangeFromId'](_0x44b7fb);if(!_0x9d419c)return null;const _0x55bb8f='add'==_0x9d419c['type']?'insertion':'deletion',_0x3f1be9=['ck-suggestion-marker','ck-suggestion-marker-'+_0x55bb8f];return _0x9d419c['data']['isSuggestion']&&_0x3f1be9['push']('ck-suggestion-marker-'+_0x55bb8f+'-new'),this['activeChange']==_0x9d419c&&_0x3f1be9['push']('ck-suggestion-marker--active'),{'classes':_0x3f1be9,'attributes':{'data-change-id':_0x44b7fb}};}}),this['editor']['conversion']['for']('upcast')['add'](_0x4c5589=>{_0x4c5589['on']('element:pre',(_0x341b30,_0x3e5724,_0x53e87c)=>{const _0x3df079=_0x3e5724['viewItem']['getChild'](0x0);if(!_0x3df079||!_0x3df079['is']('element','code'))return;if(!_0x53e87c['consumable']['consume'](_0x3df079,{'attributes':['vid_start','vid_end']}))return;const _0x1f60ea=_0x3e5724['modelRange']['start']['nodeAfter'];_0x53e87c['writer']['setAttribute']('vid_start',_0x3df079['getAttribute']('vid_start'),_0x1f60ea),_0x53e87c['writer']['setAttribute']('vid_end',_0x3df079['getAttribute']('vid_end'),_0x1f60ea);},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['add'](_0x3b43c8=>{_0x3b43c8['on']('element',(_0x2eb777,_0x5a26b6,_0x3de227)=>{if(!_0x3de227['consumable']['consume'](_0x5a26b6['viewItem'],{'attributes':['vid_start','vid_end']}))return;if(_0x5a26b6['modelRange']['isCollapsed'])return;const _0x49421e=_0x5a26b6['modelRange']['start']['nodeAfter'];_0x49421e['hasAttribute']('vid_start')||_0x49421e['hasAttribute']('vid')||(_0x3de227['writer']['setAttribute']('vid_start',_0x5a26b6['viewItem']['getAttribute']('vid_start'),_0x49421e),_0x3de227['writer']['setAttribute']('vid_end',_0x5a26b6['viewItem']['getAttribute']('vid_end'),_0x49421e));},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['elementToAttribute']({'view':{'name':'span','attributes':{'vid':!0x0}},'model':{'key':'vid','value':_0xfd0beb=>_0xfd0beb['getAttribute']('vid')}}),this['editor']['model']['schema']['on']('checkAttribute',(_0x26f56a,[,_0x2a1da5])=>{['vid_start','vid_end','vid']['includes'](_0x2a1da5)&&(_0x26f56a['return']=!0x0,_0x26f56a['stop']());},{'priority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['add'](_0xa64ef1=>{_0xa64ef1['on']('attribute:vid',(_0x2b9446,_0x17d6af,_0x3963a0)=>{if('\x20'!=_0x17d6af['item']['data']||_0x17d6af['item']['parent']['maxOffset']>0x1)return;if(!_0x3963a0['consumable']['consume'](_0x17d6af['item'],_0x2b9446['name']))return;const _0x325c07=_0x3963a0['writer'],_0x7c77e5=_0x3963a0['mapper']['toViewRange'](_0x17d6af['range']);_0x325c07['wrap'](_0x7c77e5,_0x325c07['createAttributeElement']('span'));});}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',function(_0x137824){const _0x3df35a=_0x137824['plugins']['get']('RevisionViewer');return(_0x11d5c3,_0x5e4856,_0x4a5a88)=>{const _0x56eb08=_0x5e4856['markerName']['split'](':')[0x1],_0x39bd17=_0x3df35a['_getChangeFromId'](_0x56eb08);if(!_0x39bd17)return null;const _0x56051d='add'==_0x39bd17['type']?'split':'merge';if(!_0x4a5a88['consumable']['test'](_0x5e4856['markerRange'],_0x11d5c3['name']))return;const _0x4fec73=_0x5e4856['markerRange']['getWalker'](),_0x5153ba=_0x5e4856['markerRange']['start'],_0x6aa6ea=_0x137824['model']['schema'];let _0x479bf6=null,_0x1cce50=null,_0x12ecbf=!0x1,_0x141212=!0x1;for(const _0x43d0bc of _0x4fec73){const _0x122c61=_0x43d0bc['item'];_0x12ecbf=_0x12ecbf||_0x6aa6ea['isContent'](_0x122c61);const _0xcbdce4=_0x4a5a88['mapper']['toViewElement'](_0x122c61);if(_0xcbdce4&&_0xcbdce4['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x43d0bc['type']&&(_0x6aa6ea['isBlock'](_0x122c61)&&!_0x6aa6ea['isLimit'](_0x122c61)&&(_0x122c61['nextSibling']||_0x5153ba['isAtEnd']?_0x479bf6&&_0x479bf6['parent']==_0x122c61||(_0x479bf6=_0x122c61,_0x441a18(_0x43d0bc['previousPosition']),_0x141212=!0x0):_0x1cce50=_0x1cce50||_0x43d0bc['previousPosition']));}function _0x441a18(_0x3887f3){const _0x478fe7=_0x4a5a88['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x56051d}),_0xcd229=_0x4a5a88['mapper']['toViewPosition'](_0x3887f3);_0x39bd17['data']['isSuggestion']&&_0x4a5a88['writer']['addClass']('ck-suggestion-marker-'+_0x56051d+'-new',_0x478fe7),_0x3df35a['activeChange']==_0x39bd17&&_0x4a5a88['writer']['addClass']('ck-suggestion-marker--active',_0x478fe7),_0x4a5a88['writer']['insert'](_0xcd229,_0x478fe7),_0x4a5a88['mapper']['bindElementToMarker'](_0x478fe7,_0x5e4856['markerName']);}_0x12ecbf||_0x141212||!_0x1cce50||_0x441a18(_0x1cce50);};}(this['editor']),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision',(_0xa7222,_0x4b436a,_0x23de78)=>{const _0x1593af=_0x23de78['mapper']['markerNameToElements'](_0x4b436a['markerName']);if(_0x1593af){for(const _0x318a24 of _0x1593af)(_0x318a24['hasClass']('ck-suggestion-marker-split')||_0x318a24['hasClass']('ck-suggestion-marker-merge'))&&(_0x23de78['mapper']['unbindElementFromMarkerName'](_0x318a24,_0x4b436a['markerName']),_0x23de78['writer']['remove'](_0x318a24));}},{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',(_0x2bfec2,_0x5d8b68,_0x4a3787)=>{const _0xb67549=_0x5d8b68['markerName']['split'](':')[0x1],_0x23adcd=this['_getChangeFromId'](_0xb67549);if(!_0x23adcd)return null;const _0x395c74='add'==_0x23adcd['type']?'split':'merge';if(_0x4a3787['consumable']['test'](_0x5d8b68['markerRange'],_0x2bfec2['name']))for(const _0x1421e8 of _0x5d8b68['markerRange']['getItems']()){if(!_0x1421e8['is']('element','softBreak'))continue;const _0x5f02b5=_0x4a3787['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x395c74}),_0x5b697c=_0x4a3787['mapper']['toViewPosition'](this['editor']['model']['createPositionBefore'](_0x1421e8));_0x23adcd['data']['isSuggestion']&&_0x4a3787['writer']['addClass']('ck-suggestion-marker-'+_0x395c74+'-new',_0x5f02b5),this['activeChange']==_0x23adcd&&_0x4a3787['writer']['addClass']('ck-suggestion-marker--active',_0x5f02b5),_0x4a3787['writer']['insert'](_0x5b697c,_0x5f02b5),_0x4a3787['mapper']['bindElementToMarker'](_0x5f02b5,_0x5d8b68['markerName']);}},{'priority':'high'}),this['editor']['model']['document']['on']('change',()=>{this['editor']['editing']['view']['change'](_0x1ffe9f=>{for(const _0x17dd0d of this['editor']['model']['document']['getRootNames']()){const _0x120ecd=this['editor']['model']['document']['getRoot'](_0x17dd0d),_0x52992b=this['editor']['editing']['view']['document']['getRoot'](_0x17dd0d);if(_0x52992b){const _0x45b97c=_0x120ecd['getAttribute']('revisionHistoryAttachChange');if(_0x1ffe9f['removeAttribute']('data-change-id',_0x52992b),_0x1ffe9f['removeClass']('ck-revision-history-root-add',_0x52992b),_0x1ffe9f['removeClass']('ck-revision-history-root-remove',_0x52992b),_0x1ffe9f['removeClass']('ck-revision-history-root--active',_0x52992b),_0x45b97c){const _0x329d8e=this['_getChangeFromId'](_0x45b97c);if(!_0x329d8e)return null;_0x1ffe9f['setAttribute']('data-change-id',_0x45b97c,_0x52992b),_0x1ffe9f['addClass']('ck-revision-history-root-'+_0x329d8e['type'],_0x52992b),this['activeChange']==_0x329d8e&&_0x1ffe9f['addClass']('ck-revision-history-root--active',_0x52992b);}}}});}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'comment','model':_0x1a0458=>'revision-comment:'+_0x1a0458,'converterPriority':'highest'}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'suggestion','model':_0x2afd7b=>'revision-suggestion:'+_0x2afd7b,'converterPriority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision-suggestion','view':_0x94bea=>({'name':'suggestion:'+_0x94bea,'group':'revision-suggestion'}),'converterPriority':'highest'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-suggestion','view':_0x448e06=>{const _0x42b455=_0x448e06['markerName']['split'](':')[0x1];return'insertion'!=_0x42b455&&'deletion'!=_0x42b455?null:{'classes':['ck-suggestion-preview-marker','ck-suggestion-preview-marker-'+_0x42b455]};}}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:deletion',_t(this['editor'],'merge'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:insertion',_t(this['editor'],'split'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision-suggestion',(_0x5c656e,_0x5cd5c4,_0xd901a0)=>{const _0x59135a=_0xd901a0['mapper']['markerNameToElements'](_0x5cd5c4['markerName']);if(_0x59135a){for(const _0x2bb1f7 of _0x59135a)_0x2bb1f7['is']('uiElement')&&(_0xd901a0['mapper']['unbindElementFromMarkerName'](_0x2bb1f7,_0x5cd5c4['markerName']),_0xd901a0['writer']['remove'](_0x2bb1f7));}},{'priority':'high'});}['_getChangeFromId'](_0x340436){return this['_changeIdToChange']['get'](_0x340436);}['_getViewForChange'](_0x2ebe6a){return this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=new ChangeDetailsView(this['editor']['locale'],_0x2ebe6a),this['_changeView'];}['_initInteractions'](){this['editor']['model']['document']['selection']['observeMarkers']('revision'),this['on']('change:activeView',(_0x888654,_0x1695d2,_0x47f226,_0x2a1146)=>{_0x2a1146&&this['_balloon']['remove'](_0x2a1146),_0x47f226&&(this['_balloon']['add']({'view':_0x47f226,'stackId':'revisionHistoryLabel','position':{'target':()=>{const _0x387de3=this['editor']['editing'],_0xc36be0=this['_getChangeFromId'](_0x47f226['changeId']);let _0x3dc57a;if(_0xc36be0['data']['isOnRoot']){const _0x16a9de=_0x387de3['view']['getDomRoot'](_0xc36be0['rootName']);_0x3dc57a=Array['from'](_0x16a9de['getClientRects']());}else{const _0x1b4271=this['editor']['model']['markers']['get']('revision:'+_0x47f226['changeId']);_0x3dc57a=Array['from'](_0x387de3['mapper']['markerNameToElements'](_0x1b4271['name']))['map'](_0x40e404=>_0x387de3['view']['domConverter']['mapViewToDom'](_0x40e404))['map'](_0x37621b=>Array['from'](_0x37621b['getClientRects']()))['flat']();}if(!this['_activeViewTarget'])return _0x3dc57a[0x0];return _0x3dc57a['find'](_0x351904=>_0x351904['top']-0x3<=this['_activeViewTarget']['y']&&_0x351904['bottom']+0x3>=this['_activeViewTarget']['y']&&_0x351904['left']-0x3<=this['_activeViewTarget']['x']&&_0x351904['right']+0x3>=this['_activeViewTarget']['x'])||_0x3dc57a[0x0];}}}),this['_balloon']['showStack']('revisionHistoryLabel'));}),this['on']('change:activeChange',(_0x224606,_0x947db9,_0x5dac23,_0x37f6bb)=>{this['activeView']=_0x5dac23?this['_getViewForChange'](_0x5dac23):null,this['editor']['model']['change'](()=>{const _0x133460=this['editor']['editing'];_0x37f6bb&&(_0x37f6bb['data']['isOnRoot']?_0x133460['view']['change'](_0x58ed13=>{_0x58ed13['removeClass']('ck-revision-history-root--active',_0x133460['view']['document']['getRoot'](_0x37f6bb['rootName']));}):_0x133460['reconvertMarker']('revision:'+_0x37f6bb['id'])),_0x5dac23&&(_0x5dac23['data']['isOnRoot']?_0x133460['view']['change'](_0x7a38d4=>{_0x7a38d4['addClass']('ck-revision-history-root--active',_0x133460['view']['document']['getRoot'](_0x5dac23['rootName']));}):_0x133460['reconvertMarker']('revision:'+_0x5dac23['id']));});}),this['listenTo'](this['editor']['editing']['view']['document'],'mouseover',(_0x426b30,_0x3210e4)=>{if(this['activeChange'])return;const _0xc74269=this['_findChangeIdFromDomTarget'](_0x3210e4['target']),_0x20e587=this['_changeIdToChange']['get'](_0xc74269);_0x20e587?(this['_activeViewTarget']={'x':_0x3210e4['domEvent']['x'],'y':_0x3210e4['domEvent']['y']},this['activeView']=this['_getViewForChange'](_0x20e587)):(this['_activeViewTarget']=null,this['activeView']=null);}),this['listenTo'](this['editor']['editing']['view']['document'],'mousedown',(_0x474fb4,_0x4440ae)=>{const _0x491dd9=this['_findChangeIdFromDomTarget'](_0x4440ae['target']),_0x28d4e8=this['_changeIdToChange']['get'](_0x491dd9);_0x28d4e8?(this['_activeViewTarget']={'x':_0x4440ae['domEvent']['x'],'y':_0x4440ae['domEvent']['y']},_0x28d4e8===this['activeChange']?this['_balloon']['updatePosition']():this['activeChange']=_0x28d4e8):(this['_activeViewTarget']=null,this['activeChange']=null);});}['_findChangeIdFromDomTarget'](_0x2376a2){do{const _0x4b0641=_0x2376a2['getAttribute']('data-change-id');if(_0x4b0641)return _0x4b0641;_0x2376a2=_0x2376a2['parent'];}while(_0x2376a2);return null;}['_cleanMarkers'](){this['editor']['model']['change'](_0x5846f0=>{for(const _0x318aa2 of this['editor']['model']['markers'])_0x5846f0['removeMarker'](_0x318aa2);});}}function _t(_0x1b5f67,_0x16ad97){return(_0x33fa0c,_0x2bf763,_0x2eeb1b)=>{if(!_0x2eeb1b['consumable']['test'](_0x2bf763['markerRange'],_0x33fa0c['name']))return;const _0x3b2d77=_0x2bf763['markerRange']['getWalker'](),_0xa04e19=_0x2bf763['markerRange']['start'],_0xd2aa52=_0x1b5f67['model']['schema'];let _0xac98b4=null,_0xf334e3=null,_0x2e0c1e=!0x1,_0x52b119=!0x1;for(const _0x1697bc of _0x3b2d77){const _0x52e612=_0x1697bc['item'];_0x2e0c1e=_0x2e0c1e||_0xd2aa52['isContent'](_0x52e612);const _0x5928f7=_0x2eeb1b['mapper']['toViewElement'](_0x52e612);if(_0x5928f7&&_0x5928f7['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x1697bc['type']&&(_0xd2aa52['isBlock'](_0x52e612)&&!_0xd2aa52['isLimit'](_0x52e612)&&(_0x52e612['nextSibling']||_0xa04e19['isAtEnd']?_0xac98b4&&_0xac98b4['parent']==_0x52e612||(_0xac98b4=_0x52e612,_0x9e26dd(_0x1697bc['previousPosition']),_0x52b119=!0x0):_0xf334e3=_0xf334e3||_0x1697bc['previousPosition']));}function _0x9e26dd(_0x1bb79a){const _0xaae9d=_0x2eeb1b['mapper']['toViewPosition'](_0x1bb79a),_0x1f6ebf=_0x2eeb1b['writer']['createUIElement']('span',{'class':'ck-suggestion-preview-marker-'+_0x16ad97});_0x2eeb1b['writer']['insert'](_0xaae9d,_0x1f6ebf),_0x2eeb1b['mapper']['bindElementToMarker'](_0x1f6ebf,_0x2bf763['markerName']);}_0x2e0c1e||_0x52b119||!_0xf334e3||_0x9e26dd(_0xf334e3);};}class RestoreRevisionCommand extends _0x5a1184{constructor(_0x32bd49){super(_0x32bd49);const _0x1f0f4a=_0x32bd49['plugins']['get'](RevisionViewer);this['affectsData']=!0x1,this['listenTo'](_0x1f0f4a,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x1f0f4a,'change:isEnabled',()=>this['refresh']());}['execute'](){const _0x4d3f29=this['editor'],_0x52084d=_0x4d3f29['plugins']['get'](RevisionViewer),_0x6f86c6=_0x52084d['isReady']?_0x52084d['diff']['newRevisionId']:null;_0x4d3f29['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x6f86c6);}['refresh'](){const {isReady:_0x4f39c5,isEnabled:_0x4d9b7a,repository:_0x22cc71,diff:_0x4a9edb}=this['editor']['plugins']['get'](RevisionViewer),_0x3794e8=_0x4a9edb&&_0x22cc71['getLaterVisibleRevision'](_0x4a9edb['newRevisionId']);this['isEnabled']=_0x4f39c5&&_0x4d9b7a&&Boolean(_0x3794e8);}}class ShowChangeCommand extends _0x5a1184{['_step'];constructor(_0x20ac30,{direction:_0x32a8db}){super(_0x20ac30);const _0x3fd53b=_0x20ac30['plugins']['get'](RevisionViewer);this['affectsData']=!0x1,this['_step']='forward'===_0x32a8db?0x1:-0x1,this['listenTo'](_0x3fd53b,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x3fd53b,'change:isEnabled',()=>this['refresh']()),this['listenTo'](_0x3fd53b,'change:activeChange',()=>this['refresh']());}['execute'](){const _0x3e33e2=this['editor'],_0x305cb8=_0x3e33e2['plugins']['get'](RevisionViewer),{isNavigationMode:_0x1f0fe7,currentChangeNumber:_0x123e46}=_0x305cb8;let _0x4f3e5b;if(_0x305cb8['activeChange']=_0x1f0fe7?_0x305cb8['diff']['changes']['get'](_0x123e46+this['_step']):_0x305cb8['diff']['changes']['first'],_0x305cb8['activeChange']['data']['isOnRoot'])_0x4f3e5b=_0x3e33e2['editing']['view']['getDomRoot'](_0x305cb8['activeChange']['rootName']);else{const _0x4e76d1=_0x3e33e2['model']['markers']['get']('revision:'+_0x305cb8['activeChange']['id']);_0x4f3e5b=_0x3ba103(_0x3e33e2['editing'],_0x4e76d1);}_0x235b0c({'target':_0x4f3e5b,'viewportOffset':0x28});}['refresh'](){const {isNavigationMode:_0x86a55f,currentChangeNumber:_0x21dab5,numberOfChanges:_0x2cd674,isReady:_0x13d0a5,isEnabled:_0xf8d9a7}=this['editor']['plugins']['get'](RevisionViewer);this['isEnabled']=!!(_0xf8d9a7&&_0x13d0a5&&_0x2cd674)&&(!_0x86a55f||(0x1===this['_step']?_0x21dab5<_0x2cd674-0x1:_0x21dab5>0x0));}}class ChangesNavigationView extends _0x58ee2e{constructor(_0x485f59){super(_0x485f59);const _0x35addb=this['bindTemplate'],_0x27d91a=new _0x5e0dcc(_0x485f59),_0x1f7a59=new _0x5e0dcc(_0x485f59);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',(_0x5e79d9,_0x13c1e5)=>_0x5e79d9&&_0x13c1e5>0x0),this['bind']('_statusText')['to'](this,'isReady',this,'currentChangeNumber',this,'numberOfChanges',this,'isNavigationMode',(_0x2b5da8,_0x1c7762,_0x48f686,_0x4fc6d8)=>{if(!_0x2b5da8)return ft(_0x485f59,'Loading...');if(!_0x48f686)return ft(_0x485f59,'No\x20changes');const _0x58166e=ft(_0x485f59,'NUMBER_OF_CHANGES',_0x48f686);return _0x4fc6d8?ft(_0x485f59,'X_OF_Y_CHANGES',[_0x1c7762+0x1,_0x48f686]):_0x58166e;}),_0x27d91a['set']({'label':ft(_0x485f59,'Show\x20previous\x20change'),'tooltip':!0x0,'icon':_0x2b5026}),_0x1f7a59['set']({'label':ft(_0x485f59,'Show\x20next\x20change'),'tooltip':!0x0,'icon':_0x4be955}),_0x27d91a['bind']('isEnabled')['to'](this,'isBackwardNavigationEnabled'),_0x1f7a59['bind']('isEnabled')['to'](this,'isForwardNavigationEnabled'),_0x27d91a['on']('execute',()=>this['fire']('execute','backward')),_0x1f7a59['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',_0x35addb['if']('_isStatusLabelVisible','ck-hidden',_0x484206=>!_0x484206)]},'children':[{'text':_0x35addb['to']('isNavigationMode',_0xebde65=>_0xebde65?ft(_0x485f59,'EDIT_X_OF_Y_REVISIONS')+':\x20':ft(_0x485f59,'Total')+':\x20')}]},{'text':_0x35addb['to']('_statusText')}]},new st(),{'tag':'div','attributes':{'class':['ck-revision-history-ui__changes-navigation__navigation']},'children':[_0x27d91a,_0x1f7a59]}]});}}const yt='ck-editor__editable__loading-overlay';class RevisionViewerLoadingOverlay extends _0x2a792a{static get['pluginName'](){return'RevisionViewerLoadingOverlay';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['show'](){const _0x44473b=this['editor']['editing']['view'];_0x44473b['change'](_0x10e5a0=>{for(const _0xbd95e6 of _0x44473b['document']['roots'])_0x10e5a0['addClass'](yt,_0xbd95e6);});}['hide'](){const _0x271e9e=this['editor']['editing']['view'];_0x271e9e['change'](_0x35257e=>{for(const _0x25695b of _0x271e9e['document']['roots'])_0x35257e['removeClass'](yt,_0x25695b);});}}class RevisionViewerUI extends _0x2a792a{static get['pluginName'](){return'RevisionViewerUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[RevisionViewer,RevisionViewerLoadingOverlay];}['init'](){const _0x3152fb=this['editor'],_0x4dff44=_0x3152fb['plugins']['get'](RevisionViewer),_0x2ed5d9=_0x3152fb['plugins']['get'](RevisionViewerLoadingOverlay);_0x3152fb['ui']['componentFactory']['add']('exitToEditing',_0x14f28d=>{const _0x1affee=new _0x5e0dcc(_0x14f28d);return _0x1affee['set']({'label':ft(_0x14f28d,'Back\x20to\x20editing'),'icon':_0x59e5c5,'withText':!0x0,'tooltip':!0x0,'class':'ck-revision-history-ui__back-to-editing'}),this['listenTo'](_0x1affee,'execute',()=>{_0x3152fb['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}),_0x1affee;}),_0x3152fb['ui']['componentFactory']['add']('restoreRevision',_0x318b8c=>{const _0x48b856=new _0x5e0dcc(_0x318b8c);return _0x48b856['set']({'label':ft(_0x318b8c,'Restore\x20this\x20revision'),'withText':!0x0,'tooltip':!0x0}),_0x48b856['bind']('isEnabled')['to'](_0x3152fb['commands']['get']('restoreRevision')),this['listenTo'](_0x48b856,'execute',()=>_0x3152fb['execute']('restoreRevision')),_0x48b856;}),_0x3152fb['ui']['componentFactory']['add']('changesNavigation',_0xbfc101=>{const _0xa0860=new ChangesNavigationView(_0xbfc101),_0x2703f2=_0x3152fb['commands']['get']('showPreviousChange'),_0x2a93c9=_0x3152fb['commands']['get']('showNextChange');return _0xa0860['bind']('isBackwardNavigationEnabled')['to'](_0x2703f2,'isEnabled'),_0xa0860['bind']('isForwardNavigationEnabled')['to'](_0x2a93c9,'isEnabled'),_0xa0860['bind']('isReady','currentChangeNumber','numberOfChanges','isNavigationMode')['to'](_0x4dff44),this['listenTo'](_0xa0860,'execute',(_0xd4dc92,_0x4a7a99)=>{_0x3152fb['execute']('forward'===_0x4a7a99?'showNextChange':'showPreviousChange');}),_0xa0860;}),_0x2ed5d9['show'](),_0x4dff44['on']('change:isReady',(_0x35f7c4,_0x1713e2,_0x1a9804)=>{_0x1a9804?_0x2ed5d9['hide']():_0x2ed5d9['show']();});}}class RevisionNameView extends _0x2fa598{['_resizeObserver']=null;constructor(_0xeb5bf3,_0x476e12){super(_0xeb5bf3,_0x476e12);const _0x5c702a=this['bindTemplate'];this['set']({'label':ft(_0xeb5bf3,'Revision\x20name'),'_tooltipString':''}),this['fieldView']['placeholder']=ft(_0xeb5bf3,'Enter\x20the\x20revision\x20name'),this['extendTemplate']({'tag':'span','attributes':{'class':['ck-revision-history-sidebar__revision-name'],'data-cke-tooltip-text':_0x5c702a['to']('_tooltipString'),'data-cke-tooltip-position':'s','data-cke-tooltip-class':'ck-tooltip_multi-line'}});}['render'](){super['render'](),this['_resizeObserver']=new _0x1dcc33(this['fieldView']['element'],()=>this['_updateTooltipText']()),this['listenTo'](this['fieldView'],'input',()=>this['_updateTooltipText']());}['destroy'](){super['destroy'](),this['_resizeObserver']&&this['_resizeObserver']['destroy']();}['_updateTooltipText'](){const _0xcb9749=this['fieldView']['element'];this['_tooltipString']=_0xcb9749['scrollWidth']>_0xcb9749['clientWidth']&&_0xcb9749['value']||'';}}class RevisionAuthorView extends _0x58ee2e{constructor(_0x34b627,_0x24f1ee,_0x3fa0fd){super(_0x34b627);const _0x5dddeb=new nt();_0x5dddeb['set']({'content':_0x342de3,'viewBox':'0\x200\x2011\x2010'});const _0x3af86f=['ck','ck-revision-history-sidebar__revision-author'];_0x3fa0fd&&_0x3af86f['push']('ck-revision-history-sidebar__revision-author_creator');const _0x1ac7b3=[{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__revision-author__name'],'title':ft(_0x34b627,_0x3fa0fd?'Revision\x20creator':'Revision\x20author')},'children':[_0x5dddeb,_0x24f1ee['name']]}];this['setTemplate']({'tag':'li','attributes':{'class':_0x3af86f},'children':_0x1ac7b3});}}function Rt(_0x19fe23,_0x6e67d7){const _0x124847=_0x19fe23['bindTemplate'],_0x275374=_0x19fe23['locale'],_0x21bd12=_0x3d47ad(_0x275374);_0x21bd12['panelPosition']='sw';const _0x588ca7=function(_0x3372ef,_0x61725a){const _0x283b23=function(_0x4183dd,_0x465317){const _0x4a0733=_0x4183dd['locale'],_0x372a75={'Compare\x20against\x20selected':ft(_0x4a0733,'Compare\x20against\x20selected'),'Name\x20this\x20revision':ft(_0x4a0733,'Name\x20this\x20revision'),'Restore\x20this\x20revision':ft(_0x4a0733,'Restore\x20this\x20revision')};return _0x465317['map'](_0x5ed8da=>{const _0x246cf8=_0x372a75[_0x5ed8da['name']];return _0x246cf8&&_0x246cf8!==_0x5ed8da['name']&&(_0x5ed8da['name']=_0x246cf8),_0x5ed8da;});}(_0x3372ef,_0x61725a),_0x16a041=new _0x217353();for(const _0x4cf5aa of _0x283b23){const _0x17ece9={'type':'button','model':new rt({'label':_0x4cf5aa['name'],'class':_0x4cf5aa['class'],'withText':!0x0,'role':'menuitem','_action':_0x4cf5aa['action']})};_0x17ece9['model']['bind']('isEnabled')['to'](_0x3372ef,'isActionsDropdownOpen',_0x2eff29=>'function'!=typeof _0x4cf5aa['isEnabled']||(!_0x2eff29||_0x4cf5aa['isEnabled'](_0x3372ef))),_0x16a041['add'](_0x17ece9);}return _0x16a041;}(_0x19fe23,_0x6e67d7);return _0x19fe23['bind']('isActionsDropdownOpen')['to'](_0x21bd12,'isOpen'),_0x21bd12['buttonView']['set']({'label':ft(_0x275374,'Show\x20more\x20items'),'tooltip':!0x0,'tooltipPosition':'sw','icon':_0x1c896e}),_0x21bd12['extendTemplate']({'attributes':{'class':['ck-revision-history-sidebar__revision__actions',_0x124847['if']('isActionsDropdownOpen','ck-on')]},'on':{'click':_0x124847['to'](_0x1c4ab1=>_0x1c4ab1['stopPropagation']())}}),_0x21bd12['on']('execute',_0x3ecc74=>{_0x19fe23['isReady']&&'function'==typeof _0x3ecc74['source']['_action']&&_0x3ecc74['source']['_action'](_0x19fe23);}),ot(_0x21bd12,_0x588ca7,{'role':'menu'}),_0x21bd12['listenTo'](_0x19fe23,'change:isActionsDropdownOpen',(_0x14ce98,_0x203e65,_0x3767b6)=>{if(_0x3767b6)for(const _0xb3766e of _0x21bd12['listView']['items']){const _0x935140=_0xb3766e['children']['first'],_0x8b4299=_0x6e67d7['find'](_0xa1c029=>_0xa1c029['action']===_0x935140['_action'])['isVisible'];_0xb3766e['isVisible']=void 0x0===_0x8b4299||_0x8b4299(_0x19fe23);}}),_0x21bd12;}class RevisionView extends/* #__PURE__ -- @preserve */
|
|
27
|
+
_0x1a6ae6(_0x58ee2e){['id'];['revisionNameView'];['revisionActionsView'];['_revision'];['_requireRevisionName'];constructor(_0x3be881,_0x237bf8,_0x56628d,_0x4ca377){super(_0x3be881);const _0x3509ed=this['bindTemplate'],_0x3860c0=function(_0x1762b5,_0x3dd314){const _0x9455=Array['from'](_0x3dd314['authors'])['filter'](_0x27dbe9=>_0x27dbe9!=_0x3dd314['creator']);return _0x3dd314['creator']&&_0x9455['unshift'](_0x3dd314['creator']),_0x9455['map'](_0x11ba55=>new RevisionAuthorView(_0x1762b5,_0x11ba55,_0x11ba55==_0x3dd314['creator']));}(_0x3be881,_0x237bf8);this['id']=_0x237bf8['id'],this['_revision']=_0x237bf8,this['_requireRevisionName']=_0x4ca377,this['bind']('name','createdAt')['to'](_0x237bf8),this['bind']('_createdAtFormatted')['to'](this,'createdAt',_0x31a8c7=>{return _0x46062e=_0x3be881['uiLanguage'],(_0x35fcfe=_0x31a8c7)['toLocaleDateString'](_0x46062e,{'month':'long','day':'numeric'})+',\x20'+_0x35fcfe['toLocaleTimeString'](_0x46062e,{'hour':'numeric','minute':'numeric'});var _0x46062e,_0x35fcfe;}),this['set']('isSelected',!0x1),this['set']('isHighlighted',!0x1),this['set']('isActionsDropdownOpen',!0x1),this['set']('isReady',!0x1),this['set']('isEnabled',!0x1),this['revisionNameView']=new RevisionNameView(_0x3be881,_0x2a167b),this['revisionNameView']['fieldView']['extendTemplate']({'attributes':{'maxlength':'220'}}),this['revisionNameView']['fieldView']['bind']('value')['to'](this,'name',_0x4aa5a8=>_0x4aa5a8||this['_createdAtFormatted']),this['revisionNameView']['bind']('isEnabled')['to'](this,'isSelected',this,'isEnabled',(_0x1591e1,_0x53440d)=>_0x1591e1&&_0x53440d),this['revisionActionsView']=_0x56628d&&_0x56628d['length']?Rt(this,_0x56628d):'',this['revisionActionsView']&&this['revisionActionsView']['bind']('isEnabled')['to'](this),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision-wrapper',_0x3509ed['if']('isConfirm','ck-revision-history-sidebar__revision-wrapper_confirmation_visible')]},'children':[{'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision',_0x3509ed['if']('isEnabled','ck-disabled',_0x5ba290=>!_0x5ba290),_0x3509ed['if']('isSelected','ck-revision-history-sidebar__revision_selected'),_0x3509ed['if']('isHighlighted','ck-revision-history-sidebar__revision_highlighted'),_0x3509ed['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':_0x3509ed['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':_0x3860c0}]},this['revisionActionsView']],'on':{'click':_0x3509ed['to'](_0x11f15b=>{_0x11f15b['srcElement']['closest']('.ck-confirm-view')||this['isReady']&&this['isEnabled']&&this['fire']('select',{'id':this['id']});})}}]});}['render'](){super['render']();const _0x5ad8d2=this['revisionNameView']['fieldView']['element'];this['listenTo'](_0x5ad8d2,'change',()=>{this['_requireRevisionName']&&!_0x5ad8d2['value']||this['fire']('setName',{'id':this['id'],'name':_0x5ad8d2['value']}),_0x5ad8d2['value']||(_0x5ad8d2['value']=this['name']?this['name']:this['_createdAtFormatted']);});}['select'](){this['isSelected']=!0x0;}['deselect'](){this['isSelected']=!0x1;}['highlight'](){this['isHighlighted']=!0x0;}['unhighlight'](){this['isHighlighted']=!0x1;}}function bt(_0x4b1b32,_0x37aee0){const _0x3aa5a0=vt['fromJSDate'](_0x4b1b32)['setLocale'](_0x37aee0),_0x421d2c=vt['local'](),_0x575e0d=_0x421d2c['minus']({'days':0x1})['startOf']('day');let _0xae91b7,_0x1dc74c;return _0x3aa5a0['hasSame'](_0x421d2c,'day')?(_0xae91b7=_0x3aa5a0['startOf']('day')['toJSDate'](),_0x1dc74c=_0x3aa5a0['toRelativeCalendar']()):_0x3aa5a0['hasSame'](_0x575e0d,'day')?(_0xae91b7=_0x575e0d['toJSDate'](),_0x1dc74c=_0x3aa5a0['toRelativeCalendar']()):_0x3aa5a0['hasSame'](_0x421d2c,'week')?(_0xae91b7=_0x3aa5a0['startOf']('week')['toJSDate'](),_0x1dc74c=_0x3aa5a0['weekdayLong']||''):_0x3aa5a0['hasSame'](_0x421d2c,'year')?(_0xae91b7=_0x3aa5a0['startOf']('month')['toJSDate'](),_0x1dc74c=_0x3aa5a0['monthLong']||''):(_0xae91b7=_0x3aa5a0['startOf']('year')['toJSDate'](),_0x1dc74c=String(_0x3aa5a0['year'])),{'startDate':_0xae91b7,'localizedPeriodName':_0x1dc74c};}class RevisionsSidebarTimePeriodView extends _0x58ee2e{['startDate'];['revisionViews'];['_revisionActions'];['_requireRevisionName'];constructor(_0xb35bb4,_0x42c7c3,_0x559254,_0x860554){super(_0xb35bb4);const _0x20f50c=bt(_0x42c7c3,this['locale']['uiLanguage'])['localizedPeriodName'];this['startDate']=_0x42c7c3,this['revisionViews']=this['createCollection'](),this['_revisionActions']=_0x559254,this['_requireRevisionName']=_0x860554,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':_0x20f50c}]},{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__time-period__revisions']},'children':this['revisionViews']}]});}['addRevision'](_0x64633c){const _0x62c6ed=new RevisionView(this['locale'],_0x64633c,this['_revisionActions'],this['_requireRevisionName']);this['revisionViews']['add'](_0x62c6ed);}['removeRevision'](_0x176182){const _0x40ede3=this['revisionViews']['find'](_0x3254d2=>_0x3254d2['id']===_0x176182['id']);this['revisionViews']['remove'](_0x40ede3);}}class RevisionsSidebarHeaderView extends _0x58ee2e{constructor(_0x2aef5a){super(_0x2aef5a);const _0x439be2=new nt();_0x439be2['content']=_0x91e0d6,this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset_all','ck-revision-history-sidebar__header']},'children':[_0x439be2,{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__header__label']},'children':[ft(_0x2aef5a,'Revision\x20history')]}]});}}class RevisionsSidebarView extends _0x58ee2e{['timePeriodViews'];['_revisions'];['_revisionActions'];['_requireRevisionName'];constructor(_0x3cac31,_0x1614d4,_0x5257a7,_0x443e89){super(_0x3cac31);const _0x528e74=this['bindTemplate'];this['timePeriodViews']=this['createCollection'](),this['timePeriodViews']['delegate']('select')['to'](this),this['timePeriodViews']['delegate']('setName')['to'](this),this['_revisions']=_0x1614d4,this['_revisionActions']=_0x5257a7,this['_requireRevisionName']=_0x443e89,this['on']('select',(_0x53a99c,_0x2719fe)=>{this['fire']('revisionSelected',_0x2719fe);}),this['on']('setName',(_0x3474c6,_0x5f4d49)=>{this['fire']('revisionSetName',_0x5f4d49);}),this['set']('isEnabled',!0x1),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-rounded-corners','ck-revision-history-sidebar']},'children':[new RevisionsSidebarHeaderView(_0x3cac31),{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__timeline',_0x528e74['if']('isEnabled','ck-disabled',_0x559095=>!_0x559095)]},'children':this['timePeriodViews']}]});}['render'](){super['render']();for(const _0x40941d of this['_revisions'])this['_addRevision'](_0x40941d);this['_revisions']['on']('add',(_0x4aa583,_0x27bcc0)=>{this['_addRevision'](_0x27bcc0);}),this['_revisions']['on']('remove',(_0x3be365,_0x1e34d2)=>{this['_removeRevision'](_0x1e34d2);});}get['revisionViews'](){return this['timePeriodViews']['map'](_0xe8480e=>_0xe8480e['revisionViews']['map'](_0x34a0bf=>_0x34a0bf))['flat']();}['selectRevision'](_0x639770){for(const _0x2a4477 of this['revisionViews'])_0x639770&&_0x639770['id']===_0x2a4477['id']?_0x2a4477['select']():_0x2a4477['deselect']();}['highlightRevisions'](_0x2c8930){for(const _0x3f5053 of this['revisionViews'])_0x2c8930['some'](({id:_0x33bc10})=>_0x33bc10===_0x3f5053['id'])?_0x3f5053['highlight']():_0x3f5053['unhighlight']();}['_addRevision'](_0x37cec3){const _0x3da9a0=bt(_0x37cec3['createdAt'],this['locale']['uiLanguage'])['startDate'];let _0x57071a=this['_getTimePeriodViewByStartDate'](_0x3da9a0);_0x57071a||(_0x57071a=new RevisionsSidebarTimePeriodView(this['locale'],_0x3da9a0,this['_revisionActions'],this['_requireRevisionName']),this['timePeriodViews']['add'](_0x57071a)),_0x57071a['addRevision'](_0x37cec3);}['_removeRevision'](_0x5c0e97){const _0xe068c9=bt(_0x5c0e97['createdAt'],this['locale']['uiLanguage'])['startDate'];this['_getTimePeriodViewByStartDate'](_0xe068c9)['removeRevision'](_0x5c0e97);}['_getTimePeriodViewByStartDate'](_0x1a5d0c){return this['timePeriodViews']['find'](_0x345d54=>_0x345d54['startDate']['getTime']()===_0x1a5d0c['getTime']());}}class RevisionsSidebar extends _0x2a792a{['_revisionViewer'];['_revisionsRepository'];['_sidebarView'];static ['defaultRevisionActions']=/* #__PURE__ -- @preserve */
|
|
28
28
|
((()=>['compareAgainstSelected','restoreRevision','nameRevision'])());static ['availableRevisionActions']=/* #__PURE__ -- @preserve */
|
|
29
|
-
kt();static get['pluginName'](){return'RevisionsSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[RevisionViewer];}constructor(
|
|
30
|
-
_0xe4c1e(_0x102d5){['_ui'];get['ui'](){return this['_ui'];}constructor(_0x1bcf48,_0x18756b){super(_0x18756b),this['sourceElement']=_0x1bcf48,this['model']['document']['createRoot']();const _0x15202d=new RevisionViewerEditorUIView(this['locale'],this['editing']['view'],{'shouldToolbarGroupWhenFull':!0x0});this['_ui']=new RevisionViewerEditorUI(this,_0x15202d);}['destroy'](){return this['updateSourceElement'](),this['ui']['destroy'](),super['destroy']();}static async['create'](_0x342538,_0x309316){const _0x59dacc=new this(_0x342538,_0x309316);return await _0x59dacc['initPlugins'](),await _0x59dacc['ui']['init'](_0x342538),await _0x59dacc['data']['init'](_0x59dacc['config']['get']('initialData')||''),_0x59dacc['fire']('ready'),_0x59dacc;}}const It=['RevisionHistoryUI','RestrictedEditingMode','AIChat','AIReviewMode','AIBalloon','AIQuickActions','AIActions','AIChatShortcuts','AITranslate'];class RevisionViewerIntegration extends _0x1098b4{['result'];static get['pluginName'](){return'RevisionViewerIntegration';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x43c7ab){function _0x440edf(_0x9681cc){return _0x9681cc['map'](_0x1020ba=>String['fromCharCode'](_0x1020ba))['join']('');}super(_0x43c7ab),this['result']='end',_0x43c7ab[_0x440edf([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x440edf([0x76,0x69,0x65,0x77])][_0x440edf([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x440edf([0x61,0x75,0x74,0x6f]),_0x43c7ab[_0x440edf([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x440edf([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x440edf([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x440edf([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x440edf([0x6f,0x6b])});}}class RevisionHistory extends _0x1098b4{['_viewerEditor'];static get['pluginName'](){return'RevisionHistory';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[RevisionTracker,RevisionHistoryUI];}constructor(_0x4097fd){if(super(_0x4097fd),!this['editor']['config']['get']('revisionHistory'))throw new _0xc946e0('revision-history-missing-configuration',this);this['_viewerEditor']=null,this['set']('isRevisionViewerOpen',!0x1),this['editor']['config']['define']('revisionHistory.showRevisionViewerCallback',_0x31d5cb=>this['_showRevisionViewer']({..._0x31d5cb,'translations':this['editor']['locale']['translations']})),this['editor']['config']['define']('revisionHistory.closeRevisionViewerCallback',_0x4565b4=>this['_closeRevisionViewer'](_0x4565b4)),this['editor']['config']['define']('revisionHistory.restoreRevisionCallback',_0xaaa53e=>this['_restoreRevision'](_0xaaa53e)),this['editor']['config']['define']('revisionHistory.requireRevisionName',!0x1),this['_enhanceShowRevisionViewerCallback'](),this['_enhanceCloseRevisionViewerCallback']();}set['adapter'](_0x32a087){this['editor']['plugins']['get']('RevisionTracker')['adapter']=_0x32a087;}get['adapter'](){return this['editor']['plugins']['get']('RevisionTracker')['adapter'];}['addRevisionData'](_0x343a43){return this['editor']['plugins']['get']('RevisionTracker')['addRevisionData'](_0x343a43);}['getRevision'](_0x12c82d){return this['editor']['plugins']['get']('RevisionsRepository')['getRevision'](_0x12c82d);}['getRevisions'](_0x41f981){return this['editor']['plugins']['get']('RevisionsRepository')['getRevisions'](_0x41f981||{'toJSON':!0x1});}['_getRevisionViewerEditorConfig'](){const _0xc5cf6b=this['editor'],_0x33f4ab=_0x551f13(_0xc5cf6b,It),_0x1cb376=_0xc5cf6b['plugins']['get']('RevisionTracker'),_0x199220=_0xc5cf6b['plugins']['get'](_0x1b1234)['users'];return _0x33f4ab['toolbar']=['exitToEditing','restoreRevision','changesNavigation'],delete _0x33f4ab['lazyRoots'],(_0x33f4ab['plugins']['push'](RevisionViewerIntegration,RevisionViewer,RevisionViewerUI,class RevisionViewerInit extends _0x1098b4{static get['requires'](){return[RevisionViewer,_0x1b1234];}['init'](){const _0x149163=this['editor']['plugins']['get'](_0x1b1234);for(const _0x455669 of _0x199220)_0x455669['isAnonymous']||_0x149163['getUser'](_0x455669['id'])||_0x149163['addUser'](_0x455669);const _0x3efcc8=_0x1cb376['repository']['getRevisions']();let _0x1f0739=null;const _0x2d5e43=this['editor']['plugins']['get']('RevisionViewer');_0x2d5e43['adapter']=_0x1cb376['adapter'],_0x2d5e43['bind']('isEnabled')['to'](_0x1cb376),this['editor']['commands']['get']('restoreRevision')['bind']('isEnabled')['to'](_0xc5cf6b,'isReadOnly',_0x473e28=>!_0x473e28);for(const _0x1ecbc5 of _0x3efcc8){const _0x1564f0=null===_0x1ecbc5['creator'];if(_0x1564f0&&_0x1ecbc5['toVersion']===_0x1ecbc5['fromVersion'])continue;const _0x24ead4=_0x1ecbc5['toJSON']();_0x2d5e43['addRevisionData'](_0x24ead4,(_0x2f8345,_0x13b055,_0x5ef979)=>{if(_0x1564f0){if(_0x1f0739)_0x1f0739['_update'](_0x2f8345,_0x13b055);else{if(!_0x13b055){const _0x2082ee=_0x5ef979['toJSON']();_0x2082ee['id']=_0x13fdf1(),_0x1cb376['saveRevision'](_0x2082ee,_0x5ef979['toVersion'])['then'](_0x2bb886=>{_0x1f0739=_0x2bb886;});}}}else _0x1ecbc5['_update'](_0x2f8345,_0x13b055);});}}},RevisionsSidebar),_0x33f4ab);}['_enhanceShowRevisionViewerCallback'](){const _0x4773d8=this['editor']['config']['get']('revisionHistory')['showRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.showRevisionViewerCallback',async()=>{this['editor']['enableReadOnlyMode']('revision-history-viewer-opened');const _0x203f19=this['editor']['plugins']['get']('RevisionTracker');if(this['editor']['plugins']['has']('Autosave')){const _0x14d3a8=this['editor']['plugins']['get']('Autosave');await _0x14d3a8['save']();}else await _0x203f19['update']();if(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('Dialog')){const _0x295a9d=this['editor']['plugins']['get']('Dialog');_0x295a9d['isOpen']&&_0x295a9d['hide']();}if(this['editor']['plugins']['has']('AITabs')){const _0x5d13f1=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0x3c5225 of _0x5d13f1)_0x3c5225['class']=_0x3c5225['class']?_0x3c5225['class']+'\x20ck-tab-panel_disabled':'ck-tab-panel_disabled';if(this['editor']['plugins']['has']('AIChat')){const _0x34ea54=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0x34ea54&&_0x34ea54['setAttribute']('tabindex','-1');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0x492e65=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0x492e65&&_0x492e65['setAttribute']('tabindex','-1');}}const _0x5bb6a5=this['_getRevisionViewerEditorConfig']();return _0x4773d8(_0x5bb6a5)['then'](_0x15e9f2=>{return(this['_viewerEditor']=_0x15e9f2,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'),_0x15e9f2);})['catch'](_0x32fa8c=>(console['error'](_0x32fa8c),this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),null));});}['_enhanceCloseRevisionViewerCallback'](){const _0x5f7a28=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 _0x33aa97=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0x5a3954 of _0x33aa97)_0x5a3954['class']='ck-tab-panel_disabled'===_0x5a3954['class']?'':_0x5a3954['class']['replace']('\x20ck-tab-panel_disabled','');if(this['editor']['plugins']['has']('AIChat')){const _0x5a561e=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0x5a561e&&_0x5a561e['removeAttribute']('tabindex');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0x4388f9=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0x4388f9&&_0x4388f9['removeAttribute']('tabindex');}}return this['_viewerEditor']['plugins']['get']('RevisionViewer')['_cleanUp'](),_0x5f7a28(this['_viewerEditor'])['then'](()=>{if(this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),this['_viewerEditor']=null,this['editor']['plugins']['has']('Annotations')){const _0xff0edf=this['editor']['plugins']['get']('Annotations');_0xff0edf['refreshVisibility'](),_0xff0edf['refreshPositioning']();}});});}['_showRevisionViewer'](_0x2298a4){const _0x9dbbeb=this['editor']['config']['get']('revisionHistory.editorContainer'),_0x1ac3cf=this['editor']['config']['get']('revisionHistory.viewerContainer'),_0x56c3c7=this['editor']['config']['get']('revisionHistory.viewerEditorElement');return RevisionViewerEditor['create'](_0x56c3c7,_0x2298a4)['then'](_0x4b17b0=>(_0x1ac3cf['style']['display']='block',_0x9dbbeb['style']['display']='none',this['isRevisionViewerOpen']=!0x0,_0x4b17b0));}['_closeRevisionViewer'](_0x240f6f){const _0x16bf81=this['editor']['config']['get']('revisionHistory.editorContainer');return this['editor']['config']['get']('revisionHistory.viewerContainer')['style']['display']='none',_0x16bf81['style']['display']='',this['isRevisionViewerOpen']=!0x1,_0x240f6f['destroy']();}async['_restoreRevision'](_0x5f5058){const _0x235970=this['editor'],_0x5c2b1a=this['_viewerEditor']['plugins']['get']('RevisionViewer'),_0x343b07=_0x235970['plugins']['get']('RevisionTracker'),_0x1a5f4b=_0x235970['plugins']['get']('RevisionHistoryUtils'),_0x4f385b=_0x5c2b1a['repository']['getRevision'](_0x5f5058);let _0x5a2741,_0x41ec2c,_0x597c0;try{await _0x1a5f4b['loadRevisionData'](_0x4f385b,this['adapter']),_0x5a2741=_0x1a5f4b['getRevisionDocumentData'](_0x4f385b),_0x41ec2c=_0x1a5f4b['getRevisionRootsAttributes'](_0x4f385b);}catch(_0x1d039a){return void console['error'](_0x1d039a);}_0x235970['model']['change'](_0x396dcf=>{for(const _0xbc3a2a of Array['from'](_0x235970['model']['markers']['getMarkersGroup']('restrictedEditingException')))_0x396dcf['removeMarker'](_0xbc3a2a);}),_0x5c2b1a['isReady']=!0x1,_0x235970['model']['enqueueChange'](_0x49c646=>{_0x49c646['setSelection'](null),_0x49c646['removeSelectionAttribute'](_0x235970['model']['document']['selection']['getAttributeKeys']());const _0x5e16a5=Object['keys'](_0x5a2741);for(const _0x5135de of _0x235970['model']['document']['roots'])'$graveyard'!=_0x5135de['rootName']&&_0x5135de['isAttached']()&&!_0x5e16a5['includes'](_0x5135de['rootName'])&&_0x49c646['detachRoot'](_0x5135de);for(const _0x43551d of _0x5e16a5){let _0x15c24b=_0x235970['model']['document']['getRoot'](_0x43551d);if(!_0x15c24b||!_0x15c24b['isAttached']()){const _0x2a456a=_0x4f385b['diffData']?.[_0x43551d]?.['rootElementName']||'$root';_0x15c24b=_0x49c646['addRoot'](_0x43551d,_0x2a456a);}const _0x590ea9=_0x41ec2c[_0x43551d],_0x4bd1a2=Object['keys'](_0x590ea9),_0x411c32=_0x5a2741[_0x43551d];for(const _0x48f147 of _0x15c24b['getAttributeKeys']())_0x4bd1a2['includes'](_0x48f147)||_0x49c646['removeAttribute'](_0x48f147,_0x15c24b);for(const _0x7387c8 of _0x4bd1a2)_0x49c646['setAttribute'](_0x7387c8,_0x41ec2c[_0x43551d][_0x7387c8],_0x15c24b);_0x49c646['remove'](_0x49c646['createRangeIn'](_0x15c24b)),_0x49c646['insert'](_0x235970['data']['parse'](_0x411c32,_0x15c24b),_0x15c24b,0x0);}});const _0x388a52=ft(_0x235970['locale'],'Restored');if(_0x4f385b['name'])_0x597c0=-0x1==_0x4f385b['name']['indexOf'](_0x388a52)?_0x388a52+':\x20'+_0x4f385b['name']:_0x4f385b['name'];else _0x597c0=_0x388a52+':\x20'+(_0x4f385b['createdAt']['toLocaleDateString'](_0x235970['locale']['uiLanguage'],{'month':'long','day':'numeric'})+',\x20'+_0x4f385b['createdAt']['toLocaleTimeString'](_0x235970['locale']['uiLanguage'],{'hour':'numeric','minute':'numeric'}));return await _0x343b07['saveRevision']({'name':_0x597c0}),_0x5c2b1a['isReady']=!0x0,_0x235970['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}}export{RestoreRevisionCommand,Revision,RevisionHistory,RevisionHistoryUI,RevisionHistoryUtils,RevisionTracker,RevisionViewer,RevisionViewerEditor,RevisionViewerIntegration,RevisionViewerLoadingOverlay,RevisionViewerUI,RevisionsRepository,RevisionsSidebar,ShowChangeCommand};
|
|
29
|
+
kt();static get['pluginName'](){return'RevisionsSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[RevisionViewer];}constructor(_0x2c6f76){super(_0x2c6f76),this['_revisionViewer']=_0x2c6f76['plugins']['get'](RevisionViewer),this['_revisionsRepository']=this['_revisionViewer']['repository'],this['_sidebarView']=null;}['init'](){const _0x41529f=this['_revisionsRepository']['_revisions'],_0x56a3f1=this['_createRevisionActions'](),_0x410bdf=this['editor']['config']['get']('revisionHistory.viewerSidebarContainer');this['_sidebarView']=new RevisionsSidebarView(this['editor']['locale'],_0x41529f,_0x56a3f1,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',(_0x6b2ec,_0x1a4e98)=>{_0x1a4e98['revisionViews']['on']('add',(_0x5b7de2,_0x1d0c4c)=>{_0x1d0c4c['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)),_0x410bdf['appendChild'](this['_sidebarView']['element']);}['destroy'](){this['_sidebarView']['element']['remove'](),this['_sidebarView']['destroy']();}['_handleEditorDataReady'](){const _0x445667=this['_revisionsRepository']['getRevision'](0x0);if(_0x445667){const _0x3afd09=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x445667['id']);this['_revisionViewer']['compare'](_0x445667,_0x3afd09);}}['_handleRevisionSelected'](_0x3bb00f,_0x40456f){const _0x1691a6=this['_revisionsRepository']['getRevision'](_0x40456f['id']),_0x4c576b=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x1691a6['id']);this['_revisionViewer']['compare'](_0x1691a6,_0x4c576b);}['_handleRevisionSetName'](_0x33accd,_0x166b22){this['_revisionsRepository']['getRevision'](_0x166b22['id'])['setName'](_0x166b22['name']);}['_handleDiffChange'](_0x521d78,_0x4af2b7,_0xeda4b1){const _0x2bde82=this['_revisionsRepository']['getRevisionsInDiff'](_0xeda4b1);_0x2bde82['length']>0x2?(this['_sidebarView']['highlightRevisions'](_0x2bde82),this['_sidebarView']['selectRevision'](null)):(this['_sidebarView']['highlightRevisions']([]),this['_sidebarView']['selectRevision'](_0x2bde82[0x0]));}['_createRevisionActions'](){const _0x557e5d=this['editor'],_0x1068f5=RevisionsSidebar['availableRevisionActions'],_0x262d31=_0x557e5d['config']['get']('revisionHistory.revisionActions')||RevisionsSidebar['defaultRevisionActions'];if(_0x262d31['length'])return _0x262d31['map'](_0x377103=>{const _0x28d156='string'==typeof _0x377103?Object['assign']({},_0x1068f5[_0x377103]):_0x377103;return _0x28d156['action']=_0x28d156['action']['bind'](this,_0x557e5d),_0x28d156['isVisible']&&(_0x28d156['isVisible']=_0x28d156['isVisible']['bind'](this,_0x557e5d)),_0x28d156;});}}function kt(){return{'compareAgainstSelected':{'name':'Compare\x20against\x20selected','action':({plugins:_0x44b76b},_0x22afad)=>{const _0x5a4f67=_0x44b76b['get'](RevisionViewer),_0x1f43fe=_0x5a4f67['repository'];let _0x2d0ac8=_0x5a4f67['diff']['newRevisionId'],_0x1facf5=_0x22afad['id'];_0x1f43fe['getIndex'](_0x2d0ac8)>_0x1f43fe['getIndex'](_0x1facf5)&&([_0x2d0ac8,_0x1facf5]=[_0x1facf5,_0x2d0ac8]),_0x5a4f67['compare'](_0x2d0ac8,_0x1facf5);},'isVisible':({plugins:_0x4012c0},_0x473592)=>{const _0x527fdc=_0x4012c0['get'](RevisionViewer);return!(_0x527fdc['repository']['getRevisionsInDiff'](_0x527fdc['diff'])['length']>0x2)&&!_0x473592['isSelected'];}},'restoreRevision':{'name':'Restore\x20this\x20revision','action':(_0x340f3f,{id:_0x17429a})=>{_0x340f3f['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x17429a);},'isVisible':({plugins:_0x317366},_0x3e15c7)=>!!_0x317366['get'](RevisionViewer)['repository']['getLaterVisibleRevision'](_0x3e15c7['id'])},'nameRevision':{'name':'Name\x20this\x20revision','action':({plugins:_0x22bd67},{id:_0x2686ee,revisionNameView:_0x3617c2})=>{const _0x3b40a7=_0x22bd67['get'](RevisionViewer),_0x18221e=_0x3b40a7['repository']['getEarlierVisibleRevision'](_0x2686ee);_0x3b40a7['compare'](_0x2686ee,_0x18221e),_0x3617c2['focus'](),_0x3617c2['fieldView']['select']();}}};}class RevisionViewerEditorUI extends at{['_view'];['_toolbarConfig'];['_elementReplacer'];get['view'](){return this['_view'];}constructor(_0x55272e,_0x4f0507){super(_0x55272e),this['_view']=_0x4f0507,this['_toolbarConfig']=ht(_0x55272e['config']['get']('toolbar')),this['_elementReplacer']=new _0x34ccd7();}get['element'](){return this['view']['element'];}['init'](_0x23b0e6){const _0x28fd2f=this['editor'],_0x290233=this['view'],_0x1200f3=_0x28fd2f['editing']['view'],_0x16b5c5=_0x290233['editable'],_0x29078c=_0x1200f3['document']['getRoot']();_0x16b5c5['name']=_0x29078c['rootName'],_0x290233['render']();const _0xec1cc4=_0x16b5c5['element'];this['setEditableElement'](_0x16b5c5['name'],_0xec1cc4),_0x290233['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x1200f3['attachDomRoot'](_0xec1cc4),this['_elementReplacer']['replace'](_0x23b0e6,this['element']),this['_initToolbar'](),this['fire']('ready');}['destroy'](){super['destroy']();const _0x20c5af=this['view'],_0x4c10f5=this['editor']['editing']['view'];this['_elementReplacer']['restore'](),_0x4c10f5['detachDomRoot'](_0x20c5af['editable']['name']),_0x20c5af['destroy']();}['_initToolbar'](){const _0x3cc2b2=this['view'];_0x3cc2b2['stickyPanel']['bind']('isActive')['to'](this['focusTracker'],'isFocused'),_0x3cc2b2['stickyPanel']['limiterElement']=_0x3cc2b2['element'],_0x3cc2b2['stickyPanel']['bind']('viewportTopOffset')['to'](this,'viewportOffset',({top:_0x18b58b})=>_0x18b58b),_0x3cc2b2['toolbar']['fillFromConfig'](this['_toolbarConfig'],this['componentFactory']),this['addToolbar'](_0x3cc2b2['toolbar']);}}class RevisionViewerEditorUIView extends ct{['_editable'];['stickyPanel'];['toolbar'];get['editable'](){return this['_editable'];}constructor(_0x4897bd,_0x17a041,_0x5d2003={}){super(_0x4897bd),this['stickyPanel']=new lt(_0x4897bd),this['toolbar']=new ut(_0x4897bd,{'shouldGroupWhenFull':_0x5d2003['shouldToolbarGroupWhenFull']}),this['_editable']=new dt(_0x4897bd,_0x17a041);}['render'](){super['render'](),this['stickyPanel']['content']['add'](this['toolbar']),this['top']['add'](this['stickyPanel']),this['main']['add'](this['editable']);}}class RevisionViewerEditor extends/* #__PURE__ -- @preserve */
|
|
30
|
+
_0x558ad5(_0x296569){['_ui'];get['ui'](){return this['_ui'];}constructor(_0x1daf2c,_0x185462){super(_0x185462),this['sourceElement']=_0x1daf2c,this['model']['document']['createRoot']();const _0x32381d=new RevisionViewerEditorUIView(this['locale'],this['editing']['view'],{'shouldToolbarGroupWhenFull':!0x0});this['_ui']=new RevisionViewerEditorUI(this,_0x32381d);}['destroy'](){return this['updateSourceElement'](),this['ui']['destroy'](),super['destroy']();}static async['create'](_0x56e976,_0x1dd9c1){const _0x22f943=new this(_0x56e976,_0x1dd9c1);return await _0x22f943['initPlugins'](),await _0x22f943['ui']['init'](_0x56e976),await _0x22f943['data']['init'](_0x22f943['config']['get']('initialData')||''),_0x22f943['fire']('ready'),_0x22f943;}}const It=['RevisionHistoryUI','RestrictedEditingMode','AIChat','AIReviewMode','AIBalloon','AIQuickActions','AIActions','AIChatShortcuts','AITranslate'];class RevisionViewerIntegration extends _0x2a792a{['result'];static get['pluginName'](){return'RevisionViewerIntegration';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x22f5c2){function _0x25a343(_0x1c8760){return _0x1c8760['map'](_0x461dab=>String['fromCharCode'](_0x461dab))['join']('');}super(_0x22f5c2),this['result']='end',_0x22f5c2[_0x25a343([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x25a343([0x76,0x69,0x65,0x77])][_0x25a343([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x25a343([0x61,0x75,0x74,0x6f]),_0x22f5c2[_0x25a343([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x25a343([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x25a343([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x25a343([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x25a343([0x6f,0x6b])});}}class RevisionHistory extends _0x2a792a{['_viewerEditor'];static get['pluginName'](){return'RevisionHistory';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[RevisionTracker,RevisionHistoryUI];}constructor(_0x34974f){if(super(_0x34974f),!this['editor']['config']['get']('revisionHistory'))throw new _0x5130bc('revision-history-missing-configuration',this);this['_viewerEditor']=null,this['set']('isRevisionViewerOpen',!0x1),this['editor']['config']['define']('revisionHistory.showRevisionViewerCallback',_0x1fb3bb=>this['_showRevisionViewer']({..._0x1fb3bb,'translations':this['editor']['locale']['translations']})),this['editor']['config']['define']('revisionHistory.closeRevisionViewerCallback',_0x31444c=>this['_closeRevisionViewer'](_0x31444c)),this['editor']['config']['define']('revisionHistory.restoreRevisionCallback',_0xa1173d=>this['_restoreRevision'](_0xa1173d)),this['editor']['config']['define']('revisionHistory.requireRevisionName',!0x1),this['_enhanceShowRevisionViewerCallback'](),this['_enhanceCloseRevisionViewerCallback']();}set['adapter'](_0x143293){this['editor']['plugins']['get']('RevisionTracker')['adapter']=_0x143293;}get['adapter'](){return this['editor']['plugins']['get']('RevisionTracker')['adapter'];}['addRevisionData'](_0x5659b9){return this['editor']['plugins']['get']('RevisionTracker')['addRevisionData'](_0x5659b9);}['getRevision'](_0xc150a1){return this['editor']['plugins']['get']('RevisionsRepository')['getRevision'](_0xc150a1);}['getRevisions'](_0x1cb2ca){return this['editor']['plugins']['get']('RevisionsRepository')['getRevisions'](_0x1cb2ca||{'toJSON':!0x1});}['_getRevisionViewerEditorConfig'](){const _0xd1d314=this['editor'],_0x52ea5a=_0x31f0a2(_0xd1d314,It),_0x34a0df=_0xd1d314['plugins']['get']('RevisionTracker'),_0x3e3418=_0xd1d314['plugins']['get'](_0x2ab97d)['users'];return _0x52ea5a['toolbar']=['exitToEditing','restoreRevision','changesNavigation'],delete _0x52ea5a['lazyRoots'],(_0x52ea5a['plugins']['push'](RevisionViewerIntegration,RevisionViewer,RevisionViewerUI,class RevisionViewerInit extends _0x2a792a{static get['requires'](){return[RevisionViewer,_0x2ab97d];}['init'](){const _0x3e7592=this['editor']['plugins']['get'](_0x2ab97d);for(const _0x407bff of _0x3e3418)_0x407bff['isAnonymous']||_0x3e7592['getUser'](_0x407bff['id'])||_0x3e7592['addUser'](_0x407bff);const _0xf3c26a=_0x34a0df['repository']['getRevisions']();let _0x3bf506=null;const _0x2950d7=this['editor']['plugins']['get']('RevisionViewer');_0x2950d7['adapter']=_0x34a0df['adapter'],_0x2950d7['bind']('isEnabled')['to'](_0x34a0df),this['editor']['commands']['get']('restoreRevision')['bind']('isEnabled')['to'](_0xd1d314,'isReadOnly',_0x10cdf7=>!_0x10cdf7);for(const _0x2f378a of _0xf3c26a){const _0x365dee=null===_0x2f378a['creator'];if(_0x365dee&&_0x2f378a['toVersion']===_0x2f378a['fromVersion'])continue;const _0x40792f=_0x2f378a['toJSON']();_0x2950d7['addRevisionData'](_0x40792f,(_0x5f45a0,_0x317f58,_0x50abdc)=>{if(_0x365dee){if(_0x3bf506)_0x3bf506['_update'](_0x5f45a0,_0x317f58);else{if(!_0x317f58){const _0x405d9c=_0x50abdc['toJSON']();_0x405d9c['id']=_0x529617(),_0x34a0df['saveRevision'](_0x405d9c,_0x50abdc['toVersion'])['then'](_0x8fd76d=>{_0x3bf506=_0x8fd76d;});}}}else _0x2f378a['_update'](_0x5f45a0,_0x317f58);});}}},RevisionsSidebar),_0x52ea5a);}['_enhanceShowRevisionViewerCallback'](){const _0x57b778=this['editor']['config']['get']('revisionHistory')['showRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.showRevisionViewerCallback',async()=>{this['editor']['enableReadOnlyMode']('revision-history-viewer-opened');const _0x20f99d=this['editor']['plugins']['get']('RevisionTracker');if(this['editor']['plugins']['has']('Autosave')){const _0x31ad89=this['editor']['plugins']['get']('Autosave');await _0x31ad89['save']();}else await _0x20f99d['update']();if(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('Dialog')){const _0x109d0e=this['editor']['plugins']['get']('Dialog');_0x109d0e['isOpen']&&_0x109d0e['hide']();}if(this['editor']['plugins']['has']('AITabs')){const _0x1b8e62=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0x527605 of _0x1b8e62)_0x527605['class']=_0x527605['class']?_0x527605['class']+'\x20ck-tab-panel_disabled':'ck-tab-panel_disabled';if(this['editor']['plugins']['has']('AIChat')){const _0x2627c6=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0x2627c6&&_0x2627c6['setAttribute']('tabindex','-1');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0x136e06=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0x136e06&&_0x136e06['setAttribute']('tabindex','-1');}}const _0x327f8a=this['_getRevisionViewerEditorConfig']();return _0x57b778(_0x327f8a)['then'](_0x4631b2=>{return(this['_viewerEditor']=_0x4631b2,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'),_0x4631b2);})['catch'](_0xa03488=>(console['error'](_0xa03488),this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),null));});}['_enhanceCloseRevisionViewerCallback'](){const _0x5520d9=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 _0x1a6581=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0x24b91a of _0x1a6581)_0x24b91a['class']='ck-tab-panel_disabled'===_0x24b91a['class']?'':_0x24b91a['class']['replace']('\x20ck-tab-panel_disabled','');if(this['editor']['plugins']['has']('AIChat')){const _0x5ce78c=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0x5ce78c&&_0x5ce78c['removeAttribute']('tabindex');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0x5c5ac5=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0x5c5ac5&&_0x5c5ac5['removeAttribute']('tabindex');}}return this['_viewerEditor']['plugins']['get']('RevisionViewer')['_cleanUp'](),_0x5520d9(this['_viewerEditor'])['then'](()=>{if(this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),this['_viewerEditor']=null,this['editor']['plugins']['has']('Annotations')){const _0xeaf980=this['editor']['plugins']['get']('Annotations');_0xeaf980['refreshVisibility'](),_0xeaf980['refreshPositioning']();}});});}['_showRevisionViewer'](_0x525939){const _0x5b94f3=this['editor']['config']['get']('revisionHistory.editorContainer'),_0x2b9e4e=this['editor']['config']['get']('revisionHistory.viewerContainer'),_0x52eb3e=this['editor']['config']['get']('revisionHistory.viewerEditorElement');return RevisionViewerEditor['create'](_0x52eb3e,_0x525939)['then'](_0x271982=>(_0x2b9e4e['style']['display']='block',_0x5b94f3['style']['display']='none',this['isRevisionViewerOpen']=!0x0,_0x271982));}['_closeRevisionViewer'](_0xfbfdd5){const _0x514983=this['editor']['config']['get']('revisionHistory.editorContainer');return this['editor']['config']['get']('revisionHistory.viewerContainer')['style']['display']='none',_0x514983['style']['display']='',this['isRevisionViewerOpen']=!0x1,_0xfbfdd5['destroy']();}async['_restoreRevision'](_0x49df8d){const _0x5b0993=this['editor'],_0x4e967c=this['_viewerEditor']['plugins']['get']('RevisionViewer'),_0xfef9e6=_0x5b0993['plugins']['get']('RevisionTracker'),_0x2aaa78=_0x5b0993['plugins']['get']('RevisionHistoryUtils'),_0xaff514=_0x4e967c['repository']['getRevision'](_0x49df8d);let _0x59eb58,_0x4c159a,_0x421efe;try{await _0x2aaa78['loadRevisionData'](_0xaff514,this['adapter']),_0x59eb58=_0x2aaa78['getRevisionDocumentData'](_0xaff514),_0x4c159a=_0x2aaa78['getRevisionRootsAttributes'](_0xaff514);}catch(_0x5be585){return void console['error'](_0x5be585);}_0x5b0993['model']['change'](_0x2fb253=>{for(const _0x52a745 of Array['from'](_0x5b0993['model']['markers']['getMarkersGroup']('restrictedEditingException')))_0x2fb253['removeMarker'](_0x52a745);}),_0x4e967c['isReady']=!0x1,_0x5b0993['model']['enqueueChange'](_0x5f0ee8=>{_0x5f0ee8['setSelection'](null),_0x5f0ee8['removeSelectionAttribute'](_0x5b0993['model']['document']['selection']['getAttributeKeys']());const _0x4dbaf6=Object['keys'](_0x59eb58);for(const _0x434fad of _0x5b0993['model']['document']['roots'])'$graveyard'!=_0x434fad['rootName']&&_0x434fad['isAttached']()&&!_0x4dbaf6['includes'](_0x434fad['rootName'])&&_0x5f0ee8['detachRoot'](_0x434fad);for(const _0xb1e7b1 of _0x4dbaf6){let _0x4faecd=_0x5b0993['model']['document']['getRoot'](_0xb1e7b1);if(!_0x4faecd||!_0x4faecd['isAttached']()){const _0x29dd27=_0xaff514['diffData']?.[_0xb1e7b1]?.['rootElementName']||'$root';_0x4faecd=_0x5f0ee8['addRoot'](_0xb1e7b1,_0x29dd27);}const _0x26715d=_0x4c159a[_0xb1e7b1],_0x463d87=Object['keys'](_0x26715d),_0x49f247=_0x59eb58[_0xb1e7b1];for(const _0x5258aa of _0x4faecd['getAttributeKeys']())_0x463d87['includes'](_0x5258aa)||_0x5f0ee8['removeAttribute'](_0x5258aa,_0x4faecd);for(const _0xfc516d of _0x463d87)_0x5f0ee8['setAttribute'](_0xfc516d,_0x4c159a[_0xb1e7b1][_0xfc516d],_0x4faecd);_0x5f0ee8['remove'](_0x5f0ee8['createRangeIn'](_0x4faecd)),_0x5f0ee8['insert'](_0x5b0993['data']['parse'](_0x49f247,_0x4faecd),_0x4faecd,0x0);}});const _0x54f49f=ft(_0x5b0993['locale'],'Restored');if(_0xaff514['name'])_0x421efe=-0x1==_0xaff514['name']['indexOf'](_0x54f49f)?_0x54f49f+':\x20'+_0xaff514['name']:_0xaff514['name'];else _0x421efe=_0x54f49f+':\x20'+(_0xaff514['createdAt']['toLocaleDateString'](_0x5b0993['locale']['uiLanguage'],{'month':'long','day':'numeric'})+',\x20'+_0xaff514['createdAt']['toLocaleTimeString'](_0x5b0993['locale']['uiLanguage'],{'hour':'numeric','minute':'numeric'}));return await _0xfef9e6['saveRevision']({'name':_0x421efe}),_0x4e967c['isReady']=!0x0,_0x5b0993['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}}export{RestoreRevisionCommand,Revision,RevisionHistory,RevisionHistoryUI,RevisionHistoryUtils,RevisionTracker,RevisionViewer,RevisionViewerEditor,RevisionViewerIntegration,RevisionViewerLoadingOverlay,RevisionViewerUI,RevisionsRepository,RevisionsSidebar,ShowChangeCommand};
|